UNPKG

341 kBJavaScriptView Raw
1/*! __LICENSE__ */
2(function webpackUniversalModuleDefinition(root, factory) {
3 if(typeof exports === 'object' && typeof module === 'object')
4 module.exports = factory();
5 else if(typeof define === 'function' && define.amd)
6 define([], factory);
7 else if(typeof exports === 'object')
8 exports["Horizon"] = factory();
9 else
10 root["Horizon"] = factory();
11})(this, function() {
12return /******/ (function(modules) { // webpackBootstrap
13/******/ // The module cache
14/******/ var installedModules = {};
15/******/
16/******/ // The require function
17/******/ function __webpack_require__(moduleId) {
18/******/
19/******/ // Check if module is in cache
20/******/ if(installedModules[moduleId])
21/******/ return installedModules[moduleId].exports;
22/******/
23/******/ // Create a new module (and put it into the cache)
24/******/ var module = installedModules[moduleId] = {
25/******/ exports: {},
26/******/ id: moduleId,
27/******/ loaded: false
28/******/ };
29/******/
30/******/ // Execute the module function
31/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
32/******/
33/******/ // Flag the module as loaded
34/******/ module.loaded = true;
35/******/
36/******/ // Return the exports of the module
37/******/ return module.exports;
38/******/ }
39/******/
40/******/
41/******/ // expose the modules object (__webpack_modules__)
42/******/ __webpack_require__.m = modules;
43/******/
44/******/ // expose the module cache
45/******/ __webpack_require__.c = installedModules;
46/******/
47/******/ // __webpack_public_path__
48/******/ __webpack_require__.p = "";
49/******/
50/******/ // Load entry module and return exports
51/******/ return __webpack_require__(0);
52/******/ })
53/************************************************************************/
54/******/ ([
55/* 0 */
56/*!*******************************!*\
57 !*** ./src/index-polyfill.js ***!
58 \*******************************/
59/***/ function(module, exports, __webpack_require__) {
60
61 'use strict';
62
63 // Ensures these features are present or polyfilled
64 // See http://kangax.github.io/compat-table/es6/
65 __webpack_require__(/*! core-js/fn/array/from */ 1);
66 __webpack_require__(/*! core-js/fn/array/find-index */ 53);
67 __webpack_require__(/*! core-js/fn/array/keys */ 60);
68 __webpack_require__(/*! core-js/fn/object/assign */ 63);
69
70 module.exports = __webpack_require__(/*! ./index */ 68);
71
72/***/ },
73/* 1 */
74/*!************************************!*\
75 !*** ./~/core-js/fn/array/from.js ***!
76 \************************************/
77/***/ function(module, exports, __webpack_require__) {
78
79 __webpack_require__(/*! ../../modules/es6.string.iterator */ 2);
80 __webpack_require__(/*! ../../modules/es6.array.from */ 46);
81 module.exports = __webpack_require__(/*! ../../modules/_core */ 10).Array.from;
82
83/***/ },
84/* 2 */
85/*!**************************************************!*\
86 !*** ./~/core-js/modules/es6.string.iterator.js ***!
87 \**************************************************/
88/***/ function(module, exports, __webpack_require__) {
89
90 'use strict';
91 var $at = __webpack_require__(/*! ./_string-at */ 3)(true);
92
93 // 21.1.3.27 String.prototype[@@iterator]()
94 __webpack_require__(/*! ./_iter-define */ 6)(String, 'String', function(iterated){
95 this._t = String(iterated); // target
96 this._i = 0; // next index
97 // 21.1.5.2.1 %StringIteratorPrototype%.next()
98 }, function(){
99 var O = this._t
100 , index = this._i
101 , point;
102 if(index >= O.length)return {value: undefined, done: true};
103 point = $at(O, index);
104 this._i += point.length;
105 return {value: point, done: false};
106 });
107
108/***/ },
109/* 3 */
110/*!*****************************************!*\
111 !*** ./~/core-js/modules/_string-at.js ***!
112 \*****************************************/
113/***/ function(module, exports, __webpack_require__) {
114
115 var toInteger = __webpack_require__(/*! ./_to-integer */ 4)
116 , defined = __webpack_require__(/*! ./_defined */ 5);
117 // true -> String#at
118 // false -> String#codePointAt
119 module.exports = function(TO_STRING){
120 return function(that, pos){
121 var s = String(defined(that))
122 , i = toInteger(pos)
123 , l = s.length
124 , a, b;
125 if(i < 0 || i >= l)return TO_STRING ? '' : undefined;
126 a = s.charCodeAt(i);
127 return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
128 ? TO_STRING ? s.charAt(i) : a
129 : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
130 };
131 };
132
133/***/ },
134/* 4 */
135/*!******************************************!*\
136 !*** ./~/core-js/modules/_to-integer.js ***!
137 \******************************************/
138/***/ function(module, exports) {
139
140 // 7.1.4 ToInteger
141 var ceil = Math.ceil
142 , floor = Math.floor;
143 module.exports = function(it){
144 return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
145 };
146
147/***/ },
148/* 5 */
149/*!***************************************!*\
150 !*** ./~/core-js/modules/_defined.js ***!
151 \***************************************/
152/***/ function(module, exports) {
153
154 // 7.2.1 RequireObjectCoercible(argument)
155 module.exports = function(it){
156 if(it == undefined)throw TypeError("Can't call method on " + it);
157 return it;
158 };
159
160/***/ },
161/* 6 */
162/*!*******************************************!*\
163 !*** ./~/core-js/modules/_iter-define.js ***!
164 \*******************************************/
165/***/ function(module, exports, __webpack_require__) {
166
167 'use strict';
168 var LIBRARY = __webpack_require__(/*! ./_library */ 7)
169 , $export = __webpack_require__(/*! ./_export */ 8)
170 , redefine = __webpack_require__(/*! ./_redefine */ 21)
171 , hide = __webpack_require__(/*! ./_hide */ 11)
172 , has = __webpack_require__(/*! ./_has */ 22)
173 , Iterators = __webpack_require__(/*! ./_iterators */ 26)
174 , $iterCreate = __webpack_require__(/*! ./_iter-create */ 27)
175 , setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ 42)
176 , getPrototypeOf = __webpack_require__(/*! ./_object-gpo */ 44)
177 , ITERATOR = __webpack_require__(/*! ./_wks */ 43)('iterator')
178 , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next`
179 , FF_ITERATOR = '@@iterator'
180 , KEYS = 'keys'
181 , VALUES = 'values';
182
183 var returnThis = function(){ return this; };
184
185 module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){
186 $iterCreate(Constructor, NAME, next);
187 var getMethod = function(kind){
188 if(!BUGGY && kind in proto)return proto[kind];
189 switch(kind){
190 case KEYS: return function keys(){ return new Constructor(this, kind); };
191 case VALUES: return function values(){ return new Constructor(this, kind); };
192 } return function entries(){ return new Constructor(this, kind); };
193 };
194 var TAG = NAME + ' Iterator'
195 , DEF_VALUES = DEFAULT == VALUES
196 , VALUES_BUG = false
197 , proto = Base.prototype
198 , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]
199 , $default = $native || getMethod(DEFAULT)
200 , $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined
201 , $anyNative = NAME == 'Array' ? proto.entries || $native : $native
202 , methods, key, IteratorPrototype;
203 // Fix native
204 if($anyNative){
205 IteratorPrototype = getPrototypeOf($anyNative.call(new Base));
206 if(IteratorPrototype !== Object.prototype){
207 // Set @@toStringTag to native iterators
208 setToStringTag(IteratorPrototype, TAG, true);
209 // fix for some old engines
210 if(!LIBRARY && !has(IteratorPrototype, ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis);
211 }
212 }
213 // fix Array#{values, @@iterator}.name in V8 / FF
214 if(DEF_VALUES && $native && $native.name !== VALUES){
215 VALUES_BUG = true;
216 $default = function values(){ return $native.call(this); };
217 }
218 // Define iterator
219 if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){
220 hide(proto, ITERATOR, $default);
221 }
222 // Plug for library
223 Iterators[NAME] = $default;
224 Iterators[TAG] = returnThis;
225 if(DEFAULT){
226 methods = {
227 values: DEF_VALUES ? $default : getMethod(VALUES),
228 keys: IS_SET ? $default : getMethod(KEYS),
229 entries: $entries
230 };
231 if(FORCED)for(key in methods){
232 if(!(key in proto))redefine(proto, key, methods[key]);
233 } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
234 }
235 return methods;
236 };
237
238/***/ },
239/* 7 */
240/*!***************************************!*\
241 !*** ./~/core-js/modules/_library.js ***!
242 \***************************************/
243/***/ function(module, exports) {
244
245 module.exports = false;
246
247/***/ },
248/* 8 */
249/*!**************************************!*\
250 !*** ./~/core-js/modules/_export.js ***!
251 \**************************************/
252/***/ function(module, exports, __webpack_require__) {
253
254 var global = __webpack_require__(/*! ./_global */ 9)
255 , core = __webpack_require__(/*! ./_core */ 10)
256 , hide = __webpack_require__(/*! ./_hide */ 11)
257 , redefine = __webpack_require__(/*! ./_redefine */ 21)
258 , ctx = __webpack_require__(/*! ./_ctx */ 24)
259 , PROTOTYPE = 'prototype';
260
261 var $export = function(type, name, source){
262 var IS_FORCED = type & $export.F
263 , IS_GLOBAL = type & $export.G
264 , IS_STATIC = type & $export.S
265 , IS_PROTO = type & $export.P
266 , IS_BIND = type & $export.B
267 , target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE]
268 , exports = IS_GLOBAL ? core : core[name] || (core[name] = {})
269 , expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {})
270 , key, own, out, exp;
271 if(IS_GLOBAL)source = name;
272 for(key in source){
273 // contains in native
274 own = !IS_FORCED && target && target[key] !== undefined;
275 // export native or passed
276 out = (own ? target : source)[key];
277 // bind timers to global for call from export context
278 exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
279 // extend global
280 if(target)redefine(target, key, out, type & $export.U);
281 // export
282 if(exports[key] != out)hide(exports, key, exp);
283 if(IS_PROTO && expProto[key] != out)expProto[key] = out;
284 }
285 };
286 global.core = core;
287 // type bitmap
288 $export.F = 1; // forced
289 $export.G = 2; // global
290 $export.S = 4; // static
291 $export.P = 8; // proto
292 $export.B = 16; // bind
293 $export.W = 32; // wrap
294 $export.U = 64; // safe
295 $export.R = 128; // real proto method for `library`
296 module.exports = $export;
297
298/***/ },
299/* 9 */
300/*!**************************************!*\
301 !*** ./~/core-js/modules/_global.js ***!
302 \**************************************/
303/***/ function(module, exports) {
304
305 // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
306 var global = module.exports = typeof window != 'undefined' && window.Math == Math
307 ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();
308 if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef
309
310/***/ },
311/* 10 */
312/*!************************************!*\
313 !*** ./~/core-js/modules/_core.js ***!
314 \************************************/
315/***/ function(module, exports) {
316
317 var core = module.exports = {version: '2.3.0'};
318 if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef
319
320/***/ },
321/* 11 */
322/*!************************************!*\
323 !*** ./~/core-js/modules/_hide.js ***!
324 \************************************/
325/***/ function(module, exports, __webpack_require__) {
326
327 var dP = __webpack_require__(/*! ./_object-dp */ 12)
328 , createDesc = __webpack_require__(/*! ./_property-desc */ 20);
329 module.exports = __webpack_require__(/*! ./_descriptors */ 16) ? function(object, key, value){
330 return dP.f(object, key, createDesc(1, value));
331 } : function(object, key, value){
332 object[key] = value;
333 return object;
334 };
335
336/***/ },
337/* 12 */
338/*!*****************************************!*\
339 !*** ./~/core-js/modules/_object-dp.js ***!
340 \*****************************************/
341/***/ function(module, exports, __webpack_require__) {
342
343 var anObject = __webpack_require__(/*! ./_an-object */ 13)
344 , IE8_DOM_DEFINE = __webpack_require__(/*! ./_ie8-dom-define */ 15)
345 , toPrimitive = __webpack_require__(/*! ./_to-primitive */ 19)
346 , dP = Object.defineProperty;
347
348 exports.f = __webpack_require__(/*! ./_descriptors */ 16) ? Object.defineProperty : function defineProperty(O, P, Attributes){
349 anObject(O);
350 P = toPrimitive(P, true);
351 anObject(Attributes);
352 if(IE8_DOM_DEFINE)try {
353 return dP(O, P, Attributes);
354 } catch(e){ /* empty */ }
355 if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!');
356 if('value' in Attributes)O[P] = Attributes.value;
357 return O;
358 };
359
360/***/ },
361/* 13 */
362/*!*****************************************!*\
363 !*** ./~/core-js/modules/_an-object.js ***!
364 \*****************************************/
365/***/ function(module, exports, __webpack_require__) {
366
367 var isObject = __webpack_require__(/*! ./_is-object */ 14);
368 module.exports = function(it){
369 if(!isObject(it))throw TypeError(it + ' is not an object!');
370 return it;
371 };
372
373/***/ },
374/* 14 */
375/*!*****************************************!*\
376 !*** ./~/core-js/modules/_is-object.js ***!
377 \*****************************************/
378/***/ function(module, exports) {
379
380 module.exports = function(it){
381 return typeof it === 'object' ? it !== null : typeof it === 'function';
382 };
383
384/***/ },
385/* 15 */
386/*!**********************************************!*\
387 !*** ./~/core-js/modules/_ie8-dom-define.js ***!
388 \**********************************************/
389/***/ function(module, exports, __webpack_require__) {
390
391 module.exports = !__webpack_require__(/*! ./_descriptors */ 16) && !__webpack_require__(/*! ./_fails */ 17)(function(){
392 return Object.defineProperty(__webpack_require__(/*! ./_dom-create */ 18)('div'), 'a', {get: function(){ return 7; }}).a != 7;
393 });
394
395/***/ },
396/* 16 */
397/*!*******************************************!*\
398 !*** ./~/core-js/modules/_descriptors.js ***!
399 \*******************************************/
400/***/ function(module, exports, __webpack_require__) {
401
402 // Thank's IE8 for his funny defineProperty
403 module.exports = !__webpack_require__(/*! ./_fails */ 17)(function(){
404 return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;
405 });
406
407/***/ },
408/* 17 */
409/*!*************************************!*\
410 !*** ./~/core-js/modules/_fails.js ***!
411 \*************************************/
412/***/ function(module, exports) {
413
414 module.exports = function(exec){
415 try {
416 return !!exec();
417 } catch(e){
418 return true;
419 }
420 };
421
422/***/ },
423/* 18 */
424/*!******************************************!*\
425 !*** ./~/core-js/modules/_dom-create.js ***!
426 \******************************************/
427/***/ function(module, exports, __webpack_require__) {
428
429 var isObject = __webpack_require__(/*! ./_is-object */ 14)
430 , document = __webpack_require__(/*! ./_global */ 9).document
431 // in old IE typeof document.createElement is 'object'
432 , is = isObject(document) && isObject(document.createElement);
433 module.exports = function(it){
434 return is ? document.createElement(it) : {};
435 };
436
437/***/ },
438/* 19 */
439/*!********************************************!*\
440 !*** ./~/core-js/modules/_to-primitive.js ***!
441 \********************************************/
442/***/ function(module, exports, __webpack_require__) {
443
444 // 7.1.1 ToPrimitive(input [, PreferredType])
445 var isObject = __webpack_require__(/*! ./_is-object */ 14);
446 // instead of the ES6 spec version, we didn't implement @@toPrimitive case
447 // and the second argument - flag - preferred type is a string
448 module.exports = function(it, S){
449 if(!isObject(it))return it;
450 var fn, val;
451 if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
452 if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val;
453 if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
454 throw TypeError("Can't convert object to primitive value");
455 };
456
457/***/ },
458/* 20 */
459/*!*********************************************!*\
460 !*** ./~/core-js/modules/_property-desc.js ***!
461 \*********************************************/
462/***/ function(module, exports) {
463
464 module.exports = function(bitmap, value){
465 return {
466 enumerable : !(bitmap & 1),
467 configurable: !(bitmap & 2),
468 writable : !(bitmap & 4),
469 value : value
470 };
471 };
472
473/***/ },
474/* 21 */
475/*!****************************************!*\
476 !*** ./~/core-js/modules/_redefine.js ***!
477 \****************************************/
478/***/ function(module, exports, __webpack_require__) {
479
480 var global = __webpack_require__(/*! ./_global */ 9)
481 , hide = __webpack_require__(/*! ./_hide */ 11)
482 , has = __webpack_require__(/*! ./_has */ 22)
483 , SRC = __webpack_require__(/*! ./_uid */ 23)('src')
484 , TO_STRING = 'toString'
485 , $toString = Function[TO_STRING]
486 , TPL = ('' + $toString).split(TO_STRING);
487
488 __webpack_require__(/*! ./_core */ 10).inspectSource = function(it){
489 return $toString.call(it);
490 };
491
492 (module.exports = function(O, key, val, safe){
493 var isFunction = typeof val == 'function';
494 if(isFunction)has(val, 'name') || hide(val, 'name', key);
495 if(O[key] === val)return;
496 if(isFunction)has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));
497 if(O === global){
498 O[key] = val;
499 } else {
500 if(!safe){
501 delete O[key];
502 hide(O, key, val);
503 } else {
504 if(O[key])O[key] = val;
505 else hide(O, key, val);
506 }
507 }
508 // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
509 })(Function.prototype, TO_STRING, function toString(){
510 return typeof this == 'function' && this[SRC] || $toString.call(this);
511 });
512
513/***/ },
514/* 22 */
515/*!***********************************!*\
516 !*** ./~/core-js/modules/_has.js ***!
517 \***********************************/
518/***/ function(module, exports) {
519
520 var hasOwnProperty = {}.hasOwnProperty;
521 module.exports = function(it, key){
522 return hasOwnProperty.call(it, key);
523 };
524
525/***/ },
526/* 23 */
527/*!***********************************!*\
528 !*** ./~/core-js/modules/_uid.js ***!
529 \***********************************/
530/***/ function(module, exports) {
531
532 var id = 0
533 , px = Math.random();
534 module.exports = function(key){
535 return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
536 };
537
538/***/ },
539/* 24 */
540/*!***********************************!*\
541 !*** ./~/core-js/modules/_ctx.js ***!
542 \***********************************/
543/***/ function(module, exports, __webpack_require__) {
544
545 // optional / simple context binding
546 var aFunction = __webpack_require__(/*! ./_a-function */ 25);
547 module.exports = function(fn, that, length){
548 aFunction(fn);
549 if(that === undefined)return fn;
550 switch(length){
551 case 1: return function(a){
552 return fn.call(that, a);
553 };
554 case 2: return function(a, b){
555 return fn.call(that, a, b);
556 };
557 case 3: return function(a, b, c){
558 return fn.call(that, a, b, c);
559 };
560 }
561 return function(/* ...args */){
562 return fn.apply(that, arguments);
563 };
564 };
565
566/***/ },
567/* 25 */
568/*!******************************************!*\
569 !*** ./~/core-js/modules/_a-function.js ***!
570 \******************************************/
571/***/ function(module, exports) {
572
573 module.exports = function(it){
574 if(typeof it != 'function')throw TypeError(it + ' is not a function!');
575 return it;
576 };
577
578/***/ },
579/* 26 */
580/*!*****************************************!*\
581 !*** ./~/core-js/modules/_iterators.js ***!
582 \*****************************************/
583/***/ function(module, exports) {
584
585 module.exports = {};
586
587/***/ },
588/* 27 */
589/*!*******************************************!*\
590 !*** ./~/core-js/modules/_iter-create.js ***!
591 \*******************************************/
592/***/ function(module, exports, __webpack_require__) {
593
594 'use strict';
595 var create = __webpack_require__(/*! ./_object-create */ 28)
596 , descriptor = __webpack_require__(/*! ./_property-desc */ 20)
597 , setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ 42)
598 , IteratorPrototype = {};
599
600 // 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
601 __webpack_require__(/*! ./_hide */ 11)(IteratorPrototype, __webpack_require__(/*! ./_wks */ 43)('iterator'), function(){ return this; });
602
603 module.exports = function(Constructor, NAME, next){
604 Constructor.prototype = create(IteratorPrototype, {next: descriptor(1, next)});
605 setToStringTag(Constructor, NAME + ' Iterator');
606 };
607
608/***/ },
609/* 28 */
610/*!*********************************************!*\
611 !*** ./~/core-js/modules/_object-create.js ***!
612 \*********************************************/
613/***/ function(module, exports, __webpack_require__) {
614
615 // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
616 var anObject = __webpack_require__(/*! ./_an-object */ 13)
617 , dPs = __webpack_require__(/*! ./_object-dps */ 29)
618 , enumBugKeys = __webpack_require__(/*! ./_enum-bug-keys */ 40)
619 , IE_PROTO = __webpack_require__(/*! ./_shared-key */ 38)('IE_PROTO')
620 , Empty = function(){ /* empty */ }
621 , PROTOTYPE = 'prototype';
622
623 // Create object with fake `null` prototype: use iframe Object with cleared prototype
624 var createDict = function(){
625 // Thrash, waste and sodomy: IE GC bug
626 var iframe = __webpack_require__(/*! ./_dom-create */ 18)('iframe')
627 , i = enumBugKeys.length
628 , gt = '>'
629 , iframeDocument;
630 iframe.style.display = 'none';
631 __webpack_require__(/*! ./_html */ 41).appendChild(iframe);
632 iframe.src = 'javascript:'; // eslint-disable-line no-script-url
633 // createDict = iframe.contentWindow.Object;
634 // html.removeChild(iframe);
635 iframeDocument = iframe.contentWindow.document;
636 iframeDocument.open();
637 iframeDocument.write('<script>document.F=Object</script' + gt);
638 iframeDocument.close();
639 createDict = iframeDocument.F;
640 while(i--)delete createDict[PROTOTYPE][enumBugKeys[i]];
641 return createDict();
642 };
643
644 module.exports = Object.create || function create(O, Properties){
645 var result;
646 if(O !== null){
647 Empty[PROTOTYPE] = anObject(O);
648 result = new Empty;
649 Empty[PROTOTYPE] = null;
650 // add "__proto__" for Object.getPrototypeOf polyfill
651 result[IE_PROTO] = O;
652 } else result = createDict();
653 return Properties === undefined ? result : dPs(result, Properties);
654 };
655
656/***/ },
657/* 29 */
658/*!******************************************!*\
659 !*** ./~/core-js/modules/_object-dps.js ***!
660 \******************************************/
661/***/ function(module, exports, __webpack_require__) {
662
663 var dP = __webpack_require__(/*! ./_object-dp */ 12)
664 , anObject = __webpack_require__(/*! ./_an-object */ 13)
665 , getKeys = __webpack_require__(/*! ./_object-keys */ 30);
666
667 module.exports = __webpack_require__(/*! ./_descriptors */ 16) ? Object.defineProperties : function defineProperties(O, Properties){
668 anObject(O);
669 var keys = getKeys(Properties)
670 , length = keys.length
671 , i = 0
672 , P;
673 while(length > i)dP.f(O, P = keys[i++], Properties[P]);
674 return O;
675 };
676
677/***/ },
678/* 30 */
679/*!*******************************************!*\
680 !*** ./~/core-js/modules/_object-keys.js ***!
681 \*******************************************/
682/***/ function(module, exports, __webpack_require__) {
683
684 // 19.1.2.14 / 15.2.3.14 Object.keys(O)
685 var $keys = __webpack_require__(/*! ./_object-keys-internal */ 31)
686 , enumBugKeys = __webpack_require__(/*! ./_enum-bug-keys */ 40);
687
688 module.exports = Object.keys || function keys(O){
689 return $keys(O, enumBugKeys);
690 };
691
692/***/ },
693/* 31 */
694/*!****************************************************!*\
695 !*** ./~/core-js/modules/_object-keys-internal.js ***!
696 \****************************************************/
697/***/ function(module, exports, __webpack_require__) {
698
699 var has = __webpack_require__(/*! ./_has */ 22)
700 , toIObject = __webpack_require__(/*! ./_to-iobject */ 32)
701 , arrayIndexOf = __webpack_require__(/*! ./_array-includes */ 35)(false)
702 , IE_PROTO = __webpack_require__(/*! ./_shared-key */ 38)('IE_PROTO');
703
704 module.exports = function(object, names){
705 var O = toIObject(object)
706 , i = 0
707 , result = []
708 , key;
709 for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key);
710 // Don't enum bug & hidden keys
711 while(names.length > i)if(has(O, key = names[i++])){
712 ~arrayIndexOf(result, key) || result.push(key);
713 }
714 return result;
715 };
716
717/***/ },
718/* 32 */
719/*!******************************************!*\
720 !*** ./~/core-js/modules/_to-iobject.js ***!
721 \******************************************/
722/***/ function(module, exports, __webpack_require__) {
723
724 // to indexed object, toObject with fallback for non-array-like ES3 strings
725 var IObject = __webpack_require__(/*! ./_iobject */ 33)
726 , defined = __webpack_require__(/*! ./_defined */ 5);
727 module.exports = function(it){
728 return IObject(defined(it));
729 };
730
731/***/ },
732/* 33 */
733/*!***************************************!*\
734 !*** ./~/core-js/modules/_iobject.js ***!
735 \***************************************/
736/***/ function(module, exports, __webpack_require__) {
737
738 // fallback for non-array-like ES3 and non-enumerable old V8 strings
739 var cof = __webpack_require__(/*! ./_cof */ 34);
740 module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){
741 return cof(it) == 'String' ? it.split('') : Object(it);
742 };
743
744/***/ },
745/* 34 */
746/*!***********************************!*\
747 !*** ./~/core-js/modules/_cof.js ***!
748 \***********************************/
749/***/ function(module, exports) {
750
751 var toString = {}.toString;
752
753 module.exports = function(it){
754 return toString.call(it).slice(8, -1);
755 };
756
757/***/ },
758/* 35 */
759/*!**********************************************!*\
760 !*** ./~/core-js/modules/_array-includes.js ***!
761 \**********************************************/
762/***/ function(module, exports, __webpack_require__) {
763
764 // false -> Array#indexOf
765 // true -> Array#includes
766 var toIObject = __webpack_require__(/*! ./_to-iobject */ 32)
767 , toLength = __webpack_require__(/*! ./_to-length */ 36)
768 , toIndex = __webpack_require__(/*! ./_to-index */ 37);
769 module.exports = function(IS_INCLUDES){
770 return function($this, el, fromIndex){
771 var O = toIObject($this)
772 , length = toLength(O.length)
773 , index = toIndex(fromIndex, length)
774 , value;
775 // Array#includes uses SameValueZero equality algorithm
776 if(IS_INCLUDES && el != el)while(length > index){
777 value = O[index++];
778 if(value != value)return true;
779 // Array#toIndex ignores holes, Array#includes - not
780 } else for(;length > index; index++)if(IS_INCLUDES || index in O){
781 if(O[index] === el)return IS_INCLUDES || index || 0;
782 } return !IS_INCLUDES && -1;
783 };
784 };
785
786/***/ },
787/* 36 */
788/*!*****************************************!*\
789 !*** ./~/core-js/modules/_to-length.js ***!
790 \*****************************************/
791/***/ function(module, exports, __webpack_require__) {
792
793 // 7.1.15 ToLength
794 var toInteger = __webpack_require__(/*! ./_to-integer */ 4)
795 , min = Math.min;
796 module.exports = function(it){
797 return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
798 };
799
800/***/ },
801/* 37 */
802/*!****************************************!*\
803 !*** ./~/core-js/modules/_to-index.js ***!
804 \****************************************/
805/***/ function(module, exports, __webpack_require__) {
806
807 var toInteger = __webpack_require__(/*! ./_to-integer */ 4)
808 , max = Math.max
809 , min = Math.min;
810 module.exports = function(index, length){
811 index = toInteger(index);
812 return index < 0 ? max(index + length, 0) : min(index, length);
813 };
814
815/***/ },
816/* 38 */
817/*!******************************************!*\
818 !*** ./~/core-js/modules/_shared-key.js ***!
819 \******************************************/
820/***/ function(module, exports, __webpack_require__) {
821
822 var shared = __webpack_require__(/*! ./_shared */ 39)('keys')
823 , uid = __webpack_require__(/*! ./_uid */ 23);
824 module.exports = function(key){
825 return shared[key] || (shared[key] = uid(key));
826 };
827
828/***/ },
829/* 39 */
830/*!**************************************!*\
831 !*** ./~/core-js/modules/_shared.js ***!
832 \**************************************/
833/***/ function(module, exports, __webpack_require__) {
834
835 var global = __webpack_require__(/*! ./_global */ 9)
836 , SHARED = '__core-js_shared__'
837 , store = global[SHARED] || (global[SHARED] = {});
838 module.exports = function(key){
839 return store[key] || (store[key] = {});
840 };
841
842/***/ },
843/* 40 */
844/*!*********************************************!*\
845 !*** ./~/core-js/modules/_enum-bug-keys.js ***!
846 \*********************************************/
847/***/ function(module, exports) {
848
849 // IE 8- don't enum bug keys
850 module.exports = (
851 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
852 ).split(',');
853
854/***/ },
855/* 41 */
856/*!************************************!*\
857 !*** ./~/core-js/modules/_html.js ***!
858 \************************************/
859/***/ function(module, exports, __webpack_require__) {
860
861 module.exports = __webpack_require__(/*! ./_global */ 9).document && document.documentElement;
862
863/***/ },
864/* 42 */
865/*!*************************************************!*\
866 !*** ./~/core-js/modules/_set-to-string-tag.js ***!
867 \*************************************************/
868/***/ function(module, exports, __webpack_require__) {
869
870 var def = __webpack_require__(/*! ./_object-dp */ 12).f
871 , has = __webpack_require__(/*! ./_has */ 22)
872 , TAG = __webpack_require__(/*! ./_wks */ 43)('toStringTag');
873
874 module.exports = function(it, tag, stat){
875 if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag});
876 };
877
878/***/ },
879/* 43 */
880/*!***********************************!*\
881 !*** ./~/core-js/modules/_wks.js ***!
882 \***********************************/
883/***/ function(module, exports, __webpack_require__) {
884
885 var store = __webpack_require__(/*! ./_shared */ 39)('wks')
886 , uid = __webpack_require__(/*! ./_uid */ 23)
887 , Symbol = __webpack_require__(/*! ./_global */ 9).Symbol
888 , USE_SYMBOL = typeof Symbol == 'function';
889
890 var $exports = module.exports = function(name){
891 return store[name] || (store[name] =
892 USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
893 };
894
895 $exports.store = store;
896
897/***/ },
898/* 44 */
899/*!******************************************!*\
900 !*** ./~/core-js/modules/_object-gpo.js ***!
901 \******************************************/
902/***/ function(module, exports, __webpack_require__) {
903
904 // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
905 var has = __webpack_require__(/*! ./_has */ 22)
906 , toObject = __webpack_require__(/*! ./_to-object */ 45)
907 , IE_PROTO = __webpack_require__(/*! ./_shared-key */ 38)('IE_PROTO')
908 , ObjectProto = Object.prototype;
909
910 module.exports = Object.getPrototypeOf || function(O){
911 O = toObject(O);
912 if(has(O, IE_PROTO))return O[IE_PROTO];
913 if(typeof O.constructor == 'function' && O instanceof O.constructor){
914 return O.constructor.prototype;
915 } return O instanceof Object ? ObjectProto : null;
916 };
917
918/***/ },
919/* 45 */
920/*!*****************************************!*\
921 !*** ./~/core-js/modules/_to-object.js ***!
922 \*****************************************/
923/***/ function(module, exports, __webpack_require__) {
924
925 // 7.1.13 ToObject(argument)
926 var defined = __webpack_require__(/*! ./_defined */ 5);
927 module.exports = function(it){
928 return Object(defined(it));
929 };
930
931/***/ },
932/* 46 */
933/*!*********************************************!*\
934 !*** ./~/core-js/modules/es6.array.from.js ***!
935 \*********************************************/
936/***/ function(module, exports, __webpack_require__) {
937
938 'use strict';
939 var ctx = __webpack_require__(/*! ./_ctx */ 24)
940 , $export = __webpack_require__(/*! ./_export */ 8)
941 , toObject = __webpack_require__(/*! ./_to-object */ 45)
942 , call = __webpack_require__(/*! ./_iter-call */ 47)
943 , isArrayIter = __webpack_require__(/*! ./_is-array-iter */ 48)
944 , toLength = __webpack_require__(/*! ./_to-length */ 36)
945 , createProperty = __webpack_require__(/*! ./_create-property */ 49)
946 , getIterFn = __webpack_require__(/*! ./core.get-iterator-method */ 50);
947
948 $export($export.S + $export.F * !__webpack_require__(/*! ./_iter-detect */ 52)(function(iter){ Array.from(iter); }), 'Array', {
949 // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)
950 from: function from(arrayLike/*, mapfn = undefined, thisArg = undefined*/){
951 var O = toObject(arrayLike)
952 , C = typeof this == 'function' ? this : Array
953 , aLen = arguments.length
954 , mapfn = aLen > 1 ? arguments[1] : undefined
955 , mapping = mapfn !== undefined
956 , index = 0
957 , iterFn = getIterFn(O)
958 , length, result, step, iterator;
959 if(mapping)mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);
960 // if object isn't iterable or it's array with default iterator - use simple case
961 if(iterFn != undefined && !(C == Array && isArrayIter(iterFn))){
962 for(iterator = iterFn.call(O), result = new C; !(step = iterator.next()).done; index++){
963 createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);
964 }
965 } else {
966 length = toLength(O.length);
967 for(result = new C(length); length > index; index++){
968 createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);
969 }
970 }
971 result.length = index;
972 return result;
973 }
974 });
975
976
977/***/ },
978/* 47 */
979/*!*****************************************!*\
980 !*** ./~/core-js/modules/_iter-call.js ***!
981 \*****************************************/
982/***/ function(module, exports, __webpack_require__) {
983
984 // call something on iterator step with safe closing on error
985 var anObject = __webpack_require__(/*! ./_an-object */ 13);
986 module.exports = function(iterator, fn, value, entries){
987 try {
988 return entries ? fn(anObject(value)[0], value[1]) : fn(value);
989 // 7.4.6 IteratorClose(iterator, completion)
990 } catch(e){
991 var ret = iterator['return'];
992 if(ret !== undefined)anObject(ret.call(iterator));
993 throw e;
994 }
995 };
996
997/***/ },
998/* 48 */
999/*!*********************************************!*\
1000 !*** ./~/core-js/modules/_is-array-iter.js ***!
1001 \*********************************************/
1002/***/ function(module, exports, __webpack_require__) {
1003
1004 // check on default Array iterator
1005 var Iterators = __webpack_require__(/*! ./_iterators */ 26)
1006 , ITERATOR = __webpack_require__(/*! ./_wks */ 43)('iterator')
1007 , ArrayProto = Array.prototype;
1008
1009 module.exports = function(it){
1010 return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
1011 };
1012
1013/***/ },
1014/* 49 */
1015/*!***********************************************!*\
1016 !*** ./~/core-js/modules/_create-property.js ***!
1017 \***********************************************/
1018/***/ function(module, exports, __webpack_require__) {
1019
1020 'use strict';
1021 var $defineProperty = __webpack_require__(/*! ./_object-dp */ 12)
1022 , createDesc = __webpack_require__(/*! ./_property-desc */ 20);
1023
1024 module.exports = function(object, index, value){
1025 if(index in object)$defineProperty.f(object, index, createDesc(0, value));
1026 else object[index] = value;
1027 };
1028
1029/***/ },
1030/* 50 */
1031/*!*******************************************************!*\
1032 !*** ./~/core-js/modules/core.get-iterator-method.js ***!
1033 \*******************************************************/
1034/***/ function(module, exports, __webpack_require__) {
1035
1036 var classof = __webpack_require__(/*! ./_classof */ 51)
1037 , ITERATOR = __webpack_require__(/*! ./_wks */ 43)('iterator')
1038 , Iterators = __webpack_require__(/*! ./_iterators */ 26);
1039 module.exports = __webpack_require__(/*! ./_core */ 10).getIteratorMethod = function(it){
1040 if(it != undefined)return it[ITERATOR]
1041 || it['@@iterator']
1042 || Iterators[classof(it)];
1043 };
1044
1045/***/ },
1046/* 51 */
1047/*!***************************************!*\
1048 !*** ./~/core-js/modules/_classof.js ***!
1049 \***************************************/
1050/***/ function(module, exports, __webpack_require__) {
1051
1052 // getting tag from 19.1.3.6 Object.prototype.toString()
1053 var cof = __webpack_require__(/*! ./_cof */ 34)
1054 , TAG = __webpack_require__(/*! ./_wks */ 43)('toStringTag')
1055 // ES3 wrong here
1056 , ARG = cof(function(){ return arguments; }()) == 'Arguments';
1057
1058 // fallback for IE11 Script Access Denied error
1059 var tryGet = function(it, key){
1060 try {
1061 return it[key];
1062 } catch(e){ /* empty */ }
1063 };
1064
1065 module.exports = function(it){
1066 var O, T, B;
1067 return it === undefined ? 'Undefined' : it === null ? 'Null'
1068 // @@toStringTag case
1069 : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T
1070 // builtinTag case
1071 : ARG ? cof(O)
1072 // ES3 arguments fallback
1073 : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
1074 };
1075
1076/***/ },
1077/* 52 */
1078/*!*******************************************!*\
1079 !*** ./~/core-js/modules/_iter-detect.js ***!
1080 \*******************************************/
1081/***/ function(module, exports, __webpack_require__) {
1082
1083 var ITERATOR = __webpack_require__(/*! ./_wks */ 43)('iterator')
1084 , SAFE_CLOSING = false;
1085
1086 try {
1087 var riter = [7][ITERATOR]();
1088 riter['return'] = function(){ SAFE_CLOSING = true; };
1089 Array.from(riter, function(){ throw 2; });
1090 } catch(e){ /* empty */ }
1091
1092 module.exports = function(exec, skipClosing){
1093 if(!skipClosing && !SAFE_CLOSING)return false;
1094 var safe = false;
1095 try {
1096 var arr = [7]
1097 , iter = arr[ITERATOR]();
1098 iter.next = function(){ return {done: safe = true}; };
1099 arr[ITERATOR] = function(){ return iter; };
1100 exec(arr);
1101 } catch(e){ /* empty */ }
1102 return safe;
1103 };
1104
1105/***/ },
1106/* 53 */
1107/*!******************************************!*\
1108 !*** ./~/core-js/fn/array/find-index.js ***!
1109 \******************************************/
1110/***/ function(module, exports, __webpack_require__) {
1111
1112 __webpack_require__(/*! ../../modules/es6.array.find-index */ 54);
1113 module.exports = __webpack_require__(/*! ../../modules/_core */ 10).Array.findIndex;
1114
1115/***/ },
1116/* 54 */
1117/*!***************************************************!*\
1118 !*** ./~/core-js/modules/es6.array.find-index.js ***!
1119 \***************************************************/
1120/***/ function(module, exports, __webpack_require__) {
1121
1122 'use strict';
1123 // 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined)
1124 var $export = __webpack_require__(/*! ./_export */ 8)
1125 , $find = __webpack_require__(/*! ./_array-methods */ 55)(6)
1126 , KEY = 'findIndex'
1127 , forced = true;
1128 // Shouldn't skip holes
1129 if(KEY in [])Array(1)[KEY](function(){ forced = false; });
1130 $export($export.P + $export.F * forced, 'Array', {
1131 findIndex: function findIndex(callbackfn/*, that = undefined */){
1132 return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
1133 }
1134 });
1135 __webpack_require__(/*! ./_add-to-unscopables */ 59)(KEY);
1136
1137/***/ },
1138/* 55 */
1139/*!*********************************************!*\
1140 !*** ./~/core-js/modules/_array-methods.js ***!
1141 \*********************************************/
1142/***/ function(module, exports, __webpack_require__) {
1143
1144 // 0 -> Array#forEach
1145 // 1 -> Array#map
1146 // 2 -> Array#filter
1147 // 3 -> Array#some
1148 // 4 -> Array#every
1149 // 5 -> Array#find
1150 // 6 -> Array#findIndex
1151 var ctx = __webpack_require__(/*! ./_ctx */ 24)
1152 , IObject = __webpack_require__(/*! ./_iobject */ 33)
1153 , toObject = __webpack_require__(/*! ./_to-object */ 45)
1154 , toLength = __webpack_require__(/*! ./_to-length */ 36)
1155 , asc = __webpack_require__(/*! ./_array-species-create */ 56);
1156 module.exports = function(TYPE, $create){
1157 var IS_MAP = TYPE == 1
1158 , IS_FILTER = TYPE == 2
1159 , IS_SOME = TYPE == 3
1160 , IS_EVERY = TYPE == 4
1161 , IS_FIND_INDEX = TYPE == 6
1162 , NO_HOLES = TYPE == 5 || IS_FIND_INDEX
1163 , create = $create || asc;
1164 return function($this, callbackfn, that){
1165 var O = toObject($this)
1166 , self = IObject(O)
1167 , f = ctx(callbackfn, that, 3)
1168 , length = toLength(self.length)
1169 , index = 0
1170 , result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined
1171 , val, res;
1172 for(;length > index; index++)if(NO_HOLES || index in self){
1173 val = self[index];
1174 res = f(val, index, O);
1175 if(TYPE){
1176 if(IS_MAP)result[index] = res; // map
1177 else if(res)switch(TYPE){
1178 case 3: return true; // some
1179 case 5: return val; // find
1180 case 6: return index; // findIndex
1181 case 2: result.push(val); // filter
1182 } else if(IS_EVERY)return false; // every
1183 }
1184 }
1185 return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;
1186 };
1187 };
1188
1189/***/ },
1190/* 56 */
1191/*!****************************************************!*\
1192 !*** ./~/core-js/modules/_array-species-create.js ***!
1193 \****************************************************/
1194/***/ function(module, exports, __webpack_require__) {
1195
1196 // 9.4.2.3 ArraySpeciesCreate(originalArray, length)
1197 var speciesConstructor = __webpack_require__(/*! ./_array-species-constructor */ 57);
1198
1199 module.exports = function(original, length){
1200 return new (speciesConstructor(original))(length);
1201 };
1202
1203/***/ },
1204/* 57 */
1205/*!*********************************************************!*\
1206 !*** ./~/core-js/modules/_array-species-constructor.js ***!
1207 \*********************************************************/
1208/***/ function(module, exports, __webpack_require__) {
1209
1210 var isObject = __webpack_require__(/*! ./_is-object */ 14)
1211 , isArray = __webpack_require__(/*! ./_is-array */ 58)
1212 , SPECIES = __webpack_require__(/*! ./_wks */ 43)('species');
1213
1214 module.exports = function(original){
1215 var C;
1216 if(isArray(original)){
1217 C = original.constructor;
1218 // cross-realm fallback
1219 if(typeof C == 'function' && (C === Array || isArray(C.prototype)))C = undefined;
1220 if(isObject(C)){
1221 C = C[SPECIES];
1222 if(C === null)C = undefined;
1223 }
1224 } return C === undefined ? Array : C;
1225 };
1226
1227/***/ },
1228/* 58 */
1229/*!****************************************!*\
1230 !*** ./~/core-js/modules/_is-array.js ***!
1231 \****************************************/
1232/***/ function(module, exports, __webpack_require__) {
1233
1234 // 7.2.2 IsArray(argument)
1235 var cof = __webpack_require__(/*! ./_cof */ 34);
1236 module.exports = Array.isArray || function isArray(arg){
1237 return cof(arg) == 'Array';
1238 };
1239
1240/***/ },
1241/* 59 */
1242/*!**************************************************!*\
1243 !*** ./~/core-js/modules/_add-to-unscopables.js ***!
1244 \**************************************************/
1245/***/ function(module, exports, __webpack_require__) {
1246
1247 // 22.1.3.31 Array.prototype[@@unscopables]
1248 var UNSCOPABLES = __webpack_require__(/*! ./_wks */ 43)('unscopables')
1249 , ArrayProto = Array.prototype;
1250 if(ArrayProto[UNSCOPABLES] == undefined)__webpack_require__(/*! ./_hide */ 11)(ArrayProto, UNSCOPABLES, {});
1251 module.exports = function(key){
1252 ArrayProto[UNSCOPABLES][key] = true;
1253 };
1254
1255/***/ },
1256/* 60 */
1257/*!************************************!*\
1258 !*** ./~/core-js/fn/array/keys.js ***!
1259 \************************************/
1260/***/ function(module, exports, __webpack_require__) {
1261
1262 __webpack_require__(/*! ../../modules/es6.array.iterator */ 61);
1263 module.exports = __webpack_require__(/*! ../../modules/_core */ 10).Array.keys;
1264
1265/***/ },
1266/* 61 */
1267/*!*************************************************!*\
1268 !*** ./~/core-js/modules/es6.array.iterator.js ***!
1269 \*************************************************/
1270/***/ function(module, exports, __webpack_require__) {
1271
1272 'use strict';
1273 var addToUnscopables = __webpack_require__(/*! ./_add-to-unscopables */ 59)
1274 , step = __webpack_require__(/*! ./_iter-step */ 62)
1275 , Iterators = __webpack_require__(/*! ./_iterators */ 26)
1276 , toIObject = __webpack_require__(/*! ./_to-iobject */ 32);
1277
1278 // 22.1.3.4 Array.prototype.entries()
1279 // 22.1.3.13 Array.prototype.keys()
1280 // 22.1.3.29 Array.prototype.values()
1281 // 22.1.3.30 Array.prototype[@@iterator]()
1282 module.exports = __webpack_require__(/*! ./_iter-define */ 6)(Array, 'Array', function(iterated, kind){
1283 this._t = toIObject(iterated); // target
1284 this._i = 0; // next index
1285 this._k = kind; // kind
1286 // 22.1.5.2.1 %ArrayIteratorPrototype%.next()
1287 }, function(){
1288 var O = this._t
1289 , kind = this._k
1290 , index = this._i++;
1291 if(!O || index >= O.length){
1292 this._t = undefined;
1293 return step(1);
1294 }
1295 if(kind == 'keys' )return step(0, index);
1296 if(kind == 'values')return step(0, O[index]);
1297 return step(0, [index, O[index]]);
1298 }, 'values');
1299
1300 // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
1301 Iterators.Arguments = Iterators.Array;
1302
1303 addToUnscopables('keys');
1304 addToUnscopables('values');
1305 addToUnscopables('entries');
1306
1307/***/ },
1308/* 62 */
1309/*!*****************************************!*\
1310 !*** ./~/core-js/modules/_iter-step.js ***!
1311 \*****************************************/
1312/***/ function(module, exports) {
1313
1314 module.exports = function(done, value){
1315 return {value: value, done: !!done};
1316 };
1317
1318/***/ },
1319/* 63 */
1320/*!***************************************!*\
1321 !*** ./~/core-js/fn/object/assign.js ***!
1322 \***************************************/
1323/***/ function(module, exports, __webpack_require__) {
1324
1325 __webpack_require__(/*! ../../modules/es6.object.assign */ 64);
1326 module.exports = __webpack_require__(/*! ../../modules/_core */ 10).Object.assign;
1327
1328/***/ },
1329/* 64 */
1330/*!************************************************!*\
1331 !*** ./~/core-js/modules/es6.object.assign.js ***!
1332 \************************************************/
1333/***/ function(module, exports, __webpack_require__) {
1334
1335 // 19.1.3.1 Object.assign(target, source)
1336 var $export = __webpack_require__(/*! ./_export */ 8);
1337
1338 $export($export.S + $export.F, 'Object', {assign: __webpack_require__(/*! ./_object-assign */ 65)});
1339
1340/***/ },
1341/* 65 */
1342/*!*********************************************!*\
1343 !*** ./~/core-js/modules/_object-assign.js ***!
1344 \*********************************************/
1345/***/ function(module, exports, __webpack_require__) {
1346
1347 'use strict';
1348 // 19.1.2.1 Object.assign(target, source, ...)
1349 var getKeys = __webpack_require__(/*! ./_object-keys */ 30)
1350 , gOPS = __webpack_require__(/*! ./_object-gops */ 66)
1351 , pIE = __webpack_require__(/*! ./_object-pie */ 67)
1352 , toObject = __webpack_require__(/*! ./_to-object */ 45)
1353 , IObject = __webpack_require__(/*! ./_iobject */ 33)
1354 , $assign = Object.assign;
1355
1356 // should work with symbols and should have deterministic property order (V8 bug)
1357 module.exports = !$assign || __webpack_require__(/*! ./_fails */ 17)(function(){
1358 var A = {}
1359 , B = {}
1360 , S = Symbol()
1361 , K = 'abcdefghijklmnopqrst';
1362 A[S] = 7;
1363 K.split('').forEach(function(k){ B[k] = k; });
1364 return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
1365 }) ? function assign(target, source){ // eslint-disable-line no-unused-vars
1366 var T = toObject(target)
1367 , aLen = arguments.length
1368 , index = 1
1369 , getSymbols = gOPS.f
1370 , isEnum = pIE.f;
1371 while(aLen > index){
1372 var S = IObject(arguments[index++])
1373 , keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S)
1374 , length = keys.length
1375 , j = 0
1376 , key;
1377 while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key];
1378 } return T;
1379 } : $assign;
1380
1381/***/ },
1382/* 66 */
1383/*!*******************************************!*\
1384 !*** ./~/core-js/modules/_object-gops.js ***!
1385 \*******************************************/
1386/***/ function(module, exports) {
1387
1388 exports.f = Object.getOwnPropertySymbols;
1389
1390/***/ },
1391/* 67 */
1392/*!******************************************!*\
1393 !*** ./~/core-js/modules/_object-pie.js ***!
1394 \******************************************/
1395/***/ function(module, exports) {
1396
1397 exports.f = {}.propertyIsEnumerable;
1398
1399/***/ },
1400/* 68 */
1401/*!**********************!*\
1402 !*** ./src/index.js ***!
1403 \**********************/
1404/***/ function(module, exports, __webpack_require__) {
1405
1406 'use strict';
1407
1408 var _from = __webpack_require__(/*! rxjs/observable/from */ 69);
1409
1410 var _catch2 = __webpack_require__(/*! rxjs/operator/catch */ 98);
1411
1412 var _concatMap = __webpack_require__(/*! rxjs/operator/concatMap */ 99);
1413
1414 var _filter = __webpack_require__(/*! rxjs/operator/filter */ 104);
1415
1416 var _require = __webpack_require__(/*! rxjs/Observable */ 78);
1417
1418 var Observable = _require.Observable;
1419
1420 var _require2 = __webpack_require__(/*! ./ast.js */ 105);
1421
1422 var Collection = _require2.Collection;
1423
1424 var HorizonSocket = __webpack_require__(/*! ./socket.js */ 209);
1425
1426 var _require3 = __webpack_require__(/*! ./logging.js */ 217);
1427
1428 var log = _require3.log;
1429 var logError = _require3.logError;
1430 var enableLogging = _require3.enableLogging;
1431
1432 var _require4 = __webpack_require__(/*! ./auth */ 218);
1433
1434 var authEndpoint = _require4.authEndpoint;
1435 var TokenStorage = _require4.TokenStorage;
1436 var clearAuthTokens = _require4.clearAuthTokens;
1437
1438
1439 var defaultHost = typeof window !== 'undefined' && window.location && '' + window.location.host || 'localhost:8181';
1440 var defaultSecure = typeof window !== 'undefined' && window.location && window.location.protocol === 'https:' || false;
1441
1442 function Horizon() {
1443 var _context;
1444
1445 var _ref = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
1446
1447 var _ref$host = _ref.host;
1448 var host = _ref$host === undefined ? defaultHost : _ref$host;
1449 var _ref$secure = _ref.secure;
1450 var secure = _ref$secure === undefined ? defaultSecure : _ref$secure;
1451 var _ref$path = _ref.path;
1452 var path = _ref$path === undefined ? 'horizon' : _ref$path;
1453 var _ref$lazyWrites = _ref.lazyWrites;
1454 var lazyWrites = _ref$lazyWrites === undefined ? false : _ref$lazyWrites;
1455 var _ref$authType = _ref.authType;
1456 var authType = _ref$authType === undefined ? 'unauthenticated' : _ref$authType;
1457
1458 // If we're in a redirection from OAuth, store the auth token for
1459 // this user in localStorage.
1460 var tokenStorage = new TokenStorage(authType);
1461 tokenStorage.setAuthFromQueryParams();
1462
1463 var socket = new HorizonSocket(host, secure, path, tokenStorage.handshake.bind(tokenStorage));
1464
1465 // Store whatever token we get back from the server when we get a
1466 // handshake response
1467 socket.handshake.subscribe(function (handshake) {
1468 return tokenStorage.set(handshake.token);
1469 });
1470
1471 // This is the object returned by the Horizon function. It's a
1472 // function so we can construct a collection simply by calling it
1473 // like horizon('my_collection')
1474 function horizon(name) {
1475 return new Collection(sendRequest, name, lazyWrites);
1476 }
1477
1478 horizon.dispose = function () {
1479 socket.complete();
1480 };
1481
1482 // Dummy subscription to force it to connect to the
1483 // server. Optionally provide an error handling function if the
1484 // socket experiences an error.
1485 // Note: Users of the Observable interface shouldn't need this
1486 horizon.connect = function () {
1487 var onError = arguments.length <= 0 || arguments[0] === undefined ? function (err) {
1488 console.error('Received an error: ' + err);
1489 } : arguments[0];
1490
1491 socket.subscribe(function () {}, onError);
1492 };
1493
1494 // Either subscribe to status updates, or return an observable with
1495 // the current status and all subsequent status changes.
1496 horizon.status = subscribeOrObservable(socket.status);
1497
1498 // Convenience method for finding out when disconnected
1499 horizon.onDisconnected = subscribeOrObservable((_context = socket.status, _filter.filter).call(_context, function (x) {
1500 return x.type === 'disconnected';
1501 }));
1502
1503 // Convenience method for finding out when opening
1504 horizon.onConnected = subscribeOrObservable((_context = socket.status, _filter.filter).call(_context, function (x) {
1505 return x.type === 'connected';
1506 }));
1507
1508 // Convenience method for finding out when ready
1509 horizon.onReady = subscribeOrObservable((_context = socket.status, _filter.filter).call(_context, function (x) {
1510 return x.type === 'ready';
1511 }));
1512
1513 // Convenience method for finding out when an error occurs
1514 horizon.onSocketError = subscribeOrObservable((_context = socket.status, _filter.filter).call(_context, function (x) {
1515 return x.type === 'error';
1516 }));
1517
1518 horizon._authMethods = null;
1519 horizon._horizonPath = path;
1520 horizon.authEndpoint = authEndpoint;
1521 horizon.hasAuthToken = tokenStorage.hasAuthToken.bind(tokenStorage);
1522
1523 return horizon;
1524
1525 // Sends a horizon protocol request to the server, and pulls the data
1526 // portion of the response out.
1527 function sendRequest(type, options) {
1528 var _context2;
1529
1530 // Both remove and removeAll use the type 'remove' in the protocol
1531 var normalizedType = type === 'removeAll' ? 'remove' : type;
1532 return (_context2 = (_context2 = socket.makeRequest({ type: normalizedType, options: options }) // send the raw request
1533 , _concatMap.concatMap).call(_context2, function (resp) {
1534 // unroll arrays being returned
1535 if (resp.data) {
1536 return _from.from.call(Observable, resp.data);
1537 } else {
1538 // Still need to emit a document even if we have no new data
1539 return _from.from.call(Observable, [{ state: resp.state, type: resp.type }]);
1540 }
1541 }), _catch2._catch).call(_context2, function (e) {
1542 return Observable.create(function (observer) {
1543 observer.error(e);
1544 });
1545 }); // on error, strip error message
1546 }
1547 }
1548
1549 function subscribeOrObservable(observable) {
1550 return function () {
1551 if (arguments.length > 0) {
1552 return observable.subscribe.apply(observable, arguments);
1553 } else {
1554 return observable;
1555 }
1556 };
1557 }
1558
1559 Horizon.log = log;
1560 Horizon.logError = logError;
1561 Horizon.enableLogging = enableLogging;
1562 Horizon.Socket = HorizonSocket;
1563 Horizon.clearAuthTokens = clearAuthTokens;
1564
1565 module.exports = Horizon;
1566
1567/***/ },
1568/* 69 */
1569/*!***********************************!*\
1570 !*** ./~/rxjs/observable/from.js ***!
1571 \***********************************/
1572/***/ function(module, exports, __webpack_require__) {
1573
1574 "use strict";
1575 var FromObservable_1 = __webpack_require__(/*! ./FromObservable */ 70);
1576 exports.from = FromObservable_1.FromObservable.create;
1577 //# sourceMappingURL=from.js.map
1578
1579/***/ },
1580/* 70 */
1581/*!*********************************************!*\
1582 !*** ./~/rxjs/observable/FromObservable.js ***!
1583 \*********************************************/
1584/***/ function(module, exports, __webpack_require__) {
1585
1586 "use strict";
1587 var __extends = (this && this.__extends) || function (d, b) {
1588 for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
1589 function __() { this.constructor = d; }
1590 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
1591 };
1592 var isArray_1 = __webpack_require__(/*! ../util/isArray */ 71);
1593 var isFunction_1 = __webpack_require__(/*! ../util/isFunction */ 72);
1594 var isPromise_1 = __webpack_require__(/*! ../util/isPromise */ 73);
1595 var isScheduler_1 = __webpack_require__(/*! ../util/isScheduler */ 74);
1596 var PromiseObservable_1 = __webpack_require__(/*! ./PromiseObservable */ 75);
1597 var IteratorObservable_1 = __webpack_require__(/*! ./IteratorObservable */ 90);
1598 var ArrayObservable_1 = __webpack_require__(/*! ./ArrayObservable */ 92);
1599 var ArrayLikeObservable_1 = __webpack_require__(/*! ./ArrayLikeObservable */ 95);
1600 var iterator_1 = __webpack_require__(/*! ../symbol/iterator */ 91);
1601 var Observable_1 = __webpack_require__(/*! ../Observable */ 78);
1602 var observeOn_1 = __webpack_require__(/*! ../operator/observeOn */ 96);
1603 var $$observable = __webpack_require__(/*! symbol-observable */ 88);
1604 var isArrayLike = (function (x) { return x && typeof x.length === 'number'; });
1605 /**
1606 * We need this JSDoc comment for affecting ESDoc.
1607 * @extends {Ignored}
1608 * @hide true
1609 */
1610 var FromObservable = (function (_super) {
1611 __extends(FromObservable, _super);
1612 function FromObservable(ish, scheduler) {
1613 _super.call(this, null);
1614 this.ish = ish;
1615 this.scheduler = scheduler;
1616 }
1617 /**
1618 * Creates an Observable from an Array, an array-like object, a Promise, an
1619 * iterable object, or an Observable-like object.
1620 *
1621 * <span class="informal">Converts almost anything to an Observable.</span>
1622 *
1623 * <img src="./img/from.png" width="100%">
1624 *
1625 * Convert various other objects and data types into Observables. `from`
1626 * converts a Promise or an array-like or an
1627 * [iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#iterable)
1628 * object into an Observable that emits the items in that promise or array or
1629 * iterable. A String, in this context, is treated as an array of characters.
1630 * Observable-like objects (contains a function named with the ES2015 Symbol
1631 * for Observable) can also be converted through this operator.
1632 *
1633 * @example <caption>Converts an array to an Observable</caption>
1634 * var array = [10, 20, 30];
1635 * var result = Rx.Observable.from(array);
1636 * result.subscribe(x => console.log(x));
1637 *
1638 * @example <caption>Convert an infinite iterable (from a generator) to an Observable</caption>
1639 * function* generateDoubles(seed) {
1640 * var i = seed;
1641 * while (true) {
1642 * yield i;
1643 * i = 2 * i; // double it
1644 * }
1645 * }
1646 *
1647 * var iterator = generateDoubles(3);
1648 * var result = Rx.Observable.from(iterator).take(10);
1649 * result.subscribe(x => console.log(x));
1650 *
1651 * @see {@link create}
1652 * @see {@link fromEvent}
1653 * @see {@link fromEventPattern}
1654 * @see {@link fromPromise}
1655 *
1656 * @param {ObservableInput<T>} ish A subscribable object, a Promise, an
1657 * Observable-like, an Array, an iterable or an array-like object to be
1658 * converted.
1659 * @param {function(x: any, i: number): T} [mapFn] A "map" function to call
1660 * when converting array-like objects, where `x` is a value from the
1661 * array-like and `i` is the index of that value in the sequence.
1662 * @param {any} [thisArg] The context object to use when calling the `mapFn`,
1663 * if provided.
1664 * @param {Scheduler} [scheduler] The scheduler on which to schedule the
1665 * emissions of values.
1666 * @return {Observable<T>} The Observable whose values are originally from the
1667 * input object that was converted.
1668 * @static true
1669 * @name from
1670 * @owner Observable
1671 */
1672 FromObservable.create = function (ish, mapFnOrScheduler, thisArg, lastScheduler) {
1673 var scheduler = null;
1674 var mapFn = null;
1675 if (isFunction_1.isFunction(mapFnOrScheduler)) {
1676 scheduler = lastScheduler || null;
1677 mapFn = mapFnOrScheduler;
1678 }
1679 else if (isScheduler_1.isScheduler(scheduler)) {
1680 scheduler = mapFnOrScheduler;
1681 }
1682 if (ish != null) {
1683 if (typeof ish[$$observable] === 'function') {
1684 if (ish instanceof Observable_1.Observable && !scheduler) {
1685 return ish;
1686 }
1687 return new FromObservable(ish, scheduler);
1688 }
1689 else if (isArray_1.isArray(ish)) {
1690 return new ArrayObservable_1.ArrayObservable(ish, scheduler);
1691 }
1692 else if (isPromise_1.isPromise(ish)) {
1693 return new PromiseObservable_1.PromiseObservable(ish, scheduler);
1694 }
1695 else if (typeof ish[iterator_1.$$iterator] === 'function' || typeof ish === 'string') {
1696 return new IteratorObservable_1.IteratorObservable(ish, null, null, scheduler);
1697 }
1698 else if (isArrayLike(ish)) {
1699 return new ArrayLikeObservable_1.ArrayLikeObservable(ish, mapFn, thisArg, scheduler);
1700 }
1701 }
1702 throw new TypeError((ish !== null && typeof ish || ish) + ' is not observable');
1703 };
1704 FromObservable.prototype._subscribe = function (subscriber) {
1705 var ish = this.ish;
1706 var scheduler = this.scheduler;
1707 if (scheduler == null) {
1708 return ish[$$observable]().subscribe(subscriber);
1709 }
1710 else {
1711 return ish[$$observable]().subscribe(new observeOn_1.ObserveOnSubscriber(subscriber, scheduler, 0));
1712 }
1713 };
1714 return FromObservable;
1715 }(Observable_1.Observable));
1716 exports.FromObservable = FromObservable;
1717 //# sourceMappingURL=FromObservable.js.map
1718
1719/***/ },
1720/* 71 */
1721/*!********************************!*\
1722 !*** ./~/rxjs/util/isArray.js ***!
1723 \********************************/
1724/***/ function(module, exports) {
1725
1726 "use strict";
1727 exports.isArray = Array.isArray || (function (x) { return x && typeof x.length === 'number'; });
1728 //# sourceMappingURL=isArray.js.map
1729
1730/***/ },
1731/* 72 */
1732/*!***********************************!*\
1733 !*** ./~/rxjs/util/isFunction.js ***!
1734 \***********************************/
1735/***/ function(module, exports) {
1736
1737 "use strict";
1738 function isFunction(x) {
1739 return typeof x === 'function';
1740 }
1741 exports.isFunction = isFunction;
1742 //# sourceMappingURL=isFunction.js.map
1743
1744/***/ },
1745/* 73 */
1746/*!**********************************!*\
1747 !*** ./~/rxjs/util/isPromise.js ***!
1748 \**********************************/
1749/***/ function(module, exports) {
1750
1751 "use strict";
1752 function isPromise(value) {
1753 return value && typeof value.subscribe !== 'function' && typeof value.then === 'function';
1754 }
1755 exports.isPromise = isPromise;
1756 //# sourceMappingURL=isPromise.js.map
1757
1758/***/ },
1759/* 74 */
1760/*!************************************!*\
1761 !*** ./~/rxjs/util/isScheduler.js ***!
1762 \************************************/
1763/***/ function(module, exports) {
1764
1765 "use strict";
1766 function isScheduler(value) {
1767 return value && typeof value.schedule === 'function';
1768 }
1769 exports.isScheduler = isScheduler;
1770 //# sourceMappingURL=isScheduler.js.map
1771
1772/***/ },
1773/* 75 */
1774/*!************************************************!*\
1775 !*** ./~/rxjs/observable/PromiseObservable.js ***!
1776 \************************************************/
1777/***/ function(module, exports, __webpack_require__) {
1778
1779 "use strict";
1780 var __extends = (this && this.__extends) || function (d, b) {
1781 for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
1782 function __() { this.constructor = d; }
1783 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
1784 };
1785 var root_1 = __webpack_require__(/*! ../util/root */ 76);
1786 var Observable_1 = __webpack_require__(/*! ../Observable */ 78);
1787 /**
1788 * We need this JSDoc comment for affecting ESDoc.
1789 * @extends {Ignored}
1790 * @hide true
1791 */
1792 var PromiseObservable = (function (_super) {
1793 __extends(PromiseObservable, _super);
1794 function PromiseObservable(promise, scheduler) {
1795 if (scheduler === void 0) { scheduler = null; }
1796 _super.call(this);
1797 this.promise = promise;
1798 this.scheduler = scheduler;
1799 }
1800 /**
1801 * Converts a Promise to an Observable.
1802 *
1803 * <span class="informal">Returns an Observable that just emits the Promise's
1804 * resolved value, then completes.</span>
1805 *
1806 * Converts an ES2015 Promise or a Promises/A+ spec compliant Promise to an
1807 * Observable. If the Promise resolves with a value, the output Observable
1808 * emits that resolved value as a `next`, and then completes. If the Promise
1809 * is rejected, then the output Observable emits the corresponding Error.
1810 *
1811 * @example <caption>Convert the Promise returned by Fetch to an Observable</caption>
1812 * var result = Rx.Observable.fromPromise(fetch('http://myserver.com/'));
1813 * result.subscribe(x => console.log(x), e => console.error(e));
1814 *
1815 * @see {@link bindCallback}
1816 * @see {@link from}
1817 *
1818 * @param {Promise<T>} promise The promise to be converted.
1819 * @param {Scheduler} [scheduler] An optional Scheduler to use for scheduling
1820 * the delivery of the resolved value (or the rejection).
1821 * @return {Observable<T>} An Observable which wraps the Promise.
1822 * @static true
1823 * @name fromPromise
1824 * @owner Observable
1825 */
1826 PromiseObservable.create = function (promise, scheduler) {
1827 if (scheduler === void 0) { scheduler = null; }
1828 return new PromiseObservable(promise, scheduler);
1829 };
1830 PromiseObservable.prototype._subscribe = function (subscriber) {
1831 var _this = this;
1832 var promise = this.promise;
1833 var scheduler = this.scheduler;
1834 if (scheduler == null) {
1835 if (this._isScalar) {
1836 if (!subscriber.isUnsubscribed) {
1837 subscriber.next(this.value);
1838 subscriber.complete();
1839 }
1840 }
1841 else {
1842 promise.then(function (value) {
1843 _this.value = value;
1844 _this._isScalar = true;
1845 if (!subscriber.isUnsubscribed) {
1846 subscriber.next(value);
1847 subscriber.complete();
1848 }
1849 }, function (err) {
1850 if (!subscriber.isUnsubscribed) {
1851 subscriber.error(err);
1852 }
1853 })
1854 .then(null, function (err) {
1855 // escape the promise trap, throw unhandled errors
1856 root_1.root.setTimeout(function () { throw err; });
1857 });
1858 }
1859 }
1860 else {
1861 if (this._isScalar) {
1862 if (!subscriber.isUnsubscribed) {
1863 return scheduler.schedule(dispatchNext, 0, { value: this.value, subscriber: subscriber });
1864 }
1865 }
1866 else {
1867 promise.then(function (value) {
1868 _this.value = value;
1869 _this._isScalar = true;
1870 if (!subscriber.isUnsubscribed) {
1871 subscriber.add(scheduler.schedule(dispatchNext, 0, { value: value, subscriber: subscriber }));
1872 }
1873 }, function (err) {
1874 if (!subscriber.isUnsubscribed) {
1875 subscriber.add(scheduler.schedule(dispatchError, 0, { err: err, subscriber: subscriber }));
1876 }
1877 })
1878 .then(null, function (err) {
1879 // escape the promise trap, throw unhandled errors
1880 root_1.root.setTimeout(function () { throw err; });
1881 });
1882 }
1883 }
1884 };
1885 return PromiseObservable;
1886 }(Observable_1.Observable));
1887 exports.PromiseObservable = PromiseObservable;
1888 function dispatchNext(arg) {
1889 var value = arg.value, subscriber = arg.subscriber;
1890 if (!subscriber.isUnsubscribed) {
1891 subscriber.next(value);
1892 subscriber.complete();
1893 }
1894 }
1895 function dispatchError(arg) {
1896 var err = arg.err, subscriber = arg.subscriber;
1897 if (!subscriber.isUnsubscribed) {
1898 subscriber.error(err);
1899 }
1900 }
1901 //# sourceMappingURL=PromiseObservable.js.map
1902
1903/***/ },
1904/* 76 */
1905/*!*****************************!*\
1906 !*** ./~/rxjs/util/root.js ***!
1907 \*****************************/
1908/***/ function(module, exports, __webpack_require__) {
1909
1910 /* WEBPACK VAR INJECTION */(function(module, global) {"use strict";
1911 var objectTypes = {
1912 'boolean': false,
1913 'function': true,
1914 'object': true,
1915 'number': false,
1916 'string': false,
1917 'undefined': false
1918 };
1919 exports.root = (objectTypes[typeof self] && self) || (objectTypes[typeof window] && window);
1920 /* tslint:disable:no-unused-variable */
1921 var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports;
1922 var freeModule = objectTypes[typeof module] && module && !module.nodeType && module;
1923 var freeGlobal = objectTypes[typeof global] && global;
1924 if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal)) {
1925 exports.root = freeGlobal;
1926 }
1927 //# sourceMappingURL=root.js.map
1928 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../../webpack/buildin/module.js */ 77)(module), (function() { return this; }())))
1929
1930/***/ },
1931/* 77 */
1932/*!***********************************!*\
1933 !*** (webpack)/buildin/module.js ***!
1934 \***********************************/
1935/***/ function(module, exports) {
1936
1937 module.exports = function(module) {
1938 if(!module.webpackPolyfill) {
1939 module.deprecate = function() {};
1940 module.paths = [];
1941 // module.parent = undefined by default
1942 module.children = [];
1943 module.webpackPolyfill = 1;
1944 }
1945 return module;
1946 }
1947
1948
1949/***/ },
1950/* 78 */
1951/*!******************************!*\
1952 !*** ./~/rxjs/Observable.js ***!
1953 \******************************/
1954/***/ function(module, exports, __webpack_require__) {
1955
1956 "use strict";
1957 var root_1 = __webpack_require__(/*! ./util/root */ 76);
1958 var toSubscriber_1 = __webpack_require__(/*! ./util/toSubscriber */ 79);
1959 var $$observable = __webpack_require__(/*! symbol-observable */ 88);
1960 /**
1961 * A representation of any set of values over any amount of time. This the most basic building block
1962 * of RxJS.
1963 *
1964 * @class Observable<T>
1965 */
1966 var Observable = (function () {
1967 /**
1968 * @constructor
1969 * @param {Function} subscribe the function that is called when the Observable is
1970 * initially subscribed to. This function is given a Subscriber, to which new values
1971 * can be `next`ed, or an `error` method can be called to raise an error, or
1972 * `complete` can be called to notify of a successful completion.
1973 */
1974 function Observable(subscribe) {
1975 this._isScalar = false;
1976 if (subscribe) {
1977 this._subscribe = subscribe;
1978 }
1979 }
1980 /**
1981 * Creates a new Observable, with this Observable as the source, and the passed
1982 * operator defined as the new observable's operator.
1983 * @method lift
1984 * @param {Operator} operator the operator defining the operation to take on the observable
1985 * @return {Observable} a new observable with the Operator applied
1986 */
1987 Observable.prototype.lift = function (operator) {
1988 var observable = new Observable();
1989 observable.source = this;
1990 observable.operator = operator;
1991 return observable;
1992 };
1993 /**
1994 * Registers handlers for handling emitted values, error and completions from the observable, and
1995 * executes the observable's subscriber function, which will take action to set up the underlying data stream
1996 * @method subscribe
1997 * @param {PartialObserver|Function} observerOrNext (optional) either an observer defining all functions to be called,
1998 * or the first of three possible handlers, which is the handler for each value emitted from the observable.
1999 * @param {Function} error (optional) a handler for a terminal event resulting from an error. If no error handler is provided,
2000 * the error will be thrown as unhandled
2001 * @param {Function} complete (optional) a handler for a terminal event resulting from successful completion.
2002 * @return {ISubscription} a subscription reference to the registered handlers
2003 */
2004 Observable.prototype.subscribe = function (observerOrNext, error, complete) {
2005 var operator = this.operator;
2006 var sink = toSubscriber_1.toSubscriber(observerOrNext, error, complete);
2007 sink.add(operator ? operator.call(sink, this) : this._subscribe(sink));
2008 if (sink.syncErrorThrowable) {
2009 sink.syncErrorThrowable = false;
2010 if (sink.syncErrorThrown) {
2011 throw sink.syncErrorValue;
2012 }
2013 }
2014 return sink;
2015 };
2016 /**
2017 * @method forEach
2018 * @param {Function} next a handler for each value emitted by the observable
2019 * @param {PromiseConstructor} [PromiseCtor] a constructor function used to instantiate the Promise
2020 * @return {Promise} a promise that either resolves on observable completion or
2021 * rejects with the handled error
2022 */
2023 Observable.prototype.forEach = function (next, PromiseCtor) {
2024 var _this = this;
2025 if (!PromiseCtor) {
2026 if (root_1.root.Rx && root_1.root.Rx.config && root_1.root.Rx.config.Promise) {
2027 PromiseCtor = root_1.root.Rx.config.Promise;
2028 }
2029 else if (root_1.root.Promise) {
2030 PromiseCtor = root_1.root.Promise;
2031 }
2032 }
2033 if (!PromiseCtor) {
2034 throw new Error('no Promise impl found');
2035 }
2036 return new PromiseCtor(function (resolve, reject) {
2037 var subscription = _this.subscribe(function (value) {
2038 if (subscription) {
2039 // if there is a subscription, then we can surmise
2040 // the next handling is asynchronous. Any errors thrown
2041 // need to be rejected explicitly and unsubscribe must be
2042 // called manually
2043 try {
2044 next(value);
2045 }
2046 catch (err) {
2047 reject(err);
2048 subscription.unsubscribe();
2049 }
2050 }
2051 else {
2052 // if there is NO subscription, then we're getting a nexted
2053 // value synchronously during subscription. We can just call it.
2054 // If it errors, Observable's `subscribe` imple will ensure the
2055 // unsubscription logic is called, then synchronously rethrow the error.
2056 // After that, Promise will trap the error and send it
2057 // down the rejection path.
2058 next(value);
2059 }
2060 }, reject, resolve);
2061 });
2062 };
2063 Observable.prototype._subscribe = function (subscriber) {
2064 return this.source.subscribe(subscriber);
2065 };
2066 /**
2067 * An interop point defined by the es7-observable spec https://github.com/zenparsing/es-observable
2068 * @method Symbol.observable
2069 * @return {Observable} this instance of the observable
2070 */
2071 Observable.prototype[$$observable] = function () {
2072 return this;
2073 };
2074 // HACK: Since TypeScript inherits static properties too, we have to
2075 // fight against TypeScript here so Subject can have a different static create signature
2076 /**
2077 * Creates a new cold Observable by calling the Observable constructor
2078 * @static true
2079 * @owner Observable
2080 * @method create
2081 * @param {Function} subscribe? the subscriber function to be passed to the Observable constructor
2082 * @return {Observable} a new cold observable
2083 */
2084 Observable.create = function (subscribe) {
2085 return new Observable(subscribe);
2086 };
2087 return Observable;
2088 }());
2089 exports.Observable = Observable;
2090 //# sourceMappingURL=Observable.js.map
2091
2092/***/ },
2093/* 79 */
2094/*!*************************************!*\
2095 !*** ./~/rxjs/util/toSubscriber.js ***!
2096 \*************************************/
2097/***/ function(module, exports, __webpack_require__) {
2098
2099 "use strict";
2100 var Subscriber_1 = __webpack_require__(/*! ../Subscriber */ 80);
2101 var rxSubscriber_1 = __webpack_require__(/*! ../symbol/rxSubscriber */ 86);
2102 function toSubscriber(nextOrObserver, error, complete) {
2103 if (nextOrObserver && typeof nextOrObserver === 'object') {
2104 if (nextOrObserver instanceof Subscriber_1.Subscriber) {
2105 return nextOrObserver;
2106 }
2107 else if (typeof nextOrObserver[rxSubscriber_1.$$rxSubscriber] === 'function') {
2108 return nextOrObserver[rxSubscriber_1.$$rxSubscriber]();
2109 }
2110 }
2111 return new Subscriber_1.Subscriber(nextOrObserver, error, complete);
2112 }
2113 exports.toSubscriber = toSubscriber;
2114 //# sourceMappingURL=toSubscriber.js.map
2115
2116/***/ },
2117/* 80 */
2118/*!******************************!*\
2119 !*** ./~/rxjs/Subscriber.js ***!
2120 \******************************/
2121/***/ function(module, exports, __webpack_require__) {
2122
2123 "use strict";
2124 var __extends = (this && this.__extends) || function (d, b) {
2125 for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
2126 function __() { this.constructor = d; }
2127 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
2128 };
2129 var isFunction_1 = __webpack_require__(/*! ./util/isFunction */ 72);
2130 var Subscription_1 = __webpack_require__(/*! ./Subscription */ 81);
2131 var rxSubscriber_1 = __webpack_require__(/*! ./symbol/rxSubscriber */ 86);
2132 var Observer_1 = __webpack_require__(/*! ./Observer */ 87);
2133 /**
2134 * Implements the {@link Observer} interface and extends the
2135 * {@link Subscription} class. While the {@link Observer} is the public API for
2136 * consuming the values of an {@link Observable}, all Observers get converted to
2137 * a Subscriber, in order to provide Subscription-like capabilities such as
2138 * `unsubscribe`. Subscriber is a common type in RxJS, and crucial for
2139 * implementing operators, but it is rarely used as a public API.
2140 *
2141 * @class Subscriber<T>
2142 */
2143 var Subscriber = (function (_super) {
2144 __extends(Subscriber, _super);
2145 /**
2146 * @param {Observer|function(value: T): void} [destinationOrNext] A partially
2147 * defined Observer or a `next` callback function.
2148 * @param {function(e: ?any): void} [error] The `error` callback of an
2149 * Observer.
2150 * @param {function(): void} [complete] The `complete` callback of an
2151 * Observer.
2152 */
2153 function Subscriber(destinationOrNext, error, complete) {
2154 _super.call(this);
2155 this.syncErrorValue = null;
2156 this.syncErrorThrown = false;
2157 this.syncErrorThrowable = false;
2158 this.isStopped = false;
2159 switch (arguments.length) {
2160 case 0:
2161 this.destination = Observer_1.empty;
2162 break;
2163 case 1:
2164 if (!destinationOrNext) {
2165 this.destination = Observer_1.empty;
2166 break;
2167 }
2168 if (typeof destinationOrNext === 'object') {
2169 if (destinationOrNext instanceof Subscriber) {
2170 this.destination = destinationOrNext;
2171 this.destination.add(this);
2172 }
2173 else {
2174 this.syncErrorThrowable = true;
2175 this.destination = new SafeSubscriber(this, destinationOrNext);
2176 }
2177 break;
2178 }
2179 default:
2180 this.syncErrorThrowable = true;
2181 this.destination = new SafeSubscriber(this, destinationOrNext, error, complete);
2182 break;
2183 }
2184 }
2185 /**
2186 * A static factory for a Subscriber, given a (potentially partial) definition
2187 * of an Observer.
2188 * @param {function(x: ?T): void} [next] The `next` callback of an Observer.
2189 * @param {function(e: ?any): void} [error] The `error` callback of an
2190 * Observer.
2191 * @param {function(): void} [complete] The `complete` callback of an
2192 * Observer.
2193 * @return {Subscriber<T>} A Subscriber wrapping the (partially defined)
2194 * Observer represented by the given arguments.
2195 */
2196 Subscriber.create = function (next, error, complete) {
2197 var subscriber = new Subscriber(next, error, complete);
2198 subscriber.syncErrorThrowable = false;
2199 return subscriber;
2200 };
2201 /**
2202 * The {@link Observer} callback to receive notifications of type `next` from
2203 * the Observable, with a value. The Observable may call this method 0 or more
2204 * times.
2205 * @param {T} [value] The `next` value.
2206 * @return {void}
2207 */
2208 Subscriber.prototype.next = function (value) {
2209 if (!this.isStopped) {
2210 this._next(value);
2211 }
2212 };
2213 /**
2214 * The {@link Observer} callback to receive notifications of type `error` from
2215 * the Observable, with an attached {@link Error}. Notifies the Observer that
2216 * the Observable has experienced an error condition.
2217 * @param {any} [err] The `error` exception.
2218 * @return {void}
2219 */
2220 Subscriber.prototype.error = function (err) {
2221 if (!this.isStopped) {
2222 this.isStopped = true;
2223 this._error(err);
2224 }
2225 };
2226 /**
2227 * The {@link Observer} callback to receive a valueless notification of type
2228 * `complete` from the Observable. Notifies the Observer that the Observable
2229 * has finished sending push-based notifications.
2230 * @return {void}
2231 */
2232 Subscriber.prototype.complete = function () {
2233 if (!this.isStopped) {
2234 this.isStopped = true;
2235 this._complete();
2236 }
2237 };
2238 Subscriber.prototype.unsubscribe = function () {
2239 if (this.isUnsubscribed) {
2240 return;
2241 }
2242 this.isStopped = true;
2243 _super.prototype.unsubscribe.call(this);
2244 };
2245 Subscriber.prototype._next = function (value) {
2246 this.destination.next(value);
2247 };
2248 Subscriber.prototype._error = function (err) {
2249 this.destination.error(err);
2250 this.unsubscribe();
2251 };
2252 Subscriber.prototype._complete = function () {
2253 this.destination.complete();
2254 this.unsubscribe();
2255 };
2256 Subscriber.prototype[rxSubscriber_1.$$rxSubscriber] = function () {
2257 return this;
2258 };
2259 return Subscriber;
2260 }(Subscription_1.Subscription));
2261 exports.Subscriber = Subscriber;
2262 /**
2263 * We need this JSDoc comment for affecting ESDoc.
2264 * @ignore
2265 * @extends {Ignored}
2266 */
2267 var SafeSubscriber = (function (_super) {
2268 __extends(SafeSubscriber, _super);
2269 function SafeSubscriber(_parent, observerOrNext, error, complete) {
2270 _super.call(this);
2271 this._parent = _parent;
2272 var next;
2273 var context = this;
2274 if (isFunction_1.isFunction(observerOrNext)) {
2275 next = observerOrNext;
2276 }
2277 else if (observerOrNext) {
2278 context = observerOrNext;
2279 next = observerOrNext.next;
2280 error = observerOrNext.error;
2281 complete = observerOrNext.complete;
2282 if (isFunction_1.isFunction(context.unsubscribe)) {
2283 this.add(context.unsubscribe.bind(context));
2284 }
2285 context.unsubscribe = this.unsubscribe.bind(this);
2286 }
2287 this._context = context;
2288 this._next = next;
2289 this._error = error;
2290 this._complete = complete;
2291 }
2292 SafeSubscriber.prototype.next = function (value) {
2293 if (!this.isStopped && this._next) {
2294 var _parent = this._parent;
2295 if (!_parent.syncErrorThrowable) {
2296 this.__tryOrUnsub(this._next, value);
2297 }
2298 else if (this.__tryOrSetError(_parent, this._next, value)) {
2299 this.unsubscribe();
2300 }
2301 }
2302 };
2303 SafeSubscriber.prototype.error = function (err) {
2304 if (!this.isStopped) {
2305 var _parent = this._parent;
2306 if (this._error) {
2307 if (!_parent.syncErrorThrowable) {
2308 this.__tryOrUnsub(this._error, err);
2309 this.unsubscribe();
2310 }
2311 else {
2312 this.__tryOrSetError(_parent, this._error, err);
2313 this.unsubscribe();
2314 }
2315 }
2316 else if (!_parent.syncErrorThrowable) {
2317 this.unsubscribe();
2318 throw err;
2319 }
2320 else {
2321 _parent.syncErrorValue = err;
2322 _parent.syncErrorThrown = true;
2323 this.unsubscribe();
2324 }
2325 }
2326 };
2327 SafeSubscriber.prototype.complete = function () {
2328 if (!this.isStopped) {
2329 var _parent = this._parent;
2330 if (this._complete) {
2331 if (!_parent.syncErrorThrowable) {
2332 this.__tryOrUnsub(this._complete);
2333 this.unsubscribe();
2334 }
2335 else {
2336 this.__tryOrSetError(_parent, this._complete);
2337 this.unsubscribe();
2338 }
2339 }
2340 else {
2341 this.unsubscribe();
2342 }
2343 }
2344 };
2345 SafeSubscriber.prototype.__tryOrUnsub = function (fn, value) {
2346 try {
2347 fn.call(this._context, value);
2348 }
2349 catch (err) {
2350 this.unsubscribe();
2351 throw err;
2352 }
2353 };
2354 SafeSubscriber.prototype.__tryOrSetError = function (parent, fn, value) {
2355 try {
2356 fn.call(this._context, value);
2357 }
2358 catch (err) {
2359 parent.syncErrorValue = err;
2360 parent.syncErrorThrown = true;
2361 return true;
2362 }
2363 return false;
2364 };
2365 SafeSubscriber.prototype._unsubscribe = function () {
2366 var _parent = this._parent;
2367 this._context = null;
2368 this._parent = null;
2369 _parent.unsubscribe();
2370 };
2371 return SafeSubscriber;
2372 }(Subscriber));
2373 //# sourceMappingURL=Subscriber.js.map
2374
2375/***/ },
2376/* 81 */
2377/*!********************************!*\
2378 !*** ./~/rxjs/Subscription.js ***!
2379 \********************************/
2380/***/ function(module, exports, __webpack_require__) {
2381
2382 "use strict";
2383 var isArray_1 = __webpack_require__(/*! ./util/isArray */ 71);
2384 var isObject_1 = __webpack_require__(/*! ./util/isObject */ 82);
2385 var isFunction_1 = __webpack_require__(/*! ./util/isFunction */ 72);
2386 var tryCatch_1 = __webpack_require__(/*! ./util/tryCatch */ 83);
2387 var errorObject_1 = __webpack_require__(/*! ./util/errorObject */ 84);
2388 var UnsubscriptionError_1 = __webpack_require__(/*! ./util/UnsubscriptionError */ 85);
2389 /**
2390 * Represents a disposable resource, such as the execution of an Observable. A
2391 * Subscription has one important method, `unsubscribe`, that takes no argument
2392 * and just disposes the resource held by the subscription.
2393 *
2394 * Additionally, subscriptions may be grouped together through the `add()`
2395 * method, which will attach a child Subscription to the current Subscription.
2396 * When a Subscription is unsubscribed, all its children (and its grandchildren)
2397 * will be unsubscribed as well.
2398 *
2399 * @class Subscription
2400 */
2401 var Subscription = (function () {
2402 /**
2403 * @param {function(): void} [unsubscribe] A function describing how to
2404 * perform the disposal of resources when the `unsubscribe` method is called.
2405 */
2406 function Subscription(unsubscribe) {
2407 /**
2408 * A flag to indicate whether this Subscription has already been unsubscribed.
2409 * @type {boolean}
2410 */
2411 this.isUnsubscribed = false;
2412 if (unsubscribe) {
2413 this._unsubscribe = unsubscribe;
2414 }
2415 }
2416 /**
2417 * Disposes the resources held by the subscription. May, for instance, cancel
2418 * an ongoing Observable execution or cancel any other type of work that
2419 * started when the Subscription was created.
2420 * @return {void}
2421 */
2422 Subscription.prototype.unsubscribe = function () {
2423 var hasErrors = false;
2424 var errors;
2425 if (this.isUnsubscribed) {
2426 return;
2427 }
2428 this.isUnsubscribed = true;
2429 var _a = this, _unsubscribe = _a._unsubscribe, _subscriptions = _a._subscriptions;
2430 this._subscriptions = null;
2431 if (isFunction_1.isFunction(_unsubscribe)) {
2432 var trial = tryCatch_1.tryCatch(_unsubscribe).call(this);
2433 if (trial === errorObject_1.errorObject) {
2434 hasErrors = true;
2435 (errors = errors || []).push(errorObject_1.errorObject.e);
2436 }
2437 }
2438 if (isArray_1.isArray(_subscriptions)) {
2439 var index = -1;
2440 var len = _subscriptions.length;
2441 while (++index < len) {
2442 var sub = _subscriptions[index];
2443 if (isObject_1.isObject(sub)) {
2444 var trial = tryCatch_1.tryCatch(sub.unsubscribe).call(sub);
2445 if (trial === errorObject_1.errorObject) {
2446 hasErrors = true;
2447 errors = errors || [];
2448 var err = errorObject_1.errorObject.e;
2449 if (err instanceof UnsubscriptionError_1.UnsubscriptionError) {
2450 errors = errors.concat(err.errors);
2451 }
2452 else {
2453 errors.push(err);
2454 }
2455 }
2456 }
2457 }
2458 }
2459 if (hasErrors) {
2460 throw new UnsubscriptionError_1.UnsubscriptionError(errors);
2461 }
2462 };
2463 /**
2464 * Adds a tear down to be called during the unsubscribe() of this
2465 * Subscription.
2466 *
2467 * If the tear down being added is a subscription that is already
2468 * unsubscribed, is the same reference `add` is being called on, or is
2469 * `Subscription.EMPTY`, it will not be added.
2470 *
2471 * If this subscription is already in an `isUnsubscribed` state, the passed
2472 * tear down logic will be executed immediately.
2473 *
2474 * @param {TeardownLogic} teardown The additional logic to execute on
2475 * teardown.
2476 * @return {Subscription} Returns the Subscription used or created to be
2477 * added to the inner subscriptions list. This Subscription can be used with
2478 * `remove()` to remove the passed teardown logic from the inner subscriptions
2479 * list.
2480 */
2481 Subscription.prototype.add = function (teardown) {
2482 if (!teardown || (teardown === this) || (teardown === Subscription.EMPTY)) {
2483 return;
2484 }
2485 var sub = teardown;
2486 switch (typeof teardown) {
2487 case 'function':
2488 sub = new Subscription(teardown);
2489 case 'object':
2490 if (sub.isUnsubscribed || typeof sub.unsubscribe !== 'function') {
2491 break;
2492 }
2493 else if (this.isUnsubscribed) {
2494 sub.unsubscribe();
2495 }
2496 else {
2497 (this._subscriptions || (this._subscriptions = [])).push(sub);
2498 }
2499 break;
2500 default:
2501 throw new Error('Unrecognized teardown ' + teardown + ' added to Subscription.');
2502 }
2503 return sub;
2504 };
2505 /**
2506 * Removes a Subscription from the internal list of subscriptions that will
2507 * unsubscribe during the unsubscribe process of this Subscription.
2508 * @param {Subscription} subscription The subscription to remove.
2509 * @return {void}
2510 */
2511 Subscription.prototype.remove = function (subscription) {
2512 // HACK: This might be redundant because of the logic in `add()`
2513 if (subscription == null || (subscription === this) || (subscription === Subscription.EMPTY)) {
2514 return;
2515 }
2516 var subscriptions = this._subscriptions;
2517 if (subscriptions) {
2518 var subscriptionIndex = subscriptions.indexOf(subscription);
2519 if (subscriptionIndex !== -1) {
2520 subscriptions.splice(subscriptionIndex, 1);
2521 }
2522 }
2523 };
2524 Subscription.EMPTY = (function (empty) {
2525 empty.isUnsubscribed = true;
2526 return empty;
2527 }(new Subscription()));
2528 return Subscription;
2529 }());
2530 exports.Subscription = Subscription;
2531 //# sourceMappingURL=Subscription.js.map
2532
2533/***/ },
2534/* 82 */
2535/*!*********************************!*\
2536 !*** ./~/rxjs/util/isObject.js ***!
2537 \*********************************/
2538/***/ function(module, exports) {
2539
2540 "use strict";
2541 function isObject(x) {
2542 return x != null && typeof x === 'object';
2543 }
2544 exports.isObject = isObject;
2545 //# sourceMappingURL=isObject.js.map
2546
2547/***/ },
2548/* 83 */
2549/*!*********************************!*\
2550 !*** ./~/rxjs/util/tryCatch.js ***!
2551 \*********************************/
2552/***/ function(module, exports, __webpack_require__) {
2553
2554 "use strict";
2555 var errorObject_1 = __webpack_require__(/*! ./errorObject */ 84);
2556 var tryCatchTarget;
2557 function tryCatcher() {
2558 try {
2559 return tryCatchTarget.apply(this, arguments);
2560 }
2561 catch (e) {
2562 errorObject_1.errorObject.e = e;
2563 return errorObject_1.errorObject;
2564 }
2565 }
2566 function tryCatch(fn) {
2567 tryCatchTarget = fn;
2568 return tryCatcher;
2569 }
2570 exports.tryCatch = tryCatch;
2571 ;
2572 //# sourceMappingURL=tryCatch.js.map
2573
2574/***/ },
2575/* 84 */
2576/*!************************************!*\
2577 !*** ./~/rxjs/util/errorObject.js ***!
2578 \************************************/
2579/***/ function(module, exports) {
2580
2581 "use strict";
2582 // typeof any so that it we don't have to cast when comparing a result to the error object
2583 exports.errorObject = { e: {} };
2584 //# sourceMappingURL=errorObject.js.map
2585
2586/***/ },
2587/* 85 */
2588/*!********************************************!*\
2589 !*** ./~/rxjs/util/UnsubscriptionError.js ***!
2590 \********************************************/
2591/***/ function(module, exports) {
2592
2593 "use strict";
2594 var __extends = (this && this.__extends) || function (d, b) {
2595 for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
2596 function __() { this.constructor = d; }
2597 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
2598 };
2599 /**
2600 * An error thrown when one or more errors have occurred during the
2601 * `unsubscribe` of a {@link Subscription}.
2602 */
2603 var UnsubscriptionError = (function (_super) {
2604 __extends(UnsubscriptionError, _super);
2605 function UnsubscriptionError(errors) {
2606 _super.call(this);
2607 this.errors = errors;
2608 this.name = 'UnsubscriptionError';
2609 this.message = errors ? errors.length + " errors occurred during unsubscription:\n" + errors.map(function (err, i) { return ((i + 1) + ") " + err.toString()); }).join('\n') : '';
2610 }
2611 return UnsubscriptionError;
2612 }(Error));
2613 exports.UnsubscriptionError = UnsubscriptionError;
2614 //# sourceMappingURL=UnsubscriptionError.js.map
2615
2616/***/ },
2617/* 86 */
2618/*!***************************************!*\
2619 !*** ./~/rxjs/symbol/rxSubscriber.js ***!
2620 \***************************************/
2621/***/ function(module, exports, __webpack_require__) {
2622
2623 "use strict";
2624 var root_1 = __webpack_require__(/*! ../util/root */ 76);
2625 var Symbol = root_1.root.Symbol;
2626 exports.$$rxSubscriber = (typeof Symbol === 'function' && typeof Symbol.for === 'function') ?
2627 Symbol.for('rxSubscriber') : '@@rxSubscriber';
2628 //# sourceMappingURL=rxSubscriber.js.map
2629
2630/***/ },
2631/* 87 */
2632/*!****************************!*\
2633 !*** ./~/rxjs/Observer.js ***!
2634 \****************************/
2635/***/ function(module, exports) {
2636
2637 "use strict";
2638 exports.empty = {
2639 isUnsubscribed: true,
2640 next: function (value) { },
2641 error: function (err) { throw err; },
2642 complete: function () { }
2643 };
2644 //# sourceMappingURL=Observer.js.map
2645
2646/***/ },
2647/* 88 */
2648/*!*********************************************!*\
2649 !*** ./~/rxjs/~/symbol-observable/index.js ***!
2650 \*********************************************/
2651/***/ function(module, exports, __webpack_require__) {
2652
2653 /* WEBPACK VAR INJECTION */(function(global) {/* global window */
2654 'use strict';
2655
2656 module.exports = __webpack_require__(/*! ./ponyfill */ 89)(global || window || this);
2657
2658 /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
2659
2660/***/ },
2661/* 89 */
2662/*!************************************************!*\
2663 !*** ./~/rxjs/~/symbol-observable/ponyfill.js ***!
2664 \************************************************/
2665/***/ function(module, exports) {
2666
2667 'use strict';
2668
2669 module.exports = function symbolObservablePonyfill(root) {
2670 var result;
2671 var Symbol = root.Symbol;
2672
2673 if (typeof Symbol === 'function') {
2674 if (Symbol.observable) {
2675 result = Symbol.observable;
2676 } else {
2677 result = Symbol('observable');
2678 Symbol.observable = result;
2679 }
2680 } else {
2681 result = '@@observable';
2682 }
2683
2684 return result;
2685 };
2686
2687
2688/***/ },
2689/* 90 */
2690/*!*************************************************!*\
2691 !*** ./~/rxjs/observable/IteratorObservable.js ***!
2692 \*************************************************/
2693/***/ function(module, exports, __webpack_require__) {
2694
2695 "use strict";
2696 var __extends = (this && this.__extends) || function (d, b) {
2697 for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
2698 function __() { this.constructor = d; }
2699 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
2700 };
2701 var root_1 = __webpack_require__(/*! ../util/root */ 76);
2702 var isObject_1 = __webpack_require__(/*! ../util/isObject */ 82);
2703 var tryCatch_1 = __webpack_require__(/*! ../util/tryCatch */ 83);
2704 var Observable_1 = __webpack_require__(/*! ../Observable */ 78);
2705 var isFunction_1 = __webpack_require__(/*! ../util/isFunction */ 72);
2706 var iterator_1 = __webpack_require__(/*! ../symbol/iterator */ 91);
2707 var errorObject_1 = __webpack_require__(/*! ../util/errorObject */ 84);
2708 /**
2709 * We need this JSDoc comment for affecting ESDoc.
2710 * @extends {Ignored}
2711 * @hide true
2712 */
2713 var IteratorObservable = (function (_super) {
2714 __extends(IteratorObservable, _super);
2715 function IteratorObservable(iterator, project, thisArg, scheduler) {
2716 _super.call(this);
2717 if (iterator == null) {
2718 throw new Error('iterator cannot be null.');
2719 }
2720 if (isObject_1.isObject(project)) {
2721 this.thisArg = project;
2722 this.scheduler = thisArg;
2723 }
2724 else if (isFunction_1.isFunction(project)) {
2725 this.project = project;
2726 this.thisArg = thisArg;
2727 this.scheduler = scheduler;
2728 }
2729 else if (project != null) {
2730 throw new Error('When provided, `project` must be a function.');
2731 }
2732 this.iterator = getIterator(iterator);
2733 }
2734 IteratorObservable.create = function (iterator, project, thisArg, scheduler) {
2735 return new IteratorObservable(iterator, project, thisArg, scheduler);
2736 };
2737 IteratorObservable.dispatch = function (state) {
2738 var index = state.index, hasError = state.hasError, thisArg = state.thisArg, project = state.project, iterator = state.iterator, subscriber = state.subscriber;
2739 if (hasError) {
2740 subscriber.error(state.error);
2741 return;
2742 }
2743 var result = iterator.next();
2744 if (result.done) {
2745 subscriber.complete();
2746 return;
2747 }
2748 if (project) {
2749 result = tryCatch_1.tryCatch(project).call(thisArg, result.value, index);
2750 if (result === errorObject_1.errorObject) {
2751 state.error = errorObject_1.errorObject.e;
2752 state.hasError = true;
2753 }
2754 else {
2755 subscriber.next(result);
2756 state.index = index + 1;
2757 }
2758 }
2759 else {
2760 subscriber.next(result.value);
2761 state.index = index + 1;
2762 }
2763 if (subscriber.isUnsubscribed) {
2764 return;
2765 }
2766 this.schedule(state);
2767 };
2768 IteratorObservable.prototype._subscribe = function (subscriber) {
2769 var index = 0;
2770 var _a = this, iterator = _a.iterator, project = _a.project, thisArg = _a.thisArg, scheduler = _a.scheduler;
2771 if (scheduler) {
2772 return scheduler.schedule(IteratorObservable.dispatch, 0, {
2773 index: index, thisArg: thisArg, project: project, iterator: iterator, subscriber: subscriber
2774 });
2775 }
2776 else {
2777 do {
2778 var result = iterator.next();
2779 if (result.done) {
2780 subscriber.complete();
2781 break;
2782 }
2783 else if (project) {
2784 result = tryCatch_1.tryCatch(project).call(thisArg, result.value, index++);
2785 if (result === errorObject_1.errorObject) {
2786 subscriber.error(errorObject_1.errorObject.e);
2787 break;
2788 }
2789 subscriber.next(result);
2790 }
2791 else {
2792 subscriber.next(result.value);
2793 }
2794 if (subscriber.isUnsubscribed) {
2795 break;
2796 }
2797 } while (true);
2798 }
2799 };
2800 return IteratorObservable;
2801 }(Observable_1.Observable));
2802 exports.IteratorObservable = IteratorObservable;
2803 var StringIterator = (function () {
2804 function StringIterator(str, idx, len) {
2805 if (idx === void 0) { idx = 0; }
2806 if (len === void 0) { len = str.length; }
2807 this.str = str;
2808 this.idx = idx;
2809 this.len = len;
2810 }
2811 StringIterator.prototype[iterator_1.$$iterator] = function () { return (this); };
2812 StringIterator.prototype.next = function () {
2813 return this.idx < this.len ? {
2814 done: false,
2815 value: this.str.charAt(this.idx++)
2816 } : {
2817 done: true,
2818 value: undefined
2819 };
2820 };
2821 return StringIterator;
2822 }());
2823 var ArrayIterator = (function () {
2824 function ArrayIterator(arr, idx, len) {
2825 if (idx === void 0) { idx = 0; }
2826 if (len === void 0) { len = toLength(arr); }
2827 this.arr = arr;
2828 this.idx = idx;
2829 this.len = len;
2830 }
2831 ArrayIterator.prototype[iterator_1.$$iterator] = function () { return this; };
2832 ArrayIterator.prototype.next = function () {
2833 return this.idx < this.len ? {
2834 done: false,
2835 value: this.arr[this.idx++]
2836 } : {
2837 done: true,
2838 value: undefined
2839 };
2840 };
2841 return ArrayIterator;
2842 }());
2843 function getIterator(obj) {
2844 var i = obj[iterator_1.$$iterator];
2845 if (!i && typeof obj === 'string') {
2846 return new StringIterator(obj);
2847 }
2848 if (!i && obj.length !== undefined) {
2849 return new ArrayIterator(obj);
2850 }
2851 if (!i) {
2852 throw new TypeError('Object is not iterable');
2853 }
2854 return obj[iterator_1.$$iterator]();
2855 }
2856 var maxSafeInteger = Math.pow(2, 53) - 1;
2857 function toLength(o) {
2858 var len = +o.length;
2859 if (isNaN(len)) {
2860 return 0;
2861 }
2862 if (len === 0 || !numberIsFinite(len)) {
2863 return len;
2864 }
2865 len = sign(len) * Math.floor(Math.abs(len));
2866 if (len <= 0) {
2867 return 0;
2868 }
2869 if (len > maxSafeInteger) {
2870 return maxSafeInteger;
2871 }
2872 return len;
2873 }
2874 function numberIsFinite(value) {
2875 return typeof value === 'number' && root_1.root.isFinite(value);
2876 }
2877 function sign(value) {
2878 var valueAsNumber = +value;
2879 if (valueAsNumber === 0) {
2880 return valueAsNumber;
2881 }
2882 if (isNaN(valueAsNumber)) {
2883 return valueAsNumber;
2884 }
2885 return valueAsNumber < 0 ? -1 : 1;
2886 }
2887 //# sourceMappingURL=IteratorObservable.js.map
2888
2889/***/ },
2890/* 91 */
2891/*!***********************************!*\
2892 !*** ./~/rxjs/symbol/iterator.js ***!
2893 \***********************************/
2894/***/ function(module, exports, __webpack_require__) {
2895
2896 "use strict";
2897 var root_1 = __webpack_require__(/*! ../util/root */ 76);
2898 var Symbol = root_1.root.Symbol;
2899 if (typeof Symbol === 'function') {
2900 if (Symbol.iterator) {
2901 exports.$$iterator = Symbol.iterator;
2902 }
2903 else if (typeof Symbol.for === 'function') {
2904 exports.$$iterator = Symbol.for('iterator');
2905 }
2906 }
2907 else {
2908 if (root_1.root.Set && typeof new root_1.root.Set()['@@iterator'] === 'function') {
2909 // Bug for mozilla version
2910 exports.$$iterator = '@@iterator';
2911 }
2912 else if (root_1.root.Map) {
2913 // es6-shim specific logic
2914 var keys = Object.getOwnPropertyNames(root_1.root.Map.prototype);
2915 for (var i = 0; i < keys.length; ++i) {
2916 var key = keys[i];
2917 if (key !== 'entries' && key !== 'size' && root_1.root.Map.prototype[key] === root_1.root.Map.prototype['entries']) {
2918 exports.$$iterator = key;
2919 break;
2920 }
2921 }
2922 }
2923 else {
2924 exports.$$iterator = '@@iterator';
2925 }
2926 }
2927 //# sourceMappingURL=iterator.js.map
2928
2929/***/ },
2930/* 92 */
2931/*!**********************************************!*\
2932 !*** ./~/rxjs/observable/ArrayObservable.js ***!
2933 \**********************************************/
2934/***/ function(module, exports, __webpack_require__) {
2935
2936 "use strict";
2937 var __extends = (this && this.__extends) || function (d, b) {
2938 for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
2939 function __() { this.constructor = d; }
2940 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
2941 };
2942 var Observable_1 = __webpack_require__(/*! ../Observable */ 78);
2943 var ScalarObservable_1 = __webpack_require__(/*! ./ScalarObservable */ 93);
2944 var EmptyObservable_1 = __webpack_require__(/*! ./EmptyObservable */ 94);
2945 var isScheduler_1 = __webpack_require__(/*! ../util/isScheduler */ 74);
2946 /**
2947 * We need this JSDoc comment for affecting ESDoc.
2948 * @extends {Ignored}
2949 * @hide true
2950 */
2951 var ArrayObservable = (function (_super) {
2952 __extends(ArrayObservable, _super);
2953 function ArrayObservable(array, scheduler) {
2954 _super.call(this);
2955 this.array = array;
2956 this.scheduler = scheduler;
2957 if (!scheduler && array.length === 1) {
2958 this._isScalar = true;
2959 this.value = array[0];
2960 }
2961 }
2962 ArrayObservable.create = function (array, scheduler) {
2963 return new ArrayObservable(array, scheduler);
2964 };
2965 /**
2966 * Creates an Observable that emits some values you specify as arguments,
2967 * immediately one after the other, and then emits a complete notification.
2968 *
2969 * <span class="informal">Emits the arguments you provide, then completes.
2970 * </span>
2971 *
2972 * <img src="./img/of.png" width="100%">
2973 *
2974 * This static operator is useful for creating a simple Observable that only
2975 * emits the arguments given, and the complete notification thereafter. It can
2976 * be used for composing with other Observables, such as with {@link concat}.
2977 * By default, it uses a `null` Scheduler, which means the `next`
2978 * notifications are sent synchronously, although with a different Scheduler
2979 * it is possible to determine when those notifications will be delivered.
2980 *
2981 * @example <caption>Emit 10, 20, 30, then 'a', 'b', 'c', then start ticking every second.</caption>
2982 * var numbers = Rx.Observable.of(10, 20, 30);
2983 * var letters = Rx.Observable.of('a', 'b', 'c');
2984 * var interval = Rx.Observable.interval(1000);
2985 * var result = numbers.concat(letters).concat(interval);
2986 * result.subscribe(x => console.log(x));
2987 *
2988 * @see {@link create}
2989 * @see {@link empty}
2990 * @see {@link never}
2991 * @see {@link throw}
2992 *
2993 * @param {...T} values Arguments that represent `next` values to be emitted.
2994 * @param {Scheduler} [scheduler] A {@link Scheduler} to use for scheduling
2995 * the emissions of the `next` notifications.
2996 * @return {Observable<T>} An Observable that emits each given input value.
2997 * @static true
2998 * @name of
2999 * @owner Observable
3000 */
3001 ArrayObservable.of = function () {
3002 var array = [];
3003 for (var _i = 0; _i < arguments.length; _i++) {
3004 array[_i - 0] = arguments[_i];
3005 }
3006 var scheduler = array[array.length - 1];
3007 if (isScheduler_1.isScheduler(scheduler)) {
3008 array.pop();
3009 }
3010 else {
3011 scheduler = null;
3012 }
3013 var len = array.length;
3014 if (len > 1) {
3015 return new ArrayObservable(array, scheduler);
3016 }
3017 else if (len === 1) {
3018 return new ScalarObservable_1.ScalarObservable(array[0], scheduler);
3019 }
3020 else {
3021 return new EmptyObservable_1.EmptyObservable(scheduler);
3022 }
3023 };
3024 ArrayObservable.dispatch = function (state) {
3025 var array = state.array, index = state.index, count = state.count, subscriber = state.subscriber;
3026 if (index >= count) {
3027 subscriber.complete();
3028 return;
3029 }
3030 subscriber.next(array[index]);
3031 if (subscriber.isUnsubscribed) {
3032 return;
3033 }
3034 state.index = index + 1;
3035 this.schedule(state);
3036 };
3037 ArrayObservable.prototype._subscribe = function (subscriber) {
3038 var index = 0;
3039 var array = this.array;
3040 var count = array.length;
3041 var scheduler = this.scheduler;
3042 if (scheduler) {
3043 return scheduler.schedule(ArrayObservable.dispatch, 0, {
3044 array: array, index: index, count: count, subscriber: subscriber
3045 });
3046 }
3047 else {
3048 for (var i = 0; i < count && !subscriber.isUnsubscribed; i++) {
3049 subscriber.next(array[i]);
3050 }
3051 subscriber.complete();
3052 }
3053 };
3054 return ArrayObservable;
3055 }(Observable_1.Observable));
3056 exports.ArrayObservable = ArrayObservable;
3057 //# sourceMappingURL=ArrayObservable.js.map
3058
3059/***/ },
3060/* 93 */
3061/*!***********************************************!*\
3062 !*** ./~/rxjs/observable/ScalarObservable.js ***!
3063 \***********************************************/
3064/***/ function(module, exports, __webpack_require__) {
3065
3066 "use strict";
3067 var __extends = (this && this.__extends) || function (d, b) {
3068 for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
3069 function __() { this.constructor = d; }
3070 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
3071 };
3072 var Observable_1 = __webpack_require__(/*! ../Observable */ 78);
3073 /**
3074 * We need this JSDoc comment for affecting ESDoc.
3075 * @extends {Ignored}
3076 * @hide true
3077 */
3078 var ScalarObservable = (function (_super) {
3079 __extends(ScalarObservable, _super);
3080 function ScalarObservable(value, scheduler) {
3081 _super.call(this);
3082 this.value = value;
3083 this.scheduler = scheduler;
3084 this._isScalar = true;
3085 }
3086 ScalarObservable.create = function (value, scheduler) {
3087 return new ScalarObservable(value, scheduler);
3088 };
3089 ScalarObservable.dispatch = function (state) {
3090 var done = state.done, value = state.value, subscriber = state.subscriber;
3091 if (done) {
3092 subscriber.complete();
3093 return;
3094 }
3095 subscriber.next(value);
3096 if (subscriber.isUnsubscribed) {
3097 return;
3098 }
3099 state.done = true;
3100 this.schedule(state);
3101 };
3102 ScalarObservable.prototype._subscribe = function (subscriber) {
3103 var value = this.value;
3104 var scheduler = this.scheduler;
3105 if (scheduler) {
3106 return scheduler.schedule(ScalarObservable.dispatch, 0, {
3107 done: false, value: value, subscriber: subscriber
3108 });
3109 }
3110 else {
3111 subscriber.next(value);
3112 if (!subscriber.isUnsubscribed) {
3113 subscriber.complete();
3114 }
3115 }
3116 };
3117 return ScalarObservable;
3118 }(Observable_1.Observable));
3119 exports.ScalarObservable = ScalarObservable;
3120 //# sourceMappingURL=ScalarObservable.js.map
3121
3122/***/ },
3123/* 94 */
3124/*!**********************************************!*\
3125 !*** ./~/rxjs/observable/EmptyObservable.js ***!
3126 \**********************************************/
3127/***/ function(module, exports, __webpack_require__) {
3128
3129 "use strict";
3130 var __extends = (this && this.__extends) || function (d, b) {
3131 for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
3132 function __() { this.constructor = d; }
3133 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
3134 };
3135 var Observable_1 = __webpack_require__(/*! ../Observable */ 78);
3136 /**
3137 * We need this JSDoc comment for affecting ESDoc.
3138 * @extends {Ignored}
3139 * @hide true
3140 */
3141 var EmptyObservable = (function (_super) {
3142 __extends(EmptyObservable, _super);
3143 function EmptyObservable(scheduler) {
3144 _super.call(this);
3145 this.scheduler = scheduler;
3146 }
3147 /**
3148 * Creates an Observable that emits no items to the Observer and immediately
3149 * emits a complete notification.
3150 *
3151 * <span class="informal">Just emits 'complete', and nothing else.
3152 * </span>
3153 *
3154 * <img src="./img/empty.png" width="100%">
3155 *
3156 * This static operator is useful for creating a simple Observable that only
3157 * emits the complete notification. It can be used for composing with other
3158 * Observables, such as in a {@link mergeMap}.
3159 *
3160 * @example <caption>Emit the number 7, then complete.</caption>
3161 * var result = Rx.Observable.empty().startWith(7);
3162 * result.subscribe(x => console.log(x));
3163 *
3164 * @example <caption>Map and flatten only odd numbers to the sequence 'a', 'b', 'c'</caption>
3165 * var interval = Rx.Observable.interval(1000);
3166 * var result = interval.mergeMap(x =>
3167 * x % 2 === 1 ? Rx.Observable.of('a', 'b', 'c') : Rx.Observable.empty()
3168 * );
3169 * result.subscribe(x => console.log(x));
3170 *
3171 * @see {@link create}
3172 * @see {@link never}
3173 * @see {@link of}
3174 * @see {@link throw}
3175 *
3176 * @param {Scheduler} [scheduler] A {@link Scheduler} to use for scheduling
3177 * the emission of the complete notification.
3178 * @return {Observable} An "empty" Observable: emits only the complete
3179 * notification.
3180 * @static true
3181 * @name empty
3182 * @owner Observable
3183 */
3184 EmptyObservable.create = function (scheduler) {
3185 return new EmptyObservable(scheduler);
3186 };
3187 EmptyObservable.dispatch = function (arg) {
3188 var subscriber = arg.subscriber;
3189 subscriber.complete();
3190 };
3191 EmptyObservable.prototype._subscribe = function (subscriber) {
3192 var scheduler = this.scheduler;
3193 if (scheduler) {
3194 return scheduler.schedule(EmptyObservable.dispatch, 0, { subscriber: subscriber });
3195 }
3196 else {
3197 subscriber.complete();
3198 }
3199 };
3200 return EmptyObservable;
3201 }(Observable_1.Observable));
3202 exports.EmptyObservable = EmptyObservable;
3203 //# sourceMappingURL=EmptyObservable.js.map
3204
3205/***/ },
3206/* 95 */
3207/*!**************************************************!*\
3208 !*** ./~/rxjs/observable/ArrayLikeObservable.js ***!
3209 \**************************************************/
3210/***/ function(module, exports, __webpack_require__) {
3211
3212 "use strict";
3213 var __extends = (this && this.__extends) || function (d, b) {
3214 for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
3215 function __() { this.constructor = d; }
3216 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
3217 };
3218 var Observable_1 = __webpack_require__(/*! ../Observable */ 78);
3219 var ScalarObservable_1 = __webpack_require__(/*! ./ScalarObservable */ 93);
3220 var EmptyObservable_1 = __webpack_require__(/*! ./EmptyObservable */ 94);
3221 /**
3222 * We need this JSDoc comment for affecting ESDoc.
3223 * @extends {Ignored}
3224 * @hide true
3225 */
3226 var ArrayLikeObservable = (function (_super) {
3227 __extends(ArrayLikeObservable, _super);
3228 function ArrayLikeObservable(arrayLike, mapFn, thisArg, scheduler) {
3229 _super.call(this);
3230 this.arrayLike = arrayLike;
3231 this.scheduler = scheduler;
3232 if (!mapFn && !scheduler && arrayLike.length === 1) {
3233 this._isScalar = true;
3234 this.value = arrayLike[0];
3235 }
3236 if (mapFn) {
3237 this.mapFn = mapFn.bind(thisArg);
3238 }
3239 }
3240 ArrayLikeObservable.create = function (arrayLike, mapFn, thisArg, scheduler) {
3241 var length = arrayLike.length;
3242 if (length === 0) {
3243 return new EmptyObservable_1.EmptyObservable();
3244 }
3245 else if (length === 1 && !mapFn) {
3246 return new ScalarObservable_1.ScalarObservable(arrayLike[0], scheduler);
3247 }
3248 else {
3249 return new ArrayLikeObservable(arrayLike, mapFn, thisArg, scheduler);
3250 }
3251 };
3252 ArrayLikeObservable.dispatch = function (state) {
3253 var arrayLike = state.arrayLike, index = state.index, length = state.length, mapFn = state.mapFn, subscriber = state.subscriber;
3254 if (subscriber.isUnsubscribed) {
3255 return;
3256 }
3257 if (index >= length) {
3258 subscriber.complete();
3259 return;
3260 }
3261 var result = mapFn ? mapFn(arrayLike[index], index) : arrayLike[index];
3262 subscriber.next(result);
3263 state.index = index + 1;
3264 this.schedule(state);
3265 };
3266 ArrayLikeObservable.prototype._subscribe = function (subscriber) {
3267 var index = 0;
3268 var _a = this, arrayLike = _a.arrayLike, mapFn = _a.mapFn, scheduler = _a.scheduler;
3269 var length = arrayLike.length;
3270 if (scheduler) {
3271 return scheduler.schedule(ArrayLikeObservable.dispatch, 0, {
3272 arrayLike: arrayLike, index: index, length: length, mapFn: mapFn, subscriber: subscriber
3273 });
3274 }
3275 else {
3276 for (var i = 0; i < length && !subscriber.isUnsubscribed; i++) {
3277 var result = mapFn ? mapFn(arrayLike[i], i) : arrayLike[i];
3278 subscriber.next(result);
3279 }
3280 subscriber.complete();
3281 }
3282 };
3283 return ArrayLikeObservable;
3284 }(Observable_1.Observable));
3285 exports.ArrayLikeObservable = ArrayLikeObservable;
3286 //# sourceMappingURL=ArrayLikeObservable.js.map
3287
3288/***/ },
3289/* 96 */
3290/*!**************************************!*\
3291 !*** ./~/rxjs/operator/observeOn.js ***!
3292 \**************************************/
3293/***/ function(module, exports, __webpack_require__) {
3294
3295 "use strict";
3296 var __extends = (this && this.__extends) || function (d, b) {
3297 for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
3298 function __() { this.constructor = d; }
3299 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
3300 };
3301 var Subscriber_1 = __webpack_require__(/*! ../Subscriber */ 80);
3302 var Notification_1 = __webpack_require__(/*! ../Notification */ 97);
3303 /**
3304 * @see {@link Notification}
3305 *
3306 * @param scheduler
3307 * @param delay
3308 * @return {Observable<R>|WebSocketSubject<T>|Observable<T>}
3309 * @method observeOn
3310 * @owner Observable
3311 */
3312 function observeOn(scheduler, delay) {
3313 if (delay === void 0) { delay = 0; }
3314 return this.lift(new ObserveOnOperator(scheduler, delay));
3315 }
3316 exports.observeOn = observeOn;
3317 var ObserveOnOperator = (function () {
3318 function ObserveOnOperator(scheduler, delay) {
3319 if (delay === void 0) { delay = 0; }
3320 this.scheduler = scheduler;
3321 this.delay = delay;
3322 }
3323 ObserveOnOperator.prototype.call = function (subscriber, source) {
3324 return source._subscribe(new ObserveOnSubscriber(subscriber, this.scheduler, this.delay));
3325 };
3326 return ObserveOnOperator;
3327 }());
3328 exports.ObserveOnOperator = ObserveOnOperator;
3329 /**
3330 * We need this JSDoc comment for affecting ESDoc.
3331 * @ignore
3332 * @extends {Ignored}
3333 */
3334 var ObserveOnSubscriber = (function (_super) {
3335 __extends(ObserveOnSubscriber, _super);
3336 function ObserveOnSubscriber(destination, scheduler, delay) {
3337 if (delay === void 0) { delay = 0; }
3338 _super.call(this, destination);
3339 this.scheduler = scheduler;
3340 this.delay = delay;
3341 }
3342 ObserveOnSubscriber.dispatch = function (arg) {
3343 var notification = arg.notification, destination = arg.destination;
3344 notification.observe(destination);
3345 };
3346 ObserveOnSubscriber.prototype.scheduleMessage = function (notification) {
3347 this.add(this.scheduler.schedule(ObserveOnSubscriber.dispatch, this.delay, new ObserveOnMessage(notification, this.destination)));
3348 };
3349 ObserveOnSubscriber.prototype._next = function (value) {
3350 this.scheduleMessage(Notification_1.Notification.createNext(value));
3351 };
3352 ObserveOnSubscriber.prototype._error = function (err) {
3353 this.scheduleMessage(Notification_1.Notification.createError(err));
3354 };
3355 ObserveOnSubscriber.prototype._complete = function () {
3356 this.scheduleMessage(Notification_1.Notification.createComplete());
3357 };
3358 return ObserveOnSubscriber;
3359 }(Subscriber_1.Subscriber));
3360 exports.ObserveOnSubscriber = ObserveOnSubscriber;
3361 var ObserveOnMessage = (function () {
3362 function ObserveOnMessage(notification, destination) {
3363 this.notification = notification;
3364 this.destination = destination;
3365 }
3366 return ObserveOnMessage;
3367 }());
3368 exports.ObserveOnMessage = ObserveOnMessage;
3369 //# sourceMappingURL=observeOn.js.map
3370
3371/***/ },
3372/* 97 */
3373/*!********************************!*\
3374 !*** ./~/rxjs/Notification.js ***!
3375 \********************************/
3376/***/ function(module, exports, __webpack_require__) {
3377
3378 "use strict";
3379 var Observable_1 = __webpack_require__(/*! ./Observable */ 78);
3380 /**
3381 * Represents a push-based event or value that an {@link Observable} can emit.
3382 * This class is particularly useful for operators that manage notifications,
3383 * like {@link materialize}, {@link dematerialize}, {@link observeOn}, and
3384 * others. Besides wrapping the actual delivered value, it also annotates it
3385 * with metadata of, for instance, what type of push message it is (`next`,
3386 * `error`, or `complete`).
3387 *
3388 * @see {@link materialize}
3389 * @see {@link dematerialize}
3390 * @see {@link observeOn}
3391 *
3392 * @class Notification<T>
3393 */
3394 var Notification = (function () {
3395 function Notification(kind, value, exception) {
3396 this.kind = kind;
3397 this.value = value;
3398 this.exception = exception;
3399 this.hasValue = kind === 'N';
3400 }
3401 /**
3402 * Delivers to the given `observer` the value wrapped by this Notification.
3403 * @param {Observer} observer
3404 * @return
3405 */
3406 Notification.prototype.observe = function (observer) {
3407 switch (this.kind) {
3408 case 'N':
3409 return observer.next && observer.next(this.value);
3410 case 'E':
3411 return observer.error && observer.error(this.exception);
3412 case 'C':
3413 return observer.complete && observer.complete();
3414 }
3415 };
3416 /**
3417 * Given some {@link Observer} callbacks, deliver the value represented by the
3418 * current Notification to the correctly corresponding callback.
3419 * @param {function(value: T): void} next An Observer `next` callback.
3420 * @param {function(err: any): void} [error] An Observer `error` callback.
3421 * @param {function(): void} [complete] An Observer `complete` callback.
3422 * @return {any}
3423 */
3424 Notification.prototype.do = function (next, error, complete) {
3425 var kind = this.kind;
3426 switch (kind) {
3427 case 'N':
3428 return next && next(this.value);
3429 case 'E':
3430 return error && error(this.exception);
3431 case 'C':
3432 return complete && complete();
3433 }
3434 };
3435 /**
3436 * Takes an Observer or its individual callback functions, and calls `observe`
3437 * or `do` methods accordingly.
3438 * @param {Observer|function(value: T): void} nextOrObserver An Observer or
3439 * the `next` callback.
3440 * @param {function(err: any): void} [error] An Observer `error` callback.
3441 * @param {function(): void} [complete] An Observer `complete` callback.
3442 * @return {any}
3443 */
3444 Notification.prototype.accept = function (nextOrObserver, error, complete) {
3445 if (nextOrObserver && typeof nextOrObserver.next === 'function') {
3446 return this.observe(nextOrObserver);
3447 }
3448 else {
3449 return this.do(nextOrObserver, error, complete);
3450 }
3451 };
3452 /**
3453 * Returns a simple Observable that just delivers the notification represented
3454 * by this Notification instance.
3455 * @return {any}
3456 */
3457 Notification.prototype.toObservable = function () {
3458 var kind = this.kind;
3459 switch (kind) {
3460 case 'N':
3461 return Observable_1.Observable.of(this.value);
3462 case 'E':
3463 return Observable_1.Observable.throw(this.exception);
3464 case 'C':
3465 return Observable_1.Observable.empty();
3466 }
3467 };
3468 /**
3469 * A shortcut to create a Notification instance of the type `next` from a
3470 * given value.
3471 * @param {T} value The `next` value.
3472 * @return {Notification<T>} The "next" Notification representing the
3473 * argument.
3474 */
3475 Notification.createNext = function (value) {
3476 if (typeof value !== 'undefined') {
3477 return new Notification('N', value);
3478 }
3479 return this.undefinedValueNotification;
3480 };
3481 /**
3482 * A shortcut to create a Notification instance of the type `error` from a
3483 * given error.
3484 * @param {any} [err] The `error` exception.
3485 * @return {Notification<T>} The "error" Notification representing the
3486 * argument.
3487 */
3488 Notification.createError = function (err) {
3489 return new Notification('E', undefined, err);
3490 };
3491 /**
3492 * A shortcut to create a Notification instance of the type `complete`.
3493 * @return {Notification<any>} The valueless "complete" Notification.
3494 */
3495 Notification.createComplete = function () {
3496 return this.completeNotification;
3497 };
3498 Notification.completeNotification = new Notification('C');
3499 Notification.undefinedValueNotification = new Notification('N', undefined);
3500 return Notification;
3501 }());
3502 exports.Notification = Notification;
3503 //# sourceMappingURL=Notification.js.map
3504
3505/***/ },
3506/* 98 */
3507/*!**********************************!*\
3508 !*** ./~/rxjs/operator/catch.js ***!
3509 \**********************************/
3510/***/ function(module, exports, __webpack_require__) {
3511
3512 "use strict";
3513 var __extends = (this && this.__extends) || function (d, b) {
3514 for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
3515 function __() { this.constructor = d; }
3516 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
3517 };
3518 var Subscriber_1 = __webpack_require__(/*! ../Subscriber */ 80);
3519 /**
3520 * Catches errors on the observable to be handled by returning a new observable or throwing an error.
3521 * @param {function} selector a function that takes as arguments `err`, which is the error, and `caught`, which
3522 * is the source observable, in case you'd like to "retry" that observable by returning it again. Whatever observable
3523 * is returned by the `selector` will be used to continue the observable chain.
3524 * @return {Observable} an observable that originates from either the source or the observable returned by the
3525 * catch `selector` function.
3526 * @method catch
3527 * @owner Observable
3528 */
3529 function _catch(selector) {
3530 var operator = new CatchOperator(selector);
3531 var caught = this.lift(operator);
3532 return (operator.caught = caught);
3533 }
3534 exports._catch = _catch;
3535 var CatchOperator = (function () {
3536 function CatchOperator(selector) {
3537 this.selector = selector;
3538 }
3539 CatchOperator.prototype.call = function (subscriber, source) {
3540 return source._subscribe(new CatchSubscriber(subscriber, this.selector, this.caught));
3541 };
3542 return CatchOperator;
3543 }());
3544 /**
3545 * We need this JSDoc comment for affecting ESDoc.
3546 * @ignore
3547 * @extends {Ignored}
3548 */
3549 var CatchSubscriber = (function (_super) {
3550 __extends(CatchSubscriber, _super);
3551 function CatchSubscriber(destination, selector, caught) {
3552 _super.call(this, destination);
3553 this.selector = selector;
3554 this.caught = caught;
3555 }
3556 // NOTE: overriding `error` instead of `_error` because we don't want
3557 // to have this flag this subscriber as `isStopped`.
3558 CatchSubscriber.prototype.error = function (err) {
3559 if (!this.isStopped) {
3560 var result = void 0;
3561 try {
3562 result = this.selector(err, this.caught);
3563 }
3564 catch (err) {
3565 this.destination.error(err);
3566 return;
3567 }
3568 this._innerSub(result);
3569 }
3570 };
3571 CatchSubscriber.prototype._innerSub = function (result) {
3572 this.unsubscribe();
3573 this.destination.remove(this);
3574 result.subscribe(this.destination);
3575 };
3576 return CatchSubscriber;
3577 }(Subscriber_1.Subscriber));
3578 //# sourceMappingURL=catch.js.map
3579
3580/***/ },
3581/* 99 */
3582/*!**************************************!*\
3583 !*** ./~/rxjs/operator/concatMap.js ***!
3584 \**************************************/
3585/***/ function(module, exports, __webpack_require__) {
3586
3587 "use strict";
3588 var mergeMap_1 = __webpack_require__(/*! ./mergeMap */ 100);
3589 /**
3590 * Projects each source value to an Observable which is merged in the output
3591 * Observable, in a serialized fashion waiting for each one to complete before
3592 * merging the next.
3593 *
3594 * <span class="informal">Maps each value to an Observable, then flattens all of
3595 * these inner Observables using {@link concatAll}.</span>
3596 *
3597 * <img src="./img/concatMap.png" width="100%">
3598 *
3599 * Returns an Observable that emits items based on applying a function that you
3600 * supply to each item emitted by the source Observable, where that function
3601 * returns an (so-called "inner") Observable. Each new inner Observable is
3602 * concatenated with the previous inner Observable.
3603 *
3604 * __Warning:__ if source values arrive endlessly and faster than their
3605 * corresponding inner Observables can complete, it will result in memory issues
3606 * as inner Observables amass in an unbounded buffer waiting for their turn to
3607 * be subscribed to.
3608 *
3609 * Note: `concatMap` is equivalent to `mergeMap` with concurrency parameter set
3610 * to `1`.
3611 *
3612 * @example <caption>For each click event, tick every second from 0 to 3, with no concurrency</caption>
3613 * var clicks = Rx.Observable.fromEvent(document, 'click');
3614 * var result = clicks.concatMap(ev => Rx.Observable.interval(1000).take(4));
3615 * result.subscribe(x => console.log(x));
3616 *
3617 * @see {@link concat}
3618 * @see {@link concatAll}
3619 * @see {@link concatMapTo}
3620 * @see {@link exhaustMap}
3621 * @see {@link mergeMap}
3622 * @see {@link switchMap}
3623 *
3624 * @param {function(value: T, ?index: number): Observable} project A function
3625 * that, when applied to an item emitted by the source Observable, returns an
3626 * Observable.
3627 * @param {function(outerValue: T, innerValue: I, outerIndex: number, innerIndex: number): any} [resultSelector]
3628 * A function to produce the value on the output Observable based on the values
3629 * and the indices of the source (outer) emission and the inner Observable
3630 * emission. The arguments passed to this function are:
3631 * - `outerValue`: the value that came from the source
3632 * - `innerValue`: the value that came from the projected Observable
3633 * - `outerIndex`: the "index" of the value that came from the source
3634 * - `innerIndex`: the "index" of the value from the projected Observable
3635 * @return {Observable} an observable of values merged from the projected
3636 * Observables as they were subscribed to, one at a time. Optionally, these
3637 * values may have been projected from a passed `projectResult` argument.
3638 * @return {Observable} An Observable that emits the result of applying the
3639 * projection function (and the optional `resultSelector`) to each item emitted
3640 * by the source Observable and taking values from each projected inner
3641 * Observable sequentially.
3642 * @method concatMap
3643 * @owner Observable
3644 */
3645 function concatMap(project, resultSelector) {
3646 return this.lift(new mergeMap_1.MergeMapOperator(project, resultSelector, 1));
3647 }
3648 exports.concatMap = concatMap;
3649 //# sourceMappingURL=concatMap.js.map
3650
3651/***/ },
3652/* 100 */
3653/*!*************************************!*\
3654 !*** ./~/rxjs/operator/mergeMap.js ***!
3655 \*************************************/
3656/***/ function(module, exports, __webpack_require__) {
3657
3658 "use strict";
3659 var __extends = (this && this.__extends) || function (d, b) {
3660 for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
3661 function __() { this.constructor = d; }
3662 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
3663 };
3664 var subscribeToResult_1 = __webpack_require__(/*! ../util/subscribeToResult */ 101);
3665 var OuterSubscriber_1 = __webpack_require__(/*! ../OuterSubscriber */ 103);
3666 /**
3667 * Projects each source value to an Observable which is merged in the output
3668 * Observable.
3669 *
3670 * <span class="informal">Maps each value to an Observable, then flattens all of
3671 * these inner Observables using {@link mergeAll}.</span>
3672 *
3673 * <img src="./img/mergeMap.png" width="100%">
3674 *
3675 * Returns an Observable that emits items based on applying a function that you
3676 * supply to each item emitted by the source Observable, where that function
3677 * returns an Observable, and then merging those resulting Observables and
3678 * emitting the results of this merger.
3679 *
3680 * @example <caption>Map and flatten each letter to an Observable ticking every 1 second</caption>
3681 * var letters = Rx.Observable.of('a', 'b', 'c');
3682 * var result = letters.mergeMap(x =>
3683 * Rx.Observable.interval(1000).map(i => x+i)
3684 * );
3685 * result.subscribe(x => console.log(x));
3686 *
3687 * @see {@link concatMap}
3688 * @see {@link exhaustMap}
3689 * @see {@link merge}
3690 * @see {@link mergeAll}
3691 * @see {@link mergeMapTo}
3692 * @see {@link mergeScan}
3693 * @see {@link switchMap}
3694 *
3695 * @param {function(value: T, ?index: number): Observable} project A function
3696 * that, when applied to an item emitted by the source Observable, returns an
3697 * Observable.
3698 * @param {function(outerValue: T, innerValue: I, outerIndex: number, innerIndex: number): any} [resultSelector]
3699 * A function to produce the value on the output Observable based on the values
3700 * and the indices of the source (outer) emission and the inner Observable
3701 * emission. The arguments passed to this function are:
3702 * - `outerValue`: the value that came from the source
3703 * - `innerValue`: the value that came from the projected Observable
3704 * - `outerIndex`: the "index" of the value that came from the source
3705 * - `innerIndex`: the "index" of the value from the projected Observable
3706 * @param {number} [concurrent=Number.POSITIVE_INFINITY] Maximum number of input
3707 * Observables being subscribed to concurrently.
3708 * @return {Observable} An Observable that emits the result of applying the
3709 * projection function (and the optional `resultSelector`) to each item emitted
3710 * by the source Observable and merging the results of the Observables obtained
3711 * from this transformation.
3712 * @method mergeMap
3713 * @owner Observable
3714 */
3715 function mergeMap(project, resultSelector, concurrent) {
3716 if (concurrent === void 0) { concurrent = Number.POSITIVE_INFINITY; }
3717 if (typeof resultSelector === 'number') {
3718 concurrent = resultSelector;
3719 resultSelector = null;
3720 }
3721 return this.lift(new MergeMapOperator(project, resultSelector, concurrent));
3722 }
3723 exports.mergeMap = mergeMap;
3724 var MergeMapOperator = (function () {
3725 function MergeMapOperator(project, resultSelector, concurrent) {
3726 if (concurrent === void 0) { concurrent = Number.POSITIVE_INFINITY; }
3727 this.project = project;
3728 this.resultSelector = resultSelector;
3729 this.concurrent = concurrent;
3730 }
3731 MergeMapOperator.prototype.call = function (observer, source) {
3732 return source._subscribe(new MergeMapSubscriber(observer, this.project, this.resultSelector, this.concurrent));
3733 };
3734 return MergeMapOperator;
3735 }());
3736 exports.MergeMapOperator = MergeMapOperator;
3737 /**
3738 * We need this JSDoc comment for affecting ESDoc.
3739 * @ignore
3740 * @extends {Ignored}
3741 */
3742 var MergeMapSubscriber = (function (_super) {
3743 __extends(MergeMapSubscriber, _super);
3744 function MergeMapSubscriber(destination, project, resultSelector, concurrent) {
3745 if (concurrent === void 0) { concurrent = Number.POSITIVE_INFINITY; }
3746 _super.call(this, destination);
3747 this.project = project;
3748 this.resultSelector = resultSelector;
3749 this.concurrent = concurrent;
3750 this.hasCompleted = false;
3751 this.buffer = [];
3752 this.active = 0;
3753 this.index = 0;
3754 }
3755 MergeMapSubscriber.prototype._next = function (value) {
3756 if (this.active < this.concurrent) {
3757 this._tryNext(value);
3758 }
3759 else {
3760 this.buffer.push(value);
3761 }
3762 };
3763 MergeMapSubscriber.prototype._tryNext = function (value) {
3764 var result;
3765 var index = this.index++;
3766 try {
3767 result = this.project(value, index);
3768 }
3769 catch (err) {
3770 this.destination.error(err);
3771 return;
3772 }
3773 this.active++;
3774 this._innerSub(result, value, index);
3775 };
3776 MergeMapSubscriber.prototype._innerSub = function (ish, value, index) {
3777 this.add(subscribeToResult_1.subscribeToResult(this, ish, value, index));
3778 };
3779 MergeMapSubscriber.prototype._complete = function () {
3780 this.hasCompleted = true;
3781 if (this.active === 0 && this.buffer.length === 0) {
3782 this.destination.complete();
3783 }
3784 };
3785 MergeMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
3786 if (this.resultSelector) {
3787 this._notifyResultSelector(outerValue, innerValue, outerIndex, innerIndex);
3788 }
3789 else {
3790 this.destination.next(innerValue);
3791 }
3792 };
3793 MergeMapSubscriber.prototype._notifyResultSelector = function (outerValue, innerValue, outerIndex, innerIndex) {
3794 var result;
3795 try {
3796 result = this.resultSelector(outerValue, innerValue, outerIndex, innerIndex);
3797 }
3798 catch (err) {
3799 this.destination.error(err);
3800 return;
3801 }
3802 this.destination.next(result);
3803 };
3804 MergeMapSubscriber.prototype.notifyComplete = function (innerSub) {
3805 var buffer = this.buffer;
3806 this.remove(innerSub);
3807 this.active--;
3808 if (buffer.length > 0) {
3809 this._next(buffer.shift());
3810 }
3811 else if (this.active === 0 && this.hasCompleted) {
3812 this.destination.complete();
3813 }
3814 };
3815 return MergeMapSubscriber;
3816 }(OuterSubscriber_1.OuterSubscriber));
3817 exports.MergeMapSubscriber = MergeMapSubscriber;
3818 //# sourceMappingURL=mergeMap.js.map
3819
3820/***/ },
3821/* 101 */
3822/*!******************************************!*\
3823 !*** ./~/rxjs/util/subscribeToResult.js ***!
3824 \******************************************/
3825/***/ function(module, exports, __webpack_require__) {
3826
3827 "use strict";
3828 var root_1 = __webpack_require__(/*! ./root */ 76);
3829 var isArray_1 = __webpack_require__(/*! ./isArray */ 71);
3830 var isPromise_1 = __webpack_require__(/*! ./isPromise */ 73);
3831 var Observable_1 = __webpack_require__(/*! ../Observable */ 78);
3832 var iterator_1 = __webpack_require__(/*! ../symbol/iterator */ 91);
3833 var InnerSubscriber_1 = __webpack_require__(/*! ../InnerSubscriber */ 102);
3834 var $$observable = __webpack_require__(/*! symbol-observable */ 88);
3835 function subscribeToResult(outerSubscriber, result, outerValue, outerIndex) {
3836 var destination = new InnerSubscriber_1.InnerSubscriber(outerSubscriber, outerValue, outerIndex);
3837 if (destination.isUnsubscribed) {
3838 return;
3839 }
3840 if (result instanceof Observable_1.Observable) {
3841 if (result._isScalar) {
3842 destination.next(result.value);
3843 destination.complete();
3844 return;
3845 }
3846 else {
3847 return result.subscribe(destination);
3848 }
3849 }
3850 if (isArray_1.isArray(result)) {
3851 for (var i = 0, len = result.length; i < len && !destination.isUnsubscribed; i++) {
3852 destination.next(result[i]);
3853 }
3854 if (!destination.isUnsubscribed) {
3855 destination.complete();
3856 }
3857 }
3858 else if (isPromise_1.isPromise(result)) {
3859 result.then(function (value) {
3860 if (!destination.isUnsubscribed) {
3861 destination.next(value);
3862 destination.complete();
3863 }
3864 }, function (err) { return destination.error(err); })
3865 .then(null, function (err) {
3866 // Escaping the Promise trap: globally throw unhandled errors
3867 root_1.root.setTimeout(function () { throw err; });
3868 });
3869 return destination;
3870 }
3871 else if (typeof result[iterator_1.$$iterator] === 'function') {
3872 for (var _i = 0, _a = result; _i < _a.length; _i++) {
3873 var item = _a[_i];
3874 destination.next(item);
3875 if (destination.isUnsubscribed) {
3876 break;
3877 }
3878 }
3879 if (!destination.isUnsubscribed) {
3880 destination.complete();
3881 }
3882 }
3883 else if (typeof result[$$observable] === 'function') {
3884 var obs = result[$$observable]();
3885 if (typeof obs.subscribe !== 'function') {
3886 destination.error('invalid observable');
3887 }
3888 else {
3889 return obs.subscribe(new InnerSubscriber_1.InnerSubscriber(outerSubscriber, outerValue, outerIndex));
3890 }
3891 }
3892 else {
3893 destination.error(new TypeError('unknown type returned'));
3894 }
3895 }
3896 exports.subscribeToResult = subscribeToResult;
3897 //# sourceMappingURL=subscribeToResult.js.map
3898
3899/***/ },
3900/* 102 */
3901/*!***********************************!*\
3902 !*** ./~/rxjs/InnerSubscriber.js ***!
3903 \***********************************/
3904/***/ function(module, exports, __webpack_require__) {
3905
3906 "use strict";
3907 var __extends = (this && this.__extends) || function (d, b) {
3908 for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
3909 function __() { this.constructor = d; }
3910 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
3911 };
3912 var Subscriber_1 = __webpack_require__(/*! ./Subscriber */ 80);
3913 /**
3914 * We need this JSDoc comment for affecting ESDoc.
3915 * @ignore
3916 * @extends {Ignored}
3917 */
3918 var InnerSubscriber = (function (_super) {
3919 __extends(InnerSubscriber, _super);
3920 function InnerSubscriber(parent, outerValue, outerIndex) {
3921 _super.call(this);
3922 this.parent = parent;
3923 this.outerValue = outerValue;
3924 this.outerIndex = outerIndex;
3925 this.index = 0;
3926 }
3927 InnerSubscriber.prototype._next = function (value) {
3928 this.parent.notifyNext(this.outerValue, value, this.outerIndex, this.index++, this);
3929 };
3930 InnerSubscriber.prototype._error = function (error) {
3931 this.parent.notifyError(error, this);
3932 this.unsubscribe();
3933 };
3934 InnerSubscriber.prototype._complete = function () {
3935 this.parent.notifyComplete(this);
3936 this.unsubscribe();
3937 };
3938 return InnerSubscriber;
3939 }(Subscriber_1.Subscriber));
3940 exports.InnerSubscriber = InnerSubscriber;
3941 //# sourceMappingURL=InnerSubscriber.js.map
3942
3943/***/ },
3944/* 103 */
3945/*!***********************************!*\
3946 !*** ./~/rxjs/OuterSubscriber.js ***!
3947 \***********************************/
3948/***/ function(module, exports, __webpack_require__) {
3949
3950 "use strict";
3951 var __extends = (this && this.__extends) || function (d, b) {
3952 for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
3953 function __() { this.constructor = d; }
3954 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
3955 };
3956 var Subscriber_1 = __webpack_require__(/*! ./Subscriber */ 80);
3957 /**
3958 * We need this JSDoc comment for affecting ESDoc.
3959 * @ignore
3960 * @extends {Ignored}
3961 */
3962 var OuterSubscriber = (function (_super) {
3963 __extends(OuterSubscriber, _super);
3964 function OuterSubscriber() {
3965 _super.apply(this, arguments);
3966 }
3967 OuterSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
3968 this.destination.next(innerValue);
3969 };
3970 OuterSubscriber.prototype.notifyError = function (error, innerSub) {
3971 this.destination.error(error);
3972 };
3973 OuterSubscriber.prototype.notifyComplete = function (innerSub) {
3974 this.destination.complete();
3975 };
3976 return OuterSubscriber;
3977 }(Subscriber_1.Subscriber));
3978 exports.OuterSubscriber = OuterSubscriber;
3979 //# sourceMappingURL=OuterSubscriber.js.map
3980
3981/***/ },
3982/* 104 */
3983/*!***********************************!*\
3984 !*** ./~/rxjs/operator/filter.js ***!
3985 \***********************************/
3986/***/ function(module, exports, __webpack_require__) {
3987
3988 "use strict";
3989 var __extends = (this && this.__extends) || function (d, b) {
3990 for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
3991 function __() { this.constructor = d; }
3992 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
3993 };
3994 var Subscriber_1 = __webpack_require__(/*! ../Subscriber */ 80);
3995 /**
3996 * Filter items emitted by the source Observable by only emitting those that
3997 * satisfy a specified predicate.
3998 *
3999 * <span class="informal">Like
4000 * [Array.prototype.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter),
4001 * it only emits a value from the source if it passes a criterion function.</span>
4002 *
4003 * <img src="./img/filter.png" width="100%">
4004 *
4005 * Similar to the well-known `Array.prototype.filter` method, this operator
4006 * takes values from the source Observable, passes them through a `predicate`
4007 * function and only emits those values that yielded `true`.
4008 *
4009 * @example <caption>Emit only click events whose target was a DIV element</caption>
4010 * var clicks = Rx.Observable.fromEvent(document, 'click');
4011 * var clicksOnDivs = clicks.filter(ev => ev.target.tagName === 'DIV');
4012 * clicksOnDivs.subscribe(x => console.log(x));
4013 *
4014 * @see {@link distinct}
4015 * @see {@link distinctKey}
4016 * @see {@link distinctUntilChanged}
4017 * @see {@link distinctUntilKeyChanged}
4018 * @see {@link ignoreElements}
4019 * @see {@link partition}
4020 * @see {@link skip}
4021 *
4022 * @param {function(value: T, index: number): boolean} predicate A function that
4023 * evaluates each value emitted by the source Observable. If it returns `true`,
4024 * the value is emitted, if `false` the value is not passed to the output
4025 * Observable. The `index` parameter is the number `i` for the i-th source
4026 * emission that has happened since the subscription, starting from the number
4027 * `0`.
4028 * @param {any} [thisArg] An optional argument to determine the value of `this`
4029 * in the `predicate` function.
4030 * @return {Observable} An Observable of values from the source that were
4031 * allowed by the `predicate` function.
4032 * @method filter
4033 * @owner Observable
4034 */
4035 function filter(predicate, thisArg) {
4036 return this.lift(new FilterOperator(predicate, thisArg));
4037 }
4038 exports.filter = filter;
4039 var FilterOperator = (function () {
4040 function FilterOperator(predicate, thisArg) {
4041 this.predicate = predicate;
4042 this.thisArg = thisArg;
4043 }
4044 FilterOperator.prototype.call = function (subscriber, source) {
4045 return source._subscribe(new FilterSubscriber(subscriber, this.predicate, this.thisArg));
4046 };
4047 return FilterOperator;
4048 }());
4049 /**
4050 * We need this JSDoc comment for affecting ESDoc.
4051 * @ignore
4052 * @extends {Ignored}
4053 */
4054 var FilterSubscriber = (function (_super) {
4055 __extends(FilterSubscriber, _super);
4056 function FilterSubscriber(destination, predicate, thisArg) {
4057 _super.call(this, destination);
4058 this.predicate = predicate;
4059 this.thisArg = thisArg;
4060 this.count = 0;
4061 this.predicate = predicate;
4062 }
4063 // the try catch block below is left specifically for
4064 // optimization and perf reasons. a tryCatcher is not necessary here.
4065 FilterSubscriber.prototype._next = function (value) {
4066 var result;
4067 try {
4068 result = this.predicate.call(this.thisArg, value, this.count++);
4069 }
4070 catch (err) {
4071 this.destination.error(err);
4072 return;
4073 }
4074 if (result) {
4075 this.destination.next(value);
4076 }
4077 };
4078 return FilterSubscriber;
4079 }(Subscriber_1.Subscriber));
4080 //# sourceMappingURL=filter.js.map
4081
4082/***/ },
4083/* 105 */
4084/*!********************!*\
4085 !*** ./src/ast.js ***!
4086 \********************/
4087/***/ function(module, exports, __webpack_require__) {
4088
4089 'use strict';
4090
4091 var _possibleConstructorReturn2 = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 106);
4092
4093 var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
4094
4095 var _inherits2 = __webpack_require__(/*! babel-runtime/helpers/inherits */ 175);
4096
4097 var _inherits3 = _interopRequireDefault(_inherits2);
4098
4099 var _typeof2 = __webpack_require__(/*! babel-runtime/helpers/typeof */ 107);
4100
4101 var _typeof3 = _interopRequireDefault(_typeof2);
4102
4103 var _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 183);
4104
4105 var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
4106
4107 var _Observable = __webpack_require__(/*! rxjs/Observable */ 78);
4108
4109 var _empty = __webpack_require__(/*! rxjs/observable/empty */ 184);
4110
4111 var _publishReplay = __webpack_require__(/*! rxjs/operator/publishReplay */ 185);
4112
4113 var _scan = __webpack_require__(/*! rxjs/operator/scan */ 197);
4114
4115 var _filter = __webpack_require__(/*! rxjs/operator/filter */ 104);
4116
4117 var _map = __webpack_require__(/*! rxjs/operator/map */ 198);
4118
4119 var _snakeCase = __webpack_require__(/*! snake-case */ 199);
4120
4121 var _snakeCase2 = _interopRequireDefault(_snakeCase);
4122
4123 var _checkArgs = __webpack_require__(/*! ./util/check-args */ 205);
4124
4125 var _checkArgs2 = _interopRequireDefault(_checkArgs);
4126
4127 var _validIndexValue = __webpack_require__(/*! ./util/valid-index-value.js */ 207);
4128
4129 var _validIndexValue2 = _interopRequireDefault(_validIndexValue);
4130
4131 var _serialization = __webpack_require__(/*! ./serialization.js */ 208);
4132
4133 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
4134
4135 /**
4136 @this TermBase
4137
4138 Validation check to throw an exception if a method is chained onto a
4139 query that already has it. It belongs to TermBase, but we don't want
4140 to pollute the objects with it (since it isn't useful to api users),
4141 so it's dynamically bound with :: inside methods that use it.
4142 */
4143 function checkIfLegalToChain(key) {
4144 if (this._legalMethods.indexOf(key) === -1) {
4145 throw new Error(key + ' cannot be called on the current query');
4146 }
4147 if ((0, _snakeCase2.default)(key) in this._query) {
4148 throw new Error(key + ' has already been called on this query');
4149 }
4150 }
4151
4152 // Abstract base class for terms
4153
4154 var TermBase = function () {
4155 function TermBase(sendRequest, query, legalMethods) {
4156 (0, _classCallCheck3.default)(this, TermBase);
4157
4158 this._sendRequest = sendRequest;
4159 this._query = query;
4160 this._legalMethods = legalMethods;
4161 }
4162 // Returns a sequence of the result set. Every time it changes the
4163 // updated sequence will be emitted. If raw change objects are
4164 // needed, pass the option 'rawChanges: true'. An observable is
4165 // returned which will lazily emit the query when it is subscribed
4166 // to
4167
4168
4169 TermBase.prototype.watch = function watch() {
4170 var _ref = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
4171
4172 var _ref$rawChanges = _ref.rawChanges;
4173 var rawChanges = _ref$rawChanges === undefined ? false : _ref$rawChanges;
4174
4175 var raw = this._sendRequest('subscribe', this._query);
4176 if (rawChanges) {
4177 return raw;
4178 } else {
4179 return makePresentable(raw, this._query);
4180 }
4181 };
4182 // Grab a snapshot of the current query (non-changefeed). Emits an
4183 // array with all results. An observable is returned which will
4184 // lazily emit the query when subscribed to
4185
4186
4187 TermBase.prototype.fetch = function fetch() {
4188 return this._sendRequest('query', this._query);
4189 };
4190
4191 TermBase.prototype.findAll = function findAll() {
4192 for (var _len = arguments.length, fieldValues = Array(_len), _key = 0; _key < _len; _key++) {
4193 fieldValues[_key] = arguments[_key];
4194 }
4195
4196 checkIfLegalToChain.call(this, 'findAll');
4197 (0, _checkArgs2.default)('findAll', arguments, { maxArgs: 100 });
4198 return new FindAll(this._sendRequest, this._query, fieldValues);
4199 };
4200
4201 TermBase.prototype.find = function find(idOrObject) {
4202 checkIfLegalToChain.call(this, 'find');
4203 (0, _checkArgs2.default)('find', arguments);
4204 return new Find(this._sendRequest, this._query, idOrObject);
4205 };
4206
4207 TermBase.prototype.order = function order(fields) {
4208 var direction = arguments.length <= 1 || arguments[1] === undefined ? 'ascending' : arguments[1];
4209
4210 checkIfLegalToChain.call(this, 'order');
4211 (0, _checkArgs2.default)('order', arguments, { minArgs: 1, maxArgs: 2 });
4212 return new Order(this._sendRequest, this._query, fields, direction);
4213 };
4214
4215 TermBase.prototype.above = function above(aboveSpec) {
4216 var bound = arguments.length <= 1 || arguments[1] === undefined ? 'closed' : arguments[1];
4217
4218 checkIfLegalToChain.call(this, 'above');
4219 (0, _checkArgs2.default)('above', arguments, { minArgs: 1, maxArgs: 2 });
4220 return new Above(this._sendRequest, this._query, aboveSpec, bound);
4221 };
4222
4223 TermBase.prototype.below = function below(belowSpec) {
4224 var bound = arguments.length <= 1 || arguments[1] === undefined ? 'open' : arguments[1];
4225
4226 checkIfLegalToChain.call(this, 'below');
4227 (0, _checkArgs2.default)('below', arguments, { minArgs: 1, maxArgs: 2 });
4228 return new Below(this._sendRequest, this._query, belowSpec, bound);
4229 };
4230
4231 TermBase.prototype.limit = function limit(size) {
4232 checkIfLegalToChain.call(this, 'limit');
4233 (0, _checkArgs2.default)('limit', arguments);
4234 return new Limit(this._sendRequest, this._query, size);
4235 };
4236
4237 return TermBase;
4238 }();
4239
4240 // Turn a raw observable of server responses into user-presentable events
4241 //
4242 // `observable` is the base observable with full responses coming from
4243 // the HorizonSocket
4244 // `query` is the value of `options` in the request
4245
4246
4247 function makePresentable(observable, query) {
4248 // Whether the entire data structure is in each change
4249 var pointQuery = Boolean(query.find);
4250
4251 if (pointQuery) {
4252 var _ret = function () {
4253 var _context;
4254
4255 var hasEmitted = false;
4256 var seedVal = null;
4257 // Simplest case: just pass through new_val
4258 return {
4259 v: (_context = _filter.filter.call(observable, function (change) {
4260 return !hasEmitted || change.type !== 'state';
4261 }), _scan.scan).call(_context, function (previous, change) {
4262 hasEmitted = true;
4263 if (change.state === 'synced') {
4264 return previous;
4265 } else {
4266 return change.new_val;
4267 }
4268 }, seedVal)
4269 };
4270 }();
4271
4272 if ((typeof _ret === 'undefined' ? 'undefined' : (0, _typeof3.default)(_ret)) === "object") return _ret.v;
4273 } else {
4274 var _context2;
4275
4276 var _seedVal = { emitted: false, val: [] };
4277 return (_context2 = (_context2 = _scan.scan.call(observable, function (state, change) {
4278 if (change.state === 'synced') {
4279 state.emitted = true;
4280 }
4281 state.val = applyChange(state.val.slice(), change);
4282 return state;
4283 }, _seedVal), _filter.filter).call(_context2, function (state) {
4284 return state.emitted;
4285 }), _map.map).call(_context2, function (x) {
4286 return x.val;
4287 });
4288 }
4289 }
4290
4291 function applyChange(arr, change) {
4292 switch (change.type) {
4293 case 'remove':
4294 case 'uninitial':
4295 {
4296 // Remove old values from the array
4297 if (change.old_offset != null) {
4298 arr.splice(change.old_offset, 1);
4299 } else {
4300 var index = arr.findIndex(function (x) {
4301 return x.id === change.old_val.id;
4302 });
4303 arr.splice(index, 1);
4304 }
4305 break;
4306 }
4307 case 'add':
4308 case 'initial':
4309 {
4310 // Add new values to the array
4311 if (change.new_offset != null) {
4312 // If we have an offset, put it in the correct location
4313 arr.splice(change.new_offset, 0, change.new_val);
4314 } else {
4315 // otherwise for unordered results, push it on the end
4316 arr.push(change.new_val);
4317 }
4318 break;
4319 }
4320 case 'change':
4321 {
4322 // Modify in place if a change is happening
4323 if (change.old_offset != null) {
4324 // Remove the old document from the results
4325 arr.splice(change.old_offset, 1);
4326 }
4327 if (change.new_offset != null) {
4328 // Splice in the new val if we have an offset
4329 arr.splice(change.new_offset, 0, change.new_val);
4330 } else {
4331 // If we don't have an offset, find the old val and
4332 // replace it with the new val
4333 var _index = arr.findIndex(function (x) {
4334 return x.id === change.old_val.id;
4335 });
4336 arr[_index] = change.new_val;
4337 }
4338 break;
4339 }
4340 case 'state':
4341 {
4342 // This gets hit if we have not emitted yet, and should
4343 // result in an empty array being output.
4344 break;
4345 }
4346 default:
4347 throw new Error('unrecognized \'type\' field from server ' + JSON.stringify(change));
4348 }
4349 return arr;
4350 }
4351
4352 /** @this Collection
4353 Implements writeOps for the Collection class
4354 */
4355 function writeOp(name, args, documents) {
4356 (0, _checkArgs2.default)(name, args);
4357 var wrappedDocs = documents;
4358 if (!Array.isArray(documents)) {
4359 // Wrap in an array if we need to
4360 wrappedDocs = [documents];
4361 } else if (documents.length === 0) {
4362 // Don't bother sending no-ops to the server
4363 return _empty.empty.call(_Observable.Observable);
4364 }
4365 var options = Object.assign({}, this._query, { data: (0, _serialization.serialize)(wrappedDocs) });
4366 var observable = this._sendRequest(name, options);
4367 if (!this._lazyWrites) {
4368 var _context3;
4369
4370 // Need to buffer response since this becomes a hot observable and
4371 // when we subscribe matters
4372 observable = (_context3 = observable, _publishReplay.publishReplay).call(_context3).refCount();
4373 observable.subscribe();
4374 }
4375 return observable;
4376 }
4377
4378 var Collection = function (_TermBase) {
4379 (0, _inherits3.default)(Collection, _TermBase);
4380
4381 function Collection(sendRequest, collectionName, lazyWrites) {
4382 (0, _classCallCheck3.default)(this, Collection);
4383
4384 var query = { collection: collectionName };
4385 var legalMethods = ['find', 'findAll', 'justInitial', 'order', 'above', 'below', 'limit'];
4386
4387 var _this = (0, _possibleConstructorReturn3.default)(this, _TermBase.call(this, sendRequest, query, legalMethods));
4388
4389 _this._lazyWrites = lazyWrites;
4390 return _this;
4391 }
4392
4393 Collection.prototype.store = function store(documents) {
4394 return writeOp.call(this, 'store', arguments, documents);
4395 };
4396
4397 Collection.prototype.upsert = function upsert(documents) {
4398 return writeOp.call(this, 'upsert', arguments, documents);
4399 };
4400
4401 Collection.prototype.insert = function insert(documents) {
4402 return writeOp.call(this, 'insert', arguments, documents);
4403 };
4404
4405 Collection.prototype.replace = function replace(documents) {
4406 return writeOp.call(this, 'replace', arguments, documents);
4407 };
4408
4409 Collection.prototype.update = function update(documents) {
4410 return writeOp.call(this, 'update', arguments, documents);
4411 };
4412
4413 Collection.prototype.remove = function remove(documentOrId) {
4414 var wrapped = (0, _validIndexValue2.default)(documentOrId) ? { id: documentOrId } : documentOrId;
4415 return writeOp.call(this, 'remove', arguments, wrapped);
4416 };
4417
4418 Collection.prototype.removeAll = function removeAll(documentsOrIds) {
4419 if (!Array.isArray(documentsOrIds)) {
4420 throw new Error('removeAll takes an array as an argument');
4421 }
4422 var wrapped = documentsOrIds.map(function (item) {
4423 if ((0, _validIndexValue2.default)(item)) {
4424 return { id: item };
4425 } else {
4426 return item;
4427 }
4428 });
4429 return writeOp.call(this, 'removeAll', arguments, wrapped);
4430 };
4431
4432 return Collection;
4433 }(TermBase);
4434
4435 var Find = function (_TermBase2) {
4436 (0, _inherits3.default)(Find, _TermBase2);
4437
4438 function Find(sendRequest, previousQuery, idOrObject) {
4439 (0, _classCallCheck3.default)(this, Find);
4440
4441 var findObject = (0, _validIndexValue2.default)(idOrObject) ? { id: idOrObject } : idOrObject;
4442 var query = Object.assign({}, previousQuery, { find: findObject });
4443 return (0, _possibleConstructorReturn3.default)(this, _TermBase2.call(this, sendRequest, query, []));
4444 }
4445
4446 return Find;
4447 }(TermBase);
4448
4449 var FindAll = function (_TermBase3) {
4450 (0, _inherits3.default)(FindAll, _TermBase3);
4451
4452 function FindAll(sendRequest, previousQuery, fieldValues) {
4453 (0, _classCallCheck3.default)(this, FindAll);
4454
4455 var wrappedFields = fieldValues.map(function (item) {
4456 return (0, _validIndexValue2.default)(item) ? { id: item } : item;
4457 });
4458 var options = { find_all: wrappedFields };
4459 var findAllQuery = Object.assign({}, previousQuery, options);
4460 var legalMethods = void 0;
4461 if (wrappedFields.length === 1) {
4462 legalMethods = ['order', 'above', 'below', 'limit'];
4463 } else {
4464 // The vararg version of findAll cannot have anything chained to it
4465 legalMethods = [];
4466 }
4467 return (0, _possibleConstructorReturn3.default)(this, _TermBase3.call(this, sendRequest, findAllQuery, legalMethods));
4468 }
4469
4470 return FindAll;
4471 }(TermBase);
4472
4473 var Above = function (_TermBase4) {
4474 (0, _inherits3.default)(Above, _TermBase4);
4475
4476 function Above(sendRequest, previousQuery, aboveSpec, bound) {
4477 (0, _classCallCheck3.default)(this, Above);
4478
4479 var option = { above: [aboveSpec, bound] };
4480 var query = Object.assign({}, previousQuery, option);
4481 var legalMethods = ['findAll', 'order', 'below', 'limit'];
4482 return (0, _possibleConstructorReturn3.default)(this, _TermBase4.call(this, sendRequest, query, legalMethods));
4483 }
4484
4485 return Above;
4486 }(TermBase);
4487
4488 var Below = function (_TermBase5) {
4489 (0, _inherits3.default)(Below, _TermBase5);
4490
4491 function Below(sendRequest, previousQuery, belowSpec, bound) {
4492 (0, _classCallCheck3.default)(this, Below);
4493
4494 var options = { below: [belowSpec, bound] };
4495 var query = Object.assign({}, previousQuery, options);
4496 var legalMethods = ['findAll', 'order', 'above', 'limit'];
4497 return (0, _possibleConstructorReturn3.default)(this, _TermBase5.call(this, sendRequest, query, legalMethods));
4498 }
4499
4500 return Below;
4501 }(TermBase);
4502
4503 var Order = function (_TermBase6) {
4504 (0, _inherits3.default)(Order, _TermBase6);
4505
4506 function Order(sendRequest, previousQuery, fields, direction) {
4507 (0, _classCallCheck3.default)(this, Order);
4508
4509 var wrappedFields = Array.isArray(fields) ? fields : [fields];
4510 var options = { order: [wrappedFields, direction] };
4511 var query = Object.assign({}, previousQuery, options);
4512 var legalMethods = ['findAll', 'above', 'below', 'limit'];
4513 return (0, _possibleConstructorReturn3.default)(this, _TermBase6.call(this, sendRequest, query, legalMethods));
4514 }
4515
4516 return Order;
4517 }(TermBase);
4518
4519 var Limit = function (_TermBase7) {
4520 (0, _inherits3.default)(Limit, _TermBase7);
4521
4522 function Limit(sendRequest, previousQuery, size) {
4523 (0, _classCallCheck3.default)(this, Limit);
4524
4525 var query = Object.assign({}, previousQuery, { limit: size });
4526 // Nothing is legal to chain after .limit
4527 return (0, _possibleConstructorReturn3.default)(this, _TermBase7.call(this, sendRequest, query, []));
4528 }
4529
4530 return Limit;
4531 }(TermBase);
4532
4533 module.exports = {
4534 TermBase: TermBase,
4535 Collection: Collection,
4536 FindAll: FindAll,
4537 Find: Find,
4538 Above: Above,
4539 Below: Below,
4540 Order: Order,
4541 Limit: Limit
4542 };
4543
4544/***/ },
4545/* 106 */
4546/*!**************************************************************!*\
4547 !*** ./~/babel-runtime/helpers/possibleConstructorReturn.js ***!
4548 \**************************************************************/
4549/***/ function(module, exports, __webpack_require__) {
4550
4551 "use strict";
4552
4553 exports.__esModule = true;
4554
4555 var _typeof2 = __webpack_require__(/*! babel-runtime/helpers/typeof */ 107);
4556
4557 var _typeof3 = _interopRequireDefault(_typeof2);
4558
4559 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
4560
4561 exports.default = function (self, call) {
4562 if (!self) {
4563 throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
4564 }
4565
4566 return call && ((typeof call === "undefined" ? "undefined" : (0, _typeof3.default)(call)) === "object" || typeof call === "function") ? call : self;
4567 };
4568
4569/***/ },
4570/* 107 */
4571/*!*******************************************!*\
4572 !*** ./~/babel-runtime/helpers/typeof.js ***!
4573 \*******************************************/
4574/***/ function(module, exports, __webpack_require__) {
4575
4576 "use strict";
4577
4578 exports.__esModule = true;
4579
4580 var _iterator = __webpack_require__(/*! babel-runtime/core-js/symbol/iterator */ 108);
4581
4582 var _iterator2 = _interopRequireDefault(_iterator);
4583
4584 var _symbol = __webpack_require__(/*! babel-runtime/core-js/symbol */ 159);
4585
4586 var _symbol2 = _interopRequireDefault(_symbol);
4587
4588 var _typeof = typeof _symbol2.default === "function" && typeof _iterator2.default === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default ? "symbol" : typeof obj; };
4589
4590 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
4591
4592 exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) {
4593 return typeof obj === "undefined" ? "undefined" : _typeof(obj);
4594 } : function (obj) {
4595 return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj);
4596 };
4597
4598/***/ },
4599/* 108 */
4600/*!****************************************************!*\
4601 !*** ./~/babel-runtime/core-js/symbol/iterator.js ***!
4602 \****************************************************/
4603/***/ function(module, exports, __webpack_require__) {
4604
4605 module.exports = { "default": __webpack_require__(/*! core-js/library/fn/symbol/iterator */ 109), __esModule: true };
4606
4607/***/ },
4608/* 109 */
4609/*!*************************************************!*\
4610 !*** ./~/core-js/library/fn/symbol/iterator.js ***!
4611 \*************************************************/
4612/***/ function(module, exports, __webpack_require__) {
4613
4614 __webpack_require__(/*! ../../modules/es6.string.iterator */ 110);
4615 __webpack_require__(/*! ../../modules/web.dom.iterable */ 154);
4616 module.exports = __webpack_require__(/*! ../../modules/_wks-ext */ 158).f('iterator');
4617
4618/***/ },
4619/* 110 */
4620/*!**********************************************************!*\
4621 !*** ./~/core-js/library/modules/es6.string.iterator.js ***!
4622 \**********************************************************/
4623/***/ function(module, exports, __webpack_require__) {
4624
4625 'use strict';
4626 var $at = __webpack_require__(/*! ./_string-at */ 111)(true);
4627
4628 // 21.1.3.27 String.prototype[@@iterator]()
4629 __webpack_require__(/*! ./_iter-define */ 114)(String, 'String', function(iterated){
4630 this._t = String(iterated); // target
4631 this._i = 0; // next index
4632 // 21.1.5.2.1 %StringIteratorPrototype%.next()
4633 }, function(){
4634 var O = this._t
4635 , index = this._i
4636 , point;
4637 if(index >= O.length)return {value: undefined, done: true};
4638 point = $at(O, index);
4639 this._i += point.length;
4640 return {value: point, done: false};
4641 });
4642
4643/***/ },
4644/* 111 */
4645/*!*************************************************!*\
4646 !*** ./~/core-js/library/modules/_string-at.js ***!
4647 \*************************************************/
4648/***/ function(module, exports, __webpack_require__) {
4649
4650 var toInteger = __webpack_require__(/*! ./_to-integer */ 112)
4651 , defined = __webpack_require__(/*! ./_defined */ 113);
4652 // true -> String#at
4653 // false -> String#codePointAt
4654 module.exports = function(TO_STRING){
4655 return function(that, pos){
4656 var s = String(defined(that))
4657 , i = toInteger(pos)
4658 , l = s.length
4659 , a, b;
4660 if(i < 0 || i >= l)return TO_STRING ? '' : undefined;
4661 a = s.charCodeAt(i);
4662 return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
4663 ? TO_STRING ? s.charAt(i) : a
4664 : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
4665 };
4666 };
4667
4668/***/ },
4669/* 112 */
4670/*!**************************************************!*\
4671 !*** ./~/core-js/library/modules/_to-integer.js ***!
4672 \**************************************************/
4673/***/ function(module, exports) {
4674
4675 // 7.1.4 ToInteger
4676 var ceil = Math.ceil
4677 , floor = Math.floor;
4678 module.exports = function(it){
4679 return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
4680 };
4681
4682/***/ },
4683/* 113 */
4684/*!***********************************************!*\
4685 !*** ./~/core-js/library/modules/_defined.js ***!
4686 \***********************************************/
4687/***/ function(module, exports) {
4688
4689 // 7.2.1 RequireObjectCoercible(argument)
4690 module.exports = function(it){
4691 if(it == undefined)throw TypeError("Can't call method on " + it);
4692 return it;
4693 };
4694
4695/***/ },
4696/* 114 */
4697/*!***************************************************!*\
4698 !*** ./~/core-js/library/modules/_iter-define.js ***!
4699 \***************************************************/
4700/***/ function(module, exports, __webpack_require__) {
4701
4702 'use strict';
4703 var LIBRARY = __webpack_require__(/*! ./_library */ 115)
4704 , $export = __webpack_require__(/*! ./_export */ 116)
4705 , redefine = __webpack_require__(/*! ./_redefine */ 131)
4706 , hide = __webpack_require__(/*! ./_hide */ 121)
4707 , has = __webpack_require__(/*! ./_has */ 132)
4708 , Iterators = __webpack_require__(/*! ./_iterators */ 133)
4709 , $iterCreate = __webpack_require__(/*! ./_iter-create */ 134)
4710 , setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ 150)
4711 , getPrototypeOf = __webpack_require__(/*! ./_object-gpo */ 152)
4712 , ITERATOR = __webpack_require__(/*! ./_wks */ 151)('iterator')
4713 , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next`
4714 , FF_ITERATOR = '@@iterator'
4715 , KEYS = 'keys'
4716 , VALUES = 'values';
4717
4718 var returnThis = function(){ return this; };
4719
4720 module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){
4721 $iterCreate(Constructor, NAME, next);
4722 var getMethod = function(kind){
4723 if(!BUGGY && kind in proto)return proto[kind];
4724 switch(kind){
4725 case KEYS: return function keys(){ return new Constructor(this, kind); };
4726 case VALUES: return function values(){ return new Constructor(this, kind); };
4727 } return function entries(){ return new Constructor(this, kind); };
4728 };
4729 var TAG = NAME + ' Iterator'
4730 , DEF_VALUES = DEFAULT == VALUES
4731 , VALUES_BUG = false
4732 , proto = Base.prototype
4733 , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]
4734 , $default = $native || getMethod(DEFAULT)
4735 , $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined
4736 , $anyNative = NAME == 'Array' ? proto.entries || $native : $native
4737 , methods, key, IteratorPrototype;
4738 // Fix native
4739 if($anyNative){
4740 IteratorPrototype = getPrototypeOf($anyNative.call(new Base));
4741 if(IteratorPrototype !== Object.prototype){
4742 // Set @@toStringTag to native iterators
4743 setToStringTag(IteratorPrototype, TAG, true);
4744 // fix for some old engines
4745 if(!LIBRARY && !has(IteratorPrototype, ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis);
4746 }
4747 }
4748 // fix Array#{values, @@iterator}.name in V8 / FF
4749 if(DEF_VALUES && $native && $native.name !== VALUES){
4750 VALUES_BUG = true;
4751 $default = function values(){ return $native.call(this); };
4752 }
4753 // Define iterator
4754 if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){
4755 hide(proto, ITERATOR, $default);
4756 }
4757 // Plug for library
4758 Iterators[NAME] = $default;
4759 Iterators[TAG] = returnThis;
4760 if(DEFAULT){
4761 methods = {
4762 values: DEF_VALUES ? $default : getMethod(VALUES),
4763 keys: IS_SET ? $default : getMethod(KEYS),
4764 entries: $entries
4765 };
4766 if(FORCED)for(key in methods){
4767 if(!(key in proto))redefine(proto, key, methods[key]);
4768 } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
4769 }
4770 return methods;
4771 };
4772
4773/***/ },
4774/* 115 */
4775/*!***********************************************!*\
4776 !*** ./~/core-js/library/modules/_library.js ***!
4777 \***********************************************/
4778/***/ function(module, exports) {
4779
4780 module.exports = true;
4781
4782/***/ },
4783/* 116 */
4784/*!**********************************************!*\
4785 !*** ./~/core-js/library/modules/_export.js ***!
4786 \**********************************************/
4787/***/ function(module, exports, __webpack_require__) {
4788
4789 var global = __webpack_require__(/*! ./_global */ 117)
4790 , core = __webpack_require__(/*! ./_core */ 118)
4791 , ctx = __webpack_require__(/*! ./_ctx */ 119)
4792 , hide = __webpack_require__(/*! ./_hide */ 121)
4793 , PROTOTYPE = 'prototype';
4794
4795 var $export = function(type, name, source){
4796 var IS_FORCED = type & $export.F
4797 , IS_GLOBAL = type & $export.G
4798 , IS_STATIC = type & $export.S
4799 , IS_PROTO = type & $export.P
4800 , IS_BIND = type & $export.B
4801 , IS_WRAP = type & $export.W
4802 , exports = IS_GLOBAL ? core : core[name] || (core[name] = {})
4803 , expProto = exports[PROTOTYPE]
4804 , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]
4805 , key, own, out;
4806 if(IS_GLOBAL)source = name;
4807 for(key in source){
4808 // contains in native
4809 own = !IS_FORCED && target && target[key] !== undefined;
4810 if(own && key in exports)continue;
4811 // export native or passed
4812 out = own ? target[key] : source[key];
4813 // prevent global pollution for namespaces
4814 exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
4815 // bind timers to global for call from export context
4816 : IS_BIND && own ? ctx(out, global)
4817 // wrap global constructors for prevent change them in library
4818 : IS_WRAP && target[key] == out ? (function(C){
4819 var F = function(a, b, c){
4820 if(this instanceof C){
4821 switch(arguments.length){
4822 case 0: return new C;
4823 case 1: return new C(a);
4824 case 2: return new C(a, b);
4825 } return new C(a, b, c);
4826 } return C.apply(this, arguments);
4827 };
4828 F[PROTOTYPE] = C[PROTOTYPE];
4829 return F;
4830 // make static versions for prototype methods
4831 })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
4832 // export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
4833 if(IS_PROTO){
4834 (exports.virtual || (exports.virtual = {}))[key] = out;
4835 // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
4836 if(type & $export.R && expProto && !expProto[key])hide(expProto, key, out);
4837 }
4838 }
4839 };
4840 // type bitmap
4841 $export.F = 1; // forced
4842 $export.G = 2; // global
4843 $export.S = 4; // static
4844 $export.P = 8; // proto
4845 $export.B = 16; // bind
4846 $export.W = 32; // wrap
4847 $export.U = 64; // safe
4848 $export.R = 128; // real proto method for `library`
4849 module.exports = $export;
4850
4851/***/ },
4852/* 117 */
4853/*!**********************************************!*\
4854 !*** ./~/core-js/library/modules/_global.js ***!
4855 \**********************************************/
4856/***/ function(module, exports) {
4857
4858 // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
4859 var global = module.exports = typeof window != 'undefined' && window.Math == Math
4860 ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();
4861 if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef
4862
4863/***/ },
4864/* 118 */
4865/*!********************************************!*\
4866 !*** ./~/core-js/library/modules/_core.js ***!
4867 \********************************************/
4868/***/ function(module, exports) {
4869
4870 var core = module.exports = {version: '2.3.0'};
4871 if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef
4872
4873/***/ },
4874/* 119 */
4875/*!*******************************************!*\
4876 !*** ./~/core-js/library/modules/_ctx.js ***!
4877 \*******************************************/
4878/***/ function(module, exports, __webpack_require__) {
4879
4880 // optional / simple context binding
4881 var aFunction = __webpack_require__(/*! ./_a-function */ 120);
4882 module.exports = function(fn, that, length){
4883 aFunction(fn);
4884 if(that === undefined)return fn;
4885 switch(length){
4886 case 1: return function(a){
4887 return fn.call(that, a);
4888 };
4889 case 2: return function(a, b){
4890 return fn.call(that, a, b);
4891 };
4892 case 3: return function(a, b, c){
4893 return fn.call(that, a, b, c);
4894 };
4895 }
4896 return function(/* ...args */){
4897 return fn.apply(that, arguments);
4898 };
4899 };
4900
4901/***/ },
4902/* 120 */
4903/*!**************************************************!*\
4904 !*** ./~/core-js/library/modules/_a-function.js ***!
4905 \**************************************************/
4906/***/ function(module, exports) {
4907
4908 module.exports = function(it){
4909 if(typeof it != 'function')throw TypeError(it + ' is not a function!');
4910 return it;
4911 };
4912
4913/***/ },
4914/* 121 */
4915/*!********************************************!*\
4916 !*** ./~/core-js/library/modules/_hide.js ***!
4917 \********************************************/
4918/***/ function(module, exports, __webpack_require__) {
4919
4920 var dP = __webpack_require__(/*! ./_object-dp */ 122)
4921 , createDesc = __webpack_require__(/*! ./_property-desc */ 130);
4922 module.exports = __webpack_require__(/*! ./_descriptors */ 126) ? function(object, key, value){
4923 return dP.f(object, key, createDesc(1, value));
4924 } : function(object, key, value){
4925 object[key] = value;
4926 return object;
4927 };
4928
4929/***/ },
4930/* 122 */
4931/*!*************************************************!*\
4932 !*** ./~/core-js/library/modules/_object-dp.js ***!
4933 \*************************************************/
4934/***/ function(module, exports, __webpack_require__) {
4935
4936 var anObject = __webpack_require__(/*! ./_an-object */ 123)
4937 , IE8_DOM_DEFINE = __webpack_require__(/*! ./_ie8-dom-define */ 125)
4938 , toPrimitive = __webpack_require__(/*! ./_to-primitive */ 129)
4939 , dP = Object.defineProperty;
4940
4941 exports.f = __webpack_require__(/*! ./_descriptors */ 126) ? Object.defineProperty : function defineProperty(O, P, Attributes){
4942 anObject(O);
4943 P = toPrimitive(P, true);
4944 anObject(Attributes);
4945 if(IE8_DOM_DEFINE)try {
4946 return dP(O, P, Attributes);
4947 } catch(e){ /* empty */ }
4948 if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!');
4949 if('value' in Attributes)O[P] = Attributes.value;
4950 return O;
4951 };
4952
4953/***/ },
4954/* 123 */
4955/*!*************************************************!*\
4956 !*** ./~/core-js/library/modules/_an-object.js ***!
4957 \*************************************************/
4958/***/ function(module, exports, __webpack_require__) {
4959
4960 var isObject = __webpack_require__(/*! ./_is-object */ 124);
4961 module.exports = function(it){
4962 if(!isObject(it))throw TypeError(it + ' is not an object!');
4963 return it;
4964 };
4965
4966/***/ },
4967/* 124 */
4968/*!*************************************************!*\
4969 !*** ./~/core-js/library/modules/_is-object.js ***!
4970 \*************************************************/
4971/***/ function(module, exports) {
4972
4973 module.exports = function(it){
4974 return typeof it === 'object' ? it !== null : typeof it === 'function';
4975 };
4976
4977/***/ },
4978/* 125 */
4979/*!******************************************************!*\
4980 !*** ./~/core-js/library/modules/_ie8-dom-define.js ***!
4981 \******************************************************/
4982/***/ function(module, exports, __webpack_require__) {
4983
4984 module.exports = !__webpack_require__(/*! ./_descriptors */ 126) && !__webpack_require__(/*! ./_fails */ 127)(function(){
4985 return Object.defineProperty(__webpack_require__(/*! ./_dom-create */ 128)('div'), 'a', {get: function(){ return 7; }}).a != 7;
4986 });
4987
4988/***/ },
4989/* 126 */
4990/*!***************************************************!*\
4991 !*** ./~/core-js/library/modules/_descriptors.js ***!
4992 \***************************************************/
4993/***/ function(module, exports, __webpack_require__) {
4994
4995 // Thank's IE8 for his funny defineProperty
4996 module.exports = !__webpack_require__(/*! ./_fails */ 127)(function(){
4997 return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;
4998 });
4999
5000/***/ },
5001/* 127 */
5002/*!*********************************************!*\
5003 !*** ./~/core-js/library/modules/_fails.js ***!
5004 \*********************************************/
5005/***/ function(module, exports) {
5006
5007 module.exports = function(exec){
5008 try {
5009 return !!exec();
5010 } catch(e){
5011 return true;
5012 }
5013 };
5014
5015/***/ },
5016/* 128 */
5017/*!**************************************************!*\
5018 !*** ./~/core-js/library/modules/_dom-create.js ***!
5019 \**************************************************/
5020/***/ function(module, exports, __webpack_require__) {
5021
5022 var isObject = __webpack_require__(/*! ./_is-object */ 124)
5023 , document = __webpack_require__(/*! ./_global */ 117).document
5024 // in old IE typeof document.createElement is 'object'
5025 , is = isObject(document) && isObject(document.createElement);
5026 module.exports = function(it){
5027 return is ? document.createElement(it) : {};
5028 };
5029
5030/***/ },
5031/* 129 */
5032/*!****************************************************!*\
5033 !*** ./~/core-js/library/modules/_to-primitive.js ***!
5034 \****************************************************/
5035/***/ function(module, exports, __webpack_require__) {
5036
5037 // 7.1.1 ToPrimitive(input [, PreferredType])
5038 var isObject = __webpack_require__(/*! ./_is-object */ 124);
5039 // instead of the ES6 spec version, we didn't implement @@toPrimitive case
5040 // and the second argument - flag - preferred type is a string
5041 module.exports = function(it, S){
5042 if(!isObject(it))return it;
5043 var fn, val;
5044 if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
5045 if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val;
5046 if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
5047 throw TypeError("Can't convert object to primitive value");
5048 };
5049
5050/***/ },
5051/* 130 */
5052/*!*****************************************************!*\
5053 !*** ./~/core-js/library/modules/_property-desc.js ***!
5054 \*****************************************************/
5055/***/ function(module, exports) {
5056
5057 module.exports = function(bitmap, value){
5058 return {
5059 enumerable : !(bitmap & 1),
5060 configurable: !(bitmap & 2),
5061 writable : !(bitmap & 4),
5062 value : value
5063 };
5064 };
5065
5066/***/ },
5067/* 131 */
5068/*!************************************************!*\
5069 !*** ./~/core-js/library/modules/_redefine.js ***!
5070 \************************************************/
5071/***/ function(module, exports, __webpack_require__) {
5072
5073 module.exports = __webpack_require__(/*! ./_hide */ 121);
5074
5075/***/ },
5076/* 132 */
5077/*!*******************************************!*\
5078 !*** ./~/core-js/library/modules/_has.js ***!
5079 \*******************************************/
5080/***/ function(module, exports) {
5081
5082 var hasOwnProperty = {}.hasOwnProperty;
5083 module.exports = function(it, key){
5084 return hasOwnProperty.call(it, key);
5085 };
5086
5087/***/ },
5088/* 133 */
5089/*!*************************************************!*\
5090 !*** ./~/core-js/library/modules/_iterators.js ***!
5091 \*************************************************/
5092/***/ function(module, exports) {
5093
5094 module.exports = {};
5095
5096/***/ },
5097/* 134 */
5098/*!***************************************************!*\
5099 !*** ./~/core-js/library/modules/_iter-create.js ***!
5100 \***************************************************/
5101/***/ function(module, exports, __webpack_require__) {
5102
5103 'use strict';
5104 var create = __webpack_require__(/*! ./_object-create */ 135)
5105 , descriptor = __webpack_require__(/*! ./_property-desc */ 130)
5106 , setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ 150)
5107 , IteratorPrototype = {};
5108
5109 // 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
5110 __webpack_require__(/*! ./_hide */ 121)(IteratorPrototype, __webpack_require__(/*! ./_wks */ 151)('iterator'), function(){ return this; });
5111
5112 module.exports = function(Constructor, NAME, next){
5113 Constructor.prototype = create(IteratorPrototype, {next: descriptor(1, next)});
5114 setToStringTag(Constructor, NAME + ' Iterator');
5115 };
5116
5117/***/ },
5118/* 135 */
5119/*!*****************************************************!*\
5120 !*** ./~/core-js/library/modules/_object-create.js ***!
5121 \*****************************************************/
5122/***/ function(module, exports, __webpack_require__) {
5123
5124 // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
5125 var anObject = __webpack_require__(/*! ./_an-object */ 123)
5126 , dPs = __webpack_require__(/*! ./_object-dps */ 136)
5127 , enumBugKeys = __webpack_require__(/*! ./_enum-bug-keys */ 148)
5128 , IE_PROTO = __webpack_require__(/*! ./_shared-key */ 145)('IE_PROTO')
5129 , Empty = function(){ /* empty */ }
5130 , PROTOTYPE = 'prototype';
5131
5132 // Create object with fake `null` prototype: use iframe Object with cleared prototype
5133 var createDict = function(){
5134 // Thrash, waste and sodomy: IE GC bug
5135 var iframe = __webpack_require__(/*! ./_dom-create */ 128)('iframe')
5136 , i = enumBugKeys.length
5137 , gt = '>'
5138 , iframeDocument;
5139 iframe.style.display = 'none';
5140 __webpack_require__(/*! ./_html */ 149).appendChild(iframe);
5141 iframe.src = 'javascript:'; // eslint-disable-line no-script-url
5142 // createDict = iframe.contentWindow.Object;
5143 // html.removeChild(iframe);
5144 iframeDocument = iframe.contentWindow.document;
5145 iframeDocument.open();
5146 iframeDocument.write('<script>document.F=Object</script' + gt);
5147 iframeDocument.close();
5148 createDict = iframeDocument.F;
5149 while(i--)delete createDict[PROTOTYPE][enumBugKeys[i]];
5150 return createDict();
5151 };
5152
5153 module.exports = Object.create || function create(O, Properties){
5154 var result;
5155 if(O !== null){
5156 Empty[PROTOTYPE] = anObject(O);
5157 result = new Empty;
5158 Empty[PROTOTYPE] = null;
5159 // add "__proto__" for Object.getPrototypeOf polyfill
5160 result[IE_PROTO] = O;
5161 } else result = createDict();
5162 return Properties === undefined ? result : dPs(result, Properties);
5163 };
5164
5165/***/ },
5166/* 136 */
5167/*!**************************************************!*\
5168 !*** ./~/core-js/library/modules/_object-dps.js ***!
5169 \**************************************************/
5170/***/ function(module, exports, __webpack_require__) {
5171
5172 var dP = __webpack_require__(/*! ./_object-dp */ 122)
5173 , anObject = __webpack_require__(/*! ./_an-object */ 123)
5174 , getKeys = __webpack_require__(/*! ./_object-keys */ 137);
5175
5176 module.exports = __webpack_require__(/*! ./_descriptors */ 126) ? Object.defineProperties : function defineProperties(O, Properties){
5177 anObject(O);
5178 var keys = getKeys(Properties)
5179 , length = keys.length
5180 , i = 0
5181 , P;
5182 while(length > i)dP.f(O, P = keys[i++], Properties[P]);
5183 return O;
5184 };
5185
5186/***/ },
5187/* 137 */
5188/*!***************************************************!*\
5189 !*** ./~/core-js/library/modules/_object-keys.js ***!
5190 \***************************************************/
5191/***/ function(module, exports, __webpack_require__) {
5192
5193 // 19.1.2.14 / 15.2.3.14 Object.keys(O)
5194 var $keys = __webpack_require__(/*! ./_object-keys-internal */ 138)
5195 , enumBugKeys = __webpack_require__(/*! ./_enum-bug-keys */ 148);
5196
5197 module.exports = Object.keys || function keys(O){
5198 return $keys(O, enumBugKeys);
5199 };
5200
5201/***/ },
5202/* 138 */
5203/*!************************************************************!*\
5204 !*** ./~/core-js/library/modules/_object-keys-internal.js ***!
5205 \************************************************************/
5206/***/ function(module, exports, __webpack_require__) {
5207
5208 var has = __webpack_require__(/*! ./_has */ 132)
5209 , toIObject = __webpack_require__(/*! ./_to-iobject */ 139)
5210 , arrayIndexOf = __webpack_require__(/*! ./_array-includes */ 142)(false)
5211 , IE_PROTO = __webpack_require__(/*! ./_shared-key */ 145)('IE_PROTO');
5212
5213 module.exports = function(object, names){
5214 var O = toIObject(object)
5215 , i = 0
5216 , result = []
5217 , key;
5218 for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key);
5219 // Don't enum bug & hidden keys
5220 while(names.length > i)if(has(O, key = names[i++])){
5221 ~arrayIndexOf(result, key) || result.push(key);
5222 }
5223 return result;
5224 };
5225
5226/***/ },
5227/* 139 */
5228/*!**************************************************!*\
5229 !*** ./~/core-js/library/modules/_to-iobject.js ***!
5230 \**************************************************/
5231/***/ function(module, exports, __webpack_require__) {
5232
5233 // to indexed object, toObject with fallback for non-array-like ES3 strings
5234 var IObject = __webpack_require__(/*! ./_iobject */ 140)
5235 , defined = __webpack_require__(/*! ./_defined */ 113);
5236 module.exports = function(it){
5237 return IObject(defined(it));
5238 };
5239
5240/***/ },
5241/* 140 */
5242/*!***********************************************!*\
5243 !*** ./~/core-js/library/modules/_iobject.js ***!
5244 \***********************************************/
5245/***/ function(module, exports, __webpack_require__) {
5246
5247 // fallback for non-array-like ES3 and non-enumerable old V8 strings
5248 var cof = __webpack_require__(/*! ./_cof */ 141);
5249 module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){
5250 return cof(it) == 'String' ? it.split('') : Object(it);
5251 };
5252
5253/***/ },
5254/* 141 */
5255/*!*******************************************!*\
5256 !*** ./~/core-js/library/modules/_cof.js ***!
5257 \*******************************************/
5258/***/ function(module, exports) {
5259
5260 var toString = {}.toString;
5261
5262 module.exports = function(it){
5263 return toString.call(it).slice(8, -1);
5264 };
5265
5266/***/ },
5267/* 142 */
5268/*!******************************************************!*\
5269 !*** ./~/core-js/library/modules/_array-includes.js ***!
5270 \******************************************************/
5271/***/ function(module, exports, __webpack_require__) {
5272
5273 // false -> Array#indexOf
5274 // true -> Array#includes
5275 var toIObject = __webpack_require__(/*! ./_to-iobject */ 139)
5276 , toLength = __webpack_require__(/*! ./_to-length */ 143)
5277 , toIndex = __webpack_require__(/*! ./_to-index */ 144);
5278 module.exports = function(IS_INCLUDES){
5279 return function($this, el, fromIndex){
5280 var O = toIObject($this)
5281 , length = toLength(O.length)
5282 , index = toIndex(fromIndex, length)
5283 , value;
5284 // Array#includes uses SameValueZero equality algorithm
5285 if(IS_INCLUDES && el != el)while(length > index){
5286 value = O[index++];
5287 if(value != value)return true;
5288 // Array#toIndex ignores holes, Array#includes - not
5289 } else for(;length > index; index++)if(IS_INCLUDES || index in O){
5290 if(O[index] === el)return IS_INCLUDES || index || 0;
5291 } return !IS_INCLUDES && -1;
5292 };
5293 };
5294
5295/***/ },
5296/* 143 */
5297/*!*************************************************!*\
5298 !*** ./~/core-js/library/modules/_to-length.js ***!
5299 \*************************************************/
5300/***/ function(module, exports, __webpack_require__) {
5301
5302 // 7.1.15 ToLength
5303 var toInteger = __webpack_require__(/*! ./_to-integer */ 112)
5304 , min = Math.min;
5305 module.exports = function(it){
5306 return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
5307 };
5308
5309/***/ },
5310/* 144 */
5311/*!************************************************!*\
5312 !*** ./~/core-js/library/modules/_to-index.js ***!
5313 \************************************************/
5314/***/ function(module, exports, __webpack_require__) {
5315
5316 var toInteger = __webpack_require__(/*! ./_to-integer */ 112)
5317 , max = Math.max
5318 , min = Math.min;
5319 module.exports = function(index, length){
5320 index = toInteger(index);
5321 return index < 0 ? max(index + length, 0) : min(index, length);
5322 };
5323
5324/***/ },
5325/* 145 */
5326/*!**************************************************!*\
5327 !*** ./~/core-js/library/modules/_shared-key.js ***!
5328 \**************************************************/
5329/***/ function(module, exports, __webpack_require__) {
5330
5331 var shared = __webpack_require__(/*! ./_shared */ 146)('keys')
5332 , uid = __webpack_require__(/*! ./_uid */ 147);
5333 module.exports = function(key){
5334 return shared[key] || (shared[key] = uid(key));
5335 };
5336
5337/***/ },
5338/* 146 */
5339/*!**********************************************!*\
5340 !*** ./~/core-js/library/modules/_shared.js ***!
5341 \**********************************************/
5342/***/ function(module, exports, __webpack_require__) {
5343
5344 var global = __webpack_require__(/*! ./_global */ 117)
5345 , SHARED = '__core-js_shared__'
5346 , store = global[SHARED] || (global[SHARED] = {});
5347 module.exports = function(key){
5348 return store[key] || (store[key] = {});
5349 };
5350
5351/***/ },
5352/* 147 */
5353/*!*******************************************!*\
5354 !*** ./~/core-js/library/modules/_uid.js ***!
5355 \*******************************************/
5356/***/ function(module, exports) {
5357
5358 var id = 0
5359 , px = Math.random();
5360 module.exports = function(key){
5361 return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
5362 };
5363
5364/***/ },
5365/* 148 */
5366/*!*****************************************************!*\
5367 !*** ./~/core-js/library/modules/_enum-bug-keys.js ***!
5368 \*****************************************************/
5369/***/ function(module, exports) {
5370
5371 // IE 8- don't enum bug keys
5372 module.exports = (
5373 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
5374 ).split(',');
5375
5376/***/ },
5377/* 149 */
5378/*!********************************************!*\
5379 !*** ./~/core-js/library/modules/_html.js ***!
5380 \********************************************/
5381/***/ function(module, exports, __webpack_require__) {
5382
5383 module.exports = __webpack_require__(/*! ./_global */ 117).document && document.documentElement;
5384
5385/***/ },
5386/* 150 */
5387/*!*********************************************************!*\
5388 !*** ./~/core-js/library/modules/_set-to-string-tag.js ***!
5389 \*********************************************************/
5390/***/ function(module, exports, __webpack_require__) {
5391
5392 var def = __webpack_require__(/*! ./_object-dp */ 122).f
5393 , has = __webpack_require__(/*! ./_has */ 132)
5394 , TAG = __webpack_require__(/*! ./_wks */ 151)('toStringTag');
5395
5396 module.exports = function(it, tag, stat){
5397 if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag});
5398 };
5399
5400/***/ },
5401/* 151 */
5402/*!*******************************************!*\
5403 !*** ./~/core-js/library/modules/_wks.js ***!
5404 \*******************************************/
5405/***/ function(module, exports, __webpack_require__) {
5406
5407 var store = __webpack_require__(/*! ./_shared */ 146)('wks')
5408 , uid = __webpack_require__(/*! ./_uid */ 147)
5409 , Symbol = __webpack_require__(/*! ./_global */ 117).Symbol
5410 , USE_SYMBOL = typeof Symbol == 'function';
5411
5412 var $exports = module.exports = function(name){
5413 return store[name] || (store[name] =
5414 USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
5415 };
5416
5417 $exports.store = store;
5418
5419/***/ },
5420/* 152 */
5421/*!**************************************************!*\
5422 !*** ./~/core-js/library/modules/_object-gpo.js ***!
5423 \**************************************************/
5424/***/ function(module, exports, __webpack_require__) {
5425
5426 // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
5427 var has = __webpack_require__(/*! ./_has */ 132)
5428 , toObject = __webpack_require__(/*! ./_to-object */ 153)
5429 , IE_PROTO = __webpack_require__(/*! ./_shared-key */ 145)('IE_PROTO')
5430 , ObjectProto = Object.prototype;
5431
5432 module.exports = Object.getPrototypeOf || function(O){
5433 O = toObject(O);
5434 if(has(O, IE_PROTO))return O[IE_PROTO];
5435 if(typeof O.constructor == 'function' && O instanceof O.constructor){
5436 return O.constructor.prototype;
5437 } return O instanceof Object ? ObjectProto : null;
5438 };
5439
5440/***/ },
5441/* 153 */
5442/*!*************************************************!*\
5443 !*** ./~/core-js/library/modules/_to-object.js ***!
5444 \*************************************************/
5445/***/ function(module, exports, __webpack_require__) {
5446
5447 // 7.1.13 ToObject(argument)
5448 var defined = __webpack_require__(/*! ./_defined */ 113);
5449 module.exports = function(it){
5450 return Object(defined(it));
5451 };
5452
5453/***/ },
5454/* 154 */
5455/*!*******************************************************!*\
5456 !*** ./~/core-js/library/modules/web.dom.iterable.js ***!
5457 \*******************************************************/
5458/***/ function(module, exports, __webpack_require__) {
5459
5460 __webpack_require__(/*! ./es6.array.iterator */ 155);
5461 var global = __webpack_require__(/*! ./_global */ 117)
5462 , hide = __webpack_require__(/*! ./_hide */ 121)
5463 , Iterators = __webpack_require__(/*! ./_iterators */ 133)
5464 , TO_STRING_TAG = __webpack_require__(/*! ./_wks */ 151)('toStringTag');
5465
5466 for(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){
5467 var NAME = collections[i]
5468 , Collection = global[NAME]
5469 , proto = Collection && Collection.prototype;
5470 if(proto && !proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME);
5471 Iterators[NAME] = Iterators.Array;
5472 }
5473
5474/***/ },
5475/* 155 */
5476/*!*********************************************************!*\
5477 !*** ./~/core-js/library/modules/es6.array.iterator.js ***!
5478 \*********************************************************/
5479/***/ function(module, exports, __webpack_require__) {
5480
5481 'use strict';
5482 var addToUnscopables = __webpack_require__(/*! ./_add-to-unscopables */ 156)
5483 , step = __webpack_require__(/*! ./_iter-step */ 157)
5484 , Iterators = __webpack_require__(/*! ./_iterators */ 133)
5485 , toIObject = __webpack_require__(/*! ./_to-iobject */ 139);
5486
5487 // 22.1.3.4 Array.prototype.entries()
5488 // 22.1.3.13 Array.prototype.keys()
5489 // 22.1.3.29 Array.prototype.values()
5490 // 22.1.3.30 Array.prototype[@@iterator]()
5491 module.exports = __webpack_require__(/*! ./_iter-define */ 114)(Array, 'Array', function(iterated, kind){
5492 this._t = toIObject(iterated); // target
5493 this._i = 0; // next index
5494 this._k = kind; // kind
5495 // 22.1.5.2.1 %ArrayIteratorPrototype%.next()
5496 }, function(){
5497 var O = this._t
5498 , kind = this._k
5499 , index = this._i++;
5500 if(!O || index >= O.length){
5501 this._t = undefined;
5502 return step(1);
5503 }
5504 if(kind == 'keys' )return step(0, index);
5505 if(kind == 'values')return step(0, O[index]);
5506 return step(0, [index, O[index]]);
5507 }, 'values');
5508
5509 // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
5510 Iterators.Arguments = Iterators.Array;
5511
5512 addToUnscopables('keys');
5513 addToUnscopables('values');
5514 addToUnscopables('entries');
5515
5516/***/ },
5517/* 156 */
5518/*!**********************************************************!*\
5519 !*** ./~/core-js/library/modules/_add-to-unscopables.js ***!
5520 \**********************************************************/
5521/***/ function(module, exports) {
5522
5523 module.exports = function(){ /* empty */ };
5524
5525/***/ },
5526/* 157 */
5527/*!*************************************************!*\
5528 !*** ./~/core-js/library/modules/_iter-step.js ***!
5529 \*************************************************/
5530/***/ function(module, exports) {
5531
5532 module.exports = function(done, value){
5533 return {value: value, done: !!done};
5534 };
5535
5536/***/ },
5537/* 158 */
5538/*!***********************************************!*\
5539 !*** ./~/core-js/library/modules/_wks-ext.js ***!
5540 \***********************************************/
5541/***/ function(module, exports, __webpack_require__) {
5542
5543 exports.f = __webpack_require__(/*! ./_wks */ 151);
5544
5545/***/ },
5546/* 159 */
5547/*!*******************************************!*\
5548 !*** ./~/babel-runtime/core-js/symbol.js ***!
5549 \*******************************************/
5550/***/ function(module, exports, __webpack_require__) {
5551
5552 module.exports = { "default": __webpack_require__(/*! core-js/library/fn/symbol */ 160), __esModule: true };
5553
5554/***/ },
5555/* 160 */
5556/*!**********************************************!*\
5557 !*** ./~/core-js/library/fn/symbol/index.js ***!
5558 \**********************************************/
5559/***/ function(module, exports, __webpack_require__) {
5560
5561 __webpack_require__(/*! ../../modules/es6.symbol */ 161);
5562 __webpack_require__(/*! ../../modules/es6.object.to-string */ 172);
5563 __webpack_require__(/*! ../../modules/es7.symbol.async-iterator */ 173);
5564 __webpack_require__(/*! ../../modules/es7.symbol.observable */ 174);
5565 module.exports = __webpack_require__(/*! ../../modules/_core */ 118).Symbol;
5566
5567/***/ },
5568/* 161 */
5569/*!*************************************************!*\
5570 !*** ./~/core-js/library/modules/es6.symbol.js ***!
5571 \*************************************************/
5572/***/ function(module, exports, __webpack_require__) {
5573
5574 'use strict';
5575 // ECMAScript 6 symbols shim
5576 var global = __webpack_require__(/*! ./_global */ 117)
5577 , has = __webpack_require__(/*! ./_has */ 132)
5578 , DESCRIPTORS = __webpack_require__(/*! ./_descriptors */ 126)
5579 , $export = __webpack_require__(/*! ./_export */ 116)
5580 , redefine = __webpack_require__(/*! ./_redefine */ 131)
5581 , META = __webpack_require__(/*! ./_meta */ 162).KEY
5582 , $fails = __webpack_require__(/*! ./_fails */ 127)
5583 , shared = __webpack_require__(/*! ./_shared */ 146)
5584 , setToStringTag = __webpack_require__(/*! ./_set-to-string-tag */ 150)
5585 , uid = __webpack_require__(/*! ./_uid */ 147)
5586 , wks = __webpack_require__(/*! ./_wks */ 151)
5587 , wksExt = __webpack_require__(/*! ./_wks-ext */ 158)
5588 , wksDefine = __webpack_require__(/*! ./_wks-define */ 163)
5589 , keyOf = __webpack_require__(/*! ./_keyof */ 164)
5590 , enumKeys = __webpack_require__(/*! ./_enum-keys */ 165)
5591 , isArray = __webpack_require__(/*! ./_is-array */ 168)
5592 , anObject = __webpack_require__(/*! ./_an-object */ 123)
5593 , toIObject = __webpack_require__(/*! ./_to-iobject */ 139)
5594 , toPrimitive = __webpack_require__(/*! ./_to-primitive */ 129)
5595 , createDesc = __webpack_require__(/*! ./_property-desc */ 130)
5596 , _create = __webpack_require__(/*! ./_object-create */ 135)
5597 , gOPNExt = __webpack_require__(/*! ./_object-gopn-ext */ 169)
5598 , $GOPD = __webpack_require__(/*! ./_object-gopd */ 171)
5599 , $DP = __webpack_require__(/*! ./_object-dp */ 122)
5600 , $keys = __webpack_require__(/*! ./_object-keys */ 137)
5601 , gOPD = $GOPD.f
5602 , dP = $DP.f
5603 , gOPN = gOPNExt.f
5604 , $Symbol = global.Symbol
5605 , $JSON = global.JSON
5606 , _stringify = $JSON && $JSON.stringify
5607 , PROTOTYPE = 'prototype'
5608 , HIDDEN = wks('_hidden')
5609 , TO_PRIMITIVE = wks('toPrimitive')
5610 , isEnum = {}.propertyIsEnumerable
5611 , SymbolRegistry = shared('symbol-registry')
5612 , AllSymbols = shared('symbols')
5613 , ObjectProto = Object[PROTOTYPE]
5614 , USE_NATIVE = typeof $Symbol == 'function'
5615 , QObject = global.QObject;
5616 // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
5617 var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
5618
5619 // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
5620 var setSymbolDesc = DESCRIPTORS && $fails(function(){
5621 return _create(dP({}, 'a', {
5622 get: function(){ return dP(this, 'a', {value: 7}).a; }
5623 })).a != 7;
5624 }) ? function(it, key, D){
5625 var protoDesc = gOPD(ObjectProto, key);
5626 if(protoDesc)delete ObjectProto[key];
5627 dP(it, key, D);
5628 if(protoDesc && it !== ObjectProto)dP(ObjectProto, key, protoDesc);
5629 } : dP;
5630
5631 var wrap = function(tag){
5632 var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);
5633 sym._k = tag;
5634 return sym;
5635 };
5636
5637 var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function(it){
5638 return typeof it == 'symbol';
5639 } : function(it){
5640 return it instanceof $Symbol;
5641 };
5642
5643 var $defineProperty = function defineProperty(it, key, D){
5644 anObject(it);
5645 key = toPrimitive(key, true);
5646 anObject(D);
5647 if(has(AllSymbols, key)){
5648 if(!D.enumerable){
5649 if(!has(it, HIDDEN))dP(it, HIDDEN, createDesc(1, {}));
5650 it[HIDDEN][key] = true;
5651 } else {
5652 if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false;
5653 D = _create(D, {enumerable: createDesc(0, false)});
5654 } return setSymbolDesc(it, key, D);
5655 } return dP(it, key, D);
5656 };
5657 var $defineProperties = function defineProperties(it, P){
5658 anObject(it);
5659 var keys = enumKeys(P = toIObject(P))
5660 , i = 0
5661 , l = keys.length
5662 , key;
5663 while(l > i)$defineProperty(it, key = keys[i++], P[key]);
5664 return it;
5665 };
5666 var $create = function create(it, P){
5667 return P === undefined ? _create(it) : $defineProperties(_create(it), P);
5668 };
5669 var $propertyIsEnumerable = function propertyIsEnumerable(key){
5670 var E = isEnum.call(this, key = toPrimitive(key, true));
5671 return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;
5672 };
5673 var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){
5674 var D = gOPD(it = toIObject(it), key = toPrimitive(key, true));
5675 if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true;
5676 return D;
5677 };
5678 var $getOwnPropertyNames = function getOwnPropertyNames(it){
5679 var names = gOPN(toIObject(it))
5680 , result = []
5681 , i = 0
5682 , key;
5683 while(names.length > i)if(!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META)result.push(key);
5684 return result;
5685 };
5686 var $getOwnPropertySymbols = function getOwnPropertySymbols(it){
5687 var names = gOPN(toIObject(it))
5688 , result = []
5689 , i = 0
5690 , key;
5691 while(names.length > i)if(has(AllSymbols, key = names[i++]))result.push(AllSymbols[key]);
5692 return result;
5693 };
5694
5695 // 19.4.1.1 Symbol([description])
5696 if(!USE_NATIVE){
5697 $Symbol = function Symbol(){
5698 if(this instanceof $Symbol)throw TypeError('Symbol is not a constructor!');
5699 var tag = uid(arguments.length > 0 ? arguments[0] : undefined);
5700 DESCRIPTORS && setter && setSymbolDesc(ObjectProto, tag, {
5701 configurable: true,
5702 set: function(value){
5703 if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false;
5704 setSymbolDesc(this, tag, createDesc(1, value));
5705 }
5706 });
5707 return wrap(tag);
5708 };
5709 redefine($Symbol[PROTOTYPE], 'toString', function toString(){
5710 return this._k;
5711 });
5712
5713 $GOPD.f = $getOwnPropertyDescriptor;
5714 $DP.f = $defineProperty;
5715 __webpack_require__(/*! ./_object-gopn */ 170).f = gOPNExt.f = $getOwnPropertyNames;
5716 __webpack_require__(/*! ./_object-pie */ 167).f = $propertyIsEnumerable;
5717 __webpack_require__(/*! ./_object-gops */ 166).f = $getOwnPropertySymbols;
5718
5719 if(DESCRIPTORS && !__webpack_require__(/*! ./_library */ 115)){
5720 redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
5721 }
5722
5723 wksExt.f = function(name){
5724 return wrap(wks(name));
5725 }
5726 }
5727
5728 $export($export.G + $export.W + $export.F * !USE_NATIVE, {Symbol: $Symbol});
5729
5730 for(var symbols = (
5731 // 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
5732 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'
5733 ).split(','), i = 0; symbols.length > i; )wks(symbols[i++]);
5734
5735 for(var symbols = $keys(wks.store), i = 0; symbols.length > i; )wksDefine(symbols[i++]);
5736
5737 $export($export.S + $export.F * !USE_NATIVE, 'Symbol', {
5738 // 19.4.2.1 Symbol.for(key)
5739 'for': function(key){
5740 return has(SymbolRegistry, key += '')
5741 ? SymbolRegistry[key]
5742 : SymbolRegistry[key] = $Symbol(key);
5743 },
5744 // 19.4.2.5 Symbol.keyFor(sym)
5745 keyFor: function keyFor(key){
5746 if(isSymbol(key))return keyOf(SymbolRegistry, key);
5747 throw TypeError(key + ' is not a symbol!');
5748 },
5749 useSetter: function(){ setter = true; },
5750 useSimple: function(){ setter = false; }
5751 });
5752
5753 $export($export.S + $export.F * !USE_NATIVE, 'Object', {
5754 // 19.1.2.2 Object.create(O [, Properties])
5755 create: $create,
5756 // 19.1.2.4 Object.defineProperty(O, P, Attributes)
5757 defineProperty: $defineProperty,
5758 // 19.1.2.3 Object.defineProperties(O, Properties)
5759 defineProperties: $defineProperties,
5760 // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
5761 getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
5762 // 19.1.2.7 Object.getOwnPropertyNames(O)
5763 getOwnPropertyNames: $getOwnPropertyNames,
5764 // 19.1.2.8 Object.getOwnPropertySymbols(O)
5765 getOwnPropertySymbols: $getOwnPropertySymbols
5766 });
5767
5768 // 24.3.2 JSON.stringify(value [, replacer [, space]])
5769 $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function(){
5770 var S = $Symbol();
5771 // MS Edge converts symbol values to JSON as {}
5772 // WebKit converts symbol values to JSON as null
5773 // V8 throws on boxed symbols
5774 return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}';
5775 })), 'JSON', {
5776 stringify: function stringify(it){
5777 if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined
5778 var args = [it]
5779 , i = 1
5780 , replacer, $replacer;
5781 while(arguments.length > i)args.push(arguments[i++]);
5782 replacer = args[1];
5783 if(typeof replacer == 'function')$replacer = replacer;
5784 if($replacer || !isArray(replacer))replacer = function(key, value){
5785 if($replacer)value = $replacer.call(this, key, value);
5786 if(!isSymbol(value))return value;
5787 };
5788 args[1] = replacer;
5789 return _stringify.apply($JSON, args);
5790 }
5791 });
5792
5793 // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)
5794 $Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(/*! ./_hide */ 121)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
5795 // 19.4.3.5 Symbol.prototype[@@toStringTag]
5796 setToStringTag($Symbol, 'Symbol');
5797 // 20.2.1.9 Math[@@toStringTag]
5798 setToStringTag(Math, 'Math', true);
5799 // 24.3.3 JSON[@@toStringTag]
5800 setToStringTag(global.JSON, 'JSON', true);
5801
5802/***/ },
5803/* 162 */
5804/*!********************************************!*\
5805 !*** ./~/core-js/library/modules/_meta.js ***!
5806 \********************************************/
5807/***/ function(module, exports, __webpack_require__) {
5808
5809 var META = __webpack_require__(/*! ./_uid */ 147)('meta')
5810 , isObject = __webpack_require__(/*! ./_is-object */ 124)
5811 , has = __webpack_require__(/*! ./_has */ 132)
5812 , setDesc = __webpack_require__(/*! ./_object-dp */ 122).f
5813 , id = 0;
5814 var isExtensible = Object.isExtensible || function(){
5815 return true;
5816 };
5817 var FREEZE = !__webpack_require__(/*! ./_fails */ 127)(function(){
5818 return isExtensible(Object.preventExtensions({}));
5819 });
5820 var setMeta = function(it){
5821 setDesc(it, META, {value: {
5822 i: 'O' + ++id, // object ID
5823 w: {} // weak collections IDs
5824 }});
5825 };
5826 var fastKey = function(it, create){
5827 // return primitive with prefix
5828 if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
5829 if(!has(it, META)){
5830 // can't set metadata to uncaught frozen object
5831 if(!isExtensible(it))return 'F';
5832 // not necessary to add metadata
5833 if(!create)return 'E';
5834 // add missing metadata
5835 setMeta(it);
5836 // return object ID
5837 } return it[META].i;
5838 };
5839 var getWeak = function(it, create){
5840 if(!has(it, META)){
5841 // can't set metadata to uncaught frozen object
5842 if(!isExtensible(it))return true;
5843 // not necessary to add metadata
5844 if(!create)return false;
5845 // add missing metadata
5846 setMeta(it);
5847 // return hash weak collections IDs
5848 } return it[META].w;
5849 };
5850 // add metadata on freeze-family methods calling
5851 var onFreeze = function(it){
5852 if(FREEZE && meta.NEED && isExtensible(it) && !has(it, META))setMeta(it);
5853 return it;
5854 };
5855 var meta = module.exports = {
5856 KEY: META,
5857 NEED: false,
5858 fastKey: fastKey,
5859 getWeak: getWeak,
5860 onFreeze: onFreeze
5861 };
5862
5863/***/ },
5864/* 163 */
5865/*!**************************************************!*\
5866 !*** ./~/core-js/library/modules/_wks-define.js ***!
5867 \**************************************************/
5868/***/ function(module, exports, __webpack_require__) {
5869
5870 var global = __webpack_require__(/*! ./_global */ 117)
5871 , core = __webpack_require__(/*! ./_core */ 118)
5872 , LIBRARY = __webpack_require__(/*! ./_library */ 115)
5873 , wksExt = __webpack_require__(/*! ./_wks-ext */ 158)
5874 , defineProperty = __webpack_require__(/*! ./_object-dp */ 122).f;
5875 module.exports = function(name){
5876 var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
5877 if(name.charAt(0) != '_' && !(name in $Symbol))defineProperty($Symbol, name, {value: wksExt.f(name)});
5878 };
5879
5880/***/ },
5881/* 164 */
5882/*!*********************************************!*\
5883 !*** ./~/core-js/library/modules/_keyof.js ***!
5884 \*********************************************/
5885/***/ function(module, exports, __webpack_require__) {
5886
5887 var getKeys = __webpack_require__(/*! ./_object-keys */ 137)
5888 , toIObject = __webpack_require__(/*! ./_to-iobject */ 139);
5889 module.exports = function(object, el){
5890 var O = toIObject(object)
5891 , keys = getKeys(O)
5892 , length = keys.length
5893 , index = 0
5894 , key;
5895 while(length > index)if(O[key = keys[index++]] === el)return key;
5896 };
5897
5898/***/ },
5899/* 165 */
5900/*!*************************************************!*\
5901 !*** ./~/core-js/library/modules/_enum-keys.js ***!
5902 \*************************************************/
5903/***/ function(module, exports, __webpack_require__) {
5904
5905 // all enumerable object keys, includes symbols
5906 var getKeys = __webpack_require__(/*! ./_object-keys */ 137)
5907 , gOPS = __webpack_require__(/*! ./_object-gops */ 166)
5908 , pIE = __webpack_require__(/*! ./_object-pie */ 167);
5909 module.exports = function(it){
5910 var result = getKeys(it)
5911 , getSymbols = gOPS.f;
5912 if(getSymbols){
5913 var symbols = getSymbols(it)
5914 , isEnum = pIE.f
5915 , i = 0
5916 , key;
5917 while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))result.push(key);
5918 } return result;
5919 };
5920
5921/***/ },
5922/* 166 */
5923/*!***************************************************!*\
5924 !*** ./~/core-js/library/modules/_object-gops.js ***!
5925 \***************************************************/
5926/***/ function(module, exports) {
5927
5928 exports.f = Object.getOwnPropertySymbols;
5929
5930/***/ },
5931/* 167 */
5932/*!**************************************************!*\
5933 !*** ./~/core-js/library/modules/_object-pie.js ***!
5934 \**************************************************/
5935/***/ function(module, exports) {
5936
5937 exports.f = {}.propertyIsEnumerable;
5938
5939/***/ },
5940/* 168 */
5941/*!************************************************!*\
5942 !*** ./~/core-js/library/modules/_is-array.js ***!
5943 \************************************************/
5944/***/ function(module, exports, __webpack_require__) {
5945
5946 // 7.2.2 IsArray(argument)
5947 var cof = __webpack_require__(/*! ./_cof */ 141);
5948 module.exports = Array.isArray || function isArray(arg){
5949 return cof(arg) == 'Array';
5950 };
5951
5952/***/ },
5953/* 169 */
5954/*!*******************************************************!*\
5955 !*** ./~/core-js/library/modules/_object-gopn-ext.js ***!
5956 \*******************************************************/
5957/***/ function(module, exports, __webpack_require__) {
5958
5959 // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
5960 var toIObject = __webpack_require__(/*! ./_to-iobject */ 139)
5961 , gOPN = __webpack_require__(/*! ./_object-gopn */ 170).f
5962 , toString = {}.toString;
5963
5964 var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
5965 ? Object.getOwnPropertyNames(window) : [];
5966
5967 var getWindowNames = function(it){
5968 try {
5969 return gOPN(it);
5970 } catch(e){
5971 return windowNames.slice();
5972 }
5973 };
5974
5975 module.exports.f = function getOwnPropertyNames(it){
5976 return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));
5977 };
5978
5979
5980/***/ },
5981/* 170 */
5982/*!***************************************************!*\
5983 !*** ./~/core-js/library/modules/_object-gopn.js ***!
5984 \***************************************************/
5985/***/ function(module, exports, __webpack_require__) {
5986
5987 // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
5988 var $keys = __webpack_require__(/*! ./_object-keys-internal */ 138)
5989 , hiddenKeys = __webpack_require__(/*! ./_enum-bug-keys */ 148).concat('length', 'prototype');
5990
5991 exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O){
5992 return $keys(O, hiddenKeys);
5993 };
5994
5995/***/ },
5996/* 171 */
5997/*!***************************************************!*\
5998 !*** ./~/core-js/library/modules/_object-gopd.js ***!
5999 \***************************************************/
6000/***/ function(module, exports, __webpack_require__) {
6001
6002 var pIE = __webpack_require__(/*! ./_object-pie */ 167)
6003 , createDesc = __webpack_require__(/*! ./_property-desc */ 130)
6004 , toIObject = __webpack_require__(/*! ./_to-iobject */ 139)
6005 , toPrimitive = __webpack_require__(/*! ./_to-primitive */ 129)
6006 , has = __webpack_require__(/*! ./_has */ 132)
6007 , IE8_DOM_DEFINE = __webpack_require__(/*! ./_ie8-dom-define */ 125)
6008 , gOPD = Object.getOwnPropertyDescriptor;
6009
6010 exports.f = __webpack_require__(/*! ./_descriptors */ 126) ? gOPD : function getOwnPropertyDescriptor(O, P){
6011 O = toIObject(O);
6012 P = toPrimitive(P, true);
6013 if(IE8_DOM_DEFINE)try {
6014 return gOPD(O, P);
6015 } catch(e){ /* empty */ }
6016 if(has(O, P))return createDesc(!pIE.f.call(O, P), O[P]);
6017 };
6018
6019/***/ },
6020/* 172 */
6021/*!***********************************************************!*\
6022 !*** ./~/core-js/library/modules/es6.object.to-string.js ***!
6023 \***********************************************************/
6024/***/ function(module, exports) {
6025
6026
6027
6028/***/ },
6029/* 173 */
6030/*!****************************************************************!*\
6031 !*** ./~/core-js/library/modules/es7.symbol.async-iterator.js ***!
6032 \****************************************************************/
6033/***/ function(module, exports, __webpack_require__) {
6034
6035 __webpack_require__(/*! ./_wks-define */ 163)('asyncIterator');
6036
6037/***/ },
6038/* 174 */
6039/*!************************************************************!*\
6040 !*** ./~/core-js/library/modules/es7.symbol.observable.js ***!
6041 \************************************************************/
6042/***/ function(module, exports, __webpack_require__) {
6043
6044 __webpack_require__(/*! ./_wks-define */ 163)('observable');
6045
6046/***/ },
6047/* 175 */
6048/*!*********************************************!*\
6049 !*** ./~/babel-runtime/helpers/inherits.js ***!
6050 \*********************************************/
6051/***/ function(module, exports, __webpack_require__) {
6052
6053 "use strict";
6054
6055 exports.__esModule = true;
6056
6057 var _setPrototypeOf = __webpack_require__(/*! babel-runtime/core-js/object/set-prototype-of */ 176);
6058
6059 var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf);
6060
6061 var _create = __webpack_require__(/*! babel-runtime/core-js/object/create */ 180);
6062
6063 var _create2 = _interopRequireDefault(_create);
6064
6065 var _typeof2 = __webpack_require__(/*! babel-runtime/helpers/typeof */ 107);
6066
6067 var _typeof3 = _interopRequireDefault(_typeof2);
6068
6069 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
6070
6071 exports.default = function (subClass, superClass) {
6072 if (typeof superClass !== "function" && superClass !== null) {
6073 throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : (0, _typeof3.default)(superClass)));
6074 }
6075
6076 subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, {
6077 constructor: {
6078 value: subClass,
6079 enumerable: false,
6080 writable: true,
6081 configurable: true
6082 }
6083 });
6084 if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass;
6085 };
6086
6087/***/ },
6088/* 176 */
6089/*!************************************************************!*\
6090 !*** ./~/babel-runtime/core-js/object/set-prototype-of.js ***!
6091 \************************************************************/
6092/***/ function(module, exports, __webpack_require__) {
6093
6094 module.exports = { "default": __webpack_require__(/*! core-js/library/fn/object/set-prototype-of */ 177), __esModule: true };
6095
6096/***/ },
6097/* 177 */
6098/*!*********************************************************!*\
6099 !*** ./~/core-js/library/fn/object/set-prototype-of.js ***!
6100 \*********************************************************/
6101/***/ function(module, exports, __webpack_require__) {
6102
6103 __webpack_require__(/*! ../../modules/es6.object.set-prototype-of */ 178);
6104 module.exports = __webpack_require__(/*! ../../modules/_core */ 118).Object.setPrototypeOf;
6105
6106/***/ },
6107/* 178 */
6108/*!******************************************************************!*\
6109 !*** ./~/core-js/library/modules/es6.object.set-prototype-of.js ***!
6110 \******************************************************************/
6111/***/ function(module, exports, __webpack_require__) {
6112
6113 // 19.1.3.19 Object.setPrototypeOf(O, proto)
6114 var $export = __webpack_require__(/*! ./_export */ 116);
6115 $export($export.S, 'Object', {setPrototypeOf: __webpack_require__(/*! ./_set-proto */ 179).set});
6116
6117/***/ },
6118/* 179 */
6119/*!*************************************************!*\
6120 !*** ./~/core-js/library/modules/_set-proto.js ***!
6121 \*************************************************/
6122/***/ function(module, exports, __webpack_require__) {
6123
6124 // Works with __proto__ only. Old v8 can't work with null proto objects.
6125 /* eslint-disable no-proto */
6126 var isObject = __webpack_require__(/*! ./_is-object */ 124)
6127 , anObject = __webpack_require__(/*! ./_an-object */ 123);
6128 var check = function(O, proto){
6129 anObject(O);
6130 if(!isObject(proto) && proto !== null)throw TypeError(proto + ": can't set as prototype!");
6131 };
6132 module.exports = {
6133 set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line
6134 function(test, buggy, set){
6135 try {
6136 set = __webpack_require__(/*! ./_ctx */ 119)(Function.call, __webpack_require__(/*! ./_object-gopd */ 171).f(Object.prototype, '__proto__').set, 2);
6137 set(test, []);
6138 buggy = !(test instanceof Array);
6139 } catch(e){ buggy = true; }
6140 return function setPrototypeOf(O, proto){
6141 check(O, proto);
6142 if(buggy)O.__proto__ = proto;
6143 else set(O, proto);
6144 return O;
6145 };
6146 }({}, false) : undefined),
6147 check: check
6148 };
6149
6150/***/ },
6151/* 180 */
6152/*!**************************************************!*\
6153 !*** ./~/babel-runtime/core-js/object/create.js ***!
6154 \**************************************************/
6155/***/ function(module, exports, __webpack_require__) {
6156
6157 module.exports = { "default": __webpack_require__(/*! core-js/library/fn/object/create */ 181), __esModule: true };
6158
6159/***/ },
6160/* 181 */
6161/*!***********************************************!*\
6162 !*** ./~/core-js/library/fn/object/create.js ***!
6163 \***********************************************/
6164/***/ function(module, exports, __webpack_require__) {
6165
6166 __webpack_require__(/*! ../../modules/es6.object.create */ 182);
6167 var $Object = __webpack_require__(/*! ../../modules/_core */ 118).Object;
6168 module.exports = function create(P, D){
6169 return $Object.create(P, D);
6170 };
6171
6172/***/ },
6173/* 182 */
6174/*!********************************************************!*\
6175 !*** ./~/core-js/library/modules/es6.object.create.js ***!
6176 \********************************************************/
6177/***/ function(module, exports, __webpack_require__) {
6178
6179 var $export = __webpack_require__(/*! ./_export */ 116)
6180 // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
6181 $export($export.S, 'Object', {create: __webpack_require__(/*! ./_object-create */ 135)});
6182
6183/***/ },
6184/* 183 */
6185/*!***************************************************!*\
6186 !*** ./~/babel-runtime/helpers/classCallCheck.js ***!
6187 \***************************************************/
6188/***/ function(module, exports) {
6189
6190 "use strict";
6191
6192 exports.__esModule = true;
6193
6194 exports.default = function (instance, Constructor) {
6195 if (!(instance instanceof Constructor)) {
6196 throw new TypeError("Cannot call a class as a function");
6197 }
6198 };
6199
6200/***/ },
6201/* 184 */
6202/*!************************************!*\
6203 !*** ./~/rxjs/observable/empty.js ***!
6204 \************************************/
6205/***/ function(module, exports, __webpack_require__) {
6206
6207 "use strict";
6208 var EmptyObservable_1 = __webpack_require__(/*! ./EmptyObservable */ 94);
6209 exports.empty = EmptyObservable_1.EmptyObservable.create;
6210 //# sourceMappingURL=empty.js.map
6211
6212/***/ },
6213/* 185 */
6214/*!******************************************!*\
6215 !*** ./~/rxjs/operator/publishReplay.js ***!
6216 \******************************************/
6217/***/ function(module, exports, __webpack_require__) {
6218
6219 "use strict";
6220 var ReplaySubject_1 = __webpack_require__(/*! ../ReplaySubject */ 186);
6221 var multicast_1 = __webpack_require__(/*! ./multicast */ 195);
6222 /**
6223 * @param bufferSize
6224 * @param windowTime
6225 * @param scheduler
6226 * @return {ConnectableObservable<T>}
6227 * @method publishReplay
6228 * @owner Observable
6229 */
6230 function publishReplay(bufferSize, windowTime, scheduler) {
6231 if (bufferSize === void 0) { bufferSize = Number.POSITIVE_INFINITY; }
6232 if (windowTime === void 0) { windowTime = Number.POSITIVE_INFINITY; }
6233 return multicast_1.multicast.call(this, new ReplaySubject_1.ReplaySubject(bufferSize, windowTime, scheduler));
6234 }
6235 exports.publishReplay = publishReplay;
6236 //# sourceMappingURL=publishReplay.js.map
6237
6238/***/ },
6239/* 186 */
6240/*!*********************************!*\
6241 !*** ./~/rxjs/ReplaySubject.js ***!
6242 \*********************************/
6243/***/ function(module, exports, __webpack_require__) {
6244
6245 "use strict";
6246 var __extends = (this && this.__extends) || function (d, b) {
6247 for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
6248 function __() { this.constructor = d; }
6249 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
6250 };
6251 var Subject_1 = __webpack_require__(/*! ./Subject */ 187);
6252 var queue_1 = __webpack_require__(/*! ./scheduler/queue */ 191);
6253 var observeOn_1 = __webpack_require__(/*! ./operator/observeOn */ 96);
6254 /**
6255 * @class ReplaySubject<T>
6256 */
6257 var ReplaySubject = (function (_super) {
6258 __extends(ReplaySubject, _super);
6259 function ReplaySubject(bufferSize, windowTime, scheduler) {
6260 if (bufferSize === void 0) { bufferSize = Number.POSITIVE_INFINITY; }
6261 if (windowTime === void 0) { windowTime = Number.POSITIVE_INFINITY; }
6262 _super.call(this);
6263 this.events = [];
6264 this.scheduler = scheduler;
6265 this.bufferSize = bufferSize < 1 ? 1 : bufferSize;
6266 this._windowTime = windowTime < 1 ? 1 : windowTime;
6267 }
6268 ReplaySubject.prototype._next = function (value) {
6269 var now = this._getNow();
6270 this.events.push(new ReplayEvent(now, value));
6271 this._trimBufferThenGetEvents(now);
6272 _super.prototype._next.call(this, value);
6273 };
6274 ReplaySubject.prototype._subscribe = function (subscriber) {
6275 var events = this._trimBufferThenGetEvents(this._getNow());
6276 var scheduler = this.scheduler;
6277 if (scheduler) {
6278 subscriber.add(subscriber = new observeOn_1.ObserveOnSubscriber(subscriber, scheduler));
6279 }
6280 var index = -1;
6281 var len = events.length;
6282 while (++index < len && !subscriber.isUnsubscribed) {
6283 subscriber.next(events[index].value);
6284 }
6285 return _super.prototype._subscribe.call(this, subscriber);
6286 };
6287 ReplaySubject.prototype._getNow = function () {
6288 return (this.scheduler || queue_1.queue).now();
6289 };
6290 ReplaySubject.prototype._trimBufferThenGetEvents = function (now) {
6291 var bufferSize = this.bufferSize;
6292 var _windowTime = this._windowTime;
6293 var events = this.events;
6294 var eventsCount = events.length;
6295 var spliceCount = 0;
6296 // Trim events that fall out of the time window.
6297 // Start at the front of the list. Break early once
6298 // we encounter an event that falls within the window.
6299 while (spliceCount < eventsCount) {
6300 if ((now - events[spliceCount].time) < _windowTime) {
6301 break;
6302 }
6303 spliceCount += 1;
6304 }
6305 if (eventsCount > bufferSize) {
6306 spliceCount = Math.max(spliceCount, eventsCount - bufferSize);
6307 }
6308 if (spliceCount > 0) {
6309 events.splice(0, spliceCount);
6310 }
6311 return events;
6312 };
6313 return ReplaySubject;
6314 }(Subject_1.Subject));
6315 exports.ReplaySubject = ReplaySubject;
6316 var ReplayEvent = (function () {
6317 function ReplayEvent(time, value) {
6318 this.time = time;
6319 this.value = value;
6320 }
6321 return ReplayEvent;
6322 }());
6323 //# sourceMappingURL=ReplaySubject.js.map
6324
6325/***/ },
6326/* 187 */
6327/*!***************************!*\
6328 !*** ./~/rxjs/Subject.js ***!
6329 \***************************/
6330/***/ function(module, exports, __webpack_require__) {
6331
6332 "use strict";
6333 var __extends = (this && this.__extends) || function (d, b) {
6334 for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
6335 function __() { this.constructor = d; }
6336 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
6337 };
6338 var Observable_1 = __webpack_require__(/*! ./Observable */ 78);
6339 var Subscriber_1 = __webpack_require__(/*! ./Subscriber */ 80);
6340 var Subscription_1 = __webpack_require__(/*! ./Subscription */ 81);
6341 var SubjectSubscription_1 = __webpack_require__(/*! ./SubjectSubscription */ 188);
6342 var rxSubscriber_1 = __webpack_require__(/*! ./symbol/rxSubscriber */ 86);
6343 var throwError_1 = __webpack_require__(/*! ./util/throwError */ 189);
6344 var ObjectUnsubscribedError_1 = __webpack_require__(/*! ./util/ObjectUnsubscribedError */ 190);
6345 /**
6346 * @class Subject<T>
6347 */
6348 var Subject = (function (_super) {
6349 __extends(Subject, _super);
6350 function Subject(destination, source) {
6351 _super.call(this);
6352 this.destination = destination;
6353 this.source = source;
6354 this.observers = [];
6355 this.isUnsubscribed = false;
6356 this.isStopped = false;
6357 this.hasErrored = false;
6358 this.dispatching = false;
6359 this.hasCompleted = false;
6360 this.source = source;
6361 }
6362 Subject.prototype.lift = function (operator) {
6363 var subject = new Subject(this.destination || this, this);
6364 subject.operator = operator;
6365 return subject;
6366 };
6367 Subject.prototype.add = function (subscription) {
6368 return Subscription_1.Subscription.prototype.add.call(this, subscription);
6369 };
6370 Subject.prototype.remove = function (subscription) {
6371 Subscription_1.Subscription.prototype.remove.call(this, subscription);
6372 };
6373 Subject.prototype.unsubscribe = function () {
6374 Subscription_1.Subscription.prototype.unsubscribe.call(this);
6375 };
6376 Subject.prototype._subscribe = function (subscriber) {
6377 if (this.source) {
6378 return this.source.subscribe(subscriber);
6379 }
6380 else {
6381 if (subscriber.isUnsubscribed) {
6382 return;
6383 }
6384 else if (this.hasErrored) {
6385 return subscriber.error(this.errorValue);
6386 }
6387 else if (this.hasCompleted) {
6388 return subscriber.complete();
6389 }
6390 this.throwIfUnsubscribed();
6391 var subscription = new SubjectSubscription_1.SubjectSubscription(this, subscriber);
6392 this.observers.push(subscriber);
6393 return subscription;
6394 }
6395 };
6396 Subject.prototype._unsubscribe = function () {
6397 this.source = null;
6398 this.isStopped = true;
6399 this.observers = null;
6400 this.destination = null;
6401 };
6402 Subject.prototype.next = function (value) {
6403 this.throwIfUnsubscribed();
6404 if (this.isStopped) {
6405 return;
6406 }
6407 this.dispatching = true;
6408 this._next(value);
6409 this.dispatching = false;
6410 if (this.hasErrored) {
6411 this._error(this.errorValue);
6412 }
6413 else if (this.hasCompleted) {
6414 this._complete();
6415 }
6416 };
6417 Subject.prototype.error = function (err) {
6418 this.throwIfUnsubscribed();
6419 if (this.isStopped) {
6420 return;
6421 }
6422 this.isStopped = true;
6423 this.hasErrored = true;
6424 this.errorValue = err;
6425 if (this.dispatching) {
6426 return;
6427 }
6428 this._error(err);
6429 };
6430 Subject.prototype.complete = function () {
6431 this.throwIfUnsubscribed();
6432 if (this.isStopped) {
6433 return;
6434 }
6435 this.isStopped = true;
6436 this.hasCompleted = true;
6437 if (this.dispatching) {
6438 return;
6439 }
6440 this._complete();
6441 };
6442 Subject.prototype.asObservable = function () {
6443 var observable = new SubjectObservable(this);
6444 return observable;
6445 };
6446 Subject.prototype._next = function (value) {
6447 if (this.destination) {
6448 this.destination.next(value);
6449 }
6450 else {
6451 this._finalNext(value);
6452 }
6453 };
6454 Subject.prototype._finalNext = function (value) {
6455 var index = -1;
6456 var observers = this.observers.slice(0);
6457 var len = observers.length;
6458 while (++index < len) {
6459 observers[index].next(value);
6460 }
6461 };
6462 Subject.prototype._error = function (err) {
6463 if (this.destination) {
6464 this.destination.error(err);
6465 }
6466 else {
6467 this._finalError(err);
6468 }
6469 };
6470 Subject.prototype._finalError = function (err) {
6471 var index = -1;
6472 var observers = this.observers;
6473 // optimization to block our SubjectSubscriptions from
6474 // splicing themselves out of the observers list one by one.
6475 this.observers = null;
6476 this.isUnsubscribed = true;
6477 if (observers) {
6478 var len = observers.length;
6479 while (++index < len) {
6480 observers[index].error(err);
6481 }
6482 }
6483 this.isUnsubscribed = false;
6484 this.unsubscribe();
6485 };
6486 Subject.prototype._complete = function () {
6487 if (this.destination) {
6488 this.destination.complete();
6489 }
6490 else {
6491 this._finalComplete();
6492 }
6493 };
6494 Subject.prototype._finalComplete = function () {
6495 var index = -1;
6496 var observers = this.observers;
6497 // optimization to block our SubjectSubscriptions from
6498 // splicing themselves out of the observers list one by one.
6499 this.observers = null;
6500 this.isUnsubscribed = true;
6501 if (observers) {
6502 var len = observers.length;
6503 while (++index < len) {
6504 observers[index].complete();
6505 }
6506 }
6507 this.isUnsubscribed = false;
6508 this.unsubscribe();
6509 };
6510 Subject.prototype.throwIfUnsubscribed = function () {
6511 if (this.isUnsubscribed) {
6512 throwError_1.throwError(new ObjectUnsubscribedError_1.ObjectUnsubscribedError());
6513 }
6514 };
6515 Subject.prototype[rxSubscriber_1.$$rxSubscriber] = function () {
6516 return new Subscriber_1.Subscriber(this);
6517 };
6518 Subject.create = function (destination, source) {
6519 return new Subject(destination, source);
6520 };
6521 return Subject;
6522 }(Observable_1.Observable));
6523 exports.Subject = Subject;
6524 /**
6525 * We need this JSDoc comment for affecting ESDoc.
6526 * @ignore
6527 * @extends {Ignored}
6528 */
6529 var SubjectObservable = (function (_super) {
6530 __extends(SubjectObservable, _super);
6531 function SubjectObservable(source) {
6532 _super.call(this);
6533 this.source = source;
6534 }
6535 return SubjectObservable;
6536 }(Observable_1.Observable));
6537 //# sourceMappingURL=Subject.js.map
6538
6539/***/ },
6540/* 188 */
6541/*!***************************************!*\
6542 !*** ./~/rxjs/SubjectSubscription.js ***!
6543 \***************************************/
6544/***/ function(module, exports, __webpack_require__) {
6545
6546 "use strict";
6547 var __extends = (this && this.__extends) || function (d, b) {
6548 for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
6549 function __() { this.constructor = d; }
6550 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
6551 };
6552 var Subscription_1 = __webpack_require__(/*! ./Subscription */ 81);
6553 /**
6554 * We need this JSDoc comment for affecting ESDoc.
6555 * @ignore
6556 * @extends {Ignored}
6557 */
6558 var SubjectSubscription = (function (_super) {
6559 __extends(SubjectSubscription, _super);
6560 function SubjectSubscription(subject, observer) {
6561 _super.call(this);
6562 this.subject = subject;
6563 this.observer = observer;
6564 this.isUnsubscribed = false;
6565 }
6566 SubjectSubscription.prototype.unsubscribe = function () {
6567 if (this.isUnsubscribed) {
6568 return;
6569 }
6570 this.isUnsubscribed = true;
6571 var subject = this.subject;
6572 var observers = subject.observers;
6573 this.subject = null;
6574 if (!observers || observers.length === 0 || subject.isUnsubscribed) {
6575 return;
6576 }
6577 var subscriberIndex = observers.indexOf(this.observer);
6578 if (subscriberIndex !== -1) {
6579 observers.splice(subscriberIndex, 1);
6580 }
6581 };
6582 return SubjectSubscription;
6583 }(Subscription_1.Subscription));
6584 exports.SubjectSubscription = SubjectSubscription;
6585 //# sourceMappingURL=SubjectSubscription.js.map
6586
6587/***/ },
6588/* 189 */
6589/*!***********************************!*\
6590 !*** ./~/rxjs/util/throwError.js ***!
6591 \***********************************/
6592/***/ function(module, exports) {
6593
6594 "use strict";
6595 function throwError(e) { throw e; }
6596 exports.throwError = throwError;
6597 //# sourceMappingURL=throwError.js.map
6598
6599/***/ },
6600/* 190 */
6601/*!************************************************!*\
6602 !*** ./~/rxjs/util/ObjectUnsubscribedError.js ***!
6603 \************************************************/
6604/***/ function(module, exports) {
6605
6606 "use strict";
6607 var __extends = (this && this.__extends) || function (d, b) {
6608 for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
6609 function __() { this.constructor = d; }
6610 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
6611 };
6612 /**
6613 * An error thrown when an action is invalid because the object has been
6614 * unsubscribed.
6615 *
6616 * @see {@link Subject}
6617 * @see {@link BehaviorSubject}
6618 *
6619 * @class ObjectUnsubscribedError
6620 */
6621 var ObjectUnsubscribedError = (function (_super) {
6622 __extends(ObjectUnsubscribedError, _super);
6623 function ObjectUnsubscribedError() {
6624 _super.call(this, 'object unsubscribed');
6625 this.name = 'ObjectUnsubscribedError';
6626 }
6627 return ObjectUnsubscribedError;
6628 }(Error));
6629 exports.ObjectUnsubscribedError = ObjectUnsubscribedError;
6630 //# sourceMappingURL=ObjectUnsubscribedError.js.map
6631
6632/***/ },
6633/* 191 */
6634/*!***********************************!*\
6635 !*** ./~/rxjs/scheduler/queue.js ***!
6636 \***********************************/
6637/***/ function(module, exports, __webpack_require__) {
6638
6639 "use strict";
6640 var QueueScheduler_1 = __webpack_require__(/*! ./QueueScheduler */ 192);
6641 exports.queue = new QueueScheduler_1.QueueScheduler();
6642 //# sourceMappingURL=queue.js.map
6643
6644/***/ },
6645/* 192 */
6646/*!********************************************!*\
6647 !*** ./~/rxjs/scheduler/QueueScheduler.js ***!
6648 \********************************************/
6649/***/ function(module, exports, __webpack_require__) {
6650
6651 "use strict";
6652 var QueueAction_1 = __webpack_require__(/*! ./QueueAction */ 193);
6653 var FutureAction_1 = __webpack_require__(/*! ./FutureAction */ 194);
6654 var QueueScheduler = (function () {
6655 function QueueScheduler() {
6656 this.active = false;
6657 this.actions = []; // XXX: use `any` to remove type param `T` from `VirtualTimeScheduler`.
6658 this.scheduledId = null;
6659 }
6660 QueueScheduler.prototype.now = function () {
6661 return Date.now();
6662 };
6663 QueueScheduler.prototype.flush = function () {
6664 if (this.active || this.scheduledId) {
6665 return;
6666 }
6667 this.active = true;
6668 var actions = this.actions;
6669 // XXX: use `any` to remove type param `T` from `VirtualTimeScheduler`.
6670 for (var action = null; action = actions.shift();) {
6671 action.execute();
6672 if (action.error) {
6673 this.active = false;
6674 throw action.error;
6675 }
6676 }
6677 this.active = false;
6678 };
6679 QueueScheduler.prototype.schedule = function (work, delay, state) {
6680 if (delay === void 0) { delay = 0; }
6681 return (delay <= 0) ?
6682 this.scheduleNow(work, state) :
6683 this.scheduleLater(work, delay, state);
6684 };
6685 QueueScheduler.prototype.scheduleNow = function (work, state) {
6686 return new QueueAction_1.QueueAction(this, work).schedule(state);
6687 };
6688 QueueScheduler.prototype.scheduleLater = function (work, delay, state) {
6689 return new FutureAction_1.FutureAction(this, work).schedule(state, delay);
6690 };
6691 return QueueScheduler;
6692 }());
6693 exports.QueueScheduler = QueueScheduler;
6694 //# sourceMappingURL=QueueScheduler.js.map
6695
6696/***/ },
6697/* 193 */
6698/*!*****************************************!*\
6699 !*** ./~/rxjs/scheduler/QueueAction.js ***!
6700 \*****************************************/
6701/***/ function(module, exports, __webpack_require__) {
6702
6703 "use strict";
6704 var __extends = (this && this.__extends) || function (d, b) {
6705 for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
6706 function __() { this.constructor = d; }
6707 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
6708 };
6709 var FutureAction_1 = __webpack_require__(/*! ./FutureAction */ 194);
6710 /**
6711 * We need this JSDoc comment for affecting ESDoc.
6712 * @ignore
6713 * @extends {Ignored}
6714 */
6715 var QueueAction = (function (_super) {
6716 __extends(QueueAction, _super);
6717 function QueueAction() {
6718 _super.apply(this, arguments);
6719 }
6720 QueueAction.prototype._schedule = function (state, delay) {
6721 if (delay === void 0) { delay = 0; }
6722 if (delay > 0) {
6723 return _super.prototype._schedule.call(this, state, delay);
6724 }
6725 this.delay = delay;
6726 this.state = state;
6727 var scheduler = this.scheduler;
6728 scheduler.actions.push(this);
6729 scheduler.flush();
6730 return this;
6731 };
6732 return QueueAction;
6733 }(FutureAction_1.FutureAction));
6734 exports.QueueAction = QueueAction;
6735 //# sourceMappingURL=QueueAction.js.map
6736
6737/***/ },
6738/* 194 */
6739/*!******************************************!*\
6740 !*** ./~/rxjs/scheduler/FutureAction.js ***!
6741 \******************************************/
6742/***/ function(module, exports, __webpack_require__) {
6743
6744 "use strict";
6745 var __extends = (this && this.__extends) || function (d, b) {
6746 for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
6747 function __() { this.constructor = d; }
6748 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
6749 };
6750 var root_1 = __webpack_require__(/*! ../util/root */ 76);
6751 var Subscription_1 = __webpack_require__(/*! ../Subscription */ 81);
6752 /**
6753 * We need this JSDoc comment for affecting ESDoc.
6754 * @ignore
6755 * @extends {Ignored}
6756 */
6757 var FutureAction = (function (_super) {
6758 __extends(FutureAction, _super);
6759 function FutureAction(scheduler, work) {
6760 _super.call(this);
6761 this.scheduler = scheduler;
6762 this.work = work;
6763 this.pending = false;
6764 }
6765 FutureAction.prototype.execute = function () {
6766 if (this.isUnsubscribed) {
6767 this.error = new Error('executing a cancelled action');
6768 }
6769 else {
6770 try {
6771 this.work(this.state);
6772 }
6773 catch (e) {
6774 this.unsubscribe();
6775 this.error = e;
6776 }
6777 }
6778 };
6779 FutureAction.prototype.schedule = function (state, delay) {
6780 if (delay === void 0) { delay = 0; }
6781 if (this.isUnsubscribed) {
6782 return this;
6783 }
6784 return this._schedule(state, delay);
6785 };
6786 FutureAction.prototype._schedule = function (state, delay) {
6787 var _this = this;
6788 if (delay === void 0) { delay = 0; }
6789 // Always replace the current state with the new state.
6790 this.state = state;
6791 // Set the pending flag indicating that this action has been scheduled, or
6792 // has recursively rescheduled itself.
6793 this.pending = true;
6794 var id = this.id;
6795 // If this action has an intervalID and the specified delay matches the
6796 // delay we used to create the intervalID, don't call `setInterval` again.
6797 if (id != null && this.delay === delay) {
6798 return this;
6799 }
6800 this.delay = delay;
6801 // If this action has an intervalID, but was rescheduled with a different
6802 // `delay` time, cancel the current intervalID and call `setInterval` with
6803 // the new `delay` time.
6804 if (id != null) {
6805 this.id = null;
6806 root_1.root.clearInterval(id);
6807 }
6808 //
6809 // Important implementation note:
6810 //
6811 // By default, FutureAction only executes once. However, Actions have the
6812 // ability to be rescheduled from within the scheduled callback (mimicking
6813 // recursion for asynchronous methods). This allows us to implement single
6814 // and repeated actions with the same code path without adding API surface
6815 // area, and implement tail-call optimization over asynchronous boundaries.
6816 //
6817 // However, JS runtimes make a distinction between intervals scheduled by
6818 // repeatedly calling `setTimeout` vs. a single `setInterval` call, with
6819 // the latter providing a better guarantee of precision.
6820 //
6821 // In order to accommodate both single and repeatedly rescheduled actions,
6822 // use `setInterval` here for both cases. By default, the interval will be
6823 // canceled after its first execution, or if the action schedules itself to
6824 // run again with a different `delay` time.
6825 //
6826 // If the action recursively schedules itself to run again with the same
6827 // `delay` time, the interval is not canceled, but allowed to loop again.
6828 // The check of whether the interval should be canceled or not is run every
6829 // time the interval is executed. The first time an action fails to
6830 // reschedule itself, the interval is canceled.
6831 //
6832 this.id = root_1.root.setInterval(function () {
6833 _this.pending = false;
6834 var _a = _this, id = _a.id, scheduler = _a.scheduler;
6835 scheduler.actions.push(_this);
6836 scheduler.flush();
6837 //
6838 // Terminate this interval if the action didn't reschedule itself.
6839 // Don't call `this.unsubscribe()` here, because the action could be
6840 // rescheduled later. For example:
6841 //
6842 // ```
6843 // scheduler.schedule(function doWork(counter) {
6844 // /* ... I'm a busy worker bee ... */
6845 // var originalAction = this;
6846 // /* wait 100ms before rescheduling this action again */
6847 // setTimeout(function () {
6848 // originalAction.schedule(counter + 1);
6849 // }, 100);
6850 // }, 1000);
6851 // ```
6852 if (_this.pending === false && id != null) {
6853 _this.id = null;
6854 root_1.root.clearInterval(id);
6855 }
6856 }, delay);
6857 return this;
6858 };
6859 FutureAction.prototype._unsubscribe = function () {
6860 this.pending = false;
6861 var _a = this, id = _a.id, scheduler = _a.scheduler;
6862 var actions = scheduler.actions;
6863 var index = actions.indexOf(this);
6864 if (id != null) {
6865 this.id = null;
6866 root_1.root.clearInterval(id);
6867 }
6868 if (index !== -1) {
6869 actions.splice(index, 1);
6870 }
6871 this.work = null;
6872 this.state = null;
6873 this.scheduler = null;
6874 };
6875 return FutureAction;
6876 }(Subscription_1.Subscription));
6877 exports.FutureAction = FutureAction;
6878 //# sourceMappingURL=FutureAction.js.map
6879
6880/***/ },
6881/* 195 */
6882/*!**************************************!*\
6883 !*** ./~/rxjs/operator/multicast.js ***!
6884 \**************************************/
6885/***/ function(module, exports, __webpack_require__) {
6886
6887 "use strict";
6888 var ConnectableObservable_1 = __webpack_require__(/*! ../observable/ConnectableObservable */ 196);
6889 /**
6890 * Returns an Observable that emits the results of invoking a specified selector on items
6891 * emitted by a ConnectableObservable that shares a single subscription to the underlying stream.
6892 *
6893 * <img src="./img/multicast.png" width="100%">
6894 *
6895 * @param {Function} selector - a function that can use the multicasted source stream
6896 * as many times as needed, without causing multiple subscriptions to the source stream.
6897 * Subscribers to the given source will receive all notifications of the source from the
6898 * time of the subscription forward.
6899 * @return {Observable} an Observable that emits the results of invoking the selector
6900 * on the items emitted by a `ConnectableObservable` that shares a single subscription to
6901 * the underlying stream.
6902 * @method multicast
6903 * @owner Observable
6904 */
6905 function multicast(subjectOrSubjectFactory) {
6906 var subjectFactory;
6907 if (typeof subjectOrSubjectFactory === 'function') {
6908 subjectFactory = subjectOrSubjectFactory;
6909 }
6910 else {
6911 subjectFactory = function subjectFactory() {
6912 return subjectOrSubjectFactory;
6913 };
6914 }
6915 return new ConnectableObservable_1.ConnectableObservable(this, subjectFactory);
6916 }
6917 exports.multicast = multicast;
6918 //# sourceMappingURL=multicast.js.map
6919
6920/***/ },
6921/* 196 */
6922/*!****************************************************!*\
6923 !*** ./~/rxjs/observable/ConnectableObservable.js ***!
6924 \****************************************************/
6925/***/ function(module, exports, __webpack_require__) {
6926
6927 "use strict";
6928 var __extends = (this && this.__extends) || function (d, b) {
6929 for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
6930 function __() { this.constructor = d; }
6931 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
6932 };
6933 var Observable_1 = __webpack_require__(/*! ../Observable */ 78);
6934 var Subscriber_1 = __webpack_require__(/*! ../Subscriber */ 80);
6935 var Subscription_1 = __webpack_require__(/*! ../Subscription */ 81);
6936 /**
6937 * @class ConnectableObservable<T>
6938 */
6939 var ConnectableObservable = (function (_super) {
6940 __extends(ConnectableObservable, _super);
6941 function ConnectableObservable(source, subjectFactory) {
6942 _super.call(this);
6943 this.source = source;
6944 this.subjectFactory = subjectFactory;
6945 }
6946 ConnectableObservable.prototype._subscribe = function (subscriber) {
6947 return this.getSubject().subscribe(subscriber);
6948 };
6949 ConnectableObservable.prototype.getSubject = function () {
6950 var subject = this.subject;
6951 if (subject && !subject.isUnsubscribed) {
6952 return subject;
6953 }
6954 return (this.subject = this.subjectFactory());
6955 };
6956 ConnectableObservable.prototype.connect = function () {
6957 var source = this.source;
6958 var subscription = this.subscription;
6959 if (subscription && !subscription.isUnsubscribed) {
6960 return subscription;
6961 }
6962 subscription = source.subscribe(this.getSubject());
6963 subscription.add(new ConnectableSubscription(this));
6964 return (this.subscription = subscription);
6965 };
6966 ConnectableObservable.prototype.refCount = function () {
6967 return new RefCountObservable(this);
6968 };
6969 /**
6970 * This method is opened for `ConnectableSubscription`.
6971 * Not to call from others.
6972 */
6973 ConnectableObservable.prototype._closeSubscription = function () {
6974 this.subject = null;
6975 this.subscription = null;
6976 };
6977 return ConnectableObservable;
6978 }(Observable_1.Observable));
6979 exports.ConnectableObservable = ConnectableObservable;
6980 /**
6981 * We need this JSDoc comment for affecting ESDoc.
6982 * @ignore
6983 * @extends {Ignored}
6984 */
6985 var ConnectableSubscription = (function (_super) {
6986 __extends(ConnectableSubscription, _super);
6987 function ConnectableSubscription(connectable) {
6988 _super.call(this);
6989 this.connectable = connectable;
6990 }
6991 ConnectableSubscription.prototype._unsubscribe = function () {
6992 var connectable = this.connectable;
6993 connectable._closeSubscription();
6994 this.connectable = null;
6995 };
6996 return ConnectableSubscription;
6997 }(Subscription_1.Subscription));
6998 /**
6999 * We need this JSDoc comment for affecting ESDoc.
7000 * @ignore
7001 * @extends {Ignored}
7002 */
7003 var RefCountObservable = (function (_super) {
7004 __extends(RefCountObservable, _super);
7005 function RefCountObservable(connectable, refCount) {
7006 if (refCount === void 0) { refCount = 0; }
7007 _super.call(this);
7008 this.connectable = connectable;
7009 this.refCount = refCount;
7010 }
7011 RefCountObservable.prototype._subscribe = function (subscriber) {
7012 var connectable = this.connectable;
7013 var refCountSubscriber = new RefCountSubscriber(subscriber, this);
7014 var subscription = connectable.subscribe(refCountSubscriber);
7015 if (!subscription.isUnsubscribed && ++this.refCount === 1) {
7016 refCountSubscriber.connection = this.connection = connectable.connect();
7017 }
7018 return subscription;
7019 };
7020 return RefCountObservable;
7021 }(Observable_1.Observable));
7022 /**
7023 * We need this JSDoc comment for affecting ESDoc.
7024 * @ignore
7025 * @extends {Ignored}
7026 */
7027 var RefCountSubscriber = (function (_super) {
7028 __extends(RefCountSubscriber, _super);
7029 function RefCountSubscriber(destination, refCountObservable) {
7030 _super.call(this, null);
7031 this.destination = destination;
7032 this.refCountObservable = refCountObservable;
7033 this.connection = refCountObservable.connection;
7034 destination.add(this);
7035 }
7036 RefCountSubscriber.prototype._next = function (value) {
7037 this.destination.next(value);
7038 };
7039 RefCountSubscriber.prototype._error = function (err) {
7040 this._resetConnectable();
7041 this.destination.error(err);
7042 };
7043 RefCountSubscriber.prototype._complete = function () {
7044 this._resetConnectable();
7045 this.destination.complete();
7046 };
7047 RefCountSubscriber.prototype._resetConnectable = function () {
7048 var observable = this.refCountObservable;
7049 var obsConnection = observable.connection;
7050 var subConnection = this.connection;
7051 if (subConnection && subConnection === obsConnection) {
7052 observable.refCount = 0;
7053 obsConnection.unsubscribe();
7054 observable.connection = null;
7055 this.unsubscribe();
7056 }
7057 };
7058 RefCountSubscriber.prototype._unsubscribe = function () {
7059 var observable = this.refCountObservable;
7060 if (observable.refCount === 0) {
7061 return;
7062 }
7063 if (--observable.refCount === 0) {
7064 var obsConnection = observable.connection;
7065 var subConnection = this.connection;
7066 if (subConnection && subConnection === obsConnection) {
7067 obsConnection.unsubscribe();
7068 observable.connection = null;
7069 }
7070 }
7071 };
7072 return RefCountSubscriber;
7073 }(Subscriber_1.Subscriber));
7074 //# sourceMappingURL=ConnectableObservable.js.map
7075
7076/***/ },
7077/* 197 */
7078/*!*********************************!*\
7079 !*** ./~/rxjs/operator/scan.js ***!
7080 \*********************************/
7081/***/ function(module, exports, __webpack_require__) {
7082
7083 "use strict";
7084 var __extends = (this && this.__extends) || function (d, b) {
7085 for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
7086 function __() { this.constructor = d; }
7087 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
7088 };
7089 var Subscriber_1 = __webpack_require__(/*! ../Subscriber */ 80);
7090 /**
7091 * Applies an accumulation function over the source Observable, and returns each
7092 * intermediate result, with an optional seed value.
7093 *
7094 * <span class="informal">It's like {@link reduce}, but emits the current
7095 * accumulation whenever the source emits a value.</span>
7096 *
7097 * <img src="./img/scan.png" width="100%">
7098 *
7099 * Combines together all values emitted on the source, using an accumulator
7100 * function that knows how to join a new source value into the accumulation from
7101 * the past. Is similar to {@link reduce}, but emits the intermediate
7102 * accumulations.
7103 *
7104 * Returns an Observable that applies a specified `accumulator` function to each
7105 * item emitted by the source Observable. If a `seed` value is specified, then
7106 * that value will be used as the initial value for the accumulator. If no seed
7107 * value is specified, the first item of the source is used as the seed.
7108 *
7109 * @example <caption>Count the number of click events</caption>
7110 * var clicks = Rx.Observable.fromEvent(document, 'click');
7111 * var ones = clicks.mapTo(1);
7112 * var seed = 0;
7113 * var count = ones.scan((acc, one) => acc + one, seed);
7114 * count.subscribe(x => console.log(x));
7115 *
7116 * @see {@link expand}
7117 * @see {@link mergeScan}
7118 * @see {@link reduce}
7119 *
7120 * @param {function(acc: R, value: T, index: number): R} accumulator
7121 * The accumulator function called on each source value.
7122 * @param {T|R} [seed] The initial accumulation value.
7123 * @return {Observable<R>} An observable of the accumulated values.
7124 * @method scan
7125 * @owner Observable
7126 */
7127 function scan(accumulator, seed) {
7128 return this.lift(new ScanOperator(accumulator, seed));
7129 }
7130 exports.scan = scan;
7131 var ScanOperator = (function () {
7132 function ScanOperator(accumulator, seed) {
7133 this.accumulator = accumulator;
7134 this.seed = seed;
7135 }
7136 ScanOperator.prototype.call = function (subscriber, source) {
7137 return source._subscribe(new ScanSubscriber(subscriber, this.accumulator, this.seed));
7138 };
7139 return ScanOperator;
7140 }());
7141 /**
7142 * We need this JSDoc comment for affecting ESDoc.
7143 * @ignore
7144 * @extends {Ignored}
7145 */
7146 var ScanSubscriber = (function (_super) {
7147 __extends(ScanSubscriber, _super);
7148 function ScanSubscriber(destination, accumulator, seed) {
7149 _super.call(this, destination);
7150 this.accumulator = accumulator;
7151 this.index = 0;
7152 this.accumulatorSet = false;
7153 this.seed = seed;
7154 this.accumulatorSet = typeof seed !== 'undefined';
7155 }
7156 Object.defineProperty(ScanSubscriber.prototype, "seed", {
7157 get: function () {
7158 return this._seed;
7159 },
7160 set: function (value) {
7161 this.accumulatorSet = true;
7162 this._seed = value;
7163 },
7164 enumerable: true,
7165 configurable: true
7166 });
7167 ScanSubscriber.prototype._next = function (value) {
7168 if (!this.accumulatorSet) {
7169 this.seed = value;
7170 this.destination.next(value);
7171 }
7172 else {
7173 return this._tryNext(value);
7174 }
7175 };
7176 ScanSubscriber.prototype._tryNext = function (value) {
7177 var index = this.index++;
7178 var result;
7179 try {
7180 result = this.accumulator(this.seed, value, index);
7181 }
7182 catch (err) {
7183 this.destination.error(err);
7184 }
7185 this.seed = result;
7186 this.destination.next(result);
7187 };
7188 return ScanSubscriber;
7189 }(Subscriber_1.Subscriber));
7190 //# sourceMappingURL=scan.js.map
7191
7192/***/ },
7193/* 198 */
7194/*!********************************!*\
7195 !*** ./~/rxjs/operator/map.js ***!
7196 \********************************/
7197/***/ function(module, exports, __webpack_require__) {
7198
7199 "use strict";
7200 var __extends = (this && this.__extends) || function (d, b) {
7201 for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
7202 function __() { this.constructor = d; }
7203 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
7204 };
7205 var Subscriber_1 = __webpack_require__(/*! ../Subscriber */ 80);
7206 /**
7207 * Applies a given `project` function to each value emitted by the source
7208 * Observable, and emits the resulting values as an Observable.
7209 *
7210 * <span class="informal">Like [Array.prototype.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map),
7211 * it passes each source value through a transformation function to get
7212 * corresponding output values.</span>
7213 *
7214 * <img src="./img/map.png" width="100%">
7215 *
7216 * Similar to the well known `Array.prototype.map` function, this operator
7217 * applies a projection to each value and emits that projection in the output
7218 * Observable.
7219 *
7220 * @example <caption>Map every every click to the clientX position of that click</caption>
7221 * var clicks = Rx.Observable.fromEvent(document, 'click');
7222 * var positions = clicks.map(ev => ev.clientX);
7223 * positions.subscribe(x => console.log(x));
7224 *
7225 * @see {@link mapTo}
7226 * @see {@link pluck}
7227 *
7228 * @param {function(value: T, index: number): R} project The function to apply
7229 * to each `value` emitted by the source Observable. The `index` parameter is
7230 * the number `i` for the i-th emission that has happened since the
7231 * subscription, starting from the number `0`.
7232 * @param {any} [thisArg] An optional argument to define what `this` is in the
7233 * `project` function.
7234 * @return {Observable<R>} An Observable that emits the values from the source
7235 * Observable transformed by the given `project` function.
7236 * @method map
7237 * @owner Observable
7238 */
7239 function map(project, thisArg) {
7240 if (typeof project !== 'function') {
7241 throw new TypeError('argument is not a function. Are you looking for `mapTo()`?');
7242 }
7243 return this.lift(new MapOperator(project, thisArg));
7244 }
7245 exports.map = map;
7246 var MapOperator = (function () {
7247 function MapOperator(project, thisArg) {
7248 this.project = project;
7249 this.thisArg = thisArg;
7250 }
7251 MapOperator.prototype.call = function (subscriber, source) {
7252 return source._subscribe(new MapSubscriber(subscriber, this.project, this.thisArg));
7253 };
7254 return MapOperator;
7255 }());
7256 /**
7257 * We need this JSDoc comment for affecting ESDoc.
7258 * @ignore
7259 * @extends {Ignored}
7260 */
7261 var MapSubscriber = (function (_super) {
7262 __extends(MapSubscriber, _super);
7263 function MapSubscriber(destination, project, thisArg) {
7264 _super.call(this, destination);
7265 this.project = project;
7266 this.count = 0;
7267 this.thisArg = thisArg || this;
7268 }
7269 // NOTE: This looks unoptimized, but it's actually purposefully NOT
7270 // using try/catch optimizations.
7271 MapSubscriber.prototype._next = function (value) {
7272 var result;
7273 try {
7274 result = this.project.call(this.thisArg, value, this.count++);
7275 }
7276 catch (err) {
7277 this.destination.error(err);
7278 return;
7279 }
7280 this.destination.next(result);
7281 };
7282 return MapSubscriber;
7283 }(Subscriber_1.Subscriber));
7284 //# sourceMappingURL=map.js.map
7285
7286/***/ },
7287/* 199 */
7288/*!************************************!*\
7289 !*** ./~/snake-case/snake-case.js ***!
7290 \************************************/
7291/***/ function(module, exports, __webpack_require__) {
7292
7293 var sentenceCase = __webpack_require__(/*! sentence-case */ 200)
7294
7295 /**
7296 * Snake case a string.
7297 *
7298 * @param {String} str
7299 * @param {String} [locale]
7300 * @return {String}
7301 */
7302 module.exports = function (str, locale) {
7303 return sentenceCase(str, locale, '_')
7304 }
7305
7306
7307/***/ },
7308/* 200 */
7309/*!*******************************************************!*\
7310 !*** ./~/snake-case/~/sentence-case/sentence-case.js ***!
7311 \*******************************************************/
7312/***/ function(module, exports, __webpack_require__) {
7313
7314 var lowerCase = __webpack_require__(/*! lower-case */ 201)
7315
7316 var NON_WORD_REGEXP = __webpack_require__(/*! ./vendor/non-word-regexp */ 202)
7317 var CAMEL_CASE_REGEXP = __webpack_require__(/*! ./vendor/camel-case-regexp */ 203)
7318 var TRAILING_DIGIT_REGEXP = __webpack_require__(/*! ./vendor/trailing-digit-regexp */ 204)
7319
7320 /**
7321 * Sentence case a string.
7322 *
7323 * @param {String} str
7324 * @param {String} locale
7325 * @param {String} replacement
7326 * @return {String}
7327 */
7328 module.exports = function (str, locale, replacement) {
7329 if (str == null) {
7330 return ''
7331 }
7332
7333 replacement = replacement || ' '
7334
7335 function replace (match, index, string) {
7336 if (index === 0 || index === (string.length - match.length)) {
7337 return ''
7338 }
7339
7340 return replacement
7341 }
7342
7343 str = String(str)
7344 // Support camel case ("camelCase" -> "camel Case").
7345 .replace(CAMEL_CASE_REGEXP, '$1 $2')
7346 // Support digit groups ("test2012" -> "test 2012").
7347 .replace(TRAILING_DIGIT_REGEXP, '$1 $2')
7348 // Remove all non-word characters and replace with a single space.
7349 .replace(NON_WORD_REGEXP, replace)
7350
7351 // Lower case the entire string.
7352 return lowerCase(str, locale)
7353 }
7354
7355
7356/***/ },
7357/* 201 */
7358/*!*****************************************************************!*\
7359 !*** ./~/snake-case/~/sentence-case/~/lower-case/lower-case.js ***!
7360 \*****************************************************************/
7361/***/ function(module, exports) {
7362
7363 /**
7364 * Special language-specific overrides.
7365 *
7366 * Source: ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt
7367 *
7368 * @type {Object}
7369 */
7370 var LANGUAGES = {
7371 tr: {
7372 regexp: /\u0130|\u0049|\u0049\u0307/g,
7373 map: {
7374 '\u0130': '\u0069',
7375 '\u0049': '\u0131',
7376 '\u0049\u0307': '\u0069'
7377 }
7378 },
7379 az: {
7380 regexp: /[\u0130]/g,
7381 map: {
7382 '\u0130': '\u0069',
7383 '\u0049': '\u0131',
7384 '\u0049\u0307': '\u0069'
7385 }
7386 },
7387 lt: {
7388 regexp: /[\u0049\u004A\u012E\u00CC\u00CD\u0128]/g,
7389 map: {
7390 '\u0049': '\u0069\u0307',
7391 '\u004A': '\u006A\u0307',
7392 '\u012E': '\u012F\u0307',
7393 '\u00CC': '\u0069\u0307\u0300',
7394 '\u00CD': '\u0069\u0307\u0301',
7395 '\u0128': '\u0069\u0307\u0303'
7396 }
7397 }
7398 }
7399
7400 /**
7401 * Lowercase a string.
7402 *
7403 * @param {String} str
7404 * @return {String}
7405 */
7406 module.exports = function (str, locale) {
7407 var lang = LANGUAGES[locale]
7408
7409 str = str == null ? '' : String(str)
7410
7411 if (lang) {
7412 str = str.replace(lang.regexp, function (m) { return lang.map[m] })
7413 }
7414
7415 return str.toLowerCase()
7416 }
7417
7418
7419/***/ },
7420/* 202 */
7421/*!****************************************************************!*\
7422 !*** ./~/snake-case/~/sentence-case/vendor/non-word-regexp.js ***!
7423 \****************************************************************/
7424/***/ function(module, exports) {
7425
7426 module.exports = /[^\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC\u0030-\u0039\u00B2\u00B3\u00B9\u00BC-\u00BE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D66-\u0D75\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19]+/g
7427
7428
7429/***/ },
7430/* 203 */
7431/*!******************************************************************!*\
7432 !*** ./~/snake-case/~/sentence-case/vendor/camel-case-regexp.js ***!
7433 \******************************************************************/
7434/***/ function(module, exports) {
7435
7436 module.exports = /([\u0061-\u007A\u00B5\u00DF-\u00F6\u00F8-\u00FF\u0101\u0103\u0105\u0107\u0109\u010B\u010D\u010F\u0111\u0113\u0115\u0117\u0119\u011B\u011D\u011F\u0121\u0123\u0125\u0127\u0129\u012B\u012D\u012F\u0131\u0133\u0135\u0137\u0138\u013A\u013C\u013E\u0140\u0142\u0144\u0146\u0148\u0149\u014B\u014D\u014F\u0151\u0153\u0155\u0157\u0159\u015B\u015D\u015F\u0161\u0163\u0165\u0167\u0169\u016B\u016D\u016F\u0171\u0173\u0175\u0177\u017A\u017C\u017E-\u0180\u0183\u0185\u0188\u018C\u018D\u0192\u0195\u0199-\u019B\u019E\u01A1\u01A3\u01A5\u01A8\u01AA\u01AB\u01AD\u01B0\u01B4\u01B6\u01B9\u01BA\u01BD-\u01BF\u01C6\u01C9\u01CC\u01CE\u01D0\u01D2\u01D4\u01D6\u01D8\u01DA\u01DC\u01DD\u01DF\u01E1\u01E3\u01E5\u01E7\u01E9\u01EB\u01ED\u01EF\u01F0\u01F3\u01F5\u01F9\u01FB\u01FD\u01FF\u0201\u0203\u0205\u0207\u0209\u020B\u020D\u020F\u0211\u0213\u0215\u0217\u0219\u021B\u021D\u021F\u0221\u0223\u0225\u0227\u0229\u022B\u022D\u022F\u0231\u0233-\u0239\u023C\u023F\u0240\u0242\u0247\u0249\u024B\u024D\u024F-\u0293\u0295-\u02AF\u0371\u0373\u0377\u037B-\u037D\u0390\u03AC-\u03CE\u03D0\u03D1\u03D5-\u03D7\u03D9\u03DB\u03DD\u03DF\u03E1\u03E3\u03E5\u03E7\u03E9\u03EB\u03ED\u03EF-\u03F3\u03F5\u03F8\u03FB\u03FC\u0430-\u045F\u0461\u0463\u0465\u0467\u0469\u046B\u046D\u046F\u0471\u0473\u0475\u0477\u0479\u047B\u047D\u047F\u0481\u048B\u048D\u048F\u0491\u0493\u0495\u0497\u0499\u049B\u049D\u049F\u04A1\u04A3\u04A5\u04A7\u04A9\u04AB\u04AD\u04AF\u04B1\u04B3\u04B5\u04B7\u04B9\u04BB\u04BD\u04BF\u04C2\u04C4\u04C6\u04C8\u04CA\u04CC\u04CE\u04CF\u04D1\u04D3\u04D5\u04D7\u04D9\u04DB\u04DD\u04DF\u04E1\u04E3\u04E5\u04E7\u04E9\u04EB\u04ED\u04EF\u04F1\u04F3\u04F5\u04F7\u04F9\u04FB\u04FD\u04FF\u0501\u0503\u0505\u0507\u0509\u050B\u050D\u050F\u0511\u0513\u0515\u0517\u0519\u051B\u051D\u051F\u0521\u0523\u0525\u0527\u0561-\u0587\u1D00-\u1D2B\u1D6B-\u1D77\u1D79-\u1D9A\u1E01\u1E03\u1E05\u1E07\u1E09\u1E0B\u1E0D\u1E0F\u1E11\u1E13\u1E15\u1E17\u1E19\u1E1B\u1E1D\u1E1F\u1E21\u1E23\u1E25\u1E27\u1E29\u1E2B\u1E2D\u1E2F\u1E31\u1E33\u1E35\u1E37\u1E39\u1E3B\u1E3D\u1E3F\u1E41\u1E43\u1E45\u1E47\u1E49\u1E4B\u1E4D\u1E4F\u1E51\u1E53\u1E55\u1E57\u1E59\u1E5B\u1E5D\u1E5F\u1E61\u1E63\u1E65\u1E67\u1E69\u1E6B\u1E6D\u1E6F\u1E71\u1E73\u1E75\u1E77\u1E79\u1E7B\u1E7D\u1E7F\u1E81\u1E83\u1E85\u1E87\u1E89\u1E8B\u1E8D\u1E8F\u1E91\u1E93\u1E95-\u1E9D\u1E9F\u1EA1\u1EA3\u1EA5\u1EA7\u1EA9\u1EAB\u1EAD\u1EAF\u1EB1\u1EB3\u1EB5\u1EB7\u1EB9\u1EBB\u1EBD\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7\u1EC9\u1ECB\u1ECD\u1ECF\u1ED1\u1ED3\u1ED5\u1ED7\u1ED9\u1EDB\u1EDD\u1EDF\u1EE1\u1EE3\u1EE5\u1EE7\u1EE9\u1EEB\u1EED\u1EEF\u1EF1\u1EF3\u1EF5\u1EF7\u1EF9\u1EFB\u1EFD\u1EFF-\u1F07\u1F10-\u1F15\u1F20-\u1F27\u1F30-\u1F37\u1F40-\u1F45\u1F50-\u1F57\u1F60-\u1F67\u1F70-\u1F7D\u1F80-\u1F87\u1F90-\u1F97\u1FA0-\u1FA7\u1FB0-\u1FB4\u1FB6\u1FB7\u1FBE\u1FC2-\u1FC4\u1FC6\u1FC7\u1FD0-\u1FD3\u1FD6\u1FD7\u1FE0-\u1FE7\u1FF2-\u1FF4\u1FF6\u1FF7\u210A\u210E\u210F\u2113\u212F\u2134\u2139\u213C\u213D\u2146-\u2149\u214E\u2184\u2C30-\u2C5E\u2C61\u2C65\u2C66\u2C68\u2C6A\u2C6C\u2C71\u2C73\u2C74\u2C76-\u2C7B\u2C81\u2C83\u2C85\u2C87\u2C89\u2C8B\u2C8D\u2C8F\u2C91\u2C93\u2C95\u2C97\u2C99\u2C9B\u2C9D\u2C9F\u2CA1\u2CA3\u2CA5\u2CA7\u2CA9\u2CAB\u2CAD\u2CAF\u2CB1\u2CB3\u2CB5\u2CB7\u2CB9\u2CBB\u2CBD\u2CBF\u2CC1\u2CC3\u2CC5\u2CC7\u2CC9\u2CCB\u2CCD\u2CCF\u2CD1\u2CD3\u2CD5\u2CD7\u2CD9\u2CDB\u2CDD\u2CDF\u2CE1\u2CE3\u2CE4\u2CEC\u2CEE\u2CF3\u2D00-\u2D25\u2D27\u2D2D\uA641\uA643\uA645\uA647\uA649\uA64B\uA64D\uA64F\uA651\uA653\uA655\uA657\uA659\uA65B\uA65D\uA65F\uA661\uA663\uA665\uA667\uA669\uA66B\uA66D\uA681\uA683\uA685\uA687\uA689\uA68B\uA68D\uA68F\uA691\uA693\uA695\uA697\uA723\uA725\uA727\uA729\uA72B\uA72D\uA72F-\uA731\uA733\uA735\uA737\uA739\uA73B\uA73D\uA73F\uA741\uA743\uA745\uA747\uA749\uA74B\uA74D\uA74F\uA751\uA753\uA755\uA757\uA759\uA75B\uA75D\uA75F\uA761\uA763\uA765\uA767\uA769\uA76B\uA76D\uA76F\uA771-\uA778\uA77A\uA77C\uA77F\uA781\uA783\uA785\uA787\uA78C\uA78E\uA791\uA793\uA7A1\uA7A3\uA7A5\uA7A7\uA7A9\uA7FA\uFB00-\uFB06\uFB13-\uFB17\uFF41-\uFF5A])([\u0041-\u005A\u00C0-\u00D6\u00D8-\u00DE\u0100\u0102\u0104\u0106\u0108\u010A\u010C\u010E\u0110\u0112\u0114\u0116\u0118\u011A\u011C\u011E\u0120\u0122\u0124\u0126\u0128\u012A\u012C\u012E\u0130\u0132\u0134\u0136\u0139\u013B\u013D\u013F\u0141\u0143\u0145\u0147\u014A\u014C\u014E\u0150\u0152\u0154\u0156\u0158\u015A\u015C\u015E\u0160\u0162\u0164\u0166\u0168\u016A\u016C\u016E\u0170\u0172\u0174\u0176\u0178\u0179\u017B\u017D\u0181\u0182\u0184\u0186\u0187\u0189-\u018B\u018E-\u0191\u0193\u0194\u0196-\u0198\u019C\u019D\u019F\u01A0\u01A2\u01A4\u01A6\u01A7\u01A9\u01AC\u01AE\u01AF\u01B1-\u01B3\u01B5\u01B7\u01B8\u01BC\u01C4\u01C7\u01CA\u01CD\u01CF\u01D1\u01D3\u01D5\u01D7\u01D9\u01DB\u01DE\u01E0\u01E2\u01E4\u01E6\u01E8\u01EA\u01EC\u01EE\u01F1\u01F4\u01F6-\u01F8\u01FA\u01FC\u01FE\u0200\u0202\u0204\u0206\u0208\u020A\u020C\u020E\u0210\u0212\u0214\u0216\u0218\u021A\u021C\u021E\u0220\u0222\u0224\u0226\u0228\u022A\u022C\u022E\u0230\u0232\u023A\u023B\u023D\u023E\u0241\u0243-\u0246\u0248\u024A\u024C\u024E\u0370\u0372\u0376\u0386\u0388-\u038A\u038C\u038E\u038F\u0391-\u03A1\u03A3-\u03AB\u03CF\u03D2-\u03D4\u03D8\u03DA\u03DC\u03DE\u03E0\u03E2\u03E4\u03E6\u03E8\u03EA\u03EC\u03EE\u03F4\u03F7\u03F9\u03FA\u03FD-\u042F\u0460\u0462\u0464\u0466\u0468\u046A\u046C\u046E\u0470\u0472\u0474\u0476\u0478\u047A\u047C\u047E\u0480\u048A\u048C\u048E\u0490\u0492\u0494\u0496\u0498\u049A\u049C\u049E\u04A0\u04A2\u04A4\u04A6\u04A8\u04AA\u04AC\u04AE\u04B0\u04B2\u04B4\u04B6\u04B8\u04BA\u04BC\u04BE\u04C0\u04C1\u04C3\u04C5\u04C7\u04C9\u04CB\u04CD\u04D0\u04D2\u04D4\u04D6\u04D8\u04DA\u04DC\u04DE\u04E0\u04E2\u04E4\u04E6\u04E8\u04EA\u04EC\u04EE\u04F0\u04F2\u04F4\u04F6\u04F8\u04FA\u04FC\u04FE\u0500\u0502\u0504\u0506\u0508\u050A\u050C\u050E\u0510\u0512\u0514\u0516\u0518\u051A\u051C\u051E\u0520\u0522\u0524\u0526\u0531-\u0556\u10A0-\u10C5\u10C7\u10CD\u1E00\u1E02\u1E04\u1E06\u1E08\u1E0A\u1E0C\u1E0E\u1E10\u1E12\u1E14\u1E16\u1E18\u1E1A\u1E1C\u1E1E\u1E20\u1E22\u1E24\u1E26\u1E28\u1E2A\u1E2C\u1E2E\u1E30\u1E32\u1E34\u1E36\u1E38\u1E3A\u1E3C\u1E3E\u1E40\u1E42\u1E44\u1E46\u1E48\u1E4A\u1E4C\u1E4E\u1E50\u1E52\u1E54\u1E56\u1E58\u1E5A\u1E5C\u1E5E\u1E60\u1E62\u1E64\u1E66\u1E68\u1E6A\u1E6C\u1E6E\u1E70\u1E72\u1E74\u1E76\u1E78\u1E7A\u1E7C\u1E7E\u1E80\u1E82\u1E84\u1E86\u1E88\u1E8A\u1E8C\u1E8E\u1E90\u1E92\u1E94\u1E9E\u1EA0\u1EA2\u1EA4\u1EA6\u1EA8\u1EAA\u1EAC\u1EAE\u1EB0\u1EB2\u1EB4\u1EB6\u1EB8\u1EBA\u1EBC\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1EC8\u1ECA\u1ECC\u1ECE\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EDA\u1EDC\u1EDE\u1EE0\u1EE2\u1EE4\u1EE6\u1EE8\u1EEA\u1EEC\u1EEE\u1EF0\u1EF2\u1EF4\u1EF6\u1EF8\u1EFA\u1EFC\u1EFE\u1F08-\u1F0F\u1F18-\u1F1D\u1F28-\u1F2F\u1F38-\u1F3F\u1F48-\u1F4D\u1F59\u1F5B\u1F5D\u1F5F\u1F68-\u1F6F\u1FB8-\u1FBB\u1FC8-\u1FCB\u1FD8-\u1FDB\u1FE8-\u1FEC\u1FF8-\u1FFB\u2102\u2107\u210B-\u210D\u2110-\u2112\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u2130-\u2133\u213E\u213F\u2145\u2183\u2C00-\u2C2E\u2C60\u2C62-\u2C64\u2C67\u2C69\u2C6B\u2C6D-\u2C70\u2C72\u2C75\u2C7E-\u2C80\u2C82\u2C84\u2C86\u2C88\u2C8A\u2C8C\u2C8E\u2C90\u2C92\u2C94\u2C96\u2C98\u2C9A\u2C9C\u2C9E\u2CA0\u2CA2\u2CA4\u2CA6\u2CA8\u2CAA\u2CAC\u2CAE\u2CB0\u2CB2\u2CB4\u2CB6\u2CB8\u2CBA\u2CBC\u2CBE\u2CC0\u2CC2\u2CC4\u2CC6\u2CC8\u2CCA\u2CCC\u2CCE\u2CD0\u2CD2\u2CD4\u2CD6\u2CD8\u2CDA\u2CDC\u2CDE\u2CE0\u2CE2\u2CEB\u2CED\u2CF2\uA640\uA642\uA644\uA646\uA648\uA64A\uA64C\uA64E\uA650\uA652\uA654\uA656\uA658\uA65A\uA65C\uA65E\uA660\uA662\uA664\uA666\uA668\uA66A\uA66C\uA680\uA682\uA684\uA686\uA688\uA68A\uA68C\uA68E\uA690\uA692\uA694\uA696\uA722\uA724\uA726\uA728\uA72A\uA72C\uA72E\uA732\uA734\uA736\uA738\uA73A\uA73C\uA73E\uA740\uA742\uA744\uA746\uA748\uA74A\uA74C\uA74E\uA750\uA752\uA754\uA756\uA758\uA75A\uA75C\uA75E\uA760\uA762\uA764\uA766\uA768\uA76A\uA76C\uA76E\uA779\uA77B\uA77D\uA77E\uA780\uA782\uA784\uA786\uA78B\uA78D\uA790\uA792\uA7A0\uA7A2\uA7A4\uA7A6\uA7A8\uA7AA\uFF21-\uFF3A\u0030-\u0039\u00B2\u00B3\u00B9\u00BC-\u00BE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D66-\u0D75\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19])/g
7437
7438
7439/***/ },
7440/* 204 */
7441/*!**********************************************************************!*\
7442 !*** ./~/snake-case/~/sentence-case/vendor/trailing-digit-regexp.js ***!
7443 \**********************************************************************/
7444/***/ function(module, exports) {
7445
7446 module.exports = /([\u0030-\u0039\u00B2\u00B3\u00B9\u00BC-\u00BE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D66-\u0D75\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19])([^\u0030-\u0039\u00B2\u00B3\u00B9\u00BC-\u00BE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D66-\u0D75\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19])/g
7447
7448
7449/***/ },
7450/* 205 */
7451/*!********************************!*\
7452 !*** ./src/util/check-args.js ***!
7453 \********************************/
7454/***/ function(module, exports, __webpack_require__) {
7455
7456 'use strict';
7457
7458 exports.__esModule = true;
7459 exports.default = checkArgs;
7460
7461 var _ordinal = __webpack_require__(/*! ./ordinal.js */ 206);
7462
7463 var _ordinal2 = _interopRequireDefault(_ordinal);
7464
7465 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
7466
7467 // Validation helper
7468 function checkArgs(name, args) {
7469 var _ref = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2];
7470
7471 var _ref$nullable = _ref.nullable;
7472 var nullable = _ref$nullable === undefined ? false : _ref$nullable;
7473 var _ref$minArgs = _ref.minArgs;
7474 var minArgs = _ref$minArgs === undefined ? 1 : _ref$minArgs;
7475 var _ref$maxArgs = _ref.maxArgs;
7476 var maxArgs = _ref$maxArgs === undefined ? 1 : _ref$maxArgs;
7477
7478 if (minArgs === maxArgs && args.length !== minArgs) {
7479 var plural = minArgs === 1 ? '' : 's';
7480 throw new Error(name + ' must receive exactly ' + minArgs + ' argument' + plural);
7481 }
7482 if (args.length < minArgs) {
7483 var plural1 = minArgs === 1 ? '' : 's';
7484 throw new Error(name + ' must receive at least ' + minArgs + ' argument' + plural1 + '.');
7485 }
7486 if (args.length > maxArgs) {
7487 var plural2 = maxArgs === 1 ? '' : 's';
7488 throw new Error(name + ' accepts at most ' + maxArgs + ' argument' + plural2 + '.');
7489 }
7490 for (var i = 0; i < args.length; i++) {
7491 if (!nullable && args[i] === null) {
7492 var ordinality = maxArgs !== 1 ? ' ' + (0, _ordinal2.default)(i + 1) : '';
7493 throw new Error('The' + ordinality + ' argument to ' + name + ' must be non-null');
7494 }
7495 if (args[i] === undefined) {
7496 throw new Error('The ' + (0, _ordinal2.default)(i + 1) + ' argument to ' + name + ' must be defined');
7497 }
7498 }
7499 }
7500
7501/***/ },
7502/* 206 */
7503/*!*****************************!*\
7504 !*** ./src/util/ordinal.js ***!
7505 \*****************************/
7506/***/ function(module, exports) {
7507
7508 "use strict";
7509
7510 exports.__esModule = true;
7511 exports.default = ordinal;
7512 function ordinal(x) {
7513 if ([11, 12, 13].indexOf(x) !== -1) {
7514 return x + "th";
7515 } else if (x % 10 === 1) {
7516 return x + "st";
7517 } else if (x % 10 === 2) {
7518 return x + "nd";
7519 } else if (x % 10 === 3) {
7520 return x + "rd";
7521 }
7522 return x + "th";
7523 }
7524
7525/***/ },
7526/* 207 */
7527/*!***************************************!*\
7528 !*** ./src/util/valid-index-value.js ***!
7529 \***************************************/
7530/***/ function(module, exports, __webpack_require__) {
7531
7532 'use strict';
7533
7534 exports.__esModule = true;
7535
7536 var _typeof2 = __webpack_require__(/*! babel-runtime/helpers/typeof */ 107);
7537
7538 var _typeof3 = _interopRequireDefault(_typeof2);
7539
7540 exports.default = validIndexValue;
7541
7542 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
7543
7544 // Checks whether the return value is a valid primary or secondary
7545 // index value in RethinkDB.
7546 function validIndexValue(val) {
7547 if (val === null) {
7548 return false;
7549 }
7550 if (['boolean', 'number', 'string'].indexOf(typeof val === 'undefined' ? 'undefined' : (0, _typeof3.default)(val)) !== -1) {
7551 return true;
7552 }
7553 if (Array.isArray(val)) {
7554 var _ret = function () {
7555 var containsBad = false;
7556 val.forEach(function (v) {
7557 containsBad = containsBad || validIndexValue(v);
7558 });
7559 return {
7560 v: containsBad
7561 };
7562 }();
7563
7564 if ((typeof _ret === 'undefined' ? 'undefined' : (0, _typeof3.default)(_ret)) === "object") return _ret.v;
7565 }
7566 return false;
7567 }
7568
7569/***/ },
7570/* 208 */
7571/*!******************************!*\
7572 !*** ./src/serialization.js ***!
7573 \******************************/
7574/***/ function(module, exports, __webpack_require__) {
7575
7576 'use strict';
7577
7578 exports.__esModule = true;
7579
7580 var _typeof2 = __webpack_require__(/*! babel-runtime/helpers/typeof */ 107);
7581
7582 var _typeof3 = _interopRequireDefault(_typeof2);
7583
7584 exports.deserialize = deserialize;
7585 exports.serialize = serialize;
7586
7587 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
7588
7589 var PRIMITIVES = ['string', 'number', 'boolean', 'function', 'symbol'];
7590
7591 function modifyObject(doc) {
7592 Object.keys(doc).forEach(function (key) {
7593 doc[key] = deserialize(doc[key]);
7594 });
7595 return doc;
7596 }
7597
7598 function deserialize(value) {
7599 if (value == null) {
7600 return value;
7601 } else if (PRIMITIVES.indexOf(typeof value === 'undefined' ? 'undefined' : (0, _typeof3.default)(value)) !== -1) {
7602 return value;
7603 } else if (Array.isArray(value)) {
7604 return value.map(deserialize);
7605 } else if (value.$reql_type$ === 'TIME') {
7606 var date = new Date();
7607 date.setTime(value.epoch_time * 1000);
7608 return date;
7609 } else {
7610 return modifyObject(value);
7611 }
7612 }
7613
7614 function jsonifyObject(doc) {
7615 Object.keys(doc).forEach(function (key) {
7616 doc[key] = serialize(doc[key]);
7617 });
7618 return doc;
7619 }
7620
7621 function serialize(value) {
7622 if (value == null) {
7623 return value;
7624 } else if (PRIMITIVES.indexOf(typeof value === 'undefined' ? 'undefined' : (0, _typeof3.default)(value)) !== -1) {
7625 return value;
7626 } else if (Array.isArray(value)) {
7627 return value.map(serialize);
7628 } else if (value instanceof Date) {
7629 return {
7630 $reql_type$: 'TIME',
7631 epoch_time: value.getTime() / 1000,
7632 // Rethink will serialize this as "+00:00", but accepts Z
7633 timezone: 'Z'
7634 };
7635 } else {
7636 return jsonifyObject(value);
7637 }
7638 }
7639
7640/***/ },
7641/* 209 */
7642/*!***********************!*\
7643 !*** ./src/socket.js ***!
7644 \***********************/
7645/***/ function(module, exports, __webpack_require__) {
7646
7647 'use strict';
7648
7649 var _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 183);
7650
7651 var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
7652
7653 var _possibleConstructorReturn2 = __webpack_require__(/*! babel-runtime/helpers/possibleConstructorReturn */ 106);
7654
7655 var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
7656
7657 var _inherits2 = __webpack_require__(/*! babel-runtime/helpers/inherits */ 175);
7658
7659 var _inherits3 = _interopRequireDefault(_inherits2);
7660
7661 var _AsyncSubject = __webpack_require__(/*! rxjs/AsyncSubject */ 210);
7662
7663 var _BehaviorSubject = __webpack_require__(/*! rxjs/BehaviorSubject */ 211);
7664
7665 var _Subject2 = __webpack_require__(/*! rxjs/Subject */ 187);
7666
7667 var _Observable = __webpack_require__(/*! rxjs/Observable */ 78);
7668
7669 var _merge = __webpack_require__(/*! rxjs/observable/merge */ 212);
7670
7671 var _filter = __webpack_require__(/*! rxjs/operator/filter */ 104);
7672
7673 var _share = __webpack_require__(/*! rxjs/operator/share */ 215);
7674
7675 var _shim = __webpack_require__(/*! ./shim.js */ 216);
7676
7677 var _serialization = __webpack_require__(/*! ./serialization.js */ 208);
7678
7679 var _logging = __webpack_require__(/*! ./logging.js */ 217);
7680
7681 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
7682
7683 var PROTOCOL_VERSION = 'rethinkdb-horizon-v0';
7684
7685 // Before connecting the first time
7686 var STATUS_UNCONNECTED = { type: 'unconnected' };
7687 // After the websocket is opened, but before handshake
7688 var STATUS_CONNECTED = { type: 'connected' };
7689 // After the websocket is opened and handshake is completed
7690 var STATUS_READY = { type: 'ready' };
7691 // After unconnected, maybe before or after connected. Any socket level error
7692 var STATUS_ERROR = { type: 'error' };
7693 // Occurs when the socket closes
7694 var STATUS_DISCONNECTED = { type: 'disconnected' };
7695
7696 var ProtocolError = function (_Error) {
7697 (0, _inherits3.default)(ProtocolError, _Error);
7698
7699 function ProtocolError(msg, errorCode) {
7700 (0, _classCallCheck3.default)(this, ProtocolError);
7701
7702 var _this = (0, _possibleConstructorReturn3.default)(this, _Error.call(this, msg));
7703
7704 _this.errorCode = errorCode;
7705 return _this;
7706 }
7707
7708 ProtocolError.prototype.toString = function toString() {
7709 return this.message + ' (Code: ' + this.errorCode + ')';
7710 };
7711
7712 return ProtocolError;
7713 }(Error);
7714
7715 // Wraps native websockets with a Subject, which is both an Subscriber
7716 // and an Observable (it is bi-directional after all!). This
7717 // implementation is adapted from Rx.DOM.fromWebSocket and
7718 // RxSocketSubject by Ben Lesh, but it also deals with some simple
7719 // protocol level things like serializing from/to JSON, routing
7720 // request_ids, looking at the `state` field to decide when an
7721 // observable is closed.
7722
7723
7724 var HorizonSocket = function (_Subject) {
7725 (0, _inherits3.default)(HorizonSocket, _Subject);
7726
7727 function HorizonSocket(host, secure, path, handshaker) {
7728 var _context;
7729
7730 (0, _classCallCheck3.default)(this, HorizonSocket);
7731
7732 var hostString = 'ws' + (secure ? 's' : '') + '://' + host + '/' + path;
7733 var msgBuffer = [];
7734 var ws = void 0,
7735 handshakeDisp = void 0;
7736 // Handshake is an asyncsubject because we want it to always cache
7737 // the last value it received, like a promise
7738 var handshake = new _AsyncSubject.AsyncSubject();
7739 var statusSubject = new _BehaviorSubject.BehaviorSubject(STATUS_UNCONNECTED);
7740
7741 var isOpen = function isOpen() {
7742 return Boolean(ws) && ws.readyState === _shim.WebSocket.OPEN;
7743 };
7744
7745 // Serializes to a string before sending
7746 function wsSend(msg) {
7747 var stringMsg = JSON.stringify((0, _serialization.serialize)(msg));
7748 ws.send(stringMsg);
7749 }
7750
7751 // This is the observable part of the Subject. It forwards events
7752 // from the underlying websocket
7753 var socketObservable = (_context = _Observable.Observable.create(function (subscriber) {
7754 ws = new _shim.WebSocket(hostString, PROTOCOL_VERSION);
7755 ws.onerror = function () {
7756 // If the websocket experiences the error, we forward it through
7757 // to the observable. Unfortunately, the event we receive in
7758 // this callback doesn't tell us much of anything, so there's no
7759 // reason to forward it on and we just send a generic error.
7760 statusSubject.next(STATUS_ERROR);
7761 var errMsg = 'Websocket ' + hostString + ' experienced an error';
7762 subscriber.error(new Error(errMsg));
7763 };
7764 ws.onopen = function () {
7765 // Send the handshake
7766 statusSubject.next(STATUS_CONNECTED);
7767 handshakeDisp = _this2.makeRequest(handshaker()).subscribe(function (x) {
7768 handshake.next(x);
7769 handshake.complete();
7770
7771 handshake.next(STATUS_READY);
7772 }, function (err) {
7773 return handshake.error(err);
7774 }, function () {
7775 return handshake.complete();
7776 });
7777 // Send any messages that have been buffered
7778 while (msgBuffer.length > 0) {
7779 var msg = msgBuffer.shift();
7780 (0, _logging.log)('Sending buffered:', msg);
7781 wsSend(msg);
7782 }
7783 };
7784 ws.onmessage = function (event) {
7785 var deserialized = (0, _serialization.deserialize)(JSON.parse(event.data));
7786 (0, _logging.log)('Received', deserialized);
7787 subscriber.next(deserialized);
7788 };
7789 ws.onclose = function (e) {
7790 // This will happen if the socket is closed by the server If
7791 // .close is called from the client (see closeSocket), this
7792 // listener will be removed
7793 statusSubject.next(STATUS_DISCONNECTED);
7794 if (e.code !== 1000 || !e.wasClean) {
7795 subscriber.error(new Error('Socket closed unexpectedly with code: ' + e.code));
7796 } else {
7797 subscriber.complete();
7798 }
7799 };
7800 return function () {
7801 if (handshakeDisp) {
7802 handshakeDisp.unsubscribe();
7803 }
7804 // This is the "unsubscribe" method on the final Subject
7805 closeSocket(1000, '');
7806 };
7807 }), _share.share).call(_context); // This makes it a "hot" observable, and refCounts it
7808 // Note possible edge cases: the `share` operator is equivalent to
7809 // .multicast(() => new Subject()).refCount() // RxJS 5
7810 // .multicast(new Subject()).refCount() // RxJS 4
7811
7812 // This is the Subscriber part of the Subject. How we can send stuff
7813 // over the websocket
7814 var socketSubscriber = {
7815 next: function next(messageToSend) {
7816 // When next is called on this subscriber
7817 // Note: If we aren't ready, the message is silently dropped
7818 if (isOpen()) {
7819 (0, _logging.log)('Sending', messageToSend);
7820 wsSend(messageToSend); // wsSend serializes to a string
7821 } else {
7822 (0, _logging.log)('Buffering', messageToSend);
7823 msgBuffer.push(messageToSend);
7824 }
7825 },
7826 error: function error(_error) {
7827 // The subscriber is receiving an error. Better close the
7828 // websocket with an error
7829 if (!_error.code) {
7830 throw new Error('no code specified. Be sure to pass ' + '{ code: ###, reason: "" } to error()');
7831 }
7832 closeSocket(_error.code, _error.reason);
7833 },
7834 complete: function complete() {
7835 // complete for the subscriber here is equivalent to "close
7836 // this socket successfully (which is what code 1000 is)"
7837 closeSocket(1000, '');
7838 }
7839 };
7840
7841 function closeSocket(code, reason) {
7842 statusSubject.next(STATUS_DISCONNECTED);
7843 if (!code) {
7844 ws.close(); // successful close
7845 } else {
7846 ws.close(code, reason);
7847 }
7848 ws.onopen = undefined;
7849 ws.onclose = undefined;
7850 ws.onmessage = undefined;
7851 }
7852
7853 // Subscriptions will be the observable containing all
7854 // queries/writes/changefeed requests. Specifically, the documents
7855 // that initiate them, each one with a different request_id
7856
7857 var _this2 = (0, _possibleConstructorReturn3.default)(this, _Subject.call(this, socketSubscriber, socketObservable));
7858
7859 var subscriptions = new _Subject2.Subject();
7860 // Unsubscriptions is similar, only it holds only requests to
7861 // close a particular request_id on the server. Currently we only
7862 // need these for changefeeds.
7863 var unsubscriptions = new _Subject2.Subject();
7864 var outgoing = _merge.merge.call(_Observable.Observable, subscriptions, unsubscriptions);
7865 // How many requests are outstanding
7866 var activeRequests = 0;
7867 // Monotonically increasing counter for request_ids
7868 var requestCounter = 0;
7869 // Unsubscriber for subscriptions/unsubscriptions
7870 var subDisp = null;
7871 // Now that super has been called, we can add attributes to this
7872 _this2.handshake = handshake;
7873 // Lets external users keep track of the current websocket status
7874 // without causing it to connect
7875 _this2.status = statusSubject;
7876
7877 var incrementActive = function incrementActive() {
7878 if (++activeRequests === 1) {
7879 // We subscribe the socket itself to the subscription and
7880 // unsubscription requests. Since the socket is both an
7881 // observable and an subscriber. Here it's acting as an subscriber,
7882 // watching our requests.
7883 subDisp = outgoing.subscribe(_this2);
7884 }
7885 };
7886
7887 // Decrement the number of active requests on the socket, and
7888 // close the socket if we're the last request
7889 var decrementActive = function decrementActive() {
7890 if (--activeRequests === 0) {
7891 subDisp.unsubscribe();
7892 }
7893 };
7894
7895 // This is used externally to send requests to the server
7896 _this2.makeRequest = function (rawRequest) {
7897 return _Observable.Observable.create(function (reqSubscriber) {
7898 // Get a new request id
7899 var request_id = requestCounter++;
7900 // Add the request id to the request and the unsubscribe request
7901 // if there is one
7902 rawRequest.request_id = request_id;
7903 var unsubscribeRequest = void 0;
7904 if (rawRequest.type === 'subscribe') {
7905 unsubscribeRequest = { request_id: request_id, type: 'end_subscription' };
7906 }
7907 // First, increment activeRequests and decide if we need to
7908 // connect to the socket
7909 incrementActive();
7910
7911 // Now send the request to the server
7912 subscriptions.next(rawRequest);
7913
7914 // Create an observable from the socket that filters by request_id
7915 var unsubscribeFilter = _filter.filter.call(_this2, function (x) {
7916 return x.request_id === request_id;
7917 }).subscribe(function (resp) {
7918 // Need to faithfully end the stream if there is an error
7919 if (resp.error !== undefined) {
7920 reqSubscriber.error(new ProtocolError(resp.error, resp.error_code));
7921 } else if (resp.data !== undefined || resp.token !== undefined) {
7922 try {
7923 reqSubscriber.next(resp);
7924 } catch (e) {}
7925 }
7926 if (resp.state === 'synced') {
7927 // Create a little dummy object for sync notifications
7928 reqSubscriber.next({
7929 type: 'state',
7930 state: 'synced'
7931 });
7932 } else if (resp.state === 'complete') {
7933 reqSubscriber.complete();
7934 }
7935 }, function (err) {
7936 return reqSubscriber.error(err);
7937 }, function () {
7938 return reqSubscriber.complete();
7939 });
7940 return function () {
7941 // Unsubscribe if necessary
7942 if (unsubscribeRequest) {
7943 unsubscriptions.next(unsubscribeRequest);
7944 }
7945 decrementActive();
7946 unsubscribeFilter.unsubscribe();
7947 };
7948 });
7949 };
7950 return _this2;
7951 }
7952
7953 return HorizonSocket;
7954 }(_Subject2.Subject);
7955
7956 module.exports = HorizonSocket;
7957
7958/***/ },
7959/* 210 */
7960/*!********************************!*\
7961 !*** ./~/rxjs/AsyncSubject.js ***!
7962 \********************************/
7963/***/ function(module, exports, __webpack_require__) {
7964
7965 "use strict";
7966 var __extends = (this && this.__extends) || function (d, b) {
7967 for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
7968 function __() { this.constructor = d; }
7969 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
7970 };
7971 var Subject_1 = __webpack_require__(/*! ./Subject */ 187);
7972 /**
7973 * @class AsyncSubject<T>
7974 */
7975 var AsyncSubject = (function (_super) {
7976 __extends(AsyncSubject, _super);
7977 function AsyncSubject() {
7978 _super.apply(this, arguments);
7979 this.value = null;
7980 this.hasNext = false;
7981 }
7982 AsyncSubject.prototype._subscribe = function (subscriber) {
7983 if (this.hasCompleted && this.hasNext) {
7984 subscriber.next(this.value);
7985 }
7986 return _super.prototype._subscribe.call(this, subscriber);
7987 };
7988 AsyncSubject.prototype._next = function (value) {
7989 this.value = value;
7990 this.hasNext = true;
7991 };
7992 AsyncSubject.prototype._complete = function () {
7993 var index = -1;
7994 var observers = this.observers;
7995 var len = observers.length;
7996 // optimization to block our SubjectSubscriptions from
7997 // splicing themselves out of the observers list one by one.
7998 this.isUnsubscribed = true;
7999 if (this.hasNext) {
8000 while (++index < len) {
8001 var o = observers[index];
8002 o.next(this.value);
8003 o.complete();
8004 }
8005 }
8006 else {
8007 while (++index < len) {
8008 observers[index].complete();
8009 }
8010 }
8011 this.isUnsubscribed = false;
8012 this.unsubscribe();
8013 };
8014 return AsyncSubject;
8015 }(Subject_1.Subject));
8016 exports.AsyncSubject = AsyncSubject;
8017 //# sourceMappingURL=AsyncSubject.js.map
8018
8019/***/ },
8020/* 211 */
8021/*!***********************************!*\
8022 !*** ./~/rxjs/BehaviorSubject.js ***!
8023 \***********************************/
8024/***/ function(module, exports, __webpack_require__) {
8025
8026 "use strict";
8027 var __extends = (this && this.__extends) || function (d, b) {
8028 for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
8029 function __() { this.constructor = d; }
8030 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
8031 };
8032 var Subject_1 = __webpack_require__(/*! ./Subject */ 187);
8033 var throwError_1 = __webpack_require__(/*! ./util/throwError */ 189);
8034 var ObjectUnsubscribedError_1 = __webpack_require__(/*! ./util/ObjectUnsubscribedError */ 190);
8035 /**
8036 * @class BehaviorSubject<T>
8037 */
8038 var BehaviorSubject = (function (_super) {
8039 __extends(BehaviorSubject, _super);
8040 function BehaviorSubject(_value) {
8041 _super.call(this);
8042 this._value = _value;
8043 }
8044 BehaviorSubject.prototype.getValue = function () {
8045 if (this.hasErrored) {
8046 throwError_1.throwError(this.errorValue);
8047 }
8048 else if (this.isUnsubscribed) {
8049 throwError_1.throwError(new ObjectUnsubscribedError_1.ObjectUnsubscribedError());
8050 }
8051 else {
8052 return this._value;
8053 }
8054 };
8055 Object.defineProperty(BehaviorSubject.prototype, "value", {
8056 get: function () {
8057 return this.getValue();
8058 },
8059 enumerable: true,
8060 configurable: true
8061 });
8062 BehaviorSubject.prototype._subscribe = function (subscriber) {
8063 var subscription = _super.prototype._subscribe.call(this, subscriber);
8064 if (subscription && !subscription.isUnsubscribed) {
8065 subscriber.next(this._value);
8066 }
8067 return subscription;
8068 };
8069 BehaviorSubject.prototype._next = function (value) {
8070 _super.prototype._next.call(this, this._value = value);
8071 };
8072 BehaviorSubject.prototype._error = function (err) {
8073 this.hasErrored = true;
8074 _super.prototype._error.call(this, this.errorValue = err);
8075 };
8076 return BehaviorSubject;
8077 }(Subject_1.Subject));
8078 exports.BehaviorSubject = BehaviorSubject;
8079 //# sourceMappingURL=BehaviorSubject.js.map
8080
8081/***/ },
8082/* 212 */
8083/*!************************************!*\
8084 !*** ./~/rxjs/observable/merge.js ***!
8085 \************************************/
8086/***/ function(module, exports, __webpack_require__) {
8087
8088 "use strict";
8089 var merge_1 = __webpack_require__(/*! ../operator/merge */ 213);
8090 exports.merge = merge_1.mergeStatic;
8091 //# sourceMappingURL=merge.js.map
8092
8093/***/ },
8094/* 213 */
8095/*!**********************************!*\
8096 !*** ./~/rxjs/operator/merge.js ***!
8097 \**********************************/
8098/***/ function(module, exports, __webpack_require__) {
8099
8100 "use strict";
8101 var ArrayObservable_1 = __webpack_require__(/*! ../observable/ArrayObservable */ 92);
8102 var mergeAll_1 = __webpack_require__(/*! ./mergeAll */ 214);
8103 var isScheduler_1 = __webpack_require__(/*! ../util/isScheduler */ 74);
8104 /**
8105 * Creates an output Observable which concurrently emits all values from every
8106 * given input Observable.
8107 *
8108 * <span class="informal">Flattens multiple Observables together by blending
8109 * their values into one Observable.</span>
8110 *
8111 * <img src="./img/merge.png" width="100%">
8112 *
8113 * `merge` subscribes to each given input Observable (either the source or an
8114 * Observable given as argument), and simply forwards (without doing any
8115 * transformation) all the values from all the input Observables to the output
8116 * Observable. The output Observable only completes once all input Observables
8117 * have completed. Any error delivered by an input Observable will be immediately
8118 * emitted on the output Observable.
8119 *
8120 * @example <caption>Merge together two Observables: 1s interval and clicks</caption>
8121 * var clicks = Rx.Observable.fromEvent(document, 'click');
8122 * var timer = Rx.Observable.interval(1000);
8123 * var clicksOrTimer = clicks.merge(timer);
8124 * clicksOrTimer.subscribe(x => console.log(x));
8125 *
8126 * @example <caption>Merge together 3 Observables, but only 2 run concurrently</caption>
8127 * var timer1 = Rx.Observable.interval(1000).take(10);
8128 * var timer2 = Rx.Observable.interval(2000).take(6);
8129 * var timer3 = Rx.Observable.interval(500).take(10);
8130 * var concurrent = 2; // the argument
8131 * var merged = timer1.merge(timer2, timer3, concurrent);
8132 * merged.subscribe(x => console.log(x));
8133 *
8134 * @see {@link mergeAll}
8135 * @see {@link mergeMap}
8136 * @see {@link mergeMapTo}
8137 * @see {@link mergeScan}
8138 *
8139 * @param {Observable} other An input Observable to merge with the source
8140 * Observable. More than one input Observables may be given as argument.
8141 * @param {number} [concurrent=Number.POSITIVE_INFINITY] Maximum number of input
8142 * Observables being subscribed to concurrently.
8143 * @param {Scheduler} [scheduler=null] The Scheduler to use for managing
8144 * concurrency of input Observables.
8145 * @return {Observable} an Observable that emits items that are the result of
8146 * every input Observable.
8147 * @method merge
8148 * @owner Observable
8149 */
8150 function merge() {
8151 var observables = [];
8152 for (var _i = 0; _i < arguments.length; _i++) {
8153 observables[_i - 0] = arguments[_i];
8154 }
8155 observables.unshift(this);
8156 return mergeStatic.apply(this, observables);
8157 }
8158 exports.merge = merge;
8159 /* tslint:enable:max-line-length */
8160 /**
8161 * Creates an output Observable which concurrently emits all values from every
8162 * given input Observable.
8163 *
8164 * <span class="informal">Flattens multiple Observables together by blending
8165 * their values into one Observable.</span>
8166 *
8167 * <img src="./img/merge.png" width="100%">
8168 *
8169 * `merge` subscribes to each given input Observable (as arguments), and simply
8170 * forwards (without doing any transformation) all the values from all the input
8171 * Observables to the output Observable. The output Observable only completes
8172 * once all input Observables have completed. Any error delivered by an input
8173 * Observable will be immediately emitted on the output Observable.
8174 *
8175 * @example <caption>Merge together two Observables: 1s interval and clicks</caption>
8176 * var clicks = Rx.Observable.fromEvent(document, 'click');
8177 * var timer = Rx.Observable.interval(1000);
8178 * var clicksOrTimer = Rx.Observable.merge(clicks, timer);
8179 * clicksOrTimer.subscribe(x => console.log(x));
8180 *
8181 * @example <caption>Merge together 3 Observables, but only 2 run concurrently</caption>
8182 * var timer1 = Rx.Observable.interval(1000).take(10);
8183 * var timer2 = Rx.Observable.interval(2000).take(6);
8184 * var timer3 = Rx.Observable.interval(500).take(10);
8185 * var concurrent = 2; // the argument
8186 * var merged = Rx.Observable.merge(timer1, timer2, timer3, concurrent);
8187 * merged.subscribe(x => console.log(x));
8188 *
8189 * @see {@link mergeAll}
8190 * @see {@link mergeMap}
8191 * @see {@link mergeMapTo}
8192 * @see {@link mergeScan}
8193 *
8194 * @param {Observable} input1 An input Observable to merge with others.
8195 * @param {Observable} input2 An input Observable to merge with others.
8196 * @param {number} [concurrent=Number.POSITIVE_INFINITY] Maximum number of input
8197 * Observables being subscribed to concurrently.
8198 * @param {Scheduler} [scheduler=null] The Scheduler to use for managing
8199 * concurrency of input Observables.
8200 * @return {Observable} an Observable that emits items that are the result of
8201 * every input Observable.
8202 * @static true
8203 * @name merge
8204 * @owner Observable
8205 */
8206 function mergeStatic() {
8207 var observables = [];
8208 for (var _i = 0; _i < arguments.length; _i++) {
8209 observables[_i - 0] = arguments[_i];
8210 }
8211 var concurrent = Number.POSITIVE_INFINITY;
8212 var scheduler = null;
8213 var last = observables[observables.length - 1];
8214 if (isScheduler_1.isScheduler(last)) {
8215 scheduler = observables.pop();
8216 if (observables.length > 1 && typeof observables[observables.length - 1] === 'number') {
8217 concurrent = observables.pop();
8218 }
8219 }
8220 else if (typeof last === 'number') {
8221 concurrent = observables.pop();
8222 }
8223 if (observables.length === 1) {
8224 return observables[0];
8225 }
8226 return new ArrayObservable_1.ArrayObservable(observables, scheduler).lift(new mergeAll_1.MergeAllOperator(concurrent));
8227 }
8228 exports.mergeStatic = mergeStatic;
8229 //# sourceMappingURL=merge.js.map
8230
8231/***/ },
8232/* 214 */
8233/*!*************************************!*\
8234 !*** ./~/rxjs/operator/mergeAll.js ***!
8235 \*************************************/
8236/***/ function(module, exports, __webpack_require__) {
8237
8238 "use strict";
8239 var __extends = (this && this.__extends) || function (d, b) {
8240 for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
8241 function __() { this.constructor = d; }
8242 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
8243 };
8244 var OuterSubscriber_1 = __webpack_require__(/*! ../OuterSubscriber */ 103);
8245 var subscribeToResult_1 = __webpack_require__(/*! ../util/subscribeToResult */ 101);
8246 /**
8247 * Converts a higher-order Observable into a first-order Observable which
8248 * concurrently delivers all values that are emitted on the inner Observables.
8249 *
8250 * <span class="informal">Flattens an Observable-of-Observables.</span>
8251 *
8252 * <img src="./img/mergeAll.png" width="100%">
8253 *
8254 * `mergeAll` subscribes to an Observable that emits Observables, also known as
8255 * a higher-order Observable. Each time it observes one of these emitted inner
8256 * Observables, it subscribes to that and delivers all the values from the
8257 * inner Observable on the output Observable. The output Observable only
8258 * completes once all inner Observables have completed. Any error delivered by
8259 * a inner Observable will be immediately emitted on the output Observable.
8260 *
8261 * @example <caption>Spawn a new interval Observable for each click event, and blend their outputs as one Observable</caption>
8262 * var clicks = Rx.Observable.fromEvent(document, 'click');
8263 * var higherOrder = clicks.map((ev) => Rx.Observable.interval(1000));
8264 * var firstOrder = higherOrder.mergeAll();
8265 * firstOrder.subscribe(x => console.log(x));
8266 *
8267 * @example <caption>Count from 0 to 9 every second for each click, but only allow 2 concurrent timers</caption>
8268 * var clicks = Rx.Observable.fromEvent(document, 'click');
8269 * var higherOrder = clicks.map((ev) => Rx.Observable.interval(1000).take(10));
8270 * var firstOrder = higherOrder.mergeAll(2);
8271 * firstOrder.subscribe(x => console.log(x));
8272 *
8273 * @see {@link combineAll}
8274 * @see {@link concatAll}
8275 * @see {@link exhaust}
8276 * @see {@link merge}
8277 * @see {@link mergeMap}
8278 * @see {@link mergeMapTo}
8279 * @see {@link mergeScan}
8280 * @see {@link switch}
8281 * @see {@link zipAll}
8282 *
8283 * @param {number} [concurrent=Number.POSITIVE_INFINITY] Maximum number of inner
8284 * Observables being subscribed to concurrently.
8285 * @return {Observable} An Observable that emits values coming from all the
8286 * inner Observables emitted by the source Observable.
8287 * @method mergeAll
8288 * @owner Observable
8289 */
8290 function mergeAll(concurrent) {
8291 if (concurrent === void 0) { concurrent = Number.POSITIVE_INFINITY; }
8292 return this.lift(new MergeAllOperator(concurrent));
8293 }
8294 exports.mergeAll = mergeAll;
8295 var MergeAllOperator = (function () {
8296 function MergeAllOperator(concurrent) {
8297 this.concurrent = concurrent;
8298 }
8299 MergeAllOperator.prototype.call = function (observer, source) {
8300 return source._subscribe(new MergeAllSubscriber(observer, this.concurrent));
8301 };
8302 return MergeAllOperator;
8303 }());
8304 exports.MergeAllOperator = MergeAllOperator;
8305 /**
8306 * We need this JSDoc comment for affecting ESDoc.
8307 * @ignore
8308 * @extends {Ignored}
8309 */
8310 var MergeAllSubscriber = (function (_super) {
8311 __extends(MergeAllSubscriber, _super);
8312 function MergeAllSubscriber(destination, concurrent) {
8313 _super.call(this, destination);
8314 this.concurrent = concurrent;
8315 this.hasCompleted = false;
8316 this.buffer = [];
8317 this.active = 0;
8318 }
8319 MergeAllSubscriber.prototype._next = function (observable) {
8320 if (this.active < this.concurrent) {
8321 this.active++;
8322 this.add(subscribeToResult_1.subscribeToResult(this, observable));
8323 }
8324 else {
8325 this.buffer.push(observable);
8326 }
8327 };
8328 MergeAllSubscriber.prototype._complete = function () {
8329 this.hasCompleted = true;
8330 if (this.active === 0 && this.buffer.length === 0) {
8331 this.destination.complete();
8332 }
8333 };
8334 MergeAllSubscriber.prototype.notifyComplete = function (innerSub) {
8335 var buffer = this.buffer;
8336 this.remove(innerSub);
8337 this.active--;
8338 if (buffer.length > 0) {
8339 this._next(buffer.shift());
8340 }
8341 else if (this.active === 0 && this.hasCompleted) {
8342 this.destination.complete();
8343 }
8344 };
8345 return MergeAllSubscriber;
8346 }(OuterSubscriber_1.OuterSubscriber));
8347 exports.MergeAllSubscriber = MergeAllSubscriber;
8348 //# sourceMappingURL=mergeAll.js.map
8349
8350/***/ },
8351/* 215 */
8352/*!**********************************!*\
8353 !*** ./~/rxjs/operator/share.js ***!
8354 \**********************************/
8355/***/ function(module, exports, __webpack_require__) {
8356
8357 "use strict";
8358 var multicast_1 = __webpack_require__(/*! ./multicast */ 195);
8359 var Subject_1 = __webpack_require__(/*! ../Subject */ 187);
8360 function shareSubjectFactory() {
8361 return new Subject_1.Subject();
8362 }
8363 /**
8364 * Returns a new Observable that multicasts (shares) the original Observable. As long as there is at least one
8365 * Subscriber this Observable will be subscribed and emitting data. When all subscribers have unsubscribed it will
8366 * unsubscribe from the source Observable. Because the Observable is multicasting it makes the stream `hot`.
8367 * This is an alias for .publish().refCount().
8368 *
8369 * <img src="./img/share.png" width="100%">
8370 *
8371 * @return {Observable<T>} an Observable that upon connection causes the source Observable to emit items to its Observers
8372 * @method share
8373 * @owner Observable
8374 */
8375 function share() {
8376 return multicast_1.multicast.call(this, shareSubjectFactory).refCount();
8377 }
8378 exports.share = share;
8379 ;
8380 //# sourceMappingURL=share.js.map
8381
8382/***/ },
8383/* 216 */
8384/*!*********************!*\
8385 !*** ./src/shim.js ***!
8386 \*********************/
8387/***/ function(module, exports) {
8388
8389 "use strict";
8390
8391 /* global WebSocket */
8392
8393 // Check for websocket
8394 if (typeof WebSocket !== 'undefined') {
8395 module.exports.WebSocket = WebSocket;
8396 } else {
8397 module.exports.WebSocket = function () {
8398 console.error("Tried to use WebSocket but it isn't defined or polyfilled");
8399 };
8400 }
8401
8402/***/ },
8403/* 217 */
8404/*!************************!*\
8405 !*** ./src/logging.js ***!
8406 \************************/
8407/***/ function(module, exports) {
8408
8409 "use strict";
8410
8411 // Logging moved to its own module to avoid circular imports
8412
8413 var debug = false;
8414
8415 module.exports = {
8416 log: function log() {
8417 var _console;
8418
8419 return debug ? (_console = console).log.apply(_console, arguments) : undefined;
8420 },
8421 logError: function logError() {
8422 var _console2;
8423
8424 return debug ? (_console2 = console).error.apply(_console2, arguments) : undefined;
8425 },
8426 enableLogging: function enableLogging() {
8427 var deb = arguments.length <= 0 || arguments[0] === undefined ? true : arguments[0];
8428 debug = deb;
8429 }
8430 };
8431
8432/***/ },
8433/* 218 */
8434/*!*********************!*\
8435 !*** ./src/auth.js ***!
8436 \*********************/
8437/***/ function(module, exports, __webpack_require__) {
8438
8439 'use strict';
8440
8441 exports.__esModule = true;
8442 exports.TokenStorage = undefined;
8443
8444 var _typeof2 = __webpack_require__(/*! babel-runtime/helpers/typeof */ 107);
8445
8446 var _typeof3 = _interopRequireDefault(_typeof2);
8447
8448 var _classCallCheck2 = __webpack_require__(/*! babel-runtime/helpers/classCallCheck */ 183);
8449
8450 var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
8451
8452 exports.authEndpoint = authEndpoint;
8453 exports.clearAuthTokens = clearAuthTokens;
8454
8455 var _queryParse = __webpack_require__(/*! ./util/query-parse */ 219);
8456
8457 var _queryParse2 = _interopRequireDefault(_queryParse);
8458
8459 var _Observable = __webpack_require__(/*! rxjs/Observable */ 78);
8460
8461 var _map = __webpack_require__(/*! rxjs/operator/map */ 198);
8462
8463 var _fetch = __webpack_require__(/*! ./util/fetch.js */ 220);
8464
8465 var _fetch2 = _interopRequireDefault(_fetch);
8466
8467 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
8468
8469 var HORIZON_JWT = 'horizon-jwt';
8470
8471 /** @this Horizon **/
8472 function authEndpoint(name) {
8473 var _this = this;
8474
8475 var endpointForName = function endpointForName(methods) {
8476 if (methods.hasOwnProperty(name)) {
8477 return methods[name];
8478 } else {
8479 throw new Error('Unconfigured auth type: ' + name);
8480 }
8481 };
8482 if (!this._authMethods) {
8483 var _context;
8484
8485 console.log('No auth methods, have to fetch');
8486 return (_context = (0, _fetch2.default)(this._horizonPath + '/auth_methods').do(function (authMethods) {
8487 _this._authMethods = authMethods;
8488 }), _map.map).call(_context, endpointForName);
8489 } else {
8490 var _context2;
8491
8492 return (_context2 = _Observable.Observable.of(this._authMethods), _map.map).call(_context2, endpointForName);
8493 }
8494 }
8495
8496 // Simple shim to make a Map look like local/session storage
8497
8498 var FakeStorage = function () {
8499 function FakeStorage() {
8500 (0, _classCallCheck3.default)(this, FakeStorage);
8501 this._storage = new Map();
8502 }
8503
8504 FakeStorage.prototype.setItem = function setItem(a, b) {
8505 return this._storage.set(a, b);
8506 };
8507
8508 FakeStorage.prototype.getItem = function getItem(a) {
8509 return this._storage.get(a);
8510 };
8511
8512 FakeStorage.prototype.removeItem = function removeItem(a) {
8513 return this._storage.delete(a);
8514 };
8515
8516 return FakeStorage;
8517 }();
8518
8519 function getStorage() {
8520 try {
8521 if ((typeof window === 'undefined' ? 'undefined' : (0, _typeof3.default)(window)) !== 'object' || window.localStorage === undefined) {
8522 return new FakeStorage();
8523 }
8524 window.localStorage.setItem('$$fake', 1);
8525 window.localStorage.removeItem('$$fake');
8526 return window.localStorage;
8527 } catch (error) {
8528 if (window.sessionStorage === undefined) {
8529 return new FakeStorage();
8530 } else {
8531 return window.sessionStorage;
8532 }
8533 }
8534 }
8535
8536 var TokenStorage = exports.TokenStorage = function () {
8537 function TokenStorage() {
8538 var authType = arguments.length <= 0 || arguments[0] === undefined ? 'unauthenticated' : arguments[0];
8539 (0, _classCallCheck3.default)(this, TokenStorage);
8540
8541 this._storage = getStorage();
8542 this._authType = authType;
8543 }
8544
8545 TokenStorage.prototype.set = function set(jwt) {
8546 return this._storage.setItem(HORIZON_JWT, jwt);
8547 };
8548
8549 TokenStorage.prototype.get = function get() {
8550 return this._storage.getItem(HORIZON_JWT);
8551 };
8552
8553 TokenStorage.prototype.remove = function remove() {
8554 return this._storage.removeItem(HORIZON_JWT);
8555 };
8556
8557 TokenStorage.prototype.setAuthFromQueryParams = function setAuthFromQueryParams() {
8558 var parsed = (0, _queryParse2.default)(window.location.search);
8559 if (parsed.horizon_auth != null) {
8560 this.set(parsed.horizon_auth);
8561 }
8562 };
8563
8564 // Handshake types are implemented here
8565
8566
8567 TokenStorage.prototype.handshake = function handshake() {
8568 // If we have a token, we should send it rather than requesting a
8569 // new one
8570 var token = this.get();
8571 if (token != null) {
8572 return { method: 'token', token: token };
8573 } else if (this._authType === 'token') {
8574 throw new Error('Attempting to authenticate with a token, but no token is present');
8575 } else {
8576 return { method: this._authType };
8577 }
8578 };
8579
8580 // Whether there is an auth token for the provided authType
8581
8582
8583 TokenStorage.prototype.hasAuthToken = function hasAuthToken() {
8584 return Boolean(this.get());
8585 };
8586
8587 return TokenStorage;
8588 }();
8589
8590 function clearAuthTokens() {
8591 return getStorage().removeItem(HORIZON_JWT);
8592 }
8593
8594/***/ },
8595/* 219 */
8596/*!*********************************!*\
8597 !*** ./src/util/query-parse.js ***!
8598 \*********************************/
8599/***/ function(module, exports) {
8600
8601 'use strict';
8602
8603 exports.__esModule = true;
8604
8605 exports.default = function (str) {
8606 if (typeof str !== 'string') {
8607 return {};
8608 }
8609
8610 var str2 = str.trim().replace(/^(\?|#|&)/, '');
8611
8612 if (!str2) {
8613 return {};
8614 }
8615
8616 return str2.split('&').reduce(function (ret, param) {
8617 var parts = param.replace(/\+/g, ' ').split('=');
8618 // Firefox (pre 40) decodes `%3D` to `=`
8619 // https://github.com/sindresorhus/query-string/pull/37
8620 var key = parts.shift();
8621 var val = parts.length > 0 ? parts.join('=') : undefined;
8622
8623 var key2 = decodeURIComponent(key);
8624
8625 // missing `=` should be `null`:
8626 // http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters
8627 var val2 = val === undefined ? null : decodeURIComponent(val);
8628
8629 if (!ret.hasOwnProperty(key2)) {
8630 ret[key2] = val2;
8631 } else if (Array.isArray(ret[key2])) {
8632 ret[key2].push(val2);
8633 } else {
8634 ret[key2] = [ret[key2], val2];
8635 }
8636
8637 return ret;
8638 }, {});
8639 };
8640
8641/***/ },
8642/* 220 */
8643/*!***************************!*\
8644 !*** ./src/util/fetch.js ***!
8645 \***************************/
8646/***/ function(module, exports, __webpack_require__) {
8647
8648 'use strict';
8649
8650 exports.__esModule = true;
8651 exports.default = fetchJSON;
8652
8653 var _Observable = __webpack_require__(/*! rxjs/Observable */ 78);
8654
8655 var _fromPromise = __webpack_require__(/*! rxjs/observable/fromPromise */ 221);
8656
8657 var _map = __webpack_require__(/*! rxjs/operator/map */ 198);
8658
8659 var _isomorphicFetch = __webpack_require__(/*! isomorphic-fetch */ 222);
8660
8661 var _isomorphicFetch2 = _interopRequireDefault(_isomorphicFetch);
8662
8663 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
8664
8665 function fetchJSON(url) {
8666 var _context;
8667
8668 return (_context = _fromPromise.fromPromise.call(_Observable.Observable, (0, _isomorphicFetch2.default)(url)), _map.map).call(_context, function (response) {
8669 return response.json();
8670 });
8671 }
8672
8673/***/ },
8674/* 221 */
8675/*!******************************************!*\
8676 !*** ./~/rxjs/observable/fromPromise.js ***!
8677 \******************************************/
8678/***/ function(module, exports, __webpack_require__) {
8679
8680 "use strict";
8681 var PromiseObservable_1 = __webpack_require__(/*! ./PromiseObservable */ 75);
8682 exports.fromPromise = PromiseObservable_1.PromiseObservable.create;
8683 //# sourceMappingURL=fromPromise.js.map
8684
8685/***/ },
8686/* 222 */
8687/*!****************************************************!*\
8688 !*** ./~/isomorphic-fetch/fetch-npm-browserify.js ***!
8689 \****************************************************/
8690/***/ function(module, exports, __webpack_require__) {
8691
8692 // the whatwg-fetch polyfill installs the fetch() function
8693 // on the global object (window or self)
8694 //
8695 // Return that as the export for use in Webpack, Browserify etc.
8696 __webpack_require__(/*! whatwg-fetch */ 223);
8697 module.exports = self.fetch.bind(self);
8698
8699
8700/***/ },
8701/* 223 */
8702/*!****************************************************!*\
8703 !*** ./~/isomorphic-fetch/~/whatwg-fetch/fetch.js ***!
8704 \****************************************************/
8705/***/ function(module, exports) {
8706
8707 (function(self) {
8708 'use strict';
8709
8710 if (self.fetch) {
8711 return
8712 }
8713
8714 var support = {
8715 searchParams: 'URLSearchParams' in self,
8716 iterable: 'Symbol' in self && 'iterator' in Symbol,
8717 blob: 'FileReader' in self && 'Blob' in self && (function() {
8718 try {
8719 new Blob()
8720 return true
8721 } catch(e) {
8722 return false
8723 }
8724 })(),
8725 formData: 'FormData' in self,
8726 arrayBuffer: 'ArrayBuffer' in self
8727 }
8728
8729 function normalizeName(name) {
8730 if (typeof name !== 'string') {
8731 name = String(name)
8732 }
8733 if (/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(name)) {
8734 throw new TypeError('Invalid character in header field name')
8735 }
8736 return name.toLowerCase()
8737 }
8738
8739 function normalizeValue(value) {
8740 if (typeof value !== 'string') {
8741 value = String(value)
8742 }
8743 return value
8744 }
8745
8746 // Build a destructive iterator for the value list
8747 function iteratorFor(items) {
8748 var iterator = {
8749 next: function() {
8750 var value = items.shift()
8751 return {done: value === undefined, value: value}
8752 }
8753 }
8754
8755 if (support.iterable) {
8756 iterator[Symbol.iterator] = function() {
8757 return iterator
8758 }
8759 }
8760
8761 return iterator
8762 }
8763
8764 function Headers(headers) {
8765 this.map = {}
8766
8767 if (headers instanceof Headers) {
8768 headers.forEach(function(value, name) {
8769 this.append(name, value)
8770 }, this)
8771
8772 } else if (headers) {
8773 Object.getOwnPropertyNames(headers).forEach(function(name) {
8774 this.append(name, headers[name])
8775 }, this)
8776 }
8777 }
8778
8779 Headers.prototype.append = function(name, value) {
8780 name = normalizeName(name)
8781 value = normalizeValue(value)
8782 var list = this.map[name]
8783 if (!list) {
8784 list = []
8785 this.map[name] = list
8786 }
8787 list.push(value)
8788 }
8789
8790 Headers.prototype['delete'] = function(name) {
8791 delete this.map[normalizeName(name)]
8792 }
8793
8794 Headers.prototype.get = function(name) {
8795 var values = this.map[normalizeName(name)]
8796 return values ? values[0] : null
8797 }
8798
8799 Headers.prototype.getAll = function(name) {
8800 return this.map[normalizeName(name)] || []
8801 }
8802
8803 Headers.prototype.has = function(name) {
8804 return this.map.hasOwnProperty(normalizeName(name))
8805 }
8806
8807 Headers.prototype.set = function(name, value) {
8808 this.map[normalizeName(name)] = [normalizeValue(value)]
8809 }
8810
8811 Headers.prototype.forEach = function(callback, thisArg) {
8812 Object.getOwnPropertyNames(this.map).forEach(function(name) {
8813 this.map[name].forEach(function(value) {
8814 callback.call(thisArg, value, name, this)
8815 }, this)
8816 }, this)
8817 }
8818
8819 Headers.prototype.keys = function() {
8820 var items = []
8821 this.forEach(function(value, name) { items.push(name) })
8822 return iteratorFor(items)
8823 }
8824
8825 Headers.prototype.values = function() {
8826 var items = []
8827 this.forEach(function(value) { items.push(value) })
8828 return iteratorFor(items)
8829 }
8830
8831 Headers.prototype.entries = function() {
8832 var items = []
8833 this.forEach(function(value, name) { items.push([name, value]) })
8834 return iteratorFor(items)
8835 }
8836
8837 if (support.iterable) {
8838 Headers.prototype[Symbol.iterator] = Headers.prototype.entries
8839 }
8840
8841 function consumed(body) {
8842 if (body.bodyUsed) {
8843 return Promise.reject(new TypeError('Already read'))
8844 }
8845 body.bodyUsed = true
8846 }
8847
8848 function fileReaderReady(reader) {
8849 return new Promise(function(resolve, reject) {
8850 reader.onload = function() {
8851 resolve(reader.result)
8852 }
8853 reader.onerror = function() {
8854 reject(reader.error)
8855 }
8856 })
8857 }
8858
8859 function readBlobAsArrayBuffer(blob) {
8860 var reader = new FileReader()
8861 reader.readAsArrayBuffer(blob)
8862 return fileReaderReady(reader)
8863 }
8864
8865 function readBlobAsText(blob) {
8866 var reader = new FileReader()
8867 reader.readAsText(blob)
8868 return fileReaderReady(reader)
8869 }
8870
8871 function Body() {
8872 this.bodyUsed = false
8873
8874 this._initBody = function(body) {
8875 this._bodyInit = body
8876 if (typeof body === 'string') {
8877 this._bodyText = body
8878 } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {
8879 this._bodyBlob = body
8880 } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {
8881 this._bodyFormData = body
8882 } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
8883 this._bodyText = body.toString()
8884 } else if (!body) {
8885 this._bodyText = ''
8886 } else if (support.arrayBuffer && ArrayBuffer.prototype.isPrototypeOf(body)) {
8887 // Only support ArrayBuffers for POST method.
8888 // Receiving ArrayBuffers happens via Blobs, instead.
8889 } else {
8890 throw new Error('unsupported BodyInit type')
8891 }
8892
8893 if (!this.headers.get('content-type')) {
8894 if (typeof body === 'string') {
8895 this.headers.set('content-type', 'text/plain;charset=UTF-8')
8896 } else if (this._bodyBlob && this._bodyBlob.type) {
8897 this.headers.set('content-type', this._bodyBlob.type)
8898 } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
8899 this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8')
8900 }
8901 }
8902 }
8903
8904 if (support.blob) {
8905 this.blob = function() {
8906 var rejected = consumed(this)
8907 if (rejected) {
8908 return rejected
8909 }
8910
8911 if (this._bodyBlob) {
8912 return Promise.resolve(this._bodyBlob)
8913 } else if (this._bodyFormData) {
8914 throw new Error('could not read FormData body as blob')
8915 } else {
8916 return Promise.resolve(new Blob([this._bodyText]))
8917 }
8918 }
8919
8920 this.arrayBuffer = function() {
8921 return this.blob().then(readBlobAsArrayBuffer)
8922 }
8923
8924 this.text = function() {
8925 var rejected = consumed(this)
8926 if (rejected) {
8927 return rejected
8928 }
8929
8930 if (this._bodyBlob) {
8931 return readBlobAsText(this._bodyBlob)
8932 } else if (this._bodyFormData) {
8933 throw new Error('could not read FormData body as text')
8934 } else {
8935 return Promise.resolve(this._bodyText)
8936 }
8937 }
8938 } else {
8939 this.text = function() {
8940 var rejected = consumed(this)
8941 return rejected ? rejected : Promise.resolve(this._bodyText)
8942 }
8943 }
8944
8945 if (support.formData) {
8946 this.formData = function() {
8947 return this.text().then(decode)
8948 }
8949 }
8950
8951 this.json = function() {
8952 return this.text().then(JSON.parse)
8953 }
8954
8955 return this
8956 }
8957
8958 // HTTP methods whose capitalization should be normalized
8959 var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']
8960
8961 function normalizeMethod(method) {
8962 var upcased = method.toUpperCase()
8963 return (methods.indexOf(upcased) > -1) ? upcased : method
8964 }
8965
8966 function Request(input, options) {
8967 options = options || {}
8968 var body = options.body
8969 if (Request.prototype.isPrototypeOf(input)) {
8970 if (input.bodyUsed) {
8971 throw new TypeError('Already read')
8972 }
8973 this.url = input.url
8974 this.credentials = input.credentials
8975 if (!options.headers) {
8976 this.headers = new Headers(input.headers)
8977 }
8978 this.method = input.method
8979 this.mode = input.mode
8980 if (!body) {
8981 body = input._bodyInit
8982 input.bodyUsed = true
8983 }
8984 } else {
8985 this.url = input
8986 }
8987
8988 this.credentials = options.credentials || this.credentials || 'omit'
8989 if (options.headers || !this.headers) {
8990 this.headers = new Headers(options.headers)
8991 }
8992 this.method = normalizeMethod(options.method || this.method || 'GET')
8993 this.mode = options.mode || this.mode || null
8994 this.referrer = null
8995
8996 if ((this.method === 'GET' || this.method === 'HEAD') && body) {
8997 throw new TypeError('Body not allowed for GET or HEAD requests')
8998 }
8999 this._initBody(body)
9000 }
9001
9002 Request.prototype.clone = function() {
9003 return new Request(this)
9004 }
9005
9006 function decode(body) {
9007 var form = new FormData()
9008 body.trim().split('&').forEach(function(bytes) {
9009 if (bytes) {
9010 var split = bytes.split('=')
9011 var name = split.shift().replace(/\+/g, ' ')
9012 var value = split.join('=').replace(/\+/g, ' ')
9013 form.append(decodeURIComponent(name), decodeURIComponent(value))
9014 }
9015 })
9016 return form
9017 }
9018
9019 function headers(xhr) {
9020 var head = new Headers()
9021 var pairs = (xhr.getAllResponseHeaders() || '').trim().split('\n')
9022 pairs.forEach(function(header) {
9023 var split = header.trim().split(':')
9024 var key = split.shift().trim()
9025 var value = split.join(':').trim()
9026 head.append(key, value)
9027 })
9028 return head
9029 }
9030
9031 Body.call(Request.prototype)
9032
9033 function Response(bodyInit, options) {
9034 if (!options) {
9035 options = {}
9036 }
9037
9038 this.type = 'default'
9039 this.status = options.status
9040 this.ok = this.status >= 200 && this.status < 300
9041 this.statusText = options.statusText
9042 this.headers = options.headers instanceof Headers ? options.headers : new Headers(options.headers)
9043 this.url = options.url || ''
9044 this._initBody(bodyInit)
9045 }
9046
9047 Body.call(Response.prototype)
9048
9049 Response.prototype.clone = function() {
9050 return new Response(this._bodyInit, {
9051 status: this.status,
9052 statusText: this.statusText,
9053 headers: new Headers(this.headers),
9054 url: this.url
9055 })
9056 }
9057
9058 Response.error = function() {
9059 var response = new Response(null, {status: 0, statusText: ''})
9060 response.type = 'error'
9061 return response
9062 }
9063
9064 var redirectStatuses = [301, 302, 303, 307, 308]
9065
9066 Response.redirect = function(url, status) {
9067 if (redirectStatuses.indexOf(status) === -1) {
9068 throw new RangeError('Invalid status code')
9069 }
9070
9071 return new Response(null, {status: status, headers: {location: url}})
9072 }
9073
9074 self.Headers = Headers
9075 self.Request = Request
9076 self.Response = Response
9077
9078 self.fetch = function(input, init) {
9079 return new Promise(function(resolve, reject) {
9080 var request
9081 if (Request.prototype.isPrototypeOf(input) && !init) {
9082 request = input
9083 } else {
9084 request = new Request(input, init)
9085 }
9086
9087 var xhr = new XMLHttpRequest()
9088
9089 function responseURL() {
9090 if ('responseURL' in xhr) {
9091 return xhr.responseURL
9092 }
9093
9094 // Avoid security warnings on getResponseHeader when not allowed by CORS
9095 if (/^X-Request-URL:/m.test(xhr.getAllResponseHeaders())) {
9096 return xhr.getResponseHeader('X-Request-URL')
9097 }
9098
9099 return
9100 }
9101
9102 xhr.onload = function() {
9103 var options = {
9104 status: xhr.status,
9105 statusText: xhr.statusText,
9106 headers: headers(xhr),
9107 url: responseURL()
9108 }
9109 var body = 'response' in xhr ? xhr.response : xhr.responseText
9110 resolve(new Response(body, options))
9111 }
9112
9113 xhr.onerror = function() {
9114 reject(new TypeError('Network request failed'))
9115 }
9116
9117 xhr.ontimeout = function() {
9118 reject(new TypeError('Network request failed'))
9119 }
9120
9121 xhr.open(request.method, request.url, true)
9122
9123 if (request.credentials === 'include') {
9124 xhr.withCredentials = true
9125 }
9126
9127 if ('responseType' in xhr && support.blob) {
9128 xhr.responseType = 'blob'
9129 }
9130
9131 request.headers.forEach(function(value, name) {
9132 xhr.setRequestHeader(name, value)
9133 })
9134
9135 xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)
9136 })
9137 }
9138 self.fetch.polyfill = true
9139 })(typeof self !== 'undefined' ? self : this);
9140
9141
9142/***/ }
9143/******/ ])
9144});
9145;
9146//# sourceMappingURL=horizon-dev.js.map
\No newline at end of file