1 |
|
2 | (function webpackUniversalModuleDefinition(root, factory) {
|
3 | if(typeof exports === 'object' && typeof module === 'object')
|
4 | module.exports = factory(require("rxjs"));
|
5 | else if(typeof define === 'function' && define.amd)
|
6 | define(["rxjs"], factory);
|
7 | else if(typeof exports === 'object')
|
8 | exports["Horizon"] = factory(require("rxjs"));
|
9 | else
|
10 | root["Horizon"] = factory(root["Rx"]);
|
11 | })(this, function(__WEBPACK_EXTERNAL_MODULE_1__) {
|
12 | return (function(modules) {
|
13 |
|
14 | var installedModules = {};
|
15 |
|
16 |
|
17 | function __webpack_require__(moduleId) {
|
18 |
|
19 |
|
20 | if(installedModules[moduleId])
|
21 | return installedModules[moduleId].exports;
|
22 |
|
23 |
|
24 | var module = installedModules[moduleId] = {
|
25 | exports: {},
|
26 | id: moduleId,
|
27 | loaded: false
|
28 | };
|
29 |
|
30 |
|
31 | modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
32 |
|
33 |
|
34 | module.loaded = true;
|
35 |
|
36 |
|
37 | return module.exports;
|
38 | }
|
39 |
|
40 |
|
41 |
|
42 | __webpack_require__.m = modules;
|
43 |
|
44 |
|
45 | __webpack_require__.c = installedModules;
|
46 |
|
47 |
|
48 | __webpack_require__.p = "";
|
49 |
|
50 |
|
51 | return __webpack_require__(0);
|
52 | })
|
53 |
|
54 | ([
|
55 |
|
56 |
|
57 |
|
58 |
|
59 | function(module, exports, __webpack_require__) {
|
60 |
|
61 | 'use strict';
|
62 |
|
63 | var _from = __webpack_require__( 1);
|
64 |
|
65 | var _catch2 = __webpack_require__( 1);
|
66 |
|
67 | var _concatMap = __webpack_require__( 1);
|
68 |
|
69 | var _filter = __webpack_require__( 1);
|
70 |
|
71 | var _require = __webpack_require__( 1);
|
72 |
|
73 | var Observable = _require.Observable;
|
74 |
|
75 | var _require2 = __webpack_require__( 2);
|
76 |
|
77 | var Collection = _require2.Collection;
|
78 |
|
79 | var HorizonSocket = __webpack_require__( 91);
|
80 |
|
81 | var _require3 = __webpack_require__( 93);
|
82 |
|
83 | var log = _require3.log;
|
84 | var logError = _require3.logError;
|
85 | var enableLogging = _require3.enableLogging;
|
86 |
|
87 | var _require4 = __webpack_require__( 94);
|
88 |
|
89 | var authEndpoint = _require4.authEndpoint;
|
90 | var TokenStorage = _require4.TokenStorage;
|
91 | var clearAuthTokens = _require4.clearAuthTokens;
|
92 |
|
93 |
|
94 | var defaultHost = typeof window !== 'undefined' && window.location && '' + window.location.host || 'localhost:8181';
|
95 | var defaultSecure = typeof window !== 'undefined' && window.location && window.location.protocol === 'https:' || false;
|
96 |
|
97 | function Horizon() {
|
98 | var _context;
|
99 |
|
100 | var _ref = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
|
101 |
|
102 | var _ref$host = _ref.host;
|
103 | var host = _ref$host === undefined ? defaultHost : _ref$host;
|
104 | var _ref$secure = _ref.secure;
|
105 | var secure = _ref$secure === undefined ? defaultSecure : _ref$secure;
|
106 | var _ref$path = _ref.path;
|
107 | var path = _ref$path === undefined ? 'horizon' : _ref$path;
|
108 | var _ref$lazyWrites = _ref.lazyWrites;
|
109 | var lazyWrites = _ref$lazyWrites === undefined ? false : _ref$lazyWrites;
|
110 | var _ref$authType = _ref.authType;
|
111 | var authType = _ref$authType === undefined ? 'unauthenticated' : _ref$authType;
|
112 |
|
113 |
|
114 |
|
115 | var tokenStorage = new TokenStorage(authType);
|
116 | tokenStorage.setAuthFromQueryParams();
|
117 |
|
118 | var socket = new HorizonSocket(host, secure, path, tokenStorage.handshake.bind(tokenStorage));
|
119 |
|
120 |
|
121 |
|
122 | socket.handshake.subscribe(function (handshake) {
|
123 | return tokenStorage.set(handshake.token);
|
124 | });
|
125 |
|
126 |
|
127 |
|
128 |
|
129 | function horizon(name) {
|
130 | return new Collection(sendRequest, name, lazyWrites);
|
131 | }
|
132 |
|
133 | horizon.dispose = function () {
|
134 | socket.complete();
|
135 | };
|
136 |
|
137 |
|
138 |
|
139 |
|
140 |
|
141 | horizon.connect = function () {
|
142 | var onError = arguments.length <= 0 || arguments[0] === undefined ? function (err) {
|
143 | console.error('Received an error: ' + err);
|
144 | } : arguments[0];
|
145 |
|
146 | socket.subscribe(function () {}, onError);
|
147 | };
|
148 |
|
149 |
|
150 |
|
151 | horizon.status = subscribeOrObservable(socket.status);
|
152 |
|
153 |
|
154 | horizon.onDisconnected = subscribeOrObservable((_context = socket.status, _filter.filter).call(_context, function (x) {
|
155 | return x.type === 'disconnected';
|
156 | }));
|
157 |
|
158 |
|
159 | horizon.onConnected = subscribeOrObservable((_context = socket.status, _filter.filter).call(_context, function (x) {
|
160 | return x.type === 'connected';
|
161 | }));
|
162 |
|
163 |
|
164 | horizon.onReady = subscribeOrObservable((_context = socket.status, _filter.filter).call(_context, function (x) {
|
165 | return x.type === 'ready';
|
166 | }));
|
167 |
|
168 |
|
169 | horizon.onSocketError = subscribeOrObservable((_context = socket.status, _filter.filter).call(_context, function (x) {
|
170 | return x.type === 'error';
|
171 | }));
|
172 |
|
173 | horizon._authMethods = null;
|
174 | horizon._horizonPath = path;
|
175 | horizon.authEndpoint = authEndpoint;
|
176 | horizon.hasAuthToken = tokenStorage.hasAuthToken.bind(tokenStorage);
|
177 |
|
178 | return horizon;
|
179 |
|
180 |
|
181 |
|
182 | function sendRequest(type, options) {
|
183 | var _context2;
|
184 |
|
185 |
|
186 | var normalizedType = type === 'removeAll' ? 'remove' : type;
|
187 | return (_context2 = (_context2 = socket.makeRequest({ type: normalizedType, options: options })
|
188 | , _concatMap.concatMap).call(_context2, function (resp) {
|
189 |
|
190 | if (resp.data) {
|
191 | return _from.from.call(Observable, resp.data);
|
192 | } else {
|
193 |
|
194 | return _from.from.call(Observable, [{ state: resp.state, type: resp.type }]);
|
195 | }
|
196 | }), _catch2._catch).call(_context2, function (e) {
|
197 | return Observable.create(function (observer) {
|
198 | observer.error(e);
|
199 | });
|
200 | });
|
201 | }
|
202 | }
|
203 |
|
204 | function subscribeOrObservable(observable) {
|
205 | return function () {
|
206 | if (arguments.length > 0) {
|
207 | return observable.subscribe.apply(observable, arguments);
|
208 | } else {
|
209 | return observable;
|
210 | }
|
211 | };
|
212 | }
|
213 |
|
214 | Horizon.log = log;
|
215 | Horizon.logError = logError;
|
216 | Horizon.enableLogging = enableLogging;
|
217 | Horizon.Socket = HorizonSocket;
|
218 | Horizon.clearAuthTokens = clearAuthTokens;
|
219 |
|
220 | module.exports = Horizon;
|
221 |
|
222 | },
|
223 |
|
224 |
|
225 |
|
226 |
|
227 | function(module, exports) {
|
228 |
|
229 | module.exports = __WEBPACK_EXTERNAL_MODULE_1__;
|
230 |
|
231 | },
|
232 |
|
233 |
|
234 |
|
235 |
|
236 | function(module, exports, __webpack_require__) {
|
237 |
|
238 | 'use strict';
|
239 |
|
240 | var _possibleConstructorReturn2 = __webpack_require__( 3);
|
241 |
|
242 | var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
|
243 |
|
244 | var _inherits2 = __webpack_require__( 72);
|
245 |
|
246 | var _inherits3 = _interopRequireDefault(_inherits2);
|
247 |
|
248 | var _typeof2 = __webpack_require__( 4);
|
249 |
|
250 | var _typeof3 = _interopRequireDefault(_typeof2);
|
251 |
|
252 | var _classCallCheck2 = __webpack_require__( 80);
|
253 |
|
254 | var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
255 |
|
256 | var _Observable = __webpack_require__( 1);
|
257 |
|
258 | var _empty = __webpack_require__( 1);
|
259 |
|
260 | var _publishReplay = __webpack_require__( 1);
|
261 |
|
262 | var _scan = __webpack_require__( 1);
|
263 |
|
264 | var _filter = __webpack_require__( 1);
|
265 |
|
266 | var _map = __webpack_require__( 1);
|
267 |
|
268 | var _snakeCase = __webpack_require__( 81);
|
269 |
|
270 | var _snakeCase2 = _interopRequireDefault(_snakeCase);
|
271 |
|
272 | var _checkArgs = __webpack_require__( 87);
|
273 |
|
274 | var _checkArgs2 = _interopRequireDefault(_checkArgs);
|
275 |
|
276 | var _validIndexValue = __webpack_require__( 89);
|
277 |
|
278 | var _validIndexValue2 = _interopRequireDefault(_validIndexValue);
|
279 |
|
280 | var _serialization = __webpack_require__( 90);
|
281 |
|
282 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
283 |
|
284 | |
285 |
|
286 |
|
287 |
|
288 |
|
289 |
|
290 |
|
291 |
|
292 | function checkIfLegalToChain(key) {
|
293 | if (this._legalMethods.indexOf(key) === -1) {
|
294 | throw new Error(key + ' cannot be called on the current query');
|
295 | }
|
296 | if ((0, _snakeCase2.default)(key) in this._query) {
|
297 | throw new Error(key + ' has already been called on this query');
|
298 | }
|
299 | }
|
300 |
|
301 |
|
302 |
|
303 | var TermBase = function () {
|
304 | function TermBase(sendRequest, query, legalMethods) {
|
305 | (0, _classCallCheck3.default)(this, TermBase);
|
306 |
|
307 | this._sendRequest = sendRequest;
|
308 | this._query = query;
|
309 | this._legalMethods = legalMethods;
|
310 | }
|
311 |
|
312 |
|
313 |
|
314 |
|
315 |
|
316 |
|
317 |
|
318 | TermBase.prototype.watch = function watch() {
|
319 | var _ref = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
|
320 |
|
321 | var _ref$rawChanges = _ref.rawChanges;
|
322 | var rawChanges = _ref$rawChanges === undefined ? false : _ref$rawChanges;
|
323 |
|
324 | var raw = this._sendRequest('subscribe', this._query);
|
325 | if (rawChanges) {
|
326 | return raw;
|
327 | } else {
|
328 | return makePresentable(raw, this._query);
|
329 | }
|
330 | };
|
331 |
|
332 |
|
333 |
|
334 |
|
335 |
|
336 | TermBase.prototype.fetch = function fetch() {
|
337 | return this._sendRequest('query', this._query);
|
338 | };
|
339 |
|
340 | TermBase.prototype.findAll = function findAll() {
|
341 | for (var _len = arguments.length, fieldValues = Array(_len), _key = 0; _key < _len; _key++) {
|
342 | fieldValues[_key] = arguments[_key];
|
343 | }
|
344 |
|
345 | checkIfLegalToChain.call(this, 'findAll');
|
346 | (0, _checkArgs2.default)('findAll', arguments, { maxArgs: 100 });
|
347 | return new FindAll(this._sendRequest, this._query, fieldValues);
|
348 | };
|
349 |
|
350 | TermBase.prototype.find = function find(idOrObject) {
|
351 | checkIfLegalToChain.call(this, 'find');
|
352 | (0, _checkArgs2.default)('find', arguments);
|
353 | return new Find(this._sendRequest, this._query, idOrObject);
|
354 | };
|
355 |
|
356 | TermBase.prototype.order = function order(fields) {
|
357 | var direction = arguments.length <= 1 || arguments[1] === undefined ? 'ascending' : arguments[1];
|
358 |
|
359 | checkIfLegalToChain.call(this, 'order');
|
360 | (0, _checkArgs2.default)('order', arguments, { minArgs: 1, maxArgs: 2 });
|
361 | return new Order(this._sendRequest, this._query, fields, direction);
|
362 | };
|
363 |
|
364 | TermBase.prototype.above = function above(aboveSpec) {
|
365 | var bound = arguments.length <= 1 || arguments[1] === undefined ? 'closed' : arguments[1];
|
366 |
|
367 | checkIfLegalToChain.call(this, 'above');
|
368 | (0, _checkArgs2.default)('above', arguments, { minArgs: 1, maxArgs: 2 });
|
369 | return new Above(this._sendRequest, this._query, aboveSpec, bound);
|
370 | };
|
371 |
|
372 | TermBase.prototype.below = function below(belowSpec) {
|
373 | var bound = arguments.length <= 1 || arguments[1] === undefined ? 'open' : arguments[1];
|
374 |
|
375 | checkIfLegalToChain.call(this, 'below');
|
376 | (0, _checkArgs2.default)('below', arguments, { minArgs: 1, maxArgs: 2 });
|
377 | return new Below(this._sendRequest, this._query, belowSpec, bound);
|
378 | };
|
379 |
|
380 | TermBase.prototype.limit = function limit(size) {
|
381 | checkIfLegalToChain.call(this, 'limit');
|
382 | (0, _checkArgs2.default)('limit', arguments);
|
383 | return new Limit(this._sendRequest, this._query, size);
|
384 | };
|
385 |
|
386 | return TermBase;
|
387 | }();
|
388 |
|
389 |
|
390 |
|
391 |
|
392 |
|
393 |
|
394 |
|
395 |
|
396 | function makePresentable(observable, query) {
|
397 |
|
398 | var pointQuery = Boolean(query.find);
|
399 |
|
400 | if (pointQuery) {
|
401 | var _ret = function () {
|
402 | var _context;
|
403 |
|
404 | var hasEmitted = false;
|
405 | var seedVal = null;
|
406 |
|
407 | return {
|
408 | v: (_context = _filter.filter.call(observable, function (change) {
|
409 | return !hasEmitted || change.type !== 'state';
|
410 | }), _scan.scan).call(_context, function (previous, change) {
|
411 | hasEmitted = true;
|
412 | if (change.state === 'synced') {
|
413 | return previous;
|
414 | } else {
|
415 | return change.new_val;
|
416 | }
|
417 | }, seedVal)
|
418 | };
|
419 | }();
|
420 |
|
421 | if ((typeof _ret === 'undefined' ? 'undefined' : (0, _typeof3.default)(_ret)) === "object") return _ret.v;
|
422 | } else {
|
423 | var _context2;
|
424 |
|
425 | var _seedVal = { emitted: false, val: [] };
|
426 | return (_context2 = (_context2 = _scan.scan.call(observable, function (state, change) {
|
427 | if (change.state === 'synced') {
|
428 | state.emitted = true;
|
429 | }
|
430 | state.val = applyChange(state.val.slice(), change);
|
431 | return state;
|
432 | }, _seedVal), _filter.filter).call(_context2, function (state) {
|
433 | return state.emitted;
|
434 | }), _map.map).call(_context2, function (x) {
|
435 | return x.val;
|
436 | });
|
437 | }
|
438 | }
|
439 |
|
440 | function applyChange(arr, change) {
|
441 | switch (change.type) {
|
442 | case 'remove':
|
443 | case 'uninitial':
|
444 | {
|
445 |
|
446 | if (change.old_offset != null) {
|
447 | arr.splice(change.old_offset, 1);
|
448 | } else {
|
449 | var index = arr.findIndex(function (x) {
|
450 | return x.id === change.old_val.id;
|
451 | });
|
452 | arr.splice(index, 1);
|
453 | }
|
454 | break;
|
455 | }
|
456 | case 'add':
|
457 | case 'initial':
|
458 | {
|
459 |
|
460 | if (change.new_offset != null) {
|
461 |
|
462 | arr.splice(change.new_offset, 0, change.new_val);
|
463 | } else {
|
464 |
|
465 | arr.push(change.new_val);
|
466 | }
|
467 | break;
|
468 | }
|
469 | case 'change':
|
470 | {
|
471 |
|
472 | if (change.old_offset != null) {
|
473 |
|
474 | arr.splice(change.old_offset, 1);
|
475 | }
|
476 | if (change.new_offset != null) {
|
477 |
|
478 | arr.splice(change.new_offset, 0, change.new_val);
|
479 | } else {
|
480 |
|
481 |
|
482 | var _index = arr.findIndex(function (x) {
|
483 | return x.id === change.old_val.id;
|
484 | });
|
485 | arr[_index] = change.new_val;
|
486 | }
|
487 | break;
|
488 | }
|
489 | case 'state':
|
490 | {
|
491 |
|
492 |
|
493 | break;
|
494 | }
|
495 | default:
|
496 | throw new Error('unrecognized \'type\' field from server ' + JSON.stringify(change));
|
497 | }
|
498 | return arr;
|
499 | }
|
500 |
|
501 | |
502 |
|
503 |
|
504 | function writeOp(name, args, documents) {
|
505 | (0, _checkArgs2.default)(name, args);
|
506 | var wrappedDocs = documents;
|
507 | if (!Array.isArray(documents)) {
|
508 |
|
509 | wrappedDocs = [documents];
|
510 | } else if (documents.length === 0) {
|
511 |
|
512 | return _empty.empty.call(_Observable.Observable);
|
513 | }
|
514 | var options = Object.assign({}, this._query, { data: (0, _serialization.serialize)(wrappedDocs) });
|
515 | var observable = this._sendRequest(name, options);
|
516 | if (!this._lazyWrites) {
|
517 | var _context3;
|
518 |
|
519 |
|
520 |
|
521 | observable = (_context3 = observable, _publishReplay.publishReplay).call(_context3).refCount();
|
522 | observable.subscribe();
|
523 | }
|
524 | return observable;
|
525 | }
|
526 |
|
527 | var Collection = function (_TermBase) {
|
528 | (0, _inherits3.default)(Collection, _TermBase);
|
529 |
|
530 | function Collection(sendRequest, collectionName, lazyWrites) {
|
531 | (0, _classCallCheck3.default)(this, Collection);
|
532 |
|
533 | var query = { collection: collectionName };
|
534 | var legalMethods = ['find', 'findAll', 'justInitial', 'order', 'above', 'below', 'limit'];
|
535 |
|
536 | var _this = (0, _possibleConstructorReturn3.default)(this, _TermBase.call(this, sendRequest, query, legalMethods));
|
537 |
|
538 | _this._lazyWrites = lazyWrites;
|
539 | return _this;
|
540 | }
|
541 |
|
542 | Collection.prototype.store = function store(documents) {
|
543 | return writeOp.call(this, 'store', arguments, documents);
|
544 | };
|
545 |
|
546 | Collection.prototype.upsert = function upsert(documents) {
|
547 | return writeOp.call(this, 'upsert', arguments, documents);
|
548 | };
|
549 |
|
550 | Collection.prototype.insert = function insert(documents) {
|
551 | return writeOp.call(this, 'insert', arguments, documents);
|
552 | };
|
553 |
|
554 | Collection.prototype.replace = function replace(documents) {
|
555 | return writeOp.call(this, 'replace', arguments, documents);
|
556 | };
|
557 |
|
558 | Collection.prototype.update = function update(documents) {
|
559 | return writeOp.call(this, 'update', arguments, documents);
|
560 | };
|
561 |
|
562 | Collection.prototype.remove = function remove(documentOrId) {
|
563 | var wrapped = (0, _validIndexValue2.default)(documentOrId) ? { id: documentOrId } : documentOrId;
|
564 | return writeOp.call(this, 'remove', arguments, wrapped);
|
565 | };
|
566 |
|
567 | Collection.prototype.removeAll = function removeAll(documentsOrIds) {
|
568 | if (!Array.isArray(documentsOrIds)) {
|
569 | throw new Error('removeAll takes an array as an argument');
|
570 | }
|
571 | var wrapped = documentsOrIds.map(function (item) {
|
572 | if ((0, _validIndexValue2.default)(item)) {
|
573 | return { id: item };
|
574 | } else {
|
575 | return item;
|
576 | }
|
577 | });
|
578 | return writeOp.call(this, 'removeAll', arguments, wrapped);
|
579 | };
|
580 |
|
581 | return Collection;
|
582 | }(TermBase);
|
583 |
|
584 | var Find = function (_TermBase2) {
|
585 | (0, _inherits3.default)(Find, _TermBase2);
|
586 |
|
587 | function Find(sendRequest, previousQuery, idOrObject) {
|
588 | (0, _classCallCheck3.default)(this, Find);
|
589 |
|
590 | var findObject = (0, _validIndexValue2.default)(idOrObject) ? { id: idOrObject } : idOrObject;
|
591 | var query = Object.assign({}, previousQuery, { find: findObject });
|
592 | return (0, _possibleConstructorReturn3.default)(this, _TermBase2.call(this, sendRequest, query, []));
|
593 | }
|
594 |
|
595 | return Find;
|
596 | }(TermBase);
|
597 |
|
598 | var FindAll = function (_TermBase3) {
|
599 | (0, _inherits3.default)(FindAll, _TermBase3);
|
600 |
|
601 | function FindAll(sendRequest, previousQuery, fieldValues) {
|
602 | (0, _classCallCheck3.default)(this, FindAll);
|
603 |
|
604 | var wrappedFields = fieldValues.map(function (item) {
|
605 | return (0, _validIndexValue2.default)(item) ? { id: item } : item;
|
606 | });
|
607 | var options = { find_all: wrappedFields };
|
608 | var findAllQuery = Object.assign({}, previousQuery, options);
|
609 | var legalMethods = void 0;
|
610 | if (wrappedFields.length === 1) {
|
611 | legalMethods = ['order', 'above', 'below', 'limit'];
|
612 | } else {
|
613 |
|
614 | legalMethods = [];
|
615 | }
|
616 | return (0, _possibleConstructorReturn3.default)(this, _TermBase3.call(this, sendRequest, findAllQuery, legalMethods));
|
617 | }
|
618 |
|
619 | return FindAll;
|
620 | }(TermBase);
|
621 |
|
622 | var Above = function (_TermBase4) {
|
623 | (0, _inherits3.default)(Above, _TermBase4);
|
624 |
|
625 | function Above(sendRequest, previousQuery, aboveSpec, bound) {
|
626 | (0, _classCallCheck3.default)(this, Above);
|
627 |
|
628 | var option = { above: [aboveSpec, bound] };
|
629 | var query = Object.assign({}, previousQuery, option);
|
630 | var legalMethods = ['findAll', 'order', 'below', 'limit'];
|
631 | return (0, _possibleConstructorReturn3.default)(this, _TermBase4.call(this, sendRequest, query, legalMethods));
|
632 | }
|
633 |
|
634 | return Above;
|
635 | }(TermBase);
|
636 |
|
637 | var Below = function (_TermBase5) {
|
638 | (0, _inherits3.default)(Below, _TermBase5);
|
639 |
|
640 | function Below(sendRequest, previousQuery, belowSpec, bound) {
|
641 | (0, _classCallCheck3.default)(this, Below);
|
642 |
|
643 | var options = { below: [belowSpec, bound] };
|
644 | var query = Object.assign({}, previousQuery, options);
|
645 | var legalMethods = ['findAll', 'order', 'above', 'limit'];
|
646 | return (0, _possibleConstructorReturn3.default)(this, _TermBase5.call(this, sendRequest, query, legalMethods));
|
647 | }
|
648 |
|
649 | return Below;
|
650 | }(TermBase);
|
651 |
|
652 | var Order = function (_TermBase6) {
|
653 | (0, _inherits3.default)(Order, _TermBase6);
|
654 |
|
655 | function Order(sendRequest, previousQuery, fields, direction) {
|
656 | (0, _classCallCheck3.default)(this, Order);
|
657 |
|
658 | var wrappedFields = Array.isArray(fields) ? fields : [fields];
|
659 | var options = { order: [wrappedFields, direction] };
|
660 | var query = Object.assign({}, previousQuery, options);
|
661 | var legalMethods = ['findAll', 'above', 'below', 'limit'];
|
662 | return (0, _possibleConstructorReturn3.default)(this, _TermBase6.call(this, sendRequest, query, legalMethods));
|
663 | }
|
664 |
|
665 | return Order;
|
666 | }(TermBase);
|
667 |
|
668 | var Limit = function (_TermBase7) {
|
669 | (0, _inherits3.default)(Limit, _TermBase7);
|
670 |
|
671 | function Limit(sendRequest, previousQuery, size) {
|
672 | (0, _classCallCheck3.default)(this, Limit);
|
673 |
|
674 | var query = Object.assign({}, previousQuery, { limit: size });
|
675 |
|
676 | return (0, _possibleConstructorReturn3.default)(this, _TermBase7.call(this, sendRequest, query, []));
|
677 | }
|
678 |
|
679 | return Limit;
|
680 | }(TermBase);
|
681 |
|
682 | module.exports = {
|
683 | TermBase: TermBase,
|
684 | Collection: Collection,
|
685 | FindAll: FindAll,
|
686 | Find: Find,
|
687 | Above: Above,
|
688 | Below: Below,
|
689 | Order: Order,
|
690 | Limit: Limit
|
691 | };
|
692 |
|
693 | },
|
694 |
|
695 |
|
696 |
|
697 |
|
698 | function(module, exports, __webpack_require__) {
|
699 |
|
700 | "use strict";
|
701 |
|
702 | exports.__esModule = true;
|
703 |
|
704 | var _typeof2 = __webpack_require__( 4);
|
705 |
|
706 | var _typeof3 = _interopRequireDefault(_typeof2);
|
707 |
|
708 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
709 |
|
710 | exports.default = function (self, call) {
|
711 | if (!self) {
|
712 | throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
713 | }
|
714 |
|
715 | return call && ((typeof call === "undefined" ? "undefined" : (0, _typeof3.default)(call)) === "object" || typeof call === "function") ? call : self;
|
716 | };
|
717 |
|
718 | },
|
719 |
|
720 |
|
721 |
|
722 |
|
723 | function(module, exports, __webpack_require__) {
|
724 |
|
725 | "use strict";
|
726 |
|
727 | exports.__esModule = true;
|
728 |
|
729 | var _iterator = __webpack_require__( 5);
|
730 |
|
731 | var _iterator2 = _interopRequireDefault(_iterator);
|
732 |
|
733 | var _symbol = __webpack_require__( 56);
|
734 |
|
735 | var _symbol2 = _interopRequireDefault(_symbol);
|
736 |
|
737 | 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; };
|
738 |
|
739 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
740 |
|
741 | exports.default = typeof _symbol2.default === "function" && _typeof(_iterator2.default) === "symbol" ? function (obj) {
|
742 | return typeof obj === "undefined" ? "undefined" : _typeof(obj);
|
743 | } : function (obj) {
|
744 | return obj && typeof _symbol2.default === "function" && obj.constructor === _symbol2.default ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof(obj);
|
745 | };
|
746 |
|
747 | },
|
748 |
|
749 |
|
750 |
|
751 |
|
752 | function(module, exports, __webpack_require__) {
|
753 |
|
754 | module.exports = { "default": __webpack_require__( 6), __esModule: true };
|
755 |
|
756 | },
|
757 |
|
758 |
|
759 |
|
760 |
|
761 | function(module, exports, __webpack_require__) {
|
762 |
|
763 | __webpack_require__( 7);
|
764 | __webpack_require__( 51);
|
765 | module.exports = __webpack_require__( 55).f('iterator');
|
766 |
|
767 | },
|
768 |
|
769 |
|
770 |
|
771 |
|
772 | function(module, exports, __webpack_require__) {
|
773 |
|
774 | 'use strict';
|
775 | var $at = __webpack_require__( 8)(true);
|
776 |
|
777 |
|
778 | __webpack_require__( 11)(String, 'String', function(iterated){
|
779 | this._t = String(iterated);
|
780 | this._i = 0;
|
781 |
|
782 | }, function(){
|
783 | var O = this._t
|
784 | , index = this._i
|
785 | , point;
|
786 | if(index >= O.length)return {value: undefined, done: true};
|
787 | point = $at(O, index);
|
788 | this._i += point.length;
|
789 | return {value: point, done: false};
|
790 | });
|
791 |
|
792 | },
|
793 |
|
794 |
|
795 |
|
796 |
|
797 | function(module, exports, __webpack_require__) {
|
798 |
|
799 | var toInteger = __webpack_require__( 9)
|
800 | , defined = __webpack_require__( 10);
|
801 |
|
802 |
|
803 | module.exports = function(TO_STRING){
|
804 | return function(that, pos){
|
805 | var s = String(defined(that))
|
806 | , i = toInteger(pos)
|
807 | , l = s.length
|
808 | , a, b;
|
809 | if(i < 0 || i >= l)return TO_STRING ? '' : undefined;
|
810 | a = s.charCodeAt(i);
|
811 | return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
|
812 | ? TO_STRING ? s.charAt(i) : a
|
813 | : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
|
814 | };
|
815 | };
|
816 |
|
817 | },
|
818 |
|
819 |
|
820 |
|
821 |
|
822 | function(module, exports) {
|
823 |
|
824 |
|
825 | var ceil = Math.ceil
|
826 | , floor = Math.floor;
|
827 | module.exports = function(it){
|
828 | return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
|
829 | };
|
830 |
|
831 | },
|
832 |
|
833 |
|
834 |
|
835 |
|
836 | function(module, exports) {
|
837 |
|
838 |
|
839 | module.exports = function(it){
|
840 | if(it == undefined)throw TypeError("Can't call method on " + it);
|
841 | return it;
|
842 | };
|
843 |
|
844 | },
|
845 |
|
846 |
|
847 |
|
848 |
|
849 | function(module, exports, __webpack_require__) {
|
850 |
|
851 | 'use strict';
|
852 | var LIBRARY = __webpack_require__( 12)
|
853 | , $export = __webpack_require__( 13)
|
854 | , redefine = __webpack_require__( 28)
|
855 | , hide = __webpack_require__( 18)
|
856 | , has = __webpack_require__( 29)
|
857 | , Iterators = __webpack_require__( 30)
|
858 | , $iterCreate = __webpack_require__( 31)
|
859 | , setToStringTag = __webpack_require__( 47)
|
860 | , getPrototypeOf = __webpack_require__( 49)
|
861 | , ITERATOR = __webpack_require__( 48)('iterator')
|
862 | , BUGGY = !([].keys && 'next' in [].keys())
|
863 | , FF_ITERATOR = '@@iterator'
|
864 | , KEYS = 'keys'
|
865 | , VALUES = 'values';
|
866 |
|
867 | var returnThis = function(){ return this; };
|
868 |
|
869 | module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){
|
870 | $iterCreate(Constructor, NAME, next);
|
871 | var getMethod = function(kind){
|
872 | if(!BUGGY && kind in proto)return proto[kind];
|
873 | switch(kind){
|
874 | case KEYS: return function keys(){ return new Constructor(this, kind); };
|
875 | case VALUES: return function values(){ return new Constructor(this, kind); };
|
876 | } return function entries(){ return new Constructor(this, kind); };
|
877 | };
|
878 | var TAG = NAME + ' Iterator'
|
879 | , DEF_VALUES = DEFAULT == VALUES
|
880 | , VALUES_BUG = false
|
881 | , proto = Base.prototype
|
882 | , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]
|
883 | , $default = $native || getMethod(DEFAULT)
|
884 | , $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined
|
885 | , $anyNative = NAME == 'Array' ? proto.entries || $native : $native
|
886 | , methods, key, IteratorPrototype;
|
887 |
|
888 | if($anyNative){
|
889 | IteratorPrototype = getPrototypeOf($anyNative.call(new Base));
|
890 | if(IteratorPrototype !== Object.prototype){
|
891 |
|
892 | setToStringTag(IteratorPrototype, TAG, true);
|
893 |
|
894 | if(!LIBRARY && !has(IteratorPrototype, ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis);
|
895 | }
|
896 | }
|
897 |
|
898 | if(DEF_VALUES && $native && $native.name !== VALUES){
|
899 | VALUES_BUG = true;
|
900 | $default = function values(){ return $native.call(this); };
|
901 | }
|
902 |
|
903 | if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){
|
904 | hide(proto, ITERATOR, $default);
|
905 | }
|
906 |
|
907 | Iterators[NAME] = $default;
|
908 | Iterators[TAG] = returnThis;
|
909 | if(DEFAULT){
|
910 | methods = {
|
911 | values: DEF_VALUES ? $default : getMethod(VALUES),
|
912 | keys: IS_SET ? $default : getMethod(KEYS),
|
913 | entries: $entries
|
914 | };
|
915 | if(FORCED)for(key in methods){
|
916 | if(!(key in proto))redefine(proto, key, methods[key]);
|
917 | } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
|
918 | }
|
919 | return methods;
|
920 | };
|
921 |
|
922 | },
|
923 |
|
924 |
|
925 |
|
926 |
|
927 | function(module, exports) {
|
928 |
|
929 | module.exports = true;
|
930 |
|
931 | },
|
932 |
|
933 |
|
934 |
|
935 |
|
936 | function(module, exports, __webpack_require__) {
|
937 |
|
938 | var global = __webpack_require__( 14)
|
939 | , core = __webpack_require__( 15)
|
940 | , ctx = __webpack_require__( 16)
|
941 | , hide = __webpack_require__( 18)
|
942 | , PROTOTYPE = 'prototype';
|
943 |
|
944 | var $export = function(type, name, source){
|
945 | var IS_FORCED = type & $export.F
|
946 | , IS_GLOBAL = type & $export.G
|
947 | , IS_STATIC = type & $export.S
|
948 | , IS_PROTO = type & $export.P
|
949 | , IS_BIND = type & $export.B
|
950 | , IS_WRAP = type & $export.W
|
951 | , exports = IS_GLOBAL ? core : core[name] || (core[name] = {})
|
952 | , expProto = exports[PROTOTYPE]
|
953 | , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE]
|
954 | , key, own, out;
|
955 | if(IS_GLOBAL)source = name;
|
956 | for(key in source){
|
957 |
|
958 | own = !IS_FORCED && target && target[key] !== undefined;
|
959 | if(own && key in exports)continue;
|
960 |
|
961 | out = own ? target[key] : source[key];
|
962 |
|
963 | exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
|
964 |
|
965 | : IS_BIND && own ? ctx(out, global)
|
966 |
|
967 | : IS_WRAP && target[key] == out ? (function(C){
|
968 | var F = function(a, b, c){
|
969 | if(this instanceof C){
|
970 | switch(arguments.length){
|
971 | case 0: return new C;
|
972 | case 1: return new C(a);
|
973 | case 2: return new C(a, b);
|
974 | } return new C(a, b, c);
|
975 | } return C.apply(this, arguments);
|
976 | };
|
977 | F[PROTOTYPE] = C[PROTOTYPE];
|
978 | return F;
|
979 |
|
980 | })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
|
981 |
|
982 | if(IS_PROTO){
|
983 | (exports.virtual || (exports.virtual = {}))[key] = out;
|
984 |
|
985 | if(type & $export.R && expProto && !expProto[key])hide(expProto, key, out);
|
986 | }
|
987 | }
|
988 | };
|
989 |
|
990 | $export.F = 1;
|
991 | $export.G = 2;
|
992 | $export.S = 4;
|
993 | $export.P = 8;
|
994 | $export.B = 16;
|
995 | $export.W = 32;
|
996 | $export.U = 64;
|
997 | $export.R = 128;
|
998 | module.exports = $export;
|
999 |
|
1000 | },
|
1001 |
|
1002 |
|
1003 |
|
1004 |
|
1005 | function(module, exports) {
|
1006 |
|
1007 |
|
1008 | var global = module.exports = typeof window != 'undefined' && window.Math == Math
|
1009 | ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();
|
1010 | if(typeof __g == 'number')__g = global;
|
1011 |
|
1012 | },
|
1013 |
|
1014 |
|
1015 |
|
1016 |
|
1017 | function(module, exports) {
|
1018 |
|
1019 | var core = module.exports = {version: '2.3.0'};
|
1020 | if(typeof __e == 'number')__e = core;
|
1021 |
|
1022 | },
|
1023 |
|
1024 |
|
1025 |
|
1026 |
|
1027 | function(module, exports, __webpack_require__) {
|
1028 |
|
1029 |
|
1030 | var aFunction = __webpack_require__( 17);
|
1031 | module.exports = function(fn, that, length){
|
1032 | aFunction(fn);
|
1033 | if(that === undefined)return fn;
|
1034 | switch(length){
|
1035 | case 1: return function(a){
|
1036 | return fn.call(that, a);
|
1037 | };
|
1038 | case 2: return function(a, b){
|
1039 | return fn.call(that, a, b);
|
1040 | };
|
1041 | case 3: return function(a, b, c){
|
1042 | return fn.call(that, a, b, c);
|
1043 | };
|
1044 | }
|
1045 | return function(/* ...args */){
|
1046 | return fn.apply(that, arguments);
|
1047 | };
|
1048 | };
|
1049 |
|
1050 | },
|
1051 |
|
1052 |
|
1053 |
|
1054 |
|
1055 | function(module, exports) {
|
1056 |
|
1057 | module.exports = function(it){
|
1058 | if(typeof it != 'function')throw TypeError(it + ' is not a function!');
|
1059 | return it;
|
1060 | };
|
1061 |
|
1062 | },
|
1063 |
|
1064 |
|
1065 |
|
1066 |
|
1067 | function(module, exports, __webpack_require__) {
|
1068 |
|
1069 | var dP = __webpack_require__( 19)
|
1070 | , createDesc = __webpack_require__( 27);
|
1071 | module.exports = __webpack_require__( 23) ? function(object, key, value){
|
1072 | return dP.f(object, key, createDesc(1, value));
|
1073 | } : function(object, key, value){
|
1074 | object[key] = value;
|
1075 | return object;
|
1076 | };
|
1077 |
|
1078 | },
|
1079 |
|
1080 |
|
1081 |
|
1082 |
|
1083 | function(module, exports, __webpack_require__) {
|
1084 |
|
1085 | var anObject = __webpack_require__( 20)
|
1086 | , IE8_DOM_DEFINE = __webpack_require__( 22)
|
1087 | , toPrimitive = __webpack_require__( 26)
|
1088 | , dP = Object.defineProperty;
|
1089 |
|
1090 | exports.f = __webpack_require__( 23) ? Object.defineProperty : function defineProperty(O, P, Attributes){
|
1091 | anObject(O);
|
1092 | P = toPrimitive(P, true);
|
1093 | anObject(Attributes);
|
1094 | if(IE8_DOM_DEFINE)try {
|
1095 | return dP(O, P, Attributes);
|
1096 | } catch(e){ }
|
1097 | if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!');
|
1098 | if('value' in Attributes)O[P] = Attributes.value;
|
1099 | return O;
|
1100 | };
|
1101 |
|
1102 | },
|
1103 |
|
1104 |
|
1105 |
|
1106 |
|
1107 | function(module, exports, __webpack_require__) {
|
1108 |
|
1109 | var isObject = __webpack_require__( 21);
|
1110 | module.exports = function(it){
|
1111 | if(!isObject(it))throw TypeError(it + ' is not an object!');
|
1112 | return it;
|
1113 | };
|
1114 |
|
1115 | },
|
1116 |
|
1117 |
|
1118 |
|
1119 |
|
1120 | function(module, exports) {
|
1121 |
|
1122 | module.exports = function(it){
|
1123 | return typeof it === 'object' ? it !== null : typeof it === 'function';
|
1124 | };
|
1125 |
|
1126 | },
|
1127 |
|
1128 |
|
1129 |
|
1130 |
|
1131 | function(module, exports, __webpack_require__) {
|
1132 |
|
1133 | module.exports = !__webpack_require__( 23) && !__webpack_require__( 24)(function(){
|
1134 | return Object.defineProperty(__webpack_require__( 25)('div'), 'a', {get: function(){ return 7; }}).a != 7;
|
1135 | });
|
1136 |
|
1137 | },
|
1138 |
|
1139 |
|
1140 |
|
1141 |
|
1142 | function(module, exports, __webpack_require__) {
|
1143 |
|
1144 |
|
1145 | module.exports = !__webpack_require__( 24)(function(){
|
1146 | return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7;
|
1147 | });
|
1148 |
|
1149 | },
|
1150 |
|
1151 |
|
1152 |
|
1153 |
|
1154 | function(module, exports) {
|
1155 |
|
1156 | module.exports = function(exec){
|
1157 | try {
|
1158 | return !!exec();
|
1159 | } catch(e){
|
1160 | return true;
|
1161 | }
|
1162 | };
|
1163 |
|
1164 | },
|
1165 |
|
1166 |
|
1167 |
|
1168 |
|
1169 | function(module, exports, __webpack_require__) {
|
1170 |
|
1171 | var isObject = __webpack_require__( 21)
|
1172 | , document = __webpack_require__( 14).document
|
1173 |
|
1174 | , is = isObject(document) && isObject(document.createElement);
|
1175 | module.exports = function(it){
|
1176 | return is ? document.createElement(it) : {};
|
1177 | };
|
1178 |
|
1179 | },
|
1180 |
|
1181 |
|
1182 |
|
1183 |
|
1184 | function(module, exports, __webpack_require__) {
|
1185 |
|
1186 |
|
1187 | var isObject = __webpack_require__( 21);
|
1188 |
|
1189 |
|
1190 | module.exports = function(it, S){
|
1191 | if(!isObject(it))return it;
|
1192 | var fn, val;
|
1193 | if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
|
1194 | if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val;
|
1195 | if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val;
|
1196 | throw TypeError("Can't convert object to primitive value");
|
1197 | };
|
1198 |
|
1199 | },
|
1200 |
|
1201 |
|
1202 |
|
1203 |
|
1204 | function(module, exports) {
|
1205 |
|
1206 | module.exports = function(bitmap, value){
|
1207 | return {
|
1208 | enumerable : !(bitmap & 1),
|
1209 | configurable: !(bitmap & 2),
|
1210 | writable : !(bitmap & 4),
|
1211 | value : value
|
1212 | };
|
1213 | };
|
1214 |
|
1215 | },
|
1216 |
|
1217 |
|
1218 |
|
1219 |
|
1220 | function(module, exports, __webpack_require__) {
|
1221 |
|
1222 | module.exports = __webpack_require__( 18);
|
1223 |
|
1224 | },
|
1225 |
|
1226 |
|
1227 |
|
1228 |
|
1229 | function(module, exports) {
|
1230 |
|
1231 | var hasOwnProperty = {}.hasOwnProperty;
|
1232 | module.exports = function(it, key){
|
1233 | return hasOwnProperty.call(it, key);
|
1234 | };
|
1235 |
|
1236 | },
|
1237 |
|
1238 |
|
1239 |
|
1240 |
|
1241 | function(module, exports) {
|
1242 |
|
1243 | module.exports = {};
|
1244 |
|
1245 | },
|
1246 |
|
1247 |
|
1248 |
|
1249 |
|
1250 | function(module, exports, __webpack_require__) {
|
1251 |
|
1252 | 'use strict';
|
1253 | var create = __webpack_require__( 32)
|
1254 | , descriptor = __webpack_require__( 27)
|
1255 | , setToStringTag = __webpack_require__( 47)
|
1256 | , IteratorPrototype = {};
|
1257 |
|
1258 |
|
1259 | __webpack_require__( 18)(IteratorPrototype, __webpack_require__( 48)('iterator'), function(){ return this; });
|
1260 |
|
1261 | module.exports = function(Constructor, NAME, next){
|
1262 | Constructor.prototype = create(IteratorPrototype, {next: descriptor(1, next)});
|
1263 | setToStringTag(Constructor, NAME + ' Iterator');
|
1264 | };
|
1265 |
|
1266 | },
|
1267 |
|
1268 |
|
1269 |
|
1270 |
|
1271 | function(module, exports, __webpack_require__) {
|
1272 |
|
1273 |
|
1274 | var anObject = __webpack_require__( 20)
|
1275 | , dPs = __webpack_require__( 33)
|
1276 | , enumBugKeys = __webpack_require__( 45)
|
1277 | , IE_PROTO = __webpack_require__( 42)('IE_PROTO')
|
1278 | , Empty = function(){ }
|
1279 | , PROTOTYPE = 'prototype';
|
1280 |
|
1281 |
|
1282 | var createDict = function(){
|
1283 |
|
1284 | var iframe = __webpack_require__( 25)('iframe')
|
1285 | , i = enumBugKeys.length
|
1286 | , gt = '>'
|
1287 | , iframeDocument;
|
1288 | iframe.style.display = 'none';
|
1289 | __webpack_require__( 46).appendChild(iframe);
|
1290 | iframe.src = 'javascript:';
|
1291 |
|
1292 |
|
1293 | iframeDocument = iframe.contentWindow.document;
|
1294 | iframeDocument.open();
|
1295 | iframeDocument.write('<script>document.F=Object</script' + gt);
|
1296 | iframeDocument.close();
|
1297 | createDict = iframeDocument.F;
|
1298 | while(i--)delete createDict[PROTOTYPE][enumBugKeys[i]];
|
1299 | return createDict();
|
1300 | };
|
1301 |
|
1302 | module.exports = Object.create || function create(O, Properties){
|
1303 | var result;
|
1304 | if(O !== null){
|
1305 | Empty[PROTOTYPE] = anObject(O);
|
1306 | result = new Empty;
|
1307 | Empty[PROTOTYPE] = null;
|
1308 |
|
1309 | result[IE_PROTO] = O;
|
1310 | } else result = createDict();
|
1311 | return Properties === undefined ? result : dPs(result, Properties);
|
1312 | };
|
1313 |
|
1314 | },
|
1315 |
|
1316 |
|
1317 |
|
1318 |
|
1319 | function(module, exports, __webpack_require__) {
|
1320 |
|
1321 | var dP = __webpack_require__( 19)
|
1322 | , anObject = __webpack_require__( 20)
|
1323 | , getKeys = __webpack_require__( 34);
|
1324 |
|
1325 | module.exports = __webpack_require__( 23) ? Object.defineProperties : function defineProperties(O, Properties){
|
1326 | anObject(O);
|
1327 | var keys = getKeys(Properties)
|
1328 | , length = keys.length
|
1329 | , i = 0
|
1330 | , P;
|
1331 | while(length > i)dP.f(O, P = keys[i++], Properties[P]);
|
1332 | return O;
|
1333 | };
|
1334 |
|
1335 | },
|
1336 |
|
1337 |
|
1338 |
|
1339 |
|
1340 | function(module, exports, __webpack_require__) {
|
1341 |
|
1342 |
|
1343 | var $keys = __webpack_require__( 35)
|
1344 | , enumBugKeys = __webpack_require__( 45);
|
1345 |
|
1346 | module.exports = Object.keys || function keys(O){
|
1347 | return $keys(O, enumBugKeys);
|
1348 | };
|
1349 |
|
1350 | },
|
1351 |
|
1352 |
|
1353 |
|
1354 |
|
1355 | function(module, exports, __webpack_require__) {
|
1356 |
|
1357 | var has = __webpack_require__( 29)
|
1358 | , toIObject = __webpack_require__( 36)
|
1359 | , arrayIndexOf = __webpack_require__( 39)(false)
|
1360 | , IE_PROTO = __webpack_require__( 42)('IE_PROTO');
|
1361 |
|
1362 | module.exports = function(object, names){
|
1363 | var O = toIObject(object)
|
1364 | , i = 0
|
1365 | , result = []
|
1366 | , key;
|
1367 | for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key);
|
1368 |
|
1369 | while(names.length > i)if(has(O, key = names[i++])){
|
1370 | ~arrayIndexOf(result, key) || result.push(key);
|
1371 | }
|
1372 | return result;
|
1373 | };
|
1374 |
|
1375 | },
|
1376 |
|
1377 |
|
1378 |
|
1379 |
|
1380 | function(module, exports, __webpack_require__) {
|
1381 |
|
1382 |
|
1383 | var IObject = __webpack_require__( 37)
|
1384 | , defined = __webpack_require__( 10);
|
1385 | module.exports = function(it){
|
1386 | return IObject(defined(it));
|
1387 | };
|
1388 |
|
1389 | },
|
1390 |
|
1391 |
|
1392 |
|
1393 |
|
1394 | function(module, exports, __webpack_require__) {
|
1395 |
|
1396 |
|
1397 | var cof = __webpack_require__( 38);
|
1398 | module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){
|
1399 | return cof(it) == 'String' ? it.split('') : Object(it);
|
1400 | };
|
1401 |
|
1402 | },
|
1403 |
|
1404 |
|
1405 |
|
1406 |
|
1407 | function(module, exports) {
|
1408 |
|
1409 | var toString = {}.toString;
|
1410 |
|
1411 | module.exports = function(it){
|
1412 | return toString.call(it).slice(8, -1);
|
1413 | };
|
1414 |
|
1415 | },
|
1416 |
|
1417 |
|
1418 |
|
1419 |
|
1420 | function(module, exports, __webpack_require__) {
|
1421 |
|
1422 |
|
1423 |
|
1424 | var toIObject = __webpack_require__( 36)
|
1425 | , toLength = __webpack_require__( 40)
|
1426 | , toIndex = __webpack_require__( 41);
|
1427 | module.exports = function(IS_INCLUDES){
|
1428 | return function($this, el, fromIndex){
|
1429 | var O = toIObject($this)
|
1430 | , length = toLength(O.length)
|
1431 | , index = toIndex(fromIndex, length)
|
1432 | , value;
|
1433 |
|
1434 | if(IS_INCLUDES && el != el)while(length > index){
|
1435 | value = O[index++];
|
1436 | if(value != value)return true;
|
1437 |
|
1438 | } else for(;length > index; index++)if(IS_INCLUDES || index in O){
|
1439 | if(O[index] === el)return IS_INCLUDES || index || 0;
|
1440 | } return !IS_INCLUDES && -1;
|
1441 | };
|
1442 | };
|
1443 |
|
1444 | },
|
1445 |
|
1446 |
|
1447 |
|
1448 |
|
1449 | function(module, exports, __webpack_require__) {
|
1450 |
|
1451 |
|
1452 | var toInteger = __webpack_require__( 9)
|
1453 | , min = Math.min;
|
1454 | module.exports = function(it){
|
1455 | return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0;
|
1456 | };
|
1457 |
|
1458 | },
|
1459 |
|
1460 |
|
1461 |
|
1462 |
|
1463 | function(module, exports, __webpack_require__) {
|
1464 |
|
1465 | var toInteger = __webpack_require__( 9)
|
1466 | , max = Math.max
|
1467 | , min = Math.min;
|
1468 | module.exports = function(index, length){
|
1469 | index = toInteger(index);
|
1470 | return index < 0 ? max(index + length, 0) : min(index, length);
|
1471 | };
|
1472 |
|
1473 | },
|
1474 |
|
1475 |
|
1476 |
|
1477 |
|
1478 | function(module, exports, __webpack_require__) {
|
1479 |
|
1480 | var shared = __webpack_require__( 43)('keys')
|
1481 | , uid = __webpack_require__( 44);
|
1482 | module.exports = function(key){
|
1483 | return shared[key] || (shared[key] = uid(key));
|
1484 | };
|
1485 |
|
1486 | },
|
1487 |
|
1488 |
|
1489 |
|
1490 |
|
1491 | function(module, exports, __webpack_require__) {
|
1492 |
|
1493 | var global = __webpack_require__( 14)
|
1494 | , SHARED = '__core-js_shared__'
|
1495 | , store = global[SHARED] || (global[SHARED] = {});
|
1496 | module.exports = function(key){
|
1497 | return store[key] || (store[key] = {});
|
1498 | };
|
1499 |
|
1500 | },
|
1501 |
|
1502 |
|
1503 |
|
1504 |
|
1505 | function(module, exports) {
|
1506 |
|
1507 | var id = 0
|
1508 | , px = Math.random();
|
1509 | module.exports = function(key){
|
1510 | return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
|
1511 | };
|
1512 |
|
1513 | },
|
1514 |
|
1515 |
|
1516 |
|
1517 |
|
1518 | function(module, exports) {
|
1519 |
|
1520 |
|
1521 | module.exports = (
|
1522 | 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
|
1523 | ).split(',');
|
1524 |
|
1525 | },
|
1526 |
|
1527 |
|
1528 |
|
1529 |
|
1530 | function(module, exports, __webpack_require__) {
|
1531 |
|
1532 | module.exports = __webpack_require__( 14).document && document.documentElement;
|
1533 |
|
1534 | },
|
1535 |
|
1536 |
|
1537 |
|
1538 |
|
1539 | function(module, exports, __webpack_require__) {
|
1540 |
|
1541 | var def = __webpack_require__( 19).f
|
1542 | , has = __webpack_require__( 29)
|
1543 | , TAG = __webpack_require__( 48)('toStringTag');
|
1544 |
|
1545 | module.exports = function(it, tag, stat){
|
1546 | if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag});
|
1547 | };
|
1548 |
|
1549 | },
|
1550 |
|
1551 |
|
1552 |
|
1553 |
|
1554 | function(module, exports, __webpack_require__) {
|
1555 |
|
1556 | var store = __webpack_require__( 43)('wks')
|
1557 | , uid = __webpack_require__( 44)
|
1558 | , Symbol = __webpack_require__( 14).Symbol
|
1559 | , USE_SYMBOL = typeof Symbol == 'function';
|
1560 |
|
1561 | var $exports = module.exports = function(name){
|
1562 | return store[name] || (store[name] =
|
1563 | USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
|
1564 | };
|
1565 |
|
1566 | $exports.store = store;
|
1567 |
|
1568 | },
|
1569 |
|
1570 |
|
1571 |
|
1572 |
|
1573 | function(module, exports, __webpack_require__) {
|
1574 |
|
1575 |
|
1576 | var has = __webpack_require__( 29)
|
1577 | , toObject = __webpack_require__( 50)
|
1578 | , IE_PROTO = __webpack_require__( 42)('IE_PROTO')
|
1579 | , ObjectProto = Object.prototype;
|
1580 |
|
1581 | module.exports = Object.getPrototypeOf || function(O){
|
1582 | O = toObject(O);
|
1583 | if(has(O, IE_PROTO))return O[IE_PROTO];
|
1584 | if(typeof O.constructor == 'function' && O instanceof O.constructor){
|
1585 | return O.constructor.prototype;
|
1586 | } return O instanceof Object ? ObjectProto : null;
|
1587 | };
|
1588 |
|
1589 | },
|
1590 |
|
1591 |
|
1592 |
|
1593 |
|
1594 | function(module, exports, __webpack_require__) {
|
1595 |
|
1596 |
|
1597 | var defined = __webpack_require__( 10);
|
1598 | module.exports = function(it){
|
1599 | return Object(defined(it));
|
1600 | };
|
1601 |
|
1602 | },
|
1603 |
|
1604 |
|
1605 |
|
1606 |
|
1607 | function(module, exports, __webpack_require__) {
|
1608 |
|
1609 | __webpack_require__( 52);
|
1610 | var global = __webpack_require__( 14)
|
1611 | , hide = __webpack_require__( 18)
|
1612 | , Iterators = __webpack_require__( 30)
|
1613 | , TO_STRING_TAG = __webpack_require__( 48)('toStringTag');
|
1614 |
|
1615 | for(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){
|
1616 | var NAME = collections[i]
|
1617 | , Collection = global[NAME]
|
1618 | , proto = Collection && Collection.prototype;
|
1619 | if(proto && !proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME);
|
1620 | Iterators[NAME] = Iterators.Array;
|
1621 | }
|
1622 |
|
1623 | },
|
1624 |
|
1625 |
|
1626 |
|
1627 |
|
1628 | function(module, exports, __webpack_require__) {
|
1629 |
|
1630 | 'use strict';
|
1631 | var addToUnscopables = __webpack_require__( 53)
|
1632 | , step = __webpack_require__( 54)
|
1633 | , Iterators = __webpack_require__( 30)
|
1634 | , toIObject = __webpack_require__( 36);
|
1635 |
|
1636 |
|
1637 |
|
1638 |
|
1639 |
|
1640 | module.exports = __webpack_require__( 11)(Array, 'Array', function(iterated, kind){
|
1641 | this._t = toIObject(iterated);
|
1642 | this._i = 0;
|
1643 | this._k = kind;
|
1644 |
|
1645 | }, function(){
|
1646 | var O = this._t
|
1647 | , kind = this._k
|
1648 | , index = this._i++;
|
1649 | if(!O || index >= O.length){
|
1650 | this._t = undefined;
|
1651 | return step(1);
|
1652 | }
|
1653 | if(kind == 'keys' )return step(0, index);
|
1654 | if(kind == 'values')return step(0, O[index]);
|
1655 | return step(0, [index, O[index]]);
|
1656 | }, 'values');
|
1657 |
|
1658 |
|
1659 | Iterators.Arguments = Iterators.Array;
|
1660 |
|
1661 | addToUnscopables('keys');
|
1662 | addToUnscopables('values');
|
1663 | addToUnscopables('entries');
|
1664 |
|
1665 | },
|
1666 |
|
1667 |
|
1668 |
|
1669 |
|
1670 | function(module, exports) {
|
1671 |
|
1672 | module.exports = function(){ };
|
1673 |
|
1674 | },
|
1675 |
|
1676 |
|
1677 |
|
1678 |
|
1679 | function(module, exports) {
|
1680 |
|
1681 | module.exports = function(done, value){
|
1682 | return {value: value, done: !!done};
|
1683 | };
|
1684 |
|
1685 | },
|
1686 |
|
1687 |
|
1688 |
|
1689 |
|
1690 | function(module, exports, __webpack_require__) {
|
1691 |
|
1692 | exports.f = __webpack_require__( 48);
|
1693 |
|
1694 | },
|
1695 |
|
1696 |
|
1697 |
|
1698 |
|
1699 | function(module, exports, __webpack_require__) {
|
1700 |
|
1701 | module.exports = { "default": __webpack_require__( 57), __esModule: true };
|
1702 |
|
1703 | },
|
1704 |
|
1705 |
|
1706 |
|
1707 |
|
1708 | function(module, exports, __webpack_require__) {
|
1709 |
|
1710 | __webpack_require__( 58);
|
1711 | __webpack_require__( 69);
|
1712 | __webpack_require__( 70);
|
1713 | __webpack_require__( 71);
|
1714 | module.exports = __webpack_require__( 15).Symbol;
|
1715 |
|
1716 | },
|
1717 |
|
1718 |
|
1719 |
|
1720 |
|
1721 | function(module, exports, __webpack_require__) {
|
1722 |
|
1723 | 'use strict';
|
1724 |
|
1725 | var global = __webpack_require__( 14)
|
1726 | , has = __webpack_require__( 29)
|
1727 | , DESCRIPTORS = __webpack_require__( 23)
|
1728 | , $export = __webpack_require__( 13)
|
1729 | , redefine = __webpack_require__( 28)
|
1730 | , META = __webpack_require__( 59).KEY
|
1731 | , $fails = __webpack_require__( 24)
|
1732 | , shared = __webpack_require__( 43)
|
1733 | , setToStringTag = __webpack_require__( 47)
|
1734 | , uid = __webpack_require__( 44)
|
1735 | , wks = __webpack_require__( 48)
|
1736 | , wksExt = __webpack_require__( 55)
|
1737 | , wksDefine = __webpack_require__( 60)
|
1738 | , keyOf = __webpack_require__( 61)
|
1739 | , enumKeys = __webpack_require__( 62)
|
1740 | , isArray = __webpack_require__( 65)
|
1741 | , anObject = __webpack_require__( 20)
|
1742 | , toIObject = __webpack_require__( 36)
|
1743 | , toPrimitive = __webpack_require__( 26)
|
1744 | , createDesc = __webpack_require__( 27)
|
1745 | , _create = __webpack_require__( 32)
|
1746 | , gOPNExt = __webpack_require__( 66)
|
1747 | , $GOPD = __webpack_require__( 68)
|
1748 | , $DP = __webpack_require__( 19)
|
1749 | , $keys = __webpack_require__( 34)
|
1750 | , gOPD = $GOPD.f
|
1751 | , dP = $DP.f
|
1752 | , gOPN = gOPNExt.f
|
1753 | , $Symbol = global.Symbol
|
1754 | , $JSON = global.JSON
|
1755 | , _stringify = $JSON && $JSON.stringify
|
1756 | , PROTOTYPE = 'prototype'
|
1757 | , HIDDEN = wks('_hidden')
|
1758 | , TO_PRIMITIVE = wks('toPrimitive')
|
1759 | , isEnum = {}.propertyIsEnumerable
|
1760 | , SymbolRegistry = shared('symbol-registry')
|
1761 | , AllSymbols = shared('symbols')
|
1762 | , ObjectProto = Object[PROTOTYPE]
|
1763 | , USE_NATIVE = typeof $Symbol == 'function'
|
1764 | , QObject = global.QObject;
|
1765 |
|
1766 | var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
|
1767 |
|
1768 |
|
1769 | var setSymbolDesc = DESCRIPTORS && $fails(function(){
|
1770 | return _create(dP({}, 'a', {
|
1771 | get: function(){ return dP(this, 'a', {value: 7}).a; }
|
1772 | })).a != 7;
|
1773 | }) ? function(it, key, D){
|
1774 | var protoDesc = gOPD(ObjectProto, key);
|
1775 | if(protoDesc)delete ObjectProto[key];
|
1776 | dP(it, key, D);
|
1777 | if(protoDesc && it !== ObjectProto)dP(ObjectProto, key, protoDesc);
|
1778 | } : dP;
|
1779 |
|
1780 | var wrap = function(tag){
|
1781 | var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);
|
1782 | sym._k = tag;
|
1783 | return sym;
|
1784 | };
|
1785 |
|
1786 | var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function(it){
|
1787 | return typeof it == 'symbol';
|
1788 | } : function(it){
|
1789 | return it instanceof $Symbol;
|
1790 | };
|
1791 |
|
1792 | var $defineProperty = function defineProperty(it, key, D){
|
1793 | anObject(it);
|
1794 | key = toPrimitive(key, true);
|
1795 | anObject(D);
|
1796 | if(has(AllSymbols, key)){
|
1797 | if(!D.enumerable){
|
1798 | if(!has(it, HIDDEN))dP(it, HIDDEN, createDesc(1, {}));
|
1799 | it[HIDDEN][key] = true;
|
1800 | } else {
|
1801 | if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false;
|
1802 | D = _create(D, {enumerable: createDesc(0, false)});
|
1803 | } return setSymbolDesc(it, key, D);
|
1804 | } return dP(it, key, D);
|
1805 | };
|
1806 | var $defineProperties = function defineProperties(it, P){
|
1807 | anObject(it);
|
1808 | var keys = enumKeys(P = toIObject(P))
|
1809 | , i = 0
|
1810 | , l = keys.length
|
1811 | , key;
|
1812 | while(l > i)$defineProperty(it, key = keys[i++], P[key]);
|
1813 | return it;
|
1814 | };
|
1815 | var $create = function create(it, P){
|
1816 | return P === undefined ? _create(it) : $defineProperties(_create(it), P);
|
1817 | };
|
1818 | var $propertyIsEnumerable = function propertyIsEnumerable(key){
|
1819 | var E = isEnum.call(this, key = toPrimitive(key, true));
|
1820 | return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;
|
1821 | };
|
1822 | var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){
|
1823 | var D = gOPD(it = toIObject(it), key = toPrimitive(key, true));
|
1824 | if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true;
|
1825 | return D;
|
1826 | };
|
1827 | var $getOwnPropertyNames = function getOwnPropertyNames(it){
|
1828 | var names = gOPN(toIObject(it))
|
1829 | , result = []
|
1830 | , i = 0
|
1831 | , key;
|
1832 | while(names.length > i)if(!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META)result.push(key);
|
1833 | return result;
|
1834 | };
|
1835 | var $getOwnPropertySymbols = function getOwnPropertySymbols(it){
|
1836 | var names = gOPN(toIObject(it))
|
1837 | , result = []
|
1838 | , i = 0
|
1839 | , key;
|
1840 | while(names.length > i)if(has(AllSymbols, key = names[i++]))result.push(AllSymbols[key]);
|
1841 | return result;
|
1842 | };
|
1843 |
|
1844 |
|
1845 | if(!USE_NATIVE){
|
1846 | $Symbol = function Symbol(){
|
1847 | if(this instanceof $Symbol)throw TypeError('Symbol is not a constructor!');
|
1848 | var tag = uid(arguments.length > 0 ? arguments[0] : undefined);
|
1849 | DESCRIPTORS && setter && setSymbolDesc(ObjectProto, tag, {
|
1850 | configurable: true,
|
1851 | set: function(value){
|
1852 | if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false;
|
1853 | setSymbolDesc(this, tag, createDesc(1, value));
|
1854 | }
|
1855 | });
|
1856 | return wrap(tag);
|
1857 | };
|
1858 | redefine($Symbol[PROTOTYPE], 'toString', function toString(){
|
1859 | return this._k;
|
1860 | });
|
1861 |
|
1862 | $GOPD.f = $getOwnPropertyDescriptor;
|
1863 | $DP.f = $defineProperty;
|
1864 | __webpack_require__( 67).f = gOPNExt.f = $getOwnPropertyNames;
|
1865 | __webpack_require__( 64).f = $propertyIsEnumerable;
|
1866 | __webpack_require__( 63).f = $getOwnPropertySymbols;
|
1867 |
|
1868 | if(DESCRIPTORS && !__webpack_require__( 12)){
|
1869 | redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
|
1870 | }
|
1871 |
|
1872 | wksExt.f = function(name){
|
1873 | return wrap(wks(name));
|
1874 | }
|
1875 | }
|
1876 |
|
1877 | $export($export.G + $export.W + $export.F * !USE_NATIVE, {Symbol: $Symbol});
|
1878 |
|
1879 | for(var symbols = (
|
1880 |
|
1881 | 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'
|
1882 | ).split(','), i = 0; symbols.length > i; )wks(symbols[i++]);
|
1883 |
|
1884 | for(var symbols = $keys(wks.store), i = 0; symbols.length > i; )wksDefine(symbols[i++]);
|
1885 |
|
1886 | $export($export.S + $export.F * !USE_NATIVE, 'Symbol', {
|
1887 |
|
1888 | 'for': function(key){
|
1889 | return has(SymbolRegistry, key += '')
|
1890 | ? SymbolRegistry[key]
|
1891 | : SymbolRegistry[key] = $Symbol(key);
|
1892 | },
|
1893 |
|
1894 | keyFor: function keyFor(key){
|
1895 | if(isSymbol(key))return keyOf(SymbolRegistry, key);
|
1896 | throw TypeError(key + ' is not a symbol!');
|
1897 | },
|
1898 | useSetter: function(){ setter = true; },
|
1899 | useSimple: function(){ setter = false; }
|
1900 | });
|
1901 |
|
1902 | $export($export.S + $export.F * !USE_NATIVE, 'Object', {
|
1903 |
|
1904 | create: $create,
|
1905 |
|
1906 | defineProperty: $defineProperty,
|
1907 |
|
1908 | defineProperties: $defineProperties,
|
1909 |
|
1910 | getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
|
1911 |
|
1912 | getOwnPropertyNames: $getOwnPropertyNames,
|
1913 |
|
1914 | getOwnPropertySymbols: $getOwnPropertySymbols
|
1915 | });
|
1916 |
|
1917 |
|
1918 | $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function(){
|
1919 | var S = $Symbol();
|
1920 |
|
1921 |
|
1922 |
|
1923 | return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}';
|
1924 | })), 'JSON', {
|
1925 | stringify: function stringify(it){
|
1926 | if(it === undefined || isSymbol(it))return;
|
1927 | var args = [it]
|
1928 | , i = 1
|
1929 | , replacer, $replacer;
|
1930 | while(arguments.length > i)args.push(arguments[i++]);
|
1931 | replacer = args[1];
|
1932 | if(typeof replacer == 'function')$replacer = replacer;
|
1933 | if($replacer || !isArray(replacer))replacer = function(key, value){
|
1934 | if($replacer)value = $replacer.call(this, key, value);
|
1935 | if(!isSymbol(value))return value;
|
1936 | };
|
1937 | args[1] = replacer;
|
1938 | return _stringify.apply($JSON, args);
|
1939 | }
|
1940 | });
|
1941 |
|
1942 |
|
1943 | $Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__( 18)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
|
1944 |
|
1945 | setToStringTag($Symbol, 'Symbol');
|
1946 |
|
1947 | setToStringTag(Math, 'Math', true);
|
1948 |
|
1949 | setToStringTag(global.JSON, 'JSON', true);
|
1950 |
|
1951 | },
|
1952 |
|
1953 |
|
1954 |
|
1955 |
|
1956 | function(module, exports, __webpack_require__) {
|
1957 |
|
1958 | var META = __webpack_require__( 44)('meta')
|
1959 | , isObject = __webpack_require__( 21)
|
1960 | , has = __webpack_require__( 29)
|
1961 | , setDesc = __webpack_require__( 19).f
|
1962 | , id = 0;
|
1963 | var isExtensible = Object.isExtensible || function(){
|
1964 | return true;
|
1965 | };
|
1966 | var FREEZE = !__webpack_require__( 24)(function(){
|
1967 | return isExtensible(Object.preventExtensions({}));
|
1968 | });
|
1969 | var setMeta = function(it){
|
1970 | setDesc(it, META, {value: {
|
1971 | i: 'O' + ++id,
|
1972 | w: {}
|
1973 | }});
|
1974 | };
|
1975 | var fastKey = function(it, create){
|
1976 |
|
1977 | if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
|
1978 | if(!has(it, META)){
|
1979 |
|
1980 | if(!isExtensible(it))return 'F';
|
1981 |
|
1982 | if(!create)return 'E';
|
1983 |
|
1984 | setMeta(it);
|
1985 |
|
1986 | } return it[META].i;
|
1987 | };
|
1988 | var getWeak = function(it, create){
|
1989 | if(!has(it, META)){
|
1990 |
|
1991 | if(!isExtensible(it))return true;
|
1992 |
|
1993 | if(!create)return false;
|
1994 |
|
1995 | setMeta(it);
|
1996 |
|
1997 | } return it[META].w;
|
1998 | };
|
1999 |
|
2000 | var onFreeze = function(it){
|
2001 | if(FREEZE && meta.NEED && isExtensible(it) && !has(it, META))setMeta(it);
|
2002 | return it;
|
2003 | };
|
2004 | var meta = module.exports = {
|
2005 | KEY: META,
|
2006 | NEED: false,
|
2007 | fastKey: fastKey,
|
2008 | getWeak: getWeak,
|
2009 | onFreeze: onFreeze
|
2010 | };
|
2011 |
|
2012 | },
|
2013 |
|
2014 |
|
2015 |
|
2016 |
|
2017 | function(module, exports, __webpack_require__) {
|
2018 |
|
2019 | var global = __webpack_require__( 14)
|
2020 | , core = __webpack_require__( 15)
|
2021 | , LIBRARY = __webpack_require__( 12)
|
2022 | , wksExt = __webpack_require__( 55)
|
2023 | , defineProperty = __webpack_require__( 19).f;
|
2024 | module.exports = function(name){
|
2025 | var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
|
2026 | if(name.charAt(0) != '_' && !(name in $Symbol))defineProperty($Symbol, name, {value: wksExt.f(name)});
|
2027 | };
|
2028 |
|
2029 | },
|
2030 |
|
2031 |
|
2032 |
|
2033 |
|
2034 | function(module, exports, __webpack_require__) {
|
2035 |
|
2036 | var getKeys = __webpack_require__( 34)
|
2037 | , toIObject = __webpack_require__( 36);
|
2038 | module.exports = function(object, el){
|
2039 | var O = toIObject(object)
|
2040 | , keys = getKeys(O)
|
2041 | , length = keys.length
|
2042 | , index = 0
|
2043 | , key;
|
2044 | while(length > index)if(O[key = keys[index++]] === el)return key;
|
2045 | };
|
2046 |
|
2047 | },
|
2048 |
|
2049 |
|
2050 |
|
2051 |
|
2052 | function(module, exports, __webpack_require__) {
|
2053 |
|
2054 |
|
2055 | var getKeys = __webpack_require__( 34)
|
2056 | , gOPS = __webpack_require__( 63)
|
2057 | , pIE = __webpack_require__( 64);
|
2058 | module.exports = function(it){
|
2059 | var result = getKeys(it)
|
2060 | , getSymbols = gOPS.f;
|
2061 | if(getSymbols){
|
2062 | var symbols = getSymbols(it)
|
2063 | , isEnum = pIE.f
|
2064 | , i = 0
|
2065 | , key;
|
2066 | while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))result.push(key);
|
2067 | } return result;
|
2068 | };
|
2069 |
|
2070 | },
|
2071 |
|
2072 |
|
2073 |
|
2074 |
|
2075 | function(module, exports) {
|
2076 |
|
2077 | exports.f = Object.getOwnPropertySymbols;
|
2078 |
|
2079 | },
|
2080 |
|
2081 |
|
2082 |
|
2083 |
|
2084 | function(module, exports) {
|
2085 |
|
2086 | exports.f = {}.propertyIsEnumerable;
|
2087 |
|
2088 | },
|
2089 |
|
2090 |
|
2091 |
|
2092 |
|
2093 | function(module, exports, __webpack_require__) {
|
2094 |
|
2095 |
|
2096 | var cof = __webpack_require__( 38);
|
2097 | module.exports = Array.isArray || function isArray(arg){
|
2098 | return cof(arg) == 'Array';
|
2099 | };
|
2100 |
|
2101 | },
|
2102 |
|
2103 |
|
2104 |
|
2105 |
|
2106 | function(module, exports, __webpack_require__) {
|
2107 |
|
2108 |
|
2109 | var toIObject = __webpack_require__( 36)
|
2110 | , gOPN = __webpack_require__( 67).f
|
2111 | , toString = {}.toString;
|
2112 |
|
2113 | var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
|
2114 | ? Object.getOwnPropertyNames(window) : [];
|
2115 |
|
2116 | var getWindowNames = function(it){
|
2117 | try {
|
2118 | return gOPN(it);
|
2119 | } catch(e){
|
2120 | return windowNames.slice();
|
2121 | }
|
2122 | };
|
2123 |
|
2124 | module.exports.f = function getOwnPropertyNames(it){
|
2125 | return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));
|
2126 | };
|
2127 |
|
2128 |
|
2129 | },
|
2130 |
|
2131 |
|
2132 |
|
2133 |
|
2134 | function(module, exports, __webpack_require__) {
|
2135 |
|
2136 |
|
2137 | var $keys = __webpack_require__( 35)
|
2138 | , hiddenKeys = __webpack_require__( 45).concat('length', 'prototype');
|
2139 |
|
2140 | exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O){
|
2141 | return $keys(O, hiddenKeys);
|
2142 | };
|
2143 |
|
2144 | },
|
2145 |
|
2146 |
|
2147 |
|
2148 |
|
2149 | function(module, exports, __webpack_require__) {
|
2150 |
|
2151 | var pIE = __webpack_require__( 64)
|
2152 | , createDesc = __webpack_require__( 27)
|
2153 | , toIObject = __webpack_require__( 36)
|
2154 | , toPrimitive = __webpack_require__( 26)
|
2155 | , has = __webpack_require__( 29)
|
2156 | , IE8_DOM_DEFINE = __webpack_require__( 22)
|
2157 | , gOPD = Object.getOwnPropertyDescriptor;
|
2158 |
|
2159 | exports.f = __webpack_require__( 23) ? gOPD : function getOwnPropertyDescriptor(O, P){
|
2160 | O = toIObject(O);
|
2161 | P = toPrimitive(P, true);
|
2162 | if(IE8_DOM_DEFINE)try {
|
2163 | return gOPD(O, P);
|
2164 | } catch(e){ }
|
2165 | if(has(O, P))return createDesc(!pIE.f.call(O, P), O[P]);
|
2166 | };
|
2167 |
|
2168 | },
|
2169 |
|
2170 |
|
2171 |
|
2172 |
|
2173 | function(module, exports) {
|
2174 |
|
2175 |
|
2176 |
|
2177 | },
|
2178 |
|
2179 |
|
2180 |
|
2181 |
|
2182 | function(module, exports, __webpack_require__) {
|
2183 |
|
2184 | __webpack_require__( 60)('asyncIterator');
|
2185 |
|
2186 | },
|
2187 |
|
2188 |
|
2189 |
|
2190 |
|
2191 | function(module, exports, __webpack_require__) {
|
2192 |
|
2193 | __webpack_require__( 60)('observable');
|
2194 |
|
2195 | },
|
2196 |
|
2197 |
|
2198 |
|
2199 |
|
2200 | function(module, exports, __webpack_require__) {
|
2201 |
|
2202 | "use strict";
|
2203 |
|
2204 | exports.__esModule = true;
|
2205 |
|
2206 | var _setPrototypeOf = __webpack_require__( 73);
|
2207 |
|
2208 | var _setPrototypeOf2 = _interopRequireDefault(_setPrototypeOf);
|
2209 |
|
2210 | var _create = __webpack_require__( 77);
|
2211 |
|
2212 | var _create2 = _interopRequireDefault(_create);
|
2213 |
|
2214 | var _typeof2 = __webpack_require__( 4);
|
2215 |
|
2216 | var _typeof3 = _interopRequireDefault(_typeof2);
|
2217 |
|
2218 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
2219 |
|
2220 | exports.default = function (subClass, superClass) {
|
2221 | if (typeof superClass !== "function" && superClass !== null) {
|
2222 | throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === "undefined" ? "undefined" : (0, _typeof3.default)(superClass)));
|
2223 | }
|
2224 |
|
2225 | subClass.prototype = (0, _create2.default)(superClass && superClass.prototype, {
|
2226 | constructor: {
|
2227 | value: subClass,
|
2228 | enumerable: false,
|
2229 | writable: true,
|
2230 | configurable: true
|
2231 | }
|
2232 | });
|
2233 | if (superClass) _setPrototypeOf2.default ? (0, _setPrototypeOf2.default)(subClass, superClass) : subClass.__proto__ = superClass;
|
2234 | };
|
2235 |
|
2236 | },
|
2237 |
|
2238 |
|
2239 |
|
2240 |
|
2241 | function(module, exports, __webpack_require__) {
|
2242 |
|
2243 | module.exports = { "default": __webpack_require__( 74), __esModule: true };
|
2244 |
|
2245 | },
|
2246 |
|
2247 |
|
2248 |
|
2249 |
|
2250 | function(module, exports, __webpack_require__) {
|
2251 |
|
2252 | __webpack_require__( 75);
|
2253 | module.exports = __webpack_require__( 15).Object.setPrototypeOf;
|
2254 |
|
2255 | },
|
2256 |
|
2257 |
|
2258 |
|
2259 |
|
2260 | function(module, exports, __webpack_require__) {
|
2261 |
|
2262 |
|
2263 | var $export = __webpack_require__( 13);
|
2264 | $export($export.S, 'Object', {setPrototypeOf: __webpack_require__( 76).set});
|
2265 |
|
2266 | },
|
2267 |
|
2268 |
|
2269 |
|
2270 |
|
2271 | function(module, exports, __webpack_require__) {
|
2272 |
|
2273 |
|
2274 |
|
2275 | var isObject = __webpack_require__( 21)
|
2276 | , anObject = __webpack_require__( 20);
|
2277 | var check = function(O, proto){
|
2278 | anObject(O);
|
2279 | if(!isObject(proto) && proto !== null)throw TypeError(proto + ": can't set as prototype!");
|
2280 | };
|
2281 | module.exports = {
|
2282 | set: Object.setPrototypeOf || ('__proto__' in {} ?
|
2283 | function(test, buggy, set){
|
2284 | try {
|
2285 | set = __webpack_require__(/*! ./_ctx */ 16)(Function.call, __webpack_require__(/*! ./_object-gopd */ 68).f(Object.prototype, '__proto__').set, 2);
|
2286 | set(test, []);
|
2287 | buggy = !(test instanceof Array);
|
2288 | } catch(e){ buggy = true; }
|
2289 | return function setPrototypeOf(O, proto){
|
2290 | check(O, proto);
|
2291 | if(buggy)O.__proto__ = proto;
|
2292 | else set(O, proto);
|
2293 | return O;
|
2294 | };
|
2295 | }({}, false) : undefined),
|
2296 | check: check
|
2297 | };
|
2298 |
|
2299 | },
|
2300 |
|
2301 |
|
2302 |
|
2303 |
|
2304 | function(module, exports, __webpack_require__) {
|
2305 |
|
2306 | module.exports = { "default": __webpack_require__( 78), __esModule: true };
|
2307 |
|
2308 | },
|
2309 |
|
2310 |
|
2311 |
|
2312 |
|
2313 | function(module, exports, __webpack_require__) {
|
2314 |
|
2315 | __webpack_require__( 79);
|
2316 | var $Object = __webpack_require__( 15).Object;
|
2317 | module.exports = function create(P, D){
|
2318 | return $Object.create(P, D);
|
2319 | };
|
2320 |
|
2321 | },
|
2322 |
|
2323 |
|
2324 |
|
2325 |
|
2326 | function(module, exports, __webpack_require__) {
|
2327 |
|
2328 | var $export = __webpack_require__( 13)
|
2329 |
|
2330 | $export($export.S, 'Object', {create: __webpack_require__( 32)});
|
2331 |
|
2332 | },
|
2333 |
|
2334 |
|
2335 |
|
2336 |
|
2337 | function(module, exports) {
|
2338 |
|
2339 | "use strict";
|
2340 |
|
2341 | exports.__esModule = true;
|
2342 |
|
2343 | exports.default = function (instance, Constructor) {
|
2344 | if (!(instance instanceof Constructor)) {
|
2345 | throw new TypeError("Cannot call a class as a function");
|
2346 | }
|
2347 | };
|
2348 |
|
2349 | },
|
2350 |
|
2351 |
|
2352 |
|
2353 |
|
2354 | function(module, exports, __webpack_require__) {
|
2355 |
|
2356 | var sentenceCase = __webpack_require__( 82)
|
2357 |
|
2358 | |
2359 |
|
2360 |
|
2361 |
|
2362 |
|
2363 |
|
2364 |
|
2365 | module.exports = function (str, locale) {
|
2366 | return sentenceCase(str, locale, '_')
|
2367 | }
|
2368 |
|
2369 |
|
2370 | },
|
2371 |
|
2372 |
|
2373 |
|
2374 |
|
2375 | function(module, exports, __webpack_require__) {
|
2376 |
|
2377 | var lowerCase = __webpack_require__( 83)
|
2378 |
|
2379 | var NON_WORD_REGEXP = __webpack_require__( 84)
|
2380 | var CAMEL_CASE_REGEXP = __webpack_require__( 85)
|
2381 | var TRAILING_DIGIT_REGEXP = __webpack_require__( 86)
|
2382 |
|
2383 | |
2384 |
|
2385 |
|
2386 |
|
2387 |
|
2388 |
|
2389 |
|
2390 |
|
2391 | module.exports = function (str, locale, replacement) {
|
2392 | if (str == null) {
|
2393 | return ''
|
2394 | }
|
2395 |
|
2396 | replacement = replacement || ' '
|
2397 |
|
2398 | function replace (match, index, string) {
|
2399 | if (index === 0 || index === (string.length - match.length)) {
|
2400 | return ''
|
2401 | }
|
2402 |
|
2403 | return replacement
|
2404 | }
|
2405 |
|
2406 | str = String(str)
|
2407 |
|
2408 | .replace(CAMEL_CASE_REGEXP, '$1 $2')
|
2409 |
|
2410 | .replace(TRAILING_DIGIT_REGEXP, '$1 $2')
|
2411 |
|
2412 | .replace(NON_WORD_REGEXP, replace)
|
2413 |
|
2414 |
|
2415 | return lowerCase(str, locale)
|
2416 | }
|
2417 |
|
2418 |
|
2419 | },
|
2420 |
|
2421 |
|
2422 |
|
2423 |
|
2424 | function(module, exports) {
|
2425 |
|
2426 | |
2427 |
|
2428 |
|
2429 |
|
2430 |
|
2431 |
|
2432 |
|
2433 | var LANGUAGES = {
|
2434 | tr: {
|
2435 | regexp: /\u0130|\u0049|\u0049\u0307/g,
|
2436 | map: {
|
2437 | '\u0130': '\u0069',
|
2438 | '\u0049': '\u0131',
|
2439 | '\u0049\u0307': '\u0069'
|
2440 | }
|
2441 | },
|
2442 | az: {
|
2443 | regexp: /[\u0130]/g,
|
2444 | map: {
|
2445 | '\u0130': '\u0069',
|
2446 | '\u0049': '\u0131',
|
2447 | '\u0049\u0307': '\u0069'
|
2448 | }
|
2449 | },
|
2450 | lt: {
|
2451 | regexp: /[\u0049\u004A\u012E\u00CC\u00CD\u0128]/g,
|
2452 | map: {
|
2453 | '\u0049': '\u0069\u0307',
|
2454 | '\u004A': '\u006A\u0307',
|
2455 | '\u012E': '\u012F\u0307',
|
2456 | '\u00CC': '\u0069\u0307\u0300',
|
2457 | '\u00CD': '\u0069\u0307\u0301',
|
2458 | '\u0128': '\u0069\u0307\u0303'
|
2459 | }
|
2460 | }
|
2461 | }
|
2462 |
|
2463 | |
2464 |
|
2465 |
|
2466 |
|
2467 |
|
2468 |
|
2469 | module.exports = function (str, locale) {
|
2470 | var lang = LANGUAGES[locale]
|
2471 |
|
2472 | str = str == null ? '' : String(str)
|
2473 |
|
2474 | if (lang) {
|
2475 | str = str.replace(lang.regexp, function (m) { return lang.map[m] })
|
2476 | }
|
2477 |
|
2478 | return str.toLowerCase()
|
2479 | }
|
2480 |
|
2481 |
|
2482 | },
|
2483 |
|
2484 |
|
2485 |
|
2486 |
|
2487 | function(module, exports) {
|
2488 |
|
2489 | 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
|
2490 |
|
2491 |
|
2492 | },
|
2493 |
|
2494 |
|
2495 |
|
2496 |
|
2497 | function(module, exports) {
|
2498 |
|
2499 | 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
|
2500 |
|
2501 |
|
2502 | },
|
2503 |
|
2504 |
|
2505 |
|
2506 |
|
2507 | function(module, exports) {
|
2508 |
|
2509 | 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
|
2510 |
|
2511 |
|
2512 | },
|
2513 |
|
2514 |
|
2515 |
|
2516 |
|
2517 | function(module, exports, __webpack_require__) {
|
2518 |
|
2519 | 'use strict';
|
2520 |
|
2521 | exports.__esModule = true;
|
2522 | exports.default = checkArgs;
|
2523 |
|
2524 | var _ordinal = __webpack_require__( 88);
|
2525 |
|
2526 | var _ordinal2 = _interopRequireDefault(_ordinal);
|
2527 |
|
2528 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
2529 |
|
2530 |
|
2531 | function checkArgs(name, args) {
|
2532 | var _ref = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2];
|
2533 |
|
2534 | var _ref$nullable = _ref.nullable;
|
2535 | var nullable = _ref$nullable === undefined ? false : _ref$nullable;
|
2536 | var _ref$minArgs = _ref.minArgs;
|
2537 | var minArgs = _ref$minArgs === undefined ? 1 : _ref$minArgs;
|
2538 | var _ref$maxArgs = _ref.maxArgs;
|
2539 | var maxArgs = _ref$maxArgs === undefined ? 1 : _ref$maxArgs;
|
2540 |
|
2541 | if (minArgs === maxArgs && args.length !== minArgs) {
|
2542 | var plural = minArgs === 1 ? '' : 's';
|
2543 | throw new Error(name + ' must receive exactly ' + minArgs + ' argument' + plural);
|
2544 | }
|
2545 | if (args.length < minArgs) {
|
2546 | var plural1 = minArgs === 1 ? '' : 's';
|
2547 | throw new Error(name + ' must receive at least ' + minArgs + ' argument' + plural1 + '.');
|
2548 | }
|
2549 | if (args.length > maxArgs) {
|
2550 | var plural2 = maxArgs === 1 ? '' : 's';
|
2551 | throw new Error(name + ' accepts at most ' + maxArgs + ' argument' + plural2 + '.');
|
2552 | }
|
2553 | for (var i = 0; i < args.length; i++) {
|
2554 | if (!nullable && args[i] === null) {
|
2555 | var ordinality = maxArgs !== 1 ? ' ' + (0, _ordinal2.default)(i + 1) : '';
|
2556 | throw new Error('The' + ordinality + ' argument to ' + name + ' must be non-null');
|
2557 | }
|
2558 | if (args[i] === undefined) {
|
2559 | throw new Error('The ' + (0, _ordinal2.default)(i + 1) + ' argument to ' + name + ' must be defined');
|
2560 | }
|
2561 | }
|
2562 | }
|
2563 |
|
2564 | },
|
2565 |
|
2566 |
|
2567 |
|
2568 |
|
2569 | function(module, exports) {
|
2570 |
|
2571 | "use strict";
|
2572 |
|
2573 | exports.__esModule = true;
|
2574 | exports.default = ordinal;
|
2575 | function ordinal(x) {
|
2576 | if ([11, 12, 13].indexOf(x) !== -1) {
|
2577 | return x + "th";
|
2578 | } else if (x % 10 === 1) {
|
2579 | return x + "st";
|
2580 | } else if (x % 10 === 2) {
|
2581 | return x + "nd";
|
2582 | } else if (x % 10 === 3) {
|
2583 | return x + "rd";
|
2584 | }
|
2585 | return x + "th";
|
2586 | }
|
2587 |
|
2588 | },
|
2589 |
|
2590 |
|
2591 |
|
2592 |
|
2593 | function(module, exports, __webpack_require__) {
|
2594 |
|
2595 | 'use strict';
|
2596 |
|
2597 | exports.__esModule = true;
|
2598 |
|
2599 | var _typeof2 = __webpack_require__( 4);
|
2600 |
|
2601 | var _typeof3 = _interopRequireDefault(_typeof2);
|
2602 |
|
2603 | exports.default = validIndexValue;
|
2604 |
|
2605 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
2606 |
|
2607 |
|
2608 |
|
2609 | function validIndexValue(val) {
|
2610 | if (val === null) {
|
2611 | return false;
|
2612 | }
|
2613 | if (['boolean', 'number', 'string'].indexOf(typeof val === 'undefined' ? 'undefined' : (0, _typeof3.default)(val)) !== -1) {
|
2614 | return true;
|
2615 | }
|
2616 | if (Array.isArray(val)) {
|
2617 | var _ret = function () {
|
2618 | var containsBad = false;
|
2619 | val.forEach(function (v) {
|
2620 | containsBad = containsBad || validIndexValue(v);
|
2621 | });
|
2622 | return {
|
2623 | v: containsBad
|
2624 | };
|
2625 | }();
|
2626 |
|
2627 | if ((typeof _ret === 'undefined' ? 'undefined' : (0, _typeof3.default)(_ret)) === "object") return _ret.v;
|
2628 | }
|
2629 | return false;
|
2630 | }
|
2631 |
|
2632 | },
|
2633 |
|
2634 |
|
2635 |
|
2636 |
|
2637 | function(module, exports, __webpack_require__) {
|
2638 |
|
2639 | 'use strict';
|
2640 |
|
2641 | exports.__esModule = true;
|
2642 |
|
2643 | var _typeof2 = __webpack_require__( 4);
|
2644 |
|
2645 | var _typeof3 = _interopRequireDefault(_typeof2);
|
2646 |
|
2647 | exports.deserialize = deserialize;
|
2648 | exports.serialize = serialize;
|
2649 |
|
2650 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
2651 |
|
2652 | var PRIMITIVES = ['string', 'number', 'boolean', 'function', 'symbol'];
|
2653 |
|
2654 | function modifyObject(doc) {
|
2655 | Object.keys(doc).forEach(function (key) {
|
2656 | doc[key] = deserialize(doc[key]);
|
2657 | });
|
2658 | return doc;
|
2659 | }
|
2660 |
|
2661 | function deserialize(value) {
|
2662 | if (value == null) {
|
2663 | return value;
|
2664 | } else if (PRIMITIVES.indexOf(typeof value === 'undefined' ? 'undefined' : (0, _typeof3.default)(value)) !== -1) {
|
2665 | return value;
|
2666 | } else if (Array.isArray(value)) {
|
2667 | return value.map(deserialize);
|
2668 | } else if (value.$reql_type$ === 'TIME') {
|
2669 | var date = new Date();
|
2670 | date.setTime(value.epoch_time * 1000);
|
2671 | return date;
|
2672 | } else {
|
2673 | return modifyObject(value);
|
2674 | }
|
2675 | }
|
2676 |
|
2677 | function jsonifyObject(doc) {
|
2678 | Object.keys(doc).forEach(function (key) {
|
2679 | doc[key] = serialize(doc[key]);
|
2680 | });
|
2681 | return doc;
|
2682 | }
|
2683 |
|
2684 | function serialize(value) {
|
2685 | if (value == null) {
|
2686 | return value;
|
2687 | } else if (PRIMITIVES.indexOf(typeof value === 'undefined' ? 'undefined' : (0, _typeof3.default)(value)) !== -1) {
|
2688 | return value;
|
2689 | } else if (Array.isArray(value)) {
|
2690 | return value.map(serialize);
|
2691 | } else if (value instanceof Date) {
|
2692 | return {
|
2693 | $reql_type$: 'TIME',
|
2694 | epoch_time: value.getTime() / 1000,
|
2695 |
|
2696 | timezone: 'Z'
|
2697 | };
|
2698 | } else {
|
2699 | return jsonifyObject(value);
|
2700 | }
|
2701 | }
|
2702 |
|
2703 | },
|
2704 |
|
2705 |
|
2706 |
|
2707 |
|
2708 | function(module, exports, __webpack_require__) {
|
2709 |
|
2710 | 'use strict';
|
2711 |
|
2712 | var _classCallCheck2 = __webpack_require__( 80);
|
2713 |
|
2714 | var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
2715 |
|
2716 | var _possibleConstructorReturn2 = __webpack_require__( 3);
|
2717 |
|
2718 | var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
|
2719 |
|
2720 | var _inherits2 = __webpack_require__( 72);
|
2721 |
|
2722 | var _inherits3 = _interopRequireDefault(_inherits2);
|
2723 |
|
2724 | var _AsyncSubject = __webpack_require__( 1);
|
2725 |
|
2726 | var _BehaviorSubject = __webpack_require__( 1);
|
2727 |
|
2728 | var _Subject2 = __webpack_require__( 1);
|
2729 |
|
2730 | var _Observable = __webpack_require__( 1);
|
2731 |
|
2732 | var _merge = __webpack_require__( 1);
|
2733 |
|
2734 | var _filter = __webpack_require__( 1);
|
2735 |
|
2736 | var _share = __webpack_require__( 1);
|
2737 |
|
2738 | var _shim = __webpack_require__( 92);
|
2739 |
|
2740 | var _serialization = __webpack_require__( 90);
|
2741 |
|
2742 | var _logging = __webpack_require__( 93);
|
2743 |
|
2744 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
2745 |
|
2746 | var PROTOCOL_VERSION = 'rethinkdb-horizon-v0';
|
2747 |
|
2748 |
|
2749 | var STATUS_UNCONNECTED = { type: 'unconnected' };
|
2750 |
|
2751 | var STATUS_CONNECTED = { type: 'connected' };
|
2752 |
|
2753 | var STATUS_READY = { type: 'ready' };
|
2754 |
|
2755 | var STATUS_ERROR = { type: 'error' };
|
2756 |
|
2757 | var STATUS_DISCONNECTED = { type: 'disconnected' };
|
2758 |
|
2759 | var ProtocolError = function (_Error) {
|
2760 | (0, _inherits3.default)(ProtocolError, _Error);
|
2761 |
|
2762 | function ProtocolError(msg, errorCode) {
|
2763 | (0, _classCallCheck3.default)(this, ProtocolError);
|
2764 |
|
2765 | var _this = (0, _possibleConstructorReturn3.default)(this, _Error.call(this, msg));
|
2766 |
|
2767 | _this.errorCode = errorCode;
|
2768 | return _this;
|
2769 | }
|
2770 |
|
2771 | ProtocolError.prototype.toString = function toString() {
|
2772 | return this.message + ' (Code: ' + this.errorCode + ')';
|
2773 | };
|
2774 |
|
2775 | return ProtocolError;
|
2776 | }(Error);
|
2777 |
|
2778 |
|
2779 |
|
2780 |
|
2781 |
|
2782 |
|
2783 |
|
2784 |
|
2785 |
|
2786 |
|
2787 | var HorizonSocket = function (_Subject) {
|
2788 | (0, _inherits3.default)(HorizonSocket, _Subject);
|
2789 |
|
2790 | function HorizonSocket(host, secure, path, handshaker) {
|
2791 | var _context;
|
2792 |
|
2793 | (0, _classCallCheck3.default)(this, HorizonSocket);
|
2794 |
|
2795 | var hostString = 'ws' + (secure ? 's' : '') + '://' + host + '/' + path;
|
2796 | var msgBuffer = [];
|
2797 | var ws = void 0,
|
2798 | handshakeDisp = void 0;
|
2799 |
|
2800 |
|
2801 | var handshake = new _AsyncSubject.AsyncSubject();
|
2802 | var statusSubject = new _BehaviorSubject.BehaviorSubject(STATUS_UNCONNECTED);
|
2803 |
|
2804 | var isOpen = function isOpen() {
|
2805 | return Boolean(ws) && ws.readyState === _shim.WebSocket.OPEN;
|
2806 | };
|
2807 |
|
2808 |
|
2809 | function wsSend(msg) {
|
2810 | var stringMsg = JSON.stringify((0, _serialization.serialize)(msg));
|
2811 | ws.send(stringMsg);
|
2812 | }
|
2813 |
|
2814 |
|
2815 |
|
2816 | var socketObservable = (_context = _Observable.Observable.create(function (subscriber) {
|
2817 | ws = new _shim.WebSocket(hostString, PROTOCOL_VERSION);
|
2818 | ws.onerror = function () {
|
2819 |
|
2820 |
|
2821 |
|
2822 |
|
2823 | statusSubject.next(STATUS_ERROR);
|
2824 | var errMsg = 'Websocket ' + hostString + ' experienced an error';
|
2825 | subscriber.error(new Error(errMsg));
|
2826 | };
|
2827 | ws.onopen = function () {
|
2828 |
|
2829 | statusSubject.next(STATUS_CONNECTED);
|
2830 | handshakeDisp = _this2.makeRequest(handshaker()).subscribe(function (x) {
|
2831 | handshake.next(x);
|
2832 | handshake.complete();
|
2833 |
|
2834 | handshake.next(STATUS_READY);
|
2835 | }, function (err) {
|
2836 | return handshake.error(err);
|
2837 | }, function () {
|
2838 | return handshake.complete();
|
2839 | });
|
2840 |
|
2841 | while (msgBuffer.length > 0) {
|
2842 | var msg = msgBuffer.shift();
|
2843 | (0, _logging.log)('Sending buffered:', msg);
|
2844 | wsSend(msg);
|
2845 | }
|
2846 | };
|
2847 | ws.onmessage = function (event) {
|
2848 | var deserialized = (0, _serialization.deserialize)(JSON.parse(event.data));
|
2849 | (0, _logging.log)('Received', deserialized);
|
2850 | subscriber.next(deserialized);
|
2851 | };
|
2852 | ws.onclose = function (e) {
|
2853 |
|
2854 |
|
2855 |
|
2856 | statusSubject.next(STATUS_DISCONNECTED);
|
2857 | if (e.code !== 1000 || !e.wasClean) {
|
2858 | subscriber.error(new Error('Socket closed unexpectedly with code: ' + e.code));
|
2859 | } else {
|
2860 | subscriber.complete();
|
2861 | }
|
2862 | };
|
2863 | return function () {
|
2864 | if (handshakeDisp) {
|
2865 | handshakeDisp.unsubscribe();
|
2866 | }
|
2867 |
|
2868 | closeSocket(1000, '');
|
2869 | };
|
2870 | }), _share.share).call(_context);
|
2871 |
|
2872 |
|
2873 |
|
2874 |
|
2875 |
|
2876 |
|
2877 | var socketSubscriber = {
|
2878 | next: function next(messageToSend) {
|
2879 |
|
2880 |
|
2881 | if (isOpen()) {
|
2882 | (0, _logging.log)('Sending', messageToSend);
|
2883 | wsSend(messageToSend);
|
2884 | } else {
|
2885 | (0, _logging.log)('Buffering', messageToSend);
|
2886 | msgBuffer.push(messageToSend);
|
2887 | }
|
2888 | },
|
2889 | error: function error(_error) {
|
2890 |
|
2891 |
|
2892 | if (!_error.code) {
|
2893 | throw new Error('no code specified. Be sure to pass ' + '{ code: ###, reason: "" } to error()');
|
2894 | }
|
2895 | closeSocket(_error.code, _error.reason);
|
2896 | },
|
2897 | complete: function complete() {
|
2898 |
|
2899 |
|
2900 | closeSocket(1000, '');
|
2901 | }
|
2902 | };
|
2903 |
|
2904 | function closeSocket(code, reason) {
|
2905 | statusSubject.next(STATUS_DISCONNECTED);
|
2906 | if (!code) {
|
2907 | ws.close();
|
2908 | } else {
|
2909 | ws.close(code, reason);
|
2910 | }
|
2911 | ws.onopen = undefined;
|
2912 | ws.onclose = undefined;
|
2913 | ws.onmessage = undefined;
|
2914 | }
|
2915 |
|
2916 |
|
2917 |
|
2918 |
|
2919 |
|
2920 | var _this2 = (0, _possibleConstructorReturn3.default)(this, _Subject.call(this, socketSubscriber, socketObservable));
|
2921 |
|
2922 | var subscriptions = new _Subject2.Subject();
|
2923 |
|
2924 |
|
2925 |
|
2926 | var unsubscriptions = new _Subject2.Subject();
|
2927 | var outgoing = _merge.merge.call(_Observable.Observable, subscriptions, unsubscriptions);
|
2928 |
|
2929 | var activeRequests = 0;
|
2930 |
|
2931 | var requestCounter = 0;
|
2932 |
|
2933 | var subDisp = null;
|
2934 |
|
2935 | _this2.handshake = handshake;
|
2936 |
|
2937 |
|
2938 | _this2.status = statusSubject;
|
2939 |
|
2940 | var incrementActive = function incrementActive() {
|
2941 | if (++activeRequests === 1) {
|
2942 |
|
2943 |
|
2944 |
|
2945 |
|
2946 | subDisp = outgoing.subscribe(_this2);
|
2947 | }
|
2948 | };
|
2949 |
|
2950 |
|
2951 |
|
2952 | var decrementActive = function decrementActive() {
|
2953 | if (--activeRequests === 0) {
|
2954 | subDisp.unsubscribe();
|
2955 | }
|
2956 | };
|
2957 |
|
2958 |
|
2959 | _this2.makeRequest = function (rawRequest) {
|
2960 | return _Observable.Observable.create(function (reqSubscriber) {
|
2961 |
|
2962 | var request_id = requestCounter++;
|
2963 |
|
2964 |
|
2965 | rawRequest.request_id = request_id;
|
2966 | var unsubscribeRequest = void 0;
|
2967 | if (rawRequest.type === 'subscribe') {
|
2968 | unsubscribeRequest = { request_id: request_id, type: 'end_subscription' };
|
2969 | }
|
2970 |
|
2971 |
|
2972 | incrementActive();
|
2973 |
|
2974 |
|
2975 | subscriptions.next(rawRequest);
|
2976 |
|
2977 |
|
2978 | var unsubscribeFilter = _filter.filter.call(_this2, function (x) {
|
2979 | return x.request_id === request_id;
|
2980 | }).subscribe(function (resp) {
|
2981 |
|
2982 | if (resp.error !== undefined) {
|
2983 | reqSubscriber.error(new ProtocolError(resp.error, resp.error_code));
|
2984 | } else if (resp.data !== undefined || resp.token !== undefined) {
|
2985 | try {
|
2986 | reqSubscriber.next(resp);
|
2987 | } catch (e) {}
|
2988 | }
|
2989 | if (resp.state === 'synced') {
|
2990 |
|
2991 | reqSubscriber.next({
|
2992 | type: 'state',
|
2993 | state: 'synced'
|
2994 | });
|
2995 | } else if (resp.state === 'complete') {
|
2996 | reqSubscriber.complete();
|
2997 | }
|
2998 | }, function (err) {
|
2999 | return reqSubscriber.error(err);
|
3000 | }, function () {
|
3001 | return reqSubscriber.complete();
|
3002 | });
|
3003 | return function () {
|
3004 |
|
3005 | if (unsubscribeRequest) {
|
3006 | unsubscriptions.next(unsubscribeRequest);
|
3007 | }
|
3008 | decrementActive();
|
3009 | unsubscribeFilter.unsubscribe();
|
3010 | };
|
3011 | });
|
3012 | };
|
3013 | return _this2;
|
3014 | }
|
3015 |
|
3016 | return HorizonSocket;
|
3017 | }(_Subject2.Subject);
|
3018 |
|
3019 | module.exports = HorizonSocket;
|
3020 |
|
3021 | },
|
3022 |
|
3023 |
|
3024 |
|
3025 |
|
3026 | function(module, exports) {
|
3027 |
|
3028 | "use strict";
|
3029 |
|
3030 |
|
3031 |
|
3032 |
|
3033 | if (typeof WebSocket !== 'undefined') {
|
3034 | module.exports.WebSocket = WebSocket;
|
3035 | } else {
|
3036 | module.exports.WebSocket = function () {
|
3037 | console.error("Tried to use WebSocket but it isn't defined or polyfilled");
|
3038 | };
|
3039 | }
|
3040 |
|
3041 | },
|
3042 |
|
3043 |
|
3044 |
|
3045 |
|
3046 | function(module, exports) {
|
3047 |
|
3048 | "use strict";
|
3049 |
|
3050 |
|
3051 |
|
3052 | var debug = false;
|
3053 |
|
3054 | module.exports = {
|
3055 | log: function log() {
|
3056 | var _console;
|
3057 |
|
3058 | return debug ? (_console = console).log.apply(_console, arguments) : undefined;
|
3059 | },
|
3060 | logError: function logError() {
|
3061 | var _console2;
|
3062 |
|
3063 | return debug ? (_console2 = console).error.apply(_console2, arguments) : undefined;
|
3064 | },
|
3065 | enableLogging: function enableLogging() {
|
3066 | var deb = arguments.length <= 0 || arguments[0] === undefined ? true : arguments[0];
|
3067 | debug = deb;
|
3068 | }
|
3069 | };
|
3070 |
|
3071 | },
|
3072 |
|
3073 |
|
3074 |
|
3075 |
|
3076 | function(module, exports, __webpack_require__) {
|
3077 |
|
3078 | 'use strict';
|
3079 |
|
3080 | exports.__esModule = true;
|
3081 | exports.TokenStorage = undefined;
|
3082 |
|
3083 | var _typeof2 = __webpack_require__( 4);
|
3084 |
|
3085 | var _typeof3 = _interopRequireDefault(_typeof2);
|
3086 |
|
3087 | var _classCallCheck2 = __webpack_require__( 80);
|
3088 |
|
3089 | var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
3090 |
|
3091 | exports.authEndpoint = authEndpoint;
|
3092 | exports.clearAuthTokens = clearAuthTokens;
|
3093 |
|
3094 | var _queryParse = __webpack_require__( 95);
|
3095 |
|
3096 | var _queryParse2 = _interopRequireDefault(_queryParse);
|
3097 |
|
3098 | var _Observable = __webpack_require__( 1);
|
3099 |
|
3100 | var _map = __webpack_require__( 1);
|
3101 |
|
3102 | var _fetch = __webpack_require__( 96);
|
3103 |
|
3104 | var _fetch2 = _interopRequireDefault(_fetch);
|
3105 |
|
3106 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
3107 |
|
3108 | var HORIZON_JWT = 'horizon-jwt';
|
3109 |
|
3110 |
|
3111 | function authEndpoint(name) {
|
3112 | var _this = this;
|
3113 |
|
3114 | var endpointForName = function endpointForName(methods) {
|
3115 | if (methods.hasOwnProperty(name)) {
|
3116 | return methods[name];
|
3117 | } else {
|
3118 | throw new Error('Unconfigured auth type: ' + name);
|
3119 | }
|
3120 | };
|
3121 | if (!this._authMethods) {
|
3122 | var _context;
|
3123 |
|
3124 | console.log('No auth methods, have to fetch');
|
3125 | return (_context = (0, _fetch2.default)(this._horizonPath + '/auth_methods').do(function (authMethods) {
|
3126 | _this._authMethods = authMethods;
|
3127 | }), _map.map).call(_context, endpointForName);
|
3128 | } else {
|
3129 | var _context2;
|
3130 |
|
3131 | return (_context2 = _Observable.Observable.of(this._authMethods), _map.map).call(_context2, endpointForName);
|
3132 | }
|
3133 | }
|
3134 |
|
3135 |
|
3136 |
|
3137 | var FakeStorage = function () {
|
3138 | function FakeStorage() {
|
3139 | (0, _classCallCheck3.default)(this, FakeStorage);
|
3140 | this._storage = new Map();
|
3141 | }
|
3142 |
|
3143 | FakeStorage.prototype.setItem = function setItem(a, b) {
|
3144 | return this._storage.set(a, b);
|
3145 | };
|
3146 |
|
3147 | FakeStorage.prototype.getItem = function getItem(a) {
|
3148 | return this._storage.get(a);
|
3149 | };
|
3150 |
|
3151 | FakeStorage.prototype.removeItem = function removeItem(a) {
|
3152 | return this._storage.delete(a);
|
3153 | };
|
3154 |
|
3155 | return FakeStorage;
|
3156 | }();
|
3157 |
|
3158 | function getStorage() {
|
3159 | try {
|
3160 | if ((typeof window === 'undefined' ? 'undefined' : (0, _typeof3.default)(window)) !== 'object' || window.localStorage === undefined) {
|
3161 | return new FakeStorage();
|
3162 | }
|
3163 | window.localStorage.setItem('$$fake', 1);
|
3164 | window.localStorage.removeItem('$$fake');
|
3165 | return window.localStorage;
|
3166 | } catch (error) {
|
3167 | if (window.sessionStorage === undefined) {
|
3168 | return new FakeStorage();
|
3169 | } else {
|
3170 | return window.sessionStorage;
|
3171 | }
|
3172 | }
|
3173 | }
|
3174 |
|
3175 | var TokenStorage = exports.TokenStorage = function () {
|
3176 | function TokenStorage() {
|
3177 | var authType = arguments.length <= 0 || arguments[0] === undefined ? 'unauthenticated' : arguments[0];
|
3178 | (0, _classCallCheck3.default)(this, TokenStorage);
|
3179 |
|
3180 | this._storage = getStorage();
|
3181 | this._authType = authType;
|
3182 | }
|
3183 |
|
3184 | TokenStorage.prototype.set = function set(jwt) {
|
3185 | return this._storage.setItem(HORIZON_JWT, jwt);
|
3186 | };
|
3187 |
|
3188 | TokenStorage.prototype.get = function get() {
|
3189 | return this._storage.getItem(HORIZON_JWT);
|
3190 | };
|
3191 |
|
3192 | TokenStorage.prototype.remove = function remove() {
|
3193 | return this._storage.removeItem(HORIZON_JWT);
|
3194 | };
|
3195 |
|
3196 | TokenStorage.prototype.setAuthFromQueryParams = function setAuthFromQueryParams() {
|
3197 | var parsed = (0, _queryParse2.default)(window.location.search);
|
3198 | if (parsed.horizon_auth != null) {
|
3199 | this.set(parsed.horizon_auth);
|
3200 | }
|
3201 | };
|
3202 |
|
3203 |
|
3204 |
|
3205 |
|
3206 | TokenStorage.prototype.handshake = function handshake() {
|
3207 |
|
3208 |
|
3209 | var token = this.get();
|
3210 | if (token != null) {
|
3211 | return { method: 'token', token: token };
|
3212 | } else if (this._authType === 'token') {
|
3213 | throw new Error('Attempting to authenticate with a token, but no token is present');
|
3214 | } else {
|
3215 | return { method: this._authType };
|
3216 | }
|
3217 | };
|
3218 |
|
3219 |
|
3220 |
|
3221 |
|
3222 | TokenStorage.prototype.hasAuthToken = function hasAuthToken() {
|
3223 | return Boolean(this.get());
|
3224 | };
|
3225 |
|
3226 | return TokenStorage;
|
3227 | }();
|
3228 |
|
3229 | function clearAuthTokens() {
|
3230 | return getStorage().removeItem(HORIZON_JWT);
|
3231 | }
|
3232 |
|
3233 | },
|
3234 |
|
3235 |
|
3236 |
|
3237 |
|
3238 | function(module, exports) {
|
3239 |
|
3240 | 'use strict';
|
3241 |
|
3242 | exports.__esModule = true;
|
3243 |
|
3244 | exports.default = function (str) {
|
3245 | if (typeof str !== 'string') {
|
3246 | return {};
|
3247 | }
|
3248 |
|
3249 | var str2 = str.trim().replace(/^(\?|#|&)/, '');
|
3250 |
|
3251 | if (!str2) {
|
3252 | return {};
|
3253 | }
|
3254 |
|
3255 | return str2.split('&').reduce(function (ret, param) {
|
3256 | var parts = param.replace(/\+/g, ' ').split('=');
|
3257 |
|
3258 |
|
3259 | var key = parts.shift();
|
3260 | var val = parts.length > 0 ? parts.join('=') : undefined;
|
3261 |
|
3262 | var key2 = decodeURIComponent(key);
|
3263 |
|
3264 |
|
3265 |
|
3266 | var val2 = val === undefined ? null : decodeURIComponent(val);
|
3267 |
|
3268 | if (!ret.hasOwnProperty(key2)) {
|
3269 | ret[key2] = val2;
|
3270 | } else if (Array.isArray(ret[key2])) {
|
3271 | ret[key2].push(val2);
|
3272 | } else {
|
3273 | ret[key2] = [ret[key2], val2];
|
3274 | }
|
3275 |
|
3276 | return ret;
|
3277 | }, {});
|
3278 | };
|
3279 |
|
3280 | },
|
3281 |
|
3282 |
|
3283 |
|
3284 |
|
3285 | function(module, exports, __webpack_require__) {
|
3286 |
|
3287 | 'use strict';
|
3288 |
|
3289 | exports.__esModule = true;
|
3290 | exports.default = fetchJSON;
|
3291 |
|
3292 | var _Observable = __webpack_require__( 1);
|
3293 |
|
3294 | var _fromPromise = __webpack_require__( 1);
|
3295 |
|
3296 | var _map = __webpack_require__( 1);
|
3297 |
|
3298 | var _isomorphicFetch = __webpack_require__( 97);
|
3299 |
|
3300 | var _isomorphicFetch2 = _interopRequireDefault(_isomorphicFetch);
|
3301 |
|
3302 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
3303 |
|
3304 | function fetchJSON(url) {
|
3305 | var _context;
|
3306 |
|
3307 | return (_context = _fromPromise.fromPromise.call(_Observable.Observable, (0, _isomorphicFetch2.default)(url)), _map.map).call(_context, function (response) {
|
3308 | return response.json();
|
3309 | });
|
3310 | }
|
3311 |
|
3312 | },
|
3313 |
|
3314 |
|
3315 |
|
3316 |
|
3317 | function(module, exports, __webpack_require__) {
|
3318 |
|
3319 |
|
3320 |
|
3321 |
|
3322 |
|
3323 | __webpack_require__( 98);
|
3324 | module.exports = self.fetch.bind(self);
|
3325 |
|
3326 |
|
3327 | },
|
3328 |
|
3329 |
|
3330 |
|
3331 |
|
3332 | function(module, exports) {
|
3333 |
|
3334 | (function(self) {
|
3335 | 'use strict';
|
3336 |
|
3337 | if (self.fetch) {
|
3338 | return
|
3339 | }
|
3340 |
|
3341 | var support = {
|
3342 | searchParams: 'URLSearchParams' in self,
|
3343 | iterable: 'Symbol' in self && 'iterator' in Symbol,
|
3344 | blob: 'FileReader' in self && 'Blob' in self && (function() {
|
3345 | try {
|
3346 | new Blob()
|
3347 | return true
|
3348 | } catch(e) {
|
3349 | return false
|
3350 | }
|
3351 | })(),
|
3352 | formData: 'FormData' in self,
|
3353 | arrayBuffer: 'ArrayBuffer' in self
|
3354 | }
|
3355 |
|
3356 | function normalizeName(name) {
|
3357 | if (typeof name !== 'string') {
|
3358 | name = String(name)
|
3359 | }
|
3360 | if (/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(name)) {
|
3361 | throw new TypeError('Invalid character in header field name')
|
3362 | }
|
3363 | return name.toLowerCase()
|
3364 | }
|
3365 |
|
3366 | function normalizeValue(value) {
|
3367 | if (typeof value !== 'string') {
|
3368 | value = String(value)
|
3369 | }
|
3370 | return value
|
3371 | }
|
3372 |
|
3373 |
|
3374 | function iteratorFor(items) {
|
3375 | var iterator = {
|
3376 | next: function() {
|
3377 | var value = items.shift()
|
3378 | return {done: value === undefined, value: value}
|
3379 | }
|
3380 | }
|
3381 |
|
3382 | if (support.iterable) {
|
3383 | iterator[Symbol.iterator] = function() {
|
3384 | return iterator
|
3385 | }
|
3386 | }
|
3387 |
|
3388 | return iterator
|
3389 | }
|
3390 |
|
3391 | function Headers(headers) {
|
3392 | this.map = {}
|
3393 |
|
3394 | if (headers instanceof Headers) {
|
3395 | headers.forEach(function(value, name) {
|
3396 | this.append(name, value)
|
3397 | }, this)
|
3398 |
|
3399 | } else if (headers) {
|
3400 | Object.getOwnPropertyNames(headers).forEach(function(name) {
|
3401 | this.append(name, headers[name])
|
3402 | }, this)
|
3403 | }
|
3404 | }
|
3405 |
|
3406 | Headers.prototype.append = function(name, value) {
|
3407 | name = normalizeName(name)
|
3408 | value = normalizeValue(value)
|
3409 | var list = this.map[name]
|
3410 | if (!list) {
|
3411 | list = []
|
3412 | this.map[name] = list
|
3413 | }
|
3414 | list.push(value)
|
3415 | }
|
3416 |
|
3417 | Headers.prototype['delete'] = function(name) {
|
3418 | delete this.map[normalizeName(name)]
|
3419 | }
|
3420 |
|
3421 | Headers.prototype.get = function(name) {
|
3422 | var values = this.map[normalizeName(name)]
|
3423 | return values ? values[0] : null
|
3424 | }
|
3425 |
|
3426 | Headers.prototype.getAll = function(name) {
|
3427 | return this.map[normalizeName(name)] || []
|
3428 | }
|
3429 |
|
3430 | Headers.prototype.has = function(name) {
|
3431 | return this.map.hasOwnProperty(normalizeName(name))
|
3432 | }
|
3433 |
|
3434 | Headers.prototype.set = function(name, value) {
|
3435 | this.map[normalizeName(name)] = [normalizeValue(value)]
|
3436 | }
|
3437 |
|
3438 | Headers.prototype.forEach = function(callback, thisArg) {
|
3439 | Object.getOwnPropertyNames(this.map).forEach(function(name) {
|
3440 | this.map[name].forEach(function(value) {
|
3441 | callback.call(thisArg, value, name, this)
|
3442 | }, this)
|
3443 | }, this)
|
3444 | }
|
3445 |
|
3446 | Headers.prototype.keys = function() {
|
3447 | var items = []
|
3448 | this.forEach(function(value, name) { items.push(name) })
|
3449 | return iteratorFor(items)
|
3450 | }
|
3451 |
|
3452 | Headers.prototype.values = function() {
|
3453 | var items = []
|
3454 | this.forEach(function(value) { items.push(value) })
|
3455 | return iteratorFor(items)
|
3456 | }
|
3457 |
|
3458 | Headers.prototype.entries = function() {
|
3459 | var items = []
|
3460 | this.forEach(function(value, name) { items.push([name, value]) })
|
3461 | return iteratorFor(items)
|
3462 | }
|
3463 |
|
3464 | if (support.iterable) {
|
3465 | Headers.prototype[Symbol.iterator] = Headers.prototype.entries
|
3466 | }
|
3467 |
|
3468 | function consumed(body) {
|
3469 | if (body.bodyUsed) {
|
3470 | return Promise.reject(new TypeError('Already read'))
|
3471 | }
|
3472 | body.bodyUsed = true
|
3473 | }
|
3474 |
|
3475 | function fileReaderReady(reader) {
|
3476 | return new Promise(function(resolve, reject) {
|
3477 | reader.onload = function() {
|
3478 | resolve(reader.result)
|
3479 | }
|
3480 | reader.onerror = function() {
|
3481 | reject(reader.error)
|
3482 | }
|
3483 | })
|
3484 | }
|
3485 |
|
3486 | function readBlobAsArrayBuffer(blob) {
|
3487 | var reader = new FileReader()
|
3488 | reader.readAsArrayBuffer(blob)
|
3489 | return fileReaderReady(reader)
|
3490 | }
|
3491 |
|
3492 | function readBlobAsText(blob) {
|
3493 | var reader = new FileReader()
|
3494 | reader.readAsText(blob)
|
3495 | return fileReaderReady(reader)
|
3496 | }
|
3497 |
|
3498 | function Body() {
|
3499 | this.bodyUsed = false
|
3500 |
|
3501 | this._initBody = function(body) {
|
3502 | this._bodyInit = body
|
3503 | if (typeof body === 'string') {
|
3504 | this._bodyText = body
|
3505 | } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {
|
3506 | this._bodyBlob = body
|
3507 | } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {
|
3508 | this._bodyFormData = body
|
3509 | } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
|
3510 | this._bodyText = body.toString()
|
3511 | } else if (!body) {
|
3512 | this._bodyText = ''
|
3513 | } else if (support.arrayBuffer && ArrayBuffer.prototype.isPrototypeOf(body)) {
|
3514 |
|
3515 |
|
3516 | } else {
|
3517 | throw new Error('unsupported BodyInit type')
|
3518 | }
|
3519 |
|
3520 | if (!this.headers.get('content-type')) {
|
3521 | if (typeof body === 'string') {
|
3522 | this.headers.set('content-type', 'text/plain;charset=UTF-8')
|
3523 | } else if (this._bodyBlob && this._bodyBlob.type) {
|
3524 | this.headers.set('content-type', this._bodyBlob.type)
|
3525 | } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
|
3526 | this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8')
|
3527 | }
|
3528 | }
|
3529 | }
|
3530 |
|
3531 | if (support.blob) {
|
3532 | this.blob = function() {
|
3533 | var rejected = consumed(this)
|
3534 | if (rejected) {
|
3535 | return rejected
|
3536 | }
|
3537 |
|
3538 | if (this._bodyBlob) {
|
3539 | return Promise.resolve(this._bodyBlob)
|
3540 | } else if (this._bodyFormData) {
|
3541 | throw new Error('could not read FormData body as blob')
|
3542 | } else {
|
3543 | return Promise.resolve(new Blob([this._bodyText]))
|
3544 | }
|
3545 | }
|
3546 |
|
3547 | this.arrayBuffer = function() {
|
3548 | return this.blob().then(readBlobAsArrayBuffer)
|
3549 | }
|
3550 |
|
3551 | this.text = function() {
|
3552 | var rejected = consumed(this)
|
3553 | if (rejected) {
|
3554 | return rejected
|
3555 | }
|
3556 |
|
3557 | if (this._bodyBlob) {
|
3558 | return readBlobAsText(this._bodyBlob)
|
3559 | } else if (this._bodyFormData) {
|
3560 | throw new Error('could not read FormData body as text')
|
3561 | } else {
|
3562 | return Promise.resolve(this._bodyText)
|
3563 | }
|
3564 | }
|
3565 | } else {
|
3566 | this.text = function() {
|
3567 | var rejected = consumed(this)
|
3568 | return rejected ? rejected : Promise.resolve(this._bodyText)
|
3569 | }
|
3570 | }
|
3571 |
|
3572 | if (support.formData) {
|
3573 | this.formData = function() {
|
3574 | return this.text().then(decode)
|
3575 | }
|
3576 | }
|
3577 |
|
3578 | this.json = function() {
|
3579 | return this.text().then(JSON.parse)
|
3580 | }
|
3581 |
|
3582 | return this
|
3583 | }
|
3584 |
|
3585 |
|
3586 | var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']
|
3587 |
|
3588 | function normalizeMethod(method) {
|
3589 | var upcased = method.toUpperCase()
|
3590 | return (methods.indexOf(upcased) > -1) ? upcased : method
|
3591 | }
|
3592 |
|
3593 | function Request(input, options) {
|
3594 | options = options || {}
|
3595 | var body = options.body
|
3596 | if (Request.prototype.isPrototypeOf(input)) {
|
3597 | if (input.bodyUsed) {
|
3598 | throw new TypeError('Already read')
|
3599 | }
|
3600 | this.url = input.url
|
3601 | this.credentials = input.credentials
|
3602 | if (!options.headers) {
|
3603 | this.headers = new Headers(input.headers)
|
3604 | }
|
3605 | this.method = input.method
|
3606 | this.mode = input.mode
|
3607 | if (!body) {
|
3608 | body = input._bodyInit
|
3609 | input.bodyUsed = true
|
3610 | }
|
3611 | } else {
|
3612 | this.url = input
|
3613 | }
|
3614 |
|
3615 | this.credentials = options.credentials || this.credentials || 'omit'
|
3616 | if (options.headers || !this.headers) {
|
3617 | this.headers = new Headers(options.headers)
|
3618 | }
|
3619 | this.method = normalizeMethod(options.method || this.method || 'GET')
|
3620 | this.mode = options.mode || this.mode || null
|
3621 | this.referrer = null
|
3622 |
|
3623 | if ((this.method === 'GET' || this.method === 'HEAD') && body) {
|
3624 | throw new TypeError('Body not allowed for GET or HEAD requests')
|
3625 | }
|
3626 | this._initBody(body)
|
3627 | }
|
3628 |
|
3629 | Request.prototype.clone = function() {
|
3630 | return new Request(this)
|
3631 | }
|
3632 |
|
3633 | function decode(body) {
|
3634 | var form = new FormData()
|
3635 | body.trim().split('&').forEach(function(bytes) {
|
3636 | if (bytes) {
|
3637 | var split = bytes.split('=')
|
3638 | var name = split.shift().replace(/\+/g, ' ')
|
3639 | var value = split.join('=').replace(/\+/g, ' ')
|
3640 | form.append(decodeURIComponent(name), decodeURIComponent(value))
|
3641 | }
|
3642 | })
|
3643 | return form
|
3644 | }
|
3645 |
|
3646 | function headers(xhr) {
|
3647 | var head = new Headers()
|
3648 | var pairs = (xhr.getAllResponseHeaders() || '').trim().split('\n')
|
3649 | pairs.forEach(function(header) {
|
3650 | var split = header.trim().split(':')
|
3651 | var key = split.shift().trim()
|
3652 | var value = split.join(':').trim()
|
3653 | head.append(key, value)
|
3654 | })
|
3655 | return head
|
3656 | }
|
3657 |
|
3658 | Body.call(Request.prototype)
|
3659 |
|
3660 | function Response(bodyInit, options) {
|
3661 | if (!options) {
|
3662 | options = {}
|
3663 | }
|
3664 |
|
3665 | this.type = 'default'
|
3666 | this.status = options.status
|
3667 | this.ok = this.status >= 200 && this.status < 300
|
3668 | this.statusText = options.statusText
|
3669 | this.headers = options.headers instanceof Headers ? options.headers : new Headers(options.headers)
|
3670 | this.url = options.url || ''
|
3671 | this._initBody(bodyInit)
|
3672 | }
|
3673 |
|
3674 | Body.call(Response.prototype)
|
3675 |
|
3676 | Response.prototype.clone = function() {
|
3677 | return new Response(this._bodyInit, {
|
3678 | status: this.status,
|
3679 | statusText: this.statusText,
|
3680 | headers: new Headers(this.headers),
|
3681 | url: this.url
|
3682 | })
|
3683 | }
|
3684 |
|
3685 | Response.error = function() {
|
3686 | var response = new Response(null, {status: 0, statusText: ''})
|
3687 | response.type = 'error'
|
3688 | return response
|
3689 | }
|
3690 |
|
3691 | var redirectStatuses = [301, 302, 303, 307, 308]
|
3692 |
|
3693 | Response.redirect = function(url, status) {
|
3694 | if (redirectStatuses.indexOf(status) === -1) {
|
3695 | throw new RangeError('Invalid status code')
|
3696 | }
|
3697 |
|
3698 | return new Response(null, {status: status, headers: {location: url}})
|
3699 | }
|
3700 |
|
3701 | self.Headers = Headers
|
3702 | self.Request = Request
|
3703 | self.Response = Response
|
3704 |
|
3705 | self.fetch = function(input, init) {
|
3706 | return new Promise(function(resolve, reject) {
|
3707 | var request
|
3708 | if (Request.prototype.isPrototypeOf(input) && !init) {
|
3709 | request = input
|
3710 | } else {
|
3711 | request = new Request(input, init)
|
3712 | }
|
3713 |
|
3714 | var xhr = new XMLHttpRequest()
|
3715 |
|
3716 | function responseURL() {
|
3717 | if ('responseURL' in xhr) {
|
3718 | return xhr.responseURL
|
3719 | }
|
3720 |
|
3721 |
|
3722 | if (/^X-Request-URL:/m.test(xhr.getAllResponseHeaders())) {
|
3723 | return xhr.getResponseHeader('X-Request-URL')
|
3724 | }
|
3725 |
|
3726 | return
|
3727 | }
|
3728 |
|
3729 | xhr.onload = function() {
|
3730 | var options = {
|
3731 | status: xhr.status,
|
3732 | statusText: xhr.statusText,
|
3733 | headers: headers(xhr),
|
3734 | url: responseURL()
|
3735 | }
|
3736 | var body = 'response' in xhr ? xhr.response : xhr.responseText
|
3737 | resolve(new Response(body, options))
|
3738 | }
|
3739 |
|
3740 | xhr.onerror = function() {
|
3741 | reject(new TypeError('Network request failed'))
|
3742 | }
|
3743 |
|
3744 | xhr.ontimeout = function() {
|
3745 | reject(new TypeError('Network request failed'))
|
3746 | }
|
3747 |
|
3748 | xhr.open(request.method, request.url, true)
|
3749 |
|
3750 | if (request.credentials === 'include') {
|
3751 | xhr.withCredentials = true
|
3752 | }
|
3753 |
|
3754 | if ('responseType' in xhr && support.blob) {
|
3755 | xhr.responseType = 'blob'
|
3756 | }
|
3757 |
|
3758 | request.headers.forEach(function(value, name) {
|
3759 | xhr.setRequestHeader(name, value)
|
3760 | })
|
3761 |
|
3762 | xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)
|
3763 | })
|
3764 | }
|
3765 | self.fetch.polyfill = true
|
3766 | })(typeof self !== 'undefined' ? self : this);
|
3767 |
|
3768 |
|
3769 | }
|
3770 | ])
|
3771 | });
|
3772 | ;
|
3773 |
|
\ | No newline at end of file |