You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32444 lines
1.1 MiB
32444 lines
1.1 MiB
/******/ (function(modules) { // webpackBootstrap
|
|
/******/ // The module cache
|
|
/******/ var installedModules = {};
|
|
/******/
|
|
/******/ // The require function
|
|
/******/ function __webpack_require__(moduleId) {
|
|
/******/
|
|
/******/ // Check if module is in cache
|
|
/******/ if(installedModules[moduleId]) {
|
|
/******/ return installedModules[moduleId].exports;
|
|
/******/ }
|
|
/******/ // Create a new module (and put it into the cache)
|
|
/******/ var module = installedModules[moduleId] = {
|
|
/******/ i: moduleId,
|
|
/******/ l: false,
|
|
/******/ exports: {}
|
|
/******/ };
|
|
/******/
|
|
/******/ // Execute the module function
|
|
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
/******/
|
|
/******/ // Flag the module as loaded
|
|
/******/ module.l = true;
|
|
/******/
|
|
/******/ // Return the exports of the module
|
|
/******/ return module.exports;
|
|
/******/ }
|
|
/******/
|
|
/******/
|
|
/******/ // expose the modules object (__webpack_modules__)
|
|
/******/ __webpack_require__.m = modules;
|
|
/******/
|
|
/******/ // expose the module cache
|
|
/******/ __webpack_require__.c = installedModules;
|
|
/******/
|
|
/******/ // define getter function for harmony exports
|
|
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
/******/ }
|
|
/******/ };
|
|
/******/
|
|
/******/ // define __esModule on exports
|
|
/******/ __webpack_require__.r = function(exports) {
|
|
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
/******/ }
|
|
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
/******/ };
|
|
/******/
|
|
/******/ // create a fake namespace object
|
|
/******/ // mode & 1: value is a module id, require it
|
|
/******/ // mode & 2: merge all properties of value into the ns
|
|
/******/ // mode & 4: return value when already ns object
|
|
/******/ // mode & 8|1: behave like require
|
|
/******/ __webpack_require__.t = function(value, mode) {
|
|
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
/******/ if(mode & 8) return value;
|
|
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
/******/ var ns = Object.create(null);
|
|
/******/ __webpack_require__.r(ns);
|
|
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
/******/ return ns;
|
|
/******/ };
|
|
/******/
|
|
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
/******/ __webpack_require__.n = function(module) {
|
|
/******/ var getter = module && module.__esModule ?
|
|
/******/ function getDefault() { return module['default']; } :
|
|
/******/ function getModuleExports() { return module; };
|
|
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
/******/ return getter;
|
|
/******/ };
|
|
/******/
|
|
/******/ // Object.prototype.hasOwnProperty.call
|
|
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
/******/
|
|
/******/ // __webpack_public_path__
|
|
/******/ __webpack_require__.p = "";
|
|
/******/
|
|
/******/
|
|
/******/ // Load entry module and return exports
|
|
/******/ return __webpack_require__(__webpack_require__.s = 296);
|
|
/******/ })
|
|
/************************************************************************/
|
|
/******/ ([
|
|
/* 0 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
if (true) {
|
|
module.exports = __webpack_require__(499);
|
|
} else {}
|
|
|
|
|
|
/***/ }),
|
|
/* 1 */
|
|
/***/ (function(module, exports) {
|
|
|
|
function _defineProperty(obj, key, value) {
|
|
if (key in obj) {
|
|
Object.defineProperty(obj, key, {
|
|
value: value,
|
|
enumerable: true,
|
|
configurable: true,
|
|
writable: true
|
|
});
|
|
} else {
|
|
obj[key] = value;
|
|
}
|
|
|
|
return obj;
|
|
}
|
|
|
|
module.exports = _defineProperty;
|
|
|
|
/***/ }),
|
|
/* 2 */
|
|
/***/ (function(module, exports) {
|
|
|
|
function _assertThisInitialized(self) {
|
|
if (self === void 0) {
|
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
}
|
|
|
|
return self;
|
|
}
|
|
|
|
module.exports = _assertThisInitialized;
|
|
|
|
/***/ }),
|
|
/* 3 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var global = __webpack_require__(16);
|
|
var core = __webpack_require__(37);
|
|
var hide = __webpack_require__(29);
|
|
var redefine = __webpack_require__(30);
|
|
var ctx = __webpack_require__(38);
|
|
var PROTOTYPE = 'prototype';
|
|
|
|
var $export = function (type, name, source) {
|
|
var IS_FORCED = type & $export.F;
|
|
var IS_GLOBAL = type & $export.G;
|
|
var IS_STATIC = type & $export.S;
|
|
var IS_PROTO = type & $export.P;
|
|
var IS_BIND = type & $export.B;
|
|
var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE];
|
|
var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
|
|
var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});
|
|
var key, own, out, exp;
|
|
if (IS_GLOBAL) source = name;
|
|
for (key in source) {
|
|
// contains in native
|
|
own = !IS_FORCED && target && target[key] !== undefined;
|
|
// export native or passed
|
|
out = (own ? target : source)[key];
|
|
// bind timers to global for call from export context
|
|
exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
|
|
// extend global
|
|
if (target) redefine(target, key, out, type & $export.U);
|
|
// export
|
|
if (exports[key] != out) hide(exports, key, exp);
|
|
if (IS_PROTO && expProto[key] != out) expProto[key] = out;
|
|
}
|
|
};
|
|
global.core = core;
|
|
// type bitmap
|
|
$export.F = 1; // forced
|
|
$export.G = 2; // global
|
|
$export.S = 4; // static
|
|
$export.P = 8; // proto
|
|
$export.B = 16; // bind
|
|
$export.W = 32; // wrap
|
|
$export.U = 64; // safe
|
|
$export.R = 128; // real proto method for `library`
|
|
module.exports = $export;
|
|
|
|
|
|
/***/ }),
|
|
/* 4 */
|
|
/***/ (function(module, exports) {
|
|
|
|
function _extends() {
|
|
module.exports = _extends = Object.assign || function (target) {
|
|
for (var i = 1; i < arguments.length; i++) {
|
|
var source = arguments[i];
|
|
|
|
for (var key in source) {
|
|
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
target[key] = source[key];
|
|
}
|
|
}
|
|
}
|
|
|
|
return target;
|
|
};
|
|
|
|
return _extends.apply(this, arguments);
|
|
}
|
|
|
|
module.exports = _extends;
|
|
|
|
/***/ }),
|
|
/* 5 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
/**
|
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
if (false) { var throwOnDirectAccess, ReactIs; } else {
|
|
// By explicitly using `prop-types` you are opting into new production behavior.
|
|
// http://fb.me/prop-types-in-prod
|
|
module.exports = __webpack_require__(540)();
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
/* 6 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
|
|
Copyright (c) 2017 Jed Watson.
|
|
Licensed under the MIT License (MIT), see
|
|
http://jedwatson.github.io/classnames
|
|
*/
|
|
/* global define */
|
|
|
|
(function () {
|
|
'use strict';
|
|
|
|
var hasOwn = {}.hasOwnProperty;
|
|
|
|
function classNames () {
|
|
var classes = [];
|
|
|
|
for (var i = 0; i < arguments.length; i++) {
|
|
var arg = arguments[i];
|
|
if (!arg) continue;
|
|
|
|
var argType = typeof arg;
|
|
|
|
if (argType === 'string' || argType === 'number') {
|
|
classes.push(arg);
|
|
} else if (Array.isArray(arg) && arg.length) {
|
|
var inner = classNames.apply(null, arg);
|
|
if (inner) {
|
|
classes.push(inner);
|
|
}
|
|
} else if (argType === 'object') {
|
|
for (var key in arg) {
|
|
if (hasOwn.call(arg, key) && arg[key]) {
|
|
classes.push(key);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
return classes.join(' ');
|
|
}
|
|
|
|
if ( true && module.exports) {
|
|
classNames.default = classNames;
|
|
module.exports = classNames;
|
|
} else if (true) {
|
|
// register as 'classnames', consistent with npm package name
|
|
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
|
|
return classNames;
|
|
}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
|
|
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
} else {}
|
|
}());
|
|
|
|
|
|
/***/ }),
|
|
/* 7 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseInvoke = __webpack_require__(504),
|
|
baseRest = __webpack_require__(96);
|
|
|
|
/**
|
|
* Invokes the method at `path` of `object`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Object
|
|
* @param {Object} object The object to query.
|
|
* @param {Array|string} path The path of the method to invoke.
|
|
* @param {...*} [args] The arguments to invoke the method with.
|
|
* @returns {*} Returns the result of the invoked method.
|
|
* @example
|
|
*
|
|
* var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };
|
|
*
|
|
* _.invoke(object, 'a[0].b.c.slice', 1, 3);
|
|
* // => [2, 3]
|
|
*/
|
|
var invoke = baseRest(baseInvoke);
|
|
|
|
module.exports = invoke;
|
|
|
|
|
|
/***/ }),
|
|
/* 8 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* Checks if `value` is `null` or `undefined`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is nullish, else `false`.
|
|
* @example
|
|
*
|
|
* _.isNil(null);
|
|
* // => true
|
|
*
|
|
* _.isNil(void 0);
|
|
* // => true
|
|
*
|
|
* _.isNil(NaN);
|
|
* // => false
|
|
*/
|
|
function isNil(value) {
|
|
return value == null;
|
|
}
|
|
|
|
module.exports = isNil;
|
|
|
|
|
|
/***/ }),
|
|
/* 9 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var isObject = __webpack_require__(18);
|
|
module.exports = function (it) {
|
|
if (!isObject(it)) throw TypeError(it + ' is not an object!');
|
|
return it;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 10 */
|
|
/***/ (function(module, exports) {
|
|
|
|
function _getPrototypeOf(o) {
|
|
module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
};
|
|
return _getPrototypeOf(o);
|
|
}
|
|
|
|
module.exports = _getPrototypeOf;
|
|
|
|
/***/ }),
|
|
/* 11 */
|
|
/***/ (function(module, exports) {
|
|
|
|
function _classCallCheck(instance, Constructor) {
|
|
if (!(instance instanceof Constructor)) {
|
|
throw new TypeError("Cannot call a class as a function");
|
|
}
|
|
}
|
|
|
|
module.exports = _classCallCheck;
|
|
|
|
/***/ }),
|
|
/* 12 */
|
|
/***/ (function(module, exports) {
|
|
|
|
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);
|
|
}
|
|
}
|
|
|
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
return Constructor;
|
|
}
|
|
|
|
module.exports = _createClass;
|
|
|
|
/***/ }),
|
|
/* 13 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var _typeof = __webpack_require__(53);
|
|
|
|
var assertThisInitialized = __webpack_require__(2);
|
|
|
|
function _possibleConstructorReturn(self, call) {
|
|
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
return call;
|
|
}
|
|
|
|
return assertThisInitialized(self);
|
|
}
|
|
|
|
module.exports = _possibleConstructorReturn;
|
|
|
|
/***/ }),
|
|
/* 14 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var setPrototypeOf = __webpack_require__(503);
|
|
|
|
function _inherits(subClass, superClass) {
|
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
throw new TypeError("Super expression must either be null or a function");
|
|
}
|
|
|
|
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
constructor: {
|
|
value: subClass,
|
|
writable: true,
|
|
configurable: true
|
|
}
|
|
});
|
|
if (superClass) setPrototypeOf(subClass, superClass);
|
|
}
|
|
|
|
module.exports = _inherits;
|
|
|
|
/***/ }),
|
|
/* 15 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var defineProperty = __webpack_require__(1);
|
|
|
|
function _objectSpread(target) {
|
|
for (var i = 1; i < arguments.length; i++) {
|
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
var ownKeys = Object.keys(source);
|
|
|
|
if (typeof Object.getOwnPropertySymbols === 'function') {
|
|
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
|
|
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
}));
|
|
}
|
|
|
|
ownKeys.forEach(function (key) {
|
|
defineProperty(target, key, source[key]);
|
|
});
|
|
}
|
|
|
|
return target;
|
|
}
|
|
|
|
module.exports = _objectSpread;
|
|
|
|
/***/ }),
|
|
/* 16 */
|
|
/***/ (function(module, exports) {
|
|
|
|
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
var global = module.exports = typeof window != 'undefined' && window.Math == Math
|
|
? window : typeof self != 'undefined' && self.Math == Math ? self
|
|
// eslint-disable-next-line no-new-func
|
|
: Function('return this')();
|
|
if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef
|
|
|
|
|
|
/***/ }),
|
|
/* 17 */
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = function (exec) {
|
|
try {
|
|
return !!exec();
|
|
} catch (e) {
|
|
return true;
|
|
}
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 18 */
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = function (it) {
|
|
return typeof it === 'object' ? it !== null : typeof it === 'function';
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 19 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var store = __webpack_require__(89)('wks');
|
|
var uid = __webpack_require__(62);
|
|
var Symbol = __webpack_require__(16).Symbol;
|
|
var USE_SYMBOL = typeof Symbol == 'function';
|
|
|
|
var $exports = module.exports = function (name) {
|
|
return store[name] || (store[name] =
|
|
USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
|
|
};
|
|
|
|
$exports.store = store;
|
|
|
|
|
|
/***/ }),
|
|
/* 20 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 7.1.15 ToLength
|
|
var toInteger = __webpack_require__(40);
|
|
var min = Math.min;
|
|
module.exports = function (it) {
|
|
return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 21 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// Thank's IE8 for his funny defineProperty
|
|
module.exports = !__webpack_require__(17)(function () {
|
|
return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 22 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var anObject = __webpack_require__(9);
|
|
var IE8_DOM_DEFINE = __webpack_require__(194);
|
|
var toPrimitive = __webpack_require__(43);
|
|
var dP = Object.defineProperty;
|
|
|
|
exports.f = __webpack_require__(21) ? Object.defineProperty : function defineProperty(O, P, Attributes) {
|
|
anObject(O);
|
|
P = toPrimitive(P, true);
|
|
anObject(Attributes);
|
|
if (IE8_DOM_DEFINE) try {
|
|
return dP(O, P, Attributes);
|
|
} catch (e) { /* empty */ }
|
|
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
|
|
if ('value' in Attributes) O[P] = Attributes.value;
|
|
return O;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 23 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 7.1.13 ToObject(argument)
|
|
var defined = __webpack_require__(44);
|
|
module.exports = function (it) {
|
|
return Object(defined(it));
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 24 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseGet = __webpack_require__(119);
|
|
|
|
/**
|
|
* Gets the value at `path` of `object`. If the resolved value is
|
|
* `undefined`, the `defaultValue` is returned in its place.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.7.0
|
|
* @category Object
|
|
* @param {Object} object The object to query.
|
|
* @param {Array|string} path The path of the property to get.
|
|
* @param {*} [defaultValue] The value returned for `undefined` resolved values.
|
|
* @returns {*} Returns the resolved value.
|
|
* @example
|
|
*
|
|
* var object = { 'a': [{ 'b': { 'c': 3 } }] };
|
|
*
|
|
* _.get(object, 'a[0].b.c');
|
|
* // => 3
|
|
*
|
|
* _.get(object, ['a', '0', 'b', 'c']);
|
|
* // => 3
|
|
*
|
|
* _.get(object, 'a.b.c', 'default');
|
|
* // => 'default'
|
|
*/
|
|
function get(object, path, defaultValue) {
|
|
var result = object == null ? undefined : baseGet(object, path);
|
|
return result === undefined ? defaultValue : result;
|
|
}
|
|
|
|
module.exports = get;
|
|
|
|
|
|
/***/ }),
|
|
/* 25 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
var isObject = function isObject(val) {
|
|
return val !== null && !Array.isArray(val) && typeof val === 'object'
|
|
}
|
|
|
|
var codes = {
|
|
// ----------------------------------------
|
|
// By Code
|
|
// ----------------------------------------
|
|
3: 'Cancel',
|
|
6: 'Help',
|
|
8: 'Backspace',
|
|
9: 'Tab',
|
|
12: 'Clear',
|
|
13: 'Enter',
|
|
16: 'Shift',
|
|
17: 'Control',
|
|
18: 'Alt',
|
|
19: 'Pause',
|
|
20: 'CapsLock',
|
|
27: 'Escape',
|
|
28: 'Convert',
|
|
29: 'NonConvert',
|
|
30: 'Accept',
|
|
31: 'ModeChange',
|
|
32: ' ',
|
|
33: 'PageUp',
|
|
34: 'PageDown',
|
|
35: 'End',
|
|
36: 'Home',
|
|
37: 'ArrowLeft',
|
|
38: 'ArrowUp',
|
|
39: 'ArrowRight',
|
|
40: 'ArrowDown',
|
|
41: 'Select',
|
|
42: 'Print',
|
|
43: 'Execute',
|
|
44: 'PrintScreen',
|
|
45: 'Insert',
|
|
46: 'Delete',
|
|
48: ['0', ')'],
|
|
49: ['1', '!'],
|
|
50: ['2', '@'],
|
|
51: ['3', '#'],
|
|
52: ['4', '$'],
|
|
53: ['5', '%'],
|
|
54: ['6', '^'],
|
|
55: ['7', '&'],
|
|
56: ['8', '*'],
|
|
57: ['9', '('],
|
|
91: 'OS',
|
|
93: 'ContextMenu',
|
|
144: 'NumLock',
|
|
145: 'ScrollLock',
|
|
181: 'VolumeMute',
|
|
182: 'VolumeDown',
|
|
183: 'VolumeUp',
|
|
186: [';', ':'],
|
|
187: ['=', '+'],
|
|
188: [',', '<'],
|
|
189: ['-', '_'],
|
|
190: ['.', '>'],
|
|
191: ['/', '?'],
|
|
192: ['`', '~'],
|
|
219: ['[', '{'],
|
|
220: ['\\', '|'],
|
|
221: [']', '}'],
|
|
222: ["'", '"'],
|
|
224: 'Meta',
|
|
225: 'AltGraph',
|
|
246: 'Attn',
|
|
247: 'CrSel',
|
|
248: 'ExSel',
|
|
249: 'EraseEof',
|
|
250: 'Play',
|
|
251: 'ZoomOut',
|
|
}
|
|
|
|
// Function Keys (F1-24)
|
|
for (var i = 0; i < 24; i += 1) {
|
|
codes[112 + i] = 'F' + (i + 1)
|
|
}
|
|
|
|
// Alphabet (a-Z)
|
|
for (var j = 0; j < 26; j += 1) {
|
|
var n = j + 65
|
|
codes[n] = [String.fromCharCode(n + 32), String.fromCharCode(n)]
|
|
}
|
|
|
|
var keyboardKey = {
|
|
codes: codes,
|
|
|
|
/**
|
|
* Get the `keyCode` or `which` value from a keyboard event or `key` name.
|
|
* @param {string|object} eventOrKey A keyboard event-like object or `key` name.
|
|
* @param {string} [eventOrKey.key] If object, it must have one of these keys.
|
|
* @param {string} [eventOrKey.keyCode] If object, it must have one of these keys.
|
|
* @param {string} [eventOrKey.which] If object, it must have one of these keys.
|
|
* @returns {*}
|
|
*/
|
|
getCode: function getCode(eventOrKey) {
|
|
if (isObject(eventOrKey)) {
|
|
return eventOrKey.keyCode || eventOrKey.which || this[eventOrKey.key]
|
|
}
|
|
return this[eventOrKey]
|
|
},
|
|
|
|
/**
|
|
* Get the key name from a keyboard event, `keyCode`, or `which` value.
|
|
* @param {number|object} eventOrCode A keyboard event-like object or key code.
|
|
* @param {number} [eventOrCode.key] If object with a `key` name, it will be returned.
|
|
* @param {number} [eventOrCode.keyCode] If object, it must have one of these keys.
|
|
* @param {number} [eventOrCode.which] If object, it must have one of these keys.
|
|
* @param {number} [eventOrCode.shiftKey] If object, it must have one of these keys.
|
|
* @returns {*}
|
|
*/
|
|
getKey: function getKey(eventOrCode) {
|
|
var isEvent = isObject(eventOrCode)
|
|
|
|
// handle events with a `key` already defined
|
|
if (isEvent && eventOrCode.key) {
|
|
return eventOrCode.key
|
|
}
|
|
|
|
var name = codes[isEvent ? eventOrCode.keyCode || eventOrCode.which : eventOrCode]
|
|
|
|
if (Array.isArray(name)) {
|
|
if (isEvent) {
|
|
name = name[eventOrCode.shiftKey ? 1 : 0]
|
|
} else {
|
|
name = name[0]
|
|
}
|
|
}
|
|
|
|
return name
|
|
},
|
|
|
|
// ----------------------------------------
|
|
// By Name
|
|
// ----------------------------------------
|
|
// declare these manually for static analysis
|
|
Cancel: 3,
|
|
Help: 6,
|
|
Backspace: 8,
|
|
Tab: 9,
|
|
Clear: 12,
|
|
Enter: 13,
|
|
Shift: 16,
|
|
Control: 17,
|
|
Alt: 18,
|
|
Pause: 19,
|
|
CapsLock: 20,
|
|
Escape: 27,
|
|
Convert: 28,
|
|
NonConvert: 29,
|
|
Accept: 30,
|
|
ModeChange: 31,
|
|
' ': 32,
|
|
PageUp: 33,
|
|
PageDown: 34,
|
|
End: 35,
|
|
Home: 36,
|
|
ArrowLeft: 37,
|
|
ArrowUp: 38,
|
|
ArrowRight: 39,
|
|
ArrowDown: 40,
|
|
Select: 41,
|
|
Print: 42,
|
|
Execute: 43,
|
|
PrintScreen: 44,
|
|
Insert: 45,
|
|
Delete: 46,
|
|
0: 48,
|
|
')': 48,
|
|
1: 49,
|
|
'!': 49,
|
|
2: 50,
|
|
'@': 50,
|
|
3: 51,
|
|
'#': 51,
|
|
4: 52,
|
|
$: 52,
|
|
5: 53,
|
|
'%': 53,
|
|
6: 54,
|
|
'^': 54,
|
|
7: 55,
|
|
'&': 55,
|
|
8: 56,
|
|
'*': 56,
|
|
9: 57,
|
|
'(': 57,
|
|
a: 65,
|
|
A: 65,
|
|
b: 66,
|
|
B: 66,
|
|
c: 67,
|
|
C: 67,
|
|
d: 68,
|
|
D: 68,
|
|
e: 69,
|
|
E: 69,
|
|
f: 70,
|
|
F: 70,
|
|
g: 71,
|
|
G: 71,
|
|
h: 72,
|
|
H: 72,
|
|
i: 73,
|
|
I: 73,
|
|
j: 74,
|
|
J: 74,
|
|
k: 75,
|
|
K: 75,
|
|
l: 76,
|
|
L: 76,
|
|
m: 77,
|
|
M: 77,
|
|
n: 78,
|
|
N: 78,
|
|
o: 79,
|
|
O: 79,
|
|
p: 80,
|
|
P: 80,
|
|
q: 81,
|
|
Q: 81,
|
|
r: 82,
|
|
R: 82,
|
|
s: 83,
|
|
S: 83,
|
|
t: 84,
|
|
T: 84,
|
|
u: 85,
|
|
U: 85,
|
|
v: 86,
|
|
V: 86,
|
|
w: 87,
|
|
W: 87,
|
|
x: 88,
|
|
X: 88,
|
|
y: 89,
|
|
Y: 89,
|
|
z: 90,
|
|
Z: 90,
|
|
OS: 91,
|
|
ContextMenu: 93,
|
|
F1: 112,
|
|
F2: 113,
|
|
F3: 114,
|
|
F4: 115,
|
|
F5: 116,
|
|
F6: 117,
|
|
F7: 118,
|
|
F8: 119,
|
|
F9: 120,
|
|
F10: 121,
|
|
F11: 122,
|
|
F12: 123,
|
|
F13: 124,
|
|
F14: 125,
|
|
F15: 126,
|
|
F16: 127,
|
|
F17: 128,
|
|
F18: 129,
|
|
F19: 130,
|
|
F20: 131,
|
|
F21: 132,
|
|
F22: 133,
|
|
F23: 134,
|
|
F24: 135,
|
|
NumLock: 144,
|
|
ScrollLock: 145,
|
|
VolumeMute: 181,
|
|
VolumeDown: 182,
|
|
VolumeUp: 183,
|
|
';': 186,
|
|
':': 186,
|
|
'=': 187,
|
|
'+': 187,
|
|
',': 188,
|
|
'<': 188,
|
|
'-': 189,
|
|
_: 189,
|
|
'.': 190,
|
|
'>': 190,
|
|
'/': 191,
|
|
'?': 191,
|
|
'`': 192,
|
|
'~': 192,
|
|
'[': 219,
|
|
'{': 219,
|
|
'\\': 220,
|
|
'|': 220,
|
|
']': 221,
|
|
'}': 221,
|
|
"'": 222,
|
|
'"': 222,
|
|
Meta: 224,
|
|
AltGraph: 225,
|
|
Attn: 246,
|
|
CrSel: 247,
|
|
ExSel: 248,
|
|
EraseEof: 249,
|
|
Play: 250,
|
|
ZoomOut: 251,
|
|
}
|
|
|
|
// ----------------------------------------
|
|
// By Alias
|
|
// ----------------------------------------
|
|
// provide dot-notation accessible keys for all key names
|
|
keyboardKey.Spacebar = keyboardKey[' ']
|
|
keyboardKey.Digit0 = keyboardKey['0']
|
|
keyboardKey.Digit1 = keyboardKey['1']
|
|
keyboardKey.Digit2 = keyboardKey['2']
|
|
keyboardKey.Digit3 = keyboardKey['3']
|
|
keyboardKey.Digit4 = keyboardKey['4']
|
|
keyboardKey.Digit5 = keyboardKey['5']
|
|
keyboardKey.Digit6 = keyboardKey['6']
|
|
keyboardKey.Digit7 = keyboardKey['7']
|
|
keyboardKey.Digit8 = keyboardKey['8']
|
|
keyboardKey.Digit9 = keyboardKey['9']
|
|
keyboardKey.Tilde = keyboardKey['~']
|
|
keyboardKey.GraveAccent = keyboardKey['`']
|
|
keyboardKey.ExclamationPoint = keyboardKey['!']
|
|
keyboardKey.AtSign = keyboardKey['@']
|
|
keyboardKey.PoundSign = keyboardKey['#']
|
|
keyboardKey.PercentSign = keyboardKey['%']
|
|
keyboardKey.Caret = keyboardKey['^']
|
|
keyboardKey.Ampersand = keyboardKey['&']
|
|
keyboardKey.PlusSign = keyboardKey['+']
|
|
keyboardKey.MinusSign = keyboardKey['-']
|
|
keyboardKey.EqualsSign = keyboardKey['=']
|
|
keyboardKey.DivisionSign = keyboardKey['/']
|
|
keyboardKey.MultiplicationSign = keyboardKey['*']
|
|
keyboardKey.Comma = keyboardKey[',']
|
|
keyboardKey.Decimal = keyboardKey['.']
|
|
keyboardKey.Colon = keyboardKey[':']
|
|
keyboardKey.Semicolon = keyboardKey[';']
|
|
keyboardKey.Pipe = keyboardKey['|']
|
|
keyboardKey.BackSlash = keyboardKey['\\']
|
|
keyboardKey.QuestionMark = keyboardKey['?']
|
|
keyboardKey.SingleQuote = keyboardKey["'"]
|
|
keyboardKey.DoubleQuote = keyboardKey['"']
|
|
keyboardKey.LeftCurlyBrace = keyboardKey['{']
|
|
keyboardKey.RightCurlyBrace = keyboardKey['}']
|
|
keyboardKey.LeftParenthesis = keyboardKey['(']
|
|
keyboardKey.RightParenthesis = keyboardKey[')']
|
|
keyboardKey.LeftAngleBracket = keyboardKey['<']
|
|
keyboardKey.RightAngleBracket = keyboardKey['>']
|
|
keyboardKey.LeftSquareBracket = keyboardKey['[']
|
|
keyboardKey.RightSquareBracket = keyboardKey[']']
|
|
|
|
module.exports = keyboardKey
|
|
|
|
|
|
/***/ }),
|
|
/* 26 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* Checks if `value` is classified as an `Array` object.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
|
* @example
|
|
*
|
|
* _.isArray([1, 2, 3]);
|
|
* // => true
|
|
*
|
|
* _.isArray(document.body.children);
|
|
* // => false
|
|
*
|
|
* _.isArray('abc');
|
|
* // => false
|
|
*
|
|
* _.isArray(_.noop);
|
|
* // => false
|
|
*/
|
|
var isArray = Array.isArray;
|
|
|
|
module.exports = isArray;
|
|
|
|
|
|
/***/ }),
|
|
/* 27 */
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = function (it) {
|
|
if (typeof it != 'function') throw TypeError(it + ' is not a function!');
|
|
return it;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 28 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
var stack;
|
|
|
|
if (true) {
|
|
stack = __webpack_require__(588);
|
|
} else {}
|
|
|
|
module.exports = stack.default;
|
|
module.exports.instance = stack.instance;
|
|
|
|
|
|
/***/ }),
|
|
/* 29 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var dP = __webpack_require__(22);
|
|
var createDesc = __webpack_require__(61);
|
|
module.exports = __webpack_require__(21) ? function (object, key, value) {
|
|
return dP.f(object, key, createDesc(1, value));
|
|
} : function (object, key, value) {
|
|
object[key] = value;
|
|
return object;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 30 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var global = __webpack_require__(16);
|
|
var hide = __webpack_require__(29);
|
|
var has = __webpack_require__(33);
|
|
var SRC = __webpack_require__(62)('src');
|
|
var $toString = __webpack_require__(300);
|
|
var TO_STRING = 'toString';
|
|
var TPL = ('' + $toString).split(TO_STRING);
|
|
|
|
__webpack_require__(37).inspectSource = function (it) {
|
|
return $toString.call(it);
|
|
};
|
|
|
|
(module.exports = function (O, key, val, safe) {
|
|
var isFunction = typeof val == 'function';
|
|
if (isFunction) has(val, 'name') || hide(val, 'name', key);
|
|
if (O[key] === val) return;
|
|
if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));
|
|
if (O === global) {
|
|
O[key] = val;
|
|
} else if (!safe) {
|
|
delete O[key];
|
|
hide(O, key, val);
|
|
} else if (O[key]) {
|
|
O[key] = val;
|
|
} else {
|
|
hide(O, key, val);
|
|
}
|
|
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
|
})(Function.prototype, TO_STRING, function toString() {
|
|
return typeof this == 'function' && this[SRC] || $toString.call(this);
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 31 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var $export = __webpack_require__(3);
|
|
var fails = __webpack_require__(17);
|
|
var defined = __webpack_require__(44);
|
|
var quot = /"/g;
|
|
// B.2.3.2.1 CreateHTML(string, tag, attribute, value)
|
|
var createHTML = function (string, tag, attribute, value) {
|
|
var S = String(defined(string));
|
|
var p1 = '<' + tag;
|
|
if (attribute !== '') p1 += ' ' + attribute + '="' + String(value).replace(quot, '"') + '"';
|
|
return p1 + '>' + S + '</' + tag + '>';
|
|
};
|
|
module.exports = function (NAME, exec) {
|
|
var O = {};
|
|
O[NAME] = exec(createHTML);
|
|
$export($export.P + $export.F * fails(function () {
|
|
var test = ''[NAME]('"');
|
|
return test !== test.toLowerCase() || test.split('"').length > 3;
|
|
}), 'String', O);
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 32 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var arrayMap = __webpack_require__(83),
|
|
baseIteratee = __webpack_require__(73),
|
|
baseMap = __webpack_require__(606),
|
|
isArray = __webpack_require__(26);
|
|
|
|
/**
|
|
* Creates an array of values by running each element in `collection` thru
|
|
* `iteratee`. The iteratee is invoked with three arguments:
|
|
* (value, index|key, collection).
|
|
*
|
|
* Many lodash methods are guarded to work as iteratees for methods like
|
|
* `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
|
|
*
|
|
* The guarded methods are:
|
|
* `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
|
|
* `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
|
|
* `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
|
|
* `template`, `trim`, `trimEnd`, `trimStart`, and `words`
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Collection
|
|
* @param {Array|Object} collection The collection to iterate over.
|
|
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
|
|
* @returns {Array} Returns the new mapped array.
|
|
* @example
|
|
*
|
|
* function square(n) {
|
|
* return n * n;
|
|
* }
|
|
*
|
|
* _.map([4, 8], square);
|
|
* // => [16, 64]
|
|
*
|
|
* _.map({ 'a': 4, 'b': 8 }, square);
|
|
* // => [16, 64] (iteration order is not guaranteed)
|
|
*
|
|
* var users = [
|
|
* { 'user': 'barney' },
|
|
* { 'user': 'fred' }
|
|
* ];
|
|
*
|
|
* // The `_.property` iteratee shorthand.
|
|
* _.map(users, 'user');
|
|
* // => ['barney', 'fred']
|
|
*/
|
|
function map(collection, iteratee) {
|
|
var func = isArray(collection) ? arrayMap : baseMap;
|
|
return func(collection, baseIteratee(iteratee, 3));
|
|
}
|
|
|
|
module.exports = map;
|
|
|
|
|
|
/***/ }),
|
|
/* 33 */
|
|
/***/ (function(module, exports) {
|
|
|
|
var hasOwnProperty = {}.hasOwnProperty;
|
|
module.exports = function (it, key) {
|
|
return hasOwnProperty.call(it, key);
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 34 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// to indexed object, toObject with fallback for non-array-like ES3 strings
|
|
var IObject = __webpack_require__(90);
|
|
var defined = __webpack_require__(44);
|
|
module.exports = function (it) {
|
|
return IObject(defined(it));
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 35 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var pIE = __webpack_require__(91);
|
|
var createDesc = __webpack_require__(61);
|
|
var toIObject = __webpack_require__(34);
|
|
var toPrimitive = __webpack_require__(43);
|
|
var has = __webpack_require__(33);
|
|
var IE8_DOM_DEFINE = __webpack_require__(194);
|
|
var gOPD = Object.getOwnPropertyDescriptor;
|
|
|
|
exports.f = __webpack_require__(21) ? gOPD : function getOwnPropertyDescriptor(O, P) {
|
|
O = toIObject(O);
|
|
P = toPrimitive(P, true);
|
|
if (IE8_DOM_DEFINE) try {
|
|
return gOPD(O, P);
|
|
} catch (e) { /* empty */ }
|
|
if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 36 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
|
|
var has = __webpack_require__(33);
|
|
var toObject = __webpack_require__(23);
|
|
var IE_PROTO = __webpack_require__(141)('IE_PROTO');
|
|
var ObjectProto = Object.prototype;
|
|
|
|
module.exports = Object.getPrototypeOf || function (O) {
|
|
O = toObject(O);
|
|
if (has(O, IE_PROTO)) return O[IE_PROTO];
|
|
if (typeof O.constructor == 'function' && O instanceof O.constructor) {
|
|
return O.constructor.prototype;
|
|
} return O instanceof Object ? ObjectProto : null;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 37 */
|
|
/***/ (function(module, exports) {
|
|
|
|
var core = module.exports = { version: '2.6.9' };
|
|
if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef
|
|
|
|
|
|
/***/ }),
|
|
/* 38 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// optional / simple context binding
|
|
var aFunction = __webpack_require__(27);
|
|
module.exports = function (fn, that, length) {
|
|
aFunction(fn);
|
|
if (that === undefined) return fn;
|
|
switch (length) {
|
|
case 1: return function (a) {
|
|
return fn.call(that, a);
|
|
};
|
|
case 2: return function (a, b) {
|
|
return fn.call(that, a, b);
|
|
};
|
|
case 3: return function (a, b, c) {
|
|
return fn.call(that, a, b, c);
|
|
};
|
|
}
|
|
return function (/* ...args */) {
|
|
return fn.apply(that, arguments);
|
|
};
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 39 */
|
|
/***/ (function(module, exports) {
|
|
|
|
var toString = {}.toString;
|
|
|
|
module.exports = function (it) {
|
|
return toString.call(it).slice(8, -1);
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 40 */
|
|
/***/ (function(module, exports) {
|
|
|
|
// 7.1.4 ToInteger
|
|
var ceil = Math.ceil;
|
|
var floor = Math.floor;
|
|
module.exports = function (it) {
|
|
return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 41 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var fails = __webpack_require__(17);
|
|
|
|
module.exports = function (method, arg) {
|
|
return !!method && fails(function () {
|
|
// eslint-disable-next-line no-useless-call
|
|
arg ? method.call(null, function () { /* empty */ }, 1) : method.call(null);
|
|
});
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 42 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var getTimezoneOffsetInMilliseconds = __webpack_require__(622)
|
|
var isDate = __webpack_require__(262)
|
|
|
|
var MILLISECONDS_IN_HOUR = 3600000
|
|
var MILLISECONDS_IN_MINUTE = 60000
|
|
var DEFAULT_ADDITIONAL_DIGITS = 2
|
|
|
|
var parseTokenDateTimeDelimeter = /[T ]/
|
|
var parseTokenPlainTime = /:/
|
|
|
|
// year tokens
|
|
var parseTokenYY = /^(\d{2})$/
|
|
var parseTokensYYY = [
|
|
/^([+-]\d{2})$/, // 0 additional digits
|
|
/^([+-]\d{3})$/, // 1 additional digit
|
|
/^([+-]\d{4})$/ // 2 additional digits
|
|
]
|
|
|
|
var parseTokenYYYY = /^(\d{4})/
|
|
var parseTokensYYYYY = [
|
|
/^([+-]\d{4})/, // 0 additional digits
|
|
/^([+-]\d{5})/, // 1 additional digit
|
|
/^([+-]\d{6})/ // 2 additional digits
|
|
]
|
|
|
|
// date tokens
|
|
var parseTokenMM = /^-(\d{2})$/
|
|
var parseTokenDDD = /^-?(\d{3})$/
|
|
var parseTokenMMDD = /^-?(\d{2})-?(\d{2})$/
|
|
var parseTokenWww = /^-?W(\d{2})$/
|
|
var parseTokenWwwD = /^-?W(\d{2})-?(\d{1})$/
|
|
|
|
// time tokens
|
|
var parseTokenHH = /^(\d{2}([.,]\d*)?)$/
|
|
var parseTokenHHMM = /^(\d{2}):?(\d{2}([.,]\d*)?)$/
|
|
var parseTokenHHMMSS = /^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/
|
|
|
|
// timezone tokens
|
|
var parseTokenTimezone = /([Z+-].*)$/
|
|
var parseTokenTimezoneZ = /^(Z)$/
|
|
var parseTokenTimezoneHH = /^([+-])(\d{2})$/
|
|
var parseTokenTimezoneHHMM = /^([+-])(\d{2}):?(\d{2})$/
|
|
|
|
/**
|
|
* @category Common Helpers
|
|
* @summary Convert the given argument to an instance of Date.
|
|
*
|
|
* @description
|
|
* Convert the given argument to an instance of Date.
|
|
*
|
|
* If the argument is an instance of Date, the function returns its clone.
|
|
*
|
|
* If the argument is a number, it is treated as a timestamp.
|
|
*
|
|
* If an argument is a string, the function tries to parse it.
|
|
* Function accepts complete ISO 8601 formats as well as partial implementations.
|
|
* ISO 8601: http://en.wikipedia.org/wiki/ISO_8601
|
|
*
|
|
* If all above fails, the function passes the given argument to Date constructor.
|
|
*
|
|
* @param {Date|String|Number} argument - the value to convert
|
|
* @param {Object} [options] - the object with options
|
|
* @param {0 | 1 | 2} [options.additionalDigits=2] - the additional number of digits in the extended year format
|
|
* @returns {Date} the parsed date in the local time zone
|
|
*
|
|
* @example
|
|
* // Convert string '2014-02-11T11:30:30' to date:
|
|
* var result = parse('2014-02-11T11:30:30')
|
|
* //=> Tue Feb 11 2014 11:30:30
|
|
*
|
|
* @example
|
|
* // Parse string '+02014101',
|
|
* // if the additional number of digits in the extended year format is 1:
|
|
* var result = parse('+02014101', {additionalDigits: 1})
|
|
* //=> Fri Apr 11 2014 00:00:00
|
|
*/
|
|
function parse (argument, dirtyOptions) {
|
|
if (isDate(argument)) {
|
|
// Prevent the date to lose the milliseconds when passed to new Date() in IE10
|
|
return new Date(argument.getTime())
|
|
} else if (typeof argument !== 'string') {
|
|
return new Date(argument)
|
|
}
|
|
|
|
var options = dirtyOptions || {}
|
|
var additionalDigits = options.additionalDigits
|
|
if (additionalDigits == null) {
|
|
additionalDigits = DEFAULT_ADDITIONAL_DIGITS
|
|
} else {
|
|
additionalDigits = Number(additionalDigits)
|
|
}
|
|
|
|
var dateStrings = splitDateString(argument)
|
|
|
|
var parseYearResult = parseYear(dateStrings.date, additionalDigits)
|
|
var year = parseYearResult.year
|
|
var restDateString = parseYearResult.restDateString
|
|
|
|
var date = parseDate(restDateString, year)
|
|
|
|
if (date) {
|
|
var timestamp = date.getTime()
|
|
var time = 0
|
|
var offset
|
|
|
|
if (dateStrings.time) {
|
|
time = parseTime(dateStrings.time)
|
|
}
|
|
|
|
if (dateStrings.timezone) {
|
|
offset = parseTimezone(dateStrings.timezone) * MILLISECONDS_IN_MINUTE
|
|
} else {
|
|
var fullTime = timestamp + time
|
|
var fullTimeDate = new Date(fullTime)
|
|
|
|
offset = getTimezoneOffsetInMilliseconds(fullTimeDate)
|
|
|
|
// Adjust time when it's coming from DST
|
|
var fullTimeDateNextDay = new Date(fullTime)
|
|
fullTimeDateNextDay.setDate(fullTimeDate.getDate() + 1)
|
|
var offsetDiff =
|
|
getTimezoneOffsetInMilliseconds(fullTimeDateNextDay) -
|
|
getTimezoneOffsetInMilliseconds(fullTimeDate)
|
|
if (offsetDiff > 0) {
|
|
offset += offsetDiff
|
|
}
|
|
}
|
|
|
|
return new Date(timestamp + time + offset)
|
|
} else {
|
|
return new Date(argument)
|
|
}
|
|
}
|
|
|
|
function splitDateString (dateString) {
|
|
var dateStrings = {}
|
|
var array = dateString.split(parseTokenDateTimeDelimeter)
|
|
var timeString
|
|
|
|
if (parseTokenPlainTime.test(array[0])) {
|
|
dateStrings.date = null
|
|
timeString = array[0]
|
|
} else {
|
|
dateStrings.date = array[0]
|
|
timeString = array[1]
|
|
}
|
|
|
|
if (timeString) {
|
|
var token = parseTokenTimezone.exec(timeString)
|
|
if (token) {
|
|
dateStrings.time = timeString.replace(token[1], '')
|
|
dateStrings.timezone = token[1]
|
|
} else {
|
|
dateStrings.time = timeString
|
|
}
|
|
}
|
|
|
|
return dateStrings
|
|
}
|
|
|
|
function parseYear (dateString, additionalDigits) {
|
|
var parseTokenYYY = parseTokensYYY[additionalDigits]
|
|
var parseTokenYYYYY = parseTokensYYYYY[additionalDigits]
|
|
|
|
var token
|
|
|
|
// YYYY or ±YYYYY
|
|
token = parseTokenYYYY.exec(dateString) || parseTokenYYYYY.exec(dateString)
|
|
if (token) {
|
|
var yearString = token[1]
|
|
return {
|
|
year: parseInt(yearString, 10),
|
|
restDateString: dateString.slice(yearString.length)
|
|
}
|
|
}
|
|
|
|
// YY or ±YYY
|
|
token = parseTokenYY.exec(dateString) || parseTokenYYY.exec(dateString)
|
|
if (token) {
|
|
var centuryString = token[1]
|
|
return {
|
|
year: parseInt(centuryString, 10) * 100,
|
|
restDateString: dateString.slice(centuryString.length)
|
|
}
|
|
}
|
|
|
|
// Invalid ISO-formatted year
|
|
return {
|
|
year: null
|
|
}
|
|
}
|
|
|
|
function parseDate (dateString, year) {
|
|
// Invalid ISO-formatted year
|
|
if (year === null) {
|
|
return null
|
|
}
|
|
|
|
var token
|
|
var date
|
|
var month
|
|
var week
|
|
|
|
// YYYY
|
|
if (dateString.length === 0) {
|
|
date = new Date(0)
|
|
date.setUTCFullYear(year)
|
|
return date
|
|
}
|
|
|
|
// YYYY-MM
|
|
token = parseTokenMM.exec(dateString)
|
|
if (token) {
|
|
date = new Date(0)
|
|
month = parseInt(token[1], 10) - 1
|
|
date.setUTCFullYear(year, month)
|
|
return date
|
|
}
|
|
|
|
// YYYY-DDD or YYYYDDD
|
|
token = parseTokenDDD.exec(dateString)
|
|
if (token) {
|
|
date = new Date(0)
|
|
var dayOfYear = parseInt(token[1], 10)
|
|
date.setUTCFullYear(year, 0, dayOfYear)
|
|
return date
|
|
}
|
|
|
|
// YYYY-MM-DD or YYYYMMDD
|
|
token = parseTokenMMDD.exec(dateString)
|
|
if (token) {
|
|
date = new Date(0)
|
|
month = parseInt(token[1], 10) - 1
|
|
var day = parseInt(token[2], 10)
|
|
date.setUTCFullYear(year, month, day)
|
|
return date
|
|
}
|
|
|
|
// YYYY-Www or YYYYWww
|
|
token = parseTokenWww.exec(dateString)
|
|
if (token) {
|
|
week = parseInt(token[1], 10) - 1
|
|
return dayOfISOYear(year, week)
|
|
}
|
|
|
|
// YYYY-Www-D or YYYYWwwD
|
|
token = parseTokenWwwD.exec(dateString)
|
|
if (token) {
|
|
week = parseInt(token[1], 10) - 1
|
|
var dayOfWeek = parseInt(token[2], 10) - 1
|
|
return dayOfISOYear(year, week, dayOfWeek)
|
|
}
|
|
|
|
// Invalid ISO-formatted date
|
|
return null
|
|
}
|
|
|
|
function parseTime (timeString) {
|
|
var token
|
|
var hours
|
|
var minutes
|
|
|
|
// hh
|
|
token = parseTokenHH.exec(timeString)
|
|
if (token) {
|
|
hours = parseFloat(token[1].replace(',', '.'))
|
|
return (hours % 24) * MILLISECONDS_IN_HOUR
|
|
}
|
|
|
|
// hh:mm or hhmm
|
|
token = parseTokenHHMM.exec(timeString)
|
|
if (token) {
|
|
hours = parseInt(token[1], 10)
|
|
minutes = parseFloat(token[2].replace(',', '.'))
|
|
return (hours % 24) * MILLISECONDS_IN_HOUR +
|
|
minutes * MILLISECONDS_IN_MINUTE
|
|
}
|
|
|
|
// hh:mm:ss or hhmmss
|
|
token = parseTokenHHMMSS.exec(timeString)
|
|
if (token) {
|
|
hours = parseInt(token[1], 10)
|
|
minutes = parseInt(token[2], 10)
|
|
var seconds = parseFloat(token[3].replace(',', '.'))
|
|
return (hours % 24) * MILLISECONDS_IN_HOUR +
|
|
minutes * MILLISECONDS_IN_MINUTE +
|
|
seconds * 1000
|
|
}
|
|
|
|
// Invalid ISO-formatted time
|
|
return null
|
|
}
|
|
|
|
function parseTimezone (timezoneString) {
|
|
var token
|
|
var absoluteOffset
|
|
|
|
// Z
|
|
token = parseTokenTimezoneZ.exec(timezoneString)
|
|
if (token) {
|
|
return 0
|
|
}
|
|
|
|
// ±hh
|
|
token = parseTokenTimezoneHH.exec(timezoneString)
|
|
if (token) {
|
|
absoluteOffset = parseInt(token[2], 10) * 60
|
|
return (token[1] === '+') ? -absoluteOffset : absoluteOffset
|
|
}
|
|
|
|
// ±hh:mm or ±hhmm
|
|
token = parseTokenTimezoneHHMM.exec(timezoneString)
|
|
if (token) {
|
|
absoluteOffset = parseInt(token[2], 10) * 60 + parseInt(token[3], 10)
|
|
return (token[1] === '+') ? -absoluteOffset : absoluteOffset
|
|
}
|
|
|
|
return 0
|
|
}
|
|
|
|
function dayOfISOYear (isoYear, week, day) {
|
|
week = week || 0
|
|
day = day || 0
|
|
var date = new Date(0)
|
|
date.setUTCFullYear(isoYear, 0, 4)
|
|
var fourthOfJanuaryDay = date.getUTCDay() || 7
|
|
var diff = week * 7 + day + 1 - fourthOfJanuaryDay
|
|
date.setUTCDate(date.getUTCDate() + diff)
|
|
return date
|
|
}
|
|
|
|
module.exports = parse
|
|
|
|
|
|
/***/ }),
|
|
/* 43 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 7.1.1 ToPrimitive(input [, PreferredType])
|
|
var isObject = __webpack_require__(18);
|
|
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
|
|
// and the second argument - flag - preferred type is a string
|
|
module.exports = function (it, S) {
|
|
if (!isObject(it)) return it;
|
|
var fn, val;
|
|
if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
|
|
if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;
|
|
if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;
|
|
throw TypeError("Can't convert object to primitive value");
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 44 */
|
|
/***/ (function(module, exports) {
|
|
|
|
// 7.2.1 RequireObjectCoercible(argument)
|
|
module.exports = function (it) {
|
|
if (it == undefined) throw TypeError("Can't call method on " + it);
|
|
return it;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 45 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// most Object methods by ES6 should accept primitives
|
|
var $export = __webpack_require__(3);
|
|
var core = __webpack_require__(37);
|
|
var fails = __webpack_require__(17);
|
|
module.exports = function (KEY, exec) {
|
|
var fn = (core.Object || {})[KEY] || Object[KEY];
|
|
var exp = {};
|
|
exp[KEY] = exec(fn);
|
|
$export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp);
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 46 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 0 -> Array#forEach
|
|
// 1 -> Array#map
|
|
// 2 -> Array#filter
|
|
// 3 -> Array#some
|
|
// 4 -> Array#every
|
|
// 5 -> Array#find
|
|
// 6 -> Array#findIndex
|
|
var ctx = __webpack_require__(38);
|
|
var IObject = __webpack_require__(90);
|
|
var toObject = __webpack_require__(23);
|
|
var toLength = __webpack_require__(20);
|
|
var asc = __webpack_require__(157);
|
|
module.exports = function (TYPE, $create) {
|
|
var IS_MAP = TYPE == 1;
|
|
var IS_FILTER = TYPE == 2;
|
|
var IS_SOME = TYPE == 3;
|
|
var IS_EVERY = TYPE == 4;
|
|
var IS_FIND_INDEX = TYPE == 6;
|
|
var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
|
|
var create = $create || asc;
|
|
return function ($this, callbackfn, that) {
|
|
var O = toObject($this);
|
|
var self = IObject(O);
|
|
var f = ctx(callbackfn, that, 3);
|
|
var length = toLength(self.length);
|
|
var index = 0;
|
|
var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
|
|
var val, res;
|
|
for (;length > index; index++) if (NO_HOLES || index in self) {
|
|
val = self[index];
|
|
res = f(val, index, O);
|
|
if (TYPE) {
|
|
if (IS_MAP) result[index] = res; // map
|
|
else if (res) switch (TYPE) {
|
|
case 3: return true; // some
|
|
case 5: return val; // find
|
|
case 6: return index; // findIndex
|
|
case 2: result.push(val); // filter
|
|
} else if (IS_EVERY) return false; // every
|
|
}
|
|
}
|
|
return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;
|
|
};
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 47 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
* and has a `typeof` result of "object".
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
* @example
|
|
*
|
|
* _.isObjectLike({});
|
|
* // => true
|
|
*
|
|
* _.isObjectLike([1, 2, 3]);
|
|
* // => true
|
|
*
|
|
* _.isObjectLike(_.noop);
|
|
* // => false
|
|
*
|
|
* _.isObjectLike(null);
|
|
* // => false
|
|
*/
|
|
function isObjectLike(value) {
|
|
return value != null && typeof value == 'object';
|
|
}
|
|
|
|
module.exports = isObjectLike;
|
|
|
|
|
|
/***/ }),
|
|
/* 48 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
if (__webpack_require__(21)) {
|
|
var LIBRARY = __webpack_require__(55);
|
|
var global = __webpack_require__(16);
|
|
var fails = __webpack_require__(17);
|
|
var $export = __webpack_require__(3);
|
|
var $typed = __webpack_require__(109);
|
|
var $buffer = __webpack_require__(165);
|
|
var ctx = __webpack_require__(38);
|
|
var anInstance = __webpack_require__(68);
|
|
var propertyDesc = __webpack_require__(61);
|
|
var hide = __webpack_require__(29);
|
|
var redefineAll = __webpack_require__(70);
|
|
var toInteger = __webpack_require__(40);
|
|
var toLength = __webpack_require__(20);
|
|
var toIndex = __webpack_require__(222);
|
|
var toAbsoluteIndex = __webpack_require__(64);
|
|
var toPrimitive = __webpack_require__(43);
|
|
var has = __webpack_require__(33);
|
|
var classof = __webpack_require__(78);
|
|
var isObject = __webpack_require__(18);
|
|
var toObject = __webpack_require__(23);
|
|
var isArrayIter = __webpack_require__(154);
|
|
var create = __webpack_require__(65);
|
|
var getPrototypeOf = __webpack_require__(36);
|
|
var gOPN = __webpack_require__(66).f;
|
|
var getIterFn = __webpack_require__(156);
|
|
var uid = __webpack_require__(62);
|
|
var wks = __webpack_require__(19);
|
|
var createArrayMethod = __webpack_require__(46);
|
|
var createArrayIncludes = __webpack_require__(99);
|
|
var speciesConstructor = __webpack_require__(93);
|
|
var ArrayIterators = __webpack_require__(159);
|
|
var Iterators = __webpack_require__(80);
|
|
var $iterDetect = __webpack_require__(104);
|
|
var setSpecies = __webpack_require__(67);
|
|
var arrayFill = __webpack_require__(158);
|
|
var arrayCopyWithin = __webpack_require__(211);
|
|
var $DP = __webpack_require__(22);
|
|
var $GOPD = __webpack_require__(35);
|
|
var dP = $DP.f;
|
|
var gOPD = $GOPD.f;
|
|
var RangeError = global.RangeError;
|
|
var TypeError = global.TypeError;
|
|
var Uint8Array = global.Uint8Array;
|
|
var ARRAY_BUFFER = 'ArrayBuffer';
|
|
var SHARED_BUFFER = 'Shared' + ARRAY_BUFFER;
|
|
var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT';
|
|
var PROTOTYPE = 'prototype';
|
|
var ArrayProto = Array[PROTOTYPE];
|
|
var $ArrayBuffer = $buffer.ArrayBuffer;
|
|
var $DataView = $buffer.DataView;
|
|
var arrayForEach = createArrayMethod(0);
|
|
var arrayFilter = createArrayMethod(2);
|
|
var arraySome = createArrayMethod(3);
|
|
var arrayEvery = createArrayMethod(4);
|
|
var arrayFind = createArrayMethod(5);
|
|
var arrayFindIndex = createArrayMethod(6);
|
|
var arrayIncludes = createArrayIncludes(true);
|
|
var arrayIndexOf = createArrayIncludes(false);
|
|
var arrayValues = ArrayIterators.values;
|
|
var arrayKeys = ArrayIterators.keys;
|
|
var arrayEntries = ArrayIterators.entries;
|
|
var arrayLastIndexOf = ArrayProto.lastIndexOf;
|
|
var arrayReduce = ArrayProto.reduce;
|
|
var arrayReduceRight = ArrayProto.reduceRight;
|
|
var arrayJoin = ArrayProto.join;
|
|
var arraySort = ArrayProto.sort;
|
|
var arraySlice = ArrayProto.slice;
|
|
var arrayToString = ArrayProto.toString;
|
|
var arrayToLocaleString = ArrayProto.toLocaleString;
|
|
var ITERATOR = wks('iterator');
|
|
var TAG = wks('toStringTag');
|
|
var TYPED_CONSTRUCTOR = uid('typed_constructor');
|
|
var DEF_CONSTRUCTOR = uid('def_constructor');
|
|
var ALL_CONSTRUCTORS = $typed.CONSTR;
|
|
var TYPED_ARRAY = $typed.TYPED;
|
|
var VIEW = $typed.VIEW;
|
|
var WRONG_LENGTH = 'Wrong length!';
|
|
|
|
var $map = createArrayMethod(1, function (O, length) {
|
|
return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length);
|
|
});
|
|
|
|
var LITTLE_ENDIAN = fails(function () {
|
|
// eslint-disable-next-line no-undef
|
|
return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1;
|
|
});
|
|
|
|
var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function () {
|
|
new Uint8Array(1).set({});
|
|
});
|
|
|
|
var toOffset = function (it, BYTES) {
|
|
var offset = toInteger(it);
|
|
if (offset < 0 || offset % BYTES) throw RangeError('Wrong offset!');
|
|
return offset;
|
|
};
|
|
|
|
var validate = function (it) {
|
|
if (isObject(it) && TYPED_ARRAY in it) return it;
|
|
throw TypeError(it + ' is not a typed array!');
|
|
};
|
|
|
|
var allocate = function (C, length) {
|
|
if (!(isObject(C) && TYPED_CONSTRUCTOR in C)) {
|
|
throw TypeError('It is not a typed array constructor!');
|
|
} return new C(length);
|
|
};
|
|
|
|
var speciesFromList = function (O, list) {
|
|
return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list);
|
|
};
|
|
|
|
var fromList = function (C, list) {
|
|
var index = 0;
|
|
var length = list.length;
|
|
var result = allocate(C, length);
|
|
while (length > index) result[index] = list[index++];
|
|
return result;
|
|
};
|
|
|
|
var addGetter = function (it, key, internal) {
|
|
dP(it, key, { get: function () { return this._d[internal]; } });
|
|
};
|
|
|
|
var $from = function from(source /* , mapfn, thisArg */) {
|
|
var O = toObject(source);
|
|
var aLen = arguments.length;
|
|
var mapfn = aLen > 1 ? arguments[1] : undefined;
|
|
var mapping = mapfn !== undefined;
|
|
var iterFn = getIterFn(O);
|
|
var i, length, values, result, step, iterator;
|
|
if (iterFn != undefined && !isArrayIter(iterFn)) {
|
|
for (iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++) {
|
|
values.push(step.value);
|
|
} O = values;
|
|
}
|
|
if (mapping && aLen > 2) mapfn = ctx(mapfn, arguments[2], 2);
|
|
for (i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++) {
|
|
result[i] = mapping ? mapfn(O[i], i) : O[i];
|
|
}
|
|
return result;
|
|
};
|
|
|
|
var $of = function of(/* ...items */) {
|
|
var index = 0;
|
|
var length = arguments.length;
|
|
var result = allocate(this, length);
|
|
while (length > index) result[index] = arguments[index++];
|
|
return result;
|
|
};
|
|
|
|
// iOS Safari 6.x fails here
|
|
var TO_LOCALE_BUG = !!Uint8Array && fails(function () { arrayToLocaleString.call(new Uint8Array(1)); });
|
|
|
|
var $toLocaleString = function toLocaleString() {
|
|
return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments);
|
|
};
|
|
|
|
var proto = {
|
|
copyWithin: function copyWithin(target, start /* , end */) {
|
|
return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined);
|
|
},
|
|
every: function every(callbackfn /* , thisArg */) {
|
|
return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
},
|
|
fill: function fill(value /* , start, end */) { // eslint-disable-line no-unused-vars
|
|
return arrayFill.apply(validate(this), arguments);
|
|
},
|
|
filter: function filter(callbackfn /* , thisArg */) {
|
|
return speciesFromList(this, arrayFilter(validate(this), callbackfn,
|
|
arguments.length > 1 ? arguments[1] : undefined));
|
|
},
|
|
find: function find(predicate /* , thisArg */) {
|
|
return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
|
|
},
|
|
findIndex: function findIndex(predicate /* , thisArg */) {
|
|
return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
|
|
},
|
|
forEach: function forEach(callbackfn /* , thisArg */) {
|
|
arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
},
|
|
indexOf: function indexOf(searchElement /* , fromIndex */) {
|
|
return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
|
|
},
|
|
includes: function includes(searchElement /* , fromIndex */) {
|
|
return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
|
|
},
|
|
join: function join(separator) { // eslint-disable-line no-unused-vars
|
|
return arrayJoin.apply(validate(this), arguments);
|
|
},
|
|
lastIndexOf: function lastIndexOf(searchElement /* , fromIndex */) { // eslint-disable-line no-unused-vars
|
|
return arrayLastIndexOf.apply(validate(this), arguments);
|
|
},
|
|
map: function map(mapfn /* , thisArg */) {
|
|
return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
},
|
|
reduce: function reduce(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars
|
|
return arrayReduce.apply(validate(this), arguments);
|
|
},
|
|
reduceRight: function reduceRight(callbackfn /* , initialValue */) { // eslint-disable-line no-unused-vars
|
|
return arrayReduceRight.apply(validate(this), arguments);
|
|
},
|
|
reverse: function reverse() {
|
|
var that = this;
|
|
var length = validate(that).length;
|
|
var middle = Math.floor(length / 2);
|
|
var index = 0;
|
|
var value;
|
|
while (index < middle) {
|
|
value = that[index];
|
|
that[index++] = that[--length];
|
|
that[length] = value;
|
|
} return that;
|
|
},
|
|
some: function some(callbackfn /* , thisArg */) {
|
|
return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
},
|
|
sort: function sort(comparefn) {
|
|
return arraySort.call(validate(this), comparefn);
|
|
},
|
|
subarray: function subarray(begin, end) {
|
|
var O = validate(this);
|
|
var length = O.length;
|
|
var $begin = toAbsoluteIndex(begin, length);
|
|
return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))(
|
|
O.buffer,
|
|
O.byteOffset + $begin * O.BYTES_PER_ELEMENT,
|
|
toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - $begin)
|
|
);
|
|
}
|
|
};
|
|
|
|
var $slice = function slice(start, end) {
|
|
return speciesFromList(this, arraySlice.call(validate(this), start, end));
|
|
};
|
|
|
|
var $set = function set(arrayLike /* , offset */) {
|
|
validate(this);
|
|
var offset = toOffset(arguments[1], 1);
|
|
var length = this.length;
|
|
var src = toObject(arrayLike);
|
|
var len = toLength(src.length);
|
|
var index = 0;
|
|
if (len + offset > length) throw RangeError(WRONG_LENGTH);
|
|
while (index < len) this[offset + index] = src[index++];
|
|
};
|
|
|
|
var $iterators = {
|
|
entries: function entries() {
|
|
return arrayEntries.call(validate(this));
|
|
},
|
|
keys: function keys() {
|
|
return arrayKeys.call(validate(this));
|
|
},
|
|
values: function values() {
|
|
return arrayValues.call(validate(this));
|
|
}
|
|
};
|
|
|
|
var isTAIndex = function (target, key) {
|
|
return isObject(target)
|
|
&& target[TYPED_ARRAY]
|
|
&& typeof key != 'symbol'
|
|
&& key in target
|
|
&& String(+key) == String(key);
|
|
};
|
|
var $getDesc = function getOwnPropertyDescriptor(target, key) {
|
|
return isTAIndex(target, key = toPrimitive(key, true))
|
|
? propertyDesc(2, target[key])
|
|
: gOPD(target, key);
|
|
};
|
|
var $setDesc = function defineProperty(target, key, desc) {
|
|
if (isTAIndex(target, key = toPrimitive(key, true))
|
|
&& isObject(desc)
|
|
&& has(desc, 'value')
|
|
&& !has(desc, 'get')
|
|
&& !has(desc, 'set')
|
|
// TODO: add validation descriptor w/o calling accessors
|
|
&& !desc.configurable
|
|
&& (!has(desc, 'writable') || desc.writable)
|
|
&& (!has(desc, 'enumerable') || desc.enumerable)
|
|
) {
|
|
target[key] = desc.value;
|
|
return target;
|
|
} return dP(target, key, desc);
|
|
};
|
|
|
|
if (!ALL_CONSTRUCTORS) {
|
|
$GOPD.f = $getDesc;
|
|
$DP.f = $setDesc;
|
|
}
|
|
|
|
$export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', {
|
|
getOwnPropertyDescriptor: $getDesc,
|
|
defineProperty: $setDesc
|
|
});
|
|
|
|
if (fails(function () { arrayToString.call({}); })) {
|
|
arrayToString = arrayToLocaleString = function toString() {
|
|
return arrayJoin.call(this);
|
|
};
|
|
}
|
|
|
|
var $TypedArrayPrototype$ = redefineAll({}, proto);
|
|
redefineAll($TypedArrayPrototype$, $iterators);
|
|
hide($TypedArrayPrototype$, ITERATOR, $iterators.values);
|
|
redefineAll($TypedArrayPrototype$, {
|
|
slice: $slice,
|
|
set: $set,
|
|
constructor: function () { /* noop */ },
|
|
toString: arrayToString,
|
|
toLocaleString: $toLocaleString
|
|
});
|
|
addGetter($TypedArrayPrototype$, 'buffer', 'b');
|
|
addGetter($TypedArrayPrototype$, 'byteOffset', 'o');
|
|
addGetter($TypedArrayPrototype$, 'byteLength', 'l');
|
|
addGetter($TypedArrayPrototype$, 'length', 'e');
|
|
dP($TypedArrayPrototype$, TAG, {
|
|
get: function () { return this[TYPED_ARRAY]; }
|
|
});
|
|
|
|
// eslint-disable-next-line max-statements
|
|
module.exports = function (KEY, BYTES, wrapper, CLAMPED) {
|
|
CLAMPED = !!CLAMPED;
|
|
var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array';
|
|
var GETTER = 'get' + KEY;
|
|
var SETTER = 'set' + KEY;
|
|
var TypedArray = global[NAME];
|
|
var Base = TypedArray || {};
|
|
var TAC = TypedArray && getPrototypeOf(TypedArray);
|
|
var FORCED = !TypedArray || !$typed.ABV;
|
|
var O = {};
|
|
var TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE];
|
|
var getter = function (that, index) {
|
|
var data = that._d;
|
|
return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN);
|
|
};
|
|
var setter = function (that, index, value) {
|
|
var data = that._d;
|
|
if (CLAMPED) value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff;
|
|
data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN);
|
|
};
|
|
var addElement = function (that, index) {
|
|
dP(that, index, {
|
|
get: function () {
|
|
return getter(this, index);
|
|
},
|
|
set: function (value) {
|
|
return setter(this, index, value);
|
|
},
|
|
enumerable: true
|
|
});
|
|
};
|
|
if (FORCED) {
|
|
TypedArray = wrapper(function (that, data, $offset, $length) {
|
|
anInstance(that, TypedArray, NAME, '_d');
|
|
var index = 0;
|
|
var offset = 0;
|
|
var buffer, byteLength, length, klass;
|
|
if (!isObject(data)) {
|
|
length = toIndex(data);
|
|
byteLength = length * BYTES;
|
|
buffer = new $ArrayBuffer(byteLength);
|
|
} else if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) {
|
|
buffer = data;
|
|
offset = toOffset($offset, BYTES);
|
|
var $len = data.byteLength;
|
|
if ($length === undefined) {
|
|
if ($len % BYTES) throw RangeError(WRONG_LENGTH);
|
|
byteLength = $len - offset;
|
|
if (byteLength < 0) throw RangeError(WRONG_LENGTH);
|
|
} else {
|
|
byteLength = toLength($length) * BYTES;
|
|
if (byteLength + offset > $len) throw RangeError(WRONG_LENGTH);
|
|
}
|
|
length = byteLength / BYTES;
|
|
} else if (TYPED_ARRAY in data) {
|
|
return fromList(TypedArray, data);
|
|
} else {
|
|
return $from.call(TypedArray, data);
|
|
}
|
|
hide(that, '_d', {
|
|
b: buffer,
|
|
o: offset,
|
|
l: byteLength,
|
|
e: length,
|
|
v: new $DataView(buffer)
|
|
});
|
|
while (index < length) addElement(that, index++);
|
|
});
|
|
TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$);
|
|
hide(TypedArrayPrototype, 'constructor', TypedArray);
|
|
} else if (!fails(function () {
|
|
TypedArray(1);
|
|
}) || !fails(function () {
|
|
new TypedArray(-1); // eslint-disable-line no-new
|
|
}) || !$iterDetect(function (iter) {
|
|
new TypedArray(); // eslint-disable-line no-new
|
|
new TypedArray(null); // eslint-disable-line no-new
|
|
new TypedArray(1.5); // eslint-disable-line no-new
|
|
new TypedArray(iter); // eslint-disable-line no-new
|
|
}, true)) {
|
|
TypedArray = wrapper(function (that, data, $offset, $length) {
|
|
anInstance(that, TypedArray, NAME);
|
|
var klass;
|
|
// `ws` module bug, temporarily remove validation length for Uint8Array
|
|
// https://github.com/websockets/ws/pull/645
|
|
if (!isObject(data)) return new Base(toIndex(data));
|
|
if (data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER) {
|
|
return $length !== undefined
|
|
? new Base(data, toOffset($offset, BYTES), $length)
|
|
: $offset !== undefined
|
|
? new Base(data, toOffset($offset, BYTES))
|
|
: new Base(data);
|
|
}
|
|
if (TYPED_ARRAY in data) return fromList(TypedArray, data);
|
|
return $from.call(TypedArray, data);
|
|
});
|
|
arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function (key) {
|
|
if (!(key in TypedArray)) hide(TypedArray, key, Base[key]);
|
|
});
|
|
TypedArray[PROTOTYPE] = TypedArrayPrototype;
|
|
if (!LIBRARY) TypedArrayPrototype.constructor = TypedArray;
|
|
}
|
|
var $nativeIterator = TypedArrayPrototype[ITERATOR];
|
|
var CORRECT_ITER_NAME = !!$nativeIterator
|
|
&& ($nativeIterator.name == 'values' || $nativeIterator.name == undefined);
|
|
var $iterator = $iterators.values;
|
|
hide(TypedArray, TYPED_CONSTRUCTOR, true);
|
|
hide(TypedArrayPrototype, TYPED_ARRAY, NAME);
|
|
hide(TypedArrayPrototype, VIEW, true);
|
|
hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray);
|
|
|
|
if (CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)) {
|
|
dP(TypedArrayPrototype, TAG, {
|
|
get: function () { return NAME; }
|
|
});
|
|
}
|
|
|
|
O[NAME] = TypedArray;
|
|
|
|
$export($export.G + $export.W + $export.F * (TypedArray != Base), O);
|
|
|
|
$export($export.S, NAME, {
|
|
BYTES_PER_ELEMENT: BYTES
|
|
});
|
|
|
|
$export($export.S + $export.F * fails(function () { Base.of.call(TypedArray, 1); }), NAME, {
|
|
from: $from,
|
|
of: $of
|
|
});
|
|
|
|
if (!(BYTES_PER_ELEMENT in TypedArrayPrototype)) hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES);
|
|
|
|
$export($export.P, NAME, proto);
|
|
|
|
setSpecies(NAME);
|
|
|
|
$export($export.P + $export.F * FORCED_SET, NAME, { set: $set });
|
|
|
|
$export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators);
|
|
|
|
if (!LIBRARY && TypedArrayPrototype.toString != arrayToString) TypedArrayPrototype.toString = arrayToString;
|
|
|
|
$export($export.P + $export.F * fails(function () {
|
|
new TypedArray(1).slice();
|
|
}), NAME, { slice: $slice });
|
|
|
|
$export($export.P + $export.F * (fails(function () {
|
|
return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString();
|
|
}) || !fails(function () {
|
|
TypedArrayPrototype.toLocaleString.call([1, 2]);
|
|
})), NAME, { toLocaleString: $toLocaleString });
|
|
|
|
Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator;
|
|
if (!LIBRARY && !CORRECT_ITER_NAME) hide(TypedArrayPrototype, ITERATOR, $iterator);
|
|
};
|
|
} else module.exports = function () { /* empty */ };
|
|
|
|
|
|
/***/ }),
|
|
/* 49 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var Map = __webpack_require__(217);
|
|
var $export = __webpack_require__(3);
|
|
var shared = __webpack_require__(89)('metadata');
|
|
var store = shared.store || (shared.store = new (__webpack_require__(220))());
|
|
|
|
var getOrCreateMetadataMap = function (target, targetKey, create) {
|
|
var targetMetadata = store.get(target);
|
|
if (!targetMetadata) {
|
|
if (!create) return undefined;
|
|
store.set(target, targetMetadata = new Map());
|
|
}
|
|
var keyMetadata = targetMetadata.get(targetKey);
|
|
if (!keyMetadata) {
|
|
if (!create) return undefined;
|
|
targetMetadata.set(targetKey, keyMetadata = new Map());
|
|
} return keyMetadata;
|
|
};
|
|
var ordinaryHasOwnMetadata = function (MetadataKey, O, P) {
|
|
var metadataMap = getOrCreateMetadataMap(O, P, false);
|
|
return metadataMap === undefined ? false : metadataMap.has(MetadataKey);
|
|
};
|
|
var ordinaryGetOwnMetadata = function (MetadataKey, O, P) {
|
|
var metadataMap = getOrCreateMetadataMap(O, P, false);
|
|
return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey);
|
|
};
|
|
var ordinaryDefineOwnMetadata = function (MetadataKey, MetadataValue, O, P) {
|
|
getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue);
|
|
};
|
|
var ordinaryOwnMetadataKeys = function (target, targetKey) {
|
|
var metadataMap = getOrCreateMetadataMap(target, targetKey, false);
|
|
var keys = [];
|
|
if (metadataMap) metadataMap.forEach(function (_, key) { keys.push(key); });
|
|
return keys;
|
|
};
|
|
var toMetaKey = function (it) {
|
|
return it === undefined || typeof it == 'symbol' ? it : String(it);
|
|
};
|
|
var exp = function (O) {
|
|
$export($export.S, 'Reflect', O);
|
|
};
|
|
|
|
module.exports = {
|
|
store: store,
|
|
map: getOrCreateMetadataMap,
|
|
has: ordinaryHasOwnMetadata,
|
|
get: ordinaryGetOwnMetadata,
|
|
set: ordinaryDefineOwnMetadata,
|
|
keys: ordinaryOwnMetadataKeys,
|
|
key: toMetaKey,
|
|
exp: exp
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 50 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var Symbol = __webpack_require__(95),
|
|
getRawTag = __webpack_require__(505),
|
|
objectToString = __webpack_require__(506);
|
|
|
|
/** `Object#toString` result references. */
|
|
var nullTag = '[object Null]',
|
|
undefinedTag = '[object Undefined]';
|
|
|
|
/** Built-in value references. */
|
|
var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
|
|
|
|
/**
|
|
* The base implementation of `getTag` without fallbacks for buggy environments.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to query.
|
|
* @returns {string} Returns the `toStringTag`.
|
|
*/
|
|
function baseGetTag(value) {
|
|
if (value == null) {
|
|
return value === undefined ? undefinedTag : nullTag;
|
|
}
|
|
return (symToStringTag && symToStringTag in Object(value))
|
|
? getRawTag(value)
|
|
: objectToString(value);
|
|
}
|
|
|
|
module.exports = baseGetTag;
|
|
|
|
|
|
/***/ }),
|
|
/* 51 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var freeGlobal = __webpack_require__(232);
|
|
|
|
/** Detect free variable `self`. */
|
|
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
|
|
|
/** Used as a reference to the global object. */
|
|
var root = freeGlobal || freeSelf || Function('return this')();
|
|
|
|
module.exports = root;
|
|
|
|
|
|
/***/ }),
|
|
/* 52 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var isFunction = __webpack_require__(74),
|
|
isLength = __webpack_require__(173);
|
|
|
|
/**
|
|
* Checks if `value` is array-like. A value is considered array-like if it's
|
|
* not a function and has a `value.length` that's an integer greater than or
|
|
* equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
|
|
* @example
|
|
*
|
|
* _.isArrayLike([1, 2, 3]);
|
|
* // => true
|
|
*
|
|
* _.isArrayLike(document.body.children);
|
|
* // => true
|
|
*
|
|
* _.isArrayLike('abc');
|
|
* // => true
|
|
*
|
|
* _.isArrayLike(_.noop);
|
|
* // => false
|
|
*/
|
|
function isArrayLike(value) {
|
|
return value != null && isLength(value.length) && !isFunction(value);
|
|
}
|
|
|
|
module.exports = isArrayLike;
|
|
|
|
|
|
/***/ }),
|
|
/* 53 */
|
|
/***/ (function(module, exports) {
|
|
|
|
function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); }
|
|
|
|
function _typeof(obj) {
|
|
if (typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol") {
|
|
module.exports = _typeof = function _typeof(obj) {
|
|
return _typeof2(obj);
|
|
};
|
|
} else {
|
|
module.exports = _typeof = function _typeof(obj) {
|
|
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj);
|
|
};
|
|
}
|
|
|
|
return _typeof(obj);
|
|
}
|
|
|
|
module.exports = _typeof;
|
|
|
|
/***/ }),
|
|
/* 54 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseIndexOf = __webpack_require__(239),
|
|
isArrayLike = __webpack_require__(52),
|
|
isString = __webpack_require__(128),
|
|
toInteger = __webpack_require__(126),
|
|
values = __webpack_require__(584);
|
|
|
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
var nativeMax = Math.max;
|
|
|
|
/**
|
|
* Checks if `value` is in `collection`. If `collection` is a string, it's
|
|
* checked for a substring of `value`, otherwise
|
|
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
* is used for equality comparisons. If `fromIndex` is negative, it's used as
|
|
* the offset from the end of `collection`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Collection
|
|
* @param {Array|Object|string} collection The collection to inspect.
|
|
* @param {*} value The value to search for.
|
|
* @param {number} [fromIndex=0] The index to search from.
|
|
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
|
|
* @returns {boolean} Returns `true` if `value` is found, else `false`.
|
|
* @example
|
|
*
|
|
* _.includes([1, 2, 3], 1);
|
|
* // => true
|
|
*
|
|
* _.includes([1, 2, 3], 1, 2);
|
|
* // => false
|
|
*
|
|
* _.includes({ 'a': 1, 'b': 2 }, 1);
|
|
* // => true
|
|
*
|
|
* _.includes('abcd', 'bc');
|
|
* // => true
|
|
*/
|
|
function includes(collection, value, fromIndex, guard) {
|
|
collection = isArrayLike(collection) ? collection : values(collection);
|
|
fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;
|
|
|
|
var length = collection.length;
|
|
if (fromIndex < 0) {
|
|
fromIndex = nativeMax(length + fromIndex, 0);
|
|
}
|
|
return isString(collection)
|
|
? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
|
|
: (!!length && baseIndexOf(collection, value, fromIndex) > -1);
|
|
}
|
|
|
|
module.exports = includes;
|
|
|
|
|
|
/***/ }),
|
|
/* 55 */
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = false;
|
|
|
|
|
|
/***/ }),
|
|
/* 56 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var META = __webpack_require__(62)('meta');
|
|
var isObject = __webpack_require__(18);
|
|
var has = __webpack_require__(33);
|
|
var setDesc = __webpack_require__(22).f;
|
|
var id = 0;
|
|
var isExtensible = Object.isExtensible || function () {
|
|
return true;
|
|
};
|
|
var FREEZE = !__webpack_require__(17)(function () {
|
|
return isExtensible(Object.preventExtensions({}));
|
|
});
|
|
var setMeta = function (it) {
|
|
setDesc(it, META, { value: {
|
|
i: 'O' + ++id, // object ID
|
|
w: {} // weak collections IDs
|
|
} });
|
|
};
|
|
var fastKey = function (it, create) {
|
|
// return primitive with prefix
|
|
if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
|
|
if (!has(it, META)) {
|
|
// can't set metadata to uncaught frozen object
|
|
if (!isExtensible(it)) return 'F';
|
|
// not necessary to add metadata
|
|
if (!create) return 'E';
|
|
// add missing metadata
|
|
setMeta(it);
|
|
// return object ID
|
|
} return it[META].i;
|
|
};
|
|
var getWeak = function (it, create) {
|
|
if (!has(it, META)) {
|
|
// can't set metadata to uncaught frozen object
|
|
if (!isExtensible(it)) return true;
|
|
// not necessary to add metadata
|
|
if (!create) return false;
|
|
// add missing metadata
|
|
setMeta(it);
|
|
// return hash weak collections IDs
|
|
} return it[META].w;
|
|
};
|
|
// add metadata on freeze-family methods calling
|
|
var onFreeze = function (it) {
|
|
if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);
|
|
return it;
|
|
};
|
|
var meta = module.exports = {
|
|
KEY: META,
|
|
NEED: false,
|
|
fastKey: fastKey,
|
|
getWeak: getWeak,
|
|
onFreeze: onFreeze
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 57 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 22.1.3.31 Array.prototype[@@unscopables]
|
|
var UNSCOPABLES = __webpack_require__(19)('unscopables');
|
|
var ArrayProto = Array.prototype;
|
|
if (ArrayProto[UNSCOPABLES] == undefined) __webpack_require__(29)(ArrayProto, UNSCOPABLES, {});
|
|
module.exports = function (key) {
|
|
ArrayProto[UNSCOPABLES][key] = true;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 58 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseDifference = __webpack_require__(238),
|
|
baseRest = __webpack_require__(96),
|
|
isArrayLikeObject = __webpack_require__(123);
|
|
|
|
/**
|
|
* Creates an array excluding all given values using
|
|
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
* for equality comparisons.
|
|
*
|
|
* **Note:** Unlike `_.pull`, this method returns a new array.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Array
|
|
* @param {Array} array The array to inspect.
|
|
* @param {...*} [values] The values to exclude.
|
|
* @returns {Array} Returns the new array of filtered values.
|
|
* @see _.difference, _.xor
|
|
* @example
|
|
*
|
|
* _.without([2, 1, 2, 3], 1, 2);
|
|
* // => [3]
|
|
*/
|
|
var without = baseRest(function(array, values) {
|
|
return isArrayLikeObject(array)
|
|
? baseDifference(array, values)
|
|
: [];
|
|
});
|
|
|
|
module.exports = without;
|
|
|
|
|
|
/***/ }),
|
|
/* 59 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var arraySome = __webpack_require__(243),
|
|
baseIteratee = __webpack_require__(73),
|
|
baseSome = __webpack_require__(574),
|
|
isArray = __webpack_require__(26),
|
|
isIterateeCall = __webpack_require__(257);
|
|
|
|
/**
|
|
* Checks if `predicate` returns truthy for **any** element of `collection`.
|
|
* Iteration is stopped once `predicate` returns truthy. The predicate is
|
|
* invoked with three arguments: (value, index|key, collection).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Collection
|
|
* @param {Array|Object} collection The collection to iterate over.
|
|
* @param {Function} [predicate=_.identity] The function invoked per iteration.
|
|
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
|
|
* @returns {boolean} Returns `true` if any element passes the predicate check,
|
|
* else `false`.
|
|
* @example
|
|
*
|
|
* _.some([null, 0, 'yes', false], Boolean);
|
|
* // => true
|
|
*
|
|
* var users = [
|
|
* { 'user': 'barney', 'active': true },
|
|
* { 'user': 'fred', 'active': false }
|
|
* ];
|
|
*
|
|
* // The `_.matches` iteratee shorthand.
|
|
* _.some(users, { 'user': 'barney', 'active': false });
|
|
* // => false
|
|
*
|
|
* // The `_.matchesProperty` iteratee shorthand.
|
|
* _.some(users, ['active', false]);
|
|
* // => true
|
|
*
|
|
* // The `_.property` iteratee shorthand.
|
|
* _.some(users, 'active');
|
|
* // => true
|
|
*/
|
|
function some(collection, predicate, guard) {
|
|
var func = isArray(collection) ? arraySome : baseSome;
|
|
if (guard && isIterateeCall(collection, predicate, guard)) {
|
|
predicate = undefined;
|
|
}
|
|
return func(collection, baseIteratee(predicate, 3));
|
|
}
|
|
|
|
module.exports = some;
|
|
|
|
|
|
/***/ }),
|
|
/* 60 */,
|
|
/* 61 */
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = function (bitmap, value) {
|
|
return {
|
|
enumerable: !(bitmap & 1),
|
|
configurable: !(bitmap & 2),
|
|
writable: !(bitmap & 4),
|
|
value: value
|
|
};
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 62 */
|
|
/***/ (function(module, exports) {
|
|
|
|
var id = 0;
|
|
var px = Math.random();
|
|
module.exports = function (key) {
|
|
return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 63 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 19.1.2.14 / 15.2.3.14 Object.keys(O)
|
|
var $keys = __webpack_require__(196);
|
|
var enumBugKeys = __webpack_require__(142);
|
|
|
|
module.exports = Object.keys || function keys(O) {
|
|
return $keys(O, enumBugKeys);
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 64 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var toInteger = __webpack_require__(40);
|
|
var max = Math.max;
|
|
var min = Math.min;
|
|
module.exports = function (index, length) {
|
|
index = toInteger(index);
|
|
return index < 0 ? max(index + length, 0) : min(index, length);
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 65 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
|
|
var anObject = __webpack_require__(9);
|
|
var dPs = __webpack_require__(197);
|
|
var enumBugKeys = __webpack_require__(142);
|
|
var IE_PROTO = __webpack_require__(141)('IE_PROTO');
|
|
var Empty = function () { /* empty */ };
|
|
var PROTOTYPE = 'prototype';
|
|
|
|
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
|
var createDict = function () {
|
|
// Thrash, waste and sodomy: IE GC bug
|
|
var iframe = __webpack_require__(139)('iframe');
|
|
var i = enumBugKeys.length;
|
|
var lt = '<';
|
|
var gt = '>';
|
|
var iframeDocument;
|
|
iframe.style.display = 'none';
|
|
__webpack_require__(143).appendChild(iframe);
|
|
iframe.src = 'javascript:'; // eslint-disable-line no-script-url
|
|
// createDict = iframe.contentWindow.Object;
|
|
// html.removeChild(iframe);
|
|
iframeDocument = iframe.contentWindow.document;
|
|
iframeDocument.open();
|
|
iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
|
|
iframeDocument.close();
|
|
createDict = iframeDocument.F;
|
|
while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
|
|
return createDict();
|
|
};
|
|
|
|
module.exports = Object.create || function create(O, Properties) {
|
|
var result;
|
|
if (O !== null) {
|
|
Empty[PROTOTYPE] = anObject(O);
|
|
result = new Empty();
|
|
Empty[PROTOTYPE] = null;
|
|
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
result[IE_PROTO] = O;
|
|
} else result = createDict();
|
|
return Properties === undefined ? result : dPs(result, Properties);
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 66 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
|
|
var $keys = __webpack_require__(196);
|
|
var hiddenKeys = __webpack_require__(142).concat('length', 'prototype');
|
|
|
|
exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
|
return $keys(O, hiddenKeys);
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 67 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var global = __webpack_require__(16);
|
|
var dP = __webpack_require__(22);
|
|
var DESCRIPTORS = __webpack_require__(21);
|
|
var SPECIES = __webpack_require__(19)('species');
|
|
|
|
module.exports = function (KEY) {
|
|
var C = global[KEY];
|
|
if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, {
|
|
configurable: true,
|
|
get: function () { return this; }
|
|
});
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 68 */
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = function (it, Constructor, name, forbiddenField) {
|
|
if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) {
|
|
throw TypeError(name + ': incorrect invocation!');
|
|
} return it;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 69 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var ctx = __webpack_require__(38);
|
|
var call = __webpack_require__(209);
|
|
var isArrayIter = __webpack_require__(154);
|
|
var anObject = __webpack_require__(9);
|
|
var toLength = __webpack_require__(20);
|
|
var getIterFn = __webpack_require__(156);
|
|
var BREAK = {};
|
|
var RETURN = {};
|
|
var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) {
|
|
var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable);
|
|
var f = ctx(fn, that, entries ? 2 : 1);
|
|
var index = 0;
|
|
var length, step, iterator, result;
|
|
if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!');
|
|
// fast case for arrays with default iterator
|
|
if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) {
|
|
result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);
|
|
if (result === BREAK || result === RETURN) return result;
|
|
} else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) {
|
|
result = call(iterator, f, step.value, entries);
|
|
if (result === BREAK || result === RETURN) return result;
|
|
}
|
|
};
|
|
exports.BREAK = BREAK;
|
|
exports.RETURN = RETURN;
|
|
|
|
|
|
/***/ }),
|
|
/* 70 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var redefine = __webpack_require__(30);
|
|
module.exports = function (target, src, safe) {
|
|
for (var key in src) redefine(target, key, src[key], safe);
|
|
return target;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 71 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var isObject = __webpack_require__(18);
|
|
module.exports = function (it, TYPE) {
|
|
if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!');
|
|
return it;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 72 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseIsNative = __webpack_require__(513),
|
|
getValue = __webpack_require__(516);
|
|
|
|
/**
|
|
* Gets the native function at `key` of `object`.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to query.
|
|
* @param {string} key The key of the method to get.
|
|
* @returns {*} Returns the function if it's native, else `undefined`.
|
|
*/
|
|
function getNative(object, key) {
|
|
var value = getValue(object, key);
|
|
return baseIsNative(value) ? value : undefined;
|
|
}
|
|
|
|
module.exports = getNative;
|
|
|
|
|
|
/***/ }),
|
|
/* 73 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseMatches = __webpack_require__(543),
|
|
baseMatchesProperty = __webpack_require__(570),
|
|
identity = __webpack_require__(120),
|
|
isArray = __webpack_require__(26),
|
|
property = __webpack_require__(572);
|
|
|
|
/**
|
|
* The base implementation of `_.iteratee`.
|
|
*
|
|
* @private
|
|
* @param {*} [value=_.identity] The value to convert to an iteratee.
|
|
* @returns {Function} Returns the iteratee.
|
|
*/
|
|
function baseIteratee(value) {
|
|
// Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
|
|
// See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
|
|
if (typeof value == 'function') {
|
|
return value;
|
|
}
|
|
if (value == null) {
|
|
return identity;
|
|
}
|
|
if (typeof value == 'object') {
|
|
return isArray(value)
|
|
? baseMatchesProperty(value[0], value[1])
|
|
: baseMatches(value);
|
|
}
|
|
return property(value);
|
|
}
|
|
|
|
module.exports = baseIteratee;
|
|
|
|
|
|
/***/ }),
|
|
/* 74 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseGetTag = __webpack_require__(50),
|
|
isObject = __webpack_require__(81);
|
|
|
|
/** `Object#toString` result references. */
|
|
var asyncTag = '[object AsyncFunction]',
|
|
funcTag = '[object Function]',
|
|
genTag = '[object GeneratorFunction]',
|
|
proxyTag = '[object Proxy]';
|
|
|
|
/**
|
|
* Checks if `value` is classified as a `Function` object.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
|
|
* @example
|
|
*
|
|
* _.isFunction(_);
|
|
* // => true
|
|
*
|
|
* _.isFunction(/abc/);
|
|
* // => false
|
|
*/
|
|
function isFunction(value) {
|
|
if (!isObject(value)) {
|
|
return false;
|
|
}
|
|
// The use of `Object#toString` avoids issues with the `typeof` operator
|
|
// in Safari 9 which returns 'object' for typed arrays and other constructors.
|
|
var tag = baseGetTag(value);
|
|
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
}
|
|
|
|
module.exports = isFunction;
|
|
|
|
|
|
/***/ }),
|
|
/* 75 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
function checkDCE() {
|
|
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
|
|
if (
|
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||
|
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'
|
|
) {
|
|
return;
|
|
}
|
|
if (false) {}
|
|
try {
|
|
// Verify that the code above has been dead code eliminated (DCE'd).
|
|
__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);
|
|
} catch (err) {
|
|
// DevTools shouldn't crash React, no matter what.
|
|
// We should still report in case we break this code.
|
|
console.error(err);
|
|
}
|
|
}
|
|
|
|
if (true) {
|
|
// DCE check should happen before ReactDOM bundle executes so that
|
|
// DevTools can report bad minification during injection.
|
|
checkDCE();
|
|
module.exports = __webpack_require__(500);
|
|
} else {}
|
|
|
|
|
|
/***/ }),
|
|
/* 76 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var arrayWithHoles = __webpack_require__(581);
|
|
|
|
var iterableToArrayLimit = __webpack_require__(582);
|
|
|
|
var nonIterableRest = __webpack_require__(583);
|
|
|
|
function _slicedToArray(arr, i) {
|
|
return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || nonIterableRest();
|
|
}
|
|
|
|
module.exports = _slicedToArray;
|
|
|
|
/***/ }),
|
|
/* 77 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var def = __webpack_require__(22).f;
|
|
var has = __webpack_require__(33);
|
|
var TAG = __webpack_require__(19)('toStringTag');
|
|
|
|
module.exports = function (it, tag, stat) {
|
|
if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 78 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// getting tag from 19.1.3.6 Object.prototype.toString()
|
|
var cof = __webpack_require__(39);
|
|
var TAG = __webpack_require__(19)('toStringTag');
|
|
// ES3 wrong here
|
|
var ARG = cof(function () { return arguments; }()) == 'Arguments';
|
|
|
|
// fallback for IE11 Script Access Denied error
|
|
var tryGet = function (it, key) {
|
|
try {
|
|
return it[key];
|
|
} catch (e) { /* empty */ }
|
|
};
|
|
|
|
module.exports = function (it) {
|
|
var O, T, B;
|
|
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
|
// @@toStringTag case
|
|
: typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T
|
|
// builtinTag case
|
|
: ARG ? cof(O)
|
|
// ES3 arguments fallback
|
|
: (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 79 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var $export = __webpack_require__(3);
|
|
var defined = __webpack_require__(44);
|
|
var fails = __webpack_require__(17);
|
|
var spaces = __webpack_require__(145);
|
|
var space = '[' + spaces + ']';
|
|
var non = '\u200b\u0085';
|
|
var ltrim = RegExp('^' + space + space + '*');
|
|
var rtrim = RegExp(space + space + '*$');
|
|
|
|
var exporter = function (KEY, exec, ALIAS) {
|
|
var exp = {};
|
|
var FORCE = fails(function () {
|
|
return !!spaces[KEY]() || non[KEY]() != non;
|
|
});
|
|
var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY];
|
|
if (ALIAS) exp[ALIAS] = fn;
|
|
$export($export.P + $export.F * FORCE, 'String', exp);
|
|
};
|
|
|
|
// 1 -> String#trimLeft
|
|
// 2 -> String#trimRight
|
|
// 3 -> String#trim
|
|
var trim = exporter.trim = function (string, TYPE) {
|
|
string = String(defined(string));
|
|
if (TYPE & 1) string = string.replace(ltrim, '');
|
|
if (TYPE & 2) string = string.replace(rtrim, '');
|
|
return string;
|
|
};
|
|
|
|
module.exports = exporter;
|
|
|
|
|
|
/***/ }),
|
|
/* 80 */
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = {};
|
|
|
|
|
|
/***/ }),
|
|
/* 81 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* Checks if `value` is the
|
|
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
* @example
|
|
*
|
|
* _.isObject({});
|
|
* // => true
|
|
*
|
|
* _.isObject([1, 2, 3]);
|
|
* // => true
|
|
*
|
|
* _.isObject(_.noop);
|
|
* // => true
|
|
*
|
|
* _.isObject(null);
|
|
* // => false
|
|
*/
|
|
function isObject(value) {
|
|
var type = typeof value;
|
|
return value != null && (type == 'object' || type == 'function');
|
|
}
|
|
|
|
module.exports = isObject;
|
|
|
|
|
|
/***/ }),
|
|
/* 82 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseToString = __webpack_require__(234);
|
|
|
|
/**
|
|
* Converts `value` to a string. An empty string is returned for `null`
|
|
* and `undefined` values. The sign of `-0` is preserved.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Lang
|
|
* @param {*} value The value to convert.
|
|
* @returns {string} Returns the converted string.
|
|
* @example
|
|
*
|
|
* _.toString(null);
|
|
* // => ''
|
|
*
|
|
* _.toString(-0);
|
|
* // => '-0'
|
|
*
|
|
* _.toString([1, 2, 3]);
|
|
* // => '1,2,3'
|
|
*/
|
|
function toString(value) {
|
|
return value == null ? '' : baseToString(value);
|
|
}
|
|
|
|
module.exports = toString;
|
|
|
|
|
|
/***/ }),
|
|
/* 83 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* A specialized version of `_.map` for arrays without support for iteratee
|
|
* shorthands.
|
|
*
|
|
* @private
|
|
* @param {Array} [array] The array to iterate over.
|
|
* @param {Function} iteratee The function invoked per iteration.
|
|
* @returns {Array} Returns the new mapped array.
|
|
*/
|
|
function arrayMap(array, iteratee) {
|
|
var index = -1,
|
|
length = array == null ? 0 : array.length,
|
|
result = Array(length);
|
|
|
|
while (++index < length) {
|
|
result[index] = iteratee(array[index], index, array);
|
|
}
|
|
return result;
|
|
}
|
|
|
|
module.exports = arrayMap;
|
|
|
|
|
|
/***/ }),
|
|
/* 84 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var isSymbol = __webpack_require__(113);
|
|
|
|
/** Used as references for various `Number` constants. */
|
|
var INFINITY = 1 / 0;
|
|
|
|
/**
|
|
* Converts `value` to a string key if it's not a string or symbol.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to inspect.
|
|
* @returns {string|symbol} Returns the key.
|
|
*/
|
|
function toKey(value) {
|
|
if (typeof value == 'string' || isSymbol(value)) {
|
|
return value;
|
|
}
|
|
var result = (value + '');
|
|
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
|
}
|
|
|
|
module.exports = toKey;
|
|
|
|
|
|
/***/ }),
|
|
/* 85 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var arrayLikeKeys = __webpack_require__(559),
|
|
baseKeys = __webpack_require__(178),
|
|
isArrayLike = __webpack_require__(52);
|
|
|
|
/**
|
|
* Creates an array of the own enumerable property names of `object`.
|
|
*
|
|
* **Note:** Non-object values are coerced to objects. See the
|
|
* [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
|
|
* for more details.
|
|
*
|
|
* @static
|
|
* @since 0.1.0
|
|
* @memberOf _
|
|
* @category Object
|
|
* @param {Object} object The object to query.
|
|
* @returns {Array} Returns the array of property names.
|
|
* @example
|
|
*
|
|
* function Foo() {
|
|
* this.a = 1;
|
|
* this.b = 2;
|
|
* }
|
|
*
|
|
* Foo.prototype.c = 3;
|
|
*
|
|
* _.keys(new Foo);
|
|
* // => ['a', 'b'] (iteration order is not guaranteed)
|
|
*
|
|
* _.keys('hi');
|
|
* // => ['0', '1']
|
|
*/
|
|
function keys(object) {
|
|
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
|
|
}
|
|
|
|
module.exports = keys;
|
|
|
|
|
|
/***/ }),
|
|
/* 86 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseForOwn = __webpack_require__(575),
|
|
createBaseEach = __webpack_require__(578);
|
|
|
|
/**
|
|
* The base implementation of `_.forEach` without support for iteratee shorthands.
|
|
*
|
|
* @private
|
|
* @param {Array|Object} collection The collection to iterate over.
|
|
* @param {Function} iteratee The function invoked per iteration.
|
|
* @returns {Array|Object} Returns `collection`.
|
|
*/
|
|
var baseEach = createBaseEach(baseForOwn);
|
|
|
|
module.exports = baseEach;
|
|
|
|
|
|
/***/ }),
|
|
/* 87 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* Checks if `value` is `undefined`.
|
|
*
|
|
* @static
|
|
* @since 0.1.0
|
|
* @memberOf _
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
|
|
* @example
|
|
*
|
|
* _.isUndefined(void 0);
|
|
* // => true
|
|
*
|
|
* _.isUndefined(null);
|
|
* // => false
|
|
*/
|
|
function isUndefined(value) {
|
|
return value === undefined;
|
|
}
|
|
|
|
module.exports = isUndefined;
|
|
|
|
|
|
/***/ }),
|
|
/* 88 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseKeys = __webpack_require__(178),
|
|
getTag = __webpack_require__(179),
|
|
isArguments = __webpack_require__(124),
|
|
isArray = __webpack_require__(26),
|
|
isArrayLike = __webpack_require__(52),
|
|
isBuffer = __webpack_require__(176),
|
|
isPrototype = __webpack_require__(247),
|
|
isTypedArray = __webpack_require__(177);
|
|
|
|
/** `Object#toString` result references. */
|
|
var mapTag = '[object Map]',
|
|
setTag = '[object Set]';
|
|
|
|
/** Used for built-in method references. */
|
|
var objectProto = Object.prototype;
|
|
|
|
/** Used to check objects for own properties. */
|
|
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
|
|
/**
|
|
* Checks if `value` is an empty object, collection, map, or set.
|
|
*
|
|
* Objects are considered empty if they have no own enumerable string keyed
|
|
* properties.
|
|
*
|
|
* Array-like values such as `arguments` objects, arrays, buffers, strings, or
|
|
* jQuery-like collections are considered empty if they have a `length` of `0`.
|
|
* Similarly, maps and sets are considered empty if they have a `size` of `0`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is empty, else `false`.
|
|
* @example
|
|
*
|
|
* _.isEmpty(null);
|
|
* // => true
|
|
*
|
|
* _.isEmpty(true);
|
|
* // => true
|
|
*
|
|
* _.isEmpty(1);
|
|
* // => true
|
|
*
|
|
* _.isEmpty([1, 2, 3]);
|
|
* // => false
|
|
*
|
|
* _.isEmpty({ 'a': 1 });
|
|
* // => false
|
|
*/
|
|
function isEmpty(value) {
|
|
if (value == null) {
|
|
return true;
|
|
}
|
|
if (isArrayLike(value) &&
|
|
(isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
|
|
isBuffer(value) || isTypedArray(value) || isArguments(value))) {
|
|
return !value.length;
|
|
}
|
|
var tag = getTag(value);
|
|
if (tag == mapTag || tag == setTag) {
|
|
return !value.size;
|
|
}
|
|
if (isPrototype(value)) {
|
|
return !baseKeys(value).length;
|
|
}
|
|
for (var key in value) {
|
|
if (hasOwnProperty.call(value, key)) {
|
|
return false;
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
|
|
module.exports = isEmpty;
|
|
|
|
|
|
/***/ }),
|
|
/* 89 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var core = __webpack_require__(37);
|
|
var global = __webpack_require__(16);
|
|
var SHARED = '__core-js_shared__';
|
|
var store = global[SHARED] || (global[SHARED] = {});
|
|
|
|
(module.exports = function (key, value) {
|
|
return store[key] || (store[key] = value !== undefined ? value : {});
|
|
})('versions', []).push({
|
|
version: core.version,
|
|
mode: __webpack_require__(55) ? 'pure' : 'global',
|
|
copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 90 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
var cof = __webpack_require__(39);
|
|
// eslint-disable-next-line no-prototype-builtins
|
|
module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
|
|
return cof(it) == 'String' ? it.split('') : Object(it);
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 91 */
|
|
/***/ (function(module, exports) {
|
|
|
|
exports.f = {}.propertyIsEnumerable;
|
|
|
|
|
|
/***/ }),
|
|
/* 92 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
// 21.2.5.3 get RegExp.prototype.flags
|
|
var anObject = __webpack_require__(9);
|
|
module.exports = function () {
|
|
var that = anObject(this);
|
|
var result = '';
|
|
if (that.global) result += 'g';
|
|
if (that.ignoreCase) result += 'i';
|
|
if (that.multiline) result += 'm';
|
|
if (that.unicode) result += 'u';
|
|
if (that.sticky) result += 'y';
|
|
return result;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 93 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 7.3.20 SpeciesConstructor(O, defaultConstructor)
|
|
var anObject = __webpack_require__(9);
|
|
var aFunction = __webpack_require__(27);
|
|
var SPECIES = __webpack_require__(19)('species');
|
|
module.exports = function (O, D) {
|
|
var C = anObject(O).constructor;
|
|
var S;
|
|
return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S);
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 94 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var isArray = __webpack_require__(26),
|
|
isKey = __webpack_require__(166),
|
|
stringToPath = __webpack_require__(507),
|
|
toString = __webpack_require__(82);
|
|
|
|
/**
|
|
* Casts `value` to a path array if it's not one.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to inspect.
|
|
* @param {Object} [object] The object to query keys on.
|
|
* @returns {Array} Returns the cast property path array.
|
|
*/
|
|
function castPath(value, object) {
|
|
if (isArray(value)) {
|
|
return value;
|
|
}
|
|
return isKey(value, object) ? [value] : stringToPath(toString(value));
|
|
}
|
|
|
|
module.exports = castPath;
|
|
|
|
|
|
/***/ }),
|
|
/* 95 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var root = __webpack_require__(51);
|
|
|
|
/** Built-in value references. */
|
|
var Symbol = root.Symbol;
|
|
|
|
module.exports = Symbol;
|
|
|
|
|
|
/***/ }),
|
|
/* 96 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var identity = __webpack_require__(120),
|
|
overRest = __webpack_require__(235),
|
|
setToString = __webpack_require__(236);
|
|
|
|
/**
|
|
* The base implementation of `_.rest` which doesn't validate or coerce arguments.
|
|
*
|
|
* @private
|
|
* @param {Function} func The function to apply a rest parameter to.
|
|
* @param {number} [start=func.length-1] The start position of the rest parameter.
|
|
* @returns {Function} Returns the new function.
|
|
*/
|
|
function baseRest(func, start) {
|
|
return setToString(overRest(func, start, identity), func + '');
|
|
}
|
|
|
|
module.exports = baseRest;
|
|
|
|
|
|
/***/ }),
|
|
/* 97 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var parse = __webpack_require__(42)
|
|
|
|
/**
|
|
* @category Day Helpers
|
|
* @summary Return the start of a day for the given date.
|
|
*
|
|
* @description
|
|
* Return the start of a day for the given date.
|
|
* The result will be in the local timezone.
|
|
*
|
|
* @param {Date|String|Number} date - the original date
|
|
* @returns {Date} the start of a day
|
|
*
|
|
* @example
|
|
* // The start of a day for 2 September 2014 11:55:00:
|
|
* var result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))
|
|
* //=> Tue Sep 02 2014 00:00:00
|
|
*/
|
|
function startOfDay (dirtyDate) {
|
|
var date = parse(dirtyDate)
|
|
date.setHours(0, 0, 0, 0)
|
|
return date
|
|
}
|
|
|
|
module.exports = startOfDay
|
|
|
|
|
|
/***/ }),
|
|
/* 98 */,
|
|
/* 99 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// false -> Array#indexOf
|
|
// true -> Array#includes
|
|
var toIObject = __webpack_require__(34);
|
|
var toLength = __webpack_require__(20);
|
|
var toAbsoluteIndex = __webpack_require__(64);
|
|
module.exports = function (IS_INCLUDES) {
|
|
return function ($this, el, fromIndex) {
|
|
var O = toIObject($this);
|
|
var length = toLength(O.length);
|
|
var index = toAbsoluteIndex(fromIndex, length);
|
|
var value;
|
|
// Array#includes uses SameValueZero equality algorithm
|
|
// eslint-disable-next-line no-self-compare
|
|
if (IS_INCLUDES && el != el) while (length > index) {
|
|
value = O[index++];
|
|
// eslint-disable-next-line no-self-compare
|
|
if (value != value) return true;
|
|
// Array#indexOf ignores holes, Array#includes - not
|
|
} else for (;length > index; index++) if (IS_INCLUDES || index in O) {
|
|
if (O[index] === el) return IS_INCLUDES || index || 0;
|
|
} return !IS_INCLUDES && -1;
|
|
};
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 100 */
|
|
/***/ (function(module, exports) {
|
|
|
|
exports.f = Object.getOwnPropertySymbols;
|
|
|
|
|
|
/***/ }),
|
|
/* 101 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 7.2.2 IsArray(argument)
|
|
var cof = __webpack_require__(39);
|
|
module.exports = Array.isArray || function isArray(arg) {
|
|
return cof(arg) == 'Array';
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 102 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var toInteger = __webpack_require__(40);
|
|
var defined = __webpack_require__(44);
|
|
// true -> String#at
|
|
// false -> String#codePointAt
|
|
module.exports = function (TO_STRING) {
|
|
return function (that, pos) {
|
|
var s = String(defined(that));
|
|
var i = toInteger(pos);
|
|
var l = s.length;
|
|
var a, b;
|
|
if (i < 0 || i >= l) return TO_STRING ? '' : undefined;
|
|
a = s.charCodeAt(i);
|
|
return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
|
|
? TO_STRING ? s.charAt(i) : a
|
|
: TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
|
|
};
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 103 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 7.2.8 IsRegExp(argument)
|
|
var isObject = __webpack_require__(18);
|
|
var cof = __webpack_require__(39);
|
|
var MATCH = __webpack_require__(19)('match');
|
|
module.exports = function (it) {
|
|
var isRegExp;
|
|
return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp');
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 104 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var ITERATOR = __webpack_require__(19)('iterator');
|
|
var SAFE_CLOSING = false;
|
|
|
|
try {
|
|
var riter = [7][ITERATOR]();
|
|
riter['return'] = function () { SAFE_CLOSING = true; };
|
|
// eslint-disable-next-line no-throw-literal
|
|
Array.from(riter, function () { throw 2; });
|
|
} catch (e) { /* empty */ }
|
|
|
|
module.exports = function (exec, skipClosing) {
|
|
if (!skipClosing && !SAFE_CLOSING) return false;
|
|
var safe = false;
|
|
try {
|
|
var arr = [7];
|
|
var iter = arr[ITERATOR]();
|
|
iter.next = function () { return { done: safe = true }; };
|
|
arr[ITERATOR] = function () { return iter; };
|
|
exec(arr);
|
|
} catch (e) { /* empty */ }
|
|
return safe;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 105 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
var classof = __webpack_require__(78);
|
|
var builtinExec = RegExp.prototype.exec;
|
|
|
|
// `RegExpExec` abstract operation
|
|
// https://tc39.github.io/ecma262/#sec-regexpexec
|
|
module.exports = function (R, S) {
|
|
var exec = R.exec;
|
|
if (typeof exec === 'function') {
|
|
var result = exec.call(R, S);
|
|
if (typeof result !== 'object') {
|
|
throw new TypeError('RegExp exec method returned something other than an Object or null');
|
|
}
|
|
return result;
|
|
}
|
|
if (classof(R) !== 'RegExp') {
|
|
throw new TypeError('RegExp#exec called on incompatible receiver');
|
|
}
|
|
return builtinExec.call(R, S);
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 106 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
__webpack_require__(213);
|
|
var redefine = __webpack_require__(30);
|
|
var hide = __webpack_require__(29);
|
|
var fails = __webpack_require__(17);
|
|
var defined = __webpack_require__(44);
|
|
var wks = __webpack_require__(19);
|
|
var regexpExec = __webpack_require__(160);
|
|
|
|
var SPECIES = wks('species');
|
|
|
|
var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
|
|
// #replace needs built-in support for named groups.
|
|
// #match works fine because it just return the exec results, even if it has
|
|
// a "grops" property.
|
|
var re = /./;
|
|
re.exec = function () {
|
|
var result = [];
|
|
result.groups = { a: '7' };
|
|
return result;
|
|
};
|
|
return ''.replace(re, '$<a>') !== '7';
|
|
});
|
|
|
|
var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = (function () {
|
|
// Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
|
|
var re = /(?:)/;
|
|
var originalExec = re.exec;
|
|
re.exec = function () { return originalExec.apply(this, arguments); };
|
|
var result = 'ab'.split(re);
|
|
return result.length === 2 && result[0] === 'a' && result[1] === 'b';
|
|
})();
|
|
|
|
module.exports = function (KEY, length, exec) {
|
|
var SYMBOL = wks(KEY);
|
|
|
|
var DELEGATES_TO_SYMBOL = !fails(function () {
|
|
// String methods call symbol-named RegEp methods
|
|
var O = {};
|
|
O[SYMBOL] = function () { return 7; };
|
|
return ''[KEY](O) != 7;
|
|
});
|
|
|
|
var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL ? !fails(function () {
|
|
// Symbol-named RegExp methods call .exec
|
|
var execCalled = false;
|
|
var re = /a/;
|
|
re.exec = function () { execCalled = true; return null; };
|
|
if (KEY === 'split') {
|
|
// RegExp[@@split] doesn't call the regex's exec method, but first creates
|
|
// a new one. We need to return the patched regex when creating the new one.
|
|
re.constructor = {};
|
|
re.constructor[SPECIES] = function () { return re; };
|
|
}
|
|
re[SYMBOL]('');
|
|
return !execCalled;
|
|
}) : undefined;
|
|
|
|
if (
|
|
!DELEGATES_TO_SYMBOL ||
|
|
!DELEGATES_TO_EXEC ||
|
|
(KEY === 'replace' && !REPLACE_SUPPORTS_NAMED_GROUPS) ||
|
|
(KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
|
|
) {
|
|
var nativeRegExpMethod = /./[SYMBOL];
|
|
var fns = exec(
|
|
defined,
|
|
SYMBOL,
|
|
''[KEY],
|
|
function maybeCallNative(nativeMethod, regexp, str, arg2, forceStringMethod) {
|
|
if (regexp.exec === regexpExec) {
|
|
if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
|
|
// The native String method already delegates to @@method (this
|
|
// polyfilled function), leasing to infinite recursion.
|
|
// We avoid it by directly calling the native @@method method.
|
|
return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };
|
|
}
|
|
return { done: true, value: nativeMethod.call(str, regexp, arg2) };
|
|
}
|
|
return { done: false };
|
|
}
|
|
);
|
|
var strfn = fns[0];
|
|
var rxfn = fns[1];
|
|
|
|
redefine(String.prototype, KEY, strfn);
|
|
hide(RegExp.prototype, SYMBOL, length == 2
|
|
// 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
|
|
// 21.2.5.11 RegExp.prototype[@@split](string, limit)
|
|
? function (string, arg) { return rxfn.call(string, this, arg); }
|
|
// 21.2.5.6 RegExp.prototype[@@match](string)
|
|
// 21.2.5.9 RegExp.prototype[@@search](string)
|
|
: function (string) { return rxfn.call(string, this); }
|
|
);
|
|
}
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 107 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var global = __webpack_require__(16);
|
|
var navigator = global.navigator;
|
|
|
|
module.exports = navigator && navigator.userAgent || '';
|
|
|
|
|
|
/***/ }),
|
|
/* 108 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var global = __webpack_require__(16);
|
|
var $export = __webpack_require__(3);
|
|
var redefine = __webpack_require__(30);
|
|
var redefineAll = __webpack_require__(70);
|
|
var meta = __webpack_require__(56);
|
|
var forOf = __webpack_require__(69);
|
|
var anInstance = __webpack_require__(68);
|
|
var isObject = __webpack_require__(18);
|
|
var fails = __webpack_require__(17);
|
|
var $iterDetect = __webpack_require__(104);
|
|
var setToStringTag = __webpack_require__(77);
|
|
var inheritIfRequired = __webpack_require__(146);
|
|
|
|
module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) {
|
|
var Base = global[NAME];
|
|
var C = Base;
|
|
var ADDER = IS_MAP ? 'set' : 'add';
|
|
var proto = C && C.prototype;
|
|
var O = {};
|
|
var fixMethod = function (KEY) {
|
|
var fn = proto[KEY];
|
|
redefine(proto, KEY,
|
|
KEY == 'delete' ? function (a) {
|
|
return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);
|
|
} : KEY == 'has' ? function has(a) {
|
|
return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);
|
|
} : KEY == 'get' ? function get(a) {
|
|
return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a);
|
|
} : KEY == 'add' ? function add(a) { fn.call(this, a === 0 ? 0 : a); return this; }
|
|
: function set(a, b) { fn.call(this, a === 0 ? 0 : a, b); return this; }
|
|
);
|
|
};
|
|
if (typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () {
|
|
new C().entries().next();
|
|
}))) {
|
|
// create collection constructor
|
|
C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER);
|
|
redefineAll(C.prototype, methods);
|
|
meta.NEED = true;
|
|
} else {
|
|
var instance = new C();
|
|
// early implementations not supports chaining
|
|
var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;
|
|
// V8 ~ Chromium 40- weak-collections throws on primitives, but should return false
|
|
var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });
|
|
// most early implementations doesn't supports iterables, most modern - not close it correctly
|
|
var ACCEPT_ITERABLES = $iterDetect(function (iter) { new C(iter); }); // eslint-disable-line no-new
|
|
// for early implementations -0 and +0 not the same
|
|
var BUGGY_ZERO = !IS_WEAK && fails(function () {
|
|
// V8 ~ Chromium 42- fails only with 5+ elements
|
|
var $instance = new C();
|
|
var index = 5;
|
|
while (index--) $instance[ADDER](index, index);
|
|
return !$instance.has(-0);
|
|
});
|
|
if (!ACCEPT_ITERABLES) {
|
|
C = wrapper(function (target, iterable) {
|
|
anInstance(target, C, NAME);
|
|
var that = inheritIfRequired(new Base(), target, C);
|
|
if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);
|
|
return that;
|
|
});
|
|
C.prototype = proto;
|
|
proto.constructor = C;
|
|
}
|
|
if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {
|
|
fixMethod('delete');
|
|
fixMethod('has');
|
|
IS_MAP && fixMethod('get');
|
|
}
|
|
if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);
|
|
// weak collections should not contains .clear method
|
|
if (IS_WEAK && proto.clear) delete proto.clear;
|
|
}
|
|
|
|
setToStringTag(C, NAME);
|
|
|
|
O[NAME] = C;
|
|
$export($export.G + $export.W + $export.F * (C != Base), O);
|
|
|
|
if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP);
|
|
|
|
return C;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 109 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var global = __webpack_require__(16);
|
|
var hide = __webpack_require__(29);
|
|
var uid = __webpack_require__(62);
|
|
var TYPED = uid('typed_array');
|
|
var VIEW = uid('view');
|
|
var ABV = !!(global.ArrayBuffer && global.DataView);
|
|
var CONSTR = ABV;
|
|
var i = 0;
|
|
var l = 9;
|
|
var Typed;
|
|
|
|
var TypedArrayConstructors = (
|
|
'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array'
|
|
).split(',');
|
|
|
|
while (i < l) {
|
|
if (Typed = global[TypedArrayConstructors[i++]]) {
|
|
hide(Typed.prototype, TYPED, true);
|
|
hide(Typed.prototype, VIEW, true);
|
|
} else CONSTR = false;
|
|
}
|
|
|
|
module.exports = {
|
|
ABV: ABV,
|
|
CONSTR: CONSTR,
|
|
TYPED: TYPED,
|
|
VIEW: VIEW
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 110 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
// Forced replacement prototype accessors methods
|
|
module.exports = __webpack_require__(55) || !__webpack_require__(17)(function () {
|
|
var K = Math.random();
|
|
// In FF throws only define methods
|
|
// eslint-disable-next-line no-undef, no-useless-call
|
|
__defineSetter__.call(null, K, function () { /* empty */ });
|
|
delete __webpack_require__(16)[K];
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 111 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
// https://tc39.github.io/proposal-setmap-offrom/
|
|
var $export = __webpack_require__(3);
|
|
|
|
module.exports = function (COLLECTION) {
|
|
$export($export.S, COLLECTION, { of: function of() {
|
|
var length = arguments.length;
|
|
var A = new Array(length);
|
|
while (length--) A[length] = arguments[length];
|
|
return new this(A);
|
|
} });
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 112 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
// https://tc39.github.io/proposal-setmap-offrom/
|
|
var $export = __webpack_require__(3);
|
|
var aFunction = __webpack_require__(27);
|
|
var ctx = __webpack_require__(38);
|
|
var forOf = __webpack_require__(69);
|
|
|
|
module.exports = function (COLLECTION) {
|
|
$export($export.S, COLLECTION, { from: function from(source /* , mapFn, thisArg */) {
|
|
var mapFn = arguments[1];
|
|
var mapping, A, n, cb;
|
|
aFunction(this);
|
|
mapping = mapFn !== undefined;
|
|
if (mapping) aFunction(mapFn);
|
|
if (source == undefined) return new this();
|
|
A = [];
|
|
if (mapping) {
|
|
n = 0;
|
|
cb = ctx(mapFn, arguments[2], 2);
|
|
forOf(source, false, function (nextItem) {
|
|
A.push(cb(nextItem, n++));
|
|
});
|
|
} else {
|
|
forOf(source, false, A.push, A);
|
|
}
|
|
return new this(A);
|
|
} });
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 113 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseGetTag = __webpack_require__(50),
|
|
isObjectLike = __webpack_require__(47);
|
|
|
|
/** `Object#toString` result references. */
|
|
var symbolTag = '[object Symbol]';
|
|
|
|
/**
|
|
* Checks if `value` is classified as a `Symbol` primitive or object.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
|
* @example
|
|
*
|
|
* _.isSymbol(Symbol.iterator);
|
|
* // => true
|
|
*
|
|
* _.isSymbol('abc');
|
|
* // => false
|
|
*/
|
|
function isSymbol(value) {
|
|
return typeof value == 'symbol' ||
|
|
(isObjectLike(value) && baseGetTag(value) == symbolTag);
|
|
}
|
|
|
|
module.exports = isSymbol;
|
|
|
|
|
|
/***/ }),
|
|
/* 114 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var getNative = __webpack_require__(72);
|
|
|
|
/* Built-in method references that are verified to be native. */
|
|
var nativeCreate = getNative(Object, 'create');
|
|
|
|
module.exports = nativeCreate;
|
|
|
|
|
|
/***/ }),
|
|
/* 115 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var listCacheClear = __webpack_require__(521),
|
|
listCacheDelete = __webpack_require__(522),
|
|
listCacheGet = __webpack_require__(523),
|
|
listCacheHas = __webpack_require__(524),
|
|
listCacheSet = __webpack_require__(525);
|
|
|
|
/**
|
|
* Creates an list cache object.
|
|
*
|
|
* @private
|
|
* @constructor
|
|
* @param {Array} [entries] The key-value pairs to cache.
|
|
*/
|
|
function ListCache(entries) {
|
|
var index = -1,
|
|
length = entries == null ? 0 : entries.length;
|
|
|
|
this.clear();
|
|
while (++index < length) {
|
|
var entry = entries[index];
|
|
this.set(entry[0], entry[1]);
|
|
}
|
|
}
|
|
|
|
// Add methods to `ListCache`.
|
|
ListCache.prototype.clear = listCacheClear;
|
|
ListCache.prototype['delete'] = listCacheDelete;
|
|
ListCache.prototype.get = listCacheGet;
|
|
ListCache.prototype.has = listCacheHas;
|
|
ListCache.prototype.set = listCacheSet;
|
|
|
|
module.exports = ListCache;
|
|
|
|
|
|
/***/ }),
|
|
/* 116 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var eq = __webpack_require__(117);
|
|
|
|
/**
|
|
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to inspect.
|
|
* @param {*} key The key to search for.
|
|
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
*/
|
|
function assocIndexOf(array, key) {
|
|
var length = array.length;
|
|
while (length--) {
|
|
if (eq(array[length][0], key)) {
|
|
return length;
|
|
}
|
|
}
|
|
return -1;
|
|
}
|
|
|
|
module.exports = assocIndexOf;
|
|
|
|
|
|
/***/ }),
|
|
/* 117 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* Performs a
|
|
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
* comparison between two values to determine if they are equivalent.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Lang
|
|
* @param {*} value The value to compare.
|
|
* @param {*} other The other value to compare.
|
|
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
* @example
|
|
*
|
|
* var object = { 'a': 1 };
|
|
* var other = { 'a': 1 };
|
|
*
|
|
* _.eq(object, object);
|
|
* // => true
|
|
*
|
|
* _.eq(object, other);
|
|
* // => false
|
|
*
|
|
* _.eq('a', 'a');
|
|
* // => true
|
|
*
|
|
* _.eq('a', Object('a'));
|
|
* // => false
|
|
*
|
|
* _.eq(NaN, NaN);
|
|
* // => true
|
|
*/
|
|
function eq(value, other) {
|
|
return value === other || (value !== value && other !== other);
|
|
}
|
|
|
|
module.exports = eq;
|
|
|
|
|
|
/***/ }),
|
|
/* 118 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var isKeyable = __webpack_require__(527);
|
|
|
|
/**
|
|
* Gets the data for `map`.
|
|
*
|
|
* @private
|
|
* @param {Object} map The map to query.
|
|
* @param {string} key The reference key.
|
|
* @returns {*} Returns the map data.
|
|
*/
|
|
function getMapData(map, key) {
|
|
var data = map.__data__;
|
|
return isKeyable(key)
|
|
? data[typeof key == 'string' ? 'string' : 'hash']
|
|
: data.map;
|
|
}
|
|
|
|
module.exports = getMapData;
|
|
|
|
|
|
/***/ }),
|
|
/* 119 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var castPath = __webpack_require__(94),
|
|
toKey = __webpack_require__(84);
|
|
|
|
/**
|
|
* The base implementation of `_.get` without support for default values.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to query.
|
|
* @param {Array|string} path The path of the property to get.
|
|
* @returns {*} Returns the resolved value.
|
|
*/
|
|
function baseGet(object, path) {
|
|
path = castPath(path, object);
|
|
|
|
var index = 0,
|
|
length = path.length;
|
|
|
|
while (object != null && index < length) {
|
|
object = object[toKey(path[index++])];
|
|
}
|
|
return (index && index == length) ? object : undefined;
|
|
}
|
|
|
|
module.exports = baseGet;
|
|
|
|
|
|
/***/ }),
|
|
/* 120 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* This method returns the first argument it receives.
|
|
*
|
|
* @static
|
|
* @since 0.1.0
|
|
* @memberOf _
|
|
* @category Util
|
|
* @param {*} value Any value.
|
|
* @returns {*} Returns `value`.
|
|
* @example
|
|
*
|
|
* var object = { 'a': 1 };
|
|
*
|
|
* console.log(_.identity(object) === object);
|
|
* // => true
|
|
*/
|
|
function identity(value) {
|
|
return value;
|
|
}
|
|
|
|
module.exports = identity;
|
|
|
|
|
|
/***/ }),
|
|
/* 121 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var MapCache = __webpack_require__(167),
|
|
setCacheAdd = __webpack_require__(536),
|
|
setCacheHas = __webpack_require__(537);
|
|
|
|
/**
|
|
*
|
|
* Creates an array cache object to store unique values.
|
|
*
|
|
* @private
|
|
* @constructor
|
|
* @param {Array} [values] The values to cache.
|
|
*/
|
|
function SetCache(values) {
|
|
var index = -1,
|
|
length = values == null ? 0 : values.length;
|
|
|
|
this.__data__ = new MapCache;
|
|
while (++index < length) {
|
|
this.add(values[index]);
|
|
}
|
|
}
|
|
|
|
// Add methods to `SetCache`.
|
|
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
|
|
SetCache.prototype.has = setCacheHas;
|
|
|
|
module.exports = SetCache;
|
|
|
|
|
|
/***/ }),
|
|
/* 122 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* Checks if a `cache` value for `key` exists.
|
|
*
|
|
* @private
|
|
* @param {Object} cache The cache to query.
|
|
* @param {string} key The key of the entry to check.
|
|
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
*/
|
|
function cacheHas(cache, key) {
|
|
return cache.has(key);
|
|
}
|
|
|
|
module.exports = cacheHas;
|
|
|
|
|
|
/***/ }),
|
|
/* 123 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var isArrayLike = __webpack_require__(52),
|
|
isObjectLike = __webpack_require__(47);
|
|
|
|
/**
|
|
* This method is like `_.isArrayLike` except that it also checks if `value`
|
|
* is an object.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is an array-like object,
|
|
* else `false`.
|
|
* @example
|
|
*
|
|
* _.isArrayLikeObject([1, 2, 3]);
|
|
* // => true
|
|
*
|
|
* _.isArrayLikeObject(document.body.children);
|
|
* // => true
|
|
*
|
|
* _.isArrayLikeObject('abc');
|
|
* // => false
|
|
*
|
|
* _.isArrayLikeObject(_.noop);
|
|
* // => false
|
|
*/
|
|
function isArrayLikeObject(value) {
|
|
return isObjectLike(value) && isArrayLike(value);
|
|
}
|
|
|
|
module.exports = isArrayLikeObject;
|
|
|
|
|
|
/***/ }),
|
|
/* 124 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseIsArguments = __webpack_require__(561),
|
|
isObjectLike = __webpack_require__(47);
|
|
|
|
/** Used for built-in method references. */
|
|
var objectProto = Object.prototype;
|
|
|
|
/** Used to check objects for own properties. */
|
|
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
|
|
/** Built-in value references. */
|
|
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
|
|
|
/**
|
|
* Checks if `value` is likely an `arguments` object.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
|
* else `false`.
|
|
* @example
|
|
*
|
|
* _.isArguments(function() { return arguments; }());
|
|
* // => true
|
|
*
|
|
* _.isArguments([1, 2, 3]);
|
|
* // => false
|
|
*/
|
|
var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
|
|
return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
|
|
!propertyIsEnumerable.call(value, 'callee');
|
|
};
|
|
|
|
module.exports = isArguments;
|
|
|
|
|
|
/***/ }),
|
|
/* 125 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/** Used as references for various `Number` constants. */
|
|
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
|
|
/** Used to detect unsigned integer values. */
|
|
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
|
|
/**
|
|
* Checks if `value` is a valid array-like index.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to check.
|
|
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
|
|
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
|
*/
|
|
function isIndex(value, length) {
|
|
var type = typeof value;
|
|
length = length == null ? MAX_SAFE_INTEGER : length;
|
|
|
|
return !!length &&
|
|
(type == 'number' ||
|
|
(type != 'symbol' && reIsUint.test(value))) &&
|
|
(value > -1 && value % 1 == 0 && value < length);
|
|
}
|
|
|
|
module.exports = isIndex;
|
|
|
|
|
|
/***/ }),
|
|
/* 126 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var toFinite = __webpack_require__(255);
|
|
|
|
/**
|
|
* Converts `value` to an integer.
|
|
*
|
|
* **Note:** This method is loosely based on
|
|
* [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Lang
|
|
* @param {*} value The value to convert.
|
|
* @returns {number} Returns the converted integer.
|
|
* @example
|
|
*
|
|
* _.toInteger(3.2);
|
|
* // => 3
|
|
*
|
|
* _.toInteger(Number.MIN_VALUE);
|
|
* // => 0
|
|
*
|
|
* _.toInteger(Infinity);
|
|
* // => 1.7976931348623157e+308
|
|
*
|
|
* _.toInteger('3.2');
|
|
* // => 3
|
|
*/
|
|
function toInteger(value) {
|
|
var result = toFinite(value),
|
|
remainder = result % 1;
|
|
|
|
return result === result ? (remainder ? result - remainder : result) : 0;
|
|
}
|
|
|
|
module.exports = toInteger;
|
|
|
|
|
|
/***/ }),
|
|
/* 127 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var arrayWithoutHoles = __webpack_require__(603);
|
|
|
|
var iterableToArray = __webpack_require__(604);
|
|
|
|
var nonIterableSpread = __webpack_require__(605);
|
|
|
|
function _toConsumableArray(arr) {
|
|
return arrayWithoutHoles(arr) || iterableToArray(arr) || nonIterableSpread();
|
|
}
|
|
|
|
module.exports = _toConsumableArray;
|
|
|
|
/***/ }),
|
|
/* 128 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseGetTag = __webpack_require__(50),
|
|
isArray = __webpack_require__(26),
|
|
isObjectLike = __webpack_require__(47);
|
|
|
|
/** `Object#toString` result references. */
|
|
var stringTag = '[object String]';
|
|
|
|
/**
|
|
* Checks if `value` is classified as a `String` primitive or object.
|
|
*
|
|
* @static
|
|
* @since 0.1.0
|
|
* @memberOf _
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a string, else `false`.
|
|
* @example
|
|
*
|
|
* _.isString('abc');
|
|
* // => true
|
|
*
|
|
* _.isString(1);
|
|
* // => false
|
|
*/
|
|
function isString(value) {
|
|
return typeof value == 'string' ||
|
|
(!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
|
|
}
|
|
|
|
module.exports = isString;
|
|
|
|
|
|
/***/ }),
|
|
/* 129 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var createFind = __webpack_require__(542),
|
|
findIndex = __webpack_require__(183);
|
|
|
|
/**
|
|
* Iterates over elements of `collection`, returning the first element
|
|
* `predicate` returns truthy for. The predicate is invoked with three
|
|
* arguments: (value, index|key, collection).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Collection
|
|
* @param {Array|Object} collection The collection to inspect.
|
|
* @param {Function} [predicate=_.identity] The function invoked per iteration.
|
|
* @param {number} [fromIndex=0] The index to search from.
|
|
* @returns {*} Returns the matched element, else `undefined`.
|
|
* @example
|
|
*
|
|
* var users = [
|
|
* { 'user': 'barney', 'age': 36, 'active': true },
|
|
* { 'user': 'fred', 'age': 40, 'active': false },
|
|
* { 'user': 'pebbles', 'age': 1, 'active': true }
|
|
* ];
|
|
*
|
|
* _.find(users, function(o) { return o.age < 40; });
|
|
* // => object for 'barney'
|
|
*
|
|
* // The `_.matches` iteratee shorthand.
|
|
* _.find(users, { 'age': 1, 'active': true });
|
|
* // => object for 'pebbles'
|
|
*
|
|
* // The `_.matchesProperty` iteratee shorthand.
|
|
* _.find(users, ['active', false]);
|
|
* // => object for 'fred'
|
|
*
|
|
* // The `_.property` iteratee shorthand.
|
|
* _.find(users, 'active');
|
|
* // => object for 'barney'
|
|
*/
|
|
var find = createFind(findIndex);
|
|
|
|
module.exports = find;
|
|
|
|
|
|
/***/ }),
|
|
/* 130 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var arrayFilter = __webpack_require__(245),
|
|
baseFilter = __webpack_require__(595),
|
|
baseIteratee = __webpack_require__(73),
|
|
isArray = __webpack_require__(26);
|
|
|
|
/**
|
|
* Iterates over elements of `collection`, returning an array of all elements
|
|
* `predicate` returns truthy for. The predicate is invoked with three
|
|
* arguments: (value, index|key, collection).
|
|
*
|
|
* **Note:** Unlike `_.remove`, this method returns a new array.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Collection
|
|
* @param {Array|Object} collection The collection to iterate over.
|
|
* @param {Function} [predicate=_.identity] The function invoked per iteration.
|
|
* @returns {Array} Returns the new filtered array.
|
|
* @see _.reject
|
|
* @example
|
|
*
|
|
* var users = [
|
|
* { 'user': 'barney', 'age': 36, 'active': true },
|
|
* { 'user': 'fred', 'age': 40, 'active': false }
|
|
* ];
|
|
*
|
|
* _.filter(users, function(o) { return !o.active; });
|
|
* // => objects for ['fred']
|
|
*
|
|
* // The `_.matches` iteratee shorthand.
|
|
* _.filter(users, { 'age': 36, 'active': true });
|
|
* // => objects for ['barney']
|
|
*
|
|
* // The `_.matchesProperty` iteratee shorthand.
|
|
* _.filter(users, ['active', false]);
|
|
* // => objects for ['fred']
|
|
*
|
|
* // The `_.property` iteratee shorthand.
|
|
* _.filter(users, 'active');
|
|
* // => objects for ['barney']
|
|
*/
|
|
function filter(collection, predicate) {
|
|
var func = isArray(collection) ? arrayFilter : baseFilter;
|
|
return func(collection, baseIteratee(predicate, 3));
|
|
}
|
|
|
|
module.exports = filter;
|
|
|
|
|
|
/***/ }),
|
|
/* 131 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var deburrLetter = __webpack_require__(611),
|
|
toString = __webpack_require__(82);
|
|
|
|
/** Used to match Latin Unicode letters (excluding mathematical operators). */
|
|
var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
|
|
|
|
/** Used to compose unicode character classes. */
|
|
var rsComboMarksRange = '\\u0300-\\u036f',
|
|
reComboHalfMarksRange = '\\ufe20-\\ufe2f',
|
|
rsComboSymbolsRange = '\\u20d0-\\u20ff',
|
|
rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange;
|
|
|
|
/** Used to compose unicode capture groups. */
|
|
var rsCombo = '[' + rsComboRange + ']';
|
|
|
|
/**
|
|
* Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
|
|
* [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
|
|
*/
|
|
var reComboMark = RegExp(rsCombo, 'g');
|
|
|
|
/**
|
|
* Deburrs `string` by converting
|
|
* [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
|
|
* and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
|
|
* letters to basic Latin letters and removing
|
|
* [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.0.0
|
|
* @category String
|
|
* @param {string} [string=''] The string to deburr.
|
|
* @returns {string} Returns the deburred string.
|
|
* @example
|
|
*
|
|
* _.deburr('déjà vu');
|
|
* // => 'deja vu'
|
|
*/
|
|
function deburr(string) {
|
|
string = toString(string);
|
|
return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
|
|
}
|
|
|
|
module.exports = deburr;
|
|
|
|
|
|
/***/ }),
|
|
/* 132 */
|
|
/***/ (function(module, exports) {
|
|
|
|
function setCookie(name, value, days) {
|
|
var expires = "";
|
|
|
|
if (days) {
|
|
var date = new Date();
|
|
date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000);
|
|
expires = "; expires=" + date.toUTCString();
|
|
}
|
|
|
|
document.cookie = name + "=" + (value || "") + expires + "; path=/";
|
|
}
|
|
|
|
function getCookie(name) {
|
|
var nameEQ = name + "=";
|
|
var ca = document.cookie.split(';');
|
|
|
|
for (var i = 0; i < ca.length; i++) {
|
|
var c = ca[i];
|
|
|
|
while (c.charAt(0) == ' ') {
|
|
c = c.substring(1, c.length);
|
|
}
|
|
|
|
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
|
|
}
|
|
|
|
return null;
|
|
}
|
|
|
|
function eraseCookie(name) {
|
|
document.cookie = name + '=; Max-Age=-99999999;';
|
|
}
|
|
|
|
module.exports = {
|
|
setCookie: setCookie,
|
|
getCookie: getCookie,
|
|
eraseCookie: eraseCookie
|
|
};
|
|
|
|
/***/ }),
|
|
/* 133 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var isDate = __webpack_require__(262)
|
|
|
|
/**
|
|
* @category Common Helpers
|
|
* @summary Is the given date valid?
|
|
*
|
|
* @description
|
|
* Returns false if argument is Invalid Date and true otherwise.
|
|
* Invalid Date is a Date, whose time value is NaN.
|
|
*
|
|
* Time value of Date: http://es5.github.io/#x15.9.1.1
|
|
*
|
|
* @param {Date} date - the date to check
|
|
* @returns {Boolean} the date is valid
|
|
* @throws {TypeError} argument must be an instance of Date
|
|
*
|
|
* @example
|
|
* // For the valid date:
|
|
* var result = isValid(new Date(2014, 1, 31))
|
|
* //=> true
|
|
*
|
|
* @example
|
|
* // For the invalid date:
|
|
* var result = isValid(new Date(''))
|
|
* //=> false
|
|
*/
|
|
function isValid (dirtyDate) {
|
|
if (isDate(dirtyDate)) {
|
|
return !isNaN(dirtyDate)
|
|
} else {
|
|
throw new TypeError(toString.call(dirtyDate) + ' is not an instance of Date')
|
|
}
|
|
}
|
|
|
|
module.exports = isValid
|
|
|
|
|
|
/***/ }),
|
|
/* 134 */
|
|
/***/ (function(module, exports) {
|
|
|
|
//
|
|
|
|
module.exports = function shallowEqual(objA, objB, compare, compareContext) {
|
|
var ret = compare ? compare.call(compareContext, objA, objB) : void 0;
|
|
|
|
if (ret !== void 0) {
|
|
return !!ret;
|
|
}
|
|
|
|
if (objA === objB) {
|
|
return true;
|
|
}
|
|
|
|
if (typeof objA !== "object" || !objA || typeof objB !== "object" || !objB) {
|
|
return false;
|
|
}
|
|
|
|
var keysA = Object.keys(objA);
|
|
var keysB = Object.keys(objB);
|
|
|
|
if (keysA.length !== keysB.length) {
|
|
return false;
|
|
}
|
|
|
|
var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB);
|
|
|
|
// Test for A's keys different from B.
|
|
for (var idx = 0; idx < keysA.length; idx++) {
|
|
var key = keysA[idx];
|
|
|
|
if (!bHasOwnProperty(key)) {
|
|
return false;
|
|
}
|
|
|
|
var valueA = objA[key];
|
|
var valueB = objB[key];
|
|
|
|
ret = compare ? compare.call(compareContext, valueA, valueB, key) : void 0;
|
|
|
|
if (ret === false || (ret === void 0 && valueA !== valueB)) {
|
|
return false;
|
|
}
|
|
}
|
|
|
|
return true;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 135 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var startOfDay = __webpack_require__(97)
|
|
|
|
/**
|
|
* @category Day Helpers
|
|
* @summary Are the given dates in the same day?
|
|
*
|
|
* @description
|
|
* Are the given dates in the same day?
|
|
*
|
|
* @param {Date|String|Number} dateLeft - the first date to check
|
|
* @param {Date|String|Number} dateRight - the second date to check
|
|
* @returns {Boolean} the dates are in the same day
|
|
*
|
|
* @example
|
|
* // Are 4 September 06:00:00 and 4 September 18:00:00 in the same day?
|
|
* var result = isSameDay(
|
|
* new Date(2014, 8, 4, 6, 0),
|
|
* new Date(2014, 8, 4, 18, 0)
|
|
* )
|
|
* //=> true
|
|
*/
|
|
function isSameDay (dirtyDateLeft, dirtyDateRight) {
|
|
var dateLeftStartOfDay = startOfDay(dirtyDateLeft)
|
|
var dateRightStartOfDay = startOfDay(dirtyDateRight)
|
|
|
|
return dateLeftStartOfDay.getTime() === dateRightStartOfDay.getTime()
|
|
}
|
|
|
|
module.exports = isSameDay
|
|
|
|
|
|
/***/ }),
|
|
/* 136 */,
|
|
/* 137 */,
|
|
/* 138 */
|
|
/***/ (function(module, exports) {
|
|
|
|
var g;
|
|
|
|
// This works in non-strict mode
|
|
g = (function() {
|
|
return this;
|
|
})();
|
|
|
|
try {
|
|
// This works if eval is allowed (see CSP)
|
|
g = g || new Function("return this")();
|
|
} catch (e) {
|
|
// This works if the window reference is available
|
|
if (typeof window === "object") g = window;
|
|
}
|
|
|
|
// g can still be undefined, but nothing to do about it...
|
|
// We return undefined, instead of nothing here, so it's
|
|
// easier to handle this case. if(!global) { ...}
|
|
|
|
module.exports = g;
|
|
|
|
|
|
/***/ }),
|
|
/* 139 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var isObject = __webpack_require__(18);
|
|
var document = __webpack_require__(16).document;
|
|
// typeof document.createElement is 'object' in old IE
|
|
var is = isObject(document) && isObject(document.createElement);
|
|
module.exports = function (it) {
|
|
return is ? document.createElement(it) : {};
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 140 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var global = __webpack_require__(16);
|
|
var core = __webpack_require__(37);
|
|
var LIBRARY = __webpack_require__(55);
|
|
var wksExt = __webpack_require__(195);
|
|
var defineProperty = __webpack_require__(22).f;
|
|
module.exports = function (name) {
|
|
var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});
|
|
if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 141 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var shared = __webpack_require__(89)('keys');
|
|
var uid = __webpack_require__(62);
|
|
module.exports = function (key) {
|
|
return shared[key] || (shared[key] = uid(key));
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 142 */
|
|
/***/ (function(module, exports) {
|
|
|
|
// IE 8- don't enum bug keys
|
|
module.exports = (
|
|
'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'
|
|
).split(',');
|
|
|
|
|
|
/***/ }),
|
|
/* 143 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var document = __webpack_require__(16).document;
|
|
module.exports = document && document.documentElement;
|
|
|
|
|
|
/***/ }),
|
|
/* 144 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// Works with __proto__ only. Old v8 can't work with null proto objects.
|
|
/* eslint-disable no-proto */
|
|
var isObject = __webpack_require__(18);
|
|
var anObject = __webpack_require__(9);
|
|
var check = function (O, proto) {
|
|
anObject(O);
|
|
if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!");
|
|
};
|
|
module.exports = {
|
|
set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line
|
|
function (test, buggy, set) {
|
|
try {
|
|
set = __webpack_require__(38)(Function.call, __webpack_require__(35).f(Object.prototype, '__proto__').set, 2);
|
|
set(test, []);
|
|
buggy = !(test instanceof Array);
|
|
} catch (e) { buggy = true; }
|
|
return function setPrototypeOf(O, proto) {
|
|
check(O, proto);
|
|
if (buggy) O.__proto__ = proto;
|
|
else set(O, proto);
|
|
return O;
|
|
};
|
|
}({}, false) : undefined),
|
|
check: check
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 145 */
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' +
|
|
'\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
|
|
|
|
|
|
/***/ }),
|
|
/* 146 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var isObject = __webpack_require__(18);
|
|
var setPrototypeOf = __webpack_require__(144).set;
|
|
module.exports = function (that, target, C) {
|
|
var S = target.constructor;
|
|
var P;
|
|
if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) {
|
|
setPrototypeOf(that, P);
|
|
} return that;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 147 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var toInteger = __webpack_require__(40);
|
|
var defined = __webpack_require__(44);
|
|
|
|
module.exports = function repeat(count) {
|
|
var str = String(defined(this));
|
|
var res = '';
|
|
var n = toInteger(count);
|
|
if (n < 0 || n == Infinity) throw RangeError("Count can't be negative");
|
|
for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) res += str;
|
|
return res;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 148 */
|
|
/***/ (function(module, exports) {
|
|
|
|
// 20.2.2.28 Math.sign(x)
|
|
module.exports = Math.sign || function sign(x) {
|
|
// eslint-disable-next-line no-self-compare
|
|
return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 149 */
|
|
/***/ (function(module, exports) {
|
|
|
|
// 20.2.2.14 Math.expm1(x)
|
|
var $expm1 = Math.expm1;
|
|
module.exports = (!$expm1
|
|
// Old FF bug
|
|
|| $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168
|
|
// Tor Browser bug
|
|
|| $expm1(-2e-17) != -2e-17
|
|
) ? function expm1(x) {
|
|
return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1;
|
|
} : $expm1;
|
|
|
|
|
|
/***/ }),
|
|
/* 150 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var LIBRARY = __webpack_require__(55);
|
|
var $export = __webpack_require__(3);
|
|
var redefine = __webpack_require__(30);
|
|
var hide = __webpack_require__(29);
|
|
var Iterators = __webpack_require__(80);
|
|
var $iterCreate = __webpack_require__(151);
|
|
var setToStringTag = __webpack_require__(77);
|
|
var getPrototypeOf = __webpack_require__(36);
|
|
var ITERATOR = __webpack_require__(19)('iterator');
|
|
var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`
|
|
var FF_ITERATOR = '@@iterator';
|
|
var KEYS = 'keys';
|
|
var VALUES = 'values';
|
|
|
|
var returnThis = function () { return this; };
|
|
|
|
module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
|
|
$iterCreate(Constructor, NAME, next);
|
|
var getMethod = function (kind) {
|
|
if (!BUGGY && kind in proto) return proto[kind];
|
|
switch (kind) {
|
|
case KEYS: return function keys() { return new Constructor(this, kind); };
|
|
case VALUES: return function values() { return new Constructor(this, kind); };
|
|
} return function entries() { return new Constructor(this, kind); };
|
|
};
|
|
var TAG = NAME + ' Iterator';
|
|
var DEF_VALUES = DEFAULT == VALUES;
|
|
var VALUES_BUG = false;
|
|
var proto = Base.prototype;
|
|
var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];
|
|
var $default = $native || getMethod(DEFAULT);
|
|
var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;
|
|
var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;
|
|
var methods, key, IteratorPrototype;
|
|
// Fix native
|
|
if ($anyNative) {
|
|
IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));
|
|
if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {
|
|
// Set @@toStringTag to native iterators
|
|
setToStringTag(IteratorPrototype, TAG, true);
|
|
// fix for some old engines
|
|
if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);
|
|
}
|
|
}
|
|
// fix Array#{values, @@iterator}.name in V8 / FF
|
|
if (DEF_VALUES && $native && $native.name !== VALUES) {
|
|
VALUES_BUG = true;
|
|
$default = function values() { return $native.call(this); };
|
|
}
|
|
// Define iterator
|
|
if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {
|
|
hide(proto, ITERATOR, $default);
|
|
}
|
|
// Plug for library
|
|
Iterators[NAME] = $default;
|
|
Iterators[TAG] = returnThis;
|
|
if (DEFAULT) {
|
|
methods = {
|
|
values: DEF_VALUES ? $default : getMethod(VALUES),
|
|
keys: IS_SET ? $default : getMethod(KEYS),
|
|
entries: $entries
|
|
};
|
|
if (FORCED) for (key in methods) {
|
|
if (!(key in proto)) redefine(proto, key, methods[key]);
|
|
} else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);
|
|
}
|
|
return methods;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 151 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var create = __webpack_require__(65);
|
|
var descriptor = __webpack_require__(61);
|
|
var setToStringTag = __webpack_require__(77);
|
|
var IteratorPrototype = {};
|
|
|
|
// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
|
|
__webpack_require__(29)(IteratorPrototype, __webpack_require__(19)('iterator'), function () { return this; });
|
|
|
|
module.exports = function (Constructor, NAME, next) {
|
|
Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });
|
|
setToStringTag(Constructor, NAME + ' Iterator');
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 152 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// helper for String#{startsWith, endsWith, includes}
|
|
var isRegExp = __webpack_require__(103);
|
|
var defined = __webpack_require__(44);
|
|
|
|
module.exports = function (that, searchString, NAME) {
|
|
if (isRegExp(searchString)) throw TypeError('String#' + NAME + " doesn't accept regex!");
|
|
return String(defined(that));
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 153 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var MATCH = __webpack_require__(19)('match');
|
|
module.exports = function (KEY) {
|
|
var re = /./;
|
|
try {
|
|
'/./'[KEY](re);
|
|
} catch (e) {
|
|
try {
|
|
re[MATCH] = false;
|
|
return !'/./'[KEY](re);
|
|
} catch (f) { /* empty */ }
|
|
} return true;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 154 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// check on default Array iterator
|
|
var Iterators = __webpack_require__(80);
|
|
var ITERATOR = __webpack_require__(19)('iterator');
|
|
var ArrayProto = Array.prototype;
|
|
|
|
module.exports = function (it) {
|
|
return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 155 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var $defineProperty = __webpack_require__(22);
|
|
var createDesc = __webpack_require__(61);
|
|
|
|
module.exports = function (object, index, value) {
|
|
if (index in object) $defineProperty.f(object, index, createDesc(0, value));
|
|
else object[index] = value;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 156 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var classof = __webpack_require__(78);
|
|
var ITERATOR = __webpack_require__(19)('iterator');
|
|
var Iterators = __webpack_require__(80);
|
|
module.exports = __webpack_require__(37).getIteratorMethod = function (it) {
|
|
if (it != undefined) return it[ITERATOR]
|
|
|| it['@@iterator']
|
|
|| Iterators[classof(it)];
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 157 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 9.4.2.3 ArraySpeciesCreate(originalArray, length)
|
|
var speciesConstructor = __webpack_require__(389);
|
|
|
|
module.exports = function (original, length) {
|
|
return new (speciesConstructor(original))(length);
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 158 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)
|
|
|
|
var toObject = __webpack_require__(23);
|
|
var toAbsoluteIndex = __webpack_require__(64);
|
|
var toLength = __webpack_require__(20);
|
|
module.exports = function fill(value /* , start = 0, end = @length */) {
|
|
var O = toObject(this);
|
|
var length = toLength(O.length);
|
|
var aLen = arguments.length;
|
|
var index = toAbsoluteIndex(aLen > 1 ? arguments[1] : undefined, length);
|
|
var end = aLen > 2 ? arguments[2] : undefined;
|
|
var endPos = end === undefined ? length : toAbsoluteIndex(end, length);
|
|
while (endPos > index) O[index++] = value;
|
|
return O;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 159 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var addToUnscopables = __webpack_require__(57);
|
|
var step = __webpack_require__(212);
|
|
var Iterators = __webpack_require__(80);
|
|
var toIObject = __webpack_require__(34);
|
|
|
|
// 22.1.3.4 Array.prototype.entries()
|
|
// 22.1.3.13 Array.prototype.keys()
|
|
// 22.1.3.29 Array.prototype.values()
|
|
// 22.1.3.30 Array.prototype[@@iterator]()
|
|
module.exports = __webpack_require__(150)(Array, 'Array', function (iterated, kind) {
|
|
this._t = toIObject(iterated); // target
|
|
this._i = 0; // next index
|
|
this._k = kind; // kind
|
|
// 22.1.5.2.1 %ArrayIteratorPrototype%.next()
|
|
}, function () {
|
|
var O = this._t;
|
|
var kind = this._k;
|
|
var index = this._i++;
|
|
if (!O || index >= O.length) {
|
|
this._t = undefined;
|
|
return step(1);
|
|
}
|
|
if (kind == 'keys') return step(0, index);
|
|
if (kind == 'values') return step(0, O[index]);
|
|
return step(0, [index, O[index]]);
|
|
}, 'values');
|
|
|
|
// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
|
|
Iterators.Arguments = Iterators.Array;
|
|
|
|
addToUnscopables('keys');
|
|
addToUnscopables('values');
|
|
addToUnscopables('entries');
|
|
|
|
|
|
/***/ }),
|
|
/* 160 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
var regexpFlags = __webpack_require__(92);
|
|
|
|
var nativeExec = RegExp.prototype.exec;
|
|
// This always refers to the native implementation, because the
|
|
// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
|
|
// which loads this file before patching the method.
|
|
var nativeReplace = String.prototype.replace;
|
|
|
|
var patchedExec = nativeExec;
|
|
|
|
var LAST_INDEX = 'lastIndex';
|
|
|
|
var UPDATES_LAST_INDEX_WRONG = (function () {
|
|
var re1 = /a/,
|
|
re2 = /b*/g;
|
|
nativeExec.call(re1, 'a');
|
|
nativeExec.call(re2, 'a');
|
|
return re1[LAST_INDEX] !== 0 || re2[LAST_INDEX] !== 0;
|
|
})();
|
|
|
|
// nonparticipating capturing group, copied from es5-shim's String#split patch.
|
|
var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
|
|
|
|
var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED;
|
|
|
|
if (PATCH) {
|
|
patchedExec = function exec(str) {
|
|
var re = this;
|
|
var lastIndex, reCopy, match, i;
|
|
|
|
if (NPCG_INCLUDED) {
|
|
reCopy = new RegExp('^' + re.source + '$(?!\\s)', regexpFlags.call(re));
|
|
}
|
|
if (UPDATES_LAST_INDEX_WRONG) lastIndex = re[LAST_INDEX];
|
|
|
|
match = nativeExec.call(re, str);
|
|
|
|
if (UPDATES_LAST_INDEX_WRONG && match) {
|
|
re[LAST_INDEX] = re.global ? match.index + match[0].length : lastIndex;
|
|
}
|
|
if (NPCG_INCLUDED && match && match.length > 1) {
|
|
// Fix browsers whose `exec` methods don't consistently return `undefined`
|
|
// for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
|
|
// eslint-disable-next-line no-loop-func
|
|
nativeReplace.call(match[0], reCopy, function () {
|
|
for (i = 1; i < arguments.length - 2; i++) {
|
|
if (arguments[i] === undefined) match[i] = undefined;
|
|
}
|
|
});
|
|
}
|
|
|
|
return match;
|
|
};
|
|
}
|
|
|
|
module.exports = patchedExec;
|
|
|
|
|
|
/***/ }),
|
|
/* 161 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var at = __webpack_require__(102)(true);
|
|
|
|
// `AdvanceStringIndex` abstract operation
|
|
// https://tc39.github.io/ecma262/#sec-advancestringindex
|
|
module.exports = function (S, index, unicode) {
|
|
return index + (unicode ? at(S, index).length : 1);
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 162 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var ctx = __webpack_require__(38);
|
|
var invoke = __webpack_require__(202);
|
|
var html = __webpack_require__(143);
|
|
var cel = __webpack_require__(139);
|
|
var global = __webpack_require__(16);
|
|
var process = global.process;
|
|
var setTask = global.setImmediate;
|
|
var clearTask = global.clearImmediate;
|
|
var MessageChannel = global.MessageChannel;
|
|
var Dispatch = global.Dispatch;
|
|
var counter = 0;
|
|
var queue = {};
|
|
var ONREADYSTATECHANGE = 'onreadystatechange';
|
|
var defer, channel, port;
|
|
var run = function () {
|
|
var id = +this;
|
|
// eslint-disable-next-line no-prototype-builtins
|
|
if (queue.hasOwnProperty(id)) {
|
|
var fn = queue[id];
|
|
delete queue[id];
|
|
fn();
|
|
}
|
|
};
|
|
var listener = function (event) {
|
|
run.call(event.data);
|
|
};
|
|
// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
|
|
if (!setTask || !clearTask) {
|
|
setTask = function setImmediate(fn) {
|
|
var args = [];
|
|
var i = 1;
|
|
while (arguments.length > i) args.push(arguments[i++]);
|
|
queue[++counter] = function () {
|
|
// eslint-disable-next-line no-new-func
|
|
invoke(typeof fn == 'function' ? fn : Function(fn), args);
|
|
};
|
|
defer(counter);
|
|
return counter;
|
|
};
|
|
clearTask = function clearImmediate(id) {
|
|
delete queue[id];
|
|
};
|
|
// Node.js 0.8-
|
|
if (__webpack_require__(39)(process) == 'process') {
|
|
defer = function (id) {
|
|
process.nextTick(ctx(run, id, 1));
|
|
};
|
|
// Sphere (JS game engine) Dispatch API
|
|
} else if (Dispatch && Dispatch.now) {
|
|
defer = function (id) {
|
|
Dispatch.now(ctx(run, id, 1));
|
|
};
|
|
// Browsers with MessageChannel, includes WebWorkers
|
|
} else if (MessageChannel) {
|
|
channel = new MessageChannel();
|
|
port = channel.port2;
|
|
channel.port1.onmessage = listener;
|
|
defer = ctx(port.postMessage, port, 1);
|
|
// Browsers with postMessage, skip WebWorkers
|
|
// IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
|
|
} else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) {
|
|
defer = function (id) {
|
|
global.postMessage(id + '', '*');
|
|
};
|
|
global.addEventListener('message', listener, false);
|
|
// IE8-
|
|
} else if (ONREADYSTATECHANGE in cel('script')) {
|
|
defer = function (id) {
|
|
html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () {
|
|
html.removeChild(this);
|
|
run.call(id);
|
|
};
|
|
};
|
|
// Rest old browsers
|
|
} else {
|
|
defer = function (id) {
|
|
setTimeout(ctx(run, id, 1), 0);
|
|
};
|
|
}
|
|
}
|
|
module.exports = {
|
|
set: setTask,
|
|
clear: clearTask
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 163 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var global = __webpack_require__(16);
|
|
var macrotask = __webpack_require__(162).set;
|
|
var Observer = global.MutationObserver || global.WebKitMutationObserver;
|
|
var process = global.process;
|
|
var Promise = global.Promise;
|
|
var isNode = __webpack_require__(39)(process) == 'process';
|
|
|
|
module.exports = function () {
|
|
var head, last, notify;
|
|
|
|
var flush = function () {
|
|
var parent, fn;
|
|
if (isNode && (parent = process.domain)) parent.exit();
|
|
while (head) {
|
|
fn = head.fn;
|
|
head = head.next;
|
|
try {
|
|
fn();
|
|
} catch (e) {
|
|
if (head) notify();
|
|
else last = undefined;
|
|
throw e;
|
|
}
|
|
} last = undefined;
|
|
if (parent) parent.enter();
|
|
};
|
|
|
|
// Node.js
|
|
if (isNode) {
|
|
notify = function () {
|
|
process.nextTick(flush);
|
|
};
|
|
// browsers with MutationObserver, except iOS Safari - https://github.com/zloirock/core-js/issues/339
|
|
} else if (Observer && !(global.navigator && global.navigator.standalone)) {
|
|
var toggle = true;
|
|
var node = document.createTextNode('');
|
|
new Observer(flush).observe(node, { characterData: true }); // eslint-disable-line no-new
|
|
notify = function () {
|
|
node.data = toggle = !toggle;
|
|
};
|
|
// environments with maybe non-completely correct, but existent Promise
|
|
} else if (Promise && Promise.resolve) {
|
|
// Promise.resolve without an argument throws an error in LG WebOS 2
|
|
var promise = Promise.resolve(undefined);
|
|
notify = function () {
|
|
promise.then(flush);
|
|
};
|
|
// for other environments - macrotask based on:
|
|
// - setImmediate
|
|
// - MessageChannel
|
|
// - window.postMessag
|
|
// - onreadystatechange
|
|
// - setTimeout
|
|
} else {
|
|
notify = function () {
|
|
// strange IE + webpack dev server bug - use .call(global)
|
|
macrotask.call(global, flush);
|
|
};
|
|
}
|
|
|
|
return function (fn) {
|
|
var task = { fn: fn, next: undefined };
|
|
if (last) last.next = task;
|
|
if (!head) {
|
|
head = task;
|
|
notify();
|
|
} last = task;
|
|
};
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 164 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
// 25.4.1.5 NewPromiseCapability(C)
|
|
var aFunction = __webpack_require__(27);
|
|
|
|
function PromiseCapability(C) {
|
|
var resolve, reject;
|
|
this.promise = new C(function ($$resolve, $$reject) {
|
|
if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
|
|
resolve = $$resolve;
|
|
reject = $$reject;
|
|
});
|
|
this.resolve = aFunction(resolve);
|
|
this.reject = aFunction(reject);
|
|
}
|
|
|
|
module.exports.f = function (C) {
|
|
return new PromiseCapability(C);
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 165 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var global = __webpack_require__(16);
|
|
var DESCRIPTORS = __webpack_require__(21);
|
|
var LIBRARY = __webpack_require__(55);
|
|
var $typed = __webpack_require__(109);
|
|
var hide = __webpack_require__(29);
|
|
var redefineAll = __webpack_require__(70);
|
|
var fails = __webpack_require__(17);
|
|
var anInstance = __webpack_require__(68);
|
|
var toInteger = __webpack_require__(40);
|
|
var toLength = __webpack_require__(20);
|
|
var toIndex = __webpack_require__(222);
|
|
var gOPN = __webpack_require__(66).f;
|
|
var dP = __webpack_require__(22).f;
|
|
var arrayFill = __webpack_require__(158);
|
|
var setToStringTag = __webpack_require__(77);
|
|
var ARRAY_BUFFER = 'ArrayBuffer';
|
|
var DATA_VIEW = 'DataView';
|
|
var PROTOTYPE = 'prototype';
|
|
var WRONG_LENGTH = 'Wrong length!';
|
|
var WRONG_INDEX = 'Wrong index!';
|
|
var $ArrayBuffer = global[ARRAY_BUFFER];
|
|
var $DataView = global[DATA_VIEW];
|
|
var Math = global.Math;
|
|
var RangeError = global.RangeError;
|
|
// eslint-disable-next-line no-shadow-restricted-names
|
|
var Infinity = global.Infinity;
|
|
var BaseBuffer = $ArrayBuffer;
|
|
var abs = Math.abs;
|
|
var pow = Math.pow;
|
|
var floor = Math.floor;
|
|
var log = Math.log;
|
|
var LN2 = Math.LN2;
|
|
var BUFFER = 'buffer';
|
|
var BYTE_LENGTH = 'byteLength';
|
|
var BYTE_OFFSET = 'byteOffset';
|
|
var $BUFFER = DESCRIPTORS ? '_b' : BUFFER;
|
|
var $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH;
|
|
var $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET;
|
|
|
|
// IEEE754 conversions based on https://github.com/feross/ieee754
|
|
function packIEEE754(value, mLen, nBytes) {
|
|
var buffer = new Array(nBytes);
|
|
var eLen = nBytes * 8 - mLen - 1;
|
|
var eMax = (1 << eLen) - 1;
|
|
var eBias = eMax >> 1;
|
|
var rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0;
|
|
var i = 0;
|
|
var s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0;
|
|
var e, m, c;
|
|
value = abs(value);
|
|
// eslint-disable-next-line no-self-compare
|
|
if (value != value || value === Infinity) {
|
|
// eslint-disable-next-line no-self-compare
|
|
m = value != value ? 1 : 0;
|
|
e = eMax;
|
|
} else {
|
|
e = floor(log(value) / LN2);
|
|
if (value * (c = pow(2, -e)) < 1) {
|
|
e--;
|
|
c *= 2;
|
|
}
|
|
if (e + eBias >= 1) {
|
|
value += rt / c;
|
|
} else {
|
|
value += rt * pow(2, 1 - eBias);
|
|
}
|
|
if (value * c >= 2) {
|
|
e++;
|
|
c /= 2;
|
|
}
|
|
if (e + eBias >= eMax) {
|
|
m = 0;
|
|
e = eMax;
|
|
} else if (e + eBias >= 1) {
|
|
m = (value * c - 1) * pow(2, mLen);
|
|
e = e + eBias;
|
|
} else {
|
|
m = value * pow(2, eBias - 1) * pow(2, mLen);
|
|
e = 0;
|
|
}
|
|
}
|
|
for (; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8);
|
|
e = e << mLen | m;
|
|
eLen += mLen;
|
|
for (; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8);
|
|
buffer[--i] |= s * 128;
|
|
return buffer;
|
|
}
|
|
function unpackIEEE754(buffer, mLen, nBytes) {
|
|
var eLen = nBytes * 8 - mLen - 1;
|
|
var eMax = (1 << eLen) - 1;
|
|
var eBias = eMax >> 1;
|
|
var nBits = eLen - 7;
|
|
var i = nBytes - 1;
|
|
var s = buffer[i--];
|
|
var e = s & 127;
|
|
var m;
|
|
s >>= 7;
|
|
for (; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8);
|
|
m = e & (1 << -nBits) - 1;
|
|
e >>= -nBits;
|
|
nBits += mLen;
|
|
for (; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8);
|
|
if (e === 0) {
|
|
e = 1 - eBias;
|
|
} else if (e === eMax) {
|
|
return m ? NaN : s ? -Infinity : Infinity;
|
|
} else {
|
|
m = m + pow(2, mLen);
|
|
e = e - eBias;
|
|
} return (s ? -1 : 1) * m * pow(2, e - mLen);
|
|
}
|
|
|
|
function unpackI32(bytes) {
|
|
return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0];
|
|
}
|
|
function packI8(it) {
|
|
return [it & 0xff];
|
|
}
|
|
function packI16(it) {
|
|
return [it & 0xff, it >> 8 & 0xff];
|
|
}
|
|
function packI32(it) {
|
|
return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff];
|
|
}
|
|
function packF64(it) {
|
|
return packIEEE754(it, 52, 8);
|
|
}
|
|
function packF32(it) {
|
|
return packIEEE754(it, 23, 4);
|
|
}
|
|
|
|
function addGetter(C, key, internal) {
|
|
dP(C[PROTOTYPE], key, { get: function () { return this[internal]; } });
|
|
}
|
|
|
|
function get(view, bytes, index, isLittleEndian) {
|
|
var numIndex = +index;
|
|
var intIndex = toIndex(numIndex);
|
|
if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX);
|
|
var store = view[$BUFFER]._b;
|
|
var start = intIndex + view[$OFFSET];
|
|
var pack = store.slice(start, start + bytes);
|
|
return isLittleEndian ? pack : pack.reverse();
|
|
}
|
|
function set(view, bytes, index, conversion, value, isLittleEndian) {
|
|
var numIndex = +index;
|
|
var intIndex = toIndex(numIndex);
|
|
if (intIndex + bytes > view[$LENGTH]) throw RangeError(WRONG_INDEX);
|
|
var store = view[$BUFFER]._b;
|
|
var start = intIndex + view[$OFFSET];
|
|
var pack = conversion(+value);
|
|
for (var i = 0; i < bytes; i++) store[start + i] = pack[isLittleEndian ? i : bytes - i - 1];
|
|
}
|
|
|
|
if (!$typed.ABV) {
|
|
$ArrayBuffer = function ArrayBuffer(length) {
|
|
anInstance(this, $ArrayBuffer, ARRAY_BUFFER);
|
|
var byteLength = toIndex(length);
|
|
this._b = arrayFill.call(new Array(byteLength), 0);
|
|
this[$LENGTH] = byteLength;
|
|
};
|
|
|
|
$DataView = function DataView(buffer, byteOffset, byteLength) {
|
|
anInstance(this, $DataView, DATA_VIEW);
|
|
anInstance(buffer, $ArrayBuffer, DATA_VIEW);
|
|
var bufferLength = buffer[$LENGTH];
|
|
var offset = toInteger(byteOffset);
|
|
if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset!');
|
|
byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength);
|
|
if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH);
|
|
this[$BUFFER] = buffer;
|
|
this[$OFFSET] = offset;
|
|
this[$LENGTH] = byteLength;
|
|
};
|
|
|
|
if (DESCRIPTORS) {
|
|
addGetter($ArrayBuffer, BYTE_LENGTH, '_l');
|
|
addGetter($DataView, BUFFER, '_b');
|
|
addGetter($DataView, BYTE_LENGTH, '_l');
|
|
addGetter($DataView, BYTE_OFFSET, '_o');
|
|
}
|
|
|
|
redefineAll($DataView[PROTOTYPE], {
|
|
getInt8: function getInt8(byteOffset) {
|
|
return get(this, 1, byteOffset)[0] << 24 >> 24;
|
|
},
|
|
getUint8: function getUint8(byteOffset) {
|
|
return get(this, 1, byteOffset)[0];
|
|
},
|
|
getInt16: function getInt16(byteOffset /* , littleEndian */) {
|
|
var bytes = get(this, 2, byteOffset, arguments[1]);
|
|
return (bytes[1] << 8 | bytes[0]) << 16 >> 16;
|
|
},
|
|
getUint16: function getUint16(byteOffset /* , littleEndian */) {
|
|
var bytes = get(this, 2, byteOffset, arguments[1]);
|
|
return bytes[1] << 8 | bytes[0];
|
|
},
|
|
getInt32: function getInt32(byteOffset /* , littleEndian */) {
|
|
return unpackI32(get(this, 4, byteOffset, arguments[1]));
|
|
},
|
|
getUint32: function getUint32(byteOffset /* , littleEndian */) {
|
|
return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0;
|
|
},
|
|
getFloat32: function getFloat32(byteOffset /* , littleEndian */) {
|
|
return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4);
|
|
},
|
|
getFloat64: function getFloat64(byteOffset /* , littleEndian */) {
|
|
return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8);
|
|
},
|
|
setInt8: function setInt8(byteOffset, value) {
|
|
set(this, 1, byteOffset, packI8, value);
|
|
},
|
|
setUint8: function setUint8(byteOffset, value) {
|
|
set(this, 1, byteOffset, packI8, value);
|
|
},
|
|
setInt16: function setInt16(byteOffset, value /* , littleEndian */) {
|
|
set(this, 2, byteOffset, packI16, value, arguments[2]);
|
|
},
|
|
setUint16: function setUint16(byteOffset, value /* , littleEndian */) {
|
|
set(this, 2, byteOffset, packI16, value, arguments[2]);
|
|
},
|
|
setInt32: function setInt32(byteOffset, value /* , littleEndian */) {
|
|
set(this, 4, byteOffset, packI32, value, arguments[2]);
|
|
},
|
|
setUint32: function setUint32(byteOffset, value /* , littleEndian */) {
|
|
set(this, 4, byteOffset, packI32, value, arguments[2]);
|
|
},
|
|
setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) {
|
|
set(this, 4, byteOffset, packF32, value, arguments[2]);
|
|
},
|
|
setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) {
|
|
set(this, 8, byteOffset, packF64, value, arguments[2]);
|
|
}
|
|
});
|
|
} else {
|
|
if (!fails(function () {
|
|
$ArrayBuffer(1);
|
|
}) || !fails(function () {
|
|
new $ArrayBuffer(-1); // eslint-disable-line no-new
|
|
}) || fails(function () {
|
|
new $ArrayBuffer(); // eslint-disable-line no-new
|
|
new $ArrayBuffer(1.5); // eslint-disable-line no-new
|
|
new $ArrayBuffer(NaN); // eslint-disable-line no-new
|
|
return $ArrayBuffer.name != ARRAY_BUFFER;
|
|
})) {
|
|
$ArrayBuffer = function ArrayBuffer(length) {
|
|
anInstance(this, $ArrayBuffer);
|
|
return new BaseBuffer(toIndex(length));
|
|
};
|
|
var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE];
|
|
for (var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j;) {
|
|
if (!((key = keys[j++]) in $ArrayBuffer)) hide($ArrayBuffer, key, BaseBuffer[key]);
|
|
}
|
|
if (!LIBRARY) ArrayBufferProto.constructor = $ArrayBuffer;
|
|
}
|
|
// iOS Safari 7.x bug
|
|
var view = new $DataView(new $ArrayBuffer(2));
|
|
var $setInt8 = $DataView[PROTOTYPE].setInt8;
|
|
view.setInt8(0, 2147483648);
|
|
view.setInt8(1, 2147483649);
|
|
if (view.getInt8(0) || !view.getInt8(1)) redefineAll($DataView[PROTOTYPE], {
|
|
setInt8: function setInt8(byteOffset, value) {
|
|
$setInt8.call(this, byteOffset, value << 24 >> 24);
|
|
},
|
|
setUint8: function setUint8(byteOffset, value) {
|
|
$setInt8.call(this, byteOffset, value << 24 >> 24);
|
|
}
|
|
}, true);
|
|
}
|
|
setToStringTag($ArrayBuffer, ARRAY_BUFFER);
|
|
setToStringTag($DataView, DATA_VIEW);
|
|
hide($DataView[PROTOTYPE], $typed.VIEW, true);
|
|
exports[ARRAY_BUFFER] = $ArrayBuffer;
|
|
exports[DATA_VIEW] = $DataView;
|
|
|
|
|
|
/***/ }),
|
|
/* 166 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var isArray = __webpack_require__(26),
|
|
isSymbol = __webpack_require__(113);
|
|
|
|
/** Used to match property names within property paths. */
|
|
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
|
reIsPlainProp = /^\w*$/;
|
|
|
|
/**
|
|
* Checks if `value` is a property name and not a property path.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to check.
|
|
* @param {Object} [object] The object to query keys on.
|
|
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
|
|
*/
|
|
function isKey(value, object) {
|
|
if (isArray(value)) {
|
|
return false;
|
|
}
|
|
var type = typeof value;
|
|
if (type == 'number' || type == 'symbol' || type == 'boolean' ||
|
|
value == null || isSymbol(value)) {
|
|
return true;
|
|
}
|
|
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
|
|
(object != null && value in Object(object));
|
|
}
|
|
|
|
module.exports = isKey;
|
|
|
|
|
|
/***/ }),
|
|
/* 167 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var mapCacheClear = __webpack_require__(510),
|
|
mapCacheDelete = __webpack_require__(526),
|
|
mapCacheGet = __webpack_require__(528),
|
|
mapCacheHas = __webpack_require__(529),
|
|
mapCacheSet = __webpack_require__(530);
|
|
|
|
/**
|
|
* Creates a map cache object to store key-value pairs.
|
|
*
|
|
* @private
|
|
* @constructor
|
|
* @param {Array} [entries] The key-value pairs to cache.
|
|
*/
|
|
function MapCache(entries) {
|
|
var index = -1,
|
|
length = entries == null ? 0 : entries.length;
|
|
|
|
this.clear();
|
|
while (++index < length) {
|
|
var entry = entries[index];
|
|
this.set(entry[0], entry[1]);
|
|
}
|
|
}
|
|
|
|
// Add methods to `MapCache`.
|
|
MapCache.prototype.clear = mapCacheClear;
|
|
MapCache.prototype['delete'] = mapCacheDelete;
|
|
MapCache.prototype.get = mapCacheGet;
|
|
MapCache.prototype.has = mapCacheHas;
|
|
MapCache.prototype.set = mapCacheSet;
|
|
|
|
module.exports = MapCache;
|
|
|
|
|
|
/***/ }),
|
|
/* 168 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var getNative = __webpack_require__(72),
|
|
root = __webpack_require__(51);
|
|
|
|
/* Built-in method references that are verified to be native. */
|
|
var Map = getNative(root, 'Map');
|
|
|
|
module.exports = Map;
|
|
|
|
|
|
/***/ }),
|
|
/* 169 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* The base implementation of `_.slice` without an iteratee call guard.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to slice.
|
|
* @param {number} [start=0] The start position.
|
|
* @param {number} [end=array.length] The end position.
|
|
* @returns {Array} Returns the slice of `array`.
|
|
*/
|
|
function baseSlice(array, start, end) {
|
|
var index = -1,
|
|
length = array.length;
|
|
|
|
if (start < 0) {
|
|
start = -start > length ? 0 : (length + start);
|
|
}
|
|
end = end > length ? length : end;
|
|
if (end < 0) {
|
|
end += length;
|
|
}
|
|
length = start > end ? 0 : ((end - start) >>> 0);
|
|
start >>>= 0;
|
|
|
|
var result = Array(length);
|
|
while (++index < length) {
|
|
result[index] = array[index + start];
|
|
}
|
|
return result;
|
|
}
|
|
|
|
module.exports = baseSlice;
|
|
|
|
|
|
/***/ }),
|
|
/* 170 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseIndexOf = __webpack_require__(239);
|
|
|
|
/**
|
|
* A specialized version of `_.includes` for arrays without support for
|
|
* specifying an index to search from.
|
|
*
|
|
* @private
|
|
* @param {Array} [array] The array to inspect.
|
|
* @param {*} target The value to search for.
|
|
* @returns {boolean} Returns `true` if `target` is found, else `false`.
|
|
*/
|
|
function arrayIncludes(array, value) {
|
|
var length = array == null ? 0 : array.length;
|
|
return !!length && baseIndexOf(array, value, 0) > -1;
|
|
}
|
|
|
|
module.exports = arrayIncludes;
|
|
|
|
|
|
/***/ }),
|
|
/* 171 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* This function is like `arrayIncludes` except that it accepts a comparator.
|
|
*
|
|
* @private
|
|
* @param {Array} [array] The array to inspect.
|
|
* @param {*} target The value to search for.
|
|
* @param {Function} comparator The comparator invoked per element.
|
|
* @returns {boolean} Returns `true` if `target` is found, else `false`.
|
|
*/
|
|
function arrayIncludesWith(array, value, comparator) {
|
|
var index = -1,
|
|
length = array == null ? 0 : array.length;
|
|
|
|
while (++index < length) {
|
|
if (comparator(value, array[index])) {
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
module.exports = arrayIncludesWith;
|
|
|
|
|
|
/***/ }),
|
|
/* 172 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* The base implementation of `_.unary` without support for storing metadata.
|
|
*
|
|
* @private
|
|
* @param {Function} func The function to cap arguments for.
|
|
* @returns {Function} Returns the new capped function.
|
|
*/
|
|
function baseUnary(func) {
|
|
return function(value) {
|
|
return func(value);
|
|
};
|
|
}
|
|
|
|
module.exports = baseUnary;
|
|
|
|
|
|
/***/ }),
|
|
/* 173 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/** Used as references for various `Number` constants. */
|
|
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
|
|
/**
|
|
* Checks if `value` is a valid array-like length.
|
|
*
|
|
* **Note:** This method is loosely based on
|
|
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
|
* @example
|
|
*
|
|
* _.isLength(3);
|
|
* // => true
|
|
*
|
|
* _.isLength(Number.MIN_VALUE);
|
|
* // => false
|
|
*
|
|
* _.isLength(Infinity);
|
|
* // => false
|
|
*
|
|
* _.isLength('3');
|
|
* // => false
|
|
*/
|
|
function isLength(value) {
|
|
return typeof value == 'number' &&
|
|
value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
}
|
|
|
|
module.exports = isLength;
|
|
|
|
|
|
/***/ }),
|
|
/* 174 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseIsEqualDeep = __webpack_require__(550),
|
|
isObjectLike = __webpack_require__(47);
|
|
|
|
/**
|
|
* The base implementation of `_.isEqual` which supports partial comparisons
|
|
* and tracks traversed objects.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to compare.
|
|
* @param {*} other The other value to compare.
|
|
* @param {boolean} bitmask The bitmask flags.
|
|
* 1 - Unordered comparison
|
|
* 2 - Partial comparison
|
|
* @param {Function} [customizer] The function to customize comparisons.
|
|
* @param {Object} [stack] Tracks traversed `value` and `other` objects.
|
|
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
*/
|
|
function baseIsEqual(value, other, bitmask, customizer, stack) {
|
|
if (value === other) {
|
|
return true;
|
|
}
|
|
if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
|
|
return value !== value && other !== other;
|
|
}
|
|
return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
|
|
}
|
|
|
|
module.exports = baseIsEqual;
|
|
|
|
|
|
/***/ }),
|
|
/* 175 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* Converts `set` to an array of its values.
|
|
*
|
|
* @private
|
|
* @param {Object} set The set to convert.
|
|
* @returns {Array} Returns the values.
|
|
*/
|
|
function setToArray(set) {
|
|
var index = -1,
|
|
result = Array(set.size);
|
|
|
|
set.forEach(function(value) {
|
|
result[++index] = value;
|
|
});
|
|
return result;
|
|
}
|
|
|
|
module.exports = setToArray;
|
|
|
|
|
|
/***/ }),
|
|
/* 176 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
/* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(51),
|
|
stubFalse = __webpack_require__(562);
|
|
|
|
/** Detect free variable `exports`. */
|
|
var freeExports = true && exports && !exports.nodeType && exports;
|
|
|
|
/** Detect free variable `module`. */
|
|
var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
|
|
|
|
/** Detect the popular CommonJS extension `module.exports`. */
|
|
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
|
|
/** Built-in value references. */
|
|
var Buffer = moduleExports ? root.Buffer : undefined;
|
|
|
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
|
|
|
|
/**
|
|
* Checks if `value` is a buffer.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.3.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
|
|
* @example
|
|
*
|
|
* _.isBuffer(new Buffer(2));
|
|
* // => true
|
|
*
|
|
* _.isBuffer(new Uint8Array(2));
|
|
* // => false
|
|
*/
|
|
var isBuffer = nativeIsBuffer || stubFalse;
|
|
|
|
module.exports = isBuffer;
|
|
|
|
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(246)(module)))
|
|
|
|
/***/ }),
|
|
/* 177 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseIsTypedArray = __webpack_require__(563),
|
|
baseUnary = __webpack_require__(172),
|
|
nodeUtil = __webpack_require__(564);
|
|
|
|
/* Node.js helper references. */
|
|
var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
|
|
|
|
/**
|
|
* Checks if `value` is classified as a typed array.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.0.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
|
|
* @example
|
|
*
|
|
* _.isTypedArray(new Uint8Array);
|
|
* // => true
|
|
*
|
|
* _.isTypedArray([]);
|
|
* // => false
|
|
*/
|
|
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
|
|
|
module.exports = isTypedArray;
|
|
|
|
|
|
/***/ }),
|
|
/* 178 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var isPrototype = __webpack_require__(247),
|
|
nativeKeys = __webpack_require__(565);
|
|
|
|
/** Used for built-in method references. */
|
|
var objectProto = Object.prototype;
|
|
|
|
/** Used to check objects for own properties. */
|
|
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
|
|
/**
|
|
* The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to query.
|
|
* @returns {Array} Returns the array of property names.
|
|
*/
|
|
function baseKeys(object) {
|
|
if (!isPrototype(object)) {
|
|
return nativeKeys(object);
|
|
}
|
|
var result = [];
|
|
for (var key in Object(object)) {
|
|
if (hasOwnProperty.call(object, key) && key != 'constructor') {
|
|
result.push(key);
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
module.exports = baseKeys;
|
|
|
|
|
|
/***/ }),
|
|
/* 179 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var DataView = __webpack_require__(566),
|
|
Map = __webpack_require__(168),
|
|
Promise = __webpack_require__(567),
|
|
Set = __webpack_require__(249),
|
|
WeakMap = __webpack_require__(568),
|
|
baseGetTag = __webpack_require__(50),
|
|
toSource = __webpack_require__(233);
|
|
|
|
/** `Object#toString` result references. */
|
|
var mapTag = '[object Map]',
|
|
objectTag = '[object Object]',
|
|
promiseTag = '[object Promise]',
|
|
setTag = '[object Set]',
|
|
weakMapTag = '[object WeakMap]';
|
|
|
|
var dataViewTag = '[object DataView]';
|
|
|
|
/** Used to detect maps, sets, and weakmaps. */
|
|
var dataViewCtorString = toSource(DataView),
|
|
mapCtorString = toSource(Map),
|
|
promiseCtorString = toSource(Promise),
|
|
setCtorString = toSource(Set),
|
|
weakMapCtorString = toSource(WeakMap);
|
|
|
|
/**
|
|
* Gets the `toStringTag` of `value`.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to query.
|
|
* @returns {string} Returns the `toStringTag`.
|
|
*/
|
|
var getTag = baseGetTag;
|
|
|
|
// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
|
|
if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
|
|
(Map && getTag(new Map) != mapTag) ||
|
|
(Promise && getTag(Promise.resolve()) != promiseTag) ||
|
|
(Set && getTag(new Set) != setTag) ||
|
|
(WeakMap && getTag(new WeakMap) != weakMapTag)) {
|
|
getTag = function(value) {
|
|
var result = baseGetTag(value),
|
|
Ctor = result == objectTag ? value.constructor : undefined,
|
|
ctorString = Ctor ? toSource(Ctor) : '';
|
|
|
|
if (ctorString) {
|
|
switch (ctorString) {
|
|
case dataViewCtorString: return dataViewTag;
|
|
case mapCtorString: return mapTag;
|
|
case promiseCtorString: return promiseTag;
|
|
case setCtorString: return setTag;
|
|
case weakMapCtorString: return weakMapTag;
|
|
}
|
|
}
|
|
return result;
|
|
};
|
|
}
|
|
|
|
module.exports = getTag;
|
|
|
|
|
|
/***/ }),
|
|
/* 180 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var arrayPush = __webpack_require__(244),
|
|
isFlattenable = __webpack_require__(617);
|
|
|
|
/**
|
|
* The base implementation of `_.flatten` with support for restricting flattening.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to flatten.
|
|
* @param {number} depth The maximum recursion depth.
|
|
* @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
|
|
* @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
|
|
* @param {Array} [result=[]] The initial result value.
|
|
* @returns {Array} Returns the new flattened array.
|
|
*/
|
|
function baseFlatten(array, depth, predicate, isStrict, result) {
|
|
var index = -1,
|
|
length = array.length;
|
|
|
|
predicate || (predicate = isFlattenable);
|
|
result || (result = []);
|
|
|
|
while (++index < length) {
|
|
var value = array[index];
|
|
if (depth > 0 && predicate(value)) {
|
|
if (depth > 1) {
|
|
// Recursively flatten arrays (susceptible to call stack limits).
|
|
baseFlatten(value, depth - 1, predicate, isStrict, result);
|
|
} else {
|
|
arrayPush(result, value);
|
|
}
|
|
} else if (!isStrict) {
|
|
result[result.length] = value;
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
module.exports = baseFlatten;
|
|
|
|
|
|
/***/ }),
|
|
/* 181 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/** Used to compose unicode character classes. */
|
|
var rsAstralRange = '\\ud800-\\udfff',
|
|
rsComboMarksRange = '\\u0300-\\u036f',
|
|
reComboHalfMarksRange = '\\ufe20-\\ufe2f',
|
|
rsComboSymbolsRange = '\\u20d0-\\u20ff',
|
|
rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
|
|
rsVarRange = '\\ufe0e\\ufe0f';
|
|
|
|
/** Used to compose unicode capture groups. */
|
|
var rsZWJ = '\\u200d';
|
|
|
|
/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
|
|
var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');
|
|
|
|
/**
|
|
* Checks if `string` contains Unicode symbols.
|
|
*
|
|
* @private
|
|
* @param {string} string The string to inspect.
|
|
* @returns {boolean} Returns `true` if a symbol is found, else `false`.
|
|
*/
|
|
function hasUnicode(string) {
|
|
return reHasUnicode.test(string);
|
|
}
|
|
|
|
module.exports = hasUnicode;
|
|
|
|
|
|
/***/ }),
|
|
/* 182 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var startOfWeek = __webpack_require__(626)
|
|
|
|
/**
|
|
* @category ISO Week Helpers
|
|
* @summary Return the start of an ISO week for the given date.
|
|
*
|
|
* @description
|
|
* Return the start of an ISO week for the given date.
|
|
* The result will be in the local timezone.
|
|
*
|
|
* ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
|
|
*
|
|
* @param {Date|String|Number} date - the original date
|
|
* @returns {Date} the start of an ISO week
|
|
*
|
|
* @example
|
|
* // The start of an ISO week for 2 September 2014 11:55:00:
|
|
* var result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))
|
|
* //=> Mon Sep 01 2014 00:00:00
|
|
*/
|
|
function startOfISOWeek (dirtyDate) {
|
|
return startOfWeek(dirtyDate, {weekStartsOn: 1})
|
|
}
|
|
|
|
module.exports = startOfISOWeek
|
|
|
|
|
|
/***/ }),
|
|
/* 183 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseFindIndex = __webpack_require__(240),
|
|
baseIteratee = __webpack_require__(73),
|
|
toInteger = __webpack_require__(126);
|
|
|
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
var nativeMax = Math.max;
|
|
|
|
/**
|
|
* This method is like `_.find` except that it returns the index of the first
|
|
* element `predicate` returns truthy for instead of the element itself.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 1.1.0
|
|
* @category Array
|
|
* @param {Array} array The array to inspect.
|
|
* @param {Function} [predicate=_.identity] The function invoked per iteration.
|
|
* @param {number} [fromIndex=0] The index to search from.
|
|
* @returns {number} Returns the index of the found element, else `-1`.
|
|
* @example
|
|
*
|
|
* var users = [
|
|
* { 'user': 'barney', 'active': false },
|
|
* { 'user': 'fred', 'active': false },
|
|
* { 'user': 'pebbles', 'active': true }
|
|
* ];
|
|
*
|
|
* _.findIndex(users, function(o) { return o.user == 'barney'; });
|
|
* // => 0
|
|
*
|
|
* // The `_.matches` iteratee shorthand.
|
|
* _.findIndex(users, { 'user': 'fred', 'active': false });
|
|
* // => 1
|
|
*
|
|
* // The `_.matchesProperty` iteratee shorthand.
|
|
* _.findIndex(users, ['active', false]);
|
|
* // => 0
|
|
*
|
|
* // The `_.property` iteratee shorthand.
|
|
* _.findIndex(users, 'active');
|
|
* // => 2
|
|
*/
|
|
function findIndex(array, predicate, fromIndex) {
|
|
var length = array == null ? 0 : array.length;
|
|
if (!length) {
|
|
return -1;
|
|
}
|
|
var index = fromIndex == null ? 0 : toInteger(fromIndex);
|
|
if (index < 0) {
|
|
index = nativeMax(length + index, 0);
|
|
}
|
|
return baseFindIndex(array, baseIteratee(predicate, 3), index);
|
|
}
|
|
|
|
module.exports = findIndex;
|
|
|
|
|
|
/***/ }),
|
|
/* 184 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* This method returns `undefined`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 2.3.0
|
|
* @category Util
|
|
* @example
|
|
*
|
|
* _.times(2, _.noop);
|
|
* // => [undefined, undefined]
|
|
*/
|
|
function noop() {
|
|
// No operation performed.
|
|
}
|
|
|
|
module.exports = noop;
|
|
|
|
|
|
/***/ }),
|
|
/* 185 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var arrayEach = __webpack_require__(586),
|
|
baseEach = __webpack_require__(86),
|
|
castFunction = __webpack_require__(587),
|
|
isArray = __webpack_require__(26);
|
|
|
|
/**
|
|
* Iterates over elements of `collection` and invokes `iteratee` for each element.
|
|
* The iteratee is invoked with three arguments: (value, index|key, collection).
|
|
* Iteratee functions may exit iteration early by explicitly returning `false`.
|
|
*
|
|
* **Note:** As with other "Collections" methods, objects with a "length"
|
|
* property are iterated like arrays. To avoid this behavior use `_.forIn`
|
|
* or `_.forOwn` for object iteration.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @alias each
|
|
* @category Collection
|
|
* @param {Array|Object} collection The collection to iterate over.
|
|
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
|
|
* @returns {Array|Object} Returns `collection`.
|
|
* @see _.forEachRight
|
|
* @example
|
|
*
|
|
* _.forEach([1, 2], function(value) {
|
|
* console.log(value);
|
|
* });
|
|
* // => Logs `1` then `2`.
|
|
*
|
|
* _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
|
|
* console.log(key);
|
|
* });
|
|
* // => Logs 'a' then 'b' (iteration order is not guaranteed).
|
|
*/
|
|
function forEach(collection, iteratee) {
|
|
var func = isArray(collection) ? arrayEach : baseEach;
|
|
return func(collection, castFunction(iteratee));
|
|
}
|
|
|
|
module.exports = forEach;
|
|
|
|
|
|
/***/ }),
|
|
/* 186 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseInRange = __webpack_require__(590),
|
|
toFinite = __webpack_require__(255),
|
|
toNumber = __webpack_require__(256);
|
|
|
|
/**
|
|
* Checks if `n` is between `start` and up to, but not including, `end`. If
|
|
* `end` is not specified, it's set to `start` with `start` then set to `0`.
|
|
* If `start` is greater than `end` the params are swapped to support
|
|
* negative ranges.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.3.0
|
|
* @category Number
|
|
* @param {number} number The number to check.
|
|
* @param {number} [start=0] The start of the range.
|
|
* @param {number} end The end of the range.
|
|
* @returns {boolean} Returns `true` if `number` is in the range, else `false`.
|
|
* @see _.range, _.rangeRight
|
|
* @example
|
|
*
|
|
* _.inRange(3, 2, 4);
|
|
* // => true
|
|
*
|
|
* _.inRange(4, 8);
|
|
* // => true
|
|
*
|
|
* _.inRange(4, 2);
|
|
* // => false
|
|
*
|
|
* _.inRange(2, 2);
|
|
* // => false
|
|
*
|
|
* _.inRange(1.2, 2);
|
|
* // => true
|
|
*
|
|
* _.inRange(5.2, 4);
|
|
* // => false
|
|
*
|
|
* _.inRange(-3, -2, -6);
|
|
* // => true
|
|
*/
|
|
function inRange(number, start, end) {
|
|
start = toFinite(start);
|
|
if (end === undefined) {
|
|
end = start;
|
|
start = 0;
|
|
} else {
|
|
end = toFinite(end);
|
|
}
|
|
number = toNumber(number);
|
|
return baseInRange(number, start, end);
|
|
}
|
|
|
|
module.exports = inRange;
|
|
|
|
|
|
/***/ }),
|
|
/* 187 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseDifference = __webpack_require__(238),
|
|
baseFlatten = __webpack_require__(180),
|
|
baseRest = __webpack_require__(96),
|
|
isArrayLikeObject = __webpack_require__(123);
|
|
|
|
/**
|
|
* Creates an array of `array` values not included in the other given arrays
|
|
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
* for equality comparisons. The order and references of result values are
|
|
* determined by the first array.
|
|
*
|
|
* **Note:** Unlike `_.pullAll`, this method returns a new array.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Array
|
|
* @param {Array} array The array to inspect.
|
|
* @param {...Array} [values] The values to exclude.
|
|
* @returns {Array} Returns the new array of filtered values.
|
|
* @see _.without, _.xor
|
|
* @example
|
|
*
|
|
* _.difference([2, 1], [2, 3]);
|
|
* // => [1]
|
|
*/
|
|
var difference = baseRest(function(array, values) {
|
|
return isArrayLikeObject(array)
|
|
? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))
|
|
: [];
|
|
});
|
|
|
|
module.exports = difference;
|
|
|
|
|
|
/***/ }),
|
|
/* 188 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseFlatten = __webpack_require__(180),
|
|
baseRest = __webpack_require__(96),
|
|
baseUniq = __webpack_require__(258),
|
|
isArrayLikeObject = __webpack_require__(123);
|
|
|
|
/**
|
|
* Creates an array of unique values, in order, from all given arrays using
|
|
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
* for equality comparisons.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Array
|
|
* @param {...Array} [arrays] The arrays to inspect.
|
|
* @returns {Array} Returns the new array of combined values.
|
|
* @example
|
|
*
|
|
* _.union([2], [1, 2]);
|
|
* // => [2, 1]
|
|
*/
|
|
var union = baseRest(function(arrays) {
|
|
return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
|
|
});
|
|
|
|
module.exports = union;
|
|
|
|
|
|
/***/ }),
|
|
/* 189 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var parse = __webpack_require__(42)
|
|
|
|
/**
|
|
* @category Common Helpers
|
|
* @summary Is the first date before the second one?
|
|
*
|
|
* @description
|
|
* Is the first date before the second one?
|
|
*
|
|
* @param {Date|String|Number} date - the date that should be before the other one to return true
|
|
* @param {Date|String|Number} dateToCompare - the date to compare with
|
|
* @returns {Boolean} the first date is before the second date
|
|
*
|
|
* @example
|
|
* // Is 10 July 1989 before 11 February 1987?
|
|
* var result = isBefore(new Date(1989, 6, 10), new Date(1987, 1, 11))
|
|
* //=> false
|
|
*/
|
|
function isBefore (dirtyDate, dirtyDateToCompare) {
|
|
var date = parse(dirtyDate)
|
|
var dateToCompare = parse(dirtyDateToCompare)
|
|
return date.getTime() < dateToCompare.getTime()
|
|
}
|
|
|
|
module.exports = isBefore
|
|
|
|
|
|
/***/ }),
|
|
/* 190 */,
|
|
/* 191 */,
|
|
/* 192 */,
|
|
/* 193 */,
|
|
/* 194 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
module.exports = !__webpack_require__(21) && !__webpack_require__(17)(function () {
|
|
return Object.defineProperty(__webpack_require__(139)('div'), 'a', { get: function () { return 7; } }).a != 7;
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 195 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
exports.f = __webpack_require__(19);
|
|
|
|
|
|
/***/ }),
|
|
/* 196 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var has = __webpack_require__(33);
|
|
var toIObject = __webpack_require__(34);
|
|
var arrayIndexOf = __webpack_require__(99)(false);
|
|
var IE_PROTO = __webpack_require__(141)('IE_PROTO');
|
|
|
|
module.exports = function (object, names) {
|
|
var O = toIObject(object);
|
|
var i = 0;
|
|
var result = [];
|
|
var key;
|
|
for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);
|
|
// Don't enum bug & hidden keys
|
|
while (names.length > i) if (has(O, key = names[i++])) {
|
|
~arrayIndexOf(result, key) || result.push(key);
|
|
}
|
|
return result;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 197 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var dP = __webpack_require__(22);
|
|
var anObject = __webpack_require__(9);
|
|
var getKeys = __webpack_require__(63);
|
|
|
|
module.exports = __webpack_require__(21) ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
anObject(O);
|
|
var keys = getKeys(Properties);
|
|
var length = keys.length;
|
|
var i = 0;
|
|
var P;
|
|
while (length > i) dP.f(O, P = keys[i++], Properties[P]);
|
|
return O;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 198 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
|
|
var toIObject = __webpack_require__(34);
|
|
var gOPN = __webpack_require__(66).f;
|
|
var toString = {}.toString;
|
|
|
|
var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
|
|
? Object.getOwnPropertyNames(window) : [];
|
|
|
|
var getWindowNames = function (it) {
|
|
try {
|
|
return gOPN(it);
|
|
} catch (e) {
|
|
return windowNames.slice();
|
|
}
|
|
};
|
|
|
|
module.exports.f = function getOwnPropertyNames(it) {
|
|
return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 199 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
// 19.1.2.1 Object.assign(target, source, ...)
|
|
var DESCRIPTORS = __webpack_require__(21);
|
|
var getKeys = __webpack_require__(63);
|
|
var gOPS = __webpack_require__(100);
|
|
var pIE = __webpack_require__(91);
|
|
var toObject = __webpack_require__(23);
|
|
var IObject = __webpack_require__(90);
|
|
var $assign = Object.assign;
|
|
|
|
// should work with symbols and should have deterministic property order (V8 bug)
|
|
module.exports = !$assign || __webpack_require__(17)(function () {
|
|
var A = {};
|
|
var B = {};
|
|
// eslint-disable-next-line no-undef
|
|
var S = Symbol();
|
|
var K = 'abcdefghijklmnopqrst';
|
|
A[S] = 7;
|
|
K.split('').forEach(function (k) { B[k] = k; });
|
|
return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;
|
|
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars
|
|
var T = toObject(target);
|
|
var aLen = arguments.length;
|
|
var index = 1;
|
|
var getSymbols = gOPS.f;
|
|
var isEnum = pIE.f;
|
|
while (aLen > index) {
|
|
var S = IObject(arguments[index++]);
|
|
var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);
|
|
var length = keys.length;
|
|
var j = 0;
|
|
var key;
|
|
while (length > j) {
|
|
key = keys[j++];
|
|
if (!DESCRIPTORS || isEnum.call(S, key)) T[key] = S[key];
|
|
}
|
|
} return T;
|
|
} : $assign;
|
|
|
|
|
|
/***/ }),
|
|
/* 200 */
|
|
/***/ (function(module, exports) {
|
|
|
|
// 7.2.9 SameValue(x, y)
|
|
module.exports = Object.is || function is(x, y) {
|
|
// eslint-disable-next-line no-self-compare
|
|
return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 201 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var aFunction = __webpack_require__(27);
|
|
var isObject = __webpack_require__(18);
|
|
var invoke = __webpack_require__(202);
|
|
var arraySlice = [].slice;
|
|
var factories = {};
|
|
|
|
var construct = function (F, len, args) {
|
|
if (!(len in factories)) {
|
|
for (var n = [], i = 0; i < len; i++) n[i] = 'a[' + i + ']';
|
|
// eslint-disable-next-line no-new-func
|
|
factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')');
|
|
} return factories[len](F, args);
|
|
};
|
|
|
|
module.exports = Function.bind || function bind(that /* , ...args */) {
|
|
var fn = aFunction(this);
|
|
var partArgs = arraySlice.call(arguments, 1);
|
|
var bound = function (/* args... */) {
|
|
var args = partArgs.concat(arraySlice.call(arguments));
|
|
return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that);
|
|
};
|
|
if (isObject(fn.prototype)) bound.prototype = fn.prototype;
|
|
return bound;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 202 */
|
|
/***/ (function(module, exports) {
|
|
|
|
// fast apply, http://jsperf.lnkit.com/fast-apply/5
|
|
module.exports = function (fn, args, that) {
|
|
var un = that === undefined;
|
|
switch (args.length) {
|
|
case 0: return un ? fn()
|
|
: fn.call(that);
|
|
case 1: return un ? fn(args[0])
|
|
: fn.call(that, args[0]);
|
|
case 2: return un ? fn(args[0], args[1])
|
|
: fn.call(that, args[0], args[1]);
|
|
case 3: return un ? fn(args[0], args[1], args[2])
|
|
: fn.call(that, args[0], args[1], args[2]);
|
|
case 4: return un ? fn(args[0], args[1], args[2], args[3])
|
|
: fn.call(that, args[0], args[1], args[2], args[3]);
|
|
} return fn.apply(that, args);
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 203 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var $parseInt = __webpack_require__(16).parseInt;
|
|
var $trim = __webpack_require__(79).trim;
|
|
var ws = __webpack_require__(145);
|
|
var hex = /^[-+]?0[xX]/;
|
|
|
|
module.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix) {
|
|
var string = $trim(String(str), 3);
|
|
return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10));
|
|
} : $parseInt;
|
|
|
|
|
|
/***/ }),
|
|
/* 204 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var $parseFloat = __webpack_require__(16).parseFloat;
|
|
var $trim = __webpack_require__(79).trim;
|
|
|
|
module.exports = 1 / $parseFloat(__webpack_require__(145) + '-0') !== -Infinity ? function parseFloat(str) {
|
|
var string = $trim(String(str), 3);
|
|
var result = $parseFloat(string);
|
|
return result === 0 && string.charAt(0) == '-' ? -0 : result;
|
|
} : $parseFloat;
|
|
|
|
|
|
/***/ }),
|
|
/* 205 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var cof = __webpack_require__(39);
|
|
module.exports = function (it, msg) {
|
|
if (typeof it != 'number' && cof(it) != 'Number') throw TypeError(msg);
|
|
return +it;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 206 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 20.1.2.3 Number.isInteger(number)
|
|
var isObject = __webpack_require__(18);
|
|
var floor = Math.floor;
|
|
module.exports = function isInteger(it) {
|
|
return !isObject(it) && isFinite(it) && floor(it) === it;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 207 */
|
|
/***/ (function(module, exports) {
|
|
|
|
// 20.2.2.20 Math.log1p(x)
|
|
module.exports = Math.log1p || function log1p(x) {
|
|
return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x);
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 208 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 20.2.2.16 Math.fround(x)
|
|
var sign = __webpack_require__(148);
|
|
var pow = Math.pow;
|
|
var EPSILON = pow(2, -52);
|
|
var EPSILON32 = pow(2, -23);
|
|
var MAX32 = pow(2, 127) * (2 - EPSILON32);
|
|
var MIN32 = pow(2, -126);
|
|
|
|
var roundTiesToEven = function (n) {
|
|
return n + 1 / EPSILON - 1 / EPSILON;
|
|
};
|
|
|
|
module.exports = Math.fround || function fround(x) {
|
|
var $abs = Math.abs(x);
|
|
var $sign = sign(x);
|
|
var a, result;
|
|
if ($abs < MIN32) return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32;
|
|
a = (1 + EPSILON32 / EPSILON) * $abs;
|
|
result = a - (a - $abs);
|
|
// eslint-disable-next-line no-self-compare
|
|
if (result > MAX32 || result != result) return $sign * Infinity;
|
|
return $sign * result;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 209 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// call something on iterator step with safe closing on error
|
|
var anObject = __webpack_require__(9);
|
|
module.exports = function (iterator, fn, value, entries) {
|
|
try {
|
|
return entries ? fn(anObject(value)[0], value[1]) : fn(value);
|
|
// 7.4.6 IteratorClose(iterator, completion)
|
|
} catch (e) {
|
|
var ret = iterator['return'];
|
|
if (ret !== undefined) anObject(ret.call(iterator));
|
|
throw e;
|
|
}
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 210 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var aFunction = __webpack_require__(27);
|
|
var toObject = __webpack_require__(23);
|
|
var IObject = __webpack_require__(90);
|
|
var toLength = __webpack_require__(20);
|
|
|
|
module.exports = function (that, callbackfn, aLen, memo, isRight) {
|
|
aFunction(callbackfn);
|
|
var O = toObject(that);
|
|
var self = IObject(O);
|
|
var length = toLength(O.length);
|
|
var index = isRight ? length - 1 : 0;
|
|
var i = isRight ? -1 : 1;
|
|
if (aLen < 2) for (;;) {
|
|
if (index in self) {
|
|
memo = self[index];
|
|
index += i;
|
|
break;
|
|
}
|
|
index += i;
|
|
if (isRight ? index < 0 : length <= index) {
|
|
throw TypeError('Reduce of empty array with no initial value');
|
|
}
|
|
}
|
|
for (;isRight ? index >= 0 : length > index; index += i) if (index in self) {
|
|
memo = callbackfn(memo, self[index], index, O);
|
|
}
|
|
return memo;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 211 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)
|
|
|
|
var toObject = __webpack_require__(23);
|
|
var toAbsoluteIndex = __webpack_require__(64);
|
|
var toLength = __webpack_require__(20);
|
|
|
|
module.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) {
|
|
var O = toObject(this);
|
|
var len = toLength(O.length);
|
|
var to = toAbsoluteIndex(target, len);
|
|
var from = toAbsoluteIndex(start, len);
|
|
var end = arguments.length > 2 ? arguments[2] : undefined;
|
|
var count = Math.min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to);
|
|
var inc = 1;
|
|
if (from < to && to < from + count) {
|
|
inc = -1;
|
|
from += count - 1;
|
|
to += count - 1;
|
|
}
|
|
while (count-- > 0) {
|
|
if (from in O) O[to] = O[from];
|
|
else delete O[to];
|
|
to += inc;
|
|
from += inc;
|
|
} return O;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 212 */
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = function (done, value) {
|
|
return { value: value, done: !!done };
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 213 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var regexpExec = __webpack_require__(160);
|
|
__webpack_require__(3)({
|
|
target: 'RegExp',
|
|
proto: true,
|
|
forced: regexpExec !== /./.exec
|
|
}, {
|
|
exec: regexpExec
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 214 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 21.2.5.3 get RegExp.prototype.flags()
|
|
if (__webpack_require__(21) && /./g.flags != 'g') __webpack_require__(22).f(RegExp.prototype, 'flags', {
|
|
configurable: true,
|
|
get: __webpack_require__(92)
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 215 */
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = function (exec) {
|
|
try {
|
|
return { e: false, v: exec() };
|
|
} catch (e) {
|
|
return { e: true, v: e };
|
|
}
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 216 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var anObject = __webpack_require__(9);
|
|
var isObject = __webpack_require__(18);
|
|
var newPromiseCapability = __webpack_require__(164);
|
|
|
|
module.exports = function (C, x) {
|
|
anObject(C);
|
|
if (isObject(x) && x.constructor === C) return x;
|
|
var promiseCapability = newPromiseCapability.f(C);
|
|
var resolve = promiseCapability.resolve;
|
|
resolve(x);
|
|
return promiseCapability.promise;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 217 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var strong = __webpack_require__(218);
|
|
var validate = __webpack_require__(71);
|
|
var MAP = 'Map';
|
|
|
|
// 23.1 Map Objects
|
|
module.exports = __webpack_require__(108)(MAP, function (get) {
|
|
return function Map() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };
|
|
}, {
|
|
// 23.1.3.6 Map.prototype.get(key)
|
|
get: function get(key) {
|
|
var entry = strong.getEntry(validate(this, MAP), key);
|
|
return entry && entry.v;
|
|
},
|
|
// 23.1.3.9 Map.prototype.set(key, value)
|
|
set: function set(key, value) {
|
|
return strong.def(validate(this, MAP), key === 0 ? 0 : key, value);
|
|
}
|
|
}, strong, true);
|
|
|
|
|
|
/***/ }),
|
|
/* 218 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var dP = __webpack_require__(22).f;
|
|
var create = __webpack_require__(65);
|
|
var redefineAll = __webpack_require__(70);
|
|
var ctx = __webpack_require__(38);
|
|
var anInstance = __webpack_require__(68);
|
|
var forOf = __webpack_require__(69);
|
|
var $iterDefine = __webpack_require__(150);
|
|
var step = __webpack_require__(212);
|
|
var setSpecies = __webpack_require__(67);
|
|
var DESCRIPTORS = __webpack_require__(21);
|
|
var fastKey = __webpack_require__(56).fastKey;
|
|
var validate = __webpack_require__(71);
|
|
var SIZE = DESCRIPTORS ? '_s' : 'size';
|
|
|
|
var getEntry = function (that, key) {
|
|
// fast case
|
|
var index = fastKey(key);
|
|
var entry;
|
|
if (index !== 'F') return that._i[index];
|
|
// frozen object case
|
|
for (entry = that._f; entry; entry = entry.n) {
|
|
if (entry.k == key) return entry;
|
|
}
|
|
};
|
|
|
|
module.exports = {
|
|
getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {
|
|
var C = wrapper(function (that, iterable) {
|
|
anInstance(that, C, NAME, '_i');
|
|
that._t = NAME; // collection type
|
|
that._i = create(null); // index
|
|
that._f = undefined; // first entry
|
|
that._l = undefined; // last entry
|
|
that[SIZE] = 0; // size
|
|
if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);
|
|
});
|
|
redefineAll(C.prototype, {
|
|
// 23.1.3.1 Map.prototype.clear()
|
|
// 23.2.3.2 Set.prototype.clear()
|
|
clear: function clear() {
|
|
for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) {
|
|
entry.r = true;
|
|
if (entry.p) entry.p = entry.p.n = undefined;
|
|
delete data[entry.i];
|
|
}
|
|
that._f = that._l = undefined;
|
|
that[SIZE] = 0;
|
|
},
|
|
// 23.1.3.3 Map.prototype.delete(key)
|
|
// 23.2.3.4 Set.prototype.delete(value)
|
|
'delete': function (key) {
|
|
var that = validate(this, NAME);
|
|
var entry = getEntry(that, key);
|
|
if (entry) {
|
|
var next = entry.n;
|
|
var prev = entry.p;
|
|
delete that._i[entry.i];
|
|
entry.r = true;
|
|
if (prev) prev.n = next;
|
|
if (next) next.p = prev;
|
|
if (that._f == entry) that._f = next;
|
|
if (that._l == entry) that._l = prev;
|
|
that[SIZE]--;
|
|
} return !!entry;
|
|
},
|
|
// 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)
|
|
// 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)
|
|
forEach: function forEach(callbackfn /* , that = undefined */) {
|
|
validate(this, NAME);
|
|
var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);
|
|
var entry;
|
|
while (entry = entry ? entry.n : this._f) {
|
|
f(entry.v, entry.k, this);
|
|
// revert to the last existing entry
|
|
while (entry && entry.r) entry = entry.p;
|
|
}
|
|
},
|
|
// 23.1.3.7 Map.prototype.has(key)
|
|
// 23.2.3.7 Set.prototype.has(value)
|
|
has: function has(key) {
|
|
return !!getEntry(validate(this, NAME), key);
|
|
}
|
|
});
|
|
if (DESCRIPTORS) dP(C.prototype, 'size', {
|
|
get: function () {
|
|
return validate(this, NAME)[SIZE];
|
|
}
|
|
});
|
|
return C;
|
|
},
|
|
def: function (that, key, value) {
|
|
var entry = getEntry(that, key);
|
|
var prev, index;
|
|
// change existing entry
|
|
if (entry) {
|
|
entry.v = value;
|
|
// create new entry
|
|
} else {
|
|
that._l = entry = {
|
|
i: index = fastKey(key, true), // <- index
|
|
k: key, // <- key
|
|
v: value, // <- value
|
|
p: prev = that._l, // <- previous entry
|
|
n: undefined, // <- next entry
|
|
r: false // <- removed
|
|
};
|
|
if (!that._f) that._f = entry;
|
|
if (prev) prev.n = entry;
|
|
that[SIZE]++;
|
|
// add to index
|
|
if (index !== 'F') that._i[index] = entry;
|
|
} return that;
|
|
},
|
|
getEntry: getEntry,
|
|
setStrong: function (C, NAME, IS_MAP) {
|
|
// add .keys, .values, .entries, [@@iterator]
|
|
// 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11
|
|
$iterDefine(C, NAME, function (iterated, kind) {
|
|
this._t = validate(iterated, NAME); // target
|
|
this._k = kind; // kind
|
|
this._l = undefined; // previous
|
|
}, function () {
|
|
var that = this;
|
|
var kind = that._k;
|
|
var entry = that._l;
|
|
// revert to the last existing entry
|
|
while (entry && entry.r) entry = entry.p;
|
|
// get next entry
|
|
if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) {
|
|
// or finish the iteration
|
|
that._t = undefined;
|
|
return step(1);
|
|
}
|
|
// return step by kind
|
|
if (kind == 'keys') return step(0, entry.k);
|
|
if (kind == 'values') return step(0, entry.v);
|
|
return step(0, [entry.k, entry.v]);
|
|
}, IS_MAP ? 'entries' : 'values', !IS_MAP, true);
|
|
|
|
// add [@@species], 23.1.2.2, 23.2.2.2
|
|
setSpecies(NAME);
|
|
}
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 219 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var strong = __webpack_require__(218);
|
|
var validate = __webpack_require__(71);
|
|
var SET = 'Set';
|
|
|
|
// 23.2 Set Objects
|
|
module.exports = __webpack_require__(108)(SET, function (get) {
|
|
return function Set() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };
|
|
}, {
|
|
// 23.2.3.1 Set.prototype.add(value)
|
|
add: function add(value) {
|
|
return strong.def(validate(this, SET), value = value === 0 ? 0 : value, value);
|
|
}
|
|
}, strong);
|
|
|
|
|
|
/***/ }),
|
|
/* 220 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var global = __webpack_require__(16);
|
|
var each = __webpack_require__(46)(0);
|
|
var redefine = __webpack_require__(30);
|
|
var meta = __webpack_require__(56);
|
|
var assign = __webpack_require__(199);
|
|
var weak = __webpack_require__(221);
|
|
var isObject = __webpack_require__(18);
|
|
var validate = __webpack_require__(71);
|
|
var NATIVE_WEAK_MAP = __webpack_require__(71);
|
|
var IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global;
|
|
var WEAK_MAP = 'WeakMap';
|
|
var getWeak = meta.getWeak;
|
|
var isExtensible = Object.isExtensible;
|
|
var uncaughtFrozenStore = weak.ufstore;
|
|
var InternalMap;
|
|
|
|
var wrapper = function (get) {
|
|
return function WeakMap() {
|
|
return get(this, arguments.length > 0 ? arguments[0] : undefined);
|
|
};
|
|
};
|
|
|
|
var methods = {
|
|
// 23.3.3.3 WeakMap.prototype.get(key)
|
|
get: function get(key) {
|
|
if (isObject(key)) {
|
|
var data = getWeak(key);
|
|
if (data === true) return uncaughtFrozenStore(validate(this, WEAK_MAP)).get(key);
|
|
return data ? data[this._i] : undefined;
|
|
}
|
|
},
|
|
// 23.3.3.5 WeakMap.prototype.set(key, value)
|
|
set: function set(key, value) {
|
|
return weak.def(validate(this, WEAK_MAP), key, value);
|
|
}
|
|
};
|
|
|
|
// 23.3 WeakMap Objects
|
|
var $WeakMap = module.exports = __webpack_require__(108)(WEAK_MAP, wrapper, methods, weak, true, true);
|
|
|
|
// IE11 WeakMap frozen keys fix
|
|
if (NATIVE_WEAK_MAP && IS_IE11) {
|
|
InternalMap = weak.getConstructor(wrapper, WEAK_MAP);
|
|
assign(InternalMap.prototype, methods);
|
|
meta.NEED = true;
|
|
each(['delete', 'has', 'get', 'set'], function (key) {
|
|
var proto = $WeakMap.prototype;
|
|
var method = proto[key];
|
|
redefine(proto, key, function (a, b) {
|
|
// store frozen objects on internal weakmap shim
|
|
if (isObject(a) && !isExtensible(a)) {
|
|
if (!this._f) this._f = new InternalMap();
|
|
var result = this._f[key](a, b);
|
|
return key == 'set' ? this : result;
|
|
// store all the rest on native weakmap
|
|
} return method.call(this, a, b);
|
|
});
|
|
});
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
/* 221 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var redefineAll = __webpack_require__(70);
|
|
var getWeak = __webpack_require__(56).getWeak;
|
|
var anObject = __webpack_require__(9);
|
|
var isObject = __webpack_require__(18);
|
|
var anInstance = __webpack_require__(68);
|
|
var forOf = __webpack_require__(69);
|
|
var createArrayMethod = __webpack_require__(46);
|
|
var $has = __webpack_require__(33);
|
|
var validate = __webpack_require__(71);
|
|
var arrayFind = createArrayMethod(5);
|
|
var arrayFindIndex = createArrayMethod(6);
|
|
var id = 0;
|
|
|
|
// fallback for uncaught frozen keys
|
|
var uncaughtFrozenStore = function (that) {
|
|
return that._l || (that._l = new UncaughtFrozenStore());
|
|
};
|
|
var UncaughtFrozenStore = function () {
|
|
this.a = [];
|
|
};
|
|
var findUncaughtFrozen = function (store, key) {
|
|
return arrayFind(store.a, function (it) {
|
|
return it[0] === key;
|
|
});
|
|
};
|
|
UncaughtFrozenStore.prototype = {
|
|
get: function (key) {
|
|
var entry = findUncaughtFrozen(this, key);
|
|
if (entry) return entry[1];
|
|
},
|
|
has: function (key) {
|
|
return !!findUncaughtFrozen(this, key);
|
|
},
|
|
set: function (key, value) {
|
|
var entry = findUncaughtFrozen(this, key);
|
|
if (entry) entry[1] = value;
|
|
else this.a.push([key, value]);
|
|
},
|
|
'delete': function (key) {
|
|
var index = arrayFindIndex(this.a, function (it) {
|
|
return it[0] === key;
|
|
});
|
|
if (~index) this.a.splice(index, 1);
|
|
return !!~index;
|
|
}
|
|
};
|
|
|
|
module.exports = {
|
|
getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {
|
|
var C = wrapper(function (that, iterable) {
|
|
anInstance(that, C, NAME, '_i');
|
|
that._t = NAME; // collection type
|
|
that._i = id++; // collection id
|
|
that._l = undefined; // leak store for uncaught frozen objects
|
|
if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);
|
|
});
|
|
redefineAll(C.prototype, {
|
|
// 23.3.3.2 WeakMap.prototype.delete(key)
|
|
// 23.4.3.3 WeakSet.prototype.delete(value)
|
|
'delete': function (key) {
|
|
if (!isObject(key)) return false;
|
|
var data = getWeak(key);
|
|
if (data === true) return uncaughtFrozenStore(validate(this, NAME))['delete'](key);
|
|
return data && $has(data, this._i) && delete data[this._i];
|
|
},
|
|
// 23.3.3.4 WeakMap.prototype.has(key)
|
|
// 23.4.3.4 WeakSet.prototype.has(value)
|
|
has: function has(key) {
|
|
if (!isObject(key)) return false;
|
|
var data = getWeak(key);
|
|
if (data === true) return uncaughtFrozenStore(validate(this, NAME)).has(key);
|
|
return data && $has(data, this._i);
|
|
}
|
|
});
|
|
return C;
|
|
},
|
|
def: function (that, key, value) {
|
|
var data = getWeak(anObject(key), true);
|
|
if (data === true) uncaughtFrozenStore(that).set(key, value);
|
|
else data[that._i] = value;
|
|
return that;
|
|
},
|
|
ufstore: uncaughtFrozenStore
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 222 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// https://tc39.github.io/ecma262/#sec-toindex
|
|
var toInteger = __webpack_require__(40);
|
|
var toLength = __webpack_require__(20);
|
|
module.exports = function (it) {
|
|
if (it === undefined) return 0;
|
|
var number = toInteger(it);
|
|
var length = toLength(number);
|
|
if (number !== length) throw RangeError('Wrong length!');
|
|
return length;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 223 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// all object keys, includes non-enumerable and symbols
|
|
var gOPN = __webpack_require__(66);
|
|
var gOPS = __webpack_require__(100);
|
|
var anObject = __webpack_require__(9);
|
|
var Reflect = __webpack_require__(16).Reflect;
|
|
module.exports = Reflect && Reflect.ownKeys || function ownKeys(it) {
|
|
var keys = gOPN.f(anObject(it));
|
|
var getSymbols = gOPS.f;
|
|
return getSymbols ? keys.concat(getSymbols(it)) : keys;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 224 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray
|
|
var isArray = __webpack_require__(101);
|
|
var isObject = __webpack_require__(18);
|
|
var toLength = __webpack_require__(20);
|
|
var ctx = __webpack_require__(38);
|
|
var IS_CONCAT_SPREADABLE = __webpack_require__(19)('isConcatSpreadable');
|
|
|
|
function flattenIntoArray(target, original, source, sourceLen, start, depth, mapper, thisArg) {
|
|
var targetIndex = start;
|
|
var sourceIndex = 0;
|
|
var mapFn = mapper ? ctx(mapper, thisArg, 3) : false;
|
|
var element, spreadable;
|
|
|
|
while (sourceIndex < sourceLen) {
|
|
if (sourceIndex in source) {
|
|
element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];
|
|
|
|
spreadable = false;
|
|
if (isObject(element)) {
|
|
spreadable = element[IS_CONCAT_SPREADABLE];
|
|
spreadable = spreadable !== undefined ? !!spreadable : isArray(element);
|
|
}
|
|
|
|
if (spreadable && depth > 0) {
|
|
targetIndex = flattenIntoArray(target, original, element, toLength(element.length), targetIndex, depth - 1) - 1;
|
|
} else {
|
|
if (targetIndex >= 0x1fffffffffffff) throw TypeError();
|
|
target[targetIndex] = element;
|
|
}
|
|
|
|
targetIndex++;
|
|
}
|
|
sourceIndex++;
|
|
}
|
|
return targetIndex;
|
|
}
|
|
|
|
module.exports = flattenIntoArray;
|
|
|
|
|
|
/***/ }),
|
|
/* 225 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// https://github.com/tc39/proposal-string-pad-start-end
|
|
var toLength = __webpack_require__(20);
|
|
var repeat = __webpack_require__(147);
|
|
var defined = __webpack_require__(44);
|
|
|
|
module.exports = function (that, maxLength, fillString, left) {
|
|
var S = String(defined(that));
|
|
var stringLength = S.length;
|
|
var fillStr = fillString === undefined ? ' ' : String(fillString);
|
|
var intMaxLength = toLength(maxLength);
|
|
if (intMaxLength <= stringLength || fillStr == '') return S;
|
|
var fillLen = intMaxLength - stringLength;
|
|
var stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length));
|
|
if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen);
|
|
return left ? stringFiller + S : S + stringFiller;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 226 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var DESCRIPTORS = __webpack_require__(21);
|
|
var getKeys = __webpack_require__(63);
|
|
var toIObject = __webpack_require__(34);
|
|
var isEnum = __webpack_require__(91).f;
|
|
module.exports = function (isEntries) {
|
|
return function (it) {
|
|
var O = toIObject(it);
|
|
var keys = getKeys(O);
|
|
var length = keys.length;
|
|
var i = 0;
|
|
var result = [];
|
|
var key;
|
|
while (length > i) {
|
|
key = keys[i++];
|
|
if (!DESCRIPTORS || isEnum.call(O, key)) {
|
|
result.push(isEntries ? [key, O[key]] : O[key]);
|
|
}
|
|
}
|
|
return result;
|
|
};
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 227 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// https://github.com/DavidBruant/Map-Set.prototype.toJSON
|
|
var classof = __webpack_require__(78);
|
|
var from = __webpack_require__(228);
|
|
module.exports = function (NAME) {
|
|
return function toJSON() {
|
|
if (classof(this) != NAME) throw TypeError(NAME + "#toJSON isn't generic");
|
|
return from(this);
|
|
};
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 228 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var forOf = __webpack_require__(69);
|
|
|
|
module.exports = function (iter, ITERATOR) {
|
|
var result = [];
|
|
forOf(iter, false, result.push, result, ITERATOR);
|
|
return result;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 229 */
|
|
/***/ (function(module, exports) {
|
|
|
|
// https://rwaldron.github.io/proposal-math-extensions/
|
|
module.exports = Math.scale || function scale(x, inLow, inHigh, outLow, outHigh) {
|
|
if (
|
|
arguments.length === 0
|
|
// eslint-disable-next-line no-self-compare
|
|
|| x != x
|
|
// eslint-disable-next-line no-self-compare
|
|
|| inLow != inLow
|
|
// eslint-disable-next-line no-self-compare
|
|
|| inHigh != inHigh
|
|
// eslint-disable-next-line no-self-compare
|
|
|| outLow != outLow
|
|
// eslint-disable-next-line no-self-compare
|
|
|| outHigh != outHigh
|
|
) return NaN;
|
|
if (x === Infinity || x === -Infinity) return x;
|
|
return (x - inLow) * (outHigh - outLow) / (inHigh - inLow) + outLow;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 230 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
/*
|
|
object-assign
|
|
(c) Sindre Sorhus
|
|
@license MIT
|
|
*/
|
|
|
|
|
|
/* eslint-disable no-unused-vars */
|
|
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
|
|
function toObject(val) {
|
|
if (val === null || val === undefined) {
|
|
throw new TypeError('Object.assign cannot be called with null or undefined');
|
|
}
|
|
|
|
return Object(val);
|
|
}
|
|
|
|
function shouldUseNative() {
|
|
try {
|
|
if (!Object.assign) {
|
|
return false;
|
|
}
|
|
|
|
// Detect buggy property enumeration order in older V8 versions.
|
|
|
|
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
|
|
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
|
|
test1[5] = 'de';
|
|
if (Object.getOwnPropertyNames(test1)[0] === '5') {
|
|
return false;
|
|
}
|
|
|
|
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
var test2 = {};
|
|
for (var i = 0; i < 10; i++) {
|
|
test2['_' + String.fromCharCode(i)] = i;
|
|
}
|
|
var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
|
|
return test2[n];
|
|
});
|
|
if (order2.join('') !== '0123456789') {
|
|
return false;
|
|
}
|
|
|
|
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
var test3 = {};
|
|
'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
|
|
test3[letter] = letter;
|
|
});
|
|
if (Object.keys(Object.assign({}, test3)).join('') !==
|
|
'abcdefghijklmnopqrst') {
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
} catch (err) {
|
|
// We don't expect any of the above to throw, but better to be safe.
|
|
return false;
|
|
}
|
|
}
|
|
|
|
module.exports = shouldUseNative() ? Object.assign : function (target, source) {
|
|
var from;
|
|
var to = toObject(target);
|
|
var symbols;
|
|
|
|
for (var s = 1; s < arguments.length; s++) {
|
|
from = Object(arguments[s]);
|
|
|
|
for (var key in from) {
|
|
if (hasOwnProperty.call(from, key)) {
|
|
to[key] = from[key];
|
|
}
|
|
}
|
|
|
|
if (getOwnPropertySymbols) {
|
|
symbols = getOwnPropertySymbols(from);
|
|
for (var i = 0; i < symbols.length; i++) {
|
|
if (propIsEnumerable.call(from, symbols[i])) {
|
|
to[symbols[i]] = from[symbols[i]];
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
return to;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 231 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* A faster alternative to `Function#apply`, this function invokes `func`
|
|
* with the `this` binding of `thisArg` and the arguments of `args`.
|
|
*
|
|
* @private
|
|
* @param {Function} func The function to invoke.
|
|
* @param {*} thisArg The `this` binding of `func`.
|
|
* @param {Array} args The arguments to invoke `func` with.
|
|
* @returns {*} Returns the result of `func`.
|
|
*/
|
|
function apply(func, thisArg, args) {
|
|
switch (args.length) {
|
|
case 0: return func.call(thisArg);
|
|
case 1: return func.call(thisArg, args[0]);
|
|
case 2: return func.call(thisArg, args[0], args[1]);
|
|
case 3: return func.call(thisArg, args[0], args[1], args[2]);
|
|
}
|
|
return func.apply(thisArg, args);
|
|
}
|
|
|
|
module.exports = apply;
|
|
|
|
|
|
/***/ }),
|
|
/* 232 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */
|
|
var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
|
|
|
|
module.exports = freeGlobal;
|
|
|
|
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(138)))
|
|
|
|
/***/ }),
|
|
/* 233 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/** Used for built-in method references. */
|
|
var funcProto = Function.prototype;
|
|
|
|
/** Used to resolve the decompiled source of functions. */
|
|
var funcToString = funcProto.toString;
|
|
|
|
/**
|
|
* Converts `func` to its source code.
|
|
*
|
|
* @private
|
|
* @param {Function} func The function to convert.
|
|
* @returns {string} Returns the source code.
|
|
*/
|
|
function toSource(func) {
|
|
if (func != null) {
|
|
try {
|
|
return funcToString.call(func);
|
|
} catch (e) {}
|
|
try {
|
|
return (func + '');
|
|
} catch (e) {}
|
|
}
|
|
return '';
|
|
}
|
|
|
|
module.exports = toSource;
|
|
|
|
|
|
/***/ }),
|
|
/* 234 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var Symbol = __webpack_require__(95),
|
|
arrayMap = __webpack_require__(83),
|
|
isArray = __webpack_require__(26),
|
|
isSymbol = __webpack_require__(113);
|
|
|
|
/** Used as references for various `Number` constants. */
|
|
var INFINITY = 1 / 0;
|
|
|
|
/** Used to convert symbols to primitives and strings. */
|
|
var symbolProto = Symbol ? Symbol.prototype : undefined,
|
|
symbolToString = symbolProto ? symbolProto.toString : undefined;
|
|
|
|
/**
|
|
* The base implementation of `_.toString` which doesn't convert nullish
|
|
* values to empty strings.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to process.
|
|
* @returns {string} Returns the string.
|
|
*/
|
|
function baseToString(value) {
|
|
// Exit early for strings to avoid a performance hit in some environments.
|
|
if (typeof value == 'string') {
|
|
return value;
|
|
}
|
|
if (isArray(value)) {
|
|
// Recursively convert values (susceptible to call stack limits).
|
|
return arrayMap(value, baseToString) + '';
|
|
}
|
|
if (isSymbol(value)) {
|
|
return symbolToString ? symbolToString.call(value) : '';
|
|
}
|
|
var result = (value + '');
|
|
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
|
}
|
|
|
|
module.exports = baseToString;
|
|
|
|
|
|
/***/ }),
|
|
/* 235 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var apply = __webpack_require__(231);
|
|
|
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
var nativeMax = Math.max;
|
|
|
|
/**
|
|
* A specialized version of `baseRest` which transforms the rest array.
|
|
*
|
|
* @private
|
|
* @param {Function} func The function to apply a rest parameter to.
|
|
* @param {number} [start=func.length-1] The start position of the rest parameter.
|
|
* @param {Function} transform The rest array transform.
|
|
* @returns {Function} Returns the new function.
|
|
*/
|
|
function overRest(func, start, transform) {
|
|
start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
|
|
return function() {
|
|
var args = arguments,
|
|
index = -1,
|
|
length = nativeMax(args.length - start, 0),
|
|
array = Array(length);
|
|
|
|
while (++index < length) {
|
|
array[index] = args[start + index];
|
|
}
|
|
index = -1;
|
|
var otherArgs = Array(start + 1);
|
|
while (++index < start) {
|
|
otherArgs[index] = args[index];
|
|
}
|
|
otherArgs[start] = transform(array);
|
|
return apply(func, this, otherArgs);
|
|
};
|
|
}
|
|
|
|
module.exports = overRest;
|
|
|
|
|
|
/***/ }),
|
|
/* 236 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseSetToString = __webpack_require__(533),
|
|
shortOut = __webpack_require__(535);
|
|
|
|
/**
|
|
* Sets the `toString` method of `func` to return `string`.
|
|
*
|
|
* @private
|
|
* @param {Function} func The function to modify.
|
|
* @param {Function} string The `toString` result.
|
|
* @returns {Function} Returns `func`.
|
|
*/
|
|
var setToString = shortOut(baseSetToString);
|
|
|
|
module.exports = setToString;
|
|
|
|
|
|
/***/ }),
|
|
/* 237 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var getNative = __webpack_require__(72);
|
|
|
|
var defineProperty = (function() {
|
|
try {
|
|
var func = getNative(Object, 'defineProperty');
|
|
func({}, '', {});
|
|
return func;
|
|
} catch (e) {}
|
|
}());
|
|
|
|
module.exports = defineProperty;
|
|
|
|
|
|
/***/ }),
|
|
/* 238 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var SetCache = __webpack_require__(121),
|
|
arrayIncludes = __webpack_require__(170),
|
|
arrayIncludesWith = __webpack_require__(171),
|
|
arrayMap = __webpack_require__(83),
|
|
baseUnary = __webpack_require__(172),
|
|
cacheHas = __webpack_require__(122);
|
|
|
|
/** Used as the size to enable large array optimizations. */
|
|
var LARGE_ARRAY_SIZE = 200;
|
|
|
|
/**
|
|
* The base implementation of methods like `_.difference` without support
|
|
* for excluding multiple arrays or iteratee shorthands.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to inspect.
|
|
* @param {Array} values The values to exclude.
|
|
* @param {Function} [iteratee] The iteratee invoked per element.
|
|
* @param {Function} [comparator] The comparator invoked per element.
|
|
* @returns {Array} Returns the new array of filtered values.
|
|
*/
|
|
function baseDifference(array, values, iteratee, comparator) {
|
|
var index = -1,
|
|
includes = arrayIncludes,
|
|
isCommon = true,
|
|
length = array.length,
|
|
result = [],
|
|
valuesLength = values.length;
|
|
|
|
if (!length) {
|
|
return result;
|
|
}
|
|
if (iteratee) {
|
|
values = arrayMap(values, baseUnary(iteratee));
|
|
}
|
|
if (comparator) {
|
|
includes = arrayIncludesWith;
|
|
isCommon = false;
|
|
}
|
|
else if (values.length >= LARGE_ARRAY_SIZE) {
|
|
includes = cacheHas;
|
|
isCommon = false;
|
|
values = new SetCache(values);
|
|
}
|
|
outer:
|
|
while (++index < length) {
|
|
var value = array[index],
|
|
computed = iteratee == null ? value : iteratee(value);
|
|
|
|
value = (comparator || value !== 0) ? value : 0;
|
|
if (isCommon && computed === computed) {
|
|
var valuesIndex = valuesLength;
|
|
while (valuesIndex--) {
|
|
if (values[valuesIndex] === computed) {
|
|
continue outer;
|
|
}
|
|
}
|
|
result.push(value);
|
|
}
|
|
else if (!includes(values, computed, comparator)) {
|
|
result.push(value);
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
module.exports = baseDifference;
|
|
|
|
|
|
/***/ }),
|
|
/* 239 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseFindIndex = __webpack_require__(240),
|
|
baseIsNaN = __webpack_require__(538),
|
|
strictIndexOf = __webpack_require__(539);
|
|
|
|
/**
|
|
* The base implementation of `_.indexOf` without `fromIndex` bounds checks.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to inspect.
|
|
* @param {*} value The value to search for.
|
|
* @param {number} fromIndex The index to search from.
|
|
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
*/
|
|
function baseIndexOf(array, value, fromIndex) {
|
|
return value === value
|
|
? strictIndexOf(array, value, fromIndex)
|
|
: baseFindIndex(array, baseIsNaN, fromIndex);
|
|
}
|
|
|
|
module.exports = baseIndexOf;
|
|
|
|
|
|
/***/ }),
|
|
/* 240 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* The base implementation of `_.findIndex` and `_.findLastIndex` without
|
|
* support for iteratee shorthands.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to inspect.
|
|
* @param {Function} predicate The function invoked per iteration.
|
|
* @param {number} fromIndex The index to search from.
|
|
* @param {boolean} [fromRight] Specify iterating from right to left.
|
|
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
*/
|
|
function baseFindIndex(array, predicate, fromIndex, fromRight) {
|
|
var length = array.length,
|
|
index = fromIndex + (fromRight ? 1 : -1);
|
|
|
|
while ((fromRight ? index-- : ++index < length)) {
|
|
if (predicate(array[index], index, array)) {
|
|
return index;
|
|
}
|
|
}
|
|
return -1;
|
|
}
|
|
|
|
module.exports = baseFindIndex;
|
|
|
|
|
|
/***/ }),
|
|
/* 241 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var ListCache = __webpack_require__(115),
|
|
stackClear = __webpack_require__(545),
|
|
stackDelete = __webpack_require__(546),
|
|
stackGet = __webpack_require__(547),
|
|
stackHas = __webpack_require__(548),
|
|
stackSet = __webpack_require__(549);
|
|
|
|
/**
|
|
* Creates a stack cache object to store key-value pairs.
|
|
*
|
|
* @private
|
|
* @constructor
|
|
* @param {Array} [entries] The key-value pairs to cache.
|
|
*/
|
|
function Stack(entries) {
|
|
var data = this.__data__ = new ListCache(entries);
|
|
this.size = data.size;
|
|
}
|
|
|
|
// Add methods to `Stack`.
|
|
Stack.prototype.clear = stackClear;
|
|
Stack.prototype['delete'] = stackDelete;
|
|
Stack.prototype.get = stackGet;
|
|
Stack.prototype.has = stackHas;
|
|
Stack.prototype.set = stackSet;
|
|
|
|
module.exports = Stack;
|
|
|
|
|
|
/***/ }),
|
|
/* 242 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var SetCache = __webpack_require__(121),
|
|
arraySome = __webpack_require__(243),
|
|
cacheHas = __webpack_require__(122);
|
|
|
|
/** Used to compose bitmasks for value comparisons. */
|
|
var COMPARE_PARTIAL_FLAG = 1,
|
|
COMPARE_UNORDERED_FLAG = 2;
|
|
|
|
/**
|
|
* A specialized version of `baseIsEqualDeep` for arrays with support for
|
|
* partial deep comparisons.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to compare.
|
|
* @param {Array} other The other array to compare.
|
|
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
|
|
* @param {Function} customizer The function to customize comparisons.
|
|
* @param {Function} equalFunc The function to determine equivalents of values.
|
|
* @param {Object} stack Tracks traversed `array` and `other` objects.
|
|
* @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
|
|
*/
|
|
function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
|
|
var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
|
|
arrLength = array.length,
|
|
othLength = other.length;
|
|
|
|
if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
|
|
return false;
|
|
}
|
|
// Assume cyclic values are equal.
|
|
var stacked = stack.get(array);
|
|
if (stacked && stack.get(other)) {
|
|
return stacked == other;
|
|
}
|
|
var index = -1,
|
|
result = true,
|
|
seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
|
|
|
|
stack.set(array, other);
|
|
stack.set(other, array);
|
|
|
|
// Ignore non-index properties.
|
|
while (++index < arrLength) {
|
|
var arrValue = array[index],
|
|
othValue = other[index];
|
|
|
|
if (customizer) {
|
|
var compared = isPartial
|
|
? customizer(othValue, arrValue, index, other, array, stack)
|
|
: customizer(arrValue, othValue, index, array, other, stack);
|
|
}
|
|
if (compared !== undefined) {
|
|
if (compared) {
|
|
continue;
|
|
}
|
|
result = false;
|
|
break;
|
|
}
|
|
// Recursively compare arrays (susceptible to call stack limits).
|
|
if (seen) {
|
|
if (!arraySome(other, function(othValue, othIndex) {
|
|
if (!cacheHas(seen, othIndex) &&
|
|
(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
|
|
return seen.push(othIndex);
|
|
}
|
|
})) {
|
|
result = false;
|
|
break;
|
|
}
|
|
} else if (!(
|
|
arrValue === othValue ||
|
|
equalFunc(arrValue, othValue, bitmask, customizer, stack)
|
|
)) {
|
|
result = false;
|
|
break;
|
|
}
|
|
}
|
|
stack['delete'](array);
|
|
stack['delete'](other);
|
|
return result;
|
|
}
|
|
|
|
module.exports = equalArrays;
|
|
|
|
|
|
/***/ }),
|
|
/* 243 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* A specialized version of `_.some` for arrays without support for iteratee
|
|
* shorthands.
|
|
*
|
|
* @private
|
|
* @param {Array} [array] The array to iterate over.
|
|
* @param {Function} predicate The function invoked per iteration.
|
|
* @returns {boolean} Returns `true` if any element passes the predicate check,
|
|
* else `false`.
|
|
*/
|
|
function arraySome(array, predicate) {
|
|
var index = -1,
|
|
length = array == null ? 0 : array.length;
|
|
|
|
while (++index < length) {
|
|
if (predicate(array[index], index, array)) {
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
module.exports = arraySome;
|
|
|
|
|
|
/***/ }),
|
|
/* 244 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* Appends the elements of `values` to `array`.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to modify.
|
|
* @param {Array} values The values to append.
|
|
* @returns {Array} Returns `array`.
|
|
*/
|
|
function arrayPush(array, values) {
|
|
var index = -1,
|
|
length = values.length,
|
|
offset = array.length;
|
|
|
|
while (++index < length) {
|
|
array[offset + index] = values[index];
|
|
}
|
|
return array;
|
|
}
|
|
|
|
module.exports = arrayPush;
|
|
|
|
|
|
/***/ }),
|
|
/* 245 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* A specialized version of `_.filter` for arrays without support for
|
|
* iteratee shorthands.
|
|
*
|
|
* @private
|
|
* @param {Array} [array] The array to iterate over.
|
|
* @param {Function} predicate The function invoked per iteration.
|
|
* @returns {Array} Returns the new filtered array.
|
|
*/
|
|
function arrayFilter(array, predicate) {
|
|
var index = -1,
|
|
length = array == null ? 0 : array.length,
|
|
resIndex = 0,
|
|
result = [];
|
|
|
|
while (++index < length) {
|
|
var value = array[index];
|
|
if (predicate(value, index, array)) {
|
|
result[resIndex++] = value;
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
module.exports = arrayFilter;
|
|
|
|
|
|
/***/ }),
|
|
/* 246 */
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = function(module) {
|
|
if (!module.webpackPolyfill) {
|
|
module.deprecate = function() {};
|
|
module.paths = [];
|
|
// module.parent = undefined by default
|
|
if (!module.children) module.children = [];
|
|
Object.defineProperty(module, "loaded", {
|
|
enumerable: true,
|
|
get: function() {
|
|
return module.l;
|
|
}
|
|
});
|
|
Object.defineProperty(module, "id", {
|
|
enumerable: true,
|
|
get: function() {
|
|
return module.i;
|
|
}
|
|
});
|
|
module.webpackPolyfill = 1;
|
|
}
|
|
return module;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 247 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/** Used for built-in method references. */
|
|
var objectProto = Object.prototype;
|
|
|
|
/**
|
|
* Checks if `value` is likely a prototype object.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
|
|
*/
|
|
function isPrototype(value) {
|
|
var Ctor = value && value.constructor,
|
|
proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
|
|
|
|
return value === proto;
|
|
}
|
|
|
|
module.exports = isPrototype;
|
|
|
|
|
|
/***/ }),
|
|
/* 248 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* Creates a unary function that invokes `func` with its argument transformed.
|
|
*
|
|
* @private
|
|
* @param {Function} func The function to wrap.
|
|
* @param {Function} transform The argument transform.
|
|
* @returns {Function} Returns the new function.
|
|
*/
|
|
function overArg(func, transform) {
|
|
return function(arg) {
|
|
return func(transform(arg));
|
|
};
|
|
}
|
|
|
|
module.exports = overArg;
|
|
|
|
|
|
/***/ }),
|
|
/* 249 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var getNative = __webpack_require__(72),
|
|
root = __webpack_require__(51);
|
|
|
|
/* Built-in method references that are verified to be native. */
|
|
var Set = getNative(root, 'Set');
|
|
|
|
module.exports = Set;
|
|
|
|
|
|
/***/ }),
|
|
/* 250 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var isObject = __webpack_require__(81);
|
|
|
|
/**
|
|
* Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` if suitable for strict
|
|
* equality comparisons, else `false`.
|
|
*/
|
|
function isStrictComparable(value) {
|
|
return value === value && !isObject(value);
|
|
}
|
|
|
|
module.exports = isStrictComparable;
|
|
|
|
|
|
/***/ }),
|
|
/* 251 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* A specialized version of `matchesProperty` for source values suitable
|
|
* for strict equality comparisons, i.e. `===`.
|
|
*
|
|
* @private
|
|
* @param {string} key The key of the property to get.
|
|
* @param {*} srcValue The value to match.
|
|
* @returns {Function} Returns the new spec function.
|
|
*/
|
|
function matchesStrictComparable(key, srcValue) {
|
|
return function(object) {
|
|
if (object == null) {
|
|
return false;
|
|
}
|
|
return object[key] === srcValue &&
|
|
(srcValue !== undefined || (key in Object(object)));
|
|
};
|
|
}
|
|
|
|
module.exports = matchesStrictComparable;
|
|
|
|
|
|
/***/ }),
|
|
/* 252 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseHasIn = __webpack_require__(571),
|
|
hasPath = __webpack_require__(253);
|
|
|
|
/**
|
|
* Checks if `path` is a direct or inherited property of `object`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Object
|
|
* @param {Object} object The object to query.
|
|
* @param {Array|string} path The path to check.
|
|
* @returns {boolean} Returns `true` if `path` exists, else `false`.
|
|
* @example
|
|
*
|
|
* var object = _.create({ 'a': _.create({ 'b': 2 }) });
|
|
*
|
|
* _.hasIn(object, 'a');
|
|
* // => true
|
|
*
|
|
* _.hasIn(object, 'a.b');
|
|
* // => true
|
|
*
|
|
* _.hasIn(object, ['a', 'b']);
|
|
* // => true
|
|
*
|
|
* _.hasIn(object, 'b');
|
|
* // => false
|
|
*/
|
|
function hasIn(object, path) {
|
|
return object != null && hasPath(object, path, baseHasIn);
|
|
}
|
|
|
|
module.exports = hasIn;
|
|
|
|
|
|
/***/ }),
|
|
/* 253 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var castPath = __webpack_require__(94),
|
|
isArguments = __webpack_require__(124),
|
|
isArray = __webpack_require__(26),
|
|
isIndex = __webpack_require__(125),
|
|
isLength = __webpack_require__(173),
|
|
toKey = __webpack_require__(84);
|
|
|
|
/**
|
|
* Checks if `path` exists on `object`.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to query.
|
|
* @param {Array|string} path The path to check.
|
|
* @param {Function} hasFunc The function to check properties.
|
|
* @returns {boolean} Returns `true` if `path` exists, else `false`.
|
|
*/
|
|
function hasPath(object, path, hasFunc) {
|
|
path = castPath(path, object);
|
|
|
|
var index = -1,
|
|
length = path.length,
|
|
result = false;
|
|
|
|
while (++index < length) {
|
|
var key = toKey(path[index]);
|
|
if (!(result = object != null && hasFunc(object, key))) {
|
|
break;
|
|
}
|
|
object = object[key];
|
|
}
|
|
if (result || ++index != length) {
|
|
return result;
|
|
}
|
|
length = object == null ? 0 : object.length;
|
|
return !!length && isLength(length) && isIndex(key, length) &&
|
|
(isArray(object) || isArguments(object));
|
|
}
|
|
|
|
module.exports = hasPath;
|
|
|
|
|
|
/***/ }),
|
|
/* 254 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* The base implementation of `_.property` without support for deep paths.
|
|
*
|
|
* @private
|
|
* @param {string} key The key of the property to get.
|
|
* @returns {Function} Returns the new accessor function.
|
|
*/
|
|
function baseProperty(key) {
|
|
return function(object) {
|
|
return object == null ? undefined : object[key];
|
|
};
|
|
}
|
|
|
|
module.exports = baseProperty;
|
|
|
|
|
|
/***/ }),
|
|
/* 255 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var toNumber = __webpack_require__(256);
|
|
|
|
/** Used as references for various `Number` constants. */
|
|
var INFINITY = 1 / 0,
|
|
MAX_INTEGER = 1.7976931348623157e+308;
|
|
|
|
/**
|
|
* Converts `value` to a finite number.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.12.0
|
|
* @category Lang
|
|
* @param {*} value The value to convert.
|
|
* @returns {number} Returns the converted number.
|
|
* @example
|
|
*
|
|
* _.toFinite(3.2);
|
|
* // => 3.2
|
|
*
|
|
* _.toFinite(Number.MIN_VALUE);
|
|
* // => 5e-324
|
|
*
|
|
* _.toFinite(Infinity);
|
|
* // => 1.7976931348623157e+308
|
|
*
|
|
* _.toFinite('3.2');
|
|
* // => 3.2
|
|
*/
|
|
function toFinite(value) {
|
|
if (!value) {
|
|
return value === 0 ? value : 0;
|
|
}
|
|
value = toNumber(value);
|
|
if (value === INFINITY || value === -INFINITY) {
|
|
var sign = (value < 0 ? -1 : 1);
|
|
return sign * MAX_INTEGER;
|
|
}
|
|
return value === value ? value : 0;
|
|
}
|
|
|
|
module.exports = toFinite;
|
|
|
|
|
|
/***/ }),
|
|
/* 256 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var isObject = __webpack_require__(81),
|
|
isSymbol = __webpack_require__(113);
|
|
|
|
/** Used as references for various `Number` constants. */
|
|
var NAN = 0 / 0;
|
|
|
|
/** Used to match leading and trailing whitespace. */
|
|
var reTrim = /^\s+|\s+$/g;
|
|
|
|
/** Used to detect bad signed hexadecimal string values. */
|
|
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
|
|
|
/** Used to detect binary string values. */
|
|
var reIsBinary = /^0b[01]+$/i;
|
|
|
|
/** Used to detect octal string values. */
|
|
var reIsOctal = /^0o[0-7]+$/i;
|
|
|
|
/** Built-in method references without a dependency on `root`. */
|
|
var freeParseInt = parseInt;
|
|
|
|
/**
|
|
* Converts `value` to a number.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category Lang
|
|
* @param {*} value The value to process.
|
|
* @returns {number} Returns the number.
|
|
* @example
|
|
*
|
|
* _.toNumber(3.2);
|
|
* // => 3.2
|
|
*
|
|
* _.toNumber(Number.MIN_VALUE);
|
|
* // => 5e-324
|
|
*
|
|
* _.toNumber(Infinity);
|
|
* // => Infinity
|
|
*
|
|
* _.toNumber('3.2');
|
|
* // => 3.2
|
|
*/
|
|
function toNumber(value) {
|
|
if (typeof value == 'number') {
|
|
return value;
|
|
}
|
|
if (isSymbol(value)) {
|
|
return NAN;
|
|
}
|
|
if (isObject(value)) {
|
|
var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
|
|
value = isObject(other) ? (other + '') : other;
|
|
}
|
|
if (typeof value != 'string') {
|
|
return value === 0 ? value : +value;
|
|
}
|
|
value = value.replace(reTrim, '');
|
|
var isBinary = reIsBinary.test(value);
|
|
return (isBinary || reIsOctal.test(value))
|
|
? freeParseInt(value.slice(2), isBinary ? 2 : 8)
|
|
: (reIsBadHex.test(value) ? NAN : +value);
|
|
}
|
|
|
|
module.exports = toNumber;
|
|
|
|
|
|
/***/ }),
|
|
/* 257 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var eq = __webpack_require__(117),
|
|
isArrayLike = __webpack_require__(52),
|
|
isIndex = __webpack_require__(125),
|
|
isObject = __webpack_require__(81);
|
|
|
|
/**
|
|
* Checks if the given arguments are from an iteratee call.
|
|
*
|
|
* @private
|
|
* @param {*} value The potential iteratee value argument.
|
|
* @param {*} index The potential iteratee index or key argument.
|
|
* @param {*} object The potential iteratee object argument.
|
|
* @returns {boolean} Returns `true` if the arguments are from an iteratee call,
|
|
* else `false`.
|
|
*/
|
|
function isIterateeCall(value, index, object) {
|
|
if (!isObject(object)) {
|
|
return false;
|
|
}
|
|
var type = typeof index;
|
|
if (type == 'number'
|
|
? (isArrayLike(object) && isIndex(index, object.length))
|
|
: (type == 'string' && index in object)
|
|
) {
|
|
return eq(object[index], value);
|
|
}
|
|
return false;
|
|
}
|
|
|
|
module.exports = isIterateeCall;
|
|
|
|
|
|
/***/ }),
|
|
/* 258 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var SetCache = __webpack_require__(121),
|
|
arrayIncludes = __webpack_require__(170),
|
|
arrayIncludesWith = __webpack_require__(171),
|
|
cacheHas = __webpack_require__(122),
|
|
createSet = __webpack_require__(579),
|
|
setToArray = __webpack_require__(175);
|
|
|
|
/** Used as the size to enable large array optimizations. */
|
|
var LARGE_ARRAY_SIZE = 200;
|
|
|
|
/**
|
|
* The base implementation of `_.uniqBy` without support for iteratee shorthands.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to inspect.
|
|
* @param {Function} [iteratee] The iteratee invoked per element.
|
|
* @param {Function} [comparator] The comparator invoked per element.
|
|
* @returns {Array} Returns the new duplicate free array.
|
|
*/
|
|
function baseUniq(array, iteratee, comparator) {
|
|
var index = -1,
|
|
includes = arrayIncludes,
|
|
length = array.length,
|
|
isCommon = true,
|
|
result = [],
|
|
seen = result;
|
|
|
|
if (comparator) {
|
|
isCommon = false;
|
|
includes = arrayIncludesWith;
|
|
}
|
|
else if (length >= LARGE_ARRAY_SIZE) {
|
|
var set = iteratee ? null : createSet(array);
|
|
if (set) {
|
|
return setToArray(set);
|
|
}
|
|
isCommon = false;
|
|
includes = cacheHas;
|
|
seen = new SetCache;
|
|
}
|
|
else {
|
|
seen = iteratee ? [] : result;
|
|
}
|
|
outer:
|
|
while (++index < length) {
|
|
var value = array[index],
|
|
computed = iteratee ? iteratee(value) : value;
|
|
|
|
value = (comparator || value !== 0) ? value : 0;
|
|
if (isCommon && computed === computed) {
|
|
var seenIndex = seen.length;
|
|
while (seenIndex--) {
|
|
if (seen[seenIndex] === computed) {
|
|
continue outer;
|
|
}
|
|
}
|
|
if (iteratee) {
|
|
seen.push(computed);
|
|
}
|
|
result.push(value);
|
|
}
|
|
else if (!includes(seen, computed, comparator)) {
|
|
if (seen !== result) {
|
|
seen.push(computed);
|
|
}
|
|
result.push(value);
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
module.exports = baseUniq;
|
|
|
|
|
|
/***/ }),
|
|
/* 259 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseHas = __webpack_require__(599),
|
|
hasPath = __webpack_require__(253);
|
|
|
|
/**
|
|
* Checks if `path` is a direct property of `object`.
|
|
*
|
|
* @static
|
|
* @since 0.1.0
|
|
* @memberOf _
|
|
* @category Object
|
|
* @param {Object} object The object to query.
|
|
* @param {Array|string} path The path to check.
|
|
* @returns {boolean} Returns `true` if `path` exists, else `false`.
|
|
* @example
|
|
*
|
|
* var object = { 'a': { 'b': 2 } };
|
|
* var other = _.create({ 'a': _.create({ 'b': 2 }) });
|
|
*
|
|
* _.has(object, 'a');
|
|
* // => true
|
|
*
|
|
* _.has(object, 'a.b');
|
|
* // => true
|
|
*
|
|
* _.has(object, ['a', 'b']);
|
|
* // => true
|
|
*
|
|
* _.has(other, 'a');
|
|
* // => false
|
|
*/
|
|
function has(object, path) {
|
|
return object != null && hasPath(object, path, baseHas);
|
|
}
|
|
|
|
module.exports = has;
|
|
|
|
|
|
/***/ }),
|
|
/* 260 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var assignValue = __webpack_require__(601),
|
|
castPath = __webpack_require__(94),
|
|
isIndex = __webpack_require__(125),
|
|
isObject = __webpack_require__(81),
|
|
toKey = __webpack_require__(84);
|
|
|
|
/**
|
|
* The base implementation of `_.set`.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to modify.
|
|
* @param {Array|string} path The path of the property to set.
|
|
* @param {*} value The value to set.
|
|
* @param {Function} [customizer] The function to customize path creation.
|
|
* @returns {Object} Returns `object`.
|
|
*/
|
|
function baseSet(object, path, value, customizer) {
|
|
if (!isObject(object)) {
|
|
return object;
|
|
}
|
|
path = castPath(path, object);
|
|
|
|
var index = -1,
|
|
length = path.length,
|
|
lastIndex = length - 1,
|
|
nested = object;
|
|
|
|
while (nested != null && ++index < length) {
|
|
var key = toKey(path[index]),
|
|
newValue = value;
|
|
|
|
if (index != lastIndex) {
|
|
var objValue = nested[key];
|
|
newValue = customizer ? customizer(objValue, key, nested) : undefined;
|
|
if (newValue === undefined) {
|
|
newValue = isObject(objValue)
|
|
? objValue
|
|
: (isIndex(path[index + 1]) ? [] : {});
|
|
}
|
|
}
|
|
assignValue(nested, key, newValue);
|
|
nested = nested[key];
|
|
}
|
|
return object;
|
|
}
|
|
|
|
module.exports = baseSet;
|
|
|
|
|
|
/***/ }),
|
|
/* 261 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* A specialized version of `_.reduce` for arrays without support for
|
|
* iteratee shorthands.
|
|
*
|
|
* @private
|
|
* @param {Array} [array] The array to iterate over.
|
|
* @param {Function} iteratee The function invoked per iteration.
|
|
* @param {*} [accumulator] The initial value.
|
|
* @param {boolean} [initAccum] Specify using the first element of `array` as
|
|
* the initial value.
|
|
* @returns {*} Returns the accumulated value.
|
|
*/
|
|
function arrayReduce(array, iteratee, accumulator, initAccum) {
|
|
var index = -1,
|
|
length = array == null ? 0 : array.length;
|
|
|
|
if (initAccum && length) {
|
|
accumulator = array[++index];
|
|
}
|
|
while (++index < length) {
|
|
accumulator = iteratee(accumulator, array[index], index, array);
|
|
}
|
|
return accumulator;
|
|
}
|
|
|
|
module.exports = arrayReduce;
|
|
|
|
|
|
/***/ }),
|
|
/* 262 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* @category Common Helpers
|
|
* @summary Is the given argument an instance of Date?
|
|
*
|
|
* @description
|
|
* Is the given argument an instance of Date?
|
|
*
|
|
* @param {*} argument - the argument to check
|
|
* @returns {Boolean} the given argument is an instance of Date
|
|
*
|
|
* @example
|
|
* // Is 'mayonnaise' a Date?
|
|
* var result = isDate('mayonnaise')
|
|
* //=> false
|
|
*/
|
|
function isDate (argument) {
|
|
return argument instanceof Date
|
|
}
|
|
|
|
module.exports = isDate
|
|
|
|
|
|
/***/ }),
|
|
/* 263 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var parse = __webpack_require__(42)
|
|
var startOfISOWeek = __webpack_require__(182)
|
|
|
|
/**
|
|
* @category ISO Week-Numbering Year Helpers
|
|
* @summary Get the ISO week-numbering year of the given date.
|
|
*
|
|
* @description
|
|
* Get the ISO week-numbering year of the given date,
|
|
* which always starts 3 days before the year's first Thursday.
|
|
*
|
|
* ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
|
|
*
|
|
* @param {Date|String|Number} date - the given date
|
|
* @returns {Number} the ISO week-numbering year
|
|
*
|
|
* @example
|
|
* // Which ISO-week numbering year is 2 January 2005?
|
|
* var result = getISOYear(new Date(2005, 0, 2))
|
|
* //=> 2004
|
|
*/
|
|
function getISOYear (dirtyDate) {
|
|
var date = parse(dirtyDate)
|
|
var year = date.getFullYear()
|
|
|
|
var fourthOfJanuaryOfNextYear = new Date(0)
|
|
fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4)
|
|
fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0)
|
|
var startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear)
|
|
|
|
var fourthOfJanuaryOfThisYear = new Date(0)
|
|
fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4)
|
|
fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0)
|
|
var startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear)
|
|
|
|
if (date.getTime() >= startOfNextYear.getTime()) {
|
|
return year + 1
|
|
} else if (date.getTime() >= startOfThisYear.getTime()) {
|
|
return year
|
|
} else {
|
|
return year - 1
|
|
}
|
|
}
|
|
|
|
module.exports = getISOYear
|
|
|
|
|
|
/***/ }),
|
|
/* 264 */
|
|
/***/ (function(module) {
|
|
|
|
module.exports = JSON.parse("{\"todayButton\":\"Today\",\"nextMonth\":\"Next month\",\"previousMonth\":\"Previous month\",\"nextYear\":\"Next year\",\"previousYear\":\"Previous year\",\"weekdays\":[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],\"months\":[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"]}");
|
|
|
|
/***/ }),
|
|
/* 265 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseUniq = __webpack_require__(258);
|
|
|
|
/**
|
|
* Creates a duplicate-free version of an array, using
|
|
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
* for equality comparisons, in which only the first occurrence of each element
|
|
* is kept. The order of result values is determined by the order they occur
|
|
* in the array.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Array
|
|
* @param {Array} array The array to inspect.
|
|
* @returns {Array} Returns the new duplicate free array.
|
|
* @example
|
|
*
|
|
* _.uniq([2, 1, 2]);
|
|
* // => [2, 1]
|
|
*/
|
|
function uniq(array) {
|
|
return (array && array.length) ? baseUniq(array) : [];
|
|
}
|
|
|
|
module.exports = uniq;
|
|
|
|
|
|
/***/ }),
|
|
/* 266 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseGetTag = __webpack_require__(50),
|
|
getPrototype = __webpack_require__(580),
|
|
isObjectLike = __webpack_require__(47);
|
|
|
|
/** `Object#toString` result references. */
|
|
var objectTag = '[object Object]';
|
|
|
|
/** Used for built-in method references. */
|
|
var funcProto = Function.prototype,
|
|
objectProto = Object.prototype;
|
|
|
|
/** Used to resolve the decompiled source of functions. */
|
|
var funcToString = funcProto.toString;
|
|
|
|
/** Used to check objects for own properties. */
|
|
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
|
|
/** Used to infer the `Object` constructor. */
|
|
var objectCtorString = funcToString.call(Object);
|
|
|
|
/**
|
|
* Checks if `value` is a plain object, that is, an object created by the
|
|
* `Object` constructor or one with a `[[Prototype]]` of `null`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.8.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
|
|
* @example
|
|
*
|
|
* function Foo() {
|
|
* this.a = 1;
|
|
* }
|
|
*
|
|
* _.isPlainObject(new Foo);
|
|
* // => false
|
|
*
|
|
* _.isPlainObject([1, 2, 3]);
|
|
* // => false
|
|
*
|
|
* _.isPlainObject({ 'x': 0, 'y': 0 });
|
|
* // => true
|
|
*
|
|
* _.isPlainObject(Object.create(null));
|
|
* // => true
|
|
*/
|
|
function isPlainObject(value) {
|
|
if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
|
|
return false;
|
|
}
|
|
var proto = getPrototype(value);
|
|
if (proto === null) {
|
|
return true;
|
|
}
|
|
var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
|
|
return typeof Ctor == 'function' && Ctor instanceof Ctor &&
|
|
funcToString.call(Ctor) == objectCtorString;
|
|
}
|
|
|
|
module.exports = isPlainObject;
|
|
|
|
|
|
/***/ }),
|
|
/* 267 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseGetTag = __webpack_require__(50),
|
|
isObjectLike = __webpack_require__(47);
|
|
|
|
/** `Object#toString` result references. */
|
|
var numberTag = '[object Number]';
|
|
|
|
/**
|
|
* Checks if `value` is classified as a `Number` primitive or object.
|
|
*
|
|
* **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
|
|
* classified as numbers, use the `_.isFinite` method.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a number, else `false`.
|
|
* @example
|
|
*
|
|
* _.isNumber(3);
|
|
* // => true
|
|
*
|
|
* _.isNumber(Number.MIN_VALUE);
|
|
* // => true
|
|
*
|
|
* _.isNumber(Infinity);
|
|
* // => true
|
|
*
|
|
* _.isNumber('3');
|
|
* // => false
|
|
*/
|
|
function isNumber(value) {
|
|
return typeof value == 'number' ||
|
|
(isObjectLike(value) && baseGetTag(value) == numberTag);
|
|
}
|
|
|
|
module.exports = isNumber;
|
|
|
|
|
|
/***/ }),
|
|
/* 268 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseGetTag = __webpack_require__(50),
|
|
isObjectLike = __webpack_require__(47);
|
|
|
|
/** `Object#toString` result references. */
|
|
var boolTag = '[object Boolean]';
|
|
|
|
/**
|
|
* Checks if `value` is classified as a boolean primitive or object.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Lang
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a boolean, else `false`.
|
|
* @example
|
|
*
|
|
* _.isBoolean(false);
|
|
* // => true
|
|
*
|
|
* _.isBoolean(null);
|
|
* // => false
|
|
*/
|
|
function isBoolean(value) {
|
|
return value === true || value === false ||
|
|
(isObjectLike(value) && baseGetTag(value) == boolTag);
|
|
}
|
|
|
|
module.exports = isBoolean;
|
|
|
|
|
|
/***/ }),
|
|
/* 269 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
module.exports = __webpack_require__(591);
|
|
|
|
|
|
/***/ }),
|
|
/* 270 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
if (true) {
|
|
module.exports = __webpack_require__(592);
|
|
} else {}
|
|
|
|
|
|
/***/ }),
|
|
/* 271 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseSet = __webpack_require__(260);
|
|
|
|
/**
|
|
* Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
|
|
* it's created. Arrays are created for missing index properties while objects
|
|
* are created for all other missing properties. Use `_.setWith` to customize
|
|
* `path` creation.
|
|
*
|
|
* **Note:** This method mutates `object`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.7.0
|
|
* @category Object
|
|
* @param {Object} object The object to modify.
|
|
* @param {Array|string} path The path of the property to set.
|
|
* @param {*} value The value to set.
|
|
* @returns {Object} Returns `object`.
|
|
* @example
|
|
*
|
|
* var object = { 'a': [{ 'b': { 'c': 3 } }] };
|
|
*
|
|
* _.set(object, 'a[0].b.c', 4);
|
|
* console.log(object.a[0].b.c);
|
|
* // => 4
|
|
*
|
|
* _.set(object, ['x', '0', 'y', 'z'], 5);
|
|
* console.log(object.x[0].y.z);
|
|
* // => 5
|
|
*/
|
|
function set(object, path, value) {
|
|
return object == null ? object : baseSet(object, path, value);
|
|
}
|
|
|
|
module.exports = set;
|
|
|
|
|
|
/***/ }),
|
|
/* 272 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var superPropBase = __webpack_require__(607);
|
|
|
|
function _get(target, property, receiver) {
|
|
if (typeof Reflect !== "undefined" && Reflect.get) {
|
|
module.exports = _get = Reflect.get;
|
|
} else {
|
|
module.exports = _get = function _get(target, property, receiver) {
|
|
var base = superPropBase(target, property);
|
|
if (!base) return;
|
|
var desc = Object.getOwnPropertyDescriptor(base, property);
|
|
|
|
if (desc.get) {
|
|
return desc.get.call(receiver);
|
|
}
|
|
|
|
return desc.value;
|
|
};
|
|
}
|
|
|
|
return _get(target, property, receiver || target);
|
|
}
|
|
|
|
module.exports = _get;
|
|
|
|
/***/ }),
|
|
/* 273 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* Creates an array with all falsey values removed. The values `false`, `null`,
|
|
* `0`, `""`, `undefined`, and `NaN` are falsey.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Array
|
|
* @param {Array} array The array to compact.
|
|
* @returns {Array} Returns the new array of filtered values.
|
|
* @example
|
|
*
|
|
* _.compact([0, 1, false, 2, '', 3]);
|
|
* // => [1, 2, 3]
|
|
*/
|
|
function compact(array) {
|
|
var index = -1,
|
|
length = array == null ? 0 : array.length,
|
|
resIndex = 0,
|
|
result = [];
|
|
|
|
while (++index < length) {
|
|
var value = array[index];
|
|
if (value) {
|
|
result[resIndex++] = value;
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
module.exports = compact;
|
|
|
|
|
|
/***/ }),
|
|
/* 274 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var arrayEvery = __webpack_require__(608),
|
|
baseEvery = __webpack_require__(609),
|
|
baseIteratee = __webpack_require__(73),
|
|
isArray = __webpack_require__(26),
|
|
isIterateeCall = __webpack_require__(257);
|
|
|
|
/**
|
|
* Checks if `predicate` returns truthy for **all** elements of `collection`.
|
|
* Iteration is stopped once `predicate` returns falsey. The predicate is
|
|
* invoked with three arguments: (value, index|key, collection).
|
|
*
|
|
* **Note:** This method returns `true` for
|
|
* [empty collections](https://en.wikipedia.org/wiki/Empty_set) because
|
|
* [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of
|
|
* elements of empty collections.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Collection
|
|
* @param {Array|Object} collection The collection to iterate over.
|
|
* @param {Function} [predicate=_.identity] The function invoked per iteration.
|
|
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
|
|
* @returns {boolean} Returns `true` if all elements pass the predicate check,
|
|
* else `false`.
|
|
* @example
|
|
*
|
|
* _.every([true, 1, null, 'yes'], Boolean);
|
|
* // => false
|
|
*
|
|
* var users = [
|
|
* { 'user': 'barney', 'age': 36, 'active': false },
|
|
* { 'user': 'fred', 'age': 40, 'active': false }
|
|
* ];
|
|
*
|
|
* // The `_.matches` iteratee shorthand.
|
|
* _.every(users, { 'user': 'barney', 'active': false });
|
|
* // => false
|
|
*
|
|
* // The `_.matchesProperty` iteratee shorthand.
|
|
* _.every(users, ['active', false]);
|
|
* // => true
|
|
*
|
|
* // The `_.property` iteratee shorthand.
|
|
* _.every(users, 'active');
|
|
* // => false
|
|
*/
|
|
function every(collection, predicate, guard) {
|
|
var func = isArray(collection) ? arrayEvery : baseEvery;
|
|
if (guard && isIterateeCall(collection, predicate, guard)) {
|
|
predicate = undefined;
|
|
}
|
|
return func(collection, baseIteratee(predicate, 3));
|
|
}
|
|
|
|
module.exports = every;
|
|
|
|
|
|
/***/ }),
|
|
/* 275 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var arrayReduce = __webpack_require__(261),
|
|
baseEach = __webpack_require__(86),
|
|
baseIteratee = __webpack_require__(73),
|
|
baseReduce = __webpack_require__(610),
|
|
isArray = __webpack_require__(26);
|
|
|
|
/**
|
|
* Reduces `collection` to a value which is the accumulated result of running
|
|
* each element in `collection` thru `iteratee`, where each successive
|
|
* invocation is supplied the return value of the previous. If `accumulator`
|
|
* is not given, the first element of `collection` is used as the initial
|
|
* value. The iteratee is invoked with four arguments:
|
|
* (accumulator, value, index|key, collection).
|
|
*
|
|
* Many lodash methods are guarded to work as iteratees for methods like
|
|
* `_.reduce`, `_.reduceRight`, and `_.transform`.
|
|
*
|
|
* The guarded methods are:
|
|
* `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
|
|
* and `sortBy`
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Collection
|
|
* @param {Array|Object} collection The collection to iterate over.
|
|
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
|
|
* @param {*} [accumulator] The initial value.
|
|
* @returns {*} Returns the accumulated value.
|
|
* @see _.reduceRight
|
|
* @example
|
|
*
|
|
* _.reduce([1, 2], function(sum, n) {
|
|
* return sum + n;
|
|
* }, 0);
|
|
* // => 3
|
|
*
|
|
* _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
|
|
* (result[value] || (result[value] = [])).push(key);
|
|
* return result;
|
|
* }, {});
|
|
* // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
|
|
*/
|
|
function reduce(collection, iteratee, accumulator) {
|
|
var func = isArray(collection) ? arrayReduce : baseReduce,
|
|
initAccum = arguments.length < 3;
|
|
|
|
return func(collection, baseIteratee(iteratee, 4), accumulator, initAccum, baseEach);
|
|
}
|
|
|
|
module.exports = reduce;
|
|
|
|
|
|
/***/ }),
|
|
/* 276 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var toString = __webpack_require__(82);
|
|
|
|
/**
|
|
* Used to match `RegExp`
|
|
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
|
*/
|
|
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
|
|
reHasRegExpChar = RegExp(reRegExpChar.source);
|
|
|
|
/**
|
|
* Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
|
|
* "?", "(", ")", "[", "]", "{", "}", and "|" in `string`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.0.0
|
|
* @category String
|
|
* @param {string} [string=''] The string to escape.
|
|
* @returns {string} Returns the escaped string.
|
|
* @example
|
|
*
|
|
* _.escapeRegExp('[lodash](https://lodash.com/)');
|
|
* // => '\[lodash\]\(https://lodash\.com/\)'
|
|
*/
|
|
function escapeRegExp(string) {
|
|
string = toString(string);
|
|
return (string && reHasRegExpChar.test(string))
|
|
? string.replace(reRegExpChar, '\\$&')
|
|
: string;
|
|
}
|
|
|
|
module.exports = escapeRegExp;
|
|
|
|
|
|
/***/ }),
|
|
/* 277 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var basePick = __webpack_require__(613),
|
|
flatRest = __webpack_require__(615);
|
|
|
|
/**
|
|
* Creates an object composed of the picked `object` properties.
|
|
*
|
|
* @static
|
|
* @since 0.1.0
|
|
* @memberOf _
|
|
* @category Object
|
|
* @param {Object} object The source object.
|
|
* @param {...(string|string[])} [paths] The property paths to pick.
|
|
* @returns {Object} Returns the new object.
|
|
* @example
|
|
*
|
|
* var object = { 'a': 1, 'b': '2', 'c': 3 };
|
|
*
|
|
* _.pick(object, ['a', 'c']);
|
|
* // => { 'a': 1, 'c': 3 }
|
|
*/
|
|
var pick = flatRest(function(object, paths) {
|
|
return object == null ? {} : basePick(object, paths);
|
|
});
|
|
|
|
module.exports = pick;
|
|
|
|
|
|
/***/ }),
|
|
/* 278 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseSlice = __webpack_require__(169),
|
|
toInteger = __webpack_require__(126);
|
|
|
|
/**
|
|
* Creates a slice of `array` with `n` elements dropped from the end.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.0.0
|
|
* @category Array
|
|
* @param {Array} array The array to query.
|
|
* @param {number} [n=1] The number of elements to drop.
|
|
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
|
|
* @returns {Array} Returns the slice of `array`.
|
|
* @example
|
|
*
|
|
* _.dropRight([1, 2, 3]);
|
|
* // => [1, 2]
|
|
*
|
|
* _.dropRight([1, 2, 3], 2);
|
|
* // => [1]
|
|
*
|
|
* _.dropRight([1, 2, 3], 5);
|
|
* // => []
|
|
*
|
|
* _.dropRight([1, 2, 3], 0);
|
|
* // => [1, 2, 3]
|
|
*/
|
|
function dropRight(array, n, guard) {
|
|
var length = array == null ? 0 : array.length;
|
|
if (!length) {
|
|
return [];
|
|
}
|
|
n = (guard || n === undefined) ? 1 : toInteger(n);
|
|
n = length - n;
|
|
return baseSlice(array, 0, n < 0 ? 0 : n);
|
|
}
|
|
|
|
module.exports = dropRight;
|
|
|
|
|
|
/***/ }),
|
|
/* 279 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseKeys = __webpack_require__(178),
|
|
getTag = __webpack_require__(179),
|
|
isArrayLike = __webpack_require__(52),
|
|
isString = __webpack_require__(128),
|
|
stringSize = __webpack_require__(618);
|
|
|
|
/** `Object#toString` result references. */
|
|
var mapTag = '[object Map]',
|
|
setTag = '[object Set]';
|
|
|
|
/**
|
|
* Gets the size of `collection` by returning its length for array-like
|
|
* values or the number of own enumerable string keyed properties for objects.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Collection
|
|
* @param {Array|Object|string} collection The collection to inspect.
|
|
* @returns {number} Returns the collection size.
|
|
* @example
|
|
*
|
|
* _.size([1, 2, 3]);
|
|
* // => 3
|
|
*
|
|
* _.size({ 'a': 1, 'b': 2 });
|
|
* // => 2
|
|
*
|
|
* _.size('pebbles');
|
|
* // => 7
|
|
*/
|
|
function size(collection) {
|
|
if (collection == null) {
|
|
return 0;
|
|
}
|
|
if (isArrayLike(collection)) {
|
|
return isString(collection) ? stringSize(collection) : collection.length;
|
|
}
|
|
var tag = getTag(collection);
|
|
if (tag == mapTag || tag == setTag) {
|
|
return collection.size;
|
|
}
|
|
return baseKeys(collection).length;
|
|
}
|
|
|
|
module.exports = size;
|
|
|
|
|
|
/***/ }),
|
|
/* 280 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseIsEqual = __webpack_require__(174);
|
|
|
|
/**
|
|
* Performs a deep comparison between two values to determine if they are
|
|
* equivalent.
|
|
*
|
|
* **Note:** This method supports comparing arrays, array buffers, booleans,
|
|
* date objects, error objects, maps, numbers, `Object` objects, regexes,
|
|
* sets, strings, symbols, and typed arrays. `Object` objects are compared
|
|
* by their own, not inherited, enumerable properties. Functions and DOM
|
|
* nodes are compared by strict equality, i.e. `===`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Lang
|
|
* @param {*} value The value to compare.
|
|
* @param {*} other The other value to compare.
|
|
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
* @example
|
|
*
|
|
* var object = { 'a': 1 };
|
|
* var other = { 'a': 1 };
|
|
*
|
|
* _.isEqual(object, other);
|
|
* // => true
|
|
*
|
|
* object === other;
|
|
* // => false
|
|
*/
|
|
function isEqual(value, other) {
|
|
return baseIsEqual(value, other);
|
|
}
|
|
|
|
module.exports = isEqual;
|
|
|
|
|
|
/***/ }),
|
|
/* 281 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
var isArray = Array.isArray;
|
|
var keyList = Object.keys;
|
|
var hasProp = Object.prototype.hasOwnProperty;
|
|
var hasElementType = typeof Element !== 'undefined';
|
|
|
|
function equal(a, b) {
|
|
// fast-deep-equal index.js 2.0.1
|
|
if (a === b) return true;
|
|
|
|
if (a && b && typeof a == 'object' && typeof b == 'object') {
|
|
var arrA = isArray(a)
|
|
, arrB = isArray(b)
|
|
, i
|
|
, length
|
|
, key;
|
|
|
|
if (arrA && arrB) {
|
|
length = a.length;
|
|
if (length != b.length) return false;
|
|
for (i = length; i-- !== 0;)
|
|
if (!equal(a[i], b[i])) return false;
|
|
return true;
|
|
}
|
|
|
|
if (arrA != arrB) return false;
|
|
|
|
var dateA = a instanceof Date
|
|
, dateB = b instanceof Date;
|
|
if (dateA != dateB) return false;
|
|
if (dateA && dateB) return a.getTime() == b.getTime();
|
|
|
|
var regexpA = a instanceof RegExp
|
|
, regexpB = b instanceof RegExp;
|
|
if (regexpA != regexpB) return false;
|
|
if (regexpA && regexpB) return a.toString() == b.toString();
|
|
|
|
var keys = keyList(a);
|
|
length = keys.length;
|
|
|
|
if (length !== keyList(b).length)
|
|
return false;
|
|
|
|
for (i = length; i-- !== 0;)
|
|
if (!hasProp.call(b, keys[i])) return false;
|
|
// end fast-deep-equal
|
|
|
|
// start react-fast-compare
|
|
// custom handling for DOM elements
|
|
if (hasElementType && a instanceof Element && b instanceof Element)
|
|
return a === b;
|
|
|
|
// custom handling for React
|
|
for (i = length; i-- !== 0;) {
|
|
key = keys[i];
|
|
if (key === '_owner' && a.$$typeof) {
|
|
// React-specific: avoid traversing React elements' _owner.
|
|
// _owner contains circular references
|
|
// and is not needed when comparing the actual elements (and not their owners)
|
|
// .$$typeof and ._store on just reasonable markers of a react element
|
|
continue;
|
|
} else {
|
|
// all other properties should be traversed as usual
|
|
if (!equal(a[key], b[key])) return false;
|
|
}
|
|
}
|
|
// end react-fast-compare
|
|
|
|
// fast-deep-equal index.js 2.0.1
|
|
return true;
|
|
}
|
|
|
|
return a !== a && b !== b;
|
|
}
|
|
// end fast-deep-equal
|
|
|
|
module.exports = function exportedEqual(a, b) {
|
|
try {
|
|
return equal(a, b);
|
|
} catch (error) {
|
|
if ((error.message && error.message.match(/stack|recursion/i)) || (error.number === -2146828260)) {
|
|
// warn on circular references, don't crash
|
|
// browsers give this different errors name and messages:
|
|
// chrome/safari: "RangeError", "Maximum call stack size exceeded"
|
|
// firefox: "InternalError", too much recursion"
|
|
// edge: "Error", "Out of stack space"
|
|
console.warn('Warning: react-fast-compare does not handle circular references.', error.name, error.message);
|
|
return false;
|
|
}
|
|
// some other error. we should definitely know about these
|
|
throw error;
|
|
}
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 282 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var getDayOfYear = __webpack_require__(621)
|
|
var getISOWeek = __webpack_require__(625)
|
|
var getISOYear = __webpack_require__(263)
|
|
var parse = __webpack_require__(42)
|
|
var isValid = __webpack_require__(133)
|
|
var enLocale = __webpack_require__(628)
|
|
|
|
/**
|
|
* @category Common Helpers
|
|
* @summary Format the date.
|
|
*
|
|
* @description
|
|
* Return the formatted date string in the given format.
|
|
*
|
|
* Accepted tokens:
|
|
* | Unit | Token | Result examples |
|
|
* |-------------------------|-------|----------------------------------|
|
|
* | Month | M | 1, 2, ..., 12 |
|
|
* | | Mo | 1st, 2nd, ..., 12th |
|
|
* | | MM | 01, 02, ..., 12 |
|
|
* | | MMM | Jan, Feb, ..., Dec |
|
|
* | | MMMM | January, February, ..., December |
|
|
* | Quarter | Q | 1, 2, 3, 4 |
|
|
* | | Qo | 1st, 2nd, 3rd, 4th |
|
|
* | Day of month | D | 1, 2, ..., 31 |
|
|
* | | Do | 1st, 2nd, ..., 31st |
|
|
* | | DD | 01, 02, ..., 31 |
|
|
* | Day of year | DDD | 1, 2, ..., 366 |
|
|
* | | DDDo | 1st, 2nd, ..., 366th |
|
|
* | | DDDD | 001, 002, ..., 366 |
|
|
* | Day of week | d | 0, 1, ..., 6 |
|
|
* | | do | 0th, 1st, ..., 6th |
|
|
* | | dd | Su, Mo, ..., Sa |
|
|
* | | ddd | Sun, Mon, ..., Sat |
|
|
* | | dddd | Sunday, Monday, ..., Saturday |
|
|
* | Day of ISO week | E | 1, 2, ..., 7 |
|
|
* | ISO week | W | 1, 2, ..., 53 |
|
|
* | | Wo | 1st, 2nd, ..., 53rd |
|
|
* | | WW | 01, 02, ..., 53 |
|
|
* | Year | YY | 00, 01, ..., 99 |
|
|
* | | YYYY | 1900, 1901, ..., 2099 |
|
|
* | ISO week-numbering year | GG | 00, 01, ..., 99 |
|
|
* | | GGGG | 1900, 1901, ..., 2099 |
|
|
* | AM/PM | A | AM, PM |
|
|
* | | a | am, pm |
|
|
* | | aa | a.m., p.m. |
|
|
* | Hour | H | 0, 1, ... 23 |
|
|
* | | HH | 00, 01, ... 23 |
|
|
* | | h | 1, 2, ..., 12 |
|
|
* | | hh | 01, 02, ..., 12 |
|
|
* | Minute | m | 0, 1, ..., 59 |
|
|
* | | mm | 00, 01, ..., 59 |
|
|
* | Second | s | 0, 1, ..., 59 |
|
|
* | | ss | 00, 01, ..., 59 |
|
|
* | 1/10 of second | S | 0, 1, ..., 9 |
|
|
* | 1/100 of second | SS | 00, 01, ..., 99 |
|
|
* | Millisecond | SSS | 000, 001, ..., 999 |
|
|
* | Timezone | Z | -01:00, +00:00, ... +12:00 |
|
|
* | | ZZ | -0100, +0000, ..., +1200 |
|
|
* | Seconds timestamp | X | 512969520 |
|
|
* | Milliseconds timestamp | x | 512969520900 |
|
|
*
|
|
* The characters wrapped in square brackets are escaped.
|
|
*
|
|
* The result may vary by locale.
|
|
*
|
|
* @param {Date|String|Number} date - the original date
|
|
* @param {String} [format='YYYY-MM-DDTHH:mm:ss.SSSZ'] - the string of tokens
|
|
* @param {Object} [options] - the object with options
|
|
* @param {Object} [options.locale=enLocale] - the locale object
|
|
* @returns {String} the formatted date string
|
|
*
|
|
* @example
|
|
* // Represent 11 February 2014 in middle-endian format:
|
|
* var result = format(
|
|
* new Date(2014, 1, 11),
|
|
* 'MM/DD/YYYY'
|
|
* )
|
|
* //=> '02/11/2014'
|
|
*
|
|
* @example
|
|
* // Represent 2 July 2014 in Esperanto:
|
|
* var eoLocale = require('date-fns/locale/eo')
|
|
* var result = format(
|
|
* new Date(2014, 6, 2),
|
|
* 'Do [de] MMMM YYYY',
|
|
* {locale: eoLocale}
|
|
* )
|
|
* //=> '2-a de julio 2014'
|
|
*/
|
|
function format (dirtyDate, dirtyFormatStr, dirtyOptions) {
|
|
var formatStr = dirtyFormatStr ? String(dirtyFormatStr) : 'YYYY-MM-DDTHH:mm:ss.SSSZ'
|
|
var options = dirtyOptions || {}
|
|
|
|
var locale = options.locale
|
|
var localeFormatters = enLocale.format.formatters
|
|
var formattingTokensRegExp = enLocale.format.formattingTokensRegExp
|
|
if (locale && locale.format && locale.format.formatters) {
|
|
localeFormatters = locale.format.formatters
|
|
|
|
if (locale.format.formattingTokensRegExp) {
|
|
formattingTokensRegExp = locale.format.formattingTokensRegExp
|
|
}
|
|
}
|
|
|
|
var date = parse(dirtyDate)
|
|
|
|
if (!isValid(date)) {
|
|
return 'Invalid Date'
|
|
}
|
|
|
|
var formatFn = buildFormatFn(formatStr, localeFormatters, formattingTokensRegExp)
|
|
|
|
return formatFn(date)
|
|
}
|
|
|
|
var formatters = {
|
|
// Month: 1, 2, ..., 12
|
|
'M': function (date) {
|
|
return date.getMonth() + 1
|
|
},
|
|
|
|
// Month: 01, 02, ..., 12
|
|
'MM': function (date) {
|
|
return addLeadingZeros(date.getMonth() + 1, 2)
|
|
},
|
|
|
|
// Quarter: 1, 2, 3, 4
|
|
'Q': function (date) {
|
|
return Math.ceil((date.getMonth() + 1) / 3)
|
|
},
|
|
|
|
// Day of month: 1, 2, ..., 31
|
|
'D': function (date) {
|
|
return date.getDate()
|
|
},
|
|
|
|
// Day of month: 01, 02, ..., 31
|
|
'DD': function (date) {
|
|
return addLeadingZeros(date.getDate(), 2)
|
|
},
|
|
|
|
// Day of year: 1, 2, ..., 366
|
|
'DDD': function (date) {
|
|
return getDayOfYear(date)
|
|
},
|
|
|
|
// Day of year: 001, 002, ..., 366
|
|
'DDDD': function (date) {
|
|
return addLeadingZeros(getDayOfYear(date), 3)
|
|
},
|
|
|
|
// Day of week: 0, 1, ..., 6
|
|
'd': function (date) {
|
|
return date.getDay()
|
|
},
|
|
|
|
// Day of ISO week: 1, 2, ..., 7
|
|
'E': function (date) {
|
|
return date.getDay() || 7
|
|
},
|
|
|
|
// ISO week: 1, 2, ..., 53
|
|
'W': function (date) {
|
|
return getISOWeek(date)
|
|
},
|
|
|
|
// ISO week: 01, 02, ..., 53
|
|
'WW': function (date) {
|
|
return addLeadingZeros(getISOWeek(date), 2)
|
|
},
|
|
|
|
// Year: 00, 01, ..., 99
|
|
'YY': function (date) {
|
|
return addLeadingZeros(date.getFullYear(), 4).substr(2)
|
|
},
|
|
|
|
// Year: 1900, 1901, ..., 2099
|
|
'YYYY': function (date) {
|
|
return addLeadingZeros(date.getFullYear(), 4)
|
|
},
|
|
|
|
// ISO week-numbering year: 00, 01, ..., 99
|
|
'GG': function (date) {
|
|
return String(getISOYear(date)).substr(2)
|
|
},
|
|
|
|
// ISO week-numbering year: 1900, 1901, ..., 2099
|
|
'GGGG': function (date) {
|
|
return getISOYear(date)
|
|
},
|
|
|
|
// Hour: 0, 1, ... 23
|
|
'H': function (date) {
|
|
return date.getHours()
|
|
},
|
|
|
|
// Hour: 00, 01, ..., 23
|
|
'HH': function (date) {
|
|
return addLeadingZeros(date.getHours(), 2)
|
|
},
|
|
|
|
// Hour: 1, 2, ..., 12
|
|
'h': function (date) {
|
|
var hours = date.getHours()
|
|
if (hours === 0) {
|
|
return 12
|
|
} else if (hours > 12) {
|
|
return hours % 12
|
|
} else {
|
|
return hours
|
|
}
|
|
},
|
|
|
|
// Hour: 01, 02, ..., 12
|
|
'hh': function (date) {
|
|
return addLeadingZeros(formatters['h'](date), 2)
|
|
},
|
|
|
|
// Minute: 0, 1, ..., 59
|
|
'm': function (date) {
|
|
return date.getMinutes()
|
|
},
|
|
|
|
// Minute: 00, 01, ..., 59
|
|
'mm': function (date) {
|
|
return addLeadingZeros(date.getMinutes(), 2)
|
|
},
|
|
|
|
// Second: 0, 1, ..., 59
|
|
's': function (date) {
|
|
return date.getSeconds()
|
|
},
|
|
|
|
// Second: 00, 01, ..., 59
|
|
'ss': function (date) {
|
|
return addLeadingZeros(date.getSeconds(), 2)
|
|
},
|
|
|
|
// 1/10 of second: 0, 1, ..., 9
|
|
'S': function (date) {
|
|
return Math.floor(date.getMilliseconds() / 100)
|
|
},
|
|
|
|
// 1/100 of second: 00, 01, ..., 99
|
|
'SS': function (date) {
|
|
return addLeadingZeros(Math.floor(date.getMilliseconds() / 10), 2)
|
|
},
|
|
|
|
// Millisecond: 000, 001, ..., 999
|
|
'SSS': function (date) {
|
|
return addLeadingZeros(date.getMilliseconds(), 3)
|
|
},
|
|
|
|
// Timezone: -01:00, +00:00, ... +12:00
|
|
'Z': function (date) {
|
|
return formatTimezone(date.getTimezoneOffset(), ':')
|
|
},
|
|
|
|
// Timezone: -0100, +0000, ... +1200
|
|
'ZZ': function (date) {
|
|
return formatTimezone(date.getTimezoneOffset())
|
|
},
|
|
|
|
// Seconds timestamp: 512969520
|
|
'X': function (date) {
|
|
return Math.floor(date.getTime() / 1000)
|
|
},
|
|
|
|
// Milliseconds timestamp: 512969520900
|
|
'x': function (date) {
|
|
return date.getTime()
|
|
}
|
|
}
|
|
|
|
function buildFormatFn (formatStr, localeFormatters, formattingTokensRegExp) {
|
|
var array = formatStr.match(formattingTokensRegExp)
|
|
var length = array.length
|
|
|
|
var i
|
|
var formatter
|
|
for (i = 0; i < length; i++) {
|
|
formatter = localeFormatters[array[i]] || formatters[array[i]]
|
|
if (formatter) {
|
|
array[i] = formatter
|
|
} else {
|
|
array[i] = removeFormattingTokens(array[i])
|
|
}
|
|
}
|
|
|
|
return function (date) {
|
|
var output = ''
|
|
for (var i = 0; i < length; i++) {
|
|
if (array[i] instanceof Function) {
|
|
output += array[i](date, formatters)
|
|
} else {
|
|
output += array[i]
|
|
}
|
|
}
|
|
return output
|
|
}
|
|
}
|
|
|
|
function removeFormattingTokens (input) {
|
|
if (input.match(/\[[\s\S]/)) {
|
|
return input.replace(/^\[|]$/g, '')
|
|
}
|
|
return input.replace(/\\/g, '')
|
|
}
|
|
|
|
function formatTimezone (offset, delimeter) {
|
|
delimeter = delimeter || ''
|
|
var sign = offset > 0 ? '-' : '+'
|
|
var absOffset = Math.abs(offset)
|
|
var hours = Math.floor(absOffset / 60)
|
|
var minutes = absOffset % 60
|
|
return sign + addLeadingZeros(hours, 2) + delimeter + addLeadingZeros(minutes, 2)
|
|
}
|
|
|
|
function addLeadingZeros (number, targetLength) {
|
|
var output = Math.abs(number).toString()
|
|
while (output.length < targetLength) {
|
|
output = '0' + output
|
|
}
|
|
return output
|
|
}
|
|
|
|
module.exports = format
|
|
|
|
|
|
/***/ }),
|
|
/* 283 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var parse = __webpack_require__(42)
|
|
|
|
/**
|
|
* @category Common Helpers
|
|
* @summary Compare the two dates and return -1, 0 or 1.
|
|
*
|
|
* @description
|
|
* Compare the two dates and return 1 if the first date is after the second,
|
|
* -1 if the first date is before the second or 0 if dates are equal.
|
|
*
|
|
* @param {Date|String|Number} dateLeft - the first date to compare
|
|
* @param {Date|String|Number} dateRight - the second date to compare
|
|
* @returns {Number} the result of the comparison
|
|
*
|
|
* @example
|
|
* // Compare 11 February 1987 and 10 July 1989:
|
|
* var result = compareAsc(
|
|
* new Date(1987, 1, 11),
|
|
* new Date(1989, 6, 10)
|
|
* )
|
|
* //=> -1
|
|
*
|
|
* @example
|
|
* // Sort the array of dates:
|
|
* var result = [
|
|
* new Date(1995, 6, 2),
|
|
* new Date(1987, 1, 11),
|
|
* new Date(1989, 6, 10)
|
|
* ].sort(compareAsc)
|
|
* //=> [
|
|
* // Wed Feb 11 1987 00:00:00,
|
|
* // Mon Jul 10 1989 00:00:00,
|
|
* // Sun Jul 02 1995 00:00:00
|
|
* // ]
|
|
*/
|
|
function compareAsc (dirtyDateLeft, dirtyDateRight) {
|
|
var dateLeft = parse(dirtyDateLeft)
|
|
var timeLeft = dateLeft.getTime()
|
|
var dateRight = parse(dirtyDateRight)
|
|
var timeRight = dateRight.getTime()
|
|
|
|
if (timeLeft < timeRight) {
|
|
return -1
|
|
} else if (timeLeft > timeRight) {
|
|
return 1
|
|
} else {
|
|
return 0
|
|
}
|
|
}
|
|
|
|
module.exports = compareAsc
|
|
|
|
|
|
/***/ }),
|
|
/* 284 */
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports=function(e){function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}var t={};return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},r.p="",r(r.s=0)}([function(e,r,t){"use strict";r.__esModule=!0,r.default=function(e,r){if(e&&r){var t=Array.isArray(r)?r:r.split(","),n=e.name||"",o=e.type||"",u=o.replace(/\/.*$/,"");return t.some(function(e){var r=e.trim();return"."===r.charAt(0)?n.toLowerCase().endsWith(r.toLowerCase()):r.endsWith("/*")?u===r.replace(/\/.*$/,""):o===r})}return!0}}]);
|
|
|
|
/***/ }),
|
|
/* 285 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var objectWithoutPropertiesLoose = __webpack_require__(648);
|
|
|
|
function _objectWithoutProperties(source, excluded) {
|
|
if (source == null) return {};
|
|
var target = objectWithoutPropertiesLoose(source, excluded);
|
|
var key, i;
|
|
|
|
if (Object.getOwnPropertySymbols) {
|
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
|
|
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
key = sourceSymbolKeys[i];
|
|
if (excluded.indexOf(key) >= 0) continue;
|
|
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
target[key] = source[key];
|
|
}
|
|
}
|
|
|
|
return target;
|
|
}
|
|
|
|
module.exports = _objectWithoutProperties;
|
|
|
|
/***/ }),
|
|
/* 286 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var createCompounder = __webpack_require__(649),
|
|
upperFirst = __webpack_require__(654);
|
|
|
|
/**
|
|
* Converts `string` to
|
|
* [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.1.0
|
|
* @category String
|
|
* @param {string} [string=''] The string to convert.
|
|
* @returns {string} Returns the start cased string.
|
|
* @example
|
|
*
|
|
* _.startCase('--foo-bar--');
|
|
* // => 'Foo Bar'
|
|
*
|
|
* _.startCase('fooBar');
|
|
* // => 'Foo Bar'
|
|
*
|
|
* _.startCase('__FOO_BAR__');
|
|
* // => 'FOO BAR'
|
|
*/
|
|
var startCase = createCompounder(function(result, word, index) {
|
|
return result + (index ? ' ' : '') + upperFirst(word);
|
|
});
|
|
|
|
module.exports = startCase;
|
|
|
|
|
|
/***/ }),
|
|
/* 287 */,
|
|
/* 288 */,
|
|
/* 289 */,
|
|
/* 290 */,
|
|
/* 291 */,
|
|
/* 292 */,
|
|
/* 293 */,
|
|
/* 294 */,
|
|
/* 295 */,
|
|
/* 296 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
__webpack_require__(297);
|
|
module.exports = __webpack_require__(660);
|
|
|
|
|
|
/***/ }),
|
|
/* 297 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
/* WEBPACK VAR INJECTION */(function(global) {
|
|
|
|
__webpack_require__(298);
|
|
|
|
__webpack_require__(495);
|
|
|
|
__webpack_require__(496);
|
|
|
|
if (global._babelPolyfill) {
|
|
throw new Error("only one instance of babel-polyfill is allowed");
|
|
}
|
|
global._babelPolyfill = true;
|
|
|
|
var DEFINE_PROPERTY = "defineProperty";
|
|
function define(O, key, value) {
|
|
O[key] || Object[DEFINE_PROPERTY](O, key, {
|
|
writable: true,
|
|
configurable: true,
|
|
value: value
|
|
});
|
|
}
|
|
|
|
define(String.prototype, "padLeft", "".padStart);
|
|
define(String.prototype, "padRight", "".padEnd);
|
|
|
|
"pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach(function (key) {
|
|
[][key] && define(Array, key, Function.call.bind([][key]));
|
|
});
|
|
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(138)))
|
|
|
|
/***/ }),
|
|
/* 298 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
__webpack_require__(299);
|
|
__webpack_require__(302);
|
|
__webpack_require__(303);
|
|
__webpack_require__(304);
|
|
__webpack_require__(305);
|
|
__webpack_require__(306);
|
|
__webpack_require__(307);
|
|
__webpack_require__(308);
|
|
__webpack_require__(309);
|
|
__webpack_require__(310);
|
|
__webpack_require__(311);
|
|
__webpack_require__(312);
|
|
__webpack_require__(313);
|
|
__webpack_require__(314);
|
|
__webpack_require__(315);
|
|
__webpack_require__(316);
|
|
__webpack_require__(317);
|
|
__webpack_require__(318);
|
|
__webpack_require__(319);
|
|
__webpack_require__(320);
|
|
__webpack_require__(321);
|
|
__webpack_require__(322);
|
|
__webpack_require__(323);
|
|
__webpack_require__(324);
|
|
__webpack_require__(325);
|
|
__webpack_require__(326);
|
|
__webpack_require__(327);
|
|
__webpack_require__(328);
|
|
__webpack_require__(329);
|
|
__webpack_require__(330);
|
|
__webpack_require__(331);
|
|
__webpack_require__(332);
|
|
__webpack_require__(333);
|
|
__webpack_require__(334);
|
|
__webpack_require__(335);
|
|
__webpack_require__(336);
|
|
__webpack_require__(337);
|
|
__webpack_require__(338);
|
|
__webpack_require__(339);
|
|
__webpack_require__(340);
|
|
__webpack_require__(341);
|
|
__webpack_require__(342);
|
|
__webpack_require__(343);
|
|
__webpack_require__(344);
|
|
__webpack_require__(345);
|
|
__webpack_require__(346);
|
|
__webpack_require__(347);
|
|
__webpack_require__(348);
|
|
__webpack_require__(349);
|
|
__webpack_require__(350);
|
|
__webpack_require__(351);
|
|
__webpack_require__(352);
|
|
__webpack_require__(353);
|
|
__webpack_require__(354);
|
|
__webpack_require__(355);
|
|
__webpack_require__(356);
|
|
__webpack_require__(357);
|
|
__webpack_require__(358);
|
|
__webpack_require__(359);
|
|
__webpack_require__(360);
|
|
__webpack_require__(361);
|
|
__webpack_require__(362);
|
|
__webpack_require__(363);
|
|
__webpack_require__(364);
|
|
__webpack_require__(365);
|
|
__webpack_require__(366);
|
|
__webpack_require__(367);
|
|
__webpack_require__(368);
|
|
__webpack_require__(369);
|
|
__webpack_require__(370);
|
|
__webpack_require__(371);
|
|
__webpack_require__(372);
|
|
__webpack_require__(373);
|
|
__webpack_require__(374);
|
|
__webpack_require__(375);
|
|
__webpack_require__(376);
|
|
__webpack_require__(377);
|
|
__webpack_require__(379);
|
|
__webpack_require__(380);
|
|
__webpack_require__(382);
|
|
__webpack_require__(383);
|
|
__webpack_require__(384);
|
|
__webpack_require__(385);
|
|
__webpack_require__(386);
|
|
__webpack_require__(387);
|
|
__webpack_require__(388);
|
|
__webpack_require__(390);
|
|
__webpack_require__(391);
|
|
__webpack_require__(392);
|
|
__webpack_require__(393);
|
|
__webpack_require__(394);
|
|
__webpack_require__(395);
|
|
__webpack_require__(396);
|
|
__webpack_require__(397);
|
|
__webpack_require__(398);
|
|
__webpack_require__(399);
|
|
__webpack_require__(400);
|
|
__webpack_require__(401);
|
|
__webpack_require__(402);
|
|
__webpack_require__(159);
|
|
__webpack_require__(403);
|
|
__webpack_require__(213);
|
|
__webpack_require__(404);
|
|
__webpack_require__(214);
|
|
__webpack_require__(405);
|
|
__webpack_require__(406);
|
|
__webpack_require__(407);
|
|
__webpack_require__(408);
|
|
__webpack_require__(409);
|
|
__webpack_require__(217);
|
|
__webpack_require__(219);
|
|
__webpack_require__(220);
|
|
__webpack_require__(410);
|
|
__webpack_require__(411);
|
|
__webpack_require__(412);
|
|
__webpack_require__(413);
|
|
__webpack_require__(414);
|
|
__webpack_require__(415);
|
|
__webpack_require__(416);
|
|
__webpack_require__(417);
|
|
__webpack_require__(418);
|
|
__webpack_require__(419);
|
|
__webpack_require__(420);
|
|
__webpack_require__(421);
|
|
__webpack_require__(422);
|
|
__webpack_require__(423);
|
|
__webpack_require__(424);
|
|
__webpack_require__(425);
|
|
__webpack_require__(426);
|
|
__webpack_require__(427);
|
|
__webpack_require__(428);
|
|
__webpack_require__(429);
|
|
__webpack_require__(430);
|
|
__webpack_require__(431);
|
|
__webpack_require__(432);
|
|
__webpack_require__(433);
|
|
__webpack_require__(434);
|
|
__webpack_require__(435);
|
|
__webpack_require__(436);
|
|
__webpack_require__(437);
|
|
__webpack_require__(438);
|
|
__webpack_require__(439);
|
|
__webpack_require__(440);
|
|
__webpack_require__(441);
|
|
__webpack_require__(442);
|
|
__webpack_require__(443);
|
|
__webpack_require__(444);
|
|
__webpack_require__(445);
|
|
__webpack_require__(446);
|
|
__webpack_require__(447);
|
|
__webpack_require__(448);
|
|
__webpack_require__(449);
|
|
__webpack_require__(450);
|
|
__webpack_require__(451);
|
|
__webpack_require__(452);
|
|
__webpack_require__(453);
|
|
__webpack_require__(454);
|
|
__webpack_require__(455);
|
|
__webpack_require__(456);
|
|
__webpack_require__(457);
|
|
__webpack_require__(458);
|
|
__webpack_require__(459);
|
|
__webpack_require__(460);
|
|
__webpack_require__(461);
|
|
__webpack_require__(462);
|
|
__webpack_require__(463);
|
|
__webpack_require__(464);
|
|
__webpack_require__(465);
|
|
__webpack_require__(466);
|
|
__webpack_require__(467);
|
|
__webpack_require__(468);
|
|
__webpack_require__(469);
|
|
__webpack_require__(470);
|
|
__webpack_require__(471);
|
|
__webpack_require__(472);
|
|
__webpack_require__(473);
|
|
__webpack_require__(474);
|
|
__webpack_require__(475);
|
|
__webpack_require__(476);
|
|
__webpack_require__(477);
|
|
__webpack_require__(478);
|
|
__webpack_require__(479);
|
|
__webpack_require__(480);
|
|
__webpack_require__(481);
|
|
__webpack_require__(482);
|
|
__webpack_require__(483);
|
|
__webpack_require__(484);
|
|
__webpack_require__(485);
|
|
__webpack_require__(486);
|
|
__webpack_require__(487);
|
|
__webpack_require__(488);
|
|
__webpack_require__(489);
|
|
__webpack_require__(490);
|
|
__webpack_require__(491);
|
|
__webpack_require__(492);
|
|
__webpack_require__(493);
|
|
__webpack_require__(494);
|
|
module.exports = __webpack_require__(37);
|
|
|
|
|
|
/***/ }),
|
|
/* 299 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
// ECMAScript 6 symbols shim
|
|
var global = __webpack_require__(16);
|
|
var has = __webpack_require__(33);
|
|
var DESCRIPTORS = __webpack_require__(21);
|
|
var $export = __webpack_require__(3);
|
|
var redefine = __webpack_require__(30);
|
|
var META = __webpack_require__(56).KEY;
|
|
var $fails = __webpack_require__(17);
|
|
var shared = __webpack_require__(89);
|
|
var setToStringTag = __webpack_require__(77);
|
|
var uid = __webpack_require__(62);
|
|
var wks = __webpack_require__(19);
|
|
var wksExt = __webpack_require__(195);
|
|
var wksDefine = __webpack_require__(140);
|
|
var enumKeys = __webpack_require__(301);
|
|
var isArray = __webpack_require__(101);
|
|
var anObject = __webpack_require__(9);
|
|
var isObject = __webpack_require__(18);
|
|
var toObject = __webpack_require__(23);
|
|
var toIObject = __webpack_require__(34);
|
|
var toPrimitive = __webpack_require__(43);
|
|
var createDesc = __webpack_require__(61);
|
|
var _create = __webpack_require__(65);
|
|
var gOPNExt = __webpack_require__(198);
|
|
var $GOPD = __webpack_require__(35);
|
|
var $GOPS = __webpack_require__(100);
|
|
var $DP = __webpack_require__(22);
|
|
var $keys = __webpack_require__(63);
|
|
var gOPD = $GOPD.f;
|
|
var dP = $DP.f;
|
|
var gOPN = gOPNExt.f;
|
|
var $Symbol = global.Symbol;
|
|
var $JSON = global.JSON;
|
|
var _stringify = $JSON && $JSON.stringify;
|
|
var PROTOTYPE = 'prototype';
|
|
var HIDDEN = wks('_hidden');
|
|
var TO_PRIMITIVE = wks('toPrimitive');
|
|
var isEnum = {}.propertyIsEnumerable;
|
|
var SymbolRegistry = shared('symbol-registry');
|
|
var AllSymbols = shared('symbols');
|
|
var OPSymbols = shared('op-symbols');
|
|
var ObjectProto = Object[PROTOTYPE];
|
|
var USE_NATIVE = typeof $Symbol == 'function' && !!$GOPS.f;
|
|
var QObject = global.QObject;
|
|
// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
|
|
var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
|
|
|
|
// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
|
|
var setSymbolDesc = DESCRIPTORS && $fails(function () {
|
|
return _create(dP({}, 'a', {
|
|
get: function () { return dP(this, 'a', { value: 7 }).a; }
|
|
})).a != 7;
|
|
}) ? function (it, key, D) {
|
|
var protoDesc = gOPD(ObjectProto, key);
|
|
if (protoDesc) delete ObjectProto[key];
|
|
dP(it, key, D);
|
|
if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);
|
|
} : dP;
|
|
|
|
var wrap = function (tag) {
|
|
var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);
|
|
sym._k = tag;
|
|
return sym;
|
|
};
|
|
|
|
var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {
|
|
return typeof it == 'symbol';
|
|
} : function (it) {
|
|
return it instanceof $Symbol;
|
|
};
|
|
|
|
var $defineProperty = function defineProperty(it, key, D) {
|
|
if (it === ObjectProto) $defineProperty(OPSymbols, key, D);
|
|
anObject(it);
|
|
key = toPrimitive(key, true);
|
|
anObject(D);
|
|
if (has(AllSymbols, key)) {
|
|
if (!D.enumerable) {
|
|
if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));
|
|
it[HIDDEN][key] = true;
|
|
} else {
|
|
if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;
|
|
D = _create(D, { enumerable: createDesc(0, false) });
|
|
} return setSymbolDesc(it, key, D);
|
|
} return dP(it, key, D);
|
|
};
|
|
var $defineProperties = function defineProperties(it, P) {
|
|
anObject(it);
|
|
var keys = enumKeys(P = toIObject(P));
|
|
var i = 0;
|
|
var l = keys.length;
|
|
var key;
|
|
while (l > i) $defineProperty(it, key = keys[i++], P[key]);
|
|
return it;
|
|
};
|
|
var $create = function create(it, P) {
|
|
return P === undefined ? _create(it) : $defineProperties(_create(it), P);
|
|
};
|
|
var $propertyIsEnumerable = function propertyIsEnumerable(key) {
|
|
var E = isEnum.call(this, key = toPrimitive(key, true));
|
|
if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;
|
|
return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;
|
|
};
|
|
var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {
|
|
it = toIObject(it);
|
|
key = toPrimitive(key, true);
|
|
if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;
|
|
var D = gOPD(it, key);
|
|
if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;
|
|
return D;
|
|
};
|
|
var $getOwnPropertyNames = function getOwnPropertyNames(it) {
|
|
var names = gOPN(toIObject(it));
|
|
var result = [];
|
|
var i = 0;
|
|
var key;
|
|
while (names.length > i) {
|
|
if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);
|
|
} return result;
|
|
};
|
|
var $getOwnPropertySymbols = function getOwnPropertySymbols(it) {
|
|
var IS_OP = it === ObjectProto;
|
|
var names = gOPN(IS_OP ? OPSymbols : toIObject(it));
|
|
var result = [];
|
|
var i = 0;
|
|
var key;
|
|
while (names.length > i) {
|
|
if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);
|
|
} return result;
|
|
};
|
|
|
|
// 19.4.1.1 Symbol([description])
|
|
if (!USE_NATIVE) {
|
|
$Symbol = function Symbol() {
|
|
if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');
|
|
var tag = uid(arguments.length > 0 ? arguments[0] : undefined);
|
|
var $set = function (value) {
|
|
if (this === ObjectProto) $set.call(OPSymbols, value);
|
|
if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
|
|
setSymbolDesc(this, tag, createDesc(1, value));
|
|
};
|
|
if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });
|
|
return wrap(tag);
|
|
};
|
|
redefine($Symbol[PROTOTYPE], 'toString', function toString() {
|
|
return this._k;
|
|
});
|
|
|
|
$GOPD.f = $getOwnPropertyDescriptor;
|
|
$DP.f = $defineProperty;
|
|
__webpack_require__(66).f = gOPNExt.f = $getOwnPropertyNames;
|
|
__webpack_require__(91).f = $propertyIsEnumerable;
|
|
$GOPS.f = $getOwnPropertySymbols;
|
|
|
|
if (DESCRIPTORS && !__webpack_require__(55)) {
|
|
redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);
|
|
}
|
|
|
|
wksExt.f = function (name) {
|
|
return wrap(wks(name));
|
|
};
|
|
}
|
|
|
|
$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });
|
|
|
|
for (var es6Symbols = (
|
|
// 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14
|
|
'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'
|
|
).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);
|
|
|
|
for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);
|
|
|
|
$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {
|
|
// 19.4.2.1 Symbol.for(key)
|
|
'for': function (key) {
|
|
return has(SymbolRegistry, key += '')
|
|
? SymbolRegistry[key]
|
|
: SymbolRegistry[key] = $Symbol(key);
|
|
},
|
|
// 19.4.2.5 Symbol.keyFor(sym)
|
|
keyFor: function keyFor(sym) {
|
|
if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');
|
|
for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;
|
|
},
|
|
useSetter: function () { setter = true; },
|
|
useSimple: function () { setter = false; }
|
|
});
|
|
|
|
$export($export.S + $export.F * !USE_NATIVE, 'Object', {
|
|
// 19.1.2.2 Object.create(O [, Properties])
|
|
create: $create,
|
|
// 19.1.2.4 Object.defineProperty(O, P, Attributes)
|
|
defineProperty: $defineProperty,
|
|
// 19.1.2.3 Object.defineProperties(O, Properties)
|
|
defineProperties: $defineProperties,
|
|
// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
|
|
getOwnPropertyDescriptor: $getOwnPropertyDescriptor,
|
|
// 19.1.2.7 Object.getOwnPropertyNames(O)
|
|
getOwnPropertyNames: $getOwnPropertyNames,
|
|
// 19.1.2.8 Object.getOwnPropertySymbols(O)
|
|
getOwnPropertySymbols: $getOwnPropertySymbols
|
|
});
|
|
|
|
// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives
|
|
// https://bugs.chromium.org/p/v8/issues/detail?id=3443
|
|
var FAILS_ON_PRIMITIVES = $fails(function () { $GOPS.f(1); });
|
|
|
|
$export($export.S + $export.F * FAILS_ON_PRIMITIVES, 'Object', {
|
|
getOwnPropertySymbols: function getOwnPropertySymbols(it) {
|
|
return $GOPS.f(toObject(it));
|
|
}
|
|
});
|
|
|
|
// 24.3.2 JSON.stringify(value [, replacer [, space]])
|
|
$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {
|
|
var S = $Symbol();
|
|
// MS Edge converts symbol values to JSON as {}
|
|
// WebKit converts symbol values to JSON as null
|
|
// V8 throws on boxed symbols
|
|
return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';
|
|
})), 'JSON', {
|
|
stringify: function stringify(it) {
|
|
var args = [it];
|
|
var i = 1;
|
|
var replacer, $replacer;
|
|
while (arguments.length > i) args.push(arguments[i++]);
|
|
$replacer = replacer = args[1];
|
|
if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
|
|
if (!isArray(replacer)) replacer = function (key, value) {
|
|
if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
|
|
if (!isSymbol(value)) return value;
|
|
};
|
|
args[1] = replacer;
|
|
return _stringify.apply($JSON, args);
|
|
}
|
|
});
|
|
|
|
// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)
|
|
$Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(29)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
|
|
// 19.4.3.5 Symbol.prototype[@@toStringTag]
|
|
setToStringTag($Symbol, 'Symbol');
|
|
// 20.2.1.9 Math[@@toStringTag]
|
|
setToStringTag(Math, 'Math', true);
|
|
// 24.3.3 JSON[@@toStringTag]
|
|
setToStringTag(global.JSON, 'JSON', true);
|
|
|
|
|
|
/***/ }),
|
|
/* 300 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
module.exports = __webpack_require__(89)('native-function-to-string', Function.toString);
|
|
|
|
|
|
/***/ }),
|
|
/* 301 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// all enumerable object keys, includes symbols
|
|
var getKeys = __webpack_require__(63);
|
|
var gOPS = __webpack_require__(100);
|
|
var pIE = __webpack_require__(91);
|
|
module.exports = function (it) {
|
|
var result = getKeys(it);
|
|
var getSymbols = gOPS.f;
|
|
if (getSymbols) {
|
|
var symbols = getSymbols(it);
|
|
var isEnum = pIE.f;
|
|
var i = 0;
|
|
var key;
|
|
while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);
|
|
} return result;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 302 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var $export = __webpack_require__(3);
|
|
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
|
|
$export($export.S, 'Object', { create: __webpack_require__(65) });
|
|
|
|
|
|
/***/ }),
|
|
/* 303 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var $export = __webpack_require__(3);
|
|
// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
|
|
$export($export.S + $export.F * !__webpack_require__(21), 'Object', { defineProperty: __webpack_require__(22).f });
|
|
|
|
|
|
/***/ }),
|
|
/* 304 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var $export = __webpack_require__(3);
|
|
// 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties)
|
|
$export($export.S + $export.F * !__webpack_require__(21), 'Object', { defineProperties: __webpack_require__(197) });
|
|
|
|
|
|
/***/ }),
|
|
/* 305 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
|
|
var toIObject = __webpack_require__(34);
|
|
var $getOwnPropertyDescriptor = __webpack_require__(35).f;
|
|
|
|
__webpack_require__(45)('getOwnPropertyDescriptor', function () {
|
|
return function getOwnPropertyDescriptor(it, key) {
|
|
return $getOwnPropertyDescriptor(toIObject(it), key);
|
|
};
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 306 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 19.1.2.9 Object.getPrototypeOf(O)
|
|
var toObject = __webpack_require__(23);
|
|
var $getPrototypeOf = __webpack_require__(36);
|
|
|
|
__webpack_require__(45)('getPrototypeOf', function () {
|
|
return function getPrototypeOf(it) {
|
|
return $getPrototypeOf(toObject(it));
|
|
};
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 307 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 19.1.2.14 Object.keys(O)
|
|
var toObject = __webpack_require__(23);
|
|
var $keys = __webpack_require__(63);
|
|
|
|
__webpack_require__(45)('keys', function () {
|
|
return function keys(it) {
|
|
return $keys(toObject(it));
|
|
};
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 308 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 19.1.2.7 Object.getOwnPropertyNames(O)
|
|
__webpack_require__(45)('getOwnPropertyNames', function () {
|
|
return __webpack_require__(198).f;
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 309 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 19.1.2.5 Object.freeze(O)
|
|
var isObject = __webpack_require__(18);
|
|
var meta = __webpack_require__(56).onFreeze;
|
|
|
|
__webpack_require__(45)('freeze', function ($freeze) {
|
|
return function freeze(it) {
|
|
return $freeze && isObject(it) ? $freeze(meta(it)) : it;
|
|
};
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 310 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 19.1.2.17 Object.seal(O)
|
|
var isObject = __webpack_require__(18);
|
|
var meta = __webpack_require__(56).onFreeze;
|
|
|
|
__webpack_require__(45)('seal', function ($seal) {
|
|
return function seal(it) {
|
|
return $seal && isObject(it) ? $seal(meta(it)) : it;
|
|
};
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 311 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 19.1.2.15 Object.preventExtensions(O)
|
|
var isObject = __webpack_require__(18);
|
|
var meta = __webpack_require__(56).onFreeze;
|
|
|
|
__webpack_require__(45)('preventExtensions', function ($preventExtensions) {
|
|
return function preventExtensions(it) {
|
|
return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it;
|
|
};
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 312 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 19.1.2.12 Object.isFrozen(O)
|
|
var isObject = __webpack_require__(18);
|
|
|
|
__webpack_require__(45)('isFrozen', function ($isFrozen) {
|
|
return function isFrozen(it) {
|
|
return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true;
|
|
};
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 313 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 19.1.2.13 Object.isSealed(O)
|
|
var isObject = __webpack_require__(18);
|
|
|
|
__webpack_require__(45)('isSealed', function ($isSealed) {
|
|
return function isSealed(it) {
|
|
return isObject(it) ? $isSealed ? $isSealed(it) : false : true;
|
|
};
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 314 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 19.1.2.11 Object.isExtensible(O)
|
|
var isObject = __webpack_require__(18);
|
|
|
|
__webpack_require__(45)('isExtensible', function ($isExtensible) {
|
|
return function isExtensible(it) {
|
|
return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false;
|
|
};
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 315 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 19.1.3.1 Object.assign(target, source)
|
|
var $export = __webpack_require__(3);
|
|
|
|
$export($export.S + $export.F, 'Object', { assign: __webpack_require__(199) });
|
|
|
|
|
|
/***/ }),
|
|
/* 316 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 19.1.3.10 Object.is(value1, value2)
|
|
var $export = __webpack_require__(3);
|
|
$export($export.S, 'Object', { is: __webpack_require__(200) });
|
|
|
|
|
|
/***/ }),
|
|
/* 317 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 19.1.3.19 Object.setPrototypeOf(O, proto)
|
|
var $export = __webpack_require__(3);
|
|
$export($export.S, 'Object', { setPrototypeOf: __webpack_require__(144).set });
|
|
|
|
|
|
/***/ }),
|
|
/* 318 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
// 19.1.3.6 Object.prototype.toString()
|
|
var classof = __webpack_require__(78);
|
|
var test = {};
|
|
test[__webpack_require__(19)('toStringTag')] = 'z';
|
|
if (test + '' != '[object z]') {
|
|
__webpack_require__(30)(Object.prototype, 'toString', function toString() {
|
|
return '[object ' + classof(this) + ']';
|
|
}, true);
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
/* 319 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...)
|
|
var $export = __webpack_require__(3);
|
|
|
|
$export($export.P, 'Function', { bind: __webpack_require__(201) });
|
|
|
|
|
|
/***/ }),
|
|
/* 320 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var dP = __webpack_require__(22).f;
|
|
var FProto = Function.prototype;
|
|
var nameRE = /^\s*function ([^ (]*)/;
|
|
var NAME = 'name';
|
|
|
|
// 19.2.4.2 name
|
|
NAME in FProto || __webpack_require__(21) && dP(FProto, NAME, {
|
|
configurable: true,
|
|
get: function () {
|
|
try {
|
|
return ('' + this).match(nameRE)[1];
|
|
} catch (e) {
|
|
return '';
|
|
}
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 321 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var isObject = __webpack_require__(18);
|
|
var getPrototypeOf = __webpack_require__(36);
|
|
var HAS_INSTANCE = __webpack_require__(19)('hasInstance');
|
|
var FunctionProto = Function.prototype;
|
|
// 19.2.3.6 Function.prototype[@@hasInstance](V)
|
|
if (!(HAS_INSTANCE in FunctionProto)) __webpack_require__(22).f(FunctionProto, HAS_INSTANCE, { value: function (O) {
|
|
if (typeof this != 'function' || !isObject(O)) return false;
|
|
if (!isObject(this.prototype)) return O instanceof this;
|
|
// for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this:
|
|
while (O = getPrototypeOf(O)) if (this.prototype === O) return true;
|
|
return false;
|
|
} });
|
|
|
|
|
|
/***/ }),
|
|
/* 322 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var $export = __webpack_require__(3);
|
|
var $parseInt = __webpack_require__(203);
|
|
// 18.2.5 parseInt(string, radix)
|
|
$export($export.G + $export.F * (parseInt != $parseInt), { parseInt: $parseInt });
|
|
|
|
|
|
/***/ }),
|
|
/* 323 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var $export = __webpack_require__(3);
|
|
var $parseFloat = __webpack_require__(204);
|
|
// 18.2.4 parseFloat(string)
|
|
$export($export.G + $export.F * (parseFloat != $parseFloat), { parseFloat: $parseFloat });
|
|
|
|
|
|
/***/ }),
|
|
/* 324 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var global = __webpack_require__(16);
|
|
var has = __webpack_require__(33);
|
|
var cof = __webpack_require__(39);
|
|
var inheritIfRequired = __webpack_require__(146);
|
|
var toPrimitive = __webpack_require__(43);
|
|
var fails = __webpack_require__(17);
|
|
var gOPN = __webpack_require__(66).f;
|
|
var gOPD = __webpack_require__(35).f;
|
|
var dP = __webpack_require__(22).f;
|
|
var $trim = __webpack_require__(79).trim;
|
|
var NUMBER = 'Number';
|
|
var $Number = global[NUMBER];
|
|
var Base = $Number;
|
|
var proto = $Number.prototype;
|
|
// Opera ~12 has broken Object#toString
|
|
var BROKEN_COF = cof(__webpack_require__(65)(proto)) == NUMBER;
|
|
var TRIM = 'trim' in String.prototype;
|
|
|
|
// 7.1.3 ToNumber(argument)
|
|
var toNumber = function (argument) {
|
|
var it = toPrimitive(argument, false);
|
|
if (typeof it == 'string' && it.length > 2) {
|
|
it = TRIM ? it.trim() : $trim(it, 3);
|
|
var first = it.charCodeAt(0);
|
|
var third, radix, maxCode;
|
|
if (first === 43 || first === 45) {
|
|
third = it.charCodeAt(2);
|
|
if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix
|
|
} else if (first === 48) {
|
|
switch (it.charCodeAt(1)) {
|
|
case 66: case 98: radix = 2; maxCode = 49; break; // fast equal /^0b[01]+$/i
|
|
case 79: case 111: radix = 8; maxCode = 55; break; // fast equal /^0o[0-7]+$/i
|
|
default: return +it;
|
|
}
|
|
for (var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++) {
|
|
code = digits.charCodeAt(i);
|
|
// parseInt parses a string to a first unavailable symbol
|
|
// but ToNumber should return NaN if a string contains unavailable symbols
|
|
if (code < 48 || code > maxCode) return NaN;
|
|
} return parseInt(digits, radix);
|
|
}
|
|
} return +it;
|
|
};
|
|
|
|
if (!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')) {
|
|
$Number = function Number(value) {
|
|
var it = arguments.length < 1 ? 0 : value;
|
|
var that = this;
|
|
return that instanceof $Number
|
|
// check on 1..constructor(foo) case
|
|
&& (BROKEN_COF ? fails(function () { proto.valueOf.call(that); }) : cof(that) != NUMBER)
|
|
? inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it);
|
|
};
|
|
for (var keys = __webpack_require__(21) ? gOPN(Base) : (
|
|
// ES3:
|
|
'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +
|
|
// ES6 (in case, if modules with ES6 Number statics required before):
|
|
'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +
|
|
'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger'
|
|
).split(','), j = 0, key; keys.length > j; j++) {
|
|
if (has(Base, key = keys[j]) && !has($Number, key)) {
|
|
dP($Number, key, gOPD(Base, key));
|
|
}
|
|
}
|
|
$Number.prototype = proto;
|
|
proto.constructor = $Number;
|
|
__webpack_require__(30)(global, NUMBER, $Number);
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
/* 325 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var $export = __webpack_require__(3);
|
|
var toInteger = __webpack_require__(40);
|
|
var aNumberValue = __webpack_require__(205);
|
|
var repeat = __webpack_require__(147);
|
|
var $toFixed = 1.0.toFixed;
|
|
var floor = Math.floor;
|
|
var data = [0, 0, 0, 0, 0, 0];
|
|
var ERROR = 'Number.toFixed: incorrect invocation!';
|
|
var ZERO = '0';
|
|
|
|
var multiply = function (n, c) {
|
|
var i = -1;
|
|
var c2 = c;
|
|
while (++i < 6) {
|
|
c2 += n * data[i];
|
|
data[i] = c2 % 1e7;
|
|
c2 = floor(c2 / 1e7);
|
|
}
|
|
};
|
|
var divide = function (n) {
|
|
var i = 6;
|
|
var c = 0;
|
|
while (--i >= 0) {
|
|
c += data[i];
|
|
data[i] = floor(c / n);
|
|
c = (c % n) * 1e7;
|
|
}
|
|
};
|
|
var numToString = function () {
|
|
var i = 6;
|
|
var s = '';
|
|
while (--i >= 0) {
|
|
if (s !== '' || i === 0 || data[i] !== 0) {
|
|
var t = String(data[i]);
|
|
s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t;
|
|
}
|
|
} return s;
|
|
};
|
|
var pow = function (x, n, acc) {
|
|
return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc);
|
|
};
|
|
var log = function (x) {
|
|
var n = 0;
|
|
var x2 = x;
|
|
while (x2 >= 4096) {
|
|
n += 12;
|
|
x2 /= 4096;
|
|
}
|
|
while (x2 >= 2) {
|
|
n += 1;
|
|
x2 /= 2;
|
|
} return n;
|
|
};
|
|
|
|
$export($export.P + $export.F * (!!$toFixed && (
|
|
0.00008.toFixed(3) !== '0.000' ||
|
|
0.9.toFixed(0) !== '1' ||
|
|
1.255.toFixed(2) !== '1.25' ||
|
|
1000000000000000128.0.toFixed(0) !== '1000000000000000128'
|
|
) || !__webpack_require__(17)(function () {
|
|
// V8 ~ Android 4.3-
|
|
$toFixed.call({});
|
|
})), 'Number', {
|
|
toFixed: function toFixed(fractionDigits) {
|
|
var x = aNumberValue(this, ERROR);
|
|
var f = toInteger(fractionDigits);
|
|
var s = '';
|
|
var m = ZERO;
|
|
var e, z, j, k;
|
|
if (f < 0 || f > 20) throw RangeError(ERROR);
|
|
// eslint-disable-next-line no-self-compare
|
|
if (x != x) return 'NaN';
|
|
if (x <= -1e21 || x >= 1e21) return String(x);
|
|
if (x < 0) {
|
|
s = '-';
|
|
x = -x;
|
|
}
|
|
if (x > 1e-21) {
|
|
e = log(x * pow(2, 69, 1)) - 69;
|
|
z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1);
|
|
z *= 0x10000000000000;
|
|
e = 52 - e;
|
|
if (e > 0) {
|
|
multiply(0, z);
|
|
j = f;
|
|
while (j >= 7) {
|
|
multiply(1e7, 0);
|
|
j -= 7;
|
|
}
|
|
multiply(pow(10, j, 1), 0);
|
|
j = e - 1;
|
|
while (j >= 23) {
|
|
divide(1 << 23);
|
|
j -= 23;
|
|
}
|
|
divide(1 << j);
|
|
multiply(1, 1);
|
|
divide(2);
|
|
m = numToString();
|
|
} else {
|
|
multiply(0, z);
|
|
multiply(1 << -e, 0);
|
|
m = numToString() + repeat.call(ZERO, f);
|
|
}
|
|
}
|
|
if (f > 0) {
|
|
k = m.length;
|
|
m = s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f));
|
|
} else {
|
|
m = s + m;
|
|
} return m;
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 326 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var $export = __webpack_require__(3);
|
|
var $fails = __webpack_require__(17);
|
|
var aNumberValue = __webpack_require__(205);
|
|
var $toPrecision = 1.0.toPrecision;
|
|
|
|
$export($export.P + $export.F * ($fails(function () {
|
|
// IE7-
|
|
return $toPrecision.call(1, undefined) !== '1';
|
|
}) || !$fails(function () {
|
|
// V8 ~ Android 4.3-
|
|
$toPrecision.call({});
|
|
})), 'Number', {
|
|
toPrecision: function toPrecision(precision) {
|
|
var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!');
|
|
return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision);
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 327 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 20.1.2.1 Number.EPSILON
|
|
var $export = __webpack_require__(3);
|
|
|
|
$export($export.S, 'Number', { EPSILON: Math.pow(2, -52) });
|
|
|
|
|
|
/***/ }),
|
|
/* 328 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 20.1.2.2 Number.isFinite(number)
|
|
var $export = __webpack_require__(3);
|
|
var _isFinite = __webpack_require__(16).isFinite;
|
|
|
|
$export($export.S, 'Number', {
|
|
isFinite: function isFinite(it) {
|
|
return typeof it == 'number' && _isFinite(it);
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 329 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 20.1.2.3 Number.isInteger(number)
|
|
var $export = __webpack_require__(3);
|
|
|
|
$export($export.S, 'Number', { isInteger: __webpack_require__(206) });
|
|
|
|
|
|
/***/ }),
|
|
/* 330 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 20.1.2.4 Number.isNaN(number)
|
|
var $export = __webpack_require__(3);
|
|
|
|
$export($export.S, 'Number', {
|
|
isNaN: function isNaN(number) {
|
|
// eslint-disable-next-line no-self-compare
|
|
return number != number;
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 331 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 20.1.2.5 Number.isSafeInteger(number)
|
|
var $export = __webpack_require__(3);
|
|
var isInteger = __webpack_require__(206);
|
|
var abs = Math.abs;
|
|
|
|
$export($export.S, 'Number', {
|
|
isSafeInteger: function isSafeInteger(number) {
|
|
return isInteger(number) && abs(number) <= 0x1fffffffffffff;
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 332 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 20.1.2.6 Number.MAX_SAFE_INTEGER
|
|
var $export = __webpack_require__(3);
|
|
|
|
$export($export.S, 'Number', { MAX_SAFE_INTEGER: 0x1fffffffffffff });
|
|
|
|
|
|
/***/ }),
|
|
/* 333 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 20.1.2.10 Number.MIN_SAFE_INTEGER
|
|
var $export = __webpack_require__(3);
|
|
|
|
$export($export.S, 'Number', { MIN_SAFE_INTEGER: -0x1fffffffffffff });
|
|
|
|
|
|
/***/ }),
|
|
/* 334 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var $export = __webpack_require__(3);
|
|
var $parseFloat = __webpack_require__(204);
|
|
// 20.1.2.12 Number.parseFloat(string)
|
|
$export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', { parseFloat: $parseFloat });
|
|
|
|
|
|
/***/ }),
|
|
/* 335 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var $export = __webpack_require__(3);
|
|
var $parseInt = __webpack_require__(203);
|
|
// 20.1.2.13 Number.parseInt(string, radix)
|
|
$export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', { parseInt: $parseInt });
|
|
|
|
|
|
/***/ }),
|
|
/* 336 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 20.2.2.3 Math.acosh(x)
|
|
var $export = __webpack_require__(3);
|
|
var log1p = __webpack_require__(207);
|
|
var sqrt = Math.sqrt;
|
|
var $acosh = Math.acosh;
|
|
|
|
$export($export.S + $export.F * !($acosh
|
|
// V8 bug: https://code.google.com/p/v8/issues/detail?id=3509
|
|
&& Math.floor($acosh(Number.MAX_VALUE)) == 710
|
|
// Tor Browser bug: Math.acosh(Infinity) -> NaN
|
|
&& $acosh(Infinity) == Infinity
|
|
), 'Math', {
|
|
acosh: function acosh(x) {
|
|
return (x = +x) < 1 ? NaN : x > 94906265.62425156
|
|
? Math.log(x) + Math.LN2
|
|
: log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1));
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 337 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 20.2.2.5 Math.asinh(x)
|
|
var $export = __webpack_require__(3);
|
|
var $asinh = Math.asinh;
|
|
|
|
function asinh(x) {
|
|
return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1));
|
|
}
|
|
|
|
// Tor Browser bug: Math.asinh(0) -> -0
|
|
$export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', { asinh: asinh });
|
|
|
|
|
|
/***/ }),
|
|
/* 338 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 20.2.2.7 Math.atanh(x)
|
|
var $export = __webpack_require__(3);
|
|
var $atanh = Math.atanh;
|
|
|
|
// Tor Browser bug: Math.atanh(-0) -> 0
|
|
$export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', {
|
|
atanh: function atanh(x) {
|
|
return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2;
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 339 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 20.2.2.9 Math.cbrt(x)
|
|
var $export = __webpack_require__(3);
|
|
var sign = __webpack_require__(148);
|
|
|
|
$export($export.S, 'Math', {
|
|
cbrt: function cbrt(x) {
|
|
return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3);
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 340 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 20.2.2.11 Math.clz32(x)
|
|
var $export = __webpack_require__(3);
|
|
|
|
$export($export.S, 'Math', {
|
|
clz32: function clz32(x) {
|
|
return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32;
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 341 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 20.2.2.12 Math.cosh(x)
|
|
var $export = __webpack_require__(3);
|
|
var exp = Math.exp;
|
|
|
|
$export($export.S, 'Math', {
|
|
cosh: function cosh(x) {
|
|
return (exp(x = +x) + exp(-x)) / 2;
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 342 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 20.2.2.14 Math.expm1(x)
|
|
var $export = __webpack_require__(3);
|
|
var $expm1 = __webpack_require__(149);
|
|
|
|
$export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', { expm1: $expm1 });
|
|
|
|
|
|
/***/ }),
|
|
/* 343 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 20.2.2.16 Math.fround(x)
|
|
var $export = __webpack_require__(3);
|
|
|
|
$export($export.S, 'Math', { fround: __webpack_require__(208) });
|
|
|
|
|
|
/***/ }),
|
|
/* 344 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 20.2.2.17 Math.hypot([value1[, value2[, … ]]])
|
|
var $export = __webpack_require__(3);
|
|
var abs = Math.abs;
|
|
|
|
$export($export.S, 'Math', {
|
|
hypot: function hypot(value1, value2) { // eslint-disable-line no-unused-vars
|
|
var sum = 0;
|
|
var i = 0;
|
|
var aLen = arguments.length;
|
|
var larg = 0;
|
|
var arg, div;
|
|
while (i < aLen) {
|
|
arg = abs(arguments[i++]);
|
|
if (larg < arg) {
|
|
div = larg / arg;
|
|
sum = sum * div * div + 1;
|
|
larg = arg;
|
|
} else if (arg > 0) {
|
|
div = arg / larg;
|
|
sum += div * div;
|
|
} else sum += arg;
|
|
}
|
|
return larg === Infinity ? Infinity : larg * Math.sqrt(sum);
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 345 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 20.2.2.18 Math.imul(x, y)
|
|
var $export = __webpack_require__(3);
|
|
var $imul = Math.imul;
|
|
|
|
// some WebKit versions fails with big numbers, some has wrong arity
|
|
$export($export.S + $export.F * __webpack_require__(17)(function () {
|
|
return $imul(0xffffffff, 5) != -5 || $imul.length != 2;
|
|
}), 'Math', {
|
|
imul: function imul(x, y) {
|
|
var UINT16 = 0xffff;
|
|
var xn = +x;
|
|
var yn = +y;
|
|
var xl = UINT16 & xn;
|
|
var yl = UINT16 & yn;
|
|
return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0);
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 346 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 20.2.2.21 Math.log10(x)
|
|
var $export = __webpack_require__(3);
|
|
|
|
$export($export.S, 'Math', {
|
|
log10: function log10(x) {
|
|
return Math.log(x) * Math.LOG10E;
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 347 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 20.2.2.20 Math.log1p(x)
|
|
var $export = __webpack_require__(3);
|
|
|
|
$export($export.S, 'Math', { log1p: __webpack_require__(207) });
|
|
|
|
|
|
/***/ }),
|
|
/* 348 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 20.2.2.22 Math.log2(x)
|
|
var $export = __webpack_require__(3);
|
|
|
|
$export($export.S, 'Math', {
|
|
log2: function log2(x) {
|
|
return Math.log(x) / Math.LN2;
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 349 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 20.2.2.28 Math.sign(x)
|
|
var $export = __webpack_require__(3);
|
|
|
|
$export($export.S, 'Math', { sign: __webpack_require__(148) });
|
|
|
|
|
|
/***/ }),
|
|
/* 350 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 20.2.2.30 Math.sinh(x)
|
|
var $export = __webpack_require__(3);
|
|
var expm1 = __webpack_require__(149);
|
|
var exp = Math.exp;
|
|
|
|
// V8 near Chromium 38 has a problem with very small numbers
|
|
$export($export.S + $export.F * __webpack_require__(17)(function () {
|
|
return !Math.sinh(-2e-17) != -2e-17;
|
|
}), 'Math', {
|
|
sinh: function sinh(x) {
|
|
return Math.abs(x = +x) < 1
|
|
? (expm1(x) - expm1(-x)) / 2
|
|
: (exp(x - 1) - exp(-x - 1)) * (Math.E / 2);
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 351 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 20.2.2.33 Math.tanh(x)
|
|
var $export = __webpack_require__(3);
|
|
var expm1 = __webpack_require__(149);
|
|
var exp = Math.exp;
|
|
|
|
$export($export.S, 'Math', {
|
|
tanh: function tanh(x) {
|
|
var a = expm1(x = +x);
|
|
var b = expm1(-x);
|
|
return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x));
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 352 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 20.2.2.34 Math.trunc(x)
|
|
var $export = __webpack_require__(3);
|
|
|
|
$export($export.S, 'Math', {
|
|
trunc: function trunc(it) {
|
|
return (it > 0 ? Math.floor : Math.ceil)(it);
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 353 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var $export = __webpack_require__(3);
|
|
var toAbsoluteIndex = __webpack_require__(64);
|
|
var fromCharCode = String.fromCharCode;
|
|
var $fromCodePoint = String.fromCodePoint;
|
|
|
|
// length should be 1, old FF problem
|
|
$export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', {
|
|
// 21.1.2.2 String.fromCodePoint(...codePoints)
|
|
fromCodePoint: function fromCodePoint(x) { // eslint-disable-line no-unused-vars
|
|
var res = [];
|
|
var aLen = arguments.length;
|
|
var i = 0;
|
|
var code;
|
|
while (aLen > i) {
|
|
code = +arguments[i++];
|
|
if (toAbsoluteIndex(code, 0x10ffff) !== code) throw RangeError(code + ' is not a valid code point');
|
|
res.push(code < 0x10000
|
|
? fromCharCode(code)
|
|
: fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00)
|
|
);
|
|
} return res.join('');
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 354 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var $export = __webpack_require__(3);
|
|
var toIObject = __webpack_require__(34);
|
|
var toLength = __webpack_require__(20);
|
|
|
|
$export($export.S, 'String', {
|
|
// 21.1.2.4 String.raw(callSite, ...substitutions)
|
|
raw: function raw(callSite) {
|
|
var tpl = toIObject(callSite.raw);
|
|
var len = toLength(tpl.length);
|
|
var aLen = arguments.length;
|
|
var res = [];
|
|
var i = 0;
|
|
while (len > i) {
|
|
res.push(String(tpl[i++]));
|
|
if (i < aLen) res.push(String(arguments[i]));
|
|
} return res.join('');
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 355 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
// 21.1.3.25 String.prototype.trim()
|
|
__webpack_require__(79)('trim', function ($trim) {
|
|
return function trim() {
|
|
return $trim(this, 3);
|
|
};
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 356 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var $at = __webpack_require__(102)(true);
|
|
|
|
// 21.1.3.27 String.prototype[@@iterator]()
|
|
__webpack_require__(150)(String, 'String', function (iterated) {
|
|
this._t = String(iterated); // target
|
|
this._i = 0; // next index
|
|
// 21.1.5.2.1 %StringIteratorPrototype%.next()
|
|
}, function () {
|
|
var O = this._t;
|
|
var index = this._i;
|
|
var point;
|
|
if (index >= O.length) return { value: undefined, done: true };
|
|
point = $at(O, index);
|
|
this._i += point.length;
|
|
return { value: point, done: false };
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 357 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var $export = __webpack_require__(3);
|
|
var $at = __webpack_require__(102)(false);
|
|
$export($export.P, 'String', {
|
|
// 21.1.3.3 String.prototype.codePointAt(pos)
|
|
codePointAt: function codePointAt(pos) {
|
|
return $at(this, pos);
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 358 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
// 21.1.3.6 String.prototype.endsWith(searchString [, endPosition])
|
|
|
|
var $export = __webpack_require__(3);
|
|
var toLength = __webpack_require__(20);
|
|
var context = __webpack_require__(152);
|
|
var ENDS_WITH = 'endsWith';
|
|
var $endsWith = ''[ENDS_WITH];
|
|
|
|
$export($export.P + $export.F * __webpack_require__(153)(ENDS_WITH), 'String', {
|
|
endsWith: function endsWith(searchString /* , endPosition = @length */) {
|
|
var that = context(this, searchString, ENDS_WITH);
|
|
var endPosition = arguments.length > 1 ? arguments[1] : undefined;
|
|
var len = toLength(that.length);
|
|
var end = endPosition === undefined ? len : Math.min(toLength(endPosition), len);
|
|
var search = String(searchString);
|
|
return $endsWith
|
|
? $endsWith.call(that, search, end)
|
|
: that.slice(end - search.length, end) === search;
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 359 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
// 21.1.3.7 String.prototype.includes(searchString, position = 0)
|
|
|
|
var $export = __webpack_require__(3);
|
|
var context = __webpack_require__(152);
|
|
var INCLUDES = 'includes';
|
|
|
|
$export($export.P + $export.F * __webpack_require__(153)(INCLUDES), 'String', {
|
|
includes: function includes(searchString /* , position = 0 */) {
|
|
return !!~context(this, searchString, INCLUDES)
|
|
.indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined);
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 360 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var $export = __webpack_require__(3);
|
|
|
|
$export($export.P, 'String', {
|
|
// 21.1.3.13 String.prototype.repeat(count)
|
|
repeat: __webpack_require__(147)
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 361 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
// 21.1.3.18 String.prototype.startsWith(searchString [, position ])
|
|
|
|
var $export = __webpack_require__(3);
|
|
var toLength = __webpack_require__(20);
|
|
var context = __webpack_require__(152);
|
|
var STARTS_WITH = 'startsWith';
|
|
var $startsWith = ''[STARTS_WITH];
|
|
|
|
$export($export.P + $export.F * __webpack_require__(153)(STARTS_WITH), 'String', {
|
|
startsWith: function startsWith(searchString /* , position = 0 */) {
|
|
var that = context(this, searchString, STARTS_WITH);
|
|
var index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length));
|
|
var search = String(searchString);
|
|
return $startsWith
|
|
? $startsWith.call(that, search, index)
|
|
: that.slice(index, index + search.length) === search;
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 362 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
// B.2.3.2 String.prototype.anchor(name)
|
|
__webpack_require__(31)('anchor', function (createHTML) {
|
|
return function anchor(name) {
|
|
return createHTML(this, 'a', 'name', name);
|
|
};
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 363 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
// B.2.3.3 String.prototype.big()
|
|
__webpack_require__(31)('big', function (createHTML) {
|
|
return function big() {
|
|
return createHTML(this, 'big', '', '');
|
|
};
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 364 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
// B.2.3.4 String.prototype.blink()
|
|
__webpack_require__(31)('blink', function (createHTML) {
|
|
return function blink() {
|
|
return createHTML(this, 'blink', '', '');
|
|
};
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 365 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
// B.2.3.5 String.prototype.bold()
|
|
__webpack_require__(31)('bold', function (createHTML) {
|
|
return function bold() {
|
|
return createHTML(this, 'b', '', '');
|
|
};
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 366 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
// B.2.3.6 String.prototype.fixed()
|
|
__webpack_require__(31)('fixed', function (createHTML) {
|
|
return function fixed() {
|
|
return createHTML(this, 'tt', '', '');
|
|
};
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 367 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
// B.2.3.7 String.prototype.fontcolor(color)
|
|
__webpack_require__(31)('fontcolor', function (createHTML) {
|
|
return function fontcolor(color) {
|
|
return createHTML(this, 'font', 'color', color);
|
|
};
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 368 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
// B.2.3.8 String.prototype.fontsize(size)
|
|
__webpack_require__(31)('fontsize', function (createHTML) {
|
|
return function fontsize(size) {
|
|
return createHTML(this, 'font', 'size', size);
|
|
};
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 369 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
// B.2.3.9 String.prototype.italics()
|
|
__webpack_require__(31)('italics', function (createHTML) {
|
|
return function italics() {
|
|
return createHTML(this, 'i', '', '');
|
|
};
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 370 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
// B.2.3.10 String.prototype.link(url)
|
|
__webpack_require__(31)('link', function (createHTML) {
|
|
return function link(url) {
|
|
return createHTML(this, 'a', 'href', url);
|
|
};
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 371 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
// B.2.3.11 String.prototype.small()
|
|
__webpack_require__(31)('small', function (createHTML) {
|
|
return function small() {
|
|
return createHTML(this, 'small', '', '');
|
|
};
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 372 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
// B.2.3.12 String.prototype.strike()
|
|
__webpack_require__(31)('strike', function (createHTML) {
|
|
return function strike() {
|
|
return createHTML(this, 'strike', '', '');
|
|
};
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 373 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
// B.2.3.13 String.prototype.sub()
|
|
__webpack_require__(31)('sub', function (createHTML) {
|
|
return function sub() {
|
|
return createHTML(this, 'sub', '', '');
|
|
};
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 374 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
// B.2.3.14 String.prototype.sup()
|
|
__webpack_require__(31)('sup', function (createHTML) {
|
|
return function sup() {
|
|
return createHTML(this, 'sup', '', '');
|
|
};
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 375 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 20.3.3.1 / 15.9.4.4 Date.now()
|
|
var $export = __webpack_require__(3);
|
|
|
|
$export($export.S, 'Date', { now: function () { return new Date().getTime(); } });
|
|
|
|
|
|
/***/ }),
|
|
/* 376 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var $export = __webpack_require__(3);
|
|
var toObject = __webpack_require__(23);
|
|
var toPrimitive = __webpack_require__(43);
|
|
|
|
$export($export.P + $export.F * __webpack_require__(17)(function () {
|
|
return new Date(NaN).toJSON() !== null
|
|
|| Date.prototype.toJSON.call({ toISOString: function () { return 1; } }) !== 1;
|
|
}), 'Date', {
|
|
// eslint-disable-next-line no-unused-vars
|
|
toJSON: function toJSON(key) {
|
|
var O = toObject(this);
|
|
var pv = toPrimitive(O);
|
|
return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString();
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 377 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString()
|
|
var $export = __webpack_require__(3);
|
|
var toISOString = __webpack_require__(378);
|
|
|
|
// PhantomJS / old WebKit has a broken implementations
|
|
$export($export.P + $export.F * (Date.prototype.toISOString !== toISOString), 'Date', {
|
|
toISOString: toISOString
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 378 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString()
|
|
var fails = __webpack_require__(17);
|
|
var getTime = Date.prototype.getTime;
|
|
var $toISOString = Date.prototype.toISOString;
|
|
|
|
var lz = function (num) {
|
|
return num > 9 ? num : '0' + num;
|
|
};
|
|
|
|
// PhantomJS / old WebKit has a broken implementations
|
|
module.exports = (fails(function () {
|
|
return $toISOString.call(new Date(-5e13 - 1)) != '0385-07-25T07:06:39.999Z';
|
|
}) || !fails(function () {
|
|
$toISOString.call(new Date(NaN));
|
|
})) ? function toISOString() {
|
|
if (!isFinite(getTime.call(this))) throw RangeError('Invalid time value');
|
|
var d = this;
|
|
var y = d.getUTCFullYear();
|
|
var m = d.getUTCMilliseconds();
|
|
var s = y < 0 ? '-' : y > 9999 ? '+' : '';
|
|
return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) +
|
|
'-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) +
|
|
'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) +
|
|
':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z';
|
|
} : $toISOString;
|
|
|
|
|
|
/***/ }),
|
|
/* 379 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var DateProto = Date.prototype;
|
|
var INVALID_DATE = 'Invalid Date';
|
|
var TO_STRING = 'toString';
|
|
var $toString = DateProto[TO_STRING];
|
|
var getTime = DateProto.getTime;
|
|
if (new Date(NaN) + '' != INVALID_DATE) {
|
|
__webpack_require__(30)(DateProto, TO_STRING, function toString() {
|
|
var value = getTime.call(this);
|
|
// eslint-disable-next-line no-self-compare
|
|
return value === value ? $toString.call(this) : INVALID_DATE;
|
|
});
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
/* 380 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var TO_PRIMITIVE = __webpack_require__(19)('toPrimitive');
|
|
var proto = Date.prototype;
|
|
|
|
if (!(TO_PRIMITIVE in proto)) __webpack_require__(29)(proto, TO_PRIMITIVE, __webpack_require__(381));
|
|
|
|
|
|
/***/ }),
|
|
/* 381 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var anObject = __webpack_require__(9);
|
|
var toPrimitive = __webpack_require__(43);
|
|
var NUMBER = 'number';
|
|
|
|
module.exports = function (hint) {
|
|
if (hint !== 'string' && hint !== NUMBER && hint !== 'default') throw TypeError('Incorrect hint');
|
|
return toPrimitive(anObject(this), hint != NUMBER);
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 382 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 22.1.2.2 / 15.4.3.2 Array.isArray(arg)
|
|
var $export = __webpack_require__(3);
|
|
|
|
$export($export.S, 'Array', { isArray: __webpack_require__(101) });
|
|
|
|
|
|
/***/ }),
|
|
/* 383 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var ctx = __webpack_require__(38);
|
|
var $export = __webpack_require__(3);
|
|
var toObject = __webpack_require__(23);
|
|
var call = __webpack_require__(209);
|
|
var isArrayIter = __webpack_require__(154);
|
|
var toLength = __webpack_require__(20);
|
|
var createProperty = __webpack_require__(155);
|
|
var getIterFn = __webpack_require__(156);
|
|
|
|
$export($export.S + $export.F * !__webpack_require__(104)(function (iter) { Array.from(iter); }), 'Array', {
|
|
// 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)
|
|
from: function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
|
|
var O = toObject(arrayLike);
|
|
var C = typeof this == 'function' ? this : Array;
|
|
var aLen = arguments.length;
|
|
var mapfn = aLen > 1 ? arguments[1] : undefined;
|
|
var mapping = mapfn !== undefined;
|
|
var index = 0;
|
|
var iterFn = getIterFn(O);
|
|
var length, result, step, iterator;
|
|
if (mapping) mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2);
|
|
// if object isn't iterable or it's array with default iterator - use simple case
|
|
if (iterFn != undefined && !(C == Array && isArrayIter(iterFn))) {
|
|
for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) {
|
|
createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value);
|
|
}
|
|
} else {
|
|
length = toLength(O.length);
|
|
for (result = new C(length); length > index; index++) {
|
|
createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);
|
|
}
|
|
}
|
|
result.length = index;
|
|
return result;
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 384 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var $export = __webpack_require__(3);
|
|
var createProperty = __webpack_require__(155);
|
|
|
|
// WebKit Array.of isn't generic
|
|
$export($export.S + $export.F * __webpack_require__(17)(function () {
|
|
function F() { /* empty */ }
|
|
return !(Array.of.call(F) instanceof F);
|
|
}), 'Array', {
|
|
// 22.1.2.3 Array.of( ...items)
|
|
of: function of(/* ...args */) {
|
|
var index = 0;
|
|
var aLen = arguments.length;
|
|
var result = new (typeof this == 'function' ? this : Array)(aLen);
|
|
while (aLen > index) createProperty(result, index, arguments[index++]);
|
|
result.length = aLen;
|
|
return result;
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 385 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
// 22.1.3.13 Array.prototype.join(separator)
|
|
var $export = __webpack_require__(3);
|
|
var toIObject = __webpack_require__(34);
|
|
var arrayJoin = [].join;
|
|
|
|
// fallback for not array-like strings
|
|
$export($export.P + $export.F * (__webpack_require__(90) != Object || !__webpack_require__(41)(arrayJoin)), 'Array', {
|
|
join: function join(separator) {
|
|
return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator);
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 386 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var $export = __webpack_require__(3);
|
|
var html = __webpack_require__(143);
|
|
var cof = __webpack_require__(39);
|
|
var toAbsoluteIndex = __webpack_require__(64);
|
|
var toLength = __webpack_require__(20);
|
|
var arraySlice = [].slice;
|
|
|
|
// fallback for not array-like ES3 strings and DOM objects
|
|
$export($export.P + $export.F * __webpack_require__(17)(function () {
|
|
if (html) arraySlice.call(html);
|
|
}), 'Array', {
|
|
slice: function slice(begin, end) {
|
|
var len = toLength(this.length);
|
|
var klass = cof(this);
|
|
end = end === undefined ? len : end;
|
|
if (klass == 'Array') return arraySlice.call(this, begin, end);
|
|
var start = toAbsoluteIndex(begin, len);
|
|
var upTo = toAbsoluteIndex(end, len);
|
|
var size = toLength(upTo - start);
|
|
var cloned = new Array(size);
|
|
var i = 0;
|
|
for (; i < size; i++) cloned[i] = klass == 'String'
|
|
? this.charAt(start + i)
|
|
: this[start + i];
|
|
return cloned;
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 387 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var $export = __webpack_require__(3);
|
|
var aFunction = __webpack_require__(27);
|
|
var toObject = __webpack_require__(23);
|
|
var fails = __webpack_require__(17);
|
|
var $sort = [].sort;
|
|
var test = [1, 2, 3];
|
|
|
|
$export($export.P + $export.F * (fails(function () {
|
|
// IE8-
|
|
test.sort(undefined);
|
|
}) || !fails(function () {
|
|
// V8 bug
|
|
test.sort(null);
|
|
// Old WebKit
|
|
}) || !__webpack_require__(41)($sort)), 'Array', {
|
|
// 22.1.3.25 Array.prototype.sort(comparefn)
|
|
sort: function sort(comparefn) {
|
|
return comparefn === undefined
|
|
? $sort.call(toObject(this))
|
|
: $sort.call(toObject(this), aFunction(comparefn));
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 388 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var $export = __webpack_require__(3);
|
|
var $forEach = __webpack_require__(46)(0);
|
|
var STRICT = __webpack_require__(41)([].forEach, true);
|
|
|
|
$export($export.P + $export.F * !STRICT, 'Array', {
|
|
// 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg])
|
|
forEach: function forEach(callbackfn /* , thisArg */) {
|
|
return $forEach(this, callbackfn, arguments[1]);
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 389 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var isObject = __webpack_require__(18);
|
|
var isArray = __webpack_require__(101);
|
|
var SPECIES = __webpack_require__(19)('species');
|
|
|
|
module.exports = function (original) {
|
|
var C;
|
|
if (isArray(original)) {
|
|
C = original.constructor;
|
|
// cross-realm fallback
|
|
if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
|
|
if (isObject(C)) {
|
|
C = C[SPECIES];
|
|
if (C === null) C = undefined;
|
|
}
|
|
} return C === undefined ? Array : C;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 390 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var $export = __webpack_require__(3);
|
|
var $map = __webpack_require__(46)(1);
|
|
|
|
$export($export.P + $export.F * !__webpack_require__(41)([].map, true), 'Array', {
|
|
// 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg])
|
|
map: function map(callbackfn /* , thisArg */) {
|
|
return $map(this, callbackfn, arguments[1]);
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 391 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var $export = __webpack_require__(3);
|
|
var $filter = __webpack_require__(46)(2);
|
|
|
|
$export($export.P + $export.F * !__webpack_require__(41)([].filter, true), 'Array', {
|
|
// 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg])
|
|
filter: function filter(callbackfn /* , thisArg */) {
|
|
return $filter(this, callbackfn, arguments[1]);
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 392 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var $export = __webpack_require__(3);
|
|
var $some = __webpack_require__(46)(3);
|
|
|
|
$export($export.P + $export.F * !__webpack_require__(41)([].some, true), 'Array', {
|
|
// 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg])
|
|
some: function some(callbackfn /* , thisArg */) {
|
|
return $some(this, callbackfn, arguments[1]);
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 393 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var $export = __webpack_require__(3);
|
|
var $every = __webpack_require__(46)(4);
|
|
|
|
$export($export.P + $export.F * !__webpack_require__(41)([].every, true), 'Array', {
|
|
// 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg])
|
|
every: function every(callbackfn /* , thisArg */) {
|
|
return $every(this, callbackfn, arguments[1]);
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 394 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var $export = __webpack_require__(3);
|
|
var $reduce = __webpack_require__(210);
|
|
|
|
$export($export.P + $export.F * !__webpack_require__(41)([].reduce, true), 'Array', {
|
|
// 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue])
|
|
reduce: function reduce(callbackfn /* , initialValue */) {
|
|
return $reduce(this, callbackfn, arguments.length, arguments[1], false);
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 395 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var $export = __webpack_require__(3);
|
|
var $reduce = __webpack_require__(210);
|
|
|
|
$export($export.P + $export.F * !__webpack_require__(41)([].reduceRight, true), 'Array', {
|
|
// 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue])
|
|
reduceRight: function reduceRight(callbackfn /* , initialValue */) {
|
|
return $reduce(this, callbackfn, arguments.length, arguments[1], true);
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 396 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var $export = __webpack_require__(3);
|
|
var $indexOf = __webpack_require__(99)(false);
|
|
var $native = [].indexOf;
|
|
var NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0;
|
|
|
|
$export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(41)($native)), 'Array', {
|
|
// 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex])
|
|
indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
|
|
return NEGATIVE_ZERO
|
|
// convert -0 to +0
|
|
? $native.apply(this, arguments) || 0
|
|
: $indexOf(this, searchElement, arguments[1]);
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 397 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var $export = __webpack_require__(3);
|
|
var toIObject = __webpack_require__(34);
|
|
var toInteger = __webpack_require__(40);
|
|
var toLength = __webpack_require__(20);
|
|
var $native = [].lastIndexOf;
|
|
var NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0;
|
|
|
|
$export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(41)($native)), 'Array', {
|
|
// 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex])
|
|
lastIndexOf: function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {
|
|
// convert -0 to +0
|
|
if (NEGATIVE_ZERO) return $native.apply(this, arguments) || 0;
|
|
var O = toIObject(this);
|
|
var length = toLength(O.length);
|
|
var index = length - 1;
|
|
if (arguments.length > 1) index = Math.min(index, toInteger(arguments[1]));
|
|
if (index < 0) index = length + index;
|
|
for (;index >= 0; index--) if (index in O) if (O[index] === searchElement) return index || 0;
|
|
return -1;
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 398 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)
|
|
var $export = __webpack_require__(3);
|
|
|
|
$export($export.P, 'Array', { copyWithin: __webpack_require__(211) });
|
|
|
|
__webpack_require__(57)('copyWithin');
|
|
|
|
|
|
/***/ }),
|
|
/* 399 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)
|
|
var $export = __webpack_require__(3);
|
|
|
|
$export($export.P, 'Array', { fill: __webpack_require__(158) });
|
|
|
|
__webpack_require__(57)('fill');
|
|
|
|
|
|
/***/ }),
|
|
/* 400 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined)
|
|
var $export = __webpack_require__(3);
|
|
var $find = __webpack_require__(46)(5);
|
|
var KEY = 'find';
|
|
var forced = true;
|
|
// Shouldn't skip holes
|
|
if (KEY in []) Array(1)[KEY](function () { forced = false; });
|
|
$export($export.P + $export.F * forced, 'Array', {
|
|
find: function find(callbackfn /* , that = undefined */) {
|
|
return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
}
|
|
});
|
|
__webpack_require__(57)(KEY);
|
|
|
|
|
|
/***/ }),
|
|
/* 401 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
// 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined)
|
|
var $export = __webpack_require__(3);
|
|
var $find = __webpack_require__(46)(6);
|
|
var KEY = 'findIndex';
|
|
var forced = true;
|
|
// Shouldn't skip holes
|
|
if (KEY in []) Array(1)[KEY](function () { forced = false; });
|
|
$export($export.P + $export.F * forced, 'Array', {
|
|
findIndex: function findIndex(callbackfn /* , that = undefined */) {
|
|
return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
}
|
|
});
|
|
__webpack_require__(57)(KEY);
|
|
|
|
|
|
/***/ }),
|
|
/* 402 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
__webpack_require__(67)('Array');
|
|
|
|
|
|
/***/ }),
|
|
/* 403 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var global = __webpack_require__(16);
|
|
var inheritIfRequired = __webpack_require__(146);
|
|
var dP = __webpack_require__(22).f;
|
|
var gOPN = __webpack_require__(66).f;
|
|
var isRegExp = __webpack_require__(103);
|
|
var $flags = __webpack_require__(92);
|
|
var $RegExp = global.RegExp;
|
|
var Base = $RegExp;
|
|
var proto = $RegExp.prototype;
|
|
var re1 = /a/g;
|
|
var re2 = /a/g;
|
|
// "new" creates a new object, old webkit buggy here
|
|
var CORRECT_NEW = new $RegExp(re1) !== re1;
|
|
|
|
if (__webpack_require__(21) && (!CORRECT_NEW || __webpack_require__(17)(function () {
|
|
re2[__webpack_require__(19)('match')] = false;
|
|
// RegExp constructor can alter flags and IsRegExp works correct with @@match
|
|
return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i';
|
|
}))) {
|
|
$RegExp = function RegExp(p, f) {
|
|
var tiRE = this instanceof $RegExp;
|
|
var piRE = isRegExp(p);
|
|
var fiU = f === undefined;
|
|
return !tiRE && piRE && p.constructor === $RegExp && fiU ? p
|
|
: inheritIfRequired(CORRECT_NEW
|
|
? new Base(piRE && !fiU ? p.source : p, f)
|
|
: Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f)
|
|
, tiRE ? this : proto, $RegExp);
|
|
};
|
|
var proxy = function (key) {
|
|
key in $RegExp || dP($RegExp, key, {
|
|
configurable: true,
|
|
get: function () { return Base[key]; },
|
|
set: function (it) { Base[key] = it; }
|
|
});
|
|
};
|
|
for (var keys = gOPN(Base), i = 0; keys.length > i;) proxy(keys[i++]);
|
|
proto.constructor = $RegExp;
|
|
$RegExp.prototype = proto;
|
|
__webpack_require__(30)(global, 'RegExp', $RegExp);
|
|
}
|
|
|
|
__webpack_require__(67)('RegExp');
|
|
|
|
|
|
/***/ }),
|
|
/* 404 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
__webpack_require__(214);
|
|
var anObject = __webpack_require__(9);
|
|
var $flags = __webpack_require__(92);
|
|
var DESCRIPTORS = __webpack_require__(21);
|
|
var TO_STRING = 'toString';
|
|
var $toString = /./[TO_STRING];
|
|
|
|
var define = function (fn) {
|
|
__webpack_require__(30)(RegExp.prototype, TO_STRING, fn, true);
|
|
};
|
|
|
|
// 21.2.5.14 RegExp.prototype.toString()
|
|
if (__webpack_require__(17)(function () { return $toString.call({ source: 'a', flags: 'b' }) != '/a/b'; })) {
|
|
define(function toString() {
|
|
var R = anObject(this);
|
|
return '/'.concat(R.source, '/',
|
|
'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined);
|
|
});
|
|
// FF44- RegExp#toString has a wrong name
|
|
} else if ($toString.name != TO_STRING) {
|
|
define(function toString() {
|
|
return $toString.call(this);
|
|
});
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
/* 405 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
var anObject = __webpack_require__(9);
|
|
var toLength = __webpack_require__(20);
|
|
var advanceStringIndex = __webpack_require__(161);
|
|
var regExpExec = __webpack_require__(105);
|
|
|
|
// @@match logic
|
|
__webpack_require__(106)('match', 1, function (defined, MATCH, $match, maybeCallNative) {
|
|
return [
|
|
// `String.prototype.match` method
|
|
// https://tc39.github.io/ecma262/#sec-string.prototype.match
|
|
function match(regexp) {
|
|
var O = defined(this);
|
|
var fn = regexp == undefined ? undefined : regexp[MATCH];
|
|
return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
|
|
},
|
|
// `RegExp.prototype[@@match]` method
|
|
// https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match
|
|
function (regexp) {
|
|
var res = maybeCallNative($match, regexp, this);
|
|
if (res.done) return res.value;
|
|
var rx = anObject(regexp);
|
|
var S = String(this);
|
|
if (!rx.global) return regExpExec(rx, S);
|
|
var fullUnicode = rx.unicode;
|
|
rx.lastIndex = 0;
|
|
var A = [];
|
|
var n = 0;
|
|
var result;
|
|
while ((result = regExpExec(rx, S)) !== null) {
|
|
var matchStr = String(result[0]);
|
|
A[n] = matchStr;
|
|
if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
|
|
n++;
|
|
}
|
|
return n === 0 ? null : A;
|
|
}
|
|
];
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 406 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
var anObject = __webpack_require__(9);
|
|
var toObject = __webpack_require__(23);
|
|
var toLength = __webpack_require__(20);
|
|
var toInteger = __webpack_require__(40);
|
|
var advanceStringIndex = __webpack_require__(161);
|
|
var regExpExec = __webpack_require__(105);
|
|
var max = Math.max;
|
|
var min = Math.min;
|
|
var floor = Math.floor;
|
|
var SUBSTITUTION_SYMBOLS = /\$([$&`']|\d\d?|<[^>]*>)/g;
|
|
var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&`']|\d\d?)/g;
|
|
|
|
var maybeToString = function (it) {
|
|
return it === undefined ? it : String(it);
|
|
};
|
|
|
|
// @@replace logic
|
|
__webpack_require__(106)('replace', 2, function (defined, REPLACE, $replace, maybeCallNative) {
|
|
return [
|
|
// `String.prototype.replace` method
|
|
// https://tc39.github.io/ecma262/#sec-string.prototype.replace
|
|
function replace(searchValue, replaceValue) {
|
|
var O = defined(this);
|
|
var fn = searchValue == undefined ? undefined : searchValue[REPLACE];
|
|
return fn !== undefined
|
|
? fn.call(searchValue, O, replaceValue)
|
|
: $replace.call(String(O), searchValue, replaceValue);
|
|
},
|
|
// `RegExp.prototype[@@replace]` method
|
|
// https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace
|
|
function (regexp, replaceValue) {
|
|
var res = maybeCallNative($replace, regexp, this, replaceValue);
|
|
if (res.done) return res.value;
|
|
|
|
var rx = anObject(regexp);
|
|
var S = String(this);
|
|
var functionalReplace = typeof replaceValue === 'function';
|
|
if (!functionalReplace) replaceValue = String(replaceValue);
|
|
var global = rx.global;
|
|
if (global) {
|
|
var fullUnicode = rx.unicode;
|
|
rx.lastIndex = 0;
|
|
}
|
|
var results = [];
|
|
while (true) {
|
|
var result = regExpExec(rx, S);
|
|
if (result === null) break;
|
|
results.push(result);
|
|
if (!global) break;
|
|
var matchStr = String(result[0]);
|
|
if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
|
|
}
|
|
var accumulatedResult = '';
|
|
var nextSourcePosition = 0;
|
|
for (var i = 0; i < results.length; i++) {
|
|
result = results[i];
|
|
var matched = String(result[0]);
|
|
var position = max(min(toInteger(result.index), S.length), 0);
|
|
var captures = [];
|
|
// NOTE: This is equivalent to
|
|
// captures = result.slice(1).map(maybeToString)
|
|
// but for some reason `nativeSlice.call(result, 1, result.length)` (called in
|
|
// the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
|
|
// causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
|
|
for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));
|
|
var namedCaptures = result.groups;
|
|
if (functionalReplace) {
|
|
var replacerArgs = [matched].concat(captures, position, S);
|
|
if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);
|
|
var replacement = String(replaceValue.apply(undefined, replacerArgs));
|
|
} else {
|
|
replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
|
|
}
|
|
if (position >= nextSourcePosition) {
|
|
accumulatedResult += S.slice(nextSourcePosition, position) + replacement;
|
|
nextSourcePosition = position + matched.length;
|
|
}
|
|
}
|
|
return accumulatedResult + S.slice(nextSourcePosition);
|
|
}
|
|
];
|
|
|
|
// https://tc39.github.io/ecma262/#sec-getsubstitution
|
|
function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {
|
|
var tailPos = position + matched.length;
|
|
var m = captures.length;
|
|
var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
|
|
if (namedCaptures !== undefined) {
|
|
namedCaptures = toObject(namedCaptures);
|
|
symbols = SUBSTITUTION_SYMBOLS;
|
|
}
|
|
return $replace.call(replacement, symbols, function (match, ch) {
|
|
var capture;
|
|
switch (ch.charAt(0)) {
|
|
case '$': return '$';
|
|
case '&': return matched;
|
|
case '`': return str.slice(0, position);
|
|
case "'": return str.slice(tailPos);
|
|
case '<':
|
|
capture = namedCaptures[ch.slice(1, -1)];
|
|
break;
|
|
default: // \d\d?
|
|
var n = +ch;
|
|
if (n === 0) return match;
|
|
if (n > m) {
|
|
var f = floor(n / 10);
|
|
if (f === 0) return match;
|
|
if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
|
|
return match;
|
|
}
|
|
capture = captures[n - 1];
|
|
}
|
|
return capture === undefined ? '' : capture;
|
|
});
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 407 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
var anObject = __webpack_require__(9);
|
|
var sameValue = __webpack_require__(200);
|
|
var regExpExec = __webpack_require__(105);
|
|
|
|
// @@search logic
|
|
__webpack_require__(106)('search', 1, function (defined, SEARCH, $search, maybeCallNative) {
|
|
return [
|
|
// `String.prototype.search` method
|
|
// https://tc39.github.io/ecma262/#sec-string.prototype.search
|
|
function search(regexp) {
|
|
var O = defined(this);
|
|
var fn = regexp == undefined ? undefined : regexp[SEARCH];
|
|
return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));
|
|
},
|
|
// `RegExp.prototype[@@search]` method
|
|
// https://tc39.github.io/ecma262/#sec-regexp.prototype-@@search
|
|
function (regexp) {
|
|
var res = maybeCallNative($search, regexp, this);
|
|
if (res.done) return res.value;
|
|
var rx = anObject(regexp);
|
|
var S = String(this);
|
|
var previousLastIndex = rx.lastIndex;
|
|
if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;
|
|
var result = regExpExec(rx, S);
|
|
if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;
|
|
return result === null ? -1 : result.index;
|
|
}
|
|
];
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 408 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
var isRegExp = __webpack_require__(103);
|
|
var anObject = __webpack_require__(9);
|
|
var speciesConstructor = __webpack_require__(93);
|
|
var advanceStringIndex = __webpack_require__(161);
|
|
var toLength = __webpack_require__(20);
|
|
var callRegExpExec = __webpack_require__(105);
|
|
var regexpExec = __webpack_require__(160);
|
|
var fails = __webpack_require__(17);
|
|
var $min = Math.min;
|
|
var $push = [].push;
|
|
var $SPLIT = 'split';
|
|
var LENGTH = 'length';
|
|
var LAST_INDEX = 'lastIndex';
|
|
var MAX_UINT32 = 0xffffffff;
|
|
|
|
// babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError
|
|
var SUPPORTS_Y = !fails(function () { RegExp(MAX_UINT32, 'y'); });
|
|
|
|
// @@split logic
|
|
__webpack_require__(106)('split', 2, function (defined, SPLIT, $split, maybeCallNative) {
|
|
var internalSplit;
|
|
if (
|
|
'abbc'[$SPLIT](/(b)*/)[1] == 'c' ||
|
|
'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 ||
|
|
'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 ||
|
|
'.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 ||
|
|
'.'[$SPLIT](/()()/)[LENGTH] > 1 ||
|
|
''[$SPLIT](/.?/)[LENGTH]
|
|
) {
|
|
// based on es5-shim implementation, need to rework it
|
|
internalSplit = function (separator, limit) {
|
|
var string = String(this);
|
|
if (separator === undefined && limit === 0) return [];
|
|
// If `separator` is not a regex, use native split
|
|
if (!isRegExp(separator)) return $split.call(string, separator, limit);
|
|
var output = [];
|
|
var flags = (separator.ignoreCase ? 'i' : '') +
|
|
(separator.multiline ? 'm' : '') +
|
|
(separator.unicode ? 'u' : '') +
|
|
(separator.sticky ? 'y' : '');
|
|
var lastLastIndex = 0;
|
|
var splitLimit = limit === undefined ? MAX_UINT32 : limit >>> 0;
|
|
// Make `global` and avoid `lastIndex` issues by working with a copy
|
|
var separatorCopy = new RegExp(separator.source, flags + 'g');
|
|
var match, lastIndex, lastLength;
|
|
while (match = regexpExec.call(separatorCopy, string)) {
|
|
lastIndex = separatorCopy[LAST_INDEX];
|
|
if (lastIndex > lastLastIndex) {
|
|
output.push(string.slice(lastLastIndex, match.index));
|
|
if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1));
|
|
lastLength = match[0][LENGTH];
|
|
lastLastIndex = lastIndex;
|
|
if (output[LENGTH] >= splitLimit) break;
|
|
}
|
|
if (separatorCopy[LAST_INDEX] === match.index) separatorCopy[LAST_INDEX]++; // Avoid an infinite loop
|
|
}
|
|
if (lastLastIndex === string[LENGTH]) {
|
|
if (lastLength || !separatorCopy.test('')) output.push('');
|
|
} else output.push(string.slice(lastLastIndex));
|
|
return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output;
|
|
};
|
|
// Chakra, V8
|
|
} else if ('0'[$SPLIT](undefined, 0)[LENGTH]) {
|
|
internalSplit = function (separator, limit) {
|
|
return separator === undefined && limit === 0 ? [] : $split.call(this, separator, limit);
|
|
};
|
|
} else {
|
|
internalSplit = $split;
|
|
}
|
|
|
|
return [
|
|
// `String.prototype.split` method
|
|
// https://tc39.github.io/ecma262/#sec-string.prototype.split
|
|
function split(separator, limit) {
|
|
var O = defined(this);
|
|
var splitter = separator == undefined ? undefined : separator[SPLIT];
|
|
return splitter !== undefined
|
|
? splitter.call(separator, O, limit)
|
|
: internalSplit.call(String(O), separator, limit);
|
|
},
|
|
// `RegExp.prototype[@@split]` method
|
|
// https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split
|
|
//
|
|
// NOTE: This cannot be properly polyfilled in engines that don't support
|
|
// the 'y' flag.
|
|
function (regexp, limit) {
|
|
var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== $split);
|
|
if (res.done) return res.value;
|
|
|
|
var rx = anObject(regexp);
|
|
var S = String(this);
|
|
var C = speciesConstructor(rx, RegExp);
|
|
|
|
var unicodeMatching = rx.unicode;
|
|
var flags = (rx.ignoreCase ? 'i' : '') +
|
|
(rx.multiline ? 'm' : '') +
|
|
(rx.unicode ? 'u' : '') +
|
|
(SUPPORTS_Y ? 'y' : 'g');
|
|
|
|
// ^(? + rx + ) is needed, in combination with some S slicing, to
|
|
// simulate the 'y' flag.
|
|
var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags);
|
|
var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
|
|
if (lim === 0) return [];
|
|
if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];
|
|
var p = 0;
|
|
var q = 0;
|
|
var A = [];
|
|
while (q < S.length) {
|
|
splitter.lastIndex = SUPPORTS_Y ? q : 0;
|
|
var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q));
|
|
var e;
|
|
if (
|
|
z === null ||
|
|
(e = $min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p
|
|
) {
|
|
q = advanceStringIndex(S, q, unicodeMatching);
|
|
} else {
|
|
A.push(S.slice(p, q));
|
|
if (A.length === lim) return A;
|
|
for (var i = 1; i <= z.length - 1; i++) {
|
|
A.push(z[i]);
|
|
if (A.length === lim) return A;
|
|
}
|
|
q = p = e;
|
|
}
|
|
}
|
|
A.push(S.slice(p));
|
|
return A;
|
|
}
|
|
];
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 409 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var LIBRARY = __webpack_require__(55);
|
|
var global = __webpack_require__(16);
|
|
var ctx = __webpack_require__(38);
|
|
var classof = __webpack_require__(78);
|
|
var $export = __webpack_require__(3);
|
|
var isObject = __webpack_require__(18);
|
|
var aFunction = __webpack_require__(27);
|
|
var anInstance = __webpack_require__(68);
|
|
var forOf = __webpack_require__(69);
|
|
var speciesConstructor = __webpack_require__(93);
|
|
var task = __webpack_require__(162).set;
|
|
var microtask = __webpack_require__(163)();
|
|
var newPromiseCapabilityModule = __webpack_require__(164);
|
|
var perform = __webpack_require__(215);
|
|
var userAgent = __webpack_require__(107);
|
|
var promiseResolve = __webpack_require__(216);
|
|
var PROMISE = 'Promise';
|
|
var TypeError = global.TypeError;
|
|
var process = global.process;
|
|
var versions = process && process.versions;
|
|
var v8 = versions && versions.v8 || '';
|
|
var $Promise = global[PROMISE];
|
|
var isNode = classof(process) == 'process';
|
|
var empty = function () { /* empty */ };
|
|
var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper;
|
|
var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f;
|
|
|
|
var USE_NATIVE = !!function () {
|
|
try {
|
|
// correct subclassing with @@species support
|
|
var promise = $Promise.resolve(1);
|
|
var FakePromise = (promise.constructor = {})[__webpack_require__(19)('species')] = function (exec) {
|
|
exec(empty, empty);
|
|
};
|
|
// unhandled rejections tracking support, NodeJS Promise without it fails @@species test
|
|
return (isNode || typeof PromiseRejectionEvent == 'function')
|
|
&& promise.then(empty) instanceof FakePromise
|
|
// v8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
|
|
// https://bugs.chromium.org/p/chromium/issues/detail?id=830565
|
|
// we can't detect it synchronously, so just check versions
|
|
&& v8.indexOf('6.6') !== 0
|
|
&& userAgent.indexOf('Chrome/66') === -1;
|
|
} catch (e) { /* empty */ }
|
|
}();
|
|
|
|
// helpers
|
|
var isThenable = function (it) {
|
|
var then;
|
|
return isObject(it) && typeof (then = it.then) == 'function' ? then : false;
|
|
};
|
|
var notify = function (promise, isReject) {
|
|
if (promise._n) return;
|
|
promise._n = true;
|
|
var chain = promise._c;
|
|
microtask(function () {
|
|
var value = promise._v;
|
|
var ok = promise._s == 1;
|
|
var i = 0;
|
|
var run = function (reaction) {
|
|
var handler = ok ? reaction.ok : reaction.fail;
|
|
var resolve = reaction.resolve;
|
|
var reject = reaction.reject;
|
|
var domain = reaction.domain;
|
|
var result, then, exited;
|
|
try {
|
|
if (handler) {
|
|
if (!ok) {
|
|
if (promise._h == 2) onHandleUnhandled(promise);
|
|
promise._h = 1;
|
|
}
|
|
if (handler === true) result = value;
|
|
else {
|
|
if (domain) domain.enter();
|
|
result = handler(value); // may throw
|
|
if (domain) {
|
|
domain.exit();
|
|
exited = true;
|
|
}
|
|
}
|
|
if (result === reaction.promise) {
|
|
reject(TypeError('Promise-chain cycle'));
|
|
} else if (then = isThenable(result)) {
|
|
then.call(result, resolve, reject);
|
|
} else resolve(result);
|
|
} else reject(value);
|
|
} catch (e) {
|
|
if (domain && !exited) domain.exit();
|
|
reject(e);
|
|
}
|
|
};
|
|
while (chain.length > i) run(chain[i++]); // variable length - can't use forEach
|
|
promise._c = [];
|
|
promise._n = false;
|
|
if (isReject && !promise._h) onUnhandled(promise);
|
|
});
|
|
};
|
|
var onUnhandled = function (promise) {
|
|
task.call(global, function () {
|
|
var value = promise._v;
|
|
var unhandled = isUnhandled(promise);
|
|
var result, handler, console;
|
|
if (unhandled) {
|
|
result = perform(function () {
|
|
if (isNode) {
|
|
process.emit('unhandledRejection', value, promise);
|
|
} else if (handler = global.onunhandledrejection) {
|
|
handler({ promise: promise, reason: value });
|
|
} else if ((console = global.console) && console.error) {
|
|
console.error('Unhandled promise rejection', value);
|
|
}
|
|
});
|
|
// Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
|
|
promise._h = isNode || isUnhandled(promise) ? 2 : 1;
|
|
} promise._a = undefined;
|
|
if (unhandled && result.e) throw result.v;
|
|
});
|
|
};
|
|
var isUnhandled = function (promise) {
|
|
return promise._h !== 1 && (promise._a || promise._c).length === 0;
|
|
};
|
|
var onHandleUnhandled = function (promise) {
|
|
task.call(global, function () {
|
|
var handler;
|
|
if (isNode) {
|
|
process.emit('rejectionHandled', promise);
|
|
} else if (handler = global.onrejectionhandled) {
|
|
handler({ promise: promise, reason: promise._v });
|
|
}
|
|
});
|
|
};
|
|
var $reject = function (value) {
|
|
var promise = this;
|
|
if (promise._d) return;
|
|
promise._d = true;
|
|
promise = promise._w || promise; // unwrap
|
|
promise._v = value;
|
|
promise._s = 2;
|
|
if (!promise._a) promise._a = promise._c.slice();
|
|
notify(promise, true);
|
|
};
|
|
var $resolve = function (value) {
|
|
var promise = this;
|
|
var then;
|
|
if (promise._d) return;
|
|
promise._d = true;
|
|
promise = promise._w || promise; // unwrap
|
|
try {
|
|
if (promise === value) throw TypeError("Promise can't be resolved itself");
|
|
if (then = isThenable(value)) {
|
|
microtask(function () {
|
|
var wrapper = { _w: promise, _d: false }; // wrap
|
|
try {
|
|
then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));
|
|
} catch (e) {
|
|
$reject.call(wrapper, e);
|
|
}
|
|
});
|
|
} else {
|
|
promise._v = value;
|
|
promise._s = 1;
|
|
notify(promise, false);
|
|
}
|
|
} catch (e) {
|
|
$reject.call({ _w: promise, _d: false }, e); // wrap
|
|
}
|
|
};
|
|
|
|
// constructor polyfill
|
|
if (!USE_NATIVE) {
|
|
// 25.4.3.1 Promise(executor)
|
|
$Promise = function Promise(executor) {
|
|
anInstance(this, $Promise, PROMISE, '_h');
|
|
aFunction(executor);
|
|
Internal.call(this);
|
|
try {
|
|
executor(ctx($resolve, this, 1), ctx($reject, this, 1));
|
|
} catch (err) {
|
|
$reject.call(this, err);
|
|
}
|
|
};
|
|
// eslint-disable-next-line no-unused-vars
|
|
Internal = function Promise(executor) {
|
|
this._c = []; // <- awaiting reactions
|
|
this._a = undefined; // <- checked in isUnhandled reactions
|
|
this._s = 0; // <- state
|
|
this._d = false; // <- done
|
|
this._v = undefined; // <- value
|
|
this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled
|
|
this._n = false; // <- notify
|
|
};
|
|
Internal.prototype = __webpack_require__(70)($Promise.prototype, {
|
|
// 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)
|
|
then: function then(onFulfilled, onRejected) {
|
|
var reaction = newPromiseCapability(speciesConstructor(this, $Promise));
|
|
reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
|
|
reaction.fail = typeof onRejected == 'function' && onRejected;
|
|
reaction.domain = isNode ? process.domain : undefined;
|
|
this._c.push(reaction);
|
|
if (this._a) this._a.push(reaction);
|
|
if (this._s) notify(this, false);
|
|
return reaction.promise;
|
|
},
|
|
// 25.4.5.1 Promise.prototype.catch(onRejected)
|
|
'catch': function (onRejected) {
|
|
return this.then(undefined, onRejected);
|
|
}
|
|
});
|
|
OwnPromiseCapability = function () {
|
|
var promise = new Internal();
|
|
this.promise = promise;
|
|
this.resolve = ctx($resolve, promise, 1);
|
|
this.reject = ctx($reject, promise, 1);
|
|
};
|
|
newPromiseCapabilityModule.f = newPromiseCapability = function (C) {
|
|
return C === $Promise || C === Wrapper
|
|
? new OwnPromiseCapability(C)
|
|
: newGenericPromiseCapability(C);
|
|
};
|
|
}
|
|
|
|
$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise });
|
|
__webpack_require__(77)($Promise, PROMISE);
|
|
__webpack_require__(67)(PROMISE);
|
|
Wrapper = __webpack_require__(37)[PROMISE];
|
|
|
|
// statics
|
|
$export($export.S + $export.F * !USE_NATIVE, PROMISE, {
|
|
// 25.4.4.5 Promise.reject(r)
|
|
reject: function reject(r) {
|
|
var capability = newPromiseCapability(this);
|
|
var $$reject = capability.reject;
|
|
$$reject(r);
|
|
return capability.promise;
|
|
}
|
|
});
|
|
$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, {
|
|
// 25.4.4.6 Promise.resolve(x)
|
|
resolve: function resolve(x) {
|
|
return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x);
|
|
}
|
|
});
|
|
$export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(104)(function (iter) {
|
|
$Promise.all(iter)['catch'](empty);
|
|
})), PROMISE, {
|
|
// 25.4.4.1 Promise.all(iterable)
|
|
all: function all(iterable) {
|
|
var C = this;
|
|
var capability = newPromiseCapability(C);
|
|
var resolve = capability.resolve;
|
|
var reject = capability.reject;
|
|
var result = perform(function () {
|
|
var values = [];
|
|
var index = 0;
|
|
var remaining = 1;
|
|
forOf(iterable, false, function (promise) {
|
|
var $index = index++;
|
|
var alreadyCalled = false;
|
|
values.push(undefined);
|
|
remaining++;
|
|
C.resolve(promise).then(function (value) {
|
|
if (alreadyCalled) return;
|
|
alreadyCalled = true;
|
|
values[$index] = value;
|
|
--remaining || resolve(values);
|
|
}, reject);
|
|
});
|
|
--remaining || resolve(values);
|
|
});
|
|
if (result.e) reject(result.v);
|
|
return capability.promise;
|
|
},
|
|
// 25.4.4.4 Promise.race(iterable)
|
|
race: function race(iterable) {
|
|
var C = this;
|
|
var capability = newPromiseCapability(C);
|
|
var reject = capability.reject;
|
|
var result = perform(function () {
|
|
forOf(iterable, false, function (promise) {
|
|
C.resolve(promise).then(capability.resolve, reject);
|
|
});
|
|
});
|
|
if (result.e) reject(result.v);
|
|
return capability.promise;
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 410 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var weak = __webpack_require__(221);
|
|
var validate = __webpack_require__(71);
|
|
var WEAK_SET = 'WeakSet';
|
|
|
|
// 23.4 WeakSet Objects
|
|
__webpack_require__(108)(WEAK_SET, function (get) {
|
|
return function WeakSet() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };
|
|
}, {
|
|
// 23.4.3.1 WeakSet.prototype.add(value)
|
|
add: function add(value) {
|
|
return weak.def(validate(this, WEAK_SET), value, true);
|
|
}
|
|
}, weak, false, true);
|
|
|
|
|
|
/***/ }),
|
|
/* 411 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var $export = __webpack_require__(3);
|
|
var $typed = __webpack_require__(109);
|
|
var buffer = __webpack_require__(165);
|
|
var anObject = __webpack_require__(9);
|
|
var toAbsoluteIndex = __webpack_require__(64);
|
|
var toLength = __webpack_require__(20);
|
|
var isObject = __webpack_require__(18);
|
|
var ArrayBuffer = __webpack_require__(16).ArrayBuffer;
|
|
var speciesConstructor = __webpack_require__(93);
|
|
var $ArrayBuffer = buffer.ArrayBuffer;
|
|
var $DataView = buffer.DataView;
|
|
var $isView = $typed.ABV && ArrayBuffer.isView;
|
|
var $slice = $ArrayBuffer.prototype.slice;
|
|
var VIEW = $typed.VIEW;
|
|
var ARRAY_BUFFER = 'ArrayBuffer';
|
|
|
|
$export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), { ArrayBuffer: $ArrayBuffer });
|
|
|
|
$export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, {
|
|
// 24.1.3.1 ArrayBuffer.isView(arg)
|
|
isView: function isView(it) {
|
|
return $isView && $isView(it) || isObject(it) && VIEW in it;
|
|
}
|
|
});
|
|
|
|
$export($export.P + $export.U + $export.F * __webpack_require__(17)(function () {
|
|
return !new $ArrayBuffer(2).slice(1, undefined).byteLength;
|
|
}), ARRAY_BUFFER, {
|
|
// 24.1.4.3 ArrayBuffer.prototype.slice(start, end)
|
|
slice: function slice(start, end) {
|
|
if ($slice !== undefined && end === undefined) return $slice.call(anObject(this), start); // FF fix
|
|
var len = anObject(this).byteLength;
|
|
var first = toAbsoluteIndex(start, len);
|
|
var fin = toAbsoluteIndex(end === undefined ? len : end, len);
|
|
var result = new (speciesConstructor(this, $ArrayBuffer))(toLength(fin - first));
|
|
var viewS = new $DataView(this);
|
|
var viewT = new $DataView(result);
|
|
var index = 0;
|
|
while (first < fin) {
|
|
viewT.setUint8(index++, viewS.getUint8(first++));
|
|
} return result;
|
|
}
|
|
});
|
|
|
|
__webpack_require__(67)(ARRAY_BUFFER);
|
|
|
|
|
|
/***/ }),
|
|
/* 412 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var $export = __webpack_require__(3);
|
|
$export($export.G + $export.W + $export.F * !__webpack_require__(109).ABV, {
|
|
DataView: __webpack_require__(165).DataView
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 413 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
__webpack_require__(48)('Int8', 1, function (init) {
|
|
return function Int8Array(data, byteOffset, length) {
|
|
return init(this, data, byteOffset, length);
|
|
};
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 414 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
__webpack_require__(48)('Uint8', 1, function (init) {
|
|
return function Uint8Array(data, byteOffset, length) {
|
|
return init(this, data, byteOffset, length);
|
|
};
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 415 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
__webpack_require__(48)('Uint8', 1, function (init) {
|
|
return function Uint8ClampedArray(data, byteOffset, length) {
|
|
return init(this, data, byteOffset, length);
|
|
};
|
|
}, true);
|
|
|
|
|
|
/***/ }),
|
|
/* 416 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
__webpack_require__(48)('Int16', 2, function (init) {
|
|
return function Int16Array(data, byteOffset, length) {
|
|
return init(this, data, byteOffset, length);
|
|
};
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 417 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
__webpack_require__(48)('Uint16', 2, function (init) {
|
|
return function Uint16Array(data, byteOffset, length) {
|
|
return init(this, data, byteOffset, length);
|
|
};
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 418 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
__webpack_require__(48)('Int32', 4, function (init) {
|
|
return function Int32Array(data, byteOffset, length) {
|
|
return init(this, data, byteOffset, length);
|
|
};
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 419 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
__webpack_require__(48)('Uint32', 4, function (init) {
|
|
return function Uint32Array(data, byteOffset, length) {
|
|
return init(this, data, byteOffset, length);
|
|
};
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 420 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
__webpack_require__(48)('Float32', 4, function (init) {
|
|
return function Float32Array(data, byteOffset, length) {
|
|
return init(this, data, byteOffset, length);
|
|
};
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 421 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
__webpack_require__(48)('Float64', 8, function (init) {
|
|
return function Float64Array(data, byteOffset, length) {
|
|
return init(this, data, byteOffset, length);
|
|
};
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 422 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 26.1.1 Reflect.apply(target, thisArgument, argumentsList)
|
|
var $export = __webpack_require__(3);
|
|
var aFunction = __webpack_require__(27);
|
|
var anObject = __webpack_require__(9);
|
|
var rApply = (__webpack_require__(16).Reflect || {}).apply;
|
|
var fApply = Function.apply;
|
|
// MS Edge argumentsList argument is optional
|
|
$export($export.S + $export.F * !__webpack_require__(17)(function () {
|
|
rApply(function () { /* empty */ });
|
|
}), 'Reflect', {
|
|
apply: function apply(target, thisArgument, argumentsList) {
|
|
var T = aFunction(target);
|
|
var L = anObject(argumentsList);
|
|
return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L);
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 423 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 26.1.2 Reflect.construct(target, argumentsList [, newTarget])
|
|
var $export = __webpack_require__(3);
|
|
var create = __webpack_require__(65);
|
|
var aFunction = __webpack_require__(27);
|
|
var anObject = __webpack_require__(9);
|
|
var isObject = __webpack_require__(18);
|
|
var fails = __webpack_require__(17);
|
|
var bind = __webpack_require__(201);
|
|
var rConstruct = (__webpack_require__(16).Reflect || {}).construct;
|
|
|
|
// MS Edge supports only 2 arguments and argumentsList argument is optional
|
|
// FF Nightly sets third argument as `new.target`, but does not create `this` from it
|
|
var NEW_TARGET_BUG = fails(function () {
|
|
function F() { /* empty */ }
|
|
return !(rConstruct(function () { /* empty */ }, [], F) instanceof F);
|
|
});
|
|
var ARGS_BUG = !fails(function () {
|
|
rConstruct(function () { /* empty */ });
|
|
});
|
|
|
|
$export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', {
|
|
construct: function construct(Target, args /* , newTarget */) {
|
|
aFunction(Target);
|
|
anObject(args);
|
|
var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]);
|
|
if (ARGS_BUG && !NEW_TARGET_BUG) return rConstruct(Target, args, newTarget);
|
|
if (Target == newTarget) {
|
|
// w/o altered newTarget, optimization for 0-4 arguments
|
|
switch (args.length) {
|
|
case 0: return new Target();
|
|
case 1: return new Target(args[0]);
|
|
case 2: return new Target(args[0], args[1]);
|
|
case 3: return new Target(args[0], args[1], args[2]);
|
|
case 4: return new Target(args[0], args[1], args[2], args[3]);
|
|
}
|
|
// w/o altered newTarget, lot of arguments case
|
|
var $args = [null];
|
|
$args.push.apply($args, args);
|
|
return new (bind.apply(Target, $args))();
|
|
}
|
|
// with altered newTarget, not support built-in constructors
|
|
var proto = newTarget.prototype;
|
|
var instance = create(isObject(proto) ? proto : Object.prototype);
|
|
var result = Function.apply.call(Target, instance, args);
|
|
return isObject(result) ? result : instance;
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 424 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 26.1.3 Reflect.defineProperty(target, propertyKey, attributes)
|
|
var dP = __webpack_require__(22);
|
|
var $export = __webpack_require__(3);
|
|
var anObject = __webpack_require__(9);
|
|
var toPrimitive = __webpack_require__(43);
|
|
|
|
// MS Edge has broken Reflect.defineProperty - throwing instead of returning false
|
|
$export($export.S + $export.F * __webpack_require__(17)(function () {
|
|
// eslint-disable-next-line no-undef
|
|
Reflect.defineProperty(dP.f({}, 1, { value: 1 }), 1, { value: 2 });
|
|
}), 'Reflect', {
|
|
defineProperty: function defineProperty(target, propertyKey, attributes) {
|
|
anObject(target);
|
|
propertyKey = toPrimitive(propertyKey, true);
|
|
anObject(attributes);
|
|
try {
|
|
dP.f(target, propertyKey, attributes);
|
|
return true;
|
|
} catch (e) {
|
|
return false;
|
|
}
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 425 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 26.1.4 Reflect.deleteProperty(target, propertyKey)
|
|
var $export = __webpack_require__(3);
|
|
var gOPD = __webpack_require__(35).f;
|
|
var anObject = __webpack_require__(9);
|
|
|
|
$export($export.S, 'Reflect', {
|
|
deleteProperty: function deleteProperty(target, propertyKey) {
|
|
var desc = gOPD(anObject(target), propertyKey);
|
|
return desc && !desc.configurable ? false : delete target[propertyKey];
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 426 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
// 26.1.5 Reflect.enumerate(target)
|
|
var $export = __webpack_require__(3);
|
|
var anObject = __webpack_require__(9);
|
|
var Enumerate = function (iterated) {
|
|
this._t = anObject(iterated); // target
|
|
this._i = 0; // next index
|
|
var keys = this._k = []; // keys
|
|
var key;
|
|
for (key in iterated) keys.push(key);
|
|
};
|
|
__webpack_require__(151)(Enumerate, 'Object', function () {
|
|
var that = this;
|
|
var keys = that._k;
|
|
var key;
|
|
do {
|
|
if (that._i >= keys.length) return { value: undefined, done: true };
|
|
} while (!((key = keys[that._i++]) in that._t));
|
|
return { value: key, done: false };
|
|
});
|
|
|
|
$export($export.S, 'Reflect', {
|
|
enumerate: function enumerate(target) {
|
|
return new Enumerate(target);
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 427 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 26.1.6 Reflect.get(target, propertyKey [, receiver])
|
|
var gOPD = __webpack_require__(35);
|
|
var getPrototypeOf = __webpack_require__(36);
|
|
var has = __webpack_require__(33);
|
|
var $export = __webpack_require__(3);
|
|
var isObject = __webpack_require__(18);
|
|
var anObject = __webpack_require__(9);
|
|
|
|
function get(target, propertyKey /* , receiver */) {
|
|
var receiver = arguments.length < 3 ? target : arguments[2];
|
|
var desc, proto;
|
|
if (anObject(target) === receiver) return target[propertyKey];
|
|
if (desc = gOPD.f(target, propertyKey)) return has(desc, 'value')
|
|
? desc.value
|
|
: desc.get !== undefined
|
|
? desc.get.call(receiver)
|
|
: undefined;
|
|
if (isObject(proto = getPrototypeOf(target))) return get(proto, propertyKey, receiver);
|
|
}
|
|
|
|
$export($export.S, 'Reflect', { get: get });
|
|
|
|
|
|
/***/ }),
|
|
/* 428 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey)
|
|
var gOPD = __webpack_require__(35);
|
|
var $export = __webpack_require__(3);
|
|
var anObject = __webpack_require__(9);
|
|
|
|
$export($export.S, 'Reflect', {
|
|
getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey) {
|
|
return gOPD.f(anObject(target), propertyKey);
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 429 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 26.1.8 Reflect.getPrototypeOf(target)
|
|
var $export = __webpack_require__(3);
|
|
var getProto = __webpack_require__(36);
|
|
var anObject = __webpack_require__(9);
|
|
|
|
$export($export.S, 'Reflect', {
|
|
getPrototypeOf: function getPrototypeOf(target) {
|
|
return getProto(anObject(target));
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 430 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 26.1.9 Reflect.has(target, propertyKey)
|
|
var $export = __webpack_require__(3);
|
|
|
|
$export($export.S, 'Reflect', {
|
|
has: function has(target, propertyKey) {
|
|
return propertyKey in target;
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 431 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 26.1.10 Reflect.isExtensible(target)
|
|
var $export = __webpack_require__(3);
|
|
var anObject = __webpack_require__(9);
|
|
var $isExtensible = Object.isExtensible;
|
|
|
|
$export($export.S, 'Reflect', {
|
|
isExtensible: function isExtensible(target) {
|
|
anObject(target);
|
|
return $isExtensible ? $isExtensible(target) : true;
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 432 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 26.1.11 Reflect.ownKeys(target)
|
|
var $export = __webpack_require__(3);
|
|
|
|
$export($export.S, 'Reflect', { ownKeys: __webpack_require__(223) });
|
|
|
|
|
|
/***/ }),
|
|
/* 433 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 26.1.12 Reflect.preventExtensions(target)
|
|
var $export = __webpack_require__(3);
|
|
var anObject = __webpack_require__(9);
|
|
var $preventExtensions = Object.preventExtensions;
|
|
|
|
$export($export.S, 'Reflect', {
|
|
preventExtensions: function preventExtensions(target) {
|
|
anObject(target);
|
|
try {
|
|
if ($preventExtensions) $preventExtensions(target);
|
|
return true;
|
|
} catch (e) {
|
|
return false;
|
|
}
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 434 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 26.1.13 Reflect.set(target, propertyKey, V [, receiver])
|
|
var dP = __webpack_require__(22);
|
|
var gOPD = __webpack_require__(35);
|
|
var getPrototypeOf = __webpack_require__(36);
|
|
var has = __webpack_require__(33);
|
|
var $export = __webpack_require__(3);
|
|
var createDesc = __webpack_require__(61);
|
|
var anObject = __webpack_require__(9);
|
|
var isObject = __webpack_require__(18);
|
|
|
|
function set(target, propertyKey, V /* , receiver */) {
|
|
var receiver = arguments.length < 4 ? target : arguments[3];
|
|
var ownDesc = gOPD.f(anObject(target), propertyKey);
|
|
var existingDescriptor, proto;
|
|
if (!ownDesc) {
|
|
if (isObject(proto = getPrototypeOf(target))) {
|
|
return set(proto, propertyKey, V, receiver);
|
|
}
|
|
ownDesc = createDesc(0);
|
|
}
|
|
if (has(ownDesc, 'value')) {
|
|
if (ownDesc.writable === false || !isObject(receiver)) return false;
|
|
if (existingDescriptor = gOPD.f(receiver, propertyKey)) {
|
|
if (existingDescriptor.get || existingDescriptor.set || existingDescriptor.writable === false) return false;
|
|
existingDescriptor.value = V;
|
|
dP.f(receiver, propertyKey, existingDescriptor);
|
|
} else dP.f(receiver, propertyKey, createDesc(0, V));
|
|
return true;
|
|
}
|
|
return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true);
|
|
}
|
|
|
|
$export($export.S, 'Reflect', { set: set });
|
|
|
|
|
|
/***/ }),
|
|
/* 435 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// 26.1.14 Reflect.setPrototypeOf(target, proto)
|
|
var $export = __webpack_require__(3);
|
|
var setProto = __webpack_require__(144);
|
|
|
|
if (setProto) $export($export.S, 'Reflect', {
|
|
setPrototypeOf: function setPrototypeOf(target, proto) {
|
|
setProto.check(target, proto);
|
|
try {
|
|
setProto.set(target, proto);
|
|
return true;
|
|
} catch (e) {
|
|
return false;
|
|
}
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 436 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
// https://github.com/tc39/Array.prototype.includes
|
|
var $export = __webpack_require__(3);
|
|
var $includes = __webpack_require__(99)(true);
|
|
|
|
$export($export.P, 'Array', {
|
|
includes: function includes(el /* , fromIndex = 0 */) {
|
|
return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
|
|
}
|
|
});
|
|
|
|
__webpack_require__(57)('includes');
|
|
|
|
|
|
/***/ }),
|
|
/* 437 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
// https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatMap
|
|
var $export = __webpack_require__(3);
|
|
var flattenIntoArray = __webpack_require__(224);
|
|
var toObject = __webpack_require__(23);
|
|
var toLength = __webpack_require__(20);
|
|
var aFunction = __webpack_require__(27);
|
|
var arraySpeciesCreate = __webpack_require__(157);
|
|
|
|
$export($export.P, 'Array', {
|
|
flatMap: function flatMap(callbackfn /* , thisArg */) {
|
|
var O = toObject(this);
|
|
var sourceLen, A;
|
|
aFunction(callbackfn);
|
|
sourceLen = toLength(O.length);
|
|
A = arraySpeciesCreate(O, 0);
|
|
flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments[1]);
|
|
return A;
|
|
}
|
|
});
|
|
|
|
__webpack_require__(57)('flatMap');
|
|
|
|
|
|
/***/ }),
|
|
/* 438 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
// https://tc39.github.io/proposal-flatMap/#sec-Array.prototype.flatten
|
|
var $export = __webpack_require__(3);
|
|
var flattenIntoArray = __webpack_require__(224);
|
|
var toObject = __webpack_require__(23);
|
|
var toLength = __webpack_require__(20);
|
|
var toInteger = __webpack_require__(40);
|
|
var arraySpeciesCreate = __webpack_require__(157);
|
|
|
|
$export($export.P, 'Array', {
|
|
flatten: function flatten(/* depthArg = 1 */) {
|
|
var depthArg = arguments[0];
|
|
var O = toObject(this);
|
|
var sourceLen = toLength(O.length);
|
|
var A = arraySpeciesCreate(O, 0);
|
|
flattenIntoArray(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toInteger(depthArg));
|
|
return A;
|
|
}
|
|
});
|
|
|
|
__webpack_require__(57)('flatten');
|
|
|
|
|
|
/***/ }),
|
|
/* 439 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
// https://github.com/mathiasbynens/String.prototype.at
|
|
var $export = __webpack_require__(3);
|
|
var $at = __webpack_require__(102)(true);
|
|
|
|
$export($export.P, 'String', {
|
|
at: function at(pos) {
|
|
return $at(this, pos);
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 440 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
// https://github.com/tc39/proposal-string-pad-start-end
|
|
var $export = __webpack_require__(3);
|
|
var $pad = __webpack_require__(225);
|
|
var userAgent = __webpack_require__(107);
|
|
|
|
// https://github.com/zloirock/core-js/issues/280
|
|
var WEBKIT_BUG = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent);
|
|
|
|
$export($export.P + $export.F * WEBKIT_BUG, 'String', {
|
|
padStart: function padStart(maxLength /* , fillString = ' ' */) {
|
|
return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true);
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 441 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
// https://github.com/tc39/proposal-string-pad-start-end
|
|
var $export = __webpack_require__(3);
|
|
var $pad = __webpack_require__(225);
|
|
var userAgent = __webpack_require__(107);
|
|
|
|
// https://github.com/zloirock/core-js/issues/280
|
|
var WEBKIT_BUG = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent);
|
|
|
|
$export($export.P + $export.F * WEBKIT_BUG, 'String', {
|
|
padEnd: function padEnd(maxLength /* , fillString = ' ' */) {
|
|
return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false);
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 442 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
// https://github.com/sebmarkbage/ecmascript-string-left-right-trim
|
|
__webpack_require__(79)('trimLeft', function ($trim) {
|
|
return function trimLeft() {
|
|
return $trim(this, 1);
|
|
};
|
|
}, 'trimStart');
|
|
|
|
|
|
/***/ }),
|
|
/* 443 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
// https://github.com/sebmarkbage/ecmascript-string-left-right-trim
|
|
__webpack_require__(79)('trimRight', function ($trim) {
|
|
return function trimRight() {
|
|
return $trim(this, 2);
|
|
};
|
|
}, 'trimEnd');
|
|
|
|
|
|
/***/ }),
|
|
/* 444 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
// https://tc39.github.io/String.prototype.matchAll/
|
|
var $export = __webpack_require__(3);
|
|
var defined = __webpack_require__(44);
|
|
var toLength = __webpack_require__(20);
|
|
var isRegExp = __webpack_require__(103);
|
|
var getFlags = __webpack_require__(92);
|
|
var RegExpProto = RegExp.prototype;
|
|
|
|
var $RegExpStringIterator = function (regexp, string) {
|
|
this._r = regexp;
|
|
this._s = string;
|
|
};
|
|
|
|
__webpack_require__(151)($RegExpStringIterator, 'RegExp String', function next() {
|
|
var match = this._r.exec(this._s);
|
|
return { value: match, done: match === null };
|
|
});
|
|
|
|
$export($export.P, 'String', {
|
|
matchAll: function matchAll(regexp) {
|
|
defined(this);
|
|
if (!isRegExp(regexp)) throw TypeError(regexp + ' is not a regexp!');
|
|
var S = String(this);
|
|
var flags = 'flags' in RegExpProto ? String(regexp.flags) : getFlags.call(regexp);
|
|
var rx = new RegExp(regexp.source, ~flags.indexOf('g') ? flags : 'g' + flags);
|
|
rx.lastIndex = toLength(regexp.lastIndex);
|
|
return new $RegExpStringIterator(rx, S);
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 445 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
__webpack_require__(140)('asyncIterator');
|
|
|
|
|
|
/***/ }),
|
|
/* 446 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
__webpack_require__(140)('observable');
|
|
|
|
|
|
/***/ }),
|
|
/* 447 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// https://github.com/tc39/proposal-object-getownpropertydescriptors
|
|
var $export = __webpack_require__(3);
|
|
var ownKeys = __webpack_require__(223);
|
|
var toIObject = __webpack_require__(34);
|
|
var gOPD = __webpack_require__(35);
|
|
var createProperty = __webpack_require__(155);
|
|
|
|
$export($export.S, 'Object', {
|
|
getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {
|
|
var O = toIObject(object);
|
|
var getDesc = gOPD.f;
|
|
var keys = ownKeys(O);
|
|
var result = {};
|
|
var i = 0;
|
|
var key, desc;
|
|
while (keys.length > i) {
|
|
desc = getDesc(O, key = keys[i++]);
|
|
if (desc !== undefined) createProperty(result, key, desc);
|
|
}
|
|
return result;
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 448 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// https://github.com/tc39/proposal-object-values-entries
|
|
var $export = __webpack_require__(3);
|
|
var $values = __webpack_require__(226)(false);
|
|
|
|
$export($export.S, 'Object', {
|
|
values: function values(it) {
|
|
return $values(it);
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 449 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// https://github.com/tc39/proposal-object-values-entries
|
|
var $export = __webpack_require__(3);
|
|
var $entries = __webpack_require__(226)(true);
|
|
|
|
$export($export.S, 'Object', {
|
|
entries: function entries(it) {
|
|
return $entries(it);
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 450 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var $export = __webpack_require__(3);
|
|
var toObject = __webpack_require__(23);
|
|
var aFunction = __webpack_require__(27);
|
|
var $defineProperty = __webpack_require__(22);
|
|
|
|
// B.2.2.2 Object.prototype.__defineGetter__(P, getter)
|
|
__webpack_require__(21) && $export($export.P + __webpack_require__(110), 'Object', {
|
|
__defineGetter__: function __defineGetter__(P, getter) {
|
|
$defineProperty.f(toObject(this), P, { get: aFunction(getter), enumerable: true, configurable: true });
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 451 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var $export = __webpack_require__(3);
|
|
var toObject = __webpack_require__(23);
|
|
var aFunction = __webpack_require__(27);
|
|
var $defineProperty = __webpack_require__(22);
|
|
|
|
// B.2.2.3 Object.prototype.__defineSetter__(P, setter)
|
|
__webpack_require__(21) && $export($export.P + __webpack_require__(110), 'Object', {
|
|
__defineSetter__: function __defineSetter__(P, setter) {
|
|
$defineProperty.f(toObject(this), P, { set: aFunction(setter), enumerable: true, configurable: true });
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 452 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var $export = __webpack_require__(3);
|
|
var toObject = __webpack_require__(23);
|
|
var toPrimitive = __webpack_require__(43);
|
|
var getPrototypeOf = __webpack_require__(36);
|
|
var getOwnPropertyDescriptor = __webpack_require__(35).f;
|
|
|
|
// B.2.2.4 Object.prototype.__lookupGetter__(P)
|
|
__webpack_require__(21) && $export($export.P + __webpack_require__(110), 'Object', {
|
|
__lookupGetter__: function __lookupGetter__(P) {
|
|
var O = toObject(this);
|
|
var K = toPrimitive(P, true);
|
|
var D;
|
|
do {
|
|
if (D = getOwnPropertyDescriptor(O, K)) return D.get;
|
|
} while (O = getPrototypeOf(O));
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 453 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
var $export = __webpack_require__(3);
|
|
var toObject = __webpack_require__(23);
|
|
var toPrimitive = __webpack_require__(43);
|
|
var getPrototypeOf = __webpack_require__(36);
|
|
var getOwnPropertyDescriptor = __webpack_require__(35).f;
|
|
|
|
// B.2.2.5 Object.prototype.__lookupSetter__(P)
|
|
__webpack_require__(21) && $export($export.P + __webpack_require__(110), 'Object', {
|
|
__lookupSetter__: function __lookupSetter__(P) {
|
|
var O = toObject(this);
|
|
var K = toPrimitive(P, true);
|
|
var D;
|
|
do {
|
|
if (D = getOwnPropertyDescriptor(O, K)) return D.set;
|
|
} while (O = getPrototypeOf(O));
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 454 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// https://github.com/DavidBruant/Map-Set.prototype.toJSON
|
|
var $export = __webpack_require__(3);
|
|
|
|
$export($export.P + $export.R, 'Map', { toJSON: __webpack_require__(227)('Map') });
|
|
|
|
|
|
/***/ }),
|
|
/* 455 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// https://github.com/DavidBruant/Map-Set.prototype.toJSON
|
|
var $export = __webpack_require__(3);
|
|
|
|
$export($export.P + $export.R, 'Set', { toJSON: __webpack_require__(227)('Set') });
|
|
|
|
|
|
/***/ }),
|
|
/* 456 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// https://tc39.github.io/proposal-setmap-offrom/#sec-map.of
|
|
__webpack_require__(111)('Map');
|
|
|
|
|
|
/***/ }),
|
|
/* 457 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// https://tc39.github.io/proposal-setmap-offrom/#sec-set.of
|
|
__webpack_require__(111)('Set');
|
|
|
|
|
|
/***/ }),
|
|
/* 458 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.of
|
|
__webpack_require__(111)('WeakMap');
|
|
|
|
|
|
/***/ }),
|
|
/* 459 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.of
|
|
__webpack_require__(111)('WeakSet');
|
|
|
|
|
|
/***/ }),
|
|
/* 460 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// https://tc39.github.io/proposal-setmap-offrom/#sec-map.from
|
|
__webpack_require__(112)('Map');
|
|
|
|
|
|
/***/ }),
|
|
/* 461 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// https://tc39.github.io/proposal-setmap-offrom/#sec-set.from
|
|
__webpack_require__(112)('Set');
|
|
|
|
|
|
/***/ }),
|
|
/* 462 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.from
|
|
__webpack_require__(112)('WeakMap');
|
|
|
|
|
|
/***/ }),
|
|
/* 463 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.from
|
|
__webpack_require__(112)('WeakSet');
|
|
|
|
|
|
/***/ }),
|
|
/* 464 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// https://github.com/tc39/proposal-global
|
|
var $export = __webpack_require__(3);
|
|
|
|
$export($export.G, { global: __webpack_require__(16) });
|
|
|
|
|
|
/***/ }),
|
|
/* 465 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// https://github.com/tc39/proposal-global
|
|
var $export = __webpack_require__(3);
|
|
|
|
$export($export.S, 'System', { global: __webpack_require__(16) });
|
|
|
|
|
|
/***/ }),
|
|
/* 466 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// https://github.com/ljharb/proposal-is-error
|
|
var $export = __webpack_require__(3);
|
|
var cof = __webpack_require__(39);
|
|
|
|
$export($export.S, 'Error', {
|
|
isError: function isError(it) {
|
|
return cof(it) === 'Error';
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 467 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// https://rwaldron.github.io/proposal-math-extensions/
|
|
var $export = __webpack_require__(3);
|
|
|
|
$export($export.S, 'Math', {
|
|
clamp: function clamp(x, lower, upper) {
|
|
return Math.min(upper, Math.max(lower, x));
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 468 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// https://rwaldron.github.io/proposal-math-extensions/
|
|
var $export = __webpack_require__(3);
|
|
|
|
$export($export.S, 'Math', { DEG_PER_RAD: Math.PI / 180 });
|
|
|
|
|
|
/***/ }),
|
|
/* 469 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// https://rwaldron.github.io/proposal-math-extensions/
|
|
var $export = __webpack_require__(3);
|
|
var RAD_PER_DEG = 180 / Math.PI;
|
|
|
|
$export($export.S, 'Math', {
|
|
degrees: function degrees(radians) {
|
|
return radians * RAD_PER_DEG;
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 470 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// https://rwaldron.github.io/proposal-math-extensions/
|
|
var $export = __webpack_require__(3);
|
|
var scale = __webpack_require__(229);
|
|
var fround = __webpack_require__(208);
|
|
|
|
$export($export.S, 'Math', {
|
|
fscale: function fscale(x, inLow, inHigh, outLow, outHigh) {
|
|
return fround(scale(x, inLow, inHigh, outLow, outHigh));
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 471 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
|
|
var $export = __webpack_require__(3);
|
|
|
|
$export($export.S, 'Math', {
|
|
iaddh: function iaddh(x0, x1, y0, y1) {
|
|
var $x0 = x0 >>> 0;
|
|
var $x1 = x1 >>> 0;
|
|
var $y0 = y0 >>> 0;
|
|
return $x1 + (y1 >>> 0) + (($x0 & $y0 | ($x0 | $y0) & ~($x0 + $y0 >>> 0)) >>> 31) | 0;
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 472 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
|
|
var $export = __webpack_require__(3);
|
|
|
|
$export($export.S, 'Math', {
|
|
isubh: function isubh(x0, x1, y0, y1) {
|
|
var $x0 = x0 >>> 0;
|
|
var $x1 = x1 >>> 0;
|
|
var $y0 = y0 >>> 0;
|
|
return $x1 - (y1 >>> 0) - ((~$x0 & $y0 | ~($x0 ^ $y0) & $x0 - $y0 >>> 0) >>> 31) | 0;
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 473 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
|
|
var $export = __webpack_require__(3);
|
|
|
|
$export($export.S, 'Math', {
|
|
imulh: function imulh(u, v) {
|
|
var UINT16 = 0xffff;
|
|
var $u = +u;
|
|
var $v = +v;
|
|
var u0 = $u & UINT16;
|
|
var v0 = $v & UINT16;
|
|
var u1 = $u >> 16;
|
|
var v1 = $v >> 16;
|
|
var t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16);
|
|
return u1 * v1 + (t >> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >> 16);
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 474 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// https://rwaldron.github.io/proposal-math-extensions/
|
|
var $export = __webpack_require__(3);
|
|
|
|
$export($export.S, 'Math', { RAD_PER_DEG: 180 / Math.PI });
|
|
|
|
|
|
/***/ }),
|
|
/* 475 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// https://rwaldron.github.io/proposal-math-extensions/
|
|
var $export = __webpack_require__(3);
|
|
var DEG_PER_RAD = Math.PI / 180;
|
|
|
|
$export($export.S, 'Math', {
|
|
radians: function radians(degrees) {
|
|
return degrees * DEG_PER_RAD;
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 476 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// https://rwaldron.github.io/proposal-math-extensions/
|
|
var $export = __webpack_require__(3);
|
|
|
|
$export($export.S, 'Math', { scale: __webpack_require__(229) });
|
|
|
|
|
|
/***/ }),
|
|
/* 477 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
|
|
var $export = __webpack_require__(3);
|
|
|
|
$export($export.S, 'Math', {
|
|
umulh: function umulh(u, v) {
|
|
var UINT16 = 0xffff;
|
|
var $u = +u;
|
|
var $v = +v;
|
|
var u0 = $u & UINT16;
|
|
var v0 = $v & UINT16;
|
|
var u1 = $u >>> 16;
|
|
var v1 = $v >>> 16;
|
|
var t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16);
|
|
return u1 * v1 + (t >>> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >>> 16);
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 478 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// http://jfbastien.github.io/papers/Math.signbit.html
|
|
var $export = __webpack_require__(3);
|
|
|
|
$export($export.S, 'Math', { signbit: function signbit(x) {
|
|
// eslint-disable-next-line no-self-compare
|
|
return (x = +x) != x ? x : x == 0 ? 1 / x == Infinity : x > 0;
|
|
} });
|
|
|
|
|
|
/***/ }),
|
|
/* 479 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
// https://github.com/tc39/proposal-promise-finally
|
|
|
|
var $export = __webpack_require__(3);
|
|
var core = __webpack_require__(37);
|
|
var global = __webpack_require__(16);
|
|
var speciesConstructor = __webpack_require__(93);
|
|
var promiseResolve = __webpack_require__(216);
|
|
|
|
$export($export.P + $export.R, 'Promise', { 'finally': function (onFinally) {
|
|
var C = speciesConstructor(this, core.Promise || global.Promise);
|
|
var isFunction = typeof onFinally == 'function';
|
|
return this.then(
|
|
isFunction ? function (x) {
|
|
return promiseResolve(C, onFinally()).then(function () { return x; });
|
|
} : onFinally,
|
|
isFunction ? function (e) {
|
|
return promiseResolve(C, onFinally()).then(function () { throw e; });
|
|
} : onFinally
|
|
);
|
|
} });
|
|
|
|
|
|
/***/ }),
|
|
/* 480 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
// https://github.com/tc39/proposal-promise-try
|
|
var $export = __webpack_require__(3);
|
|
var newPromiseCapability = __webpack_require__(164);
|
|
var perform = __webpack_require__(215);
|
|
|
|
$export($export.S, 'Promise', { 'try': function (callbackfn) {
|
|
var promiseCapability = newPromiseCapability.f(this);
|
|
var result = perform(callbackfn);
|
|
(result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v);
|
|
return promiseCapability.promise;
|
|
} });
|
|
|
|
|
|
/***/ }),
|
|
/* 481 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var metadata = __webpack_require__(49);
|
|
var anObject = __webpack_require__(9);
|
|
var toMetaKey = metadata.key;
|
|
var ordinaryDefineOwnMetadata = metadata.set;
|
|
|
|
metadata.exp({ defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey) {
|
|
ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey));
|
|
} });
|
|
|
|
|
|
/***/ }),
|
|
/* 482 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var metadata = __webpack_require__(49);
|
|
var anObject = __webpack_require__(9);
|
|
var toMetaKey = metadata.key;
|
|
var getOrCreateMetadataMap = metadata.map;
|
|
var store = metadata.store;
|
|
|
|
metadata.exp({ deleteMetadata: function deleteMetadata(metadataKey, target /* , targetKey */) {
|
|
var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2]);
|
|
var metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false);
|
|
if (metadataMap === undefined || !metadataMap['delete'](metadataKey)) return false;
|
|
if (metadataMap.size) return true;
|
|
var targetMetadata = store.get(target);
|
|
targetMetadata['delete'](targetKey);
|
|
return !!targetMetadata.size || store['delete'](target);
|
|
} });
|
|
|
|
|
|
/***/ }),
|
|
/* 483 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var metadata = __webpack_require__(49);
|
|
var anObject = __webpack_require__(9);
|
|
var getPrototypeOf = __webpack_require__(36);
|
|
var ordinaryHasOwnMetadata = metadata.has;
|
|
var ordinaryGetOwnMetadata = metadata.get;
|
|
var toMetaKey = metadata.key;
|
|
|
|
var ordinaryGetMetadata = function (MetadataKey, O, P) {
|
|
var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P);
|
|
if (hasOwn) return ordinaryGetOwnMetadata(MetadataKey, O, P);
|
|
var parent = getPrototypeOf(O);
|
|
return parent !== null ? ordinaryGetMetadata(MetadataKey, parent, P) : undefined;
|
|
};
|
|
|
|
metadata.exp({ getMetadata: function getMetadata(metadataKey, target /* , targetKey */) {
|
|
return ordinaryGetMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
|
|
} });
|
|
|
|
|
|
/***/ }),
|
|
/* 484 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var Set = __webpack_require__(219);
|
|
var from = __webpack_require__(228);
|
|
var metadata = __webpack_require__(49);
|
|
var anObject = __webpack_require__(9);
|
|
var getPrototypeOf = __webpack_require__(36);
|
|
var ordinaryOwnMetadataKeys = metadata.keys;
|
|
var toMetaKey = metadata.key;
|
|
|
|
var ordinaryMetadataKeys = function (O, P) {
|
|
var oKeys = ordinaryOwnMetadataKeys(O, P);
|
|
var parent = getPrototypeOf(O);
|
|
if (parent === null) return oKeys;
|
|
var pKeys = ordinaryMetadataKeys(parent, P);
|
|
return pKeys.length ? oKeys.length ? from(new Set(oKeys.concat(pKeys))) : pKeys : oKeys;
|
|
};
|
|
|
|
metadata.exp({ getMetadataKeys: function getMetadataKeys(target /* , targetKey */) {
|
|
return ordinaryMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1]));
|
|
} });
|
|
|
|
|
|
/***/ }),
|
|
/* 485 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var metadata = __webpack_require__(49);
|
|
var anObject = __webpack_require__(9);
|
|
var ordinaryGetOwnMetadata = metadata.get;
|
|
var toMetaKey = metadata.key;
|
|
|
|
metadata.exp({ getOwnMetadata: function getOwnMetadata(metadataKey, target /* , targetKey */) {
|
|
return ordinaryGetOwnMetadata(metadataKey, anObject(target)
|
|
, arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
|
|
} });
|
|
|
|
|
|
/***/ }),
|
|
/* 486 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var metadata = __webpack_require__(49);
|
|
var anObject = __webpack_require__(9);
|
|
var ordinaryOwnMetadataKeys = metadata.keys;
|
|
var toMetaKey = metadata.key;
|
|
|
|
metadata.exp({ getOwnMetadataKeys: function getOwnMetadataKeys(target /* , targetKey */) {
|
|
return ordinaryOwnMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1]));
|
|
} });
|
|
|
|
|
|
/***/ }),
|
|
/* 487 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var metadata = __webpack_require__(49);
|
|
var anObject = __webpack_require__(9);
|
|
var getPrototypeOf = __webpack_require__(36);
|
|
var ordinaryHasOwnMetadata = metadata.has;
|
|
var toMetaKey = metadata.key;
|
|
|
|
var ordinaryHasMetadata = function (MetadataKey, O, P) {
|
|
var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P);
|
|
if (hasOwn) return true;
|
|
var parent = getPrototypeOf(O);
|
|
return parent !== null ? ordinaryHasMetadata(MetadataKey, parent, P) : false;
|
|
};
|
|
|
|
metadata.exp({ hasMetadata: function hasMetadata(metadataKey, target /* , targetKey */) {
|
|
return ordinaryHasMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
|
|
} });
|
|
|
|
|
|
/***/ }),
|
|
/* 488 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var metadata = __webpack_require__(49);
|
|
var anObject = __webpack_require__(9);
|
|
var ordinaryHasOwnMetadata = metadata.has;
|
|
var toMetaKey = metadata.key;
|
|
|
|
metadata.exp({ hasOwnMetadata: function hasOwnMetadata(metadataKey, target /* , targetKey */) {
|
|
return ordinaryHasOwnMetadata(metadataKey, anObject(target)
|
|
, arguments.length < 3 ? undefined : toMetaKey(arguments[2]));
|
|
} });
|
|
|
|
|
|
/***/ }),
|
|
/* 489 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var $metadata = __webpack_require__(49);
|
|
var anObject = __webpack_require__(9);
|
|
var aFunction = __webpack_require__(27);
|
|
var toMetaKey = $metadata.key;
|
|
var ordinaryDefineOwnMetadata = $metadata.set;
|
|
|
|
$metadata.exp({ metadata: function metadata(metadataKey, metadataValue) {
|
|
return function decorator(target, targetKey) {
|
|
ordinaryDefineOwnMetadata(
|
|
metadataKey, metadataValue,
|
|
(targetKey !== undefined ? anObject : aFunction)(target),
|
|
toMetaKey(targetKey)
|
|
);
|
|
};
|
|
} });
|
|
|
|
|
|
/***/ }),
|
|
/* 490 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask
|
|
var $export = __webpack_require__(3);
|
|
var microtask = __webpack_require__(163)();
|
|
var process = __webpack_require__(16).process;
|
|
var isNode = __webpack_require__(39)(process) == 'process';
|
|
|
|
$export($export.G, {
|
|
asap: function asap(fn) {
|
|
var domain = isNode && process.domain;
|
|
microtask(domain ? domain.bind(fn) : fn);
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 491 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
// https://github.com/zenparsing/es-observable
|
|
var $export = __webpack_require__(3);
|
|
var global = __webpack_require__(16);
|
|
var core = __webpack_require__(37);
|
|
var microtask = __webpack_require__(163)();
|
|
var OBSERVABLE = __webpack_require__(19)('observable');
|
|
var aFunction = __webpack_require__(27);
|
|
var anObject = __webpack_require__(9);
|
|
var anInstance = __webpack_require__(68);
|
|
var redefineAll = __webpack_require__(70);
|
|
var hide = __webpack_require__(29);
|
|
var forOf = __webpack_require__(69);
|
|
var RETURN = forOf.RETURN;
|
|
|
|
var getMethod = function (fn) {
|
|
return fn == null ? undefined : aFunction(fn);
|
|
};
|
|
|
|
var cleanupSubscription = function (subscription) {
|
|
var cleanup = subscription._c;
|
|
if (cleanup) {
|
|
subscription._c = undefined;
|
|
cleanup();
|
|
}
|
|
};
|
|
|
|
var subscriptionClosed = function (subscription) {
|
|
return subscription._o === undefined;
|
|
};
|
|
|
|
var closeSubscription = function (subscription) {
|
|
if (!subscriptionClosed(subscription)) {
|
|
subscription._o = undefined;
|
|
cleanupSubscription(subscription);
|
|
}
|
|
};
|
|
|
|
var Subscription = function (observer, subscriber) {
|
|
anObject(observer);
|
|
this._c = undefined;
|
|
this._o = observer;
|
|
observer = new SubscriptionObserver(this);
|
|
try {
|
|
var cleanup = subscriber(observer);
|
|
var subscription = cleanup;
|
|
if (cleanup != null) {
|
|
if (typeof cleanup.unsubscribe === 'function') cleanup = function () { subscription.unsubscribe(); };
|
|
else aFunction(cleanup);
|
|
this._c = cleanup;
|
|
}
|
|
} catch (e) {
|
|
observer.error(e);
|
|
return;
|
|
} if (subscriptionClosed(this)) cleanupSubscription(this);
|
|
};
|
|
|
|
Subscription.prototype = redefineAll({}, {
|
|
unsubscribe: function unsubscribe() { closeSubscription(this); }
|
|
});
|
|
|
|
var SubscriptionObserver = function (subscription) {
|
|
this._s = subscription;
|
|
};
|
|
|
|
SubscriptionObserver.prototype = redefineAll({}, {
|
|
next: function next(value) {
|
|
var subscription = this._s;
|
|
if (!subscriptionClosed(subscription)) {
|
|
var observer = subscription._o;
|
|
try {
|
|
var m = getMethod(observer.next);
|
|
if (m) return m.call(observer, value);
|
|
} catch (e) {
|
|
try {
|
|
closeSubscription(subscription);
|
|
} finally {
|
|
throw e;
|
|
}
|
|
}
|
|
}
|
|
},
|
|
error: function error(value) {
|
|
var subscription = this._s;
|
|
if (subscriptionClosed(subscription)) throw value;
|
|
var observer = subscription._o;
|
|
subscription._o = undefined;
|
|
try {
|
|
var m = getMethod(observer.error);
|
|
if (!m) throw value;
|
|
value = m.call(observer, value);
|
|
} catch (e) {
|
|
try {
|
|
cleanupSubscription(subscription);
|
|
} finally {
|
|
throw e;
|
|
}
|
|
} cleanupSubscription(subscription);
|
|
return value;
|
|
},
|
|
complete: function complete(value) {
|
|
var subscription = this._s;
|
|
if (!subscriptionClosed(subscription)) {
|
|
var observer = subscription._o;
|
|
subscription._o = undefined;
|
|
try {
|
|
var m = getMethod(observer.complete);
|
|
value = m ? m.call(observer, value) : undefined;
|
|
} catch (e) {
|
|
try {
|
|
cleanupSubscription(subscription);
|
|
} finally {
|
|
throw e;
|
|
}
|
|
} cleanupSubscription(subscription);
|
|
return value;
|
|
}
|
|
}
|
|
});
|
|
|
|
var $Observable = function Observable(subscriber) {
|
|
anInstance(this, $Observable, 'Observable', '_f')._f = aFunction(subscriber);
|
|
};
|
|
|
|
redefineAll($Observable.prototype, {
|
|
subscribe: function subscribe(observer) {
|
|
return new Subscription(observer, this._f);
|
|
},
|
|
forEach: function forEach(fn) {
|
|
var that = this;
|
|
return new (core.Promise || global.Promise)(function (resolve, reject) {
|
|
aFunction(fn);
|
|
var subscription = that.subscribe({
|
|
next: function (value) {
|
|
try {
|
|
return fn(value);
|
|
} catch (e) {
|
|
reject(e);
|
|
subscription.unsubscribe();
|
|
}
|
|
},
|
|
error: reject,
|
|
complete: resolve
|
|
});
|
|
});
|
|
}
|
|
});
|
|
|
|
redefineAll($Observable, {
|
|
from: function from(x) {
|
|
var C = typeof this === 'function' ? this : $Observable;
|
|
var method = getMethod(anObject(x)[OBSERVABLE]);
|
|
if (method) {
|
|
var observable = anObject(method.call(x));
|
|
return observable.constructor === C ? observable : new C(function (observer) {
|
|
return observable.subscribe(observer);
|
|
});
|
|
}
|
|
return new C(function (observer) {
|
|
var done = false;
|
|
microtask(function () {
|
|
if (!done) {
|
|
try {
|
|
if (forOf(x, false, function (it) {
|
|
observer.next(it);
|
|
if (done) return RETURN;
|
|
}) === RETURN) return;
|
|
} catch (e) {
|
|
if (done) throw e;
|
|
observer.error(e);
|
|
return;
|
|
} observer.complete();
|
|
}
|
|
});
|
|
return function () { done = true; };
|
|
});
|
|
},
|
|
of: function of() {
|
|
for (var i = 0, l = arguments.length, items = new Array(l); i < l;) items[i] = arguments[i++];
|
|
return new (typeof this === 'function' ? this : $Observable)(function (observer) {
|
|
var done = false;
|
|
microtask(function () {
|
|
if (!done) {
|
|
for (var j = 0; j < items.length; ++j) {
|
|
observer.next(items[j]);
|
|
if (done) return;
|
|
} observer.complete();
|
|
}
|
|
});
|
|
return function () { done = true; };
|
|
});
|
|
}
|
|
});
|
|
|
|
hide($Observable.prototype, OBSERVABLE, function () { return this; });
|
|
|
|
$export($export.G, { Observable: $Observable });
|
|
|
|
__webpack_require__(67)('Observable');
|
|
|
|
|
|
/***/ }),
|
|
/* 492 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// ie9- setTimeout & setInterval additional parameters fix
|
|
var global = __webpack_require__(16);
|
|
var $export = __webpack_require__(3);
|
|
var userAgent = __webpack_require__(107);
|
|
var slice = [].slice;
|
|
var MSIE = /MSIE .\./.test(userAgent); // <- dirty ie9- check
|
|
var wrap = function (set) {
|
|
return function (fn, time /* , ...args */) {
|
|
var boundArgs = arguments.length > 2;
|
|
var args = boundArgs ? slice.call(arguments, 2) : false;
|
|
return set(boundArgs ? function () {
|
|
// eslint-disable-next-line no-new-func
|
|
(typeof fn == 'function' ? fn : Function(fn)).apply(this, args);
|
|
} : fn, time);
|
|
};
|
|
};
|
|
$export($export.G + $export.B + $export.F * MSIE, {
|
|
setTimeout: wrap(global.setTimeout),
|
|
setInterval: wrap(global.setInterval)
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 493 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var $export = __webpack_require__(3);
|
|
var $task = __webpack_require__(162);
|
|
$export($export.G + $export.B, {
|
|
setImmediate: $task.set,
|
|
clearImmediate: $task.clear
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
/* 494 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var $iterators = __webpack_require__(159);
|
|
var getKeys = __webpack_require__(63);
|
|
var redefine = __webpack_require__(30);
|
|
var global = __webpack_require__(16);
|
|
var hide = __webpack_require__(29);
|
|
var Iterators = __webpack_require__(80);
|
|
var wks = __webpack_require__(19);
|
|
var ITERATOR = wks('iterator');
|
|
var TO_STRING_TAG = wks('toStringTag');
|
|
var ArrayValues = Iterators.Array;
|
|
|
|
var DOMIterables = {
|
|
CSSRuleList: true, // TODO: Not spec compliant, should be false.
|
|
CSSStyleDeclaration: false,
|
|
CSSValueList: false,
|
|
ClientRectList: false,
|
|
DOMRectList: false,
|
|
DOMStringList: false,
|
|
DOMTokenList: true,
|
|
DataTransferItemList: false,
|
|
FileList: false,
|
|
HTMLAllCollection: false,
|
|
HTMLCollection: false,
|
|
HTMLFormElement: false,
|
|
HTMLSelectElement: false,
|
|
MediaList: true, // TODO: Not spec compliant, should be false.
|
|
MimeTypeArray: false,
|
|
NamedNodeMap: false,
|
|
NodeList: true,
|
|
PaintRequestList: false,
|
|
Plugin: false,
|
|
PluginArray: false,
|
|
SVGLengthList: false,
|
|
SVGNumberList: false,
|
|
SVGPathSegList: false,
|
|
SVGPointList: false,
|
|
SVGStringList: false,
|
|
SVGTransformList: false,
|
|
SourceBufferList: false,
|
|
StyleSheetList: true, // TODO: Not spec compliant, should be false.
|
|
TextTrackCueList: false,
|
|
TextTrackList: false,
|
|
TouchList: false
|
|
};
|
|
|
|
for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) {
|
|
var NAME = collections[i];
|
|
var explicit = DOMIterables[NAME];
|
|
var Collection = global[NAME];
|
|
var proto = Collection && Collection.prototype;
|
|
var key;
|
|
if (proto) {
|
|
if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues);
|
|
if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);
|
|
Iterators[NAME] = ArrayValues;
|
|
if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true);
|
|
}
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
/* 495 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
/* WEBPACK VAR INJECTION */(function(global) {/**
|
|
* Copyright (c) 2014, Facebook, Inc.
|
|
* All rights reserved.
|
|
*
|
|
* This source code is licensed under the BSD-style license found in the
|
|
* https://raw.github.com/facebook/regenerator/master/LICENSE file. An
|
|
* additional grant of patent rights can be found in the PATENTS file in
|
|
* the same directory.
|
|
*/
|
|
|
|
!(function(global) {
|
|
"use strict";
|
|
|
|
var Op = Object.prototype;
|
|
var hasOwn = Op.hasOwnProperty;
|
|
var undefined; // More compressible than void 0.
|
|
var $Symbol = typeof Symbol === "function" ? Symbol : {};
|
|
var iteratorSymbol = $Symbol.iterator || "@@iterator";
|
|
var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
|
|
var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
|
|
var inModule = typeof module === "object";
|
|
var runtime = global.regeneratorRuntime;
|
|
if (runtime) {
|
|
if (inModule) {
|
|
// If regeneratorRuntime is defined globally and we're in a module,
|
|
// make the exports object identical to regeneratorRuntime.
|
|
module.exports = runtime;
|
|
}
|
|
// Don't bother evaluating the rest of this file if the runtime was
|
|
// already defined globally.
|
|
return;
|
|
}
|
|
|
|
// Define the runtime globally (as expected by generated code) as either
|
|
// module.exports (if we're in a module) or a new, empty object.
|
|
runtime = global.regeneratorRuntime = inModule ? module.exports : {};
|
|
|
|
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
// If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
|
|
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
|
|
var generator = Object.create(protoGenerator.prototype);
|
|
var context = new Context(tryLocsList || []);
|
|
|
|
// The ._invoke method unifies the implementations of the .next,
|
|
// .throw, and .return methods.
|
|
generator._invoke = makeInvokeMethod(innerFn, self, context);
|
|
|
|
return generator;
|
|
}
|
|
runtime.wrap = wrap;
|
|
|
|
// Try/catch helper to minimize deoptimizations. Returns a completion
|
|
// record like context.tryEntries[i].completion. This interface could
|
|
// have been (and was previously) designed to take a closure to be
|
|
// invoked without arguments, but in all the cases we care about we
|
|
// already have an existing method we want to call, so there's no need
|
|
// to create a new function object. We can even get away with assuming
|
|
// the method takes exactly one argument, since that happens to be true
|
|
// in every case, so we don't have to touch the arguments object. The
|
|
// only additional allocation required is the completion record, which
|
|
// has a stable shape and so hopefully should be cheap to allocate.
|
|
function tryCatch(fn, obj, arg) {
|
|
try {
|
|
return { type: "normal", arg: fn.call(obj, arg) };
|
|
} catch (err) {
|
|
return { type: "throw", arg: err };
|
|
}
|
|
}
|
|
|
|
var GenStateSuspendedStart = "suspendedStart";
|
|
var GenStateSuspendedYield = "suspendedYield";
|
|
var GenStateExecuting = "executing";
|
|
var GenStateCompleted = "completed";
|
|
|
|
// Returning this object from the innerFn has the same effect as
|
|
// breaking out of the dispatch switch statement.
|
|
var ContinueSentinel = {};
|
|
|
|
// Dummy constructor functions that we use as the .constructor and
|
|
// .constructor.prototype properties for functions that return Generator
|
|
// objects. For full spec compliance, you may wish to configure your
|
|
// minifier not to mangle the names of these two functions.
|
|
function Generator() {}
|
|
function GeneratorFunction() {}
|
|
function GeneratorFunctionPrototype() {}
|
|
|
|
// This is a polyfill for %IteratorPrototype% for environments that
|
|
// don't natively support it.
|
|
var IteratorPrototype = {};
|
|
IteratorPrototype[iteratorSymbol] = function () {
|
|
return this;
|
|
};
|
|
|
|
var getProto = Object.getPrototypeOf;
|
|
var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
|
if (NativeIteratorPrototype &&
|
|
NativeIteratorPrototype !== Op &&
|
|
hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
|
|
// This environment has a native %IteratorPrototype%; use it instead
|
|
// of the polyfill.
|
|
IteratorPrototype = NativeIteratorPrototype;
|
|
}
|
|
|
|
var Gp = GeneratorFunctionPrototype.prototype =
|
|
Generator.prototype = Object.create(IteratorPrototype);
|
|
GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
|
|
GeneratorFunctionPrototype.constructor = GeneratorFunction;
|
|
GeneratorFunctionPrototype[toStringTagSymbol] =
|
|
GeneratorFunction.displayName = "GeneratorFunction";
|
|
|
|
// Helper for defining the .next, .throw, and .return methods of the
|
|
// Iterator interface in terms of a single ._invoke method.
|
|
function defineIteratorMethods(prototype) {
|
|
["next", "throw", "return"].forEach(function(method) {
|
|
prototype[method] = function(arg) {
|
|
return this._invoke(method, arg);
|
|
};
|
|
});
|
|
}
|
|
|
|
runtime.isGeneratorFunction = function(genFun) {
|
|
var ctor = typeof genFun === "function" && genFun.constructor;
|
|
return ctor
|
|
? ctor === GeneratorFunction ||
|
|
// For the native GeneratorFunction constructor, the best we can
|
|
// do is to check its .name property.
|
|
(ctor.displayName || ctor.name) === "GeneratorFunction"
|
|
: false;
|
|
};
|
|
|
|
runtime.mark = function(genFun) {
|
|
if (Object.setPrototypeOf) {
|
|
Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
|
|
} else {
|
|
genFun.__proto__ = GeneratorFunctionPrototype;
|
|
if (!(toStringTagSymbol in genFun)) {
|
|
genFun[toStringTagSymbol] = "GeneratorFunction";
|
|
}
|
|
}
|
|
genFun.prototype = Object.create(Gp);
|
|
return genFun;
|
|
};
|
|
|
|
// Within the body of any async function, `await x` is transformed to
|
|
// `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
|
|
// `hasOwn.call(value, "__await")` to determine if the yielded value is
|
|
// meant to be awaited.
|
|
runtime.awrap = function(arg) {
|
|
return { __await: arg };
|
|
};
|
|
|
|
function AsyncIterator(generator) {
|
|
function invoke(method, arg, resolve, reject) {
|
|
var record = tryCatch(generator[method], generator, arg);
|
|
if (record.type === "throw") {
|
|
reject(record.arg);
|
|
} else {
|
|
var result = record.arg;
|
|
var value = result.value;
|
|
if (value &&
|
|
typeof value === "object" &&
|
|
hasOwn.call(value, "__await")) {
|
|
return Promise.resolve(value.__await).then(function(value) {
|
|
invoke("next", value, resolve, reject);
|
|
}, function(err) {
|
|
invoke("throw", err, resolve, reject);
|
|
});
|
|
}
|
|
|
|
return Promise.resolve(value).then(function(unwrapped) {
|
|
// When a yielded Promise is resolved, its final value becomes
|
|
// the .value of the Promise<{value,done}> result for the
|
|
// current iteration. If the Promise is rejected, however, the
|
|
// result for this iteration will be rejected with the same
|
|
// reason. Note that rejections of yielded Promises are not
|
|
// thrown back into the generator function, as is the case
|
|
// when an awaited Promise is rejected. This difference in
|
|
// behavior between yield and await is important, because it
|
|
// allows the consumer to decide what to do with the yielded
|
|
// rejection (swallow it and continue, manually .throw it back
|
|
// into the generator, abandon iteration, whatever). With
|
|
// await, by contrast, there is no opportunity to examine the
|
|
// rejection reason outside the generator function, so the
|
|
// only option is to throw it from the await expression, and
|
|
// let the generator function handle the exception.
|
|
result.value = unwrapped;
|
|
resolve(result);
|
|
}, reject);
|
|
}
|
|
}
|
|
|
|
if (typeof global.process === "object" && global.process.domain) {
|
|
invoke = global.process.domain.bind(invoke);
|
|
}
|
|
|
|
var previousPromise;
|
|
|
|
function enqueue(method, arg) {
|
|
function callInvokeWithMethodAndArg() {
|
|
return new Promise(function(resolve, reject) {
|
|
invoke(method, arg, resolve, reject);
|
|
});
|
|
}
|
|
|
|
return previousPromise =
|
|
// If enqueue has been called before, then we want to wait until
|
|
// all previous Promises have been resolved before calling invoke,
|
|
// so that results are always delivered in the correct order. If
|
|
// enqueue has not been called before, then it is important to
|
|
// call invoke immediately, without waiting on a callback to fire,
|
|
// so that the async generator function has the opportunity to do
|
|
// any necessary setup in a predictable way. This predictability
|
|
// is why the Promise constructor synchronously invokes its
|
|
// executor callback, and why async functions synchronously
|
|
// execute code before the first await. Since we implement simple
|
|
// async functions in terms of async generators, it is especially
|
|
// important to get this right, even though it requires care.
|
|
previousPromise ? previousPromise.then(
|
|
callInvokeWithMethodAndArg,
|
|
// Avoid propagating failures to Promises returned by later
|
|
// invocations of the iterator.
|
|
callInvokeWithMethodAndArg
|
|
) : callInvokeWithMethodAndArg();
|
|
}
|
|
|
|
// Define the unified helper method that is used to implement .next,
|
|
// .throw, and .return (see defineIteratorMethods).
|
|
this._invoke = enqueue;
|
|
}
|
|
|
|
defineIteratorMethods(AsyncIterator.prototype);
|
|
AsyncIterator.prototype[asyncIteratorSymbol] = function () {
|
|
return this;
|
|
};
|
|
runtime.AsyncIterator = AsyncIterator;
|
|
|
|
// Note that simple async functions are implemented on top of
|
|
// AsyncIterator objects; they just return a Promise for the value of
|
|
// the final result produced by the iterator.
|
|
runtime.async = function(innerFn, outerFn, self, tryLocsList) {
|
|
var iter = new AsyncIterator(
|
|
wrap(innerFn, outerFn, self, tryLocsList)
|
|
);
|
|
|
|
return runtime.isGeneratorFunction(outerFn)
|
|
? iter // If outerFn is a generator, return the full iterator.
|
|
: iter.next().then(function(result) {
|
|
return result.done ? result.value : iter.next();
|
|
});
|
|
};
|
|
|
|
function makeInvokeMethod(innerFn, self, context) {
|
|
var state = GenStateSuspendedStart;
|
|
|
|
return function invoke(method, arg) {
|
|
if (state === GenStateExecuting) {
|
|
throw new Error("Generator is already running");
|
|
}
|
|
|
|
if (state === GenStateCompleted) {
|
|
if (method === "throw") {
|
|
throw arg;
|
|
}
|
|
|
|
// Be forgiving, per 25.3.3.3.3 of the spec:
|
|
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
|
|
return doneResult();
|
|
}
|
|
|
|
context.method = method;
|
|
context.arg = arg;
|
|
|
|
while (true) {
|
|
var delegate = context.delegate;
|
|
if (delegate) {
|
|
var delegateResult = maybeInvokeDelegate(delegate, context);
|
|
if (delegateResult) {
|
|
if (delegateResult === ContinueSentinel) continue;
|
|
return delegateResult;
|
|
}
|
|
}
|
|
|
|
if (context.method === "next") {
|
|
// Setting context._sent for legacy support of Babel's
|
|
// function.sent implementation.
|
|
context.sent = context._sent = context.arg;
|
|
|
|
} else if (context.method === "throw") {
|
|
if (state === GenStateSuspendedStart) {
|
|
state = GenStateCompleted;
|
|
throw context.arg;
|
|
}
|
|
|
|
context.dispatchException(context.arg);
|
|
|
|
} else if (context.method === "return") {
|
|
context.abrupt("return", context.arg);
|
|
}
|
|
|
|
state = GenStateExecuting;
|
|
|
|
var record = tryCatch(innerFn, self, context);
|
|
if (record.type === "normal") {
|
|
// If an exception is thrown from innerFn, we leave state ===
|
|
// GenStateExecuting and loop back for another invocation.
|
|
state = context.done
|
|
? GenStateCompleted
|
|
: GenStateSuspendedYield;
|
|
|
|
if (record.arg === ContinueSentinel) {
|
|
continue;
|
|
}
|
|
|
|
return {
|
|
value: record.arg,
|
|
done: context.done
|
|
};
|
|
|
|
} else if (record.type === "throw") {
|
|
state = GenStateCompleted;
|
|
// Dispatch the exception by looping back around to the
|
|
// context.dispatchException(context.arg) call above.
|
|
context.method = "throw";
|
|
context.arg = record.arg;
|
|
}
|
|
}
|
|
};
|
|
}
|
|
|
|
// Call delegate.iterator[context.method](context.arg) and handle the
|
|
// result, either by returning a { value, done } result from the
|
|
// delegate iterator, or by modifying context.method and context.arg,
|
|
// setting context.delegate to null, and returning the ContinueSentinel.
|
|
function maybeInvokeDelegate(delegate, context) {
|
|
var method = delegate.iterator[context.method];
|
|
if (method === undefined) {
|
|
// A .throw or .return when the delegate iterator has no .throw
|
|
// method always terminates the yield* loop.
|
|
context.delegate = null;
|
|
|
|
if (context.method === "throw") {
|
|
if (delegate.iterator.return) {
|
|
// If the delegate iterator has a return method, give it a
|
|
// chance to clean up.
|
|
context.method = "return";
|
|
context.arg = undefined;
|
|
maybeInvokeDelegate(delegate, context);
|
|
|
|
if (context.method === "throw") {
|
|
// If maybeInvokeDelegate(context) changed context.method from
|
|
// "return" to "throw", let that override the TypeError below.
|
|
return ContinueSentinel;
|
|
}
|
|
}
|
|
|
|
context.method = "throw";
|
|
context.arg = new TypeError(
|
|
"The iterator does not provide a 'throw' method");
|
|
}
|
|
|
|
return ContinueSentinel;
|
|
}
|
|
|
|
var record = tryCatch(method, delegate.iterator, context.arg);
|
|
|
|
if (record.type === "throw") {
|
|
context.method = "throw";
|
|
context.arg = record.arg;
|
|
context.delegate = null;
|
|
return ContinueSentinel;
|
|
}
|
|
|
|
var info = record.arg;
|
|
|
|
if (! info) {
|
|
context.method = "throw";
|
|
context.arg = new TypeError("iterator result is not an object");
|
|
context.delegate = null;
|
|
return ContinueSentinel;
|
|
}
|
|
|
|
if (info.done) {
|
|
// Assign the result of the finished delegate to the temporary
|
|
// variable specified by delegate.resultName (see delegateYield).
|
|
context[delegate.resultName] = info.value;
|
|
|
|
// Resume execution at the desired location (see delegateYield).
|
|
context.next = delegate.nextLoc;
|
|
|
|
// If context.method was "throw" but the delegate handled the
|
|
// exception, let the outer generator proceed normally. If
|
|
// context.method was "next", forget context.arg since it has been
|
|
// "consumed" by the delegate iterator. If context.method was
|
|
// "return", allow the original .return call to continue in the
|
|
// outer generator.
|
|
if (context.method !== "return") {
|
|
context.method = "next";
|
|
context.arg = undefined;
|
|
}
|
|
|
|
} else {
|
|
// Re-yield the result returned by the delegate method.
|
|
return info;
|
|
}
|
|
|
|
// The delegate iterator is finished, so forget it and continue with
|
|
// the outer generator.
|
|
context.delegate = null;
|
|
return ContinueSentinel;
|
|
}
|
|
|
|
// Define Generator.prototype.{next,throw,return} in terms of the
|
|
// unified ._invoke helper method.
|
|
defineIteratorMethods(Gp);
|
|
|
|
Gp[toStringTagSymbol] = "Generator";
|
|
|
|
// A Generator should always return itself as the iterator object when the
|
|
// @@iterator function is called on it. Some browsers' implementations of the
|
|
// iterator prototype chain incorrectly implement this, causing the Generator
|
|
// object to not be returned from this call. This ensures that doesn't happen.
|
|
// See https://github.com/facebook/regenerator/issues/274 for more details.
|
|
Gp[iteratorSymbol] = function() {
|
|
return this;
|
|
};
|
|
|
|
Gp.toString = function() {
|
|
return "[object Generator]";
|
|
};
|
|
|
|
function pushTryEntry(locs) {
|
|
var entry = { tryLoc: locs[0] };
|
|
|
|
if (1 in locs) {
|
|
entry.catchLoc = locs[1];
|
|
}
|
|
|
|
if (2 in locs) {
|
|
entry.finallyLoc = locs[2];
|
|
entry.afterLoc = locs[3];
|
|
}
|
|
|
|
this.tryEntries.push(entry);
|
|
}
|
|
|
|
function resetTryEntry(entry) {
|
|
var record = entry.completion || {};
|
|
record.type = "normal";
|
|
delete record.arg;
|
|
entry.completion = record;
|
|
}
|
|
|
|
function Context(tryLocsList) {
|
|
// The root entry object (effectively a try statement without a catch
|
|
// or a finally block) gives us a place to store values thrown from
|
|
// locations where there is no enclosing try statement.
|
|
this.tryEntries = [{ tryLoc: "root" }];
|
|
tryLocsList.forEach(pushTryEntry, this);
|
|
this.reset(true);
|
|
}
|
|
|
|
runtime.keys = function(object) {
|
|
var keys = [];
|
|
for (var key in object) {
|
|
keys.push(key);
|
|
}
|
|
keys.reverse();
|
|
|
|
// Rather than returning an object with a next method, we keep
|
|
// things simple and return the next function itself.
|
|
return function next() {
|
|
while (keys.length) {
|
|
var key = keys.pop();
|
|
if (key in object) {
|
|
next.value = key;
|
|
next.done = false;
|
|
return next;
|
|
}
|
|
}
|
|
|
|
// To avoid creating an additional object, we just hang the .value
|
|
// and .done properties off the next function object itself. This
|
|
// also ensures that the minifier will not anonymize the function.
|
|
next.done = true;
|
|
return next;
|
|
};
|
|
};
|
|
|
|
function values(iterable) {
|
|
if (iterable) {
|
|
var iteratorMethod = iterable[iteratorSymbol];
|
|
if (iteratorMethod) {
|
|
return iteratorMethod.call(iterable);
|
|
}
|
|
|
|
if (typeof iterable.next === "function") {
|
|
return iterable;
|
|
}
|
|
|
|
if (!isNaN(iterable.length)) {
|
|
var i = -1, next = function next() {
|
|
while (++i < iterable.length) {
|
|
if (hasOwn.call(iterable, i)) {
|
|
next.value = iterable[i];
|
|
next.done = false;
|
|
return next;
|
|
}
|
|
}
|
|
|
|
next.value = undefined;
|
|
next.done = true;
|
|
|
|
return next;
|
|
};
|
|
|
|
return next.next = next;
|
|
}
|
|
}
|
|
|
|
// Return an iterator with no values.
|
|
return { next: doneResult };
|
|
}
|
|
runtime.values = values;
|
|
|
|
function doneResult() {
|
|
return { value: undefined, done: true };
|
|
}
|
|
|
|
Context.prototype = {
|
|
constructor: Context,
|
|
|
|
reset: function(skipTempReset) {
|
|
this.prev = 0;
|
|
this.next = 0;
|
|
// Resetting context._sent for legacy support of Babel's
|
|
// function.sent implementation.
|
|
this.sent = this._sent = undefined;
|
|
this.done = false;
|
|
this.delegate = null;
|
|
|
|
this.method = "next";
|
|
this.arg = undefined;
|
|
|
|
this.tryEntries.forEach(resetTryEntry);
|
|
|
|
if (!skipTempReset) {
|
|
for (var name in this) {
|
|
// Not sure about the optimal order of these conditions:
|
|
if (name.charAt(0) === "t" &&
|
|
hasOwn.call(this, name) &&
|
|
!isNaN(+name.slice(1))) {
|
|
this[name] = undefined;
|
|
}
|
|
}
|
|
}
|
|
},
|
|
|
|
stop: function() {
|
|
this.done = true;
|
|
|
|
var rootEntry = this.tryEntries[0];
|
|
var rootRecord = rootEntry.completion;
|
|
if (rootRecord.type === "throw") {
|
|
throw rootRecord.arg;
|
|
}
|
|
|
|
return this.rval;
|
|
},
|
|
|
|
dispatchException: function(exception) {
|
|
if (this.done) {
|
|
throw exception;
|
|
}
|
|
|
|
var context = this;
|
|
function handle(loc, caught) {
|
|
record.type = "throw";
|
|
record.arg = exception;
|
|
context.next = loc;
|
|
|
|
if (caught) {
|
|
// If the dispatched exception was caught by a catch block,
|
|
// then let that catch block handle the exception normally.
|
|
context.method = "next";
|
|
context.arg = undefined;
|
|
}
|
|
|
|
return !! caught;
|
|
}
|
|
|
|
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
var entry = this.tryEntries[i];
|
|
var record = entry.completion;
|
|
|
|
if (entry.tryLoc === "root") {
|
|
// Exception thrown outside of any try block that could handle
|
|
// it, so set the completion value of the entire function to
|
|
// throw the exception.
|
|
return handle("end");
|
|
}
|
|
|
|
if (entry.tryLoc <= this.prev) {
|
|
var hasCatch = hasOwn.call(entry, "catchLoc");
|
|
var hasFinally = hasOwn.call(entry, "finallyLoc");
|
|
|
|
if (hasCatch && hasFinally) {
|
|
if (this.prev < entry.catchLoc) {
|
|
return handle(entry.catchLoc, true);
|
|
} else if (this.prev < entry.finallyLoc) {
|
|
return handle(entry.finallyLoc);
|
|
}
|
|
|
|
} else if (hasCatch) {
|
|
if (this.prev < entry.catchLoc) {
|
|
return handle(entry.catchLoc, true);
|
|
}
|
|
|
|
} else if (hasFinally) {
|
|
if (this.prev < entry.finallyLoc) {
|
|
return handle(entry.finallyLoc);
|
|
}
|
|
|
|
} else {
|
|
throw new Error("try statement without catch or finally");
|
|
}
|
|
}
|
|
}
|
|
},
|
|
|
|
abrupt: function(type, arg) {
|
|
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
var entry = this.tryEntries[i];
|
|
if (entry.tryLoc <= this.prev &&
|
|
hasOwn.call(entry, "finallyLoc") &&
|
|
this.prev < entry.finallyLoc) {
|
|
var finallyEntry = entry;
|
|
break;
|
|
}
|
|
}
|
|
|
|
if (finallyEntry &&
|
|
(type === "break" ||
|
|
type === "continue") &&
|
|
finallyEntry.tryLoc <= arg &&
|
|
arg <= finallyEntry.finallyLoc) {
|
|
// Ignore the finally entry if control is not jumping to a
|
|
// location outside the try/catch block.
|
|
finallyEntry = null;
|
|
}
|
|
|
|
var record = finallyEntry ? finallyEntry.completion : {};
|
|
record.type = type;
|
|
record.arg = arg;
|
|
|
|
if (finallyEntry) {
|
|
this.method = "next";
|
|
this.next = finallyEntry.finallyLoc;
|
|
return ContinueSentinel;
|
|
}
|
|
|
|
return this.complete(record);
|
|
},
|
|
|
|
complete: function(record, afterLoc) {
|
|
if (record.type === "throw") {
|
|
throw record.arg;
|
|
}
|
|
|
|
if (record.type === "break" ||
|
|
record.type === "continue") {
|
|
this.next = record.arg;
|
|
} else if (record.type === "return") {
|
|
this.rval = this.arg = record.arg;
|
|
this.method = "return";
|
|
this.next = "end";
|
|
} else if (record.type === "normal" && afterLoc) {
|
|
this.next = afterLoc;
|
|
}
|
|
|
|
return ContinueSentinel;
|
|
},
|
|
|
|
finish: function(finallyLoc) {
|
|
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
var entry = this.tryEntries[i];
|
|
if (entry.finallyLoc === finallyLoc) {
|
|
this.complete(entry.completion, entry.afterLoc);
|
|
resetTryEntry(entry);
|
|
return ContinueSentinel;
|
|
}
|
|
}
|
|
},
|
|
|
|
"catch": function(tryLoc) {
|
|
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
|
var entry = this.tryEntries[i];
|
|
if (entry.tryLoc === tryLoc) {
|
|
var record = entry.completion;
|
|
if (record.type === "throw") {
|
|
var thrown = record.arg;
|
|
resetTryEntry(entry);
|
|
}
|
|
return thrown;
|
|
}
|
|
}
|
|
|
|
// The context.catch method must only be called with a location
|
|
// argument that corresponds to a known catch block.
|
|
throw new Error("illegal catch attempt");
|
|
},
|
|
|
|
delegateYield: function(iterable, resultName, nextLoc) {
|
|
this.delegate = {
|
|
iterator: values(iterable),
|
|
resultName: resultName,
|
|
nextLoc: nextLoc
|
|
};
|
|
|
|
if (this.method === "next") {
|
|
// Deliberately forget the last sent value so that we don't
|
|
// accidentally pass it on to the delegate.
|
|
this.arg = undefined;
|
|
}
|
|
|
|
return ContinueSentinel;
|
|
}
|
|
};
|
|
})(
|
|
// Among the various tricks for obtaining a reference to the global
|
|
// object, this seems to be the most reliable technique that does not
|
|
// use indirect eval (which violates Content Security Policy).
|
|
typeof global === "object" ? global :
|
|
typeof window === "object" ? window :
|
|
typeof self === "object" ? self : this
|
|
);
|
|
|
|
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(138)))
|
|
|
|
/***/ }),
|
|
/* 496 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
__webpack_require__(497);
|
|
module.exports = __webpack_require__(37).RegExp.escape;
|
|
|
|
|
|
/***/ }),
|
|
/* 497 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
// https://github.com/benjamingr/RexExp.escape
|
|
var $export = __webpack_require__(3);
|
|
var $re = __webpack_require__(498)(/[\\^$*+?.()|[\]{}]/g, '\\$&');
|
|
|
|
$export($export.S, 'RegExp', { escape: function escape(it) { return $re(it); } });
|
|
|
|
|
|
/***/ }),
|
|
/* 498 */
|
|
/***/ (function(module, exports) {
|
|
|
|
module.exports = function (regExp, replace) {
|
|
var replacer = replace === Object(replace) ? function (part) {
|
|
return replace[part];
|
|
} : replace;
|
|
return function (it) {
|
|
return String(it).replace(regExp, replacer);
|
|
};
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 499 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
/** @license React v16.10.2
|
|
* react.production.min.js
|
|
*
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
var h=__webpack_require__(230),n="function"===typeof Symbol&&Symbol.for,p=n?Symbol.for("react.element"):60103,q=n?Symbol.for("react.portal"):60106,r=n?Symbol.for("react.fragment"):60107,t=n?Symbol.for("react.strict_mode"):60108,u=n?Symbol.for("react.profiler"):60114,v=n?Symbol.for("react.provider"):60109,w=n?Symbol.for("react.context"):60110,x=n?Symbol.for("react.forward_ref"):60112,y=n?Symbol.for("react.suspense"):60113,aa=n?Symbol.for("react.suspense_list"):60120,ba=n?Symbol.for("react.memo"):
|
|
60115,ca=n?Symbol.for("react.lazy"):60116;n&&Symbol.for("react.fundamental");n&&Symbol.for("react.responder");n&&Symbol.for("react.scope");var z="function"===typeof Symbol&&Symbol.iterator;
|
|
function A(a){for(var b=a.message,c="https://reactjs.org/docs/error-decoder.html?invariant="+b,d=1;d<arguments.length;d++)c+="&args[]="+encodeURIComponent(arguments[d]);a.message="Minified React error #"+b+"; visit "+c+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ";return a}var B={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C={};
|
|
function D(a,b,c){this.props=a;this.context=b;this.refs=C;this.updater=c||B}D.prototype.isReactComponent={};D.prototype.setState=function(a,b){if("object"!==typeof a&&"function"!==typeof a&&null!=a)throw A(Error(85));this.updater.enqueueSetState(this,a,b,"setState")};D.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};function E(){}E.prototype=D.prototype;function F(a,b,c){this.props=a;this.context=b;this.refs=C;this.updater=c||B}var G=F.prototype=new E;
|
|
G.constructor=F;h(G,D.prototype);G.isPureReactComponent=!0;var H={current:null},I={suspense:null},J={current:null},K=Object.prototype.hasOwnProperty,L={key:!0,ref:!0,__self:!0,__source:!0};
|
|
function M(a,b,c){var d,e={},g=null,l=null;if(null!=b)for(d in void 0!==b.ref&&(l=b.ref),void 0!==b.key&&(g=""+b.key),b)K.call(b,d)&&!L.hasOwnProperty(d)&&(e[d]=b[d]);var f=arguments.length-2;if(1===f)e.children=c;else if(1<f){for(var k=Array(f),m=0;m<f;m++)k[m]=arguments[m+2];e.children=k}if(a&&a.defaultProps)for(d in f=a.defaultProps,f)void 0===e[d]&&(e[d]=f[d]);return{$$typeof:p,type:a,key:g,ref:l,props:e,_owner:J.current}}
|
|
function da(a,b){return{$$typeof:p,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function N(a){return"object"===typeof a&&null!==a&&a.$$typeof===p}function escape(a){var b={"=":"=0",":":"=2"};return"$"+(""+a).replace(/[=:]/g,function(a){return b[a]})}var O=/\/+/g,P=[];function Q(a,b,c,d){if(P.length){var e=P.pop();e.result=a;e.keyPrefix=b;e.func=c;e.context=d;e.count=0;return e}return{result:a,keyPrefix:b,func:c,context:d,count:0}}
|
|
function R(a){a.result=null;a.keyPrefix=null;a.func=null;a.context=null;a.count=0;10>P.length&&P.push(a)}
|
|
function S(a,b,c,d){var e=typeof a;if("undefined"===e||"boolean"===e)a=null;var g=!1;if(null===a)g=!0;else switch(e){case "string":case "number":g=!0;break;case "object":switch(a.$$typeof){case p:case q:g=!0}}if(g)return c(d,a,""===b?"."+T(a,0):b),1;g=0;b=""===b?".":b+":";if(Array.isArray(a))for(var l=0;l<a.length;l++){e=a[l];var f=b+T(e,l);g+=S(e,f,c,d)}else if(null===a||"object"!==typeof a?f=null:(f=z&&a[z]||a["@@iterator"],f="function"===typeof f?f:null),"function"===typeof f)for(a=f.call(a),l=
|
|
0;!(e=a.next()).done;)e=e.value,f=b+T(e,l++),g+=S(e,f,c,d);else if("object"===e)throw c=""+a,A(Error(31),"[object Object]"===c?"object with keys {"+Object.keys(a).join(", ")+"}":c,"");return g}function U(a,b,c){return null==a?0:S(a,"",b,c)}function T(a,b){return"object"===typeof a&&null!==a&&null!=a.key?escape(a.key):b.toString(36)}function ea(a,b){a.func.call(a.context,b,a.count++)}
|
|
function fa(a,b,c){var d=a.result,e=a.keyPrefix;a=a.func.call(a.context,b,a.count++);Array.isArray(a)?V(a,d,c,function(a){return a}):null!=a&&(N(a)&&(a=da(a,e+(!a.key||b&&b.key===a.key?"":(""+a.key).replace(O,"$&/")+"/")+c)),d.push(a))}function V(a,b,c,d,e){var g="";null!=c&&(g=(""+c).replace(O,"$&/")+"/");b=Q(b,g,d,e);U(a,fa,b);R(b)}function W(){var a=H.current;if(null===a)throw A(Error(321));return a}
|
|
var X={Children:{map:function(a,b,c){if(null==a)return a;var d=[];V(a,d,null,b,c);return d},forEach:function(a,b,c){if(null==a)return a;b=Q(null,null,b,c);U(a,ea,b);R(b)},count:function(a){return U(a,function(){return null},null)},toArray:function(a){var b=[];V(a,b,null,function(a){return a});return b},only:function(a){if(!N(a))throw A(Error(143));return a}},createRef:function(){return{current:null}},Component:D,PureComponent:F,createContext:function(a,b){void 0===b&&(b=null);a={$$typeof:w,_calculateChangedBits:b,
|
|
_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null};a.Provider={$$typeof:v,_context:a};return a.Consumer=a},forwardRef:function(a){return{$$typeof:x,render:a}},lazy:function(a){return{$$typeof:ca,_ctor:a,_status:-1,_result:null}},memo:function(a,b){return{$$typeof:ba,type:a,compare:void 0===b?null:b}},useCallback:function(a,b){return W().useCallback(a,b)},useContext:function(a,b){return W().useContext(a,b)},useEffect:function(a,b){return W().useEffect(a,b)},useImperativeHandle:function(a,
|
|
b,c){return W().useImperativeHandle(a,b,c)},useDebugValue:function(){},useLayoutEffect:function(a,b){return W().useLayoutEffect(a,b)},useMemo:function(a,b){return W().useMemo(a,b)},useReducer:function(a,b,c){return W().useReducer(a,b,c)},useRef:function(a){return W().useRef(a)},useState:function(a){return W().useState(a)},Fragment:r,Profiler:u,StrictMode:t,Suspense:y,unstable_SuspenseList:aa,createElement:M,cloneElement:function(a,b,c){if(null===a||void 0===a)throw A(Error(267),a);var d=h({},a.props),
|
|
e=a.key,g=a.ref,l=a._owner;if(null!=b){void 0!==b.ref&&(g=b.ref,l=J.current);void 0!==b.key&&(e=""+b.key);if(a.type&&a.type.defaultProps)var f=a.type.defaultProps;for(k in b)K.call(b,k)&&!L.hasOwnProperty(k)&&(d[k]=void 0===b[k]&&void 0!==f?f[k]:b[k])}var k=arguments.length-2;if(1===k)d.children=c;else if(1<k){f=Array(k);for(var m=0;m<k;m++)f[m]=arguments[m+2];d.children=f}return{$$typeof:p,type:a.type,key:e,ref:g,props:d,_owner:l}},createFactory:function(a){var b=M.bind(null,a);b.type=a;return b},
|
|
isValidElement:N,version:"16.10.2",unstable_withSuspenseConfig:function(a,b){var c=I.suspense;I.suspense=void 0===b?null:b;try{a()}finally{I.suspense=c}},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentDispatcher:H,ReactCurrentBatchConfig:I,ReactCurrentOwner:J,IsSomeRendererActing:{current:!1},assign:h}},Y={default:X},Z=Y&&X||Y;module.exports=Z.default||Z;
|
|
|
|
|
|
/***/ }),
|
|
/* 500 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
/** @license React v16.10.2
|
|
* react-dom.production.min.js
|
|
*
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
/*
|
|
Modernizr 3.0.0pre (Custom Build) | MIT
|
|
*/
|
|
var aa=__webpack_require__(0),n=__webpack_require__(230),r=__webpack_require__(501);function t(a){for(var b=a.message,c="https://reactjs.org/docs/error-decoder.html?invariant="+b,d=1;d<arguments.length;d++)c+="&args[]="+encodeURIComponent(arguments[d]);a.message="Minified React error #"+b+"; visit "+c+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ";return a}if(!aa)throw t(Error(227));var ba=null,ca={};
|
|
function da(){if(ba)for(var a in ca){var b=ca[a],c=ba.indexOf(a);if(!(-1<c))throw t(Error(96),a);if(!ea[c]){if(!b.extractEvents)throw t(Error(97),a);ea[c]=b;c=b.eventTypes;for(var d in c){var e=void 0;var f=c[d],g=b,h=d;if(fa.hasOwnProperty(h))throw t(Error(99),h);fa[h]=f;var k=f.phasedRegistrationNames;if(k){for(e in k)k.hasOwnProperty(e)&&ha(k[e],g,h);e=!0}else f.registrationName?(ha(f.registrationName,g,h),e=!0):e=!1;if(!e)throw t(Error(98),d,a);}}}}
|
|
function ha(a,b,c){if(ia[a])throw t(Error(100),a);ia[a]=b;ja[a]=b.eventTypes[c].dependencies}var ea=[],fa={},ia={},ja={};function ka(a,b,c,d,e,f,g,h,k){var l=Array.prototype.slice.call(arguments,3);try{b.apply(c,l)}catch(m){this.onError(m)}}var la=!1,ma=null,na=!1,oa=null,pa={onError:function(a){la=!0;ma=a}};function qa(a,b,c,d,e,f,g,h,k){la=!1;ma=null;ka.apply(pa,arguments)}
|
|
function ra(a,b,c,d,e,f,g,h,k){qa.apply(this,arguments);if(la){if(la){var l=ma;la=!1;ma=null}else throw t(Error(198));na||(na=!0,oa=l)}}var sa=null,ta=null,ua=null;function va(a,b,c){var d=a.type||"unknown-event";a.currentTarget=ua(c);ra(d,b,void 0,a);a.currentTarget=null}function wa(a,b){if(null==b)throw t(Error(30));if(null==a)return b;if(Array.isArray(a)){if(Array.isArray(b))return a.push.apply(a,b),a;a.push(b);return a}return Array.isArray(b)?[a].concat(b):[a,b]}
|
|
function xa(a,b,c){Array.isArray(a)?a.forEach(b,c):a&&b.call(c,a)}var ya=null;function za(a){if(a){var b=a._dispatchListeners,c=a._dispatchInstances;if(Array.isArray(b))for(var d=0;d<b.length&&!a.isPropagationStopped();d++)va(a,b[d],c[d]);else b&&va(a,b,c);a._dispatchListeners=null;a._dispatchInstances=null;a.isPersistent()||a.constructor.release(a)}}function Aa(a){null!==a&&(ya=wa(ya,a));a=ya;ya=null;if(a){xa(a,za);if(ya)throw t(Error(95));if(na)throw a=oa,na=!1,oa=null,a;}}
|
|
var Ba={injectEventPluginOrder:function(a){if(ba)throw t(Error(101));ba=Array.prototype.slice.call(a);da()},injectEventPluginsByName:function(a){var b=!1,c;for(c in a)if(a.hasOwnProperty(c)){var d=a[c];if(!ca.hasOwnProperty(c)||ca[c]!==d){if(ca[c])throw t(Error(102),c);ca[c]=d;b=!0}}b&&da()}};
|
|
function Ca(a,b){var c=a.stateNode;if(!c)return null;var d=sa(c);if(!d)return null;c=d[b];a:switch(b){case "onClick":case "onClickCapture":case "onDoubleClick":case "onDoubleClickCapture":case "onMouseDown":case "onMouseDownCapture":case "onMouseMove":case "onMouseMoveCapture":case "onMouseUp":case "onMouseUpCapture":(d=!d.disabled)||(a=a.type,d=!("button"===a||"input"===a||"select"===a||"textarea"===a));a=!d;break a;default:a=!1}if(a)return null;if(c&&"function"!==typeof c)throw t(Error(231),b,typeof c);
|
|
return c}var Da=aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;Da.hasOwnProperty("ReactCurrentDispatcher")||(Da.ReactCurrentDispatcher={current:null});Da.hasOwnProperty("ReactCurrentBatchConfig")||(Da.ReactCurrentBatchConfig={suspense:null});
|
|
var Ea=/^(.*)[\\\/]/,x="function"===typeof Symbol&&Symbol.for,Fa=x?Symbol.for("react.element"):60103,Ga=x?Symbol.for("react.portal"):60106,Ha=x?Symbol.for("react.fragment"):60107,Ia=x?Symbol.for("react.strict_mode"):60108,Ja=x?Symbol.for("react.profiler"):60114,Ka=x?Symbol.for("react.provider"):60109,La=x?Symbol.for("react.context"):60110,Ma=x?Symbol.for("react.concurrent_mode"):60111,Na=x?Symbol.for("react.forward_ref"):60112,Oa=x?Symbol.for("react.suspense"):60113,Pa=x?Symbol.for("react.suspense_list"):
|
|
60120,Qa=x?Symbol.for("react.memo"):60115,Ra=x?Symbol.for("react.lazy"):60116;x&&Symbol.for("react.fundamental");x&&Symbol.for("react.responder");x&&Symbol.for("react.scope");var Sa="function"===typeof Symbol&&Symbol.iterator;function Ta(a){if(null===a||"object"!==typeof a)return null;a=Sa&&a[Sa]||a["@@iterator"];return"function"===typeof a?a:null}
|
|
function Ua(a){if(-1===a._status){a._status=0;var b=a._ctor;b=b();a._result=b;b.then(function(b){0===a._status&&(b=b.default,a._status=1,a._result=b)},function(b){0===a._status&&(a._status=2,a._result=b)})}}
|
|
function Va(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case Ha:return"Fragment";case Ga:return"Portal";case Ja:return"Profiler";case Ia:return"StrictMode";case Oa:return"Suspense";case Pa:return"SuspenseList"}if("object"===typeof a)switch(a.$$typeof){case La:return"Context.Consumer";case Ka:return"Context.Provider";case Na:var b=a.render;b=b.displayName||b.name||"";return a.displayName||(""!==b?"ForwardRef("+b+")":
|
|
"ForwardRef");case Qa:return Va(a.type);case Ra:if(a=1===a._status?a._result:null)return Va(a)}return null}function Wa(a){var b="";do{a:switch(a.tag){case 3:case 4:case 6:case 7:case 10:case 9:var c="";break a;default:var d=a._debugOwner,e=a._debugSource,f=Va(a.type);c=null;d&&(c=Va(d.type));d=f;f="";e?f=" (at "+e.fileName.replace(Ea,"")+":"+e.lineNumber+")":c&&(f=" (created by "+c+")");c="\n in "+(d||"Unknown")+f}b+=c;a=a.return}while(a);return b}
|
|
var Xa=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),Ya=null,Za=null,$a=null;function ab(a){if(a=ta(a)){if("function"!==typeof Ya)throw t(Error(280));var b=sa(a.stateNode);Ya(a.stateNode,a.type,b)}}function bb(a){Za?$a?$a.push(a):$a=[a]:Za=a}function cb(){if(Za){var a=Za,b=$a;$a=Za=null;ab(a);if(b)for(a=0;a<b.length;a++)ab(b[a])}}function db(a,b){return a(b)}function eb(a,b,c,d){return a(b,c,d)}function fb(){}
|
|
var gb=db,hb=!1,ib=!1;function jb(){if(null!==Za||null!==$a)fb(),cb()}new Map;new Map;new Map;var kb=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,lb=Object.prototype.hasOwnProperty,mb={},nb={};
|
|
function ob(a){if(lb.call(nb,a))return!0;if(lb.call(mb,a))return!1;if(kb.test(a))return nb[a]=!0;mb[a]=!0;return!1}function pb(a,b,c,d){if(null!==c&&0===c.type)return!1;switch(typeof b){case "function":case "symbol":return!0;case "boolean":if(d)return!1;if(null!==c)return!c.acceptsBooleans;a=a.toLowerCase().slice(0,5);return"data-"!==a&&"aria-"!==a;default:return!1}}
|
|
function qb(a,b,c,d){if(null===b||"undefined"===typeof b||pb(a,b,c,d))return!0;if(d)return!1;if(null!==c)switch(c.type){case 3:return!b;case 4:return!1===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return!1}function B(a,b,c,d,e,f){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f}var C={};
|
|
"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){C[a]=new B(a,0,!1,a,null,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];C[b]=new B(b,1,!1,a[1],null,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){C[a]=new B(a,2,!1,a.toLowerCase(),null,!1)});
|
|
["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){C[a]=new B(a,2,!1,a,null,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){C[a]=new B(a,3,!1,a.toLowerCase(),null,!1)});
|
|
["checked","multiple","muted","selected"].forEach(function(a){C[a]=new B(a,3,!0,a,null,!1)});["capture","download"].forEach(function(a){C[a]=new B(a,4,!1,a,null,!1)});["cols","rows","size","span"].forEach(function(a){C[a]=new B(a,6,!1,a,null,!1)});["rowSpan","start"].forEach(function(a){C[a]=new B(a,5,!1,a.toLowerCase(),null,!1)});var rb=/[\-:]([a-z])/g;function sb(a){return a[1].toUpperCase()}
|
|
"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=a.replace(rb,
|
|
sb);C[b]=new B(b,1,!1,a,null,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(rb,sb);C[b]=new B(b,1,!1,a,"http://www.w3.org/1999/xlink",!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(rb,sb);C[b]=new B(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1)});["tabIndex","crossOrigin"].forEach(function(a){C[a]=new B(a,1,!1,a.toLowerCase(),null,!1)});
|
|
C.xlinkHref=new B("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0);["src","href","action","formAction"].forEach(function(a){C[a]=new B(a,1,!1,a.toLowerCase(),null,!0)});function tb(a){switch(typeof a){case "boolean":case "number":case "object":case "string":case "undefined":return a;default:return""}}
|
|
function ub(a,b,c,d){var e=C.hasOwnProperty(b)?C[b]:null;var f=null!==e?0===e.type:d?!1:!(2<b.length)||"o"!==b[0]&&"O"!==b[0]||"n"!==b[1]&&"N"!==b[1]?!1:!0;f||(qb(b,c,e,d)&&(c=null),d||null===e?ob(b)&&(null===c?a.removeAttribute(b):a.setAttribute(b,""+c)):e.mustUseProperty?a[e.propertyName]=null===c?3===e.type?!1:"":c:(b=e.attributeName,d=e.attributeNamespace,null===c?a.removeAttribute(b):(e=e.type,c=3===e||4===e&&!0===c?"":""+c,d?a.setAttributeNS(d,b,c):a.setAttribute(b,c))))}
|
|
function vb(a){var b=a.type;return(a=a.nodeName)&&"input"===a.toLowerCase()&&("checkbox"===b||"radio"===b)}
|
|
function xb(a){var b=vb(a)?"checked":"value",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=""+a[b];if(!a.hasOwnProperty(b)&&"undefined"!==typeof c&&"function"===typeof c.get&&"function"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=""+a;f.call(this,a)}});Object.defineProperty(a,b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=""+a},stopTracking:function(){a._valueTracker=
|
|
null;delete a[b]}}}}function yb(a){a._valueTracker||(a._valueTracker=xb(a))}function zb(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d="";a&&(d=vb(a)?a.checked?"true":"false":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function Ab(a,b){var c=b.checked;return n({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}
|
|
function Bb(a,b){var c=null==b.defaultValue?"":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=tb(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:"checkbox"===b.type||"radio"===b.type?null!=b.checked:null!=b.value}}function Cb(a,b){b=b.checked;null!=b&&ub(a,"checked",b,!1)}
|
|
function Db(a,b){Cb(a,b);var c=tb(b.value),d=b.type;if(null!=c)if("number"===d){if(0===c&&""===a.value||a.value!=c)a.value=""+c}else a.value!==""+c&&(a.value=""+c);else if("submit"===d||"reset"===d){a.removeAttribute("value");return}b.hasOwnProperty("value")?Eb(a,b.type,c):b.hasOwnProperty("defaultValue")&&Eb(a,b.type,tb(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}
|
|
function Gb(a,b,c){if(b.hasOwnProperty("value")||b.hasOwnProperty("defaultValue")){var d=b.type;if(!("submit"!==d&&"reset"!==d||void 0!==b.value&&null!==b.value))return;b=""+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b}c=a.name;""!==c&&(a.name="");a.defaultChecked=!a.defaultChecked;a.defaultChecked=!!a._wrapperState.initialChecked;""!==c&&(a.name=c)}
|
|
function Eb(a,b,c){if("number"!==b||a.ownerDocument.activeElement!==a)null==c?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+c&&(a.defaultValue=""+c)}function Hb(a){var b="";aa.Children.forEach(a,function(a){null!=a&&(b+=a)});return b}function Ib(a,b){a=n({children:void 0},b);if(b=Hb(b.children))a.children=b;return a}
|
|
function Jb(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e<c.length;e++)b["$"+c[e]]=!0;for(c=0;c<a.length;c++)e=b.hasOwnProperty("$"+a[c].value),a[c].selected!==e&&(a[c].selected=e),e&&d&&(a[c].defaultSelected=!0)}else{c=""+tb(c);b=null;for(e=0;e<a.length;e++){if(a[e].value===c){a[e].selected=!0;d&&(a[e].defaultSelected=!0);return}null!==b||a[e].disabled||(b=a[e])}null!==b&&(b.selected=!0)}}
|
|
function Kb(a,b){if(null!=b.dangerouslySetInnerHTML)throw t(Error(91));return n({},b,{value:void 0,defaultValue:void 0,children:""+a._wrapperState.initialValue})}function Lb(a,b){var c=b.value;if(null==c){c=b.defaultValue;b=b.children;if(null!=b){if(null!=c)throw t(Error(92));if(Array.isArray(b)){if(!(1>=b.length))throw t(Error(93));b=b[0]}c=b}null==c&&(c="")}a._wrapperState={initialValue:tb(c)}}
|
|
function Mb(a,b){var c=tb(b.value),d=tb(b.defaultValue);null!=c&&(c=""+c,c!==a.value&&(a.value=c),null==b.defaultValue&&a.defaultValue!==c&&(a.defaultValue=c));null!=d&&(a.defaultValue=""+d)}function Nb(a){var b=a.textContent;b===a._wrapperState.initialValue&&""!==b&&null!==b&&(a.value=b)}var Ob={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};
|
|
function Pb(a){switch(a){case "svg":return"http://www.w3.org/2000/svg";case "math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Qb(a,b){return null==a||"http://www.w3.org/1999/xhtml"===a?Pb(b):"http://www.w3.org/2000/svg"===a&&"foreignObject"===b?"http://www.w3.org/1999/xhtml":a}
|
|
var Rb,Sb=function(a){return"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if(a.namespaceURI!==Ob.svg||"innerHTML"in a)a.innerHTML=b;else{Rb=Rb||document.createElement("div");Rb.innerHTML="<svg>"+b.valueOf().toString()+"</svg>";for(b=Rb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});
|
|
function Tb(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}function Ub(a,b){var c={};c[a.toLowerCase()]=b.toLowerCase();c["Webkit"+a]="webkit"+b;c["Moz"+a]="moz"+b;return c}var Vb={animationend:Ub("Animation","AnimationEnd"),animationiteration:Ub("Animation","AnimationIteration"),animationstart:Ub("Animation","AnimationStart"),transitionend:Ub("Transition","TransitionEnd")},Wb={},Xb={};
|
|
Xa&&(Xb=document.createElement("div").style,"AnimationEvent"in window||(delete Vb.animationend.animation,delete Vb.animationiteration.animation,delete Vb.animationstart.animation),"TransitionEvent"in window||delete Vb.transitionend.transition);function Yb(a){if(Wb[a])return Wb[a];if(!Vb[a])return a;var b=Vb[a],c;for(c in b)if(b.hasOwnProperty(c)&&c in Xb)return Wb[a]=b[c];return a}
|
|
var Zb=Yb("animationend"),$b=Yb("animationiteration"),ac=Yb("animationstart"),bc=Yb("transitionend"),dc="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),ec=!1,fc=[],gc=null,hc=null,ic=null,jc=new Map,kc=new Map,lc="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit".split(" "),
|
|
mc="focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture".split(" ");function nc(a){var b=oc(a);lc.forEach(function(c){pc(c,a,b)});mc.forEach(function(c){pc(c,a,b)})}function qc(a,b,c,d){return{blockedOn:a,topLevelType:b,eventSystemFlags:c|32,nativeEvent:d}}
|
|
function rc(a,b){switch(a){case "focus":case "blur":gc=null;break;case "dragenter":case "dragleave":hc=null;break;case "mouseover":case "mouseout":ic=null;break;case "pointerover":case "pointerout":jc.delete(b.pointerId);break;case "gotpointercapture":case "lostpointercapture":kc.delete(b.pointerId)}}function sc(a,b,c,d,e){if(null===a||a.nativeEvent!==e)return qc(b,c,d,e);a.eventSystemFlags|=d;return a}
|
|
function tc(a,b,c,d){switch(b){case "focus":return gc=sc(gc,a,b,c,d),!0;case "dragenter":return hc=sc(hc,a,b,c,d),!0;case "mouseover":return ic=sc(ic,a,b,c,d),!0;case "pointerover":var e=d.pointerId;jc.set(e,sc(jc.get(e)||null,a,b,c,d));return!0;case "gotpointercapture":return e=d.pointerId,kc.set(e,sc(kc.get(e)||null,a,b,c,d)),!0}return!1}function uc(a){if(null!==a.blockedOn)return!1;var b=vc(a.topLevelType,a.eventSystemFlags,a.nativeEvent);return null!==b?(a.blockedOn=b,!1):!0}
|
|
function wc(a,b,c){uc(a)&&c.delete(b)}function xc(){for(ec=!1;0<fc.length;){var a=fc[0];if(null!==a.blockedOn)break;var b=vc(a.topLevelType,a.eventSystemFlags,a.nativeEvent);null!==b?a.blockedOn=b:fc.shift()}null!==gc&&uc(gc)&&(gc=null);null!==hc&&uc(hc)&&(hc=null);null!==ic&&uc(ic)&&(ic=null);jc.forEach(wc);kc.forEach(wc)}function yc(a,b){a.blockedOn===b&&(a.blockedOn=null,ec||(ec=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,xc)))}
|
|
function zc(a){function b(b){return yc(b,a)}if(0<fc.length){yc(fc[0],a);for(var c=1;c<fc.length;c++){var d=fc[c];d.blockedOn===a&&(d.blockedOn=null)}}null!==gc&&yc(gc,a);null!==hc&&yc(hc,a);null!==ic&&yc(ic,a);jc.forEach(b);kc.forEach(b)}var D=0,E=2,Ac=1024;function Bc(a){var b=a,c=a;if(a.alternate)for(;b.return;)b=b.return;else{a=b;do b=a,(b.effectTag&(E|Ac))!==D&&(c=b.return),a=b.return;while(a)}return 3===b.tag?c:null}function Cc(a){if(Bc(a)!==a)throw t(Error(188));}
|
|
function Dc(a){var b=a.alternate;if(!b){b=Bc(a);if(null===b)throw t(Error(188));return b!==a?null:a}for(var c=a,d=b;;){var e=c.return;if(null===e)break;var f=e.alternate;if(null===f){d=e.return;if(null!==d){c=d;continue}break}if(e.child===f.child){for(f=e.child;f;){if(f===c)return Cc(e),a;if(f===d)return Cc(e),b;f=f.sibling}throw t(Error(188));}if(c.return!==d.return)c=e,d=f;else{for(var g=!1,h=e.child;h;){if(h===c){g=!0;c=e;d=f;break}if(h===d){g=!0;d=e;c=f;break}h=h.sibling}if(!g){for(h=f.child;h;){if(h===
|
|
c){g=!0;c=f;d=e;break}if(h===d){g=!0;d=f;c=e;break}h=h.sibling}if(!g)throw t(Error(189));}}if(c.alternate!==d)throw t(Error(190));}if(3!==c.tag)throw t(Error(188));return c.stateNode.current===c?a:b}function Ec(a){a=Dc(a);if(!a)return null;for(var b=a;;){if(5===b.tag||6===b.tag)return b;if(b.child)b.child.return=b,b=b.child;else{if(b===a)break;for(;!b.sibling;){if(!b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}}return null}
|
|
function Fc(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}function Gc(a){do a=a.return;while(a&&5!==a.tag);return a?a:null}function Hc(a,b,c){if(b=Ca(a,c.dispatchConfig.phasedRegistrationNames[b]))c._dispatchListeners=wa(c._dispatchListeners,b),c._dispatchInstances=wa(c._dispatchInstances,a)}
|
|
function Ic(a){if(a&&a.dispatchConfig.phasedRegistrationNames){for(var b=a._targetInst,c=[];b;)c.push(b),b=Gc(b);for(b=c.length;0<b--;)Hc(c[b],"captured",a);for(b=0;b<c.length;b++)Hc(c[b],"bubbled",a)}}function Jc(a,b,c){a&&c&&c.dispatchConfig.registrationName&&(b=Ca(a,c.dispatchConfig.registrationName))&&(c._dispatchListeners=wa(c._dispatchListeners,b),c._dispatchInstances=wa(c._dispatchInstances,a))}function Kc(a){a&&a.dispatchConfig.registrationName&&Jc(a._targetInst,null,a)}
|
|
function Lc(a){xa(a,Ic)}function Mc(){return!0}function Nc(){return!1}function F(a,b,c,d){this.dispatchConfig=a;this._targetInst=b;this.nativeEvent=c;a=this.constructor.Interface;for(var e in a)a.hasOwnProperty(e)&&((b=a[e])?this[e]=b(c):"target"===e?this.target=d:this[e]=c[e]);this.isDefaultPrevented=(null!=c.defaultPrevented?c.defaultPrevented:!1===c.returnValue)?Mc:Nc;this.isPropagationStopped=Nc;return this}
|
|
n(F.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():"unknown"!==typeof a.returnValue&&(a.returnValue=!1),this.isDefaultPrevented=Mc)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():"unknown"!==typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=Mc)},persist:function(){this.isPersistent=Mc},isPersistent:Nc,destructor:function(){var a=this.constructor.Interface,
|
|
b;for(b in a)this[b]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null;this.isPropagationStopped=this.isDefaultPrevented=Nc;this._dispatchInstances=this._dispatchListeners=null}});F.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};
|
|
F.extend=function(a){function b(){}function c(){return d.apply(this,arguments)}var d=this;b.prototype=d.prototype;var e=new b;n(e,c.prototype);c.prototype=e;c.prototype.constructor=c;c.Interface=n({},d.Interface,a);c.extend=d.extend;Oc(c);return c};Oc(F);function Pc(a,b,c,d){if(this.eventPool.length){var e=this.eventPool.pop();this.call(e,a,b,c,d);return e}return new this(a,b,c,d)}
|
|
function Qc(a){if(!(a instanceof this))throw t(Error(279));a.destructor();10>this.eventPool.length&&this.eventPool.push(a)}function Oc(a){a.eventPool=[];a.getPooled=Pc;a.release=Qc}var Rc=F.extend({animationName:null,elapsedTime:null,pseudoElement:null}),Sc=F.extend({clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),Tc=F.extend({view:null,detail:null}),Uc=Tc.extend({relatedTarget:null});
|
|
function Vc(a){var b=a.keyCode;"charCode"in a?(a=a.charCode,0===a&&13===b&&(a=13)):a=b;10===a&&(a=13);return 32<=a||13===a?a:0}
|
|
var Wc={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Xc={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",
|
|
116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Yc={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Zc(a){var b=this.nativeEvent;return b.getModifierState?b.getModifierState(a):(a=Yc[a])?!!b[a]:!1}function $c(){return Zc}
|
|
var ad=Tc.extend({key:function(a){if(a.key){var b=Wc[a.key]||a.key;if("Unidentified"!==b)return b}return"keypress"===a.type?(a=Vc(a),13===a?"Enter":String.fromCharCode(a)):"keydown"===a.type||"keyup"===a.type?Xc[a.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:$c,charCode:function(a){return"keypress"===a.type?Vc(a):0},keyCode:function(a){return"keydown"===a.type||"keyup"===a.type?a.keyCode:0},which:function(a){return"keypress"===
|
|
a.type?Vc(a):"keydown"===a.type||"keyup"===a.type?a.keyCode:0}}),bd=0,cd=0,dd=!1,fd=!1,gd=Tc.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:$c,button:null,buttons:null,relatedTarget:function(a){return a.relatedTarget||(a.fromElement===a.srcElement?a.toElement:a.fromElement)},movementX:function(a){if("movementX"in a)return a.movementX;var b=bd;bd=a.screenX;return dd?"mousemove"===a.type?a.screenX-
|
|
b:0:(dd=!0,0)},movementY:function(a){if("movementY"in a)return a.movementY;var b=cd;cd=a.screenY;return fd?"mousemove"===a.type?a.screenY-b:0:(fd=!0,0)}}),hd=gd.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),id=gd.extend({dataTransfer:null}),jd=Tc.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:$c}),kd=F.extend({propertyName:null,
|
|
elapsedTime:null,pseudoElement:null}),ld=gd.extend({deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:null,deltaMode:null}),md=[["blur","blur",0],["cancel","cancel",0],["click","click",0],["close","close",0],["contextmenu","contextMenu",0],["copy","copy",0],["cut","cut",0],["auxclick","auxClick",0],["dblclick","doubleClick",0],["dragend","dragEnd",
|
|
0],["dragstart","dragStart",0],["drop","drop",0],["focus","focus",0],["input","input",0],["invalid","invalid",0],["keydown","keyDown",0],["keypress","keyPress",0],["keyup","keyUp",0],["mousedown","mouseDown",0],["mouseup","mouseUp",0],["paste","paste",0],["pause","pause",0],["play","play",0],["pointercancel","pointerCancel",0],["pointerdown","pointerDown",0],["pointerup","pointerUp",0],["ratechange","rateChange",0],["reset","reset",0],["seeked","seeked",0],["submit","submit",0],["touchcancel","touchCancel",
|
|
0],["touchend","touchEnd",0],["touchstart","touchStart",0],["volumechange","volumeChange",0],["drag","drag",1],["dragenter","dragEnter",1],["dragexit","dragExit",1],["dragleave","dragLeave",1],["dragover","dragOver",1],["mousemove","mouseMove",1],["mouseout","mouseOut",1],["mouseover","mouseOver",1],["pointermove","pointerMove",1],["pointerout","pointerOut",1],["pointerover","pointerOver",1],["scroll","scroll",1],["toggle","toggle",1],["touchmove","touchMove",1],["wheel","wheel",1],["abort","abort",
|
|
2],[Zb,"animationEnd",2],[$b,"animationIteration",2],[ac,"animationStart",2],["canplay","canPlay",2],["canplaythrough","canPlayThrough",2],["durationchange","durationChange",2],["emptied","emptied",2],["encrypted","encrypted",2],["ended","ended",2],["error","error",2],["gotpointercapture","gotPointerCapture",2],["load","load",2],["loadeddata","loadedData",2],["loadedmetadata","loadedMetadata",2],["loadstart","loadStart",2],["lostpointercapture","lostPointerCapture",2],["playing","playing",2],["progress",
|
|
"progress",2],["seeking","seeking",2],["stalled","stalled",2],["suspend","suspend",2],["timeupdate","timeUpdate",2],[bc,"transitionEnd",2],["waiting","waiting",2]],nd={},od={},pd=0;for(;pd<md.length;pd++){var qd=md[pd],rd=qd[0],sd=qd[1],td=qd[2],ud="on"+(sd[0].toUpperCase()+sd.slice(1)),vd={phasedRegistrationNames:{bubbled:ud,captured:ud+"Capture"},dependencies:[rd],eventPriority:td};nd[sd]=vd;od[rd]=vd}
|
|
var wd={eventTypes:nd,getEventPriority:function(a){a=od[a];return void 0!==a?a.eventPriority:2},extractEvents:function(a,b,c,d){var e=od[a];if(!e)return null;switch(a){case "keypress":if(0===Vc(c))return null;case "keydown":case "keyup":a=ad;break;case "blur":case "focus":a=Uc;break;case "click":if(2===c.button)return null;case "auxclick":case "dblclick":case "mousedown":case "mousemove":case "mouseup":case "mouseout":case "mouseover":case "contextmenu":a=gd;break;case "drag":case "dragend":case "dragenter":case "dragexit":case "dragleave":case "dragover":case "dragstart":case "drop":a=
|
|
id;break;case "touchcancel":case "touchend":case "touchmove":case "touchstart":a=jd;break;case Zb:case $b:case ac:a=Rc;break;case bc:a=kd;break;case "scroll":a=Tc;break;case "wheel":a=ld;break;case "copy":case "cut":case "paste":a=Sc;break;case "gotpointercapture":case "lostpointercapture":case "pointercancel":case "pointerdown":case "pointermove":case "pointerout":case "pointerover":case "pointerup":a=hd;break;default:a=F}b=a.getPooled(e,b,c,d);Lc(b);return b}},xd=wd.getEventPriority,zd=10,Ad=[];
|
|
function Bd(a){var b=a.targetInst,c=b;do{if(!c){a.ancestors.push(c);break}var d=c;if(3===d.tag)d=d.stateNode.containerInfo;else{for(;d.return;)d=d.return;d=3!==d.tag?null:d.stateNode.containerInfo}if(!d)break;b=c.tag;5!==b&&6!==b||a.ancestors.push(c);c=Cd(d)}while(c);for(c=0;c<a.ancestors.length;c++){b=a.ancestors[c];var e=Fc(a.nativeEvent);d=a.topLevelType;for(var f=a.nativeEvent,g=a.eventSystemFlags,h=null,k=0;k<ea.length;k++){var l=ea[k];l&&(l=l.extractEvents(d,b,f,e,g))&&(h=wa(h,l))}Aa(h)}}
|
|
var Dd=!0;function G(a,b){Ed(b,a,!1)}function Ed(a,b,c){switch(xd(b)){case 0:var d=Fd.bind(null,b,1);break;case 1:d=Gd.bind(null,b,1);break;default:d=Hd.bind(null,b,1)}c?a.addEventListener(b,d,!0):a.addEventListener(b,d,!1)}function Fd(a,b,c){hb||fb();var d=Hd,e=hb;hb=!0;try{eb(d,a,b,c)}finally{(hb=e)||jb()}}function Gd(a,b,c){Hd(a,b,c)}
|
|
function Id(a,b,c,d){if(Ad.length){var e=Ad.pop();e.topLevelType=a;e.eventSystemFlags=b;e.nativeEvent=c;e.targetInst=d;a=e}else a={topLevelType:a,eventSystemFlags:b,nativeEvent:c,targetInst:d,ancestors:[]};try{if(b=Bd,c=a,ib)b(c,void 0);else{ib=!0;try{gb(b,c,void 0)}finally{ib=!1,jb()}}}finally{a.topLevelType=null,a.nativeEvent=null,a.targetInst=null,a.ancestors.length=0,Ad.length<zd&&Ad.push(a)}}
|
|
function Hd(a,b,c){if(Dd)if(0<fc.length&&-1<lc.indexOf(a))a=qc(null,a,b,c),fc.push(a);else{var d=vc(a,b,c);null===d?rc(a,c):-1<lc.indexOf(a)?(a=qc(d,a,b,c),fc.push(a)):tc(d,a,b,c)||(rc(a,c),Id(a,b,c,null))}}
|
|
function vc(a,b,c){var d=Fc(c),e=Cd(d);if(null!==e)if(d=Bc(e),null===d)e=null;else{var f=d.tag;if(13===f){a:{if(13===d.tag&&(e=d.memoizedState,null===e&&(d=d.alternate,null!==d&&(e=d.memoizedState)),null!==e)){d=e.dehydrated;break a}d=null}if(null!==d)return d;e=null}else if(3===f){if(d.stateNode.hydrate)return 3===d.tag?d.stateNode.containerInfo:null;e=null}else d!==e&&(e=null)}Id(a,b,c,e);return null}
|
|
function Jd(a){if(!Xa)return!1;a="on"+a;var b=a in document;b||(b=document.createElement("div"),b.setAttribute(a,"return;"),b="function"===typeof b[a]);return b}var Kd=new ("function"===typeof WeakMap?WeakMap:Map);function oc(a){var b=Kd.get(a);void 0===b&&(b=new Set,Kd.set(a,b));return b}
|
|
function pc(a,b,c){if(!c.has(a)){switch(a){case "scroll":Ed(b,"scroll",!0);break;case "focus":case "blur":Ed(b,"focus",!0);Ed(b,"blur",!0);c.add("blur");c.add("focus");break;case "cancel":case "close":Jd(a)&&Ed(b,a,!0);break;case "invalid":case "submit":case "reset":break;default:-1===dc.indexOf(a)&&G(a,b)}c.add(a)}}
|
|
var Ld={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,
|
|
floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Md=["Webkit","ms","Moz","O"];Object.keys(Ld).forEach(function(a){Md.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);Ld[b]=Ld[a]})});function Nd(a,b,c){return null==b||"boolean"===typeof b||""===b?"":c||"number"!==typeof b||0===b||Ld.hasOwnProperty(a)&&Ld[a]?(""+b).trim():b+"px"}
|
|
function Od(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf("--"),e=Nd(c,b[c],d);"float"===c&&(c="cssFloat");d?a.setProperty(c,e):a[c]=e}}var Pd=n({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});
|
|
function Qd(a,b){if(b){if(Pd[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw t(Error(137),a,"");if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw t(Error(60));if(!("object"===typeof b.dangerouslySetInnerHTML&&"__html"in b.dangerouslySetInnerHTML))throw t(Error(61));}if(null!=b.style&&"object"!==typeof b.style)throw t(Error(62),"");}}
|
|
function Rd(a,b){if(-1===a.indexOf("-"))return"string"===typeof b.is;switch(a){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":return!1;default:return!0}}function Sd(a,b){a=9===a.nodeType||11===a.nodeType?a:a.ownerDocument;var c=oc(a);b=ja[b];for(var d=0;d<b.length;d++)pc(b[d],a,c)}function Td(){}
|
|
function Ud(a){a=a||("undefined"!==typeof document?document:void 0);if("undefined"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}}function Vd(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function Wd(a,b){var c=Vd(a);a=0;for(var d;c;){if(3===c.nodeType){d=a+c.textContent.length;if(a<=b&&d>=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Vd(c)}}
|
|
function Xd(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?Xd(a,b.parentNode):"contains"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}function Yd(){for(var a=window,b=Ud();b instanceof a.HTMLIFrameElement;){try{var c="string"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=Ud(a.document)}return b}
|
|
function Zd(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&("input"===b&&("text"===a.type||"search"===a.type||"tel"===a.type||"url"===a.type||"password"===a.type)||"textarea"===b||"true"===a.contentEditable)}var $d="$",ae="/$",be="$?",ce="$!",de=null,ee=null;function fe(a,b){switch(a){case "button":case "input":case "select":case "textarea":return!!b.autoFocus}return!1}
|
|
function ge(a,b){return"textarea"===a||"option"===a||"noscript"===a||"string"===typeof b.children||"number"===typeof b.children||"object"===typeof b.dangerouslySetInnerHTML&&null!==b.dangerouslySetInnerHTML&&null!=b.dangerouslySetInnerHTML.__html}var he="function"===typeof setTimeout?setTimeout:void 0,ie="function"===typeof clearTimeout?clearTimeout:void 0;function je(a){for(;null!=a;a=a.nextSibling){var b=a.nodeType;if(1===b||3===b)break}return a}
|
|
function ke(a){a=a.previousSibling;for(var b=0;a;){if(8===a.nodeType){var c=a.data;if(c===$d||c===ce||c===be){if(0===b)return a;b--}else c===ae&&b++}a=a.previousSibling}return null}var le=Math.random().toString(36).slice(2),me="__reactInternalInstance$"+le,ne="__reactEventHandlers$"+le,oe="__reactContainere$"+le;
|
|
function Cd(a){var b=a[me];if(b)return b;for(var c=a.parentNode;c;){if(b=c[oe]||c[me]){c=b.alternate;if(null!==b.child||null!==c&&null!==c.child)for(a=ke(a);null!==a;){if(c=a[me])return c;a=ke(a)}return b}a=c;c=a.parentNode}return null}function pe(a){a=a[me]||a[oe];return!a||5!==a.tag&&6!==a.tag&&13!==a.tag&&3!==a.tag?null:a}function qe(a){if(5===a.tag||6===a.tag)return a.stateNode;throw t(Error(33));}function re(a){return a[ne]||null}var se=null,te=null,ue=null;
|
|
function ve(){if(ue)return ue;var a,b=te,c=b.length,d,e="value"in se?se.value:se.textContent,f=e.length;for(a=0;a<c&&b[a]===e[a];a++);var g=c-a;for(d=1;d<=g&&b[c-d]===e[f-d];d++);return ue=e.slice(a,1<d?1-d:void 0)}var we=F.extend({data:null}),xe=F.extend({data:null}),ye=[9,13,27,32],ze=Xa&&"CompositionEvent"in window,Ae=null;Xa&&"documentMode"in document&&(Ae=document.documentMode);
|
|
var Be=Xa&&"TextEvent"in window&&!Ae,Ce=Xa&&(!ze||Ae&&8<Ae&&11>=Ae),De=String.fromCharCode(32),Ee={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",
|
|
captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},Fe=!1;
|
|
function Ge(a,b){switch(a){case "keyup":return-1!==ye.indexOf(b.keyCode);case "keydown":return 229!==b.keyCode;case "keypress":case "mousedown":case "blur":return!0;default:return!1}}function He(a){a=a.detail;return"object"===typeof a&&"data"in a?a.data:null}var Ie=!1;function Je(a,b){switch(a){case "compositionend":return He(b);case "keypress":if(32!==b.which)return null;Fe=!0;return De;case "textInput":return a=b.data,a===De&&Fe?null:a;default:return null}}
|
|
function Ke(a,b){if(Ie)return"compositionend"===a||!ze&&Ge(a,b)?(a=ve(),ue=te=se=null,Ie=!1,a):null;switch(a){case "paste":return null;case "keypress":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1<b.char.length)return b.char;if(b.which)return String.fromCharCode(b.which)}return null;case "compositionend":return Ce&&"ko"!==b.locale?null:b.data;default:return null}}
|
|
var Le={eventTypes:Ee,extractEvents:function(a,b,c,d){var e;if(ze)b:{switch(a){case "compositionstart":var f=Ee.compositionStart;break b;case "compositionend":f=Ee.compositionEnd;break b;case "compositionupdate":f=Ee.compositionUpdate;break b}f=void 0}else Ie?Ge(a,c)&&(f=Ee.compositionEnd):"keydown"===a&&229===c.keyCode&&(f=Ee.compositionStart);f?(Ce&&"ko"!==c.locale&&(Ie||f!==Ee.compositionStart?f===Ee.compositionEnd&&Ie&&(e=ve()):(se=d,te="value"in se?se.value:se.textContent,Ie=!0)),f=we.getPooled(f,
|
|
b,c,d),e?f.data=e:(e=He(c),null!==e&&(f.data=e)),Lc(f),e=f):e=null;(a=Be?Je(a,c):Ke(a,c))?(b=xe.getPooled(Ee.beforeInput,b,c,d),b.data=a,Lc(b)):b=null;return null===e?b:null===b?e:[e,b]}},Me={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Ne(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return"input"===b?!!Me[a.type]:"textarea"===b?!0:!1}
|
|
var Oe={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function Pe(a,b,c){a=F.getPooled(Oe.change,a,b,c);a.type="change";bb(c);Lc(a);return a}var Qe=null,Re=null;function Se(a){Aa(a)}function Te(a){var b=qe(a);if(zb(b))return a}function Ue(a,b){if("change"===a)return b}var Ve=!1;Xa&&(Ve=Jd("input")&&(!document.documentMode||9<document.documentMode));
|
|
function We(){Qe&&(Qe.detachEvent("onpropertychange",Xe),Re=Qe=null)}function Xe(a){if("value"===a.propertyName&&Te(Re))if(a=Pe(Re,a,Fc(a)),hb)Aa(a);else{hb=!0;try{db(Se,a)}finally{hb=!1,jb()}}}function Ye(a,b,c){"focus"===a?(We(),Qe=b,Re=c,Qe.attachEvent("onpropertychange",Xe)):"blur"===a&&We()}function Ze(a){if("selectionchange"===a||"keyup"===a||"keydown"===a)return Te(Re)}function $e(a,b){if("click"===a)return Te(b)}function af(a,b){if("input"===a||"change"===a)return Te(b)}
|
|
var bf={eventTypes:Oe,_isInputEventSupported:Ve,extractEvents:function(a,b,c,d){var e=b?qe(b):window,f=e.nodeName&&e.nodeName.toLowerCase();if("select"===f||"input"===f&&"file"===e.type)var g=Ue;else if(Ne(e))if(Ve)g=af;else{g=Ze;var h=Ye}else(f=e.nodeName)&&"input"===f.toLowerCase()&&("checkbox"===e.type||"radio"===e.type)&&(g=$e);if(g&&(g=g(a,b)))return Pe(g,c,d);h&&h(a,e,b);"blur"===a&&(a=e._wrapperState)&&a.controlled&&"number"===e.type&&Eb(e,"number",e.value)}},cf={mouseEnter:{registrationName:"onMouseEnter",
|
|
dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},df={eventTypes:cf,extractEvents:function(a,b,c,d,e){var f="mouseover"===a||"pointerover"===a,g="mouseout"===a||"pointerout"===a;if(f&&0===(e&32)&&(c.relatedTarget||c.fromElement)||!g&&!f)return null;
|
|
e=d.window===d?d:(e=d.ownerDocument)?e.defaultView||e.parentWindow:window;if(g){if(g=b,b=(b=c.relatedTarget||c.toElement)?Cd(b):null,null!==b&&(f=Bc(b),b!==f||5!==b.tag&&6!==b.tag))b=null}else g=null;if(g===b)return null;if("mouseout"===a||"mouseover"===a){var h=gd;var k=cf.mouseLeave;var l=cf.mouseEnter;var m="mouse"}else if("pointerout"===a||"pointerover"===a)h=hd,k=cf.pointerLeave,l=cf.pointerEnter,m="pointer";a=null==g?e:qe(g);e=null==b?e:qe(b);k=h.getPooled(k,g,c,d);k.type=m+"leave";k.target=
|
|
a;k.relatedTarget=e;c=h.getPooled(l,b,c,d);c.type=m+"enter";c.target=e;c.relatedTarget=a;d=g;m=b;if(d&&m)a:{h=d;l=m;a=0;for(g=h;g;g=Gc(g))a++;g=0;for(b=l;b;b=Gc(b))g++;for(;0<a-g;)h=Gc(h),a--;for(;0<g-a;)l=Gc(l),g--;for(;a--;){if(h===l||h===l.alternate)break a;h=Gc(h);l=Gc(l)}h=null}else h=null;l=h;for(h=[];d&&d!==l;){a=d.alternate;if(null!==a&&a===l)break;h.push(d);d=Gc(d)}for(d=[];m&&m!==l;){a=m.alternate;if(null!==a&&a===l)break;d.push(m);m=Gc(m)}for(m=0;m<h.length;m++)Jc(h[m],"bubbled",k);for(m=
|
|
d.length;0<m--;)Jc(d[m],"captured",c);return[k,c]}};function ef(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var ff="function"===typeof Object.is?Object.is:ef,gf=Object.prototype.hasOwnProperty;function hf(a,b){if(ff(a,b))return!0;if("object"!==typeof a||null===a||"object"!==typeof b||null===b)return!1;var c=Object.keys(a),d=Object.keys(b);if(c.length!==d.length)return!1;for(d=0;d<c.length;d++)if(!gf.call(b,c[d])||!ff(a[c[d]],b[c[d]]))return!1;return!0}
|
|
var jf=Xa&&"documentMode"in document&&11>=document.documentMode,kf={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},lf=null,mf=null,nf=null,of=!1;
|
|
function pf(a,b){var c=b.window===b?b.document:9===b.nodeType?b:b.ownerDocument;if(of||null==lf||lf!==Ud(c))return null;c=lf;"selectionStart"in c&&Zd(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset});return nf&&hf(nf,c)?null:(nf=c,a=F.getPooled(kf.select,mf,a,b),a.type="select",a.target=lf,Lc(a),a)}
|
|
var qf={eventTypes:kf,extractEvents:function(a,b,c,d){var e=d.window===d?d.document:9===d.nodeType?d:d.ownerDocument,f;if(!(f=!e)){a:{e=oc(e);f=ja.onSelect;for(var g=0;g<f.length;g++)if(!e.has(f[g])){e=!1;break a}e=!0}f=!e}if(f)return null;e=b?qe(b):window;switch(a){case "focus":if(Ne(e)||"true"===e.contentEditable)lf=e,mf=b,nf=null;break;case "blur":nf=mf=lf=null;break;case "mousedown":of=!0;break;case "contextmenu":case "mouseup":case "dragend":return of=!1,pf(c,d);case "selectionchange":if(jf)break;
|
|
case "keydown":case "keyup":return pf(c,d)}return null}};Ba.injectEventPluginOrder("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" "));sa=re;ta=pe;ua=qe;Ba.injectEventPluginsByName({SimpleEventPlugin:wd,EnterLeaveEventPlugin:df,ChangeEventPlugin:bf,SelectEventPlugin:qf,BeforeInputEventPlugin:Le});new Set;var rf=[],sf=-1;function H(a){0>sf||(a.current=rf[sf],rf[sf]=null,sf--)}
|
|
function I(a,b){sf++;rf[sf]=a.current;a.current=b}var tf={},J={current:tf},K={current:!1},uf=tf;function vf(a,b){var c=a.type.contextTypes;if(!c)return tf;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function N(a){a=a.childContextTypes;return null!==a&&void 0!==a}
|
|
function wf(a){H(K,a);H(J,a)}function xf(a){H(K,a);H(J,a)}function zf(a,b,c){if(J.current!==tf)throw t(Error(168));I(J,b,a);I(K,c,a)}function Af(a,b,c){var d=a.stateNode;a=b.childContextTypes;if("function"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in a))throw t(Error(108),Va(b)||"Unknown",e);return n({},c,{},d)}function Bf(a){var b=a.stateNode;b=b&&b.__reactInternalMemoizedMergedChildContext||tf;uf=J.current;I(J,b,a);I(K,K.current,a);return!0}
|
|
function Cf(a,b,c){var d=a.stateNode;if(!d)throw t(Error(169));c?(b=Af(a,b,uf),d.__reactInternalMemoizedMergedChildContext=b,H(K,a),H(J,a),I(J,b,a)):H(K,a);I(K,c,a)}
|
|
var Df=r.unstable_runWithPriority,Ef=r.unstable_scheduleCallback,Ff=r.unstable_cancelCallback,Gf=r.unstable_shouldYield,Hf=r.unstable_requestPaint,If=r.unstable_now,Jf=r.unstable_getCurrentPriorityLevel,Kf=r.unstable_ImmediatePriority,Lf=r.unstable_UserBlockingPriority,Mf=r.unstable_NormalPriority,Nf=r.unstable_LowPriority,Of=r.unstable_IdlePriority,Pf={},Qf=void 0!==Hf?Hf:function(){},Rf=null,Sf=null,Tf=!1,Uf=If(),Vf=1E4>Uf?If:function(){return If()-Uf};
|
|
function Wf(){switch(Jf()){case Kf:return 99;case Lf:return 98;case Mf:return 97;case Nf:return 96;case Of:return 95;default:throw t(Error(332));}}function Xf(a){switch(a){case 99:return Kf;case 98:return Lf;case 97:return Mf;case 96:return Nf;case 95:return Of;default:throw t(Error(332));}}function Yf(a,b){a=Xf(a);return Df(a,b)}function Zf(a,b,c){a=Xf(a);return Ef(a,b,c)}function $f(a){null===Rf?(Rf=[a],Sf=Ef(Kf,ag)):Rf.push(a);return Pf}function bg(){if(null!==Sf){var a=Sf;Sf=null;Ff(a)}ag()}
|
|
function ag(){if(!Tf&&null!==Rf){Tf=!0;var a=0;try{var b=Rf;Yf(99,function(){for(;a<b.length;a++){var c=b[a];do c=c(!0);while(null!==c)}});Rf=null}catch(c){throw null!==Rf&&(Rf=Rf.slice(a+1)),Ef(Kf,bg),c;}finally{Tf=!1}}}function cg(a,b){if(a&&a.defaultProps){b=n({},b);a=a.defaultProps;for(var c in a)void 0===b[c]&&(b[c]=a[c])}return b}var dg={current:null},eg=null,fg=null,gg=null;function hg(){gg=fg=eg=null}function ig(a,b){var c=a.type._context;I(dg,c._currentValue,a);c._currentValue=b}
|
|
function jg(a){var b=dg.current;H(dg,a);a.type._context._currentValue=b}function kg(a,b){for(;null!==a;){var c=a.alternate;if(a.childExpirationTime<b)a.childExpirationTime=b,null!==c&&c.childExpirationTime<b&&(c.childExpirationTime=b);else if(null!==c&&c.childExpirationTime<b)c.childExpirationTime=b;else break;a=a.return}}function lg(a,b){eg=a;gg=fg=null;a=a.dependencies;null!==a&&null!==a.firstContext&&(a.expirationTime>=b&&(mg=!0),a.firstContext=null)}
|
|
function ng(a,b){if(gg!==a&&!1!==b&&0!==b){if("number"!==typeof b||1073741823===b)gg=a,b=1073741823;b={context:a,observedBits:b,next:null};if(null===fg){if(null===eg)throw t(Error(308));fg=b;eg.dependencies={expirationTime:0,firstContext:b,responders:null}}else fg=fg.next=b}return a._currentValue}var og=!1;
|
|
function pg(a){return{baseState:a,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function qg(a){return{baseState:a.baseState,firstUpdate:a.firstUpdate,lastUpdate:a.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}
|
|
function rg(a,b){return{expirationTime:a,suspenseConfig:b,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function sg(a,b){null===a.lastUpdate?a.firstUpdate=a.lastUpdate=b:(a.lastUpdate.next=b,a.lastUpdate=b)}
|
|
function tg(a,b){var c=a.alternate;if(null===c){var d=a.updateQueue;var e=null;null===d&&(d=a.updateQueue=pg(a.memoizedState))}else d=a.updateQueue,e=c.updateQueue,null===d?null===e?(d=a.updateQueue=pg(a.memoizedState),e=c.updateQueue=pg(c.memoizedState)):d=a.updateQueue=qg(e):null===e&&(e=c.updateQueue=qg(d));null===e||d===e?sg(d,b):null===d.lastUpdate||null===e.lastUpdate?(sg(d,b),sg(e,b)):(sg(d,b),e.lastUpdate=b)}
|
|
function ug(a,b){var c=a.updateQueue;c=null===c?a.updateQueue=pg(a.memoizedState):vg(a,c);null===c.lastCapturedUpdate?c.firstCapturedUpdate=c.lastCapturedUpdate=b:(c.lastCapturedUpdate.next=b,c.lastCapturedUpdate=b)}function vg(a,b){var c=a.alternate;null!==c&&b===c.updateQueue&&(b=a.updateQueue=qg(b));return b}
|
|
function wg(a,b,c,d,e,f){switch(c.tag){case 1:return a=c.payload,"function"===typeof a?a.call(f,d,e):a;case 3:a.effectTag=a.effectTag&-4097|64;case 0:a=c.payload;e="function"===typeof a?a.call(f,d,e):a;if(null===e||void 0===e)break;return n({},d,e);case 2:og=!0}return d}
|
|
function xg(a,b,c,d,e){og=!1;b=vg(a,b);for(var f=b.baseState,g=null,h=0,k=b.firstUpdate,l=f;null!==k;){var m=k.expirationTime;m<e?(null===g&&(g=k,f=l),h<m&&(h=m)):(yg(m,k.suspenseConfig),l=wg(a,b,k,l,c,d),null!==k.callback&&(a.effectTag|=32,k.nextEffect=null,null===b.lastEffect?b.firstEffect=b.lastEffect=k:(b.lastEffect.nextEffect=k,b.lastEffect=k)));k=k.next}m=null;for(k=b.firstCapturedUpdate;null!==k;){var A=k.expirationTime;A<e?(null===m&&(m=k,null===g&&(f=l)),h<A&&(h=A)):(l=wg(a,b,k,l,c,d),null!==
|
|
k.callback&&(a.effectTag|=32,k.nextEffect=null,null===b.lastCapturedEffect?b.firstCapturedEffect=b.lastCapturedEffect=k:(b.lastCapturedEffect.nextEffect=k,b.lastCapturedEffect=k)));k=k.next}null===g&&(b.lastUpdate=null);null===m?b.lastCapturedUpdate=null:a.effectTag|=32;null===g&&null===m&&(f=l);b.baseState=f;b.firstUpdate=g;b.firstCapturedUpdate=m;zg(h);a.expirationTime=h;a.memoizedState=l}
|
|
function Ag(a,b,c){null!==b.firstCapturedUpdate&&(null!==b.lastUpdate&&(b.lastUpdate.next=b.firstCapturedUpdate,b.lastUpdate=b.lastCapturedUpdate),b.firstCapturedUpdate=b.lastCapturedUpdate=null);Bg(b.firstEffect,c);b.firstEffect=b.lastEffect=null;Bg(b.firstCapturedEffect,c);b.firstCapturedEffect=b.lastCapturedEffect=null}function Bg(a,b){for(;null!==a;){var c=a.callback;if(null!==c){a.callback=null;var d=b;if("function"!==typeof c)throw t(Error(191),c);c.call(d)}a=a.nextEffect}}
|
|
var Cg=Da.ReactCurrentBatchConfig,Dg=(new aa.Component).refs;function Eg(a,b,c,d){b=a.memoizedState;c=c(d,b);c=null===c||void 0===c?b:n({},b,c);a.memoizedState=c;d=a.updateQueue;null!==d&&0===a.expirationTime&&(d.baseState=c)}
|
|
var Ig={isMounted:function(a){return(a=a._reactInternalFiber)?Bc(a)===a:!1},enqueueSetState:function(a,b,c){a=a._reactInternalFiber;var d=Fg(),e=Cg.suspense;d=Gg(d,a,e);e=rg(d,e);e.payload=b;void 0!==c&&null!==c&&(e.callback=c);tg(a,e);Hg(a,d)},enqueueReplaceState:function(a,b,c){a=a._reactInternalFiber;var d=Fg(),e=Cg.suspense;d=Gg(d,a,e);e=rg(d,e);e.tag=1;e.payload=b;void 0!==c&&null!==c&&(e.callback=c);tg(a,e);Hg(a,d)},enqueueForceUpdate:function(a,b){a=a._reactInternalFiber;var c=Fg(),d=Cg.suspense;
|
|
c=Gg(c,a,d);d=rg(c,d);d.tag=2;void 0!==b&&null!==b&&(d.callback=b);tg(a,d);Hg(a,c)}};function Jg(a,b,c,d,e,f,g){a=a.stateNode;return"function"===typeof a.shouldComponentUpdate?a.shouldComponentUpdate(d,f,g):b.prototype&&b.prototype.isPureReactComponent?!hf(c,d)||!hf(e,f):!0}
|
|
function Kg(a,b,c){var d=!1,e=tf;var f=b.contextType;"object"===typeof f&&null!==f?f=ng(f):(e=N(b)?uf:J.current,d=b.contextTypes,f=(d=null!==d&&void 0!==d)?vf(a,e):tf);b=new b(c,f);a.memoizedState=null!==b.state&&void 0!==b.state?b.state:null;b.updater=Ig;a.stateNode=b;b._reactInternalFiber=a;d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=e,a.__reactInternalMemoizedMaskedChildContext=f);return b}
|
|
function Lg(a,b,c,d){a=b.state;"function"===typeof b.componentWillReceiveProps&&b.componentWillReceiveProps(c,d);"function"===typeof b.UNSAFE_componentWillReceiveProps&&b.UNSAFE_componentWillReceiveProps(c,d);b.state!==a&&Ig.enqueueReplaceState(b,b.state,null)}
|
|
function Mg(a,b,c,d){var e=a.stateNode;e.props=c;e.state=a.memoizedState;e.refs=Dg;var f=b.contextType;"object"===typeof f&&null!==f?e.context=ng(f):(f=N(b)?uf:J.current,e.context=vf(a,f));f=a.updateQueue;null!==f&&(xg(a,f,c,e,d),e.state=a.memoizedState);f=b.getDerivedStateFromProps;"function"===typeof f&&(Eg(a,b,f,c),e.state=a.memoizedState);"function"===typeof b.getDerivedStateFromProps||"function"===typeof e.getSnapshotBeforeUpdate||"function"!==typeof e.UNSAFE_componentWillMount&&"function"!==
|
|
typeof e.componentWillMount||(b=e.state,"function"===typeof e.componentWillMount&&e.componentWillMount(),"function"===typeof e.UNSAFE_componentWillMount&&e.UNSAFE_componentWillMount(),b!==e.state&&Ig.enqueueReplaceState(e,e.state,null),f=a.updateQueue,null!==f&&(xg(a,f,c,e,d),e.state=a.memoizedState));"function"===typeof e.componentDidMount&&(a.effectTag|=4)}var Ng=Array.isArray;
|
|
function Og(a,b,c){a=c.ref;if(null!==a&&"function"!==typeof a&&"object"!==typeof a){if(c._owner){c=c._owner;if(c){if(1!==c.tag)throw t(Error(309));var d=c.stateNode}if(!d)throw t(Error(147),a);var e=""+a;if(null!==b&&null!==b.ref&&"function"===typeof b.ref&&b.ref._stringRef===e)return b.ref;b=function(a){var b=d.refs;b===Dg&&(b=d.refs={});null===a?delete b[e]:b[e]=a};b._stringRef=e;return b}if("string"!==typeof a)throw t(Error(284));if(!c._owner)throw t(Error(290),a);}return a}
|
|
function Pg(a,b){if("textarea"!==a.type)throw t(Error(31),"[object Object]"===Object.prototype.toString.call(b)?"object with keys {"+Object.keys(b).join(", ")+"}":b,"");}
|
|
function Qg(a){function b(b,c){if(a){var d=b.lastEffect;null!==d?(d.nextEffect=c,b.lastEffect=c):b.firstEffect=b.lastEffect=c;c.nextEffect=null;c.effectTag=8}}function c(c,d){if(!a)return null;for(;null!==d;)b(c,d),d=d.sibling;return null}function d(a,b){for(a=new Map;null!==b;)null!==b.key?a.set(b.key,b):a.set(b.index,b),b=b.sibling;return a}function e(a,b,c){a=Rg(a,b,c);a.index=0;a.sibling=null;return a}function f(b,c,d){b.index=d;if(!a)return c;d=b.alternate;if(null!==d)return d=d.index,d<c?(b.effectTag=
|
|
E,c):d;b.effectTag=E;return c}function g(b){a&&null===b.alternate&&(b.effectTag=E);return b}function h(a,b,c,d){if(null===b||6!==b.tag)return b=Sg(c,a.mode,d),b.return=a,b;b=e(b,c,d);b.return=a;return b}function k(a,b,c,d){if(null!==b&&b.elementType===c.type)return d=e(b,c.props,d),d.ref=Og(a,b,c),d.return=a,d;d=Tg(c.type,c.key,c.props,null,a.mode,d);d.ref=Og(a,b,c);d.return=a;return d}function l(a,b,c,d){if(null===b||4!==b.tag||b.stateNode.containerInfo!==c.containerInfo||b.stateNode.implementation!==
|
|
c.implementation)return b=Ug(c,a.mode,d),b.return=a,b;b=e(b,c.children||[],d);b.return=a;return b}function m(a,b,c,d,f){if(null===b||7!==b.tag)return b=Vg(c,a.mode,d,f),b.return=a,b;b=e(b,c,d);b.return=a;return b}function A(a,b,c){if("string"===typeof b||"number"===typeof b)return b=Sg(""+b,a.mode,c),b.return=a,b;if("object"===typeof b&&null!==b){switch(b.$$typeof){case Fa:return c=Tg(b.type,b.key,b.props,null,a.mode,c),c.ref=Og(a,null,b),c.return=a,c;case Ga:return b=Ug(b,a.mode,c),b.return=a,b}if(Ng(b)||
|
|
Ta(b))return b=Vg(b,a.mode,c,null),b.return=a,b;Pg(a,b)}return null}function w(a,b,c,d){var e=null!==b?b.key:null;if("string"===typeof c||"number"===typeof c)return null!==e?null:h(a,b,""+c,d);if("object"===typeof c&&null!==c){switch(c.$$typeof){case Fa:return c.key===e?c.type===Ha?m(a,b,c.props.children,d,e):k(a,b,c,d):null;case Ga:return c.key===e?l(a,b,c,d):null}if(Ng(c)||Ta(c))return null!==e?null:m(a,b,c,d,null);Pg(a,c)}return null}function L(a,b,c,d,e){if("string"===typeof d||"number"===typeof d)return a=
|
|
a.get(c)||null,h(b,a,""+d,e);if("object"===typeof d&&null!==d){switch(d.$$typeof){case Fa:return a=a.get(null===d.key?c:d.key)||null,d.type===Ha?m(b,a,d.props.children,e,d.key):k(b,a,d,e);case Ga:return a=a.get(null===d.key?c:d.key)||null,l(b,a,d,e)}if(Ng(d)||Ta(d))return a=a.get(c)||null,m(b,a,d,e,null);Pg(b,d)}return null}function wb(e,g,h,k){for(var l=null,m=null,q=g,y=g=0,z=null;null!==q&&y<h.length;y++){q.index>y?(z=q,q=null):z=q.sibling;var p=w(e,q,h[y],k);if(null===p){null===q&&(q=z);break}a&&
|
|
q&&null===p.alternate&&b(e,q);g=f(p,g,y);null===m?l=p:m.sibling=p;m=p;q=z}if(y===h.length)return c(e,q),l;if(null===q){for(;y<h.length;y++)q=A(e,h[y],k),null!==q&&(g=f(q,g,y),null===m?l=q:m.sibling=q,m=q);return l}for(q=d(e,q);y<h.length;y++)z=L(q,e,y,h[y],k),null!==z&&(a&&null!==z.alternate&&q.delete(null===z.key?y:z.key),g=f(z,g,y),null===m?l=z:m.sibling=z,m=z);a&&q.forEach(function(a){return b(e,a)});return l}function M(e,g,h,k){var l=Ta(h);if("function"!==typeof l)throw t(Error(150));h=l.call(h);
|
|
if(null==h)throw t(Error(151));for(var m=l=null,q=g,y=g=0,z=null,p=h.next();null!==q&&!p.done;y++,p=h.next()){q.index>y?(z=q,q=null):z=q.sibling;var M=w(e,q,p.value,k);if(null===M){null===q&&(q=z);break}a&&q&&null===M.alternate&&b(e,q);g=f(M,g,y);null===m?l=M:m.sibling=M;m=M;q=z}if(p.done)return c(e,q),l;if(null===q){for(;!p.done;y++,p=h.next())p=A(e,p.value,k),null!==p&&(g=f(p,g,y),null===m?l=p:m.sibling=p,m=p);return l}for(q=d(e,q);!p.done;y++,p=h.next())p=L(q,e,y,p.value,k),null!==p&&(a&&null!==
|
|
p.alternate&&q.delete(null===p.key?y:p.key),g=f(p,g,y),null===m?l=p:m.sibling=p,m=p);a&&q.forEach(function(a){return b(e,a)});return l}return function(a,d,f,h){var k="object"===typeof f&&null!==f&&f.type===Ha&&null===f.key;k&&(f=f.props.children);var l="object"===typeof f&&null!==f;if(l)switch(f.$$typeof){case Fa:a:{l=f.key;for(k=d;null!==k;){if(k.key===l){if(7===k.tag?f.type===Ha:k.elementType===f.type){c(a,k.sibling);d=e(k,f.type===Ha?f.props.children:f.props,h);d.ref=Og(a,k,f);d.return=a;a=d;break a}c(a,
|
|
k);break}else b(a,k);k=k.sibling}f.type===Ha?(d=Vg(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=Tg(f.type,f.key,f.props,null,a.mode,h),h.ref=Og(a,d,f),h.return=a,a=h)}return g(a);case Ga:a:{for(k=f.key;null!==d;){if(d.key===k){if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[],h);d.return=a;a=d;break a}c(a,d);break}else b(a,d);d=d.sibling}d=Ug(f,a.mode,h);d.return=a;a=d}return g(a)}if("string"===typeof f||
|
|
"number"===typeof f)return f=""+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f,h),d.return=a,a=d):(c(a,d),d=Sg(f,a.mode,h),d.return=a,a=d),g(a);if(Ng(f))return wb(a,d,f,h);if(Ta(f))return M(a,d,f,h);l&&Pg(a,f);if("undefined"===typeof f&&!k)switch(a.tag){case 1:case 0:throw a=a.type,t(Error(152),a.displayName||a.name||"Component");}return c(a,d)}}var Wg=Qg(!0),Xg=Qg(!1),Yg={},Zg={current:Yg},$g={current:Yg},ah={current:Yg};function bh(a){if(a===Yg)throw t(Error(174));return a}
|
|
function ch(a,b){I(ah,b,a);I($g,a,a);I(Zg,Yg,a);var c=b.nodeType;switch(c){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:Qb(null,"");break;default:c=8===c?b.parentNode:b,b=c.namespaceURI||null,c=c.tagName,b=Qb(b,c)}H(Zg,a);I(Zg,b,a)}function dh(a){H(Zg,a);H($g,a);H(ah,a)}function eh(a){bh(ah.current);var b=bh(Zg.current);var c=Qb(b,a.type);b!==c&&(I($g,a,a),I(Zg,c,a))}function fh(a){$g.current===a&&(H(Zg,a),H($g,a))}var O={current:0};
|
|
function gh(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||c.data===be||c.data===ce))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if((b.effectTag&64)!==D)return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}function hh(a,b){return{responder:a,props:b}}
|
|
var ih=Da.ReactCurrentDispatcher,jh=0,kh=null,P=null,lh=null,mh=null,Q=null,nh=null,oh=0,ph=null,qh=0,rh=!1,sh=null,th=0;function uh(){throw t(Error(321));}function vh(a,b){if(null===b)return!1;for(var c=0;c<b.length&&c<a.length;c++)if(!ff(a[c],b[c]))return!1;return!0}
|
|
function wh(a,b,c,d,e,f){jh=f;kh=b;lh=null!==a?a.memoizedState:null;ih.current=null===lh?xh:yh;b=c(d,e);if(rh){do rh=!1,th+=1,lh=null!==a?a.memoizedState:null,nh=mh,ph=Q=P=null,ih.current=yh,b=c(d,e);while(rh);sh=null;th=0}ih.current=zh;a=kh;a.memoizedState=mh;a.expirationTime=oh;a.updateQueue=ph;a.effectTag|=qh;a=null!==P&&null!==P.next;jh=0;nh=Q=mh=lh=P=kh=null;oh=0;ph=null;qh=0;if(a)throw t(Error(300));return b}
|
|
function Ah(){ih.current=zh;jh=0;nh=Q=mh=lh=P=kh=null;oh=0;ph=null;qh=0;rh=!1;sh=null;th=0}function Eh(){var a={memoizedState:null,baseState:null,queue:null,baseUpdate:null,next:null};null===Q?mh=Q=a:Q=Q.next=a;return Q}function Fh(){if(null!==nh)Q=nh,nh=Q.next,P=lh,lh=null!==P?P.next:null;else{if(null===lh)throw t(Error(310));P=lh;var a={memoizedState:P.memoizedState,baseState:P.baseState,queue:P.queue,baseUpdate:P.baseUpdate,next:null};Q=null===Q?mh=a:Q.next=a;lh=P.next}return Q}
|
|
function Gh(a,b){return"function"===typeof b?b(a):b}
|
|
function Hh(a){var b=Fh(),c=b.queue;if(null===c)throw t(Error(311));c.lastRenderedReducer=a;if(0<th){var d=c.dispatch;if(null!==sh){var e=sh.get(c);if(void 0!==e){sh.delete(c);var f=b.memoizedState;do f=a(f,e.action),e=e.next;while(null!==e);ff(f,b.memoizedState)||(mg=!0);b.memoizedState=f;b.baseUpdate===c.last&&(b.baseState=f);c.lastRenderedState=f;return[f,d]}}return[b.memoizedState,d]}d=c.last;var g=b.baseUpdate;f=b.baseState;null!==g?(null!==d&&(d.next=null),d=g.next):d=null!==d?d.next:null;if(null!==
|
|
d){var h=e=null,k=d,l=!1;do{var m=k.expirationTime;m<jh?(l||(l=!0,h=g,e=f),m>oh&&(oh=m,zg(oh))):(yg(m,k.suspenseConfig),f=k.eagerReducer===a?k.eagerState:a(f,k.action));g=k;k=k.next}while(null!==k&&k!==d);l||(h=g,e=f);ff(f,b.memoizedState)||(mg=!0);b.memoizedState=f;b.baseUpdate=h;b.baseState=e;c.lastRenderedState=f}return[b.memoizedState,c.dispatch]}
|
|
function Ih(a,b,c,d){a={tag:a,create:b,destroy:c,deps:d,next:null};null===ph?(ph={lastEffect:null},ph.lastEffect=a.next=a):(b=ph.lastEffect,null===b?ph.lastEffect=a.next=a:(c=b.next,b.next=a,a.next=c,ph.lastEffect=a));return a}function Jh(a,b,c,d){var e=Eh();qh|=a;e.memoizedState=Ih(b,c,void 0,void 0===d?null:d)}
|
|
function Kh(a,b,c,d){var e=Fh();d=void 0===d?null:d;var f=void 0;if(null!==P){var g=P.memoizedState;f=g.destroy;if(null!==d&&vh(d,g.deps)){Ih(0,c,f,d);return}}qh|=a;e.memoizedState=Ih(b,c,f,d)}function Lh(a,b){if("function"===typeof b)return a=a(),b(a),function(){b(null)};if(null!==b&&void 0!==b)return a=a(),b.current=a,function(){b.current=null}}function Mh(){}
|
|
function Nh(a,b,c){if(!(25>th))throw t(Error(301));var d=a.alternate;if(a===kh||null!==d&&d===kh)if(rh=!0,a={expirationTime:jh,suspenseConfig:null,action:c,eagerReducer:null,eagerState:null,next:null},null===sh&&(sh=new Map),c=sh.get(b),void 0===c)sh.set(b,a);else{for(b=c;null!==b.next;)b=b.next;b.next=a}else{var e=Fg(),f=Cg.suspense;e=Gg(e,a,f);f={expirationTime:e,suspenseConfig:f,action:c,eagerReducer:null,eagerState:null,next:null};var g=b.last;if(null===g)f.next=f;else{var h=g.next;null!==h&&
|
|
(f.next=h);g.next=f}b.last=f;if(0===a.expirationTime&&(null===d||0===d.expirationTime)&&(d=b.lastRenderedReducer,null!==d))try{var k=b.lastRenderedState,l=d(k,c);f.eagerReducer=d;f.eagerState=l;if(ff(l,k))return}catch(m){}finally{}Hg(a,e)}}
|
|
var zh={readContext:ng,useCallback:uh,useContext:uh,useEffect:uh,useImperativeHandle:uh,useLayoutEffect:uh,useMemo:uh,useReducer:uh,useRef:uh,useState:uh,useDebugValue:uh,useResponder:uh},xh={readContext:ng,useCallback:function(a,b){Eh().memoizedState=[a,void 0===b?null:b];return a},useContext:ng,useEffect:function(a,b){return Jh(516,192,a,b)},useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return Jh(4,36,Lh.bind(null,b,a),c)},useLayoutEffect:function(a,b){return Jh(4,
|
|
36,a,b)},useMemo:function(a,b){var c=Eh();b=void 0===b?null:b;a=a();c.memoizedState=[a,b];return a},useReducer:function(a,b,c){var d=Eh();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a=d.queue={last:null,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};a=a.dispatch=Nh.bind(null,kh,a);return[d.memoizedState,a]},useRef:function(a){var b=Eh();a={current:a};return b.memoizedState=a},useState:function(a){var b=Eh();"function"===typeof a&&(a=a());b.memoizedState=b.baseState=a;a=b.queue={last:null,
|
|
dispatch:null,lastRenderedReducer:Gh,lastRenderedState:a};a=a.dispatch=Nh.bind(null,kh,a);return[b.memoizedState,a]},useDebugValue:Mh,useResponder:hh},yh={readContext:ng,useCallback:function(a,b){var c=Fh();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&vh(b,d[1]))return d[0];c.memoizedState=[a,b];return a},useContext:ng,useEffect:function(a,b){return Kh(516,192,a,b)},useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return Kh(4,36,Lh.bind(null,b,a),c)},
|
|
useLayoutEffect:function(a,b){return Kh(4,36,a,b)},useMemo:function(a,b){var c=Fh();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&vh(b,d[1]))return d[0];a=a();c.memoizedState=[a,b];return a},useReducer:Hh,useRef:function(){return Fh().memoizedState},useState:function(a){return Hh(Gh,a)},useDebugValue:Mh,useResponder:hh},Oh=null,Ph=null,Qh=!1;
|
|
function Rh(a,b){var c=Sh(5,null,null,0);c.elementType="DELETED";c.type="DELETED";c.stateNode=b;c.return=a;c.effectTag=8;null!==a.lastEffect?(a.lastEffect.nextEffect=c,a.lastEffect=c):a.firstEffect=a.lastEffect=c}function Th(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,!0):!1;case 6:return b=""===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,!0):!1;case 13:return!1;default:return!1}}
|
|
function Uh(a){if(Qh){var b=Ph;if(b){var c=b;if(!Th(a,b)){b=je(c.nextSibling);if(!b||!Th(a,b)){a.effectTag=a.effectTag&~Ac|E;Qh=!1;Oh=a;return}Rh(Oh,c)}Oh=a;Ph=je(b.firstChild)}else a.effectTag=a.effectTag&~Ac|E,Qh=!1,Oh=a}}function Vh(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag&&13!==a.tag;)a=a.return;Oh=a}
|
|
function Wh(a){if(a!==Oh)return!1;if(!Qh)return Vh(a),Qh=!0,!1;var b=a.type;if(5!==a.tag||"head"!==b&&"body"!==b&&!ge(b,a.memoizedProps))for(b=Ph;b;)Rh(a,b),b=je(b.nextSibling);Vh(a);if(13===a.tag)if(a=a.memoizedState,a=null!==a?a.dehydrated:null,null===a)a=Ph;else a:{a=a.nextSibling;for(b=0;a;){if(8===a.nodeType){var c=a.data;if(c===ae){if(0===b){a=je(a.nextSibling);break a}b--}else c!==$d&&c!==ce&&c!==be||b++}a=a.nextSibling}a=null}else a=Oh?je(a.stateNode.nextSibling):null;Ph=a;return!0}
|
|
function Xh(){Ph=Oh=null;Qh=!1}var Yh=Da.ReactCurrentOwner,mg=!1;function R(a,b,c,d){b.child=null===a?Xg(b,null,c,d):Wg(b,a.child,c,d)}function Zh(a,b,c,d,e){c=c.render;var f=b.ref;lg(b,e);d=wh(a,b,c,d,f,e);if(null!==a&&!mg)return b.updateQueue=a.updateQueue,b.effectTag&=-517,a.expirationTime<=e&&(a.expirationTime=0),$h(a,b,e);b.effectTag|=1;R(a,b,d,e);return b.child}
|
|
function ai(a,b,c,d,e,f){if(null===a){var g=c.type;if("function"===typeof g&&!bi(g)&&void 0===g.defaultProps&&null===c.compare&&void 0===c.defaultProps)return b.tag=15,b.type=g,ci(a,b,g,d,e,f);a=Tg(c.type,null,d,null,b.mode,f);a.ref=b.ref;a.return=b;return b.child=a}g=a.child;if(e<f&&(e=g.memoizedProps,c=c.compare,c=null!==c?c:hf,c(e,d)&&a.ref===b.ref))return $h(a,b,f);b.effectTag|=1;a=Rg(g,d,f);a.ref=b.ref;a.return=b;return b.child=a}
|
|
function ci(a,b,c,d,e,f){return null!==a&&hf(a.memoizedProps,d)&&a.ref===b.ref&&(mg=!1,e<f)?$h(a,b,f):di(a,b,c,d,f)}function ei(a,b){var c=b.ref;if(null===a&&null!==c||null!==a&&a.ref!==c)b.effectTag|=128}function di(a,b,c,d,e){var f=N(c)?uf:J.current;f=vf(b,f);lg(b,e);c=wh(a,b,c,d,f,e);if(null!==a&&!mg)return b.updateQueue=a.updateQueue,b.effectTag&=-517,a.expirationTime<=e&&(a.expirationTime=0),$h(a,b,e);b.effectTag|=1;R(a,b,c,e);return b.child}
|
|
function fi(a,b,c,d,e){if(N(c)){var f=!0;Bf(b)}else f=!1;lg(b,e);if(null===b.stateNode)null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=E),Kg(b,c,d,e),Mg(b,c,d,e),d=!0;else if(null===a){var g=b.stateNode,h=b.memoizedProps;g.props=h;var k=g.context,l=c.contextType;"object"===typeof l&&null!==l?l=ng(l):(l=N(c)?uf:J.current,l=vf(b,l));var m=c.getDerivedStateFromProps,A="function"===typeof m||"function"===typeof g.getSnapshotBeforeUpdate;A||"function"!==typeof g.UNSAFE_componentWillReceiveProps&&
|
|
"function"!==typeof g.componentWillReceiveProps||(h!==d||k!==l)&&Lg(b,g,d,l);og=!1;var w=b.memoizedState;k=g.state=w;var L=b.updateQueue;null!==L&&(xg(b,L,d,g,e),k=b.memoizedState);h!==d||w!==k||K.current||og?("function"===typeof m&&(Eg(b,c,m,d),k=b.memoizedState),(h=og||Jg(b,c,h,d,w,k,l))?(A||"function"!==typeof g.UNSAFE_componentWillMount&&"function"!==typeof g.componentWillMount||("function"===typeof g.componentWillMount&&g.componentWillMount(),"function"===typeof g.UNSAFE_componentWillMount&&
|
|
g.UNSAFE_componentWillMount()),"function"===typeof g.componentDidMount&&(b.effectTag|=4)):("function"===typeof g.componentDidMount&&(b.effectTag|=4),b.memoizedProps=d,b.memoizedState=k),g.props=d,g.state=k,g.context=l,d=h):("function"===typeof g.componentDidMount&&(b.effectTag|=4),d=!1)}else g=b.stateNode,h=b.memoizedProps,g.props=b.type===b.elementType?h:cg(b.type,h),k=g.context,l=c.contextType,"object"===typeof l&&null!==l?l=ng(l):(l=N(c)?uf:J.current,l=vf(b,l)),m=c.getDerivedStateFromProps,(A=
|
|
"function"===typeof m||"function"===typeof g.getSnapshotBeforeUpdate)||"function"!==typeof g.UNSAFE_componentWillReceiveProps&&"function"!==typeof g.componentWillReceiveProps||(h!==d||k!==l)&&Lg(b,g,d,l),og=!1,k=b.memoizedState,w=g.state=k,L=b.updateQueue,null!==L&&(xg(b,L,d,g,e),w=b.memoizedState),h!==d||k!==w||K.current||og?("function"===typeof m&&(Eg(b,c,m,d),w=b.memoizedState),(m=og||Jg(b,c,h,d,k,w,l))?(A||"function"!==typeof g.UNSAFE_componentWillUpdate&&"function"!==typeof g.componentWillUpdate||
|
|
("function"===typeof g.componentWillUpdate&&g.componentWillUpdate(d,w,l),"function"===typeof g.UNSAFE_componentWillUpdate&&g.UNSAFE_componentWillUpdate(d,w,l)),"function"===typeof g.componentDidUpdate&&(b.effectTag|=4),"function"===typeof g.getSnapshotBeforeUpdate&&(b.effectTag|=256)):("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&k===a.memoizedState||(b.effectTag|=4),"function"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&k===a.memoizedState||(b.effectTag|=256),b.memoizedProps=
|
|
d,b.memoizedState=w),g.props=d,g.state=w,g.context=l,d=m):("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&k===a.memoizedState||(b.effectTag|=4),"function"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&k===a.memoizedState||(b.effectTag|=256),d=!1);return gi(a,b,c,d,f,e)}
|
|
function gi(a,b,c,d,e,f){ei(a,b);var g=(b.effectTag&64)!==D;if(!d&&!g)return e&&Cf(b,c,!1),$h(a,b,f);d=b.stateNode;Yh.current=b;var h=g&&"function"!==typeof c.getDerivedStateFromError?null:d.render();b.effectTag|=1;null!==a&&g?(b.child=Wg(b,a.child,null,f),b.child=Wg(b,null,h,f)):R(a,b,h,f);b.memoizedState=d.state;e&&Cf(b,c,!0);return b.child}function hi(a){var b=a.stateNode;b.pendingContext?zf(a,b.pendingContext,b.pendingContext!==b.context):b.context&&zf(a,b.context,!1);ch(a,b.containerInfo)}
|
|
var ii={dehydrated:null,retryTime:1};
|
|
function ji(a,b,c){var d=b.mode,e=b.pendingProps,f=O.current,g=!1,h;(h=(b.effectTag&64)!==D)||(h=0!==(f&2)&&(null===a||null!==a.memoizedState));h?(g=!0,b.effectTag&=-65):null!==a&&null===a.memoizedState||void 0===e.fallback||!0===e.unstable_avoidThisFallback||(f|=1);I(O,f&1,b);if(null===a){if(g){g=e.fallback;e=Vg(null,d,0,null);e.return=b;if(0===(b.mode&2))for(a=null!==b.memoizedState?b.child.child:b.child,e.child=a;null!==a;)a.return=e,a=a.sibling;c=Vg(g,d,c,null);c.return=b;e.sibling=c;b.memoizedState=
|
|
ii;b.child=e;return c}d=e.children;b.memoizedState=null;return b.child=Xg(b,null,d,c)}if(null!==a.memoizedState){a=a.child;d=a.sibling;if(g){e=e.fallback;c=Rg(a,a.pendingProps,0);c.return=b;if(0===(b.mode&2)&&(g=null!==b.memoizedState?b.child.child:b.child,g!==a.child))for(c.child=g;null!==g;)g.return=c,g=g.sibling;d=Rg(d,e,d.expirationTime);d.return=b;c.sibling=d;c.childExpirationTime=0;b.memoizedState=ii;b.child=c;return d}c=Wg(b,a.child,e.children,c);b.memoizedState=null;return b.child=c}a=a.child;
|
|
if(g){g=e.fallback;e=Vg(null,d,0,null);e.return=b;e.child=a;null!==a&&(a.return=e);if(0===(b.mode&2))for(a=null!==b.memoizedState?b.child.child:b.child,e.child=a;null!==a;)a.return=e,a=a.sibling;c=Vg(g,d,c,null);c.return=b;e.sibling=c;c.effectTag|=E;e.childExpirationTime=0;b.memoizedState=ii;b.child=e;return c}b.memoizedState=null;return b.child=Wg(b,a,e.children,c)}
|
|
function ki(a,b,c,d,e){var f=a.memoizedState;null===f?a.memoizedState={isBackwards:b,rendering:null,last:d,tail:c,tailExpiration:0,tailMode:e}:(f.isBackwards=b,f.rendering=null,f.last=d,f.tail=c,f.tailExpiration=0,f.tailMode=e)}
|
|
function li(a,b,c){var d=b.pendingProps,e=d.revealOrder,f=d.tail;R(a,b,d.children,c);d=O.current;if(0!==(d&2))d=d&1|2,b.effectTag|=64;else{if(null!==a&&(a.effectTag&64)!==D)a:for(a=b.child;null!==a;){if(13===a.tag){if(null!==a.memoizedState){a.expirationTime<c&&(a.expirationTime=c);var g=a.alternate;null!==g&&g.expirationTime<c&&(g.expirationTime=c);kg(a.return,c)}}else if(null!==a.child){a.child.return=a;a=a.child;continue}if(a===b)break a;for(;null===a.sibling;){if(null===a.return||a.return===b)break a;
|
|
a=a.return}a.sibling.return=a.return;a=a.sibling}d&=1}I(O,d,b);if(0===(b.mode&2))b.memoizedState=null;else switch(e){case "forwards":c=b.child;for(e=null;null!==c;)d=c.alternate,null!==d&&null===gh(d)&&(e=c),c=c.sibling;c=e;null===c?(e=b.child,b.child=null):(e=c.sibling,c.sibling=null);ki(b,!1,e,c,f);break;case "backwards":c=null;e=b.child;for(b.child=null;null!==e;){d=e.alternate;if(null!==d&&null===gh(d)){b.child=e;break}d=e.sibling;e.sibling=c;c=e;e=d}ki(b,!0,c,null,f);break;case "together":ki(b,
|
|
!1,null,null,void 0);break;default:b.memoizedState=null}return b.child}function $h(a,b,c){null!==a&&(b.dependencies=a.dependencies);var d=b.expirationTime;0!==d&&zg(d);if(b.childExpirationTime<c)return null;if(null!==a&&b.child!==a.child)throw t(Error(153));if(null!==b.child){a=b.child;c=Rg(a,a.pendingProps,a.expirationTime);b.child=c;for(c.return=b;null!==a.sibling;)a=a.sibling,c=c.sibling=Rg(a,a.pendingProps,a.expirationTime),c.return=b;c.sibling=null}return b.child}
|
|
function mi(a){a.effectTag|=4}var ni,oi,pi,qi;ni=function(a,b){for(var c=b.child;null!==c;){if(5===c.tag||6===c.tag)a.appendChild(c.stateNode);else if(4!==c.tag&&null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return}c.sibling.return=c.return;c=c.sibling}};oi=function(){};
|
|
pi=function(a,b,c,d,e){var f=a.memoizedProps;if(f!==d){var g=b.stateNode;bh(Zg.current);a=null;switch(c){case "input":f=Ab(g,f);d=Ab(g,d);a=[];break;case "option":f=Ib(g,f);d=Ib(g,d);a=[];break;case "select":f=n({},f,{value:void 0});d=n({},d,{value:void 0});a=[];break;case "textarea":f=Kb(g,f);d=Kb(g,d);a=[];break;default:"function"!==typeof f.onClick&&"function"===typeof d.onClick&&(g.onclick=Td)}Qd(c,d);var h,k;c=null;for(h in f)if(!d.hasOwnProperty(h)&&f.hasOwnProperty(h)&&null!=f[h])if("style"===
|
|
h)for(k in g=f[h],g)g.hasOwnProperty(k)&&(c||(c={}),c[k]="");else"dangerouslySetInnerHTML"!==h&&"children"!==h&&"suppressContentEditableWarning"!==h&&"suppressHydrationWarning"!==h&&"autoFocus"!==h&&(ia.hasOwnProperty(h)?a||(a=[]):(a=a||[]).push(h,null));for(h in d){var l=d[h];g=null!=f?f[h]:void 0;if(d.hasOwnProperty(h)&&l!==g&&(null!=l||null!=g))if("style"===h)if(g){for(k in g)!g.hasOwnProperty(k)||l&&l.hasOwnProperty(k)||(c||(c={}),c[k]="");for(k in l)l.hasOwnProperty(k)&&g[k]!==l[k]&&(c||(c={}),
|
|
c[k]=l[k])}else c||(a||(a=[]),a.push(h,c)),c=l;else"dangerouslySetInnerHTML"===h?(l=l?l.__html:void 0,g=g?g.__html:void 0,null!=l&&g!==l&&(a=a||[]).push(h,""+l)):"children"===h?g===l||"string"!==typeof l&&"number"!==typeof l||(a=a||[]).push(h,""+l):"suppressContentEditableWarning"!==h&&"suppressHydrationWarning"!==h&&(ia.hasOwnProperty(h)?(null!=l&&Sd(e,h),a||g===l||(a=[])):(a=a||[]).push(h,l))}c&&(a=a||[]).push("style",c);e=a;(b.updateQueue=e)&&mi(b)}};qi=function(a,b,c,d){c!==d&&mi(b)};
|
|
function ri(a,b){switch(a.tailMode){case "hidden":b=a.tail;for(var c=null;null!==b;)null!==b.alternate&&(c=b),b=b.sibling;null===c?a.tail=null:c.sibling=null;break;case "collapsed":c=a.tail;for(var d=null;null!==c;)null!==c.alternate&&(d=c),c=c.sibling;null===d?b||null===a.tail?a.tail=null:a.tail.sibling=null:d.sibling=null}}
|
|
function si(a){switch(a.tag){case 1:N(a.type)&&wf(a);var b=a.effectTag;return b&4096?(a.effectTag=b&-4097|64,a):null;case 3:dh(a);xf(a);b=a.effectTag;if((b&64)!==D)throw t(Error(285));a.effectTag=b&-4097|64;return a;case 5:return fh(a),null;case 13:return H(O,a),b=a.effectTag,b&4096?(a.effectTag=b&-4097|64,a):null;case 19:return H(O,a),null;case 4:return dh(a),null;case 10:return jg(a),null;default:return null}}function ti(a,b){return{value:a,source:b,stack:Wa(b)}}
|
|
var ui="function"===typeof WeakSet?WeakSet:Set;function vi(a,b){var c=b.source,d=b.stack;null===d&&null!==c&&(d=Wa(c));null!==c&&Va(c.type);b=b.value;null!==a&&1===a.tag&&Va(a.type);try{console.error(b)}catch(e){setTimeout(function(){throw e;})}}function wi(a,b){try{b.props=a.memoizedProps,b.state=a.memoizedState,b.componentWillUnmount()}catch(c){xi(a,c)}}function yi(a){var b=a.ref;if(null!==b)if("function"===typeof b)try{b(null)}catch(c){xi(a,c)}else b.current=null}
|
|
function Di(a,b){switch(b.tag){case 0:case 11:case 15:Ei(2,0,b);break;case 1:if(b.effectTag&256&&null!==a){var c=a.memoizedProps,d=a.memoizedState;a=b.stateNode;b=a.getSnapshotBeforeUpdate(b.elementType===b.type?c:cg(b.type,c),d);a.__reactInternalSnapshotBeforeUpdate=b}break;case 3:case 5:case 6:case 4:case 17:break;default:throw t(Error(163));}}
|
|
function Ei(a,b,c){c=c.updateQueue;c=null!==c?c.lastEffect:null;if(null!==c){var d=c=c.next;do{if(0!==(d.tag&a)){var e=d.destroy;d.destroy=void 0;void 0!==e&&e()}0!==(d.tag&b)&&(e=d.create,d.destroy=e());d=d.next}while(d!==c)}}
|
|
function Fi(a,b,c){"function"===typeof Gi&&Gi(b);switch(b.tag){case 0:case 11:case 14:case 15:a=b.updateQueue;if(null!==a&&(a=a.lastEffect,null!==a)){var d=a.next;Yf(97<c?97:c,function(){var a=d;do{var c=a.destroy;if(void 0!==c){var g=b;try{c()}catch(h){xi(g,h)}}a=a.next}while(a!==d)})}break;case 1:yi(b);c=b.stateNode;"function"===typeof c.componentWillUnmount&&wi(b,c);break;case 5:yi(b);break;case 4:Hi(a,b,c)}}
|
|
function Ii(a){var b=a.alternate;a.return=null;a.child=null;a.memoizedState=null;a.updateQueue=null;a.dependencies=null;a.alternate=null;a.firstEffect=null;a.lastEffect=null;a.pendingProps=null;a.memoizedProps=null;null!==b&&Ii(b)}function Ji(a){return 5===a.tag||3===a.tag||4===a.tag}
|
|
function Ki(a){a:{for(var b=a.return;null!==b;){if(Ji(b)){var c=b;break a}b=b.return}throw t(Error(160));}b=c.stateNode;switch(c.tag){case 5:var d=!1;break;case 3:b=b.containerInfo;d=!0;break;case 4:b=b.containerInfo;d=!0;break;default:throw t(Error(161));}c.effectTag&16&&(Tb(b,""),c.effectTag&=-17);a:b:for(c=a;;){for(;null===c.sibling;){if(null===c.return||Ji(c.return)){c=null;break a}c=c.return}c.sibling.return=c.return;for(c=c.sibling;5!==c.tag&&6!==c.tag&&18!==c.tag;){if(c.effectTag&E)continue b;
|
|
if(null===c.child||4===c.tag)continue b;else c.child.return=c,c=c.child}if(!(c.effectTag&E)){c=c.stateNode;break a}}for(var e=a;;){var f=5===e.tag||6===e.tag;if(f){var g=f?e.stateNode:e.stateNode.instance;if(c)if(d){f=b;var h=g;g=c;8===f.nodeType?f.parentNode.insertBefore(h,g):f.insertBefore(h,g)}else b.insertBefore(g,c);else d?(h=b,8===h.nodeType?(f=h.parentNode,f.insertBefore(g,h)):(f=h,f.appendChild(g)),h=h._reactRootContainer,null!==h&&void 0!==h||null!==f.onclick||(f.onclick=Td)):b.appendChild(g)}else if(4!==
|
|
e.tag&&null!==e.child){e.child.return=e;e=e.child;continue}if(e===a)break;for(;null===e.sibling;){if(null===e.return||e.return===a)return;e=e.return}e.sibling.return=e.return;e=e.sibling}}
|
|
function Hi(a,b,c){for(var d=b,e=!1,f,g;;){if(!e){e=d.return;a:for(;;){if(null===e)throw t(Error(160));f=e.stateNode;switch(e.tag){case 5:g=!1;break a;case 3:f=f.containerInfo;g=!0;break a;case 4:f=f.containerInfo;g=!0;break a}e=e.return}e=!0}if(5===d.tag||6===d.tag){a:for(var h=a,k=d,l=c,m=k;;)if(Fi(h,m,l),null!==m.child&&4!==m.tag)m.child.return=m,m=m.child;else{if(m===k)break;for(;null===m.sibling;){if(null===m.return||m.return===k)break a;m=m.return}m.sibling.return=m.return;m=m.sibling}g?(h=
|
|
f,k=d.stateNode,8===h.nodeType?h.parentNode.removeChild(k):h.removeChild(k)):f.removeChild(d.stateNode)}else if(4===d.tag){if(null!==d.child){f=d.stateNode.containerInfo;g=!0;d.child.return=d;d=d.child;continue}}else if(Fi(a,d,c),null!==d.child){d.child.return=d;d=d.child;continue}if(d===b)break;for(;null===d.sibling;){if(null===d.return||d.return===b)return;d=d.return;4===d.tag&&(e=!1)}d.sibling.return=d.return;d=d.sibling}}
|
|
function Li(a,b){switch(b.tag){case 0:case 11:case 14:case 15:Ei(4,8,b);break;case 1:break;case 5:var c=b.stateNode;if(null!=c){var d=b.memoizedProps,e=null!==a?a.memoizedProps:d;a=b.type;var f=b.updateQueue;b.updateQueue=null;if(null!==f){c[ne]=d;"input"===a&&"radio"===d.type&&null!=d.name&&Cb(c,d);Rd(a,e);b=Rd(a,d);for(e=0;e<f.length;e+=2){var g=f[e],h=f[e+1];"style"===g?Od(c,h):"dangerouslySetInnerHTML"===g?Sb(c,h):"children"===g?Tb(c,h):ub(c,g,h,b)}switch(a){case "input":Db(c,d);break;case "textarea":Mb(c,
|
|
d);break;case "select":b=c._wrapperState.wasMultiple,c._wrapperState.wasMultiple=!!d.multiple,a=d.value,null!=a?Jb(c,!!d.multiple,a,!1):b!==!!d.multiple&&(null!=d.defaultValue?Jb(c,!!d.multiple,d.defaultValue,!0):Jb(c,!!d.multiple,d.multiple?[]:"",!1))}}}break;case 6:if(null===b.stateNode)throw t(Error(162));b.stateNode.nodeValue=b.memoizedProps;break;case 3:b=b.stateNode;b.hydrate&&(b.hydrate=!1,zc(b.containerInfo));break;case 12:break;case 13:c=b;null===b.memoizedState?d=!1:(d=!0,c=b.child,Mi=Vf());
|
|
if(null!==c)a:for(a=c;;){if(5===a.tag)f=a.stateNode,d?(f=f.style,"function"===typeof f.setProperty?f.setProperty("display","none","important"):f.display="none"):(f=a.stateNode,e=a.memoizedProps.style,e=void 0!==e&&null!==e&&e.hasOwnProperty("display")?e.display:null,f.style.display=Nd("display",e));else if(6===a.tag)a.stateNode.nodeValue=d?"":a.memoizedProps;else if(13===a.tag&&null!==a.memoizedState&&null===a.memoizedState.dehydrated){f=a.child.sibling;f.return=a;a=f;continue}else if(null!==a.child){a.child.return=
|
|
a;a=a.child;continue}if(a===c)break a;for(;null===a.sibling;){if(null===a.return||a.return===c)break a;a=a.return}a.sibling.return=a.return;a=a.sibling}Ni(b);break;case 19:Ni(b);break;case 17:break;case 20:break;case 21:break;default:throw t(Error(163));}}function Ni(a){var b=a.updateQueue;if(null!==b){a.updateQueue=null;var c=a.stateNode;null===c&&(c=a.stateNode=new ui);b.forEach(function(b){var d=Oi.bind(null,a,b);c.has(b)||(c.add(b),b.then(d,d))})}}var Pi="function"===typeof WeakMap?WeakMap:Map;
|
|
function Qi(a,b,c){c=rg(c,null);c.tag=3;c.payload={element:null};var d=b.value;c.callback=function(){Ri||(Ri=!0,Si=d);vi(a,b)};return c}
|
|
function Ti(a,b,c){c=rg(c,null);c.tag=3;var d=a.type.getDerivedStateFromError;if("function"===typeof d){var e=b.value;c.payload=function(){vi(a,b);return d(e)}}var f=a.stateNode;null!==f&&"function"===typeof f.componentDidCatch&&(c.callback=function(){"function"!==typeof d&&(null===Ui?Ui=new Set([this]):Ui.add(this),vi(a,b));var c=b.stack;this.componentDidCatch(b.value,{componentStack:null!==c?c:""})});return c}
|
|
var Vi=Math.ceil,Wi=Da.ReactCurrentDispatcher,Xi=Da.ReactCurrentOwner,S=0,Yi=8,Zi=16,$i=32,aj=0,bj=1,cj=2,dj=3,ej=4,fj=5,gj=6,T=S,U=null,V=null,W=0,X=aj,hj=null,ij=1073741823,jj=1073741823,kj=null,lj=0,mj=!1,Mi=0,nj=500,Y=null,Ri=!1,Si=null,Ui=null,oj=!1,pj=null,qj=90,rj=null,sj=0,tj=null,uj=0;function Fg(){return(T&(Zi|$i))!==S?1073741821-(Vf()/10|0):0!==uj?uj:uj=1073741821-(Vf()/10|0)}
|
|
function Gg(a,b,c){b=b.mode;if(0===(b&2))return 1073741823;var d=Wf();if(0===(b&4))return 99===d?1073741823:1073741822;if((T&Zi)!==S)return W;if(null!==c)a=1073741821-25*(((1073741821-a+(c.timeoutMs|0||5E3)/10)/25|0)+1);else switch(d){case 99:a=1073741823;break;case 98:a=1073741821-10*(((1073741821-a+15)/10|0)+1);break;case 97:case 96:a=1073741821-25*(((1073741821-a+500)/25|0)+1);break;case 95:a=2;break;default:throw t(Error(326));}null!==U&&a===W&&--a;return a}var vj=0;
|
|
function Hg(a,b){if(50<sj)throw sj=0,tj=null,t(Error(185));a=wj(a,b);if(null!==a){var c=Wf();1073741823===b?(T&Yi)!==S&&(T&(Zi|$i))===S?xj(a):(Z(a),T===S&&bg()):Z(a);(T&4)===S||98!==c&&99!==c||(null===rj?rj=new Map([[a,b]]):(c=rj.get(a),(void 0===c||c>b)&&rj.set(a,b)))}}
|
|
function wj(a,b){a.expirationTime<b&&(a.expirationTime=b);var c=a.alternate;null!==c&&c.expirationTime<b&&(c.expirationTime=b);var d=a.return,e=null;if(null===d&&3===a.tag)e=a.stateNode;else for(;null!==d;){c=d.alternate;d.childExpirationTime<b&&(d.childExpirationTime=b);null!==c&&c.childExpirationTime<b&&(c.childExpirationTime=b);if(null===d.return&&3===d.tag){e=d.stateNode;break}d=d.return}null!==e&&(U===e&&(zg(b),X===ej&&yj(e,W)),zj(e,b));return e}
|
|
function Aj(a){var b=a.lastExpiredTime;if(0!==b)return b;b=a.firstPendingTime;if(!Bj(a,b))return b;b=a.lastPingedTime;a=a.nextKnownPendingLevel;return b>a?b:a}
|
|
function Z(a){if(0!==a.lastExpiredTime)a.callbackExpirationTime=1073741823,a.callbackPriority=99,a.callbackNode=$f(xj.bind(null,a));else{var b=Aj(a),c=a.callbackNode;if(0===b)null!==c&&(a.callbackNode=null,a.callbackExpirationTime=0,a.callbackPriority=90);else{var d=Fg();1073741823===b?d=99:1===b||2===b?d=95:(d=10*(1073741821-b)-10*(1073741821-d),d=0>=d?99:250>=d?98:5250>=d?97:95);if(null!==c){var e=a.callbackPriority;if(a.callbackExpirationTime===b&&e>=d)return;c!==Pf&&Ff(c)}a.callbackExpirationTime=
|
|
b;a.callbackPriority=d;b=1073741823===b?$f(xj.bind(null,a)):Zf(d,Cj.bind(null,a),{timeout:10*(1073741821-b)-Vf()});a.callbackNode=b}}}
|
|
function Cj(a,b){uj=0;if(b)return b=Fg(),Dj(a,b),Z(a),null;var c=Aj(a);if(0!==c){b=a.callbackNode;if((T&(Zi|$i))!==S)throw t(Error(327));Ej();a===U&&c===W||Fj(a,c);if(null!==V){var d=T;T|=Zi;var e=Gj(a);do try{Hj();break}catch(h){Ij(a,h)}while(1);hg();T=d;Wi.current=e;if(X===bj)throw b=hj,Fj(a,c),yj(a,c),Z(a),b;if(null===V)switch(e=a.finishedWork=a.current.alternate,a.finishedExpirationTime=c,Jj(a,c),d=X,U=null,d){case aj:case bj:throw t(Error(345));case cj:if(2!==c){Dj(a,2);break}Kj(a);break;case dj:yj(a,
|
|
c);d=a.lastSuspendedTime;c===d&&(a.nextKnownPendingLevel=Lj(e));if(1073741823===ij&&(e=Mi+nj-Vf(),10<e)){if(mj){var f=a.lastPingedTime;if(0===f||f>=c){a.lastPingedTime=c;Fj(a,c);break}}f=Aj(a);if(0!==f&&f!==c)break;if(0!==d&&d!==c){a.lastPingedTime=d;break}a.timeoutHandle=he(Kj.bind(null,a),e);break}Kj(a);break;case ej:yj(a,c);d=a.lastSuspendedTime;c===d&&(a.nextKnownPendingLevel=Lj(e));if(mj&&(e=a.lastPingedTime,0===e||e>=c)){a.lastPingedTime=c;Fj(a,c);break}e=Aj(a);if(0!==e&&e!==c)break;if(0!==
|
|
d&&d!==c){a.lastPingedTime=d;break}1073741823!==jj?d=10*(1073741821-jj)-Vf():1073741823===ij?d=0:(d=10*(1073741821-ij)-5E3,e=Vf(),c=10*(1073741821-c)-e,d=e-d,0>d&&(d=0),d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3E3>d?3E3:4320>d?4320:1960*Vi(d/1960))-d,c<d&&(d=c));if(10<d){a.timeoutHandle=he(Kj.bind(null,a),d);break}Kj(a);break;case fj:if(1073741823!==ij&&null!==kj){f=ij;var g=kj;d=g.busyMinDurationMs|0;0>=d?d=0:(e=g.busyDelayMs|0,f=Vf()-(10*(1073741821-f)-(g.timeoutMs|0||5E3)),d=f<=e?0:e+d-f);
|
|
if(10<d){yj(a,c);a.timeoutHandle=he(Kj.bind(null,a),d);break}}Kj(a);break;case gj:yj(a,c);break;default:throw t(Error(329));}Z(a);if(a.callbackNode===b)return Cj.bind(null,a)}}return null}
|
|
function xj(a){var b=a.lastExpiredTime;b=0!==b?b:1073741823;if(a.finishedExpirationTime===b)Kj(a);else{if((T&(Zi|$i))!==S)throw t(Error(327));Ej();a===U&&b===W||Fj(a,b);if(null!==V){var c=T;T|=Zi;var d=Gj(a);do try{Mj();break}catch(e){Ij(a,e)}while(1);hg();T=c;Wi.current=d;if(X===bj)throw c=hj,Fj(a,b),yj(a,b),Z(a),c;if(null!==V)throw t(Error(261));a.finishedWork=a.current.alternate;a.finishedExpirationTime=b;Jj(a,b);X===gj?yj(a,b):(U=null,Kj(a));Z(a)}}return null}
|
|
function Nj(){(T&(1|Zi|$i))===S&&(Oj(),Ej())}function Jj(a,b){var c=a.firstBatch;null!==c&&c._defer&&c._expirationTime>=b&&(Zf(97,function(){c._onComplete();return null}),X=gj)}function Oj(){if(null!==rj){var a=rj;rj=null;a.forEach(function(a,c){Dj(c,a);Z(c)});bg()}}function Pj(a,b){var c=T;T|=1;try{return a(b)}finally{T=c,T===S&&bg()}}function Qj(a,b,c,d){var e=T;T|=4;try{return Yf(98,a.bind(null,b,c,d))}finally{T=e,T===S&&bg()}}
|
|
function Rj(a,b){var c=T;T&=-2;T|=Yi;try{return a(b)}finally{T=c,T===S&&bg()}}
|
|
function Fj(a,b){a.finishedWork=null;a.finishedExpirationTime=0;var c=a.timeoutHandle;-1!==c&&(a.timeoutHandle=-1,ie(c));if(null!==V)for(c=V.return;null!==c;){var d=c;switch(d.tag){case 1:var e=d.type.childContextTypes;null!==e&&void 0!==e&&wf(d);break;case 3:dh(d);xf(d);break;case 5:fh(d);break;case 4:dh(d);break;case 13:H(O,d);break;case 19:H(O,d);break;case 10:jg(d)}c=c.return}U=a;V=Rg(a.current,null,b);W=b;X=aj;hj=null;jj=ij=1073741823;kj=null;lj=0;mj=!1}
|
|
function Ij(a,b){do{try{hg();Ah();if(null===V||null===V.return)return X=bj,hj=b,null;a:{var c=a,d=V.return,e=V,f=b;b=W;e.effectTag|=2048;e.firstEffect=e.lastEffect=null;if(null!==f&&"object"===typeof f&&"function"===typeof f.then){var g=f,h=0!==(O.current&1),k=d;do{var l;if(l=13===k.tag){var m=k.memoizedState;if(null!==m)l=null!==m.dehydrated?!0:!1;else{var A=k.memoizedProps;l=void 0===A.fallback?!1:!0!==A.unstable_avoidThisFallback?!0:h?!1:!0}}if(l){var w=k.updateQueue;if(null===w){var L=new Set;
|
|
L.add(g);k.updateQueue=L}else w.add(g);if(0===(k.mode&2)){k.effectTag|=64;e.effectTag&=-2981;if(1===e.tag)if(null===e.alternate)e.tag=17;else{var wb=rg(1073741823,null);wb.tag=2;tg(e,wb)}e.expirationTime=1073741823;break a}f=void 0;e=b;var M=c.pingCache;null===M?(M=c.pingCache=new Pi,f=new Set,M.set(g,f)):(f=M.get(g),void 0===f&&(f=new Set,M.set(g,f)));if(!f.has(e)){f.add(e);var q=Sj.bind(null,c,g,e);g.then(q,q)}k.effectTag|=4096;k.expirationTime=b;break a}k=k.return}while(null!==k);f=Error((Va(e.type)||
|
|
"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."+Wa(e))}X!==fj&&(X=cj);f=ti(f,e);k=d;do{switch(k.tag){case 3:g=f;k.effectTag|=4096;k.expirationTime=b;var y=Qi(k,g,b);ug(k,y);break a;case 1:g=f;var z=k.type,p=k.stateNode;if((k.effectTag&64)===D&&("function"===typeof z.getDerivedStateFromError||null!==p&&"function"===typeof p.componentDidCatch&&
|
|
(null===Ui||!Ui.has(p)))){k.effectTag|=4096;k.expirationTime=b;var u=Ti(k,g,b);ug(k,u);break a}}k=k.return}while(null!==k)}V=Tj(V)}catch(v){b=v;continue}break}while(1)}function Gj(){var a=Wi.current;Wi.current=zh;return null===a?zh:a}function yg(a,b){a<ij&&2<a&&(ij=a);null!==b&&a<jj&&2<a&&(jj=a,kj=b)}function zg(a){a>lj&&(lj=a)}function Mj(){for(;null!==V;)V=Uj(V)}function Hj(){for(;null!==V&&!Gf();)V=Uj(V)}
|
|
function Uj(a){var b=Vj(a.alternate,a,W);a.memoizedProps=a.pendingProps;null===b&&(b=Tj(a));Xi.current=null;return b}
|
|
function Tj(a){V=a;do{var b=V.alternate;a=V.return;if((V.effectTag&2048)===D){a:{var c=b;b=V;var d=W,e=b.pendingProps;switch(b.tag){case 2:break;case 16:break;case 15:case 0:break;case 1:N(b.type)&&wf(b);break;case 3:dh(b);xf(b);d=b.stateNode;d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null);(null===c||null===c.child)&&Wh(b)&&mi(b);oi(b);break;case 5:fh(b);d=bh(ah.current);var f=b.type;if(null!==c&&null!=b.stateNode)pi(c,b,f,e,d),c.ref!==b.ref&&(b.effectTag|=128);else if(e){var g=
|
|
bh(Zg.current);if(Wh(b)){e=b;f=void 0;c=e.stateNode;var h=e.type,k=e.memoizedProps;c[me]=e;c[ne]=k;switch(h){case "iframe":case "object":case "embed":G("load",c);break;case "video":case "audio":for(var l=0;l<dc.length;l++)G(dc[l],c);break;case "source":G("error",c);break;case "img":case "image":case "link":G("error",c);G("load",c);break;case "form":G("reset",c);G("submit",c);break;case "details":G("toggle",c);break;case "input":Bb(c,k);G("invalid",c);Sd(d,"onChange");break;case "select":c._wrapperState=
|
|
{wasMultiple:!!k.multiple};G("invalid",c);Sd(d,"onChange");break;case "textarea":Lb(c,k),G("invalid",c),Sd(d,"onChange")}Qd(h,k);l=null;for(f in k)k.hasOwnProperty(f)&&(g=k[f],"children"===f?"string"===typeof g?c.textContent!==g&&(l=["children",g]):"number"===typeof g&&c.textContent!==""+g&&(l=["children",""+g]):ia.hasOwnProperty(f)&&null!=g&&Sd(d,f));switch(h){case "input":yb(c);Gb(c,k,!0);break;case "textarea":yb(c);Nb(c,k);break;case "select":case "option":break;default:"function"===typeof k.onClick&&
|
|
(c.onclick=Td)}d=l;e.updateQueue=d;null!==d&&mi(b)}else{k=f;c=e;h=b;l=9===d.nodeType?d:d.ownerDocument;g===Ob.html&&(g=Pb(k));g===Ob.html?"script"===k?(k=l.createElement("div"),k.innerHTML="<script>\x3c/script>",l=k.removeChild(k.firstChild)):"string"===typeof c.is?l=l.createElement(k,{is:c.is}):(l=l.createElement(k),"select"===k&&(k=l,c.multiple?k.multiple=!0:c.size&&(k.size=c.size))):l=l.createElementNS(g,k);k=l;k[me]=h;k[ne]=c;c=k;ni(c,b,!1,!1);b.stateNode=c;g=d;var m=Rd(f,e);switch(f){case "iframe":case "object":case "embed":G("load",
|
|
c);d=e;break;case "video":case "audio":for(d=0;d<dc.length;d++)G(dc[d],c);d=e;break;case "source":G("error",c);d=e;break;case "img":case "image":case "link":G("error",c);G("load",c);d=e;break;case "form":G("reset",c);G("submit",c);d=e;break;case "details":G("toggle",c);d=e;break;case "input":Bb(c,e);d=Ab(c,e);G("invalid",c);Sd(g,"onChange");break;case "option":d=Ib(c,e);break;case "select":c._wrapperState={wasMultiple:!!e.multiple};d=n({},e,{value:void 0});G("invalid",c);Sd(g,"onChange");break;case "textarea":Lb(c,
|
|
e);d=Kb(c,e);G("invalid",c);Sd(g,"onChange");break;default:d=e}Qd(f,d);h=void 0;k=f;l=c;var A=d;for(h in A)if(A.hasOwnProperty(h)){var w=A[h];"style"===h?Od(l,w):"dangerouslySetInnerHTML"===h?(w=w?w.__html:void 0,null!=w&&Sb(l,w)):"children"===h?"string"===typeof w?("textarea"!==k||""!==w)&&Tb(l,w):"number"===typeof w&&Tb(l,""+w):"suppressContentEditableWarning"!==h&&"suppressHydrationWarning"!==h&&"autoFocus"!==h&&(ia.hasOwnProperty(h)?null!=w&&Sd(g,h):null!=w&&ub(l,h,w,m))}switch(f){case "input":yb(c);
|
|
Gb(c,e,!1);break;case "textarea":yb(c);Nb(c,e);break;case "option":null!=e.value&&c.setAttribute("value",""+tb(e.value));break;case "select":d=c;c=e;d.multiple=!!c.multiple;h=c.value;null!=h?Jb(d,!!c.multiple,h,!1):null!=c.defaultValue&&Jb(d,!!c.multiple,c.defaultValue,!0);break;default:"function"===typeof d.onClick&&(c.onclick=Td)}fe(f,e)&&mi(b)}null!==b.ref&&(b.effectTag|=128)}else if(null===b.stateNode)throw t(Error(166));break;case 6:if(c&&null!=b.stateNode)qi(c,b,c.memoizedProps,e);else{if("string"!==
|
|
typeof e&&null===b.stateNode)throw t(Error(166));f=bh(ah.current);bh(Zg.current);Wh(b)?(d=b.stateNode,e=b.memoizedProps,d[me]=b,d.nodeValue!==e&&mi(b)):(d=b,e=(9===f.nodeType?f:f.ownerDocument).createTextNode(e),e[me]=b,d.stateNode=e)}break;case 11:break;case 13:H(O,b);e=b.memoizedState;if((b.effectTag&64)!==D){b.expirationTime=d;break a}d=null!==e;e=!1;null===c?Wh(b):(f=c.memoizedState,e=null!==f,d||null===f||(f=c.child.sibling,null!==f&&(h=b.firstEffect,null!==h?(b.firstEffect=f,f.nextEffect=h):
|
|
(b.firstEffect=b.lastEffect=f,f.nextEffect=null),f.effectTag=8)));if(d&&!e&&0!==(b.mode&2))if(null===c&&!0!==b.memoizedProps.unstable_avoidThisFallback||0!==(O.current&1))X===aj&&(X=dj);else{if(X===aj||X===dj)X=ej;0!==lj&&null!==U&&(yj(U,W),zj(U,lj))}if(d||e)b.effectTag|=4;break;case 7:break;case 8:break;case 12:break;case 4:dh(b);oi(b);break;case 10:jg(b);break;case 9:break;case 14:break;case 17:N(b.type)&&wf(b);break;case 19:H(O,b);e=b.memoizedState;if(null===e)break;f=(b.effectTag&64)!==D;h=e.rendering;
|
|
if(null===h)if(f)ri(e,!1);else{if(X!==aj||null!==c&&(c.effectTag&64)!==D)for(c=b.child;null!==c;){h=gh(c);if(null!==h){b.effectTag|=64;ri(e,!1);e=h.updateQueue;null!==e&&(b.updateQueue=e,b.effectTag|=4);b.firstEffect=b.lastEffect=null;for(e=b.child;null!==e;)f=e,c=d,f.effectTag&=E,f.nextEffect=null,f.firstEffect=null,f.lastEffect=null,h=f.alternate,null===h?(f.childExpirationTime=0,f.expirationTime=c,f.child=null,f.memoizedProps=null,f.memoizedState=null,f.updateQueue=null,f.dependencies=null):(f.childExpirationTime=
|
|
h.childExpirationTime,f.expirationTime=h.expirationTime,f.child=h.child,f.memoizedProps=h.memoizedProps,f.memoizedState=h.memoizedState,f.updateQueue=h.updateQueue,c=h.dependencies,f.dependencies=null===c?null:{expirationTime:c.expirationTime,firstContext:c.firstContext,responders:c.responders}),e=e.sibling;I(O,O.current&1|2,b);b=b.child;break a}c=c.sibling}}else{if(!f)if(c=gh(h),null!==c){if(b.effectTag|=64,f=!0,ri(e,!0),null===e.tail&&"hidden"===e.tailMode){d=c.updateQueue;null!==d&&(b.updateQueue=
|
|
d,b.effectTag|=4);b=b.lastEffect=e.lastEffect;null!==b&&(b.nextEffect=null);break}}else Vf()>e.tailExpiration&&1<d&&(b.effectTag|=64,f=!0,ri(e,!1),b.expirationTime=b.childExpirationTime=d-1);e.isBackwards?(h.sibling=b.child,b.child=h):(d=e.last,null!==d?d.sibling=h:b.child=h,e.last=h)}if(null!==e.tail){0===e.tailExpiration&&(e.tailExpiration=Vf()+500);d=e.tail;e.rendering=d;e.tail=d.sibling;e.lastEffect=b.lastEffect;d.sibling=null;e=O.current;e=f?e&1|2:e&1;I(O,e,b);b=d;break a}break;case 20:break;
|
|
case 21:break;default:throw t(Error(156),b.tag);}b=null}d=V;if(1===W||1!==d.childExpirationTime){e=0;for(f=d.child;null!==f;)c=f.expirationTime,h=f.childExpirationTime,c>e&&(e=c),h>e&&(e=h),f=f.sibling;d.childExpirationTime=e}if(null!==b)return b;null!==a&&(a.effectTag&2048)===D&&(null===a.firstEffect&&(a.firstEffect=V.firstEffect),null!==V.lastEffect&&(null!==a.lastEffect&&(a.lastEffect.nextEffect=V.firstEffect),a.lastEffect=V.lastEffect),1<V.effectTag&&(null!==a.lastEffect?a.lastEffect.nextEffect=
|
|
V:a.firstEffect=V,a.lastEffect=V))}else{b=si(V,W);if(null!==b)return b.effectTag&=2047,b;null!==a&&(a.firstEffect=a.lastEffect=null,a.effectTag|=2048)}b=V.sibling;if(null!==b)return b;V=a}while(null!==V);X===aj&&(X=fj);return null}function Lj(a){var b=a.expirationTime;a=a.childExpirationTime;return b>a?b:a}function Kj(a){var b=Wf();Yf(99,Wj.bind(null,a,b));return null}
|
|
function Wj(a,b){Ej();if((T&(Zi|$i))!==S)throw t(Error(327));var c=a.finishedWork,d=a.finishedExpirationTime;if(null===c)return null;a.finishedWork=null;a.finishedExpirationTime=0;if(c===a.current)throw t(Error(177));a.callbackNode=null;a.callbackExpirationTime=0;a.callbackPriority=90;a.nextKnownPendingLevel=0;var e=Lj(c);a.firstPendingTime=e;d<=a.lastSuspendedTime?a.firstSuspendedTime=a.lastSuspendedTime=a.nextKnownPendingLevel=0:d<=a.firstSuspendedTime&&(a.firstSuspendedTime=d-1);d<=a.lastPingedTime&&
|
|
(a.lastPingedTime=0);d<=a.lastExpiredTime&&(a.lastExpiredTime=0);a===U&&(V=U=null,W=0);1<c.effectTag?null!==c.lastEffect?(c.lastEffect.nextEffect=c,e=c.firstEffect):e=c:e=c.firstEffect;if(null!==e){var f=T;T|=$i;Xi.current=null;de=Dd;var g=Yd();if(Zd(g)){if("selectionStart"in g)var h={start:g.selectionStart,end:g.selectionEnd};else a:{h=(h=g.ownerDocument)&&h.defaultView||window;var k=h.getSelection&&h.getSelection();if(k&&0!==k.rangeCount){h=k.anchorNode;var l=k.anchorOffset,m=k.focusNode;k=k.focusOffset;
|
|
try{h.nodeType,m.nodeType}catch(Fb){h=null;break a}var A=0,w=-1,L=-1,wb=0,M=0,q=g,y=null;b:for(;;){for(var z;;){q!==h||0!==l&&3!==q.nodeType||(w=A+l);q!==m||0!==k&&3!==q.nodeType||(L=A+k);3===q.nodeType&&(A+=q.nodeValue.length);if(null===(z=q.firstChild))break;y=q;q=z}for(;;){if(q===g)break b;y===h&&++wb===l&&(w=A);y===m&&++M===k&&(L=A);if(null!==(z=q.nextSibling))break;q=y;y=q.parentNode}q=z}h=-1===w||-1===L?null:{start:w,end:L}}else h=null}h=h||{start:0,end:0}}else h=null;ee={focusedElem:g,selectionRange:h};
|
|
Dd=!1;Y=e;do try{Xj()}catch(Fb){if(null===Y)throw t(Error(330));xi(Y,Fb);Y=Y.nextEffect}while(null!==Y);Y=e;do try{for(g=a,h=b;null!==Y;){var p=Y.effectTag;p&16&&Tb(Y.stateNode,"");if(p&128){var u=Y.alternate;if(null!==u){var v=u.ref;null!==v&&("function"===typeof v?v(null):v.current=null)}}switch(p&(E|12|Ac)){case E:Ki(Y);Y.effectTag&=~E;break;case 6:Ki(Y);Y.effectTag&=~E;Li(Y.alternate,Y);break;case Ac:Y.effectTag&=~Ac;break;case 1028:Y.effectTag&=~Ac;Li(Y.alternate,Y);break;case 4:Li(Y.alternate,
|
|
Y);break;case 8:l=Y,Hi(g,l,h),Ii(l)}Y=Y.nextEffect}}catch(Fb){if(null===Y)throw t(Error(330));xi(Y,Fb);Y=Y.nextEffect}while(null!==Y);v=ee;u=Yd();p=v.focusedElem;h=v.selectionRange;if(u!==p&&p&&p.ownerDocument&&Xd(p.ownerDocument.documentElement,p)){null!==h&&Zd(p)&&(u=h.start,v=h.end,void 0===v&&(v=u),"selectionStart"in p?(p.selectionStart=u,p.selectionEnd=Math.min(v,p.value.length)):(v=(u=p.ownerDocument||document)&&u.defaultView||window,v.getSelection&&(v=v.getSelection(),l=p.textContent.length,
|
|
g=Math.min(h.start,l),h=void 0===h.end?g:Math.min(h.end,l),!v.extend&&g>h&&(l=h,h=g,g=l),l=Wd(p,g),m=Wd(p,h),l&&m&&(1!==v.rangeCount||v.anchorNode!==l.node||v.anchorOffset!==l.offset||v.focusNode!==m.node||v.focusOffset!==m.offset)&&(u=u.createRange(),u.setStart(l.node,l.offset),v.removeAllRanges(),g>h?(v.addRange(u),v.extend(m.node,m.offset)):(u.setEnd(m.node,m.offset),v.addRange(u))))));u=[];for(v=p;v=v.parentNode;)1===v.nodeType&&u.push({element:v,left:v.scrollLeft,top:v.scrollTop});"function"===
|
|
typeof p.focus&&p.focus();for(p=0;p<u.length;p++)v=u[p],v.element.scrollLeft=v.left,v.element.scrollTop=v.top}ee=null;Dd=!!de;de=null;a.current=c;Y=e;do try{for(p=d;null!==Y;){var Bh=Y.effectTag;if(Bh&36){var cc=Y.alternate;u=Y;v=p;switch(u.tag){case 0:case 11:case 15:Ei(16,32,u);break;case 1:var ed=u.stateNode;if(u.effectTag&4)if(null===cc)ed.componentDidMount();else{var Zj=u.elementType===u.type?cc.memoizedProps:cg(u.type,cc.memoizedProps);ed.componentDidUpdate(Zj,cc.memoizedState,ed.__reactInternalSnapshotBeforeUpdate)}var Ch=
|
|
u.updateQueue;null!==Ch&&Ag(u,Ch,ed,v);break;case 3:var Dh=u.updateQueue;if(null!==Dh){g=null;if(null!==u.child)switch(u.child.tag){case 5:g=u.child.stateNode;break;case 1:g=u.child.stateNode}Ag(u,Dh,g,v)}break;case 5:var pk=u.stateNode;null===cc&&u.effectTag&4&&(v=pk,fe(u.type,u.memoizedProps)&&v.focus());break;case 6:break;case 4:break;case 12:break;case 13:if(null===u.memoizedState){var zi=u.alternate;if(null!==zi){var Ai=zi.memoizedState;if(null!==Ai){var Bi=Ai.dehydrated;null!==Bi&&zc(Bi)}}}break;
|
|
case 19:case 17:case 20:case 21:break;default:throw t(Error(163));}}if(Bh&128){u=Y;var yd=u.ref;if(null!==yd){var Ci=u.stateNode;switch(u.tag){case 5:var yf=Ci;break;default:yf=Ci}"function"===typeof yd?yd(yf):yd.current=yf}}Y=Y.nextEffect}}catch(Fb){if(null===Y)throw t(Error(330));xi(Y,Fb);Y=Y.nextEffect}while(null!==Y);Y=null;Qf();T=f}else a.current=c;if(oj)oj=!1,pj=a,qj=b;else for(Y=e;null!==Y;)b=Y.nextEffect,Y.nextEffect=null,Y=b;b=a.firstPendingTime;0===b&&(Ui=null);1073741823===b?a===tj?sj++:
|
|
(sj=0,tj=a):sj=0;"function"===typeof Yj&&Yj(c.stateNode,d);Z(a);if(Ri)throw Ri=!1,a=Si,Si=null,a;if((T&Yi)!==S)return null;bg();return null}function Xj(){for(;null!==Y;){var a=Y.effectTag;(a&256)!==D&&Di(Y.alternate,Y);(a&512)===D||oj||(oj=!0,Zf(97,function(){Ej();return null}));Y=Y.nextEffect}}function Ej(){if(90!==qj){var a=97<qj?97:qj;qj=90;return Yf(a,ak)}}
|
|
function ak(){if(null===pj)return!1;var a=pj;pj=null;if((T&(Zi|$i))!==S)throw t(Error(331));var b=T;T|=$i;for(a=a.current.firstEffect;null!==a;){try{var c=a;if((c.effectTag&512)!==D)switch(c.tag){case 0:case 11:case 15:Ei(128,0,c),Ei(0,64,c)}}catch(d){if(null===a)throw t(Error(330));xi(a,d)}c=a.nextEffect;a.nextEffect=null;a=c}T=b;bg();return!0}function bk(a,b,c){b=ti(c,b);b=Qi(a,b,1073741823);tg(a,b);a=wj(a,1073741823);null!==a&&Z(a)}
|
|
function xi(a,b){if(3===a.tag)bk(a,a,b);else for(var c=a.return;null!==c;){if(3===c.tag){bk(c,a,b);break}else if(1===c.tag){var d=c.stateNode;if("function"===typeof c.type.getDerivedStateFromError||"function"===typeof d.componentDidCatch&&(null===Ui||!Ui.has(d))){a=ti(b,a);a=Ti(c,a,1073741823);tg(c,a);c=wj(c,1073741823);null!==c&&Z(c);break}}c=c.return}}
|
|
function Sj(a,b,c){var d=a.pingCache;null!==d&&d.delete(b);U===a&&W===c?X===ej||X===dj&&1073741823===ij&&Vf()-Mi<nj?Fj(a,W):mj=!0:Bj(a,c)&&(b=a.lastPingedTime,0!==b&&b<c||(a.lastPingedTime=c,a.finishedExpirationTime===c&&(a.finishedExpirationTime=0,a.finishedWork=null),Z(a)))}function Oi(a,b){var c=a.stateNode;null!==c&&c.delete(b);b=1;1===b&&(b=Fg(),b=Gg(b,a,null));a=wj(a,b);null!==a&&Z(a)}var Vj;
|
|
Vj=function(a,b,c){var d=b.expirationTime;if(null!==a){var e=b.pendingProps;if(a.memoizedProps!==e||K.current)mg=!0;else{if(d<c){mg=!1;switch(b.tag){case 3:hi(b);Xh();break;case 5:eh(b);if(b.mode&4&&1!==c&&e.hidden)return b.expirationTime=b.childExpirationTime=1,null;break;case 1:N(b.type)&&Bf(b);break;case 4:ch(b,b.stateNode.containerInfo);break;case 10:ig(b,b.memoizedProps.value);break;case 13:if(null!==b.memoizedState){d=b.child.childExpirationTime;if(0!==d&&d>=c)return ji(a,b,c);I(O,O.current&
|
|
1,b);b=$h(a,b,c);return null!==b?b.sibling:null}I(O,O.current&1,b);break;case 19:d=b.childExpirationTime>=c;if((a.effectTag&64)!==D){if(d)return li(a,b,c);b.effectTag|=64}e=b.memoizedState;null!==e&&(e.rendering=null,e.tail=null);I(O,O.current,b);if(!d)return null}return $h(a,b,c)}mg=!1}}else mg=!1;b.expirationTime=0;switch(b.tag){case 2:d=b.type;null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=E);a=b.pendingProps;e=vf(b,J.current);lg(b,c);e=wh(null,b,d,a,e,c);b.effectTag|=1;if("object"===
|
|
typeof e&&null!==e&&"function"===typeof e.render&&void 0===e.$$typeof){b.tag=1;Ah();if(N(d)){var f=!0;Bf(b)}else f=!1;b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null;var g=d.getDerivedStateFromProps;"function"===typeof g&&Eg(b,d,g,a);e.updater=Ig;b.stateNode=e;e._reactInternalFiber=b;Mg(b,d,a,c);b=gi(null,b,d,!0,f,c)}else b.tag=0,R(null,b,e,c),b=b.child;return b;case 16:e=b.elementType;null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=E);a=b.pendingProps;Ua(e);if(1!==e._status)throw e._result;
|
|
e=e._result;b.type=e;f=b.tag=ck(e);a=cg(e,a);switch(f){case 0:b=di(null,b,e,a,c);break;case 1:b=fi(null,b,e,a,c);break;case 11:b=Zh(null,b,e,a,c);break;case 14:b=ai(null,b,e,cg(e.type,a),d,c);break;default:throw t(Error(306),e,"");}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:cg(d,e),di(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:cg(d,e),fi(a,b,d,e,c);case 3:hi(b);d=b.updateQueue;if(null===d)throw t(Error(282));e=b.memoizedState;e=null!==e?e.element:
|
|
null;xg(b,d,b.pendingProps,null,c);d=b.memoizedState.element;if(d===e)Xh(),b=$h(a,b,c);else{if(e=b.stateNode.hydrate)Ph=je(b.stateNode.containerInfo.firstChild),Oh=b,e=Qh=!0;if(e)for(c=Xg(b,null,d,c),b.child=c;c;)c.effectTag=c.effectTag&~E|Ac,c=c.sibling;else R(a,b,d,c),Xh();b=b.child}return b;case 5:return eh(b),null===a&&Uh(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:null,g=e.children,ge(d,e)?g=null:null!==f&&ge(d,f)&&(b.effectTag|=16),ei(a,b),b.mode&4&&1!==c&&e.hidden?(b.expirationTime=
|
|
b.childExpirationTime=1,b=null):(R(a,b,g,c),b=b.child),b;case 6:return null===a&&Uh(b),null;case 13:return ji(a,b,c);case 4:return ch(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=Wg(b,null,d,c):R(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:cg(d,e),Zh(a,b,d,e,c);case 7:return R(a,b,b.pendingProps,c),b.child;case 8:return R(a,b,b.pendingProps.children,c),b.child;case 12:return R(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;
|
|
e=b.pendingProps;g=b.memoizedProps;f=e.value;ig(b,f);if(null!==g){var h=g.value;f=ff(h,f)?0:("function"===typeof d._calculateChangedBits?d._calculateChangedBits(h,f):1073741823)|0;if(0===f){if(g.children===e.children&&!K.current){b=$h(a,b,c);break a}}else for(h=b.child,null!==h&&(h.return=b);null!==h;){var k=h.dependencies;if(null!==k){g=h.child;for(var l=k.firstContext;null!==l;){if(l.context===d&&0!==(l.observedBits&f)){1===h.tag&&(l=rg(c,null),l.tag=2,tg(h,l));h.expirationTime<c&&(h.expirationTime=
|
|
c);l=h.alternate;null!==l&&l.expirationTime<c&&(l.expirationTime=c);kg(h.return,c);k.expirationTime<c&&(k.expirationTime=c);break}l=l.next}}else g=10===h.tag?h.type===b.type?null:h.child:h.child;if(null!==g)g.return=h;else for(g=h;null!==g;){if(g===b){g=null;break}h=g.sibling;if(null!==h){h.return=g.return;g=h;break}g=g.return}h=g}}R(a,b,e.children,c);b=b.child}return b;case 9:return e=b.type,f=b.pendingProps,d=f.children,lg(b,c),e=ng(e,f.unstable_observedBits),d=d(e),b.effectTag|=1,R(a,b,d,c),b.child;
|
|
case 14:return e=b.type,f=cg(e,b.pendingProps),f=cg(e.type,f),ai(a,b,e,f,d,c);case 15:return ci(a,b,b.type,b.pendingProps,d,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:cg(d,e),null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=E),b.tag=1,N(d)?(a=!0,Bf(b)):a=!1,lg(b,c),Kg(b,d,e,c),Mg(b,d,e,c),gi(null,b,d,!0,a,c);case 19:return li(a,b,c)}throw t(Error(156),b.tag);};var Yj=null,Gi=null;
|
|
function dk(a){if("undefined"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var b=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(b.isDisabled||!b.supportsFiber)return!0;try{var c=b.inject(a);Yj=function(a){try{b.onCommitFiberRoot(c,a,void 0,64===(a.current.effectTag&64))}catch(e){}};Gi=function(a){try{b.onCommitFiberUnmount(c,a)}catch(e){}}}catch(d){}return!0}
|
|
function ek(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=b;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.effectTag=D;this.lastEffect=this.firstEffect=this.nextEffect=null;this.childExpirationTime=this.expirationTime=0;this.alternate=null}function Sh(a,b,c,d){return new ek(a,b,c,d)}
|
|
function bi(a){a=a.prototype;return!(!a||!a.isReactComponent)}function ck(a){if("function"===typeof a)return bi(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===Na)return 11;if(a===Qa)return 14}return 2}
|
|
function Rg(a,b){var c=a.alternate;null===c?(c=Sh(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.effectTag=D,c.nextEffect=null,c.firstEffect=null,c.lastEffect=null);c.childExpirationTime=a.childExpirationTime;c.expirationTime=a.expirationTime;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;b=a.dependencies;c.dependencies=null===b?null:{expirationTime:b.expirationTime,
|
|
firstContext:b.firstContext,responders:b.responders};c.sibling=a.sibling;c.index=a.index;c.ref=a.ref;return c}
|
|
function Tg(a,b,c,d,e,f){var g=2;d=a;if("function"===typeof a)bi(a)&&(g=1);else if("string"===typeof a)g=5;else a:switch(a){case Ha:return Vg(c.children,e,f,b);case Ma:g=8;e|=7;break;case Ia:g=8;e|=1;break;case Ja:return a=Sh(12,c,b,e|8),a.elementType=Ja,a.type=Ja,a.expirationTime=f,a;case Oa:return a=Sh(13,c,b,e),a.type=Oa,a.elementType=Oa,a.expirationTime=f,a;case Pa:return a=Sh(19,c,b,e),a.elementType=Pa,a.expirationTime=f,a;default:if("object"===typeof a&&null!==a)switch(a.$$typeof){case Ka:g=
|
|
10;break a;case La:g=9;break a;case Na:g=11;break a;case Qa:g=14;break a;case Ra:g=16;d=null;break a}throw t(Error(130),null==a?a:typeof a,"");}b=Sh(g,c,b,e);b.elementType=a;b.type=d;b.expirationTime=f;return b}function Vg(a,b,c,d){a=Sh(7,a,d,b);a.expirationTime=c;return a}function Sg(a,b,c){a=Sh(6,a,null,b);a.expirationTime=c;return a}
|
|
function Ug(a,b,c){b=Sh(4,null!==a.children?a.children:[],a.key,b);b.expirationTime=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}
|
|
function fk(a,b,c){this.tag=b;this.current=null;this.containerInfo=a;this.pingCache=this.pendingChildren=null;this.finishedExpirationTime=0;this.finishedWork=null;this.timeoutHandle=-1;this.pendingContext=this.context=null;this.hydrate=c;this.callbackNode=this.firstBatch=null;this.callbackPriority=90;this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=0}
|
|
function Bj(a,b){var c=a.firstSuspendedTime;a=a.lastSuspendedTime;return 0!==c&&c>=b&&a<=b}function yj(a,b){var c=a.firstSuspendedTime,d=a.lastSuspendedTime;c<b&&(a.firstSuspendedTime=b);if(d>b||0===c)a.lastSuspendedTime=b;b<=a.lastPingedTime&&(a.lastPingedTime=0);b<=a.lastExpiredTime&&(a.lastExpiredTime=0)}
|
|
function zj(a,b){b>a.firstPendingTime&&(a.firstPendingTime=b);var c=a.firstSuspendedTime;0!==c&&(b>=c?a.firstSuspendedTime=a.lastSuspendedTime=a.nextKnownPendingLevel=0:b>=a.lastSuspendedTime&&(a.lastSuspendedTime=b+1),b>a.nextKnownPendingLevel&&(a.nextKnownPendingLevel=b))}function Dj(a,b){var c=a.lastExpiredTime;if(0===c||c>b)a.lastExpiredTime=b}
|
|
function gk(a,b,c,d,e,f){var g=b.current;a:if(c){c=c._reactInternalFiber;b:{if(Bc(c)!==c||1!==c.tag)throw t(Error(170));var h=c;do{switch(h.tag){case 3:h=h.stateNode.context;break b;case 1:if(N(h.type)){h=h.stateNode.__reactInternalMemoizedMergedChildContext;break b}}h=h.return}while(null!==h);throw t(Error(171));}if(1===c.tag){var k=c.type;if(N(k)){c=Af(c,k,h);break a}}c=h}else c=tf;null===b.context?b.context=c:b.pendingContext=c;b=f;e=rg(d,e);e.payload={element:a};b=void 0===b?null:b;null!==b&&
|
|
(e.callback=b);tg(g,e);Hg(g,d);return d}function hk(a,b,c,d){var e=b.current,f=Fg(),g=Cg.suspense;e=Gg(f,e,g);return gk(a,b,c,e,g,d)}function ik(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}function jk(a,b,c){var d=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:Ga,key:null==d?null:""+d,children:a,containerInfo:b,implementation:c}}
|
|
Ya=function(a,b,c){switch(b){case "input":Db(a,c);b=c.name;if("radio"===c.type&&null!=b){for(c=a;c.parentNode;)c=c.parentNode;c=c.querySelectorAll("input[name="+JSON.stringify(""+b)+'][type="radio"]');for(b=0;b<c.length;b++){var d=c[b];if(d!==a&&d.form===a.form){var e=re(d);if(!e)throw t(Error(90));zb(d);Db(d,e)}}}break;case "textarea":Mb(a,c);break;case "select":b=c.value,null!=b&&Jb(a,!!c.multiple,b,!1)}};
|
|
function kk(a){var b=1073741821-25*(((1073741821-Fg()+500)/25|0)+1);b<=vj&&--b;this._expirationTime=vj=b;this._root=a;this._callbacks=this._next=null;this._hasChildren=this._didComplete=!1;this._children=null;this._defer=!0}kk.prototype.render=function(a){if(!this._defer)throw t(Error(250));this._hasChildren=!0;this._children=a;var b=this._root._internalRoot,c=this._expirationTime,d=new lk;gk(a,b,null,c,null,d._onCommit);return d};
|
|
kk.prototype.then=function(a){if(this._didComplete)a();else{var b=this._callbacks;null===b&&(b=this._callbacks=[]);b.push(a)}};
|
|
kk.prototype.commit=function(){var a=this._root._internalRoot,b=a.firstBatch;if(!this._defer||null===b)throw t(Error(251));if(this._hasChildren){var c=this._expirationTime;if(b!==this){this._hasChildren&&(c=this._expirationTime=b._expirationTime,this.render(this._children));for(var d=null,e=b;e!==this;)d=e,e=e._next;if(null===d)throw t(Error(251));d._next=e._next;this._next=b;a.firstBatch=this}this._defer=!1;b=c;if((T&(Zi|$i))!==S)throw t(Error(253));Dj(a,b);Z(a);bg();b=this._next;this._next=null;
|
|
b=a.firstBatch=b;null!==b&&b._hasChildren&&b.render(b._children)}else this._next=null,this._defer=!1};kk.prototype._onComplete=function(){if(!this._didComplete){this._didComplete=!0;var a=this._callbacks;if(null!==a)for(var b=0;b<a.length;b++)(0,a[b])()}};function lk(){this._callbacks=null;this._didCommit=!1;this._onCommit=this._onCommit.bind(this)}lk.prototype.then=function(a){if(this._didCommit)a();else{var b=this._callbacks;null===b&&(b=this._callbacks=[]);b.push(a)}};
|
|
lk.prototype._onCommit=function(){if(!this._didCommit){this._didCommit=!0;var a=this._callbacks;if(null!==a)for(var b=0;b<a.length;b++){var c=a[b];if("function"!==typeof c)throw t(Error(191),c);c()}}};function mk(a,b,c){c=null!=c&&!0===c.hydrate;var d=new fk(a,b,c),e=Sh(3,null,null,2===b?7:1===b?3:0);d.current=e;e.stateNode=d;a[oe]=d.current;c&&0!==b&&nc(9===a.nodeType?a:a.ownerDocument);return d}function nk(a,b,c){this._internalRoot=mk(a,b,c)}function ok(a,b){this._internalRoot=mk(a,2,b)}
|
|
ok.prototype.render=nk.prototype.render=function(a,b){var c=this._internalRoot,d=new lk;b=void 0===b?null:b;null!==b&&d.then(b);hk(a,c,null,d._onCommit);return d};ok.prototype.unmount=nk.prototype.unmount=function(a){var b=this._internalRoot,c=new lk;a=void 0===a?null:a;null!==a&&c.then(a);hk(null,b,null,c._onCommit);return c};
|
|
ok.prototype.createBatch=function(){var a=new kk(this),b=a._expirationTime,c=this._internalRoot,d=c.firstBatch;if(null===d)c.firstBatch=a,a._next=null;else{for(c=null;null!==d&&d._expirationTime>=b;)c=d,d=d._next;a._next=d;null!==c&&(c._next=a)}return a};function qk(a){return!(!a||1!==a.nodeType&&9!==a.nodeType&&11!==a.nodeType&&(8!==a.nodeType||" react-mount-point-unstable "!==a.nodeValue))}db=Pj;eb=Qj;fb=Nj;gb=function(a,b){var c=T;T|=2;try{return a(b)}finally{T=c,T===S&&bg()}};
|
|
function rk(a,b){b||(b=a?9===a.nodeType?a.documentElement:a.firstChild:null,b=!(!b||1!==b.nodeType||!b.hasAttribute("data-reactroot")));if(!b)for(var c;c=a.lastChild;)a.removeChild(c);return new nk(a,0,b?{hydrate:!0}:void 0)}
|
|
function sk(a,b,c,d,e){var f=c._reactRootContainer;if(f){var g=f._internalRoot;if("function"===typeof e){var h=e;e=function(){var a=ik(g);h.call(a)}}hk(b,g,a,e)}else{f=c._reactRootContainer=rk(c,d);g=f._internalRoot;if("function"===typeof e){var k=e;e=function(){var a=ik(g);k.call(a)}}Rj(function(){hk(b,g,a,e)})}return ik(g)}function tk(a,b){var c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!qk(b))throw t(Error(200));return jk(a,b,null,c)}
|
|
var wk={createPortal:tk,findDOMNode:function(a){if(null==a)a=null;else if(1!==a.nodeType){var b=a._reactInternalFiber;if(void 0===b){if("function"===typeof a.render)throw t(Error(188));throw t(Error(268),Object.keys(a));}a=Ec(b);a=null===a?null:a.stateNode}return a},hydrate:function(a,b,c){if(!qk(b))throw t(Error(200));return sk(null,a,b,!0,c)},render:function(a,b,c){if(!qk(b))throw t(Error(200));return sk(null,a,b,!1,c)},unstable_renderSubtreeIntoContainer:function(a,b,c,d){if(!qk(c))throw t(Error(200));
|
|
if(null==a||void 0===a._reactInternalFiber)throw t(Error(38));return sk(a,b,c,!1,d)},unmountComponentAtNode:function(a){if(!qk(a))throw t(Error(40));return a._reactRootContainer?(Rj(function(){sk(null,null,a,!1,function(){a._reactRootContainer=null})}),!0):!1},unstable_createPortal:function(){return tk.apply(void 0,arguments)},unstable_batchedUpdates:Pj,unstable_interactiveUpdates:function(a,b,c,d){Nj();return Qj(a,b,c,d)},unstable_discreteUpdates:Qj,unstable_flushDiscreteUpdates:Nj,flushSync:function(a,
|
|
b){if((T&(Zi|$i))!==S)throw t(Error(187));var c=T;T|=1;try{return Yf(99,a.bind(null,b))}finally{T=c,bg()}},unstable_createRoot:uk,unstable_createSyncRoot:vk,unstable_flushControlled:function(a){var b=T;T|=1;try{Yf(99,a)}finally{T=b,T===S&&bg()}},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{Events:[pe,qe,re,Ba.injectEventPluginsByName,fa,Lc,function(a){xa(a,Kc)},bb,cb,Hd,Aa,Ej,{current:!1}]}};function uk(a,b){if(!qk(a))throw t(Error(299),"unstable_createRoot");return new ok(a,b)}
|
|
function vk(a,b){if(!qk(a))throw t(Error(299),"unstable_createRoot");return new nk(a,1,b)}
|
|
(function(a){var b=a.findFiberByHostInstance;return dk(n({},a,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Da.ReactCurrentDispatcher,findHostInstanceByFiber:function(a){a=Ec(a);return null===a?null:a.stateNode},findFiberByHostInstance:function(a){return b?b(a):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null}))})({findFiberByHostInstance:Cd,bundleType:0,version:"16.10.2",
|
|
rendererPackageName:"react-dom"});var xk={default:wk},yk=xk&&wk||xk;module.exports=yk.default||yk;
|
|
|
|
|
|
/***/ }),
|
|
/* 501 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
if (true) {
|
|
module.exports = __webpack_require__(502);
|
|
} else {}
|
|
|
|
|
|
/***/ }),
|
|
/* 502 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
/** @license React v0.16.2
|
|
* scheduler.production.min.js
|
|
*
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
Object.defineProperty(exports,"__esModule",{value:!0});var f,g,h,k,l;
|
|
if("undefined"===typeof window||"function"!==typeof MessageChannel){var p=null,q=null,t=function(){if(null!==p)try{var a=exports.unstable_now();p(!0,a);p=null}catch(b){throw setTimeout(t,0),b;}},u=Date.now();exports.unstable_now=function(){return Date.now()-u};f=function(a){null!==p?setTimeout(f,0,a):(p=a,setTimeout(t,0))};g=function(a,b){q=setTimeout(a,b)};h=function(){clearTimeout(q)};k=function(){return!1};l=exports.unstable_forceFrameRate=function(){}}else{var w=window.performance,x=window.Date,
|
|
y=window.setTimeout,z=window.clearTimeout,A=window.requestAnimationFrame,B=window.cancelAnimationFrame;"undefined"!==typeof console&&("function"!==typeof A&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!==typeof B&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"));if("object"===typeof w&&
|
|
"function"===typeof w.now)exports.unstable_now=function(){return w.now()};else{var C=x.now();exports.unstable_now=function(){return x.now()-C}}var D=!1,E=null,F=-1,G=5,H=0;k=function(){return exports.unstable_now()>=H};l=function(){};exports.unstable_forceFrameRate=function(a){0>a||125<a?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):G=0<a?Math.floor(1E3/a):33.33};var I=new MessageChannel,J=I.port2;I.port1.onmessage=
|
|
function(){if(null!==E){var a=exports.unstable_now();H=a+G;try{E(!0,a)?J.postMessage(null):(D=!1,E=null)}catch(b){throw J.postMessage(null),b;}}else D=!1};f=function(a){E=a;D||(D=!0,J.postMessage(null))};g=function(a,b){F=y(function(){a(exports.unstable_now())},b)};h=function(){z(F);F=-1}}function K(a,b){var c=a.length;a.push(b);a:for(;;){var d=Math.floor((c-1)/2),e=a[d];if(void 0!==e&&0<L(e,b))a[d]=b,a[c]=e,c=d;else break a}}function M(a){a=a[0];return void 0===a?null:a}
|
|
function N(a){var b=a[0];if(void 0!==b){var c=a.pop();if(c!==b){a[0]=c;a:for(var d=0,e=a.length;d<e;){var m=2*(d+1)-1,n=a[m],v=m+1,r=a[v];if(void 0!==n&&0>L(n,c))void 0!==r&&0>L(r,n)?(a[d]=r,a[v]=c,d=v):(a[d]=n,a[m]=c,d=m);else if(void 0!==r&&0>L(r,c))a[d]=r,a[v]=c,d=v;else break a}}return b}return null}function L(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}var O=[],P=[],Q=1,R=null,S=3,T=!1,U=!1,V=!1;
|
|
function W(a){for(var b=M(P);null!==b;){if(null===b.callback)N(P);else if(b.startTime<=a)N(P),b.sortIndex=b.expirationTime,K(O,b);else break;b=M(P)}}function X(a){V=!1;W(a);if(!U)if(null!==M(O))U=!0,f(Y);else{var b=M(P);null!==b&&g(X,b.startTime-a)}}
|
|
function Y(a,b){U=!1;V&&(V=!1,h());T=!0;var c=S;try{W(b);for(R=M(O);null!==R&&(!(R.expirationTime>b)||a&&!k());){var d=R.callback;if(null!==d){R.callback=null;S=R.priorityLevel;var e=d(R.expirationTime<=b);b=exports.unstable_now();"function"===typeof e?R.callback=e:R===M(O)&&N(O);W(b)}else N(O);R=M(O)}if(null!==R)var m=!0;else{var n=M(P);null!==n&&g(X,n.startTime-b);m=!1}return m}finally{R=null,S=c,T=!1}}
|
|
function Z(a){switch(a){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1E4;default:return 5E3}}var aa=l;exports.unstable_ImmediatePriority=1;exports.unstable_UserBlockingPriority=2;exports.unstable_NormalPriority=3;exports.unstable_IdlePriority=5;exports.unstable_LowPriority=4;exports.unstable_runWithPriority=function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var c=S;S=a;try{return b()}finally{S=c}};
|
|
exports.unstable_next=function(a){switch(S){case 1:case 2:case 3:var b=3;break;default:b=S}var c=S;S=b;try{return a()}finally{S=c}};
|
|
exports.unstable_scheduleCallback=function(a,b,c){var d=exports.unstable_now();if("object"===typeof c&&null!==c){var e=c.delay;e="number"===typeof e&&0<e?d+e:d;c="number"===typeof c.timeout?c.timeout:Z(a)}else c=Z(a),e=d;c=e+c;a={id:Q++,callback:b,priorityLevel:a,startTime:e,expirationTime:c,sortIndex:-1};e>d?(a.sortIndex=e,K(P,a),null===M(O)&&a===M(P)&&(V?h():V=!0,g(X,e-d))):(a.sortIndex=c,K(O,a),U||T||(U=!0,f(Y)));return a};exports.unstable_cancelCallback=function(a){a.callback=null};
|
|
exports.unstable_wrapCallback=function(a){var b=S;return function(){var c=S;S=b;try{return a.apply(this,arguments)}finally{S=c}}};exports.unstable_getCurrentPriorityLevel=function(){return S};exports.unstable_shouldYield=function(){var a=exports.unstable_now();W(a);var b=M(O);return b!==R&&null!==R&&null!==b&&null!==b.callback&&b.startTime<=a&&b.expirationTime<R.expirationTime||k()};exports.unstable_requestPaint=aa;exports.unstable_continueExecution=function(){U||T||(U=!0,f(Y))};
|
|
exports.unstable_pauseExecution=function(){};exports.unstable_getFirstCallbackNode=function(){return M(O)};exports.unstable_Profiling=null;
|
|
|
|
|
|
/***/ }),
|
|
/* 503 */
|
|
/***/ (function(module, exports) {
|
|
|
|
function _setPrototypeOf(o, p) {
|
|
module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
o.__proto__ = p;
|
|
return o;
|
|
};
|
|
|
|
return _setPrototypeOf(o, p);
|
|
}
|
|
|
|
module.exports = _setPrototypeOf;
|
|
|
|
/***/ }),
|
|
/* 504 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var apply = __webpack_require__(231),
|
|
castPath = __webpack_require__(94),
|
|
last = __webpack_require__(531),
|
|
parent = __webpack_require__(532),
|
|
toKey = __webpack_require__(84);
|
|
|
|
/**
|
|
* The base implementation of `_.invoke` without support for individual
|
|
* method arguments.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to query.
|
|
* @param {Array|string} path The path of the method to invoke.
|
|
* @param {Array} args The arguments to invoke the method with.
|
|
* @returns {*} Returns the result of the invoked method.
|
|
*/
|
|
function baseInvoke(object, path, args) {
|
|
path = castPath(path, object);
|
|
object = parent(object, path);
|
|
var func = object == null ? object : object[toKey(last(path))];
|
|
return func == null ? undefined : apply(func, object, args);
|
|
}
|
|
|
|
module.exports = baseInvoke;
|
|
|
|
|
|
/***/ }),
|
|
/* 505 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var Symbol = __webpack_require__(95);
|
|
|
|
/** Used for built-in method references. */
|
|
var objectProto = Object.prototype;
|
|
|
|
/** Used to check objects for own properties. */
|
|
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
|
|
/**
|
|
* Used to resolve the
|
|
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
* of values.
|
|
*/
|
|
var nativeObjectToString = objectProto.toString;
|
|
|
|
/** Built-in value references. */
|
|
var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
|
|
|
|
/**
|
|
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to query.
|
|
* @returns {string} Returns the raw `toStringTag`.
|
|
*/
|
|
function getRawTag(value) {
|
|
var isOwn = hasOwnProperty.call(value, symToStringTag),
|
|
tag = value[symToStringTag];
|
|
|
|
try {
|
|
value[symToStringTag] = undefined;
|
|
var unmasked = true;
|
|
} catch (e) {}
|
|
|
|
var result = nativeObjectToString.call(value);
|
|
if (unmasked) {
|
|
if (isOwn) {
|
|
value[symToStringTag] = tag;
|
|
} else {
|
|
delete value[symToStringTag];
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
module.exports = getRawTag;
|
|
|
|
|
|
/***/ }),
|
|
/* 506 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/** Used for built-in method references. */
|
|
var objectProto = Object.prototype;
|
|
|
|
/**
|
|
* Used to resolve the
|
|
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
* of values.
|
|
*/
|
|
var nativeObjectToString = objectProto.toString;
|
|
|
|
/**
|
|
* Converts `value` to a string using `Object.prototype.toString`.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to convert.
|
|
* @returns {string} Returns the converted string.
|
|
*/
|
|
function objectToString(value) {
|
|
return nativeObjectToString.call(value);
|
|
}
|
|
|
|
module.exports = objectToString;
|
|
|
|
|
|
/***/ }),
|
|
/* 507 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var memoizeCapped = __webpack_require__(508);
|
|
|
|
/** Used to match property names within property paths. */
|
|
var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
|
|
|
|
/** Used to match backslashes in property paths. */
|
|
var reEscapeChar = /\\(\\)?/g;
|
|
|
|
/**
|
|
* Converts `string` to a property path array.
|
|
*
|
|
* @private
|
|
* @param {string} string The string to convert.
|
|
* @returns {Array} Returns the property path array.
|
|
*/
|
|
var stringToPath = memoizeCapped(function(string) {
|
|
var result = [];
|
|
if (string.charCodeAt(0) === 46 /* . */) {
|
|
result.push('');
|
|
}
|
|
string.replace(rePropName, function(match, number, quote, subString) {
|
|
result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
|
|
});
|
|
return result;
|
|
});
|
|
|
|
module.exports = stringToPath;
|
|
|
|
|
|
/***/ }),
|
|
/* 508 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var memoize = __webpack_require__(509);
|
|
|
|
/** Used as the maximum memoize cache size. */
|
|
var MAX_MEMOIZE_SIZE = 500;
|
|
|
|
/**
|
|
* A specialized version of `_.memoize` which clears the memoized function's
|
|
* cache when it exceeds `MAX_MEMOIZE_SIZE`.
|
|
*
|
|
* @private
|
|
* @param {Function} func The function to have its output memoized.
|
|
* @returns {Function} Returns the new memoized function.
|
|
*/
|
|
function memoizeCapped(func) {
|
|
var result = memoize(func, function(key) {
|
|
if (cache.size === MAX_MEMOIZE_SIZE) {
|
|
cache.clear();
|
|
}
|
|
return key;
|
|
});
|
|
|
|
var cache = result.cache;
|
|
return result;
|
|
}
|
|
|
|
module.exports = memoizeCapped;
|
|
|
|
|
|
/***/ }),
|
|
/* 509 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var MapCache = __webpack_require__(167);
|
|
|
|
/** Error message constants. */
|
|
var FUNC_ERROR_TEXT = 'Expected a function';
|
|
|
|
/**
|
|
* Creates a function that memoizes the result of `func`. If `resolver` is
|
|
* provided, it determines the cache key for storing the result based on the
|
|
* arguments provided to the memoized function. By default, the first argument
|
|
* provided to the memoized function is used as the map cache key. The `func`
|
|
* is invoked with the `this` binding of the memoized function.
|
|
*
|
|
* **Note:** The cache is exposed as the `cache` property on the memoized
|
|
* function. Its creation may be customized by replacing the `_.memoize.Cache`
|
|
* constructor with one whose instances implement the
|
|
* [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
|
|
* method interface of `clear`, `delete`, `get`, `has`, and `set`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Function
|
|
* @param {Function} func The function to have its output memoized.
|
|
* @param {Function} [resolver] The function to resolve the cache key.
|
|
* @returns {Function} Returns the new memoized function.
|
|
* @example
|
|
*
|
|
* var object = { 'a': 1, 'b': 2 };
|
|
* var other = { 'c': 3, 'd': 4 };
|
|
*
|
|
* var values = _.memoize(_.values);
|
|
* values(object);
|
|
* // => [1, 2]
|
|
*
|
|
* values(other);
|
|
* // => [3, 4]
|
|
*
|
|
* object.a = 2;
|
|
* values(object);
|
|
* // => [1, 2]
|
|
*
|
|
* // Modify the result cache.
|
|
* values.cache.set(object, ['a', 'b']);
|
|
* values(object);
|
|
* // => ['a', 'b']
|
|
*
|
|
* // Replace `_.memoize.Cache`.
|
|
* _.memoize.Cache = WeakMap;
|
|
*/
|
|
function memoize(func, resolver) {
|
|
if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
|
|
throw new TypeError(FUNC_ERROR_TEXT);
|
|
}
|
|
var memoized = function() {
|
|
var args = arguments,
|
|
key = resolver ? resolver.apply(this, args) : args[0],
|
|
cache = memoized.cache;
|
|
|
|
if (cache.has(key)) {
|
|
return cache.get(key);
|
|
}
|
|
var result = func.apply(this, args);
|
|
memoized.cache = cache.set(key, result) || cache;
|
|
return result;
|
|
};
|
|
memoized.cache = new (memoize.Cache || MapCache);
|
|
return memoized;
|
|
}
|
|
|
|
// Expose `MapCache`.
|
|
memoize.Cache = MapCache;
|
|
|
|
module.exports = memoize;
|
|
|
|
|
|
/***/ }),
|
|
/* 510 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var Hash = __webpack_require__(511),
|
|
ListCache = __webpack_require__(115),
|
|
Map = __webpack_require__(168);
|
|
|
|
/**
|
|
* Removes all key-value entries from the map.
|
|
*
|
|
* @private
|
|
* @name clear
|
|
* @memberOf MapCache
|
|
*/
|
|
function mapCacheClear() {
|
|
this.size = 0;
|
|
this.__data__ = {
|
|
'hash': new Hash,
|
|
'map': new (Map || ListCache),
|
|
'string': new Hash
|
|
};
|
|
}
|
|
|
|
module.exports = mapCacheClear;
|
|
|
|
|
|
/***/ }),
|
|
/* 511 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var hashClear = __webpack_require__(512),
|
|
hashDelete = __webpack_require__(517),
|
|
hashGet = __webpack_require__(518),
|
|
hashHas = __webpack_require__(519),
|
|
hashSet = __webpack_require__(520);
|
|
|
|
/**
|
|
* Creates a hash object.
|
|
*
|
|
* @private
|
|
* @constructor
|
|
* @param {Array} [entries] The key-value pairs to cache.
|
|
*/
|
|
function Hash(entries) {
|
|
var index = -1,
|
|
length = entries == null ? 0 : entries.length;
|
|
|
|
this.clear();
|
|
while (++index < length) {
|
|
var entry = entries[index];
|
|
this.set(entry[0], entry[1]);
|
|
}
|
|
}
|
|
|
|
// Add methods to `Hash`.
|
|
Hash.prototype.clear = hashClear;
|
|
Hash.prototype['delete'] = hashDelete;
|
|
Hash.prototype.get = hashGet;
|
|
Hash.prototype.has = hashHas;
|
|
Hash.prototype.set = hashSet;
|
|
|
|
module.exports = Hash;
|
|
|
|
|
|
/***/ }),
|
|
/* 512 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var nativeCreate = __webpack_require__(114);
|
|
|
|
/**
|
|
* Removes all key-value entries from the hash.
|
|
*
|
|
* @private
|
|
* @name clear
|
|
* @memberOf Hash
|
|
*/
|
|
function hashClear() {
|
|
this.__data__ = nativeCreate ? nativeCreate(null) : {};
|
|
this.size = 0;
|
|
}
|
|
|
|
module.exports = hashClear;
|
|
|
|
|
|
/***/ }),
|
|
/* 513 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var isFunction = __webpack_require__(74),
|
|
isMasked = __webpack_require__(514),
|
|
isObject = __webpack_require__(81),
|
|
toSource = __webpack_require__(233);
|
|
|
|
/**
|
|
* Used to match `RegExp`
|
|
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
|
*/
|
|
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
|
|
/** Used to detect host constructors (Safari). */
|
|
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
|
|
/** Used for built-in method references. */
|
|
var funcProto = Function.prototype,
|
|
objectProto = Object.prototype;
|
|
|
|
/** Used to resolve the decompiled source of functions. */
|
|
var funcToString = funcProto.toString;
|
|
|
|
/** Used to check objects for own properties. */
|
|
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
|
|
/** Used to detect if a method is native. */
|
|
var reIsNative = RegExp('^' +
|
|
funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
|
|
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
|
);
|
|
|
|
/**
|
|
* The base implementation of `_.isNative` without bad shim checks.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a native function,
|
|
* else `false`.
|
|
*/
|
|
function baseIsNative(value) {
|
|
if (!isObject(value) || isMasked(value)) {
|
|
return false;
|
|
}
|
|
var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
|
|
return pattern.test(toSource(value));
|
|
}
|
|
|
|
module.exports = baseIsNative;
|
|
|
|
|
|
/***/ }),
|
|
/* 514 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var coreJsData = __webpack_require__(515);
|
|
|
|
/** Used to detect methods masquerading as native. */
|
|
var maskSrcKey = (function() {
|
|
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
|
|
return uid ? ('Symbol(src)_1.' + uid) : '';
|
|
}());
|
|
|
|
/**
|
|
* Checks if `func` has its source masked.
|
|
*
|
|
* @private
|
|
* @param {Function} func The function to check.
|
|
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
|
|
*/
|
|
function isMasked(func) {
|
|
return !!maskSrcKey && (maskSrcKey in func);
|
|
}
|
|
|
|
module.exports = isMasked;
|
|
|
|
|
|
/***/ }),
|
|
/* 515 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var root = __webpack_require__(51);
|
|
|
|
/** Used to detect overreaching core-js shims. */
|
|
var coreJsData = root['__core-js_shared__'];
|
|
|
|
module.exports = coreJsData;
|
|
|
|
|
|
/***/ }),
|
|
/* 516 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* Gets the value at `key` of `object`.
|
|
*
|
|
* @private
|
|
* @param {Object} [object] The object to query.
|
|
* @param {string} key The key of the property to get.
|
|
* @returns {*} Returns the property value.
|
|
*/
|
|
function getValue(object, key) {
|
|
return object == null ? undefined : object[key];
|
|
}
|
|
|
|
module.exports = getValue;
|
|
|
|
|
|
/***/ }),
|
|
/* 517 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* Removes `key` and its value from the hash.
|
|
*
|
|
* @private
|
|
* @name delete
|
|
* @memberOf Hash
|
|
* @param {Object} hash The hash to modify.
|
|
* @param {string} key The key of the value to remove.
|
|
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
*/
|
|
function hashDelete(key) {
|
|
var result = this.has(key) && delete this.__data__[key];
|
|
this.size -= result ? 1 : 0;
|
|
return result;
|
|
}
|
|
|
|
module.exports = hashDelete;
|
|
|
|
|
|
/***/ }),
|
|
/* 518 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var nativeCreate = __webpack_require__(114);
|
|
|
|
/** Used to stand-in for `undefined` hash values. */
|
|
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
|
|
|
/** Used for built-in method references. */
|
|
var objectProto = Object.prototype;
|
|
|
|
/** Used to check objects for own properties. */
|
|
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
|
|
/**
|
|
* Gets the hash value for `key`.
|
|
*
|
|
* @private
|
|
* @name get
|
|
* @memberOf Hash
|
|
* @param {string} key The key of the value to get.
|
|
* @returns {*} Returns the entry value.
|
|
*/
|
|
function hashGet(key) {
|
|
var data = this.__data__;
|
|
if (nativeCreate) {
|
|
var result = data[key];
|
|
return result === HASH_UNDEFINED ? undefined : result;
|
|
}
|
|
return hasOwnProperty.call(data, key) ? data[key] : undefined;
|
|
}
|
|
|
|
module.exports = hashGet;
|
|
|
|
|
|
/***/ }),
|
|
/* 519 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var nativeCreate = __webpack_require__(114);
|
|
|
|
/** Used for built-in method references. */
|
|
var objectProto = Object.prototype;
|
|
|
|
/** Used to check objects for own properties. */
|
|
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
|
|
/**
|
|
* Checks if a hash value for `key` exists.
|
|
*
|
|
* @private
|
|
* @name has
|
|
* @memberOf Hash
|
|
* @param {string} key The key of the entry to check.
|
|
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
*/
|
|
function hashHas(key) {
|
|
var data = this.__data__;
|
|
return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
|
|
}
|
|
|
|
module.exports = hashHas;
|
|
|
|
|
|
/***/ }),
|
|
/* 520 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var nativeCreate = __webpack_require__(114);
|
|
|
|
/** Used to stand-in for `undefined` hash values. */
|
|
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
|
|
|
/**
|
|
* Sets the hash `key` to `value`.
|
|
*
|
|
* @private
|
|
* @name set
|
|
* @memberOf Hash
|
|
* @param {string} key The key of the value to set.
|
|
* @param {*} value The value to set.
|
|
* @returns {Object} Returns the hash instance.
|
|
*/
|
|
function hashSet(key, value) {
|
|
var data = this.__data__;
|
|
this.size += this.has(key) ? 0 : 1;
|
|
data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
|
|
return this;
|
|
}
|
|
|
|
module.exports = hashSet;
|
|
|
|
|
|
/***/ }),
|
|
/* 521 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* Removes all key-value entries from the list cache.
|
|
*
|
|
* @private
|
|
* @name clear
|
|
* @memberOf ListCache
|
|
*/
|
|
function listCacheClear() {
|
|
this.__data__ = [];
|
|
this.size = 0;
|
|
}
|
|
|
|
module.exports = listCacheClear;
|
|
|
|
|
|
/***/ }),
|
|
/* 522 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var assocIndexOf = __webpack_require__(116);
|
|
|
|
/** Used for built-in method references. */
|
|
var arrayProto = Array.prototype;
|
|
|
|
/** Built-in value references. */
|
|
var splice = arrayProto.splice;
|
|
|
|
/**
|
|
* Removes `key` and its value from the list cache.
|
|
*
|
|
* @private
|
|
* @name delete
|
|
* @memberOf ListCache
|
|
* @param {string} key The key of the value to remove.
|
|
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
*/
|
|
function listCacheDelete(key) {
|
|
var data = this.__data__,
|
|
index = assocIndexOf(data, key);
|
|
|
|
if (index < 0) {
|
|
return false;
|
|
}
|
|
var lastIndex = data.length - 1;
|
|
if (index == lastIndex) {
|
|
data.pop();
|
|
} else {
|
|
splice.call(data, index, 1);
|
|
}
|
|
--this.size;
|
|
return true;
|
|
}
|
|
|
|
module.exports = listCacheDelete;
|
|
|
|
|
|
/***/ }),
|
|
/* 523 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var assocIndexOf = __webpack_require__(116);
|
|
|
|
/**
|
|
* Gets the list cache value for `key`.
|
|
*
|
|
* @private
|
|
* @name get
|
|
* @memberOf ListCache
|
|
* @param {string} key The key of the value to get.
|
|
* @returns {*} Returns the entry value.
|
|
*/
|
|
function listCacheGet(key) {
|
|
var data = this.__data__,
|
|
index = assocIndexOf(data, key);
|
|
|
|
return index < 0 ? undefined : data[index][1];
|
|
}
|
|
|
|
module.exports = listCacheGet;
|
|
|
|
|
|
/***/ }),
|
|
/* 524 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var assocIndexOf = __webpack_require__(116);
|
|
|
|
/**
|
|
* Checks if a list cache value for `key` exists.
|
|
*
|
|
* @private
|
|
* @name has
|
|
* @memberOf ListCache
|
|
* @param {string} key The key of the entry to check.
|
|
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
*/
|
|
function listCacheHas(key) {
|
|
return assocIndexOf(this.__data__, key) > -1;
|
|
}
|
|
|
|
module.exports = listCacheHas;
|
|
|
|
|
|
/***/ }),
|
|
/* 525 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var assocIndexOf = __webpack_require__(116);
|
|
|
|
/**
|
|
* Sets the list cache `key` to `value`.
|
|
*
|
|
* @private
|
|
* @name set
|
|
* @memberOf ListCache
|
|
* @param {string} key The key of the value to set.
|
|
* @param {*} value The value to set.
|
|
* @returns {Object} Returns the list cache instance.
|
|
*/
|
|
function listCacheSet(key, value) {
|
|
var data = this.__data__,
|
|
index = assocIndexOf(data, key);
|
|
|
|
if (index < 0) {
|
|
++this.size;
|
|
data.push([key, value]);
|
|
} else {
|
|
data[index][1] = value;
|
|
}
|
|
return this;
|
|
}
|
|
|
|
module.exports = listCacheSet;
|
|
|
|
|
|
/***/ }),
|
|
/* 526 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var getMapData = __webpack_require__(118);
|
|
|
|
/**
|
|
* Removes `key` and its value from the map.
|
|
*
|
|
* @private
|
|
* @name delete
|
|
* @memberOf MapCache
|
|
* @param {string} key The key of the value to remove.
|
|
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
*/
|
|
function mapCacheDelete(key) {
|
|
var result = getMapData(this, key)['delete'](key);
|
|
this.size -= result ? 1 : 0;
|
|
return result;
|
|
}
|
|
|
|
module.exports = mapCacheDelete;
|
|
|
|
|
|
/***/ }),
|
|
/* 527 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* Checks if `value` is suitable for use as unique object key.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
|
|
*/
|
|
function isKeyable(value) {
|
|
var type = typeof value;
|
|
return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
|
|
? (value !== '__proto__')
|
|
: (value === null);
|
|
}
|
|
|
|
module.exports = isKeyable;
|
|
|
|
|
|
/***/ }),
|
|
/* 528 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var getMapData = __webpack_require__(118);
|
|
|
|
/**
|
|
* Gets the map value for `key`.
|
|
*
|
|
* @private
|
|
* @name get
|
|
* @memberOf MapCache
|
|
* @param {string} key The key of the value to get.
|
|
* @returns {*} Returns the entry value.
|
|
*/
|
|
function mapCacheGet(key) {
|
|
return getMapData(this, key).get(key);
|
|
}
|
|
|
|
module.exports = mapCacheGet;
|
|
|
|
|
|
/***/ }),
|
|
/* 529 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var getMapData = __webpack_require__(118);
|
|
|
|
/**
|
|
* Checks if a map value for `key` exists.
|
|
*
|
|
* @private
|
|
* @name has
|
|
* @memberOf MapCache
|
|
* @param {string} key The key of the entry to check.
|
|
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
*/
|
|
function mapCacheHas(key) {
|
|
return getMapData(this, key).has(key);
|
|
}
|
|
|
|
module.exports = mapCacheHas;
|
|
|
|
|
|
/***/ }),
|
|
/* 530 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var getMapData = __webpack_require__(118);
|
|
|
|
/**
|
|
* Sets the map `key` to `value`.
|
|
*
|
|
* @private
|
|
* @name set
|
|
* @memberOf MapCache
|
|
* @param {string} key The key of the value to set.
|
|
* @param {*} value The value to set.
|
|
* @returns {Object} Returns the map cache instance.
|
|
*/
|
|
function mapCacheSet(key, value) {
|
|
var data = getMapData(this, key),
|
|
size = data.size;
|
|
|
|
data.set(key, value);
|
|
this.size += data.size == size ? 0 : 1;
|
|
return this;
|
|
}
|
|
|
|
module.exports = mapCacheSet;
|
|
|
|
|
|
/***/ }),
|
|
/* 531 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* Gets the last element of `array`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Array
|
|
* @param {Array} array The array to query.
|
|
* @returns {*} Returns the last element of `array`.
|
|
* @example
|
|
*
|
|
* _.last([1, 2, 3]);
|
|
* // => 3
|
|
*/
|
|
function last(array) {
|
|
var length = array == null ? 0 : array.length;
|
|
return length ? array[length - 1] : undefined;
|
|
}
|
|
|
|
module.exports = last;
|
|
|
|
|
|
/***/ }),
|
|
/* 532 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseGet = __webpack_require__(119),
|
|
baseSlice = __webpack_require__(169);
|
|
|
|
/**
|
|
* Gets the parent value at `path` of `object`.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to query.
|
|
* @param {Array} path The path to get the parent value of.
|
|
* @returns {*} Returns the parent value.
|
|
*/
|
|
function parent(object, path) {
|
|
return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
|
|
}
|
|
|
|
module.exports = parent;
|
|
|
|
|
|
/***/ }),
|
|
/* 533 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var constant = __webpack_require__(534),
|
|
defineProperty = __webpack_require__(237),
|
|
identity = __webpack_require__(120);
|
|
|
|
/**
|
|
* The base implementation of `setToString` without support for hot loop shorting.
|
|
*
|
|
* @private
|
|
* @param {Function} func The function to modify.
|
|
* @param {Function} string The `toString` result.
|
|
* @returns {Function} Returns `func`.
|
|
*/
|
|
var baseSetToString = !defineProperty ? identity : function(func, string) {
|
|
return defineProperty(func, 'toString', {
|
|
'configurable': true,
|
|
'enumerable': false,
|
|
'value': constant(string),
|
|
'writable': true
|
|
});
|
|
};
|
|
|
|
module.exports = baseSetToString;
|
|
|
|
|
|
/***/ }),
|
|
/* 534 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* Creates a function that returns `value`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 2.4.0
|
|
* @category Util
|
|
* @param {*} value The value to return from the new function.
|
|
* @returns {Function} Returns the new constant function.
|
|
* @example
|
|
*
|
|
* var objects = _.times(2, _.constant({ 'a': 1 }));
|
|
*
|
|
* console.log(objects);
|
|
* // => [{ 'a': 1 }, { 'a': 1 }]
|
|
*
|
|
* console.log(objects[0] === objects[1]);
|
|
* // => true
|
|
*/
|
|
function constant(value) {
|
|
return function() {
|
|
return value;
|
|
};
|
|
}
|
|
|
|
module.exports = constant;
|
|
|
|
|
|
/***/ }),
|
|
/* 535 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/** Used to detect hot functions by number of calls within a span of milliseconds. */
|
|
var HOT_COUNT = 800,
|
|
HOT_SPAN = 16;
|
|
|
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
var nativeNow = Date.now;
|
|
|
|
/**
|
|
* Creates a function that'll short out and invoke `identity` instead
|
|
* of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
|
|
* milliseconds.
|
|
*
|
|
* @private
|
|
* @param {Function} func The function to restrict.
|
|
* @returns {Function} Returns the new shortable function.
|
|
*/
|
|
function shortOut(func) {
|
|
var count = 0,
|
|
lastCalled = 0;
|
|
|
|
return function() {
|
|
var stamp = nativeNow(),
|
|
remaining = HOT_SPAN - (stamp - lastCalled);
|
|
|
|
lastCalled = stamp;
|
|
if (remaining > 0) {
|
|
if (++count >= HOT_COUNT) {
|
|
return arguments[0];
|
|
}
|
|
} else {
|
|
count = 0;
|
|
}
|
|
return func.apply(undefined, arguments);
|
|
};
|
|
}
|
|
|
|
module.exports = shortOut;
|
|
|
|
|
|
/***/ }),
|
|
/* 536 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/** Used to stand-in for `undefined` hash values. */
|
|
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
|
|
|
/**
|
|
* Adds `value` to the array cache.
|
|
*
|
|
* @private
|
|
* @name add
|
|
* @memberOf SetCache
|
|
* @alias push
|
|
* @param {*} value The value to cache.
|
|
* @returns {Object} Returns the cache instance.
|
|
*/
|
|
function setCacheAdd(value) {
|
|
this.__data__.set(value, HASH_UNDEFINED);
|
|
return this;
|
|
}
|
|
|
|
module.exports = setCacheAdd;
|
|
|
|
|
|
/***/ }),
|
|
/* 537 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* Checks if `value` is in the array cache.
|
|
*
|
|
* @private
|
|
* @name has
|
|
* @memberOf SetCache
|
|
* @param {*} value The value to search for.
|
|
* @returns {number} Returns `true` if `value` is found, else `false`.
|
|
*/
|
|
function setCacheHas(value) {
|
|
return this.__data__.has(value);
|
|
}
|
|
|
|
module.exports = setCacheHas;
|
|
|
|
|
|
/***/ }),
|
|
/* 538 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* The base implementation of `_.isNaN` without support for number objects.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
|
|
*/
|
|
function baseIsNaN(value) {
|
|
return value !== value;
|
|
}
|
|
|
|
module.exports = baseIsNaN;
|
|
|
|
|
|
/***/ }),
|
|
/* 539 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* A specialized version of `_.indexOf` which performs strict equality
|
|
* comparisons of values, i.e. `===`.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to inspect.
|
|
* @param {*} value The value to search for.
|
|
* @param {number} fromIndex The index to search from.
|
|
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
*/
|
|
function strictIndexOf(array, value, fromIndex) {
|
|
var index = fromIndex - 1,
|
|
length = array.length;
|
|
|
|
while (++index < length) {
|
|
if (array[index] === value) {
|
|
return index;
|
|
}
|
|
}
|
|
return -1;
|
|
}
|
|
|
|
module.exports = strictIndexOf;
|
|
|
|
|
|
/***/ }),
|
|
/* 540 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
/**
|
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
|
|
|
|
var ReactPropTypesSecret = __webpack_require__(541);
|
|
|
|
function emptyFunction() {}
|
|
function emptyFunctionWithReset() {}
|
|
emptyFunctionWithReset.resetWarningCache = emptyFunction;
|
|
|
|
module.exports = function() {
|
|
function shim(props, propName, componentName, location, propFullName, secret) {
|
|
if (secret === ReactPropTypesSecret) {
|
|
// It is still safe when called from React.
|
|
return;
|
|
}
|
|
var err = new Error(
|
|
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
|
'Use PropTypes.checkPropTypes() to call them. ' +
|
|
'Read more at http://fb.me/use-check-prop-types'
|
|
);
|
|
err.name = 'Invariant Violation';
|
|
throw err;
|
|
};
|
|
shim.isRequired = shim;
|
|
function getShim() {
|
|
return shim;
|
|
};
|
|
// Important!
|
|
// Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
|
|
var ReactPropTypes = {
|
|
array: shim,
|
|
bool: shim,
|
|
func: shim,
|
|
number: shim,
|
|
object: shim,
|
|
string: shim,
|
|
symbol: shim,
|
|
|
|
any: shim,
|
|
arrayOf: getShim,
|
|
element: shim,
|
|
elementType: shim,
|
|
instanceOf: getShim,
|
|
node: shim,
|
|
objectOf: getShim,
|
|
oneOf: getShim,
|
|
oneOfType: getShim,
|
|
shape: getShim,
|
|
exact: getShim,
|
|
|
|
checkPropTypes: emptyFunctionWithReset,
|
|
resetWarningCache: emptyFunction
|
|
};
|
|
|
|
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
|
|
return ReactPropTypes;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
/* 541 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
/**
|
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
|
|
|
|
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
|
|
|
module.exports = ReactPropTypesSecret;
|
|
|
|
|
|
/***/ }),
|
|
/* 542 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseIteratee = __webpack_require__(73),
|
|
isArrayLike = __webpack_require__(52),
|
|
keys = __webpack_require__(85);
|
|
|
|
/**
|
|
* Creates a `_.find` or `_.findLast` function.
|
|
*
|
|
* @private
|
|
* @param {Function} findIndexFunc The function to find the collection index.
|
|
* @returns {Function} Returns the new find function.
|
|
*/
|
|
function createFind(findIndexFunc) {
|
|
return function(collection, predicate, fromIndex) {
|
|
var iterable = Object(collection);
|
|
if (!isArrayLike(collection)) {
|
|
var iteratee = baseIteratee(predicate, 3);
|
|
collection = keys(collection);
|
|
predicate = function(key) { return iteratee(iterable[key], key, iterable); };
|
|
}
|
|
var index = findIndexFunc(collection, predicate, fromIndex);
|
|
return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
|
|
};
|
|
}
|
|
|
|
module.exports = createFind;
|
|
|
|
|
|
/***/ }),
|
|
/* 543 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseIsMatch = __webpack_require__(544),
|
|
getMatchData = __webpack_require__(569),
|
|
matchesStrictComparable = __webpack_require__(251);
|
|
|
|
/**
|
|
* The base implementation of `_.matches` which doesn't clone `source`.
|
|
*
|
|
* @private
|
|
* @param {Object} source The object of property values to match.
|
|
* @returns {Function} Returns the new spec function.
|
|
*/
|
|
function baseMatches(source) {
|
|
var matchData = getMatchData(source);
|
|
if (matchData.length == 1 && matchData[0][2]) {
|
|
return matchesStrictComparable(matchData[0][0], matchData[0][1]);
|
|
}
|
|
return function(object) {
|
|
return object === source || baseIsMatch(object, source, matchData);
|
|
};
|
|
}
|
|
|
|
module.exports = baseMatches;
|
|
|
|
|
|
/***/ }),
|
|
/* 544 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var Stack = __webpack_require__(241),
|
|
baseIsEqual = __webpack_require__(174);
|
|
|
|
/** Used to compose bitmasks for value comparisons. */
|
|
var COMPARE_PARTIAL_FLAG = 1,
|
|
COMPARE_UNORDERED_FLAG = 2;
|
|
|
|
/**
|
|
* The base implementation of `_.isMatch` without support for iteratee shorthands.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to inspect.
|
|
* @param {Object} source The object of property values to match.
|
|
* @param {Array} matchData The property names, values, and compare flags to match.
|
|
* @param {Function} [customizer] The function to customize comparisons.
|
|
* @returns {boolean} Returns `true` if `object` is a match, else `false`.
|
|
*/
|
|
function baseIsMatch(object, source, matchData, customizer) {
|
|
var index = matchData.length,
|
|
length = index,
|
|
noCustomizer = !customizer;
|
|
|
|
if (object == null) {
|
|
return !length;
|
|
}
|
|
object = Object(object);
|
|
while (index--) {
|
|
var data = matchData[index];
|
|
if ((noCustomizer && data[2])
|
|
? data[1] !== object[data[0]]
|
|
: !(data[0] in object)
|
|
) {
|
|
return false;
|
|
}
|
|
}
|
|
while (++index < length) {
|
|
data = matchData[index];
|
|
var key = data[0],
|
|
objValue = object[key],
|
|
srcValue = data[1];
|
|
|
|
if (noCustomizer && data[2]) {
|
|
if (objValue === undefined && !(key in object)) {
|
|
return false;
|
|
}
|
|
} else {
|
|
var stack = new Stack;
|
|
if (customizer) {
|
|
var result = customizer(objValue, srcValue, key, object, source, stack);
|
|
}
|
|
if (!(result === undefined
|
|
? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
|
|
: result
|
|
)) {
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
|
|
module.exports = baseIsMatch;
|
|
|
|
|
|
/***/ }),
|
|
/* 545 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var ListCache = __webpack_require__(115);
|
|
|
|
/**
|
|
* Removes all key-value entries from the stack.
|
|
*
|
|
* @private
|
|
* @name clear
|
|
* @memberOf Stack
|
|
*/
|
|
function stackClear() {
|
|
this.__data__ = new ListCache;
|
|
this.size = 0;
|
|
}
|
|
|
|
module.exports = stackClear;
|
|
|
|
|
|
/***/ }),
|
|
/* 546 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* Removes `key` and its value from the stack.
|
|
*
|
|
* @private
|
|
* @name delete
|
|
* @memberOf Stack
|
|
* @param {string} key The key of the value to remove.
|
|
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
*/
|
|
function stackDelete(key) {
|
|
var data = this.__data__,
|
|
result = data['delete'](key);
|
|
|
|
this.size = data.size;
|
|
return result;
|
|
}
|
|
|
|
module.exports = stackDelete;
|
|
|
|
|
|
/***/ }),
|
|
/* 547 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* Gets the stack value for `key`.
|
|
*
|
|
* @private
|
|
* @name get
|
|
* @memberOf Stack
|
|
* @param {string} key The key of the value to get.
|
|
* @returns {*} Returns the entry value.
|
|
*/
|
|
function stackGet(key) {
|
|
return this.__data__.get(key);
|
|
}
|
|
|
|
module.exports = stackGet;
|
|
|
|
|
|
/***/ }),
|
|
/* 548 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* Checks if a stack value for `key` exists.
|
|
*
|
|
* @private
|
|
* @name has
|
|
* @memberOf Stack
|
|
* @param {string} key The key of the entry to check.
|
|
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
*/
|
|
function stackHas(key) {
|
|
return this.__data__.has(key);
|
|
}
|
|
|
|
module.exports = stackHas;
|
|
|
|
|
|
/***/ }),
|
|
/* 549 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var ListCache = __webpack_require__(115),
|
|
Map = __webpack_require__(168),
|
|
MapCache = __webpack_require__(167);
|
|
|
|
/** Used as the size to enable large array optimizations. */
|
|
var LARGE_ARRAY_SIZE = 200;
|
|
|
|
/**
|
|
* Sets the stack `key` to `value`.
|
|
*
|
|
* @private
|
|
* @name set
|
|
* @memberOf Stack
|
|
* @param {string} key The key of the value to set.
|
|
* @param {*} value The value to set.
|
|
* @returns {Object} Returns the stack cache instance.
|
|
*/
|
|
function stackSet(key, value) {
|
|
var data = this.__data__;
|
|
if (data instanceof ListCache) {
|
|
var pairs = data.__data__;
|
|
if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
|
|
pairs.push([key, value]);
|
|
this.size = ++data.size;
|
|
return this;
|
|
}
|
|
data = this.__data__ = new MapCache(pairs);
|
|
}
|
|
data.set(key, value);
|
|
this.size = data.size;
|
|
return this;
|
|
}
|
|
|
|
module.exports = stackSet;
|
|
|
|
|
|
/***/ }),
|
|
/* 550 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var Stack = __webpack_require__(241),
|
|
equalArrays = __webpack_require__(242),
|
|
equalByTag = __webpack_require__(551),
|
|
equalObjects = __webpack_require__(554),
|
|
getTag = __webpack_require__(179),
|
|
isArray = __webpack_require__(26),
|
|
isBuffer = __webpack_require__(176),
|
|
isTypedArray = __webpack_require__(177);
|
|
|
|
/** Used to compose bitmasks for value comparisons. */
|
|
var COMPARE_PARTIAL_FLAG = 1;
|
|
|
|
/** `Object#toString` result references. */
|
|
var argsTag = '[object Arguments]',
|
|
arrayTag = '[object Array]',
|
|
objectTag = '[object Object]';
|
|
|
|
/** Used for built-in method references. */
|
|
var objectProto = Object.prototype;
|
|
|
|
/** Used to check objects for own properties. */
|
|
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
|
|
/**
|
|
* A specialized version of `baseIsEqual` for arrays and objects which performs
|
|
* deep comparisons and tracks traversed objects enabling objects with circular
|
|
* references to be compared.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to compare.
|
|
* @param {Object} other The other object to compare.
|
|
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
|
|
* @param {Function} customizer The function to customize comparisons.
|
|
* @param {Function} equalFunc The function to determine equivalents of values.
|
|
* @param {Object} [stack] Tracks traversed `object` and `other` objects.
|
|
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
|
|
*/
|
|
function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
|
|
var objIsArr = isArray(object),
|
|
othIsArr = isArray(other),
|
|
objTag = objIsArr ? arrayTag : getTag(object),
|
|
othTag = othIsArr ? arrayTag : getTag(other);
|
|
|
|
objTag = objTag == argsTag ? objectTag : objTag;
|
|
othTag = othTag == argsTag ? objectTag : othTag;
|
|
|
|
var objIsObj = objTag == objectTag,
|
|
othIsObj = othTag == objectTag,
|
|
isSameTag = objTag == othTag;
|
|
|
|
if (isSameTag && isBuffer(object)) {
|
|
if (!isBuffer(other)) {
|
|
return false;
|
|
}
|
|
objIsArr = true;
|
|
objIsObj = false;
|
|
}
|
|
if (isSameTag && !objIsObj) {
|
|
stack || (stack = new Stack);
|
|
return (objIsArr || isTypedArray(object))
|
|
? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
|
|
: equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
|
|
}
|
|
if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
|
|
var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
|
|
othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
|
|
|
|
if (objIsWrapped || othIsWrapped) {
|
|
var objUnwrapped = objIsWrapped ? object.value() : object,
|
|
othUnwrapped = othIsWrapped ? other.value() : other;
|
|
|
|
stack || (stack = new Stack);
|
|
return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
|
|
}
|
|
}
|
|
if (!isSameTag) {
|
|
return false;
|
|
}
|
|
stack || (stack = new Stack);
|
|
return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
|
|
}
|
|
|
|
module.exports = baseIsEqualDeep;
|
|
|
|
|
|
/***/ }),
|
|
/* 551 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var Symbol = __webpack_require__(95),
|
|
Uint8Array = __webpack_require__(552),
|
|
eq = __webpack_require__(117),
|
|
equalArrays = __webpack_require__(242),
|
|
mapToArray = __webpack_require__(553),
|
|
setToArray = __webpack_require__(175);
|
|
|
|
/** Used to compose bitmasks for value comparisons. */
|
|
var COMPARE_PARTIAL_FLAG = 1,
|
|
COMPARE_UNORDERED_FLAG = 2;
|
|
|
|
/** `Object#toString` result references. */
|
|
var boolTag = '[object Boolean]',
|
|
dateTag = '[object Date]',
|
|
errorTag = '[object Error]',
|
|
mapTag = '[object Map]',
|
|
numberTag = '[object Number]',
|
|
regexpTag = '[object RegExp]',
|
|
setTag = '[object Set]',
|
|
stringTag = '[object String]',
|
|
symbolTag = '[object Symbol]';
|
|
|
|
var arrayBufferTag = '[object ArrayBuffer]',
|
|
dataViewTag = '[object DataView]';
|
|
|
|
/** Used to convert symbols to primitives and strings. */
|
|
var symbolProto = Symbol ? Symbol.prototype : undefined,
|
|
symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
|
|
|
|
/**
|
|
* A specialized version of `baseIsEqualDeep` for comparing objects of
|
|
* the same `toStringTag`.
|
|
*
|
|
* **Note:** This function only supports comparing values with tags of
|
|
* `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to compare.
|
|
* @param {Object} other The other object to compare.
|
|
* @param {string} tag The `toStringTag` of the objects to compare.
|
|
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
|
|
* @param {Function} customizer The function to customize comparisons.
|
|
* @param {Function} equalFunc The function to determine equivalents of values.
|
|
* @param {Object} stack Tracks traversed `object` and `other` objects.
|
|
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
|
|
*/
|
|
function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
|
|
switch (tag) {
|
|
case dataViewTag:
|
|
if ((object.byteLength != other.byteLength) ||
|
|
(object.byteOffset != other.byteOffset)) {
|
|
return false;
|
|
}
|
|
object = object.buffer;
|
|
other = other.buffer;
|
|
|
|
case arrayBufferTag:
|
|
if ((object.byteLength != other.byteLength) ||
|
|
!equalFunc(new Uint8Array(object), new Uint8Array(other))) {
|
|
return false;
|
|
}
|
|
return true;
|
|
|
|
case boolTag:
|
|
case dateTag:
|
|
case numberTag:
|
|
// Coerce booleans to `1` or `0` and dates to milliseconds.
|
|
// Invalid dates are coerced to `NaN`.
|
|
return eq(+object, +other);
|
|
|
|
case errorTag:
|
|
return object.name == other.name && object.message == other.message;
|
|
|
|
case regexpTag:
|
|
case stringTag:
|
|
// Coerce regexes to strings and treat strings, primitives and objects,
|
|
// as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
|
|
// for more details.
|
|
return object == (other + '');
|
|
|
|
case mapTag:
|
|
var convert = mapToArray;
|
|
|
|
case setTag:
|
|
var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
|
|
convert || (convert = setToArray);
|
|
|
|
if (object.size != other.size && !isPartial) {
|
|
return false;
|
|
}
|
|
// Assume cyclic values are equal.
|
|
var stacked = stack.get(object);
|
|
if (stacked) {
|
|
return stacked == other;
|
|
}
|
|
bitmask |= COMPARE_UNORDERED_FLAG;
|
|
|
|
// Recursively compare objects (susceptible to call stack limits).
|
|
stack.set(object, other);
|
|
var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
|
|
stack['delete'](object);
|
|
return result;
|
|
|
|
case symbolTag:
|
|
if (symbolValueOf) {
|
|
return symbolValueOf.call(object) == symbolValueOf.call(other);
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
module.exports = equalByTag;
|
|
|
|
|
|
/***/ }),
|
|
/* 552 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var root = __webpack_require__(51);
|
|
|
|
/** Built-in value references. */
|
|
var Uint8Array = root.Uint8Array;
|
|
|
|
module.exports = Uint8Array;
|
|
|
|
|
|
/***/ }),
|
|
/* 553 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* Converts `map` to its key-value pairs.
|
|
*
|
|
* @private
|
|
* @param {Object} map The map to convert.
|
|
* @returns {Array} Returns the key-value pairs.
|
|
*/
|
|
function mapToArray(map) {
|
|
var index = -1,
|
|
result = Array(map.size);
|
|
|
|
map.forEach(function(value, key) {
|
|
result[++index] = [key, value];
|
|
});
|
|
return result;
|
|
}
|
|
|
|
module.exports = mapToArray;
|
|
|
|
|
|
/***/ }),
|
|
/* 554 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var getAllKeys = __webpack_require__(555);
|
|
|
|
/** Used to compose bitmasks for value comparisons. */
|
|
var COMPARE_PARTIAL_FLAG = 1;
|
|
|
|
/** Used for built-in method references. */
|
|
var objectProto = Object.prototype;
|
|
|
|
/** Used to check objects for own properties. */
|
|
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
|
|
/**
|
|
* A specialized version of `baseIsEqualDeep` for objects with support for
|
|
* partial deep comparisons.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to compare.
|
|
* @param {Object} other The other object to compare.
|
|
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
|
|
* @param {Function} customizer The function to customize comparisons.
|
|
* @param {Function} equalFunc The function to determine equivalents of values.
|
|
* @param {Object} stack Tracks traversed `object` and `other` objects.
|
|
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
|
|
*/
|
|
function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
|
|
var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
|
|
objProps = getAllKeys(object),
|
|
objLength = objProps.length,
|
|
othProps = getAllKeys(other),
|
|
othLength = othProps.length;
|
|
|
|
if (objLength != othLength && !isPartial) {
|
|
return false;
|
|
}
|
|
var index = objLength;
|
|
while (index--) {
|
|
var key = objProps[index];
|
|
if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
|
|
return false;
|
|
}
|
|
}
|
|
// Assume cyclic values are equal.
|
|
var stacked = stack.get(object);
|
|
if (stacked && stack.get(other)) {
|
|
return stacked == other;
|
|
}
|
|
var result = true;
|
|
stack.set(object, other);
|
|
stack.set(other, object);
|
|
|
|
var skipCtor = isPartial;
|
|
while (++index < objLength) {
|
|
key = objProps[index];
|
|
var objValue = object[key],
|
|
othValue = other[key];
|
|
|
|
if (customizer) {
|
|
var compared = isPartial
|
|
? customizer(othValue, objValue, key, other, object, stack)
|
|
: customizer(objValue, othValue, key, object, other, stack);
|
|
}
|
|
// Recursively compare objects (susceptible to call stack limits).
|
|
if (!(compared === undefined
|
|
? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
|
|
: compared
|
|
)) {
|
|
result = false;
|
|
break;
|
|
}
|
|
skipCtor || (skipCtor = key == 'constructor');
|
|
}
|
|
if (result && !skipCtor) {
|
|
var objCtor = object.constructor,
|
|
othCtor = other.constructor;
|
|
|
|
// Non `Object` object instances with different constructors are not equal.
|
|
if (objCtor != othCtor &&
|
|
('constructor' in object && 'constructor' in other) &&
|
|
!(typeof objCtor == 'function' && objCtor instanceof objCtor &&
|
|
typeof othCtor == 'function' && othCtor instanceof othCtor)) {
|
|
result = false;
|
|
}
|
|
}
|
|
stack['delete'](object);
|
|
stack['delete'](other);
|
|
return result;
|
|
}
|
|
|
|
module.exports = equalObjects;
|
|
|
|
|
|
/***/ }),
|
|
/* 555 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseGetAllKeys = __webpack_require__(556),
|
|
getSymbols = __webpack_require__(557),
|
|
keys = __webpack_require__(85);
|
|
|
|
/**
|
|
* Creates an array of own enumerable property names and symbols of `object`.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to query.
|
|
* @returns {Array} Returns the array of property names and symbols.
|
|
*/
|
|
function getAllKeys(object) {
|
|
return baseGetAllKeys(object, keys, getSymbols);
|
|
}
|
|
|
|
module.exports = getAllKeys;
|
|
|
|
|
|
/***/ }),
|
|
/* 556 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var arrayPush = __webpack_require__(244),
|
|
isArray = __webpack_require__(26);
|
|
|
|
/**
|
|
* The base implementation of `getAllKeys` and `getAllKeysIn` which uses
|
|
* `keysFunc` and `symbolsFunc` to get the enumerable property names and
|
|
* symbols of `object`.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to query.
|
|
* @param {Function} keysFunc The function to get the keys of `object`.
|
|
* @param {Function} symbolsFunc The function to get the symbols of `object`.
|
|
* @returns {Array} Returns the array of property names and symbols.
|
|
*/
|
|
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
|
|
var result = keysFunc(object);
|
|
return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
|
|
}
|
|
|
|
module.exports = baseGetAllKeys;
|
|
|
|
|
|
/***/ }),
|
|
/* 557 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var arrayFilter = __webpack_require__(245),
|
|
stubArray = __webpack_require__(558);
|
|
|
|
/** Used for built-in method references. */
|
|
var objectProto = Object.prototype;
|
|
|
|
/** Built-in value references. */
|
|
var propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
|
|
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
var nativeGetSymbols = Object.getOwnPropertySymbols;
|
|
|
|
/**
|
|
* Creates an array of the own enumerable symbols of `object`.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to query.
|
|
* @returns {Array} Returns the array of symbols.
|
|
*/
|
|
var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
|
|
if (object == null) {
|
|
return [];
|
|
}
|
|
object = Object(object);
|
|
return arrayFilter(nativeGetSymbols(object), function(symbol) {
|
|
return propertyIsEnumerable.call(object, symbol);
|
|
});
|
|
};
|
|
|
|
module.exports = getSymbols;
|
|
|
|
|
|
/***/ }),
|
|
/* 558 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* This method returns a new empty array.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.13.0
|
|
* @category Util
|
|
* @returns {Array} Returns the new empty array.
|
|
* @example
|
|
*
|
|
* var arrays = _.times(2, _.stubArray);
|
|
*
|
|
* console.log(arrays);
|
|
* // => [[], []]
|
|
*
|
|
* console.log(arrays[0] === arrays[1]);
|
|
* // => false
|
|
*/
|
|
function stubArray() {
|
|
return [];
|
|
}
|
|
|
|
module.exports = stubArray;
|
|
|
|
|
|
/***/ }),
|
|
/* 559 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseTimes = __webpack_require__(560),
|
|
isArguments = __webpack_require__(124),
|
|
isArray = __webpack_require__(26),
|
|
isBuffer = __webpack_require__(176),
|
|
isIndex = __webpack_require__(125),
|
|
isTypedArray = __webpack_require__(177);
|
|
|
|
/** Used for built-in method references. */
|
|
var objectProto = Object.prototype;
|
|
|
|
/** Used to check objects for own properties. */
|
|
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
|
|
/**
|
|
* Creates an array of the enumerable property names of the array-like `value`.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to query.
|
|
* @param {boolean} inherited Specify returning inherited property names.
|
|
* @returns {Array} Returns the array of property names.
|
|
*/
|
|
function arrayLikeKeys(value, inherited) {
|
|
var isArr = isArray(value),
|
|
isArg = !isArr && isArguments(value),
|
|
isBuff = !isArr && !isArg && isBuffer(value),
|
|
isType = !isArr && !isArg && !isBuff && isTypedArray(value),
|
|
skipIndexes = isArr || isArg || isBuff || isType,
|
|
result = skipIndexes ? baseTimes(value.length, String) : [],
|
|
length = result.length;
|
|
|
|
for (var key in value) {
|
|
if ((inherited || hasOwnProperty.call(value, key)) &&
|
|
!(skipIndexes && (
|
|
// Safari 9 has enumerable `arguments.length` in strict mode.
|
|
key == 'length' ||
|
|
// Node.js 0.10 has enumerable non-index properties on buffers.
|
|
(isBuff && (key == 'offset' || key == 'parent')) ||
|
|
// PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
(isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
|
|
// Skip index properties.
|
|
isIndex(key, length)
|
|
))) {
|
|
result.push(key);
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
module.exports = arrayLikeKeys;
|
|
|
|
|
|
/***/ }),
|
|
/* 560 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* The base implementation of `_.times` without support for iteratee shorthands
|
|
* or max array length checks.
|
|
*
|
|
* @private
|
|
* @param {number} n The number of times to invoke `iteratee`.
|
|
* @param {Function} iteratee The function invoked per iteration.
|
|
* @returns {Array} Returns the array of results.
|
|
*/
|
|
function baseTimes(n, iteratee) {
|
|
var index = -1,
|
|
result = Array(n);
|
|
|
|
while (++index < n) {
|
|
result[index] = iteratee(index);
|
|
}
|
|
return result;
|
|
}
|
|
|
|
module.exports = baseTimes;
|
|
|
|
|
|
/***/ }),
|
|
/* 561 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseGetTag = __webpack_require__(50),
|
|
isObjectLike = __webpack_require__(47);
|
|
|
|
/** `Object#toString` result references. */
|
|
var argsTag = '[object Arguments]';
|
|
|
|
/**
|
|
* The base implementation of `_.isArguments`.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
|
*/
|
|
function baseIsArguments(value) {
|
|
return isObjectLike(value) && baseGetTag(value) == argsTag;
|
|
}
|
|
|
|
module.exports = baseIsArguments;
|
|
|
|
|
|
/***/ }),
|
|
/* 562 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* This method returns `false`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.13.0
|
|
* @category Util
|
|
* @returns {boolean} Returns `false`.
|
|
* @example
|
|
*
|
|
* _.times(2, _.stubFalse);
|
|
* // => [false, false]
|
|
*/
|
|
function stubFalse() {
|
|
return false;
|
|
}
|
|
|
|
module.exports = stubFalse;
|
|
|
|
|
|
/***/ }),
|
|
/* 563 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseGetTag = __webpack_require__(50),
|
|
isLength = __webpack_require__(173),
|
|
isObjectLike = __webpack_require__(47);
|
|
|
|
/** `Object#toString` result references. */
|
|
var argsTag = '[object Arguments]',
|
|
arrayTag = '[object Array]',
|
|
boolTag = '[object Boolean]',
|
|
dateTag = '[object Date]',
|
|
errorTag = '[object Error]',
|
|
funcTag = '[object Function]',
|
|
mapTag = '[object Map]',
|
|
numberTag = '[object Number]',
|
|
objectTag = '[object Object]',
|
|
regexpTag = '[object RegExp]',
|
|
setTag = '[object Set]',
|
|
stringTag = '[object String]',
|
|
weakMapTag = '[object WeakMap]';
|
|
|
|
var arrayBufferTag = '[object ArrayBuffer]',
|
|
dataViewTag = '[object DataView]',
|
|
float32Tag = '[object Float32Array]',
|
|
float64Tag = '[object Float64Array]',
|
|
int8Tag = '[object Int8Array]',
|
|
int16Tag = '[object Int16Array]',
|
|
int32Tag = '[object Int32Array]',
|
|
uint8Tag = '[object Uint8Array]',
|
|
uint8ClampedTag = '[object Uint8ClampedArray]',
|
|
uint16Tag = '[object Uint16Array]',
|
|
uint32Tag = '[object Uint32Array]';
|
|
|
|
/** Used to identify `toStringTag` values of typed arrays. */
|
|
var typedArrayTags = {};
|
|
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
|
|
typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
|
|
typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
|
|
typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
|
|
typedArrayTags[uint32Tag] = true;
|
|
typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
|
|
typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
|
|
typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
|
|
typedArrayTags[errorTag] = typedArrayTags[funcTag] =
|
|
typedArrayTags[mapTag] = typedArrayTags[numberTag] =
|
|
typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
|
|
typedArrayTags[setTag] = typedArrayTags[stringTag] =
|
|
typedArrayTags[weakMapTag] = false;
|
|
|
|
/**
|
|
* The base implementation of `_.isTypedArray` without Node.js optimizations.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
|
|
*/
|
|
function baseIsTypedArray(value) {
|
|
return isObjectLike(value) &&
|
|
isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
|
|
}
|
|
|
|
module.exports = baseIsTypedArray;
|
|
|
|
|
|
/***/ }),
|
|
/* 564 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
/* WEBPACK VAR INJECTION */(function(module) {var freeGlobal = __webpack_require__(232);
|
|
|
|
/** Detect free variable `exports`. */
|
|
var freeExports = true && exports && !exports.nodeType && exports;
|
|
|
|
/** Detect free variable `module`. */
|
|
var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
|
|
|
|
/** Detect the popular CommonJS extension `module.exports`. */
|
|
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
|
|
/** Detect free variable `process` from Node.js. */
|
|
var freeProcess = moduleExports && freeGlobal.process;
|
|
|
|
/** Used to access faster Node.js helpers. */
|
|
var nodeUtil = (function() {
|
|
try {
|
|
// Use `util.types` for Node.js 10+.
|
|
var types = freeModule && freeModule.require && freeModule.require('util').types;
|
|
|
|
if (types) {
|
|
return types;
|
|
}
|
|
|
|
// Legacy `process.binding('util')` for Node.js < 10.
|
|
return freeProcess && freeProcess.binding && freeProcess.binding('util');
|
|
} catch (e) {}
|
|
}());
|
|
|
|
module.exports = nodeUtil;
|
|
|
|
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(246)(module)))
|
|
|
|
/***/ }),
|
|
/* 565 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var overArg = __webpack_require__(248);
|
|
|
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
var nativeKeys = overArg(Object.keys, Object);
|
|
|
|
module.exports = nativeKeys;
|
|
|
|
|
|
/***/ }),
|
|
/* 566 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var getNative = __webpack_require__(72),
|
|
root = __webpack_require__(51);
|
|
|
|
/* Built-in method references that are verified to be native. */
|
|
var DataView = getNative(root, 'DataView');
|
|
|
|
module.exports = DataView;
|
|
|
|
|
|
/***/ }),
|
|
/* 567 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var getNative = __webpack_require__(72),
|
|
root = __webpack_require__(51);
|
|
|
|
/* Built-in method references that are verified to be native. */
|
|
var Promise = getNative(root, 'Promise');
|
|
|
|
module.exports = Promise;
|
|
|
|
|
|
/***/ }),
|
|
/* 568 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var getNative = __webpack_require__(72),
|
|
root = __webpack_require__(51);
|
|
|
|
/* Built-in method references that are verified to be native. */
|
|
var WeakMap = getNative(root, 'WeakMap');
|
|
|
|
module.exports = WeakMap;
|
|
|
|
|
|
/***/ }),
|
|
/* 569 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var isStrictComparable = __webpack_require__(250),
|
|
keys = __webpack_require__(85);
|
|
|
|
/**
|
|
* Gets the property names, values, and compare flags of `object`.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to query.
|
|
* @returns {Array} Returns the match data of `object`.
|
|
*/
|
|
function getMatchData(object) {
|
|
var result = keys(object),
|
|
length = result.length;
|
|
|
|
while (length--) {
|
|
var key = result[length],
|
|
value = object[key];
|
|
|
|
result[length] = [key, value, isStrictComparable(value)];
|
|
}
|
|
return result;
|
|
}
|
|
|
|
module.exports = getMatchData;
|
|
|
|
|
|
/***/ }),
|
|
/* 570 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseIsEqual = __webpack_require__(174),
|
|
get = __webpack_require__(24),
|
|
hasIn = __webpack_require__(252),
|
|
isKey = __webpack_require__(166),
|
|
isStrictComparable = __webpack_require__(250),
|
|
matchesStrictComparable = __webpack_require__(251),
|
|
toKey = __webpack_require__(84);
|
|
|
|
/** Used to compose bitmasks for value comparisons. */
|
|
var COMPARE_PARTIAL_FLAG = 1,
|
|
COMPARE_UNORDERED_FLAG = 2;
|
|
|
|
/**
|
|
* The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
|
|
*
|
|
* @private
|
|
* @param {string} path The path of the property to get.
|
|
* @param {*} srcValue The value to match.
|
|
* @returns {Function} Returns the new spec function.
|
|
*/
|
|
function baseMatchesProperty(path, srcValue) {
|
|
if (isKey(path) && isStrictComparable(srcValue)) {
|
|
return matchesStrictComparable(toKey(path), srcValue);
|
|
}
|
|
return function(object) {
|
|
var objValue = get(object, path);
|
|
return (objValue === undefined && objValue === srcValue)
|
|
? hasIn(object, path)
|
|
: baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
|
|
};
|
|
}
|
|
|
|
module.exports = baseMatchesProperty;
|
|
|
|
|
|
/***/ }),
|
|
/* 571 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* The base implementation of `_.hasIn` without support for deep paths.
|
|
*
|
|
* @private
|
|
* @param {Object} [object] The object to query.
|
|
* @param {Array|string} key The key to check.
|
|
* @returns {boolean} Returns `true` if `key` exists, else `false`.
|
|
*/
|
|
function baseHasIn(object, key) {
|
|
return object != null && key in Object(object);
|
|
}
|
|
|
|
module.exports = baseHasIn;
|
|
|
|
|
|
/***/ }),
|
|
/* 572 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseProperty = __webpack_require__(254),
|
|
basePropertyDeep = __webpack_require__(573),
|
|
isKey = __webpack_require__(166),
|
|
toKey = __webpack_require__(84);
|
|
|
|
/**
|
|
* Creates a function that returns the value at `path` of a given object.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 2.4.0
|
|
* @category Util
|
|
* @param {Array|string} path The path of the property to get.
|
|
* @returns {Function} Returns the new accessor function.
|
|
* @example
|
|
*
|
|
* var objects = [
|
|
* { 'a': { 'b': 2 } },
|
|
* { 'a': { 'b': 1 } }
|
|
* ];
|
|
*
|
|
* _.map(objects, _.property('a.b'));
|
|
* // => [2, 1]
|
|
*
|
|
* _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
|
|
* // => [1, 2]
|
|
*/
|
|
function property(path) {
|
|
return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
|
|
}
|
|
|
|
module.exports = property;
|
|
|
|
|
|
/***/ }),
|
|
/* 573 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseGet = __webpack_require__(119);
|
|
|
|
/**
|
|
* A specialized version of `baseProperty` which supports deep paths.
|
|
*
|
|
* @private
|
|
* @param {Array|string} path The path of the property to get.
|
|
* @returns {Function} Returns the new accessor function.
|
|
*/
|
|
function basePropertyDeep(path) {
|
|
return function(object) {
|
|
return baseGet(object, path);
|
|
};
|
|
}
|
|
|
|
module.exports = basePropertyDeep;
|
|
|
|
|
|
/***/ }),
|
|
/* 574 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseEach = __webpack_require__(86);
|
|
|
|
/**
|
|
* The base implementation of `_.some` without support for iteratee shorthands.
|
|
*
|
|
* @private
|
|
* @param {Array|Object} collection The collection to iterate over.
|
|
* @param {Function} predicate The function invoked per iteration.
|
|
* @returns {boolean} Returns `true` if any element passes the predicate check,
|
|
* else `false`.
|
|
*/
|
|
function baseSome(collection, predicate) {
|
|
var result;
|
|
|
|
baseEach(collection, function(value, index, collection) {
|
|
result = predicate(value, index, collection);
|
|
return !result;
|
|
});
|
|
return !!result;
|
|
}
|
|
|
|
module.exports = baseSome;
|
|
|
|
|
|
/***/ }),
|
|
/* 575 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseFor = __webpack_require__(576),
|
|
keys = __webpack_require__(85);
|
|
|
|
/**
|
|
* The base implementation of `_.forOwn` without support for iteratee shorthands.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to iterate over.
|
|
* @param {Function} iteratee The function invoked per iteration.
|
|
* @returns {Object} Returns `object`.
|
|
*/
|
|
function baseForOwn(object, iteratee) {
|
|
return object && baseFor(object, iteratee, keys);
|
|
}
|
|
|
|
module.exports = baseForOwn;
|
|
|
|
|
|
/***/ }),
|
|
/* 576 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var createBaseFor = __webpack_require__(577);
|
|
|
|
/**
|
|
* The base implementation of `baseForOwn` which iterates over `object`
|
|
* properties returned by `keysFunc` and invokes `iteratee` for each property.
|
|
* Iteratee functions may exit iteration early by explicitly returning `false`.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to iterate over.
|
|
* @param {Function} iteratee The function invoked per iteration.
|
|
* @param {Function} keysFunc The function to get the keys of `object`.
|
|
* @returns {Object} Returns `object`.
|
|
*/
|
|
var baseFor = createBaseFor();
|
|
|
|
module.exports = baseFor;
|
|
|
|
|
|
/***/ }),
|
|
/* 577 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* Creates a base function for methods like `_.forIn` and `_.forOwn`.
|
|
*
|
|
* @private
|
|
* @param {boolean} [fromRight] Specify iterating from right to left.
|
|
* @returns {Function} Returns the new base function.
|
|
*/
|
|
function createBaseFor(fromRight) {
|
|
return function(object, iteratee, keysFunc) {
|
|
var index = -1,
|
|
iterable = Object(object),
|
|
props = keysFunc(object),
|
|
length = props.length;
|
|
|
|
while (length--) {
|
|
var key = props[fromRight ? length : ++index];
|
|
if (iteratee(iterable[key], key, iterable) === false) {
|
|
break;
|
|
}
|
|
}
|
|
return object;
|
|
};
|
|
}
|
|
|
|
module.exports = createBaseFor;
|
|
|
|
|
|
/***/ }),
|
|
/* 578 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var isArrayLike = __webpack_require__(52);
|
|
|
|
/**
|
|
* Creates a `baseEach` or `baseEachRight` function.
|
|
*
|
|
* @private
|
|
* @param {Function} eachFunc The function to iterate over a collection.
|
|
* @param {boolean} [fromRight] Specify iterating from right to left.
|
|
* @returns {Function} Returns the new base function.
|
|
*/
|
|
function createBaseEach(eachFunc, fromRight) {
|
|
return function(collection, iteratee) {
|
|
if (collection == null) {
|
|
return collection;
|
|
}
|
|
if (!isArrayLike(collection)) {
|
|
return eachFunc(collection, iteratee);
|
|
}
|
|
var length = collection.length,
|
|
index = fromRight ? length : -1,
|
|
iterable = Object(collection);
|
|
|
|
while ((fromRight ? index-- : ++index < length)) {
|
|
if (iteratee(iterable[index], index, iterable) === false) {
|
|
break;
|
|
}
|
|
}
|
|
return collection;
|
|
};
|
|
}
|
|
|
|
module.exports = createBaseEach;
|
|
|
|
|
|
/***/ }),
|
|
/* 579 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var Set = __webpack_require__(249),
|
|
noop = __webpack_require__(184),
|
|
setToArray = __webpack_require__(175);
|
|
|
|
/** Used as references for various `Number` constants. */
|
|
var INFINITY = 1 / 0;
|
|
|
|
/**
|
|
* Creates a set object of `values`.
|
|
*
|
|
* @private
|
|
* @param {Array} values The values to add to the set.
|
|
* @returns {Object} Returns the new set.
|
|
*/
|
|
var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
|
|
return new Set(values);
|
|
};
|
|
|
|
module.exports = createSet;
|
|
|
|
|
|
/***/ }),
|
|
/* 580 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var overArg = __webpack_require__(248);
|
|
|
|
/** Built-in value references. */
|
|
var getPrototype = overArg(Object.getPrototypeOf, Object);
|
|
|
|
module.exports = getPrototype;
|
|
|
|
|
|
/***/ }),
|
|
/* 581 */
|
|
/***/ (function(module, exports) {
|
|
|
|
function _arrayWithHoles(arr) {
|
|
if (Array.isArray(arr)) return arr;
|
|
}
|
|
|
|
module.exports = _arrayWithHoles;
|
|
|
|
/***/ }),
|
|
/* 582 */
|
|
/***/ (function(module, exports) {
|
|
|
|
function _iterableToArrayLimit(arr, i) {
|
|
if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) {
|
|
return;
|
|
}
|
|
|
|
var _arr = [];
|
|
var _n = true;
|
|
var _d = false;
|
|
var _e = undefined;
|
|
|
|
try {
|
|
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;
|
|
} finally {
|
|
try {
|
|
if (!_n && _i["return"] != null) _i["return"]();
|
|
} finally {
|
|
if (_d) throw _e;
|
|
}
|
|
}
|
|
|
|
return _arr;
|
|
}
|
|
|
|
module.exports = _iterableToArrayLimit;
|
|
|
|
/***/ }),
|
|
/* 583 */
|
|
/***/ (function(module, exports) {
|
|
|
|
function _nonIterableRest() {
|
|
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
|
}
|
|
|
|
module.exports = _nonIterableRest;
|
|
|
|
/***/ }),
|
|
/* 584 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseValues = __webpack_require__(585),
|
|
keys = __webpack_require__(85);
|
|
|
|
/**
|
|
* Creates an array of the own enumerable string keyed property values of `object`.
|
|
*
|
|
* **Note:** Non-object values are coerced to objects.
|
|
*
|
|
* @static
|
|
* @since 0.1.0
|
|
* @memberOf _
|
|
* @category Object
|
|
* @param {Object} object The object to query.
|
|
* @returns {Array} Returns the array of property values.
|
|
* @example
|
|
*
|
|
* function Foo() {
|
|
* this.a = 1;
|
|
* this.b = 2;
|
|
* }
|
|
*
|
|
* Foo.prototype.c = 3;
|
|
*
|
|
* _.values(new Foo);
|
|
* // => [1, 2] (iteration order is not guaranteed)
|
|
*
|
|
* _.values('hi');
|
|
* // => ['h', 'i']
|
|
*/
|
|
function values(object) {
|
|
return object == null ? [] : baseValues(object, keys(object));
|
|
}
|
|
|
|
module.exports = values;
|
|
|
|
|
|
/***/ }),
|
|
/* 585 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var arrayMap = __webpack_require__(83);
|
|
|
|
/**
|
|
* The base implementation of `_.values` and `_.valuesIn` which creates an
|
|
* array of `object` property values corresponding to the property names
|
|
* of `props`.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to query.
|
|
* @param {Array} props The property names to get values for.
|
|
* @returns {Object} Returns the array of property values.
|
|
*/
|
|
function baseValues(object, props) {
|
|
return arrayMap(props, function(key) {
|
|
return object[key];
|
|
});
|
|
}
|
|
|
|
module.exports = baseValues;
|
|
|
|
|
|
/***/ }),
|
|
/* 586 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* A specialized version of `_.forEach` for arrays without support for
|
|
* iteratee shorthands.
|
|
*
|
|
* @private
|
|
* @param {Array} [array] The array to iterate over.
|
|
* @param {Function} iteratee The function invoked per iteration.
|
|
* @returns {Array} Returns `array`.
|
|
*/
|
|
function arrayEach(array, iteratee) {
|
|
var index = -1,
|
|
length = array == null ? 0 : array.length;
|
|
|
|
while (++index < length) {
|
|
if (iteratee(array[index], index, array) === false) {
|
|
break;
|
|
}
|
|
}
|
|
return array;
|
|
}
|
|
|
|
module.exports = arrayEach;
|
|
|
|
|
|
/***/ }),
|
|
/* 587 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var identity = __webpack_require__(120);
|
|
|
|
/**
|
|
* Casts `value` to `identity` if it's not a function.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to inspect.
|
|
* @returns {Function} Returns cast function.
|
|
*/
|
|
function castFunction(value) {
|
|
return typeof value == 'function' ? value : identity;
|
|
}
|
|
|
|
module.exports = castFunction;
|
|
|
|
|
|
/***/ }),
|
|
/* 588 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
Object.defineProperty(exports,"__esModule",{value:!0});var env=__webpack_require__(589);__webpack_require__(5);var React=__webpack_require__(0);function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _possibleConstructorReturn(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?_assertThisInitialized(e):t}var EventSet=function(){function e(t){_classCallCheck(this,e),_defineProperty(this,"handlers",void 0),this.handlers=t.slice(0)}return _createClass(e,[{key:"addHandlers",value:function(t){for(var n=this.handlers.slice(0),r=t.length,o=0;o<r;o+=1)n.push(t[o]);return new e(n)}},{key:"dispatchEvent",value:function(e,t){var n=this.handlers.length-1;if(t){for(var r=n;r>=0;r-=1)this.handlers[r].called||(this.handlers[r].called=!0,this.handlers[r](e));for(var o=n;o>=0;o-=1)this.handlers[o].called=!1}else{(0,this.handlers[n])(e)}}},{key:"hasHandlers",value:function(){return this.handlers.length>0}},{key:"removeHandlers",value:function(t){for(var n=[],r=this.handlers.length,o=0;o<r;o+=1){var a=this.handlers[o];-1===t.indexOf(a)&&n.push(a)}return new e(n)}}]),e}();function cloneMap(e){var t=new Map;return e.forEach(function(e,n){t.set(n,e)}),t}function normalizeHandlers(e){return Array.isArray(e)?e:[e]}var isRefObject=function(e){return null!==e&&"object"===_typeof(e)&&e.hasOwnProperty("current")};function normalizeTarget(e){return"document"===e?document:"window"===e?window:isRefObject(e)?e.current||document:e||document}var EventPool=function(){function e(t,n){_classCallCheck(this,e),_defineProperty(this,"handlerSets",void 0),_defineProperty(this,"poolName",void 0),this.handlerSets=n,this.poolName=t}return _createClass(e,[{key:"addHandlers",value:function(t,n){var r=cloneMap(this.handlerSets);if(r.has(t)){var o=r.get(t);r.set(t,o.addHandlers(n))}else r.set(t,new EventSet(n));return new e(this.poolName,r)}},{key:"dispatchEvent",value:function(e,t){var n=this.handlerSets.get(e),r="default"===this.poolName;n&&n.dispatchEvent(t,r)}},{key:"hasHandlers",value:function(){return this.handlerSets.size>0}},{key:"removeHandlers",value:function(t,n){var r=cloneMap(this.handlerSets);if(!r.has(t))return new e(this.poolName,r);var o=r.get(t).removeHandlers(n);return o.hasHandlers()?r.set(t,o):r.delete(t),new e(this.poolName,r)}}]),e}();_defineProperty(EventPool,"createByType",function(e,t,n){var r=new Map;return r.set(t,new EventSet(n)),new EventPool(e,r)});var EventTarget=function(){function e(t){var n=this;_classCallCheck(this,e),_defineProperty(this,"handlers",new Map),_defineProperty(this,"pools",new Map),_defineProperty(this,"target",void 0),_defineProperty(this,"createEmitter",function(e){return function(t){n.pools.forEach(function(n){n.dispatchEvent(e,t)})}}),this.target=t}return _createClass(e,[{key:"addHandlers",value:function(e,t,n){if(this.pools.has(e)){var r=this.pools.get(e);this.pools.set(e,r.addHandlers(t,n))}else this.pools.set(e,EventPool.createByType(e,t,n));this.handlers.has(t)||this.addTargetHandler(t)}},{key:"hasHandlers",value:function(){return this.handlers.size>0}},{key:"removeHandlers",value:function(e,t,n){if(this.pools.has(e)){var r=this.pools.get(e).removeHandlers(t,n);r.hasHandlers()?this.pools.set(e,r):this.pools.delete(e),0===this.pools.size&&this.removeTargetHandler(t)}}},{key:"addTargetHandler",value:function(e){var t=this.createEmitter(e);this.handlers.set(e,t),this.target.addEventListener(e,t,!0)}},{key:"removeTargetHandler",value:function(e){this.handlers.has(e)&&(this.target.removeEventListener(e,this.handlers.get(e),!0),this.handlers.delete(e))}}]),e}(),EventStack=function(){function e(){var t=this;_classCallCheck(this,e),_defineProperty(this,"targets",new Map),_defineProperty(this,"getTarget",function(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=normalizeTarget(e);if(t.targets.has(r))return t.targets.get(r);if(!n)return null;var o=new EventTarget(r);return t.targets.set(r,o),o}),_defineProperty(this,"removeTarget",function(e){t.targets.delete(normalizeTarget(e))})}return _createClass(e,[{key:"sub",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(env.canUseDOM){var r=n.target,o=void 0===r?document:r,a=n.pool,s=void 0===a?"default":a;this.getTarget(o).addHandlers(s,e,normalizeHandlers(t))}}},{key:"unsub",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(env.canUseDOM){var r=n.target,o=void 0===r?document:r,a=n.pool,s=void 0===a?"default":a,i=this.getTarget(o,!1);i&&(i.removeHandlers(s,e,normalizeHandlers(t)),i.hasHandlers()||this.removeTarget(o))}}}]),e}(),instance=new EventStack,EventStack$1=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,_getPrototypeOf(t).apply(this,arguments))}return _inherits(t,React.PureComponent),_createClass(t,[{key:"componentDidMount",value:function(){this.subscribe(this.props)}},{key:"componentDidUpdate",value:function(e){this.unsubscribe(e),this.subscribe(this.props)}},{key:"componentWillUnmount",value:function(){this.unsubscribe(this.props)}},{key:"subscribe",value:function(e){var t=e.name,n=e.on,r=e.pool,o=e.target;instance.sub(t,n,{pool:r,target:o})}},{key:"unsubscribe",value:function(e){var t=e.name,n=e.on,r=e.pool,o=e.target;instance.unsub(t,n,{pool:r,target:o})}},{key:"render",value:function(){return null}}]),t}();_defineProperty(EventStack$1,"defaultProps",{pool:"default",target:"document"}),EventStack$1.propTypes={},exports.instance=instance,exports.default=EventStack$1;
|
|
|
|
|
|
/***/ }),
|
|
/* 589 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var __WEBPACK_AMD_DEFINE_RESULT__;/*!
|
|
Copyright (c) 2015 Jed Watson.
|
|
Based on code that is Copyright 2013-2015, Facebook, Inc.
|
|
All rights reserved.
|
|
*/
|
|
/* global define */
|
|
|
|
(function () {
|
|
'use strict';
|
|
|
|
var canUseDOM = !!(
|
|
typeof window !== 'undefined' &&
|
|
window.document &&
|
|
window.document.createElement
|
|
);
|
|
|
|
var ExecutionEnvironment = {
|
|
|
|
canUseDOM: canUseDOM,
|
|
|
|
canUseWorkers: typeof Worker !== 'undefined',
|
|
|
|
canUseEventListeners:
|
|
canUseDOM && !!(window.addEventListener || window.attachEvent),
|
|
|
|
canUseViewport: canUseDOM && !!window.screen
|
|
|
|
};
|
|
|
|
if (true) {
|
|
!(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {
|
|
return ExecutionEnvironment;
|
|
}).call(exports, __webpack_require__, exports, module),
|
|
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
} else {}
|
|
|
|
}());
|
|
|
|
|
|
/***/ }),
|
|
/* 590 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
var nativeMax = Math.max,
|
|
nativeMin = Math.min;
|
|
|
|
/**
|
|
* The base implementation of `_.inRange` which doesn't coerce arguments.
|
|
*
|
|
* @private
|
|
* @param {number} number The number to check.
|
|
* @param {number} start The start of the range.
|
|
* @param {number} end The end of the range.
|
|
* @returns {boolean} Returns `true` if `number` is in the range, else `false`.
|
|
*/
|
|
function baseInRange(number, start, end) {
|
|
return number >= nativeMin(start, end) && number < nativeMax(start, end);
|
|
}
|
|
|
|
module.exports = baseInRange;
|
|
|
|
|
|
/***/ }),
|
|
/* 591 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* Gets the first element of `array`.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @alias first
|
|
* @category Array
|
|
* @param {Array} array The array to query.
|
|
* @returns {*} Returns the first element of `array`.
|
|
* @example
|
|
*
|
|
* _.head([1, 2, 3]);
|
|
* // => 1
|
|
*
|
|
* _.head([]);
|
|
* // => undefined
|
|
*/
|
|
function head(array) {
|
|
return (array && array.length) ? array[0] : undefined;
|
|
}
|
|
|
|
module.exports = head;
|
|
|
|
|
|
/***/ }),
|
|
/* 592 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
/** @license React v16.10.2
|
|
* react-is.production.min.js
|
|
*
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
Object.defineProperty(exports,"__esModule",{value:!0});
|
|
var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?Symbol.for("react.suspense_list"):
|
|
60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.fundamental"):60117,w=b?Symbol.for("react.responder"):60118,x=b?Symbol.for("react.scope"):60119;function y(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case h:return a;default:return u}}case t:case r:case d:return u}}}function z(a){return y(a)===m}
|
|
exports.typeOf=y;exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;exports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;
|
|
exports.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===v||a.$$typeof===w||a.$$typeof===x)};exports.isAsyncMode=function(a){return z(a)||y(a)===l};exports.isConcurrentMode=z;exports.isContextConsumer=function(a){return y(a)===k};exports.isContextProvider=function(a){return y(a)===h};
|
|
exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return y(a)===n};exports.isFragment=function(a){return y(a)===e};exports.isLazy=function(a){return y(a)===t};exports.isMemo=function(a){return y(a)===r};exports.isPortal=function(a){return y(a)===d};exports.isProfiler=function(a){return y(a)===g};exports.isStrictMode=function(a){return y(a)===f};exports.isSuspense=function(a){return y(a)===p};
|
|
|
|
|
|
/***/ }),
|
|
/* 593 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseClamp = __webpack_require__(594),
|
|
baseToString = __webpack_require__(234),
|
|
toInteger = __webpack_require__(126),
|
|
toString = __webpack_require__(82);
|
|
|
|
/**
|
|
* Checks if `string` starts with the given target string.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.0.0
|
|
* @category String
|
|
* @param {string} [string=''] The string to inspect.
|
|
* @param {string} [target] The string to search for.
|
|
* @param {number} [position=0] The position to search from.
|
|
* @returns {boolean} Returns `true` if `string` starts with `target`,
|
|
* else `false`.
|
|
* @example
|
|
*
|
|
* _.startsWith('abc', 'a');
|
|
* // => true
|
|
*
|
|
* _.startsWith('abc', 'b');
|
|
* // => false
|
|
*
|
|
* _.startsWith('abc', 'b', 1);
|
|
* // => true
|
|
*/
|
|
function startsWith(string, target, position) {
|
|
string = toString(string);
|
|
position = position == null
|
|
? 0
|
|
: baseClamp(toInteger(position), 0, string.length);
|
|
|
|
target = baseToString(target);
|
|
return string.slice(position, position + target.length) == target;
|
|
}
|
|
|
|
module.exports = startsWith;
|
|
|
|
|
|
/***/ }),
|
|
/* 594 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* The base implementation of `_.clamp` which doesn't coerce arguments.
|
|
*
|
|
* @private
|
|
* @param {number} number The number to clamp.
|
|
* @param {number} [lower] The lower bound.
|
|
* @param {number} upper The upper bound.
|
|
* @returns {number} Returns the clamped number.
|
|
*/
|
|
function baseClamp(number, lower, upper) {
|
|
if (number === number) {
|
|
if (upper !== undefined) {
|
|
number = number <= upper ? number : upper;
|
|
}
|
|
if (lower !== undefined) {
|
|
number = number >= lower ? number : lower;
|
|
}
|
|
}
|
|
return number;
|
|
}
|
|
|
|
module.exports = baseClamp;
|
|
|
|
|
|
/***/ }),
|
|
/* 595 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseEach = __webpack_require__(86);
|
|
|
|
/**
|
|
* The base implementation of `_.filter` without support for iteratee shorthands.
|
|
*
|
|
* @private
|
|
* @param {Array|Object} collection The collection to iterate over.
|
|
* @param {Function} predicate The function invoked per iteration.
|
|
* @returns {Array} Returns the new filtered array.
|
|
*/
|
|
function baseFilter(collection, predicate) {
|
|
var result = [];
|
|
baseEach(collection, function(value, index, collection) {
|
|
if (predicate(value, index, collection)) {
|
|
result.push(value);
|
|
}
|
|
});
|
|
return result;
|
|
}
|
|
|
|
module.exports = baseFilter;
|
|
|
|
|
|
/***/ }),
|
|
/* 596 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var arrayMap = __webpack_require__(83),
|
|
baseIntersection = __webpack_require__(597),
|
|
baseRest = __webpack_require__(96),
|
|
castArrayLikeObject = __webpack_require__(598);
|
|
|
|
/**
|
|
* Creates an array of unique values that are included in all given arrays
|
|
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
* for equality comparisons. The order and references of result values are
|
|
* determined by the first array.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Array
|
|
* @param {...Array} [arrays] The arrays to inspect.
|
|
* @returns {Array} Returns the new array of intersecting values.
|
|
* @example
|
|
*
|
|
* _.intersection([2, 1], [2, 3]);
|
|
* // => [2]
|
|
*/
|
|
var intersection = baseRest(function(arrays) {
|
|
var mapped = arrayMap(arrays, castArrayLikeObject);
|
|
return (mapped.length && mapped[0] === arrays[0])
|
|
? baseIntersection(mapped)
|
|
: [];
|
|
});
|
|
|
|
module.exports = intersection;
|
|
|
|
|
|
/***/ }),
|
|
/* 597 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var SetCache = __webpack_require__(121),
|
|
arrayIncludes = __webpack_require__(170),
|
|
arrayIncludesWith = __webpack_require__(171),
|
|
arrayMap = __webpack_require__(83),
|
|
baseUnary = __webpack_require__(172),
|
|
cacheHas = __webpack_require__(122);
|
|
|
|
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
var nativeMin = Math.min;
|
|
|
|
/**
|
|
* The base implementation of methods like `_.intersection`, without support
|
|
* for iteratee shorthands, that accepts an array of arrays to inspect.
|
|
*
|
|
* @private
|
|
* @param {Array} arrays The arrays to inspect.
|
|
* @param {Function} [iteratee] The iteratee invoked per element.
|
|
* @param {Function} [comparator] The comparator invoked per element.
|
|
* @returns {Array} Returns the new array of shared values.
|
|
*/
|
|
function baseIntersection(arrays, iteratee, comparator) {
|
|
var includes = comparator ? arrayIncludesWith : arrayIncludes,
|
|
length = arrays[0].length,
|
|
othLength = arrays.length,
|
|
othIndex = othLength,
|
|
caches = Array(othLength),
|
|
maxLength = Infinity,
|
|
result = [];
|
|
|
|
while (othIndex--) {
|
|
var array = arrays[othIndex];
|
|
if (othIndex && iteratee) {
|
|
array = arrayMap(array, baseUnary(iteratee));
|
|
}
|
|
maxLength = nativeMin(array.length, maxLength);
|
|
caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))
|
|
? new SetCache(othIndex && array)
|
|
: undefined;
|
|
}
|
|
array = arrays[0];
|
|
|
|
var index = -1,
|
|
seen = caches[0];
|
|
|
|
outer:
|
|
while (++index < length && result.length < maxLength) {
|
|
var value = array[index],
|
|
computed = iteratee ? iteratee(value) : value;
|
|
|
|
value = (comparator || value !== 0) ? value : 0;
|
|
if (!(seen
|
|
? cacheHas(seen, computed)
|
|
: includes(result, computed, comparator)
|
|
)) {
|
|
othIndex = othLength;
|
|
while (--othIndex) {
|
|
var cache = caches[othIndex];
|
|
if (!(cache
|
|
? cacheHas(cache, computed)
|
|
: includes(arrays[othIndex], computed, comparator))
|
|
) {
|
|
continue outer;
|
|
}
|
|
}
|
|
if (seen) {
|
|
seen.push(computed);
|
|
}
|
|
result.push(value);
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
module.exports = baseIntersection;
|
|
|
|
|
|
/***/ }),
|
|
/* 598 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var isArrayLikeObject = __webpack_require__(123);
|
|
|
|
/**
|
|
* Casts `value` to an empty array if it's not an array like object.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to inspect.
|
|
* @returns {Array|Object} Returns the cast array-like object.
|
|
*/
|
|
function castArrayLikeObject(value) {
|
|
return isArrayLikeObject(value) ? value : [];
|
|
}
|
|
|
|
module.exports = castArrayLikeObject;
|
|
|
|
|
|
/***/ }),
|
|
/* 599 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/** Used for built-in method references. */
|
|
var objectProto = Object.prototype;
|
|
|
|
/** Used to check objects for own properties. */
|
|
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
|
|
/**
|
|
* The base implementation of `_.has` without support for deep paths.
|
|
*
|
|
* @private
|
|
* @param {Object} [object] The object to query.
|
|
* @param {Array|string} key The key to check.
|
|
* @returns {boolean} Returns `true` if `key` exists, else `false`.
|
|
*/
|
|
function baseHas(object, key) {
|
|
return object != null && hasOwnProperty.call(object, key);
|
|
}
|
|
|
|
module.exports = baseHas;
|
|
|
|
|
|
/***/ }),
|
|
/* 600 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
module.exports = __webpack_require__(185);
|
|
|
|
|
|
/***/ }),
|
|
/* 601 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseAssignValue = __webpack_require__(602),
|
|
eq = __webpack_require__(117);
|
|
|
|
/** Used for built-in method references. */
|
|
var objectProto = Object.prototype;
|
|
|
|
/** Used to check objects for own properties. */
|
|
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
|
|
/**
|
|
* Assigns `value` to `key` of `object` if the existing value is not equivalent
|
|
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
* for equality comparisons.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to modify.
|
|
* @param {string} key The key of the property to assign.
|
|
* @param {*} value The value to assign.
|
|
*/
|
|
function assignValue(object, key, value) {
|
|
var objValue = object[key];
|
|
if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
|
|
(value === undefined && !(key in object))) {
|
|
baseAssignValue(object, key, value);
|
|
}
|
|
}
|
|
|
|
module.exports = assignValue;
|
|
|
|
|
|
/***/ }),
|
|
/* 602 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var defineProperty = __webpack_require__(237);
|
|
|
|
/**
|
|
* The base implementation of `assignValue` and `assignMergeValue` without
|
|
* value checks.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to modify.
|
|
* @param {string} key The key of the property to assign.
|
|
* @param {*} value The value to assign.
|
|
*/
|
|
function baseAssignValue(object, key, value) {
|
|
if (key == '__proto__' && defineProperty) {
|
|
defineProperty(object, key, {
|
|
'configurable': true,
|
|
'enumerable': true,
|
|
'value': value,
|
|
'writable': true
|
|
});
|
|
} else {
|
|
object[key] = value;
|
|
}
|
|
}
|
|
|
|
module.exports = baseAssignValue;
|
|
|
|
|
|
/***/ }),
|
|
/* 603 */
|
|
/***/ (function(module, exports) {
|
|
|
|
function _arrayWithoutHoles(arr) {
|
|
if (Array.isArray(arr)) {
|
|
for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {
|
|
arr2[i] = arr[i];
|
|
}
|
|
|
|
return arr2;
|
|
}
|
|
}
|
|
|
|
module.exports = _arrayWithoutHoles;
|
|
|
|
/***/ }),
|
|
/* 604 */
|
|
/***/ (function(module, exports) {
|
|
|
|
function _iterableToArray(iter) {
|
|
if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
|
|
}
|
|
|
|
module.exports = _iterableToArray;
|
|
|
|
/***/ }),
|
|
/* 605 */
|
|
/***/ (function(module, exports) {
|
|
|
|
function _nonIterableSpread() {
|
|
throw new TypeError("Invalid attempt to spread non-iterable instance");
|
|
}
|
|
|
|
module.exports = _nonIterableSpread;
|
|
|
|
/***/ }),
|
|
/* 606 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseEach = __webpack_require__(86),
|
|
isArrayLike = __webpack_require__(52);
|
|
|
|
/**
|
|
* The base implementation of `_.map` without support for iteratee shorthands.
|
|
*
|
|
* @private
|
|
* @param {Array|Object} collection The collection to iterate over.
|
|
* @param {Function} iteratee The function invoked per iteration.
|
|
* @returns {Array} Returns the new mapped array.
|
|
*/
|
|
function baseMap(collection, iteratee) {
|
|
var index = -1,
|
|
result = isArrayLike(collection) ? Array(collection.length) : [];
|
|
|
|
baseEach(collection, function(value, key, collection) {
|
|
result[++index] = iteratee(value, key, collection);
|
|
});
|
|
return result;
|
|
}
|
|
|
|
module.exports = baseMap;
|
|
|
|
|
|
/***/ }),
|
|
/* 607 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var getPrototypeOf = __webpack_require__(10);
|
|
|
|
function _superPropBase(object, property) {
|
|
while (!Object.prototype.hasOwnProperty.call(object, property)) {
|
|
object = getPrototypeOf(object);
|
|
if (object === null) break;
|
|
}
|
|
|
|
return object;
|
|
}
|
|
|
|
module.exports = _superPropBase;
|
|
|
|
/***/ }),
|
|
/* 608 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* A specialized version of `_.every` for arrays without support for
|
|
* iteratee shorthands.
|
|
*
|
|
* @private
|
|
* @param {Array} [array] The array to iterate over.
|
|
* @param {Function} predicate The function invoked per iteration.
|
|
* @returns {boolean} Returns `true` if all elements pass the predicate check,
|
|
* else `false`.
|
|
*/
|
|
function arrayEvery(array, predicate) {
|
|
var index = -1,
|
|
length = array == null ? 0 : array.length;
|
|
|
|
while (++index < length) {
|
|
if (!predicate(array[index], index, array)) {
|
|
return false;
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
|
|
module.exports = arrayEvery;
|
|
|
|
|
|
/***/ }),
|
|
/* 609 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseEach = __webpack_require__(86);
|
|
|
|
/**
|
|
* The base implementation of `_.every` without support for iteratee shorthands.
|
|
*
|
|
* @private
|
|
* @param {Array|Object} collection The collection to iterate over.
|
|
* @param {Function} predicate The function invoked per iteration.
|
|
* @returns {boolean} Returns `true` if all elements pass the predicate check,
|
|
* else `false`
|
|
*/
|
|
function baseEvery(collection, predicate) {
|
|
var result = true;
|
|
baseEach(collection, function(value, index, collection) {
|
|
result = !!predicate(value, index, collection);
|
|
return result;
|
|
});
|
|
return result;
|
|
}
|
|
|
|
module.exports = baseEvery;
|
|
|
|
|
|
/***/ }),
|
|
/* 610 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* The base implementation of `_.reduce` and `_.reduceRight`, without support
|
|
* for iteratee shorthands, which iterates over `collection` using `eachFunc`.
|
|
*
|
|
* @private
|
|
* @param {Array|Object} collection The collection to iterate over.
|
|
* @param {Function} iteratee The function invoked per iteration.
|
|
* @param {*} accumulator The initial value.
|
|
* @param {boolean} initAccum Specify using the first or last element of
|
|
* `collection` as the initial value.
|
|
* @param {Function} eachFunc The function to iterate over `collection`.
|
|
* @returns {*} Returns the accumulated value.
|
|
*/
|
|
function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
|
|
eachFunc(collection, function(value, index, collection) {
|
|
accumulator = initAccum
|
|
? (initAccum = false, value)
|
|
: iteratee(accumulator, value, index, collection);
|
|
});
|
|
return accumulator;
|
|
}
|
|
|
|
module.exports = baseReduce;
|
|
|
|
|
|
/***/ }),
|
|
/* 611 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var basePropertyOf = __webpack_require__(612);
|
|
|
|
/** Used to map Latin Unicode letters to basic Latin letters. */
|
|
var deburredLetters = {
|
|
// Latin-1 Supplement block.
|
|
'\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
|
|
'\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
|
|
'\xc7': 'C', '\xe7': 'c',
|
|
'\xd0': 'D', '\xf0': 'd',
|
|
'\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
|
|
'\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
|
|
'\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
|
|
'\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
|
|
'\xd1': 'N', '\xf1': 'n',
|
|
'\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
|
|
'\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
|
|
'\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
|
|
'\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
|
|
'\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
|
|
'\xc6': 'Ae', '\xe6': 'ae',
|
|
'\xde': 'Th', '\xfe': 'th',
|
|
'\xdf': 'ss',
|
|
// Latin Extended-A block.
|
|
'\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
|
|
'\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
|
|
'\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
|
|
'\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
|
|
'\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
|
|
'\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
|
|
'\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
|
|
'\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
|
|
'\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
|
|
'\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
|
|
'\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
|
|
'\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
|
|
'\u0134': 'J', '\u0135': 'j',
|
|
'\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
|
|
'\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
|
|
'\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
|
|
'\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
|
|
'\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
|
|
'\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
|
|
'\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
|
|
'\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
|
|
'\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
|
|
'\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
|
|
'\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
|
|
'\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
|
|
'\u0163': 't', '\u0165': 't', '\u0167': 't',
|
|
'\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
|
|
'\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
|
|
'\u0174': 'W', '\u0175': 'w',
|
|
'\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
|
|
'\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
|
|
'\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
|
|
'\u0132': 'IJ', '\u0133': 'ij',
|
|
'\u0152': 'Oe', '\u0153': 'oe',
|
|
'\u0149': "'n", '\u017f': 's'
|
|
};
|
|
|
|
/**
|
|
* Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
|
|
* letters to basic Latin letters.
|
|
*
|
|
* @private
|
|
* @param {string} letter The matched letter to deburr.
|
|
* @returns {string} Returns the deburred letter.
|
|
*/
|
|
var deburrLetter = basePropertyOf(deburredLetters);
|
|
|
|
module.exports = deburrLetter;
|
|
|
|
|
|
/***/ }),
|
|
/* 612 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* The base implementation of `_.propertyOf` without support for deep paths.
|
|
*
|
|
* @private
|
|
* @param {Object} object The object to query.
|
|
* @returns {Function} Returns the new accessor function.
|
|
*/
|
|
function basePropertyOf(object) {
|
|
return function(key) {
|
|
return object == null ? undefined : object[key];
|
|
};
|
|
}
|
|
|
|
module.exports = basePropertyOf;
|
|
|
|
|
|
/***/ }),
|
|
/* 613 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var basePickBy = __webpack_require__(614),
|
|
hasIn = __webpack_require__(252);
|
|
|
|
/**
|
|
* The base implementation of `_.pick` without support for individual
|
|
* property identifiers.
|
|
*
|
|
* @private
|
|
* @param {Object} object The source object.
|
|
* @param {string[]} paths The property paths to pick.
|
|
* @returns {Object} Returns the new object.
|
|
*/
|
|
function basePick(object, paths) {
|
|
return basePickBy(object, paths, function(value, path) {
|
|
return hasIn(object, path);
|
|
});
|
|
}
|
|
|
|
module.exports = basePick;
|
|
|
|
|
|
/***/ }),
|
|
/* 614 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseGet = __webpack_require__(119),
|
|
baseSet = __webpack_require__(260),
|
|
castPath = __webpack_require__(94);
|
|
|
|
/**
|
|
* The base implementation of `_.pickBy` without support for iteratee shorthands.
|
|
*
|
|
* @private
|
|
* @param {Object} object The source object.
|
|
* @param {string[]} paths The property paths to pick.
|
|
* @param {Function} predicate The function invoked per property.
|
|
* @returns {Object} Returns the new object.
|
|
*/
|
|
function basePickBy(object, paths, predicate) {
|
|
var index = -1,
|
|
length = paths.length,
|
|
result = {};
|
|
|
|
while (++index < length) {
|
|
var path = paths[index],
|
|
value = baseGet(object, path);
|
|
|
|
if (predicate(value, path)) {
|
|
baseSet(result, castPath(path, object), value);
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
module.exports = basePickBy;
|
|
|
|
|
|
/***/ }),
|
|
/* 615 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var flatten = __webpack_require__(616),
|
|
overRest = __webpack_require__(235),
|
|
setToString = __webpack_require__(236);
|
|
|
|
/**
|
|
* A specialized version of `baseRest` which flattens the rest array.
|
|
*
|
|
* @private
|
|
* @param {Function} func The function to apply a rest parameter to.
|
|
* @returns {Function} Returns the new function.
|
|
*/
|
|
function flatRest(func) {
|
|
return setToString(overRest(func, undefined, flatten), func + '');
|
|
}
|
|
|
|
module.exports = flatRest;
|
|
|
|
|
|
/***/ }),
|
|
/* 616 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseFlatten = __webpack_require__(180);
|
|
|
|
/**
|
|
* Flattens `array` a single level deep.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 0.1.0
|
|
* @category Array
|
|
* @param {Array} array The array to flatten.
|
|
* @returns {Array} Returns the new flattened array.
|
|
* @example
|
|
*
|
|
* _.flatten([1, [2, [3, [4]], 5]]);
|
|
* // => [1, 2, [3, [4]], 5]
|
|
*/
|
|
function flatten(array) {
|
|
var length = array == null ? 0 : array.length;
|
|
return length ? baseFlatten(array, 1) : [];
|
|
}
|
|
|
|
module.exports = flatten;
|
|
|
|
|
|
/***/ }),
|
|
/* 617 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var Symbol = __webpack_require__(95),
|
|
isArguments = __webpack_require__(124),
|
|
isArray = __webpack_require__(26);
|
|
|
|
/** Built-in value references. */
|
|
var spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;
|
|
|
|
/**
|
|
* Checks if `value` is a flattenable `arguments` object or array.
|
|
*
|
|
* @private
|
|
* @param {*} value The value to check.
|
|
* @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
|
|
*/
|
|
function isFlattenable(value) {
|
|
return isArray(value) || isArguments(value) ||
|
|
!!(spreadableSymbol && value && value[spreadableSymbol]);
|
|
}
|
|
|
|
module.exports = isFlattenable;
|
|
|
|
|
|
/***/ }),
|
|
/* 618 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var asciiSize = __webpack_require__(619),
|
|
hasUnicode = __webpack_require__(181),
|
|
unicodeSize = __webpack_require__(620);
|
|
|
|
/**
|
|
* Gets the number of symbols in `string`.
|
|
*
|
|
* @private
|
|
* @param {string} string The string to inspect.
|
|
* @returns {number} Returns the string size.
|
|
*/
|
|
function stringSize(string) {
|
|
return hasUnicode(string)
|
|
? unicodeSize(string)
|
|
: asciiSize(string);
|
|
}
|
|
|
|
module.exports = stringSize;
|
|
|
|
|
|
/***/ }),
|
|
/* 619 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseProperty = __webpack_require__(254);
|
|
|
|
/**
|
|
* Gets the size of an ASCII `string`.
|
|
*
|
|
* @private
|
|
* @param {string} string The string inspect.
|
|
* @returns {number} Returns the string size.
|
|
*/
|
|
var asciiSize = baseProperty('length');
|
|
|
|
module.exports = asciiSize;
|
|
|
|
|
|
/***/ }),
|
|
/* 620 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/** Used to compose unicode character classes. */
|
|
var rsAstralRange = '\\ud800-\\udfff',
|
|
rsComboMarksRange = '\\u0300-\\u036f',
|
|
reComboHalfMarksRange = '\\ufe20-\\ufe2f',
|
|
rsComboSymbolsRange = '\\u20d0-\\u20ff',
|
|
rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
|
|
rsVarRange = '\\ufe0e\\ufe0f';
|
|
|
|
/** Used to compose unicode capture groups. */
|
|
var rsAstral = '[' + rsAstralRange + ']',
|
|
rsCombo = '[' + rsComboRange + ']',
|
|
rsFitz = '\\ud83c[\\udffb-\\udfff]',
|
|
rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
|
|
rsNonAstral = '[^' + rsAstralRange + ']',
|
|
rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
|
|
rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
|
|
rsZWJ = '\\u200d';
|
|
|
|
/** Used to compose unicode regexes. */
|
|
var reOptMod = rsModifier + '?',
|
|
rsOptVar = '[' + rsVarRange + ']?',
|
|
rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
|
|
rsSeq = rsOptVar + reOptMod + rsOptJoin,
|
|
rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
|
|
|
|
/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
|
|
var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
|
|
|
|
/**
|
|
* Gets the size of a Unicode `string`.
|
|
*
|
|
* @private
|
|
* @param {string} string The string inspect.
|
|
* @returns {number} Returns the string size.
|
|
*/
|
|
function unicodeSize(string) {
|
|
var result = reUnicode.lastIndex = 0;
|
|
while (reUnicode.test(string)) {
|
|
++result;
|
|
}
|
|
return result;
|
|
}
|
|
|
|
module.exports = unicodeSize;
|
|
|
|
|
|
/***/ }),
|
|
/* 621 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var parse = __webpack_require__(42)
|
|
var startOfYear = __webpack_require__(623)
|
|
var differenceInCalendarDays = __webpack_require__(624)
|
|
|
|
/**
|
|
* @category Day Helpers
|
|
* @summary Get the day of the year of the given date.
|
|
*
|
|
* @description
|
|
* Get the day of the year of the given date.
|
|
*
|
|
* @param {Date|String|Number} date - the given date
|
|
* @returns {Number} the day of year
|
|
*
|
|
* @example
|
|
* // Which day of the year is 2 July 2014?
|
|
* var result = getDayOfYear(new Date(2014, 6, 2))
|
|
* //=> 183
|
|
*/
|
|
function getDayOfYear (dirtyDate) {
|
|
var date = parse(dirtyDate)
|
|
var diff = differenceInCalendarDays(date, startOfYear(date))
|
|
var dayOfYear = diff + 1
|
|
return dayOfYear
|
|
}
|
|
|
|
module.exports = getDayOfYear
|
|
|
|
|
|
/***/ }),
|
|
/* 622 */
|
|
/***/ (function(module, exports) {
|
|
|
|
var MILLISECONDS_IN_MINUTE = 60000
|
|
|
|
/**
|
|
* Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.
|
|
* They usually appear for dates that denote time before the timezones were introduced
|
|
* (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891
|
|
* and GMT+01:00:00 after that date)
|
|
*
|
|
* Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,
|
|
* which would lead to incorrect calculations.
|
|
*
|
|
* This function returns the timezone offset in milliseconds that takes seconds in account.
|
|
*/
|
|
module.exports = function getTimezoneOffsetInMilliseconds (dirtyDate) {
|
|
var date = new Date(dirtyDate.getTime())
|
|
var baseTimezoneOffset = date.getTimezoneOffset()
|
|
date.setSeconds(0, 0)
|
|
var millisecondsPartOfTimezoneOffset = date.getTime() % MILLISECONDS_IN_MINUTE
|
|
|
|
return baseTimezoneOffset * MILLISECONDS_IN_MINUTE + millisecondsPartOfTimezoneOffset
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
/* 623 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var parse = __webpack_require__(42)
|
|
|
|
/**
|
|
* @category Year Helpers
|
|
* @summary Return the start of a year for the given date.
|
|
*
|
|
* @description
|
|
* Return the start of a year for the given date.
|
|
* The result will be in the local timezone.
|
|
*
|
|
* @param {Date|String|Number} date - the original date
|
|
* @returns {Date} the start of a year
|
|
*
|
|
* @example
|
|
* // The start of a year for 2 September 2014 11:55:00:
|
|
* var result = startOfYear(new Date(2014, 8, 2, 11, 55, 00))
|
|
* //=> Wed Jan 01 2014 00:00:00
|
|
*/
|
|
function startOfYear (dirtyDate) {
|
|
var cleanDate = parse(dirtyDate)
|
|
var date = new Date(0)
|
|
date.setFullYear(cleanDate.getFullYear(), 0, 1)
|
|
date.setHours(0, 0, 0, 0)
|
|
return date
|
|
}
|
|
|
|
module.exports = startOfYear
|
|
|
|
|
|
/***/ }),
|
|
/* 624 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var startOfDay = __webpack_require__(97)
|
|
|
|
var MILLISECONDS_IN_MINUTE = 60000
|
|
var MILLISECONDS_IN_DAY = 86400000
|
|
|
|
/**
|
|
* @category Day Helpers
|
|
* @summary Get the number of calendar days between the given dates.
|
|
*
|
|
* @description
|
|
* Get the number of calendar days between the given dates.
|
|
*
|
|
* @param {Date|String|Number} dateLeft - the later date
|
|
* @param {Date|String|Number} dateRight - the earlier date
|
|
* @returns {Number} the number of calendar days
|
|
*
|
|
* @example
|
|
* // How many calendar days are between
|
|
* // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?
|
|
* var result = differenceInCalendarDays(
|
|
* new Date(2012, 6, 2, 0, 0),
|
|
* new Date(2011, 6, 2, 23, 0)
|
|
* )
|
|
* //=> 366
|
|
*/
|
|
function differenceInCalendarDays (dirtyDateLeft, dirtyDateRight) {
|
|
var startOfDayLeft = startOfDay(dirtyDateLeft)
|
|
var startOfDayRight = startOfDay(dirtyDateRight)
|
|
|
|
var timestampLeft = startOfDayLeft.getTime() -
|
|
startOfDayLeft.getTimezoneOffset() * MILLISECONDS_IN_MINUTE
|
|
var timestampRight = startOfDayRight.getTime() -
|
|
startOfDayRight.getTimezoneOffset() * MILLISECONDS_IN_MINUTE
|
|
|
|
// Round the number of days to the nearest integer
|
|
// because the number of milliseconds in a day is not constant
|
|
// (e.g. it's different in the day of the daylight saving time clock shift)
|
|
return Math.round((timestampLeft - timestampRight) / MILLISECONDS_IN_DAY)
|
|
}
|
|
|
|
module.exports = differenceInCalendarDays
|
|
|
|
|
|
/***/ }),
|
|
/* 625 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var parse = __webpack_require__(42)
|
|
var startOfISOWeek = __webpack_require__(182)
|
|
var startOfISOYear = __webpack_require__(627)
|
|
|
|
var MILLISECONDS_IN_WEEK = 604800000
|
|
|
|
/**
|
|
* @category ISO Week Helpers
|
|
* @summary Get the ISO week of the given date.
|
|
*
|
|
* @description
|
|
* Get the ISO week of the given date.
|
|
*
|
|
* ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
|
|
*
|
|
* @param {Date|String|Number} date - the given date
|
|
* @returns {Number} the ISO week
|
|
*
|
|
* @example
|
|
* // Which week of the ISO-week numbering year is 2 January 2005?
|
|
* var result = getISOWeek(new Date(2005, 0, 2))
|
|
* //=> 53
|
|
*/
|
|
function getISOWeek (dirtyDate) {
|
|
var date = parse(dirtyDate)
|
|
var diff = startOfISOWeek(date).getTime() - startOfISOYear(date).getTime()
|
|
|
|
// Round the number of days to the nearest integer
|
|
// because the number of milliseconds in a week is not constant
|
|
// (e.g. it's different in the week of the daylight saving time clock shift)
|
|
return Math.round(diff / MILLISECONDS_IN_WEEK) + 1
|
|
}
|
|
|
|
module.exports = getISOWeek
|
|
|
|
|
|
/***/ }),
|
|
/* 626 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var parse = __webpack_require__(42)
|
|
|
|
/**
|
|
* @category Week Helpers
|
|
* @summary Return the start of a week for the given date.
|
|
*
|
|
* @description
|
|
* Return the start of a week for the given date.
|
|
* The result will be in the local timezone.
|
|
*
|
|
* @param {Date|String|Number} date - the original date
|
|
* @param {Object} [options] - the object with options
|
|
* @param {Number} [options.weekStartsOn=0] - the index of the first day of the week (0 - Sunday)
|
|
* @returns {Date} the start of a week
|
|
*
|
|
* @example
|
|
* // The start of a week for 2 September 2014 11:55:00:
|
|
* var result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0))
|
|
* //=> Sun Aug 31 2014 00:00:00
|
|
*
|
|
* @example
|
|
* // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00:
|
|
* var result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), {weekStartsOn: 1})
|
|
* //=> Mon Sep 01 2014 00:00:00
|
|
*/
|
|
function startOfWeek (dirtyDate, dirtyOptions) {
|
|
var weekStartsOn = dirtyOptions ? (Number(dirtyOptions.weekStartsOn) || 0) : 0
|
|
|
|
var date = parse(dirtyDate)
|
|
var day = date.getDay()
|
|
var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn
|
|
|
|
date.setDate(date.getDate() - diff)
|
|
date.setHours(0, 0, 0, 0)
|
|
return date
|
|
}
|
|
|
|
module.exports = startOfWeek
|
|
|
|
|
|
/***/ }),
|
|
/* 627 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var getISOYear = __webpack_require__(263)
|
|
var startOfISOWeek = __webpack_require__(182)
|
|
|
|
/**
|
|
* @category ISO Week-Numbering Year Helpers
|
|
* @summary Return the start of an ISO week-numbering year for the given date.
|
|
*
|
|
* @description
|
|
* Return the start of an ISO week-numbering year,
|
|
* which always starts 3 days before the year's first Thursday.
|
|
* The result will be in the local timezone.
|
|
*
|
|
* ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date
|
|
*
|
|
* @param {Date|String|Number} date - the original date
|
|
* @returns {Date} the start of an ISO year
|
|
*
|
|
* @example
|
|
* // The start of an ISO week-numbering year for 2 July 2005:
|
|
* var result = startOfISOYear(new Date(2005, 6, 2))
|
|
* //=> Mon Jan 03 2005 00:00:00
|
|
*/
|
|
function startOfISOYear (dirtyDate) {
|
|
var year = getISOYear(dirtyDate)
|
|
var fourthOfJanuary = new Date(0)
|
|
fourthOfJanuary.setFullYear(year, 0, 4)
|
|
fourthOfJanuary.setHours(0, 0, 0, 0)
|
|
var date = startOfISOWeek(fourthOfJanuary)
|
|
return date
|
|
}
|
|
|
|
module.exports = startOfISOYear
|
|
|
|
|
|
/***/ }),
|
|
/* 628 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var buildDistanceInWordsLocale = __webpack_require__(629)
|
|
var buildFormatLocale = __webpack_require__(630)
|
|
|
|
/**
|
|
* @category Locales
|
|
* @summary English locale.
|
|
*/
|
|
module.exports = {
|
|
distanceInWords: buildDistanceInWordsLocale(),
|
|
format: buildFormatLocale()
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
/* 629 */
|
|
/***/ (function(module, exports) {
|
|
|
|
function buildDistanceInWordsLocale () {
|
|
var distanceInWordsLocale = {
|
|
lessThanXSeconds: {
|
|
one: 'less than a second',
|
|
other: 'less than {{count}} seconds'
|
|
},
|
|
|
|
xSeconds: {
|
|
one: '1 second',
|
|
other: '{{count}} seconds'
|
|
},
|
|
|
|
halfAMinute: 'half a minute',
|
|
|
|
lessThanXMinutes: {
|
|
one: 'less than a minute',
|
|
other: 'less than {{count}} minutes'
|
|
},
|
|
|
|
xMinutes: {
|
|
one: '1 minute',
|
|
other: '{{count}} minutes'
|
|
},
|
|
|
|
aboutXHours: {
|
|
one: 'about 1 hour',
|
|
other: 'about {{count}} hours'
|
|
},
|
|
|
|
xHours: {
|
|
one: '1 hour',
|
|
other: '{{count}} hours'
|
|
},
|
|
|
|
xDays: {
|
|
one: '1 day',
|
|
other: '{{count}} days'
|
|
},
|
|
|
|
aboutXMonths: {
|
|
one: 'about 1 month',
|
|
other: 'about {{count}} months'
|
|
},
|
|
|
|
xMonths: {
|
|
one: '1 month',
|
|
other: '{{count}} months'
|
|
},
|
|
|
|
aboutXYears: {
|
|
one: 'about 1 year',
|
|
other: 'about {{count}} years'
|
|
},
|
|
|
|
xYears: {
|
|
one: '1 year',
|
|
other: '{{count}} years'
|
|
},
|
|
|
|
overXYears: {
|
|
one: 'over 1 year',
|
|
other: 'over {{count}} years'
|
|
},
|
|
|
|
almostXYears: {
|
|
one: 'almost 1 year',
|
|
other: 'almost {{count}} years'
|
|
}
|
|
}
|
|
|
|
function localize (token, count, options) {
|
|
options = options || {}
|
|
|
|
var result
|
|
if (typeof distanceInWordsLocale[token] === 'string') {
|
|
result = distanceInWordsLocale[token]
|
|
} else if (count === 1) {
|
|
result = distanceInWordsLocale[token].one
|
|
} else {
|
|
result = distanceInWordsLocale[token].other.replace('{{count}}', count)
|
|
}
|
|
|
|
if (options.addSuffix) {
|
|
if (options.comparison > 0) {
|
|
return 'in ' + result
|
|
} else {
|
|
return result + ' ago'
|
|
}
|
|
}
|
|
|
|
return result
|
|
}
|
|
|
|
return {
|
|
localize: localize
|
|
}
|
|
}
|
|
|
|
module.exports = buildDistanceInWordsLocale
|
|
|
|
|
|
/***/ }),
|
|
/* 630 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var buildFormattingTokensRegExp = __webpack_require__(631)
|
|
|
|
function buildFormatLocale () {
|
|
// Note: in English, the names of days of the week and months are capitalized.
|
|
// If you are making a new locale based on this one, check if the same is true for the language you're working on.
|
|
// Generally, formatted dates should look like they are in the middle of a sentence,
|
|
// e.g. in Spanish language the weekdays and months should be in the lowercase.
|
|
var months3char = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
|
|
var monthsFull = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
|
|
var weekdays2char = ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa']
|
|
var weekdays3char = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']
|
|
var weekdaysFull = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']
|
|
var meridiemUppercase = ['AM', 'PM']
|
|
var meridiemLowercase = ['am', 'pm']
|
|
var meridiemFull = ['a.m.', 'p.m.']
|
|
|
|
var formatters = {
|
|
// Month: Jan, Feb, ..., Dec
|
|
'MMM': function (date) {
|
|
return months3char[date.getMonth()]
|
|
},
|
|
|
|
// Month: January, February, ..., December
|
|
'MMMM': function (date) {
|
|
return monthsFull[date.getMonth()]
|
|
},
|
|
|
|
// Day of week: Su, Mo, ..., Sa
|
|
'dd': function (date) {
|
|
return weekdays2char[date.getDay()]
|
|
},
|
|
|
|
// Day of week: Sun, Mon, ..., Sat
|
|
'ddd': function (date) {
|
|
return weekdays3char[date.getDay()]
|
|
},
|
|
|
|
// Day of week: Sunday, Monday, ..., Saturday
|
|
'dddd': function (date) {
|
|
return weekdaysFull[date.getDay()]
|
|
},
|
|
|
|
// AM, PM
|
|
'A': function (date) {
|
|
return (date.getHours() / 12) >= 1 ? meridiemUppercase[1] : meridiemUppercase[0]
|
|
},
|
|
|
|
// am, pm
|
|
'a': function (date) {
|
|
return (date.getHours() / 12) >= 1 ? meridiemLowercase[1] : meridiemLowercase[0]
|
|
},
|
|
|
|
// a.m., p.m.
|
|
'aa': function (date) {
|
|
return (date.getHours() / 12) >= 1 ? meridiemFull[1] : meridiemFull[0]
|
|
}
|
|
}
|
|
|
|
// Generate ordinal version of formatters: M -> Mo, D -> Do, etc.
|
|
var ordinalFormatters = ['M', 'D', 'DDD', 'd', 'Q', 'W']
|
|
ordinalFormatters.forEach(function (formatterToken) {
|
|
formatters[formatterToken + 'o'] = function (date, formatters) {
|
|
return ordinal(formatters[formatterToken](date))
|
|
}
|
|
})
|
|
|
|
return {
|
|
formatters: formatters,
|
|
formattingTokensRegExp: buildFormattingTokensRegExp(formatters)
|
|
}
|
|
}
|
|
|
|
function ordinal (number) {
|
|
var rem100 = number % 100
|
|
if (rem100 > 20 || rem100 < 10) {
|
|
switch (rem100 % 10) {
|
|
case 1:
|
|
return number + 'st'
|
|
case 2:
|
|
return number + 'nd'
|
|
case 3:
|
|
return number + 'rd'
|
|
}
|
|
}
|
|
return number + 'th'
|
|
}
|
|
|
|
module.exports = buildFormatLocale
|
|
|
|
|
|
/***/ }),
|
|
/* 631 */
|
|
/***/ (function(module, exports) {
|
|
|
|
var commonFormatterKeys = [
|
|
'M', 'MM', 'Q', 'D', 'DD', 'DDD', 'DDDD', 'd',
|
|
'E', 'W', 'WW', 'YY', 'YYYY', 'GG', 'GGGG',
|
|
'H', 'HH', 'h', 'hh', 'm', 'mm',
|
|
's', 'ss', 'S', 'SS', 'SSS',
|
|
'Z', 'ZZ', 'X', 'x'
|
|
]
|
|
|
|
function buildFormattingTokensRegExp (formatters) {
|
|
var formatterKeys = []
|
|
for (var key in formatters) {
|
|
if (formatters.hasOwnProperty(key)) {
|
|
formatterKeys.push(key)
|
|
}
|
|
}
|
|
|
|
var formattingTokens = commonFormatterKeys
|
|
.concat(formatterKeys)
|
|
.sort()
|
|
.reverse()
|
|
var formattingTokensRegExp = new RegExp(
|
|
'(\\[[^\\[]*\\])|(\\\\)?' + '(' + formattingTokens.join('|') + '|.)', 'g'
|
|
)
|
|
|
|
return formattingTokensRegExp
|
|
}
|
|
|
|
module.exports = buildFormattingTokensRegExp
|
|
|
|
|
|
/***/ }),
|
|
/* 632 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var map = {
|
|
"./ca-ES.json": 633,
|
|
"./de-DE.json": 634,
|
|
"./en-US.json": 264,
|
|
"./es-ES.json": 635,
|
|
"./fi-FI.json": 636,
|
|
"./fr-FR.json": 637,
|
|
"./he-IL.json": 638,
|
|
"./it-IT.json": 639,
|
|
"./ja-JP.json": 640,
|
|
"./pl-PL.json": 641,
|
|
"./pt-BR.json": 642,
|
|
"./ru-RU.json": 643,
|
|
"./sv-SE.json": 644,
|
|
"./zh-CN.json": 645
|
|
};
|
|
|
|
|
|
function webpackContext(req) {
|
|
var id = webpackContextResolve(req);
|
|
return __webpack_require__(id);
|
|
}
|
|
function webpackContextResolve(req) {
|
|
if(!__webpack_require__.o(map, req)) {
|
|
var e = new Error("Cannot find module '" + req + "'");
|
|
e.code = 'MODULE_NOT_FOUND';
|
|
throw e;
|
|
}
|
|
return map[req];
|
|
}
|
|
webpackContext.keys = function webpackContextKeys() {
|
|
return Object.keys(map);
|
|
};
|
|
webpackContext.resolve = webpackContextResolve;
|
|
module.exports = webpackContext;
|
|
webpackContext.id = 632;
|
|
|
|
/***/ }),
|
|
/* 633 */
|
|
/***/ (function(module) {
|
|
|
|
module.exports = JSON.parse("{\"todayButton\":\"Avui\",\"nextMonth\":\"Mes següent\",\"previousMonth\":\"Mes anterior\",\"nextYear\":\"Any següent\",\"previousYear\":\"Any anterior\",\"weekdays\":[\"Diumenge\",\"Dilluns\",\"Dimarts\",\"Dimecres\",\"Dijous\",\"Divendres\",\"Dissabte\"],\"months\":[\"Gener\",\"Febrer\",\"Març\",\"Abril\",\"Maig\",\"Juny\",\"Juliol\",\"Agost\",\"Setembre\",\"Octubre\",\"Novembre\",\"Desembre\"]}");
|
|
|
|
/***/ }),
|
|
/* 634 */
|
|
/***/ (function(module) {
|
|
|
|
module.exports = JSON.parse("{\"todayButton\":\"Heute\",\"nextMonth\":\"Nächster Monat\",\"previousMonth\":\"Letzter Monat\",\"nextYear\":\"Nächstes Jahr\",\"previousYear\":\"Letztes Jahr\",\"weekdays\":[\"Sonntag\",\"Montag\",\"Dienstag\",\"Mittwoch\",\"Donnerstag\",\"Freitag\",\"Samstag\"],\"months\":[\"Januar\",\"Februar\",\"März\",\"April\",\"Mai\",\"Juni\",\"Juli\",\"August\",\"September\",\"Oktober\",\"November\",\"Dezember\"]}");
|
|
|
|
/***/ }),
|
|
/* 635 */
|
|
/***/ (function(module) {
|
|
|
|
module.exports = JSON.parse("{\"todayButton\":\"Hoy\",\"nextMonth\":\"Próximo mes\",\"previousMonth\":\"Mes anterior\",\"nextYear\":\"Próximo año\",\"previousYear\":\"Año anterior\",\"weekdays\":[\"Domingo\",\"Lunes\",\"Martes\",\"Miércoles\",\"Jueves\",\"Viernes\",\"Sábado\"],\"months\":[\"Enero\",\"Febrero\",\"Marzo\",\"Abril\",\"Mayo\",\"Junio\",\"Julio\",\"Agosto\",\"Septiembre\",\"Octubre\",\"Noviembre\",\"Diciembre\"]}");
|
|
|
|
/***/ }),
|
|
/* 636 */
|
|
/***/ (function(module) {
|
|
|
|
module.exports = JSON.parse("{\"todayButton\":\"Tänään\",\"nextMonth\":\"Seuraava kuukausi\",\"previousMonth\":\"Edellinen kuukausi\",\"nextYear\":\"Seuraava vuosi\",\"previousYear\":\"Edellinen vuosi\",\"weekdays\":[\"Sunnuntai\",\"Maanantai\",\"Tiistai\",\"Keskiviikko\",\"Torstai\",\"Perjantai\",\"Lauantai\"],\"months\":[\"Tammikuu\",\"Helmikuu\",\"Maaliskuu\",\"Huhtikuu\",\"Toukokuu\",\"Kesäkuu\",\"Heinäkuu\",\"Elokuu\",\"Syyskuu\",\"Lokakuu\",\"Marraskuu\",\"Joulukuu\"]}");
|
|
|
|
/***/ }),
|
|
/* 637 */
|
|
/***/ (function(module) {
|
|
|
|
module.exports = JSON.parse("{\"todayButton\":\"Aujourd'hui\",\"nextMonth\":\"Mois prochain\",\"previousMonth\":\"Mois précédent\",\"nextYear\":\"L'année prochaine\",\"previousYear\":\"Année précédente\",\"weekdays\":[\"Dimanche\",\"Lundi\",\"Mardi\",\"Mercredi\",\"Jeudi\",\"Vendredi\",\"Samedi\"],\"months\":[\"Janvier\",\"Février\",\"Mars\",\"Avril\",\"Mai\",\"Juin\",\"Juillet\",\"Août\",\"Septembre\",\"Octobre\",\"Novembre\",\"Décembre\"]}");
|
|
|
|
/***/ }),
|
|
/* 638 */
|
|
/***/ (function(module) {
|
|
|
|
module.exports = JSON.parse("{\"todayButton\":\"היום\",\"nextMonth\":\"חודש הבא\",\"previousMonth\":\"חודש קודם\",\"nextYear\":\"שנה הבאה\",\"previousYear\":\"שנה קודמת\",\"weekdays\":[\"א\",\"ב\",\"ג\",\"ד\",\"ה\",\"ו\",\"ש\"],\"months\":[\"ינואר\",\"פברואר\",\"מרץ\",\"אפריל\",\"מאי\",\"יוני\",\"יולי\",\"אוגוסט\",\"ספטמבר\",\"אוקטובר\",\"נובמבר\",\"דצמבר\"]}");
|
|
|
|
/***/ }),
|
|
/* 639 */
|
|
/***/ (function(module) {
|
|
|
|
module.exports = JSON.parse("{\"todayButton\":\"Oggi\",\"nextMonth\":\"Prossimo mese\",\"previousMonth\":\"Mese scorso\",\"nextYear\":\"L'anno prossimo\",\"previousYear\":\"L'anno scorso\",\"weekdays\":[\"Domenica\",\"Lunedì\",\"Martedì\",\"Mercoledì\",\"Giovedì\",\"Venerdì\",\"Sabato\"],\"months\":[\"Gennaio\",\"Febbraio\",\"Marzo\",\"Aprile\",\"Maggio\",\"Giugno\",\"Luglio\",\"Agosto\",\"Settembre\",\"Ottobre\",\"Novembre\",\"Dicembre\"]}");
|
|
|
|
/***/ }),
|
|
/* 640 */
|
|
/***/ (function(module) {
|
|
|
|
module.exports = JSON.parse("{\"todayButton\":\"今日\",\"nextMonth\":\"来月\",\"previousMonth\":\"先月\",\"nextYear\":\"来年\",\"previousYear\":\"去年\",\"weekdays\":[\"日曜日\",\"月曜日\",\"火曜日\",\"水曜日\",\"木曜日\",\"金曜日\",\"土曜日\"],\"months\":[\"一月\",\"二月\",\"三月\",\"四月\",\"五月\",\"六月\",\"七月\",\"八月\",\"九月\",\"十月\",\"十一月\",\"十二月\"]}");
|
|
|
|
/***/ }),
|
|
/* 641 */
|
|
/***/ (function(module) {
|
|
|
|
module.exports = JSON.parse("{\"todayButton\":\"Dzisiaj\",\"nextMonth\":\"Następny miesiąc\",\"previousMonth\":\"Poprzedni Miesiąc\",\"nextYear\":\"Następny rok\",\"previousYear\":\"Poprzedni rok\",\"weekdays\":[\"Niedziala\",\"Poniedziałek\",\"Wtorek\",\"Środa\",\"Czwartek\",\"Piątek\",\"Sobota\"],\"months\":[\"Styczeń\",\"Luty\",\"Marzec\",\"Kwiecień\",\"Maj\",\"Czerwiec\",\"Lipiec\",\"Sierpień\",\"Wrzesień\",\"Październik\",\"Listopad\",\"Grudzień\"]}");
|
|
|
|
/***/ }),
|
|
/* 642 */
|
|
/***/ (function(module) {
|
|
|
|
module.exports = JSON.parse("{\"todayButton\":\"Hoje\",\"nextMonth\":\"Próximo mês\",\"previousMonth\":\"Mês anterior\",\"nextYear\":\"Próximo ano\",\"previousYear\":\"Ano anterior\",\"weekdays\":[\"Domingo\",\"Segunda\",\"Terça\",\"Quarta\",\"Quinta\",\"Sexta\",\"Sábado\"],\"months\":[\"Janeiro\",\"Fevereiro\",\"Março\",\"Abril\",\"Maio\",\"Junho\",\"Julho\",\"Agosto\",\"Setembro\",\"Outubro\",\"Novembro\",\"Dezembro\"]}");
|
|
|
|
/***/ }),
|
|
/* 643 */
|
|
/***/ (function(module) {
|
|
|
|
module.exports = JSON.parse("{\"todayButton\":\"Cегодня\",\"nextMonth\":\"Следующий месяц\",\"previousMonth\":\"Прошлый месяц\",\"nextYear\":\"В следующем году\",\"previousYear\":\"Предыдущий год\",\"weekdays\":[\"воскресенье\",\"понедельник\",\"вторник\",\"среда\",\"четверг\",\"пятница\",\"суббота\"],\"months\":[\"Январь\",\"Февраль\",\"Март\",\"Апрель\",\"Май\",\"Июнь\",\"Июль\",\"Август\",\"Сентябрь\",\"Октябрь\",\"Ноябрь\",\"Декабрь\"]}");
|
|
|
|
/***/ }),
|
|
/* 644 */
|
|
/***/ (function(module) {
|
|
|
|
module.exports = JSON.parse("{\"todayButton\":\"Idag\",\"nextMonth\":\"Nästa månad\",\"previousMonth\":\"Föregående månad\",\"nextYear\":\"Nästa år\",\"previousYear\":\"Föregående år\",\"weekdays\":[\"Söndag\",\"Måndag\",\"Tisdag\",\"Onsdag\",\"Torsdag\",\"Fredag\",\"Lördag\"],\"months\":[\"Januari\",\"Februari\",\"Mars\",\"April\",\"Maj\",\"Juni\",\"Juli\",\"Augusti\",\"September\",\"Oktober\",\"November\",\"December\"]}");
|
|
|
|
/***/ }),
|
|
/* 645 */
|
|
/***/ (function(module) {
|
|
|
|
module.exports = JSON.parse("{\"todayButton\":\"今天\",\"nextMonth\":\"下个月\",\"previousMonth\":\"前一个月\",\"nextYear\":\"明年\",\"previousYear\":\"去年\",\"weekdays\":[\"星期日\",\"星期一\",\"星期二\",\"星期三\",\"星期四\",\"星期五\",\"星期六\"],\"months\":[\"一月\",\"二月\",\"三月\",\"四月\",\"五月\",\"六月\",\"七月\",\"八月\",\"九月\",\"十月\",\"十一月\",\"十二月\"]}");
|
|
|
|
/***/ }),
|
|
/* 646 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
exports = module.exports = __webpack_require__(647)(false);
|
|
// Module
|
|
exports.push([module.i, ".clndr-cell{background-color:#fff;-webkit-transition:all .2s;transition:all .2s;padding:5px 0;height:30px;cursor:pointer}.clndr-cell:hover{background-color:#cacbcd;color:inherit}.clndr-cell-today{background-color:#e0e1e2}.clndr-cell-inrange{background-color:#cacbcd;color:inherit}.clndr-cell-disabled{cursor:default;opacity:.45}.clndr-cell-disabled:hover{background-color:#fff}.clndr-cell-selected{background-color:#4f4f4f;color:#f2f2f2}.clndr-cell-other-month{color:#d9d9d9}\n.clndr-calendars-segment{text-align:center;position:absolute!important;margin-top:.25rem!important;z-index:2000}.clndr-calendars-wrapper{display:grid;grid-gap:1em;grid-template-columns:repeat(var(--n,1),1fr)}.clndr-control{display:grid;grid-template-columns:repeat(3,1fr);margin-bottom:10px;-webkit-box-align:center;align-items:center}.clndr-days{text-align:center;display:grid;grid-gap:1px;grid-template-columns:repeat(7,2.2rem);background-color:rgba(0,0,0,.1);border:1px solid rgba(0,0,0,.1);border-radius:.28571429rem}.clndr-left{left:0}.clndr-right{right:0}.clndr-top{bottom:100%}.clndr-bottom{top:100%}.clndr-calendars-segment.clndr-top{box-shadow:0 -1px 2px 0 rgba(34,36,38,.15)!important;margin-bottom:.25rem!important}", ""]);
|
|
|
|
|
|
/***/ }),
|
|
/* 647 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
"use strict";
|
|
|
|
|
|
/*
|
|
MIT License http://www.opensource.org/licenses/mit-license.php
|
|
Author Tobias Koppers @sokra
|
|
*/
|
|
// css base code, injected by the css-loader
|
|
// eslint-disable-next-line func-names
|
|
module.exports = function (useSourceMap) {
|
|
var list = []; // return the list of modules as css string
|
|
|
|
list.toString = function toString() {
|
|
return this.map(function (item) {
|
|
var content = cssWithMappingToString(item, useSourceMap);
|
|
|
|
if (item[2]) {
|
|
return "@media ".concat(item[2], "{").concat(content, "}");
|
|
}
|
|
|
|
return content;
|
|
}).join('');
|
|
}; // import a list of modules into the list
|
|
// eslint-disable-next-line func-names
|
|
|
|
|
|
list.i = function (modules, mediaQuery) {
|
|
if (typeof modules === 'string') {
|
|
// eslint-disable-next-line no-param-reassign
|
|
modules = [[null, modules, '']];
|
|
}
|
|
|
|
var alreadyImportedModules = {};
|
|
|
|
for (var i = 0; i < this.length; i++) {
|
|
// eslint-disable-next-line prefer-destructuring
|
|
var id = this[i][0];
|
|
|
|
if (id != null) {
|
|
alreadyImportedModules[id] = true;
|
|
}
|
|
}
|
|
|
|
for (var _i = 0; _i < modules.length; _i++) {
|
|
var item = modules[_i]; // skip already imported module
|
|
// this implementation is not 100% perfect for weird media query combinations
|
|
// when a module is imported multiple times with different media queries.
|
|
// I hope this will never occur (Hey this way we have smaller bundles)
|
|
|
|
if (item[0] == null || !alreadyImportedModules[item[0]]) {
|
|
if (mediaQuery && !item[2]) {
|
|
item[2] = mediaQuery;
|
|
} else if (mediaQuery) {
|
|
item[2] = "(".concat(item[2], ") and (").concat(mediaQuery, ")");
|
|
}
|
|
|
|
list.push(item);
|
|
}
|
|
}
|
|
};
|
|
|
|
return list;
|
|
};
|
|
|
|
function cssWithMappingToString(item, useSourceMap) {
|
|
var content = item[1] || ''; // eslint-disable-next-line prefer-destructuring
|
|
|
|
var cssMapping = item[3];
|
|
|
|
if (!cssMapping) {
|
|
return content;
|
|
}
|
|
|
|
if (useSourceMap && typeof btoa === 'function') {
|
|
var sourceMapping = toComment(cssMapping);
|
|
var sourceURLs = cssMapping.sources.map(function (source) {
|
|
return "/*# sourceURL=".concat(cssMapping.sourceRoot).concat(source, " */");
|
|
});
|
|
return [content].concat(sourceURLs).concat([sourceMapping]).join('\n');
|
|
}
|
|
|
|
return [content].join('\n');
|
|
} // Adapted from convert-source-map (MIT)
|
|
|
|
|
|
function toComment(sourceMap) {
|
|
// eslint-disable-next-line no-undef
|
|
var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));
|
|
var data = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64);
|
|
return "/*# ".concat(data, " */");
|
|
}
|
|
|
|
/***/ }),
|
|
/* 648 */
|
|
/***/ (function(module, exports) {
|
|
|
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
if (source == null) return {};
|
|
var target = {};
|
|
var sourceKeys = Object.keys(source);
|
|
var key, i;
|
|
|
|
for (i = 0; i < sourceKeys.length; i++) {
|
|
key = sourceKeys[i];
|
|
if (excluded.indexOf(key) >= 0) continue;
|
|
target[key] = source[key];
|
|
}
|
|
|
|
return target;
|
|
}
|
|
|
|
module.exports = _objectWithoutPropertiesLoose;
|
|
|
|
/***/ }),
|
|
/* 649 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var arrayReduce = __webpack_require__(261),
|
|
deburr = __webpack_require__(131),
|
|
words = __webpack_require__(650);
|
|
|
|
/** Used to compose unicode capture groups. */
|
|
var rsApos = "['\u2019]";
|
|
|
|
/** Used to match apostrophes. */
|
|
var reApos = RegExp(rsApos, 'g');
|
|
|
|
/**
|
|
* Creates a function like `_.camelCase`.
|
|
*
|
|
* @private
|
|
* @param {Function} callback The function to combine each word.
|
|
* @returns {Function} Returns the new compounder function.
|
|
*/
|
|
function createCompounder(callback) {
|
|
return function(string) {
|
|
return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
|
|
};
|
|
}
|
|
|
|
module.exports = createCompounder;
|
|
|
|
|
|
/***/ }),
|
|
/* 650 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var asciiWords = __webpack_require__(651),
|
|
hasUnicodeWord = __webpack_require__(652),
|
|
toString = __webpack_require__(82),
|
|
unicodeWords = __webpack_require__(653);
|
|
|
|
/**
|
|
* Splits `string` into an array of its words.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 3.0.0
|
|
* @category String
|
|
* @param {string} [string=''] The string to inspect.
|
|
* @param {RegExp|string} [pattern] The pattern to match words.
|
|
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
|
|
* @returns {Array} Returns the words of `string`.
|
|
* @example
|
|
*
|
|
* _.words('fred, barney, & pebbles');
|
|
* // => ['fred', 'barney', 'pebbles']
|
|
*
|
|
* _.words('fred, barney, & pebbles', /[^, ]+/g);
|
|
* // => ['fred', 'barney', '&', 'pebbles']
|
|
*/
|
|
function words(string, pattern, guard) {
|
|
string = toString(string);
|
|
pattern = guard ? undefined : pattern;
|
|
|
|
if (pattern === undefined) {
|
|
return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
|
|
}
|
|
return string.match(pattern) || [];
|
|
}
|
|
|
|
module.exports = words;
|
|
|
|
|
|
/***/ }),
|
|
/* 651 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/** Used to match words composed of alphanumeric characters. */
|
|
var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
|
|
|
|
/**
|
|
* Splits an ASCII `string` into an array of its words.
|
|
*
|
|
* @private
|
|
* @param {string} The string to inspect.
|
|
* @returns {Array} Returns the words of `string`.
|
|
*/
|
|
function asciiWords(string) {
|
|
return string.match(reAsciiWord) || [];
|
|
}
|
|
|
|
module.exports = asciiWords;
|
|
|
|
|
|
/***/ }),
|
|
/* 652 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/** Used to detect strings that need a more robust regexp to match words. */
|
|
var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
|
|
|
|
/**
|
|
* Checks if `string` contains a word composed of Unicode symbols.
|
|
*
|
|
* @private
|
|
* @param {string} string The string to inspect.
|
|
* @returns {boolean} Returns `true` if a word is found, else `false`.
|
|
*/
|
|
function hasUnicodeWord(string) {
|
|
return reHasUnicodeWord.test(string);
|
|
}
|
|
|
|
module.exports = hasUnicodeWord;
|
|
|
|
|
|
/***/ }),
|
|
/* 653 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/** Used to compose unicode character classes. */
|
|
var rsAstralRange = '\\ud800-\\udfff',
|
|
rsComboMarksRange = '\\u0300-\\u036f',
|
|
reComboHalfMarksRange = '\\ufe20-\\ufe2f',
|
|
rsComboSymbolsRange = '\\u20d0-\\u20ff',
|
|
rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
|
|
rsDingbatRange = '\\u2700-\\u27bf',
|
|
rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
|
|
rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
|
|
rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
|
|
rsPunctuationRange = '\\u2000-\\u206f',
|
|
rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
|
|
rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
|
|
rsVarRange = '\\ufe0e\\ufe0f',
|
|
rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
|
|
|
|
/** Used to compose unicode capture groups. */
|
|
var rsApos = "['\u2019]",
|
|
rsBreak = '[' + rsBreakRange + ']',
|
|
rsCombo = '[' + rsComboRange + ']',
|
|
rsDigits = '\\d+',
|
|
rsDingbat = '[' + rsDingbatRange + ']',
|
|
rsLower = '[' + rsLowerRange + ']',
|
|
rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
|
|
rsFitz = '\\ud83c[\\udffb-\\udfff]',
|
|
rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
|
|
rsNonAstral = '[^' + rsAstralRange + ']',
|
|
rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
|
|
rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
|
|
rsUpper = '[' + rsUpperRange + ']',
|
|
rsZWJ = '\\u200d';
|
|
|
|
/** Used to compose unicode regexes. */
|
|
var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
|
|
rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
|
|
rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
|
|
rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
|
|
reOptMod = rsModifier + '?',
|
|
rsOptVar = '[' + rsVarRange + ']?',
|
|
rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
|
|
rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
|
|
rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
|
|
rsSeq = rsOptVar + reOptMod + rsOptJoin,
|
|
rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq;
|
|
|
|
/** Used to match complex or compound words. */
|
|
var reUnicodeWord = RegExp([
|
|
rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
|
|
rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
|
|
rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
|
|
rsUpper + '+' + rsOptContrUpper,
|
|
rsOrdUpper,
|
|
rsOrdLower,
|
|
rsDigits,
|
|
rsEmoji
|
|
].join('|'), 'g');
|
|
|
|
/**
|
|
* Splits a Unicode `string` into an array of its words.
|
|
*
|
|
* @private
|
|
* @param {string} The string to inspect.
|
|
* @returns {Array} Returns the words of `string`.
|
|
*/
|
|
function unicodeWords(string) {
|
|
return string.match(reUnicodeWord) || [];
|
|
}
|
|
|
|
module.exports = unicodeWords;
|
|
|
|
|
|
/***/ }),
|
|
/* 654 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var createCaseFirst = __webpack_require__(655);
|
|
|
|
/**
|
|
* Converts the first character of `string` to upper case.
|
|
*
|
|
* @static
|
|
* @memberOf _
|
|
* @since 4.0.0
|
|
* @category String
|
|
* @param {string} [string=''] The string to convert.
|
|
* @returns {string} Returns the converted string.
|
|
* @example
|
|
*
|
|
* _.upperFirst('fred');
|
|
* // => 'Fred'
|
|
*
|
|
* _.upperFirst('FRED');
|
|
* // => 'FRED'
|
|
*/
|
|
var upperFirst = createCaseFirst('toUpperCase');
|
|
|
|
module.exports = upperFirst;
|
|
|
|
|
|
/***/ }),
|
|
/* 655 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var castSlice = __webpack_require__(656),
|
|
hasUnicode = __webpack_require__(181),
|
|
stringToArray = __webpack_require__(657),
|
|
toString = __webpack_require__(82);
|
|
|
|
/**
|
|
* Creates a function like `_.lowerFirst`.
|
|
*
|
|
* @private
|
|
* @param {string} methodName The name of the `String` case method to use.
|
|
* @returns {Function} Returns the new case function.
|
|
*/
|
|
function createCaseFirst(methodName) {
|
|
return function(string) {
|
|
string = toString(string);
|
|
|
|
var strSymbols = hasUnicode(string)
|
|
? stringToArray(string)
|
|
: undefined;
|
|
|
|
var chr = strSymbols
|
|
? strSymbols[0]
|
|
: string.charAt(0);
|
|
|
|
var trailing = strSymbols
|
|
? castSlice(strSymbols, 1).join('')
|
|
: string.slice(1);
|
|
|
|
return chr[methodName]() + trailing;
|
|
};
|
|
}
|
|
|
|
module.exports = createCaseFirst;
|
|
|
|
|
|
/***/ }),
|
|
/* 656 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var baseSlice = __webpack_require__(169);
|
|
|
|
/**
|
|
* Casts `array` to a slice if it's needed.
|
|
*
|
|
* @private
|
|
* @param {Array} array The array to inspect.
|
|
* @param {number} start The start position.
|
|
* @param {number} [end=array.length] The end position.
|
|
* @returns {Array} Returns the cast slice.
|
|
*/
|
|
function castSlice(array, start, end) {
|
|
var length = array.length;
|
|
end = end === undefined ? length : end;
|
|
return (!start && end >= length) ? array : baseSlice(array, start, end);
|
|
}
|
|
|
|
module.exports = castSlice;
|
|
|
|
|
|
/***/ }),
|
|
/* 657 */
|
|
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
var asciiToArray = __webpack_require__(658),
|
|
hasUnicode = __webpack_require__(181),
|
|
unicodeToArray = __webpack_require__(659);
|
|
|
|
/**
|
|
* Converts `string` to an array.
|
|
*
|
|
* @private
|
|
* @param {string} string The string to convert.
|
|
* @returns {Array} Returns the converted array.
|
|
*/
|
|
function stringToArray(string) {
|
|
return hasUnicode(string)
|
|
? unicodeToArray(string)
|
|
: asciiToArray(string);
|
|
}
|
|
|
|
module.exports = stringToArray;
|
|
|
|
|
|
/***/ }),
|
|
/* 658 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/**
|
|
* Converts an ASCII `string` to an array.
|
|
*
|
|
* @private
|
|
* @param {string} string The string to convert.
|
|
* @returns {Array} Returns the converted array.
|
|
*/
|
|
function asciiToArray(string) {
|
|
return string.split('');
|
|
}
|
|
|
|
module.exports = asciiToArray;
|
|
|
|
|
|
/***/ }),
|
|
/* 659 */
|
|
/***/ (function(module, exports) {
|
|
|
|
/** Used to compose unicode character classes. */
|
|
var rsAstralRange = '\\ud800-\\udfff',
|
|
rsComboMarksRange = '\\u0300-\\u036f',
|
|
reComboHalfMarksRange = '\\ufe20-\\ufe2f',
|
|
rsComboSymbolsRange = '\\u20d0-\\u20ff',
|
|
rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
|
|
rsVarRange = '\\ufe0e\\ufe0f';
|
|
|
|
/** Used to compose unicode capture groups. */
|
|
var rsAstral = '[' + rsAstralRange + ']',
|
|
rsCombo = '[' + rsComboRange + ']',
|
|
rsFitz = '\\ud83c[\\udffb-\\udfff]',
|
|
rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
|
|
rsNonAstral = '[^' + rsAstralRange + ']',
|
|
rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
|
|
rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
|
|
rsZWJ = '\\u200d';
|
|
|
|
/** Used to compose unicode regexes. */
|
|
var reOptMod = rsModifier + '?',
|
|
rsOptVar = '[' + rsVarRange + ']?',
|
|
rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
|
|
rsSeq = rsOptVar + reOptMod + rsOptJoin,
|
|
rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
|
|
|
|
/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
|
|
var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
|
|
|
|
/**
|
|
* Converts a Unicode `string` to an array.
|
|
*
|
|
* @private
|
|
* @param {string} string The string to convert.
|
|
* @returns {Array} Returns the converted array.
|
|
*/
|
|
function unicodeToArray(string) {
|
|
return string.match(reUnicode) || [];
|
|
}
|
|
|
|
module.exports = unicodeToArray;
|
|
|
|
|
|
/***/ }),
|
|
/* 660 */
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
var childrenUtils_namespaceObject = {};
|
|
__webpack_require__.r(childrenUtils_namespaceObject);
|
|
__webpack_require__.d(childrenUtils_namespaceObject, "someByType", function() { return childrenUtils_someByType; });
|
|
__webpack_require__.d(childrenUtils_namespaceObject, "findByType", function() { return childrenUtils_findByType; });
|
|
__webpack_require__.d(childrenUtils_namespaceObject, "isNil", function() { return childrenUtils_isNil; });
|
|
|
|
// EXTERNAL MODULE: ./node_modules/react/index.js
|
|
var react = __webpack_require__(0);
|
|
var react_default = /*#__PURE__*/__webpack_require__.n(react);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/react-dom/index.js
|
|
var react_dom = __webpack_require__(75);
|
|
var react_dom_default = /*#__PURE__*/__webpack_require__.n(react_dom);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/extends.js
|
|
var helpers_extends = __webpack_require__(4);
|
|
var extends_default = /*#__PURE__*/__webpack_require__.n(helpers_extends);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/classCallCheck.js
|
|
var classCallCheck = __webpack_require__(11);
|
|
var classCallCheck_default = /*#__PURE__*/__webpack_require__.n(classCallCheck);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/createClass.js
|
|
var createClass = __webpack_require__(12);
|
|
var createClass_default = /*#__PURE__*/__webpack_require__.n(createClass);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js
|
|
var possibleConstructorReturn = __webpack_require__(13);
|
|
var possibleConstructorReturn_default = /*#__PURE__*/__webpack_require__.n(possibleConstructorReturn);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/getPrototypeOf.js
|
|
var getPrototypeOf = __webpack_require__(10);
|
|
var getPrototypeOf_default = /*#__PURE__*/__webpack_require__.n(getPrototypeOf);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/assertThisInitialized.js
|
|
var assertThisInitialized = __webpack_require__(2);
|
|
var assertThisInitialized_default = /*#__PURE__*/__webpack_require__.n(assertThisInitialized);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/inherits.js
|
|
var inherits = __webpack_require__(14);
|
|
var inherits_default = /*#__PURE__*/__webpack_require__.n(inherits);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/defineProperty.js
|
|
var defineProperty = __webpack_require__(1);
|
|
var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash/invoke.js
|
|
var invoke = __webpack_require__(7);
|
|
var invoke_default = /*#__PURE__*/__webpack_require__.n(invoke);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash/without.js
|
|
var without = __webpack_require__(58);
|
|
var without_default = /*#__PURE__*/__webpack_require__.n(without);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/classnames/index.js
|
|
var classnames = __webpack_require__(6);
|
|
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/prop-types/index.js
|
|
var prop_types = __webpack_require__(5);
|
|
var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/typeof.js
|
|
var helpers_typeof = __webpack_require__(53);
|
|
var typeof_default = /*#__PURE__*/__webpack_require__.n(helpers_typeof);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/lib/numberToWord.js
|
|
|
|
var numberToWordMap = {
|
|
1: 'one',
|
|
2: 'two',
|
|
3: 'three',
|
|
4: 'four',
|
|
5: 'five',
|
|
6: 'six',
|
|
7: 'seven',
|
|
8: 'eight',
|
|
9: 'nine',
|
|
10: 'ten',
|
|
11: 'eleven',
|
|
12: 'twelve',
|
|
13: 'thirteen',
|
|
14: 'fourteen',
|
|
15: 'fifteen',
|
|
16: 'sixteen'
|
|
/**
|
|
* Return the number word for numbers 1-16.
|
|
* Returns strings or numbers as is if there is no corresponding word.
|
|
* Returns an empty string if value is not a string or number.
|
|
* @param {string|number} value The value to convert to a word.
|
|
* @returns {string}
|
|
*/
|
|
|
|
};
|
|
function numberToWord(value) {
|
|
var type = typeof_default()(value);
|
|
|
|
if (type === 'string' || type === 'number') {
|
|
return numberToWordMap[value] || value;
|
|
}
|
|
|
|
return '';
|
|
}
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/lib/classNameBuilders.js
|
|
|
|
|
|
/*
|
|
* There are 3 prop patterns used to build up the className for a component.
|
|
* Each utility here is meant for use in a classnames() argument.
|
|
*
|
|
* There is no util for valueOnly() because it would simply return val.
|
|
* Use the prop value inline instead.
|
|
* <Label size='big' />
|
|
* <div class="ui big label"></div>
|
|
*/
|
|
|
|
/**
|
|
* Props where only the prop key is used in the className.
|
|
* @param {*} val A props value
|
|
* @param {string} key A props key
|
|
*
|
|
* @example
|
|
* <Label tag />
|
|
* <div class="ui tag label"></div>
|
|
*/
|
|
|
|
var useKeyOnly = function useKeyOnly(val, key) {
|
|
return val && key;
|
|
};
|
|
/**
|
|
* Props that require both a key and value to create a className.
|
|
* @param {*} val A props value
|
|
* @param {string} key A props key
|
|
*
|
|
* @example
|
|
* <Label corner='left' />
|
|
* <div class="ui left corner label"></div>
|
|
*/
|
|
|
|
var useValueAndKey = function useValueAndKey(val, key) {
|
|
return val && val !== true && "".concat(val, " ").concat(key);
|
|
};
|
|
/**
|
|
* Props whose key will be used in className, or value and key.
|
|
* @param {*} val A props value
|
|
* @param {string} key A props key
|
|
*
|
|
* @example Key Only
|
|
* <Label pointing />
|
|
* <div class="ui pointing label"></div>
|
|
*
|
|
* @example Key and Value
|
|
* <Label pointing='left' />
|
|
* <div class="ui left pointing label"></div>
|
|
*/
|
|
|
|
var useKeyOrValueAndKey = function useKeyOrValueAndKey(val, key) {
|
|
return val && (val === true ? key : "".concat(val, " ").concat(key));
|
|
}; //
|
|
// Prop to className exceptions
|
|
//
|
|
|
|
/**
|
|
* The "multiple" prop implements control of visibility and reserved classes for Grid subcomponents.
|
|
*
|
|
* @param {*} val The value of the "multiple" prop
|
|
* @param {*} key A props key
|
|
*
|
|
* @example
|
|
* <Grid.Row only='mobile' />
|
|
* <Grid.Row only='mobile tablet' />
|
|
* <div class="mobile only row"></div>
|
|
* <div class="mobile only tablet only row"></div>
|
|
*/
|
|
|
|
var useMultipleProp = function useMultipleProp(val, key) {
|
|
if (!val || val === true) return null;
|
|
return val.replace('large screen', 'large-screen').replace(/ vertically/g, '-vertically').split(' ').map(function (prop) {
|
|
return "".concat(prop.replace('-', ' '), " ").concat(key);
|
|
}).join(' ');
|
|
};
|
|
/**
|
|
* The "textAlign" prop follows the useValueAndKey except when the value is "justified'.
|
|
* In this case, only the class "justified" is used, ignoring the "aligned" class.
|
|
* @param {*} val The value of the "textAlign" prop
|
|
*
|
|
* @example
|
|
* <Container textAlign='justified' />
|
|
* <div class="ui justified container"></div>
|
|
*
|
|
* @example
|
|
* <Container textAlign='left' />
|
|
* <div class="ui left aligned container"></div>
|
|
*/
|
|
|
|
var useTextAlignProp = function useTextAlignProp(val) {
|
|
return val === 'justified' ? 'justified' : useValueAndKey(val, 'aligned');
|
|
};
|
|
/**
|
|
* The "verticalAlign" prop follows the useValueAndKey.
|
|
*
|
|
* @param {*} val The value of the "verticalAlign" prop
|
|
*
|
|
* @example
|
|
* <Grid verticalAlign='middle' />
|
|
* <div class="ui middle aligned grid"></div>
|
|
*/
|
|
|
|
var useVerticalAlignProp = function useVerticalAlignProp(val) {
|
|
return useValueAndKey(val, 'aligned');
|
|
};
|
|
/**
|
|
* Create "X", "X wide" and "equal width" classNames.
|
|
* "X" is a numberToWord value and "wide" is configurable.
|
|
* @param {*} val The prop value
|
|
* @param {string} [widthClass=''] The class
|
|
* @param {boolean} [canEqual=false] Flag that indicates possibility of "equal" value
|
|
*
|
|
* @example
|
|
* <Grid columns='equal' />
|
|
* <div class="ui equal width grid"></div>
|
|
*
|
|
* <Form widths='equal' />
|
|
* <div class="ui equal width form"></div>
|
|
*
|
|
* <FieldGroup widths='equal' />
|
|
* <div class="equal width fields"></div>
|
|
*
|
|
* @example
|
|
* <Grid columns={4} />
|
|
* <div class="ui four column grid"></div>
|
|
*/
|
|
|
|
var classNameBuilders_useWidthProp = function useWidthProp(val) {
|
|
var widthClass = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
var canEqual = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
|
|
if (canEqual && val === 'equal') {
|
|
return 'equal width';
|
|
}
|
|
|
|
var valType = typeof_default()(val);
|
|
|
|
if ((valType === 'string' || valType === 'number') && widthClass) {
|
|
return "".concat(numberToWord(val), " ").concat(widthClass);
|
|
}
|
|
|
|
return numberToWord(val);
|
|
};
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/lib/getUnhandledProps.js
|
|
/**
|
|
* Returns an object consisting of props beyond the scope of the Component.
|
|
* Useful for getting and spreading unknown props from the user.
|
|
* @param {function} Component A function or ReactClass.
|
|
* @param {object} props A ReactElement props object
|
|
* @returns {{}} A shallow copy of the prop object
|
|
*/
|
|
var getUnhandledProps = function getUnhandledProps(Component, props) {
|
|
// Note that `handledProps` are generated automatically during build with `babel-plugin-transform-react-handled-props`
|
|
var _Component$handledPro = Component.handledProps,
|
|
handledProps = _Component$handledPro === void 0 ? [] : _Component$handledPro;
|
|
return Object.keys(props).reduce(function (acc, prop) {
|
|
if (prop === 'childKey') return acc;
|
|
if (handledProps.indexOf(prop) === -1) acc[prop] = props[prop];
|
|
return acc;
|
|
}, {});
|
|
};
|
|
|
|
/* harmony default export */ var lib_getUnhandledProps = (getUnhandledProps);
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/lib/getElementType.js
|
|
/**
|
|
* Returns a createElement() type based on the props of the Component.
|
|
* Useful for calculating what type a component should render as.
|
|
*
|
|
* @param {function} Component A function or ReactClass.
|
|
* @param {object} props A ReactElement props object
|
|
* @param {function} [getDefault] A function that returns a default element type.
|
|
* @returns {string|function} A ReactElement type
|
|
*/
|
|
function getElementType(Component, props, getDefault) {
|
|
var _Component$defaultPro = Component.defaultProps,
|
|
defaultProps = _Component$defaultPro === void 0 ? {} : _Component$defaultPro; // ----------------------------------------
|
|
// user defined "as" element type
|
|
|
|
if (props.as && props.as !== defaultProps.as) return props.as; // ----------------------------------------
|
|
// computed default element type
|
|
|
|
if (getDefault) {
|
|
var computedDefault = getDefault();
|
|
if (computedDefault) return computedDefault;
|
|
} // ----------------------------------------
|
|
// infer anchor links
|
|
|
|
|
|
if (props.href) return 'a'; // ----------------------------------------
|
|
// use defaultProp or 'div'
|
|
|
|
return defaultProps.as || 'div';
|
|
}
|
|
|
|
/* harmony default export */ var lib_getElementType = (getElementType);
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/toConsumableArray.js
|
|
var toConsumableArray = __webpack_require__(127);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash/isNil.js
|
|
var isNil = __webpack_require__(8);
|
|
var isNil_default = /*#__PURE__*/__webpack_require__.n(isNil);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/react-is/index.js
|
|
var react_is = __webpack_require__(270);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
|
|
function _classCallCheck(instance, Constructor) {
|
|
if (!(instance instanceof Constructor)) {
|
|
throw new TypeError("Cannot call a class as a function");
|
|
}
|
|
}
|
|
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
|
|
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);
|
|
}
|
|
}
|
|
|
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
return Constructor;
|
|
}
|
|
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
|
|
function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); }
|
|
|
|
function _typeof(obj) {
|
|
if (typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol") {
|
|
_typeof = function _typeof(obj) {
|
|
return _typeof2(obj);
|
|
};
|
|
} else {
|
|
_typeof = function _typeof(obj) {
|
|
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj);
|
|
};
|
|
}
|
|
|
|
return _typeof(obj);
|
|
}
|
|
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
|
|
function _assertThisInitialized(self) {
|
|
if (self === void 0) {
|
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
}
|
|
|
|
return self;
|
|
}
|
|
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
|
|
|
|
|
|
function _possibleConstructorReturn(self, call) {
|
|
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
|
return call;
|
|
}
|
|
|
|
return _assertThisInitialized(self);
|
|
}
|
|
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
|
|
function _getPrototypeOf(o) {
|
|
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
};
|
|
return _getPrototypeOf(o);
|
|
}
|
|
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
|
|
function _setPrototypeOf(o, p) {
|
|
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
o.__proto__ = p;
|
|
return o;
|
|
};
|
|
|
|
return _setPrototypeOf(o, p);
|
|
}
|
|
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
|
|
|
|
function _inherits(subClass, superClass) {
|
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
throw new TypeError("Super expression must either be null or a function");
|
|
}
|
|
|
|
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
constructor: {
|
|
value: subClass,
|
|
writable: true,
|
|
configurable: true
|
|
}
|
|
});
|
|
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
}
|
|
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
|
function _defineProperty(obj, key, value) {
|
|
if (key in obj) {
|
|
Object.defineProperty(obj, key, {
|
|
value: value,
|
|
enumerable: true,
|
|
configurable: true,
|
|
writable: true
|
|
});
|
|
} else {
|
|
obj[key] = value;
|
|
}
|
|
|
|
return obj;
|
|
}
|
|
// CONCATENATED MODULE: ./node_modules/@stardust-ui/react-component-ref/dist/es/handleRef.js
|
|
|
|
|
|
/**
|
|
* The function that correctly handles passing refs.
|
|
*
|
|
* @param ref An ref object or function
|
|
* @param node A node that should be passed by ref
|
|
*/
|
|
var handleRef_handleRef = function handleRef(ref, node) {
|
|
if (false) {}
|
|
|
|
if (typeof ref === 'function') {
|
|
ref(node);
|
|
return;
|
|
}
|
|
|
|
if (ref !== null && _typeof(ref) === 'object') {
|
|
// The `current` property is defined as readonly, however it's a valid way because
|
|
// `ref` is a mutable object
|
|
;
|
|
ref.current = node;
|
|
}
|
|
};
|
|
|
|
/* harmony default export */ var es_handleRef = (handleRef_handleRef);
|
|
// CONCATENATED MODULE: ./node_modules/@stardust-ui/react-component-ref/dist/es/RefFindNode.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var RefFindNode_RefFindNode =
|
|
/*#__PURE__*/
|
|
function (_React$Component) {
|
|
_inherits(RefFindNode, _React$Component);
|
|
|
|
function RefFindNode() {
|
|
var _getPrototypeOf2;
|
|
|
|
var _this;
|
|
|
|
_classCallCheck(this, RefFindNode);
|
|
|
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
args[_key] = arguments[_key];
|
|
}
|
|
|
|
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(RefFindNode)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
|
|
_defineProperty(_assertThisInitialized(_this), "prevNode", null);
|
|
|
|
return _this;
|
|
}
|
|
|
|
_createClass(RefFindNode, [{
|
|
key: "componentDidMount",
|
|
value: function componentDidMount() {
|
|
this.prevNode = react_dom["findDOMNode"](this);
|
|
es_handleRef(this.props.innerRef, this.prevNode);
|
|
}
|
|
}, {
|
|
key: "componentDidUpdate",
|
|
value: function componentDidUpdate(prevProps) {
|
|
var currentNode = react_dom["findDOMNode"](this);
|
|
|
|
if (this.prevNode !== currentNode) {
|
|
this.prevNode = currentNode;
|
|
es_handleRef(this.props.innerRef, currentNode);
|
|
}
|
|
|
|
if (prevProps.innerRef !== this.props.innerRef) {
|
|
es_handleRef(this.props.innerRef, currentNode);
|
|
}
|
|
}
|
|
}, {
|
|
key: "componentWillUnmount",
|
|
value: function componentWillUnmount() {
|
|
es_handleRef(this.props.innerRef, null);
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function render() {
|
|
var children = this.props.children;
|
|
return children;
|
|
}
|
|
}]);
|
|
|
|
return RefFindNode;
|
|
}(react["Component"]);
|
|
|
|
_defineProperty(RefFindNode_RefFindNode, "displayName", 'RefFindNode');
|
|
|
|
_defineProperty(RefFindNode_RefFindNode, "propTypes", false ? undefined : {});
|
|
|
|
|
|
// CONCATENATED MODULE: ./node_modules/@stardust-ui/react-component-ref/dist/es/RefForward.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var RefForward_RefForward =
|
|
/*#__PURE__*/
|
|
function (_React$Component) {
|
|
_inherits(RefForward, _React$Component);
|
|
|
|
function RefForward() {
|
|
var _getPrototypeOf2;
|
|
|
|
var _this;
|
|
|
|
_classCallCheck(this, RefForward);
|
|
|
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
args[_key] = arguments[_key];
|
|
}
|
|
|
|
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(RefForward)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
|
|
_defineProperty(_assertThisInitialized(_this), "handleRefOverride", function (node) {
|
|
var _this$props = _this.props,
|
|
children = _this$props.children,
|
|
innerRef = _this$props.innerRef;
|
|
es_handleRef(children.ref, node);
|
|
es_handleRef(innerRef, node);
|
|
});
|
|
|
|
return _this;
|
|
}
|
|
|
|
_createClass(RefForward, [{
|
|
key: "render",
|
|
value: function render() {
|
|
var children = this.props.children;
|
|
return react["cloneElement"](children, {
|
|
ref: this.handleRefOverride
|
|
});
|
|
}
|
|
}]);
|
|
|
|
return RefForward;
|
|
}(react["Component"]);
|
|
|
|
_defineProperty(RefForward_RefForward, "displayName", 'RefForward');
|
|
|
|
_defineProperty(RefForward_RefForward, "propTypes", false ? undefined : {});
|
|
|
|
|
|
// CONCATENATED MODULE: ./node_modules/@stardust-ui/react-component-ref/dist/es/Ref.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Ref_Ref = function Ref(props) {
|
|
var children = props.children,
|
|
innerRef = props.innerRef;
|
|
var child = react["Children"].only(children);
|
|
var ElementType = react_is["isForwardRef"](child) ? RefForward_RefForward : RefFindNode_RefFindNode;
|
|
return react["createElement"](ElementType, {
|
|
innerRef: innerRef
|
|
}, child);
|
|
};
|
|
|
|
Ref_Ref.displayName = 'Ref'; // TODO: use Babel plugin for this
|
|
|
|
if (false) {}
|
|
|
|
/* harmony default export */ var es_Ref = (Ref_Ref);
|
|
// EXTERNAL MODULE: ./node_modules/lodash/find.js
|
|
var find = __webpack_require__(129);
|
|
var find_default = /*#__PURE__*/__webpack_require__.n(find);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash/some.js
|
|
var some = __webpack_require__(59);
|
|
var some_default = /*#__PURE__*/__webpack_require__.n(some);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/lib/childrenUtils.js
|
|
|
|
|
|
|
|
/**
|
|
* Determine if child by type exists in children.
|
|
* @param {Object} children The children prop of a component.
|
|
* @param {string|Function} type An html tag name string or React component.
|
|
* @returns {Boolean}
|
|
*/
|
|
|
|
var childrenUtils_someByType = function someByType(children, type) {
|
|
return some_default()(react["Children"].toArray(children), {
|
|
type: type
|
|
});
|
|
};
|
|
/**
|
|
* Find child by type.
|
|
* @param {Object} children The children prop of a component.
|
|
* @param {string|Function} type An html tag name string or React component.
|
|
* @returns {undefined|Object}
|
|
*/
|
|
|
|
var childrenUtils_findByType = function findByType(children, type) {
|
|
return find_default()(react["Children"].toArray(children), {
|
|
type: type
|
|
});
|
|
};
|
|
/**
|
|
* Tests if children are nil in React and Preact.
|
|
* @param {Object} children The children prop of a component.
|
|
* @returns {Boolean}
|
|
*/
|
|
|
|
var childrenUtils_isNil = function isNil(children) {
|
|
return children === null || children === undefined || Array.isArray(children) && children.length === 0;
|
|
};
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/lib/index.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Heads up! We import/export for this module to safely remove it with "babel-plugin-filter-imports"
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectSpread.js
|
|
var objectSpread = __webpack_require__(15);
|
|
var objectSpread_default = /*#__PURE__*/__webpack_require__.n(objectSpread);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash/uniq.js
|
|
var uniq = __webpack_require__(265);
|
|
var uniq_default = /*#__PURE__*/__webpack_require__.n(uniq);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash/isArray.js
|
|
var isArray = __webpack_require__(26);
|
|
var isArray_default = /*#__PURE__*/__webpack_require__.n(isArray);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash/isPlainObject.js
|
|
var isPlainObject = __webpack_require__(266);
|
|
var isPlainObject_default = /*#__PURE__*/__webpack_require__.n(isPlainObject);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash/isFunction.js
|
|
var isFunction = __webpack_require__(74);
|
|
var isFunction_default = /*#__PURE__*/__webpack_require__.n(isFunction);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash/isNumber.js
|
|
var isNumber = __webpack_require__(267);
|
|
var isNumber_default = /*#__PURE__*/__webpack_require__.n(isNumber);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash/isString.js
|
|
var isString = __webpack_require__(128);
|
|
var isString_default = /*#__PURE__*/__webpack_require__.n(isString);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash/isBoolean.js
|
|
var isBoolean = __webpack_require__(268);
|
|
var isBoolean_default = /*#__PURE__*/__webpack_require__.n(isBoolean);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/lib/factories.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ============================================================
|
|
// Factories
|
|
// ============================================================
|
|
|
|
/**
|
|
* A more robust React.createElement. It can create elements from primitive values.
|
|
*
|
|
* @param {function|string} Component A ReactClass or string
|
|
* @param {function} mapValueToProps A function that maps a primitive value to the Component props
|
|
* @param {string|object|function} val The value to create a ReactElement from
|
|
* @param {Object} [options={}]
|
|
* @param {object} [options.defaultProps={}] Default props object
|
|
* @param {object|function} [options.overrideProps={}] Override props object or function (called with regular props)
|
|
* @param {boolean} [options.autoGenerateKey=true] Whether or not automatic key generation is allowed
|
|
* @returns {object|null}
|
|
*/
|
|
|
|
function createShorthand(Component, mapValueToProps, val) {
|
|
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
|
|
|
|
if (typeof Component !== 'function' && typeof Component !== 'string') {
|
|
throw new Error('createShorthand() Component must be a string or function.');
|
|
} // short circuit noop values
|
|
|
|
|
|
if (isNil_default()(val) || isBoolean_default()(val)) return null;
|
|
|
|
var valIsString = isString_default()(val);
|
|
|
|
var valIsNumber = isNumber_default()(val);
|
|
|
|
var valIsFunction = isFunction_default()(val);
|
|
|
|
var valIsReactElement = Object(react["isValidElement"])(val);
|
|
|
|
var valIsPropsObject = isPlainObject_default()(val);
|
|
|
|
var valIsPrimitiveValue = valIsString || valIsNumber || isArray_default()(val); // unhandled type return null
|
|
|
|
/* eslint-disable no-console */
|
|
|
|
|
|
if (!valIsFunction && !valIsReactElement && !valIsPropsObject && !valIsPrimitiveValue) {
|
|
if (false) {}
|
|
|
|
return null;
|
|
}
|
|
/* eslint-enable no-console */
|
|
// ----------------------------------------
|
|
// Build up props
|
|
// ----------------------------------------
|
|
|
|
|
|
var _options$defaultProps = options.defaultProps,
|
|
defaultProps = _options$defaultProps === void 0 ? {} : _options$defaultProps; // User's props
|
|
|
|
var usersProps = valIsReactElement && val.props || valIsPropsObject && val || valIsPrimitiveValue && mapValueToProps(val); // Override props
|
|
|
|
var _options$overrideProp = options.overrideProps,
|
|
overrideProps = _options$overrideProp === void 0 ? {} : _options$overrideProp;
|
|
overrideProps = isFunction_default()(overrideProps) ? overrideProps(objectSpread_default()({}, defaultProps, usersProps)) : overrideProps; // Merge props
|
|
|
|
/* eslint-disable react/prop-types */
|
|
|
|
var props = objectSpread_default()({}, defaultProps, usersProps, overrideProps); // Merge className
|
|
|
|
|
|
if (defaultProps.className || overrideProps.className || usersProps.className) {
|
|
var mergedClassesNames = classnames_default()(defaultProps.className, overrideProps.className, usersProps.className);
|
|
props.className = uniq_default()(mergedClassesNames.split(' ')).join(' ');
|
|
} // Merge style
|
|
|
|
|
|
if (defaultProps.style || overrideProps.style || usersProps.style) {
|
|
props.style = objectSpread_default()({}, defaultProps.style, usersProps.style, overrideProps.style);
|
|
} // ----------------------------------------
|
|
// Get key
|
|
// ----------------------------------------
|
|
// Use key, childKey, or generate key
|
|
|
|
|
|
if (isNil_default()(props.key)) {
|
|
var childKey = props.childKey;
|
|
var _options$autoGenerate = options.autoGenerateKey,
|
|
autoGenerateKey = _options$autoGenerate === void 0 ? true : _options$autoGenerate;
|
|
|
|
if (!isNil_default()(childKey)) {
|
|
// apply and consume the childKey
|
|
props.key = typeof childKey === 'function' ? childKey(props) : childKey;
|
|
delete props.childKey;
|
|
} else if (autoGenerateKey && (valIsString || valIsNumber)) {
|
|
// use string/number shorthand values as the key
|
|
props.key = val;
|
|
}
|
|
} // ----------------------------------------
|
|
// Create Element
|
|
// ----------------------------------------
|
|
// Clone ReactElements
|
|
|
|
|
|
if (valIsReactElement) return Object(react["cloneElement"])(val, props); // Create ReactElements from built up props
|
|
|
|
if (valIsPrimitiveValue || valIsPropsObject) return react_default.a.createElement(Component, props); // Call functions with args similar to createElement()
|
|
|
|
if (valIsFunction) return val(Component, props, props.children);
|
|
/* eslint-enable react/prop-types */
|
|
} // ============================================================
|
|
// Factory Creators
|
|
// ============================================================
|
|
|
|
/**
|
|
* Creates a `createShorthand` function that is waiting for a value and options.
|
|
*
|
|
* @param {function|string} Component A ReactClass or string
|
|
* @param {function} mapValueToProps A function that maps a primitive value to the Component props
|
|
* @returns {function} A shorthand factory function waiting for `val` and `defaultProps`.
|
|
*/
|
|
|
|
createShorthand.handledProps = [];
|
|
function createShorthandFactory(Component, mapValueToProps) {
|
|
if (typeof Component !== 'function' && typeof Component !== 'string') {
|
|
throw new Error('createShorthandFactory() Component must be a string or function.');
|
|
}
|
|
|
|
return function (val, options) {
|
|
return createShorthand(Component, mapValueToProps, val, options);
|
|
};
|
|
} // ============================================================
|
|
// HTML Factories
|
|
// ============================================================
|
|
|
|
var createHTMLDivision = createShorthandFactory('div', function (val) {
|
|
return {
|
|
children: val
|
|
};
|
|
});
|
|
var createHTMLIframe = createShorthandFactory('iframe', function (src) {
|
|
return {
|
|
src: src
|
|
};
|
|
});
|
|
var createHTMLImage = createShorthandFactory('img', function (val) {
|
|
return {
|
|
src: val
|
|
};
|
|
});
|
|
var createHTMLInput = createShorthandFactory('input', function (val) {
|
|
return {
|
|
type: val
|
|
};
|
|
});
|
|
var createHTMLLabel = createShorthandFactory('label', function (val) {
|
|
return {
|
|
children: val
|
|
};
|
|
});
|
|
var createHTMLParagraph = createShorthandFactory('p', function (val) {
|
|
return {
|
|
children: val
|
|
};
|
|
});
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/elements/Icon/IconGroup.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* Several icons can be used together as a group.
|
|
*/
|
|
|
|
function IconGroup(props) {
|
|
var children = props.children,
|
|
className = props.className,
|
|
content = props.content,
|
|
size = props.size;
|
|
var classes = classnames_default()(size, 'icons', className);
|
|
var rest = lib_getUnhandledProps(IconGroup, props);
|
|
var ElementType = lib_getElementType(IconGroup, props);
|
|
return react_default.a.createElement(ElementType, extends_default()({}, rest, {
|
|
className: classes
|
|
}), childrenUtils_namespaceObject.isNil(children) ? content : children);
|
|
}
|
|
|
|
IconGroup.handledProps = ["as", "children", "className", "content", "size"];
|
|
IconGroup.propTypes = false ? undefined : {};
|
|
IconGroup.defaultProps = {
|
|
as: 'i'
|
|
};
|
|
/* harmony default export */ var Icon_IconGroup = (IconGroup);
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/elements/Icon/Icon.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* An icon is a glyph used to represent something else.
|
|
* @see Image
|
|
*/
|
|
|
|
var Icon_Icon =
|
|
/*#__PURE__*/
|
|
function (_PureComponent) {
|
|
inherits_default()(Icon, _PureComponent);
|
|
|
|
function Icon() {
|
|
var _getPrototypeOf2;
|
|
|
|
var _this;
|
|
|
|
classCallCheck_default()(this, Icon);
|
|
|
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
args[_key] = arguments[_key];
|
|
}
|
|
|
|
_this = possibleConstructorReturn_default()(this, (_getPrototypeOf2 = getPrototypeOf_default()(Icon)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "handleClick", function (e) {
|
|
var disabled = _this.props.disabled;
|
|
|
|
if (disabled) {
|
|
e.preventDefault();
|
|
return;
|
|
}
|
|
|
|
invoke_default()(_this.props, 'onClick', e, _this.props);
|
|
});
|
|
|
|
return _this;
|
|
}
|
|
|
|
createClass_default()(Icon, [{
|
|
key: "getIconAriaOptions",
|
|
value: function getIconAriaOptions() {
|
|
var ariaOptions = {};
|
|
var _this$props = this.props,
|
|
ariaLabel = _this$props['aria-label'],
|
|
ariaHidden = _this$props['aria-hidden'];
|
|
|
|
if (isNil_default()(ariaLabel)) {
|
|
ariaOptions['aria-hidden'] = 'true';
|
|
} else {
|
|
ariaOptions['aria-label'] = ariaLabel;
|
|
}
|
|
|
|
if (!isNil_default()(ariaHidden)) {
|
|
ariaOptions['aria-hidden'] = ariaHidden;
|
|
}
|
|
|
|
return ariaOptions;
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function render() {
|
|
var _this$props2 = this.props,
|
|
bordered = _this$props2.bordered,
|
|
circular = _this$props2.circular,
|
|
className = _this$props2.className,
|
|
color = _this$props2.color,
|
|
corner = _this$props2.corner,
|
|
disabled = _this$props2.disabled,
|
|
fitted = _this$props2.fitted,
|
|
flipped = _this$props2.flipped,
|
|
inverted = _this$props2.inverted,
|
|
link = _this$props2.link,
|
|
loading = _this$props2.loading,
|
|
name = _this$props2.name,
|
|
rotated = _this$props2.rotated,
|
|
size = _this$props2.size;
|
|
var classes = classnames_default()(color, name, size, useKeyOnly(bordered, 'bordered'), useKeyOnly(circular, 'circular'), useKeyOnly(disabled, 'disabled'), useKeyOnly(fitted, 'fitted'), useKeyOnly(inverted, 'inverted'), useKeyOnly(link, 'link'), useKeyOnly(loading, 'loading'), useKeyOrValueAndKey(corner, 'corner'), useValueAndKey(flipped, 'flipped'), useValueAndKey(rotated, 'rotated'), 'icon', className);
|
|
var rest = lib_getUnhandledProps(Icon, this.props);
|
|
var ElementType = lib_getElementType(Icon, this.props);
|
|
var ariaOptions = this.getIconAriaOptions();
|
|
return react_default.a.createElement(ElementType, extends_default()({}, rest, ariaOptions, {
|
|
className: classes,
|
|
onClick: this.handleClick
|
|
}));
|
|
}
|
|
}]);
|
|
|
|
return Icon;
|
|
}(react["PureComponent"]);
|
|
|
|
defineProperty_default()(Icon_Icon, "defaultProps", {
|
|
as: 'i'
|
|
});
|
|
|
|
defineProperty_default()(Icon_Icon, "Group", Icon_IconGroup);
|
|
|
|
defineProperty_default()(Icon_Icon, "handledProps", ["aria-hidden", "aria-label", "as", "bordered", "circular", "className", "color", "corner", "disabled", "fitted", "flipped", "inverted", "link", "loading", "name", "rotated", "size"]);
|
|
|
|
Icon_Icon.propTypes = false ? undefined : {};
|
|
Icon_Icon.create = createShorthandFactory(Icon_Icon, function (value) {
|
|
return {
|
|
name: value
|
|
};
|
|
});
|
|
/* harmony default export */ var elements_Icon_Icon = (Icon_Icon);
|
|
// EXTERNAL MODULE: ./node_modules/lodash/isUndefined.js
|
|
var isUndefined = __webpack_require__(87);
|
|
var isUndefined_default = /*#__PURE__*/__webpack_require__.n(isUndefined);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
|
|
var slicedToArray = __webpack_require__(76);
|
|
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash/includes.js
|
|
var includes = __webpack_require__(54);
|
|
var includes_default = /*#__PURE__*/__webpack_require__.n(includes);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash/forEach.js
|
|
var forEach = __webpack_require__(185);
|
|
var forEach_default = /*#__PURE__*/__webpack_require__.n(forEach);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/lib/htmlPropsUtils.js
|
|
|
|
|
|
var htmlInputAttrs = [// REACT
|
|
'selected', 'defaultValue', 'defaultChecked', // LIMITED HTML PROPS
|
|
'accept', 'autoCapitalize', 'autoComplete', 'autoCorrect', 'autoFocus', 'checked', 'disabled', 'form', 'id', 'lang', 'list', 'max', 'maxLength', 'min', 'minLength', 'multiple', 'name', 'pattern', 'placeholder', 'readOnly', 'required', 'step', 'title', 'type', 'value'];
|
|
var htmlInputEvents = [// EVENTS
|
|
// keyboard
|
|
'onKeyDown', 'onKeyPress', 'onKeyUp', // focus
|
|
'onFocus', 'onBlur', // form
|
|
'onChange', 'onInput', // mouse
|
|
'onClick', 'onContextMenu', 'onDrag', 'onDragEnd', 'onDragEnter', 'onDragExit', 'onDragLeave', 'onDragOver', 'onDragStart', 'onDrop', 'onMouseDown', 'onMouseEnter', 'onMouseLeave', 'onMouseMove', 'onMouseOut', 'onMouseOver', 'onMouseUp', // selection
|
|
'onSelect', // touch
|
|
'onTouchCancel', 'onTouchEnd', 'onTouchMove', 'onTouchStart'];
|
|
var htmlPropsUtils_htmlInputProps = [].concat(htmlInputAttrs, htmlInputEvents);
|
|
var htmlImageProps = ['alt', 'height', 'src', 'srcSet', 'width'];
|
|
/**
|
|
* Returns an array of objects consisting of: props of html input element and rest.
|
|
* @param {object} props A ReactElement props object
|
|
* @param {Object} [options={}]
|
|
* @param {Array} [options.htmlProps] An array of html input props
|
|
* @param {boolean} [options.includeAria] Includes all input props that starts with "aria-"
|
|
* @returns {[{}, {}]} An array of objects
|
|
*/
|
|
|
|
var htmlPropsUtils_partitionHTMLProps = function partitionHTMLProps(props) {
|
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
var _options$htmlProps = options.htmlProps,
|
|
htmlProps = _options$htmlProps === void 0 ? htmlPropsUtils_htmlInputProps : _options$htmlProps,
|
|
_options$includeAria = options.includeAria,
|
|
includeAria = _options$includeAria === void 0 ? true : _options$includeAria;
|
|
var inputProps = {};
|
|
var rest = {};
|
|
|
|
forEach_default()(props, function (val, prop) {
|
|
var possibleAria = includeAria && (/^aria-.*$/.test(prop) || prop === 'role');
|
|
var target = includes_default()(htmlProps, prop) || possibleAria ? inputProps : rest;
|
|
target[prop] = val;
|
|
});
|
|
|
|
return [inputProps, rest];
|
|
};
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/lib/isBrowser.js
|
|
|
|
|
|
var hasDocument = (typeof document === "undefined" ? "undefined" : typeof_default()(document)) === 'object' && document !== null;
|
|
var hasWindow = (typeof window === "undefined" ? "undefined" : typeof_default()(window)) === 'object' && window !== null && window.self === window; // eslint-disable-next-line no-confusing-arrow
|
|
|
|
var isBrowser_isBrowser = function isBrowser() {
|
|
return !isNil_default()(isBrowser.override) ? isBrowser.override : hasDocument && hasWindow;
|
|
};
|
|
|
|
/* harmony default export */ var lib_isBrowser = (isBrowser_isBrowser);
|
|
// EXTERNAL MODULE: ./node_modules/@semantic-ui-react/event-stack/lib/index.js
|
|
var lib = __webpack_require__(28);
|
|
var lib_default = /*#__PURE__*/__webpack_require__.n(lib);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/keyboard-key/src/keyboardKey.js
|
|
var keyboardKey = __webpack_require__(25);
|
|
var keyboardKey_default = /*#__PURE__*/__webpack_require__.n(keyboardKey);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash/inRange.js
|
|
var lodash_inRange = __webpack_require__(186);
|
|
var inRange_default = /*#__PURE__*/__webpack_require__.n(lodash_inRange);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash/first.js
|
|
var first = __webpack_require__(269);
|
|
var first_default = /*#__PURE__*/__webpack_require__.n(first);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/lib/doesNodeContainClick.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* Determines if a click's coordinates are within the bounds of a node.
|
|
*
|
|
* @see https://github.com/Semantic-Org/Semantic-UI-React/pull/2384
|
|
*
|
|
* @param {object} node - A DOM node.
|
|
* @param {object} e - A SyntheticEvent or DOM Event.
|
|
* @returns {boolean}
|
|
*/
|
|
var doesNodeContainClick_doesNodeContainClick = function doesNodeContainClick(node, e) {
|
|
if (some_default()([e, node], isNil_default.a)) return false; // if there is an e.target and it is in the document, use a simple node.contains() check
|
|
|
|
if (e.target) {
|
|
invoke_default()(e.target, 'setAttribute', 'data-suir-click-target', true);
|
|
|
|
if (document.querySelector('[data-suir-click-target=true]')) {
|
|
invoke_default()(e.target, 'removeAttribute', 'data-suir-click-target');
|
|
|
|
return node.contains(e.target);
|
|
}
|
|
} // Below logic handles cases where the e.target is no longer in the document.
|
|
// The result of the click likely has removed the e.target node.
|
|
// Instead of node.contains(), we'll identify the click by X/Y position.
|
|
// return early if the event properties aren't available
|
|
// prevent measuring the node and repainting if we don't need to
|
|
|
|
|
|
var clientX = e.clientX,
|
|
clientY = e.clientY;
|
|
if (some_default()([clientX, clientY], isNil_default.a)) return false; // false if the node is not visible
|
|
|
|
var clientRects = node.getClientRects(); // Heads Up!
|
|
// getClientRects returns a DOMRectList, not an array nor a plain object
|
|
// We explicitly avoid _.isEmpty and check .length to cover all possible shapes
|
|
|
|
if (!node.offsetWidth || !node.offsetHeight || !clientRects || !clientRects.length) return false; // false if the node doesn't have a valid bounding rect
|
|
|
|
var _first2 = first_default()(clientRects),
|
|
top = _first2.top,
|
|
bottom = _first2.bottom,
|
|
left = _first2.left,
|
|
right = _first2.right;
|
|
|
|
if (some_default()([top, bottom, left, right], isNil_default.a)) return false; // we add a small decimal to the upper bound just to make it inclusive
|
|
// don't add an whole pixel (1) as the event/node values may be decimal sensitive
|
|
|
|
return inRange_default()(clientY, top, bottom + 0.001) && inRange_default()(clientX, left, right + 0.001);
|
|
};
|
|
|
|
/* harmony default export */ var lib_doesNodeContainClick = (doesNodeContainClick_doesNodeContainClick);
|
|
// EXTERNAL MODULE: ./node_modules/lodash/startsWith.js
|
|
var startsWith = __webpack_require__(593);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash/filter.js
|
|
var filter = __webpack_require__(130);
|
|
var filter_default = /*#__PURE__*/__webpack_require__.n(filter);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash/isEmpty.js
|
|
var isEmpty = __webpack_require__(88);
|
|
var isEmpty_default = /*#__PURE__*/__webpack_require__.n(isEmpty);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash/keys.js
|
|
var keys = __webpack_require__(85);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash/intersection.js
|
|
var intersection = __webpack_require__(596);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash/has.js
|
|
var has = __webpack_require__(259);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash/each.js
|
|
var each = __webpack_require__(600);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/lib/AutoControlledComponent.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var getDefaultPropName = function getDefaultPropName(prop) {
|
|
return "default".concat(prop[0].toUpperCase() + prop.slice(1));
|
|
};
|
|
/**
|
|
* Return the auto controlled state value for a give prop. The initial value is chosen in this order:
|
|
* - regular props
|
|
* - then, default props
|
|
* - then, initial state
|
|
* - then, `checked` defaults to false
|
|
* - then, `value` defaults to '' or [] if props.multiple
|
|
* - else, undefined
|
|
*
|
|
* @param {string} propName A prop name
|
|
* @param {object} [props] A props object
|
|
* @param {object} [state] A state object
|
|
* @param {boolean} [includeDefaults=false] Whether or not to heed the default props or initial state
|
|
*/
|
|
|
|
|
|
var getAutoControlledStateValue = function getAutoControlledStateValue(propName, props, state) {
|
|
var includeDefaults = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
// regular props
|
|
var propValue = props[propName];
|
|
if (propValue !== undefined) return propValue;
|
|
|
|
if (includeDefaults) {
|
|
// defaultProps
|
|
var defaultProp = props[getDefaultPropName(propName)];
|
|
if (defaultProp !== undefined) return defaultProp; // initial state - state may be null or undefined
|
|
|
|
if (state) {
|
|
var initialState = state[propName];
|
|
if (initialState !== undefined) return initialState;
|
|
}
|
|
} // React doesn't allow changing from uncontrolled to controlled components,
|
|
// default checked/value if they were not present.
|
|
|
|
|
|
if (propName === 'checked') return false;
|
|
if (propName === 'value') return props.multiple ? [] : ''; // otherwise, undefined
|
|
};
|
|
|
|
var AutoControlledComponent_AutoControlledComponent =
|
|
/*#__PURE__*/
|
|
function (_Component) {
|
|
inherits_default()(AutoControlledComponent, _Component);
|
|
|
|
function AutoControlledComponent() {
|
|
var _getPrototypeOf2;
|
|
|
|
var _this;
|
|
|
|
classCallCheck_default()(this, AutoControlledComponent);
|
|
|
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
args[_key] = arguments[_key];
|
|
}
|
|
|
|
_this = possibleConstructorReturn_default()(this, (_getPrototypeOf2 = getPrototypeOf_default()(AutoControlledComponent)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "trySetState", function (state, callback) {
|
|
var newState = Object.keys(state).reduce(function (acc, prop) {
|
|
// ignore props defined by the parent
|
|
if (_this.props[prop] !== undefined) return acc;
|
|
acc[prop] = state[prop];
|
|
return acc;
|
|
}, {});
|
|
if (Object.keys(newState).length > 0) _this.setState(newState, callback);
|
|
});
|
|
|
|
var autoControlledProps = _this.constructor.autoControlledProps;
|
|
|
|
var _state = invoke_default()(assertThisInitialized_default()(_this), 'getInitialAutoControlledState', _this.props) || {};
|
|
|
|
if (false) { var illegalAutoControlled, illegalDefaults, _this$constructor, defaultProps, name, propTypes; } // Auto controlled props are copied to state.
|
|
// Set initial state by copying auto controlled props to state.
|
|
// Also look for the default prop for any auto controlled props (foo => defaultFoo)
|
|
// so we can set initial values from defaults.
|
|
|
|
|
|
var initialAutoControlledState = autoControlledProps.reduce(function (acc, prop) {
|
|
acc[prop] = getAutoControlledStateValue(prop, _this.props, _state, true);
|
|
|
|
if (false) { var _name, defaultPropName; }
|
|
|
|
return acc;
|
|
}, {});
|
|
_this.state = objectSpread_default()({}, _state, initialAutoControlledState);
|
|
return _this;
|
|
} // eslint-disable-next-line camelcase
|
|
|
|
|
|
createClass_default()(AutoControlledComponent, [{
|
|
key: "UNSAFE_componentWillReceiveProps",
|
|
value: function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
var autoControlledProps = this.constructor.autoControlledProps; // Solve the next state for autoControlledProps
|
|
|
|
var newState = autoControlledProps.reduce(function (acc, prop) {
|
|
var isNextDefined = !isUndefined_default()(nextProps[prop]); // if next is defined then use its value
|
|
|
|
if (isNextDefined) acc[prop] = nextProps[prop];
|
|
return acc;
|
|
}, {});
|
|
if (Object.keys(newState).length > 0) this.setState(newState);
|
|
}
|
|
/**
|
|
* Safely attempt to set state for props that might be controlled by the user.
|
|
* Second argument is a state object that is always passed to setState.
|
|
* @param {object} state State that corresponds to controlled props.
|
|
* @param {function} [callback] Callback which is called after setState applied.
|
|
*/
|
|
|
|
}]);
|
|
|
|
return AutoControlledComponent;
|
|
}(react["Component"]);
|
|
|
|
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/addons/Portal/PortalInner.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* An inner component that allows you to render children outside their parent.
|
|
*/
|
|
var PortalInner_PortalInner =
|
|
/*#__PURE__*/
|
|
function (_Component) {
|
|
inherits_default()(PortalInner, _Component);
|
|
|
|
function PortalInner() {
|
|
var _getPrototypeOf2;
|
|
|
|
var _this;
|
|
|
|
classCallCheck_default()(this, PortalInner);
|
|
|
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
args[_key] = arguments[_key];
|
|
}
|
|
|
|
_this = possibleConstructorReturn_default()(this, (_getPrototypeOf2 = getPrototypeOf_default()(PortalInner)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "handleRef", function (c) {
|
|
es_handleRef(_this.props.innerRef, c);
|
|
});
|
|
|
|
return _this;
|
|
}
|
|
|
|
createClass_default()(PortalInner, [{
|
|
key: "componentDidMount",
|
|
value: function componentDidMount() {
|
|
invoke_default()(this.props, 'onMount', null, this.props);
|
|
}
|
|
}, {
|
|
key: "componentWillUnmount",
|
|
value: function componentWillUnmount() {
|
|
invoke_default()(this.props, 'onUnmount', null, this.props);
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function render() {
|
|
if (!lib_isBrowser()) return null;
|
|
var _this$props = this.props,
|
|
children = _this$props.children,
|
|
_this$props$mountNode = _this$props.mountNode,
|
|
mountNode = _this$props$mountNode === void 0 ? document.body : _this$props$mountNode;
|
|
return Object(react_dom["createPortal"])(react_default.a.createElement(es_Ref, {
|
|
innerRef: this.handleRef
|
|
}, children), mountNode);
|
|
}
|
|
}]);
|
|
|
|
return PortalInner;
|
|
}(react["Component"]);
|
|
|
|
defineProperty_default()(PortalInner_PortalInner, "handledProps", ["children", "innerRef", "mountNode", "onMount", "onUnmount"]);
|
|
|
|
PortalInner_PortalInner.propTypes = false ? undefined : {};
|
|
/* harmony default export */ var Portal_PortalInner = (PortalInner_PortalInner);
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/addons/Portal/Portal.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* A component that allows you to render children outside their parent.
|
|
* @see Modal
|
|
* @see Popup
|
|
* @see Dimmer
|
|
* @see Confirm
|
|
*/
|
|
var Portal_Portal =
|
|
/*#__PURE__*/
|
|
function (_Component) {
|
|
inherits_default()(Portal, _Component);
|
|
|
|
function Portal() {
|
|
var _getPrototypeOf2;
|
|
|
|
var _this;
|
|
|
|
classCallCheck_default()(this, Portal);
|
|
|
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
args[_key] = arguments[_key];
|
|
}
|
|
|
|
_this = possibleConstructorReturn_default()(this, (_getPrototypeOf2 = getPrototypeOf_default()(Portal)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "contentRef", Object(react["createRef"])());
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "triggerRef", Object(react["createRef"])());
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "latestDocumentMouseDownEvent", null);
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "handleDocumentMouseDown", function (e) {
|
|
_this.latestDocumentMouseDownEvent = e;
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "handleDocumentClick", function (e) {
|
|
var closeOnDocumentClick = _this.props.closeOnDocumentClick;
|
|
var currentMouseDownEvent = _this.latestDocumentMouseDownEvent;
|
|
_this.latestDocumentMouseDownEvent = null;
|
|
|
|
if (!_this.contentRef.current || // no portal
|
|
lib_doesNodeContainClick(_this.triggerRef.current, e) || // event happened in trigger (delegate to trigger handlers)
|
|
currentMouseDownEvent && lib_doesNodeContainClick(_this.contentRef.current, currentMouseDownEvent) || // event originated in the portal but was ended outside
|
|
lib_doesNodeContainClick(_this.contentRef.current, e) // event happened in the portal
|
|
) {
|
|
return;
|
|
} // ignore the click
|
|
|
|
|
|
if (closeOnDocumentClick) {
|
|
_this.close(e);
|
|
}
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "handleEscape", function (e) {
|
|
if (!_this.props.closeOnEscape) return;
|
|
if (keyboardKey_default.a.getCode(e) !== keyboardKey_default.a.Escape) return;
|
|
|
|
_this.close(e);
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "handlePortalMouseLeave", function (e) {
|
|
var _this$props = _this.props,
|
|
closeOnPortalMouseLeave = _this$props.closeOnPortalMouseLeave,
|
|
mouseLeaveDelay = _this$props.mouseLeaveDelay;
|
|
if (!closeOnPortalMouseLeave) return; // Do not close the portal when 'mouseleave' is triggered by children
|
|
|
|
if (e.target !== _this.contentRef.current) return;
|
|
_this.mouseLeaveTimer = _this.closeWithTimeout(e, mouseLeaveDelay);
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "handlePortalMouseEnter", function () {
|
|
// In order to enable mousing from the trigger to the portal, we need to
|
|
// clear the mouseleave timer that was set when leaving the trigger.
|
|
var closeOnPortalMouseLeave = _this.props.closeOnPortalMouseLeave;
|
|
if (!closeOnPortalMouseLeave) return;
|
|
clearTimeout(_this.mouseLeaveTimer);
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "handleTriggerBlur", function (e) {
|
|
var _this$props2 = _this.props,
|
|
trigger = _this$props2.trigger,
|
|
closeOnTriggerBlur = _this$props2.closeOnTriggerBlur; // Call original event handler
|
|
|
|
for (var _len2 = arguments.length, rest = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
rest[_key2 - 1] = arguments[_key2];
|
|
}
|
|
|
|
invoke_default.a.apply(void 0, [trigger, 'props.onBlur', e].concat(rest)); // IE 11 doesn't work with relatedTarget in blur events
|
|
|
|
|
|
var target = e.relatedTarget || document.activeElement; // do not close if focus is given to the portal
|
|
|
|
var didFocusPortal = invoke_default()(_this.contentRef.current, 'contains', target);
|
|
|
|
if (!closeOnTriggerBlur || didFocusPortal) return;
|
|
|
|
_this.close(e);
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "handleTriggerClick", function (e) {
|
|
var _this$props3 = _this.props,
|
|
trigger = _this$props3.trigger,
|
|
closeOnTriggerClick = _this$props3.closeOnTriggerClick,
|
|
openOnTriggerClick = _this$props3.openOnTriggerClick;
|
|
var open = _this.state.open; // Call original event handler
|
|
|
|
for (var _len3 = arguments.length, rest = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
|
|
rest[_key3 - 1] = arguments[_key3];
|
|
}
|
|
|
|
invoke_default.a.apply(void 0, [trigger, 'props.onClick', e].concat(rest));
|
|
|
|
if (open && closeOnTriggerClick) {
|
|
_this.close(e);
|
|
} else if (!open && openOnTriggerClick) {
|
|
_this.open(e);
|
|
}
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "handleTriggerFocus", function (e) {
|
|
var _this$props4 = _this.props,
|
|
trigger = _this$props4.trigger,
|
|
openOnTriggerFocus = _this$props4.openOnTriggerFocus; // Call original event handler
|
|
|
|
for (var _len4 = arguments.length, rest = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
|
|
rest[_key4 - 1] = arguments[_key4];
|
|
}
|
|
|
|
invoke_default.a.apply(void 0, [trigger, 'props.onFocus', e].concat(rest));
|
|
|
|
if (!openOnTriggerFocus) return;
|
|
|
|
_this.open(e);
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "handleTriggerMouseLeave", function (e) {
|
|
clearTimeout(_this.mouseEnterTimer);
|
|
var _this$props5 = _this.props,
|
|
trigger = _this$props5.trigger,
|
|
closeOnTriggerMouseLeave = _this$props5.closeOnTriggerMouseLeave,
|
|
mouseLeaveDelay = _this$props5.mouseLeaveDelay; // Call original event handler
|
|
|
|
for (var _len5 = arguments.length, rest = new Array(_len5 > 1 ? _len5 - 1 : 0), _key5 = 1; _key5 < _len5; _key5++) {
|
|
rest[_key5 - 1] = arguments[_key5];
|
|
}
|
|
|
|
invoke_default.a.apply(void 0, [trigger, 'props.onMouseLeave', e].concat(rest));
|
|
|
|
if (!closeOnTriggerMouseLeave) return;
|
|
_this.mouseLeaveTimer = _this.closeWithTimeout(e, mouseLeaveDelay);
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "handleTriggerMouseEnter", function (e) {
|
|
clearTimeout(_this.mouseLeaveTimer);
|
|
var _this$props6 = _this.props,
|
|
trigger = _this$props6.trigger,
|
|
mouseEnterDelay = _this$props6.mouseEnterDelay,
|
|
openOnTriggerMouseEnter = _this$props6.openOnTriggerMouseEnter; // Call original event handler
|
|
|
|
for (var _len6 = arguments.length, rest = new Array(_len6 > 1 ? _len6 - 1 : 0), _key6 = 1; _key6 < _len6; _key6++) {
|
|
rest[_key6 - 1] = arguments[_key6];
|
|
}
|
|
|
|
invoke_default.a.apply(void 0, [trigger, 'props.onMouseEnter', e].concat(rest));
|
|
|
|
if (!openOnTriggerMouseEnter) return;
|
|
_this.mouseEnterTimer = _this.openWithTimeout(e, mouseEnterDelay);
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "open", function (e) {
|
|
var onOpen = _this.props.onOpen;
|
|
if (onOpen) onOpen(e, _this.props);
|
|
|
|
_this.trySetState({
|
|
open: true
|
|
});
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "openWithTimeout", function (e, delay) {
|
|
// React wipes the entire event object and suggests using e.persist() if
|
|
// you need the event for async access. However, even with e.persist
|
|
// certain required props (e.g. currentTarget) are null so we're forced to clone.
|
|
var eventClone = objectSpread_default()({}, e);
|
|
|
|
return setTimeout(function () {
|
|
return _this.open(eventClone);
|
|
}, delay || 0);
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "close", function (e) {
|
|
var onClose = _this.props.onClose;
|
|
if (onClose) onClose(e, _this.props);
|
|
|
|
_this.trySetState({
|
|
open: false
|
|
});
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "closeWithTimeout", function (e, delay) {
|
|
// React wipes the entire event object and suggests using e.persist() if
|
|
// you need the event for async access. However, even with e.persist
|
|
// certain required props (e.g. currentTarget) are null so we're forced to clone.
|
|
var eventClone = objectSpread_default()({}, e);
|
|
|
|
return setTimeout(function () {
|
|
return _this.close(eventClone);
|
|
}, delay || 0);
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "handleMount", function () {
|
|
invoke_default()(_this.props, 'onMount', null, _this.props);
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "handleUnmount", function () {
|
|
invoke_default()(_this.props, 'onUnmount', null, _this.props);
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "handleTriggerRef", function (c) {
|
|
_this.triggerRef.current = c;
|
|
es_handleRef(_this.props.triggerRef, c);
|
|
});
|
|
|
|
return _this;
|
|
}
|
|
|
|
createClass_default()(Portal, [{
|
|
key: "componentWillUnmount",
|
|
value: function componentWillUnmount() {
|
|
// Clean up timers
|
|
clearTimeout(this.mouseEnterTimer);
|
|
clearTimeout(this.mouseLeaveTimer);
|
|
} // ----------------------------------------
|
|
// Document Event Handlers
|
|
// ----------------------------------------
|
|
|
|
}, {
|
|
key: "render",
|
|
value: function render() {
|
|
var _this$props7 = this.props,
|
|
children = _this$props7.children,
|
|
eventPool = _this$props7.eventPool,
|
|
mountNode = _this$props7.mountNode,
|
|
trigger = _this$props7.trigger;
|
|
var open = this.state.open;
|
|
return react_default.a.createElement(react["Fragment"], null, open && react_default.a.createElement(react["Fragment"], null, react_default.a.createElement(Portal_PortalInner, {
|
|
innerRef: this.contentRef,
|
|
mountNode: mountNode,
|
|
onMount: this.handleMount,
|
|
onUnmount: this.handleUnmount
|
|
}, children), react_default.a.createElement(lib_default.a, {
|
|
name: "mouseleave",
|
|
on: this.handlePortalMouseLeave,
|
|
pool: eventPool,
|
|
target: this.contentRef
|
|
}), react_default.a.createElement(lib_default.a, {
|
|
name: "mouseenter",
|
|
on: this.handlePortalMouseEnter,
|
|
pool: eventPool,
|
|
target: this.contentRef
|
|
}), react_default.a.createElement(lib_default.a, {
|
|
name: "mousedown",
|
|
on: this.handleDocumentMouseDown,
|
|
pool: eventPool
|
|
}), react_default.a.createElement(lib_default.a, {
|
|
name: "click",
|
|
on: this.handleDocumentClick,
|
|
pool: eventPool
|
|
}), react_default.a.createElement(lib_default.a, {
|
|
name: "keydown",
|
|
on: this.handleEscape,
|
|
pool: eventPool
|
|
})), trigger && react_default.a.createElement(es_Ref, {
|
|
innerRef: this.handleTriggerRef
|
|
}, Object(react["cloneElement"])(trigger, {
|
|
onBlur: this.handleTriggerBlur,
|
|
onClick: this.handleTriggerClick,
|
|
onFocus: this.handleTriggerFocus,
|
|
onMouseLeave: this.handleTriggerMouseLeave,
|
|
onMouseEnter: this.handleTriggerMouseEnter
|
|
})));
|
|
}
|
|
}]);
|
|
|
|
return Portal;
|
|
}(AutoControlledComponent_AutoControlledComponent);
|
|
|
|
defineProperty_default()(Portal_Portal, "defaultProps", {
|
|
closeOnDocumentClick: true,
|
|
closeOnEscape: true,
|
|
eventPool: 'default',
|
|
openOnTriggerClick: true
|
|
});
|
|
|
|
defineProperty_default()(Portal_Portal, "autoControlledProps", ['open']);
|
|
|
|
defineProperty_default()(Portal_Portal, "Inner", Portal_PortalInner);
|
|
|
|
defineProperty_default()(Portal_Portal, "handledProps", ["children", "closeOnDocumentClick", "closeOnEscape", "closeOnPortalMouseLeave", "closeOnTriggerBlur", "closeOnTriggerClick", "closeOnTriggerMouseLeave", "defaultOpen", "eventPool", "mountNode", "mouseEnterDelay", "mouseLeaveDelay", "onClose", "onMount", "onOpen", "onUnmount", "open", "openOnTriggerClick", "openOnTriggerFocus", "openOnTriggerMouseEnter", "trigger", "triggerRef"]);
|
|
|
|
Portal_Portal.propTypes = false ? undefined : {};
|
|
/* harmony default export */ var addons_Portal_Portal = (Portal_Portal);
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/modules/Dimmer/DimmerDimmable.js
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* A dimmable sub-component for Dimmer.
|
|
*/
|
|
|
|
function DimmerDimmable(props) {
|
|
var blurring = props.blurring,
|
|
className = props.className,
|
|
children = props.children,
|
|
content = props.content,
|
|
dimmed = props.dimmed;
|
|
var classes = classnames_default()(useKeyOnly(blurring, 'blurring'), useKeyOnly(dimmed, 'dimmed'), 'dimmable', className);
|
|
var rest = lib_getUnhandledProps(DimmerDimmable, props);
|
|
var ElementType = lib_getElementType(DimmerDimmable, props);
|
|
return react_default.a.createElement(ElementType, extends_default()({}, rest, {
|
|
className: classes
|
|
}), childrenUtils_namespaceObject.isNil(children) ? content : children);
|
|
}
|
|
|
|
DimmerDimmable.handledProps = ["as", "blurring", "children", "className", "content", "dimmed"];
|
|
DimmerDimmable.propTypes = false ? undefined : {};
|
|
/* harmony default export */ var Dimmer_DimmerDimmable = (DimmerDimmable);
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/modules/Dimmer/DimmerInner.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* An inner element for a Dimmer.
|
|
*/
|
|
|
|
var DimmerInner_DimmerInner =
|
|
/*#__PURE__*/
|
|
function (_Component) {
|
|
inherits_default()(DimmerInner, _Component);
|
|
|
|
function DimmerInner() {
|
|
var _getPrototypeOf2;
|
|
|
|
var _this;
|
|
|
|
classCallCheck_default()(this, DimmerInner);
|
|
|
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
args[_key] = arguments[_key];
|
|
}
|
|
|
|
_this = possibleConstructorReturn_default()(this, (_getPrototypeOf2 = getPrototypeOf_default()(DimmerInner)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "containerRef", Object(react["createRef"])());
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "contentRef", Object(react["createRef"])());
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "handleClick", function (e) {
|
|
var contentRef = _this.contentRef.current;
|
|
|
|
invoke_default()(_this.props, 'onClick', e, _this.props);
|
|
|
|
if (contentRef && contentRef !== e.target && lib_doesNodeContainClick(contentRef, e)) {
|
|
return;
|
|
}
|
|
|
|
invoke_default()(_this.props, 'onClickOutside', e, _this.props);
|
|
});
|
|
|
|
return _this;
|
|
}
|
|
|
|
createClass_default()(DimmerInner, [{
|
|
key: "componentDidMount",
|
|
value: function componentDidMount() {
|
|
var active = this.props.active;
|
|
this.toggleStyles(active);
|
|
}
|
|
}, {
|
|
key: "componentDidUpdate",
|
|
value: function componentDidUpdate(prevProps) {
|
|
var currentActive = this.props.active;
|
|
var prevActive = prevProps.active;
|
|
if (prevActive !== currentActive) this.toggleStyles(currentActive);
|
|
}
|
|
}, {
|
|
key: "toggleStyles",
|
|
value: function toggleStyles(active) {
|
|
var containerRef = this.containerRef.current;
|
|
if (!containerRef || !containerRef.style) return;
|
|
|
|
if (active) {
|
|
containerRef.style.setProperty('display', 'flex', 'important');
|
|
} else {
|
|
containerRef.style.removeProperty('display');
|
|
}
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function render() {
|
|
var _this$props = this.props,
|
|
active = _this$props.active,
|
|
children = _this$props.children,
|
|
className = _this$props.className,
|
|
content = _this$props.content,
|
|
disabled = _this$props.disabled,
|
|
inverted = _this$props.inverted,
|
|
page = _this$props.page,
|
|
simple = _this$props.simple,
|
|
verticalAlign = _this$props.verticalAlign;
|
|
var classes = classnames_default()('ui', useKeyOnly(active, 'active transition visible'), useKeyOnly(disabled, 'disabled'), useKeyOnly(inverted, 'inverted'), useKeyOnly(page, 'page'), useKeyOnly(simple, 'simple'), useVerticalAlignProp(verticalAlign), 'dimmer', className);
|
|
var rest = lib_getUnhandledProps(DimmerInner, this.props);
|
|
var ElementType = lib_getElementType(DimmerInner, this.props);
|
|
var childrenContent = childrenUtils_namespaceObject.isNil(children) ? content : children;
|
|
return react_default.a.createElement(es_Ref, {
|
|
innerRef: this.containerRef
|
|
}, react_default.a.createElement(ElementType, extends_default()({}, rest, {
|
|
className: classes,
|
|
onClick: this.handleClick
|
|
}), childrenContent && react_default.a.createElement("div", {
|
|
className: "content",
|
|
ref: this.contentRef
|
|
}, childrenContent)));
|
|
}
|
|
}]);
|
|
|
|
return DimmerInner;
|
|
}(react["Component"]);
|
|
|
|
defineProperty_default()(DimmerInner_DimmerInner, "handledProps", ["active", "as", "children", "className", "content", "disabled", "inverted", "onClick", "onClickOutside", "page", "simple", "verticalAlign"]);
|
|
|
|
|
|
DimmerInner_DimmerInner.propTypes = false ? undefined : {};
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/modules/Dimmer/Dimmer.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* A dimmer hides distractions to focus attention on particular content.
|
|
*/
|
|
|
|
var Dimmer_Dimmer =
|
|
/*#__PURE__*/
|
|
function (_Component) {
|
|
inherits_default()(Dimmer, _Component);
|
|
|
|
function Dimmer() {
|
|
var _getPrototypeOf2;
|
|
|
|
var _this;
|
|
|
|
classCallCheck_default()(this, Dimmer);
|
|
|
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
args[_key] = arguments[_key];
|
|
}
|
|
|
|
_this = possibleConstructorReturn_default()(this, (_getPrototypeOf2 = getPrototypeOf_default()(Dimmer)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "handlePortalMount", function () {
|
|
if (!lib_isBrowser()) return; // Heads up, IE doesn't support second argument in add()
|
|
|
|
document.body.classList.add('dimmed');
|
|
document.body.classList.add('dimmable');
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "handlePortalUnmount", function () {
|
|
if (!lib_isBrowser()) return; // Heads up, IE doesn't support second argument in add()
|
|
|
|
document.body.classList.remove('dimmed');
|
|
document.body.classList.remove('dimmable');
|
|
});
|
|
|
|
return _this;
|
|
}
|
|
|
|
createClass_default()(Dimmer, [{
|
|
key: "render",
|
|
value: function render() {
|
|
var _this$props = this.props,
|
|
active = _this$props.active,
|
|
page = _this$props.page;
|
|
var rest = lib_getUnhandledProps(Dimmer, this.props);
|
|
|
|
if (page) {
|
|
return react_default.a.createElement(addons_Portal_Portal, {
|
|
closeOnEscape: false,
|
|
closeOnDocumentClick: false,
|
|
onMount: this.handlePortalMount,
|
|
onUnmount: this.handlePortalUnmount,
|
|
open: active,
|
|
openOnTriggerClick: false
|
|
}, react_default.a.createElement(DimmerInner_DimmerInner, extends_default()({}, rest, {
|
|
active: active,
|
|
page: page
|
|
})));
|
|
}
|
|
|
|
return react_default.a.createElement(DimmerInner_DimmerInner, extends_default()({}, rest, {
|
|
active: active,
|
|
page: page
|
|
}));
|
|
}
|
|
}]);
|
|
|
|
return Dimmer;
|
|
}(react["Component"]);
|
|
|
|
defineProperty_default()(Dimmer_Dimmer, "Dimmable", Dimmer_DimmerDimmable);
|
|
|
|
defineProperty_default()(Dimmer_Dimmer, "Inner", DimmerInner_DimmerInner);
|
|
|
|
defineProperty_default()(Dimmer_Dimmer, "handledProps", ["active", "page"]);
|
|
|
|
|
|
Dimmer_Dimmer.propTypes = false ? undefined : {};
|
|
Dimmer_Dimmer.create = createShorthandFactory(Dimmer_Dimmer, function (value) {
|
|
return {
|
|
content: value
|
|
};
|
|
});
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/elements/Image/ImageGroup.js
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* A group of images.
|
|
*/
|
|
|
|
function ImageGroup(props) {
|
|
var children = props.children,
|
|
className = props.className,
|
|
content = props.content,
|
|
size = props.size;
|
|
var classes = classnames_default()('ui', size, className, 'images');
|
|
var rest = lib_getUnhandledProps(ImageGroup, props);
|
|
var ElementType = lib_getElementType(ImageGroup, props);
|
|
return react_default.a.createElement(ElementType, extends_default()({}, rest, {
|
|
className: classes
|
|
}), childrenUtils_namespaceObject.isNil(children) ? content : children);
|
|
}
|
|
|
|
ImageGroup.handledProps = ["as", "children", "className", "content", "size"];
|
|
ImageGroup.propTypes = false ? undefined : {};
|
|
/* harmony default export */ var Image_ImageGroup = (ImageGroup);
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/elements/Image/Image.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* An image is a graphic representation of something.
|
|
* @see Icon
|
|
*/
|
|
|
|
function Image(props) {
|
|
var avatar = props.avatar,
|
|
bordered = props.bordered,
|
|
centered = props.centered,
|
|
children = props.children,
|
|
circular = props.circular,
|
|
className = props.className,
|
|
content = props.content,
|
|
dimmer = props.dimmer,
|
|
disabled = props.disabled,
|
|
floated = props.floated,
|
|
fluid = props.fluid,
|
|
hidden = props.hidden,
|
|
href = props.href,
|
|
inline = props.inline,
|
|
label = props.label,
|
|
rounded = props.rounded,
|
|
size = props.size,
|
|
spaced = props.spaced,
|
|
verticalAlign = props.verticalAlign,
|
|
wrapped = props.wrapped,
|
|
ui = props.ui;
|
|
var classes = classnames_default()(useKeyOnly(ui, 'ui'), size, useKeyOnly(avatar, 'avatar'), useKeyOnly(bordered, 'bordered'), useKeyOnly(circular, 'circular'), useKeyOnly(centered, 'centered'), useKeyOnly(disabled, 'disabled'), useKeyOnly(fluid, 'fluid'), useKeyOnly(hidden, 'hidden'), useKeyOnly(inline, 'inline'), useKeyOnly(rounded, 'rounded'), useKeyOrValueAndKey(spaced, 'spaced'), useValueAndKey(floated, 'floated'), useVerticalAlignProp(verticalAlign, 'aligned'), 'image', className);
|
|
var rest = lib_getUnhandledProps(Image, props);
|
|
|
|
var _partitionHTMLProps = htmlPropsUtils_partitionHTMLProps(rest, {
|
|
htmlProps: htmlImageProps
|
|
}),
|
|
_partitionHTMLProps2 = slicedToArray_default()(_partitionHTMLProps, 2),
|
|
imgTagProps = _partitionHTMLProps2[0],
|
|
rootProps = _partitionHTMLProps2[1];
|
|
|
|
var ElementType = lib_getElementType(Image, props, function () {
|
|
if (!isNil_default()(dimmer) || !isNil_default()(label) || !isNil_default()(wrapped) || !childrenUtils_namespaceObject.isNil(children)) {
|
|
return 'div';
|
|
}
|
|
});
|
|
|
|
if (!childrenUtils_namespaceObject.isNil(children)) {
|
|
return react_default.a.createElement(ElementType, extends_default()({}, rest, {
|
|
className: classes
|
|
}), children);
|
|
}
|
|
|
|
if (!childrenUtils_namespaceObject.isNil(content)) {
|
|
return react_default.a.createElement(ElementType, extends_default()({}, rest, {
|
|
className: classes
|
|
}), content);
|
|
}
|
|
|
|
if (ElementType === 'img') {
|
|
return react_default.a.createElement(ElementType, extends_default()({}, rootProps, imgTagProps, {
|
|
className: classes
|
|
}));
|
|
}
|
|
|
|
return react_default.a.createElement(ElementType, extends_default()({}, rootProps, {
|
|
className: classes,
|
|
href: href
|
|
}), Dimmer_Dimmer.create(dimmer, {
|
|
autoGenerateKey: false
|
|
}), Label_Label.create(label, {
|
|
autoGenerateKey: false
|
|
}), react_default.a.createElement("img", imgTagProps));
|
|
}
|
|
|
|
Image.handledProps = ["as", "avatar", "bordered", "centered", "children", "circular", "className", "content", "dimmer", "disabled", "floated", "fluid", "hidden", "href", "inline", "label", "rounded", "size", "spaced", "ui", "verticalAlign", "wrapped"];
|
|
Image.Group = Image_ImageGroup;
|
|
Image.propTypes = false ? undefined : {};
|
|
Image.defaultProps = {
|
|
as: 'img',
|
|
ui: true
|
|
};
|
|
Image.create = createShorthandFactory(Image, function (value) {
|
|
return {
|
|
src: value
|
|
};
|
|
});
|
|
/* harmony default export */ var Image_Image = (Image);
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/elements/Label/LabelDetail.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function LabelDetail(props) {
|
|
var children = props.children,
|
|
className = props.className,
|
|
content = props.content;
|
|
var classes = classnames_default()('detail', className);
|
|
var rest = lib_getUnhandledProps(LabelDetail, props);
|
|
var ElementType = lib_getElementType(LabelDetail, props);
|
|
return react_default.a.createElement(ElementType, extends_default()({}, rest, {
|
|
className: classes
|
|
}), childrenUtils_namespaceObject.isNil(children) ? content : children);
|
|
}
|
|
|
|
LabelDetail.handledProps = ["as", "children", "className", "content"];
|
|
LabelDetail.propTypes = false ? undefined : {};
|
|
LabelDetail.create = createShorthandFactory(LabelDetail, function (val) {
|
|
return {
|
|
content: val
|
|
};
|
|
});
|
|
/* harmony default export */ var Label_LabelDetail = (LabelDetail);
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/elements/Label/LabelGroup.js
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* A label can be grouped.
|
|
*/
|
|
|
|
function LabelGroup(props) {
|
|
var children = props.children,
|
|
circular = props.circular,
|
|
className = props.className,
|
|
color = props.color,
|
|
content = props.content,
|
|
size = props.size,
|
|
tag = props.tag;
|
|
var classes = classnames_default()('ui', color, size, useKeyOnly(circular, 'circular'), useKeyOnly(tag, 'tag'), 'labels', className);
|
|
var rest = lib_getUnhandledProps(LabelGroup, props);
|
|
var ElementType = lib_getElementType(LabelGroup, props);
|
|
return react_default.a.createElement(ElementType, extends_default()({}, rest, {
|
|
className: classes
|
|
}), childrenUtils_namespaceObject.isNil(children) ? content : children);
|
|
}
|
|
|
|
LabelGroup.handledProps = ["as", "children", "circular", "className", "color", "content", "size", "tag"];
|
|
LabelGroup.propTypes = false ? undefined : {};
|
|
/* harmony default export */ var Label_LabelGroup = (LabelGroup);
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/elements/Label/Label.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* A label displays content classification.
|
|
*/
|
|
|
|
var Label_Label =
|
|
/*#__PURE__*/
|
|
function (_Component) {
|
|
inherits_default()(Label, _Component);
|
|
|
|
function Label() {
|
|
var _getPrototypeOf2;
|
|
|
|
var _this;
|
|
|
|
classCallCheck_default()(this, Label);
|
|
|
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
args[_key] = arguments[_key];
|
|
}
|
|
|
|
_this = possibleConstructorReturn_default()(this, (_getPrototypeOf2 = getPrototypeOf_default()(Label)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "handleClick", function (e) {
|
|
var onClick = _this.props.onClick;
|
|
if (onClick) onClick(e, _this.props);
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "handleIconOverrides", function (predefinedProps) {
|
|
return {
|
|
onClick: function onClick(e) {
|
|
invoke_default()(predefinedProps, 'onClick', e);
|
|
|
|
invoke_default()(_this.props, 'onRemove', e, _this.props);
|
|
}
|
|
};
|
|
});
|
|
|
|
return _this;
|
|
}
|
|
|
|
createClass_default()(Label, [{
|
|
key: "render",
|
|
value: function render() {
|
|
var _this$props = this.props,
|
|
active = _this$props.active,
|
|
attached = _this$props.attached,
|
|
basic = _this$props.basic,
|
|
children = _this$props.children,
|
|
circular = _this$props.circular,
|
|
className = _this$props.className,
|
|
color = _this$props.color,
|
|
content = _this$props.content,
|
|
corner = _this$props.corner,
|
|
detail = _this$props.detail,
|
|
empty = _this$props.empty,
|
|
floating = _this$props.floating,
|
|
horizontal = _this$props.horizontal,
|
|
icon = _this$props.icon,
|
|
image = _this$props.image,
|
|
onRemove = _this$props.onRemove,
|
|
pointing = _this$props.pointing,
|
|
prompt = _this$props.prompt,
|
|
removeIcon = _this$props.removeIcon,
|
|
ribbon = _this$props.ribbon,
|
|
size = _this$props.size,
|
|
tag = _this$props.tag;
|
|
var pointingClass = pointing === true && 'pointing' || (pointing === 'left' || pointing === 'right') && "".concat(pointing, " pointing") || (pointing === 'above' || pointing === 'below') && "pointing ".concat(pointing);
|
|
var classes = classnames_default()('ui', color, pointingClass, size, useKeyOnly(active, 'active'), useKeyOnly(basic, 'basic'), useKeyOnly(circular, 'circular'), useKeyOnly(empty, 'empty'), useKeyOnly(floating, 'floating'), useKeyOnly(horizontal, 'horizontal'), useKeyOnly(image === true, 'image'), useKeyOnly(prompt, 'prompt'), useKeyOnly(tag, 'tag'), useKeyOrValueAndKey(corner, 'corner'), useKeyOrValueAndKey(ribbon, 'ribbon'), useValueAndKey(attached, 'attached'), 'label', className);
|
|
var rest = lib_getUnhandledProps(Label, this.props);
|
|
var ElementType = lib_getElementType(Label, this.props);
|
|
|
|
if (!childrenUtils_namespaceObject.isNil(children)) {
|
|
return react_default.a.createElement(ElementType, extends_default()({}, rest, {
|
|
className: classes,
|
|
onClick: this.handleClick
|
|
}), children);
|
|
}
|
|
|
|
var removeIconShorthand = isUndefined_default()(removeIcon) ? 'delete' : removeIcon;
|
|
return react_default.a.createElement(ElementType, extends_default()({
|
|
className: classes,
|
|
onClick: this.handleClick
|
|
}, rest), elements_Icon_Icon.create(icon, {
|
|
autoGenerateKey: false
|
|
}), typeof image !== 'boolean' && Image_Image.create(image, {
|
|
autoGenerateKey: false
|
|
}), content, Label_LabelDetail.create(detail, {
|
|
autoGenerateKey: false
|
|
}), onRemove && elements_Icon_Icon.create(removeIconShorthand, {
|
|
autoGenerateKey: false,
|
|
overrideProps: this.handleIconOverrides
|
|
}));
|
|
}
|
|
}]);
|
|
|
|
return Label;
|
|
}(react["Component"]);
|
|
|
|
defineProperty_default()(Label_Label, "Detail", Label_LabelDetail);
|
|
|
|
defineProperty_default()(Label_Label, "Group", Label_LabelGroup);
|
|
|
|
defineProperty_default()(Label_Label, "handledProps", ["active", "as", "attached", "basic", "children", "circular", "className", "color", "content", "corner", "detail", "empty", "floating", "horizontal", "icon", "image", "onClick", "onRemove", "pointing", "prompt", "removeIcon", "ribbon", "size", "tag"]);
|
|
|
|
|
|
Label_Label.propTypes = false ? undefined : {};
|
|
Label_Label.create = createShorthandFactory(Label_Label, function (value) {
|
|
return {
|
|
content: value
|
|
};
|
|
});
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/elements/Button/ButtonContent.js
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* Used in some Button types, such as `animated`.
|
|
*/
|
|
|
|
function ButtonContent(props) {
|
|
var children = props.children,
|
|
className = props.className,
|
|
content = props.content,
|
|
hidden = props.hidden,
|
|
visible = props.visible;
|
|
var classes = classnames_default()(useKeyOnly(visible, 'visible'), useKeyOnly(hidden, 'hidden'), 'content', className);
|
|
var rest = lib_getUnhandledProps(ButtonContent, props);
|
|
var ElementType = lib_getElementType(ButtonContent, props);
|
|
return react_default.a.createElement(ElementType, extends_default()({}, rest, {
|
|
className: classes
|
|
}), childrenUtils_namespaceObject.isNil(children) ? content : children);
|
|
}
|
|
|
|
ButtonContent.handledProps = ["as", "children", "className", "content", "hidden", "visible"];
|
|
ButtonContent.propTypes = false ? undefined : {};
|
|
/* harmony default export */ var Button_ButtonContent = (ButtonContent);
|
|
// EXTERNAL MODULE: ./node_modules/lodash/map.js
|
|
var map = __webpack_require__(32);
|
|
var map_default = /*#__PURE__*/__webpack_require__.n(map);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/elements/Button/ButtonGroup.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* Buttons can be grouped.
|
|
*/
|
|
|
|
function ButtonGroup(props) {
|
|
var attached = props.attached,
|
|
basic = props.basic,
|
|
buttons = props.buttons,
|
|
children = props.children,
|
|
className = props.className,
|
|
color = props.color,
|
|
compact = props.compact,
|
|
content = props.content,
|
|
floated = props.floated,
|
|
fluid = props.fluid,
|
|
icon = props.icon,
|
|
inverted = props.inverted,
|
|
labeled = props.labeled,
|
|
negative = props.negative,
|
|
positive = props.positive,
|
|
primary = props.primary,
|
|
secondary = props.secondary,
|
|
size = props.size,
|
|
toggle = props.toggle,
|
|
vertical = props.vertical,
|
|
widths = props.widths;
|
|
var classes = classnames_default()('ui', color, size, useKeyOnly(basic, 'basic'), useKeyOnly(compact, 'compact'), useKeyOnly(fluid, 'fluid'), useKeyOnly(icon, 'icon'), useKeyOnly(inverted, 'inverted'), useKeyOnly(labeled, 'labeled'), useKeyOnly(negative, 'negative'), useKeyOnly(positive, 'positive'), useKeyOnly(primary, 'primary'), useKeyOnly(secondary, 'secondary'), useKeyOnly(toggle, 'toggle'), useKeyOnly(vertical, 'vertical'), useKeyOrValueAndKey(attached, 'attached'), useValueAndKey(floated, 'floated'), classNameBuilders_useWidthProp(widths), 'buttons', className);
|
|
var rest = lib_getUnhandledProps(ButtonGroup, props);
|
|
var ElementType = lib_getElementType(ButtonGroup, props);
|
|
|
|
if (isNil_default()(buttons)) {
|
|
return react_default.a.createElement(ElementType, extends_default()({}, rest, {
|
|
className: classes
|
|
}), childrenUtils_namespaceObject.isNil(children) ? content : children);
|
|
}
|
|
|
|
return react_default.a.createElement(ElementType, extends_default()({}, rest, {
|
|
className: classes
|
|
}), map_default()(buttons, function (button) {
|
|
return elements_Button_Button.create(button);
|
|
}));
|
|
}
|
|
|
|
ButtonGroup.handledProps = ["as", "attached", "basic", "buttons", "children", "className", "color", "compact", "content", "floated", "fluid", "icon", "inverted", "labeled", "negative", "positive", "primary", "secondary", "size", "toggle", "vertical", "widths"];
|
|
ButtonGroup.propTypes = false ? undefined : {};
|
|
/* harmony default export */ var Button_ButtonGroup = (ButtonGroup);
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/elements/Button/ButtonOr.js
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* Button groups can contain conditionals.
|
|
*/
|
|
|
|
function ButtonOr(props) {
|
|
var className = props.className,
|
|
text = props.text;
|
|
var classes = classnames_default()('or', className);
|
|
var rest = lib_getUnhandledProps(ButtonOr, props);
|
|
var ElementType = lib_getElementType(ButtonOr, props);
|
|
return react_default.a.createElement(ElementType, extends_default()({}, rest, {
|
|
className: classes,
|
|
"data-text": text
|
|
}));
|
|
}
|
|
|
|
ButtonOr.handledProps = ["as", "className", "text"];
|
|
ButtonOr.propTypes = false ? undefined : {};
|
|
/* harmony default export */ var Button_ButtonOr = (ButtonOr);
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/elements/Button/Button.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* A Button indicates a possible user action.
|
|
* @see Form
|
|
* @see Icon
|
|
* @see Label
|
|
*/
|
|
|
|
var Button_Button =
|
|
/*#__PURE__*/
|
|
function (_Component) {
|
|
inherits_default()(Button, _Component);
|
|
|
|
function Button() {
|
|
var _getPrototypeOf2;
|
|
|
|
var _this;
|
|
|
|
classCallCheck_default()(this, Button);
|
|
|
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
args[_key] = arguments[_key];
|
|
}
|
|
|
|
_this = possibleConstructorReturn_default()(this, (_getPrototypeOf2 = getPrototypeOf_default()(Button)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "ref", Object(react["createRef"])());
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "computeElementType", function () {
|
|
var _this$props = _this.props,
|
|
attached = _this$props.attached,
|
|
label = _this$props.label;
|
|
if (!isNil_default()(attached) || !isNil_default()(label)) return 'div';
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "computeTabIndex", function (ElementType) {
|
|
var _this$props2 = _this.props,
|
|
disabled = _this$props2.disabled,
|
|
tabIndex = _this$props2.tabIndex;
|
|
if (!isNil_default()(tabIndex)) return tabIndex;
|
|
if (disabled) return -1;
|
|
if (ElementType === 'div') return 0;
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "focus", function () {
|
|
return invoke_default()(_this.ref.current, 'focus');
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "handleClick", function (e) {
|
|
var disabled = _this.props.disabled;
|
|
|
|
if (disabled) {
|
|
e.preventDefault();
|
|
return;
|
|
}
|
|
|
|
invoke_default()(_this.props, 'onClick', e, _this.props);
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "hasIconClass", function () {
|
|
var _this$props3 = _this.props,
|
|
labelPosition = _this$props3.labelPosition,
|
|
children = _this$props3.children,
|
|
content = _this$props3.content,
|
|
icon = _this$props3.icon;
|
|
if (icon === true) return true;
|
|
return icon && (labelPosition || childrenUtils_namespaceObject.isNil(children) && isNil_default()(content));
|
|
});
|
|
|
|
return _this;
|
|
}
|
|
|
|
createClass_default()(Button, [{
|
|
key: "computeButtonAriaRole",
|
|
value: function computeButtonAriaRole(ElementType) {
|
|
var role = this.props.role;
|
|
if (!isNil_default()(role)) return role;
|
|
if (ElementType !== 'button') return 'button';
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function render() {
|
|
var _this$props4 = this.props,
|
|
active = _this$props4.active,
|
|
animated = _this$props4.animated,
|
|
attached = _this$props4.attached,
|
|
basic = _this$props4.basic,
|
|
children = _this$props4.children,
|
|
circular = _this$props4.circular,
|
|
className = _this$props4.className,
|
|
color = _this$props4.color,
|
|
compact = _this$props4.compact,
|
|
content = _this$props4.content,
|
|
disabled = _this$props4.disabled,
|
|
floated = _this$props4.floated,
|
|
fluid = _this$props4.fluid,
|
|
icon = _this$props4.icon,
|
|
inverted = _this$props4.inverted,
|
|
label = _this$props4.label,
|
|
labelPosition = _this$props4.labelPosition,
|
|
loading = _this$props4.loading,
|
|
negative = _this$props4.negative,
|
|
positive = _this$props4.positive,
|
|
primary = _this$props4.primary,
|
|
secondary = _this$props4.secondary,
|
|
size = _this$props4.size,
|
|
toggle = _this$props4.toggle;
|
|
var baseClasses = classnames_default()(color, size, useKeyOnly(active, 'active'), useKeyOnly(basic, 'basic'), useKeyOnly(circular, 'circular'), useKeyOnly(compact, 'compact'), useKeyOnly(fluid, 'fluid'), useKeyOnly(this.hasIconClass(), 'icon'), useKeyOnly(inverted, 'inverted'), useKeyOnly(loading, 'loading'), useKeyOnly(negative, 'negative'), useKeyOnly(positive, 'positive'), useKeyOnly(primary, 'primary'), useKeyOnly(secondary, 'secondary'), useKeyOnly(toggle, 'toggle'), useKeyOrValueAndKey(animated, 'animated'), useKeyOrValueAndKey(attached, 'attached'));
|
|
var labeledClasses = classnames_default()(useKeyOrValueAndKey(labelPosition || !!label, 'labeled'));
|
|
var wrapperClasses = classnames_default()(useKeyOnly(disabled, 'disabled'), useValueAndKey(floated, 'floated'));
|
|
var rest = lib_getUnhandledProps(Button, this.props);
|
|
var ElementType = lib_getElementType(Button, this.props, this.computeElementType);
|
|
var tabIndex = this.computeTabIndex(ElementType);
|
|
|
|
if (!isNil_default()(label)) {
|
|
var buttonClasses = classnames_default()('ui', baseClasses, 'button', className);
|
|
var containerClasses = classnames_default()('ui', labeledClasses, 'button', className, wrapperClasses);
|
|
var labelElement = Label_Label.create(label, {
|
|
defaultProps: {
|
|
basic: true,
|
|
pointing: labelPosition === 'left' ? 'right' : 'left'
|
|
},
|
|
autoGenerateKey: false
|
|
});
|
|
return react_default.a.createElement(ElementType, extends_default()({}, rest, {
|
|
className: containerClasses,
|
|
onClick: this.handleClick
|
|
}), labelPosition === 'left' && labelElement, react_default.a.createElement(es_Ref, {
|
|
innerRef: this.ref
|
|
}, react_default.a.createElement("button", {
|
|
className: buttonClasses,
|
|
"aria-pressed": toggle ? !!active : undefined,
|
|
disabled: disabled,
|
|
tabIndex: tabIndex
|
|
}, elements_Icon_Icon.create(icon, {
|
|
autoGenerateKey: false
|
|
}), " ", content)), (labelPosition === 'right' || !labelPosition) && labelElement);
|
|
}
|
|
|
|
var classes = classnames_default()('ui', baseClasses, wrapperClasses, labeledClasses, 'button', className);
|
|
var hasChildren = !childrenUtils_namespaceObject.isNil(children);
|
|
var role = this.computeButtonAriaRole(ElementType);
|
|
return react_default.a.createElement(es_Ref, {
|
|
innerRef: this.ref
|
|
}, react_default.a.createElement(ElementType, extends_default()({}, rest, {
|
|
className: classes,
|
|
"aria-pressed": toggle ? !!active : undefined,
|
|
disabled: disabled && ElementType === 'button' || undefined,
|
|
onClick: this.handleClick,
|
|
role: role,
|
|
tabIndex: tabIndex
|
|
}), hasChildren && children, !hasChildren && elements_Icon_Icon.create(icon, {
|
|
autoGenerateKey: false
|
|
}), !hasChildren && content));
|
|
}
|
|
}]);
|
|
|
|
return Button;
|
|
}(react["Component"]);
|
|
|
|
defineProperty_default()(Button_Button, "defaultProps", {
|
|
as: 'button'
|
|
});
|
|
|
|
defineProperty_default()(Button_Button, "Content", Button_ButtonContent);
|
|
|
|
defineProperty_default()(Button_Button, "Group", Button_ButtonGroup);
|
|
|
|
defineProperty_default()(Button_Button, "Or", Button_ButtonOr);
|
|
|
|
defineProperty_default()(Button_Button, "handledProps", ["active", "animated", "as", "attached", "basic", "children", "circular", "className", "color", "compact", "content", "disabled", "floated", "fluid", "icon", "inverted", "label", "labelPosition", "loading", "negative", "onClick", "positive", "primary", "role", "secondary", "size", "tabIndex", "toggle"]);
|
|
|
|
Button_Button.propTypes = false ? undefined : {};
|
|
Button_Button.create = createShorthandFactory(Button_Button, function (value) {
|
|
return {
|
|
content: value
|
|
};
|
|
});
|
|
/* harmony default export */ var elements_Button_Button = (Button_Button);
|
|
// EXTERNAL MODULE: ./node_modules/lodash/get.js
|
|
var get = __webpack_require__(24);
|
|
var get_default = /*#__PURE__*/__webpack_require__.n(get);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash/set.js
|
|
var set = __webpack_require__(271);
|
|
var set_default = /*#__PURE__*/__webpack_require__.n(set);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/modules/Checkbox/Checkbox.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* A checkbox allows a user to select a value from a small set of options, often binary.
|
|
* @see Form
|
|
* @see Radio
|
|
*/
|
|
var Checkbox_Checkbox =
|
|
/*#__PURE__*/
|
|
function (_Component) {
|
|
inherits_default()(Checkbox, _Component);
|
|
|
|
function Checkbox() {
|
|
var _getPrototypeOf2;
|
|
|
|
var _this;
|
|
|
|
classCallCheck_default()(this, Checkbox);
|
|
|
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
args[_key] = arguments[_key];
|
|
}
|
|
|
|
_this = possibleConstructorReturn_default()(this, (_getPrototypeOf2 = getPrototypeOf_default()(Checkbox)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "inputRef", Object(react["createRef"])());
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "labelRef", Object(react["createRef"])());
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "canToggle", function () {
|
|
var _this$props = _this.props,
|
|
disabled = _this$props.disabled,
|
|
radio = _this$props.radio,
|
|
readOnly = _this$props.readOnly;
|
|
var checked = _this.state.checked;
|
|
return !disabled && !readOnly && !(radio && checked);
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "computeTabIndex", function () {
|
|
var _this$props2 = _this.props,
|
|
disabled = _this$props2.disabled,
|
|
tabIndex = _this$props2.tabIndex;
|
|
if (!isNil_default()(tabIndex)) return tabIndex;
|
|
return disabled ? -1 : 0;
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "handleClick", function (e) {
|
|
var id = _this.props.id;
|
|
var _this$state = _this.state,
|
|
checked = _this$state.checked,
|
|
indeterminate = _this$state.indeterminate;
|
|
|
|
var isInputClick = invoke_default()(_this.inputRef.current, 'contains', e.target);
|
|
|
|
var isLabelClick = invoke_default()(_this.labelRef.current, 'contains', e.target);
|
|
|
|
var isRootClick = !isLabelClick && !isInputClick;
|
|
var hasId = !isNil_default()(id);
|
|
var isLabelClickAndForwardedToInput = isLabelClick && hasId; // https://github.com/Semantic-Org/Semantic-UI-React/pull/3351
|
|
|
|
if (!isLabelClickAndForwardedToInput) {
|
|
invoke_default()(_this.props, 'onClick', e, objectSpread_default()({}, _this.props, {
|
|
checked: !checked,
|
|
indeterminate: !!indeterminate
|
|
}));
|
|
}
|
|
|
|
if (_this.isClickFromMouse) {
|
|
_this.isClickFromMouse = false;
|
|
|
|
if (isLabelClick && !hasId) {
|
|
_this.handleChange(e);
|
|
} // Changes should be triggered for the slider variation
|
|
|
|
|
|
if (isRootClick) {
|
|
_this.handleChange(e);
|
|
}
|
|
|
|
if (isLabelClick && hasId) {
|
|
// To prevent two clicks from being fired from the component we have to stop the propagation
|
|
// from the "input" click: https://github.com/Semantic-Org/Semantic-UI-React/issues/3433
|
|
e.stopPropagation();
|
|
}
|
|
}
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "handleChange", function (e) {
|
|
var checked = _this.state.checked;
|
|
if (!_this.canToggle()) return;
|
|
|
|
invoke_default()(_this.props, 'onChange', e, objectSpread_default()({}, _this.props, {
|
|
checked: !checked,
|
|
indeterminate: false
|
|
}));
|
|
|
|
_this.trySetState({
|
|
checked: !checked,
|
|
indeterminate: false
|
|
});
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "handleMouseDown", function (e) {
|
|
var _this$state2 = _this.state,
|
|
checked = _this$state2.checked,
|
|
indeterminate = _this$state2.indeterminate;
|
|
|
|
invoke_default()(_this.props, 'onMouseDown', e, objectSpread_default()({}, _this.props, {
|
|
checked: !!checked,
|
|
indeterminate: !!indeterminate
|
|
}));
|
|
|
|
if (!e.defaultPrevented) {
|
|
invoke_default()(_this.inputRef.current, 'focus');
|
|
} // Heads up!
|
|
// We need to call "preventDefault" to keep element focused.
|
|
|
|
|
|
e.preventDefault();
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "handleMouseUp", function (e) {
|
|
var _this$state3 = _this.state,
|
|
checked = _this$state3.checked,
|
|
indeterminate = _this$state3.indeterminate;
|
|
_this.isClickFromMouse = true;
|
|
|
|
invoke_default()(_this.props, 'onMouseUp', e, objectSpread_default()({}, _this.props, {
|
|
checked: !!checked,
|
|
indeterminate: !!indeterminate
|
|
}));
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "setIndeterminate", function () {
|
|
var indeterminate = _this.state.indeterminate;
|
|
|
|
set_default()(_this.inputRef, 'current.indeterminate', !!indeterminate);
|
|
});
|
|
|
|
return _this;
|
|
}
|
|
|
|
createClass_default()(Checkbox, [{
|
|
key: "componentDidMount",
|
|
value: function componentDidMount() {
|
|
this.setIndeterminate();
|
|
}
|
|
}, {
|
|
key: "componentDidUpdate",
|
|
value: function componentDidUpdate() {
|
|
this.setIndeterminate();
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function render() {
|
|
var _this$props3 = this.props,
|
|
className = _this$props3.className,
|
|
disabled = _this$props3.disabled,
|
|
label = _this$props3.label,
|
|
id = _this$props3.id,
|
|
name = _this$props3.name,
|
|
radio = _this$props3.radio,
|
|
readOnly = _this$props3.readOnly,
|
|
slider = _this$props3.slider,
|
|
toggle = _this$props3.toggle,
|
|
type = _this$props3.type,
|
|
value = _this$props3.value;
|
|
var _this$state4 = this.state,
|
|
checked = _this$state4.checked,
|
|
indeterminate = _this$state4.indeterminate;
|
|
var classes = classnames_default()('ui', useKeyOnly(checked, 'checked'), useKeyOnly(disabled, 'disabled'), useKeyOnly(indeterminate, 'indeterminate'), // auto apply fitted class to compact white space when there is no label
|
|
// https://semantic-ui.com/modules/checkbox.html#fitted
|
|
useKeyOnly(isNil_default()(label), 'fitted'), useKeyOnly(radio, 'radio'), useKeyOnly(readOnly, 'read-only'), useKeyOnly(slider, 'slider'), useKeyOnly(toggle, 'toggle'), 'checkbox', className);
|
|
var unhandled = lib_getUnhandledProps(Checkbox, this.props);
|
|
var ElementType = lib_getElementType(Checkbox, this.props);
|
|
|
|
var _partitionHTMLProps = htmlPropsUtils_partitionHTMLProps(unhandled, {
|
|
htmlProps: htmlInputAttrs
|
|
}),
|
|
_partitionHTMLProps2 = slicedToArray_default()(_partitionHTMLProps, 2),
|
|
htmlInputProps = _partitionHTMLProps2[0],
|
|
rest = _partitionHTMLProps2[1]; // Heads Up!
|
|
// Do not remove empty labels, they are required by SUI CSS
|
|
|
|
|
|
var labelElement = createHTMLLabel(label, {
|
|
defaultProps: {
|
|
htmlFor: id
|
|
},
|
|
autoGenerateKey: false
|
|
}) || react_default.a.createElement("label", {
|
|
htmlFor: id
|
|
});
|
|
return react_default.a.createElement(ElementType, extends_default()({}, rest, {
|
|
className: classes,
|
|
onClick: this.handleClick,
|
|
onChange: this.handleChange,
|
|
onMouseDown: this.handleMouseDown,
|
|
onMouseUp: this.handleMouseUp
|
|
}), react_default.a.createElement(es_Ref, {
|
|
innerRef: this.inputRef
|
|
}, react_default.a.createElement("input", extends_default()({}, htmlInputProps, {
|
|
checked: checked,
|
|
className: "hidden",
|
|
disabled: disabled,
|
|
id: id,
|
|
name: name,
|
|
readOnly: true,
|
|
tabIndex: this.computeTabIndex(),
|
|
type: type,
|
|
value: value
|
|
}))), react_default.a.createElement(es_Ref, {
|
|
innerRef: this.labelRef
|
|
}, labelElement));
|
|
}
|
|
}]);
|
|
|
|
return Checkbox;
|
|
}(AutoControlledComponent_AutoControlledComponent);
|
|
|
|
defineProperty_default()(Checkbox_Checkbox, "defaultProps", {
|
|
type: 'checkbox'
|
|
});
|
|
|
|
defineProperty_default()(Checkbox_Checkbox, "autoControlledProps", ['checked', 'indeterminate']);
|
|
|
|
defineProperty_default()(Checkbox_Checkbox, "handledProps", ["as", "checked", "className", "defaultChecked", "defaultIndeterminate", "disabled", "fitted", "id", "indeterminate", "label", "name", "onChange", "onClick", "onMouseDown", "onMouseUp", "radio", "readOnly", "slider", "tabIndex", "toggle", "type", "value"]);
|
|
|
|
|
|
Checkbox_Checkbox.propTypes = false ? undefined : {};
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/addons/Radio/Radio.js
|
|
|
|
|
|
|
|
|
|
/**
|
|
* A Radio is sugar for <Checkbox radio />.
|
|
* Useful for exclusive groups of sliders or toggles.
|
|
* @see Checkbox
|
|
* @see Form
|
|
*/
|
|
|
|
function Radio(props) {
|
|
var slider = props.slider,
|
|
toggle = props.toggle,
|
|
type = props.type;
|
|
var rest = lib_getUnhandledProps(Radio, props); // const ElementType = getElementType(Radio, props)
|
|
// radio, slider, toggle are exclusive
|
|
// use an undefined radio if slider or toggle are present
|
|
|
|
var radio = !(slider || toggle) || undefined;
|
|
return react_default.a.createElement(Checkbox_Checkbox, extends_default()({}, rest, {
|
|
type: type,
|
|
radio: radio,
|
|
slider: slider,
|
|
toggle: toggle
|
|
}));
|
|
}
|
|
|
|
Radio.handledProps = ["slider", "toggle", "type"];
|
|
Radio.propTypes = false ? undefined : {};
|
|
Radio.defaultProps = {
|
|
type: 'radio'
|
|
};
|
|
/* harmony default export */ var Radio_Radio = (Radio);
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/collections/Form/FormField.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* A field is a form element containing a label and an input.
|
|
* @see Form
|
|
* @see Button
|
|
* @see Checkbox
|
|
* @see Dropdown
|
|
* @see Input
|
|
* @see Radio
|
|
* @see Select
|
|
* @see Visibility
|
|
*/
|
|
|
|
function FormField(props) {
|
|
var children = props.children,
|
|
className = props.className,
|
|
content = props.content,
|
|
control = props.control,
|
|
disabled = props.disabled,
|
|
error = props.error,
|
|
inline = props.inline,
|
|
label = props.label,
|
|
required = props.required,
|
|
type = props.type,
|
|
width = props.width;
|
|
var classes = classnames_default()(useKeyOnly(disabled, 'disabled'), useKeyOnly(error, 'error'), useKeyOnly(inline, 'inline'), useKeyOnly(required, 'required'), classNameBuilders_useWidthProp(width, 'wide'), 'field', className);
|
|
var rest = lib_getUnhandledProps(FormField, props);
|
|
var ElementType = lib_getElementType(FormField, props);
|
|
|
|
var errorPointing = get_default()(error, 'pointing', 'above');
|
|
|
|
var errorLabel = Label_Label.create(error, {
|
|
autoGenerateKey: false,
|
|
defaultProps: {
|
|
prompt: true,
|
|
pointing: errorPointing
|
|
}
|
|
});
|
|
var errorLabelBefore = (errorPointing === 'below' || errorPointing === 'right') && errorLabel;
|
|
var errorLabelAfter = (errorPointing === 'above' || errorPointing === 'left') && errorLabel; // ----------------------------------------
|
|
// No Control
|
|
// ----------------------------------------
|
|
|
|
if (isNil_default()(control)) {
|
|
if (isNil_default()(label)) {
|
|
return react_default.a.createElement(ElementType, extends_default()({}, rest, {
|
|
className: classes
|
|
}), childrenUtils_namespaceObject.isNil(children) ? content : children);
|
|
}
|
|
|
|
return react_default.a.createElement(ElementType, extends_default()({}, rest, {
|
|
className: classes
|
|
}), errorLabelBefore, createHTMLLabel(label, {
|
|
autoGenerateKey: false
|
|
}), errorLabelAfter);
|
|
} // ----------------------------------------
|
|
// Checkbox/Radio Control
|
|
// ----------------------------------------
|
|
|
|
|
|
var controlProps = objectSpread_default()({}, rest, {
|
|
content: content,
|
|
children: children,
|
|
disabled: disabled,
|
|
required: required,
|
|
type: type // wrap HTML checkboxes/radios in the label
|
|
|
|
});
|
|
|
|
if (control === 'input' && (type === 'checkbox' || type === 'radio')) {
|
|
return react_default.a.createElement(ElementType, {
|
|
className: classes
|
|
}, react_default.a.createElement("label", null, errorLabelBefore, Object(react["createElement"])(control, controlProps), " ", label, errorLabelAfter));
|
|
} // pass label prop to controls that support it
|
|
|
|
|
|
if (control === Checkbox_Checkbox || control === Radio_Radio) {
|
|
return react_default.a.createElement(ElementType, {
|
|
className: classes
|
|
}, errorLabelBefore, Object(react["createElement"])(control, objectSpread_default()({}, controlProps, {
|
|
label: label
|
|
})), errorLabelAfter);
|
|
} // ----------------------------------------
|
|
// Other Control
|
|
// ----------------------------------------
|
|
|
|
|
|
return react_default.a.createElement(ElementType, {
|
|
className: classes
|
|
}, createHTMLLabel(label, {
|
|
defaultProps: {
|
|
htmlFor: get_default()(controlProps, 'id')
|
|
},
|
|
autoGenerateKey: false
|
|
}), errorLabelBefore, Object(react["createElement"])(control, controlProps), errorLabelAfter);
|
|
}
|
|
|
|
FormField.handledProps = ["as", "children", "className", "content", "control", "disabled", "error", "inline", "label", "required", "type", "width"];
|
|
FormField.propTypes = false ? undefined : {};
|
|
/* harmony default export */ var Form_FormField = (FormField);
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/collections/Form/FormButton.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* Sugar for <Form.Field control={Button} />.
|
|
* @see Button
|
|
* @see Form
|
|
*/
|
|
|
|
function FormButton(props) {
|
|
var control = props.control;
|
|
var rest = lib_getUnhandledProps(FormButton, props);
|
|
var ElementType = lib_getElementType(FormButton, props);
|
|
return react_default.a.createElement(ElementType, extends_default()({}, rest, {
|
|
control: control
|
|
}));
|
|
}
|
|
|
|
FormButton.handledProps = ["as", "control"];
|
|
FormButton.propTypes = false ? undefined : {};
|
|
FormButton.defaultProps = {
|
|
as: Form_FormField,
|
|
control: elements_Button_Button
|
|
};
|
|
/* harmony default export */ var Form_FormButton = (FormButton);
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/collections/Form/FormCheckbox.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* Sugar for <Form.Field control={Checkbox} />.
|
|
* @see Checkbox
|
|
* @see Form
|
|
*/
|
|
|
|
function FormCheckbox(props) {
|
|
var control = props.control;
|
|
var rest = lib_getUnhandledProps(FormCheckbox, props);
|
|
var ElementType = lib_getElementType(FormCheckbox, props);
|
|
return react_default.a.createElement(ElementType, extends_default()({}, rest, {
|
|
control: control
|
|
}));
|
|
}
|
|
|
|
FormCheckbox.handledProps = ["as", "control"];
|
|
FormCheckbox.propTypes = false ? undefined : {};
|
|
FormCheckbox.defaultProps = {
|
|
as: Form_FormField,
|
|
control: Checkbox_Checkbox
|
|
};
|
|
/* harmony default export */ var Form_FormCheckbox = (FormCheckbox);
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/get.js
|
|
var helpers_get = __webpack_require__(272);
|
|
var helpers_get_default = /*#__PURE__*/__webpack_require__.n(helpers_get);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash/compact.js
|
|
var lodash_compact = __webpack_require__(273);
|
|
var compact_default = /*#__PURE__*/__webpack_require__.n(lodash_compact);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash/every.js
|
|
var every = __webpack_require__(274);
|
|
var every_default = /*#__PURE__*/__webpack_require__.n(every);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash/findIndex.js
|
|
var findIndex = __webpack_require__(183);
|
|
var findIndex_default = /*#__PURE__*/__webpack_require__.n(findIndex);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash/reduce.js
|
|
var reduce = __webpack_require__(275);
|
|
var reduce_default = /*#__PURE__*/__webpack_require__.n(reduce);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash/escapeRegExp.js
|
|
var escapeRegExp = __webpack_require__(276);
|
|
var escapeRegExp_default = /*#__PURE__*/__webpack_require__.n(escapeRegExp);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash/deburr.js
|
|
var lodash_deburr = __webpack_require__(131);
|
|
var deburr_default = /*#__PURE__*/__webpack_require__.n(lodash_deburr);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash/pick.js
|
|
var pick = __webpack_require__(277);
|
|
var pick_default = /*#__PURE__*/__webpack_require__.n(pick);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash/dropRight.js
|
|
var dropRight = __webpack_require__(278);
|
|
var dropRight_default = /*#__PURE__*/__webpack_require__.n(dropRight);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash/size.js
|
|
var lodash_size = __webpack_require__(279);
|
|
var size_default = /*#__PURE__*/__webpack_require__.n(lodash_size);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash/difference.js
|
|
var difference = __webpack_require__(187);
|
|
var difference_default = /*#__PURE__*/__webpack_require__.n(difference);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash/union.js
|
|
var union = __webpack_require__(188);
|
|
var union_default = /*#__PURE__*/__webpack_require__.n(union);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash/noop.js
|
|
var noop = __webpack_require__(184);
|
|
var noop_default = /*#__PURE__*/__webpack_require__.n(noop);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/lodash/isEqual.js
|
|
var isEqual = __webpack_require__(280);
|
|
var isEqual_default = /*#__PURE__*/__webpack_require__.n(isEqual);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/shallowequal/index.js
|
|
var shallowequal = __webpack_require__(134);
|
|
var shallowequal_default = /*#__PURE__*/__webpack_require__.n(shallowequal);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/modules/Dropdown/DropdownDivider.js
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* A dropdown menu can contain dividers to separate related content.
|
|
*/
|
|
|
|
function DropdownDivider(props) {
|
|
var className = props.className;
|
|
var classes = classnames_default()('divider', className);
|
|
var rest = lib_getUnhandledProps(DropdownDivider, props);
|
|
var ElementType = lib_getElementType(DropdownDivider, props);
|
|
return react_default.a.createElement(ElementType, extends_default()({}, rest, {
|
|
className: classes
|
|
}));
|
|
}
|
|
|
|
DropdownDivider.handledProps = ["as", "className"];
|
|
DropdownDivider.propTypes = false ? undefined : {};
|
|
/* harmony default export */ var Dropdown_DropdownDivider = (DropdownDivider);
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/elements/Flag/Flag.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var names = ['ad', 'andorra', 'ae', 'united arab emirates', 'uae', 'af', 'afghanistan', 'ag', 'antigua', 'ai', 'anguilla', 'al', 'albania', 'am', 'armenia', 'an', 'netherlands antilles', 'ao', 'angola', 'ar', 'argentina', 'as', 'american samoa', 'at', 'austria', 'au', 'australia', 'aw', 'aruba', 'ax', 'aland islands', 'az', 'azerbaijan', 'ba', 'bosnia', 'bb', 'barbados', 'bd', 'bangladesh', 'be', 'belgium', 'bf', 'burkina faso', 'bg', 'bulgaria', 'bh', 'bahrain', 'bi', 'burundi', 'bj', 'benin', 'bm', 'bermuda', 'bn', 'brunei', 'bo', 'bolivia', 'br', 'brazil', 'bs', 'bahamas', 'bt', 'bhutan', 'bv', 'bouvet island', 'bw', 'botswana', 'by', 'belarus', 'bz', 'belize', 'ca', 'canada', 'cc', 'cocos islands', 'cd', 'congo', 'cf', 'central african republic', 'cg', 'congo brazzaville', 'ch', 'switzerland', 'ci', 'cote divoire', 'ck', 'cook islands', 'cl', 'chile', 'cm', 'cameroon', 'cn', 'china', 'co', 'colombia', 'cr', 'costa rica', 'cs', 'cu', 'cuba', 'cv', 'cape verde', 'cx', 'christmas island', 'cy', 'cyprus', 'cz', 'czech republic', 'de', 'germany', 'dj', 'djibouti', 'dk', 'denmark', 'dm', 'dominica', 'do', 'dominican republic', 'dz', 'algeria', 'ec', 'ecuador', 'ee', 'estonia', 'eg', 'egypt', 'eh', 'western sahara', 'er', 'eritrea', 'es', 'spain', 'et', 'ethiopia', 'eu', 'european union', 'fi', 'finland', 'fj', 'fiji', 'fk', 'falkland islands', 'fm', 'micronesia', 'fo', 'faroe islands', 'fr', 'france', 'ga', 'gabon', 'gb', 'uk', 'united kingdom', 'gd', 'grenada', 'ge', 'georgia', 'gf', 'french guiana', 'gh', 'ghana', 'gi', 'gibraltar', 'gl', 'greenland', 'gm', 'gambia', 'gn', 'guinea', 'gp', 'guadeloupe', 'gq', 'equatorial guinea', 'gr', 'greece', 'gs', 'sandwich islands', 'gt', 'guatemala', 'gu', 'guam', 'gw', 'guinea-bissau', 'gy', 'guyana', 'hk', 'hong kong', 'hm', 'heard island', 'hn', 'honduras', 'hr', 'croatia', 'ht', 'haiti', 'hu', 'hungary', 'id', 'indonesia', 'ie', 'ireland', 'il', 'israel', 'in', 'india', 'io', 'indian ocean territory', 'iq', 'iraq', 'ir', 'iran', 'is', 'iceland', 'it', 'italy', 'jm', 'jamaica', 'jo', 'jordan', 'jp', 'japan', 'ke', 'kenya', 'kg', 'kyrgyzstan', 'kh', 'cambodia', 'ki', 'kiribati', 'km', 'comoros', 'kn', 'saint kitts and nevis', 'kp', 'north korea', 'kr', 'south korea', 'kw', 'kuwait', 'ky', 'cayman islands', 'kz', 'kazakhstan', 'la', 'laos', 'lb', 'lebanon', 'lc', 'saint lucia', 'li', 'liechtenstein', 'lk', 'sri lanka', 'lr', 'liberia', 'ls', 'lesotho', 'lt', 'lithuania', 'lu', 'luxembourg', 'lv', 'latvia', 'ly', 'libya', 'ma', 'morocco', 'mc', 'monaco', 'md', 'moldova', 'me', 'montenegro', 'mg', 'madagascar', 'mh', 'marshall islands', 'mk', 'macedonia', 'ml', 'mali', 'mm', 'myanmar', 'burma', 'mn', 'mongolia', 'mo', 'macau', 'mp', 'northern mariana islands', 'mq', 'martinique', 'mr', 'mauritania', 'ms', 'montserrat', 'mt', 'malta', 'mu', 'mauritius', 'mv', 'maldives', 'mw', 'malawi', 'mx', 'mexico', 'my', 'malaysia', 'mz', 'mozambique', 'na', 'namibia', 'nc', 'new caledonia', 'ne', 'niger', 'nf', 'norfolk island', 'ng', 'nigeria', 'ni', 'nicaragua', 'nl', 'netherlands', 'no', 'norway', 'np', 'nepal', 'nr', 'nauru', 'nu', 'niue', 'nz', 'new zealand', 'om', 'oman', 'pa', 'panama', 'pe', 'peru', 'pf', 'french polynesia', 'pg', 'new guinea', 'ph', 'philippines', 'pk', 'pakistan', 'pl', 'poland', 'pm', 'saint pierre', 'pn', 'pitcairn islands', 'pr', 'puerto rico', 'ps', 'palestine', 'pt', 'portugal', 'pw', 'palau', 'py', 'paraguay', 'qa', 'qatar', 're', 'reunion', 'ro', 'romania', 'rs', 'serbia', 'ru', 'russia', 'rw', 'rwanda', 'sa', 'saudi arabia', 'sb', 'solomon islands', 'sc', 'seychelles', 'gb sct', 'scotland', 'sd', 'sudan', 'se', 'sweden', 'sg', 'singapore', 'sh', 'saint helena', 'si', 'slovenia', 'sj', 'svalbard', 'jan mayen', 'sk', 'slovakia', 'sl', 'sierra leone', 'sm', 'san marino', 'sn', 'senegal', 'so', 'somalia', 'sr', 'suriname', 'st', 'sao tome', 'sv', 'el salvador', 'sy', 'syria', 'sz', 'swaziland', 'tc', 'caicos islands', 'td', 'chad', 'tf', 'french territories', 'tg', 'togo', 'th', 'thailand', 'tj', 'tajikistan', 'tk', 'tokelau', 'tl', 'timorleste', 'tm', 'turkmenistan', 'tn', 'tunisia', 'to', 'tonga', 'tr', 'turkey', 'tt', 'trinidad', 'tv', 'tuvalu', 'tw', 'taiwan', 'tz', 'tanzania', 'ua', 'ukraine', 'ug', 'uganda', 'um', 'us minor islands', 'us', 'america', 'united states', 'uy', 'uruguay', 'uz', 'uzbekistan', 'va', 'vatican city', 'vc', 'saint vincent', 've', 'venezuela', 'vg', 'british virgin islands', 'vi', 'us virgin islands', 'vn', 'vietnam', 'vu', 'vanuatu', 'gb wls', 'wales', 'wf', 'wallis and futuna', 'ws', 'samoa', 'ye', 'yemen', 'yt', 'mayotte', 'za', 'south africa', 'zm', 'zambia', 'zw', 'zimbabwe'];
|
|
/**
|
|
* A flag is is used to represent a political state.
|
|
*/
|
|
|
|
var Flag_Flag =
|
|
/*#__PURE__*/
|
|
function (_PureComponent) {
|
|
inherits_default()(Flag, _PureComponent);
|
|
|
|
function Flag() {
|
|
classCallCheck_default()(this, Flag);
|
|
|
|
return possibleConstructorReturn_default()(this, getPrototypeOf_default()(Flag).apply(this, arguments));
|
|
}
|
|
|
|
createClass_default()(Flag, [{
|
|
key: "render",
|
|
value: function render() {
|
|
var _this$props = this.props,
|
|
className = _this$props.className,
|
|
name = _this$props.name;
|
|
var classes = classnames_default()(name, 'flag', className);
|
|
var rest = lib_getUnhandledProps(Flag, this.props);
|
|
var ElementType = lib_getElementType(Flag, this.props);
|
|
return react_default.a.createElement(ElementType, extends_default()({}, rest, {
|
|
className: classes
|
|
}));
|
|
}
|
|
}]);
|
|
|
|
return Flag;
|
|
}(react["PureComponent"]);
|
|
|
|
defineProperty_default()(Flag_Flag, "defaultProps", {
|
|
as: 'i'
|
|
});
|
|
|
|
defineProperty_default()(Flag_Flag, "handledProps", ["as", "className", "name"]);
|
|
|
|
Flag_Flag.propTypes = false ? undefined : {};
|
|
Flag_Flag.create = createShorthandFactory(Flag_Flag, function (value) {
|
|
return {
|
|
name: value
|
|
};
|
|
});
|
|
/* harmony default export */ var elements_Flag_Flag = (Flag_Flag);
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/modules/Dropdown/DropdownItem.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* An item sub-component for Dropdown component.
|
|
*/
|
|
|
|
var DropdownItem_DropdownItem =
|
|
/*#__PURE__*/
|
|
function (_Component) {
|
|
inherits_default()(DropdownItem, _Component);
|
|
|
|
function DropdownItem() {
|
|
var _getPrototypeOf2;
|
|
|
|
var _this;
|
|
|
|
classCallCheck_default()(this, DropdownItem);
|
|
|
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
args[_key] = arguments[_key];
|
|
}
|
|
|
|
_this = possibleConstructorReturn_default()(this, (_getPrototypeOf2 = getPrototypeOf_default()(DropdownItem)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "handleClick", function (e) {
|
|
invoke_default()(_this.props, 'onClick', e, _this.props);
|
|
});
|
|
|
|
return _this;
|
|
}
|
|
|
|
createClass_default()(DropdownItem, [{
|
|
key: "render",
|
|
value: function render() {
|
|
var _this$props = this.props,
|
|
active = _this$props.active,
|
|
children = _this$props.children,
|
|
className = _this$props.className,
|
|
content = _this$props.content,
|
|
disabled = _this$props.disabled,
|
|
description = _this$props.description,
|
|
flag = _this$props.flag,
|
|
icon = _this$props.icon,
|
|
image = _this$props.image,
|
|
label = _this$props.label,
|
|
selected = _this$props.selected,
|
|
text = _this$props.text;
|
|
var classes = classnames_default()(useKeyOnly(active, 'active'), useKeyOnly(disabled, 'disabled'), useKeyOnly(selected, 'selected'), 'item', className); // add default dropdown icon if item contains another menu
|
|
|
|
var iconName = isNil_default()(icon) ? childrenUtils_namespaceObject.someByType(children, 'DropdownMenu') && 'dropdown' : icon;
|
|
var rest = lib_getUnhandledProps(DropdownItem, this.props);
|
|
var ElementType = lib_getElementType(DropdownItem, this.props);
|
|
var ariaOptions = {
|
|
role: 'option',
|
|
'aria-disabled': disabled,
|
|
'aria-checked': active,
|
|
'aria-selected': selected
|
|
};
|
|
|
|
if (!childrenUtils_namespaceObject.isNil(children)) {
|
|
return react_default.a.createElement(ElementType, extends_default()({}, rest, ariaOptions, {
|
|
className: classes,
|
|
onClick: this.handleClick
|
|
}), children);
|
|
}
|
|
|
|
var flagElement = elements_Flag_Flag.create(flag, {
|
|
autoGenerateKey: false
|
|
});
|
|
var iconElement = elements_Icon_Icon.create(iconName, {
|
|
autoGenerateKey: false
|
|
});
|
|
var imageElement = Image_Image.create(image, {
|
|
autoGenerateKey: false
|
|
});
|
|
var labelElement = Label_Label.create(label, {
|
|
autoGenerateKey: false
|
|
});
|
|
var descriptionElement = createShorthand('span', function (val) {
|
|
return {
|
|
children: val
|
|
};
|
|
}, description, {
|
|
defaultProps: {
|
|
className: 'description'
|
|
},
|
|
autoGenerateKey: false
|
|
});
|
|
var textElement = createShorthand('span', function (val) {
|
|
return {
|
|
children: val
|
|
};
|
|
}, childrenUtils_namespaceObject.isNil(content) ? text : content, {
|
|
defaultProps: {
|
|
className: 'text'
|
|
},
|
|
autoGenerateKey: false
|
|
});
|
|
return react_default.a.createElement(ElementType, extends_default()({}, rest, ariaOptions, {
|
|
className: classes,
|
|
onClick: this.handleClick
|
|
}), imageElement, iconElement, flagElement, labelElement, descriptionElement, textElement);
|
|
}
|
|
}]);
|
|
|
|
return DropdownItem;
|
|
}(react["Component"]);
|
|
|
|
defineProperty_default()(DropdownItem_DropdownItem, "handledProps", ["active", "as", "children", "className", "content", "description", "disabled", "flag", "icon", "image", "label", "onClick", "selected", "text", "value"]);
|
|
|
|
DropdownItem_DropdownItem.propTypes = false ? undefined : {};
|
|
DropdownItem_DropdownItem.create = createShorthandFactory(DropdownItem_DropdownItem, function (opts) {
|
|
return opts;
|
|
});
|
|
/* harmony default export */ var Dropdown_DropdownItem = (DropdownItem_DropdownItem);
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/modules/Dropdown/DropdownHeader.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* A dropdown menu can contain a header.
|
|
*/
|
|
|
|
function DropdownHeader(props) {
|
|
var children = props.children,
|
|
className = props.className,
|
|
content = props.content,
|
|
icon = props.icon;
|
|
var classes = classnames_default()('header', className);
|
|
var rest = lib_getUnhandledProps(DropdownHeader, props);
|
|
var ElementType = lib_getElementType(DropdownHeader, props);
|
|
|
|
if (!childrenUtils_namespaceObject.isNil(children)) {
|
|
return react_default.a.createElement(ElementType, extends_default()({}, rest, {
|
|
className: classes
|
|
}), children);
|
|
}
|
|
|
|
return react_default.a.createElement(ElementType, extends_default()({}, rest, {
|
|
className: classes
|
|
}), elements_Icon_Icon.create(icon, {
|
|
autoGenerateKey: false
|
|
}), content);
|
|
}
|
|
|
|
DropdownHeader.handledProps = ["as", "children", "className", "content", "icon"];
|
|
DropdownHeader.propTypes = false ? undefined : {};
|
|
DropdownHeader.create = createShorthandFactory(DropdownHeader, function (content) {
|
|
return {
|
|
content: content
|
|
};
|
|
});
|
|
/* harmony default export */ var Dropdown_DropdownHeader = (DropdownHeader);
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/modules/Dropdown/DropdownMenu.js
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* A dropdown menu can contain a menu.
|
|
*/
|
|
|
|
function DropdownMenu(props) {
|
|
var children = props.children,
|
|
className = props.className,
|
|
content = props.content,
|
|
direction = props.direction,
|
|
open = props.open,
|
|
scrolling = props.scrolling;
|
|
var classes = classnames_default()(direction, useKeyOnly(open, 'visible'), useKeyOnly(scrolling, 'scrolling'), 'menu transition', className);
|
|
var rest = lib_getUnhandledProps(DropdownMenu, props);
|
|
var ElementType = lib_getElementType(DropdownMenu, props);
|
|
return react_default.a.createElement(ElementType, extends_default()({}, rest, {
|
|
className: classes
|
|
}), childrenUtils_namespaceObject.isNil(children) ? content : children);
|
|
}
|
|
|
|
DropdownMenu.handledProps = ["as", "children", "className", "content", "direction", "open", "scrolling"];
|
|
DropdownMenu.propTypes = false ? undefined : {};
|
|
/* harmony default export */ var Dropdown_DropdownMenu = (DropdownMenu);
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/modules/Dropdown/DropdownSearchInput.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* A search item sub-component for Dropdown component.
|
|
*/
|
|
|
|
var DropdownSearchInput_DropdownSearchInput =
|
|
/*#__PURE__*/
|
|
function (_Component) {
|
|
inherits_default()(DropdownSearchInput, _Component);
|
|
|
|
function DropdownSearchInput() {
|
|
var _getPrototypeOf2;
|
|
|
|
var _this;
|
|
|
|
classCallCheck_default()(this, DropdownSearchInput);
|
|
|
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
args[_key] = arguments[_key];
|
|
}
|
|
|
|
_this = possibleConstructorReturn_default()(this, (_getPrototypeOf2 = getPrototypeOf_default()(DropdownSearchInput)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "handleChange", function (e) {
|
|
var value = get_default()(e, 'target.value');
|
|
|
|
invoke_default()(_this.props, 'onChange', e, objectSpread_default()({}, _this.props, {
|
|
value: value
|
|
}));
|
|
});
|
|
|
|
return _this;
|
|
}
|
|
|
|
createClass_default()(DropdownSearchInput, [{
|
|
key: "render",
|
|
value: function render() {
|
|
var _this$props = this.props,
|
|
autoComplete = _this$props.autoComplete,
|
|
className = _this$props.className,
|
|
tabIndex = _this$props.tabIndex,
|
|
type = _this$props.type,
|
|
value = _this$props.value;
|
|
var classes = classnames_default()('search', className);
|
|
var rest = lib_getUnhandledProps(DropdownSearchInput, this.props);
|
|
return react_default.a.createElement("input", extends_default()({}, rest, {
|
|
"aria-autocomplete": "list",
|
|
autoComplete: autoComplete,
|
|
className: classes,
|
|
onChange: this.handleChange,
|
|
tabIndex: tabIndex,
|
|
type: type,
|
|
value: value
|
|
}));
|
|
}
|
|
}]);
|
|
|
|
return DropdownSearchInput;
|
|
}(react["Component"]);
|
|
|
|
defineProperty_default()(DropdownSearchInput_DropdownSearchInput, "defaultProps", {
|
|
autoComplete: 'off',
|
|
type: 'text'
|
|
});
|
|
|
|
defineProperty_default()(DropdownSearchInput_DropdownSearchInput, "handledProps", ["as", "autoComplete", "className", "tabIndex", "type", "value"]);
|
|
|
|
DropdownSearchInput_DropdownSearchInput.propTypes = false ? undefined : {};
|
|
DropdownSearchInput_DropdownSearchInput.create = createShorthandFactory(DropdownSearchInput_DropdownSearchInput, function (type) {
|
|
return {
|
|
type: type
|
|
};
|
|
});
|
|
/* harmony default export */ var Dropdown_DropdownSearchInput = (DropdownSearchInput_DropdownSearchInput);
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/modules/Dropdown/Dropdown.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Dropdown_getKeyOrValue = function getKeyOrValue(key, value) {
|
|
return isNil_default()(key) ? value : key;
|
|
};
|
|
/**
|
|
* A dropdown allows a user to select a value from a series of options.
|
|
* @see Form
|
|
* @see Select
|
|
* @see Menu
|
|
*/
|
|
|
|
|
|
var Dropdown_Dropdown =
|
|
/*#__PURE__*/
|
|
function (_Component) {
|
|
inherits_default()(Dropdown, _Component);
|
|
|
|
function Dropdown() {
|
|
var _getPrototypeOf2;
|
|
|
|
var _this;
|
|
|
|
classCallCheck_default()(this, Dropdown);
|
|
|
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
args[_key] = arguments[_key];
|
|
}
|
|
|
|
_this = possibleConstructorReturn_default()(this, (_getPrototypeOf2 = getPrototypeOf_default()(Dropdown)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "searchRef", Object(react["createRef"])());
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "sizerRef", Object(react["createRef"])());
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "ref", Object(react["createRef"])());
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "handleChange", function (e, value) {
|
|
invoke_default()(_this.props, 'onChange', e, objectSpread_default()({}, _this.props, {
|
|
value: value
|
|
}));
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "closeOnChange", function (e) {
|
|
var _this$props = _this.props,
|
|
closeOnChange = _this$props.closeOnChange,
|
|
multiple = _this$props.multiple;
|
|
var shouldClose = isUndefined_default()(closeOnChange) ? !multiple : closeOnChange;
|
|
if (shouldClose) _this.close(e, noop_default.a);
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "closeOnEscape", function (e) {
|
|
if (!_this.props.closeOnEscape) return;
|
|
if (keyboardKey_default.a.getCode(e) !== keyboardKey_default.a.Escape) return;
|
|
e.preventDefault();
|
|
|
|
_this.close(e);
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "moveSelectionOnKeyDown", function (e) {
|
|
var _moves;
|
|
|
|
var _this$props2 = _this.props,
|
|
multiple = _this$props2.multiple,
|
|
selectOnNavigation = _this$props2.selectOnNavigation;
|
|
var moves = (_moves = {}, defineProperty_default()(_moves, keyboardKey_default.a.ArrowDown, 1), defineProperty_default()(_moves, keyboardKey_default.a.ArrowUp, -1), _moves);
|
|
var move = moves[keyboardKey_default.a.getCode(e)];
|
|
if (move === undefined) return;
|
|
e.preventDefault();
|
|
|
|
_this.moveSelectionBy(move);
|
|
|
|
if (!multiple && selectOnNavigation) _this.makeSelectedItemActive(e);
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "openOnSpace", function (e) {
|
|
if (keyboardKey_default.a.getCode(e) !== keyboardKey_default.a.Spacebar) return;
|
|
e.preventDefault();
|
|
|
|
_this.open(e);
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "openOnArrow", function (e) {
|
|
var code = keyboardKey_default.a.getCode(e);
|
|
if (!includes_default()([keyboardKey_default.a.ArrowDown, keyboardKey_default.a.ArrowUp], code)) return;
|
|
if (_this.state.open) return;
|
|
e.preventDefault();
|
|
|
|
_this.open(e);
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "makeSelectedItemActive", function (e) {
|
|
var _this$state = _this.state,
|
|
open = _this$state.open,
|
|
value = _this$state.value;
|
|
var multiple = _this.props.multiple;
|
|
|
|
var item = _this.getSelectedItem();
|
|
|
|
var selectedValue = get_default()(item, 'value'); // prevent selecting null if there was no selected item value
|
|
// prevent selecting duplicate items when the dropdown is closed
|
|
|
|
|
|
if (isNil_default()(selectedValue) || !open) return; // state value may be undefined
|
|
|
|
var newValue = multiple ? union_default()(_this.state.value, [selectedValue]) : selectedValue;
|
|
var valueHasChanged = multiple ? !!difference_default()(newValue, value).length : newValue !== value;
|
|
|
|
if (valueHasChanged) {
|
|
// notify the onChange prop that the user is trying to change value
|
|
_this.setValue(newValue);
|
|
|
|
_this.setSelectedIndex(newValue);
|
|
|
|
_this.handleChange(e, newValue); // Heads up! This event handler should be called after `onChange`
|
|
// Notify the onAddItem prop if this is a new value
|
|
|
|
|
|
if (item['data-additional']) {
|
|
invoke_default()(_this.props, 'onAddItem', e, objectSpread_default()({}, _this.props, {
|
|
value: selectedValue
|
|
}));
|
|
}
|
|
}
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "selectItemOnEnter", function (e) {
|
|
var search = _this.props.search;
|
|
var shouldSelect = keyboardKey_default.a.getCode(e) === keyboardKey_default.a.Enter || // https://github.com/Semantic-Org/Semantic-UI-React/pull/3766
|
|
!search && keyboardKey_default.a.getCode(e) === keyboardKey_default.a.Spacebar;
|
|
if (!shouldSelect) return;
|
|
e.preventDefault();
|
|
|
|
var optionSize = size_default()(_this.getMenuOptions());
|
|
|
|
if (search && optionSize === 0) return;
|
|
|
|
_this.makeSelectedItemActive(e);
|
|
|
|
_this.closeOnChange(e);
|
|
|
|
_this.clearSearchQuery();
|
|
|
|
if (search) invoke_default()(_this.searchRef.current, 'focus');
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "removeItemOnBackspace", function (e) {
|
|
var _this$props3 = _this.props,
|
|
multiple = _this$props3.multiple,
|
|
search = _this$props3.search;
|
|
var _this$state2 = _this.state,
|
|
searchQuery = _this$state2.searchQuery,
|
|
value = _this$state2.value;
|
|
if (keyboardKey_default.a.getCode(e) !== keyboardKey_default.a.Backspace) return;
|
|
if (searchQuery || !search || !multiple || isEmpty_default()(value)) return;
|
|
e.preventDefault(); // remove most recent value
|
|
|
|
var newValue = dropRight_default()(value);
|
|
|
|
_this.setValue(newValue);
|
|
|
|
_this.setSelectedIndex(newValue);
|
|
|
|
_this.handleChange(e, newValue);
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "closeOnDocumentClick", function (e) {
|
|
if (!_this.props.closeOnBlur) return; // If event happened in the dropdown, ignore it
|
|
|
|
if (_this.ref.current && lib_doesNodeContainClick(_this.ref.current, e)) return;
|
|
|
|
_this.close();
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "handleMouseDown", function (e) {
|
|
_this.isMouseDown = true;
|
|
|
|
invoke_default()(_this.props, 'onMouseDown', e, _this.props);
|
|
|
|
document.addEventListener('mouseup', _this.handleDocumentMouseUp);
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "handleDocumentMouseUp", function () {
|
|
_this.isMouseDown = false;
|
|
document.removeEventListener('mouseup', _this.handleDocumentMouseUp);
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "handleClick", function (e) {
|
|
var _this$props4 = _this.props,
|
|
minCharacters = _this$props4.minCharacters,
|
|
search = _this$props4.search;
|
|
var _this$state3 = _this.state,
|
|
open = _this$state3.open,
|
|
searchQuery = _this$state3.searchQuery;
|
|
|
|
invoke_default()(_this.props, 'onClick', e, _this.props); // prevent closeOnDocumentClick()
|
|
|
|
|
|
e.stopPropagation();
|
|
if (!search) return _this.toggle(e);
|
|
|
|
if (open) {
|
|
invoke_default()(_this.searchRef.current, 'focus');
|
|
|
|
return;
|
|
}
|
|
|
|
if (searchQuery.length >= minCharacters || minCharacters === 1) {
|
|
_this.open(e);
|
|
|
|
return;
|
|
}
|
|
|
|
invoke_default()(_this.searchRef.current, 'focus');
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "handleIconClick", function (e) {
|
|
var clearable = _this.props.clearable;
|
|
|
|
var hasValue = _this.hasValue();
|
|
|
|
invoke_default()(_this.props, 'onClick', e, _this.props); // prevent handleClick()
|
|
|
|
|
|
e.stopPropagation();
|
|
|
|
if (clearable && hasValue) {
|
|
_this.clearValue(e);
|
|
} else {
|
|
_this.toggle(e);
|
|
}
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "handleItemClick", function (e, item) {
|
|
var _this$props5 = _this.props,
|
|
multiple = _this$props5.multiple,
|
|
search = _this$props5.search;
|
|
var currentValue = _this.state.value;
|
|
var value = item.value; // prevent toggle() in handleClick()
|
|
|
|
e.stopPropagation(); // prevent closeOnDocumentClick() if multiple or item is disabled
|
|
|
|
if (multiple || item.disabled) e.nativeEvent.stopImmediatePropagation();
|
|
if (item.disabled) return;
|
|
var isAdditionItem = item['data-additional'];
|
|
var newValue = multiple ? union_default()(_this.state.value, [value]) : value;
|
|
var valueHasChanged = multiple ? !!difference_default()(newValue, currentValue).length : newValue !== currentValue; // notify the onChange prop that the user is trying to change value
|
|
|
|
if (valueHasChanged) {
|
|
_this.setValue(newValue);
|
|
|
|
_this.setSelectedIndex(value);
|
|
|
|
_this.handleChange(e, newValue);
|
|
}
|
|
|
|
_this.clearSearchQuery(value);
|
|
|
|
if (search) {
|
|
invoke_default()(_this.searchRef.current, 'focus');
|
|
} else {
|
|
invoke_default()(_this.ref.current, 'focus');
|
|
}
|
|
|
|
_this.closeOnChange(e); // Heads up! This event handler should be called after `onChange`
|
|
// Notify the onAddItem prop if this is a new value
|
|
|
|
|
|
if (isAdditionItem) invoke_default()(_this.props, 'onAddItem', e, objectSpread_default()({}, _this.props, {
|
|
value: value
|
|
}));
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "handleFocus", function (e) {
|
|
var focus = _this.state.focus;
|
|
if (focus) return;
|
|
|
|
invoke_default()(_this.props, 'onFocus', e, _this.props);
|
|
|
|
_this.setState({
|
|
focus: true
|
|
});
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "handleBlur", function (e) {
|
|
// Heads up! Don't remove this.
|
|
// https://github.com/Semantic-Org/Semantic-UI-React/issues/1315
|
|
var currentTarget = get_default()(e, 'currentTarget');
|
|
|
|
if (currentTarget && currentTarget.contains(document.activeElement)) return;
|
|
var _this$props6 = _this.props,
|
|
closeOnBlur = _this$props6.closeOnBlur,
|
|
multiple = _this$props6.multiple,
|
|
selectOnBlur = _this$props6.selectOnBlur; // do not "blur" when the mouse is down inside of the Dropdown
|
|
|
|
if (_this.isMouseDown) return;
|
|
|
|
invoke_default()(_this.props, 'onBlur', e, _this.props);
|
|
|
|
if (selectOnBlur && !multiple) {
|
|
_this.makeSelectedItemActive(e);
|
|
|
|
if (closeOnBlur) _this.close();
|
|
}
|
|
|
|
_this.setState({
|
|
focus: false
|
|
});
|
|
|
|
_this.clearSearchQuery();
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "handleSearchChange", function (e, _ref) {
|
|
var value = _ref.value;
|
|
// prevent propagating to this.props.onChange()
|
|
e.stopPropagation();
|
|
var minCharacters = _this.props.minCharacters;
|
|
var open = _this.state.open;
|
|
var newQuery = value;
|
|
|
|
invoke_default()(_this.props, 'onSearchChange', e, objectSpread_default()({}, _this.props, {
|
|
searchQuery: newQuery
|
|
}));
|
|
|
|
_this.trySetState({
|
|
searchQuery: newQuery,
|
|
selectedIndex: 0
|
|
}); // open search dropdown on search query
|
|
|
|
|
|
if (!open && newQuery.length >= minCharacters) {
|
|
_this.open();
|
|
|
|
return;
|
|
} // close search dropdown if search query is too small
|
|
|
|
|
|
if (open && minCharacters !== 1 && newQuery.length < minCharacters) _this.close();
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "getKeyAndValues", function (options) {
|
|
return options ? options.map(function (option) {
|
|
return pick_default()(option, ['key', 'value']);
|
|
}) : options;
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "getMenuOptions", function () {
|
|
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _this.state.value;
|
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _this.props.options;
|
|
var searchQuery = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _this.state.searchQuery;
|
|
var _this$props7 = _this.props,
|
|
additionLabel = _this$props7.additionLabel,
|
|
additionPosition = _this$props7.additionPosition,
|
|
allowAdditions = _this$props7.allowAdditions,
|
|
deburr = _this$props7.deburr,
|
|
multiple = _this$props7.multiple,
|
|
search = _this$props7.search;
|
|
var filteredOptions = options; // filter out active options
|
|
|
|
if (multiple) {
|
|
filteredOptions = filter_default()(filteredOptions, function (opt) {
|
|
return !includes_default()(value, opt.value);
|
|
});
|
|
} // filter by search query
|
|
|
|
|
|
if (search && searchQuery) {
|
|
if (isFunction_default()(search)) {
|
|
filteredOptions = search(filteredOptions, searchQuery);
|
|
} else {
|
|
// remove diacritics on search input and options, if deburr prop is set
|
|
var strippedQuery = deburr ? deburr_default()(searchQuery) : searchQuery;
|
|
var re = new RegExp(escapeRegExp_default()(strippedQuery), 'i');
|
|
filteredOptions = filter_default()(filteredOptions, function (opt) {
|
|
return re.test(deburr ? deburr_default()(opt.text) : opt.text);
|
|
});
|
|
}
|
|
} // insert the "add" item
|
|
|
|
|
|
if (allowAdditions && search && searchQuery && !some_default()(filteredOptions, {
|
|
text: searchQuery
|
|
})) {
|
|
var additionLabelElement = react_default.a.isValidElement(additionLabel) ? react_default.a.cloneElement(additionLabel, {
|
|
key: 'addition-label'
|
|
}) : additionLabel || '';
|
|
var addItem = {
|
|
key: 'addition',
|
|
// by using an array, we can pass multiple elements, but when doing so
|
|
// we must specify a `key` for React to know which one is which
|
|
text: [additionLabelElement, react_default.a.createElement("b", {
|
|
key: "addition-query"
|
|
}, searchQuery)],
|
|
value: searchQuery,
|
|
className: 'addition',
|
|
'data-additional': true
|
|
};
|
|
if (additionPosition === 'top') filteredOptions.unshift(addItem);else filteredOptions.push(addItem);
|
|
}
|
|
|
|
return filteredOptions;
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "getSelectedItem", function () {
|
|
var selectedIndex = _this.state.selectedIndex;
|
|
|
|
var options = _this.getMenuOptions();
|
|
|
|
return get_default()(options, "[".concat(selectedIndex, "]"));
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "getEnabledIndices", function (givenOptions) {
|
|
var options = givenOptions || _this.getMenuOptions();
|
|
|
|
return reduce_default()(options, function (memo, item, index) {
|
|
if (!item.disabled) memo.push(index);
|
|
return memo;
|
|
}, []);
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "getItemByValue", function (value) {
|
|
var options = _this.props.options;
|
|
return find_default()(options, {
|
|
value: value
|
|
});
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "getMenuItemIndexByValue", function (value, givenOptions) {
|
|
var options = givenOptions || _this.getMenuOptions();
|
|
|
|
return findIndex_default()(options, ['value', value]);
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "getDropdownAriaOptions", function () {
|
|
var _this$props8 = _this.props,
|
|
loading = _this$props8.loading,
|
|
disabled = _this$props8.disabled,
|
|
search = _this$props8.search,
|
|
multiple = _this$props8.multiple;
|
|
var open = _this.state.open;
|
|
var ariaOptions = {
|
|
role: search ? 'combobox' : 'listbox',
|
|
'aria-busy': loading,
|
|
'aria-disabled': disabled,
|
|
'aria-expanded': !!open
|
|
};
|
|
|
|
if (ariaOptions.role === 'listbox') {
|
|
ariaOptions['aria-multiselectable'] = multiple;
|
|
}
|
|
|
|
return ariaOptions;
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "clearSearchQuery", function (value) {
|
|
var searchQuery = _this.state.searchQuery;
|
|
if (searchQuery === undefined || searchQuery === '') return;
|
|
|
|
_this.trySetState({
|
|
searchQuery: ''
|
|
});
|
|
|
|
_this.setSelectedIndex(value, undefined, '');
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "setValue", function (value) {
|
|
_this.trySetState({
|
|
value: value
|
|
});
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "setSelectedIndex", function () {
|
|
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _this.state.value;
|
|
var optionsProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _this.props.options;
|
|
var searchQuery = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : _this.state.searchQuery;
|
|
var multiple = _this.props.multiple;
|
|
var selectedIndex = _this.state.selectedIndex;
|
|
|
|
var options = _this.getMenuOptions(value, optionsProps, searchQuery);
|
|
|
|
var enabledIndicies = _this.getEnabledIndices(options);
|
|
|
|
var newSelectedIndex; // update the selected index
|
|
|
|
if (!selectedIndex || selectedIndex < 0) {
|
|
var firstIndex = enabledIndicies[0]; // Select the currently active item, if none, use the first item.
|
|
// Multiple selects remove active items from the list,
|
|
// their initial selected index should be 0.
|
|
|
|
newSelectedIndex = multiple ? firstIndex : _this.getMenuItemIndexByValue(value, options) || enabledIndicies[0];
|
|
} else if (multiple) {
|
|
// multiple selects remove options from the menu as they are made active
|
|
// keep the selected index within range of the remaining items
|
|
if (selectedIndex >= options.length - 1) {
|
|
newSelectedIndex = enabledIndicies[enabledIndicies.length - 1];
|
|
}
|
|
} else {
|
|
var activeIndex = _this.getMenuItemIndexByValue(value, options); // regular selects can only have one active item
|
|
// set the selected index to the currently active item
|
|
|
|
|
|
newSelectedIndex = includes_default()(enabledIndicies, activeIndex) ? activeIndex : undefined;
|
|
}
|
|
|
|
if (!newSelectedIndex || newSelectedIndex < 0) {
|
|
newSelectedIndex = enabledIndicies[0];
|
|
}
|
|
|
|
_this.setState({
|
|
selectedIndex: newSelectedIndex
|
|
});
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "handleLabelClick", function (e, labelProps) {
|
|
// prevent focusing search input on click
|
|
e.stopPropagation();
|
|
|
|
_this.setState({
|
|
selectedLabel: labelProps.value
|
|
});
|
|
|
|
invoke_default()(_this.props, 'onLabelClick', e, labelProps);
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "handleLabelRemove", function (e, labelProps) {
|
|
// prevent focusing search input on click
|
|
e.stopPropagation();
|
|
var value = _this.state.value;
|
|
|
|
var newValue = without_default()(value, labelProps.value);
|
|
|
|
_this.setValue(newValue);
|
|
|
|
_this.setSelectedIndex(newValue);
|
|
|
|
_this.handleChange(e, newValue);
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "moveSelectionBy", function (offset) {
|
|
var startIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _this.state.selectedIndex;
|
|
|
|
var options = _this.getMenuOptions(); // Prevent infinite loop
|
|
// TODO: remove left part of condition after children API will be removed
|
|
|
|
|
|
if (options === undefined || every_default()(options, 'disabled')) return;
|
|
var lastIndex = options.length - 1;
|
|
var wrapSelection = _this.props.wrapSelection; // next is after last, wrap to beginning
|
|
// next is before first, wrap to end
|
|
|
|
var nextIndex = startIndex + offset; // if 'wrapSelection' is set to false and selection is after last or before first, it just does not change
|
|
|
|
if (!wrapSelection && (nextIndex > lastIndex || nextIndex < 0)) {
|
|
nextIndex = startIndex;
|
|
} else if (nextIndex > lastIndex) nextIndex = 0;else if (nextIndex < 0) nextIndex = lastIndex;
|
|
|
|
if (options[nextIndex].disabled) {
|
|
_this.moveSelectionBy(offset, nextIndex);
|
|
|
|
return;
|
|
}
|
|
|
|
_this.setState({
|
|
selectedIndex: nextIndex
|
|
});
|
|
|
|
_this.scrollSelectedItemIntoView();
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "handleIconOverrides", function (predefinedProps) {
|
|
var clearable = _this.props.clearable;
|
|
var classes = classnames_default()(clearable && _this.hasValue() && 'clear', predefinedProps.className);
|
|
return {
|
|
className: classes,
|
|
onClick: function onClick(e) {
|
|
invoke_default()(predefinedProps, 'onClick', e, predefinedProps);
|
|
|
|
_this.handleIconClick(e);
|
|
}
|
|
};
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "clearValue", function (e) {
|
|
var multiple = _this.props.multiple;
|
|
var newValue = multiple ? [] : '';
|
|
|
|
_this.setValue(newValue);
|
|
|
|
_this.setSelectedIndex(newValue);
|
|
|
|
_this.handleChange(e, newValue);
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "computeSearchInputTabIndex", function () {
|
|
var _this$props9 = _this.props,
|
|
disabled = _this$props9.disabled,
|
|
tabIndex = _this$props9.tabIndex;
|
|
if (!isNil_default()(tabIndex)) return tabIndex;
|
|
return disabled ? -1 : 0;
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "computeSearchInputWidth", function () {
|
|
var searchQuery = _this.state.searchQuery;
|
|
|
|
if (_this.sizerRef.current && searchQuery) {
|
|
// resize the search input, temporarily show the sizer so we can measure it
|
|
_this.sizerRef.current.style.display = 'inline';
|
|
_this.sizerRef.current.textContent = searchQuery;
|
|
var searchWidth = Math.ceil(_this.sizerRef.current.getBoundingClientRect().width);
|
|
|
|
_this.sizerRef.current.style.removeProperty('display');
|
|
|
|
return searchWidth;
|
|
}
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "computeTabIndex", function () {
|
|
var _this$props10 = _this.props,
|
|
disabled = _this$props10.disabled,
|
|
search = _this$props10.search,
|
|
tabIndex = _this$props10.tabIndex; // don't set a root node tabIndex as the search input has its own tabIndex
|
|
|
|
if (search) return undefined;
|
|
if (disabled) return -1;
|
|
return isNil_default()(tabIndex) ? 0 : tabIndex;
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "handleSearchInputOverrides", function (predefinedProps) {
|
|
return {
|
|
onChange: function onChange(e, inputProps) {
|
|
invoke_default()(predefinedProps, 'onChange', e, inputProps);
|
|
|
|
_this.handleSearchChange(e, inputProps);
|
|
}
|
|
};
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "hasValue", function () {
|
|
var multiple = _this.props.multiple;
|
|
var value = _this.state.value;
|
|
return multiple ? !isEmpty_default()(value) : !isNil_default()(value) && value !== '';
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "scrollSelectedItemIntoView", function () {
|
|
if (!_this.ref.current) return;
|
|
|
|
var menu = _this.ref.current.querySelector('.menu.visible');
|
|
|
|
if (!menu) return;
|
|
var item = menu.querySelector('.item.selected');
|
|
if (!item) return;
|
|
var isOutOfUpperView = item.offsetTop < menu.scrollTop;
|
|
var isOutOfLowerView = item.offsetTop + item.clientHeight > menu.scrollTop + menu.clientHeight;
|
|
|
|
if (isOutOfUpperView) {
|
|
menu.scrollTop = item.offsetTop;
|
|
} else if (isOutOfLowerView) {
|
|
// eslint-disable-next-line no-mixed-operators
|
|
menu.scrollTop = item.offsetTop + item.clientHeight - menu.clientHeight;
|
|
}
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "setOpenDirection", function () {
|
|
if (!_this.ref.current) return;
|
|
|
|
var menu = _this.ref.current.querySelector('.menu.visible');
|
|
|
|
if (!menu) return;
|
|
|
|
var dropdownRect = _this.ref.current.getBoundingClientRect();
|
|
|
|
var menuHeight = menu.clientHeight;
|
|
var spaceAtTheBottom = document.documentElement.clientHeight - dropdownRect.top - dropdownRect.height - menuHeight;
|
|
var spaceAtTheTop = dropdownRect.top - menuHeight;
|
|
var upward = spaceAtTheBottom < 0 && spaceAtTheTop > spaceAtTheBottom; // set state only if there's a relevant difference
|
|
|
|
if (!upward !== !_this.state.upward) {
|
|
_this.trySetState({
|
|
upward: upward
|
|
});
|
|
}
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "open", function (e) {
|
|
var _this$props11 = _this.props,
|
|
disabled = _this$props11.disabled,
|
|
open = _this$props11.open,
|
|
search = _this$props11.search;
|
|
if (disabled) return;
|
|
if (search) invoke_default()(_this.searchRef.current, 'focus');
|
|
|
|
invoke_default()(_this.props, 'onOpen', e, _this.props);
|
|
|
|
_this.trySetState({
|
|
open: true
|
|
});
|
|
|
|
_this.scrollSelectedItemIntoView();
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "close", function (e) {
|
|
var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _this.handleClose;
|
|
var open = _this.state.open;
|
|
|
|
if (open) {
|
|
invoke_default()(_this.props, 'onClose', e, _this.props);
|
|
|
|
_this.trySetState({
|
|
open: false
|
|
}, callback);
|
|
}
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "handleClose", function () {
|
|
var hasSearchFocus = document.activeElement === _this.searchRef.current; // https://github.com/Semantic-Org/Semantic-UI-React/issues/627
|
|
// Blur the Dropdown on close so it is blurred after selecting an item.
|
|
// This is to prevent it from re-opening when switching tabs after selecting an item.
|
|
|
|
if (!hasSearchFocus && _this.ref.current) {
|
|
_this.ref.current.blur();
|
|
}
|
|
|
|
var hasDropdownFocus = document.activeElement === _this.ref.current;
|
|
var hasFocus = hasSearchFocus || hasDropdownFocus; // We need to keep the virtual model in sync with the browser focus change
|
|
// https://github.com/Semantic-Org/Semantic-UI-React/issues/692
|
|
|
|
_this.setState({
|
|
focus: hasFocus
|
|
});
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "toggle", function (e) {
|
|
return _this.state.open ? _this.close(e) : _this.open(e);
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "renderText", function () {
|
|
var _this$props12 = _this.props,
|
|
multiple = _this$props12.multiple,
|
|
placeholder = _this$props12.placeholder,
|
|
search = _this$props12.search,
|
|
text = _this$props12.text;
|
|
var _this$state4 = _this.state,
|
|
searchQuery = _this$state4.searchQuery,
|
|
value = _this$state4.value,
|
|
open = _this$state4.open;
|
|
|
|
var hasValue = _this.hasValue();
|
|
|
|
var classes = classnames_default()(placeholder && !hasValue && 'default', 'text', search && searchQuery && 'filtered');
|
|
var _text = placeholder;
|
|
|
|
if (text) {
|
|
_text = text;
|
|
} else if (open && !multiple) {
|
|
_text = get_default()(_this.getSelectedItem(), 'text');
|
|
} else if (hasValue) {
|
|
_text = get_default()(_this.getItemByValue(value), 'text');
|
|
}
|
|
|
|
return react_default.a.createElement("div", {
|
|
className: classes,
|
|
role: "alert",
|
|
"aria-live": "polite",
|
|
"aria-atomic": true
|
|
}, _text);
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "renderSearchInput", function () {
|
|
var _this$props13 = _this.props,
|
|
search = _this$props13.search,
|
|
searchInput = _this$props13.searchInput;
|
|
var searchQuery = _this.state.searchQuery;
|
|
return search && react_default.a.createElement(es_Ref, {
|
|
innerRef: _this.searchRef
|
|
}, Dropdown_DropdownSearchInput.create(searchInput, {
|
|
defaultProps: {
|
|
style: {
|
|
width: _this.computeSearchInputWidth()
|
|
},
|
|
tabIndex: _this.computeSearchInputTabIndex(),
|
|
value: searchQuery
|
|
},
|
|
overrideProps: _this.handleSearchInputOverrides
|
|
}));
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "renderSearchSizer", function () {
|
|
var _this$props14 = _this.props,
|
|
search = _this$props14.search,
|
|
multiple = _this$props14.multiple;
|
|
return search && multiple && react_default.a.createElement("span", {
|
|
className: "sizer",
|
|
ref: _this.sizerRef
|
|
});
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "renderLabels", function () {
|
|
var _this$props15 = _this.props,
|
|
multiple = _this$props15.multiple,
|
|
renderLabel = _this$props15.renderLabel;
|
|
var _this$state5 = _this.state,
|
|
selectedLabel = _this$state5.selectedLabel,
|
|
value = _this$state5.value;
|
|
|
|
if (!multiple || isEmpty_default()(value)) {
|
|
return;
|
|
}
|
|
|
|
var selectedItems = map_default()(value, _this.getItemByValue);
|
|
|
|
// if no item could be found for a given state value the selected item will be undefined
|
|
// compact the selectedItems so we only have actual objects left
|
|
return map_default()(compact_default()(selectedItems), function (item, index) {
|
|
var defaultProps = {
|
|
active: item.value === selectedLabel,
|
|
as: 'a',
|
|
key: Dropdown_getKeyOrValue(item.key, item.value),
|
|
onClick: _this.handleLabelClick,
|
|
onRemove: _this.handleLabelRemove,
|
|
value: item.value
|
|
};
|
|
return Label_Label.create(renderLabel(item, index, defaultProps), {
|
|
defaultProps: defaultProps
|
|
});
|
|
});
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "renderOptions", function () {
|
|
var _this$props16 = _this.props,
|
|
lazyLoad = _this$props16.lazyLoad,
|
|
multiple = _this$props16.multiple,
|
|
search = _this$props16.search,
|
|
noResultsMessage = _this$props16.noResultsMessage;
|
|
var _this$state6 = _this.state,
|
|
open = _this$state6.open,
|
|
selectedIndex = _this$state6.selectedIndex,
|
|
value = _this$state6.value; // lazy load, only render options when open
|
|
|
|
if (lazyLoad && !open) return null;
|
|
|
|
var options = _this.getMenuOptions();
|
|
|
|
if (noResultsMessage !== null && search && isEmpty_default()(options)) {
|
|
return react_default.a.createElement("div", {
|
|
className: "message"
|
|
}, noResultsMessage);
|
|
}
|
|
|
|
var isActive = multiple ? function (optValue) {
|
|
return includes_default()(value, optValue);
|
|
} : function (optValue) {
|
|
return optValue === value;
|
|
};
|
|
return map_default()(options, function (opt, i) {
|
|
return Dropdown_DropdownItem.create(objectSpread_default()({
|
|
active: isActive(opt.value),
|
|
onClick: _this.handleItemClick,
|
|
selected: selectedIndex === i
|
|
}, opt, {
|
|
key: Dropdown_getKeyOrValue(opt.key, opt.value),
|
|
// Needed for handling click events on disabled items
|
|
style: objectSpread_default()({}, opt.style, {
|
|
pointerEvents: 'all'
|
|
})
|
|
}));
|
|
});
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "renderMenu", function () {
|
|
var _this$props17 = _this.props,
|
|
children = _this$props17.children,
|
|
direction = _this$props17.direction,
|
|
header = _this$props17.header;
|
|
var open = _this.state.open;
|
|
|
|
var ariaOptions = _this.getDropdownMenuAriaOptions(); // single menu child
|
|
|
|
|
|
if (!childrenUtils_namespaceObject.isNil(children)) {
|
|
var menuChild = react["Children"].only(children);
|
|
var className = classnames_default()(direction, useKeyOnly(open, 'visible'), menuChild.props.className);
|
|
return Object(react["cloneElement"])(menuChild, objectSpread_default()({
|
|
className: className
|
|
}, ariaOptions));
|
|
}
|
|
|
|
return react_default.a.createElement(Dropdown_DropdownMenu, extends_default()({}, ariaOptions, {
|
|
direction: direction,
|
|
open: open
|
|
}), Dropdown_DropdownHeader.create(header, {
|
|
autoGenerateKey: false
|
|
}), _this.renderOptions());
|
|
});
|
|
|
|
return _this;
|
|
}
|
|
|
|
createClass_default()(Dropdown, [{
|
|
key: "getInitialAutoControlledState",
|
|
value: function getInitialAutoControlledState() {
|
|
return {
|
|
focus: false,
|
|
searchQuery: ''
|
|
};
|
|
} // eslint-disable-next-line camelcase
|
|
|
|
}, {
|
|
key: "UNSAFE_componentWillMount",
|
|
value: function UNSAFE_componentWillMount() {
|
|
var _this$state7 = this.state,
|
|
open = _this$state7.open,
|
|
value = _this$state7.value;
|
|
this.setValue(value);
|
|
this.setSelectedIndex(value);
|
|
|
|
if (open) {
|
|
this.open();
|
|
}
|
|
} // eslint-disable-next-line camelcase
|
|
|
|
}, {
|
|
key: "UNSAFE_componentWillReceiveProps",
|
|
value: function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
helpers_get_default()(getPrototypeOf_default()(Dropdown.prototype), "UNSAFE_componentWillReceiveProps", this).call(this, nextProps);
|
|
|
|
/* eslint-disable no-console */
|
|
if (false) { var hasValue, isNextValueArray; }
|
|
/* eslint-enable no-console */
|
|
|
|
|
|
if (!shallowequal_default()(nextProps.value, this.props.value)) {
|
|
this.setValue(nextProps.value);
|
|
this.setSelectedIndex(nextProps.value);
|
|
} // The selected index is only dependent on option keys/values.
|
|
// We only check those properties to avoid recursive performance impacts.
|
|
// https://github.com/Semantic-Org/Semantic-UI-React/issues/3000
|
|
|
|
|
|
if (!isEqual_default()(this.getKeyAndValues(nextProps.options), this.getKeyAndValues(this.props.options))) {
|
|
this.setSelectedIndex(undefined, nextProps.options);
|
|
}
|
|
}
|
|
}, {
|
|
key: "shouldComponentUpdate",
|
|
value: function shouldComponentUpdate(nextProps, nextState) {
|
|
return !shallowequal_default()(nextProps, this.props) || !shallowequal_default()(nextState, this.state);
|
|
}
|
|
}, {
|
|
key: "componentDidUpdate",
|
|
value: function componentDidUpdate(prevProps, prevState) {
|
|
// eslint-disable-line complexity
|
|
var _this$props18 = this.props,
|
|
closeOnBlur = _this$props18.closeOnBlur,
|
|
minCharacters = _this$props18.minCharacters,
|
|
openOnFocus = _this$props18.openOnFocus,
|
|
search = _this$props18.search; // focused / blurred
|
|
|
|
if (!prevState.focus && this.state.focus) {
|
|
if (!this.isMouseDown) {
|
|
var openable = !search || search && minCharacters === 1 && !this.state.open;
|
|
if (openOnFocus && openable) this.open();
|
|
}
|
|
} else if (prevState.focus && !this.state.focus) {
|
|
if (!this.isMouseDown && closeOnBlur) {
|
|
this.close();
|
|
}
|
|
} // opened / closed
|
|
|
|
|
|
if (!prevState.open && this.state.open) {
|
|
this.setOpenDirection();
|
|
this.scrollSelectedItemIntoView();
|
|
} else if (prevState.open && !this.state.open) {}
|
|
} // ----------------------------------------
|
|
// Document Event Handlers
|
|
// ----------------------------------------
|
|
// onChange needs to receive a value
|
|
// can't rely on props.value if we are controlled
|
|
|
|
}, {
|
|
key: "getDropdownMenuAriaOptions",
|
|
value: function getDropdownMenuAriaOptions() {
|
|
var _this$props19 = this.props,
|
|
search = _this$props19.search,
|
|
multiple = _this$props19.multiple;
|
|
var ariaOptions = {};
|
|
|
|
if (search) {
|
|
ariaOptions['aria-multiselectable'] = multiple;
|
|
ariaOptions.role = 'listbox';
|
|
}
|
|
|
|
return ariaOptions;
|
|
} // ----------------------------------------
|
|
// Setters
|
|
// ----------------------------------------
|
|
|
|
}, {
|
|
key: "render",
|
|
value: function render() {
|
|
var _this$props20 = this.props,
|
|
basic = _this$props20.basic,
|
|
button = _this$props20.button,
|
|
className = _this$props20.className,
|
|
compact = _this$props20.compact,
|
|
disabled = _this$props20.disabled,
|
|
error = _this$props20.error,
|
|
fluid = _this$props20.fluid,
|
|
floating = _this$props20.floating,
|
|
icon = _this$props20.icon,
|
|
inline = _this$props20.inline,
|
|
item = _this$props20.item,
|
|
labeled = _this$props20.labeled,
|
|
loading = _this$props20.loading,
|
|
multiple = _this$props20.multiple,
|
|
pointing = _this$props20.pointing,
|
|
search = _this$props20.search,
|
|
selection = _this$props20.selection,
|
|
scrolling = _this$props20.scrolling,
|
|
simple = _this$props20.simple,
|
|
trigger = _this$props20.trigger;
|
|
var _this$state8 = this.state,
|
|
focus = _this$state8.focus,
|
|
open = _this$state8.open,
|
|
upward = _this$state8.upward; // Classes
|
|
|
|
var classes = classnames_default()('ui', useKeyOnly(open, 'active visible'), useKeyOnly(disabled, 'disabled'), useKeyOnly(error, 'error'), useKeyOnly(loading, 'loading'), useKeyOnly(basic, 'basic'), useKeyOnly(button, 'button'), useKeyOnly(compact, 'compact'), useKeyOnly(fluid, 'fluid'), useKeyOnly(floating, 'floating'), useKeyOnly(inline, 'inline'), // TODO: consider augmentation to render Dropdowns as Button/Menu, solves icon/link item issues
|
|
// https://github.com/Semantic-Org/Semantic-UI-React/issues/401#issuecomment-240487229
|
|
// TODO: the icon class is only required when a dropdown is a button
|
|
// useKeyOnly(icon, 'icon'),
|
|
useKeyOnly(labeled, 'labeled'), useKeyOnly(item, 'item'), useKeyOnly(multiple, 'multiple'), useKeyOnly(search, 'search'), useKeyOnly(selection, 'selection'), useKeyOnly(simple, 'simple'), useKeyOnly(scrolling, 'scrolling'), useKeyOnly(upward, 'upward'), useKeyOrValueAndKey(pointing, 'pointing'), 'dropdown', className);
|
|
var rest = lib_getUnhandledProps(Dropdown, this.props);
|
|
var ElementType = lib_getElementType(Dropdown, this.props);
|
|
var ariaOptions = this.getDropdownAriaOptions(ElementType, this.props);
|
|
return react_default.a.createElement(es_Ref, {
|
|
innerRef: this.ref
|
|
}, react_default.a.createElement(ElementType, extends_default()({}, rest, ariaOptions, {
|
|
className: classes,
|
|
onBlur: this.handleBlur,
|
|
onClick: this.handleClick,
|
|
onMouseDown: this.handleMouseDown,
|
|
onFocus: this.handleFocus,
|
|
onChange: this.handleChange,
|
|
tabIndex: this.computeTabIndex()
|
|
}), this.renderLabels(), this.renderSearchInput(), this.renderSearchSizer(), trigger || this.renderText(), elements_Icon_Icon.create(icon, {
|
|
overrideProps: this.handleIconOverrides,
|
|
autoGenerateKey: false
|
|
}), this.renderMenu(), open && react_default.a.createElement(lib_default.a, {
|
|
name: "keydown",
|
|
on: this.closeOnEscape
|
|
}), open && react_default.a.createElement(lib_default.a, {
|
|
name: "keydown",
|
|
on: this.moveSelectionOnKeyDown
|
|
}), open && react_default.a.createElement(lib_default.a, {
|
|
name: "click",
|
|
on: this.closeOnDocumentClick
|
|
}), open && react_default.a.createElement(lib_default.a, {
|
|
name: "keydown",
|
|
on: this.selectItemOnEnter
|
|
}), focus && react_default.a.createElement(lib_default.a, {
|
|
name: "keydown",
|
|
on: this.removeItemOnBackspace
|
|
}), focus && !open && react_default.a.createElement(lib_default.a, {
|
|
name: "keydown",
|
|
on: this.openOnArrow
|
|
}), focus && !open && react_default.a.createElement(lib_default.a, {
|
|
name: "keydown",
|
|
on: this.openOnSpace
|
|
})));
|
|
}
|
|
}]);
|
|
|
|
return Dropdown;
|
|
}(AutoControlledComponent_AutoControlledComponent);
|
|
|
|
defineProperty_default()(Dropdown_Dropdown, "defaultProps", {
|
|
additionLabel: 'Add ',
|
|
additionPosition: 'top',
|
|
closeOnBlur: true,
|
|
closeOnEscape: true,
|
|
deburr: false,
|
|
icon: 'dropdown',
|
|
minCharacters: 1,
|
|
noResultsMessage: 'No results found.',
|
|
openOnFocus: true,
|
|
renderLabel: function renderLabel(_ref2) {
|
|
var text = _ref2.text;
|
|
return text;
|
|
},
|
|
searchInput: 'text',
|
|
selectOnBlur: true,
|
|
selectOnNavigation: true,
|
|
wrapSelection: true
|
|
});
|
|
|
|
defineProperty_default()(Dropdown_Dropdown, "autoControlledProps", ['open', 'searchQuery', 'selectedLabel', 'value', 'upward']);
|
|
|
|
defineProperty_default()(Dropdown_Dropdown, "Divider", Dropdown_DropdownDivider);
|
|
|
|
defineProperty_default()(Dropdown_Dropdown, "Header", Dropdown_DropdownHeader);
|
|
|
|
defineProperty_default()(Dropdown_Dropdown, "Item", Dropdown_DropdownItem);
|
|
|
|
defineProperty_default()(Dropdown_Dropdown, "Menu", Dropdown_DropdownMenu);
|
|
|
|
defineProperty_default()(Dropdown_Dropdown, "SearchInput", Dropdown_DropdownSearchInput);
|
|
|
|
defineProperty_default()(Dropdown_Dropdown, "handledProps", ["additionLabel", "additionPosition", "allowAdditions", "as", "basic", "button", "children", "className", "clearable", "closeOnBlur", "closeOnChange", "closeOnEscape", "compact", "deburr", "defaultOpen", "defaultSearchQuery", "defaultSelectedLabel", "defaultUpward", "defaultValue", "direction", "disabled", "error", "floating", "fluid", "header", "icon", "inline", "item", "labeled", "lazyLoad", "loading", "minCharacters", "multiple", "noResultsMessage", "onAddItem", "onBlur", "onChange", "onClick", "onClose", "onFocus", "onLabelClick", "onMouseDown", "onOpen", "onSearchChange", "open", "openOnFocus", "options", "placeholder", "pointing", "renderLabel", "scrolling", "search", "searchInput", "searchQuery", "selectOnBlur", "selectOnNavigation", "selectedLabel", "selection", "simple", "tabIndex", "text", "trigger", "upward", "value", "wrapSelection"]);
|
|
|
|
|
|
Dropdown_Dropdown.propTypes = false ? undefined : {};
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/collections/Form/FormDropdown.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* Sugar for <Form.Field control={Dropdown} />.
|
|
* @see Dropdown
|
|
* @see Form
|
|
*/
|
|
|
|
function FormDropdown(props) {
|
|
var control = props.control;
|
|
var rest = lib_getUnhandledProps(FormDropdown, props);
|
|
var ElementType = lib_getElementType(FormDropdown, props);
|
|
return react_default.a.createElement(ElementType, extends_default()({}, rest, {
|
|
control: control
|
|
}));
|
|
}
|
|
|
|
FormDropdown.handledProps = ["as", "control"];
|
|
FormDropdown.propTypes = false ? undefined : {};
|
|
FormDropdown.defaultProps = {
|
|
as: Form_FormField,
|
|
control: Dropdown_Dropdown
|
|
};
|
|
/* harmony default export */ var Form_FormDropdown = (FormDropdown);
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/collections/Form/FormGroup.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* A set of fields can appear grouped together.
|
|
* @see Form
|
|
*/
|
|
|
|
function FormGroup(props) {
|
|
var children = props.children,
|
|
className = props.className,
|
|
grouped = props.grouped,
|
|
inline = props.inline,
|
|
unstackable = props.unstackable,
|
|
widths = props.widths;
|
|
var classes = classnames_default()(useKeyOnly(grouped, 'grouped'), useKeyOnly(inline, 'inline'), useKeyOnly(unstackable, 'unstackable'), classNameBuilders_useWidthProp(widths, null, true), 'fields', className);
|
|
var rest = lib_getUnhandledProps(FormGroup, props);
|
|
var ElementType = lib_getElementType(FormGroup, props);
|
|
return react_default.a.createElement(ElementType, extends_default()({}, rest, {
|
|
className: classes
|
|
}), children);
|
|
}
|
|
|
|
FormGroup.handledProps = ["as", "children", "className", "grouped", "inline", "unstackable", "widths"];
|
|
FormGroup.propTypes = false ? undefined : {};
|
|
/* harmony default export */ var Form_FormGroup = (FormGroup);
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/elements/Input/Input.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* An Input is a field used to elicit a response from a user.
|
|
* @see Button
|
|
* @see Form
|
|
* @see Icon
|
|
* @see Label
|
|
*/
|
|
|
|
var Input_Input =
|
|
/*#__PURE__*/
|
|
function (_Component) {
|
|
inherits_default()(Input, _Component);
|
|
|
|
function Input() {
|
|
var _getPrototypeOf2;
|
|
|
|
var _this;
|
|
|
|
classCallCheck_default()(this, Input);
|
|
|
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
args[_key] = arguments[_key];
|
|
}
|
|
|
|
_this = possibleConstructorReturn_default()(this, (_getPrototypeOf2 = getPrototypeOf_default()(Input)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "inputRef", Object(react["createRef"])());
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "computeIcon", function () {
|
|
var _this$props = _this.props,
|
|
loading = _this$props.loading,
|
|
icon = _this$props.icon;
|
|
if (!isNil_default()(icon)) return icon;
|
|
if (loading) return 'spinner';
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "computeTabIndex", function () {
|
|
var _this$props2 = _this.props,
|
|
disabled = _this$props2.disabled,
|
|
tabIndex = _this$props2.tabIndex;
|
|
if (!isNil_default()(tabIndex)) return tabIndex;
|
|
if (disabled) return -1;
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "focus", function () {
|
|
return _this.inputRef.current.focus();
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "select", function () {
|
|
return _this.inputRef.current.select();
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "handleChange", function (e) {
|
|
var value = get_default()(e, 'target.value');
|
|
|
|
invoke_default()(_this.props, 'onChange', e, objectSpread_default()({}, _this.props, {
|
|
value: value
|
|
}));
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "handleChildOverrides", function (child, defaultProps) {
|
|
return objectSpread_default()({}, defaultProps, child.props, {
|
|
ref: function ref(c) {
|
|
es_handleRef(child.ref, c);
|
|
_this.inputRef.current = c;
|
|
}
|
|
});
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "partitionProps", function () {
|
|
var _this$props3 = _this.props,
|
|
disabled = _this$props3.disabled,
|
|
type = _this$props3.type;
|
|
|
|
var tabIndex = _this.computeTabIndex();
|
|
|
|
var unhandled = lib_getUnhandledProps(Input, _this.props);
|
|
|
|
var _partitionHTMLProps = htmlPropsUtils_partitionHTMLProps(unhandled),
|
|
_partitionHTMLProps2 = slicedToArray_default()(_partitionHTMLProps, 2),
|
|
htmlInputProps = _partitionHTMLProps2[0],
|
|
rest = _partitionHTMLProps2[1];
|
|
|
|
return [objectSpread_default()({}, htmlInputProps, {
|
|
disabled: disabled,
|
|
type: type,
|
|
tabIndex: tabIndex,
|
|
onChange: _this.handleChange,
|
|
ref: _this.inputRef
|
|
}), rest];
|
|
});
|
|
|
|
return _this;
|
|
}
|
|
|
|
createClass_default()(Input, [{
|
|
key: "render",
|
|
value: function render() {
|
|
var _this2 = this;
|
|
|
|
var _this$props4 = this.props,
|
|
action = _this$props4.action,
|
|
actionPosition = _this$props4.actionPosition,
|
|
children = _this$props4.children,
|
|
className = _this$props4.className,
|
|
disabled = _this$props4.disabled,
|
|
error = _this$props4.error,
|
|
fluid = _this$props4.fluid,
|
|
focus = _this$props4.focus,
|
|
icon = _this$props4.icon,
|
|
iconPosition = _this$props4.iconPosition,
|
|
input = _this$props4.input,
|
|
inverted = _this$props4.inverted,
|
|
label = _this$props4.label,
|
|
labelPosition = _this$props4.labelPosition,
|
|
loading = _this$props4.loading,
|
|
size = _this$props4.size,
|
|
transparent = _this$props4.transparent,
|
|
type = _this$props4.type;
|
|
var classes = classnames_default()('ui', size, useKeyOnly(disabled, 'disabled'), useKeyOnly(error, 'error'), useKeyOnly(fluid, 'fluid'), useKeyOnly(focus, 'focus'), useKeyOnly(inverted, 'inverted'), useKeyOnly(loading, 'loading'), useKeyOnly(transparent, 'transparent'), useValueAndKey(actionPosition, 'action') || useKeyOnly(action, 'action'), useValueAndKey(iconPosition, 'icon') || useKeyOnly(icon || loading, 'icon'), useValueAndKey(labelPosition, 'labeled') || useKeyOnly(label, 'labeled'), 'input', className);
|
|
var ElementType = lib_getElementType(Input, this.props);
|
|
|
|
var _this$partitionProps = this.partitionProps(),
|
|
_this$partitionProps2 = slicedToArray_default()(_this$partitionProps, 2),
|
|
htmlInputProps = _this$partitionProps2[0],
|
|
rest = _this$partitionProps2[1]; // Render with children
|
|
// ----------------------------------------
|
|
|
|
|
|
if (!childrenUtils_namespaceObject.isNil(children)) {
|
|
// add htmlInputProps to the `<input />` child
|
|
var childElements = map_default()(react["Children"].toArray(children), function (child) {
|
|
if (child.type !== 'input') return child;
|
|
return Object(react["cloneElement"])(child, _this2.handleChildOverrides(child, htmlInputProps));
|
|
});
|
|
|
|
return react_default.a.createElement(ElementType, extends_default()({}, rest, {
|
|
className: classes
|
|
}), childElements);
|
|
} // Render Shorthand
|
|
// ----------------------------------------
|
|
|
|
|
|
var actionElement = elements_Button_Button.create(action, {
|
|
autoGenerateKey: false
|
|
});
|
|
var labelElement = Label_Label.create(label, {
|
|
defaultProps: {
|
|
className: classnames_default()('label', // add 'left|right corner'
|
|
includes_default()(labelPosition, 'corner') && labelPosition)
|
|
},
|
|
autoGenerateKey: false
|
|
});
|
|
return react_default.a.createElement(ElementType, extends_default()({}, rest, {
|
|
className: classes
|
|
}), actionPosition === 'left' && actionElement, labelPosition !== 'right' && labelElement, createHTMLInput(input || type, {
|
|
defaultProps: htmlInputProps,
|
|
autoGenerateKey: false
|
|
}), elements_Icon_Icon.create(this.computeIcon(), {
|
|
autoGenerateKey: false
|
|
}), actionPosition !== 'left' && actionElement, labelPosition === 'right' && labelElement);
|
|
}
|
|
}]);
|
|
|
|
return Input;
|
|
}(react["Component"]);
|
|
|
|
defineProperty_default()(Input_Input, "defaultProps", {
|
|
type: 'text'
|
|
});
|
|
|
|
defineProperty_default()(Input_Input, "handledProps", ["action", "actionPosition", "as", "children", "className", "disabled", "error", "fluid", "focus", "icon", "iconPosition", "input", "inverted", "label", "labelPosition", "loading", "onChange", "size", "tabIndex", "transparent", "type"]);
|
|
|
|
Input_Input.propTypes = false ? undefined : {};
|
|
Input_Input.create = createShorthandFactory(Input_Input, function (type) {
|
|
return {
|
|
type: type
|
|
};
|
|
});
|
|
/* harmony default export */ var elements_Input_Input = (Input_Input);
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/collections/Form/FormInput.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* Sugar for <Form.Field control={Input} />.
|
|
* @see Form
|
|
* @see Input
|
|
*/
|
|
|
|
function FormInput(props) {
|
|
var control = props.control;
|
|
var rest = lib_getUnhandledProps(FormInput, props);
|
|
var ElementType = lib_getElementType(FormInput, props);
|
|
return react_default.a.createElement(ElementType, extends_default()({}, rest, {
|
|
control: control
|
|
}));
|
|
}
|
|
|
|
FormInput.handledProps = ["as", "control"];
|
|
FormInput.propTypes = false ? undefined : {};
|
|
FormInput.defaultProps = {
|
|
as: Form_FormField,
|
|
control: elements_Input_Input
|
|
};
|
|
/* harmony default export */ var Form_FormInput = (FormInput);
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/collections/Form/FormRadio.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* Sugar for <Form.Field control={Radio} />.
|
|
* @see Form
|
|
* @see Radio
|
|
*/
|
|
|
|
function FormRadio(props) {
|
|
var control = props.control;
|
|
var rest = lib_getUnhandledProps(FormRadio, props);
|
|
var ElementType = lib_getElementType(FormRadio, props);
|
|
return react_default.a.createElement(ElementType, extends_default()({}, rest, {
|
|
control: control
|
|
}));
|
|
}
|
|
|
|
FormRadio.handledProps = ["as", "control"];
|
|
FormRadio.propTypes = false ? undefined : {};
|
|
FormRadio.defaultProps = {
|
|
as: Form_FormField,
|
|
control: Radio_Radio
|
|
};
|
|
/* harmony default export */ var Form_FormRadio = (FormRadio);
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/addons/Select/Select.js
|
|
|
|
|
|
|
|
|
|
/**
|
|
* A Select is sugar for <Dropdown selection />.
|
|
* @see Dropdown
|
|
* @see Form
|
|
*/
|
|
|
|
function Select(props) {
|
|
return react_default.a.createElement(Dropdown_Dropdown, extends_default()({}, props, {
|
|
selection: true
|
|
}));
|
|
}
|
|
|
|
Select.handledProps = ["options"];
|
|
Select.propTypes = false ? undefined : {};
|
|
Select.Divider = Dropdown_Dropdown.Divider;
|
|
Select.Header = Dropdown_Dropdown.Header;
|
|
Select.Item = Dropdown_Dropdown.Item;
|
|
Select.Menu = Dropdown_Dropdown.Menu;
|
|
/* harmony default export */ var Select_Select = (Select);
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/collections/Form/FormSelect.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* Sugar for <Form.Field control={Select} />.
|
|
* @see Form
|
|
* @see Select
|
|
*/
|
|
|
|
function FormSelect(props) {
|
|
var control = props.control,
|
|
options = props.options;
|
|
var rest = lib_getUnhandledProps(FormSelect, props);
|
|
var ElementType = lib_getElementType(FormSelect, props);
|
|
return react_default.a.createElement(ElementType, extends_default()({}, rest, {
|
|
control: control,
|
|
options: options
|
|
}));
|
|
}
|
|
|
|
FormSelect.handledProps = ["as", "control", "options"];
|
|
FormSelect.propTypes = false ? undefined : {};
|
|
FormSelect.defaultProps = {
|
|
as: Form_FormField,
|
|
control: Select_Select
|
|
};
|
|
/* harmony default export */ var Form_FormSelect = (FormSelect);
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/addons/TextArea/TextArea.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* A TextArea can be used to allow for extended user input.
|
|
* @see Form
|
|
*/
|
|
|
|
var TextArea_TextArea =
|
|
/*#__PURE__*/
|
|
function (_Component) {
|
|
inherits_default()(TextArea, _Component);
|
|
|
|
function TextArea() {
|
|
var _getPrototypeOf2;
|
|
|
|
var _this;
|
|
|
|
classCallCheck_default()(this, TextArea);
|
|
|
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
args[_key] = arguments[_key];
|
|
}
|
|
|
|
_this = possibleConstructorReturn_default()(this, (_getPrototypeOf2 = getPrototypeOf_default()(TextArea)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "ref", Object(react["createRef"])());
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "focus", function () {
|
|
return _this.ref.current.focus();
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "handleChange", function (e) {
|
|
var value = get_default()(e, 'target.value');
|
|
|
|
invoke_default()(_this.props, 'onChange', e, objectSpread_default()({}, _this.props, {
|
|
value: value
|
|
}));
|
|
});
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "handleInput", function (e) {
|
|
var value = get_default()(e, 'target.value');
|
|
|
|
invoke_default()(_this.props, 'onInput', e, objectSpread_default()({}, _this.props, {
|
|
value: value
|
|
}));
|
|
});
|
|
|
|
return _this;
|
|
}
|
|
|
|
createClass_default()(TextArea, [{
|
|
key: "render",
|
|
value: function render() {
|
|
var _this$props = this.props,
|
|
rows = _this$props.rows,
|
|
value = _this$props.value;
|
|
var rest = lib_getUnhandledProps(TextArea, this.props);
|
|
var ElementType = lib_getElementType(TextArea, this.props);
|
|
return react_default.a.createElement(es_Ref, {
|
|
innerRef: this.ref
|
|
}, react_default.a.createElement(ElementType, extends_default()({}, rest, {
|
|
onChange: this.handleChange,
|
|
onInput: this.handleInput,
|
|
rows: rows,
|
|
value: value
|
|
})));
|
|
}
|
|
}]);
|
|
|
|
return TextArea;
|
|
}(react["Component"]);
|
|
|
|
defineProperty_default()(TextArea_TextArea, "defaultProps", {
|
|
as: 'textarea',
|
|
rows: 3
|
|
});
|
|
|
|
defineProperty_default()(TextArea_TextArea, "handledProps", ["as", "onChange", "onInput", "rows", "value"]);
|
|
|
|
TextArea_TextArea.propTypes = false ? undefined : {};
|
|
/* harmony default export */ var addons_TextArea_TextArea = (TextArea_TextArea);
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/collections/Form/FormTextArea.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* Sugar for <Form.Field control={TextArea} />.
|
|
* @see Form
|
|
* @see TextArea
|
|
*/
|
|
|
|
function FormTextArea(props) {
|
|
var control = props.control;
|
|
var rest = lib_getUnhandledProps(FormTextArea, props);
|
|
var ElementType = lib_getElementType(FormTextArea, props);
|
|
return react_default.a.createElement(ElementType, extends_default()({}, rest, {
|
|
control: control
|
|
}));
|
|
}
|
|
|
|
FormTextArea.handledProps = ["as", "control"];
|
|
FormTextArea.propTypes = false ? undefined : {};
|
|
FormTextArea.defaultProps = {
|
|
as: Form_FormField,
|
|
control: addons_TextArea_TextArea
|
|
};
|
|
/* harmony default export */ var Form_FormTextArea = (FormTextArea);
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/collections/Form/Form.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* A Form displays a set of related user input fields in a structured way.
|
|
* @see Button
|
|
* @see Checkbox
|
|
* @see Dropdown
|
|
* @see Input
|
|
* @see Message
|
|
* @see Radio
|
|
* @see Select
|
|
* @see Visibility
|
|
*/
|
|
|
|
var Form_Form =
|
|
/*#__PURE__*/
|
|
function (_Component) {
|
|
inherits_default()(Form, _Component);
|
|
|
|
function Form() {
|
|
var _getPrototypeOf2;
|
|
|
|
var _this;
|
|
|
|
classCallCheck_default()(this, Form);
|
|
|
|
for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
_args[_key] = arguments[_key];
|
|
}
|
|
|
|
_this = possibleConstructorReturn_default()(this, (_getPrototypeOf2 = getPrototypeOf_default()(Form)).call.apply(_getPrototypeOf2, [this].concat(_args)));
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "handleSubmit", function (e) {
|
|
var action = _this.props.action; // Heads up! Third party libs can pass own data as first argument, we need to check that it has preventDefault()
|
|
// method.
|
|
|
|
if (typeof action !== 'string') invoke_default()(e, 'preventDefault');
|
|
|
|
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
args[_key2 - 1] = arguments[_key2];
|
|
}
|
|
|
|
invoke_default.a.apply(void 0, [_this.props, 'onSubmit', e, _this.props].concat(args));
|
|
});
|
|
|
|
return _this;
|
|
}
|
|
|
|
createClass_default()(Form, [{
|
|
key: "render",
|
|
value: function render() {
|
|
var _this$props = this.props,
|
|
action = _this$props.action,
|
|
children = _this$props.children,
|
|
className = _this$props.className,
|
|
error = _this$props.error,
|
|
inverted = _this$props.inverted,
|
|
loading = _this$props.loading,
|
|
reply = _this$props.reply,
|
|
size = _this$props.size,
|
|
success = _this$props.success,
|
|
unstackable = _this$props.unstackable,
|
|
warning = _this$props.warning,
|
|
widths = _this$props.widths;
|
|
var classes = classnames_default()('ui', size, useKeyOnly(error, 'error'), useKeyOnly(inverted, 'inverted'), useKeyOnly(loading, 'loading'), useKeyOnly(reply, 'reply'), useKeyOnly(success, 'success'), useKeyOnly(unstackable, 'unstackable'), useKeyOnly(warning, 'warning'), classNameBuilders_useWidthProp(widths, null, true), 'form', className);
|
|
var rest = lib_getUnhandledProps(Form, this.props);
|
|
var ElementType = lib_getElementType(Form, this.props);
|
|
return react_default.a.createElement(ElementType, extends_default()({}, rest, {
|
|
action: action,
|
|
className: classes,
|
|
onSubmit: this.handleSubmit
|
|
}), children);
|
|
}
|
|
}]);
|
|
|
|
return Form;
|
|
}(react["Component"]);
|
|
|
|
defineProperty_default()(Form_Form, "defaultProps", {
|
|
as: 'form'
|
|
});
|
|
|
|
defineProperty_default()(Form_Form, "Field", Form_FormField);
|
|
|
|
defineProperty_default()(Form_Form, "Button", Form_FormButton);
|
|
|
|
defineProperty_default()(Form_Form, "Checkbox", Form_FormCheckbox);
|
|
|
|
defineProperty_default()(Form_Form, "Dropdown", Form_FormDropdown);
|
|
|
|
defineProperty_default()(Form_Form, "Group", Form_FormGroup);
|
|
|
|
defineProperty_default()(Form_Form, "Input", Form_FormInput);
|
|
|
|
defineProperty_default()(Form_Form, "Radio", Form_FormRadio);
|
|
|
|
defineProperty_default()(Form_Form, "Select", Form_FormSelect);
|
|
|
|
defineProperty_default()(Form_Form, "TextArea", Form_FormTextArea);
|
|
|
|
defineProperty_default()(Form_Form, "handledProps", ["action", "as", "children", "className", "error", "inverted", "loading", "onSubmit", "reply", "size", "success", "unstackable", "warning", "widths"]);
|
|
|
|
Form_Form.propTypes = false ? undefined : {};
|
|
/* harmony default export */ var collections_Form_Form = (Form_Form);
|
|
// CONCATENATED MODULE: ./frontend/components/Contacts/styles.js
|
|
var styles = {
|
|
contact: {
|
|
border: '1px solid #dadada',
|
|
background: 'whitesmoke',
|
|
borderRadius: 3,
|
|
margin: 4,
|
|
padding: '6px 10px',
|
|
display: 'flex',
|
|
justifyContent: 'space-between'
|
|
},
|
|
payer: {
|
|
display: 'flex',
|
|
alignItems: 'center'
|
|
},
|
|
pay: {
|
|
height: 35
|
|
},
|
|
input: {
|
|
height: 35,
|
|
width: 70,
|
|
paddingLeft: 6,
|
|
fontSize: 20
|
|
},
|
|
x: {
|
|
color: 'grey',
|
|
cursor: 'pointer',
|
|
margin: '0 7px'
|
|
}
|
|
};
|
|
/* harmony default export */ var Contacts_styles = (styles);
|
|
// CONCATENATED MODULE: ./frontend/components/Contacts/ContactForm.jsx
|
|
function ContactForm_typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { ContactForm_typeof = function _typeof(obj) { return typeof obj; }; } else { ContactForm_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return ContactForm_typeof(obj); }
|
|
|
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
|
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { ContactForm_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
|
|
function ContactForm_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
|
|
function ContactForm_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
|
|
function ContactForm_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); } }
|
|
|
|
function ContactForm_createClass(Constructor, protoProps, staticProps) { if (protoProps) ContactForm_defineProperties(Constructor.prototype, protoProps); if (staticProps) ContactForm_defineProperties(Constructor, staticProps); return Constructor; }
|
|
|
|
function ContactForm_possibleConstructorReturn(self, call) { if (call && (ContactForm_typeof(call) === "object" || typeof call === "function")) { return call; } return ContactForm_assertThisInitialized(self); }
|
|
|
|
function ContactForm_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
|
|
function ContactForm_getPrototypeOf(o) { ContactForm_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return ContactForm_getPrototypeOf(o); }
|
|
|
|
function ContactForm_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) ContactForm_setPrototypeOf(subClass, superClass); }
|
|
|
|
function ContactForm_setPrototypeOf(o, p) { ContactForm_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return ContactForm_setPrototypeOf(o, p); }
|
|
|
|
|
|
|
|
|
|
|
|
var ContactForm_ContactForm =
|
|
/*#__PURE__*/
|
|
function (_React$Component) {
|
|
ContactForm_inherits(ContactForm, _React$Component);
|
|
|
|
function ContactForm(props) {
|
|
var _this;
|
|
|
|
ContactForm_classCallCheck(this, ContactForm);
|
|
|
|
_this = ContactForm_possibleConstructorReturn(this, ContactForm_getPrototypeOf(ContactForm).call(this, props));
|
|
_this.state = {
|
|
values: _objectSpread({}, props.contact)
|
|
};
|
|
return _this;
|
|
}
|
|
|
|
ContactForm_createClass(ContactForm, [{
|
|
key: "setValue",
|
|
value: function setValue(key, value) {
|
|
var new_values = _objectSpread({}, this.state.values);
|
|
|
|
new_values[key] = value;
|
|
this.setState({
|
|
values: new_values
|
|
});
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function render() {
|
|
var _this2 = this;
|
|
|
|
var _this$props = this.props,
|
|
contact = _this$props.contact,
|
|
onSave = _this$props.onSave,
|
|
onCancel = _this$props.onCancel;
|
|
var values = this.state.values;
|
|
var fields = ["alias", "node_alias", "id", "public_key"];
|
|
return react_default.a.createElement(collections_Form_Form, {
|
|
onSubmit: function onSubmit() {
|
|
return onSave(contact.id, values);
|
|
}
|
|
}, fields.map(function (field) {
|
|
return react_default.a.createElement(collections_Form_Form.Field, {
|
|
key: field
|
|
}, react_default.a.createElement("label", null, field), react_default.a.createElement("input", {
|
|
value: values[field],
|
|
onChange: function onChange(e) {
|
|
return _this2.setValue(field, e.target.value);
|
|
}
|
|
}));
|
|
}), react_default.a.createElement(Checkbox_Checkbox, {
|
|
label: "Is Owner",
|
|
onChange: function onChange() {
|
|
return _this2.setValue('is_owner', !!!values.is_owner);
|
|
},
|
|
checked: values.is_owner == true
|
|
}), react_default.a.createElement("div", null, react_default.a.createElement("button", {
|
|
className: "ui button primary"
|
|
}, "Save"), react_default.a.createElement("div", {
|
|
style: Contacts_styles.x,
|
|
onClick: onCancel
|
|
}, "x")));
|
|
}
|
|
}]);
|
|
|
|
return ContactForm;
|
|
}(react_default.a.Component);
|
|
|
|
|
|
// CONCATENATED MODULE: ./frontend/api.js
|
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
|
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
|
|
var apis = [{
|
|
name: 'relay',
|
|
url: '/'
|
|
}, {
|
|
name: 'media',
|
|
url: window.location.hostname === 'localhost' ? 'http://localhost:5000/' : 'http://memes.sphinx.chat/',
|
|
tokenName: '__sphinx__media__token__'
|
|
}];
|
|
var methods = ["GET", "POST", "PUT", "DELETE", "UPLOAD", "BLOB"];
|
|
|
|
function createAPIs(apis) {
|
|
var r = {};
|
|
apis.forEach(function (a) {
|
|
return r[a.name] = createAPI(a);
|
|
});
|
|
return r;
|
|
} // "fields" is only for UPLOAD (extra fields)
|
|
|
|
|
|
function createAPI(def) {
|
|
var api = {};
|
|
api.tokenName = def.tokenName;
|
|
methods.forEach(function (m) {
|
|
api[m] =
|
|
/*#__PURE__*/
|
|
function () {
|
|
var _ref = _asyncToGenerator(
|
|
/*#__PURE__*/
|
|
regeneratorRuntime.mark(function _callee(url, data, fields) {
|
|
var token, skip, headers, opts, file, filename, type, formData, r, res;
|
|
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
while (1) {
|
|
switch (_context.prev = _context.next) {
|
|
case 0:
|
|
_context.prev = 0;
|
|
_context.next = 3;
|
|
return getToken(def.tokenName);
|
|
|
|
case 3:
|
|
token = _context.sent;
|
|
skip = isPublic(def.url + url);
|
|
|
|
if (!(def.tokenName && !token && !skip)) {
|
|
_context.next = 7;
|
|
break;
|
|
}
|
|
|
|
throw new Error("no token");
|
|
|
|
case 7:
|
|
headers = {};
|
|
if (def.tokenName && token) headers['authorization'] = 'Bearer ' + token;
|
|
opts = {
|
|
mode: 'cors'
|
|
};
|
|
|
|
if (m === 'POST' || m === 'PUT') {
|
|
headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8';
|
|
opts.body = new URLSearchParams(data);
|
|
}
|
|
|
|
if (m === 'UPLOAD') {
|
|
file = data;
|
|
filename = file.name || 'name';
|
|
type = file.type || 'application/octet-stream';
|
|
formData = new FormData();
|
|
formData.append('file', new Blob([file], {
|
|
type: type
|
|
}), filename);
|
|
Object.entries(fields).forEach(function (e) {
|
|
return formData.append(e[0], e[1]);
|
|
});
|
|
opts.body = formData;
|
|
}
|
|
|
|
opts.headers = new Headers(headers);
|
|
opts.method = m === 'UPLOAD' ? 'POST' : m;
|
|
if (m === 'BLOB') opts.method = 'GET';
|
|
_context.next = 17;
|
|
return fetch(def.url + url, opts);
|
|
|
|
case 17:
|
|
r = _context.sent;
|
|
|
|
if (r.ok) {
|
|
_context.next = 21;
|
|
break;
|
|
}
|
|
|
|
console.log(r);
|
|
throw new Error('Not OK!');
|
|
|
|
case 21:
|
|
if (!(m === 'BLOB')) {
|
|
_context.next = 27;
|
|
break;
|
|
}
|
|
|
|
_context.next = 24;
|
|
return r.blob();
|
|
|
|
case 24:
|
|
res = _context.sent;
|
|
_context.next = 31;
|
|
break;
|
|
|
|
case 27:
|
|
_context.next = 29;
|
|
return r.json();
|
|
|
|
case 29:
|
|
res = _context.sent;
|
|
|
|
if (res.token) {
|
|
localStorage.setItem(def.tokenName, res.token);
|
|
}
|
|
|
|
case 31:
|
|
return _context.abrupt("return", res);
|
|
|
|
case 34:
|
|
_context.prev = 34;
|
|
_context.t0 = _context["catch"](0);
|
|
throw _context.t0;
|
|
|
|
case 37:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}
|
|
}, _callee, null, [[0, 34]]);
|
|
}));
|
|
|
|
return function (_x, _x2, _x3) {
|
|
return _ref.apply(this, arguments);
|
|
};
|
|
}();
|
|
});
|
|
return api;
|
|
}
|
|
|
|
function isPublic(url) {
|
|
return url.endsWith('ask') || url.endsWith('verify');
|
|
}
|
|
|
|
var _createAPIs = createAPIs(apis),
|
|
relay = _createAPIs.relay,
|
|
api_media = _createAPIs.media;
|
|
|
|
|
|
|
|
function getToken(_x4) {
|
|
return _getToken.apply(this, arguments);
|
|
} // let formData = new FormData();
|
|
// formData.append('file', new Blob([file]))
|
|
// formData.append('filename', filename);
|
|
// if(filetype) {
|
|
// formData.append('filetype', filetype);
|
|
// }
|
|
|
|
|
|
function _getToken() {
|
|
_getToken = _asyncToGenerator(
|
|
/*#__PURE__*/
|
|
regeneratorRuntime.mark(function _callee2(name) {
|
|
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
while (1) {
|
|
switch (_context2.prev = _context2.next) {
|
|
case 0:
|
|
if (name) {
|
|
_context2.next = 2;
|
|
break;
|
|
}
|
|
|
|
return _context2.abrupt("return", "");
|
|
|
|
case 2:
|
|
return _context2.abrupt("return", localStorage.getItem(name));
|
|
|
|
case 3:
|
|
case "end":
|
|
return _context2.stop();
|
|
}
|
|
}
|
|
}, _callee2);
|
|
}));
|
|
return _getToken.apply(this, arguments);
|
|
}
|
|
// CONCATENATED MODULE: ./frontend/components/Contacts/ContactRow.jsx
|
|
function ContactRow_asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
|
|
function ContactRow_asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { ContactRow_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { ContactRow_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
|
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
|
|
|
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
|
|
|
|
function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { 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; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
|
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ var ContactRow = (function (_ref) {
|
|
var contact = _ref.contact,
|
|
_onSave = _ref.onSave,
|
|
chats = _ref.chats;
|
|
|
|
var _useState = Object(react["useState"])(false),
|
|
_useState2 = _slicedToArray(_useState, 2),
|
|
edit = _useState2[0],
|
|
setEdit = _useState2[1];
|
|
|
|
var _useState3 = Object(react["useState"])(false),
|
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
pay = _useState4[0],
|
|
setPay = _useState4[1];
|
|
|
|
var _useState5 = Object(react["useState"])(0),
|
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
amount = _useState6[0],
|
|
setAmount = _useState6[1];
|
|
|
|
var _useState7 = Object(react["useState"])(false),
|
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
paying = _useState8[0],
|
|
setPaying = _useState8[1];
|
|
|
|
if (edit) {
|
|
return react_default.a.createElement("li", {
|
|
style: {
|
|
background: '#eee',
|
|
padding: 10
|
|
}
|
|
}, react_default.a.createElement(ContactForm_ContactForm, {
|
|
contact: contact,
|
|
onSave: function onSave(id, values) {
|
|
_onSave(id, values);
|
|
|
|
setEdit(false);
|
|
},
|
|
onCancel: function onCancel() {
|
|
return setEdit(false);
|
|
}
|
|
}));
|
|
}
|
|
|
|
function payButton() {
|
|
if (pay) {
|
|
confirmPay();
|
|
} else {
|
|
setPay(true);
|
|
setAmount(0);
|
|
}
|
|
}
|
|
|
|
function confirmPay() {
|
|
return _confirmPay.apply(this, arguments);
|
|
}
|
|
|
|
function _confirmPay() {
|
|
_confirmPay = ContactRow_asyncToGenerator(
|
|
/*#__PURE__*/
|
|
regeneratorRuntime.mark(function _callee() {
|
|
var amt, chatz, chat, n;
|
|
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
while (1) {
|
|
switch (_context.prev = _context.next) {
|
|
case 0:
|
|
amt = parseInt(amount);
|
|
console.log(chats);
|
|
console.log(contact);
|
|
chatz = chats && chats.filter(function (c) {
|
|
return c.contact_ids.includes(parseInt(contact.id));
|
|
});
|
|
console.log(chatz);
|
|
n = 9999999;
|
|
chatz && chatz.forEach(function (c) {
|
|
if (c.contact_ids.length < n) {
|
|
n = c.contact_ids.length;
|
|
chat = c; // smallest for this user
|
|
}
|
|
});
|
|
console.log(chat);
|
|
|
|
if (chat) {
|
|
_context.next = 10;
|
|
break;
|
|
}
|
|
|
|
return _context.abrupt("return");
|
|
|
|
case 10:
|
|
setPaying(true);
|
|
|
|
if (!window.testPurchaseMUID) {
|
|
_context.next = 16;
|
|
break;
|
|
}
|
|
|
|
_context.next = 14;
|
|
return relay.POST('purchase', {
|
|
chat_id: chat.id,
|
|
contact_id: contact.id,
|
|
amount: amt,
|
|
muid: window.testPurchaseMUID
|
|
});
|
|
|
|
case 14:
|
|
_context.next = 18;
|
|
break;
|
|
|
|
case 16:
|
|
_context.next = 18;
|
|
return relay.POST('payment', {
|
|
chat_id: chat.id,
|
|
contact_id: contact.id,
|
|
amount: amt
|
|
});
|
|
|
|
case 18:
|
|
setPay(false);
|
|
setPaying(false);
|
|
|
|
case 20:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}
|
|
}, _callee);
|
|
}));
|
|
return _confirmPay.apply(this, arguments);
|
|
}
|
|
|
|
return react_default.a.createElement("div", {
|
|
style: Contacts_styles.contact
|
|
}, react_default.a.createElement("div", null, react_default.a.createElement("b", null, contact.alias), " local_id: ", contact.id, "; remote_id: ", contact.remote_id, " ", react_default.a.createElement("br", null), react_default.a.createElement("a", {
|
|
style: {
|
|
color: 'blue'
|
|
}
|
|
}, contact.public_key), react_default.a.createElement("br", null), contact.is_owner && react_default.a.createElement("span", {
|
|
className: "ui label green"
|
|
}, "Is Node Owner"), contact.photo_url && react_default.a.createElement("div", null, react_default.a.createElement("a", {
|
|
href: contact.photo_url,
|
|
target: "_blank"
|
|
}, contact.photo_url)), react_default.a.createElement("a", {
|
|
onClick: function onClick() {
|
|
return setEdit(true);
|
|
}
|
|
}, "Edit")), !contact.is_owner && react_default.a.createElement("div", {
|
|
style: Contacts_styles.payer
|
|
}, pay && react_default.a.createElement("div", {
|
|
style: Contacts_styles.x,
|
|
onClick: function onClick() {
|
|
return setPay(false);
|
|
}
|
|
}, "x"), pay && react_default.a.createElement("input", {
|
|
type: "number",
|
|
style: Contacts_styles.input,
|
|
value: amount,
|
|
onChange: function onChange(e) {
|
|
return setAmount(e.target.value);
|
|
}
|
|
}), react_default.a.createElement("button", {
|
|
style: Contacts_styles.pay,
|
|
disabled: pay && !amount || paying,
|
|
onClick: payButton
|
|
}, pay ? 'Confirm' : "Pay ".concat(contact.alias))));
|
|
});
|
|
// CONCATENATED MODULE: ./frontend/components/context.jsx
|
|
|
|
var ctx = react_default.a.createContext();
|
|
// CONCATENATED MODULE: ./frontend/components/Contacts/index.jsx
|
|
function Contacts_typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { Contacts_typeof = function _typeof(obj) { return typeof obj; }; } else { Contacts_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return Contacts_typeof(obj); }
|
|
|
|
function Contacts_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
|
|
function Contacts_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); } }
|
|
|
|
function Contacts_createClass(Constructor, protoProps, staticProps) { if (protoProps) Contacts_defineProperties(Constructor.prototype, protoProps); if (staticProps) Contacts_defineProperties(Constructor, staticProps); return Constructor; }
|
|
|
|
function Contacts_possibleConstructorReturn(self, call) { if (call && (Contacts_typeof(call) === "object" || typeof call === "function")) { return call; } return Contacts_assertThisInitialized(self); }
|
|
|
|
function Contacts_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
|
|
function Contacts_getPrototypeOf(o) { Contacts_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return Contacts_getPrototypeOf(o); }
|
|
|
|
function Contacts_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) Contacts_setPrototypeOf(subClass, superClass); }
|
|
|
|
function Contacts_setPrototypeOf(o, p) { Contacts_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return Contacts_setPrototypeOf(o, p); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Contacts_Contacts =
|
|
/*#__PURE__*/
|
|
function (_React$Component) {
|
|
Contacts_inherits(Contacts, _React$Component);
|
|
|
|
function Contacts(props) {
|
|
var _this;
|
|
|
|
Contacts_classCallCheck(this, Contacts);
|
|
|
|
_this = Contacts_possibleConstructorReturn(this, Contacts_getPrototypeOf(Contacts).call(this, props));
|
|
_this.state = {
|
|
show_add_contact: false
|
|
};
|
|
return _this;
|
|
}
|
|
|
|
Contacts_createClass(Contacts, [{
|
|
key: "updateContact",
|
|
value: function updateContact(id, values) {
|
|
var _this2 = this;
|
|
|
|
fetch("/contacts/".concat(id), {
|
|
method: 'PUT',
|
|
body: new URLSearchParams(values),
|
|
headers: new Headers({
|
|
'Content-type': 'application/x-www-form-urlencoded; charset=UTF-8'
|
|
})
|
|
}).then(function (r) {
|
|
return r.json();
|
|
}).then(function (body) {
|
|
console.log('updated contact', {
|
|
body: body
|
|
});
|
|
|
|
_this2.getContacts();
|
|
});
|
|
}
|
|
}, {
|
|
key: "createContact",
|
|
value: function createContact(id, values) {
|
|
var _this3 = this;
|
|
|
|
fetch("/contacts", {
|
|
method: 'POST',
|
|
body: new URLSearchParams(values),
|
|
headers: new Headers({
|
|
'Content-type': 'application/x-www-form-urlencoded; charset=UTF-8'
|
|
})
|
|
}).then(function (r) {
|
|
return r.json();
|
|
}).then(function (body) {
|
|
console.log('created contact', {
|
|
body: body
|
|
});
|
|
|
|
_this3.getContacts();
|
|
});
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function render() {
|
|
var _this4 = this;
|
|
|
|
var _this$context = this.context,
|
|
contacts = _this$context.contacts,
|
|
chats = _this$context.chats;
|
|
return react_default.a.createElement("div", null, react_default.a.createElement("h3", null, "Contacts"), react_default.a.createElement("div", null, contacts && contacts.map(function (contact) {
|
|
return react_default.a.createElement(ContactRow, {
|
|
chats: chats,
|
|
key: contact.id,
|
|
contact: contact,
|
|
onSave: _this4.updateContact.bind(_this4)
|
|
});
|
|
})), react_default.a.createElement("button", {
|
|
className: "ui button",
|
|
onClick: function onClick() {
|
|
return _this4.setState({
|
|
show_add_contact: !!!_this4.state.show_add_contact
|
|
});
|
|
}
|
|
}, "Add Contact"), this.state.show_add_contact && react_default.a.createElement("div", null, react_default.a.createElement(ContactForm_ContactForm, {
|
|
contact: {},
|
|
onSave: function onSave(id, values) {
|
|
_this4.setState({
|
|
show_add_contact: false
|
|
});
|
|
|
|
_this4.createContact(null, values);
|
|
}
|
|
})), react_default.a.createElement("h3", null, "Upload File"), react_default.a.createElement("form", {
|
|
action: "/upload",
|
|
method: "post",
|
|
enctype: "multipart/form-data",
|
|
className: "ui form"
|
|
}, react_default.a.createElement("div", {
|
|
className: "field"
|
|
}, react_default.a.createElement("label", null, "Contact ID"), react_default.a.createElement("input", {
|
|
type: "text",
|
|
name: "contact_id",
|
|
placeholder: "Contact ID"
|
|
})), react_default.a.createElement("div", {
|
|
className: "field"
|
|
}, react_default.a.createElement("label", null, "File"), react_default.a.createElement("input", {
|
|
type: "file",
|
|
name: "file"
|
|
})), react_default.a.createElement("input", {
|
|
type: "submit",
|
|
value: "Upload"
|
|
})));
|
|
}
|
|
}]);
|
|
|
|
return Contacts;
|
|
}(react_default.a.Component);
|
|
|
|
Contacts_Contacts.contextType = ctx;
|
|
/* harmony default export */ var components_Contacts = (Contacts_Contacts);
|
|
// CONCATENATED MODULE: ./frontend/components/Messages/index.jsx
|
|
function Messages_typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { Messages_typeof = function _typeof(obj) { return typeof obj; }; } else { Messages_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return Messages_typeof(obj); }
|
|
|
|
function Messages_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
|
|
function Messages_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); } }
|
|
|
|
function Messages_createClass(Constructor, protoProps, staticProps) { if (protoProps) Messages_defineProperties(Constructor.prototype, protoProps); if (staticProps) Messages_defineProperties(Constructor, staticProps); return Constructor; }
|
|
|
|
function Messages_possibleConstructorReturn(self, call) { if (call && (Messages_typeof(call) === "object" || typeof call === "function")) { return call; } return Messages_assertThisInitialized(self); }
|
|
|
|
function Messages_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
|
|
function Messages_getPrototypeOf(o) { Messages_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return Messages_getPrototypeOf(o); }
|
|
|
|
function Messages_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) Messages_setPrototypeOf(subClass, superClass); }
|
|
|
|
function Messages_setPrototypeOf(o, p) { Messages_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return Messages_setPrototypeOf(o, p); }
|
|
|
|
|
|
|
|
|
|
var Messages_Messages =
|
|
/*#__PURE__*/
|
|
function (_React$Component) {
|
|
Messages_inherits(Messages, _React$Component);
|
|
|
|
function Messages(props) {
|
|
var _this;
|
|
|
|
Messages_classCallCheck(this, Messages);
|
|
|
|
_this = Messages_possibleConstructorReturn(this, Messages_getPrototypeOf(Messages).call(this, props));
|
|
_this.state = {
|
|
dest: ''
|
|
};
|
|
return _this;
|
|
}
|
|
|
|
Messages_createClass(Messages, [{
|
|
key: "onSelectContact",
|
|
value: function onSelectContact(contact_id) {
|
|
var contact = this.context.contacts.find(function (c) {
|
|
return c.id == contact_id;
|
|
});
|
|
this.setState({
|
|
dest: contact.public_key,
|
|
contact_id: contact_id
|
|
});
|
|
}
|
|
}, {
|
|
key: "onSelectChat",
|
|
value: function onSelectChat(chat_id) {
|
|
this.setState({
|
|
chat_id: chat_id
|
|
});
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function render() {
|
|
var _this2 = this;
|
|
|
|
var _this$state = this.state,
|
|
dest = _this$state.dest,
|
|
contact_id = _this$state.contact_id,
|
|
chat_id = _this$state.chat_id,
|
|
text = _this$state.text;
|
|
var _this$context = this.context,
|
|
messages = _this$context.messages,
|
|
contacts = _this$context.contacts,
|
|
chats = _this$context.chats;
|
|
var ready = contact_id && dest && text;
|
|
return react_default.a.createElement("div", null, react_default.a.createElement("h3", null, "Send Message"), react_default.a.createElement("form", {
|
|
method: "POST",
|
|
action: "/messages",
|
|
className: "ui form"
|
|
}, react_default.a.createElement("label", null, "Contacts:"), react_default.a.createElement("select", {
|
|
onChange: function onChange(value) {
|
|
return _this2.onSelectContact(event.target.value);
|
|
}
|
|
}, contacts && contacts.map(function (contact) {
|
|
return react_default.a.createElement("option", {
|
|
value: contact.id
|
|
}, contact.alias, " (", contact.public_key, ")");
|
|
})), react_default.a.createElement("br", null), react_default.a.createElement("label", null, "Chats:"), react_default.a.createElement("select", {
|
|
onChange: function onChange(value) {
|
|
return _this2.onSelectChat(event.target.value);
|
|
}
|
|
}, react_default.a.createElement("option", null, "Select Chat:"), chats && chats.map(function (chat) {
|
|
return react_default.a.createElement("option", {
|
|
value: chat.id
|
|
}, chat.uuid);
|
|
})), react_default.a.createElement("p", null, react_default.a.createElement("input", {
|
|
type: "text",
|
|
name: "destination_key",
|
|
placeholder: "destination pubkey",
|
|
value: dest,
|
|
onChange: function onChange(e) {
|
|
return _this2.setState({
|
|
dest: e.target.value
|
|
});
|
|
}
|
|
})), react_default.a.createElement("p", null, react_default.a.createElement("input", {
|
|
type: "text",
|
|
name: "contact_id",
|
|
placeholder: "contact_id",
|
|
value: contact_id,
|
|
onChange: function onChange(e) {
|
|
return _this2.setState({
|
|
contact_id: e.target.value
|
|
});
|
|
}
|
|
})), react_default.a.createElement("p", null, react_default.a.createElement("input", {
|
|
type: "text",
|
|
name: "chat_id",
|
|
placeholder: "chat_id",
|
|
value: chat_id,
|
|
onChange: function onChange(e) {
|
|
return _this2.setState({
|
|
chat_id: e.target.value
|
|
});
|
|
}
|
|
})), react_default.a.createElement("p", null, react_default.a.createElement("input", {
|
|
type: "text",
|
|
name: "text",
|
|
placeholder: "message text",
|
|
value: text,
|
|
onChange: function onChange(e) {
|
|
return _this2.setState({
|
|
text: e.target.value
|
|
});
|
|
}
|
|
})), react_default.a.createElement("p", null, react_default.a.createElement("input", {
|
|
type: "submit",
|
|
value: "Send",
|
|
className: "ui button primary",
|
|
disabled: !ready
|
|
}))), react_default.a.createElement("h3", null, "Messages"), react_default.a.createElement("ol", null, messages && messages.map(function (message) {
|
|
return react_default.a.createElement("li", null, JSON.stringify(message, null, 2));
|
|
})), react_default.a.createElement("form", {
|
|
action: "/messages/clear",
|
|
method: "POST",
|
|
className: "ui form"
|
|
}, react_default.a.createElement("button", {
|
|
className: "ui button"
|
|
}, "Clear Messages")));
|
|
}
|
|
}]);
|
|
|
|
return Messages;
|
|
}(react_default.a.Component);
|
|
|
|
Messages_Messages.contextType = ctx;
|
|
/* harmony default export */ var components_Messages = (Messages_Messages);
|
|
// CONCATENATED MODULE: ./frontend/components/Channels/index.jsx
|
|
function Channels_typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { Channels_typeof = function _typeof(obj) { return typeof obj; }; } else { Channels_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return Channels_typeof(obj); }
|
|
|
|
function Channels_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
|
|
function Channels_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); } }
|
|
|
|
function Channels_createClass(Constructor, protoProps, staticProps) { if (protoProps) Channels_defineProperties(Constructor.prototype, protoProps); if (staticProps) Channels_defineProperties(Constructor, staticProps); return Constructor; }
|
|
|
|
function Channels_possibleConstructorReturn(self, call) { if (call && (Channels_typeof(call) === "object" || typeof call === "function")) { return call; } return Channels_assertThisInitialized(self); }
|
|
|
|
function Channels_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
|
|
function Channels_getPrototypeOf(o) { Channels_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return Channels_getPrototypeOf(o); }
|
|
|
|
function Channels_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) Channels_setPrototypeOf(subClass, superClass); }
|
|
|
|
function Channels_setPrototypeOf(o, p) { Channels_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return Channels_setPrototypeOf(o, p); }
|
|
|
|
|
|
|
|
var Channels_Channels =
|
|
/*#__PURE__*/
|
|
function (_React$Component) {
|
|
Channels_inherits(Channels, _React$Component);
|
|
|
|
function Channels(props) {
|
|
var _this;
|
|
|
|
Channels_classCallCheck(this, Channels);
|
|
|
|
_this = Channels_possibleConstructorReturn(this, Channels_getPrototypeOf(Channels).call(this, props));
|
|
_this.state = {
|
|
channels: []
|
|
};
|
|
return _this;
|
|
}
|
|
|
|
Channels_createClass(Channels, [{
|
|
key: "componentDidMount",
|
|
value: function componentDidMount() {
|
|
this.getChannels();
|
|
}
|
|
}, {
|
|
key: "getChannels",
|
|
value: function getChannels() {
|
|
var _this2 = this;
|
|
|
|
fetch('/channels').then(function (r) {
|
|
return r.json();
|
|
}).then(function (body) {
|
|
var channels = body.response.channels;
|
|
|
|
_this2.setState({
|
|
channels: channels
|
|
});
|
|
});
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function render() {
|
|
var _this3 = this;
|
|
|
|
var channels = this.state.channels;
|
|
return react_default.a.createElement("ul", null, channels.map(function (channel) {
|
|
return react_default.a.createElement("li", null, react_default.a.createElement("a", {
|
|
onClick: function onClick() {
|
|
return _this3.setState({
|
|
dest: channel.remote_pubkey
|
|
});
|
|
},
|
|
style: {
|
|
color: 'blue'
|
|
}
|
|
}, channel.remote_pubkey), react_default.a.createElement("pre", null, JSON.stringify(channel, null, 2)));
|
|
}));
|
|
}
|
|
}]);
|
|
|
|
return Channels;
|
|
}(react_default.a.Component);
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/objectWithoutProperties.js
|
|
var objectWithoutProperties = __webpack_require__(285);
|
|
var objectWithoutProperties_default = /*#__PURE__*/__webpack_require__.n(objectWithoutProperties);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/collections/Grid/GridColumn.js
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* A column sub-component for Grid.
|
|
*/
|
|
|
|
function GridColumn(props) {
|
|
var children = props.children,
|
|
className = props.className,
|
|
computer = props.computer,
|
|
color = props.color,
|
|
floated = props.floated,
|
|
largeScreen = props.largeScreen,
|
|
mobile = props.mobile,
|
|
only = props.only,
|
|
stretched = props.stretched,
|
|
tablet = props.tablet,
|
|
textAlign = props.textAlign,
|
|
verticalAlign = props.verticalAlign,
|
|
widescreen = props.widescreen,
|
|
width = props.width;
|
|
var classes = classnames_default()(color, useKeyOnly(stretched, 'stretched'), useMultipleProp(only, 'only'), useTextAlignProp(textAlign), useValueAndKey(floated, 'floated'), useVerticalAlignProp(verticalAlign), classNameBuilders_useWidthProp(computer, 'wide computer'), classNameBuilders_useWidthProp(largeScreen, 'wide large screen'), classNameBuilders_useWidthProp(mobile, 'wide mobile'), classNameBuilders_useWidthProp(tablet, 'wide tablet'), classNameBuilders_useWidthProp(widescreen, 'wide widescreen'), classNameBuilders_useWidthProp(width, 'wide'), 'column', className);
|
|
var rest = lib_getUnhandledProps(GridColumn, props);
|
|
var ElementType = lib_getElementType(GridColumn, props);
|
|
return react_default.a.createElement(ElementType, extends_default()({}, rest, {
|
|
className: classes
|
|
}), children);
|
|
}
|
|
|
|
GridColumn.handledProps = ["as", "children", "className", "color", "computer", "floated", "largeScreen", "mobile", "only", "stretched", "tablet", "textAlign", "verticalAlign", "widescreen", "width"];
|
|
GridColumn.propTypes = false ? undefined : {};
|
|
GridColumn.create = createShorthandFactory(GridColumn, function (children) {
|
|
return {
|
|
children: children
|
|
};
|
|
});
|
|
/* harmony default export */ var Grid_GridColumn = (GridColumn);
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/collections/Grid/GridRow.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* A row sub-component for Grid.
|
|
*/
|
|
|
|
function GridRow(props) {
|
|
var centered = props.centered,
|
|
children = props.children,
|
|
className = props.className,
|
|
color = props.color,
|
|
columns = props.columns,
|
|
divided = props.divided,
|
|
only = props.only,
|
|
reversed = props.reversed,
|
|
stretched = props.stretched,
|
|
textAlign = props.textAlign,
|
|
verticalAlign = props.verticalAlign;
|
|
var classes = classnames_default()(color, useKeyOnly(centered, 'centered'), useKeyOnly(divided, 'divided'), useKeyOnly(stretched, 'stretched'), useMultipleProp(only, 'only'), useMultipleProp(reversed, 'reversed'), useTextAlignProp(textAlign), useVerticalAlignProp(verticalAlign), classNameBuilders_useWidthProp(columns, 'column', true), 'row', className);
|
|
var rest = lib_getUnhandledProps(GridRow, props);
|
|
var ElementType = lib_getElementType(GridRow, props);
|
|
return react_default.a.createElement(ElementType, extends_default()({}, rest, {
|
|
className: classes
|
|
}), children);
|
|
}
|
|
|
|
GridRow.handledProps = ["as", "centered", "children", "className", "color", "columns", "divided", "only", "reversed", "stretched", "textAlign", "verticalAlign"];
|
|
GridRow.propTypes = false ? undefined : {};
|
|
/* harmony default export */ var Grid_GridRow = (GridRow);
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/collections/Grid/Grid.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* A grid is used to harmonize negative space in a layout.
|
|
*/
|
|
|
|
function Grid(props) {
|
|
var celled = props.celled,
|
|
centered = props.centered,
|
|
children = props.children,
|
|
className = props.className,
|
|
columns = props.columns,
|
|
container = props.container,
|
|
divided = props.divided,
|
|
doubling = props.doubling,
|
|
inverted = props.inverted,
|
|
padded = props.padded,
|
|
relaxed = props.relaxed,
|
|
reversed = props.reversed,
|
|
stackable = props.stackable,
|
|
stretched = props.stretched,
|
|
textAlign = props.textAlign,
|
|
verticalAlign = props.verticalAlign;
|
|
var classes = classnames_default()('ui', useKeyOnly(centered, 'centered'), useKeyOnly(container, 'container'), useKeyOnly(doubling, 'doubling'), useKeyOnly(inverted, 'inverted'), useKeyOnly(stackable, 'stackable'), useKeyOnly(stretched, 'stretched'), useKeyOrValueAndKey(celled, 'celled'), useKeyOrValueAndKey(divided, 'divided'), useKeyOrValueAndKey(padded, 'padded'), useKeyOrValueAndKey(relaxed, 'relaxed'), useMultipleProp(reversed, 'reversed'), useTextAlignProp(textAlign), useVerticalAlignProp(verticalAlign), classNameBuilders_useWidthProp(columns, 'column', true), 'grid', className);
|
|
var rest = lib_getUnhandledProps(Grid, props);
|
|
var ElementType = lib_getElementType(Grid, props);
|
|
return react_default.a.createElement(ElementType, extends_default()({}, rest, {
|
|
className: classes
|
|
}), children);
|
|
}
|
|
|
|
Grid.handledProps = ["as", "celled", "centered", "children", "className", "columns", "container", "divided", "doubling", "inverted", "padded", "relaxed", "reversed", "stackable", "stretched", "textAlign", "verticalAlign"];
|
|
Grid.Column = Grid_GridColumn;
|
|
Grid.Row = Grid_GridRow;
|
|
Grid.propTypes = false ? undefined : {};
|
|
/* harmony default export */ var Grid_Grid = (Grid);
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/collections/Menu/MenuHeader.js
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* A menu item may include a header or may itself be a header.
|
|
*/
|
|
|
|
function MenuHeader(props) {
|
|
var children = props.children,
|
|
className = props.className,
|
|
content = props.content;
|
|
var classes = classnames_default()('header', className);
|
|
var rest = lib_getUnhandledProps(MenuHeader, props);
|
|
var ElementType = lib_getElementType(MenuHeader, props);
|
|
return react_default.a.createElement(ElementType, extends_default()({}, rest, {
|
|
className: classes
|
|
}), childrenUtils_namespaceObject.isNil(children) ? content : children);
|
|
}
|
|
|
|
MenuHeader.handledProps = ["as", "children", "className", "content"];
|
|
MenuHeader.propTypes = false ? undefined : {};
|
|
/* harmony default export */ var Menu_MenuHeader = (MenuHeader);
|
|
// EXTERNAL MODULE: ./node_modules/lodash/startCase.js
|
|
var startCase = __webpack_require__(286);
|
|
var startCase_default = /*#__PURE__*/__webpack_require__.n(startCase);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/collections/Menu/MenuItem.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* A menu can contain an item.
|
|
*/
|
|
|
|
var MenuItem_MenuItem =
|
|
/*#__PURE__*/
|
|
function (_Component) {
|
|
inherits_default()(MenuItem, _Component);
|
|
|
|
function MenuItem() {
|
|
var _getPrototypeOf2;
|
|
|
|
var _this;
|
|
|
|
classCallCheck_default()(this, MenuItem);
|
|
|
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
args[_key] = arguments[_key];
|
|
}
|
|
|
|
_this = possibleConstructorReturn_default()(this, (_getPrototypeOf2 = getPrototypeOf_default()(MenuItem)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "handleClick", function (e) {
|
|
var disabled = _this.props.disabled;
|
|
if (!disabled) invoke_default()(_this.props, 'onClick', e, _this.props);
|
|
});
|
|
|
|
return _this;
|
|
}
|
|
|
|
createClass_default()(MenuItem, [{
|
|
key: "render",
|
|
value: function render() {
|
|
var _this$props = this.props,
|
|
active = _this$props.active,
|
|
children = _this$props.children,
|
|
className = _this$props.className,
|
|
color = _this$props.color,
|
|
content = _this$props.content,
|
|
disabled = _this$props.disabled,
|
|
fitted = _this$props.fitted,
|
|
header = _this$props.header,
|
|
icon = _this$props.icon,
|
|
link = _this$props.link,
|
|
name = _this$props.name,
|
|
onClick = _this$props.onClick,
|
|
position = _this$props.position;
|
|
var classes = classnames_default()(color, position, useKeyOnly(active, 'active'), useKeyOnly(disabled, 'disabled'), useKeyOnly(icon === true || icon && !(name || content), 'icon'), useKeyOnly(header, 'header'), useKeyOnly(link, 'link'), useKeyOrValueAndKey(fitted, 'fitted'), 'item', className);
|
|
var ElementType = lib_getElementType(MenuItem, this.props, function () {
|
|
if (onClick) return 'a';
|
|
});
|
|
var rest = lib_getUnhandledProps(MenuItem, this.props);
|
|
|
|
if (!childrenUtils_namespaceObject.isNil(children)) {
|
|
return react_default.a.createElement(ElementType, extends_default()({}, rest, {
|
|
className: classes,
|
|
onClick: this.handleClick
|
|
}), children);
|
|
}
|
|
|
|
return react_default.a.createElement(ElementType, extends_default()({}, rest, {
|
|
className: classes,
|
|
onClick: this.handleClick
|
|
}), elements_Icon_Icon.create(icon, {
|
|
autoGenerateKey: false
|
|
}), childrenUtils_namespaceObject.isNil(content) ? startCase_default()(name) : content);
|
|
}
|
|
}]);
|
|
|
|
return MenuItem;
|
|
}(react["Component"]);
|
|
|
|
defineProperty_default()(MenuItem_MenuItem, "handledProps", ["active", "as", "children", "className", "color", "content", "disabled", "fitted", "header", "icon", "index", "link", "name", "onClick", "position"]);
|
|
|
|
|
|
MenuItem_MenuItem.propTypes = false ? undefined : {};
|
|
MenuItem_MenuItem.create = createShorthandFactory(MenuItem_MenuItem, function (val) {
|
|
return {
|
|
content: val,
|
|
name: val
|
|
};
|
|
});
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/collections/Menu/MenuMenu.js
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* A menu can contain a sub menu.
|
|
*/
|
|
|
|
function MenuMenu(props) {
|
|
var children = props.children,
|
|
className = props.className,
|
|
content = props.content,
|
|
position = props.position;
|
|
var classes = classnames_default()(position, 'menu', className);
|
|
var rest = lib_getUnhandledProps(MenuMenu, props);
|
|
var ElementType = lib_getElementType(MenuMenu, props);
|
|
return react_default.a.createElement(ElementType, extends_default()({}, rest, {
|
|
className: classes
|
|
}), childrenUtils_namespaceObject.isNil(children) ? content : children);
|
|
}
|
|
|
|
MenuMenu.handledProps = ["as", "children", "className", "content", "position"];
|
|
MenuMenu.propTypes = false ? undefined : {};
|
|
/* harmony default export */ var Menu_MenuMenu = (MenuMenu);
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/collections/Menu/Menu.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* A menu displays grouped navigation actions.
|
|
* @see Dropdown
|
|
*/
|
|
|
|
var Menu_Menu =
|
|
/*#__PURE__*/
|
|
function (_Component) {
|
|
inherits_default()(Menu, _Component);
|
|
|
|
function Menu() {
|
|
var _getPrototypeOf2;
|
|
|
|
var _this;
|
|
|
|
classCallCheck_default()(this, Menu);
|
|
|
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
args[_key] = arguments[_key];
|
|
}
|
|
|
|
_this = possibleConstructorReturn_default()(this, (_getPrototypeOf2 = getPrototypeOf_default()(Menu)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "handleItemOverrides", function (predefinedProps) {
|
|
return {
|
|
onClick: function onClick(e, itemProps) {
|
|
var index = itemProps.index;
|
|
|
|
_this.trySetState({
|
|
activeIndex: index
|
|
});
|
|
|
|
invoke_default()(predefinedProps, 'onClick', e, itemProps);
|
|
|
|
invoke_default()(_this.props, 'onItemClick', e, itemProps);
|
|
}
|
|
};
|
|
});
|
|
|
|
return _this;
|
|
}
|
|
|
|
createClass_default()(Menu, [{
|
|
key: "renderItems",
|
|
value: function renderItems() {
|
|
var _this2 = this;
|
|
|
|
var items = this.props.items;
|
|
var activeIndex = this.state.activeIndex;
|
|
return map_default()(items, function (item, index) {
|
|
return MenuItem_MenuItem.create(item, {
|
|
defaultProps: {
|
|
active: parseInt(activeIndex, 10) === index,
|
|
index: index
|
|
},
|
|
overrideProps: _this2.handleItemOverrides
|
|
});
|
|
});
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function render() {
|
|
var _this$props = this.props,
|
|
attached = _this$props.attached,
|
|
borderless = _this$props.borderless,
|
|
children = _this$props.children,
|
|
className = _this$props.className,
|
|
color = _this$props.color,
|
|
compact = _this$props.compact,
|
|
fixed = _this$props.fixed,
|
|
floated = _this$props.floated,
|
|
fluid = _this$props.fluid,
|
|
icon = _this$props.icon,
|
|
inverted = _this$props.inverted,
|
|
pagination = _this$props.pagination,
|
|
pointing = _this$props.pointing,
|
|
secondary = _this$props.secondary,
|
|
size = _this$props.size,
|
|
stackable = _this$props.stackable,
|
|
tabular = _this$props.tabular,
|
|
text = _this$props.text,
|
|
vertical = _this$props.vertical,
|
|
widths = _this$props.widths;
|
|
var classes = classnames_default()('ui', color, size, useKeyOnly(borderless, 'borderless'), useKeyOnly(compact, 'compact'), useKeyOnly(fluid, 'fluid'), useKeyOnly(inverted, 'inverted'), useKeyOnly(pagination, 'pagination'), useKeyOnly(pointing, 'pointing'), useKeyOnly(secondary, 'secondary'), useKeyOnly(stackable, 'stackable'), useKeyOnly(text, 'text'), useKeyOnly(vertical, 'vertical'), useKeyOrValueAndKey(attached, 'attached'), useKeyOrValueAndKey(floated, 'floated'), useKeyOrValueAndKey(icon, 'icon'), useKeyOrValueAndKey(tabular, 'tabular'), useValueAndKey(fixed, 'fixed'), classNameBuilders_useWidthProp(widths, 'item'), className, 'menu');
|
|
var rest = lib_getUnhandledProps(Menu, this.props);
|
|
var ElementType = lib_getElementType(Menu, this.props);
|
|
return react_default.a.createElement(ElementType, extends_default()({}, rest, {
|
|
className: classes
|
|
}), childrenUtils_namespaceObject.isNil(children) ? this.renderItems() : children);
|
|
}
|
|
}]);
|
|
|
|
return Menu;
|
|
}(AutoControlledComponent_AutoControlledComponent);
|
|
|
|
defineProperty_default()(Menu_Menu, "autoControlledProps", ['activeIndex']);
|
|
|
|
defineProperty_default()(Menu_Menu, "Header", Menu_MenuHeader);
|
|
|
|
defineProperty_default()(Menu_Menu, "Item", MenuItem_MenuItem);
|
|
|
|
defineProperty_default()(Menu_Menu, "Menu", Menu_MenuMenu);
|
|
|
|
defineProperty_default()(Menu_Menu, "handledProps", ["activeIndex", "as", "attached", "borderless", "children", "className", "color", "compact", "defaultActiveIndex", "fixed", "floated", "fluid", "icon", "inverted", "items", "onItemClick", "pagination", "pointing", "secondary", "size", "stackable", "tabular", "text", "vertical", "widths"]);
|
|
|
|
Menu_Menu.propTypes = false ? undefined : {};
|
|
Menu_Menu.create = createShorthandFactory(Menu_Menu, function (items) {
|
|
return {
|
|
items: items
|
|
};
|
|
});
|
|
/* harmony default export */ var collections_Menu_Menu = (Menu_Menu);
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/elements/Segment/SegmentGroup.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* A group of segments can be formatted to appear together.
|
|
*/
|
|
|
|
function SegmentGroup(props) {
|
|
var children = props.children,
|
|
className = props.className,
|
|
compact = props.compact,
|
|
content = props.content,
|
|
horizontal = props.horizontal,
|
|
piled = props.piled,
|
|
raised = props.raised,
|
|
size = props.size,
|
|
stacked = props.stacked;
|
|
var classes = classnames_default()('ui', size, useKeyOnly(compact, 'compact'), useKeyOnly(horizontal, 'horizontal'), useKeyOnly(piled, 'piled'), useKeyOnly(raised, 'raised'), useKeyOnly(stacked, 'stacked'), 'segments', className);
|
|
var rest = lib_getUnhandledProps(SegmentGroup, props);
|
|
var ElementType = lib_getElementType(SegmentGroup, props);
|
|
return react_default.a.createElement(ElementType, extends_default()({}, rest, {
|
|
className: classes
|
|
}), childrenUtils_namespaceObject.isNil(children) ? content : children);
|
|
}
|
|
|
|
SegmentGroup.handledProps = ["as", "children", "className", "compact", "content", "horizontal", "piled", "raised", "size", "stacked"];
|
|
SegmentGroup.propTypes = false ? undefined : {};
|
|
/* harmony default export */ var Segment_SegmentGroup = (SegmentGroup);
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/elements/Segment/SegmentInline.js
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* A placeholder segment can be inline.
|
|
*/
|
|
|
|
function SegmentInline(props) {
|
|
var children = props.children,
|
|
className = props.className,
|
|
content = props.content;
|
|
var classes = classnames_default()('inline', className);
|
|
var rest = lib_getUnhandledProps(SegmentInline, props);
|
|
var ElementType = lib_getElementType(SegmentInline, props);
|
|
return react_default.a.createElement(ElementType, extends_default()({}, rest, {
|
|
className: classes
|
|
}), childrenUtils_namespaceObject.isNil(children) ? content : children);
|
|
}
|
|
|
|
SegmentInline.handledProps = ["as", "children", "className", "content"];
|
|
SegmentInline.propTypes = false ? undefined : {};
|
|
/* harmony default export */ var Segment_SegmentInline = (SegmentInline);
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/elements/Segment/Segment.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* A segment is used to create a grouping of related content.
|
|
*/
|
|
|
|
function Segment(props) {
|
|
var attached = props.attached,
|
|
basic = props.basic,
|
|
children = props.children,
|
|
circular = props.circular,
|
|
className = props.className,
|
|
clearing = props.clearing,
|
|
color = props.color,
|
|
compact = props.compact,
|
|
content = props.content,
|
|
disabled = props.disabled,
|
|
floated = props.floated,
|
|
inverted = props.inverted,
|
|
loading = props.loading,
|
|
placeholder = props.placeholder,
|
|
padded = props.padded,
|
|
piled = props.piled,
|
|
raised = props.raised,
|
|
secondary = props.secondary,
|
|
size = props.size,
|
|
stacked = props.stacked,
|
|
tertiary = props.tertiary,
|
|
textAlign = props.textAlign,
|
|
vertical = props.vertical;
|
|
var classes = classnames_default()('ui', color, size, useKeyOnly(basic, 'basic'), useKeyOnly(circular, 'circular'), useKeyOnly(clearing, 'clearing'), useKeyOnly(compact, 'compact'), useKeyOnly(disabled, 'disabled'), useKeyOnly(inverted, 'inverted'), useKeyOnly(loading, 'loading'), useKeyOnly(placeholder, 'placeholder'), useKeyOnly(piled, 'piled'), useKeyOnly(raised, 'raised'), useKeyOnly(secondary, 'secondary'), useKeyOnly(stacked, 'stacked'), useKeyOnly(tertiary, 'tertiary'), useKeyOnly(vertical, 'vertical'), useKeyOrValueAndKey(attached, 'attached'), useKeyOrValueAndKey(padded, 'padded'), useTextAlignProp(textAlign), useValueAndKey(floated, 'floated'), 'segment', className);
|
|
var rest = lib_getUnhandledProps(Segment, props);
|
|
var ElementType = lib_getElementType(Segment, props);
|
|
return react_default.a.createElement(ElementType, extends_default()({}, rest, {
|
|
className: classes
|
|
}), childrenUtils_namespaceObject.isNil(children) ? content : children);
|
|
}
|
|
|
|
Segment.handledProps = ["as", "attached", "basic", "children", "circular", "className", "clearing", "color", "compact", "content", "disabled", "floated", "inverted", "loading", "padded", "piled", "placeholder", "raised", "secondary", "size", "stacked", "tertiary", "textAlign", "vertical"];
|
|
Segment.Group = Segment_SegmentGroup;
|
|
Segment.Inline = Segment_SegmentInline;
|
|
Segment.propTypes = false ? undefined : {};
|
|
/* harmony default export */ var Segment_Segment = (Segment);
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/modules/Tab/TabPane.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* A tab pane holds the content of a tab.
|
|
*/
|
|
|
|
function TabPane(props) {
|
|
var active = props.active,
|
|
children = props.children,
|
|
className = props.className,
|
|
content = props.content,
|
|
loading = props.loading;
|
|
var classes = classnames_default()(useKeyOnly(active, 'active'), useKeyOnly(loading, 'loading'), 'tab', className);
|
|
var rest = lib_getUnhandledProps(TabPane, props);
|
|
var ElementType = lib_getElementType(TabPane, props);
|
|
var calculatedDefaultProps = {};
|
|
|
|
if (ElementType === Segment_Segment) {
|
|
calculatedDefaultProps.attached = 'bottom';
|
|
}
|
|
|
|
return react_default.a.createElement(ElementType, extends_default()({}, calculatedDefaultProps, rest, {
|
|
className: classes
|
|
}), childrenUtils_namespaceObject.isNil(children) ? content : children);
|
|
}
|
|
|
|
TabPane.handledProps = ["active", "as", "children", "className", "content", "loading"];
|
|
TabPane.defaultProps = {
|
|
as: Segment_Segment,
|
|
active: true
|
|
};
|
|
TabPane.propTypes = false ? undefined : {};
|
|
TabPane.create = createShorthandFactory(TabPane, function (content) {
|
|
return {
|
|
content: content
|
|
};
|
|
});
|
|
/* harmony default export */ var Tab_TabPane = (TabPane);
|
|
// CONCATENATED MODULE: ./node_modules/semantic-ui-react/dist/es/modules/Tab/Tab.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* A Tab is a hidden section of content activated by a Menu.
|
|
* @see Menu
|
|
* @see Segment
|
|
*/
|
|
|
|
var Tab_Tab =
|
|
/*#__PURE__*/
|
|
function (_Component) {
|
|
inherits_default()(Tab, _Component);
|
|
|
|
function Tab() {
|
|
var _getPrototypeOf2;
|
|
|
|
var _this;
|
|
|
|
classCallCheck_default()(this, Tab);
|
|
|
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
args[_key] = arguments[_key];
|
|
}
|
|
|
|
_this = possibleConstructorReturn_default()(this, (_getPrototypeOf2 = getPrototypeOf_default()(Tab)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
|
|
defineProperty_default()(assertThisInitialized_default()(_this), "handleItemClick", function (e, _ref) {
|
|
var index = _ref.index;
|
|
|
|
invoke_default()(_this.props, 'onTabChange', e, objectSpread_default()({}, _this.props, {
|
|
activeIndex: index
|
|
}));
|
|
|
|
_this.trySetState({
|
|
activeIndex: index
|
|
});
|
|
});
|
|
|
|
return _this;
|
|
}
|
|
|
|
createClass_default()(Tab, [{
|
|
key: "getInitialAutoControlledState",
|
|
value: function getInitialAutoControlledState() {
|
|
return {
|
|
activeIndex: 0
|
|
};
|
|
}
|
|
}, {
|
|
key: "renderItems",
|
|
value: function renderItems() {
|
|
var _this$props = this.props,
|
|
panes = _this$props.panes,
|
|
renderActiveOnly = _this$props.renderActiveOnly;
|
|
var activeIndex = this.state.activeIndex;
|
|
if (renderActiveOnly) return invoke_default()(get_default()(panes, "[".concat(activeIndex, "]")), 'render', this.props);
|
|
return map_default()(panes, function (_ref2, index) {
|
|
var pane = _ref2.pane;
|
|
return Tab_TabPane.create(pane, {
|
|
overrideProps: {
|
|
active: index === activeIndex
|
|
}
|
|
});
|
|
});
|
|
}
|
|
}, {
|
|
key: "renderMenu",
|
|
value: function renderMenu() {
|
|
var _this$props2 = this.props,
|
|
menu = _this$props2.menu,
|
|
panes = _this$props2.panes,
|
|
menuPosition = _this$props2.menuPosition;
|
|
var activeIndex = this.state.activeIndex;
|
|
|
|
if (menu.tabular === true && menuPosition === 'right') {
|
|
menu.tabular = 'right';
|
|
}
|
|
|
|
return collections_Menu_Menu.create(menu, {
|
|
autoGenerateKey: false,
|
|
overrideProps: {
|
|
items: map_default()(panes, 'menuItem'),
|
|
onItemClick: this.handleItemClick,
|
|
activeIndex: activeIndex
|
|
}
|
|
});
|
|
}
|
|
}, {
|
|
key: "renderVertical",
|
|
value: function renderVertical(menu) {
|
|
var _this$props3 = this.props,
|
|
grid = _this$props3.grid,
|
|
menuPosition = _this$props3.menuPosition;
|
|
|
|
var paneWidth = grid.paneWidth,
|
|
tabWidth = grid.tabWidth,
|
|
gridProps = objectWithoutProperties_default()(grid, ["paneWidth", "tabWidth"]);
|
|
|
|
var position = menuPosition || menu.props.tabular === 'right' && 'right' || 'left';
|
|
return react_default.a.createElement(Grid_Grid, gridProps, position === 'left' && Grid_GridColumn.create({
|
|
width: tabWidth,
|
|
children: menu
|
|
}, {
|
|
autoGenerateKey: false
|
|
}), Grid_GridColumn.create({
|
|
width: paneWidth,
|
|
children: this.renderItems(),
|
|
stretched: true
|
|
}, {
|
|
autoGenerateKey: false
|
|
}), position === 'right' && Grid_GridColumn.create({
|
|
width: tabWidth,
|
|
children: menu
|
|
}, {
|
|
autoGenerateKey: false
|
|
}));
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function render() {
|
|
var menu = this.renderMenu();
|
|
var rest = lib_getUnhandledProps(Tab, this.props);
|
|
var ElementType = lib_getElementType(Tab, this.props);
|
|
|
|
if (menu.props.vertical) {
|
|
return react_default.a.createElement(ElementType, rest, this.renderVertical(menu));
|
|
}
|
|
|
|
return react_default.a.createElement(ElementType, rest, menu.props.attached !== 'bottom' && menu, this.renderItems(), menu.props.attached === 'bottom' && menu);
|
|
}
|
|
}]);
|
|
|
|
return Tab;
|
|
}(AutoControlledComponent_AutoControlledComponent);
|
|
|
|
defineProperty_default()(Tab_Tab, "autoControlledProps", ['activeIndex']);
|
|
|
|
defineProperty_default()(Tab_Tab, "defaultProps", {
|
|
grid: {
|
|
paneWidth: 12,
|
|
tabWidth: 4
|
|
},
|
|
menu: {
|
|
attached: true,
|
|
tabular: true
|
|
},
|
|
renderActiveOnly: true
|
|
});
|
|
|
|
defineProperty_default()(Tab_Tab, "Pane", Tab_TabPane);
|
|
|
|
defineProperty_default()(Tab_Tab, "handledProps", ["activeIndex", "as", "defaultActiveIndex", "grid", "menu", "menuPosition", "onTabChange", "panes", "renderActiveOnly"]);
|
|
|
|
Tab_Tab.propTypes = false ? undefined : {};
|
|
/* harmony default export */ var modules_Tab_Tab = (Tab_Tab);
|
|
// EXTERNAL MODULE: ./frontend/cookies.js
|
|
var cookies = __webpack_require__(132);
|
|
|
|
// CONCATENATED MODULE: ./frontend/components/Login.jsx
|
|
function Login_typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { Login_typeof = function _typeof(obj) { return typeof obj; }; } else { Login_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return Login_typeof(obj); }
|
|
|
|
function Login_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
|
|
function Login_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); } }
|
|
|
|
function Login_createClass(Constructor, protoProps, staticProps) { if (protoProps) Login_defineProperties(Constructor.prototype, protoProps); if (staticProps) Login_defineProperties(Constructor, staticProps); return Constructor; }
|
|
|
|
function Login_possibleConstructorReturn(self, call) { if (call && (Login_typeof(call) === "object" || typeof call === "function")) { return call; } return Login_assertThisInitialized(self); }
|
|
|
|
function Login_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
|
|
function Login_getPrototypeOf(o) { Login_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return Login_getPrototypeOf(o); }
|
|
|
|
function Login_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) Login_setPrototypeOf(subClass, superClass); }
|
|
|
|
function Login_setPrototypeOf(o, p) { Login_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return Login_setPrototypeOf(o, p); }
|
|
|
|
|
|
|
|
|
|
var Login_Login =
|
|
/*#__PURE__*/
|
|
function (_React$Component) {
|
|
Login_inherits(Login, _React$Component);
|
|
|
|
function Login(props) {
|
|
var _this;
|
|
|
|
Login_classCallCheck(this, Login);
|
|
|
|
_this = Login_possibleConstructorReturn(this, Login_getPrototypeOf(Login).call(this, props));
|
|
_this.state = {
|
|
code: null
|
|
};
|
|
return _this;
|
|
}
|
|
|
|
Login_createClass(Login, [{
|
|
key: "onSubmit",
|
|
value: function onSubmit(e) {
|
|
e.preventDefault();
|
|
fetch("/login", {
|
|
method: "POST",
|
|
body: JSON.stringify({
|
|
code: this.state.code
|
|
}),
|
|
headers: {
|
|
'Content-Type': 'application/json'
|
|
}
|
|
}).then(function (r) {
|
|
return r.json();
|
|
}).then(function (json) {
|
|
if (json.success) {
|
|
Object(cookies["setCookie"])('x-user-token', json.token);
|
|
document.location = "/app";
|
|
} else {
|
|
alert("Wrong passcode.");
|
|
}
|
|
});
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function render() {
|
|
var _this2 = this;
|
|
|
|
return react_default.a.createElement("div", {
|
|
className: "ui container",
|
|
style: {
|
|
marginTop: 20
|
|
}
|
|
}, react_default.a.createElement("h2", null, "Sphinx Login"), react_default.a.createElement("form", {
|
|
className: "ui form",
|
|
style: {
|
|
maxWidth: 300
|
|
},
|
|
onSubmit: this.onSubmit.bind(this)
|
|
}, react_default.a.createElement("input", {
|
|
type: "password",
|
|
name: "code",
|
|
onChange: function onChange(e) {
|
|
return _this2.setState({
|
|
code: e.target.value
|
|
});
|
|
},
|
|
value: this.state.code,
|
|
style: {
|
|
marginBottom: 10
|
|
},
|
|
placeholder: "Enter passcode"
|
|
}), react_default.a.createElement("input", {
|
|
className: "ui button",
|
|
type: "submit",
|
|
value: "Login"
|
|
})));
|
|
}
|
|
}]);
|
|
|
|
return Login;
|
|
}(react_default.a.Component);
|
|
|
|
/* harmony default export */ var components_Login = (Login_Login);
|
|
// EXTERNAL MODULE: ./node_modules/date-fns/is_valid/index.js
|
|
var is_valid = __webpack_require__(133);
|
|
var is_valid_default = /*#__PURE__*/__webpack_require__.n(is_valid);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/format-string-by-pattern/dist/format-string-by-pattern.es5.js
|
|
function format_string_by_pattern_es5_e(e,r){if(!r)return r;var t=String(r).replace(/[^\da-zA-Z\n|]/g,""),l=e.split(/[^\da-zA-Z\n|]/g).filter(Boolean).map(function(e){return e.length}),n=e.split(/[\da-zA-Z\n|]/g).filter(Boolean),u=n[0];return e.startsWith(u)?n.reduce(function(e,r,t){var n=l[t],u=e.value.slice(0,n),a=e.value.slice(n);return{result:u?e.result.concat(r,u):e.result,value:a}},{result:"",value:t}).result.slice(0,e.length):l.reduce(function(e,r,t){var l=n[t]||"",u="$1"+l+"$2",a=r+e.prevSlice+e.prevSeparator.length,i=new RegExp("(.{"+a+"})(.)");return{prevSeparator:l,prevSlice:a,value:e.value.replace(i,u)}},{prevSeparator:"",prevSlice:0,value:t}).value.slice(0,e.length)}/* harmony default export */ var format_string_by_pattern_es5 = (function(r,t){return void 0===t?function(t){return format_string_by_pattern_es5_e(r,t)}:format_string_by_pattern_es5_e(r,t)});
|
|
//# sourceMappingURL=format-string-by-pattern.es5.js.map
|
|
|
|
// EXTERNAL MODULE: ./node_modules/react-fast-compare/index.js
|
|
var react_fast_compare = __webpack_require__(281);
|
|
var react_fast_compare_default = /*#__PURE__*/__webpack_require__.n(react_fast_compare);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/date-fns/format/index.js
|
|
var date_fns_format = __webpack_require__(282);
|
|
var format_default = /*#__PURE__*/__webpack_require__.n(date_fns_format);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/date-fns/is_before/index.js
|
|
var is_before = __webpack_require__(189);
|
|
var is_before_default = /*#__PURE__*/__webpack_require__.n(is_before);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/date-fns/start_of_day/index.js
|
|
var start_of_day = __webpack_require__(97);
|
|
var start_of_day_default = /*#__PURE__*/__webpack_require__.n(start_of_day);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/date-fns/parse/index.js
|
|
var parse = __webpack_require__(42);
|
|
var parse_default = /*#__PURE__*/__webpack_require__.n(parse);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/dayzed/dist/dayzed.esm.js
|
|
|
|
|
|
|
|
function _extends() {
|
|
_extends = Object.assign || function (target) {
|
|
for (var i = 1; i < arguments.length; i++) {
|
|
var source = arguments[i];
|
|
|
|
for (var key in source) {
|
|
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
target[key] = source[key];
|
|
}
|
|
}
|
|
}
|
|
|
|
return target;
|
|
};
|
|
|
|
return _extends.apply(this, arguments);
|
|
}
|
|
|
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
if (source == null) return {};
|
|
var target = {};
|
|
var sourceKeys = Object.keys(source);
|
|
var key, i;
|
|
|
|
for (i = 0; i < sourceKeys.length; i++) {
|
|
key = sourceKeys[i];
|
|
if (excluded.indexOf(key) >= 0) continue;
|
|
target[key] = source[key];
|
|
}
|
|
|
|
return target;
|
|
}
|
|
|
|
function toInteger(dirtyNumber) {
|
|
if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {
|
|
return NaN;
|
|
}
|
|
|
|
var number = Number(dirtyNumber);
|
|
|
|
if (isNaN(number)) {
|
|
return number;
|
|
}
|
|
|
|
return number < 0 ? Math.ceil(number) : Math.floor(number);
|
|
}
|
|
|
|
/**
|
|
* @name toDate
|
|
* @category Common Helpers
|
|
* @summary Convert the given argument to an instance of Date.
|
|
*
|
|
* @description
|
|
* Convert the given argument to an instance of Date.
|
|
*
|
|
* If the argument is an instance of Date, the function returns its clone.
|
|
*
|
|
* If the argument is a number, it is treated as a timestamp.
|
|
*
|
|
* If the argument is none of the above, the function returns Invalid Date.
|
|
*
|
|
* **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.
|
|
*
|
|
* @param {Date|Number} argument - the value to convert
|
|
* @returns {Date} the parsed date in the local time zone
|
|
* @throws {TypeError} 1 argument required
|
|
*
|
|
* @example
|
|
* // Clone the date:
|
|
* const result = toDate(new Date(2014, 1, 11, 11, 30, 30))
|
|
* //=> Tue Feb 11 2014 11:30:30
|
|
*
|
|
* @example
|
|
* // Convert the timestamp to date:
|
|
* const result = toDate(1392098430000)
|
|
* //=> Tue Feb 11 2014 11:30:30
|
|
*/
|
|
function toDate(argument) {
|
|
if (arguments.length < 1) {
|
|
throw new TypeError('1 argument required, but only ' + arguments.length + ' present');
|
|
}
|
|
|
|
var argStr = Object.prototype.toString.call(argument); // Clone the date
|
|
|
|
if (argument instanceof Date || typeof argument === 'object' && argStr === '[object Date]') {
|
|
// Prevent the date to lose the milliseconds when passed to new Date() in IE10
|
|
return new Date(argument.getTime());
|
|
} else if (typeof argument === 'number' || argStr === '[object Number]') {
|
|
return new Date(argument);
|
|
} else {
|
|
if ((typeof argument === 'string' || argStr === '[object String]') && typeof console !== 'undefined') {
|
|
// eslint-disable-next-line no-console
|
|
console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as arguments. Please use `parseISO` to parse strings. See: https://git.io/fjule"); // eslint-disable-next-line no-console
|
|
|
|
console.warn(new Error().stack);
|
|
}
|
|
|
|
return new Date(NaN);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* @name addDays
|
|
* @category Day Helpers
|
|
* @summary Add the specified number of days to the given date.
|
|
*
|
|
* @description
|
|
* Add the specified number of days to the given date.
|
|
*
|
|
* ### v2.0.0 breaking changes:
|
|
*
|
|
* - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).
|
|
*
|
|
* @param {Date|Number} date - the date to be changed
|
|
* @param {Number} amount - the amount of days to be added
|
|
* @returns {Date} the new date with the days added
|
|
* @throws {TypeError} 2 arguments required
|
|
*
|
|
* @example
|
|
* // Add 10 days to 1 September 2014:
|
|
* var result = addDays(new Date(2014, 8, 1), 10)
|
|
* //=> Thu Sep 11 2014 00:00:00
|
|
*/
|
|
|
|
function addDays(dirtyDate, dirtyAmount) {
|
|
if (arguments.length < 2) {
|
|
throw new TypeError('2 arguments required, but only ' + arguments.length + ' present');
|
|
}
|
|
|
|
var date = toDate(dirtyDate);
|
|
var amount = toInteger(dirtyAmount);
|
|
date.setDate(date.getDate() + amount);
|
|
return date;
|
|
}
|
|
|
|
/**
|
|
* @name isBefore
|
|
* @category Common Helpers
|
|
* @summary Is the first date before the second one?
|
|
*
|
|
* @description
|
|
* Is the first date before the second one?
|
|
*
|
|
* ### v2.0.0 breaking changes:
|
|
*
|
|
* - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).
|
|
*
|
|
* @param {Date|Number} date - the date that should be before the other one to return true
|
|
* @param {Date|Number} dateToCompare - the date to compare with
|
|
* @returns {Boolean} the first date is before the second date
|
|
* @throws {TypeError} 2 arguments required
|
|
*
|
|
* @example
|
|
* // Is 10 July 1989 before 11 February 1987?
|
|
* var result = isBefore(new Date(1989, 6, 10), new Date(1987, 1, 11))
|
|
* //=> false
|
|
*/
|
|
|
|
function isBefore(dirtyDate, dirtyDateToCompare) {
|
|
if (arguments.length < 2) {
|
|
throw new TypeError('2 arguments required, but only ' + arguments.length + ' present');
|
|
}
|
|
|
|
var date = toDate(dirtyDate);
|
|
var dateToCompare = toDate(dirtyDateToCompare);
|
|
return date.getTime() < dateToCompare.getTime();
|
|
}
|
|
|
|
/**
|
|
* @name startOfDay
|
|
* @category Day Helpers
|
|
* @summary Return the start of a day for the given date.
|
|
*
|
|
* @description
|
|
* Return the start of a day for the given date.
|
|
* The result will be in the local timezone.
|
|
*
|
|
* ### v2.0.0 breaking changes:
|
|
*
|
|
* - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).
|
|
*
|
|
* @param {Date|Number} date - the original date
|
|
* @returns {Date} the start of a day
|
|
* @throws {TypeError} 1 argument required
|
|
*
|
|
* @example
|
|
* // The start of a day for 2 September 2014 11:55:00:
|
|
* var result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))
|
|
* //=> Tue Sep 02 2014 00:00:00
|
|
*/
|
|
|
|
function startOfDay(dirtyDate) {
|
|
if (arguments.length < 1) {
|
|
throw new TypeError('1 argument required, but only ' + arguments.length + ' present');
|
|
}
|
|
|
|
var date = toDate(dirtyDate);
|
|
date.setHours(0, 0, 0, 0);
|
|
return date;
|
|
}
|
|
|
|
/**
|
|
* @name isSameDay
|
|
* @category Day Helpers
|
|
* @summary Are the given dates in the same day?
|
|
*
|
|
* @description
|
|
* Are the given dates in the same day?
|
|
*
|
|
* ### v2.0.0 breaking changes:
|
|
*
|
|
* - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).
|
|
*
|
|
* @param {Date|Number} dateLeft - the first date to check
|
|
* @param {Date|Number} dateRight - the second date to check
|
|
* @returns {Boolean} the dates are in the same day
|
|
* @throws {TypeError} 2 arguments required
|
|
*
|
|
* @example
|
|
* // Are 4 September 06:00:00 and 4 September 18:00:00 in the same day?
|
|
* var result = isSameDay(new Date(2014, 8, 4, 6, 0), new Date(2014, 8, 4, 18, 0))
|
|
* //=> true
|
|
*/
|
|
|
|
function isSameDay(dirtyDateLeft, dirtyDateRight) {
|
|
if (arguments.length < 2) {
|
|
throw new TypeError('2 arguments required, but only ' + arguments.length + ' present');
|
|
}
|
|
|
|
var dateLeftStartOfDay = startOfDay(dirtyDateLeft);
|
|
var dateRightStartOfDay = startOfDay(dirtyDateRight);
|
|
return dateLeftStartOfDay.getTime() === dateRightStartOfDay.getTime();
|
|
}
|
|
|
|
/**
|
|
* @name isToday
|
|
* @category Day Helpers
|
|
* @summary Is the given date today?
|
|
* @pure false
|
|
*
|
|
* @description
|
|
* Is the given date today?
|
|
*
|
|
* > ⚠️ Please note that this function is not present in the FP submodule as
|
|
* > it uses `Date.now()` internally hence impure and can't be safely curried.
|
|
*
|
|
* ### v2.0.0 breaking changes:
|
|
*
|
|
* - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).
|
|
*
|
|
* @param {Date|Number} date - the date to check
|
|
* @returns {Boolean} the date is today
|
|
* @throws {TypeError} 1 argument required
|
|
*
|
|
* @example
|
|
* // If today is 6 October 2014, is 6 October 14:00:00 today?
|
|
* var result = isToday(new Date(2014, 9, 6, 14, 0))
|
|
* //=> true
|
|
*/
|
|
|
|
function isToday(dirtyDate) {
|
|
if (arguments.length < 1) {
|
|
throw new TypeError('1 argument required, but only ' + arguments.length + ' present');
|
|
}
|
|
|
|
return isSameDay(dirtyDate, Date.now());
|
|
}
|
|
|
|
/**
|
|
* @name differenceInCalendarMonths
|
|
* @category Month Helpers
|
|
* @summary Get the number of calendar months between the given dates.
|
|
*
|
|
* @description
|
|
* Get the number of calendar months between the given dates.
|
|
*
|
|
* ### v2.0.0 breaking changes:
|
|
*
|
|
* - [Changes that are common for the whole library](https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#Common-Changes).
|
|
*
|
|
* @param {Date|Number} dateLeft - the later date
|
|
* @param {Date|Number} dateRight - the earlier date
|
|
* @returns {Number} the number of calendar months
|
|
* @throws {TypeError} 2 arguments required
|
|
*
|
|
* @example
|
|
* // How many calendar months are between 31 January 2014 and 1 September 2014?
|
|
* var result = differenceInCalendarMonths(
|
|
* new Date(2014, 8, 1),
|
|
* new Date(2014, 0, 31)
|
|
* )
|
|
* //=> 8
|
|
*/
|
|
|
|
function differenceInCalendarMonths(dirtyDateLeft, dirtyDateRight) {
|
|
if (arguments.length < 2) {
|
|
throw new TypeError('2 arguments required, but only ' + arguments.length + ' present');
|
|
}
|
|
|
|
var dateLeft = toDate(dirtyDateLeft);
|
|
var dateRight = toDate(dirtyDateRight);
|
|
var yearDiff = dateLeft.getFullYear() - dateRight.getFullYear();
|
|
var monthDiff = dateLeft.getMonth() - dateRight.getMonth();
|
|
return yearDiff * 12 + monthDiff;
|
|
}
|
|
|
|
/**
|
|
* This is intended to be used to compose event handlers
|
|
* They are executed in order until one of them calls
|
|
* `event.preventDefault()`. Not sure this is the best
|
|
* way to do this, but it seems legit...
|
|
* @param {Function} fns the event hanlder functions
|
|
* @return {Function} the event handler to add to an element
|
|
*/
|
|
|
|
function composeEventHandlers() {
|
|
for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
fns[_key] = arguments[_key];
|
|
}
|
|
|
|
return function (event) {
|
|
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
args[_key2 - 1] = arguments[_key2];
|
|
}
|
|
|
|
return fns.some(function (fn) {
|
|
fn && fn.apply(void 0, [event].concat(args));
|
|
return event.defaultPrevented;
|
|
});
|
|
};
|
|
}
|
|
/**
|
|
* Throws a helpful error message for required properties. Useful
|
|
* to be used as a default in destructuring or object params.
|
|
* @param {String} fnName the function name
|
|
* @param {String} propName the prop name
|
|
*/
|
|
|
|
function requiredProp(fnName, propName) {
|
|
throw new Error("The property \"" + propName + "\" is required in \"" + fnName + "\"");
|
|
}
|
|
/**
|
|
* Takes an argument and if it's an array, returns the first item in the array
|
|
* otherwise returns the argument.
|
|
* @param {*} arg the maybe-array
|
|
* @return {*} the arg or it's first item
|
|
*/
|
|
|
|
function unwrapChildrenForPreact(arg) {
|
|
arg = Array.isArray(arg) ?
|
|
/* istanbul ignore next (preact) */
|
|
arg[0] : arg;
|
|
return arg || dayzed_esm_noop;
|
|
}
|
|
|
|
function dayzed_esm_noop() {}
|
|
/**
|
|
* Takes a calendars array and figures out the number of months to subtract
|
|
* based on the current offset and the minDate allowed.
|
|
* @param {Object} param The param object
|
|
* @param {Array} param.calendars The calendars array created by the getCalendars function
|
|
* @param {Number} param.offset The num of months to be subtracted
|
|
* @param {Date} param.minDate The earliest date we are allow to subtract back to
|
|
* @returns {Number} The number of months to subtract
|
|
*/
|
|
|
|
|
|
function subtractMonth(_ref) {
|
|
var calendars = _ref.calendars,
|
|
offset = _ref.offset,
|
|
minDate = _ref.minDate;
|
|
|
|
if (offset > 1 && minDate) {
|
|
var firstDayOfMonth = calendars[0].firstDayOfMonth;
|
|
var diffInMonths = differenceInCalendarMonths(firstDayOfMonth, minDate);
|
|
|
|
if (diffInMonths < offset) {
|
|
offset = diffInMonths;
|
|
}
|
|
}
|
|
|
|
return offset;
|
|
}
|
|
/**
|
|
* Takes a calendars array and figures out the number of months to add
|
|
* based on the current offset and the maxDate allowed.
|
|
* @param {Object} param The param object
|
|
* @param {Array} param.calendars The calendars array created by the getCalendars function
|
|
* @param {Number} param.offset The num of months to be added
|
|
* @param {Date} param.maxDate The furthest date we are allow to add forward to
|
|
* @returns {Number} The number of months to add
|
|
*/
|
|
|
|
function addMonth(_ref2) {
|
|
var calendars = _ref2.calendars,
|
|
offset = _ref2.offset,
|
|
maxDate = _ref2.maxDate;
|
|
|
|
if (offset > 1 && maxDate) {
|
|
var lastDayOfMonth = calendars[calendars.length - 1].lastDayOfMonth;
|
|
var diffInMonths = differenceInCalendarMonths(maxDate, lastDayOfMonth);
|
|
|
|
if (diffInMonths < offset) {
|
|
offset = diffInMonths;
|
|
}
|
|
}
|
|
|
|
return offset;
|
|
}
|
|
/**
|
|
* Takes a calendars array and figures out if the back button should be
|
|
* disabled based on the minDate allowed.
|
|
* @param {Object} param The param object
|
|
* @param {Array} param.calendars The calendars array created by the getCalendars function
|
|
* @param {Date} param.minDate The earliest date available
|
|
* @returns {Boolean} Whether the back button should be disabled.
|
|
*/
|
|
|
|
function isBackDisabled(_ref3) {
|
|
var calendars = _ref3.calendars,
|
|
minDate = _ref3.minDate;
|
|
|
|
if (!minDate) {
|
|
return false;
|
|
}
|
|
|
|
var firstDayOfMonth = calendars[0].firstDayOfMonth;
|
|
var firstDayOfMonthMinusOne = addDays(firstDayOfMonth, -1);
|
|
|
|
if (isBefore(firstDayOfMonthMinusOne, minDate)) {
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
}
|
|
/**
|
|
* Takes a calendars array and figures out if the forward button should be
|
|
* disabled based on the maxDate allowed.
|
|
* @param {Object} param The param object
|
|
* @param {Array} param.calendars The calendars array created by the getCalendars function
|
|
* @param {Date} param.maxDate The furthest date available
|
|
* @returns {Boolean} Whether the forward button should be disabled.
|
|
*/
|
|
|
|
function isForwardDisabled(_ref4) {
|
|
var calendars = _ref4.calendars,
|
|
maxDate = _ref4.maxDate;
|
|
|
|
if (!maxDate) {
|
|
return false;
|
|
}
|
|
|
|
var lastDayOfMonth = calendars[calendars.length - 1].lastDayOfMonth;
|
|
var lastDayOfMonthPlusOne = addDays(lastDayOfMonth, 1);
|
|
|
|
if (isBefore(maxDate, lastDayOfMonthPlusOne)) {
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
}
|
|
/**
|
|
* Figures out the months data needed based off the number of monthsToDisplay
|
|
* and other options provided.
|
|
* @param {Object} param The param object
|
|
* @param {Date} param.date The date to start the calendar at
|
|
* @param {Array.<Date>} param.selected An array of dates currently selected
|
|
* @param {Number} param.monthsToDisplay The number of months to return in the calendar view
|
|
* @param {Number} param.offset The number of months to offset based off the param.date given
|
|
* @param {Date} param.minDate The earliest date available
|
|
* @param {Date} param.maxDate The furthest date available
|
|
* @param {Number} param.firstDayOfWeek First day of week, 0-6 (Sunday to Saturday)
|
|
* @param {Bool} param.showOutsideDays Flag to fill front and back weeks with dates from adjacent months
|
|
* @returns {Array.<Object>} An array of objects with month data
|
|
*/
|
|
|
|
function getCalendars(_ref5) {
|
|
var date = _ref5.date,
|
|
selected = _ref5.selected,
|
|
monthsToDisplay = _ref5.monthsToDisplay,
|
|
offset = _ref5.offset,
|
|
minDate = _ref5.minDate,
|
|
maxDate = _ref5.maxDate,
|
|
firstDayOfWeek = _ref5.firstDayOfWeek,
|
|
showOutsideDays = _ref5.showOutsideDays;
|
|
var months = [];
|
|
var startDate = getStartDate(date, minDate, maxDate);
|
|
|
|
for (var i = 0; i < monthsToDisplay; i++) {
|
|
var calendarDates = getMonths({
|
|
month: startDate.getMonth() + i + offset,
|
|
year: startDate.getFullYear(),
|
|
selectedDates: selected,
|
|
minDate: minDate,
|
|
maxDate: maxDate,
|
|
firstDayOfWeek: firstDayOfWeek,
|
|
showOutsideDays: showOutsideDays
|
|
});
|
|
months.push(calendarDates);
|
|
}
|
|
|
|
return months;
|
|
}
|
|
/**
|
|
* Figures out the actual start date based on
|
|
* the min and max dates available.
|
|
* @param {Date} date The we want to start the calendar at
|
|
* @param {Date} minDate The earliest date available to start at
|
|
* @param {Date} maxDate The latest date available to start at
|
|
* @returns {Date} The actual start date
|
|
*/
|
|
|
|
function getStartDate(date, minDate, maxDate) {
|
|
var startDate = startOfDay(date);
|
|
|
|
if (minDate) {
|
|
var minDateNormalized = startOfDay(minDate);
|
|
|
|
if (isBefore(startDate, minDateNormalized)) {
|
|
startDate = minDateNormalized;
|
|
}
|
|
}
|
|
|
|
if (maxDate) {
|
|
var maxDateNormalized = startOfDay(maxDate);
|
|
|
|
if (isBefore(maxDateNormalized, startDate)) {
|
|
startDate = maxDateNormalized;
|
|
}
|
|
}
|
|
|
|
return startDate;
|
|
}
|
|
/**
|
|
* Figures what week/day data to return for the given month
|
|
* and year. Adds flags to day data if found in the given selectedDates,
|
|
* if is selectable inside the given min and max dates, or is today.
|
|
* @param {Object} param The param object
|
|
* @param {Number} param.month The month to grab data for
|
|
* @param {Number} param.year The year to grab data for
|
|
* @param {Array.<Date>} sparam.electedDates An array of dates currently selected
|
|
* @param {Date} param.minDate The earliest date available
|
|
* @param {Date} param.maxDate The furthest date available
|
|
* @param {Number} param.firstDayOfWeek First day of week, 0-6 (Sunday to Saturday)
|
|
* @param {Bool} param.showOutsideDays Flag to fill front and back weeks with dates from adjacent months
|
|
* @returns {Object} The data for the selected month/year
|
|
*/
|
|
|
|
|
|
function getMonths(_ref6) {
|
|
var month = _ref6.month,
|
|
year = _ref6.year,
|
|
selectedDates = _ref6.selectedDates,
|
|
minDate = _ref6.minDate,
|
|
maxDate = _ref6.maxDate,
|
|
firstDayOfWeek = _ref6.firstDayOfWeek,
|
|
showOutsideDays = _ref6.showOutsideDays;
|
|
// Get the normalized month and year, along with days in the month.
|
|
var daysMonthYear = getNumDaysMonthYear(month, year);
|
|
var daysInMonth = daysMonthYear.daysInMonth;
|
|
month = daysMonthYear.month;
|
|
year = daysMonthYear.year; // Fill out the dates for the month.
|
|
|
|
var dates = [];
|
|
|
|
for (var day = 1; day <= daysInMonth; day++) {
|
|
var date = new Date(year, month, day);
|
|
var dateObj = {
|
|
date: date,
|
|
selected: isSelected(selectedDates, date),
|
|
selectable: dayzed_esm_isSelectable(minDate, maxDate, date),
|
|
today: isToday(date),
|
|
prevMonth: false,
|
|
nextMonth: false
|
|
};
|
|
dates.push(dateObj);
|
|
}
|
|
|
|
var firstDayOfMonth = new Date(year, month, 1);
|
|
var lastDayOfMonth = new Date(year, month, daysInMonth);
|
|
var frontWeekBuffer = fillFrontWeek({
|
|
firstDayOfMonth: firstDayOfMonth,
|
|
minDate: minDate,
|
|
maxDate: maxDate,
|
|
selectedDates: selectedDates,
|
|
firstDayOfWeek: firstDayOfWeek,
|
|
showOutsideDays: showOutsideDays
|
|
});
|
|
var backWeekBuffer = fillBackWeek({
|
|
lastDayOfMonth: lastDayOfMonth,
|
|
minDate: minDate,
|
|
maxDate: maxDate,
|
|
selectedDates: selectedDates,
|
|
firstDayOfWeek: firstDayOfWeek,
|
|
showOutsideDays: showOutsideDays
|
|
});
|
|
dates.unshift.apply(dates, frontWeekBuffer);
|
|
dates.push.apply(dates, backWeekBuffer); // Get the filled out weeks for the
|
|
// given dates.
|
|
|
|
var weeks = getWeeks(dates); // return the calendar data.
|
|
|
|
return {
|
|
firstDayOfMonth: firstDayOfMonth,
|
|
lastDayOfMonth: lastDayOfMonth,
|
|
month: month,
|
|
year: year,
|
|
weeks: weeks
|
|
};
|
|
}
|
|
/**
|
|
* Fill front week with either empty buffer or dates from previous month,
|
|
* depending on showOutsideDays flag
|
|
* @param {Object} param The param object
|
|
* @param {Array.<Date>} param.selectedDates An array of dates currently selected
|
|
* @param {Date} param.minDate The earliest date available
|
|
* @param {Date} param.maxDate The furthest date available
|
|
* @param {Date} param.firstDayOfMonth First day of the month
|
|
* @param {Number} param.firstDayOfWeek First day of week, 0-6 (Sunday to Saturday)
|
|
* @param {Bool} param.showOutsideDays Flag to fill front and back weeks with dates from adjacent months
|
|
* @returns {Array.<Date>} Buffer to fill front week
|
|
*/
|
|
|
|
|
|
function fillFrontWeek(_ref7) {
|
|
var firstDayOfMonth = _ref7.firstDayOfMonth,
|
|
minDate = _ref7.minDate,
|
|
maxDate = _ref7.maxDate,
|
|
selectedDates = _ref7.selectedDates,
|
|
firstDayOfWeek = _ref7.firstDayOfWeek,
|
|
showOutsideDays = _ref7.showOutsideDays;
|
|
var dates = [];
|
|
var firstDay = (firstDayOfMonth.getDay() + 7 - firstDayOfWeek) % 7;
|
|
|
|
if (showOutsideDays) {
|
|
var lastDayOfPrevMonth = addDays(firstDayOfMonth, -1);
|
|
var prevDate = lastDayOfPrevMonth.getDate();
|
|
var prevDateMonth = lastDayOfPrevMonth.getMonth();
|
|
var prevDateYear = lastDayOfPrevMonth.getFullYear(); // Fill out front week for days from
|
|
// preceding month with dates from previous month.
|
|
|
|
var counter = 0;
|
|
|
|
while (counter < firstDay) {
|
|
var date = new Date(prevDateYear, prevDateMonth, prevDate - counter);
|
|
var dateObj = {
|
|
date: date,
|
|
selected: isSelected(selectedDates, date),
|
|
selectable: dayzed_esm_isSelectable(minDate, maxDate, date),
|
|
today: false,
|
|
prevMonth: true,
|
|
nextMonth: false
|
|
};
|
|
dates.unshift(dateObj);
|
|
counter++;
|
|
}
|
|
} else {
|
|
// Fill out front week for days from
|
|
// preceding month with buffer.
|
|
while (firstDay > 0) {
|
|
dates.unshift('');
|
|
firstDay--;
|
|
}
|
|
}
|
|
|
|
return dates;
|
|
}
|
|
/**
|
|
* Fill back weeks with either empty buffer or dates from next month,
|
|
* depending on showOutsideDays flag
|
|
* @param {Object} param The param object
|
|
* @param {Array.<Date>} param.selectedDates An array of dates currently selected
|
|
* @param {Date} param.minDate The earliest date available
|
|
* @param {Date} param.maxDate The furthest date available
|
|
* @param {Date} param.lastDayOfMonth Last day of the month
|
|
* @param {Number} param.firstDayOfWeek First day of week, 0-6 (Sunday to Saturday)
|
|
* @param {Bool} param.showOutsideDays Flag to fill front and back weeks with dates from adjacent months
|
|
* @returns {Array.<Date>} Buffer to fill back week
|
|
*/
|
|
|
|
|
|
function fillBackWeek(_ref8) {
|
|
var lastDayOfMonth = _ref8.lastDayOfMonth,
|
|
minDate = _ref8.minDate,
|
|
maxDate = _ref8.maxDate,
|
|
selectedDates = _ref8.selectedDates,
|
|
firstDayOfWeek = _ref8.firstDayOfWeek,
|
|
showOutsideDays = _ref8.showOutsideDays;
|
|
var dates = [];
|
|
var lastDay = (lastDayOfMonth.getDay() + 7 - firstDayOfWeek) % 7;
|
|
|
|
if (showOutsideDays) {
|
|
var firstDayOfNextMonth = addDays(lastDayOfMonth, 1);
|
|
var nextDateMonth = firstDayOfNextMonth.getMonth();
|
|
var nextDateYear = firstDayOfNextMonth.getFullYear(); // Fill out back week for days from
|
|
// following month with dates from next month.
|
|
|
|
var counter = 0;
|
|
|
|
while (counter < 6 - lastDay) {
|
|
var date = new Date(nextDateYear, nextDateMonth, 1 + counter);
|
|
var dateObj = {
|
|
date: date,
|
|
selected: isSelected(selectedDates, date),
|
|
selectable: dayzed_esm_isSelectable(minDate, maxDate, date),
|
|
today: false,
|
|
prevMonth: false,
|
|
nextMonth: true
|
|
};
|
|
dates.push(dateObj);
|
|
counter++;
|
|
}
|
|
} else {
|
|
// Fill out back week for days from
|
|
// following month with buffer.
|
|
while (lastDay < 6) {
|
|
dates.push('');
|
|
lastDay++;
|
|
}
|
|
}
|
|
|
|
return dates;
|
|
}
|
|
/**
|
|
* Normalizes month (could be overflow) and year pairs and returns the
|
|
* normalized month and year along with the number of days in the month.
|
|
* @param {Number} month The month to normalize
|
|
* @param {Number} year The year to normalize
|
|
* @returns {Object} The normalized month and year along with the number of days in the month
|
|
*/
|
|
|
|
|
|
function getNumDaysMonthYear(month, year) {
|
|
// If a parameter you specify is outside of the expected range for Month or Day,
|
|
// JS Date attempts to update the date information in the Date object accordingly!
|
|
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setMonth
|
|
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/setDate
|
|
// Let Date handle the overflow of the month,
|
|
// which should return the normalized month and year.
|
|
var normalizedMonthYear = new Date(year, month, 1);
|
|
month = normalizedMonthYear.getMonth();
|
|
year = normalizedMonthYear.getFullYear(); // Overflow the date to the next month, then subtract the difference
|
|
// to get the number of days in the previous month.
|
|
// This will also account for leap years!
|
|
|
|
var daysInMonth = 32 - new Date(year, month, 32).getDate();
|
|
return {
|
|
daysInMonth: daysInMonth,
|
|
month: month,
|
|
year: year
|
|
};
|
|
}
|
|
/**
|
|
* Takes an array of dates, and turns them into a multi dimensional
|
|
* array with 7 entries for each week.
|
|
* @param {Array.<Object>} dates An array of dates
|
|
* @returns {Array} The weeks as a multi dimensional array
|
|
*/
|
|
|
|
|
|
function getWeeks(dates) {
|
|
var weeksLength = Math.ceil(dates.length / 7);
|
|
var weeks = [];
|
|
|
|
for (var i = 0; i < weeksLength; i++) {
|
|
weeks[i] = [];
|
|
|
|
for (var x = 0; x < 7; x++) {
|
|
weeks[i].push(dates[i * 7 + x]);
|
|
}
|
|
}
|
|
|
|
return weeks;
|
|
}
|
|
/**
|
|
* Normalizes dates to the beginning of the day,
|
|
* then checks to see if the day given is found
|
|
* in the selectedDates.
|
|
* @param {Array.<Date>} selectedDates An array of dates currently selected
|
|
* @param {Date} date The date to search with against selectedDates
|
|
* @returns {Boolean} Whether day is found in selectedDates
|
|
*/
|
|
|
|
|
|
function isSelected(selectedDates, date) {
|
|
selectedDates = Array.isArray(selectedDates) ? selectedDates : [selectedDates];
|
|
return selectedDates.some(function (selectedDate) {
|
|
if (selectedDate instanceof Date && startOfDay(selectedDate).getTime() === startOfDay(date).getTime()) {
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
});
|
|
}
|
|
/**
|
|
* Checks to see if the date given is
|
|
* between the min and max dates.
|
|
* @param {Date} minDate The earliest date available
|
|
* @param {Date} maxDate The furthest date available
|
|
* @param {Date} date The date to compare with
|
|
* @returns {Boolean} Whether the date is between min and max date
|
|
*/
|
|
|
|
|
|
function dayzed_esm_isSelectable(minDate, maxDate, date) {
|
|
if (minDate && isBefore(date, minDate) || maxDate && isBefore(maxDate, date)) {
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
function isOffsetControlled(propOffset) {
|
|
return propOffset !== undefined;
|
|
}
|
|
|
|
function getOffset(prop, state) {
|
|
return isOffsetControlled(prop) ? prop : state;
|
|
}
|
|
|
|
function dayzed_esm_getDateProps(onDateSelected, _temp) {
|
|
var _ref = _temp === void 0 ? {} : _temp,
|
|
onClick = _ref.onClick,
|
|
_ref$dateObj = _ref.dateObj,
|
|
dateObj = _ref$dateObj === void 0 ? requiredProp('getDateProps', 'dateObj') : _ref$dateObj,
|
|
rest = _objectWithoutPropertiesLoose(_ref, ["onClick", "dateObj"]);
|
|
|
|
return _extends({
|
|
onClick: composeEventHandlers(onClick, function (event) {
|
|
onDateSelected(dateObj, event);
|
|
}),
|
|
disabled: !dateObj.selectable,
|
|
'aria-label': dateObj.date.toDateString(),
|
|
'aria-pressed': dateObj.selected,
|
|
role: 'button'
|
|
}, rest);
|
|
}
|
|
|
|
function dayzed_esm_getBackProps(_ref2, _temp2) {
|
|
var minDate = _ref2.minDate,
|
|
offsetMonth = _ref2.offsetMonth,
|
|
handleOffsetChanged = _ref2.handleOffsetChanged;
|
|
|
|
var _ref3 = _temp2 === void 0 ? {} : _temp2,
|
|
onClick = _ref3.onClick,
|
|
_ref3$offset = _ref3.offset,
|
|
offset = _ref3$offset === void 0 ? 1 : _ref3$offset,
|
|
_ref3$calendars = _ref3.calendars,
|
|
calendars = _ref3$calendars === void 0 ? requiredProp('getBackProps', 'calendars') : _ref3$calendars,
|
|
rest = _objectWithoutPropertiesLoose(_ref3, ["onClick", "offset", "calendars"]);
|
|
|
|
return _extends({
|
|
onClick: composeEventHandlers(onClick, function () {
|
|
handleOffsetChanged(offsetMonth - subtractMonth({
|
|
calendars: calendars,
|
|
offset: offset,
|
|
minDate: minDate
|
|
}));
|
|
}),
|
|
disabled: isBackDisabled({
|
|
calendars: calendars,
|
|
offset: offset,
|
|
minDate: minDate
|
|
}),
|
|
'aria-label': "Go back " + offset + " month" + (offset === 1 ? '' : 's')
|
|
}, rest);
|
|
}
|
|
|
|
function dayzed_esm_getForwardProps(_ref4, _temp3) {
|
|
var maxDate = _ref4.maxDate,
|
|
offsetMonth = _ref4.offsetMonth,
|
|
handleOffsetChanged = _ref4.handleOffsetChanged;
|
|
|
|
var _ref5 = _temp3 === void 0 ? {} : _temp3,
|
|
onClick = _ref5.onClick,
|
|
_ref5$offset = _ref5.offset,
|
|
offset = _ref5$offset === void 0 ? 1 : _ref5$offset,
|
|
_ref5$calendars = _ref5.calendars,
|
|
calendars = _ref5$calendars === void 0 ? requiredProp('getForwardProps', 'calendars') : _ref5$calendars,
|
|
rest = _objectWithoutPropertiesLoose(_ref5, ["onClick", "offset", "calendars"]);
|
|
|
|
return _extends({
|
|
onClick: composeEventHandlers(onClick, function () {
|
|
handleOffsetChanged(offsetMonth + addMonth({
|
|
calendars: calendars,
|
|
offset: offset,
|
|
maxDate: maxDate
|
|
}));
|
|
}),
|
|
disabled: isForwardDisabled({
|
|
calendars: calendars,
|
|
offset: offset,
|
|
maxDate: maxDate
|
|
}),
|
|
'aria-label': "Go forward " + offset + " month" + (offset === 1 ? '' : 's')
|
|
}, rest);
|
|
}
|
|
|
|
function useDayzed(_ref6) {
|
|
var _ref6$date = _ref6.date,
|
|
date = _ref6$date === void 0 ? new Date() : _ref6$date,
|
|
maxDate = _ref6.maxDate,
|
|
minDate = _ref6.minDate,
|
|
_ref6$monthsToDisplay = _ref6.monthsToDisplay,
|
|
monthsToDisplay = _ref6$monthsToDisplay === void 0 ? 1 : _ref6$monthsToDisplay,
|
|
_ref6$firstDayOfWeek = _ref6.firstDayOfWeek,
|
|
firstDayOfWeek = _ref6$firstDayOfWeek === void 0 ? 0 : _ref6$firstDayOfWeek,
|
|
_ref6$showOutsideDays = _ref6.showOutsideDays,
|
|
showOutsideDays = _ref6$showOutsideDays === void 0 ? false : _ref6$showOutsideDays,
|
|
offset = _ref6.offset,
|
|
onDateSelected = _ref6.onDateSelected,
|
|
_ref6$onOffsetChanged = _ref6.onOffsetChanged,
|
|
onOffsetChanged = _ref6$onOffsetChanged === void 0 ? function () {} : _ref6$onOffsetChanged,
|
|
selected = _ref6.selected;
|
|
|
|
var _useState = Object(react["useState"])(0),
|
|
stateOffset = _useState[0],
|
|
setStateOffset = _useState[1];
|
|
|
|
var offsetMonth = getOffset(offset, stateOffset);
|
|
|
|
function handleOffsetChanged(newOffset) {
|
|
if (!isOffsetControlled(offset)) {
|
|
setStateOffset(newOffset);
|
|
}
|
|
|
|
onOffsetChanged(newOffset);
|
|
}
|
|
|
|
var calendars = getCalendars({
|
|
date: date,
|
|
selected: selected,
|
|
monthsToDisplay: monthsToDisplay,
|
|
minDate: minDate,
|
|
maxDate: maxDate,
|
|
offset: offsetMonth,
|
|
firstDayOfWeek: firstDayOfWeek,
|
|
showOutsideDays: showOutsideDays
|
|
});
|
|
return {
|
|
calendars: calendars,
|
|
getDateProps: dayzed_esm_getDateProps.bind(null, onDateSelected),
|
|
getBackProps: dayzed_esm_getBackProps.bind(null, {
|
|
minDate: minDate,
|
|
offsetMonth: offsetMonth,
|
|
handleOffsetChanged: handleOffsetChanged
|
|
}),
|
|
getForwardProps: dayzed_esm_getForwardProps.bind(null, {
|
|
maxDate: maxDate,
|
|
offsetMonth: offsetMonth,
|
|
handleOffsetChanged: handleOffsetChanged
|
|
})
|
|
};
|
|
}
|
|
|
|
function Dayzed(props) {
|
|
var dayzedCalendar = useDayzed(props);
|
|
var children = unwrapChildrenForPreact(props.render || props.children);
|
|
return children(dayzedCalendar);
|
|
}
|
|
|
|
Dayzed.defaultProps = {
|
|
date: new Date(),
|
|
monthsToDisplay: 1,
|
|
onOffsetChanged: function onOffsetChanged() {},
|
|
firstDayOfWeek: 0,
|
|
showOutsideDays: false
|
|
};
|
|
Dayzed.propTypes = {
|
|
render: prop_types_default.a.func,
|
|
children: prop_types_default.a.func,
|
|
date: prop_types_default.a.instanceOf(Date),
|
|
maxDate: prop_types_default.a.instanceOf(Date),
|
|
minDate: prop_types_default.a.instanceOf(Date),
|
|
monthsToDisplay: prop_types_default.a.number,
|
|
firstDayOfWeek: prop_types_default.a.number,
|
|
showOutsideDays: prop_types_default.a.bool,
|
|
offset: prop_types_default.a.number,
|
|
onDateSelected: prop_types_default.a.func.isRequired,
|
|
onOffsetChanged: prop_types_default.a.func,
|
|
selected: prop_types_default.a.oneOfType([prop_types_default.a.arrayOf(Date), prop_types_default.a.instanceOf(Date)])
|
|
};
|
|
|
|
/* harmony default export */ var dayzed_esm = (Dayzed);
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/date-fns/compare_asc/index.js
|
|
var compare_asc = __webpack_require__(283);
|
|
var compare_asc_default = /*#__PURE__*/__webpack_require__.n(compare_asc);
|
|
|
|
// EXTERNAL MODULE: ./node_modules/date-fns/is_same_day/index.js
|
|
var is_same_day = __webpack_require__(135);
|
|
var is_same_day_default = /*#__PURE__*/__webpack_require__.n(is_same_day);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/react-semantic-ui-datepickers/dist/react-semantic-ui-datepickers.esm.js
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function react_semantic_ui_datepickers_esm_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);
|
|
}
|
|
}
|
|
|
|
function react_semantic_ui_datepickers_esm_createClass(Constructor, protoProps, staticProps) {
|
|
if (protoProps) react_semantic_ui_datepickers_esm_defineProperties(Constructor.prototype, protoProps);
|
|
if (staticProps) react_semantic_ui_datepickers_esm_defineProperties(Constructor, staticProps);
|
|
return Constructor;
|
|
}
|
|
|
|
function react_semantic_ui_datepickers_esm_extends() {
|
|
react_semantic_ui_datepickers_esm_extends = Object.assign || function (target) {
|
|
for (var i = 1; i < arguments.length; i++) {
|
|
var source = arguments[i];
|
|
|
|
for (var key in source) {
|
|
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
target[key] = source[key];
|
|
}
|
|
}
|
|
}
|
|
|
|
return target;
|
|
};
|
|
|
|
return react_semantic_ui_datepickers_esm_extends.apply(this, arguments);
|
|
}
|
|
|
|
function _inheritsLoose(subClass, superClass) {
|
|
subClass.prototype = Object.create(superClass.prototype);
|
|
subClass.prototype.constructor = subClass;
|
|
subClass.__proto__ = superClass;
|
|
}
|
|
|
|
function react_semantic_ui_datepickers_esm_objectWithoutPropertiesLoose(source, excluded) {
|
|
if (source == null) return {};
|
|
var target = {};
|
|
var sourceKeys = Object.keys(source);
|
|
var key, i;
|
|
|
|
for (i = 0; i < sourceKeys.length; i++) {
|
|
key = sourceKeys[i];
|
|
if (excluded.indexOf(key) >= 0) continue;
|
|
target[key] = source[key];
|
|
}
|
|
|
|
return target;
|
|
}
|
|
|
|
var dateFnsV2 = {
|
|
parse: parse_default.a
|
|
};
|
|
|
|
var react_semantic_ui_datepickers_esm_isSelectable = function isSelectable(date, minDate, maxDate) {
|
|
if (minDate && is_before_default()(date, minDate) || maxDate && is_before_default()(maxDate, date)) {
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
};
|
|
var react_semantic_ui_datepickers_esm_getToday = function getToday(minDate, maxDate) {
|
|
var today = new Date();
|
|
return {
|
|
date: start_of_day_default()(today),
|
|
selectable: react_semantic_ui_datepickers_esm_isSelectable(today, minDate, maxDate),
|
|
selected: false,
|
|
today: true
|
|
};
|
|
};
|
|
var react_semantic_ui_datepickers_esm_formatDate = function formatDate(date, dateFormat) {
|
|
return date ? format_default()(start_of_day_default()(date), dateFormat) : undefined;
|
|
};
|
|
var omit = function omit(keysToOmit, obj) {
|
|
var newObj = react_semantic_ui_datepickers_esm_extends({}, obj);
|
|
|
|
keysToOmit.forEach(function (key) {
|
|
return delete newObj[key];
|
|
});
|
|
return newObj;
|
|
};
|
|
var react_semantic_ui_datepickers_esm_pick = function pick(keysToPick, obj) {
|
|
var newObj = {};
|
|
keysToPick.forEach(function (key) {
|
|
newObj[key] = obj[key];
|
|
});
|
|
return newObj;
|
|
};
|
|
var moveElementsByN = function moveElementsByN(n, arr) {
|
|
return arr.slice(n).concat(arr.slice(0, n));
|
|
};
|
|
var formatSelectedDate = function formatSelectedDate(selectedDate, dateFormat) {
|
|
if (!selectedDate) {
|
|
return '';
|
|
}
|
|
|
|
return Array.isArray(selectedDate) ? selectedDate.map(function (date) {
|
|
return react_semantic_ui_datepickers_esm_formatDate(date, dateFormat);
|
|
}).join(' - ') : react_semantic_ui_datepickers_esm_formatDate(selectedDate, dateFormat);
|
|
};
|
|
var parseFormatString = function parseFormatString(formatString) {
|
|
return formatString.replace(/[D, Y]/gi, function (a) {
|
|
return a.toLowerCase();
|
|
});
|
|
};
|
|
var parseOnBlur = function parseOnBlur(typedValue, formatString, isRangeInput) {
|
|
var parsedFormatString = parseFormatString(formatString);
|
|
|
|
if (isRangeInput) {
|
|
var rangeValues = typedValue.split(' - ');
|
|
return rangeValues // @ts-ignore
|
|
.map(function (value) {
|
|
return dateFnsV2.parse(value, parsedFormatString, new Date());
|
|
}).sort(function (a, b) {
|
|
return a > b ? 1 : -1;
|
|
});
|
|
} // @ts-ignore
|
|
|
|
|
|
return dateFnsV2.parse(typedValue, parsedFormatString, new Date());
|
|
};
|
|
var onlyNumbers = function onlyNumbers(value) {
|
|
if (value === void 0) {
|
|
value = '';
|
|
}
|
|
|
|
return value.replace(/[^\d]/g, '');
|
|
};
|
|
function getShortDate(date) {
|
|
if (!date) {
|
|
return undefined;
|
|
}
|
|
|
|
return date.toISOString().slice(0, 10);
|
|
}
|
|
|
|
/**
|
|
* This is intended to be used to compose event handlers
|
|
* They are executed in order until one of them calls
|
|
* `event.preventDefault()`. Not sure this is the best
|
|
* way to do this, but it seems legit...
|
|
* @param {Function} fns the event hanlder functions
|
|
* @return {Function} the event handler to add to an element
|
|
*/
|
|
function react_semantic_ui_datepickers_esm_composeEventHandlers() {
|
|
for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
fns[_key] = arguments[_key];
|
|
}
|
|
|
|
return function (event) {
|
|
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
args[_key2 - 1] = arguments[_key2];
|
|
}
|
|
|
|
return fns.some(function (fn) {
|
|
if (fn) {
|
|
fn.apply(void 0, [event].concat(args));
|
|
}
|
|
|
|
return event.defaultPrevented;
|
|
});
|
|
};
|
|
}
|
|
/**
|
|
* Create an event handler for keyboard key given a config map
|
|
* of event handlers
|
|
* @param {Object} config consists of left, right, up, and down
|
|
* @return {Function} the event handler to handle keyboard key
|
|
*/
|
|
|
|
function getArrowKeyHandlers(config) {
|
|
return function (event) {
|
|
var keyCode = event.keyCode;
|
|
var fn = {
|
|
37: config.left,
|
|
39: config.right,
|
|
38: config.up,
|
|
40: config.down
|
|
}[keyCode];
|
|
|
|
if (fn) {
|
|
fn(event);
|
|
}
|
|
};
|
|
}
|
|
/**
|
|
* Checks if a given date is with date range
|
|
* @param {Array} range the range array with upper and lower bound
|
|
* @param {Date} date a given date
|
|
* @return {Boolean} true if date is in the range, false otherwise
|
|
*/
|
|
|
|
function isInRange(range, date) {
|
|
return range.length === 2 && range[0] <= date && range[1] >= date;
|
|
}
|
|
|
|
var react_semantic_ui_datepickers_esm_BaseDatePicker =
|
|
/*#__PURE__*/
|
|
function (_React$Component) {
|
|
_inheritsLoose(BaseDatePicker, _React$Component);
|
|
|
|
function BaseDatePicker() {
|
|
var _this;
|
|
|
|
_this = _React$Component.apply(this, arguments) || this;
|
|
_this.state = {
|
|
offset: 0
|
|
};
|
|
_this.rootNode = react_default.a.createRef();
|
|
_this.handleArrowKeys = getArrowKeyHandlers({
|
|
left: function left() {
|
|
_this.getKeyOffset(-1);
|
|
},
|
|
right: function right() {
|
|
_this.getKeyOffset(1);
|
|
},
|
|
up: function up() {
|
|
_this.getKeyOffset(-7);
|
|
},
|
|
down: function down() {
|
|
_this.getKeyOffset(7);
|
|
}
|
|
});
|
|
|
|
_this.setRootNode = function (ref) {
|
|
_this.rootNode = ref;
|
|
};
|
|
|
|
_this.getRootProps = function (_temp) {
|
|
var _extends2;
|
|
|
|
var _ref = _temp === void 0 ? {} : _temp,
|
|
_ref$refKey = _ref.refKey,
|
|
refKey = _ref$refKey === void 0 ? 'ref' : _ref$refKey,
|
|
rest = react_semantic_ui_datepickers_esm_objectWithoutPropertiesLoose(_ref, ["refKey"]);
|
|
|
|
return react_semantic_ui_datepickers_esm_extends((_extends2 = {}, _extends2[refKey] = _this.setRootNode, _extends2.onKeyDown = _this.handleArrowKeys, _extends2), rest);
|
|
};
|
|
|
|
_this._handleOffsetChanged = function (offset) {
|
|
_this.setState({
|
|
offset: offset
|
|
});
|
|
};
|
|
|
|
return _this;
|
|
}
|
|
|
|
var _proto = BaseDatePicker.prototype;
|
|
|
|
_proto.getKeyOffset = function getKeyOffset(number) {
|
|
if (!this.rootNode.current) {
|
|
return;
|
|
}
|
|
|
|
var e = document.activeElement;
|
|
var buttons = this.rootNode.current.querySelectorAll('button');
|
|
buttons.forEach(function (el, i) {
|
|
var newNodeKey = i + number;
|
|
|
|
if (el === e) {
|
|
if (newNodeKey <= buttons.length - 1 && newNodeKey >= 0) {
|
|
buttons[newNodeKey].focus();
|
|
} else {
|
|
buttons[0].focus();
|
|
}
|
|
}
|
|
});
|
|
};
|
|
|
|
_proto.componentDidUpdate = function componentDidUpdate(prevProps) {
|
|
if (this.props.date !== prevProps.date) {
|
|
this._handleOffsetChanged(0);
|
|
}
|
|
};
|
|
|
|
_proto.render = function render() {
|
|
var _this2 = this;
|
|
|
|
var _this$props = this.props,
|
|
children = _this$props.children,
|
|
rest = react_semantic_ui_datepickers_esm_objectWithoutPropertiesLoose(_this$props, ["children"]);
|
|
|
|
return react_default.a.createElement(dayzed_esm, Object.assign({}, rest, {
|
|
offset: this.state.offset,
|
|
onOffsetChanged: this._handleOffsetChanged,
|
|
render: function render(renderProps) {
|
|
return children(react_semantic_ui_datepickers_esm_extends({}, renderProps, {
|
|
getRootProps: _this2.getRootProps
|
|
}));
|
|
}
|
|
}));
|
|
};
|
|
|
|
return BaseDatePicker;
|
|
}(react_default.a.Component);
|
|
|
|
var react_semantic_ui_datepickers_esm_DatePicker =
|
|
/*#__PURE__*/
|
|
function (_React$Component) {
|
|
_inheritsLoose(DatePicker, _React$Component);
|
|
|
|
function DatePicker() {
|
|
var _this;
|
|
|
|
_this = _React$Component.apply(this, arguments) || this;
|
|
|
|
_this._handleOnDateSelected = function (_ref, event) {
|
|
var selectable = _ref.selectable,
|
|
date = _ref.date;
|
|
var _this$props = _this.props,
|
|
selectedDate = _this$props.selected,
|
|
onChange = _this$props.onChange;
|
|
|
|
if (!selectable) {
|
|
return;
|
|
}
|
|
|
|
var newDate = date;
|
|
|
|
if (selectedDate && selectedDate.getTime() === date.getTime()) {
|
|
newDate = null;
|
|
}
|
|
|
|
if (onChange) {
|
|
onChange(event, newDate);
|
|
}
|
|
};
|
|
|
|
return _this;
|
|
}
|
|
|
|
var _proto = DatePicker.prototype;
|
|
|
|
_proto.render = function render() {
|
|
return react_default.a.createElement(react_semantic_ui_datepickers_esm_BaseDatePicker, Object.assign({}, this.props, {
|
|
onDateSelected: this._handleOnDateSelected
|
|
}));
|
|
};
|
|
|
|
return DatePicker;
|
|
}(react_default.a.Component);
|
|
|
|
var react_semantic_ui_datepickers_esm_RangeDatePicker =
|
|
/*#__PURE__*/
|
|
function (_React$Component) {
|
|
_inheritsLoose(RangeDatePicker, _React$Component);
|
|
|
|
function RangeDatePicker() {
|
|
var _this;
|
|
|
|
_this = _React$Component.apply(this, arguments) || this;
|
|
_this.state = {
|
|
hoveredDate: null
|
|
};
|
|
|
|
_this.setHoveredDate = function (date) {
|
|
_this.setState(function (state) {
|
|
return state.hoveredDate === date ? null : {
|
|
hoveredDate: date
|
|
};
|
|
});
|
|
}; // Calendar level
|
|
|
|
|
|
_this.onMouseLeave = function () {
|
|
_this.setHoveredDate(null);
|
|
};
|
|
|
|
_this._handleOnDateSelected = function (_ref, event) {
|
|
var selectable = _ref.selectable,
|
|
date = _ref.date;
|
|
var _this$props = _this.props,
|
|
selectedDates = _this$props.selected,
|
|
onChange = _this$props.onChange;
|
|
|
|
if (!selectable) {
|
|
return;
|
|
}
|
|
|
|
var dateTime = date.getTime();
|
|
var newDates = [].concat(selectedDates);
|
|
|
|
if (selectedDates.length) {
|
|
if (selectedDates.length === 1) {
|
|
var firstTime = selectedDates[0].getTime();
|
|
|
|
if (firstTime < dateTime) {
|
|
newDates.push(date);
|
|
} else {
|
|
newDates.unshift(date);
|
|
}
|
|
} else if (newDates.length === 2) {
|
|
newDates = [date];
|
|
}
|
|
} else {
|
|
newDates.push(date);
|
|
}
|
|
|
|
if (onChange) {
|
|
onChange(event, newDates);
|
|
}
|
|
|
|
if (newDates.length === 2) {
|
|
_this.setHoveredDate(null);
|
|
}
|
|
};
|
|
|
|
_this.getEnhancedDateProps = function (getDateProps, dateBounds, _ref2) {
|
|
var onMouseEnter = _ref2.onMouseEnter,
|
|
onFocus = _ref2.onFocus,
|
|
restProps = react_semantic_ui_datepickers_esm_objectWithoutPropertiesLoose(_ref2, ["onMouseEnter", "onFocus"]);
|
|
|
|
var hoveredDate = _this.state.hoveredDate;
|
|
var date = restProps.dateObj.date;
|
|
return getDateProps(react_semantic_ui_datepickers_esm_extends({}, restProps, {
|
|
inRange: isInRange(dateBounds, date),
|
|
start: dateBounds[0] && is_same_day_default()(dateBounds[0], date),
|
|
end: dateBounds[1] && is_same_day_default()(dateBounds[1], date),
|
|
// @ts-ignore
|
|
hovered: hoveredDate && is_same_day_default()(hoveredDate, date),
|
|
onMouseEnter: react_semantic_ui_datepickers_esm_composeEventHandlers(onMouseEnter, function () {
|
|
_this.onHoverFocusDate(date);
|
|
}),
|
|
onFocus: react_semantic_ui_datepickers_esm_composeEventHandlers(onFocus, function () {
|
|
_this.onHoverFocusDate(date);
|
|
})
|
|
}));
|
|
};
|
|
|
|
_this.getEnhancedRootProps = function (getRootProps, props) {
|
|
return getRootProps(react_semantic_ui_datepickers_esm_extends({}, props, {
|
|
onMouseLeave: _this.onMouseLeave
|
|
}));
|
|
};
|
|
|
|
return _this;
|
|
} // Date level
|
|
|
|
|
|
var _proto = RangeDatePicker.prototype;
|
|
|
|
_proto.onHoverFocusDate = function onHoverFocusDate(date) {
|
|
if (this.props.selected.length !== 1) {
|
|
return;
|
|
}
|
|
|
|
this.setHoveredDate(date);
|
|
};
|
|
|
|
_proto.render = function render() {
|
|
var _this2 = this;
|
|
|
|
var _this$props2 = this.props,
|
|
children = _this$props2.children,
|
|
rest = react_semantic_ui_datepickers_esm_objectWithoutPropertiesLoose(_this$props2, ["children"]);
|
|
|
|
var hoveredDate = this.state.hoveredDate;
|
|
var selected = this.props.selected;
|
|
var dateBounds = selected.length === 2 || !selected.length || !hoveredDate ? selected : // prettier-ignore
|
|
// @ts-ignore
|
|
[selected[0], hoveredDate].sort(compare_asc_default.a);
|
|
return react_default.a.createElement(react_semantic_ui_datepickers_esm_BaseDatePicker, Object.assign({}, rest, {
|
|
onDateSelected: this._handleOnDateSelected
|
|
}), function (_ref3) {
|
|
var getRootProps = _ref3.getRootProps,
|
|
getDateProps = _ref3.getDateProps,
|
|
renderProps = react_semantic_ui_datepickers_esm_objectWithoutPropertiesLoose(_ref3, ["getRootProps", "getDateProps"]);
|
|
|
|
return children(react_semantic_ui_datepickers_esm_extends({}, renderProps, {
|
|
getRootProps: _this2.getEnhancedRootProps.bind(_this2, getRootProps),
|
|
getDateProps: _this2.getEnhancedDateProps.bind(_this2, getDateProps, dateBounds)
|
|
}));
|
|
});
|
|
};
|
|
|
|
return RangeDatePicker;
|
|
}(react_default.a.Component);
|
|
|
|
react_semantic_ui_datepickers_esm_RangeDatePicker.defaultProps = {
|
|
selected: []
|
|
};
|
|
|
|
var react_semantic_ui_datepickers_esm_CustomButton = function CustomButton(_ref) {
|
|
var icon = _ref.icon,
|
|
otherProps = react_semantic_ui_datepickers_esm_objectWithoutPropertiesLoose(_ref, ["icon"]);
|
|
|
|
return react_default.a.createElement(elements_Button_Button, Object.assign({
|
|
basic: true,
|
|
compact: true,
|
|
icon: icon
|
|
}, otherProps));
|
|
};
|
|
|
|
function styleInject(css, ref) {
|
|
if ( ref === void 0 ) ref = {};
|
|
var insertAt = ref.insertAt;
|
|
|
|
if (!css || typeof document === 'undefined') { return; }
|
|
|
|
var head = document.head || document.getElementsByTagName('head')[0];
|
|
var style = document.createElement('style');
|
|
style.type = 'text/css';
|
|
|
|
if (insertAt === 'top') {
|
|
if (head.firstChild) {
|
|
head.insertBefore(style, head.firstChild);
|
|
} else {
|
|
head.appendChild(style);
|
|
}
|
|
} else {
|
|
head.appendChild(style);
|
|
}
|
|
|
|
if (style.styleSheet) {
|
|
style.styleSheet.cssText = css;
|
|
} else {
|
|
style.appendChild(document.createTextNode(css));
|
|
}
|
|
}
|
|
|
|
var css = ".clndr-cell{background-color:#fff;-webkit-transition:all .2s;transition:all .2s;padding:5px 0;height:30px;cursor:pointer}.clndr-cell:hover{background-color:#cacbcd;color:inherit}.clndr-cell-today{background-color:#e0e1e2}.clndr-cell-inrange{background-color:#cacbcd;color:inherit}.clndr-cell-disabled{cursor:default;opacity:.45}.clndr-cell-disabled:hover{background-color:#fff}.clndr-cell-selected{background-color:#4f4f4f;color:#f2f2f2}.clndr-cell-other-month{color:#d9d9d9}";
|
|
styleInject(css);
|
|
|
|
var react_semantic_ui_datepickers_esm_CalendarCell = function CalendarCell(_ref) {
|
|
var end = _ref.end,
|
|
hovered = _ref.hovered,
|
|
inRange = _ref.inRange,
|
|
nextMonth = _ref.nextMonth,
|
|
prevMonth = _ref.prevMonth,
|
|
selectable = _ref.selectable,
|
|
selected = _ref.selected,
|
|
start = _ref.start,
|
|
today = _ref.today,
|
|
otherProps = react_semantic_ui_datepickers_esm_objectWithoutPropertiesLoose(_ref, ["end", "hovered", "inRange", "nextMonth", "prevMonth", "selectable", "selected", "start", "today"]);
|
|
|
|
return react_default.a.createElement("span", Object.assign({
|
|
className: classnames_default()('clndr-cell', {
|
|
'clndr-cell-today': today,
|
|
'clndr-cell-disabled': !selectable,
|
|
'clndr-cell-other-month': nextMonth || prevMonth,
|
|
'clndr-cell-inrange': inRange,
|
|
'clndr-cell-selected': selected
|
|
})
|
|
}, otherProps));
|
|
};
|
|
|
|
react_semantic_ui_datepickers_esm_CalendarCell.defaultProps = {
|
|
end: false,
|
|
hovered: false,
|
|
inRange: false,
|
|
nextMonth: false,
|
|
prevMonth: false,
|
|
start: false
|
|
};
|
|
|
|
var style = {
|
|
marginTop: 10
|
|
};
|
|
|
|
var react_semantic_ui_datepickers_esm_TodayButton = function TodayButton(_ref) {
|
|
var end = _ref.end,
|
|
hovered = _ref.hovered,
|
|
inRange = _ref.inRange,
|
|
selectable = _ref.selectable,
|
|
selected = _ref.selected,
|
|
start = _ref.start,
|
|
today = _ref.today,
|
|
otherProps = react_semantic_ui_datepickers_esm_objectWithoutPropertiesLoose(_ref, ["end", "hovered", "inRange", "selectable", "selected", "start", "today"]);
|
|
|
|
return react_default.a.createElement(elements_Button_Button, Object.assign({
|
|
className: "clndr-button-today",
|
|
compact: true,
|
|
"data-testid": "datepicker-today-button",
|
|
fluid: true,
|
|
style: style
|
|
}, otherProps));
|
|
};
|
|
|
|
var css$1 = ".clndr-calendars-segment{text-align:center;position:absolute!important;margin-top:.25rem!important;z-index:2000}.clndr-calendars-wrapper{display:grid;grid-gap:1em;grid-template-columns:repeat(var(--n,1),1fr)}.clndr-control{display:grid;grid-template-columns:repeat(3,1fr);margin-bottom:10px;-webkit-box-align:center;align-items:center}.clndr-days{text-align:center;display:grid;grid-gap:1px;grid-template-columns:repeat(7,2.2rem);background-color:rgba(0,0,0,.1);border:1px solid rgba(0,0,0,.1);border-radius:.28571429rem}.clndr-left{left:0}.clndr-right{right:0}.clndr-top{bottom:100%}.clndr-bottom{top:100%}.clndr-calendars-segment.clndr-top{box-shadow:0 -1px 2px 0 rgba(34,36,38,.15)!important;margin-bottom:.25rem!important}";
|
|
styleInject(css$1);
|
|
|
|
var react_semantic_ui_datepickers_esm_styles = {
|
|
leftBtn: {
|
|
textAlign: 'start'
|
|
},
|
|
rightBtn: {
|
|
textAlign: 'end'
|
|
}
|
|
};
|
|
var pointings = {
|
|
'top left': 'clndr-top clndr-left',
|
|
'top right': 'clndr-top clndr-right',
|
|
left: 'clndr-left',
|
|
right: 'clndr-right'
|
|
};
|
|
|
|
var react_semantic_ui_datepickers_esm_Calendar = function Calendar(_ref) {
|
|
var calendars = _ref.calendars,
|
|
filterDate = _ref.filterDate,
|
|
getBackProps = _ref.getBackProps,
|
|
getDateProps = _ref.getDateProps,
|
|
getForwardProps = _ref.getForwardProps,
|
|
maxDate = _ref.maxDate,
|
|
minDate = _ref.minDate,
|
|
months = _ref.months,
|
|
nextMonth = _ref.nextMonth,
|
|
nextYear = _ref.nextYear,
|
|
previousMonth = _ref.previousMonth,
|
|
previousYear = _ref.previousYear,
|
|
showToday = _ref.showToday,
|
|
todayButton = _ref.todayButton,
|
|
weekdays = _ref.weekdays,
|
|
pointing = _ref.pointing;
|
|
return react_default.a.createElement(Segment_Segment, {
|
|
className: classnames_default()('clndr-calendars-segment', pointings[pointing])
|
|
}, react_default.a.createElement("div", {
|
|
className: "clndr-calendars-wrapper",
|
|
style: {
|
|
'--n': calendars.length
|
|
}
|
|
}, calendars.map(function (calendar, calendarIdx) {
|
|
return react_default.a.createElement("div", {
|
|
key: calendar.year + "-" + calendar.month
|
|
}, react_default.a.createElement("div", {
|
|
className: "clndr-control"
|
|
}, react_default.a.createElement("div", {
|
|
style: react_semantic_ui_datepickers_esm_styles.leftBtn
|
|
}, calendarIdx === 0 && react_default.a.createElement(react["Fragment"], null, react_default.a.createElement(react_semantic_ui_datepickers_esm_CustomButton, Object.assign({
|
|
icon: "angle double left",
|
|
title: previousYear
|
|
}, getBackProps({
|
|
calendars: calendars,
|
|
offset: 12
|
|
}))), react_default.a.createElement(react_semantic_ui_datepickers_esm_CustomButton, Object.assign({
|
|
icon: "angle left",
|
|
style: {
|
|
marginRight: 0
|
|
},
|
|
title: previousMonth
|
|
}, getBackProps({
|
|
calendars: calendars
|
|
}))))), react_default.a.createElement("span", {
|
|
title: months[calendar.month] + " " + calendar.year
|
|
}, months[calendar.month].slice(0, 3), " ", calendar.year), react_default.a.createElement("div", {
|
|
style: react_semantic_ui_datepickers_esm_styles.rightBtn
|
|
}, calendarIdx === calendars.length - 1 && react_default.a.createElement(react["Fragment"], null, react_default.a.createElement(react_semantic_ui_datepickers_esm_CustomButton, Object.assign({
|
|
icon: "angle right",
|
|
title: nextMonth
|
|
}, getForwardProps({
|
|
calendars: calendars
|
|
}))), react_default.a.createElement(react_semantic_ui_datepickers_esm_CustomButton, Object.assign({
|
|
icon: "angle double right",
|
|
style: {
|
|
marginRight: 0
|
|
},
|
|
title: nextYear
|
|
}, getForwardProps({
|
|
calendars: calendars,
|
|
offset: 12
|
|
})))))), react_default.a.createElement("div", {
|
|
className: "clndr-days"
|
|
}, weekdays.map(function (weekday) {
|
|
return react_default.a.createElement(react_semantic_ui_datepickers_esm_CalendarCell, {
|
|
key: calendar.year + "-" + calendar.month + "-" + weekday,
|
|
title: weekday
|
|
}, weekday.slice(0, 2));
|
|
}), calendar.weeks.map(function (week) {
|
|
return week.map(function (dateObj, weekIdx) {
|
|
var key = calendar.year + "-" + calendar.month + "-" + weekIdx;
|
|
|
|
if (!dateObj) {
|
|
return react_default.a.createElement(react_semantic_ui_datepickers_esm_CalendarCell, {
|
|
key: key
|
|
});
|
|
}
|
|
|
|
var selectable = dateObj.selectable && filterDate(dateObj.date);
|
|
var shortDate = getShortDate(dateObj.date);
|
|
return react_default.a.createElement(react_semantic_ui_datepickers_esm_CalendarCell, Object.assign({
|
|
key: key
|
|
}, dateObj, getDateProps({
|
|
dateObj: react_semantic_ui_datepickers_esm_extends({}, dateObj, {
|
|
selectable: selectable
|
|
})
|
|
}), {
|
|
"data-testid": "datepicker-cell-" + shortDate,
|
|
selectable: selectable
|
|
}), dateObj.date.getDate());
|
|
});
|
|
})));
|
|
})), showToday && react_default.a.createElement(react_semantic_ui_datepickers_esm_TodayButton, Object.assign({}, react_semantic_ui_datepickers_esm_getToday(minDate, maxDate), getDateProps({
|
|
dateObj: react_semantic_ui_datepickers_esm_getToday(minDate, maxDate)
|
|
})), todayButton));
|
|
};
|
|
|
|
react_semantic_ui_datepickers_esm_Calendar.defaultProps = {
|
|
pointing: 'left',
|
|
showToday: true
|
|
};
|
|
|
|
var react_semantic_ui_datepickers_esm_CustomInput = function CustomInput(_ref) {
|
|
var icon = _ref.icon,
|
|
isClearIconVisible = _ref.isClearIconVisible,
|
|
onClear = _ref.onClear,
|
|
onClick = _ref.onClick,
|
|
value = _ref.value,
|
|
rest = react_semantic_ui_datepickers_esm_objectWithoutPropertiesLoose(_ref, ["icon", "isClearIconVisible", "onClear", "onClick", "value"]);
|
|
|
|
return react_default.a.createElement(collections_Form_Form.Input, Object.assign({}, rest, {
|
|
icon: react_default.a.createElement(elements_Icon_Icon, {
|
|
"data-testid": "datepicker-icon",
|
|
link: true,
|
|
name: isClearIconVisible ? 'close' : icon,
|
|
onClick: isClearIconVisible ? onClear : onClick
|
|
}),
|
|
onClick: onClick,
|
|
value: value
|
|
}));
|
|
};
|
|
|
|
react_semantic_ui_datepickers_esm_CustomInput.defaultProps = {
|
|
icon: 'calendar'
|
|
};
|
|
|
|
var style$1 = {
|
|
display: 'inline-block',
|
|
position: 'relative'
|
|
};
|
|
var semanticInputProps = ['disabled', 'error', 'icon', 'iconPosition', 'id', 'label', 'loading', 'name', 'onBlur', 'onChange', 'onClick', 'onContextMenu', 'onDoubleClick', 'onFocus', 'onInput', 'onKeyDown', 'onKeyPress', 'onKeyUp', 'onMouseDown', 'onMouseEnter', 'onMouseLeave', 'onMouseMove', 'onMouseOut', 'onMouseOver', 'onMouseUp', 'placeholder', 'required', 'size', 'transparent', 'readOnly'];
|
|
|
|
var react_semantic_ui_datepickers_esm_SemanticDatepicker =
|
|
/*#__PURE__*/
|
|
function (_React$Component) {
|
|
_inheritsLoose(SemanticDatepicker, _React$Component);
|
|
|
|
function SemanticDatepicker() {
|
|
var _this;
|
|
|
|
_this = _React$Component.apply(this, arguments) || this;
|
|
_this.el = react_default.a.createRef();
|
|
_this.state = _this.initialState;
|
|
_this.Component = _this.isRangeInput ? react_semantic_ui_datepickers_esm_RangeDatePicker : react_semantic_ui_datepickers_esm_DatePicker;
|
|
|
|
_this.resetState = function (event) {
|
|
var _this$props = _this.props,
|
|
keepOpenOnClear = _this$props.keepOpenOnClear,
|
|
onChange = _this$props.onChange;
|
|
var newState = {
|
|
isVisible: keepOpenOnClear,
|
|
selectedDate: _this.isRangeInput ? [] : null,
|
|
selectedDateFormatted: ''
|
|
};
|
|
|
|
_this.setState(newState, function () {
|
|
onChange(event, react_semantic_ui_datepickers_esm_extends({}, _this.props, {
|
|
value: null
|
|
}));
|
|
});
|
|
};
|
|
|
|
_this.mousedownCb = function (mousedownEvent) {
|
|
var isVisible = _this.state.isVisible;
|
|
|
|
if (isVisible && _this.el) {
|
|
if (_this.el.current && !_this.el.current.contains(mousedownEvent.target)) {
|
|
_this.close();
|
|
}
|
|
}
|
|
};
|
|
|
|
_this.keydownCb = function (keydownEvent) {
|
|
var isVisible = _this.state.isVisible;
|
|
|
|
if (keydownEvent.keyCode === 27 && isVisible) {
|
|
// Escape
|
|
_this.close();
|
|
}
|
|
};
|
|
|
|
_this.close = function () {
|
|
window.removeEventListener('keydown', _this.keydownCb);
|
|
window.removeEventListener('mousedown', _this.mousedownCb);
|
|
|
|
_this.setState({
|
|
isVisible: false
|
|
});
|
|
};
|
|
|
|
_this.showCalendar = function (event) {
|
|
event.preventDefault();
|
|
window.addEventListener('mousedown', _this.mousedownCb);
|
|
window.addEventListener('keydown', _this.keydownCb);
|
|
|
|
_this.setState({
|
|
isVisible: true
|
|
});
|
|
};
|
|
|
|
_this.handleRangeInput = function (newDates, event) {
|
|
var _this$props2 = _this.props,
|
|
format = _this$props2.format,
|
|
keepOpenOnSelect = _this$props2.keepOpenOnSelect,
|
|
onChange = _this$props2.onChange;
|
|
|
|
if (!newDates || !newDates.length) {
|
|
_this.resetState(event);
|
|
|
|
return;
|
|
}
|
|
|
|
var newState = {
|
|
selectedDate: newDates,
|
|
selectedDateFormatted: formatSelectedDate(newDates, format),
|
|
typedValue: null
|
|
};
|
|
|
|
_this.setState(newState, function () {
|
|
onChange(event, react_semantic_ui_datepickers_esm_extends({}, _this.props, {
|
|
value: newDates
|
|
}));
|
|
|
|
if (newDates.length === 2) {
|
|
_this.setState({
|
|
isVisible: keepOpenOnSelect
|
|
});
|
|
}
|
|
});
|
|
};
|
|
|
|
_this.handleBasicInput = function (newDate, event) {
|
|
var _this$props3 = _this.props,
|
|
format = _this$props3.format,
|
|
keepOpenOnSelect = _this$props3.keepOpenOnSelect,
|
|
onChange = _this$props3.onChange,
|
|
clearOnSameDateClick = _this$props3.clearOnSameDateClick;
|
|
|
|
if (!newDate) {
|
|
// if clearOnSameDateClick is true (this is the default case)
|
|
// then reset the state. This is what was previously the default
|
|
// behavior, without a specific prop.
|
|
if (clearOnSameDateClick) {
|
|
_this.resetState(event);
|
|
} else {
|
|
// Don't reset the state. Instead, close or keep open the
|
|
// datepicker according to the value of keepOpenOnSelect.
|
|
// Essentially, follow the default behavior of clicking a date
|
|
// but without changing the value in state.
|
|
_this.setState({
|
|
isVisible: keepOpenOnSelect
|
|
});
|
|
}
|
|
|
|
return;
|
|
}
|
|
|
|
var newState = {
|
|
isVisible: keepOpenOnSelect,
|
|
selectedDate: newDate,
|
|
selectedDateFormatted: formatSelectedDate(newDate, format),
|
|
typedValue: null
|
|
};
|
|
|
|
_this.setState(newState, function () {
|
|
onChange(event, react_semantic_ui_datepickers_esm_extends({}, _this.props, {
|
|
value: newDate
|
|
}));
|
|
});
|
|
};
|
|
|
|
_this.handleBlur = function (event) {
|
|
var _this$props4 = _this.props,
|
|
format = _this$props4.format,
|
|
onBlur = _this$props4.onBlur;
|
|
var typedValue = _this.state.typedValue;
|
|
onBlur(event);
|
|
|
|
if (!typedValue) {
|
|
return;
|
|
}
|
|
|
|
var parsedValue = parseOnBlur(String(typedValue), format, _this.isRangeInput);
|
|
|
|
if (_this.isRangeInput) {
|
|
var areDatesValid = parsedValue.every(is_valid_default.a);
|
|
|
|
if (areDatesValid) {
|
|
_this.handleRangeInput(parsedValue, event);
|
|
|
|
return;
|
|
}
|
|
} else {
|
|
var isDateValid = is_valid_default()(parsedValue);
|
|
|
|
if (isDateValid) {
|
|
_this.handleBasicInput(parsedValue, event);
|
|
|
|
return;
|
|
}
|
|
}
|
|
|
|
_this.setState({
|
|
typedValue: null
|
|
});
|
|
};
|
|
|
|
_this.handleChange = function (event, _ref) {
|
|
var value = _ref.value;
|
|
var _this$props5 = _this.props,
|
|
allowOnlyNumbers = _this$props5.allowOnlyNumbers,
|
|
format = _this$props5.format,
|
|
onChange = _this$props5.onChange;
|
|
var formatString = _this.isRangeInput ? format + " - " + format : format;
|
|
var typedValue = allowOnlyNumbers ? onlyNumbers(value) : value;
|
|
|
|
if (!typedValue) {
|
|
var newState = {
|
|
selectedDate: _this.isRangeInput ? [] : null,
|
|
selectedDateFormatted: '',
|
|
typedValue: null
|
|
};
|
|
|
|
_this.setState(newState, function () {
|
|
onChange(event, react_semantic_ui_datepickers_esm_extends({}, _this.props, {
|
|
value: null
|
|
}));
|
|
});
|
|
|
|
return;
|
|
}
|
|
|
|
_this.setState({
|
|
selectedDate: _this.isRangeInput ? [] : null,
|
|
selectedDateFormatted: '',
|
|
typedValue: format_string_by_pattern_es5(formatString, typedValue)
|
|
});
|
|
};
|
|
|
|
_this.handleKeyDown = function (evt) {
|
|
// If the Enter key was pressed...
|
|
if (evt.keyCode === 13) {
|
|
_this.handleBlur();
|
|
}
|
|
};
|
|
|
|
_this.onDateSelected = function (event, dateOrDates) {
|
|
if (_this.isRangeInput) {
|
|
_this.handleRangeInput(dateOrDates, event);
|
|
} else {
|
|
_this.handleBasicInput(dateOrDates, event);
|
|
}
|
|
};
|
|
|
|
return _this;
|
|
}
|
|
|
|
var _proto = SemanticDatepicker.prototype;
|
|
|
|
_proto.componentDidUpdate = function componentDidUpdate(prevProps) {
|
|
var _this$props6 = this.props,
|
|
locale = _this$props6.locale,
|
|
value = _this$props6.value;
|
|
|
|
if (!react_fast_compare_default()(value, prevProps.value)) {
|
|
this.onDateSelected(undefined, value);
|
|
}
|
|
|
|
if (locale !== prevProps.locale) {
|
|
this.setState({
|
|
locale: this.locale
|
|
});
|
|
}
|
|
};
|
|
|
|
_proto.render = function render() {
|
|
var _this2 = this;
|
|
|
|
var _this$state = this.state,
|
|
isVisible = _this$state.isVisible,
|
|
locale = _this$state.locale,
|
|
selectedDate = _this$state.selectedDate,
|
|
selectedDateFormatted = _this$state.selectedDateFormatted,
|
|
typedValue = _this$state.typedValue;
|
|
var _this$props7 = this.props,
|
|
clearable = _this$props7.clearable,
|
|
pointing = _this$props7.pointing,
|
|
filterDate = _this$props7.filterDate,
|
|
readOnly = _this$props7.readOnly;
|
|
return react_default.a.createElement("div", {
|
|
className: "field",
|
|
style: style$1,
|
|
ref: this.el
|
|
}, react_default.a.createElement(react_semantic_ui_datepickers_esm_CustomInput, Object.assign({}, this.inputProps, {
|
|
isClearIconVisible: Boolean(clearable && selectedDateFormatted),
|
|
onBlur: this.handleBlur,
|
|
onChange: this.handleChange,
|
|
onClear: this.resetState,
|
|
onClick: readOnly ? null : this.showCalendar,
|
|
onKeyDown: this.handleKeyDown,
|
|
value: typedValue || selectedDateFormatted
|
|
})), isVisible && react_default.a.createElement(this.Component, Object.assign({}, this.dayzedProps, {
|
|
monthsToDisplay: this.isRangeInput ? 2 : 1,
|
|
onChange: this.onDateSelected,
|
|
selected: selectedDate,
|
|
date: this.date
|
|
}), function (props) {
|
|
return react_default.a.createElement(react_semantic_ui_datepickers_esm_Calendar, Object.assign({}, _this2.dayzedProps, props, locale, {
|
|
filterDate: filterDate,
|
|
pointing: pointing,
|
|
weekdays: _this2.weekdays
|
|
}));
|
|
}));
|
|
};
|
|
|
|
react_semantic_ui_datepickers_esm_createClass(SemanticDatepicker, [{
|
|
key: "isRangeInput",
|
|
get: function get() {
|
|
return this.props.type === 'range';
|
|
}
|
|
}, {
|
|
key: "initialState",
|
|
get: function get() {
|
|
var _this$props8 = this.props,
|
|
format = _this$props8.format,
|
|
value = _this$props8.value;
|
|
var initialSelectedDate = this.isRangeInput ? [] : null;
|
|
return {
|
|
isVisible: false,
|
|
locale: this.locale,
|
|
selectedDate: value || initialSelectedDate,
|
|
selectedDateFormatted: formatSelectedDate(value, format),
|
|
typedValue: null
|
|
};
|
|
}
|
|
}, {
|
|
key: "dayzedProps",
|
|
get: function get() {
|
|
return omit(semanticInputProps, this.props);
|
|
}
|
|
}, {
|
|
key: "inputProps",
|
|
get: function get() {
|
|
var props = react_semantic_ui_datepickers_esm_pick(semanticInputProps, this.props);
|
|
var placeholder = props.placeholder || this.props.format;
|
|
return react_semantic_ui_datepickers_esm_extends({}, props, {
|
|
placeholder: placeholder
|
|
});
|
|
}
|
|
}, {
|
|
key: "date",
|
|
get: function get() {
|
|
var selectedDate = this.state.selectedDate;
|
|
var date = this.props.date;
|
|
|
|
if (!selectedDate) {
|
|
return date;
|
|
}
|
|
|
|
return this.isRangeInput ? selectedDate[0] : selectedDate || date;
|
|
}
|
|
}, {
|
|
key: "locale",
|
|
get: function get() {
|
|
var locale = this.props.locale;
|
|
var localeJson;
|
|
|
|
try {
|
|
localeJson = __webpack_require__(632)("./" + locale + ".json");
|
|
} catch (e) {
|
|
console.warn("\"" + locale + "\" is not a valid locale");
|
|
localeJson = __webpack_require__(264);
|
|
}
|
|
|
|
return localeJson;
|
|
}
|
|
}, {
|
|
key: "weekdays",
|
|
get: function get() {
|
|
var firstDayOfWeek = this.dayzedProps.firstDayOfWeek;
|
|
var weekdays = this.state.locale.weekdays;
|
|
return moveElementsByN(firstDayOfWeek, weekdays);
|
|
}
|
|
}]);
|
|
|
|
return SemanticDatepicker;
|
|
}(react_default.a.Component);
|
|
|
|
react_semantic_ui_datepickers_esm_SemanticDatepicker.defaultProps = {
|
|
allowOnlyNumbers: false,
|
|
clearOnSameDateClick: true,
|
|
clearable: true,
|
|
date: undefined,
|
|
filterDate: function filterDate() {
|
|
return true;
|
|
},
|
|
firstDayOfWeek: 0,
|
|
format: 'YYYY-MM-DD',
|
|
id: undefined,
|
|
keepOpenOnClear: false,
|
|
keepOpenOnSelect: false,
|
|
label: undefined,
|
|
locale: 'en-US',
|
|
name: undefined,
|
|
onBlur: function onBlur() {},
|
|
onChange: function onChange() {},
|
|
placeholder: null,
|
|
pointing: 'left',
|
|
readOnly: false,
|
|
required: false,
|
|
showOutsideDays: false,
|
|
type: 'basic',
|
|
value: null
|
|
};
|
|
|
|
/* harmony default export */ var react_semantic_ui_datepickers_esm = (react_semantic_ui_datepickers_esm_SemanticDatepicker);
|
|
//# sourceMappingURL=react-semantic-ui-datepickers.esm.js.map
|
|
|
|
// EXTERNAL MODULE: ./node_modules/react-semantic-ui-datepickers/dist/react-semantic-ui-datepickers.css
|
|
var react_semantic_ui_datepickers = __webpack_require__(646);
|
|
|
|
// CONCATENATED MODULE: ./frontend/components/Subscriptions/CreateSubscription.jsx
|
|
function CreateSubscription_typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { CreateSubscription_typeof = function _typeof(obj) { return typeof obj; }; } else { CreateSubscription_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return CreateSubscription_typeof(obj); }
|
|
|
|
function CreateSubscription_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
|
|
function CreateSubscription_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { CreateSubscription_ownKeys(source, true).forEach(function (key) { CreateSubscription_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { CreateSubscription_ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
|
|
function CreateSubscription_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
|
|
function CreateSubscription_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
|
|
function CreateSubscription_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); } }
|
|
|
|
function CreateSubscription_createClass(Constructor, protoProps, staticProps) { if (protoProps) CreateSubscription_defineProperties(Constructor.prototype, protoProps); if (staticProps) CreateSubscription_defineProperties(Constructor, staticProps); return Constructor; }
|
|
|
|
function CreateSubscription_possibleConstructorReturn(self, call) { if (call && (CreateSubscription_typeof(call) === "object" || typeof call === "function")) { return call; } return CreateSubscription_assertThisInitialized(self); }
|
|
|
|
function CreateSubscription_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
|
|
function CreateSubscription_getPrototypeOf(o) { CreateSubscription_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return CreateSubscription_getPrototypeOf(o); }
|
|
|
|
function CreateSubscription_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) CreateSubscription_setPrototypeOf(subClass, superClass); }
|
|
|
|
function CreateSubscription_setPrototypeOf(o, p) { CreateSubscription_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return CreateSubscription_setPrototypeOf(o, p); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var CreateSubscription_CreateSubscription =
|
|
/*#__PURE__*/
|
|
function (_React$Component) {
|
|
CreateSubscription_inherits(CreateSubscription, _React$Component);
|
|
|
|
function CreateSubscription(props) {
|
|
var _this;
|
|
|
|
CreateSubscription_classCallCheck(this, CreateSubscription);
|
|
|
|
_this = CreateSubscription_possibleConstructorReturn(this, CreateSubscription_getPrototypeOf(CreateSubscription).call(this, props));
|
|
_this.state = {
|
|
values: {}
|
|
};
|
|
return _this;
|
|
}
|
|
|
|
CreateSubscription_createClass(CreateSubscription, [{
|
|
key: "setValue",
|
|
value: function setValue(key, value) {
|
|
var new_values = CreateSubscription_objectSpread({}, this.state.values);
|
|
|
|
new_values[key] = value;
|
|
this.setState({
|
|
values: new_values
|
|
});
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function render() {
|
|
var _this2 = this;
|
|
|
|
var values = this.state.values;
|
|
var _this$context = this.context,
|
|
contacts = _this$context.contacts,
|
|
chats = _this$context.chats;
|
|
var fields = [{
|
|
type: 'contacts',
|
|
label: 'Contact',
|
|
name: 'contact_id'
|
|
}, {
|
|
type: 'chats',
|
|
label: 'Chat',
|
|
name: 'chat_id'
|
|
}, {
|
|
type: 'radio',
|
|
label: 'Payment Interval',
|
|
name: 'interval',
|
|
options: ['daily', 'weekly', 'monthly']
|
|
}, {
|
|
type: 'checkbox',
|
|
label: 'Amount',
|
|
name: 'amount',
|
|
options: [500, 1000, 2000, 'custom']
|
|
}, {
|
|
type: 'multi',
|
|
label: 'End Rule',
|
|
name: 'endRule',
|
|
options: [{
|
|
name: 'end_number',
|
|
type: 'number',
|
|
label: 'Make Payments'
|
|
}, {
|
|
name: 'end_date',
|
|
type: 'date',
|
|
label: 'Pay Until'
|
|
}]
|
|
}];
|
|
var ready = values.contact_id && //values.chat_id &&
|
|
values.interval && values.amount && (values.endRule === 'date' && values.end_date || values.endRule === 'number' && values.end_number);
|
|
return react_default.a.createElement(collections_Form_Form, {
|
|
onSubmit: function onSubmit() {
|
|
var v = {
|
|
interval: values.interval,
|
|
contact_id: values.contact_id,
|
|
amount: values.amount
|
|
};
|
|
|
|
if (values.chat_id) {
|
|
v.chat_id = values.chat_id;
|
|
}
|
|
|
|
if (values.endRule === 'date') {
|
|
v.end_date = values.end_date;
|
|
}
|
|
|
|
if (values.endRule === 'number') {
|
|
v.end_number = values.end_number;
|
|
}
|
|
|
|
_this2.props.onSave(v);
|
|
}
|
|
}, fields.map(function (f) {
|
|
if (f.type === 'contacts') {
|
|
return react_default.a.createElement(collections_Form_Form.Field, {
|
|
key: f.name
|
|
}, react_default.a.createElement("label", null, f.label, ":"), react_default.a.createElement("select", {
|
|
onChange: function onChange(event) {
|
|
return _this2.setValue(f.name, parseInt(event.target.value));
|
|
}
|
|
}, contacts.map(function (contact) {
|
|
return react_default.a.createElement("option", {
|
|
value: contact.id,
|
|
key: contact.id
|
|
}, contact.alias, " (", contact.public_key, ")");
|
|
})));
|
|
}
|
|
|
|
if (f.type === 'chats') {
|
|
return react_default.a.createElement(collections_Form_Form.Field, {
|
|
key: f.name
|
|
}, react_default.a.createElement("label", null, f.label, ":"), react_default.a.createElement("select", {
|
|
onChange: function onChange(event) {
|
|
return _this2.setValue(f.name, parseInt(event.target.value));
|
|
}
|
|
}, react_default.a.createElement("option", null, "Select Chat:"), chats.map(function (chat) {
|
|
return react_default.a.createElement("option", {
|
|
value: chat.id,
|
|
key: chat.id
|
|
}, chat.uuid);
|
|
})));
|
|
}
|
|
|
|
if (f.type === 'radio') {
|
|
return react_default.a.createElement(collections_Form_Form.Field, {
|
|
key: f.name
|
|
}, react_default.a.createElement("label", null, f.label, ": ", react_default.a.createElement("b", null, values[f.name])), f.options.map(function (o) {
|
|
return react_default.a.createElement(collections_Form_Form.Field, {
|
|
key: o
|
|
}, react_default.a.createElement(Radio_Radio, {
|
|
label: o,
|
|
name: f.name,
|
|
value: o,
|
|
checked: values[f.name] === o,
|
|
onChange: function onChange() {
|
|
return _this2.setValue(f.name, o);
|
|
}
|
|
}));
|
|
}));
|
|
}
|
|
|
|
if (f.type === 'checkbox') {
|
|
return react_default.a.createElement(collections_Form_Form.Field, {
|
|
key: f.name
|
|
}, react_default.a.createElement("label", null, f.label, ": ", react_default.a.createElement("b", null, values[f.name])), f.options.map(function (o) {
|
|
if (o === 'custom') {
|
|
return react_default.a.createElement(collections_Form_Form.Field, {
|
|
key: o
|
|
}, react_default.a.createElement("span", null, "Custom amount:"), react_default.a.createElement("input", {
|
|
value: values[f.name],
|
|
onChange: function onChange(e) {
|
|
return _this2.setValue(f.name, parseInt(e.target.value));
|
|
},
|
|
type: "number"
|
|
}));
|
|
}
|
|
|
|
return react_default.a.createElement(collections_Form_Form.Field, {
|
|
key: o
|
|
}, react_default.a.createElement(Checkbox_Checkbox, {
|
|
label: o,
|
|
name: f.name,
|
|
value: o,
|
|
checked: values[f.name] === o,
|
|
onChange: function onChange() {
|
|
return _this2.setValue(f.name, o);
|
|
}
|
|
}));
|
|
}));
|
|
}
|
|
|
|
if (f.type === 'multi') {
|
|
return react_default.a.createElement(collections_Form_Form.Field, {
|
|
key: f.name
|
|
}, react_default.a.createElement("label", null, f.label, ":"), f.options.map(function (o) {
|
|
if (o.type === 'date') {
|
|
return react_default.a.createElement("div", {
|
|
key: o.name
|
|
}, react_default.a.createElement(Checkbox_Checkbox, {
|
|
label: o.label,
|
|
name: f.name,
|
|
value: o.type,
|
|
checked: values[f.name] === o.type,
|
|
onChange: function onChange() {
|
|
return _this2.setValue(f.name, o.type);
|
|
}
|
|
}), "\xA0\xA0", react_default.a.createElement(react_semantic_ui_datepickers_esm, {
|
|
disabled: values[f.name] !== o.type,
|
|
onChange: function onChange(e, a) {
|
|
return _this2.setValue(o.name, a.value.toDateString());
|
|
}
|
|
}));
|
|
}
|
|
|
|
if (o.type === 'number') {
|
|
return react_default.a.createElement("div", {
|
|
key: o.name
|
|
}, react_default.a.createElement(Checkbox_Checkbox, {
|
|
label: o.label,
|
|
name: f.name,
|
|
value: o.type,
|
|
checked: values[f.name] === o.type,
|
|
onChange: function onChange() {
|
|
return _this2.setValue(f.name, o.type);
|
|
}
|
|
}), "\xA0\xA0", react_default.a.createElement("input", {
|
|
disabled: values[f.name] !== o.type,
|
|
value: values[o.name],
|
|
onChange: function onChange(e) {
|
|
return _this2.setValue(o.name, parseInt(e.target.value));
|
|
},
|
|
type: "number",
|
|
style: {
|
|
display: 'inline-block',
|
|
width: '80%',
|
|
verticalAlign: 'middle'
|
|
}
|
|
}));
|
|
}
|
|
}));
|
|
}
|
|
}), react_default.a.createElement("div", null, react_default.a.createElement("button", {
|
|
disabled: !ready,
|
|
className: "ui button primary"
|
|
}, "Save")));
|
|
}
|
|
}]);
|
|
|
|
return CreateSubscription;
|
|
}(react_default.a.Component);
|
|
|
|
CreateSubscription_CreateSubscription.contextType = ctx;
|
|
/* harmony default export */ var Subscriptions_CreateSubscription = (CreateSubscription_CreateSubscription);
|
|
// CONCATENATED MODULE: ./frontend/components/Subscriptions/index.jsx
|
|
function Subscriptions_typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { Subscriptions_typeof = function _typeof(obj) { return typeof obj; }; } else { Subscriptions_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return Subscriptions_typeof(obj); }
|
|
|
|
function Subscriptions_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
|
|
function Subscriptions_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); } }
|
|
|
|
function Subscriptions_createClass(Constructor, protoProps, staticProps) { if (protoProps) Subscriptions_defineProperties(Constructor.prototype, protoProps); if (staticProps) Subscriptions_defineProperties(Constructor, staticProps); return Constructor; }
|
|
|
|
function Subscriptions_possibleConstructorReturn(self, call) { if (call && (Subscriptions_typeof(call) === "object" || typeof call === "function")) { return call; } return Subscriptions_assertThisInitialized(self); }
|
|
|
|
function Subscriptions_getPrototypeOf(o) { Subscriptions_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return Subscriptions_getPrototypeOf(o); }
|
|
|
|
function Subscriptions_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
|
|
function Subscriptions_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) Subscriptions_setPrototypeOf(subClass, superClass); }
|
|
|
|
function Subscriptions_setPrototypeOf(o, p) { Subscriptions_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return Subscriptions_setPrototypeOf(o, p); }
|
|
|
|
|
|
|
|
|
|
|
|
var Subscriptions_Subscriptions =
|
|
/*#__PURE__*/
|
|
function (_React$Component) {
|
|
Subscriptions_inherits(Subscriptions, _React$Component);
|
|
|
|
function Subscriptions() {
|
|
var _this;
|
|
|
|
Subscriptions_classCallCheck(this, Subscriptions);
|
|
|
|
_this = Subscriptions_possibleConstructorReturn(this, Subscriptions_getPrototypeOf(Subscriptions).call(this));
|
|
_this.state = {
|
|
create: false
|
|
};
|
|
_this.createSub = _this.createSub.bind(Subscriptions_assertThisInitialized(_this));
|
|
return _this;
|
|
}
|
|
|
|
Subscriptions_createClass(Subscriptions, [{
|
|
key: "createSub",
|
|
value: function createSub(values) {
|
|
var _this2 = this;
|
|
|
|
fetch("/subscriptions", {
|
|
method: 'POST',
|
|
body: new URLSearchParams(values),
|
|
headers: new Headers({
|
|
'Content-type': 'application/x-www-form-urlencoded; charset=UTF-8'
|
|
})
|
|
}).then(function (r) {
|
|
return r.json();
|
|
}).then(function (body) {
|
|
console.log('created subscriptions', {
|
|
body: body
|
|
});
|
|
|
|
_this2.props.getSubscriptions();
|
|
|
|
_this2.setState({
|
|
create: false
|
|
});
|
|
});
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function render() {
|
|
var _this3 = this;
|
|
|
|
var subscriptions = this.context.subscriptions;
|
|
var create = this.state.create;
|
|
console.log(subscriptions);
|
|
|
|
if (create) {
|
|
return react_default.a.createElement(Subscriptions_CreateSubscription, {
|
|
onSave: this.createSub
|
|
});
|
|
}
|
|
|
|
return react_default.a.createElement(react_default.a.Fragment, null, react_default.a.createElement("ul", null, subscriptions.map(function (sub) {
|
|
return react_default.a.createElement("li", null, react_default.a.createElement("pre", null, JSON.stringify(sub, null, 2)));
|
|
})), react_default.a.createElement("button", {
|
|
className: "ui button",
|
|
onClick: function onClick() {
|
|
return _this3.setState({
|
|
create: !create
|
|
});
|
|
}
|
|
}, "Add Subscription"));
|
|
}
|
|
}]);
|
|
|
|
return Subscriptions;
|
|
}(react_default.a.Component);
|
|
|
|
Subscriptions_Subscriptions.contextType = ctx;
|
|
/* harmony default export */ var components_Subscriptions = (Subscriptions_Subscriptions);
|
|
// CONCATENATED MODULE: ./node_modules/tslib/tslib.es6.js
|
|
/*! *****************************************************************************
|
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
this file except in compliance with the License. You may obtain a copy of the
|
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
|
|
See the Apache Version 2.0 License for specific language governing permissions
|
|
and limitations under the License.
|
|
***************************************************************************** */
|
|
/* global Reflect, Promise */
|
|
|
|
var extendStatics = function(d, b) {
|
|
extendStatics = Object.setPrototypeOf ||
|
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
return extendStatics(d, b);
|
|
};
|
|
|
|
function __extends(d, b) {
|
|
extendStatics(d, b);
|
|
function __() { this.constructor = d; }
|
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
}
|
|
|
|
var __assign = function() {
|
|
__assign = Object.assign || function __assign(t) {
|
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
s = arguments[i];
|
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
}
|
|
return t;
|
|
}
|
|
return __assign.apply(this, arguments);
|
|
}
|
|
|
|
function __rest(s, e) {
|
|
var t = {};
|
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
t[p] = s[p];
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
t[p[i]] = s[p[i]];
|
|
}
|
|
return t;
|
|
}
|
|
|
|
function __decorate(decorators, target, key, desc) {
|
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
}
|
|
|
|
function __param(paramIndex, decorator) {
|
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
}
|
|
|
|
function __metadata(metadataKey, metadataValue) {
|
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
|
}
|
|
|
|
function __awaiter(thisArg, _arguments, P, generator) {
|
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
});
|
|
}
|
|
|
|
function __generator(thisArg, body) {
|
|
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
function step(op) {
|
|
if (f) throw new TypeError("Generator is already executing.");
|
|
while (_) try {
|
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
switch (op[0]) {
|
|
case 0: case 1: t = op; break;
|
|
case 4: _.label++; return { value: op[1], done: false };
|
|
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
default:
|
|
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
if (t[2]) _.ops.pop();
|
|
_.trys.pop(); continue;
|
|
}
|
|
op = body.call(thisArg, _);
|
|
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
}
|
|
}
|
|
|
|
function __exportStar(m, exports) {
|
|
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
}
|
|
|
|
function __values(o) {
|
|
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
|
|
if (m) return m.call(o);
|
|
return {
|
|
next: function () {
|
|
if (o && i >= o.length) o = void 0;
|
|
return { value: o && o[i++], done: !o };
|
|
}
|
|
};
|
|
}
|
|
|
|
function __read(o, n) {
|
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
if (!m) return o;
|
|
var i = m.call(o), r, ar = [], e;
|
|
try {
|
|
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
}
|
|
catch (error) { e = { error: error }; }
|
|
finally {
|
|
try {
|
|
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
}
|
|
finally { if (e) throw e.error; }
|
|
}
|
|
return ar;
|
|
}
|
|
|
|
function __spread() {
|
|
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
ar = ar.concat(__read(arguments[i]));
|
|
return ar;
|
|
}
|
|
|
|
function __spreadArrays() {
|
|
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
r[k] = a[j];
|
|
return r;
|
|
};
|
|
|
|
function __await(v) {
|
|
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
}
|
|
|
|
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
|
|
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
function fulfill(value) { resume("next", value); }
|
|
function reject(value) { resume("throw", value); }
|
|
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
|
|
}
|
|
|
|
function __asyncDelegator(o) {
|
|
var i, p;
|
|
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
|
}
|
|
|
|
function __asyncValues(o) {
|
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
var m = o[Symbol.asyncIterator], i;
|
|
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
|
}
|
|
|
|
function __makeTemplateObject(cooked, raw) {
|
|
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
return cooked;
|
|
};
|
|
|
|
function __importStar(mod) {
|
|
if (mod && mod.__esModule) return mod;
|
|
var result = {};
|
|
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
|
result.default = mod;
|
|
return result;
|
|
}
|
|
|
|
function __importDefault(mod) {
|
|
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
}
|
|
|
|
// CONCATENATED MODULE: ./node_modules/file-selector/dist/es5/file.js
|
|
var COMMON_MIME_TYPES = new Map([
|
|
['avi', 'video/avi'],
|
|
['gif', 'image/gif'],
|
|
['ico', 'image/x-icon'],
|
|
['jpeg', 'image/jpeg'],
|
|
['jpg', 'image/jpeg'],
|
|
['mkv', 'video/x-matroska'],
|
|
['mov', 'video/quicktime'],
|
|
['mp4', 'video/mp4'],
|
|
['pdf', 'application/pdf'],
|
|
['png', 'image/png'],
|
|
['zip', 'application/zip'],
|
|
['doc', 'application/msword'],
|
|
['docx', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document']
|
|
]);
|
|
function toFileWithPath(file, path) {
|
|
var f = withMimeType(file);
|
|
if (typeof f.path !== 'string') { // on electron, path is already set to the absolute path
|
|
var webkitRelativePath = file.webkitRelativePath;
|
|
Object.defineProperty(f, 'path', {
|
|
value: typeof path === 'string'
|
|
? path
|
|
// If <input webkitdirectory> is set,
|
|
// the File will have a {webkitRelativePath} property
|
|
// https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/webkitdirectory
|
|
: typeof webkitRelativePath === 'string' && webkitRelativePath.length > 0
|
|
? webkitRelativePath
|
|
: file.name,
|
|
writable: false,
|
|
configurable: false,
|
|
enumerable: true
|
|
});
|
|
}
|
|
return f;
|
|
}
|
|
function withMimeType(file) {
|
|
var name = file.name;
|
|
var hasExtension = name && name.lastIndexOf('.') !== -1;
|
|
if (hasExtension && !file.type) {
|
|
var ext = name.split('.')
|
|
.pop().toLowerCase();
|
|
var type = COMMON_MIME_TYPES.get(ext);
|
|
if (type) {
|
|
Object.defineProperty(file, 'type', {
|
|
value: type,
|
|
writable: false,
|
|
configurable: false,
|
|
enumerable: true
|
|
});
|
|
}
|
|
}
|
|
return file;
|
|
}
|
|
//# sourceMappingURL=file.js.map
|
|
// CONCATENATED MODULE: ./node_modules/file-selector/dist/es5/file-selector.js
|
|
|
|
|
|
var FILES_TO_IGNORE = [
|
|
// Thumbnail cache files for macOS and Windows
|
|
'.DS_Store',
|
|
'Thumbs.db' // Windows
|
|
];
|
|
/**
|
|
* Convert a DragEvent's DataTrasfer object to a list of File objects
|
|
* NOTE: If some of the items are folders,
|
|
* everything will be flattened and placed in the same list but the paths will be kept as a {path} property.
|
|
* @param evt
|
|
*/
|
|
function fromEvent(evt) {
|
|
return __awaiter(this, void 0, void 0, function () {
|
|
return __generator(this, function (_a) {
|
|
return [2 /*return*/, isDragEvt(evt) && evt.dataTransfer
|
|
? getDataTransferFiles(evt.dataTransfer, evt.type)
|
|
: getInputFiles(evt)];
|
|
});
|
|
});
|
|
}
|
|
function isDragEvt(value) {
|
|
return !!value.dataTransfer;
|
|
}
|
|
function getInputFiles(evt) {
|
|
var files = isInput(evt.target)
|
|
? evt.target.files
|
|
? fromList(evt.target.files)
|
|
: []
|
|
: [];
|
|
return files.map(function (file) { return toFileWithPath(file); });
|
|
}
|
|
function isInput(value) {
|
|
return value !== null;
|
|
}
|
|
function getDataTransferFiles(dt, type) {
|
|
return __awaiter(this, void 0, void 0, function () {
|
|
var items, files;
|
|
return __generator(this, function (_a) {
|
|
switch (_a.label) {
|
|
case 0:
|
|
if (!dt.items) return [3 /*break*/, 2];
|
|
items = fromList(dt.items)
|
|
.filter(function (item) { return item.kind === 'file'; });
|
|
// According to https://html.spec.whatwg.org/multipage/dnd.html#dndevents,
|
|
// only 'dragstart' and 'drop' has access to the data (source node)
|
|
if (type !== 'drop') {
|
|
return [2 /*return*/, items];
|
|
}
|
|
return [4 /*yield*/, Promise.all(items.map(toFilePromises))];
|
|
case 1:
|
|
files = _a.sent();
|
|
return [2 /*return*/, noIgnoredFiles(flatten(files))];
|
|
case 2: return [2 /*return*/, noIgnoredFiles(fromList(dt.files)
|
|
.map(function (file) { return toFileWithPath(file); }))];
|
|
}
|
|
});
|
|
});
|
|
}
|
|
function noIgnoredFiles(files) {
|
|
return files.filter(function (file) { return FILES_TO_IGNORE.indexOf(file.name) === -1; });
|
|
}
|
|
// IE11 does not support Array.from()
|
|
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from#Browser_compatibility
|
|
// https://developer.mozilla.org/en-US/docs/Web/API/FileList
|
|
// https://developer.mozilla.org/en-US/docs/Web/API/DataTransferItemList
|
|
function fromList(items) {
|
|
var files = [];
|
|
// tslint:disable: prefer-for-of
|
|
for (var i = 0; i < items.length; i++) {
|
|
var file = items[i];
|
|
files.push(file);
|
|
}
|
|
return files;
|
|
}
|
|
// https://developer.mozilla.org/en-US/docs/Web/API/DataTransferItem
|
|
function toFilePromises(item) {
|
|
if (typeof item.webkitGetAsEntry !== 'function') {
|
|
return fromDataTransferItem(item);
|
|
}
|
|
var entry = item.webkitGetAsEntry();
|
|
// Safari supports dropping an image node from a different window and can be retrieved using
|
|
// the DataTransferItem.getAsFile() API
|
|
// NOTE: FileSystemEntry.file() throws if trying to get the file
|
|
if (entry && entry.isDirectory) {
|
|
return fromDirEntry(entry);
|
|
}
|
|
return fromDataTransferItem(item);
|
|
}
|
|
function flatten(items) {
|
|
return items.reduce(function (acc, files) { return __spread(acc, (Array.isArray(files) ? flatten(files) : [files])); }, []);
|
|
}
|
|
function fromDataTransferItem(item) {
|
|
var file = item.getAsFile();
|
|
if (!file) {
|
|
return Promise.reject(item + " is not a File");
|
|
}
|
|
var fwp = toFileWithPath(file);
|
|
return Promise.resolve(fwp);
|
|
}
|
|
// https://developer.mozilla.org/en-US/docs/Web/API/FileSystemEntry
|
|
function fromEntry(entry) {
|
|
return __awaiter(this, void 0, void 0, function () {
|
|
return __generator(this, function (_a) {
|
|
return [2 /*return*/, entry.isDirectory ? fromDirEntry(entry) : fromFileEntry(entry)];
|
|
});
|
|
});
|
|
}
|
|
// https://developer.mozilla.org/en-US/docs/Web/API/FileSystemDirectoryEntry
|
|
function fromDirEntry(entry) {
|
|
var reader = entry.createReader();
|
|
return new Promise(function (resolve, reject) {
|
|
var entries = [];
|
|
function readEntries() {
|
|
var _this = this;
|
|
// https://developer.mozilla.org/en-US/docs/Web/API/FileSystemDirectoryEntry/createReader
|
|
// https://developer.mozilla.org/en-US/docs/Web/API/FileSystemDirectoryReader/readEntries
|
|
reader.readEntries(function (batch) { return __awaiter(_this, void 0, void 0, function () {
|
|
var files, err_1, items;
|
|
return __generator(this, function (_a) {
|
|
switch (_a.label) {
|
|
case 0:
|
|
if (!!batch.length) return [3 /*break*/, 5];
|
|
_a.label = 1;
|
|
case 1:
|
|
_a.trys.push([1, 3, , 4]);
|
|
return [4 /*yield*/, Promise.all(entries)];
|
|
case 2:
|
|
files = _a.sent();
|
|
resolve(files);
|
|
return [3 /*break*/, 4];
|
|
case 3:
|
|
err_1 = _a.sent();
|
|
reject(err_1);
|
|
return [3 /*break*/, 4];
|
|
case 4: return [3 /*break*/, 6];
|
|
case 5:
|
|
items = Promise.all(batch.map(fromEntry));
|
|
entries.push(items);
|
|
// Continue reading
|
|
readEntries();
|
|
_a.label = 6;
|
|
case 6: return [2 /*return*/];
|
|
}
|
|
});
|
|
}); }, function (err) {
|
|
reject(err);
|
|
});
|
|
}
|
|
readEntries();
|
|
});
|
|
}
|
|
// https://developer.mozilla.org/en-US/docs/Web/API/FileSystemFileEntry
|
|
function fromFileEntry(entry) {
|
|
return __awaiter(this, void 0, void 0, function () {
|
|
return __generator(this, function (_a) {
|
|
return [2 /*return*/, new Promise(function (resolve, reject) {
|
|
entry.file(function (file) {
|
|
var fwp = toFileWithPath(file, entry.fullPath);
|
|
resolve(fwp);
|
|
}, function (err) {
|
|
reject(err);
|
|
});
|
|
})];
|
|
});
|
|
});
|
|
}
|
|
//# sourceMappingURL=file-selector.js.map
|
|
// CONCATENATED MODULE: ./node_modules/file-selector/dist/es5/index.js
|
|
|
|
//# sourceMappingURL=index.js.map
|
|
// EXTERNAL MODULE: ./node_modules/attr-accept/dist/index.js
|
|
var dist = __webpack_require__(284);
|
|
var dist_default = /*#__PURE__*/__webpack_require__.n(dist);
|
|
|
|
// CONCATENATED MODULE: ./node_modules/react-dropzone/dist/es/utils/index.js
|
|
function utils_typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { utils_typeof = function _typeof(obj) { return typeof obj; }; } else { utils_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return utils_typeof(obj); }
|
|
|
|
// Firefox versions prior to 53 return a bogus MIME type for every file drag, so dragovers with
|
|
// that MIME type will always be accepted
|
|
|
|
function fileAccepted(file, accept) {
|
|
return file.type === 'application/x-moz-file' || dist_default()(file, accept);
|
|
}
|
|
function fileMatchSize(file, minSize, maxSize) {
|
|
if (isDefined(file.size)) {
|
|
if (isDefined(minSize) && isDefined(maxSize)) return file.size >= minSize && file.size <= maxSize;else if (isDefined(minSize)) return file.size >= minSize;else if (isDefined(maxSize)) return file.size <= maxSize;
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
function isDefined(value) {
|
|
return value !== undefined && value !== null;
|
|
}
|
|
|
|
function allFilesAccepted(files, accept, minSize, maxSize) {
|
|
return files.every(function (file) {
|
|
return fileAccepted(file, accept) && fileMatchSize(file, minSize, maxSize);
|
|
});
|
|
} // React's synthetic events has event.isPropagationStopped,
|
|
// but to remain compatibility with other libs (Preact) fall back
|
|
// to check event.cancelBubble
|
|
|
|
function isPropagationStopped(event) {
|
|
if (typeof event.isPropagationStopped === 'function') {
|
|
return event.isPropagationStopped();
|
|
} else if (typeof event.cancelBubble !== 'undefined') {
|
|
return event.cancelBubble;
|
|
}
|
|
|
|
return false;
|
|
}
|
|
function isEvtWithFiles(event) {
|
|
if (!event.dataTransfer) {
|
|
return !!event.target && !!event.target.files;
|
|
} // https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/types
|
|
// https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API/Recommended_drag_types#file
|
|
|
|
|
|
return Array.prototype.some.call(event.dataTransfer.types, function (type) {
|
|
return type === 'Files' || type === 'application/x-moz-file';
|
|
});
|
|
}
|
|
function isKindFile(item) {
|
|
return utils_typeof(item) === 'object' && item !== null && item.kind === 'file';
|
|
} // allow the entire document to be a drag target
|
|
|
|
function onDocumentDragOver(event) {
|
|
event.preventDefault();
|
|
}
|
|
|
|
function isIe(userAgent) {
|
|
return userAgent.indexOf('MSIE') !== -1 || userAgent.indexOf('Trident/') !== -1;
|
|
}
|
|
|
|
function isEdge(userAgent) {
|
|
return userAgent.indexOf('Edge/') !== -1;
|
|
}
|
|
|
|
function isIeOrEdge() {
|
|
var userAgent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : window.navigator.userAgent;
|
|
return isIe(userAgent) || isEdge(userAgent);
|
|
}
|
|
/**
|
|
* This is intended to be used to compose event handlers
|
|
* They are executed in order until one of them calls `event.isPropagationStopped()`.
|
|
* Note that the check is done on the first invoke too,
|
|
* meaning that if propagation was stopped before invoking the fns,
|
|
* no handlers will be executed.
|
|
*
|
|
* @param {Function} fns the event hanlder functions
|
|
* @return {Function} the event handler to add to an element
|
|
*/
|
|
|
|
function utils_composeEventHandlers() {
|
|
for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
fns[_key] = arguments[_key];
|
|
}
|
|
|
|
return function (event) {
|
|
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
args[_key2 - 1] = arguments[_key2];
|
|
}
|
|
|
|
return fns.some(function (fn) {
|
|
if (!isPropagationStopped(event) && fn) {
|
|
fn.apply(void 0, [event].concat(args));
|
|
}
|
|
|
|
return isPropagationStopped(event);
|
|
});
|
|
};
|
|
}
|
|
// CONCATENATED MODULE: ./node_modules/react-dropzone/dist/es/index.js
|
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
|
|
|
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
|
|
|
|
function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }
|
|
|
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }
|
|
|
|
function es_slicedToArray(arr, i) { return es_arrayWithHoles(arr) || es_iterableToArrayLimit(arr, i) || es_nonIterableRest(); }
|
|
|
|
function es_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
|
|
|
|
function es_iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { 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; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
|
|
function es_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
|
function es_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
|
|
function es_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { es_ownKeys(source, true).forEach(function (key) { es_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { es_ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
|
|
function es_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
|
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = es_objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
|
|
function es_objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
|
|
/* eslint prefer-template: 0 */
|
|
|
|
|
|
|
|
|
|
/**
|
|
* Convenience wrapper component for the `useDropzone` hook
|
|
*
|
|
* ```jsx
|
|
* <Dropzone>
|
|
* {({getRootProps, getInputProps}) => (
|
|
* <div {...getRootProps()}>
|
|
* <input {...getInputProps()} />
|
|
* <p>Drag 'n' drop some files here, or click to select files</p>
|
|
* </div>
|
|
* )}
|
|
* </Dropzone>
|
|
* ```
|
|
*/
|
|
|
|
var Dropzone = Object(react["forwardRef"])(function (_ref, ref) {
|
|
var children = _ref.children,
|
|
params = _objectWithoutProperties(_ref, ["children"]);
|
|
|
|
var _useDropzone = useDropzone(params),
|
|
open = _useDropzone.open,
|
|
props = _objectWithoutProperties(_useDropzone, ["open"]);
|
|
|
|
Object(react["useImperativeHandle"])(ref, function () {
|
|
return {
|
|
open: open
|
|
};
|
|
}, [open]); // TODO: Figure out why react-styleguidist cannot create docs if we don't return a jsx element
|
|
|
|
return react_default.a.createElement(react["Fragment"], null, children(es_objectSpread({}, props, {
|
|
open: open
|
|
})));
|
|
});
|
|
Dropzone.displayName = 'Dropzone';
|
|
Dropzone.propTypes = {
|
|
/**
|
|
* Render function that exposes the dropzone state and prop getter fns
|
|
*
|
|
* @param {object} params
|
|
* @param {Function} params.getRootProps Returns the props you should apply to the root drop container you render
|
|
* @param {Function} params.getInputProps Returns the props you should apply to hidden file input you render
|
|
* @param {Function} params.open Open the native file selection dialog
|
|
* @param {boolean} params.isFocused Dropzone area is in focus
|
|
* @param {boolean} params.isFileDialogActive File dialog is opened
|
|
* @param {boolean} params.isDragActive Active drag is in progress
|
|
* @param {boolean} params.isDragAccept Dragged files are accepted
|
|
* @param {boolean} params.isDragReject Some dragged files are rejected
|
|
* @param {File[]} params.draggedFiles Files in active drag
|
|
* @param {File[]} params.acceptedFiles Accepted files
|
|
* @param {File[]} params.rejectedFiles Rejected files
|
|
*/
|
|
children: prop_types_default.a.func,
|
|
|
|
/**
|
|
* Set accepted file types.
|
|
* See https://github.com/okonet/attr-accept for more information.
|
|
* Keep in mind that mime type determination is not reliable across platforms. CSV files,
|
|
* for example, are reported as text/plain under macOS but as application/vnd.ms-excel under
|
|
* Windows. In some cases there might not be a mime type set at all.
|
|
* See: https://github.com/react-dropzone/react-dropzone/issues/276
|
|
*/
|
|
accept: prop_types_default.a.oneOfType([prop_types_default.a.string, prop_types_default.a.arrayOf(prop_types_default.a.string)]),
|
|
|
|
/**
|
|
* Allow drag 'n' drop (or selection from the file dialog) of multiple files
|
|
*/
|
|
multiple: prop_types_default.a.bool,
|
|
|
|
/**
|
|
* If false, allow dropped items to take over the current browser window
|
|
*/
|
|
preventDropOnDocument: prop_types_default.a.bool,
|
|
|
|
/**
|
|
* If true, disables click to open the native file selection dialog
|
|
*/
|
|
noClick: prop_types_default.a.bool,
|
|
|
|
/**
|
|
* If true, disables SPACE/ENTER to open the native file selection dialog.
|
|
* Note that it also stops tracking the focus state.
|
|
*/
|
|
noKeyboard: prop_types_default.a.bool,
|
|
|
|
/**
|
|
* If true, disables drag 'n' drop
|
|
*/
|
|
noDrag: prop_types_default.a.bool,
|
|
|
|
/**
|
|
* If true, stops drag event propagation to parents
|
|
*/
|
|
noDragEventsBubbling: prop_types_default.a.bool,
|
|
|
|
/**
|
|
* Minimum file size (in bytes)
|
|
*/
|
|
minSize: prop_types_default.a.number,
|
|
|
|
/**
|
|
* Maximum file size (in bytes)
|
|
*/
|
|
maxSize: prop_types_default.a.number,
|
|
|
|
/**
|
|
* Enable/disable the dropzone
|
|
*/
|
|
disabled: prop_types_default.a.bool,
|
|
|
|
/**
|
|
* Use this to provide a custom file aggregator
|
|
*
|
|
* @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)
|
|
*/
|
|
getFilesFromEvent: prop_types_default.a.func,
|
|
|
|
/**
|
|
* Cb for when closing the file dialog with no selection
|
|
*/
|
|
onFileDialogCancel: prop_types_default.a.func,
|
|
|
|
/**
|
|
* Cb for when the `dragenter` event occurs.
|
|
*
|
|
* @param {DragEvent} event
|
|
*/
|
|
onDragEnter: prop_types_default.a.func,
|
|
|
|
/**
|
|
* Cb for when the `dragleave` event occurs
|
|
*
|
|
* @param {DragEvent} event
|
|
*/
|
|
onDragLeave: prop_types_default.a.func,
|
|
|
|
/**
|
|
* Cb for when the `dragover` event occurs
|
|
*
|
|
* @param {DragEvent} event
|
|
*/
|
|
onDragOver: prop_types_default.a.func,
|
|
|
|
/**
|
|
* Cb for when the `drop` event occurs.
|
|
* Note that this callback is invoked after the `getFilesFromEvent` callback is done.
|
|
*
|
|
* Files are accepted or rejected based on the `accept`, `multiple`, `minSize` and `maxSize` props.
|
|
* `accept` must be a valid [MIME type](http://www.iana.org/assignments/media-types/media-types.xhtml) according to [input element specification](https://www.w3.org/wiki/HTML/Elements/input/file) or a valid file extension.
|
|
* If `multiple` is set to false and additional files are droppped,
|
|
* all files besides the first will be rejected.
|
|
* Any file which does not have a size in the [`minSize`, `maxSize`] range, will be rejected as well.
|
|
*
|
|
* Note that the `onDrop` callback will always be invoked regardless if the dropped files were accepted or rejected.
|
|
* If you'd like to react to a specific scenario, use the `onDropAccepted`/`onDropRejected` props.
|
|
*
|
|
* `onDrop` will provide you with an array of [File](https://developer.mozilla.org/en-US/docs/Web/API/File) objects which you can then process and send to a server.
|
|
* For example, with [SuperAgent](https://github.com/visionmedia/superagent) as a http/ajax library:
|
|
*
|
|
* ```js
|
|
* function onDrop(acceptedFiles) {
|
|
* const req = request.post('/upload')
|
|
* acceptedFiles.forEach(file => {
|
|
* req.attach(file.name, file)
|
|
* })
|
|
* req.end(callback)
|
|
* }
|
|
* ```
|
|
*
|
|
* @param {File[]} acceptedFiles
|
|
* @param {File[]} rejectedFiles
|
|
* @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)
|
|
*/
|
|
onDrop: prop_types_default.a.func,
|
|
|
|
/**
|
|
* Cb for when the `drop` event occurs.
|
|
* Note that if no files are accepted, this callback is not invoked.
|
|
*
|
|
* @param {File[]} files
|
|
* @param {(DragEvent|Event)} event
|
|
*/
|
|
onDropAccepted: prop_types_default.a.func,
|
|
|
|
/**
|
|
* Cb for when the `drop` event occurs.
|
|
* Note that if no files are rejected, this callback is not invoked.
|
|
*
|
|
* @param {object[]} files
|
|
* @param {(DragEvent|Event)} event
|
|
*/
|
|
onDropRejected: prop_types_default.a.func
|
|
};
|
|
/* harmony default export */ var es = (Dropzone);
|
|
/**
|
|
* A function that is invoked for the `dragenter`,
|
|
* `dragover` and `dragleave` events.
|
|
* It is not invoked if the items are not files (such as link, text, etc.).
|
|
*
|
|
* @callback dragCb
|
|
* @param {DragEvent} event
|
|
*/
|
|
|
|
/**
|
|
* A function that is invoked for the `drop` or input change event.
|
|
* It is not invoked if the items are not files (such as link, text, etc.).
|
|
*
|
|
* @callback dropCb
|
|
* @param {File[]} acceptedFiles List of accepted files
|
|
* @param {File[]} rejectedFiles List of rejected files
|
|
* @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)
|
|
*/
|
|
|
|
/**
|
|
* A function that is invoked for the `drop` or input change event.
|
|
* It is not invoked if the items are files (such as link, text, etc.).
|
|
*
|
|
* @callback dropAcceptedCb
|
|
* @param {File[]} files List of accepted files that meet the given criteria
|
|
* (`accept`, `multiple`, `minSize`, `maxSize`)
|
|
* @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)
|
|
*/
|
|
|
|
/**
|
|
* A function that is invoked for the `drop` or input change event.
|
|
*
|
|
* @callback dropRejectedCb
|
|
* @param {File[]} files List of rejected files that do not meet the given criteria
|
|
* (`accept`, `multiple`, `minSize`, `maxSize`)
|
|
* @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)
|
|
*/
|
|
|
|
/**
|
|
* A function that is used aggregate files,
|
|
* in a asynchronous fashion, from drag or input change events.
|
|
*
|
|
* @callback getFilesFromEvent
|
|
* @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)
|
|
* @returns {(File[]|Promise<File[]>)}
|
|
*/
|
|
|
|
/**
|
|
* An object with the current dropzone state and some helper functions.
|
|
*
|
|
* @typedef {object} DropzoneState
|
|
* @property {Function} getRootProps Returns the props you should apply to the root drop container you render
|
|
* @property {Function} getInputProps Returns the props you should apply to hidden file input you render
|
|
* @property {Function} open Open the native file selection dialog
|
|
* @property {boolean} isFocused Dropzone area is in focus
|
|
* @property {boolean} isFileDialogActive File dialog is opened
|
|
* @property {boolean} isDragActive Active drag is in progress
|
|
* @property {boolean} isDragAccept Dragged files are accepted
|
|
* @property {boolean} isDragReject Some dragged files are rejected
|
|
* @property {File[]} draggedFiles Files in active drag
|
|
* @property {File[]} acceptedFiles Accepted files
|
|
* @property {File[]} rejectedFiles Rejected files
|
|
*/
|
|
|
|
var initialState = {
|
|
isFocused: false,
|
|
isFileDialogActive: false,
|
|
isDragActive: false,
|
|
isDragAccept: false,
|
|
isDragReject: false,
|
|
draggedFiles: [],
|
|
acceptedFiles: [],
|
|
rejectedFiles: []
|
|
};
|
|
/**
|
|
* A React hook that creates a drag 'n' drop area.
|
|
*
|
|
* ```jsx
|
|
* function MyDropzone(props) {
|
|
* const {getRootProps, getInputProps} = useDropzone({
|
|
* onDrop: acceptedFiles => {
|
|
* // do something with the File objects, e.g. upload to some server
|
|
* }
|
|
* });
|
|
* return (
|
|
* <div {...getRootProps()}>
|
|
* <input {...getInputProps()} />
|
|
* <p>Drag and drop some files here, or click to select files</p>
|
|
* </div>
|
|
* )
|
|
* }
|
|
* ```
|
|
*
|
|
* @function useDropzone
|
|
*
|
|
* @param {object} props
|
|
* @param {string|string[]} [props.accept] Set accepted file types.
|
|
* See https://github.com/okonet/attr-accept for more information.
|
|
* Keep in mind that mime type determination is not reliable across platforms. CSV files,
|
|
* for example, are reported as text/plain under macOS but as application/vnd.ms-excel under
|
|
* Windows. In some cases there might not be a mime type set at all.
|
|
* See: https://github.com/react-dropzone/react-dropzone/issues/276
|
|
* @param {boolean} [props.multiple=true] Allow drag 'n' drop (or selection from the file dialog) of multiple files
|
|
* @param {boolean} [props.preventDropOnDocument=true] If false, allow dropped items to take over the current browser window
|
|
* @param {boolean} [props.noClick=false] If true, disables click to open the native file selection dialog
|
|
* @param {boolean} [props.noKeyboard=false] If true, disables SPACE/ENTER to open the native file selection dialog.
|
|
* Note that it also stops tracking the focus state.
|
|
* @param {boolean} [props.noDrag=false] If true, disables drag 'n' drop
|
|
* @param {boolean} [props.noDragEventsBubbling=false] If true, stops drag event propagation to parents
|
|
* @param {number} [props.minSize=0] Minimum file size (in bytes)
|
|
* @param {number} [props.maxSize=Infinity] Maximum file size (in bytes)
|
|
* @param {boolean} [props.disabled=false] Enable/disable the dropzone
|
|
* @param {getFilesFromEvent} [props.getFilesFromEvent] Use this to provide a custom file aggregator
|
|
* @param {Function} [props.onFileDialogCancel] Cb for when closing the file dialog with no selection
|
|
* @param {dragCb} [props.onDragEnter] Cb for when the `dragenter` event occurs.
|
|
* @param {dragCb} [props.onDragLeave] Cb for when the `dragleave` event occurs
|
|
* @param {dragCb} [props.onDragOver] Cb for when the `dragover` event occurs
|
|
* @param {dropCb} [props.onDrop] Cb for when the `drop` event occurs.
|
|
* Note that this callback is invoked after the `getFilesFromEvent` callback is done.
|
|
*
|
|
* Files are accepted or rejected based on the `accept`, `multiple`, `minSize` and `maxSize` props.
|
|
* `accept` must be a valid [MIME type](http://www.iana.org/assignments/media-types/media-types.xhtml) according to [input element specification](https://www.w3.org/wiki/HTML/Elements/input/file) or a valid file extension.
|
|
* If `multiple` is set to false and additional files are droppped,
|
|
* all files besides the first will be rejected.
|
|
* Any file which does not have a size in the [`minSize`, `maxSize`] range, will be rejected as well.
|
|
*
|
|
* Note that the `onDrop` callback will always be invoked regardless if the dropped files were accepted or rejected.
|
|
* If you'd like to react to a specific scenario, use the `onDropAccepted`/`onDropRejected` props.
|
|
*
|
|
* `onDrop` will provide you with an array of [File](https://developer.mozilla.org/en-US/docs/Web/API/File) objects which you can then process and send to a server.
|
|
* For example, with [SuperAgent](https://github.com/visionmedia/superagent) as a http/ajax library:
|
|
*
|
|
* ```js
|
|
* function onDrop(acceptedFiles) {
|
|
* const req = request.post('/upload')
|
|
* acceptedFiles.forEach(file => {
|
|
* req.attach(file.name, file)
|
|
* })
|
|
* req.end(callback)
|
|
* }
|
|
* ```
|
|
* @param {dropAcceptedCb} [props.onDropAccepted]
|
|
* @param {dropRejectedCb} [props.onDropRejected]
|
|
*
|
|
* @returns {DropzoneState}
|
|
*/
|
|
|
|
function useDropzone() {
|
|
var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
accept = _ref2.accept,
|
|
_ref2$disabled = _ref2.disabled,
|
|
disabled = _ref2$disabled === void 0 ? false : _ref2$disabled,
|
|
_ref2$getFilesFromEve = _ref2.getFilesFromEvent,
|
|
getFilesFromEvent = _ref2$getFilesFromEve === void 0 ? fromEvent : _ref2$getFilesFromEve,
|
|
_ref2$maxSize = _ref2.maxSize,
|
|
maxSize = _ref2$maxSize === void 0 ? Infinity : _ref2$maxSize,
|
|
_ref2$minSize = _ref2.minSize,
|
|
minSize = _ref2$minSize === void 0 ? 0 : _ref2$minSize,
|
|
_ref2$multiple = _ref2.multiple,
|
|
multiple = _ref2$multiple === void 0 ? true : _ref2$multiple,
|
|
onDragEnter = _ref2.onDragEnter,
|
|
onDragLeave = _ref2.onDragLeave,
|
|
onDragOver = _ref2.onDragOver,
|
|
onDrop = _ref2.onDrop,
|
|
onDropAccepted = _ref2.onDropAccepted,
|
|
onDropRejected = _ref2.onDropRejected,
|
|
onFileDialogCancel = _ref2.onFileDialogCancel,
|
|
_ref2$preventDropOnDo = _ref2.preventDropOnDocument,
|
|
preventDropOnDocument = _ref2$preventDropOnDo === void 0 ? true : _ref2$preventDropOnDo,
|
|
_ref2$noClick = _ref2.noClick,
|
|
noClick = _ref2$noClick === void 0 ? false : _ref2$noClick,
|
|
_ref2$noKeyboard = _ref2.noKeyboard,
|
|
noKeyboard = _ref2$noKeyboard === void 0 ? false : _ref2$noKeyboard,
|
|
_ref2$noDrag = _ref2.noDrag,
|
|
noDrag = _ref2$noDrag === void 0 ? false : _ref2$noDrag,
|
|
_ref2$noDragEventsBub = _ref2.noDragEventsBubbling,
|
|
noDragEventsBubbling = _ref2$noDragEventsBub === void 0 ? false : _ref2$noDragEventsBub;
|
|
|
|
var rootRef = Object(react["useRef"])(null);
|
|
var inputRef = Object(react["useRef"])(null);
|
|
|
|
var _useReducer = Object(react["useReducer"])(reducer, initialState),
|
|
_useReducer2 = es_slicedToArray(_useReducer, 2),
|
|
state = _useReducer2[0],
|
|
dispatch = _useReducer2[1];
|
|
|
|
var isFocused = state.isFocused,
|
|
isFileDialogActive = state.isFileDialogActive,
|
|
draggedFiles = state.draggedFiles; // Fn for opening the file dialog programmatically
|
|
|
|
var openFileDialog = Object(react["useCallback"])(function () {
|
|
if (inputRef.current) {
|
|
dispatch({
|
|
type: 'openDialog'
|
|
});
|
|
inputRef.current.value = null;
|
|
inputRef.current.click();
|
|
}
|
|
}, [dispatch]); // Update file dialog active state when the window is focused on
|
|
|
|
var onWindowFocus = function onWindowFocus() {
|
|
// Execute the timeout only if the file dialog is opened in the browser
|
|
if (isFileDialogActive) {
|
|
setTimeout(function () {
|
|
if (inputRef.current) {
|
|
var files = inputRef.current.files;
|
|
|
|
if (!files.length) {
|
|
dispatch({
|
|
type: 'closeDialog'
|
|
});
|
|
|
|
if (typeof onFileDialogCancel === 'function') {
|
|
onFileDialogCancel();
|
|
}
|
|
}
|
|
}
|
|
}, 300);
|
|
}
|
|
};
|
|
|
|
Object(react["useEffect"])(function () {
|
|
window.addEventListener('focus', onWindowFocus, false);
|
|
return function () {
|
|
window.removeEventListener('focus', onWindowFocus, false);
|
|
};
|
|
}, [inputRef, isFileDialogActive, onFileDialogCancel]); // Cb to open the file dialog when SPACE/ENTER occurs on the dropzone
|
|
|
|
var onKeyDownCb = Object(react["useCallback"])(function (event) {
|
|
// Ignore keyboard events bubbling up the DOM tree
|
|
if (!rootRef.current || !rootRef.current.isEqualNode(event.target)) {
|
|
return;
|
|
}
|
|
|
|
if (event.keyCode === 32 || event.keyCode === 13) {
|
|
event.preventDefault();
|
|
openFileDialog();
|
|
}
|
|
}, [rootRef, inputRef]); // Update focus state for the dropzone
|
|
|
|
var onFocusCb = Object(react["useCallback"])(function () {
|
|
dispatch({
|
|
type: 'focus'
|
|
});
|
|
}, []);
|
|
var onBlurCb = Object(react["useCallback"])(function () {
|
|
dispatch({
|
|
type: 'blur'
|
|
});
|
|
}, []); // Cb to open the file dialog when click occurs on the dropzone
|
|
|
|
var onClickCb = Object(react["useCallback"])(function () {
|
|
if (noClick) {
|
|
return;
|
|
} // In IE11/Edge the file-browser dialog is blocking, therefore, use setTimeout()
|
|
// to ensure React can handle state changes
|
|
// See: https://github.com/react-dropzone/react-dropzone/issues/450
|
|
|
|
|
|
if (isIeOrEdge()) {
|
|
setTimeout(openFileDialog, 0);
|
|
} else {
|
|
openFileDialog();
|
|
}
|
|
}, [inputRef, noClick]);
|
|
var dragTargetsRef = Object(react["useRef"])([]);
|
|
|
|
var onDocumentDrop = function onDocumentDrop(event) {
|
|
if (rootRef.current && rootRef.current.contains(event.target)) {
|
|
// If we intercepted an event for our instance, let it propagate down to the instance's onDrop handler
|
|
return;
|
|
}
|
|
|
|
event.preventDefault();
|
|
dragTargetsRef.current = [];
|
|
};
|
|
|
|
Object(react["useEffect"])(function () {
|
|
if (preventDropOnDocument) {
|
|
document.addEventListener('dragover', onDocumentDragOver, false);
|
|
document.addEventListener('drop', onDocumentDrop, false);
|
|
}
|
|
|
|
return function () {
|
|
if (preventDropOnDocument) {
|
|
document.removeEventListener('dragover', onDocumentDragOver);
|
|
document.removeEventListener('drop', onDocumentDrop);
|
|
}
|
|
};
|
|
}, [rootRef, preventDropOnDocument]);
|
|
var onDragEnterCb = Object(react["useCallback"])(function (event) {
|
|
event.preventDefault(); // Persist here because we need the event later after getFilesFromEvent() is done
|
|
|
|
event.persist();
|
|
stopPropagation(event); // Count the dropzone and any children that are entered.
|
|
|
|
if (dragTargetsRef.current.indexOf(event.target) === -1) {
|
|
dragTargetsRef.current = [].concat(_toConsumableArray(dragTargetsRef.current), [event.target]);
|
|
}
|
|
|
|
if (isEvtWithFiles(event)) {
|
|
Promise.resolve(getFilesFromEvent(event)).then(function (draggedFiles) {
|
|
if (isPropagationStopped(event) && !noDragEventsBubbling) {
|
|
return;
|
|
}
|
|
|
|
dispatch({
|
|
draggedFiles: draggedFiles,
|
|
isDragActive: true,
|
|
type: 'setDraggedFiles'
|
|
});
|
|
|
|
if (onDragEnter) {
|
|
onDragEnter(event);
|
|
}
|
|
});
|
|
}
|
|
}, [getFilesFromEvent, onDragEnter, noDragEventsBubbling]);
|
|
var onDragOverCb = Object(react["useCallback"])(function (event) {
|
|
event.preventDefault();
|
|
event.persist();
|
|
stopPropagation(event);
|
|
|
|
if (event.dataTransfer) {
|
|
try {
|
|
event.dataTransfer.dropEffect = 'copy';
|
|
} catch (_unused) {}
|
|
/* eslint-disable-line no-empty */
|
|
|
|
}
|
|
|
|
if (isEvtWithFiles(event) && onDragOver) {
|
|
onDragOver(event);
|
|
}
|
|
|
|
return false;
|
|
}, [onDragOver, noDragEventsBubbling]);
|
|
var onDragLeaveCb = Object(react["useCallback"])(function (event) {
|
|
event.preventDefault();
|
|
event.persist();
|
|
stopPropagation(event); // Only deactivate once the dropzone and all children have been left
|
|
|
|
var targets = dragTargetsRef.current.filter(function (target) {
|
|
return target !== event.target && rootRef.current && rootRef.current.contains(target);
|
|
});
|
|
dragTargetsRef.current = targets;
|
|
|
|
if (targets.length > 0) {
|
|
return;
|
|
}
|
|
|
|
dispatch({
|
|
isDragActive: false,
|
|
type: 'setDraggedFiles',
|
|
draggedFiles: []
|
|
});
|
|
|
|
if (isEvtWithFiles(event) && onDragLeave) {
|
|
onDragLeave(event);
|
|
}
|
|
}, [rootRef, onDragLeave, noDragEventsBubbling]);
|
|
var onDropCb = Object(react["useCallback"])(function (event) {
|
|
event.preventDefault(); // Persist here because we need the event later after getFilesFromEvent() is done
|
|
|
|
event.persist();
|
|
stopPropagation(event);
|
|
dragTargetsRef.current = [];
|
|
dispatch({
|
|
type: 'reset'
|
|
});
|
|
|
|
if (isEvtWithFiles(event)) {
|
|
Promise.resolve(getFilesFromEvent(event)).then(function (files) {
|
|
if (isPropagationStopped(event) && !noDragEventsBubbling) {
|
|
return;
|
|
}
|
|
|
|
var acceptedFiles = [];
|
|
var rejectedFiles = [];
|
|
files.forEach(function (file) {
|
|
if (fileAccepted(file, accept) && fileMatchSize(file, minSize, maxSize)) {
|
|
acceptedFiles.push(file);
|
|
} else {
|
|
rejectedFiles.push(file);
|
|
}
|
|
});
|
|
|
|
if (!multiple && acceptedFiles.length > 1) {
|
|
rejectedFiles.push.apply(rejectedFiles, _toConsumableArray(acceptedFiles.splice(0))); // Reject everything and empty accepted files
|
|
}
|
|
|
|
dispatch({
|
|
acceptedFiles: acceptedFiles,
|
|
rejectedFiles: rejectedFiles,
|
|
type: 'setFiles'
|
|
});
|
|
|
|
if (onDrop) {
|
|
onDrop(acceptedFiles, rejectedFiles, event);
|
|
}
|
|
|
|
if (rejectedFiles.length > 0 && onDropRejected) {
|
|
onDropRejected(rejectedFiles, event);
|
|
}
|
|
|
|
if (acceptedFiles.length > 0 && onDropAccepted) {
|
|
onDropAccepted(acceptedFiles, event);
|
|
}
|
|
});
|
|
}
|
|
}, [multiple, accept, minSize, maxSize, getFilesFromEvent, onDrop, onDropAccepted, onDropRejected, noDragEventsBubbling]);
|
|
|
|
var composeHandler = function composeHandler(fn) {
|
|
return disabled ? null : fn;
|
|
};
|
|
|
|
var composeKeyboardHandler = function composeKeyboardHandler(fn) {
|
|
return noKeyboard ? null : composeHandler(fn);
|
|
};
|
|
|
|
var composeDragHandler = function composeDragHandler(fn) {
|
|
return noDrag ? null : composeHandler(fn);
|
|
};
|
|
|
|
var stopPropagation = function stopPropagation(event) {
|
|
if (noDragEventsBubbling) {
|
|
event.stopPropagation();
|
|
}
|
|
};
|
|
|
|
var getRootProps = Object(react["useMemo"])(function () {
|
|
return function () {
|
|
var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
_ref3$refKey = _ref3.refKey,
|
|
refKey = _ref3$refKey === void 0 ? 'ref' : _ref3$refKey,
|
|
onKeyDown = _ref3.onKeyDown,
|
|
onFocus = _ref3.onFocus,
|
|
onBlur = _ref3.onBlur,
|
|
onClick = _ref3.onClick,
|
|
onDragEnter = _ref3.onDragEnter,
|
|
onDragOver = _ref3.onDragOver,
|
|
onDragLeave = _ref3.onDragLeave,
|
|
onDrop = _ref3.onDrop,
|
|
rest = _objectWithoutProperties(_ref3, ["refKey", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnter", "onDragOver", "onDragLeave", "onDrop"]);
|
|
|
|
return es_objectSpread(es_defineProperty({
|
|
onKeyDown: composeKeyboardHandler(utils_composeEventHandlers(onKeyDown, onKeyDownCb)),
|
|
onFocus: composeKeyboardHandler(utils_composeEventHandlers(onFocus, onFocusCb)),
|
|
onBlur: composeKeyboardHandler(utils_composeEventHandlers(onBlur, onBlurCb)),
|
|
onClick: composeHandler(utils_composeEventHandlers(onClick, onClickCb)),
|
|
onDragEnter: composeDragHandler(utils_composeEventHandlers(onDragEnter, onDragEnterCb)),
|
|
onDragOver: composeDragHandler(utils_composeEventHandlers(onDragOver, onDragOverCb)),
|
|
onDragLeave: composeDragHandler(utils_composeEventHandlers(onDragLeave, onDragLeaveCb)),
|
|
onDrop: composeDragHandler(utils_composeEventHandlers(onDrop, onDropCb))
|
|
}, refKey, rootRef), !disabled && !noKeyboard ? {
|
|
tabIndex: 0
|
|
} : {}, {}, rest);
|
|
};
|
|
}, [rootRef, onKeyDownCb, onFocusCb, onBlurCb, onClickCb, onDragEnterCb, onDragOverCb, onDragLeaveCb, onDropCb, noKeyboard, noDrag, disabled]);
|
|
var onInputElementClick = Object(react["useCallback"])(function (event) {
|
|
event.stopPropagation();
|
|
}, []);
|
|
var getInputProps = Object(react["useMemo"])(function () {
|
|
return function () {
|
|
var _ref4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
_ref4$refKey = _ref4.refKey,
|
|
refKey = _ref4$refKey === void 0 ? 'ref' : _ref4$refKey,
|
|
onChange = _ref4.onChange,
|
|
onClick = _ref4.onClick,
|
|
rest = _objectWithoutProperties(_ref4, ["refKey", "onChange", "onClick"]);
|
|
|
|
var inputProps = es_defineProperty({
|
|
accept: accept,
|
|
multiple: multiple,
|
|
type: 'file',
|
|
style: {
|
|
display: 'none'
|
|
},
|
|
onChange: composeHandler(utils_composeEventHandlers(onChange, onDropCb)),
|
|
onClick: composeHandler(utils_composeEventHandlers(onClick, onInputElementClick)),
|
|
autoComplete: 'off',
|
|
tabIndex: -1
|
|
}, refKey, inputRef);
|
|
|
|
return es_objectSpread({}, inputProps, {}, rest);
|
|
};
|
|
}, [inputRef, accept, multiple, onDropCb, disabled]);
|
|
var fileCount = draggedFiles.length;
|
|
var isMultipleAllowed = multiple || fileCount <= 1;
|
|
var isDragAccept = fileCount > 0 && allFilesAccepted(draggedFiles, accept, minSize, maxSize);
|
|
var isDragReject = fileCount > 0 && (!isDragAccept || !isMultipleAllowed);
|
|
return es_objectSpread({}, state, {
|
|
isDragAccept: isDragAccept,
|
|
isDragReject: isDragReject,
|
|
isFocused: isFocused && !disabled,
|
|
getRootProps: getRootProps,
|
|
getInputProps: getInputProps,
|
|
rootRef: rootRef,
|
|
inputRef: inputRef,
|
|
open: composeHandler(openFileDialog)
|
|
});
|
|
}
|
|
|
|
function reducer(state, action) {
|
|
/* istanbul ignore next */
|
|
switch (action.type) {
|
|
case 'focus':
|
|
return es_objectSpread({}, state, {
|
|
isFocused: true
|
|
});
|
|
|
|
case 'blur':
|
|
return es_objectSpread({}, state, {
|
|
isFocused: false
|
|
});
|
|
|
|
case 'openDialog':
|
|
return es_objectSpread({}, state, {
|
|
isFileDialogActive: true
|
|
});
|
|
|
|
case 'closeDialog':
|
|
return es_objectSpread({}, state, {
|
|
isFileDialogActive: false
|
|
});
|
|
|
|
case 'setDraggedFiles':
|
|
/* eslint no-case-declarations: 0 */
|
|
var isDragActive = action.isDragActive,
|
|
draggedFiles = action.draggedFiles;
|
|
return es_objectSpread({}, state, {
|
|
draggedFiles: draggedFiles,
|
|
isDragActive: isDragActive
|
|
});
|
|
|
|
case 'setFiles':
|
|
return es_objectSpread({}, state, {
|
|
acceptedFiles: action.acceptedFiles,
|
|
rejectedFiles: action.rejectedFiles
|
|
});
|
|
|
|
case 'reset':
|
|
return es_objectSpread({}, state, {
|
|
isFileDialogActive: false,
|
|
isDragActive: false,
|
|
draggedFiles: []
|
|
});
|
|
|
|
default:
|
|
return state;
|
|
}
|
|
}
|
|
// CONCATENATED MODULE: ./frontend/components/Media/file.jsx
|
|
function file_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
|
|
function file_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { file_ownKeys(source, true).forEach(function (key) { file_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { file_ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
|
|
function file_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
|
|
|
|
|
|
function File(_ref) {
|
|
var f = _ref.f,
|
|
onClick = _ref.onClick,
|
|
selected = _ref.selected;
|
|
var extraStyles = selected ? {
|
|
background: 'grey',
|
|
color: 'white'
|
|
} : {};
|
|
return react_default.a.createElement("div", {
|
|
onClick: onClick,
|
|
style: file_objectSpread({}, file_styles.file, {}, extraStyles)
|
|
}, react_default.a.createElement("div", {
|
|
style: file_styles.name
|
|
}, f.name), react_default.a.createElement("div", {
|
|
style: file_styles.price
|
|
}, "".concat(f.price, " sats")));
|
|
}
|
|
var file_styles = {
|
|
file: {
|
|
height: 100,
|
|
width: 89,
|
|
margin: 4,
|
|
border: '1px solid grey',
|
|
borderRadius: 5,
|
|
background: 'whitesmoke',
|
|
cursor: 'pointer',
|
|
display: 'flex',
|
|
flexDirection: 'column',
|
|
alignItems: 'center',
|
|
justifyContent: 'space-around'
|
|
},
|
|
name: {
|
|
fontSize: '14px',
|
|
margin: 10
|
|
},
|
|
price: {
|
|
fontWeight: 'bold',
|
|
fontSize: '11px',
|
|
margin: 12
|
|
}
|
|
};
|
|
// CONCATENATED MODULE: ./frontend/components/Media/fake.js
|
|
var purchases = [{
|
|
id: 'uxpip1swtyk9zdt9jc6kdsrpstpf7oqphh6yjonws4rgz8ymzbwy',
|
|
host: 'localhost:5000',
|
|
exp: 1575950623,
|
|
mypubkey: '0394c0ceababad8426da667af094e63d7bec35ed4e5580c173e096be0cc317c07a',
|
|
merchant: '0373ca36a331d8fd847f190908715a34997b15dc3c5d560ca032cf3412fcf494e4',
|
|
receipt: 'ry6wyykjfpjkeexoy1s17wm1c3uh79satygky5p8c8kzn193n4hxg7i1zs4rgb3kmjq5gxadmz8884z6njnp3j1qu9str4ag4d6kn7ny'
|
|
}];
|
|
/* harmony default export */ var fake = (purchases);
|
|
// CONCATENATED MODULE: ./frontend/components/Media/index.jsx
|
|
function Media_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
|
|
function Media_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { Media_ownKeys(source, true).forEach(function (key) { Media_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { Media_ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
|
|
function Media_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
|
|
function Media_asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
|
|
function Media_asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { Media_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { Media_asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
|
|
function Media_slicedToArray(arr, i) { return Media_arrayWithHoles(arr) || Media_iterableToArrayLimit(arr, i) || Media_nonIterableRest(); }
|
|
|
|
function Media_nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
|
|
|
|
function Media_iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { 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; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
|
|
function Media_arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function Media(props) {
|
|
var _useState = Object(react["useState"])(false),
|
|
_useState2 = Media_slicedToArray(_useState, 2),
|
|
loggedIn = _useState2[0],
|
|
setLoggedIn = _useState2[1];
|
|
|
|
var _useState3 = Object(react["useState"])(''),
|
|
_useState4 = Media_slicedToArray(_useState3, 2),
|
|
description = _useState4[0],
|
|
setDescription = _useState4[1];
|
|
|
|
var _useState5 = Object(react["useState"])([]),
|
|
_useState6 = Media_slicedToArray(_useState5, 2),
|
|
myFiles = _useState6[0],
|
|
setMyFiles = _useState6[1];
|
|
|
|
var _useState7 = Object(react["useState"])([]),
|
|
_useState8 = Media_slicedToArray(_useState7, 2),
|
|
files = _useState8[0],
|
|
setFiles = _useState8[1];
|
|
|
|
var _useState9 = Object(react["useState"])(''),
|
|
_useState10 = Media_slicedToArray(_useState9, 2),
|
|
searchText = _useState10[0],
|
|
setSearchText = _useState10[1];
|
|
|
|
var _useState11 = Object(react["useState"])(null),
|
|
_useState12 = Media_slicedToArray(_useState11, 2),
|
|
selectedMedia = _useState12[0],
|
|
setSelectedMedia = _useState12[1];
|
|
|
|
var _useState13 = Object(react["useState"])(null),
|
|
_useState14 = Media_slicedToArray(_useState13, 2),
|
|
img = _useState14[0],
|
|
setImg = _useState14[1];
|
|
|
|
function sign() {
|
|
return _sign.apply(this, arguments);
|
|
}
|
|
|
|
function _sign() {
|
|
_sign = Media_asyncToGenerator(
|
|
/*#__PURE__*/
|
|
regeneratorRuntime.mark(function _callee4() {
|
|
var ch, res, body;
|
|
return regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
while (1) {
|
|
switch (_context4.prev = _context4.next) {
|
|
case 0:
|
|
_context4.next = 2;
|
|
return api_media.GET('ask');
|
|
|
|
case 2:
|
|
ch = _context4.sent;
|
|
_context4.next = 5;
|
|
return relay.GET("signer/".concat(ch.challenge));
|
|
|
|
case 5:
|
|
res = _context4.sent;
|
|
_context4.next = 8;
|
|
return api_media.POST('verify', {
|
|
id: ch.id,
|
|
sig: res.response.sig,
|
|
pubkey: props.identity_pubkey
|
|
});
|
|
|
|
case 8:
|
|
body = _context4.sent;
|
|
|
|
if (body && body.token) {
|
|
console.log('success!');
|
|
setLoggedIn(true);
|
|
}
|
|
|
|
case 10:
|
|
case "end":
|
|
return _context4.stop();
|
|
}
|
|
}
|
|
}, _callee4);
|
|
}));
|
|
return _sign.apply(this, arguments);
|
|
}
|
|
|
|
Object(react["useEffect"])(function () {
|
|
function load() {
|
|
return _load.apply(this, arguments);
|
|
}
|
|
|
|
function _load() {
|
|
_load = Media_asyncToGenerator(
|
|
/*#__PURE__*/
|
|
regeneratorRuntime.mark(function _callee() {
|
|
var hasToken, media;
|
|
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
while (1) {
|
|
switch (_context.prev = _context.next) {
|
|
case 0:
|
|
hasToken = localStorage.getItem(api_media.tokenName);
|
|
_context.next = 3;
|
|
return sign();
|
|
|
|
case 3:
|
|
setLoggedIn(true);
|
|
_context.next = 6;
|
|
return api_media.GET('mymedia');
|
|
|
|
case 6:
|
|
media = _context.sent;
|
|
console.log(media);
|
|
setMyFiles(media);
|
|
|
|
case 9:
|
|
case "end":
|
|
return _context.stop();
|
|
}
|
|
}
|
|
}, _callee);
|
|
}));
|
|
return _load.apply(this, arguments);
|
|
}
|
|
|
|
load();
|
|
}, []);
|
|
var onDrop = Object(react["useCallback"])(
|
|
/*#__PURE__*/
|
|
function () {
|
|
var _ref = Media_asyncToGenerator(
|
|
/*#__PURE__*/
|
|
regeneratorRuntime.mark(function _callee2(files) {
|
|
var ttl, file, start, r, end, time;
|
|
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
while (1) {
|
|
switch (_context2.prev = _context2.next) {
|
|
case 0:
|
|
ttl = 60 * 60 * 24 * 7; // one week
|
|
|
|
file = files[0] || {};
|
|
start = new Date();
|
|
_context2.next = 5;
|
|
return api_media.UPLOAD('upload/attachment', file, {
|
|
chat_uuid: '1234567890',
|
|
name: file.name || 'filename',
|
|
description: description || 'description',
|
|
ttl: ttl
|
|
});
|
|
|
|
case 5:
|
|
r = _context2.sent;
|
|
end = new Date();
|
|
time = end.getTime() - start.getTime();
|
|
console.log('Upload Timer: finished in', time, 'ms'); // await api.relay.POST('attachment', {
|
|
// muid: r.muid,
|
|
// file_name: r.filename,
|
|
// chat_id: 13,
|
|
// ttl: ttl,
|
|
// })
|
|
|
|
case 9:
|
|
case "end":
|
|
return _context2.stop();
|
|
}
|
|
}
|
|
}, _callee2);
|
|
}));
|
|
|
|
return function (_x) {
|
|
return _ref.apply(this, arguments);
|
|
};
|
|
}(), [description]); // subscribe to "description"
|
|
|
|
function search() {
|
|
return _search.apply(this, arguments);
|
|
}
|
|
|
|
function _search() {
|
|
_search = Media_asyncToGenerator(
|
|
/*#__PURE__*/
|
|
regeneratorRuntime.mark(function _callee5() {
|
|
var medias;
|
|
return regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
while (1) {
|
|
switch (_context5.prev = _context5.next) {
|
|
case 0:
|
|
_context5.next = 2;
|
|
return api_media.GET("search/".concat(searchText));
|
|
|
|
case 2:
|
|
medias = _context5.sent;
|
|
console.log(medias);
|
|
setFiles(medias);
|
|
|
|
case 5:
|
|
case "end":
|
|
return _context5.stop();
|
|
}
|
|
}
|
|
}, _callee5);
|
|
}));
|
|
return _search.apply(this, arguments);
|
|
}
|
|
|
|
function buy() {
|
|
return _buy.apply(this, arguments);
|
|
}
|
|
|
|
function _buy() {
|
|
_buy = Media_asyncToGenerator(
|
|
/*#__PURE__*/
|
|
regeneratorRuntime.mark(function _callee6() {
|
|
var contacts, chats, contact, chat, p;
|
|
return regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
while (1) {
|
|
switch (_context6.prev = _context6.next) {
|
|
case 0:
|
|
contacts = props.contacts, chats = props.chats;
|
|
console.log(contacts, chats);
|
|
contact = contacts && contacts.find(function (c) {
|
|
return !c.is_owner;
|
|
});
|
|
chat = chats.find(function (ch) {
|
|
return ch.contact_ids.includes(parseInt(contact.id));
|
|
});
|
|
|
|
if (!(!contact || !chat)) {
|
|
_context6.next = 6;
|
|
break;
|
|
}
|
|
|
|
return _context6.abrupt("return");
|
|
|
|
case 6:
|
|
_context6.next = 8;
|
|
return relay.POST('purchase', {
|
|
chat_id: chat.id,
|
|
contact_id: contact.id,
|
|
amount: selectedMedia.price,
|
|
muid: selectedMedia.muid
|
|
});
|
|
|
|
case 8:
|
|
p = _context6.sent;
|
|
console.log(p);
|
|
|
|
case 10:
|
|
case "end":
|
|
return _context6.stop();
|
|
}
|
|
}
|
|
}, _callee6);
|
|
}));
|
|
return _buy.apply(this, arguments);
|
|
}
|
|
|
|
var _useDropzone = useDropzone({
|
|
onDrop: onDrop
|
|
}),
|
|
getRootProps = _useDropzone.getRootProps,
|
|
getInputProps = _useDropzone.getInputProps,
|
|
isDragActive = _useDropzone.isDragActive;
|
|
|
|
if (!loggedIn) {
|
|
return react_default.a.createElement("div", null, "loading...");
|
|
}
|
|
|
|
return react_default.a.createElement("div", null, react_default.a.createElement("input", {
|
|
value: description,
|
|
onChange: function onChange(e) {
|
|
return setDescription(e.target.value);
|
|
},
|
|
style: {
|
|
width: '100%'
|
|
},
|
|
placeholder: "File Description"
|
|
}), description && react_default.a.createElement("div", getRootProps(), react_default.a.createElement("input", getInputProps()), react_default.a.createElement("div", {
|
|
style: Media_styles.dropperStyle(isDragActive)
|
|
}, "Drag and drop, or click to select")), react_default.a.createElement("div", {
|
|
style: Media_styles.row
|
|
}, react_default.a.createElement("h4", null, "Your Files"), myFiles && react_default.a.createElement("div", {
|
|
style: Media_styles.files
|
|
}, myFiles.map(function (f) {
|
|
return react_default.a.createElement(File, {
|
|
f: f,
|
|
key: f.muid
|
|
});
|
|
}))), react_default.a.createElement("div", {
|
|
style: Media_styles.row
|
|
}, react_default.a.createElement("h4", null, "The world's files"), selectedMedia && react_default.a.createElement("div", {
|
|
style: Media_styles.search
|
|
}, react_default.a.createElement("strong", null, "Buy ".concat(selectedMedia.name, "?")), "\xA0\xA0", react_default.a.createElement("button", {
|
|
onClick: buy
|
|
}, "ok"), "\xA0", react_default.a.createElement("button", {
|
|
onClick: function onClick() {
|
|
return setSelectedMedia(null);
|
|
}
|
|
}, "cancel")), !selectedMedia && react_default.a.createElement("div", {
|
|
style: Media_styles.search
|
|
}, react_default.a.createElement("input", {
|
|
value: searchText,
|
|
onChange: function onChange(e) {
|
|
return setSearchText(e.target.value);
|
|
},
|
|
onKeyPress: function onKeyPress(e) {
|
|
if (e.key === 'Enter') search();
|
|
},
|
|
placeholder: "Search"
|
|
}), react_default.a.createElement("button", {
|
|
disabled: !searchText,
|
|
onClick: search
|
|
}, "ok")), files && react_default.a.createElement("div", {
|
|
style: Media_styles.files
|
|
}, files.map(function (f) {
|
|
return react_default.a.createElement(File, {
|
|
f: f,
|
|
key: f.muid,
|
|
selected: f.muid === (selectedMedia && selectedMedia.muid),
|
|
onClick: function onClick() {
|
|
return setSelectedMedia(f);
|
|
}
|
|
});
|
|
}))), react_default.a.createElement("div", {
|
|
style: Media_styles.row
|
|
}, react_default.a.createElement("h4", null, "Purchases"), fake && react_default.a.createElement("div", {
|
|
style: Media_styles.files
|
|
}, fake.map(function (f) {
|
|
return react_default.a.createElement(File, {
|
|
key: f.id,
|
|
f: Media_objectSpread({}, f, {
|
|
name: 'wolf',
|
|
price: 0
|
|
}),
|
|
onClick:
|
|
/*#__PURE__*/
|
|
Media_asyncToGenerator(
|
|
/*#__PURE__*/
|
|
regeneratorRuntime.mark(function _callee3() {
|
|
var blob, reader;
|
|
return regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
while (1) {
|
|
switch (_context3.prev = _context3.next) {
|
|
case 0:
|
|
console.log(f);
|
|
_context3.next = 3;
|
|
return api_media.BLOB("file/".concat(f.id, "_").concat(f.exp, "_").concat(f.mypubkey, "?receipt=").concat(f.receipt));
|
|
|
|
case 3:
|
|
blob = _context3.sent;
|
|
reader = new FileReader();
|
|
|
|
reader.onloadend = function () {
|
|
return setImg(reader.result);
|
|
};
|
|
|
|
reader.readAsDataURL(blob);
|
|
|
|
case 7:
|
|
case "end":
|
|
return _context3.stop();
|
|
}
|
|
}
|
|
}, _callee3);
|
|
}))
|
|
});
|
|
}))), img && react_default.a.createElement("img", {
|
|
height: "200",
|
|
src: img
|
|
}));
|
|
}
|
|
var Media_styles = {
|
|
row: {
|
|
marginTop: 15,
|
|
border: '1px solid #dadada',
|
|
padding: 10
|
|
},
|
|
search: {
|
|
width: 300,
|
|
height: 22
|
|
},
|
|
files: {
|
|
display: 'flex'
|
|
},
|
|
dropperStyle: function dropperStyle(active) {
|
|
return {
|
|
borderRadius: 5,
|
|
background: 'white',
|
|
height: 50,
|
|
width: '100%',
|
|
cursor: 'pointer',
|
|
padding: '14px 18px',
|
|
border: "2px dashed ".concat(active ? '#0087F7' : '#a9a9a9'),
|
|
color: "".concat(active ? '#0087F7' : 'rgba(0,0,0,.65)')
|
|
};
|
|
}
|
|
};
|
|
|
|
function sleep(ms) {
|
|
return new Promise(function (resolve) {
|
|
return setTimeout(resolve, ms);
|
|
});
|
|
}
|
|
// CONCATENATED MODULE: ./frontend/components/Root.jsx
|
|
function Root_typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { Root_typeof = function _typeof(obj) { return typeof obj; }; } else { Root_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return Root_typeof(obj); }
|
|
|
|
function Root_toConsumableArray(arr) { return Root_arrayWithoutHoles(arr) || Root_iterableToArray(arr) || Root_nonIterableSpread(); }
|
|
|
|
function Root_nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
|
|
|
|
function Root_iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }
|
|
|
|
function Root_arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }
|
|
|
|
function Root_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
|
|
function Root_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); } }
|
|
|
|
function Root_createClass(Constructor, protoProps, staticProps) { if (protoProps) Root_defineProperties(Constructor.prototype, protoProps); if (staticProps) Root_defineProperties(Constructor, staticProps); return Constructor; }
|
|
|
|
function Root_possibleConstructorReturn(self, call) { if (call && (Root_typeof(call) === "object" || typeof call === "function")) { return call; } return Root_assertThisInitialized(self); }
|
|
|
|
function Root_getPrototypeOf(o) { Root_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return Root_getPrototypeOf(o); }
|
|
|
|
function Root_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
|
|
function Root_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) Root_setPrototypeOf(subClass, superClass); }
|
|
|
|
function Root_setPrototypeOf(o, p) { Root_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return Root_setPrototypeOf(o, p); }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Root_Root =
|
|
/*#__PURE__*/
|
|
function (_React$Component) {
|
|
Root_inherits(Root, _React$Component);
|
|
|
|
function Root(props) {
|
|
var _this;
|
|
|
|
Root_classCallCheck(this, Root);
|
|
|
|
_this = Root_possibleConstructorReturn(this, Root_getPrototypeOf(Root).call(this, props));
|
|
_this.state = {
|
|
identity_pubkey: null,
|
|
balance: null,
|
|
pending_open_balance: null,
|
|
messages: [],
|
|
contacts: [],
|
|
subscriptions: [],
|
|
chats: []
|
|
};
|
|
_this.getSubscriptions = _this.getSubscriptions.bind(Root_assertThisInitialized(_this));
|
|
return _this;
|
|
}
|
|
|
|
Root_createClass(Root, [{
|
|
key: "componentDidMount",
|
|
value: function componentDidMount() {
|
|
document.title = location.hostname;
|
|
|
|
if (this.props.isLoggedIn) {
|
|
this.getBalance();
|
|
this.getInfo();
|
|
this.connectSocket();
|
|
this.getContacts();
|
|
this.getMessages();
|
|
this.getSubscriptions();
|
|
this.getChats();
|
|
this.listPayments();
|
|
this.getLogs();
|
|
}
|
|
}
|
|
}, {
|
|
key: "connectSocket",
|
|
value: function connectSocket() {
|
|
var _this2 = this;
|
|
|
|
var protocol = location.protocol == 'https:' ? 'wss' : 'ws';
|
|
this.socket = new WebSocket("".concat(protocol, "://").concat(location.hostname, ":").concat(location.port, "/sphinx_chat"));
|
|
|
|
this.socket.onopen = function () {
|
|
console.log('socket opened');
|
|
};
|
|
|
|
this.socket.onmessage = function (event) {
|
|
var message = JSON.parse(event.data);
|
|
console.log('received message', {
|
|
message: message
|
|
});
|
|
var messages = [].concat(Root_toConsumableArray(_this2.state.messages), [message]);
|
|
|
|
_this2.setState({
|
|
messages: messages
|
|
});
|
|
};
|
|
}
|
|
}, {
|
|
key: "listPayments",
|
|
value: function listPayments() {
|
|
fetch('/payments').then(function (r) {
|
|
return r.json();
|
|
}).then(function (body) {
|
|
console.log("payments", body);
|
|
});
|
|
}
|
|
}, {
|
|
key: "getLogs",
|
|
value: function getLogs() {
|
|
fetch('/logs').then(function (r) {
|
|
return r.json();
|
|
}).then(function (body) {
|
|
console.log("logs", body);
|
|
});
|
|
}
|
|
}, {
|
|
key: "getBalance",
|
|
value: function getBalance() {
|
|
var _this3 = this;
|
|
|
|
fetch('/balance').then(function (r) {
|
|
return r.json();
|
|
}).then(function (body) {
|
|
var _body$response = body.response,
|
|
balance = _body$response.balance,
|
|
pending_open_balance = _body$response.pending_open_balance;
|
|
console.log(balance);
|
|
|
|
_this3.setState({
|
|
balance: balance,
|
|
pending_open_balance: pending_open_balance
|
|
});
|
|
});
|
|
}
|
|
}, {
|
|
key: "getSubscriptions",
|
|
value: function getSubscriptions() {
|
|
var _this4 = this;
|
|
|
|
fetch('/subscriptions').then(function (r) {
|
|
return r.json();
|
|
}).then(function (body) {
|
|
_this4.setState({
|
|
subscriptions: body.response
|
|
});
|
|
});
|
|
}
|
|
}, {
|
|
key: "getInfo",
|
|
value: function getInfo() {
|
|
var _this5 = this;
|
|
|
|
fetch('/getinfo').then(function (r) {
|
|
return r.json();
|
|
}).then(function (body) {
|
|
console.log(body.response);
|
|
var identity_pubkey = body.response.identity_pubkey;
|
|
|
|
_this5.setState({
|
|
identity_pubkey: identity_pubkey
|
|
});
|
|
});
|
|
}
|
|
}, {
|
|
key: "getMessages",
|
|
value: function getMessages() {
|
|
var _this6 = this;
|
|
|
|
fetch('/messages').then(function (r) {
|
|
return r.json();
|
|
}).then(function (body) {
|
|
_this6.setState({
|
|
messages: body.response.new_messages
|
|
});
|
|
});
|
|
}
|
|
}, {
|
|
key: "getContacts",
|
|
value: function getContacts() {
|
|
var _this7 = this;
|
|
|
|
console.log("get contacts");
|
|
fetch('/contacts').then(function (r) {
|
|
return r.json();
|
|
}).then(function (body) {
|
|
_this7.setState({
|
|
contacts: body.response.contacts
|
|
});
|
|
});
|
|
}
|
|
}, {
|
|
key: "getChats",
|
|
value: function getChats() {
|
|
var _this8 = this;
|
|
|
|
fetch('/chats').then(function (r) {
|
|
return r.json();
|
|
}).then(function (body) {
|
|
_this8.setState({
|
|
chats: body.response
|
|
});
|
|
});
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function render() {
|
|
var _this9 = this;
|
|
|
|
var _this$state = this.state,
|
|
balance = _this$state.balance,
|
|
pending_open_balance = _this$state.pending_open_balance,
|
|
messages = _this$state.messages,
|
|
channels = _this$state.channels,
|
|
identity_pubkey = _this$state.identity_pubkey,
|
|
contacts = _this$state.contacts,
|
|
chats = _this$state.chats;
|
|
|
|
if (!this.props.isLoggedIn) {
|
|
return react_default.a.createElement(components_Login, null);
|
|
}
|
|
|
|
return react_default.a.createElement(ctx.Provider, {
|
|
value: this.state
|
|
}, react_default.a.createElement("div", {
|
|
className: "ui container",
|
|
style: {
|
|
marginTop: 20
|
|
}
|
|
}, react_default.a.createElement("h2", null, "Sphinx Chat"), react_default.a.createElement("div", {
|
|
style: {
|
|
margin: '10px 0 20px 0'
|
|
}
|
|
}, react_default.a.createElement("div", null, "Host: ", document.location.host), react_default.a.createElement("div", null, "Identity Pubkey: ", identity_pubkey), react_default.a.createElement("div", null, "Channel balance: ", balance), react_default.a.createElement("div", null, "Pending open balance: ", pending_open_balance)), react_default.a.createElement(modules_Tab_Tab, {
|
|
panes: [{
|
|
menuItem: 'Contacts',
|
|
render: function render() {
|
|
return react_default.a.createElement(modules_Tab_Tab.Pane, null, react_default.a.createElement(components_Contacts, null));
|
|
}
|
|
}, {
|
|
menuItem: 'Messages',
|
|
render: function render() {
|
|
return react_default.a.createElement(modules_Tab_Tab.Pane, null, react_default.a.createElement(components_Messages, null));
|
|
}
|
|
}, {
|
|
menuItem: 'Channels',
|
|
render: function render() {
|
|
return react_default.a.createElement(modules_Tab_Tab.Pane, null, react_default.a.createElement(Channels_Channels, null));
|
|
}
|
|
}, {
|
|
menuItem: 'Subscriptions',
|
|
render: function render() {
|
|
return react_default.a.createElement(modules_Tab_Tab.Pane, null, react_default.a.createElement(components_Subscriptions, {
|
|
getSubscriptions: _this9.getSubscriptions
|
|
}));
|
|
}
|
|
}, {
|
|
menuItem: 'Media',
|
|
render: function render() {
|
|
return react_default.a.createElement(modules_Tab_Tab.Pane, null, react_default.a.createElement(Media, {
|
|
contacts: contacts,
|
|
chats: chats,
|
|
identity_pubkey: identity_pubkey
|
|
}));
|
|
}
|
|
}],
|
|
renderActiveOnly: true
|
|
})));
|
|
}
|
|
}]);
|
|
|
|
return Root;
|
|
}(react_default.a.Component);
|
|
|
|
Root_Root.contextType = ctx;
|
|
/* harmony default export */ var components_Root = (Root_Root);
|
|
// CONCATENATED MODULE: ./frontend/index.jsx
|
|
|
|
|
|
|
|
|
|
react_dom_default.a.render(react_default.a.createElement(components_Root, {
|
|
isLoggedIn: Object(cookies["getCookie"])('x-user-token') != null
|
|
}), document.getElementById('app'));
|
|
|
|
/***/ })
|
|
/******/ ]);
|