2017-07-11 10:43:53 +00:00
|
|
|
/**
|
|
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
|
|
*
|
2018-02-17 02:24:55 +00:00
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
2017-07-11 10:43:53 +00:00
|
|
|
*
|
2017-07-17 10:02:14 +00:00
|
|
|
* @providesModule babelHelpers
|
2017-07-11 10:43:53 +00:00
|
|
|
* @polyfill
|
2017-07-17 10:02:14 +00:00
|
|
|
* @nolint
|
2017-07-11 10:43:53 +00:00
|
|
|
*/
|
|
|
|
|
2018-01-09 00:54:56 +00:00
|
|
|
/* eslint-disable quotes, curly, no-proto, no-undef-init, dot-notation */
|
2017-07-11 10:43:53 +00:00
|
|
|
|
|
|
|
// Created by running:
|
2018-04-11 15:12:44 +00:00
|
|
|
// require('babel-core').buildExternalHelpers('_extends classCallCheck createClass createRawReactElement defineProperty get inherits interopRequireDefault interopRequireWildcard objectWithoutProperties possibleConstructorReturn slicedToArray taggedTemplateLiteral toArray toConsumableArray '.split(' '))
|
|
|
|
// then replacing the `global` reference in the last line to also use `this`.
|
2017-07-11 10:43:53 +00:00
|
|
|
//
|
2018-04-11 15:12:44 +00:00
|
|
|
// actually, that's a lie, because babel6 omits _extends and createRawReactElement
|
2017-07-11 10:43:53 +00:00
|
|
|
|
|
|
|
var babelHelpers = global.babelHelpers = {};
|
|
|
|
|
2018-04-11 15:12:44 +00:00
|
|
|
babelHelpers.typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
|
|
|
|
return typeof obj;
|
|
|
|
} : function (obj) {
|
|
|
|
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
|
|
};
|
|
|
|
|
2017-07-11 10:43:53 +00:00
|
|
|
babelHelpers.createRawReactElement = (function () {
|
|
|
|
var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7;
|
|
|
|
return function createRawReactElement(type, key, props) {
|
|
|
|
return {
|
|
|
|
$$typeof: REACT_ELEMENT_TYPE,
|
|
|
|
type: type,
|
|
|
|
key: key,
|
|
|
|
ref: null,
|
|
|
|
props: props,
|
|
|
|
_owner: null
|
|
|
|
};
|
|
|
|
};
|
|
|
|
})();
|
|
|
|
|
|
|
|
babelHelpers.classCallCheck = function (instance, Constructor) {
|
|
|
|
if (!(instance instanceof Constructor)) {
|
|
|
|
throw new TypeError("Cannot call a class as a function");
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2018-04-11 15:12:44 +00:00
|
|
|
babelHelpers.createClass = (function () {
|
|
|
|
function defineProperties(target, props) {
|
|
|
|
for (var i = 0; i < props.length; i++) {
|
|
|
|
var descriptor = props[i];
|
|
|
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
|
|
descriptor.configurable = true;
|
|
|
|
if ("value" in descriptor) descriptor.writable = true;
|
|
|
|
Object.defineProperty(target, descriptor.key, descriptor);
|
|
|
|
}
|
2017-07-11 10:43:53 +00:00
|
|
|
}
|
|
|
|
|
2018-04-11 15:12:44 +00:00
|
|
|
return function (Constructor, protoProps, staticProps) {
|
|
|
|
if (protoProps) defineProperties(Constructor.prototype, protoProps);
|
|
|
|
if (staticProps) defineProperties(Constructor, staticProps);
|
|
|
|
return Constructor;
|
|
|
|
};
|
|
|
|
})();
|
|
|
|
|
|
|
|
babelHelpers.defineEnumerableProperties = function(obj, descs) {
|
|
|
|
for (var key in descs) {
|
|
|
|
var desc = descs[key];
|
|
|
|
desc.configurable = (desc.enumerable = true);
|
|
|
|
if ('value' in desc) desc.writable = true;
|
|
|
|
Object.defineProperty(obj, key, desc);
|
|
|
|
}
|
|
|
|
return obj;
|
2017-07-11 10:43:53 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
babelHelpers.defineProperty = function (obj, key, value) {
|
|
|
|
if (key in obj) {
|
|
|
|
Object.defineProperty(obj, key, {
|
|
|
|
value: value,
|
|
|
|
enumerable: true,
|
|
|
|
configurable: true,
|
|
|
|
writable: true
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
obj[key] = value;
|
|
|
|
}
|
|
|
|
|
|
|
|
return obj;
|
|
|
|
};
|
|
|
|
|
|
|
|
babelHelpers._extends = babelHelpers.extends = Object.assign || function (target) {
|
|
|
|
for (var i = 1; i < arguments.length; i++) {
|
|
|
|
var source = arguments[i];
|
|
|
|
|
|
|
|
for (var key in source) {
|
|
|
|
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
|
|
target[key] = source[key];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return target;
|
|
|
|
};
|
|
|
|
|
|
|
|
babelHelpers.get = function get(object, property, receiver) {
|
|
|
|
if (object === null) object = Function.prototype;
|
|
|
|
var desc = Object.getOwnPropertyDescriptor(object, property);
|
|
|
|
|
|
|
|
if (desc === undefined) {
|
|
|
|
var parent = Object.getPrototypeOf(object);
|
|
|
|
|
|
|
|
if (parent === null) {
|
|
|
|
return undefined;
|
|
|
|
} else {
|
|
|
|
return get(parent, property, receiver);
|
|
|
|
}
|
|
|
|
} else if ("value" in desc) {
|
|
|
|
return desc.value;
|
|
|
|
} else {
|
|
|
|
var getter = desc.get;
|
|
|
|
|
|
|
|
if (getter === undefined) {
|
|
|
|
return undefined;
|
|
|
|
}
|
|
|
|
|
|
|
|
return getter.call(receiver);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
babelHelpers.inherits = function (subClass, superClass) {
|
|
|
|
if (typeof superClass !== "function" && superClass !== null) {
|
2018-04-11 15:12:44 +00:00
|
|
|
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
|
2017-07-11 10:43:53 +00:00
|
|
|
}
|
2018-04-11 15:12:44 +00:00
|
|
|
|
2017-07-11 10:43:53 +00:00
|
|
|
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
|
|
constructor: {
|
|
|
|
value: subClass,
|
|
|
|
enumerable: false,
|
|
|
|
writable: true,
|
|
|
|
configurable: true
|
|
|
|
}
|
|
|
|
});
|
|
|
|
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
|
|
|
|
};
|
|
|
|
|
|
|
|
babelHelpers.interopRequireDefault = function (obj) {
|
|
|
|
return obj && obj.__esModule ? obj : {
|
|
|
|
default: obj
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
babelHelpers.interopRequireWildcard = function (obj) {
|
|
|
|
if (obj && obj.__esModule) {
|
|
|
|
return obj;
|
|
|
|
} else {
|
|
|
|
var newObj = {};
|
|
|
|
|
|
|
|
if (obj != null) {
|
|
|
|
for (var key in obj) {
|
2018-04-11 15:12:44 +00:00
|
|
|
if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
|
2017-07-11 10:43:53 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
newObj.default = obj;
|
|
|
|
return newObj;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2018-04-11 15:12:44 +00:00
|
|
|
babelHelpers.objectWithoutProperties = function (obj, keys) {
|
2017-07-11 10:43:53 +00:00
|
|
|
var target = {};
|
|
|
|
|
2018-04-11 15:12:44 +00:00
|
|
|
for (var i in obj) {
|
|
|
|
if (keys.indexOf(i) >= 0) continue;
|
|
|
|
if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
|
|
|
|
target[i] = obj[i];
|
2017-07-11 10:43:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return target;
|
|
|
|
};
|
|
|
|
|
|
|
|
babelHelpers.possibleConstructorReturn = function (self, call) {
|
2018-04-11 15:12:44 +00:00
|
|
|
if (!self) {
|
2017-07-11 10:43:53 +00:00
|
|
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
|
|
}
|
|
|
|
|
2018-04-11 15:12:44 +00:00
|
|
|
return call && (typeof call === "object" || typeof call === "function") ? call : self;
|
2017-07-11 10:43:53 +00:00
|
|
|
};
|
|
|
|
|
2018-04-11 15:12:44 +00:00
|
|
|
babelHelpers.slicedToArray = (function () {
|
|
|
|
function sliceIterator(arr, i) {
|
|
|
|
var _arr = [];
|
|
|
|
var _n = true;
|
|
|
|
var _d = false;
|
|
|
|
var _e = undefined;
|
2017-07-11 10:43:53 +00:00
|
|
|
|
2018-04-11 03:58:22 +00:00
|
|
|
try {
|
2018-04-11 15:12:44 +00:00
|
|
|
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
|
|
|
|
_arr.push(_s.value);
|
|
|
|
|
|
|
|
if (i && _arr.length === i) break;
|
|
|
|
}
|
|
|
|
} catch (err) {
|
|
|
|
_d = true;
|
|
|
|
_e = err;
|
2017-07-11 10:43:53 +00:00
|
|
|
} finally {
|
2018-04-11 15:12:44 +00:00
|
|
|
try {
|
|
|
|
if (!_n && _i["return"]) _i["return"]();
|
|
|
|
} finally {
|
|
|
|
if (_d) throw _e;
|
|
|
|
}
|
2017-07-11 10:43:53 +00:00
|
|
|
}
|
2018-04-11 03:58:22 +00:00
|
|
|
|
2018-04-11 15:12:44 +00:00
|
|
|
return _arr;
|
2018-04-11 03:58:22 +00:00
|
|
|
}
|
2018-04-11 15:12:44 +00:00
|
|
|
|
|
|
|
return function (arr, i) {
|
|
|
|
if (Array.isArray(arr)) {
|
|
|
|
return arr;
|
|
|
|
} else if (Symbol.iterator in Object(arr)) {
|
|
|
|
return sliceIterator(arr, i);
|
|
|
|
} else {
|
|
|
|
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
|
|
|
}
|
|
|
|
};
|
|
|
|
})();
|
2017-07-11 10:43:53 +00:00
|
|
|
|
|
|
|
babelHelpers.taggedTemplateLiteral = function (strings, raw) {
|
|
|
|
return Object.freeze(Object.defineProperties(strings, {
|
|
|
|
raw: {
|
|
|
|
value: Object.freeze(raw)
|
|
|
|
}
|
|
|
|
}));
|
|
|
|
};
|
|
|
|
|
|
|
|
babelHelpers.toArray = function (arr) {
|
|
|
|
return Array.isArray(arr) ? arr : Array.from(arr);
|
|
|
|
};
|
|
|
|
|
|
|
|
babelHelpers.toConsumableArray = function (arr) {
|
|
|
|
if (Array.isArray(arr)) {
|
2018-04-11 15:12:44 +00:00
|
|
|
for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
|
2017-07-11 10:43:53 +00:00
|
|
|
|
|
|
|
return arr2;
|
|
|
|
} else {
|
|
|
|
return Array.from(arr);
|
|
|
|
}
|
|
|
|
};
|