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.

4694 lines
129 KiB

3 years ago
  1. /******/ (() => { // webpackBootstrap
  2. /******/ var __webpack_modules__ = ({
  3. /***/ "./resources/js/components/buckets.riot":
  4. /*!**********************************************!*\
  5. !*** ./resources/js/components/buckets.riot ***!
  6. \**********************************************/
  7. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  8. "use strict";
  9. __webpack_require__.r(__webpack_exports__);
  10. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  11. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  12. /* harmony export */ });
  13. /* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! axios */ "./node_modules/axios/index.js");
  14. /* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_0__);
  15. /* harmony import */ var lodash_remove__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash.remove */ "./node_modules/lodash.remove/index.js");
  16. /* harmony import */ var lodash_remove__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_remove__WEBPACK_IMPORTED_MODULE_1__);
  17. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
  18. 'css': null,
  19. 'exports': {
  20. state: {
  21. buckets: []
  22. },
  23. onBeforeMount() {
  24. this.fetch()
  25. },
  26. handleClick() {
  27. },
  28. handleDelete(event, bucket) {
  29. event.preventDefault()
  30. axios__WEBPACK_IMPORTED_MODULE_0___default().delete('/api/bucket/' + bucket._id)
  31. .then((response) => {
  32. // removing from buckets
  33. lodash_remove__WEBPACK_IMPORTED_MODULE_1___default()(this.state.buckets, function(b) {
  34. return b._id === bucket._id
  35. })
  36. this.update()
  37. })
  38. },
  39. fetch() {
  40. axios__WEBPACK_IMPORTED_MODULE_0___default().get('/api/bucket/', {
  41. params: {
  42. visiblity: this.props.visiblity
  43. }
  44. }).then((response) => {
  45. this.state.buckets = response.data.data
  46. this.update()
  47. })
  48. }
  49. },
  50. 'template': function(
  51. template,
  52. expressionTypes,
  53. bindingTypes,
  54. getComponent
  55. ) {
  56. return template(
  57. '<div class="buckets"><div class="grid"><div expr0="expr0" class="col-12 col-md-4 col-xlg-3"></div></div><div class="grid"><div class="col-12"><div class="buckets__more"><button expr5="expr5" type="button" class="button">\n More\n <svg class="icon" aria-hidden="true"><use xlink:href="/symbol-defs.svg#icon-arrow-down"/></svg></button></div></div></div></div>',
  58. [
  59. {
  60. 'type': bindingTypes.EACH,
  61. 'getKey': null,
  62. 'condition': null,
  63. 'template': template(
  64. '<article class="panel buckets__item"><div class="bar"><div class="bar__end w-100"><button expr1="expr1" class="button button--transparent"><svg class="icon fill-text-contrast" aria-hidden="true"><use xlink:href="/symbol-defs.svg#icon-delete"/></svg></button></div></div><div class="panel__body"><a expr2="expr2"><h3 expr3="expr3" class="buckets__title"> </h3><div class="content"><p expr4="expr4"> </p></div></a></div></article>',
  65. [
  66. {
  67. 'redundantAttribute': 'expr1',
  68. 'selector': '[expr1]',
  69. 'expressions': [
  70. {
  71. 'type': expressionTypes.EVENT,
  72. 'name': 'onclick',
  73. 'evaluate': function(
  74. _scope
  75. ) {
  76. return (event) => { _scope.handleDelete(event, _scope.bucket) };
  77. }
  78. }
  79. ]
  80. },
  81. {
  82. 'redundantAttribute': 'expr2',
  83. 'selector': '[expr2]',
  84. 'expressions': [
  85. {
  86. 'type': expressionTypes.ATTRIBUTE,
  87. 'name': 'href',
  88. 'evaluate': function(
  89. _scope
  90. ) {
  91. return [
  92. '/bucket/',
  93. _scope.bucket._id
  94. ].join(
  95. ''
  96. );
  97. }
  98. }
  99. ]
  100. },
  101. {
  102. 'redundantAttribute': 'expr3',
  103. 'selector': '[expr3]',
  104. 'expressions': [
  105. {
  106. 'type': expressionTypes.TEXT,
  107. 'childNodeIndex': 0,
  108. 'evaluate': function(
  109. _scope
  110. ) {
  111. return [
  112. _scope.bucket.title
  113. ].join(
  114. ''
  115. );
  116. }
  117. }
  118. ]
  119. },
  120. {
  121. 'redundantAttribute': 'expr4',
  122. 'selector': '[expr4]',
  123. 'expressions': [
  124. {
  125. 'type': expressionTypes.TEXT,
  126. 'childNodeIndex': 0,
  127. 'evaluate': function(
  128. _scope
  129. ) {
  130. return [
  131. _scope.bucket.description
  132. ].join(
  133. ''
  134. );
  135. }
  136. }
  137. ]
  138. }
  139. ]
  140. ),
  141. 'redundantAttribute': 'expr0',
  142. 'selector': '[expr0]',
  143. 'itemName': 'bucket',
  144. 'indexName': null,
  145. 'evaluate': function(
  146. _scope
  147. ) {
  148. return _scope.state.buckets;
  149. }
  150. },
  151. {
  152. 'redundantAttribute': 'expr5',
  153. 'selector': '[expr5]',
  154. 'expressions': [
  155. {
  156. 'type': expressionTypes.EVENT,
  157. 'name': 'onclick',
  158. 'evaluate': function(
  159. _scope
  160. ) {
  161. return _scope.handleClick;
  162. }
  163. }
  164. ]
  165. }
  166. ]
  167. );
  168. },
  169. 'name': 'app-buckets'
  170. });
  171. /***/ }),
  172. /***/ "./node_modules/axios/index.js":
  173. /*!*************************************!*\
  174. !*** ./node_modules/axios/index.js ***!
  175. \*************************************/
  176. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  177. module.exports = __webpack_require__(/*! ./lib/axios */ "./node_modules/axios/lib/axios.js");
  178. /***/ }),
  179. /***/ "./node_modules/axios/lib/adapters/xhr.js":
  180. /*!************************************************!*\
  181. !*** ./node_modules/axios/lib/adapters/xhr.js ***!
  182. \************************************************/
  183. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  184. "use strict";
  185. var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js");
  186. var settle = __webpack_require__(/*! ./../core/settle */ "./node_modules/axios/lib/core/settle.js");
  187. var cookies = __webpack_require__(/*! ./../helpers/cookies */ "./node_modules/axios/lib/helpers/cookies.js");
  188. var buildURL = __webpack_require__(/*! ./../helpers/buildURL */ "./node_modules/axios/lib/helpers/buildURL.js");
  189. var buildFullPath = __webpack_require__(/*! ../core/buildFullPath */ "./node_modules/axios/lib/core/buildFullPath.js");
  190. var parseHeaders = __webpack_require__(/*! ./../helpers/parseHeaders */ "./node_modules/axios/lib/helpers/parseHeaders.js");
  191. var isURLSameOrigin = __webpack_require__(/*! ./../helpers/isURLSameOrigin */ "./node_modules/axios/lib/helpers/isURLSameOrigin.js");
  192. var createError = __webpack_require__(/*! ../core/createError */ "./node_modules/axios/lib/core/createError.js");
  193. module.exports = function xhrAdapter(config) {
  194. return new Promise(function dispatchXhrRequest(resolve, reject) {
  195. var requestData = config.data;
  196. var requestHeaders = config.headers;
  197. if (utils.isFormData(requestData)) {
  198. delete requestHeaders['Content-Type']; // Let the browser set it
  199. }
  200. var request = new XMLHttpRequest();
  201. // HTTP basic authentication
  202. if (config.auth) {
  203. var username = config.auth.username || '';
  204. var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';
  205. requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);
  206. }
  207. var fullPath = buildFullPath(config.baseURL, config.url);
  208. request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
  209. // Set the request timeout in MS
  210. request.timeout = config.timeout;
  211. // Listen for ready state
  212. request.onreadystatechange = function handleLoad() {
  213. if (!request || request.readyState !== 4) {
  214. return;
  215. }
  216. // The request errored out and we didn't get a response, this will be
  217. // handled by onerror instead
  218. // With one exception: request that using file: protocol, most browsers
  219. // will return status as 0 even though it's a successful request
  220. if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
  221. return;
  222. }
  223. // Prepare the response
  224. var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;
  225. var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;
  226. var response = {
  227. data: responseData,
  228. status: request.status,
  229. statusText: request.statusText,
  230. headers: responseHeaders,
  231. config: config,
  232. request: request
  233. };
  234. settle(resolve, reject, response);
  235. // Clean up request
  236. request = null;
  237. };
  238. // Handle browser request cancellation (as opposed to a manual cancellation)
  239. request.onabort = function handleAbort() {
  240. if (!request) {
  241. return;
  242. }
  243. reject(createError('Request aborted', config, 'ECONNABORTED', request));
  244. // Clean up request
  245. request = null;
  246. };
  247. // Handle low level network errors
  248. request.onerror = function handleError() {
  249. // Real errors are hidden from us by the browser
  250. // onerror should only fire if it's a network error
  251. reject(createError('Network Error', config, null, request));
  252. // Clean up request
  253. request = null;
  254. };
  255. // Handle timeout
  256. request.ontimeout = function handleTimeout() {
  257. var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';
  258. if (config.timeoutErrorMessage) {
  259. timeoutErrorMessage = config.timeoutErrorMessage;
  260. }
  261. reject(createError(timeoutErrorMessage, config, 'ECONNABORTED',
  262. request));
  263. // Clean up request
  264. request = null;
  265. };
  266. // Add xsrf header
  267. // This is only done if running in a standard browser environment.
  268. // Specifically not if we're in a web worker, or react-native.
  269. if (utils.isStandardBrowserEnv()) {
  270. // Add xsrf header
  271. var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?
  272. cookies.read(config.xsrfCookieName) :
  273. undefined;
  274. if (xsrfValue) {
  275. requestHeaders[config.xsrfHeaderName] = xsrfValue;
  276. }
  277. }
  278. // Add headers to the request
  279. if ('setRequestHeader' in request) {
  280. utils.forEach(requestHeaders, function setRequestHeader(val, key) {
  281. if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {
  282. // Remove Content-Type if data is undefined
  283. delete requestHeaders[key];
  284. } else {
  285. // Otherwise add header to the request
  286. request.setRequestHeader(key, val);
  287. }
  288. });
  289. }
  290. // Add withCredentials to request if needed
  291. if (!utils.isUndefined(config.withCredentials)) {
  292. request.withCredentials = !!config.withCredentials;
  293. }
  294. // Add responseType to request if needed
  295. if (config.responseType) {
  296. try {
  297. request.responseType = config.responseType;
  298. } catch (e) {
  299. // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.
  300. // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.
  301. if (config.responseType !== 'json') {
  302. throw e;
  303. }
  304. }
  305. }
  306. // Handle progress if needed
  307. if (typeof config.onDownloadProgress === 'function') {
  308. request.addEventListener('progress', config.onDownloadProgress);
  309. }
  310. // Not all browsers support upload events
  311. if (typeof config.onUploadProgress === 'function' && request.upload) {
  312. request.upload.addEventListener('progress', config.onUploadProgress);
  313. }
  314. if (config.cancelToken) {
  315. // Handle cancellation
  316. config.cancelToken.promise.then(function onCanceled(cancel) {
  317. if (!request) {
  318. return;
  319. }
  320. request.abort();
  321. reject(cancel);
  322. // Clean up request
  323. request = null;
  324. });
  325. }
  326. if (!requestData) {
  327. requestData = null;
  328. }
  329. // Send the request
  330. request.send(requestData);
  331. });
  332. };
  333. /***/ }),
  334. /***/ "./node_modules/axios/lib/axios.js":
  335. /*!*****************************************!*\
  336. !*** ./node_modules/axios/lib/axios.js ***!
  337. \*****************************************/
  338. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  339. "use strict";
  340. var utils = __webpack_require__(/*! ./utils */ "./node_modules/axios/lib/utils.js");
  341. var bind = __webpack_require__(/*! ./helpers/bind */ "./node_modules/axios/lib/helpers/bind.js");
  342. var Axios = __webpack_require__(/*! ./core/Axios */ "./node_modules/axios/lib/core/Axios.js");
  343. var mergeConfig = __webpack_require__(/*! ./core/mergeConfig */ "./node_modules/axios/lib/core/mergeConfig.js");
  344. var defaults = __webpack_require__(/*! ./defaults */ "./node_modules/axios/lib/defaults.js");
  345. /**
  346. * Create an instance of Axios
  347. *
  348. * @param {Object} defaultConfig The default config for the instance
  349. * @return {Axios} A new instance of Axios
  350. */
  351. function createInstance(defaultConfig) {
  352. var context = new Axios(defaultConfig);
  353. var instance = bind(Axios.prototype.request, context);
  354. // Copy axios.prototype to instance
  355. utils.extend(instance, Axios.prototype, context);
  356. // Copy context to instance
  357. utils.extend(instance, context);
  358. return instance;
  359. }
  360. // Create the default instance to be exported
  361. var axios = createInstance(defaults);
  362. // Expose Axios class to allow class inheritance
  363. axios.Axios = Axios;
  364. // Factory for creating new instances
  365. axios.create = function create(instanceConfig) {
  366. return createInstance(mergeConfig(axios.defaults, instanceConfig));
  367. };
  368. // Expose Cancel & CancelToken
  369. axios.Cancel = __webpack_require__(/*! ./cancel/Cancel */ "./node_modules/axios/lib/cancel/Cancel.js");
  370. axios.CancelToken = __webpack_require__(/*! ./cancel/CancelToken */ "./node_modules/axios/lib/cancel/CancelToken.js");
  371. axios.isCancel = __webpack_require__(/*! ./cancel/isCancel */ "./node_modules/axios/lib/cancel/isCancel.js");
  372. // Expose all/spread
  373. axios.all = function all(promises) {
  374. return Promise.all(promises);
  375. };
  376. axios.spread = __webpack_require__(/*! ./helpers/spread */ "./node_modules/axios/lib/helpers/spread.js");
  377. // Expose isAxiosError
  378. axios.isAxiosError = __webpack_require__(/*! ./helpers/isAxiosError */ "./node_modules/axios/lib/helpers/isAxiosError.js");
  379. module.exports = axios;
  380. // Allow use of default import syntax in TypeScript
  381. module.exports.default = axios;
  382. /***/ }),
  383. /***/ "./node_modules/axios/lib/cancel/Cancel.js":
  384. /*!*************************************************!*\
  385. !*** ./node_modules/axios/lib/cancel/Cancel.js ***!
  386. \*************************************************/
  387. /***/ ((module) => {
  388. "use strict";
  389. /**
  390. * A `Cancel` is an object that is thrown when an operation is canceled.
  391. *
  392. * @class
  393. * @param {string=} message The message.
  394. */
  395. function Cancel(message) {
  396. this.message = message;
  397. }
  398. Cancel.prototype.toString = function toString() {
  399. return 'Cancel' + (this.message ? ': ' + this.message : '');
  400. };
  401. Cancel.prototype.__CANCEL__ = true;
  402. module.exports = Cancel;
  403. /***/ }),
  404. /***/ "./node_modules/axios/lib/cancel/CancelToken.js":
  405. /*!******************************************************!*\
  406. !*** ./node_modules/axios/lib/cancel/CancelToken.js ***!
  407. \******************************************************/
  408. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  409. "use strict";
  410. var Cancel = __webpack_require__(/*! ./Cancel */ "./node_modules/axios/lib/cancel/Cancel.js");
  411. /**
  412. * A `CancelToken` is an object that can be used to request cancellation of an operation.
  413. *
  414. * @class
  415. * @param {Function} executor The executor function.
  416. */
  417. function CancelToken(executor) {
  418. if (typeof executor !== 'function') {
  419. throw new TypeError('executor must be a function.');
  420. }
  421. var resolvePromise;
  422. this.promise = new Promise(function promiseExecutor(resolve) {
  423. resolvePromise = resolve;
  424. });
  425. var token = this;
  426. executor(function cancel(message) {
  427. if (token.reason) {
  428. // Cancellation has already been requested
  429. return;
  430. }
  431. token.reason = new Cancel(message);
  432. resolvePromise(token.reason);
  433. });
  434. }
  435. /**
  436. * Throws a `Cancel` if cancellation has been requested.
  437. */
  438. CancelToken.prototype.throwIfRequested = function throwIfRequested() {
  439. if (this.reason) {
  440. throw this.reason;
  441. }
  442. };
  443. /**
  444. * Returns an object that contains a new `CancelToken` and a function that, when called,
  445. * cancels the `CancelToken`.
  446. */
  447. CancelToken.source = function source() {
  448. var cancel;
  449. var token = new CancelToken(function executor(c) {
  450. cancel = c;
  451. });
  452. return {
  453. token: token,
  454. cancel: cancel
  455. };
  456. };
  457. module.exports = CancelToken;
  458. /***/ }),
  459. /***/ "./node_modules/axios/lib/cancel/isCancel.js":
  460. /*!***************************************************!*\
  461. !*** ./node_modules/axios/lib/cancel/isCancel.js ***!
  462. \***************************************************/
  463. /***/ ((module) => {
  464. "use strict";
  465. module.exports = function isCancel(value) {
  466. return !!(value && value.__CANCEL__);
  467. };
  468. /***/ }),
  469. /***/ "./node_modules/axios/lib/core/Axios.js":
  470. /*!**********************************************!*\
  471. !*** ./node_modules/axios/lib/core/Axios.js ***!
  472. \**********************************************/
  473. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  474. "use strict";
  475. var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js");
  476. var buildURL = __webpack_require__(/*! ../helpers/buildURL */ "./node_modules/axios/lib/helpers/buildURL.js");
  477. var InterceptorManager = __webpack_require__(/*! ./InterceptorManager */ "./node_modules/axios/lib/core/InterceptorManager.js");
  478. var dispatchRequest = __webpack_require__(/*! ./dispatchRequest */ "./node_modules/axios/lib/core/dispatchRequest.js");
  479. var mergeConfig = __webpack_require__(/*! ./mergeConfig */ "./node_modules/axios/lib/core/mergeConfig.js");
  480. /**
  481. * Create a new instance of Axios
  482. *
  483. * @param {Object} instanceConfig The default config for the instance
  484. */
  485. function Axios(instanceConfig) {
  486. this.defaults = instanceConfig;
  487. this.interceptors = {
  488. request: new InterceptorManager(),
  489. response: new InterceptorManager()
  490. };
  491. }
  492. /**
  493. * Dispatch a request
  494. *
  495. * @param {Object} config The config specific for this request (merged with this.defaults)
  496. */
  497. Axios.prototype.request = function request(config) {
  498. /*eslint no-param-reassign:0*/
  499. // Allow for axios('example/url'[, config]) a la fetch API
  500. if (typeof config === 'string') {
  501. config = arguments[1] || {};
  502. config.url = arguments[0];
  503. } else {
  504. config = config || {};
  505. }
  506. config = mergeConfig(this.defaults, config);
  507. // Set config.method
  508. if (config.method) {
  509. config.method = config.method.toLowerCase();
  510. } else if (this.defaults.method) {
  511. config.method = this.defaults.method.toLowerCase();
  512. } else {
  513. config.method = 'get';
  514. }
  515. // Hook up interceptors middleware
  516. var chain = [dispatchRequest, undefined];
  517. var promise = Promise.resolve(config);
  518. this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
  519. chain.unshift(interceptor.fulfilled, interceptor.rejected);
  520. });
  521. this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
  522. chain.push(interceptor.fulfilled, interceptor.rejected);
  523. });
  524. while (chain.length) {
  525. promise = promise.then(chain.shift(), chain.shift());
  526. }
  527. return promise;
  528. };
  529. Axios.prototype.getUri = function getUri(config) {
  530. config = mergeConfig(this.defaults, config);
  531. return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, '');
  532. };
  533. // Provide aliases for supported request methods
  534. utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
  535. /*eslint func-names:0*/
  536. Axios.prototype[method] = function(url, config) {
  537. return this.request(mergeConfig(config || {}, {
  538. method: method,
  539. url: url,
  540. data: (config || {}).data
  541. }));
  542. };
  543. });
  544. utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
  545. /*eslint func-names:0*/
  546. Axios.prototype[method] = function(url, data, config) {
  547. return this.request(mergeConfig(config || {}, {
  548. method: method,
  549. url: url,
  550. data: data
  551. }));
  552. };
  553. });
  554. module.exports = Axios;
  555. /***/ }),
  556. /***/ "./node_modules/axios/lib/core/InterceptorManager.js":
  557. /*!***********************************************************!*\
  558. !*** ./node_modules/axios/lib/core/InterceptorManager.js ***!
  559. \***********************************************************/
  560. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  561. "use strict";
  562. var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js");
  563. function InterceptorManager() {
  564. this.handlers = [];
  565. }
  566. /**
  567. * Add a new interceptor to the stack
  568. *
  569. * @param {Function} fulfilled The function to handle `then` for a `Promise`
  570. * @param {Function} rejected The function to handle `reject` for a `Promise`
  571. *
  572. * @return {Number} An ID used to remove interceptor later
  573. */
  574. InterceptorManager.prototype.use = function use(fulfilled, rejected) {
  575. this.handlers.push({
  576. fulfilled: fulfilled,
  577. rejected: rejected
  578. });
  579. return this.handlers.length - 1;
  580. };
  581. /**
  582. * Remove an interceptor from the stack
  583. *
  584. * @param {Number} id The ID that was returned by `use`
  585. */
  586. InterceptorManager.prototype.eject = function eject(id) {
  587. if (this.handlers[id]) {
  588. this.handlers[id] = null;
  589. }
  590. };
  591. /**
  592. * Iterate over all the registered interceptors
  593. *
  594. * This method is particularly useful for skipping over any
  595. * interceptors that may have become `null` calling `eject`.
  596. *
  597. * @param {Function} fn The function to call for each interceptor
  598. */
  599. InterceptorManager.prototype.forEach = function forEach(fn) {
  600. utils.forEach(this.handlers, function forEachHandler(h) {
  601. if (h !== null) {
  602. fn(h);
  603. }
  604. });
  605. };
  606. module.exports = InterceptorManager;
  607. /***/ }),
  608. /***/ "./node_modules/axios/lib/core/buildFullPath.js":
  609. /*!******************************************************!*\
  610. !*** ./node_modules/axios/lib/core/buildFullPath.js ***!
  611. \******************************************************/
  612. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  613. "use strict";
  614. var isAbsoluteURL = __webpack_require__(/*! ../helpers/isAbsoluteURL */ "./node_modules/axios/lib/helpers/isAbsoluteURL.js");
  615. var combineURLs = __webpack_require__(/*! ../helpers/combineURLs */ "./node_modules/axios/lib/helpers/combineURLs.js");
  616. /**
  617. * Creates a new URL by combining the baseURL with the requestedURL,
  618. * only when the requestedURL is not already an absolute URL.
  619. * If the requestURL is absolute, this function returns the requestedURL untouched.
  620. *
  621. * @param {string} baseURL The base URL
  622. * @param {string} requestedURL Absolute or relative URL to combine
  623. * @returns {string} The combined full path
  624. */
  625. module.exports = function buildFullPath(baseURL, requestedURL) {
  626. if (baseURL && !isAbsoluteURL(requestedURL)) {
  627. return combineURLs(baseURL, requestedURL);
  628. }
  629. return requestedURL;
  630. };
  631. /***/ }),
  632. /***/ "./node_modules/axios/lib/core/createError.js":
  633. /*!****************************************************!*\
  634. !*** ./node_modules/axios/lib/core/createError.js ***!
  635. \****************************************************/
  636. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  637. "use strict";
  638. var enhanceError = __webpack_require__(/*! ./enhanceError */ "./node_modules/axios/lib/core/enhanceError.js");
  639. /**
  640. * Create an Error with the specified message, config, error code, request and response.
  641. *
  642. * @param {string} message The error message.
  643. * @param {Object} config The config.
  644. * @param {string} [code] The error code (for example, 'ECONNABORTED').
  645. * @param {Object} [request] The request.
  646. * @param {Object} [response] The response.
  647. * @returns {Error} The created error.
  648. */
  649. module.exports = function createError(message, config, code, request, response) {
  650. var error = new Error(message);
  651. return enhanceError(error, config, code, request, response);
  652. };
  653. /***/ }),
  654. /***/ "./node_modules/axios/lib/core/dispatchRequest.js":
  655. /*!********************************************************!*\
  656. !*** ./node_modules/axios/lib/core/dispatchRequest.js ***!
  657. \********************************************************/
  658. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  659. "use strict";
  660. var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js");
  661. var transformData = __webpack_require__(/*! ./transformData */ "./node_modules/axios/lib/core/transformData.js");
  662. var isCancel = __webpack_require__(/*! ../cancel/isCancel */ "./node_modules/axios/lib/cancel/isCancel.js");
  663. var defaults = __webpack_require__(/*! ../defaults */ "./node_modules/axios/lib/defaults.js");
  664. /**
  665. * Throws a `Cancel` if cancellation has been requested.
  666. */
  667. function throwIfCancellationRequested(config) {
  668. if (config.cancelToken) {
  669. config.cancelToken.throwIfRequested();
  670. }
  671. }
  672. /**
  673. * Dispatch a request to the server using the configured adapter.
  674. *
  675. * @param {object} config The config that is to be used for the request
  676. * @returns {Promise} The Promise to be fulfilled
  677. */
  678. module.exports = function dispatchRequest(config) {
  679. throwIfCancellationRequested(config);
  680. // Ensure headers exist
  681. config.headers = config.headers || {};
  682. // Transform request data
  683. config.data = transformData(
  684. config.data,
  685. config.headers,
  686. config.transformRequest
  687. );
  688. // Flatten headers
  689. config.headers = utils.merge(
  690. config.headers.common || {},
  691. config.headers[config.method] || {},
  692. config.headers
  693. );
  694. utils.forEach(
  695. ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
  696. function cleanHeaderConfig(method) {
  697. delete config.headers[method];
  698. }
  699. );
  700. var adapter = config.adapter || defaults.adapter;
  701. return adapter(config).then(function onAdapterResolution(response) {
  702. throwIfCancellationRequested(config);
  703. // Transform response data
  704. response.data = transformData(
  705. response.data,
  706. response.headers,
  707. config.transformResponse
  708. );
  709. return response;
  710. }, function onAdapterRejection(reason) {
  711. if (!isCancel(reason)) {
  712. throwIfCancellationRequested(config);
  713. // Transform response data
  714. if (reason && reason.response) {
  715. reason.response.data = transformData(
  716. reason.response.data,
  717. reason.response.headers,
  718. config.transformResponse
  719. );
  720. }
  721. }
  722. return Promise.reject(reason);
  723. });
  724. };
  725. /***/ }),
  726. /***/ "./node_modules/axios/lib/core/enhanceError.js":
  727. /*!*****************************************************!*\
  728. !*** ./node_modules/axios/lib/core/enhanceError.js ***!
  729. \*****************************************************/
  730. /***/ ((module) => {
  731. "use strict";
  732. /**
  733. * Update an Error with the specified config, error code, and response.
  734. *
  735. * @param {Error} error The error to update.
  736. * @param {Object} config The config.
  737. * @param {string} [code] The error code (for example, 'ECONNABORTED').
  738. * @param {Object} [request] The request.
  739. * @param {Object} [response] The response.
  740. * @returns {Error} The error.
  741. */
  742. module.exports = function enhanceError(error, config, code, request, response) {
  743. error.config = config;
  744. if (code) {
  745. error.code = code;
  746. }
  747. error.request = request;
  748. error.response = response;
  749. error.isAxiosError = true;
  750. error.toJSON = function toJSON() {
  751. return {
  752. // Standard
  753. message: this.message,
  754. name: this.name,
  755. // Microsoft
  756. description: this.description,
  757. number: this.number,
  758. // Mozilla
  759. fileName: this.fileName,
  760. lineNumber: this.lineNumber,
  761. columnNumber: this.columnNumber,
  762. stack: this.stack,
  763. // Axios
  764. config: this.config,
  765. code: this.code
  766. };
  767. };
  768. return error;
  769. };
  770. /***/ }),
  771. /***/ "./node_modules/axios/lib/core/mergeConfig.js":
  772. /*!****************************************************!*\
  773. !*** ./node_modules/axios/lib/core/mergeConfig.js ***!
  774. \****************************************************/
  775. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  776. "use strict";
  777. var utils = __webpack_require__(/*! ../utils */ "./node_modules/axios/lib/utils.js");
  778. /**
  779. * Config-specific merge-function which creates a new config-object
  780. * by merging two configuration objects together.
  781. *
  782. * @param {Object} config1
  783. * @param {Object} config2
  784. * @returns {Object} New object resulting from merging config2 to config1
  785. */
  786. module.exports = function mergeConfig(config1, config2) {
  787. // eslint-disable-next-line no-param-reassign
  788. config2 = config2 || {};
  789. var config = {};
  790. var valueFromConfig2Keys = ['url', 'method', 'data'];
  791. var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];
  792. var defaultToConfig2Keys = [
  793. 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',
  794. 'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',
  795. 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress',
  796. 'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent',
  797. 'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding'
  798. ];
  799. var directMergeKeys = ['validateStatus'];
  800. function getMergedValue(target, source) {
  801. if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
  802. return utils.merge(target, source);
  803. } else if (utils.isPlainObject(source)) {
  804. return utils.merge({}, source);
  805. } else if (utils.isArray(source)) {
  806. return source.slice();
  807. }
  808. return source;
  809. }
  810. function mergeDeepProperties(prop) {
  811. if (!utils.isUndefined(config2[prop])) {
  812. config[prop] = getMergedValue(config1[prop], config2[prop]);
  813. } else if (!utils.isUndefined(config1[prop])) {
  814. config[prop] = getMergedValue(undefined, config1[prop]);
  815. }
  816. }
  817. utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {
  818. if (!utils.isUndefined(config2[prop])) {
  819. config[prop] = getMergedValue(undefined, config2[prop]);
  820. }
  821. });
  822. utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);
  823. utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {
  824. if (!utils.isUndefined(config2[prop])) {
  825. config[prop] = getMergedValue(undefined, config2[prop]);
  826. } else if (!utils.isUndefined(config1[prop])) {
  827. config[prop] = getMergedValue(undefined, config1[prop]);
  828. }
  829. });
  830. utils.forEach(directMergeKeys, function merge(prop) {
  831. if (prop in config2) {
  832. config[prop] = getMergedValue(config1[prop], config2[prop]);
  833. } else if (prop in config1) {
  834. config[prop] = getMergedValue(undefined, config1[prop]);
  835. }
  836. });
  837. var axiosKeys = valueFromConfig2Keys
  838. .concat(mergeDeepPropertiesKeys)
  839. .concat(defaultToConfig2Keys)
  840. .concat(directMergeKeys);
  841. var otherKeys = Object
  842. .keys(config1)
  843. .concat(Object.keys(config2))
  844. .filter(function filterAxiosKeys(key) {
  845. return axiosKeys.indexOf(key) === -1;
  846. });
  847. utils.forEach(otherKeys, mergeDeepProperties);
  848. return config;
  849. };
  850. /***/ }),
  851. /***/ "./node_modules/axios/lib/core/settle.js":
  852. /*!***********************************************!*\
  853. !*** ./node_modules/axios/lib/core/settle.js ***!
  854. \***********************************************/
  855. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  856. "use strict";
  857. var createError = __webpack_require__(/*! ./createError */ "./node_modules/axios/lib/core/createError.js");
  858. /**
  859. * Resolve or reject a Promise based on response status.
  860. *
  861. * @param {Function} resolve A function that resolves the promise.
  862. * @param {Function} reject A function that rejects the promise.
  863. * @param {object} response The response.
  864. */
  865. module.exports = function settle(resolve, reject, response) {
  866. var validateStatus = response.config.validateStatus;
  867. if (!response.status || !validateStatus || validateStatus(response.status)) {
  868. resolve(response);
  869. } else {
  870. reject(createError(
  871. 'Request failed with status code ' + response.status,
  872. response.config,
  873. null,
  874. response.request,
  875. response
  876. ));
  877. }
  878. };
  879. /***/ }),
  880. /***/ "./node_modules/axios/lib/core/transformData.js":
  881. /*!******************************************************!*\
  882. !*** ./node_modules/axios/lib/core/transformData.js ***!
  883. \******************************************************/
  884. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  885. "use strict";
  886. var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js");
  887. /**
  888. * Transform the data for a request or a response
  889. *
  890. * @param {Object|String} data The data to be transformed
  891. * @param {Array} headers The headers for the request or response
  892. * @param {Array|Function} fns A single function or Array of functions
  893. * @returns {*} The resulting transformed data
  894. */
  895. module.exports = function transformData(data, headers, fns) {
  896. /*eslint no-param-reassign:0*/
  897. utils.forEach(fns, function transform(fn) {
  898. data = fn(data, headers);
  899. });
  900. return data;
  901. };
  902. /***/ }),
  903. /***/ "./node_modules/axios/lib/defaults.js":
  904. /*!********************************************!*\
  905. !*** ./node_modules/axios/lib/defaults.js ***!
  906. \********************************************/
  907. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  908. "use strict";
  909. /* provided dependency */ var process = __webpack_require__(/*! process/browser */ "./node_modules/process/browser.js");
  910. var utils = __webpack_require__(/*! ./utils */ "./node_modules/axios/lib/utils.js");
  911. var normalizeHeaderName = __webpack_require__(/*! ./helpers/normalizeHeaderName */ "./node_modules/axios/lib/helpers/normalizeHeaderName.js");
  912. var DEFAULT_CONTENT_TYPE = {
  913. 'Content-Type': 'application/x-www-form-urlencoded'
  914. };
  915. function setContentTypeIfUnset(headers, value) {
  916. if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {
  917. headers['Content-Type'] = value;
  918. }
  919. }
  920. function getDefaultAdapter() {
  921. var adapter;
  922. if (typeof XMLHttpRequest !== 'undefined') {
  923. // For browsers use XHR adapter
  924. adapter = __webpack_require__(/*! ./adapters/xhr */ "./node_modules/axios/lib/adapters/xhr.js");
  925. } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {
  926. // For node use HTTP adapter
  927. adapter = __webpack_require__(/*! ./adapters/http */ "./node_modules/axios/lib/adapters/xhr.js");
  928. }
  929. return adapter;
  930. }
  931. var defaults = {
  932. adapter: getDefaultAdapter(),
  933. transformRequest: [function transformRequest(data, headers) {
  934. normalizeHeaderName(headers, 'Accept');
  935. normalizeHeaderName(headers, 'Content-Type');
  936. if (utils.isFormData(data) ||
  937. utils.isArrayBuffer(data) ||
  938. utils.isBuffer(data) ||
  939. utils.isStream(data) ||
  940. utils.isFile(data) ||
  941. utils.isBlob(data)
  942. ) {
  943. return data;
  944. }
  945. if (utils.isArrayBufferView(data)) {
  946. return data.buffer;
  947. }
  948. if (utils.isURLSearchParams(data)) {
  949. setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');
  950. return data.toString();
  951. }
  952. if (utils.isObject(data)) {
  953. setContentTypeIfUnset(headers, 'application/json;charset=utf-8');
  954. return JSON.stringify(data);
  955. }
  956. return data;
  957. }],
  958. transformResponse: [function transformResponse(data) {
  959. /*eslint no-param-reassign:0*/
  960. if (typeof data === 'string') {
  961. try {
  962. data = JSON.parse(data);
  963. } catch (e) { /* Ignore */ }
  964. }
  965. return data;
  966. }],
  967. /**
  968. * A timeout in milliseconds to abort a request. If set to 0 (default) a
  969. * timeout is not created.
  970. */
  971. timeout: 0,
  972. xsrfCookieName: 'XSRF-TOKEN',
  973. xsrfHeaderName: 'X-XSRF-TOKEN',
  974. maxContentLength: -1,
  975. maxBodyLength: -1,
  976. validateStatus: function validateStatus(status) {
  977. return status >= 200 && status < 300;
  978. }
  979. };
  980. defaults.headers = {
  981. common: {
  982. 'Accept': 'application/json, text/plain, */*'
  983. }
  984. };
  985. utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
  986. defaults.headers[method] = {};
  987. });
  988. utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
  989. defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
  990. });
  991. module.exports = defaults;
  992. /***/ }),
  993. /***/ "./node_modules/axios/lib/helpers/bind.js":
  994. /*!************************************************!*\
  995. !*** ./node_modules/axios/lib/helpers/bind.js ***!
  996. \************************************************/
  997. /***/ ((module) => {
  998. "use strict";
  999. module.exports = function bind(fn, thisArg) {
  1000. return function wrap() {
  1001. var args = new Array(arguments.length);
  1002. for (var i = 0; i < args.length; i++) {
  1003. args[i] = arguments[i];
  1004. }
  1005. return fn.apply(thisArg, args);
  1006. };
  1007. };
  1008. /***/ }),
  1009. /***/ "./node_modules/axios/lib/helpers/buildURL.js":
  1010. /*!****************************************************!*\
  1011. !*** ./node_modules/axios/lib/helpers/buildURL.js ***!
  1012. \****************************************************/
  1013. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  1014. "use strict";
  1015. var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js");
  1016. function encode(val) {
  1017. return encodeURIComponent(val).
  1018. replace(/%3A/gi, ':').
  1019. replace(/%24/g, '$').
  1020. replace(/%2C/gi, ',').
  1021. replace(/%20/g, '+').
  1022. replace(/%5B/gi, '[').
  1023. replace(/%5D/gi, ']');
  1024. }
  1025. /**
  1026. * Build a URL by appending params to the end
  1027. *
  1028. * @param {string} url The base of the url (e.g., http://www.google.com)
  1029. * @param {object} [params] The params to be appended
  1030. * @returns {string} The formatted url
  1031. */
  1032. module.exports = function buildURL(url, params, paramsSerializer) {
  1033. /*eslint no-param-reassign:0*/
  1034. if (!params) {
  1035. return url;
  1036. }
  1037. var serializedParams;
  1038. if (paramsSerializer) {
  1039. serializedParams = paramsSerializer(params);
  1040. } else if (utils.isURLSearchParams(params)) {
  1041. serializedParams = params.toString();
  1042. } else {
  1043. var parts = [];
  1044. utils.forEach(params, function serialize(val, key) {
  1045. if (val === null || typeof val === 'undefined') {
  1046. return;
  1047. }
  1048. if (utils.isArray(val)) {
  1049. key = key + '[]';
  1050. } else {
  1051. val = [val];
  1052. }
  1053. utils.forEach(val, function parseValue(v) {
  1054. if (utils.isDate(v)) {
  1055. v = v.toISOString();
  1056. } else if (utils.isObject(v)) {
  1057. v = JSON.stringify(v);
  1058. }
  1059. parts.push(encode(key) + '=' + encode(v));
  1060. });
  1061. });
  1062. serializedParams = parts.join('&');
  1063. }
  1064. if (serializedParams) {
  1065. var hashmarkIndex = url.indexOf('#');
  1066. if (hashmarkIndex !== -1) {
  1067. url = url.slice(0, hashmarkIndex);
  1068. }
  1069. url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
  1070. }
  1071. return url;
  1072. };
  1073. /***/ }),
  1074. /***/ "./node_modules/axios/lib/helpers/combineURLs.js":
  1075. /*!*******************************************************!*\
  1076. !*** ./node_modules/axios/lib/helpers/combineURLs.js ***!
  1077. \*******************************************************/
  1078. /***/ ((module) => {
  1079. "use strict";
  1080. /**
  1081. * Creates a new URL by combining the specified URLs
  1082. *
  1083. * @param {string} baseURL The base URL
  1084. * @param {string} relativeURL The relative URL
  1085. * @returns {string} The combined URL
  1086. */
  1087. module.exports = function combineURLs(baseURL, relativeURL) {
  1088. return relativeURL
  1089. ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
  1090. : baseURL;
  1091. };
  1092. /***/ }),
  1093. /***/ "./node_modules/axios/lib/helpers/cookies.js":
  1094. /*!***************************************************!*\
  1095. !*** ./node_modules/axios/lib/helpers/cookies.js ***!
  1096. \***************************************************/
  1097. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  1098. "use strict";
  1099. var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js");
  1100. module.exports = (
  1101. utils.isStandardBrowserEnv() ?
  1102. // Standard browser envs support document.cookie
  1103. (function standardBrowserEnv() {
  1104. return {
  1105. write: function write(name, value, expires, path, domain, secure) {
  1106. var cookie = [];
  1107. cookie.push(name + '=' + encodeURIComponent(value));
  1108. if (utils.isNumber(expires)) {
  1109. cookie.push('expires=' + new Date(expires).toGMTString());
  1110. }
  1111. if (utils.isString(path)) {
  1112. cookie.push('path=' + path);
  1113. }
  1114. if (utils.isString(domain)) {
  1115. cookie.push('domain=' + domain);
  1116. }
  1117. if (secure === true) {
  1118. cookie.push('secure');
  1119. }
  1120. document.cookie = cookie.join('; ');
  1121. },
  1122. read: function read(name) {
  1123. var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
  1124. return (match ? decodeURIComponent(match[3]) : null);
  1125. },
  1126. remove: function remove(name) {
  1127. this.write(name, '', Date.now() - 86400000);
  1128. }
  1129. };
  1130. })() :
  1131. // Non standard browser env (web workers, react-native) lack needed support.
  1132. (function nonStandardBrowserEnv() {
  1133. return {
  1134. write: function write() {},
  1135. read: function read() { return null; },
  1136. remove: function remove() {}
  1137. };
  1138. })()
  1139. );
  1140. /***/ }),
  1141. /***/ "./node_modules/axios/lib/helpers/isAbsoluteURL.js":
  1142. /*!*********************************************************!*\
  1143. !*** ./node_modules/axios/lib/helpers/isAbsoluteURL.js ***!
  1144. \*********************************************************/
  1145. /***/ ((module) => {
  1146. "use strict";
  1147. /**
  1148. * Determines whether the specified URL is absolute
  1149. *
  1150. * @param {string} url The URL to test
  1151. * @returns {boolean} True if the specified URL is absolute, otherwise false
  1152. */
  1153. module.exports = function isAbsoluteURL(url) {
  1154. // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
  1155. // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
  1156. // by any combination of letters, digits, plus, period, or hyphen.
  1157. return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
  1158. };
  1159. /***/ }),
  1160. /***/ "./node_modules/axios/lib/helpers/isAxiosError.js":
  1161. /*!********************************************************!*\
  1162. !*** ./node_modules/axios/lib/helpers/isAxiosError.js ***!
  1163. \********************************************************/
  1164. /***/ ((module) => {
  1165. "use strict";
  1166. /**
  1167. * Determines whether the payload is an error thrown by Axios
  1168. *
  1169. * @param {*} payload The value to test
  1170. * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
  1171. */
  1172. module.exports = function isAxiosError(payload) {
  1173. return (typeof payload === 'object') && (payload.isAxiosError === true);
  1174. };
  1175. /***/ }),
  1176. /***/ "./node_modules/axios/lib/helpers/isURLSameOrigin.js":
  1177. /*!***********************************************************!*\
  1178. !*** ./node_modules/axios/lib/helpers/isURLSameOrigin.js ***!
  1179. \***********************************************************/
  1180. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  1181. "use strict";
  1182. var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js");
  1183. module.exports = (
  1184. utils.isStandardBrowserEnv() ?
  1185. // Standard browser envs have full support of the APIs needed to test
  1186. // whether the request URL is of the same origin as current location.
  1187. (function standardBrowserEnv() {
  1188. var msie = /(msie|trident)/i.test(navigator.userAgent);
  1189. var urlParsingNode = document.createElement('a');
  1190. var originURL;
  1191. /**
  1192. * Parse a URL to discover it's components
  1193. *
  1194. * @param {String} url The URL to be parsed
  1195. * @returns {Object}
  1196. */
  1197. function resolveURL(url) {
  1198. var href = url;
  1199. if (msie) {
  1200. // IE needs attribute set twice to normalize properties
  1201. urlParsingNode.setAttribute('href', href);
  1202. href = urlParsingNode.href;
  1203. }
  1204. urlParsingNode.setAttribute('href', href);
  1205. // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
  1206. return {
  1207. href: urlParsingNode.href,
  1208. protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
  1209. host: urlParsingNode.host,
  1210. search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
  1211. hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
  1212. hostname: urlParsingNode.hostname,
  1213. port: urlParsingNode.port,
  1214. pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
  1215. urlParsingNode.pathname :
  1216. '/' + urlParsingNode.pathname
  1217. };
  1218. }
  1219. originURL = resolveURL(window.location.href);
  1220. /**
  1221. * Determine if a URL shares the same origin as the current location
  1222. *
  1223. * @param {String} requestURL The URL to test
  1224. * @returns {boolean} True if URL shares the same origin, otherwise false
  1225. */
  1226. return function isURLSameOrigin(requestURL) {
  1227. var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
  1228. return (parsed.protocol === originURL.protocol &&
  1229. parsed.host === originURL.host);
  1230. };
  1231. })() :
  1232. // Non standard browser envs (web workers, react-native) lack needed support.
  1233. (function nonStandardBrowserEnv() {
  1234. return function isURLSameOrigin() {
  1235. return true;
  1236. };
  1237. })()
  1238. );
  1239. /***/ }),
  1240. /***/ "./node_modules/axios/lib/helpers/normalizeHeaderName.js":
  1241. /*!***************************************************************!*\
  1242. !*** ./node_modules/axios/lib/helpers/normalizeHeaderName.js ***!
  1243. \***************************************************************/
  1244. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  1245. "use strict";
  1246. var utils = __webpack_require__(/*! ../utils */ "./node_modules/axios/lib/utils.js");
  1247. module.exports = function normalizeHeaderName(headers, normalizedName) {
  1248. utils.forEach(headers, function processHeader(value, name) {
  1249. if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
  1250. headers[normalizedName] = value;
  1251. delete headers[name];
  1252. }
  1253. });
  1254. };
  1255. /***/ }),
  1256. /***/ "./node_modules/axios/lib/helpers/parseHeaders.js":
  1257. /*!********************************************************!*\
  1258. !*** ./node_modules/axios/lib/helpers/parseHeaders.js ***!
  1259. \********************************************************/
  1260. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  1261. "use strict";
  1262. var utils = __webpack_require__(/*! ./../utils */ "./node_modules/axios/lib/utils.js");
  1263. // Headers whose duplicates are ignored by node
  1264. // c.f. https://nodejs.org/api/http.html#http_message_headers
  1265. var ignoreDuplicateOf = [
  1266. 'age', 'authorization', 'content-length', 'content-type', 'etag',
  1267. 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
  1268. 'last-modified', 'location', 'max-forwards', 'proxy-authorization',
  1269. 'referer', 'retry-after', 'user-agent'
  1270. ];
  1271. /**
  1272. * Parse headers into an object
  1273. *
  1274. * ```
  1275. * Date: Wed, 27 Aug 2014 08:58:49 GMT
  1276. * Content-Type: application/json
  1277. * Connection: keep-alive
  1278. * Transfer-Encoding: chunked
  1279. * ```
  1280. *
  1281. * @param {String} headers Headers needing to be parsed
  1282. * @returns {Object} Headers parsed into an object
  1283. */
  1284. module.exports = function parseHeaders(headers) {
  1285. var parsed = {};
  1286. var key;
  1287. var val;
  1288. var i;
  1289. if (!headers) { return parsed; }
  1290. utils.forEach(headers.split('\n'), function parser(line) {
  1291. i = line.indexOf(':');
  1292. key = utils.trim(line.substr(0, i)).toLowerCase();
  1293. val = utils.trim(line.substr(i + 1));
  1294. if (key) {
  1295. if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {
  1296. return;
  1297. }
  1298. if (key === 'set-cookie') {
  1299. parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);
  1300. } else {
  1301. parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
  1302. }
  1303. }
  1304. });
  1305. return parsed;
  1306. };
  1307. /***/ }),
  1308. /***/ "./node_modules/axios/lib/helpers/spread.js":
  1309. /*!**************************************************!*\
  1310. !*** ./node_modules/axios/lib/helpers/spread.js ***!
  1311. \**************************************************/
  1312. /***/ ((module) => {
  1313. "use strict";
  1314. /**
  1315. * Syntactic sugar for invoking a function and expanding an array for arguments.
  1316. *
  1317. * Common use case would be to use `Function.prototype.apply`.
  1318. *
  1319. * ```js
  1320. * function f(x, y, z) {}
  1321. * var args = [1, 2, 3];
  1322. * f.apply(null, args);
  1323. * ```
  1324. *
  1325. * With `spread` this example can be re-written.
  1326. *
  1327. * ```js
  1328. * spread(function(x, y, z) {})([1, 2, 3]);
  1329. * ```
  1330. *
  1331. * @param {Function} callback
  1332. * @returns {Function}
  1333. */
  1334. module.exports = function spread(callback) {
  1335. return function wrap(arr) {
  1336. return callback.apply(null, arr);
  1337. };
  1338. };
  1339. /***/ }),
  1340. /***/ "./node_modules/axios/lib/utils.js":
  1341. /*!*****************************************!*\
  1342. !*** ./node_modules/axios/lib/utils.js ***!
  1343. \*****************************************/
  1344. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  1345. "use strict";
  1346. var bind = __webpack_require__(/*! ./helpers/bind */ "./node_modules/axios/lib/helpers/bind.js");
  1347. /*global toString:true*/
  1348. // utils is a library of generic helper functions non-specific to axios
  1349. var toString = Object.prototype.toString;
  1350. /**
  1351. * Determine if a value is an Array
  1352. *
  1353. * @param {Object} val The value to test
  1354. * @returns {boolean} True if value is an Array, otherwise false
  1355. */
  1356. function isArray(val) {
  1357. return toString.call(val) === '[object Array]';
  1358. }
  1359. /**
  1360. * Determine if a value is undefined
  1361. *
  1362. * @param {Object} val The value to test
  1363. * @returns {boolean} True if the value is undefined, otherwise false
  1364. */
  1365. function isUndefined(val) {
  1366. return typeof val === 'undefined';
  1367. }
  1368. /**
  1369. * Determine if a value is a Buffer
  1370. *
  1371. * @param {Object} val The value to test
  1372. * @returns {boolean} True if value is a Buffer, otherwise false
  1373. */
  1374. function isBuffer(val) {
  1375. return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
  1376. && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);
  1377. }
  1378. /**
  1379. * Determine if a value is an ArrayBuffer
  1380. *
  1381. * @param {Object} val The value to test
  1382. * @returns {boolean} True if value is an ArrayBuffer, otherwise false
  1383. */
  1384. function isArrayBuffer(val) {
  1385. return toString.call(val) === '[object ArrayBuffer]';
  1386. }
  1387. /**
  1388. * Determine if a value is a FormData
  1389. *
  1390. * @param {Object} val The value to test
  1391. * @returns {boolean} True if value is an FormData, otherwise false
  1392. */
  1393. function isFormData(val) {
  1394. return (typeof FormData !== 'undefined') && (val instanceof FormData);
  1395. }
  1396. /**
  1397. * Determine if a value is a view on an ArrayBuffer
  1398. *
  1399. * @param {Object} val The value to test
  1400. * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
  1401. */
  1402. function isArrayBufferView(val) {
  1403. var result;
  1404. if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
  1405. result = ArrayBuffer.isView(val);
  1406. } else {
  1407. result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);
  1408. }
  1409. return result;
  1410. }
  1411. /**
  1412. * Determine if a value is a String
  1413. *
  1414. * @param {Object} val The value to test
  1415. * @returns {boolean} True if value is a String, otherwise false
  1416. */
  1417. function isString(val) {
  1418. return typeof val === 'string';
  1419. }
  1420. /**
  1421. * Determine if a value is a Number
  1422. *
  1423. * @param {Object} val The value to test
  1424. * @returns {boolean} True if value is a Number, otherwise false
  1425. */
  1426. function isNumber(val) {
  1427. return typeof val === 'number';
  1428. }
  1429. /**
  1430. * Determine if a value is an Object
  1431. *
  1432. * @param {Object} val The value to test
  1433. * @returns {boolean} True if value is an Object, otherwise false
  1434. */
  1435. function isObject(val) {
  1436. return val !== null && typeof val === 'object';
  1437. }
  1438. /**
  1439. * Determine if a value is a plain Object
  1440. *
  1441. * @param {Object} val The value to test
  1442. * @return {boolean} True if value is a plain Object, otherwise false
  1443. */
  1444. function isPlainObject(val) {
  1445. if (toString.call(val) !== '[object Object]') {
  1446. return false;
  1447. }
  1448. var prototype = Object.getPrototypeOf(val);
  1449. return prototype === null || prototype === Object.prototype;
  1450. }
  1451. /**
  1452. * Determine if a value is a Date
  1453. *
  1454. * @param {Object} val The value to test
  1455. * @returns {boolean} True if value is a Date, otherwise false
  1456. */
  1457. function isDate(val) {
  1458. return toString.call(val) === '[object Date]';
  1459. }
  1460. /**
  1461. * Determine if a value is a File
  1462. *
  1463. * @param {Object} val The value to test
  1464. * @returns {boolean} True if value is a File, otherwise false
  1465. */
  1466. function isFile(val) {
  1467. return toString.call(val) === '[object File]';
  1468. }
  1469. /**
  1470. * Determine if a value is a Blob
  1471. *
  1472. * @param {Object} val The value to test
  1473. * @returns {boolean} True if value is a Blob, otherwise false
  1474. */
  1475. function isBlob(val) {
  1476. return toString.call(val) === '[object Blob]';
  1477. }
  1478. /**
  1479. * Determine if a value is a Function
  1480. *
  1481. * @param {Object} val The value to test
  1482. * @returns {boolean} True if value is a Function, otherwise false
  1483. */
  1484. function isFunction(val) {
  1485. return toString.call(val) === '[object Function]';
  1486. }
  1487. /**
  1488. * Determine if a value is a Stream
  1489. *
  1490. * @param {Object} val The value to test
  1491. * @returns {boolean} True if value is a Stream, otherwise false
  1492. */
  1493. function isStream(val) {
  1494. return isObject(val) && isFunction(val.pipe);
  1495. }
  1496. /**
  1497. * Determine if a value is a URLSearchParams object
  1498. *
  1499. * @param {Object} val The value to test
  1500. * @returns {boolean} True if value is a URLSearchParams object, otherwise false
  1501. */
  1502. function isURLSearchParams(val) {
  1503. return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;
  1504. }
  1505. /**
  1506. * Trim excess whitespace off the beginning and end of a string
  1507. *
  1508. * @param {String} str The String to trim
  1509. * @returns {String} The String freed of excess whitespace
  1510. */
  1511. function trim(str) {
  1512. return str.replace(/^\s*/, '').replace(/\s*$/, '');
  1513. }
  1514. /**
  1515. * Determine if we're running in a standard browser environment
  1516. *
  1517. * This allows axios to run in a web worker, and react-native.
  1518. * Both environments support XMLHttpRequest, but not fully standard globals.
  1519. *
  1520. * web workers:
  1521. * typeof window -> undefined
  1522. * typeof document -> undefined
  1523. *
  1524. * react-native:
  1525. * navigator.product -> 'ReactNative'
  1526. * nativescript
  1527. * navigator.product -> 'NativeScript' or 'NS'
  1528. */
  1529. function isStandardBrowserEnv() {
  1530. if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||
  1531. navigator.product === 'NativeScript' ||
  1532. navigator.product === 'NS')) {
  1533. return false;
  1534. }
  1535. return (
  1536. typeof window !== 'undefined' &&
  1537. typeof document !== 'undefined'
  1538. );
  1539. }
  1540. /**
  1541. * Iterate over an Array or an Object invoking a function for each item.
  1542. *
  1543. * If `obj` is an Array callback will be called passing
  1544. * the value, index, and complete array for each item.
  1545. *
  1546. * If 'obj' is an Object callback will be called passing
  1547. * the value, key, and complete object for each property.
  1548. *
  1549. * @param {Object|Array} obj The object to iterate
  1550. * @param {Function} fn The callback to invoke for each item
  1551. */
  1552. function forEach(obj, fn) {
  1553. // Don't bother if no value provided
  1554. if (obj === null || typeof obj === 'undefined') {
  1555. return;
  1556. }
  1557. // Force an array if not already something iterable
  1558. if (typeof obj !== 'object') {
  1559. /*eslint no-param-reassign:0*/
  1560. obj = [obj];
  1561. }
  1562. if (isArray(obj)) {
  1563. // Iterate over array values
  1564. for (var i = 0, l = obj.length; i < l; i++) {
  1565. fn.call(null, obj[i], i, obj);
  1566. }
  1567. } else {
  1568. // Iterate over object keys
  1569. for (var key in obj) {
  1570. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  1571. fn.call(null, obj[key], key, obj);
  1572. }
  1573. }
  1574. }
  1575. }
  1576. /**
  1577. * Accepts varargs expecting each argument to be an object, then
  1578. * immutably merges the properties of each object and returns result.
  1579. *
  1580. * When multiple objects contain the same key the later object in
  1581. * the arguments list will take precedence.
  1582. *
  1583. * Example:
  1584. *
  1585. * ```js
  1586. * var result = merge({foo: 123}, {foo: 456});
  1587. * console.log(result.foo); // outputs 456
  1588. * ```
  1589. *
  1590. * @param {Object} obj1 Object to merge
  1591. * @returns {Object} Result of all merge properties
  1592. */
  1593. function merge(/* obj1, obj2, obj3, ... */) {
  1594. var result = {};
  1595. function assignValue(val, key) {
  1596. if (isPlainObject(result[key]) && isPlainObject(val)) {
  1597. result[key] = merge(result[key], val);
  1598. } else if (isPlainObject(val)) {
  1599. result[key] = merge({}, val);
  1600. } else if (isArray(val)) {
  1601. result[key] = val.slice();
  1602. } else {
  1603. result[key] = val;
  1604. }
  1605. }
  1606. for (var i = 0, l = arguments.length; i < l; i++) {
  1607. forEach(arguments[i], assignValue);
  1608. }
  1609. return result;
  1610. }
  1611. /**
  1612. * Extends object a by mutably adding to it the properties of object b.
  1613. *
  1614. * @param {Object} a The object to be extended
  1615. * @param {Object} b The object to copy properties from
  1616. * @param {Object} thisArg The object to bind function to
  1617. * @return {Object} The resulting value of object a
  1618. */
  1619. function extend(a, b, thisArg) {
  1620. forEach(b, function assignValue(val, key) {
  1621. if (thisArg && typeof val === 'function') {
  1622. a[key] = bind(val, thisArg);
  1623. } else {
  1624. a[key] = val;
  1625. }
  1626. });
  1627. return a;
  1628. }
  1629. /**
  1630. * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
  1631. *
  1632. * @param {string} content with BOM
  1633. * @return {string} content value without BOM
  1634. */
  1635. function stripBOM(content) {
  1636. if (content.charCodeAt(0) === 0xFEFF) {
  1637. content = content.slice(1);
  1638. }
  1639. return content;
  1640. }
  1641. module.exports = {
  1642. isArray: isArray,
  1643. isArrayBuffer: isArrayBuffer,
  1644. isBuffer: isBuffer,
  1645. isFormData: isFormData,
  1646. isArrayBufferView: isArrayBufferView,
  1647. isString: isString,
  1648. isNumber: isNumber,
  1649. isObject: isObject,
  1650. isPlainObject: isPlainObject,
  1651. isUndefined: isUndefined,
  1652. isDate: isDate,
  1653. isFile: isFile,
  1654. isBlob: isBlob,
  1655. isFunction: isFunction,
  1656. isStream: isStream,
  1657. isURLSearchParams: isURLSearchParams,
  1658. isStandardBrowserEnv: isStandardBrowserEnv,
  1659. forEach: forEach,
  1660. merge: merge,
  1661. extend: extend,
  1662. trim: trim,
  1663. stripBOM: stripBOM
  1664. };
  1665. /***/ }),
  1666. /***/ "./node_modules/lodash.remove/index.js":
  1667. /*!*********************************************!*\
  1668. !*** ./node_modules/lodash.remove/index.js ***!
  1669. \*********************************************/
  1670. /***/ ((module, exports, __webpack_require__) => {
  1671. /* module decorator */ module = __webpack_require__.nmd(module);
  1672. /**
  1673. * lodash (Custom Build) <https://lodash.com/>
  1674. * Build: `lodash modularize exports="npm" -o ./`
  1675. * Copyright jQuery Foundation and other contributors <https://jquery.org/>
  1676. * Released under MIT license <https://lodash.com/license>
  1677. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  1678. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  1679. */
  1680. /** Used as the size to enable large array optimizations. */
  1681. var LARGE_ARRAY_SIZE = 200;
  1682. /** Used as the `TypeError` message for "Functions" methods. */
  1683. var FUNC_ERROR_TEXT = 'Expected a function';
  1684. /** Used to stand-in for `undefined` hash values. */
  1685. var HASH_UNDEFINED = '__lodash_hash_undefined__';
  1686. /** Used to compose bitmasks for comparison styles. */
  1687. var UNORDERED_COMPARE_FLAG = 1,
  1688. PARTIAL_COMPARE_FLAG = 2;
  1689. /** Used as references for various `Number` constants. */
  1690. var INFINITY = 1 / 0,
  1691. MAX_SAFE_INTEGER = 9007199254740991;
  1692. /** `Object#toString` result references. */
  1693. var argsTag = '[object Arguments]',
  1694. arrayTag = '[object Array]',
  1695. boolTag = '[object Boolean]',
  1696. dateTag = '[object Date]',
  1697. errorTag = '[object Error]',
  1698. funcTag = '[object Function]',
  1699. genTag = '[object GeneratorFunction]',
  1700. mapTag = '[object Map]',
  1701. numberTag = '[object Number]',
  1702. objectTag = '[object Object]',
  1703. promiseTag = '[object Promise]',
  1704. regexpTag = '[object RegExp]',
  1705. setTag = '[object Set]',
  1706. stringTag = '[object String]',
  1707. symbolTag = '[object Symbol]',
  1708. weakMapTag = '[object WeakMap]';
  1709. var arrayBufferTag = '[object ArrayBuffer]',
  1710. dataViewTag = '[object DataView]',
  1711. float32Tag = '[object Float32Array]',
  1712. float64Tag = '[object Float64Array]',
  1713. int8Tag = '[object Int8Array]',
  1714. int16Tag = '[object Int16Array]',
  1715. int32Tag = '[object Int32Array]',
  1716. uint8Tag = '[object Uint8Array]',
  1717. uint8ClampedTag = '[object Uint8ClampedArray]',
  1718. uint16Tag = '[object Uint16Array]',
  1719. uint32Tag = '[object Uint32Array]';
  1720. /** Used to match property names within property paths. */
  1721. var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
  1722. reIsPlainProp = /^\w*$/,
  1723. reLeadingDot = /^\./,
  1724. rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
  1725. /**
  1726. * Used to match `RegExp`
  1727. * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
  1728. */
  1729. var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
  1730. /** Used to match backslashes in property paths. */
  1731. var reEscapeChar = /\\(\\)?/g;
  1732. /** Used to detect host constructors (Safari). */
  1733. var reIsHostCtor = /^\[object .+?Constructor\]$/;
  1734. /** Used to detect unsigned integer values. */
  1735. var reIsUint = /^(?:0|[1-9]\d*)$/;
  1736. /** Used to identify `toStringTag` values of typed arrays. */
  1737. var typedArrayTags = {};
  1738. typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
  1739. typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
  1740. typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
  1741. typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
  1742. typedArrayTags[uint32Tag] = true;
  1743. typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
  1744. typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
  1745. typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
  1746. typedArrayTags[errorTag] = typedArrayTags[funcTag] =
  1747. typedArrayTags[mapTag] = typedArrayTags[numberTag] =
  1748. typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
  1749. typedArrayTags[setTag] = typedArrayTags[stringTag] =
  1750. typedArrayTags[weakMapTag] = false;
  1751. /** Detect free variable `global` from Node.js. */
  1752. var freeGlobal = typeof __webpack_require__.g == 'object' && __webpack_require__.g && __webpack_require__.g.Object === Object && __webpack_require__.g;
  1753. /** Detect free variable `self`. */
  1754. var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
  1755. /** Used as a reference to the global object. */
  1756. var root = freeGlobal || freeSelf || Function('return this')();
  1757. /** Detect free variable `exports`. */
  1758. var freeExports = true && exports && !exports.nodeType && exports;
  1759. /** Detect free variable `module`. */
  1760. var freeModule = freeExports && "object" == 'object' && module && !module.nodeType && module;
  1761. /** Detect the popular CommonJS extension `module.exports`. */
  1762. var moduleExports = freeModule && freeModule.exports === freeExports;
  1763. /** Detect free variable `process` from Node.js. */
  1764. var freeProcess = moduleExports && freeGlobal.process;
  1765. /** Used to access faster Node.js helpers. */
  1766. var nodeUtil = (function() {
  1767. try {
  1768. return freeProcess && freeProcess.binding('util');
  1769. } catch (e) {}
  1770. }());
  1771. /* Node.js helper references. */
  1772. var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
  1773. /**
  1774. * A specialized version of `_.some` for arrays without support for iteratee
  1775. * shorthands.
  1776. *
  1777. * @private
  1778. * @param {Array} [array] The array to iterate over.
  1779. * @param {Function} predicate The function invoked per iteration.
  1780. * @returns {boolean} Returns `true` if any element passes the predicate check,
  1781. * else `false`.
  1782. */
  1783. function arraySome(array, predicate) {
  1784. var index = -1,
  1785. length = array ? array.length : 0;
  1786. while (++index < length) {
  1787. if (predicate(array[index], index, array)) {
  1788. return true;
  1789. }
  1790. }
  1791. return false;
  1792. }
  1793. /**
  1794. * The base implementation of `_.property` without support for deep paths.
  1795. *
  1796. * @private
  1797. * @param {string} key The key of the property to get.
  1798. * @returns {Function} Returns the new accessor function.
  1799. */
  1800. function baseProperty(key) {
  1801. return function(object) {
  1802. return object == null ? undefined : object[key];
  1803. };
  1804. }
  1805. /**
  1806. * The base implementation of `_.times` without support for iteratee shorthands
  1807. * or max array length checks.
  1808. *
  1809. * @private
  1810. * @param {number} n The number of times to invoke `iteratee`.
  1811. * @param {Function} iteratee The function invoked per iteration.
  1812. * @returns {Array} Returns the array of results.
  1813. */
  1814. function baseTimes(n, iteratee) {
  1815. var index = -1,
  1816. result = Array(n);
  1817. while (++index < n) {
  1818. result[index] = iteratee(index);
  1819. }
  1820. return result;
  1821. }
  1822. /**
  1823. * The base implementation of `_.unary` without support for storing metadata.
  1824. *
  1825. * @private
  1826. * @param {Function} func The function to cap arguments for.
  1827. * @returns {Function} Returns the new capped function.
  1828. */
  1829. function baseUnary(func) {
  1830. return function(value) {
  1831. return func(value);
  1832. };
  1833. }
  1834. /**
  1835. * Gets the value at `key` of `object`.
  1836. *
  1837. * @private
  1838. * @param {Object} [object] The object to query.
  1839. * @param {string} key The key of the property to get.
  1840. * @returns {*} Returns the property value.
  1841. */
  1842. function getValue(object, key) {
  1843. return object == null ? undefined : object[key];
  1844. }
  1845. /**
  1846. * Checks if `value` is a host object in IE < 9.
  1847. *
  1848. * @private
  1849. * @param {*} value The value to check.
  1850. * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
  1851. */
  1852. function isHostObject(value) {
  1853. // Many host objects are `Object` objects that can coerce to strings
  1854. // despite having improperly defined `toString` methods.
  1855. var result = false;
  1856. if (value != null && typeof value.toString != 'function') {
  1857. try {
  1858. result = !!(value + '');
  1859. } catch (e) {}
  1860. }
  1861. return result;
  1862. }
  1863. /**
  1864. * Converts `map` to its key-value pairs.
  1865. *
  1866. * @private
  1867. * @param {Object} map The map to convert.
  1868. * @returns {Array} Returns the key-value pairs.
  1869. */
  1870. function mapToArray(map) {
  1871. var index = -1,
  1872. result = Array(map.size);
  1873. map.forEach(function(value, key) {
  1874. result[++index] = [key, value];
  1875. });
  1876. return result;
  1877. }
  1878. /**
  1879. * Creates a unary function that invokes `func` with its argument transformed.
  1880. *
  1881. * @private
  1882. * @param {Function} func The function to wrap.
  1883. * @param {Function} transform The argument transform.
  1884. * @returns {Function} Returns the new function.
  1885. */
  1886. function overArg(func, transform) {
  1887. return function(arg) {
  1888. return func(transform(arg));
  1889. };
  1890. }
  1891. /**
  1892. * Converts `set` to an array of its values.
  1893. *
  1894. * @private
  1895. * @param {Object} set The set to convert.
  1896. * @returns {Array} Returns the values.
  1897. */
  1898. function setToArray(set) {
  1899. var index = -1,
  1900. result = Array(set.size);
  1901. set.forEach(function(value) {
  1902. result[++index] = value;
  1903. });
  1904. return result;
  1905. }
  1906. /** Used for built-in method references. */
  1907. var arrayProto = Array.prototype,
  1908. funcProto = Function.prototype,
  1909. objectProto = Object.prototype;
  1910. /** Used to detect overreaching core-js shims. */
  1911. var coreJsData = root['__core-js_shared__'];
  1912. /** Used to detect methods masquerading as native. */
  1913. var maskSrcKey = (function() {
  1914. var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
  1915. return uid ? ('Symbol(src)_1.' + uid) : '';
  1916. }());
  1917. /** Used to resolve the decompiled source of functions. */
  1918. var funcToString = funcProto.toString;
  1919. /** Used to check objects for own properties. */
  1920. var hasOwnProperty = objectProto.hasOwnProperty;
  1921. /**
  1922. * Used to resolve the
  1923. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  1924. * of values.
  1925. */
  1926. var objectToString = objectProto.toString;
  1927. /** Used to detect if a method is native. */
  1928. var reIsNative = RegExp('^' +
  1929. funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
  1930. .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
  1931. );
  1932. /** Built-in value references. */
  1933. var Symbol = root.Symbol,
  1934. Uint8Array = root.Uint8Array,
  1935. propertyIsEnumerable = objectProto.propertyIsEnumerable,
  1936. splice = arrayProto.splice;
  1937. /* Built-in method references for those with the same name as other `lodash` methods. */
  1938. var nativeKeys = overArg(Object.keys, Object);
  1939. /* Built-in method references that are verified to be native. */
  1940. var DataView = getNative(root, 'DataView'),
  1941. Map = getNative(root, 'Map'),
  1942. Promise = getNative(root, 'Promise'),
  1943. Set = getNative(root, 'Set'),
  1944. WeakMap = getNative(root, 'WeakMap'),
  1945. nativeCreate = getNative(Object, 'create');
  1946. /** Used to detect maps, sets, and weakmaps. */
  1947. var dataViewCtorString = toSource(DataView),
  1948. mapCtorString = toSource(Map),
  1949. promiseCtorString = toSource(Promise),
  1950. setCtorString = toSource(Set),
  1951. weakMapCtorString = toSource(WeakMap);
  1952. /** Used to convert symbols to primitives and strings. */
  1953. var symbolProto = Symbol ? Symbol.prototype : undefined,
  1954. symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,
  1955. symbolToString = symbolProto ? symbolProto.toString : undefined;
  1956. /**
  1957. * Creates a hash object.
  1958. *
  1959. * @private
  1960. * @constructor
  1961. * @param {Array} [entries] The key-value pairs to cache.
  1962. */
  1963. function Hash(entries) {
  1964. var index = -1,
  1965. length = entries ? entries.length : 0;
  1966. this.clear();
  1967. while (++index < length) {
  1968. var entry = entries[index];
  1969. this.set(entry[0], entry[1]);
  1970. }
  1971. }
  1972. /**
  1973. * Removes all key-value entries from the hash.
  1974. *
  1975. * @private
  1976. * @name clear
  1977. * @memberOf Hash
  1978. */
  1979. function hashClear() {
  1980. this.__data__ = nativeCreate ? nativeCreate(null) : {};
  1981. }
  1982. /**
  1983. * Removes `key` and its value from the hash.
  1984. *
  1985. * @private
  1986. * @name delete
  1987. * @memberOf Hash
  1988. * @param {Object} hash The hash to modify.
  1989. * @param {string} key The key of the value to remove.
  1990. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  1991. */
  1992. function hashDelete(key) {
  1993. return this.has(key) && delete this.__data__[key];
  1994. }
  1995. /**
  1996. * Gets the hash value for `key`.
  1997. *
  1998. * @private
  1999. * @name get
  2000. * @memberOf Hash
  2001. * @param {string} key The key of the value to get.
  2002. * @returns {*} Returns the entry value.
  2003. */
  2004. function hashGet(key) {
  2005. var data = this.__data__;
  2006. if (nativeCreate) {
  2007. var result = data[key];
  2008. return result === HASH_UNDEFINED ? undefined : result;
  2009. }
  2010. return hasOwnProperty.call(data, key) ? data[key] : undefined;
  2011. }
  2012. /**
  2013. * Checks if a hash value for `key` exists.
  2014. *
  2015. * @private
  2016. * @name has
  2017. * @memberOf Hash
  2018. * @param {string} key The key of the entry to check.
  2019. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  2020. */
  2021. function hashHas(key) {
  2022. var data = this.__data__;
  2023. return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
  2024. }
  2025. /**
  2026. * Sets the hash `key` to `value`.
  2027. *
  2028. * @private
  2029. * @name set
  2030. * @memberOf Hash
  2031. * @param {string} key The key of the value to set.
  2032. * @param {*} value The value to set.
  2033. * @returns {Object} Returns the hash instance.
  2034. */
  2035. function hashSet(key, value) {
  2036. var data = this.__data__;
  2037. data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
  2038. return this;
  2039. }
  2040. // Add methods to `Hash`.
  2041. Hash.prototype.clear = hashClear;
  2042. Hash.prototype['delete'] = hashDelete;
  2043. Hash.prototype.get = hashGet;
  2044. Hash.prototype.has = hashHas;
  2045. Hash.prototype.set = hashSet;
  2046. /**
  2047. * Creates an list cache object.
  2048. *
  2049. * @private
  2050. * @constructor
  2051. * @param {Array} [entries] The key-value pairs to cache.
  2052. */
  2053. function ListCache(entries) {
  2054. var index = -1,
  2055. length = entries ? entries.length : 0;
  2056. this.clear();
  2057. while (++index < length) {
  2058. var entry = entries[index];
  2059. this.set(entry[0], entry[1]);
  2060. }
  2061. }
  2062. /**
  2063. * Removes all key-value entries from the list cache.
  2064. *
  2065. * @private
  2066. * @name clear
  2067. * @memberOf ListCache
  2068. */
  2069. function listCacheClear() {
  2070. this.__data__ = [];
  2071. }
  2072. /**
  2073. * Removes `key` and its value from the list cache.
  2074. *
  2075. * @private
  2076. * @name delete
  2077. * @memberOf ListCache
  2078. * @param {string} key The key of the value to remove.
  2079. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  2080. */
  2081. function listCacheDelete(key) {
  2082. var data = this.__data__,
  2083. index = assocIndexOf(data, key);
  2084. if (index < 0) {
  2085. return false;
  2086. }
  2087. var lastIndex = data.length - 1;
  2088. if (index == lastIndex) {
  2089. data.pop();
  2090. } else {
  2091. splice.call(data, index, 1);
  2092. }
  2093. return true;
  2094. }
  2095. /**
  2096. * Gets the list cache value for `key`.
  2097. *
  2098. * @private
  2099. * @name get
  2100. * @memberOf ListCache
  2101. * @param {string} key The key of the value to get.
  2102. * @returns {*} Returns the entry value.
  2103. */
  2104. function listCacheGet(key) {
  2105. var data = this.__data__,
  2106. index = assocIndexOf(data, key);
  2107. return index < 0 ? undefined : data[index][1];
  2108. }
  2109. /**
  2110. * Checks if a list cache value for `key` exists.
  2111. *
  2112. * @private
  2113. * @name has
  2114. * @memberOf ListCache
  2115. * @param {string} key The key of the entry to check.
  2116. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  2117. */
  2118. function listCacheHas(key) {
  2119. return assocIndexOf(this.__data__, key) > -1;
  2120. }
  2121. /**
  2122. * Sets the list cache `key` to `value`.
  2123. *
  2124. * @private
  2125. * @name set
  2126. * @memberOf ListCache
  2127. * @param {string} key The key of the value to set.
  2128. * @param {*} value The value to set.
  2129. * @returns {Object} Returns the list cache instance.
  2130. */
  2131. function listCacheSet(key, value) {
  2132. var data = this.__data__,
  2133. index = assocIndexOf(data, key);
  2134. if (index < 0) {
  2135. data.push([key, value]);
  2136. } else {
  2137. data[index][1] = value;
  2138. }
  2139. return this;
  2140. }
  2141. // Add methods to `ListCache`.
  2142. ListCache.prototype.clear = listCacheClear;
  2143. ListCache.prototype['delete'] = listCacheDelete;
  2144. ListCache.prototype.get = listCacheGet;
  2145. ListCache.prototype.has = listCacheHas;
  2146. ListCache.prototype.set = listCacheSet;
  2147. /**
  2148. * Creates a map cache object to store key-value pairs.
  2149. *
  2150. * @private
  2151. * @constructor
  2152. * @param {Array} [entries] The key-value pairs to cache.
  2153. */
  2154. function MapCache(entries) {
  2155. var index = -1,
  2156. length = entries ? entries.length : 0;
  2157. this.clear();
  2158. while (++index < length) {
  2159. var entry = entries[index];
  2160. this.set(entry[0], entry[1]);
  2161. }
  2162. }
  2163. /**
  2164. * Removes all key-value entries from the map.
  2165. *
  2166. * @private
  2167. * @name clear
  2168. * @memberOf MapCache
  2169. */
  2170. function mapCacheClear() {
  2171. this.__data__ = {
  2172. 'hash': new Hash,
  2173. 'map': new (Map || ListCache),
  2174. 'string': new Hash
  2175. };
  2176. }
  2177. /**
  2178. * Removes `key` and its value from the map.
  2179. *
  2180. * @private
  2181. * @name delete
  2182. * @memberOf MapCache
  2183. * @param {string} key The key of the value to remove.
  2184. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  2185. */
  2186. function mapCacheDelete(key) {
  2187. return getMapData(this, key)['delete'](key);
  2188. }
  2189. /**
  2190. * Gets the map value for `key`.
  2191. *
  2192. * @private
  2193. * @name get
  2194. * @memberOf MapCache
  2195. * @param {string} key The key of the value to get.
  2196. * @returns {*} Returns the entry value.
  2197. */
  2198. function mapCacheGet(key) {
  2199. return getMapData(this, key).get(key);
  2200. }
  2201. /**
  2202. * Checks if a map value for `key` exists.
  2203. *
  2204. * @private
  2205. * @name has
  2206. * @memberOf MapCache
  2207. * @param {string} key The key of the entry to check.
  2208. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  2209. */
  2210. function mapCacheHas(key) {
  2211. return getMapData(this, key).has(key);
  2212. }
  2213. /**
  2214. * Sets the map `key` to `value`.
  2215. *
  2216. * @private
  2217. * @name set
  2218. * @memberOf MapCache
  2219. * @param {string} key The key of the value to set.
  2220. * @param {*} value The value to set.
  2221. * @returns {Object} Returns the map cache instance.
  2222. */
  2223. function mapCacheSet(key, value) {
  2224. getMapData(this, key).set(key, value);
  2225. return this;
  2226. }
  2227. // Add methods to `MapCache`.
  2228. MapCache.prototype.clear = mapCacheClear;
  2229. MapCache.prototype['delete'] = mapCacheDelete;
  2230. MapCache.prototype.get = mapCacheGet;
  2231. MapCache.prototype.has = mapCacheHas;
  2232. MapCache.prototype.set = mapCacheSet;
  2233. /**
  2234. *
  2235. * Creates an array cache object to store unique values.
  2236. *
  2237. * @private
  2238. * @constructor
  2239. * @param {Array} [values] The values to cache.
  2240. */
  2241. function SetCache(values) {
  2242. var index = -1,
  2243. length = values ? values.length : 0;
  2244. this.__data__ = new MapCache;
  2245. while (++index < length) {
  2246. this.add(values[index]);
  2247. }
  2248. }
  2249. /**
  2250. * Adds `value` to the array cache.
  2251. *
  2252. * @private
  2253. * @name add
  2254. * @memberOf SetCache
  2255. * @alias push
  2256. * @param {*} value The value to cache.
  2257. * @returns {Object} Returns the cache instance.
  2258. */
  2259. function setCacheAdd(value) {
  2260. this.__data__.set(value, HASH_UNDEFINED);
  2261. return this;
  2262. }
  2263. /**
  2264. * Checks if `value` is in the array cache.
  2265. *
  2266. * @private
  2267. * @name has
  2268. * @memberOf SetCache
  2269. * @param {*} value The value to search for.
  2270. * @returns {number} Returns `true` if `value` is found, else `false`.
  2271. */
  2272. function setCacheHas(value) {
  2273. return this.__data__.has(value);
  2274. }
  2275. // Add methods to `SetCache`.
  2276. SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
  2277. SetCache.prototype.has = setCacheHas;
  2278. /**
  2279. * Creates a stack cache object to store key-value pairs.
  2280. *
  2281. * @private
  2282. * @constructor
  2283. * @param {Array} [entries] The key-value pairs to cache.
  2284. */
  2285. function Stack(entries) {
  2286. this.__data__ = new ListCache(entries);
  2287. }
  2288. /**
  2289. * Removes all key-value entries from the stack.
  2290. *
  2291. * @private
  2292. * @name clear
  2293. * @memberOf Stack
  2294. */
  2295. function stackClear() {
  2296. this.__data__ = new ListCache;
  2297. }
  2298. /**
  2299. * Removes `key` and its value from the stack.
  2300. *
  2301. * @private
  2302. * @name delete
  2303. * @memberOf Stack
  2304. * @param {string} key The key of the value to remove.
  2305. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  2306. */
  2307. function stackDelete(key) {
  2308. return this.__data__['delete'](key);
  2309. }
  2310. /**
  2311. * Gets the stack value for `key`.
  2312. *
  2313. * @private
  2314. * @name get
  2315. * @memberOf Stack
  2316. * @param {string} key The key of the value to get.
  2317. * @returns {*} Returns the entry value.
  2318. */
  2319. function stackGet(key) {
  2320. return this.__data__.get(key);
  2321. }
  2322. /**
  2323. * Checks if a stack value for `key` exists.
  2324. *
  2325. * @private
  2326. * @name has
  2327. * @memberOf Stack
  2328. * @param {string} key The key of the entry to check.
  2329. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  2330. */
  2331. function stackHas(key) {
  2332. return this.__data__.has(key);
  2333. }
  2334. /**
  2335. * Sets the stack `key` to `value`.
  2336. *
  2337. * @private
  2338. * @name set
  2339. * @memberOf Stack
  2340. * @param {string} key The key of the value to set.
  2341. * @param {*} value The value to set.
  2342. * @returns {Object} Returns the stack cache instance.
  2343. */
  2344. function stackSet(key, value) {
  2345. var cache = this.__data__;
  2346. if (cache instanceof ListCache) {
  2347. var pairs = cache.__data__;
  2348. if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
  2349. pairs.push([key, value]);
  2350. return this;
  2351. }
  2352. cache = this.__data__ = new MapCache(pairs);
  2353. }
  2354. cache.set(key, value);
  2355. return this;
  2356. }
  2357. // Add methods to `Stack`.
  2358. Stack.prototype.clear = stackClear;
  2359. Stack.prototype['delete'] = stackDelete;
  2360. Stack.prototype.get = stackGet;
  2361. Stack.prototype.has = stackHas;
  2362. Stack.prototype.set = stackSet;
  2363. /**
  2364. * Creates an array of the enumerable property names of the array-like `value`.
  2365. *
  2366. * @private
  2367. * @param {*} value The value to query.
  2368. * @param {boolean} inherited Specify returning inherited property names.
  2369. * @returns {Array} Returns the array of property names.
  2370. */
  2371. function arrayLikeKeys(value, inherited) {
  2372. // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
  2373. // Safari 9 makes `arguments.length` enumerable in strict mode.
  2374. var result = (isArray(value) || isArguments(value))
  2375. ? baseTimes(value.length, String)
  2376. : [];
  2377. var length = result.length,
  2378. skipIndexes = !!length;
  2379. for (var key in value) {
  2380. if ((inherited || hasOwnProperty.call(value, key)) &&
  2381. !(skipIndexes && (key == 'length' || isIndex(key, length)))) {
  2382. result.push(key);
  2383. }
  2384. }
  2385. return result;
  2386. }
  2387. /**
  2388. * Gets the index at which the `key` is found in `array` of key-value pairs.
  2389. *
  2390. * @private
  2391. * @param {Array} array The array to inspect.
  2392. * @param {*} key The key to search for.
  2393. * @returns {number} Returns the index of the matched value, else `-1`.
  2394. */
  2395. function assocIndexOf(array, key) {
  2396. var length = array.length;
  2397. while (length--) {
  2398. if (eq(array[length][0], key)) {
  2399. return length;
  2400. }
  2401. }
  2402. return -1;
  2403. }
  2404. /**
  2405. * The base implementation of `_.get` without support for default values.
  2406. *
  2407. * @private
  2408. * @param {Object} object The object to query.
  2409. * @param {Array|string} path The path of the property to get.
  2410. * @returns {*} Returns the resolved value.
  2411. */
  2412. function baseGet(object, path) {
  2413. path = isKey(path, object) ? [path] : castPath(path);
  2414. var index = 0,
  2415. length = path.length;
  2416. while (object != null && index < length) {
  2417. object = object[toKey(path[index++])];
  2418. }
  2419. return (index && index == length) ? object : undefined;
  2420. }
  2421. /**
  2422. * The base implementation of `getTag`.
  2423. *
  2424. * @private
  2425. * @param {*} value The value to query.
  2426. * @returns {string} Returns the `toStringTag`.
  2427. */
  2428. function baseGetTag(value) {
  2429. return objectToString.call(value);
  2430. }
  2431. /**
  2432. * The base implementation of `_.hasIn` without support for deep paths.
  2433. *
  2434. * @private
  2435. * @param {Object} [object] The object to query.
  2436. * @param {Array|string} key The key to check.
  2437. * @returns {boolean} Returns `true` if `key` exists, else `false`.
  2438. */
  2439. function baseHasIn(object, key) {
  2440. return object != null && key in Object(object);
  2441. }
  2442. /**
  2443. * The base implementation of `_.isEqual` which supports partial comparisons
  2444. * and tracks traversed objects.
  2445. *
  2446. * @private
  2447. * @param {*} value The value to compare.
  2448. * @param {*} other The other value to compare.
  2449. * @param {Function} [customizer] The function to customize comparisons.
  2450. * @param {boolean} [bitmask] The bitmask of comparison flags.
  2451. * The bitmask may be composed of the following flags:
  2452. * 1 - Unordered comparison
  2453. * 2 - Partial comparison
  2454. * @param {Object} [stack] Tracks traversed `value` and `other` objects.
  2455. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  2456. */
  2457. function baseIsEqual(value, other, customizer, bitmask, stack) {
  2458. if (value === other) {
  2459. return true;
  2460. }
  2461. if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {
  2462. return value !== value && other !== other;
  2463. }
  2464. return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack);
  2465. }
  2466. /**
  2467. * A specialized version of `baseIsEqual` for arrays and objects which performs
  2468. * deep comparisons and tracks traversed objects enabling objects with circular
  2469. * references to be compared.
  2470. *
  2471. * @private
  2472. * @param {Object} object The object to compare.
  2473. * @param {Object} other The other object to compare.
  2474. * @param {Function} equalFunc The function to determine equivalents of values.
  2475. * @param {Function} [customizer] The function to customize comparisons.
  2476. * @param {number} [bitmask] The bitmask of comparison flags. See `baseIsEqual`
  2477. * for more details.
  2478. * @param {Object} [stack] Tracks traversed `object` and `other` objects.
  2479. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  2480. */
  2481. function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) {
  2482. var objIsArr = isArray(object),
  2483. othIsArr = isArray(other),
  2484. objTag = arrayTag,
  2485. othTag = arrayTag;
  2486. if (!objIsArr) {
  2487. objTag = getTag(object);
  2488. objTag = objTag == argsTag ? objectTag : objTag;
  2489. }
  2490. if (!othIsArr) {
  2491. othTag = getTag(other);
  2492. othTag = othTag == argsTag ? objectTag : othTag;
  2493. }
  2494. var objIsObj = objTag == objectTag && !isHostObject(object),
  2495. othIsObj = othTag == objectTag && !isHostObject(other),
  2496. isSameTag = objTag == othTag;
  2497. if (isSameTag && !objIsObj) {
  2498. stack || (stack = new Stack);
  2499. return (objIsArr || isTypedArray(object))
  2500. ? equalArrays(object, other, equalFunc, customizer, bitmask, stack)
  2501. : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack);
  2502. }
  2503. if (!(bitmask & PARTIAL_COMPARE_FLAG)) {
  2504. var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
  2505. othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
  2506. if (objIsWrapped || othIsWrapped) {
  2507. var objUnwrapped = objIsWrapped ? object.value() : object,
  2508. othUnwrapped = othIsWrapped ? other.value() : other;
  2509. stack || (stack = new Stack);
  2510. return equalFunc(objUnwrapped, othUnwrapped, customizer, bitmask, stack);
  2511. }
  2512. }
  2513. if (!isSameTag) {
  2514. return false;
  2515. }
  2516. stack || (stack = new Stack);
  2517. return equalObjects(object, other, equalFunc, customizer, bitmask, stack);
  2518. }
  2519. /**
  2520. * The base implementation of `_.isMatch` without support for iteratee shorthands.
  2521. *
  2522. * @private
  2523. * @param {Object} object The object to inspect.
  2524. * @param {Object} source The object of property values to match.
  2525. * @param {Array} matchData The property names, values, and compare flags to match.
  2526. * @param {Function} [customizer] The function to customize comparisons.
  2527. * @returns {boolean} Returns `true` if `object` is a match, else `false`.
  2528. */
  2529. function baseIsMatch(object, source, matchData, customizer) {
  2530. var index = matchData.length,
  2531. length = index,
  2532. noCustomizer = !customizer;
  2533. if (object == null) {
  2534. return !length;
  2535. }
  2536. object = Object(object);
  2537. while (index--) {
  2538. var data = matchData[index];
  2539. if ((noCustomizer && data[2])
  2540. ? data[1] !== object[data[0]]
  2541. : !(data[0] in object)
  2542. ) {
  2543. return false;
  2544. }
  2545. }
  2546. while (++index < length) {
  2547. data = matchData[index];
  2548. var key = data[0],
  2549. objValue = object[key],
  2550. srcValue = data[1];
  2551. if (noCustomizer && data[2]) {
  2552. if (objValue === undefined && !(key in object)) {
  2553. return false;
  2554. }
  2555. } else {
  2556. var stack = new Stack;
  2557. if (customizer) {
  2558. var result = customizer(objValue, srcValue, key, object, source, stack);
  2559. }
  2560. if (!(result === undefined
  2561. ? baseIsEqual(srcValue, objValue, customizer, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG, stack)
  2562. : result
  2563. )) {
  2564. return false;
  2565. }
  2566. }
  2567. }
  2568. return true;
  2569. }
  2570. /**
  2571. * The base implementation of `_.isNative` without bad shim checks.
  2572. *
  2573. * @private
  2574. * @param {*} value The value to check.
  2575. * @returns {boolean} Returns `true` if `value` is a native function,
  2576. * else `false`.
  2577. */
  2578. function baseIsNative(value) {
  2579. if (!isObject(value) || isMasked(value)) {
  2580. return false;
  2581. }
  2582. var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
  2583. return pattern.test(toSource(value));
  2584. }
  2585. /**
  2586. * The base implementation of `_.isTypedArray` without Node.js optimizations.
  2587. *
  2588. * @private
  2589. * @param {*} value The value to check.
  2590. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
  2591. */
  2592. function baseIsTypedArray(value) {
  2593. return isObjectLike(value) &&
  2594. isLength(value.length) && !!typedArrayTags[objectToString.call(value)];
  2595. }
  2596. /**
  2597. * The base implementation of `_.iteratee`.
  2598. *
  2599. * @private
  2600. * @param {*} [value=_.identity] The value to convert to an iteratee.
  2601. * @returns {Function} Returns the iteratee.
  2602. */
  2603. function baseIteratee(value) {
  2604. // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
  2605. // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
  2606. if (typeof value == 'function') {
  2607. return value;
  2608. }
  2609. if (value == null) {
  2610. return identity;
  2611. }
  2612. if (typeof value == 'object') {
  2613. return isArray(value)
  2614. ? baseMatchesProperty(value[0], value[1])
  2615. : baseMatches(value);
  2616. }
  2617. return property(value);
  2618. }
  2619. /**
  2620. * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
  2621. *
  2622. * @private
  2623. * @param {Object} object The object to query.
  2624. * @returns {Array} Returns the array of property names.
  2625. */
  2626. function baseKeys(object) {
  2627. if (!isPrototype(object)) {
  2628. return nativeKeys(object);
  2629. }
  2630. var result = [];
  2631. for (var key in Object(object)) {
  2632. if (hasOwnProperty.call(object, key) && key != 'constructor') {
  2633. result.push(key);
  2634. }
  2635. }
  2636. return result;
  2637. }
  2638. /**
  2639. * The base implementation of `_.matches` which doesn't clone `source`.
  2640. *
  2641. * @private
  2642. * @param {Object} source The object of property values to match.
  2643. * @returns {Function} Returns the new spec function.
  2644. */
  2645. function baseMatches(source) {
  2646. var matchData = getMatchData(source);
  2647. if (matchData.length == 1 && matchData[0][2]) {
  2648. return matchesStrictComparable(matchData[0][0], matchData[0][1]);
  2649. }
  2650. return function(object) {
  2651. return object === source || baseIsMatch(object, source, matchData);
  2652. };
  2653. }
  2654. /**
  2655. * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
  2656. *
  2657. * @private
  2658. * @param {string} path The path of the property to get.
  2659. * @param {*} srcValue The value to match.
  2660. * @returns {Function} Returns the new spec function.
  2661. */
  2662. function baseMatchesProperty(path, srcValue) {
  2663. if (isKey(path) && isStrictComparable(srcValue)) {
  2664. return matchesStrictComparable(toKey(path), srcValue);
  2665. }
  2666. return function(object) {
  2667. var objValue = get(object, path);
  2668. return (objValue === undefined && objValue === srcValue)
  2669. ? hasIn(object, path)
  2670. : baseIsEqual(srcValue, objValue, undefined, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG);
  2671. };
  2672. }
  2673. /**
  2674. * A specialized version of `baseProperty` which supports deep paths.
  2675. *
  2676. * @private
  2677. * @param {Array|string} path The path of the property to get.
  2678. * @returns {Function} Returns the new accessor function.
  2679. */
  2680. function basePropertyDeep(path) {
  2681. return function(object) {
  2682. return baseGet(object, path);
  2683. };
  2684. }
  2685. /**
  2686. * The base implementation of `_.pullAt` without support for individual
  2687. * indexes or capturing the removed elements.
  2688. *
  2689. * @private
  2690. * @param {Array} array The array to modify.
  2691. * @param {number[]} indexes The indexes of elements to remove.
  2692. * @returns {Array} Returns `array`.
  2693. */
  2694. function basePullAt(array, indexes) {
  2695. var length = array ? indexes.length : 0,
  2696. lastIndex = length - 1;
  2697. while (length--) {
  2698. var index = indexes[length];
  2699. if (length == lastIndex || index !== previous) {
  2700. var previous = index;
  2701. if (isIndex(index)) {
  2702. splice.call(array, index, 1);
  2703. }
  2704. else if (!isKey(index, array)) {
  2705. var path = castPath(index),
  2706. object = parent(array, path);
  2707. if (object != null) {
  2708. delete object[toKey(last(path))];
  2709. }
  2710. }
  2711. else {
  2712. delete array[toKey(index)];
  2713. }
  2714. }
  2715. }
  2716. return array;
  2717. }
  2718. /**
  2719. * The base implementation of `_.slice` without an iteratee call guard.
  2720. *
  2721. * @private
  2722. * @param {Array} array The array to slice.
  2723. * @param {number} [start=0] The start position.
  2724. * @param {number} [end=array.length] The end position.
  2725. * @returns {Array} Returns the slice of `array`.
  2726. */
  2727. function baseSlice(array, start, end) {
  2728. var index = -1,
  2729. length = array.length;
  2730. if (start < 0) {
  2731. start = -start > length ? 0 : (length + start);
  2732. }
  2733. end = end > length ? length : end;
  2734. if (end < 0) {
  2735. end += length;
  2736. }
  2737. length = start > end ? 0 : ((end - start) >>> 0);
  2738. start >>>= 0;
  2739. var result = Array(length);
  2740. while (++index < length) {
  2741. result[index] = array[index + start];
  2742. }
  2743. return result;
  2744. }
  2745. /**
  2746. * The base implementation of `_.toString` which doesn't convert nullish
  2747. * values to empty strings.
  2748. *
  2749. * @private
  2750. * @param {*} value The value to process.
  2751. * @returns {string} Returns the string.
  2752. */
  2753. function baseToString(value) {
  2754. // Exit early for strings to avoid a performance hit in some environments.
  2755. if (typeof value == 'string') {
  2756. return value;
  2757. }
  2758. if (isSymbol(value)) {
  2759. return symbolToString ? symbolToString.call(value) : '';
  2760. }
  2761. var result = (value + '');
  2762. return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
  2763. }
  2764. /**
  2765. * Casts `value` to a path array if it's not one.
  2766. *
  2767. * @private
  2768. * @param {*} value The value to inspect.
  2769. * @returns {Array} Returns the cast property path array.
  2770. */
  2771. function castPath(value) {
  2772. return isArray(value) ? value : stringToPath(value);
  2773. }
  2774. /**
  2775. * A specialized version of `baseIsEqualDeep` for arrays with support for
  2776. * partial deep comparisons.
  2777. *
  2778. * @private
  2779. * @param {Array} array The array to compare.
  2780. * @param {Array} other The other array to compare.
  2781. * @param {Function} equalFunc The function to determine equivalents of values.
  2782. * @param {Function} customizer The function to customize comparisons.
  2783. * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
  2784. * for more details.
  2785. * @param {Object} stack Tracks traversed `array` and `other` objects.
  2786. * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
  2787. */
  2788. function equalArrays(array, other, equalFunc, customizer, bitmask, stack) {
  2789. var isPartial = bitmask & PARTIAL_COMPARE_FLAG,
  2790. arrLength = array.length,
  2791. othLength = other.length;
  2792. if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
  2793. return false;
  2794. }
  2795. // Assume cyclic values are equal.
  2796. var stacked = stack.get(array);
  2797. if (stacked && stack.get(other)) {
  2798. return stacked == other;
  2799. }
  2800. var index = -1,
  2801. result = true,
  2802. seen = (bitmask & UNORDERED_COMPARE_FLAG) ? new SetCache : undefined;
  2803. stack.set(array, other);
  2804. stack.set(other, array);
  2805. // Ignore non-index properties.
  2806. while (++index < arrLength) {
  2807. var arrValue = array[index],
  2808. othValue = other[index];
  2809. if (customizer) {
  2810. var compared = isPartial
  2811. ? customizer(othValue, arrValue, index, other, array, stack)
  2812. : customizer(arrValue, othValue, index, array, other, stack);
  2813. }
  2814. if (compared !== undefined) {
  2815. if (compared) {
  2816. continue;
  2817. }
  2818. result = false;
  2819. break;
  2820. }
  2821. // Recursively compare arrays (susceptible to call stack limits).
  2822. if (seen) {
  2823. if (!arraySome(other, function(othValue, othIndex) {
  2824. if (!seen.has(othIndex) &&
  2825. (arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) {
  2826. return seen.add(othIndex);
  2827. }
  2828. })) {
  2829. result = false;
  2830. break;
  2831. }
  2832. } else if (!(
  2833. arrValue === othValue ||
  2834. equalFunc(arrValue, othValue, customizer, bitmask, stack)
  2835. )) {
  2836. result = false;
  2837. break;
  2838. }
  2839. }
  2840. stack['delete'](array);
  2841. stack['delete'](other);
  2842. return result;
  2843. }
  2844. /**
  2845. * A specialized version of `baseIsEqualDeep` for comparing objects of
  2846. * the same `toStringTag`.
  2847. *
  2848. * **Note:** This function only supports comparing values with tags of
  2849. * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
  2850. *
  2851. * @private
  2852. * @param {Object} object The object to compare.
  2853. * @param {Object} other The other object to compare.
  2854. * @param {string} tag The `toStringTag` of the objects to compare.
  2855. * @param {Function} equalFunc The function to determine equivalents of values.
  2856. * @param {Function} customizer The function to customize comparisons.
  2857. * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
  2858. * for more details.
  2859. * @param {Object} stack Tracks traversed `object` and `other` objects.
  2860. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  2861. */
  2862. function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) {
  2863. switch (tag) {
  2864. case dataViewTag:
  2865. if ((object.byteLength != other.byteLength) ||
  2866. (object.byteOffset != other.byteOffset)) {
  2867. return false;
  2868. }
  2869. object = object.buffer;
  2870. other = other.buffer;
  2871. case arrayBufferTag:
  2872. if ((object.byteLength != other.byteLength) ||
  2873. !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
  2874. return false;
  2875. }
  2876. return true;
  2877. case boolTag:
  2878. case dateTag:
  2879. case numberTag:
  2880. // Coerce booleans to `1` or `0` and dates to milliseconds.
  2881. // Invalid dates are coerced to `NaN`.
  2882. return eq(+object, +other);
  2883. case errorTag:
  2884. return object.name == other.name && object.message == other.message;
  2885. case regexpTag:
  2886. case stringTag:
  2887. // Coerce regexes to strings and treat strings, primitives and objects,
  2888. // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
  2889. // for more details.
  2890. return object == (other + '');
  2891. case mapTag:
  2892. var convert = mapToArray;
  2893. case setTag:
  2894. var isPartial = bitmask & PARTIAL_COMPARE_FLAG;
  2895. convert || (convert = setToArray);
  2896. if (object.size != other.size && !isPartial) {
  2897. return false;
  2898. }
  2899. // Assume cyclic values are equal.
  2900. var stacked = stack.get(object);
  2901. if (stacked) {
  2902. return stacked == other;
  2903. }
  2904. bitmask |= UNORDERED_COMPARE_FLAG;
  2905. // Recursively compare objects (susceptible to call stack limits).
  2906. stack.set(object, other);
  2907. var result = equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack);
  2908. stack['delete'](object);
  2909. return result;
  2910. case symbolTag:
  2911. if (symbolValueOf) {
  2912. return symbolValueOf.call(object) == symbolValueOf.call(other);
  2913. }
  2914. }
  2915. return false;
  2916. }
  2917. /**
  2918. * A specialized version of `baseIsEqualDeep` for objects with support for
  2919. * partial deep comparisons.
  2920. *
  2921. * @private
  2922. * @param {Object} object The object to compare.
  2923. * @param {Object} other The other object to compare.
  2924. * @param {Function} equalFunc The function to determine equivalents of values.
  2925. * @param {Function} customizer The function to customize comparisons.
  2926. * @param {number} bitmask The bitmask of comparison flags. See `baseIsEqual`
  2927. * for more details.
  2928. * @param {Object} stack Tracks traversed `object` and `other` objects.
  2929. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  2930. */
  2931. function equalObjects(object, other, equalFunc, customizer, bitmask, stack) {
  2932. var isPartial = bitmask & PARTIAL_COMPARE_FLAG,
  2933. objProps = keys(object),
  2934. objLength = objProps.length,
  2935. othProps = keys(other),
  2936. othLength = othProps.length;
  2937. if (objLength != othLength && !isPartial) {
  2938. return false;
  2939. }
  2940. var index = objLength;
  2941. while (index--) {
  2942. var key = objProps[index];
  2943. if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
  2944. return false;
  2945. }
  2946. }
  2947. // Assume cyclic values are equal.
  2948. var stacked = stack.get(object);
  2949. if (stacked && stack.get(other)) {
  2950. return stacked == other;
  2951. }
  2952. var result = true;
  2953. stack.set(object, other);
  2954. stack.set(other, object);
  2955. var skipCtor = isPartial;
  2956. while (++index < objLength) {
  2957. key = objProps[index];
  2958. var objValue = object[key],
  2959. othValue = other[key];
  2960. if (customizer) {
  2961. var compared = isPartial
  2962. ? customizer(othValue, objValue, key, other, object, stack)
  2963. : customizer(objValue, othValue, key, object, other, stack);
  2964. }
  2965. // Recursively compare objects (susceptible to call stack limits).
  2966. if (!(compared === undefined
  2967. ? (objValue === othValue || equalFunc(objValue, othValue, customizer, bitmask, stack))
  2968. : compared
  2969. )) {
  2970. result = false;
  2971. break;
  2972. }
  2973. skipCtor || (skipCtor = key == 'constructor');
  2974. }
  2975. if (result && !skipCtor) {
  2976. var objCtor = object.constructor,
  2977. othCtor = other.constructor;
  2978. // Non `Object` object instances with different constructors are not equal.
  2979. if (objCtor != othCtor &&
  2980. ('constructor' in object && 'constructor' in other) &&
  2981. !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
  2982. typeof othCtor == 'function' && othCtor instanceof othCtor)) {
  2983. result = false;
  2984. }
  2985. }
  2986. stack['delete'](object);
  2987. stack['delete'](other);
  2988. return result;
  2989. }
  2990. /**
  2991. * Gets the data for `map`.
  2992. *
  2993. * @private
  2994. * @param {Object} map The map to query.
  2995. * @param {string} key The reference key.
  2996. * @returns {*} Returns the map data.
  2997. */
  2998. function getMapData(map, key) {
  2999. var data = map.__data__;
  3000. return isKeyable(key)
  3001. ? data[typeof key == 'string' ? 'string' : 'hash']
  3002. : data.map;
  3003. }
  3004. /**
  3005. * Gets the property names, values, and compare flags of `object`.
  3006. *
  3007. * @private
  3008. * @param {Object} object The object to query.
  3009. * @returns {Array} Returns the match data of `object`.
  3010. */
  3011. function getMatchData(object) {
  3012. var result = keys(object),
  3013. length = result.length;
  3014. while (length--) {
  3015. var key = result[length],
  3016. value = object[key];
  3017. result[length] = [key, value, isStrictComparable(value)];
  3018. }
  3019. return result;
  3020. }
  3021. /**
  3022. * Gets the native function at `key` of `object`.
  3023. *
  3024. * @private
  3025. * @param {Object} object The object to query.
  3026. * @param {string} key The key of the method to get.
  3027. * @returns {*} Returns the function if it's native, else `undefined`.
  3028. */
  3029. function getNative(object, key) {
  3030. var value = getValue(object, key);
  3031. return baseIsNative(value) ? value : undefined;
  3032. }
  3033. /**
  3034. * Gets the `toStringTag` of `value`.
  3035. *
  3036. * @private
  3037. * @param {*} value The value to query.
  3038. * @returns {string} Returns the `toStringTag`.
  3039. */
  3040. var getTag = baseGetTag;
  3041. // Fallback for data views, maps, sets, and weak maps in IE 11,
  3042. // for data views in Edge < 14, and promises in Node.js.
  3043. if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
  3044. (Map && getTag(new Map) != mapTag) ||
  3045. (Promise && getTag(Promise.resolve()) != promiseTag) ||
  3046. (Set && getTag(new Set) != setTag) ||
  3047. (WeakMap && getTag(new WeakMap) != weakMapTag)) {
  3048. getTag = function(value) {
  3049. var result = objectToString.call(value),
  3050. Ctor = result == objectTag ? value.constructor : undefined,
  3051. ctorString = Ctor ? toSource(Ctor) : undefined;
  3052. if (ctorString) {
  3053. switch (ctorString) {
  3054. case dataViewCtorString: return dataViewTag;
  3055. case mapCtorString: return mapTag;
  3056. case promiseCtorString: return promiseTag;
  3057. case setCtorString: return setTag;
  3058. case weakMapCtorString: return weakMapTag;
  3059. }
  3060. }
  3061. return result;
  3062. };
  3063. }
  3064. /**
  3065. * Checks if `path` exists on `object`.
  3066. *
  3067. * @private
  3068. * @param {Object} object The object to query.
  3069. * @param {Array|string} path The path to check.
  3070. * @param {Function} hasFunc The function to check properties.
  3071. * @returns {boolean} Returns `true` if `path` exists, else `false`.
  3072. */
  3073. function hasPath(object, path, hasFunc) {
  3074. path = isKey(path, object) ? [path] : castPath(path);
  3075. var result,
  3076. index = -1,
  3077. length = path.length;
  3078. while (++index < length) {
  3079. var key = toKey(path[index]);
  3080. if (!(result = object != null && hasFunc(object, key))) {
  3081. break;
  3082. }
  3083. object = object[key];
  3084. }
  3085. if (result) {
  3086. return result;
  3087. }
  3088. var length = object ? object.length : 0;
  3089. return !!length && isLength(length) && isIndex(key, length) &&
  3090. (isArray(object) || isArguments(object));
  3091. }
  3092. /**
  3093. * Checks if `value` is a valid array-like index.
  3094. *
  3095. * @private
  3096. * @param {*} value The value to check.
  3097. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
  3098. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
  3099. */
  3100. function isIndex(value, length) {
  3101. length = length == null ? MAX_SAFE_INTEGER : length;
  3102. return !!length &&
  3103. (typeof value == 'number' || reIsUint.test(value)) &&
  3104. (value > -1 && value % 1 == 0 && value < length);
  3105. }
  3106. /**
  3107. * Checks if `value` is a property name and not a property path.
  3108. *
  3109. * @private
  3110. * @param {*} value The value to check.
  3111. * @param {Object} [object] The object to query keys on.
  3112. * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
  3113. */
  3114. function isKey(value, object) {
  3115. if (isArray(value)) {
  3116. return false;
  3117. }
  3118. var type = typeof value;
  3119. if (type == 'number' || type == 'symbol' || type == 'boolean' ||
  3120. value == null || isSymbol(value)) {
  3121. return true;
  3122. }
  3123. return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
  3124. (object != null && value in Object(object));
  3125. }
  3126. /**
  3127. * Checks if `value` is suitable for use as unique object key.
  3128. *
  3129. * @private
  3130. * @param {*} value The value to check.
  3131. * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
  3132. */
  3133. function isKeyable(value) {
  3134. var type = typeof value;
  3135. return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
  3136. ? (value !== '__proto__')
  3137. : (value === null);
  3138. }
  3139. /**
  3140. * Checks if `func` has its source masked.
  3141. *
  3142. * @private
  3143. * @param {Function} func The function to check.
  3144. * @returns {boolean} Returns `true` if `func` is masked, else `false`.
  3145. */
  3146. function isMasked(func) {
  3147. return !!maskSrcKey && (maskSrcKey in func);
  3148. }
  3149. /**
  3150. * Checks if `value` is likely a prototype object.
  3151. *
  3152. * @private
  3153. * @param {*} value The value to check.
  3154. * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
  3155. */
  3156. function isPrototype(value) {
  3157. var Ctor = value && value.constructor,
  3158. proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
  3159. return value === proto;
  3160. }
  3161. /**
  3162. * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
  3163. *
  3164. * @private
  3165. * @param {*} value The value to check.
  3166. * @returns {boolean} Returns `true` if `value` if suitable for strict
  3167. * equality comparisons, else `false`.
  3168. */
  3169. function isStrictComparable(value) {
  3170. return value === value && !isObject(value);
  3171. }
  3172. /**
  3173. * A specialized version of `matchesProperty` for source values suitable
  3174. * for strict equality comparisons, i.e. `===`.
  3175. *
  3176. * @private
  3177. * @param {string} key The key of the property to get.
  3178. * @param {*} srcValue The value to match.
  3179. * @returns {Function} Returns the new spec function.
  3180. */
  3181. function matchesStrictComparable(key, srcValue) {
  3182. return function(object) {
  3183. if (object == null) {
  3184. return false;
  3185. }
  3186. return object[key] === srcValue &&
  3187. (srcValue !== undefined || (key in Object(object)));
  3188. };
  3189. }
  3190. /**
  3191. * Gets the parent value at `path` of `object`.
  3192. *
  3193. * @private
  3194. * @param {Object} object The object to query.
  3195. * @param {Array} path The path to get the parent value of.
  3196. * @returns {*} Returns the parent value.
  3197. */
  3198. function parent(object, path) {
  3199. return path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));
  3200. }
  3201. /**
  3202. * Converts `string` to a property path array.
  3203. *
  3204. * @private
  3205. * @param {string} string The string to convert.
  3206. * @returns {Array} Returns the property path array.
  3207. */
  3208. var stringToPath = memoize(function(string) {
  3209. string = toString(string);
  3210. var result = [];
  3211. if (reLeadingDot.test(string)) {
  3212. result.push('');
  3213. }
  3214. string.replace(rePropName, function(match, number, quote, string) {
  3215. result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
  3216. });
  3217. return result;
  3218. });
  3219. /**
  3220. * Converts `value` to a string key if it's not a string or symbol.
  3221. *
  3222. * @private
  3223. * @param {*} value The value to inspect.
  3224. * @returns {string|symbol} Returns the key.
  3225. */
  3226. function toKey(value) {
  3227. if (typeof value == 'string' || isSymbol(value)) {
  3228. return value;
  3229. }
  3230. var result = (value + '');
  3231. return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
  3232. }
  3233. /**
  3234. * Converts `func` to its source code.
  3235. *
  3236. * @private
  3237. * @param {Function} func The function to process.
  3238. * @returns {string} Returns the source code.
  3239. */
  3240. function toSource(func) {
  3241. if (func != null) {
  3242. try {
  3243. return funcToString.call(func);
  3244. } catch (e) {}
  3245. try {
  3246. return (func + '');
  3247. } catch (e) {}
  3248. }
  3249. return '';
  3250. }
  3251. /**
  3252. * Gets the last element of `array`.
  3253. *
  3254. * @static
  3255. * @memberOf _
  3256. * @since 0.1.0
  3257. * @category Array
  3258. * @param {Array} array The array to query.
  3259. * @returns {*} Returns the last element of `array`.
  3260. * @example
  3261. *
  3262. * _.last([1, 2, 3]);
  3263. * // => 3
  3264. */
  3265. function last(array) {
  3266. var length = array ? array.length : 0;
  3267. return length ? array[length - 1] : undefined;
  3268. }
  3269. /**
  3270. * Removes all elements from `array` that `predicate` returns truthy for
  3271. * and returns an array of the removed elements. The predicate is invoked
  3272. * with three arguments: (value, index, array).
  3273. *
  3274. * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`
  3275. * to pull elements from an array by value.
  3276. *
  3277. * @static
  3278. * @memberOf _
  3279. * @since 2.0.0
  3280. * @category Array
  3281. * @param {Array} array The array to modify.
  3282. * @param {Function} [predicate=_.identity]
  3283. * The function invoked per iteration.
  3284. * @returns {Array} Returns the new array of removed elements.
  3285. * @example
  3286. *
  3287. * var array = [1, 2, 3, 4];
  3288. * var evens = _.remove(array, function(n) {
  3289. * return n % 2 == 0;
  3290. * });
  3291. *
  3292. * console.log(array);
  3293. * // => [1, 3]
  3294. *
  3295. * console.log(evens);
  3296. * // => [2, 4]
  3297. */
  3298. function remove(array, predicate) {
  3299. var result = [];
  3300. if (!(array && array.length)) {
  3301. return result;
  3302. }
  3303. var index = -1,
  3304. indexes = [],
  3305. length = array.length;
  3306. predicate = baseIteratee(predicate, 3);
  3307. while (++index < length) {
  3308. var value = array[index];
  3309. if (predicate(value, index, array)) {
  3310. result.push(value);
  3311. indexes.push(index);
  3312. }
  3313. }
  3314. basePullAt(array, indexes);
  3315. return result;
  3316. }
  3317. /**
  3318. * Creates a function that memoizes the result of `func`. If `resolver` is
  3319. * provided, it determines the cache key for storing the result based on the
  3320. * arguments provided to the memoized function. By default, the first argument
  3321. * provided to the memoized function is used as the map cache key. The `func`
  3322. * is invoked with the `this` binding of the memoized function.
  3323. *
  3324. * **Note:** The cache is exposed as the `cache` property on the memoized
  3325. * function. Its creation may be customized by replacing the `_.memoize.Cache`
  3326. * constructor with one whose instances implement the
  3327. * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
  3328. * method interface of `delete`, `get`, `has`, and `set`.
  3329. *
  3330. * @static
  3331. * @memberOf _
  3332. * @since 0.1.0
  3333. * @category Function
  3334. * @param {Function} func The function to have its output memoized.
  3335. * @param {Function} [resolver] The function to resolve the cache key.
  3336. * @returns {Function} Returns the new memoized function.
  3337. * @example
  3338. *
  3339. * var object = { 'a': 1, 'b': 2 };
  3340. * var other = { 'c': 3, 'd': 4 };
  3341. *
  3342. * var values = _.memoize(_.values);
  3343. * values(object);
  3344. * // => [1, 2]
  3345. *
  3346. * values(other);
  3347. * // => [3, 4]
  3348. *
  3349. * object.a = 2;
  3350. * values(object);
  3351. * // => [1, 2]
  3352. *
  3353. * // Modify the result cache.
  3354. * values.cache.set(object, ['a', 'b']);
  3355. * values(object);
  3356. * // => ['a', 'b']
  3357. *
  3358. * // Replace `_.memoize.Cache`.
  3359. * _.memoize.Cache = WeakMap;
  3360. */
  3361. function memoize(func, resolver) {
  3362. if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {
  3363. throw new TypeError(FUNC_ERROR_TEXT);
  3364. }
  3365. var memoized = function() {
  3366. var args = arguments,
  3367. key = resolver ? resolver.apply(this, args) : args[0],
  3368. cache = memoized.cache;
  3369. if (cache.has(key)) {
  3370. return cache.get(key);
  3371. }
  3372. var result = func.apply(this, args);
  3373. memoized.cache = cache.set(key, result);
  3374. return result;
  3375. };
  3376. memoized.cache = new (memoize.Cache || MapCache);
  3377. return memoized;
  3378. }
  3379. // Assign cache to `_.memoize`.
  3380. memoize.Cache = MapCache;
  3381. /**
  3382. * Performs a
  3383. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  3384. * comparison between two values to determine if they are equivalent.
  3385. *
  3386. * @static
  3387. * @memberOf _
  3388. * @since 4.0.0
  3389. * @category Lang
  3390. * @param {*} value The value to compare.
  3391. * @param {*} other The other value to compare.
  3392. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  3393. * @example
  3394. *
  3395. * var object = { 'a': 1 };
  3396. * var other = { 'a': 1 };
  3397. *
  3398. * _.eq(object, object);
  3399. * // => true
  3400. *
  3401. * _.eq(object, other);
  3402. * // => false
  3403. *
  3404. * _.eq('a', 'a');
  3405. * // => true
  3406. *
  3407. * _.eq('a', Object('a'));
  3408. * // => false
  3409. *
  3410. * _.eq(NaN, NaN);
  3411. * // => true
  3412. */
  3413. function eq(value, other) {
  3414. return value === other || (value !== value && other !== other);
  3415. }
  3416. /**
  3417. * Checks if `value` is likely an `arguments` object.
  3418. *
  3419. * @static
  3420. * @memberOf _
  3421. * @since 0.1.0
  3422. * @category Lang
  3423. * @param {*} value The value to check.
  3424. * @returns {boolean} Returns `true` if `value` is an `arguments` object,
  3425. * else `false`.
  3426. * @example
  3427. *
  3428. * _.isArguments(function() { return arguments; }());
  3429. * // => true
  3430. *
  3431. * _.isArguments([1, 2, 3]);
  3432. * // => false
  3433. */
  3434. function isArguments(value) {
  3435. // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
  3436. return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
  3437. (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
  3438. }
  3439. /**
  3440. * Checks if `value` is classified as an `Array` object.
  3441. *
  3442. * @static
  3443. * @memberOf _
  3444. * @since 0.1.0
  3445. * @category Lang
  3446. * @param {*} value The value to check.
  3447. * @returns {boolean} Returns `true` if `value` is an array, else `false`.
  3448. * @example
  3449. *
  3450. * _.isArray([1, 2, 3]);
  3451. * // => true
  3452. *
  3453. * _.isArray(document.body.children);
  3454. * // => false
  3455. *
  3456. * _.isArray('abc');
  3457. * // => false
  3458. *
  3459. * _.isArray(_.noop);
  3460. * // => false
  3461. */
  3462. var isArray = Array.isArray;
  3463. /**
  3464. * Checks if `value` is array-like. A value is considered array-like if it's
  3465. * not a function and has a `value.length` that's an integer greater than or
  3466. * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
  3467. *
  3468. * @static
  3469. * @memberOf _
  3470. * @since 4.0.0
  3471. * @category Lang
  3472. * @param {*} value The value to check.
  3473. * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
  3474. * @example
  3475. *
  3476. * _.isArrayLike([1, 2, 3]);
  3477. * // => true
  3478. *
  3479. * _.isArrayLike(document.body.children);
  3480. * // => true
  3481. *
  3482. * _.isArrayLike('abc');
  3483. * // => true
  3484. *
  3485. * _.isArrayLike(_.noop);
  3486. * // => false
  3487. */
  3488. function isArrayLike(value) {
  3489. return value != null && isLength(value.length) && !isFunction(value);
  3490. }
  3491. /**
  3492. * This method is like `_.isArrayLike` except that it also checks if `value`
  3493. * is an object.
  3494. *
  3495. * @static
  3496. * @memberOf _
  3497. * @since 4.0.0
  3498. * @category Lang
  3499. * @param {*} value The value to check.
  3500. * @returns {boolean} Returns `true` if `value` is an array-like object,
  3501. * else `false`.
  3502. * @example
  3503. *
  3504. * _.isArrayLikeObject([1, 2, 3]);
  3505. * // => true
  3506. *
  3507. * _.isArrayLikeObject(document.body.children);
  3508. * // => true
  3509. *
  3510. * _.isArrayLikeObject('abc');
  3511. * // => false
  3512. *
  3513. * _.isArrayLikeObject(_.noop);
  3514. * // => false
  3515. */
  3516. function isArrayLikeObject(value) {
  3517. return isObjectLike(value) && isArrayLike(value);
  3518. }
  3519. /**
  3520. * Checks if `value` is classified as a `Function` object.
  3521. *
  3522. * @static
  3523. * @memberOf _
  3524. * @since 0.1.0
  3525. * @category Lang
  3526. * @param {*} value The value to check.
  3527. * @returns {boolean} Returns `true` if `value` is a function, else `false`.
  3528. * @example
  3529. *
  3530. * _.isFunction(_);
  3531. * // => true
  3532. *
  3533. * _.isFunction(/abc/);
  3534. * // => false
  3535. */
  3536. function isFunction(value) {
  3537. // The use of `Object#toString` avoids issues with the `typeof` operator
  3538. // in Safari 8-9 which returns 'object' for typed array and other constructors.
  3539. var tag = isObject(value) ? objectToString.call(value) : '';
  3540. return tag == funcTag || tag == genTag;
  3541. }
  3542. /**
  3543. * Checks if `value` is a valid array-like length.
  3544. *
  3545. * **Note:** This method is loosely based on
  3546. * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
  3547. *
  3548. * @static
  3549. * @memberOf _
  3550. * @since 4.0.0
  3551. * @category Lang
  3552. * @param {*} value The value to check.
  3553. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
  3554. * @example
  3555. *
  3556. * _.isLength(3);
  3557. * // => true
  3558. *
  3559. * _.isLength(Number.MIN_VALUE);
  3560. * // => false
  3561. *
  3562. * _.isLength(Infinity);
  3563. * // => false
  3564. *
  3565. * _.isLength('3');
  3566. * // => false
  3567. */
  3568. function isLength(value) {
  3569. return typeof value == 'number' &&
  3570. value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
  3571. }
  3572. /**
  3573. * Checks if `value` is the
  3574. * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
  3575. * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  3576. *
  3577. * @static
  3578. * @memberOf _
  3579. * @since 0.1.0
  3580. * @category Lang
  3581. * @param {*} value The value to check.
  3582. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  3583. * @example
  3584. *
  3585. * _.isObject({});
  3586. * // => true
  3587. *
  3588. * _.isObject([1, 2, 3]);
  3589. * // => true
  3590. *
  3591. * _.isObject(_.noop);
  3592. * // => true
  3593. *
  3594. * _.isObject(null);
  3595. * // => false
  3596. */
  3597. function isObject(value) {
  3598. var type = typeof value;
  3599. return !!value && (type == 'object' || type == 'function');
  3600. }
  3601. /**
  3602. * Checks if `value` is object-like. A value is object-like if it's not `null`
  3603. * and has a `typeof` result of "object".
  3604. *
  3605. * @static
  3606. * @memberOf _
  3607. * @since 4.0.0
  3608. * @category Lang
  3609. * @param {*} value The value to check.
  3610. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  3611. * @example
  3612. *
  3613. * _.isObjectLike({});
  3614. * // => true
  3615. *
  3616. * _.isObjectLike([1, 2, 3]);
  3617. * // => true
  3618. *
  3619. * _.isObjectLike(_.noop);
  3620. * // => false
  3621. *
  3622. * _.isObjectLike(null);
  3623. * // => false
  3624. */
  3625. function isObjectLike(value) {
  3626. return !!value && typeof value == 'object';
  3627. }
  3628. /**
  3629. * Checks if `value` is classified as a `Symbol` primitive or object.
  3630. *
  3631. * @static
  3632. * @memberOf _
  3633. * @since 4.0.0
  3634. * @category Lang
  3635. * @param {*} value The value to check.
  3636. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
  3637. * @example
  3638. *
  3639. * _.isSymbol(Symbol.iterator);
  3640. * // => true
  3641. *
  3642. * _.isSymbol('abc');
  3643. * // => false
  3644. */
  3645. function isSymbol(value) {
  3646. return typeof value == 'symbol' ||
  3647. (isObjectLike(value) && objectToString.call(value) == symbolTag);
  3648. }
  3649. /**
  3650. * Checks if `value` is classified as a typed array.
  3651. *
  3652. * @static
  3653. * @memberOf _
  3654. * @since 3.0.0
  3655. * @category Lang
  3656. * @param {*} value The value to check.
  3657. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
  3658. * @example
  3659. *
  3660. * _.isTypedArray(new Uint8Array);
  3661. * // => true
  3662. *
  3663. * _.isTypedArray([]);
  3664. * // => false
  3665. */
  3666. var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
  3667. /**
  3668. * Converts `value` to a string. An empty string is returned for `null`
  3669. * and `undefined` values. The sign of `-0` is preserved.
  3670. *
  3671. * @static
  3672. * @memberOf _
  3673. * @since 4.0.0
  3674. * @category Lang
  3675. * @param {*} value The value to process.
  3676. * @returns {string} Returns the string.
  3677. * @example
  3678. *
  3679. * _.toString(null);
  3680. * // => ''
  3681. *
  3682. * _.toString(-0);
  3683. * // => '-0'
  3684. *
  3685. * _.toString([1, 2, 3]);
  3686. * // => '1,2,3'
  3687. */
  3688. function toString(value) {
  3689. return value == null ? '' : baseToString(value);
  3690. }
  3691. /**
  3692. * Gets the value at `path` of `object`. If the resolved value is
  3693. * `undefined`, the `defaultValue` is returned in its place.
  3694. *
  3695. * @static
  3696. * @memberOf _
  3697. * @since 3.7.0
  3698. * @category Object
  3699. * @param {Object} object The object to query.
  3700. * @param {Array|string} path The path of the property to get.
  3701. * @param {*} [defaultValue] The value returned for `undefined` resolved values.
  3702. * @returns {*} Returns the resolved value.
  3703. * @example
  3704. *
  3705. * var object = { 'a': [{ 'b': { 'c': 3 } }] };
  3706. *
  3707. * _.get(object, 'a[0].b.c');
  3708. * // => 3
  3709. *
  3710. * _.get(object, ['a', '0', 'b', 'c']);
  3711. * // => 3
  3712. *
  3713. * _.get(object, 'a.b.c', 'default');
  3714. * // => 'default'
  3715. */
  3716. function get(object, path, defaultValue) {
  3717. var result = object == null ? undefined : baseGet(object, path);
  3718. return result === undefined ? defaultValue : result;
  3719. }
  3720. /**
  3721. * Checks if `path` is a direct or inherited property of `object`.
  3722. *
  3723. * @static
  3724. * @memberOf _
  3725. * @since 4.0.0
  3726. * @category Object
  3727. * @param {Object} object The object to query.
  3728. * @param {Array|string} path The path to check.
  3729. * @returns {boolean} Returns `true` if `path` exists, else `false`.
  3730. * @example
  3731. *
  3732. * var object = _.create({ 'a': _.create({ 'b': 2 }) });
  3733. *
  3734. * _.hasIn(object, 'a');
  3735. * // => true
  3736. *
  3737. * _.hasIn(object, 'a.b');
  3738. * // => true
  3739. *
  3740. * _.hasIn(object, ['a', 'b']);
  3741. * // => true
  3742. *
  3743. * _.hasIn(object, 'b');
  3744. * // => false
  3745. */
  3746. function hasIn(object, path) {
  3747. return object != null && hasPath(object, path, baseHasIn);
  3748. }
  3749. /**
  3750. * Creates an array of the own enumerable property names of `object`.
  3751. *
  3752. * **Note:** Non-object values are coerced to objects. See the
  3753. * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
  3754. * for more details.
  3755. *
  3756. * @static
  3757. * @since 0.1.0
  3758. * @memberOf _
  3759. * @category Object
  3760. * @param {Object} object The object to query.
  3761. * @returns {Array} Returns the array of property names.
  3762. * @example
  3763. *
  3764. * function Foo() {
  3765. * this.a = 1;
  3766. * this.b = 2;
  3767. * }
  3768. *
  3769. * Foo.prototype.c = 3;
  3770. *
  3771. * _.keys(new Foo);
  3772. * // => ['a', 'b'] (iteration order is not guaranteed)
  3773. *
  3774. * _.keys('hi');
  3775. * // => ['0', '1']
  3776. */
  3777. function keys(object) {
  3778. return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
  3779. }
  3780. /**
  3781. * This method returns the first argument it receives.
  3782. *
  3783. * @static
  3784. * @since 0.1.0
  3785. * @memberOf _
  3786. * @category Util
  3787. * @param {*} value Any value.
  3788. * @returns {*} Returns `value`.
  3789. * @example
  3790. *
  3791. * var object = { 'a': 1 };
  3792. *
  3793. * console.log(_.identity(object) === object);
  3794. * // => true
  3795. */
  3796. function identity(value) {
  3797. return value;
  3798. }
  3799. /**
  3800. * Creates a function that returns the value at `path` of a given object.
  3801. *
  3802. * @static
  3803. * @memberOf _
  3804. * @since 2.4.0
  3805. * @category Util
  3806. * @param {Array|string} path The path of the property to get.
  3807. * @returns {Function} Returns the new accessor function.
  3808. * @example
  3809. *
  3810. * var objects = [
  3811. * { 'a': { 'b': 2 } },
  3812. * { 'a': { 'b': 1 } }
  3813. * ];
  3814. *
  3815. * _.map(objects, _.property('a.b'));
  3816. * // => [2, 1]
  3817. *
  3818. * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
  3819. * // => [1, 2]
  3820. */
  3821. function property(path) {
  3822. return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
  3823. }
  3824. module.exports = remove;
  3825. /***/ }),
  3826. /***/ "./node_modules/process/browser.js":
  3827. /*!*****************************************!*\
  3828. !*** ./node_modules/process/browser.js ***!
  3829. \*****************************************/
  3830. /***/ ((module) => {
  3831. // shim for using process in browser
  3832. var process = module.exports = {};
  3833. // cached from whatever global is present so that test runners that stub it
  3834. // don't break things. But we need to wrap it in a try catch in case it is
  3835. // wrapped in strict mode code which doesn't define any globals. It's inside a
  3836. // function because try/catches deoptimize in certain engines.
  3837. var cachedSetTimeout;
  3838. var cachedClearTimeout;
  3839. function defaultSetTimout() {
  3840. throw new Error('setTimeout has not been defined');
  3841. }
  3842. function defaultClearTimeout () {
  3843. throw new Error('clearTimeout has not been defined');
  3844. }
  3845. (function () {
  3846. try {
  3847. if (typeof setTimeout === 'function') {
  3848. cachedSetTimeout = setTimeout;
  3849. } else {
  3850. cachedSetTimeout = defaultSetTimout;
  3851. }
  3852. } catch (e) {
  3853. cachedSetTimeout = defaultSetTimout;
  3854. }
  3855. try {
  3856. if (typeof clearTimeout === 'function') {
  3857. cachedClearTimeout = clearTimeout;
  3858. } else {
  3859. cachedClearTimeout = defaultClearTimeout;
  3860. }
  3861. } catch (e) {
  3862. cachedClearTimeout = defaultClearTimeout;
  3863. }
  3864. } ())
  3865. function runTimeout(fun) {
  3866. if (cachedSetTimeout === setTimeout) {
  3867. //normal enviroments in sane situations
  3868. return setTimeout(fun, 0);
  3869. }
  3870. // if setTimeout wasn't available but was latter defined
  3871. if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
  3872. cachedSetTimeout = setTimeout;
  3873. return setTimeout(fun, 0);
  3874. }
  3875. try {
  3876. // when when somebody has screwed with setTimeout but no I.E. maddness
  3877. return cachedSetTimeout(fun, 0);
  3878. } catch(e){
  3879. try {
  3880. // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
  3881. return cachedSetTimeout.call(null, fun, 0);
  3882. } catch(e){
  3883. // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
  3884. return cachedSetTimeout.call(this, fun, 0);
  3885. }
  3886. }
  3887. }
  3888. function runClearTimeout(marker) {
  3889. if (cachedClearTimeout === clearTimeout) {
  3890. //normal enviroments in sane situations
  3891. return clearTimeout(marker);
  3892. }
  3893. // if clearTimeout wasn't available but was latter defined
  3894. if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
  3895. cachedClearTimeout = clearTimeout;
  3896. return clearTimeout(marker);
  3897. }
  3898. try {
  3899. // when when somebody has screwed with setTimeout but no I.E. maddness
  3900. return cachedClearTimeout(marker);
  3901. } catch (e){
  3902. try {
  3903. // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
  3904. return cachedClearTimeout.call(null, marker);
  3905. } catch (e){
  3906. // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
  3907. // Some versions of I.E. have different rules for clearTimeout vs setTimeout
  3908. return cachedClearTimeout.call(this, marker);
  3909. }
  3910. }
  3911. }
  3912. var queue = [];
  3913. var draining = false;
  3914. var currentQueue;
  3915. var queueIndex = -1;
  3916. function cleanUpNextTick() {
  3917. if (!draining || !currentQueue) {
  3918. return;
  3919. }
  3920. draining = false;
  3921. if (currentQueue.length) {
  3922. queue = currentQueue.concat(queue);
  3923. } else {
  3924. queueIndex = -1;
  3925. }
  3926. if (queue.length) {
  3927. drainQueue();
  3928. }
  3929. }
  3930. function drainQueue() {
  3931. if (draining) {
  3932. return;
  3933. }
  3934. var timeout = runTimeout(cleanUpNextTick);
  3935. draining = true;
  3936. var len = queue.length;
  3937. while(len) {
  3938. currentQueue = queue;
  3939. queue = [];
  3940. while (++queueIndex < len) {
  3941. if (currentQueue) {
  3942. currentQueue[queueIndex].run();
  3943. }
  3944. }
  3945. queueIndex = -1;
  3946. len = queue.length;
  3947. }
  3948. currentQueue = null;
  3949. draining = false;
  3950. runClearTimeout(timeout);
  3951. }
  3952. process.nextTick = function (fun) {
  3953. var args = new Array(arguments.length - 1);
  3954. if (arguments.length > 1) {
  3955. for (var i = 1; i < arguments.length; i++) {
  3956. args[i - 1] = arguments[i];
  3957. }
  3958. }
  3959. queue.push(new Item(fun, args));
  3960. if (queue.length === 1 && !draining) {
  3961. runTimeout(drainQueue);
  3962. }
  3963. };
  3964. // v8 likes predictible objects
  3965. function Item(fun, array) {
  3966. this.fun = fun;
  3967. this.array = array;
  3968. }
  3969. Item.prototype.run = function () {
  3970. this.fun.apply(null, this.array);
  3971. };
  3972. process.title = 'browser';
  3973. process.browser = true;
  3974. process.env = {};
  3975. process.argv = [];
  3976. process.version = ''; // empty string to avoid regexp issues
  3977. process.versions = {};
  3978. function noop() {}
  3979. process.on = noop;
  3980. process.addListener = noop;
  3981. process.once = noop;
  3982. process.off = noop;
  3983. process.removeListener = noop;
  3984. process.removeAllListeners = noop;
  3985. process.emit = noop;
  3986. process.prependListener = noop;
  3987. process.prependOnceListener = noop;
  3988. process.listeners = function (name) { return [] }
  3989. process.binding = function (name) {
  3990. throw new Error('process.binding is not supported');
  3991. };
  3992. process.cwd = function () { return '/' };
  3993. process.chdir = function (dir) {
  3994. throw new Error('process.chdir is not supported');
  3995. };
  3996. process.umask = function() { return 0; };
  3997. /***/ })
  3998. /******/ });
  3999. /************************************************************************/
  4000. /******/ // The module cache
  4001. /******/ var __webpack_module_cache__ = {};
  4002. /******/
  4003. /******/ // The require function
  4004. /******/ function __webpack_require__(moduleId) {
  4005. /******/ // Check if module is in cache
  4006. /******/ var cachedModule = __webpack_module_cache__[moduleId];
  4007. /******/ if (cachedModule !== undefined) {
  4008. /******/ return cachedModule.exports;
  4009. /******/ }
  4010. /******/ // Create a new module (and put it into the cache)
  4011. /******/ var module = __webpack_module_cache__[moduleId] = {
  4012. /******/ id: moduleId,
  4013. /******/ loaded: false,
  4014. /******/ exports: {}
  4015. /******/ };
  4016. /******/
  4017. /******/ // Execute the module function
  4018. /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
  4019. /******/
  4020. /******/ // Flag the module as loaded
  4021. /******/ module.loaded = true;
  4022. /******/
  4023. /******/ // Return the exports of the module
  4024. /******/ return module.exports;
  4025. /******/ }
  4026. /******/
  4027. /************************************************************************/
  4028. /******/ /* webpack/runtime/compat get default export */
  4029. /******/ (() => {
  4030. /******/ // getDefaultExport function for compatibility with non-harmony modules
  4031. /******/ __webpack_require__.n = (module) => {
  4032. /******/ var getter = module && module.__esModule ?
  4033. /******/ () => (module['default']) :
  4034. /******/ () => (module);
  4035. /******/ __webpack_require__.d(getter, { a: getter });
  4036. /******/ return getter;
  4037. /******/ };
  4038. /******/ })();
  4039. /******/
  4040. /******/ /* webpack/runtime/define property getters */
  4041. /******/ (() => {
  4042. /******/ // define getter functions for harmony exports
  4043. /******/ __webpack_require__.d = (exports, definition) => {
  4044. /******/ for(var key in definition) {
  4045. /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
  4046. /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
  4047. /******/ }
  4048. /******/ }
  4049. /******/ };
  4050. /******/ })();
  4051. /******/
  4052. /******/ /* webpack/runtime/global */
  4053. /******/ (() => {
  4054. /******/ __webpack_require__.g = (function() {
  4055. /******/ if (typeof globalThis === 'object') return globalThis;
  4056. /******/ try {
  4057. /******/ return this || new Function('return this')();
  4058. /******/ } catch (e) {
  4059. /******/ if (typeof window === 'object') return window;
  4060. /******/ }
  4061. /******/ })();
  4062. /******/ })();
  4063. /******/
  4064. /******/ /* webpack/runtime/hasOwnProperty shorthand */
  4065. /******/ (() => {
  4066. /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
  4067. /******/ })();
  4068. /******/
  4069. /******/ /* webpack/runtime/make namespace object */
  4070. /******/ (() => {
  4071. /******/ // define __esModule on exports
  4072. /******/ __webpack_require__.r = (exports) => {
  4073. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  4074. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  4075. /******/ }
  4076. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  4077. /******/ };
  4078. /******/ })();
  4079. /******/
  4080. /******/ /* webpack/runtime/node module decorator */
  4081. /******/ (() => {
  4082. /******/ __webpack_require__.nmd = (module) => {
  4083. /******/ module.paths = [];
  4084. /******/ if (!module.children) module.children = [];
  4085. /******/ return module;
  4086. /******/ };
  4087. /******/ })();
  4088. /******/
  4089. /************************************************************************/
  4090. var __webpack_exports__ = {};
  4091. // This entry need to be wrapped in an IIFE because it need to be in strict mode.
  4092. (() => {
  4093. "use strict";
  4094. /*!***********************************!*\
  4095. !*** ./resources/js/dashboard.js ***!
  4096. \***********************************/
  4097. __webpack_require__.r(__webpack_exports__);
  4098. /* harmony import */ var _components_buckets_riot__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./components/buckets.riot */ "./resources/js/components/buckets.riot");
  4099. /**
  4100. * Bucket
  4101. *
  4102. *
  4103. */
  4104. // register components
  4105. riot.register('app-buckets', _components_buckets_riot__WEBPACK_IMPORTED_MODULE_0__.default);
  4106. riot.mount('app-buckets');
  4107. })();
  4108. /******/ })()
  4109. ;