/******/ (function() { // webpackBootstrap /******/ var __webpack_modules__ = ({ /***/ "./node_modules/@plotly/dash-component-plugins/dist/index.js": /*!*******************************************************************!*\ !*** ./node_modules/@plotly/dash-component-plugins/dist/index.js ***! \*******************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { !function(e,n){ true?module.exports=n(__webpack_require__(/*! react */ "react")):0}(window,(function(e){return function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=1)}([function(n,t){n.exports=e},function(e,n,t){"use strict";t.r(n),t.d(n,"asyncDecorator",(function(){return u})),t.d(n,"inheritAsyncDecorator",(function(){return a})),t.d(n,"isReady",(function(){return c})),t.d(n,"History",(function(){return d}));var r=t(0);function o(e,n,t,r,o,i,u){try{var a=e[i](u),c=a.value}catch(e){return void t(e)}a.done?n(c):Promise.resolve(c).then(r,o)}function i(e){return function(){var n=this,t=arguments;return new Promise((function(r,i){var u=e.apply(n,t);function a(e){o(u,r,i,a,c,"next",e)}function c(e){o(u,r,i,a,c,"throw",e)}a(void 0)}))}}var u=function(e,n){var t,o={isReady:new Promise((function(e){t=e})),get:Object(r.lazy)((function(){return Promise.resolve(n()).then((function(e){return setTimeout(i(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t(!0);case 2:o.isReady=!0;case 3:case"end":return e.stop()}}),e)}))),0),e}))}))};return Object.defineProperty(e,"_dashprivate_isLazyComponentReady",{get:function(){return o.isReady}}),o.get},a=function(e,n){Object.defineProperty(e,"_dashprivate_isLazyComponentReady",{get:function(){return c(n)}})},c=function(e){return e&&e._dashprivate_isLazyComponentReady};function f(e,n){for(var t=0;t arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } var AppProvider = function AppProvider(_ref) { var hooks = _ref.hooks; var _useState = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(function () { return new _store__WEBPACK_IMPORTED_MODULE_3__["default"](); }), _useState2 = _slicedToArray(_useState, 1), store = _useState2[0].store; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(react_redux__WEBPACK_IMPORTED_MODULE_2__.Provider, { store: store }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_AppContainer_react__WEBPACK_IMPORTED_MODULE_4__["default"], { hooks: hooks })); }; AppProvider.propTypes = { hooks: prop_types__WEBPACK_IMPORTED_MODULE_0___default().shape({ layout_pre: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func), layout_post: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func), request_pre: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func), request_post: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func), callback_resolved: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func), request_refresh_jwt: (prop_types__WEBPACK_IMPORTED_MODULE_0___default().func) }) }; AppProvider.defaultProps = { hooks: { layout_pre: null, layout_post: null, request_pre: null, request_post: null, callback_resolved: null, request_refresh_jwt: null } }; /* harmony default export */ __webpack_exports__["default"] = (AppProvider); /***/ }), /***/ "./src/StoreObserver.ts": /*!******************************!*\ !*** ./src/StoreObserver.ts ***! \******************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ StoreObserver; } /* harmony export */ }); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js"); function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } var StoreObserver = /*#__PURE__*/_createClass(function StoreObserver(_store) { var _this = this; _classCallCheck(this, StoreObserver); _defineProperty(this, "_store", void 0); _defineProperty(this, "_unsubscribe", void 0); _defineProperty(this, "_observers", []); _defineProperty(this, "observe", function (observer, inputs) { if (typeof observer === 'function') { if (!Array.isArray(inputs)) { throw new Error('inputs must be an array'); } _this.add(observer, inputs); return function () { return _this.remove(observer); }; } _this.add(observer.observer, observer.inputs); return function () { return _this.remove(observer.observer); }; }); _defineProperty(this, "setStore", function (store) { _this.__finalize__(); _this.__init__(store); }); _defineProperty(this, "__finalize__", function () { var _this$_unsubscribe; return (_this$_unsubscribe = _this._unsubscribe) === null || _this$_unsubscribe === void 0 ? void 0 : _this$_unsubscribe.call(_this); }); _defineProperty(this, "__init__", function (store) { _this._store = store; if (store) { _this._unsubscribe = store.subscribe(_this.notify); } _this._observers.forEach(function (o) { o.lastState = null; }); }); _defineProperty(this, "add", function (observer, inputs) { return _this._observers.push({ inputPaths: (0,ramda__WEBPACK_IMPORTED_MODULE_0__.map)(function (p) { return p.split('.'); }, inputs), lastState: null, observer, triggered: false }); }); _defineProperty(this, "notify", function () { var store = _this._store; if (!store) { return; } var state = store.getState(); var triggered = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.filter)(function (o) { return !o.triggered && (0,ramda__WEBPACK_IMPORTED_MODULE_0__.any)(function (i) { return (0,ramda__WEBPACK_IMPORTED_MODULE_0__.path)(i, state) !== (0,ramda__WEBPACK_IMPORTED_MODULE_0__.path)(i, o.lastState); }, o.inputPaths); }, _this._observers); triggered.forEach(function (o) { o.triggered = true; }); triggered.forEach(function (o) { o.lastState = store.getState(); o.observer(store); o.triggered = false; }); }); _defineProperty(this, "remove", function (observer) { return _this._observers.splice(_this._observers.findIndex(function (o) { return observer === o.observer; }, _this._observers), 1); }); this.__init__(_store); }); /***/ }), /***/ "./src/actions/callbacks.ts": /*!**********************************!*\ !*** ./src/actions/callbacks.ts ***! \**********************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ addBlockedCallbacks: function() { return /* binding */ addBlockedCallbacks; }, /* harmony export */ addCompletedCallbacks: function() { return /* binding */ addCompletedCallbacks; }, /* harmony export */ addExecutedCallbacks: function() { return /* binding */ addExecutedCallbacks; }, /* harmony export */ addExecutingCallbacks: function() { return /* binding */ addExecutingCallbacks; }, /* harmony export */ addPrioritizedCallbacks: function() { return /* binding */ addPrioritizedCallbacks; }, /* harmony export */ addRequestedCallbacks: function() { return /* binding */ addRequestedCallbacks; }, /* harmony export */ addStoredCallbacks: function() { return /* binding */ addStoredCallbacks; }, /* harmony export */ addWatchedCallbacks: function() { return /* binding */ addWatchedCallbacks; }, /* harmony export */ aggregateCallbacks: function() { return /* binding */ aggregateCallbacks; }, /* harmony export */ executeCallback: function() { return /* binding */ executeCallback; }, /* harmony export */ removeBlockedCallbacks: function() { return /* binding */ removeBlockedCallbacks; }, /* harmony export */ removeExecutedCallbacks: function() { return /* binding */ removeExecutedCallbacks; }, /* harmony export */ removeExecutingCallbacks: function() { return /* binding */ removeExecutingCallbacks; }, /* harmony export */ removePrioritizedCallbacks: function() { return /* binding */ removePrioritizedCallbacks; }, /* harmony export */ removeRequestedCallbacks: function() { return /* binding */ removeRequestedCallbacks; }, /* harmony export */ removeStoredCallbacks: function() { return /* binding */ removeStoredCallbacks; }, /* harmony export */ removeWatchedCallbacks: function() { return /* binding */ removeWatchedCallbacks; } /* harmony export */ }); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js"); /* harmony import */ var _constants_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../constants/constants */ "./src/constants/constants.js"); /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./constants */ "./src/actions/constants.js"); /* harmony import */ var _reducers_callbacks__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../reducers/callbacks */ "./src/reducers/callbacks.ts"); /* harmony import */ var _dependencies__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./dependencies */ "./src/actions/dependencies.js"); /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils */ "./src/actions/utils.js"); /* harmony import */ var ___WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./index */ "./src/actions/index.js"); /* harmony import */ var redux_actions__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! redux-actions */ "./node_modules/redux-actions/es/createAction.js"); /* harmony import */ var _patch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./patch */ "./src/actions/patch.ts"); /* harmony import */ var _paths__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./paths */ "./src/actions/paths.js"); /* harmony import */ var _requestDependencies__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./requestDependencies */ "./src/actions/requestDependencies.ts"); function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } var addBlockedCallbacks = (0,redux_actions__WEBPACK_IMPORTED_MODULE_10__["default"])(_reducers_callbacks__WEBPACK_IMPORTED_MODULE_3__.CallbackActionType.AddBlocked); var addCompletedCallbacks = (0,redux_actions__WEBPACK_IMPORTED_MODULE_10__["default"])(_reducers_callbacks__WEBPACK_IMPORTED_MODULE_3__.CallbackAggregateActionType.AddCompleted); var addExecutedCallbacks = (0,redux_actions__WEBPACK_IMPORTED_MODULE_10__["default"])(_reducers_callbacks__WEBPACK_IMPORTED_MODULE_3__.CallbackActionType.AddExecuted); var addExecutingCallbacks = (0,redux_actions__WEBPACK_IMPORTED_MODULE_10__["default"])(_reducers_callbacks__WEBPACK_IMPORTED_MODULE_3__.CallbackActionType.AddExecuting); var addPrioritizedCallbacks = (0,redux_actions__WEBPACK_IMPORTED_MODULE_10__["default"])(_reducers_callbacks__WEBPACK_IMPORTED_MODULE_3__.CallbackActionType.AddPrioritized); var addRequestedCallbacks = (0,redux_actions__WEBPACK_IMPORTED_MODULE_10__["default"])(_reducers_callbacks__WEBPACK_IMPORTED_MODULE_3__.CallbackActionType.AddRequested); var addStoredCallbacks = (0,redux_actions__WEBPACK_IMPORTED_MODULE_10__["default"])(_reducers_callbacks__WEBPACK_IMPORTED_MODULE_3__.CallbackActionType.AddStored); var addWatchedCallbacks = (0,redux_actions__WEBPACK_IMPORTED_MODULE_10__["default"])(_reducers_callbacks__WEBPACK_IMPORTED_MODULE_3__.CallbackActionType.AddWatched); var removeExecutedCallbacks = (0,redux_actions__WEBPACK_IMPORTED_MODULE_10__["default"])(_reducers_callbacks__WEBPACK_IMPORTED_MODULE_3__.CallbackActionType.RemoveExecuted); var removeBlockedCallbacks = (0,redux_actions__WEBPACK_IMPORTED_MODULE_10__["default"])(_reducers_callbacks__WEBPACK_IMPORTED_MODULE_3__.CallbackActionType.RemoveBlocked); var removeExecutingCallbacks = (0,redux_actions__WEBPACK_IMPORTED_MODULE_10__["default"])(_reducers_callbacks__WEBPACK_IMPORTED_MODULE_3__.CallbackActionType.RemoveExecuting); var removePrioritizedCallbacks = (0,redux_actions__WEBPACK_IMPORTED_MODULE_10__["default"])(_reducers_callbacks__WEBPACK_IMPORTED_MODULE_3__.CallbackActionType.RemovePrioritized); var removeRequestedCallbacks = (0,redux_actions__WEBPACK_IMPORTED_MODULE_10__["default"])(_reducers_callbacks__WEBPACK_IMPORTED_MODULE_3__.CallbackActionType.RemoveRequested); var removeStoredCallbacks = (0,redux_actions__WEBPACK_IMPORTED_MODULE_10__["default"])(_reducers_callbacks__WEBPACK_IMPORTED_MODULE_3__.CallbackActionType.RemoveStored); var removeWatchedCallbacks = (0,redux_actions__WEBPACK_IMPORTED_MODULE_10__["default"])(_reducers_callbacks__WEBPACK_IMPORTED_MODULE_3__.CallbackActionType.RemoveWatched); var aggregateCallbacks = (0,redux_actions__WEBPACK_IMPORTED_MODULE_10__["default"])(_reducers_callbacks__WEBPACK_IMPORTED_MODULE_3__.CallbackAggregateActionType.Aggregate); var updateResourceUsage = (0,redux_actions__WEBPACK_IMPORTED_MODULE_10__["default"])('UPDATE_RESOURCE_USAGE'); var addCallbackJob = (0,redux_actions__WEBPACK_IMPORTED_MODULE_10__["default"])('ADD_CALLBACK_JOB'); var removeCallbackJob = (0,redux_actions__WEBPACK_IMPORTED_MODULE_10__["default"])('REMOVE_CALLBACK_JOB'); var setCallbackJobOutdated = (0,redux_actions__WEBPACK_IMPORTED_MODULE_10__["default"])('CALLBACK_JOB_OUTDATED'); function unwrapIfNotMulti(paths, idProps, spec, anyVals, depType) { var msg = ''; if ((0,_dependencies__WEBPACK_IMPORTED_MODULE_4__.isMultiValued)(spec)) { return [idProps, msg]; } if (idProps.length !== 1) { if (!idProps.length) { var isStr = typeof spec.id === 'string'; msg = 'A nonexistent object was used in an `' + depType + '` of a Dash callback. The id of this object is ' + (isStr ? '`' + spec.id + '`' : JSON.stringify(spec.id) + (anyVals ? ' with MATCH values ' + anyVals : '')) + ' and the property is `' + spec.property + (isStr ? '`. The string ids in the current layout are: [' + (0,ramda__WEBPACK_IMPORTED_MODULE_0__.keys)(paths.strs).join(', ') + ']' : '`. The wildcard ids currently available are logged above.'); } else { msg = 'Multiple objects were found for an `' + depType + '` of a callback that only takes one value. The id spec is ' + JSON.stringify(spec.id) + (anyVals ? ' with MATCH values ' + anyVals : '') + ' and the property is `' + spec.property + '`. The objects we found are: ' + JSON.stringify((0,ramda__WEBPACK_IMPORTED_MODULE_0__.map)((0,ramda__WEBPACK_IMPORTED_MODULE_0__.pick)(['id', 'property']), idProps)); } } return [idProps[0], msg]; } function fillVals(paths, layout, cb, specs, depType) { var allowAllMissing = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false; var getter = depType === 'Input' ? cb.getInputs : cb.getState; var errors = []; var emptyMultiValues = 0; var inputVals = getter(paths).map(function (inputList, i) { var _unwrapIfNotMulti = unwrapIfNotMulti(paths, inputList.map(function (_ref) { var id = _ref.id, property = _ref.property, path_ = _ref.path; return { id, property, value: (0,ramda__WEBPACK_IMPORTED_MODULE_0__.path)([].concat(_toConsumableArray(path_), ['props', property]), layout) }; }), specs[i], cb.anyVals, depType), _unwrapIfNotMulti2 = _slicedToArray(_unwrapIfNotMulti, 2), inputs = _unwrapIfNotMulti2[0], inputError = _unwrapIfNotMulti2[1]; if ((0,_dependencies__WEBPACK_IMPORTED_MODULE_4__.isMultiValued)(specs[i]) && !inputs.length) { emptyMultiValues++; } if (inputError) { errors.push(inputError); } return inputs; }); if (errors.length) { if (allowAllMissing && errors.length + emptyMultiValues === inputVals.length) { // We have at least one non-multivalued input, but all simple and // multi-valued inputs are missing. // (if all inputs are multivalued and all missing we still return // them as normal, and fire the callback.) return null; } // If we get here we have some missing and some present inputs. // Or all missing in a context that doesn't allow this. // That's a real problem, so throw the first message as an error. refErr(errors, paths); } return inputVals; } function refErr(errors, paths) { var err = errors[0]; if (err.indexOf('logged above') !== -1) { // Wildcard reference errors mention a list of wildcard specs logged // TODO: unwrapped list of wildcard ids? // eslint-disable-next-line no-console console.error(paths.objs); } throw new ReferenceError(err); } var getVals = function getVals(input) { return Array.isArray(input) ? (0,ramda__WEBPACK_IMPORTED_MODULE_0__.pluck)('value', input) : input.value; }; var zipIfArray = function zipIfArray(a, b) { return Array.isArray(a) ? (0,ramda__WEBPACK_IMPORTED_MODULE_0__.zip)(a, b) : [[a, b]]; }; function cleanOutputProp(property) { return property.split('@')[0]; } function handleClientside(_x, _x2, _x3, _x4) { return _handleClientside.apply(this, arguments); } function _handleClientside() { _handleClientside = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(dispatch, clientside_function, config, payload) { var dc, inputs, outputs, state, requestTime, inputDict, stateDict, result, status, _dc$namespace, _returnValue, namespace, function_name, args, returnValue, totalTime, resources; return _regeneratorRuntime().wrap(function _callee2$(_context3) { while (1) switch (_context3.prev = _context3.next) { case 0: dc = window.dash_clientside = window.dash_clientside || {}; if (!dc.no_update) { Object.defineProperty(dc, 'no_update', { value: { description: 'Return to prevent updating an Output.' }, writable: false }); Object.defineProperty(dc, 'PreventUpdate', { value: { description: 'Throw to prevent updating all Outputs.' }, writable: false }); } inputs = payload.inputs, outputs = payload.outputs, state = payload.state; requestTime = Date.now(); inputDict = inputsToDict(inputs); stateDict = inputsToDict(state); result = {}; status = _constants_constants__WEBPACK_IMPORTED_MODULE_1__.STATUS.OK; _context3.prev = 8; namespace = clientside_function.namespace, function_name = clientside_function.function_name; args = inputs.map(getVals); if (state) { args = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.concat)(args, state.map(getVals)); } // setup callback context dc.callback_context = {}; dc.callback_context.triggered = payload.changedPropIds.map(function (prop_id) { return { prop_id: prop_id, value: inputDict[prop_id] }; }); dc.callback_context.inputs_list = inputs; dc.callback_context.inputs = inputDict; dc.callback_context.states_list = state; dc.callback_context.states = stateDict; returnValue = (_dc$namespace = dc[namespace])[function_name].apply(_dc$namespace, _toConsumableArray(args)); delete dc.callback_context; if (!(typeof ((_returnValue = returnValue) === null || _returnValue === void 0 ? void 0 : _returnValue.then) === 'function')) { _context3.next = 24; break; } _context3.next = 23; return returnValue; case 23: returnValue = _context3.sent; case 24: zipIfArray(outputs, returnValue).forEach(function (_ref10) { var _ref11 = _slicedToArray(_ref10, 2), outi = _ref11[0], reti = _ref11[1]; zipIfArray(outi, reti).forEach(function (_ref12) { var _ref13 = _slicedToArray(_ref12, 2), outij = _ref13[0], retij = _ref13[1]; var id = outij.id, property = outij.property; var idStr = (0,_dependencies__WEBPACK_IMPORTED_MODULE_4__.stringifyId)(id); var dataForId = result[idStr] = result[idStr] || {}; if (retij !== dc.no_update) { dataForId[cleanOutputProp(property)] = retij; } }); }); _context3.next = 35; break; case 27: _context3.prev = 27; _context3.t0 = _context3["catch"](8); if (!(_context3.t0 === dc.PreventUpdate)) { _context3.next = 33; break; } status = _constants_constants__WEBPACK_IMPORTED_MODULE_1__.STATUS.PREVENT_UPDATE; _context3.next = 35; break; case 33: status = _constants_constants__WEBPACK_IMPORTED_MODULE_1__.STATUS.CLIENTSIDE_ERROR; throw _context3.t0; case 35: _context3.prev = 35; delete dc.callback_context; // Setting server = client forces network = 0 totalTime = Date.now() - requestTime; resources = { __dash_server: totalTime, __dash_client: totalTime, __dash_upload: 0, __dash_download: 0 }; if (config.ui) { dispatch(updateResourceUsage({ id: payload.output, usage: resources, status, result, inputs, state })); } return _context3.finish(35); case 41: return _context3.abrupt("return", result); case 42: case "end": return _context3.stop(); } }, _callee2, null, [[8, 27, 35, 41]]); })); return _handleClientside.apply(this, arguments); } function sideUpdate(outputs, dispatch, paths) { (0,ramda__WEBPACK_IMPORTED_MODULE_0__.toPairs)(outputs).forEach(function (_ref2) { var _ref3 = _slicedToArray(_ref2, 2), id = _ref3[0], value = _ref3[1]; var _id$split = id.split('.'), _id$split2 = _slicedToArray(_id$split, 2), componentId = _id$split2[0], propName = _id$split2[1]; var componentPath = paths.strs[componentId]; dispatch((0,___WEBPACK_IMPORTED_MODULE_6__.updateProps)({ props: { [propName]: value }, itempath: componentPath })); dispatch((0,___WEBPACK_IMPORTED_MODULE_6__.notifyObservers)({ id: componentId, props: { [propName]: value } })); }); } function handleServerside(dispatch, hooks, config, payload, paths, long, additionalArgs, getState, output) { if (hooks.request_pre) { hooks.request_pre(payload); } var requestTime = Date.now(); var body = JSON.stringify(payload); var cacheKey; var job; var runningOff; var progressDefault; var moreArgs = additionalArgs; var fetchCallback = function fetchCallback() { var headers = (0,___WEBPACK_IMPORTED_MODULE_6__.getCSRFHeader)(); var url = "".concat((0,_utils__WEBPACK_IMPORTED_MODULE_5__.urlBase)(config), "_dash-update-component"); var addArg = function addArg(name, value) { var delim = '?'; if (url.includes('?')) { delim = '&'; } url = "".concat(url).concat(delim).concat(name, "=").concat(value); }; if (cacheKey) { addArg('cacheKey', cacheKey); } if (job) { addArg('job', job); } if (moreArgs) { moreArgs.forEach(function (_ref4) { var _ref5 = _slicedToArray(_ref4, 2), key = _ref5[0], value = _ref5[1]; return addArg(key, value); }); moreArgs = moreArgs.filter(function (_ref6) { var _ref7 = _slicedToArray(_ref6, 3), _ = _ref7[0], __ = _ref7[1], single = _ref7[2]; return !single; }); } return fetch(url, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.mergeDeepRight)(config.fetch, { method: 'POST', headers, body })); }; return new Promise(function (resolve, reject) { var handleOutput = function handleOutput(res) { var status = res.status; if (job) { var callbackJob = getState().callbackJobs[job]; if (callbackJob !== null && callbackJob !== void 0 && callbackJob.outdated) { dispatch(removeCallbackJob({ jobId: job })); return resolve({}); } } function recordProfile(result) { if (config.ui) { // Callback profiling - only relevant if we're showing the debug ui var resources = { __dash_server: 0, __dash_client: Date.now() - requestTime, __dash_upload: body.length, __dash_download: Number(res.headers.get('Content-Length')) }; var timingHeaders = res.headers.get('Server-Timing') || ''; timingHeaders.split(',').forEach(function (header) { var name = header.split(';')[0]; var dur = header.match(/;dur=[0-9.]+/); if (dur) { resources[name] = Number(dur[0].slice(5)); } }); dispatch(updateResourceUsage({ id: payload.output, usage: resources, status, result, inputs: payload.inputs, state: payload.state })); } } var finishLine = function finishLine(data) { var multi = data.multi, response = data.response; if (hooks.request_post) { hooks.request_post(payload, response); } var result; if (multi) { result = response; } else { var _output = payload.output; var id = _output.substr(0, _output.lastIndexOf('.')); result = { [id]: response.props }; } recordProfile(result); resolve(result); }; var completeJob = function completeJob() { if (job) { dispatch(removeCallbackJob({ jobId: job })); } if (runningOff) { sideUpdate(runningOff, dispatch, paths); } if (progressDefault) { sideUpdate(progressDefault, dispatch, paths); } }; if (status === _constants_constants__WEBPACK_IMPORTED_MODULE_1__.STATUS.OK) { res.json().then(function (data) { if (!cacheKey && data.cacheKey) { cacheKey = data.cacheKey; } if (!job && data.job) { var jobInfo = { jobId: data.job, cacheKey: data.cacheKey, cancelInputs: data.cancel, progressDefault: data.progressDefault, output }; dispatch(addCallbackJob(jobInfo)); job = data.job; } if (data.progress) { sideUpdate(data.progress, dispatch, paths); } if (data.running) { sideUpdate(data.running, dispatch, paths); } if (!runningOff && data.runningOff) { runningOff = data.runningOff; } if (!progressDefault && data.progressDefault) { progressDefault = data.progressDefault; } if (!long || data.response !== undefined) { completeJob(); finishLine(data); } else { // Poll chain. setTimeout(handle, long.interval !== undefined ? long.interval : 500); } }); } else if (status === _constants_constants__WEBPACK_IMPORTED_MODULE_1__.STATUS.PREVENT_UPDATE) { completeJob(); recordProfile({}); resolve({}); } else { completeJob(); reject(res); } }; var handleError = function handleError() { if (config.ui) { dispatch(updateResourceUsage({ id: payload.output, status: _constants_constants__WEBPACK_IMPORTED_MODULE_1__.STATUS.NO_RESPONSE, result: {}, inputs: payload.inputs, state: payload.state })); } reject(new Error('Callback failed: the server did not respond.')); }; var handle = function handle() { fetchCallback().then(handleOutput, handleError); }; handle(); }); } function inputsToDict(inputs_list) { // Ported directly from _utils.py, inputs_to_dict // takes an array of inputs (some inputs may be an array) // returns an Object (map): // keys of the form `id.property` or `{"id": 0}.property` // values contain the property value if (!inputs_list) { return {}; } var inputs = {}; for (var i = 0; i < inputs_list.length; i++) { if (Array.isArray(inputs_list[i])) { var inputsi = inputs_list[i]; for (var ii = 0; ii < inputsi.length; ii++) { var _inputsi$ii$value; var id_str = "".concat((0,_dependencies__WEBPACK_IMPORTED_MODULE_4__.stringifyId)(inputsi[ii].id), ".").concat(inputsi[ii].property); inputs[id_str] = (_inputsi$ii$value = inputsi[ii].value) !== null && _inputsi$ii$value !== void 0 ? _inputsi$ii$value : null; } } else { var _inputs_list$i$value; var _id_str = "".concat((0,_dependencies__WEBPACK_IMPORTED_MODULE_4__.stringifyId)(inputs_list[i].id), ".").concat(inputs_list[i].property); inputs[_id_str] = (_inputs_list$i$value = inputs_list[i].value) !== null && _inputs_list$i$value !== void 0 ? _inputs_list$i$value : null; } } return inputs; } function executeCallback(cb, config, hooks, paths, layout, _ref8, dispatch, getState) { var allOutputs = _ref8.allOutputs; var _cb$callback = cb.callback, output = _cb$callback.output, inputs = _cb$callback.inputs, state = _cb$callback.state, clientside_function = _cb$callback.clientside_function, long = _cb$callback.long, dynamic_creator = _cb$callback.dynamic_creator; try { var inVals = fillVals(paths, layout, cb, inputs, 'Input', true); /* Prevent callback if there's no inputs */ if (inVals === null) { return _objectSpread(_objectSpread({}, cb), {}, { executionPromise: null }); } var outputs = []; var outputErrors = []; allOutputs.forEach(function (out, i) { var _unwrapIfNotMulti3 = unwrapIfNotMulti(paths, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.map)((0,ramda__WEBPACK_IMPORTED_MODULE_0__.pick)(['id', 'property']), out), cb.callback.outputs[i], cb.anyVals, 'Output'), _unwrapIfNotMulti4 = _slicedToArray(_unwrapIfNotMulti3, 2), outi = _unwrapIfNotMulti4[0], erri = _unwrapIfNotMulti4[1]; outputs.push(outi); if (erri) { outputErrors.push(erri); } }); if (outputErrors.length) { if ((0,ramda__WEBPACK_IMPORTED_MODULE_0__.flatten)(inVals).length) { refErr(outputErrors, paths); } // This case is all-empty multivalued wildcard inputs, // which we would normally fire the callback for, except // some outputs are missing. So instead we treat it like // regular missing inputs and just silently prevent it. return _objectSpread(_objectSpread({}, cb), {}, { executionPromise: null }); } var __execute = /*#__PURE__*/function () { var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() { var payload, data, newConfig, newHeaders, lastError, additionalArgs, _loop, _ret, retry; return _regeneratorRuntime().wrap(function _callee$(_context2) { while (1) switch (_context2.prev = _context2.next) { case 0: _context2.prev = 0; payload = { output, outputs: (0,_dependencies__WEBPACK_IMPORTED_MODULE_4__.isMultiOutputProp)(output) ? outputs : outputs[0], inputs: inVals, changedPropIds: (0,ramda__WEBPACK_IMPORTED_MODULE_0__.keys)(cb.changedPropIds), state: cb.callback.state.length ? fillVals(paths, layout, cb, state, 'State') : undefined }; if (!clientside_function) { _context2.next = 13; break; } _context2.prev = 3; _context2.next = 6; return handleClientside(dispatch, clientside_function, config, payload); case 6: data = _context2.sent; return _context2.abrupt("return", { data, payload }); case 10: _context2.prev = 10; _context2.t0 = _context2["catch"](3); return _context2.abrupt("return", { error: _context2.t0, payload }); case 13: newConfig = config; newHeaders = null; additionalArgs = []; (0,ramda__WEBPACK_IMPORTED_MODULE_0__.values)(getState().callbackJobs).forEach(function (job) { if (cb.callback.output === job.output) { // Terminate the old jobs that are not completed // set as outdated for the callback promise to // resolve and remove after. additionalArgs.push(['oldJob', job.jobId, true]); dispatch(setCallbackJobOutdated({ jobId: job.jobId })); } if (!job.cancelInputs) { return; } var inter = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.intersection)(job.cancelInputs, cb.callback.inputs); if (inter.length) { additionalArgs.push(['cancelJob', job.jobId]); if (job.progressDefault) { sideUpdate(job.progressDefault, dispatch, paths); } } }); _loop = /*#__PURE__*/_regeneratorRuntime().mark(function _loop() { var _data, currentLayout, body, oldJwt, newJwt; return _regeneratorRuntime().wrap(function _loop$(_context) { while (1) switch (_context.prev = _context.next) { case 0: _context.prev = 0; _context.next = 3; return handleServerside(dispatch, hooks, newConfig, payload, paths, long, additionalArgs.length ? additionalArgs : undefined, getState, cb.callback.output); case 3: _data = _context.sent; if (newHeaders) { dispatch((0,___WEBPACK_IMPORTED_MODULE_6__.addHttpHeaders)(newHeaders)); } // Layout may have changed. currentLayout = getState().layout; (0,ramda__WEBPACK_IMPORTED_MODULE_0__.flatten)(outputs).forEach(function (out) { var propName = cleanOutputProp(out.property); var outputPath = (0,_paths__WEBPACK_IMPORTED_MODULE_8__.getPath)(paths, out.id); var previousValue = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.path)(outputPath.concat(['props', propName]), currentLayout); var dataPath = [(0,_dependencies__WEBPACK_IMPORTED_MODULE_4__.stringifyId)(out.id), propName]; var outputValue = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.path)(dataPath, _data); if ((0,_patch__WEBPACK_IMPORTED_MODULE_7__.isPatch)(outputValue)) { if (previousValue === undefined) { throw new Error('Cannot patch undefined'); } _data = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.assocPath)(dataPath, (0,_patch__WEBPACK_IMPORTED_MODULE_7__.handlePatch)(previousValue, outputValue), _data); } }); if (dynamic_creator) { setTimeout(function () { return dispatch((0,_requestDependencies__WEBPACK_IMPORTED_MODULE_9__.requestDependencies)()); }, 0); } return _context.abrupt("return", { v: { data: _data, payload } }); case 11: _context.prev = 11; _context.t0 = _context["catch"](0); lastError = _context.t0; if (!(retry <= _constants__WEBPACK_IMPORTED_MODULE_2__.MAX_AUTH_RETRIES && (_context.t0.status === _constants_constants__WEBPACK_IMPORTED_MODULE_1__.STATUS.UNAUTHORIZED || _context.t0.status === _constants_constants__WEBPACK_IMPORTED_MODULE_1__.STATUS.BAD_REQUEST))) { _context.next = 29; break; } _context.next = 17; return _context.t0.text(); case 17: body = _context.sent; if (!body.includes(_constants_constants__WEBPACK_IMPORTED_MODULE_1__.JWT_EXPIRED_MESSAGE)) { _context.next = 29; break; } if (!(hooks.request_refresh_jwt !== null)) { _context.next = 29; break; } oldJwt = null; if (config.fetch.headers.Authorization) { oldJwt = config.fetch.headers.Authorization.substr('Bearer '.length); } _context.next = 24; return hooks.request_refresh_jwt(oldJwt); case 24: newJwt = _context.sent; if (!newJwt) { _context.next = 29; break; } newHeaders = { Authorization: "Bearer ".concat(newJwt) }; newConfig = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.mergeDeepRight)(config, { fetch: { headers: newHeaders } }); return _context.abrupt("return", 0); case 29: return _context.abrupt("return", 1); case 30: case "end": return _context.stop(); } }, _loop, null, [[0, 11]]); }); retry = 0; case 19: if (!(retry <= _constants__WEBPACK_IMPORTED_MODULE_2__.MAX_AUTH_RETRIES)) { _context2.next = 31; break; } return _context2.delegateYield(_loop(), "t1", 21); case 21: _ret = _context2.t1; if (!(_ret === 0)) { _context2.next = 24; break; } return _context2.abrupt("continue", 28); case 24: if (!(_ret === 1)) { _context2.next = 26; break; } return _context2.abrupt("break", 31); case 26: if (!_ret) { _context2.next = 28; break; } return _context2.abrupt("return", _ret.v); case 28: retry++; _context2.next = 19; break; case 31: return _context2.abrupt("return", { error: lastError, payload: null }); case 34: _context2.prev = 34; _context2.t2 = _context2["catch"](0); return _context2.abrupt("return", { error: _context2.t2, payload: null }); case 37: case "end": return _context2.stop(); } }, _callee, null, [[0, 34], [3, 10]]); })); return function __execute() { return _ref9.apply(this, arguments); }; }(); var newCb = _objectSpread(_objectSpread({}, cb), {}, { executionPromise: __execute() }); return newCb; } catch (error) { return _objectSpread(_objectSpread({}, cb), {}, { executionPromise: { error, payload: null } }); } } /***/ }), /***/ "./src/actions/dependencies_ts.ts": /*!****************************************!*\ !*** ./src/actions/dependencies_ts.ts ***! \****************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ DIRECT: function() { return /* binding */ DIRECT; }, /* harmony export */ INDIRECT: function() { return /* binding */ INDIRECT; }, /* harmony export */ combineIdAndProp: function() { return /* binding */ combineIdAndProp; }, /* harmony export */ getAllSubsequentOutputsForCallback: function() { return /* binding */ getAllSubsequentOutputsForCallback; }, /* harmony export */ getCallbacksByInput: function() { return /* binding */ getCallbacksByInput; }, /* harmony export */ getLayoutCallbacks: function() { return /* binding */ getLayoutCallbacks; }, /* harmony export */ getPriority: function() { return /* binding */ getPriority; }, /* harmony export */ getReadyCallbacks: function() { return /* binding */ getReadyCallbacks; }, /* harmony export */ getUniqueIdentifier: function() { return /* binding */ getUniqueIdentifier; }, /* harmony export */ includeObservers: function() { return /* binding */ includeObservers; }, /* harmony export */ makeResolvedCallback: function() { return /* binding */ makeResolvedCallback; }, /* harmony export */ mergeMax: function() { return /* binding */ mergeMax; }, /* harmony export */ pruneCallbacks: function() { return /* binding */ pruneCallbacks; }, /* harmony export */ resolveDeps: function() { return /* binding */ resolveDeps; } /* harmony export */ }); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js"); /* harmony import */ var _dependencies__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./dependencies */ "./src/actions/dependencies.js"); /* harmony import */ var _paths__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./paths */ "./src/actions/paths.js"); function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } var DIRECT = 2; var INDIRECT = 1; var mergeMax = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.mergeWith)(Math.max); var combineIdAndProp = function combineIdAndProp(_ref) { var id = _ref.id, property = _ref.property; return "".concat((0,_dependencies__WEBPACK_IMPORTED_MODULE_1__.stringifyId)(id), ".").concat(property); }; function getCallbacksByInput(graphs, paths, id, prop, changeType) { var withPriority = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true; var matches = []; var idAndProp = combineIdAndProp({ id, property: prop }); if (typeof id === 'string') { // standard id version var callbacks = (graphs.inputMap[id] || {})[prop]; if (!callbacks) { return []; } callbacks.forEach((0,_dependencies__WEBPACK_IMPORTED_MODULE_1__.addAllResolvedFromOutputs)(resolveDeps(), paths, matches)); } else { // wildcard version var _keys = Object.keys(id).sort(); var vals = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.props)(_keys, id); var keyStr = _keys.join(','); var patterns = (graphs.inputPatterns[keyStr] || {})[prop]; if (!patterns) { return []; } patterns.forEach(function (pattern) { if ((0,_dependencies__WEBPACK_IMPORTED_MODULE_1__.idMatch)(_keys, vals, pattern.values)) { pattern.callbacks.forEach((0,_dependencies__WEBPACK_IMPORTED_MODULE_1__.addAllResolvedFromOutputs)(resolveDeps(_keys, vals, pattern.values), paths, matches)); } }); } matches.forEach(function (match) { match.changedPropIds[idAndProp] = changeType || DIRECT; if (withPriority) { match.priority = getPriority(graphs, paths, match); } }); return matches; } /* * Builds a tree of all callbacks that can be triggered by the provided callback. * Uses the number of callbacks at each tree depth and the total depth of the tree * to create a sortable priority hash. */ function getPriority(graphs, paths, callback) { var callbacks = [callback]; var touchedOutputs = {}; var touchedCbIds = {}; var priority = []; while (callbacks.length) { callbacks = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.filter)(function (c) { var touched = touchedCbIds[c.resolvedId]; touchedCbIds[c.resolvedId] = true; return touched; }, callbacks); var outputs = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.filter)(function (o) { return !touchedOutputs[combineIdAndProp(o)]; }, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.flatten)((0,ramda__WEBPACK_IMPORTED_MODULE_0__.map)(function (cb) { return (0,ramda__WEBPACK_IMPORTED_MODULE_0__.flatten)(cb.getOutputs(paths)); }, callbacks))); outputs.forEach(function (o) { return touchedOutputs[combineIdAndProp(o)] = true; }); callbacks = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.flatten)((0,ramda__WEBPACK_IMPORTED_MODULE_0__.map)(function (_ref2) { var id = _ref2.id, property = _ref2.property; return getCallbacksByInput(graphs, paths, id, property, INDIRECT, false); }, outputs)); if (callbacks.length) { priority.push(callbacks.length); } } priority.unshift(priority.length); return (0,ramda__WEBPACK_IMPORTED_MODULE_0__.map)(function (i) { return Math.min(i, 35).toString(36); }, priority).join(''); } function getAllSubsequentOutputsForCallback(graphs, paths, callback) { var callbacks = [callback]; var touchedOutputs = {}; // this traverses the graph all the way to the end while (callbacks.length) { // don't add it if it already exists based on id and props var outputs = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.filter)(function (o) { return !touchedOutputs[combineIdAndProp(o)]; }, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.flatten)((0,ramda__WEBPACK_IMPORTED_MODULE_0__.map)(function (cb) { return (0,ramda__WEBPACK_IMPORTED_MODULE_0__.flatten)(cb.getOutputs(paths)); }, callbacks))); touchedOutputs = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.reduce)(function (touched, o) { return (0,ramda__WEBPACK_IMPORTED_MODULE_0__.assoc)(combineIdAndProp(o), true, touched); }, touchedOutputs, outputs); callbacks = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.flatten)((0,ramda__WEBPACK_IMPORTED_MODULE_0__.map)(function (_ref3) { var id = _ref3.id, property = _ref3.property; return getCallbacksByInput(graphs, paths, id, property, INDIRECT, false); }, outputs)); } return touchedOutputs; } var getReadyCallbacks = function getReadyCallbacks(paths, candidates) { var callbacks = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : candidates; var graphs = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; // Skip if there's no candidates if (!candidates.length) { return []; } // Find all outputs of all active callbacks var outputs = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.map)(combineIdAndProp, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.reduce)(function (o, cb) { return (0,ramda__WEBPACK_IMPORTED_MODULE_0__.concat)(o, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.flatten)(cb.getOutputs(paths))); }, [], callbacks)); // Make `outputs` hash table for faster access var outputsMap = {}; outputs.forEach(function (output) { return outputsMap[output] = true; }); // find all the outputs touched by activeCallbacks // remove this check if graph is accessible all the time if (Object.keys(graphs).length) { //not sure if graph will be accessible all the time var allTouchedOutputs = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.flatten)((0,ramda__WEBPACK_IMPORTED_MODULE_0__.map)(function (cb) { return getAllSubsequentOutputsForCallback(graphs, paths, cb); }, callbacks)); // overrrides the outputsMap, will duplicate callbacks filtered // this is only done to silence typescript errors if (allTouchedOutputs.length > 0) { outputsMap = Object.assign.apply(Object, [allTouchedOutputs[0]].concat(_toConsumableArray(allTouchedOutputs))); } } // Find `requested` callbacks that do not depend on a outstanding output (as either input or state) // Outputs which overlap an input do not count as an outstanding output return (0,ramda__WEBPACK_IMPORTED_MODULE_0__.filter)(function (cb) { return (0,ramda__WEBPACK_IMPORTED_MODULE_0__.all)(function (cbp) { return !outputsMap[combineIdAndProp(cbp)]; }, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.difference)((0,ramda__WEBPACK_IMPORTED_MODULE_0__.flatten)(cb.getInputs(paths)), (0,ramda__WEBPACK_IMPORTED_MODULE_0__.flatten)(cb.getOutputs(paths)))); }, candidates); }; var getLayoutCallbacks = function getLayoutCallbacks(graphs, paths, layout, options) { var exclusions = []; var callbacks = (0,_dependencies__WEBPACK_IMPORTED_MODULE_1__.getUnfilteredLayoutCallbacks)(graphs, paths, layout, options); /* Remove from the initial callbacks those that are left with only excluded inputs. Exclusion of inputs happens when: - an input is missing - an input in the initial callback chain depends only on excluded inputs Further exclusion might happen after callbacks return with: - PreventUpdate - no_update */ while (true) { // Find callbacks for which all inputs are missing or in the exclusions var _partition = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.partition)(function (_ref4) { var inputs = _ref4.callback.inputs, getInputs = _ref4.getInputs; return (0,ramda__WEBPACK_IMPORTED_MODULE_0__.all)(_dependencies__WEBPACK_IMPORTED_MODULE_1__.isMultiValued, inputs) || !(0,ramda__WEBPACK_IMPORTED_MODULE_0__.isEmpty)((0,ramda__WEBPACK_IMPORTED_MODULE_0__.difference)((0,ramda__WEBPACK_IMPORTED_MODULE_0__.map)(combineIdAndProp, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.flatten)(getInputs(paths))), exclusions)); }, callbacks), _partition2 = _slicedToArray(_partition, 2), included = _partition2[0], excluded = _partition2[1]; // If there's no additional exclusions, break loop - callbacks have been cleaned if (!excluded.length) { break; } callbacks = included; // update exclusions with all additional excluded outputs exclusions = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.concat)(exclusions, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.map)(combineIdAndProp, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.flatten)((0,ramda__WEBPACK_IMPORTED_MODULE_0__.map)(function (_ref5) { var getOutputs = _ref5.getOutputs; return getOutputs(paths); }, excluded)))); } if (options.filterRoot) { var rootId = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.path)(['props', 'id'], layout); if (rootId) { rootId = (0,_dependencies__WEBPACK_IMPORTED_MODULE_1__.stringifyId)(rootId); // Filter inputs that are not present in the response callbacks = callbacks.filter(function (cb) { return cb.callback.inputs.reduce(function (previous, input) { return previous || (0,_dependencies__WEBPACK_IMPORTED_MODULE_1__.stringifyId)(input.id) == rootId && options.filterRoot.includes(input.property); }, false); }); } } /* Return all callbacks with an `executionGroup` to allow group-processing */ var executionGroup = Math.random().toString(16); return (0,ramda__WEBPACK_IMPORTED_MODULE_0__.map)(function (cb) { return _objectSpread(_objectSpread({}, cb), {}, { executionGroup }); }, callbacks); }; var getUniqueIdentifier = function getUniqueIdentifier(_ref6) { var anyVals = _ref6.anyVals, _ref6$callback = _ref6.callback, inputs = _ref6$callback.inputs, outputs = _ref6$callback.outputs, state = _ref6$callback.state; return (0,ramda__WEBPACK_IMPORTED_MODULE_0__.concat)((0,ramda__WEBPACK_IMPORTED_MODULE_0__.map)(combineIdAndProp, [].concat(_toConsumableArray(inputs), _toConsumableArray(outputs), _toConsumableArray(state))), Array.isArray(anyVals) ? anyVals : anyVals === '' ? [] : [anyVals]).join(','); }; function includeObservers(id, properties, graphs, paths) { return (0,ramda__WEBPACK_IMPORTED_MODULE_0__.flatten)((0,ramda__WEBPACK_IMPORTED_MODULE_0__.map)(function (propName) { return getCallbacksByInput(graphs, paths, id, propName); }, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.keys)(properties))); } /* * Create a pending callback object. Includes the original callback definition, * its resolved ID (including the value of all MATCH wildcards), * accessors to find all inputs, outputs, and state involved in this * callback (lazy as not all users will want all of these). */ var makeResolvedCallback = function makeResolvedCallback(callback, resolve, anyVals) { return { callback, anyVals, resolvedId: callback.output + anyVals, getOutputs: function getOutputs(paths) { return callback.outputs.map(resolve(paths)); }, getInputs: function getInputs(paths) { return callback.inputs.map(resolve(paths)); }, getState: function getState(paths) { return callback.state.map(resolve(paths)); }, changedPropIds: {}, initialCall: false }; }; function pruneCallbacks(callbacks, paths) { var _partition3 = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.partition)(function (_ref7) { var getOutputs = _ref7.getOutputs, outputs = _ref7.callback.outputs; return (0,ramda__WEBPACK_IMPORTED_MODULE_0__.flatten)(getOutputs(paths)).length === outputs.length; }, callbacks), _partition4 = _slicedToArray(_partition3, 2), removed = _partition4[1]; var _partition5 = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.partition)(function (_ref8) { var getOutputs = _ref8.getOutputs; return !(0,ramda__WEBPACK_IMPORTED_MODULE_0__.flatten)(getOutputs(paths)).length; }, removed), _partition6 = _slicedToArray(_partition5, 2), modified = _partition6[1]; var added = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.map)(function (cb) { return (0,ramda__WEBPACK_IMPORTED_MODULE_0__.assoc)('changedPropIds', (0,ramda__WEBPACK_IMPORTED_MODULE_0__.pickBy)(function (_, propId) { return (0,_paths__WEBPACK_IMPORTED_MODULE_2__.getPath)(paths, (0,_dependencies__WEBPACK_IMPORTED_MODULE_1__.splitIdAndProp)(propId).id); }, cb.changedPropIds), cb); }, modified); return { added, removed }; } function resolveDeps(refKeys, refVals, refPatternVals) { return function (paths) { return function (_ref9) { var idPattern = _ref9.id, property = _ref9.property; if (typeof idPattern === 'string') { var _path = (0,_paths__WEBPACK_IMPORTED_MODULE_2__.getPath)(paths, idPattern); return _path ? [{ id: idPattern, property, path: _path }] : []; } var _keys = Object.keys(idPattern).sort(); var patternVals = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.props)(_keys, idPattern); var keyStr = _keys.join(','); var keyPaths = paths.objs[keyStr]; if (!keyPaths) { return []; } var result = []; keyPaths.forEach(function (_ref10) { var vals = _ref10.values, path = _ref10.path; if ((0,_dependencies__WEBPACK_IMPORTED_MODULE_1__.idMatch)(_keys, vals, patternVals, refKeys, refVals, refPatternVals)) { result.push({ id: (0,ramda__WEBPACK_IMPORTED_MODULE_0__.zipObj)(_keys, vals), property, path }); } }); return result; }; }; } /***/ }), /***/ "./src/actions/isLoading.ts": /*!**********************************!*\ !*** ./src/actions/isLoading.ts ***! \**********************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ setIsLoading: function() { return /* binding */ setIsLoading; } /* harmony export */ }); /* harmony import */ var redux_actions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! redux-actions */ "./node_modules/redux-actions/es/createAction.js"); /* harmony import */ var _reducers_isLoading__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../reducers/isLoading */ "./src/reducers/isLoading.ts"); var setIsLoading = (0,redux_actions__WEBPACK_IMPORTED_MODULE_1__["default"])(_reducers_isLoading__WEBPACK_IMPORTED_MODULE_0__.IsLoadingActionType.Set); /***/ }), /***/ "./src/actions/loadingMap.ts": /*!***********************************!*\ !*** ./src/actions/loadingMap.ts ***! \***********************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ setLoadingMap: function() { return /* binding */ setLoadingMap; } /* harmony export */ }); /* harmony import */ var redux_actions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! redux-actions */ "./node_modules/redux-actions/es/createAction.js"); /* harmony import */ var _reducers_loadingMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../reducers/loadingMap */ "./src/reducers/loadingMap.ts"); var setLoadingMap = (0,redux_actions__WEBPACK_IMPORTED_MODULE_1__["default"])(_reducers_loadingMap__WEBPACK_IMPORTED_MODULE_0__.LoadingMapActionType.Set); /***/ }), /***/ "./src/actions/patch.ts": /*!******************************!*\ !*** ./src/actions/patch.ts ***! \******************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ handlePatch: function() { return /* binding */ handlePatch; }, /* harmony export */ isPatch: function() { return /* binding */ isPatch; } /* harmony export */ }); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js"); function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } function isPatch(obj) { return (0,ramda__WEBPACK_IMPORTED_MODULE_0__.has)('__dash_patch_update', obj); } function getLocationIndex(value, previous) { if ((0,ramda__WEBPACK_IMPORTED_MODULE_0__.is)(Number, value) && value < 0) { return previous.length + value; } return value; } function getLocationPath(location, obj) { var current = []; for (var i = 0; i < location.length; i++) { var value = getLocationIndex(location[i], (0,ramda__WEBPACK_IMPORTED_MODULE_0__.path)(current, obj)); current.push(value); } return current; } var patchHandlers = { Assign: function Assign(previous, patchOperation) { var params = patchOperation.params, location = patchOperation.location; return (0,ramda__WEBPACK_IMPORTED_MODULE_0__.assocPath)(location, params.value, previous); }, Merge: function Merge(previous, patchOperation) { var prev = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.path)(patchOperation.location, previous); return (0,ramda__WEBPACK_IMPORTED_MODULE_0__.assocPath)(patchOperation.location, _objectSpread(_objectSpread({}, prev), patchOperation.params.value), previous); }, Extend: function Extend(previous, patchOperation) { var prev = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.path)(patchOperation.location, previous); return (0,ramda__WEBPACK_IMPORTED_MODULE_0__.assocPath)(patchOperation.location, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.concat)(prev, patchOperation.params.value), previous); }, Delete: function Delete(previous, patchOperation) { return (0,ramda__WEBPACK_IMPORTED_MODULE_0__.dissocPath)(patchOperation.location, previous); }, Insert: function Insert(previous, patchOperation) { var prev = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.path)(patchOperation.location, previous); return (0,ramda__WEBPACK_IMPORTED_MODULE_0__.assocPath)(patchOperation.location, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.insert)(getLocationIndex(patchOperation.params.index, prev), patchOperation.params.value, prev), previous); }, Append: function Append(previous, patchOperation) { var prev = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.path)(patchOperation.location, previous); return (0,ramda__WEBPACK_IMPORTED_MODULE_0__.assocPath)(patchOperation.location, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.append)(patchOperation.params.value, prev), previous); }, Prepend: function Prepend(previous, patchOperation) { var prev = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.path)(patchOperation.location, previous); return (0,ramda__WEBPACK_IMPORTED_MODULE_0__.assocPath)(patchOperation.location, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.prepend)(patchOperation.params.value, prev), previous); }, Add: function Add(previous, patchOperation) { var prev = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.path)(patchOperation.location, previous); return (0,ramda__WEBPACK_IMPORTED_MODULE_0__.assocPath)(patchOperation.location, prev + patchOperation.params.value, previous); }, Sub: function Sub(previous, patchOperation) { var prev = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.path)(patchOperation.location, previous); return (0,ramda__WEBPACK_IMPORTED_MODULE_0__.assocPath)(patchOperation.location, prev - patchOperation.params.value, previous); }, Mul: function Mul(previous, patchOperation) { var prev = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.path)(patchOperation.location, previous); return (0,ramda__WEBPACK_IMPORTED_MODULE_0__.assocPath)(patchOperation.location, prev * patchOperation.params.value, previous); }, Div: function Div(previous, patchOperation) { var prev = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.path)(patchOperation.location, previous); return (0,ramda__WEBPACK_IMPORTED_MODULE_0__.assocPath)(patchOperation.location, prev / patchOperation.params.value, previous); }, Clear: function Clear(previous, patchOperation) { var prev = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.path)(patchOperation.location, previous); return (0,ramda__WEBPACK_IMPORTED_MODULE_0__.assocPath)(patchOperation.location, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.empty)(prev), previous); }, Reverse: function Reverse(previous, patchOperation) { var prev = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.path)(patchOperation.location, previous); return (0,ramda__WEBPACK_IMPORTED_MODULE_0__.assocPath)(patchOperation.location, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.reverse)(prev), previous); }, Remove: function Remove(previous, patchOperation) { var prev = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.path)(patchOperation.location, previous); return (0,ramda__WEBPACK_IMPORTED_MODULE_0__.assocPath)(patchOperation.location, prev.filter(function (item) { return !(0,ramda__WEBPACK_IMPORTED_MODULE_0__.equals)(item, patchOperation.params.value); }), previous); } }; function handlePatch(previousValue, patchValue) { var reducedValue = previousValue; for (var i = 0; i < patchValue.operations.length; i++) { var patch = patchValue.operations[i]; patch.location = getLocationPath(patch.location, reducedValue); var handler = patchHandlers[patch.operation]; if (!handler) { throw new Error("Invalid Operation ".concat(patch.operation)); } reducedValue = handler(reducedValue, patch); } return reducedValue; } /***/ }), /***/ "./src/actions/requestDependencies.ts": /*!********************************************!*\ !*** ./src/actions/requestDependencies.ts ***! \********************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ requestDependencies: function() { return /* binding */ requestDependencies; } /* harmony export */ }); /* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js"); /* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index */ "./src/actions/index.js"); /* harmony import */ var _api__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./api */ "./src/actions/api.js"); function requestDependencies() { return function (dispatch) { (0,react_redux__WEBPACK_IMPORTED_MODULE_0__.batch)(function () { dispatch((0,_index__WEBPACK_IMPORTED_MODULE_1__.setGraphs)({})); dispatch((0,_api__WEBPACK_IMPORTED_MODULE_2__["default"])('_dash-dependencies', 'GET', 'dependenciesRequest')); }); }; } /***/ }), /***/ "./src/config.ts": /*!***********************!*\ !*** ./src/config.ts ***! \***********************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ getConfigFromDOM; } /* harmony export */ }); function getConfigFromDOM() { var configElement = document.getElementById('_dash-config'); return JSON.parse(configElement !== null && configElement !== void 0 && configElement.textContent ? configElement === null || configElement === void 0 ? void 0 : configElement.textContent : '{}'); } /***/ }), /***/ "./src/observers/documentTitle.ts": /*!****************************************!*\ !*** ./src/observers/documentTitle.ts ***! \****************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); var updateTitle = function updateTitle(getState) { var _getState = getState(), config = _getState.config, isLoading = _getState.isLoading; var update_title = config === null || config === void 0 ? void 0 : config.update_title; if (!update_title) { return; } if (isLoading) { if (document.title !== update_title) { _observer.title = document.title; document.title = update_title; } } else { if (document.title === update_title) { document.title = _observer.title; } else { _observer.title = document.title; } } }; var _observer = { inputs: ['isLoading'], mutationObserver: undefined, observer: function observer(_ref) { var getState = _ref.getState; var _getState2 = getState(), config = _getState2.config; if (_observer.config !== config) { var _observer$mutationObs; _observer.config = config; (_observer$mutationObs = _observer.mutationObserver) === null || _observer$mutationObs === void 0 || _observer$mutationObs.disconnect(); _observer.mutationObserver = new MutationObserver(function () { return updateTitle(getState); }); var title = document.querySelector('title'); if (title) { _observer.mutationObserver.observe(title, { subtree: true, childList: true, attributes: true, characterData: true }); } } updateTitle(getState); } }; /* harmony default export */ __webpack_exports__["default"] = (_observer); /***/ }), /***/ "./src/observers/executedCallbacks.ts": /*!********************************************!*\ !*** ./src/observers/executedCallbacks.ts ***! \********************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js"); /* harmony import */ var _actions_callbacks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../actions/callbacks */ "./src/actions/callbacks.ts"); /* harmony import */ var _actions_dependencies__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../actions/dependencies */ "./src/actions/dependencies.js"); /* harmony import */ var _actions_dependencies_ts__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../actions/dependencies_ts */ "./src/actions/dependencies_ts.ts"); /* harmony import */ var _actions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../actions */ "./src/actions/index.js"); /* harmony import */ var _actions_paths__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../actions/paths */ "./src/actions/paths.js"); /* harmony import */ var _persistence__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../persistence */ "./src/persistence.js"); function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } var observer = { observer: function observer(_ref) { var dispatch = _ref.dispatch, getState = _ref.getState; var _getState = getState(), executed = _getState.callbacks.executed; function applyProps(id, updatedProps) { var _getState2 = getState(), layout = _getState2.layout, paths = _getState2.paths; var itempath = (0,_actions_paths__WEBPACK_IMPORTED_MODULE_5__.getPath)(paths, id); if (!itempath) { return false; } // This is a callback-generated update. // Check if this invalidates existing persisted prop values, // or if persistence changed, whether this updates other props. updatedProps = (0,_persistence__WEBPACK_IMPORTED_MODULE_6__.prunePersistence)((0,ramda__WEBPACK_IMPORTED_MODULE_0__.path)(itempath, layout), updatedProps, dispatch); // In case the update contains whole components, see if any of // those components have props to update to persist user edits. var _applyPersistence = (0,_persistence__WEBPACK_IMPORTED_MODULE_6__.applyPersistence)({ props: updatedProps }, dispatch), props = _applyPersistence.props; dispatch((0,_actions__WEBPACK_IMPORTED_MODULE_4__.updateProps)({ itempath, props, source: 'response' })); return props; } var requestedCallbacks = []; var storedCallbacks = []; executed.forEach(function (cb) { var _cb$predecessors; var predecessors = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.concat)((_cb$predecessors = cb.predecessors) !== null && _cb$predecessors !== void 0 ? _cb$predecessors : [], [cb.callback]); var _cb$callback = cb.callback, clientside_function = _cb$callback.clientside_function, output = _cb$callback.output, executionResult = cb.executionResult; if ((0,ramda__WEBPACK_IMPORTED_MODULE_0__.isNil)(executionResult)) { return; } var data = executionResult.data, error = executionResult.error, payload = executionResult.payload; if (data !== undefined) { Object.entries(data).forEach(function (_ref2) { var _ref3 = _slicedToArray(_ref2, 2), id = _ref3[0], props = _ref3[1]; var parsedId = (0,_actions_dependencies__WEBPACK_IMPORTED_MODULE_2__.parseIfWildcard)(id); var _getState3 = getState(), graphs = _getState3.graphs, oldLayout = _getState3.layout, oldPaths = _getState3.paths; // Components will trigger callbacks on their own as required (eg. derived) var appliedProps = applyProps(parsedId, props); // Add callbacks for modified inputs requestedCallbacks = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.concat)(requestedCallbacks, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.flatten)((0,ramda__WEBPACK_IMPORTED_MODULE_0__.map)(function (prop) { return (0,_actions_dependencies_ts__WEBPACK_IMPORTED_MODULE_3__.getCallbacksByInput)(graphs, oldPaths, parsedId, prop, true); }, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.keys)(props))).map(function (rcb) { return _objectSpread(_objectSpread({}, rcb), {}, { predecessors }); })); var basePath = (0,_actions_paths__WEBPACK_IMPORTED_MODULE_5__.getPath)(oldPaths, parsedId); if (!basePath) { return; } var oldObj = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.path)(basePath, oldLayout); var childrenProps = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.pathOr)('defaultValue', [oldObj.namespace, oldObj.type], window.__dashprivate_childrenProps); var handlePaths = function handlePaths(children, oldChildren, oldChildrenPath) { var filterRoot = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; var oPaths = getState().paths; var paths = (0,_actions_paths__WEBPACK_IMPORTED_MODULE_5__.computePaths)(children, oldChildrenPath, oPaths); dispatch((0,_actions__WEBPACK_IMPORTED_MODULE_4__.setPaths)(paths)); // Get callbacks for new layout (w/ execution group) requestedCallbacks = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.concat)(requestedCallbacks, (0,_actions_dependencies_ts__WEBPACK_IMPORTED_MODULE_3__.getLayoutCallbacks)(graphs, paths, children, { chunkPath: oldChildrenPath, filterRoot }).map(function (rcb) { return _objectSpread(_objectSpread({}, rcb), {}, { predecessors }); })); // Wildcard callbacks with array inputs (ALL / ALLSMALLER) need to trigger // even due to the deletion of components requestedCallbacks = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.concat)(requestedCallbacks, (0,_actions_dependencies_ts__WEBPACK_IMPORTED_MODULE_3__.getLayoutCallbacks)(graphs, oldPaths, oldChildren, { removedArrayInputsOnly: true, newPaths: paths, chunkPath: oldChildrenPath, filterRoot }).map(function (rcb) { return _objectSpread(_objectSpread({}, rcb), {}, { predecessors }); })); }; var recomputed = false; ['children'].concat(childrenProps).forEach(function (childrenProp) { if (recomputed) { return; } if (childrenProp.includes('[]')) { var _childrenProp$split$m = childrenProp.split('[]').map(function (p) { return p.split('.').filter(function (e) { return e; }); }), _childrenProp$split$m2 = _slicedToArray(_childrenProp$split$m, 1), frontPath = _childrenProp$split$m2[0]; var frontObj = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.path)(frontPath, appliedProps); if (!frontObj) { return; } // Crawl layout needs the ns/type handlePaths(_objectSpread(_objectSpread({}, oldObj), {}, { props: _objectSpread(_objectSpread({}, oldObj.props), appliedProps) }), oldObj, basePath, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.keys)(appliedProps)); // Only do it once for the component. recomputed = true; } else { var childrenPropPath = childrenProp.split('.'); var children = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.path)(childrenPropPath, appliedProps); if (!children) { return; } var oldChildrenPath = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.concat)((0,_actions_paths__WEBPACK_IMPORTED_MODULE_5__.getPath)(oldPaths, parsedId), ['props'].concat(childrenPropPath)); var oldChildren = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.path)(oldChildrenPath, oldLayout); handlePaths(children, oldChildren, oldChildrenPath); } }); // persistence edge case: if you explicitly update the // persistence key, other props may change that require us // to fire additional callbacks var addedProps = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.pickBy)(function (_, k) { return !(k in props); }, appliedProps); if (!(0,ramda__WEBPACK_IMPORTED_MODULE_0__.isEmpty)(addedProps)) { var _getState4 = getState(), currentGraphs = _getState4.graphs, paths = _getState4.paths; requestedCallbacks = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.concat)(requestedCallbacks, (0,_actions_dependencies_ts__WEBPACK_IMPORTED_MODULE_3__.includeObservers)(id, addedProps, currentGraphs, paths).map(function (rcb) { return _objectSpread(_objectSpread({}, rcb), {}, { predecessors }); })); } }); // Add information about potentially updated outputs vs. updated outputs, // this will be used to drop callbacks from execution groups when no output // matching the downstream callback's inputs were modified storedCallbacks.push(_objectSpread(_objectSpread({}, cb), {}, { executionMeta: { allProps: (0,ramda__WEBPACK_IMPORTED_MODULE_0__.map)(_actions_dependencies_ts__WEBPACK_IMPORTED_MODULE_3__.combineIdAndProp, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.flatten)(cb.getOutputs(getState().paths))), updatedProps: (0,ramda__WEBPACK_IMPORTED_MODULE_0__.flatten)((0,ramda__WEBPACK_IMPORTED_MODULE_0__.map)(function (_ref4) { var _ref5 = _slicedToArray(_ref4, 2), id = _ref5[0], value = _ref5[1]; return (0,ramda__WEBPACK_IMPORTED_MODULE_0__.map)(function (property) { return (0,_actions_dependencies_ts__WEBPACK_IMPORTED_MODULE_3__.combineIdAndProp)({ id, property }); }, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.keys)(value)); }, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.toPairs)(data))) } })); } if (error !== undefined) { var outputs = payload ? (0,ramda__WEBPACK_IMPORTED_MODULE_0__.map)(_actions_dependencies_ts__WEBPACK_IMPORTED_MODULE_3__.combineIdAndProp, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.flatten)([payload.outputs])).join(', ') : output; var message = "Callback error updating ".concat(outputs); if (clientside_function) { var ns = clientside_function.namespace, fn = clientside_function.function_name; message += " via clientside function ".concat(ns, ".").concat(fn); } (0,_actions__WEBPACK_IMPORTED_MODULE_4__.handleAsyncError)(error, message, dispatch); storedCallbacks.push(_objectSpread(_objectSpread({}, cb), {}, { executionMeta: { allProps: (0,ramda__WEBPACK_IMPORTED_MODULE_0__.map)(_actions_dependencies_ts__WEBPACK_IMPORTED_MODULE_3__.combineIdAndProp, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.flatten)(cb.getOutputs(getState().paths))), updatedProps: [] } })); } }); dispatch((0,_actions_callbacks__WEBPACK_IMPORTED_MODULE_1__.aggregateCallbacks)([executed.length ? (0,_actions_callbacks__WEBPACK_IMPORTED_MODULE_1__.removeExecutedCallbacks)(executed) : null, executed.length ? (0,_actions_callbacks__WEBPACK_IMPORTED_MODULE_1__.addCompletedCallbacks)(executed.length) : null, storedCallbacks.length ? (0,_actions_callbacks__WEBPACK_IMPORTED_MODULE_1__.addStoredCallbacks)(storedCallbacks) : null, requestedCallbacks.length ? (0,_actions_callbacks__WEBPACK_IMPORTED_MODULE_1__.addRequestedCallbacks)(requestedCallbacks) : null])); }, inputs: ['callbacks.executed'] }; /* harmony default export */ __webpack_exports__["default"] = (observer); /***/ }), /***/ "./src/observers/executingCallbacks.ts": /*!*********************************************!*\ !*** ./src/observers/executingCallbacks.ts ***! \*********************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js"); /* harmony import */ var _actions_callbacks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../actions/callbacks */ "./src/actions/callbacks.ts"); /* harmony import */ var _reducers_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../reducers/constants */ "./src/reducers/constants.js"); function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } var observer = { observer: function observer(_ref) { var dispatch = _ref.dispatch, getState = _ref.getState; var _getState = getState(), executing = _getState.callbacks.executing; var _partition = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.partition)(function (cb) { return cb.executionPromise instanceof Promise; }, executing), _partition2 = _slicedToArray(_partition, 2), deferred = _partition2[0], skippedOrReady = _partition2[1]; dispatch((0,_actions_callbacks__WEBPACK_IMPORTED_MODULE_1__.aggregateCallbacks)([executing.length ? (0,_actions_callbacks__WEBPACK_IMPORTED_MODULE_1__.removeExecutingCallbacks)(executing) : null, deferred.length ? (0,_actions_callbacks__WEBPACK_IMPORTED_MODULE_1__.addWatchedCallbacks)(deferred) : null, skippedOrReady.length ? (0,_actions_callbacks__WEBPACK_IMPORTED_MODULE_1__.addExecutedCallbacks)(skippedOrReady.map(function (cb) { return (0,ramda__WEBPACK_IMPORTED_MODULE_0__.assoc)('executionResult', cb.executionPromise, cb); })) : null])); deferred.forEach( /*#__PURE__*/function () { var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(cb) { var result, _getState2, watched, appLifecycle, callback_resolved, currentCb; return _regeneratorRuntime().wrap(function _callee$(_context) { while (1) switch (_context.prev = _context.next) { case 0: _context.next = 2; return cb.executionPromise; case 2: result = _context.sent; _getState2 = getState(), watched = _getState2.callbacks.watched, appLifecycle = _getState2.appLifecycle, callback_resolved = _getState2.hooks.callback_resolved; if (!(appLifecycle !== (0,_reducers_constants__WEBPACK_IMPORTED_MODULE_2__.getAppState)('HYDRATED'))) { _context.next = 6; break; } return _context.abrupt("return"); case 6: if (callback_resolved) { callback_resolved(cb.callback, result); } // Check if it's been removed from the `watched` list since - on callback completion, another callback may be cancelled // Find the callback instance or one that matches its promise (eg. could have been pruned) currentCb = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.find)(function (_cb) { return _cb === cb || _cb.executionPromise === cb.executionPromise; }, watched); if (currentCb) { _context.next = 10; break; } return _context.abrupt("return"); case 10: // Otherwise move to `executed` and remove from `watched` dispatch((0,_actions_callbacks__WEBPACK_IMPORTED_MODULE_1__.aggregateCallbacks)([(0,_actions_callbacks__WEBPACK_IMPORTED_MODULE_1__.removeWatchedCallbacks)([currentCb]), (0,_actions_callbacks__WEBPACK_IMPORTED_MODULE_1__.addExecutedCallbacks)([_objectSpread(_objectSpread({}, currentCb), {}, { executionResult: result })])])); case 11: case "end": return _context.stop(); } }, _callee); })); return function (_x) { return _ref2.apply(this, arguments); }; }()); }, inputs: ['callbacks.executing'] }; /* harmony default export */ __webpack_exports__["default"] = (observer); /***/ }), /***/ "./src/observers/isLoading.ts": /*!************************************!*\ !*** ./src/observers/isLoading.ts ***! \************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _utils_callbacks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/callbacks */ "./src/utils/callbacks.ts"); /* harmony import */ var _actions_isLoading__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../actions/isLoading */ "./src/actions/isLoading.ts"); var observer = { observer: function observer(_ref) { var dispatch = _ref.dispatch, getState = _ref.getState; var _getState = getState(), callbacks = _getState.callbacks, isLoading = _getState.isLoading; var pendingCallbacks = (0,_utils_callbacks__WEBPACK_IMPORTED_MODULE_0__.getPendingCallbacks)(callbacks); var next = Boolean(pendingCallbacks.length); if (isLoading !== next) { dispatch((0,_actions_isLoading__WEBPACK_IMPORTED_MODULE_1__.setIsLoading)(next)); } }, inputs: ['callbacks'] }; /* harmony default export */ __webpack_exports__["default"] = (observer); /***/ }), /***/ "./src/observers/loadingMap.ts": /*!*************************************!*\ !*** ./src/observers/loadingMap.ts ***! \*************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js"); /* harmony import */ var _actions_loadingMap__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../actions/loadingMap */ "./src/actions/loadingMap.ts"); function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } var observer = { observer: function observer(_ref) { var dispatch = _ref.dispatch, getState = _ref.getState; var _getState = getState(), _getState$callbacks = _getState.callbacks, executing = _getState$callbacks.executing, watched = _getState$callbacks.watched, executed = _getState$callbacks.executed, loadingMap = _getState.loadingMap, paths = _getState.paths; /* Get the path of all components impacted by callbacks with states: executing, watched, executed. For each path, keep track of all (id,prop) tuples that are impacted for this node and nested nodes. */ var loadingPaths = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.flatten)((0,ramda__WEBPACK_IMPORTED_MODULE_0__.map)(function (cb) { return cb.getOutputs(paths); }, [].concat(_toConsumableArray(executing), _toConsumableArray(watched), _toConsumableArray(executed)))); var nextMap = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.isEmpty)(loadingPaths) ? null : (0,ramda__WEBPACK_IMPORTED_MODULE_0__.reduce)(function (res, _ref2) { var id = _ref2.id, property = _ref2.property, path = _ref2.path; var target = res; var idprop = { id, property }; // Assign all affected props for this path and nested paths target.__dashprivate__idprops__ = target.__dashprivate__idprops__ || []; target.__dashprivate__idprops__.push(idprop); path.forEach(function (p, i) { var _target$p; target = target[p] = (_target$p = target[p]) !== null && _target$p !== void 0 ? _target$p : p === 'children' && typeof path[i + 1] === 'number' ? [] : {}; target.__dashprivate__idprops__ = target.__dashprivate__idprops__ || []; target.__dashprivate__idprops__.push(idprop); }); // Assign one affected prop for this path target.__dashprivate__idprop__ = target.__dashprivate__idprop__ || idprop; return res; }, {}, loadingPaths); if (!(0,ramda__WEBPACK_IMPORTED_MODULE_0__.equals)(nextMap, loadingMap)) { dispatch((0,_actions_loadingMap__WEBPACK_IMPORTED_MODULE_1__.setLoadingMap)(nextMap)); } }, inputs: ['callbacks.executing', 'callbacks.watched', 'callbacks.executed'] }; /* harmony default export */ __webpack_exports__["default"] = (observer); /***/ }), /***/ "./src/observers/prioritizedCallbacks.ts": /*!***********************************************!*\ !*** ./src/observers/prioritizedCallbacks.ts ***! \***********************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js"); /* harmony import */ var _actions_callbacks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../actions/callbacks */ "./src/actions/callbacks.ts"); /* harmony import */ var _actions_dependencies__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../actions/dependencies */ "./src/actions/dependencies.js"); /* harmony import */ var _actions_dependencies_ts__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../actions/dependencies_ts */ "./src/actions/dependencies_ts.ts"); /* harmony import */ var _actions_isAppReady__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../actions/isAppReady */ "./src/actions/isAppReady.js"); /* harmony import */ var _reducers_constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../reducers/constants */ "./src/reducers/constants.js"); function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } var sortPriority = function sortPriority(c1, c2) { var _c1$priority, _c2$priority; return ((_c1$priority = c1.priority) !== null && _c1$priority !== void 0 ? _c1$priority : '') > ((_c2$priority = c2.priority) !== null && _c2$priority !== void 0 ? _c2$priority : '') ? -1 : 1; }; var getStash = function getStash(cb, paths) { var getOutputs = cb.getOutputs; var allOutputs = getOutputs(paths); var flatOutputs = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.flatten)(allOutputs); var allPropIds = []; var reqOut = {}; flatOutputs.forEach(function (_ref) { var id = _ref.id, property = _ref.property; var idStr = (0,_actions_dependencies__WEBPACK_IMPORTED_MODULE_2__.stringifyId)(id); var idOut = reqOut[idStr] = reqOut[idStr] || []; idOut.push(property); allPropIds.push((0,_actions_dependencies_ts__WEBPACK_IMPORTED_MODULE_3__.combineIdAndProp)({ id: idStr, property })); }); return { allOutputs, allPropIds }; }; var getIds = function getIds(cb, paths) { return (0,ramda__WEBPACK_IMPORTED_MODULE_0__.uniq)((0,ramda__WEBPACK_IMPORTED_MODULE_0__.pluck)('id', [].concat(_toConsumableArray((0,ramda__WEBPACK_IMPORTED_MODULE_0__.flatten)(cb.getInputs(paths))), _toConsumableArray((0,ramda__WEBPACK_IMPORTED_MODULE_0__.flatten)(cb.getState(paths)))))); }; var observer = { observer: function () { var _observer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_ref2) { var dispatch, getState, _getState, _getState$callbacks, executing, watched, config, hooks, layout, paths, appLifecycle, _getState2, prioritized, available, _partition, _partition2, syncCallbacks, asyncCallbacks, pickedSyncCallbacks, pickedAsyncCallbacks, deferred; return _regeneratorRuntime().wrap(function _callee2$(_context2) { while (1) switch (_context2.prev = _context2.next) { case 0: dispatch = _ref2.dispatch, getState = _ref2.getState; _getState = getState(), _getState$callbacks = _getState.callbacks, executing = _getState$callbacks.executing, watched = _getState$callbacks.watched, config = _getState.config, hooks = _getState.hooks, layout = _getState.layout, paths = _getState.paths, appLifecycle = _getState.appLifecycle; _getState2 = getState(), prioritized = _getState2.callbacks.prioritized; if (!(appLifecycle !== (0,_reducers_constants__WEBPACK_IMPORTED_MODULE_5__.getAppState)('HYDRATED'))) { _context2.next = 5; break; } return _context2.abrupt("return"); case 5: available = Math.max(0, 12 - executing.length - watched.length); // Order prioritized callbacks based on depth and breadth of callback chain prioritized = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.sort)(sortPriority, prioritized); // Divide between sync and async _partition = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.partition)(function (cb) { return (0,_actions_isAppReady__WEBPACK_IMPORTED_MODULE_4__["default"])(layout, paths, getIds(cb, paths)) === true; }, prioritized), _partition2 = _slicedToArray(_partition, 2), syncCallbacks = _partition2[0], asyncCallbacks = _partition2[1]; pickedSyncCallbacks = syncCallbacks.slice(0, available); pickedAsyncCallbacks = asyncCallbacks.slice(0, available - pickedSyncCallbacks.length); if (pickedSyncCallbacks.length) { dispatch((0,_actions_callbacks__WEBPACK_IMPORTED_MODULE_1__.aggregateCallbacks)([(0,_actions_callbacks__WEBPACK_IMPORTED_MODULE_1__.removePrioritizedCallbacks)(pickedSyncCallbacks), (0,_actions_callbacks__WEBPACK_IMPORTED_MODULE_1__.addExecutingCallbacks)((0,ramda__WEBPACK_IMPORTED_MODULE_0__.map)(function (cb) { return (0,_actions_callbacks__WEBPACK_IMPORTED_MODULE_1__.executeCallback)(cb, config, hooks, paths, layout, getStash(cb, paths), dispatch, getState); }, pickedSyncCallbacks))])); } if (pickedAsyncCallbacks.length) { deferred = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.map)(function (cb) { return _objectSpread(_objectSpread(_objectSpread({}, cb), getStash(cb, paths)), {}, { isReady: (0,_actions_isAppReady__WEBPACK_IMPORTED_MODULE_4__["default"])(layout, paths, getIds(cb, paths)) }); }, pickedAsyncCallbacks); dispatch((0,_actions_callbacks__WEBPACK_IMPORTED_MODULE_1__.aggregateCallbacks)([(0,_actions_callbacks__WEBPACK_IMPORTED_MODULE_1__.removePrioritizedCallbacks)(pickedAsyncCallbacks), (0,_actions_callbacks__WEBPACK_IMPORTED_MODULE_1__.addBlockedCallbacks)(deferred)])); deferred.forEach( /*#__PURE__*/function () { var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(cb) { var _getState3, blocked, currentCb, executingCallback; return _regeneratorRuntime().wrap(function _callee$(_context) { while (1) switch (_context.prev = _context.next) { case 0: _context.next = 2; return cb.isReady; case 2: _getState3 = getState(), blocked = _getState3.callbacks.blocked; // Check if it's been removed from the `blocked` list since - on // callback completion, another callback may be cancelled // Find the callback instance or one that matches its promise // (eg. could have been pruned) currentCb = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.find)(function (_cb) { return _cb === cb || _cb.isReady === cb.isReady; }, blocked); if (currentCb) { _context.next = 6; break; } return _context.abrupt("return"); case 6: executingCallback = (0,_actions_callbacks__WEBPACK_IMPORTED_MODULE_1__.executeCallback)(cb, config, hooks, paths, layout, cb, dispatch, getState); dispatch((0,_actions_callbacks__WEBPACK_IMPORTED_MODULE_1__.aggregateCallbacks)([(0,_actions_callbacks__WEBPACK_IMPORTED_MODULE_1__.removeBlockedCallbacks)([cb]), (0,_actions_callbacks__WEBPACK_IMPORTED_MODULE_1__.addExecutingCallbacks)([executingCallback])])); case 8: case "end": return _context.stop(); } }, _callee); })); return function (_x2) { return _ref3.apply(this, arguments); }; }()); } case 12: case "end": return _context2.stop(); } }, _callee2); })); function observer(_x) { return _observer.apply(this, arguments); } return observer; }(), inputs: ['callbacks.prioritized', 'callbacks.completed'] }; /* harmony default export */ __webpack_exports__["default"] = (observer); /***/ }), /***/ "./src/observers/requestedCallbacks.ts": /*!*********************************************!*\ !*** ./src/observers/requestedCallbacks.ts ***! \*********************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js"); /* harmony import */ var _actions_callbacks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../actions/callbacks */ "./src/actions/callbacks.ts"); /* harmony import */ var _actions_dependencies__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../actions/dependencies */ "./src/actions/dependencies.js"); /* harmony import */ var _actions_dependencies_ts__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../actions/dependencies_ts */ "./src/actions/dependencies_ts.ts"); /* harmony import */ var _utils_wait__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../utils/wait */ "./src/utils/wait.ts"); /* harmony import */ var _utils_callbacks__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/callbacks */ "./src/utils/callbacks.ts"); function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } var observer = { observer: function () { var _observer = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref) { var dispatch, getState, _getState, callbacks, _getState$callbacks, prioritized, blocked, executing, watched, stored, paths, graphs, _getState2, requested, initialRequested, pendingCallbacks, rCirculars, rDuplicates, rMergedDuplicates, pDuplicates, bDuplicates, eDuplicates, wDuplicates, _pruneCallbacks, rAdded, rRemoved, _pruneCallbacks2, pAdded, pRemoved, _pruneCallbacks3, bAdded, bRemoved, _pruneCallbacks4, eAdded, eRemoved, _pruneCallbacks5, wAdded, wRemoved, readyCallbacks, oldBlocked, newBlocked, candidates, _loop, pendingGroups, dropped, added, removed; return _regeneratorRuntime().wrap(function _callee$(_context2) { while (1) switch (_context2.prev = _context2.next) { case 0: dispatch = _ref.dispatch, getState = _ref.getState; _context2.next = 3; return (0,_utils_wait__WEBPACK_IMPORTED_MODULE_4__["default"])(0); case 3: _getState = getState(), callbacks = _getState.callbacks, _getState$callbacks = _getState.callbacks, prioritized = _getState$callbacks.prioritized, blocked = _getState$callbacks.blocked, executing = _getState$callbacks.executing, watched = _getState$callbacks.watched, stored = _getState$callbacks.stored, paths = _getState.paths, graphs = _getState.graphs; _getState2 = getState(), requested = _getState2.callbacks.requested; initialRequested = requested.slice(0); pendingCallbacks = (0,_utils_callbacks__WEBPACK_IMPORTED_MODULE_5__.getPendingCallbacks)(callbacks); /* 0. Prune circular callbacks that have completed the loop - cb.callback included in cb.predecessors */ rCirculars = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.filter)(function (cb) { var _cb$predecessors; return (0,ramda__WEBPACK_IMPORTED_MODULE_0__.includes)(cb.callback, (_cb$predecessors = cb.predecessors) !== null && _cb$predecessors !== void 0 ? _cb$predecessors : []); }, requested); /* TODO? Clean up the `requested` list - during the dispatch phase, circulars will be removed for real */ requested = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.difference)(requested, rCirculars); /* 1. Remove duplicated `requested` callbacks - give precedence to newer callbacks over older ones */ rDuplicates = []; rMergedDuplicates = []; (0,ramda__WEBPACK_IMPORTED_MODULE_0__.values)((0,ramda__WEBPACK_IMPORTED_MODULE_0__.groupBy)(_actions_dependencies_ts__WEBPACK_IMPORTED_MODULE_3__.getUniqueIdentifier, requested)).forEach(function (group) { if (group.length === 1) { // keep callback if its the only one of its kind rMergedDuplicates.push(group[0]); } else { var initial = group.find(function (cb) { return cb.initialCall; }); if (initial) { // drop the initial callback if it's not alone rDuplicates.push(initial); } var groupWithoutInitial = group.filter(function (cb) { return cb !== initial; }); if (groupWithoutInitial.length === 1) { // if there's only one callback beside the initial one, keep that callback rMergedDuplicates.push(groupWithoutInitial[0]); } else { // otherwise merge all remaining callbacks together rDuplicates = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.concat)(rDuplicates, groupWithoutInitial); rMergedDuplicates.push((0,ramda__WEBPACK_IMPORTED_MODULE_0__.mergeLeft)({ changedPropIds: (0,ramda__WEBPACK_IMPORTED_MODULE_0__.reduce)((0,ramda__WEBPACK_IMPORTED_MODULE_0__.mergeWith)(Math.max), {}, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.pluck)('changedPropIds', groupWithoutInitial)), executionGroup: (0,ramda__WEBPACK_IMPORTED_MODULE_0__.filter)(function (exg) { return Boolean(exg); }, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.pluck)('executionGroup', groupWithoutInitial)).slice(-1)[0] }, groupWithoutInitial.slice(-1)[0])); } } }); /* TODO? Clean up the `requested` list - during the dispatch phase, duplicates will be removed for real */ requested = rMergedDuplicates; /* 2. Remove duplicated `prioritized`, `executing` and `watching` callbacks */ /* Extract all but the first callback from each IOS-key group these callbacks are `prioritized` and duplicates. */ pDuplicates = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.flatten)((0,ramda__WEBPACK_IMPORTED_MODULE_0__.map)(function (group) { return group.slice(0, -1); }, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.values)((0,ramda__WEBPACK_IMPORTED_MODULE_0__.groupBy)(_actions_dependencies_ts__WEBPACK_IMPORTED_MODULE_3__.getUniqueIdentifier, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.concat)(prioritized, requested))))); bDuplicates = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.flatten)((0,ramda__WEBPACK_IMPORTED_MODULE_0__.map)(function (group) { return group.slice(0, -1); }, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.values)((0,ramda__WEBPACK_IMPORTED_MODULE_0__.groupBy)(_actions_dependencies_ts__WEBPACK_IMPORTED_MODULE_3__.getUniqueIdentifier, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.concat)(blocked, requested))))); eDuplicates = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.flatten)((0,ramda__WEBPACK_IMPORTED_MODULE_0__.map)(function (group) { return group.slice(0, -1); }, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.values)((0,ramda__WEBPACK_IMPORTED_MODULE_0__.groupBy)(_actions_dependencies_ts__WEBPACK_IMPORTED_MODULE_3__.getUniqueIdentifier, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.concat)(executing, requested))))); wDuplicates = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.flatten)((0,ramda__WEBPACK_IMPORTED_MODULE_0__.map)(function (group) { return group.slice(0, -1); }, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.values)((0,ramda__WEBPACK_IMPORTED_MODULE_0__.groupBy)(_actions_dependencies_ts__WEBPACK_IMPORTED_MODULE_3__.getUniqueIdentifier, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.concat)(watched, requested))))); /* 3. Modify or remove callbacks that are outputting to non-existing layout `id`. */ _pruneCallbacks = (0,_actions_dependencies_ts__WEBPACK_IMPORTED_MODULE_3__.pruneCallbacks)(requested, paths), rAdded = _pruneCallbacks.added, rRemoved = _pruneCallbacks.removed; _pruneCallbacks2 = (0,_actions_dependencies_ts__WEBPACK_IMPORTED_MODULE_3__.pruneCallbacks)(prioritized, paths), pAdded = _pruneCallbacks2.added, pRemoved = _pruneCallbacks2.removed; _pruneCallbacks3 = (0,_actions_dependencies_ts__WEBPACK_IMPORTED_MODULE_3__.pruneCallbacks)(blocked, paths), bAdded = _pruneCallbacks3.added, bRemoved = _pruneCallbacks3.removed; _pruneCallbacks4 = (0,_actions_dependencies_ts__WEBPACK_IMPORTED_MODULE_3__.pruneCallbacks)(executing, paths), eAdded = _pruneCallbacks4.added, eRemoved = _pruneCallbacks4.removed; _pruneCallbacks5 = (0,_actions_dependencies_ts__WEBPACK_IMPORTED_MODULE_3__.pruneCallbacks)(watched, paths), wAdded = _pruneCallbacks5.added, wRemoved = _pruneCallbacks5.removed; /* TODO? Clean up the `requested` list - during the dispatch phase, it will be updated for real */ requested = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.concat)((0,ramda__WEBPACK_IMPORTED_MODULE_0__.difference)(requested, rRemoved), rAdded); /* 4. Find `requested` callbacks that do not depend on a outstanding output (as either input or state) */ readyCallbacks = (0,_actions_dependencies_ts__WEBPACK_IMPORTED_MODULE_3__.getReadyCallbacks)(paths, requested, pendingCallbacks, graphs); oldBlocked = []; newBlocked = []; /** * If there is : * - no ready callbacks * - at least one requested callback * - no additional pending callbacks * * can assume: * - the requested callbacks are part of a circular dependency loop * * then recursively: * - assume the first callback in the list is ready (the entry point for the loop) * - check what callbacks are blocked / ready with the assumption * - update the missing predecessors based on assumptions * - continue until there are no remaining candidates * */ if (!(!readyCallbacks.length && requested.length && requested.length === pendingCallbacks.length)) { _context2.next = 33; break; } candidates = requested.slice(0); _loop = /*#__PURE__*/_regeneratorRuntime().mark(function _loop() { var readyCallback, blockedByAssumptions, modified; return _regeneratorRuntime().wrap(function _loop$(_context) { while (1) switch (_context.prev = _context.next) { case 0: // Assume 1st callback is ready and // update candidates / readyCallbacks accordingly readyCallback = candidates[0]; readyCallbacks.push(readyCallback); candidates = candidates.slice(1); // Remaining candidates are not blocked by current assumptions candidates = (0,_actions_dependencies_ts__WEBPACK_IMPORTED_MODULE_3__.getReadyCallbacks)(paths, candidates, readyCallbacks); // Blocked requests need to make sure they have the callback as a predecessor blockedByAssumptions = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.difference)(candidates, candidates); modified = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.filter)(function (cb) { return !cb.predecessors || !(0,ramda__WEBPACK_IMPORTED_MODULE_0__.includes)(readyCallback.callback, cb.predecessors); }, blockedByAssumptions); oldBlocked = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.concat)(oldBlocked, modified); newBlocked = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.concat)(newBlocked, modified.map(function (cb) { var _cb$predecessors2; return _objectSpread(_objectSpread({}, cb), {}, { predecessors: (0,ramda__WEBPACK_IMPORTED_MODULE_0__.concat)((_cb$predecessors2 = cb.predecessors) !== null && _cb$predecessors2 !== void 0 ? _cb$predecessors2 : [], [readyCallback.callback]) }); })); case 8: case "end": return _context.stop(); } }, _loop); }); case 29: if (!candidates.length) { _context2.next = 33; break; } return _context2.delegateYield(_loop(), "t0", 31); case 31: _context2.next = 29; break; case 33: /* TODO? Clean up the `requested` list - during the dispatch phase, it will be updated for real */ requested = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.concat)((0,ramda__WEBPACK_IMPORTED_MODULE_0__.difference)(requested, oldBlocked), newBlocked); /* 5. Prune callbacks that became irrelevant in their `executionGroup` */ // Group by executionGroup, drop non-executionGroup callbacks // those were not triggered by layout changes and don't have "strong" interdependency for // callback chain completion pendingGroups = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.groupBy)(function (cb) { return cb.executionGroup; }, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.filter)(function (cb) { return !(0,ramda__WEBPACK_IMPORTED_MODULE_0__.isNil)(cb.executionGroup); }, stored)); dropped = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.filter)(function (cb) { // If there is no `stored` callback for the group, no outputs were dropped -> `cb` is kept if (!cb.executionGroup || !pendingGroups[cb.executionGroup] || !pendingGroups[cb.executionGroup].length) { return false; } // Get all inputs for `cb` var inputs = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.map)(_actions_dependencies_ts__WEBPACK_IMPORTED_MODULE_3__.combineIdAndProp, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.flatten)(cb.getInputs(paths))); // Get all the potentially updated props for the group so far var allProps = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.flatten)((0,ramda__WEBPACK_IMPORTED_MODULE_0__.map)(function (gcb) { return gcb.executionMeta.allProps; }, pendingGroups[cb.executionGroup])); // Get all the updated props for the group so far var updated = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.flatten)((0,ramda__WEBPACK_IMPORTED_MODULE_0__.map)(function (gcb) { return gcb.executionMeta.updatedProps; }, pendingGroups[cb.executionGroup])); // If there's no overlap between the updated props and the inputs, // + there's no props that aren't covered by the potentially updated props, // and not all inputs are multi valued // -> drop `cb` var res = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.isEmpty)((0,ramda__WEBPACK_IMPORTED_MODULE_0__.intersection)(inputs, updated)) && (0,ramda__WEBPACK_IMPORTED_MODULE_0__.isEmpty)((0,ramda__WEBPACK_IMPORTED_MODULE_0__.difference)(inputs, allProps)) && !(0,ramda__WEBPACK_IMPORTED_MODULE_0__.all)(_actions_dependencies__WEBPACK_IMPORTED_MODULE_2__.isMultiValued, cb.callback.inputs); return res; }, readyCallbacks); /* TODO? Clean up the `requested` list - during the dispatch phase, it will be updated for real */ requested = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.difference)(requested, dropped); readyCallbacks = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.difference)(readyCallbacks, dropped); requested = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.difference)(requested, readyCallbacks); added = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.difference)(requested, initialRequested); removed = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.difference)(initialRequested, requested); dispatch((0,_actions_callbacks__WEBPACK_IMPORTED_MODULE_1__.aggregateCallbacks)([ // Clean up requested callbacks added.length ? (0,_actions_callbacks__WEBPACK_IMPORTED_MODULE_1__.addRequestedCallbacks)(added) : null, removed.length ? (0,_actions_callbacks__WEBPACK_IMPORTED_MODULE_1__.removeRequestedCallbacks)(removed) : null, // Clean up duplicated callbacks pDuplicates.length ? (0,_actions_callbacks__WEBPACK_IMPORTED_MODULE_1__.removePrioritizedCallbacks)(pDuplicates) : null, bDuplicates.length ? (0,_actions_callbacks__WEBPACK_IMPORTED_MODULE_1__.removeBlockedCallbacks)(bDuplicates) : null, eDuplicates.length ? (0,_actions_callbacks__WEBPACK_IMPORTED_MODULE_1__.removeExecutingCallbacks)(eDuplicates) : null, wDuplicates.length ? (0,_actions_callbacks__WEBPACK_IMPORTED_MODULE_1__.removeWatchedCallbacks)(wDuplicates) : null, // Prune callbacks pRemoved.length ? (0,_actions_callbacks__WEBPACK_IMPORTED_MODULE_1__.removePrioritizedCallbacks)(pRemoved) : null, pAdded.length ? (0,_actions_callbacks__WEBPACK_IMPORTED_MODULE_1__.addPrioritizedCallbacks)(pAdded) : null, bRemoved.length ? (0,_actions_callbacks__WEBPACK_IMPORTED_MODULE_1__.removeBlockedCallbacks)(bRemoved) : null, bAdded.length ? (0,_actions_callbacks__WEBPACK_IMPORTED_MODULE_1__.addBlockedCallbacks)(bAdded) : null, eRemoved.length ? (0,_actions_callbacks__WEBPACK_IMPORTED_MODULE_1__.removeExecutingCallbacks)(eRemoved) : null, eAdded.length ? (0,_actions_callbacks__WEBPACK_IMPORTED_MODULE_1__.addExecutingCallbacks)(eAdded) : null, wRemoved.length ? (0,_actions_callbacks__WEBPACK_IMPORTED_MODULE_1__.removeWatchedCallbacks)(wRemoved) : null, wAdded.length ? (0,_actions_callbacks__WEBPACK_IMPORTED_MODULE_1__.addWatchedCallbacks)(wAdded) : null, // Promote callbacks readyCallbacks.length ? (0,_actions_callbacks__WEBPACK_IMPORTED_MODULE_1__.addPrioritizedCallbacks)(readyCallbacks) : null])); case 42: case "end": return _context2.stop(); } }, _callee); })); function observer(_x) { return _observer.apply(this, arguments); } return observer; }(), inputs: ['callbacks.requested', 'callbacks.completed'] }; /* harmony default export */ __webpack_exports__["default"] = (observer); /***/ }), /***/ "./src/observers/storedCallbacks.ts": /*!******************************************!*\ !*** ./src/observers/storedCallbacks.ts ***! \******************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js"); /* harmony import */ var _actions_callbacks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../actions/callbacks */ "./src/actions/callbacks.ts"); /* harmony import */ var _utils_callbacks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/callbacks */ "./src/utils/callbacks.ts"); function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } var observer = { observer: function observer(_ref) { var dispatch = _ref.dispatch, getState = _ref.getState; var _getState = getState(), callbacks = _getState.callbacks; var pendingCallbacks = (0,_utils_callbacks__WEBPACK_IMPORTED_MODULE_2__.getPendingCallbacks)(callbacks); var _getState2 = getState(), stored = _getState2.callbacks.stored; var _partition = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.partition)(function (cb) { return (0,ramda__WEBPACK_IMPORTED_MODULE_0__.isNil)(cb.executionGroup); }, stored), _partition2 = _slicedToArray(_partition, 2), nullGroupCallbacks = _partition2[0], groupCallbacks = _partition2[1]; var executionGroups = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.groupBy)(function (cb) { return cb.executionGroup; }, groupCallbacks); var pendingGroups = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.groupBy)(function (cb) { return cb.executionGroup; }, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.filter)(function (cb) { return !(0,ramda__WEBPACK_IMPORTED_MODULE_0__.isNil)(cb.executionGroup); }, pendingCallbacks)); var dropped = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.reduce)(function (res, _ref2) { var _ref3 = _slicedToArray(_ref2, 2), executionGroup = _ref3[0], executionGroupCallbacks = _ref3[1]; return !pendingGroups[executionGroup] ? (0,ramda__WEBPACK_IMPORTED_MODULE_0__.concat)(res, executionGroupCallbacks) : res; }, [], (0,ramda__WEBPACK_IMPORTED_MODULE_0__.toPairs)(executionGroups)); dispatch((0,_actions_callbacks__WEBPACK_IMPORTED_MODULE_1__.aggregateCallbacks)([nullGroupCallbacks.length ? (0,_actions_callbacks__WEBPACK_IMPORTED_MODULE_1__.removeStoredCallbacks)(nullGroupCallbacks) : null, dropped.length ? (0,_actions_callbacks__WEBPACK_IMPORTED_MODULE_1__.removeStoredCallbacks)(dropped) : null])); }, inputs: ['callbacks.stored', 'callbacks.completed'] }; /* harmony default export */ __webpack_exports__["default"] = (observer); /***/ }), /***/ "./src/reducers/callbackJobs.ts": /*!**************************************!*\ !*** ./src/reducers/callbackJobs.ts ***! \**************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* export default binding */ __WEBPACK_DEFAULT_EXPORT__; } /* harmony export */ }); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js"); var setJob = function setJob(job, state) { return (0,ramda__WEBPACK_IMPORTED_MODULE_0__.assoc)(job.jobId, job, state); }; var removeJob = function removeJob(jobId, state) { return (0,ramda__WEBPACK_IMPORTED_MODULE_0__.dissoc)(jobId, state); }; var setOutdated = function setOutdated(jobId, state) { return (0,ramda__WEBPACK_IMPORTED_MODULE_0__.assocPath)([jobId, 'outdated'], true, state); }; /* harmony default export */ function __WEBPACK_DEFAULT_EXPORT__() { var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var action = arguments.length > 1 ? arguments[1] : undefined; switch (action.type) { case 'ADD_CALLBACK_JOB': return setJob(action.payload, state); case 'REMOVE_CALLBACK_JOB': return removeJob(action.payload.jobId, state); case 'CALLBACK_JOB_OUTDATED': return setOutdated(action.payload.jobId, state); default: return state; } } /***/ }), /***/ "./src/reducers/callbacks.ts": /*!***********************************!*\ !*** ./src/reducers/callbacks.ts ***! \***********************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ CallbackActionType: function() { return /* binding */ CallbackActionType; }, /* harmony export */ CallbackAggregateActionType: function() { return /* binding */ CallbackAggregateActionType; } /* harmony export */ }); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js"); function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } var CallbackActionType; (function (CallbackActionType) { CallbackActionType["AddBlocked"] = "Callbacks.AddBlocked"; CallbackActionType["AddExecuted"] = "Callbacks.AddExecuted"; CallbackActionType["AddExecuting"] = "Callbacks.AddExecuting"; CallbackActionType["AddPrioritized"] = "Callbacks.AddPrioritized"; CallbackActionType["AddRequested"] = "Callbacks.AddRequested"; CallbackActionType["AddStored"] = "Callbacks.AddStored"; CallbackActionType["AddWatched"] = "Callbacks.AddWatched"; CallbackActionType["RemoveBlocked"] = "Callbacks.RemoveBlocked"; CallbackActionType["RemoveExecuted"] = "Callbacks.RemoveExecuted"; CallbackActionType["RemoveExecuting"] = "Callbacks.RemoveExecuting"; CallbackActionType["RemovePrioritized"] = "Callbacks.RemovePrioritized"; CallbackActionType["RemoveRequested"] = "Callbacks.RemoveRequested"; CallbackActionType["RemoveStored"] = "Callbacks.RemoveStored"; CallbackActionType["RemoveWatched"] = "Callbacks.RemoveWatched"; })(CallbackActionType || (CallbackActionType = {})); var CallbackAggregateActionType; (function (CallbackAggregateActionType) { CallbackAggregateActionType["AddCompleted"] = "Callbacks.Completed"; CallbackAggregateActionType["Aggregate"] = "Callbacks.Aggregate"; })(CallbackAggregateActionType || (CallbackAggregateActionType = {})); var DEFAULT_STATE = { blocked: [], executed: [], executing: [], prioritized: [], requested: [], stored: [], watched: [], completed: 0 }; var transforms = { [CallbackActionType.AddBlocked]: ramda__WEBPACK_IMPORTED_MODULE_0__.concat, [CallbackActionType.AddExecuted]: ramda__WEBPACK_IMPORTED_MODULE_0__.concat, [CallbackActionType.AddExecuting]: ramda__WEBPACK_IMPORTED_MODULE_0__.concat, [CallbackActionType.AddPrioritized]: ramda__WEBPACK_IMPORTED_MODULE_0__.concat, [CallbackActionType.AddRequested]: ramda__WEBPACK_IMPORTED_MODULE_0__.concat, [CallbackActionType.AddStored]: ramda__WEBPACK_IMPORTED_MODULE_0__.concat, [CallbackActionType.AddWatched]: ramda__WEBPACK_IMPORTED_MODULE_0__.concat, [CallbackActionType.RemoveBlocked]: ramda__WEBPACK_IMPORTED_MODULE_0__.difference, [CallbackActionType.RemoveExecuted]: ramda__WEBPACK_IMPORTED_MODULE_0__.difference, [CallbackActionType.RemoveExecuting]: ramda__WEBPACK_IMPORTED_MODULE_0__.difference, [CallbackActionType.RemovePrioritized]: ramda__WEBPACK_IMPORTED_MODULE_0__.difference, [CallbackActionType.RemoveRequested]: ramda__WEBPACK_IMPORTED_MODULE_0__.difference, [CallbackActionType.RemoveStored]: ramda__WEBPACK_IMPORTED_MODULE_0__.difference, [CallbackActionType.RemoveWatched]: ramda__WEBPACK_IMPORTED_MODULE_0__.difference }; var fields = { [CallbackActionType.AddBlocked]: 'blocked', [CallbackActionType.AddExecuted]: 'executed', [CallbackActionType.AddExecuting]: 'executing', [CallbackActionType.AddPrioritized]: 'prioritized', [CallbackActionType.AddRequested]: 'requested', [CallbackActionType.AddStored]: 'stored', [CallbackActionType.AddWatched]: 'watched', [CallbackActionType.RemoveBlocked]: 'blocked', [CallbackActionType.RemoveExecuted]: 'executed', [CallbackActionType.RemoveExecuting]: 'executing', [CallbackActionType.RemovePrioritized]: 'prioritized', [CallbackActionType.RemoveRequested]: 'requested', [CallbackActionType.RemoveStored]: 'stored', [CallbackActionType.RemoveWatched]: 'watched' }; var mutateCompleted = function mutateCompleted(state, action) { return _objectSpread(_objectSpread({}, state), {}, { completed: state.completed + action.payload }); }; var mutateCallbacks = function mutateCallbacks(state, action) { var transform = transforms[action.type]; var field = fields[action.type]; return !transform || !field || action.payload.length === 0 ? state : _objectSpread(_objectSpread({}, state), {}, { [field]: transform(state[field], action.payload) }); }; /* harmony default export */ __webpack_exports__["default"] = (function () { var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_STATE; var action = arguments.length > 1 ? arguments[1] : undefined; return (0,ramda__WEBPACK_IMPORTED_MODULE_0__.reduce)(function (s, a) { if (a === null) { return s; } else if (a.type === CallbackAggregateActionType.AddCompleted) { return mutateCompleted(s, a); } return mutateCallbacks(s, a); }, state, action.type === CallbackAggregateActionType.Aggregate ? action.payload : [action]); }); /***/ }), /***/ "./src/reducers/isLoading.ts": /*!***********************************!*\ !*** ./src/reducers/isLoading.ts ***! \***********************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ IsLoadingActionType: function() { return /* binding */ IsLoadingActionType; } /* harmony export */ }); var IsLoadingActionType; (function (IsLoadingActionType) { IsLoadingActionType["Set"] = "IsLoading.Set"; })(IsLoadingActionType || (IsLoadingActionType = {})); var DEFAULT_STATE = true; /* harmony default export */ __webpack_exports__["default"] = (function () { var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_STATE; var action = arguments.length > 1 ? arguments[1] : undefined; return action.type === IsLoadingActionType.Set ? action.payload : state; }); /***/ }), /***/ "./src/reducers/loadingMap.ts": /*!************************************!*\ !*** ./src/reducers/loadingMap.ts ***! \************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ LoadingMapActionType: function() { return /* binding */ LoadingMapActionType; } /* harmony export */ }); var LoadingMapActionType; (function (LoadingMapActionType) { LoadingMapActionType["Set"] = "LoadingMap.Set"; })(LoadingMapActionType || (LoadingMapActionType = {})); var DEFAULT_STATE = {}; /* harmony default export */ __webpack_exports__["default"] = (function () { var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_STATE; var action = arguments.length > 1 ? arguments[1] : undefined; return action.type === LoadingMapActionType.Set ? action.payload : state; }); /***/ }), /***/ "./src/store.ts": /*!**********************!*\ !*** ./src/store.ts ***! \**********************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ RendererStore; } /* harmony export */ }); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js"); /* harmony import */ var redux__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js"); /* harmony import */ var redux_thunk__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! redux-thunk */ "./node_modules/redux-thunk/es/index.js"); /* harmony import */ var _reducers_reducer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reducers/reducer */ "./src/reducers/reducer.js"); /* harmony import */ var _StoreObserver__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./StoreObserver */ "./src/StoreObserver.ts"); /* harmony import */ var _observers_documentTitle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./observers/documentTitle */ "./src/observers/documentTitle.ts"); /* harmony import */ var _observers_executedCallbacks__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./observers/executedCallbacks */ "./src/observers/executedCallbacks.ts"); /* harmony import */ var _observers_executingCallbacks__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./observers/executingCallbacks */ "./src/observers/executingCallbacks.ts"); /* harmony import */ var _observers_isLoading__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./observers/isLoading */ "./src/observers/isLoading.ts"); /* harmony import */ var _observers_loadingMap__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./observers/loadingMap */ "./src/observers/loadingMap.ts"); /* harmony import */ var _observers_prioritizedCallbacks__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./observers/prioritizedCallbacks */ "./src/observers/prioritizedCallbacks.ts"); /* harmony import */ var _observers_requestedCallbacks__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./observers/requestedCallbacks */ "./src/observers/requestedCallbacks.ts"); /* harmony import */ var _observers_storedCallbacks__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./observers/storedCallbacks */ "./src/observers/storedCallbacks.ts"); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } var RendererStore = /*#__PURE__*/function () { function RendererStore() { var _this = this; _classCallCheck(this, RendererStore); _defineProperty(this, "__store", void 0); _defineProperty(this, "storeObserver", new _StoreObserver__WEBPACK_IMPORTED_MODULE_2__["default"]()); _defineProperty(this, "setObservers", (0,ramda__WEBPACK_IMPORTED_MODULE_0__.once)(function () { var observe = _this.storeObserver.observe; observe(_observers_documentTitle__WEBPACK_IMPORTED_MODULE_3__["default"]); observe(_observers_isLoading__WEBPACK_IMPORTED_MODULE_6__["default"]); observe(_observers_loadingMap__WEBPACK_IMPORTED_MODULE_7__["default"]); observe(_observers_requestedCallbacks__WEBPACK_IMPORTED_MODULE_9__["default"]); observe(_observers_prioritizedCallbacks__WEBPACK_IMPORTED_MODULE_8__["default"]); observe(_observers_executingCallbacks__WEBPACK_IMPORTED_MODULE_5__["default"]); observe(_observers_executedCallbacks__WEBPACK_IMPORTED_MODULE_4__["default"]); observe(_observers_storedCallbacks__WEBPACK_IMPORTED_MODULE_10__["default"]); })); _defineProperty(this, "createAppStore", function (reducer, middleware) { _this.__store = (0,redux__WEBPACK_IMPORTED_MODULE_11__.createStore)(reducer, middleware); _this.storeObserver.setStore(_this.__store); _this.setObservers(); }); /** * Initialize a Redux store with thunk, plus logging (only in development mode) middleware * * @param {bool} reset: discard any previous store * * @returns {Store} * An initialized redux store with middleware and possible hot reloading of reducers */ _defineProperty(this, "initializeStore", function (reset) { if (_this.__store && !reset) { return _this.__store; } var reducer = (0,_reducers_reducer__WEBPACK_IMPORTED_MODULE_1__.createReducer)(); // eslint-disable-next-line no-process-env if (false) {} else { // only attach logger to middleware in non-production mode var reduxDTEC = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__; if (reduxDTEC) { _this.createAppStore(reducer, reduxDTEC({ actionsDenylist: ['reloadRequest'] })((0,redux__WEBPACK_IMPORTED_MODULE_11__.applyMiddleware)(redux_thunk__WEBPACK_IMPORTED_MODULE_12__["default"]))); } else { _this.createAppStore(reducer, (0,redux__WEBPACK_IMPORTED_MODULE_11__.applyMiddleware)(redux_thunk__WEBPACK_IMPORTED_MODULE_12__["default"])); } } if (!reset) { // TODO - Protect this under a debug mode? window.store = _this.__store; } if (false) {} return _this.__store; }); this.__store = this.initializeStore(); } _createClass(RendererStore, [{ key: "store", get: function get() { return this.__store; } }]); return RendererStore; }(); /***/ }), /***/ "./src/utils/TreeContainer.ts": /*!************************************!*\ !*** ./src/utils/TreeContainer.ts ***! \************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ getLoadingHash: function() { return /* binding */ getLoadingHash; }, /* harmony export */ getLoadingState: function() { return /* binding */ getLoadingState; }, /* harmony export */ validateComponent: function() { return /* binding */ validateComponent; } /* harmony export */ }); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js"); /* harmony import */ var _registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../registry */ "./src/registry.js"); /* harmony import */ var _actions_dependencies__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../actions/dependencies */ "./src/actions/dependencies.js"); function isLoadingComponent(layout) { validateComponent(layout); return _registry__WEBPACK_IMPORTED_MODULE_1__["default"].resolve(layout)._dashprivate_isLoadingComponent; } var NULL_LOADING_STATE = false; function getLoadingState(componentLayout, componentPath, loadingMap) { var _loadingFragment$__da; if (!loadingMap) { return NULL_LOADING_STATE; } var loadingFragment = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.path)(componentPath, loadingMap); // Component and children are not loading if there's no loading fragment // for the component's path in the layout. if (!loadingFragment) { return NULL_LOADING_STATE; } var idprop = loadingFragment.__dashprivate__idprop__; if (idprop) { return { is_loading: true, prop_name: idprop.property, component_name: (0,_actions_dependencies__WEBPACK_IMPORTED_MODULE_2__.stringifyId)(idprop.id) }; } var idprops = (_loadingFragment$__da = loadingFragment.__dashprivate__idprops__) === null || _loadingFragment$__da === void 0 ? void 0 : _loadingFragment$__da[0]; if (idprops && isLoadingComponent(componentLayout)) { return { is_loading: true, prop_name: idprops.property, component_name: (0,_actions_dependencies__WEBPACK_IMPORTED_MODULE_2__.stringifyId)(idprops.id) }; } return NULL_LOADING_STATE; } var getLoadingHash = function getLoadingHash(componentPath, loadingMap) { var _ref, _path; return ((_ref = loadingMap && ((_path = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.path)(componentPath, loadingMap)) === null || _path === void 0 ? void 0 : _path.__dashprivate__idprops__)) !== null && _ref !== void 0 ? _ref : []).map(function (_ref2) { var id = _ref2.id, property = _ref2.property; return "".concat(id, ".").concat(property); }).join(','); }; function validateComponent(componentDefinition) { if ((0,ramda__WEBPACK_IMPORTED_MODULE_0__.type)(componentDefinition) === 'Array') { throw new Error('The children property of a component is a list of lists, instead ' + 'of just a list. ' + 'Check the component that has the following contents, ' + 'and remove one of the levels of nesting: \n' + JSON.stringify(componentDefinition, null, 2)); } if ((0,ramda__WEBPACK_IMPORTED_MODULE_0__.type)(componentDefinition) === 'Object' && !((0,ramda__WEBPACK_IMPORTED_MODULE_0__.has)('namespace', componentDefinition) && (0,ramda__WEBPACK_IMPORTED_MODULE_0__.has)('type', componentDefinition) && (0,ramda__WEBPACK_IMPORTED_MODULE_0__.has)('props', componentDefinition))) { throw new Error('An object was provided as `children` instead of a component, ' + 'string, or number (or list of those). ' + 'Check the children property that looks something like:\n' + JSON.stringify(componentDefinition, null, 2)); } } /***/ }), /***/ "./src/utils/callbacks.ts": /*!********************************!*\ !*** ./src/utils/callbacks.ts ***! \********************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ getPendingCallbacks: function() { return /* binding */ getPendingCallbacks; } /* harmony export */ }); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js"); function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } var getPendingCallbacks = function getPendingCallbacks(state) { var _Array; return (_Array = Array()).concat.apply(_Array, _toConsumableArray((0,ramda__WEBPACK_IMPORTED_MODULE_0__.values)((0,ramda__WEBPACK_IMPORTED_MODULE_0__.omit)(['stored', 'completed'], state)))); }; /***/ }), /***/ "./src/utils/wait.ts": /*!***************************!*\ !*** ./src/utils/wait.ts ***! \***************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } /* harmony default export */ __webpack_exports__["default"] = (/*#__PURE__*/(function () { var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(duration) { var _resolve, p; return _regeneratorRuntime().wrap(function _callee$(_context) { while (1) switch (_context.prev = _context.next) { case 0: p = new Promise(function (resolve) { return _resolve = resolve; }); setTimeout(_resolve, duration); return _context.abrupt("return", p); case 3: case "end": return _context.stop(); } }, _callee); })); return function (_x) { return _ref.apply(this, arguments); }; })()); /***/ }), /***/ "./src/APIController.react.js": /*!************************************!*\ !*** ./src/APIController.react.js ***! \************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ DashContext: function() { return /* binding */ DashContext; } /* harmony export */ }); /* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js"); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _TreeContainer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./TreeContainer */ "./src/TreeContainer.js"); /* harmony import */ var _components_error_GlobalErrorContainer_react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./components/error/GlobalErrorContainer.react */ "./src/components/error/GlobalErrorContainer.react.js"); /* harmony import */ var _actions__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./actions */ "./src/actions/index.js"); /* harmony import */ var _actions_paths__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./actions/paths */ "./src/actions/paths.js"); /* harmony import */ var _actions_dependencies__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./actions/dependencies */ "./src/actions/dependencies.js"); /* harmony import */ var _actions_api__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./actions/api */ "./src/actions/api.js"); /* harmony import */ var _actions_utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./actions/utils */ "./src/actions/utils.js"); /* harmony import */ var _persistence__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./persistence */ "./src/persistence.js"); /* harmony import */ var _reducers_constants__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./reducers/constants */ "./src/reducers/constants.js"); /* harmony import */ var _constants_constants__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./constants/constants */ "./src/constants/constants.js"); /* harmony import */ var _utils_TreeContainer__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./utils/TreeContainer */ "./src/utils/TreeContainer.ts"); /* harmony import */ var _utils_wait__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./utils/wait */ "./src/utils/wait.ts"); function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } var DashContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_2__.createContext)({}); /** * Fire off API calls for initialization * @param {*} props props * @returns {*} component */ var UnconnectedContainer = function UnconnectedContainer(props) { var appLifecycle = props.appLifecycle, config = props.config, dependenciesRequest = props.dependenciesRequest, error = props.error, layoutRequest = props.layoutRequest, layout = props.layout, loadingMap = props.loadingMap; var _useState = (0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(false), _useState2 = _slicedToArray(_useState, 2), errorLoading = _useState2[0], setErrorLoading = _useState2[1]; var events = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)(null); if (!events.current) { events.current = new _actions_utils__WEBPACK_IMPORTED_MODULE_10__.EventEmitter(); } var renderedTree = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)(false); var propsRef = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)({}); propsRef.current = props; var provider = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)({ fn: function fn() { return { _dashprivate_config: propsRef.current.config, _dashprivate_dispatch: propsRef.current.dispatch, _dashprivate_graphs: propsRef.current.graphs, _dashprivate_loadingMap: propsRef.current.loadingMap }; } }); (0,react__WEBPACK_IMPORTED_MODULE_2__.useEffect)(storeEffect.bind(null, props, events, setErrorLoading)); (0,react__WEBPACK_IMPORTED_MODULE_2__.useEffect)(function () { if (renderedTree.current) { _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() { return _regeneratorRuntime().wrap(function _callee$(_context) { while (1) switch (_context.prev = _context.next) { case 0: renderedTree.current = false; _context.next = 3; return (0,_utils_wait__WEBPACK_IMPORTED_MODULE_15__["default"])(0); case 3: events.current.emit('rendered'); case 4: case "end": return _context.stop(); } }, _callee); }))(); } }); (0,react__WEBPACK_IMPORTED_MODULE_2__.useEffect)(function () { if (config.serve_locally) { window._dashPlotlyJSURL = "".concat(config.requests_pathname_prefix, "_dash-component-suites/plotly/package_data/plotly.min.js"); } else { window._dashPlotlyJSURL = config.plotlyjs_url; } }, []); var content; if (layoutRequest.status && !(0,ramda__WEBPACK_IMPORTED_MODULE_1__.includes)(layoutRequest.status, [_constants_constants__WEBPACK_IMPORTED_MODULE_13__.STATUS.OK, 'loading'])) { content = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement("div", { className: "_dash-error" }, "Error loading layout"); } else if (errorLoading || dependenciesRequest.status && !(0,ramda__WEBPACK_IMPORTED_MODULE_1__.includes)(dependenciesRequest.status, [_constants_constants__WEBPACK_IMPORTED_MODULE_13__.STATUS.OK, 'loading'])) { content = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement("div", { className: "_dash-error" }, "Error loading dependencies"); } else if (appLifecycle === (0,_reducers_constants__WEBPACK_IMPORTED_MODULE_12__.getAppState)('HYDRATED')) { renderedTree.current = true; content = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(DashContext.Provider, { value: provider.current }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_TreeContainer__WEBPACK_IMPORTED_MODULE_4__["default"], { _dashprivate_error: error, _dashprivate_layout: layout, _dashprivate_loadingState: (0,_utils_TreeContainer__WEBPACK_IMPORTED_MODULE_14__.getLoadingState)(layout, [], loadingMap), _dashprivate_loadingStateHash: (0,_utils_TreeContainer__WEBPACK_IMPORTED_MODULE_14__.getLoadingHash)([], loadingMap), _dashprivate_path: JSON.stringify([]) })); } else { content = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement("div", { className: "_dash-loading" }, "Loading..."); } return config && config.ui === true ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_components_error_GlobalErrorContainer_react__WEBPACK_IMPORTED_MODULE_5__["default"], null, content) : content; }; function storeEffect(props, events, setErrorLoading) { var appLifecycle = props.appLifecycle, dependenciesRequest = props.dependenciesRequest, dispatch = props.dispatch, error = props.error, graphs = props.graphs, hooks = props.hooks, layout = props.layout, layoutRequest = props.layoutRequest; (0,react_redux__WEBPACK_IMPORTED_MODULE_0__.batch)(function () { if ((0,ramda__WEBPACK_IMPORTED_MODULE_1__.isEmpty)(layoutRequest)) { if (typeof hooks.layout_pre === 'function') { hooks.layout_pre(); } dispatch((0,_actions_api__WEBPACK_IMPORTED_MODULE_9__["default"])('_dash-layout', 'GET', 'layoutRequest')); } else if (layoutRequest.status === _constants_constants__WEBPACK_IMPORTED_MODULE_13__.STATUS.OK) { if ((0,ramda__WEBPACK_IMPORTED_MODULE_1__.isEmpty)(layout)) { if (typeof hooks.layout_post === 'function') { hooks.layout_post(layoutRequest.content); } var finalLayout = (0,_persistence__WEBPACK_IMPORTED_MODULE_11__.applyPersistence)(layoutRequest.content, dispatch); dispatch((0,_actions__WEBPACK_IMPORTED_MODULE_6__.setPaths)((0,_actions_paths__WEBPACK_IMPORTED_MODULE_7__.computePaths)(finalLayout, [], null, events.current))); dispatch((0,_actions__WEBPACK_IMPORTED_MODULE_6__.setLayout)(finalLayout)); } } if ((0,ramda__WEBPACK_IMPORTED_MODULE_1__.isEmpty)(dependenciesRequest)) { dispatch((0,_actions_api__WEBPACK_IMPORTED_MODULE_9__["default"])('_dash-dependencies', 'GET', 'dependenciesRequest')); } else if (dependenciesRequest.status === _constants_constants__WEBPACK_IMPORTED_MODULE_13__.STATUS.OK && (0,ramda__WEBPACK_IMPORTED_MODULE_1__.isEmpty)(graphs)) { dispatch((0,_actions__WEBPACK_IMPORTED_MODULE_6__.setGraphs)((0,_actions_dependencies__WEBPACK_IMPORTED_MODULE_8__.computeGraphs)(dependenciesRequest.content, (0,_actions__WEBPACK_IMPORTED_MODULE_6__.dispatchError)(dispatch)))); } if ( // dependenciesRequest and its computed stores dependenciesRequest.status === _constants_constants__WEBPACK_IMPORTED_MODULE_13__.STATUS.OK && !(0,ramda__WEBPACK_IMPORTED_MODULE_1__.isEmpty)(graphs) && // LayoutRequest and its computed stores layoutRequest.status === _constants_constants__WEBPACK_IMPORTED_MODULE_13__.STATUS.OK && !(0,ramda__WEBPACK_IMPORTED_MODULE_1__.isEmpty)(layout) && // Hasn't already hydrated appLifecycle === (0,_reducers_constants__WEBPACK_IMPORTED_MODULE_12__.getAppState)('STARTED')) { var hasError = false; try { dispatch((0,_actions__WEBPACK_IMPORTED_MODULE_6__.hydrateInitialOutputs)((0,_actions__WEBPACK_IMPORTED_MODULE_6__.dispatchError)(dispatch))); } catch (err) { // Display this error in devtools, unless we have errors // already, in which case we assume this new one is moot if (!error.frontEnd.length && !error.backEnd.length) { dispatch((0,_actions__WEBPACK_IMPORTED_MODULE_6__.onError)({ type: 'backEnd', error: err })); } hasError = true; } finally { setErrorLoading(hasError); } } }); } UnconnectedContainer.propTypes = { appLifecycle: prop_types__WEBPACK_IMPORTED_MODULE_3___default().oneOf([(0,_reducers_constants__WEBPACK_IMPORTED_MODULE_12__.getAppState)('STARTED'), (0,_reducers_constants__WEBPACK_IMPORTED_MODULE_12__.getAppState)('HYDRATED'), (0,_reducers_constants__WEBPACK_IMPORTED_MODULE_12__.getAppState)('DESTROYED')]), dispatch: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().func), dependenciesRequest: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().object), graphs: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().object), hooks: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().object), layoutRequest: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().object), layout: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().object), loadingMap: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().any), history: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().any), error: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().object), config: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().object) }; var Container = (0,react_redux__WEBPACK_IMPORTED_MODULE_0__.connect)( // map state to props function (state) { return { appLifecycle: state.appLifecycle, dependenciesRequest: state.dependenciesRequest, hooks: state.hooks, layoutRequest: state.layoutRequest, layout: state.layout, loadingMap: state.loadingMap, graphs: state.graphs, history: state.history, error: state.error, config: state.config }; }, function (dispatch) { return { dispatch }; })(UnconnectedContainer); /* harmony default export */ __webpack_exports__["default"] = (Container); /***/ }), /***/ "./src/AppContainer.react.js": /*!***********************************!*\ !*** ./src/AppContainer.react.js ***! \***********************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _APIController_react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./APIController.react */ "./src/APIController.react.js"); /* harmony import */ var _components_core_Loading_react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./components/core/Loading.react */ "./src/components/core/Loading.react.js"); /* harmony import */ var _components_core_Toolbar_react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./components/core/Toolbar.react */ "./src/components/core/Toolbar.react.js"); /* harmony import */ var _components_core_Reloader_react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./components/core/Reloader.react */ "./src/components/core/Reloader.react.js"); /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./config */ "./src/config.ts"); /* harmony import */ var _actions_index__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./actions/index */ "./src/actions/index.js"); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js"); function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } var UnconnectedAppContainer = /*#__PURE__*/function (_React$Component) { _inherits(UnconnectedAppContainer, _React$Component); var _super = _createSuper(UnconnectedAppContainer); function UnconnectedAppContainer(props) { var _this; _classCallCheck(this, UnconnectedAppContainer); _this = _super.call(this, props); if (props.hooks.layout_pre !== null || props.hooks.layout_post !== null || props.hooks.request_pre !== null || props.hooks.request_post !== null || props.hooks.callback_resolved !== null || props.hooks.request_refresh_jwt !== null) { var hooks = props.hooks; if (hooks.request_refresh_jwt) { hooks = _objectSpread(_objectSpread({}, hooks), {}, { request_refresh_jwt: (0,ramda__WEBPACK_IMPORTED_MODULE_9__.memoizeWith)(ramda__WEBPACK_IMPORTED_MODULE_9__.identity, hooks.request_refresh_jwt) }); } props.dispatch((0,_actions_index__WEBPACK_IMPORTED_MODULE_8__.setHooks)(hooks)); } return _this; } _createClass(UnconnectedAppContainer, [{ key: "UNSAFE_componentWillMount", value: function UNSAFE_componentWillMount() { var dispatch = this.props.dispatch; var config = (0,_config__WEBPACK_IMPORTED_MODULE_7__["default"])(); // preset common request params in the config config.fetch = { credentials: 'same-origin', headers: { Accept: 'application/json', 'Content-Type': 'application/json' } }; dispatch((0,_actions_index__WEBPACK_IMPORTED_MODULE_8__.setConfig)(config)); } }, { key: "render", value: function render() { var config = this.props.config; if ((0,ramda__WEBPACK_IMPORTED_MODULE_9__.type)(config) === 'Null') { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: "_dash-loading" }, "Loading..."); } var show_undo_redo = config.show_undo_redo; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement((react__WEBPACK_IMPORTED_MODULE_1___default().Fragment), null, show_undo_redo ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_components_core_Toolbar_react__WEBPACK_IMPORTED_MODULE_5__["default"], null) : null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_APIController_react__WEBPACK_IMPORTED_MODULE_3__["default"], null), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_components_core_Loading_react__WEBPACK_IMPORTED_MODULE_4__["default"], null), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_components_core_Reloader_react__WEBPACK_IMPORTED_MODULE_6__["default"], null)); } }]); return UnconnectedAppContainer; }((react__WEBPACK_IMPORTED_MODULE_1___default().Component)); UnconnectedAppContainer.propTypes = { hooks: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().object), dispatch: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().func), config: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().object) }; var AppContainer = (0,react_redux__WEBPACK_IMPORTED_MODULE_0__.connect)(function (state) { return { history: state.history, config: state.config }; }, function (dispatch) { return { dispatch }; })(UnconnectedAppContainer); /* harmony default export */ __webpack_exports__["default"] = (AppContainer); /***/ }), /***/ "./src/DashRenderer.js": /*!*****************************!*\ !*** ./src/DashRenderer.js ***! \*****************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ DashRenderer: function() { return /* binding */ DashRenderer; } /* harmony export */ }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ "react-dom"); /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _AppProvider_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AppProvider.react */ "./src/AppProvider.react.tsx"); function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var DashRenderer = /*#__PURE__*/_createClass(function DashRenderer(hooks) { _classCallCheck(this, DashRenderer); // render Dash Renderer upon initialising! var container = document.getElementById('react-entry-point'); if ((react_dom__WEBPACK_IMPORTED_MODULE_1___default().createRoot)) { var root = react_dom__WEBPACK_IMPORTED_MODULE_1___default().createRoot(container); root.render( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_AppProvider_react__WEBPACK_IMPORTED_MODULE_2__["default"], { hooks: hooks })); } else { react_dom__WEBPACK_IMPORTED_MODULE_1___default().render( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_AppProvider_react__WEBPACK_IMPORTED_MODULE_2__["default"], { hooks: hooks }), container); } }); /***/ }), /***/ "./src/TreeContainer.js": /*!******************************!*\ !*** ./src/TreeContainer.js ***! \******************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _registry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./registry */ "./src/registry.js"); /* harmony import */ var _exceptions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./exceptions */ "./src/exceptions.js"); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js"); /* harmony import */ var _actions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./actions */ "./src/actions/index.js"); /* harmony import */ var _isSimpleComponent__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./isSimpleComponent */ "./src/isSimpleComponent.js"); /* harmony import */ var _persistence__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./persistence */ "./src/persistence.js"); /* harmony import */ var _components_error_ComponentErrorBoundary_react__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./components/error/ComponentErrorBoundary.react */ "./src/components/error/ComponentErrorBoundary.react.js"); /* harmony import */ var _checkPropTypes__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./checkPropTypes */ "./src/checkPropTypes.js"); /* harmony import */ var _actions_dependencies__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./actions/dependencies */ "./src/actions/dependencies.js"); /* harmony import */ var _utils_TreeContainer__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utils/TreeContainer */ "./src/utils/TreeContainer.ts"); /* harmony import */ var _APIController_react__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./APIController.react */ "./src/APIController.react.js"); /* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js"); function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } var NOT_LOADING = { is_loading: false }; function CheckedComponent(p) { var element = p.element, extraProps = p.extraProps, props = p.props, children = p.children, type = p.type; var errorMessage = (0,_checkPropTypes__WEBPACK_IMPORTED_MODULE_9__["default"])(element.propTypes, props, 'component prop', element); if (errorMessage) { (0,_exceptions__WEBPACK_IMPORTED_MODULE_3__.propTypeErrorHandler)(errorMessage, props, type); } return createElement(element, props, extraProps, children); } CheckedComponent.propTypes = { children: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().any), element: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().any), layout: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().any), props: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().any), extraProps: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().any), id: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string) }; function createElement(element, props, extraProps, children) { var allProps = (0,ramda__WEBPACK_IMPORTED_MODULE_4__.mergeRight)(props, extraProps); if (Array.isArray(children)) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement.apply((react__WEBPACK_IMPORTED_MODULE_0___default()), [element, allProps].concat(_toConsumableArray(children))); } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(element, allProps, children); } function isDryComponent(obj) { return (0,ramda__WEBPACK_IMPORTED_MODULE_4__.type)(obj) === 'Object' && (0,ramda__WEBPACK_IMPORTED_MODULE_4__.has)('type', obj) && (0,ramda__WEBPACK_IMPORTED_MODULE_4__.has)('namespace', obj) && (0,ramda__WEBPACK_IMPORTED_MODULE_4__.has)('props', obj); } var DashWrapper = function DashWrapper(props) { var context = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_APIController_react__WEBPACK_IMPORTED_MODULE_12__.DashContext); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(BaseTreeContainer, _extends({}, context.fn(), props, { _dashprivate_path: JSON.parse(props._dashprivate_path) })); }; var TreeContainer = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.memo)(DashWrapper); var BaseTreeContainer = /*#__PURE__*/function (_Component) { _inherits(BaseTreeContainer, _Component); var _super = _createSuper(BaseTreeContainer); function BaseTreeContainer(props) { var _this; _classCallCheck(this, BaseTreeContainer); _this = _super.call(this, props); _this.setProps = _this.setProps.bind(_assertThisInitialized(_this)); return _this; } _createClass(BaseTreeContainer, [{ key: "createContainer", value: function createContainer(props, component, path) { var key = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : undefined; return (0,_isSimpleComponent__WEBPACK_IMPORTED_MODULE_6__["default"])(component) ? component : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(TreeContainer, { key: component && component.props && (0,_actions_dependencies__WEBPACK_IMPORTED_MODULE_10__.stringifyId)(component.props.id) || key, _dashprivate_error: props._dashprivate_error, _dashprivate_layout: component, _dashprivate_loadingState: (0,_utils_TreeContainer__WEBPACK_IMPORTED_MODULE_11__.getLoadingState)(component, path, props._dashprivate_loadingMap), _dashprivate_loadingStateHash: (0,_utils_TreeContainer__WEBPACK_IMPORTED_MODULE_11__.getLoadingHash)(path, props._dashprivate_loadingMap), _dashprivate_path: JSON.stringify(path) }); } }, { key: "setProps", value: function setProps(newProps) { var _this$props = this.props, _dashprivate_dispatch = _this$props._dashprivate_dispatch, _dashprivate_path = _this$props._dashprivate_path, _dashprivate_layout = _this$props._dashprivate_layout; var oldProps = this.getLayoutProps(); var id = oldProps.id; var changedProps = (0,ramda__WEBPACK_IMPORTED_MODULE_4__.pickBy)(function (val, key) { return !(0,ramda__WEBPACK_IMPORTED_MODULE_4__.equals)(val, oldProps[key]); }, newProps); if (!(0,ramda__WEBPACK_IMPORTED_MODULE_4__.isEmpty)(changedProps)) { _dashprivate_dispatch(function (dispatch, getState) { var _getState = getState(), graphs = _getState.graphs; // Identify the modified props that are required for callbacks var watchedKeys = (0,_actions_dependencies__WEBPACK_IMPORTED_MODULE_10__.getWatchedKeys)(id, (0,ramda__WEBPACK_IMPORTED_MODULE_4__.keys)(changedProps), graphs); (0,react_redux__WEBPACK_IMPORTED_MODULE_13__.batch)(function () { // setProps here is triggered by the UI - record these changes // for persistence (0,_persistence__WEBPACK_IMPORTED_MODULE_7__.recordUiEdit)(_dashprivate_layout, newProps, dispatch); // Only dispatch changes to Dash if a watched prop changed if (watchedKeys.length) { dispatch((0,_actions__WEBPACK_IMPORTED_MODULE_5__.notifyObservers)({ id, props: (0,ramda__WEBPACK_IMPORTED_MODULE_4__.pick)(watchedKeys, changedProps) })); } // Always update this component's props dispatch((0,_actions__WEBPACK_IMPORTED_MODULE_5__.updateProps)({ props: changedProps, itempath: _dashprivate_path })); }); }); } } }, { key: "getChildren", value: function getChildren(components, path) { var _this2 = this; if ((0,ramda__WEBPACK_IMPORTED_MODULE_4__.isNil)(components)) { return null; } return Array.isArray(components) ? (0,ramda__WEBPACK_IMPORTED_MODULE_4__.addIndex)(ramda__WEBPACK_IMPORTED_MODULE_4__.map)(function (component, i) { return _this2.createContainer(_this2.props, component, (0,ramda__WEBPACK_IMPORTED_MODULE_4__.concat)(path, ['props', 'children', i])); }, components) : this.createContainer(this.props, components, (0,ramda__WEBPACK_IMPORTED_MODULE_4__.concat)(path, ['props', 'children'])); } }, { key: "wrapChildrenProp", value: function wrapChildrenProp(node, childrenProp) { var _this3 = this; if (Array.isArray(node)) { return node.map(function (n, i) { return isDryComponent(n) ? _this3.createContainer(_this3.props, n, (0,ramda__WEBPACK_IMPORTED_MODULE_4__.concat)(_this3.props._dashprivate_path, ['props'].concat(_toConsumableArray(childrenProp), [i])), i) : n; }); } if (!isDryComponent(node)) { return node; } return this.createContainer(this.props, node, (0,ramda__WEBPACK_IMPORTED_MODULE_4__.concat)(this.props._dashprivate_path, ['props'].concat(_toConsumableArray(childrenProp)))); } }, { key: "getComponent", value: function getComponent(_dashprivate_layout, children, loading_state, setProps) { var _this4 = this; var _this$props2 = this.props, _dashprivate_config = _this$props2._dashprivate_config, _dashprivate_dispatch = _this$props2._dashprivate_dispatch, _dashprivate_error = _this$props2._dashprivate_error; if ((0,ramda__WEBPACK_IMPORTED_MODULE_4__.isEmpty)(_dashprivate_layout)) { return null; } if ((0,_isSimpleComponent__WEBPACK_IMPORTED_MODULE_6__["default"])(_dashprivate_layout)) { return _dashprivate_layout; } (0,_utils_TreeContainer__WEBPACK_IMPORTED_MODULE_11__.validateComponent)(_dashprivate_layout); var element = _registry__WEBPACK_IMPORTED_MODULE_2__["default"].resolve(_dashprivate_layout); // Hydrate components props var childrenProps = (0,ramda__WEBPACK_IMPORTED_MODULE_4__.pathOr)([], ['children_props', _dashprivate_layout.namespace, _dashprivate_layout.type], _dashprivate_config); var props = (0,ramda__WEBPACK_IMPORTED_MODULE_4__.dissoc)('children', _dashprivate_layout.props); var _loop = function _loop() { var childrenProp = childrenProps[i]; var handleObject = function handleObject(obj, opath) { return (0,ramda__WEBPACK_IMPORTED_MODULE_4__.mapObjIndexed)(function (node, k) { return _this4.wrapChildrenProp(node, [].concat(_toConsumableArray(opath), [k])); }, obj); }; if (childrenProp.includes('.')) { var path = childrenProp.split('.'); var node; var nodeValue; if (childrenProp.includes('[]')) { var frontPath = [], backPath = [], found = false, hasObject = false; path.forEach(function (p) { if (!found) { if (p.includes('[]')) { found = true; if (p.includes('{}')) { hasObject = true; frontPath.push(p.replace('{}', '').replace('[]', '')); } else { frontPath.push(p.replace('[]', '')); } } else if (p.includes('{}')) { hasObject = true; frontPath.push(p.replace('{}', '')); } else { frontPath.push(p); } } else { if (p.includes('{}')) { hasObject = true; backPath.push(p.replace('{}', '')); } else { backPath.push(p); } } }); node = (0,ramda__WEBPACK_IMPORTED_MODULE_4__.path)(frontPath, props); if (node === undefined || !node.length) { return 0; // continue } var firstNode = (0,ramda__WEBPACK_IMPORTED_MODULE_4__.path)(backPath, node[0]); if (!firstNode) { return 0; // continue } nodeValue = node.map(function (element, i) { var elementPath = (0,ramda__WEBPACK_IMPORTED_MODULE_4__.concat)(frontPath, (0,ramda__WEBPACK_IMPORTED_MODULE_4__.concat)([i], backPath)); var listValue; if (hasObject) { if (backPath.length) { listValue = handleObject((0,ramda__WEBPACK_IMPORTED_MODULE_4__.path)(backPath, element), elementPath); } else { listValue = handleObject(element, elementPath); } } else { listValue = _this4.wrapChildrenProp((0,ramda__WEBPACK_IMPORTED_MODULE_4__.path)(backPath, element), elementPath); } return (0,ramda__WEBPACK_IMPORTED_MODULE_4__.assocPath)(backPath, listValue, element); }); path = frontPath; } else { if (childrenProp.includes('{}')) { // Only supports one level of nesting. var front = []; var dynamic = []; var hasBack = false; var _backPath = []; for (var j = 0; j < path.length; j++) { var cur = path[j]; if (cur.includes('{}')) { dynamic = (0,ramda__WEBPACK_IMPORTED_MODULE_4__.concat)(front, [cur.replace('{}', '')]); if (j < path.length - 1) { hasBack = true; } } else { if (hasBack) { _backPath.push(cur); } else { front.push(cur); } } } var dynValue = (0,ramda__WEBPACK_IMPORTED_MODULE_4__.path)(dynamic, props); if (dynValue !== undefined) { nodeValue = (0,ramda__WEBPACK_IMPORTED_MODULE_4__.mapObjIndexed)(function (d, k) { return _this4.wrapChildrenProp(hasBack ? (0,ramda__WEBPACK_IMPORTED_MODULE_4__.path)(_backPath, d) : d, hasBack ? (0,ramda__WEBPACK_IMPORTED_MODULE_4__.concat)(dynamic, (0,ramda__WEBPACK_IMPORTED_MODULE_4__.concat)([k], _backPath)) : (0,ramda__WEBPACK_IMPORTED_MODULE_4__.concat)(dynamic, [k])); }, dynValue); path = dynamic; } } else { node = (0,ramda__WEBPACK_IMPORTED_MODULE_4__.path)(path, props); if (node === undefined) { return 0; // continue } nodeValue = _this4.wrapChildrenProp(node, path); } } props = (0,ramda__WEBPACK_IMPORTED_MODULE_4__.assocPath)(path, nodeValue, props); } else { if (childrenProp.includes('{}')) { var opath = childrenProp.replace('{}', ''); var isArray = childrenProp.includes('[]'); if (isArray) { opath = opath.replace('[]', ''); } var _node = props[opath]; if (_node !== undefined) { if (isArray) { for (var _j = 0; _j < _node.length; _j++) { var aPath = (0,ramda__WEBPACK_IMPORTED_MODULE_4__.concat)([opath], [_j]); props = (0,ramda__WEBPACK_IMPORTED_MODULE_4__.assocPath)(aPath, handleObject(_node[_j], aPath), props); } } else { props = (0,ramda__WEBPACK_IMPORTED_MODULE_4__.assoc)(opath, handleObject(_node, [opath]), props); } } } else { var _node2 = props[childrenProp]; if (_node2 !== undefined) { props = (0,ramda__WEBPACK_IMPORTED_MODULE_4__.assoc)(childrenProp, _this4.wrapChildrenProp(_node2, [childrenProp]), props); } } } }, _ret; for (var i = 0; i < childrenProps.length; i++) { _ret = _loop(); if (_ret === 0) continue; } if ((0,ramda__WEBPACK_IMPORTED_MODULE_4__.type)(props.id) === 'Object') { // Turn object ids (for wildcards) into unique strings. // Because of the `dissoc` above we're not mutating the layout, // just the id we pass on to the rendered component props.id = (0,_actions_dependencies__WEBPACK_IMPORTED_MODULE_10__.stringifyId)(props.id); } var extraProps = { loading_state: loading_state || NOT_LOADING, setProps }; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_components_error_ComponentErrorBoundary_react__WEBPACK_IMPORTED_MODULE_8__["default"], { componentType: _dashprivate_layout.type, componentId: props.id, key: props.id, dispatch: _dashprivate_dispatch, error: _dashprivate_error }, _dashprivate_config.props_check ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(CheckedComponent, { children: children, element: element, props: props, extraProps: extraProps, type: _dashprivate_layout.type }) : createElement(element, props, extraProps, children)); } }, { key: "getLayoutProps", value: function getLayoutProps() { return (0,ramda__WEBPACK_IMPORTED_MODULE_4__.propOr)({}, 'props', this.props._dashprivate_layout); } }, { key: "render", value: function render() { var _this$props3 = this.props, _dashprivate_layout = _this$props3._dashprivate_layout, _dashprivate_loadingState = _this$props3._dashprivate_loadingState, _dashprivate_path = _this$props3._dashprivate_path; var layoutProps = this.getLayoutProps(); var children = this.getChildren(layoutProps.children, _dashprivate_path); return this.getComponent(_dashprivate_layout, children, _dashprivate_loadingState, this.setProps); } }]); return BaseTreeContainer; }(react__WEBPACK_IMPORTED_MODULE_0__.Component); TreeContainer.propTypes = { _dashprivate_error: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().any), _dashprivate_layout: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().object), _dashprivate_loadingState: prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_1___default().object), (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool)]), _dashprivate_loadingStateHash: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string), _dashprivate_path: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string) }; BaseTreeContainer.propTypes = _objectSpread(_objectSpread({}, TreeContainer.propTypes), {}, { _dashprivate_config: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().object), _dashprivate_dispatch: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func), _dashprivate_graphs: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().any), _dashprivate_loadingMap: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().any), _dashprivate_path: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().array) }); /* harmony default export */ __webpack_exports__["default"] = (TreeContainer); /***/ }), /***/ "./src/actions/api.js": /*!****************************!*\ !*** ./src/actions/api.js ***! \****************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ apiThunk; } /* harmony export */ }); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js"); /* harmony import */ var _actions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../actions */ "./src/actions/index.js"); /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils */ "./src/actions/utils.js"); /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./constants */ "./src/actions/constants.js"); /* harmony import */ var _constants_constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../constants/constants */ "./src/constants/constants.js"); function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } /* eslint-disable-next-line no-console */ var logWarningOnce = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.once)(console.warn); function GET(path, fetchConfig) { return fetch(path, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.mergeDeepRight)(fetchConfig, { method: 'GET', headers: (0,_actions__WEBPACK_IMPORTED_MODULE_1__.getCSRFHeader)() })); } function POST(path, fetchConfig) { var body = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; return fetch(path, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.mergeDeepRight)(fetchConfig, { method: 'POST', headers: (0,_actions__WEBPACK_IMPORTED_MODULE_1__.getCSRFHeader)(), body: body ? JSON.stringify(body) : null })); } var request = { GET, POST }; function apiThunk(endpoint, method, store, id, body) { return /*#__PURE__*/function () { var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(dispatch, getState) { var _getState, config, hooks, newHeaders, url, setConnectionStatus, res, retry, _body, newJwt, contentType, message; return _regeneratorRuntime().wrap(function _callee$(_context) { while (1) switch (_context.prev = _context.next) { case 0: setConnectionStatus = function _setConnectionStatus(connected) { if (getState().error.backEndConnected !== connected) { dispatch({ type: 'SET_CONNECTION_STATUS', payload: connected }); } }; _getState = getState(), config = _getState.config, hooks = _getState.hooks; newHeaders = null; url = "".concat((0,_utils__WEBPACK_IMPORTED_MODULE_2__.urlBase)(config)).concat(endpoint); dispatch({ type: store, payload: { id, status: 'loading' } }); _context.prev = 5; retry = 0; case 7: if (!(retry <= _constants__WEBPACK_IMPORTED_MODULE_3__.MAX_AUTH_RETRIES)) { _context.next = 36; break; } _context.prev = 8; _context.next = 11; return request[method](url, config.fetch, body); case 11: res = _context.sent; _context.next = 19; break; case 14: _context.prev = 14; _context.t0 = _context["catch"](8); // fetch rejection - this means the request didn't return, // we don't get here from 400/500 errors, only network // errors or unresponsive servers. // eslint-disable-next-line no-console console.log('fetch error', res); setConnectionStatus(false); return _context.abrupt("return"); case 19: if (!(res.status === _constants_constants__WEBPACK_IMPORTED_MODULE_4__.STATUS.UNAUTHORIZED || res.status === _constants_constants__WEBPACK_IMPORTED_MODULE_4__.STATUS.BAD_REQUEST)) { _context.next = 32; break; } if (!hooks.request_refresh_jwt) { _context.next = 32; break; } _context.next = 23; return res.text(); case 23: _body = _context.sent; if (!_body.includes(_constants_constants__WEBPACK_IMPORTED_MODULE_4__.JWT_EXPIRED_MESSAGE)) { _context.next = 32; break; } _context.next = 27; return hooks.request_refresh_jwt(config.fetch.headers.Authorization.substr('Bearer '.length)); case 27: newJwt = _context.sent; if (!newJwt) { _context.next = 32; break; } newHeaders = { Authorization: "Bearer ".concat(newJwt) }; config = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.mergeDeepRight)(config, { fetch: { headers: newHeaders } }); return _context.abrupt("continue", 33); case 32: return _context.abrupt("break", 36); case 33: retry++; _context.next = 7; break; case 36: contentType = res.headers.get('content-type'); if (newHeaders) { dispatch((0,_actions__WEBPACK_IMPORTED_MODULE_1__.addHttpHeaders)(newHeaders)); } setConnectionStatus(true); if (!(contentType && contentType.indexOf('application/json') !== -1)) { _context.next = 41; break; } return _context.abrupt("return", res.json().then(function (json) { dispatch({ type: store, payload: { status: res.status, content: json, id } }); return json; })); case 41: logWarningOnce('Response is missing header: content-type: application/json'); return _context.abrupt("return", dispatch({ type: store, payload: { id, status: res.status } })); case 45: _context.prev = 45; _context.t1 = _context["catch"](5); message = 'Error from API call: ' + endpoint; (0,_actions__WEBPACK_IMPORTED_MODULE_1__.handleAsyncError)(_context.t1, message, dispatch); case 49: case "end": return _context.stop(); } }, _callee, null, [[5, 45], [8, 14]]); })); return function (_x, _x2) { return _ref.apply(this, arguments); }; }(); } /***/ }), /***/ "./src/actions/constants.js": /*!**********************************!*\ !*** ./src/actions/constants.js ***! \**********************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ MAX_AUTH_RETRIES: function() { return /* binding */ MAX_AUTH_RETRIES; }, /* harmony export */ getAction: function() { return /* binding */ getAction; } /* harmony export */ }); var actionList = { ON_PROP_CHANGE: 1, SET_REQUEST_QUEUE: 1, SET_GRAPHS: 1, SET_PATHS: 1, SET_LAYOUT: 1, SET_APP_LIFECYCLE: 1, SET_CONFIG: 1, ADD_HTTP_HEADERS: 1, ON_ERROR: 1, SET_HOOKS: 1 }; var getAction = function getAction(action) { if (actionList[action]) { return action; } throw new Error("".concat(action, " is not defined.")); }; var MAX_AUTH_RETRIES = 1; /***/ }), /***/ "./src/actions/dependencies.js": /*!*************************************!*\ !*** ./src/actions/dependencies.js ***! \*************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ addAllResolvedFromOutputs: function() { return /* binding */ addAllResolvedFromOutputs; }, /* harmony export */ computeGraphs: function() { return /* binding */ computeGraphs; }, /* harmony export */ getUnfilteredLayoutCallbacks: function() { return /* binding */ getUnfilteredLayoutCallbacks; }, /* harmony export */ getWatchedKeys: function() { return /* binding */ getWatchedKeys; }, /* harmony export */ idMatch: function() { return /* binding */ idMatch; }, /* harmony export */ isMultiOutputProp: function() { return /* binding */ isMultiOutputProp; }, /* harmony export */ isMultiValued: function() { return /* binding */ isMultiValued; }, /* harmony export */ parseIfWildcard: function() { return /* binding */ parseIfWildcard; }, /* harmony export */ splitIdAndProp: function() { return /* binding */ splitIdAndProp; }, /* harmony export */ stringifyId: function() { return /* binding */ stringifyId; }, /* harmony export */ validateCallbacksToLayout: function() { return /* binding */ validateCallbacksToLayout; } /* harmony export */ }); /* harmony import */ var dependency_graph__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! dependency-graph */ "./node_modules/dependency-graph/lib/dep_graph.js"); /* harmony import */ var fast_isnumeric__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! fast-isnumeric */ "./node_modules/fast-isnumeric/index.js"); /* harmony import */ var fast_isnumeric__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(fast_isnumeric__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js"); /* harmony import */ var _dependencies_ts__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./dependencies_ts */ "./src/actions/dependencies_ts.ts"); /* harmony import */ var _paths__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./paths */ "./src/actions/paths.js"); /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils */ "./src/actions/utils.js"); /* harmony import */ var _registry__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../registry */ "./src/registry.js"); function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } /* * If this update is for multiple outputs, then it has * starting & trailing `..` and each propId pair is separated * by `...`, e.g. * "..output-1.value...output-2.value...output-3.value...output-4.value.." */ var isMultiOutputProp = function isMultiOutputProp(idAndProp) { return idAndProp.startsWith('..'); }; var ALL = { wild: 'ALL', multi: 1 }; var MATCH = { wild: 'MATCH' }; var ALLSMALLER = { wild: 'ALLSMALLER', multi: 1, expand: 1 }; var wildcards = { ALL, MATCH, ALLSMALLER }; var allowedWildcards = { Output: { ALL, MATCH }, Input: wildcards, State: wildcards }; var wildcardValTypes = ['string', 'number', 'boolean']; var idInvalidChars = ['.', '{']; /* * If this ID is a wildcard, it is a stringified JSON object * the "{" character is disallowed from regular string IDs */ var isWildcardId = function isWildcardId(idStr) { return idStr.startsWith('{'); }; /* * Turn stringified wildcard IDs into objects. * Wildcards are encoded as single-item arrays containing the wildcard name * as a string. */ function parseWildcardId(idStr) { return (0,ramda__WEBPACK_IMPORTED_MODULE_2__.map)(function (val) { return Array.isArray(val) && wildcards[val[0]] || val; }, JSON.parse(idStr)); } /* * If this update is for multiple outputs, then it has * starting & trailing `..` and each propId pair is separated * by `...`, e.g. * "..output-1.value...output-2.value...output-3.value...output-4.value.." */ function parseMultipleOutputs(outputIdAndProp) { return outputIdAndProp.substr(2, outputIdAndProp.length - 4).split('...'); } function splitIdAndProp(idAndProp) { // since wildcard ids can have . in them but props can't, // look for the last . in the string and split there var dotPos = idAndProp.lastIndexOf('.'); var idStr = idAndProp.substr(0, dotPos); return { id: parseIfWildcard(idStr), property: idAndProp.substr(dotPos + 1) }; } /* * Check if this ID is a stringified object, and if so parse it to that object */ function parseIfWildcard(idStr) { return isWildcardId(idStr) ? parseWildcardId(idStr) : idStr; } /* * JSON.stringify - for the object form - but ensuring keys are sorted */ function stringifyId(id) { if (typeof id !== 'object') { return id; } var stringifyVal = function stringifyVal(v) { return v && v.wild || JSON.stringify(v); }; var parts = Object.keys(id).sort().map(function (k) { return JSON.stringify(k) + ':' + stringifyVal(id[k]); }); return '{' + parts.join(',') + '}'; } /* * id dict values can be numbers, strings, and booleans. * We need a definite ordering that will work across types, * even if sane users would not mix types. * - numeric strings are treated as numbers * - booleans come after numbers, before strings. false, then true. * - non-numeric strings come last */ function idValSort(a, b) { var bIsNumeric = fast_isnumeric__WEBPACK_IMPORTED_MODULE_1___default()(b); if (fast_isnumeric__WEBPACK_IMPORTED_MODULE_1___default()(a)) { if (bIsNumeric) { var aN = Number(a); var bN = Number(b); return aN > bN ? 1 : aN < bN ? -1 : 0; } return -1; } if (bIsNumeric) { return 1; } var aIsBool = typeof a === 'boolean'; if (aIsBool !== (typeof b === 'boolean')) { return aIsBool ? -1 : 1; } return a > b ? 1 : a < b ? -1 : 0; } /* * Provide a value known to be before or after v, according to idValSort */ var valBefore = function valBefore(v) { return fast_isnumeric__WEBPACK_IMPORTED_MODULE_1___default()(v) ? v - 1 : 0; }; var valAfter = function valAfter(v) { return typeof v === 'string' ? v + 'z' : 'z'; }; function addMap(depMap, id, prop, dependency) { var idMap = depMap[id] = depMap[id] || {}; var callbacks = idMap[prop] = idMap[prop] || []; callbacks.push(dependency); } function addPattern(depMap, idSpec, prop, dependency) { var keys = Object.keys(idSpec).sort(); var keyStr = keys.join(','); var values = (0,ramda__WEBPACK_IMPORTED_MODULE_2__.props)(keys, idSpec); var keyCallbacks = depMap[keyStr] = depMap[keyStr] || {}; var propCallbacks = keyCallbacks[prop] = keyCallbacks[prop] || []; var valMatch = false; for (var i = 0; i < propCallbacks.length; i++) { if ((0,ramda__WEBPACK_IMPORTED_MODULE_2__.equals)(values, propCallbacks[i].values)) { valMatch = propCallbacks[i]; break; } } if (!valMatch) { valMatch = { keys, values, callbacks: [] }; propCallbacks.push(valMatch); } valMatch.callbacks.push(dependency); } function validateDependencies(parsedDependencies, dispatchError) { var outStrs = {}; var outObjs = []; parsedDependencies.forEach(function (dep) { var inputs = dep.inputs, outputs = dep.outputs, state = dep.state; var hasOutputs = true; if (outputs.length === 1 && !outputs[0].id && !outputs[0].property) { hasOutputs = false; dispatchError('A callback is missing Outputs', ['Please provide an output for this callback:', JSON.stringify(dep, null, 2)]); } var head = 'In the callback for output(s):\n ' + outputs.map(_dependencies_ts__WEBPACK_IMPORTED_MODULE_3__.combineIdAndProp).join('\n '); if (!inputs.length) { dispatchError('A callback is missing Inputs', [head, 'there are no `Input` elements.', 'Without `Input` elements, it will never get called.', '', 'Subscribing to `Input` components will cause the', 'callback to be called whenever their values change.']); } var spec = [[outputs, 'Output'], [inputs, 'Input'], [state, 'State']]; spec.forEach(function (_ref) { var _ref2 = _slicedToArray(_ref, 2), args = _ref2[0], cls = _ref2[1]; if (cls === 'Output' && !hasOutputs) { // just a quirk of how we pass & parse outputs - if you don't // provide one, it looks like a single blank output. This is // actually useful for graceful failure, so we work around it. return; } if (!Array.isArray(args)) { dispatchError("Callback ".concat(cls, "(s) must be an Array"), [head, "For ".concat(cls, "(s) we found:"), JSON.stringify(args), 'but we expected an Array.']); } args.forEach(function (idProp, i) { validateArg(idProp, head, cls, i, dispatchError); }); }); findDuplicateOutputs(outputs, head, dispatchError, outStrs, outObjs); findMismatchedWildcards(outputs, inputs, state, head, dispatchError); }); } function validateArg(_ref3, head, cls, i, dispatchError) { var id = _ref3.id, property = _ref3.property; if (typeof property !== 'string' || !property) { dispatchError('Callback property error', [head, "".concat(cls, "[").concat(i, "].property = ").concat(JSON.stringify(property)), 'but we expected `property` to be a non-empty string.']); } if (typeof id === 'object') { if ((0,ramda__WEBPACK_IMPORTED_MODULE_2__.isEmpty)(id)) { dispatchError('Callback item missing ID', [head, "".concat(cls, "[").concat(i, "].id = {}"), 'Every item linked to a callback needs an ID']); } (0,ramda__WEBPACK_IMPORTED_MODULE_2__.forEachObjIndexed)(function (v, k) { if (!k) { dispatchError('Callback wildcard ID error', [head, "".concat(cls, "[").concat(i, "].id has key \"").concat(k, "\""), 'Keys must be non-empty strings.']); } if (typeof v === 'object' && v.wild) { if (allowedWildcards[cls][v.wild] !== v) { dispatchError('Callback wildcard ID error', [head, "".concat(cls, "[").concat(i, "].id[\"").concat(k, "\"] = ").concat(v.wild), "Allowed wildcards for ".concat(cls, "s are:"), (0,ramda__WEBPACK_IMPORTED_MODULE_2__.keys)(allowedWildcards[cls]).join(', ')]); } } else if (!(0,ramda__WEBPACK_IMPORTED_MODULE_2__.includes)(typeof v, wildcardValTypes)) { dispatchError('Callback wildcard ID error', [head, "".concat(cls, "[").concat(i, "].id[\"").concat(k, "\"] = ").concat(JSON.stringify(v)), 'Wildcard callback ID values must be either wildcards', 'or constants of one of these types:', wildcardValTypes.join(', ')]); } }, id); } else if (typeof id === 'string') { if (!id) { dispatchError('Callback item missing ID', [head, "".concat(cls, "[").concat(i, "].id = \"").concat(id, "\""), 'Every item linked to a callback needs an ID']); } var invalidChars = idInvalidChars.filter(function (c) { return (0,ramda__WEBPACK_IMPORTED_MODULE_2__.includes)(c, id); }); if (invalidChars.length) { dispatchError('Callback invalid ID string', [head, "".concat(cls, "[").concat(i, "].id = '").concat(id, "'"), "characters '".concat(invalidChars.join("', '"), "' are not allowed.")]); } } else { dispatchError('Callback ID type error', [head, "".concat(cls, "[").concat(i, "].id = ").concat(JSON.stringify(id)), 'IDs must be strings or wildcard-compatible objects.']); } } function findDuplicateOutputs(outputs, head, dispatchError, outStrs, outObjs) { var newOutputStrs = {}; var newOutputObjs = []; outputs.forEach(function (_ref4, i) { var id = _ref4.id, property = _ref4.property; if (typeof id === 'string') { var idProp = (0,_dependencies_ts__WEBPACK_IMPORTED_MODULE_3__.combineIdAndProp)({ id, property }); if (newOutputStrs[idProp]) { dispatchError('Duplicate callback Outputs', [head, "Output ".concat(i, " (").concat(idProp, ") is already used by this callback.")]); } else if (outStrs[idProp]) { dispatchError('Duplicate callback outputs', [head, "Output ".concat(i, " (").concat(idProp, ") is already in use."), 'To resolve this, set `allow_duplicate=True` on', 'duplicate outputs, or combine the outputs into', 'one callback function, distinguishing the trigger', 'by using `dash.callback_context` if necessary.']); } else { newOutputStrs[idProp] = 1; } } else { var idObj = { id, property }; var selfOverlap = wildcardOverlap(idObj, newOutputObjs); var otherOverlap = selfOverlap || wildcardOverlap(idObj, outObjs); if (selfOverlap || otherOverlap) { var _idProp = (0,_dependencies_ts__WEBPACK_IMPORTED_MODULE_3__.combineIdAndProp)(idObj); var idProp2 = (0,_dependencies_ts__WEBPACK_IMPORTED_MODULE_3__.combineIdAndProp)(selfOverlap || otherOverlap); dispatchError('Overlapping wildcard callback outputs', [head, "Output ".concat(i, " (").concat(_idProp, ")"), "overlaps another output (".concat(idProp2, ")"), "used in ".concat(selfOverlap ? 'this' : 'a different', " callback.")]); } else { newOutputObjs.push(idObj); } } }); (0,ramda__WEBPACK_IMPORTED_MODULE_2__.keys)(newOutputStrs).forEach(function (k) { outStrs[k] = 1; }); newOutputObjs.forEach(function (idObj) { outObjs.push(idObj); }); } function checkInOutOverlap(out, inputs) { var outId = out.id, outProp = out.property; return inputs.some(function (in_) { var inId = in_.id, inProp = in_.property; if (outProp !== inProp || typeof outId !== typeof inId) { return false; } if (typeof outId === 'string') { if (outId === inId) { return true; } } else if (wildcardOverlap(in_, [out])) { return true; } return false; }); } function findMismatchedWildcards(outputs, inputs, state, head, dispatchError) { var _findWildcardKeys = findWildcardKeys(outputs[0].id), out0MatchKeys = _findWildcardKeys.matchKeys; outputs.forEach(function (out, i) { if (i && !(0,ramda__WEBPACK_IMPORTED_MODULE_2__.equals)(findWildcardKeys(out.id).matchKeys, out0MatchKeys)) { dispatchError('Mismatched `MATCH` wildcards across `Output`s', [head, "Output ".concat(i, " (").concat((0,_dependencies_ts__WEBPACK_IMPORTED_MODULE_3__.combineIdAndProp)(out), ")"), 'does not have MATCH wildcards on the same keys as', "Output 0 (".concat((0,_dependencies_ts__WEBPACK_IMPORTED_MODULE_3__.combineIdAndProp)(outputs[0]), ")."), 'MATCH wildcards must be on the same keys for all Outputs.', 'ALL wildcards need not match, only MATCH.']); } }); [[inputs, 'Input'], [state, 'State']].forEach(function (_ref5) { var _ref6 = _slicedToArray(_ref5, 2), args = _ref6[0], cls = _ref6[1]; args.forEach(function (arg, i) { var _findWildcardKeys2 = findWildcardKeys(arg.id), matchKeys = _findWildcardKeys2.matchKeys, allsmallerKeys = _findWildcardKeys2.allsmallerKeys; var allWildcardKeys = matchKeys.concat(allsmallerKeys); var diff = (0,ramda__WEBPACK_IMPORTED_MODULE_2__.difference)(allWildcardKeys, out0MatchKeys); if (diff.length) { diff.sort(); dispatchError('`Input` / `State` wildcards not in `Output`s', [head, "".concat(cls, " ").concat(i, " (").concat((0,_dependencies_ts__WEBPACK_IMPORTED_MODULE_3__.combineIdAndProp)(arg), ")"), "has MATCH or ALLSMALLER on key(s) ".concat(diff.join(', ')), "where Output 0 (".concat((0,_dependencies_ts__WEBPACK_IMPORTED_MODULE_3__.combineIdAndProp)(outputs[0]), ")"), 'does not have a MATCH wildcard. Inputs and State do not', 'need every MATCH from the Output(s), but they cannot have', 'extras beyond the Output(s).']); } }); }); } var matchWildKeys = function matchWildKeys(_ref7) { var _ref8 = _slicedToArray(_ref7, 2), a = _ref8[0], b = _ref8[1]; var aWild = a && a.wild; var bWild = b && b.wild; if (aWild && bWild) { // Every wildcard combination overlaps except MATCH<->ALLSMALLER return !(a === MATCH && b === ALLSMALLER || a === ALLSMALLER && b === MATCH); } return a === b || aWild || bWild; }; function wildcardOverlap(_ref9, objs) { var id = _ref9.id, property = _ref9.property; var idKeys = (0,ramda__WEBPACK_IMPORTED_MODULE_2__.keys)(id).sort(); var idVals = (0,ramda__WEBPACK_IMPORTED_MODULE_2__.props)(idKeys, id); var _iterator = _createForOfIteratorHelper(objs), _step; try { for (_iterator.s(); !(_step = _iterator.n()).done;) { var obj = _step.value; var id2 = obj.id, property2 = obj.property; if (property2 === property && typeof id2 !== 'string' && (0,ramda__WEBPACK_IMPORTED_MODULE_2__.equals)((0,ramda__WEBPACK_IMPORTED_MODULE_2__.keys)(id2).sort(), idKeys) && (0,ramda__WEBPACK_IMPORTED_MODULE_2__.all)(matchWildKeys, (0,ramda__WEBPACK_IMPORTED_MODULE_2__.zip)(idVals, (0,ramda__WEBPACK_IMPORTED_MODULE_2__.props)(idKeys, id2)))) { return obj; } } } catch (err) { _iterator.e(err); } finally { _iterator.f(); } return false; } function validateCallbacksToLayout(state_, dispatchError) { var config = state_.config, graphs = state_.graphs, layout_ = state_.layout, paths_ = state_.paths; var validateIds = !config.suppress_callback_exceptions; var layout, paths; if (validateIds && config.validation_layout) { layout = config.validation_layout; paths = (0,_paths__WEBPACK_IMPORTED_MODULE_4__.computePaths)(layout, [], null, paths_.events); } else { layout = layout_; paths = paths_; } var outputMap = graphs.outputMap, inputMap = graphs.inputMap, outputPatterns = graphs.outputPatterns, inputPatterns = graphs.inputPatterns; function tail(callbacks) { return 'This ID was used in the callback(s) for Output(s):\n ' + callbacks.map(function (_ref10) { var outputs = _ref10.outputs; return outputs.map(_dependencies_ts__WEBPACK_IMPORTED_MODULE_3__.combineIdAndProp).join(', '); }).join('\n '); } function missingId(id, cls, callbacks) { dispatchError('ID not found in layout', ["Attempting to connect a callback ".concat(cls, " item to component:"), " \"".concat(stringifyId(id), "\""), 'but no components with that id exist in the layout.', '', 'If you are assigning callbacks to components that are', 'generated by other callbacks (and therefore not in the', 'initial layout), you can suppress this exception by setting', '`suppress_callback_exceptions=True`.', tail(callbacks)]); } function validateProp(id, idPath, rawProp, cls, callbacks) { var prop = rawProp.split('@')[0]; var component = (0,ramda__WEBPACK_IMPORTED_MODULE_2__.path)(idPath, layout); var element = _registry__WEBPACK_IMPORTED_MODULE_6__["default"].resolve(component); // note: Flow components do not have propTypes, so we can't validate. if (element && element.propTypes && !element.propTypes[prop]) { // look for wildcard props (ie data-* etc) for (var propName in element.propTypes) { var last = propName.length - 1; if (propName.charAt(last) === '*' && prop.substr(0, last) === propName.substr(0, last)) { return; } } var type = component.type, namespace = component.namespace; dispatchError('Invalid prop for this component', ["Property \"".concat(prop, "\" was used with component ID:"), " ".concat(JSON.stringify(id)), "in one of the ".concat(cls, " items of a callback."), "This ID is assigned to a ".concat(namespace, ".").concat(type, " component"), 'in the layout, which does not support this property.', tail(callbacks)]); } } function validateIdPatternProp(id, property, cls, callbacks) { (0,_dependencies_ts__WEBPACK_IMPORTED_MODULE_3__.resolveDeps)()(paths)({ id, property }).forEach(function (dep) { var idResolved = dep.id, idPath = dep.path; validateProp(idResolved, idPath, property, cls, callbacks); }); } var callbackIdsCheckedForState = {}; function validateState(callback) { var state = callback.state, output = callback.output; // ensure we don't check the same callback for state multiple times if (callbackIdsCheckedForState[output]) { return; } callbackIdsCheckedForState[output] = 1; var cls = 'State'; state.forEach(function (_ref11) { var id = _ref11.id, property = _ref11.property; if (typeof id === 'string') { var idPath = (0,_paths__WEBPACK_IMPORTED_MODULE_4__.getPath)(paths, id); if (!idPath) { if (validateIds) { missingId(id, cls, [callback]); } } else { validateProp(id, idPath, property, cls, [callback]); } } // Only validate props for State object ids that we don't need to // resolve them to specific inputs or outputs else if (!(0,ramda__WEBPACK_IMPORTED_MODULE_2__.intersection)([MATCH, ALLSMALLER], (0,ramda__WEBPACK_IMPORTED_MODULE_2__.values)(id)).length) { validateIdPatternProp(id, property, cls, [callback]); } }); } function validateMap(map, cls, doState) { for (var id in map) { var idProps = map[id]; var idPath = (0,_paths__WEBPACK_IMPORTED_MODULE_4__.getPath)(paths, id); if (!idPath) { if (validateIds) { missingId(id, cls, (0,ramda__WEBPACK_IMPORTED_MODULE_2__.flatten)((0,ramda__WEBPACK_IMPORTED_MODULE_2__.values)(idProps))); } } else { for (var property in idProps) { var callbacks = idProps[property]; validateProp(id, idPath, property, cls, callbacks); if (doState) { // It would be redundant to check state on both inputs // and outputs - so only set doState for outputs. callbacks.forEach(validateState); } } } } } validateMap(outputMap, 'Output', true); validateMap(inputMap, 'Input'); function validatePatterns(patterns, cls, doState) { for (var keyStr in patterns) { var keyPatterns = patterns[keyStr]; var _loop = function _loop(property) { keyPatterns[property].forEach(function (_ref12) { var keys = _ref12.keys, values = _ref12.values, callbacks = _ref12.callbacks; var id = (0,ramda__WEBPACK_IMPORTED_MODULE_2__.zipObj)(keys, values); validateIdPatternProp(id, property, cls, callbacks); if (doState) { callbacks.forEach(validateState); } }); }; for (var property in keyPatterns) { _loop(property); } } } validatePatterns(outputPatterns, 'Output', true); validatePatterns(inputPatterns, 'Input'); } function computeGraphs(dependencies, dispatchError) { // multiGraph is just for finding circular deps var multiGraph = new dependency_graph__WEBPACK_IMPORTED_MODULE_0__.DepGraph(); var wildcardPlaceholders = {}; var fixIds = (0,ramda__WEBPACK_IMPORTED_MODULE_2__.map)((0,ramda__WEBPACK_IMPORTED_MODULE_2__.evolve)({ id: parseIfWildcard })); var parsedDependencies = (0,ramda__WEBPACK_IMPORTED_MODULE_2__.map)(function (dep) { var output = dep.output; var out = (0,ramda__WEBPACK_IMPORTED_MODULE_2__.evolve)({ inputs: fixIds, state: fixIds }, dep); out.outputs = (0,ramda__WEBPACK_IMPORTED_MODULE_2__.map)(function (outi) { return (0,ramda__WEBPACK_IMPORTED_MODULE_2__.assoc)('out', true, splitIdAndProp(outi)); }, isMultiOutputProp(output) ? parseMultipleOutputs(output) : [output]); return out; }, dependencies); var hasError = false; var wrappedDE = function wrappedDE(message, lines) { hasError = true; dispatchError(message, lines); }; validateDependencies(parsedDependencies, wrappedDE); /* * For regular ids, outputMap and inputMap are: * {[id]: {[prop]: [callback, ...]}} * where callbacks are the matching specs from the original * dependenciesRequest, but with outputs parsed to look like inputs, * and a list matchKeys added if the outputs have MATCH wildcards. * For outputMap there should only ever be one callback per id/prop * but for inputMap there may be many. * * For wildcard ids, outputPatterns and inputPatterns are: * { * [keystr]: { * [prop]: [ * {keys: [...], values: [...], callbacks: [callback, ...]}, * {...} * ] * } * } * keystr is a stringified ordered list of keys in the id * keys is the same ordered list (just copied for convenience) * values is an array of explicit or wildcard values for each key in keys */ var outputMap = {}; var inputMap = {}; var outputPatterns = {}; var inputPatterns = {}; var finalGraphs = { MultiGraph: multiGraph, outputMap, inputMap, outputPatterns, inputPatterns, callbacks: parsedDependencies }; if (hasError) { // leave the graphs empty if we found an error, so we don't try to // execute the broken callbacks. return finalGraphs; } parsedDependencies.forEach(function (dependency) { var outputs = dependency.outputs, inputs = dependency.inputs; outputs.concat(inputs).forEach(function (item) { var id = item.id; if (typeof id === 'object') { (0,ramda__WEBPACK_IMPORTED_MODULE_2__.forEachObjIndexed)(function (val, key) { if (!wildcardPlaceholders[key]) { wildcardPlaceholders[key] = { exact: [], expand: 0 }; } var keyPlaceholders = wildcardPlaceholders[key]; if (val && val.wild) { if (val.expand) { keyPlaceholders.expand += 1; } } else if (keyPlaceholders.exact.indexOf(val) === -1) { keyPlaceholders.exact.push(val); } }, id); } }); }); (0,ramda__WEBPACK_IMPORTED_MODULE_2__.forEachObjIndexed)(function (keyPlaceholders) { var exact = keyPlaceholders.exact, expand = keyPlaceholders.expand; var vals = exact.slice().sort(idValSort); if (expand) { for (var i = 0; i < expand; i++) { if (exact.length) { vals.splice(0, 0, [valBefore(vals[0])]); vals.push(valAfter(vals[vals.length - 1])); } else { vals.push(i); } } } else if (!exact.length) { // only MATCH/ALL - still need a value vals.push(0); } keyPlaceholders.vals = vals; }, wildcardPlaceholders); function makeAllIds(idSpec, outIdFinal) { var idList = [{}]; (0,ramda__WEBPACK_IMPORTED_MODULE_2__.forEachObjIndexed)(function (val, key) { var testVals = wildcardPlaceholders[key].vals; var outValIndex = testVals.indexOf(outIdFinal[key]); var newVals = [val]; if (val && val.wild) { if (val === ALLSMALLER) { if (outValIndex > 0) { newVals = testVals.slice(0, outValIndex); } else { // no smaller items - delete all outputs. newVals = []; } } else { // MATCH or ALL // MATCH *is* ALL for outputs, ie we don't already have a // value specified in `outIdFinal` newVals = outValIndex === -1 || val === ALL ? testVals : [outIdFinal[key]]; } } // replicates everything in idList once for each item in // newVals, attaching each value at key. idList = (0,ramda__WEBPACK_IMPORTED_MODULE_2__.ap)((0,ramda__WEBPACK_IMPORTED_MODULE_2__.ap)([(0,ramda__WEBPACK_IMPORTED_MODULE_2__.assoc)(key)], newVals), idList); }, idSpec); return idList; } /* multiGraph is used only for testing circularity * * Each component+property that is used as an input or output is added as a node * to a directed graph with a dependency from each input to each output. The * function triggerDefaultState in index.js then checks this graph for circularity. * * In order to allow the same component+property to be both an input and output * of the same callback, a two pass approach is used. * * In the first pass, the graph is built up normally with the exception that * in cases where an output is also an input to the same callback a special * "output" node is added and the dependencies target this output node instead. * For example, if `slider.value` is both an input and an output, then the a new * node `slider.value__output` will be added with a dependency from `slider.value` * to `slider.value__output`. Splitting the input and output into separate nodes * removes the circularity. * * In order to still detect other forms of circularity, it is necessary to do a * second pass and add the new output nodes as a dependency in any *other* callbacks * where the original node was an input. Continuing the example, any other callback * that had `slider.value` as an input dependency also needs to have * `slider.value__output` as a dependency. To make this efficient, all the inputs * and outputs for each callback are stored during the first pass. */ var outputTag = '__output'; var duplicateOutputs = []; var cbIn = []; var cbOut = []; function addInputToMulti(inIdProp, outIdProp) { var firstPass = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; multiGraph.addNode(inIdProp); multiGraph.addDependency(inIdProp, outIdProp); // only store callback inputs and outputs during the first pass if (firstPass) { cbIn[cbIn.length - 1].push(inIdProp); cbOut[cbOut.length - 1].push(outIdProp); } } parsedDependencies.forEach(function (dependency) { var outputs = dependency.outputs, inputs = dependency.inputs; // new callback, add an empty array for its inputs and outputs cbIn.push([]); cbOut.push([]); function addOutputToMulti(outIdFinal, outIdProp) { multiGraph.addNode(outIdProp); inputs.forEach(function (inObj) { var inId = inObj.id, property = inObj.property; if (typeof inId === 'object') { var inIdList = makeAllIds(inId, outIdFinal); inIdList.forEach(function (id) { addInputToMulti((0,_dependencies_ts__WEBPACK_IMPORTED_MODULE_3__.combineIdAndProp)({ id, property }), outIdProp); }); } else { addInputToMulti((0,_dependencies_ts__WEBPACK_IMPORTED_MODULE_3__.combineIdAndProp)(inObj), outIdProp); } }); } // We'll continue to use dep.output as its id, but add outputs as well // for convenience and symmetry with the structure of inputs and state. // Also collect MATCH keys in the output (all outputs must share these) // and ALL keys in the first output (need not be shared but we'll use // the first output for calculations) for later convenience. var _findWildcardKeys3 = findWildcardKeys(outputs[0].id), matchKeys = _findWildcardKeys3.matchKeys; var firstSingleOutput = (0,ramda__WEBPACK_IMPORTED_MODULE_2__.findIndex)(function (o) { return !isMultiValued(o.id); }, outputs); var finalDependency = (0,ramda__WEBPACK_IMPORTED_MODULE_2__.mergeRight)({ matchKeys, firstSingleOutput, outputs }, dependency); outputs.forEach(function (outIdProp) { var outId = outIdProp.id, property = outIdProp.property; // check if this output is also an input to the same callback var alsoInput = checkInOutOverlap(outIdProp, inputs); if (typeof outId === 'object') { var outIdList = makeAllIds(outId, {}); outIdList.forEach(function (id) { var tempOutIdProp = { id, property }; var outIdName = (0,_dependencies_ts__WEBPACK_IMPORTED_MODULE_3__.combineIdAndProp)(tempOutIdProp); // if this output is also an input, add `outputTag` to the name if (alsoInput) { duplicateOutputs.push(tempOutIdProp); outIdName += outputTag; } addOutputToMulti(id, outIdName); }); addPattern(outputPatterns, outId, property, finalDependency); } else { var outIdName = (0,_dependencies_ts__WEBPACK_IMPORTED_MODULE_3__.combineIdAndProp)(outIdProp); // if this output is also an input, add `outputTag` to the name if (alsoInput) { duplicateOutputs.push(outIdProp); outIdName += outputTag; } addOutputToMulti({}, outIdName); addMap(outputMap, outId, property, finalDependency); } }); inputs.forEach(function (inputObject) { var inId = inputObject.id, inProp = inputObject.property; if (typeof inId === 'object') { addPattern(inputPatterns, inId, inProp, finalDependency); } else { addMap(inputMap, inId, inProp, finalDependency); } }); }); // second pass for adding new output nodes as dependencies where needed duplicateOutputs.forEach(function (dupeOutIdProp) { var originalName = (0,_dependencies_ts__WEBPACK_IMPORTED_MODULE_3__.combineIdAndProp)(dupeOutIdProp); var newName = originalName.concat(outputTag); for (var cnt = 0; cnt < cbIn.length; cnt++) { // check if input to the callback if (cbIn[cnt].some(function (inName) { return inName === originalName; })) { /* make sure it's not also an output of the callback * (this will be the original callback) */ if (!cbOut[cnt].some(function (outName) { return outName === newName; })) { cbOut[cnt].forEach(function (outName) { addInputToMulti(newName, outName, false); }); } } } }); return finalGraphs; } function findWildcardKeys(id) { var matchKeys = []; var allsmallerKeys = []; if (typeof id === 'object') { (0,ramda__WEBPACK_IMPORTED_MODULE_2__.forEachObjIndexed)(function (val, key) { if (val === MATCH) { matchKeys.push(key); } else if (val === ALLSMALLER) { allsmallerKeys.push(key); } }, id); matchKeys.sort(); allsmallerKeys.sort(); } return { matchKeys, allsmallerKeys }; } /* * Do the given id values `vals` match the pattern `patternVals`? * `keys`, `patternVals`, and `vals` are all arrays, and we already know that * we're only looking at ids with the same keys as the pattern. * * Optionally, include another reference set of the same - to ensure the * correct matching of MATCH or ALLSMALLER between input and output items. */ function idMatch(keys, vals, patternVals, refKeys, refVals, refPatternVals) { for (var i = 0; i < keys.length; i++) { var val = vals[i]; var patternVal = patternVals[i]; if (patternVal.wild) { // If we have a second id, compare the wildcard values. // Without a second id, all wildcards pass at this stage. if (refKeys && patternVal !== ALL) { var refIndex = refKeys.indexOf(keys[i]); var refPatternVal = refPatternVals[refIndex]; // Sanity check. Shouldn't ever fail this, if the back end // did its job validating callbacks. // You can't resolve an input against an input, because // two ALLSMALLER's wouldn't make sense! if (patternVal === ALLSMALLER && refPatternVal === ALLSMALLER) { throw new Error('invalid wildcard id pair: ' + JSON.stringify({ keys, patternVals, vals, refKeys, refPatternVals, refVals })); } if (idValSort(val, refVals[refIndex]) !== (patternVal === ALLSMALLER ? -1 : refPatternVal === ALLSMALLER ? 1 : 0)) { return false; } } } else if (val !== patternVal) { return false; } } return true; } function getAnyVals(patternVals, vals) { var matches = []; for (var i = 0; i < patternVals.length; i++) { if (patternVals[i] === MATCH) { matches.push(vals[i]); } } return matches.length ? JSON.stringify(matches) : ''; } /* * Does this item (input / output / state) support multiple values? * string IDs do not; wildcard IDs only do if they contain ALL or ALLSMALLER */ function isMultiValued(_ref13) { var id = _ref13.id; return typeof id === 'object' && (0,ramda__WEBPACK_IMPORTED_MODULE_2__.any)(function (v) { return v.multi; }, (0,ramda__WEBPACK_IMPORTED_MODULE_2__.values)(id)); } /* * For a given output id and prop, find the callback generating it. * If no callback is found, returns false. * If one is found, returns: * { * callback: the callback spec {outputs, inputs, state etc} * anyVals: stringified list of resolved MATCH keys we matched * resolvedId: the "outputs" id string plus MATCH values we matched * getOutputs: accessor function to give all resolved outputs of this * callback. Takes `paths` as argument to apply when the callback is * dispatched, in case a previous callback has altered the layout. * The result is a list of {id (string or object), property (string)} * getInputs: same for inputs * getState: same for state * changedPropIds: an object of {[idAndProp]: v} triggering this callback * v = DIRECT (2): the prop was changed in the front end, so dependent * callbacks *MUST* be executed. * v = INDIRECT (1): the prop is expected to be changed by a callback, * but if this is prevented, dependent callbacks may be pruned. * initialCall: boolean, if true we don't require any changedPropIds * to keep this callback around, as it's the initial call to populate * this value on page load or changing part of the layout. * By default this is true for callbacks generated by * getCallbackByOutput, false from getCallbacksByInput. * } */ function getCallbackByOutput(graphs, paths, id, prop) { var resolve; var callback; var anyVals = ''; if (typeof id === 'string') { // standard id version var callbacks = (graphs.outputMap[id] || {})[prop]; if (callbacks) { callback = callbacks[0]; resolve = (0,_dependencies_ts__WEBPACK_IMPORTED_MODULE_3__.resolveDeps)(); } } else { // wildcard version var _keys = Object.keys(id).sort(); var vals = (0,ramda__WEBPACK_IMPORTED_MODULE_2__.props)(_keys, id); var keyStr = _keys.join(','); var patterns = (graphs.outputPatterns[keyStr] || {})[prop]; if (patterns) { for (var i = 0; i < patterns.length; i++) { var patternVals = patterns[i].values; if (idMatch(_keys, vals, patternVals)) { callback = patterns[i].callbacks[0]; resolve = (0,_dependencies_ts__WEBPACK_IMPORTED_MODULE_3__.resolveDeps)(_keys, vals, patternVals); anyVals = getAnyVals(patternVals, vals); break; } } } } if (!resolve) { return false; } return (0,_dependencies_ts__WEBPACK_IMPORTED_MODULE_3__.makeResolvedCallback)(callback, resolve, anyVals); } function addResolvedFromOutputs(callback, outPattern, outs, matches) { var out0Keys = Object.keys(outPattern.id).sort(); var out0PatternVals = (0,ramda__WEBPACK_IMPORTED_MODULE_2__.props)(out0Keys, outPattern.id); var foundCbIds = {}; outs.forEach(function (_ref14) { var outId = _ref14.id; var outVals = (0,ramda__WEBPACK_IMPORTED_MODULE_2__.props)(out0Keys, outId); var resolved = (0,_dependencies_ts__WEBPACK_IMPORTED_MODULE_3__.makeResolvedCallback)(callback, (0,_dependencies_ts__WEBPACK_IMPORTED_MODULE_3__.resolveDeps)(out0Keys, outVals, out0PatternVals), getAnyVals(out0PatternVals, outVals)); var resolvedId = resolved.resolvedId; if (!foundCbIds[resolvedId]) { matches.push(resolved); foundCbIds[resolvedId] = true; } }); } function addAllResolvedFromOutputs(resolve, paths, matches) { return function (callback) { var matchKeys = callback.matchKeys, firstSingleOutput = callback.firstSingleOutput, outputs = callback.outputs; if (matchKeys.length) { var singleOutPattern = outputs[firstSingleOutput]; if (singleOutPattern) { addResolvedFromOutputs(callback, singleOutPattern, resolve(paths)(singleOutPattern), matches); } else { /* * If every output has ALL we need to reduce resolved set * to one item per combination of MATCH values. * That will give one result per callback invocation. */ var anySeen = {}; outputs.forEach(function (outPattern) { var outSet = resolve(paths)(outPattern).filter(function (i) { var matchStr = JSON.stringify((0,ramda__WEBPACK_IMPORTED_MODULE_2__.props)(matchKeys, i.id)); if (!anySeen[matchStr]) { anySeen[matchStr] = 1; return true; } return false; }); addResolvedFromOutputs(callback, outPattern, outSet, matches); }); } } else { var cb = (0,_dependencies_ts__WEBPACK_IMPORTED_MODULE_3__.makeResolvedCallback)(callback, resolve, ''); if ((0,ramda__WEBPACK_IMPORTED_MODULE_2__.flatten)(cb.getOutputs(paths)).length) { matches.push(cb); } } }; } /* * For a given id and prop find all callbacks it's an input of. * * Returns an array of objects: * {callback, resolvedId, getOutputs, getInputs, getState} * See getCallbackByOutput for details. * * Note that if the original input contains an ALLSMALLER wildcard, * there may be many entries for the same callback, but any given output * (with an MATCH corresponding to the input's ALLSMALLER) will only appear * in one entry. */ function getWatchedKeys(id, newProps, graphs) { if (!(id && graphs && newProps.length)) { return []; } if (typeof id === 'string') { var inputs = graphs.inputMap[id]; return inputs ? newProps.filter(function (newProp) { return inputs[newProp]; }) : []; } var keys = Object.keys(id).sort(); var vals = (0,ramda__WEBPACK_IMPORTED_MODULE_2__.props)(keys, id); var keyStr = keys.join(','); var keyPatterns = graphs.inputPatterns[keyStr]; if (!keyPatterns) { return []; } return newProps.filter(function (prop) { var patterns = keyPatterns[prop]; return patterns && patterns.some(function (pattern) { return idMatch(keys, vals, pattern.values); }); }); } /* * Return a list of all callbacks referencing a chunk of the layout, * either as inputs or outputs. * * opts.outputsOnly: boolean, set true when crawling the *whole* layout, * because outputs are enough to get everything. * opts.removedArrayInputsOnly: boolean, set true to only look for inputs in * wildcard arrays (ALL or ALLSMALLER), no outputs. This gets used to tell * when the new *absence* of a given component should trigger a callback. * opts.newPaths: paths object after the edit - to be used with * removedArrayInputsOnly to determine if the callback still has its outputs * opts.chunkPath: path to the new chunk - used to determine if any outputs are * outside of this chunk, because this determines whether inputs inside the * chunk count as having changed * * Returns an array of objects: * {callback, resolvedId, getOutputs, getInputs, getState, ...etc} * See getCallbackByOutput for details. */ function getUnfilteredLayoutCallbacks(graphs, paths, layoutChunk, opts) { var outputsOnly = opts.outputsOnly, removedArrayInputsOnly = opts.removedArrayInputsOnly, newPaths = opts.newPaths, chunkPath = opts.chunkPath; var foundCbIds = {}; var callbacks = []; function addCallback(callback) { if (callback) { var foundIndex = foundCbIds[callback.resolvedId]; if (foundIndex !== undefined) { var foundCb = callbacks[foundIndex]; foundCb.changedPropIds = (0,_dependencies_ts__WEBPACK_IMPORTED_MODULE_3__.mergeMax)(foundCb.changedPropIds, callback.changedPropIds); if (callback.initialCall) { foundCb.initialCall = true; } } else { foundCbIds[callback.resolvedId] = callbacks.length; callbacks.push(callback); } } } function addCallbackIfArray(idStr) { return function (cb) { return cb.getInputs(paths).some(function (ini) { if (Array.isArray(ini) && ini.some(function (inij) { return stringifyId(inij.id) === idStr; })) { // This callback should trigger even with no changedProps, // since the props that changed no longer exist. // We're kind of abusing the `initialCall` flag here, it's // more like a "final call" for the removed inputs, but // this case is not subject to `prevent_initial_call`. if ((0,ramda__WEBPACK_IMPORTED_MODULE_2__.flatten)(cb.getOutputs(newPaths)).length) { cb.initialCall = true; cb.changedPropIds = {}; addCallback(cb); } return true; } return false; }); }; } function handleOneId(id, outIdCallbacks, inIdCallbacks) { if (outIdCallbacks) { for (var property in outIdCallbacks) { var cb = getCallbackByOutput(graphs, paths, id, property); if (cb) { // callbacks found in the layout by output should always run // unless specifically requested not to. // ie this is the initial call of this callback even if it's // not the page initialization but just a new layout chunk if (!cb.callback.prevent_initial_call) { cb.initialCall = true; addCallback(cb); } } } } if (!outputsOnly && inIdCallbacks) { var maybeAddCallback = removedArrayInputsOnly ? addCallbackIfArray(stringifyId(id)) : addCallback; var handleThisCallback = maybeAddCallback; if (chunkPath) { handleThisCallback = function handleThisCallback(cb) { if (!(0,ramda__WEBPACK_IMPORTED_MODULE_2__.all)((0,ramda__WEBPACK_IMPORTED_MODULE_2__.startsWith)(chunkPath), (0,ramda__WEBPACK_IMPORTED_MODULE_2__.pluck)('path', (0,ramda__WEBPACK_IMPORTED_MODULE_2__.flatten)(cb.getOutputs(paths))))) { maybeAddCallback(cb); } }; } for (var _property in inIdCallbacks) { (0,_dependencies_ts__WEBPACK_IMPORTED_MODULE_3__.getCallbacksByInput)(graphs, paths, id, _property, _dependencies_ts__WEBPACK_IMPORTED_MODULE_3__.INDIRECT).forEach(handleThisCallback); } } } (0,_utils__WEBPACK_IMPORTED_MODULE_5__.crawlLayout)(layoutChunk, function (child) { var id = (0,ramda__WEBPACK_IMPORTED_MODULE_2__.path)(['props', 'id'], child); if (id) { if (typeof id === 'string' && !removedArrayInputsOnly) { handleOneId(id, graphs.outputMap[id], graphs.inputMap[id]); } else { var keyStr = Object.keys(id).sort().join(','); handleOneId(id, !removedArrayInputsOnly && graphs.outputPatterns[keyStr], graphs.inputPatterns[keyStr]); } } }); return (0,ramda__WEBPACK_IMPORTED_MODULE_2__.map)(function (cb) { return _objectSpread(_objectSpread({}, cb), {}, { priority: (0,_dependencies_ts__WEBPACK_IMPORTED_MODULE_3__.getPriority)(graphs, paths, cb) }); }, callbacks); } /***/ }), /***/ "./src/actions/index.js": /*!******************************!*\ !*** ./src/actions/index.js ***! \******************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ addHttpHeaders: function() { return /* binding */ addHttpHeaders; }, /* harmony export */ dispatchError: function() { return /* binding */ dispatchError; }, /* harmony export */ getCSRFHeader: function() { return /* binding */ getCSRFHeader; }, /* harmony export */ handleAsyncError: function() { return /* binding */ handleAsyncError; }, /* harmony export */ hydrateInitialOutputs: function() { return /* binding */ hydrateInitialOutputs; }, /* harmony export */ notifyObservers: function() { return /* binding */ notifyObservers; }, /* harmony export */ onError: function() { return /* binding */ onError; }, /* harmony export */ redo: function() { return /* binding */ redo; }, /* harmony export */ revert: function() { return /* binding */ revert; }, /* harmony export */ setAppLifecycle: function() { return /* binding */ setAppLifecycle; }, /* harmony export */ setConfig: function() { return /* binding */ setConfig; }, /* harmony export */ setGraphs: function() { return /* binding */ setGraphs; }, /* harmony export */ setHooks: function() { return /* binding */ setHooks; }, /* harmony export */ setLayout: function() { return /* binding */ setLayout; }, /* harmony export */ setPaths: function() { return /* binding */ setPaths; }, /* harmony export */ setRequestQueue: function() { return /* binding */ setRequestQueue; }, /* harmony export */ undo: function() { return /* binding */ undo; }, /* harmony export */ updateProps: function() { return /* binding */ updateProps; } /* harmony export */ }); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js"); /* harmony import */ var redux_actions__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! redux-actions */ "./node_modules/redux-actions/es/createAction.js"); /* harmony import */ var _callbacks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./callbacks */ "./src/actions/callbacks.ts"); /* harmony import */ var _reducers_constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../reducers/constants */ "./src/reducers/constants.js"); /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./constants */ "./src/actions/constants.js"); /* harmony import */ var cookie__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! cookie */ "./node_modules/cookie/index.js"); /* harmony import */ var _dependencies__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./dependencies */ "./src/actions/dependencies.js"); /* harmony import */ var _dependencies_ts__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./dependencies_ts */ "./src/actions/dependencies_ts.ts"); /* harmony import */ var _paths__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./paths */ "./src/actions/paths.js"); function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } var onError = (0,redux_actions__WEBPACK_IMPORTED_MODULE_8__["default"])((0,_constants__WEBPACK_IMPORTED_MODULE_3__.getAction)('ON_ERROR')); var setAppLifecycle = (0,redux_actions__WEBPACK_IMPORTED_MODULE_8__["default"])((0,_constants__WEBPACK_IMPORTED_MODULE_3__.getAction)('SET_APP_LIFECYCLE')); var setConfig = (0,redux_actions__WEBPACK_IMPORTED_MODULE_8__["default"])((0,_constants__WEBPACK_IMPORTED_MODULE_3__.getAction)('SET_CONFIG')); var addHttpHeaders = (0,redux_actions__WEBPACK_IMPORTED_MODULE_8__["default"])((0,_constants__WEBPACK_IMPORTED_MODULE_3__.getAction)('ADD_HTTP_HEADERS')); var setGraphs = (0,redux_actions__WEBPACK_IMPORTED_MODULE_8__["default"])((0,_constants__WEBPACK_IMPORTED_MODULE_3__.getAction)('SET_GRAPHS')); var setHooks = (0,redux_actions__WEBPACK_IMPORTED_MODULE_8__["default"])((0,_constants__WEBPACK_IMPORTED_MODULE_3__.getAction)('SET_HOOKS')); var setLayout = (0,redux_actions__WEBPACK_IMPORTED_MODULE_8__["default"])((0,_constants__WEBPACK_IMPORTED_MODULE_3__.getAction)('SET_LAYOUT')); var setPaths = (0,redux_actions__WEBPACK_IMPORTED_MODULE_8__["default"])((0,_constants__WEBPACK_IMPORTED_MODULE_3__.getAction)('SET_PATHS')); var setRequestQueue = (0,redux_actions__WEBPACK_IMPORTED_MODULE_8__["default"])((0,_constants__WEBPACK_IMPORTED_MODULE_3__.getAction)('SET_REQUEST_QUEUE')); var updateProps = (0,redux_actions__WEBPACK_IMPORTED_MODULE_8__["default"])((0,_constants__WEBPACK_IMPORTED_MODULE_3__.getAction)('ON_PROP_CHANGE')); var dispatchError = function dispatchError(dispatch) { return function (message, lines) { return dispatch(onError({ type: 'backEnd', error: { message, html: lines.join('\n') } })); }; }; function hydrateInitialOutputs() { return function (dispatch, getState) { (0,_dependencies__WEBPACK_IMPORTED_MODULE_5__.validateCallbacksToLayout)(getState(), dispatchError(dispatch)); triggerDefaultState(dispatch, getState); dispatch(setAppLifecycle((0,_reducers_constants__WEBPACK_IMPORTED_MODULE_2__.getAppState)('HYDRATED'))); }; } /* eslint-disable-next-line no-console */ var logWarningOnce = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.once)(console.warn); function getCSRFHeader() { try { return { 'X-CSRFToken': cookie__WEBPACK_IMPORTED_MODULE_4__.parse(document.cookie)._csrf_token }; } catch (e) { logWarningOnce(e); return {}; } } function triggerDefaultState(dispatch, getState) { var _getState = getState(), graphs = _getState.graphs, paths = _getState.paths, layout = _getState.layout; // overallOrder will assert circular dependencies for multi output. try { graphs.MultiGraph.overallOrder(); } catch (err) { dispatch(onError({ type: 'backEnd', error: { message: 'Circular Dependencies', html: err.toString() } })); } dispatch((0,_callbacks__WEBPACK_IMPORTED_MODULE_1__.addRequestedCallbacks)((0,_dependencies_ts__WEBPACK_IMPORTED_MODULE_6__.getLayoutCallbacks)(graphs, paths, layout, { outputsOnly: true }))); } var redo = moveHistory('REDO'); var undo = moveHistory('UNDO'); var revert = moveHistory('REVERT'); function moveHistory(changeType) { return function (dispatch, getState) { var _getState2 = getState(), history = _getState2.history, paths = _getState2.paths; dispatch((0,redux_actions__WEBPACK_IMPORTED_MODULE_8__["default"])(changeType)()); var _ref = (changeType === 'REDO' ? history.future[0] : history.past[history.past.length - 1]) || {}, id = _ref.id, props = _ref.props; if (id) { // Update props dispatch((0,redux_actions__WEBPACK_IMPORTED_MODULE_8__["default"])('UNDO_PROP_CHANGE')({ itempath: (0,_paths__WEBPACK_IMPORTED_MODULE_7__.getPath)(paths, id), props })); dispatch(notifyObservers({ id, props })); } }; } function notifyObservers(_ref2) { var id = _ref2.id, props = _ref2.props; return /*#__PURE__*/function () { var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(dispatch, getState) { var _getState3, graphs, paths; return _regeneratorRuntime().wrap(function _callee$(_context) { while (1) switch (_context.prev = _context.next) { case 0: _getState3 = getState(), graphs = _getState3.graphs, paths = _getState3.paths; dispatch((0,_callbacks__WEBPACK_IMPORTED_MODULE_1__.addRequestedCallbacks)((0,_dependencies_ts__WEBPACK_IMPORTED_MODULE_6__.includeObservers)(id, props, graphs, paths))); case 2: case "end": return _context.stop(); } }, _callee); })); return function (_x, _x2) { return _ref3.apply(this, arguments); }; }(); } function handleAsyncError(err, message, dispatch) { // Handle html error responses if (err && typeof err.text === 'function') { err.text().then(function (text) { var error = { message, html: text }; dispatch(onError({ type: 'backEnd', error })); }); } else { var error = err instanceof Error ? err : { message, html: err }; dispatch(onError({ type: 'backEnd', error })); } } /***/ }), /***/ "./src/actions/isAppReady.js": /*!***********************************!*\ !*** ./src/actions/isAppReady.js ***! \***********************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js"); /* harmony import */ var _plotly_dash_component_plugins__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @plotly/dash-component-plugins */ "./node_modules/@plotly/dash-component-plugins/dist/index.js"); /* harmony import */ var _plotly_dash_component_plugins__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_plotly_dash_component_plugins__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _registry__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../registry */ "./src/registry.js"); /* harmony import */ var _paths__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./paths */ "./src/actions/paths.js"); /* harmony import */ var _dependencies__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./dependencies */ "./src/actions/dependencies.js"); /* harmony default export */ __webpack_exports__["default"] = (function (layout, paths, targets) { if (!targets.length) { return true; } var promises = []; var events = paths.events; var rendered = new Promise(function (resolveRendered) { events.once('rendered', resolveRendered); }); targets.forEach(function (id) { var pathOfId = (0,_paths__WEBPACK_IMPORTED_MODULE_3__.getPath)(paths, id); if (!pathOfId) { return; } var target = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.path)(pathOfId, layout); if (!target) { return; } var component = _registry__WEBPACK_IMPORTED_MODULE_2__["default"].resolve(target); var ready = (0,_plotly_dash_component_plugins__WEBPACK_IMPORTED_MODULE_1__.isReady)(component); if (ready && typeof ready.then === 'function') { promises.push(Promise.race([ready, rendered.then(function () { return document.getElementById((0,_dependencies__WEBPACK_IMPORTED_MODULE_4__.stringifyId)(id)) && ready; })])); } }); return promises.length ? Promise.all(promises) : true; }); /***/ }), /***/ "./src/actions/paths.js": /*!******************************!*\ !*** ./src/actions/paths.js ***! \******************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ computePaths: function() { return /* binding */ computePaths; }, /* harmony export */ getPath: function() { return /* binding */ getPath; } /* harmony export */ }); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js"); /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils */ "./src/actions/utils.js"); /* * state.paths has structure: * { * strs: {[id]: path} // for regular string ids * objs: {[keyStr]: [{values, path}]} // for wildcard ids * } * keyStr: sorted keys of the id, joined with ',' into one string * values: array of values in the id, in order of keys */ function computePaths(subTree, startingPath, oldPaths, events) { var _ref = oldPaths || { strs: {}, objs: {} }, oldStrs = _ref.strs, oldObjs = _ref.objs; var diffHead = function diffHead(path) { return startingPath.some(function (v, i) { return path[i] !== v; }); }; var spLen = startingPath.length; // if we're updating a subtree, clear out all of the existing items var strs = spLen ? (0,ramda__WEBPACK_IMPORTED_MODULE_0__.filter)(diffHead, oldStrs) : {}; var objs = {}; if (spLen) { (0,ramda__WEBPACK_IMPORTED_MODULE_0__.forEachObjIndexed)(function (oldValPaths, oldKeys) { var newVals = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.filter)(function (_ref2) { var path = _ref2.path; return diffHead(path); }, oldValPaths); if (newVals.length) { objs[oldKeys] = newVals; } }, oldObjs); } (0,_utils__WEBPACK_IMPORTED_MODULE_1__.crawlLayout)(subTree, function (child, itempath) { var id = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.path)(['props', 'id'], child); if (id) { if (typeof id === 'object') { var keys = Object.keys(id).sort(); var values = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.props)(keys, id); var keyStr = keys.join(','); var paths = objs[keyStr] = objs[keyStr] || []; var oldie = oldObjs[keyStr] || []; var item = { values, path: (0,ramda__WEBPACK_IMPORTED_MODULE_0__.concat)(startingPath, itempath) }; var index = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.indexOf)(item, oldie); if (index === -1) { paths.push(item); } else { objs[keyStr] = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.insert)(index, item, paths); } } else { strs[id] = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.concat)(startingPath, itempath); } } }); // We include an event emitter here because it will be used along with // paths to determine when the app is ready for callbacks. return { strs, objs, events: events || oldPaths.events }; } function getPath(paths, id) { if (typeof id === 'object') { var keys = Object.keys(id).sort(); var keyStr = keys.join(','); var keyPaths = paths.objs[keyStr]; if (!keyPaths) { return false; } var values = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.props)(keys, id); var pathObj = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.find)((0,ramda__WEBPACK_IMPORTED_MODULE_0__.propEq)(values, 'values'), keyPaths); return pathObj && pathObj.path; } return paths.strs[id]; } /***/ }), /***/ "./src/actions/utils.js": /*!******************************!*\ !*** ./src/actions/utils.js ***! \******************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ EventEmitter: function() { return /* binding */ EventEmitter; }, /* harmony export */ crawlLayout: function() { return /* binding */ crawlLayout; }, /* harmony export */ urlBase: function() { return /* binding */ urlBase; } /* harmony export */ }); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js"); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } /* * requests_pathname_prefix is the new config parameter introduced in * dash==0.18.0. The previous versions just had url_base_pathname */ function urlBase(config) { var hasUrlBase = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.has)('url_base_pathname', config); var hasReqPrefix = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.has)('requests_pathname_prefix', config); if ((0,ramda__WEBPACK_IMPORTED_MODULE_0__.type)(config) !== 'Object' || !hasUrlBase && !hasReqPrefix) { throw new Error("\n Trying to make an API request but neither\n \"url_base_pathname\" nor \"requests_pathname_prefix\"\n is in `config`. `config` is: ", config); } var base = hasReqPrefix ? config.requests_pathname_prefix : config.url_base_pathname; return base.charAt(base.length - 1) === '/' ? base : base + '/'; } var propsChildren = ['props', 'children']; // crawl a layout object or children array, apply a function on every object var crawlLayout = function crawlLayout(object, func) { var currentPath = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : []; var extraPath = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : undefined; if (Array.isArray(object)) { // children array object.forEach(function (child, i) { if (extraPath) { var objOf = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.findIndex)(function (p) { return (0,ramda__WEBPACK_IMPORTED_MODULE_0__.includes)('{}', p); }, extraPath); if (objOf !== -1) { var front = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.slice)(0, objOf, extraPath); var back = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.slice)(objOf, extraPath.length, extraPath); if (front.length) { crawlLayout((0,ramda__WEBPACK_IMPORTED_MODULE_0__.path)(front, child), func, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.concat)(currentPath, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.concat)([i], front)), back); } else { var backPath = back.map(function (p) { return p.replace('{}', ''); }).filter(function (e) { return e; }); var childObj, childPath = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.concat)([i], backPath); if (backPath.length) { childObj = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.path)(backPath, child); } else { childObj = child; } for (var key in childObj) { var value = childObj[key]; crawlLayout(value, func, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.concat)(currentPath, childPath.concat([key]))); } } } else { crawlLayout((0,ramda__WEBPACK_IMPORTED_MODULE_0__.path)(extraPath, child), func, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.concat)(currentPath, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.concat)([i], extraPath))); } } else { crawlLayout(child, func, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.append)(i, currentPath)); } }); } else if ((0,ramda__WEBPACK_IMPORTED_MODULE_0__.type)(object) === 'Object') { func(object, currentPath); var children = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.path)(propsChildren, object); if (children) { var newPath = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.concat)(currentPath, propsChildren); crawlLayout(children, func, newPath); } var childrenProps = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.pathOr)([], [object.namespace, object.type], window.__dashprivate_childrenProps); childrenProps.forEach(function (childrenProp) { if (childrenProp.includes('[]')) { var _childrenProp$split$m = childrenProp.split('[]').map(function (p) { return p.split('.').filter(function (e) { return e; }); }), _childrenProp$split$m2 = _slicedToArray(_childrenProp$split$m, 2), frontPath = _childrenProp$split$m2[0], backPath = _childrenProp$split$m2[1]; var front = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.concat)(['props'], frontPath); var basePath = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.concat)(currentPath, front); crawlLayout((0,ramda__WEBPACK_IMPORTED_MODULE_0__.path)(front, object), func, basePath, backPath); } else { if (childrenProp.includes('{}')) { var opath = childrenProp.split('.'); var _frontPath = []; var _backPath = []; var found = false; for (var i = 0; i < opath.length; i++) { var curPath = opath[i]; if (!found && curPath.includes('{}')) { found = true; _frontPath.push(curPath.replace('{}', '')); } else { if (found) { _backPath.push(curPath); } else { _frontPath.push(curPath); } } } var _newPath = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.concat)(currentPath, ['props'].concat(_frontPath)); var oValue = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.path)(['props'].concat(_frontPath), object); if (oValue !== undefined) { for (var key in oValue) { var value = oValue[key]; if (_backPath.length) { crawlLayout((0,ramda__WEBPACK_IMPORTED_MODULE_0__.path)(_backPath, value), func, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.concat)(_newPath, [key].concat(_backPath))); } else { crawlLayout(value, func, [].concat(_toConsumableArray(_newPath), [key])); } } } } else { var _newPath2 = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.concat)(currentPath, ['props'].concat(_toConsumableArray(childrenProp.split('.')))); crawlLayout((0,ramda__WEBPACK_IMPORTED_MODULE_0__.path)(['props'].concat(_toConsumableArray(childrenProp.split('.'))), object), func, _newPath2); } } }); } }; // There are packages for this but it's simple enough, I just // adapted it from https://gist.github.com/mudge/5830382 var EventEmitter = /*#__PURE__*/function () { function EventEmitter() { _classCallCheck(this, EventEmitter); this._ev = {}; } _createClass(EventEmitter, [{ key: "on", value: function on(event, listener) { var _this = this; var events = this._ev[event] = this._ev[event] || []; events.push(listener); return function () { return _this.removeListener(event, listener); }; } }, { key: "removeListener", value: function removeListener(event, listener) { var events = this._ev[event]; if (events) { var idx = events.indexOf(listener); if (idx > -1) { events.splice(idx, 1); } } } }, { key: "emit", value: function emit(event) { var _this2 = this; for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } var events = this._ev[event]; if (events) { events.forEach(function (listener) { return listener.apply(_this2, args); }); } } }, { key: "once", value: function once(event, listener) { var _this3 = this; var remove = this.on(event, function () { remove(); for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { args[_key2] = arguments[_key2]; } listener.apply(_this3, args); }); } }]); return EventEmitter; }(); /***/ }), /***/ "./src/checkPropTypes.js": /*!*******************************!*\ !*** ./src/checkPropTypes.js ***! \*******************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ checkPropTypes; } /* harmony export */ }); /* harmony import */ var prop_types_lib_ReactPropTypesSecret__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types/lib/ReactPropTypesSecret */ "./node_modules/prop-types/lib/ReactPropTypesSecret.js"); /* harmony import */ var prop_types_lib_ReactPropTypesSecret__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types_lib_ReactPropTypesSecret__WEBPACK_IMPORTED_MODULE_0__); /* * Copied out of prop-types and modified - inspired by check-prop-types, but * simplified and tweaked to our needs: we don't need the NODE_ENV check, * we report all errors, not just the first one, and we don't need the throwing * variant `assertPropTypes`. */ /** * Assert that the values match with the type specs. * * @param {object} typeSpecs Map of name to a ReactPropType * @param {object} values Runtime values that need to be type-checked * @param {string} location e.g. "prop", "context", "child context" * @param {string} componentName Name of the component for error messages. * @param {?Function} getStack Returns the component stack. * @return {string} Any error message resulting from checking the types */ function checkPropTypes(typeSpecs, values, location, componentName) { var getStack = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null; var errors = []; for (var typeSpecName in typeSpecs) { if (typeSpecs.hasOwnProperty(typeSpecName)) { var error = void 0; // Prop type validation may throw. In case they do, we don't want to // fail the render phase where it didn't fail before. So we log it. // After these have been cleaned up, we'll let them throw. try { // This is intentionally an invariant that gets caught. It's the same // behavior as without this statement except with a better message. if (typeof typeSpecs[typeSpecName] !== 'function') { error = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.'); error.name = 'Invariant Violation'; } else { error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, (prop_types_lib_ReactPropTypesSecret__WEBPACK_IMPORTED_MODULE_0___default())); } } catch (ex) { error = ex; } if (error && !(error instanceof Error)) { errors.push((componentName || 'React class') + ': type specification of ' + location + ' `' + typeSpecName + '` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).'); } if (error instanceof Error) { var stack = getStack && getStack() || ''; errors.push('Failed ' + location + ' type: ' + error.message + stack); } } } return errors.join('\n\n'); } /***/ }), /***/ "./src/components/core/Loading.react.js": /*!**********************************************!*\ !*** ./src/components/core/Loading.react.js ***! \**********************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__); function Loading(props) { if (props.isLoading) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: "_dash-loading-callback" }); } return null; } Loading.propTypes = { isLoading: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().bool).isRequired }; /* harmony default export */ __webpack_exports__["default"] = ((0,react_redux__WEBPACK_IMPORTED_MODULE_0__.connect)(function (state) { return { isLoading: state.isLoading }; })(Loading)); /***/ }), /***/ "./src/components/core/Reloader.react.js": /*!***********************************************!*\ !*** ./src/components/core/Reloader.react.js ***! \***********************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js"); /* harmony import */ var _actions_api__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../actions/api */ "./src/actions/api.js"); function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } var Reloader = /*#__PURE__*/function (_React$Component) { _inherits(Reloader, _React$Component); var _super = _createSuper(Reloader); function Reloader(props) { var _this; _classCallCheck(this, Reloader); _this = _super.call(this, props); if (props.config.hot_reload) { var _props$config$hot_rel = props.config.hot_reload, interval = _props$config$hot_rel.interval, max_retry = _props$config$hot_rel.max_retry; _this.state = { interval, disabled: false, intervalId: null, packages: null, max_retry }; } else { _this.state = { disabled: true }; } _this._retry = 0; _this._head = document.querySelector('head'); _this.clearInterval = _this.clearInterval.bind(_assertThisInitialized(_this)); return _this; } _createClass(Reloader, [{ key: "clearInterval", value: function clearInterval() { window.clearInterval(this.state.intervalId); this.setState({ intervalId: null }); } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps, prevState) { var reloadRequest = this.state.reloadRequest; var dispatch = this.props.dispatch; // In the beginning, reloadRequest won't be defined if (!reloadRequest) { return; } /* * When reloadRequest is first defined, prevState won't be defined * for one render loop. * The first reloadRequest defines the initial/baseline hash - * it doesn't require a reload */ if (!(0,ramda__WEBPACK_IMPORTED_MODULE_0__.has)('reloadRequest', prevState)) { return; } if (reloadRequest.status === 200 && (0,ramda__WEBPACK_IMPORTED_MODULE_0__.path)(['content', 'reloadHash'], reloadRequest) !== (0,ramda__WEBPACK_IMPORTED_MODULE_0__.path)(['reloadRequest', 'content', 'reloadHash'], prevState)) { // Check for CSS (!content.hard) or new package assets if (reloadRequest.content.hard || !(0,ramda__WEBPACK_IMPORTED_MODULE_0__.equals)(reloadRequest.content.packages.length, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.pathOr)([], ['reloadRequest', 'content', 'packages'], prevState).length) || !(0,ramda__WEBPACK_IMPORTED_MODULE_0__.equals)((0,ramda__WEBPACK_IMPORTED_MODULE_0__.sort)((0,ramda__WEBPACK_IMPORTED_MODULE_0__.comparator)(ramda__WEBPACK_IMPORTED_MODULE_0__.lt), reloadRequest.content.packages), (0,ramda__WEBPACK_IMPORTED_MODULE_0__.sort)((0,ramda__WEBPACK_IMPORTED_MODULE_0__.comparator)(ramda__WEBPACK_IMPORTED_MODULE_0__.lt), (0,ramda__WEBPACK_IMPORTED_MODULE_0__.pathOr)([], ['reloadRequest', 'content', 'packages'], prevState)))) { // Look if it was a css file. var was_css = false; // eslint-disable-next-line prefer-const var _iterator = _createForOfIteratorHelper(reloadRequest.content.files), _step; try { for (_iterator.s(); !(_step = _iterator.n()).done;) { var a = _step.value; if (a.is_css) { was_css = true; var nodesToDisable = []; // Search for the old file by xpath. var it = document.evaluate("//link[contains(@href, \"".concat(a.url, "\")]"), this._head); var node = it.iterateNext(); while (node) { nodesToDisable.push(node); node = it.iterateNext(); } (0,ramda__WEBPACK_IMPORTED_MODULE_0__.forEach)(function (n) { return n.setAttribute('disabled', 'disabled'); }, nodesToDisable); if (a.modified > 0) { var link = document.createElement('link'); link.href = "".concat(a.url, "?m=").concat(a.modified); link.type = 'text/css'; link.rel = 'stylesheet'; this._head.appendChild(link); // Else the file was deleted. } } else { // If there's another kind of file here do a hard reload. was_css = false; break; } } } catch (err) { _iterator.e(err); } finally { _iterator.f(); } if (!was_css) { // Assets file have changed // or a component lib has been added/removed - // Must do a hard reload window.location.reload(); } } else { // Backend code changed - can do a soft reload in place dispatch({ type: 'RELOAD' }); } } else if (this.state.intervalId !== null && reloadRequest.status === 500) { if (this._retry > this.state.max_retry) { this.clearInterval(); // Integrate with dev tools ui?! window.alert("Hot reloading is disabled after failing ".concat(this._retry, " times. ") + 'Please check your application for errors, then refresh the page.'); } this._retry++; } } }, { key: "componentDidMount", value: function componentDidMount() { var _this$props = this.props, dispatch = _this$props.dispatch, reloadRequest = _this$props.reloadRequest; var _this$state = this.state, disabled = _this$state.disabled, interval = _this$state.interval; if (!disabled && !this.state.intervalId) { var intervalId = window.setInterval(function () { // Prevent requests from piling up - reloading can take // many seconds (10-30) and the interval is 3s by default if (reloadRequest.status !== 'loading') { dispatch((0,_actions_api__WEBPACK_IMPORTED_MODULE_4__["default"])('_reload-hash', 'GET', 'reloadRequest')); } }, interval); this.setState({ intervalId }); } } }, { key: "componentWillUnmount", value: function componentWillUnmount() { if (!this.state.disabled && this.state.intervalId) { this.clearInterval(); } } }, { key: "render", value: function render() { return null; } }], [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(props) { /* * Save the non-loading requests in the state in order to compare * current hashes with previous hashes. * Note that if there wasn't a "loading" state for the requests, * then we could simply compare `props` with `prevProps` in * `componentDidUpdate`. */ if (!(0,ramda__WEBPACK_IMPORTED_MODULE_0__.isEmpty)(props.reloadRequest) && props.reloadRequest.status !== 'loading') { return { reloadRequest: props.reloadRequest }; } return null; } }]); return Reloader; }((react__WEBPACK_IMPORTED_MODULE_1___default().Component)); Reloader.defaultProps = {}; Reloader.propTypes = { id: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().string), config: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().object), reloadRequest: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().object), dispatch: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().func), interval: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().number) }; /* harmony default export */ __webpack_exports__["default"] = ((0,react_redux__WEBPACK_IMPORTED_MODULE_3__.connect)(function (state) { return { config: state.config, reloadRequest: state.reloadRequest }; }, function (dispatch) { return { dispatch }; })(Reloader)); /***/ }), /***/ "./src/components/core/Toolbar.react.js": /*!**********************************************!*\ !*** ./src/components/core/Toolbar.react.js ***! \**********************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _actions_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../actions/index.js */ "./src/actions/index.js"); /* harmony import */ var _Toolbar_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Toolbar.css */ "./src/components/core/Toolbar.css"); function UnconnectedToolbar(props) { var dispatch = props.dispatch, history = props.history; var undoLink = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("span", { key: "undoLink", className: "_dash-undo-redo-link", onClick: function onClick() { return dispatch(_actions_index_js__WEBPACK_IMPORTED_MODULE_3__.undo); } }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: "_dash-icon-undo" }, "\u21BA"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: "_dash-undo-redo-label" }, "undo")); var redoLink = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("span", { key: "redoLink", className: "_dash-undo-redo-link", onClick: function onClick() { return dispatch(_actions_index_js__WEBPACK_IMPORTED_MODULE_3__.redo); } }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: "_dash-icon-redo" }, "\u21BB"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: "_dash-undo-redo-label" }, "redo")); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { className: "_dash-undo-redo" }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", null, history.past.length > 0 ? undoLink : null, history.future.length > 0 ? redoLink : null)); } UnconnectedToolbar.propTypes = { history: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().object), dispatch: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().func) }; var Toolbar = (0,react_redux__WEBPACK_IMPORTED_MODULE_0__.connect)(function (state) { return { history: state.history }; }, function (dispatch) { return { dispatch }; })(UnconnectedToolbar); /* harmony default export */ __webpack_exports__["default"] = (Toolbar); /***/ }), /***/ "./src/components/error/CallbackGraph/CallbackGraphContainer.react.js": /*!****************************************************************************!*\ !*** ./src/components/error/CallbackGraph/CallbackGraphContainer.react.js ***! \****************************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ CallbackGraphContainer: function() { return /* binding */ CallbackGraphContainer; } /* harmony export */ }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js"); /* harmony import */ var cytoscape__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! cytoscape */ "./node_modules/cytoscape/dist/cytoscape.cjs.js"); /* harmony import */ var cytoscape__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(cytoscape__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var react_cytoscapejs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react-cytoscapejs */ "./node_modules/react-cytoscapejs/dist/react-cytoscape.modern.js"); /* harmony import */ var cytoscape_dagre__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! cytoscape-dagre */ "./node_modules/cytoscape-dagre/cytoscape-dagre.js"); /* harmony import */ var cytoscape_dagre__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(cytoscape_dagre__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var cytoscape_fcose__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! cytoscape-fcose */ "./node_modules/cytoscape-fcose/cytoscape-fcose.js"); /* harmony import */ var cytoscape_fcose__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(cytoscape_fcose__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var react_json_tree__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! react-json-tree */ "./node_modules/react-json-tree/lib/esm/index.js"); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js"); /* harmony import */ var _actions_paths__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../actions/paths */ "./src/actions/paths.js"); /* harmony import */ var _actions_dependencies__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../actions/dependencies */ "./src/actions/dependencies.js"); /* harmony import */ var _actions__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../actions */ "./src/actions/index.js"); /* harmony import */ var _CallbackGraphContainer_css__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./CallbackGraphContainer.css */ "./src/components/error/CallbackGraph/CallbackGraphContainer.css"); /* harmony import */ var _CallbackGraphContainerStylesheet__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./CallbackGraphContainerStylesheet */ "./src/components/error/CallbackGraph/CallbackGraphContainerStylesheet.js"); /* harmony import */ var _CallbackGraphEffects__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./CallbackGraphEffects */ "./src/components/error/CallbackGraph/CallbackGraphEffects.js"); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } cytoscape__WEBPACK_IMPORTED_MODULE_3___default().use((cytoscape_dagre__WEBPACK_IMPORTED_MODULE_5___default())); cytoscape__WEBPACK_IMPORTED_MODULE_3___default().use((cytoscape_fcose__WEBPACK_IMPORTED_MODULE_6___default())); /* * Generates all the elements (nodes, edges) for the dependency graph. */ function generateElements(graphs, profile, extraLinks) { var consumed = []; var elements = []; var structure = {}; function recordNode(id, rawProperty) { var property = rawProperty.split('@')[0]; var idStr = (0,_actions_dependencies__WEBPACK_IMPORTED_MODULE_9__.stringifyId)(id); var idType = typeof id === 'object' ? 'wildcard' : 'component'; // dagre layout has problems with eg `width` property - so prepend an X var parentId = idStr; var childId = "".concat(parentId, ".X").concat(property); if (!consumed.includes(parentId)) { consumed.push(parentId); elements.push({ data: { id: parentId, label: idStr, type: idType } }); structure[parentId] = []; } if (!consumed.includes(childId)) { consumed.push(childId); elements.push({ data: { id: childId, label: property, parent: parentId, type: 'property' } }); structure[parentId].push(childId); } return childId; } function recordEdge(source, target, type) { elements.push({ data: { source: source, target: target, type: type } }); } (graphs.callbacks || []).forEach(function (callback, i) { var cb = "__dash_callback__.".concat(callback.output); var cbProfile = profile.callbacks[callback.output] || {}; var count = cbProfile.count || 0; var time = cbProfile.total || 0; elements.push({ data: { id: cb, label: "callback.".concat(i), type: 'callback', mode: callback.clientside_function ? 'client' : 'server', count: count, time: count > 0 ? Math.round(time / count) : 0, loadingSet: Date.now(), errorSet: Date.now() } }); callback.outputs.map(function (_ref) { var id = _ref.id, property = _ref.property; var nodeId = recordNode(id, property); recordEdge(cb, nodeId, 'output'); }); callback.inputs.map(function (_ref2) { var id = _ref2.id, property = _ref2.property; var nodeId = recordNode(id, property); recordEdge(nodeId, cb, 'input'); }); callback.state.map(function (_ref3) { var id = _ref3.id, property = _ref3.property; var nodeId = recordNode(id, property); recordEdge(nodeId, cb, 'state'); }); }); // pull together props in the same component if (extraLinks) { (0,ramda__WEBPACK_IMPORTED_MODULE_7__.values)(structure).forEach(function (childIds) { childIds.forEach(function (childFrom) { childIds.forEach(function (childTo) { if (childFrom !== childTo) { recordEdge(childFrom, childTo, 'hidden'); } }); }); }); } return elements; } function reduceStatus(status) { if ((0,ramda__WEBPACK_IMPORTED_MODULE_7__.keys)(status).length === 2) { return status.latest; } return status; } function flattenOutputs(res) { var outputs = {}; for (var idStr in res) { for (var prop in res[idStr]) { outputs[idStr + '.' + prop] = res[idStr][prop]; } } return outputs; } function flattenInputs(inArray, final) { (inArray || []).forEach(function (inItem) { if (Array.isArray(inItem)) { flattenInputs(inItem, final); } else { var id = inItem.id, property = inItem.property, value = inItem.value; final[(0,_actions_dependencies__WEBPACK_IMPORTED_MODULE_9__.stringifyId)(id) + '.' + property] = value; } }); return final; } function cleanOutputId(outputId) { return outputId.replace(/(^\.\.|\.\.$)/g, '').split('...').reduce(function (agg, next) { return agg.concat(next.replace(/(.*\..*)(@.+)$/, function (a, b) { return b + ' (Duplicate)'; })); }, []).join('...'); } // len('__dash_callback__.') var cbPrefixLen = 18; var dagreLayout = { name: 'dagre', padding: 10, ranker: 'tight-tree' }; var forceLayout = { name: 'fcose', padding: 10, animate: false }; var layouts = { 'top-down': _objectSpread(_objectSpread({}, dagreLayout), {}, { spacingFactor: 0.8 }), 'left-right': _objectSpread(_objectSpread({}, dagreLayout), {}, { nodeSep: 0, rankSep: 80, rankDir: 'LR' }), force: forceLayout, 'force-loose': forceLayout }; function CallbackGraph() { // Grab items from the redux store. var paths = (0,react_redux__WEBPACK_IMPORTED_MODULE_2__.useSelector)(function (state) { return state.paths; }); var layout = (0,react_redux__WEBPACK_IMPORTED_MODULE_2__.useSelector)(function (state) { return state.layout; }); var graphs = (0,react_redux__WEBPACK_IMPORTED_MODULE_2__.useSelector)(function (state) { return state.graphs; }); var profile = (0,react_redux__WEBPACK_IMPORTED_MODULE_2__.useSelector)(function (state) { return state.profile; }); var changed = (0,react_redux__WEBPACK_IMPORTED_MODULE_2__.useSelector)(function (state) { return state.changed; }); var lifecycleState = (0,react_redux__WEBPACK_IMPORTED_MODULE_2__.useSelector)(function (state) { return state.appLifecycle; }); // Keep track of cytoscape reference and user selected items. var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null), _useState2 = _slicedToArray(_useState, 2), selected = _useState2[0], setSelected = _useState2[1]; var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null), _useState4 = _slicedToArray(_useState3, 2), cytoscape = _useState4[0], setCytoscape = _useState4[1]; var graphLayout = profile.graphLayout; var chosenType = graphLayout === null || graphLayout === void 0 ? void 0 : graphLayout._chosenType; var layoutSelector = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null); var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(chosenType || 'top-down'), _useState6 = _slicedToArray(_useState5, 2), layoutType = _useState6[0], setLayoutType = _useState6[1]; // Generate and memoize the elements. var elements = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () { return generateElements(graphs, profile, layoutType === 'force'); }, [graphs, layoutType]); // Custom hook to make sure cytoscape is loaded. var useCytoscapeEffect = function useCytoscapeEffect(effect, condition) { (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { return cytoscape && effect(cytoscape) || undefined; }, condition); }; function getComponent(id) { // for now ignore pattern-matching IDs // to do better we may need to store the *actual* IDs used for each // callback invocation, since they need not match what's on the page now. if (id.charAt(0) === '{') { hasPatterns = true; return undefined; } var idPath = (0,_actions_paths__WEBPACK_IMPORTED_MODULE_8__.getPath)(paths, id); return idPath ? (0,ramda__WEBPACK_IMPORTED_MODULE_7__.path)(idPath, layout) : undefined; } function getPropValue(data) { var parent = getComponent(data.parent); return parent ? parent.props[data.label] : undefined; } function setPresetLayout(_ref4) { var _layoutSelector$curre; var cy = _ref4.cy; var positions = {}; cy.nodes().each(function (n) { positions[n.id()] = n.position(); }); // Hack! We're mutating the redux store directly here, rather than // dispatching an action, because we don't want this to trigger a // rerender, we just want the layout to persist when the callback graph // is rerendered - either because there's new profile information to // display or because the graph was closed and reopened. The latter is // the reason we're not using component state to store the layout. profile.graphLayout = { name: 'preset', fit: false, positions, zoom: cy.zoom(), pan: cy.pan(), _chosenType: (_layoutSelector$curre = layoutSelector.current) === null || _layoutSelector$curre === void 0 ? void 0 : _layoutSelector$curre.value }; } // Adds callbacks once cyctoscape is initialized. useCytoscapeEffect(function (cy) { cytoscape.on('tap', 'node', function (e) { return setSelected(e.target); }); cytoscape.on('tap', function (e) { if (e.target === cy) { setSelected(null); } }); cytoscape.on('zoom', setPresetLayout); cytoscape.on('pan', setPresetLayout); cytoscape.nodes().on('position', setPresetLayout); }, [cytoscape]); // Set node classes on selected. useCytoscapeEffect(function (cy) { return selected && (0,_CallbackGraphEffects__WEBPACK_IMPORTED_MODULE_13__.updateSelectedNode)(cy, selected.data().id); }, [selected]); // Flash classes when props change. Uses changed as a trigger. Also // flash all input edges originating from this node and highlight // the subtree that contains the selected node. useCytoscapeEffect(function (cy) { return changed && (0,_CallbackGraphEffects__WEBPACK_IMPORTED_MODULE_13__.updateChangedProps)(cy, changed.id, changed.props); }, [changed]); // Update callbacks from profiling information. useCytoscapeEffect(function (cy) { return profile.updated.forEach(function (cb) { return (0,_CallbackGraphEffects__WEBPACK_IMPORTED_MODULE_13__.updateCallback)(cy, cb, profile.callbacks[cb]); }); }, [profile.updated]); if (lifecycleState !== 'HYDRATED') { // If we get here too early - most likely during hot reloading - then // we need to bail out and wait for the full state to be available return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "dash-callback-dag--container" }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "dash-callback-dag--message" }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", null, "Waiting for app to be ready..."))); } // FIXME: Move to a new component? // Generate the element introspection data. var elementName = ''; var elementInfo = {}; var hasPatterns = false; if (selected) { var data = selected.data(); switch (data.type) { case 'component': { var _getComponent; var rest = (0,ramda__WEBPACK_IMPORTED_MODULE_7__.omit)(['id'], (_getComponent = getComponent(data.id)) === null || _getComponent === void 0 ? void 0 : _getComponent.props); elementInfo = rest; elementName = data.id; break; } case 'property': { elementName = data.parent; elementInfo[data.label] = getPropValue(data); break; } // callback default: { elementInfo.type = data.mode; // Remove uid and set profile. var callbackOutputId = data.id.slice(cbPrefixLen); elementName = cleanOutputId(callbackOutputId); var cbProfile = profile.callbacks[callbackOutputId]; if (cbProfile) { var count = cbProfile.count, status = cbProfile.status, network = cbProfile.network, resources = cbProfile.resources, total = cbProfile.total, compute = cbProfile.compute, result = cbProfile.result, inputs = cbProfile.inputs, state = cbProfile.state; var avg = function avg(v) { return Math.round(v / (count || 1)); }; elementInfo['call count'] = count; elementInfo.status = reduceStatus(status); var timing = elementInfo['time (avg milliseconds)'] = { total: avg(total), compute: avg(compute) }; if (data.mode === 'server') { timing.network = avg(network.time); elementInfo['data transfer (avg bytes)'] = { download: avg(network.download), upload: avg(network.upload) }; } for (var key in resources) { timing['user: ' + key] = avg(resources[key]); } elementInfo.outputs = flattenOutputs(result); elementInfo.inputs = flattenInputs(inputs, {}); elementInfo.state = flattenInputs(state, {}); } else { elementInfo['call count'] = 0; } } } } var cyLayout = chosenType === layoutType ? graphLayout : (0,ramda__WEBPACK_IMPORTED_MODULE_7__.mergeRight)(layouts[layoutType], { ready: setPresetLayout }); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "dash-callback-dag--container" }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_cytoscapejs__WEBPACK_IMPORTED_MODULE_4__["default"], { style: { width: '100%', height: '100%' }, cy: setCytoscape, elements: elements, layout: cyLayout, stylesheet: _CallbackGraphContainerStylesheet__WEBPACK_IMPORTED_MODULE_12__["default"] }), selected ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "dash-callback-dag--info" }, hasPatterns ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", null, "Info isn't supported for pattern-matching IDs at this time") : null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react_json_tree__WEBPACK_IMPORTED_MODULE_14__.JSONTree, { data: elementInfo, theme: "summerfruit", labelRenderer: function labelRenderer(_keys) { return _keys.length === 1 ? elementName : _keys[0]; }, getItemString: function getItemString(type, data, itemType) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", null, itemType); }, shouldExpandNode: function shouldExpandNode(keyName, data, level) { return level < 1; } })) : null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("select", { className: "dash-callback-dag--layoutSelector", onChange: function onChange(e) { return setLayoutType(e.target.value); }, value: layoutType, ref: layoutSelector }, (0,ramda__WEBPACK_IMPORTED_MODULE_7__.keys)(layouts).map(function (k) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("option", { value: k, key: k }, k); }))); } CallbackGraph.propTypes = {}; var UnconnectedCallbackGraphContainer = /*#__PURE__*/function (_Component) { _inherits(UnconnectedCallbackGraphContainer, _Component); var _super = _createSuper(UnconnectedCallbackGraphContainer); function UnconnectedCallbackGraphContainer(props) { var _this; _classCallCheck(this, UnconnectedCallbackGraphContainer); _this = _super.call(this, props); _this.state = { hasError: false }; return _this; } _createClass(UnconnectedCallbackGraphContainer, [{ key: "componentDidCatch", value: function componentDidCatch(error, info) { var dispatch = this.props.dispatch; dispatch((0,_actions__WEBPACK_IMPORTED_MODULE_10__.onError)({ myID: this.state.myID, type: 'frontEnd', error, info })); } }, { key: "render", value: function render() { return this.state.hasError ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "dash-callback-dag--container" }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "dash-callback-dag--message" }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", null, "Oops! The callback graph threw an error."), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", null, "Check the error list for details."))) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(CallbackGraph, null); } }], [{ key: "getDerivedStateFromError", value: function getDerivedStateFromError(_) { return { hasError: true }; } }]); return UnconnectedCallbackGraphContainer; }(react__WEBPACK_IMPORTED_MODULE_0__.Component); UnconnectedCallbackGraphContainer.propTypes = { dispatch: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func) }; var CallbackGraphContainer = (0,react_redux__WEBPACK_IMPORTED_MODULE_2__.connect)(null, function (dispatch) { return { dispatch }; })(UnconnectedCallbackGraphContainer); /***/ }), /***/ "./src/components/error/CallbackGraph/CallbackGraphContainerStylesheet.js": /*!********************************************************************************!*\ !*** ./src/components/error/CallbackGraph/CallbackGraphContainerStylesheet.js ***! \********************************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); var stylesheet = [{ selector: '*', style: { 'font-size': 12, 'font-family': '"Arial", sans-serif' } }, { selector: 'edge', style: { width: 2, 'line-color': '#888888', 'target-arrow-color': '#888888', 'target-arrow-shape': 'triangle', 'target-arrow-fill': 'filled', 'arrow-scale': 1, 'curve-style': 'bezier', 'control-point-step-size': 40, 'transition-property': 'line-color, target-arrow-color', 'transition-duration': '0.25s', 'transition-timing-function': 'ease-in-out-sine' } }, { selector: 'edge[type="hidden"]', style: { display: 'none' } }, { selector: 'edge[type="output"]', style: { 'line-color': '#0080D0', 'target-arrow-color': '#0080D0' } }, { selector: 'edge[type="state"]', style: { 'line-style': 'dashed' } }, { selector: 'node', style: { color: '#333333', padding: 6, 'text-valign': 'center', 'text-halign': 'center', 'border-width': 2, 'border-opacity': 0, 'border-style': 'solid', 'border-color': '#888888', 'transition-property': 'border-opacity', 'transition-duration': '0.25s', 'transition-timing-function': 'ease-in-out-sine' } }, { selector: 'node[type="callback"]', style: { width: 35, height: 25, shape: 'round-rectangle', label: function label(e) { return "".concat(e.data().count, "\n").concat(e.data().time, " ms"); }, 'text-wrap': 'wrap', 'text-justification': 'center' } }, { selector: 'node[type="callback"][mode="client"]', style: { color: '#323330', 'background-color': '#F0DB4F' } }, { selector: 'node[type="callback"][mode="server"]', style: { color: '#323330', 'background-color': '#00CC96' } }, { selector: 'node[type="component"], node[type="wildcard"]', style: { width: 'label', // height: 'label', shape: 'rectangle', content: function content(e) { return e.data().label.replace(/"/g, ''); }, 'text-valign': 'top', 'background-color': '#B9C2CE' } }, { selector: 'node[type="property"]', style: { width: 'label', height: 20, shape: 'rectangle', content: 'data(label)', color: 'white', 'background-color': '#109DFF' } }, { selector: '.selected-node', style: { ghost: 'yes', 'ghost-offset-x': 2, 'ghost-offset-y': 2, 'ghost-opacity': 0.25, 'border-opacity': 1 } }, { selector: '.prop-changed, .callback-loading', style: { 'border-color': '#CC43B7', 'border-width': 2, 'border-opacity': 1 } }, { selector: '.callback-error', style: { 'background-color': '#E1332E' } }, { selector: '.triggered', style: { 'line-color': '#CC43B7', 'target-arrow-color': '#CC43B7' } }, { selector: '.inactive', style: { opacity: 0.5 } }]; /* harmony default export */ __webpack_exports__["default"] = (stylesheet); /***/ }), /***/ "./src/components/error/CallbackGraph/CallbackGraphEffects.js": /*!********************************************************************!*\ !*** ./src/components/error/CallbackGraph/CallbackGraphEffects.js ***! \********************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ updateCallback: function() { return /* binding */ updateCallback; }, /* harmony export */ updateChangedProps: function() { return /* binding */ updateChangedProps; }, /* harmony export */ updateSelectedNode: function() { return /* binding */ updateSelectedNode; } /* harmony export */ }); /* harmony import */ var _constants_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../constants/constants */ "./src/constants/constants.js"); /** * getEdgeTypes * * Finds all edges connected to a node and splits them by type. * * @param {Object} node - Cytoscape node. * @returns {Object} - Object containing the edges, sorted by type. */ function getEdgeTypes(node) { var elements = node.connectedEdges(); return { input: elements.filter('[type = "input"]'), state: elements.filter('[type = "state"]'), output: elements.filter('[type = "output"]') }; } /** * updateSelected * * Updates the classes of the selected node and recenters the viewport. * * @param {Object} cy - Reference to the cytoscape instance. * @param {String} id - The id of the selected node. * @returns {function} - cleanup function, for useEffect hook */ function updateSelectedNode(cy, id) { function ascend(node, collection) { // FIXME: Should we include State parents but non-recursively? var type = node.data().type === 'callback' ? 'input' : 'output'; var edges = getEdgeTypes(node)[type]; var parents = edges.sources(); collection.merge(edges); collection.merge(parents); if (node.data().type === 'property') { collection.merge(node.ancestors()); } parents.forEach(function (node) { return ascend(node, collection); }); } function descend(node, collection) { var type = node.data().type === 'callback' ? 'output' : 'input'; var edges = getEdgeTypes(node)[type]; var children = edges.targets(); collection.merge(edges); collection.merge(children); if (node.data().type === 'property') { collection.merge(node.ancestors()); } children.forEach(function (node) { return descend(node, collection); }); } if (id) { var node = cy.getElementById(id); // Highlight the selected node. node.addClass('selected-node'); // Find the subtree that the node belongs to. A subtree contains // all all ancestors and descendants that are connected via Inputs // or Outputs (but not State). // WARNING: No cycle detection! var subtree = cy.collection(); subtree.merge(node); ascend(node, subtree); descend(node, subtree); var other = subtree.absoluteComplement(); other.addClass('inactive'); return function () { node.removeClass('selected-node'); other.removeClass('inactive'); }; } return undefined; } /** * updateChangedProp * * Flashes property nodes that updated and any inputs they are connected to. * * @param {Object} cy - Reference to the cytoscape instance. * @param {String} id - The component id which updated. * @param {Object} props - The props that updated. * @param {Number} flashTime - The time to flash classes for in ms. * @returns {undefined} */ function updateChangedProps(cy, id, props) { var flashTime = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 500; Object.keys(props).forEach(function (prop) { var node = cy.getElementById("".concat(id, ".").concat(prop)); node.flashClass('prop-changed', flashTime); node.edgesTo('*').filter('[type = "input"]').flashClass('triggered', flashTime); }); } /** * updateCallback * * Updates a callback node with profiling information (call count, avg time) * and adds or removes classes as necessary. Classes are always assert for * at least flashTime ms so that they can be visually observed. When callbacks * resolve, all output edges are flashed. * * @param {Object} cy - Reference to the cytoscape instance. * @param {String} id - The id of the callback (i.e., it's output identifier) * @param {Object} profile - The callback profiling information. * @param {Number} flashTime - The time to flash classes for in ms. * @returns {undefined} */ function updateCallback(cy, id, profile) { var flashTime = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 500; var node = cy.getElementById("__dash_callback__.".concat(id)); var count = profile.count, total = profile.total, status = profile.status; var latest = status.latest; // Update data. var avgTime = count > 0 ? total / count : 0; node.data('count', count); node.data('time', Math.round(avgTime)); // Either flash the classes OR maintain it for long callbacks. if (latest === 'loading') { node.data('loadingSet', Date.now()); node.addClass('callback-loading'); } else if (node.hasClass('callback-loading')) { var timeLeft = node.data('loadingSet') + flashTime - Date.now(); setTimeout(function () { return node.removeClass('callback-loading'); }, Math.max(timeLeft, 0)); } if (latest !== 'loading' && latest !== _constants_constants__WEBPACK_IMPORTED_MODULE_0__.STATUSMAP[_constants_constants__WEBPACK_IMPORTED_MODULE_0__.STATUS.OK] && latest !== _constants_constants__WEBPACK_IMPORTED_MODULE_0__.STATUSMAP[_constants_constants__WEBPACK_IMPORTED_MODULE_0__.STATUS.PREVENT_UPDATE]) { node.data('errorSet', Date.now()); node.addClass('callback-error'); } else if (node.hasClass('callback-error')) { var _timeLeft = node.data('errorSet') + flashTime - Date.now(); setTimeout(function () { return node.removeClass('callback-error'); }, Math.max(_timeLeft, 0)); } // FIXME: This will flash branches that return no_update!! // If the callback resolved properly, flash the outputs. if (latest === _constants_constants__WEBPACK_IMPORTED_MODULE_0__.STATUSMAP[_constants_constants__WEBPACK_IMPORTED_MODULE_0__.STATUS.OK]) { node.edgesTo('*').flashClass('triggered', flashTime); } } /***/ }), /***/ "./src/components/error/ComponentErrorBoundary.react.js": /*!**************************************************************!*\ !*** ./src/components/error/ComponentErrorBoundary.react.js ***! \**************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _actions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../actions */ "./src/actions/index.js"); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } var ComponentErrorBoundary = /*#__PURE__*/function (_Component) { _inherits(ComponentErrorBoundary, _Component); var _super = _createSuper(ComponentErrorBoundary); function ComponentErrorBoundary(props) { var _this; _classCallCheck(this, ComponentErrorBoundary); _this = _super.call(this, props); _this.state = { myID: props.componentId, oldChildren: null, hasError: false }; return _this; } _createClass(ComponentErrorBoundary, [{ key: "componentDidCatch", value: function componentDidCatch(error, info) { var dispatch = this.props.dispatch; dispatch((0,_actions__WEBPACK_IMPORTED_MODULE_2__.onError)({ myID: this.state.myID, type: 'frontEnd', error, info })); dispatch(_actions__WEBPACK_IMPORTED_MODULE_2__.revert); } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps, prevState) { var prevChildren = prevProps.children; if (!this.state.hasError && prevChildren !== prevState.oldChildren && prevChildren !== this.props.children) { /* eslint-disable-next-line react/no-did-update-set-state */ this.setState({ oldChildren: prevChildren }); } } }, { key: "render", value: function render() { var _this$state = this.state, hasError = _this$state.hasError, oldChildren = _this$state.oldChildren; return hasError ? oldChildren : this.props.children; } }], [{ key: "getDerivedStateFromError", value: function getDerivedStateFromError(_) { return { hasError: true }; } }]); return ComponentErrorBoundary; }(react__WEBPACK_IMPORTED_MODULE_0__.Component); ComponentErrorBoundary.propTypes = { children: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().object), componentId: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string), error: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().object), dispatch: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func) }; /* harmony default export */ __webpack_exports__["default"] = (ComponentErrorBoundary); /***/ }), /***/ "./src/components/error/FrontEnd/FrontEndError.react.js": /*!**************************************************************!*\ !*** ./src/components/error/FrontEnd/FrontEndError.react.js ***! \**************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ FrontEndError: function() { return /* binding */ FrontEndError; } /* harmony export */ }); /* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js"); /* harmony import */ var _FrontEndError_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./FrontEndError.css */ "./src/components/error/FrontEnd/FrontEndError.css"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _icons_CollapseIcon_svg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../icons/CollapseIcon.svg */ "./src/components/error/icons/CollapseIcon.svg"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _Percy_css__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Percy.css */ "./src/components/error/Percy.css"); /* harmony import */ var _actions_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../actions/utils */ "./src/actions/utils.js"); /* harmony import */ var _werkzeugcss__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../werkzeugcss */ "./src/components/error/werkzeugcss.js"); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } var FrontEndError = /*#__PURE__*/function (_Component) { _inherits(FrontEndError, _Component); var _super = _createSuper(FrontEndError); function FrontEndError(props) { var _this; _classCallCheck(this, FrontEndError); _this = _super.call(this, props); _this.state = { collapsed: _this.props.isListItem }; return _this; } _createClass(FrontEndError, [{ key: "render", value: function render() { var _this2 = this; var _this$props = this.props, e = _this$props.e, inAlertsTray = _this$props.inAlertsTray; var collapsed = this.state.collapsed; var cardClasses = 'dash-error-card__content' + (inAlertsTray ? ' dash-error-card--alerts-tray' : ''); /* eslint-disable no-inline-comments */ var errorHeader = /*#__PURE__*/React.createElement("div", { className: "dash-fe-error-top test-devtools-error-toggle", onClick: function onClick() { return _this2.setState({ collapsed: !collapsed }); } }, /*#__PURE__*/React.createElement("span", { className: "dash-fe-error-top__group" }, "\u26D1\uFE0F", /*#__PURE__*/React.createElement("span", { className: "dash-fe-error__title" }, e.error.message || 'Error')), /*#__PURE__*/React.createElement("span", { className: "dash-fe-error-top__group" }, /*#__PURE__*/React.createElement("span", { className: "dash-fe-error__timestamp percy-hide" }, "".concat(e.timestamp.toLocaleTimeString())), /*#__PURE__*/React.createElement("span", { className: "dash-fe-error__timestamp percy-show" }, "00:00:00 PM"), /*#__PURE__*/React.createElement(_icons_CollapseIcon_svg__WEBPACK_IMPORTED_MODULE_3__["default"], { className: "dash-fe-error__collapse ".concat(collapsed ? 'dash-fe-error__collapse--flipped' : ''), onClick: function onClick() { return _this2.setState({ collapsed: !collapsed }); } }))); /* eslint-enable no-inline-comments */ return collapsed ? /*#__PURE__*/React.createElement("div", { className: "dash-error-card__list-item" }, errorHeader) : /*#__PURE__*/React.createElement("div", { className: cardClasses }, errorHeader, /*#__PURE__*/React.createElement(ErrorContent, { error: e.error })); } }]); return FrontEndError; }(react__WEBPACK_IMPORTED_MODULE_2__.Component); var MAX_MESSAGE_LENGTH = 40; /* eslint-disable no-inline-comments */ function UnconnectedErrorContent(_ref) { var error = _ref.error, base = _ref.base; return /*#__PURE__*/React.createElement("div", { className: "error-container" }, typeof error.message !== 'string' || error.message.length < MAX_MESSAGE_LENGTH ? null : /*#__PURE__*/React.createElement("div", { className: "dash-fe-error__st" }, /*#__PURE__*/React.createElement("div", { className: "dash-fe-error__info dash-fe-error__curved" }, error.message)), typeof error.stack !== 'string' ? null : /*#__PURE__*/React.createElement("div", { className: "dash-fe-error__st" }, /*#__PURE__*/React.createElement("div", { className: "dash-fe-error__info" }, /*#__PURE__*/React.createElement("details", null, /*#__PURE__*/React.createElement("summary", null, /*#__PURE__*/React.createElement("i", null, "(This error originated from the built-in JavaScript code that runs Dash apps. Click to see the full stack trace or open your browser's console.)")), error.stack.split('\n').map(function (line, i) { return /*#__PURE__*/React.createElement("p", { key: i }, line); })))), typeof error.html !== 'string' ? null : error.html.substring(0, '', "")).replace('="?__debugger__', "=\"".concat(base, "?__debugger__")), style: { /* * 67px of padding and margin between this * iframe and the parent container. * 67 was determined manually in the * browser's dev tools. */ width: 'calc(600px - 67px)', height: '75vh', border: 'none' } }))) : /*#__PURE__*/React.createElement("div", { className: "dash-be-error__str" }, /*#__PURE__*/React.createElement("div", { className: "dash-backend-error" }, error.html))); } /* eslint-enable no-inline-comments */ var errorPropTypes = prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape({ message: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().string), /* front-end error messages */ stack: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().string), /* backend error messages */ html: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().string) }); UnconnectedErrorContent.propTypes = { error: errorPropTypes, base: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().string) }; var ErrorContent = (0,react_redux__WEBPACK_IMPORTED_MODULE_0__.connect)(function (state) { return { base: (0,_actions_utils__WEBPACK_IMPORTED_MODULE_6__.urlBase)(state.config) }; })(UnconnectedErrorContent); FrontEndError.propTypes = { e: prop_types__WEBPACK_IMPORTED_MODULE_4___default().shape({ timestamp: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().object), error: errorPropTypes }), inAlertsTray: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().bool), isListItem: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().bool) }; FrontEndError.defaultProps = { inAlertsTray: false, isListItem: false }; /***/ }), /***/ "./src/components/error/FrontEnd/FrontEndErrorContainer.react.js": /*!***********************************************************************!*\ !*** ./src/components/error/FrontEnd/FrontEndErrorContainer.react.js ***! \***********************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ FrontEndErrorContainer: function() { return /* binding */ FrontEndErrorContainer; } /* harmony export */ }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _FrontEndError_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./FrontEndError.css */ "./src/components/error/FrontEnd/FrontEndError.css"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _FrontEndError_react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./FrontEndError.react */ "./src/components/error/FrontEnd/FrontEndError.react.js"); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } var FrontEndErrorContainer = /*#__PURE__*/function (_Component) { _inherits(FrontEndErrorContainer, _Component); var _super = _createSuper(FrontEndErrorContainer); function FrontEndErrorContainer(props) { _classCallCheck(this, FrontEndErrorContainer); return _super.call(this, props); } _createClass(FrontEndErrorContainer, [{ key: "render", value: function render() { var _this$props = this.props, errors = _this$props.errors, connected = _this$props.connected, errorsOpened = _this$props.errorsOpened, clickHandler = _this$props.clickHandler; var errorsLength = errors.length; if (errorsLength === 0 || !errorsOpened) { return null; } var inAlertsTray = this.props.inAlertsTray; var cardClasses = 'dash-error-card dash-error-card--container'; var errorElements = errors.map(function (error, i) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_FrontEndError_react__WEBPACK_IMPORTED_MODULE_3__.FrontEndError, { e: error, isListItem: true, key: i }); }); if (inAlertsTray) { cardClasses += ' dash-error-card--alerts-tray'; } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: cardClasses }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "dash-error-card__topbar" }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "dash-error-card__message" }, "\uD83D\uDED1 Errors (", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("strong", { className: "test-devtools-error-count" }, errorsLength), ")", connected ? null : "\xA0 \uD83D\uDEAB Server Unavailable"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "dash-fe-error__icon-x", onClick: function onClick() { return clickHandler(); } }, "\xD7")), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "dash-error-card__list" }, errorElements)); } }]); return FrontEndErrorContainer; }(react__WEBPACK_IMPORTED_MODULE_0__.Component); FrontEndErrorContainer.propTypes = { id: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().string), errors: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().array), connected: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().bool), inAlertsTray: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().any), errorsOpened: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().any), clickHandler: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().func) }; FrontEndErrorContainer.propTypes = { inAlertsTray: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().any) }; /***/ }), /***/ "./src/components/error/GlobalErrorContainer.react.js": /*!************************************************************!*\ !*** ./src/components/error/GlobalErrorContainer.react.js ***! \************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _menu_DebugMenu_react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./menu/DebugMenu.react */ "./src/components/error/menu/DebugMenu.react.js"); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } var UnconnectedGlobalErrorContainer = /*#__PURE__*/function (_Component) { _inherits(UnconnectedGlobalErrorContainer, _Component); var _super = _createSuper(UnconnectedGlobalErrorContainer); function UnconnectedGlobalErrorContainer(props) { _classCallCheck(this, UnconnectedGlobalErrorContainer); return _super.call(this, props); } _createClass(UnconnectedGlobalErrorContainer, [{ key: "render", value: function render() { var _this$props = this.props, config = _this$props.config, error = _this$props.error, children = _this$props.children; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { id: "_dash-global-error-container" }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_menu_DebugMenu_react__WEBPACK_IMPORTED_MODULE_3__.DebugMenu, { error: error, hotReload: Boolean(config.hot_reload) }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", { id: "_dash-app-content" }, children))); } }]); return UnconnectedGlobalErrorContainer; }(react__WEBPACK_IMPORTED_MODULE_1__.Component); UnconnectedGlobalErrorContainer.propTypes = { children: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().object), config: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().object), error: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().object) }; var GlobalErrorContainer = (0,react_redux__WEBPACK_IMPORTED_MODULE_0__.connect)(function (state) { return { config: state.config, error: state.error }; })(UnconnectedGlobalErrorContainer); /* harmony default export */ __webpack_exports__["default"] = (GlobalErrorContainer); /***/ }), /***/ "./src/components/error/GlobalErrorOverlay.react.js": /*!**********************************************************!*\ !*** ./src/components/error/GlobalErrorOverlay.react.js ***! \**********************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ GlobalErrorOverlay; } /* harmony export */ }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js"); /* harmony import */ var _GlobalErrorOverlay_css__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./GlobalErrorOverlay.css */ "./src/components/error/GlobalErrorOverlay.css"); /* harmony import */ var _FrontEnd_FrontEndErrorContainer_react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./FrontEnd/FrontEndErrorContainer.react */ "./src/components/error/FrontEnd/FrontEndErrorContainer.react.js"); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } var GlobalErrorOverlay = /*#__PURE__*/function (_Component) { _inherits(GlobalErrorOverlay, _Component); var _super = _createSuper(GlobalErrorOverlay); function GlobalErrorOverlay(props) { _classCallCheck(this, GlobalErrorOverlay); return _super.call(this, props); } _createClass(GlobalErrorOverlay, [{ key: "render", value: function render() { var _this$props = this.props, visible = _this$props.visible, error = _this$props.error, errorsOpened = _this$props.errorsOpened, clickHandler = _this$props.clickHandler; var frontEndErrors; if (errorsOpened) { var errors = (0,ramda__WEBPACK_IMPORTED_MODULE_2__.concat)(error.frontEnd, error.backEnd); frontEndErrors = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_FrontEnd_FrontEndErrorContainer_react__WEBPACK_IMPORTED_MODULE_4__.FrontEndErrorContainer, { errors: errors, connected: error.backEndConnected, errorsOpened: errorsOpened, clickHandler: clickHandler }); } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", null, this.props.children), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "dash-error-menu" }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: visible ? 'dash-fe-errors' : '' }, frontEndErrors))); } }]); return GlobalErrorOverlay; }(react__WEBPACK_IMPORTED_MODULE_0__.Component); GlobalErrorOverlay.propTypes = { children: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().object), visible: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool), error: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().object), errorsOpened: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().any), clickHandler: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func) }; /***/ }), /***/ "./src/components/error/menu/DebugMenu.react.js": /*!******************************************************!*\ !*** ./src/components/error/menu/DebugMenu.react.js ***! \******************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ DebugMenu: function() { return /* binding */ DebugMenu; } /* harmony export */ }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _DebugMenu_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./DebugMenu.css */ "./src/components/error/menu/DebugMenu.css"); /* harmony import */ var _icons_BellIcon_svg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../icons/BellIcon.svg */ "./src/components/error/icons/BellIcon.svg"); /* harmony import */ var _icons_CheckIcon_svg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../icons/CheckIcon.svg */ "./src/components/error/icons/CheckIcon.svg"); /* harmony import */ var _icons_ClockIcon_svg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../icons/ClockIcon.svg */ "./src/components/error/icons/ClockIcon.svg"); /* harmony import */ var _icons_DebugIcon_svg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../icons/DebugIcon.svg */ "./src/components/error/icons/DebugIcon.svg"); /* harmony import */ var _icons_GraphIcon_svg__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../icons/GraphIcon.svg */ "./src/components/error/icons/GraphIcon.svg"); /* harmony import */ var _icons_OffIcon_svg__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../icons/OffIcon.svg */ "./src/components/error/icons/OffIcon.svg"); /* harmony import */ var _GlobalErrorOverlay_react__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../GlobalErrorOverlay.react */ "./src/components/error/GlobalErrorOverlay.react.js"); /* harmony import */ var _CallbackGraph_CallbackGraphContainer_react__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../CallbackGraph/CallbackGraphContainer.react */ "./src/components/error/CallbackGraph/CallbackGraphContainer.react.js"); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } var classes = function classes(base, variant, variant2) { return "".concat(base, " ").concat(base, "--").concat(variant) + (variant2 ? " ".concat(base, "--").concat(variant2) : ''); }; var buttonFactory = function buttonFactory(enabled, buttonVariant, toggle, _Icon, iconVariant, label) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "dash-debug-menu__button-container" }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: classes('dash-debug-menu__button', buttonVariant, enabled && 'enabled'), onClick: toggle }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Icon, { className: classes('dash-debug-menu__icon', iconVariant) }), label ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("label", { className: "dash-debug-menu__button-label" }, label) : null)); }; var DebugMenu = /*#__PURE__*/function (_Component) { _inherits(DebugMenu, _Component); var _super = _createSuper(DebugMenu); function DebugMenu(props) { var _this; _classCallCheck(this, DebugMenu); _this = _super.call(this, props); _this.state = { opened: false, callbackGraphOpened: false, errorsOpened: true }; return _this; } _createClass(DebugMenu, [{ key: "render", value: function render() { var _this2 = this; var _this$state = this.state, opened = _this$state.opened, errorsOpened = _this$state.errorsOpened, callbackGraphOpened = _this$state.callbackGraphOpened; var _this$props = this.props, error = _this$props.error, hotReload = _this$props.hotReload; var errCount = error.frontEnd.length + error.backEnd.length; var connected = error.backEndConnected; var toggleErrors = function toggleErrors() { _this2.setState({ errorsOpened: !errorsOpened }); }; var status = hotReload ? connected ? 'available' : 'unavailable' : 'cold'; var _StatusIcon = hotReload ? connected ? _icons_CheckIcon_svg__WEBPACK_IMPORTED_MODULE_4__["default"] : _icons_OffIcon_svg__WEBPACK_IMPORTED_MODULE_8__["default"] : _icons_ClockIcon_svg__WEBPACK_IMPORTED_MODULE_5__["default"]; var menuContent = opened ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "dash-debug-menu__content" }, callbackGraphOpened ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_CallbackGraph_CallbackGraphContainer_react__WEBPACK_IMPORTED_MODULE_10__.CallbackGraphContainer, null) : null, buttonFactory(callbackGraphOpened, 'callbacks', function () { _this2.setState({ callbackGraphOpened: !callbackGraphOpened }); }, _icons_GraphIcon_svg__WEBPACK_IMPORTED_MODULE_7__["default"], 'graph', 'Callbacks'), buttonFactory(errorsOpened, 'errors', toggleErrors, _icons_BellIcon_svg__WEBPACK_IMPORTED_MODULE_3__["default"], 'bell', errCount + ' Error' + (errCount === 1 ? '' : 's')), buttonFactory(false, status, null, _StatusIcon, 'indicator', 'Server')) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "dash-debug-menu__content" }); var alertsLabel = (errCount || !connected) && !opened ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "dash-debug-alert-label" }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "dash-debug-alert", onClick: toggleErrors }, errCount ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "dash-debug-error-count" }, '🛑 ' + errCount) : null, connected ? null : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: "dash-debug-disconnected" }, "\uD83D\uDEAB"))) : null; var openVariant = opened ? 'open' : 'closed'; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", null, alertsLabel, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: classes('dash-debug-menu__outer', openVariant) }, menuContent), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: classes('dash-debug-menu', openVariant), onClick: function onClick() { _this2.setState({ opened: !opened }); } }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_icons_DebugIcon_svg__WEBPACK_IMPORTED_MODULE_6__["default"], { className: classes('dash-debug-menu__icon', 'debug') })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_GlobalErrorOverlay_react__WEBPACK_IMPORTED_MODULE_9__["default"], { error: error, visible: errCount > 0, errorsOpened: errorsOpened, clickHandler: toggleErrors }, this.props.children)); } }]); return DebugMenu; }(react__WEBPACK_IMPORTED_MODULE_0__.Component); DebugMenu.propTypes = { children: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().object), error: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().object), hotReload: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool) }; /***/ }), /***/ "./src/components/error/werkzeugcss.js": /*!*********************************************!*\ !*** ./src/components/error/werkzeugcss.js ***! \*********************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); // Werkzeug css included as a string, because we want to inject // it into an iframe srcDoc /* harmony default export */ __webpack_exports__["default"] = ("\nbody {\n margin: 0px;\n margin-top: 10px;\n}\n\n.error-container {\n font-family: Roboto;\n}\n\n.traceback {\n background-color: white;\n border: 2px solid #dfe8f3;\n border-radius: 0px 0px 4px 4px;\n color: #506784;\n}\n\nh2.traceback {\n background-color: #f3f6fa;\n border: 2px solid #dfe8f3;\n border-bottom: 0px;\n box-sizing: border-box;\n border-radius: 4px 4px 0px 0px;\n color: #506784;\n}\n\nh2.traceback em {\n color: #506784;\n font-weight: 100;\n}\n\n.traceback pre, .debugger textarea {\n background-color: #F3F6FA;\n}\n\n.debugger h1 {\n color: #506784;\n font-family: Roboto;\n}\n\n.explanation {\n color: #A2B1C6;\n}\n\n/* Hide the Don't Panic! footer */\n.debugger .footer {\n display: none;\n}\n\n/* Hide all of the Dash traceback stuff that leads up to the call */\n.line.before {\n display: none;\n}\n\ndiv.debugger {\n padding: 0px;\n}\n\n.debugger h1 {\n display: none;\n}\n\n.debugger .errormsg {\n margin: 0;\n color: #506784;\n font-size: 16px;\n background-color: #f3f6fa;\n border: 2px solid #dfe8f3;\n box-sizing: border-box;\n border-radius: 4px;\n padding: 10px;\n}\n\n.debugger .pastemessage input {\n display: none;\n}\n\n.debugger .explanation {\n display: none;\n}\n\n.debugger div.plain {\n border-radius: 4px;\n border-width: 2px;\n color: #506784;\n}\n\n.plain {\n display: block !important;\n}\n.plain > form > p {\n display: none;\n}\n.plain pre {\n padding: 15px !important;\n overflow-x: scroll;\n}\n\n.debugger div.traceback pre {\n cursor: default;\n}\n\n.debugger .traceback .source pre.line img {\n display: none;\n}\n"); /***/ }), /***/ "./src/constants/constants.js": /*!************************************!*\ !*** ./src/constants/constants.js ***! \************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ JWT_EXPIRED_MESSAGE: function() { return /* binding */ JWT_EXPIRED_MESSAGE; }, /* harmony export */ OAUTH_COOKIE_NAME: function() { return /* binding */ OAUTH_COOKIE_NAME; }, /* harmony export */ REDIRECT_URI_PATHNAME: function() { return /* binding */ REDIRECT_URI_PATHNAME; }, /* harmony export */ STATUS: function() { return /* binding */ STATUS; }, /* harmony export */ STATUSMAP: function() { return /* binding */ STATUSMAP; } /* harmony export */ }); var REDIRECT_URI_PATHNAME = '/_oauth2/callback'; var OAUTH_COOKIE_NAME = 'plotly_oauth_token'; var JWT_EXPIRED_MESSAGE = 'JWT Expired'; var STATUS = { OK: 200, PREVENT_UPDATE: 204, // We accept both 400 and 401 for JWT token expiry responses. // Some servers use code 400 for expired tokens, because // they reserve 401 for cases that require user action BAD_REQUEST: 400, UNAUTHORIZED: 401, CLIENTSIDE_ERROR: 'CLIENTSIDE_ERROR', NO_RESPONSE: 'NO_RESPONSE' }; var STATUSMAP = { [STATUS.OK]: 'SUCCESS', [STATUS.PREVENT_UPDATE]: 'NO_UPDATE' }; /***/ }), /***/ "./src/exceptions.js": /*!***************************!*\ !*** ./src/exceptions.js ***! \***************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ propTypeErrorHandler: function() { return /* binding */ propTypeErrorHandler; } /* harmony export */ }); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js"); function propTypeErrorHandler(message, props, type) { /* * propType error messages are constructed in * https://github.com/facebook/prop-types/blob/v15.7.2/factoryWithTypeCheckers.js * (Version 15.7.2) * * Parse these exception objects to remove JS source code and improve * the clarity. * * If wrong prop type was passed in, message looks like: * * Error: "Failed component prop type: Invalid component prop `animate` of type `number` supplied to `function GraphWithDefaults(props) { * var id = props.id ? props.id : generateId(); * return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(PlotlyGraph, _extends({}, props, { * id: id * })); * }`, expected `boolean`." * * * If a required prop type was omitted, message looks like: * * "Failed component prop type: The component prop `options[0].value` is marked as required in `function Checklist(props) { * var _this; * * _classCallCheck(this, Checklist); * * _this = _possibleConstructorReturn(this, _getPrototypeOf(Checklist).call(this, props)); * _this.state = { * values: props.values * }; * return _this; * }`, but its value is `undefined`." * */ var messageParts = message.split('`'); var errorMessage; if ((0,ramda__WEBPACK_IMPORTED_MODULE_0__.includes)('is marked as required', message)) { var invalidPropPath = messageParts[1]; errorMessage = "".concat(invalidPropPath, " in ").concat(type); if (props.id) { errorMessage += " with ID \"".concat(props.id, "\""); } errorMessage += ' is required but it was not provided.'; } else if ((0,ramda__WEBPACK_IMPORTED_MODULE_0__.includes)('Bad object', message)) { /* * Handle .exact errors * https://github.com/facebook/prop-types/blob/v15.7.2/factoryWithTypeCheckers.js#L438-L442 */ errorMessage = message.split('supplied to ')[0] + "supplied to ".concat(type) + '.\nBad' + message.split('.\nBad')[1]; } else if ((0,ramda__WEBPACK_IMPORTED_MODULE_0__.includes)('Invalid ', message) && (0,ramda__WEBPACK_IMPORTED_MODULE_0__.includes)(' supplied to ', message)) { var _invalidPropPath = messageParts[1]; errorMessage = "Invalid argument `".concat(_invalidPropPath, "` passed into ").concat(type); if (props.id) { errorMessage += " with ID \"".concat(props.id, "\""); } errorMessage += '.'; /* * Not all error messages include the expected value. * In particular, oneOfType. * https://github.com/facebook/prop-types/blob/v15.7.2/factoryWithTypeCheckers.js#L388 */ if ((0,ramda__WEBPACK_IMPORTED_MODULE_0__.includes)(', expected ', message)) { var expectedPropType = message.split(', expected ')[1]; errorMessage += "\nExpected ".concat(expectedPropType); } /* * Not all error messages include the type * In particular, oneOfType. * https://github.com/facebook/prop-types/blob/v15.7.2/factoryWithTypeCheckers.js#L388 */ if ((0,ramda__WEBPACK_IMPORTED_MODULE_0__.includes)(' of type `', message)) { var invalidPropTypeProvided = message.split(' of type `')[1].split('`')[0]; errorMessage += "\nWas supplied type `".concat(invalidPropTypeProvided, "`."); } if ((0,ramda__WEBPACK_IMPORTED_MODULE_0__.has)(_invalidPropPath, props)) { /* * invalidPropPath may be nested like `options[0].value`. * For now, we won't try to unpack these nested options * but we could in the future. */ var jsonSuppliedValue = JSON.stringify(props[_invalidPropPath], null, 2); if (jsonSuppliedValue) { if ((0,ramda__WEBPACK_IMPORTED_MODULE_0__.includes)('\n', jsonSuppliedValue)) { errorMessage += "\nValue provided: \n".concat(jsonSuppliedValue); } else { errorMessage += "\nValue provided: ".concat(jsonSuppliedValue); } } } } else { /* * Not aware of other prop type warning messages. * But, if they exist, then at least throw the default * react prop types error */ throw new Error(message); } throw new Error(errorMessage); } /***/ }), /***/ "./src/isSimpleComponent.js": /*!**********************************!*\ !*** ./src/isSimpleComponent.js ***! \**********************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js"); var SIMPLE_COMPONENT_TYPES = ['String', 'Number', 'Null', 'Boolean']; /* harmony default export */ __webpack_exports__["default"] = (function (component) { return (0,ramda__WEBPACK_IMPORTED_MODULE_0__.includes)((0,ramda__WEBPACK_IMPORTED_MODULE_0__.type)(component), SIMPLE_COMPONENT_TYPES); }); /***/ }), /***/ "./src/persistence.js": /*!****************************!*\ !*** ./src/persistence.js ***! \****************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ applyPersistence: function() { return /* binding */ applyPersistence; }, /* harmony export */ prunePersistence: function() { return /* binding */ prunePersistence; }, /* harmony export */ recordUiEdit: function() { return /* binding */ recordUiEdit; }, /* harmony export */ storePrefix: function() { return /* binding */ storePrefix; }, /* harmony export */ stores: function() { return /* binding */ stores; } /* harmony export */ }); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js"); /* harmony import */ var redux_actions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! redux-actions */ "./node_modules/redux-actions/es/createAction.js"); /* harmony import */ var _registry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./registry */ "./src/registry.js"); /* harmony import */ var _actions_dependencies__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./actions/dependencies */ "./src/actions/dependencies.js"); function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } /** * Generalized persistence for component props * * When users input new prop values, they can be stored and reapplied later, * when the component is recreated (changing `Tab` for example) or when the * page is reloaded (depending on `persistence_type`). Storage is tied to * component ID, and the prop values will not be stored with components * without an ID. * * Renderer handles the mechanics, but components must define a few props: * * - `persistence`: boolean, string, or number. For simple usage, set to `true` * to enable persistence, omit or set `false` to disable. For more complex * scenarios, use any truthy value, and change to a *different* truthy value * when you want the persisted values cleared. (modeled off `uirevision` in) * plotly.js * Typically should have no default, but the other persistence props should * have defaults, so all a user needs to do to enable persistence is set this * one prop. * * - `persisted_props`: array of prop names or "nested prop IDs" allowed to * persist. Normally should default to the full list of supported props, * so they can all be enabled at once. The main exception to this is if * there's a prop that *can* be persisted but most users wouldn't want this. * A nested prop ID describes *part* of a prop to store. It must be * "." where propName is the prop that has this info, and * piece may or may not map to the exact substructure being stored but is * meaningful to the user. For example, in `dash_table`, `columns.name` * stores `columns[i].name` for all columns `i`. Nested props also need * entries in `persistenceTransforms` - see below. * * - `persistence_type`: one of "local", "session", or "memory", just like * `dcc.Store`. But the default here should be "local" because the main use * case is to maintain settings across reloads. * * If any `persisted_props` are nested prop IDs, the component should define a * class property (not a React prop) `persistenceTransforms`, as an object: * { * [propName]: { * [piece]: { * extract: propValue => valueToStore, * apply: (storedValue, propValue) => newPropValue * } * } * } * - `extract` turns a prop value into a reduced value to store. * - `apply` puts an extracted value back into the prop. Make sure this creates * a new object rather than mutating `proValue`, and that if there are * multiple `piece` entries for one `propName`, their `apply` functions * commute - which should not be an issue if they extract and apply * non-intersecting parts of the full prop. * You only need to define these for the props that need them. * It's important that `extract` pulls out *only* the relevant pieces of the * prop, because persistence is only maintained if the extracted value of the * prop before applying persistence is the same as it was before the user's * changes. */ var storePrefix = '_dash_persistence.'; function err(e) { var error = typeof e === 'string' ? new Error(e) : e; return (0,redux_actions__WEBPACK_IMPORTED_MODULE_3__["default"])('ON_ERROR')({ type: 'frontEnd', error }); } /* * Does a key fit this prefix? Must either be an exact match * or, if a separator is provided, a scoped match - exact prefix * followed by the separator (then anything else) */ function keyPrefixMatch(prefix, separator) { var fullStr = prefix + separator; var fullLen = fullStr.length; return function (key) { return key === prefix || key.substr(0, fullLen) === fullStr; }; } var UNDEFINED = 'U'; var _parse = function _parse(val) { return val === UNDEFINED ? undefined : JSON.parse(val || null); }; var _stringify = function _stringify(val) { return val === undefined ? UNDEFINED : JSON.stringify(val); }; var WebStore = /*#__PURE__*/function () { function WebStore(backEnd) { _classCallCheck(this, WebStore); this._name = backEnd; this._storage = window[backEnd]; } _createClass(WebStore, [{ key: "hasItem", value: function hasItem(key) { return this._storage.getItem(storePrefix + key) !== null; } }, { key: "getItem", value: function getItem(key) { // note: _storage.getItem returns null on missing keys // and JSON.parse(null) returns null as well return _parse(this._storage.getItem(storePrefix + key)); } }, { key: "_setItem", value: function _setItem(key, value) { // unprotected version of setItem, for use by tryGetWebStore this._storage.setItem(storePrefix + key, _stringify(value)); } /* * In addition to the regular key->value to set, setItem takes * dispatch as a parameter, so it can report OOM to devtools */ }, { key: "setItem", value: function setItem(key, value, dispatch) { try { this._setItem(key, value); } catch (e) { dispatch(err("".concat(key, " failed to save in ").concat(this._name, ". Persisted props may be lost."))); // TODO: at some point we may want to convert this to fall back // on memory, pulling out all persistence keys and putting them // in a MemStore that gets used from then onward. } } }, { key: "removeItem", value: function removeItem(key) { this._storage.removeItem(storePrefix + key); } /* * clear matching keys matching (optionally followed by a dot and more * characters) - or all keys associated with this store if no prefix. */ }, { key: "clear", value: function clear(keyPrefix) { var _this = this; var fullPrefix = storePrefix + (keyPrefix || ''); var keyMatch = keyPrefixMatch(fullPrefix, keyPrefix ? '.' : ''); var keysToRemove = []; // 2-step process, so we don't depend on any particular behavior of // key order while removing some for (var i = 0; i < this._storage.length; i++) { var fullKey = this._storage.key(i); if (keyMatch(fullKey)) { keysToRemove.push(fullKey); } } (0,ramda__WEBPACK_IMPORTED_MODULE_0__.forEach)(function (k) { return _this._storage.removeItem(k); }, keysToRemove); } }]); return WebStore; }(); var MemStore = /*#__PURE__*/function () { function MemStore() { _classCallCheck(this, MemStore); this._data = {}; } _createClass(MemStore, [{ key: "hasItem", value: function hasItem(key) { return key in this._data; } }, { key: "getItem", value: function getItem(key) { // run this storage through JSON too so we know we get a fresh object // each retrieval return _parse(this._data[key]); } }, { key: "setItem", value: function setItem(key, value) { this._data[key] = _stringify(value); } }, { key: "removeItem", value: function removeItem(key) { delete this._data[key]; } }, { key: "clear", value: function clear(keyPrefix) { var _this2 = this; if (keyPrefix) { (0,ramda__WEBPACK_IMPORTED_MODULE_0__.forEach)(function (key) { return delete _this2._data[key]; }, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.filter)(keyPrefixMatch(keyPrefix, '.'), (0,ramda__WEBPACK_IMPORTED_MODULE_0__.keys)(this._data))); } else { this._data = {}; } } }]); return MemStore; }(); // Make a string 2^16 characters long (*2 bytes/char = 130kB), to test storage. // That should be plenty for common persistence use cases, // without getting anywhere near typical browser limits var pow = 16; function longString() { var s = 'Spam'; for (var i = 2; i < pow; i++) { s += s; } return s; } var stores = { memory: new MemStore() // Defer testing & making local/session stores until requested. // That way if we have errors here they can show up in devtools. }; var backEnds = { local: 'localStorage', session: 'sessionStorage' }; function tryGetWebStore(backEnd, dispatch) { var store = new WebStore(backEnd); var fallbackStore = stores.memory; var storeTest = longString(); var testKey = storePrefix + 'x.x'; try { store._setItem(testKey, storeTest); if (store.getItem(testKey) !== storeTest) { dispatch(err("".concat(backEnd, " init failed set/get, falling back to memory"))); return fallbackStore; } store.removeItem(testKey); return store; } catch (e) { dispatch(err("".concat(backEnd, " init first try failed; clearing and retrying"))); } try { store.clear(); store._setItem(testKey, storeTest); if (store.getItem(testKey) !== storeTest) { throw new Error('nope'); } store.removeItem(testKey); dispatch(err("".concat(backEnd, " init set/get succeeded after clearing!"))); return store; } catch (e) { dispatch(err("".concat(backEnd, " init still failed, falling back to memory"))); return fallbackStore; } } function getStore(type, dispatch) { if (!stores[type]) { stores[type] = tryGetWebStore(backEnds[type], dispatch); } return stores[type]; } var noopTransform = { extract: function extract(propValue) { return propValue; }, apply: function apply(storedValue, _propValue) { return storedValue; } }; var getTransform = function getTransform(element, propName, propPart) { if (element.persistenceTransforms && element.persistenceTransforms[propName]) { if (propPart) { return element.persistenceTransforms[propName][propPart]; } return element.persistenceTransforms[propName]; } return noopTransform; }; var getValsKey = function getValsKey(id, persistedProp, persistence) { return "".concat((0,_actions_dependencies__WEBPACK_IMPORTED_MODULE_2__.stringifyId)(id), ".").concat(persistedProp, ".").concat(JSON.stringify(persistence)); }; var getProps = function getProps(layout) { var props = layout.props, type = layout.type, namespace = layout.namespace; if (!type || !namespace) { // not a real component - just need the props for recursion return { props }; } var id = props.id, persistence = props.persistence; var element = _registry__WEBPACK_IMPORTED_MODULE_1__["default"].resolve(layout); var getVal = function getVal(prop) { return props[prop] || (element.defaultProps || {})[prop]; }; var persisted_props = getVal('persisted_props'); var persistence_type = getVal('persistence_type'); var canPersist = id && persisted_props && persistence_type; return { canPersist, id, props, element, persistence, persisted_props, persistence_type }; }; function recordUiEdit(layout, newProps, dispatch) { var _getProps = getProps(layout), canPersist = _getProps.canPersist, id = _getProps.id, props = _getProps.props, element = _getProps.element, persistence = _getProps.persistence, persisted_props = _getProps.persisted_props, persistence_type = _getProps.persistence_type; if (!canPersist || !persistence) { return; } (0,ramda__WEBPACK_IMPORTED_MODULE_0__.forEach)(function (persistedProp) { var _persistedProp$split = persistedProp.split('.'), _persistedProp$split2 = _slicedToArray(_persistedProp$split, 2), propName = _persistedProp$split2[0], propPart = _persistedProp$split2[1]; if (newProps[propName] !== undefined) { var storage = getStore(persistence_type, dispatch); var _getTransform = getTransform(element, propName, propPart), extract = _getTransform.extract; var valsKey = getValsKey(id, persistedProp, persistence); var originalVal = extract(props[propName]); var newVal = extract(newProps[propName]); // mainly for nested props with multiple persisted parts, it's // possible to have the same value as before - should not store // in this case. if (originalVal !== newVal) { if (storage.hasItem(valsKey)) { originalVal = storage.getItem(valsKey)[1]; } var vals = originalVal === undefined ? [newVal] : [newVal, originalVal]; storage.setItem(valsKey, vals, dispatch); } } }, persisted_props); } /* * Used for entire layouts (on load) or partial layouts (from children * callbacks) to apply previously-stored UI edits to components */ function applyPersistence(layout, dispatch) { if ((0,ramda__WEBPACK_IMPORTED_MODULE_0__.type)(layout) !== 'Object' || !layout.props) { return layout; } return persistenceMods(layout, layout, [], dispatch); } var UNDO = true; function modProp(key, storage, element, props, persistedProp, update, undo) { if (storage.hasItem(key)) { var _storage$getItem = storage.getItem(key), _storage$getItem2 = _slicedToArray(_storage$getItem, 2), newVal = _storage$getItem2[0], originalVal = _storage$getItem2[1]; var fromVal = undo ? newVal : originalVal; var toVal = undo ? originalVal : newVal; var _persistedProp$split3 = persistedProp.split('.'), _persistedProp$split4 = _slicedToArray(_persistedProp$split3, 2), propName = _persistedProp$split4[0], propPart = _persistedProp$split4[1]; var transform = getTransform(element, propName, propPart); if ((0,ramda__WEBPACK_IMPORTED_MODULE_0__.equals)(fromVal, transform.extract(props[propName]))) { update[propName] = transform.apply(toVal, propName in update ? update[propName] : props[propName]); } else { // clear this saved edit - we've started with the wrong // value for this persistence ID storage.removeItem(key); } } } function persistenceMods(layout, component, path, dispatch) { var _getProps2 = getProps(component), canPersist = _getProps2.canPersist, id = _getProps2.id, props = _getProps2.props, element = _getProps2.element, persistence = _getProps2.persistence, persisted_props = _getProps2.persisted_props, persistence_type = _getProps2.persistence_type; var layoutOut = layout; if (canPersist && persistence) { var storage = getStore(persistence_type, dispatch); var update = {}; (0,ramda__WEBPACK_IMPORTED_MODULE_0__.forEach)(function (persistedProp) { return modProp(getValsKey(id, persistedProp, persistence), storage, element, props, persistedProp, update); }, persisted_props); for (var propName in update) { layoutOut = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.set)((0,ramda__WEBPACK_IMPORTED_MODULE_0__.lensPath)(path.concat('props', propName)), update[propName], layoutOut); } } // recurse inward var children = props.children; if (Array.isArray(children)) { children.forEach(function (child, i) { if ((0,ramda__WEBPACK_IMPORTED_MODULE_0__.type)(child) === 'Object' && child.props) { layoutOut = persistenceMods(layoutOut, child, path.concat('props', 'children', i), dispatch); } }); } else if ((0,ramda__WEBPACK_IMPORTED_MODULE_0__.type)(children) === 'Object' && children.props) { layoutOut = persistenceMods(layoutOut, children, path.concat('props', 'children'), dispatch); } return layoutOut; } /* * When we receive new explicit props from a callback, * these override UI-driven edits of those exact props * but not for props nested inside children */ function prunePersistence(layout, newProps, dispatch) { var _getProps3 = getProps(layout), canPersist = _getProps3.canPersist, id = _getProps3.id, props = _getProps3.props, persistence = _getProps3.persistence, persisted_props = _getProps3.persisted_props, persistence_type = _getProps3.persistence_type, element = _getProps3.element; var getFinal = function getFinal(propName, prevVal) { return propName in newProps ? newProps[propName] : prevVal; }; var finalPersistence = getFinal('persistence', persistence); if (!canPersist || !(persistence || finalPersistence)) { return newProps; } var finalPersistenceType = getFinal('persistence_type', persistence_type); var finalPersistedProps = getFinal('persisted_props', persisted_props); var persistenceChanged = finalPersistence !== persistence || finalPersistenceType !== persistence_type || finalPersistedProps !== persisted_props; var notInNewProps = function notInNewProps(persistedProp) { return !(persistedProp.split('.')[0] in newProps); }; var update = {}; var depersistedProps = props; if (persistenceChanged && persistence) { // clear previously-applied persistence var storage = getStore(persistence_type, dispatch); (0,ramda__WEBPACK_IMPORTED_MODULE_0__.forEach)(function (persistedProp) { return modProp(getValsKey(id, persistedProp, persistence), storage, element, props, persistedProp, update, UNDO); }, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.filter)(notInNewProps, persisted_props)); depersistedProps = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.mergeRight)(props, update); } if (finalPersistence) { var finalStorage = getStore(finalPersistenceType, dispatch); if (persistenceChanged) { // apply new persistence (0,ramda__WEBPACK_IMPORTED_MODULE_0__.forEach)(function (persistedProp) { return modProp(getValsKey(id, persistedProp, finalPersistence), finalStorage, element, depersistedProps, persistedProp, update); }, (0,ramda__WEBPACK_IMPORTED_MODULE_0__.filter)(notInNewProps, finalPersistedProps)); } // now the main point - clear any edit of a prop that changed // note that this is independent of the new prop value. var transforms = element.persistenceTransforms || {}; for (var propName in newProps) { var propTransforms = transforms[propName]; if (propTransforms) { for (var propPart in propTransforms) { finalStorage.removeItem(getValsKey(id, "".concat(propName, ".").concat(propPart), finalPersistence)); } } else { finalStorage.removeItem(getValsKey(id, propName, finalPersistence)); } } } return persistenceChanged ? (0,ramda__WEBPACK_IMPORTED_MODULE_0__.mergeRight)(newProps, update) : newProps; } /***/ }), /***/ "./src/reducers/api.js": /*!*****************************!*\ !*** ./src/reducers/api.js ***! \*****************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ createApiReducer; } /* harmony export */ }); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js"); function createApiReducer(store) { return function ApiReducer() { var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var action = arguments.length > 1 ? arguments[1] : undefined; var newState = state; if (action.type === store) { var _action$payload = action.payload, id = _action$payload.id, status = _action$payload.status, content = _action$payload.content; var newRequest = { status, content }; if (Array.isArray(id)) { newState = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.assocPath)(id, newRequest, state); } else if (id) { newState = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.assoc)(id, newRequest, state); } else { newState = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.mergeRight)(state, newRequest); } } return newState; }; } /***/ }), /***/ "./src/reducers/appLifecycle.js": /*!**************************************!*\ !*** ./src/reducers/appLifecycle.js ***! \**************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _actions_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../actions/constants */ "./src/actions/constants.js"); /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constants */ "./src/reducers/constants.js"); function appLifecycle() { var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : (0,_constants__WEBPACK_IMPORTED_MODULE_1__.getAppState)('STARTED'); var action = arguments.length > 1 ? arguments[1] : undefined; switch (action.type) { case (0,_actions_constants__WEBPACK_IMPORTED_MODULE_0__.getAction)('SET_APP_LIFECYCLE'): return (0,_constants__WEBPACK_IMPORTED_MODULE_1__.getAppState)(action.payload); default: return state; } } /* harmony default export */ __webpack_exports__["default"] = (appLifecycle); /***/ }), /***/ "./src/reducers/changed.js": /*!*********************************!*\ !*** ./src/reducers/changed.js ***! \*********************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); var initialChange = { id: null, props: {} }; function changed() { var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialChange; // This is empty just to initialize the store. Changes // are actually recorded in reducer.js so that we can // resolve paths to id. return state; } /* harmony default export */ __webpack_exports__["default"] = (changed); /***/ }), /***/ "./src/reducers/config.js": /*!********************************!*\ !*** ./src/reducers/config.js ***! \********************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ config; } /* harmony export */ }); /* harmony import */ var _actions_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../actions/constants */ "./src/actions/constants.js"); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js"); function config() { var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; var action = arguments.length > 1 ? arguments[1] : undefined; if (action.type === (0,_actions_constants__WEBPACK_IMPORTED_MODULE_0__.getAction)('SET_CONFIG')) { // Put the components childrenProps in windows for side usage. window.__dashprivate_childrenProps = (0,ramda__WEBPACK_IMPORTED_MODULE_1__.mergeDeepRight)(window.__dashprivate_childrenProps || {}, action.payload.children_props); return action.payload; } else if (action.type === (0,_actions_constants__WEBPACK_IMPORTED_MODULE_0__.getAction)('ADD_HTTP_HEADERS')) { return (0,ramda__WEBPACK_IMPORTED_MODULE_1__.mergeDeepRight)(state, { fetch: { headers: action.payload } }); } return state; } /***/ }), /***/ "./src/reducers/constants.js": /*!***********************************!*\ !*** ./src/reducers/constants.js ***! \***********************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ getAppState: function() { return /* binding */ getAppState; } /* harmony export */ }); function getAppState(state) { var stateList = { STARTED: 'STARTED', HYDRATED: 'HYDRATED', DESTROYED: 'DESTROYED' }; if (stateList[state]) { return stateList[state]; } throw new Error("".concat(state, " is not a valid app state.")); } /***/ }), /***/ "./src/reducers/dependencyGraph.js": /*!*****************************************!*\ !*** ./src/reducers/dependencyGraph.js ***! \*****************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); var initialGraph = {}; var graphs = function graphs() { var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialGraph; var action = arguments.length > 1 ? arguments[1] : undefined; if (action.type === 'SET_GRAPHS') { return action.payload; } return state; }; /* harmony default export */ __webpack_exports__["default"] = (graphs); /***/ }), /***/ "./src/reducers/error.js": /*!*******************************!*\ !*** ./src/reducers/error.js ***! \*******************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ error; } /* harmony export */ }); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js"); function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } var initialError = { frontEnd: [], backEnd: [], backEndConnected: true }; function error() { var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialError; var action = arguments.length > 1 ? arguments[1] : undefined; switch (action.type) { case 'ON_ERROR': { var frontEnd = state.frontEnd, backEnd = state.backEnd, backEndConnected = state.backEndConnected; // log errors to the console for stack tracing and so they're // available even with debugging off /* eslint-disable-next-line no-console */ console.error(action.payload.error); if (action.payload.type === 'frontEnd') { return { frontEnd: [(0,ramda__WEBPACK_IMPORTED_MODULE_0__.mergeRight)(action.payload, { timestamp: new Date() })].concat(_toConsumableArray(frontEnd)), backEnd, backEndConnected }; } else if (action.payload.type === 'backEnd') { return { frontEnd, backEnd: [(0,ramda__WEBPACK_IMPORTED_MODULE_0__.mergeRight)(action.payload, { timestamp: new Date() })].concat(_toConsumableArray(backEnd)), backEndConnected }; } return state; } case 'SET_CONNECTION_STATUS': { return (0,ramda__WEBPACK_IMPORTED_MODULE_0__.mergeRight)(state, { backEndConnected: action.payload }); } default: { return state; } } } /***/ }), /***/ "./src/reducers/history.js": /*!*********************************!*\ !*** ./src/reducers/history.js ***! \*********************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } var initialHistory = { past: [], present: {}, future: [] }; function history() { var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialHistory; var action = arguments.length > 1 ? arguments[1] : undefined; switch (action.type) { case 'UNDO': { var past = state.past, present = state.present, future = state.future; var previous = past[past.length - 1]; var newPast = past.slice(0, past.length - 1); return { past: newPast, present: previous, future: [present].concat(_toConsumableArray(future)) }; } case 'REDO': { var _past = state.past, _present = state.present, _future = state.future; var next = _future[0]; var newFuture = _future.slice(1); return { past: [].concat(_toConsumableArray(_past), [_present]), present: next, future: newFuture }; } case 'REVERT': { var _past2 = state.past, _future2 = state.future; var _previous = _past2[_past2.length - 1]; var _newPast = _past2.slice(0, _past2.length - 1); return { past: _newPast, present: _previous, future: _toConsumableArray(_future2) }; } default: { return state; } } } /* harmony default export */ __webpack_exports__["default"] = (history); /***/ }), /***/ "./src/reducers/hooks.js": /*!*******************************!*\ !*** ./src/reducers/hooks.js ***! \*******************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); var customHooks = function customHooks() { var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { layout_pre: null, layout_post: null, request_pre: null, request_post: null, callback_resolved: null, request_refresh_jwt: null, bear: false }; var action = arguments.length > 1 ? arguments[1] : undefined; switch (action.type) { case 'SET_HOOKS': return action.payload; default: return state; } }; /* harmony default export */ __webpack_exports__["default"] = (customHooks); /***/ }), /***/ "./src/reducers/layout.js": /*!********************************!*\ !*** ./src/reducers/layout.js ***! \********************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js"); /* harmony import */ var _actions_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../actions/constants */ "./src/actions/constants.js"); var layout = function layout() { var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var action = arguments.length > 1 ? arguments[1] : undefined; if (action.type === (0,_actions_constants__WEBPACK_IMPORTED_MODULE_1__.getAction)('SET_LAYOUT')) { return action.payload; } else if ((0,ramda__WEBPACK_IMPORTED_MODULE_0__.includes)(action.type, ['UNDO_PROP_CHANGE', 'REDO_PROP_CHANGE', (0,_actions_constants__WEBPACK_IMPORTED_MODULE_1__.getAction)('ON_PROP_CHANGE')])) { var propPath = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.append)('props', action.payload.itempath); var existingProps = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.view)((0,ramda__WEBPACK_IMPORTED_MODULE_0__.lensPath)(propPath), state); var mergedProps = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.mergeRight)(existingProps, action.payload.props); return (0,ramda__WEBPACK_IMPORTED_MODULE_0__.assocPath)(propPath, mergedProps, state); } return state; }; /* harmony default export */ __webpack_exports__["default"] = (layout); /***/ }), /***/ "./src/reducers/paths.js": /*!*******************************!*\ !*** ./src/reducers/paths.js ***! \*******************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _actions_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../actions/constants */ "./src/actions/constants.js"); var initialPaths = { strs: {}, objs: {} }; var paths = function paths() { var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialPaths; var action = arguments.length > 1 ? arguments[1] : undefined; if (action.type === (0,_actions_constants__WEBPACK_IMPORTED_MODULE_0__.getAction)('SET_PATHS')) { return action.payload; } return state; }; /* harmony default export */ __webpack_exports__["default"] = (paths); /***/ }), /***/ "./src/reducers/profile.js": /*!*********************************!*\ !*** ./src/reducers/profile.js ***! \*********************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js"); /* harmony import */ var _constants_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../constants/constants */ "./src/constants/constants.js"); var _excluded = ["__dash_client", "__dash_server", "__dash_upload", "__dash_download"]; function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } var defaultProfile = { count: 0, total: 0, compute: 0, network: { time: 0, upload: 0, download: 0 }, resources: {}, status: { latest: null }, result: {} }; var defaultState = { updated: [], resources: {}, callbacks: {}, graphLayout: null }; var profile = function profile() { var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultState; var action = arguments.length > 1 ? arguments[1] : undefined; if (action.type === 'UPDATE_RESOURCE_USAGE') { // Keep a record of the most recent change. This // is subtly different from history.present because // it watches all props, not just inputs. var _action$payload = action.payload, id = _action$payload.id, usage = _action$payload.usage, status = _action$payload.status; var statusMapped = _constants_constants__WEBPACK_IMPORTED_MODULE_1__.STATUSMAP[status] || status; // Keep track of the callback that actually changed. var newState = { updated: [id], resources: state.resources, callbacks: state.callbacks, // graphLayout is never passed in via actions, because we don't // want it to trigger a rerender of the callback graph. // See CallbackGraphContainer.react graphLayout: state.graphLayout }; newState.callbacks[id] = newState.callbacks[id] || (0,ramda__WEBPACK_IMPORTED_MODULE_0__.clone)(defaultProfile); var cb = newState.callbacks[id]; var cbResources = cb.resources; var totalResources = newState.resources; // Update resource usage & params. cb.count += 1; cb.status.latest = statusMapped; cb.status[statusMapped] = (cb.status[statusMapped] || 0) + 1; cb.result = action.payload.result; cb.inputs = action.payload.inputs; cb.state = action.payload.state; if (usage) { var __dash_client = usage.__dash_client, __dash_server = usage.__dash_server, __dash_upload = usage.__dash_upload, __dash_download = usage.__dash_download, user = _objectWithoutProperties(usage, _excluded); cb.total += __dash_client; cb.compute += __dash_server; cb.network.time += __dash_client - __dash_server; cb.network.upload += __dash_upload; cb.network.download += __dash_download; for (var r in user) { if (user.hasOwnProperty(r)) { cbResources[r] = (cbResources[r] || 0) + user[r]; totalResources[r] = (totalResources[r] || 0) + user[r]; } } } return newState; } return state; }; /* harmony default export */ __webpack_exports__["default"] = (profile); /***/ }), /***/ "./src/reducers/reducer.js": /*!*********************************!*\ !*** ./src/reducers/reducer.js ***! \*********************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ apiRequests: function() { return /* binding */ apiRequests; }, /* harmony export */ createReducer: function() { return /* binding */ createReducer; } /* harmony export */ }); /* harmony import */ var ramda__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ramda */ "./node_modules/ramda/es/index.js"); /* harmony import */ var redux__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js"); /* harmony import */ var _actions_dependencies_ts__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../actions/dependencies_ts */ "./src/actions/dependencies_ts.ts"); /* harmony import */ var _api__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./api */ "./src/reducers/api.js"); /* harmony import */ var _appLifecycle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./appLifecycle */ "./src/reducers/appLifecycle.js"); /* harmony import */ var _callbacks__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./callbacks */ "./src/reducers/callbacks.ts"); /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./config */ "./src/reducers/config.js"); /* harmony import */ var _dependencyGraph__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./dependencyGraph */ "./src/reducers/dependencyGraph.js"); /* harmony import */ var _error__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./error */ "./src/reducers/error.js"); /* harmony import */ var _history__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./history */ "./src/reducers/history.js"); /* harmony import */ var _hooks__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./hooks */ "./src/reducers/hooks.js"); /* harmony import */ var _profile__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./profile */ "./src/reducers/profile.js"); /* harmony import */ var _changed__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./changed */ "./src/reducers/changed.js"); /* harmony import */ var _isLoading__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./isLoading */ "./src/reducers/isLoading.ts"); /* harmony import */ var _layout__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./layout */ "./src/reducers/layout.js"); /* harmony import */ var _loadingMap__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./loadingMap */ "./src/reducers/loadingMap.ts"); /* harmony import */ var _paths__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./paths */ "./src/reducers/paths.js"); /* harmony import */ var _callbackJobs__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./callbackJobs */ "./src/reducers/callbackJobs.ts"); function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } var apiRequests = ['dependenciesRequest', 'layoutRequest', 'reloadRequest', 'loginRequest']; function mainReducer() { var parts = { appLifecycle: _appLifecycle__WEBPACK_IMPORTED_MODULE_3__["default"], callbacks: _callbacks__WEBPACK_IMPORTED_MODULE_4__["default"], config: _config__WEBPACK_IMPORTED_MODULE_5__["default"], error: _error__WEBPACK_IMPORTED_MODULE_7__["default"], graphs: _dependencyGraph__WEBPACK_IMPORTED_MODULE_6__["default"], history: _history__WEBPACK_IMPORTED_MODULE_8__["default"], hooks: _hooks__WEBPACK_IMPORTED_MODULE_9__["default"], profile: _profile__WEBPACK_IMPORTED_MODULE_10__["default"], changed: _changed__WEBPACK_IMPORTED_MODULE_11__["default"], isLoading: _isLoading__WEBPACK_IMPORTED_MODULE_12__["default"], layout: _layout__WEBPACK_IMPORTED_MODULE_13__["default"], loadingMap: _loadingMap__WEBPACK_IMPORTED_MODULE_14__["default"], paths: _paths__WEBPACK_IMPORTED_MODULE_15__["default"] }; (0,ramda__WEBPACK_IMPORTED_MODULE_0__.forEach)(function (r) { parts[r] = (0,_api__WEBPACK_IMPORTED_MODULE_2__["default"])(r); }, apiRequests); parts.callbackJobs = _callbackJobs__WEBPACK_IMPORTED_MODULE_16__["default"]; return (0,redux__WEBPACK_IMPORTED_MODULE_17__.combineReducers)(parts); } function getInputHistoryState(payload, state, recordChanges) { var graphs = state.graphs, paths = state.paths, layout = state.layout; var itempath = payload.itempath, props = payload.props; var refProps = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.path)(itempath.concat(['props']), layout) || {}; var id = refProps.id; var historyEntry; if (id) { if (recordChanges) { state.changed = { id, props }; } historyEntry = { id, props: {} }; (0,ramda__WEBPACK_IMPORTED_MODULE_0__.keys)(props).forEach(function (propKey) { if ((0,_actions_dependencies_ts__WEBPACK_IMPORTED_MODULE_1__.getCallbacksByInput)(graphs, paths, id, propKey).length) { historyEntry.props[propKey] = refProps[propKey]; } }); } return historyEntry; } function recordHistory(reducer) { return function (state, action) { // Record initial state var type = action.type, payload = action.payload; if (type === 'ON_PROP_CHANGE') { // history records all prop changes that are inputs. var historyEntry = getInputHistoryState(payload, state, true); if (historyEntry && !(0,ramda__WEBPACK_IMPORTED_MODULE_0__.isEmpty)(historyEntry.props)) { state.history.present = historyEntry; } } var nextState = reducer(state, action); if (type === 'ON_PROP_CHANGE' && payload.source !== 'response') { /* * if the prop change is an input, then * record it so that it can be played back */ var _historyEntry = getInputHistoryState(payload, nextState); if (_historyEntry && !(0,ramda__WEBPACK_IMPORTED_MODULE_0__.isEmpty)(_historyEntry.props)) { nextState.history = { past: [].concat(_toConsumableArray(nextState.history.past), [state.history.present]), present: _historyEntry, future: [] }; } } return nextState; }; } function reloaderReducer(reducer) { return function (state, action) { var _ref = state || {}, history = _ref.history, config = _ref.config, hooks = _ref.hooks; var newState = state; if (action.type === 'RELOAD') { newState = { history, config, hooks }; } else if (action.type === 'SET_CONFIG') { // new config also reloads, and even clears history, // in case there's a new user or even a totally different app! // hooks are set at an even higher level than config though. newState = { hooks }; } return reducer(newState, action); }; } function createReducer() { return reloaderReducer(recordHistory(mainReducer())); } /***/ }), /***/ "./src/registry.js": /*!*************************!*\ !*** ./src/registry.js ***! \*************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = ({ resolve: function resolve(component) { var type = component.type, namespace = component.namespace; var ns = window[namespace]; if (ns) { if (ns[type]) { return ns[type]; } throw new Error("Component ".concat(type, " not found in ").concat(namespace)); } throw new Error("".concat(namespace, " was not found.")); } }); /***/ }), /***/ "./node_modules/cytoscape-fcose/cytoscape-fcose.js": /*!*********************************************************!*\ !*** ./node_modules/cytoscape-fcose/cytoscape-fcose.js ***! \*********************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { (function webpackUniversalModuleDefinition(root, factory) { if (true) module.exports = factory(__webpack_require__(/*! cose-base */ "./node_modules/cose-base/cose-base.js"));else {} })(this, function (__WEBPACK_EXTERNAL_MODULE__140__) { return (/******/function () { // webpackBootstrap /******/ "use strict"; /******/ var __webpack_modules__ = { /***/658: /***/function _(module) { // Simple, internal Object.assign() polyfill for options objects etc. module.exports = Object.assign != null ? Object.assign.bind(Object) : function (tgt) { for (var _len = arguments.length, srcs = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { srcs[_key - 1] = arguments[_key]; } srcs.forEach(function (src) { Object.keys(src).forEach(function (k) { return tgt[k] = src[k]; }); }); return tgt; }; /***/ }, /***/548: /***/function _(module, __unused_webpack_exports, __nested_webpack_require_1313__) { var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); /* * Auxiliary functions */ var LinkedList = __nested_webpack_require_1313__(140).layoutBase.LinkedList; var auxiliary = {}; // get the top most nodes auxiliary.getTopMostNodes = function (nodes) { var nodesMap = {}; for (var i = 0; i < nodes.length; i++) { nodesMap[nodes[i].id()] = true; } var roots = nodes.filter(function (ele, i) { if (typeof ele === "number") { ele = i; } var parent = ele.parent()[0]; while (parent != null) { if (nodesMap[parent.id()]) { return false; } parent = parent.parent()[0]; } return true; }); return roots; }; // find disconnected components and create dummy nodes that connect them auxiliary.connectComponents = function (cy, eles, topMostNodes, dummyNodes) { var queue = new LinkedList(); var visited = new Set(); var visitedTopMostNodes = []; var currentNeighbor = void 0; var minDegreeNode = void 0; var minDegree = void 0; var isConnected = false; var count = 1; var nodesConnectedToDummy = []; var components = []; var _loop = function _loop() { var cmpt = cy.collection(); components.push(cmpt); var currentNode = topMostNodes[0]; var childrenOfCurrentNode = cy.collection(); childrenOfCurrentNode.merge(currentNode).merge(currentNode.descendants().intersection(eles)); visitedTopMostNodes.push(currentNode); childrenOfCurrentNode.forEach(function (node) { queue.push(node); visited.add(node); cmpt.merge(node); }); var _loop2 = function _loop2() { currentNode = queue.shift(); // Traverse all neighbors of this node var neighborNodes = cy.collection(); currentNode.neighborhood().nodes().forEach(function (node) { if (eles.intersection(currentNode.edgesWith(node)).length > 0) { neighborNodes.merge(node); } }); for (var i = 0; i < neighborNodes.length; i++) { var neighborNode = neighborNodes[i]; currentNeighbor = topMostNodes.intersection(neighborNode.union(neighborNode.ancestors())); if (currentNeighbor != null && !visited.has(currentNeighbor[0])) { var childrenOfNeighbor = currentNeighbor.union(currentNeighbor.descendants()); childrenOfNeighbor.forEach(function (node) { queue.push(node); visited.add(node); cmpt.merge(node); if (topMostNodes.has(node)) { visitedTopMostNodes.push(node); } }); } } }; while (queue.length != 0) { _loop2(); } cmpt.forEach(function (node) { eles.intersection(node.connectedEdges()).forEach(function (e) { // connectedEdges() usually cached if (cmpt.has(e.source()) && cmpt.has(e.target())) { // has() is cheap cmpt.merge(e); } }); }); if (visitedTopMostNodes.length == topMostNodes.length) { isConnected = true; } if (!isConnected || isConnected && count > 1) { minDegreeNode = visitedTopMostNodes[0]; minDegree = minDegreeNode.connectedEdges().length; visitedTopMostNodes.forEach(function (node) { if (node.connectedEdges().length < minDegree) { minDegree = node.connectedEdges().length; minDegreeNode = node; } }); nodesConnectedToDummy.push(minDegreeNode.id()); // TO DO: Check efficiency of this part var temp = cy.collection(); temp.merge(visitedTopMostNodes[0]); visitedTopMostNodes.forEach(function (node) { temp.merge(node); }); visitedTopMostNodes = []; topMostNodes = topMostNodes.difference(temp); count++; } }; do { _loop(); } while (!isConnected); if (dummyNodes) { if (nodesConnectedToDummy.length > 0) { dummyNodes.set('dummy' + (dummyNodes.size + 1), nodesConnectedToDummy); } } return components; }; // relocates componentResult to originalCenter if there is no fixedNodeConstraint auxiliary.relocateComponent = function (originalCenter, componentResult, options) { if (!options.fixedNodeConstraint) { var minXCoord = Number.POSITIVE_INFINITY; var maxXCoord = Number.NEGATIVE_INFINITY; var minYCoord = Number.POSITIVE_INFINITY; var maxYCoord = Number.NEGATIVE_INFINITY; if (options.quality == "draft") { // calculate current bounding box var _iteratorNormalCompletion = true; var _didIteratorError = false; var _iteratorError = undefined; try { for (var _iterator = componentResult.nodeIndexes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var _ref = _step.value; var _ref2 = _slicedToArray(_ref, 2); var key = _ref2[0]; var value = _ref2[1]; var cyNode = options.cy.getElementById(key); if (cyNode) { var nodeBB = cyNode.boundingBox(); var leftX = componentResult.xCoords[value] - nodeBB.w / 2; var rightX = componentResult.xCoords[value] + nodeBB.w / 2; var topY = componentResult.yCoords[value] - nodeBB.h / 2; var bottomY = componentResult.yCoords[value] + nodeBB.h / 2; if (leftX < minXCoord) minXCoord = leftX; if (rightX > maxXCoord) maxXCoord = rightX; if (topY < minYCoord) minYCoord = topY; if (bottomY > maxYCoord) maxYCoord = bottomY; } } // find difference between current and original center } catch (err) { _didIteratorError = true; _iteratorError = err; } finally { try { if (!_iteratorNormalCompletion && _iterator.return) { _iterator.return(); } } finally { if (_didIteratorError) { throw _iteratorError; } } } var diffOnX = originalCenter.x - (maxXCoord + minXCoord) / 2; var diffOnY = originalCenter.y - (maxYCoord + minYCoord) / 2; // move component to original center componentResult.xCoords = componentResult.xCoords.map(function (x) { return x + diffOnX; }); componentResult.yCoords = componentResult.yCoords.map(function (y) { return y + diffOnY; }); } else { // calculate current bounding box Object.keys(componentResult).forEach(function (item) { var node = componentResult[item]; var leftX = node.getRect().x; var rightX = node.getRect().x + node.getRect().width; var topY = node.getRect().y; var bottomY = node.getRect().y + node.getRect().height; if (leftX < minXCoord) minXCoord = leftX; if (rightX > maxXCoord) maxXCoord = rightX; if (topY < minYCoord) minYCoord = topY; if (bottomY > maxYCoord) maxYCoord = bottomY; }); // find difference between current and original center var _diffOnX = originalCenter.x - (maxXCoord + minXCoord) / 2; var _diffOnY = originalCenter.y - (maxYCoord + minYCoord) / 2; // move component to original center Object.keys(componentResult).forEach(function (item) { var node = componentResult[item]; node.setCenter(node.getCenterX() + _diffOnX, node.getCenterY() + _diffOnY); }); } } }; auxiliary.calcBoundingBox = function (parentNode, xCoords, yCoords, nodeIndexes) { // calculate bounds var left = Number.MAX_SAFE_INTEGER; var right = Number.MIN_SAFE_INTEGER; var top = Number.MAX_SAFE_INTEGER; var bottom = Number.MIN_SAFE_INTEGER; var nodeLeft = void 0; var nodeRight = void 0; var nodeTop = void 0; var nodeBottom = void 0; var nodes = parentNode.descendants().not(":parent"); var s = nodes.length; for (var i = 0; i < s; i++) { var node = nodes[i]; nodeLeft = xCoords[nodeIndexes.get(node.id())] - node.width() / 2; nodeRight = xCoords[nodeIndexes.get(node.id())] + node.width() / 2; nodeTop = yCoords[nodeIndexes.get(node.id())] - node.height() / 2; nodeBottom = yCoords[nodeIndexes.get(node.id())] + node.height() / 2; if (left > nodeLeft) { left = nodeLeft; } if (right < nodeRight) { right = nodeRight; } if (top > nodeTop) { top = nodeTop; } if (bottom < nodeBottom) { bottom = nodeBottom; } } var boundingBox = {}; boundingBox.topLeftX = left; boundingBox.topLeftY = top; boundingBox.width = right - left; boundingBox.height = bottom - top; return boundingBox; }; // This function finds and returns parent nodes whose all children are hidden auxiliary.calcParentsWithoutChildren = function (cy, eles) { var parentsWithoutChildren = cy.collection(); eles.nodes(':parent').forEach(function (parent) { var check = false; parent.children().forEach(function (child) { if (child.css('display') != 'none') { check = true; } }); if (!check) { parentsWithoutChildren.merge(parent); } }); return parentsWithoutChildren; }; module.exports = auxiliary; /***/ }, /***/816: /***/function _(module, __unused_webpack_exports, __nested_webpack_require_14183__) { /** The implementation of the postprocessing part that applies CoSE layout over the spectral layout */ var aux = __nested_webpack_require_14183__(548); var CoSELayout = __nested_webpack_require_14183__(140).CoSELayout; var CoSENode = __nested_webpack_require_14183__(140).CoSENode; var PointD = __nested_webpack_require_14183__(140).layoutBase.PointD; var DimensionD = __nested_webpack_require_14183__(140).layoutBase.DimensionD; var LayoutConstants = __nested_webpack_require_14183__(140).layoutBase.LayoutConstants; var FDLayoutConstants = __nested_webpack_require_14183__(140).layoutBase.FDLayoutConstants; var CoSEConstants = __nested_webpack_require_14183__(140).CoSEConstants; // main function that cose layout is processed var coseLayout = function coseLayout(options, spectralResult) { var cy = options.cy; var eles = options.eles; var nodes = eles.nodes(); var edges = eles.edges(); var nodeIndexes = void 0; var xCoords = void 0; var yCoords = void 0; var idToLNode = {}; if (options.randomize) { nodeIndexes = spectralResult["nodeIndexes"]; xCoords = spectralResult["xCoords"]; yCoords = spectralResult["yCoords"]; } var isFn = function isFn(fn) { return typeof fn === 'function'; }; var optFn = function optFn(opt, ele) { if (isFn(opt)) { return opt(ele); } else { return opt; } }; /**** Postprocessing functions ****/ var parentsWithoutChildren = aux.calcParentsWithoutChildren(cy, eles); // transfer cytoscape nodes to cose nodes var processChildrenList = function processChildrenList(parent, children, layout, options) { var size = children.length; for (var i = 0; i < size; i++) { var theChild = children[i]; var children_of_children = null; if (theChild.intersection(parentsWithoutChildren).length == 0) { children_of_children = theChild.children(); } var theNode = void 0; var dimensions = theChild.layoutDimensions({ nodeDimensionsIncludeLabels: options.nodeDimensionsIncludeLabels }); if (theChild.outerWidth() != null && theChild.outerHeight() != null) { if (options.randomize) { if (!theChild.isParent()) { theNode = parent.add(new CoSENode(layout.graphManager, new PointD(xCoords[nodeIndexes.get(theChild.id())] - dimensions.w / 2, yCoords[nodeIndexes.get(theChild.id())] - dimensions.h / 2), new DimensionD(parseFloat(dimensions.w), parseFloat(dimensions.h)))); } else { var parentInfo = aux.calcBoundingBox(theChild, xCoords, yCoords, nodeIndexes); if (theChild.intersection(parentsWithoutChildren).length == 0) { theNode = parent.add(new CoSENode(layout.graphManager, new PointD(parentInfo.topLeftX, parentInfo.topLeftY), new DimensionD(parentInfo.width, parentInfo.height))); } else { // for the parentsWithoutChildren theNode = parent.add(new CoSENode(layout.graphManager, new PointD(parentInfo.topLeftX, parentInfo.topLeftY), new DimensionD(parseFloat(dimensions.w), parseFloat(dimensions.h)))); } } } else { theNode = parent.add(new CoSENode(layout.graphManager, new PointD(theChild.position('x') - dimensions.w / 2, theChild.position('y') - dimensions.h / 2), new DimensionD(parseFloat(dimensions.w), parseFloat(dimensions.h)))); } } else { theNode = parent.add(new CoSENode(this.graphManager)); } // Attach id to the layout node and repulsion value theNode.id = theChild.data("id"); theNode.nodeRepulsion = optFn(options.nodeRepulsion, theChild); // Attach the paddings of cy node to layout node theNode.paddingLeft = parseInt(theChild.css('padding')); theNode.paddingTop = parseInt(theChild.css('padding')); theNode.paddingRight = parseInt(theChild.css('padding')); theNode.paddingBottom = parseInt(theChild.css('padding')); //Attach the label properties to both compound and simple nodes if labels will be included in node dimensions //These properties will be used while updating bounds of compounds during iterations or tiling //and will be used for simple nodes while transferring final positions to cytoscape if (options.nodeDimensionsIncludeLabels) { theNode.labelWidth = theChild.boundingBox({ includeLabels: true, includeNodes: false, includeOverlays: false }).w; theNode.labelHeight = theChild.boundingBox({ includeLabels: true, includeNodes: false, includeOverlays: false }).h; theNode.labelPosVertical = theChild.css("text-valign"); theNode.labelPosHorizontal = theChild.css("text-halign"); } // Map the layout node idToLNode[theChild.data("id")] = theNode; if (isNaN(theNode.rect.x)) { theNode.rect.x = 0; } if (isNaN(theNode.rect.y)) { theNode.rect.y = 0; } if (children_of_children != null && children_of_children.length > 0) { var theNewGraph = void 0; theNewGraph = layout.getGraphManager().add(layout.newGraph(), theNode); processChildrenList(theNewGraph, children_of_children, layout, options); } } }; // transfer cytoscape edges to cose edges var processEdges = function processEdges(layout, gm, edges) { var idealLengthTotal = 0; var edgeCount = 0; for (var i = 0; i < edges.length; i++) { var edge = edges[i]; var sourceNode = idToLNode[edge.data("source")]; var targetNode = idToLNode[edge.data("target")]; if (sourceNode && targetNode && sourceNode !== targetNode && sourceNode.getEdgesBetween(targetNode).length == 0) { var e1 = gm.add(layout.newEdge(), sourceNode, targetNode); e1.id = edge.id(); e1.idealLength = optFn(options.idealEdgeLength, edge); e1.edgeElasticity = optFn(options.edgeElasticity, edge); idealLengthTotal += e1.idealLength; edgeCount++; } } // we need to update the ideal edge length constant with the avg. ideal length value after processing edges // in case there is no edge, use other options if (options.idealEdgeLength != null) { if (edgeCount > 0) CoSEConstants.DEFAULT_EDGE_LENGTH = FDLayoutConstants.DEFAULT_EDGE_LENGTH = idealLengthTotal / edgeCount;else if (!isFn(options.idealEdgeLength)) // in case there is no edge, but option gives a value to use CoSEConstants.DEFAULT_EDGE_LENGTH = FDLayoutConstants.DEFAULT_EDGE_LENGTH = options.idealEdgeLength;else // in case there is no edge and we cannot get a value from option (because it's a function) CoSEConstants.DEFAULT_EDGE_LENGTH = FDLayoutConstants.DEFAULT_EDGE_LENGTH = 50; // we need to update these constant values based on the ideal edge length constant CoSEConstants.MIN_REPULSION_DIST = FDLayoutConstants.MIN_REPULSION_DIST = FDLayoutConstants.DEFAULT_EDGE_LENGTH / 10.0; CoSEConstants.DEFAULT_RADIAL_SEPARATION = FDLayoutConstants.DEFAULT_EDGE_LENGTH; } }; // transfer cytoscape constraints to cose layout var processConstraints = function processConstraints(layout, options) { // get nodes to be fixed if (options.fixedNodeConstraint) { layout.constraints["fixedNodeConstraint"] = options.fixedNodeConstraint; } // get nodes to be aligned if (options.alignmentConstraint) { layout.constraints["alignmentConstraint"] = options.alignmentConstraint; } // get nodes to be relatively placed if (options.relativePlacementConstraint) { layout.constraints["relativePlacementConstraint"] = options.relativePlacementConstraint; } }; /**** Apply postprocessing ****/ if (options.nestingFactor != null) CoSEConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = FDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = options.nestingFactor; if (options.gravity != null) CoSEConstants.DEFAULT_GRAVITY_STRENGTH = FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH = options.gravity; if (options.numIter != null) CoSEConstants.MAX_ITERATIONS = FDLayoutConstants.MAX_ITERATIONS = options.numIter; if (options.gravityRange != null) CoSEConstants.DEFAULT_GRAVITY_RANGE_FACTOR = FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR = options.gravityRange; if (options.gravityCompound != null) CoSEConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = options.gravityCompound; if (options.gravityRangeCompound != null) CoSEConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = options.gravityRangeCompound; if (options.initialEnergyOnIncremental != null) CoSEConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = options.initialEnergyOnIncremental; if (options.tilingCompareBy != null) CoSEConstants.TILING_COMPARE_BY = options.tilingCompareBy; if (options.quality == 'proof') LayoutConstants.QUALITY = 2;else LayoutConstants.QUALITY = 0; CoSEConstants.NODE_DIMENSIONS_INCLUDE_LABELS = FDLayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = LayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = options.nodeDimensionsIncludeLabels; CoSEConstants.DEFAULT_INCREMENTAL = FDLayoutConstants.DEFAULT_INCREMENTAL = LayoutConstants.DEFAULT_INCREMENTAL = !options.randomize; CoSEConstants.ANIMATE = FDLayoutConstants.ANIMATE = LayoutConstants.ANIMATE = options.animate; CoSEConstants.TILE = options.tile; CoSEConstants.TILING_PADDING_VERTICAL = typeof options.tilingPaddingVertical === 'function' ? options.tilingPaddingVertical.call() : options.tilingPaddingVertical; CoSEConstants.TILING_PADDING_HORIZONTAL = typeof options.tilingPaddingHorizontal === 'function' ? options.tilingPaddingHorizontal.call() : options.tilingPaddingHorizontal; CoSEConstants.DEFAULT_INCREMENTAL = FDLayoutConstants.DEFAULT_INCREMENTAL = LayoutConstants.DEFAULT_INCREMENTAL = true; CoSEConstants.PURE_INCREMENTAL = !options.randomize; LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES = options.uniformNodeDimensions; // This part is for debug/demo purpose if (options.step == "transformed") { CoSEConstants.TRANSFORM_ON_CONSTRAINT_HANDLING = true; CoSEConstants.ENFORCE_CONSTRAINTS = false; CoSEConstants.APPLY_LAYOUT = false; } if (options.step == "enforced") { CoSEConstants.TRANSFORM_ON_CONSTRAINT_HANDLING = false; CoSEConstants.ENFORCE_CONSTRAINTS = true; CoSEConstants.APPLY_LAYOUT = false; } if (options.step == "cose") { CoSEConstants.TRANSFORM_ON_CONSTRAINT_HANDLING = false; CoSEConstants.ENFORCE_CONSTRAINTS = false; CoSEConstants.APPLY_LAYOUT = true; } if (options.step == "all") { if (options.randomize) CoSEConstants.TRANSFORM_ON_CONSTRAINT_HANDLING = true;else CoSEConstants.TRANSFORM_ON_CONSTRAINT_HANDLING = false; CoSEConstants.ENFORCE_CONSTRAINTS = true; CoSEConstants.APPLY_LAYOUT = true; } if (options.fixedNodeConstraint || options.alignmentConstraint || options.relativePlacementConstraint) { CoSEConstants.TREE_REDUCTION_ON_INCREMENTAL = false; } else { CoSEConstants.TREE_REDUCTION_ON_INCREMENTAL = true; } var coseLayout = new CoSELayout(); var gm = coseLayout.newGraphManager(); processChildrenList(gm.addRoot(), aux.getTopMostNodes(nodes), coseLayout, options); processEdges(coseLayout, gm, edges); processConstraints(coseLayout, options); coseLayout.runLayout(); return idToLNode; }; module.exports = { coseLayout: coseLayout }; /***/ }, /***/212: /***/function _(module, __unused_webpack_exports, __nested_webpack_require_27875__) { var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } /** The implementation of the fcose layout algorithm */ var assign = __nested_webpack_require_27875__(658); var aux = __nested_webpack_require_27875__(548); var _require = __nested_webpack_require_27875__(657), spectralLayout = _require.spectralLayout; var _require2 = __nested_webpack_require_27875__(816), coseLayout = _require2.coseLayout; var defaults = Object.freeze({ // 'draft', 'default' or 'proof' // - 'draft' only applies spectral layout // - 'default' improves the quality with subsequent CoSE layout (fast cooling rate) // - 'proof' improves the quality with subsequent CoSE layout (slow cooling rate) quality: "default", // Use random node positions at beginning of layout // if this is set to false, then quality option must be "proof" randomize: true, // Whether or not to animate the layout animate: true, // Duration of animation in ms, if enabled animationDuration: 1000, // Easing of animation, if enabled animationEasing: undefined, // Fit the viewport to the repositioned nodes fit: true, // Padding around layout padding: 30, // Whether to include labels in node dimensions. Valid in "proof" quality nodeDimensionsIncludeLabels: false, // Whether or not simple nodes (non-compound nodes) are of uniform dimensions uniformNodeDimensions: false, // Whether to pack disconnected components - valid only if randomize: true packComponents: true, // Layout step - all, transformed, enforced, cose - for debug purpose only step: "all", /* spectral layout options */ // False for random, true for greedy samplingType: true, // Sample size to construct distance matrix sampleSize: 25, // Separation amount between nodes nodeSeparation: 75, // Power iteration tolerance piTol: 0.0000001, /* CoSE layout options */ // Node repulsion (non overlapping) multiplier nodeRepulsion: function nodeRepulsion(node) { return 4500; }, // Ideal edge (non nested) length idealEdgeLength: function idealEdgeLength(edge) { return 50; }, // Divisor to compute edge forces edgeElasticity: function edgeElasticity(edge) { return 0.45; }, // Nesting factor (multiplier) to compute ideal edge length for nested edges nestingFactor: 0.1, // Gravity force (constant) gravity: 0.25, // Maximum number of iterations to perform numIter: 2500, // For enabling tiling tile: true, // The function that specifies the criteria for comparing nodes while sorting them during tiling operation. // Takes the node id as a parameter and the default tiling operation is perfomed when this option is not set. tilingCompareBy: undefined, // Represents the amount of the vertical space to put between the zero degree members during the tiling operation(can also be a function) tilingPaddingVertical: 10, // Represents the amount of the horizontal space to put between the zero degree members during the tiling operation(can also be a function) tilingPaddingHorizontal: 10, // Gravity range (constant) for compounds gravityRangeCompound: 1.5, // Gravity force (constant) for compounds gravityCompound: 1.0, // Gravity range (constant) gravityRange: 3.8, // Initial cooling factor for incremental layout initialEnergyOnIncremental: 0.3, /* constraint options */ // Fix required nodes to predefined positions // [{nodeId: 'n1', position: {x: 100, y: 200}, {...}] fixedNodeConstraint: undefined, // Align required nodes in vertical/horizontal direction // {vertical: [['n1', 'n2')], ['n3', 'n4']], horizontal: ['n2', 'n4']} alignmentConstraint: undefined, // Place two nodes relatively in vertical/horizontal direction // [{top: 'n1', bottom: 'n2', gap: 100}, {left: 'n3', right: 'n4', gap: 75}] relativePlacementConstraint: undefined, /* layout event callbacks */ ready: function ready() {}, // on layoutready stop: function stop() {} // on layoutstop }); var Layout = function () { function Layout(options) { _classCallCheck(this, Layout); this.options = assign({}, defaults, options); } _createClass(Layout, [{ key: 'run', value: function run() { var layout = this; var options = this.options; var cy = options.cy; var eles = options.eles; var spectralResult = []; var xCoords = void 0; var yCoords = void 0; var coseResult = []; var components = void 0; var componentCenters = []; // basic validity check for constraint inputs if (options.fixedNodeConstraint && (!Array.isArray(options.fixedNodeConstraint) || options.fixedNodeConstraint.length == 0)) { options.fixedNodeConstraint = undefined; } if (options.alignmentConstraint) { if (options.alignmentConstraint.vertical && (!Array.isArray(options.alignmentConstraint.vertical) || options.alignmentConstraint.vertical.length == 0)) { options.alignmentConstraint.vertical = undefined; } if (options.alignmentConstraint.horizontal && (!Array.isArray(options.alignmentConstraint.horizontal) || options.alignmentConstraint.horizontal.length == 0)) { options.alignmentConstraint.horizontal = undefined; } } if (options.relativePlacementConstraint && (!Array.isArray(options.relativePlacementConstraint) || options.relativePlacementConstraint.length == 0)) { options.relativePlacementConstraint = undefined; } // if any constraint exists, set some options var constraintExist = options.fixedNodeConstraint || options.alignmentConstraint || options.relativePlacementConstraint; if (constraintExist) { // constraints work with these options options.tile = false; options.packComponents = false; } // decide component packing is enabled or not var layUtil = void 0; var packingEnabled = false; if (cy.layoutUtilities && options.packComponents) { layUtil = cy.layoutUtilities("get"); if (!layUtil) layUtil = cy.layoutUtilities(); packingEnabled = true; } if (eles.nodes().length > 0) { // if packing is not enabled, perform layout on the whole graph if (!packingEnabled) { // store component center var boundingBox = options.eles.boundingBox(); componentCenters.push({ x: boundingBox.x1 + boundingBox.w / 2, y: boundingBox.y1 + boundingBox.h / 2 }); // apply spectral layout if (options.randomize) { var result = spectralLayout(options); spectralResult.push(result); } // apply cose layout as postprocessing if (options.quality == "default" || options.quality == "proof") { coseResult.push(coseLayout(options, spectralResult[0])); aux.relocateComponent(componentCenters[0], coseResult[0], options); // relocate center to original position } else { aux.relocateComponent(componentCenters[0], spectralResult[0], options); // relocate center to original position } } else { // packing is enabled var topMostNodes = aux.getTopMostNodes(options.eles.nodes()); components = aux.connectComponents(cy, options.eles, topMostNodes); // store component centers components.forEach(function (component) { var boundingBox = component.boundingBox(); componentCenters.push({ x: boundingBox.x1 + boundingBox.w / 2, y: boundingBox.y1 + boundingBox.h / 2 }); }); //send each component to spectral layout if randomized if (options.randomize) { components.forEach(function (component) { options.eles = component; spectralResult.push(spectralLayout(options)); }); } if (options.quality == "default" || options.quality == "proof") { var toBeTiledNodes = cy.collection(); if (options.tile) { // behave nodes to be tiled as one component var nodeIndexes = new Map(); var _xCoords = []; var _yCoords = []; var count = 0; var tempSpectralResult = { nodeIndexes: nodeIndexes, xCoords: _xCoords, yCoords: _yCoords }; var indexesToBeDeleted = []; components.forEach(function (component, index) { if (component.edges().length == 0) { component.nodes().forEach(function (node, i) { toBeTiledNodes.merge(component.nodes()[i]); if (!node.isParent()) { tempSpectralResult.nodeIndexes.set(component.nodes()[i].id(), count++); tempSpectralResult.xCoords.push(component.nodes()[0].position().x); tempSpectralResult.yCoords.push(component.nodes()[0].position().y); } }); indexesToBeDeleted.push(index); } }); if (toBeTiledNodes.length > 1) { var _boundingBox = toBeTiledNodes.boundingBox(); componentCenters.push({ x: _boundingBox.x1 + _boundingBox.w / 2, y: _boundingBox.y1 + _boundingBox.h / 2 }); components.push(toBeTiledNodes); spectralResult.push(tempSpectralResult); for (var i = indexesToBeDeleted.length - 1; i >= 0; i--) { components.splice(indexesToBeDeleted[i], 1); spectralResult.splice(indexesToBeDeleted[i], 1); componentCenters.splice(indexesToBeDeleted[i], 1); } ; } } components.forEach(function (component, index) { // send each component to cose layout options.eles = component; coseResult.push(coseLayout(options, spectralResult[index])); aux.relocateComponent(componentCenters[index], coseResult[index], options); // relocate center to original position }); } else { components.forEach(function (component, index) { aux.relocateComponent(componentCenters[index], spectralResult[index], options); // relocate center to original position }); } // packing var componentsEvaluated = new Set(); if (components.length > 1) { var subgraphs = []; var hiddenEles = eles.filter(function (ele) { return ele.css('display') == 'none'; }); components.forEach(function (component, index) { var nodeIndexes = void 0; if (options.quality == "draft") { nodeIndexes = spectralResult[index].nodeIndexes; } if (component.nodes().not(hiddenEles).length > 0) { var subgraph = {}; subgraph.edges = []; subgraph.nodes = []; var nodeIndex = void 0; component.nodes().not(hiddenEles).forEach(function (node) { if (options.quality == "draft") { if (!node.isParent()) { nodeIndex = nodeIndexes.get(node.id()); subgraph.nodes.push({ x: spectralResult[index].xCoords[nodeIndex] - node.boundingbox().w / 2, y: spectralResult[index].yCoords[nodeIndex] - node.boundingbox().h / 2, width: node.boundingbox().w, height: node.boundingbox().h }); } else { var parentInfo = aux.calcBoundingBox(node, spectralResult[index].xCoords, spectralResult[index].yCoords, nodeIndexes); subgraph.nodes.push({ x: parentInfo.topLeftX, y: parentInfo.topLeftY, width: parentInfo.width, height: parentInfo.height }); } } else { if (coseResult[index][node.id()]) { subgraph.nodes.push({ x: coseResult[index][node.id()].getLeft(), y: coseResult[index][node.id()].getTop(), width: coseResult[index][node.id()].getWidth(), height: coseResult[index][node.id()].getHeight() }); } } }); component.edges().forEach(function (edge) { var source = edge.source(); var target = edge.target(); if (source.css("display") != "none" && target.css("display") != "none") { if (options.quality == "draft") { var sourceNodeIndex = nodeIndexes.get(source.id()); var targetNodeIndex = nodeIndexes.get(target.id()); var sourceCenter = []; var targetCenter = []; if (source.isParent()) { var parentInfo = aux.calcBoundingBox(source, spectralResult[index].xCoords, spectralResult[index].yCoords, nodeIndexes); sourceCenter.push(parentInfo.topLeftX + parentInfo.width / 2); sourceCenter.push(parentInfo.topLeftY + parentInfo.height / 2); } else { sourceCenter.push(spectralResult[index].xCoords[sourceNodeIndex]); sourceCenter.push(spectralResult[index].yCoords[sourceNodeIndex]); } if (target.isParent()) { var _parentInfo = aux.calcBoundingBox(target, spectralResult[index].xCoords, spectralResult[index].yCoords, nodeIndexes); targetCenter.push(_parentInfo.topLeftX + _parentInfo.width / 2); targetCenter.push(_parentInfo.topLeftY + _parentInfo.height / 2); } else { targetCenter.push(spectralResult[index].xCoords[targetNodeIndex]); targetCenter.push(spectralResult[index].yCoords[targetNodeIndex]); } subgraph.edges.push({ startX: sourceCenter[0], startY: sourceCenter[1], endX: targetCenter[0], endY: targetCenter[1] }); } else { if (coseResult[index][source.id()] && coseResult[index][target.id()]) { subgraph.edges.push({ startX: coseResult[index][source.id()].getCenterX(), startY: coseResult[index][source.id()].getCenterY(), endX: coseResult[index][target.id()].getCenterX(), endY: coseResult[index][target.id()].getCenterY() }); } } } }); if (subgraph.nodes.length > 0) { subgraphs.push(subgraph); componentsEvaluated.add(index); } } }); var shiftResult = layUtil.packComponents(subgraphs, options.randomize).shifts; if (options.quality == "draft") { spectralResult.forEach(function (result, index) { var newXCoords = result.xCoords.map(function (x) { return x + shiftResult[index].dx; }); var newYCoords = result.yCoords.map(function (y) { return y + shiftResult[index].dy; }); result.xCoords = newXCoords; result.yCoords = newYCoords; }); } else { var _count = 0; componentsEvaluated.forEach(function (index) { Object.keys(coseResult[index]).forEach(function (item) { var nodeRectangle = coseResult[index][item]; nodeRectangle.setCenter(nodeRectangle.getCenterX() + shiftResult[_count].dx, nodeRectangle.getCenterY() + shiftResult[_count].dy); }); _count++; }); } } } } // get each element's calculated position var getPositions = function getPositions(ele, i) { if (options.quality == "default" || options.quality == "proof") { if (typeof ele === "number") { ele = i; } var pos = void 0; var node = void 0; var theId = ele.data('id'); coseResult.forEach(function (result) { if (theId in result) { pos = { x: result[theId].getRect().getCenterX(), y: result[theId].getRect().getCenterY() }; node = result[theId]; } }); if (options.nodeDimensionsIncludeLabels) { if (node.labelWidth) { if (node.labelPosHorizontal == "left") { pos.x += node.labelWidth / 2; } else if (node.labelPosHorizontal == "right") { pos.x -= node.labelWidth / 2; } } if (node.labelHeight) { if (node.labelPosVertical == "top") { pos.y += node.labelHeight / 2; } else if (node.labelPosVertical == "bottom") { pos.y -= node.labelHeight / 2; } } } if (pos == undefined) pos = { x: ele.position("x"), y: ele.position("y") }; return { x: pos.x, y: pos.y }; } else { var _pos = void 0; spectralResult.forEach(function (result) { var index = result.nodeIndexes.get(ele.id()); if (index != undefined) { _pos = { x: result.xCoords[index], y: result.yCoords[index] }; } }); if (_pos == undefined) _pos = { x: ele.position("x"), y: ele.position("y") }; return { x: _pos.x, y: _pos.y }; } }; // quality = "draft" and randomize = false are contradictive so in that case positions don't change if (options.quality == "default" || options.quality == "proof" || options.randomize) { // transfer calculated positions to nodes (positions of only simple nodes are evaluated, compounds are positioned automatically) var parentsWithoutChildren = aux.calcParentsWithoutChildren(cy, eles); var _hiddenEles = eles.filter(function (ele) { return ele.css('display') == 'none'; }); options.eles = eles.not(_hiddenEles); eles.nodes().not(":parent").not(_hiddenEles).layoutPositions(layout, options, getPositions); if (parentsWithoutChildren.length > 0) { parentsWithoutChildren.forEach(function (ele) { ele.position(getPositions(ele)); }); } } else { console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'."); } } }]); return Layout; }(); module.exports = Layout; /***/ }, /***/657: /***/function _(module, __unused_webpack_exports, __nested_webpack_require_53090__) { /** The implementation of the spectral layout that is the first part of the fcose layout algorithm */ var aux = __nested_webpack_require_53090__(548); var Matrix = __nested_webpack_require_53090__(140).layoutBase.Matrix; var SVD = __nested_webpack_require_53090__(140).layoutBase.SVD; // main function that spectral layout is processed var spectralLayout = function spectralLayout(options) { var cy = options.cy; var eles = options.eles; var nodes = eles.nodes(); var parentNodes = eles.nodes(":parent"); var dummyNodes = new Map(); // map to keep dummy nodes and their neighbors var nodeIndexes = new Map(); // map to keep indexes to nodes var parentChildMap = new Map(); // mapping btw. compound and its representative node var allNodesNeighborhood = []; // array to keep neighborhood of all nodes var xCoords = []; var yCoords = []; var samplesColumn = []; // sampled vertices var minDistancesColumn = []; var C = []; // column sampling matrix var PHI = []; // intersection of column and row sampling matrices var INV = []; // inverse of PHI var firstSample = void 0; // the first sampled node var nodeSize = void 0; var infinity = 100000000; var small = 0.000000001; var piTol = options.piTol; var samplingType = options.samplingType; // false for random, true for greedy var nodeSeparation = options.nodeSeparation; var sampleSize = void 0; /**** Spectral-preprocessing functions ****/ /**** Spectral layout functions ****/ // determine which columns to be sampled var randomSampleCR = function randomSampleCR() { var sample = 0; var count = 0; var flag = false; while (count < sampleSize) { sample = Math.floor(Math.random() * nodeSize); flag = false; for (var i = 0; i < count; i++) { if (samplesColumn[i] == sample) { flag = true; break; } } if (!flag) { samplesColumn[count] = sample; count++; } else { continue; } } }; // takes the index of the node(pivot) to initiate BFS as a parameter var BFS = function BFS(pivot, index, samplingMethod) { var path = []; // the front of the path var front = 0; // the back of the path var back = 0; var current = 0; var temp = void 0; var distance = []; var max_dist = 0; // the furthest node to be returned var max_ind = 1; for (var i = 0; i < nodeSize; i++) { distance[i] = infinity; } path[back] = pivot; distance[pivot] = 0; while (back >= front) { current = path[front++]; var neighbors = allNodesNeighborhood[current]; for (var _i = 0; _i < neighbors.length; _i++) { temp = nodeIndexes.get(neighbors[_i]); if (distance[temp] == infinity) { distance[temp] = distance[current] + 1; path[++back] = temp; } } C[current][index] = distance[current] * nodeSeparation; } if (samplingMethod) { for (var _i2 = 0; _i2 < nodeSize; _i2++) { if (C[_i2][index] < minDistancesColumn[_i2]) minDistancesColumn[_i2] = C[_i2][index]; } for (var _i3 = 0; _i3 < nodeSize; _i3++) { if (minDistancesColumn[_i3] > max_dist) { max_dist = minDistancesColumn[_i3]; max_ind = _i3; } } } return max_ind; }; // apply BFS to all nodes or selected samples var allBFS = function allBFS(samplingMethod) { var sample = void 0; if (!samplingMethod) { randomSampleCR(); // call BFS for (var i = 0; i < sampleSize; i++) { BFS(samplesColumn[i], i, samplingMethod, false); } } else { sample = Math.floor(Math.random() * nodeSize); firstSample = sample; for (var _i4 = 0; _i4 < nodeSize; _i4++) { minDistancesColumn[_i4] = infinity; } for (var _i5 = 0; _i5 < sampleSize; _i5++) { samplesColumn[_i5] = sample; sample = BFS(sample, _i5, samplingMethod); } } // form the squared distances for C for (var _i6 = 0; _i6 < nodeSize; _i6++) { for (var j = 0; j < sampleSize; j++) { C[_i6][j] *= C[_i6][j]; } } // form PHI for (var _i7 = 0; _i7 < sampleSize; _i7++) { PHI[_i7] = []; } for (var _i8 = 0; _i8 < sampleSize; _i8++) { for (var _j = 0; _j < sampleSize; _j++) { PHI[_i8][_j] = C[samplesColumn[_j]][_i8]; } } }; // perform the SVD algorithm and apply a regularization step var sample = function sample() { var SVDResult = SVD.svd(PHI); var a_q = SVDResult.S; var a_u = SVDResult.U; var a_v = SVDResult.V; var max_s = a_q[0] * a_q[0] * a_q[0]; var a_Sig = []; // regularization for (var i = 0; i < sampleSize; i++) { a_Sig[i] = []; for (var j = 0; j < sampleSize; j++) { a_Sig[i][j] = 0; if (i == j) { a_Sig[i][j] = a_q[i] / (a_q[i] * a_q[i] + max_s / (a_q[i] * a_q[i])); } } } INV = Matrix.multMat(Matrix.multMat(a_v, a_Sig), Matrix.transpose(a_u)); }; // calculate final coordinates var powerIteration = function powerIteration() { // two largest eigenvalues var theta1 = void 0; var theta2 = void 0; // initial guesses for eigenvectors var Y1 = []; var Y2 = []; var V1 = []; var V2 = []; for (var i = 0; i < nodeSize; i++) { Y1[i] = Math.random(); Y2[i] = Math.random(); } Y1 = Matrix.normalize(Y1); Y2 = Matrix.normalize(Y2); var count = 0; // to keep track of the improvement ratio in power iteration var current = small; var previous = small; var temp = void 0; while (true) { count++; for (var _i9 = 0; _i9 < nodeSize; _i9++) { V1[_i9] = Y1[_i9]; } Y1 = Matrix.multGamma(Matrix.multL(Matrix.multGamma(V1), C, INV)); theta1 = Matrix.dotProduct(V1, Y1); Y1 = Matrix.normalize(Y1); current = Matrix.dotProduct(V1, Y1); temp = Math.abs(current / previous); if (temp <= 1 + piTol && temp >= 1) { break; } previous = current; } for (var _i10 = 0; _i10 < nodeSize; _i10++) { V1[_i10] = Y1[_i10]; } count = 0; previous = small; while (true) { count++; for (var _i11 = 0; _i11 < nodeSize; _i11++) { V2[_i11] = Y2[_i11]; } V2 = Matrix.minusOp(V2, Matrix.multCons(V1, Matrix.dotProduct(V1, V2))); Y2 = Matrix.multGamma(Matrix.multL(Matrix.multGamma(V2), C, INV)); theta2 = Matrix.dotProduct(V2, Y2); Y2 = Matrix.normalize(Y2); current = Matrix.dotProduct(V2, Y2); temp = Math.abs(current / previous); if (temp <= 1 + piTol && temp >= 1) { break; } previous = current; } for (var _i12 = 0; _i12 < nodeSize; _i12++) { V2[_i12] = Y2[_i12]; } // theta1 now contains dominant eigenvalue // theta2 now contains the second-largest eigenvalue // V1 now contains theta1's eigenvector // V2 now contains theta2's eigenvector //populate the two vectors xCoords = Matrix.multCons(V1, Math.sqrt(Math.abs(theta1))); yCoords = Matrix.multCons(V2, Math.sqrt(Math.abs(theta2))); }; /**** Preparation for spectral layout (Preprocessing) ****/ // connect disconnected components (first top level, then inside of each compound node) aux.connectComponents(cy, eles, aux.getTopMostNodes(nodes), dummyNodes); parentNodes.forEach(function (ele) { aux.connectComponents(cy, eles, aux.getTopMostNodes(ele.descendants().intersection(eles)), dummyNodes); }); // assign indexes to nodes (first real, then dummy nodes) var index = 0; for (var i = 0; i < nodes.length; i++) { if (!nodes[i].isParent()) { nodeIndexes.set(nodes[i].id(), index++); } } var _iteratorNormalCompletion = true; var _didIteratorError = false; var _iteratorError = undefined; try { for (var _iterator = dummyNodes.keys()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var key = _step.value; nodeIndexes.set(key, index++); } // instantiate the neighborhood matrix } catch (err) { _didIteratorError = true; _iteratorError = err; } finally { try { if (!_iteratorNormalCompletion && _iterator.return) { _iterator.return(); } } finally { if (_didIteratorError) { throw _iteratorError; } } } for (var _i13 = 0; _i13 < nodeIndexes.size; _i13++) { allNodesNeighborhood[_i13] = []; } // form a parent-child map to keep representative node of each compound node parentNodes.forEach(function (ele) { var children = ele.children().intersection(eles); // let random = 0; while (children.nodes(":childless").length == 0) { // random = Math.floor(Math.random() * children.nodes().length); // if all children are compound then proceed randomly children = children.nodes()[0].children().intersection(eles); } // select the representative node - we can apply different methods here // random = Math.floor(Math.random() * children.nodes(":childless").length); var index = 0; var min = children.nodes(":childless")[0].connectedEdges().length; children.nodes(":childless").forEach(function (ele2, i) { if (ele2.connectedEdges().length < min) { min = ele2.connectedEdges().length; index = i; } }); parentChildMap.set(ele.id(), children.nodes(":childless")[index].id()); }); // add neighborhood relations (first real, then dummy nodes) nodes.forEach(function (ele) { var eleIndex = void 0; if (ele.isParent()) eleIndex = nodeIndexes.get(parentChildMap.get(ele.id()));else eleIndex = nodeIndexes.get(ele.id()); ele.neighborhood().nodes().forEach(function (node) { if (eles.intersection(ele.edgesWith(node)).length > 0) { if (node.isParent()) allNodesNeighborhood[eleIndex].push(parentChildMap.get(node.id()));else allNodesNeighborhood[eleIndex].push(node.id()); } }); }); var _loop = function _loop(_key) { var eleIndex = nodeIndexes.get(_key); var disconnectedId = void 0; dummyNodes.get(_key).forEach(function (id) { if (cy.getElementById(id).isParent()) disconnectedId = parentChildMap.get(id);else disconnectedId = id; allNodesNeighborhood[eleIndex].push(disconnectedId); allNodesNeighborhood[nodeIndexes.get(disconnectedId)].push(_key); }); }; var _iteratorNormalCompletion2 = true; var _didIteratorError2 = false; var _iteratorError2 = undefined; try { for (var _iterator2 = dummyNodes.keys()[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { var _key = _step2.value; _loop(_key); } // nodeSize now only considers the size of transformed graph } catch (err) { _didIteratorError2 = true; _iteratorError2 = err; } finally { try { if (!_iteratorNormalCompletion2 && _iterator2.return) { _iterator2.return(); } } finally { if (_didIteratorError2) { throw _iteratorError2; } } } nodeSize = nodeIndexes.size; var spectralResult = void 0; // If number of nodes in transformed graph is 1 or 2, either SVD or powerIteration causes problem // So skip spectral and layout the graph with cose if (nodeSize > 2) { // if # of nodes in transformed graph is smaller than sample size, // then use # of nodes as sample size sampleSize = nodeSize < options.sampleSize ? nodeSize : options.sampleSize; // instantiates the partial matrices that will be used in spectral layout for (var _i14 = 0; _i14 < nodeSize; _i14++) { C[_i14] = []; } for (var _i15 = 0; _i15 < sampleSize; _i15++) { INV[_i15] = []; } /**** Apply spectral layout ****/ if (options.quality == "draft" || options.step == "all") { allBFS(samplingType); sample(); powerIteration(); spectralResult = { nodeIndexes: nodeIndexes, xCoords: xCoords, yCoords: yCoords }; } else { nodeIndexes.forEach(function (value, key) { xCoords.push(cy.getElementById(key).position("x")); yCoords.push(cy.getElementById(key).position("y")); }); spectralResult = { nodeIndexes: nodeIndexes, xCoords: xCoords, yCoords: yCoords }; } return spectralResult; } else { var iterator = nodeIndexes.keys(); var firstNode = cy.getElementById(iterator.next().value); var firstNodePos = firstNode.position(); var firstNodeWidth = firstNode.outerWidth(); xCoords.push(firstNodePos.x); yCoords.push(firstNodePos.y); if (nodeSize == 2) { var secondNode = cy.getElementById(iterator.next().value); var secondNodeWidth = secondNode.outerWidth(); xCoords.push(firstNodePos.x + firstNodeWidth / 2 + secondNodeWidth / 2 + options.idealEdgeLength); yCoords.push(firstNodePos.y); } spectralResult = { nodeIndexes: nodeIndexes, xCoords: xCoords, yCoords: yCoords }; return spectralResult; } }; module.exports = { spectralLayout: spectralLayout }; /***/ }, /***/579: /***/function _(module, __unused_webpack_exports, __nested_webpack_require_70299__) { var impl = __nested_webpack_require_70299__(212); // registers the extension on a cytoscape lib ref var register = function register(cytoscape) { if (!cytoscape) { return; } // can't register if cytoscape unspecified cytoscape('layout', 'fcose', impl); // register with cytoscape.js }; if (typeof cytoscape !== 'undefined') { // expose to global cytoscape (i.e. window.cytoscape) register(cytoscape); } module.exports = register; /***/ }, /***/140: /***/function _(module) { module.exports = __WEBPACK_EXTERNAL_MODULE__140__; /***/ } /******/ }; /************************************************************************/ /******/ // The module cache /******/ var __webpack_module_cache__ = {}; /******/ /******/ // The require function /******/ function __nested_webpack_require_71321__(moduleId) { /******/ // Check if module is in cache /******/var cachedModule = __webpack_module_cache__[moduleId]; /******/ if (cachedModule !== undefined) { /******/return cachedModule.exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = __webpack_module_cache__[moduleId] = { /******/ // no module.id needed /******/ // no module.loaded needed /******/exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ __webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_71321__); /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /************************************************************************/ /******/ /******/ // startup /******/ // Load entry module and return exports /******/ // This entry module is referenced by other modules so it can't be inlined /******/ var __nested_webpack_exports__ = __nested_webpack_require_71321__(579); /******/ /******/ return __nested_webpack_exports__; /******/ }() ); }); /***/ }), /***/ "./node_modules/react-cytoscapejs/dist/react-cytoscape.modern.js": /*!***********************************************************************!*\ !*** ./node_modules/react-cytoscapejs/dist/react-cytoscape.modern.js ***! \***********************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ w; } /* harmony export */ }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var cytoscape__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! cytoscape */ "./node_modules/cytoscape/dist/cytoscape.cjs.js"); /* harmony import */ var cytoscape__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(cytoscape__WEBPACK_IMPORTED_MODULE_2__); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } var o = (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string), l = (prop_types__WEBPACK_IMPORTED_MODULE_1___default().array), s = (prop_types__WEBPACK_IMPORTED_MODULE_1___default().object), a = (prop_types__WEBPACK_IMPORTED_MODULE_1___default().number), i = (prop_types__WEBPACK_IMPORTED_MODULE_1___default().bool), r = (prop_types__WEBPACK_IMPORTED_MODULE_1___default().oneOfType), c = (prop_types__WEBPACK_IMPORTED_MODULE_1___default().any), u = (prop_types__WEBPACK_IMPORTED_MODULE_1___default().func), d = { id: o, className: o, style: r([o, s]), elements: r([l, c]), stylesheet: r([l, c]), layout: r([s, c]), pan: r([s, c]), zoom: a, panningEnabled: i, userPanningEnabled: i, minZoom: a, maxZoom: a, zoomingEnabled: i, userZoomingEnabled: i, boxSelectionEnabled: i, autoungrabify: i, autolock: i, autounselectify: i, get: u, toJson: u, diff: u, forEach: u, cy: u, headless: i, styleEnabled: i, hideEdgesOnViewport: i, textureOnViewport: i, motionBlur: i, motionBlurOpacity: a, wheelSensitivity: a, pixelRatio: r([o, s]) }, p = function p(e, t) { if (function (e, t) { return null == e || null == t; }(e, t) && (null != e || null != t)) return !0; if (e === t) return !1; if ("object" != typeof e || "object" != typeof t) return e !== t; var n = Object.keys(e), o = Object.keys(t), l = function l(n) { return e[n] !== t[n]; }; return n.length !== o.length || !(!n.some(l) && !o.some(l)); }, m = function m(e, t) { return null != e ? e[t] : null; }, y = { diff: p, get: m, toJson: function toJson(e) { return e; }, forEach: function forEach(e, t) { return e.forEach(t); }, elements: [{ data: { id: "a", label: "Example node A" } }, { data: { id: "b", label: "Example node B" } }, { data: { id: "e", source: "a", target: "b" } }], stylesheet: [{ selector: "node", style: { label: "data(label)" } }], zoom: 1, pan: { x: 0, y: 0 } }, h = function h(e, t, n, o) { return n(m(e, o), m(t, o)); }, b = function b(e, t, n, o, l, s, a) { e.batch(function () { (o === p || h(t, n, o, "elements")) && x(e, m(t, "elements"), m(n, "elements"), l, s, a, o), h(t, n, o, "stylesheet") && E(e, m(t, "stylesheet"), m(n, "stylesheet"), l), ["zoom", "minZoom", "maxZoom", "zoomingEnabled", "userZoomingEnabled", "pan", "panningEnabled", "userPanningEnabled", "boxSelectionEnabled", "autoungrabify", "autolock", "autounselectify"].forEach(function (s) { h(t, n, o, s) && f(e, s, m(t, s), m(n, s), l); }); }), h(t, n, o, "layout") && g(e, m(t, "layout"), m(n, "layout"), l); }, f = function f(e, t, n, o, l) { e[t](l(o)); }, g = function g(e, t, n, o) { var l = o(n); null != l && e.layout(l).run(); }, E = function E(e, t, n, o) { var l = e.style(); null != l && l.fromJson(o(n)).update(); }, x = function x(e, t, n, o, l, s, a) { var i = [], r = e.collection(), c = [], u = {}, d = {}, p = function p(e) { return l(l(e, "data"), "id"); }; s(n, function (e) { var t = p(e); d[t] = e; }), null != t && s(t, function (t) { var n = p(t); u[n] = t, function (e) { return null != d[e]; }(n) || r.merge(e.getElementById(n)); }), s(n, function (e) { var t = p(e), n = function (e) { return u[e]; }(t); (function (e) { return null != u[e]; })(t) ? c.push({ ele1: n, ele2: e }) : i.push(o(e)); }), r.length > 0 && e.remove(r), i.length > 0 && e.add(i), c.forEach(function (_ref) { var t = _ref.ele1, n = _ref.ele2; return O(e, t, n, o, l, a); }); }, O = function O(e, t, n, o, l, s) { var a = l(l(n, "data"), "id"), i = e.getElementById(a), r = {}; ["data", "position", "selected", "selectable", "locked", "grabbable", "classes"].forEach(function (e) { var a = l(n, e); s(a, l(t, e)) && (r[e] = o(a)); }); var c = l(n, "scratch"); s(c, l(t, "scratch")) && i.scratch(o(c)), Object.keys(r).length > 0 && i.json(r); }; var w = /*#__PURE__*/function (_e$Component) { _inherits(w, _e$Component); var _super = _createSuper(w); function w(t) { var _this; _classCallCheck(this, w); _this = _super.call(this, t), _this.displayName = "CytoscapeComponent", _this.containerRef = react__WEBPACK_IMPORTED_MODULE_0___default().createRef(); return _this; } _createClass(w, [{ key: "componentDidMount", value: function componentDidMount() { var e = this.containerRef.current, _this$props = this.props, t = _this$props.global, o = _this$props.headless, l = _this$props.styleEnabled, s = _this$props.hideEdgesOnViewport, a = _this$props.textureOnViewport, i = _this$props.motionBlur, r = _this$props.motionBlurOpacity, c = _this$props.wheelSensitivity, u = _this$props.pixelRatio, d = this._cy = new (cytoscape__WEBPACK_IMPORTED_MODULE_2___default())({ container: e, headless: o, styleEnabled: l, hideEdgesOnViewport: s, textureOnViewport: a, motionBlur: i, motionBlurOpacity: r, wheelSensitivity: c, pixelRatio: u }); t && (window[t] = d), this.updateCytoscape(null, this.props); } }, { key: "updateCytoscape", value: function updateCytoscape(e, t) { var n = this._cy, o = t.diff, l = t.toJson, s = t.get, a = t.forEach; b(n, e, t, o, l, s, a), null != t.cy && t.cy(n); } }, { key: "componentDidUpdate", value: function componentDidUpdate(e) { this.updateCytoscape(e, this.props); } }, { key: "componentWillUnmount", value: function componentWillUnmount() { this._cy.destroy(); } }, { key: "render", value: function render() { var _this$props2 = this.props, t = _this$props2.id, n = _this$props2.className, o = _this$props2.style; return react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { ref: this.containerRef, id: t, className: n, style: o }); } }], [{ key: "propTypes", get: function get() { return d; } }, { key: "defaultProps", get: function get() { return y; } }, { key: "normalizeElements", value: function normalizeElements(e) { if (null != e.length) return e; { var _t = e.nodes, _n = e.edges; return null == _t && (_t = []), null == _n && (_n = []), _t.concat(_n); } } }]); return w; }((react__WEBPACK_IMPORTED_MODULE_0___default().Component)); /***/ }), /***/ "./node_modules/react-redux/es/components/Context.js": /*!***********************************************************!*\ !*** ./node_modules/react-redux/es/components/Context.js ***! \***********************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ ReactReduxContext: function() { return /* binding */ ReactReduxContext; } /* harmony export */ }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); var ReactReduxContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(null); if (true) { ReactReduxContext.displayName = 'ReactRedux'; } /* harmony default export */ __webpack_exports__["default"] = (ReactReduxContext); /***/ }), /***/ "./node_modules/react-redux/es/components/Provider.js": /*!************************************************************!*\ !*** ./node_modules/react-redux/es/components/Provider.js ***! \************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _Context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Context */ "./node_modules/react-redux/es/components/Context.js"); /* harmony import */ var _utils_Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/Subscription */ "./node_modules/react-redux/es/utils/Subscription.js"); /* harmony import */ var _utils_useIsomorphicLayoutEffect__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/useIsomorphicLayoutEffect */ "./node_modules/react-redux/es/utils/useIsomorphicLayoutEffect.js"); function Provider(_ref) { var store = _ref.store, context = _ref.context, children = _ref.children, serverState = _ref.serverState; var contextValue = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () { var subscription = (0,_utils_Subscription__WEBPACK_IMPORTED_MODULE_2__.createSubscription)(store); return { store, subscription, getServerState: serverState ? function () { return serverState; } : undefined }; }, [store, serverState]); var previousState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () { return store.getState(); }, [store]); (0,_utils_useIsomorphicLayoutEffect__WEBPACK_IMPORTED_MODULE_3__.useIsomorphicLayoutEffect)(function () { var subscription = contextValue.subscription; subscription.onStateChange = subscription.notifyNestedSubs; subscription.trySubscribe(); if (previousState !== store.getState()) { subscription.notifyNestedSubs(); } return function () { subscription.tryUnsubscribe(); subscription.onStateChange = undefined; }; }, [contextValue, previousState]); var Context = context || _Context__WEBPACK_IMPORTED_MODULE_1__.ReactReduxContext; // @ts-ignore 'AnyAction' is assignable to the constraint of type 'A', but 'A' could be instantiated with a different subtype return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Context.Provider, { value: contextValue }, children); } /* harmony default export */ __webpack_exports__["default"] = (Provider); /***/ }), /***/ "./node_modules/react-redux/es/components/connect.js": /*!***********************************************************!*\ !*** ./node_modules/react-redux/es/components/connect.js ***! \***********************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ initializeConnect: function() { return /* binding */ initializeConnect; } /* harmony export */ }); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ "./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js"); /* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! hoist-non-react-statics */ "./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js"); /* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react-is */ "./node_modules/react-redux/node_modules/react-is/index.js"); /* harmony import */ var _connect_selectorFactory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../connect/selectorFactory */ "./node_modules/react-redux/es/connect/selectorFactory.js"); /* harmony import */ var _connect_mapDispatchToProps__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../connect/mapDispatchToProps */ "./node_modules/react-redux/es/connect/mapDispatchToProps.js"); /* harmony import */ var _connect_mapStateToProps__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../connect/mapStateToProps */ "./node_modules/react-redux/es/connect/mapStateToProps.js"); /* harmony import */ var _connect_mergeProps__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../connect/mergeProps */ "./node_modules/react-redux/es/connect/mergeProps.js"); /* harmony import */ var _utils_Subscription__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/Subscription */ "./node_modules/react-redux/es/utils/Subscription.js"); /* harmony import */ var _utils_useIsomorphicLayoutEffect__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/useIsomorphicLayoutEffect */ "./node_modules/react-redux/es/utils/useIsomorphicLayoutEffect.js"); /* harmony import */ var _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/shallowEqual */ "./node_modules/react-redux/es/utils/shallowEqual.js"); /* harmony import */ var _utils_warning__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../utils/warning */ "./node_modules/react-redux/es/utils/warning.js"); /* harmony import */ var _Context__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./Context */ "./node_modules/react-redux/es/components/Context.js"); /* harmony import */ var _utils_useSyncExternalStore__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../utils/useSyncExternalStore */ "./node_modules/react-redux/es/utils/useSyncExternalStore.js"); function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } var _excluded = ["reactReduxForwardedRef"]; /* eslint-disable valid-jsdoc, @typescript-eslint/no-unused-vars */ var useSyncExternalStore = _utils_useSyncExternalStore__WEBPACK_IMPORTED_MODULE_14__.notInitialized; var initializeConnect = function initializeConnect(fn) { useSyncExternalStore = fn; }; // Define some constant arrays just to avoid re-creating these var EMPTY_ARRAY = [null, 0]; var NO_SUBSCRIPTION_ARRAY = [null, null]; // Attempts to stringify whatever not-really-a-component value we were given // for logging in an error message var stringifyComponent = function stringifyComponent(Comp) { try { return JSON.stringify(Comp); } catch (err) { return String(Comp); } }; // This is "just" a `useLayoutEffect`, but with two modifications: // - we need to fall back to `useEffect` in SSR to avoid annoying warnings // - we extract this to a separate function to avoid closing over values // and causing memory leaks function useIsomorphicLayoutEffectWithArgs(effectFunc, effectArgs, dependencies) { (0,_utils_useIsomorphicLayoutEffect__WEBPACK_IMPORTED_MODULE_10__.useIsomorphicLayoutEffect)(function () { return effectFunc.apply(void 0, _toConsumableArray(effectArgs)); }, dependencies); } // Effect callback, extracted: assign the latest props values to refs for later usage function captureWrapperProps(lastWrapperProps, lastChildProps, renderIsScheduled, wrapperProps, // actualChildProps: unknown, childPropsFromStoreUpdate, notifyNestedSubs) { // We want to capture the wrapper props and child props we used for later comparisons lastWrapperProps.current = wrapperProps; renderIsScheduled.current = false; // If the render was from a store update, clear out that reference and cascade the subscriber update if (childPropsFromStoreUpdate.current) { childPropsFromStoreUpdate.current = null; notifyNestedSubs(); } } // Effect callback, extracted: subscribe to the Redux store or nearest connected ancestor, // check for updates after dispatched actions, and trigger re-renders. function subscribeUpdates(shouldHandleStateChanges, store, subscription, childPropsSelector, lastWrapperProps, lastChildProps, renderIsScheduled, isMounted, childPropsFromStoreUpdate, notifyNestedSubs, // forceComponentUpdateDispatch: React.Dispatch, additionalSubscribeListener) { // If we're not subscribed to the store, nothing to do here if (!shouldHandleStateChanges) return function () {}; // Capture values for checking if and when this component unmounts var didUnsubscribe = false; var lastThrownError = null; // We'll run this callback every time a store subscription update propagates to this component var checkForUpdates = function checkForUpdates() { if (didUnsubscribe || !isMounted.current) { // Don't run stale listeners. // Redux doesn't guarantee unsubscriptions happen until next dispatch. return; } // TODO We're currently calling getState ourselves here, rather than letting `uSES` do it var latestStoreState = store.getState(); var newChildProps, error; try { // Actually run the selector with the most recent store state and wrapper props // to determine what the child props should be newChildProps = childPropsSelector(latestStoreState, lastWrapperProps.current); } catch (e) { error = e; lastThrownError = e; } if (!error) { lastThrownError = null; } // If the child props haven't changed, nothing to do here - cascade the subscription update if (newChildProps === lastChildProps.current) { if (!renderIsScheduled.current) { notifyNestedSubs(); } } else { // Save references to the new child props. Note that we track the "child props from store update" // as a ref instead of a useState/useReducer because we need a way to determine if that value has // been processed. If this went into useState/useReducer, we couldn't clear out the value without // forcing another re-render, which we don't want. lastChildProps.current = newChildProps; childPropsFromStoreUpdate.current = newChildProps; renderIsScheduled.current = true; // TODO This is hacky and not how `uSES` is meant to be used // Trigger the React `useSyncExternalStore` subscriber additionalSubscribeListener(); } }; // Actually subscribe to the nearest connected ancestor (or store) subscription.onStateChange = checkForUpdates; subscription.trySubscribe(); // Pull data from the store after first render in case the store has // changed since we began. checkForUpdates(); var unsubscribeWrapper = function unsubscribeWrapper() { didUnsubscribe = true; subscription.tryUnsubscribe(); subscription.onStateChange = null; if (lastThrownError) { // It's possible that we caught an error due to a bad mapState function, but the // parent re-rendered without this component and we're about to unmount. // This shouldn't happen as long as we do top-down subscriptions correctly, but // if we ever do those wrong, this throw will surface the error in our tests. // In that case, throw the error from here so it doesn't get lost. throw lastThrownError; } }; return unsubscribeWrapper; } // Reducer initial state creation for our update reducer var initStateUpdates = function initStateUpdates() { return EMPTY_ARRAY; }; function strictEqual(a, b) { return a === b; } /** * Infers the type of props that a connector will inject into a component. */ var hasWarnedAboutDeprecatedPureOption = false; /** * Connects a React component to a Redux store. * * - Without arguments, just wraps the component, without changing the behavior / props * * - If 2 params are passed (3rd param, mergeProps, is skipped), default behavior * is to override ownProps (as stated in the docs), so what remains is everything that's * not a state or dispatch prop * * - When 3rd param is passed, we don't know if ownProps propagate and whether they * should be valid component props, because it depends on mergeProps implementation. * As such, it is the user's responsibility to extend ownProps interface from state or * dispatch props or both when applicable * * @param mapStateToProps A function that extracts values from state * @param mapDispatchToProps Setup for dispatching actions * @param mergeProps Optional callback to merge state and dispatch props together * @param options Options for configuring the connection * */ function connect(mapStateToProps, mapDispatchToProps, mergeProps) { var _ref = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}, pure = _ref.pure, _ref$areStatesEqual = _ref.areStatesEqual, areStatesEqual = _ref$areStatesEqual === void 0 ? strictEqual : _ref$areStatesEqual, _ref$areOwnPropsEqual = _ref.areOwnPropsEqual, areOwnPropsEqual = _ref$areOwnPropsEqual === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_11__["default"] : _ref$areOwnPropsEqual, _ref$areStatePropsEqu = _ref.areStatePropsEqual, areStatePropsEqual = _ref$areStatePropsEqu === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_11__["default"] : _ref$areStatePropsEqu, _ref$areMergedPropsEq = _ref.areMergedPropsEqual, areMergedPropsEqual = _ref$areMergedPropsEq === void 0 ? _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_11__["default"] : _ref$areMergedPropsEq, _ref$forwardRef = _ref.forwardRef, forwardRef = _ref$forwardRef === void 0 ? false : _ref$forwardRef, _ref$context = _ref.context, context = _ref$context === void 0 ? _Context__WEBPACK_IMPORTED_MODULE_13__.ReactReduxContext : _ref$context; if (true) { if (pure !== undefined && !hasWarnedAboutDeprecatedPureOption) { hasWarnedAboutDeprecatedPureOption = true; (0,_utils_warning__WEBPACK_IMPORTED_MODULE_12__["default"])('The `pure` option has been removed. `connect` is now always a "pure/memoized" component'); } } var Context = context; var initMapStateToProps = (0,_connect_mapStateToProps__WEBPACK_IMPORTED_MODULE_7__.mapStateToPropsFactory)(mapStateToProps); var initMapDispatchToProps = (0,_connect_mapDispatchToProps__WEBPACK_IMPORTED_MODULE_6__.mapDispatchToPropsFactory)(mapDispatchToProps); var initMergeProps = (0,_connect_mergeProps__WEBPACK_IMPORTED_MODULE_8__.mergePropsFactory)(mergeProps); var shouldHandleStateChanges = Boolean(mapStateToProps); var wrapWithConnect = function wrapWithConnect(WrappedComponent) { if ( true && !(0,react_is__WEBPACK_IMPORTED_MODULE_4__.isValidElementType)(WrappedComponent)) { throw new Error("You must pass a component to the function returned by connect. Instead received ".concat(stringifyComponent(WrappedComponent))); } var wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || 'Component'; var displayName = "Connect(".concat(wrappedComponentName, ")"); var selectorFactoryOptions = { shouldHandleStateChanges, displayName, wrappedComponentName, WrappedComponent, // @ts-ignore initMapStateToProps, // @ts-ignore initMapDispatchToProps, initMergeProps, areStatesEqual, areStatePropsEqual, areOwnPropsEqual, areMergedPropsEqual }; function ConnectFunction(props) { var _useMemo = (0,react__WEBPACK_IMPORTED_MODULE_3__.useMemo)(function () { // Distinguish between actual "data" props that were passed to the wrapper component, // and values needed to control behavior (forwarded refs, alternate context instances). // To maintain the wrapperProps object reference, memoize this destructuring. var reactReduxForwardedRef = props.reactReduxForwardedRef, wrapperProps = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__["default"])(props, _excluded); return [props.context, reactReduxForwardedRef, wrapperProps]; }, [props]), _useMemo2 = _slicedToArray(_useMemo, 3), propsContext = _useMemo2[0], reactReduxForwardedRef = _useMemo2[1], wrapperProps = _useMemo2[2]; var ContextToUse = (0,react__WEBPACK_IMPORTED_MODULE_3__.useMemo)(function () { // Users may optionally pass in a custom context instance to use instead of our ReactReduxContext. // Memoize the check that determines which context instance we should use. return propsContext && propsContext.Consumer && // @ts-ignore (0,react_is__WEBPACK_IMPORTED_MODULE_4__.isContextConsumer)( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(propsContext.Consumer, null)) ? propsContext : Context; }, [propsContext, Context]); // Retrieve the store and ancestor subscription via context, if available var contextValue = (0,react__WEBPACK_IMPORTED_MODULE_3__.useContext)(ContextToUse); // The store _must_ exist as either a prop or in context. // We'll check to see if it _looks_ like a Redux store first. // This allows us to pass through a `store` prop that is just a plain value. var didStoreComeFromProps = Boolean(props.store) && Boolean(props.store.getState) && Boolean(props.store.dispatch); var didStoreComeFromContext = Boolean(contextValue) && Boolean(contextValue.store); if ( true && !didStoreComeFromProps && !didStoreComeFromContext) { throw new Error("Could not find \"store\" in the context of " + "\"".concat(displayName, "\". Either wrap the root component in a , ") + "or pass a custom React context provider to and the corresponding " + "React context consumer to ".concat(displayName, " in connect options.")); } // Based on the previous check, one of these must be true var store = didStoreComeFromProps ? props.store : contextValue.store; var getServerState = didStoreComeFromContext ? contextValue.getServerState : store.getState; var childPropsSelector = (0,react__WEBPACK_IMPORTED_MODULE_3__.useMemo)(function () { // The child props selector needs the store reference as an input. // Re-create this selector whenever the store changes. return (0,_connect_selectorFactory__WEBPACK_IMPORTED_MODULE_5__["default"])(store.dispatch, selectorFactoryOptions); }, [store]); var _useMemo3 = (0,react__WEBPACK_IMPORTED_MODULE_3__.useMemo)(function () { if (!shouldHandleStateChanges) return NO_SUBSCRIPTION_ARRAY; // This Subscription's source should match where store came from: props vs. context. A component // connected to the store via props shouldn't use subscription from context, or vice versa. var subscription = (0,_utils_Subscription__WEBPACK_IMPORTED_MODULE_9__.createSubscription)(store, didStoreComeFromProps ? undefined : contextValue.subscription); // `notifyNestedSubs` is duplicated to handle the case where the component is unmounted in // the middle of the notification loop, where `subscription` will then be null. This can // probably be avoided if Subscription's listeners logic is changed to not call listeners // that have been unsubscribed in the middle of the notification loop. var notifyNestedSubs = subscription.notifyNestedSubs.bind(subscription); return [subscription, notifyNestedSubs]; }, [store, didStoreComeFromProps, contextValue]), _useMemo4 = _slicedToArray(_useMemo3, 2), subscription = _useMemo4[0], notifyNestedSubs = _useMemo4[1]; // Determine what {store, subscription} value should be put into nested context, if necessary, // and memoize that value to avoid unnecessary context updates. var overriddenContextValue = (0,react__WEBPACK_IMPORTED_MODULE_3__.useMemo)(function () { if (didStoreComeFromProps) { // This component is directly subscribed to a store from props. // We don't want descendants reading from this store - pass down whatever // the existing context value is from the nearest connected ancestor. return contextValue; } // Otherwise, put this component's subscription instance into context, so that // connected descendants won't update until after this component is done return (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, contextValue, { subscription }); }, [didStoreComeFromProps, contextValue, subscription]); // Set up refs to coordinate values between the subscription effect and the render logic var lastChildProps = (0,react__WEBPACK_IMPORTED_MODULE_3__.useRef)(); var lastWrapperProps = (0,react__WEBPACK_IMPORTED_MODULE_3__.useRef)(wrapperProps); var childPropsFromStoreUpdate = (0,react__WEBPACK_IMPORTED_MODULE_3__.useRef)(); var renderIsScheduled = (0,react__WEBPACK_IMPORTED_MODULE_3__.useRef)(false); var isProcessingDispatch = (0,react__WEBPACK_IMPORTED_MODULE_3__.useRef)(false); var isMounted = (0,react__WEBPACK_IMPORTED_MODULE_3__.useRef)(false); var latestSubscriptionCallbackError = (0,react__WEBPACK_IMPORTED_MODULE_3__.useRef)(); (0,_utils_useIsomorphicLayoutEffect__WEBPACK_IMPORTED_MODULE_10__.useIsomorphicLayoutEffect)(function () { isMounted.current = true; return function () { isMounted.current = false; }; }, []); var actualChildPropsSelector = (0,react__WEBPACK_IMPORTED_MODULE_3__.useMemo)(function () { var selector = function selector() { // Tricky logic here: // - This render may have been triggered by a Redux store update that produced new child props // - However, we may have gotten new wrapper props after that // If we have new child props, and the same wrapper props, we know we should use the new child props as-is. // But, if we have new wrapper props, those might change the child props, so we have to recalculate things. // So, we'll use the child props from store update only if the wrapper props are the same as last time. if (childPropsFromStoreUpdate.current && wrapperProps === lastWrapperProps.current) { return childPropsFromStoreUpdate.current; } // TODO We're reading the store directly in render() here. Bad idea? // This will likely cause Bad Things (TM) to happen in Concurrent Mode. // Note that we do this because on renders _not_ caused by store updates, we need the latest store state // to determine what the child props should be. return childPropsSelector(store.getState(), wrapperProps); }; return selector; }, [store, wrapperProps]); // We need this to execute synchronously every time we re-render. However, React warns // about useLayoutEffect in SSR, so we try to detect environment and fall back to // just useEffect instead to avoid the warning, since neither will run anyway. var subscribeForReact = (0,react__WEBPACK_IMPORTED_MODULE_3__.useMemo)(function () { var subscribe = function subscribe(reactListener) { if (!subscription) { return function () {}; } return subscribeUpdates(shouldHandleStateChanges, store, subscription, // @ts-ignore childPropsSelector, lastWrapperProps, lastChildProps, renderIsScheduled, isMounted, childPropsFromStoreUpdate, notifyNestedSubs, reactListener); }; return subscribe; }, [subscription]); useIsomorphicLayoutEffectWithArgs(captureWrapperProps, [lastWrapperProps, lastChildProps, renderIsScheduled, wrapperProps, childPropsFromStoreUpdate, notifyNestedSubs]); var actualChildProps; try { actualChildProps = useSyncExternalStore( // TODO We're passing through a big wrapper that does a bunch of extra side effects besides subscribing subscribeForReact, // TODO This is incredibly hacky. We've already processed the store update and calculated new child props, // TODO and we're just passing that through so it triggers a re-render for us rather than relying on `uSES`. actualChildPropsSelector, getServerState ? function () { return childPropsSelector(getServerState(), wrapperProps); } : actualChildPropsSelector); } catch (err) { if (latestSubscriptionCallbackError.current) { ; err.message += "\nThe error may be correlated with this previous error:\n".concat(latestSubscriptionCallbackError.current.stack, "\n\n"); } throw err; } (0,_utils_useIsomorphicLayoutEffect__WEBPACK_IMPORTED_MODULE_10__.useIsomorphicLayoutEffect)(function () { latestSubscriptionCallbackError.current = undefined; childPropsFromStoreUpdate.current = undefined; lastChildProps.current = actualChildProps; }); // Now that all that's done, we can finally try to actually render the child component. // We memoize the elements for the rendered child component as an optimization. var renderedWrappedComponent = (0,react__WEBPACK_IMPORTED_MODULE_3__.useMemo)(function () { return /*#__PURE__*/( // @ts-ignore react__WEBPACK_IMPORTED_MODULE_3___default().createElement(WrappedComponent, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, actualChildProps, { ref: reactReduxForwardedRef })) ); }, [reactReduxForwardedRef, WrappedComponent, actualChildProps]); // If React sees the exact same element reference as last time, it bails out of re-rendering // that child, same as if it was wrapped in React.memo() or returned false from shouldComponentUpdate. var renderedChild = (0,react__WEBPACK_IMPORTED_MODULE_3__.useMemo)(function () { if (shouldHandleStateChanges) { // If this component is subscribed to store updates, we need to pass its own // subscription instance down to our descendants. That means rendering the same // Context instance, and putting a different value into the context. return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(ContextToUse.Provider, { value: overriddenContextValue }, renderedWrappedComponent); } return renderedWrappedComponent; }, [ContextToUse, renderedWrappedComponent, overriddenContextValue]); return renderedChild; } var _Connect = react__WEBPACK_IMPORTED_MODULE_3___default().memo(ConnectFunction); // Add a hacky cast to get the right output type var Connect = _Connect; Connect.WrappedComponent = WrappedComponent; Connect.displayName = ConnectFunction.displayName = displayName; if (forwardRef) { var _forwarded = react__WEBPACK_IMPORTED_MODULE_3___default().forwardRef(function forwardConnectRef(props, ref) { // @ts-ignore return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(Connect, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, props, { reactReduxForwardedRef: ref })); }); var forwarded = _forwarded; forwarded.displayName = displayName; forwarded.WrappedComponent = WrappedComponent; return hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_2___default()(forwarded, WrappedComponent); } return hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_2___default()(Connect, WrappedComponent); }; return wrapWithConnect; } /* harmony default export */ __webpack_exports__["default"] = (connect); /***/ }), /***/ "./node_modules/react-redux/es/connect/invalidArgFactory.js": /*!******************************************************************!*\ !*** ./node_modules/react-redux/es/connect/invalidArgFactory.js ***! \******************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ createInvalidArgFactory: function() { return /* binding */ createInvalidArgFactory; } /* harmony export */ }); function createInvalidArgFactory(arg, name) { return function (dispatch, options) { throw new Error("Invalid value of type ".concat(typeof arg, " for ").concat(name, " argument when connecting component ").concat(options.wrappedComponentName, ".")); }; } /***/ }), /***/ "./node_modules/react-redux/es/connect/mapDispatchToProps.js": /*!*******************************************************************!*\ !*** ./node_modules/react-redux/es/connect/mapDispatchToProps.js ***! \*******************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ mapDispatchToPropsFactory: function() { return /* binding */ mapDispatchToPropsFactory; } /* harmony export */ }); /* harmony import */ var _utils_bindActionCreators__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/bindActionCreators */ "./node_modules/react-redux/es/utils/bindActionCreators.js"); /* harmony import */ var _wrapMapToProps__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./wrapMapToProps */ "./node_modules/react-redux/es/connect/wrapMapToProps.js"); /* harmony import */ var _invalidArgFactory__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./invalidArgFactory */ "./node_modules/react-redux/es/connect/invalidArgFactory.js"); function mapDispatchToPropsFactory(mapDispatchToProps) { return mapDispatchToProps && typeof mapDispatchToProps === 'object' ? (0,_wrapMapToProps__WEBPACK_IMPORTED_MODULE_1__.wrapMapToPropsConstant)(function (dispatch) { return ( // @ts-ignore (0,_utils_bindActionCreators__WEBPACK_IMPORTED_MODULE_0__["default"])(mapDispatchToProps, dispatch) ); }) : !mapDispatchToProps ? (0,_wrapMapToProps__WEBPACK_IMPORTED_MODULE_1__.wrapMapToPropsConstant)(function (dispatch) { return { dispatch }; }) : typeof mapDispatchToProps === 'function' ? // @ts-ignore (0,_wrapMapToProps__WEBPACK_IMPORTED_MODULE_1__.wrapMapToPropsFunc)(mapDispatchToProps, 'mapDispatchToProps') : (0,_invalidArgFactory__WEBPACK_IMPORTED_MODULE_2__.createInvalidArgFactory)(mapDispatchToProps, 'mapDispatchToProps'); } /***/ }), /***/ "./node_modules/react-redux/es/connect/mapStateToProps.js": /*!****************************************************************!*\ !*** ./node_modules/react-redux/es/connect/mapStateToProps.js ***! \****************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ mapStateToPropsFactory: function() { return /* binding */ mapStateToPropsFactory; } /* harmony export */ }); /* harmony import */ var _wrapMapToProps__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./wrapMapToProps */ "./node_modules/react-redux/es/connect/wrapMapToProps.js"); /* harmony import */ var _invalidArgFactory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./invalidArgFactory */ "./node_modules/react-redux/es/connect/invalidArgFactory.js"); function mapStateToPropsFactory(mapStateToProps) { return !mapStateToProps ? (0,_wrapMapToProps__WEBPACK_IMPORTED_MODULE_0__.wrapMapToPropsConstant)(function () { return {}; }) : typeof mapStateToProps === 'function' ? // @ts-ignore (0,_wrapMapToProps__WEBPACK_IMPORTED_MODULE_0__.wrapMapToPropsFunc)(mapStateToProps, 'mapStateToProps') : (0,_invalidArgFactory__WEBPACK_IMPORTED_MODULE_1__.createInvalidArgFactory)(mapStateToProps, 'mapStateToProps'); } /***/ }), /***/ "./node_modules/react-redux/es/connect/mergeProps.js": /*!***********************************************************!*\ !*** ./node_modules/react-redux/es/connect/mergeProps.js ***! \***********************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ defaultMergeProps: function() { return /* binding */ defaultMergeProps; }, /* harmony export */ mergePropsFactory: function() { return /* binding */ mergePropsFactory; }, /* harmony export */ wrapMergePropsFunc: function() { return /* binding */ wrapMergePropsFunc; } /* harmony export */ }); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/verifyPlainObject */ "./node_modules/react-redux/es/utils/verifyPlainObject.js"); /* harmony import */ var _invalidArgFactory__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./invalidArgFactory */ "./node_modules/react-redux/es/connect/invalidArgFactory.js"); function defaultMergeProps(stateProps, dispatchProps, ownProps) { // @ts-ignore return (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, ownProps, stateProps, dispatchProps); } function wrapMergePropsFunc(mergeProps) { return function initMergePropsProxy(dispatch, _ref) { var displayName = _ref.displayName, areMergedPropsEqual = _ref.areMergedPropsEqual; var hasRunOnce = false; var mergedProps; return function mergePropsProxy(stateProps, dispatchProps, ownProps) { var nextMergedProps = mergeProps(stateProps, dispatchProps, ownProps); if (hasRunOnce) { if (!areMergedPropsEqual(nextMergedProps, mergedProps)) mergedProps = nextMergedProps; } else { hasRunOnce = true; mergedProps = nextMergedProps; if (true) (0,_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_1__["default"])(mergedProps, displayName, 'mergeProps'); } return mergedProps; }; }; } function mergePropsFactory(mergeProps) { return !mergeProps ? function () { return defaultMergeProps; } : typeof mergeProps === 'function' ? wrapMergePropsFunc(mergeProps) : (0,_invalidArgFactory__WEBPACK_IMPORTED_MODULE_2__.createInvalidArgFactory)(mergeProps, 'mergeProps'); } /***/ }), /***/ "./node_modules/react-redux/es/connect/selectorFactory.js": /*!****************************************************************!*\ !*** ./node_modules/react-redux/es/connect/selectorFactory.js ***! \****************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ finalPropsSelectorFactory; }, /* harmony export */ pureFinalPropsSelectorFactory: function() { return /* binding */ pureFinalPropsSelectorFactory; } /* harmony export */ }); /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ "./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js"); /* harmony import */ var _verifySubselectors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./verifySubselectors */ "./node_modules/react-redux/es/connect/verifySubselectors.js"); var _excluded = ["initMapStateToProps", "initMapDispatchToProps", "initMergeProps"]; function pureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, _ref2) { var areStatesEqual = _ref2.areStatesEqual, areOwnPropsEqual = _ref2.areOwnPropsEqual, areStatePropsEqual = _ref2.areStatePropsEqual; var hasRunAtLeastOnce = false; var state; var ownProps; var stateProps; var dispatchProps; var mergedProps; function handleFirstCall(firstState, firstOwnProps) { state = firstState; ownProps = firstOwnProps; stateProps = mapStateToProps(state, ownProps); dispatchProps = mapDispatchToProps(dispatch, ownProps); mergedProps = mergeProps(stateProps, dispatchProps, ownProps); hasRunAtLeastOnce = true; return mergedProps; } function handleNewPropsAndNewState() { stateProps = mapStateToProps(state, ownProps); if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps); mergedProps = mergeProps(stateProps, dispatchProps, ownProps); return mergedProps; } function handleNewProps() { if (mapStateToProps.dependsOnOwnProps) stateProps = mapStateToProps(state, ownProps); if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps); mergedProps = mergeProps(stateProps, dispatchProps, ownProps); return mergedProps; } function handleNewState() { var nextStateProps = mapStateToProps(state, ownProps); var statePropsChanged = !areStatePropsEqual(nextStateProps, stateProps); stateProps = nextStateProps; if (statePropsChanged) mergedProps = mergeProps(stateProps, dispatchProps, ownProps); return mergedProps; } function handleSubsequentCalls(nextState, nextOwnProps) { var propsChanged = !areOwnPropsEqual(nextOwnProps, ownProps); var stateChanged = !areStatesEqual(nextState, state, nextOwnProps, ownProps); state = nextState; ownProps = nextOwnProps; if (propsChanged && stateChanged) return handleNewPropsAndNewState(); if (propsChanged) return handleNewProps(); if (stateChanged) return handleNewState(); return mergedProps; } return function pureFinalPropsSelector(nextState, nextOwnProps) { return hasRunAtLeastOnce ? handleSubsequentCalls(nextState, nextOwnProps) : handleFirstCall(nextState, nextOwnProps); }; } // TODO: Add more comments // The selector returned by selectorFactory will memoize its results, // allowing connect's shouldComponentUpdate to return false if final // props have not changed. function finalPropsSelectorFactory(dispatch, _ref) { var initMapStateToProps = _ref.initMapStateToProps, initMapDispatchToProps = _ref.initMapDispatchToProps, initMergeProps = _ref.initMergeProps, options = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__["default"])(_ref, _excluded); var mapStateToProps = initMapStateToProps(dispatch, options); var mapDispatchToProps = initMapDispatchToProps(dispatch, options); var mergeProps = initMergeProps(dispatch, options); if (true) { (0,_verifySubselectors__WEBPACK_IMPORTED_MODULE_1__["default"])(mapStateToProps, mapDispatchToProps, mergeProps); } return pureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options); } /***/ }), /***/ "./node_modules/react-redux/es/connect/verifySubselectors.js": /*!*******************************************************************!*\ !*** ./node_modules/react-redux/es/connect/verifySubselectors.js ***! \*******************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ verifySubselectors; } /* harmony export */ }); /* harmony import */ var _utils_warning__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/warning */ "./node_modules/react-redux/es/utils/warning.js"); function verify(selector, methodName) { if (!selector) { throw new Error("Unexpected value for ".concat(methodName, " in connect.")); } else if (methodName === 'mapStateToProps' || methodName === 'mapDispatchToProps') { if (!Object.prototype.hasOwnProperty.call(selector, 'dependsOnOwnProps')) { (0,_utils_warning__WEBPACK_IMPORTED_MODULE_0__["default"])("The selector for ".concat(methodName, " of connect did not specify a value for dependsOnOwnProps.")); } } } function verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps) { verify(mapStateToProps, 'mapStateToProps'); verify(mapDispatchToProps, 'mapDispatchToProps'); verify(mergeProps, 'mergeProps'); } /***/ }), /***/ "./node_modules/react-redux/es/connect/wrapMapToProps.js": /*!***************************************************************!*\ !*** ./node_modules/react-redux/es/connect/wrapMapToProps.js ***! \***************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ getDependsOnOwnProps: function() { return /* binding */ getDependsOnOwnProps; }, /* harmony export */ wrapMapToPropsConstant: function() { return /* binding */ wrapMapToPropsConstant; }, /* harmony export */ wrapMapToPropsFunc: function() { return /* binding */ wrapMapToPropsFunc; } /* harmony export */ }); /* harmony import */ var _utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/verifyPlainObject */ "./node_modules/react-redux/es/utils/verifyPlainObject.js"); function wrapMapToPropsConstant( // * Note: // It seems that the dispatch argument // could be a dispatch function in some cases (ex: whenMapDispatchToPropsIsMissing) // and a state object in some others (ex: whenMapStateToPropsIsMissing) // eslint-disable-next-line no-unused-vars getConstant) { return function initConstantSelector(dispatch) { var constant = getConstant(dispatch); function constantSelector() { return constant; } constantSelector.dependsOnOwnProps = false; return constantSelector; }; } // dependsOnOwnProps is used by createMapToPropsProxy to determine whether to pass props as args // to the mapToProps function being wrapped. It is also used by makePurePropsSelector to determine // whether mapToProps needs to be invoked when props have changed. // // A length of one signals that mapToProps does not depend on props from the parent component. // A length of zero is assumed to mean mapToProps is getting args via arguments or ...args and // therefore not reporting its length accurately.. // TODO Can this get pulled out so that we can subscribe directly to the store if we don't need ownProps? function getDependsOnOwnProps(mapToProps) { return mapToProps.dependsOnOwnProps ? Boolean(mapToProps.dependsOnOwnProps) : mapToProps.length !== 1; } // Used by whenMapStateToPropsIsFunction and whenMapDispatchToPropsIsFunction, // this function wraps mapToProps in a proxy function which does several things: // // * Detects whether the mapToProps function being called depends on props, which // is used by selectorFactory to decide if it should reinvoke on props changes. // // * On first call, handles mapToProps if returns another function, and treats that // new function as the true mapToProps for subsequent calls. // // * On first call, verifies the first result is a plain object, in order to warn // the developer that their mapToProps function is not returning a valid result. // function wrapMapToPropsFunc(mapToProps, methodName) { return function initProxySelector(dispatch, _ref) { var displayName = _ref.displayName; var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) { return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch, undefined); }; // allow detectFactoryAndVerify to get ownProps proxy.dependsOnOwnProps = true; proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) { proxy.mapToProps = mapToProps; proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps); var props = proxy(stateOrDispatch, ownProps); if (typeof props === 'function') { proxy.mapToProps = props; proxy.dependsOnOwnProps = getDependsOnOwnProps(props); props = proxy(stateOrDispatch, ownProps); } if (true) (0,_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__["default"])(props, displayName, methodName); return props; }; return proxy; }; } /***/ }), /***/ "./node_modules/react-redux/es/exports.js": /*!************************************************!*\ !*** ./node_modules/react-redux/es/exports.js ***! \************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Provider: function() { return /* reexport safe */ _components_Provider__WEBPACK_IMPORTED_MODULE_0__["default"]; }, /* harmony export */ ReactReduxContext: function() { return /* reexport safe */ _components_Context__WEBPACK_IMPORTED_MODULE_2__.ReactReduxContext; }, /* harmony export */ connect: function() { return /* reexport safe */ _components_connect__WEBPACK_IMPORTED_MODULE_1__["default"]; }, /* harmony export */ createDispatchHook: function() { return /* reexport safe */ _hooks_useDispatch__WEBPACK_IMPORTED_MODULE_3__.createDispatchHook; }, /* harmony export */ createSelectorHook: function() { return /* reexport safe */ _hooks_useSelector__WEBPACK_IMPORTED_MODULE_4__.createSelectorHook; }, /* harmony export */ createStoreHook: function() { return /* reexport safe */ _hooks_useStore__WEBPACK_IMPORTED_MODULE_5__.createStoreHook; }, /* harmony export */ shallowEqual: function() { return /* reexport safe */ _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_6__["default"]; }, /* harmony export */ useDispatch: function() { return /* reexport safe */ _hooks_useDispatch__WEBPACK_IMPORTED_MODULE_3__.useDispatch; }, /* harmony export */ useSelector: function() { return /* reexport safe */ _hooks_useSelector__WEBPACK_IMPORTED_MODULE_4__.useSelector; }, /* harmony export */ useStore: function() { return /* reexport safe */ _hooks_useStore__WEBPACK_IMPORTED_MODULE_5__.useStore; } /* harmony export */ }); /* harmony import */ var _components_Provider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./components/Provider */ "./node_modules/react-redux/es/components/Provider.js"); /* harmony import */ var _components_connect__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./components/connect */ "./node_modules/react-redux/es/components/connect.js"); /* harmony import */ var _components_Context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./components/Context */ "./node_modules/react-redux/es/components/Context.js"); /* harmony import */ var _hooks_useDispatch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./hooks/useDispatch */ "./node_modules/react-redux/es/hooks/useDispatch.js"); /* harmony import */ var _hooks_useSelector__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./hooks/useSelector */ "./node_modules/react-redux/es/hooks/useSelector.js"); /* harmony import */ var _hooks_useStore__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./hooks/useStore */ "./node_modules/react-redux/es/hooks/useStore.js"); /* harmony import */ var _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/shallowEqual */ "./node_modules/react-redux/es/utils/shallowEqual.js"); /* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./types */ "./node_modules/react-redux/es/types.js"); /***/ }), /***/ "./node_modules/react-redux/es/hooks/useDispatch.js": /*!**********************************************************!*\ !*** ./node_modules/react-redux/es/hooks/useDispatch.js ***! \**********************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ createDispatchHook: function() { return /* binding */ createDispatchHook; }, /* harmony export */ useDispatch: function() { return /* binding */ useDispatch; } /* harmony export */ }); /* harmony import */ var _components_Context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../components/Context */ "./node_modules/react-redux/es/components/Context.js"); /* harmony import */ var _useStore__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./useStore */ "./node_modules/react-redux/es/hooks/useStore.js"); /** * Hook factory, which creates a `useDispatch` hook bound to a given context. * * @param {React.Context} [context=ReactReduxContext] Context passed to your ``. * @returns {Function} A `useDispatch` hook bound to the specified context. */ function createDispatchHook() { var context = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _components_Context__WEBPACK_IMPORTED_MODULE_0__.ReactReduxContext; var useStore = // @ts-ignore context === _components_Context__WEBPACK_IMPORTED_MODULE_0__.ReactReduxContext ? _useStore__WEBPACK_IMPORTED_MODULE_1__.useStore : (0,_useStore__WEBPACK_IMPORTED_MODULE_1__.createStoreHook)(context); return function useDispatch() { var store = useStore(); // @ts-ignore return store.dispatch; }; } /** * A hook to access the redux `dispatch` function. * * @returns {any|function} redux store's `dispatch` function * * @example * * import React, { useCallback } from 'react' * import { useDispatch } from 'react-redux' * * export const CounterComponent = ({ value }) => { * const dispatch = useDispatch() * const increaseCounter = useCallback(() => dispatch({ type: 'increase-counter' }), []) * return ( *
* {value} * *
* ) * } */ var useDispatch = /*#__PURE__*/createDispatchHook(); /***/ }), /***/ "./node_modules/react-redux/es/hooks/useReduxContext.js": /*!**************************************************************!*\ !*** ./node_modules/react-redux/es/hooks/useReduxContext.js ***! \**************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ useReduxContext: function() { return /* binding */ useReduxContext; } /* harmony export */ }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _components_Context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../components/Context */ "./node_modules/react-redux/es/components/Context.js"); /** * A hook to access the value of the `ReactReduxContext`. This is a low-level * hook that you should usually not need to call directly. * * @returns {any} the value of the `ReactReduxContext` * * @example * * import React from 'react' * import { useReduxContext } from 'react-redux' * * export const CounterComponent = () => { * const { store } = useReduxContext() * return
{store.getState()}
* } */ function useReduxContext() { var contextValue = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_components_Context__WEBPACK_IMPORTED_MODULE_1__.ReactReduxContext); if ( true && !contextValue) { throw new Error('could not find react-redux context value; please ensure the component is wrapped in a '); } return contextValue; } /***/ }), /***/ "./node_modules/react-redux/es/hooks/useSelector.js": /*!**********************************************************!*\ !*** ./node_modules/react-redux/es/hooks/useSelector.js ***! \**********************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ createSelectorHook: function() { return /* binding */ createSelectorHook; }, /* harmony export */ initializeUseSelector: function() { return /* binding */ initializeUseSelector; }, /* harmony export */ useSelector: function() { return /* binding */ useSelector; } /* harmony export */ }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _useReduxContext__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./useReduxContext */ "./node_modules/react-redux/es/hooks/useReduxContext.js"); /* harmony import */ var _components_Context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../components/Context */ "./node_modules/react-redux/es/components/Context.js"); /* harmony import */ var _utils_useSyncExternalStore__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/useSyncExternalStore */ "./node_modules/react-redux/es/utils/useSyncExternalStore.js"); var useSyncExternalStoreWithSelector = _utils_useSyncExternalStore__WEBPACK_IMPORTED_MODULE_3__.notInitialized; var initializeUseSelector = function initializeUseSelector(fn) { useSyncExternalStoreWithSelector = fn; }; var refEquality = function refEquality(a, b) { return a === b; }; /** * Hook factory, which creates a `useSelector` hook bound to a given context. * * @param {React.Context} [context=ReactReduxContext] Context passed to your ``. * @returns {Function} A `useSelector` hook bound to the specified context. */ function createSelectorHook() { var context = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _components_Context__WEBPACK_IMPORTED_MODULE_2__.ReactReduxContext; var useReduxContext = context === _components_Context__WEBPACK_IMPORTED_MODULE_2__.ReactReduxContext ? _useReduxContext__WEBPACK_IMPORTED_MODULE_1__.useReduxContext : function () { return (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(context); }; return function useSelector(selector) { var equalityFn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : refEquality; if (true) { if (!selector) { throw new Error("You must pass a selector to useSelector"); } if (typeof selector !== 'function') { throw new Error("You must pass a function as a selector to useSelector"); } if (typeof equalityFn !== 'function') { throw new Error("You must pass a function as an equality function to useSelector"); } } var _useReduxContext = useReduxContext(), store = _useReduxContext.store, subscription = _useReduxContext.subscription, getServerState = _useReduxContext.getServerState; var selectedState = useSyncExternalStoreWithSelector(subscription.addNestedSub, store.getState, getServerState || store.getState, selector, equalityFn); (0,react__WEBPACK_IMPORTED_MODULE_0__.useDebugValue)(selectedState); return selectedState; }; } /** * A hook to access the redux store's state. This hook takes a selector function * as an argument. The selector is called with the store state. * * This hook takes an optional equality comparison function as the second parameter * that allows you to customize the way the selected state is compared to determine * whether the component needs to be re-rendered. * * @param {Function} selector the selector function * @param {Function=} equalityFn the function that will be used to determine equality * * @returns {any} the selected state * * @example * * import React from 'react' * import { useSelector } from 'react-redux' * * export const CounterComponent = () => { * const counter = useSelector(state => state.counter) * return
{counter}
* } */ var useSelector = /*#__PURE__*/createSelectorHook(); /***/ }), /***/ "./node_modules/react-redux/es/hooks/useStore.js": /*!*******************************************************!*\ !*** ./node_modules/react-redux/es/hooks/useStore.js ***! \*******************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ createStoreHook: function() { return /* binding */ createStoreHook; }, /* harmony export */ useStore: function() { return /* binding */ useStore; } /* harmony export */ }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _components_Context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../components/Context */ "./node_modules/react-redux/es/components/Context.js"); /* harmony import */ var _useReduxContext__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./useReduxContext */ "./node_modules/react-redux/es/hooks/useReduxContext.js"); /** * Hook factory, which creates a `useStore` hook bound to a given context. * * @param {React.Context} [context=ReactReduxContext] Context passed to your ``. * @returns {Function} A `useStore` hook bound to the specified context. */ function createStoreHook() { var context = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _components_Context__WEBPACK_IMPORTED_MODULE_1__.ReactReduxContext; var useReduxContext = // @ts-ignore context === _components_Context__WEBPACK_IMPORTED_MODULE_1__.ReactReduxContext ? _useReduxContext__WEBPACK_IMPORTED_MODULE_2__.useReduxContext : function () { return (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(context); }; return function useStore() { var _useReduxContext = useReduxContext(), store = _useReduxContext.store; // @ts-ignore return store; }; } /** * A hook to access the redux store. * * @returns {any} the redux store * * @example * * import React from 'react' * import { useStore } from 'react-redux' * * export const ExampleComponent = () => { * const store = useStore() * return
{store.getState()}
* } */ var useStore = /*#__PURE__*/createStoreHook(); /***/ }), /***/ "./node_modules/react-redux/es/index.js": /*!**********************************************!*\ !*** ./node_modules/react-redux/es/index.js ***! \**********************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Provider: function() { return /* reexport safe */ _exports__WEBPACK_IMPORTED_MODULE_6__.Provider; }, /* harmony export */ ReactReduxContext: function() { return /* reexport safe */ _exports__WEBPACK_IMPORTED_MODULE_6__.ReactReduxContext; }, /* harmony export */ batch: function() { return /* reexport safe */ _utils_reactBatchedUpdates__WEBPACK_IMPORTED_MODULE_2__.unstable_batchedUpdates; }, /* harmony export */ connect: function() { return /* reexport safe */ _exports__WEBPACK_IMPORTED_MODULE_6__.connect; }, /* harmony export */ createDispatchHook: function() { return /* reexport safe */ _exports__WEBPACK_IMPORTED_MODULE_6__.createDispatchHook; }, /* harmony export */ createSelectorHook: function() { return /* reexport safe */ _exports__WEBPACK_IMPORTED_MODULE_6__.createSelectorHook; }, /* harmony export */ createStoreHook: function() { return /* reexport safe */ _exports__WEBPACK_IMPORTED_MODULE_6__.createStoreHook; }, /* harmony export */ shallowEqual: function() { return /* reexport safe */ _exports__WEBPACK_IMPORTED_MODULE_6__.shallowEqual; }, /* harmony export */ useDispatch: function() { return /* reexport safe */ _exports__WEBPACK_IMPORTED_MODULE_6__.useDispatch; }, /* harmony export */ useSelector: function() { return /* reexport safe */ _exports__WEBPACK_IMPORTED_MODULE_6__.useSelector; }, /* harmony export */ useStore: function() { return /* reexport safe */ _exports__WEBPACK_IMPORTED_MODULE_6__.useStore; } /* harmony export */ }); /* harmony import */ var use_sync_external_store_shim__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! use-sync-external-store/shim */ "./node_modules/use-sync-external-store/shim/index.js"); /* harmony import */ var use_sync_external_store_shim_with_selector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! use-sync-external-store/shim/with-selector */ "./node_modules/use-sync-external-store/shim/with-selector.js"); /* harmony import */ var _utils_reactBatchedUpdates__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/reactBatchedUpdates */ "./node_modules/react-redux/es/utils/reactBatchedUpdates.js"); /* harmony import */ var _utils_batch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/batch */ "./node_modules/react-redux/es/utils/batch.js"); /* harmony import */ var _hooks_useSelector__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./hooks/useSelector */ "./node_modules/react-redux/es/hooks/useSelector.js"); /* harmony import */ var _components_connect__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./components/connect */ "./node_modules/react-redux/es/components/connect.js"); /* harmony import */ var _exports__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./exports */ "./node_modules/react-redux/es/exports.js"); // The primary entry point assumes we're working with standard ReactDOM/RN, but // older versions that do not include `useSyncExternalStore` (React 16.9 - 17.x). // Because of that, the useSyncExternalStore compat shim is needed. (0,_hooks_useSelector__WEBPACK_IMPORTED_MODULE_4__.initializeUseSelector)(use_sync_external_store_shim_with_selector__WEBPACK_IMPORTED_MODULE_1__.useSyncExternalStoreWithSelector); (0,_components_connect__WEBPACK_IMPORTED_MODULE_5__.initializeConnect)(use_sync_external_store_shim__WEBPACK_IMPORTED_MODULE_0__.useSyncExternalStore); // Enable batched updates in our subscriptions for use // with standard React renderers (ReactDOM, React Native) (0,_utils_batch__WEBPACK_IMPORTED_MODULE_3__.setBatch)(_utils_reactBatchedUpdates__WEBPACK_IMPORTED_MODULE_2__.unstable_batchedUpdates); /***/ }), /***/ "./node_modules/react-redux/es/types.js": /*!**********************************************!*\ !*** ./node_modules/react-redux/es/types.js ***! \**********************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /***/ }), /***/ "./node_modules/react-redux/es/utils/Subscription.js": /*!***********************************************************!*\ !*** ./node_modules/react-redux/es/utils/Subscription.js ***! \***********************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ createSubscription: function() { return /* binding */ createSubscription; } /* harmony export */ }); /* harmony import */ var _batch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./batch */ "./node_modules/react-redux/es/utils/batch.js"); // encapsulates the subscription logic for connecting a component to the redux store, as // well as nesting subscriptions of descendant components, so that we can ensure the // ancestor components re-render before descendants function createListenerCollection() { var batch = (0,_batch__WEBPACK_IMPORTED_MODULE_0__.getBatch)(); var first = null; var last = null; return { clear() { first = null; last = null; }, notify() { batch(function () { var listener = first; while (listener) { listener.callback(); listener = listener.next; } }); }, get() { var listeners = []; var listener = first; while (listener) { listeners.push(listener); listener = listener.next; } return listeners; }, subscribe(callback) { var isSubscribed = true; var listener = last = { callback, next: null, prev: last }; if (listener.prev) { listener.prev.next = listener; } else { first = listener; } return function unsubscribe() { if (!isSubscribed || first === null) return; isSubscribed = false; if (listener.next) { listener.next.prev = listener.prev; } else { last = listener.prev; } if (listener.prev) { listener.prev.next = listener.next; } else { first = listener.next; } }; } }; } var nullListeners = { notify() {}, get: function get() { return []; } }; function createSubscription(store, parentSub) { var unsubscribe; var listeners = nullListeners; function addNestedSub(listener) { trySubscribe(); return listeners.subscribe(listener); } function notifyNestedSubs() { listeners.notify(); } function handleChangeWrapper() { if (subscription.onStateChange) { subscription.onStateChange(); } } function isSubscribed() { return Boolean(unsubscribe); } function trySubscribe() { if (!unsubscribe) { unsubscribe = parentSub ? parentSub.addNestedSub(handleChangeWrapper) : store.subscribe(handleChangeWrapper); listeners = createListenerCollection(); } } function tryUnsubscribe() { if (unsubscribe) { unsubscribe(); unsubscribe = undefined; listeners.clear(); listeners = nullListeners; } } var subscription = { addNestedSub, notifyNestedSubs, handleChangeWrapper, isSubscribed, trySubscribe, tryUnsubscribe, getListeners: function getListeners() { return listeners; } }; return subscription; } /***/ }), /***/ "./node_modules/react-redux/es/utils/batch.js": /*!****************************************************!*\ !*** ./node_modules/react-redux/es/utils/batch.js ***! \****************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ getBatch: function() { return /* binding */ getBatch; }, /* harmony export */ setBatch: function() { return /* binding */ setBatch; } /* harmony export */ }); // Default to a dummy "batch" implementation that just runs the callback function defaultNoopBatch(callback) { callback(); } var batch = defaultNoopBatch; // Allow injecting another batching function later var setBatch = function setBatch(newBatch) { return batch = newBatch; }; // Supply a getter just to skip dealing with ESM bindings var getBatch = function getBatch() { return batch; }; /***/ }), /***/ "./node_modules/react-redux/es/utils/bindActionCreators.js": /*!*****************************************************************!*\ !*** ./node_modules/react-redux/es/utils/bindActionCreators.js ***! \*****************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ bindActionCreators; } /* harmony export */ }); function bindActionCreators(actionCreators, dispatch) { var boundActionCreators = {}; var _loop = function _loop() { var actionCreator = actionCreators[key]; if (typeof actionCreator === 'function') { boundActionCreators[key] = function () { return dispatch(actionCreator.apply(void 0, arguments)); }; } }; for (var key in actionCreators) { _loop(); } return boundActionCreators; } /***/ }), /***/ "./node_modules/react-redux/es/utils/isPlainObject.js": /*!************************************************************!*\ !*** ./node_modules/react-redux/es/utils/isPlainObject.js ***! \************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ isPlainObject; } /* harmony export */ }); /** * @param {any} obj The object to inspect. * @returns {boolean} True if the argument appears to be a plain object. */ function isPlainObject(obj) { if (typeof obj !== 'object' || obj === null) return false; var proto = Object.getPrototypeOf(obj); if (proto === null) return true; var baseProto = proto; while (Object.getPrototypeOf(baseProto) !== null) { baseProto = Object.getPrototypeOf(baseProto); } return proto === baseProto; } /***/ }), /***/ "./node_modules/react-redux/es/utils/reactBatchedUpdates.js": /*!******************************************************************!*\ !*** ./node_modules/react-redux/es/utils/reactBatchedUpdates.js ***! \******************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ unstable_batchedUpdates: function() { return /* reexport safe */ react_dom__WEBPACK_IMPORTED_MODULE_0__.unstable_batchedUpdates; } /* harmony export */ }); /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-dom */ "react-dom"); /* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_0__); /***/ }), /***/ "./node_modules/react-redux/es/utils/shallowEqual.js": /*!***********************************************************!*\ !*** ./node_modules/react-redux/es/utils/shallowEqual.js ***! \***********************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ shallowEqual; } /* harmony export */ }); function is(x, y) { if (x === y) { return x !== 0 || y !== 0 || 1 / x === 1 / y; } else { return x !== x && y !== y; } } function shallowEqual(objA, objB) { if (is(objA, objB)) return true; if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) { return false; } var keysA = Object.keys(objA); var keysB = Object.keys(objB); if (keysA.length !== keysB.length) return false; for (var i = 0; i < keysA.length; i++) { if (!Object.prototype.hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) { return false; } } return true; } /***/ }), /***/ "./node_modules/react-redux/es/utils/useIsomorphicLayoutEffect.js": /*!************************************************************************!*\ !*** ./node_modules/react-redux/es/utils/useIsomorphicLayoutEffect.js ***! \************************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ canUseDOM: function() { return /* binding */ canUseDOM; }, /* harmony export */ useIsomorphicLayoutEffect: function() { return /* binding */ useIsomorphicLayoutEffect; } /* harmony export */ }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); // React currently throws a warning when using useLayoutEffect on the server. // To get around it, we can conditionally useEffect on the server (no-op) and // useLayoutEffect in the browser. We need useLayoutEffect to ensure the store // subscription callback always has the selector from the latest render commit // available, otherwise a store update may happen between render and the effect, // which may cause missed updates; we also must ensure the store subscription // is created synchronously, otherwise a store update may occur before the // subscription is created and an inconsistent state may be observed // Matches logic in React's `shared/ExecutionEnvironment` file var canUseDOM = !!(typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined'); var useIsomorphicLayoutEffect = canUseDOM ? react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect : react__WEBPACK_IMPORTED_MODULE_0__.useEffect; /***/ }), /***/ "./node_modules/react-redux/es/utils/useSyncExternalStore.js": /*!*******************************************************************!*\ !*** ./node_modules/react-redux/es/utils/useSyncExternalStore.js ***! \*******************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ notInitialized: function() { return /* binding */ notInitialized; } /* harmony export */ }); var notInitialized = function notInitialized() { throw new Error('uSES not initialized!'); }; /***/ }), /***/ "./node_modules/react-redux/es/utils/verifyPlainObject.js": /*!****************************************************************!*\ !*** ./node_modules/react-redux/es/utils/verifyPlainObject.js ***! \****************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ verifyPlainObject; } /* harmony export */ }); /* harmony import */ var _isPlainObject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./isPlainObject */ "./node_modules/react-redux/es/utils/isPlainObject.js"); /* harmony import */ var _warning__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./warning */ "./node_modules/react-redux/es/utils/warning.js"); function verifyPlainObject(value, displayName, methodName) { if (!(0,_isPlainObject__WEBPACK_IMPORTED_MODULE_0__["default"])(value)) { (0,_warning__WEBPACK_IMPORTED_MODULE_1__["default"])("".concat(methodName, "() in ").concat(displayName, " must return a plain object. Instead received ").concat(value, ".")); } } /***/ }), /***/ "./node_modules/react-redux/es/utils/warning.js": /*!******************************************************!*\ !*** ./node_modules/react-redux/es/utils/warning.js ***! \******************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ warning; } /* harmony export */ }); /** * Prints a warning in the console if it exists. * * @param {String} message The warning message. * @returns {void} */ function warning(message) { /* eslint-disable no-console */ if (typeof console !== 'undefined' && typeof console.error === 'function') { console.error(message); } /* eslint-enable no-console */ try { // This error was thrown as a convenience so that if you enable // "break on all exceptions" in your console, // it would pause the execution at this line. throw new Error(message); /* eslint-disable no-empty */ } catch (e) {} /* eslint-enable no-empty */ } /***/ }), /***/ "./node_modules/react-redux/node_modules/react-is/cjs/react-is.development.js": /*!************************************************************************************!*\ !*** ./node_modules/react-redux/node_modules/react-is/cjs/react-is.development.js ***! \************************************************************************************/ /***/ (function(__unused_webpack_module, exports) { "use strict"; /** * @license React * react-is.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ if (true) { (function () { 'use strict'; // ATTENTION // When adding new symbols to this file, // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols' // The Symbol used to tag the ReactElement-like types. var REACT_ELEMENT_TYPE = Symbol.for('react.element'); var REACT_PORTAL_TYPE = Symbol.for('react.portal'); var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment'); var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode'); var REACT_PROFILER_TYPE = Symbol.for('react.profiler'); var REACT_PROVIDER_TYPE = Symbol.for('react.provider'); var REACT_CONTEXT_TYPE = Symbol.for('react.context'); var REACT_SERVER_CONTEXT_TYPE = Symbol.for('react.server_context'); var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref'); var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense'); var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list'); var REACT_MEMO_TYPE = Symbol.for('react.memo'); var REACT_LAZY_TYPE = Symbol.for('react.lazy'); var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen'); // ----------------------------------------------------------------------------- var enableScopeAPI = false; // Experimental Create Event Handle API. var enableCacheElement = false; var enableTransitionTracing = false; // No known bugs, but needs performance testing var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber // stuff. Intended to enable React core members to more easily debug scheduling // issues in DEV builds. var enableDebugTracing = false; // Track which Fiber(s) schedule render work. var REACT_MODULE_REFERENCE; { REACT_MODULE_REFERENCE = Symbol.for('react.module.reference'); } function isValidElementType(type) { if (typeof type === 'string' || typeof type === 'function') { return true; } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill). if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) { return true; } if (typeof type === 'object' && type !== null) { if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object // types supported by any Flight configuration anywhere since // we don't know which Flight build this will end up being used // with. type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) { return true; } } return false; } function typeOf(object) { if (typeof object === 'object' && object !== null) { var $$typeof = object.$$typeof; switch ($$typeof) { case REACT_ELEMENT_TYPE: var type = object.type; switch (type) { case REACT_FRAGMENT_TYPE: case REACT_PROFILER_TYPE: case REACT_STRICT_MODE_TYPE: case REACT_SUSPENSE_TYPE: case REACT_SUSPENSE_LIST_TYPE: return type; default: var $$typeofType = type && type.$$typeof; switch ($$typeofType) { case REACT_SERVER_CONTEXT_TYPE: case REACT_CONTEXT_TYPE: case REACT_FORWARD_REF_TYPE: case REACT_LAZY_TYPE: case REACT_MEMO_TYPE: case REACT_PROVIDER_TYPE: return $$typeofType; default: return $$typeof; } } case REACT_PORTAL_TYPE: return $$typeof; } } return undefined; } var ContextConsumer = REACT_CONTEXT_TYPE; var ContextProvider = REACT_PROVIDER_TYPE; var Element = REACT_ELEMENT_TYPE; var ForwardRef = REACT_FORWARD_REF_TYPE; var Fragment = REACT_FRAGMENT_TYPE; var Lazy = REACT_LAZY_TYPE; var Memo = REACT_MEMO_TYPE; var Portal = REACT_PORTAL_TYPE; var Profiler = REACT_PROFILER_TYPE; var StrictMode = REACT_STRICT_MODE_TYPE; var Suspense = REACT_SUSPENSE_TYPE; var SuspenseList = REACT_SUSPENSE_LIST_TYPE; var hasWarnedAboutDeprecatedIsAsyncMode = false; var hasWarnedAboutDeprecatedIsConcurrentMode = false; // AsyncMode should be deprecated function isAsyncMode(object) { { if (!hasWarnedAboutDeprecatedIsAsyncMode) { hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 18+.'); } } return false; } function isConcurrentMode(object) { { if (!hasWarnedAboutDeprecatedIsConcurrentMode) { hasWarnedAboutDeprecatedIsConcurrentMode = true; // Using console['warn'] to evade Babel and ESLint console['warn']('The ReactIs.isConcurrentMode() alias has been deprecated, ' + 'and will be removed in React 18+.'); } } return false; } function isContextConsumer(object) { return typeOf(object) === REACT_CONTEXT_TYPE; } function isContextProvider(object) { return typeOf(object) === REACT_PROVIDER_TYPE; } function isElement(object) { return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; } function isForwardRef(object) { return typeOf(object) === REACT_FORWARD_REF_TYPE; } function isFragment(object) { return typeOf(object) === REACT_FRAGMENT_TYPE; } function isLazy(object) { return typeOf(object) === REACT_LAZY_TYPE; } function isMemo(object) { return typeOf(object) === REACT_MEMO_TYPE; } function isPortal(object) { return typeOf(object) === REACT_PORTAL_TYPE; } function isProfiler(object) { return typeOf(object) === REACT_PROFILER_TYPE; } function isStrictMode(object) { return typeOf(object) === REACT_STRICT_MODE_TYPE; } function isSuspense(object) { return typeOf(object) === REACT_SUSPENSE_TYPE; } function isSuspenseList(object) { return typeOf(object) === REACT_SUSPENSE_LIST_TYPE; } exports.ContextConsumer = ContextConsumer; exports.ContextProvider = ContextProvider; exports.Element = Element; exports.ForwardRef = ForwardRef; exports.Fragment = Fragment; exports.Lazy = Lazy; exports.Memo = Memo; exports.Portal = Portal; exports.Profiler = Profiler; exports.StrictMode = StrictMode; exports.Suspense = Suspense; exports.SuspenseList = SuspenseList; exports.isAsyncMode = isAsyncMode; exports.isConcurrentMode = isConcurrentMode; exports.isContextConsumer = isContextConsumer; exports.isContextProvider = isContextProvider; exports.isElement = isElement; exports.isForwardRef = isForwardRef; exports.isFragment = isFragment; exports.isLazy = isLazy; exports.isMemo = isMemo; exports.isPortal = isPortal; exports.isProfiler = isProfiler; exports.isStrictMode = isStrictMode; exports.isSuspense = isSuspense; exports.isSuspenseList = isSuspenseList; exports.isValidElementType = isValidElementType; exports.typeOf = typeOf; })(); } /***/ }), /***/ "./node_modules/react-redux/node_modules/react-is/index.js": /*!*****************************************************************!*\ !*** ./node_modules/react-redux/node_modules/react-is/index.js ***! \*****************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; if (false) {} else { module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "./node_modules/react-redux/node_modules/react-is/cjs/react-is.development.js"); } /***/ }), /***/ "./node_modules/base16/lib/apathy.js": /*!*******************************************!*\ !*** ./node_modules/base16/lib/apathy.js ***! \*******************************************/ /***/ (function(module, exports) { "use strict"; exports.__esModule = true; exports["default"] = { scheme: 'apathy', author: 'jannik siebert (https://github.com/janniks)', base00: '#031A16', base01: '#0B342D', base02: '#184E45', base03: '#2B685E', base04: '#5F9C92', base05: '#81B5AC', base06: '#A7CEC8', base07: '#D2E7E4', base08: '#3E9688', base09: '#3E7996', base0A: '#3E4C96', base0B: '#883E96', base0C: '#963E4C', base0D: '#96883E', base0E: '#4C963E', base0F: '#3E965B' }; module.exports = exports['default']; /***/ }), /***/ "./node_modules/base16/lib/ashes.js": /*!******************************************!*\ !*** ./node_modules/base16/lib/ashes.js ***! \******************************************/ /***/ (function(module, exports) { "use strict"; exports.__esModule = true; exports["default"] = { scheme: 'ashes', author: 'jannik siebert (https://github.com/janniks)', base00: '#1C2023', base01: '#393F45', base02: '#565E65', base03: '#747C84', base04: '#ADB3BA', base05: '#C7CCD1', base06: '#DFE2E5', base07: '#F3F4F5', base08: '#C7AE95', base09: '#C7C795', base0A: '#AEC795', base0B: '#95C7AE', base0C: '#95AEC7', base0D: '#AE95C7', base0E: '#C795AE', base0F: '#C79595' }; module.exports = exports['default']; /***/ }), /***/ "./node_modules/base16/lib/atelier-dune.js": /*!*************************************************!*\ !*** ./node_modules/base16/lib/atelier-dune.js ***! \*************************************************/ /***/ (function(module, exports) { "use strict"; exports.__esModule = true; exports["default"] = { scheme: 'atelier dune', author: 'bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune)', base00: '#20201d', base01: '#292824', base02: '#6e6b5e', base03: '#7d7a68', base04: '#999580', base05: '#a6a28c', base06: '#e8e4cf', base07: '#fefbec', base08: '#d73737', base09: '#b65611', base0A: '#cfb017', base0B: '#60ac39', base0C: '#1fad83', base0D: '#6684e1', base0E: '#b854d4', base0F: '#d43552' }; module.exports = exports['default']; /***/ }), /***/ "./node_modules/base16/lib/atelier-forest.js": /*!***************************************************!*\ !*** ./node_modules/base16/lib/atelier-forest.js ***! \***************************************************/ /***/ (function(module, exports) { "use strict"; exports.__esModule = true; exports["default"] = { scheme: 'atelier forest', author: 'bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest)', base00: '#1b1918', base01: '#2c2421', base02: '#68615e', base03: '#766e6b', base04: '#9c9491', base05: '#a8a19f', base06: '#e6e2e0', base07: '#f1efee', base08: '#f22c40', base09: '#df5320', base0A: '#d5911a', base0B: '#5ab738', base0C: '#00ad9c', base0D: '#407ee7', base0E: '#6666ea', base0F: '#c33ff3' }; module.exports = exports['default']; /***/ }), /***/ "./node_modules/base16/lib/atelier-heath.js": /*!**************************************************!*\ !*** ./node_modules/base16/lib/atelier-heath.js ***! \**************************************************/ /***/ (function(module, exports) { "use strict"; exports.__esModule = true; exports["default"] = { scheme: 'atelier heath', author: 'bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath)', base00: '#1b181b', base01: '#292329', base02: '#695d69', base03: '#776977', base04: '#9e8f9e', base05: '#ab9bab', base06: '#d8cad8', base07: '#f7f3f7', base08: '#ca402b', base09: '#a65926', base0A: '#bb8a35', base0B: '#379a37', base0C: '#159393', base0D: '#516aec', base0E: '#7b59c0', base0F: '#cc33cc' }; module.exports = exports['default']; /***/ }), /***/ "./node_modules/base16/lib/atelier-lakeside.js": /*!*****************************************************!*\ !*** ./node_modules/base16/lib/atelier-lakeside.js ***! \*****************************************************/ /***/ (function(module, exports) { "use strict"; exports.__esModule = true; exports["default"] = { scheme: 'atelier lakeside', author: 'bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside/)', base00: '#161b1d', base01: '#1f292e', base02: '#516d7b', base03: '#5a7b8c', base04: '#7195a8', base05: '#7ea2b4', base06: '#c1e4f6', base07: '#ebf8ff', base08: '#d22d72', base09: '#935c25', base0A: '#8a8a0f', base0B: '#568c3b', base0C: '#2d8f6f', base0D: '#257fad', base0E: '#5d5db1', base0F: '#b72dd2' }; module.exports = exports['default']; /***/ }), /***/ "./node_modules/base16/lib/atelier-seaside.js": /*!****************************************************!*\ !*** ./node_modules/base16/lib/atelier-seaside.js ***! \****************************************************/ /***/ (function(module, exports) { "use strict"; exports.__esModule = true; exports["default"] = { scheme: 'atelier seaside', author: 'bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside/)', base00: '#131513', base01: '#242924', base02: '#5e6e5e', base03: '#687d68', base04: '#809980', base05: '#8ca68c', base06: '#cfe8cf', base07: '#f0fff0', base08: '#e6193c', base09: '#87711d', base0A: '#c3c322', base0B: '#29a329', base0C: '#1999b3', base0D: '#3d62f5', base0E: '#ad2bee', base0F: '#e619c3' }; module.exports = exports['default']; /***/ }), /***/ "./node_modules/base16/lib/bespin.js": /*!*******************************************!*\ !*** ./node_modules/base16/lib/bespin.js ***! \*******************************************/ /***/ (function(module, exports) { "use strict"; exports.__esModule = true; exports["default"] = { scheme: 'bespin', author: 'jan t. sott', base00: '#28211c', base01: '#36312e', base02: '#5e5d5c', base03: '#666666', base04: '#797977', base05: '#8a8986', base06: '#9d9b97', base07: '#baae9e', base08: '#cf6a4c', base09: '#cf7d34', base0A: '#f9ee98', base0B: '#54be0d', base0C: '#afc4db', base0D: '#5ea6ea', base0E: '#9b859d', base0F: '#937121' }; module.exports = exports['default']; /***/ }), /***/ "./node_modules/base16/lib/brewer.js": /*!*******************************************!*\ !*** ./node_modules/base16/lib/brewer.js ***! \*******************************************/ /***/ (function(module, exports) { "use strict"; exports.__esModule = true; exports["default"] = { scheme: 'brewer', author: 'timothée poisot (http://github.com/tpoisot)', base00: '#0c0d0e', base01: '#2e2f30', base02: '#515253', base03: '#737475', base04: '#959697', base05: '#b7b8b9', base06: '#dadbdc', base07: '#fcfdfe', base08: '#e31a1c', base09: '#e6550d', base0A: '#dca060', base0B: '#31a354', base0C: '#80b1d3', base0D: '#3182bd', base0E: '#756bb1', base0F: '#b15928' }; module.exports = exports['default']; /***/ }), /***/ "./node_modules/base16/lib/bright.js": /*!*******************************************!*\ !*** ./node_modules/base16/lib/bright.js ***! \*******************************************/ /***/ (function(module, exports) { "use strict"; exports.__esModule = true; exports["default"] = { scheme: 'bright', author: 'chris kempson (http://chriskempson.com)', base00: '#000000', base01: '#303030', base02: '#505050', base03: '#b0b0b0', base04: '#d0d0d0', base05: '#e0e0e0', base06: '#f5f5f5', base07: '#ffffff', base08: '#fb0120', base09: '#fc6d24', base0A: '#fda331', base0B: '#a1c659', base0C: '#76c7b7', base0D: '#6fb3d2', base0E: '#d381c3', base0F: '#be643c' }; module.exports = exports['default']; /***/ }), /***/ "./node_modules/base16/lib/chalk.js": /*!******************************************!*\ !*** ./node_modules/base16/lib/chalk.js ***! \******************************************/ /***/ (function(module, exports) { "use strict"; exports.__esModule = true; exports["default"] = { scheme: 'chalk', author: 'chris kempson (http://chriskempson.com)', base00: '#151515', base01: '#202020', base02: '#303030', base03: '#505050', base04: '#b0b0b0', base05: '#d0d0d0', base06: '#e0e0e0', base07: '#f5f5f5', base08: '#fb9fb1', base09: '#eda987', base0A: '#ddb26f', base0B: '#acc267', base0C: '#12cfc0', base0D: '#6fc2ef', base0E: '#e1a3ee', base0F: '#deaf8f' }; module.exports = exports['default']; /***/ }), /***/ "./node_modules/base16/lib/codeschool.js": /*!***********************************************!*\ !*** ./node_modules/base16/lib/codeschool.js ***! \***********************************************/ /***/ (function(module, exports) { "use strict"; exports.__esModule = true; exports["default"] = { scheme: 'codeschool', author: 'brettof86', base00: '#232c31', base01: '#1c3657', base02: '#2a343a', base03: '#3f4944', base04: '#84898c', base05: '#9ea7a6', base06: '#a7cfa3', base07: '#b5d8f6', base08: '#2a5491', base09: '#43820d', base0A: '#a03b1e', base0B: '#237986', base0C: '#b02f30', base0D: '#484d79', base0E: '#c59820', base0F: '#c98344' }; module.exports = exports['default']; /***/ }), /***/ "./node_modules/base16/lib/colors.js": /*!*******************************************!*\ !*** ./node_modules/base16/lib/colors.js ***! \*******************************************/ /***/ (function(module, exports) { "use strict"; exports.__esModule = true; exports["default"] = { scheme: 'colors', author: 'mrmrs (http://clrs.cc)', base00: '#111111', base01: '#333333', base02: '#555555', base03: '#777777', base04: '#999999', base05: '#bbbbbb', base06: '#dddddd', base07: '#ffffff', base08: '#ff4136', base09: '#ff851b', base0A: '#ffdc00', base0B: '#2ecc40', base0C: '#7fdbff', base0D: '#0074d9', base0E: '#b10dc9', base0F: '#85144b' }; module.exports = exports['default']; /***/ }), /***/ "./node_modules/base16/lib/default.js": /*!********************************************!*\ !*** ./node_modules/base16/lib/default.js ***! \********************************************/ /***/ (function(module, exports) { "use strict"; exports.__esModule = true; exports["default"] = { scheme: 'default', author: 'chris kempson (http://chriskempson.com)', base00: '#181818', base01: '#282828', base02: '#383838', base03: '#585858', base04: '#b8b8b8', base05: '#d8d8d8', base06: '#e8e8e8', base07: '#f8f8f8', base08: '#ab4642', base09: '#dc9656', base0A: '#f7ca88', base0B: '#a1b56c', base0C: '#86c1b9', base0D: '#7cafc2', base0E: '#ba8baf', base0F: '#a16946' }; module.exports = exports['default']; /***/ }), /***/ "./node_modules/base16/lib/eighties.js": /*!*********************************************!*\ !*** ./node_modules/base16/lib/eighties.js ***! \*********************************************/ /***/ (function(module, exports) { "use strict"; exports.__esModule = true; exports["default"] = { scheme: 'eighties', author: 'chris kempson (http://chriskempson.com)', base00: '#2d2d2d', base01: '#393939', base02: '#515151', base03: '#747369', base04: '#a09f93', base05: '#d3d0c8', base06: '#e8e6df', base07: '#f2f0ec', base08: '#f2777a', base09: '#f99157', base0A: '#ffcc66', base0B: '#99cc99', base0C: '#66cccc', base0D: '#6699cc', base0E: '#cc99cc', base0F: '#d27b53' }; module.exports = exports['default']; /***/ }), /***/ "./node_modules/base16/lib/embers.js": /*!*******************************************!*\ !*** ./node_modules/base16/lib/embers.js ***! \*******************************************/ /***/ (function(module, exports) { "use strict"; exports.__esModule = true; exports["default"] = { scheme: 'embers', author: 'jannik siebert (https://github.com/janniks)', base00: '#16130F', base01: '#2C2620', base02: '#433B32', base03: '#5A5047', base04: '#8A8075', base05: '#A39A90', base06: '#BEB6AE', base07: '#DBD6D1', base08: '#826D57', base09: '#828257', base0A: '#6D8257', base0B: '#57826D', base0C: '#576D82', base0D: '#6D5782', base0E: '#82576D', base0F: '#825757' }; module.exports = exports['default']; /***/ }), /***/ "./node_modules/base16/lib/flat.js": /*!*****************************************!*\ !*** ./node_modules/base16/lib/flat.js ***! \*****************************************/ /***/ (function(module, exports) { "use strict"; exports.__esModule = true; exports["default"] = { scheme: 'flat', author: 'chris kempson (http://chriskempson.com)', base00: '#2C3E50', base01: '#34495E', base02: '#7F8C8D', base03: '#95A5A6', base04: '#BDC3C7', base05: '#e0e0e0', base06: '#f5f5f5', base07: '#ECF0F1', base08: '#E74C3C', base09: '#E67E22', base0A: '#F1C40F', base0B: '#2ECC71', base0C: '#1ABC9C', base0D: '#3498DB', base0E: '#9B59B6', base0F: '#be643c' }; module.exports = exports['default']; /***/ }), /***/ "./node_modules/base16/lib/google.js": /*!*******************************************!*\ !*** ./node_modules/base16/lib/google.js ***! \*******************************************/ /***/ (function(module, exports) { "use strict"; exports.__esModule = true; exports["default"] = { scheme: 'google', author: 'seth wright (http://sethawright.com)', base00: '#1d1f21', base01: '#282a2e', base02: '#373b41', base03: '#969896', base04: '#b4b7b4', base05: '#c5c8c6', base06: '#e0e0e0', base07: '#ffffff', base08: '#CC342B', base09: '#F96A38', base0A: '#FBA922', base0B: '#198844', base0C: '#3971ED', base0D: '#3971ED', base0E: '#A36AC7', base0F: '#3971ED' }; module.exports = exports['default']; /***/ }), /***/ "./node_modules/base16/lib/grayscale.js": /*!**********************************************!*\ !*** ./node_modules/base16/lib/grayscale.js ***! \**********************************************/ /***/ (function(module, exports) { "use strict"; exports.__esModule = true; exports["default"] = { scheme: 'grayscale', author: 'alexandre gavioli (https://github.com/alexx2/)', base00: '#101010', base01: '#252525', base02: '#464646', base03: '#525252', base04: '#ababab', base05: '#b9b9b9', base06: '#e3e3e3', base07: '#f7f7f7', base08: '#7c7c7c', base09: '#999999', base0A: '#a0a0a0', base0B: '#8e8e8e', base0C: '#868686', base0D: '#686868', base0E: '#747474', base0F: '#5e5e5e' }; module.exports = exports['default']; /***/ }), /***/ "./node_modules/base16/lib/greenscreen.js": /*!************************************************!*\ !*** ./node_modules/base16/lib/greenscreen.js ***! \************************************************/ /***/ (function(module, exports) { "use strict"; exports.__esModule = true; exports["default"] = { scheme: 'green screen', author: 'chris kempson (http://chriskempson.com)', base00: '#001100', base01: '#003300', base02: '#005500', base03: '#007700', base04: '#009900', base05: '#00bb00', base06: '#00dd00', base07: '#00ff00', base08: '#007700', base09: '#009900', base0A: '#007700', base0B: '#00bb00', base0C: '#005500', base0D: '#009900', base0E: '#00bb00', base0F: '#005500' }; module.exports = exports['default']; /***/ }), /***/ "./node_modules/base16/lib/harmonic.js": /*!*********************************************!*\ !*** ./node_modules/base16/lib/harmonic.js ***! \*********************************************/ /***/ (function(module, exports) { "use strict"; exports.__esModule = true; exports["default"] = { scheme: 'harmonic16', author: 'jannik siebert (https://github.com/janniks)', base00: '#0b1c2c', base01: '#223b54', base02: '#405c79', base03: '#627e99', base04: '#aabcce', base05: '#cbd6e2', base06: '#e5ebf1', base07: '#f7f9fb', base08: '#bf8b56', base09: '#bfbf56', base0A: '#8bbf56', base0B: '#56bf8b', base0C: '#568bbf', base0D: '#8b56bf', base0E: '#bf568b', base0F: '#bf5656' }; module.exports = exports['default']; /***/ }), /***/ "./node_modules/base16/lib/hopscotch.js": /*!**********************************************!*\ !*** ./node_modules/base16/lib/hopscotch.js ***! \**********************************************/ /***/ (function(module, exports) { "use strict"; exports.__esModule = true; exports["default"] = { scheme: 'hopscotch', author: 'jan t. sott', base00: '#322931', base01: '#433b42', base02: '#5c545b', base03: '#797379', base04: '#989498', base05: '#b9b5b8', base06: '#d5d3d5', base07: '#ffffff', base08: '#dd464c', base09: '#fd8b19', base0A: '#fdcc59', base0B: '#8fc13e', base0C: '#149b93', base0D: '#1290bf', base0E: '#c85e7c', base0F: '#b33508' }; module.exports = exports['default']; /***/ }), /***/ "./node_modules/base16/lib/index.js": /*!******************************************!*\ !*** ./node_modules/base16/lib/index.js ***! \******************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; function _interopRequire(obj) { return obj && obj.__esModule ? obj['default'] : obj; } var _threezerotwofour = __webpack_require__(/*! ./threezerotwofour */ "./node_modules/base16/lib/threezerotwofour.js"); exports.threezerotwofour = _interopRequire(_threezerotwofour); var _apathy = __webpack_require__(/*! ./apathy */ "./node_modules/base16/lib/apathy.js"); exports.apathy = _interopRequire(_apathy); var _ashes = __webpack_require__(/*! ./ashes */ "./node_modules/base16/lib/ashes.js"); exports.ashes = _interopRequire(_ashes); var _atelierDune = __webpack_require__(/*! ./atelier-dune */ "./node_modules/base16/lib/atelier-dune.js"); exports.atelierDune = _interopRequire(_atelierDune); var _atelierForest = __webpack_require__(/*! ./atelier-forest */ "./node_modules/base16/lib/atelier-forest.js"); exports.atelierForest = _interopRequire(_atelierForest); var _atelierHeath = __webpack_require__(/*! ./atelier-heath */ "./node_modules/base16/lib/atelier-heath.js"); exports.atelierHeath = _interopRequire(_atelierHeath); var _atelierLakeside = __webpack_require__(/*! ./atelier-lakeside */ "./node_modules/base16/lib/atelier-lakeside.js"); exports.atelierLakeside = _interopRequire(_atelierLakeside); var _atelierSeaside = __webpack_require__(/*! ./atelier-seaside */ "./node_modules/base16/lib/atelier-seaside.js"); exports.atelierSeaside = _interopRequire(_atelierSeaside); var _bespin = __webpack_require__(/*! ./bespin */ "./node_modules/base16/lib/bespin.js"); exports.bespin = _interopRequire(_bespin); var _brewer = __webpack_require__(/*! ./brewer */ "./node_modules/base16/lib/brewer.js"); exports.brewer = _interopRequire(_brewer); var _bright = __webpack_require__(/*! ./bright */ "./node_modules/base16/lib/bright.js"); exports.bright = _interopRequire(_bright); var _chalk = __webpack_require__(/*! ./chalk */ "./node_modules/base16/lib/chalk.js"); exports.chalk = _interopRequire(_chalk); var _codeschool = __webpack_require__(/*! ./codeschool */ "./node_modules/base16/lib/codeschool.js"); exports.codeschool = _interopRequire(_codeschool); var _colors = __webpack_require__(/*! ./colors */ "./node_modules/base16/lib/colors.js"); exports.colors = _interopRequire(_colors); var _default = __webpack_require__(/*! ./default */ "./node_modules/base16/lib/default.js"); exports["default"] = _interopRequire(_default); var _eighties = __webpack_require__(/*! ./eighties */ "./node_modules/base16/lib/eighties.js"); exports.eighties = _interopRequire(_eighties); var _embers = __webpack_require__(/*! ./embers */ "./node_modules/base16/lib/embers.js"); exports.embers = _interopRequire(_embers); var _flat = __webpack_require__(/*! ./flat */ "./node_modules/base16/lib/flat.js"); exports.flat = _interopRequire(_flat); var _google = __webpack_require__(/*! ./google */ "./node_modules/base16/lib/google.js"); exports.google = _interopRequire(_google); var _grayscale = __webpack_require__(/*! ./grayscale */ "./node_modules/base16/lib/grayscale.js"); exports.grayscale = _interopRequire(_grayscale); var _greenscreen = __webpack_require__(/*! ./greenscreen */ "./node_modules/base16/lib/greenscreen.js"); exports.greenscreen = _interopRequire(_greenscreen); var _harmonic = __webpack_require__(/*! ./harmonic */ "./node_modules/base16/lib/harmonic.js"); exports.harmonic = _interopRequire(_harmonic); var _hopscotch = __webpack_require__(/*! ./hopscotch */ "./node_modules/base16/lib/hopscotch.js"); exports.hopscotch = _interopRequire(_hopscotch); var _isotope = __webpack_require__(/*! ./isotope */ "./node_modules/base16/lib/isotope.js"); exports.isotope = _interopRequire(_isotope); var _marrakesh = __webpack_require__(/*! ./marrakesh */ "./node_modules/base16/lib/marrakesh.js"); exports.marrakesh = _interopRequire(_marrakesh); var _mocha = __webpack_require__(/*! ./mocha */ "./node_modules/base16/lib/mocha.js"); exports.mocha = _interopRequire(_mocha); var _monokai = __webpack_require__(/*! ./monokai */ "./node_modules/base16/lib/monokai.js"); exports.monokai = _interopRequire(_monokai); var _ocean = __webpack_require__(/*! ./ocean */ "./node_modules/base16/lib/ocean.js"); exports.ocean = _interopRequire(_ocean); var _paraiso = __webpack_require__(/*! ./paraiso */ "./node_modules/base16/lib/paraiso.js"); exports.paraiso = _interopRequire(_paraiso); var _pop = __webpack_require__(/*! ./pop */ "./node_modules/base16/lib/pop.js"); exports.pop = _interopRequire(_pop); var _railscasts = __webpack_require__(/*! ./railscasts */ "./node_modules/base16/lib/railscasts.js"); exports.railscasts = _interopRequire(_railscasts); var _shapeshifter = __webpack_require__(/*! ./shapeshifter */ "./node_modules/base16/lib/shapeshifter.js"); exports.shapeshifter = _interopRequire(_shapeshifter); var _solarized = __webpack_require__(/*! ./solarized */ "./node_modules/base16/lib/solarized.js"); exports.solarized = _interopRequire(_solarized); var _summerfruit = __webpack_require__(/*! ./summerfruit */ "./node_modules/base16/lib/summerfruit.js"); exports.summerfruit = _interopRequire(_summerfruit); var _tomorrow = __webpack_require__(/*! ./tomorrow */ "./node_modules/base16/lib/tomorrow.js"); exports.tomorrow = _interopRequire(_tomorrow); var _tube = __webpack_require__(/*! ./tube */ "./node_modules/base16/lib/tube.js"); exports.tube = _interopRequire(_tube); var _twilight = __webpack_require__(/*! ./twilight */ "./node_modules/base16/lib/twilight.js"); exports.twilight = _interopRequire(_twilight); /***/ }), /***/ "./node_modules/base16/lib/isotope.js": /*!********************************************!*\ !*** ./node_modules/base16/lib/isotope.js ***! \********************************************/ /***/ (function(module, exports) { "use strict"; exports.__esModule = true; exports["default"] = { scheme: 'isotope', author: 'jan t. sott', base00: '#000000', base01: '#404040', base02: '#606060', base03: '#808080', base04: '#c0c0c0', base05: '#d0d0d0', base06: '#e0e0e0', base07: '#ffffff', base08: '#ff0000', base09: '#ff9900', base0A: '#ff0099', base0B: '#33ff00', base0C: '#00ffff', base0D: '#0066ff', base0E: '#cc00ff', base0F: '#3300ff' }; module.exports = exports['default']; /***/ }), /***/ "./node_modules/base16/lib/marrakesh.js": /*!**********************************************!*\ !*** ./node_modules/base16/lib/marrakesh.js ***! \**********************************************/ /***/ (function(module, exports) { "use strict"; exports.__esModule = true; exports["default"] = { scheme: 'marrakesh', author: 'alexandre gavioli (http://github.com/alexx2/)', base00: '#201602', base01: '#302e00', base02: '#5f5b17', base03: '#6c6823', base04: '#86813b', base05: '#948e48', base06: '#ccc37a', base07: '#faf0a5', base08: '#c35359', base09: '#b36144', base0A: '#a88339', base0B: '#18974e', base0C: '#75a738', base0D: '#477ca1', base0E: '#8868b3', base0F: '#b3588e' }; module.exports = exports['default']; /***/ }), /***/ "./node_modules/base16/lib/mocha.js": /*!******************************************!*\ !*** ./node_modules/base16/lib/mocha.js ***! \******************************************/ /***/ (function(module, exports) { "use strict"; exports.__esModule = true; exports["default"] = { scheme: 'mocha', author: 'chris kempson (http://chriskempson.com)', base00: '#3B3228', base01: '#534636', base02: '#645240', base03: '#7e705a', base04: '#b8afad', base05: '#d0c8c6', base06: '#e9e1dd', base07: '#f5eeeb', base08: '#cb6077', base09: '#d28b71', base0A: '#f4bc87', base0B: '#beb55b', base0C: '#7bbda4', base0D: '#8ab3b5', base0E: '#a89bb9', base0F: '#bb9584' }; module.exports = exports['default']; /***/ }), /***/ "./node_modules/base16/lib/monokai.js": /*!********************************************!*\ !*** ./node_modules/base16/lib/monokai.js ***! \********************************************/ /***/ (function(module, exports) { "use strict"; exports.__esModule = true; exports["default"] = { scheme: 'monokai', author: 'wimer hazenberg (http://www.monokai.nl)', base00: '#272822', base01: '#383830', base02: '#49483e', base03: '#75715e', base04: '#a59f85', base05: '#f8f8f2', base06: '#f5f4f1', base07: '#f9f8f5', base08: '#f92672', base09: '#fd971f', base0A: '#f4bf75', base0B: '#a6e22e', base0C: '#a1efe4', base0D: '#66d9ef', base0E: '#ae81ff', base0F: '#cc6633' }; module.exports = exports['default']; /***/ }), /***/ "./node_modules/base16/lib/ocean.js": /*!******************************************!*\ !*** ./node_modules/base16/lib/ocean.js ***! \******************************************/ /***/ (function(module, exports) { "use strict"; exports.__esModule = true; exports["default"] = { scheme: 'ocean', author: 'chris kempson (http://chriskempson.com)', base00: '#2b303b', base01: '#343d46', base02: '#4f5b66', base03: '#65737e', base04: '#a7adba', base05: '#c0c5ce', base06: '#dfe1e8', base07: '#eff1f5', base08: '#bf616a', base09: '#d08770', base0A: '#ebcb8b', base0B: '#a3be8c', base0C: '#96b5b4', base0D: '#8fa1b3', base0E: '#b48ead', base0F: '#ab7967' }; module.exports = exports['default']; /***/ }), /***/ "./node_modules/base16/lib/paraiso.js": /*!********************************************!*\ !*** ./node_modules/base16/lib/paraiso.js ***! \********************************************/ /***/ (function(module, exports) { "use strict"; exports.__esModule = true; exports["default"] = { scheme: 'paraiso', author: 'jan t. sott', base00: '#2f1e2e', base01: '#41323f', base02: '#4f424c', base03: '#776e71', base04: '#8d8687', base05: '#a39e9b', base06: '#b9b6b0', base07: '#e7e9db', base08: '#ef6155', base09: '#f99b15', base0A: '#fec418', base0B: '#48b685', base0C: '#5bc4bf', base0D: '#06b6ef', base0E: '#815ba4', base0F: '#e96ba8' }; module.exports = exports['default']; /***/ }), /***/ "./node_modules/base16/lib/pop.js": /*!****************************************!*\ !*** ./node_modules/base16/lib/pop.js ***! \****************************************/ /***/ (function(module, exports) { "use strict"; exports.__esModule = true; exports["default"] = { scheme: 'pop', author: 'chris kempson (http://chriskempson.com)', base00: '#000000', base01: '#202020', base02: '#303030', base03: '#505050', base04: '#b0b0b0', base05: '#d0d0d0', base06: '#e0e0e0', base07: '#ffffff', base08: '#eb008a', base09: '#f29333', base0A: '#f8ca12', base0B: '#37b349', base0C: '#00aabb', base0D: '#0e5a94', base0E: '#b31e8d', base0F: '#7a2d00' }; module.exports = exports['default']; /***/ }), /***/ "./node_modules/base16/lib/railscasts.js": /*!***********************************************!*\ !*** ./node_modules/base16/lib/railscasts.js ***! \***********************************************/ /***/ (function(module, exports) { "use strict"; exports.__esModule = true; exports["default"] = { scheme: 'railscasts', author: 'ryan bates (http://railscasts.com)', base00: '#2b2b2b', base01: '#272935', base02: '#3a4055', base03: '#5a647e', base04: '#d4cfc9', base05: '#e6e1dc', base06: '#f4f1ed', base07: '#f9f7f3', base08: '#da4939', base09: '#cc7833', base0A: '#ffc66d', base0B: '#a5c261', base0C: '#519f50', base0D: '#6d9cbe', base0E: '#b6b3eb', base0F: '#bc9458' }; module.exports = exports['default']; /***/ }), /***/ "./node_modules/base16/lib/shapeshifter.js": /*!*************************************************!*\ !*** ./node_modules/base16/lib/shapeshifter.js ***! \*************************************************/ /***/ (function(module, exports) { "use strict"; exports.__esModule = true; exports["default"] = { scheme: 'shapeshifter', author: 'tyler benziger (http://tybenz.com)', base00: '#000000', base01: '#040404', base02: '#102015', base03: '#343434', base04: '#555555', base05: '#ababab', base06: '#e0e0e0', base07: '#f9f9f9', base08: '#e92f2f', base09: '#e09448', base0A: '#dddd13', base0B: '#0ed839', base0C: '#23edda', base0D: '#3b48e3', base0E: '#f996e2', base0F: '#69542d' }; module.exports = exports['default']; /***/ }), /***/ "./node_modules/base16/lib/solarized.js": /*!**********************************************!*\ !*** ./node_modules/base16/lib/solarized.js ***! \**********************************************/ /***/ (function(module, exports) { "use strict"; exports.__esModule = true; exports["default"] = { scheme: 'solarized', author: 'ethan schoonover (http://ethanschoonover.com/solarized)', base00: '#002b36', base01: '#073642', base02: '#586e75', base03: '#657b83', base04: '#839496', base05: '#93a1a1', base06: '#eee8d5', base07: '#fdf6e3', base08: '#dc322f', base09: '#cb4b16', base0A: '#b58900', base0B: '#859900', base0C: '#2aa198', base0D: '#268bd2', base0E: '#6c71c4', base0F: '#d33682' }; module.exports = exports['default']; /***/ }), /***/ "./node_modules/base16/lib/summerfruit.js": /*!************************************************!*\ !*** ./node_modules/base16/lib/summerfruit.js ***! \************************************************/ /***/ (function(module, exports) { "use strict"; exports.__esModule = true; exports["default"] = { scheme: 'summerfruit', author: 'christopher corley (http://cscorley.github.io/)', base00: '#151515', base01: '#202020', base02: '#303030', base03: '#505050', base04: '#B0B0B0', base05: '#D0D0D0', base06: '#E0E0E0', base07: '#FFFFFF', base08: '#FF0086', base09: '#FD8900', base0A: '#ABA800', base0B: '#00C918', base0C: '#1faaaa', base0D: '#3777E6', base0E: '#AD00A1', base0F: '#cc6633' }; module.exports = exports['default']; /***/ }), /***/ "./node_modules/base16/lib/threezerotwofour.js": /*!*****************************************************!*\ !*** ./node_modules/base16/lib/threezerotwofour.js ***! \*****************************************************/ /***/ (function(module, exports) { "use strict"; exports.__esModule = true; exports["default"] = { scheme: 'threezerotwofour', author: 'jan t. sott (http://github.com/idleberg)', base00: '#090300', base01: '#3a3432', base02: '#4a4543', base03: '#5c5855', base04: '#807d7c', base05: '#a5a2a2', base06: '#d6d5d4', base07: '#f7f7f7', base08: '#db2d20', base09: '#e8bbd0', base0A: '#fded02', base0B: '#01a252', base0C: '#b5e4f4', base0D: '#01a0e4', base0E: '#a16a94', base0F: '#cdab53' }; module.exports = exports['default']; /***/ }), /***/ "./node_modules/base16/lib/tomorrow.js": /*!*********************************************!*\ !*** ./node_modules/base16/lib/tomorrow.js ***! \*********************************************/ /***/ (function(module, exports) { "use strict"; exports.__esModule = true; exports["default"] = { scheme: 'tomorrow', author: 'chris kempson (http://chriskempson.com)', base00: '#1d1f21', base01: '#282a2e', base02: '#373b41', base03: '#969896', base04: '#b4b7b4', base05: '#c5c8c6', base06: '#e0e0e0', base07: '#ffffff', base08: '#cc6666', base09: '#de935f', base0A: '#f0c674', base0B: '#b5bd68', base0C: '#8abeb7', base0D: '#81a2be', base0E: '#b294bb', base0F: '#a3685a' }; module.exports = exports['default']; /***/ }), /***/ "./node_modules/base16/lib/tube.js": /*!*****************************************!*\ !*** ./node_modules/base16/lib/tube.js ***! \*****************************************/ /***/ (function(module, exports) { "use strict"; exports.__esModule = true; exports["default"] = { scheme: 'london tube', author: 'jan t. sott', base00: '#231f20', base01: '#1c3f95', base02: '#5a5758', base03: '#737171', base04: '#959ca1', base05: '#d9d8d8', base06: '#e7e7e8', base07: '#ffffff', base08: '#ee2e24', base09: '#f386a1', base0A: '#ffd204', base0B: '#00853e', base0C: '#85cebc', base0D: '#009ddc', base0E: '#98005d', base0F: '#b06110' }; module.exports = exports['default']; /***/ }), /***/ "./node_modules/base16/lib/twilight.js": /*!*********************************************!*\ !*** ./node_modules/base16/lib/twilight.js ***! \*********************************************/ /***/ (function(module, exports) { "use strict"; exports.__esModule = true; exports["default"] = { scheme: 'twilight', author: 'david hart (http://hart-dev.com)', base00: '#1e1e1e', base01: '#323537', base02: '#464b50', base03: '#5f5a60', base04: '#838184', base05: '#a7a7a7', base06: '#c3c3c3', base07: '#ffffff', base08: '#cf6a4c', base09: '#cda869', base0A: '#f9ee98', base0B: '#8f9d6a', base0C: '#afc4db', base0D: '#7587a6', base0E: '#9b859d', base0F: '#9b703f' }; module.exports = exports['default']; /***/ }), /***/ "./node_modules/color-convert/conversions.js": /*!***************************************************!*\ !*** ./node_modules/color-convert/conversions.js ***! \***************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { /* MIT license */ var cssKeywords = __webpack_require__(/*! color-name */ "./node_modules/color-name/index.js"); // NOTE: conversions should only return primitive values (i.e. arrays, or // values that give correct `typeof` results). // do not use box values types (i.e. Number(), String(), etc.) var reverseKeywords = {}; for (var key in cssKeywords) { if (cssKeywords.hasOwnProperty(key)) { reverseKeywords[cssKeywords[key]] = key; } } var convert = module.exports = { rgb: {channels: 3, labels: 'rgb'}, hsl: {channels: 3, labels: 'hsl'}, hsv: {channels: 3, labels: 'hsv'}, hwb: {channels: 3, labels: 'hwb'}, cmyk: {channels: 4, labels: 'cmyk'}, xyz: {channels: 3, labels: 'xyz'}, lab: {channels: 3, labels: 'lab'}, lch: {channels: 3, labels: 'lch'}, hex: {channels: 1, labels: ['hex']}, keyword: {channels: 1, labels: ['keyword']}, ansi16: {channels: 1, labels: ['ansi16']}, ansi256: {channels: 1, labels: ['ansi256']}, hcg: {channels: 3, labels: ['h', 'c', 'g']}, apple: {channels: 3, labels: ['r16', 'g16', 'b16']}, gray: {channels: 1, labels: ['gray']} }; // hide .channels and .labels properties for (var model in convert) { if (convert.hasOwnProperty(model)) { if (!('channels' in convert[model])) { throw new Error('missing channels property: ' + model); } if (!('labels' in convert[model])) { throw new Error('missing channel labels property: ' + model); } if (convert[model].labels.length !== convert[model].channels) { throw new Error('channel and label counts mismatch: ' + model); } var channels = convert[model].channels; var labels = convert[model].labels; delete convert[model].channels; delete convert[model].labels; Object.defineProperty(convert[model], 'channels', {value: channels}); Object.defineProperty(convert[model], 'labels', {value: labels}); } } convert.rgb.hsl = function (rgb) { var r = rgb[0] / 255; var g = rgb[1] / 255; var b = rgb[2] / 255; var min = Math.min(r, g, b); var max = Math.max(r, g, b); var delta = max - min; var h; var s; var l; if (max === min) { h = 0; } else if (r === max) { h = (g - b) / delta; } else if (g === max) { h = 2 + (b - r) / delta; } else if (b === max) { h = 4 + (r - g) / delta; } h = Math.min(h * 60, 360); if (h < 0) { h += 360; } l = (min + max) / 2; if (max === min) { s = 0; } else if (l <= 0.5) { s = delta / (max + min); } else { s = delta / (2 - max - min); } return [h, s * 100, l * 100]; }; convert.rgb.hsv = function (rgb) { var rdif; var gdif; var bdif; var h; var s; var r = rgb[0] / 255; var g = rgb[1] / 255; var b = rgb[2] / 255; var v = Math.max(r, g, b); var diff = v - Math.min(r, g, b); var diffc = function (c) { return (v - c) / 6 / diff + 1 / 2; }; if (diff === 0) { h = s = 0; } else { s = diff / v; rdif = diffc(r); gdif = diffc(g); bdif = diffc(b); if (r === v) { h = bdif - gdif; } else if (g === v) { h = (1 / 3) + rdif - bdif; } else if (b === v) { h = (2 / 3) + gdif - rdif; } if (h < 0) { h += 1; } else if (h > 1) { h -= 1; } } return [ h * 360, s * 100, v * 100 ]; }; convert.rgb.hwb = function (rgb) { var r = rgb[0]; var g = rgb[1]; var b = rgb[2]; var h = convert.rgb.hsl(rgb)[0]; var w = 1 / 255 * Math.min(r, Math.min(g, b)); b = 1 - 1 / 255 * Math.max(r, Math.max(g, b)); return [h, w * 100, b * 100]; }; convert.rgb.cmyk = function (rgb) { var r = rgb[0] / 255; var g = rgb[1] / 255; var b = rgb[2] / 255; var c; var m; var y; var k; k = Math.min(1 - r, 1 - g, 1 - b); c = (1 - r - k) / (1 - k) || 0; m = (1 - g - k) / (1 - k) || 0; y = (1 - b - k) / (1 - k) || 0; return [c * 100, m * 100, y * 100, k * 100]; }; /** * See https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance * */ function comparativeDistance(x, y) { return ( Math.pow(x[0] - y[0], 2) + Math.pow(x[1] - y[1], 2) + Math.pow(x[2] - y[2], 2) ); } convert.rgb.keyword = function (rgb) { var reversed = reverseKeywords[rgb]; if (reversed) { return reversed; } var currentClosestDistance = Infinity; var currentClosestKeyword; for (var keyword in cssKeywords) { if (cssKeywords.hasOwnProperty(keyword)) { var value = cssKeywords[keyword]; // Compute comparative distance var distance = comparativeDistance(rgb, value); // Check if its less, if so set as closest if (distance < currentClosestDistance) { currentClosestDistance = distance; currentClosestKeyword = keyword; } } } return currentClosestKeyword; }; convert.keyword.rgb = function (keyword) { return cssKeywords[keyword]; }; convert.rgb.xyz = function (rgb) { var r = rgb[0] / 255; var g = rgb[1] / 255; var b = rgb[2] / 255; // assume sRGB r = r > 0.04045 ? Math.pow(((r + 0.055) / 1.055), 2.4) : (r / 12.92); g = g > 0.04045 ? Math.pow(((g + 0.055) / 1.055), 2.4) : (g / 12.92); b = b > 0.04045 ? Math.pow(((b + 0.055) / 1.055), 2.4) : (b / 12.92); var x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805); var y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722); var z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505); return [x * 100, y * 100, z * 100]; }; convert.rgb.lab = function (rgb) { var xyz = convert.rgb.xyz(rgb); var x = xyz[0]; var y = xyz[1]; var z = xyz[2]; var l; var a; var b; x /= 95.047; y /= 100; z /= 108.883; x = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116); y = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116); z = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116); l = (116 * y) - 16; a = 500 * (x - y); b = 200 * (y - z); return [l, a, b]; }; convert.hsl.rgb = function (hsl) { var h = hsl[0] / 360; var s = hsl[1] / 100; var l = hsl[2] / 100; var t1; var t2; var t3; var rgb; var val; if (s === 0) { val = l * 255; return [val, val, val]; } if (l < 0.5) { t2 = l * (1 + s); } else { t2 = l + s - l * s; } t1 = 2 * l - t2; rgb = [0, 0, 0]; for (var i = 0; i < 3; i++) { t3 = h + 1 / 3 * -(i - 1); if (t3 < 0) { t3++; } if (t3 > 1) { t3--; } if (6 * t3 < 1) { val = t1 + (t2 - t1) * 6 * t3; } else if (2 * t3 < 1) { val = t2; } else if (3 * t3 < 2) { val = t1 + (t2 - t1) * (2 / 3 - t3) * 6; } else { val = t1; } rgb[i] = val * 255; } return rgb; }; convert.hsl.hsv = function (hsl) { var h = hsl[0]; var s = hsl[1] / 100; var l = hsl[2] / 100; var smin = s; var lmin = Math.max(l, 0.01); var sv; var v; l *= 2; s *= (l <= 1) ? l : 2 - l; smin *= lmin <= 1 ? lmin : 2 - lmin; v = (l + s) / 2; sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s); return [h, sv * 100, v * 100]; }; convert.hsv.rgb = function (hsv) { var h = hsv[0] / 60; var s = hsv[1] / 100; var v = hsv[2] / 100; var hi = Math.floor(h) % 6; var f = h - Math.floor(h); var p = 255 * v * (1 - s); var q = 255 * v * (1 - (s * f)); var t = 255 * v * (1 - (s * (1 - f))); v *= 255; switch (hi) { case 0: return [v, t, p]; case 1: return [q, v, p]; case 2: return [p, v, t]; case 3: return [p, q, v]; case 4: return [t, p, v]; case 5: return [v, p, q]; } }; convert.hsv.hsl = function (hsv) { var h = hsv[0]; var s = hsv[1] / 100; var v = hsv[2] / 100; var vmin = Math.max(v, 0.01); var lmin; var sl; var l; l = (2 - s) * v; lmin = (2 - s) * vmin; sl = s * vmin; sl /= (lmin <= 1) ? lmin : 2 - lmin; sl = sl || 0; l /= 2; return [h, sl * 100, l * 100]; }; // http://dev.w3.org/csswg/css-color/#hwb-to-rgb convert.hwb.rgb = function (hwb) { var h = hwb[0] / 360; var wh = hwb[1] / 100; var bl = hwb[2] / 100; var ratio = wh + bl; var i; var v; var f; var n; // wh + bl cant be > 1 if (ratio > 1) { wh /= ratio; bl /= ratio; } i = Math.floor(6 * h); v = 1 - bl; f = 6 * h - i; if ((i & 0x01) !== 0) { f = 1 - f; } n = wh + f * (v - wh); // linear interpolation var r; var g; var b; switch (i) { default: case 6: case 0: r = v; g = n; b = wh; break; case 1: r = n; g = v; b = wh; break; case 2: r = wh; g = v; b = n; break; case 3: r = wh; g = n; b = v; break; case 4: r = n; g = wh; b = v; break; case 5: r = v; g = wh; b = n; break; } return [r * 255, g * 255, b * 255]; }; convert.cmyk.rgb = function (cmyk) { var c = cmyk[0] / 100; var m = cmyk[1] / 100; var y = cmyk[2] / 100; var k = cmyk[3] / 100; var r; var g; var b; r = 1 - Math.min(1, c * (1 - k) + k); g = 1 - Math.min(1, m * (1 - k) + k); b = 1 - Math.min(1, y * (1 - k) + k); return [r * 255, g * 255, b * 255]; }; convert.xyz.rgb = function (xyz) { var x = xyz[0] / 100; var y = xyz[1] / 100; var z = xyz[2] / 100; var r; var g; var b; r = (x * 3.2406) + (y * -1.5372) + (z * -0.4986); g = (x * -0.9689) + (y * 1.8758) + (z * 0.0415); b = (x * 0.0557) + (y * -0.2040) + (z * 1.0570); // assume sRGB r = r > 0.0031308 ? ((1.055 * Math.pow(r, 1.0 / 2.4)) - 0.055) : r * 12.92; g = g > 0.0031308 ? ((1.055 * Math.pow(g, 1.0 / 2.4)) - 0.055) : g * 12.92; b = b > 0.0031308 ? ((1.055 * Math.pow(b, 1.0 / 2.4)) - 0.055) : b * 12.92; r = Math.min(Math.max(0, r), 1); g = Math.min(Math.max(0, g), 1); b = Math.min(Math.max(0, b), 1); return [r * 255, g * 255, b * 255]; }; convert.xyz.lab = function (xyz) { var x = xyz[0]; var y = xyz[1]; var z = xyz[2]; var l; var a; var b; x /= 95.047; y /= 100; z /= 108.883; x = x > 0.008856 ? Math.pow(x, 1 / 3) : (7.787 * x) + (16 / 116); y = y > 0.008856 ? Math.pow(y, 1 / 3) : (7.787 * y) + (16 / 116); z = z > 0.008856 ? Math.pow(z, 1 / 3) : (7.787 * z) + (16 / 116); l = (116 * y) - 16; a = 500 * (x - y); b = 200 * (y - z); return [l, a, b]; }; convert.lab.xyz = function (lab) { var l = lab[0]; var a = lab[1]; var b = lab[2]; var x; var y; var z; y = (l + 16) / 116; x = a / 500 + y; z = y - b / 200; var y2 = Math.pow(y, 3); var x2 = Math.pow(x, 3); var z2 = Math.pow(z, 3); y = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787; x = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787; z = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787; x *= 95.047; y *= 100; z *= 108.883; return [x, y, z]; }; convert.lab.lch = function (lab) { var l = lab[0]; var a = lab[1]; var b = lab[2]; var hr; var h; var c; hr = Math.atan2(b, a); h = hr * 360 / 2 / Math.PI; if (h < 0) { h += 360; } c = Math.sqrt(a * a + b * b); return [l, c, h]; }; convert.lch.lab = function (lch) { var l = lch[0]; var c = lch[1]; var h = lch[2]; var a; var b; var hr; hr = h / 360 * 2 * Math.PI; a = c * Math.cos(hr); b = c * Math.sin(hr); return [l, a, b]; }; convert.rgb.ansi16 = function (args) { var r = args[0]; var g = args[1]; var b = args[2]; var value = 1 in arguments ? arguments[1] : convert.rgb.hsv(args)[2]; // hsv -> ansi16 optimization value = Math.round(value / 50); if (value === 0) { return 30; } var ansi = 30 + ((Math.round(b / 255) << 2) | (Math.round(g / 255) << 1) | Math.round(r / 255)); if (value === 2) { ansi += 60; } return ansi; }; convert.hsv.ansi16 = function (args) { // optimization here; we already know the value and don't need to get // it converted for us. return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]); }; convert.rgb.ansi256 = function (args) { var r = args[0]; var g = args[1]; var b = args[2]; // we use the extended greyscale palette here, with the exception of // black and white. normal palette only has 4 greyscale shades. if (r === g && g === b) { if (r < 8) { return 16; } if (r > 248) { return 231; } return Math.round(((r - 8) / 247) * 24) + 232; } var ansi = 16 + (36 * Math.round(r / 255 * 5)) + (6 * Math.round(g / 255 * 5)) + Math.round(b / 255 * 5); return ansi; }; convert.ansi16.rgb = function (args) { var color = args % 10; // handle greyscale if (color === 0 || color === 7) { if (args > 50) { color += 3.5; } color = color / 10.5 * 255; return [color, color, color]; } var mult = (~~(args > 50) + 1) * 0.5; var r = ((color & 1) * mult) * 255; var g = (((color >> 1) & 1) * mult) * 255; var b = (((color >> 2) & 1) * mult) * 255; return [r, g, b]; }; convert.ansi256.rgb = function (args) { // handle greyscale if (args >= 232) { var c = (args - 232) * 10 + 8; return [c, c, c]; } args -= 16; var rem; var r = Math.floor(args / 36) / 5 * 255; var g = Math.floor((rem = args % 36) / 6) / 5 * 255; var b = (rem % 6) / 5 * 255; return [r, g, b]; }; convert.rgb.hex = function (args) { var integer = ((Math.round(args[0]) & 0xFF) << 16) + ((Math.round(args[1]) & 0xFF) << 8) + (Math.round(args[2]) & 0xFF); var string = integer.toString(16).toUpperCase(); return '000000'.substring(string.length) + string; }; convert.hex.rgb = function (args) { var match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i); if (!match) { return [0, 0, 0]; } var colorString = match[0]; if (match[0].length === 3) { colorString = colorString.split('').map(function (char) { return char + char; }).join(''); } var integer = parseInt(colorString, 16); var r = (integer >> 16) & 0xFF; var g = (integer >> 8) & 0xFF; var b = integer & 0xFF; return [r, g, b]; }; convert.rgb.hcg = function (rgb) { var r = rgb[0] / 255; var g = rgb[1] / 255; var b = rgb[2] / 255; var max = Math.max(Math.max(r, g), b); var min = Math.min(Math.min(r, g), b); var chroma = (max - min); var grayscale; var hue; if (chroma < 1) { grayscale = min / (1 - chroma); } else { grayscale = 0; } if (chroma <= 0) { hue = 0; } else if (max === r) { hue = ((g - b) / chroma) % 6; } else if (max === g) { hue = 2 + (b - r) / chroma; } else { hue = 4 + (r - g) / chroma + 4; } hue /= 6; hue %= 1; return [hue * 360, chroma * 100, grayscale * 100]; }; convert.hsl.hcg = function (hsl) { var s = hsl[1] / 100; var l = hsl[2] / 100; var c = 1; var f = 0; if (l < 0.5) { c = 2.0 * s * l; } else { c = 2.0 * s * (1.0 - l); } if (c < 1.0) { f = (l - 0.5 * c) / (1.0 - c); } return [hsl[0], c * 100, f * 100]; }; convert.hsv.hcg = function (hsv) { var s = hsv[1] / 100; var v = hsv[2] / 100; var c = s * v; var f = 0; if (c < 1.0) { f = (v - c) / (1 - c); } return [hsv[0], c * 100, f * 100]; }; convert.hcg.rgb = function (hcg) { var h = hcg[0] / 360; var c = hcg[1] / 100; var g = hcg[2] / 100; if (c === 0.0) { return [g * 255, g * 255, g * 255]; } var pure = [0, 0, 0]; var hi = (h % 1) * 6; var v = hi % 1; var w = 1 - v; var mg = 0; switch (Math.floor(hi)) { case 0: pure[0] = 1; pure[1] = v; pure[2] = 0; break; case 1: pure[0] = w; pure[1] = 1; pure[2] = 0; break; case 2: pure[0] = 0; pure[1] = 1; pure[2] = v; break; case 3: pure[0] = 0; pure[1] = w; pure[2] = 1; break; case 4: pure[0] = v; pure[1] = 0; pure[2] = 1; break; default: pure[0] = 1; pure[1] = 0; pure[2] = w; } mg = (1.0 - c) * g; return [ (c * pure[0] + mg) * 255, (c * pure[1] + mg) * 255, (c * pure[2] + mg) * 255 ]; }; convert.hcg.hsv = function (hcg) { var c = hcg[1] / 100; var g = hcg[2] / 100; var v = c + g * (1.0 - c); var f = 0; if (v > 0.0) { f = c / v; } return [hcg[0], f * 100, v * 100]; }; convert.hcg.hsl = function (hcg) { var c = hcg[1] / 100; var g = hcg[2] / 100; var l = g * (1.0 - c) + 0.5 * c; var s = 0; if (l > 0.0 && l < 0.5) { s = c / (2 * l); } else if (l >= 0.5 && l < 1.0) { s = c / (2 * (1 - l)); } return [hcg[0], s * 100, l * 100]; }; convert.hcg.hwb = function (hcg) { var c = hcg[1] / 100; var g = hcg[2] / 100; var v = c + g * (1.0 - c); return [hcg[0], (v - c) * 100, (1 - v) * 100]; }; convert.hwb.hcg = function (hwb) { var w = hwb[1] / 100; var b = hwb[2] / 100; var v = 1 - b; var c = v - w; var g = 0; if (c < 1) { g = (v - c) / (1 - c); } return [hwb[0], c * 100, g * 100]; }; convert.apple.rgb = function (apple) { return [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255]; }; convert.rgb.apple = function (rgb) { return [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535]; }; convert.gray.rgb = function (args) { return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255]; }; convert.gray.hsl = convert.gray.hsv = function (args) { return [0, 0, args[0]]; }; convert.gray.hwb = function (gray) { return [0, 100, gray[0]]; }; convert.gray.cmyk = function (gray) { return [0, 0, 0, gray[0]]; }; convert.gray.lab = function (gray) { return [gray[0], 0, 0]; }; convert.gray.hex = function (gray) { var val = Math.round(gray[0] / 100 * 255) & 0xFF; var integer = (val << 16) + (val << 8) + val; var string = integer.toString(16).toUpperCase(); return '000000'.substring(string.length) + string; }; convert.rgb.gray = function (rgb) { var val = (rgb[0] + rgb[1] + rgb[2]) / 3; return [val / 255 * 100]; }; /***/ }), /***/ "./node_modules/color-convert/index.js": /*!*********************************************!*\ !*** ./node_modules/color-convert/index.js ***! \*********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var conversions = __webpack_require__(/*! ./conversions */ "./node_modules/color-convert/conversions.js"); var route = __webpack_require__(/*! ./route */ "./node_modules/color-convert/route.js"); var convert = {}; var models = Object.keys(conversions); function wrapRaw(fn) { var wrappedFn = function (args) { if (args === undefined || args === null) { return args; } if (arguments.length > 1) { args = Array.prototype.slice.call(arguments); } return fn(args); }; // preserve .conversion property if there is one if ('conversion' in fn) { wrappedFn.conversion = fn.conversion; } return wrappedFn; } function wrapRounded(fn) { var wrappedFn = function (args) { if (args === undefined || args === null) { return args; } if (arguments.length > 1) { args = Array.prototype.slice.call(arguments); } var result = fn(args); // we're assuming the result is an array here. // see notice in conversions.js; don't use box types // in conversion functions. if (typeof result === 'object') { for (var len = result.length, i = 0; i < len; i++) { result[i] = Math.round(result[i]); } } return result; }; // preserve .conversion property if there is one if ('conversion' in fn) { wrappedFn.conversion = fn.conversion; } return wrappedFn; } models.forEach(function (fromModel) { convert[fromModel] = {}; Object.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels}); Object.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels}); var routes = route(fromModel); var routeModels = Object.keys(routes); routeModels.forEach(function (toModel) { var fn = routes[toModel]; convert[fromModel][toModel] = wrapRounded(fn); convert[fromModel][toModel].raw = wrapRaw(fn); }); }); module.exports = convert; /***/ }), /***/ "./node_modules/color-convert/route.js": /*!*********************************************!*\ !*** ./node_modules/color-convert/route.js ***! \*********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var conversions = __webpack_require__(/*! ./conversions */ "./node_modules/color-convert/conversions.js"); /* this function routes a model to all other models. all functions that are routed have a property `.conversion` attached to the returned synthetic function. This property is an array of strings, each with the steps in between the 'from' and 'to' color models (inclusive). conversions that are not possible simply are not included. */ function buildGraph() { var graph = {}; // https://jsperf.com/object-keys-vs-for-in-with-closure/3 var models = Object.keys(conversions); for (var len = models.length, i = 0; i < len; i++) { graph[models[i]] = { // http://jsperf.com/1-vs-infinity // micro-opt, but this is simple. distance: -1, parent: null }; } return graph; } // https://en.wikipedia.org/wiki/Breadth-first_search function deriveBFS(fromModel) { var graph = buildGraph(); var queue = [fromModel]; // unshift -> queue -> pop graph[fromModel].distance = 0; while (queue.length) { var current = queue.pop(); var adjacents = Object.keys(conversions[current]); for (var len = adjacents.length, i = 0; i < len; i++) { var adjacent = adjacents[i]; var node = graph[adjacent]; if (node.distance === -1) { node.distance = graph[current].distance + 1; node.parent = current; queue.unshift(adjacent); } } } return graph; } function link(from, to) { return function (args) { return to(from(args)); }; } function wrapConversion(toModel, graph) { var path = [graph[toModel].parent, toModel]; var fn = conversions[graph[toModel].parent][toModel]; var cur = graph[toModel].parent; while (graph[cur].parent) { path.unshift(graph[cur].parent); fn = link(conversions[graph[cur].parent][cur], fn); cur = graph[cur].parent; } fn.conversion = path; return fn; } module.exports = function (fromModel) { var graph = deriveBFS(fromModel); var conversion = {}; var models = Object.keys(graph); for (var len = models.length, i = 0; i < len; i++) { var toModel = models[i]; var node = graph[toModel]; if (node.parent === null) { // no possible conversion, or this node is the source model. continue; } conversion[toModel] = wrapConversion(toModel, graph); } return conversion; }; /***/ }), /***/ "./node_modules/color-name/index.js": /*!******************************************!*\ !*** ./node_modules/color-name/index.js ***! \******************************************/ /***/ (function(module) { "use strict"; module.exports = { "aliceblue": [240, 248, 255], "antiquewhite": [250, 235, 215], "aqua": [0, 255, 255], "aquamarine": [127, 255, 212], "azure": [240, 255, 255], "beige": [245, 245, 220], "bisque": [255, 228, 196], "black": [0, 0, 0], "blanchedalmond": [255, 235, 205], "blue": [0, 0, 255], "blueviolet": [138, 43, 226], "brown": [165, 42, 42], "burlywood": [222, 184, 135], "cadetblue": [95, 158, 160], "chartreuse": [127, 255, 0], "chocolate": [210, 105, 30], "coral": [255, 127, 80], "cornflowerblue": [100, 149, 237], "cornsilk": [255, 248, 220], "crimson": [220, 20, 60], "cyan": [0, 255, 255], "darkblue": [0, 0, 139], "darkcyan": [0, 139, 139], "darkgoldenrod": [184, 134, 11], "darkgray": [169, 169, 169], "darkgreen": [0, 100, 0], "darkgrey": [169, 169, 169], "darkkhaki": [189, 183, 107], "darkmagenta": [139, 0, 139], "darkolivegreen": [85, 107, 47], "darkorange": [255, 140, 0], "darkorchid": [153, 50, 204], "darkred": [139, 0, 0], "darksalmon": [233, 150, 122], "darkseagreen": [143, 188, 143], "darkslateblue": [72, 61, 139], "darkslategray": [47, 79, 79], "darkslategrey": [47, 79, 79], "darkturquoise": [0, 206, 209], "darkviolet": [148, 0, 211], "deeppink": [255, 20, 147], "deepskyblue": [0, 191, 255], "dimgray": [105, 105, 105], "dimgrey": [105, 105, 105], "dodgerblue": [30, 144, 255], "firebrick": [178, 34, 34], "floralwhite": [255, 250, 240], "forestgreen": [34, 139, 34], "fuchsia": [255, 0, 255], "gainsboro": [220, 220, 220], "ghostwhite": [248, 248, 255], "gold": [255, 215, 0], "goldenrod": [218, 165, 32], "gray": [128, 128, 128], "green": [0, 128, 0], "greenyellow": [173, 255, 47], "grey": [128, 128, 128], "honeydew": [240, 255, 240], "hotpink": [255, 105, 180], "indianred": [205, 92, 92], "indigo": [75, 0, 130], "ivory": [255, 255, 240], "khaki": [240, 230, 140], "lavender": [230, 230, 250], "lavenderblush": [255, 240, 245], "lawngreen": [124, 252, 0], "lemonchiffon": [255, 250, 205], "lightblue": [173, 216, 230], "lightcoral": [240, 128, 128], "lightcyan": [224, 255, 255], "lightgoldenrodyellow": [250, 250, 210], "lightgray": [211, 211, 211], "lightgreen": [144, 238, 144], "lightgrey": [211, 211, 211], "lightpink": [255, 182, 193], "lightsalmon": [255, 160, 122], "lightseagreen": [32, 178, 170], "lightskyblue": [135, 206, 250], "lightslategray": [119, 136, 153], "lightslategrey": [119, 136, 153], "lightsteelblue": [176, 196, 222], "lightyellow": [255, 255, 224], "lime": [0, 255, 0], "limegreen": [50, 205, 50], "linen": [250, 240, 230], "magenta": [255, 0, 255], "maroon": [128, 0, 0], "mediumaquamarine": [102, 205, 170], "mediumblue": [0, 0, 205], "mediumorchid": [186, 85, 211], "mediumpurple": [147, 112, 219], "mediumseagreen": [60, 179, 113], "mediumslateblue": [123, 104, 238], "mediumspringgreen": [0, 250, 154], "mediumturquoise": [72, 209, 204], "mediumvioletred": [199, 21, 133], "midnightblue": [25, 25, 112], "mintcream": [245, 255, 250], "mistyrose": [255, 228, 225], "moccasin": [255, 228, 181], "navajowhite": [255, 222, 173], "navy": [0, 0, 128], "oldlace": [253, 245, 230], "olive": [128, 128, 0], "olivedrab": [107, 142, 35], "orange": [255, 165, 0], "orangered": [255, 69, 0], "orchid": [218, 112, 214], "palegoldenrod": [238, 232, 170], "palegreen": [152, 251, 152], "paleturquoise": [175, 238, 238], "palevioletred": [219, 112, 147], "papayawhip": [255, 239, 213], "peachpuff": [255, 218, 185], "peru": [205, 133, 63], "pink": [255, 192, 203], "plum": [221, 160, 221], "powderblue": [176, 224, 230], "purple": [128, 0, 128], "rebeccapurple": [102, 51, 153], "red": [255, 0, 0], "rosybrown": [188, 143, 143], "royalblue": [65, 105, 225], "saddlebrown": [139, 69, 19], "salmon": [250, 128, 114], "sandybrown": [244, 164, 96], "seagreen": [46, 139, 87], "seashell": [255, 245, 238], "sienna": [160, 82, 45], "silver": [192, 192, 192], "skyblue": [135, 206, 235], "slateblue": [106, 90, 205], "slategray": [112, 128, 144], "slategrey": [112, 128, 144], "snow": [255, 250, 250], "springgreen": [0, 255, 127], "steelblue": [70, 130, 180], "tan": [210, 180, 140], "teal": [0, 128, 128], "thistle": [216, 191, 216], "tomato": [255, 99, 71], "turquoise": [64, 224, 208], "violet": [238, 130, 238], "wheat": [245, 222, 179], "white": [255, 255, 255], "whitesmoke": [245, 245, 245], "yellow": [255, 255, 0], "yellowgreen": [154, 205, 50] }; /***/ }), /***/ "./node_modules/color-string/index.js": /*!********************************************!*\ !*** ./node_modules/color-string/index.js ***! \********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { /* MIT license */ var colorNames = __webpack_require__(/*! color-name */ "./node_modules/color-name/index.js"); var swizzle = __webpack_require__(/*! simple-swizzle */ "./node_modules/simple-swizzle/index.js"); var hasOwnProperty = Object.hasOwnProperty; var reverseNames = Object.create(null); // create a list of reverse color names for (var name in colorNames) { if (hasOwnProperty.call(colorNames, name)) { reverseNames[colorNames[name]] = name; } } var cs = module.exports = { to: {}, get: {} }; cs.get = function (string) { var prefix = string.substring(0, 3).toLowerCase(); var val; var model; switch (prefix) { case 'hsl': val = cs.get.hsl(string); model = 'hsl'; break; case 'hwb': val = cs.get.hwb(string); model = 'hwb'; break; default: val = cs.get.rgb(string); model = 'rgb'; break; } if (!val) { return null; } return {model: model, value: val}; }; cs.get.rgb = function (string) { if (!string) { return null; } var abbr = /^#([a-f0-9]{3,4})$/i; var hex = /^#([a-f0-9]{6})([a-f0-9]{2})?$/i; var rgba = /^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/; var per = /^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/; var keyword = /^(\w+)$/; var rgb = [0, 0, 0, 1]; var match; var i; var hexAlpha; if (match = string.match(hex)) { hexAlpha = match[2]; match = match[1]; for (i = 0; i < 3; i++) { // https://jsperf.com/slice-vs-substr-vs-substring-methods-long-string/19 var i2 = i * 2; rgb[i] = parseInt(match.slice(i2, i2 + 2), 16); } if (hexAlpha) { rgb[3] = parseInt(hexAlpha, 16) / 255; } } else if (match = string.match(abbr)) { match = match[1]; hexAlpha = match[3]; for (i = 0; i < 3; i++) { rgb[i] = parseInt(match[i] + match[i], 16); } if (hexAlpha) { rgb[3] = parseInt(hexAlpha + hexAlpha, 16) / 255; } } else if (match = string.match(rgba)) { for (i = 0; i < 3; i++) { rgb[i] = parseInt(match[i + 1], 0); } if (match[4]) { if (match[5]) { rgb[3] = parseFloat(match[4]) * 0.01; } else { rgb[3] = parseFloat(match[4]); } } } else if (match = string.match(per)) { for (i = 0; i < 3; i++) { rgb[i] = Math.round(parseFloat(match[i + 1]) * 2.55); } if (match[4]) { if (match[5]) { rgb[3] = parseFloat(match[4]) * 0.01; } else { rgb[3] = parseFloat(match[4]); } } } else if (match = string.match(keyword)) { if (match[1] === 'transparent') { return [0, 0, 0, 0]; } if (!hasOwnProperty.call(colorNames, match[1])) { return null; } rgb = colorNames[match[1]]; rgb[3] = 1; return rgb; } else { return null; } for (i = 0; i < 3; i++) { rgb[i] = clamp(rgb[i], 0, 255); } rgb[3] = clamp(rgb[3], 0, 1); return rgb; }; cs.get.hsl = function (string) { if (!string) { return null; } var hsl = /^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/; var match = string.match(hsl); if (match) { var alpha = parseFloat(match[4]); var h = ((parseFloat(match[1]) % 360) + 360) % 360; var s = clamp(parseFloat(match[2]), 0, 100); var l = clamp(parseFloat(match[3]), 0, 100); var a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1); return [h, s, l, a]; } return null; }; cs.get.hwb = function (string) { if (!string) { return null; } var hwb = /^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/; var match = string.match(hwb); if (match) { var alpha = parseFloat(match[4]); var h = ((parseFloat(match[1]) % 360) + 360) % 360; var w = clamp(parseFloat(match[2]), 0, 100); var b = clamp(parseFloat(match[3]), 0, 100); var a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1); return [h, w, b, a]; } return null; }; cs.to.hex = function () { var rgba = swizzle(arguments); return ( '#' + hexDouble(rgba[0]) + hexDouble(rgba[1]) + hexDouble(rgba[2]) + (rgba[3] < 1 ? (hexDouble(Math.round(rgba[3] * 255))) : '') ); }; cs.to.rgb = function () { var rgba = swizzle(arguments); return rgba.length < 4 || rgba[3] === 1 ? 'rgb(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ')' : 'rgba(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ', ' + rgba[3] + ')'; }; cs.to.rgb.percent = function () { var rgba = swizzle(arguments); var r = Math.round(rgba[0] / 255 * 100); var g = Math.round(rgba[1] / 255 * 100); var b = Math.round(rgba[2] / 255 * 100); return rgba.length < 4 || rgba[3] === 1 ? 'rgb(' + r + '%, ' + g + '%, ' + b + '%)' : 'rgba(' + r + '%, ' + g + '%, ' + b + '%, ' + rgba[3] + ')'; }; cs.to.hsl = function () { var hsla = swizzle(arguments); return hsla.length < 4 || hsla[3] === 1 ? 'hsl(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%)' : 'hsla(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%, ' + hsla[3] + ')'; }; // hwb is a bit different than rgb(a) & hsl(a) since there is no alpha specific syntax // (hwb have alpha optional & 1 is default value) cs.to.hwb = function () { var hwba = swizzle(arguments); var a = ''; if (hwba.length >= 4 && hwba[3] !== 1) { a = ', ' + hwba[3]; } return 'hwb(' + hwba[0] + ', ' + hwba[1] + '%, ' + hwba[2] + '%' + a + ')'; }; cs.to.keyword = function (rgb) { return reverseNames[rgb.slice(0, 3)]; }; // helpers function clamp(num, min, max) { return Math.min(Math.max(min, num), max); } function hexDouble(num) { var str = Math.round(num).toString(16).toUpperCase(); return (str.length < 2) ? '0' + str : str; } /***/ }), /***/ "./node_modules/color/index.js": /*!*************************************!*\ !*** ./node_modules/color/index.js ***! \*************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var colorString = __webpack_require__(/*! color-string */ "./node_modules/color-string/index.js"); var convert = __webpack_require__(/*! color-convert */ "./node_modules/color-convert/index.js"); var _slice = [].slice; var skippedModels = [ // to be honest, I don't really feel like keyword belongs in color convert, but eh. 'keyword', // gray conflicts with some method names, and has its own method defined. 'gray', // shouldn't really be in color-convert either... 'hex' ]; var hashedModelKeys = {}; Object.keys(convert).forEach(function (model) { hashedModelKeys[_slice.call(convert[model].labels).sort().join('')] = model; }); var limiters = {}; function Color(obj, model) { if (!(this instanceof Color)) { return new Color(obj, model); } if (model && model in skippedModels) { model = null; } if (model && !(model in convert)) { throw new Error('Unknown model: ' + model); } var i; var channels; if (obj == null) { // eslint-disable-line no-eq-null,eqeqeq this.model = 'rgb'; this.color = [0, 0, 0]; this.valpha = 1; } else if (obj instanceof Color) { this.model = obj.model; this.color = obj.color.slice(); this.valpha = obj.valpha; } else if (typeof obj === 'string') { var result = colorString.get(obj); if (result === null) { throw new Error('Unable to parse color from string: ' + obj); } this.model = result.model; channels = convert[this.model].channels; this.color = result.value.slice(0, channels); this.valpha = typeof result.value[channels] === 'number' ? result.value[channels] : 1; } else if (obj.length) { this.model = model || 'rgb'; channels = convert[this.model].channels; var newArr = _slice.call(obj, 0, channels); this.color = zeroArray(newArr, channels); this.valpha = typeof obj[channels] === 'number' ? obj[channels] : 1; } else if (typeof obj === 'number') { // this is always RGB - can be converted later on. obj &= 0xFFFFFF; this.model = 'rgb'; this.color = [ (obj >> 16) & 0xFF, (obj >> 8) & 0xFF, obj & 0xFF ]; this.valpha = 1; } else { this.valpha = 1; var keys = Object.keys(obj); if ('alpha' in obj) { keys.splice(keys.indexOf('alpha'), 1); this.valpha = typeof obj.alpha === 'number' ? obj.alpha : 0; } var hashedKeys = keys.sort().join(''); if (!(hashedKeys in hashedModelKeys)) { throw new Error('Unable to parse color from object: ' + JSON.stringify(obj)); } this.model = hashedModelKeys[hashedKeys]; var labels = convert[this.model].labels; var color = []; for (i = 0; i < labels.length; i++) { color.push(obj[labels[i]]); } this.color = zeroArray(color); } // perform limitations (clamping, etc.) if (limiters[this.model]) { channels = convert[this.model].channels; for (i = 0; i < channels; i++) { var limit = limiters[this.model][i]; if (limit) { this.color[i] = limit(this.color[i]); } } } this.valpha = Math.max(0, Math.min(1, this.valpha)); if (Object.freeze) { Object.freeze(this); } } Color.prototype = { toString: function () { return this.string(); }, toJSON: function () { return this[this.model](); }, string: function (places) { var self = this.model in colorString.to ? this : this.rgb(); self = self.round(typeof places === 'number' ? places : 1); var args = self.valpha === 1 ? self.color : self.color.concat(this.valpha); return colorString.to[self.model](args); }, percentString: function (places) { var self = this.rgb().round(typeof places === 'number' ? places : 1); var args = self.valpha === 1 ? self.color : self.color.concat(this.valpha); return colorString.to.rgb.percent(args); }, array: function () { return this.valpha === 1 ? this.color.slice() : this.color.concat(this.valpha); }, object: function () { var result = {}; var channels = convert[this.model].channels; var labels = convert[this.model].labels; for (var i = 0; i < channels; i++) { result[labels[i]] = this.color[i]; } if (this.valpha !== 1) { result.alpha = this.valpha; } return result; }, unitArray: function () { var rgb = this.rgb().color; rgb[0] /= 255; rgb[1] /= 255; rgb[2] /= 255; if (this.valpha !== 1) { rgb.push(this.valpha); } return rgb; }, unitObject: function () { var rgb = this.rgb().object(); rgb.r /= 255; rgb.g /= 255; rgb.b /= 255; if (this.valpha !== 1) { rgb.alpha = this.valpha; } return rgb; }, round: function (places) { places = Math.max(places || 0, 0); return new Color(this.color.map(roundToPlace(places)).concat(this.valpha), this.model); }, alpha: function (val) { if (arguments.length) { return new Color(this.color.concat(Math.max(0, Math.min(1, val))), this.model); } return this.valpha; }, // rgb red: getset('rgb', 0, maxfn(255)), green: getset('rgb', 1, maxfn(255)), blue: getset('rgb', 2, maxfn(255)), hue: getset(['hsl', 'hsv', 'hsl', 'hwb', 'hcg'], 0, function (val) { return ((val % 360) + 360) % 360; }), // eslint-disable-line brace-style saturationl: getset('hsl', 1, maxfn(100)), lightness: getset('hsl', 2, maxfn(100)), saturationv: getset('hsv', 1, maxfn(100)), value: getset('hsv', 2, maxfn(100)), chroma: getset('hcg', 1, maxfn(100)), gray: getset('hcg', 2, maxfn(100)), white: getset('hwb', 1, maxfn(100)), wblack: getset('hwb', 2, maxfn(100)), cyan: getset('cmyk', 0, maxfn(100)), magenta: getset('cmyk', 1, maxfn(100)), yellow: getset('cmyk', 2, maxfn(100)), black: getset('cmyk', 3, maxfn(100)), x: getset('xyz', 0, maxfn(100)), y: getset('xyz', 1, maxfn(100)), z: getset('xyz', 2, maxfn(100)), l: getset('lab', 0, maxfn(100)), a: getset('lab', 1), b: getset('lab', 2), keyword: function (val) { if (arguments.length) { return new Color(val); } return convert[this.model].keyword(this.color); }, hex: function (val) { if (arguments.length) { return new Color(val); } return colorString.to.hex(this.rgb().round().color); }, rgbNumber: function () { var rgb = this.rgb().color; return ((rgb[0] & 0xFF) << 16) | ((rgb[1] & 0xFF) << 8) | (rgb[2] & 0xFF); }, luminosity: function () { // http://www.w3.org/TR/WCAG20/#relativeluminancedef var rgb = this.rgb().color; var lum = []; for (var i = 0; i < rgb.length; i++) { var chan = rgb[i] / 255; lum[i] = (chan <= 0.03928) ? chan / 12.92 : Math.pow(((chan + 0.055) / 1.055), 2.4); } return 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2]; }, contrast: function (color2) { // http://www.w3.org/TR/WCAG20/#contrast-ratiodef var lum1 = this.luminosity(); var lum2 = color2.luminosity(); if (lum1 > lum2) { return (lum1 + 0.05) / (lum2 + 0.05); } return (lum2 + 0.05) / (lum1 + 0.05); }, level: function (color2) { var contrastRatio = this.contrast(color2); if (contrastRatio >= 7.1) { return 'AAA'; } return (contrastRatio >= 4.5) ? 'AA' : ''; }, isDark: function () { // YIQ equation from http://24ways.org/2010/calculating-color-contrast var rgb = this.rgb().color; var yiq = (rgb[0] * 299 + rgb[1] * 587 + rgb[2] * 114) / 1000; return yiq < 128; }, isLight: function () { return !this.isDark(); }, negate: function () { var rgb = this.rgb(); for (var i = 0; i < 3; i++) { rgb.color[i] = 255 - rgb.color[i]; } return rgb; }, lighten: function (ratio) { var hsl = this.hsl(); hsl.color[2] += hsl.color[2] * ratio; return hsl; }, darken: function (ratio) { var hsl = this.hsl(); hsl.color[2] -= hsl.color[2] * ratio; return hsl; }, saturate: function (ratio) { var hsl = this.hsl(); hsl.color[1] += hsl.color[1] * ratio; return hsl; }, desaturate: function (ratio) { var hsl = this.hsl(); hsl.color[1] -= hsl.color[1] * ratio; return hsl; }, whiten: function (ratio) { var hwb = this.hwb(); hwb.color[1] += hwb.color[1] * ratio; return hwb; }, blacken: function (ratio) { var hwb = this.hwb(); hwb.color[2] += hwb.color[2] * ratio; return hwb; }, grayscale: function () { // http://en.wikipedia.org/wiki/Grayscale#Converting_color_to_grayscale var rgb = this.rgb().color; var val = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11; return Color.rgb(val, val, val); }, fade: function (ratio) { return this.alpha(this.valpha - (this.valpha * ratio)); }, opaquer: function (ratio) { return this.alpha(this.valpha + (this.valpha * ratio)); }, rotate: function (degrees) { var hsl = this.hsl(); var hue = hsl.color[0]; hue = (hue + degrees) % 360; hue = hue < 0 ? 360 + hue : hue; hsl.color[0] = hue; return hsl; }, mix: function (mixinColor, weight) { // ported from sass implementation in C // https://github.com/sass/libsass/blob/0e6b4a2850092356aa3ece07c6b249f0221caced/functions.cpp#L209 if (!mixinColor || !mixinColor.rgb) { throw new Error('Argument to "mix" was not a Color instance, but rather an instance of ' + typeof mixinColor); } var color1 = mixinColor.rgb(); var color2 = this.rgb(); var p = weight === undefined ? 0.5 : weight; var w = 2 * p - 1; var a = color1.alpha() - color2.alpha(); var w1 = (((w * a === -1) ? w : (w + a) / (1 + w * a)) + 1) / 2.0; var w2 = 1 - w1; return Color.rgb( w1 * color1.red() + w2 * color2.red(), w1 * color1.green() + w2 * color2.green(), w1 * color1.blue() + w2 * color2.blue(), color1.alpha() * p + color2.alpha() * (1 - p)); } }; // model conversion methods and static constructors Object.keys(convert).forEach(function (model) { if (skippedModels.indexOf(model) !== -1) { return; } var channels = convert[model].channels; // conversion methods Color.prototype[model] = function () { if (this.model === model) { return new Color(this); } if (arguments.length) { return new Color(arguments, model); } var newAlpha = typeof arguments[channels] === 'number' ? channels : this.valpha; return new Color(assertArray(convert[this.model][model].raw(this.color)).concat(newAlpha), model); }; // 'static' construction methods Color[model] = function (color) { if (typeof color === 'number') { color = zeroArray(_slice.call(arguments), channels); } return new Color(color, model); }; }); function roundTo(num, places) { return Number(num.toFixed(places)); } function roundToPlace(places) { return function (num) { return roundTo(num, places); }; } function getset(model, channel, modifier) { model = Array.isArray(model) ? model : [model]; model.forEach(function (m) { (limiters[m] || (limiters[m] = []))[channel] = modifier; }); model = model[0]; return function (val) { var result; if (arguments.length) { if (modifier) { val = modifier(val); } result = this[model](); result.color[channel] = val; return result; } result = this[model]().color[channel]; if (modifier) { result = modifier(result); } return result; }; } function maxfn(max) { return function (v) { return Math.max(0, Math.min(max, v)); }; } function assertArray(val) { return Array.isArray(val) ? val : [val]; } function zeroArray(arr, length) { for (var i = 0; i < length; i++) { if (typeof arr[i] !== 'number') { arr[i] = 0; } } return arr; } module.exports = Color; /***/ }), /***/ "./node_modules/cookie/index.js": /*!**************************************!*\ !*** ./node_modules/cookie/index.js ***! \**************************************/ /***/ (function(__unused_webpack_module, exports) { "use strict"; /*! * cookie * Copyright(c) 2012-2014 Roman Shtylman * Copyright(c) 2015 Douglas Christopher Wilson * MIT Licensed */ /** * Module exports. * @public */ exports.parse = parse; exports.serialize = serialize; /** * Module variables. * @private */ var __toString = Object.prototype.toString /** * RegExp to match field-content in RFC 7230 sec 3.2 * * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ] * field-vchar = VCHAR / obs-text * obs-text = %x80-FF */ var fieldContentRegExp = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/; /** * Parse a cookie header. * * Parse the given cookie header string into an object * The object has the various cookies as keys(names) => values * * @param {string} str * @param {object} [options] * @return {object} * @public */ function parse(str, options) { if (typeof str !== 'string') { throw new TypeError('argument str must be a string'); } var obj = {} var opt = options || {}; var dec = opt.decode || decode; var index = 0 while (index < str.length) { var eqIdx = str.indexOf('=', index) // no more cookie pairs if (eqIdx === -1) { break } var endIdx = str.indexOf(';', index) if (endIdx === -1) { endIdx = str.length } else if (endIdx < eqIdx) { // backtrack on prior semicolon index = str.lastIndexOf(';', eqIdx - 1) + 1 continue } var key = str.slice(index, eqIdx).trim() // only assign once if (undefined === obj[key]) { var val = str.slice(eqIdx + 1, endIdx).trim() // quoted values if (val.charCodeAt(0) === 0x22) { val = val.slice(1, -1) } obj[key] = tryDecode(val, dec); } index = endIdx + 1 } return obj; } /** * Serialize data into a cookie header. * * Serialize the a name value pair into a cookie string suitable for * http headers. An optional options object specified cookie parameters. * * serialize('foo', 'bar', { httpOnly: true }) * => "foo=bar; httpOnly" * * @param {string} name * @param {string} val * @param {object} [options] * @return {string} * @public */ function serialize(name, val, options) { var opt = options || {}; var enc = opt.encode || encode; if (typeof enc !== 'function') { throw new TypeError('option encode is invalid'); } if (!fieldContentRegExp.test(name)) { throw new TypeError('argument name is invalid'); } var value = enc(val); if (value && !fieldContentRegExp.test(value)) { throw new TypeError('argument val is invalid'); } var str = name + '=' + value; if (null != opt.maxAge) { var maxAge = opt.maxAge - 0; if (isNaN(maxAge) || !isFinite(maxAge)) { throw new TypeError('option maxAge is invalid') } str += '; Max-Age=' + Math.floor(maxAge); } if (opt.domain) { if (!fieldContentRegExp.test(opt.domain)) { throw new TypeError('option domain is invalid'); } str += '; Domain=' + opt.domain; } if (opt.path) { if (!fieldContentRegExp.test(opt.path)) { throw new TypeError('option path is invalid'); } str += '; Path=' + opt.path; } if (opt.expires) { var expires = opt.expires if (!isDate(expires) || isNaN(expires.valueOf())) { throw new TypeError('option expires is invalid'); } str += '; Expires=' + expires.toUTCString() } if (opt.httpOnly) { str += '; HttpOnly'; } if (opt.secure) { str += '; Secure'; } if (opt.priority) { var priority = typeof opt.priority === 'string' ? opt.priority.toLowerCase() : opt.priority switch (priority) { case 'low': str += '; Priority=Low' break case 'medium': str += '; Priority=Medium' break case 'high': str += '; Priority=High' break default: throw new TypeError('option priority is invalid') } } if (opt.sameSite) { var sameSite = typeof opt.sameSite === 'string' ? opt.sameSite.toLowerCase() : opt.sameSite; switch (sameSite) { case true: str += '; SameSite=Strict'; break; case 'lax': str += '; SameSite=Lax'; break; case 'strict': str += '; SameSite=Strict'; break; case 'none': str += '; SameSite=None'; break; default: throw new TypeError('option sameSite is invalid'); } } return str; } /** * URL-decode string value. Optimized to skip native call when no %. * * @param {string} str * @returns {string} */ function decode (str) { return str.indexOf('%') !== -1 ? decodeURIComponent(str) : str } /** * URL-encode value. * * @param {string} str * @returns {string} */ function encode (val) { return encodeURIComponent(val) } /** * Determine if value is a Date. * * @param {*} val * @private */ function isDate (val) { return __toString.call(val) === '[object Date]' || val instanceof Date } /** * Try decoding a string using a decoding function. * * @param {string} str * @param {function} decode * @private */ function tryDecode(str, decode) { try { return decode(str); } catch (e) { return str; } } /***/ }), /***/ "./node_modules/cose-base/cose-base.js": /*!*********************************************!*\ !*** ./node_modules/cose-base/cose-base.js ***! \*********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { (function webpackUniversalModuleDefinition(root, factory) { if(true) module.exports = factory(__webpack_require__(/*! layout-base */ "./node_modules/layout-base/layout-base.js")); else {} })(this, function(__WEBPACK_EXTERNAL_MODULE__551__) { return /******/ (() => { // webpackBootstrap /******/ "use strict"; /******/ var __webpack_modules__ = ({ /***/ 45: /***/ ((module, __unused_webpack_exports, __nested_webpack_require_630__) => { var coseBase = {}; coseBase.layoutBase = __nested_webpack_require_630__(551); coseBase.CoSEConstants = __nested_webpack_require_630__(806); coseBase.CoSEEdge = __nested_webpack_require_630__(767); coseBase.CoSEGraph = __nested_webpack_require_630__(880); coseBase.CoSEGraphManager = __nested_webpack_require_630__(578); coseBase.CoSELayout = __nested_webpack_require_630__(765); coseBase.CoSENode = __nested_webpack_require_630__(991); coseBase.ConstraintHandler = __nested_webpack_require_630__(902); module.exports = coseBase; /***/ }), /***/ 806: /***/ ((module, __unused_webpack_exports, __nested_webpack_require_1167__) => { var FDLayoutConstants = __nested_webpack_require_1167__(551).FDLayoutConstants; function CoSEConstants() {} //CoSEConstants inherits static props in FDLayoutConstants for (var prop in FDLayoutConstants) { CoSEConstants[prop] = FDLayoutConstants[prop]; } CoSEConstants.DEFAULT_USE_MULTI_LEVEL_SCALING = false; CoSEConstants.DEFAULT_RADIAL_SEPARATION = FDLayoutConstants.DEFAULT_EDGE_LENGTH; CoSEConstants.DEFAULT_COMPONENT_SEPERATION = 60; CoSEConstants.TILE = true; CoSEConstants.TILING_PADDING_VERTICAL = 10; CoSEConstants.TILING_PADDING_HORIZONTAL = 10; CoSEConstants.TRANSFORM_ON_CONSTRAINT_HANDLING = true; CoSEConstants.ENFORCE_CONSTRAINTS = true; CoSEConstants.APPLY_LAYOUT = true; CoSEConstants.RELAX_MOVEMENT_ON_CONSTRAINTS = true; CoSEConstants.TREE_REDUCTION_ON_INCREMENTAL = true; // this should be set to false if there will be a constraint // This constant is for differentiating whether actual layout algorithm that uses cose-base wants to apply only incremental layout or // an incremental layout on top of a randomized layout. If it is only incremental layout, then this constant should be true. CoSEConstants.PURE_INCREMENTAL = CoSEConstants.DEFAULT_INCREMENTAL; module.exports = CoSEConstants; /***/ }), /***/ 767: /***/ ((module, __unused_webpack_exports, __nested_webpack_require_2468__) => { var FDLayoutEdge = __nested_webpack_require_2468__(551).FDLayoutEdge; function CoSEEdge(source, target, vEdge) { FDLayoutEdge.call(this, source, target, vEdge); } CoSEEdge.prototype = Object.create(FDLayoutEdge.prototype); for (var prop in FDLayoutEdge) { CoSEEdge[prop] = FDLayoutEdge[prop]; } module.exports = CoSEEdge; /***/ }), /***/ 880: /***/ ((module, __unused_webpack_exports, __nested_webpack_require_2879__) => { var LGraph = __nested_webpack_require_2879__(551).LGraph; function CoSEGraph(parent, graphMgr, vGraph) { LGraph.call(this, parent, graphMgr, vGraph); } CoSEGraph.prototype = Object.create(LGraph.prototype); for (var prop in LGraph) { CoSEGraph[prop] = LGraph[prop]; } module.exports = CoSEGraph; /***/ }), /***/ 578: /***/ ((module, __unused_webpack_exports, __nested_webpack_require_3264__) => { var LGraphManager = __nested_webpack_require_3264__(551).LGraphManager; function CoSEGraphManager(layout) { LGraphManager.call(this, layout); } CoSEGraphManager.prototype = Object.create(LGraphManager.prototype); for (var prop in LGraphManager) { CoSEGraphManager[prop] = LGraphManager[prop]; } module.exports = CoSEGraphManager; /***/ }), /***/ 765: /***/ ((module, __unused_webpack_exports, __nested_webpack_require_3683__) => { var FDLayout = __nested_webpack_require_3683__(551).FDLayout; var CoSEGraphManager = __nested_webpack_require_3683__(578); var CoSEGraph = __nested_webpack_require_3683__(880); var CoSENode = __nested_webpack_require_3683__(991); var CoSEEdge = __nested_webpack_require_3683__(767); var CoSEConstants = __nested_webpack_require_3683__(806); var ConstraintHandler = __nested_webpack_require_3683__(902); var FDLayoutConstants = __nested_webpack_require_3683__(551).FDLayoutConstants; var LayoutConstants = __nested_webpack_require_3683__(551).LayoutConstants; var Point = __nested_webpack_require_3683__(551).Point; var PointD = __nested_webpack_require_3683__(551).PointD; var DimensionD = __nested_webpack_require_3683__(551).DimensionD; var Layout = __nested_webpack_require_3683__(551).Layout; var Integer = __nested_webpack_require_3683__(551).Integer; var IGeometry = __nested_webpack_require_3683__(551).IGeometry; var LGraph = __nested_webpack_require_3683__(551).LGraph; var Transform = __nested_webpack_require_3683__(551).Transform; var LinkedList = __nested_webpack_require_3683__(551).LinkedList; function CoSELayout() { FDLayout.call(this); this.toBeTiled = {}; // Memorize if a node is to be tiled or is tiled this.constraints = {}; // keep layout constraints } CoSELayout.prototype = Object.create(FDLayout.prototype); for (var prop in FDLayout) { CoSELayout[prop] = FDLayout[prop]; } CoSELayout.prototype.newGraphManager = function () { var gm = new CoSEGraphManager(this); this.graphManager = gm; return gm; }; CoSELayout.prototype.newGraph = function (vGraph) { return new CoSEGraph(null, this.graphManager, vGraph); }; CoSELayout.prototype.newNode = function (vNode) { return new CoSENode(this.graphManager, vNode); }; CoSELayout.prototype.newEdge = function (vEdge) { return new CoSEEdge(null, null, vEdge); }; CoSELayout.prototype.initParameters = function () { FDLayout.prototype.initParameters.call(this, arguments); if (!this.isSubLayout) { if (CoSEConstants.DEFAULT_EDGE_LENGTH < 10) { this.idealEdgeLength = 10; } else { this.idealEdgeLength = CoSEConstants.DEFAULT_EDGE_LENGTH; } this.useSmartIdealEdgeLengthCalculation = CoSEConstants.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION; this.gravityConstant = FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH; this.compoundGravityConstant = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH; this.gravityRangeFactor = FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR; this.compoundGravityRangeFactor = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR; // variables for tree reduction support this.prunedNodesAll = []; this.growTreeIterations = 0; this.afterGrowthIterations = 0; this.isTreeGrowing = false; this.isGrowthFinished = false; } }; // This method is used to set CoSE related parameters used by spring embedder. CoSELayout.prototype.initSpringEmbedder = function () { FDLayout.prototype.initSpringEmbedder.call(this); // variables for cooling this.coolingCycle = 0; this.maxCoolingCycle = this.maxIterations / FDLayoutConstants.CONVERGENCE_CHECK_PERIOD; this.finalTemperature = 0.04; this.coolingAdjuster = 1; }; CoSELayout.prototype.layout = function () { var createBendsAsNeeded = LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED; if (createBendsAsNeeded) { this.createBendpoints(); this.graphManager.resetAllEdges(); } this.level = 0; return this.classicLayout(); }; CoSELayout.prototype.classicLayout = function () { this.nodesWithGravity = this.calculateNodesToApplyGravitationTo(); this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity); this.calcNoOfChildrenForAllNodes(); this.graphManager.calcLowestCommonAncestors(); this.graphManager.calcInclusionTreeDepths(); this.graphManager.getRoot().calcEstimatedSize(); this.calcIdealEdgeLengths(); if (!this.incremental) { var forest = this.getFlatForest(); // The graph associated with this layout is flat and a forest if (forest.length > 0) { this.positionNodesRadially(forest); } // The graph associated with this layout is not flat or a forest else { // Reduce the trees when incremental mode is not enabled and graph is not a forest this.reduceTrees(); // Update nodes that gravity will be applied this.graphManager.resetAllNodesToApplyGravitation(); var allNodes = new Set(this.getAllNodes()); var intersection = this.nodesWithGravity.filter(function (x) { return allNodes.has(x); }); this.graphManager.setAllNodesToApplyGravitation(intersection); this.positionNodesRandomly(); } } else { if (CoSEConstants.TREE_REDUCTION_ON_INCREMENTAL) { // Reduce the trees in incremental mode if only this constant is set to true this.reduceTrees(); // Update nodes that gravity will be applied this.graphManager.resetAllNodesToApplyGravitation(); var allNodes = new Set(this.getAllNodes()); var intersection = this.nodesWithGravity.filter(function (x) { return allNodes.has(x); }); this.graphManager.setAllNodesToApplyGravitation(intersection); } } if (Object.keys(this.constraints).length > 0) { ConstraintHandler.handleConstraints(this); this.initConstraintVariables(); } this.initSpringEmbedder(); if (CoSEConstants.APPLY_LAYOUT) { this.runSpringEmbedder(); } return true; }; CoSELayout.prototype.tick = function () { this.totalIterations++; if (this.totalIterations === this.maxIterations && !this.isTreeGrowing && !this.isGrowthFinished) { if (this.prunedNodesAll.length > 0) { this.isTreeGrowing = true; } else { return true; } } if (this.totalIterations % FDLayoutConstants.CONVERGENCE_CHECK_PERIOD == 0 && !this.isTreeGrowing && !this.isGrowthFinished) { if (this.isConverged()) { if (this.prunedNodesAll.length > 0) { this.isTreeGrowing = true; } else { return true; } } this.coolingCycle++; if (this.layoutQuality == 0) { // quality - "draft" this.coolingAdjuster = this.coolingCycle; } else if (this.layoutQuality == 1) { // quality - "default" this.coolingAdjuster = this.coolingCycle / 3; } // cooling schedule is based on http://www.btluke.com/simanf1.html -> cooling schedule 3 this.coolingFactor = Math.max(this.initialCoolingFactor - Math.pow(this.coolingCycle, Math.log(100 * (this.initialCoolingFactor - this.finalTemperature)) / Math.log(this.maxCoolingCycle)) / 100 * this.coolingAdjuster, this.finalTemperature); this.animationPeriod = Math.ceil(this.initialAnimationPeriod * Math.sqrt(this.coolingFactor)); } // Operations while tree is growing again if (this.isTreeGrowing) { if (this.growTreeIterations % 10 == 0) { if (this.prunedNodesAll.length > 0) { this.graphManager.updateBounds(); this.updateGrid(); this.growTree(this.prunedNodesAll); // Update nodes that gravity will be applied this.graphManager.resetAllNodesToApplyGravitation(); var allNodes = new Set(this.getAllNodes()); var intersection = this.nodesWithGravity.filter(function (x) { return allNodes.has(x); }); this.graphManager.setAllNodesToApplyGravitation(intersection); this.graphManager.updateBounds(); this.updateGrid(); if (CoSEConstants.PURE_INCREMENTAL) this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL / 2;else this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL; } else { this.isTreeGrowing = false; this.isGrowthFinished = true; } } this.growTreeIterations++; } // Operations after growth is finished if (this.isGrowthFinished) { if (this.isConverged()) { return true; } if (this.afterGrowthIterations % 10 == 0) { this.graphManager.updateBounds(); this.updateGrid(); } if (CoSEConstants.PURE_INCREMENTAL) this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL / 2 * ((100 - this.afterGrowthIterations) / 100);else this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL * ((100 - this.afterGrowthIterations) / 100); this.afterGrowthIterations++; } var gridUpdateAllowed = !this.isTreeGrowing && !this.isGrowthFinished; var forceToNodeSurroundingUpdate = this.growTreeIterations % 10 == 1 && this.isTreeGrowing || this.afterGrowthIterations % 10 == 1 && this.isGrowthFinished; this.totalDisplacement = 0; this.graphManager.updateBounds(); this.calcSpringForces(); this.calcRepulsionForces(gridUpdateAllowed, forceToNodeSurroundingUpdate); this.calcGravitationalForces(); this.moveNodes(); this.animate(); return false; // Layout is not ended yet return false }; CoSELayout.prototype.getPositionsData = function () { var allNodes = this.graphManager.getAllNodes(); var pData = {}; for (var i = 0; i < allNodes.length; i++) { var rect = allNodes[i].rect; var id = allNodes[i].id; pData[id] = { id: id, x: rect.getCenterX(), y: rect.getCenterY(), w: rect.width, h: rect.height }; } return pData; }; CoSELayout.prototype.runSpringEmbedder = function () { this.initialAnimationPeriod = 25; this.animationPeriod = this.initialAnimationPeriod; var layoutEnded = false; // If aminate option is 'during' signal that layout is supposed to start iterating if (FDLayoutConstants.ANIMATE === 'during') { this.emit('layoutstarted'); } else { // If aminate option is 'during' tick() function will be called on index.js while (!layoutEnded) { layoutEnded = this.tick(); } this.graphManager.updateBounds(); } }; // overrides moveNodes method in FDLayout CoSELayout.prototype.moveNodes = function () { var lNodes = this.getAllNodes(); var node; // calculate displacement for each node for (var i = 0; i < lNodes.length; i++) { node = lNodes[i]; node.calculateDisplacement(); } if (Object.keys(this.constraints).length > 0) { this.updateDisplacements(); } // move each node for (var i = 0; i < lNodes.length; i++) { node = lNodes[i]; node.move(); } }; // constraint related methods: initConstraintVariables and updateDisplacements // initialize constraint related variables CoSELayout.prototype.initConstraintVariables = function () { var self = this; this.idToNodeMap = new Map(); this.fixedNodeSet = new Set(); var allNodes = this.graphManager.getAllNodes(); // fill idToNodeMap for (var i = 0; i < allNodes.length; i++) { var node = allNodes[i]; this.idToNodeMap.set(node.id, node); } // calculate fixed node weight for given compound node var calculateCompoundWeight = function calculateCompoundWeight(compoundNode) { var nodes = compoundNode.getChild().getNodes(); var node; var fixedNodeWeight = 0; for (var i = 0; i < nodes.length; i++) { node = nodes[i]; if (node.getChild() == null) { if (self.fixedNodeSet.has(node.id)) { fixedNodeWeight += 100; } } else { fixedNodeWeight += calculateCompoundWeight(node); } } return fixedNodeWeight; }; if (this.constraints.fixedNodeConstraint) { // fill fixedNodeSet this.constraints.fixedNodeConstraint.forEach(function (nodeData) { self.fixedNodeSet.add(nodeData.nodeId); }); // assign fixed node weights to compounds if they contain fixed nodes var allNodes = this.graphManager.getAllNodes(); var node; for (var i = 0; i < allNodes.length; i++) { node = allNodes[i]; if (node.getChild() != null) { var fixedNodeWeight = calculateCompoundWeight(node); if (fixedNodeWeight > 0) { node.fixedNodeWeight = fixedNodeWeight; } } } } if (this.constraints.relativePlacementConstraint) { var nodeToDummyForVerticalAlignment = new Map(); var nodeToDummyForHorizontalAlignment = new Map(); this.dummyToNodeForVerticalAlignment = new Map(); this.dummyToNodeForHorizontalAlignment = new Map(); this.fixedNodesOnHorizontal = new Set(); this.fixedNodesOnVertical = new Set(); // fill maps and sets this.fixedNodeSet.forEach(function (nodeId) { self.fixedNodesOnHorizontal.add(nodeId); self.fixedNodesOnVertical.add(nodeId); }); if (this.constraints.alignmentConstraint) { if (this.constraints.alignmentConstraint.vertical) { var verticalAlignment = this.constraints.alignmentConstraint.vertical; for (var i = 0; i < verticalAlignment.length; i++) { this.dummyToNodeForVerticalAlignment.set("dummy" + i, []); verticalAlignment[i].forEach(function (nodeId) { nodeToDummyForVerticalAlignment.set(nodeId, "dummy" + i); self.dummyToNodeForVerticalAlignment.get("dummy" + i).push(nodeId); if (self.fixedNodeSet.has(nodeId)) { self.fixedNodesOnHorizontal.add("dummy" + i); } }); } } if (this.constraints.alignmentConstraint.horizontal) { var horizontalAlignment = this.constraints.alignmentConstraint.horizontal; for (var i = 0; i < horizontalAlignment.length; i++) { this.dummyToNodeForHorizontalAlignment.set("dummy" + i, []); horizontalAlignment[i].forEach(function (nodeId) { nodeToDummyForHorizontalAlignment.set(nodeId, "dummy" + i); self.dummyToNodeForHorizontalAlignment.get("dummy" + i).push(nodeId); if (self.fixedNodeSet.has(nodeId)) { self.fixedNodesOnVertical.add("dummy" + i); } }); } } } if (CoSEConstants.RELAX_MOVEMENT_ON_CONSTRAINTS) { this.shuffle = function (array) { var j, x, i; for (i = array.length - 1; i >= 2 * array.length / 3; i--) { j = Math.floor(Math.random() * (i + 1)); x = array[i]; array[i] = array[j]; array[j] = x; } return array; }; this.nodesInRelativeHorizontal = []; this.nodesInRelativeVertical = []; this.nodeToRelativeConstraintMapHorizontal = new Map(); this.nodeToRelativeConstraintMapVertical = new Map(); this.nodeToTempPositionMapHorizontal = new Map(); this.nodeToTempPositionMapVertical = new Map(); // fill arrays and maps this.constraints.relativePlacementConstraint.forEach(function (constraint) { if (constraint.left) { var nodeIdLeft = nodeToDummyForVerticalAlignment.has(constraint.left) ? nodeToDummyForVerticalAlignment.get(constraint.left) : constraint.left; var nodeIdRight = nodeToDummyForVerticalAlignment.has(constraint.right) ? nodeToDummyForVerticalAlignment.get(constraint.right) : constraint.right; if (!self.nodesInRelativeHorizontal.includes(nodeIdLeft)) { self.nodesInRelativeHorizontal.push(nodeIdLeft); self.nodeToRelativeConstraintMapHorizontal.set(nodeIdLeft, []); if (self.dummyToNodeForVerticalAlignment.has(nodeIdLeft)) { self.nodeToTempPositionMapHorizontal.set(nodeIdLeft, self.idToNodeMap.get(self.dummyToNodeForVerticalAlignment.get(nodeIdLeft)[0]).getCenterX()); } else { self.nodeToTempPositionMapHorizontal.set(nodeIdLeft, self.idToNodeMap.get(nodeIdLeft).getCenterX()); } } if (!self.nodesInRelativeHorizontal.includes(nodeIdRight)) { self.nodesInRelativeHorizontal.push(nodeIdRight); self.nodeToRelativeConstraintMapHorizontal.set(nodeIdRight, []); if (self.dummyToNodeForVerticalAlignment.has(nodeIdRight)) { self.nodeToTempPositionMapHorizontal.set(nodeIdRight, self.idToNodeMap.get(self.dummyToNodeForVerticalAlignment.get(nodeIdRight)[0]).getCenterX()); } else { self.nodeToTempPositionMapHorizontal.set(nodeIdRight, self.idToNodeMap.get(nodeIdRight).getCenterX()); } } self.nodeToRelativeConstraintMapHorizontal.get(nodeIdLeft).push({ right: nodeIdRight, gap: constraint.gap }); self.nodeToRelativeConstraintMapHorizontal.get(nodeIdRight).push({ left: nodeIdLeft, gap: constraint.gap }); } else { var nodeIdTop = nodeToDummyForHorizontalAlignment.has(constraint.top) ? nodeToDummyForHorizontalAlignment.get(constraint.top) : constraint.top; var nodeIdBottom = nodeToDummyForHorizontalAlignment.has(constraint.bottom) ? nodeToDummyForHorizontalAlignment.get(constraint.bottom) : constraint.bottom; if (!self.nodesInRelativeVertical.includes(nodeIdTop)) { self.nodesInRelativeVertical.push(nodeIdTop); self.nodeToRelativeConstraintMapVertical.set(nodeIdTop, []); if (self.dummyToNodeForHorizontalAlignment.has(nodeIdTop)) { self.nodeToTempPositionMapVertical.set(nodeIdTop, self.idToNodeMap.get(self.dummyToNodeForHorizontalAlignment.get(nodeIdTop)[0]).getCenterY()); } else { self.nodeToTempPositionMapVertical.set(nodeIdTop, self.idToNodeMap.get(nodeIdTop).getCenterY()); } } if (!self.nodesInRelativeVertical.includes(nodeIdBottom)) { self.nodesInRelativeVertical.push(nodeIdBottom); self.nodeToRelativeConstraintMapVertical.set(nodeIdBottom, []); if (self.dummyToNodeForHorizontalAlignment.has(nodeIdBottom)) { self.nodeToTempPositionMapVertical.set(nodeIdBottom, self.idToNodeMap.get(self.dummyToNodeForHorizontalAlignment.get(nodeIdBottom)[0]).getCenterY()); } else { self.nodeToTempPositionMapVertical.set(nodeIdBottom, self.idToNodeMap.get(nodeIdBottom).getCenterY()); } } self.nodeToRelativeConstraintMapVertical.get(nodeIdTop).push({ bottom: nodeIdBottom, gap: constraint.gap }); self.nodeToRelativeConstraintMapVertical.get(nodeIdBottom).push({ top: nodeIdTop, gap: constraint.gap }); } }); } else { var subGraphOnHorizontal = new Map(); // subgraph from vertical RP constraints var subGraphOnVertical = new Map(); // subgraph from vertical RP constraints // construct subgraphs from relative placement constraints this.constraints.relativePlacementConstraint.forEach(function (constraint) { if (constraint.left) { var left = nodeToDummyForVerticalAlignment.has(constraint.left) ? nodeToDummyForVerticalAlignment.get(constraint.left) : constraint.left; var right = nodeToDummyForVerticalAlignment.has(constraint.right) ? nodeToDummyForVerticalAlignment.get(constraint.right) : constraint.right; if (subGraphOnHorizontal.has(left)) { subGraphOnHorizontal.get(left).push(right); } else { subGraphOnHorizontal.set(left, [right]); } if (subGraphOnHorizontal.has(right)) { subGraphOnHorizontal.get(right).push(left); } else { subGraphOnHorizontal.set(right, [left]); } } else { var top = nodeToDummyForHorizontalAlignment.has(constraint.top) ? nodeToDummyForHorizontalAlignment.get(constraint.top) : constraint.top; var bottom = nodeToDummyForHorizontalAlignment.has(constraint.bottom) ? nodeToDummyForHorizontalAlignment.get(constraint.bottom) : constraint.bottom; if (subGraphOnVertical.has(top)) { subGraphOnVertical.get(top).push(bottom); } else { subGraphOnVertical.set(top, [bottom]); } if (subGraphOnVertical.has(bottom)) { subGraphOnVertical.get(bottom).push(top); } else { subGraphOnVertical.set(bottom, [top]); } } }); // function to construct components from a given graph // also returns an array that keeps whether each component contains fixed node var constructComponents = function constructComponents(graph, fixedNodes) { var components = []; var isFixed = []; var queue = new LinkedList(); var visited = new Set(); var count = 0; graph.forEach(function (value, key) { if (!visited.has(key)) { components[count] = []; isFixed[count] = false; var currentNode = key; queue.push(currentNode); visited.add(currentNode); components[count].push(currentNode); while (queue.length != 0) { currentNode = queue.shift(); if (fixedNodes.has(currentNode)) { isFixed[count] = true; } var neighbors = graph.get(currentNode); neighbors.forEach(function (neighbor) { if (!visited.has(neighbor)) { queue.push(neighbor); visited.add(neighbor); components[count].push(neighbor); } }); } count++; } }); return { components: components, isFixed: isFixed }; }; var resultOnHorizontal = constructComponents(subGraphOnHorizontal, self.fixedNodesOnHorizontal); this.componentsOnHorizontal = resultOnHorizontal.components; this.fixedComponentsOnHorizontal = resultOnHorizontal.isFixed; var resultOnVertical = constructComponents(subGraphOnVertical, self.fixedNodesOnVertical); this.componentsOnVertical = resultOnVertical.components; this.fixedComponentsOnVertical = resultOnVertical.isFixed; } } }; // updates node displacements based on constraints CoSELayout.prototype.updateDisplacements = function () { var self = this; if (this.constraints.fixedNodeConstraint) { this.constraints.fixedNodeConstraint.forEach(function (nodeData) { var fixedNode = self.idToNodeMap.get(nodeData.nodeId); fixedNode.displacementX = 0; fixedNode.displacementY = 0; }); } if (this.constraints.alignmentConstraint) { if (this.constraints.alignmentConstraint.vertical) { var allVerticalAlignments = this.constraints.alignmentConstraint.vertical; for (var i = 0; i < allVerticalAlignments.length; i++) { var totalDisplacementX = 0; for (var j = 0; j < allVerticalAlignments[i].length; j++) { if (this.fixedNodeSet.has(allVerticalAlignments[i][j])) { totalDisplacementX = 0; break; } totalDisplacementX += this.idToNodeMap.get(allVerticalAlignments[i][j]).displacementX; } var averageDisplacementX = totalDisplacementX / allVerticalAlignments[i].length; for (var j = 0; j < allVerticalAlignments[i].length; j++) { this.idToNodeMap.get(allVerticalAlignments[i][j]).displacementX = averageDisplacementX; } } } if (this.constraints.alignmentConstraint.horizontal) { var allHorizontalAlignments = this.constraints.alignmentConstraint.horizontal; for (var i = 0; i < allHorizontalAlignments.length; i++) { var totalDisplacementY = 0; for (var j = 0; j < allHorizontalAlignments[i].length; j++) { if (this.fixedNodeSet.has(allHorizontalAlignments[i][j])) { totalDisplacementY = 0; break; } totalDisplacementY += this.idToNodeMap.get(allHorizontalAlignments[i][j]).displacementY; } var averageDisplacementY = totalDisplacementY / allHorizontalAlignments[i].length; for (var j = 0; j < allHorizontalAlignments[i].length; j++) { this.idToNodeMap.get(allHorizontalAlignments[i][j]).displacementY = averageDisplacementY; } } } } if (this.constraints.relativePlacementConstraint) { if (CoSEConstants.RELAX_MOVEMENT_ON_CONSTRAINTS) { // shuffle array to randomize node processing order if (this.totalIterations % 10 == 0) { this.shuffle(this.nodesInRelativeHorizontal); this.shuffle(this.nodesInRelativeVertical); } this.nodesInRelativeHorizontal.forEach(function (nodeId) { if (!self.fixedNodesOnHorizontal.has(nodeId)) { var displacement = 0; if (self.dummyToNodeForVerticalAlignment.has(nodeId)) { displacement = self.idToNodeMap.get(self.dummyToNodeForVerticalAlignment.get(nodeId)[0]).displacementX; } else { displacement = self.idToNodeMap.get(nodeId).displacementX; } self.nodeToRelativeConstraintMapHorizontal.get(nodeId).forEach(function (constraint) { if (constraint.right) { var diff = self.nodeToTempPositionMapHorizontal.get(constraint.right) - self.nodeToTempPositionMapHorizontal.get(nodeId) - displacement; if (diff < constraint.gap) { displacement -= constraint.gap - diff; } } else { var diff = self.nodeToTempPositionMapHorizontal.get(nodeId) - self.nodeToTempPositionMapHorizontal.get(constraint.left) + displacement; if (diff < constraint.gap) { displacement += constraint.gap - diff; } } }); self.nodeToTempPositionMapHorizontal.set(nodeId, self.nodeToTempPositionMapHorizontal.get(nodeId) + displacement); if (self.dummyToNodeForVerticalAlignment.has(nodeId)) { self.dummyToNodeForVerticalAlignment.get(nodeId).forEach(function (nodeId) { self.idToNodeMap.get(nodeId).displacementX = displacement; }); } else { self.idToNodeMap.get(nodeId).displacementX = displacement; } } }); this.nodesInRelativeVertical.forEach(function (nodeId) { if (!self.fixedNodesOnHorizontal.has(nodeId)) { var displacement = 0; if (self.dummyToNodeForHorizontalAlignment.has(nodeId)) { displacement = self.idToNodeMap.get(self.dummyToNodeForHorizontalAlignment.get(nodeId)[0]).displacementY; } else { displacement = self.idToNodeMap.get(nodeId).displacementY; } self.nodeToRelativeConstraintMapVertical.get(nodeId).forEach(function (constraint) { if (constraint.bottom) { var diff = self.nodeToTempPositionMapVertical.get(constraint.bottom) - self.nodeToTempPositionMapVertical.get(nodeId) - displacement; if (diff < constraint.gap) { displacement -= constraint.gap - diff; } } else { var diff = self.nodeToTempPositionMapVertical.get(nodeId) - self.nodeToTempPositionMapVertical.get(constraint.top) + displacement; if (diff < constraint.gap) { displacement += constraint.gap - diff; } } }); self.nodeToTempPositionMapVertical.set(nodeId, self.nodeToTempPositionMapVertical.get(nodeId) + displacement); if (self.dummyToNodeForHorizontalAlignment.has(nodeId)) { self.dummyToNodeForHorizontalAlignment.get(nodeId).forEach(function (nodeId) { self.idToNodeMap.get(nodeId).displacementY = displacement; }); } else { self.idToNodeMap.get(nodeId).displacementY = displacement; } } }); } else { for (var i = 0; i < this.componentsOnHorizontal.length; i++) { var component = this.componentsOnHorizontal[i]; if (this.fixedComponentsOnHorizontal[i]) { for (var j = 0; j < component.length; j++) { if (this.dummyToNodeForVerticalAlignment.has(component[j])) { this.dummyToNodeForVerticalAlignment.get(component[j]).forEach(function (nodeId) { self.idToNodeMap.get(nodeId).displacementX = 0; }); } else { this.idToNodeMap.get(component[j]).displacementX = 0; } } } else { var sum = 0; var count = 0; for (var j = 0; j < component.length; j++) { if (this.dummyToNodeForVerticalAlignment.has(component[j])) { var actualNodes = this.dummyToNodeForVerticalAlignment.get(component[j]); sum += actualNodes.length * this.idToNodeMap.get(actualNodes[0]).displacementX; count += actualNodes.length; } else { sum += this.idToNodeMap.get(component[j]).displacementX; count++; } } var averageDisplacement = sum / count; for (var j = 0; j < component.length; j++) { if (this.dummyToNodeForVerticalAlignment.has(component[j])) { this.dummyToNodeForVerticalAlignment.get(component[j]).forEach(function (nodeId) { self.idToNodeMap.get(nodeId).displacementX = averageDisplacement; }); } else { this.idToNodeMap.get(component[j]).displacementX = averageDisplacement; } } } } for (var i = 0; i < this.componentsOnVertical.length; i++) { var component = this.componentsOnVertical[i]; if (this.fixedComponentsOnVertical[i]) { for (var j = 0; j < component.length; j++) { if (this.dummyToNodeForHorizontalAlignment.has(component[j])) { this.dummyToNodeForHorizontalAlignment.get(component[j]).forEach(function (nodeId) { self.idToNodeMap.get(nodeId).displacementY = 0; }); } else { this.idToNodeMap.get(component[j]).displacementY = 0; } } } else { var sum = 0; var count = 0; for (var j = 0; j < component.length; j++) { if (this.dummyToNodeForHorizontalAlignment.has(component[j])) { var actualNodes = this.dummyToNodeForHorizontalAlignment.get(component[j]); sum += actualNodes.length * this.idToNodeMap.get(actualNodes[0]).displacementY; count += actualNodes.length; } else { sum += this.idToNodeMap.get(component[j]).displacementY; count++; } } var averageDisplacement = sum / count; for (var j = 0; j < component.length; j++) { if (this.dummyToNodeForHorizontalAlignment.has(component[j])) { this.dummyToNodeForHorizontalAlignment.get(component[j]).forEach(function (nodeId) { self.idToNodeMap.get(nodeId).displacementY = averageDisplacement; }); } else { this.idToNodeMap.get(component[j]).displacementY = averageDisplacement; } } } } } } }; CoSELayout.prototype.calculateNodesToApplyGravitationTo = function () { var nodeList = []; var graph; var graphs = this.graphManager.getGraphs(); var size = graphs.length; var i; for (i = 0; i < size; i++) { graph = graphs[i]; graph.updateConnected(); if (!graph.isConnected) { nodeList = nodeList.concat(graph.getNodes()); } } return nodeList; }; CoSELayout.prototype.createBendpoints = function () { var edges = []; edges = edges.concat(this.graphManager.getAllEdges()); var visited = new Set(); var i; for (i = 0; i < edges.length; i++) { var edge = edges[i]; if (!visited.has(edge)) { var source = edge.getSource(); var target = edge.getTarget(); if (source == target) { edge.getBendpoints().push(new PointD()); edge.getBendpoints().push(new PointD()); this.createDummyNodesForBendpoints(edge); visited.add(edge); } else { var edgeList = []; edgeList = edgeList.concat(source.getEdgeListToNode(target)); edgeList = edgeList.concat(target.getEdgeListToNode(source)); if (!visited.has(edgeList[0])) { if (edgeList.length > 1) { var k; for (k = 0; k < edgeList.length; k++) { var multiEdge = edgeList[k]; multiEdge.getBendpoints().push(new PointD()); this.createDummyNodesForBendpoints(multiEdge); } } edgeList.forEach(function (edge) { visited.add(edge); }); } } } if (visited.size == edges.length) { break; } } }; CoSELayout.prototype.positionNodesRadially = function (forest) { // We tile the trees to a grid row by row; first tree starts at (0,0) var currentStartingPoint = new Point(0, 0); var numberOfColumns = Math.ceil(Math.sqrt(forest.length)); var height = 0; var currentY = 0; var currentX = 0; var point = new PointD(0, 0); for (var i = 0; i < forest.length; i++) { if (i % numberOfColumns == 0) { // Start of a new row, make the x coordinate 0, increment the // y coordinate with the max height of the previous row currentX = 0; currentY = height; if (i != 0) { currentY += CoSEConstants.DEFAULT_COMPONENT_SEPERATION; } height = 0; } var tree = forest[i]; // Find the center of the tree var centerNode = Layout.findCenterOfTree(tree); // Set the staring point of the next tree currentStartingPoint.x = currentX; currentStartingPoint.y = currentY; // Do a radial layout starting with the center point = CoSELayout.radialLayout(tree, centerNode, currentStartingPoint); if (point.y > height) { height = Math.floor(point.y); } currentX = Math.floor(point.x + CoSEConstants.DEFAULT_COMPONENT_SEPERATION); } this.transform(new PointD(LayoutConstants.WORLD_CENTER_X - point.x / 2, LayoutConstants.WORLD_CENTER_Y - point.y / 2)); }; CoSELayout.radialLayout = function (tree, centerNode, startingPoint) { var radialSep = Math.max(this.maxDiagonalInTree(tree), CoSEConstants.DEFAULT_RADIAL_SEPARATION); CoSELayout.branchRadialLayout(centerNode, null, 0, 359, 0, radialSep); var bounds = LGraph.calculateBounds(tree); var transform = new Transform(); transform.setDeviceOrgX(bounds.getMinX()); transform.setDeviceOrgY(bounds.getMinY()); transform.setWorldOrgX(startingPoint.x); transform.setWorldOrgY(startingPoint.y); for (var i = 0; i < tree.length; i++) { var node = tree[i]; node.transform(transform); } var bottomRight = new PointD(bounds.getMaxX(), bounds.getMaxY()); return transform.inverseTransformPoint(bottomRight); }; CoSELayout.branchRadialLayout = function (node, parentOfNode, startAngle, endAngle, distance, radialSeparation) { // First, position this node by finding its angle. var halfInterval = (endAngle - startAngle + 1) / 2; if (halfInterval < 0) { halfInterval += 180; } var nodeAngle = (halfInterval + startAngle) % 360; var teta = nodeAngle * IGeometry.TWO_PI / 360; // Make polar to java cordinate conversion. var cos_teta = Math.cos(teta); var x_ = distance * Math.cos(teta); var y_ = distance * Math.sin(teta); node.setCenter(x_, y_); // Traverse all neighbors of this node and recursively call this // function. var neighborEdges = []; neighborEdges = neighborEdges.concat(node.getEdges()); var childCount = neighborEdges.length; if (parentOfNode != null) { childCount--; } var branchCount = 0; var incEdgesCount = neighborEdges.length; var startIndex; var edges = node.getEdgesBetween(parentOfNode); // If there are multiple edges, prune them until there remains only one // edge. while (edges.length > 1) { //neighborEdges.remove(edges.remove(0)); var temp = edges[0]; edges.splice(0, 1); var index = neighborEdges.indexOf(temp); if (index >= 0) { neighborEdges.splice(index, 1); } incEdgesCount--; childCount--; } if (parentOfNode != null) { //assert edges.length == 1; startIndex = (neighborEdges.indexOf(edges[0]) + 1) % incEdgesCount; } else { startIndex = 0; } var stepAngle = Math.abs(endAngle - startAngle) / childCount; for (var i = startIndex; branchCount != childCount; i = ++i % incEdgesCount) { var currentNeighbor = neighborEdges[i].getOtherEnd(node); // Don't back traverse to root node in current tree. if (currentNeighbor == parentOfNode) { continue; } var childStartAngle = (startAngle + branchCount * stepAngle) % 360; var childEndAngle = (childStartAngle + stepAngle) % 360; CoSELayout.branchRadialLayout(currentNeighbor, node, childStartAngle, childEndAngle, distance + radialSeparation, radialSeparation); branchCount++; } }; CoSELayout.maxDiagonalInTree = function (tree) { var maxDiagonal = Integer.MIN_VALUE; for (var i = 0; i < tree.length; i++) { var node = tree[i]; var diagonal = node.getDiagonal(); if (diagonal > maxDiagonal) { maxDiagonal = diagonal; } } return maxDiagonal; }; CoSELayout.prototype.calcRepulsionRange = function () { // formula is 2 x (level + 1) x idealEdgeLength return 2 * (this.level + 1) * this.idealEdgeLength; }; // Tiling methods // Group zero degree members whose parents are not to be tiled, create dummy parents where needed and fill memberGroups by their dummp parent id's CoSELayout.prototype.groupZeroDegreeMembers = function () { var self = this; // array of [parent_id x oneDegreeNode_id] var tempMemberGroups = {}; // A temporary map of parent node and its zero degree members this.memberGroups = {}; // A map of dummy parent node and its zero degree members whose parents are not to be tiled this.idToDummyNode = {}; // A map of id to dummy node var zeroDegree = []; // List of zero degree nodes whose parents are not to be tiled var allNodes = this.graphManager.getAllNodes(); // Fill zero degree list for (var i = 0; i < allNodes.length; i++) { var node = allNodes[i]; var parent = node.getParent(); // If a node has zero degree and its parent is not to be tiled if exists add that node to zeroDegres list if (this.getNodeDegreeWithChildren(node) === 0 && (parent.id == undefined || !this.getToBeTiled(parent))) { zeroDegree.push(node); } } // Create a map of parent node and its zero degree members for (var i = 0; i < zeroDegree.length; i++) { var node = zeroDegree[i]; // Zero degree node itself var p_id = node.getParent().id; // Parent id if (typeof tempMemberGroups[p_id] === "undefined") tempMemberGroups[p_id] = []; tempMemberGroups[p_id] = tempMemberGroups[p_id].concat(node); // Push node to the list belongs to its parent in tempMemberGroups } // If there are at least two nodes at a level, create a dummy compound for them Object.keys(tempMemberGroups).forEach(function (p_id) { if (tempMemberGroups[p_id].length > 1) { var dummyCompoundId = "DummyCompound_" + p_id; // The id of dummy compound which will be created soon self.memberGroups[dummyCompoundId] = tempMemberGroups[p_id]; // Add dummy compound to memberGroups var parent = tempMemberGroups[p_id][0].getParent(); // The parent of zero degree nodes will be the parent of new dummy compound // Create a dummy compound with calculated id var dummyCompound = new CoSENode(self.graphManager); dummyCompound.id = dummyCompoundId; dummyCompound.paddingLeft = parent.paddingLeft || 0; dummyCompound.paddingRight = parent.paddingRight || 0; dummyCompound.paddingBottom = parent.paddingBottom || 0; dummyCompound.paddingTop = parent.paddingTop || 0; self.idToDummyNode[dummyCompoundId] = dummyCompound; var dummyParentGraph = self.getGraphManager().add(self.newGraph(), dummyCompound); var parentGraph = parent.getChild(); // Add dummy compound to parent the graph parentGraph.add(dummyCompound); // For each zero degree node in this level remove it from its parent graph and add it to the graph of dummy parent for (var i = 0; i < tempMemberGroups[p_id].length; i++) { var node = tempMemberGroups[p_id][i]; parentGraph.remove(node); dummyParentGraph.add(node); } } }); }; CoSELayout.prototype.clearCompounds = function () { var childGraphMap = {}; var idToNode = {}; // Get compound ordering by finding the inner one first this.performDFSOnCompounds(); for (var i = 0; i < this.compoundOrder.length; i++) { idToNode[this.compoundOrder[i].id] = this.compoundOrder[i]; childGraphMap[this.compoundOrder[i].id] = [].concat(this.compoundOrder[i].getChild().getNodes()); // Remove children of compounds this.graphManager.remove(this.compoundOrder[i].getChild()); this.compoundOrder[i].child = null; } this.graphManager.resetAllNodes(); // Tile the removed children this.tileCompoundMembers(childGraphMap, idToNode); }; CoSELayout.prototype.clearZeroDegreeMembers = function () { var self = this; var tiledZeroDegreePack = this.tiledZeroDegreePack = []; Object.keys(this.memberGroups).forEach(function (id) { var compoundNode = self.idToDummyNode[id]; // Get the dummy compound tiledZeroDegreePack[id] = self.tileNodes(self.memberGroups[id], compoundNode.paddingLeft + compoundNode.paddingRight); // Set the width and height of the dummy compound as calculated compoundNode.rect.width = tiledZeroDegreePack[id].width; compoundNode.rect.height = tiledZeroDegreePack[id].height; compoundNode.setCenter(tiledZeroDegreePack[id].centerX, tiledZeroDegreePack[id].centerY); // compound left and top margings for labels // when node labels are included, these values may be set to different values below and are used in tilingPostLayout, // otherwise they stay as zero compoundNode.labelMarginLeft = 0; compoundNode.labelMarginTop = 0; // Update compound bounds considering its label properties and set label margins for left and top if (CoSEConstants.NODE_DIMENSIONS_INCLUDE_LABELS) { var width = compoundNode.rect.width; var height = compoundNode.rect.height; if (compoundNode.labelWidth) { if (compoundNode.labelPosHorizontal == "left") { compoundNode.rect.x -= compoundNode.labelWidth; compoundNode.setWidth(width + compoundNode.labelWidth); compoundNode.labelMarginLeft = compoundNode.labelWidth; } else if (compoundNode.labelPosHorizontal == "center" && compoundNode.labelWidth > width) { compoundNode.rect.x -= (compoundNode.labelWidth - width) / 2; compoundNode.setWidth(compoundNode.labelWidth); compoundNode.labelMarginLeft = (compoundNode.labelWidth - width) / 2; } else if (compoundNode.labelPosHorizontal == "right") { compoundNode.setWidth(width + compoundNode.labelWidth); } } if (compoundNode.labelHeight) { if (compoundNode.labelPosVertical == "top") { compoundNode.rect.y -= compoundNode.labelHeight; compoundNode.setHeight(height + compoundNode.labelHeight); compoundNode.labelMarginTop = compoundNode.labelHeight; } else if (compoundNode.labelPosVertical == "center" && compoundNode.labelHeight > height) { compoundNode.rect.y -= (compoundNode.labelHeight - height) / 2; compoundNode.setHeight(compoundNode.labelHeight); compoundNode.labelMarginTop = (compoundNode.labelHeight - height) / 2; } else if (compoundNode.labelPosVertical == "bottom") { compoundNode.setHeight(height + compoundNode.labelHeight); } } } }); }; CoSELayout.prototype.repopulateCompounds = function () { for (var i = this.compoundOrder.length - 1; i >= 0; i--) { var lCompoundNode = this.compoundOrder[i]; var id = lCompoundNode.id; var horizontalMargin = lCompoundNode.paddingLeft; var verticalMargin = lCompoundNode.paddingTop; var labelMarginLeft = lCompoundNode.labelMarginLeft; var labelMarginTop = lCompoundNode.labelMarginTop; this.adjustLocations(this.tiledMemberPack[id], lCompoundNode.rect.x, lCompoundNode.rect.y, horizontalMargin, verticalMargin, labelMarginLeft, labelMarginTop); } }; CoSELayout.prototype.repopulateZeroDegreeMembers = function () { var self = this; var tiledPack = this.tiledZeroDegreePack; Object.keys(tiledPack).forEach(function (id) { var compoundNode = self.idToDummyNode[id]; // Get the dummy compound by its id var horizontalMargin = compoundNode.paddingLeft; var verticalMargin = compoundNode.paddingTop; var labelMarginLeft = compoundNode.labelMarginLeft; var labelMarginTop = compoundNode.labelMarginTop; // Adjust the positions of nodes wrt its compound self.adjustLocations(tiledPack[id], compoundNode.rect.x, compoundNode.rect.y, horizontalMargin, verticalMargin, labelMarginLeft, labelMarginTop); }); }; CoSELayout.prototype.getToBeTiled = function (node) { var id = node.id; //firstly check the previous results if (this.toBeTiled[id] != null) { return this.toBeTiled[id]; } //only compound nodes are to be tiled var childGraph = node.getChild(); if (childGraph == null) { this.toBeTiled[id] = false; return false; } var children = childGraph.getNodes(); // Get the children nodes //a compound node is not to be tiled if all of its compound children are not to be tiled for (var i = 0; i < children.length; i++) { var theChild = children[i]; if (this.getNodeDegree(theChild) > 0) { this.toBeTiled[id] = false; return false; } //pass the children not having the compound structure if (theChild.getChild() == null) { this.toBeTiled[theChild.id] = false; continue; } if (!this.getToBeTiled(theChild)) { this.toBeTiled[id] = false; return false; } } this.toBeTiled[id] = true; return true; }; // Get degree of a node depending of its edges and independent of its children CoSELayout.prototype.getNodeDegree = function (node) { var id = node.id; var edges = node.getEdges(); var degree = 0; // For the edges connected for (var i = 0; i < edges.length; i++) { var edge = edges[i]; if (edge.getSource().id !== edge.getTarget().id) { degree = degree + 1; } } return degree; }; // Get degree of a node with its children CoSELayout.prototype.getNodeDegreeWithChildren = function (node) { var degree = this.getNodeDegree(node); if (node.getChild() == null) { return degree; } var children = node.getChild().getNodes(); for (var i = 0; i < children.length; i++) { var child = children[i]; degree += this.getNodeDegreeWithChildren(child); } return degree; }; CoSELayout.prototype.performDFSOnCompounds = function () { this.compoundOrder = []; this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes()); }; CoSELayout.prototype.fillCompexOrderByDFS = function (children) { for (var i = 0; i < children.length; i++) { var child = children[i]; if (child.getChild() != null) { this.fillCompexOrderByDFS(child.getChild().getNodes()); } if (this.getToBeTiled(child)) { this.compoundOrder.push(child); } } }; /** * This method places each zero degree member wrt given (x,y) coordinates (top left). */ CoSELayout.prototype.adjustLocations = function (organization, x, y, compoundHorizontalMargin, compoundVerticalMargin, compoundLabelMarginLeft, compoundLabelMarginTop) { x += compoundHorizontalMargin + compoundLabelMarginLeft; y += compoundVerticalMargin + compoundLabelMarginTop; var left = x; for (var i = 0; i < organization.rows.length; i++) { var row = organization.rows[i]; x = left; var maxHeight = 0; for (var j = 0; j < row.length; j++) { var lnode = row[j]; lnode.rect.x = x; // + lnode.rect.width / 2; lnode.rect.y = y; // + lnode.rect.height / 2; x += lnode.rect.width + organization.horizontalPadding; if (lnode.rect.height > maxHeight) maxHeight = lnode.rect.height; } y += maxHeight + organization.verticalPadding; } }; CoSELayout.prototype.tileCompoundMembers = function (childGraphMap, idToNode) { var self = this; this.tiledMemberPack = []; Object.keys(childGraphMap).forEach(function (id) { // Get the compound node var compoundNode = idToNode[id]; self.tiledMemberPack[id] = self.tileNodes(childGraphMap[id], compoundNode.paddingLeft + compoundNode.paddingRight); compoundNode.rect.width = self.tiledMemberPack[id].width; compoundNode.rect.height = self.tiledMemberPack[id].height; compoundNode.setCenter(self.tiledMemberPack[id].centerX, self.tiledMemberPack[id].centerY); // compound left and top margings for labels // when node labels are included, these values may be set to different values below and are used in tilingPostLayout, // otherwise they stay as zero compoundNode.labelMarginLeft = 0; compoundNode.labelMarginTop = 0; // Update compound bounds considering its label properties and set label margins for left and top if (CoSEConstants.NODE_DIMENSIONS_INCLUDE_LABELS) { var width = compoundNode.rect.width; var height = compoundNode.rect.height; if (compoundNode.labelWidth) { if (compoundNode.labelPosHorizontal == "left") { compoundNode.rect.x -= compoundNode.labelWidth; compoundNode.setWidth(width + compoundNode.labelWidth); compoundNode.labelMarginLeft = compoundNode.labelWidth; } else if (compoundNode.labelPosHorizontal == "center" && compoundNode.labelWidth > width) { compoundNode.rect.x -= (compoundNode.labelWidth - width) / 2; compoundNode.setWidth(compoundNode.labelWidth); compoundNode.labelMarginLeft = (compoundNode.labelWidth - width) / 2; } else if (compoundNode.labelPosHorizontal == "right") { compoundNode.setWidth(width + compoundNode.labelWidth); } } if (compoundNode.labelHeight) { if (compoundNode.labelPosVertical == "top") { compoundNode.rect.y -= compoundNode.labelHeight; compoundNode.setHeight(height + compoundNode.labelHeight); compoundNode.labelMarginTop = compoundNode.labelHeight; } else if (compoundNode.labelPosVertical == "center" && compoundNode.labelHeight > height) { compoundNode.rect.y -= (compoundNode.labelHeight - height) / 2; compoundNode.setHeight(compoundNode.labelHeight); compoundNode.labelMarginTop = (compoundNode.labelHeight - height) / 2; } else if (compoundNode.labelPosVertical == "bottom") { compoundNode.setHeight(height + compoundNode.labelHeight); } } } }); }; CoSELayout.prototype.tileNodes = function (nodes, minWidth) { var horizontalOrg = this.tileNodesByFavoringDim(nodes, minWidth, true); var verticalOrg = this.tileNodesByFavoringDim(nodes, minWidth, false); var horizontalRatio = this.getOrgRatio(horizontalOrg); var verticalRatio = this.getOrgRatio(verticalOrg); var bestOrg; // the best ratio is the one that is closer to 1 since the ratios are already normalized // and the best organization is the one that has the best ratio if (verticalRatio < horizontalRatio) { bestOrg = verticalOrg; } else { bestOrg = horizontalOrg; } return bestOrg; }; // get the width/height ratio of the organization that is normalized so that it will not be less than 1 CoSELayout.prototype.getOrgRatio = function (organization) { // get dimensions and calculate the initial ratio var width = organization.width; var height = organization.height; var ratio = width / height; // if the initial ratio is less then 1 then inverse it if (ratio < 1) { ratio = 1 / ratio; } // return the normalized ratio return ratio; }; /* * Calculates the ideal width for the rows. This method assumes that * each node has the same sizes and calculates the ideal row width that * approximates a square shaped complex accordingly. However, since nodes would * have different sizes some rows would have different sizes and the resulting * shape would not be an exact square. */ CoSELayout.prototype.calcIdealRowWidth = function (members, favorHorizontalDim) { // To approximate a square shaped complex we need to make complex width equal to complex height. // To achieve this we need to solve the following equation system for hc: // (x + bx) * hc - bx = (y + by) * vc - by, hc * vc = n // where x is the avarage width of the nodes, y is the avarage height of nodes // bx and by are the buffer sizes in horizontal and vertical dimensions accordingly, // hc and vc are the number of rows in horizontal and vertical dimensions // n is number of members. var verticalPadding = CoSEConstants.TILING_PADDING_VERTICAL; var horizontalPadding = CoSEConstants.TILING_PADDING_HORIZONTAL; // number of members var membersSize = members.length; // sum of the width of all members var totalWidth = 0; // sum of the height of all members var totalHeight = 0; var maxWidth = 0; // traverse all members to calculate total width and total height and get the maximum members width members.forEach(function (node) { totalWidth += node.getWidth(); totalHeight += node.getHeight(); if (node.getWidth() > maxWidth) { maxWidth = node.getWidth(); } }); // average width of the members var averageWidth = totalWidth / membersSize; // average height of the members var averageHeight = totalHeight / membersSize; // solving the initial equation system for the hc yields the following second degree equation: // hc^2 * (x+bx) + hc * (by - bx) - n * (y + by) = 0 // the delta value to solve the equation above for hc var delta = Math.pow(verticalPadding - horizontalPadding, 2) + 4 * (averageWidth + horizontalPadding) * (averageHeight + verticalPadding) * membersSize; // solve the equation using delta value to calculate the horizontal count // that represents the number of nodes in an ideal row var horizontalCountDouble = (horizontalPadding - verticalPadding + Math.sqrt(delta)) / (2 * (averageWidth + horizontalPadding)); // round the calculated horizontal count up or down according to the favored dimension var horizontalCount; if (favorHorizontalDim) { horizontalCount = Math.ceil(horizontalCountDouble); // if horizontalCount count is not a float value then both of rounding to floor and ceil // will yield the same values. Instead of repeating the same calculation try going up // while favoring horizontal dimension in such cases if (horizontalCount == horizontalCountDouble) { horizontalCount++; } } else { horizontalCount = Math.floor(horizontalCountDouble); } // ideal width to be calculated var idealWidth = horizontalCount * (averageWidth + horizontalPadding) - horizontalPadding; // if max width is bigger than calculated ideal width reset ideal width to it if (maxWidth > idealWidth) { idealWidth = maxWidth; } // add the left-right margins to the ideal row width idealWidth += horizontalPadding * 2; // return the ideal row width1 return idealWidth; }; CoSELayout.prototype.tileNodesByFavoringDim = function (nodes, minWidth, favorHorizontalDim) { var verticalPadding = CoSEConstants.TILING_PADDING_VERTICAL; var horizontalPadding = CoSEConstants.TILING_PADDING_HORIZONTAL; var tilingCompareBy = CoSEConstants.TILING_COMPARE_BY; var organization = { rows: [], rowWidth: [], rowHeight: [], width: 0, height: minWidth, // assume minHeight equals to minWidth verticalPadding: verticalPadding, horizontalPadding: horizontalPadding, centerX: 0, centerY: 0 }; if (tilingCompareBy) { organization.idealRowWidth = this.calcIdealRowWidth(nodes, favorHorizontalDim); } var getNodeArea = function getNodeArea(n) { return n.rect.width * n.rect.height; }; var areaCompareFcn = function areaCompareFcn(n1, n2) { return getNodeArea(n2) - getNodeArea(n1); }; // Sort the nodes in descending order of their areas nodes.sort(function (n1, n2) { var cmpBy = areaCompareFcn; if (organization.idealRowWidth) { cmpBy = tilingCompareBy; return cmpBy(n1.id, n2.id); } return cmpBy(n1, n2); }); // Create the organization -> calculate compound center var sumCenterX = 0; var sumCenterY = 0; for (var i = 0; i < nodes.length; i++) { var lNode = nodes[i]; sumCenterX += lNode.getCenterX(); sumCenterY += lNode.getCenterY(); } organization.centerX = sumCenterX / nodes.length; organization.centerY = sumCenterY / nodes.length; // Create the organization -> tile members for (var i = 0; i < nodes.length; i++) { var lNode = nodes[i]; if (organization.rows.length == 0) { this.insertNodeToRow(organization, lNode, 0, minWidth); } else if (this.canAddHorizontal(organization, lNode.rect.width, lNode.rect.height)) { var rowIndex = organization.rows.length - 1; if (!organization.idealRowWidth) { rowIndex = this.getShortestRowIndex(organization); } this.insertNodeToRow(organization, lNode, rowIndex, minWidth); } else { this.insertNodeToRow(organization, lNode, organization.rows.length, minWidth); } this.shiftToLastRow(organization); } return organization; }; CoSELayout.prototype.insertNodeToRow = function (organization, node, rowIndex, minWidth) { var minCompoundSize = minWidth; // Add new row if needed if (rowIndex == organization.rows.length) { var secondDimension = []; organization.rows.push(secondDimension); organization.rowWidth.push(minCompoundSize); organization.rowHeight.push(0); } // Update row width var w = organization.rowWidth[rowIndex] + node.rect.width; if (organization.rows[rowIndex].length > 0) { w += organization.horizontalPadding; } organization.rowWidth[rowIndex] = w; // Update compound width if (organization.width < w) { organization.width = w; } // Update height var h = node.rect.height; if (rowIndex > 0) h += organization.verticalPadding; var extraHeight = 0; if (h > organization.rowHeight[rowIndex]) { extraHeight = organization.rowHeight[rowIndex]; organization.rowHeight[rowIndex] = h; extraHeight = organization.rowHeight[rowIndex] - extraHeight; } organization.height += extraHeight; // Insert node organization.rows[rowIndex].push(node); }; //Scans the rows of an organization and returns the one with the min width CoSELayout.prototype.getShortestRowIndex = function (organization) { var r = -1; var min = Number.MAX_VALUE; for (var i = 0; i < organization.rows.length; i++) { if (organization.rowWidth[i] < min) { r = i; min = organization.rowWidth[i]; } } return r; }; //Scans the rows of an organization and returns the one with the max width CoSELayout.prototype.getLongestRowIndex = function (organization) { var r = -1; var max = Number.MIN_VALUE; for (var i = 0; i < organization.rows.length; i++) { if (organization.rowWidth[i] > max) { r = i; max = organization.rowWidth[i]; } } return r; }; /** * This method checks whether adding extra width to the organization violates * the aspect ratio(1) or not. */ CoSELayout.prototype.canAddHorizontal = function (organization, extraWidth, extraHeight) { // if there is an ideal row width specified use it instead of checking the aspect ratio if (organization.idealRowWidth) { var lastRowIndex = organization.rows.length - 1; var lastRowWidth = organization.rowWidth[lastRowIndex]; // check and return if ideal row width will be exceed if the node is added to the row return lastRowWidth + extraWidth + organization.horizontalPadding <= organization.idealRowWidth; } var sri = this.getShortestRowIndex(organization); if (sri < 0) { return true; } var min = organization.rowWidth[sri]; if (min + organization.horizontalPadding + extraWidth <= organization.width) return true; var hDiff = 0; // Adding to an existing row if (organization.rowHeight[sri] < extraHeight) { if (sri > 0) hDiff = extraHeight + organization.verticalPadding - organization.rowHeight[sri]; } var add_to_row_ratio; if (organization.width - min >= extraWidth + organization.horizontalPadding) { add_to_row_ratio = (organization.height + hDiff) / (min + extraWidth + organization.horizontalPadding); } else { add_to_row_ratio = (organization.height + hDiff) / organization.width; } // Adding a new row for this node hDiff = extraHeight + organization.verticalPadding; var add_new_row_ratio; if (organization.width < extraWidth) { add_new_row_ratio = (organization.height + hDiff) / extraWidth; } else { add_new_row_ratio = (organization.height + hDiff) / organization.width; } if (add_new_row_ratio < 1) add_new_row_ratio = 1 / add_new_row_ratio; if (add_to_row_ratio < 1) add_to_row_ratio = 1 / add_to_row_ratio; return add_to_row_ratio < add_new_row_ratio; }; //If moving the last node from the longest row and adding it to the last //row makes the bounding box smaller, do it. CoSELayout.prototype.shiftToLastRow = function (organization) { var longest = this.getLongestRowIndex(organization); var last = organization.rowWidth.length - 1; var row = organization.rows[longest]; var node = row[row.length - 1]; var diff = node.width + organization.horizontalPadding; // Check if there is enough space on the last row if (organization.width - organization.rowWidth[last] > diff && longest != last) { // Remove the last element of the longest row row.splice(-1, 1); // Push it to the last row organization.rows[last].push(node); organization.rowWidth[longest] = organization.rowWidth[longest] - diff; organization.rowWidth[last] = organization.rowWidth[last] + diff; organization.width = organization.rowWidth[instance.getLongestRowIndex(organization)]; // Update heights of the organization var maxHeight = Number.MIN_VALUE; for (var i = 0; i < row.length; i++) { if (row[i].height > maxHeight) maxHeight = row[i].height; } if (longest > 0) maxHeight += organization.verticalPadding; var prevTotal = organization.rowHeight[longest] + organization.rowHeight[last]; organization.rowHeight[longest] = maxHeight; if (organization.rowHeight[last] < node.height + organization.verticalPadding) organization.rowHeight[last] = node.height + organization.verticalPadding; var finalTotal = organization.rowHeight[longest] + organization.rowHeight[last]; organization.height += finalTotal - prevTotal; this.shiftToLastRow(organization); } }; CoSELayout.prototype.tilingPreLayout = function () { if (CoSEConstants.TILE) { // Find zero degree nodes and create a compound for each level this.groupZeroDegreeMembers(); // Tile and clear children of each compound this.clearCompounds(); // Separately tile and clear zero degree nodes for each level this.clearZeroDegreeMembers(); } }; CoSELayout.prototype.tilingPostLayout = function () { if (CoSEConstants.TILE) { this.repopulateZeroDegreeMembers(); this.repopulateCompounds(); } }; // ----------------------------------------------------------------------------- // Section: Tree Reduction methods // ----------------------------------------------------------------------------- // Reduce trees CoSELayout.prototype.reduceTrees = function () { var prunedNodesAll = []; var containsLeaf = true; var node; while (containsLeaf) { var allNodes = this.graphManager.getAllNodes(); var prunedNodesInStepTemp = []; containsLeaf = false; for (var i = 0; i < allNodes.length; i++) { node = allNodes[i]; if (node.getEdges().length == 1 && !node.getEdges()[0].isInterGraph && node.getChild() == null) { if (CoSEConstants.PURE_INCREMENTAL) { var otherEnd = node.getEdges()[0].getOtherEnd(node); var relativePosition = new DimensionD(node.getCenterX() - otherEnd.getCenterX(), node.getCenterY() - otherEnd.getCenterY()); prunedNodesInStepTemp.push([node, node.getEdges()[0], node.getOwner(), relativePosition]); } else { prunedNodesInStepTemp.push([node, node.getEdges()[0], node.getOwner()]); } containsLeaf = true; } } if (containsLeaf == true) { var prunedNodesInStep = []; for (var j = 0; j < prunedNodesInStepTemp.length; j++) { if (prunedNodesInStepTemp[j][0].getEdges().length == 1) { prunedNodesInStep.push(prunedNodesInStepTemp[j]); prunedNodesInStepTemp[j][0].getOwner().remove(prunedNodesInStepTemp[j][0]); } } prunedNodesAll.push(prunedNodesInStep); this.graphManager.resetAllNodes(); this.graphManager.resetAllEdges(); } } this.prunedNodesAll = prunedNodesAll; }; // Grow tree one step CoSELayout.prototype.growTree = function (prunedNodesAll) { var lengthOfPrunedNodesInStep = prunedNodesAll.length; var prunedNodesInStep = prunedNodesAll[lengthOfPrunedNodesInStep - 1]; var nodeData; for (var i = 0; i < prunedNodesInStep.length; i++) { nodeData = prunedNodesInStep[i]; this.findPlaceforPrunedNode(nodeData); nodeData[2].add(nodeData[0]); nodeData[2].add(nodeData[1], nodeData[1].source, nodeData[1].target); } prunedNodesAll.splice(prunedNodesAll.length - 1, 1); this.graphManager.resetAllNodes(); this.graphManager.resetAllEdges(); }; // Find an appropriate position to replace pruned node, this method can be improved CoSELayout.prototype.findPlaceforPrunedNode = function (nodeData) { var gridForPrunedNode; var nodeToConnect; var prunedNode = nodeData[0]; if (prunedNode == nodeData[1].source) { nodeToConnect = nodeData[1].target; } else { nodeToConnect = nodeData[1].source; } if (CoSEConstants.PURE_INCREMENTAL) { prunedNode.setCenter(nodeToConnect.getCenterX() + nodeData[3].getWidth(), nodeToConnect.getCenterY() + nodeData[3].getHeight()); } else { var startGridX = nodeToConnect.startX; var finishGridX = nodeToConnect.finishX; var startGridY = nodeToConnect.startY; var finishGridY = nodeToConnect.finishY; var upNodeCount = 0; var downNodeCount = 0; var rightNodeCount = 0; var leftNodeCount = 0; var controlRegions = [upNodeCount, rightNodeCount, downNodeCount, leftNodeCount]; if (startGridY > 0) { for (var i = startGridX; i <= finishGridX; i++) { controlRegions[0] += this.grid[i][startGridY - 1].length + this.grid[i][startGridY].length - 1; } } if (finishGridX < this.grid.length - 1) { for (var i = startGridY; i <= finishGridY; i++) { controlRegions[1] += this.grid[finishGridX + 1][i].length + this.grid[finishGridX][i].length - 1; } } if (finishGridY < this.grid[0].length - 1) { for (var i = startGridX; i <= finishGridX; i++) { controlRegions[2] += this.grid[i][finishGridY + 1].length + this.grid[i][finishGridY].length - 1; } } if (startGridX > 0) { for (var i = startGridY; i <= finishGridY; i++) { controlRegions[3] += this.grid[startGridX - 1][i].length + this.grid[startGridX][i].length - 1; } } var min = Integer.MAX_VALUE; var minCount; var minIndex; for (var j = 0; j < controlRegions.length; j++) { if (controlRegions[j] < min) { min = controlRegions[j]; minCount = 1; minIndex = j; } else if (controlRegions[j] == min) { minCount++; } } if (minCount == 3 && min == 0) { if (controlRegions[0] == 0 && controlRegions[1] == 0 && controlRegions[2] == 0) { gridForPrunedNode = 1; } else if (controlRegions[0] == 0 && controlRegions[1] == 0 && controlRegions[3] == 0) { gridForPrunedNode = 0; } else if (controlRegions[0] == 0 && controlRegions[2] == 0 && controlRegions[3] == 0) { gridForPrunedNode = 3; } else if (controlRegions[1] == 0 && controlRegions[2] == 0 && controlRegions[3] == 0) { gridForPrunedNode = 2; } } else if (minCount == 2 && min == 0) { var random = Math.floor(Math.random() * 2); if (controlRegions[0] == 0 && controlRegions[1] == 0) { ; if (random == 0) { gridForPrunedNode = 0; } else { gridForPrunedNode = 1; } } else if (controlRegions[0] == 0 && controlRegions[2] == 0) { if (random == 0) { gridForPrunedNode = 0; } else { gridForPrunedNode = 2; } } else if (controlRegions[0] == 0 && controlRegions[3] == 0) { if (random == 0) { gridForPrunedNode = 0; } else { gridForPrunedNode = 3; } } else if (controlRegions[1] == 0 && controlRegions[2] == 0) { if (random == 0) { gridForPrunedNode = 1; } else { gridForPrunedNode = 2; } } else if (controlRegions[1] == 0 && controlRegions[3] == 0) { if (random == 0) { gridForPrunedNode = 1; } else { gridForPrunedNode = 3; } } else { if (random == 0) { gridForPrunedNode = 2; } else { gridForPrunedNode = 3; } } } else if (minCount == 4 && min == 0) { var random = Math.floor(Math.random() * 4); gridForPrunedNode = random; } else { gridForPrunedNode = minIndex; } if (gridForPrunedNode == 0) { prunedNode.setCenter(nodeToConnect.getCenterX(), nodeToConnect.getCenterY() - nodeToConnect.getHeight() / 2 - FDLayoutConstants.DEFAULT_EDGE_LENGTH - prunedNode.getHeight() / 2); } else if (gridForPrunedNode == 1) { prunedNode.setCenter(nodeToConnect.getCenterX() + nodeToConnect.getWidth() / 2 + FDLayoutConstants.DEFAULT_EDGE_LENGTH + prunedNode.getWidth() / 2, nodeToConnect.getCenterY()); } else if (gridForPrunedNode == 2) { prunedNode.setCenter(nodeToConnect.getCenterX(), nodeToConnect.getCenterY() + nodeToConnect.getHeight() / 2 + FDLayoutConstants.DEFAULT_EDGE_LENGTH + prunedNode.getHeight() / 2); } else { prunedNode.setCenter(nodeToConnect.getCenterX() - nodeToConnect.getWidth() / 2 - FDLayoutConstants.DEFAULT_EDGE_LENGTH - prunedNode.getWidth() / 2, nodeToConnect.getCenterY()); } } }; module.exports = CoSELayout; /***/ }), /***/ 991: /***/ ((module, __unused_webpack_exports, __nested_webpack_require_74190__) => { var FDLayoutNode = __nested_webpack_require_74190__(551).FDLayoutNode; var IMath = __nested_webpack_require_74190__(551).IMath; function CoSENode(gm, loc, size, vNode) { FDLayoutNode.call(this, gm, loc, size, vNode); } CoSENode.prototype = Object.create(FDLayoutNode.prototype); for (var prop in FDLayoutNode) { CoSENode[prop] = FDLayoutNode[prop]; } CoSENode.prototype.calculateDisplacement = function () { var layout = this.graphManager.getLayout(); // this check is for compound nodes that contain fixed nodes if (this.getChild() != null && this.fixedNodeWeight) { this.displacementX += layout.coolingFactor * (this.springForceX + this.repulsionForceX + this.gravitationForceX) / this.fixedNodeWeight; this.displacementY += layout.coolingFactor * (this.springForceY + this.repulsionForceY + this.gravitationForceY) / this.fixedNodeWeight; } else { this.displacementX += layout.coolingFactor * (this.springForceX + this.repulsionForceX + this.gravitationForceX) / this.noOfChildren; this.displacementY += layout.coolingFactor * (this.springForceY + this.repulsionForceY + this.gravitationForceY) / this.noOfChildren; } if (Math.abs(this.displacementX) > layout.coolingFactor * layout.maxNodeDisplacement) { this.displacementX = layout.coolingFactor * layout.maxNodeDisplacement * IMath.sign(this.displacementX); } if (Math.abs(this.displacementY) > layout.coolingFactor * layout.maxNodeDisplacement) { this.displacementY = layout.coolingFactor * layout.maxNodeDisplacement * IMath.sign(this.displacementY); } // non-empty compound node, propogate movement to children as well if (this.child && this.child.getNodes().length > 0) { this.propogateDisplacementToChildren(this.displacementX, this.displacementY); } }; CoSENode.prototype.propogateDisplacementToChildren = function (dX, dY) { var nodes = this.getChild().getNodes(); var node; for (var i = 0; i < nodes.length; i++) { node = nodes[i]; if (node.getChild() == null) { node.displacementX += dX; node.displacementY += dY; } else { node.propogateDisplacementToChildren(dX, dY); } } }; CoSENode.prototype.move = function () { var layout = this.graphManager.getLayout(); // a simple node or an empty compound node, move it if (this.child == null || this.child.getNodes().length == 0) { this.moveBy(this.displacementX, this.displacementY); layout.totalDisplacement += Math.abs(this.displacementX) + Math.abs(this.displacementY); } this.springForceX = 0; this.springForceY = 0; this.repulsionForceX = 0; this.repulsionForceY = 0; this.gravitationForceX = 0; this.gravitationForceY = 0; this.displacementX = 0; this.displacementY = 0; }; CoSENode.prototype.setPred1 = function (pred1) { this.pred1 = pred1; }; CoSENode.prototype.getPred1 = function () { return pred1; }; CoSENode.prototype.getPred2 = function () { return pred2; }; CoSENode.prototype.setNext = function (next) { this.next = next; }; CoSENode.prototype.getNext = function () { return next; }; CoSENode.prototype.setProcessed = function (processed) { this.processed = processed; }; CoSENode.prototype.isProcessed = function () { return processed; }; module.exports = CoSENode; /***/ }), /***/ 902: /***/ ((module, __unused_webpack_exports, __nested_webpack_require_77514__) => { function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } var CoSEConstants = __nested_webpack_require_77514__(806); var LinkedList = __nested_webpack_require_77514__(551).LinkedList; var Matrix = __nested_webpack_require_77514__(551).Matrix; var SVD = __nested_webpack_require_77514__(551).SVD; function ConstraintHandler() {} ConstraintHandler.handleConstraints = function (layout) { // let layout = this.graphManager.getLayout(); // get constraints from layout var constraints = {}; constraints.fixedNodeConstraint = layout.constraints.fixedNodeConstraint; constraints.alignmentConstraint = layout.constraints.alignmentConstraint; constraints.relativePlacementConstraint = layout.constraints.relativePlacementConstraint; var idToNodeMap = new Map(); var nodeIndexes = new Map(); var xCoords = []; var yCoords = []; var allNodes = layout.getAllNodes(); var index = 0; // fill index map and coordinates for (var i = 0; i < allNodes.length; i++) { var node = allNodes[i]; if (node.getChild() == null) { nodeIndexes.set(node.id, index++); xCoords.push(node.getCenterX()); yCoords.push(node.getCenterY()); idToNodeMap.set(node.id, node); } } // if there exists relative placement constraint without gap value, set it to default if (constraints.relativePlacementConstraint) { constraints.relativePlacementConstraint.forEach(function (constraint) { if (!constraint.gap && constraint.gap != 0) { if (constraint.left) { constraint.gap = CoSEConstants.DEFAULT_EDGE_LENGTH + idToNodeMap.get(constraint.left).getWidth() / 2 + idToNodeMap.get(constraint.right).getWidth() / 2; } else { constraint.gap = CoSEConstants.DEFAULT_EDGE_LENGTH + idToNodeMap.get(constraint.top).getHeight() / 2 + idToNodeMap.get(constraint.bottom).getHeight() / 2; } } }); } /* auxiliary functions */ // calculate difference between two position objects var calculatePositionDiff = function calculatePositionDiff(pos1, pos2) { return { x: pos1.x - pos2.x, y: pos1.y - pos2.y }; }; // calculate average position of the nodes var calculateAvgPosition = function calculateAvgPosition(nodeIdSet) { var xPosSum = 0; var yPosSum = 0; nodeIdSet.forEach(function (nodeId) { xPosSum += xCoords[nodeIndexes.get(nodeId)]; yPosSum += yCoords[nodeIndexes.get(nodeId)]; }); return { x: xPosSum / nodeIdSet.size, y: yPosSum / nodeIdSet.size }; }; // find an appropriate positioning for the nodes in a given graph according to relative placement constraints // this function also takes the fixed nodes and alignment constraints into account // graph: dag to be evaluated, direction: "horizontal" or "vertical", // fixedNodes: set of fixed nodes to consider during evaluation, dummyPositions: appropriate coordinates of the dummy nodes var findAppropriatePositionForRelativePlacement = function findAppropriatePositionForRelativePlacement(graph, direction, fixedNodes, dummyPositions, componentSources) { // find union of two sets function setUnion(setA, setB) { var union = new Set(setA); var _iteratorNormalCompletion = true; var _didIteratorError = false; var _iteratorError = undefined; try { for (var _iterator = setB[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { var elem = _step.value; union.add(elem); } } catch (err) { _didIteratorError = true; _iteratorError = err; } finally { try { if (!_iteratorNormalCompletion && _iterator.return) { _iterator.return(); } } finally { if (_didIteratorError) { throw _iteratorError; } } } return union; } // find indegree count for each node var inDegrees = new Map(); graph.forEach(function (value, key) { inDegrees.set(key, 0); }); graph.forEach(function (value, key) { value.forEach(function (adjacent) { inDegrees.set(adjacent.id, inDegrees.get(adjacent.id) + 1); }); }); var positionMap = new Map(); // keeps the position for each node var pastMap = new Map(); // keeps the predecessors(past) of a node var queue = new LinkedList(); inDegrees.forEach(function (value, key) { if (value == 0) { queue.push(key); if (!fixedNodes) { if (direction == "horizontal") { positionMap.set(key, nodeIndexes.has(key) ? xCoords[nodeIndexes.get(key)] : dummyPositions.get(key)); } else { positionMap.set(key, nodeIndexes.has(key) ? yCoords[nodeIndexes.get(key)] : dummyPositions.get(key)); } } } else { positionMap.set(key, Number.NEGATIVE_INFINITY); } if (fixedNodes) { pastMap.set(key, new Set([key])); } }); // align sources of each component in enforcement phase if (fixedNodes) { componentSources.forEach(function (component) { var fixedIds = []; component.forEach(function (nodeId) { if (fixedNodes.has(nodeId)) { fixedIds.push(nodeId); } }); if (fixedIds.length > 0) { var position = 0; fixedIds.forEach(function (fixedId) { if (direction == "horizontal") { positionMap.set(fixedId, nodeIndexes.has(fixedId) ? xCoords[nodeIndexes.get(fixedId)] : dummyPositions.get(fixedId)); position += positionMap.get(fixedId); } else { positionMap.set(fixedId, nodeIndexes.has(fixedId) ? yCoords[nodeIndexes.get(fixedId)] : dummyPositions.get(fixedId)); position += positionMap.get(fixedId); } }); position = position / fixedIds.length; component.forEach(function (nodeId) { if (!fixedNodes.has(nodeId)) { positionMap.set(nodeId, position); } }); } else { var _position = 0; component.forEach(function (nodeId) { if (direction == "horizontal") { _position += nodeIndexes.has(nodeId) ? xCoords[nodeIndexes.get(nodeId)] : dummyPositions.get(nodeId); } else { _position += nodeIndexes.has(nodeId) ? yCoords[nodeIndexes.get(nodeId)] : dummyPositions.get(nodeId); } }); _position = _position / component.length; component.forEach(function (nodeId) { positionMap.set(nodeId, _position); }); } }); } // calculate positions of the nodes var _loop = function _loop() { var currentNode = queue.shift(); var neighbors = graph.get(currentNode); neighbors.forEach(function (neighbor) { if (positionMap.get(neighbor.id) < positionMap.get(currentNode) + neighbor.gap) { if (fixedNodes && fixedNodes.has(neighbor.id)) { var fixedPosition = void 0; if (direction == "horizontal") { fixedPosition = nodeIndexes.has(neighbor.id) ? xCoords[nodeIndexes.get(neighbor.id)] : dummyPositions.get(neighbor.id); } else { fixedPosition = nodeIndexes.has(neighbor.id) ? yCoords[nodeIndexes.get(neighbor.id)] : dummyPositions.get(neighbor.id); } positionMap.set(neighbor.id, fixedPosition); // TODO: may do unnecessary work if (fixedPosition < positionMap.get(currentNode) + neighbor.gap) { var diff = positionMap.get(currentNode) + neighbor.gap - fixedPosition; pastMap.get(currentNode).forEach(function (nodeId) { positionMap.set(nodeId, positionMap.get(nodeId) - diff); }); } } else { positionMap.set(neighbor.id, positionMap.get(currentNode) + neighbor.gap); } } inDegrees.set(neighbor.id, inDegrees.get(neighbor.id) - 1); if (inDegrees.get(neighbor.id) == 0) { queue.push(neighbor.id); } if (fixedNodes) { pastMap.set(neighbor.id, setUnion(pastMap.get(currentNode), pastMap.get(neighbor.id))); } }); }; while (queue.length != 0) { _loop(); } // readjust position of the nodes after enforcement if (fixedNodes) { // find indegree count for each node var sinkNodes = new Set(); graph.forEach(function (value, key) { if (value.length == 0) { sinkNodes.add(key); } }); var _components = []; pastMap.forEach(function (value, key) { if (sinkNodes.has(key)) { var isFixedComponent = false; var _iteratorNormalCompletion2 = true; var _didIteratorError2 = false; var _iteratorError2 = undefined; try { for (var _iterator2 = value[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { var nodeId = _step2.value; if (fixedNodes.has(nodeId)) { isFixedComponent = true; } } } catch (err) { _didIteratorError2 = true; _iteratorError2 = err; } finally { try { if (!_iteratorNormalCompletion2 && _iterator2.return) { _iterator2.return(); } } finally { if (_didIteratorError2) { throw _iteratorError2; } } } if (!isFixedComponent) { var isExist = false; var existAt = void 0; _components.forEach(function (component, index) { if (component.has([].concat(_toConsumableArray(value))[0])) { isExist = true; existAt = index; } }); if (!isExist) { _components.push(new Set(value)); } else { value.forEach(function (ele) { _components[existAt].add(ele); }); } } } }); _components.forEach(function (component, index) { var minBefore = Number.POSITIVE_INFINITY; var minAfter = Number.POSITIVE_INFINITY; var maxBefore = Number.NEGATIVE_INFINITY; var maxAfter = Number.NEGATIVE_INFINITY; var _iteratorNormalCompletion3 = true; var _didIteratorError3 = false; var _iteratorError3 = undefined; try { for (var _iterator3 = component[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { var nodeId = _step3.value; var posBefore = void 0; if (direction == "horizontal") { posBefore = nodeIndexes.has(nodeId) ? xCoords[nodeIndexes.get(nodeId)] : dummyPositions.get(nodeId); } else { posBefore = nodeIndexes.has(nodeId) ? yCoords[nodeIndexes.get(nodeId)] : dummyPositions.get(nodeId); } var posAfter = positionMap.get(nodeId); if (posBefore < minBefore) { minBefore = posBefore; } if (posBefore > maxBefore) { maxBefore = posBefore; } if (posAfter < minAfter) { minAfter = posAfter; } if (posAfter > maxAfter) { maxAfter = posAfter; } } } catch (err) { _didIteratorError3 = true; _iteratorError3 = err; } finally { try { if (!_iteratorNormalCompletion3 && _iterator3.return) { _iterator3.return(); } } finally { if (_didIteratorError3) { throw _iteratorError3; } } } var diff = (minBefore + maxBefore) / 2 - (minAfter + maxAfter) / 2; var _iteratorNormalCompletion4 = true; var _didIteratorError4 = false; var _iteratorError4 = undefined; try { for (var _iterator4 = component[Symbol.iterator](), _step4; !(_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done); _iteratorNormalCompletion4 = true) { var _nodeId = _step4.value; positionMap.set(_nodeId, positionMap.get(_nodeId) + diff); } } catch (err) { _didIteratorError4 = true; _iteratorError4 = err; } finally { try { if (!_iteratorNormalCompletion4 && _iterator4.return) { _iterator4.return(); } } finally { if (_didIteratorError4) { throw _iteratorError4; } } } }); } return positionMap; }; // find transformation based on rel. placement constraints if there are both alignment and rel. placement constraints // or if there are only rel. placement contraints where the largest component isn't sufficiently large var applyReflectionForRelativePlacement = function applyReflectionForRelativePlacement(relativePlacementConstraints) { // variables to count votes var reflectOnY = 0, notReflectOnY = 0; var reflectOnX = 0, notReflectOnX = 0; relativePlacementConstraints.forEach(function (constraint) { if (constraint.left) { xCoords[nodeIndexes.get(constraint.left)] - xCoords[nodeIndexes.get(constraint.right)] >= 0 ? reflectOnY++ : notReflectOnY++; } else { yCoords[nodeIndexes.get(constraint.top)] - yCoords[nodeIndexes.get(constraint.bottom)] >= 0 ? reflectOnX++ : notReflectOnX++; } }); if (reflectOnY > notReflectOnY && reflectOnX > notReflectOnX) { for (var _i = 0; _i < nodeIndexes.size; _i++) { xCoords[_i] = -1 * xCoords[_i]; yCoords[_i] = -1 * yCoords[_i]; } } else if (reflectOnY > notReflectOnY) { for (var _i2 = 0; _i2 < nodeIndexes.size; _i2++) { xCoords[_i2] = -1 * xCoords[_i2]; } } else if (reflectOnX > notReflectOnX) { for (var _i3 = 0; _i3 < nodeIndexes.size; _i3++) { yCoords[_i3] = -1 * yCoords[_i3]; } } }; // find weakly connected components in undirected graph var findComponents = function findComponents(graph) { // find weakly connected components in dag var components = []; var queue = new LinkedList(); var visited = new Set(); var count = 0; graph.forEach(function (value, key) { if (!visited.has(key)) { components[count] = []; var _currentNode = key; queue.push(_currentNode); visited.add(_currentNode); components[count].push(_currentNode); while (queue.length != 0) { _currentNode = queue.shift(); var neighbors = graph.get(_currentNode); neighbors.forEach(function (neighbor) { if (!visited.has(neighbor.id)) { queue.push(neighbor.id); visited.add(neighbor.id); components[count].push(neighbor.id); } }); } count++; } }); return components; }; // return undirected version of given dag var dagToUndirected = function dagToUndirected(dag) { var undirected = new Map(); dag.forEach(function (value, key) { undirected.set(key, []); }); dag.forEach(function (value, key) { value.forEach(function (adjacent) { undirected.get(key).push(adjacent); undirected.get(adjacent.id).push({ id: key, gap: adjacent.gap, direction: adjacent.direction }); }); }); return undirected; }; // return reversed (directions inverted) version of given dag var dagToReversed = function dagToReversed(dag) { var reversed = new Map(); dag.forEach(function (value, key) { reversed.set(key, []); }); dag.forEach(function (value, key) { value.forEach(function (adjacent) { reversed.get(adjacent.id).push({ id: key, gap: adjacent.gap, direction: adjacent.direction }); }); }); return reversed; }; /**** apply transformation to the initial draft layout to better align with constrained nodes ****/ // solve the Orthogonal Procrustean Problem to rotate and/or reflect initial draft layout // here we follow the solution in Chapter 20.2 of Borg, I. & Groenen, P. (2005) Modern Multidimensional Scaling: Theory and Applications /* construct source and target configurations */ var targetMatrix = []; // A - target configuration var sourceMatrix = []; // B - source configuration var standardTransformation = false; // false for no transformation, true for standart (Procrustes) transformation (rotation and/or reflection) var reflectionType = false; // false/true for reflection check, 'reflectOnX', 'reflectOnY' or 'reflectOnBoth' for reflection type if necessary var fixedNodes = new Set(); var dag = new Map(); // adjacency list to keep directed acyclic graph (dag) that consists of relative placement constraints var dagUndirected = new Map(); // undirected version of the dag var components = []; // weakly connected components // fill fixedNodes collection to use later if (constraints.fixedNodeConstraint) { constraints.fixedNodeConstraint.forEach(function (nodeData) { fixedNodes.add(nodeData.nodeId); }); } // construct dag from relative placement constraints if (constraints.relativePlacementConstraint) { // construct both directed and undirected version of the dag constraints.relativePlacementConstraint.forEach(function (constraint) { if (constraint.left) { if (dag.has(constraint.left)) { dag.get(constraint.left).push({ id: constraint.right, gap: constraint.gap, direction: "horizontal" }); } else { dag.set(constraint.left, [{ id: constraint.right, gap: constraint.gap, direction: "horizontal" }]); } if (!dag.has(constraint.right)) { dag.set(constraint.right, []); } } else { if (dag.has(constraint.top)) { dag.get(constraint.top).push({ id: constraint.bottom, gap: constraint.gap, direction: "vertical" }); } else { dag.set(constraint.top, [{ id: constraint.bottom, gap: constraint.gap, direction: "vertical" }]); } if (!dag.has(constraint.bottom)) { dag.set(constraint.bottom, []); } } }); dagUndirected = dagToUndirected(dag); components = findComponents(dagUndirected); } if (CoSEConstants.TRANSFORM_ON_CONSTRAINT_HANDLING) { // first check fixed node constraint if (constraints.fixedNodeConstraint && constraints.fixedNodeConstraint.length > 1) { constraints.fixedNodeConstraint.forEach(function (nodeData, i) { targetMatrix[i] = [nodeData.position.x, nodeData.position.y]; sourceMatrix[i] = [xCoords[nodeIndexes.get(nodeData.nodeId)], yCoords[nodeIndexes.get(nodeData.nodeId)]]; }); standardTransformation = true; } else if (constraints.alignmentConstraint) { (function () { // then check alignment constraint var count = 0; if (constraints.alignmentConstraint.vertical) { var verticalAlign = constraints.alignmentConstraint.vertical; var _loop2 = function _loop2(_i4) { var alignmentSet = new Set(); verticalAlign[_i4].forEach(function (nodeId) { alignmentSet.add(nodeId); }); var intersection = new Set([].concat(_toConsumableArray(alignmentSet)).filter(function (x) { return fixedNodes.has(x); })); var xPos = void 0; if (intersection.size > 0) xPos = xCoords[nodeIndexes.get(intersection.values().next().value)];else xPos = calculateAvgPosition(alignmentSet).x; verticalAlign[_i4].forEach(function (nodeId) { targetMatrix[count] = [xPos, yCoords[nodeIndexes.get(nodeId)]]; sourceMatrix[count] = [xCoords[nodeIndexes.get(nodeId)], yCoords[nodeIndexes.get(nodeId)]]; count++; }); }; for (var _i4 = 0; _i4 < verticalAlign.length; _i4++) { _loop2(_i4); } standardTransformation = true; } if (constraints.alignmentConstraint.horizontal) { var horizontalAlign = constraints.alignmentConstraint.horizontal; var _loop3 = function _loop3(_i5) { var alignmentSet = new Set(); horizontalAlign[_i5].forEach(function (nodeId) { alignmentSet.add(nodeId); }); var intersection = new Set([].concat(_toConsumableArray(alignmentSet)).filter(function (x) { return fixedNodes.has(x); })); var yPos = void 0; if (intersection.size > 0) yPos = xCoords[nodeIndexes.get(intersection.values().next().value)];else yPos = calculateAvgPosition(alignmentSet).y; horizontalAlign[_i5].forEach(function (nodeId) { targetMatrix[count] = [xCoords[nodeIndexes.get(nodeId)], yPos]; sourceMatrix[count] = [xCoords[nodeIndexes.get(nodeId)], yCoords[nodeIndexes.get(nodeId)]]; count++; }); }; for (var _i5 = 0; _i5 < horizontalAlign.length; _i5++) { _loop3(_i5); } standardTransformation = true; } if (constraints.relativePlacementConstraint) { reflectionType = true; } })(); } else if (constraints.relativePlacementConstraint) { // finally check relative placement constraint // find largest component in dag var largestComponentSize = 0; var largestComponentIndex = 0; for (var _i6 = 0; _i6 < components.length; _i6++) { if (components[_i6].length > largestComponentSize) { largestComponentSize = components[_i6].length; largestComponentIndex = _i6; } } // if largest component isn't dominant, then take the votes for reflection if (largestComponentSize < dagUndirected.size / 2) { applyReflectionForRelativePlacement(constraints.relativePlacementConstraint); standardTransformation = false; reflectionType = false; } else { // use largest component for transformation // construct horizontal and vertical subgraphs in the largest component var subGraphOnHorizontal = new Map(); var subGraphOnVertical = new Map(); var constraintsInlargestComponent = []; components[largestComponentIndex].forEach(function (nodeId) { dag.get(nodeId).forEach(function (adjacent) { if (adjacent.direction == "horizontal") { if (subGraphOnHorizontal.has(nodeId)) { subGraphOnHorizontal.get(nodeId).push(adjacent); } else { subGraphOnHorizontal.set(nodeId, [adjacent]); } if (!subGraphOnHorizontal.has(adjacent.id)) { subGraphOnHorizontal.set(adjacent.id, []); } constraintsInlargestComponent.push({ left: nodeId, right: adjacent.id }); } else { if (subGraphOnVertical.has(nodeId)) { subGraphOnVertical.get(nodeId).push(adjacent); } else { subGraphOnVertical.set(nodeId, [adjacent]); } if (!subGraphOnVertical.has(adjacent.id)) { subGraphOnVertical.set(adjacent.id, []); } constraintsInlargestComponent.push({ top: nodeId, bottom: adjacent.id }); } }); }); applyReflectionForRelativePlacement(constraintsInlargestComponent); reflectionType = false; // calculate appropriate positioning for subgraphs var positionMapHorizontal = findAppropriatePositionForRelativePlacement(subGraphOnHorizontal, "horizontal"); var positionMapVertical = findAppropriatePositionForRelativePlacement(subGraphOnVertical, "vertical"); // construct source and target configuration components[largestComponentIndex].forEach(function (nodeId, i) { sourceMatrix[i] = [xCoords[nodeIndexes.get(nodeId)], yCoords[nodeIndexes.get(nodeId)]]; targetMatrix[i] = []; if (positionMapHorizontal.has(nodeId)) { targetMatrix[i][0] = positionMapHorizontal.get(nodeId); } else { targetMatrix[i][0] = xCoords[nodeIndexes.get(nodeId)]; } if (positionMapVertical.has(nodeId)) { targetMatrix[i][1] = positionMapVertical.get(nodeId); } else { targetMatrix[i][1] = yCoords[nodeIndexes.get(nodeId)]; } }); standardTransformation = true; } } // if transformation is required, then calculate and apply transformation matrix if (standardTransformation) { /* calculate transformation matrix */ var transformationMatrix = void 0; var targetMatrixTranspose = Matrix.transpose(targetMatrix); // A' var sourceMatrixTranspose = Matrix.transpose(sourceMatrix); // B' // centralize transpose matrices for (var _i7 = 0; _i7 < targetMatrixTranspose.length; _i7++) { targetMatrixTranspose[_i7] = Matrix.multGamma(targetMatrixTranspose[_i7]); sourceMatrixTranspose[_i7] = Matrix.multGamma(sourceMatrixTranspose[_i7]); } // do actual calculation for transformation matrix var tempMatrix = Matrix.multMat(targetMatrixTranspose, Matrix.transpose(sourceMatrixTranspose)); // tempMatrix = A'B var SVDResult = SVD.svd(tempMatrix); // SVD(A'B) = USV', svd function returns U, S and V transformationMatrix = Matrix.multMat(SVDResult.V, Matrix.transpose(SVDResult.U)); // transformationMatrix = T = VU' /* apply found transformation matrix to obtain final draft layout */ for (var _i8 = 0; _i8 < nodeIndexes.size; _i8++) { var temp1 = [xCoords[_i8], yCoords[_i8]]; var temp2 = [transformationMatrix[0][0], transformationMatrix[1][0]]; var temp3 = [transformationMatrix[0][1], transformationMatrix[1][1]]; xCoords[_i8] = Matrix.dotProduct(temp1, temp2); yCoords[_i8] = Matrix.dotProduct(temp1, temp3); } // applied only both alignment and rel. placement constraints exist if (reflectionType) { applyReflectionForRelativePlacement(constraints.relativePlacementConstraint); } } } if (CoSEConstants.ENFORCE_CONSTRAINTS) { /**** enforce constraints on the transformed draft layout ****/ /* first enforce fixed node constraint */ if (constraints.fixedNodeConstraint && constraints.fixedNodeConstraint.length > 0) { var translationAmount = { x: 0, y: 0 }; constraints.fixedNodeConstraint.forEach(function (nodeData, i) { var posInTheory = { x: xCoords[nodeIndexes.get(nodeData.nodeId)], y: yCoords[nodeIndexes.get(nodeData.nodeId)] }; var posDesired = nodeData.position; var posDiff = calculatePositionDiff(posDesired, posInTheory); translationAmount.x += posDiff.x; translationAmount.y += posDiff.y; }); translationAmount.x /= constraints.fixedNodeConstraint.length; translationAmount.y /= constraints.fixedNodeConstraint.length; xCoords.forEach(function (value, i) { xCoords[i] += translationAmount.x; }); yCoords.forEach(function (value, i) { yCoords[i] += translationAmount.y; }); constraints.fixedNodeConstraint.forEach(function (nodeData) { xCoords[nodeIndexes.get(nodeData.nodeId)] = nodeData.position.x; yCoords[nodeIndexes.get(nodeData.nodeId)] = nodeData.position.y; }); } /* then enforce alignment constraint */ if (constraints.alignmentConstraint) { if (constraints.alignmentConstraint.vertical) { var xAlign = constraints.alignmentConstraint.vertical; var _loop4 = function _loop4(_i9) { var alignmentSet = new Set(); xAlign[_i9].forEach(function (nodeId) { alignmentSet.add(nodeId); }); var intersection = new Set([].concat(_toConsumableArray(alignmentSet)).filter(function (x) { return fixedNodes.has(x); })); var xPos = void 0; if (intersection.size > 0) xPos = xCoords[nodeIndexes.get(intersection.values().next().value)];else xPos = calculateAvgPosition(alignmentSet).x; alignmentSet.forEach(function (nodeId) { if (!fixedNodes.has(nodeId)) xCoords[nodeIndexes.get(nodeId)] = xPos; }); }; for (var _i9 = 0; _i9 < xAlign.length; _i9++) { _loop4(_i9); } } if (constraints.alignmentConstraint.horizontal) { var yAlign = constraints.alignmentConstraint.horizontal; var _loop5 = function _loop5(_i10) { var alignmentSet = new Set(); yAlign[_i10].forEach(function (nodeId) { alignmentSet.add(nodeId); }); var intersection = new Set([].concat(_toConsumableArray(alignmentSet)).filter(function (x) { return fixedNodes.has(x); })); var yPos = void 0; if (intersection.size > 0) yPos = yCoords[nodeIndexes.get(intersection.values().next().value)];else yPos = calculateAvgPosition(alignmentSet).y; alignmentSet.forEach(function (nodeId) { if (!fixedNodes.has(nodeId)) yCoords[nodeIndexes.get(nodeId)] = yPos; }); }; for (var _i10 = 0; _i10 < yAlign.length; _i10++) { _loop5(_i10); } } } /* finally enforce relative placement constraint */ if (constraints.relativePlacementConstraint) { (function () { var nodeToDummyForVerticalAlignment = new Map(); var nodeToDummyForHorizontalAlignment = new Map(); var dummyToNodeForVerticalAlignment = new Map(); var dummyToNodeForHorizontalAlignment = new Map(); var dummyPositionsForVerticalAlignment = new Map(); var dummyPositionsForHorizontalAlignment = new Map(); var fixedNodesOnHorizontal = new Set(); var fixedNodesOnVertical = new Set(); // fill maps and sets fixedNodes.forEach(function (nodeId) { fixedNodesOnHorizontal.add(nodeId); fixedNodesOnVertical.add(nodeId); }); if (constraints.alignmentConstraint) { if (constraints.alignmentConstraint.vertical) { var verticalAlignment = constraints.alignmentConstraint.vertical; var _loop6 = function _loop6(_i11) { dummyToNodeForVerticalAlignment.set("dummy" + _i11, []); verticalAlignment[_i11].forEach(function (nodeId) { nodeToDummyForVerticalAlignment.set(nodeId, "dummy" + _i11); dummyToNodeForVerticalAlignment.get("dummy" + _i11).push(nodeId); if (fixedNodes.has(nodeId)) { fixedNodesOnHorizontal.add("dummy" + _i11); } }); dummyPositionsForVerticalAlignment.set("dummy" + _i11, xCoords[nodeIndexes.get(verticalAlignment[_i11][0])]); }; for (var _i11 = 0; _i11 < verticalAlignment.length; _i11++) { _loop6(_i11); } } if (constraints.alignmentConstraint.horizontal) { var horizontalAlignment = constraints.alignmentConstraint.horizontal; var _loop7 = function _loop7(_i12) { dummyToNodeForHorizontalAlignment.set("dummy" + _i12, []); horizontalAlignment[_i12].forEach(function (nodeId) { nodeToDummyForHorizontalAlignment.set(nodeId, "dummy" + _i12); dummyToNodeForHorizontalAlignment.get("dummy" + _i12).push(nodeId); if (fixedNodes.has(nodeId)) { fixedNodesOnVertical.add("dummy" + _i12); } }); dummyPositionsForHorizontalAlignment.set("dummy" + _i12, yCoords[nodeIndexes.get(horizontalAlignment[_i12][0])]); }; for (var _i12 = 0; _i12 < horizontalAlignment.length; _i12++) { _loop7(_i12); } } } // construct horizontal and vertical dags (subgraphs) from overall dag var dagOnHorizontal = new Map(); var dagOnVertical = new Map(); var _loop8 = function _loop8(nodeId) { dag.get(nodeId).forEach(function (adjacent) { var sourceId = void 0; var targetNode = void 0; if (adjacent["direction"] == "horizontal") { sourceId = nodeToDummyForVerticalAlignment.get(nodeId) ? nodeToDummyForVerticalAlignment.get(nodeId) : nodeId; if (nodeToDummyForVerticalAlignment.get(adjacent.id)) { targetNode = { id: nodeToDummyForVerticalAlignment.get(adjacent.id), gap: adjacent.gap, direction: adjacent.direction }; } else { targetNode = adjacent; } if (dagOnHorizontal.has(sourceId)) { dagOnHorizontal.get(sourceId).push(targetNode); } else { dagOnHorizontal.set(sourceId, [targetNode]); } if (!dagOnHorizontal.has(targetNode.id)) { dagOnHorizontal.set(targetNode.id, []); } } else { sourceId = nodeToDummyForHorizontalAlignment.get(nodeId) ? nodeToDummyForHorizontalAlignment.get(nodeId) : nodeId; if (nodeToDummyForHorizontalAlignment.get(adjacent.id)) { targetNode = { id: nodeToDummyForHorizontalAlignment.get(adjacent.id), gap: adjacent.gap, direction: adjacent.direction }; } else { targetNode = adjacent; } if (dagOnVertical.has(sourceId)) { dagOnVertical.get(sourceId).push(targetNode); } else { dagOnVertical.set(sourceId, [targetNode]); } if (!dagOnVertical.has(targetNode.id)) { dagOnVertical.set(targetNode.id, []); } } }); }; var _iteratorNormalCompletion5 = true; var _didIteratorError5 = false; var _iteratorError5 = undefined; try { for (var _iterator5 = dag.keys()[Symbol.iterator](), _step5; !(_iteratorNormalCompletion5 = (_step5 = _iterator5.next()).done); _iteratorNormalCompletion5 = true) { var nodeId = _step5.value; _loop8(nodeId); } // find source nodes of each component in horizontal and vertical dags } catch (err) { _didIteratorError5 = true; _iteratorError5 = err; } finally { try { if (!_iteratorNormalCompletion5 && _iterator5.return) { _iterator5.return(); } } finally { if (_didIteratorError5) { throw _iteratorError5; } } } var undirectedOnHorizontal = dagToUndirected(dagOnHorizontal); var undirectedOnVertical = dagToUndirected(dagOnVertical); var componentsOnHorizontal = findComponents(undirectedOnHorizontal); var componentsOnVertical = findComponents(undirectedOnVertical); var reversedDagOnHorizontal = dagToReversed(dagOnHorizontal); var reversedDagOnVertical = dagToReversed(dagOnVertical); var componentSourcesOnHorizontal = []; var componentSourcesOnVertical = []; componentsOnHorizontal.forEach(function (component, index) { componentSourcesOnHorizontal[index] = []; component.forEach(function (nodeId) { if (reversedDagOnHorizontal.get(nodeId).length == 0) { componentSourcesOnHorizontal[index].push(nodeId); } }); }); componentsOnVertical.forEach(function (component, index) { componentSourcesOnVertical[index] = []; component.forEach(function (nodeId) { if (reversedDagOnVertical.get(nodeId).length == 0) { componentSourcesOnVertical[index].push(nodeId); } }); }); // calculate appropriate positioning for subgraphs var positionMapHorizontal = findAppropriatePositionForRelativePlacement(dagOnHorizontal, "horizontal", fixedNodesOnHorizontal, dummyPositionsForVerticalAlignment, componentSourcesOnHorizontal); var positionMapVertical = findAppropriatePositionForRelativePlacement(dagOnVertical, "vertical", fixedNodesOnVertical, dummyPositionsForHorizontalAlignment, componentSourcesOnVertical); // update positions of the nodes based on relative placement constraints var _loop9 = function _loop9(key) { if (dummyToNodeForVerticalAlignment.get(key)) { dummyToNodeForVerticalAlignment.get(key).forEach(function (nodeId) { xCoords[nodeIndexes.get(nodeId)] = positionMapHorizontal.get(key); }); } else { xCoords[nodeIndexes.get(key)] = positionMapHorizontal.get(key); } }; var _iteratorNormalCompletion6 = true; var _didIteratorError6 = false; var _iteratorError6 = undefined; try { for (var _iterator6 = positionMapHorizontal.keys()[Symbol.iterator](), _step6; !(_iteratorNormalCompletion6 = (_step6 = _iterator6.next()).done); _iteratorNormalCompletion6 = true) { var key = _step6.value; _loop9(key); } } catch (err) { _didIteratorError6 = true; _iteratorError6 = err; } finally { try { if (!_iteratorNormalCompletion6 && _iterator6.return) { _iterator6.return(); } } finally { if (_didIteratorError6) { throw _iteratorError6; } } } var _loop10 = function _loop10(key) { if (dummyToNodeForHorizontalAlignment.get(key)) { dummyToNodeForHorizontalAlignment.get(key).forEach(function (nodeId) { yCoords[nodeIndexes.get(nodeId)] = positionMapVertical.get(key); }); } else { yCoords[nodeIndexes.get(key)] = positionMapVertical.get(key); } }; var _iteratorNormalCompletion7 = true; var _didIteratorError7 = false; var _iteratorError7 = undefined; try { for (var _iterator7 = positionMapVertical.keys()[Symbol.iterator](), _step7; !(_iteratorNormalCompletion7 = (_step7 = _iterator7.next()).done); _iteratorNormalCompletion7 = true) { var key = _step7.value; _loop10(key); } } catch (err) { _didIteratorError7 = true; _iteratorError7 = err; } finally { try { if (!_iteratorNormalCompletion7 && _iterator7.return) { _iterator7.return(); } } finally { if (_didIteratorError7) { throw _iteratorError7; } } } })(); } } // assign new coordinates to nodes after constraint handling for (var _i13 = 0; _i13 < allNodes.length; _i13++) { var _node = allNodes[_i13]; if (_node.getChild() == null) { _node.setCenter(xCoords[nodeIndexes.get(_node.id)], yCoords[nodeIndexes.get(_node.id)]); } } }; module.exports = ConstraintHandler; /***/ }), /***/ 551: /***/ ((module) => { module.exports = __WEBPACK_EXTERNAL_MODULE__551__; /***/ }) /******/ }); /************************************************************************/ /******/ // The module cache /******/ var __webpack_module_cache__ = {}; /******/ /******/ // The require function /******/ function __nested_webpack_require_117795__(moduleId) { /******/ // Check if module is in cache /******/ var cachedModule = __webpack_module_cache__[moduleId]; /******/ if (cachedModule !== undefined) { /******/ return cachedModule.exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = __webpack_module_cache__[moduleId] = { /******/ // no module.id needed /******/ // no module.loaded needed /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ __webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_117795__); /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /************************************************************************/ /******/ /******/ // startup /******/ // Load entry module and return exports /******/ // This entry module is referenced by other modules so it can't be inlined /******/ var __nested_webpack_exports__ = __nested_webpack_require_117795__(45); /******/ /******/ return __nested_webpack_exports__; /******/ })() ; }); /***/ }), /***/ "./node_modules/css-loader/dist/cjs.js!./src/components/core/Toolbar.css": /*!*******************************************************************************!*\ !*** ./node_modules/css-loader/dist/cjs.js!./src/components/core/Toolbar.css ***! \*******************************************************************************/ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ "./node_modules/css-loader/dist/runtime/sourceMaps.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); // Imports var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default())); // Module ___CSS_LOADER_EXPORT___.push([module.id, `._dash-undo-redo { position: fixed; bottom: 30px; left: 30px; font-size: 20px; text-align: center; z-index: 9999; background-color: rgba(255, 255, 255, 0.9); } ._dash-undo-redo>div { position: relative; } ._dash-undo-redo-link { color: #0074D9; cursor: pointer; margin-left: 10px; margin-right: 10px; display: inline-block; opacity: 0.2; } ._dash-undo-redo-link:hover { opacity: 1; } ._dash-undo-redo-link ._dash-icon-undo { font-size: 20px; transform: rotate(270deg); } ._dash-undo-redo-link ._dash-icon-redo { font-size: 20px; transform: rotate(90deg); } ._dash-undo-redo-link ._dash-undo-redo-label { font-size: 15px; } `, "",{"version":3,"sources":["webpack://./src/components/core/Toolbar.css"],"names":[],"mappings":"AAAA;IACI,eAAe;IACf,YAAY;IACZ,UAAU;IACV,eAAe;IACf,kBAAkB;IAClB,aAAa;IACb,0CAA0C;;AAE9C;AACA;IACI,kBAAkB;AACtB;AACA;IACI,cAAc;IACd,eAAe;IACf,iBAAiB;IACjB,kBAAkB;IAClB,qBAAqB;IACrB,YAAY;AAChB;AACA;IACI,UAAU;AACd;AACA;IACI,eAAe;IACf,yBAAyB;AAC7B;AACA;IACI,eAAe;IACf,wBAAwB;AAC5B;AACA;IACI,eAAe;AACnB","sourcesContent":["._dash-undo-redo {\n position: fixed;\n bottom: 30px;\n left: 30px;\n font-size: 20px;\n text-align: center;\n z-index: 9999;\n background-color: rgba(255, 255, 255, 0.9);\n\n}\n._dash-undo-redo>div {\n position: relative;\n}\n._dash-undo-redo-link {\n color: #0074D9;\n cursor: pointer;\n margin-left: 10px;\n margin-right: 10px;\n display: inline-block;\n opacity: 0.2;\n}\n._dash-undo-redo-link:hover {\n opacity: 1;\n}\n._dash-undo-redo-link ._dash-icon-undo {\n font-size: 20px;\n transform: rotate(270deg);\n}\n._dash-undo-redo-link ._dash-icon-redo {\n font-size: 20px;\n transform: rotate(90deg);\n}\n._dash-undo-redo-link ._dash-undo-redo-label {\n font-size: 15px;\n}\n"],"sourceRoot":""}]); // Exports /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); /***/ }), /***/ "./node_modules/css-loader/dist/cjs.js!./src/components/error/CallbackGraph/CallbackGraphContainer.css": /*!*************************************************************************************************************!*\ !*** ./node_modules/css-loader/dist/cjs.js!./src/components/error/CallbackGraph/CallbackGraphContainer.css ***! \*************************************************************************************************************/ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ "./node_modules/css-loader/dist/runtime/sourceMaps.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); // Imports var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default())); // Module ___CSS_LOADER_EXPORT___.push([module.id, `.dash-callback-dag--container { border-radius: 4px; position: fixed; bottom: 165px; right: 16px; width: 80vw; height: calc(100vh - 180px); overflow: auto; box-sizing: border-box; background: #ffffff; display: inline-block; /* shadow-1 */ box-shadow: 0px 6px 16px rgba(80, 103, 132, 0.165), 0px 2px 6px rgba(80, 103, 132, 0.12), 0px 0px 1px rgba(80, 103, 132, 0.32); } .dash-callback-dag--info { border-radius: 4px; position: absolute; padding: 8px; bottom: 16px; left: 16px; max-width: calc(100% - 32px); max-height: 50%; overflow: auto; box-sizing: border-box; background: rgba(255,255,255,0.9); border: 2px solid #ccc; font-family: "Arial", sans-serif; } .dash-callback-dag--message { display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100%; line-height: 2em; font-family: "Arial", sans-serif; } .dash-callback-dag--layoutSelector { position: absolute; top: 10px; right: 10px; } `, "",{"version":3,"sources":["webpack://./src/components/error/CallbackGraph/CallbackGraphContainer.css"],"names":[],"mappings":"AAAA;IACI,kBAAkB;IAClB,eAAe;IACf,aAAa;IACb,WAAW;IACX,WAAW;IACX,2BAA2B;IAC3B,cAAc;IACd,sBAAsB;IACtB,mBAAmB;IACnB,qBAAqB;IACrB,aAAa;IACb;;4CAEwC;AAC5C;;AAEA;IACI,kBAAkB;IAClB,kBAAkB;IAClB,YAAY;IACZ,YAAY;IACZ,UAAU;IACV,4BAA4B;IAC5B,eAAe;IACf,cAAc;IACd,sBAAsB;IACtB,iCAAiC;IACjC,sBAAsB;IACtB,gCAAgC;AACpC;;AAEA;IACI,aAAa;IACb,sBAAsB;IACtB,uBAAuB;IACvB,mBAAmB;IACnB,YAAY;IACZ,gBAAgB;IAChB,gCAAgC;AACpC;;AAEA;IACI,kBAAkB;IAClB,SAAS;IACT,WAAW;AACf","sourcesContent":[".dash-callback-dag--container {\n border-radius: 4px;\n position: fixed;\n bottom: 165px;\n right: 16px;\n width: 80vw;\n height: calc(100vh - 180px);\n overflow: auto;\n box-sizing: border-box;\n background: #ffffff;\n display: inline-block;\n /* shadow-1 */\n box-shadow: 0px 6px 16px rgba(80, 103, 132, 0.165),\n 0px 2px 6px rgba(80, 103, 132, 0.12),\n 0px 0px 1px rgba(80, 103, 132, 0.32);\n}\n\n.dash-callback-dag--info {\n border-radius: 4px;\n position: absolute;\n padding: 8px;\n bottom: 16px;\n left: 16px;\n max-width: calc(100% - 32px);\n max-height: 50%;\n overflow: auto;\n box-sizing: border-box;\n background: rgba(255,255,255,0.9);\n border: 2px solid #ccc;\n font-family: \"Arial\", sans-serif;\n}\n\n.dash-callback-dag--message {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n height: 100%;\n line-height: 2em;\n font-family: \"Arial\", sans-serif;\n}\n\n.dash-callback-dag--layoutSelector {\n position: absolute;\n top: 10px;\n right: 10px;\n}\n"],"sourceRoot":""}]); // Exports /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); /***/ }), /***/ "./node_modules/css-loader/dist/cjs.js!./src/components/error/FrontEnd/FrontEndError.css": /*!***********************************************************************************************!*\ !*** ./node_modules/css-loader/dist/cjs.js!./src/components/error/FrontEnd/FrontEndError.css ***! \***********************************************************************************************/ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ "./node_modules/css-loader/dist/runtime/sourceMaps.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); // Imports var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default())); // Module ___CSS_LOADER_EXPORT___.push([module.id, `.error-container { margin-top: 10px; } .dash-fe-error__icon-x { position: absolute; right: 0; top: 0; color: #B9C2CE; font-size: 20px; cursor: pointer; margin-right: 10px } .dash-fe-error__icon-x:hover { color:#a1a9b5; } .dash-fe-errors { min-width: 386px; max-width: 650px; max-height: 450px; display: inline-block; } .dash-fe-error__icon-error { width: 20px; height: 20px; display: inline-block; margin-right: 16px; } .dash-fe-error__icon-close { width: 10px; height: 10px; position: absolute; right: 12px; top: 12px; display: inline-block; } .dash-fe-error__icon-arrow { width: 8px; height: 28px; margin: 0px 8px; } .dash-fe-error-top { height: 20px; display: flex; justify-content: space-between; width: 100%; cursor: pointer; } .dash-fe-error-top__group:first-child { /* * 77% is the maximum space allowed based off of the other elements * in the top part of the error container (timestamp & collapse arrow). * this was manually determined */ width: 77%; } .dash-fe-error-top__group { display: inline-flex; align-items: center; } .dash-fe-error__title { text-align: left; margin: 0px; margin-left: 5px; padding: 0px; font-size: 14px; display: inline-block; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; } .dash-fe-error__timestamp { margin-right: 20px; } .dash-fe-error__collapse--flipped { -webkit-transform: rotate(180deg); -ms-transform: rotate(180deg); transform: rotate(180deg); } .dash-fe-error__info_title { margin: 0; color: #506784; font-size: 16px; background-color: #f3f6fa; border: 2px solid #dfe8f3; box-sizing: border-box; border-top-left-radius: 4px; border-top-right-radius: 4px; padding: 10px; } .dash-fe-error__info { border: 1px solid #dfe8f3; margin: 0 0 1em 0; padding: 10px; background-color: white; border: 2px solid #dfe8f3; color: #506784; overflow: auto; white-space: pre-wrap; } .dash-fe-error__curved { border-radius: 4px; } .dash-fe-error__curved-top { border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-width: 0px; } .dash-fe-error__curved-bottom { border-radius-bottom-left: 4px; border-radius-bottom-right: 4px; background-color: #FFEFEF; } .dash-be-error__st { background-color: #fdf3f4; min-width: 386px; max-width: 650px; /* iframe container handles the scrolling */ overflow: hidden; display: inline-block; } .dash-be-error__str { background-color: #fdf3f4; min-width: 386px; max-width: 650px; overflow: auto; display: inline-block; white-space: pre-wrap; } `, "",{"version":3,"sources":["webpack://./src/components/error/FrontEnd/FrontEndError.css"],"names":[],"mappings":"AAAA;IACI,gBAAgB;AACpB;;AAEA;IACI,kBAAkB;IAClB,QAAQ;IACR,MAAM;IACN,cAAc;IACd,eAAe;IACf,eAAe;IACf;AACJ;;AAEA;;CAEC,aAAa;AACd;;;AAGA;IACI,gBAAgB;IAChB,gBAAgB;IAChB,iBAAiB;IACjB,qBAAqB;AACzB;;AAEA;IACI,WAAW;IACX,YAAY;IACZ,qBAAqB;IACrB,kBAAkB;AACtB;AACA;IACI,WAAW;IACX,YAAY;IACZ,kBAAkB;IAClB,WAAW;IACX,SAAS;IACT,qBAAqB;AACzB;AACA;IACI,UAAU;IACV,YAAY;IACZ,eAAe;AACnB;AACA;IACI,YAAY;IACZ,aAAa;IACb,8BAA8B;IAC9B,WAAW;IACX,eAAe;AACnB;AACA;IACI;;;qCAGiC;IACjC,UAAU;AACd;AACA;IACI,oBAAoB;IACpB,mBAAmB;AACvB;AACA;IACI,gBAAgB;IAChB,WAAW;IACX,gBAAgB;IAChB,YAAY;IACZ,eAAe;IACf,qBAAqB;IACrB,uBAAuB;IACvB,mBAAmB;IACnB,gBAAgB;AACpB;AACA;IACI,kBAAkB;AACtB;AACA;IACI,iCAAiC;IACjC,6BAA6B;IAC7B,yBAAyB;AAC7B;;AAEA;IACI,SAAS;IACT,cAAc;IACd,eAAe;IACf,yBAAyB;IACzB,yBAAyB;IACzB,sBAAsB;IACtB,2BAA2B;IAC3B,4BAA4B;IAC5B,aAAa;AACjB;;AAEA;IACI,yBAAyB;IACzB,iBAAiB;IACjB,aAAa;;IAEb,uBAAuB;IACvB,yBAAyB;IACzB,cAAc;IACd,cAAc;IACd,qBAAqB;AACzB;;AAEA;IACI,kBAAkB;AACtB;;AAEA;IACI,2BAA2B;IAC3B,4BAA4B;IAC5B,wBAAwB;AAC5B;;AAEA;IACI,8BAA8B;IAC9B,+BAA+B;IAC/B,yBAAyB;AAC7B;;AAEA;IACI,yBAAyB;IACzB,gBAAgB;IAChB,gBAAgB;IAChB,2CAA2C;IAC3C,gBAAgB;IAChB,qBAAqB;AACzB;;AAEA;IACI,yBAAyB;IACzB,gBAAgB;IAChB,gBAAgB;IAChB,cAAc;IACd,qBAAqB;IACrB,qBAAqB;AACzB","sourcesContent":[".error-container {\n margin-top: 10px;\n}\n\n.dash-fe-error__icon-x {\n position: absolute;\n right: 0;\n top: 0;\n color: #B9C2CE;\n font-size: 20px;\n cursor: pointer;\n margin-right: 10px\n}\n\n.dash-fe-error__icon-x:hover\n{\n color:#a1a9b5;\n}\n\n\n.dash-fe-errors {\n min-width: 386px;\n max-width: 650px;\n max-height: 450px;\n display: inline-block;\n}\n\n.dash-fe-error__icon-error {\n width: 20px;\n height: 20px;\n display: inline-block;\n margin-right: 16px;\n}\n.dash-fe-error__icon-close {\n width: 10px;\n height: 10px;\n position: absolute;\n right: 12px;\n top: 12px;\n display: inline-block;\n}\n.dash-fe-error__icon-arrow {\n width: 8px;\n height: 28px;\n margin: 0px 8px;\n}\n.dash-fe-error-top {\n height: 20px;\n display: flex;\n justify-content: space-between;\n width: 100%;\n cursor: pointer;\n}\n.dash-fe-error-top__group:first-child {\n /*\n * 77% is the maximum space allowed based off of the other elements\n * in the top part of the error container (timestamp & collapse arrow).\n * this was manually determined */\n width: 77%;\n}\n.dash-fe-error-top__group {\n display: inline-flex;\n align-items: center;\n}\n.dash-fe-error__title {\n text-align: left;\n margin: 0px;\n margin-left: 5px;\n padding: 0px;\n font-size: 14px;\n display: inline-block;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n}\n.dash-fe-error__timestamp {\n margin-right: 20px;\n}\n.dash-fe-error__collapse--flipped {\n -webkit-transform: rotate(180deg);\n -ms-transform: rotate(180deg);\n transform: rotate(180deg);\n}\n\n.dash-fe-error__info_title {\n margin: 0;\n color: #506784;\n font-size: 16px;\n background-color: #f3f6fa;\n border: 2px solid #dfe8f3;\n box-sizing: border-box;\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n padding: 10px;\n}\n\n.dash-fe-error__info {\n border: 1px solid #dfe8f3;\n margin: 0 0 1em 0;\n padding: 10px;\n\n background-color: white;\n border: 2px solid #dfe8f3;\n color: #506784;\n overflow: auto;\n white-space: pre-wrap;\n}\n\n.dash-fe-error__curved {\n border-radius: 4px;\n}\n\n.dash-fe-error__curved-top {\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n border-bottom-width: 0px;\n}\n\n.dash-fe-error__curved-bottom {\n border-radius-bottom-left: 4px;\n border-radius-bottom-right: 4px;\n background-color: #FFEFEF;\n}\n\n.dash-be-error__st {\n background-color: #fdf3f4;\n min-width: 386px;\n max-width: 650px;\n /* iframe container handles the scrolling */\n overflow: hidden;\n display: inline-block;\n}\n\n.dash-be-error__str {\n background-color: #fdf3f4;\n min-width: 386px;\n max-width: 650px;\n overflow: auto;\n display: inline-block;\n white-space: pre-wrap;\n}\n"],"sourceRoot":""}]); // Exports /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); /***/ }), /***/ "./node_modules/css-loader/dist/cjs.js!./src/components/error/GlobalErrorOverlay.css": /*!*******************************************************************************************!*\ !*** ./node_modules/css-loader/dist/cjs.js!./src/components/error/GlobalErrorOverlay.css ***! \*******************************************************************************************/ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ "./node_modules/css-loader/dist/runtime/sourceMaps.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); // Imports var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default())); // Module ___CSS_LOADER_EXPORT___.push([module.id, `.dash-error-menu { max-width: 50%; max-height: 60%; display: contents; font-family: monospace; font-size: 14px; font-variant-ligatures: common-ligatures; color: rgb(50, 50, 50); } .dash-error-card { box-sizing: border-box; background: #ffffff; display: inline-block; /* shadow-1 */ box-shadow: 0px 6px 16px rgba(80, 103, 132, 0.165), 0px 2px 6px rgba(80, 103, 132, 0.12), 0px 0px 1px rgba(80, 103, 132, 0.32); border-radius: 4px; position: fixed; top: 16px; right: 16px; animation: dash-error-card-animation 0.5s; padding: 24px; text-align: left; background-color: white; } .dash-error-card--alerts-tray { position: absolute; top: -300px; left: -1px; animation: none; box-shadow: none; border: 1px solid #ececec; border-bottom: 0; border-bottom-left-radius: 0px; border-bottom-right-radius: 0px; width: 422px; } .dash-error-card--container { padding: 10px 10px; width: 600px; max-width: 800px; max-height: calc(100vh - 50px); margin: 10px; overflow: auto; z-index: 1100; /* above the plotly.js toolbar and Bootstrap components */ } .dash-error-card__topbar { width: 100%; height: 32px; display: flex; justify-content: center; align-items: center; position: relative; } .dash-error-card__message { font-size: 14px; } .dash-error-card__message > strong { color: #ff4500; } .dash-error-card__content { box-sizing: border-box; padding: 10px 10px; background-color: white; box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.25), 0px 1px 3px rgba(162, 177, 198, 0.32); border-radius: 2px; margin-bottom: 8px; } .dash-error-card__list-item { background: #ffffff; box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.25), 0px 1px 3px rgba(162, 177, 198, 0.32); border-radius: 2px; padding: 10px 10px; margin-bottom: 10px; display: flex; align-items: center; } @keyframes dash-error-card-animation { from { opacity: 0; -webkit-transform: scale(1.1); -moz-transform: scale(1.1); -ms-transform: scale(1.1); transform: scale(1.1); } to { opacity: 1; -webkit-transform: scale(1); -moz-transform: scale(1); -ms-transform: scale(1); transform: scale(1); } } `, "",{"version":3,"sources":["webpack://./src/components/error/GlobalErrorOverlay.css"],"names":[],"mappings":"AAAA;IACI,cAAc;IACd,eAAe;IACf,iBAAiB;IACjB,sBAAsB;IACtB,eAAe;IACf,wCAAwC;IACxC,sBAAsB;AAC1B;;AAEA;IACI,sBAAsB;IACtB,mBAAmB;IACnB,qBAAqB;IACrB,aAAa;IACb;;4CAEwC;IACxC,kBAAkB;IAClB,eAAe;IACf,SAAS;IACT,WAAW;IACX,yCAAyC;IACzC,aAAa;IACb,gBAAgB;IAChB,uBAAuB;;AAE3B;AACA;IACI,kBAAkB;IAClB,WAAW;IACX,UAAU;IACV,eAAe;IACf,gBAAgB;IAChB,yBAAyB;IACzB,gBAAgB;IAChB,8BAA8B;IAC9B,+BAA+B;IAC/B,YAAY;AAChB;AACA;IACI,kBAAkB;IAClB,YAAY;IACZ,gBAAgB;IAChB,8BAA8B;IAC9B,YAAY;IACZ,cAAc;IACd,aAAa,GAAG,yDAAyD;AAC7E;;AAEA;IACI,WAAW;IACX,YAAY;IACZ,aAAa;IACb,uBAAuB;IACvB,mBAAmB;IACnB,kBAAkB;AACtB;AACA;IACI,eAAe;AACnB;;AAEA;IACI,cAAc;AAClB;;AAEA;IACI,sBAAsB;IACtB,kBAAkB;IAClB,uBAAuB;IACvB;6CACyC;IACzC,kBAAkB;IAClB,kBAAkB;AACtB;;AAEA;IACI,mBAAmB;IACnB;6CACyC;IACzC,kBAAkB;IAClB,kBAAkB;IAClB,mBAAmB;IACnB,aAAa;IACb,mBAAmB;AACvB;;AAEA;IACI;QACI,UAAU;QACV,6BAA6B;QAC7B,0BAA0B;QAC1B,yBAAyB;QACzB,qBAAqB;IACzB;IACA;QACI,UAAU;QACV,2BAA2B;QAC3B,wBAAwB;QACxB,uBAAuB;QACvB,mBAAmB;IACvB;AACJ","sourcesContent":[".dash-error-menu {\n max-width: 50%;\n max-height: 60%;\n display: contents;\n font-family: monospace;\n font-size: 14px;\n font-variant-ligatures: common-ligatures;\n color: rgb(50, 50, 50);\n}\n\n.dash-error-card {\n box-sizing: border-box;\n background: #ffffff;\n display: inline-block;\n /* shadow-1 */\n box-shadow: 0px 6px 16px rgba(80, 103, 132, 0.165),\n 0px 2px 6px rgba(80, 103, 132, 0.12),\n 0px 0px 1px rgba(80, 103, 132, 0.32);\n border-radius: 4px;\n position: fixed;\n top: 16px;\n right: 16px;\n animation: dash-error-card-animation 0.5s;\n padding: 24px;\n text-align: left;\n background-color: white;\n\n}\n.dash-error-card--alerts-tray {\n position: absolute;\n top: -300px;\n left: -1px;\n animation: none;\n box-shadow: none;\n border: 1px solid #ececec;\n border-bottom: 0;\n border-bottom-left-radius: 0px;\n border-bottom-right-radius: 0px;\n width: 422px;\n}\n.dash-error-card--container {\n padding: 10px 10px;\n width: 600px;\n max-width: 800px;\n max-height: calc(100vh - 50px);\n margin: 10px;\n overflow: auto;\n z-index: 1100; /* above the plotly.js toolbar and Bootstrap components */\n}\n\n.dash-error-card__topbar {\n width: 100%;\n height: 32px;\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n}\n.dash-error-card__message {\n font-size: 14px;\n}\n\n.dash-error-card__message > strong {\n color: #ff4500;\n}\n\n.dash-error-card__content {\n box-sizing: border-box;\n padding: 10px 10px;\n background-color: white;\n box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.25),\n 0px 1px 3px rgba(162, 177, 198, 0.32);\n border-radius: 2px;\n margin-bottom: 8px;\n}\n\n.dash-error-card__list-item {\n background: #ffffff;\n box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.25),\n 0px 1px 3px rgba(162, 177, 198, 0.32);\n border-radius: 2px;\n padding: 10px 10px;\n margin-bottom: 10px;\n display: flex;\n align-items: center;\n}\n\n@keyframes dash-error-card-animation {\n from {\n opacity: 0;\n -webkit-transform: scale(1.1);\n -moz-transform: scale(1.1);\n -ms-transform: scale(1.1);\n transform: scale(1.1);\n }\n to {\n opacity: 1;\n -webkit-transform: scale(1);\n -moz-transform: scale(1);\n -ms-transform: scale(1);\n transform: scale(1);\n }\n}\n"],"sourceRoot":""}]); // Exports /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); /***/ }), /***/ "./node_modules/css-loader/dist/cjs.js!./src/components/error/Percy.css": /*!******************************************************************************!*\ !*** ./node_modules/css-loader/dist/cjs.js!./src/components/error/Percy.css ***! \******************************************************************************/ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ "./node_modules/css-loader/dist/runtime/sourceMaps.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); // Imports var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default())); // Module ___CSS_LOADER_EXPORT___.push([module.id, `.percy-show { display: none; } @media only percy { .percy-hide { display: none; } .percy-show { display: block; } } `, "",{"version":3,"sources":["webpack://./src/components/error/Percy.css"],"names":[],"mappings":"AAAA;IACI,aAAa;AACjB;;AAEA;IACI;QACI,aAAa;IACjB;IACA;QACI,cAAc;IAClB;AACJ","sourcesContent":[".percy-show {\n display: none;\n}\n\n@media only percy {\n .percy-hide {\n display: none;\n }\n .percy-show {\n display: block;\n }\n}\n"],"sourceRoot":""}]); // Exports /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); /***/ }), /***/ "./node_modules/css-loader/dist/cjs.js!./src/components/error/menu/DebugMenu.css": /*!***************************************************************************************!*\ !*** ./node_modules/css-loader/dist/cjs.js!./src/components/error/menu/DebugMenu.css ***! \***************************************************************************************/ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ "./node_modules/css-loader/dist/runtime/sourceMaps.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js"); /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); // Imports var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default())); // Module ___CSS_LOADER_EXPORT___.push([module.id, `.dash-debug-menu { transition: 0.3s; position: fixed; bottom: 35px; right: 35px; display: flex; justify-content: center; align-items: center; z-index: 10001; background-color: #119dff; border-radius: 100%; width: 64px; height: 64px; cursor: pointer; } .dash-debug-menu--open { transform: rotate(-180deg); } .dash-debug-menu:hover { background-color: #108de4; } .dash-debug-menu__icon { width: auto; height: 24px; } .dash-debug-menu__outer { transition: 0.3s; box-sizing: border-box; position: fixed; bottom: 27px; right: 27px; display: flex; justify-content: center; align-items: center; z-index: 10000; height: 80px; border-radius: 40px; padding: 5px 78px 5px 5px; background-color: #fff; box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.25), 0px 1px 3px rgba(162, 177, 198, 0.32); } .dash-debug-menu__outer--closed { height: 60px; width: 60px; bottom: 37px; right: 37px; padding: 0; } .dash-debug-menu__content { display: flex; width: 100%; height: 100%; } .dash-debug-menu__button-container { display: flex; flex-direction: column; justify-content: center; align-items: center; width: 74px; } .dash-debug-menu__button { position: relative; background-color: #B9C2CE; border-radius: 100%; width: 64px; height: 64px; font-size: 10px; display: flex; flex-direction: column; justify-content: center; align-items: center; transition: background-color 0.2s; color: #fff; cursor: pointer; } .dash-debug-menu__button:hover { background-color: #a1a9b5; } .dash-debug-menu__button--enabled { background-color: #00CC96; } .dash-debug-menu__button.dash-debug-menu__button--enabled:hover { background-color: #03bb8a; } .dash-debug-menu__button-label { cursor: inherit; } .dash-debug-menu__button::before { visibility: hidden; pointer-events: none; position: absolute; box-sizing: border-box; bottom: 110%; left: 50%; margin-left: -60px; padding: 7px; width: 120px; border-radius: 3px; background-color: rgba(68,68,68,0.7); color: #fff; text-align: center; font-size: 10px; line-height: 1.2; } .dash-debug-menu__button:hover::before { visibility: visible; } .dash-debug-menu__button--callbacks::before { content: "Toggle Callback Graph"; } .dash-debug-menu__button--errors::before { content: "Toggle Errors"; } .dash-debug-menu__button--available, .dash-debug-menu__button--available:hover { background-color: #00CC96; cursor: default; } .dash-debug-menu__button--available::before { content: "Server Available"; } .dash-debug-menu__button--unavailable, .dash-debug-menu__button--unavailable:hover { background-color: #F1564E; cursor: default; } .dash-debug-menu__button--unavailable::before { content: "Server Unavailable. Check if the process has halted or crashed."; } .dash-debug-menu__button--cold, .dash-debug-menu__button--cold:hover { background-color: #FDDA68; cursor: default; } .dash-debug-menu__button--cold::before { content: "Hot Reload Disabled"; } .dash-debug-alert { display: flex; align-items: center; font-size: 10px; } .dash-debug-alert-label { display: flex; position: fixed; bottom: 81px; right: 29px; z-index: 10002; cursor: pointer; box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.25), 0px 1px 3px rgba(162, 177, 198, 0.32); border-radius: 32px; background-color: white; padding: 4px; color: rgb(50, 50, 50); } .dash-debug-error-count { display: block; margin: 0 3px; } .dash-debug-disconnected { font-size: 14px; margin-left: 3px; } `, "",{"version":3,"sources":["webpack://./src/components/error/menu/DebugMenu.css"],"names":[],"mappings":"AAAA;IACI,gBAAgB;IAChB,eAAe;IACf,YAAY;IACZ,WAAW;IACX,aAAa;IACb,uBAAuB;IACvB,mBAAmB;IACnB,cAAc;IACd,yBAAyB;IACzB,mBAAmB;IACnB,WAAW;IACX,YAAY;IACZ,eAAe;AACnB;AACA;IACI,0BAA0B;AAC9B;;AAEA;IACI,yBAAyB;AAC7B;;AAEA;IACI,WAAW;IACX,YAAY;AAChB;;AAEA;IACI,gBAAgB;IAChB,sBAAsB;IACtB,eAAe;IACf,YAAY;IACZ,WAAW;IACX,aAAa;IACb,uBAAuB;IACvB,mBAAmB;IACnB,cAAc;IACd,YAAY;IACZ,mBAAmB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;IACI,eAAe;IACf,gBAAgB;AACpB","sourcesContent":[".dash-debug-menu {\n transition: 0.3s;\n position: fixed;\n bottom: 35px;\n right: 35px;\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 10001;\n background-color: #119dff;\n border-radius: 100%;\n width: 64px;\n height: 64px;\n cursor: pointer;\n}\n.dash-debug-menu--open {\n transform: rotate(-180deg);\n}\n\n.dash-debug-menu:hover {\n background-color: #108de4;\n}\n\n.dash-debug-menu__icon {\n width: auto;\n height: 24px;\n}\n\n.dash-debug-menu__outer {\n transition: 0.3s;\n box-sizing: border-box;\n position: fixed;\n bottom: 27px;\n right: 27px;\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 10000;\n height: 80px;\n border-radius: 40px;\n padding: 5px 78px 5px 5px;\n background-color: #fff;\n box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.25),\n 0px 1px 3px rgba(162, 177, 198, 0.32);\n}\n.dash-debug-menu__outer--closed {\n height: 60px;\n width: 60px;\n bottom: 37px;\n right: 37px;\n padding: 0;\n}\n\n.dash-debug-menu__content {\n display: flex;\n width: 100%;\n height: 100%;\n}\n\n.dash-debug-menu__button-container {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n width: 74px;\n}\n\n.dash-debug-menu__button {\n position: relative;\n background-color: #B9C2CE;\n border-radius: 100%;\n width: 64px;\n height: 64px;\n font-size: 10px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n transition: background-color 0.2s;\n color: #fff;\n cursor: pointer;\n}\n.dash-debug-menu__button:hover {\n background-color: #a1a9b5;\n}\n.dash-debug-menu__button--enabled {\n background-color: #00CC96;\n}\n.dash-debug-menu__button.dash-debug-menu__button--enabled:hover {\n background-color: #03bb8a;\n}\n\n.dash-debug-menu__button-label {\n cursor: inherit;\n}\n\n.dash-debug-menu__button::before {\n visibility: hidden;\n pointer-events: none;\n position: absolute;\n box-sizing: border-box;\n bottom: 110%;\n left: 50%;\n margin-left: -60px;\n padding: 7px;\n width: 120px;\n border-radius: 3px;\n background-color: rgba(68,68,68,0.7);\n color: #fff;\n text-align: center;\n font-size: 10px;\n line-height: 1.2;\n}\n.dash-debug-menu__button:hover::before {\n visibility: visible;\n}\n.dash-debug-menu__button--callbacks::before {\n content: \"Toggle Callback Graph\";\n}\n.dash-debug-menu__button--errors::before {\n content: \"Toggle Errors\";\n}\n.dash-debug-menu__button--available,\n.dash-debug-menu__button--available:hover {\n background-color: #00CC96;\n cursor: default;\n}\n.dash-debug-menu__button--available::before {\n content: \"Server Available\";\n}\n.dash-debug-menu__button--unavailable,\n.dash-debug-menu__button--unavailable:hover {\n background-color: #F1564E;\n cursor: default;\n}\n.dash-debug-menu__button--unavailable::before {\n content: \"Server Unavailable. Check if the process has halted or crashed.\";\n}\n.dash-debug-menu__button--cold,\n.dash-debug-menu__button--cold:hover {\n background-color: #FDDA68;\n cursor: default;\n}\n.dash-debug-menu__button--cold::before {\n content: \"Hot Reload Disabled\";\n}\n\n.dash-debug-alert {\n display: flex;\n align-items: center;\n font-size: 10px;\n}\n\n.dash-debug-alert-label {\n display: flex;\n position: fixed;\n bottom: 81px;\n right: 29px;\n z-index: 10002;\n cursor: pointer;\n box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.25),\n 0px 1px 3px rgba(162, 177, 198, 0.32);\n border-radius: 32px;\n background-color: white;\n padding: 4px;\n color: rgb(50, 50, 50);\n}\n\n.dash-debug-error-count {\n display: block;\n margin: 0 3px;\n}\n\n.dash-debug-disconnected {\n font-size: 14px;\n margin-left: 3px;\n}\n"],"sourceRoot":""}]); // Exports /* harmony default export */ __webpack_exports__["default"] = (___CSS_LOADER_EXPORT___); /***/ }), /***/ "./node_modules/css-loader/dist/runtime/api.js": /*!*****************************************************!*\ !*** ./node_modules/css-loader/dist/runtime/api.js ***! \*****************************************************/ /***/ (function(module) { "use strict"; /* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ module.exports = function (cssWithMappingToString) { var list = []; // return the list of modules as css string list.toString = function toString() { return this.map(function (item) { var content = ""; var needLayer = typeof item[5] !== "undefined"; if (item[4]) { content += "@supports (".concat(item[4], ") {"); } if (item[2]) { content += "@media ".concat(item[2], " {"); } if (needLayer) { content += "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {"); } content += cssWithMappingToString(item); if (needLayer) { content += "}"; } if (item[2]) { content += "}"; } if (item[4]) { content += "}"; } return content; }).join(""); }; // import a list of modules into the list list.i = function i(modules, media, dedupe, supports, layer) { if (typeof modules === "string") { modules = [[null, modules, undefined]]; } var alreadyImportedModules = {}; if (dedupe) { for (var k = 0; k < this.length; k++) { var id = this[k][0]; if (id != null) { alreadyImportedModules[id] = true; } } } for (var _k = 0; _k < modules.length; _k++) { var item = [].concat(modules[_k]); if (dedupe && alreadyImportedModules[item[0]]) { continue; } if (typeof layer !== "undefined") { if (typeof item[5] === "undefined") { item[5] = layer; } else { item[1] = "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {").concat(item[1], "}"); item[5] = layer; } } if (media) { if (!item[2]) { item[2] = media; } else { item[1] = "@media ".concat(item[2], " {").concat(item[1], "}"); item[2] = media; } } if (supports) { if (!item[4]) { item[4] = "".concat(supports); } else { item[1] = "@supports (".concat(item[4], ") {").concat(item[1], "}"); item[4] = supports; } } list.push(item); } }; return list; }; /***/ }), /***/ "./node_modules/css-loader/dist/runtime/sourceMaps.js": /*!************************************************************!*\ !*** ./node_modules/css-loader/dist/runtime/sourceMaps.js ***! \************************************************************/ /***/ (function(module) { "use strict"; module.exports = function (item) { var content = item[1]; var cssMapping = item[3]; if (!cssMapping) { return content; } if (typeof btoa === "function") { var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping)))); var data = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64); var sourceMapping = "/*# ".concat(data, " */"); return [content].concat([sourceMapping]).join("\n"); } return [content].join("\n"); }; /***/ }), /***/ "./node_modules/cytoscape-dagre/cytoscape-dagre.js": /*!*********************************************************!*\ !*** ./node_modules/cytoscape-dagre/cytoscape-dagre.js ***! \*********************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { (function webpackUniversalModuleDefinition(root, factory) { if(true) module.exports = factory(__webpack_require__(/*! dagre */ "./node_modules/dagre/index.js")); else {} })(this, function(__WEBPACK_EXTERNAL_MODULE__4__) { return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __nested_webpack_require_633__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __nested_webpack_require_633__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __nested_webpack_require_633__.m = modules; /******/ /******/ // expose the module cache /******/ __nested_webpack_require_633__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __nested_webpack_require_633__.d = function(exports, name, getter) { /******/ if(!__nested_webpack_require_633__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __nested_webpack_require_633__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 8|1: behave like require /******/ __nested_webpack_require_633__.t = function(value, mode) { /******/ if(mode & 1) value = __nested_webpack_require_633__(value); /******/ if(mode & 8) return value; /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; /******/ var ns = Object.create(null); /******/ __nested_webpack_require_633__.r(ns); /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __nested_webpack_require_633__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); /******/ return ns; /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __nested_webpack_require_633__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __nested_webpack_require_633__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __nested_webpack_require_633__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __nested_webpack_require_633__.p = ""; /******/ /******/ /******/ // Load entry module and return exports /******/ return __nested_webpack_require_633__(__nested_webpack_require_633__.s = 0); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, exports, __nested_webpack_require_4097__) { var impl = __nested_webpack_require_4097__(1); // registers the extension on a cytoscape lib ref var register = function register(cytoscape) { if (!cytoscape) { return; } // can't register if cytoscape unspecified cytoscape('layout', 'dagre', impl); // register with cytoscape.js }; if (typeof cytoscape !== 'undefined') { // expose to global cytoscape (i.e. window.cytoscape) register(cytoscape); } module.exports = register; /***/ }), /* 1 */ /***/ (function(module, exports, __nested_webpack_require_4608__) { function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } var isFunction = function isFunction(o) { return typeof o === 'function'; }; var defaults = __nested_webpack_require_4608__(2); var assign = __nested_webpack_require_4608__(3); var dagre = __nested_webpack_require_4608__(4); // constructor // options : object containing layout options function DagreLayout(options) { this.options = assign({}, defaults, options); } // runs the layout DagreLayout.prototype.run = function () { var options = this.options; var layout = this; var cy = options.cy; // cy is automatically populated for us in the constructor var eles = options.eles; var getVal = function getVal(ele, val) { return isFunction(val) ? val.apply(ele, [ele]) : val; }; var bb = options.boundingBox || { x1: 0, y1: 0, w: cy.width(), h: cy.height() }; if (bb.x2 === undefined) { bb.x2 = bb.x1 + bb.w; } if (bb.w === undefined) { bb.w = bb.x2 - bb.x1; } if (bb.y2 === undefined) { bb.y2 = bb.y1 + bb.h; } if (bb.h === undefined) { bb.h = bb.y2 - bb.y1; } var g = new dagre.graphlib.Graph({ multigraph: true, compound: true }); var gObj = {}; var setGObj = function setGObj(name, val) { if (val != null) { gObj[name] = val; } }; setGObj('nodesep', options.nodeSep); setGObj('edgesep', options.edgeSep); setGObj('ranksep', options.rankSep); setGObj('rankdir', options.rankDir); setGObj('align', options.align); setGObj('ranker', options.ranker); setGObj('acyclicer', options.acyclicer); g.setGraph(gObj); g.setDefaultEdgeLabel(function () { return {}; }); g.setDefaultNodeLabel(function () { return {}; }); // add nodes to dagre var nodes = eles.nodes(); if (isFunction(options.sort)) { nodes = nodes.sort(options.sort); } for (var i = 0; i < nodes.length; i++) { var node = nodes[i]; var nbb = node.layoutDimensions(options); g.setNode(node.id(), { width: nbb.w, height: nbb.h, name: node.id() }); // console.log( g.node(node.id()) ); } // set compound parents for (var _i = 0; _i < nodes.length; _i++) { var _node = nodes[_i]; if (_node.isChild()) { g.setParent(_node.id(), _node.parent().id()); } } // add edges to dagre var edges = eles.edges().stdFilter(function (edge) { return !edge.source().isParent() && !edge.target().isParent(); // dagre can't handle edges on compound nodes }); if (isFunction(options.sort)) { edges = edges.sort(options.sort); } for (var _i2 = 0; _i2 < edges.length; _i2++) { var edge = edges[_i2]; g.setEdge(edge.source().id(), edge.target().id(), { minlen: getVal(edge, options.minLen), weight: getVal(edge, options.edgeWeight), name: edge.id() }, edge.id()); // console.log( g.edge(edge.source().id(), edge.target().id(), edge.id()) ); } dagre.layout(g); var gNodeIds = g.nodes(); for (var _i3 = 0; _i3 < gNodeIds.length; _i3++) { var id = gNodeIds[_i3]; var n = g.node(id); cy.getElementById(id).scratch().dagre = n; } var dagreBB; if (options.boundingBox) { dagreBB = { x1: Infinity, x2: -Infinity, y1: Infinity, y2: -Infinity }; nodes.forEach(function (node) { var dModel = node.scratch().dagre; dagreBB.x1 = Math.min(dagreBB.x1, dModel.x); dagreBB.x2 = Math.max(dagreBB.x2, dModel.x); dagreBB.y1 = Math.min(dagreBB.y1, dModel.y); dagreBB.y2 = Math.max(dagreBB.y2, dModel.y); }); dagreBB.w = dagreBB.x2 - dagreBB.x1; dagreBB.h = dagreBB.y2 - dagreBB.y1; } else { dagreBB = bb; } var constrainPos = function constrainPos(p) { if (options.boundingBox) { var xPct = dagreBB.w === 0 ? 0 : (p.x - dagreBB.x1) / dagreBB.w; var yPct = dagreBB.h === 0 ? 0 : (p.y - dagreBB.y1) / dagreBB.h; return { x: bb.x1 + xPct * bb.w, y: bb.y1 + yPct * bb.h }; } else { return p; } }; nodes.layoutPositions(layout, options, function (ele) { ele = _typeof(ele) === "object" ? ele : this; var dModel = ele.scratch().dagre; return constrainPos({ x: dModel.x, y: dModel.y }); }); return this; // chaining }; module.exports = DagreLayout; /***/ }), /* 2 */ /***/ (function(module, exports) { var defaults = { // dagre algo options, uses default value on undefined nodeSep: undefined, // the separation between adjacent nodes in the same rank edgeSep: undefined, // the separation between adjacent edges in the same rank rankSep: undefined, // the separation between adjacent nodes in the same rank rankDir: undefined, // 'TB' for top to bottom flow, 'LR' for left to right, align: undefined, // alignment for rank nodes. Can be 'UL', 'UR', 'DL', or 'DR', where U = up, D = down, L = left, and R = right acyclicer: undefined, // If set to 'greedy', uses a greedy heuristic for finding a feedback arc set for a graph. // A feedback arc set is a set of edges that can be removed to make a graph acyclic. ranker: undefined, // Type of algorithm to assigns a rank to each node in the input graph. // Possible values: network-simplex, tight-tree or longest-path minLen: function minLen(edge) { return 1; }, // number of ranks to keep between the source and target of the edge edgeWeight: function edgeWeight(edge) { return 1; }, // higher weight edges are generally made shorter and straighter than lower weight edges // general layout options fit: true, // whether to fit to viewport padding: 30, // fit padding spacingFactor: undefined, // Applies a multiplicative factor (>0) to expand or compress the overall area that the nodes take up nodeDimensionsIncludeLabels: false, // whether labels should be included in determining the space used by a node animate: false, // whether to transition the node positions animateFilter: function animateFilter(node, i) { return true; }, // whether to animate specific nodes when animation is on; non-animated nodes immediately go to their final positions animationDuration: 500, // duration of animation in ms if enabled animationEasing: undefined, // easing of animation if enabled boundingBox: undefined, // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } transform: function transform(node, pos) { return pos; }, // a function that applies a transform to the final node position ready: function ready() {}, // on layoutready sort: undefined, // a sorting function to order the nodes and edges; e.g. function(a, b){ return a.data('weight') - b.data('weight') } // because cytoscape dagre creates a directed graph, and directed graphs use the node order as a tie breaker when // defining the topology of a graph, this sort function can help ensure the correct order of the nodes/edges. // this feature is most useful when adding and removing the same nodes and edges multiple times in a graph. stop: function stop() {} // on layoutstop }; module.exports = defaults; /***/ }), /* 3 */ /***/ (function(module, exports) { // Simple, internal Object.assign() polyfill for options objects etc. module.exports = Object.assign != null ? Object.assign.bind(Object) : function (tgt) { for (var _len = arguments.length, srcs = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { srcs[_key - 1] = arguments[_key]; } srcs.forEach(function (src) { Object.keys(src).forEach(function (k) { return tgt[k] = src[k]; }); }); return tgt; }; /***/ }), /* 4 */ /***/ (function(module, exports) { module.exports = __WEBPACK_EXTERNAL_MODULE__4__; /***/ }) /******/ ]); }); /***/ }), /***/ "./node_modules/cytoscape/dist/cytoscape.cjs.js": /*!******************************************************!*\ !*** ./node_modules/cytoscape/dist/cytoscape.cjs.js ***! \******************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; /** * Copyright (c) 2016-2023, The Cytoscape Consortium. * * Permission is hereby granted, free of charge, to any person obtaining a copy of * this software and associated documentation files (the “Software”), to deal in * the Software without restriction, including without limitation the rights to * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies * of the Software, and to permit persons to whom the Software is furnished to do * so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ var debounce = __webpack_require__(/*! lodash/debounce */ "./node_modules/lodash/debounce.js"); var Heap = __webpack_require__(/*! heap */ "./node_modules/heap/index.js"); var get = __webpack_require__(/*! lodash/get */ "./node_modules/lodash/get.js"); var set = __webpack_require__(/*! lodash/set */ "./node_modules/lodash/set.js"); var toPath = __webpack_require__(/*! lodash/toPath */ "./node_modules/lodash/toPath.js"); function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } var debounce__default = /*#__PURE__*/_interopDefaultLegacy(debounce); var Heap__default = /*#__PURE__*/_interopDefaultLegacy(Heap); var get__default = /*#__PURE__*/_interopDefaultLegacy(get); var set__default = /*#__PURE__*/_interopDefaultLegacy(set); var toPath__default = /*#__PURE__*/_interopDefaultLegacy(toPath); function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var window$1 = typeof window === 'undefined' ? null : window; // eslint-disable-line no-undef var navigator = window$1 ? window$1.navigator : null; window$1 ? window$1.document : null; var typeofstr = _typeof(''); var typeofobj = _typeof({}); var typeoffn = _typeof(function () {}); var typeofhtmlele = typeof HTMLElement === "undefined" ? "undefined" : _typeof(HTMLElement); var instanceStr = function instanceStr(obj) { return obj && obj.instanceString && fn$6(obj.instanceString) ? obj.instanceString() : null; }; var string = function string(obj) { return obj != null && _typeof(obj) == typeofstr; }; var fn$6 = function fn(obj) { return obj != null && _typeof(obj) === typeoffn; }; var array = function array(obj) { return !elementOrCollection(obj) && (Array.isArray ? Array.isArray(obj) : obj != null && obj instanceof Array); }; var plainObject = function plainObject(obj) { return obj != null && _typeof(obj) === typeofobj && !array(obj) && obj.constructor === Object; }; var object = function object(obj) { return obj != null && _typeof(obj) === typeofobj; }; var number$1 = function number(obj) { return obj != null && _typeof(obj) === _typeof(1) && !isNaN(obj); }; var integer = function integer(obj) { return number$1(obj) && Math.floor(obj) === obj; }; var htmlElement = function htmlElement(obj) { if ('undefined' === typeofhtmlele) { return undefined; } else { return null != obj && obj instanceof HTMLElement; } }; var elementOrCollection = function elementOrCollection(obj) { return element(obj) || collection(obj); }; var element = function element(obj) { return instanceStr(obj) === 'collection' && obj._private.single; }; var collection = function collection(obj) { return instanceStr(obj) === 'collection' && !obj._private.single; }; var core = function core(obj) { return instanceStr(obj) === 'core'; }; var stylesheet = function stylesheet(obj) { return instanceStr(obj) === 'stylesheet'; }; var event = function event(obj) { return instanceStr(obj) === 'event'; }; var emptyString = function emptyString(obj) { if (obj === undefined || obj === null) { // null is empty return true; } else if (obj === '' || obj.match(/^\s+$/)) { return true; // empty string is empty } return false; // otherwise, we don't know what we've got }; var domElement = function domElement(obj) { if (typeof HTMLElement === 'undefined') { return false; // we're not in a browser so it doesn't matter } else { return obj instanceof HTMLElement; } }; var boundingBox = function boundingBox(obj) { return plainObject(obj) && number$1(obj.x1) && number$1(obj.x2) && number$1(obj.y1) && number$1(obj.y2); }; var promise = function promise(obj) { return object(obj) && fn$6(obj.then); }; var ms = function ms() { return navigator && navigator.userAgent.match(/msie|trident|edge/i); }; // probably a better way to detect this... var memoize = function memoize(fn, keyFn) { if (!keyFn) { keyFn = function keyFn() { if (arguments.length === 1) { return arguments[0]; } else if (arguments.length === 0) { return 'undefined'; } var args = []; for (var i = 0; i < arguments.length; i++) { args.push(arguments[i]); } return args.join('$'); }; } var memoizedFn = function memoizedFn() { var self = this; var args = arguments; var ret; var k = keyFn.apply(self, args); var cache = memoizedFn.cache; if (!(ret = cache[k])) { ret = cache[k] = fn.apply(self, args); } return ret; }; memoizedFn.cache = {}; return memoizedFn; }; var camel2dash = memoize(function (str) { return str.replace(/([A-Z])/g, function (v) { return '-' + v.toLowerCase(); }); }); var dash2camel = memoize(function (str) { return str.replace(/(-\w)/g, function (v) { return v[1].toUpperCase(); }); }); var prependCamel = memoize(function (prefix, str) { return prefix + str[0].toUpperCase() + str.substring(1); }, function (prefix, str) { return prefix + '$' + str; }); var capitalize = function capitalize(str) { if (emptyString(str)) { return str; } return str.charAt(0).toUpperCase() + str.substring(1); }; var number = '(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))'; var rgba = 'rgb[a]?\\((' + number + '[%]?)\\s*,\\s*(' + number + '[%]?)\\s*,\\s*(' + number + '[%]?)(?:\\s*,\\s*(' + number + '))?\\)'; var rgbaNoBackRefs = 'rgb[a]?\\((?:' + number + '[%]?)\\s*,\\s*(?:' + number + '[%]?)\\s*,\\s*(?:' + number + '[%]?)(?:\\s*,\\s*(?:' + number + '))?\\)'; var hsla = 'hsl[a]?\\((' + number + ')\\s*,\\s*(' + number + '[%])\\s*,\\s*(' + number + '[%])(?:\\s*,\\s*(' + number + '))?\\)'; var hslaNoBackRefs = 'hsl[a]?\\((?:' + number + ')\\s*,\\s*(?:' + number + '[%])\\s*,\\s*(?:' + number + '[%])(?:\\s*,\\s*(?:' + number + '))?\\)'; var hex3 = '\\#[0-9a-fA-F]{3}'; var hex6 = '\\#[0-9a-fA-F]{6}'; var ascending = function ascending(a, b) { if (a < b) { return -1; } else if (a > b) { return 1; } else { return 0; } }; var descending = function descending(a, b) { return -1 * ascending(a, b); }; var extend = Object.assign != null ? Object.assign.bind(Object) : function (tgt) { var args = arguments; for (var i = 1; i < args.length; i++) { var obj = args[i]; if (obj == null) { continue; } var keys = Object.keys(obj); for (var j = 0; j < keys.length; j++) { var k = keys[j]; tgt[k] = obj[k]; } } return tgt; }; var hex2tuple = function hex2tuple(hex) { if (!(hex.length === 4 || hex.length === 7) || hex[0] !== '#') { return; } var shortHex = hex.length === 4; var r, g, b; var base = 16; if (shortHex) { r = parseInt(hex[1] + hex[1], base); g = parseInt(hex[2] + hex[2], base); b = parseInt(hex[3] + hex[3], base); } else { r = parseInt(hex[1] + hex[2], base); g = parseInt(hex[3] + hex[4], base); b = parseInt(hex[5] + hex[6], base); } return [r, g, b]; }; // get [r, g, b, a] from hsl(0, 0, 0) or hsla(0, 0, 0, 0) var hsl2tuple = function hsl2tuple(hsl) { var ret; var h, s, l, a, r, g, b; function hue2rgb(p, q, t) { if (t < 0) t += 1; if (t > 1) t -= 1; if (t < 1 / 6) return p + (q - p) * 6 * t; if (t < 1 / 2) return q; if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6; return p; } var m = new RegExp('^' + hsla + '$').exec(hsl); if (m) { // get hue h = parseInt(m[1]); if (h < 0) { h = (360 - -1 * h % 360) % 360; } else if (h > 360) { h = h % 360; } h /= 360; // normalise on [0, 1] s = parseFloat(m[2]); if (s < 0 || s > 100) { return; } // saturation is [0, 100] s = s / 100; // normalise on [0, 1] l = parseFloat(m[3]); if (l < 0 || l > 100) { return; } // lightness is [0, 100] l = l / 100; // normalise on [0, 1] a = m[4]; if (a !== undefined) { a = parseFloat(a); if (a < 0 || a > 1) { return; } // alpha is [0, 1] } // now, convert to rgb // code from http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript if (s === 0) { r = g = b = Math.round(l * 255); // achromatic } else { var q = l < 0.5 ? l * (1 + s) : l + s - l * s; var p = 2 * l - q; r = Math.round(255 * hue2rgb(p, q, h + 1 / 3)); g = Math.round(255 * hue2rgb(p, q, h)); b = Math.round(255 * hue2rgb(p, q, h - 1 / 3)); } ret = [r, g, b, a]; } return ret; }; // get [r, g, b, a] from rgb(0, 0, 0) or rgba(0, 0, 0, 0) var rgb2tuple = function rgb2tuple(rgb) { var ret; var m = new RegExp('^' + rgba + '$').exec(rgb); if (m) { ret = []; var isPct = []; for (var i = 1; i <= 3; i++) { var channel = m[i]; if (channel[channel.length - 1] === '%') { isPct[i] = true; } channel = parseFloat(channel); if (isPct[i]) { channel = channel / 100 * 255; // normalise to [0, 255] } if (channel < 0 || channel > 255) { return; } // invalid channel value ret.push(Math.floor(channel)); } var atLeastOneIsPct = isPct[1] || isPct[2] || isPct[3]; var allArePct = isPct[1] && isPct[2] && isPct[3]; if (atLeastOneIsPct && !allArePct) { return; } // must all be percent values if one is var alpha = m[4]; if (alpha !== undefined) { alpha = parseFloat(alpha); if (alpha < 0 || alpha > 1) { return; } // invalid alpha value ret.push(alpha); } } return ret; }; var colorname2tuple = function colorname2tuple(color) { return colors[color.toLowerCase()]; }; var color2tuple = function color2tuple(color) { return (array(color) ? color : null) || colorname2tuple(color) || hex2tuple(color) || rgb2tuple(color) || hsl2tuple(color); }; var colors = { // special colour names transparent: [0, 0, 0, 0], // NB alpha === 0 // regular colours aliceblue: [240, 248, 255], antiquewhite: [250, 235, 215], aqua: [0, 255, 255], aquamarine: [127, 255, 212], azure: [240, 255, 255], beige: [245, 245, 220], bisque: [255, 228, 196], black: [0, 0, 0], blanchedalmond: [255, 235, 205], blue: [0, 0, 255], blueviolet: [138, 43, 226], brown: [165, 42, 42], burlywood: [222, 184, 135], cadetblue: [95, 158, 160], chartreuse: [127, 255, 0], chocolate: [210, 105, 30], coral: [255, 127, 80], cornflowerblue: [100, 149, 237], cornsilk: [255, 248, 220], crimson: [220, 20, 60], cyan: [0, 255, 255], darkblue: [0, 0, 139], darkcyan: [0, 139, 139], darkgoldenrod: [184, 134, 11], darkgray: [169, 169, 169], darkgreen: [0, 100, 0], darkgrey: [169, 169, 169], darkkhaki: [189, 183, 107], darkmagenta: [139, 0, 139], darkolivegreen: [85, 107, 47], darkorange: [255, 140, 0], darkorchid: [153, 50, 204], darkred: [139, 0, 0], darksalmon: [233, 150, 122], darkseagreen: [143, 188, 143], darkslateblue: [72, 61, 139], darkslategray: [47, 79, 79], darkslategrey: [47, 79, 79], darkturquoise: [0, 206, 209], darkviolet: [148, 0, 211], deeppink: [255, 20, 147], deepskyblue: [0, 191, 255], dimgray: [105, 105, 105], dimgrey: [105, 105, 105], dodgerblue: [30, 144, 255], firebrick: [178, 34, 34], floralwhite: [255, 250, 240], forestgreen: [34, 139, 34], fuchsia: [255, 0, 255], gainsboro: [220, 220, 220], ghostwhite: [248, 248, 255], gold: [255, 215, 0], goldenrod: [218, 165, 32], gray: [128, 128, 128], grey: [128, 128, 128], green: [0, 128, 0], greenyellow: [173, 255, 47], honeydew: [240, 255, 240], hotpink: [255, 105, 180], indianred: [205, 92, 92], indigo: [75, 0, 130], ivory: [255, 255, 240], khaki: [240, 230, 140], lavender: [230, 230, 250], lavenderblush: [255, 240, 245], lawngreen: [124, 252, 0], lemonchiffon: [255, 250, 205], lightblue: [173, 216, 230], lightcoral: [240, 128, 128], lightcyan: [224, 255, 255], lightgoldenrodyellow: [250, 250, 210], lightgray: [211, 211, 211], lightgreen: [144, 238, 144], lightgrey: [211, 211, 211], lightpink: [255, 182, 193], lightsalmon: [255, 160, 122], lightseagreen: [32, 178, 170], lightskyblue: [135, 206, 250], lightslategray: [119, 136, 153], lightslategrey: [119, 136, 153], lightsteelblue: [176, 196, 222], lightyellow: [255, 255, 224], lime: [0, 255, 0], limegreen: [50, 205, 50], linen: [250, 240, 230], magenta: [255, 0, 255], maroon: [128, 0, 0], mediumaquamarine: [102, 205, 170], mediumblue: [0, 0, 205], mediumorchid: [186, 85, 211], mediumpurple: [147, 112, 219], mediumseagreen: [60, 179, 113], mediumslateblue: [123, 104, 238], mediumspringgreen: [0, 250, 154], mediumturquoise: [72, 209, 204], mediumvioletred: [199, 21, 133], midnightblue: [25, 25, 112], mintcream: [245, 255, 250], mistyrose: [255, 228, 225], moccasin: [255, 228, 181], navajowhite: [255, 222, 173], navy: [0, 0, 128], oldlace: [253, 245, 230], olive: [128, 128, 0], olivedrab: [107, 142, 35], orange: [255, 165, 0], orangered: [255, 69, 0], orchid: [218, 112, 214], palegoldenrod: [238, 232, 170], palegreen: [152, 251, 152], paleturquoise: [175, 238, 238], palevioletred: [219, 112, 147], papayawhip: [255, 239, 213], peachpuff: [255, 218, 185], peru: [205, 133, 63], pink: [255, 192, 203], plum: [221, 160, 221], powderblue: [176, 224, 230], purple: [128, 0, 128], red: [255, 0, 0], rosybrown: [188, 143, 143], royalblue: [65, 105, 225], saddlebrown: [139, 69, 19], salmon: [250, 128, 114], sandybrown: [244, 164, 96], seagreen: [46, 139, 87], seashell: [255, 245, 238], sienna: [160, 82, 45], silver: [192, 192, 192], skyblue: [135, 206, 235], slateblue: [106, 90, 205], slategray: [112, 128, 144], slategrey: [112, 128, 144], snow: [255, 250, 250], springgreen: [0, 255, 127], steelblue: [70, 130, 180], tan: [210, 180, 140], teal: [0, 128, 128], thistle: [216, 191, 216], tomato: [255, 99, 71], turquoise: [64, 224, 208], violet: [238, 130, 238], wheat: [245, 222, 179], white: [255, 255, 255], whitesmoke: [245, 245, 245], yellow: [255, 255, 0], yellowgreen: [154, 205, 50] }; var setMap = function setMap(options) { var obj = options.map; var keys = options.keys; var l = keys.length; for (var i = 0; i < l; i++) { var key = keys[i]; if (plainObject(key)) { throw Error('Tried to set map with object key'); } if (i < keys.length - 1) { // extend the map if necessary if (obj[key] == null) { obj[key] = {}; } obj = obj[key]; } else { // set the value obj[key] = options.value; } } }; // gets the value in a map even if it's not built in places var getMap = function getMap(options) { var obj = options.map; var keys = options.keys; var l = keys.length; for (var i = 0; i < l; i++) { var key = keys[i]; if (plainObject(key)) { throw Error('Tried to get map with object key'); } obj = obj[key]; if (obj == null) { return obj; } } return obj; }; // deletes the entry in the map var performance = window$1 ? window$1.performance : null; var pnow = performance && performance.now ? function () { return performance.now(); } : function () { return Date.now(); }; var raf = function () { if (window$1) { if (window$1.requestAnimationFrame) { return function (fn) { window$1.requestAnimationFrame(fn); }; } else if (window$1.mozRequestAnimationFrame) { return function (fn) { window$1.mozRequestAnimationFrame(fn); }; } else if (window$1.webkitRequestAnimationFrame) { return function (fn) { window$1.webkitRequestAnimationFrame(fn); }; } else if (window$1.msRequestAnimationFrame) { return function (fn) { window$1.msRequestAnimationFrame(fn); }; } } return function (fn) { if (fn) { setTimeout(function () { fn(pnow()); }, 1000 / 60); } }; }(); var requestAnimationFrame = function requestAnimationFrame(fn) { return raf(fn); }; var performanceNow = pnow; var DEFAULT_HASH_SEED = 9261; var K = 65599; // 37 also works pretty well var DEFAULT_HASH_SEED_ALT = 5381; var hashIterableInts = function hashIterableInts(iterator) { var seed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_HASH_SEED; // sdbm/string-hash var hash = seed; var entry; for (;;) { entry = iterator.next(); if (entry.done) { break; } hash = hash * K + entry.value | 0; } return hash; }; var hashInt = function hashInt(num) { var seed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_HASH_SEED; // sdbm/string-hash return seed * K + num | 0; }; var hashIntAlt = function hashIntAlt(num) { var seed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_HASH_SEED_ALT; // djb2/string-hash return (seed << 5) + seed + num | 0; }; var combineHashes = function combineHashes(hash1, hash2) { return hash1 * 0x200000 + hash2; }; var combineHashesArray = function combineHashesArray(hashes) { return hashes[0] * 0x200000 + hashes[1]; }; var hashArrays = function hashArrays(hashes1, hashes2) { return [hashInt(hashes1[0], hashes2[0]), hashIntAlt(hashes1[1], hashes2[1])]; }; var hashIntsArray = function hashIntsArray(ints, seed) { var entry = { value: 0, done: false }; var i = 0; var length = ints.length; var iterator = { next: function next() { if (i < length) { entry.value = ints[i++]; } else { entry.done = true; } return entry; } }; return hashIterableInts(iterator, seed); }; var hashString = function hashString(str, seed) { var entry = { value: 0, done: false }; var i = 0; var length = str.length; var iterator = { next: function next() { if (i < length) { entry.value = str.charCodeAt(i++); } else { entry.done = true; } return entry; } }; return hashIterableInts(iterator, seed); }; var hashStrings = function hashStrings() { return hashStringsArray(arguments); }; var hashStringsArray = function hashStringsArray(strs) { var hash; for (var i = 0; i < strs.length; i++) { var str = strs[i]; if (i === 0) { hash = hashString(str); } else { hash = hashString(str, hash); } } return hash; }; /*global console */ var warningsEnabled = true; var warnSupported = console.warn != null; // eslint-disable-line no-console var traceSupported = console.trace != null; // eslint-disable-line no-console var MAX_INT$1 = Number.MAX_SAFE_INTEGER || 9007199254740991; var trueify = function trueify() { return true; }; var falsify = function falsify() { return false; }; var zeroify = function zeroify() { return 0; }; var noop$1 = function noop() {}; var error = function error(msg) { throw new Error(msg); }; var warnings = function warnings(enabled) { if (enabled !== undefined) { warningsEnabled = !!enabled; } else { return warningsEnabled; } }; var warn = function warn(msg) { /* eslint-disable no-console */ if (!warnings()) { return; } if (warnSupported) { console.warn(msg); } else { console.log(msg); if (traceSupported) { console.trace(); } } }; /* eslint-enable */ var clone = function clone(obj) { return extend({}, obj); }; // gets a shallow copy of the argument var copy = function copy(obj) { if (obj == null) { return obj; } if (array(obj)) { return obj.slice(); } else if (plainObject(obj)) { return clone(obj); } else { return obj; } }; var copyArray = function copyArray(arr) { return arr.slice(); }; var uuid = function uuid(a, b /* placeholders */ ) { for ( // loop :) b = a = ''; // b - result , a - numeric letiable a++ < 36; // b += a * 51 & 52 // if "a" is not 9 or 14 or 19 or 24 ? // return a random number or 4 (a ^ 15 // if "a" is not 15 ? // generate a random number from 0 to 15 8 ^ Math.random() * (a ^ 20 ? 16 : 4) // unless "a" is 20, in which case a random number from 8 to 11 : 4 // otherwise 4 ).toString(16) : '-' // in other cases (if "a" is 9,14,19,24) insert "-" ) { } return b; }; var _staticEmptyObject = {}; var staticEmptyObject = function staticEmptyObject() { return _staticEmptyObject; }; var defaults$g = function defaults(_defaults) { var keys = Object.keys(_defaults); return function (opts) { var filledOpts = {}; for (var i = 0; i < keys.length; i++) { var key = keys[i]; var optVal = opts == null ? undefined : opts[key]; filledOpts[key] = optVal === undefined ? _defaults[key] : optVal; } return filledOpts; }; }; var removeFromArray = function removeFromArray(arr, ele, oneCopy) { for (var i = arr.length - 1; i >= 0; i--) { if (arr[i] === ele) { arr.splice(i, 1); if (oneCopy) { break; } } } }; var clearArray = function clearArray(arr) { arr.splice(0, arr.length); }; var push = function push(arr, otherArr) { for (var i = 0; i < otherArr.length; i++) { var el = otherArr[i]; arr.push(el); } }; var getPrefixedProperty = function getPrefixedProperty(obj, propName, prefix) { if (prefix) { propName = prependCamel(prefix, propName); // e.g. (labelWidth, source) => sourceLabelWidth } return obj[propName]; }; var setPrefixedProperty = function setPrefixedProperty(obj, propName, prefix, value) { if (prefix) { propName = prependCamel(prefix, propName); // e.g. (labelWidth, source) => sourceLabelWidth } obj[propName] = value; }; /* global Map */ var ObjectMap = /*#__PURE__*/function () { function ObjectMap() { _classCallCheck(this, ObjectMap); this._obj = {}; } _createClass(ObjectMap, [{ key: "set", value: function set(key, val) { this._obj[key] = val; return this; } }, { key: "delete", value: function _delete(key) { this._obj[key] = undefined; return this; } }, { key: "clear", value: function clear() { this._obj = {}; } }, { key: "has", value: function has(key) { return this._obj[key] !== undefined; } }, { key: "get", value: function get(key) { return this._obj[key]; } }]); return ObjectMap; }(); var Map$1 = typeof Map !== 'undefined' ? Map : ObjectMap; /* global Set */ var undef = "undefined" ; var ObjectSet = /*#__PURE__*/function () { function ObjectSet(arrayOrObjectSet) { _classCallCheck(this, ObjectSet); this._obj = Object.create(null); this.size = 0; if (arrayOrObjectSet != null) { var arr; if (arrayOrObjectSet.instanceString != null && arrayOrObjectSet.instanceString() === this.instanceString()) { arr = arrayOrObjectSet.toArray(); } else { arr = arrayOrObjectSet; } for (var i = 0; i < arr.length; i++) { this.add(arr[i]); } } } _createClass(ObjectSet, [{ key: "instanceString", value: function instanceString() { return 'set'; } }, { key: "add", value: function add(val) { var o = this._obj; if (o[val] !== 1) { o[val] = 1; this.size++; } } }, { key: "delete", value: function _delete(val) { var o = this._obj; if (o[val] === 1) { o[val] = 0; this.size--; } } }, { key: "clear", value: function clear() { this._obj = Object.create(null); } }, { key: "has", value: function has(val) { return this._obj[val] === 1; } }, { key: "toArray", value: function toArray() { var _this = this; return Object.keys(this._obj).filter(function (key) { return _this.has(key); }); } }, { key: "forEach", value: function forEach(callback, thisArg) { return this.toArray().forEach(callback, thisArg); } }]); return ObjectSet; }(); var Set$1 = (typeof Set === "undefined" ? "undefined" : _typeof(Set)) !== undef ? Set : ObjectSet; var Element = function Element(cy, params) { var restore = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; if (cy === undefined || params === undefined || !core(cy)) { error('An element must have a core reference and parameters set'); return; } var group = params.group; // try to automatically infer the group if unspecified if (group == null) { if (params.data && params.data.source != null && params.data.target != null) { group = 'edges'; } else { group = 'nodes'; } } // validate group if (group !== 'nodes' && group !== 'edges') { error('An element must be of type `nodes` or `edges`; you specified `' + group + '`'); return; } // make the element array-like, just like a collection this.length = 1; this[0] = this; // NOTE: when something is added here, add also to ele.json() var _p = this._private = { cy: cy, single: true, // indicates this is an element data: params.data || {}, // data object position: params.position || { x: 0, y: 0 }, // (x, y) position pair autoWidth: undefined, // width and height of nodes calculated by the renderer when set to special 'auto' value autoHeight: undefined, autoPadding: undefined, compoundBoundsClean: false, // whether the compound dimensions need to be recalculated the next time dimensions are read listeners: [], // array of bound listeners group: group, // string; 'nodes' or 'edges' style: {}, // properties as set by the style rstyle: {}, // properties for style sent from the renderer to the core styleCxts: [], // applied style contexts from the styler styleKeys: {}, // per-group keys of style property values removed: true, // whether it's inside the vis; true if removed (set true here since we call restore) selected: params.selected ? true : false, // whether it's selected selectable: params.selectable === undefined ? true : params.selectable ? true : false, // whether it's selectable locked: params.locked ? true : false, // whether the element is locked (cannot be moved) grabbed: false, // whether the element is grabbed by the mouse; renderer sets this privately grabbable: params.grabbable === undefined ? true : params.grabbable ? true : false, // whether the element can be grabbed pannable: params.pannable === undefined ? group === 'edges' ? true : false : params.pannable ? true : false, // whether the element has passthrough panning enabled active: false, // whether the element is active from user interaction classes: new Set$1(), // map ( className => true ) animation: { // object for currently-running animations current: [], queue: [] }, rscratch: {}, // object in which the renderer can store information scratch: params.scratch || {}, // scratch objects edges: [], // array of connected edges children: [], // array of children parent: params.parent && params.parent.isNode() ? params.parent : null, // parent ref traversalCache: {}, // cache of output of traversal functions backgrounding: false, // whether background images are loading bbCache: null, // cache of the current bounding box bbCacheShift: { x: 0, y: 0 }, // shift applied to cached bb to be applied on next get bodyBounds: null, // bounds cache of element body, w/o overlay overlayBounds: null, // bounds cache of element body, including overlay labelBounds: { // bounds cache of labels all: null, source: null, target: null, main: null }, arrowBounds: { // bounds cache of edge arrows source: null, target: null, 'mid-source': null, 'mid-target': null } }; if (_p.position.x == null) { _p.position.x = 0; } if (_p.position.y == null) { _p.position.y = 0; } // renderedPosition overrides if specified if (params.renderedPosition) { var rpos = params.renderedPosition; var pan = cy.pan(); var zoom = cy.zoom(); _p.position = { x: (rpos.x - pan.x) / zoom, y: (rpos.y - pan.y) / zoom }; } var classes = []; if (array(params.classes)) { classes = params.classes; } else if (string(params.classes)) { classes = params.classes.split(/\s+/); } for (var i = 0, l = classes.length; i < l; i++) { var cls = classes[i]; if (!cls || cls === '') { continue; } _p.classes.add(cls); } this.createEmitter(); var bypass = params.style || params.css; if (bypass) { warn('Setting a `style` bypass at element creation should be done only when absolutely necessary. Try to use the stylesheet instead.'); this.style(bypass); } if (restore === undefined || restore) { this.restore(); } }; var defineSearch = function defineSearch(params) { params = { bfs: params.bfs || !params.dfs, dfs: params.dfs || !params.bfs }; // from pseudocode on wikipedia return function searchFn(roots, fn, directed) { var options; if (plainObject(roots) && !elementOrCollection(roots)) { options = roots; roots = options.roots || options.root; fn = options.visit; directed = options.directed; } directed = arguments.length === 2 && !fn$6(fn) ? fn : directed; fn = fn$6(fn) ? fn : function () {}; var cy = this._private.cy; var v = roots = string(roots) ? this.filter(roots) : roots; var Q = []; var connectedNodes = []; var connectedBy = {}; var id2depth = {}; var V = {}; var j = 0; var found; var _this$byGroup = this.byGroup(), nodes = _this$byGroup.nodes, edges = _this$byGroup.edges; // enqueue v for (var i = 0; i < v.length; i++) { var vi = v[i]; var viId = vi.id(); if (vi.isNode()) { Q.unshift(vi); if (params.bfs) { V[viId] = true; connectedNodes.push(vi); } id2depth[viId] = 0; } } var _loop = function _loop() { var v = params.bfs ? Q.shift() : Q.pop(); var vId = v.id(); if (params.dfs) { if (V[vId]) { return "continue"; } V[vId] = true; connectedNodes.push(v); } var depth = id2depth[vId]; var prevEdge = connectedBy[vId]; var src = prevEdge != null ? prevEdge.source() : null; var tgt = prevEdge != null ? prevEdge.target() : null; var prevNode = prevEdge == null ? undefined : v.same(src) ? tgt[0] : src[0]; var ret = void 0; ret = fn(v, prevEdge, prevNode, j++, depth); if (ret === true) { found = v; return "break"; } if (ret === false) { return "break"; } var vwEdges = v.connectedEdges().filter(function (e) { return (!directed || e.source().same(v)) && edges.has(e); }); for (var _i2 = 0; _i2 < vwEdges.length; _i2++) { var e = vwEdges[_i2]; var w = e.connectedNodes().filter(function (n) { return !n.same(v) && nodes.has(n); }); var wId = w.id(); if (w.length !== 0 && !V[wId]) { w = w[0]; Q.push(w); if (params.bfs) { V[wId] = true; connectedNodes.push(w); } connectedBy[wId] = e; id2depth[wId] = id2depth[vId] + 1; } } }; while (Q.length !== 0) { var _ret = _loop(); if (_ret === "continue") continue; if (_ret === "break") break; } var connectedEles = cy.collection(); for (var _i = 0; _i < connectedNodes.length; _i++) { var node = connectedNodes[_i]; var edge = connectedBy[node.id()]; if (edge != null) { connectedEles.push(edge); } connectedEles.push(node); } return { path: cy.collection(connectedEles), found: cy.collection(found) }; }; }; // search, spanning trees, etc var elesfn$v = { breadthFirstSearch: defineSearch({ bfs: true }), depthFirstSearch: defineSearch({ dfs: true }) }; // nice, short mathematical alias elesfn$v.bfs = elesfn$v.breadthFirstSearch; elesfn$v.dfs = elesfn$v.depthFirstSearch; var dijkstraDefaults = defaults$g({ root: null, weight: function weight(edge) { return 1; }, directed: false }); var elesfn$u = { dijkstra: function dijkstra(options) { if (!plainObject(options)) { var args = arguments; options = { root: args[0], weight: args[1], directed: args[2] }; } var _dijkstraDefaults = dijkstraDefaults(options), root = _dijkstraDefaults.root, weight = _dijkstraDefaults.weight, directed = _dijkstraDefaults.directed; var eles = this; var weightFn = weight; var source = string(root) ? this.filter(root)[0] : root[0]; var dist = {}; var prev = {}; var knownDist = {}; var _this$byGroup = this.byGroup(), nodes = _this$byGroup.nodes, edges = _this$byGroup.edges; edges.unmergeBy(function (ele) { return ele.isLoop(); }); var getDist = function getDist(node) { return dist[node.id()]; }; var setDist = function setDist(node, d) { dist[node.id()] = d; Q.updateItem(node); }; var Q = new Heap__default["default"](function (a, b) { return getDist(a) - getDist(b); }); for (var i = 0; i < nodes.length; i++) { var node = nodes[i]; dist[node.id()] = node.same(source) ? 0 : Infinity; Q.push(node); } var distBetween = function distBetween(u, v) { var uvs = (directed ? u.edgesTo(v) : u.edgesWith(v)).intersect(edges); var smallestDistance = Infinity; var smallestEdge; for (var _i = 0; _i < uvs.length; _i++) { var edge = uvs[_i]; var _weight = weightFn(edge); if (_weight < smallestDistance || !smallestEdge) { smallestDistance = _weight; smallestEdge = edge; } } return { edge: smallestEdge, dist: smallestDistance }; }; while (Q.size() > 0) { var u = Q.pop(); var smalletsDist = getDist(u); var uid = u.id(); knownDist[uid] = smalletsDist; if (smalletsDist === Infinity) { continue; } var neighbors = u.neighborhood().intersect(nodes); for (var _i2 = 0; _i2 < neighbors.length; _i2++) { var v = neighbors[_i2]; var vid = v.id(); var vDist = distBetween(u, v); var alt = smalletsDist + vDist.dist; if (alt < getDist(v)) { setDist(v, alt); prev[vid] = { node: u, edge: vDist.edge }; } } // for } // while return { distanceTo: function distanceTo(node) { var target = string(node) ? nodes.filter(node)[0] : node[0]; return knownDist[target.id()]; }, pathTo: function pathTo(node) { var target = string(node) ? nodes.filter(node)[0] : node[0]; var S = []; var u = target; var uid = u.id(); if (target.length > 0) { S.unshift(target); while (prev[uid]) { var p = prev[uid]; S.unshift(p.edge); S.unshift(p.node); u = p.node; uid = u.id(); } } return eles.spawn(S); } }; } }; var elesfn$t = { // kruskal's algorithm (finds min spanning tree, assuming undirected graph) // implemented from pseudocode from wikipedia kruskal: function kruskal(weightFn) { weightFn = weightFn || function (edge) { return 1; }; var _this$byGroup = this.byGroup(), nodes = _this$byGroup.nodes, edges = _this$byGroup.edges; var numNodes = nodes.length; var forest = new Array(numNodes); var A = nodes; // assumes byGroup() creates new collections that can be safely mutated var findSetIndex = function findSetIndex(ele) { for (var i = 0; i < forest.length; i++) { var eles = forest[i]; if (eles.has(ele)) { return i; } } }; // start with one forest per node for (var i = 0; i < numNodes; i++) { forest[i] = this.spawn(nodes[i]); } var S = edges.sort(function (a, b) { return weightFn(a) - weightFn(b); }); for (var _i = 0; _i < S.length; _i++) { var edge = S[_i]; var u = edge.source()[0]; var v = edge.target()[0]; var setUIndex = findSetIndex(u); var setVIndex = findSetIndex(v); var setU = forest[setUIndex]; var setV = forest[setVIndex]; if (setUIndex !== setVIndex) { A.merge(edge); // combine forests for u and v setU.merge(setV); forest.splice(setVIndex, 1); } } return A; } }; var aStarDefaults = defaults$g({ root: null, goal: null, weight: function weight(edge) { return 1; }, heuristic: function heuristic(edge) { return 0; }, directed: false }); var elesfn$s = { // Implemented from pseudocode from wikipedia aStar: function aStar(options) { var cy = this.cy(); var _aStarDefaults = aStarDefaults(options), root = _aStarDefaults.root, goal = _aStarDefaults.goal, heuristic = _aStarDefaults.heuristic, directed = _aStarDefaults.directed, weight = _aStarDefaults.weight; root = cy.collection(root)[0]; goal = cy.collection(goal)[0]; var sid = root.id(); var tid = goal.id(); var gScore = {}; var fScore = {}; var closedSetIds = {}; var openSet = new Heap__default["default"](function (a, b) { return fScore[a.id()] - fScore[b.id()]; }); var openSetIds = new Set$1(); var cameFrom = {}; var cameFromEdge = {}; var addToOpenSet = function addToOpenSet(ele, id) { openSet.push(ele); openSetIds.add(id); }; var cMin, cMinId; var popFromOpenSet = function popFromOpenSet() { cMin = openSet.pop(); cMinId = cMin.id(); openSetIds["delete"](cMinId); }; var isInOpenSet = function isInOpenSet(id) { return openSetIds.has(id); }; addToOpenSet(root, sid); gScore[sid] = 0; fScore[sid] = heuristic(root); // Counter var steps = 0; // Main loop while (openSet.size() > 0) { popFromOpenSet(); steps++; // If we've found our goal, then we are done if (cMinId === tid) { var path = []; var pathNode = goal; var pathNodeId = tid; var pathEdge = cameFromEdge[pathNodeId]; for (;;) { path.unshift(pathNode); if (pathEdge != null) { path.unshift(pathEdge); } pathNode = cameFrom[pathNodeId]; if (pathNode == null) { break; } pathNodeId = pathNode.id(); pathEdge = cameFromEdge[pathNodeId]; } return { found: true, distance: gScore[cMinId], path: this.spawn(path), steps: steps }; } // Add cMin to processed nodes closedSetIds[cMinId] = true; // Update scores for neighbors of cMin // Take into account if graph is directed or not var vwEdges = cMin._private.edges; for (var i = 0; i < vwEdges.length; i++) { var e = vwEdges[i]; // edge must be in set of calling eles if (!this.hasElementWithId(e.id())) { continue; } // cMin must be the source of edge if directed if (directed && e.data('source') !== cMinId) { continue; } var wSrc = e.source(); var wTgt = e.target(); var w = wSrc.id() !== cMinId ? wSrc : wTgt; var wid = w.id(); // node must be in set of calling eles if (!this.hasElementWithId(wid)) { continue; } // if node is in closedSet, ignore it if (closedSetIds[wid]) { continue; } // New tentative score for node w var tempScore = gScore[cMinId] + weight(e); // Update gScore for node w if: // w not present in openSet // OR // tentative gScore is less than previous value // w not in openSet if (!isInOpenSet(wid)) { gScore[wid] = tempScore; fScore[wid] = tempScore + heuristic(w); addToOpenSet(w, wid); cameFrom[wid] = cMin; cameFromEdge[wid] = e; continue; } // w already in openSet, but with greater gScore if (tempScore < gScore[wid]) { gScore[wid] = tempScore; fScore[wid] = tempScore + heuristic(w); cameFrom[wid] = cMin; cameFromEdge[wid] = e; } } // End of neighbors update } // End of main loop // If we've reached here, then we've not reached our goal return { found: false, distance: undefined, path: undefined, steps: steps }; } }; // elesfn var floydWarshallDefaults = defaults$g({ weight: function weight(edge) { return 1; }, directed: false }); var elesfn$r = { // Implemented from pseudocode from wikipedia floydWarshall: function floydWarshall(options) { var cy = this.cy(); var _floydWarshallDefault = floydWarshallDefaults(options), weight = _floydWarshallDefault.weight, directed = _floydWarshallDefault.directed; var weightFn = weight; var _this$byGroup = this.byGroup(), nodes = _this$byGroup.nodes, edges = _this$byGroup.edges; var N = nodes.length; var Nsq = N * N; var indexOf = function indexOf(node) { return nodes.indexOf(node); }; var atIndex = function atIndex(i) { return nodes[i]; }; // Initialize distance matrix var dist = new Array(Nsq); for (var n = 0; n < Nsq; n++) { var j = n % N; var i = (n - j) / N; if (i === j) { dist[n] = 0; } else { dist[n] = Infinity; } } // Initialize matrix used for path reconstruction // Initialize distance matrix var next = new Array(Nsq); var edgeNext = new Array(Nsq); // Process edges for (var _i = 0; _i < edges.length; _i++) { var edge = edges[_i]; var src = edge.source()[0]; var tgt = edge.target()[0]; if (src === tgt) { continue; } // exclude loops var s = indexOf(src); var t = indexOf(tgt); var st = s * N + t; // source to target index var _weight = weightFn(edge); // Check if already process another edge between same 2 nodes if (dist[st] > _weight) { dist[st] = _weight; next[st] = t; edgeNext[st] = edge; } // If undirected graph, process 'reversed' edge if (!directed) { var ts = t * N + s; // target to source index if (!directed && dist[ts] > _weight) { dist[ts] = _weight; next[ts] = s; edgeNext[ts] = edge; } } } // Main loop for (var k = 0; k < N; k++) { for (var _i2 = 0; _i2 < N; _i2++) { var ik = _i2 * N + k; for (var _j = 0; _j < N; _j++) { var ij = _i2 * N + _j; var kj = k * N + _j; if (dist[ik] + dist[kj] < dist[ij]) { dist[ij] = dist[ik] + dist[kj]; next[ij] = next[ik]; } } } } var getArgEle = function getArgEle(ele) { return (string(ele) ? cy.filter(ele) : ele)[0]; }; var indexOfArgEle = function indexOfArgEle(ele) { return indexOf(getArgEle(ele)); }; var res = { distance: function distance(from, to) { var i = indexOfArgEle(from); var j = indexOfArgEle(to); return dist[i * N + j]; }, path: function path(from, to) { var i = indexOfArgEle(from); var j = indexOfArgEle(to); var fromNode = atIndex(i); if (i === j) { return fromNode.collection(); } if (next[i * N + j] == null) { return cy.collection(); } var path = cy.collection(); var prev = i; var edge; path.merge(fromNode); while (i !== j) { prev = i; i = next[i * N + j]; edge = edgeNext[prev * N + i]; path.merge(edge); path.merge(atIndex(i)); } return path; } }; return res; } // floydWarshall }; // elesfn var bellmanFordDefaults = defaults$g({ weight: function weight(edge) { return 1; }, directed: false, root: null }); var elesfn$q = { // Implemented from pseudocode from wikipedia bellmanFord: function bellmanFord(options) { var _this = this; var _bellmanFordDefaults = bellmanFordDefaults(options), weight = _bellmanFordDefaults.weight, directed = _bellmanFordDefaults.directed, root = _bellmanFordDefaults.root; var weightFn = weight; var eles = this; var cy = this.cy(); var _this$byGroup = this.byGroup(), edges = _this$byGroup.edges, nodes = _this$byGroup.nodes; var numNodes = nodes.length; var infoMap = new Map$1(); var hasNegativeWeightCycle = false; var negativeWeightCycles = []; root = cy.collection(root)[0]; // in case selector passed edges.unmergeBy(function (edge) { return edge.isLoop(); }); var numEdges = edges.length; var getInfo = function getInfo(node) { var obj = infoMap.get(node.id()); if (!obj) { obj = {}; infoMap.set(node.id(), obj); } return obj; }; var getNodeFromTo = function getNodeFromTo(to) { return (string(to) ? cy.$(to) : to)[0]; }; var distanceTo = function distanceTo(to) { return getInfo(getNodeFromTo(to)).dist; }; var pathTo = function pathTo(to) { var thisStart = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : root; var end = getNodeFromTo(to); var path = []; var node = end; for (;;) { if (node == null) { return _this.spawn(); } var _getInfo = getInfo(node), edge = _getInfo.edge, pred = _getInfo.pred; path.unshift(node[0]); if (node.same(thisStart) && path.length > 0) { break; } if (edge != null) { path.unshift(edge); } node = pred; } return eles.spawn(path); }; // Initializations { dist, pred, edge } for (var i = 0; i < numNodes; i++) { var node = nodes[i]; var info = getInfo(node); if (node.same(root)) { info.dist = 0; } else { info.dist = Infinity; } info.pred = null; info.edge = null; } // Edges relaxation var replacedEdge = false; var checkForEdgeReplacement = function checkForEdgeReplacement(node1, node2, edge, info1, info2, weight) { var dist = info1.dist + weight; if (dist < info2.dist && !edge.same(info1.edge)) { info2.dist = dist; info2.pred = node1; info2.edge = edge; replacedEdge = true; } }; for (var _i = 1; _i < numNodes; _i++) { replacedEdge = false; for (var e = 0; e < numEdges; e++) { var edge = edges[e]; var src = edge.source(); var tgt = edge.target(); var _weight = weightFn(edge); var srcInfo = getInfo(src); var tgtInfo = getInfo(tgt); checkForEdgeReplacement(src, tgt, edge, srcInfo, tgtInfo, _weight); // If undirected graph, we need to take into account the 'reverse' edge if (!directed) { checkForEdgeReplacement(tgt, src, edge, tgtInfo, srcInfo, _weight); } } if (!replacedEdge) { break; } } if (replacedEdge) { // Check for negative weight cycles var negativeWeightCycleIds = []; for (var _e = 0; _e < numEdges; _e++) { var _edge = edges[_e]; var _src = _edge.source(); var _tgt = _edge.target(); var _weight2 = weightFn(_edge); var srcDist = getInfo(_src).dist; var tgtDist = getInfo(_tgt).dist; if (srcDist + _weight2 < tgtDist || !directed && tgtDist + _weight2 < srcDist) { if (!hasNegativeWeightCycle) { warn('Graph contains a negative weight cycle for Bellman-Ford'); hasNegativeWeightCycle = true; } if (options.findNegativeWeightCycles !== false) { var negativeNodes = []; if (srcDist + _weight2 < tgtDist) { negativeNodes.push(_src); } if (!directed && tgtDist + _weight2 < srcDist) { negativeNodes.push(_tgt); } var numNegativeNodes = negativeNodes.length; for (var n = 0; n < numNegativeNodes; n++) { var start = negativeNodes[n]; var cycle = [start]; cycle.push(getInfo(start).edge); var _node = getInfo(start).pred; while (cycle.indexOf(_node) === -1) { cycle.push(_node); cycle.push(getInfo(_node).edge); _node = getInfo(_node).pred; } cycle = cycle.slice(cycle.indexOf(_node)); var smallestId = cycle[0].id(); var smallestIndex = 0; for (var c = 2; c < cycle.length; c += 2) { if (cycle[c].id() < smallestId) { smallestId = cycle[c].id(); smallestIndex = c; } } cycle = cycle.slice(smallestIndex).concat(cycle.slice(0, smallestIndex)); cycle.push(cycle[0]); var cycleId = cycle.map(function (el) { return el.id(); }).join(","); if (negativeWeightCycleIds.indexOf(cycleId) === -1) { negativeWeightCycles.push(eles.spawn(cycle)); negativeWeightCycleIds.push(cycleId); } } } else { break; } } } } return { distanceTo: distanceTo, pathTo: pathTo, hasNegativeWeightCycle: hasNegativeWeightCycle, negativeWeightCycles: negativeWeightCycles }; } // bellmanFord }; // elesfn var sqrt2 = Math.sqrt(2); // Function which colapses 2 (meta) nodes into one // Updates the remaining edge lists // Receives as a paramater the edge which causes the collapse var collapse = function collapse(edgeIndex, nodeMap, remainingEdges) { if (remainingEdges.length === 0) { error("Karger-Stein must be run on a connected (sub)graph"); } var edgeInfo = remainingEdges[edgeIndex]; var sourceIn = edgeInfo[1]; var targetIn = edgeInfo[2]; var partition1 = nodeMap[sourceIn]; var partition2 = nodeMap[targetIn]; var newEdges = remainingEdges; // re-use array // Delete all edges between partition1 and partition2 for (var i = newEdges.length - 1; i >= 0; i--) { var edge = newEdges[i]; var src = edge[1]; var tgt = edge[2]; if (nodeMap[src] === partition1 && nodeMap[tgt] === partition2 || nodeMap[src] === partition2 && nodeMap[tgt] === partition1) { newEdges.splice(i, 1); } } // All edges pointing to partition2 should now point to partition1 for (var _i = 0; _i < newEdges.length; _i++) { var _edge = newEdges[_i]; if (_edge[1] === partition2) { // Check source newEdges[_i] = _edge.slice(); // copy newEdges[_i][1] = partition1; } else if (_edge[2] === partition2) { // Check target newEdges[_i] = _edge.slice(); // copy newEdges[_i][2] = partition1; } } // Move all nodes from partition2 to partition1 for (var _i2 = 0; _i2 < nodeMap.length; _i2++) { if (nodeMap[_i2] === partition2) { nodeMap[_i2] = partition1; } } return newEdges; }; // Contracts a graph until we reach a certain number of meta nodes var contractUntil = function contractUntil(metaNodeMap, remainingEdges, size, sizeLimit) { while (size > sizeLimit) { // Choose an edge randomly var edgeIndex = Math.floor(Math.random() * remainingEdges.length); // Collapse graph based on edge remainingEdges = collapse(edgeIndex, metaNodeMap, remainingEdges); size--; } return remainingEdges; }; var elesfn$p = { // Computes the minimum cut of an undirected graph // Returns the correct answer with high probability kargerStein: function kargerStein() { var _this = this; var _this$byGroup = this.byGroup(), nodes = _this$byGroup.nodes, edges = _this$byGroup.edges; edges.unmergeBy(function (edge) { return edge.isLoop(); }); var numNodes = nodes.length; var numEdges = edges.length; var numIter = Math.ceil(Math.pow(Math.log(numNodes) / Math.LN2, 2)); var stopSize = Math.floor(numNodes / sqrt2); if (numNodes < 2) { error('At least 2 nodes are required for Karger-Stein algorithm'); return undefined; } // Now store edge destination as indexes // Format for each edge (edge index, source node index, target node index) var edgeIndexes = []; for (var i = 0; i < numEdges; i++) { var e = edges[i]; edgeIndexes.push([i, nodes.indexOf(e.source()), nodes.indexOf(e.target())]); } // We will store the best cut found here var minCutSize = Infinity; var minCutEdgeIndexes = []; var minCutNodeMap = new Array(numNodes); // Initial meta node partition var metaNodeMap = new Array(numNodes); var metaNodeMap2 = new Array(numNodes); var copyNodesMap = function copyNodesMap(from, to) { for (var _i3 = 0; _i3 < numNodes; _i3++) { to[_i3] = from[_i3]; } }; // Main loop for (var iter = 0; iter <= numIter; iter++) { // Reset meta node partition for (var _i4 = 0; _i4 < numNodes; _i4++) { metaNodeMap[_i4] = _i4; } // Contract until stop point (stopSize nodes) var edgesState = contractUntil(metaNodeMap, edgeIndexes.slice(), numNodes, stopSize); var edgesState2 = edgesState.slice(); // copy // Create a copy of the colapsed nodes state copyNodesMap(metaNodeMap, metaNodeMap2); // Run 2 iterations starting in the stop state var res1 = contractUntil(metaNodeMap, edgesState, stopSize, 2); var res2 = contractUntil(metaNodeMap2, edgesState2, stopSize, 2); // Is any of the 2 results the best cut so far? if (res1.length <= res2.length && res1.length < minCutSize) { minCutSize = res1.length; minCutEdgeIndexes = res1; copyNodesMap(metaNodeMap, minCutNodeMap); } else if (res2.length <= res1.length && res2.length < minCutSize) { minCutSize = res2.length; minCutEdgeIndexes = res2; copyNodesMap(metaNodeMap2, minCutNodeMap); } } // end of main loop // Construct result var cut = this.spawn(minCutEdgeIndexes.map(function (e) { return edges[e[0]]; })); var partition1 = this.spawn(); var partition2 = this.spawn(); // traverse metaNodeMap for best cut var witnessNodePartition = minCutNodeMap[0]; for (var _i5 = 0; _i5 < minCutNodeMap.length; _i5++) { var partitionId = minCutNodeMap[_i5]; var node = nodes[_i5]; if (partitionId === witnessNodePartition) { partition1.merge(node); } else { partition2.merge(node); } } // construct components corresponding to each disjoint subset of nodes var constructComponent = function constructComponent(subset) { var component = _this.spawn(); subset.forEach(function (node) { component.merge(node); node.connectedEdges().forEach(function (edge) { // ensure edge is within calling collection and edge is not in cut if (_this.contains(edge) && !cut.contains(edge)) { component.merge(edge); } }); }); return component; }; var components = [constructComponent(partition1), constructComponent(partition2)]; var ret = { cut: cut, components: components, // n.b. partitions are included to be compatible with the old api spec // (could be removed in a future major version) partition1: partition1, partition2: partition2 }; return ret; } }; // elesfn var copyPosition = function copyPosition(p) { return { x: p.x, y: p.y }; }; var modelToRenderedPosition = function modelToRenderedPosition(p, zoom, pan) { return { x: p.x * zoom + pan.x, y: p.y * zoom + pan.y }; }; var renderedToModelPosition = function renderedToModelPosition(p, zoom, pan) { return { x: (p.x - pan.x) / zoom, y: (p.y - pan.y) / zoom }; }; var array2point = function array2point(arr) { return { x: arr[0], y: arr[1] }; }; var min = function min(arr) { var begin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; var end = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : arr.length; var min = Infinity; for (var i = begin; i < end; i++) { var val = arr[i]; if (isFinite(val)) { min = Math.min(val, min); } } return min; }; var max = function max(arr) { var begin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; var end = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : arr.length; var max = -Infinity; for (var i = begin; i < end; i++) { var val = arr[i]; if (isFinite(val)) { max = Math.max(val, max); } } return max; }; var mean = function mean(arr) { var begin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; var end = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : arr.length; var total = 0; var n = 0; for (var i = begin; i < end; i++) { var val = arr[i]; if (isFinite(val)) { total += val; n++; } } return total / n; }; var median = function median(arr) { var begin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; var end = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : arr.length; var copy = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true; var sort = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true; var includeHoles = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true; if (copy) { arr = arr.slice(begin, end); } else { if (end < arr.length) { arr.splice(end, arr.length - end); } if (begin > 0) { arr.splice(0, begin); } } // all non finite (e.g. Infinity, NaN) elements must be -Infinity so they go to the start var off = 0; // offset from non-finite values for (var i = arr.length - 1; i >= 0; i--) { var v = arr[i]; if (includeHoles) { if (!isFinite(v)) { arr[i] = -Infinity; off++; } } else { // just remove it if we don't want to consider holes arr.splice(i, 1); } } if (sort) { arr.sort(function (a, b) { return a - b; }); // requires copy = true if you don't want to change the orig } var len = arr.length; var mid = Math.floor(len / 2); if (len % 2 !== 0) { return arr[mid + 1 + off]; } else { return (arr[mid - 1 + off] + arr[mid + off]) / 2; } }; var deg2rad = function deg2rad(deg) { return Math.PI * deg / 180; }; var getAngleFromDisp = function getAngleFromDisp(dispX, dispY) { return Math.atan2(dispY, dispX) - Math.PI / 2; }; var log2 = Math.log2 || function (n) { return Math.log(n) / Math.log(2); }; var signum = function signum(x) { if (x > 0) { return 1; } else if (x < 0) { return -1; } else { return 0; } }; var dist = function dist(p1, p2) { return Math.sqrt(sqdist(p1, p2)); }; var sqdist = function sqdist(p1, p2) { var dx = p2.x - p1.x; var dy = p2.y - p1.y; return dx * dx + dy * dy; }; var inPlaceSumNormalize = function inPlaceSumNormalize(v) { var length = v.length; // First, get sum of all elements var total = 0; for (var i = 0; i < length; i++) { total += v[i]; } // Now, divide each by the sum of all elements for (var _i = 0; _i < length; _i++) { v[_i] = v[_i] / total; } return v; }; var qbezierAt = function qbezierAt(p0, p1, p2, t) { return (1 - t) * (1 - t) * p0 + 2 * (1 - t) * t * p1 + t * t * p2; }; var qbezierPtAt = function qbezierPtAt(p0, p1, p2, t) { return { x: qbezierAt(p0.x, p1.x, p2.x, t), y: qbezierAt(p0.y, p1.y, p2.y, t) }; }; var lineAt = function lineAt(p0, p1, t, d) { var vec = { x: p1.x - p0.x, y: p1.y - p0.y }; var vecDist = dist(p0, p1); var normVec = { x: vec.x / vecDist, y: vec.y / vecDist }; t = t == null ? 0 : t; d = d != null ? d : t * vecDist; return { x: p0.x + normVec.x * d, y: p0.y + normVec.y * d }; }; var bound = function bound(min, val, max) { return Math.max(min, Math.min(max, val)); }; // makes a full bb (x1, y1, x2, y2, w, h) from implicit params var makeBoundingBox = function makeBoundingBox(bb) { if (bb == null) { return { x1: Infinity, y1: Infinity, x2: -Infinity, y2: -Infinity, w: 0, h: 0 }; } else if (bb.x1 != null && bb.y1 != null) { if (bb.x2 != null && bb.y2 != null && bb.x2 >= bb.x1 && bb.y2 >= bb.y1) { return { x1: bb.x1, y1: bb.y1, x2: bb.x2, y2: bb.y2, w: bb.x2 - bb.x1, h: bb.y2 - bb.y1 }; } else if (bb.w != null && bb.h != null && bb.w >= 0 && bb.h >= 0) { return { x1: bb.x1, y1: bb.y1, x2: bb.x1 + bb.w, y2: bb.y1 + bb.h, w: bb.w, h: bb.h }; } } }; var copyBoundingBox = function copyBoundingBox(bb) { return { x1: bb.x1, x2: bb.x2, w: bb.w, y1: bb.y1, y2: bb.y2, h: bb.h }; }; var clearBoundingBox = function clearBoundingBox(bb) { bb.x1 = Infinity; bb.y1 = Infinity; bb.x2 = -Infinity; bb.y2 = -Infinity; bb.w = 0; bb.h = 0; }; var updateBoundingBox = function updateBoundingBox(bb1, bb2) { // update bb1 with bb2 bounds bb1.x1 = Math.min(bb1.x1, bb2.x1); bb1.x2 = Math.max(bb1.x2, bb2.x2); bb1.w = bb1.x2 - bb1.x1; bb1.y1 = Math.min(bb1.y1, bb2.y1); bb1.y2 = Math.max(bb1.y2, bb2.y2); bb1.h = bb1.y2 - bb1.y1; }; var expandBoundingBoxByPoint = function expandBoundingBoxByPoint(bb, x, y) { bb.x1 = Math.min(bb.x1, x); bb.x2 = Math.max(bb.x2, x); bb.w = bb.x2 - bb.x1; bb.y1 = Math.min(bb.y1, y); bb.y2 = Math.max(bb.y2, y); bb.h = bb.y2 - bb.y1; }; var expandBoundingBox = function expandBoundingBox(bb) { var padding = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; bb.x1 -= padding; bb.x2 += padding; bb.y1 -= padding; bb.y2 += padding; bb.w = bb.x2 - bb.x1; bb.h = bb.y2 - bb.y1; return bb; }; var expandBoundingBoxSides = function expandBoundingBoxSides(bb) { var padding = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [0]; var top, right, bottom, left; if (padding.length === 1) { top = right = bottom = left = padding[0]; } else if (padding.length === 2) { top = bottom = padding[0]; left = right = padding[1]; } else if (padding.length === 4) { var _padding = _slicedToArray(padding, 4); top = _padding[0]; right = _padding[1]; bottom = _padding[2]; left = _padding[3]; } bb.x1 -= left; bb.x2 += right; bb.y1 -= top; bb.y2 += bottom; bb.w = bb.x2 - bb.x1; bb.h = bb.y2 - bb.y1; return bb; }; var assignBoundingBox = function assignBoundingBox(bb1, bb2) { bb1.x1 = bb2.x1; bb1.y1 = bb2.y1; bb1.x2 = bb2.x2; bb1.y2 = bb2.y2; bb1.w = bb1.x2 - bb1.x1; bb1.h = bb1.y2 - bb1.y1; }; var boundingBoxesIntersect = function boundingBoxesIntersect(bb1, bb2) { // case: one bb to right of other if (bb1.x1 > bb2.x2) { return false; } if (bb2.x1 > bb1.x2) { return false; } // case: one bb to left of other if (bb1.x2 < bb2.x1) { return false; } if (bb2.x2 < bb1.x1) { return false; } // case: one bb above other if (bb1.y2 < bb2.y1) { return false; } if (bb2.y2 < bb1.y1) { return false; } // case: one bb below other if (bb1.y1 > bb2.y2) { return false; } if (bb2.y1 > bb1.y2) { return false; } // otherwise, must have some overlap return true; }; var inBoundingBox = function inBoundingBox(bb, x, y) { return bb.x1 <= x && x <= bb.x2 && bb.y1 <= y && y <= bb.y2; }; var pointInBoundingBox = function pointInBoundingBox(bb, pt) { return inBoundingBox(bb, pt.x, pt.y); }; var boundingBoxInBoundingBox = function boundingBoxInBoundingBox(bb1, bb2) { return inBoundingBox(bb1, bb2.x1, bb2.y1) && inBoundingBox(bb1, bb2.x2, bb2.y2); }; var roundRectangleIntersectLine = function roundRectangleIntersectLine(x, y, nodeX, nodeY, width, height, padding) { var cornerRadius = getRoundRectangleRadius(width, height); var halfWidth = width / 2; var halfHeight = height / 2; // Check intersections with straight line segments var straightLineIntersections; // Top segment, left to right { var topStartX = nodeX - halfWidth + cornerRadius - padding; var topStartY = nodeY - halfHeight - padding; var topEndX = nodeX + halfWidth - cornerRadius + padding; var topEndY = topStartY; straightLineIntersections = finiteLinesIntersect(x, y, nodeX, nodeY, topStartX, topStartY, topEndX, topEndY, false); if (straightLineIntersections.length > 0) { return straightLineIntersections; } } // Right segment, top to bottom { var rightStartX = nodeX + halfWidth + padding; var rightStartY = nodeY - halfHeight + cornerRadius - padding; var rightEndX = rightStartX; var rightEndY = nodeY + halfHeight - cornerRadius + padding; straightLineIntersections = finiteLinesIntersect(x, y, nodeX, nodeY, rightStartX, rightStartY, rightEndX, rightEndY, false); if (straightLineIntersections.length > 0) { return straightLineIntersections; } } // Bottom segment, left to right { var bottomStartX = nodeX - halfWidth + cornerRadius - padding; var bottomStartY = nodeY + halfHeight + padding; var bottomEndX = nodeX + halfWidth - cornerRadius + padding; var bottomEndY = bottomStartY; straightLineIntersections = finiteLinesIntersect(x, y, nodeX, nodeY, bottomStartX, bottomStartY, bottomEndX, bottomEndY, false); if (straightLineIntersections.length > 0) { return straightLineIntersections; } } // Left segment, top to bottom { var leftStartX = nodeX - halfWidth - padding; var leftStartY = nodeY - halfHeight + cornerRadius - padding; var leftEndX = leftStartX; var leftEndY = nodeY + halfHeight - cornerRadius + padding; straightLineIntersections = finiteLinesIntersect(x, y, nodeX, nodeY, leftStartX, leftStartY, leftEndX, leftEndY, false); if (straightLineIntersections.length > 0) { return straightLineIntersections; } } // Check intersections with arc segments var arcIntersections; // Top Left { var topLeftCenterX = nodeX - halfWidth + cornerRadius; var topLeftCenterY = nodeY - halfHeight + cornerRadius; arcIntersections = intersectLineCircle(x, y, nodeX, nodeY, topLeftCenterX, topLeftCenterY, cornerRadius + padding); // Ensure the intersection is on the desired quarter of the circle if (arcIntersections.length > 0 && arcIntersections[0] <= topLeftCenterX && arcIntersections[1] <= topLeftCenterY) { return [arcIntersections[0], arcIntersections[1]]; } } // Top Right { var topRightCenterX = nodeX + halfWidth - cornerRadius; var topRightCenterY = nodeY - halfHeight + cornerRadius; arcIntersections = intersectLineCircle(x, y, nodeX, nodeY, topRightCenterX, topRightCenterY, cornerRadius + padding); // Ensure the intersection is on the desired quarter of the circle if (arcIntersections.length > 0 && arcIntersections[0] >= topRightCenterX && arcIntersections[1] <= topRightCenterY) { return [arcIntersections[0], arcIntersections[1]]; } } // Bottom Right { var bottomRightCenterX = nodeX + halfWidth - cornerRadius; var bottomRightCenterY = nodeY + halfHeight - cornerRadius; arcIntersections = intersectLineCircle(x, y, nodeX, nodeY, bottomRightCenterX, bottomRightCenterY, cornerRadius + padding); // Ensure the intersection is on the desired quarter of the circle if (arcIntersections.length > 0 && arcIntersections[0] >= bottomRightCenterX && arcIntersections[1] >= bottomRightCenterY) { return [arcIntersections[0], arcIntersections[1]]; } } // Bottom Left { var bottomLeftCenterX = nodeX - halfWidth + cornerRadius; var bottomLeftCenterY = nodeY + halfHeight - cornerRadius; arcIntersections = intersectLineCircle(x, y, nodeX, nodeY, bottomLeftCenterX, bottomLeftCenterY, cornerRadius + padding); // Ensure the intersection is on the desired quarter of the circle if (arcIntersections.length > 0 && arcIntersections[0] <= bottomLeftCenterX && arcIntersections[1] >= bottomLeftCenterY) { return [arcIntersections[0], arcIntersections[1]]; } } return []; // if nothing }; var inLineVicinity = function inLineVicinity(x, y, lx1, ly1, lx2, ly2, tolerance) { var t = tolerance; var x1 = Math.min(lx1, lx2); var x2 = Math.max(lx1, lx2); var y1 = Math.min(ly1, ly2); var y2 = Math.max(ly1, ly2); return x1 - t <= x && x <= x2 + t && y1 - t <= y && y <= y2 + t; }; var inBezierVicinity = function inBezierVicinity(x, y, x1, y1, x2, y2, x3, y3, tolerance) { var bb = { x1: Math.min(x1, x3, x2) - tolerance, x2: Math.max(x1, x3, x2) + tolerance, y1: Math.min(y1, y3, y2) - tolerance, y2: Math.max(y1, y3, y2) + tolerance }; // if outside the rough bounding box for the bezier, then it can't be a hit if (x < bb.x1 || x > bb.x2 || y < bb.y1 || y > bb.y2) { // console.log('bezier out of rough bb') return false; } else { // console.log('do more expensive check'); return true; } }; var solveQuadratic = function solveQuadratic(a, b, c, val) { c -= val; var r = b * b - 4 * a * c; if (r < 0) { return []; } var sqrtR = Math.sqrt(r); var denom = 2 * a; var root1 = (-b + sqrtR) / denom; var root2 = (-b - sqrtR) / denom; return [root1, root2]; }; var solveCubic = function solveCubic(a, b, c, d, result) { // Solves a cubic function, returns root in form [r1, i1, r2, i2, r3, i3], where // r is the real component, i is the imaginary component // An implementation of the Cardano method from the year 1545 // http://en.wikipedia.org/wiki/Cubic_function#The_nature_of_the_roots var epsilon = 0.00001; // avoid division by zero while keeping the overall expression close in value if (a === 0) { a = epsilon; } b /= a; c /= a; d /= a; var discriminant, q, r, dum1, s, t, term1, r13; q = (3.0 * c - b * b) / 9.0; r = -(27.0 * d) + b * (9.0 * c - 2.0 * (b * b)); r /= 54.0; discriminant = q * q * q + r * r; result[1] = 0; term1 = b / 3.0; if (discriminant > 0) { s = r + Math.sqrt(discriminant); s = s < 0 ? -Math.pow(-s, 1.0 / 3.0) : Math.pow(s, 1.0 / 3.0); t = r - Math.sqrt(discriminant); t = t < 0 ? -Math.pow(-t, 1.0 / 3.0) : Math.pow(t, 1.0 / 3.0); result[0] = -term1 + s + t; term1 += (s + t) / 2.0; result[4] = result[2] = -term1; term1 = Math.sqrt(3.0) * (-t + s) / 2; result[3] = term1; result[5] = -term1; return; } result[5] = result[3] = 0; if (discriminant === 0) { r13 = r < 0 ? -Math.pow(-r, 1.0 / 3.0) : Math.pow(r, 1.0 / 3.0); result[0] = -term1 + 2.0 * r13; result[4] = result[2] = -(r13 + term1); return; } q = -q; dum1 = q * q * q; dum1 = Math.acos(r / Math.sqrt(dum1)); r13 = 2.0 * Math.sqrt(q); result[0] = -term1 + r13 * Math.cos(dum1 / 3.0); result[2] = -term1 + r13 * Math.cos((dum1 + 2.0 * Math.PI) / 3.0); result[4] = -term1 + r13 * Math.cos((dum1 + 4.0 * Math.PI) / 3.0); return; }; var sqdistToQuadraticBezier = function sqdistToQuadraticBezier(x, y, x1, y1, x2, y2, x3, y3) { // Find minimum distance by using the minimum of the distance // function between the given point and the curve // This gives the coefficients of the resulting cubic equation // whose roots tell us where a possible minimum is // (Coefficients are divided by 4) var a = 1.0 * x1 * x1 - 4 * x1 * x2 + 2 * x1 * x3 + 4 * x2 * x2 - 4 * x2 * x3 + x3 * x3 + y1 * y1 - 4 * y1 * y2 + 2 * y1 * y3 + 4 * y2 * y2 - 4 * y2 * y3 + y3 * y3; var b = 1.0 * 9 * x1 * x2 - 3 * x1 * x1 - 3 * x1 * x3 - 6 * x2 * x2 + 3 * x2 * x3 + 9 * y1 * y2 - 3 * y1 * y1 - 3 * y1 * y3 - 6 * y2 * y2 + 3 * y2 * y3; var c = 1.0 * 3 * x1 * x1 - 6 * x1 * x2 + x1 * x3 - x1 * x + 2 * x2 * x2 + 2 * x2 * x - x3 * x + 3 * y1 * y1 - 6 * y1 * y2 + y1 * y3 - y1 * y + 2 * y2 * y2 + 2 * y2 * y - y3 * y; var d = 1.0 * x1 * x2 - x1 * x1 + x1 * x - x2 * x + y1 * y2 - y1 * y1 + y1 * y - y2 * y; // debug("coefficients: " + a / a + ", " + b / a + ", " + c / a + ", " + d / a); var roots = []; // Use the cubic solving algorithm solveCubic(a, b, c, d, roots); var zeroThreshold = 0.0000001; var params = []; for (var index = 0; index < 6; index += 2) { if (Math.abs(roots[index + 1]) < zeroThreshold && roots[index] >= 0 && roots[index] <= 1.0) { params.push(roots[index]); } } params.push(1.0); params.push(0.0); var minDistanceSquared = -1; var curX, curY, distSquared; for (var i = 0; i < params.length; i++) { curX = Math.pow(1.0 - params[i], 2.0) * x1 + 2.0 * (1 - params[i]) * params[i] * x2 + params[i] * params[i] * x3; curY = Math.pow(1 - params[i], 2.0) * y1 + 2 * (1.0 - params[i]) * params[i] * y2 + params[i] * params[i] * y3; distSquared = Math.pow(curX - x, 2) + Math.pow(curY - y, 2); // debug('distance for param ' + params[i] + ": " + Math.sqrt(distSquared)); if (minDistanceSquared >= 0) { if (distSquared < minDistanceSquared) { minDistanceSquared = distSquared; } } else { minDistanceSquared = distSquared; } } return minDistanceSquared; }; var sqdistToFiniteLine = function sqdistToFiniteLine(x, y, x1, y1, x2, y2) { var offset = [x - x1, y - y1]; var line = [x2 - x1, y2 - y1]; var lineSq = line[0] * line[0] + line[1] * line[1]; var hypSq = offset[0] * offset[0] + offset[1] * offset[1]; var dotProduct = offset[0] * line[0] + offset[1] * line[1]; var adjSq = dotProduct * dotProduct / lineSq; if (dotProduct < 0) { return hypSq; } if (adjSq > lineSq) { return (x - x2) * (x - x2) + (y - y2) * (y - y2); } return hypSq - adjSq; }; var pointInsidePolygonPoints = function pointInsidePolygonPoints(x, y, points) { var x1, y1, x2, y2; var y3; // Intersect with vertical line through (x, y) var up = 0; // let down = 0; for (var i = 0; i < points.length / 2; i++) { x1 = points[i * 2]; y1 = points[i * 2 + 1]; if (i + 1 < points.length / 2) { x2 = points[(i + 1) * 2]; y2 = points[(i + 1) * 2 + 1]; } else { x2 = points[(i + 1 - points.length / 2) * 2]; y2 = points[(i + 1 - points.length / 2) * 2 + 1]; } if (x1 == x && x2 == x) ; else if (x1 >= x && x >= x2 || x1 <= x && x <= x2) { y3 = (x - x1) / (x2 - x1) * (y2 - y1) + y1; if (y3 > y) { up++; } // if( y3 < y ){ // down++; // } } else { continue; } } if (up % 2 === 0) { return false; } else { return true; } }; var pointInsidePolygon = function pointInsidePolygon(x, y, basePoints, centerX, centerY, width, height, direction, padding) { var transformedPoints = new Array(basePoints.length); // Gives negative angle var angle; if (direction[0] != null) { angle = Math.atan(direction[1] / direction[0]); if (direction[0] < 0) { angle = angle + Math.PI / 2; } else { angle = -angle - Math.PI / 2; } } else { angle = direction; } var cos = Math.cos(-angle); var sin = Math.sin(-angle); // console.log("base: " + basePoints); for (var i = 0; i < transformedPoints.length / 2; i++) { transformedPoints[i * 2] = width / 2 * (basePoints[i * 2] * cos - basePoints[i * 2 + 1] * sin); transformedPoints[i * 2 + 1] = height / 2 * (basePoints[i * 2 + 1] * cos + basePoints[i * 2] * sin); transformedPoints[i * 2] += centerX; transformedPoints[i * 2 + 1] += centerY; } var points; if (padding > 0) { var expandedLineSet = expandPolygon(transformedPoints, -padding); points = joinLines(expandedLineSet); } else { points = transformedPoints; } return pointInsidePolygonPoints(x, y, points); }; var pointInsideRoundPolygon = function pointInsideRoundPolygon(x, y, basePoints, centerX, centerY, width, height) { var cutPolygonPoints = new Array(basePoints.length); var halfW = width / 2; var halfH = height / 2; var cornerRadius = getRoundPolygonRadius(width, height); var squaredCornerRadius = cornerRadius * cornerRadius; for (var i = 0; i < basePoints.length / 4; i++) { var sourceUv = void 0, destUv = void 0; if (i === 0) { sourceUv = basePoints.length - 2; } else { sourceUv = i * 4 - 2; } destUv = i * 4 + 2; var px = centerX + halfW * basePoints[i * 4]; var py = centerY + halfH * basePoints[i * 4 + 1]; var cosTheta = -basePoints[sourceUv] * basePoints[destUv] - basePoints[sourceUv + 1] * basePoints[destUv + 1]; var offset = cornerRadius / Math.tan(Math.acos(cosTheta) / 2); var cp0x = px - offset * basePoints[sourceUv]; var cp0y = py - offset * basePoints[sourceUv + 1]; var cp1x = px + offset * basePoints[destUv]; var cp1y = py + offset * basePoints[destUv + 1]; cutPolygonPoints[i * 4] = cp0x; cutPolygonPoints[i * 4 + 1] = cp0y; cutPolygonPoints[i * 4 + 2] = cp1x; cutPolygonPoints[i * 4 + 3] = cp1y; var orthx = basePoints[sourceUv + 1]; var orthy = -basePoints[sourceUv]; var cosAlpha = orthx * basePoints[destUv] + orthy * basePoints[destUv + 1]; if (cosAlpha < 0) { orthx *= -1; orthy *= -1; } var cx = cp0x + orthx * cornerRadius; var cy = cp0y + orthy * cornerRadius; var squaredDistance = Math.pow(cx - x, 2) + Math.pow(cy - y, 2); if (squaredDistance <= squaredCornerRadius) { return true; } } return pointInsidePolygonPoints(x, y, cutPolygonPoints); }; var joinLines = function joinLines(lineSet) { var vertices = new Array(lineSet.length / 2); var currentLineStartX, currentLineStartY, currentLineEndX, currentLineEndY; var nextLineStartX, nextLineStartY, nextLineEndX, nextLineEndY; for (var i = 0; i < lineSet.length / 4; i++) { currentLineStartX = lineSet[i * 4]; currentLineStartY = lineSet[i * 4 + 1]; currentLineEndX = lineSet[i * 4 + 2]; currentLineEndY = lineSet[i * 4 + 3]; if (i < lineSet.length / 4 - 1) { nextLineStartX = lineSet[(i + 1) * 4]; nextLineStartY = lineSet[(i + 1) * 4 + 1]; nextLineEndX = lineSet[(i + 1) * 4 + 2]; nextLineEndY = lineSet[(i + 1) * 4 + 3]; } else { nextLineStartX = lineSet[0]; nextLineStartY = lineSet[1]; nextLineEndX = lineSet[2]; nextLineEndY = lineSet[3]; } var intersection = finiteLinesIntersect(currentLineStartX, currentLineStartY, currentLineEndX, currentLineEndY, nextLineStartX, nextLineStartY, nextLineEndX, nextLineEndY, true); vertices[i * 2] = intersection[0]; vertices[i * 2 + 1] = intersection[1]; } return vertices; }; var expandPolygon = function expandPolygon(points, pad) { var expandedLineSet = new Array(points.length * 2); var currentPointX, currentPointY, nextPointX, nextPointY; for (var i = 0; i < points.length / 2; i++) { currentPointX = points[i * 2]; currentPointY = points[i * 2 + 1]; if (i < points.length / 2 - 1) { nextPointX = points[(i + 1) * 2]; nextPointY = points[(i + 1) * 2 + 1]; } else { nextPointX = points[0]; nextPointY = points[1]; } // Current line: [currentPointX, currentPointY] to [nextPointX, nextPointY] // Assume CCW polygon winding var offsetX = nextPointY - currentPointY; var offsetY = -(nextPointX - currentPointX); // Normalize var offsetLength = Math.sqrt(offsetX * offsetX + offsetY * offsetY); var normalizedOffsetX = offsetX / offsetLength; var normalizedOffsetY = offsetY / offsetLength; expandedLineSet[i * 4] = currentPointX + normalizedOffsetX * pad; expandedLineSet[i * 4 + 1] = currentPointY + normalizedOffsetY * pad; expandedLineSet[i * 4 + 2] = nextPointX + normalizedOffsetX * pad; expandedLineSet[i * 4 + 3] = nextPointY + normalizedOffsetY * pad; } return expandedLineSet; }; var intersectLineEllipse = function intersectLineEllipse(x, y, centerX, centerY, ellipseWradius, ellipseHradius) { var dispX = centerX - x; var dispY = centerY - y; dispX /= ellipseWradius; dispY /= ellipseHradius; var len = Math.sqrt(dispX * dispX + dispY * dispY); var newLength = len - 1; if (newLength < 0) { return []; } var lenProportion = newLength / len; return [(centerX - x) * lenProportion + x, (centerY - y) * lenProportion + y]; }; var checkInEllipse = function checkInEllipse(x, y, width, height, centerX, centerY, padding) { x -= centerX; y -= centerY; x /= width / 2 + padding; y /= height / 2 + padding; return x * x + y * y <= 1; }; // Returns intersections of increasing distance from line's start point var intersectLineCircle = function intersectLineCircle(x1, y1, x2, y2, centerX, centerY, radius) { // Calculate d, direction vector of line var d = [x2 - x1, y2 - y1]; // Direction vector of line var f = [x1 - centerX, y1 - centerY]; var a = d[0] * d[0] + d[1] * d[1]; var b = 2 * (f[0] * d[0] + f[1] * d[1]); var c = f[0] * f[0] + f[1] * f[1] - radius * radius; var discriminant = b * b - 4 * a * c; if (discriminant < 0) { return []; } var t1 = (-b + Math.sqrt(discriminant)) / (2 * a); var t2 = (-b - Math.sqrt(discriminant)) / (2 * a); var tMin = Math.min(t1, t2); var tMax = Math.max(t1, t2); var inRangeParams = []; if (tMin >= 0 && tMin <= 1) { inRangeParams.push(tMin); } if (tMax >= 0 && tMax <= 1) { inRangeParams.push(tMax); } if (inRangeParams.length === 0) { return []; } var nearIntersectionX = inRangeParams[0] * d[0] + x1; var nearIntersectionY = inRangeParams[0] * d[1] + y1; if (inRangeParams.length > 1) { if (inRangeParams[0] == inRangeParams[1]) { return [nearIntersectionX, nearIntersectionY]; } else { var farIntersectionX = inRangeParams[1] * d[0] + x1; var farIntersectionY = inRangeParams[1] * d[1] + y1; return [nearIntersectionX, nearIntersectionY, farIntersectionX, farIntersectionY]; } } else { return [nearIntersectionX, nearIntersectionY]; } }; var midOfThree = function midOfThree(a, b, c) { if (b <= a && a <= c || c <= a && a <= b) { return a; } else if (a <= b && b <= c || c <= b && b <= a) { return b; } else { return c; } }; // (x1,y1)=>(x2,y2) intersect with (x3,y3)=>(x4,y4) var finiteLinesIntersect = function finiteLinesIntersect(x1, y1, x2, y2, x3, y3, x4, y4, infiniteLines) { var dx13 = x1 - x3; var dx21 = x2 - x1; var dx43 = x4 - x3; var dy13 = y1 - y3; var dy21 = y2 - y1; var dy43 = y4 - y3; var ua_t = dx43 * dy13 - dy43 * dx13; var ub_t = dx21 * dy13 - dy21 * dx13; var u_b = dy43 * dx21 - dx43 * dy21; if (u_b !== 0) { var ua = ua_t / u_b; var ub = ub_t / u_b; var flptThreshold = 0.001; var _min = 0 - flptThreshold; var _max = 1 + flptThreshold; if (_min <= ua && ua <= _max && _min <= ub && ub <= _max) { return [x1 + ua * dx21, y1 + ua * dy21]; } else { if (!infiniteLines) { return []; } else { return [x1 + ua * dx21, y1 + ua * dy21]; } } } else { if (ua_t === 0 || ub_t === 0) { // Parallel, coincident lines. Check if overlap // Check endpoint of second line if (midOfThree(x1, x2, x4) === x4) { return [x4, y4]; } // Check start point of second line if (midOfThree(x1, x2, x3) === x3) { return [x3, y3]; } // Endpoint of first line if (midOfThree(x3, x4, x2) === x2) { return [x2, y2]; } return []; } else { // Parallel, non-coincident return []; } } }; // math.polygonIntersectLine( x, y, basePoints, centerX, centerY, width, height, padding ) // intersect a node polygon (pts transformed) // // math.polygonIntersectLine( x, y, basePoints, centerX, centerY ) // intersect the points (no transform) var polygonIntersectLine = function polygonIntersectLine(x, y, basePoints, centerX, centerY, width, height, padding) { var intersections = []; var intersection; var transformedPoints = new Array(basePoints.length); var doTransform = true; if (width == null) { doTransform = false; } var points; if (doTransform) { for (var i = 0; i < transformedPoints.length / 2; i++) { transformedPoints[i * 2] = basePoints[i * 2] * width + centerX; transformedPoints[i * 2 + 1] = basePoints[i * 2 + 1] * height + centerY; } if (padding > 0) { var expandedLineSet = expandPolygon(transformedPoints, -padding); points = joinLines(expandedLineSet); } else { points = transformedPoints; } } else { points = basePoints; } var currentX, currentY, nextX, nextY; for (var _i2 = 0; _i2 < points.length / 2; _i2++) { currentX = points[_i2 * 2]; currentY = points[_i2 * 2 + 1]; if (_i2 < points.length / 2 - 1) { nextX = points[(_i2 + 1) * 2]; nextY = points[(_i2 + 1) * 2 + 1]; } else { nextX = points[0]; nextY = points[1]; } intersection = finiteLinesIntersect(x, y, centerX, centerY, currentX, currentY, nextX, nextY); if (intersection.length !== 0) { intersections.push(intersection[0], intersection[1]); } } return intersections; }; var roundPolygonIntersectLine = function roundPolygonIntersectLine(x, y, basePoints, centerX, centerY, width, height, padding) { var intersections = []; var intersection; var lines = new Array(basePoints.length); var halfW = width / 2; var halfH = height / 2; var cornerRadius = getRoundPolygonRadius(width, height); for (var i = 0; i < basePoints.length / 4; i++) { var sourceUv = void 0, destUv = void 0; if (i === 0) { sourceUv = basePoints.length - 2; } else { sourceUv = i * 4 - 2; } destUv = i * 4 + 2; var px = centerX + halfW * basePoints[i * 4]; var py = centerY + halfH * basePoints[i * 4 + 1]; var cosTheta = -basePoints[sourceUv] * basePoints[destUv] - basePoints[sourceUv + 1] * basePoints[destUv + 1]; var offset = cornerRadius / Math.tan(Math.acos(cosTheta) / 2); var cp0x = px - offset * basePoints[sourceUv]; var cp0y = py - offset * basePoints[sourceUv + 1]; var cp1x = px + offset * basePoints[destUv]; var cp1y = py + offset * basePoints[destUv + 1]; if (i === 0) { lines[basePoints.length - 2] = cp0x; lines[basePoints.length - 1] = cp0y; } else { lines[i * 4 - 2] = cp0x; lines[i * 4 - 1] = cp0y; } lines[i * 4] = cp1x; lines[i * 4 + 1] = cp1y; var orthx = basePoints[sourceUv + 1]; var orthy = -basePoints[sourceUv]; var cosAlpha = orthx * basePoints[destUv] + orthy * basePoints[destUv + 1]; if (cosAlpha < 0) { orthx *= -1; orthy *= -1; } var cx = cp0x + orthx * cornerRadius; var cy = cp0y + orthy * cornerRadius; intersection = intersectLineCircle(x, y, centerX, centerY, cx, cy, cornerRadius); if (intersection.length !== 0) { intersections.push(intersection[0], intersection[1]); } } for (var _i3 = 0; _i3 < lines.length / 4; _i3++) { intersection = finiteLinesIntersect(x, y, centerX, centerY, lines[_i3 * 4], lines[_i3 * 4 + 1], lines[_i3 * 4 + 2], lines[_i3 * 4 + 3], false); if (intersection.length !== 0) { intersections.push(intersection[0], intersection[1]); } } if (intersections.length > 2) { var lowestIntersection = [intersections[0], intersections[1]]; var lowestSquaredDistance = Math.pow(lowestIntersection[0] - x, 2) + Math.pow(lowestIntersection[1] - y, 2); for (var _i4 = 1; _i4 < intersections.length / 2; _i4++) { var squaredDistance = Math.pow(intersections[_i4 * 2] - x, 2) + Math.pow(intersections[_i4 * 2 + 1] - y, 2); if (squaredDistance <= lowestSquaredDistance) { lowestIntersection[0] = intersections[_i4 * 2]; lowestIntersection[1] = intersections[_i4 * 2 + 1]; lowestSquaredDistance = squaredDistance; } } return lowestIntersection; } return intersections; }; var shortenIntersection = function shortenIntersection(intersection, offset, amount) { var disp = [intersection[0] - offset[0], intersection[1] - offset[1]]; var length = Math.sqrt(disp[0] * disp[0] + disp[1] * disp[1]); var lenRatio = (length - amount) / length; if (lenRatio < 0) { lenRatio = 0.00001; } return [offset[0] + lenRatio * disp[0], offset[1] + lenRatio * disp[1]]; }; var generateUnitNgonPointsFitToSquare = function generateUnitNgonPointsFitToSquare(sides, rotationRadians) { var points = generateUnitNgonPoints(sides, rotationRadians); points = fitPolygonToSquare(points); return points; }; var fitPolygonToSquare = function fitPolygonToSquare(points) { var x, y; var sides = points.length / 2; var minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity; for (var i = 0; i < sides; i++) { x = points[2 * i]; y = points[2 * i + 1]; minX = Math.min(minX, x); maxX = Math.max(maxX, x); minY = Math.min(minY, y); maxY = Math.max(maxY, y); } // stretch factors var sx = 2 / (maxX - minX); var sy = 2 / (maxY - minY); for (var _i5 = 0; _i5 < sides; _i5++) { x = points[2 * _i5] = points[2 * _i5] * sx; y = points[2 * _i5 + 1] = points[2 * _i5 + 1] * sy; minX = Math.min(minX, x); maxX = Math.max(maxX, x); minY = Math.min(minY, y); maxY = Math.max(maxY, y); } if (minY < -1) { for (var _i6 = 0; _i6 < sides; _i6++) { y = points[2 * _i6 + 1] = points[2 * _i6 + 1] + (-1 - minY); } } return points; }; var generateUnitNgonPoints = function generateUnitNgonPoints(sides, rotationRadians) { var increment = 1.0 / sides * 2 * Math.PI; var startAngle = sides % 2 === 0 ? Math.PI / 2.0 + increment / 2.0 : Math.PI / 2.0; startAngle += rotationRadians; var points = new Array(sides * 2); var currentAngle; for (var i = 0; i < sides; i++) { currentAngle = i * increment + startAngle; points[2 * i] = Math.cos(currentAngle); // x points[2 * i + 1] = Math.sin(-currentAngle); // y } return points; }; // Set the default radius, unless half of width or height is smaller than default var getRoundRectangleRadius = function getRoundRectangleRadius(width, height) { return Math.min(width / 4, height / 4, 8); }; // Set the default radius var getRoundPolygonRadius = function getRoundPolygonRadius(width, height) { return Math.min(width / 10, height / 10, 8); }; var getCutRectangleCornerLength = function getCutRectangleCornerLength() { return 8; }; var bezierPtsToQuadCoeff = function bezierPtsToQuadCoeff(p0, p1, p2) { return [p0 - 2 * p1 + p2, 2 * (p1 - p0), p0]; }; // get curve width, height, and control point position offsets as a percentage of node height / width var getBarrelCurveConstants = function getBarrelCurveConstants(width, height) { return { heightOffset: Math.min(15, 0.05 * height), widthOffset: Math.min(100, 0.25 * width), ctrlPtOffsetPct: 0.05 }; }; var pageRankDefaults = defaults$g({ dampingFactor: 0.8, precision: 0.000001, iterations: 200, weight: function weight(edge) { return 1; } }); var elesfn$o = { pageRank: function pageRank(options) { var _pageRankDefaults = pageRankDefaults(options), dampingFactor = _pageRankDefaults.dampingFactor, precision = _pageRankDefaults.precision, iterations = _pageRankDefaults.iterations, weight = _pageRankDefaults.weight; var cy = this._private.cy; var _this$byGroup = this.byGroup(), nodes = _this$byGroup.nodes, edges = _this$byGroup.edges; var numNodes = nodes.length; var numNodesSqd = numNodes * numNodes; var numEdges = edges.length; // Construct transposed adjacency matrix // First lets have a zeroed matrix of the right size // We'll also keep track of the sum of each column var matrix = new Array(numNodesSqd); var columnSum = new Array(numNodes); var additionalProb = (1 - dampingFactor) / numNodes; // Create null matrix for (var i = 0; i < numNodes; i++) { for (var j = 0; j < numNodes; j++) { var n = i * numNodes + j; matrix[n] = 0; } columnSum[i] = 0; } // Now, process edges for (var _i = 0; _i < numEdges; _i++) { var edge = edges[_i]; var srcId = edge.data('source'); var tgtId = edge.data('target'); // Don't include loops in the matrix if (srcId === tgtId) { continue; } var s = nodes.indexOfId(srcId); var t = nodes.indexOfId(tgtId); var w = weight(edge); var _n = t * numNodes + s; // Update matrix matrix[_n] += w; // Update column sum columnSum[s] += w; } // Add additional probability based on damping factor // Also, take into account columns that have sum = 0 var p = 1.0 / numNodes + additionalProb; // Shorthand // Traverse matrix, column by column for (var _j = 0; _j < numNodes; _j++) { if (columnSum[_j] === 0) { // No 'links' out from node jth, assume equal probability for each possible node for (var _i2 = 0; _i2 < numNodes; _i2++) { var _n2 = _i2 * numNodes + _j; matrix[_n2] = p; } } else { // Node jth has outgoing link, compute normalized probabilities for (var _i3 = 0; _i3 < numNodes; _i3++) { var _n3 = _i3 * numNodes + _j; matrix[_n3] = matrix[_n3] / columnSum[_j] + additionalProb; } } } // Compute dominant eigenvector using power method var eigenvector = new Array(numNodes); var temp = new Array(numNodes); var previous; // Start with a vector of all 1's // Also, initialize a null vector which will be used as shorthand for (var _i4 = 0; _i4 < numNodes; _i4++) { eigenvector[_i4] = 1; } for (var iter = 0; iter < iterations; iter++) { // Temp array with all 0's for (var _i5 = 0; _i5 < numNodes; _i5++) { temp[_i5] = 0; } // Multiply matrix with previous result for (var _i6 = 0; _i6 < numNodes; _i6++) { for (var _j2 = 0; _j2 < numNodes; _j2++) { var _n4 = _i6 * numNodes + _j2; temp[_i6] += matrix[_n4] * eigenvector[_j2]; } } inPlaceSumNormalize(temp); previous = eigenvector; eigenvector = temp; temp = previous; var diff = 0; // Compute difference (squared module) of both vectors for (var _i7 = 0; _i7 < numNodes; _i7++) { var delta = previous[_i7] - eigenvector[_i7]; diff += delta * delta; } // If difference is less than the desired threshold, stop iterating if (diff < precision) { break; } } // Construct result var res = { rank: function rank(node) { node = cy.collection(node)[0]; return eigenvector[nodes.indexOf(node)]; } }; return res; } // pageRank }; // elesfn var defaults$f = defaults$g({ root: null, weight: function weight(edge) { return 1; }, directed: false, alpha: 0 }); var elesfn$n = { degreeCentralityNormalized: function degreeCentralityNormalized(options) { options = defaults$f(options); var cy = this.cy(); var nodes = this.nodes(); var numNodes = nodes.length; if (!options.directed) { var degrees = {}; var maxDegree = 0; for (var i = 0; i < numNodes; i++) { var node = nodes[i]; // add current node to the current options object and call degreeCentrality options.root = node; var currDegree = this.degreeCentrality(options); if (maxDegree < currDegree.degree) { maxDegree = currDegree.degree; } degrees[node.id()] = currDegree.degree; } return { degree: function degree(node) { if (maxDegree === 0) { return 0; } if (string(node)) { // from is a selector string node = cy.filter(node); } return degrees[node.id()] / maxDegree; } }; } else { var indegrees = {}; var outdegrees = {}; var maxIndegree = 0; var maxOutdegree = 0; for (var _i = 0; _i < numNodes; _i++) { var _node = nodes[_i]; var id = _node.id(); // add current node to the current options object and call degreeCentrality options.root = _node; var _currDegree = this.degreeCentrality(options); if (maxIndegree < _currDegree.indegree) maxIndegree = _currDegree.indegree; if (maxOutdegree < _currDegree.outdegree) maxOutdegree = _currDegree.outdegree; indegrees[id] = _currDegree.indegree; outdegrees[id] = _currDegree.outdegree; } return { indegree: function indegree(node) { if (maxIndegree == 0) { return 0; } if (string(node)) { // from is a selector string node = cy.filter(node); } return indegrees[node.id()] / maxIndegree; }, outdegree: function outdegree(node) { if (maxOutdegree === 0) { return 0; } if (string(node)) { // from is a selector string node = cy.filter(node); } return outdegrees[node.id()] / maxOutdegree; } }; } }, // degreeCentralityNormalized // Implemented from the algorithm in Opsahl's paper // "Node centrality in weighted networks: Generalizing degree and shortest paths" // check the heading 2 "Degree" degreeCentrality: function degreeCentrality(options) { options = defaults$f(options); var cy = this.cy(); var callingEles = this; var _options = options, root = _options.root, weight = _options.weight, directed = _options.directed, alpha = _options.alpha; root = cy.collection(root)[0]; if (!directed) { var connEdges = root.connectedEdges().intersection(callingEles); var k = connEdges.length; var s = 0; // Now, sum edge weights for (var i = 0; i < connEdges.length; i++) { s += weight(connEdges[i]); } return { degree: Math.pow(k, 1 - alpha) * Math.pow(s, alpha) }; } else { var edges = root.connectedEdges(); var incoming = edges.filter(function (edge) { return edge.target().same(root) && callingEles.has(edge); }); var outgoing = edges.filter(function (edge) { return edge.source().same(root) && callingEles.has(edge); }); var k_in = incoming.length; var k_out = outgoing.length; var s_in = 0; var s_out = 0; // Now, sum incoming edge weights for (var _i2 = 0; _i2 < incoming.length; _i2++) { s_in += weight(incoming[_i2]); } // Now, sum outgoing edge weights for (var _i3 = 0; _i3 < outgoing.length; _i3++) { s_out += weight(outgoing[_i3]); } return { indegree: Math.pow(k_in, 1 - alpha) * Math.pow(s_in, alpha), outdegree: Math.pow(k_out, 1 - alpha) * Math.pow(s_out, alpha) }; } } // degreeCentrality }; // elesfn // nice, short mathematical alias elesfn$n.dc = elesfn$n.degreeCentrality; elesfn$n.dcn = elesfn$n.degreeCentralityNormalised = elesfn$n.degreeCentralityNormalized; var defaults$e = defaults$g({ harmonic: true, weight: function weight() { return 1; }, directed: false, root: null }); var elesfn$m = { closenessCentralityNormalized: function closenessCentralityNormalized(options) { var _defaults = defaults$e(options), harmonic = _defaults.harmonic, weight = _defaults.weight, directed = _defaults.directed; var cy = this.cy(); var closenesses = {}; var maxCloseness = 0; var nodes = this.nodes(); var fw = this.floydWarshall({ weight: weight, directed: directed }); // Compute closeness for every node and find the maximum closeness for (var i = 0; i < nodes.length; i++) { var currCloseness = 0; var node_i = nodes[i]; for (var j = 0; j < nodes.length; j++) { if (i !== j) { var d = fw.distance(node_i, nodes[j]); if (harmonic) { currCloseness += 1 / d; } else { currCloseness += d; } } } if (!harmonic) { currCloseness = 1 / currCloseness; } if (maxCloseness < currCloseness) { maxCloseness = currCloseness; } closenesses[node_i.id()] = currCloseness; } return { closeness: function closeness(node) { if (maxCloseness == 0) { return 0; } if (string(node)) { // from is a selector string node = cy.filter(node)[0].id(); } else { // from is a node node = node.id(); } return closenesses[node] / maxCloseness; } }; }, // Implemented from pseudocode from wikipedia closenessCentrality: function closenessCentrality(options) { var _defaults2 = defaults$e(options), root = _defaults2.root, weight = _defaults2.weight, directed = _defaults2.directed, harmonic = _defaults2.harmonic; root = this.filter(root)[0]; // we need distance from this node to every other node var dijkstra = this.dijkstra({ root: root, weight: weight, directed: directed }); var totalDistance = 0; var nodes = this.nodes(); for (var i = 0; i < nodes.length; i++) { var n = nodes[i]; if (!n.same(root)) { var d = dijkstra.distanceTo(n); if (harmonic) { totalDistance += 1 / d; } else { totalDistance += d; } } } return harmonic ? totalDistance : 1 / totalDistance; } // closenessCentrality }; // elesfn // nice, short mathematical alias elesfn$m.cc = elesfn$m.closenessCentrality; elesfn$m.ccn = elesfn$m.closenessCentralityNormalised = elesfn$m.closenessCentralityNormalized; var defaults$d = defaults$g({ weight: null, directed: false }); var elesfn$l = { // Implemented from the algorithm in the paper "On Variants of Shortest-Path Betweenness Centrality and their Generic Computation" by Ulrik Brandes betweennessCentrality: function betweennessCentrality(options) { var _defaults = defaults$d(options), directed = _defaults.directed, weight = _defaults.weight; var weighted = weight != null; var cy = this.cy(); // starting var V = this.nodes(); var A = {}; var _C = {}; var max = 0; var C = { set: function set(key, val) { _C[key] = val; if (val > max) { max = val; } }, get: function get(key) { return _C[key]; } }; // A contains the neighborhoods of every node for (var i = 0; i < V.length; i++) { var v = V[i]; var vid = v.id(); if (directed) { A[vid] = v.outgoers().nodes(); // get outgoers of every node } else { A[vid] = v.openNeighborhood().nodes(); // get neighbors of every node } C.set(vid, 0); } var _loop = function _loop(s) { var sid = V[s].id(); var S = []; // stack var P = {}; var g = {}; var d = {}; var Q = new Heap__default["default"](function (a, b) { return d[a] - d[b]; }); // queue // init dictionaries for (var _i = 0; _i < V.length; _i++) { var _vid = V[_i].id(); P[_vid] = []; g[_vid] = 0; d[_vid] = Infinity; } g[sid] = 1; // sigma d[sid] = 0; // distance to s Q.push(sid); while (!Q.empty()) { var _v = Q.pop(); S.push(_v); if (weighted) { for (var j = 0; j < A[_v].length; j++) { var w = A[_v][j]; var vEle = cy.getElementById(_v); var edge = void 0; if (vEle.edgesTo(w).length > 0) { edge = vEle.edgesTo(w)[0]; } else { edge = w.edgesTo(vEle)[0]; } var edgeWeight = weight(edge); w = w.id(); if (d[w] > d[_v] + edgeWeight) { d[w] = d[_v] + edgeWeight; if (Q.nodes.indexOf(w) < 0) { //if w is not in Q Q.push(w); } else { // update position if w is in Q Q.updateItem(w); } g[w] = 0; P[w] = []; } if (d[w] == d[_v] + edgeWeight) { g[w] = g[w] + g[_v]; P[w].push(_v); } } } else { for (var _j = 0; _j < A[_v].length; _j++) { var _w = A[_v][_j].id(); if (d[_w] == Infinity) { Q.push(_w); d[_w] = d[_v] + 1; } if (d[_w] == d[_v] + 1) { g[_w] = g[_w] + g[_v]; P[_w].push(_v); } } } } var e = {}; for (var _i2 = 0; _i2 < V.length; _i2++) { e[V[_i2].id()] = 0; } while (S.length > 0) { var _w2 = S.pop(); for (var _j2 = 0; _j2 < P[_w2].length; _j2++) { var _v2 = P[_w2][_j2]; e[_v2] = e[_v2] + g[_v2] / g[_w2] * (1 + e[_w2]); } if (_w2 != V[s].id()) { C.set(_w2, C.get(_w2) + e[_w2]); } } }; for (var s = 0; s < V.length; s++) { _loop(s); } var ret = { betweenness: function betweenness(node) { var id = cy.collection(node).id(); return C.get(id); }, betweennessNormalized: function betweennessNormalized(node) { if (max == 0) { return 0; } var id = cy.collection(node).id(); return C.get(id) / max; } }; // alias ret.betweennessNormalised = ret.betweennessNormalized; return ret; } // betweennessCentrality }; // elesfn // nice, short mathematical alias elesfn$l.bc = elesfn$l.betweennessCentrality; // Implemented by Zoe Xi @zoexi for GSOC 2016 /* eslint-disable no-unused-vars */ var defaults$c = defaults$g({ expandFactor: 2, // affects time of computation and cluster granularity to some extent: M * M inflateFactor: 2, // affects cluster granularity (the greater the value, the more clusters): M(i,j) / E(j) multFactor: 1, // optional self loops for each node. Use a neutral value to improve cluster computations. maxIterations: 20, // maximum number of iterations of the MCL algorithm in a single run attributes: [// attributes/features used to group nodes, ie. similarity values between nodes function (edge) { return 1; }] }); /* eslint-enable */ var setOptions$3 = function setOptions(options) { return defaults$c(options); }; /* eslint-enable */ var getSimilarity$1 = function getSimilarity(edge, attributes) { var total = 0; for (var i = 0; i < attributes.length; i++) { total += attributes[i](edge); } return total; }; var addLoops = function addLoops(M, n, val) { for (var i = 0; i < n; i++) { M[i * n + i] = val; } }; var normalize = function normalize(M, n) { var sum; for (var col = 0; col < n; col++) { sum = 0; for (var row = 0; row < n; row++) { sum += M[row * n + col]; } for (var _row = 0; _row < n; _row++) { M[_row * n + col] = M[_row * n + col] / sum; } } }; // TODO: blocked matrix multiplication? var mmult = function mmult(A, B, n) { var C = new Array(n * n); for (var i = 0; i < n; i++) { for (var j = 0; j < n; j++) { C[i * n + j] = 0; } for (var k = 0; k < n; k++) { for (var _j = 0; _j < n; _j++) { C[i * n + _j] += A[i * n + k] * B[k * n + _j]; } } } return C; }; var expand = function expand(M, n, expandFactor /** power **/ ) { var _M = M.slice(0); for (var p = 1; p < expandFactor; p++) { M = mmult(M, _M, n); } return M; }; var inflate = function inflate(M, n, inflateFactor /** r **/ ) { var _M = new Array(n * n); // M(i,j) ^ inflatePower for (var i = 0; i < n * n; i++) { _M[i] = Math.pow(M[i], inflateFactor); } normalize(_M, n); return _M; }; var hasConverged = function hasConverged(M, _M, n2, roundFactor) { // Check that both matrices have the same elements (i,j) for (var i = 0; i < n2; i++) { var v1 = Math.round(M[i] * Math.pow(10, roundFactor)) / Math.pow(10, roundFactor); // truncate to 'roundFactor' decimal places var v2 = Math.round(_M[i] * Math.pow(10, roundFactor)) / Math.pow(10, roundFactor); if (v1 !== v2) { return false; } } return true; }; var assign$2 = function assign(M, n, nodes, cy) { var clusters = []; for (var i = 0; i < n; i++) { var cluster = []; for (var j = 0; j < n; j++) { // Row-wise attractors and elements that they attract belong in same cluster if (Math.round(M[i * n + j] * 1000) / 1000 > 0) { cluster.push(nodes[j]); } } if (cluster.length !== 0) { clusters.push(cy.collection(cluster)); } } return clusters; }; var isDuplicate = function isDuplicate(c1, c2) { for (var i = 0; i < c1.length; i++) { if (!c2[i] || c1[i].id() !== c2[i].id()) { return false; } } return true; }; var removeDuplicates = function removeDuplicates(clusters) { for (var i = 0; i < clusters.length; i++) { for (var j = 0; j < clusters.length; j++) { if (i != j && isDuplicate(clusters[i], clusters[j])) { clusters.splice(j, 1); } } } return clusters; }; var markovClustering = function markovClustering(options) { var nodes = this.nodes(); var edges = this.edges(); var cy = this.cy(); // Set parameters of algorithm: var opts = setOptions$3(options); // Map each node to its position in node array var id2position = {}; for (var i = 0; i < nodes.length; i++) { id2position[nodes[i].id()] = i; } // Generate stochastic matrix M from input graph G (should be symmetric/undirected) var n = nodes.length, n2 = n * n; var M = new Array(n2), _M; for (var _i = 0; _i < n2; _i++) { M[_i] = 0; } for (var e = 0; e < edges.length; e++) { var edge = edges[e]; var _i2 = id2position[edge.source().id()]; var j = id2position[edge.target().id()]; var sim = getSimilarity$1(edge, opts.attributes); M[_i2 * n + j] += sim; // G should be symmetric and undirected M[j * n + _i2] += sim; } // Begin Markov cluster algorithm // Step 1: Add self loops to each node, ie. add multFactor to matrix diagonal addLoops(M, n, opts.multFactor); // Step 2: M = normalize( M ); normalize(M, n); var isStillMoving = true; var iterations = 0; while (isStillMoving && iterations < opts.maxIterations) { isStillMoving = false; // Step 3: _M = expand(M, n, opts.expandFactor); // Step 4: M = inflate(_M, n, opts.inflateFactor); // Step 5: check to see if ~steady state has been reached if (!hasConverged(M, _M, n2, 4)) { isStillMoving = true; } iterations++; } // Build clusters from matrix var clusters = assign$2(M, n, nodes, cy); // Remove duplicate clusters due to symmetry of graph and M matrix clusters = removeDuplicates(clusters); return clusters; }; var markovClustering$1 = { markovClustering: markovClustering, mcl: markovClustering }; // Common distance metrics for clustering algorithms var identity = function identity(x) { return x; }; var absDiff = function absDiff(p, q) { return Math.abs(q - p); }; var addAbsDiff = function addAbsDiff(total, p, q) { return total + absDiff(p, q); }; var addSquaredDiff = function addSquaredDiff(total, p, q) { return total + Math.pow(q - p, 2); }; var sqrt = function sqrt(x) { return Math.sqrt(x); }; var maxAbsDiff = function maxAbsDiff(currentMax, p, q) { return Math.max(currentMax, absDiff(p, q)); }; var getDistance = function getDistance(length, getP, getQ, init, visit) { var post = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : identity; var ret = init; var p, q; for (var dim = 0; dim < length; dim++) { p = getP(dim); q = getQ(dim); ret = visit(ret, p, q); } return post(ret); }; var distances = { euclidean: function euclidean(length, getP, getQ) { if (length >= 2) { return getDistance(length, getP, getQ, 0, addSquaredDiff, sqrt); } else { // for single attr case, more efficient to avoid sqrt return getDistance(length, getP, getQ, 0, addAbsDiff); } }, squaredEuclidean: function squaredEuclidean(length, getP, getQ) { return getDistance(length, getP, getQ, 0, addSquaredDiff); }, manhattan: function manhattan(length, getP, getQ) { return getDistance(length, getP, getQ, 0, addAbsDiff); }, max: function max(length, getP, getQ) { return getDistance(length, getP, getQ, -Infinity, maxAbsDiff); } }; // in case the user accidentally doesn't use camel case distances['squared-euclidean'] = distances['squaredEuclidean']; distances['squaredeuclidean'] = distances['squaredEuclidean']; function clusteringDistance (method, length, getP, getQ, nodeP, nodeQ) { var impl; if (fn$6(method)) { impl = method; } else { impl = distances[method] || distances.euclidean; } if (length === 0 && fn$6(method)) { return impl(nodeP, nodeQ); } else { return impl(length, getP, getQ, nodeP, nodeQ); } } var defaults$b = defaults$g({ k: 2, m: 2, sensitivityThreshold: 0.0001, distance: 'euclidean', maxIterations: 10, attributes: [], testMode: false, testCentroids: null }); var setOptions$2 = function setOptions(options) { return defaults$b(options); }; /* eslint-enable */ var getDist = function getDist(type, node, centroid, attributes, mode) { var noNodeP = mode !== 'kMedoids'; var getP = noNodeP ? function (i) { return centroid[i]; } : function (i) { return attributes[i](centroid); }; var getQ = function getQ(i) { return attributes[i](node); }; var nodeP = centroid; var nodeQ = node; return clusteringDistance(type, attributes.length, getP, getQ, nodeP, nodeQ); }; var randomCentroids = function randomCentroids(nodes, k, attributes) { var ndim = attributes.length; var min = new Array(ndim); var max = new Array(ndim); var centroids = new Array(k); var centroid = null; // Find min, max values for each attribute dimension for (var i = 0; i < ndim; i++) { min[i] = nodes.min(attributes[i]).value; max[i] = nodes.max(attributes[i]).value; } // Build k centroids, each represented as an n-dim feature vector for (var c = 0; c < k; c++) { centroid = []; for (var _i = 0; _i < ndim; _i++) { centroid[_i] = Math.random() * (max[_i] - min[_i]) + min[_i]; // random initial value } centroids[c] = centroid; } return centroids; }; var classify = function classify(node, centroids, distance, attributes, type) { var min = Infinity; var index = 0; for (var i = 0; i < centroids.length; i++) { var dist = getDist(distance, node, centroids[i], attributes, type); if (dist < min) { min = dist; index = i; } } return index; }; var buildCluster = function buildCluster(centroid, nodes, assignment) { var cluster = []; var node = null; for (var n = 0; n < nodes.length; n++) { node = nodes[n]; if (assignment[node.id()] === centroid) { //console.log("Node " + node.id() + " is associated with medoid #: " + m); cluster.push(node); } } return cluster; }; var haveValuesConverged = function haveValuesConverged(v1, v2, sensitivityThreshold) { return Math.abs(v2 - v1) <= sensitivityThreshold; }; var haveMatricesConverged = function haveMatricesConverged(v1, v2, sensitivityThreshold) { for (var i = 0; i < v1.length; i++) { for (var j = 0; j < v1[i].length; j++) { var diff = Math.abs(v1[i][j] - v2[i][j]); if (diff > sensitivityThreshold) { return false; } } } return true; }; var seenBefore = function seenBefore(node, medoids, n) { for (var i = 0; i < n; i++) { if (node === medoids[i]) return true; } return false; }; var randomMedoids = function randomMedoids(nodes, k) { var medoids = new Array(k); // For small data sets, the probability of medoid conflict is greater, // so we need to check to see if we've already seen or chose this node before. if (nodes.length < 50) { // Randomly select k medoids from the n nodes for (var i = 0; i < k; i++) { var node = nodes[Math.floor(Math.random() * nodes.length)]; // If we've already chosen this node to be a medoid, don't choose it again (for small data sets). // Instead choose a different random node. while (seenBefore(node, medoids, i)) { node = nodes[Math.floor(Math.random() * nodes.length)]; } medoids[i] = node; } } else { // Relatively large data set, so pretty safe to not check and just select random nodes for (var _i2 = 0; _i2 < k; _i2++) { medoids[_i2] = nodes[Math.floor(Math.random() * nodes.length)]; } } return medoids; }; var findCost = function findCost(potentialNewMedoid, cluster, attributes) { var cost = 0; for (var n = 0; n < cluster.length; n++) { cost += getDist('manhattan', cluster[n], potentialNewMedoid, attributes, 'kMedoids'); } return cost; }; var kMeans = function kMeans(options) { var cy = this.cy(); var nodes = this.nodes(); var node = null; // Set parameters of algorithm: # of clusters, distance metric, etc. var opts = setOptions$2(options); // Begin k-means algorithm var clusters = new Array(opts.k); var assignment = {}; var centroids; // Step 1: Initialize centroid positions if (opts.testMode) { if (typeof opts.testCentroids === 'number') { // TODO: implement a seeded random number generator. opts.testCentroids; centroids = randomCentroids(nodes, opts.k, opts.attributes); } else if (_typeof(opts.testCentroids) === 'object') { centroids = opts.testCentroids; } else { centroids = randomCentroids(nodes, opts.k, opts.attributes); } } else { centroids = randomCentroids(nodes, opts.k, opts.attributes); } var isStillMoving = true; var iterations = 0; while (isStillMoving && iterations < opts.maxIterations) { // Step 2: Assign nodes to the nearest centroid for (var n = 0; n < nodes.length; n++) { node = nodes[n]; // Determine which cluster this node belongs to: node id => cluster # assignment[node.id()] = classify(node, centroids, opts.distance, opts.attributes, 'kMeans'); } // Step 3: For each of the k clusters, update its centroid isStillMoving = false; for (var c = 0; c < opts.k; c++) { // Get all nodes that belong to this cluster var cluster = buildCluster(c, nodes, assignment); if (cluster.length === 0) { // If cluster is empty, break out early & move to next cluster continue; } // Update centroids by calculating avg of all nodes within the cluster. var ndim = opts.attributes.length; var centroid = centroids[c]; // [ dim_1, dim_2, dim_3, ... , dim_n ] var newCentroid = new Array(ndim); var sum = new Array(ndim); for (var d = 0; d < ndim; d++) { sum[d] = 0.0; for (var i = 0; i < cluster.length; i++) { node = cluster[i]; sum[d] += opts.attributes[d](node); } newCentroid[d] = sum[d] / cluster.length; // Check to see if algorithm has converged, i.e. when centroids no longer change if (!haveValuesConverged(newCentroid[d], centroid[d], opts.sensitivityThreshold)) { isStillMoving = true; } } centroids[c] = newCentroid; clusters[c] = cy.collection(cluster); } iterations++; } return clusters; }; var kMedoids = function kMedoids(options) { var cy = this.cy(); var nodes = this.nodes(); var node = null; var opts = setOptions$2(options); // Begin k-medoids algorithm var clusters = new Array(opts.k); var medoids; var assignment = {}; var curCost; var minCosts = new Array(opts.k); // minimum cost configuration for each cluster // Step 1: Initialize k medoids if (opts.testMode) { if (typeof opts.testCentroids === 'number') ; else if (_typeof(opts.testCentroids) === 'object') { medoids = opts.testCentroids; } else { medoids = randomMedoids(nodes, opts.k); } } else { medoids = randomMedoids(nodes, opts.k); } var isStillMoving = true; var iterations = 0; while (isStillMoving && iterations < opts.maxIterations) { // Step 2: Assign nodes to the nearest medoid for (var n = 0; n < nodes.length; n++) { node = nodes[n]; // Determine which cluster this node belongs to: node id => cluster # assignment[node.id()] = classify(node, medoids, opts.distance, opts.attributes, 'kMedoids'); } isStillMoving = false; // Step 3: For each medoid m, and for each node associated with mediod m, // select the node with the lowest configuration cost as new medoid. for (var m = 0; m < medoids.length; m++) { // Get all nodes that belong to this medoid var cluster = buildCluster(m, nodes, assignment); if (cluster.length === 0) { // If cluster is empty, break out early & move to next cluster continue; } minCosts[m] = findCost(medoids[m], cluster, opts.attributes); // original cost // Select different medoid if its configuration has the lowest cost for (var _n = 0; _n < cluster.length; _n++) { curCost = findCost(cluster[_n], cluster, opts.attributes); if (curCost < minCosts[m]) { minCosts[m] = curCost; medoids[m] = cluster[_n]; isStillMoving = true; } } clusters[m] = cy.collection(cluster); } iterations++; } return clusters; }; var updateCentroids = function updateCentroids(centroids, nodes, U, weight, opts) { var numerator, denominator; for (var n = 0; n < nodes.length; n++) { for (var c = 0; c < centroids.length; c++) { weight[n][c] = Math.pow(U[n][c], opts.m); } } for (var _c = 0; _c < centroids.length; _c++) { for (var dim = 0; dim < opts.attributes.length; dim++) { numerator = 0; denominator = 0; for (var _n2 = 0; _n2 < nodes.length; _n2++) { numerator += weight[_n2][_c] * opts.attributes[dim](nodes[_n2]); denominator += weight[_n2][_c]; } centroids[_c][dim] = numerator / denominator; } } }; var updateMembership = function updateMembership(U, _U, centroids, nodes, opts) { // Save previous step for (var i = 0; i < U.length; i++) { _U[i] = U[i].slice(); } var sum, numerator, denominator; var pow = 2 / (opts.m - 1); for (var c = 0; c < centroids.length; c++) { for (var n = 0; n < nodes.length; n++) { sum = 0; for (var k = 0; k < centroids.length; k++) { // against all other centroids numerator = getDist(opts.distance, nodes[n], centroids[c], opts.attributes, 'cmeans'); denominator = getDist(opts.distance, nodes[n], centroids[k], opts.attributes, 'cmeans'); sum += Math.pow(numerator / denominator, pow); } U[n][c] = 1 / sum; } } }; var assign$1 = function assign(nodes, U, opts, cy) { var clusters = new Array(opts.k); for (var c = 0; c < clusters.length; c++) { clusters[c] = []; } var max; var index; for (var n = 0; n < U.length; n++) { // for each node (U is N x C matrix) max = -Infinity; index = -1; // Determine which cluster the node is most likely to belong in for (var _c2 = 0; _c2 < U[0].length; _c2++) { if (U[n][_c2] > max) { max = U[n][_c2]; index = _c2; } } clusters[index].push(nodes[n]); } // Turn every array into a collection of nodes for (var _c3 = 0; _c3 < clusters.length; _c3++) { clusters[_c3] = cy.collection(clusters[_c3]); } return clusters; }; var fuzzyCMeans = function fuzzyCMeans(options) { var cy = this.cy(); var nodes = this.nodes(); var opts = setOptions$2(options); // Begin fuzzy c-means algorithm var clusters; var centroids; var U; var _U; var weight; // Step 1: Initialize letiables. _U = new Array(nodes.length); for (var i = 0; i < nodes.length; i++) { // N x C matrix _U[i] = new Array(opts.k); } U = new Array(nodes.length); for (var _i3 = 0; _i3 < nodes.length; _i3++) { // N x C matrix U[_i3] = new Array(opts.k); } for (var _i4 = 0; _i4 < nodes.length; _i4++) { var total = 0; for (var j = 0; j < opts.k; j++) { U[_i4][j] = Math.random(); total += U[_i4][j]; } for (var _j = 0; _j < opts.k; _j++) { U[_i4][_j] = U[_i4][_j] / total; } } centroids = new Array(opts.k); for (var _i5 = 0; _i5 < opts.k; _i5++) { centroids[_i5] = new Array(opts.attributes.length); } weight = new Array(nodes.length); for (var _i6 = 0; _i6 < nodes.length; _i6++) { // N x C matrix weight[_i6] = new Array(opts.k); } // end init FCM var isStillMoving = true; var iterations = 0; while (isStillMoving && iterations < opts.maxIterations) { isStillMoving = false; // Step 2: Calculate the centroids for each step. updateCentroids(centroids, nodes, U, weight, opts); // Step 3: Update the partition matrix U. updateMembership(U, _U, centroids, nodes, opts); // Step 4: Check for convergence. if (!haveMatricesConverged(U, _U, opts.sensitivityThreshold)) { isStillMoving = true; } iterations++; } // Assign nodes to clusters with highest probability. clusters = assign$1(nodes, U, opts, cy); return { clusters: clusters, degreeOfMembership: U }; }; var kClustering = { kMeans: kMeans, kMedoids: kMedoids, fuzzyCMeans: fuzzyCMeans, fcm: fuzzyCMeans }; // Implemented by Zoe Xi @zoexi for GSOC 2016 var defaults$a = defaults$g({ distance: 'euclidean', // distance metric to compare nodes linkage: 'min', // linkage criterion : how to determine the distance between clusters of nodes mode: 'threshold', // mode:'threshold' => clusters must be threshold distance apart threshold: Infinity, // the distance threshold // mode:'dendrogram' => the nodes are organised as leaves in a tree (siblings are close), merging makes clusters addDendrogram: false, // whether to add the dendrogram to the graph for viz dendrogramDepth: 0, // depth at which dendrogram branches are merged into the returned clusters attributes: [] // array of attr functions }); var linkageAliases = { 'single': 'min', 'complete': 'max' }; var setOptions$1 = function setOptions(options) { var opts = defaults$a(options); var preferredAlias = linkageAliases[opts.linkage]; if (preferredAlias != null) { opts.linkage = preferredAlias; } return opts; }; var mergeClosest = function mergeClosest(clusters, index, dists, mins, opts) { // Find two closest clusters from cached mins var minKey = 0; var min = Infinity; var dist; var attrs = opts.attributes; var getDist = function getDist(n1, n2) { return clusteringDistance(opts.distance, attrs.length, function (i) { return attrs[i](n1); }, function (i) { return attrs[i](n2); }, n1, n2); }; for (var i = 0; i < clusters.length; i++) { var key = clusters[i].key; var _dist = dists[key][mins[key]]; if (_dist < min) { minKey = key; min = _dist; } } if (opts.mode === 'threshold' && min >= opts.threshold || opts.mode === 'dendrogram' && clusters.length === 1) { return false; } var c1 = index[minKey]; var c2 = index[mins[minKey]]; var merged; // Merge two closest clusters if (opts.mode === 'dendrogram') { merged = { left: c1, right: c2, key: c1.key }; } else { merged = { value: c1.value.concat(c2.value), key: c1.key }; } clusters[c1.index] = merged; clusters.splice(c2.index, 1); index[c1.key] = merged; // Update distances with new merged cluster for (var _i = 0; _i < clusters.length; _i++) { var cur = clusters[_i]; if (c1.key === cur.key) { dist = Infinity; } else if (opts.linkage === 'min') { dist = dists[c1.key][cur.key]; if (dists[c1.key][cur.key] > dists[c2.key][cur.key]) { dist = dists[c2.key][cur.key]; } } else if (opts.linkage === 'max') { dist = dists[c1.key][cur.key]; if (dists[c1.key][cur.key] < dists[c2.key][cur.key]) { dist = dists[c2.key][cur.key]; } } else if (opts.linkage === 'mean') { dist = (dists[c1.key][cur.key] * c1.size + dists[c2.key][cur.key] * c2.size) / (c1.size + c2.size); } else { if (opts.mode === 'dendrogram') dist = getDist(cur.value, c1.value);else dist = getDist(cur.value[0], c1.value[0]); } dists[c1.key][cur.key] = dists[cur.key][c1.key] = dist; // distance matrix is symmetric } // Update cached mins for (var _i2 = 0; _i2 < clusters.length; _i2++) { var key1 = clusters[_i2].key; if (mins[key1] === c1.key || mins[key1] === c2.key) { var _min = key1; for (var j = 0; j < clusters.length; j++) { var key2 = clusters[j].key; if (dists[key1][key2] < dists[key1][_min]) { _min = key2; } } mins[key1] = _min; } clusters[_i2].index = _i2; } // Clean up meta data used for clustering c1.key = c2.key = c1.index = c2.index = null; return true; }; var getAllChildren = function getAllChildren(root, arr, cy) { if (!root) return; if (root.value) { arr.push(root.value); } else { if (root.left) getAllChildren(root.left, arr); if (root.right) getAllChildren(root.right, arr); } }; var buildDendrogram = function buildDendrogram(root, cy) { if (!root) return ''; if (root.left && root.right) { var leftStr = buildDendrogram(root.left, cy); var rightStr = buildDendrogram(root.right, cy); var node = cy.add({ group: 'nodes', data: { id: leftStr + ',' + rightStr } }); cy.add({ group: 'edges', data: { source: leftStr, target: node.id() } }); cy.add({ group: 'edges', data: { source: rightStr, target: node.id() } }); return node.id(); } else if (root.value) { return root.value.id(); } }; var buildClustersFromTree = function buildClustersFromTree(root, k, cy) { if (!root) return []; var left = [], right = [], leaves = []; if (k === 0) { // don't cut tree, simply return all nodes as 1 single cluster if (root.left) getAllChildren(root.left, left); if (root.right) getAllChildren(root.right, right); leaves = left.concat(right); return [cy.collection(leaves)]; } else if (k === 1) { // cut at root if (root.value) { // leaf node return [cy.collection(root.value)]; } else { if (root.left) getAllChildren(root.left, left); if (root.right) getAllChildren(root.right, right); return [cy.collection(left), cy.collection(right)]; } } else { if (root.value) { return [cy.collection(root.value)]; } else { if (root.left) left = buildClustersFromTree(root.left, k - 1, cy); if (root.right) right = buildClustersFromTree(root.right, k - 1, cy); return left.concat(right); } } }; /* eslint-enable */ var hierarchicalClustering = function hierarchicalClustering(options) { var cy = this.cy(); var nodes = this.nodes(); // Set parameters of algorithm: linkage type, distance metric, etc. var opts = setOptions$1(options); var attrs = opts.attributes; var getDist = function getDist(n1, n2) { return clusteringDistance(opts.distance, attrs.length, function (i) { return attrs[i](n1); }, function (i) { return attrs[i](n2); }, n1, n2); }; // Begin hierarchical algorithm var clusters = []; var dists = []; // distances between each pair of clusters var mins = []; // closest cluster for each cluster var index = []; // hash of all clusters by key // In agglomerative (bottom-up) clustering, each node starts as its own cluster for (var n = 0; n < nodes.length; n++) { var cluster = { value: opts.mode === 'dendrogram' ? nodes[n] : [nodes[n]], key: n, index: n }; clusters[n] = cluster; index[n] = cluster; dists[n] = []; mins[n] = 0; } // Calculate the distance between each pair of clusters for (var i = 0; i < clusters.length; i++) { for (var j = 0; j <= i; j++) { var dist = void 0; if (opts.mode === 'dendrogram') { // modes store cluster values differently dist = i === j ? Infinity : getDist(clusters[i].value, clusters[j].value); } else { dist = i === j ? Infinity : getDist(clusters[i].value[0], clusters[j].value[0]); } dists[i][j] = dist; dists[j][i] = dist; if (dist < dists[i][mins[i]]) { mins[i] = j; // Cache mins: closest cluster to cluster i is cluster j } } } // Find the closest pair of clusters and merge them into a single cluster. // Update distances between new cluster and each of the old clusters, and loop until threshold reached. var merged = mergeClosest(clusters, index, dists, mins, opts); while (merged) { merged = mergeClosest(clusters, index, dists, mins, opts); } var retClusters; // Dendrogram mode builds the hierarchy and adds intermediary nodes + edges // in addition to returning the clusters. if (opts.mode === 'dendrogram') { retClusters = buildClustersFromTree(clusters[0], opts.dendrogramDepth, cy); if (opts.addDendrogram) buildDendrogram(clusters[0], cy); } else { // Regular mode simply returns the clusters retClusters = new Array(clusters.length); clusters.forEach(function (cluster, i) { // Clean up meta data used for clustering cluster.key = cluster.index = null; retClusters[i] = cy.collection(cluster.value); }); } return retClusters; }; var hierarchicalClustering$1 = { hierarchicalClustering: hierarchicalClustering, hca: hierarchicalClustering }; // Implemented by Zoe Xi @zoexi for GSOC 2016 var defaults$9 = defaults$g({ distance: 'euclidean', // distance metric to compare attributes between two nodes preference: 'median', // suitability of a data point to serve as an exemplar damping: 0.8, // damping factor between [0.5, 1) maxIterations: 1000, // max number of iterations to run minIterations: 100, // min number of iterations to run in order for clustering to stop attributes: [// functions to quantify the similarity between any two points // e.g. node => node.data('weight') ] }); var setOptions = function setOptions(options) { var dmp = options.damping; var pref = options.preference; if (!(0.5 <= dmp && dmp < 1)) { error("Damping must range on [0.5, 1). Got: ".concat(dmp)); } var validPrefs = ['median', 'mean', 'min', 'max']; if (!(validPrefs.some(function (v) { return v === pref; }) || number$1(pref))) { error("Preference must be one of [".concat(validPrefs.map(function (p) { return "'".concat(p, "'"); }).join(', '), "] or a number. Got: ").concat(pref)); } return defaults$9(options); }; /* eslint-enable */ var getSimilarity = function getSimilarity(type, n1, n2, attributes) { var attr = function attr(n, i) { return attributes[i](n); }; // nb negative because similarity should have an inverse relationship to distance return -clusteringDistance(type, attributes.length, function (i) { return attr(n1, i); }, function (i) { return attr(n2, i); }, n1, n2); }; var getPreference = function getPreference(S, preference) { // larger preference = greater # of clusters var p = null; if (preference === 'median') { p = median(S); } else if (preference === 'mean') { p = mean(S); } else if (preference === 'min') { p = min(S); } else if (preference === 'max') { p = max(S); } else { // Custom preference number, as set by user p = preference; } return p; }; var findExemplars = function findExemplars(n, R, A) { var indices = []; for (var i = 0; i < n; i++) { if (R[i * n + i] + A[i * n + i] > 0) { indices.push(i); } } return indices; }; var assignClusters = function assignClusters(n, S, exemplars) { var clusters = []; for (var i = 0; i < n; i++) { var index = -1; var max = -Infinity; for (var ei = 0; ei < exemplars.length; ei++) { var e = exemplars[ei]; if (S[i * n + e] > max) { index = e; max = S[i * n + e]; } } if (index > 0) { clusters.push(index); } } for (var _ei = 0; _ei < exemplars.length; _ei++) { clusters[exemplars[_ei]] = exemplars[_ei]; } return clusters; }; var assign = function assign(n, S, exemplars) { var clusters = assignClusters(n, S, exemplars); for (var ei = 0; ei < exemplars.length; ei++) { var ii = []; for (var c = 0; c < clusters.length; c++) { if (clusters[c] === exemplars[ei]) { ii.push(c); } } var maxI = -1; var maxSum = -Infinity; for (var i = 0; i < ii.length; i++) { var sum = 0; for (var j = 0; j < ii.length; j++) { sum += S[ii[j] * n + ii[i]]; } if (sum > maxSum) { maxI = i; maxSum = sum; } } exemplars[ei] = ii[maxI]; } clusters = assignClusters(n, S, exemplars); return clusters; }; var affinityPropagation = function affinityPropagation(options) { var cy = this.cy(); var nodes = this.nodes(); var opts = setOptions(options); // Map each node to its position in node array var id2position = {}; for (var i = 0; i < nodes.length; i++) { id2position[nodes[i].id()] = i; } // Begin affinity propagation algorithm var n; // number of data points var n2; // size of matrices var S; // similarity matrix (1D array) var p; // preference/suitability of a data point to serve as an exemplar var R; // responsibility matrix (1D array) var A; // availability matrix (1D array) n = nodes.length; n2 = n * n; // Initialize and build S similarity matrix S = new Array(n2); for (var _i = 0; _i < n2; _i++) { S[_i] = -Infinity; // for cases where two data points shouldn't be linked together } for (var _i2 = 0; _i2 < n; _i2++) { for (var j = 0; j < n; j++) { if (_i2 !== j) { S[_i2 * n + j] = getSimilarity(opts.distance, nodes[_i2], nodes[j], opts.attributes); } } } // Place preferences on the diagonal of S p = getPreference(S, opts.preference); for (var _i3 = 0; _i3 < n; _i3++) { S[_i3 * n + _i3] = p; } // Initialize R responsibility matrix R = new Array(n2); for (var _i4 = 0; _i4 < n2; _i4++) { R[_i4] = 0.0; } // Initialize A availability matrix A = new Array(n2); for (var _i5 = 0; _i5 < n2; _i5++) { A[_i5] = 0.0; } var old = new Array(n); var Rp = new Array(n); var se = new Array(n); for (var _i6 = 0; _i6 < n; _i6++) { old[_i6] = 0.0; Rp[_i6] = 0.0; se[_i6] = 0; } var e = new Array(n * opts.minIterations); for (var _i7 = 0; _i7 < e.length; _i7++) { e[_i7] = 0; } var iter; for (iter = 0; iter < opts.maxIterations; iter++) { // main algorithmic loop // Update R responsibility matrix for (var _i8 = 0; _i8 < n; _i8++) { var max = -Infinity, max2 = -Infinity, maxI = -1, AS = 0.0; for (var _j = 0; _j < n; _j++) { old[_j] = R[_i8 * n + _j]; AS = A[_i8 * n + _j] + S[_i8 * n + _j]; if (AS >= max) { max2 = max; max = AS; maxI = _j; } else if (AS > max2) { max2 = AS; } } for (var _j2 = 0; _j2 < n; _j2++) { R[_i8 * n + _j2] = (1 - opts.damping) * (S[_i8 * n + _j2] - max) + opts.damping * old[_j2]; } R[_i8 * n + maxI] = (1 - opts.damping) * (S[_i8 * n + maxI] - max2) + opts.damping * old[maxI]; } // Update A availability matrix for (var _i9 = 0; _i9 < n; _i9++) { var sum = 0; for (var _j3 = 0; _j3 < n; _j3++) { old[_j3] = A[_j3 * n + _i9]; Rp[_j3] = Math.max(0, R[_j3 * n + _i9]); sum += Rp[_j3]; } sum -= Rp[_i9]; Rp[_i9] = R[_i9 * n + _i9]; sum += Rp[_i9]; for (var _j4 = 0; _j4 < n; _j4++) { A[_j4 * n + _i9] = (1 - opts.damping) * Math.min(0, sum - Rp[_j4]) + opts.damping * old[_j4]; } A[_i9 * n + _i9] = (1 - opts.damping) * (sum - Rp[_i9]) + opts.damping * old[_i9]; } // Check for convergence var K = 0; for (var _i10 = 0; _i10 < n; _i10++) { var E = A[_i10 * n + _i10] + R[_i10 * n + _i10] > 0 ? 1 : 0; e[iter % opts.minIterations * n + _i10] = E; K += E; } if (K > 0 && (iter >= opts.minIterations - 1 || iter == opts.maxIterations - 1)) { var _sum = 0; for (var _i11 = 0; _i11 < n; _i11++) { se[_i11] = 0; for (var _j5 = 0; _j5 < opts.minIterations; _j5++) { se[_i11] += e[_j5 * n + _i11]; } if (se[_i11] === 0 || se[_i11] === opts.minIterations) { _sum++; } } if (_sum === n) { // then we have convergence break; } } } // Identify exemplars (cluster centers) var exemplarsIndices = findExemplars(n, R, A); // Assign nodes to clusters var clusterIndices = assign(n, S, exemplarsIndices); var clusters = {}; for (var c = 0; c < exemplarsIndices.length; c++) { clusters[exemplarsIndices[c]] = []; } for (var _i12 = 0; _i12 < nodes.length; _i12++) { var pos = id2position[nodes[_i12].id()]; var clusterIndex = clusterIndices[pos]; if (clusterIndex != null) { // the node may have not been assigned a cluster if no valid attributes were specified clusters[clusterIndex].push(nodes[_i12]); } } var retClusters = new Array(exemplarsIndices.length); for (var _c = 0; _c < exemplarsIndices.length; _c++) { retClusters[_c] = cy.collection(clusters[exemplarsIndices[_c]]); } return retClusters; }; var affinityPropagation$1 = { affinityPropagation: affinityPropagation, ap: affinityPropagation }; var hierholzerDefaults = defaults$g({ root: undefined, directed: false }); var elesfn$k = { hierholzer: function hierholzer(options) { if (!plainObject(options)) { var args = arguments; options = { root: args[0], directed: args[1] }; } var _hierholzerDefaults = hierholzerDefaults(options), root = _hierholzerDefaults.root, directed = _hierholzerDefaults.directed; var eles = this; var dflag = false; var oddIn; var oddOut; var startVertex; if (root) startVertex = string(root) ? this.filter(root)[0].id() : root[0].id(); var nodes = {}; var edges = {}; if (directed) { eles.forEach(function (ele) { var id = ele.id(); if (ele.isNode()) { var ind = ele.indegree(true); var outd = ele.outdegree(true); var d1 = ind - outd; var d2 = outd - ind; if (d1 == 1) { if (oddIn) dflag = true;else oddIn = id; } else if (d2 == 1) { if (oddOut) dflag = true;else oddOut = id; } else if (d2 > 1 || d1 > 1) { dflag = true; } nodes[id] = []; ele.outgoers().forEach(function (e) { if (e.isEdge()) nodes[id].push(e.id()); }); } else { edges[id] = [undefined, ele.target().id()]; } }); } else { eles.forEach(function (ele) { var id = ele.id(); if (ele.isNode()) { var d = ele.degree(true); if (d % 2) { if (!oddIn) oddIn = id;else if (!oddOut) oddOut = id;else dflag = true; } nodes[id] = []; ele.connectedEdges().forEach(function (e) { return nodes[id].push(e.id()); }); } else { edges[id] = [ele.source().id(), ele.target().id()]; } }); } var result = { found: false, trail: undefined }; if (dflag) return result;else if (oddOut && oddIn) { if (directed) { if (startVertex && oddOut != startVertex) { return result; } startVertex = oddOut; } else { if (startVertex && oddOut != startVertex && oddIn != startVertex) { return result; } else if (!startVertex) { startVertex = oddOut; } } } else { if (!startVertex) startVertex = eles[0].id(); } var walk = function walk(v) { var currentNode = v; var subtour = [v]; var adj, adjTail, adjHead; while (nodes[currentNode].length) { adj = nodes[currentNode].shift(); adjTail = edges[adj][0]; adjHead = edges[adj][1]; if (currentNode != adjHead) { nodes[adjHead] = nodes[adjHead].filter(function (e) { return e != adj; }); currentNode = adjHead; } else if (!directed && currentNode != adjTail) { nodes[adjTail] = nodes[adjTail].filter(function (e) { return e != adj; }); currentNode = adjTail; } subtour.unshift(adj); subtour.unshift(currentNode); } return subtour; }; var trail = []; var subtour = []; subtour = walk(startVertex); while (subtour.length != 1) { if (nodes[subtour[0]].length == 0) { trail.unshift(eles.getElementById(subtour.shift())); trail.unshift(eles.getElementById(subtour.shift())); } else { subtour = walk(subtour.shift()).concat(subtour); } } trail.unshift(eles.getElementById(subtour.shift())); // final node for (var d in nodes) { if (nodes[d].length) { return result; } } result.found = true; result.trail = this.spawn(trail, true); return result; } }; var hopcroftTarjanBiconnected = function hopcroftTarjanBiconnected() { var eles = this; var nodes = {}; var id = 0; var edgeCount = 0; var components = []; var stack = []; var visitedEdges = {}; var buildComponent = function buildComponent(x, y) { var i = stack.length - 1; var cutset = []; var component = eles.spawn(); while (stack[i].x != x || stack[i].y != y) { cutset.push(stack.pop().edge); i--; } cutset.push(stack.pop().edge); cutset.forEach(function (edge) { var connectedNodes = edge.connectedNodes().intersection(eles); component.merge(edge); connectedNodes.forEach(function (node) { var nodeId = node.id(); var connectedEdges = node.connectedEdges().intersection(eles); component.merge(node); if (!nodes[nodeId].cutVertex) { component.merge(connectedEdges); } else { component.merge(connectedEdges.filter(function (edge) { return edge.isLoop(); })); } }); }); components.push(component); }; var biconnectedSearch = function biconnectedSearch(root, currentNode, parent) { if (root === parent) edgeCount += 1; nodes[currentNode] = { id: id, low: id++, cutVertex: false }; var edges = eles.getElementById(currentNode).connectedEdges().intersection(eles); if (edges.size() === 0) { components.push(eles.spawn(eles.getElementById(currentNode))); } else { var sourceId, targetId, otherNodeId, edgeId; edges.forEach(function (edge) { sourceId = edge.source().id(); targetId = edge.target().id(); otherNodeId = sourceId === currentNode ? targetId : sourceId; if (otherNodeId !== parent) { edgeId = edge.id(); if (!visitedEdges[edgeId]) { visitedEdges[edgeId] = true; stack.push({ x: currentNode, y: otherNodeId, edge: edge }); } if (!(otherNodeId in nodes)) { biconnectedSearch(root, otherNodeId, currentNode); nodes[currentNode].low = Math.min(nodes[currentNode].low, nodes[otherNodeId].low); if (nodes[currentNode].id <= nodes[otherNodeId].low) { nodes[currentNode].cutVertex = true; buildComponent(currentNode, otherNodeId); } } else { nodes[currentNode].low = Math.min(nodes[currentNode].low, nodes[otherNodeId].id); } } }); } }; eles.forEach(function (ele) { if (ele.isNode()) { var nodeId = ele.id(); if (!(nodeId in nodes)) { edgeCount = 0; biconnectedSearch(nodeId, nodeId); nodes[nodeId].cutVertex = edgeCount > 1; } } }); var cutVertices = Object.keys(nodes).filter(function (id) { return nodes[id].cutVertex; }).map(function (id) { return eles.getElementById(id); }); return { cut: eles.spawn(cutVertices), components: components }; }; var hopcroftTarjanBiconnected$1 = { hopcroftTarjanBiconnected: hopcroftTarjanBiconnected, htbc: hopcroftTarjanBiconnected, htb: hopcroftTarjanBiconnected, hopcroftTarjanBiconnectedComponents: hopcroftTarjanBiconnected }; var tarjanStronglyConnected = function tarjanStronglyConnected() { var eles = this; var nodes = {}; var index = 0; var components = []; var stack = []; var cut = eles.spawn(eles); var stronglyConnectedSearch = function stronglyConnectedSearch(sourceNodeId) { stack.push(sourceNodeId); nodes[sourceNodeId] = { index: index, low: index++, explored: false }; var connectedEdges = eles.getElementById(sourceNodeId).connectedEdges().intersection(eles); connectedEdges.forEach(function (edge) { var targetNodeId = edge.target().id(); if (targetNodeId !== sourceNodeId) { if (!(targetNodeId in nodes)) { stronglyConnectedSearch(targetNodeId); } if (!nodes[targetNodeId].explored) { nodes[sourceNodeId].low = Math.min(nodes[sourceNodeId].low, nodes[targetNodeId].low); } } }); if (nodes[sourceNodeId].index === nodes[sourceNodeId].low) { var componentNodes = eles.spawn(); for (;;) { var nodeId = stack.pop(); componentNodes.merge(eles.getElementById(nodeId)); nodes[nodeId].low = nodes[sourceNodeId].index; nodes[nodeId].explored = true; if (nodeId === sourceNodeId) { break; } } var componentEdges = componentNodes.edgesWith(componentNodes); var component = componentNodes.merge(componentEdges); components.push(component); cut = cut.difference(component); } }; eles.forEach(function (ele) { if (ele.isNode()) { var nodeId = ele.id(); if (!(nodeId in nodes)) { stronglyConnectedSearch(nodeId); } } }); return { cut: cut, components: components }; }; var tarjanStronglyConnected$1 = { tarjanStronglyConnected: tarjanStronglyConnected, tsc: tarjanStronglyConnected, tscc: tarjanStronglyConnected, tarjanStronglyConnectedComponents: tarjanStronglyConnected }; var elesfn$j = {}; [elesfn$v, elesfn$u, elesfn$t, elesfn$s, elesfn$r, elesfn$q, elesfn$p, elesfn$o, elesfn$n, elesfn$m, elesfn$l, markovClustering$1, kClustering, hierarchicalClustering$1, affinityPropagation$1, elesfn$k, hopcroftTarjanBiconnected$1, tarjanStronglyConnected$1].forEach(function (props) { extend(elesfn$j, props); }); /*! Embeddable Minimum Strictly-Compliant Promises/A+ 1.1.1 Thenable Copyright (c) 2013-2014 Ralf S. Engelschall (http://engelschall.com) Licensed under The MIT License (http://opensource.org/licenses/MIT) */ /* promise states [Promises/A+ 2.1] */ var STATE_PENDING = 0; /* [Promises/A+ 2.1.1] */ var STATE_FULFILLED = 1; /* [Promises/A+ 2.1.2] */ var STATE_REJECTED = 2; /* [Promises/A+ 2.1.3] */ /* promise object constructor */ var api = function api(executor) { /* optionally support non-constructor/plain-function call */ if (!(this instanceof api)) return new api(executor); /* initialize object */ this.id = 'Thenable/1.0.7'; this.state = STATE_PENDING; /* initial state */ this.fulfillValue = undefined; /* initial value */ /* [Promises/A+ 1.3, 2.1.2.2] */ this.rejectReason = undefined; /* initial reason */ /* [Promises/A+ 1.5, 2.1.3.2] */ this.onFulfilled = []; /* initial handlers */ this.onRejected = []; /* initial handlers */ /* provide optional information-hiding proxy */ this.proxy = { then: this.then.bind(this) }; /* support optional executor function */ if (typeof executor === 'function') executor.call(this, this.fulfill.bind(this), this.reject.bind(this)); }; /* promise API methods */ api.prototype = { /* promise resolving methods */ fulfill: function fulfill(value) { return deliver(this, STATE_FULFILLED, 'fulfillValue', value); }, reject: function reject(value) { return deliver(this, STATE_REJECTED, 'rejectReason', value); }, /* "The then Method" [Promises/A+ 1.1, 1.2, 2.2] */ then: function then(onFulfilled, onRejected) { var curr = this; var next = new api(); /* [Promises/A+ 2.2.7] */ curr.onFulfilled.push(resolver(onFulfilled, next, 'fulfill')); /* [Promises/A+ 2.2.2/2.2.6] */ curr.onRejected.push(resolver(onRejected, next, 'reject')); /* [Promises/A+ 2.2.3/2.2.6] */ execute(curr); return next.proxy; /* [Promises/A+ 2.2.7, 3.3] */ } }; /* deliver an action */ var deliver = function deliver(curr, state, name, value) { if (curr.state === STATE_PENDING) { curr.state = state; /* [Promises/A+ 2.1.2.1, 2.1.3.1] */ curr[name] = value; /* [Promises/A+ 2.1.2.2, 2.1.3.2] */ execute(curr); } return curr; }; /* execute all handlers */ var execute = function execute(curr) { if (curr.state === STATE_FULFILLED) execute_handlers(curr, 'onFulfilled', curr.fulfillValue);else if (curr.state === STATE_REJECTED) execute_handlers(curr, 'onRejected', curr.rejectReason); }; /* execute particular set of handlers */ var execute_handlers = function execute_handlers(curr, name, value) { /* global setImmediate: true */ /* global setTimeout: true */ /* short-circuit processing */ if (curr[name].length === 0) return; /* iterate over all handlers, exactly once */ var handlers = curr[name]; curr[name] = []; /* [Promises/A+ 2.2.2.3, 2.2.3.3] */ var func = function func() { for (var i = 0; i < handlers.length; i++) { handlers[i](value); } /* [Promises/A+ 2.2.5] */ }; /* execute procedure asynchronously */ /* [Promises/A+ 2.2.4, 3.1] */ if (typeof setImmediate === 'function') setImmediate(func);else setTimeout(func, 0); }; /* generate a resolver function */ var resolver = function resolver(cb, next, method) { return function (value) { if (typeof cb !== 'function') /* [Promises/A+ 2.2.1, 2.2.7.3, 2.2.7.4] */ next[method].call(next, value); /* [Promises/A+ 2.2.7.3, 2.2.7.4] */ else { var result; try { result = cb(value); } /* [Promises/A+ 2.2.2.1, 2.2.3.1, 2.2.5, 3.2] */ catch (e) { next.reject(e); /* [Promises/A+ 2.2.7.2] */ return; } resolve(next, result); /* [Promises/A+ 2.2.7.1] */ } }; }; /* "Promise Resolution Procedure" */ /* [Promises/A+ 2.3] */ var resolve = function resolve(promise, x) { /* sanity check arguments */ /* [Promises/A+ 2.3.1] */ if (promise === x || promise.proxy === x) { promise.reject(new TypeError('cannot resolve promise with itself')); return; } /* surgically check for a "then" method (mainly to just call the "getter" of "then" only once) */ var then; if (_typeof(x) === 'object' && x !== null || typeof x === 'function') { try { then = x.then; } /* [Promises/A+ 2.3.3.1, 3.5] */ catch (e) { promise.reject(e); /* [Promises/A+ 2.3.3.2] */ return; } } /* handle own Thenables [Promises/A+ 2.3.2] and similar "thenables" [Promises/A+ 2.3.3] */ if (typeof then === 'function') { var resolved = false; try { /* call retrieved "then" method */ /* [Promises/A+ 2.3.3.3] */ then.call(x, /* resolvePromise */ /* [Promises/A+ 2.3.3.3.1] */ function (y) { if (resolved) return; resolved = true; /* [Promises/A+ 2.3.3.3.3] */ if (y === x) /* [Promises/A+ 3.6] */ promise.reject(new TypeError('circular thenable chain'));else resolve(promise, y); }, /* rejectPromise */ /* [Promises/A+ 2.3.3.3.2] */ function (r) { if (resolved) return; resolved = true; /* [Promises/A+ 2.3.3.3.3] */ promise.reject(r); }); } catch (e) { if (!resolved) /* [Promises/A+ 2.3.3.3.3] */ promise.reject(e); /* [Promises/A+ 2.3.3.3.4] */ } return; } /* handle other values */ promise.fulfill(x); /* [Promises/A+ 2.3.4, 2.3.3.4] */ }; // so we always have Promise.all() api.all = function (ps) { return new api(function (resolveAll, rejectAll) { var vals = new Array(ps.length); var doneCount = 0; var fulfill = function fulfill(i, val) { vals[i] = val; doneCount++; if (doneCount === ps.length) { resolveAll(vals); } }; for (var i = 0; i < ps.length; i++) { (function (i) { var p = ps[i]; var isPromise = p != null && p.then != null; if (isPromise) { p.then(function (val) { fulfill(i, val); }, function (err) { rejectAll(err); }); } else { var val = p; fulfill(i, val); } })(i); } }); }; api.resolve = function (val) { return new api(function (resolve, reject) { resolve(val); }); }; api.reject = function (val) { return new api(function (resolve, reject) { reject(val); }); }; var Promise$1 = typeof Promise !== 'undefined' ? Promise : api; // eslint-disable-line no-undef var Animation = function Animation(target, opts, opts2) { var isCore = core(target); var isEle = !isCore; var _p = this._private = extend({ duration: 1000 }, opts, opts2); _p.target = target; _p.style = _p.style || _p.css; _p.started = false; _p.playing = false; _p.hooked = false; _p.applying = false; _p.progress = 0; _p.completes = []; _p.frames = []; if (_p.complete && fn$6(_p.complete)) { _p.completes.push(_p.complete); } if (isEle) { var pos = target.position(); _p.startPosition = _p.startPosition || { x: pos.x, y: pos.y }; _p.startStyle = _p.startStyle || target.cy().style().getAnimationStartStyle(target, _p.style); } if (isCore) { var pan = target.pan(); _p.startPan = { x: pan.x, y: pan.y }; _p.startZoom = target.zoom(); } // for future timeline/animations impl this.length = 1; this[0] = this; }; var anifn = Animation.prototype; extend(anifn, { instanceString: function instanceString() { return 'animation'; }, hook: function hook() { var _p = this._private; if (!_p.hooked) { // add to target's animation queue var q; var tAni = _p.target._private.animation; if (_p.queue) { q = tAni.queue; } else { q = tAni.current; } q.push(this); // add to the animation loop pool if (elementOrCollection(_p.target)) { _p.target.cy().addToAnimationPool(_p.target); } _p.hooked = true; } return this; }, play: function play() { var _p = this._private; // autorewind if (_p.progress === 1) { _p.progress = 0; } _p.playing = true; _p.started = false; // needs to be started by animation loop _p.stopped = false; this.hook(); // the animation loop will start the animation... return this; }, playing: function playing() { return this._private.playing; }, apply: function apply() { var _p = this._private; _p.applying = true; _p.started = false; // needs to be started by animation loop _p.stopped = false; this.hook(); // the animation loop will apply the animation at this progress return this; }, applying: function applying() { return this._private.applying; }, pause: function pause() { var _p = this._private; _p.playing = false; _p.started = false; return this; }, stop: function stop() { var _p = this._private; _p.playing = false; _p.started = false; _p.stopped = true; // to be removed from animation queues return this; }, rewind: function rewind() { return this.progress(0); }, fastforward: function fastforward() { return this.progress(1); }, time: function time(t) { var _p = this._private; if (t === undefined) { return _p.progress * _p.duration; } else { return this.progress(t / _p.duration); } }, progress: function progress(p) { var _p = this._private; var wasPlaying = _p.playing; if (p === undefined) { return _p.progress; } else { if (wasPlaying) { this.pause(); } _p.progress = p; _p.started = false; if (wasPlaying) { this.play(); } } return this; }, completed: function completed() { return this._private.progress === 1; }, reverse: function reverse() { var _p = this._private; var wasPlaying = _p.playing; if (wasPlaying) { this.pause(); } _p.progress = 1 - _p.progress; _p.started = false; var swap = function swap(a, b) { var _pa = _p[a]; if (_pa == null) { return; } _p[a] = _p[b]; _p[b] = _pa; }; swap('zoom', 'startZoom'); swap('pan', 'startPan'); swap('position', 'startPosition'); // swap styles if (_p.style) { for (var i = 0; i < _p.style.length; i++) { var prop = _p.style[i]; var name = prop.name; var startStyleProp = _p.startStyle[name]; _p.startStyle[name] = prop; _p.style[i] = startStyleProp; } } if (wasPlaying) { this.play(); } return this; }, promise: function promise(type) { var _p = this._private; var arr; switch (type) { case 'frame': arr = _p.frames; break; default: case 'complete': case 'completed': arr = _p.completes; } return new Promise$1(function (resolve, reject) { arr.push(function () { resolve(); }); }); } }); anifn.complete = anifn.completed; anifn.run = anifn.play; anifn.running = anifn.playing; var define$3 = { animated: function animated() { return function animatedImpl() { var self = this; var selfIsArrayLike = self.length !== undefined; var all = selfIsArrayLike ? self : [self]; // put in array if not array-like var cy = this._private.cy || this; if (!cy.styleEnabled()) { return false; } var ele = all[0]; if (ele) { return ele._private.animation.current.length > 0; } }; }, // animated clearQueue: function clearQueue() { return function clearQueueImpl() { var self = this; var selfIsArrayLike = self.length !== undefined; var all = selfIsArrayLike ? self : [self]; // put in array if not array-like var cy = this._private.cy || this; if (!cy.styleEnabled()) { return this; } for (var i = 0; i < all.length; i++) { var ele = all[i]; ele._private.animation.queue = []; } return this; }; }, // clearQueue delay: function delay() { return function delayImpl(time, complete) { var cy = this._private.cy || this; if (!cy.styleEnabled()) { return this; } return this.animate({ delay: time, duration: time, complete: complete }); }; }, // delay delayAnimation: function delayAnimation() { return function delayAnimationImpl(time, complete) { var cy = this._private.cy || this; if (!cy.styleEnabled()) { return this; } return this.animation({ delay: time, duration: time, complete: complete }); }; }, // delay animation: function animation() { return function animationImpl(properties, params) { var self = this; var selfIsArrayLike = self.length !== undefined; var all = selfIsArrayLike ? self : [self]; // put in array if not array-like var cy = this._private.cy || this; var isCore = !selfIsArrayLike; var isEles = !isCore; if (!cy.styleEnabled()) { return this; } var style = cy.style(); properties = extend({}, properties, params); var propertiesEmpty = Object.keys(properties).length === 0; if (propertiesEmpty) { return new Animation(all[0], properties); // nothing to animate } if (properties.duration === undefined) { properties.duration = 400; } switch (properties.duration) { case 'slow': properties.duration = 600; break; case 'fast': properties.duration = 200; break; } if (isEles) { properties.style = style.getPropsList(properties.style || properties.css); properties.css = undefined; } if (isEles && properties.renderedPosition != null) { var rpos = properties.renderedPosition; var pan = cy.pan(); var zoom = cy.zoom(); properties.position = renderedToModelPosition(rpos, zoom, pan); } // override pan w/ panBy if set if (isCore && properties.panBy != null) { var panBy = properties.panBy; var cyPan = cy.pan(); properties.pan = { x: cyPan.x + panBy.x, y: cyPan.y + panBy.y }; } // override pan w/ center if set var center = properties.center || properties.centre; if (isCore && center != null) { var centerPan = cy.getCenterPan(center.eles, properties.zoom); if (centerPan != null) { properties.pan = centerPan; } } // override pan & zoom w/ fit if set if (isCore && properties.fit != null) { var fit = properties.fit; var fitVp = cy.getFitViewport(fit.eles || fit.boundingBox, fit.padding); if (fitVp != null) { properties.pan = fitVp.pan; properties.zoom = fitVp.zoom; } } // override zoom (& potentially pan) w/ zoom obj if set if (isCore && plainObject(properties.zoom)) { var vp = cy.getZoomedViewport(properties.zoom); if (vp != null) { if (vp.zoomed) { properties.zoom = vp.zoom; } if (vp.panned) { properties.pan = vp.pan; } } else { properties.zoom = null; // an inavalid zoom (e.g. no delta) gets automatically destroyed } } return new Animation(all[0], properties); }; }, // animate animate: function animate() { return function animateImpl(properties, params) { var self = this; var selfIsArrayLike = self.length !== undefined; var all = selfIsArrayLike ? self : [self]; // put in array if not array-like var cy = this._private.cy || this; if (!cy.styleEnabled()) { return this; } if (params) { properties = extend({}, properties, params); } // manually hook and run the animation for (var i = 0; i < all.length; i++) { var ele = all[i]; var queue = ele.animated() && (properties.queue === undefined || properties.queue); var ani = ele.animation(properties, queue ? { queue: true } : undefined); ani.play(); } return this; // chaining }; }, // animate stop: function stop() { return function stopImpl(clearQueue, jumpToEnd) { var self = this; var selfIsArrayLike = self.length !== undefined; var all = selfIsArrayLike ? self : [self]; // put in array if not array-like var cy = this._private.cy || this; if (!cy.styleEnabled()) { return this; } for (var i = 0; i < all.length; i++) { var ele = all[i]; var _p = ele._private; var anis = _p.animation.current; for (var j = 0; j < anis.length; j++) { var ani = anis[j]; var ani_p = ani._private; if (jumpToEnd) { // next iteration of the animation loop, the animation // will go straight to the end and be removed ani_p.duration = 0; } } // clear the queue of future animations if (clearQueue) { _p.animation.queue = []; } if (!jumpToEnd) { _p.animation.current = []; } } // we have to notify (the animation loop doesn't do it for us on `stop`) cy.notify('draw'); return this; }; } // stop }; // define var define$2 = { // access data field data: function data(params) { var defaults = { field: 'data', bindingEvent: 'data', allowBinding: false, allowSetting: false, allowGetting: false, settingEvent: 'data', settingTriggersEvent: false, triggerFnName: 'trigger', immutableKeys: {}, // key => true if immutable updateStyle: false, beforeGet: function beforeGet(self) {}, beforeSet: function beforeSet(self, obj) {}, onSet: function onSet(self) {}, canSet: function canSet(self) { return true; } }; params = extend({}, defaults, params); return function dataImpl(name, value) { var p = params; var self = this; var selfIsArrayLike = self.length !== undefined; var all = selfIsArrayLike ? self : [self]; // put in array if not array-like var single = selfIsArrayLike ? self[0] : self; // .data('foo', ...) if (string(name)) { // set or get property var isPathLike = name.indexOf('.') !== -1; // there might be a normal field with a dot var path = isPathLike && toPath__default["default"](name); // .data('foo') if (p.allowGetting && value === undefined) { // get var ret; if (single) { p.beforeGet(single); // check if it's path and a field with the same name doesn't exist if (path && single._private[p.field][name] === undefined) { ret = get__default["default"](single._private[p.field], path); } else { ret = single._private[p.field][name]; } } return ret; // .data('foo', 'bar') } else if (p.allowSetting && value !== undefined) { // set var valid = !p.immutableKeys[name]; if (valid) { var change = _defineProperty({}, name, value); p.beforeSet(self, change); for (var i = 0, l = all.length; i < l; i++) { var ele = all[i]; if (p.canSet(ele)) { if (path && single._private[p.field][name] === undefined) { set__default["default"](ele._private[p.field], path, value); } else { ele._private[p.field][name] = value; } } } // update mappers if asked if (p.updateStyle) { self.updateStyle(); } // call onSet callback p.onSet(self); if (p.settingTriggersEvent) { self[p.triggerFnName](p.settingEvent); } } } // .data({ 'foo': 'bar' }) } else if (p.allowSetting && plainObject(name)) { // extend var obj = name; var k, v; var keys = Object.keys(obj); p.beforeSet(self, obj); for (var _i = 0; _i < keys.length; _i++) { k = keys[_i]; v = obj[k]; var _valid = !p.immutableKeys[k]; if (_valid) { for (var j = 0; j < all.length; j++) { var _ele = all[j]; if (p.canSet(_ele)) { _ele._private[p.field][k] = v; } } } } // update mappers if asked if (p.updateStyle) { self.updateStyle(); } // call onSet callback p.onSet(self); if (p.settingTriggersEvent) { self[p.triggerFnName](p.settingEvent); } // .data(function(){ ... }) } else if (p.allowBinding && fn$6(name)) { // bind to event var fn = name; self.on(p.bindingEvent, fn); // .data() } else if (p.allowGetting && name === undefined) { // get whole object var _ret; if (single) { p.beforeGet(single); _ret = single._private[p.field]; } return _ret; } return self; // maintain chainability }; // function }, // data // remove data field removeData: function removeData(params) { var defaults = { field: 'data', event: 'data', triggerFnName: 'trigger', triggerEvent: false, immutableKeys: {} // key => true if immutable }; params = extend({}, defaults, params); return function removeDataImpl(names) { var p = params; var self = this; var selfIsArrayLike = self.length !== undefined; var all = selfIsArrayLike ? self : [self]; // put in array if not array-like // .removeData('foo bar') if (string(names)) { // then get the list of keys, and delete them var keys = names.split(/\s+/); var l = keys.length; for (var i = 0; i < l; i++) { // delete each non-empty key var key = keys[i]; if (emptyString(key)) { continue; } var valid = !p.immutableKeys[key]; // not valid if immutable if (valid) { for (var i_a = 0, l_a = all.length; i_a < l_a; i_a++) { all[i_a]._private[p.field][key] = undefined; } } } if (p.triggerEvent) { self[p.triggerFnName](p.event); } // .removeData() } else if (names === undefined) { // then delete all keys for (var _i_a = 0, _l_a = all.length; _i_a < _l_a; _i_a++) { var _privateFields = all[_i_a]._private[p.field]; var _keys = Object.keys(_privateFields); for (var _i2 = 0; _i2 < _keys.length; _i2++) { var _key = _keys[_i2]; var validKeyToDelete = !p.immutableKeys[_key]; if (validKeyToDelete) { _privateFields[_key] = undefined; } } } if (p.triggerEvent) { self[p.triggerFnName](p.event); } } return self; // maintain chaining }; // function } // removeData }; // define var define$1 = { eventAliasesOn: function eventAliasesOn(proto) { var p = proto; p.addListener = p.listen = p.bind = p.on; p.unlisten = p.unbind = p.off = p.removeListener; p.trigger = p.emit; // this is just a wrapper alias of .on() p.pon = p.promiseOn = function (events, selector) { var self = this; var args = Array.prototype.slice.call(arguments, 0); return new Promise$1(function (resolve, reject) { var callback = function callback(e) { self.off.apply(self, offArgs); resolve(e); }; var onArgs = args.concat([callback]); var offArgs = onArgs.concat([]); self.on.apply(self, onArgs); }); }; } }; // define // use this module to cherry pick functions into your prototype var define = {}; [define$3, define$2, define$1].forEach(function (m) { extend(define, m); }); var elesfn$i = { animate: define.animate(), animation: define.animation(), animated: define.animated(), clearQueue: define.clearQueue(), delay: define.delay(), delayAnimation: define.delayAnimation(), stop: define.stop() }; var elesfn$h = { classes: function classes(_classes) { var self = this; if (_classes === undefined) { var ret = []; self[0]._private.classes.forEach(function (cls) { return ret.push(cls); }); return ret; } else if (!array(_classes)) { // extract classes from string _classes = (_classes || '').match(/\S+/g) || []; } var changed = []; var classesSet = new Set$1(_classes); // check and update each ele for (var j = 0; j < self.length; j++) { var ele = self[j]; var _p = ele._private; var eleClasses = _p.classes; var changedEle = false; // check if ele has all of the passed classes for (var i = 0; i < _classes.length; i++) { var cls = _classes[i]; var eleHasClass = eleClasses.has(cls); if (!eleHasClass) { changedEle = true; break; } } // check if ele has classes outside of those passed if (!changedEle) { changedEle = eleClasses.size !== _classes.length; } if (changedEle) { _p.classes = classesSet; changed.push(ele); } } // trigger update style on those eles that had class changes if (changed.length > 0) { this.spawn(changed).updateStyle().emit('class'); } return self; }, addClass: function addClass(classes) { return this.toggleClass(classes, true); }, hasClass: function hasClass(className) { var ele = this[0]; return ele != null && ele._private.classes.has(className); }, toggleClass: function toggleClass(classes, toggle) { if (!array(classes)) { // extract classes from string classes = classes.match(/\S+/g) || []; } var self = this; var toggleUndefd = toggle === undefined; var changed = []; // eles who had classes changed for (var i = 0, il = self.length; i < il; i++) { var ele = self[i]; var eleClasses = ele._private.classes; var changedEle = false; for (var j = 0; j < classes.length; j++) { var cls = classes[j]; var hasClass = eleClasses.has(cls); var changedNow = false; if (toggle || toggleUndefd && !hasClass) { eleClasses.add(cls); changedNow = true; } else if (!toggle || toggleUndefd && hasClass) { eleClasses["delete"](cls); changedNow = true; } if (!changedEle && changedNow) { changed.push(ele); changedEle = true; } } // for j classes } // for i eles // trigger update style on those eles that had class changes if (changed.length > 0) { this.spawn(changed).updateStyle().emit('class'); } return self; }, removeClass: function removeClass(classes) { return this.toggleClass(classes, false); }, flashClass: function flashClass(classes, duration) { var self = this; if (duration == null) { duration = 250; } else if (duration === 0) { return self; // nothing to do really } self.addClass(classes); setTimeout(function () { self.removeClass(classes); }, duration); return self; } }; elesfn$h.className = elesfn$h.classNames = elesfn$h.classes; var tokens = { metaChar: '[\\!\\"\\#\\$\\%\\&\\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]', // chars we need to escape in let names, etc comparatorOp: '=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=', // binary comparison op (used in data selectors) boolOp: '\\?|\\!|\\^', // boolean (unary) operators (used in data selectors) string: '"(?:\\\\"|[^"])*"' + '|' + "'(?:\\\\'|[^'])*'", // string literals (used in data selectors) -- doublequotes | singlequotes number: number, // number literal (used in data selectors) --- e.g. 0.1234, 1234, 12e123 meta: 'degree|indegree|outdegree', // allowed metadata fields (i.e. allowed functions to use from Collection) separator: '\\s*,\\s*', // queries are separated by commas, e.g. edge[foo = 'bar'], node.someClass descendant: '\\s+', child: '\\s+>\\s+', subject: '\\$', group: 'node|edge|\\*', directedEdge: '\\s+->\\s+', undirectedEdge: '\\s+<->\\s+' }; tokens.variable = '(?:[\\w-.]|(?:\\\\' + tokens.metaChar + '))+'; // a variable name can have letters, numbers, dashes, and periods tokens.className = '(?:[\\w-]|(?:\\\\' + tokens.metaChar + '))+'; // a class name has the same rules as a variable except it can't have a '.' in the name tokens.value = tokens.string + '|' + tokens.number; // a value literal, either a string or number tokens.id = tokens.variable; // an element id (follows variable conventions) (function () { var ops, op, i; // add @ variants to comparatorOp ops = tokens.comparatorOp.split('|'); for (i = 0; i < ops.length; i++) { op = ops[i]; tokens.comparatorOp += '|@' + op; } // add ! variants to comparatorOp ops = tokens.comparatorOp.split('|'); for (i = 0; i < ops.length; i++) { op = ops[i]; if (op.indexOf('!') >= 0) { continue; } // skip ops that explicitly contain ! if (op === '=') { continue; } // skip = b/c != is explicitly defined tokens.comparatorOp += '|\\!' + op; } })(); /** * Make a new query object * * @prop type {Type} The type enum (int) of the query * @prop checks List of checks to make against an ele to test for a match */ var newQuery = function newQuery() { return { checks: [] }; }; /** * A check type enum-like object. Uses integer values for fast match() lookup. * The ordering does not matter as long as the ints are unique. */ var Type = { /** E.g. node */ GROUP: 0, /** A collection of elements */ COLLECTION: 1, /** A filter(ele) function */ FILTER: 2, /** E.g. [foo > 1] */ DATA_COMPARE: 3, /** E.g. [foo] */ DATA_EXIST: 4, /** E.g. [?foo] */ DATA_BOOL: 5, /** E.g. [[degree > 2]] */ META_COMPARE: 6, /** E.g. :selected */ STATE: 7, /** E.g. #foo */ ID: 8, /** E.g. .foo */ CLASS: 9, /** E.g. #foo <-> #bar */ UNDIRECTED_EDGE: 10, /** E.g. #foo -> #bar */ DIRECTED_EDGE: 11, /** E.g. $#foo -> #bar */ NODE_SOURCE: 12, /** E.g. #foo -> $#bar */ NODE_TARGET: 13, /** E.g. $#foo <-> #bar */ NODE_NEIGHBOR: 14, /** E.g. #foo > #bar */ CHILD: 15, /** E.g. #foo #bar */ DESCENDANT: 16, /** E.g. $#foo > #bar */ PARENT: 17, /** E.g. $#foo #bar */ ANCESTOR: 18, /** E.g. #foo > $bar > #baz */ COMPOUND_SPLIT: 19, /** Always matches, useful placeholder for subject in `COMPOUND_SPLIT` */ TRUE: 20 }; var stateSelectors = [{ selector: ':selected', matches: function matches(ele) { return ele.selected(); } }, { selector: ':unselected', matches: function matches(ele) { return !ele.selected(); } }, { selector: ':selectable', matches: function matches(ele) { return ele.selectable(); } }, { selector: ':unselectable', matches: function matches(ele) { return !ele.selectable(); } }, { selector: ':locked', matches: function matches(ele) { return ele.locked(); } }, { selector: ':unlocked', matches: function matches(ele) { return !ele.locked(); } }, { selector: ':visible', matches: function matches(ele) { return ele.visible(); } }, { selector: ':hidden', matches: function matches(ele) { return !ele.visible(); } }, { selector: ':transparent', matches: function matches(ele) { return ele.transparent(); } }, { selector: ':grabbed', matches: function matches(ele) { return ele.grabbed(); } }, { selector: ':free', matches: function matches(ele) { return !ele.grabbed(); } }, { selector: ':removed', matches: function matches(ele) { return ele.removed(); } }, { selector: ':inside', matches: function matches(ele) { return !ele.removed(); } }, { selector: ':grabbable', matches: function matches(ele) { return ele.grabbable(); } }, { selector: ':ungrabbable', matches: function matches(ele) { return !ele.grabbable(); } }, { selector: ':animated', matches: function matches(ele) { return ele.animated(); } }, { selector: ':unanimated', matches: function matches(ele) { return !ele.animated(); } }, { selector: ':parent', matches: function matches(ele) { return ele.isParent(); } }, { selector: ':childless', matches: function matches(ele) { return ele.isChildless(); } }, { selector: ':child', matches: function matches(ele) { return ele.isChild(); } }, { selector: ':orphan', matches: function matches(ele) { return ele.isOrphan(); } }, { selector: ':nonorphan', matches: function matches(ele) { return ele.isChild(); } }, { selector: ':compound', matches: function matches(ele) { if (ele.isNode()) { return ele.isParent(); } else { return ele.source().isParent() || ele.target().isParent(); } } }, { selector: ':loop', matches: function matches(ele) { return ele.isLoop(); } }, { selector: ':simple', matches: function matches(ele) { return ele.isSimple(); } }, { selector: ':active', matches: function matches(ele) { return ele.active(); } }, { selector: ':inactive', matches: function matches(ele) { return !ele.active(); } }, { selector: ':backgrounding', matches: function matches(ele) { return ele.backgrounding(); } }, { selector: ':nonbackgrounding', matches: function matches(ele) { return !ele.backgrounding(); } }].sort(function (a, b) { // n.b. selectors that are starting substrings of others must have the longer ones first return descending(a.selector, b.selector); }); var lookup = function () { var selToFn = {}; var s; for (var i = 0; i < stateSelectors.length; i++) { s = stateSelectors[i]; selToFn[s.selector] = s.matches; } return selToFn; }(); var stateSelectorMatches = function stateSelectorMatches(sel, ele) { return lookup[sel](ele); }; var stateSelectorRegex = '(' + stateSelectors.map(function (s) { return s.selector; }).join('|') + ')'; // so that values get compared properly in Selector.filter() var cleanMetaChars = function cleanMetaChars(str) { return str.replace(new RegExp('\\\\(' + tokens.metaChar + ')', 'g'), function (match, $1) { return $1; }); }; var replaceLastQuery = function replaceLastQuery(selector, examiningQuery, replacementQuery) { selector[selector.length - 1] = replacementQuery; }; // NOTE: add new expression syntax here to have it recognised by the parser; // - a query contains all adjacent (i.e. no separator in between) expressions; // - the current query is stored in selector[i] // - you need to check the query objects in match() for it actually filter properly, but that's pretty straight forward var exprs = [{ name: 'group', // just used for identifying when debugging query: true, regex: '(' + tokens.group + ')', populate: function populate(selector, query, _ref) { var _ref2 = _slicedToArray(_ref, 1), group = _ref2[0]; query.checks.push({ type: Type.GROUP, value: group === '*' ? group : group + 's' }); } }, { name: 'state', query: true, regex: stateSelectorRegex, populate: function populate(selector, query, _ref3) { var _ref4 = _slicedToArray(_ref3, 1), state = _ref4[0]; query.checks.push({ type: Type.STATE, value: state }); } }, { name: 'id', query: true, regex: '\\#(' + tokens.id + ')', populate: function populate(selector, query, _ref5) { var _ref6 = _slicedToArray(_ref5, 1), id = _ref6[0]; query.checks.push({ type: Type.ID, value: cleanMetaChars(id) }); } }, { name: 'className', query: true, regex: '\\.(' + tokens.className + ')', populate: function populate(selector, query, _ref7) { var _ref8 = _slicedToArray(_ref7, 1), className = _ref8[0]; query.checks.push({ type: Type.CLASS, value: cleanMetaChars(className) }); } }, { name: 'dataExists', query: true, regex: '\\[\\s*(' + tokens.variable + ')\\s*\\]', populate: function populate(selector, query, _ref9) { var _ref10 = _slicedToArray(_ref9, 1), variable = _ref10[0]; query.checks.push({ type: Type.DATA_EXIST, field: cleanMetaChars(variable) }); } }, { name: 'dataCompare', query: true, regex: '\\[\\s*(' + tokens.variable + ')\\s*(' + tokens.comparatorOp + ')\\s*(' + tokens.value + ')\\s*\\]', populate: function populate(selector, query, _ref11) { var _ref12 = _slicedToArray(_ref11, 3), variable = _ref12[0], comparatorOp = _ref12[1], value = _ref12[2]; var valueIsString = new RegExp('^' + tokens.string + '$').exec(value) != null; if (valueIsString) { value = value.substring(1, value.length - 1); } else { value = parseFloat(value); } query.checks.push({ type: Type.DATA_COMPARE, field: cleanMetaChars(variable), operator: comparatorOp, value: value }); } }, { name: 'dataBool', query: true, regex: '\\[\\s*(' + tokens.boolOp + ')\\s*(' + tokens.variable + ')\\s*\\]', populate: function populate(selector, query, _ref13) { var _ref14 = _slicedToArray(_ref13, 2), boolOp = _ref14[0], variable = _ref14[1]; query.checks.push({ type: Type.DATA_BOOL, field: cleanMetaChars(variable), operator: boolOp }); } }, { name: 'metaCompare', query: true, regex: '\\[\\[\\s*(' + tokens.meta + ')\\s*(' + tokens.comparatorOp + ')\\s*(' + tokens.number + ')\\s*\\]\\]', populate: function populate(selector, query, _ref15) { var _ref16 = _slicedToArray(_ref15, 3), meta = _ref16[0], comparatorOp = _ref16[1], number = _ref16[2]; query.checks.push({ type: Type.META_COMPARE, field: cleanMetaChars(meta), operator: comparatorOp, value: parseFloat(number) }); } }, { name: 'nextQuery', separator: true, regex: tokens.separator, populate: function populate(selector, query) { var currentSubject = selector.currentSubject; var edgeCount = selector.edgeCount; var compoundCount = selector.compoundCount; var lastQ = selector[selector.length - 1]; if (currentSubject != null) { lastQ.subject = currentSubject; selector.currentSubject = null; } lastQ.edgeCount = edgeCount; lastQ.compoundCount = compoundCount; selector.edgeCount = 0; selector.compoundCount = 0; // go on to next query var nextQuery = selector[selector.length++] = newQuery(); return nextQuery; // this is the new query to be filled by the following exprs } }, { name: 'directedEdge', separator: true, regex: tokens.directedEdge, populate: function populate(selector, query) { if (selector.currentSubject == null) { // undirected edge var edgeQuery = newQuery(); var source = query; var target = newQuery(); edgeQuery.checks.push({ type: Type.DIRECTED_EDGE, source: source, target: target }); // the query in the selector should be the edge rather than the source replaceLastQuery(selector, query, edgeQuery); selector.edgeCount++; // we're now populating the target query with expressions that follow return target; } else { // source/target var srcTgtQ = newQuery(); var _source = query; var _target = newQuery(); srcTgtQ.checks.push({ type: Type.NODE_SOURCE, source: _source, target: _target }); // the query in the selector should be the neighbourhood rather than the node replaceLastQuery(selector, query, srcTgtQ); selector.edgeCount++; return _target; // now populating the target with the following expressions } } }, { name: 'undirectedEdge', separator: true, regex: tokens.undirectedEdge, populate: function populate(selector, query) { if (selector.currentSubject == null) { // undirected edge var edgeQuery = newQuery(); var source = query; var target = newQuery(); edgeQuery.checks.push({ type: Type.UNDIRECTED_EDGE, nodes: [source, target] }); // the query in the selector should be the edge rather than the source replaceLastQuery(selector, query, edgeQuery); selector.edgeCount++; // we're now populating the target query with expressions that follow return target; } else { // neighbourhood var nhoodQ = newQuery(); var node = query; var neighbor = newQuery(); nhoodQ.checks.push({ type: Type.NODE_NEIGHBOR, node: node, neighbor: neighbor }); // the query in the selector should be the neighbourhood rather than the node replaceLastQuery(selector, query, nhoodQ); return neighbor; // now populating the neighbor with following expressions } } }, { name: 'child', separator: true, regex: tokens.child, populate: function populate(selector, query) { if (selector.currentSubject == null) { // default: child query var parentChildQuery = newQuery(); var child = newQuery(); var parent = selector[selector.length - 1]; parentChildQuery.checks.push({ type: Type.CHILD, parent: parent, child: child }); // the query in the selector should be the '>' itself replaceLastQuery(selector, query, parentChildQuery); selector.compoundCount++; // we're now populating the child query with expressions that follow return child; } else if (selector.currentSubject === query) { // compound split query var compound = newQuery(); var left = selector[selector.length - 1]; var right = newQuery(); var subject = newQuery(); var _child = newQuery(); var _parent = newQuery(); // set up the root compound q compound.checks.push({ type: Type.COMPOUND_SPLIT, left: left, right: right, subject: subject }); // populate the subject and replace the q at the old spot (within left) with TRUE subject.checks = query.checks; // take the checks from the left query.checks = [{ type: Type.TRUE }]; // checks under left refs the subject implicitly // set up the right q _parent.checks.push({ type: Type.TRUE }); // parent implicitly refs the subject right.checks.push({ type: Type.PARENT, // type is swapped on right side queries parent: _parent, child: _child // empty for now }); replaceLastQuery(selector, left, compound); // update the ref since we moved things around for `query` selector.currentSubject = subject; selector.compoundCount++; return _child; // now populating the right side's child } else { // parent query // info for parent query var _parent2 = newQuery(); var _child2 = newQuery(); var pcQChecks = [{ type: Type.PARENT, parent: _parent2, child: _child2 }]; // the parent-child query takes the place of the query previously being populated _parent2.checks = query.checks; // the previous query contains the checks for the parent query.checks = pcQChecks; // pc query takes over selector.compoundCount++; return _child2; // we're now populating the child } } }, { name: 'descendant', separator: true, regex: tokens.descendant, populate: function populate(selector, query) { if (selector.currentSubject == null) { // default: descendant query var ancChQuery = newQuery(); var descendant = newQuery(); var ancestor = selector[selector.length - 1]; ancChQuery.checks.push({ type: Type.DESCENDANT, ancestor: ancestor, descendant: descendant }); // the query in the selector should be the '>' itself replaceLastQuery(selector, query, ancChQuery); selector.compoundCount++; // we're now populating the descendant query with expressions that follow return descendant; } else if (selector.currentSubject === query) { // compound split query var compound = newQuery(); var left = selector[selector.length - 1]; var right = newQuery(); var subject = newQuery(); var _descendant = newQuery(); var _ancestor = newQuery(); // set up the root compound q compound.checks.push({ type: Type.COMPOUND_SPLIT, left: left, right: right, subject: subject }); // populate the subject and replace the q at the old spot (within left) with TRUE subject.checks = query.checks; // take the checks from the left query.checks = [{ type: Type.TRUE }]; // checks under left refs the subject implicitly // set up the right q _ancestor.checks.push({ type: Type.TRUE }); // ancestor implicitly refs the subject right.checks.push({ type: Type.ANCESTOR, // type is swapped on right side queries ancestor: _ancestor, descendant: _descendant // empty for now }); replaceLastQuery(selector, left, compound); // update the ref since we moved things around for `query` selector.currentSubject = subject; selector.compoundCount++; return _descendant; // now populating the right side's descendant } else { // ancestor query // info for parent query var _ancestor2 = newQuery(); var _descendant2 = newQuery(); var adQChecks = [{ type: Type.ANCESTOR, ancestor: _ancestor2, descendant: _descendant2 }]; // the parent-child query takes the place of the query previously being populated _ancestor2.checks = query.checks; // the previous query contains the checks for the parent query.checks = adQChecks; // pc query takes over selector.compoundCount++; return _descendant2; // we're now populating the child } } }, { name: 'subject', modifier: true, regex: tokens.subject, populate: function populate(selector, query) { if (selector.currentSubject != null && selector.currentSubject !== query) { warn('Redefinition of subject in selector `' + selector.toString() + '`'); return false; } selector.currentSubject = query; var topQ = selector[selector.length - 1]; var topChk = topQ.checks[0]; var topType = topChk == null ? null : topChk.type; if (topType === Type.DIRECTED_EDGE) { // directed edge with subject on the target // change to target node check topChk.type = Type.NODE_TARGET; } else if (topType === Type.UNDIRECTED_EDGE) { // undirected edge with subject on the second node // change to neighbor check topChk.type = Type.NODE_NEIGHBOR; topChk.node = topChk.nodes[1]; // second node is subject topChk.neighbor = topChk.nodes[0]; // clean up unused fields for new type topChk.nodes = null; } } }]; exprs.forEach(function (e) { return e.regexObj = new RegExp('^' + e.regex); }); /** * Of all the expressions, find the first match in the remaining text. * @param {string} remaining The remaining text to parse * @returns The matched expression and the newly remaining text `{ expr, match, name, remaining }` */ var consumeExpr = function consumeExpr(remaining) { var expr; var match; var name; for (var j = 0; j < exprs.length; j++) { var e = exprs[j]; var n = e.name; var m = remaining.match(e.regexObj); if (m != null) { match = m; expr = e; name = n; var consumed = m[0]; remaining = remaining.substring(consumed.length); break; // we've consumed one expr, so we can return now } } return { expr: expr, match: match, name: name, remaining: remaining }; }; /** * Consume all the leading whitespace * @param {string} remaining The text to consume * @returns The text with the leading whitespace removed */ var consumeWhitespace = function consumeWhitespace(remaining) { var match = remaining.match(/^\s+/); if (match) { var consumed = match[0]; remaining = remaining.substring(consumed.length); } return remaining; }; /** * Parse the string and store the parsed representation in the Selector. * @param {string} selector The selector string * @returns `true` if the selector was successfully parsed, `false` otherwise */ var parse = function parse(selector) { var self = this; var remaining = self.inputText = selector; var currentQuery = self[0] = newQuery(); self.length = 1; remaining = consumeWhitespace(remaining); // get rid of leading whitespace for (;;) { var exprInfo = consumeExpr(remaining); if (exprInfo.expr == null) { warn('The selector `' + selector + '`is invalid'); return false; } else { var args = exprInfo.match.slice(1); // let the token populate the selector object in currentQuery var ret = exprInfo.expr.populate(self, currentQuery, args); if (ret === false) { return false; // exit if population failed } else if (ret != null) { currentQuery = ret; // change the current query to be filled if the expr specifies } } remaining = exprInfo.remaining; // we're done when there's nothing left to parse if (remaining.match(/^\s*$/)) { break; } } var lastQ = self[self.length - 1]; if (self.currentSubject != null) { lastQ.subject = self.currentSubject; } lastQ.edgeCount = self.edgeCount; lastQ.compoundCount = self.compoundCount; for (var i = 0; i < self.length; i++) { var q = self[i]; // in future, this could potentially be allowed if there were operator precedence and detection of invalid combinations if (q.compoundCount > 0 && q.edgeCount > 0) { warn('The selector `' + selector + '` is invalid because it uses both a compound selector and an edge selector'); return false; } if (q.edgeCount > 1) { warn('The selector `' + selector + '` is invalid because it uses multiple edge selectors'); return false; } else if (q.edgeCount === 1) { warn('The selector `' + selector + '` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.'); } } return true; // success }; /** * Get the selector represented as a string. This value uses default formatting, * so things like spacing may differ from the input text passed to the constructor. * @returns {string} The selector string */ var toString = function toString() { if (this.toStringCache != null) { return this.toStringCache; } var clean = function clean(obj) { if (obj == null) { return ''; } else { return obj; } }; var cleanVal = function cleanVal(val) { if (string(val)) { return '"' + val + '"'; } else { return clean(val); } }; var space = function space(val) { return ' ' + val + ' '; }; var checkToString = function checkToString(check, subject) { var type = check.type, value = check.value; switch (type) { case Type.GROUP: { var group = clean(value); return group.substring(0, group.length - 1); } case Type.DATA_COMPARE: { var field = check.field, operator = check.operator; return '[' + field + space(clean(operator)) + cleanVal(value) + ']'; } case Type.DATA_BOOL: { var _operator = check.operator, _field = check.field; return '[' + clean(_operator) + _field + ']'; } case Type.DATA_EXIST: { var _field2 = check.field; return '[' + _field2 + ']'; } case Type.META_COMPARE: { var _operator2 = check.operator, _field3 = check.field; return '[[' + _field3 + space(clean(_operator2)) + cleanVal(value) + ']]'; } case Type.STATE: { return value; } case Type.ID: { return '#' + value; } case Type.CLASS: { return '.' + value; } case Type.PARENT: case Type.CHILD: { return queryToString(check.parent, subject) + space('>') + queryToString(check.child, subject); } case Type.ANCESTOR: case Type.DESCENDANT: { return queryToString(check.ancestor, subject) + ' ' + queryToString(check.descendant, subject); } case Type.COMPOUND_SPLIT: { var lhs = queryToString(check.left, subject); var sub = queryToString(check.subject, subject); var rhs = queryToString(check.right, subject); return lhs + (lhs.length > 0 ? ' ' : '') + sub + rhs; } case Type.TRUE: { return ''; } } }; var queryToString = function queryToString(query, subject) { return query.checks.reduce(function (str, chk, i) { return str + (subject === query && i === 0 ? '$' : '') + checkToString(chk, subject); }, ''); }; var str = ''; for (var i = 0; i < this.length; i++) { var query = this[i]; str += queryToString(query, query.subject); if (this.length > 1 && i < this.length - 1) { str += ', '; } } this.toStringCache = str; return str; }; var parse$1 = { parse: parse, toString: toString }; var valCmp = function valCmp(fieldVal, operator, value) { var matches; var isFieldStr = string(fieldVal); var isFieldNum = number$1(fieldVal); var isValStr = string(value); var fieldStr, valStr; var caseInsensitive = false; var notExpr = false; var isIneqCmp = false; if (operator.indexOf('!') >= 0) { operator = operator.replace('!', ''); notExpr = true; } if (operator.indexOf('@') >= 0) { operator = operator.replace('@', ''); caseInsensitive = true; } if (isFieldStr || isValStr || caseInsensitive) { fieldStr = !isFieldStr && !isFieldNum ? '' : '' + fieldVal; valStr = '' + value; } // if we're doing a case insensitive comparison, then we're using a STRING comparison // even if we're comparing numbers if (caseInsensitive) { fieldVal = fieldStr = fieldStr.toLowerCase(); value = valStr = valStr.toLowerCase(); } switch (operator) { case '*=': matches = fieldStr.indexOf(valStr) >= 0; break; case '$=': matches = fieldStr.indexOf(valStr, fieldStr.length - valStr.length) >= 0; break; case '^=': matches = fieldStr.indexOf(valStr) === 0; break; case '=': matches = fieldVal === value; break; case '>': isIneqCmp = true; matches = fieldVal > value; break; case '>=': isIneqCmp = true; matches = fieldVal >= value; break; case '<': isIneqCmp = true; matches = fieldVal < value; break; case '<=': isIneqCmp = true; matches = fieldVal <= value; break; default: matches = false; break; } // apply the not op, but null vals for inequalities should always stay non-matching if (notExpr && (fieldVal != null || !isIneqCmp)) { matches = !matches; } return matches; }; var boolCmp = function boolCmp(fieldVal, operator) { switch (operator) { case '?': return fieldVal ? true : false; case '!': return fieldVal ? false : true; case '^': return fieldVal === undefined; } }; var existCmp = function existCmp(fieldVal) { return fieldVal !== undefined; }; var data$1 = function data(ele, field) { return ele.data(field); }; var meta = function meta(ele, field) { return ele[field](); }; /** A lookup of `match(check, ele)` functions by `Type` int */ var match = []; /** * Returns whether the query matches for the element * @param query The `{ type, value, ... }` query object * @param ele The element to compare against */ var matches$1 = function matches(query, ele) { return query.checks.every(function (chk) { return match[chk.type](chk, ele); }); }; match[Type.GROUP] = function (check, ele) { var group = check.value; return group === '*' || group === ele.group(); }; match[Type.STATE] = function (check, ele) { var stateSelector = check.value; return stateSelectorMatches(stateSelector, ele); }; match[Type.ID] = function (check, ele) { var id = check.value; return ele.id() === id; }; match[Type.CLASS] = function (check, ele) { var cls = check.value; return ele.hasClass(cls); }; match[Type.META_COMPARE] = function (check, ele) { var field = check.field, operator = check.operator, value = check.value; return valCmp(meta(ele, field), operator, value); }; match[Type.DATA_COMPARE] = function (check, ele) { var field = check.field, operator = check.operator, value = check.value; return valCmp(data$1(ele, field), operator, value); }; match[Type.DATA_BOOL] = function (check, ele) { var field = check.field, operator = check.operator; return boolCmp(data$1(ele, field), operator); }; match[Type.DATA_EXIST] = function (check, ele) { var field = check.field; check.operator; return existCmp(data$1(ele, field)); }; match[Type.UNDIRECTED_EDGE] = function (check, ele) { var qA = check.nodes[0]; var qB = check.nodes[1]; var src = ele.source(); var tgt = ele.target(); return matches$1(qA, src) && matches$1(qB, tgt) || matches$1(qB, src) && matches$1(qA, tgt); }; match[Type.NODE_NEIGHBOR] = function (check, ele) { return matches$1(check.node, ele) && ele.neighborhood().some(function (n) { return n.isNode() && matches$1(check.neighbor, n); }); }; match[Type.DIRECTED_EDGE] = function (check, ele) { return matches$1(check.source, ele.source()) && matches$1(check.target, ele.target()); }; match[Type.NODE_SOURCE] = function (check, ele) { return matches$1(check.source, ele) && ele.outgoers().some(function (n) { return n.isNode() && matches$1(check.target, n); }); }; match[Type.NODE_TARGET] = function (check, ele) { return matches$1(check.target, ele) && ele.incomers().some(function (n) { return n.isNode() && matches$1(check.source, n); }); }; match[Type.CHILD] = function (check, ele) { return matches$1(check.child, ele) && matches$1(check.parent, ele.parent()); }; match[Type.PARENT] = function (check, ele) { return matches$1(check.parent, ele) && ele.children().some(function (c) { return matches$1(check.child, c); }); }; match[Type.DESCENDANT] = function (check, ele) { return matches$1(check.descendant, ele) && ele.ancestors().some(function (a) { return matches$1(check.ancestor, a); }); }; match[Type.ANCESTOR] = function (check, ele) { return matches$1(check.ancestor, ele) && ele.descendants().some(function (d) { return matches$1(check.descendant, d); }); }; match[Type.COMPOUND_SPLIT] = function (check, ele) { return matches$1(check.subject, ele) && matches$1(check.left, ele) && matches$1(check.right, ele); }; match[Type.TRUE] = function () { return true; }; match[Type.COLLECTION] = function (check, ele) { var collection = check.value; return collection.has(ele); }; match[Type.FILTER] = function (check, ele) { var filter = check.value; return filter(ele); }; var filter = function filter(collection) { var self = this; // for 1 id #foo queries, just get the element if (self.length === 1 && self[0].checks.length === 1 && self[0].checks[0].type === Type.ID) { return collection.getElementById(self[0].checks[0].value).collection(); } var selectorFunction = function selectorFunction(element) { for (var j = 0; j < self.length; j++) { var query = self[j]; if (matches$1(query, element)) { return true; } } return false; }; if (self.text() == null) { selectorFunction = function selectorFunction() { return true; }; } return collection.filter(selectorFunction); }; // filter // does selector match a single element? var matches = function matches(ele) { var self = this; for (var j = 0; j < self.length; j++) { var query = self[j]; if (matches$1(query, ele)) { return true; } } return false; }; // matches var matching = { matches: matches, filter: filter }; var Selector = function Selector(selector) { this.inputText = selector; this.currentSubject = null; this.compoundCount = 0; this.edgeCount = 0; this.length = 0; if (selector == null || string(selector) && selector.match(/^\s*$/)) ; else if (elementOrCollection(selector)) { this.addQuery({ checks: [{ type: Type.COLLECTION, value: selector.collection() }] }); } else if (fn$6(selector)) { this.addQuery({ checks: [{ type: Type.FILTER, value: selector }] }); } else if (string(selector)) { if (!this.parse(selector)) { this.invalid = true; } } else { error('A selector must be created from a string; found '); } }; var selfn = Selector.prototype; [parse$1, matching].forEach(function (p) { return extend(selfn, p); }); selfn.text = function () { return this.inputText; }; selfn.size = function () { return this.length; }; selfn.eq = function (i) { return this[i]; }; selfn.sameText = function (otherSel) { return !this.invalid && !otherSel.invalid && this.text() === otherSel.text(); }; selfn.addQuery = function (q) { this[this.length++] = q; }; selfn.selector = selfn.toString; var elesfn$g = { allAre: function allAre(selector) { var selObj = new Selector(selector); return this.every(function (ele) { return selObj.matches(ele); }); }, is: function is(selector) { var selObj = new Selector(selector); return this.some(function (ele) { return selObj.matches(ele); }); }, some: function some(fn, thisArg) { for (var i = 0; i < this.length; i++) { var ret = !thisArg ? fn(this[i], i, this) : fn.apply(thisArg, [this[i], i, this]); if (ret) { return true; } } return false; }, every: function every(fn, thisArg) { for (var i = 0; i < this.length; i++) { var ret = !thisArg ? fn(this[i], i, this) : fn.apply(thisArg, [this[i], i, this]); if (!ret) { return false; } } return true; }, same: function same(collection) { // cheap collection ref check if (this === collection) { return true; } collection = this.cy().collection(collection); var thisLength = this.length; var collectionLength = collection.length; // cheap length check if (thisLength !== collectionLength) { return false; } // cheap element ref check if (thisLength === 1) { return this[0] === collection[0]; } return this.every(function (ele) { return collection.hasElementWithId(ele.id()); }); }, anySame: function anySame(collection) { collection = this.cy().collection(collection); return this.some(function (ele) { return collection.hasElementWithId(ele.id()); }); }, allAreNeighbors: function allAreNeighbors(collection) { collection = this.cy().collection(collection); var nhood = this.neighborhood(); return collection.every(function (ele) { return nhood.hasElementWithId(ele.id()); }); }, contains: function contains(collection) { collection = this.cy().collection(collection); var self = this; return collection.every(function (ele) { return self.hasElementWithId(ele.id()); }); } }; elesfn$g.allAreNeighbours = elesfn$g.allAreNeighbors; elesfn$g.has = elesfn$g.contains; elesfn$g.equal = elesfn$g.equals = elesfn$g.same; var cache = function cache(fn, name) { return function traversalCache(arg1, arg2, arg3, arg4) { var selectorOrEles = arg1; var eles = this; var key; if (selectorOrEles == null) { key = ''; } else if (elementOrCollection(selectorOrEles) && selectorOrEles.length === 1) { key = selectorOrEles.id(); } if (eles.length === 1 && key) { var _p = eles[0]._private; var tch = _p.traversalCache = _p.traversalCache || {}; var ch = tch[name] = tch[name] || []; var hash = hashString(key); var cacheHit = ch[hash]; if (cacheHit) { return cacheHit; } else { return ch[hash] = fn.call(eles, arg1, arg2, arg3, arg4); } } else { return fn.call(eles, arg1, arg2, arg3, arg4); } }; }; var elesfn$f = { parent: function parent(selector) { var parents = []; // optimisation for single ele call if (this.length === 1) { var parent = this[0]._private.parent; if (parent) { return parent; } } for (var i = 0; i < this.length; i++) { var ele = this[i]; var _parent = ele._private.parent; if (_parent) { parents.push(_parent); } } return this.spawn(parents, true).filter(selector); }, parents: function parents(selector) { var parents = []; var eles = this.parent(); while (eles.nonempty()) { for (var i = 0; i < eles.length; i++) { var ele = eles[i]; parents.push(ele); } eles = eles.parent(); } return this.spawn(parents, true).filter(selector); }, commonAncestors: function commonAncestors(selector) { var ancestors; for (var i = 0; i < this.length; i++) { var ele = this[i]; var parents = ele.parents(); ancestors = ancestors || parents; ancestors = ancestors.intersect(parents); // current list must be common with current ele parents set } return ancestors.filter(selector); }, orphans: function orphans(selector) { return this.stdFilter(function (ele) { return ele.isOrphan(); }).filter(selector); }, nonorphans: function nonorphans(selector) { return this.stdFilter(function (ele) { return ele.isChild(); }).filter(selector); }, children: cache(function (selector) { var children = []; for (var i = 0; i < this.length; i++) { var ele = this[i]; var eleChildren = ele._private.children; for (var j = 0; j < eleChildren.length; j++) { children.push(eleChildren[j]); } } return this.spawn(children, true).filter(selector); }, 'children'), siblings: function siblings(selector) { return this.parent().children().not(this).filter(selector); }, isParent: function isParent() { var ele = this[0]; if (ele) { return ele.isNode() && ele._private.children.length !== 0; } }, isChildless: function isChildless() { var ele = this[0]; if (ele) { return ele.isNode() && ele._private.children.length === 0; } }, isChild: function isChild() { var ele = this[0]; if (ele) { return ele.isNode() && ele._private.parent != null; } }, isOrphan: function isOrphan() { var ele = this[0]; if (ele) { return ele.isNode() && ele._private.parent == null; } }, descendants: function descendants(selector) { var elements = []; function add(eles) { for (var i = 0; i < eles.length; i++) { var ele = eles[i]; elements.push(ele); if (ele.children().nonempty()) { add(ele.children()); } } } add(this.children()); return this.spawn(elements, true).filter(selector); } }; function forEachCompound(eles, fn, includeSelf, recursiveStep) { var q = []; var did = new Set$1(); var cy = eles.cy(); var hasCompounds = cy.hasCompoundNodes(); for (var i = 0; i < eles.length; i++) { var ele = eles[i]; if (includeSelf) { q.push(ele); } else if (hasCompounds) { recursiveStep(q, did, ele); } } while (q.length > 0) { var _ele = q.shift(); fn(_ele); did.add(_ele.id()); if (hasCompounds) { recursiveStep(q, did, _ele); } } return eles; } function addChildren(q, did, ele) { if (ele.isParent()) { var children = ele._private.children; for (var i = 0; i < children.length; i++) { var child = children[i]; if (!did.has(child.id())) { q.push(child); } } } } // very efficient version of eles.add( eles.descendants() ).forEach() // for internal use elesfn$f.forEachDown = function (fn) { var includeSelf = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; return forEachCompound(this, fn, includeSelf, addChildren); }; function addParent(q, did, ele) { if (ele.isChild()) { var parent = ele._private.parent; if (!did.has(parent.id())) { q.push(parent); } } } elesfn$f.forEachUp = function (fn) { var includeSelf = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; return forEachCompound(this, fn, includeSelf, addParent); }; function addParentAndChildren(q, did, ele) { addParent(q, did, ele); addChildren(q, did, ele); } elesfn$f.forEachUpAndDown = function (fn) { var includeSelf = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; return forEachCompound(this, fn, includeSelf, addParentAndChildren); }; // aliases elesfn$f.ancestors = elesfn$f.parents; var fn$5, elesfn$e; fn$5 = elesfn$e = { data: define.data({ field: 'data', bindingEvent: 'data', allowBinding: true, allowSetting: true, settingEvent: 'data', settingTriggersEvent: true, triggerFnName: 'trigger', allowGetting: true, immutableKeys: { 'id': true, 'source': true, 'target': true, 'parent': true }, updateStyle: true }), removeData: define.removeData({ field: 'data', event: 'data', triggerFnName: 'trigger', triggerEvent: true, immutableKeys: { 'id': true, 'source': true, 'target': true, 'parent': true }, updateStyle: true }), scratch: define.data({ field: 'scratch', bindingEvent: 'scratch', allowBinding: true, allowSetting: true, settingEvent: 'scratch', settingTriggersEvent: true, triggerFnName: 'trigger', allowGetting: true, updateStyle: true }), removeScratch: define.removeData({ field: 'scratch', event: 'scratch', triggerFnName: 'trigger', triggerEvent: true, updateStyle: true }), rscratch: define.data({ field: 'rscratch', allowBinding: false, allowSetting: true, settingTriggersEvent: false, allowGetting: true }), removeRscratch: define.removeData({ field: 'rscratch', triggerEvent: false }), id: function id() { var ele = this[0]; if (ele) { return ele._private.data.id; } } }; // aliases fn$5.attr = fn$5.data; fn$5.removeAttr = fn$5.removeData; var data = elesfn$e; var elesfn$d = {}; function defineDegreeFunction(callback) { return function (includeLoops) { var self = this; if (includeLoops === undefined) { includeLoops = true; } if (self.length === 0) { return; } if (self.isNode() && !self.removed()) { var degree = 0; var node = self[0]; var connectedEdges = node._private.edges; for (var i = 0; i < connectedEdges.length; i++) { var edge = connectedEdges[i]; if (!includeLoops && edge.isLoop()) { continue; } degree += callback(node, edge); } return degree; } else { return; } }; } extend(elesfn$d, { degree: defineDegreeFunction(function (node, edge) { if (edge.source().same(edge.target())) { return 2; } else { return 1; } }), indegree: defineDegreeFunction(function (node, edge) { if (edge.target().same(node)) { return 1; } else { return 0; } }), outdegree: defineDegreeFunction(function (node, edge) { if (edge.source().same(node)) { return 1; } else { return 0; } }) }); function defineDegreeBoundsFunction(degreeFn, callback) { return function (includeLoops) { var ret; var nodes = this.nodes(); for (var i = 0; i < nodes.length; i++) { var ele = nodes[i]; var degree = ele[degreeFn](includeLoops); if (degree !== undefined && (ret === undefined || callback(degree, ret))) { ret = degree; } } return ret; }; } extend(elesfn$d, { minDegree: defineDegreeBoundsFunction('degree', function (degree, min) { return degree < min; }), maxDegree: defineDegreeBoundsFunction('degree', function (degree, max) { return degree > max; }), minIndegree: defineDegreeBoundsFunction('indegree', function (degree, min) { return degree < min; }), maxIndegree: defineDegreeBoundsFunction('indegree', function (degree, max) { return degree > max; }), minOutdegree: defineDegreeBoundsFunction('outdegree', function (degree, min) { return degree < min; }), maxOutdegree: defineDegreeBoundsFunction('outdegree', function (degree, max) { return degree > max; }) }); extend(elesfn$d, { totalDegree: function totalDegree(includeLoops) { var total = 0; var nodes = this.nodes(); for (var i = 0; i < nodes.length; i++) { total += nodes[i].degree(includeLoops); } return total; } }); var fn$4, elesfn$c; var beforePositionSet = function beforePositionSet(eles, newPos, silent) { for (var i = 0; i < eles.length; i++) { var ele = eles[i]; if (!ele.locked()) { var oldPos = ele._private.position; var delta = { x: newPos.x != null ? newPos.x - oldPos.x : 0, y: newPos.y != null ? newPos.y - oldPos.y : 0 }; if (ele.isParent() && !(delta.x === 0 && delta.y === 0)) { ele.children().shift(delta, silent); } ele.dirtyBoundingBoxCache(); } } }; var positionDef = { field: 'position', bindingEvent: 'position', allowBinding: true, allowSetting: true, settingEvent: 'position', settingTriggersEvent: true, triggerFnName: 'emitAndNotify', allowGetting: true, validKeys: ['x', 'y'], beforeGet: function beforeGet(ele) { ele.updateCompoundBounds(); }, beforeSet: function beforeSet(eles, newPos) { beforePositionSet(eles, newPos, false); }, onSet: function onSet(eles) { eles.dirtyCompoundBoundsCache(); }, canSet: function canSet(ele) { return !ele.locked(); } }; fn$4 = elesfn$c = { position: define.data(positionDef), // position but no notification to renderer silentPosition: define.data(extend({}, positionDef, { allowBinding: false, allowSetting: true, settingTriggersEvent: false, allowGetting: false, beforeSet: function beforeSet(eles, newPos) { beforePositionSet(eles, newPos, true); }, onSet: function onSet(eles) { eles.dirtyCompoundBoundsCache(); } })), positions: function positions(pos, silent) { if (plainObject(pos)) { if (silent) { this.silentPosition(pos); } else { this.position(pos); } } else if (fn$6(pos)) { var _fn = pos; var cy = this.cy(); cy.startBatch(); for (var i = 0; i < this.length; i++) { var ele = this[i]; var _pos = void 0; if (_pos = _fn(ele, i)) { if (silent) { ele.silentPosition(_pos); } else { ele.position(_pos); } } } cy.endBatch(); } return this; // chaining }, silentPositions: function silentPositions(pos) { return this.positions(pos, true); }, shift: function shift(dim, val, silent) { var delta; if (plainObject(dim)) { delta = { x: number$1(dim.x) ? dim.x : 0, y: number$1(dim.y) ? dim.y : 0 }; silent = val; } else if (string(dim) && number$1(val)) { delta = { x: 0, y: 0 }; delta[dim] = val; } if (delta != null) { var cy = this.cy(); cy.startBatch(); for (var i = 0; i < this.length; i++) { var ele = this[i]; // exclude any node that is a descendant of the calling collection if (cy.hasCompoundNodes() && ele.isChild() && ele.ancestors().anySame(this)) { continue; } var pos = ele.position(); var newPos = { x: pos.x + delta.x, y: pos.y + delta.y }; if (silent) { ele.silentPosition(newPos); } else { ele.position(newPos); } } cy.endBatch(); } return this; }, silentShift: function silentShift(dim, val) { if (plainObject(dim)) { this.shift(dim, true); } else if (string(dim) && number$1(val)) { this.shift(dim, val, true); } return this; }, // get/set the rendered (i.e. on screen) positon of the element renderedPosition: function renderedPosition(dim, val) { var ele = this[0]; var cy = this.cy(); var zoom = cy.zoom(); var pan = cy.pan(); var rpos = plainObject(dim) ? dim : undefined; var setting = rpos !== undefined || val !== undefined && string(dim); if (ele && ele.isNode()) { // must have an element and must be a node to return position if (setting) { for (var i = 0; i < this.length; i++) { var _ele = this[i]; if (val !== undefined) { // set one dimension _ele.position(dim, (val - pan[dim]) / zoom); } else if (rpos !== undefined) { // set whole position _ele.position(renderedToModelPosition(rpos, zoom, pan)); } } } else { // getting var pos = ele.position(); rpos = modelToRenderedPosition(pos, zoom, pan); if (dim === undefined) { // then return the whole rendered position return rpos; } else { // then return the specified dimension return rpos[dim]; } } } else if (!setting) { return undefined; // for empty collection case } return this; // chaining }, // get/set the position relative to the parent relativePosition: function relativePosition(dim, val) { var ele = this[0]; var cy = this.cy(); var ppos = plainObject(dim) ? dim : undefined; var setting = ppos !== undefined || val !== undefined && string(dim); var hasCompoundNodes = cy.hasCompoundNodes(); if (ele && ele.isNode()) { // must have an element and must be a node to return position if (setting) { for (var i = 0; i < this.length; i++) { var _ele2 = this[i]; var parent = hasCompoundNodes ? _ele2.parent() : null; var hasParent = parent && parent.length > 0; var relativeToParent = hasParent; if (hasParent) { parent = parent[0]; } var origin = relativeToParent ? parent.position() : { x: 0, y: 0 }; if (val !== undefined) { // set one dimension _ele2.position(dim, val + origin[dim]); } else if (ppos !== undefined) { // set whole position _ele2.position({ x: ppos.x + origin.x, y: ppos.y + origin.y }); } } } else { // getting var pos = ele.position(); var _parent = hasCompoundNodes ? ele.parent() : null; var _hasParent = _parent && _parent.length > 0; var _relativeToParent = _hasParent; if (_hasParent) { _parent = _parent[0]; } var _origin = _relativeToParent ? _parent.position() : { x: 0, y: 0 }; ppos = { x: pos.x - _origin.x, y: pos.y - _origin.y }; if (dim === undefined) { // then return the whole rendered position return ppos; } else { // then return the specified dimension return ppos[dim]; } } } else if (!setting) { return undefined; // for empty collection case } return this; // chaining } }; // aliases fn$4.modelPosition = fn$4.point = fn$4.position; fn$4.modelPositions = fn$4.points = fn$4.positions; fn$4.renderedPoint = fn$4.renderedPosition; fn$4.relativePoint = fn$4.relativePosition; var position = elesfn$c; var fn$3, elesfn$b; fn$3 = elesfn$b = {}; elesfn$b.renderedBoundingBox = function (options) { var bb = this.boundingBox(options); var cy = this.cy(); var zoom = cy.zoom(); var pan = cy.pan(); var x1 = bb.x1 * zoom + pan.x; var x2 = bb.x2 * zoom + pan.x; var y1 = bb.y1 * zoom + pan.y; var y2 = bb.y2 * zoom + pan.y; return { x1: x1, x2: x2, y1: y1, y2: y2, w: x2 - x1, h: y2 - y1 }; }; elesfn$b.dirtyCompoundBoundsCache = function () { var silent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; var cy = this.cy(); if (!cy.styleEnabled() || !cy.hasCompoundNodes()) { return this; } this.forEachUp(function (ele) { if (ele.isParent()) { var _p = ele._private; _p.compoundBoundsClean = false; _p.bbCache = null; if (!silent) { ele.emitAndNotify('bounds'); } } }); return this; }; elesfn$b.updateCompoundBounds = function () { var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; var cy = this.cy(); // not possible to do on non-compound graphs or with the style disabled if (!cy.styleEnabled() || !cy.hasCompoundNodes()) { return this; } // save cycles when batching -- but bounds will be stale (or not exist yet) if (!force && cy.batching()) { return this; } function update(parent) { if (!parent.isParent()) { return; } var _p = parent._private; var children = parent.children(); var includeLabels = parent.pstyle('compound-sizing-wrt-labels').value === 'include'; var min = { width: { val: parent.pstyle('min-width').pfValue, left: parent.pstyle('min-width-bias-left'), right: parent.pstyle('min-width-bias-right') }, height: { val: parent.pstyle('min-height').pfValue, top: parent.pstyle('min-height-bias-top'), bottom: parent.pstyle('min-height-bias-bottom') } }; var bb = children.boundingBox({ includeLabels: includeLabels, includeOverlays: false, // updating the compound bounds happens outside of the regular // cache cycle (i.e. before fired events) useCache: false }); var pos = _p.position; // if children take up zero area then keep position and fall back on stylesheet w/h if (bb.w === 0 || bb.h === 0) { bb = { w: parent.pstyle('width').pfValue, h: parent.pstyle('height').pfValue }; bb.x1 = pos.x - bb.w / 2; bb.x2 = pos.x + bb.w / 2; bb.y1 = pos.y - bb.h / 2; bb.y2 = pos.y + bb.h / 2; } function computeBiasValues(propDiff, propBias, propBiasComplement) { var biasDiff = 0; var biasComplementDiff = 0; var biasTotal = propBias + propBiasComplement; if (propDiff > 0 && biasTotal > 0) { biasDiff = propBias / biasTotal * propDiff; biasComplementDiff = propBiasComplement / biasTotal * propDiff; } return { biasDiff: biasDiff, biasComplementDiff: biasComplementDiff }; } function computePaddingValues(width, height, paddingObject, relativeTo) { // Assuming percentage is number from 0 to 1 if (paddingObject.units === '%') { switch (relativeTo) { case 'width': return width > 0 ? paddingObject.pfValue * width : 0; case 'height': return height > 0 ? paddingObject.pfValue * height : 0; case 'average': return width > 0 && height > 0 ? paddingObject.pfValue * (width + height) / 2 : 0; case 'min': return width > 0 && height > 0 ? width > height ? paddingObject.pfValue * height : paddingObject.pfValue * width : 0; case 'max': return width > 0 && height > 0 ? width > height ? paddingObject.pfValue * width : paddingObject.pfValue * height : 0; default: return 0; } } else if (paddingObject.units === 'px') { return paddingObject.pfValue; } else { return 0; } } var leftVal = min.width.left.value; if (min.width.left.units === 'px' && min.width.val > 0) { leftVal = leftVal * 100 / min.width.val; } var rightVal = min.width.right.value; if (min.width.right.units === 'px' && min.width.val > 0) { rightVal = rightVal * 100 / min.width.val; } var topVal = min.height.top.value; if (min.height.top.units === 'px' && min.height.val > 0) { topVal = topVal * 100 / min.height.val; } var bottomVal = min.height.bottom.value; if (min.height.bottom.units === 'px' && min.height.val > 0) { bottomVal = bottomVal * 100 / min.height.val; } var widthBiasDiffs = computeBiasValues(min.width.val - bb.w, leftVal, rightVal); var diffLeft = widthBiasDiffs.biasDiff; var diffRight = widthBiasDiffs.biasComplementDiff; var heightBiasDiffs = computeBiasValues(min.height.val - bb.h, topVal, bottomVal); var diffTop = heightBiasDiffs.biasDiff; var diffBottom = heightBiasDiffs.biasComplementDiff; _p.autoPadding = computePaddingValues(bb.w, bb.h, parent.pstyle('padding'), parent.pstyle('padding-relative-to').value); _p.autoWidth = Math.max(bb.w, min.width.val); pos.x = (-diffLeft + bb.x1 + bb.x2 + diffRight) / 2; _p.autoHeight = Math.max(bb.h, min.height.val); pos.y = (-diffTop + bb.y1 + bb.y2 + diffBottom) / 2; } for (var i = 0; i < this.length; i++) { var ele = this[i]; var _p = ele._private; if (!_p.compoundBoundsClean || force) { update(ele); if (!cy.batching()) { _p.compoundBoundsClean = true; } } } return this; }; var noninf = function noninf(x) { if (x === Infinity || x === -Infinity) { return 0; } return x; }; var updateBounds = function updateBounds(b, x1, y1, x2, y2) { // don't update with zero area boxes if (x2 - x1 === 0 || y2 - y1 === 0) { return; } // don't update with null dim if (x1 == null || y1 == null || x2 == null || y2 == null) { return; } b.x1 = x1 < b.x1 ? x1 : b.x1; b.x2 = x2 > b.x2 ? x2 : b.x2; b.y1 = y1 < b.y1 ? y1 : b.y1; b.y2 = y2 > b.y2 ? y2 : b.y2; b.w = b.x2 - b.x1; b.h = b.y2 - b.y1; }; var updateBoundsFromBox = function updateBoundsFromBox(b, b2) { if (b2 == null) { return b; } return updateBounds(b, b2.x1, b2.y1, b2.x2, b2.y2); }; var prefixedProperty = function prefixedProperty(obj, field, prefix) { return getPrefixedProperty(obj, field, prefix); }; var updateBoundsFromArrow = function updateBoundsFromArrow(bounds, ele, prefix) { if (ele.cy().headless()) { return; } var _p = ele._private; var rstyle = _p.rstyle; var halfArW = rstyle.arrowWidth / 2; var arrowType = ele.pstyle(prefix + '-arrow-shape').value; var x; var y; if (arrowType !== 'none') { if (prefix === 'source') { x = rstyle.srcX; y = rstyle.srcY; } else if (prefix === 'target') { x = rstyle.tgtX; y = rstyle.tgtY; } else { x = rstyle.midX; y = rstyle.midY; } // always store the individual arrow bounds var bbs = _p.arrowBounds = _p.arrowBounds || {}; var bb = bbs[prefix] = bbs[prefix] || {}; bb.x1 = x - halfArW; bb.y1 = y - halfArW; bb.x2 = x + halfArW; bb.y2 = y + halfArW; bb.w = bb.x2 - bb.x1; bb.h = bb.y2 - bb.y1; expandBoundingBox(bb, 1); updateBounds(bounds, bb.x1, bb.y1, bb.x2, bb.y2); } }; var updateBoundsFromLabel = function updateBoundsFromLabel(bounds, ele, prefix) { if (ele.cy().headless()) { return; } var prefixDash; if (prefix) { prefixDash = prefix + '-'; } else { prefixDash = ''; } var _p = ele._private; var rstyle = _p.rstyle; var label = ele.pstyle(prefixDash + 'label').strValue; if (label) { var halign = ele.pstyle('text-halign'); var valign = ele.pstyle('text-valign'); var labelWidth = prefixedProperty(rstyle, 'labelWidth', prefix); var labelHeight = prefixedProperty(rstyle, 'labelHeight', prefix); var labelX = prefixedProperty(rstyle, 'labelX', prefix); var labelY = prefixedProperty(rstyle, 'labelY', prefix); var marginX = ele.pstyle(prefixDash + 'text-margin-x').pfValue; var marginY = ele.pstyle(prefixDash + 'text-margin-y').pfValue; var isEdge = ele.isEdge(); var rotation = ele.pstyle(prefixDash + 'text-rotation'); var outlineWidth = ele.pstyle('text-outline-width').pfValue; var borderWidth = ele.pstyle('text-border-width').pfValue; var halfBorderWidth = borderWidth / 2; var padding = ele.pstyle('text-background-padding').pfValue; var marginOfError = 2; // expand to work around browser dimension inaccuracies var lh = labelHeight; var lw = labelWidth; var lw_2 = lw / 2; var lh_2 = lh / 2; var lx1, lx2, ly1, ly2; if (isEdge) { lx1 = labelX - lw_2; lx2 = labelX + lw_2; ly1 = labelY - lh_2; ly2 = labelY + lh_2; } else { switch (halign.value) { case 'left': lx1 = labelX - lw; lx2 = labelX; break; case 'center': lx1 = labelX - lw_2; lx2 = labelX + lw_2; break; case 'right': lx1 = labelX; lx2 = labelX + lw; break; } switch (valign.value) { case 'top': ly1 = labelY - lh; ly2 = labelY; break; case 'center': ly1 = labelY - lh_2; ly2 = labelY + lh_2; break; case 'bottom': ly1 = labelY; ly2 = labelY + lh; break; } } // shift by margin and expand by outline and border lx1 += marginX - Math.max(outlineWidth, halfBorderWidth) - padding - marginOfError; lx2 += marginX + Math.max(outlineWidth, halfBorderWidth) + padding + marginOfError; ly1 += marginY - Math.max(outlineWidth, halfBorderWidth) - padding - marginOfError; ly2 += marginY + Math.max(outlineWidth, halfBorderWidth) + padding + marginOfError; // always store the unrotated label bounds separately var bbPrefix = prefix || 'main'; var bbs = _p.labelBounds; var bb = bbs[bbPrefix] = bbs[bbPrefix] || {}; bb.x1 = lx1; bb.y1 = ly1; bb.x2 = lx2; bb.y2 = ly2; bb.w = lx2 - lx1; bb.h = ly2 - ly1; var isAutorotate = isEdge && rotation.strValue === 'autorotate'; var isPfValue = rotation.pfValue != null && rotation.pfValue !== 0; if (isAutorotate || isPfValue) { var theta = isAutorotate ? prefixedProperty(_p.rstyle, 'labelAngle', prefix) : rotation.pfValue; var cos = Math.cos(theta); var sin = Math.sin(theta); // rotation point (default value for center-center) var xo = (lx1 + lx2) / 2; var yo = (ly1 + ly2) / 2; if (!isEdge) { switch (halign.value) { case 'left': xo = lx2; break; case 'right': xo = lx1; break; } switch (valign.value) { case 'top': yo = ly2; break; case 'bottom': yo = ly1; break; } } var rotate = function rotate(x, y) { x = x - xo; y = y - yo; return { x: x * cos - y * sin + xo, y: x * sin + y * cos + yo }; }; var px1y1 = rotate(lx1, ly1); var px1y2 = rotate(lx1, ly2); var px2y1 = rotate(lx2, ly1); var px2y2 = rotate(lx2, ly2); lx1 = Math.min(px1y1.x, px1y2.x, px2y1.x, px2y2.x); lx2 = Math.max(px1y1.x, px1y2.x, px2y1.x, px2y2.x); ly1 = Math.min(px1y1.y, px1y2.y, px2y1.y, px2y2.y); ly2 = Math.max(px1y1.y, px1y2.y, px2y1.y, px2y2.y); } var bbPrefixRot = bbPrefix + 'Rot'; var bbRot = bbs[bbPrefixRot] = bbs[bbPrefixRot] || {}; bbRot.x1 = lx1; bbRot.y1 = ly1; bbRot.x2 = lx2; bbRot.y2 = ly2; bbRot.w = lx2 - lx1; bbRot.h = ly2 - ly1; updateBounds(bounds, lx1, ly1, lx2, ly2); updateBounds(_p.labelBounds.all, lx1, ly1, lx2, ly2); } return bounds; }; // get the bounding box of the elements (in raw model position) var boundingBoxImpl = function boundingBoxImpl(ele, options) { var cy = ele._private.cy; var styleEnabled = cy.styleEnabled(); var headless = cy.headless(); var bounds = makeBoundingBox(); var _p = ele._private; var isNode = ele.isNode(); var isEdge = ele.isEdge(); var ex1, ex2, ey1, ey2; // extrema of body / lines var x, y; // node pos var rstyle = _p.rstyle; var manualExpansion = isNode && styleEnabled ? ele.pstyle('bounds-expansion').pfValue : [0]; // must use `display` prop only, as reading `compound.width()` causes recursion // (other factors like width values will be considered later in this function anyway) var isDisplayed = function isDisplayed(ele) { return ele.pstyle('display').value !== 'none'; }; var displayed = !styleEnabled || isDisplayed(ele) // must take into account connected nodes b/c of implicit edge hiding on display:none node && (!isEdge || isDisplayed(ele.source()) && isDisplayed(ele.target())); if (displayed) { // displayed suffices, since we will find zero area eles anyway var overlayOpacity = 0; var overlayPadding = 0; if (styleEnabled && options.includeOverlays) { overlayOpacity = ele.pstyle('overlay-opacity').value; if (overlayOpacity !== 0) { overlayPadding = ele.pstyle('overlay-padding').value; } } var underlayOpacity = 0; var underlayPadding = 0; if (styleEnabled && options.includeUnderlays) { underlayOpacity = ele.pstyle('underlay-opacity').value; if (underlayOpacity !== 0) { underlayPadding = ele.pstyle('underlay-padding').value; } } var padding = Math.max(overlayPadding, underlayPadding); var w = 0; var wHalf = 0; if (styleEnabled) { w = ele.pstyle('width').pfValue; wHalf = w / 2; } if (isNode && options.includeNodes) { var pos = ele.position(); x = pos.x; y = pos.y; var _w = ele.outerWidth(); var halfW = _w / 2; var h = ele.outerHeight(); var halfH = h / 2; // handle node dimensions ///////////////////////// ex1 = x - halfW; ex2 = x + halfW; ey1 = y - halfH; ey2 = y + halfH; updateBounds(bounds, ex1, ey1, ex2, ey2); } else if (isEdge && options.includeEdges) { if (styleEnabled && !headless) { var curveStyle = ele.pstyle('curve-style').strValue; // handle edge dimensions (rough box estimate) ////////////////////////////////////////////// ex1 = Math.min(rstyle.srcX, rstyle.midX, rstyle.tgtX); ex2 = Math.max(rstyle.srcX, rstyle.midX, rstyle.tgtX); ey1 = Math.min(rstyle.srcY, rstyle.midY, rstyle.tgtY); ey2 = Math.max(rstyle.srcY, rstyle.midY, rstyle.tgtY); // take into account edge width ex1 -= wHalf; ex2 += wHalf; ey1 -= wHalf; ey2 += wHalf; updateBounds(bounds, ex1, ey1, ex2, ey2); // precise edges //////////////// if (curveStyle === 'haystack') { var hpts = rstyle.haystackPts; if (hpts && hpts.length === 2) { ex1 = hpts[0].x; ey1 = hpts[0].y; ex2 = hpts[1].x; ey2 = hpts[1].y; if (ex1 > ex2) { var temp = ex1; ex1 = ex2; ex2 = temp; } if (ey1 > ey2) { var _temp = ey1; ey1 = ey2; ey2 = _temp; } updateBounds(bounds, ex1 - wHalf, ey1 - wHalf, ex2 + wHalf, ey2 + wHalf); } } else if (curveStyle === 'bezier' || curveStyle === 'unbundled-bezier' || curveStyle === 'segments' || curveStyle === 'taxi') { var pts; switch (curveStyle) { case 'bezier': case 'unbundled-bezier': pts = rstyle.bezierPts; break; case 'segments': case 'taxi': pts = rstyle.linePts; break; } if (pts != null) { for (var j = 0; j < pts.length; j++) { var pt = pts[j]; ex1 = pt.x - wHalf; ex2 = pt.x + wHalf; ey1 = pt.y - wHalf; ey2 = pt.y + wHalf; updateBounds(bounds, ex1, ey1, ex2, ey2); } } } // bezier-like or segment-like edge } else { // headless or style disabled // fallback on source and target positions ////////////////////////////////////////// var n1 = ele.source(); var n1pos = n1.position(); var n2 = ele.target(); var n2pos = n2.position(); ex1 = n1pos.x; ex2 = n2pos.x; ey1 = n1pos.y; ey2 = n2pos.y; if (ex1 > ex2) { var _temp2 = ex1; ex1 = ex2; ex2 = _temp2; } if (ey1 > ey2) { var _temp3 = ey1; ey1 = ey2; ey2 = _temp3; } // take into account edge width ex1 -= wHalf; ex2 += wHalf; ey1 -= wHalf; ey2 += wHalf; updateBounds(bounds, ex1, ey1, ex2, ey2); } // headless or style disabled } // edges // handle edge arrow size ///////////////////////// if (styleEnabled && options.includeEdges && isEdge) { updateBoundsFromArrow(bounds, ele, 'mid-source'); updateBoundsFromArrow(bounds, ele, 'mid-target'); updateBoundsFromArrow(bounds, ele, 'source'); updateBoundsFromArrow(bounds, ele, 'target'); } // ghost //////// if (styleEnabled) { var ghost = ele.pstyle('ghost').value === 'yes'; if (ghost) { var gx = ele.pstyle('ghost-offset-x').pfValue; var gy = ele.pstyle('ghost-offset-y').pfValue; updateBounds(bounds, bounds.x1 + gx, bounds.y1 + gy, bounds.x2 + gx, bounds.y2 + gy); } } // always store the body bounds separately from the labels var bbBody = _p.bodyBounds = _p.bodyBounds || {}; assignBoundingBox(bbBody, bounds); expandBoundingBoxSides(bbBody, manualExpansion); expandBoundingBox(bbBody, 1); // expand to work around browser dimension inaccuracies // overlay ////////// if (styleEnabled) { ex1 = bounds.x1; ex2 = bounds.x2; ey1 = bounds.y1; ey2 = bounds.y2; updateBounds(bounds, ex1 - padding, ey1 - padding, ex2 + padding, ey2 + padding); } // always store the body bounds separately from the labels var bbOverlay = _p.overlayBounds = _p.overlayBounds || {}; assignBoundingBox(bbOverlay, bounds); expandBoundingBoxSides(bbOverlay, manualExpansion); expandBoundingBox(bbOverlay, 1); // expand to work around browser dimension inaccuracies // handle label dimensions ////////////////////////// var bbLabels = _p.labelBounds = _p.labelBounds || {}; if (bbLabels.all != null) { clearBoundingBox(bbLabels.all); } else { bbLabels.all = makeBoundingBox(); } if (styleEnabled && options.includeLabels) { if (options.includeMainLabels) { updateBoundsFromLabel(bounds, ele, null); } if (isEdge) { if (options.includeSourceLabels) { updateBoundsFromLabel(bounds, ele, 'source'); } if (options.includeTargetLabels) { updateBoundsFromLabel(bounds, ele, 'target'); } } } // style enabled for labels } // if displayed bounds.x1 = noninf(bounds.x1); bounds.y1 = noninf(bounds.y1); bounds.x2 = noninf(bounds.x2); bounds.y2 = noninf(bounds.y2); bounds.w = noninf(bounds.x2 - bounds.x1); bounds.h = noninf(bounds.y2 - bounds.y1); if (bounds.w > 0 && bounds.h > 0 && displayed) { expandBoundingBoxSides(bounds, manualExpansion); // expand bounds by 1 because antialiasing can increase the visual/effective size by 1 on all sides expandBoundingBox(bounds, 1); } return bounds; }; var getKey = function getKey(opts) { var i = 0; var tf = function tf(val) { return (val ? 1 : 0) << i++; }; var key = 0; key += tf(opts.incudeNodes); key += tf(opts.includeEdges); key += tf(opts.includeLabels); key += tf(opts.includeMainLabels); key += tf(opts.includeSourceLabels); key += tf(opts.includeTargetLabels); key += tf(opts.includeOverlays); return key; }; var getBoundingBoxPosKey = function getBoundingBoxPosKey(ele) { if (ele.isEdge()) { var p1 = ele.source().position(); var p2 = ele.target().position(); var r = function r(x) { return Math.round(x); }; return hashIntsArray([r(p1.x), r(p1.y), r(p2.x), r(p2.y)]); } else { return 0; } }; var cachedBoundingBoxImpl = function cachedBoundingBoxImpl(ele, opts) { var _p = ele._private; var bb; var isEdge = ele.isEdge(); var key = opts == null ? defBbOptsKey : getKey(opts); var usingDefOpts = key === defBbOptsKey; var currPosKey = getBoundingBoxPosKey(ele); var isPosKeySame = _p.bbCachePosKey === currPosKey; var useCache = opts.useCache && isPosKeySame; var isDirty = function isDirty(ele) { return ele._private.bbCache == null || ele._private.styleDirty; }; var needRecalc = !useCache || isDirty(ele) || isEdge && isDirty(ele.source()) || isDirty(ele.target()); if (needRecalc) { if (!isPosKeySame) { ele.recalculateRenderedStyle(useCache); } bb = boundingBoxImpl(ele, defBbOpts); _p.bbCache = bb; _p.bbCachePosKey = currPosKey; } else { bb = _p.bbCache; } // not using def opts => need to build up bb from combination of sub bbs if (!usingDefOpts) { var isNode = ele.isNode(); bb = makeBoundingBox(); if (opts.includeNodes && isNode || opts.includeEdges && !isNode) { if (opts.includeOverlays) { updateBoundsFromBox(bb, _p.overlayBounds); } else { updateBoundsFromBox(bb, _p.bodyBounds); } } if (opts.includeLabels) { if (opts.includeMainLabels && (!isEdge || opts.includeSourceLabels && opts.includeTargetLabels)) { updateBoundsFromBox(bb, _p.labelBounds.all); } else { if (opts.includeMainLabels) { updateBoundsFromBox(bb, _p.labelBounds.mainRot); } if (opts.includeSourceLabels) { updateBoundsFromBox(bb, _p.labelBounds.sourceRot); } if (opts.includeTargetLabels) { updateBoundsFromBox(bb, _p.labelBounds.targetRot); } } } bb.w = bb.x2 - bb.x1; bb.h = bb.y2 - bb.y1; } return bb; }; var defBbOpts = { includeNodes: true, includeEdges: true, includeLabels: true, includeMainLabels: true, includeSourceLabels: true, includeTargetLabels: true, includeOverlays: true, includeUnderlays: true, useCache: true }; var defBbOptsKey = getKey(defBbOpts); var filledBbOpts = defaults$g(defBbOpts); elesfn$b.boundingBox = function (options) { var bounds; // the main usecase is ele.boundingBox() for a single element with no/def options // specified s.t. the cache is used, so check for this case to make it faster by // avoiding the overhead of the rest of the function if (this.length === 1 && this[0]._private.bbCache != null && !this[0]._private.styleDirty && (options === undefined || options.useCache === undefined || options.useCache === true)) { if (options === undefined) { options = defBbOpts; } else { options = filledBbOpts(options); } bounds = cachedBoundingBoxImpl(this[0], options); } else { bounds = makeBoundingBox(); options = options || defBbOpts; var opts = filledBbOpts(options); var eles = this; var cy = eles.cy(); var styleEnabled = cy.styleEnabled(); if (styleEnabled) { for (var i = 0; i < eles.length; i++) { var ele = eles[i]; var _p = ele._private; var currPosKey = getBoundingBoxPosKey(ele); var isPosKeySame = _p.bbCachePosKey === currPosKey; var useCache = opts.useCache && isPosKeySame && !_p.styleDirty; ele.recalculateRenderedStyle(useCache); } } this.updateCompoundBounds(!options.useCache); for (var _i = 0; _i < eles.length; _i++) { var _ele = eles[_i]; updateBoundsFromBox(bounds, cachedBoundingBoxImpl(_ele, opts)); } } bounds.x1 = noninf(bounds.x1); bounds.y1 = noninf(bounds.y1); bounds.x2 = noninf(bounds.x2); bounds.y2 = noninf(bounds.y2); bounds.w = noninf(bounds.x2 - bounds.x1); bounds.h = noninf(bounds.y2 - bounds.y1); return bounds; }; elesfn$b.dirtyBoundingBoxCache = function () { for (var i = 0; i < this.length; i++) { var _p = this[i]._private; _p.bbCache = null; _p.bbCachePosKey = null; _p.bodyBounds = null; _p.overlayBounds = null; _p.labelBounds.all = null; _p.labelBounds.source = null; _p.labelBounds.target = null; _p.labelBounds.main = null; _p.labelBounds.sourceRot = null; _p.labelBounds.targetRot = null; _p.labelBounds.mainRot = null; _p.arrowBounds.source = null; _p.arrowBounds.target = null; _p.arrowBounds['mid-source'] = null; _p.arrowBounds['mid-target'] = null; } this.emitAndNotify('bounds'); return this; }; // private helper to get bounding box for custom node positions // - good for perf in certain cases but currently requires dirtying the rendered style // - would be better to not modify the nodes but the nodes are read directly everywhere in the renderer... // - try to use for only things like discrete layouts where the node position would change anyway elesfn$b.boundingBoxAt = function (fn) { var nodes = this.nodes(); var cy = this.cy(); var hasCompoundNodes = cy.hasCompoundNodes(); var parents = cy.collection(); if (hasCompoundNodes) { parents = nodes.filter(function (node) { return node.isParent(); }); nodes = nodes.not(parents); } if (plainObject(fn)) { var obj = fn; fn = function fn() { return obj; }; } var storeOldPos = function storeOldPos(node, i) { return node._private.bbAtOldPos = fn(node, i); }; var getOldPos = function getOldPos(node) { return node._private.bbAtOldPos; }; cy.startBatch(); nodes.forEach(storeOldPos).silentPositions(fn); if (hasCompoundNodes) { parents.dirtyCompoundBoundsCache(); parents.dirtyBoundingBoxCache(); parents.updateCompoundBounds(true); // force update b/c we're inside a batch cycle } var bb = copyBoundingBox(this.boundingBox({ useCache: false })); nodes.silentPositions(getOldPos); if (hasCompoundNodes) { parents.dirtyCompoundBoundsCache(); parents.dirtyBoundingBoxCache(); parents.updateCompoundBounds(true); // force update b/c we're inside a batch cycle } cy.endBatch(); return bb; }; fn$3.boundingbox = fn$3.bb = fn$3.boundingBox; fn$3.renderedBoundingbox = fn$3.renderedBoundingBox; var bounds = elesfn$b; var fn$2, elesfn$a; fn$2 = elesfn$a = {}; var defineDimFns = function defineDimFns(opts) { opts.uppercaseName = capitalize(opts.name); opts.autoName = 'auto' + opts.uppercaseName; opts.labelName = 'label' + opts.uppercaseName; opts.outerName = 'outer' + opts.uppercaseName; opts.uppercaseOuterName = capitalize(opts.outerName); fn$2[opts.name] = function dimImpl() { var ele = this[0]; var _p = ele._private; var cy = _p.cy; var styleEnabled = cy._private.styleEnabled; if (ele) { if (styleEnabled) { if (ele.isParent()) { ele.updateCompoundBounds(); return _p[opts.autoName] || 0; } var d = ele.pstyle(opts.name); switch (d.strValue) { case 'label': ele.recalculateRenderedStyle(); return _p.rstyle[opts.labelName] || 0; default: return d.pfValue; } } else { return 1; } } }; fn$2['outer' + opts.uppercaseName] = function outerDimImpl() { var ele = this[0]; var _p = ele._private; var cy = _p.cy; var styleEnabled = cy._private.styleEnabled; if (ele) { if (styleEnabled) { var dim = ele[opts.name](); var border = ele.pstyle('border-width').pfValue; // n.b. 1/2 each side var padding = 2 * ele.padding(); return dim + border + padding; } else { return 1; } } }; fn$2['rendered' + opts.uppercaseName] = function renderedDimImpl() { var ele = this[0]; if (ele) { var d = ele[opts.name](); return d * this.cy().zoom(); } }; fn$2['rendered' + opts.uppercaseOuterName] = function renderedOuterDimImpl() { var ele = this[0]; if (ele) { var od = ele[opts.outerName](); return od * this.cy().zoom(); } }; }; defineDimFns({ name: 'width' }); defineDimFns({ name: 'height' }); elesfn$a.padding = function () { var ele = this[0]; var _p = ele._private; if (ele.isParent()) { ele.updateCompoundBounds(); if (_p.autoPadding !== undefined) { return _p.autoPadding; } else { return ele.pstyle('padding').pfValue; } } else { return ele.pstyle('padding').pfValue; } }; elesfn$a.paddedHeight = function () { var ele = this[0]; return ele.height() + 2 * ele.padding(); }; elesfn$a.paddedWidth = function () { var ele = this[0]; return ele.width() + 2 * ele.padding(); }; var widthHeight = elesfn$a; var ifEdge = function ifEdge(ele, getValue) { if (ele.isEdge()) { return getValue(ele); } }; var ifEdgeRenderedPosition = function ifEdgeRenderedPosition(ele, getPoint) { if (ele.isEdge()) { var cy = ele.cy(); return modelToRenderedPosition(getPoint(ele), cy.zoom(), cy.pan()); } }; var ifEdgeRenderedPositions = function ifEdgeRenderedPositions(ele, getPoints) { if (ele.isEdge()) { var cy = ele.cy(); var pan = cy.pan(); var zoom = cy.zoom(); return getPoints(ele).map(function (p) { return modelToRenderedPosition(p, zoom, pan); }); } }; var controlPoints = function controlPoints(ele) { return ele.renderer().getControlPoints(ele); }; var segmentPoints = function segmentPoints(ele) { return ele.renderer().getSegmentPoints(ele); }; var sourceEndpoint = function sourceEndpoint(ele) { return ele.renderer().getSourceEndpoint(ele); }; var targetEndpoint = function targetEndpoint(ele) { return ele.renderer().getTargetEndpoint(ele); }; var midpoint = function midpoint(ele) { return ele.renderer().getEdgeMidpoint(ele); }; var pts = { controlPoints: { get: controlPoints, mult: true }, segmentPoints: { get: segmentPoints, mult: true }, sourceEndpoint: { get: sourceEndpoint }, targetEndpoint: { get: targetEndpoint }, midpoint: { get: midpoint } }; var renderedName = function renderedName(name) { return 'rendered' + name[0].toUpperCase() + name.substr(1); }; var edgePoints = Object.keys(pts).reduce(function (obj, name) { var spec = pts[name]; var rName = renderedName(name); obj[name] = function () { return ifEdge(this, spec.get); }; if (spec.mult) { obj[rName] = function () { return ifEdgeRenderedPositions(this, spec.get); }; } else { obj[rName] = function () { return ifEdgeRenderedPosition(this, spec.get); }; } return obj; }, {}); var dimensions = extend({}, position, bounds, widthHeight, edgePoints); /*! Event object based on jQuery events, MIT license https://jquery.org/license/ https://tldrlegal.com/license/mit-license https://github.com/jquery/jquery/blob/master/src/event.js */ var Event = function Event(src, props) { this.recycle(src, props); }; function returnFalse() { return false; } function returnTrue() { return true; } // http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html Event.prototype = { instanceString: function instanceString() { return 'event'; }, recycle: function recycle(src, props) { this.isImmediatePropagationStopped = this.isPropagationStopped = this.isDefaultPrevented = returnFalse; if (src != null && src.preventDefault) { // Browser Event object this.type = src.type; // Events bubbling up the document may have been marked as prevented // by a handler lower down the tree; reflect the correct value. this.isDefaultPrevented = src.defaultPrevented ? returnTrue : returnFalse; } else if (src != null && src.type) { // Plain object containing all event details props = src; } else { // Event string this.type = src; } // Put explicitly provided properties onto the event object if (props != null) { // more efficient to manually copy fields we use this.originalEvent = props.originalEvent; this.type = props.type != null ? props.type : this.type; this.cy = props.cy; this.target = props.target; this.position = props.position; this.renderedPosition = props.renderedPosition; this.namespace = props.namespace; this.layout = props.layout; } if (this.cy != null && this.position != null && this.renderedPosition == null) { // create a rendered position based on the passed position var pos = this.position; var zoom = this.cy.zoom(); var pan = this.cy.pan(); this.renderedPosition = { x: pos.x * zoom + pan.x, y: pos.y * zoom + pan.y }; } // Create a timestamp if incoming event doesn't have one this.timeStamp = src && src.timeStamp || Date.now(); }, preventDefault: function preventDefault() { this.isDefaultPrevented = returnTrue; var e = this.originalEvent; if (!e) { return; } // if preventDefault exists run it on the original event if (e.preventDefault) { e.preventDefault(); } }, stopPropagation: function stopPropagation() { this.isPropagationStopped = returnTrue; var e = this.originalEvent; if (!e) { return; } // if stopPropagation exists run it on the original event if (e.stopPropagation) { e.stopPropagation(); } }, stopImmediatePropagation: function stopImmediatePropagation() { this.isImmediatePropagationStopped = returnTrue; this.stopPropagation(); }, isDefaultPrevented: returnFalse, isPropagationStopped: returnFalse, isImmediatePropagationStopped: returnFalse }; var eventRegex = /^([^.]+)(\.(?:[^.]+))?$/; // regex for matching event strings (e.g. "click.namespace") var universalNamespace = '.*'; // matches as if no namespace specified and prevents users from unbinding accidentally var defaults$8 = { qualifierCompare: function qualifierCompare(q1, q2) { return q1 === q2; }, eventMatches: function /*context, listener, eventObj*/ eventMatches() { return true; }, addEventFields: function /*context, evt*/ addEventFields() {}, callbackContext: function callbackContext(context /*, listener, eventObj*/ ) { return context; }, beforeEmit: function /* context, listener, eventObj */ beforeEmit() {}, afterEmit: function /* context, listener, eventObj */ afterEmit() {}, bubble: function /*context*/ bubble() { return false; }, parent: function /*context*/ parent() { return null; }, context: null }; var defaultsKeys = Object.keys(defaults$8); var emptyOpts = {}; function Emitter() { var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : emptyOpts; var context = arguments.length > 1 ? arguments[1] : undefined; // micro-optimisation vs Object.assign() -- reduces Element instantiation time for (var i = 0; i < defaultsKeys.length; i++) { var key = defaultsKeys[i]; this[key] = opts[key] || defaults$8[key]; } this.context = context || this.context; this.listeners = []; this.emitting = 0; } var p = Emitter.prototype; var forEachEvent = function forEachEvent(self, handler, events, qualifier, callback, conf, confOverrides) { if (fn$6(qualifier)) { callback = qualifier; qualifier = null; } if (confOverrides) { if (conf == null) { conf = confOverrides; } else { conf = extend({}, conf, confOverrides); } } var eventList = array(events) ? events : events.split(/\s+/); for (var i = 0; i < eventList.length; i++) { var evt = eventList[i]; if (emptyString(evt)) { continue; } var match = evt.match(eventRegex); // type[.namespace] if (match) { var type = match[1]; var namespace = match[2] ? match[2] : null; var ret = handler(self, evt, type, namespace, qualifier, callback, conf); if (ret === false) { break; } // allow exiting early } } }; var makeEventObj = function makeEventObj(self, obj) { self.addEventFields(self.context, obj); return new Event(obj.type, obj); }; var forEachEventObj = function forEachEventObj(self, handler, events) { if (event(events)) { handler(self, events); return; } else if (plainObject(events)) { handler(self, makeEventObj(self, events)); return; } var eventList = array(events) ? events : events.split(/\s+/); for (var i = 0; i < eventList.length; i++) { var evt = eventList[i]; if (emptyString(evt)) { continue; } var match = evt.match(eventRegex); // type[.namespace] if (match) { var type = match[1]; var namespace = match[2] ? match[2] : null; var eventObj = makeEventObj(self, { type: type, namespace: namespace, target: self.context }); handler(self, eventObj); } } }; p.on = p.addListener = function (events, qualifier, callback, conf, confOverrides) { forEachEvent(this, function (self, event, type, namespace, qualifier, callback, conf) { if (fn$6(callback)) { self.listeners.push({ event: event, // full event string callback: callback, // callback to run type: type, // the event type (e.g. 'click') namespace: namespace, // the event namespace (e.g. ".foo") qualifier: qualifier, // a restriction on whether to match this emitter conf: conf // additional configuration }); } }, events, qualifier, callback, conf, confOverrides); return this; }; p.one = function (events, qualifier, callback, conf) { return this.on(events, qualifier, callback, conf, { one: true }); }; p.removeListener = p.off = function (events, qualifier, callback, conf) { var _this = this; if (this.emitting !== 0) { this.listeners = copyArray(this.listeners); } var listeners = this.listeners; var _loop = function _loop(i) { var listener = listeners[i]; forEachEvent(_this, function (self, event, type, namespace, qualifier, callback /*, conf*/ ) { if ((listener.type === type || events === '*') && (!namespace && listener.namespace !== '.*' || listener.namespace === namespace) && (!qualifier || self.qualifierCompare(listener.qualifier, qualifier)) && (!callback || listener.callback === callback)) { listeners.splice(i, 1); return false; } }, events, qualifier, callback, conf); }; for (var i = listeners.length - 1; i >= 0; i--) { _loop(i); } return this; }; p.removeAllListeners = function () { return this.removeListener('*'); }; p.emit = p.trigger = function (events, extraParams, manualCallback) { var listeners = this.listeners; var numListenersBeforeEmit = listeners.length; this.emitting++; if (!array(extraParams)) { extraParams = [extraParams]; } forEachEventObj(this, function (self, eventObj) { if (manualCallback != null) { listeners = [{ event: eventObj.event, type: eventObj.type, namespace: eventObj.namespace, callback: manualCallback }]; numListenersBeforeEmit = listeners.length; } var _loop2 = function _loop2(i) { var listener = listeners[i]; if (listener.type === eventObj.type && (!listener.namespace || listener.namespace === eventObj.namespace || listener.namespace === universalNamespace) && self.eventMatches(self.context, listener, eventObj)) { var args = [eventObj]; if (extraParams != null) { push(args, extraParams); } self.beforeEmit(self.context, listener, eventObj); if (listener.conf && listener.conf.one) { self.listeners = self.listeners.filter(function (l) { return l !== listener; }); } var context = self.callbackContext(self.context, listener, eventObj); var ret = listener.callback.apply(context, args); self.afterEmit(self.context, listener, eventObj); if (ret === false) { eventObj.stopPropagation(); eventObj.preventDefault(); } } // if listener matches }; for (var i = 0; i < numListenersBeforeEmit; i++) { _loop2(i); } // for listener if (self.bubble(self.context) && !eventObj.isPropagationStopped()) { self.parent(self.context).emit(eventObj, extraParams); } }, events); this.emitting--; return this; }; var emitterOptions$1 = { qualifierCompare: function qualifierCompare(selector1, selector2) { if (selector1 == null || selector2 == null) { return selector1 == null && selector2 == null; } else { return selector1.sameText(selector2); } }, eventMatches: function eventMatches(ele, listener, eventObj) { var selector = listener.qualifier; if (selector != null) { return ele !== eventObj.target && element(eventObj.target) && selector.matches(eventObj.target); } return true; }, addEventFields: function addEventFields(ele, evt) { evt.cy = ele.cy(); evt.target = ele; }, callbackContext: function callbackContext(ele, listener, eventObj) { return listener.qualifier != null ? eventObj.target : ele; }, beforeEmit: function beforeEmit(context, listener /*, eventObj*/ ) { if (listener.conf && listener.conf.once) { listener.conf.onceCollection.removeListener(listener.event, listener.qualifier, listener.callback); } }, bubble: function bubble() { return true; }, parent: function parent(ele) { return ele.isChild() ? ele.parent() : ele.cy(); } }; var argSelector$1 = function argSelector(arg) { if (string(arg)) { return new Selector(arg); } else { return arg; } }; var elesfn$9 = { createEmitter: function createEmitter() { for (var i = 0; i < this.length; i++) { var ele = this[i]; var _p = ele._private; if (!_p.emitter) { _p.emitter = new Emitter(emitterOptions$1, ele); } } return this; }, emitter: function emitter() { return this._private.emitter; }, on: function on(events, selector, callback) { var argSel = argSelector$1(selector); for (var i = 0; i < this.length; i++) { var ele = this[i]; ele.emitter().on(events, argSel, callback); } return this; }, removeListener: function removeListener(events, selector, callback) { var argSel = argSelector$1(selector); for (var i = 0; i < this.length; i++) { var ele = this[i]; ele.emitter().removeListener(events, argSel, callback); } return this; }, removeAllListeners: function removeAllListeners() { for (var i = 0; i < this.length; i++) { var ele = this[i]; ele.emitter().removeAllListeners(); } return this; }, one: function one(events, selector, callback) { var argSel = argSelector$1(selector); for (var i = 0; i < this.length; i++) { var ele = this[i]; ele.emitter().one(events, argSel, callback); } return this; }, once: function once(events, selector, callback) { var argSel = argSelector$1(selector); for (var i = 0; i < this.length; i++) { var ele = this[i]; ele.emitter().on(events, argSel, callback, { once: true, onceCollection: this }); } }, emit: function emit(events, extraParams) { for (var i = 0; i < this.length; i++) { var ele = this[i]; ele.emitter().emit(events, extraParams); } return this; }, emitAndNotify: function emitAndNotify(event, extraParams) { // for internal use only if (this.length === 0) { return; } // empty collections don't need to notify anything // notify renderer this.cy().notify(event, this); this.emit(event, extraParams); return this; } }; define.eventAliasesOn(elesfn$9); var elesfn$8 = { nodes: function nodes(selector) { return this.filter(function (ele) { return ele.isNode(); }).filter(selector); }, edges: function edges(selector) { return this.filter(function (ele) { return ele.isEdge(); }).filter(selector); }, // internal helper to get nodes and edges as separate collections with single iteration over elements byGroup: function byGroup() { var nodes = this.spawn(); var edges = this.spawn(); for (var i = 0; i < this.length; i++) { var ele = this[i]; if (ele.isNode()) { nodes.push(ele); } else { edges.push(ele); } } return { nodes: nodes, edges: edges }; }, filter: function filter(_filter, thisArg) { if (_filter === undefined) { // check this first b/c it's the most common/performant case return this; } else if (string(_filter) || elementOrCollection(_filter)) { return new Selector(_filter).filter(this); } else if (fn$6(_filter)) { var filterEles = this.spawn(); var eles = this; for (var i = 0; i < eles.length; i++) { var ele = eles[i]; var include = thisArg ? _filter.apply(thisArg, [ele, i, eles]) : _filter(ele, i, eles); if (include) { filterEles.push(ele); } } return filterEles; } return this.spawn(); // if not handled by above, give 'em an empty collection }, not: function not(toRemove) { if (!toRemove) { return this; } else { if (string(toRemove)) { toRemove = this.filter(toRemove); } var elements = this.spawn(); for (var i = 0; i < this.length; i++) { var element = this[i]; var remove = toRemove.has(element); if (!remove) { elements.push(element); } } return elements; } }, absoluteComplement: function absoluteComplement() { var cy = this.cy(); return cy.mutableElements().not(this); }, intersect: function intersect(other) { // if a selector is specified, then filter by it instead if (string(other)) { var selector = other; return this.filter(selector); } var elements = this.spawn(); var col1 = this; var col2 = other; var col1Smaller = this.length < other.length; var colS = col1Smaller ? col1 : col2; var colL = col1Smaller ? col2 : col1; for (var i = 0; i < colS.length; i++) { var ele = colS[i]; if (colL.has(ele)) { elements.push(ele); } } return elements; }, xor: function xor(other) { var cy = this._private.cy; if (string(other)) { other = cy.$(other); } var elements = this.spawn(); var col1 = this; var col2 = other; var add = function add(col, other) { for (var i = 0; i < col.length; i++) { var ele = col[i]; var id = ele._private.data.id; var inOther = other.hasElementWithId(id); if (!inOther) { elements.push(ele); } } }; add(col1, col2); add(col2, col1); return elements; }, diff: function diff(other) { var cy = this._private.cy; if (string(other)) { other = cy.$(other); } var left = this.spawn(); var right = this.spawn(); var both = this.spawn(); var col1 = this; var col2 = other; var add = function add(col, other, retEles) { for (var i = 0; i < col.length; i++) { var ele = col[i]; var id = ele._private.data.id; var inOther = other.hasElementWithId(id); if (inOther) { both.merge(ele); } else { retEles.push(ele); } } }; add(col1, col2, left); add(col2, col1, right); return { left: left, right: right, both: both }; }, add: function add(toAdd) { var cy = this._private.cy; if (!toAdd) { return this; } if (string(toAdd)) { var selector = toAdd; toAdd = cy.mutableElements().filter(selector); } var elements = this.spawnSelf(); for (var i = 0; i < toAdd.length; i++) { var ele = toAdd[i]; var add = !this.has(ele); if (add) { elements.push(ele); } } return elements; }, // in place merge on calling collection merge: function merge(toAdd) { var _p = this._private; var cy = _p.cy; if (!toAdd) { return this; } if (toAdd && string(toAdd)) { var selector = toAdd; toAdd = cy.mutableElements().filter(selector); } var map = _p.map; for (var i = 0; i < toAdd.length; i++) { var toAddEle = toAdd[i]; var id = toAddEle._private.data.id; var add = !map.has(id); if (add) { var index = this.length++; this[index] = toAddEle; map.set(id, { ele: toAddEle, index: index }); } } return this; // chaining }, unmergeAt: function unmergeAt(i) { var ele = this[i]; var id = ele.id(); var _p = this._private; var map = _p.map; // remove ele this[i] = undefined; map["delete"](id); var unmergedLastEle = i === this.length - 1; // replace empty spot with last ele in collection if (this.length > 1 && !unmergedLastEle) { var lastEleI = this.length - 1; var lastEle = this[lastEleI]; var lastEleId = lastEle._private.data.id; this[lastEleI] = undefined; this[i] = lastEle; map.set(lastEleId, { ele: lastEle, index: i }); } // the collection is now 1 ele smaller this.length--; return this; }, // remove single ele in place in calling collection unmergeOne: function unmergeOne(ele) { ele = ele[0]; var _p = this._private; var id = ele._private.data.id; var map = _p.map; var entry = map.get(id); if (!entry) { return this; // no need to remove } var i = entry.index; this.unmergeAt(i); return this; }, // remove eles in place on calling collection unmerge: function unmerge(toRemove) { var cy = this._private.cy; if (!toRemove) { return this; } if (toRemove && string(toRemove)) { var selector = toRemove; toRemove = cy.mutableElements().filter(selector); } for (var i = 0; i < toRemove.length; i++) { this.unmergeOne(toRemove[i]); } return this; // chaining }, unmergeBy: function unmergeBy(toRmFn) { for (var i = this.length - 1; i >= 0; i--) { var ele = this[i]; if (toRmFn(ele)) { this.unmergeAt(i); } } return this; }, map: function map(mapFn, thisArg) { var arr = []; var eles = this; for (var i = 0; i < eles.length; i++) { var ele = eles[i]; var ret = thisArg ? mapFn.apply(thisArg, [ele, i, eles]) : mapFn(ele, i, eles); arr.push(ret); } return arr; }, reduce: function reduce(fn, initialValue) { var val = initialValue; var eles = this; for (var i = 0; i < eles.length; i++) { val = fn(val, eles[i], i, eles); } return val; }, max: function max(valFn, thisArg) { var max = -Infinity; var maxEle; var eles = this; for (var i = 0; i < eles.length; i++) { var ele = eles[i]; var val = thisArg ? valFn.apply(thisArg, [ele, i, eles]) : valFn(ele, i, eles); if (val > max) { max = val; maxEle = ele; } } return { value: max, ele: maxEle }; }, min: function min(valFn, thisArg) { var min = Infinity; var minEle; var eles = this; for (var i = 0; i < eles.length; i++) { var ele = eles[i]; var val = thisArg ? valFn.apply(thisArg, [ele, i, eles]) : valFn(ele, i, eles); if (val < min) { min = val; minEle = ele; } } return { value: min, ele: minEle }; } }; // aliases var fn$1 = elesfn$8; fn$1['u'] = fn$1['|'] = fn$1['+'] = fn$1.union = fn$1.or = fn$1.add; fn$1['\\'] = fn$1['!'] = fn$1['-'] = fn$1.difference = fn$1.relativeComplement = fn$1.subtract = fn$1.not; fn$1['n'] = fn$1['&'] = fn$1['.'] = fn$1.and = fn$1.intersection = fn$1.intersect; fn$1['^'] = fn$1['(+)'] = fn$1['(-)'] = fn$1.symmetricDifference = fn$1.symdiff = fn$1.xor; fn$1.fnFilter = fn$1.filterFn = fn$1.stdFilter = fn$1.filter; fn$1.complement = fn$1.abscomp = fn$1.absoluteComplement; var elesfn$7 = { isNode: function isNode() { return this.group() === 'nodes'; }, isEdge: function isEdge() { return this.group() === 'edges'; }, isLoop: function isLoop() { return this.isEdge() && this.source()[0] === this.target()[0]; }, isSimple: function isSimple() { return this.isEdge() && this.source()[0] !== this.target()[0]; }, group: function group() { var ele = this[0]; if (ele) { return ele._private.group; } } }; /** * Elements are drawn in a specific order based on compound depth (low to high), the element type (nodes above edges), * and z-index (low to high). These styles affect how this applies: * * z-compound-depth: May be `bottom | orphan | auto | top`. The first drawn is `bottom`, then `orphan` which is the * same depth as the root of the compound graph, followed by the default value `auto` which draws in order from * root to leaves of the compound graph. The last drawn is `top`. * z-index-compare: May be `auto | manual`. The default value is `auto` which always draws edges under nodes. * `manual` ignores this convention and draws based on the `z-index` value setting. * z-index: An integer value that affects the relative draw order of elements. In general, an element with a higher * `z-index` will be drawn on top of an element with a lower `z-index`. */ var zIndexSort = function zIndexSort(a, b) { var cy = a.cy(); var hasCompoundNodes = cy.hasCompoundNodes(); function getDepth(ele) { var style = ele.pstyle('z-compound-depth'); if (style.value === 'auto') { return hasCompoundNodes ? ele.zDepth() : 0; } else if (style.value === 'bottom') { return -1; } else if (style.value === 'top') { return MAX_INT$1; } // 'orphan' return 0; } var depthDiff = getDepth(a) - getDepth(b); if (depthDiff !== 0) { return depthDiff; } function getEleDepth(ele) { var style = ele.pstyle('z-index-compare'); if (style.value === 'auto') { return ele.isNode() ? 1 : 0; } // 'manual' return 0; } var eleDiff = getEleDepth(a) - getEleDepth(b); if (eleDiff !== 0) { return eleDiff; } var zDiff = a.pstyle('z-index').value - b.pstyle('z-index').value; if (zDiff !== 0) { return zDiff; } // compare indices in the core (order added to graph w/ last on top) return a.poolIndex() - b.poolIndex(); }; var elesfn$6 = { forEach: function forEach(fn, thisArg) { if (fn$6(fn)) { var N = this.length; for (var i = 0; i < N; i++) { var ele = this[i]; var ret = thisArg ? fn.apply(thisArg, [ele, i, this]) : fn(ele, i, this); if (ret === false) { break; } // exit each early on return false } } return this; }, toArray: function toArray() { var array = []; for (var i = 0; i < this.length; i++) { array.push(this[i]); } return array; }, slice: function slice(start, end) { var array = []; var thisSize = this.length; if (end == null) { end = thisSize; } if (start == null) { start = 0; } if (start < 0) { start = thisSize + start; } if (end < 0) { end = thisSize + end; } for (var i = start; i >= 0 && i < end && i < thisSize; i++) { array.push(this[i]); } return this.spawn(array); }, size: function size() { return this.length; }, eq: function eq(i) { return this[i] || this.spawn(); }, first: function first() { return this[0] || this.spawn(); }, last: function last() { return this[this.length - 1] || this.spawn(); }, empty: function empty() { return this.length === 0; }, nonempty: function nonempty() { return !this.empty(); }, sort: function sort(sortFn) { if (!fn$6(sortFn)) { return this; } var sorted = this.toArray().sort(sortFn); return this.spawn(sorted); }, sortByZIndex: function sortByZIndex() { return this.sort(zIndexSort); }, zDepth: function zDepth() { var ele = this[0]; if (!ele) { return undefined; } // let cy = ele.cy(); var _p = ele._private; var group = _p.group; if (group === 'nodes') { var depth = _p.data.parent ? ele.parents().size() : 0; if (!ele.isParent()) { return MAX_INT$1 - 1; // childless nodes always on top } return depth; } else { var src = _p.source; var tgt = _p.target; var srcDepth = src.zDepth(); var tgtDepth = tgt.zDepth(); return Math.max(srcDepth, tgtDepth, 0); // depth of deepest parent } } }; elesfn$6.each = elesfn$6.forEach; var defineSymbolIterator = function defineSymbolIterator() { var typeofUndef = "undefined" ; var isIteratorSupported = (typeof Symbol === "undefined" ? "undefined" : _typeof(Symbol)) != typeofUndef && _typeof(Symbol.iterator) != typeofUndef; // eslint-disable-line no-undef if (isIteratorSupported) { elesfn$6[Symbol.iterator] = function () { var _this = this; // eslint-disable-line no-undef var entry = { value: undefined, done: false }; var i = 0; var length = this.length; return _defineProperty({ next: function next() { if (i < length) { entry.value = _this[i++]; } else { entry.value = undefined; entry.done = true; } return entry; } }, Symbol.iterator, function () { // eslint-disable-line no-undef return this; }); }; } }; defineSymbolIterator(); var getLayoutDimensionOptions = defaults$g({ nodeDimensionsIncludeLabels: false }); var elesfn$5 = { // Calculates and returns node dimensions { x, y } based on options given layoutDimensions: function layoutDimensions(options) { options = getLayoutDimensionOptions(options); var dims; if (!this.takesUpSpace()) { dims = { w: 0, h: 0 }; } else if (options.nodeDimensionsIncludeLabels) { var bbDim = this.boundingBox(); dims = { w: bbDim.w, h: bbDim.h }; } else { dims = { w: this.outerWidth(), h: this.outerHeight() }; } // sanitise the dimensions for external layouts (avoid division by zero) if (dims.w === 0 || dims.h === 0) { dims.w = dims.h = 1; } return dims; }, // using standard layout options, apply position function (w/ or w/o animation) layoutPositions: function layoutPositions(layout, options, fn) { var nodes = this.nodes().filter(function (n) { return !n.isParent(); }); var cy = this.cy(); var layoutEles = options.eles; // nodes & edges var getMemoizeKey = function getMemoizeKey(node) { return node.id(); }; var fnMem = memoize(fn, getMemoizeKey); // memoized version of position function layout.emit({ type: 'layoutstart', layout: layout }); layout.animations = []; var calculateSpacing = function calculateSpacing(spacing, nodesBb, pos) { var center = { x: nodesBb.x1 + nodesBb.w / 2, y: nodesBb.y1 + nodesBb.h / 2 }; var spacingVector = { // scale from center of bounding box (not necessarily 0,0) x: (pos.x - center.x) * spacing, y: (pos.y - center.y) * spacing }; return { x: center.x + spacingVector.x, y: center.y + spacingVector.y }; }; var useSpacingFactor = options.spacingFactor && options.spacingFactor !== 1; var spacingBb = function spacingBb() { if (!useSpacingFactor) { return null; } var bb = makeBoundingBox(); for (var i = 0; i < nodes.length; i++) { var node = nodes[i]; var pos = fnMem(node, i); expandBoundingBoxByPoint(bb, pos.x, pos.y); } return bb; }; var bb = spacingBb(); var getFinalPos = memoize(function (node, i) { var newPos = fnMem(node, i); if (useSpacingFactor) { var spacing = Math.abs(options.spacingFactor); newPos = calculateSpacing(spacing, bb, newPos); } if (options.transform != null) { newPos = options.transform(node, newPos); } return newPos; }, getMemoizeKey); if (options.animate) { for (var i = 0; i < nodes.length; i++) { var node = nodes[i]; var newPos = getFinalPos(node, i); var animateNode = options.animateFilter == null || options.animateFilter(node, i); if (animateNode) { var ani = node.animation({ position: newPos, duration: options.animationDuration, easing: options.animationEasing }); layout.animations.push(ani); } else { node.position(newPos); } } if (options.fit) { var fitAni = cy.animation({ fit: { boundingBox: layoutEles.boundingBoxAt(getFinalPos), padding: options.padding }, duration: options.animationDuration, easing: options.animationEasing }); layout.animations.push(fitAni); } else if (options.zoom !== undefined && options.pan !== undefined) { var zoomPanAni = cy.animation({ zoom: options.zoom, pan: options.pan, duration: options.animationDuration, easing: options.animationEasing }); layout.animations.push(zoomPanAni); } layout.animations.forEach(function (ani) { return ani.play(); }); layout.one('layoutready', options.ready); layout.emit({ type: 'layoutready', layout: layout }); Promise$1.all(layout.animations.map(function (ani) { return ani.promise(); })).then(function () { layout.one('layoutstop', options.stop); layout.emit({ type: 'layoutstop', layout: layout }); }); } else { nodes.positions(getFinalPos); if (options.fit) { cy.fit(options.eles, options.padding); } if (options.zoom != null) { cy.zoom(options.zoom); } if (options.pan) { cy.pan(options.pan); } layout.one('layoutready', options.ready); layout.emit({ type: 'layoutready', layout: layout }); layout.one('layoutstop', options.stop); layout.emit({ type: 'layoutstop', layout: layout }); } return this; // chaining }, layout: function layout(options) { var cy = this.cy(); return cy.makeLayout(extend({}, options, { eles: this })); } }; // aliases: elesfn$5.createLayout = elesfn$5.makeLayout = elesfn$5.layout; function styleCache(key, fn, ele) { var _p = ele._private; var cache = _p.styleCache = _p.styleCache || []; var val; if ((val = cache[key]) != null) { return val; } else { val = cache[key] = fn(ele); return val; } } function cacheStyleFunction(key, fn) { key = hashString(key); return function cachedStyleFunction(ele) { return styleCache(key, fn, ele); }; } function cachePrototypeStyleFunction(key, fn) { key = hashString(key); var selfFn = function selfFn(ele) { return fn.call(ele); }; return function cachedPrototypeStyleFunction() { var ele = this[0]; if (ele) { return styleCache(key, selfFn, ele); } }; } var elesfn$4 = { recalculateRenderedStyle: function recalculateRenderedStyle(useCache) { var cy = this.cy(); var renderer = cy.renderer(); var styleEnabled = cy.styleEnabled(); if (renderer && styleEnabled) { renderer.recalculateRenderedStyle(this, useCache); } return this; }, dirtyStyleCache: function dirtyStyleCache() { var cy = this.cy(); var dirty = function dirty(ele) { return ele._private.styleCache = null; }; if (cy.hasCompoundNodes()) { var eles; eles = this.spawnSelf().merge(this.descendants()).merge(this.parents()); eles.merge(eles.connectedEdges()); eles.forEach(dirty); } else { this.forEach(function (ele) { dirty(ele); ele.connectedEdges().forEach(dirty); }); } return this; }, // fully updates (recalculates) the style for the elements updateStyle: function updateStyle(notifyRenderer) { var cy = this._private.cy; if (!cy.styleEnabled()) { return this; } if (cy.batching()) { var bEles = cy._private.batchStyleEles; bEles.merge(this); return this; // chaining and exit early when batching } var hasCompounds = cy.hasCompoundNodes(); var updatedEles = this; notifyRenderer = notifyRenderer || notifyRenderer === undefined ? true : false; if (hasCompounds) { // then add everything up and down for compound selector checks updatedEles = this.spawnSelf().merge(this.descendants()).merge(this.parents()); } // let changedEles = style.apply( updatedEles ); var changedEles = updatedEles; if (notifyRenderer) { changedEles.emitAndNotify('style'); // let renderer know we changed style } else { changedEles.emit('style'); // just fire the event } updatedEles.forEach(function (ele) { return ele._private.styleDirty = true; }); return this; // chaining }, // private: clears dirty flag and recalculates style cleanStyle: function cleanStyle() { var cy = this.cy(); if (!cy.styleEnabled()) { return; } for (var i = 0; i < this.length; i++) { var ele = this[i]; if (ele._private.styleDirty) { // n.b. this flag should be set before apply() to avoid potential infinite recursion ele._private.styleDirty = false; cy.style().apply(ele); } } }, // get the internal parsed style object for the specified property parsedStyle: function parsedStyle(property) { var includeNonDefault = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; var ele = this[0]; var cy = ele.cy(); if (!cy.styleEnabled()) { return; } if (ele) { this.cleanStyle(); var overriddenStyle = ele._private.style[property]; if (overriddenStyle != null) { return overriddenStyle; } else if (includeNonDefault) { return cy.style().getDefaultProperty(property); } else { return null; } } }, numericStyle: function numericStyle(property) { var ele = this[0]; if (!ele.cy().styleEnabled()) { return; } if (ele) { var pstyle = ele.pstyle(property); return pstyle.pfValue !== undefined ? pstyle.pfValue : pstyle.value; } }, numericStyleUnits: function numericStyleUnits(property) { var ele = this[0]; if (!ele.cy().styleEnabled()) { return; } if (ele) { return ele.pstyle(property).units; } }, // get the specified css property as a rendered value (i.e. on-screen value) // or get the whole rendered style if no property specified (NB doesn't allow setting) renderedStyle: function renderedStyle(property) { var cy = this.cy(); if (!cy.styleEnabled()) { return this; } var ele = this[0]; if (ele) { return cy.style().getRenderedStyle(ele, property); } }, // read the calculated css style of the element or override the style (via a bypass) style: function style(name, value) { var cy = this.cy(); if (!cy.styleEnabled()) { return this; } var updateTransitions = false; var style = cy.style(); if (plainObject(name)) { // then extend the bypass var props = name; style.applyBypass(this, props, updateTransitions); this.emitAndNotify('style'); // let the renderer know we've updated style } else if (string(name)) { if (value === undefined) { // then get the property from the style var ele = this[0]; if (ele) { return style.getStylePropertyValue(ele, name); } else { // empty collection => can't get any value return; } } else { // then set the bypass with the property value style.applyBypass(this, name, value, updateTransitions); this.emitAndNotify('style'); // let the renderer know we've updated style } } else if (name === undefined) { var _ele = this[0]; if (_ele) { return style.getRawStyle(_ele); } else { // empty collection => can't get any value return; } } return this; // chaining }, removeStyle: function removeStyle(names) { var cy = this.cy(); if (!cy.styleEnabled()) { return this; } var updateTransitions = false; var style = cy.style(); var eles = this; if (names === undefined) { for (var i = 0; i < eles.length; i++) { var ele = eles[i]; style.removeAllBypasses(ele, updateTransitions); } } else { names = names.split(/\s+/); for (var _i = 0; _i < eles.length; _i++) { var _ele2 = eles[_i]; style.removeBypasses(_ele2, names, updateTransitions); } } this.emitAndNotify('style'); // let the renderer know we've updated style return this; // chaining }, show: function show() { this.css('display', 'element'); return this; // chaining }, hide: function hide() { this.css('display', 'none'); return this; // chaining }, effectiveOpacity: function effectiveOpacity() { var cy = this.cy(); if (!cy.styleEnabled()) { return 1; } var hasCompoundNodes = cy.hasCompoundNodes(); var ele = this[0]; if (ele) { var _p = ele._private; var parentOpacity = ele.pstyle('opacity').value; if (!hasCompoundNodes) { return parentOpacity; } var parents = !_p.data.parent ? null : ele.parents(); if (parents) { for (var i = 0; i < parents.length; i++) { var parent = parents[i]; var opacity = parent.pstyle('opacity').value; parentOpacity = opacity * parentOpacity; } } return parentOpacity; } }, transparent: function transparent() { var cy = this.cy(); if (!cy.styleEnabled()) { return false; } var ele = this[0]; var hasCompoundNodes = ele.cy().hasCompoundNodes(); if (ele) { if (!hasCompoundNodes) { return ele.pstyle('opacity').value === 0; } else { return ele.effectiveOpacity() === 0; } } }, backgrounding: function backgrounding() { var cy = this.cy(); if (!cy.styleEnabled()) { return false; } var ele = this[0]; return ele._private.backgrounding ? true : false; } }; function checkCompound(ele, parentOk) { var _p = ele._private; var parents = _p.data.parent ? ele.parents() : null; if (parents) { for (var i = 0; i < parents.length; i++) { var parent = parents[i]; if (!parentOk(parent)) { return false; } } } return true; } function defineDerivedStateFunction(specs) { var ok = specs.ok; var edgeOkViaNode = specs.edgeOkViaNode || specs.ok; var parentOk = specs.parentOk || specs.ok; return function () { var cy = this.cy(); if (!cy.styleEnabled()) { return true; } var ele = this[0]; var hasCompoundNodes = cy.hasCompoundNodes(); if (ele) { var _p = ele._private; if (!ok(ele)) { return false; } if (ele.isNode()) { return !hasCompoundNodes || checkCompound(ele, parentOk); } else { var src = _p.source; var tgt = _p.target; return edgeOkViaNode(src) && (!hasCompoundNodes || checkCompound(src, edgeOkViaNode)) && (src === tgt || edgeOkViaNode(tgt) && (!hasCompoundNodes || checkCompound(tgt, edgeOkViaNode))); } } }; } var eleTakesUpSpace = cacheStyleFunction('eleTakesUpSpace', function (ele) { return ele.pstyle('display').value === 'element' && ele.width() !== 0 && (ele.isNode() ? ele.height() !== 0 : true); }); elesfn$4.takesUpSpace = cachePrototypeStyleFunction('takesUpSpace', defineDerivedStateFunction({ ok: eleTakesUpSpace })); var eleInteractive = cacheStyleFunction('eleInteractive', function (ele) { return ele.pstyle('events').value === 'yes' && ele.pstyle('visibility').value === 'visible' && eleTakesUpSpace(ele); }); var parentInteractive = cacheStyleFunction('parentInteractive', function (parent) { return parent.pstyle('visibility').value === 'visible' && eleTakesUpSpace(parent); }); elesfn$4.interactive = cachePrototypeStyleFunction('interactive', defineDerivedStateFunction({ ok: eleInteractive, parentOk: parentInteractive, edgeOkViaNode: eleTakesUpSpace })); elesfn$4.noninteractive = function () { var ele = this[0]; if (ele) { return !ele.interactive(); } }; var eleVisible = cacheStyleFunction('eleVisible', function (ele) { return ele.pstyle('visibility').value === 'visible' && ele.pstyle('opacity').pfValue !== 0 && eleTakesUpSpace(ele); }); var edgeVisibleViaNode = eleTakesUpSpace; elesfn$4.visible = cachePrototypeStyleFunction('visible', defineDerivedStateFunction({ ok: eleVisible, edgeOkViaNode: edgeVisibleViaNode })); elesfn$4.hidden = function () { var ele = this[0]; if (ele) { return !ele.visible(); } }; elesfn$4.isBundledBezier = cachePrototypeStyleFunction('isBundledBezier', function () { if (!this.cy().styleEnabled()) { return false; } return !this.removed() && this.pstyle('curve-style').value === 'bezier' && this.takesUpSpace(); }); elesfn$4.bypass = elesfn$4.css = elesfn$4.style; elesfn$4.renderedCss = elesfn$4.renderedStyle; elesfn$4.removeBypass = elesfn$4.removeCss = elesfn$4.removeStyle; elesfn$4.pstyle = elesfn$4.parsedStyle; var elesfn$3 = {}; function defineSwitchFunction(params) { return function () { var args = arguments; var changedEles = []; // e.g. cy.nodes().select( data, handler ) if (args.length === 2) { var data = args[0]; var handler = args[1]; this.on(params.event, data, handler); } // e.g. cy.nodes().select( handler ) else if (args.length === 1 && fn$6(args[0])) { var _handler = args[0]; this.on(params.event, _handler); } // e.g. cy.nodes().select() // e.g. (private) cy.nodes().select(['tapselect']) else if (args.length === 0 || args.length === 1 && array(args[0])) { var addlEvents = args.length === 1 ? args[0] : null; for (var i = 0; i < this.length; i++) { var ele = this[i]; var able = !params.ableField || ele._private[params.ableField]; var changed = ele._private[params.field] != params.value; if (params.overrideAble) { var overrideAble = params.overrideAble(ele); if (overrideAble !== undefined) { able = overrideAble; if (!overrideAble) { return this; } // to save cycles assume not able for all on override } } if (able) { ele._private[params.field] = params.value; if (changed) { changedEles.push(ele); } } } var changedColl = this.spawn(changedEles); changedColl.updateStyle(); // change of state => possible change of style changedColl.emit(params.event); if (addlEvents) { changedColl.emit(addlEvents); } } return this; }; } function defineSwitchSet(params) { elesfn$3[params.field] = function () { var ele = this[0]; if (ele) { if (params.overrideField) { var val = params.overrideField(ele); if (val !== undefined) { return val; } } return ele._private[params.field]; } }; elesfn$3[params.on] = defineSwitchFunction({ event: params.on, field: params.field, ableField: params.ableField, overrideAble: params.overrideAble, value: true }); elesfn$3[params.off] = defineSwitchFunction({ event: params.off, field: params.field, ableField: params.ableField, overrideAble: params.overrideAble, value: false }); } defineSwitchSet({ field: 'locked', overrideField: function overrideField(ele) { return ele.cy().autolock() ? true : undefined; }, on: 'lock', off: 'unlock' }); defineSwitchSet({ field: 'grabbable', overrideField: function overrideField(ele) { return ele.cy().autoungrabify() || ele.pannable() ? false : undefined; }, on: 'grabify', off: 'ungrabify' }); defineSwitchSet({ field: 'selected', ableField: 'selectable', overrideAble: function overrideAble(ele) { return ele.cy().autounselectify() ? false : undefined; }, on: 'select', off: 'unselect' }); defineSwitchSet({ field: 'selectable', overrideField: function overrideField(ele) { return ele.cy().autounselectify() ? false : undefined; }, on: 'selectify', off: 'unselectify' }); elesfn$3.deselect = elesfn$3.unselect; elesfn$3.grabbed = function () { var ele = this[0]; if (ele) { return ele._private.grabbed; } }; defineSwitchSet({ field: 'active', on: 'activate', off: 'unactivate' }); defineSwitchSet({ field: 'pannable', on: 'panify', off: 'unpanify' }); elesfn$3.inactive = function () { var ele = this[0]; if (ele) { return !ele._private.active; } }; var elesfn$2 = {}; // DAG functions //////////////// var defineDagExtremity = function defineDagExtremity(params) { return function dagExtremityImpl(selector) { var eles = this; var ret = []; for (var i = 0; i < eles.length; i++) { var ele = eles[i]; if (!ele.isNode()) { continue; } var disqualified = false; var edges = ele.connectedEdges(); for (var j = 0; j < edges.length; j++) { var edge = edges[j]; var src = edge.source(); var tgt = edge.target(); if (params.noIncomingEdges && tgt === ele && src !== ele || params.noOutgoingEdges && src === ele && tgt !== ele) { disqualified = true; break; } } if (!disqualified) { ret.push(ele); } } return this.spawn(ret, true).filter(selector); }; }; var defineDagOneHop = function defineDagOneHop(params) { return function (selector) { var eles = this; var oEles = []; for (var i = 0; i < eles.length; i++) { var ele = eles[i]; if (!ele.isNode()) { continue; } var edges = ele.connectedEdges(); for (var j = 0; j < edges.length; j++) { var edge = edges[j]; var src = edge.source(); var tgt = edge.target(); if (params.outgoing && src === ele) { oEles.push(edge); oEles.push(tgt); } else if (params.incoming && tgt === ele) { oEles.push(edge); oEles.push(src); } } } return this.spawn(oEles, true).filter(selector); }; }; var defineDagAllHops = function defineDagAllHops(params) { return function (selector) { var eles = this; var sEles = []; var sElesIds = {}; for (;;) { var next = params.outgoing ? eles.outgoers() : eles.incomers(); if (next.length === 0) { break; } // done if none left var newNext = false; for (var i = 0; i < next.length; i++) { var n = next[i]; var nid = n.id(); if (!sElesIds[nid]) { sElesIds[nid] = true; sEles.push(n); newNext = true; } } if (!newNext) { break; } // done if touched all outgoers already eles = next; } return this.spawn(sEles, true).filter(selector); }; }; elesfn$2.clearTraversalCache = function () { for (var i = 0; i < this.length; i++) { this[i]._private.traversalCache = null; } }; extend(elesfn$2, { // get the root nodes in the DAG roots: defineDagExtremity({ noIncomingEdges: true }), // get the leaf nodes in the DAG leaves: defineDagExtremity({ noOutgoingEdges: true }), // normally called children in graph theory // these nodes =edges=> outgoing nodes outgoers: cache(defineDagOneHop({ outgoing: true }), 'outgoers'), // aka DAG descendants successors: defineDagAllHops({ outgoing: true }), // normally called parents in graph theory // these nodes <=edges= incoming nodes incomers: cache(defineDagOneHop({ incoming: true }), 'incomers'), // aka DAG ancestors predecessors: defineDagAllHops({ incoming: true }) }); // Neighbourhood functions ////////////////////////// extend(elesfn$2, { neighborhood: cache(function (selector) { var elements = []; var nodes = this.nodes(); for (var i = 0; i < nodes.length; i++) { // for all nodes var node = nodes[i]; var connectedEdges = node.connectedEdges(); // for each connected edge, add the edge and the other node for (var j = 0; j < connectedEdges.length; j++) { var edge = connectedEdges[j]; var src = edge.source(); var tgt = edge.target(); var otherNode = node === src ? tgt : src; // need check in case of loop if (otherNode.length > 0) { elements.push(otherNode[0]); // add node 1 hop away } // add connected edge elements.push(edge[0]); } } return this.spawn(elements, true).filter(selector); }, 'neighborhood'), closedNeighborhood: function closedNeighborhood(selector) { return this.neighborhood().add(this).filter(selector); }, openNeighborhood: function openNeighborhood(selector) { return this.neighborhood(selector); } }); // aliases elesfn$2.neighbourhood = elesfn$2.neighborhood; elesfn$2.closedNeighbourhood = elesfn$2.closedNeighborhood; elesfn$2.openNeighbourhood = elesfn$2.openNeighborhood; // Edge functions ///////////////// extend(elesfn$2, { source: cache(function sourceImpl(selector) { var ele = this[0]; var src; if (ele) { src = ele._private.source || ele.cy().collection(); } return src && selector ? src.filter(selector) : src; }, 'source'), target: cache(function targetImpl(selector) { var ele = this[0]; var tgt; if (ele) { tgt = ele._private.target || ele.cy().collection(); } return tgt && selector ? tgt.filter(selector) : tgt; }, 'target'), sources: defineSourceFunction({ attr: 'source' }), targets: defineSourceFunction({ attr: 'target' }) }); function defineSourceFunction(params) { return function sourceImpl(selector) { var sources = []; for (var i = 0; i < this.length; i++) { var ele = this[i]; var src = ele._private[params.attr]; if (src) { sources.push(src); } } return this.spawn(sources, true).filter(selector); }; } extend(elesfn$2, { edgesWith: cache(defineEdgesWithFunction(), 'edgesWith'), edgesTo: cache(defineEdgesWithFunction({ thisIsSrc: true }), 'edgesTo') }); function defineEdgesWithFunction(params) { return function edgesWithImpl(otherNodes) { var elements = []; var cy = this._private.cy; var p = params || {}; // get elements if a selector is specified if (string(otherNodes)) { otherNodes = cy.$(otherNodes); } for (var h = 0; h < otherNodes.length; h++) { var edges = otherNodes[h]._private.edges; for (var i = 0; i < edges.length; i++) { var edge = edges[i]; var edgeData = edge._private.data; var thisToOther = this.hasElementWithId(edgeData.source) && otherNodes.hasElementWithId(edgeData.target); var otherToThis = otherNodes.hasElementWithId(edgeData.source) && this.hasElementWithId(edgeData.target); var edgeConnectsThisAndOther = thisToOther || otherToThis; if (!edgeConnectsThisAndOther) { continue; } if (p.thisIsSrc || p.thisIsTgt) { if (p.thisIsSrc && !thisToOther) { continue; } if (p.thisIsTgt && !otherToThis) { continue; } } elements.push(edge); } } return this.spawn(elements, true); }; } extend(elesfn$2, { connectedEdges: cache(function (selector) { var retEles = []; var eles = this; for (var i = 0; i < eles.length; i++) { var node = eles[i]; if (!node.isNode()) { continue; } var edges = node._private.edges; for (var j = 0; j < edges.length; j++) { var edge = edges[j]; retEles.push(edge); } } return this.spawn(retEles, true).filter(selector); }, 'connectedEdges'), connectedNodes: cache(function (selector) { var retEles = []; var eles = this; for (var i = 0; i < eles.length; i++) { var edge = eles[i]; if (!edge.isEdge()) { continue; } retEles.push(edge.source()[0]); retEles.push(edge.target()[0]); } return this.spawn(retEles, true).filter(selector); }, 'connectedNodes'), parallelEdges: cache(defineParallelEdgesFunction(), 'parallelEdges'), codirectedEdges: cache(defineParallelEdgesFunction({ codirected: true }), 'codirectedEdges') }); function defineParallelEdgesFunction(params) { var defaults = { codirected: false }; params = extend({}, defaults, params); return function parallelEdgesImpl(selector) { // micro-optimised for renderer var elements = []; var edges = this.edges(); var p = params; // look at all the edges in the collection for (var i = 0; i < edges.length; i++) { var edge1 = edges[i]; var edge1_p = edge1._private; var src1 = edge1_p.source; var srcid1 = src1._private.data.id; var tgtid1 = edge1_p.data.target; var srcEdges1 = src1._private.edges; // look at edges connected to the src node of this edge for (var j = 0; j < srcEdges1.length; j++) { var edge2 = srcEdges1[j]; var edge2data = edge2._private.data; var tgtid2 = edge2data.target; var srcid2 = edge2data.source; var codirected = tgtid2 === tgtid1 && srcid2 === srcid1; var oppdirected = srcid1 === tgtid2 && tgtid1 === srcid2; if (p.codirected && codirected || !p.codirected && (codirected || oppdirected)) { elements.push(edge2); } } } return this.spawn(elements, true).filter(selector); }; } // Misc functions ///////////////// extend(elesfn$2, { components: function components(root) { var self = this; var cy = self.cy(); var visited = cy.collection(); var unvisited = root == null ? self.nodes() : root.nodes(); var components = []; if (root != null && unvisited.empty()) { // root may contain only edges unvisited = root.sources(); // doesn't matter which node to use (undirected), so just use the source sides } var visitInComponent = function visitInComponent(node, component) { visited.merge(node); unvisited.unmerge(node); component.merge(node); }; if (unvisited.empty()) { return self.spawn(); } var _loop = function _loop() { // each iteration yields a component var cmpt = cy.collection(); components.push(cmpt); var root = unvisited[0]; visitInComponent(root, cmpt); self.bfs({ directed: false, roots: root, visit: function visit(v) { return visitInComponent(v, cmpt); } }); cmpt.forEach(function (node) { node.connectedEdges().forEach(function (e) { // connectedEdges() usually cached if (self.has(e) && cmpt.has(e.source()) && cmpt.has(e.target())) { // has() is cheap cmpt.merge(e); // forEach() only considers nodes -- sets N at call time } }); }); }; do { _loop(); } while (unvisited.length > 0); return components; }, component: function component() { var ele = this[0]; return ele.cy().mutableElements().components(ele)[0]; } }); elesfn$2.componentsOf = elesfn$2.components; var Collection = function Collection(cy, elements) { var unique = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; var removed = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; if (cy === undefined) { error('A collection must have a reference to the core'); return; } var map = new Map$1(); var createdElements = false; if (!elements) { elements = []; } else if (elements.length > 0 && plainObject(elements[0]) && !element(elements[0])) { createdElements = true; // make elements from json and restore all at once later var eles = []; var elesIds = new Set$1(); for (var i = 0, l = elements.length; i < l; i++) { var json = elements[i]; if (json.data == null) { json.data = {}; } var _data = json.data; // make sure newly created elements have valid ids if (_data.id == null) { _data.id = uuid(); } else if (cy.hasElementWithId(_data.id) || elesIds.has(_data.id)) { continue; // can't create element if prior id already exists } var ele = new Element(cy, json, false); eles.push(ele); elesIds.add(_data.id); } elements = eles; } this.length = 0; for (var _i = 0, _l = elements.length; _i < _l; _i++) { var element$1 = elements[_i][0]; // [0] in case elements is an array of collections, rather than array of elements if (element$1 == null) { continue; } var id = element$1._private.data.id; if (!unique || !map.has(id)) { if (unique) { map.set(id, { index: this.length, ele: element$1 }); } this[this.length] = element$1; this.length++; } } this._private = { eles: this, cy: cy, get map() { if (this.lazyMap == null) { this.rebuildMap(); } return this.lazyMap; }, set map(m) { this.lazyMap = m; }, rebuildMap: function rebuildMap() { var m = this.lazyMap = new Map$1(); var eles = this.eles; for (var _i2 = 0; _i2 < eles.length; _i2++) { var _ele = eles[_i2]; m.set(_ele.id(), { index: _i2, ele: _ele }); } } }; if (unique) { this._private.map = map; } // restore the elements if we created them from json if (createdElements && !removed) { this.restore(); } }; // Functions //////////////////////////////////////////////////////////////////////////////////////////////////// // keep the prototypes in sync (an element has the same functions as a collection) // and use elefn and elesfn as shorthands to the prototypes var elesfn$1 = Element.prototype = Collection.prototype = Object.create(Array.prototype); elesfn$1.instanceString = function () { return 'collection'; }; elesfn$1.spawn = function (eles, unique) { return new Collection(this.cy(), eles, unique); }; elesfn$1.spawnSelf = function () { return this.spawn(this); }; elesfn$1.cy = function () { return this._private.cy; }; elesfn$1.renderer = function () { return this._private.cy.renderer(); }; elesfn$1.element = function () { return this[0]; }; elesfn$1.collection = function () { if (collection(this)) { return this; } else { // an element return new Collection(this._private.cy, [this]); } }; elesfn$1.unique = function () { return new Collection(this._private.cy, this, true); }; elesfn$1.hasElementWithId = function (id) { id = '' + id; // id must be string return this._private.map.has(id); }; elesfn$1.getElementById = function (id) { id = '' + id; // id must be string var cy = this._private.cy; var entry = this._private.map.get(id); return entry ? entry.ele : new Collection(cy); // get ele or empty collection }; elesfn$1.$id = elesfn$1.getElementById; elesfn$1.poolIndex = function () { var cy = this._private.cy; var eles = cy._private.elements; var id = this[0]._private.data.id; return eles._private.map.get(id).index; }; elesfn$1.indexOf = function (ele) { var id = ele[0]._private.data.id; return this._private.map.get(id).index; }; elesfn$1.indexOfId = function (id) { id = '' + id; // id must be string return this._private.map.get(id).index; }; elesfn$1.json = function (obj) { var ele = this.element(); var cy = this.cy(); if (ele == null && obj) { return this; } // can't set to no eles if (ele == null) { return undefined; } // can't get from no eles var p = ele._private; if (plainObject(obj)) { // set cy.startBatch(); if (obj.data) { ele.data(obj.data); var _data2 = p.data; if (ele.isEdge()) { // source and target are immutable via data() var move = false; var spec = {}; var src = obj.data.source; var tgt = obj.data.target; if (src != null && src != _data2.source) { spec.source = '' + src; // id must be string move = true; } if (tgt != null && tgt != _data2.target) { spec.target = '' + tgt; // id must be string move = true; } if (move) { ele = ele.move(spec); } } else { // parent is immutable via data() var newParentValSpecd = ('parent' in obj.data); var parent = obj.data.parent; if (newParentValSpecd && (parent != null || _data2.parent != null) && parent != _data2.parent) { if (parent === undefined) { // can't set undefined imperatively, so use null parent = null; } if (parent != null) { parent = '' + parent; // id must be string } ele = ele.move({ parent: parent }); } } } if (obj.position) { ele.position(obj.position); } // ignore group -- immutable var checkSwitch = function checkSwitch(k, trueFnName, falseFnName) { var obj_k = obj[k]; if (obj_k != null && obj_k !== p[k]) { if (obj_k) { ele[trueFnName](); } else { ele[falseFnName](); } } }; checkSwitch('removed', 'remove', 'restore'); checkSwitch('selected', 'select', 'unselect'); checkSwitch('selectable', 'selectify', 'unselectify'); checkSwitch('locked', 'lock', 'unlock'); checkSwitch('grabbable', 'grabify', 'ungrabify'); checkSwitch('pannable', 'panify', 'unpanify'); if (obj.classes != null) { ele.classes(obj.classes); } cy.endBatch(); return this; } else if (obj === undefined) { // get var json = { data: copy(p.data), position: copy(p.position), group: p.group, removed: p.removed, selected: p.selected, selectable: p.selectable, locked: p.locked, grabbable: p.grabbable, pannable: p.pannable, classes: null }; json.classes = ''; var i = 0; p.classes.forEach(function (cls) { return json.classes += i++ === 0 ? cls : ' ' + cls; }); return json; } }; elesfn$1.jsons = function () { var jsons = []; for (var i = 0; i < this.length; i++) { var ele = this[i]; var json = ele.json(); jsons.push(json); } return jsons; }; elesfn$1.clone = function () { var cy = this.cy(); var elesArr = []; for (var i = 0; i < this.length; i++) { var ele = this[i]; var json = ele.json(); var clone = new Element(cy, json, false); // NB no restore elesArr.push(clone); } return new Collection(cy, elesArr); }; elesfn$1.copy = elesfn$1.clone; elesfn$1.restore = function () { var notifyRenderer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; var addToPool = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; var self = this; var cy = self.cy(); var cy_p = cy._private; // create arrays of nodes and edges, since we need to // restore the nodes first var nodes = []; var edges = []; var elements; for (var _i3 = 0, l = self.length; _i3 < l; _i3++) { var ele = self[_i3]; if (addToPool && !ele.removed()) { // don't need to handle this ele continue; } // keep nodes first in the array and edges after if (ele.isNode()) { // put to front of array if node nodes.push(ele); } else { // put to end of array if edge edges.push(ele); } } elements = nodes.concat(edges); var i; var removeFromElements = function removeFromElements() { elements.splice(i, 1); i--; }; // now, restore each element for (i = 0; i < elements.length; i++) { var _ele2 = elements[i]; var _private = _ele2._private; var _data3 = _private.data; // the traversal cache should start fresh when ele is added _ele2.clearTraversalCache(); // set id and validate if (!addToPool && !_private.removed) ; else if (_data3.id === undefined) { _data3.id = uuid(); } else if (number$1(_data3.id)) { _data3.id = '' + _data3.id; // now it's a string } else if (emptyString(_data3.id) || !string(_data3.id)) { error('Can not create element with invalid string ID `' + _data3.id + '`'); // can't create element if it has empty string as id or non-string id removeFromElements(); continue; } else if (cy.hasElementWithId(_data3.id)) { error('Can not create second element with ID `' + _data3.id + '`'); // can't create element if one already has that id removeFromElements(); continue; } var id = _data3.id; // id is finalised, now let's keep a ref if (_ele2.isNode()) { // extra checks for nodes var pos = _private.position; // make sure the nodes have a defined position if (pos.x == null) { pos.x = 0; } if (pos.y == null) { pos.y = 0; } } if (_ele2.isEdge()) { // extra checks for edges var edge = _ele2; var fields = ['source', 'target']; var fieldsLength = fields.length; var badSourceOrTarget = false; for (var j = 0; j < fieldsLength; j++) { var field = fields[j]; var val = _data3[field]; if (number$1(val)) { val = _data3[field] = '' + _data3[field]; // now string } if (val == null || val === '') { // can't create if source or target is not defined properly error('Can not create edge `' + id + '` with unspecified ' + field); badSourceOrTarget = true; } else if (!cy.hasElementWithId(val)) { // can't create edge if one of its nodes doesn't exist error('Can not create edge `' + id + '` with nonexistant ' + field + ' `' + val + '`'); badSourceOrTarget = true; } } if (badSourceOrTarget) { removeFromElements(); continue; } // can't create this var src = cy.getElementById(_data3.source); var tgt = cy.getElementById(_data3.target); // only one edge in node if loop if (src.same(tgt)) { src._private.edges.push(edge); } else { src._private.edges.push(edge); tgt._private.edges.push(edge); } edge._private.source = src; edge._private.target = tgt; } // if is edge // create mock ids / indexes maps for element so it can be used like collections _private.map = new Map$1(); _private.map.set(id, { ele: _ele2, index: 0 }); _private.removed = false; if (addToPool) { cy.addToPool(_ele2); } } // for each element // do compound node sanity checks for (var _i4 = 0; _i4 < nodes.length; _i4++) { // each node var node = nodes[_i4]; var _data4 = node._private.data; if (number$1(_data4.parent)) { // then automake string _data4.parent = '' + _data4.parent; } var parentId = _data4.parent; var specifiedParent = parentId != null; if (specifiedParent || node._private.parent) { var parent = node._private.parent ? cy.collection().merge(node._private.parent) : cy.getElementById(parentId); if (parent.empty()) { // non-existant parent; just remove it _data4.parent = undefined; } else if (parent[0].removed()) { warn('Node added with missing parent, reference to parent removed'); _data4.parent = undefined; node._private.parent = null; } else { var selfAsParent = false; var ancestor = parent; while (!ancestor.empty()) { if (node.same(ancestor)) { // mark self as parent and remove from data selfAsParent = true; _data4.parent = undefined; // remove parent reference // exit or we loop forever break; } ancestor = ancestor.parent(); } if (!selfAsParent) { // connect with children parent[0]._private.children.push(node); node._private.parent = parent[0]; // let the core know we have a compound graph cy_p.hasCompoundNodes = true; } } // else } // if specified parent } // for each node if (elements.length > 0) { var restored = elements.length === self.length ? self : new Collection(cy, elements); for (var _i5 = 0; _i5 < restored.length; _i5++) { var _ele3 = restored[_i5]; if (_ele3.isNode()) { continue; } // adding an edge invalidates the traversal caches for the parallel edges _ele3.parallelEdges().clearTraversalCache(); // adding an edge invalidates the traversal cache for the connected nodes _ele3.source().clearTraversalCache(); _ele3.target().clearTraversalCache(); } var toUpdateStyle; if (cy_p.hasCompoundNodes) { toUpdateStyle = cy.collection().merge(restored).merge(restored.connectedNodes()).merge(restored.parent()); } else { toUpdateStyle = restored; } toUpdateStyle.dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(notifyRenderer); if (notifyRenderer) { restored.emitAndNotify('add'); } else if (addToPool) { restored.emit('add'); } } return self; // chainability }; elesfn$1.removed = function () { var ele = this[0]; return ele && ele._private.removed; }; elesfn$1.inside = function () { var ele = this[0]; return ele && !ele._private.removed; }; elesfn$1.remove = function () { var notifyRenderer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; var removeFromPool = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; var self = this; var elesToRemove = []; var elesToRemoveIds = {}; var cy = self._private.cy; // add connected edges function addConnectedEdges(node) { var edges = node._private.edges; for (var i = 0; i < edges.length; i++) { add(edges[i]); } } // add descendant nodes function addChildren(node) { var children = node._private.children; for (var i = 0; i < children.length; i++) { add(children[i]); } } function add(ele) { var alreadyAdded = elesToRemoveIds[ele.id()]; if (removeFromPool && ele.removed() || alreadyAdded) { return; } else { elesToRemoveIds[ele.id()] = true; } if (ele.isNode()) { elesToRemove.push(ele); // nodes are removed last addConnectedEdges(ele); addChildren(ele); } else { elesToRemove.unshift(ele); // edges are removed first } } // make the list of elements to remove // (may be removing more than specified due to connected edges etc) for (var i = 0, l = self.length; i < l; i++) { var ele = self[i]; add(ele); } function removeEdgeRef(node, edge) { var connectedEdges = node._private.edges; removeFromArray(connectedEdges, edge); // removing an edges invalidates the traversal cache for its nodes node.clearTraversalCache(); } function removeParallelRef(pllEdge) { // removing an edge invalidates the traversal caches for the parallel edges pllEdge.clearTraversalCache(); } var alteredParents = []; alteredParents.ids = {}; function removeChildRef(parent, ele) { ele = ele[0]; parent = parent[0]; var children = parent._private.children; var pid = parent.id(); removeFromArray(children, ele); // remove parent => child ref ele._private.parent = null; // remove child => parent ref if (!alteredParents.ids[pid]) { alteredParents.ids[pid] = true; alteredParents.push(parent); } } self.dirtyCompoundBoundsCache(); if (removeFromPool) { cy.removeFromPool(elesToRemove); // remove from core pool } for (var _i6 = 0; _i6 < elesToRemove.length; _i6++) { var _ele4 = elesToRemove[_i6]; if (_ele4.isEdge()) { // remove references to this edge in its connected nodes var src = _ele4.source()[0]; var tgt = _ele4.target()[0]; removeEdgeRef(src, _ele4); removeEdgeRef(tgt, _ele4); var pllEdges = _ele4.parallelEdges(); for (var j = 0; j < pllEdges.length; j++) { var pllEdge = pllEdges[j]; removeParallelRef(pllEdge); if (pllEdge.isBundledBezier()) { pllEdge.dirtyBoundingBoxCache(); } } } else { // remove reference to parent var parent = _ele4.parent(); if (parent.length !== 0) { removeChildRef(parent, _ele4); } } if (removeFromPool) { // mark as removed _ele4._private.removed = true; } } // check to see if we have a compound graph or not var elesStillInside = cy._private.elements; cy._private.hasCompoundNodes = false; for (var _i7 = 0; _i7 < elesStillInside.length; _i7++) { var _ele5 = elesStillInside[_i7]; if (_ele5.isParent()) { cy._private.hasCompoundNodes = true; break; } } var removedElements = new Collection(this.cy(), elesToRemove); if (removedElements.size() > 0) { // must manually notify since trigger won't do this automatically once removed if (notifyRenderer) { removedElements.emitAndNotify('remove'); } else if (removeFromPool) { removedElements.emit('remove'); } } // the parents who were modified by the removal need their style updated for (var _i8 = 0; _i8 < alteredParents.length; _i8++) { var _ele6 = alteredParents[_i8]; if (!removeFromPool || !_ele6.removed()) { _ele6.updateStyle(); } } return removedElements; }; elesfn$1.move = function (struct) { var cy = this._private.cy; var eles = this; // just clean up refs, caches, etc. in the same way as when removing and then restoring // (our calls to remove/restore do not remove from the graph or make events) var notifyRenderer = false; var modifyPool = false; var toString = function toString(id) { return id == null ? id : '' + id; }; // id must be string if (struct.source !== undefined || struct.target !== undefined) { var srcId = toString(struct.source); var tgtId = toString(struct.target); var srcExists = srcId != null && cy.hasElementWithId(srcId); var tgtExists = tgtId != null && cy.hasElementWithId(tgtId); if (srcExists || tgtExists) { cy.batch(function () { // avoid duplicate style updates eles.remove(notifyRenderer, modifyPool); // clean up refs etc. eles.emitAndNotify('moveout'); for (var i = 0; i < eles.length; i++) { var ele = eles[i]; var _data5 = ele._private.data; if (ele.isEdge()) { if (srcExists) { _data5.source = srcId; } if (tgtExists) { _data5.target = tgtId; } } } eles.restore(notifyRenderer, modifyPool); // make new refs, style, etc. }); eles.emitAndNotify('move'); } } else if (struct.parent !== undefined) { // move node to new parent var parentId = toString(struct.parent); var parentExists = parentId === null || cy.hasElementWithId(parentId); if (parentExists) { var pidToAssign = parentId === null ? undefined : parentId; cy.batch(function () { // avoid duplicate style updates var updated = eles.remove(notifyRenderer, modifyPool); // clean up refs etc. updated.emitAndNotify('moveout'); for (var i = 0; i < eles.length; i++) { var ele = eles[i]; var _data6 = ele._private.data; if (ele.isNode()) { _data6.parent = pidToAssign; } } updated.restore(notifyRenderer, modifyPool); // make new refs, style, etc. }); eles.emitAndNotify('move'); } } return this; }; [elesfn$j, elesfn$i, elesfn$h, elesfn$g, elesfn$f, data, elesfn$d, dimensions, elesfn$9, elesfn$8, elesfn$7, elesfn$6, elesfn$5, elesfn$4, elesfn$3, elesfn$2].forEach(function (props) { extend(elesfn$1, props); }); var corefn$9 = { add: function add(opts) { var elements; var cy = this; // add the elements if (elementOrCollection(opts)) { var eles = opts; if (eles._private.cy === cy) { // same instance => just restore elements = eles.restore(); } else { // otherwise, copy from json var jsons = []; for (var i = 0; i < eles.length; i++) { var ele = eles[i]; jsons.push(ele.json()); } elements = new Collection(cy, jsons); } } // specify an array of options else if (array(opts)) { var _jsons = opts; elements = new Collection(cy, _jsons); } // specify via opts.nodes and opts.edges else if (plainObject(opts) && (array(opts.nodes) || array(opts.edges))) { var elesByGroup = opts; var _jsons2 = []; var grs = ['nodes', 'edges']; for (var _i = 0, il = grs.length; _i < il; _i++) { var group = grs[_i]; var elesArray = elesByGroup[group]; if (array(elesArray)) { for (var j = 0, jl = elesArray.length; j < jl; j++) { var json = extend({ group: group }, elesArray[j]); _jsons2.push(json); } } } elements = new Collection(cy, _jsons2); } // specify options for one element else { var _json = opts; elements = new Element(cy, _json).collection(); } return elements; }, remove: function remove(collection) { if (elementOrCollection(collection)) ; else if (string(collection)) { var selector = collection; collection = this.$(selector); } return collection.remove(); } }; /* global Float32Array */ /*! Bezier curve function generator. Copyright Gaetan Renaudeau. MIT License: http://en.wikipedia.org/wiki/MIT_License */ function generateCubicBezier(mX1, mY1, mX2, mY2) { var NEWTON_ITERATIONS = 4, NEWTON_MIN_SLOPE = 0.001, SUBDIVISION_PRECISION = 0.0000001, SUBDIVISION_MAX_ITERATIONS = 10, kSplineTableSize = 11, kSampleStepSize = 1.0 / (kSplineTableSize - 1.0), float32ArraySupported = typeof Float32Array !== 'undefined'; /* Must contain four arguments. */ if (arguments.length !== 4) { return false; } /* Arguments must be numbers. */ for (var i = 0; i < 4; ++i) { if (typeof arguments[i] !== "number" || isNaN(arguments[i]) || !isFinite(arguments[i])) { return false; } } /* X values must be in the [0, 1] range. */ mX1 = Math.min(mX1, 1); mX2 = Math.min(mX2, 1); mX1 = Math.max(mX1, 0); mX2 = Math.max(mX2, 0); var mSampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize); function A(aA1, aA2) { return 1.0 - 3.0 * aA2 + 3.0 * aA1; } function B(aA1, aA2) { return 3.0 * aA2 - 6.0 * aA1; } function C(aA1) { return 3.0 * aA1; } function calcBezier(aT, aA1, aA2) { return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT; } function getSlope(aT, aA1, aA2) { return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1); } function newtonRaphsonIterate(aX, aGuessT) { for (var _i = 0; _i < NEWTON_ITERATIONS; ++_i) { var currentSlope = getSlope(aGuessT, mX1, mX2); if (currentSlope === 0.0) { return aGuessT; } var currentX = calcBezier(aGuessT, mX1, mX2) - aX; aGuessT -= currentX / currentSlope; } return aGuessT; } function calcSampleValues() { for (var _i2 = 0; _i2 < kSplineTableSize; ++_i2) { mSampleValues[_i2] = calcBezier(_i2 * kSampleStepSize, mX1, mX2); } } function binarySubdivide(aX, aA, aB) { var currentX, currentT, i = 0; do { currentT = aA + (aB - aA) / 2.0; currentX = calcBezier(currentT, mX1, mX2) - aX; if (currentX > 0.0) { aB = currentT; } else { aA = currentT; } } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS); return currentT; } function getTForX(aX) { var intervalStart = 0.0, currentSample = 1, lastSample = kSplineTableSize - 1; for (; currentSample !== lastSample && mSampleValues[currentSample] <= aX; ++currentSample) { intervalStart += kSampleStepSize; } --currentSample; var dist = (aX - mSampleValues[currentSample]) / (mSampleValues[currentSample + 1] - mSampleValues[currentSample]), guessForT = intervalStart + dist * kSampleStepSize, initialSlope = getSlope(guessForT, mX1, mX2); if (initialSlope >= NEWTON_MIN_SLOPE) { return newtonRaphsonIterate(aX, guessForT); } else if (initialSlope === 0.0) { return guessForT; } else { return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize); } } var _precomputed = false; function precompute() { _precomputed = true; if (mX1 !== mY1 || mX2 !== mY2) { calcSampleValues(); } } var f = function f(aX) { if (!_precomputed) { precompute(); } if (mX1 === mY1 && mX2 === mY2) { return aX; } if (aX === 0) { return 0; } if (aX === 1) { return 1; } return calcBezier(getTForX(aX), mY1, mY2); }; f.getControlPoints = function () { return [{ x: mX1, y: mY1 }, { x: mX2, y: mY2 }]; }; var str = "generateBezier(" + [mX1, mY1, mX2, mY2] + ")"; f.toString = function () { return str; }; return f; } /*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License */ /* Given a tension, friction, and duration, a simulation at 60FPS will first run without a defined duration in order to calculate the full path. A second pass then adjusts the time delta -- using the relation between actual time and duration -- to calculate the path for the duration-constrained animation. */ var generateSpringRK4 = function () { function springAccelerationForState(state) { return -state.tension * state.x - state.friction * state.v; } function springEvaluateStateWithDerivative(initialState, dt, derivative) { var state = { x: initialState.x + derivative.dx * dt, v: initialState.v + derivative.dv * dt, tension: initialState.tension, friction: initialState.friction }; return { dx: state.v, dv: springAccelerationForState(state) }; } function springIntegrateState(state, dt) { var a = { dx: state.v, dv: springAccelerationForState(state) }, b = springEvaluateStateWithDerivative(state, dt * 0.5, a), c = springEvaluateStateWithDerivative(state, dt * 0.5, b), d = springEvaluateStateWithDerivative(state, dt, c), dxdt = 1.0 / 6.0 * (a.dx + 2.0 * (b.dx + c.dx) + d.dx), dvdt = 1.0 / 6.0 * (a.dv + 2.0 * (b.dv + c.dv) + d.dv); state.x = state.x + dxdt * dt; state.v = state.v + dvdt * dt; return state; } return function springRK4Factory(tension, friction, duration) { var initState = { x: -1, v: 0, tension: null, friction: null }, path = [0], time_lapsed = 0, tolerance = 1 / 10000, DT = 16 / 1000, have_duration, dt, last_state; tension = parseFloat(tension) || 500; friction = parseFloat(friction) || 20; duration = duration || null; initState.tension = tension; initState.friction = friction; have_duration = duration !== null; /* Calculate the actual time it takes for this animation to complete with the provided conditions. */ if (have_duration) { /* Run the simulation without a duration. */ time_lapsed = springRK4Factory(tension, friction); /* Compute the adjusted time delta. */ dt = time_lapsed / duration * DT; } else { dt = DT; } for (;;) { /* Next/step function .*/ last_state = springIntegrateState(last_state || initState, dt); /* Store the position. */ path.push(1 + last_state.x); time_lapsed += 16; /* If the change threshold is reached, break. */ if (!(Math.abs(last_state.x) > tolerance && Math.abs(last_state.v) > tolerance)) { break; } } /* If duration is not defined, return the actual time required for completing this animation. Otherwise, return a closure that holds the computed path and returns a snapshot of the position according to a given percentComplete. */ return !have_duration ? time_lapsed : function (percentComplete) { return path[percentComplete * (path.length - 1) | 0]; }; }; }(); var cubicBezier = function cubicBezier(t1, p1, t2, p2) { var bezier = generateCubicBezier(t1, p1, t2, p2); return function (start, end, percent) { return start + (end - start) * bezier(percent); }; }; var easings = { 'linear': function linear(start, end, percent) { return start + (end - start) * percent; }, // default easings 'ease': cubicBezier(0.25, 0.1, 0.25, 1), 'ease-in': cubicBezier(0.42, 0, 1, 1), 'ease-out': cubicBezier(0, 0, 0.58, 1), 'ease-in-out': cubicBezier(0.42, 0, 0.58, 1), // sine 'ease-in-sine': cubicBezier(0.47, 0, 0.745, 0.715), 'ease-out-sine': cubicBezier(0.39, 0.575, 0.565, 1), 'ease-in-out-sine': cubicBezier(0.445, 0.05, 0.55, 0.95), // quad 'ease-in-quad': cubicBezier(0.55, 0.085, 0.68, 0.53), 'ease-out-quad': cubicBezier(0.25, 0.46, 0.45, 0.94), 'ease-in-out-quad': cubicBezier(0.455, 0.03, 0.515, 0.955), // cubic 'ease-in-cubic': cubicBezier(0.55, 0.055, 0.675, 0.19), 'ease-out-cubic': cubicBezier(0.215, 0.61, 0.355, 1), 'ease-in-out-cubic': cubicBezier(0.645, 0.045, 0.355, 1), // quart 'ease-in-quart': cubicBezier(0.895, 0.03, 0.685, 0.22), 'ease-out-quart': cubicBezier(0.165, 0.84, 0.44, 1), 'ease-in-out-quart': cubicBezier(0.77, 0, 0.175, 1), // quint 'ease-in-quint': cubicBezier(0.755, 0.05, 0.855, 0.06), 'ease-out-quint': cubicBezier(0.23, 1, 0.32, 1), 'ease-in-out-quint': cubicBezier(0.86, 0, 0.07, 1), // expo 'ease-in-expo': cubicBezier(0.95, 0.05, 0.795, 0.035), 'ease-out-expo': cubicBezier(0.19, 1, 0.22, 1), 'ease-in-out-expo': cubicBezier(1, 0, 0, 1), // circ 'ease-in-circ': cubicBezier(0.6, 0.04, 0.98, 0.335), 'ease-out-circ': cubicBezier(0.075, 0.82, 0.165, 1), 'ease-in-out-circ': cubicBezier(0.785, 0.135, 0.15, 0.86), // user param easings... 'spring': function spring(tension, friction, duration) { if (duration === 0) { // can't get a spring w/ duration 0 return easings.linear; // duration 0 => jump to end so impl doesn't matter } var spring = generateSpringRK4(tension, friction, duration); return function (start, end, percent) { return start + (end - start) * spring(percent); }; }, 'cubic-bezier': cubicBezier }; function getEasedValue(type, start, end, percent, easingFn) { if (percent === 1) { return end; } if (start === end) { return end; } var val = easingFn(start, end, percent); if (type == null) { return val; } if (type.roundValue || type.color) { val = Math.round(val); } if (type.min !== undefined) { val = Math.max(val, type.min); } if (type.max !== undefined) { val = Math.min(val, type.max); } return val; } function getValue(prop, spec) { if (prop.pfValue != null || prop.value != null) { if (prop.pfValue != null && (spec == null || spec.type.units !== '%')) { return prop.pfValue; } else { return prop.value; } } else { return prop; } } function ease(startProp, endProp, percent, easingFn, propSpec) { var type = propSpec != null ? propSpec.type : null; if (percent < 0) { percent = 0; } else if (percent > 1) { percent = 1; } var start = getValue(startProp, propSpec); var end = getValue(endProp, propSpec); if (number$1(start) && number$1(end)) { return getEasedValue(type, start, end, percent, easingFn); } else if (array(start) && array(end)) { var easedArr = []; for (var i = 0; i < end.length; i++) { var si = start[i]; var ei = end[i]; if (si != null && ei != null) { var val = getEasedValue(type, si, ei, percent, easingFn); easedArr.push(val); } else { easedArr.push(ei); } } return easedArr; } return undefined; } function step$1(self, ani, now, isCore) { var isEles = !isCore; var _p = self._private; var ani_p = ani._private; var pEasing = ani_p.easing; var startTime = ani_p.startTime; var cy = isCore ? self : self.cy(); var style = cy.style(); if (!ani_p.easingImpl) { if (pEasing == null) { // use default ani_p.easingImpl = easings['linear']; } else { // then define w/ name var easingVals; if (string(pEasing)) { var easingProp = style.parse('transition-timing-function', pEasing); easingVals = easingProp.value; } else { // then assume preparsed array easingVals = pEasing; } var name, args; if (string(easingVals)) { name = easingVals; args = []; } else { name = easingVals[1]; args = easingVals.slice(2).map(function (n) { return +n; }); } if (args.length > 0) { // create with args if (name === 'spring') { args.push(ani_p.duration); // need duration to generate spring } ani_p.easingImpl = easings[name].apply(null, args); } else { // static impl by name ani_p.easingImpl = easings[name]; } } } var easing = ani_p.easingImpl; var percent; if (ani_p.duration === 0) { percent = 1; } else { percent = (now - startTime) / ani_p.duration; } if (ani_p.applying) { percent = ani_p.progress; } if (percent < 0) { percent = 0; } else if (percent > 1) { percent = 1; } if (ani_p.delay == null) { // then update var startPos = ani_p.startPosition; var endPos = ani_p.position; if (endPos && isEles && !self.locked()) { var newPos = {}; if (valid(startPos.x, endPos.x)) { newPos.x = ease(startPos.x, endPos.x, percent, easing); } if (valid(startPos.y, endPos.y)) { newPos.y = ease(startPos.y, endPos.y, percent, easing); } self.position(newPos); } var startPan = ani_p.startPan; var endPan = ani_p.pan; var pan = _p.pan; var animatingPan = endPan != null && isCore; if (animatingPan) { if (valid(startPan.x, endPan.x)) { pan.x = ease(startPan.x, endPan.x, percent, easing); } if (valid(startPan.y, endPan.y)) { pan.y = ease(startPan.y, endPan.y, percent, easing); } self.emit('pan'); } var startZoom = ani_p.startZoom; var endZoom = ani_p.zoom; var animatingZoom = endZoom != null && isCore; if (animatingZoom) { if (valid(startZoom, endZoom)) { _p.zoom = bound(_p.minZoom, ease(startZoom, endZoom, percent, easing), _p.maxZoom); } self.emit('zoom'); } if (animatingPan || animatingZoom) { self.emit('viewport'); } var props = ani_p.style; if (props && props.length > 0 && isEles) { for (var i = 0; i < props.length; i++) { var prop = props[i]; var _name = prop.name; var end = prop; var start = ani_p.startStyle[_name]; var propSpec = style.properties[start.name]; var easedVal = ease(start, end, percent, easing, propSpec); style.overrideBypass(self, _name, easedVal); } // for props self.emit('style'); } // if } ani_p.progress = percent; return percent; } function valid(start, end) { if (start == null || end == null) { return false; } if (number$1(start) && number$1(end)) { return true; } else if (start && end) { return true; } return false; } function startAnimation(self, ani, now, isCore) { var ani_p = ani._private; ani_p.started = true; ani_p.startTime = now - ani_p.progress * ani_p.duration; } function stepAll(now, cy) { var eles = cy._private.aniEles; var doneEles = []; function stepOne(ele, isCore) { var _p = ele._private; var current = _p.animation.current; var queue = _p.animation.queue; var ranAnis = false; // if nothing currently animating, get something from the queue if (current.length === 0) { var next = queue.shift(); if (next) { current.push(next); } } var callbacks = function callbacks(_callbacks) { for (var j = _callbacks.length - 1; j >= 0; j--) { var cb = _callbacks[j]; cb(); } _callbacks.splice(0, _callbacks.length); }; // step and remove if done for (var i = current.length - 1; i >= 0; i--) { var ani = current[i]; var ani_p = ani._private; if (ani_p.stopped) { current.splice(i, 1); ani_p.hooked = false; ani_p.playing = false; ani_p.started = false; callbacks(ani_p.frames); continue; } if (!ani_p.playing && !ani_p.applying) { continue; } // an apply() while playing shouldn't do anything if (ani_p.playing && ani_p.applying) { ani_p.applying = false; } if (!ani_p.started) { startAnimation(ele, ani, now); } step$1(ele, ani, now, isCore); if (ani_p.applying) { ani_p.applying = false; } callbacks(ani_p.frames); if (ani_p.step != null) { ani_p.step(now); } if (ani.completed()) { current.splice(i, 1); ani_p.hooked = false; ani_p.playing = false; ani_p.started = false; callbacks(ani_p.completes); } ranAnis = true; } if (!isCore && current.length === 0 && queue.length === 0) { doneEles.push(ele); } return ranAnis; } // stepElement // handle all eles var ranEleAni = false; for (var e = 0; e < eles.length; e++) { var ele = eles[e]; var handledThisEle = stepOne(ele); ranEleAni = ranEleAni || handledThisEle; } // each element var ranCoreAni = stepOne(cy, true); // notify renderer if (ranEleAni || ranCoreAni) { if (eles.length > 0) { cy.notify('draw', eles); } else { cy.notify('draw'); } } // remove elements from list of currently animating if its queues are empty eles.unmerge(doneEles); cy.emit('step'); } // stepAll var corefn$8 = { // pull in animation functions animate: define.animate(), animation: define.animation(), animated: define.animated(), clearQueue: define.clearQueue(), delay: define.delay(), delayAnimation: define.delayAnimation(), stop: define.stop(), addToAnimationPool: function addToAnimationPool(eles) { var cy = this; if (!cy.styleEnabled()) { return; } // save cycles when no style used cy._private.aniEles.merge(eles); }, stopAnimationLoop: function stopAnimationLoop() { this._private.animationsRunning = false; }, startAnimationLoop: function startAnimationLoop() { var cy = this; cy._private.animationsRunning = true; if (!cy.styleEnabled()) { return; } // save cycles when no style used // NB the animation loop will exec in headless environments if style enabled // and explicit cy.destroy() is necessary to stop the loop function headlessStep() { if (!cy._private.animationsRunning) { return; } requestAnimationFrame(function animationStep(now) { stepAll(now, cy); headlessStep(); }); } var renderer = cy.renderer(); if (renderer && renderer.beforeRender) { // let the renderer schedule animations renderer.beforeRender(function rendererAnimationStep(willDraw, now) { stepAll(now, cy); }, renderer.beforeRenderPriorities.animations); } else { // manage the animation loop ourselves headlessStep(); // first call } } }; var emitterOptions = { qualifierCompare: function qualifierCompare(selector1, selector2) { if (selector1 == null || selector2 == null) { return selector1 == null && selector2 == null; } else { return selector1.sameText(selector2); } }, eventMatches: function eventMatches(cy, listener, eventObj) { var selector = listener.qualifier; if (selector != null) { return cy !== eventObj.target && element(eventObj.target) && selector.matches(eventObj.target); } return true; }, addEventFields: function addEventFields(cy, evt) { evt.cy = cy; evt.target = cy; }, callbackContext: function callbackContext(cy, listener, eventObj) { return listener.qualifier != null ? eventObj.target : cy; } }; var argSelector = function argSelector(arg) { if (string(arg)) { return new Selector(arg); } else { return arg; } }; var elesfn = { createEmitter: function createEmitter() { var _p = this._private; if (!_p.emitter) { _p.emitter = new Emitter(emitterOptions, this); } return this; }, emitter: function emitter() { return this._private.emitter; }, on: function on(events, selector, callback) { this.emitter().on(events, argSelector(selector), callback); return this; }, removeListener: function removeListener(events, selector, callback) { this.emitter().removeListener(events, argSelector(selector), callback); return this; }, removeAllListeners: function removeAllListeners() { this.emitter().removeAllListeners(); return this; }, one: function one(events, selector, callback) { this.emitter().one(events, argSelector(selector), callback); return this; }, once: function once(events, selector, callback) { this.emitter().one(events, argSelector(selector), callback); return this; }, emit: function emit(events, extraParams) { this.emitter().emit(events, extraParams); return this; }, emitAndNotify: function emitAndNotify(event, eles) { this.emit(event); this.notify(event, eles); return this; } }; define.eventAliasesOn(elesfn); var corefn$7 = { png: function png(options) { var renderer = this._private.renderer; options = options || {}; return renderer.png(options); }, jpg: function jpg(options) { var renderer = this._private.renderer; options = options || {}; options.bg = options.bg || '#fff'; return renderer.jpg(options); } }; corefn$7.jpeg = corefn$7.jpg; var corefn$6 = { layout: function layout(options) { var cy = this; if (options == null) { error('Layout options must be specified to make a layout'); return; } if (options.name == null) { error('A `name` must be specified to make a layout'); return; } var name = options.name; var Layout = cy.extension('layout', name); if (Layout == null) { error('No such layout `' + name + '` found. Did you forget to import it and `cytoscape.use()` it?'); return; } var eles; if (string(options.eles)) { eles = cy.$(options.eles); } else { eles = options.eles != null ? options.eles : cy.$(); } var layout = new Layout(extend({}, options, { cy: cy, eles: eles })); return layout; } }; corefn$6.createLayout = corefn$6.makeLayout = corefn$6.layout; var corefn$5 = { notify: function notify(eventName, eventEles) { var _p = this._private; if (this.batching()) { _p.batchNotifications = _p.batchNotifications || {}; var eles = _p.batchNotifications[eventName] = _p.batchNotifications[eventName] || this.collection(); if (eventEles != null) { eles.merge(eventEles); } return; // notifications are disabled during batching } if (!_p.notificationsEnabled) { return; } // exit on disabled var renderer = this.renderer(); // exit if destroy() called on core or renderer in between frames #1499 #1528 if (this.destroyed() || !renderer) { return; } renderer.notify(eventName, eventEles); }, notifications: function notifications(bool) { var p = this._private; if (bool === undefined) { return p.notificationsEnabled; } else { p.notificationsEnabled = bool ? true : false; } return this; }, noNotifications: function noNotifications(callback) { this.notifications(false); callback(); this.notifications(true); }, batching: function batching() { return this._private.batchCount > 0; }, startBatch: function startBatch() { var _p = this._private; if (_p.batchCount == null) { _p.batchCount = 0; } if (_p.batchCount === 0) { _p.batchStyleEles = this.collection(); _p.batchNotifications = {}; } _p.batchCount++; return this; }, endBatch: function endBatch() { var _p = this._private; if (_p.batchCount === 0) { return this; } _p.batchCount--; if (_p.batchCount === 0) { // update style for dirty eles _p.batchStyleEles.updateStyle(); var renderer = this.renderer(); // notify the renderer of queued eles and event types Object.keys(_p.batchNotifications).forEach(function (eventName) { var eles = _p.batchNotifications[eventName]; if (eles.empty()) { renderer.notify(eventName); } else { renderer.notify(eventName, eles); } }); } return this; }, batch: function batch(callback) { this.startBatch(); callback(); this.endBatch(); return this; }, // for backwards compatibility batchData: function batchData(map) { var cy = this; return this.batch(function () { var ids = Object.keys(map); for (var i = 0; i < ids.length; i++) { var id = ids[i]; var data = map[id]; var ele = cy.getElementById(id); ele.data(data); } }); } }; var rendererDefaults = defaults$g({ hideEdgesOnViewport: false, textureOnViewport: false, motionBlur: false, motionBlurOpacity: 0.05, pixelRatio: undefined, desktopTapThreshold: 4, touchTapThreshold: 8, wheelSensitivity: 1, debug: false, showFps: false }); var corefn$4 = { renderTo: function renderTo(context, zoom, pan, pxRatio) { var r = this._private.renderer; r.renderTo(context, zoom, pan, pxRatio); return this; }, renderer: function renderer() { return this._private.renderer; }, forceRender: function forceRender() { this.notify('draw'); return this; }, resize: function resize() { this.invalidateSize(); this.emitAndNotify('resize'); return this; }, initRenderer: function initRenderer(options) { var cy = this; var RendererProto = cy.extension('renderer', options.name); if (RendererProto == null) { error("Can not initialise: No such renderer `".concat(options.name, "` found. Did you forget to import it and `cytoscape.use()` it?")); return; } if (options.wheelSensitivity !== undefined) { warn("You have set a custom wheel sensitivity. This will make your app zoom unnaturally when using mainstream mice. You should change this value from the default only if you can guarantee that all your users will use the same hardware and OS configuration as your current machine."); } var rOpts = rendererDefaults(options); rOpts.cy = cy; cy._private.renderer = new RendererProto(rOpts); this.notify('init'); }, destroyRenderer: function destroyRenderer() { var cy = this; cy.notify('destroy'); // destroy the renderer var domEle = cy.container(); if (domEle) { domEle._cyreg = null; while (domEle.childNodes.length > 0) { domEle.removeChild(domEle.childNodes[0]); } } cy._private.renderer = null; // to be extra safe, remove the ref cy.mutableElements().forEach(function (ele) { var _p = ele._private; _p.rscratch = {}; _p.rstyle = {}; _p.animation.current = []; _p.animation.queue = []; }); }, onRender: function onRender(fn) { return this.on('render', fn); }, offRender: function offRender(fn) { return this.off('render', fn); } }; corefn$4.invalidateDimensions = corefn$4.resize; var corefn$3 = { // get a collection // - empty collection on no args // - collection of elements in the graph on selector arg // - guarantee a returned collection when elements or collection specified collection: function collection(eles, opts) { if (string(eles)) { return this.$(eles); } else if (elementOrCollection(eles)) { return eles.collection(); } else if (array(eles)) { if (!opts) { opts = {}; } return new Collection(this, eles, opts.unique, opts.removed); } return new Collection(this); }, nodes: function nodes(selector) { var nodes = this.$(function (ele) { return ele.isNode(); }); if (selector) { return nodes.filter(selector); } return nodes; }, edges: function edges(selector) { var edges = this.$(function (ele) { return ele.isEdge(); }); if (selector) { return edges.filter(selector); } return edges; }, // search the graph like jQuery $: function $(selector) { var eles = this._private.elements; if (selector) { return eles.filter(selector); } else { return eles.spawnSelf(); } }, mutableElements: function mutableElements() { return this._private.elements; } }; // aliases corefn$3.elements = corefn$3.filter = corefn$3.$; var styfn$8 = {}; // keys for style blocks, e.g. ttfftt var TRUE = 't'; var FALSE = 'f'; // (potentially expensive calculation) // apply the style to the element based on // - its bypass // - what selectors match it styfn$8.apply = function (eles) { var self = this; var _p = self._private; var cy = _p.cy; var updatedEles = cy.collection(); for (var ie = 0; ie < eles.length; ie++) { var ele = eles[ie]; var cxtMeta = self.getContextMeta(ele); if (cxtMeta.empty) { continue; } var cxtStyle = self.getContextStyle(cxtMeta); var app = self.applyContextStyle(cxtMeta, cxtStyle, ele); if (ele._private.appliedInitStyle) { self.updateTransitions(ele, app.diffProps); } else { ele._private.appliedInitStyle = true; } var hintsDiff = self.updateStyleHints(ele); if (hintsDiff) { updatedEles.push(ele); } } // for elements return updatedEles; }; styfn$8.getPropertiesDiff = function (oldCxtKey, newCxtKey) { var self = this; var cache = self._private.propDiffs = self._private.propDiffs || {}; var dualCxtKey = oldCxtKey + '-' + newCxtKey; var cachedVal = cache[dualCxtKey]; if (cachedVal) { return cachedVal; } var diffProps = []; var addedProp = {}; for (var i = 0; i < self.length; i++) { var cxt = self[i]; var oldHasCxt = oldCxtKey[i] === TRUE; var newHasCxt = newCxtKey[i] === TRUE; var cxtHasDiffed = oldHasCxt !== newHasCxt; var cxtHasMappedProps = cxt.mappedProperties.length > 0; if (cxtHasDiffed || newHasCxt && cxtHasMappedProps) { var props = void 0; if (cxtHasDiffed && cxtHasMappedProps) { props = cxt.properties; // suffices b/c mappedProperties is a subset of properties } else if (cxtHasDiffed) { props = cxt.properties; // need to check them all } else if (cxtHasMappedProps) { props = cxt.mappedProperties; // only need to check mapped } for (var j = 0; j < props.length; j++) { var prop = props[j]; var name = prop.name; // if a later context overrides this property, then the fact that this context has switched/diffed doesn't matter // (semi expensive check since it makes this function O(n^2) on context length, but worth it since overall result // is cached) var laterCxtOverrides = false; for (var k = i + 1; k < self.length; k++) { var laterCxt = self[k]; var hasLaterCxt = newCxtKey[k] === TRUE; if (!hasLaterCxt) { continue; } // can't override unless the context is active laterCxtOverrides = laterCxt.properties[prop.name] != null; if (laterCxtOverrides) { break; } // exit early as long as one later context overrides } if (!addedProp[name] && !laterCxtOverrides) { addedProp[name] = true; diffProps.push(name); } } // for props } // if } // for contexts cache[dualCxtKey] = diffProps; return diffProps; }; styfn$8.getContextMeta = function (ele) { var self = this; var cxtKey = ''; var diffProps; var prevKey = ele._private.styleCxtKey || ''; // get the cxt key for (var i = 0; i < self.length; i++) { var context = self[i]; var contextSelectorMatches = context.selector && context.selector.matches(ele); // NB: context.selector may be null for 'core' if (contextSelectorMatches) { cxtKey += TRUE; } else { cxtKey += FALSE; } } // for context diffProps = self.getPropertiesDiff(prevKey, cxtKey); ele._private.styleCxtKey = cxtKey; return { key: cxtKey, diffPropNames: diffProps, empty: diffProps.length === 0 }; }; // gets a computed ele style object based on matched contexts styfn$8.getContextStyle = function (cxtMeta) { var cxtKey = cxtMeta.key; var self = this; var cxtStyles = this._private.contextStyles = this._private.contextStyles || {}; // if already computed style, returned cached copy if (cxtStyles[cxtKey]) { return cxtStyles[cxtKey]; } var style = { _private: { key: cxtKey } }; for (var i = 0; i < self.length; i++) { var cxt = self[i]; var hasCxt = cxtKey[i] === TRUE; if (!hasCxt) { continue; } for (var j = 0; j < cxt.properties.length; j++) { var prop = cxt.properties[j]; style[prop.name] = prop; } } cxtStyles[cxtKey] = style; return style; }; styfn$8.applyContextStyle = function (cxtMeta, cxtStyle, ele) { var self = this; var diffProps = cxtMeta.diffPropNames; var retDiffProps = {}; var types = self.types; for (var i = 0; i < diffProps.length; i++) { var diffPropName = diffProps[i]; var cxtProp = cxtStyle[diffPropName]; var eleProp = ele.pstyle(diffPropName); if (!cxtProp) { // no context prop means delete if (!eleProp) { continue; // no existing prop means nothing needs to be removed // nb affects initial application on mapped values like control-point-distances } else if (eleProp.bypass) { cxtProp = { name: diffPropName, deleteBypassed: true }; } else { cxtProp = { name: diffPropName, "delete": true }; } } // save cycles when the context prop doesn't need to be applied if (eleProp === cxtProp) { continue; } // save cycles when a mapped context prop doesn't need to be applied if (cxtProp.mapped === types.fn // context prop is function mapper && eleProp != null // some props can be null even by default (e.g. a prop that overrides another one) && eleProp.mapping != null // ele prop is a concrete value from from a mapper && eleProp.mapping.value === cxtProp.value // the current prop on the ele is a flat prop value for the function mapper ) { // NB don't write to cxtProp, as it's shared among eles (stored in stylesheet) var mapping = eleProp.mapping; // can write to mapping, as it's a per-ele copy var fnValue = mapping.fnValue = cxtProp.value(ele); // temporarily cache the value in case of a miss if (fnValue === mapping.prevFnValue) { continue; } } var retDiffProp = retDiffProps[diffPropName] = { prev: eleProp }; self.applyParsedProperty(ele, cxtProp); retDiffProp.next = ele.pstyle(diffPropName); if (retDiffProp.next && retDiffProp.next.bypass) { retDiffProp.next = retDiffProp.next.bypassed; } } return { diffProps: retDiffProps }; }; styfn$8.updateStyleHints = function (ele) { var _p = ele._private; var self = this; var propNames = self.propertyGroupNames; var propGrKeys = self.propertyGroupKeys; var propHash = function propHash(ele, propNames, seedKey) { return self.getPropertiesHash(ele, propNames, seedKey); }; var oldStyleKey = _p.styleKey; if (ele.removed()) { return false; } var isNode = _p.group === 'nodes'; // get the style key hashes per prop group // but lazily -- only use non-default prop values to reduce the number of hashes // var overriddenStyles = ele._private.style; propNames = Object.keys(overriddenStyles); for (var i = 0; i < propGrKeys.length; i++) { var grKey = propGrKeys[i]; _p.styleKeys[grKey] = [DEFAULT_HASH_SEED, DEFAULT_HASH_SEED_ALT]; } var updateGrKey1 = function updateGrKey1(val, grKey) { return _p.styleKeys[grKey][0] = hashInt(val, _p.styleKeys[grKey][0]); }; var updateGrKey2 = function updateGrKey2(val, grKey) { return _p.styleKeys[grKey][1] = hashIntAlt(val, _p.styleKeys[grKey][1]); }; var updateGrKey = function updateGrKey(val, grKey) { updateGrKey1(val, grKey); updateGrKey2(val, grKey); }; var updateGrKeyWStr = function updateGrKeyWStr(strVal, grKey) { for (var j = 0; j < strVal.length; j++) { var ch = strVal.charCodeAt(j); updateGrKey1(ch, grKey); updateGrKey2(ch, grKey); } }; // - hashing works on 32 bit ints b/c we use bitwise ops // - small numbers get cut off (e.g. 0.123 is seen as 0 by the hashing function) // - raise up small numbers so more significant digits are seen by hashing // - make small numbers larger than a normal value to avoid collisions // - works in practice and it's relatively cheap var N = 2000000000; var cleanNum = function cleanNum(val) { return -128 < val && val < 128 && Math.floor(val) !== val ? N - (val * 1024 | 0) : val; }; for (var _i = 0; _i < propNames.length; _i++) { var name = propNames[_i]; var parsedProp = overriddenStyles[name]; if (parsedProp == null) { continue; } var propInfo = this.properties[name]; var type = propInfo.type; var _grKey = propInfo.groupKey; var normalizedNumberVal = void 0; if (propInfo.hashOverride != null) { normalizedNumberVal = propInfo.hashOverride(ele, parsedProp); } else if (parsedProp.pfValue != null) { normalizedNumberVal = parsedProp.pfValue; } // might not be a number if it allows enums var numberVal = propInfo.enums == null ? parsedProp.value : null; var haveNormNum = normalizedNumberVal != null; var haveUnitedNum = numberVal != null; var haveNum = haveNormNum || haveUnitedNum; var units = parsedProp.units; // numbers are cheaper to hash than strings // 1 hash op vs n hash ops (for length n string) if (type.number && haveNum && !type.multiple) { var v = haveNormNum ? normalizedNumberVal : numberVal; updateGrKey(cleanNum(v), _grKey); if (!haveNormNum && units != null) { updateGrKeyWStr(units, _grKey); } } else { updateGrKeyWStr(parsedProp.strValue, _grKey); } } // overall style key // var hash = [DEFAULT_HASH_SEED, DEFAULT_HASH_SEED_ALT]; for (var _i2 = 0; _i2 < propGrKeys.length; _i2++) { var _grKey2 = propGrKeys[_i2]; var grHash = _p.styleKeys[_grKey2]; hash[0] = hashInt(grHash[0], hash[0]); hash[1] = hashIntAlt(grHash[1], hash[1]); } _p.styleKey = combineHashes(hash[0], hash[1]); // label dims // var sk = _p.styleKeys; _p.labelDimsKey = combineHashesArray(sk.labelDimensions); var labelKeys = propHash(ele, ['label'], sk.labelDimensions); _p.labelKey = combineHashesArray(labelKeys); _p.labelStyleKey = combineHashesArray(hashArrays(sk.commonLabel, labelKeys)); if (!isNode) { var sourceLabelKeys = propHash(ele, ['source-label'], sk.labelDimensions); _p.sourceLabelKey = combineHashesArray(sourceLabelKeys); _p.sourceLabelStyleKey = combineHashesArray(hashArrays(sk.commonLabel, sourceLabelKeys)); var targetLabelKeys = propHash(ele, ['target-label'], sk.labelDimensions); _p.targetLabelKey = combineHashesArray(targetLabelKeys); _p.targetLabelStyleKey = combineHashesArray(hashArrays(sk.commonLabel, targetLabelKeys)); } // node // if (isNode) { var _p$styleKeys = _p.styleKeys, nodeBody = _p$styleKeys.nodeBody, nodeBorder = _p$styleKeys.nodeBorder, backgroundImage = _p$styleKeys.backgroundImage, compound = _p$styleKeys.compound, pie = _p$styleKeys.pie; var nodeKeys = [nodeBody, nodeBorder, backgroundImage, compound, pie].filter(function (k) { return k != null; }).reduce(hashArrays, [DEFAULT_HASH_SEED, DEFAULT_HASH_SEED_ALT]); _p.nodeKey = combineHashesArray(nodeKeys); _p.hasPie = pie != null && pie[0] !== DEFAULT_HASH_SEED && pie[1] !== DEFAULT_HASH_SEED_ALT; } return oldStyleKey !== _p.styleKey; }; styfn$8.clearStyleHints = function (ele) { var _p = ele._private; _p.styleCxtKey = ''; _p.styleKeys = {}; _p.styleKey = null; _p.labelKey = null; _p.labelStyleKey = null; _p.sourceLabelKey = null; _p.sourceLabelStyleKey = null; _p.targetLabelKey = null; _p.targetLabelStyleKey = null; _p.nodeKey = null; _p.hasPie = null; }; // apply a property to the style (for internal use) // returns whether application was successful // // now, this function flattens the property, and here's how: // // for parsedProp:{ bypass: true, deleteBypass: true } // no property is generated, instead the bypass property in the // element's style is replaced by what's pointed to by the `bypassed` // field in the bypass property (i.e. restoring the property the // bypass was overriding) // // for parsedProp:{ mapped: truthy } // the generated flattenedProp:{ mapping: prop } // // for parsedProp:{ bypass: true } // the generated flattenedProp:{ bypassed: parsedProp } styfn$8.applyParsedProperty = function (ele, parsedProp) { var self = this; var prop = parsedProp; var style = ele._private.style; var flatProp; var types = self.types; var type = self.properties[prop.name].type; var propIsBypass = prop.bypass; var origProp = style[prop.name]; var origPropIsBypass = origProp && origProp.bypass; var _p = ele._private; var flatPropMapping = 'mapping'; var getVal = function getVal(p) { if (p == null) { return null; } else if (p.pfValue != null) { return p.pfValue; } else { return p.value; } }; var checkTriggers = function checkTriggers() { var fromVal = getVal(origProp); var toVal = getVal(prop); self.checkTriggers(ele, prop.name, fromVal, toVal); }; if (prop && prop.name.substr(0, 3) === 'pie') { warn('The pie style properties are deprecated. Create charts using background images instead.'); } // edge sanity checks to prevent the client from making serious mistakes if (parsedProp.name === 'curve-style' && ele.isEdge() && ( // loops must be bundled beziers parsedProp.value !== 'bezier' && ele.isLoop() || // edges connected to compound nodes can not be haystacks parsedProp.value === 'haystack' && (ele.source().isParent() || ele.target().isParent()))) { prop = parsedProp = this.parse(parsedProp.name, 'bezier', propIsBypass); } if (prop["delete"]) { // delete the property and use the default value on falsey value style[prop.name] = undefined; checkTriggers(); return true; } if (prop.deleteBypassed) { // delete the property that the if (!origProp) { checkTriggers(); return true; // can't delete if no prop } else if (origProp.bypass) { // delete bypassed origProp.bypassed = undefined; checkTriggers(); return true; } else { return false; // we're unsuccessful deleting the bypassed } } // check if we need to delete the current bypass if (prop.deleteBypass) { // then this property is just here to indicate we need to delete if (!origProp) { checkTriggers(); return true; // property is already not defined } else if (origProp.bypass) { // then replace the bypass property with the original // because the bypassed property was already applied (and therefore parsed), we can just replace it (no reapplying necessary) style[prop.name] = origProp.bypassed; checkTriggers(); return true; } else { return false; // we're unsuccessful deleting the bypass } } var printMappingErr = function printMappingErr() { warn('Do not assign mappings to elements without corresponding data (i.e. ele `' + ele.id() + '` has no mapping for property `' + prop.name + '` with data field `' + prop.field + '`); try a `[' + prop.field + ']` selector to limit scope to elements with `' + prop.field + '` defined'); }; // put the property in the style objects switch (prop.mapped) { // flatten the property if mapped case types.mapData: { // flatten the field (e.g. data.foo.bar) var fields = prop.field.split('.'); var fieldVal = _p.data; for (var i = 0; i < fields.length && fieldVal; i++) { var field = fields[i]; fieldVal = fieldVal[field]; } if (fieldVal == null) { printMappingErr(); return false; } var percent; if (!number$1(fieldVal)) { // then don't apply and fall back on the existing style warn('Do not use continuous mappers without specifying numeric data (i.e. `' + prop.field + ': ' + fieldVal + '` for `' + ele.id() + '` is non-numeric)'); return false; } else { var fieldWidth = prop.fieldMax - prop.fieldMin; if (fieldWidth === 0) { // safety check -- not strictly necessary as no props of zero range should be passed here percent = 0; } else { percent = (fieldVal - prop.fieldMin) / fieldWidth; } } // make sure to bound percent value if (percent < 0) { percent = 0; } else if (percent > 1) { percent = 1; } if (type.color) { var r1 = prop.valueMin[0]; var r2 = prop.valueMax[0]; var g1 = prop.valueMin[1]; var g2 = prop.valueMax[1]; var b1 = prop.valueMin[2]; var b2 = prop.valueMax[2]; var a1 = prop.valueMin[3] == null ? 1 : prop.valueMin[3]; var a2 = prop.valueMax[3] == null ? 1 : prop.valueMax[3]; var clr = [Math.round(r1 + (r2 - r1) * percent), Math.round(g1 + (g2 - g1) * percent), Math.round(b1 + (b2 - b1) * percent), Math.round(a1 + (a2 - a1) * percent)]; flatProp = { // colours are simple, so just create the flat property instead of expensive string parsing bypass: prop.bypass, // we're a bypass if the mapping property is a bypass name: prop.name, value: clr, strValue: 'rgb(' + clr[0] + ', ' + clr[1] + ', ' + clr[2] + ')' }; } else if (type.number) { var calcValue = prop.valueMin + (prop.valueMax - prop.valueMin) * percent; flatProp = this.parse(prop.name, calcValue, prop.bypass, flatPropMapping); } else { return false; // can only map to colours and numbers } if (!flatProp) { // if we can't flatten the property, then don't apply the property and fall back on the existing style printMappingErr(); return false; } flatProp.mapping = prop; // keep a reference to the mapping prop = flatProp; // the flattened (mapped) property is the one we want break; } // direct mapping case types.data: { // flatten the field (e.g. data.foo.bar) var _fields = prop.field.split('.'); var _fieldVal = _p.data; for (var _i3 = 0; _i3 < _fields.length && _fieldVal; _i3++) { var _field = _fields[_i3]; _fieldVal = _fieldVal[_field]; } if (_fieldVal != null) { flatProp = this.parse(prop.name, _fieldVal, prop.bypass, flatPropMapping); } if (!flatProp) { // if we can't flatten the property, then don't apply and fall back on the existing style printMappingErr(); return false; } flatProp.mapping = prop; // keep a reference to the mapping prop = flatProp; // the flattened (mapped) property is the one we want break; } case types.fn: { var fn = prop.value; var fnRetVal = prop.fnValue != null ? prop.fnValue : fn(ele); // check for cached value before calling function prop.prevFnValue = fnRetVal; if (fnRetVal == null) { warn('Custom function mappers may not return null (i.e. `' + prop.name + '` for ele `' + ele.id() + '` is null)'); return false; } flatProp = this.parse(prop.name, fnRetVal, prop.bypass, flatPropMapping); if (!flatProp) { warn('Custom function mappers may not return invalid values for the property type (i.e. `' + prop.name + '` for ele `' + ele.id() + '` is invalid)'); return false; } flatProp.mapping = copy(prop); // keep a reference to the mapping prop = flatProp; // the flattened (mapped) property is the one we want break; } case undefined: break; // just set the property default: return false; // not a valid mapping } // if the property is a bypass property, then link the resultant property to the original one if (propIsBypass) { if (origPropIsBypass) { // then this bypass overrides the existing one prop.bypassed = origProp.bypassed; // steal bypassed prop from old bypass } else { // then link the orig prop to the new bypass prop.bypassed = origProp; } style[prop.name] = prop; // and set } else { // prop is not bypass if (origPropIsBypass) { // then keep the orig prop (since it's a bypass) and link to the new prop origProp.bypassed = prop; } else { // then just replace the old prop with the new one style[prop.name] = prop; } } checkTriggers(); return true; }; styfn$8.cleanElements = function (eles, keepBypasses) { for (var i = 0; i < eles.length; i++) { var ele = eles[i]; this.clearStyleHints(ele); ele.dirtyCompoundBoundsCache(); ele.dirtyBoundingBoxCache(); if (!keepBypasses) { ele._private.style = {}; } else { var style = ele._private.style; var propNames = Object.keys(style); for (var j = 0; j < propNames.length; j++) { var propName = propNames[j]; var eleProp = style[propName]; if (eleProp != null) { if (eleProp.bypass) { eleProp.bypassed = null; } else { style[propName] = null; } } } } } }; // updates the visual style for all elements (useful for manual style modification after init) styfn$8.update = function () { var cy = this._private.cy; var eles = cy.mutableElements(); eles.updateStyle(); }; // diffProps : { name => { prev, next } } styfn$8.updateTransitions = function (ele, diffProps) { var self = this; var _p = ele._private; var props = ele.pstyle('transition-property').value; var duration = ele.pstyle('transition-duration').pfValue; var delay = ele.pstyle('transition-delay').pfValue; if (props.length > 0 && duration > 0) { var style = {}; // build up the style to animate towards var anyPrev = false; for (var i = 0; i < props.length; i++) { var prop = props[i]; var styProp = ele.pstyle(prop); var diffProp = diffProps[prop]; if (!diffProp) { continue; } var prevProp = diffProp.prev; var fromProp = prevProp; var toProp = diffProp.next != null ? diffProp.next : styProp; var diff = false; var initVal = void 0; var initDt = 0.000001; // delta time % value for initVal (allows animating out of init zero opacity) if (!fromProp) { continue; } // consider px values if (number$1(fromProp.pfValue) && number$1(toProp.pfValue)) { diff = toProp.pfValue - fromProp.pfValue; // nonzero is truthy initVal = fromProp.pfValue + initDt * diff; // consider numerical values } else if (number$1(fromProp.value) && number$1(toProp.value)) { diff = toProp.value - fromProp.value; // nonzero is truthy initVal = fromProp.value + initDt * diff; // consider colour values } else if (array(fromProp.value) && array(toProp.value)) { diff = fromProp.value[0] !== toProp.value[0] || fromProp.value[1] !== toProp.value[1] || fromProp.value[2] !== toProp.value[2]; initVal = fromProp.strValue; } // the previous value is good for an animation only if it's different if (diff) { style[prop] = toProp.strValue; // to val this.applyBypass(ele, prop, initVal); // from val anyPrev = true; } } // end if props allow ani // can't transition if there's nothing previous to transition from if (!anyPrev) { return; } _p.transitioning = true; new Promise$1(function (resolve) { if (delay > 0) { ele.delayAnimation(delay).play().promise().then(resolve); } else { resolve(); } }).then(function () { return ele.animation({ style: style, duration: duration, easing: ele.pstyle('transition-timing-function').value, queue: false }).play().promise(); }).then(function () { // if( !isBypass ){ self.removeBypasses(ele, props); ele.emitAndNotify('style'); // } _p.transitioning = false; }); } else if (_p.transitioning) { this.removeBypasses(ele, props); ele.emitAndNotify('style'); _p.transitioning = false; } }; styfn$8.checkTrigger = function (ele, name, fromValue, toValue, getTrigger, onTrigger) { var prop = this.properties[name]; var triggerCheck = getTrigger(prop); if (triggerCheck != null && triggerCheck(fromValue, toValue)) { onTrigger(prop); } }; styfn$8.checkZOrderTrigger = function (ele, name, fromValue, toValue) { var _this = this; this.checkTrigger(ele, name, fromValue, toValue, function (prop) { return prop.triggersZOrder; }, function () { _this._private.cy.notify('zorder', ele); }); }; styfn$8.checkBoundsTrigger = function (ele, name, fromValue, toValue) { this.checkTrigger(ele, name, fromValue, toValue, function (prop) { return prop.triggersBounds; }, function (prop) { ele.dirtyCompoundBoundsCache(); ele.dirtyBoundingBoxCache(); // if the prop change makes the bb of pll bezier edges invalid, // then dirty the pll edge bb cache as well if ( // only for beziers -- so performance of other edges isn't affected prop.triggersBoundsOfParallelBeziers && (name === 'curve-style' && (fromValue === 'bezier' || toValue === 'bezier') || name === 'display' && (fromValue === 'none' || toValue === 'none'))) { ele.parallelEdges().forEach(function (pllEdge) { if (pllEdge.isBundledBezier()) { pllEdge.dirtyBoundingBoxCache(); } }); } }); }; styfn$8.checkTriggers = function (ele, name, fromValue, toValue) { ele.dirtyStyleCache(); this.checkZOrderTrigger(ele, name, fromValue, toValue); this.checkBoundsTrigger(ele, name, fromValue, toValue); }; var styfn$7 = {}; // bypasses are applied to an existing style on an element, and just tacked on temporarily // returns true iff application was successful for at least 1 specified property styfn$7.applyBypass = function (eles, name, value, updateTransitions) { var self = this; var props = []; var isBypass = true; // put all the properties (can specify one or many) in an array after parsing them if (name === '*' || name === '**') { // apply to all property names if (value !== undefined) { for (var i = 0; i < self.properties.length; i++) { var prop = self.properties[i]; var _name = prop.name; var parsedProp = this.parse(_name, value, true); if (parsedProp) { props.push(parsedProp); } } } } else if (string(name)) { // then parse the single property var _parsedProp = this.parse(name, value, true); if (_parsedProp) { props.push(_parsedProp); } } else if (plainObject(name)) { // then parse each property var specifiedProps = name; updateTransitions = value; var names = Object.keys(specifiedProps); for (var _i = 0; _i < names.length; _i++) { var _name2 = names[_i]; var _value = specifiedProps[_name2]; if (_value === undefined) { // try camel case name too _value = specifiedProps[dash2camel(_name2)]; } if (_value !== undefined) { var _parsedProp2 = this.parse(_name2, _value, true); if (_parsedProp2) { props.push(_parsedProp2); } } } } else { // can't do anything without well defined properties return false; } // we've failed if there are no valid properties if (props.length === 0) { return false; } // now, apply the bypass properties on the elements var ret = false; // return true if at least one succesful bypass applied for (var _i2 = 0; _i2 < eles.length; _i2++) { // for each ele var ele = eles[_i2]; var diffProps = {}; var diffProp = void 0; for (var j = 0; j < props.length; j++) { // for each prop var _prop = props[j]; if (updateTransitions) { var prevProp = ele.pstyle(_prop.name); diffProp = diffProps[_prop.name] = { prev: prevProp }; } ret = this.applyParsedProperty(ele, copy(_prop)) || ret; if (updateTransitions) { diffProp.next = ele.pstyle(_prop.name); } } // for props if (ret) { this.updateStyleHints(ele); } if (updateTransitions) { this.updateTransitions(ele, diffProps, isBypass); } } // for eles return ret; }; // only useful in specific cases like animation styfn$7.overrideBypass = function (eles, name, value) { name = camel2dash(name); for (var i = 0; i < eles.length; i++) { var ele = eles[i]; var prop = ele._private.style[name]; var type = this.properties[name].type; var isColor = type.color; var isMulti = type.mutiple; var oldValue = !prop ? null : prop.pfValue != null ? prop.pfValue : prop.value; if (!prop || !prop.bypass) { // need a bypass if one doesn't exist this.applyBypass(ele, name, value); } else { prop.value = value; if (prop.pfValue != null) { prop.pfValue = value; } if (isColor) { prop.strValue = 'rgb(' + value.join(',') + ')'; } else if (isMulti) { prop.strValue = value.join(' '); } else { prop.strValue = '' + value; } this.updateStyleHints(ele); } this.checkTriggers(ele, name, oldValue, value); } }; styfn$7.removeAllBypasses = function (eles, updateTransitions) { return this.removeBypasses(eles, this.propertyNames, updateTransitions); }; styfn$7.removeBypasses = function (eles, props, updateTransitions) { var isBypass = true; for (var j = 0; j < eles.length; j++) { var ele = eles[j]; var diffProps = {}; for (var i = 0; i < props.length; i++) { var name = props[i]; var prop = this.properties[name]; var prevProp = ele.pstyle(prop.name); if (!prevProp || !prevProp.bypass) { // if a bypass doesn't exist for the prop, nothing needs to be removed continue; } var value = ''; // empty => remove bypass var parsedProp = this.parse(name, value, true); var diffProp = diffProps[prop.name] = { prev: prevProp }; this.applyParsedProperty(ele, parsedProp); diffProp.next = ele.pstyle(prop.name); } // for props this.updateStyleHints(ele); if (updateTransitions) { this.updateTransitions(ele, diffProps, isBypass); } } // for eles }; var styfn$6 = {}; // gets what an em size corresponds to in pixels relative to a dom element styfn$6.getEmSizeInPixels = function () { var px = this.containerCss('font-size'); if (px != null) { return parseFloat(px); } else { return 1; // for headless } }; // gets css property from the core container styfn$6.containerCss = function (propName) { var cy = this._private.cy; var domElement = cy.container(); if (window$1 && domElement && window$1.getComputedStyle) { return window$1.getComputedStyle(domElement).getPropertyValue(propName); } }; var styfn$5 = {}; // gets the rendered style for an element styfn$5.getRenderedStyle = function (ele, prop) { if (prop) { return this.getStylePropertyValue(ele, prop, true); } else { return this.getRawStyle(ele, true); } }; // gets the raw style for an element styfn$5.getRawStyle = function (ele, isRenderedVal) { var self = this; ele = ele[0]; // insure it's an element if (ele) { var rstyle = {}; for (var i = 0; i < self.properties.length; i++) { var prop = self.properties[i]; var val = self.getStylePropertyValue(ele, prop.name, isRenderedVal); if (val != null) { rstyle[prop.name] = val; rstyle[dash2camel(prop.name)] = val; } } return rstyle; } }; styfn$5.getIndexedStyle = function (ele, property, subproperty, index) { var pstyle = ele.pstyle(property)[subproperty][index]; return pstyle != null ? pstyle : ele.cy().style().getDefaultProperty(property)[subproperty][0]; }; styfn$5.getStylePropertyValue = function (ele, propName, isRenderedVal) { var self = this; ele = ele[0]; // insure it's an element if (ele) { var prop = self.properties[propName]; if (prop.alias) { prop = prop.pointsTo; } var type = prop.type; var styleProp = ele.pstyle(prop.name); if (styleProp) { var value = styleProp.value, units = styleProp.units, strValue = styleProp.strValue; if (isRenderedVal && type.number && value != null && number$1(value)) { var zoom = ele.cy().zoom(); var getRenderedValue = function getRenderedValue(val) { return val * zoom; }; var getValueStringWithUnits = function getValueStringWithUnits(val, units) { return getRenderedValue(val) + units; }; var isArrayValue = array(value); var haveUnits = isArrayValue ? units.every(function (u) { return u != null; }) : units != null; if (haveUnits) { if (isArrayValue) { return value.map(function (v, i) { return getValueStringWithUnits(v, units[i]); }).join(' '); } else { return getValueStringWithUnits(value, units); } } else { if (isArrayValue) { return value.map(function (v) { return string(v) ? v : '' + getRenderedValue(v); }).join(' '); } else { return '' + getRenderedValue(value); } } } else if (strValue != null) { return strValue; } } return null; } }; styfn$5.getAnimationStartStyle = function (ele, aniProps) { var rstyle = {}; for (var i = 0; i < aniProps.length; i++) { var aniProp = aniProps[i]; var name = aniProp.name; var styleProp = ele.pstyle(name); if (styleProp !== undefined) { // then make a prop of it if (plainObject(styleProp)) { styleProp = this.parse(name, styleProp.strValue); } else { styleProp = this.parse(name, styleProp); } } if (styleProp) { rstyle[name] = styleProp; } } return rstyle; }; styfn$5.getPropsList = function (propsObj) { var self = this; var rstyle = []; var style = propsObj; var props = self.properties; if (style) { var names = Object.keys(style); for (var i = 0; i < names.length; i++) { var name = names[i]; var val = style[name]; var prop = props[name] || props[camel2dash(name)]; var styleProp = this.parse(prop.name, val); if (styleProp) { rstyle.push(styleProp); } } } return rstyle; }; styfn$5.getNonDefaultPropertiesHash = function (ele, propNames, seed) { var hash = seed.slice(); var name, val, strVal, chVal; var i, j; for (i = 0; i < propNames.length; i++) { name = propNames[i]; val = ele.pstyle(name, false); if (val == null) { continue; } else if (val.pfValue != null) { hash[0] = hashInt(chVal, hash[0]); hash[1] = hashIntAlt(chVal, hash[1]); } else { strVal = val.strValue; for (j = 0; j < strVal.length; j++) { chVal = strVal.charCodeAt(j); hash[0] = hashInt(chVal, hash[0]); hash[1] = hashIntAlt(chVal, hash[1]); } } } return hash; }; styfn$5.getPropertiesHash = styfn$5.getNonDefaultPropertiesHash; var styfn$4 = {}; styfn$4.appendFromJson = function (json) { var style = this; for (var i = 0; i < json.length; i++) { var context = json[i]; var selector = context.selector; var props = context.style || context.css; var names = Object.keys(props); style.selector(selector); // apply selector for (var j = 0; j < names.length; j++) { var name = names[j]; var value = props[name]; style.css(name, value); // apply property } } return style; }; // accessible cy.style() function styfn$4.fromJson = function (json) { var style = this; style.resetToDefault(); style.appendFromJson(json); return style; }; // get json from cy.style() api styfn$4.json = function () { var json = []; for (var i = this.defaultLength; i < this.length; i++) { var cxt = this[i]; var selector = cxt.selector; var props = cxt.properties; var css = {}; for (var j = 0; j < props.length; j++) { var prop = props[j]; css[prop.name] = prop.strValue; } json.push({ selector: !selector ? 'core' : selector.toString(), style: css }); } return json; }; var styfn$3 = {}; styfn$3.appendFromString = function (string) { var self = this; var style = this; var remaining = '' + string; var selAndBlockStr; var blockRem; var propAndValStr; // remove comments from the style string remaining = remaining.replace(/[/][*](\s|.)+?[*][/]/g, ''); function removeSelAndBlockFromRemaining() { // remove the parsed selector and block from the remaining text to parse if (remaining.length > selAndBlockStr.length) { remaining = remaining.substr(selAndBlockStr.length); } else { remaining = ''; } } function removePropAndValFromRem() { // remove the parsed property and value from the remaining block text to parse if (blockRem.length > propAndValStr.length) { blockRem = blockRem.substr(propAndValStr.length); } else { blockRem = ''; } } for (;;) { var nothingLeftToParse = remaining.match(/^\s*$/); if (nothingLeftToParse) { break; } var selAndBlock = remaining.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/); if (!selAndBlock) { warn('Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: ' + remaining); break; } selAndBlockStr = selAndBlock[0]; // parse the selector var selectorStr = selAndBlock[1]; if (selectorStr !== 'core') { var selector = new Selector(selectorStr); if (selector.invalid) { warn('Skipping parsing of block: Invalid selector found in string stylesheet: ' + selectorStr); // skip this selector and block removeSelAndBlockFromRemaining(); continue; } } // parse the block of properties and values var blockStr = selAndBlock[2]; var invalidBlock = false; blockRem = blockStr; var props = []; for (;;) { var _nothingLeftToParse = blockRem.match(/^\s*$/); if (_nothingLeftToParse) { break; } var propAndVal = blockRem.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/); if (!propAndVal) { warn('Skipping parsing of block: Invalid formatting of style property and value definitions found in:' + blockStr); invalidBlock = true; break; } propAndValStr = propAndVal[0]; var propStr = propAndVal[1]; var valStr = propAndVal[2]; var prop = self.properties[propStr]; if (!prop) { warn('Skipping property: Invalid property name in: ' + propAndValStr); // skip this property in the block removePropAndValFromRem(); continue; } var parsedProp = style.parse(propStr, valStr); if (!parsedProp) { warn('Skipping property: Invalid property definition in: ' + propAndValStr); // skip this property in the block removePropAndValFromRem(); continue; } props.push({ name: propStr, val: valStr }); removePropAndValFromRem(); } if (invalidBlock) { removeSelAndBlockFromRemaining(); break; } // put the parsed block in the style style.selector(selectorStr); for (var i = 0; i < props.length; i++) { var _prop = props[i]; style.css(_prop.name, _prop.val); } removeSelAndBlockFromRemaining(); } return style; }; styfn$3.fromString = function (string) { var style = this; style.resetToDefault(); style.appendFromString(string); return style; }; var styfn$2 = {}; (function () { var number$1 = number; var rgba = rgbaNoBackRefs; var hsla = hslaNoBackRefs; var hex3$1 = hex3; var hex6$1 = hex6; var data = function data(prefix) { return '^' + prefix + '\\s*\\(\\s*([\\w\\.]+)\\s*\\)$'; }; var mapData = function mapData(prefix) { var mapArg = number$1 + '|\\w+|' + rgba + '|' + hsla + '|' + hex3$1 + '|' + hex6$1; return '^' + prefix + '\\s*\\(([\\w\\.]+)\\s*\\,\\s*(' + number$1 + ')\\s*\\,\\s*(' + number$1 + ')\\s*,\\s*(' + mapArg + ')\\s*\\,\\s*(' + mapArg + ')\\)$'; }; var urlRegexes = ['^url\\s*\\(\\s*[\'"]?(.+?)[\'"]?\\s*\\)$', '^(none)$', '^(.+)$']; // each visual style property has a type and needs to be validated according to it styfn$2.types = { time: { number: true, min: 0, units: 's|ms', implicitUnits: 'ms' }, percent: { number: true, min: 0, max: 100, units: '%', implicitUnits: '%' }, percentages: { number: true, min: 0, max: 100, units: '%', implicitUnits: '%', multiple: true }, zeroOneNumber: { number: true, min: 0, max: 1, unitless: true }, zeroOneNumbers: { number: true, min: 0, max: 1, unitless: true, multiple: true }, nOneOneNumber: { number: true, min: -1, max: 1, unitless: true }, nonNegativeInt: { number: true, min: 0, integer: true, unitless: true }, position: { enums: ['parent', 'origin'] }, nodeSize: { number: true, min: 0, enums: ['label'] }, number: { number: true, unitless: true }, numbers: { number: true, unitless: true, multiple: true }, positiveNumber: { number: true, unitless: true, min: 0, strictMin: true }, size: { number: true, min: 0 }, bidirectionalSize: { number: true }, // allows negative bidirectionalSizeMaybePercent: { number: true, allowPercent: true }, // allows negative bidirectionalSizes: { number: true, multiple: true }, // allows negative sizeMaybePercent: { number: true, min: 0, allowPercent: true }, axisDirection: { enums: ['horizontal', 'leftward', 'rightward', 'vertical', 'upward', 'downward', 'auto'] }, paddingRelativeTo: { enums: ['width', 'height', 'average', 'min', 'max'] }, bgWH: { number: true, min: 0, allowPercent: true, enums: ['auto'], multiple: true }, bgPos: { number: true, allowPercent: true, multiple: true }, bgRelativeTo: { enums: ['inner', 'include-padding'], multiple: true }, bgRepeat: { enums: ['repeat', 'repeat-x', 'repeat-y', 'no-repeat'], multiple: true }, bgFit: { enums: ['none', 'contain', 'cover'], multiple: true }, bgCrossOrigin: { enums: ['anonymous', 'use-credentials', 'null'], multiple: true }, bgClip: { enums: ['none', 'node'], multiple: true }, bgContainment: { enums: ['inside', 'over'], multiple: true }, color: { color: true }, colors: { color: true, multiple: true }, fill: { enums: ['solid', 'linear-gradient', 'radial-gradient'] }, bool: { enums: ['yes', 'no'] }, bools: { enums: ['yes', 'no'], multiple: true }, lineStyle: { enums: ['solid', 'dotted', 'dashed'] }, lineCap: { enums: ['butt', 'round', 'square'] }, borderStyle: { enums: ['solid', 'dotted', 'dashed', 'double'] }, curveStyle: { enums: ['bezier', 'unbundled-bezier', 'haystack', 'segments', 'straight', 'straight-triangle', 'taxi'] }, fontFamily: { regex: '^([\\w- \\"]+(?:\\s*,\\s*[\\w- \\"]+)*)$' }, fontStyle: { enums: ['italic', 'normal', 'oblique'] }, fontWeight: { enums: ['normal', 'bold', 'bolder', 'lighter', '100', '200', '300', '400', '500', '600', '800', '900', 100, 200, 300, 400, 500, 600, 700, 800, 900] }, textDecoration: { enums: ['none', 'underline', 'overline', 'line-through'] }, textTransform: { enums: ['none', 'uppercase', 'lowercase'] }, textWrap: { enums: ['none', 'wrap', 'ellipsis'] }, textOverflowWrap: { enums: ['whitespace', 'anywhere'] }, textBackgroundShape: { enums: ['rectangle', 'roundrectangle', 'round-rectangle'] }, nodeShape: { enums: ['rectangle', 'roundrectangle', 'round-rectangle', 'cutrectangle', 'cut-rectangle', 'bottomroundrectangle', 'bottom-round-rectangle', 'barrel', 'ellipse', 'triangle', 'round-triangle', 'square', 'pentagon', 'round-pentagon', 'hexagon', 'round-hexagon', 'concavehexagon', 'concave-hexagon', 'heptagon', 'round-heptagon', 'octagon', 'round-octagon', 'tag', 'round-tag', 'star', 'diamond', 'round-diamond', 'vee', 'rhomboid', 'right-rhomboid', 'polygon'] }, overlayShape: { enums: ['roundrectangle', 'round-rectangle', 'ellipse'] }, compoundIncludeLabels: { enums: ['include', 'exclude'] }, arrowShape: { enums: ['tee', 'triangle', 'triangle-tee', 'circle-triangle', 'triangle-cross', 'triangle-backcurve', 'vee', 'square', 'circle', 'diamond', 'chevron', 'none'] }, arrowFill: { enums: ['filled', 'hollow'] }, display: { enums: ['element', 'none'] }, visibility: { enums: ['hidden', 'visible'] }, zCompoundDepth: { enums: ['bottom', 'orphan', 'auto', 'top'] }, zIndexCompare: { enums: ['auto', 'manual'] }, valign: { enums: ['top', 'center', 'bottom'] }, halign: { enums: ['left', 'center', 'right'] }, justification: { enums: ['left', 'center', 'right', 'auto'] }, text: { string: true }, data: { mapping: true, regex: data('data') }, layoutData: { mapping: true, regex: data('layoutData') }, scratch: { mapping: true, regex: data('scratch') }, mapData: { mapping: true, regex: mapData('mapData') }, mapLayoutData: { mapping: true, regex: mapData('mapLayoutData') }, mapScratch: { mapping: true, regex: mapData('mapScratch') }, fn: { mapping: true, fn: true }, url: { regexes: urlRegexes, singleRegexMatchValue: true }, urls: { regexes: urlRegexes, singleRegexMatchValue: true, multiple: true }, propList: { propList: true }, angle: { number: true, units: 'deg|rad', implicitUnits: 'rad' }, textRotation: { number: true, units: 'deg|rad', implicitUnits: 'rad', enums: ['none', 'autorotate'] }, polygonPointList: { number: true, multiple: true, evenMultiple: true, min: -1, max: 1, unitless: true }, edgeDistances: { enums: ['intersection', 'node-position'] }, edgeEndpoint: { number: true, multiple: true, units: '%|px|em|deg|rad', implicitUnits: 'px', enums: ['inside-to-node', 'outside-to-node', 'outside-to-node-or-label', 'outside-to-line', 'outside-to-line-or-label'], singleEnum: true, validate: function validate(valArr, unitsArr) { switch (valArr.length) { case 2: // can be % or px only return unitsArr[0] !== 'deg' && unitsArr[0] !== 'rad' && unitsArr[1] !== 'deg' && unitsArr[1] !== 'rad'; case 1: // can be enum, deg, or rad only return string(valArr[0]) || unitsArr[0] === 'deg' || unitsArr[0] === 'rad'; default: return false; } } }, easing: { regexes: ['^(spring)\\s*\\(\\s*(' + number$1 + ')\\s*,\\s*(' + number$1 + ')\\s*\\)$', '^(cubic-bezier)\\s*\\(\\s*(' + number$1 + ')\\s*,\\s*(' + number$1 + ')\\s*,\\s*(' + number$1 + ')\\s*,\\s*(' + number$1 + ')\\s*\\)$'], enums: ['linear', 'ease', 'ease-in', 'ease-out', 'ease-in-out', 'ease-in-sine', 'ease-out-sine', 'ease-in-out-sine', 'ease-in-quad', 'ease-out-quad', 'ease-in-out-quad', 'ease-in-cubic', 'ease-out-cubic', 'ease-in-out-cubic', 'ease-in-quart', 'ease-out-quart', 'ease-in-out-quart', 'ease-in-quint', 'ease-out-quint', 'ease-in-out-quint', 'ease-in-expo', 'ease-out-expo', 'ease-in-out-expo', 'ease-in-circ', 'ease-out-circ', 'ease-in-out-circ'] }, gradientDirection: { enums: ['to-bottom', 'to-top', 'to-left', 'to-right', 'to-bottom-right', 'to-bottom-left', 'to-top-right', 'to-top-left', 'to-right-bottom', 'to-left-bottom', 'to-right-top', 'to-left-top' // different order ] }, boundsExpansion: { number: true, multiple: true, min: 0, validate: function validate(valArr) { var length = valArr.length; return length === 1 || length === 2 || length === 4; } } }; var diff = { zeroNonZero: function zeroNonZero(val1, val2) { if ((val1 == null || val2 == null) && val1 !== val2) { return true; // null cases could represent any value } if (val1 == 0 && val2 != 0) { return true; } else if (val1 != 0 && val2 == 0) { return true; } else { return false; } }, any: function any(val1, val2) { return val1 != val2; }, emptyNonEmpty: function emptyNonEmpty(str1, str2) { var empty1 = emptyString(str1); var empty2 = emptyString(str2); return empty1 && !empty2 || !empty1 && empty2; } }; // define visual style properties // // - n.b. adding a new group of props may require updates to updateStyleHints() // - adding new props to an existing group gets handled automatically var t = styfn$2.types; var mainLabel = [{ name: 'label', type: t.text, triggersBounds: diff.any, triggersZOrder: diff.emptyNonEmpty }, { name: 'text-rotation', type: t.textRotation, triggersBounds: diff.any }, { name: 'text-margin-x', type: t.bidirectionalSize, triggersBounds: diff.any }, { name: 'text-margin-y', type: t.bidirectionalSize, triggersBounds: diff.any }]; var sourceLabel = [{ name: 'source-label', type: t.text, triggersBounds: diff.any }, { name: 'source-text-rotation', type: t.textRotation, triggersBounds: diff.any }, { name: 'source-text-margin-x', type: t.bidirectionalSize, triggersBounds: diff.any }, { name: 'source-text-margin-y', type: t.bidirectionalSize, triggersBounds: diff.any }, { name: 'source-text-offset', type: t.size, triggersBounds: diff.any }]; var targetLabel = [{ name: 'target-label', type: t.text, triggersBounds: diff.any }, { name: 'target-text-rotation', type: t.textRotation, triggersBounds: diff.any }, { name: 'target-text-margin-x', type: t.bidirectionalSize, triggersBounds: diff.any }, { name: 'target-text-margin-y', type: t.bidirectionalSize, triggersBounds: diff.any }, { name: 'target-text-offset', type: t.size, triggersBounds: diff.any }]; var labelDimensions = [{ name: 'font-family', type: t.fontFamily, triggersBounds: diff.any }, { name: 'font-style', type: t.fontStyle, triggersBounds: diff.any }, { name: 'font-weight', type: t.fontWeight, triggersBounds: diff.any }, { name: 'font-size', type: t.size, triggersBounds: diff.any }, { name: 'text-transform', type: t.textTransform, triggersBounds: diff.any }, { name: 'text-wrap', type: t.textWrap, triggersBounds: diff.any }, { name: 'text-overflow-wrap', type: t.textOverflowWrap, triggersBounds: diff.any }, { name: 'text-max-width', type: t.size, triggersBounds: diff.any }, { name: 'text-outline-width', type: t.size, triggersBounds: diff.any }, { name: 'line-height', type: t.positiveNumber, triggersBounds: diff.any }]; var commonLabel = [{ name: 'text-valign', type: t.valign, triggersBounds: diff.any }, { name: 'text-halign', type: t.halign, triggersBounds: diff.any }, { name: 'color', type: t.color }, { name: 'text-outline-color', type: t.color }, { name: 'text-outline-opacity', type: t.zeroOneNumber }, { name: 'text-background-color', type: t.color }, { name: 'text-background-opacity', type: t.zeroOneNumber }, { name: 'text-background-padding', type: t.size, triggersBounds: diff.any }, { name: 'text-border-opacity', type: t.zeroOneNumber }, { name: 'text-border-color', type: t.color }, { name: 'text-border-width', type: t.size, triggersBounds: diff.any }, { name: 'text-border-style', type: t.borderStyle, triggersBounds: diff.any }, { name: 'text-background-shape', type: t.textBackgroundShape, triggersBounds: diff.any }, { name: 'text-justification', type: t.justification }]; var behavior = [{ name: 'events', type: t.bool }, { name: 'text-events', type: t.bool }]; var visibility = [{ name: 'display', type: t.display, triggersZOrder: diff.any, triggersBounds: diff.any, triggersBoundsOfParallelBeziers: true }, { name: 'visibility', type: t.visibility, triggersZOrder: diff.any }, { name: 'opacity', type: t.zeroOneNumber, triggersZOrder: diff.zeroNonZero }, { name: 'text-opacity', type: t.zeroOneNumber }, { name: 'min-zoomed-font-size', type: t.size }, { name: 'z-compound-depth', type: t.zCompoundDepth, triggersZOrder: diff.any }, { name: 'z-index-compare', type: t.zIndexCompare, triggersZOrder: diff.any }, { name: 'z-index', type: t.nonNegativeInt, triggersZOrder: diff.any }]; var overlay = [{ name: 'overlay-padding', type: t.size, triggersBounds: diff.any }, { name: 'overlay-color', type: t.color }, { name: 'overlay-opacity', type: t.zeroOneNumber, triggersBounds: diff.zeroNonZero }, { name: 'overlay-shape', type: t.overlayShape, triggersBounds: diff.any }]; var underlay = [{ name: 'underlay-padding', type: t.size, triggersBounds: diff.any }, { name: 'underlay-color', type: t.color }, { name: 'underlay-opacity', type: t.zeroOneNumber, triggersBounds: diff.zeroNonZero }, { name: 'underlay-shape', type: t.overlayShape, triggersBounds: diff.any }]; var transition = [{ name: 'transition-property', type: t.propList }, { name: 'transition-duration', type: t.time }, { name: 'transition-delay', type: t.time }, { name: 'transition-timing-function', type: t.easing }]; var nodeSizeHashOverride = function nodeSizeHashOverride(ele, parsedProp) { if (parsedProp.value === 'label') { return -ele.poolIndex(); // no hash key hits is using label size (hitrate for perf probably low anyway) } else { return parsedProp.pfValue; } }; var nodeBody = [{ name: 'height', type: t.nodeSize, triggersBounds: diff.any, hashOverride: nodeSizeHashOverride }, { name: 'width', type: t.nodeSize, triggersBounds: diff.any, hashOverride: nodeSizeHashOverride }, { name: 'shape', type: t.nodeShape, triggersBounds: diff.any }, { name: 'shape-polygon-points', type: t.polygonPointList, triggersBounds: diff.any }, { name: 'background-color', type: t.color }, { name: 'background-fill', type: t.fill }, { name: 'background-opacity', type: t.zeroOneNumber }, { name: 'background-blacken', type: t.nOneOneNumber }, { name: 'background-gradient-stop-colors', type: t.colors }, { name: 'background-gradient-stop-positions', type: t.percentages }, { name: 'background-gradient-direction', type: t.gradientDirection }, { name: 'padding', type: t.sizeMaybePercent, triggersBounds: diff.any }, { name: 'padding-relative-to', type: t.paddingRelativeTo, triggersBounds: diff.any }, { name: 'bounds-expansion', type: t.boundsExpansion, triggersBounds: diff.any }]; var nodeBorder = [{ name: 'border-color', type: t.color }, { name: 'border-opacity', type: t.zeroOneNumber }, { name: 'border-width', type: t.size, triggersBounds: diff.any }, { name: 'border-style', type: t.borderStyle }]; var backgroundImage = [{ name: 'background-image', type: t.urls }, { name: 'background-image-crossorigin', type: t.bgCrossOrigin }, { name: 'background-image-opacity', type: t.zeroOneNumbers }, { name: 'background-image-containment', type: t.bgContainment }, { name: 'background-image-smoothing', type: t.bools }, { name: 'background-position-x', type: t.bgPos }, { name: 'background-position-y', type: t.bgPos }, { name: 'background-width-relative-to', type: t.bgRelativeTo }, { name: 'background-height-relative-to', type: t.bgRelativeTo }, { name: 'background-repeat', type: t.bgRepeat }, { name: 'background-fit', type: t.bgFit }, { name: 'background-clip', type: t.bgClip }, { name: 'background-width', type: t.bgWH }, { name: 'background-height', type: t.bgWH }, { name: 'background-offset-x', type: t.bgPos }, { name: 'background-offset-y', type: t.bgPos }]; var compound = [{ name: 'position', type: t.position, triggersBounds: diff.any }, { name: 'compound-sizing-wrt-labels', type: t.compoundIncludeLabels, triggersBounds: diff.any }, { name: 'min-width', type: t.size, triggersBounds: diff.any }, { name: 'min-width-bias-left', type: t.sizeMaybePercent, triggersBounds: diff.any }, { name: 'min-width-bias-right', type: t.sizeMaybePercent, triggersBounds: diff.any }, { name: 'min-height', type: t.size, triggersBounds: diff.any }, { name: 'min-height-bias-top', type: t.sizeMaybePercent, triggersBounds: diff.any }, { name: 'min-height-bias-bottom', type: t.sizeMaybePercent, triggersBounds: diff.any }]; var edgeLine = [{ name: 'line-style', type: t.lineStyle }, { name: 'line-color', type: t.color }, { name: 'line-fill', type: t.fill }, { name: 'line-cap', type: t.lineCap }, { name: 'line-opacity', type: t.zeroOneNumber }, { name: 'line-dash-pattern', type: t.numbers }, { name: 'line-dash-offset', type: t.number }, { name: 'line-gradient-stop-colors', type: t.colors }, { name: 'line-gradient-stop-positions', type: t.percentages }, { name: 'curve-style', type: t.curveStyle, triggersBounds: diff.any, triggersBoundsOfParallelBeziers: true }, { name: 'haystack-radius', type: t.zeroOneNumber, triggersBounds: diff.any }, { name: 'source-endpoint', type: t.edgeEndpoint, triggersBounds: diff.any }, { name: 'target-endpoint', type: t.edgeEndpoint, triggersBounds: diff.any }, { name: 'control-point-step-size', type: t.size, triggersBounds: diff.any }, { name: 'control-point-distances', type: t.bidirectionalSizes, triggersBounds: diff.any }, { name: 'control-point-weights', type: t.numbers, triggersBounds: diff.any }, { name: 'segment-distances', type: t.bidirectionalSizes, triggersBounds: diff.any }, { name: 'segment-weights', type: t.numbers, triggersBounds: diff.any }, { name: 'taxi-turn', type: t.bidirectionalSizeMaybePercent, triggersBounds: diff.any }, { name: 'taxi-turn-min-distance', type: t.size, triggersBounds: diff.any }, { name: 'taxi-direction', type: t.axisDirection, triggersBounds: diff.any }, { name: 'edge-distances', type: t.edgeDistances, triggersBounds: diff.any }, { name: 'arrow-scale', type: t.positiveNumber, triggersBounds: diff.any }, { name: 'loop-direction', type: t.angle, triggersBounds: diff.any }, { name: 'loop-sweep', type: t.angle, triggersBounds: diff.any }, { name: 'source-distance-from-node', type: t.size, triggersBounds: diff.any }, { name: 'target-distance-from-node', type: t.size, triggersBounds: diff.any }]; var ghost = [{ name: 'ghost', type: t.bool, triggersBounds: diff.any }, { name: 'ghost-offset-x', type: t.bidirectionalSize, triggersBounds: diff.any }, { name: 'ghost-offset-y', type: t.bidirectionalSize, triggersBounds: diff.any }, { name: 'ghost-opacity', type: t.zeroOneNumber }]; var core = [{ name: 'selection-box-color', type: t.color }, { name: 'selection-box-opacity', type: t.zeroOneNumber }, { name: 'selection-box-border-color', type: t.color }, { name: 'selection-box-border-width', type: t.size }, { name: 'active-bg-color', type: t.color }, { name: 'active-bg-opacity', type: t.zeroOneNumber }, { name: 'active-bg-size', type: t.size }, { name: 'outside-texture-bg-color', type: t.color }, { name: 'outside-texture-bg-opacity', type: t.zeroOneNumber }]; // pie backgrounds for nodes var pie = []; styfn$2.pieBackgroundN = 16; // because the pie properties are numbered, give access to a constant N (for renderer use) pie.push({ name: 'pie-size', type: t.sizeMaybePercent }); for (var i = 1; i <= styfn$2.pieBackgroundN; i++) { pie.push({ name: 'pie-' + i + '-background-color', type: t.color }); pie.push({ name: 'pie-' + i + '-background-size', type: t.percent }); pie.push({ name: 'pie-' + i + '-background-opacity', type: t.zeroOneNumber }); } // edge arrows var edgeArrow = []; var arrowPrefixes = styfn$2.arrowPrefixes = ['source', 'mid-source', 'target', 'mid-target']; [{ name: 'arrow-shape', type: t.arrowShape, triggersBounds: diff.any }, { name: 'arrow-color', type: t.color }, { name: 'arrow-fill', type: t.arrowFill }].forEach(function (prop) { arrowPrefixes.forEach(function (prefix) { var name = prefix + '-' + prop.name; var type = prop.type, triggersBounds = prop.triggersBounds; edgeArrow.push({ name: name, type: type, triggersBounds: triggersBounds }); }); }, {}); var props = styfn$2.properties = [].concat(behavior, transition, visibility, overlay, underlay, ghost, commonLabel, labelDimensions, mainLabel, sourceLabel, targetLabel, nodeBody, nodeBorder, backgroundImage, pie, compound, edgeLine, edgeArrow, core); var propGroups = styfn$2.propertyGroups = { // common to all eles behavior: behavior, transition: transition, visibility: visibility, overlay: overlay, underlay: underlay, ghost: ghost, // labels commonLabel: commonLabel, labelDimensions: labelDimensions, mainLabel: mainLabel, sourceLabel: sourceLabel, targetLabel: targetLabel, // node props nodeBody: nodeBody, nodeBorder: nodeBorder, backgroundImage: backgroundImage, pie: pie, compound: compound, // edge props edgeLine: edgeLine, edgeArrow: edgeArrow, core: core }; var propGroupNames = styfn$2.propertyGroupNames = {}; var propGroupKeys = styfn$2.propertyGroupKeys = Object.keys(propGroups); propGroupKeys.forEach(function (key) { propGroupNames[key] = propGroups[key].map(function (prop) { return prop.name; }); propGroups[key].forEach(function (prop) { return prop.groupKey = key; }); }); // define aliases var aliases = styfn$2.aliases = [{ name: 'content', pointsTo: 'label' }, { name: 'control-point-distance', pointsTo: 'control-point-distances' }, { name: 'control-point-weight', pointsTo: 'control-point-weights' }, { name: 'edge-text-rotation', pointsTo: 'text-rotation' }, { name: 'padding-left', pointsTo: 'padding' }, { name: 'padding-right', pointsTo: 'padding' }, { name: 'padding-top', pointsTo: 'padding' }, { name: 'padding-bottom', pointsTo: 'padding' }]; // list of property names styfn$2.propertyNames = props.map(function (p) { return p.name; }); // allow access of properties by name ( e.g. style.properties.height ) for (var _i = 0; _i < props.length; _i++) { var prop = props[_i]; props[prop.name] = prop; // allow lookup by name } // map aliases for (var _i2 = 0; _i2 < aliases.length; _i2++) { var alias = aliases[_i2]; var pointsToProp = props[alias.pointsTo]; var aliasProp = { name: alias.name, alias: true, pointsTo: pointsToProp }; // add alias prop for parsing props.push(aliasProp); props[alias.name] = aliasProp; // allow lookup by name } })(); styfn$2.getDefaultProperty = function (name) { return this.getDefaultProperties()[name]; }; styfn$2.getDefaultProperties = function () { var _p = this._private; if (_p.defaultProperties != null) { return _p.defaultProperties; } var rawProps = extend({ // core props 'selection-box-color': '#ddd', 'selection-box-opacity': 0.65, 'selection-box-border-color': '#aaa', 'selection-box-border-width': 1, 'active-bg-color': 'black', 'active-bg-opacity': 0.15, 'active-bg-size': 30, 'outside-texture-bg-color': '#000', 'outside-texture-bg-opacity': 0.125, // common node/edge props 'events': 'yes', 'text-events': 'no', 'text-valign': 'top', 'text-halign': 'center', 'text-justification': 'auto', 'line-height': 1, 'color': '#000', 'text-outline-color': '#000', 'text-outline-width': 0, 'text-outline-opacity': 1, 'text-opacity': 1, 'text-decoration': 'none', 'text-transform': 'none', 'text-wrap': 'none', 'text-overflow-wrap': 'whitespace', 'text-max-width': 9999, 'text-background-color': '#000', 'text-background-opacity': 0, 'text-background-shape': 'rectangle', 'text-background-padding': 0, 'text-border-opacity': 0, 'text-border-width': 0, 'text-border-style': 'solid', 'text-border-color': '#000', 'font-family': 'Helvetica Neue, Helvetica, sans-serif', 'font-style': 'normal', 'font-weight': 'normal', 'font-size': 16, 'min-zoomed-font-size': 0, 'text-rotation': 'none', 'source-text-rotation': 'none', 'target-text-rotation': 'none', 'visibility': 'visible', 'display': 'element', 'opacity': 1, 'z-compound-depth': 'auto', 'z-index-compare': 'auto', 'z-index': 0, 'label': '', 'text-margin-x': 0, 'text-margin-y': 0, 'source-label': '', 'source-text-offset': 0, 'source-text-margin-x': 0, 'source-text-margin-y': 0, 'target-label': '', 'target-text-offset': 0, 'target-text-margin-x': 0, 'target-text-margin-y': 0, 'overlay-opacity': 0, 'overlay-color': '#000', 'overlay-padding': 10, 'overlay-shape': 'round-rectangle', 'underlay-opacity': 0, 'underlay-color': '#000', 'underlay-padding': 10, 'underlay-shape': 'round-rectangle', 'transition-property': 'none', 'transition-duration': 0, 'transition-delay': 0, 'transition-timing-function': 'linear', // node props 'background-blacken': 0, 'background-color': '#999', 'background-fill': 'solid', 'background-opacity': 1, 'background-image': 'none', 'background-image-crossorigin': 'anonymous', 'background-image-opacity': 1, 'background-image-containment': 'inside', 'background-image-smoothing': 'yes', 'background-position-x': '50%', 'background-position-y': '50%', 'background-offset-x': 0, 'background-offset-y': 0, 'background-width-relative-to': 'include-padding', 'background-height-relative-to': 'include-padding', 'background-repeat': 'no-repeat', 'background-fit': 'none', 'background-clip': 'node', 'background-width': 'auto', 'background-height': 'auto', 'border-color': '#000', 'border-opacity': 1, 'border-width': 0, 'border-style': 'solid', 'height': 30, 'width': 30, 'shape': 'ellipse', 'shape-polygon-points': '-1, -1, 1, -1, 1, 1, -1, 1', 'bounds-expansion': 0, // node gradient 'background-gradient-direction': 'to-bottom', 'background-gradient-stop-colors': '#999', 'background-gradient-stop-positions': '0%', // ghost props 'ghost': 'no', 'ghost-offset-y': 0, 'ghost-offset-x': 0, 'ghost-opacity': 0, // compound props 'padding': 0, 'padding-relative-to': 'width', 'position': 'origin', 'compound-sizing-wrt-labels': 'include', 'min-width': 0, 'min-width-bias-left': 0, 'min-width-bias-right': 0, 'min-height': 0, 'min-height-bias-top': 0, 'min-height-bias-bottom': 0 }, { // node pie bg 'pie-size': '100%' }, [{ name: 'pie-{{i}}-background-color', value: 'black' }, { name: 'pie-{{i}}-background-size', value: '0%' }, { name: 'pie-{{i}}-background-opacity', value: 1 }].reduce(function (css, prop) { for (var i = 1; i <= styfn$2.pieBackgroundN; i++) { var name = prop.name.replace('{{i}}', i); var val = prop.value; css[name] = val; } return css; }, {}), { // edge props 'line-style': 'solid', 'line-color': '#999', 'line-fill': 'solid', 'line-cap': 'butt', 'line-opacity': 1, 'line-gradient-stop-colors': '#999', 'line-gradient-stop-positions': '0%', 'control-point-step-size': 40, 'control-point-weights': 0.5, 'segment-weights': 0.5, 'segment-distances': 20, 'taxi-turn': '50%', 'taxi-turn-min-distance': 10, 'taxi-direction': 'auto', 'edge-distances': 'intersection', 'curve-style': 'haystack', 'haystack-radius': 0, 'arrow-scale': 1, 'loop-direction': '-45deg', 'loop-sweep': '-90deg', 'source-distance-from-node': 0, 'target-distance-from-node': 0, 'source-endpoint': 'outside-to-node', 'target-endpoint': 'outside-to-node', 'line-dash-pattern': [6, 3], 'line-dash-offset': 0 }, [{ name: 'arrow-shape', value: 'none' }, { name: 'arrow-color', value: '#999' }, { name: 'arrow-fill', value: 'filled' }].reduce(function (css, prop) { styfn$2.arrowPrefixes.forEach(function (prefix) { var name = prefix + '-' + prop.name; var val = prop.value; css[name] = val; }); return css; }, {})); var parsedProps = {}; for (var i = 0; i < this.properties.length; i++) { var prop = this.properties[i]; if (prop.pointsTo) { continue; } var name = prop.name; var val = rawProps[name]; var parsedProp = this.parse(name, val); parsedProps[name] = parsedProp; } _p.defaultProperties = parsedProps; return _p.defaultProperties; }; styfn$2.addDefaultStylesheet = function () { this.selector(':parent').css({ 'shape': 'rectangle', 'padding': 10, 'background-color': '#eee', 'border-color': '#ccc', 'border-width': 1 }).selector('edge').css({ 'width': 3 }).selector(':loop').css({ 'curve-style': 'bezier' }).selector('edge:compound').css({ 'curve-style': 'bezier', 'source-endpoint': 'outside-to-line', 'target-endpoint': 'outside-to-line' }).selector(':selected').css({ 'background-color': '#0169D9', 'line-color': '#0169D9', 'source-arrow-color': '#0169D9', 'target-arrow-color': '#0169D9', 'mid-source-arrow-color': '#0169D9', 'mid-target-arrow-color': '#0169D9' }).selector(':parent:selected').css({ 'background-color': '#CCE1F9', 'border-color': '#aec8e5' }).selector(':active').css({ 'overlay-color': 'black', 'overlay-padding': 10, 'overlay-opacity': 0.25 }); this.defaultLength = this.length; }; var styfn$1 = {}; // a caching layer for property parsing styfn$1.parse = function (name, value, propIsBypass, propIsFlat) { var self = this; // function values can't be cached in all cases, and there isn't much benefit of caching them anyway if (fn$6(value)) { return self.parseImplWarn(name, value, propIsBypass, propIsFlat); } var flatKey = propIsFlat === 'mapping' || propIsFlat === true || propIsFlat === false || propIsFlat == null ? 'dontcare' : propIsFlat; var bypassKey = propIsBypass ? 't' : 'f'; var valueKey = '' + value; var argHash = hashStrings(name, valueKey, bypassKey, flatKey); var propCache = self.propCache = self.propCache || []; var ret; if (!(ret = propCache[argHash])) { ret = propCache[argHash] = self.parseImplWarn(name, value, propIsBypass, propIsFlat); } // - bypasses can't be shared b/c the value can be changed by animations or otherwise overridden // - mappings can't be shared b/c mappings are per-element if (propIsBypass || propIsFlat === 'mapping') { // need a copy since props are mutated later in their lifecycles ret = copy(ret); if (ret) { ret.value = copy(ret.value); // because it could be an array, e.g. colour } } return ret; }; styfn$1.parseImplWarn = function (name, value, propIsBypass, propIsFlat) { var prop = this.parseImpl(name, value, propIsBypass, propIsFlat); if (!prop && value != null) { warn("The style property `".concat(name, ": ").concat(value, "` is invalid")); } if (prop && (prop.name === 'width' || prop.name === 'height') && value === 'label') { warn('The style value of `label` is deprecated for `' + prop.name + '`'); } return prop; }; // parse a property; return null on invalid; return parsed property otherwise // fields : // - name : the name of the property // - value : the parsed, native-typed value of the property // - strValue : a string value that represents the property value in valid css // - bypass : true iff the property is a bypass property styfn$1.parseImpl = function (name, value, propIsBypass, propIsFlat) { var self = this; name = camel2dash(name); // make sure the property name is in dash form (e.g. 'property-name' not 'propertyName') var property = self.properties[name]; var passedValue = value; var types = self.types; if (!property) { return null; } // return null on property of unknown name if (value === undefined) { return null; } // can't assign undefined // the property may be an alias if (property.alias) { property = property.pointsTo; name = property.name; } var valueIsString = string(value); if (valueIsString) { // trim the value to make parsing easier value = value.trim(); } var type = property.type; if (!type) { return null; } // no type, no luck // check if bypass is null or empty string (i.e. indication to delete bypass property) if (propIsBypass && (value === '' || value === null)) { return { name: name, value: value, bypass: true, deleteBypass: true }; } // check if value is a function used as a mapper if (fn$6(value)) { return { name: name, value: value, strValue: 'fn', mapped: types.fn, bypass: propIsBypass }; } // check if value is mapped var data, mapData; if (!valueIsString || propIsFlat || value.length < 7 || value[1] !== 'a') ; else if (value.length >= 7 && value[0] === 'd' && (data = new RegExp(types.data.regex).exec(value))) { if (propIsBypass) { return false; } // mappers not allowed in bypass var mapped = types.data; return { name: name, value: data, strValue: '' + value, mapped: mapped, field: data[1], bypass: propIsBypass }; } else if (value.length >= 10 && value[0] === 'm' && (mapData = new RegExp(types.mapData.regex).exec(value))) { if (propIsBypass) { return false; } // mappers not allowed in bypass if (type.multiple) { return false; } // impossible to map to num var _mapped = types.mapData; // we can map only if the type is a colour or a number if (!(type.color || type.number)) { return false; } var valueMin = this.parse(name, mapData[4]); // parse to validate if (!valueMin || valueMin.mapped) { return false; } // can't be invalid or mapped var valueMax = this.parse(name, mapData[5]); // parse to validate if (!valueMax || valueMax.mapped) { return false; } // can't be invalid or mapped // check if valueMin and valueMax are the same if (valueMin.pfValue === valueMax.pfValue || valueMin.strValue === valueMax.strValue) { warn('`' + name + ': ' + value + '` is not a valid mapper because the output range is zero; converting to `' + name + ': ' + valueMin.strValue + '`'); return this.parse(name, valueMin.strValue); // can't make much of a mapper without a range } else if (type.color) { var c1 = valueMin.value; var c2 = valueMax.value; var same = c1[0] === c2[0] // red && c1[1] === c2[1] // green && c1[2] === c2[2] // blue && ( // optional alpha c1[3] === c2[3] // same alpha outright || (c1[3] == null || c1[3] === 1 // full opacity for colour 1? ) && (c2[3] == null || c2[3] === 1) // full opacity for colour 2? ); if (same) { return false; } // can't make a mapper without a range } return { name: name, value: mapData, strValue: '' + value, mapped: _mapped, field: mapData[1], fieldMin: parseFloat(mapData[2]), // min & max are numeric fieldMax: parseFloat(mapData[3]), valueMin: valueMin.value, valueMax: valueMax.value, bypass: propIsBypass }; } if (type.multiple && propIsFlat !== 'multiple') { var vals; if (valueIsString) { vals = value.split(/\s+/); } else if (array(value)) { vals = value; } else { vals = [value]; } if (type.evenMultiple && vals.length % 2 !== 0) { return null; } var valArr = []; var unitsArr = []; var pfValArr = []; var strVal = ''; var hasEnum = false; for (var i = 0; i < vals.length; i++) { var p = self.parse(name, vals[i], propIsBypass, 'multiple'); hasEnum = hasEnum || string(p.value); valArr.push(p.value); pfValArr.push(p.pfValue != null ? p.pfValue : p.value); unitsArr.push(p.units); strVal += (i > 0 ? ' ' : '') + p.strValue; } if (type.validate && !type.validate(valArr, unitsArr)) { return null; } if (type.singleEnum && hasEnum) { if (valArr.length === 1 && string(valArr[0])) { return { name: name, value: valArr[0], strValue: valArr[0], bypass: propIsBypass }; } else { return null; } } return { name: name, value: valArr, pfValue: pfValArr, strValue: strVal, bypass: propIsBypass, units: unitsArr }; } // several types also allow enums var checkEnums = function checkEnums() { for (var _i = 0; _i < type.enums.length; _i++) { var en = type.enums[_i]; if (en === value) { return { name: name, value: value, strValue: '' + value, bypass: propIsBypass }; } } return null; }; // check the type and return the appropriate object if (type.number) { var units; var implicitUnits = 'px'; // not set => px if (type.units) { // use specified units if set units = type.units; } if (type.implicitUnits) { implicitUnits = type.implicitUnits; } if (!type.unitless) { if (valueIsString) { var unitsRegex = 'px|em' + (type.allowPercent ? '|\\%' : ''); if (units) { unitsRegex = units; } // only allow explicit units if so set var match = value.match('^(' + number + ')(' + unitsRegex + ')?' + '$'); if (match) { value = match[1]; units = match[2] || implicitUnits; } } else if (!units || type.implicitUnits) { units = implicitUnits; // implicitly px if unspecified } } value = parseFloat(value); // if not a number and enums not allowed, then the value is invalid if (isNaN(value) && type.enums === undefined) { return null; } // check if this number type also accepts special keywords in place of numbers // (i.e. `left`, `auto`, etc) if (isNaN(value) && type.enums !== undefined) { value = passedValue; return checkEnums(); } // check if value must be an integer if (type.integer && !integer(value)) { return null; } // check value is within range if (type.min !== undefined && (value < type.min || type.strictMin && value === type.min) || type.max !== undefined && (value > type.max || type.strictMax && value === type.max)) { return null; } var ret = { name: name, value: value, strValue: '' + value + (units ? units : ''), units: units, bypass: propIsBypass }; // normalise value in pixels if (type.unitless || units !== 'px' && units !== 'em') { ret.pfValue = value; } else { ret.pfValue = units === 'px' || !units ? value : this.getEmSizeInPixels() * value; } // normalise value in ms if (units === 'ms' || units === 's') { ret.pfValue = units === 'ms' ? value : 1000 * value; } // normalise value in rad if (units === 'deg' || units === 'rad') { ret.pfValue = units === 'rad' ? value : deg2rad(value); } // normalize value in % if (units === '%') { ret.pfValue = value / 100; } return ret; } else if (type.propList) { var props = []; var propsStr = '' + value; if (propsStr === 'none') ; else { // go over each prop var propsSplit = propsStr.split(/\s*,\s*|\s+/); for (var _i2 = 0; _i2 < propsSplit.length; _i2++) { var propName = propsSplit[_i2].trim(); if (self.properties[propName]) { props.push(propName); } else { warn('`' + propName + '` is not a valid property name'); } } if (props.length === 0) { return null; } } return { name: name, value: props, strValue: props.length === 0 ? 'none' : props.join(' '), bypass: propIsBypass }; } else if (type.color) { var tuple = color2tuple(value); if (!tuple) { return null; } return { name: name, value: tuple, pfValue: tuple, strValue: 'rgb(' + tuple[0] + ',' + tuple[1] + ',' + tuple[2] + ')', // n.b. no spaces b/c of multiple support bypass: propIsBypass }; } else if (type.regex || type.regexes) { // first check enums if (type.enums) { var enumProp = checkEnums(); if (enumProp) { return enumProp; } } var regexes = type.regexes ? type.regexes : [type.regex]; for (var _i3 = 0; _i3 < regexes.length; _i3++) { var regex = new RegExp(regexes[_i3]); // make a regex from the type string var m = regex.exec(value); if (m) { // regex matches return { name: name, value: type.singleRegexMatchValue ? m[1] : m, strValue: '' + value, bypass: propIsBypass }; } } return null; // didn't match any } else if (type.string) { // just return return { name: name, value: '' + value, strValue: '' + value, bypass: propIsBypass }; } else if (type.enums) { // check enums last because it's a combo type in others return checkEnums(); } else { return null; // not a type we can handle } }; var Style = function Style(cy) { if (!(this instanceof Style)) { return new Style(cy); } if (!core(cy)) { error('A style must have a core reference'); return; } this._private = { cy: cy, coreStyle: {} }; this.length = 0; this.resetToDefault(); }; var styfn = Style.prototype; styfn.instanceString = function () { return 'style'; }; // remove all contexts styfn.clear = function () { var _p = this._private; var cy = _p.cy; var eles = cy.elements(); for (var i = 0; i < this.length; i++) { this[i] = undefined; } this.length = 0; _p.contextStyles = {}; _p.propDiffs = {}; this.cleanElements(eles, true); eles.forEach(function (ele) { var ele_p = ele[0]._private; ele_p.styleDirty = true; ele_p.appliedInitStyle = false; }); return this; // chaining }; styfn.resetToDefault = function () { this.clear(); this.addDefaultStylesheet(); return this; }; // builds a style object for the 'core' selector styfn.core = function (propName) { return this._private.coreStyle[propName] || this.getDefaultProperty(propName); }; // create a new context from the specified selector string and switch to that context styfn.selector = function (selectorStr) { // 'core' is a special case and does not need a selector var selector = selectorStr === 'core' ? null : new Selector(selectorStr); var i = this.length++; // new context means new index this[i] = { selector: selector, properties: [], mappedProperties: [], index: i }; return this; // chaining }; // add one or many css rules to the current context styfn.css = function () { var self = this; var args = arguments; if (args.length === 1) { var map = args[0]; for (var i = 0; i < self.properties.length; i++) { var prop = self.properties[i]; var mapVal = map[prop.name]; if (mapVal === undefined) { mapVal = map[dash2camel(prop.name)]; } if (mapVal !== undefined) { this.cssRule(prop.name, mapVal); } } } else if (args.length === 2) { this.cssRule(args[0], args[1]); } // do nothing if args are invalid return this; // chaining }; styfn.style = styfn.css; // add a single css rule to the current context styfn.cssRule = function (name, value) { // name-value pair var property = this.parse(name, value); // add property to current context if valid if (property) { var i = this.length - 1; this[i].properties.push(property); this[i].properties[property.name] = property; // allow access by name as well if (property.name.match(/pie-(\d+)-background-size/) && property.value) { this._private.hasPie = true; } if (property.mapped) { this[i].mappedProperties.push(property); } // add to core style if necessary var currentSelectorIsCore = !this[i].selector; if (currentSelectorIsCore) { this._private.coreStyle[property.name] = property; } } return this; // chaining }; styfn.append = function (style) { if (stylesheet(style)) { style.appendToStyle(this); } else if (array(style)) { this.appendFromJson(style); } else if (string(style)) { this.appendFromString(style); } // you probably wouldn't want to append a Style, since you'd duplicate the default parts return this; }; // static function Style.fromJson = function (cy, json) { var style = new Style(cy); style.fromJson(json); return style; }; Style.fromString = function (cy, string) { return new Style(cy).fromString(string); }; [styfn$8, styfn$7, styfn$6, styfn$5, styfn$4, styfn$3, styfn$2, styfn$1].forEach(function (props) { extend(styfn, props); }); Style.types = styfn.types; Style.properties = styfn.properties; Style.propertyGroups = styfn.propertyGroups; Style.propertyGroupNames = styfn.propertyGroupNames; Style.propertyGroupKeys = styfn.propertyGroupKeys; var corefn$2 = { style: function style(newStyle) { if (newStyle) { var s = this.setStyle(newStyle); s.update(); } return this._private.style; }, setStyle: function setStyle(style) { var _p = this._private; if (stylesheet(style)) { _p.style = style.generateStyle(this); } else if (array(style)) { _p.style = Style.fromJson(this, style); } else if (string(style)) { _p.style = Style.fromString(this, style); } else { _p.style = Style(this); } return _p.style; }, // e.g. cy.data() changed => recalc ele mappers updateStyle: function updateStyle() { this.mutableElements().updateStyle(); // just send to all eles } }; var defaultSelectionType = 'single'; var corefn$1 = { autolock: function autolock(bool) { if (bool !== undefined) { this._private.autolock = bool ? true : false; } else { return this._private.autolock; } return this; // chaining }, autoungrabify: function autoungrabify(bool) { if (bool !== undefined) { this._private.autoungrabify = bool ? true : false; } else { return this._private.autoungrabify; } return this; // chaining }, autounselectify: function autounselectify(bool) { if (bool !== undefined) { this._private.autounselectify = bool ? true : false; } else { return this._private.autounselectify; } return this; // chaining }, selectionType: function selectionType(selType) { var _p = this._private; if (_p.selectionType == null) { _p.selectionType = defaultSelectionType; } if (selType !== undefined) { if (selType === 'additive' || selType === 'single') { _p.selectionType = selType; } } else { return _p.selectionType; } return this; }, panningEnabled: function panningEnabled(bool) { if (bool !== undefined) { this._private.panningEnabled = bool ? true : false; } else { return this._private.panningEnabled; } return this; // chaining }, userPanningEnabled: function userPanningEnabled(bool) { if (bool !== undefined) { this._private.userPanningEnabled = bool ? true : false; } else { return this._private.userPanningEnabled; } return this; // chaining }, zoomingEnabled: function zoomingEnabled(bool) { if (bool !== undefined) { this._private.zoomingEnabled = bool ? true : false; } else { return this._private.zoomingEnabled; } return this; // chaining }, userZoomingEnabled: function userZoomingEnabled(bool) { if (bool !== undefined) { this._private.userZoomingEnabled = bool ? true : false; } else { return this._private.userZoomingEnabled; } return this; // chaining }, boxSelectionEnabled: function boxSelectionEnabled(bool) { if (bool !== undefined) { this._private.boxSelectionEnabled = bool ? true : false; } else { return this._private.boxSelectionEnabled; } return this; // chaining }, pan: function pan() { var args = arguments; var pan = this._private.pan; var dim, val, dims, x, y; switch (args.length) { case 0: // .pan() return pan; case 1: if (string(args[0])) { // .pan('x') dim = args[0]; return pan[dim]; } else if (plainObject(args[0])) { // .pan({ x: 0, y: 100 }) if (!this._private.panningEnabled) { return this; } dims = args[0]; x = dims.x; y = dims.y; if (number$1(x)) { pan.x = x; } if (number$1(y)) { pan.y = y; } this.emit('pan viewport'); } break; case 2: // .pan('x', 100) if (!this._private.panningEnabled) { return this; } dim = args[0]; val = args[1]; if ((dim === 'x' || dim === 'y') && number$1(val)) { pan[dim] = val; } this.emit('pan viewport'); break; // invalid } this.notify('viewport'); return this; // chaining }, panBy: function panBy(arg0, arg1) { var args = arguments; var pan = this._private.pan; var dim, val, dims, x, y; if (!this._private.panningEnabled) { return this; } switch (args.length) { case 1: if (plainObject(arg0)) { // .panBy({ x: 0, y: 100 }) dims = args[0]; x = dims.x; y = dims.y; if (number$1(x)) { pan.x += x; } if (number$1(y)) { pan.y += y; } this.emit('pan viewport'); } break; case 2: // .panBy('x', 100) dim = arg0; val = arg1; if ((dim === 'x' || dim === 'y') && number$1(val)) { pan[dim] += val; } this.emit('pan viewport'); break; // invalid } this.notify('viewport'); return this; // chaining }, fit: function fit(elements, padding) { var viewportState = this.getFitViewport(elements, padding); if (viewportState) { var _p = this._private; _p.zoom = viewportState.zoom; _p.pan = viewportState.pan; this.emit('pan zoom viewport'); this.notify('viewport'); } return this; // chaining }, getFitViewport: function getFitViewport(elements, padding) { if (number$1(elements) && padding === undefined) { // elements is optional padding = elements; elements = undefined; } if (!this._private.panningEnabled || !this._private.zoomingEnabled) { return; } var bb; if (string(elements)) { var sel = elements; elements = this.$(sel); } else if (boundingBox(elements)) { // assume bb var bbe = elements; bb = { x1: bbe.x1, y1: bbe.y1, x2: bbe.x2, y2: bbe.y2 }; bb.w = bb.x2 - bb.x1; bb.h = bb.y2 - bb.y1; } else if (!elementOrCollection(elements)) { elements = this.mutableElements(); } if (elementOrCollection(elements) && elements.empty()) { return; } // can't fit to nothing bb = bb || elements.boundingBox(); var w = this.width(); var h = this.height(); var zoom; padding = number$1(padding) ? padding : 0; if (!isNaN(w) && !isNaN(h) && w > 0 && h > 0 && !isNaN(bb.w) && !isNaN(bb.h) && bb.w > 0 && bb.h > 0) { zoom = Math.min((w - 2 * padding) / bb.w, (h - 2 * padding) / bb.h); // crop zoom zoom = zoom > this._private.maxZoom ? this._private.maxZoom : zoom; zoom = zoom < this._private.minZoom ? this._private.minZoom : zoom; var pan = { // now pan to middle x: (w - zoom * (bb.x1 + bb.x2)) / 2, y: (h - zoom * (bb.y1 + bb.y2)) / 2 }; return { zoom: zoom, pan: pan }; } return; }, zoomRange: function zoomRange(min, max) { var _p = this._private; if (max == null) { var opts = min; min = opts.min; max = opts.max; } if (number$1(min) && number$1(max) && min <= max) { _p.minZoom = min; _p.maxZoom = max; } else if (number$1(min) && max === undefined && min <= _p.maxZoom) { _p.minZoom = min; } else if (number$1(max) && min === undefined && max >= _p.minZoom) { _p.maxZoom = max; } return this; }, minZoom: function minZoom(zoom) { if (zoom === undefined) { return this._private.minZoom; } else { return this.zoomRange({ min: zoom }); } }, maxZoom: function maxZoom(zoom) { if (zoom === undefined) { return this._private.maxZoom; } else { return this.zoomRange({ max: zoom }); } }, getZoomedViewport: function getZoomedViewport(params) { var _p = this._private; var currentPan = _p.pan; var currentZoom = _p.zoom; var pos; // in rendered px var zoom; var bail = false; if (!_p.zoomingEnabled) { // zooming disabled bail = true; } if (number$1(params)) { // then set the zoom zoom = params; } else if (plainObject(params)) { // then zoom about a point zoom = params.level; if (params.position != null) { pos = modelToRenderedPosition(params.position, currentZoom, currentPan); } else if (params.renderedPosition != null) { pos = params.renderedPosition; } if (pos != null && !_p.panningEnabled) { // panning disabled bail = true; } } // crop zoom zoom = zoom > _p.maxZoom ? _p.maxZoom : zoom; zoom = zoom < _p.minZoom ? _p.minZoom : zoom; // can't zoom with invalid params if (bail || !number$1(zoom) || zoom === currentZoom || pos != null && (!number$1(pos.x) || !number$1(pos.y))) { return null; } if (pos != null) { // set zoom about position var pan1 = currentPan; var zoom1 = currentZoom; var zoom2 = zoom; var pan2 = { x: -zoom2 / zoom1 * (pos.x - pan1.x) + pos.x, y: -zoom2 / zoom1 * (pos.y - pan1.y) + pos.y }; return { zoomed: true, panned: true, zoom: zoom2, pan: pan2 }; } else { // just set the zoom return { zoomed: true, panned: false, zoom: zoom, pan: currentPan }; } }, zoom: function zoom(params) { if (params === undefined) { // get return this._private.zoom; } else { // set var vp = this.getZoomedViewport(params); var _p = this._private; if (vp == null || !vp.zoomed) { return this; } _p.zoom = vp.zoom; if (vp.panned) { _p.pan.x = vp.pan.x; _p.pan.y = vp.pan.y; } this.emit('zoom' + (vp.panned ? ' pan' : '') + ' viewport'); this.notify('viewport'); return this; // chaining } }, viewport: function viewport(opts) { var _p = this._private; var zoomDefd = true; var panDefd = true; var events = []; // to trigger var zoomFailed = false; var panFailed = false; if (!opts) { return this; } if (!number$1(opts.zoom)) { zoomDefd = false; } if (!plainObject(opts.pan)) { panDefd = false; } if (!zoomDefd && !panDefd) { return this; } if (zoomDefd) { var z = opts.zoom; if (z < _p.minZoom || z > _p.maxZoom || !_p.zoomingEnabled) { zoomFailed = true; } else { _p.zoom = z; events.push('zoom'); } } if (panDefd && (!zoomFailed || !opts.cancelOnFailedZoom) && _p.panningEnabled) { var p = opts.pan; if (number$1(p.x)) { _p.pan.x = p.x; panFailed = false; } if (number$1(p.y)) { _p.pan.y = p.y; panFailed = false; } if (!panFailed) { events.push('pan'); } } if (events.length > 0) { events.push('viewport'); this.emit(events.join(' ')); this.notify('viewport'); } return this; // chaining }, center: function center(elements) { var pan = this.getCenterPan(elements); if (pan) { this._private.pan = pan; this.emit('pan viewport'); this.notify('viewport'); } return this; // chaining }, getCenterPan: function getCenterPan(elements, zoom) { if (!this._private.panningEnabled) { return; } if (string(elements)) { var selector = elements; elements = this.mutableElements().filter(selector); } else if (!elementOrCollection(elements)) { elements = this.mutableElements(); } if (elements.length === 0) { return; } // can't centre pan to nothing var bb = elements.boundingBox(); var w = this.width(); var h = this.height(); zoom = zoom === undefined ? this._private.zoom : zoom; var pan = { // middle x: (w - zoom * (bb.x1 + bb.x2)) / 2, y: (h - zoom * (bb.y1 + bb.y2)) / 2 }; return pan; }, reset: function reset() { if (!this._private.panningEnabled || !this._private.zoomingEnabled) { return this; } this.viewport({ pan: { x: 0, y: 0 }, zoom: 1 }); return this; // chaining }, invalidateSize: function invalidateSize() { this._private.sizeCache = null; }, size: function size() { var _p = this._private; var container = _p.container; return _p.sizeCache = _p.sizeCache || (container ? function () { var style = window$1.getComputedStyle(container); var val = function val(name) { return parseFloat(style.getPropertyValue(name)); }; return { width: container.clientWidth - val('padding-left') - val('padding-right'), height: container.clientHeight - val('padding-top') - val('padding-bottom') }; }() : { // fallback if no container (not 0 b/c can be used for dividing etc) width: 1, height: 1 }); }, width: function width() { return this.size().width; }, height: function height() { return this.size().height; }, extent: function extent() { var pan = this._private.pan; var zoom = this._private.zoom; var rb = this.renderedExtent(); var b = { x1: (rb.x1 - pan.x) / zoom, x2: (rb.x2 - pan.x) / zoom, y1: (rb.y1 - pan.y) / zoom, y2: (rb.y2 - pan.y) / zoom }; b.w = b.x2 - b.x1; b.h = b.y2 - b.y1; return b; }, renderedExtent: function renderedExtent() { var width = this.width(); var height = this.height(); return { x1: 0, y1: 0, x2: width, y2: height, w: width, h: height }; }, multiClickDebounceTime: function multiClickDebounceTime(_int) { if (_int) this._private.multiClickDebounceTime = _int;else return this._private.multiClickDebounceTime; return this; // chaining } }; // aliases corefn$1.centre = corefn$1.center; // backwards compatibility corefn$1.autolockNodes = corefn$1.autolock; corefn$1.autoungrabifyNodes = corefn$1.autoungrabify; var fn = { data: define.data({ field: 'data', bindingEvent: 'data', allowBinding: true, allowSetting: true, settingEvent: 'data', settingTriggersEvent: true, triggerFnName: 'trigger', allowGetting: true, updateStyle: true }), removeData: define.removeData({ field: 'data', event: 'data', triggerFnName: 'trigger', triggerEvent: true, updateStyle: true }), scratch: define.data({ field: 'scratch', bindingEvent: 'scratch', allowBinding: true, allowSetting: true, settingEvent: 'scratch', settingTriggersEvent: true, triggerFnName: 'trigger', allowGetting: true, updateStyle: true }), removeScratch: define.removeData({ field: 'scratch', event: 'scratch', triggerFnName: 'trigger', triggerEvent: true, updateStyle: true }) }; // aliases fn.attr = fn.data; fn.removeAttr = fn.removeData; var Core = function Core(opts) { var cy = this; opts = extend({}, opts); var container = opts.container; // allow for passing a wrapped jquery object // e.g. cytoscape({ container: $('#cy') }) if (container && !htmlElement(container) && htmlElement(container[0])) { container = container[0]; } var reg = container ? container._cyreg : null; // e.g. already registered some info (e.g. readies) via jquery reg = reg || {}; if (reg && reg.cy) { reg.cy.destroy(); reg = {}; // old instance => replace reg completely } var readies = reg.readies = reg.readies || []; if (container) { container._cyreg = reg; } // make sure container assoc'd reg points to this cy reg.cy = cy; var head = window$1 !== undefined && container !== undefined && !opts.headless; var options = opts; options.layout = extend({ name: head ? 'grid' : 'null' }, options.layout); options.renderer = extend({ name: head ? 'canvas' : 'null' }, options.renderer); var defVal = function defVal(def, val, altVal) { if (val !== undefined) { return val; } else if (altVal !== undefined) { return altVal; } else { return def; } }; var _p = this._private = { container: container, // html dom ele container ready: false, // whether ready has been triggered options: options, // cached options elements: new Collection(this), // elements in the graph listeners: [], // list of listeners aniEles: new Collection(this), // elements being animated data: options.data || {}, // data for the core scratch: {}, // scratch object for core layout: null, renderer: null, destroyed: false, // whether destroy was called notificationsEnabled: true, // whether notifications are sent to the renderer minZoom: 1e-50, maxZoom: 1e50, zoomingEnabled: defVal(true, options.zoomingEnabled), userZoomingEnabled: defVal(true, options.userZoomingEnabled), panningEnabled: defVal(true, options.panningEnabled), userPanningEnabled: defVal(true, options.userPanningEnabled), boxSelectionEnabled: defVal(true, options.boxSelectionEnabled), autolock: defVal(false, options.autolock, options.autolockNodes), autoungrabify: defVal(false, options.autoungrabify, options.autoungrabifyNodes), autounselectify: defVal(false, options.autounselectify), styleEnabled: options.styleEnabled === undefined ? head : options.styleEnabled, zoom: number$1(options.zoom) ? options.zoom : 1, pan: { x: plainObject(options.pan) && number$1(options.pan.x) ? options.pan.x : 0, y: plainObject(options.pan) && number$1(options.pan.y) ? options.pan.y : 0 }, animation: { // object for currently-running animations current: [], queue: [] }, hasCompoundNodes: false, multiClickDebounceTime: defVal(250, options.multiClickDebounceTime) }; this.createEmitter(); // set selection type this.selectionType(options.selectionType); // init zoom bounds this.zoomRange({ min: options.minZoom, max: options.maxZoom }); var loadExtData = function loadExtData(extData, next) { var anyIsPromise = extData.some(promise); if (anyIsPromise) { return Promise$1.all(extData).then(next); // load all data asynchronously, then exec rest of init } else { next(extData); // exec synchronously for convenience } }; // start with the default stylesheet so we have something before loading an external stylesheet if (_p.styleEnabled) { cy.setStyle([]); } // create the renderer var rendererOptions = extend({}, options, options.renderer); // allow rendering hints in top level options cy.initRenderer(rendererOptions); var setElesAndLayout = function setElesAndLayout(elements, onload, ondone) { cy.notifications(false); // remove old elements var oldEles = cy.mutableElements(); if (oldEles.length > 0) { oldEles.remove(); } if (elements != null) { if (plainObject(elements) || array(elements)) { cy.add(elements); } } cy.one('layoutready', function (e) { cy.notifications(true); cy.emit(e); // we missed this event by turning notifications off, so pass it on cy.one('load', onload); cy.emitAndNotify('load'); }).one('layoutstop', function () { cy.one('done', ondone); cy.emit('done'); }); var layoutOpts = extend({}, cy._private.options.layout); layoutOpts.eles = cy.elements(); cy.layout(layoutOpts).run(); }; loadExtData([options.style, options.elements], function (thens) { var initStyle = thens[0]; var initEles = thens[1]; // init style if (_p.styleEnabled) { cy.style().append(initStyle); } // initial load setElesAndLayout(initEles, function () { // onready cy.startAnimationLoop(); _p.ready = true; // if a ready callback is specified as an option, the bind it if (fn$6(options.ready)) { cy.on('ready', options.ready); } // bind all the ready handlers registered before creating this instance for (var i = 0; i < readies.length; i++) { var fn = readies[i]; cy.on('ready', fn); } if (reg) { reg.readies = []; } // clear b/c we've bound them all and don't want to keep it around in case a new core uses the same div etc cy.emit('ready'); }, options.done); }); }; var corefn = Core.prototype; // short alias extend(corefn, { instanceString: function instanceString() { return 'core'; }, isReady: function isReady() { return this._private.ready; }, destroyed: function destroyed() { return this._private.destroyed; }, ready: function ready(fn) { if (this.isReady()) { this.emitter().emit('ready', [], fn); // just calls fn as though triggered via ready event } else { this.on('ready', fn); } return this; }, destroy: function destroy() { var cy = this; if (cy.destroyed()) return; cy.stopAnimationLoop(); cy.destroyRenderer(); this.emit('destroy'); cy._private.destroyed = true; return cy; }, hasElementWithId: function hasElementWithId(id) { return this._private.elements.hasElementWithId(id); }, getElementById: function getElementById(id) { return this._private.elements.getElementById(id); }, hasCompoundNodes: function hasCompoundNodes() { return this._private.hasCompoundNodes; }, headless: function headless() { return this._private.renderer.isHeadless(); }, styleEnabled: function styleEnabled() { return this._private.styleEnabled; }, addToPool: function addToPool(eles) { this._private.elements.merge(eles); return this; // chaining }, removeFromPool: function removeFromPool(eles) { this._private.elements.unmerge(eles); return this; }, container: function container() { return this._private.container || null; }, mount: function mount(container) { if (container == null) { return; } var cy = this; var _p = cy._private; var options = _p.options; if (!htmlElement(container) && htmlElement(container[0])) { container = container[0]; } cy.stopAnimationLoop(); cy.destroyRenderer(); _p.container = container; _p.styleEnabled = true; cy.invalidateSize(); cy.initRenderer(extend({}, options, options.renderer, { // allow custom renderer name to be re-used, otherwise use canvas name: options.renderer.name === 'null' ? 'canvas' : options.renderer.name })); cy.startAnimationLoop(); cy.style(options.style); cy.emit('mount'); return cy; }, unmount: function unmount() { var cy = this; cy.stopAnimationLoop(); cy.destroyRenderer(); cy.initRenderer({ name: 'null' }); cy.emit('unmount'); return cy; }, options: function options() { return copy(this._private.options); }, json: function json(obj) { var cy = this; var _p = cy._private; var eles = cy.mutableElements(); var getFreshRef = function getFreshRef(ele) { return cy.getElementById(ele.id()); }; if (plainObject(obj)) { // set cy.startBatch(); if (obj.elements) { var idInJson = {}; var updateEles = function updateEles(jsons, gr) { var toAdd = []; var toMod = []; for (var i = 0; i < jsons.length; i++) { var json = jsons[i]; if (!json.data.id) { warn('cy.json() cannot handle elements without an ID attribute'); continue; } var id = '' + json.data.id; // id must be string var ele = cy.getElementById(id); idInJson[id] = true; if (ele.length !== 0) { // existing element should be updated toMod.push({ ele: ele, json: json }); } else { // otherwise should be added if (gr) { json.group = gr; toAdd.push(json); } else { toAdd.push(json); } } } cy.add(toAdd); for (var _i = 0; _i < toMod.length; _i++) { var _toMod$_i = toMod[_i], _ele = _toMod$_i.ele, _json = _toMod$_i.json; _ele.json(_json); } }; if (array(obj.elements)) { // elements: [] updateEles(obj.elements); } else { // elements: { nodes: [], edges: [] } var grs = ['nodes', 'edges']; for (var i = 0; i < grs.length; i++) { var gr = grs[i]; var elements = obj.elements[gr]; if (array(elements)) { updateEles(elements, gr); } } } var parentsToRemove = cy.collection(); eles.filter(function (ele) { return !idInJson[ele.id()]; }).forEach(function (ele) { if (ele.isParent()) { parentsToRemove.merge(ele); } else { ele.remove(); } }); // so that children are not removed w/parent parentsToRemove.forEach(function (ele) { return ele.children().move({ parent: null }); }); // intermediate parents may be moved by prior line, so make sure we remove by fresh refs parentsToRemove.forEach(function (ele) { return getFreshRef(ele).remove(); }); } if (obj.style) { cy.style(obj.style); } if (obj.zoom != null && obj.zoom !== _p.zoom) { cy.zoom(obj.zoom); } if (obj.pan) { if (obj.pan.x !== _p.pan.x || obj.pan.y !== _p.pan.y) { cy.pan(obj.pan); } } if (obj.data) { cy.data(obj.data); } var fields = ['minZoom', 'maxZoom', 'zoomingEnabled', 'userZoomingEnabled', 'panningEnabled', 'userPanningEnabled', 'boxSelectionEnabled', 'autolock', 'autoungrabify', 'autounselectify', 'multiClickDebounceTime']; for (var _i2 = 0; _i2 < fields.length; _i2++) { var f = fields[_i2]; if (obj[f] != null) { cy[f](obj[f]); } } cy.endBatch(); return this; // chaining } else { // get var flat = !!obj; var json = {}; if (flat) { json.elements = this.elements().map(function (ele) { return ele.json(); }); } else { json.elements = {}; eles.forEach(function (ele) { var group = ele.group(); if (!json.elements[group]) { json.elements[group] = []; } json.elements[group].push(ele.json()); }); } if (this._private.styleEnabled) { json.style = cy.style().json(); } json.data = copy(cy.data()); var options = _p.options; json.zoomingEnabled = _p.zoomingEnabled; json.userZoomingEnabled = _p.userZoomingEnabled; json.zoom = _p.zoom; json.minZoom = _p.minZoom; json.maxZoom = _p.maxZoom; json.panningEnabled = _p.panningEnabled; json.userPanningEnabled = _p.userPanningEnabled; json.pan = copy(_p.pan); json.boxSelectionEnabled = _p.boxSelectionEnabled; json.renderer = copy(options.renderer); json.hideEdgesOnViewport = options.hideEdgesOnViewport; json.textureOnViewport = options.textureOnViewport; json.wheelSensitivity = options.wheelSensitivity; json.motionBlur = options.motionBlur; json.multiClickDebounceTime = options.multiClickDebounceTime; return json; } } }); corefn.$id = corefn.getElementById; [corefn$9, corefn$8, elesfn, corefn$7, corefn$6, corefn$5, corefn$4, corefn$3, corefn$2, corefn$1, fn].forEach(function (props) { extend(corefn, props); }); /* eslint-disable no-unused-vars */ var defaults$7 = { fit: true, // whether to fit the viewport to the graph directed: false, // whether the tree is directed downwards (or edges can point in any direction if false) padding: 30, // padding on fit circle: false, // put depths in concentric circles if true, put depths top down if false grid: false, // whether to create an even grid into which the DAG is placed (circle:false only) spacingFactor: 1.75, // positive spacing factor, larger => more space between nodes (N.B. n/a if causes overlap) boundingBox: undefined, // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } avoidOverlap: true, // prevents node overlap, may overflow boundingBox if not enough space nodeDimensionsIncludeLabels: false, // Excludes the label when calculating node bounding boxes for the layout algorithm roots: undefined, // the roots of the trees depthSort: undefined, // a sorting function to order nodes at equal depth. e.g. function(a, b){ return a.data('weight') - b.data('weight') } animate: false, // whether to transition the node positions animationDuration: 500, // duration of animation in ms if enabled animationEasing: undefined, // easing of animation if enabled, animateFilter: function animateFilter(node, i) { return true; }, // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts ready: undefined, // callback on layoutready stop: undefined, // callback on layoutstop transform: function transform(node, position) { return position; } // transform a given node position. Useful for changing flow direction in discrete layouts }; var deprecatedOptionDefaults = { maximal: false, // whether to shift nodes down their natural BFS depths in order to avoid upwards edges (DAGS only); setting acyclic to true sets maximal to true also acyclic: false // whether the tree is acyclic and thus a node could be shifted (due to the maximal option) multiple times without causing an infinite loop; setting to true sets maximal to true also; if you are uncertain whether a tree is acyclic, set to false to avoid potential infinite loops }; /* eslint-enable */ var getInfo = function getInfo(ele) { return ele.scratch('breadthfirst'); }; var setInfo = function setInfo(ele, obj) { return ele.scratch('breadthfirst', obj); }; function BreadthFirstLayout(options) { this.options = extend({}, defaults$7, deprecatedOptionDefaults, options); } BreadthFirstLayout.prototype.run = function () { var params = this.options; var options = params; var cy = params.cy; var eles = options.eles; var nodes = eles.nodes().filter(function (n) { return !n.isParent(); }); var graph = eles; var directed = options.directed; var maximal = options.acyclic || options.maximal || options.maximalAdjustments > 0; // maximalAdjustments for compat. w/ old code; also, setting acyclic to true sets maximal to true var bb = makeBoundingBox(options.boundingBox ? options.boundingBox : { x1: 0, y1: 0, w: cy.width(), h: cy.height() }); var roots; if (elementOrCollection(options.roots)) { roots = options.roots; } else if (array(options.roots)) { var rootsArray = []; for (var i = 0; i < options.roots.length; i++) { var id = options.roots[i]; var ele = cy.getElementById(id); rootsArray.push(ele); } roots = cy.collection(rootsArray); } else if (string(options.roots)) { roots = cy.$(options.roots); } else { if (directed) { roots = nodes.roots(); } else { var components = eles.components(); roots = cy.collection(); var _loop = function _loop(_i) { var comp = components[_i]; var maxDegree = comp.maxDegree(false); var compRoots = comp.filter(function (ele) { return ele.degree(false) === maxDegree; }); roots = roots.add(compRoots); }; for (var _i = 0; _i < components.length; _i++) { _loop(_i); } } } var depths = []; var foundByBfs = {}; var addToDepth = function addToDepth(ele, d) { if (depths[d] == null) { depths[d] = []; } var i = depths[d].length; depths[d].push(ele); setInfo(ele, { index: i, depth: d }); }; var changeDepth = function changeDepth(ele, newDepth) { var _getInfo = getInfo(ele), depth = _getInfo.depth, index = _getInfo.index; depths[depth][index] = null; addToDepth(ele, newDepth); }; // find the depths of the nodes graph.bfs({ roots: roots, directed: options.directed, visit: function visit(node, edge, pNode, i, depth) { var ele = node[0]; var id = ele.id(); addToDepth(ele, depth); foundByBfs[id] = true; } }); // check for nodes not found by bfs var orphanNodes = []; for (var _i2 = 0; _i2 < nodes.length; _i2++) { var _ele = nodes[_i2]; if (foundByBfs[_ele.id()]) { continue; } else { orphanNodes.push(_ele); } } // assign the nodes a depth and index var assignDepthsAt = function assignDepthsAt(i) { var eles = depths[i]; for (var j = 0; j < eles.length; j++) { var _ele2 = eles[j]; if (_ele2 == null) { eles.splice(j, 1); j--; continue; } setInfo(_ele2, { depth: i, index: j }); } }; var assignDepths = function assignDepths() { for (var _i3 = 0; _i3 < depths.length; _i3++) { assignDepthsAt(_i3); } }; var adjustMaximally = function adjustMaximally(ele, shifted) { var eInfo = getInfo(ele); var incomers = ele.incomers().filter(function (el) { return el.isNode() && eles.has(el); }); var maxDepth = -1; var id = ele.id(); for (var k = 0; k < incomers.length; k++) { var incmr = incomers[k]; var iInfo = getInfo(incmr); maxDepth = Math.max(maxDepth, iInfo.depth); } if (eInfo.depth <= maxDepth) { if (!options.acyclic && shifted[id]) { return null; } var newDepth = maxDepth + 1; changeDepth(ele, newDepth); shifted[id] = newDepth; return true; } return false; }; // for the directed case, try to make the edges all go down (i.e. depth i => depth i + 1) if (directed && maximal) { var Q = []; var shifted = {}; var enqueue = function enqueue(n) { return Q.push(n); }; var dequeue = function dequeue() { return Q.shift(); }; nodes.forEach(function (n) { return Q.push(n); }); while (Q.length > 0) { var _ele3 = dequeue(); var didShift = adjustMaximally(_ele3, shifted); if (didShift) { _ele3.outgoers().filter(function (el) { return el.isNode() && eles.has(el); }).forEach(enqueue); } else if (didShift === null) { warn('Detected double maximal shift for node `' + _ele3.id() + '`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.'); break; // exit on failure } } } assignDepths(); // clear holes // find min distance we need to leave between nodes var minDistance = 0; if (options.avoidOverlap) { for (var _i4 = 0; _i4 < nodes.length; _i4++) { var n = nodes[_i4]; var nbb = n.layoutDimensions(options); var w = nbb.w; var h = nbb.h; minDistance = Math.max(minDistance, w, h); } } // get the weighted percent for an element based on its connectivity to other levels var cachedWeightedPercent = {}; var getWeightedPercent = function getWeightedPercent(ele) { if (cachedWeightedPercent[ele.id()]) { return cachedWeightedPercent[ele.id()]; } var eleDepth = getInfo(ele).depth; var neighbors = ele.neighborhood(); var percent = 0; var samples = 0; for (var _i5 = 0; _i5 < neighbors.length; _i5++) { var neighbor = neighbors[_i5]; if (neighbor.isEdge() || neighbor.isParent() || !nodes.has(neighbor)) { continue; } var bf = getInfo(neighbor); if (bf == null) { continue; } var index = bf.index; var depth = bf.depth; // unassigned neighbours shouldn't affect the ordering if (index == null || depth == null) { continue; } var nDepth = depths[depth].length; if (depth < eleDepth) { // only get influenced by elements above percent += index / nDepth; samples++; } } samples = Math.max(1, samples); percent = percent / samples; if (samples === 0) { // put lone nodes at the start percent = 0; } cachedWeightedPercent[ele.id()] = percent; return percent; }; // rearrange the indices in each depth level based on connectivity var sortFn = function sortFn(a, b) { var apct = getWeightedPercent(a); var bpct = getWeightedPercent(b); var diff = apct - bpct; if (diff === 0) { return ascending(a.id(), b.id()); // make sure sort doesn't have don't-care comparisons } else { return diff; } }; if (options.depthSort !== undefined) { sortFn = options.depthSort; } // sort each level to make connected nodes closer for (var _i6 = 0; _i6 < depths.length; _i6++) { depths[_i6].sort(sortFn); assignDepthsAt(_i6); } // assign orphan nodes to a new top-level depth var orphanDepth = []; for (var _i7 = 0; _i7 < orphanNodes.length; _i7++) { orphanDepth.push(orphanNodes[_i7]); } depths.unshift(orphanDepth); assignDepths(); var biggestDepthSize = 0; for (var _i8 = 0; _i8 < depths.length; _i8++) { biggestDepthSize = Math.max(depths[_i8].length, biggestDepthSize); } var center = { x: bb.x1 + bb.w / 2, y: bb.x1 + bb.h / 2 }; var maxDepthSize = depths.reduce(function (max, eles) { return Math.max(max, eles.length); }, 0); var getPosition = function getPosition(ele) { var _getInfo2 = getInfo(ele), depth = _getInfo2.depth, index = _getInfo2.index; var depthSize = depths[depth].length; var distanceX = Math.max(bb.w / ((options.grid ? maxDepthSize : depthSize) + 1), minDistance); var distanceY = Math.max(bb.h / (depths.length + 1), minDistance); var radiusStepSize = Math.min(bb.w / 2 / depths.length, bb.h / 2 / depths.length); radiusStepSize = Math.max(radiusStepSize, minDistance); if (!options.circle) { var epos = { x: center.x + (index + 1 - (depthSize + 1) / 2) * distanceX, y: (depth + 1) * distanceY }; return epos; } else { var radius = radiusStepSize * depth + radiusStepSize - (depths.length > 0 && depths[0].length <= 3 ? radiusStepSize / 2 : 0); var theta = 2 * Math.PI / depths[depth].length * index; if (depth === 0 && depths[0].length === 1) { radius = 1; } return { x: center.x + radius * Math.cos(theta), y: center.y + radius * Math.sin(theta) }; } }; eles.nodes().layoutPositions(this, options, getPosition); return this; // chaining }; var defaults$6 = { fit: true, // whether to fit the viewport to the graph padding: 30, // the padding on fit boundingBox: undefined, // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } avoidOverlap: true, // prevents node overlap, may overflow boundingBox and radius if not enough space nodeDimensionsIncludeLabels: false, // Excludes the label when calculating node bounding boxes for the layout algorithm spacingFactor: undefined, // Applies a multiplicative factor (>0) to expand or compress the overall area that the nodes take up radius: undefined, // the radius of the circle startAngle: 3 / 2 * Math.PI, // where nodes start in radians sweep: undefined, // how many radians should be between the first and last node (defaults to full circle) clockwise: true, // whether the layout should go clockwise (true) or counterclockwise/anticlockwise (false) sort: undefined, // a sorting function to order the nodes; e.g. function(a, b){ return a.data('weight') - b.data('weight') } animate: false, // whether to transition the node positions animationDuration: 500, // duration of animation in ms if enabled animationEasing: undefined, // easing of animation if enabled animateFilter: function animateFilter(node, i) { return true; }, // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts ready: undefined, // callback on layoutready stop: undefined, // callback on layoutstop transform: function transform(node, position) { return position; } // transform a given node position. Useful for changing flow direction in discrete layouts }; function CircleLayout(options) { this.options = extend({}, defaults$6, options); } CircleLayout.prototype.run = function () { var params = this.options; var options = params; var cy = params.cy; var eles = options.eles; var clockwise = options.counterclockwise !== undefined ? !options.counterclockwise : options.clockwise; var nodes = eles.nodes().not(':parent'); if (options.sort) { nodes = nodes.sort(options.sort); } var bb = makeBoundingBox(options.boundingBox ? options.boundingBox : { x1: 0, y1: 0, w: cy.width(), h: cy.height() }); var center = { x: bb.x1 + bb.w / 2, y: bb.y1 + bb.h / 2 }; var sweep = options.sweep === undefined ? 2 * Math.PI - 2 * Math.PI / nodes.length : options.sweep; var dTheta = sweep / Math.max(1, nodes.length - 1); var r; var minDistance = 0; for (var i = 0; i < nodes.length; i++) { var n = nodes[i]; var nbb = n.layoutDimensions(options); var w = nbb.w; var h = nbb.h; minDistance = Math.max(minDistance, w, h); } if (number$1(options.radius)) { r = options.radius; } else if (nodes.length <= 1) { r = 0; } else { r = Math.min(bb.h, bb.w) / 2 - minDistance; } // calculate the radius if (nodes.length > 1 && options.avoidOverlap) { // but only if more than one node (can't overlap) minDistance *= 1.75; // just to have some nice spacing var dcos = Math.cos(dTheta) - Math.cos(0); var dsin = Math.sin(dTheta) - Math.sin(0); var rMin = Math.sqrt(minDistance * minDistance / (dcos * dcos + dsin * dsin)); // s.t. no nodes overlapping r = Math.max(rMin, r); } var getPos = function getPos(ele, i) { var theta = options.startAngle + i * dTheta * (clockwise ? 1 : -1); var rx = r * Math.cos(theta); var ry = r * Math.sin(theta); var pos = { x: center.x + rx, y: center.y + ry }; return pos; }; eles.nodes().layoutPositions(this, options, getPos); return this; // chaining }; var defaults$5 = { fit: true, // whether to fit the viewport to the graph padding: 30, // the padding on fit startAngle: 3 / 2 * Math.PI, // where nodes start in radians sweep: undefined, // how many radians should be between the first and last node (defaults to full circle) clockwise: true, // whether the layout should go clockwise (true) or counterclockwise/anticlockwise (false) equidistant: false, // whether levels have an equal radial distance betwen them, may cause bounding box overflow minNodeSpacing: 10, // min spacing between outside of nodes (used for radius adjustment) boundingBox: undefined, // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } avoidOverlap: true, // prevents node overlap, may overflow boundingBox if not enough space nodeDimensionsIncludeLabels: false, // Excludes the label when calculating node bounding boxes for the layout algorithm height: undefined, // height of layout area (overrides container height) width: undefined, // width of layout area (overrides container width) spacingFactor: undefined, // Applies a multiplicative factor (>0) to expand or compress the overall area that the nodes take up concentric: function concentric(node) { // returns numeric value for each node, placing higher nodes in levels towards the centre return node.degree(); }, levelWidth: function levelWidth(nodes) { // the variation of concentric values in each level return nodes.maxDegree() / 4; }, animate: false, // whether to transition the node positions animationDuration: 500, // duration of animation in ms if enabled animationEasing: undefined, // easing of animation if enabled animateFilter: function animateFilter(node, i) { return true; }, // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts ready: undefined, // callback on layoutready stop: undefined, // callback on layoutstop transform: function transform(node, position) { return position; } // transform a given node position. Useful for changing flow direction in discrete layouts }; function ConcentricLayout(options) { this.options = extend({}, defaults$5, options); } ConcentricLayout.prototype.run = function () { var params = this.options; var options = params; var clockwise = options.counterclockwise !== undefined ? !options.counterclockwise : options.clockwise; var cy = params.cy; var eles = options.eles; var nodes = eles.nodes().not(':parent'); var bb = makeBoundingBox(options.boundingBox ? options.boundingBox : { x1: 0, y1: 0, w: cy.width(), h: cy.height() }); var center = { x: bb.x1 + bb.w / 2, y: bb.y1 + bb.h / 2 }; var nodeValues = []; // { node, value } var maxNodeSize = 0; for (var i = 0; i < nodes.length; i++) { var node = nodes[i]; var value = void 0; // calculate the node value value = options.concentric(node); nodeValues.push({ value: value, node: node }); // for style mapping node._private.scratch.concentric = value; } // in case we used the `concentric` in style nodes.updateStyle(); // calculate max size now based on potentially updated mappers for (var _i = 0; _i < nodes.length; _i++) { var _node = nodes[_i]; var nbb = _node.layoutDimensions(options); maxNodeSize = Math.max(maxNodeSize, nbb.w, nbb.h); } // sort node values in descreasing order nodeValues.sort(function (a, b) { return b.value - a.value; }); var levelWidth = options.levelWidth(nodes); // put the values into levels var levels = [[]]; var currentLevel = levels[0]; for (var _i2 = 0; _i2 < nodeValues.length; _i2++) { var val = nodeValues[_i2]; if (currentLevel.length > 0) { var diff = Math.abs(currentLevel[0].value - val.value); if (diff >= levelWidth) { currentLevel = []; levels.push(currentLevel); } } currentLevel.push(val); } // create positions from levels var minDist = maxNodeSize + options.minNodeSpacing; // min dist between nodes if (!options.avoidOverlap) { // then strictly constrain to bb var firstLvlHasMulti = levels.length > 0 && levels[0].length > 1; var maxR = Math.min(bb.w, bb.h) / 2 - minDist; var rStep = maxR / (levels.length + firstLvlHasMulti ? 1 : 0); minDist = Math.min(minDist, rStep); } // find the metrics for each level var r = 0; for (var _i3 = 0; _i3 < levels.length; _i3++) { var level = levels[_i3]; var sweep = options.sweep === undefined ? 2 * Math.PI - 2 * Math.PI / level.length : options.sweep; var dTheta = level.dTheta = sweep / Math.max(1, level.length - 1); // calculate the radius if (level.length > 1 && options.avoidOverlap) { // but only if more than one node (can't overlap) var dcos = Math.cos(dTheta) - Math.cos(0); var dsin = Math.sin(dTheta) - Math.sin(0); var rMin = Math.sqrt(minDist * minDist / (dcos * dcos + dsin * dsin)); // s.t. no nodes overlapping r = Math.max(rMin, r); } level.r = r; r += minDist; } if (options.equidistant) { var rDeltaMax = 0; var _r = 0; for (var _i4 = 0; _i4 < levels.length; _i4++) { var _level = levels[_i4]; var rDelta = _level.r - _r; rDeltaMax = Math.max(rDeltaMax, rDelta); } _r = 0; for (var _i5 = 0; _i5 < levels.length; _i5++) { var _level2 = levels[_i5]; if (_i5 === 0) { _r = _level2.r; } _level2.r = _r; _r += rDeltaMax; } } // calculate the node positions var pos = {}; // id => position for (var _i6 = 0; _i6 < levels.length; _i6++) { var _level3 = levels[_i6]; var _dTheta = _level3.dTheta; var _r2 = _level3.r; for (var j = 0; j < _level3.length; j++) { var _val = _level3[j]; var theta = options.startAngle + (clockwise ? 1 : -1) * _dTheta * j; var p = { x: center.x + _r2 * Math.cos(theta), y: center.y + _r2 * Math.sin(theta) }; pos[_val.node.id()] = p; } } // position the nodes eles.nodes().layoutPositions(this, options, function (ele) { var id = ele.id(); return pos[id]; }); return this; // chaining }; /* The CoSE layout was written by Gerardo Huck. https://www.linkedin.com/in/gerardohuck/ Based on the following article: http://dl.acm.org/citation.cfm?id=1498047 Modifications tracked on Github. */ var DEBUG; /** * @brief : default layout options */ var defaults$4 = { // Called on `layoutready` ready: function ready() {}, // Called on `layoutstop` stop: function stop() {}, // Whether to animate while running the layout // true : Animate continuously as the layout is running // false : Just show the end result // 'end' : Animate with the end result, from the initial positions to the end positions animate: true, // Easing of the animation for animate:'end' animationEasing: undefined, // The duration of the animation for animate:'end' animationDuration: undefined, // A function that determines whether the node should be animated // All nodes animated by default on animate enabled // Non-animated nodes are positioned immediately when the layout starts animateFilter: function animateFilter(node, i) { return true; }, // The layout animates only after this many milliseconds for animate:true // (prevents flashing on fast runs) animationThreshold: 250, // Number of iterations between consecutive screen positions update refresh: 20, // Whether to fit the network view after when done fit: true, // Padding on fit padding: 30, // Constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } boundingBox: undefined, // Excludes the label when calculating node bounding boxes for the layout algorithm nodeDimensionsIncludeLabels: false, // Randomize the initial positions of the nodes (true) or use existing positions (false) randomize: false, // Extra spacing between components in non-compound graphs componentSpacing: 40, // Node repulsion (non overlapping) multiplier nodeRepulsion: function nodeRepulsion(node) { return 2048; }, // Node repulsion (overlapping) multiplier nodeOverlap: 4, // Ideal edge (non nested) length idealEdgeLength: function idealEdgeLength(edge) { return 32; }, // Divisor to compute edge forces edgeElasticity: function edgeElasticity(edge) { return 32; }, // Nesting factor (multiplier) to compute ideal edge length for nested edges nestingFactor: 1.2, // Gravity force (constant) gravity: 1, // Maximum number of iterations to perform numIter: 1000, // Initial temperature (maximum node displacement) initialTemp: 1000, // Cooling factor (how the temperature is reduced between consecutive iterations coolingFactor: 0.99, // Lower temperature threshold (below this point the layout will end) minTemp: 1.0 }; /** * @brief : constructor * @arg options : object containing layout options */ function CoseLayout(options) { this.options = extend({}, defaults$4, options); this.options.layout = this; } /** * @brief : runs the layout */ CoseLayout.prototype.run = function () { var options = this.options; var cy = options.cy; var layout = this; layout.stopped = false; if (options.animate === true || options.animate === false) { layout.emit({ type: 'layoutstart', layout: layout }); } // Set DEBUG - Global variable if (true === options.debug) { DEBUG = true; } else { DEBUG = false; } // Initialize layout info var layoutInfo = createLayoutInfo(cy, layout, options); // Show LayoutInfo contents if debugging if (DEBUG) { printLayoutInfo(layoutInfo); } // If required, randomize node positions if (options.randomize) { randomizePositions(layoutInfo); } var startTime = performanceNow(); var refresh = function refresh() { refreshPositions(layoutInfo, cy, options); // Fit the graph if necessary if (true === options.fit) { cy.fit(options.padding); } }; var mainLoop = function mainLoop(i) { if (layout.stopped || i >= options.numIter) { // logDebug("Layout manually stopped. Stopping computation in step " + i); return false; } // Do one step in the phisical simulation step(layoutInfo, options); // Update temperature layoutInfo.temperature = layoutInfo.temperature * options.coolingFactor; // logDebug("New temperature: " + layoutInfo.temperature); if (layoutInfo.temperature < options.minTemp) { // logDebug("Temperature drop below minimum threshold. Stopping computation in step " + i); return false; } return true; }; var done = function done() { if (options.animate === true || options.animate === false) { refresh(); // Layout has finished layout.one('layoutstop', options.stop); layout.emit({ type: 'layoutstop', layout: layout }); } else { var nodes = options.eles.nodes(); var getScaledPos = getScaleInBoundsFn(layoutInfo, options, nodes); nodes.layoutPositions(layout, options, getScaledPos); } }; var i = 0; var loopRet = true; if (options.animate === true) { var frame = function frame() { var f = 0; while (loopRet && f < options.refresh) { loopRet = mainLoop(i); i++; f++; } if (!loopRet) { // it's done separateComponents(layoutInfo, options); done(); } else { var now = performanceNow(); if (now - startTime >= options.animationThreshold) { refresh(); } requestAnimationFrame(frame); } }; frame(); } else { while (loopRet) { loopRet = mainLoop(i); i++; } separateComponents(layoutInfo, options); done(); } return this; // chaining }; /** * @brief : called on continuous layouts to stop them before they finish */ CoseLayout.prototype.stop = function () { this.stopped = true; if (this.thread) { this.thread.stop(); } this.emit('layoutstop'); return this; // chaining }; CoseLayout.prototype.destroy = function () { if (this.thread) { this.thread.stop(); } return this; // chaining }; /** * @brief : Creates an object which is contains all the data * used in the layout process * @arg cy : cytoscape.js object * @return : layoutInfo object initialized */ var createLayoutInfo = function createLayoutInfo(cy, layout, options) { // Shortcut var edges = options.eles.edges(); var nodes = options.eles.nodes(); var bb = makeBoundingBox(options.boundingBox ? options.boundingBox : { x1: 0, y1: 0, w: cy.width(), h: cy.height() }); var layoutInfo = { isCompound: cy.hasCompoundNodes(), layoutNodes: [], idToIndex: {}, nodeSize: nodes.size(), graphSet: [], indexToGraph: [], layoutEdges: [], edgeSize: edges.size(), temperature: options.initialTemp, clientWidth: bb.w, clientHeight: bb.h, boundingBox: bb }; var components = options.eles.components(); var id2cmptId = {}; for (var i = 0; i < components.length; i++) { var component = components[i]; for (var j = 0; j < component.length; j++) { var node = component[j]; id2cmptId[node.id()] = i; } } // Iterate over all nodes, creating layout nodes for (var i = 0; i < layoutInfo.nodeSize; i++) { var n = nodes[i]; var nbb = n.layoutDimensions(options); var tempNode = {}; tempNode.isLocked = n.locked(); tempNode.id = n.data('id'); tempNode.parentId = n.data('parent'); tempNode.cmptId = id2cmptId[n.id()]; tempNode.children = []; tempNode.positionX = n.position('x'); tempNode.positionY = n.position('y'); tempNode.offsetX = 0; tempNode.offsetY = 0; tempNode.height = nbb.w; tempNode.width = nbb.h; tempNode.maxX = tempNode.positionX + tempNode.width / 2; tempNode.minX = tempNode.positionX - tempNode.width / 2; tempNode.maxY = tempNode.positionY + tempNode.height / 2; tempNode.minY = tempNode.positionY - tempNode.height / 2; tempNode.padLeft = parseFloat(n.style('padding')); tempNode.padRight = parseFloat(n.style('padding')); tempNode.padTop = parseFloat(n.style('padding')); tempNode.padBottom = parseFloat(n.style('padding')); // forces tempNode.nodeRepulsion = fn$6(options.nodeRepulsion) ? options.nodeRepulsion(n) : options.nodeRepulsion; // Add new node layoutInfo.layoutNodes.push(tempNode); // Add entry to id-index map layoutInfo.idToIndex[tempNode.id] = i; } // Inline implementation of a queue, used for traversing the graph in BFS order var queue = []; var start = 0; // Points to the start the queue var end = -1; // Points to the end of the queue var tempGraph = []; // Second pass to add child information and // initialize queue for hierarchical traversal for (var i = 0; i < layoutInfo.nodeSize; i++) { var n = layoutInfo.layoutNodes[i]; var p_id = n.parentId; // Check if node n has a parent node if (null != p_id) { // Add node Id to parent's list of children layoutInfo.layoutNodes[layoutInfo.idToIndex[p_id]].children.push(n.id); } else { // If a node doesn't have a parent, then it's in the root graph queue[++end] = n.id; tempGraph.push(n.id); } } // Add root graph to graphSet layoutInfo.graphSet.push(tempGraph); // Traverse the graph, level by level, while (start <= end) { // Get the node to visit and remove it from queue var node_id = queue[start++]; var node_ix = layoutInfo.idToIndex[node_id]; var node = layoutInfo.layoutNodes[node_ix]; var children = node.children; if (children.length > 0) { // Add children nodes as a new graph to graph set layoutInfo.graphSet.push(children); // Add children to que queue to be visited for (var i = 0; i < children.length; i++) { queue[++end] = children[i]; } } } // Create indexToGraph map for (var i = 0; i < layoutInfo.graphSet.length; i++) { var graph = layoutInfo.graphSet[i]; for (var j = 0; j < graph.length; j++) { var index = layoutInfo.idToIndex[graph[j]]; layoutInfo.indexToGraph[index] = i; } } // Iterate over all edges, creating Layout Edges for (var i = 0; i < layoutInfo.edgeSize; i++) { var e = edges[i]; var tempEdge = {}; tempEdge.id = e.data('id'); tempEdge.sourceId = e.data('source'); tempEdge.targetId = e.data('target'); // Compute ideal length var idealLength = fn$6(options.idealEdgeLength) ? options.idealEdgeLength(e) : options.idealEdgeLength; var elasticity = fn$6(options.edgeElasticity) ? options.edgeElasticity(e) : options.edgeElasticity; // Check if it's an inter graph edge var sourceIx = layoutInfo.idToIndex[tempEdge.sourceId]; var targetIx = layoutInfo.idToIndex[tempEdge.targetId]; var sourceGraph = layoutInfo.indexToGraph[sourceIx]; var targetGraph = layoutInfo.indexToGraph[targetIx]; if (sourceGraph != targetGraph) { // Find lowest common graph ancestor var lca = findLCA(tempEdge.sourceId, tempEdge.targetId, layoutInfo); // Compute sum of node depths, relative to lca graph var lcaGraph = layoutInfo.graphSet[lca]; var depth = 0; // Source depth var tempNode = layoutInfo.layoutNodes[sourceIx]; while (-1 === lcaGraph.indexOf(tempNode.id)) { tempNode = layoutInfo.layoutNodes[layoutInfo.idToIndex[tempNode.parentId]]; depth++; } // Target depth tempNode = layoutInfo.layoutNodes[targetIx]; while (-1 === lcaGraph.indexOf(tempNode.id)) { tempNode = layoutInfo.layoutNodes[layoutInfo.idToIndex[tempNode.parentId]]; depth++; } // logDebug('LCA of nodes ' + tempEdge.sourceId + ' and ' + tempEdge.targetId + // ". Index: " + lca + " Contents: " + lcaGraph.toString() + // ". Depth: " + depth); // Update idealLength idealLength *= depth * options.nestingFactor; } tempEdge.idealLength = idealLength; tempEdge.elasticity = elasticity; layoutInfo.layoutEdges.push(tempEdge); } // Finally, return layoutInfo object return layoutInfo; }; /** * @brief : This function finds the index of the lowest common * graph ancestor between 2 nodes in the subtree * (from the graph hierarchy induced tree) whose * root is graphIx * * @arg node1: node1's ID * @arg node2: node2's ID * @arg layoutInfo: layoutInfo object * */ var findLCA = function findLCA(node1, node2, layoutInfo) { // Find their common ancester, starting from the root graph var res = findLCA_aux(node1, node2, 0, layoutInfo); if (2 > res.count) { // If aux function couldn't find the common ancester, // then it is the root graph return 0; } else { return res.graph; } }; /** * @brief : Auxiliary function used for LCA computation * * @arg node1 : node1's ID * @arg node2 : node2's ID * @arg graphIx : subgraph index * @arg layoutInfo : layoutInfo object * * @return : object of the form {count: X, graph: Y}, where: * X is the number of ancestors (max: 2) found in * graphIx (and it's subgraphs), * Y is the graph index of the lowest graph containing * all X nodes */ var findLCA_aux = function findLCA_aux(node1, node2, graphIx, layoutInfo) { var graph = layoutInfo.graphSet[graphIx]; // If both nodes belongs to graphIx if (-1 < graph.indexOf(node1) && -1 < graph.indexOf(node2)) { return { count: 2, graph: graphIx }; } // Make recursive calls for all subgraphs var c = 0; for (var i = 0; i < graph.length; i++) { var nodeId = graph[i]; var nodeIx = layoutInfo.idToIndex[nodeId]; var children = layoutInfo.layoutNodes[nodeIx].children; // If the node has no child, skip it if (0 === children.length) { continue; } var childGraphIx = layoutInfo.indexToGraph[layoutInfo.idToIndex[children[0]]]; var result = findLCA_aux(node1, node2, childGraphIx, layoutInfo); if (0 === result.count) { // Neither node1 nor node2 are present in this subgraph continue; } else if (1 === result.count) { // One of (node1, node2) is present in this subgraph c++; if (2 === c) { // We've already found both nodes, no need to keep searching break; } } else { // Both nodes are present in this subgraph return result; } } return { count: c, graph: graphIx }; }; /** * @brief: printsLayoutInfo into js console * Only used for debbuging */ var printLayoutInfo; /** * @brief : Randomizes the position of all nodes */ var randomizePositions = function randomizePositions(layoutInfo, cy) { var width = layoutInfo.clientWidth; var height = layoutInfo.clientHeight; for (var i = 0; i < layoutInfo.nodeSize; i++) { var n = layoutInfo.layoutNodes[i]; // No need to randomize compound nodes or locked nodes if (0 === n.children.length && !n.isLocked) { n.positionX = Math.random() * width; n.positionY = Math.random() * height; } } }; var getScaleInBoundsFn = function getScaleInBoundsFn(layoutInfo, options, nodes) { var bb = layoutInfo.boundingBox; var coseBB = { x1: Infinity, x2: -Infinity, y1: Infinity, y2: -Infinity }; if (options.boundingBox) { nodes.forEach(function (node) { var lnode = layoutInfo.layoutNodes[layoutInfo.idToIndex[node.data('id')]]; coseBB.x1 = Math.min(coseBB.x1, lnode.positionX); coseBB.x2 = Math.max(coseBB.x2, lnode.positionX); coseBB.y1 = Math.min(coseBB.y1, lnode.positionY); coseBB.y2 = Math.max(coseBB.y2, lnode.positionY); }); coseBB.w = coseBB.x2 - coseBB.x1; coseBB.h = coseBB.y2 - coseBB.y1; } return function (ele, i) { var lnode = layoutInfo.layoutNodes[layoutInfo.idToIndex[ele.data('id')]]; if (options.boundingBox) { // then add extra bounding box constraint var pctX = (lnode.positionX - coseBB.x1) / coseBB.w; var pctY = (lnode.positionY - coseBB.y1) / coseBB.h; return { x: bb.x1 + pctX * bb.w, y: bb.y1 + pctY * bb.h }; } else { return { x: lnode.positionX, y: lnode.positionY }; } }; }; /** * @brief : Updates the positions of nodes in the network * @arg layoutInfo : LayoutInfo object * @arg cy : Cytoscape object * @arg options : Layout options */ var refreshPositions = function refreshPositions(layoutInfo, cy, options) { // var s = 'Refreshing positions'; // logDebug(s); var layout = options.layout; var nodes = options.eles.nodes(); var getScaledPos = getScaleInBoundsFn(layoutInfo, options, nodes); nodes.positions(getScaledPos); // Trigger layoutReady only on first call if (true !== layoutInfo.ready) { // s = 'Triggering layoutready'; // logDebug(s); layoutInfo.ready = true; layout.one('layoutready', options.ready); layout.emit({ type: 'layoutready', layout: this }); } }; /** * @brief : Logs a debug message in JS console, if DEBUG is ON */ // var logDebug = function(text) { // if (DEBUG) { // console.debug(text); // } // }; /** * @brief : Performs one iteration of the physical simulation * @arg layoutInfo : LayoutInfo object already initialized * @arg cy : Cytoscape object * @arg options : Layout options */ var step = function step(layoutInfo, options, _step) { // var s = "\n\n###############################"; // s += "\nSTEP: " + step; // s += "\n###############################\n"; // logDebug(s); // Calculate node repulsions calculateNodeForces(layoutInfo, options); // Calculate edge forces calculateEdgeForces(layoutInfo); // Calculate gravity forces calculateGravityForces(layoutInfo, options); // Propagate forces from parent to child propagateForces(layoutInfo); // Update positions based on calculated forces updatePositions(layoutInfo); }; /** * @brief : Computes the node repulsion forces */ var calculateNodeForces = function calculateNodeForces(layoutInfo, options) { // Go through each of the graphs in graphSet // Nodes only repel each other if they belong to the same graph // var s = 'calculateNodeForces'; // logDebug(s); for (var i = 0; i < layoutInfo.graphSet.length; i++) { var graph = layoutInfo.graphSet[i]; var numNodes = graph.length; // s = "Set: " + graph.toString(); // logDebug(s); // Now get all the pairs of nodes // Only get each pair once, (A, B) = (B, A) for (var j = 0; j < numNodes; j++) { var node1 = layoutInfo.layoutNodes[layoutInfo.idToIndex[graph[j]]]; for (var k = j + 1; k < numNodes; k++) { var node2 = layoutInfo.layoutNodes[layoutInfo.idToIndex[graph[k]]]; nodeRepulsion(node1, node2, layoutInfo, options); } } } }; var randomDistance = function randomDistance(max) { return -max + 2 * max * Math.random(); }; /** * @brief : Compute the node repulsion forces between a pair of nodes */ var nodeRepulsion = function nodeRepulsion(node1, node2, layoutInfo, options) { // var s = "Node repulsion. Node1: " + node1.id + " Node2: " + node2.id; var cmptId1 = node1.cmptId; var cmptId2 = node2.cmptId; if (cmptId1 !== cmptId2 && !layoutInfo.isCompound) { return; } // Get direction of line connecting both node centers var directionX = node2.positionX - node1.positionX; var directionY = node2.positionY - node1.positionY; var maxRandDist = 1; // s += "\ndirectionX: " + directionX + ", directionY: " + directionY; // If both centers are the same, apply a random force if (0 === directionX && 0 === directionY) { directionX = randomDistance(maxRandDist); directionY = randomDistance(maxRandDist); } var overlap = nodesOverlap(node1, node2, directionX, directionY); if (overlap > 0) { // s += "\nNodes DO overlap."; // s += "\nOverlap: " + overlap; // If nodes overlap, repulsion force is proportional // to the overlap var force = options.nodeOverlap * overlap; // Compute the module and components of the force vector var distance = Math.sqrt(directionX * directionX + directionY * directionY); // s += "\nDistance: " + distance; var forceX = force * directionX / distance; var forceY = force * directionY / distance; } else { // s += "\nNodes do NOT overlap."; // If there's no overlap, force is inversely proportional // to squared distance // Get clipping points for both nodes var point1 = findClippingPoint(node1, directionX, directionY); var point2 = findClippingPoint(node2, -1 * directionX, -1 * directionY); // Use clipping points to compute distance var distanceX = point2.x - point1.x; var distanceY = point2.y - point1.y; var distanceSqr = distanceX * distanceX + distanceY * distanceY; var distance = Math.sqrt(distanceSqr); // s += "\nDistance: " + distance; // Compute the module and components of the force vector var force = (node1.nodeRepulsion + node2.nodeRepulsion) / distanceSqr; var forceX = force * distanceX / distance; var forceY = force * distanceY / distance; } // Apply force if (!node1.isLocked) { node1.offsetX -= forceX; node1.offsetY -= forceY; } if (!node2.isLocked) { node2.offsetX += forceX; node2.offsetY += forceY; } // s += "\nForceX: " + forceX + " ForceY: " + forceY; // logDebug(s); return; }; /** * @brief : Determines whether two nodes overlap or not * @return : Amount of overlapping (0 => no overlap) */ var nodesOverlap = function nodesOverlap(node1, node2, dX, dY) { if (dX > 0) { var overlapX = node1.maxX - node2.minX; } else { var overlapX = node2.maxX - node1.minX; } if (dY > 0) { var overlapY = node1.maxY - node2.minY; } else { var overlapY = node2.maxY - node1.minY; } if (overlapX >= 0 && overlapY >= 0) { return Math.sqrt(overlapX * overlapX + overlapY * overlapY); } else { return 0; } }; /** * @brief : Finds the point in which an edge (direction dX, dY) intersects * the rectangular bounding box of it's source/target node */ var findClippingPoint = function findClippingPoint(node, dX, dY) { // Shorcuts var X = node.positionX; var Y = node.positionY; var H = node.height || 1; var W = node.width || 1; var dirSlope = dY / dX; var nodeSlope = H / W; // var s = 'Computing clipping point of node ' + node.id + // " . Height: " + H + ", Width: " + W + // "\nDirection " + dX + ", " + dY; // // Compute intersection var res = {}; // Case: Vertical direction (up) if (0 === dX && 0 < dY) { res.x = X; // s += "\nUp direction"; res.y = Y + H / 2; return res; } // Case: Vertical direction (down) if (0 === dX && 0 > dY) { res.x = X; res.y = Y + H / 2; // s += "\nDown direction"; return res; } // Case: Intersects the right border if (0 < dX && -1 * nodeSlope <= dirSlope && dirSlope <= nodeSlope) { res.x = X + W / 2; res.y = Y + W * dY / 2 / dX; // s += "\nRightborder"; return res; } // Case: Intersects the left border if (0 > dX && -1 * nodeSlope <= dirSlope && dirSlope <= nodeSlope) { res.x = X - W / 2; res.y = Y - W * dY / 2 / dX; // s += "\nLeftborder"; return res; } // Case: Intersects the top border if (0 < dY && (dirSlope <= -1 * nodeSlope || dirSlope >= nodeSlope)) { res.x = X + H * dX / 2 / dY; res.y = Y + H / 2; // s += "\nTop border"; return res; } // Case: Intersects the bottom border if (0 > dY && (dirSlope <= -1 * nodeSlope || dirSlope >= nodeSlope)) { res.x = X - H * dX / 2 / dY; res.y = Y - H / 2; // s += "\nBottom border"; return res; } // s += "\nClipping point found at " + res.x + ", " + res.y; // logDebug(s); return res; }; /** * @brief : Calculates all edge forces */ var calculateEdgeForces = function calculateEdgeForces(layoutInfo, options) { // Iterate over all edges for (var i = 0; i < layoutInfo.edgeSize; i++) { // Get edge, source & target nodes var edge = layoutInfo.layoutEdges[i]; var sourceIx = layoutInfo.idToIndex[edge.sourceId]; var source = layoutInfo.layoutNodes[sourceIx]; var targetIx = layoutInfo.idToIndex[edge.targetId]; var target = layoutInfo.layoutNodes[targetIx]; // Get direction of line connecting both node centers var directionX = target.positionX - source.positionX; var directionY = target.positionY - source.positionY; // If both centers are the same, do nothing. // A random force has already been applied as node repulsion if (0 === directionX && 0 === directionY) { continue; } // Get clipping points for both nodes var point1 = findClippingPoint(source, directionX, directionY); var point2 = findClippingPoint(target, -1 * directionX, -1 * directionY); var lx = point2.x - point1.x; var ly = point2.y - point1.y; var l = Math.sqrt(lx * lx + ly * ly); var force = Math.pow(edge.idealLength - l, 2) / edge.elasticity; if (0 !== l) { var forceX = force * lx / l; var forceY = force * ly / l; } else { var forceX = 0; var forceY = 0; } // Add this force to target and source nodes if (!source.isLocked) { source.offsetX += forceX; source.offsetY += forceY; } if (!target.isLocked) { target.offsetX -= forceX; target.offsetY -= forceY; } // var s = 'Edge force between nodes ' + source.id + ' and ' + target.id; // s += "\nDistance: " + l + " Force: (" + forceX + ", " + forceY + ")"; // logDebug(s); } }; /** * @brief : Computes gravity forces for all nodes */ var calculateGravityForces = function calculateGravityForces(layoutInfo, options) { if (options.gravity === 0) { return; } var distThreshold = 1; // var s = 'calculateGravityForces'; // logDebug(s); for (var i = 0; i < layoutInfo.graphSet.length; i++) { var graph = layoutInfo.graphSet[i]; var numNodes = graph.length; // s = "Set: " + graph.toString(); // logDebug(s); // Compute graph center if (0 === i) { var centerX = layoutInfo.clientHeight / 2; var centerY = layoutInfo.clientWidth / 2; } else { // Get Parent node for this graph, and use its position as center var temp = layoutInfo.layoutNodes[layoutInfo.idToIndex[graph[0]]]; var parent = layoutInfo.layoutNodes[layoutInfo.idToIndex[temp.parentId]]; var centerX = parent.positionX; var centerY = parent.positionY; } // s = "Center found at: " + centerX + ", " + centerY; // logDebug(s); // Apply force to all nodes in graph for (var j = 0; j < numNodes; j++) { var node = layoutInfo.layoutNodes[layoutInfo.idToIndex[graph[j]]]; // s = "Node: " + node.id; if (node.isLocked) { continue; } var dx = centerX - node.positionX; var dy = centerY - node.positionY; var d = Math.sqrt(dx * dx + dy * dy); if (d > distThreshold) { var fx = options.gravity * dx / d; var fy = options.gravity * dy / d; node.offsetX += fx; node.offsetY += fy; // s += ": Applied force: " + fx + ", " + fy; } // logDebug(s); } } }; /** * @brief : This function propagates the existing offsets from * parent nodes to its descendents. * @arg layoutInfo : layoutInfo Object * @arg cy : cytoscape Object * @arg options : Layout options */ var propagateForces = function propagateForces(layoutInfo, options) { // Inline implementation of a queue, used for traversing the graph in BFS order var queue = []; var start = 0; // Points to the start the queue var end = -1; // Points to the end of the queue // logDebug('propagateForces'); // Start by visiting the nodes in the root graph queue.push.apply(queue, layoutInfo.graphSet[0]); end += layoutInfo.graphSet[0].length; // Traverse the graph, level by level, while (start <= end) { // Get the node to visit and remove it from queue var nodeId = queue[start++]; var nodeIndex = layoutInfo.idToIndex[nodeId]; var node = layoutInfo.layoutNodes[nodeIndex]; var children = node.children; // We only need to process the node if it's compound if (0 < children.length && !node.isLocked) { var offX = node.offsetX; var offY = node.offsetY; // var s = "Propagating offset from parent node : " + node.id + // ". OffsetX: " + offX + ". OffsetY: " + offY; // s += "\n Children: " + children.toString(); // logDebug(s); for (var i = 0; i < children.length; i++) { var childNode = layoutInfo.layoutNodes[layoutInfo.idToIndex[children[i]]]; // Propagate offset childNode.offsetX += offX; childNode.offsetY += offY; // Add children to queue to be visited queue[++end] = children[i]; } // Reset parent offsets node.offsetX = 0; node.offsetY = 0; } } }; /** * @brief : Updates the layout model positions, based on * the accumulated forces */ var updatePositions = function updatePositions(layoutInfo, options) { // var s = 'Updating positions'; // logDebug(s); // Reset boundaries for compound nodes for (var i = 0; i < layoutInfo.nodeSize; i++) { var n = layoutInfo.layoutNodes[i]; if (0 < n.children.length) { // logDebug("Resetting boundaries of compound node: " + n.id); n.maxX = undefined; n.minX = undefined; n.maxY = undefined; n.minY = undefined; } } for (var i = 0; i < layoutInfo.nodeSize; i++) { var n = layoutInfo.layoutNodes[i]; if (0 < n.children.length || n.isLocked) { // No need to set compound or locked node position // logDebug("Skipping position update of node: " + n.id); continue; } // s = "Node: " + n.id + " Previous position: (" + // n.positionX + ", " + n.positionY + ")."; // Limit displacement in order to improve stability var tempForce = limitForce(n.offsetX, n.offsetY, layoutInfo.temperature); n.positionX += tempForce.x; n.positionY += tempForce.y; n.offsetX = 0; n.offsetY = 0; n.minX = n.positionX - n.width; n.maxX = n.positionX + n.width; n.minY = n.positionY - n.height; n.maxY = n.positionY + n.height; // s += " New Position: (" + n.positionX + ", " + n.positionY + ")."; // logDebug(s); // Update ancestry boudaries updateAncestryBoundaries(n, layoutInfo); } // Update size, position of compund nodes for (var i = 0; i < layoutInfo.nodeSize; i++) { var n = layoutInfo.layoutNodes[i]; if (0 < n.children.length && !n.isLocked) { n.positionX = (n.maxX + n.minX) / 2; n.positionY = (n.maxY + n.minY) / 2; n.width = n.maxX - n.minX; n.height = n.maxY - n.minY; // s = "Updating position, size of compound node " + n.id; // s += "\nPositionX: " + n.positionX + ", PositionY: " + n.positionY; // s += "\nWidth: " + n.width + ", Height: " + n.height; // logDebug(s); } } }; /** * @brief : Limits a force (forceX, forceY) to be not * greater (in modulo) than max. 8 Preserves force direction. */ var limitForce = function limitForce(forceX, forceY, max) { // var s = "Limiting force: (" + forceX + ", " + forceY + "). Max: " + max; var force = Math.sqrt(forceX * forceX + forceY * forceY); if (force > max) { var res = { x: max * forceX / force, y: max * forceY / force }; } else { var res = { x: forceX, y: forceY }; } // s += ".\nResult: (" + res.x + ", " + res.y + ")"; // logDebug(s); return res; }; /** * @brief : Function used for keeping track of compound node * sizes, since they should bound all their subnodes. */ var updateAncestryBoundaries = function updateAncestryBoundaries(node, layoutInfo) { // var s = "Propagating new position/size of node " + node.id; var parentId = node.parentId; if (null == parentId) { // If there's no parent, we are done // s += ". No parent node."; // logDebug(s); return; } // Get Parent Node var p = layoutInfo.layoutNodes[layoutInfo.idToIndex[parentId]]; var flag = false; // MaxX if (null == p.maxX || node.maxX + p.padRight > p.maxX) { p.maxX = node.maxX + p.padRight; flag = true; // s += "\nNew maxX for parent node " + p.id + ": " + p.maxX; } // MinX if (null == p.minX || node.minX - p.padLeft < p.minX) { p.minX = node.minX - p.padLeft; flag = true; // s += "\nNew minX for parent node " + p.id + ": " + p.minX; } // MaxY if (null == p.maxY || node.maxY + p.padBottom > p.maxY) { p.maxY = node.maxY + p.padBottom; flag = true; // s += "\nNew maxY for parent node " + p.id + ": " + p.maxY; } // MinY if (null == p.minY || node.minY - p.padTop < p.minY) { p.minY = node.minY - p.padTop; flag = true; // s += "\nNew minY for parent node " + p.id + ": " + p.minY; } // If updated boundaries, propagate changes upward if (flag) { // logDebug(s); return updateAncestryBoundaries(p, layoutInfo); } // s += ". No changes in boundaries/position of parent node " + p.id; // logDebug(s); return; }; var separateComponents = function separateComponents(layoutInfo, options) { var nodes = layoutInfo.layoutNodes; var components = []; for (var i = 0; i < nodes.length; i++) { var node = nodes[i]; var cid = node.cmptId; var component = components[cid] = components[cid] || []; component.push(node); } var totalA = 0; for (var i = 0; i < components.length; i++) { var c = components[i]; if (!c) { continue; } c.x1 = Infinity; c.x2 = -Infinity; c.y1 = Infinity; c.y2 = -Infinity; for (var j = 0; j < c.length; j++) { var n = c[j]; c.x1 = Math.min(c.x1, n.positionX - n.width / 2); c.x2 = Math.max(c.x2, n.positionX + n.width / 2); c.y1 = Math.min(c.y1, n.positionY - n.height / 2); c.y2 = Math.max(c.y2, n.positionY + n.height / 2); } c.w = c.x2 - c.x1; c.h = c.y2 - c.y1; totalA += c.w * c.h; } components.sort(function (c1, c2) { return c2.w * c2.h - c1.w * c1.h; }); var x = 0; var y = 0; var usedW = 0; var rowH = 0; var maxRowW = Math.sqrt(totalA) * layoutInfo.clientWidth / layoutInfo.clientHeight; for (var i = 0; i < components.length; i++) { var c = components[i]; if (!c) { continue; } for (var j = 0; j < c.length; j++) { var n = c[j]; if (!n.isLocked) { n.positionX += x - c.x1; n.positionY += y - c.y1; } } x += c.w + options.componentSpacing; usedW += c.w + options.componentSpacing; rowH = Math.max(rowH, c.h); if (usedW > maxRowW) { y += rowH + options.componentSpacing; x = 0; usedW = 0; rowH = 0; } } }; var defaults$3 = { fit: true, // whether to fit the viewport to the graph padding: 30, // padding used on fit boundingBox: undefined, // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } avoidOverlap: true, // prevents node overlap, may overflow boundingBox if not enough space avoidOverlapPadding: 10, // extra spacing around nodes when avoidOverlap: true nodeDimensionsIncludeLabels: false, // Excludes the label when calculating node bounding boxes for the layout algorithm spacingFactor: undefined, // Applies a multiplicative factor (>0) to expand or compress the overall area that the nodes take up condense: false, // uses all available space on false, uses minimal space on true rows: undefined, // force num of rows in the grid cols: undefined, // force num of columns in the grid position: function position(node) {}, // returns { row, col } for element sort: undefined, // a sorting function to order the nodes; e.g. function(a, b){ return a.data('weight') - b.data('weight') } animate: false, // whether to transition the node positions animationDuration: 500, // duration of animation in ms if enabled animationEasing: undefined, // easing of animation if enabled animateFilter: function animateFilter(node, i) { return true; }, // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts ready: undefined, // callback on layoutready stop: undefined, // callback on layoutstop transform: function transform(node, position) { return position; } // transform a given node position. Useful for changing flow direction in discrete layouts }; function GridLayout(options) { this.options = extend({}, defaults$3, options); } GridLayout.prototype.run = function () { var params = this.options; var options = params; var cy = params.cy; var eles = options.eles; var nodes = eles.nodes().not(':parent'); if (options.sort) { nodes = nodes.sort(options.sort); } var bb = makeBoundingBox(options.boundingBox ? options.boundingBox : { x1: 0, y1: 0, w: cy.width(), h: cy.height() }); if (bb.h === 0 || bb.w === 0) { eles.nodes().layoutPositions(this, options, function (ele) { return { x: bb.x1, y: bb.y1 }; }); } else { // width/height * splits^2 = cells where splits is number of times to split width var cells = nodes.size(); var splits = Math.sqrt(cells * bb.h / bb.w); var rows = Math.round(splits); var cols = Math.round(bb.w / bb.h * splits); var small = function small(val) { if (val == null) { return Math.min(rows, cols); } else { var min = Math.min(rows, cols); if (min == rows) { rows = val; } else { cols = val; } } }; var large = function large(val) { if (val == null) { return Math.max(rows, cols); } else { var max = Math.max(rows, cols); if (max == rows) { rows = val; } else { cols = val; } } }; var oRows = options.rows; var oCols = options.cols != null ? options.cols : options.columns; // if rows or columns were set in options, use those values if (oRows != null && oCols != null) { rows = oRows; cols = oCols; } else if (oRows != null && oCols == null) { rows = oRows; cols = Math.ceil(cells / rows); } else if (oRows == null && oCols != null) { cols = oCols; rows = Math.ceil(cells / cols); } // otherwise use the automatic values and adjust accordingly // if rounding was up, see if we can reduce rows or columns else if (cols * rows > cells) { var sm = small(); var lg = large(); // reducing the small side takes away the most cells, so try it first if ((sm - 1) * lg >= cells) { small(sm - 1); } else if ((lg - 1) * sm >= cells) { large(lg - 1); } } else { // if rounding was too low, add rows or columns while (cols * rows < cells) { var _sm = small(); var _lg = large(); // try to add to larger side first (adds less in multiplication) if ((_lg + 1) * _sm >= cells) { large(_lg + 1); } else { small(_sm + 1); } } } var cellWidth = bb.w / cols; var cellHeight = bb.h / rows; if (options.condense) { cellWidth = 0; cellHeight = 0; } if (options.avoidOverlap) { for (var i = 0; i < nodes.length; i++) { var node = nodes[i]; var pos = node._private.position; if (pos.x == null || pos.y == null) { // for bb pos.x = 0; pos.y = 0; } var nbb = node.layoutDimensions(options); var p = options.avoidOverlapPadding; var w = nbb.w + p; var h = nbb.h + p; cellWidth = Math.max(cellWidth, w); cellHeight = Math.max(cellHeight, h); } } var cellUsed = {}; // e.g. 'c-0-2' => true var used = function used(row, col) { return cellUsed['c-' + row + '-' + col] ? true : false; }; var use = function use(row, col) { cellUsed['c-' + row + '-' + col] = true; }; // to keep track of current cell position var row = 0; var col = 0; var moveToNextCell = function moveToNextCell() { col++; if (col >= cols) { col = 0; row++; } }; // get a cache of all the manual positions var id2manPos = {}; for (var _i = 0; _i < nodes.length; _i++) { var _node = nodes[_i]; var rcPos = options.position(_node); if (rcPos && (rcPos.row !== undefined || rcPos.col !== undefined)) { // must have at least row or col def'd var _pos = { row: rcPos.row, col: rcPos.col }; if (_pos.col === undefined) { // find unused col _pos.col = 0; while (used(_pos.row, _pos.col)) { _pos.col++; } } else if (_pos.row === undefined) { // find unused row _pos.row = 0; while (used(_pos.row, _pos.col)) { _pos.row++; } } id2manPos[_node.id()] = _pos; use(_pos.row, _pos.col); } } var getPos = function getPos(element, i) { var x, y; if (element.locked() || element.isParent()) { return false; } // see if we have a manual position set var rcPos = id2manPos[element.id()]; if (rcPos) { x = rcPos.col * cellWidth + cellWidth / 2 + bb.x1; y = rcPos.row * cellHeight + cellHeight / 2 + bb.y1; } else { // otherwise set automatically while (used(row, col)) { moveToNextCell(); } x = col * cellWidth + cellWidth / 2 + bb.x1; y = row * cellHeight + cellHeight / 2 + bb.y1; use(row, col); moveToNextCell(); } return { x: x, y: y }; }; nodes.layoutPositions(this, options, getPos); } return this; // chaining }; var defaults$2 = { ready: function ready() {}, // on layoutready stop: function stop() {} // on layoutstop }; // constructor // options : object containing layout options function NullLayout(options) { this.options = extend({}, defaults$2, options); } // runs the layout NullLayout.prototype.run = function () { var options = this.options; var eles = options.eles; // elements to consider in the layout var layout = this; // cy is automatically populated for us in the constructor // (disable eslint for next line as this serves as example layout code to external developers) // eslint-disable-next-line no-unused-vars options.cy; layout.emit('layoutstart'); // puts all nodes at (0, 0) // n.b. most layouts would use layoutPositions(), instead of positions() and manual events eles.nodes().positions(function () { return { x: 0, y: 0 }; }); // trigger layoutready when each node has had its position set at least once layout.one('layoutready', options.ready); layout.emit('layoutready'); // trigger layoutstop when the layout stops (e.g. finishes) layout.one('layoutstop', options.stop); layout.emit('layoutstop'); return this; // chaining }; // called on continuous layouts to stop them before they finish NullLayout.prototype.stop = function () { return this; // chaining }; var defaults$1 = { positions: undefined, // map of (node id) => (position obj); or function(node){ return somPos; } zoom: undefined, // the zoom level to set (prob want fit = false if set) pan: undefined, // the pan level to set (prob want fit = false if set) fit: true, // whether to fit to viewport padding: 30, // padding on fit animate: false, // whether to transition the node positions animationDuration: 500, // duration of animation in ms if enabled animationEasing: undefined, // easing of animation if enabled animateFilter: function animateFilter(node, i) { return true; }, // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts ready: undefined, // callback on layoutready stop: undefined, // callback on layoutstop transform: function transform(node, position) { return position; } // transform a given node position. Useful for changing flow direction in discrete layouts }; function PresetLayout(options) { this.options = extend({}, defaults$1, options); } PresetLayout.prototype.run = function () { var options = this.options; var eles = options.eles; var nodes = eles.nodes(); var posIsFn = fn$6(options.positions); function getPosition(node) { if (options.positions == null) { return copyPosition(node.position()); } if (posIsFn) { return options.positions(node); } var pos = options.positions[node._private.data.id]; if (pos == null) { return null; } return pos; } nodes.layoutPositions(this, options, function (node, i) { var position = getPosition(node); if (node.locked() || position == null) { return false; } return position; }); return this; // chaining }; var defaults = { fit: true, // whether to fit to viewport padding: 30, // fit padding boundingBox: undefined, // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h } animate: false, // whether to transition the node positions animationDuration: 500, // duration of animation in ms if enabled animationEasing: undefined, // easing of animation if enabled animateFilter: function animateFilter(node, i) { return true; }, // a function that determines whether the node should be animated. All nodes animated by default on animate enabled. Non-animated nodes are positioned immediately when the layout starts ready: undefined, // callback on layoutready stop: undefined, // callback on layoutstop transform: function transform(node, position) { return position; } // transform a given node position. Useful for changing flow direction in discrete layouts }; function RandomLayout(options) { this.options = extend({}, defaults, options); } RandomLayout.prototype.run = function () { var options = this.options; var cy = options.cy; var eles = options.eles; var bb = makeBoundingBox(options.boundingBox ? options.boundingBox : { x1: 0, y1: 0, w: cy.width(), h: cy.height() }); var getPos = function getPos(node, i) { return { x: bb.x1 + Math.round(Math.random() * bb.w), y: bb.y1 + Math.round(Math.random() * bb.h) }; }; eles.nodes().layoutPositions(this, options, getPos); return this; // chaining }; var layout = [{ name: 'breadthfirst', impl: BreadthFirstLayout }, { name: 'circle', impl: CircleLayout }, { name: 'concentric', impl: ConcentricLayout }, { name: 'cose', impl: CoseLayout }, { name: 'grid', impl: GridLayout }, { name: 'null', impl: NullLayout }, { name: 'preset', impl: PresetLayout }, { name: 'random', impl: RandomLayout }]; function NullRenderer(options) { this.options = options; this.notifications = 0; // for testing } var noop = function noop() {}; var throwImgErr = function throwImgErr() { throw new Error('A headless instance can not render images'); }; NullRenderer.prototype = { recalculateRenderedStyle: noop, notify: function notify() { this.notifications++; }, init: noop, isHeadless: function isHeadless() { return true; }, png: throwImgErr, jpg: throwImgErr }; var BRp$f = {}; BRp$f.arrowShapeWidth = 0.3; BRp$f.registerArrowShapes = function () { var arrowShapes = this.arrowShapes = {}; var renderer = this; // Contract for arrow shapes: // 0, 0 is arrow tip // (0, 1) is direction towards node // (1, 0) is right // // functional api: // collide: check x, y in shape // roughCollide: called before collide, no false negatives // draw: draw // spacing: dist(arrowTip, nodeBoundary) // gap: dist(edgeTip, nodeBoundary), edgeTip may != arrowTip var bbCollide = function bbCollide(x, y, size, angle, translation, edgeWidth, padding) { var x1 = translation.x - size / 2 - padding; var x2 = translation.x + size / 2 + padding; var y1 = translation.y - size / 2 - padding; var y2 = translation.y + size / 2 + padding; var inside = x1 <= x && x <= x2 && y1 <= y && y <= y2; return inside; }; var transform = function transform(x, y, size, angle, translation) { var xRotated = x * Math.cos(angle) - y * Math.sin(angle); var yRotated = x * Math.sin(angle) + y * Math.cos(angle); var xScaled = xRotated * size; var yScaled = yRotated * size; var xTranslated = xScaled + translation.x; var yTranslated = yScaled + translation.y; return { x: xTranslated, y: yTranslated }; }; var transformPoints = function transformPoints(pts, size, angle, translation) { var retPts = []; for (var i = 0; i < pts.length; i += 2) { var x = pts[i]; var y = pts[i + 1]; retPts.push(transform(x, y, size, angle, translation)); } return retPts; }; var pointsToArr = function pointsToArr(pts) { var ret = []; for (var i = 0; i < pts.length; i++) { var p = pts[i]; ret.push(p.x, p.y); } return ret; }; var standardGap = function standardGap(edge) { return edge.pstyle('width').pfValue * edge.pstyle('arrow-scale').pfValue * 2; }; var defineArrowShape = function defineArrowShape(name, defn) { if (string(defn)) { defn = arrowShapes[defn]; } arrowShapes[name] = extend({ name: name, points: [-0.15, -0.3, 0.15, -0.3, 0.15, 0.3, -0.15, 0.3], collide: function collide(x, y, size, angle, translation, padding) { var points = pointsToArr(transformPoints(this.points, size + 2 * padding, angle, translation)); var inside = pointInsidePolygonPoints(x, y, points); return inside; }, roughCollide: bbCollide, draw: function draw(context, size, angle, translation) { var points = transformPoints(this.points, size, angle, translation); renderer.arrowShapeImpl('polygon')(context, points); }, spacing: function spacing(edge) { return 0; }, gap: standardGap }, defn); }; defineArrowShape('none', { collide: falsify, roughCollide: falsify, draw: noop$1, spacing: zeroify, gap: zeroify }); defineArrowShape('triangle', { points: [-0.15, -0.3, 0, 0, 0.15, -0.3] }); defineArrowShape('arrow', 'triangle'); defineArrowShape('triangle-backcurve', { points: arrowShapes['triangle'].points, controlPoint: [0, -0.15], roughCollide: bbCollide, draw: function draw(context, size, angle, translation, edgeWidth) { var ptsTrans = transformPoints(this.points, size, angle, translation); var ctrlPt = this.controlPoint; var ctrlPtTrans = transform(ctrlPt[0], ctrlPt[1], size, angle, translation); renderer.arrowShapeImpl(this.name)(context, ptsTrans, ctrlPtTrans); }, gap: function gap(edge) { return standardGap(edge) * 0.8; } }); defineArrowShape('triangle-tee', { points: [0, 0, 0.15, -0.3, -0.15, -0.3, 0, 0], pointsTee: [-0.15, -0.4, -0.15, -0.5, 0.15, -0.5, 0.15, -0.4], collide: function collide(x, y, size, angle, translation, edgeWidth, padding) { var triPts = pointsToArr(transformPoints(this.points, size + 2 * padding, angle, translation)); var teePts = pointsToArr(transformPoints(this.pointsTee, size + 2 * padding, angle, translation)); var inside = pointInsidePolygonPoints(x, y, triPts) || pointInsidePolygonPoints(x, y, teePts); return inside; }, draw: function draw(context, size, angle, translation, edgeWidth) { var triPts = transformPoints(this.points, size, angle, translation); var teePts = transformPoints(this.pointsTee, size, angle, translation); renderer.arrowShapeImpl(this.name)(context, triPts, teePts); } }); defineArrowShape('circle-triangle', { radius: 0.15, pointsTr: [0, -0.15, 0.15, -0.45, -0.15, -0.45, 0, -0.15], collide: function collide(x, y, size, angle, translation, edgeWidth, padding) { var t = translation; var circleInside = Math.pow(t.x - x, 2) + Math.pow(t.y - y, 2) <= Math.pow((size + 2 * padding) * this.radius, 2); var triPts = pointsToArr(transformPoints(this.points, size + 2 * padding, angle, translation)); return pointInsidePolygonPoints(x, y, triPts) || circleInside; }, draw: function draw(context, size, angle, translation, edgeWidth) { var triPts = transformPoints(this.pointsTr, size, angle, translation); renderer.arrowShapeImpl(this.name)(context, triPts, translation.x, translation.y, this.radius * size); }, spacing: function spacing(edge) { return renderer.getArrowWidth(edge.pstyle('width').pfValue, edge.pstyle('arrow-scale').value) * this.radius; } }); defineArrowShape('triangle-cross', { points: [0, 0, 0.15, -0.3, -0.15, -0.3, 0, 0], baseCrossLinePts: [-0.15, -0.4, // first half of the rectangle -0.15, -0.4, 0.15, -0.4, // second half of the rectangle 0.15, -0.4], crossLinePts: function crossLinePts(size, edgeWidth) { // shift points so that the distance between the cross points matches edge width var p = this.baseCrossLinePts.slice(); var shiftFactor = edgeWidth / size; var y0 = 3; var y1 = 5; p[y0] = p[y0] - shiftFactor; p[y1] = p[y1] - shiftFactor; return p; }, collide: function collide(x, y, size, angle, translation, edgeWidth, padding) { var triPts = pointsToArr(transformPoints(this.points, size + 2 * padding, angle, translation)); var teePts = pointsToArr(transformPoints(this.crossLinePts(size, edgeWidth), size + 2 * padding, angle, translation)); var inside = pointInsidePolygonPoints(x, y, triPts) || pointInsidePolygonPoints(x, y, teePts); return inside; }, draw: function draw(context, size, angle, translation, edgeWidth) { var triPts = transformPoints(this.points, size, angle, translation); var crossLinePts = transformPoints(this.crossLinePts(size, edgeWidth), size, angle, translation); renderer.arrowShapeImpl(this.name)(context, triPts, crossLinePts); } }); defineArrowShape('vee', { points: [-0.15, -0.3, 0, 0, 0.15, -0.3, 0, -0.15], gap: function gap(edge) { return standardGap(edge) * 0.525; } }); defineArrowShape('circle', { radius: 0.15, collide: function collide(x, y, size, angle, translation, edgeWidth, padding) { var t = translation; var inside = Math.pow(t.x - x, 2) + Math.pow(t.y - y, 2) <= Math.pow((size + 2 * padding) * this.radius, 2); return inside; }, draw: function draw(context, size, angle, translation, edgeWidth) { renderer.arrowShapeImpl(this.name)(context, translation.x, translation.y, this.radius * size); }, spacing: function spacing(edge) { return renderer.getArrowWidth(edge.pstyle('width').pfValue, edge.pstyle('arrow-scale').value) * this.radius; } }); defineArrowShape('tee', { points: [-0.15, 0, -0.15, -0.1, 0.15, -0.1, 0.15, 0], spacing: function spacing(edge) { return 1; }, gap: function gap(edge) { return 1; } }); defineArrowShape('square', { points: [-0.15, 0.00, 0.15, 0.00, 0.15, -0.3, -0.15, -0.3] }); defineArrowShape('diamond', { points: [-0.15, -0.15, 0, -0.3, 0.15, -0.15, 0, 0], gap: function gap(edge) { return edge.pstyle('width').pfValue * edge.pstyle('arrow-scale').value; } }); defineArrowShape('chevron', { points: [0, 0, -0.15, -0.15, -0.1, -0.2, 0, -0.1, 0.1, -0.2, 0.15, -0.15], gap: function gap(edge) { return 0.95 * edge.pstyle('width').pfValue * edge.pstyle('arrow-scale').value; } }); }; var BRp$e = {}; // Project mouse BRp$e.projectIntoViewport = function (clientX, clientY) { var cy = this.cy; var offsets = this.findContainerClientCoords(); var offsetLeft = offsets[0]; var offsetTop = offsets[1]; var scale = offsets[4]; var pan = cy.pan(); var zoom = cy.zoom(); var x = ((clientX - offsetLeft) / scale - pan.x) / zoom; var y = ((clientY - offsetTop) / scale - pan.y) / zoom; return [x, y]; }; BRp$e.findContainerClientCoords = function () { if (this.containerBB) { return this.containerBB; } var container = this.container; var rect = container.getBoundingClientRect(); var style = window$1.getComputedStyle(container); var styleValue = function styleValue(name) { return parseFloat(style.getPropertyValue(name)); }; var padding = { left: styleValue('padding-left'), right: styleValue('padding-right'), top: styleValue('padding-top'), bottom: styleValue('padding-bottom') }; var border = { left: styleValue('border-left-width'), right: styleValue('border-right-width'), top: styleValue('border-top-width'), bottom: styleValue('border-bottom-width') }; var clientWidth = container.clientWidth; var clientHeight = container.clientHeight; var paddingHor = padding.left + padding.right; var paddingVer = padding.top + padding.bottom; var borderHor = border.left + border.right; var scale = rect.width / (clientWidth + borderHor); var unscaledW = clientWidth - paddingHor; var unscaledH = clientHeight - paddingVer; var left = rect.left + padding.left + border.left; var top = rect.top + padding.top + border.top; return this.containerBB = [left, top, unscaledW, unscaledH, scale]; }; BRp$e.invalidateContainerClientCoordsCache = function () { this.containerBB = null; }; BRp$e.findNearestElement = function (x, y, interactiveElementsOnly, isTouch) { return this.findNearestElements(x, y, interactiveElementsOnly, isTouch)[0]; }; BRp$e.findNearestElements = function (x, y, interactiveElementsOnly, isTouch) { var self = this; var r = this; var eles = r.getCachedZSortedEles(); var near = []; // 1 node max, 1 edge max var zoom = r.cy.zoom(); var hasCompounds = r.cy.hasCompoundNodes(); var edgeThreshold = (isTouch ? 24 : 8) / zoom; var nodeThreshold = (isTouch ? 8 : 2) / zoom; var labelThreshold = (isTouch ? 8 : 2) / zoom; var minSqDist = Infinity; var nearEdge; var nearNode; if (interactiveElementsOnly) { eles = eles.interactive; } function addEle(ele, sqDist) { if (ele.isNode()) { if (nearNode) { return; // can't replace node } else { nearNode = ele; near.push(ele); } } if (ele.isEdge() && (sqDist == null || sqDist < minSqDist)) { if (nearEdge) { // then replace existing edge // can replace only if same z-index if (nearEdge.pstyle('z-compound-depth').value === ele.pstyle('z-compound-depth').value && nearEdge.pstyle('z-compound-depth').value === ele.pstyle('z-compound-depth').value) { for (var i = 0; i < near.length; i++) { if (near[i].isEdge()) { near[i] = ele; nearEdge = ele; minSqDist = sqDist != null ? sqDist : minSqDist; break; } } } } else { near.push(ele); nearEdge = ele; minSqDist = sqDist != null ? sqDist : minSqDist; } } } function checkNode(node) { var width = node.outerWidth() + 2 * nodeThreshold; var height = node.outerHeight() + 2 * nodeThreshold; var hw = width / 2; var hh = height / 2; var pos = node.position(); if (pos.x - hw <= x && x <= pos.x + hw // bb check x && pos.y - hh <= y && y <= pos.y + hh // bb check y ) { var shape = r.nodeShapes[self.getNodeShape(node)]; if (shape.checkPoint(x, y, 0, width, height, pos.x, pos.y)) { addEle(node, 0); return true; } } } function checkEdge(edge) { var _p = edge._private; var rs = _p.rscratch; var styleWidth = edge.pstyle('width').pfValue; var scale = edge.pstyle('arrow-scale').value; var width = styleWidth / 2 + edgeThreshold; // more like a distance radius from centre var widthSq = width * width; var width2 = width * 2; var src = _p.source; var tgt = _p.target; var sqDist; if (rs.edgeType === 'segments' || rs.edgeType === 'straight' || rs.edgeType === 'haystack') { var pts = rs.allpts; for (var i = 0; i + 3 < pts.length; i += 2) { if (inLineVicinity(x, y, pts[i], pts[i + 1], pts[i + 2], pts[i + 3], width2) && widthSq > (sqDist = sqdistToFiniteLine(x, y, pts[i], pts[i + 1], pts[i + 2], pts[i + 3]))) { addEle(edge, sqDist); return true; } } } else if (rs.edgeType === 'bezier' || rs.edgeType === 'multibezier' || rs.edgeType === 'self' || rs.edgeType === 'compound') { var pts = rs.allpts; for (var i = 0; i + 5 < rs.allpts.length; i += 4) { if (inBezierVicinity(x, y, pts[i], pts[i + 1], pts[i + 2], pts[i + 3], pts[i + 4], pts[i + 5], width2) && widthSq > (sqDist = sqdistToQuadraticBezier(x, y, pts[i], pts[i + 1], pts[i + 2], pts[i + 3], pts[i + 4], pts[i + 5]))) { addEle(edge, sqDist); return true; } } } // if we're close to the edge but didn't hit it, maybe we hit its arrows var src = src || _p.source; var tgt = tgt || _p.target; var arSize = self.getArrowWidth(styleWidth, scale); var arrows = [{ name: 'source', x: rs.arrowStartX, y: rs.arrowStartY, angle: rs.srcArrowAngle }, { name: 'target', x: rs.arrowEndX, y: rs.arrowEndY, angle: rs.tgtArrowAngle }, { name: 'mid-source', x: rs.midX, y: rs.midY, angle: rs.midsrcArrowAngle }, { name: 'mid-target', x: rs.midX, y: rs.midY, angle: rs.midtgtArrowAngle }]; for (var i = 0; i < arrows.length; i++) { var ar = arrows[i]; var shape = r.arrowShapes[edge.pstyle(ar.name + '-arrow-shape').value]; var edgeWidth = edge.pstyle('width').pfValue; if (shape.roughCollide(x, y, arSize, ar.angle, { x: ar.x, y: ar.y }, edgeWidth, edgeThreshold) && shape.collide(x, y, arSize, ar.angle, { x: ar.x, y: ar.y }, edgeWidth, edgeThreshold)) { addEle(edge); return true; } } // for compound graphs, hitting edge may actually want a connected node instead (b/c edge may have greater z-index precedence) if (hasCompounds && near.length > 0) { checkNode(src); checkNode(tgt); } } function preprop(obj, name, pre) { return getPrefixedProperty(obj, name, pre); } function checkLabel(ele, prefix) { var _p = ele._private; var th = labelThreshold; var prefixDash; if (prefix) { prefixDash = prefix + '-'; } else { prefixDash = ''; } ele.boundingBox(); var bb = _p.labelBounds[prefix || 'main']; var text = ele.pstyle(prefixDash + 'label').value; var eventsEnabled = ele.pstyle('text-events').strValue === 'yes'; if (!eventsEnabled || !text) { return; } var lx = preprop(_p.rscratch, 'labelX', prefix); var ly = preprop(_p.rscratch, 'labelY', prefix); var theta = preprop(_p.rscratch, 'labelAngle', prefix); var ox = ele.pstyle(prefixDash + 'text-margin-x').pfValue; var oy = ele.pstyle(prefixDash + 'text-margin-y').pfValue; var lx1 = bb.x1 - th - ox; // (-ox, -oy) as bb already includes margin var lx2 = bb.x2 + th - ox; // and rotation is about (lx, ly) var ly1 = bb.y1 - th - oy; var ly2 = bb.y2 + th - oy; if (theta) { var cos = Math.cos(theta); var sin = Math.sin(theta); var rotate = function rotate(x, y) { x = x - lx; y = y - ly; return { x: x * cos - y * sin + lx, y: x * sin + y * cos + ly }; }; var px1y1 = rotate(lx1, ly1); var px1y2 = rotate(lx1, ly2); var px2y1 = rotate(lx2, ly1); var px2y2 = rotate(lx2, ly2); var points = [// with the margin added after the rotation is applied px1y1.x + ox, px1y1.y + oy, px2y1.x + ox, px2y1.y + oy, px2y2.x + ox, px2y2.y + oy, px1y2.x + ox, px1y2.y + oy]; if (pointInsidePolygonPoints(x, y, points)) { addEle(ele); return true; } } else { // do a cheaper bb check if (inBoundingBox(bb, x, y)) { addEle(ele); return true; } } } for (var i = eles.length - 1; i >= 0; i--) { // reverse order for precedence var ele = eles[i]; if (ele.isNode()) { checkNode(ele) || checkLabel(ele); } else { // then edge checkEdge(ele) || checkLabel(ele) || checkLabel(ele, 'source') || checkLabel(ele, 'target'); } } return near; }; // 'Give me everything from this box' BRp$e.getAllInBox = function (x1, y1, x2, y2) { var eles = this.getCachedZSortedEles().interactive; var box = []; var x1c = Math.min(x1, x2); var x2c = Math.max(x1, x2); var y1c = Math.min(y1, y2); var y2c = Math.max(y1, y2); x1 = x1c; x2 = x2c; y1 = y1c; y2 = y2c; var boxBb = makeBoundingBox({ x1: x1, y1: y1, x2: x2, y2: y2 }); for (var e = 0; e < eles.length; e++) { var ele = eles[e]; if (ele.isNode()) { var node = ele; var nodeBb = node.boundingBox({ includeNodes: true, includeEdges: false, includeLabels: false }); if (boundingBoxesIntersect(boxBb, nodeBb) && !boundingBoxInBoundingBox(nodeBb, boxBb)) { box.push(node); } } else { var edge = ele; var _p = edge._private; var rs = _p.rscratch; if (rs.startX != null && rs.startY != null && !inBoundingBox(boxBb, rs.startX, rs.startY)) { continue; } if (rs.endX != null && rs.endY != null && !inBoundingBox(boxBb, rs.endX, rs.endY)) { continue; } if (rs.edgeType === 'bezier' || rs.edgeType === 'multibezier' || rs.edgeType === 'self' || rs.edgeType === 'compound' || rs.edgeType === 'segments' || rs.edgeType === 'haystack') { var pts = _p.rstyle.bezierPts || _p.rstyle.linePts || _p.rstyle.haystackPts; var allInside = true; for (var i = 0; i < pts.length; i++) { if (!pointInBoundingBox(boxBb, pts[i])) { allInside = false; break; } } if (allInside) { box.push(edge); } } else if (rs.edgeType === 'haystack' || rs.edgeType === 'straight') { box.push(edge); } } } return box; }; var BRp$d = {}; BRp$d.calculateArrowAngles = function (edge) { var rs = edge._private.rscratch; var isHaystack = rs.edgeType === 'haystack'; var isBezier = rs.edgeType === 'bezier'; var isMultibezier = rs.edgeType === 'multibezier'; var isSegments = rs.edgeType === 'segments'; var isCompound = rs.edgeType === 'compound'; var isSelf = rs.edgeType === 'self'; // Displacement gives direction for arrowhead orientation var dispX, dispY; var startX, startY, endX, endY, midX, midY; if (isHaystack) { startX = rs.haystackPts[0]; startY = rs.haystackPts[1]; endX = rs.haystackPts[2]; endY = rs.haystackPts[3]; } else { startX = rs.arrowStartX; startY = rs.arrowStartY; endX = rs.arrowEndX; endY = rs.arrowEndY; } midX = rs.midX; midY = rs.midY; // source // if (isSegments) { dispX = startX - rs.segpts[0]; dispY = startY - rs.segpts[1]; } else if (isMultibezier || isCompound || isSelf || isBezier) { var pts = rs.allpts; var bX = qbezierAt(pts[0], pts[2], pts[4], 0.1); var bY = qbezierAt(pts[1], pts[3], pts[5], 0.1); dispX = startX - bX; dispY = startY - bY; } else { dispX = startX - midX; dispY = startY - midY; } rs.srcArrowAngle = getAngleFromDisp(dispX, dispY); // mid target // var midX = rs.midX; var midY = rs.midY; if (isHaystack) { midX = (startX + endX) / 2; midY = (startY + endY) / 2; } dispX = endX - startX; dispY = endY - startY; if (isSegments) { var pts = rs.allpts; if (pts.length / 2 % 2 === 0) { var i2 = pts.length / 2; var i1 = i2 - 2; dispX = pts[i2] - pts[i1]; dispY = pts[i2 + 1] - pts[i1 + 1]; } else { var i2 = pts.length / 2 - 1; var i1 = i2 - 2; var i3 = i2 + 2; dispX = pts[i2] - pts[i1]; dispY = pts[i2 + 1] - pts[i1 + 1]; } } else if (isMultibezier || isCompound || isSelf) { var pts = rs.allpts; var cpts = rs.ctrlpts; var bp0x, bp0y; var bp1x, bp1y; if (cpts.length / 2 % 2 === 0) { var p0 = pts.length / 2 - 1; // startpt var ic = p0 + 2; var p1 = ic + 2; bp0x = qbezierAt(pts[p0], pts[ic], pts[p1], 0.0); bp0y = qbezierAt(pts[p0 + 1], pts[ic + 1], pts[p1 + 1], 0.0); bp1x = qbezierAt(pts[p0], pts[ic], pts[p1], 0.0001); bp1y = qbezierAt(pts[p0 + 1], pts[ic + 1], pts[p1 + 1], 0.0001); } else { var ic = pts.length / 2 - 1; // ctrpt var p0 = ic - 2; // startpt var p1 = ic + 2; // endpt bp0x = qbezierAt(pts[p0], pts[ic], pts[p1], 0.4999); bp0y = qbezierAt(pts[p0 + 1], pts[ic + 1], pts[p1 + 1], 0.4999); bp1x = qbezierAt(pts[p0], pts[ic], pts[p1], 0.5); bp1y = qbezierAt(pts[p0 + 1], pts[ic + 1], pts[p1 + 1], 0.5); } dispX = bp1x - bp0x; dispY = bp1y - bp0y; } rs.midtgtArrowAngle = getAngleFromDisp(dispX, dispY); rs.midDispX = dispX; rs.midDispY = dispY; // mid source // dispX *= -1; dispY *= -1; if (isSegments) { var pts = rs.allpts; if (pts.length / 2 % 2 === 0) ; else { var i2 = pts.length / 2 - 1; var i3 = i2 + 2; dispX = -(pts[i3] - pts[i2]); dispY = -(pts[i3 + 1] - pts[i2 + 1]); } } rs.midsrcArrowAngle = getAngleFromDisp(dispX, dispY); // target // if (isSegments) { dispX = endX - rs.segpts[rs.segpts.length - 2]; dispY = endY - rs.segpts[rs.segpts.length - 1]; } else if (isMultibezier || isCompound || isSelf || isBezier) { var pts = rs.allpts; var l = pts.length; var bX = qbezierAt(pts[l - 6], pts[l - 4], pts[l - 2], 0.9); var bY = qbezierAt(pts[l - 5], pts[l - 3], pts[l - 1], 0.9); dispX = endX - bX; dispY = endY - bY; } else { dispX = endX - midX; dispY = endY - midY; } rs.tgtArrowAngle = getAngleFromDisp(dispX, dispY); }; BRp$d.getArrowWidth = BRp$d.getArrowHeight = function (edgeWidth, scale) { var cache = this.arrowWidthCache = this.arrowWidthCache || {}; var cachedVal = cache[edgeWidth + ', ' + scale]; if (cachedVal) { return cachedVal; } cachedVal = Math.max(Math.pow(edgeWidth * 13.37, 0.9), 29) * scale; cache[edgeWidth + ', ' + scale] = cachedVal; return cachedVal; }; var BRp$c = {}; BRp$c.findHaystackPoints = function (edges) { for (var i = 0; i < edges.length; i++) { var edge = edges[i]; var _p = edge._private; var rs = _p.rscratch; if (!rs.haystack) { var angle = Math.random() * 2 * Math.PI; rs.source = { x: Math.cos(angle), y: Math.sin(angle) }; angle = Math.random() * 2 * Math.PI; rs.target = { x: Math.cos(angle), y: Math.sin(angle) }; } var src = _p.source; var tgt = _p.target; var srcPos = src.position(); var tgtPos = tgt.position(); var srcW = src.width(); var tgtW = tgt.width(); var srcH = src.height(); var tgtH = tgt.height(); var radius = edge.pstyle('haystack-radius').value; var halfRadius = radius / 2; // b/c have to half width/height rs.haystackPts = rs.allpts = [rs.source.x * srcW * halfRadius + srcPos.x, rs.source.y * srcH * halfRadius + srcPos.y, rs.target.x * tgtW * halfRadius + tgtPos.x, rs.target.y * tgtH * halfRadius + tgtPos.y]; rs.midX = (rs.allpts[0] + rs.allpts[2]) / 2; rs.midY = (rs.allpts[1] + rs.allpts[3]) / 2; // always override as haystack in case set to different type previously rs.edgeType = 'haystack'; rs.haystack = true; this.storeEdgeProjections(edge); this.calculateArrowAngles(edge); this.recalculateEdgeLabelProjections(edge); this.calculateLabelAngles(edge); } }; BRp$c.findSegmentsPoints = function (edge, pairInfo) { // Segments (multiple straight lines) var rs = edge._private.rscratch; var posPts = pairInfo.posPts, intersectionPts = pairInfo.intersectionPts, vectorNormInverse = pairInfo.vectorNormInverse; var edgeDistances = edge.pstyle('edge-distances').value; var segmentWs = edge.pstyle('segment-weights'); var segmentDs = edge.pstyle('segment-distances'); var segmentsN = Math.min(segmentWs.pfValue.length, segmentDs.pfValue.length); rs.edgeType = 'segments'; rs.segpts = []; for (var s = 0; s < segmentsN; s++) { var w = segmentWs.pfValue[s]; var d = segmentDs.pfValue[s]; var w1 = 1 - w; var w2 = w; var midptPts = edgeDistances === 'node-position' ? posPts : intersectionPts; var adjustedMidpt = { x: midptPts.x1 * w1 + midptPts.x2 * w2, y: midptPts.y1 * w1 + midptPts.y2 * w2 }; rs.segpts.push(adjustedMidpt.x + vectorNormInverse.x * d, adjustedMidpt.y + vectorNormInverse.y * d); } }; BRp$c.findLoopPoints = function (edge, pairInfo, i, edgeIsUnbundled) { // Self-edge var rs = edge._private.rscratch; var dirCounts = pairInfo.dirCounts, srcPos = pairInfo.srcPos; var ctrlptDists = edge.pstyle('control-point-distances'); var ctrlptDist = ctrlptDists ? ctrlptDists.pfValue[0] : undefined; var loopDir = edge.pstyle('loop-direction').pfValue; var loopSwp = edge.pstyle('loop-sweep').pfValue; var stepSize = edge.pstyle('control-point-step-size').pfValue; rs.edgeType = 'self'; var j = i; var loopDist = stepSize; if (edgeIsUnbundled) { j = 0; loopDist = ctrlptDist; } var loopAngle = loopDir - Math.PI / 2; var outAngle = loopAngle - loopSwp / 2; var inAngle = loopAngle + loopSwp / 2; // increase by step size for overlapping loops, keyed on direction and sweep values var dc = String(loopDir + '_' + loopSwp); j = dirCounts[dc] === undefined ? dirCounts[dc] = 0 : ++dirCounts[dc]; rs.ctrlpts = [srcPos.x + Math.cos(outAngle) * 1.4 * loopDist * (j / 3 + 1), srcPos.y + Math.sin(outAngle) * 1.4 * loopDist * (j / 3 + 1), srcPos.x + Math.cos(inAngle) * 1.4 * loopDist * (j / 3 + 1), srcPos.y + Math.sin(inAngle) * 1.4 * loopDist * (j / 3 + 1)]; }; BRp$c.findCompoundLoopPoints = function (edge, pairInfo, i, edgeIsUnbundled) { // Compound edge var rs = edge._private.rscratch; rs.edgeType = 'compound'; var srcPos = pairInfo.srcPos, tgtPos = pairInfo.tgtPos, srcW = pairInfo.srcW, srcH = pairInfo.srcH, tgtW = pairInfo.tgtW, tgtH = pairInfo.tgtH; var stepSize = edge.pstyle('control-point-step-size').pfValue; var ctrlptDists = edge.pstyle('control-point-distances'); var ctrlptDist = ctrlptDists ? ctrlptDists.pfValue[0] : undefined; var j = i; var loopDist = stepSize; if (edgeIsUnbundled) { j = 0; loopDist = ctrlptDist; } var loopW = 50; var loopaPos = { x: srcPos.x - srcW / 2, y: srcPos.y - srcH / 2 }; var loopbPos = { x: tgtPos.x - tgtW / 2, y: tgtPos.y - tgtH / 2 }; var loopPos = { x: Math.min(loopaPos.x, loopbPos.x), y: Math.min(loopaPos.y, loopbPos.y) }; // avoids cases with impossible beziers var minCompoundStretch = 0.5; var compoundStretchA = Math.max(minCompoundStretch, Math.log(srcW * 0.01)); var compoundStretchB = Math.max(minCompoundStretch, Math.log(tgtW * 0.01)); rs.ctrlpts = [loopPos.x, loopPos.y - (1 + Math.pow(loopW, 1.12) / 100) * loopDist * (j / 3 + 1) * compoundStretchA, loopPos.x - (1 + Math.pow(loopW, 1.12) / 100) * loopDist * (j / 3 + 1) * compoundStretchB, loopPos.y]; }; BRp$c.findStraightEdgePoints = function (edge) { // Straight edge within bundle edge._private.rscratch.edgeType = 'straight'; }; BRp$c.findBezierPoints = function (edge, pairInfo, i, edgeIsUnbundled, edgeIsSwapped) { var rs = edge._private.rscratch; var vectorNormInverse = pairInfo.vectorNormInverse, posPts = pairInfo.posPts, intersectionPts = pairInfo.intersectionPts; var edgeDistances = edge.pstyle('edge-distances').value; var stepSize = edge.pstyle('control-point-step-size').pfValue; var ctrlptDists = edge.pstyle('control-point-distances'); var ctrlptWs = edge.pstyle('control-point-weights'); var bezierN = ctrlptDists && ctrlptWs ? Math.min(ctrlptDists.value.length, ctrlptWs.value.length) : 1; var ctrlptDist = ctrlptDists ? ctrlptDists.pfValue[0] : undefined; var ctrlptWeight = ctrlptWs.value[0]; // (Multi)bezier var multi = edgeIsUnbundled; rs.edgeType = multi ? 'multibezier' : 'bezier'; rs.ctrlpts = []; for (var b = 0; b < bezierN; b++) { var normctrlptDist = (0.5 - pairInfo.eles.length / 2 + i) * stepSize * (edgeIsSwapped ? -1 : 1); var manctrlptDist = void 0; var sign = signum(normctrlptDist); if (multi) { ctrlptDist = ctrlptDists ? ctrlptDists.pfValue[b] : stepSize; // fall back on step size ctrlptWeight = ctrlptWs.value[b]; } if (edgeIsUnbundled) { // multi or single unbundled manctrlptDist = ctrlptDist; } else { manctrlptDist = ctrlptDist !== undefined ? sign * ctrlptDist : undefined; } var distanceFromMidpoint = manctrlptDist !== undefined ? manctrlptDist : normctrlptDist; var w1 = 1 - ctrlptWeight; var w2 = ctrlptWeight; var midptPts = edgeDistances === 'node-position' ? posPts : intersectionPts; var adjustedMidpt = { x: midptPts.x1 * w1 + midptPts.x2 * w2, y: midptPts.y1 * w1 + midptPts.y2 * w2 }; rs.ctrlpts.push(adjustedMidpt.x + vectorNormInverse.x * distanceFromMidpoint, adjustedMidpt.y + vectorNormInverse.y * distanceFromMidpoint); } }; BRp$c.findTaxiPoints = function (edge, pairInfo) { // Taxicab geometry with two turns maximum var rs = edge._private.rscratch; rs.edgeType = 'segments'; var VERTICAL = 'vertical'; var HORIZONTAL = 'horizontal'; var LEFTWARD = 'leftward'; var RIGHTWARD = 'rightward'; var DOWNWARD = 'downward'; var UPWARD = 'upward'; var AUTO = 'auto'; var posPts = pairInfo.posPts, srcW = pairInfo.srcW, srcH = pairInfo.srcH, tgtW = pairInfo.tgtW, tgtH = pairInfo.tgtH; var edgeDistances = edge.pstyle('edge-distances').value; var dIncludesNodeBody = edgeDistances !== 'node-position'; var taxiDir = edge.pstyle('taxi-direction').value; var rawTaxiDir = taxiDir; // unprocessed value var taxiTurn = edge.pstyle('taxi-turn'); var turnIsPercent = taxiTurn.units === '%'; var taxiTurnPfVal = taxiTurn.pfValue; var turnIsNegative = taxiTurnPfVal < 0; // i.e. from target side var minD = edge.pstyle('taxi-turn-min-distance').pfValue; var dw = dIncludesNodeBody ? (srcW + tgtW) / 2 : 0; var dh = dIncludesNodeBody ? (srcH + tgtH) / 2 : 0; var pdx = posPts.x2 - posPts.x1; var pdy = posPts.y2 - posPts.y1; // take away the effective w/h from the magnitude of the delta value var subDWH = function subDWH(dxy, dwh) { if (dxy > 0) { return Math.max(dxy - dwh, 0); } else { return Math.min(dxy + dwh, 0); } }; var dx = subDWH(pdx, dw); var dy = subDWH(pdy, dh); var isExplicitDir = false; if (rawTaxiDir === AUTO) { taxiDir = Math.abs(dx) > Math.abs(dy) ? HORIZONTAL : VERTICAL; } else if (rawTaxiDir === UPWARD || rawTaxiDir === DOWNWARD) { taxiDir = VERTICAL; isExplicitDir = true; } else if (rawTaxiDir === LEFTWARD || rawTaxiDir === RIGHTWARD) { taxiDir = HORIZONTAL; isExplicitDir = true; } var isVert = taxiDir === VERTICAL; var l = isVert ? dy : dx; var pl = isVert ? pdy : pdx; var sgnL = signum(pl); var forcedDir = false; if (!(isExplicitDir && (turnIsPercent || turnIsNegative)) // forcing in this case would cause weird growing in the opposite direction && (rawTaxiDir === DOWNWARD && pl < 0 || rawTaxiDir === UPWARD && pl > 0 || rawTaxiDir === LEFTWARD && pl > 0 || rawTaxiDir === RIGHTWARD && pl < 0)) { sgnL *= -1; l = sgnL * Math.abs(l); forcedDir = true; } var d; if (turnIsPercent) { var p = taxiTurnPfVal < 0 ? 1 + taxiTurnPfVal : taxiTurnPfVal; d = p * l; } else { var k = taxiTurnPfVal < 0 ? l : 0; d = k + taxiTurnPfVal * sgnL; } var getIsTooClose = function getIsTooClose(d) { return Math.abs(d) < minD || Math.abs(d) >= Math.abs(l); }; var isTooCloseSrc = getIsTooClose(d); var isTooCloseTgt = getIsTooClose(Math.abs(l) - Math.abs(d)); var isTooClose = isTooCloseSrc || isTooCloseTgt; if (isTooClose && !forcedDir) { // non-ideal routing if (isVert) { // vertical fallbacks var lShapeInsideSrc = Math.abs(pl) <= srcH / 2; var lShapeInsideTgt = Math.abs(pdx) <= tgtW / 2; if (lShapeInsideSrc) { // horizontal Z-shape (direction not respected) var x = (posPts.x1 + posPts.x2) / 2; var y1 = posPts.y1, y2 = posPts.y2; rs.segpts = [x, y1, x, y2]; } else if (lShapeInsideTgt) { // vertical Z-shape (distance not respected) var y = (posPts.y1 + posPts.y2) / 2; var x1 = posPts.x1, x2 = posPts.x2; rs.segpts = [x1, y, x2, y]; } else { // L-shape fallback (turn distance not respected, but works well with tree siblings) rs.segpts = [posPts.x1, posPts.y2]; } } else { // horizontal fallbacks var _lShapeInsideSrc = Math.abs(pl) <= srcW / 2; var _lShapeInsideTgt = Math.abs(pdy) <= tgtH / 2; if (_lShapeInsideSrc) { // vertical Z-shape (direction not respected) var _y = (posPts.y1 + posPts.y2) / 2; var _x = posPts.x1, _x2 = posPts.x2; rs.segpts = [_x, _y, _x2, _y]; } else if (_lShapeInsideTgt) { // horizontal Z-shape (turn distance not respected) var _x3 = (posPts.x1 + posPts.x2) / 2; var _y2 = posPts.y1, _y3 = posPts.y2; rs.segpts = [_x3, _y2, _x3, _y3]; } else { // L-shape (turn distance not respected, but works well for tree siblings) rs.segpts = [posPts.x2, posPts.y1]; } } } else { // ideal routing if (isVert) { var _y4 = posPts.y1 + d + (dIncludesNodeBody ? srcH / 2 * sgnL : 0); var _x4 = posPts.x1, _x5 = posPts.x2; rs.segpts = [_x4, _y4, _x5, _y4]; } else { // horizontal var _x6 = posPts.x1 + d + (dIncludesNodeBody ? srcW / 2 * sgnL : 0); var _y5 = posPts.y1, _y6 = posPts.y2; rs.segpts = [_x6, _y5, _x6, _y6]; } } }; BRp$c.tryToCorrectInvalidPoints = function (edge, pairInfo) { var rs = edge._private.rscratch; // can only correct beziers for now... if (rs.edgeType === 'bezier') { var srcPos = pairInfo.srcPos, tgtPos = pairInfo.tgtPos, srcW = pairInfo.srcW, srcH = pairInfo.srcH, tgtW = pairInfo.tgtW, tgtH = pairInfo.tgtH, srcShape = pairInfo.srcShape, tgtShape = pairInfo.tgtShape; var badStart = !number$1(rs.startX) || !number$1(rs.startY); var badAStart = !number$1(rs.arrowStartX) || !number$1(rs.arrowStartY); var badEnd = !number$1(rs.endX) || !number$1(rs.endY); var badAEnd = !number$1(rs.arrowEndX) || !number$1(rs.arrowEndY); var minCpADistFactor = 3; var arrowW = this.getArrowWidth(edge.pstyle('width').pfValue, edge.pstyle('arrow-scale').value) * this.arrowShapeWidth; var minCpADist = minCpADistFactor * arrowW; var startACpDist = dist({ x: rs.ctrlpts[0], y: rs.ctrlpts[1] }, { x: rs.startX, y: rs.startY }); var closeStartACp = startACpDist < minCpADist; var endACpDist = dist({ x: rs.ctrlpts[0], y: rs.ctrlpts[1] }, { x: rs.endX, y: rs.endY }); var closeEndACp = endACpDist < minCpADist; var overlapping = false; if (badStart || badAStart || closeStartACp) { overlapping = true; // project control point along line from src centre to outside the src shape // (otherwise intersection will yield nothing) var cpD = { // delta x: rs.ctrlpts[0] - srcPos.x, y: rs.ctrlpts[1] - srcPos.y }; var cpL = Math.sqrt(cpD.x * cpD.x + cpD.y * cpD.y); // length of line var cpM = { // normalised delta x: cpD.x / cpL, y: cpD.y / cpL }; var radius = Math.max(srcW, srcH); var cpProj = { // *2 radius guarantees outside shape x: rs.ctrlpts[0] + cpM.x * 2 * radius, y: rs.ctrlpts[1] + cpM.y * 2 * radius }; var srcCtrlPtIntn = srcShape.intersectLine(srcPos.x, srcPos.y, srcW, srcH, cpProj.x, cpProj.y, 0); if (closeStartACp) { rs.ctrlpts[0] = rs.ctrlpts[0] + cpM.x * (minCpADist - startACpDist); rs.ctrlpts[1] = rs.ctrlpts[1] + cpM.y * (minCpADist - startACpDist); } else { rs.ctrlpts[0] = srcCtrlPtIntn[0] + cpM.x * minCpADist; rs.ctrlpts[1] = srcCtrlPtIntn[1] + cpM.y * minCpADist; } } if (badEnd || badAEnd || closeEndACp) { overlapping = true; // project control point along line from tgt centre to outside the tgt shape // (otherwise intersection will yield nothing) var _cpD = { // delta x: rs.ctrlpts[0] - tgtPos.x, y: rs.ctrlpts[1] - tgtPos.y }; var _cpL = Math.sqrt(_cpD.x * _cpD.x + _cpD.y * _cpD.y); // length of line var _cpM = { // normalised delta x: _cpD.x / _cpL, y: _cpD.y / _cpL }; var _radius = Math.max(srcW, srcH); var _cpProj = { // *2 radius guarantees outside shape x: rs.ctrlpts[0] + _cpM.x * 2 * _radius, y: rs.ctrlpts[1] + _cpM.y * 2 * _radius }; var tgtCtrlPtIntn = tgtShape.intersectLine(tgtPos.x, tgtPos.y, tgtW, tgtH, _cpProj.x, _cpProj.y, 0); if (closeEndACp) { rs.ctrlpts[0] = rs.ctrlpts[0] + _cpM.x * (minCpADist - endACpDist); rs.ctrlpts[1] = rs.ctrlpts[1] + _cpM.y * (minCpADist - endACpDist); } else { rs.ctrlpts[0] = tgtCtrlPtIntn[0] + _cpM.x * minCpADist; rs.ctrlpts[1] = tgtCtrlPtIntn[1] + _cpM.y * minCpADist; } } if (overlapping) { // recalc endpts this.findEndpoints(edge); } } }; BRp$c.storeAllpts = function (edge) { var rs = edge._private.rscratch; if (rs.edgeType === 'multibezier' || rs.edgeType === 'bezier' || rs.edgeType === 'self' || rs.edgeType === 'compound') { rs.allpts = []; rs.allpts.push(rs.startX, rs.startY); for (var b = 0; b + 1 < rs.ctrlpts.length; b += 2) { // ctrl pt itself rs.allpts.push(rs.ctrlpts[b], rs.ctrlpts[b + 1]); // the midpt between ctrlpts as intermediate destination pts if (b + 3 < rs.ctrlpts.length) { rs.allpts.push((rs.ctrlpts[b] + rs.ctrlpts[b + 2]) / 2, (rs.ctrlpts[b + 1] + rs.ctrlpts[b + 3]) / 2); } } rs.allpts.push(rs.endX, rs.endY); var m, mt; if (rs.ctrlpts.length / 2 % 2 === 0) { m = rs.allpts.length / 2 - 1; rs.midX = rs.allpts[m]; rs.midY = rs.allpts[m + 1]; } else { m = rs.allpts.length / 2 - 3; mt = 0.5; rs.midX = qbezierAt(rs.allpts[m], rs.allpts[m + 2], rs.allpts[m + 4], mt); rs.midY = qbezierAt(rs.allpts[m + 1], rs.allpts[m + 3], rs.allpts[m + 5], mt); } } else if (rs.edgeType === 'straight') { // need to calc these after endpts rs.allpts = [rs.startX, rs.startY, rs.endX, rs.endY]; // default midpt for labels etc rs.midX = (rs.startX + rs.endX + rs.arrowStartX + rs.arrowEndX) / 4; rs.midY = (rs.startY + rs.endY + rs.arrowStartY + rs.arrowEndY) / 4; } else if (rs.edgeType === 'segments') { rs.allpts = []; rs.allpts.push(rs.startX, rs.startY); rs.allpts.push.apply(rs.allpts, rs.segpts); rs.allpts.push(rs.endX, rs.endY); if (rs.segpts.length % 4 === 0) { var i2 = rs.segpts.length / 2; var i1 = i2 - 2; rs.midX = (rs.segpts[i1] + rs.segpts[i2]) / 2; rs.midY = (rs.segpts[i1 + 1] + rs.segpts[i2 + 1]) / 2; } else { var _i = rs.segpts.length / 2 - 1; rs.midX = rs.segpts[_i]; rs.midY = rs.segpts[_i + 1]; } } }; BRp$c.checkForInvalidEdgeWarning = function (edge) { var rs = edge[0]._private.rscratch; if (rs.nodesOverlap || number$1(rs.startX) && number$1(rs.startY) && number$1(rs.endX) && number$1(rs.endY)) { rs.loggedErr = false; } else { if (!rs.loggedErr) { rs.loggedErr = true; warn('Edge `' + edge.id() + '` has invalid endpoints and so it is impossible to draw. Adjust your edge style (e.g. control points) accordingly or use an alternative edge type. This is expected behaviour when the source node and the target node overlap.'); } } }; BRp$c.findEdgeControlPoints = function (edges) { var _this = this; if (!edges || edges.length === 0) { return; } var r = this; var cy = r.cy; var hasCompounds = cy.hasCompoundNodes(); var hashTable = { map: new Map$1(), get: function get(pairId) { var map2 = this.map.get(pairId[0]); if (map2 != null) { return map2.get(pairId[1]); } else { return null; } }, set: function set(pairId, val) { var map2 = this.map.get(pairId[0]); if (map2 == null) { map2 = new Map$1(); this.map.set(pairId[0], map2); } map2.set(pairId[1], val); } }; var pairIds = []; var haystackEdges = []; // create a table of edge (src, tgt) => list of edges between them for (var i = 0; i < edges.length; i++) { var edge = edges[i]; var _p = edge._private; var curveStyle = edge.pstyle('curve-style').value; // ignore edges who are not to be displayed // they shouldn't take up space if (edge.removed() || !edge.takesUpSpace()) { continue; } if (curveStyle === 'haystack') { haystackEdges.push(edge); continue; } var edgeIsUnbundled = curveStyle === 'unbundled-bezier' || curveStyle === 'segments' || curveStyle === 'straight' || curveStyle === 'straight-triangle' || curveStyle === 'taxi'; var edgeIsBezier = curveStyle === 'unbundled-bezier' || curveStyle === 'bezier'; var src = _p.source; var tgt = _p.target; var srcIndex = src.poolIndex(); var tgtIndex = tgt.poolIndex(); var pairId = [srcIndex, tgtIndex].sort(); var tableEntry = hashTable.get(pairId); if (tableEntry == null) { tableEntry = { eles: [] }; hashTable.set(pairId, tableEntry); pairIds.push(pairId); } tableEntry.eles.push(edge); if (edgeIsUnbundled) { tableEntry.hasUnbundled = true; } if (edgeIsBezier) { tableEntry.hasBezier = true; } } // for each pair (src, tgt), create the ctrl pts // Nested for loop is OK; total number of iterations for both loops = edgeCount var _loop = function _loop(p) { var pairId = pairIds[p]; var pairInfo = hashTable.get(pairId); var swappedpairInfo = void 0; if (!pairInfo.hasUnbundled) { var pllEdges = pairInfo.eles[0].parallelEdges().filter(function (e) { return e.isBundledBezier(); }); clearArray(pairInfo.eles); pllEdges.forEach(function (edge) { return pairInfo.eles.push(edge); }); // for each pair id, the edges should be sorted by index pairInfo.eles.sort(function (edge1, edge2) { return edge1.poolIndex() - edge2.poolIndex(); }); } var firstEdge = pairInfo.eles[0]; var src = firstEdge.source(); var tgt = firstEdge.target(); // make sure src/tgt distinction is consistent w.r.t. pairId if (src.poolIndex() > tgt.poolIndex()) { var temp = src; src = tgt; tgt = temp; } var srcPos = pairInfo.srcPos = src.position(); var tgtPos = pairInfo.tgtPos = tgt.position(); var srcW = pairInfo.srcW = src.outerWidth(); var srcH = pairInfo.srcH = src.outerHeight(); var tgtW = pairInfo.tgtW = tgt.outerWidth(); var tgtH = pairInfo.tgtH = tgt.outerHeight(); var srcShape = pairInfo.srcShape = r.nodeShapes[_this.getNodeShape(src)]; var tgtShape = pairInfo.tgtShape = r.nodeShapes[_this.getNodeShape(tgt)]; pairInfo.dirCounts = { 'north': 0, 'west': 0, 'south': 0, 'east': 0, 'northwest': 0, 'southwest': 0, 'northeast': 0, 'southeast': 0 }; for (var _i2 = 0; _i2 < pairInfo.eles.length; _i2++) { var _edge = pairInfo.eles[_i2]; var rs = _edge[0]._private.rscratch; var _curveStyle = _edge.pstyle('curve-style').value; var _edgeIsUnbundled = _curveStyle === 'unbundled-bezier' || _curveStyle === 'segments' || _curveStyle === 'taxi'; // whether the normalised pair order is the reverse of the edge's src-tgt order var edgeIsSwapped = !src.same(_edge.source()); if (!pairInfo.calculatedIntersection && src !== tgt && (pairInfo.hasBezier || pairInfo.hasUnbundled)) { pairInfo.calculatedIntersection = true; // pt outside src shape to calc distance/displacement from src to tgt var srcOutside = srcShape.intersectLine(srcPos.x, srcPos.y, srcW, srcH, tgtPos.x, tgtPos.y, 0); var srcIntn = pairInfo.srcIntn = srcOutside; // pt outside tgt shape to calc distance/displacement from src to tgt var tgtOutside = tgtShape.intersectLine(tgtPos.x, tgtPos.y, tgtW, tgtH, srcPos.x, srcPos.y, 0); var tgtIntn = pairInfo.tgtIntn = tgtOutside; var intersectionPts = pairInfo.intersectionPts = { x1: srcOutside[0], x2: tgtOutside[0], y1: srcOutside[1], y2: tgtOutside[1] }; var posPts = pairInfo.posPts = { x1: srcPos.x, x2: tgtPos.x, y1: srcPos.y, y2: tgtPos.y }; var dy = tgtOutside[1] - srcOutside[1]; var dx = tgtOutside[0] - srcOutside[0]; var l = Math.sqrt(dx * dx + dy * dy); var vector = pairInfo.vector = { x: dx, y: dy }; var vectorNorm = pairInfo.vectorNorm = { x: vector.x / l, y: vector.y / l }; var vectorNormInverse = { x: -vectorNorm.y, y: vectorNorm.x }; // if node shapes overlap, then no ctrl pts to draw pairInfo.nodesOverlap = !number$1(l) || tgtShape.checkPoint(srcOutside[0], srcOutside[1], 0, tgtW, tgtH, tgtPos.x, tgtPos.y) || srcShape.checkPoint(tgtOutside[0], tgtOutside[1], 0, srcW, srcH, srcPos.x, srcPos.y); pairInfo.vectorNormInverse = vectorNormInverse; swappedpairInfo = { nodesOverlap: pairInfo.nodesOverlap, dirCounts: pairInfo.dirCounts, calculatedIntersection: true, hasBezier: pairInfo.hasBezier, hasUnbundled: pairInfo.hasUnbundled, eles: pairInfo.eles, srcPos: tgtPos, tgtPos: srcPos, srcW: tgtW, srcH: tgtH, tgtW: srcW, tgtH: srcH, srcIntn: tgtIntn, tgtIntn: srcIntn, srcShape: tgtShape, tgtShape: srcShape, posPts: { x1: posPts.x2, y1: posPts.y2, x2: posPts.x1, y2: posPts.y1 }, intersectionPts: { x1: intersectionPts.x2, y1: intersectionPts.y2, x2: intersectionPts.x1, y2: intersectionPts.y1 }, vector: { x: -vector.x, y: -vector.y }, vectorNorm: { x: -vectorNorm.x, y: -vectorNorm.y }, vectorNormInverse: { x: -vectorNormInverse.x, y: -vectorNormInverse.y } }; } var passedPairInfo = edgeIsSwapped ? swappedpairInfo : pairInfo; rs.nodesOverlap = passedPairInfo.nodesOverlap; rs.srcIntn = passedPairInfo.srcIntn; rs.tgtIntn = passedPairInfo.tgtIntn; if (hasCompounds && (src.isParent() || src.isChild() || tgt.isParent() || tgt.isChild()) && (src.parents().anySame(tgt) || tgt.parents().anySame(src) || src.same(tgt) && src.isParent())) { _this.findCompoundLoopPoints(_edge, passedPairInfo, _i2, _edgeIsUnbundled); } else if (src === tgt) { _this.findLoopPoints(_edge, passedPairInfo, _i2, _edgeIsUnbundled); } else if (_curveStyle === 'segments') { _this.findSegmentsPoints(_edge, passedPairInfo); } else if (_curveStyle === 'taxi') { _this.findTaxiPoints(_edge, passedPairInfo); } else if (_curveStyle === 'straight' || !_edgeIsUnbundled && pairInfo.eles.length % 2 === 1 && _i2 === Math.floor(pairInfo.eles.length / 2)) { _this.findStraightEdgePoints(_edge); } else { _this.findBezierPoints(_edge, passedPairInfo, _i2, _edgeIsUnbundled, edgeIsSwapped); } _this.findEndpoints(_edge); _this.tryToCorrectInvalidPoints(_edge, passedPairInfo); _this.checkForInvalidEdgeWarning(_edge); _this.storeAllpts(_edge); _this.storeEdgeProjections(_edge); _this.calculateArrowAngles(_edge); _this.recalculateEdgeLabelProjections(_edge); _this.calculateLabelAngles(_edge); } // for pair edges }; for (var p = 0; p < pairIds.length; p++) { _loop(p); } // for pair ids // haystacks avoid the expense of pairInfo stuff (intersections etc.) this.findHaystackPoints(haystackEdges); }; function getPts(pts) { var retPts = []; if (pts == null) { return; } for (var i = 0; i < pts.length; i += 2) { var x = pts[i]; var y = pts[i + 1]; retPts.push({ x: x, y: y }); } return retPts; } BRp$c.getSegmentPoints = function (edge) { var rs = edge[0]._private.rscratch; var type = rs.edgeType; if (type === 'segments') { this.recalculateRenderedStyle(edge); return getPts(rs.segpts); } }; BRp$c.getControlPoints = function (edge) { var rs = edge[0]._private.rscratch; var type = rs.edgeType; if (type === 'bezier' || type === 'multibezier' || type === 'self' || type === 'compound') { this.recalculateRenderedStyle(edge); return getPts(rs.ctrlpts); } }; BRp$c.getEdgeMidpoint = function (edge) { var rs = edge[0]._private.rscratch; this.recalculateRenderedStyle(edge); return { x: rs.midX, y: rs.midY }; }; var BRp$b = {}; BRp$b.manualEndptToPx = function (node, prop) { var r = this; var npos = node.position(); var w = node.outerWidth(); var h = node.outerHeight(); if (prop.value.length === 2) { var p = [prop.pfValue[0], prop.pfValue[1]]; if (prop.units[0] === '%') { p[0] = p[0] * w; } if (prop.units[1] === '%') { p[1] = p[1] * h; } p[0] += npos.x; p[1] += npos.y; return p; } else { var angle = prop.pfValue[0]; angle = -Math.PI / 2 + angle; // start at 12 o'clock var l = 2 * Math.max(w, h); var _p = [npos.x + Math.cos(angle) * l, npos.y + Math.sin(angle) * l]; return r.nodeShapes[this.getNodeShape(node)].intersectLine(npos.x, npos.y, w, h, _p[0], _p[1], 0); } }; BRp$b.findEndpoints = function (edge) { var r = this; var intersect; var source = edge.source()[0]; var target = edge.target()[0]; var srcPos = source.position(); var tgtPos = target.position(); var tgtArShape = edge.pstyle('target-arrow-shape').value; var srcArShape = edge.pstyle('source-arrow-shape').value; var tgtDist = edge.pstyle('target-distance-from-node').pfValue; var srcDist = edge.pstyle('source-distance-from-node').pfValue; var curveStyle = edge.pstyle('curve-style').value; var rs = edge._private.rscratch; var et = rs.edgeType; var taxi = curveStyle === 'taxi'; var self = et === 'self' || et === 'compound'; var bezier = et === 'bezier' || et === 'multibezier' || self; var multi = et !== 'bezier'; var lines = et === 'straight' || et === 'segments'; var segments = et === 'segments'; var hasEndpts = bezier || multi || lines; var overrideEndpts = self || taxi; var srcManEndpt = edge.pstyle('source-endpoint'); var srcManEndptVal = overrideEndpts ? 'outside-to-node' : srcManEndpt.value; var tgtManEndpt = edge.pstyle('target-endpoint'); var tgtManEndptVal = overrideEndpts ? 'outside-to-node' : tgtManEndpt.value; rs.srcManEndpt = srcManEndpt; rs.tgtManEndpt = tgtManEndpt; var p1; // last known point of edge on target side var p2; // last known point of edge on source side var p1_i; // point to intersect with target shape var p2_i; // point to intersect with source shape if (bezier) { var cpStart = [rs.ctrlpts[0], rs.ctrlpts[1]]; var cpEnd = multi ? [rs.ctrlpts[rs.ctrlpts.length - 2], rs.ctrlpts[rs.ctrlpts.length - 1]] : cpStart; p1 = cpEnd; p2 = cpStart; } else if (lines) { var srcArrowFromPt = !segments ? [tgtPos.x, tgtPos.y] : rs.segpts.slice(0, 2); var tgtArrowFromPt = !segments ? [srcPos.x, srcPos.y] : rs.segpts.slice(rs.segpts.length - 2); p1 = tgtArrowFromPt; p2 = srcArrowFromPt; } if (tgtManEndptVal === 'inside-to-node') { intersect = [tgtPos.x, tgtPos.y]; } else if (tgtManEndpt.units) { intersect = this.manualEndptToPx(target, tgtManEndpt); } else if (tgtManEndptVal === 'outside-to-line') { intersect = rs.tgtIntn; // use cached value from ctrlpt calc } else { if (tgtManEndptVal === 'outside-to-node' || tgtManEndptVal === 'outside-to-node-or-label') { p1_i = p1; } else if (tgtManEndptVal === 'outside-to-line' || tgtManEndptVal === 'outside-to-line-or-label') { p1_i = [srcPos.x, srcPos.y]; } intersect = r.nodeShapes[this.getNodeShape(target)].intersectLine(tgtPos.x, tgtPos.y, target.outerWidth(), target.outerHeight(), p1_i[0], p1_i[1], 0); if (tgtManEndptVal === 'outside-to-node-or-label' || tgtManEndptVal === 'outside-to-line-or-label') { var trs = target._private.rscratch; var lw = trs.labelWidth; var lh = trs.labelHeight; var lx = trs.labelX; var ly = trs.labelY; var lw2 = lw / 2; var lh2 = lh / 2; var va = target.pstyle('text-valign').value; if (va === 'top') { ly -= lh2; } else if (va === 'bottom') { ly += lh2; } var ha = target.pstyle('text-halign').value; if (ha === 'left') { lx -= lw2; } else if (ha === 'right') { lx += lw2; } var labelIntersect = polygonIntersectLine(p1_i[0], p1_i[1], [lx - lw2, ly - lh2, lx + lw2, ly - lh2, lx + lw2, ly + lh2, lx - lw2, ly + lh2], tgtPos.x, tgtPos.y); if (labelIntersect.length > 0) { var refPt = srcPos; var intSqdist = sqdist(refPt, array2point(intersect)); var labIntSqdist = sqdist(refPt, array2point(labelIntersect)); var minSqDist = intSqdist; if (labIntSqdist < intSqdist) { intersect = labelIntersect; minSqDist = labIntSqdist; } if (labelIntersect.length > 2) { var labInt2SqDist = sqdist(refPt, { x: labelIntersect[2], y: labelIntersect[3] }); if (labInt2SqDist < minSqDist) { intersect = [labelIntersect[2], labelIntersect[3]]; } } } } } var arrowEnd = shortenIntersection(intersect, p1, r.arrowShapes[tgtArShape].spacing(edge) + tgtDist); var edgeEnd = shortenIntersection(intersect, p1, r.arrowShapes[tgtArShape].gap(edge) + tgtDist); rs.endX = edgeEnd[0]; rs.endY = edgeEnd[1]; rs.arrowEndX = arrowEnd[0]; rs.arrowEndY = arrowEnd[1]; if (srcManEndptVal === 'inside-to-node') { intersect = [srcPos.x, srcPos.y]; } else if (srcManEndpt.units) { intersect = this.manualEndptToPx(source, srcManEndpt); } else if (srcManEndptVal === 'outside-to-line') { intersect = rs.srcIntn; // use cached value from ctrlpt calc } else { if (srcManEndptVal === 'outside-to-node' || srcManEndptVal === 'outside-to-node-or-label') { p2_i = p2; } else if (srcManEndptVal === 'outside-to-line' || srcManEndptVal === 'outside-to-line-or-label') { p2_i = [tgtPos.x, tgtPos.y]; } intersect = r.nodeShapes[this.getNodeShape(source)].intersectLine(srcPos.x, srcPos.y, source.outerWidth(), source.outerHeight(), p2_i[0], p2_i[1], 0); if (srcManEndptVal === 'outside-to-node-or-label' || srcManEndptVal === 'outside-to-line-or-label') { var srs = source._private.rscratch; var _lw = srs.labelWidth; var _lh = srs.labelHeight; var _lx = srs.labelX; var _ly = srs.labelY; var _lw2 = _lw / 2; var _lh2 = _lh / 2; var _va = source.pstyle('text-valign').value; if (_va === 'top') { _ly -= _lh2; } else if (_va === 'bottom') { _ly += _lh2; } var _ha = source.pstyle('text-halign').value; if (_ha === 'left') { _lx -= _lw2; } else if (_ha === 'right') { _lx += _lw2; } var _labelIntersect = polygonIntersectLine(p2_i[0], p2_i[1], [_lx - _lw2, _ly - _lh2, _lx + _lw2, _ly - _lh2, _lx + _lw2, _ly + _lh2, _lx - _lw2, _ly + _lh2], srcPos.x, srcPos.y); if (_labelIntersect.length > 0) { var _refPt = tgtPos; var _intSqdist = sqdist(_refPt, array2point(intersect)); var _labIntSqdist = sqdist(_refPt, array2point(_labelIntersect)); var _minSqDist = _intSqdist; if (_labIntSqdist < _intSqdist) { intersect = [_labelIntersect[0], _labelIntersect[1]]; _minSqDist = _labIntSqdist; } if (_labelIntersect.length > 2) { var _labInt2SqDist = sqdist(_refPt, { x: _labelIntersect[2], y: _labelIntersect[3] }); if (_labInt2SqDist < _minSqDist) { intersect = [_labelIntersect[2], _labelIntersect[3]]; } } } } } var arrowStart = shortenIntersection(intersect, p2, r.arrowShapes[srcArShape].spacing(edge) + srcDist); var edgeStart = shortenIntersection(intersect, p2, r.arrowShapes[srcArShape].gap(edge) + srcDist); rs.startX = edgeStart[0]; rs.startY = edgeStart[1]; rs.arrowStartX = arrowStart[0]; rs.arrowStartY = arrowStart[1]; if (hasEndpts) { if (!number$1(rs.startX) || !number$1(rs.startY) || !number$1(rs.endX) || !number$1(rs.endY)) { rs.badLine = true; } else { rs.badLine = false; } } }; BRp$b.getSourceEndpoint = function (edge) { var rs = edge[0]._private.rscratch; this.recalculateRenderedStyle(edge); switch (rs.edgeType) { case 'haystack': return { x: rs.haystackPts[0], y: rs.haystackPts[1] }; default: return { x: rs.arrowStartX, y: rs.arrowStartY }; } }; BRp$b.getTargetEndpoint = function (edge) { var rs = edge[0]._private.rscratch; this.recalculateRenderedStyle(edge); switch (rs.edgeType) { case 'haystack': return { x: rs.haystackPts[2], y: rs.haystackPts[3] }; default: return { x: rs.arrowEndX, y: rs.arrowEndY }; } }; var BRp$a = {}; function pushBezierPts(r, edge, pts) { var qbezierAt$1 = function qbezierAt$1(p1, p2, p3, t) { return qbezierAt(p1, p2, p3, t); }; var _p = edge._private; var bpts = _p.rstyle.bezierPts; for (var i = 0; i < r.bezierProjPcts.length; i++) { var p = r.bezierProjPcts[i]; bpts.push({ x: qbezierAt$1(pts[0], pts[2], pts[4], p), y: qbezierAt$1(pts[1], pts[3], pts[5], p) }); } } BRp$a.storeEdgeProjections = function (edge) { var _p = edge._private; var rs = _p.rscratch; var et = rs.edgeType; // clear the cached points state _p.rstyle.bezierPts = null; _p.rstyle.linePts = null; _p.rstyle.haystackPts = null; if (et === 'multibezier' || et === 'bezier' || et === 'self' || et === 'compound') { _p.rstyle.bezierPts = []; for (var i = 0; i + 5 < rs.allpts.length; i += 4) { pushBezierPts(this, edge, rs.allpts.slice(i, i + 6)); } } else if (et === 'segments') { var lpts = _p.rstyle.linePts = []; for (var i = 0; i + 1 < rs.allpts.length; i += 2) { lpts.push({ x: rs.allpts[i], y: rs.allpts[i + 1] }); } } else if (et === 'haystack') { var hpts = rs.haystackPts; _p.rstyle.haystackPts = [{ x: hpts[0], y: hpts[1] }, { x: hpts[2], y: hpts[3] }]; } _p.rstyle.arrowWidth = this.getArrowWidth(edge.pstyle('width').pfValue, edge.pstyle('arrow-scale').value) * this.arrowShapeWidth; }; BRp$a.recalculateEdgeProjections = function (edges) { this.findEdgeControlPoints(edges); }; /* global document */ var BRp$9 = {}; BRp$9.recalculateNodeLabelProjection = function (node) { var content = node.pstyle('label').strValue; if (emptyString(content)) { return; } var textX, textY; var _p = node._private; var nodeWidth = node.width(); var nodeHeight = node.height(); var padding = node.padding(); var nodePos = node.position(); var textHalign = node.pstyle('text-halign').strValue; var textValign = node.pstyle('text-valign').strValue; var rs = _p.rscratch; var rstyle = _p.rstyle; switch (textHalign) { case 'left': textX = nodePos.x - nodeWidth / 2 - padding; break; case 'right': textX = nodePos.x + nodeWidth / 2 + padding; break; default: // e.g. center textX = nodePos.x; } switch (textValign) { case 'top': textY = nodePos.y - nodeHeight / 2 - padding; break; case 'bottom': textY = nodePos.y + nodeHeight / 2 + padding; break; default: // e.g. middle textY = nodePos.y; } rs.labelX = textX; rs.labelY = textY; rstyle.labelX = textX; rstyle.labelY = textY; this.calculateLabelAngles(node); this.applyLabelDimensions(node); }; var lineAngleFromDelta = function lineAngleFromDelta(dx, dy) { var angle = Math.atan(dy / dx); if (dx === 0 && angle < 0) { angle = angle * -1; } return angle; }; var lineAngle = function lineAngle(p0, p1) { var dx = p1.x - p0.x; var dy = p1.y - p0.y; return lineAngleFromDelta(dx, dy); }; var bezierAngle = function bezierAngle(p0, p1, p2, t) { var t0 = bound(0, t - 0.001, 1); var t1 = bound(0, t + 0.001, 1); var lp0 = qbezierPtAt(p0, p1, p2, t0); var lp1 = qbezierPtAt(p0, p1, p2, t1); return lineAngle(lp0, lp1); }; BRp$9.recalculateEdgeLabelProjections = function (edge) { var p; var _p = edge._private; var rs = _p.rscratch; var r = this; var content = { mid: edge.pstyle('label').strValue, source: edge.pstyle('source-label').strValue, target: edge.pstyle('target-label').strValue }; if (content.mid || content.source || content.target) ; else { return; // no labels => no calcs } // add center point to style so bounding box calculations can use it // p = { x: rs.midX, y: rs.midY }; var setRs = function setRs(propName, prefix, value) { setPrefixedProperty(_p.rscratch, propName, prefix, value); setPrefixedProperty(_p.rstyle, propName, prefix, value); }; setRs('labelX', null, p.x); setRs('labelY', null, p.y); var midAngle = lineAngleFromDelta(rs.midDispX, rs.midDispY); setRs('labelAutoAngle', null, midAngle); var createControlPointInfo = function createControlPointInfo() { if (createControlPointInfo.cache) { return createControlPointInfo.cache; } // use cache so only 1x per edge var ctrlpts = []; // store each ctrlpt info init for (var i = 0; i + 5 < rs.allpts.length; i += 4) { var p0 = { x: rs.allpts[i], y: rs.allpts[i + 1] }; var p1 = { x: rs.allpts[i + 2], y: rs.allpts[i + 3] }; // ctrlpt var p2 = { x: rs.allpts[i + 4], y: rs.allpts[i + 5] }; ctrlpts.push({ p0: p0, p1: p1, p2: p2, startDist: 0, length: 0, segments: [] }); } var bpts = _p.rstyle.bezierPts; var nProjs = r.bezierProjPcts.length; function addSegment(cp, p0, p1, t0, t1) { var length = dist(p0, p1); var prevSegment = cp.segments[cp.segments.length - 1]; var segment = { p0: p0, p1: p1, t0: t0, t1: t1, startDist: prevSegment ? prevSegment.startDist + prevSegment.length : 0, length: length }; cp.segments.push(segment); cp.length += length; } // update each ctrlpt with segment info for (var _i = 0; _i < ctrlpts.length; _i++) { var cp = ctrlpts[_i]; var prevCp = ctrlpts[_i - 1]; if (prevCp) { cp.startDist = prevCp.startDist + prevCp.length; } addSegment(cp, cp.p0, bpts[_i * nProjs], 0, r.bezierProjPcts[0]); // first for (var j = 0; j < nProjs - 1; j++) { addSegment(cp, bpts[_i * nProjs + j], bpts[_i * nProjs + j + 1], r.bezierProjPcts[j], r.bezierProjPcts[j + 1]); } addSegment(cp, bpts[_i * nProjs + nProjs - 1], cp.p2, r.bezierProjPcts[nProjs - 1], 1); // last } return createControlPointInfo.cache = ctrlpts; }; var calculateEndProjection = function calculateEndProjection(prefix) { var angle; var isSrc = prefix === 'source'; if (!content[prefix]) { return; } var offset = edge.pstyle(prefix + '-text-offset').pfValue; switch (rs.edgeType) { case 'self': case 'compound': case 'bezier': case 'multibezier': { var cps = createControlPointInfo(); var selected; var startDist = 0; var totalDist = 0; // find the segment we're on for (var i = 0; i < cps.length; i++) { var _cp = cps[isSrc ? i : cps.length - 1 - i]; for (var j = 0; j < _cp.segments.length; j++) { var _seg = _cp.segments[isSrc ? j : _cp.segments.length - 1 - j]; var lastSeg = i === cps.length - 1 && j === _cp.segments.length - 1; startDist = totalDist; totalDist += _seg.length; if (totalDist >= offset || lastSeg) { selected = { cp: _cp, segment: _seg }; break; } } if (selected) { break; } } var cp = selected.cp; var seg = selected.segment; var tSegment = (offset - startDist) / seg.length; var segDt = seg.t1 - seg.t0; var t = isSrc ? seg.t0 + segDt * tSegment : seg.t1 - segDt * tSegment; t = bound(0, t, 1); p = qbezierPtAt(cp.p0, cp.p1, cp.p2, t); angle = bezierAngle(cp.p0, cp.p1, cp.p2, t); break; } case 'straight': case 'segments': case 'haystack': { var d = 0, di, d0; var p0, p1; var l = rs.allpts.length; for (var _i2 = 0; _i2 + 3 < l; _i2 += 2) { if (isSrc) { p0 = { x: rs.allpts[_i2], y: rs.allpts[_i2 + 1] }; p1 = { x: rs.allpts[_i2 + 2], y: rs.allpts[_i2 + 3] }; } else { p0 = { x: rs.allpts[l - 2 - _i2], y: rs.allpts[l - 1 - _i2] }; p1 = { x: rs.allpts[l - 4 - _i2], y: rs.allpts[l - 3 - _i2] }; } di = dist(p0, p1); d0 = d; d += di; if (d >= offset) { break; } } var pD = offset - d0; var _t = pD / di; _t = bound(0, _t, 1); p = lineAt(p0, p1, _t); angle = lineAngle(p0, p1); break; } } setRs('labelX', prefix, p.x); setRs('labelY', prefix, p.y); setRs('labelAutoAngle', prefix, angle); }; calculateEndProjection('source'); calculateEndProjection('target'); this.applyLabelDimensions(edge); }; BRp$9.applyLabelDimensions = function (ele) { this.applyPrefixedLabelDimensions(ele); if (ele.isEdge()) { this.applyPrefixedLabelDimensions(ele, 'source'); this.applyPrefixedLabelDimensions(ele, 'target'); } }; BRp$9.applyPrefixedLabelDimensions = function (ele, prefix) { var _p = ele._private; var text = this.getLabelText(ele, prefix); var labelDims = this.calculateLabelDimensions(ele, text); var lineHeight = ele.pstyle('line-height').pfValue; var textWrap = ele.pstyle('text-wrap').strValue; var lines = getPrefixedProperty(_p.rscratch, 'labelWrapCachedLines', prefix) || []; var numLines = textWrap !== 'wrap' ? 1 : Math.max(lines.length, 1); var normPerLineHeight = labelDims.height / numLines; var labelLineHeight = normPerLineHeight * lineHeight; var width = labelDims.width; var height = labelDims.height + (numLines - 1) * (lineHeight - 1) * normPerLineHeight; setPrefixedProperty(_p.rstyle, 'labelWidth', prefix, width); setPrefixedProperty(_p.rscratch, 'labelWidth', prefix, width); setPrefixedProperty(_p.rstyle, 'labelHeight', prefix, height); setPrefixedProperty(_p.rscratch, 'labelHeight', prefix, height); setPrefixedProperty(_p.rscratch, 'labelLineHeight', prefix, labelLineHeight); }; BRp$9.getLabelText = function (ele, prefix) { var _p = ele._private; var pfd = prefix ? prefix + '-' : ''; var text = ele.pstyle(pfd + 'label').strValue; var textTransform = ele.pstyle('text-transform').value; var rscratch = function rscratch(propName, value) { if (value) { setPrefixedProperty(_p.rscratch, propName, prefix, value); return value; } else { return getPrefixedProperty(_p.rscratch, propName, prefix); } }; // for empty text, skip all processing if (!text) { return ''; } if (textTransform == 'none') ; else if (textTransform == 'uppercase') { text = text.toUpperCase(); } else if (textTransform == 'lowercase') { text = text.toLowerCase(); } var wrapStyle = ele.pstyle('text-wrap').value; if (wrapStyle === 'wrap') { var labelKey = rscratch('labelKey'); // save recalc if the label is the same as before if (labelKey != null && rscratch('labelWrapKey') === labelKey) { return rscratch('labelWrapCachedText'); } var zwsp = "\u200B"; var lines = text.split('\n'); var maxW = ele.pstyle('text-max-width').pfValue; var overflow = ele.pstyle('text-overflow-wrap').value; var overflowAny = overflow === 'anywhere'; var wrappedLines = []; var wordsRegex = /[\s\u200b]+/; var wordSeparator = overflowAny ? '' : ' '; for (var l = 0; l < lines.length; l++) { var line = lines[l]; var lineDims = this.calculateLabelDimensions(ele, line); var lineW = lineDims.width; if (overflowAny) { var processedLine = line.split('').join(zwsp); line = processedLine; } if (lineW > maxW) { // line is too long var words = line.split(wordsRegex); var subline = ''; for (var w = 0; w < words.length; w++) { var word = words[w]; var testLine = subline.length === 0 ? word : subline + wordSeparator + word; var testDims = this.calculateLabelDimensions(ele, testLine); var testW = testDims.width; if (testW <= maxW) { // word fits on current line subline += word + wordSeparator; } else { // word starts new line if (subline) { wrappedLines.push(subline); } subline = word + wordSeparator; } } // if there's remaining text, put it in a wrapped line if (!subline.match(/^[\s\u200b]+$/)) { wrappedLines.push(subline); } } else { // line is already short enough wrappedLines.push(line); } } // for rscratch('labelWrapCachedLines', wrappedLines); text = rscratch('labelWrapCachedText', wrappedLines.join('\n')); rscratch('labelWrapKey', labelKey); } else if (wrapStyle === 'ellipsis') { var _maxW = ele.pstyle('text-max-width').pfValue; var ellipsized = ''; var ellipsis = "\u2026"; var incLastCh = false; if (this.calculateLabelDimensions(ele, text).width < _maxW) { // the label already fits return text; } for (var i = 0; i < text.length; i++) { var widthWithNextCh = this.calculateLabelDimensions(ele, ellipsized + text[i] + ellipsis).width; if (widthWithNextCh > _maxW) { break; } ellipsized += text[i]; if (i === text.length - 1) { incLastCh = true; } } if (!incLastCh) { ellipsized += ellipsis; } return ellipsized; } // if ellipsize return text; }; BRp$9.getLabelJustification = function (ele) { var justification = ele.pstyle('text-justification').strValue; var textHalign = ele.pstyle('text-halign').strValue; if (justification === 'auto') { if (ele.isNode()) { switch (textHalign) { case 'left': return 'right'; case 'right': return 'left'; default: return 'center'; } } else { return 'center'; } } else { return justification; } }; BRp$9.calculateLabelDimensions = function (ele, text) { var r = this; var cacheKey = hashString(text, ele._private.labelDimsKey); var cache = r.labelDimCache || (r.labelDimCache = []); var existingVal = cache[cacheKey]; if (existingVal != null) { return existingVal; } var padding = 0; // add padding around text dims, as the measurement isn't that accurate var fStyle = ele.pstyle('font-style').strValue; var size = ele.pstyle('font-size').pfValue; var family = ele.pstyle('font-family').strValue; var weight = ele.pstyle('font-weight').strValue; var canvas = this.labelCalcCanvas; var c2d = this.labelCalcCanvasContext; if (!canvas) { canvas = this.labelCalcCanvas = document.createElement('canvas'); c2d = this.labelCalcCanvasContext = canvas.getContext('2d'); var ds = canvas.style; ds.position = 'absolute'; ds.left = '-9999px'; ds.top = '-9999px'; ds.zIndex = '-1'; ds.visibility = 'hidden'; ds.pointerEvents = 'none'; } c2d.font = "".concat(fStyle, " ").concat(weight, " ").concat(size, "px ").concat(family); var width = 0; var height = 0; var lines = text.split('\n'); for (var i = 0; i < lines.length; i++) { var line = lines[i]; var metrics = c2d.measureText(line); var w = Math.ceil(metrics.width); var h = size; width = Math.max(w, width); height += h; } width += padding; height += padding; return cache[cacheKey] = { width: width, height: height }; }; BRp$9.calculateLabelAngle = function (ele, prefix) { var _p = ele._private; var rs = _p.rscratch; var isEdge = ele.isEdge(); var prefixDash = prefix ? prefix + '-' : ''; var rot = ele.pstyle(prefixDash + 'text-rotation'); var rotStr = rot.strValue; if (rotStr === 'none') { return 0; } else if (isEdge && rotStr === 'autorotate') { return rs.labelAutoAngle; } else if (rotStr === 'autorotate') { return 0; } else { return rot.pfValue; } }; BRp$9.calculateLabelAngles = function (ele) { var r = this; var isEdge = ele.isEdge(); var _p = ele._private; var rs = _p.rscratch; rs.labelAngle = r.calculateLabelAngle(ele); if (isEdge) { rs.sourceLabelAngle = r.calculateLabelAngle(ele, 'source'); rs.targetLabelAngle = r.calculateLabelAngle(ele, 'target'); } }; var BRp$8 = {}; var TOO_SMALL_CUT_RECT = 28; var warnedCutRect = false; BRp$8.getNodeShape = function (node) { var r = this; var shape = node.pstyle('shape').value; if (shape === 'cutrectangle' && (node.width() < TOO_SMALL_CUT_RECT || node.height() < TOO_SMALL_CUT_RECT)) { if (!warnedCutRect) { warn('The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead'); warnedCutRect = true; } return 'rectangle'; } if (node.isParent()) { if (shape === 'rectangle' || shape === 'roundrectangle' || shape === 'round-rectangle' || shape === 'cutrectangle' || shape === 'cut-rectangle' || shape === 'barrel') { return shape; } else { return 'rectangle'; } } if (shape === 'polygon') { var points = node.pstyle('shape-polygon-points').value; return r.nodeShapes.makePolygon(points).name; } return shape; }; var BRp$7 = {}; BRp$7.registerCalculationListeners = function () { var cy = this.cy; var elesToUpdate = cy.collection(); var r = this; var enqueue = function enqueue(eles) { var dirtyStyleCaches = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; elesToUpdate.merge(eles); if (dirtyStyleCaches) { for (var i = 0; i < eles.length; i++) { var ele = eles[i]; var _p = ele._private; var rstyle = _p.rstyle; rstyle.clean = false; rstyle.cleanConnected = false; } } }; r.binder(cy).on('bounds.* dirty.*', function onDirtyBounds(e) { var ele = e.target; enqueue(ele); }).on('style.* background.*', function onDirtyStyle(e) { var ele = e.target; enqueue(ele, false); }); var updateEleCalcs = function updateEleCalcs(willDraw) { if (willDraw) { var fns = r.onUpdateEleCalcsFns; // because we need to have up-to-date style (e.g. stylesheet mappers) // before calculating rendered style (and pstyle might not be called yet) elesToUpdate.cleanStyle(); for (var i = 0; i < elesToUpdate.length; i++) { var ele = elesToUpdate[i]; var rstyle = ele._private.rstyle; if (ele.isNode() && !rstyle.cleanConnected) { enqueue(ele.connectedEdges()); rstyle.cleanConnected = true; } } if (fns) { for (var _i = 0; _i < fns.length; _i++) { var fn = fns[_i]; fn(willDraw, elesToUpdate); } } r.recalculateRenderedStyle(elesToUpdate); elesToUpdate = cy.collection(); } }; r.flushRenderedStyleQueue = function () { updateEleCalcs(true); }; r.beforeRender(updateEleCalcs, r.beforeRenderPriorities.eleCalcs); }; BRp$7.onUpdateEleCalcs = function (fn) { var fns = this.onUpdateEleCalcsFns = this.onUpdateEleCalcsFns || []; fns.push(fn); }; BRp$7.recalculateRenderedStyle = function (eles, useCache) { var isCleanConnected = function isCleanConnected(ele) { return ele._private.rstyle.cleanConnected; }; var edges = []; var nodes = []; // the renderer can't be used for calcs when destroyed, e.g. ele.boundingBox() if (this.destroyed) { return; } // use cache by default for perf if (useCache === undefined) { useCache = true; } for (var i = 0; i < eles.length; i++) { var ele = eles[i]; var _p = ele._private; var rstyle = _p.rstyle; // an edge may be implicitly dirty b/c of one of its connected nodes // (and a request for recalc may come in between frames) if (ele.isEdge() && (!isCleanConnected(ele.source()) || !isCleanConnected(ele.target()))) { rstyle.clean = false; } // only update if dirty and in graph if (useCache && rstyle.clean || ele.removed()) { continue; } // only update if not display: none if (ele.pstyle('display').value === 'none') { continue; } if (_p.group === 'nodes') { nodes.push(ele); } else { // edges edges.push(ele); } rstyle.clean = true; } // update node data from projections for (var _i2 = 0; _i2 < nodes.length; _i2++) { var _ele = nodes[_i2]; var _p2 = _ele._private; var _rstyle = _p2.rstyle; var pos = _ele.position(); this.recalculateNodeLabelProjection(_ele); _rstyle.nodeX = pos.x; _rstyle.nodeY = pos.y; _rstyle.nodeW = _ele.pstyle('width').pfValue; _rstyle.nodeH = _ele.pstyle('height').pfValue; } this.recalculateEdgeProjections(edges); // update edge data from projections for (var _i3 = 0; _i3 < edges.length; _i3++) { var _ele2 = edges[_i3]; var _p3 = _ele2._private; var _rstyle2 = _p3.rstyle; var rs = _p3.rscratch; // update rstyle positions _rstyle2.srcX = rs.arrowStartX; _rstyle2.srcY = rs.arrowStartY; _rstyle2.tgtX = rs.arrowEndX; _rstyle2.tgtY = rs.arrowEndY; _rstyle2.midX = rs.midX; _rstyle2.midY = rs.midY; _rstyle2.labelAngle = rs.labelAngle; _rstyle2.sourceLabelAngle = rs.sourceLabelAngle; _rstyle2.targetLabelAngle = rs.targetLabelAngle; } }; var BRp$6 = {}; BRp$6.updateCachedGrabbedEles = function () { var eles = this.cachedZSortedEles; if (!eles) { // just let this be recalculated on the next z sort tick return; } eles.drag = []; eles.nondrag = []; var grabTargets = []; for (var i = 0; i < eles.length; i++) { var ele = eles[i]; var rs = ele._private.rscratch; if (ele.grabbed() && !ele.isParent()) { grabTargets.push(ele); } else if (rs.inDragLayer) { eles.drag.push(ele); } else { eles.nondrag.push(ele); } } // put the grab target nodes last so it's on top of its neighbourhood for (var i = 0; i < grabTargets.length; i++) { var ele = grabTargets[i]; eles.drag.push(ele); } }; BRp$6.invalidateCachedZSortedEles = function () { this.cachedZSortedEles = null; }; BRp$6.getCachedZSortedEles = function (forceRecalc) { if (forceRecalc || !this.cachedZSortedEles) { var eles = this.cy.mutableElements().toArray(); eles.sort(zIndexSort); eles.interactive = eles.filter(function (ele) { return ele.interactive(); }); this.cachedZSortedEles = eles; this.updateCachedGrabbedEles(); } else { eles = this.cachedZSortedEles; } return eles; }; var BRp$5 = {}; [BRp$e, BRp$d, BRp$c, BRp$b, BRp$a, BRp$9, BRp$8, BRp$7, BRp$6].forEach(function (props) { extend(BRp$5, props); }); var BRp$4 = {}; BRp$4.getCachedImage = function (url, crossOrigin, onLoad) { var r = this; var imageCache = r.imageCache = r.imageCache || {}; var cache = imageCache[url]; if (cache) { if (!cache.image.complete) { cache.image.addEventListener('load', onLoad); } return cache.image; } else { cache = imageCache[url] = imageCache[url] || {}; var image = cache.image = new Image(); // eslint-disable-line no-undef image.addEventListener('load', onLoad); image.addEventListener('error', function () { image.error = true; }); // #1582 safari doesn't load data uris with crossOrigin properly // https://bugs.webkit.org/show_bug.cgi?id=123978 var dataUriPrefix = 'data:'; var isDataUri = url.substring(0, dataUriPrefix.length).toLowerCase() === dataUriPrefix; if (!isDataUri) { // if crossorigin is 'null'(stringified), then manually set it to null crossOrigin = crossOrigin === 'null' ? null : crossOrigin; image.crossOrigin = crossOrigin; // prevent tainted canvas } image.src = url; return image; } }; var BRp$3 = {}; /* global document, window, ResizeObserver, MutationObserver */ BRp$3.registerBinding = function (target, event, handler, useCapture) { // eslint-disable-line no-unused-vars var args = Array.prototype.slice.apply(arguments, [1]); // copy var b = this.binder(target); return b.on.apply(b, args); }; BRp$3.binder = function (tgt) { var r = this; var tgtIsDom = tgt === window || tgt === document || tgt === document.body || domElement(tgt); if (r.supportsPassiveEvents == null) { // from https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md#feature-detection var supportsPassive = false; try { var opts = Object.defineProperty({}, 'passive', { get: function get() { supportsPassive = true; return true; } }); window.addEventListener('test', null, opts); } catch (err) {// not supported } r.supportsPassiveEvents = supportsPassive; } var on = function on(event, handler, useCapture) { var args = Array.prototype.slice.call(arguments); if (tgtIsDom && r.supportsPassiveEvents) { // replace useCapture w/ opts obj args[2] = { capture: useCapture != null ? useCapture : false, passive: false, once: false }; } r.bindings.push({ target: tgt, args: args }); (tgt.addEventListener || tgt.on).apply(tgt, args); return this; }; return { on: on, addEventListener: on, addListener: on, bind: on }; }; BRp$3.nodeIsDraggable = function (node) { return node && node.isNode() && !node.locked() && node.grabbable(); }; BRp$3.nodeIsGrabbable = function (node) { return this.nodeIsDraggable(node) && node.interactive(); }; BRp$3.load = function () { var r = this; var isSelected = function isSelected(ele) { return ele.selected(); }; var triggerEvents = function triggerEvents(target, names, e, position) { if (target == null) { target = r.cy; } for (var i = 0; i < names.length; i++) { var name = names[i]; target.emit({ originalEvent: e, type: name, position: position }); } }; var isMultSelKeyDown = function isMultSelKeyDown(e) { return e.shiftKey || e.metaKey || e.ctrlKey; // maybe e.altKey }; var allowPanningPassthrough = function allowPanningPassthrough(down, downs) { var allowPassthrough = true; if (r.cy.hasCompoundNodes() && down && down.pannable()) { // a grabbable compound node below the ele => no passthrough panning for (var i = 0; downs && i < downs.length; i++) { var down = downs[i]; //if any parent node in event hierarchy isn't pannable, reject passthrough if (down.isNode() && down.isParent() && !down.pannable()) { allowPassthrough = false; break; } } } else { allowPassthrough = true; } return allowPassthrough; }; var setGrabbed = function setGrabbed(ele) { ele[0]._private.grabbed = true; }; var setFreed = function setFreed(ele) { ele[0]._private.grabbed = false; }; var setInDragLayer = function setInDragLayer(ele) { ele[0]._private.rscratch.inDragLayer = true; }; var setOutDragLayer = function setOutDragLayer(ele) { ele[0]._private.rscratch.inDragLayer = false; }; var setGrabTarget = function setGrabTarget(ele) { ele[0]._private.rscratch.isGrabTarget = true; }; var removeGrabTarget = function removeGrabTarget(ele) { ele[0]._private.rscratch.isGrabTarget = false; }; var addToDragList = function addToDragList(ele, opts) { var list = opts.addToList; var listHasEle = list.has(ele); if (!listHasEle && ele.grabbable() && !ele.locked()) { list.merge(ele); setGrabbed(ele); } }; // helper function to determine which child nodes and inner edges // of a compound node to be dragged as well as the grabbed and selected nodes var addDescendantsToDrag = function addDescendantsToDrag(node, opts) { if (!node.cy().hasCompoundNodes()) { return; } if (opts.inDragLayer == null && opts.addToList == null) { return; } // nothing to do var innerNodes = node.descendants(); if (opts.inDragLayer) { innerNodes.forEach(setInDragLayer); innerNodes.connectedEdges().forEach(setInDragLayer); } if (opts.addToList) { addToDragList(innerNodes, opts); } }; // adds the given nodes and its neighbourhood to the drag layer var addNodesToDrag = function addNodesToDrag(nodes, opts) { opts = opts || {}; var hasCompoundNodes = nodes.cy().hasCompoundNodes(); if (opts.inDragLayer) { nodes.forEach(setInDragLayer); nodes.neighborhood().stdFilter(function (ele) { return !hasCompoundNodes || ele.isEdge(); }).forEach(setInDragLayer); } if (opts.addToList) { nodes.forEach(function (ele) { addToDragList(ele, opts); }); } addDescendantsToDrag(nodes, opts); // always add to drag // also add nodes and edges related to the topmost ancestor updateAncestorsInDragLayer(nodes, { inDragLayer: opts.inDragLayer }); r.updateCachedGrabbedEles(); }; var addNodeToDrag = addNodesToDrag; var freeDraggedElements = function freeDraggedElements(grabbedEles) { if (!grabbedEles) { return; } // just go over all elements rather than doing a bunch of (possibly expensive) traversals r.getCachedZSortedEles().forEach(function (ele) { setFreed(ele); setOutDragLayer(ele); removeGrabTarget(ele); }); r.updateCachedGrabbedEles(); }; // helper function to determine which ancestor nodes and edges should go // to the drag layer (or should be removed from drag layer). var updateAncestorsInDragLayer = function updateAncestorsInDragLayer(node, opts) { if (opts.inDragLayer == null && opts.addToList == null) { return; } // nothing to do if (!node.cy().hasCompoundNodes()) { return; } // find top-level parent var parent = node.ancestors().orphans(); // no parent node: no nodes to add to the drag layer if (parent.same(node)) { return; } var nodes = parent.descendants().spawnSelf().merge(parent).unmerge(node).unmerge(node.descendants()); var edges = nodes.connectedEdges(); if (opts.inDragLayer) { edges.forEach(setInDragLayer); nodes.forEach(setInDragLayer); } if (opts.addToList) { nodes.forEach(function (ele) { addToDragList(ele, opts); }); } }; var blurActiveDomElement = function blurActiveDomElement() { if (document.activeElement != null && document.activeElement.blur != null) { document.activeElement.blur(); } }; var haveMutationsApi = typeof MutationObserver !== 'undefined'; var haveResizeObserverApi = typeof ResizeObserver !== 'undefined'; // watch for when the cy container is removed from the dom if (haveMutationsApi) { r.removeObserver = new MutationObserver(function (mutns) { // eslint-disable-line no-undef for (var i = 0; i < mutns.length; i++) { var mutn = mutns[i]; var rNodes = mutn.removedNodes; if (rNodes) { for (var j = 0; j < rNodes.length; j++) { var rNode = rNodes[j]; if (rNode === r.container) { r.destroy(); break; } } } } }); if (r.container.parentNode) { r.removeObserver.observe(r.container.parentNode, { childList: true }); } } else { r.registerBinding(r.container, 'DOMNodeRemoved', function (e) { // eslint-disable-line no-unused-vars r.destroy(); }); } var onResize = debounce__default["default"](function () { r.cy.resize(); }, 100); if (haveMutationsApi) { r.styleObserver = new MutationObserver(onResize); // eslint-disable-line no-undef r.styleObserver.observe(r.container, { attributes: true }); } // auto resize r.registerBinding(window, 'resize', onResize); // eslint-disable-line no-undef if (haveResizeObserverApi) { r.resizeObserver = new ResizeObserver(onResize); // eslint-disable-line no-undef r.resizeObserver.observe(r.container); } var forEachUp = function forEachUp(domEle, fn) { while (domEle != null) { fn(domEle); domEle = domEle.parentNode; } }; var invalidateCoords = function invalidateCoords() { r.invalidateContainerClientCoordsCache(); }; forEachUp(r.container, function (domEle) { r.registerBinding(domEle, 'transitionend', invalidateCoords); r.registerBinding(domEle, 'animationend', invalidateCoords); r.registerBinding(domEle, 'scroll', invalidateCoords); }); // stop right click menu from appearing on cy r.registerBinding(r.container, 'contextmenu', function (e) { e.preventDefault(); }); var inBoxSelection = function inBoxSelection() { return r.selection[4] !== 0; }; var eventInContainer = function eventInContainer(e) { // save cycles if mouse events aren't to be captured var containerPageCoords = r.findContainerClientCoords(); var x = containerPageCoords[0]; var y = containerPageCoords[1]; var width = containerPageCoords[2]; var height = containerPageCoords[3]; var positions = e.touches ? e.touches : [e]; var atLeastOnePosInside = false; for (var i = 0; i < positions.length; i++) { var p = positions[i]; if (x <= p.clientX && p.clientX <= x + width && y <= p.clientY && p.clientY <= y + height) { atLeastOnePosInside = true; break; } } if (!atLeastOnePosInside) { return false; } var container = r.container; var target = e.target; var tParent = target.parentNode; var containerIsTarget = false; while (tParent) { if (tParent === container) { containerIsTarget = true; break; } tParent = tParent.parentNode; } if (!containerIsTarget) { return false; } // if target is outisde cy container, then this event is not for us return true; }; // Primary key r.registerBinding(r.container, 'mousedown', function mousedownHandler(e) { if (!eventInContainer(e)) { return; } e.preventDefault(); blurActiveDomElement(); r.hoverData.capture = true; r.hoverData.which = e.which; var cy = r.cy; var gpos = [e.clientX, e.clientY]; var pos = r.projectIntoViewport(gpos[0], gpos[1]); var select = r.selection; var nears = r.findNearestElements(pos[0], pos[1], true, false); var near = nears[0]; var draggedElements = r.dragData.possibleDragElements; r.hoverData.mdownPos = pos; r.hoverData.mdownGPos = gpos; var checkForTaphold = function checkForTaphold() { r.hoverData.tapholdCancelled = false; clearTimeout(r.hoverData.tapholdTimeout); r.hoverData.tapholdTimeout = setTimeout(function () { if (r.hoverData.tapholdCancelled) { return; } else { var ele = r.hoverData.down; if (ele) { ele.emit({ originalEvent: e, type: 'taphold', position: { x: pos[0], y: pos[1] } }); } else { cy.emit({ originalEvent: e, type: 'taphold', position: { x: pos[0], y: pos[1] } }); } } }, r.tapholdDuration); }; // Right click button if (e.which == 3) { r.hoverData.cxtStarted = true; var cxtEvt = { originalEvent: e, type: 'cxttapstart', position: { x: pos[0], y: pos[1] } }; if (near) { near.activate(); near.emit(cxtEvt); r.hoverData.down = near; } else { cy.emit(cxtEvt); } r.hoverData.downTime = new Date().getTime(); r.hoverData.cxtDragged = false; // Primary button } else if (e.which == 1) { if (near) { near.activate(); } // Element dragging { // If something is under the cursor and it is draggable, prepare to grab it if (near != null) { if (r.nodeIsGrabbable(near)) { var makeEvent = function makeEvent(type) { return { originalEvent: e, type: type, position: { x: pos[0], y: pos[1] } }; }; var triggerGrab = function triggerGrab(ele) { ele.emit(makeEvent('grab')); }; setGrabTarget(near); if (!near.selected()) { draggedElements = r.dragData.possibleDragElements = cy.collection(); addNodeToDrag(near, { addToList: draggedElements }); near.emit(makeEvent('grabon')).emit(makeEvent('grab')); } else { draggedElements = r.dragData.possibleDragElements = cy.collection(); var selectedNodes = cy.$(function (ele) { return ele.isNode() && ele.selected() && r.nodeIsGrabbable(ele); }); addNodesToDrag(selectedNodes, { addToList: draggedElements }); near.emit(makeEvent('grabon')); selectedNodes.forEach(triggerGrab); } r.redrawHint('eles', true); r.redrawHint('drag', true); } } r.hoverData.down = near; r.hoverData.downs = nears; r.hoverData.downTime = new Date().getTime(); } triggerEvents(near, ['mousedown', 'tapstart', 'vmousedown'], e, { x: pos[0], y: pos[1] }); if (near == null) { select[4] = 1; r.data.bgActivePosistion = { x: pos[0], y: pos[1] }; r.redrawHint('select', true); r.redraw(); } else if (near.pannable()) { select[4] = 1; // for future pan } checkForTaphold(); } // Initialize selection box coordinates select[0] = select[2] = pos[0]; select[1] = select[3] = pos[1]; }, false); r.registerBinding(window, 'mousemove', function mousemoveHandler(e) { // eslint-disable-line no-undef var capture = r.hoverData.capture; if (!capture && !eventInContainer(e)) { return; } var preventDefault = false; var cy = r.cy; var zoom = cy.zoom(); var gpos = [e.clientX, e.clientY]; var pos = r.projectIntoViewport(gpos[0], gpos[1]); var mdownPos = r.hoverData.mdownPos; var mdownGPos = r.hoverData.mdownGPos; var select = r.selection; var near = null; if (!r.hoverData.draggingEles && !r.hoverData.dragging && !r.hoverData.selecting) { near = r.findNearestElement(pos[0], pos[1], true, false); } var last = r.hoverData.last; var down = r.hoverData.down; var disp = [pos[0] - select[2], pos[1] - select[3]]; var draggedElements = r.dragData.possibleDragElements; var isOverThresholdDrag; if (mdownGPos) { var dx = gpos[0] - mdownGPos[0]; var dx2 = dx * dx; var dy = gpos[1] - mdownGPos[1]; var dy2 = dy * dy; var dist2 = dx2 + dy2; r.hoverData.isOverThresholdDrag = isOverThresholdDrag = dist2 >= r.desktopTapThreshold2; } var multSelKeyDown = isMultSelKeyDown(e); if (isOverThresholdDrag) { r.hoverData.tapholdCancelled = true; } var updateDragDelta = function updateDragDelta() { var dragDelta = r.hoverData.dragDelta = r.hoverData.dragDelta || []; if (dragDelta.length === 0) { dragDelta.push(disp[0]); dragDelta.push(disp[1]); } else { dragDelta[0] += disp[0]; dragDelta[1] += disp[1]; } }; preventDefault = true; triggerEvents(near, ['mousemove', 'vmousemove', 'tapdrag'], e, { x: pos[0], y: pos[1] }); var goIntoBoxMode = function goIntoBoxMode() { r.data.bgActivePosistion = undefined; if (!r.hoverData.selecting) { cy.emit({ originalEvent: e, type: 'boxstart', position: { x: pos[0], y: pos[1] } }); } select[4] = 1; r.hoverData.selecting = true; r.redrawHint('select', true); r.redraw(); }; // trigger context drag if rmouse down if (r.hoverData.which === 3) { // but only if over threshold if (isOverThresholdDrag) { var cxtEvt = { originalEvent: e, type: 'cxtdrag', position: { x: pos[0], y: pos[1] } }; if (down) { down.emit(cxtEvt); } else { cy.emit(cxtEvt); } r.hoverData.cxtDragged = true; if (!r.hoverData.cxtOver || near !== r.hoverData.cxtOver) { if (r.hoverData.cxtOver) { r.hoverData.cxtOver.emit({ originalEvent: e, type: 'cxtdragout', position: { x: pos[0], y: pos[1] } }); } r.hoverData.cxtOver = near; if (near) { near.emit({ originalEvent: e, type: 'cxtdragover', position: { x: pos[0], y: pos[1] } }); } } } // Check if we are drag panning the entire graph } else if (r.hoverData.dragging) { preventDefault = true; if (cy.panningEnabled() && cy.userPanningEnabled()) { var deltaP; if (r.hoverData.justStartedPan) { var mdPos = r.hoverData.mdownPos; deltaP = { x: (pos[0] - mdPos[0]) * zoom, y: (pos[1] - mdPos[1]) * zoom }; r.hoverData.justStartedPan = false; } else { deltaP = { x: disp[0] * zoom, y: disp[1] * zoom }; } cy.panBy(deltaP); cy.emit('dragpan'); r.hoverData.dragged = true; } // Needs reproject due to pan changing viewport pos = r.projectIntoViewport(e.clientX, e.clientY); // Checks primary button down & out of time & mouse not moved much } else if (select[4] == 1 && (down == null || down.pannable())) { if (isOverThresholdDrag) { if (!r.hoverData.dragging && cy.boxSelectionEnabled() && (multSelKeyDown || !cy.panningEnabled() || !cy.userPanningEnabled())) { goIntoBoxMode(); } else if (!r.hoverData.selecting && cy.panningEnabled() && cy.userPanningEnabled()) { var allowPassthrough = allowPanningPassthrough(down, r.hoverData.downs); if (allowPassthrough) { r.hoverData.dragging = true; r.hoverData.justStartedPan = true; select[4] = 0; r.data.bgActivePosistion = array2point(mdownPos); r.redrawHint('select', true); r.redraw(); } } if (down && down.pannable() && down.active()) { down.unactivate(); } } } else { if (down && down.pannable() && down.active()) { down.unactivate(); } if ((!down || !down.grabbed()) && near != last) { if (last) { triggerEvents(last, ['mouseout', 'tapdragout'], e, { x: pos[0], y: pos[1] }); } if (near) { triggerEvents(near, ['mouseover', 'tapdragover'], e, { x: pos[0], y: pos[1] }); } r.hoverData.last = near; } if (down) { if (isOverThresholdDrag) { // then we can take action if (cy.boxSelectionEnabled() && multSelKeyDown) { // then selection overrides if (down && down.grabbed()) { freeDraggedElements(draggedElements); down.emit('freeon'); draggedElements.emit('free'); if (r.dragData.didDrag) { down.emit('dragfreeon'); draggedElements.emit('dragfree'); } } goIntoBoxMode(); } else if (down && down.grabbed() && r.nodeIsDraggable(down)) { // drag node var justStartedDrag = !r.dragData.didDrag; if (justStartedDrag) { r.redrawHint('eles', true); } r.dragData.didDrag = true; // indicate that we actually did drag the node // now, add the elements to the drag layer if not done already if (!r.hoverData.draggingEles) { addNodesToDrag(draggedElements, { inDragLayer: true }); } var totalShift = { x: 0, y: 0 }; if (number$1(disp[0]) && number$1(disp[1])) { totalShift.x += disp[0]; totalShift.y += disp[1]; if (justStartedDrag) { var dragDelta = r.hoverData.dragDelta; if (dragDelta && number$1(dragDelta[0]) && number$1(dragDelta[1])) { totalShift.x += dragDelta[0]; totalShift.y += dragDelta[1]; } } } r.hoverData.draggingEles = true; draggedElements.silentShift(totalShift).emit('position drag'); r.redrawHint('drag', true); r.redraw(); } } else { // otherwise save drag delta for when we actually start dragging so the relative grab pos is constant updateDragDelta(); } } // prevent the dragging from triggering text selection on the page preventDefault = true; } select[2] = pos[0]; select[3] = pos[1]; if (preventDefault) { if (e.stopPropagation) e.stopPropagation(); if (e.preventDefault) e.preventDefault(); return false; } }, false); var clickTimeout, didDoubleClick, prevClickTimeStamp; r.registerBinding(window, 'mouseup', function mouseupHandler(e) { // eslint-disable-line no-undef var capture = r.hoverData.capture; if (!capture) { return; } r.hoverData.capture = false; var cy = r.cy; var pos = r.projectIntoViewport(e.clientX, e.clientY); var select = r.selection; var near = r.findNearestElement(pos[0], pos[1], true, false); var draggedElements = r.dragData.possibleDragElements; var down = r.hoverData.down; var multSelKeyDown = isMultSelKeyDown(e); if (r.data.bgActivePosistion) { r.redrawHint('select', true); r.redraw(); } r.hoverData.tapholdCancelled = true; r.data.bgActivePosistion = undefined; // not active bg now if (down) { down.unactivate(); } if (r.hoverData.which === 3) { var cxtEvt = { originalEvent: e, type: 'cxttapend', position: { x: pos[0], y: pos[1] } }; if (down) { down.emit(cxtEvt); } else { cy.emit(cxtEvt); } if (!r.hoverData.cxtDragged) { var cxtTap = { originalEvent: e, type: 'cxttap', position: { x: pos[0], y: pos[1] } }; if (down) { down.emit(cxtTap); } else { cy.emit(cxtTap); } } r.hoverData.cxtDragged = false; r.hoverData.which = null; } else if (r.hoverData.which === 1) { triggerEvents(near, ['mouseup', 'tapend', 'vmouseup'], e, { x: pos[0], y: pos[1] }); if (!r.dragData.didDrag && // didn't move a node around !r.hoverData.dragged && // didn't pan !r.hoverData.selecting && // not box selection !r.hoverData.isOverThresholdDrag // didn't move too much ) { triggerEvents(down, ["click", "tap", "vclick"], e, { x: pos[0], y: pos[1] }); didDoubleClick = false; if (e.timeStamp - prevClickTimeStamp <= cy.multiClickDebounceTime()) { clickTimeout && clearTimeout(clickTimeout); didDoubleClick = true; prevClickTimeStamp = null; triggerEvents(down, ["dblclick", "dbltap", "vdblclick"], e, { x: pos[0], y: pos[1] }); } else { clickTimeout = setTimeout(function () { if (didDoubleClick) return; triggerEvents(down, ["oneclick", "onetap", "voneclick"], e, { x: pos[0], y: pos[1] }); }, cy.multiClickDebounceTime()); prevClickTimeStamp = e.timeStamp; } } // Deselect all elements if nothing is currently under the mouse cursor and we aren't dragging something if (down == null // not mousedown on node && !r.dragData.didDrag // didn't move the node around && !r.hoverData.selecting // not box selection && !r.hoverData.dragged // didn't pan && !isMultSelKeyDown(e)) { cy.$(isSelected).unselect(['tapunselect']); if (draggedElements.length > 0) { r.redrawHint('eles', true); } r.dragData.possibleDragElements = draggedElements = cy.collection(); } // Single selection if (near == down && !r.dragData.didDrag && !r.hoverData.selecting) { if (near != null && near._private.selectable) { if (r.hoverData.dragging) ; else if (cy.selectionType() === 'additive' || multSelKeyDown) { if (near.selected()) { near.unselect(['tapunselect']); } else { near.select(['tapselect']); } } else { if (!multSelKeyDown) { cy.$(isSelected).unmerge(near).unselect(['tapunselect']); near.select(['tapselect']); } } r.redrawHint('eles', true); } } if (r.hoverData.selecting) { var box = cy.collection(r.getAllInBox(select[0], select[1], select[2], select[3])); r.redrawHint('select', true); if (box.length > 0) { r.redrawHint('eles', true); } cy.emit({ type: 'boxend', originalEvent: e, position: { x: pos[0], y: pos[1] } }); var eleWouldBeSelected = function eleWouldBeSelected(ele) { return ele.selectable() && !ele.selected(); }; if (cy.selectionType() === 'additive') { box.emit('box').stdFilter(eleWouldBeSelected).select().emit('boxselect'); } else { if (!multSelKeyDown) { cy.$(isSelected).unmerge(box).unselect(); } box.emit('box').stdFilter(eleWouldBeSelected).select().emit('boxselect'); } // always need redraw in case eles unselectable r.redraw(); } // Cancel drag pan if (r.hoverData.dragging) { r.hoverData.dragging = false; r.redrawHint('select', true); r.redrawHint('eles', true); r.redraw(); } if (!select[4]) { r.redrawHint('drag', true); r.redrawHint('eles', true); var downWasGrabbed = down && down.grabbed(); freeDraggedElements(draggedElements); if (downWasGrabbed) { down.emit('freeon'); draggedElements.emit('free'); if (r.dragData.didDrag) { down.emit('dragfreeon'); draggedElements.emit('dragfree'); } } } } // else not right mouse select[4] = 0; r.hoverData.down = null; r.hoverData.cxtStarted = false; r.hoverData.draggingEles = false; r.hoverData.selecting = false; r.hoverData.isOverThresholdDrag = false; r.dragData.didDrag = false; r.hoverData.dragged = false; r.hoverData.dragDelta = []; r.hoverData.mdownPos = null; r.hoverData.mdownGPos = null; }, false); var wheelHandler = function wheelHandler(e) { if (r.scrollingPage) { return; } // while scrolling, ignore wheel-to-zoom var cy = r.cy; var zoom = cy.zoom(); var pan = cy.pan(); var pos = r.projectIntoViewport(e.clientX, e.clientY); var rpos = [pos[0] * zoom + pan.x, pos[1] * zoom + pan.y]; if (r.hoverData.draggingEles || r.hoverData.dragging || r.hoverData.cxtStarted || inBoxSelection()) { // if pan dragging or cxt dragging, wheel movements make no zoom e.preventDefault(); return; } if (cy.panningEnabled() && cy.userPanningEnabled() && cy.zoomingEnabled() && cy.userZoomingEnabled()) { e.preventDefault(); r.data.wheelZooming = true; clearTimeout(r.data.wheelTimeout); r.data.wheelTimeout = setTimeout(function () { r.data.wheelZooming = false; r.redrawHint('eles', true); r.redraw(); }, 150); var diff; if (e.deltaY != null) { diff = e.deltaY / -250; } else if (e.wheelDeltaY != null) { diff = e.wheelDeltaY / 1000; } else { diff = e.wheelDelta / 1000; } diff = diff * r.wheelSensitivity; var needsWheelFix = e.deltaMode === 1; if (needsWheelFix) { // fixes slow wheel events on ff/linux and ff/windows diff *= 33; } var newZoom = cy.zoom() * Math.pow(10, diff); if (e.type === 'gesturechange') { newZoom = r.gestureStartZoom * e.scale; } cy.zoom({ level: newZoom, renderedPosition: { x: rpos[0], y: rpos[1] } }); cy.emit(e.type === 'gesturechange' ? 'pinchzoom' : 'scrollzoom'); } }; // Functions to help with whether mouse wheel should trigger zooming // -- r.registerBinding(r.container, 'wheel', wheelHandler, true); // disable nonstandard wheel events // r.registerBinding(r.container, 'mousewheel', wheelHandler, true); // r.registerBinding(r.container, 'DOMMouseScroll', wheelHandler, true); // r.registerBinding(r.container, 'MozMousePixelScroll', wheelHandler, true); // older firefox r.registerBinding(window, 'scroll', function scrollHandler(e) { // eslint-disable-line no-unused-vars r.scrollingPage = true; clearTimeout(r.scrollingPageTimeout); r.scrollingPageTimeout = setTimeout(function () { r.scrollingPage = false; }, 250); }, true); // desktop safari pinch to zoom start r.registerBinding(r.container, 'gesturestart', function gestureStartHandler(e) { r.gestureStartZoom = r.cy.zoom(); if (!r.hasTouchStarted) { // don't affect touch devices like iphone e.preventDefault(); } }, true); r.registerBinding(r.container, 'gesturechange', function (e) { if (!r.hasTouchStarted) { // don't affect touch devices like iphone wheelHandler(e); } }, true); // Functions to help with handling mouseout/mouseover on the Cytoscape container // Handle mouseout on Cytoscape container r.registerBinding(r.container, 'mouseout', function mouseOutHandler(e) { var pos = r.projectIntoViewport(e.clientX, e.clientY); r.cy.emit({ originalEvent: e, type: 'mouseout', position: { x: pos[0], y: pos[1] } }); }, false); r.registerBinding(r.container, 'mouseover', function mouseOverHandler(e) { var pos = r.projectIntoViewport(e.clientX, e.clientY); r.cy.emit({ originalEvent: e, type: 'mouseover', position: { x: pos[0], y: pos[1] } }); }, false); var f1x1, f1y1, f2x1, f2y1; // starting points for pinch-to-zoom var distance1, distance1Sq; // initial distance between finger 1 and finger 2 for pinch-to-zoom var center1, modelCenter1; // center point on start pinch to zoom var offsetLeft, offsetTop; var containerWidth, containerHeight; var twoFingersStartInside; var distance = function distance(x1, y1, x2, y2) { return Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1)); }; var distanceSq = function distanceSq(x1, y1, x2, y2) { return (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1); }; var touchstartHandler; r.registerBinding(r.container, 'touchstart', touchstartHandler = function touchstartHandler(e) { r.hasTouchStarted = true; if (!eventInContainer(e)) { return; } blurActiveDomElement(); r.touchData.capture = true; r.data.bgActivePosistion = undefined; var cy = r.cy; var now = r.touchData.now; var earlier = r.touchData.earlier; if (e.touches[0]) { var pos = r.projectIntoViewport(e.touches[0].clientX, e.touches[0].clientY); now[0] = pos[0]; now[1] = pos[1]; } if (e.touches[1]) { var pos = r.projectIntoViewport(e.touches[1].clientX, e.touches[1].clientY); now[2] = pos[0]; now[3] = pos[1]; } if (e.touches[2]) { var pos = r.projectIntoViewport(e.touches[2].clientX, e.touches[2].clientY); now[4] = pos[0]; now[5] = pos[1]; } // record starting points for pinch-to-zoom if (e.touches[1]) { r.touchData.singleTouchMoved = true; freeDraggedElements(r.dragData.touchDragEles); var offsets = r.findContainerClientCoords(); offsetLeft = offsets[0]; offsetTop = offsets[1]; containerWidth = offsets[2]; containerHeight = offsets[3]; f1x1 = e.touches[0].clientX - offsetLeft; f1y1 = e.touches[0].clientY - offsetTop; f2x1 = e.touches[1].clientX - offsetLeft; f2y1 = e.touches[1].clientY - offsetTop; twoFingersStartInside = 0 <= f1x1 && f1x1 <= containerWidth && 0 <= f2x1 && f2x1 <= containerWidth && 0 <= f1y1 && f1y1 <= containerHeight && 0 <= f2y1 && f2y1 <= containerHeight; var pan = cy.pan(); var zoom = cy.zoom(); distance1 = distance(f1x1, f1y1, f2x1, f2y1); distance1Sq = distanceSq(f1x1, f1y1, f2x1, f2y1); center1 = [(f1x1 + f2x1) / 2, (f1y1 + f2y1) / 2]; modelCenter1 = [(center1[0] - pan.x) / zoom, (center1[1] - pan.y) / zoom]; // consider context tap var cxtDistThreshold = 200; var cxtDistThresholdSq = cxtDistThreshold * cxtDistThreshold; if (distance1Sq < cxtDistThresholdSq && !e.touches[2]) { var near1 = r.findNearestElement(now[0], now[1], true, true); var near2 = r.findNearestElement(now[2], now[3], true, true); if (near1 && near1.isNode()) { near1.activate().emit({ originalEvent: e, type: 'cxttapstart', position: { x: now[0], y: now[1] } }); r.touchData.start = near1; } else if (near2 && near2.isNode()) { near2.activate().emit({ originalEvent: e, type: 'cxttapstart', position: { x: now[0], y: now[1] } }); r.touchData.start = near2; } else { cy.emit({ originalEvent: e, type: 'cxttapstart', position: { x: now[0], y: now[1] } }); } if (r.touchData.start) { r.touchData.start._private.grabbed = false; } r.touchData.cxt = true; r.touchData.cxtDragged = false; r.data.bgActivePosistion = undefined; r.redraw(); return; } } if (e.touches[2]) { // ignore // safari on ios pans the page otherwise (normally you should be able to preventdefault on touchmove...) if (cy.boxSelectionEnabled()) { e.preventDefault(); } } else if (e.touches[1]) ; else if (e.touches[0]) { var nears = r.findNearestElements(now[0], now[1], true, true); var near = nears[0]; if (near != null) { near.activate(); r.touchData.start = near; r.touchData.starts = nears; if (r.nodeIsGrabbable(near)) { var draggedEles = r.dragData.touchDragEles = cy.collection(); var selectedNodes = null; r.redrawHint('eles', true); r.redrawHint('drag', true); if (near.selected()) { // reset drag elements, since near will be added again selectedNodes = cy.$(function (ele) { return ele.selected() && r.nodeIsGrabbable(ele); }); addNodesToDrag(selectedNodes, { addToList: draggedEles }); } else { addNodeToDrag(near, { addToList: draggedEles }); } setGrabTarget(near); var makeEvent = function makeEvent(type) { return { originalEvent: e, type: type, position: { x: now[0], y: now[1] } }; }; near.emit(makeEvent('grabon')); if (selectedNodes) { selectedNodes.forEach(function (n) { n.emit(makeEvent('grab')); }); } else { near.emit(makeEvent('grab')); } } } triggerEvents(near, ['touchstart', 'tapstart', 'vmousedown'], e, { x: now[0], y: now[1] }); if (near == null) { r.data.bgActivePosistion = { x: pos[0], y: pos[1] }; r.redrawHint('select', true); r.redraw(); } // Tap, taphold // ----- r.touchData.singleTouchMoved = false; r.touchData.singleTouchStartTime = +new Date(); clearTimeout(r.touchData.tapholdTimeout); r.touchData.tapholdTimeout = setTimeout(function () { if (r.touchData.singleTouchMoved === false && !r.pinching // if pinching, then taphold unselect shouldn't take effect && !r.touchData.selecting // box selection shouldn't allow taphold through ) { triggerEvents(r.touchData.start, ['taphold'], e, { x: now[0], y: now[1] }); } }, r.tapholdDuration); } if (e.touches.length >= 1) { var sPos = r.touchData.startPosition = []; for (var i = 0; i < now.length; i++) { sPos[i] = earlier[i] = now[i]; } var touch0 = e.touches[0]; r.touchData.startGPosition = [touch0.clientX, touch0.clientY]; } }, false); var touchmoveHandler; r.registerBinding(window, 'touchmove', touchmoveHandler = function touchmoveHandler(e) { // eslint-disable-line no-undef var capture = r.touchData.capture; if (!capture && !eventInContainer(e)) { return; } var select = r.selection; var cy = r.cy; var now = r.touchData.now; var earlier = r.touchData.earlier; var zoom = cy.zoom(); if (e.touches[0]) { var pos = r.projectIntoViewport(e.touches[0].clientX, e.touches[0].clientY); now[0] = pos[0]; now[1] = pos[1]; } if (e.touches[1]) { var pos = r.projectIntoViewport(e.touches[1].clientX, e.touches[1].clientY); now[2] = pos[0]; now[3] = pos[1]; } if (e.touches[2]) { var pos = r.projectIntoViewport(e.touches[2].clientX, e.touches[2].clientY); now[4] = pos[0]; now[5] = pos[1]; } var startGPos = r.touchData.startGPosition; var isOverThresholdDrag; if (capture && e.touches[0] && startGPos) { var disp = []; for (var j = 0; j < now.length; j++) { disp[j] = now[j] - earlier[j]; } var dx = e.touches[0].clientX - startGPos[0]; var dx2 = dx * dx; var dy = e.touches[0].clientY - startGPos[1]; var dy2 = dy * dy; var dist2 = dx2 + dy2; isOverThresholdDrag = dist2 >= r.touchTapThreshold2; } // context swipe cancelling if (capture && r.touchData.cxt) { e.preventDefault(); var f1x2 = e.touches[0].clientX - offsetLeft, f1y2 = e.touches[0].clientY - offsetTop; var f2x2 = e.touches[1].clientX - offsetLeft, f2y2 = e.touches[1].clientY - offsetTop; // var distance2 = distance( f1x2, f1y2, f2x2, f2y2 ); var distance2Sq = distanceSq(f1x2, f1y2, f2x2, f2y2); var factorSq = distance2Sq / distance1Sq; var distThreshold = 150; var distThresholdSq = distThreshold * distThreshold; var factorThreshold = 1.5; var factorThresholdSq = factorThreshold * factorThreshold; // cancel ctx gestures if the distance b/t the fingers increases if (factorSq >= factorThresholdSq || distance2Sq >= distThresholdSq) { r.touchData.cxt = false; r.data.bgActivePosistion = undefined; r.redrawHint('select', true); var cxtEvt = { originalEvent: e, type: 'cxttapend', position: { x: now[0], y: now[1] } }; if (r.touchData.start) { r.touchData.start.unactivate().emit(cxtEvt); r.touchData.start = null; } else { cy.emit(cxtEvt); } } } // context swipe if (capture && r.touchData.cxt) { var cxtEvt = { originalEvent: e, type: 'cxtdrag', position: { x: now[0], y: now[1] } }; r.data.bgActivePosistion = undefined; r.redrawHint('select', true); if (r.touchData.start) { r.touchData.start.emit(cxtEvt); } else { cy.emit(cxtEvt); } if (r.touchData.start) { r.touchData.start._private.grabbed = false; } r.touchData.cxtDragged = true; var near = r.findNearestElement(now[0], now[1], true, true); if (!r.touchData.cxtOver || near !== r.touchData.cxtOver) { if (r.touchData.cxtOver) { r.touchData.cxtOver.emit({ originalEvent: e, type: 'cxtdragout', position: { x: now[0], y: now[1] } }); } r.touchData.cxtOver = near; if (near) { near.emit({ originalEvent: e, type: 'cxtdragover', position: { x: now[0], y: now[1] } }); } } // box selection } else if (capture && e.touches[2] && cy.boxSelectionEnabled()) { e.preventDefault(); r.data.bgActivePosistion = undefined; this.lastThreeTouch = +new Date(); if (!r.touchData.selecting) { cy.emit({ originalEvent: e, type: 'boxstart', position: { x: now[0], y: now[1] } }); } r.touchData.selecting = true; r.touchData.didSelect = true; select[4] = 1; if (!select || select.length === 0 || select[0] === undefined) { select[0] = (now[0] + now[2] + now[4]) / 3; select[1] = (now[1] + now[3] + now[5]) / 3; select[2] = (now[0] + now[2] + now[4]) / 3 + 1; select[3] = (now[1] + now[3] + now[5]) / 3 + 1; } else { select[2] = (now[0] + now[2] + now[4]) / 3; select[3] = (now[1] + now[3] + now[5]) / 3; } r.redrawHint('select', true); r.redraw(); // pinch to zoom } else if (capture && e.touches[1] && !r.touchData.didSelect // don't allow box selection to degrade to pinch-to-zoom && cy.zoomingEnabled() && cy.panningEnabled() && cy.userZoomingEnabled() && cy.userPanningEnabled()) { // two fingers => pinch to zoom e.preventDefault(); r.data.bgActivePosistion = undefined; r.redrawHint('select', true); var draggedEles = r.dragData.touchDragEles; if (draggedEles) { r.redrawHint('drag', true); for (var i = 0; i < draggedEles.length; i++) { var de_p = draggedEles[i]._private; de_p.grabbed = false; de_p.rscratch.inDragLayer = false; } } var _start = r.touchData.start; // (x2, y2) for fingers 1 and 2 var f1x2 = e.touches[0].clientX - offsetLeft, f1y2 = e.touches[0].clientY - offsetTop; var f2x2 = e.touches[1].clientX - offsetLeft, f2y2 = e.touches[1].clientY - offsetTop; var distance2 = distance(f1x2, f1y2, f2x2, f2y2); // var distance2Sq = distanceSq( f1x2, f1y2, f2x2, f2y2 ); // var factor = Math.sqrt( distance2Sq ) / Math.sqrt( distance1Sq ); var factor = distance2 / distance1; if (twoFingersStartInside) { // delta finger1 var df1x = f1x2 - f1x1; var df1y = f1y2 - f1y1; // delta finger 2 var df2x = f2x2 - f2x1; var df2y = f2y2 - f2y1; // translation is the normalised vector of the two fingers movement // i.e. so pinching cancels out and moving together pans var tx = (df1x + df2x) / 2; var ty = (df1y + df2y) / 2; // now calculate the zoom var zoom1 = cy.zoom(); var zoom2 = zoom1 * factor; var pan1 = cy.pan(); // the model center point converted to the current rendered pos var ctrx = modelCenter1[0] * zoom1 + pan1.x; var ctry = modelCenter1[1] * zoom1 + pan1.y; var pan2 = { x: -zoom2 / zoom1 * (ctrx - pan1.x - tx) + ctrx, y: -zoom2 / zoom1 * (ctry - pan1.y - ty) + ctry }; // remove dragged eles if (_start && _start.active()) { var draggedEles = r.dragData.touchDragEles; freeDraggedElements(draggedEles); r.redrawHint('drag', true); r.redrawHint('eles', true); _start.unactivate().emit('freeon'); draggedEles.emit('free'); if (r.dragData.didDrag) { _start.emit('dragfreeon'); draggedEles.emit('dragfree'); } } cy.viewport({ zoom: zoom2, pan: pan2, cancelOnFailedZoom: true }); cy.emit('pinchzoom'); distance1 = distance2; f1x1 = f1x2; f1y1 = f1y2; f2x1 = f2x2; f2y1 = f2y2; r.pinching = true; } // Re-project if (e.touches[0]) { var pos = r.projectIntoViewport(e.touches[0].clientX, e.touches[0].clientY); now[0] = pos[0]; now[1] = pos[1]; } if (e.touches[1]) { var pos = r.projectIntoViewport(e.touches[1].clientX, e.touches[1].clientY); now[2] = pos[0]; now[3] = pos[1]; } if (e.touches[2]) { var pos = r.projectIntoViewport(e.touches[2].clientX, e.touches[2].clientY); now[4] = pos[0]; now[5] = pos[1]; } } else if (e.touches[0] && !r.touchData.didSelect // don't allow box selection to degrade to single finger events like panning ) { var start = r.touchData.start; var last = r.touchData.last; var near; if (!r.hoverData.draggingEles && !r.swipePanning) { near = r.findNearestElement(now[0], now[1], true, true); } if (capture && start != null) { e.preventDefault(); } // dragging nodes if (capture && start != null && r.nodeIsDraggable(start)) { if (isOverThresholdDrag) { // then dragging can happen var draggedEles = r.dragData.touchDragEles; var justStartedDrag = !r.dragData.didDrag; if (justStartedDrag) { addNodesToDrag(draggedEles, { inDragLayer: true }); } r.dragData.didDrag = true; var totalShift = { x: 0, y: 0 }; if (number$1(disp[0]) && number$1(disp[1])) { totalShift.x += disp[0]; totalShift.y += disp[1]; if (justStartedDrag) { r.redrawHint('eles', true); var dragDelta = r.touchData.dragDelta; if (dragDelta && number$1(dragDelta[0]) && number$1(dragDelta[1])) { totalShift.x += dragDelta[0]; totalShift.y += dragDelta[1]; } } } r.hoverData.draggingEles = true; draggedEles.silentShift(totalShift).emit('position drag'); r.redrawHint('drag', true); if (r.touchData.startPosition[0] == earlier[0] && r.touchData.startPosition[1] == earlier[1]) { r.redrawHint('eles', true); } r.redraw(); } else { // otherwise keep track of drag delta for later var dragDelta = r.touchData.dragDelta = r.touchData.dragDelta || []; if (dragDelta.length === 0) { dragDelta.push(disp[0]); dragDelta.push(disp[1]); } else { dragDelta[0] += disp[0]; dragDelta[1] += disp[1]; } } } // touchmove { triggerEvents(start || near, ['touchmove', 'tapdrag', 'vmousemove'], e, { x: now[0], y: now[1] }); if ((!start || !start.grabbed()) && near != last) { if (last) { last.emit({ originalEvent: e, type: 'tapdragout', position: { x: now[0], y: now[1] } }); } if (near) { near.emit({ originalEvent: e, type: 'tapdragover', position: { x: now[0], y: now[1] } }); } } r.touchData.last = near; } // check to cancel taphold if (capture) { for (var i = 0; i < now.length; i++) { if (now[i] && r.touchData.startPosition[i] && isOverThresholdDrag) { r.touchData.singleTouchMoved = true; } } } // panning if (capture && (start == null || start.pannable()) && cy.panningEnabled() && cy.userPanningEnabled()) { var allowPassthrough = allowPanningPassthrough(start, r.touchData.starts); if (allowPassthrough) { e.preventDefault(); if (!r.data.bgActivePosistion) { r.data.bgActivePosistion = array2point(r.touchData.startPosition); } if (r.swipePanning) { cy.panBy({ x: disp[0] * zoom, y: disp[1] * zoom }); cy.emit('dragpan'); } else if (isOverThresholdDrag) { r.swipePanning = true; cy.panBy({ x: dx * zoom, y: dy * zoom }); cy.emit('dragpan'); if (start) { start.unactivate(); r.redrawHint('select', true); r.touchData.start = null; } } } // Re-project var pos = r.projectIntoViewport(e.touches[0].clientX, e.touches[0].clientY); now[0] = pos[0]; now[1] = pos[1]; } } for (var j = 0; j < now.length; j++) { earlier[j] = now[j]; } // the active bg indicator should be removed when making a swipe that is neither for dragging nodes or panning if (capture && e.touches.length > 0 && !r.hoverData.draggingEles && !r.swipePanning && r.data.bgActivePosistion != null) { r.data.bgActivePosistion = undefined; r.redrawHint('select', true); r.redraw(); } }, false); var touchcancelHandler; r.registerBinding(window, 'touchcancel', touchcancelHandler = function touchcancelHandler(e) { // eslint-disable-line no-unused-vars var start = r.touchData.start; r.touchData.capture = false; if (start) { start.unactivate(); } }); var touchendHandler, didDoubleTouch, touchTimeout, prevTouchTimeStamp; r.registerBinding(window, 'touchend', touchendHandler = function touchendHandler(e) { // eslint-disable-line no-unused-vars var start = r.touchData.start; var capture = r.touchData.capture; if (capture) { if (e.touches.length === 0) { r.touchData.capture = false; } e.preventDefault(); } else { return; } var select = r.selection; r.swipePanning = false; r.hoverData.draggingEles = false; var cy = r.cy; var zoom = cy.zoom(); var now = r.touchData.now; var earlier = r.touchData.earlier; if (e.touches[0]) { var pos = r.projectIntoViewport(e.touches[0].clientX, e.touches[0].clientY); now[0] = pos[0]; now[1] = pos[1]; } if (e.touches[1]) { var pos = r.projectIntoViewport(e.touches[1].clientX, e.touches[1].clientY); now[2] = pos[0]; now[3] = pos[1]; } if (e.touches[2]) { var pos = r.projectIntoViewport(e.touches[2].clientX, e.touches[2].clientY); now[4] = pos[0]; now[5] = pos[1]; } if (start) { start.unactivate(); } var ctxTapend; if (r.touchData.cxt) { ctxTapend = { originalEvent: e, type: 'cxttapend', position: { x: now[0], y: now[1] } }; if (start) { start.emit(ctxTapend); } else { cy.emit(ctxTapend); } if (!r.touchData.cxtDragged) { var ctxTap = { originalEvent: e, type: 'cxttap', position: { x: now[0], y: now[1] } }; if (start) { start.emit(ctxTap); } else { cy.emit(ctxTap); } } if (r.touchData.start) { r.touchData.start._private.grabbed = false; } r.touchData.cxt = false; r.touchData.start = null; r.redraw(); return; } // no more box selection if we don't have three fingers if (!e.touches[2] && cy.boxSelectionEnabled() && r.touchData.selecting) { r.touchData.selecting = false; var box = cy.collection(r.getAllInBox(select[0], select[1], select[2], select[3])); select[0] = undefined; select[1] = undefined; select[2] = undefined; select[3] = undefined; select[4] = 0; r.redrawHint('select', true); cy.emit({ type: 'boxend', originalEvent: e, position: { x: now[0], y: now[1] } }); var eleWouldBeSelected = function eleWouldBeSelected(ele) { return ele.selectable() && !ele.selected(); }; box.emit('box').stdFilter(eleWouldBeSelected).select().emit('boxselect'); if (box.nonempty()) { r.redrawHint('eles', true); } r.redraw(); } if (start != null) { start.unactivate(); } if (e.touches[2]) { r.data.bgActivePosistion = undefined; r.redrawHint('select', true); } else if (e.touches[1]) ; else if (e.touches[0]) ; else if (!e.touches[0]) { r.data.bgActivePosistion = undefined; r.redrawHint('select', true); var draggedEles = r.dragData.touchDragEles; if (start != null) { var startWasGrabbed = start._private.grabbed; freeDraggedElements(draggedEles); r.redrawHint('drag', true); r.redrawHint('eles', true); if (startWasGrabbed) { start.emit('freeon'); draggedEles.emit('free'); if (r.dragData.didDrag) { start.emit('dragfreeon'); draggedEles.emit('dragfree'); } } triggerEvents(start, ['touchend', 'tapend', 'vmouseup', 'tapdragout'], e, { x: now[0], y: now[1] }); start.unactivate(); r.touchData.start = null; } else { var near = r.findNearestElement(now[0], now[1], true, true); triggerEvents(near, ['touchend', 'tapend', 'vmouseup', 'tapdragout'], e, { x: now[0], y: now[1] }); } var dx = r.touchData.startPosition[0] - now[0]; var dx2 = dx * dx; var dy = r.touchData.startPosition[1] - now[1]; var dy2 = dy * dy; var dist2 = dx2 + dy2; var rdist2 = dist2 * zoom * zoom; // Tap event, roughly same as mouse click event for touch if (!r.touchData.singleTouchMoved) { if (!start) { cy.$(':selected').unselect(['tapunselect']); } triggerEvents(start, ['tap', 'vclick'], e, { x: now[0], y: now[1] }); didDoubleTouch = false; if (e.timeStamp - prevTouchTimeStamp <= cy.multiClickDebounceTime()) { touchTimeout && clearTimeout(touchTimeout); didDoubleTouch = true; prevTouchTimeStamp = null; triggerEvents(start, ['dbltap', 'vdblclick'], e, { x: now[0], y: now[1] }); } else { touchTimeout = setTimeout(function () { if (didDoubleTouch) return; triggerEvents(start, ['onetap', 'voneclick'], e, { x: now[0], y: now[1] }); }, cy.multiClickDebounceTime()); prevTouchTimeStamp = e.timeStamp; } } // Prepare to select the currently touched node, only if it hasn't been dragged past a certain distance if (start != null && !r.dragData.didDrag // didn't drag nodes around && start._private.selectable && rdist2 < r.touchTapThreshold2 && !r.pinching // pinch to zoom should not affect selection ) { if (cy.selectionType() === 'single') { cy.$(isSelected).unmerge(start).unselect(['tapunselect']); start.select(['tapselect']); } else { if (start.selected()) { start.unselect(['tapunselect']); } else { start.select(['tapselect']); } } r.redrawHint('eles', true); } r.touchData.singleTouchMoved = true; } for (var j = 0; j < now.length; j++) { earlier[j] = now[j]; } r.dragData.didDrag = false; // reset for next touchstart if (e.touches.length === 0) { r.touchData.dragDelta = []; r.touchData.startPosition = null; r.touchData.startGPosition = null; r.touchData.didSelect = false; } if (e.touches.length < 2) { if (e.touches.length === 1) { // the old start global pos'n may not be the same finger that remains r.touchData.startGPosition = [e.touches[0].clientX, e.touches[0].clientY]; } r.pinching = false; r.redrawHint('eles', true); r.redraw(); } //r.redraw(); }, false); // fallback compatibility layer for ms pointer events if (typeof TouchEvent === 'undefined') { var pointers = []; var makeTouch = function makeTouch(e) { return { clientX: e.clientX, clientY: e.clientY, force: 1, identifier: e.pointerId, pageX: e.pageX, pageY: e.pageY, radiusX: e.width / 2, radiusY: e.height / 2, screenX: e.screenX, screenY: e.screenY, target: e.target }; }; var makePointer = function makePointer(e) { return { event: e, touch: makeTouch(e) }; }; var addPointer = function addPointer(e) { pointers.push(makePointer(e)); }; var removePointer = function removePointer(e) { for (var i = 0; i < pointers.length; i++) { var p = pointers[i]; if (p.event.pointerId === e.pointerId) { pointers.splice(i, 1); return; } } }; var updatePointer = function updatePointer(e) { var p = pointers.filter(function (p) { return p.event.pointerId === e.pointerId; })[0]; p.event = e; p.touch = makeTouch(e); }; var addTouchesToEvent = function addTouchesToEvent(e) { e.touches = pointers.map(function (p) { return p.touch; }); }; var pointerIsMouse = function pointerIsMouse(e) { return e.pointerType === 'mouse' || e.pointerType === 4; }; r.registerBinding(r.container, 'pointerdown', function (e) { if (pointerIsMouse(e)) { return; } // mouse already handled e.preventDefault(); addPointer(e); addTouchesToEvent(e); touchstartHandler(e); }); r.registerBinding(r.container, 'pointerup', function (e) { if (pointerIsMouse(e)) { return; } // mouse already handled removePointer(e); addTouchesToEvent(e); touchendHandler(e); }); r.registerBinding(r.container, 'pointercancel', function (e) { if (pointerIsMouse(e)) { return; } // mouse already handled removePointer(e); addTouchesToEvent(e); touchcancelHandler(e); }); r.registerBinding(r.container, 'pointermove', function (e) { if (pointerIsMouse(e)) { return; } // mouse already handled e.preventDefault(); updatePointer(e); addTouchesToEvent(e); touchmoveHandler(e); }); } }; var BRp$2 = {}; BRp$2.generatePolygon = function (name, points) { return this.nodeShapes[name] = { renderer: this, name: name, points: points, draw: function draw(context, centerX, centerY, width, height) { this.renderer.nodeShapeImpl('polygon', context, centerX, centerY, width, height, this.points); }, intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding) { return polygonIntersectLine(x, y, this.points, nodeX, nodeY, width / 2, height / 2, padding); }, checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY) { return pointInsidePolygon(x, y, this.points, centerX, centerY, width, height, [0, -1], padding); } }; }; BRp$2.generateEllipse = function () { return this.nodeShapes['ellipse'] = { renderer: this, name: 'ellipse', draw: function draw(context, centerX, centerY, width, height) { this.renderer.nodeShapeImpl(this.name, context, centerX, centerY, width, height); }, intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding) { return intersectLineEllipse(x, y, nodeX, nodeY, width / 2 + padding, height / 2 + padding); }, checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY) { return checkInEllipse(x, y, width, height, centerX, centerY, padding); } }; }; BRp$2.generateRoundPolygon = function (name, points) { // Pre-compute control points // Since these points depend on the radius length (which in turns depend on the width/height of the node) we will only pre-compute // the unit vectors. // For simplicity the layout will be: // [ p0, UnitVectorP0P1, p1, UniVectorP1P2, ..., pn, UnitVectorPnP0 ] var allPoints = new Array(points.length * 2); for (var i = 0; i < points.length / 2; i++) { var sourceIndex = i * 2; var destIndex = void 0; if (i < points.length / 2 - 1) { destIndex = (i + 1) * 2; } else { destIndex = 0; } allPoints[i * 4] = points[sourceIndex]; allPoints[i * 4 + 1] = points[sourceIndex + 1]; var xDest = points[destIndex] - points[sourceIndex]; var yDest = points[destIndex + 1] - points[sourceIndex + 1]; var norm = Math.sqrt(xDest * xDest + yDest * yDest); allPoints[i * 4 + 2] = xDest / norm; allPoints[i * 4 + 3] = yDest / norm; } return this.nodeShapes[name] = { renderer: this, name: name, points: allPoints, draw: function draw(context, centerX, centerY, width, height) { this.renderer.nodeShapeImpl('round-polygon', context, centerX, centerY, width, height, this.points); }, intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding) { return roundPolygonIntersectLine(x, y, this.points, nodeX, nodeY, width, height); }, checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY) { return pointInsideRoundPolygon(x, y, this.points, centerX, centerY, width, height); } }; }; BRp$2.generateRoundRectangle = function () { return this.nodeShapes['round-rectangle'] = this.nodeShapes['roundrectangle'] = { renderer: this, name: 'round-rectangle', points: generateUnitNgonPointsFitToSquare(4, 0), draw: function draw(context, centerX, centerY, width, height) { this.renderer.nodeShapeImpl(this.name, context, centerX, centerY, width, height); }, intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding) { return roundRectangleIntersectLine(x, y, nodeX, nodeY, width, height, padding); }, checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY) { var cornerRadius = getRoundRectangleRadius(width, height); var diam = cornerRadius * 2; // Check hBox if (pointInsidePolygon(x, y, this.points, centerX, centerY, width, height - diam, [0, -1], padding)) { return true; } // Check vBox if (pointInsidePolygon(x, y, this.points, centerX, centerY, width - diam, height, [0, -1], padding)) { return true; } // Check top left quarter circle if (checkInEllipse(x, y, diam, diam, centerX - width / 2 + cornerRadius, centerY - height / 2 + cornerRadius, padding)) { return true; } // Check top right quarter circle if (checkInEllipse(x, y, diam, diam, centerX + width / 2 - cornerRadius, centerY - height / 2 + cornerRadius, padding)) { return true; } // Check bottom right quarter circle if (checkInEllipse(x, y, diam, diam, centerX + width / 2 - cornerRadius, centerY + height / 2 - cornerRadius, padding)) { return true; } // Check bottom left quarter circle if (checkInEllipse(x, y, diam, diam, centerX - width / 2 + cornerRadius, centerY + height / 2 - cornerRadius, padding)) { return true; } return false; } }; }; BRp$2.generateCutRectangle = function () { return this.nodeShapes['cut-rectangle'] = this.nodeShapes['cutrectangle'] = { renderer: this, name: 'cut-rectangle', cornerLength: getCutRectangleCornerLength(), points: generateUnitNgonPointsFitToSquare(4, 0), draw: function draw(context, centerX, centerY, width, height) { this.renderer.nodeShapeImpl(this.name, context, centerX, centerY, width, height); }, generateCutTrianglePts: function generateCutTrianglePts(width, height, centerX, centerY) { var cl = this.cornerLength; var hh = height / 2; var hw = width / 2; var xBegin = centerX - hw; var xEnd = centerX + hw; var yBegin = centerY - hh; var yEnd = centerY + hh; // points are in clockwise order, inner (imaginary) triangle pt on [4, 5] return { topLeft: [xBegin, yBegin + cl, xBegin + cl, yBegin, xBegin + cl, yBegin + cl], topRight: [xEnd - cl, yBegin, xEnd, yBegin + cl, xEnd - cl, yBegin + cl], bottomRight: [xEnd, yEnd - cl, xEnd - cl, yEnd, xEnd - cl, yEnd - cl], bottomLeft: [xBegin + cl, yEnd, xBegin, yEnd - cl, xBegin + cl, yEnd - cl] }; }, intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding) { var cPts = this.generateCutTrianglePts(width + 2 * padding, height + 2 * padding, nodeX, nodeY); var pts = [].concat.apply([], [cPts.topLeft.splice(0, 4), cPts.topRight.splice(0, 4), cPts.bottomRight.splice(0, 4), cPts.bottomLeft.splice(0, 4)]); return polygonIntersectLine(x, y, pts, nodeX, nodeY); }, checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY) { // Check hBox if (pointInsidePolygon(x, y, this.points, centerX, centerY, width, height - 2 * this.cornerLength, [0, -1], padding)) { return true; } // Check vBox if (pointInsidePolygon(x, y, this.points, centerX, centerY, width - 2 * this.cornerLength, height, [0, -1], padding)) { return true; } var cutTrianglePts = this.generateCutTrianglePts(width, height, centerX, centerY); return pointInsidePolygonPoints(x, y, cutTrianglePts.topLeft) || pointInsidePolygonPoints(x, y, cutTrianglePts.topRight) || pointInsidePolygonPoints(x, y, cutTrianglePts.bottomRight) || pointInsidePolygonPoints(x, y, cutTrianglePts.bottomLeft); } }; }; BRp$2.generateBarrel = function () { return this.nodeShapes['barrel'] = { renderer: this, name: 'barrel', points: generateUnitNgonPointsFitToSquare(4, 0), draw: function draw(context, centerX, centerY, width, height) { this.renderer.nodeShapeImpl(this.name, context, centerX, centerY, width, height); }, intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding) { // use two fixed t values for the bezier curve approximation var t0 = 0.15; var t1 = 0.5; var t2 = 0.85; var bPts = this.generateBarrelBezierPts(width + 2 * padding, height + 2 * padding, nodeX, nodeY); var approximateBarrelCurvePts = function approximateBarrelCurvePts(pts) { // approximate curve pts based on the two t values var m0 = qbezierPtAt({ x: pts[0], y: pts[1] }, { x: pts[2], y: pts[3] }, { x: pts[4], y: pts[5] }, t0); var m1 = qbezierPtAt({ x: pts[0], y: pts[1] }, { x: pts[2], y: pts[3] }, { x: pts[4], y: pts[5] }, t1); var m2 = qbezierPtAt({ x: pts[0], y: pts[1] }, { x: pts[2], y: pts[3] }, { x: pts[4], y: pts[5] }, t2); return [pts[0], pts[1], m0.x, m0.y, m1.x, m1.y, m2.x, m2.y, pts[4], pts[5]]; }; var pts = [].concat(approximateBarrelCurvePts(bPts.topLeft), approximateBarrelCurvePts(bPts.topRight), approximateBarrelCurvePts(bPts.bottomRight), approximateBarrelCurvePts(bPts.bottomLeft)); return polygonIntersectLine(x, y, pts, nodeX, nodeY); }, generateBarrelBezierPts: function generateBarrelBezierPts(width, height, centerX, centerY) { var hh = height / 2; var hw = width / 2; var xBegin = centerX - hw; var xEnd = centerX + hw; var yBegin = centerY - hh; var yEnd = centerY + hh; var curveConstants = getBarrelCurveConstants(width, height); var hOffset = curveConstants.heightOffset; var wOffset = curveConstants.widthOffset; var ctrlPtXOffset = curveConstants.ctrlPtOffsetPct * width; // points are in clockwise order, inner (imaginary) control pt on [4, 5] var pts = { topLeft: [xBegin, yBegin + hOffset, xBegin + ctrlPtXOffset, yBegin, xBegin + wOffset, yBegin], topRight: [xEnd - wOffset, yBegin, xEnd - ctrlPtXOffset, yBegin, xEnd, yBegin + hOffset], bottomRight: [xEnd, yEnd - hOffset, xEnd - ctrlPtXOffset, yEnd, xEnd - wOffset, yEnd], bottomLeft: [xBegin + wOffset, yEnd, xBegin + ctrlPtXOffset, yEnd, xBegin, yEnd - hOffset] }; pts.topLeft.isTop = true; pts.topRight.isTop = true; pts.bottomLeft.isBottom = true; pts.bottomRight.isBottom = true; return pts; }, checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY) { var curveConstants = getBarrelCurveConstants(width, height); var hOffset = curveConstants.heightOffset; var wOffset = curveConstants.widthOffset; // Check hBox if (pointInsidePolygon(x, y, this.points, centerX, centerY, width, height - 2 * hOffset, [0, -1], padding)) { return true; } // Check vBox if (pointInsidePolygon(x, y, this.points, centerX, centerY, width - 2 * wOffset, height, [0, -1], padding)) { return true; } var barrelCurvePts = this.generateBarrelBezierPts(width, height, centerX, centerY); var getCurveT = function getCurveT(x, y, curvePts) { var x0 = curvePts[4]; var x1 = curvePts[2]; var x2 = curvePts[0]; var y0 = curvePts[5]; // var y1 = curvePts[ 3 ]; var y2 = curvePts[1]; var xMin = Math.min(x0, x2); var xMax = Math.max(x0, x2); var yMin = Math.min(y0, y2); var yMax = Math.max(y0, y2); if (xMin <= x && x <= xMax && yMin <= y && y <= yMax) { var coeff = bezierPtsToQuadCoeff(x0, x1, x2); var roots = solveQuadratic(coeff[0], coeff[1], coeff[2], x); var validRoots = roots.filter(function (r) { return 0 <= r && r <= 1; }); if (validRoots.length > 0) { return validRoots[0]; } } return null; }; var curveRegions = Object.keys(barrelCurvePts); for (var i = 0; i < curveRegions.length; i++) { var corner = curveRegions[i]; var cornerPts = barrelCurvePts[corner]; var t = getCurveT(x, y, cornerPts); if (t == null) { continue; } var y0 = cornerPts[5]; var y1 = cornerPts[3]; var y2 = cornerPts[1]; var bezY = qbezierAt(y0, y1, y2, t); if (cornerPts.isTop && bezY <= y) { return true; } if (cornerPts.isBottom && y <= bezY) { return true; } } return false; } }; }; BRp$2.generateBottomRoundrectangle = function () { return this.nodeShapes['bottom-round-rectangle'] = this.nodeShapes['bottomroundrectangle'] = { renderer: this, name: 'bottom-round-rectangle', points: generateUnitNgonPointsFitToSquare(4, 0), draw: function draw(context, centerX, centerY, width, height) { this.renderer.nodeShapeImpl(this.name, context, centerX, centerY, width, height); }, intersectLine: function intersectLine(nodeX, nodeY, width, height, x, y, padding) { var topStartX = nodeX - (width / 2 + padding); var topStartY = nodeY - (height / 2 + padding); var topEndY = topStartY; var topEndX = nodeX + (width / 2 + padding); var topIntersections = finiteLinesIntersect(x, y, nodeX, nodeY, topStartX, topStartY, topEndX, topEndY, false); if (topIntersections.length > 0) { return topIntersections; } return roundRectangleIntersectLine(x, y, nodeX, nodeY, width, height, padding); }, checkPoint: function checkPoint(x, y, padding, width, height, centerX, centerY) { var cornerRadius = getRoundRectangleRadius(width, height); var diam = 2 * cornerRadius; // Check hBox if (pointInsidePolygon(x, y, this.points, centerX, centerY, width, height - diam, [0, -1], padding)) { return true; } // Check vBox if (pointInsidePolygon(x, y, this.points, centerX, centerY, width - diam, height, [0, -1], padding)) { return true; } // check non-rounded top side var outerWidth = width / 2 + 2 * padding; var outerHeight = height / 2 + 2 * padding; var points = [centerX - outerWidth, centerY - outerHeight, centerX - outerWidth, centerY, centerX + outerWidth, centerY, centerX + outerWidth, centerY - outerHeight]; if (pointInsidePolygonPoints(x, y, points)) { return true; } // Check bottom right quarter circle if (checkInEllipse(x, y, diam, diam, centerX + width / 2 - cornerRadius, centerY + height / 2 - cornerRadius, padding)) { return true; } // Check bottom left quarter circle if (checkInEllipse(x, y, diam, diam, centerX - width / 2 + cornerRadius, centerY + height / 2 - cornerRadius, padding)) { return true; } return false; } }; }; BRp$2.registerNodeShapes = function () { var nodeShapes = this.nodeShapes = {}; var renderer = this; this.generateEllipse(); this.generatePolygon('triangle', generateUnitNgonPointsFitToSquare(3, 0)); this.generateRoundPolygon('round-triangle', generateUnitNgonPointsFitToSquare(3, 0)); this.generatePolygon('rectangle', generateUnitNgonPointsFitToSquare(4, 0)); nodeShapes['square'] = nodeShapes['rectangle']; this.generateRoundRectangle(); this.generateCutRectangle(); this.generateBarrel(); this.generateBottomRoundrectangle(); { var diamondPoints = [0, 1, 1, 0, 0, -1, -1, 0]; this.generatePolygon('diamond', diamondPoints); this.generateRoundPolygon('round-diamond', diamondPoints); } this.generatePolygon('pentagon', generateUnitNgonPointsFitToSquare(5, 0)); this.generateRoundPolygon('round-pentagon', generateUnitNgonPointsFitToSquare(5, 0)); this.generatePolygon('hexagon', generateUnitNgonPointsFitToSquare(6, 0)); this.generateRoundPolygon('round-hexagon', generateUnitNgonPointsFitToSquare(6, 0)); this.generatePolygon('heptagon', generateUnitNgonPointsFitToSquare(7, 0)); this.generateRoundPolygon('round-heptagon', generateUnitNgonPointsFitToSquare(7, 0)); this.generatePolygon('octagon', generateUnitNgonPointsFitToSquare(8, 0)); this.generateRoundPolygon('round-octagon', generateUnitNgonPointsFitToSquare(8, 0)); var star5Points = new Array(20); { var outerPoints = generateUnitNgonPoints(5, 0); var innerPoints = generateUnitNgonPoints(5, Math.PI / 5); // Outer radius is 1; inner radius of star is smaller var innerRadius = 0.5 * (3 - Math.sqrt(5)); innerRadius *= 1.57; for (var i = 0; i < innerPoints.length / 2; i++) { innerPoints[i * 2] *= innerRadius; innerPoints[i * 2 + 1] *= innerRadius; } for (var i = 0; i < 20 / 4; i++) { star5Points[i * 4] = outerPoints[i * 2]; star5Points[i * 4 + 1] = outerPoints[i * 2 + 1]; star5Points[i * 4 + 2] = innerPoints[i * 2]; star5Points[i * 4 + 3] = innerPoints[i * 2 + 1]; } } star5Points = fitPolygonToSquare(star5Points); this.generatePolygon('star', star5Points); this.generatePolygon('vee', [-1, -1, 0, -0.333, 1, -1, 0, 1]); this.generatePolygon('rhomboid', [-1, -1, 0.333, -1, 1, 1, -0.333, 1]); this.generatePolygon('right-rhomboid', [-0.333, -1, 1, -1, 0.333, 1, -1, 1]); this.nodeShapes['concavehexagon'] = this.generatePolygon('concave-hexagon', [-1, -0.95, -0.75, 0, -1, 0.95, 1, 0.95, 0.75, 0, 1, -0.95]); { var tagPoints = [-1, -1, 0.25, -1, 1, 0, 0.25, 1, -1, 1]; this.generatePolygon('tag', tagPoints); this.generateRoundPolygon('round-tag', tagPoints); } nodeShapes.makePolygon = function (points) { // use caching on user-specified polygons so they are as fast as native shapes var key = points.join('$'); var name = 'polygon-' + key; var shape; if (shape = this[name]) { // got cached shape return shape; } // create and cache new shape return renderer.generatePolygon(name, points); }; }; var BRp$1 = {}; BRp$1.timeToRender = function () { return this.redrawTotalTime / this.redrawCount; }; BRp$1.redraw = function (options) { options = options || staticEmptyObject(); var r = this; if (r.averageRedrawTime === undefined) { r.averageRedrawTime = 0; } if (r.lastRedrawTime === undefined) { r.lastRedrawTime = 0; } if (r.lastDrawTime === undefined) { r.lastDrawTime = 0; } r.requestedFrame = true; r.renderOptions = options; }; BRp$1.beforeRender = function (fn, priority) { // the renderer can't add tick callbacks when destroyed if (this.destroyed) { return; } if (priority == null) { error('Priority is not optional for beforeRender'); } var cbs = this.beforeRenderCallbacks; cbs.push({ fn: fn, priority: priority }); // higher priority callbacks executed first cbs.sort(function (a, b) { return b.priority - a.priority; }); }; var beforeRenderCallbacks = function beforeRenderCallbacks(r, willDraw, startTime) { var cbs = r.beforeRenderCallbacks; for (var i = 0; i < cbs.length; i++) { cbs[i].fn(willDraw, startTime); } }; BRp$1.startRenderLoop = function () { var r = this; var cy = r.cy; if (r.renderLoopStarted) { return; } else { r.renderLoopStarted = true; } var renderFn = function renderFn(requestTime) { if (r.destroyed) { return; } if (cy.batching()) ; else if (r.requestedFrame && !r.skipFrame) { beforeRenderCallbacks(r, true, requestTime); var startTime = performanceNow(); r.render(r.renderOptions); var endTime = r.lastDrawTime = performanceNow(); if (r.averageRedrawTime === undefined) { r.averageRedrawTime = endTime - startTime; } if (r.redrawCount === undefined) { r.redrawCount = 0; } r.redrawCount++; if (r.redrawTotalTime === undefined) { r.redrawTotalTime = 0; } var duration = endTime - startTime; r.redrawTotalTime += duration; r.lastRedrawTime = duration; // use a weighted average with a bias from the previous average so we don't spike so easily r.averageRedrawTime = r.averageRedrawTime / 2 + duration / 2; r.requestedFrame = false; } else { beforeRenderCallbacks(r, false, requestTime); } r.skipFrame = false; requestAnimationFrame(renderFn); }; requestAnimationFrame(renderFn); }; var BaseRenderer = function BaseRenderer(options) { this.init(options); }; var BR = BaseRenderer; var BRp = BR.prototype; BRp.clientFunctions = ['redrawHint', 'render', 'renderTo', 'matchCanvasSize', 'nodeShapeImpl', 'arrowShapeImpl']; BRp.init = function (options) { var r = this; r.options = options; r.cy = options.cy; var ctr = r.container = options.cy.container(); // prepend a stylesheet in the head such that if (window$1) { var document = window$1.document; var head = document.head; var stylesheetId = '__________cytoscape_stylesheet'; var className = '__________cytoscape_container'; var stylesheetAlreadyExists = document.getElementById(stylesheetId) != null; if (ctr.className.indexOf(className) < 0) { ctr.className = (ctr.className || '') + ' ' + className; } if (!stylesheetAlreadyExists) { var stylesheet = document.createElement('style'); stylesheet.id = stylesheetId; stylesheet.textContent = '.' + className + ' { position: relative; }'; head.insertBefore(stylesheet, head.children[0]); // first so lowest priority } var computedStyle = window$1.getComputedStyle(ctr); var position = computedStyle.getPropertyValue('position'); if (position === 'static') { warn('A Cytoscape container has style position:static and so can not use UI extensions properly'); } } r.selection = [undefined, undefined, undefined, undefined, 0]; // Coordinates for selection box, plus enabled flag r.bezierProjPcts = [0.05, 0.225, 0.4, 0.5, 0.6, 0.775, 0.95]; //--Pointer-related data r.hoverData = { down: null, last: null, downTime: null, triggerMode: null, dragging: false, initialPan: [null, null], capture: false }; r.dragData = { possibleDragElements: [] }; r.touchData = { start: null, capture: false, // These 3 fields related to tap, taphold events startPosition: [null, null, null, null, null, null], singleTouchStartTime: null, singleTouchMoved: true, now: [null, null, null, null, null, null], earlier: [null, null, null, null, null, null] }; r.redraws = 0; r.showFps = options.showFps; r.debug = options.debug; r.hideEdgesOnViewport = options.hideEdgesOnViewport; r.textureOnViewport = options.textureOnViewport; r.wheelSensitivity = options.wheelSensitivity; r.motionBlurEnabled = options.motionBlur; // on by default r.forcedPixelRatio = number$1(options.pixelRatio) ? options.pixelRatio : null; r.motionBlur = options.motionBlur; // for initial kick off r.motionBlurOpacity = options.motionBlurOpacity; r.motionBlurTransparency = 1 - r.motionBlurOpacity; r.motionBlurPxRatio = 1; r.mbPxRBlurry = 1; //0.8; r.minMbLowQualFrames = 4; r.fullQualityMb = false; r.clearedForMotionBlur = []; r.desktopTapThreshold = options.desktopTapThreshold; r.desktopTapThreshold2 = options.desktopTapThreshold * options.desktopTapThreshold; r.touchTapThreshold = options.touchTapThreshold; r.touchTapThreshold2 = options.touchTapThreshold * options.touchTapThreshold; r.tapholdDuration = 500; r.bindings = []; r.beforeRenderCallbacks = []; r.beforeRenderPriorities = { // higher priority execs before lower one animations: 400, eleCalcs: 300, eleTxrDeq: 200, lyrTxrDeq: 150, lyrTxrSkip: 100 }; r.registerNodeShapes(); r.registerArrowShapes(); r.registerCalculationListeners(); }; BRp.notify = function (eventName, eles) { var r = this; var cy = r.cy; // the renderer can't be notified after it's destroyed if (this.destroyed) { return; } if (eventName === 'init') { r.load(); return; } if (eventName === 'destroy') { r.destroy(); return; } if (eventName === 'add' || eventName === 'remove' || eventName === 'move' && cy.hasCompoundNodes() || eventName === 'load' || eventName === 'zorder' || eventName === 'mount') { r.invalidateCachedZSortedEles(); } if (eventName === 'viewport') { r.redrawHint('select', true); } if (eventName === 'load' || eventName === 'resize' || eventName === 'mount') { r.invalidateContainerClientCoordsCache(); r.matchCanvasSize(r.container); } r.redrawHint('eles', true); r.redrawHint('drag', true); this.startRenderLoop(); this.redraw(); }; BRp.destroy = function () { var r = this; r.destroyed = true; r.cy.stopAnimationLoop(); for (var i = 0; i < r.bindings.length; i++) { var binding = r.bindings[i]; var b = binding; var tgt = b.target; (tgt.off || tgt.removeEventListener).apply(tgt, b.args); } r.bindings = []; r.beforeRenderCallbacks = []; r.onUpdateEleCalcsFns = []; if (r.removeObserver) { r.removeObserver.disconnect(); } if (r.styleObserver) { r.styleObserver.disconnect(); } if (r.resizeObserver) { r.resizeObserver.disconnect(); } if (r.labelCalcDiv) { try { document.body.removeChild(r.labelCalcDiv); // eslint-disable-line no-undef } catch (e) {// ie10 issue #1014 } } }; BRp.isHeadless = function () { return false; }; [BRp$f, BRp$5, BRp$4, BRp$3, BRp$2, BRp$1].forEach(function (props) { extend(BRp, props); }); var fullFpsTime = 1000 / 60; // assume 60 frames per second var defs = { setupDequeueing: function setupDequeueing(opts) { return function setupDequeueingImpl() { var self = this; var r = this.renderer; if (self.dequeueingSetup) { return; } else { self.dequeueingSetup = true; } var queueRedraw = debounce__default["default"](function () { r.redrawHint('eles', true); r.redrawHint('drag', true); r.redraw(); }, opts.deqRedrawThreshold); var dequeue = function dequeue(willDraw, frameStartTime) { var startTime = performanceNow(); var avgRenderTime = r.averageRedrawTime; var renderTime = r.lastRedrawTime; var deqd = []; var extent = r.cy.extent(); var pixelRatio = r.getPixelRatio(); // if we aren't in a tick that causes a draw, then the rendered style // queue won't automatically be flushed before dequeueing starts if (!willDraw) { r.flushRenderedStyleQueue(); } while (true) { // eslint-disable-line no-constant-condition var now = performanceNow(); var duration = now - startTime; var frameDuration = now - frameStartTime; if (renderTime < fullFpsTime) { // if we're rendering faster than the ideal fps, then do dequeueing // during all of the remaining frame time var timeAvailable = fullFpsTime - (willDraw ? avgRenderTime : 0); if (frameDuration >= opts.deqFastCost * timeAvailable) { break; } } else { if (willDraw) { if (duration >= opts.deqCost * renderTime || duration >= opts.deqAvgCost * avgRenderTime) { break; } } else if (frameDuration >= opts.deqNoDrawCost * fullFpsTime) { break; } } var thisDeqd = opts.deq(self, pixelRatio, extent); if (thisDeqd.length > 0) { for (var i = 0; i < thisDeqd.length; i++) { deqd.push(thisDeqd[i]); } } else { break; } } // callbacks on dequeue if (deqd.length > 0) { opts.onDeqd(self, deqd); if (!willDraw && opts.shouldRedraw(self, deqd, pixelRatio, extent)) { queueRedraw(); } } }; var priority = opts.priority || noop$1; r.beforeRender(dequeue, priority(self)); }; } }; // Uses keys so elements may share the same cache. var ElementTextureCacheLookup = /*#__PURE__*/function () { function ElementTextureCacheLookup(getKey) { var doesEleInvalidateKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : falsify; _classCallCheck(this, ElementTextureCacheLookup); this.idsByKey = new Map$1(); this.keyForId = new Map$1(); this.cachesByLvl = new Map$1(); this.lvls = []; this.getKey = getKey; this.doesEleInvalidateKey = doesEleInvalidateKey; } _createClass(ElementTextureCacheLookup, [{ key: "getIdsFor", value: function getIdsFor(key) { if (key == null) { error("Can not get id list for null key"); } var idsByKey = this.idsByKey; var ids = this.idsByKey.get(key); if (!ids) { ids = new Set$1(); idsByKey.set(key, ids); } return ids; } }, { key: "addIdForKey", value: function addIdForKey(key, id) { if (key != null) { this.getIdsFor(key).add(id); } } }, { key: "deleteIdForKey", value: function deleteIdForKey(key, id) { if (key != null) { this.getIdsFor(key)["delete"](id); } } }, { key: "getNumberOfIdsForKey", value: function getNumberOfIdsForKey(key) { if (key == null) { return 0; } else { return this.getIdsFor(key).size; } } }, { key: "updateKeyMappingFor", value: function updateKeyMappingFor(ele) { var id = ele.id(); var prevKey = this.keyForId.get(id); var currKey = this.getKey(ele); this.deleteIdForKey(prevKey, id); this.addIdForKey(currKey, id); this.keyForId.set(id, currKey); } }, { key: "deleteKeyMappingFor", value: function deleteKeyMappingFor(ele) { var id = ele.id(); var prevKey = this.keyForId.get(id); this.deleteIdForKey(prevKey, id); this.keyForId["delete"](id); } }, { key: "keyHasChangedFor", value: function keyHasChangedFor(ele) { var id = ele.id(); var prevKey = this.keyForId.get(id); var newKey = this.getKey(ele); return prevKey !== newKey; } }, { key: "isInvalid", value: function isInvalid(ele) { return this.keyHasChangedFor(ele) || this.doesEleInvalidateKey(ele); } }, { key: "getCachesAt", value: function getCachesAt(lvl) { var cachesByLvl = this.cachesByLvl, lvls = this.lvls; var caches = cachesByLvl.get(lvl); if (!caches) { caches = new Map$1(); cachesByLvl.set(lvl, caches); lvls.push(lvl); } return caches; } }, { key: "getCache", value: function getCache(key, lvl) { return this.getCachesAt(lvl).get(key); } }, { key: "get", value: function get(ele, lvl) { var key = this.getKey(ele); var cache = this.getCache(key, lvl); // getting for an element may need to add to the id list b/c eles can share keys if (cache != null) { this.updateKeyMappingFor(ele); } return cache; } }, { key: "getForCachedKey", value: function getForCachedKey(ele, lvl) { var key = this.keyForId.get(ele.id()); // n.b. use cached key, not newly computed key var cache = this.getCache(key, lvl); return cache; } }, { key: "hasCache", value: function hasCache(key, lvl) { return this.getCachesAt(lvl).has(key); } }, { key: "has", value: function has(ele, lvl) { var key = this.getKey(ele); return this.hasCache(key, lvl); } }, { key: "setCache", value: function setCache(key, lvl, cache) { cache.key = key; this.getCachesAt(lvl).set(key, cache); } }, { key: "set", value: function set(ele, lvl, cache) { var key = this.getKey(ele); this.setCache(key, lvl, cache); this.updateKeyMappingFor(ele); } }, { key: "deleteCache", value: function deleteCache(key, lvl) { this.getCachesAt(lvl)["delete"](key); } }, { key: "delete", value: function _delete(ele, lvl) { var key = this.getKey(ele); this.deleteCache(key, lvl); } }, { key: "invalidateKey", value: function invalidateKey(key) { var _this = this; this.lvls.forEach(function (lvl) { return _this.deleteCache(key, lvl); }); } // returns true if no other eles reference the invalidated cache (n.b. other eles may need the cache with the same key) }, { key: "invalidate", value: function invalidate(ele) { var id = ele.id(); var key = this.keyForId.get(id); // n.b. use stored key rather than current (potential key) this.deleteKeyMappingFor(ele); var entireKeyInvalidated = this.doesEleInvalidateKey(ele); if (entireKeyInvalidated) { // clear mapping for current key this.invalidateKey(key); } return entireKeyInvalidated || this.getNumberOfIdsForKey(key) === 0; } }]); return ElementTextureCacheLookup; }(); var minTxrH = 25; // the size of the texture cache for small height eles (special case) var txrStepH = 50; // the min size of the regular cache, and the size it increases with each step up var minLvl$1 = -4; // when scaling smaller than that we don't need to re-render var maxLvl$1 = 3; // when larger than this scale just render directly (caching is not helpful) var maxZoom$1 = 7.99; // beyond this zoom level, layered textures are not used var eleTxrSpacing = 8; // spacing between elements on textures to avoid blitting overlaps var defTxrWidth = 1024; // default/minimum texture width var maxTxrW = 1024; // the maximum width of a texture var maxTxrH = 1024; // the maximum height of a texture var minUtility = 0.2; // if usage of texture is less than this, it is retired var maxFullness = 0.8; // fullness of texture after which queue removal is checked var maxFullnessChecks = 10; // dequeued after this many checks var deqCost$1 = 0.15; // % of add'l rendering cost allowed for dequeuing ele caches each frame var deqAvgCost$1 = 0.1; // % of add'l rendering cost compared to average overall redraw time var deqNoDrawCost$1 = 0.9; // % of avg frame time that can be used for dequeueing when not drawing var deqFastCost$1 = 0.9; // % of frame time to be used when >60fps var deqRedrawThreshold$1 = 100; // time to batch redraws together from dequeueing to allow more dequeueing calcs to happen in the meanwhile var maxDeqSize$1 = 1; // number of eles to dequeue and render at higher texture in each batch var getTxrReasons = { dequeue: 'dequeue', downscale: 'downscale', highQuality: 'highQuality' }; var initDefaults = defaults$g({ getKey: null, doesEleInvalidateKey: falsify, drawElement: null, getBoundingBox: null, getRotationPoint: null, getRotationOffset: null, isVisible: trueify, allowEdgeTxrCaching: true, allowParentTxrCaching: true }); var ElementTextureCache = function ElementTextureCache(renderer, initOptions) { var self = this; self.renderer = renderer; self.onDequeues = []; var opts = initDefaults(initOptions); extend(self, opts); self.lookup = new ElementTextureCacheLookup(opts.getKey, opts.doesEleInvalidateKey); self.setupDequeueing(); }; var ETCp = ElementTextureCache.prototype; ETCp.reasons = getTxrReasons; // the list of textures in which new subtextures for elements can be placed ETCp.getTextureQueue = function (txrH) { var self = this; self.eleImgCaches = self.eleImgCaches || {}; return self.eleImgCaches[txrH] = self.eleImgCaches[txrH] || []; }; // the list of usused textures which can be recycled (in use in texture queue) ETCp.getRetiredTextureQueue = function (txrH) { var self = this; var rtxtrQs = self.eleImgCaches.retired = self.eleImgCaches.retired || {}; var rtxtrQ = rtxtrQs[txrH] = rtxtrQs[txrH] || []; return rtxtrQ; }; // queue of element draw requests at different scale levels ETCp.getElementQueue = function () { var self = this; var q = self.eleCacheQueue = self.eleCacheQueue || new Heap__default["default"](function (a, b) { return b.reqs - a.reqs; }); return q; }; // queue of element draw requests at different scale levels (element id lookup) ETCp.getElementKeyToQueue = function () { var self = this; var k2q = self.eleKeyToCacheQueue = self.eleKeyToCacheQueue || {}; return k2q; }; ETCp.getElement = function (ele, bb, pxRatio, lvl, reason) { var self = this; var r = this.renderer; var zoom = r.cy.zoom(); var lookup = this.lookup; if (!bb || bb.w === 0 || bb.h === 0 || isNaN(bb.w) || isNaN(bb.h) || !ele.visible() || ele.removed()) { return null; } if (!self.allowEdgeTxrCaching && ele.isEdge() || !self.allowParentTxrCaching && ele.isParent()) { return null; } if (lvl == null) { lvl = Math.ceil(log2(zoom * pxRatio)); } if (lvl < minLvl$1) { lvl = minLvl$1; } else if (zoom >= maxZoom$1 || lvl > maxLvl$1) { return null; } var scale = Math.pow(2, lvl); var eleScaledH = bb.h * scale; var eleScaledW = bb.w * scale; var scaledLabelShown = r.eleTextBiggerThanMin(ele, scale); if (!this.isVisible(ele, scaledLabelShown)) { return null; } var eleCache = lookup.get(ele, lvl); // if this get was on an unused/invalidated cache, then restore the texture usage metric if (eleCache && eleCache.invalidated) { eleCache.invalidated = false; eleCache.texture.invalidatedWidth -= eleCache.width; } if (eleCache) { return eleCache; } var txrH; // which texture height this ele belongs to if (eleScaledH <= minTxrH) { txrH = minTxrH; } else if (eleScaledH <= txrStepH) { txrH = txrStepH; } else { txrH = Math.ceil(eleScaledH / txrStepH) * txrStepH; } if (eleScaledH > maxTxrH || eleScaledW > maxTxrW) { return null; // caching large elements is not efficient } var txrQ = self.getTextureQueue(txrH); // first try the second last one in case it has space at the end var txr = txrQ[txrQ.length - 2]; var addNewTxr = function addNewTxr() { return self.recycleTexture(txrH, eleScaledW) || self.addTexture(txrH, eleScaledW); }; // try the last one if there is no second last one if (!txr) { txr = txrQ[txrQ.length - 1]; } // if the last one doesn't exist, we need a first one if (!txr) { txr = addNewTxr(); } // if there's no room in the current texture, we need a new one if (txr.width - txr.usedWidth < eleScaledW) { txr = addNewTxr(); } var scalableFrom = function scalableFrom(otherCache) { return otherCache && otherCache.scaledLabelShown === scaledLabelShown; }; var deqing = reason && reason === getTxrReasons.dequeue; var highQualityReq = reason && reason === getTxrReasons.highQuality; var downscaleReq = reason && reason === getTxrReasons.downscale; var higherCache; // the nearest cache with a higher level for (var l = lvl + 1; l <= maxLvl$1; l++) { var c = lookup.get(ele, l); if (c) { higherCache = c; break; } } var oneUpCache = higherCache && higherCache.level === lvl + 1 ? higherCache : null; var downscale = function downscale() { txr.context.drawImage(oneUpCache.texture.canvas, oneUpCache.x, 0, oneUpCache.width, oneUpCache.height, txr.usedWidth, 0, eleScaledW, eleScaledH); }; // reset ele area in texture txr.context.setTransform(1, 0, 0, 1, 0, 0); txr.context.clearRect(txr.usedWidth, 0, eleScaledW, txrH); if (scalableFrom(oneUpCache)) { // then we can relatively cheaply rescale the existing image w/o rerendering downscale(); } else if (scalableFrom(higherCache)) { // then use the higher cache for now and queue the next level down // to cheaply scale towards the smaller level if (highQualityReq) { for (var _l = higherCache.level; _l > lvl; _l--) { oneUpCache = self.getElement(ele, bb, pxRatio, _l, getTxrReasons.downscale); } downscale(); } else { self.queueElement(ele, higherCache.level - 1); return higherCache; } } else { var lowerCache; // the nearest cache with a lower level if (!deqing && !highQualityReq && !downscaleReq) { for (var _l2 = lvl - 1; _l2 >= minLvl$1; _l2--) { var _c = lookup.get(ele, _l2); if (_c) { lowerCache = _c; break; } } } if (scalableFrom(lowerCache)) { // then use the lower quality cache for now and queue the better one for later self.queueElement(ele, lvl); return lowerCache; } txr.context.translate(txr.usedWidth, 0); txr.context.scale(scale, scale); this.drawElement(txr.context, ele, bb, scaledLabelShown, false); txr.context.scale(1 / scale, 1 / scale); txr.context.translate(-txr.usedWidth, 0); } eleCache = { x: txr.usedWidth, texture: txr, level: lvl, scale: scale, width: eleScaledW, height: eleScaledH, scaledLabelShown: scaledLabelShown }; txr.usedWidth += Math.ceil(eleScaledW + eleTxrSpacing); txr.eleCaches.push(eleCache); lookup.set(ele, lvl, eleCache); self.checkTextureFullness(txr); return eleCache; }; ETCp.invalidateElements = function (eles) { for (var i = 0; i < eles.length; i++) { this.invalidateElement(eles[i]); } }; ETCp.invalidateElement = function (ele) { var self = this; var lookup = self.lookup; var caches = []; var invalid = lookup.isInvalid(ele); if (!invalid) { return; // override the invalidation request if the element key has not changed } for (var lvl = minLvl$1; lvl <= maxLvl$1; lvl++) { var cache = lookup.getForCachedKey(ele, lvl); if (cache) { caches.push(cache); } } var noOtherElesUseCache = lookup.invalidate(ele); if (noOtherElesUseCache) { for (var i = 0; i < caches.length; i++) { var _cache = caches[i]; var txr = _cache.texture; // remove space from the texture it belongs to txr.invalidatedWidth += _cache.width; // mark the cache as invalidated _cache.invalidated = true; // retire the texture if its utility is low self.checkTextureUtility(txr); } } // remove from queue since the old req was for the old state self.removeFromQueue(ele); }; ETCp.checkTextureUtility = function (txr) { // invalidate all entries in the cache if the cache size is small if (txr.invalidatedWidth >= minUtility * txr.width) { this.retireTexture(txr); } }; ETCp.checkTextureFullness = function (txr) { // if texture has been mostly filled and passed over several times, remove // it from the queue so we don't need to waste time looking at it to put new things var self = this; var txrQ = self.getTextureQueue(txr.height); if (txr.usedWidth / txr.width > maxFullness && txr.fullnessChecks >= maxFullnessChecks) { removeFromArray(txrQ, txr); } else { txr.fullnessChecks++; } }; ETCp.retireTexture = function (txr) { var self = this; var txrH = txr.height; var txrQ = self.getTextureQueue(txrH); var lookup = this.lookup; // retire the texture from the active / searchable queue: removeFromArray(txrQ, txr); txr.retired = true; // remove the refs from the eles to the caches: var eleCaches = txr.eleCaches; for (var i = 0; i < eleCaches.length; i++) { var eleCache = eleCaches[i]; lookup.deleteCache(eleCache.key, eleCache.level); } clearArray(eleCaches); // add the texture to a retired queue so it can be recycled in future: var rtxtrQ = self.getRetiredTextureQueue(txrH); rtxtrQ.push(txr); }; ETCp.addTexture = function (txrH, minW) { var self = this; var txrQ = self.getTextureQueue(txrH); var txr = {}; txrQ.push(txr); txr.eleCaches = []; txr.height = txrH; txr.width = Math.max(defTxrWidth, minW); txr.usedWidth = 0; txr.invalidatedWidth = 0; txr.fullnessChecks = 0; txr.canvas = self.renderer.makeOffscreenCanvas(txr.width, txr.height); txr.context = txr.canvas.getContext('2d'); return txr; }; ETCp.recycleTexture = function (txrH, minW) { var self = this; var txrQ = self.getTextureQueue(txrH); var rtxtrQ = self.getRetiredTextureQueue(txrH); for (var i = 0; i < rtxtrQ.length; i++) { var txr = rtxtrQ[i]; if (txr.width >= minW) { txr.retired = false; txr.usedWidth = 0; txr.invalidatedWidth = 0; txr.fullnessChecks = 0; clearArray(txr.eleCaches); txr.context.setTransform(1, 0, 0, 1, 0, 0); txr.context.clearRect(0, 0, txr.width, txr.height); removeFromArray(rtxtrQ, txr); txrQ.push(txr); return txr; } } }; ETCp.queueElement = function (ele, lvl) { var self = this; var q = self.getElementQueue(); var k2q = self.getElementKeyToQueue(); var key = this.getKey(ele); var existingReq = k2q[key]; if (existingReq) { // use the max lvl b/c in between lvls are cheap to make existingReq.level = Math.max(existingReq.level, lvl); existingReq.eles.merge(ele); existingReq.reqs++; q.updateItem(existingReq); } else { var req = { eles: ele.spawn().merge(ele), level: lvl, reqs: 1, key: key }; q.push(req); k2q[key] = req; } }; ETCp.dequeue = function (pxRatio /*, extent*/ ) { var self = this; var q = self.getElementQueue(); var k2q = self.getElementKeyToQueue(); var dequeued = []; var lookup = self.lookup; for (var i = 0; i < maxDeqSize$1; i++) { if (q.size() > 0) { var req = q.pop(); var key = req.key; var ele = req.eles[0]; // all eles have the same key var cacheExists = lookup.hasCache(ele, req.level); // clear out the key to req lookup k2q[key] = null; // dequeueing isn't necessary with an existing cache if (cacheExists) { continue; } dequeued.push(req); var bb = self.getBoundingBox(ele); self.getElement(ele, bb, pxRatio, req.level, getTxrReasons.dequeue); } else { break; } } return dequeued; }; ETCp.removeFromQueue = function (ele) { var self = this; var q = self.getElementQueue(); var k2q = self.getElementKeyToQueue(); var key = this.getKey(ele); var req = k2q[key]; if (req != null) { if (req.eles.length === 1) { // remove if last ele in the req // bring to front of queue req.reqs = MAX_INT$1; q.updateItem(req); q.pop(); // remove from queue k2q[key] = null; // remove from lookup map } else { // otherwise just remove ele from req req.eles.unmerge(ele); } } }; ETCp.onDequeue = function (fn) { this.onDequeues.push(fn); }; ETCp.offDequeue = function (fn) { removeFromArray(this.onDequeues, fn); }; ETCp.setupDequeueing = defs.setupDequeueing({ deqRedrawThreshold: deqRedrawThreshold$1, deqCost: deqCost$1, deqAvgCost: deqAvgCost$1, deqNoDrawCost: deqNoDrawCost$1, deqFastCost: deqFastCost$1, deq: function deq(self, pxRatio, extent) { return self.dequeue(pxRatio, extent); }, onDeqd: function onDeqd(self, deqd) { for (var i = 0; i < self.onDequeues.length; i++) { var fn = self.onDequeues[i]; fn(deqd); } }, shouldRedraw: function shouldRedraw(self, deqd, pxRatio, extent) { for (var i = 0; i < deqd.length; i++) { var eles = deqd[i].eles; for (var j = 0; j < eles.length; j++) { var bb = eles[j].boundingBox(); if (boundingBoxesIntersect(bb, extent)) { return true; } } } return false; }, priority: function priority(self) { return self.renderer.beforeRenderPriorities.eleTxrDeq; } }); var defNumLayers = 1; // default number of layers to use var minLvl = -4; // when scaling smaller than that we don't need to re-render var maxLvl = 2; // when larger than this scale just render directly (caching is not helpful) var maxZoom = 3.99; // beyond this zoom level, layered textures are not used var deqRedrawThreshold = 50; // time to batch redraws together from dequeueing to allow more dequeueing calcs to happen in the meanwhile var refineEleDebounceTime = 50; // time to debounce sharper ele texture updates var deqCost = 0.15; // % of add'l rendering cost allowed for dequeuing ele caches each frame var deqAvgCost = 0.1; // % of add'l rendering cost compared to average overall redraw time var deqNoDrawCost = 0.9; // % of avg frame time that can be used for dequeueing when not drawing var deqFastCost = 0.9; // % of frame time to be used when >60fps var maxDeqSize = 1; // number of eles to dequeue and render at higher texture in each batch var invalidThreshold = 250; // time threshold for disabling b/c of invalidations var maxLayerArea = 4000 * 4000; // layers can't be bigger than this var useHighQualityEleTxrReqs = true; // whether to use high quality ele txr requests (generally faster and cheaper in the longterm) // var log = function(){ console.log.apply( console, arguments ); }; var LayeredTextureCache = function LayeredTextureCache(renderer) { var self = this; var r = self.renderer = renderer; var cy = r.cy; self.layersByLevel = {}; // e.g. 2 => [ layer1, layer2, ..., layerN ] self.firstGet = true; self.lastInvalidationTime = performanceNow() - 2 * invalidThreshold; self.skipping = false; self.eleTxrDeqs = cy.collection(); self.scheduleElementRefinement = debounce__default["default"](function () { self.refineElementTextures(self.eleTxrDeqs); self.eleTxrDeqs.unmerge(self.eleTxrDeqs); }, refineEleDebounceTime); r.beforeRender(function (willDraw, now) { if (now - self.lastInvalidationTime <= invalidThreshold) { self.skipping = true; } else { self.skipping = false; } }, r.beforeRenderPriorities.lyrTxrSkip); var qSort = function qSort(a, b) { return b.reqs - a.reqs; }; self.layersQueue = new Heap__default["default"](qSort); self.setupDequeueing(); }; var LTCp = LayeredTextureCache.prototype; var layerIdPool = 0; var MAX_INT = Math.pow(2, 53) - 1; LTCp.makeLayer = function (bb, lvl) { var scale = Math.pow(2, lvl); var w = Math.ceil(bb.w * scale); var h = Math.ceil(bb.h * scale); var canvas = this.renderer.makeOffscreenCanvas(w, h); var layer = { id: layerIdPool = ++layerIdPool % MAX_INT, bb: bb, level: lvl, width: w, height: h, canvas: canvas, context: canvas.getContext('2d'), eles: [], elesQueue: [], reqs: 0 }; // log('make layer %s with w %s and h %s and lvl %s', layer.id, layer.width, layer.height, layer.level); var cxt = layer.context; var dx = -layer.bb.x1; var dy = -layer.bb.y1; // do the transform on creation to save cycles (it's the same for all eles) cxt.scale(scale, scale); cxt.translate(dx, dy); return layer; }; LTCp.getLayers = function (eles, pxRatio, lvl) { var self = this; var r = self.renderer; var cy = r.cy; var zoom = cy.zoom(); var firstGet = self.firstGet; self.firstGet = false; // log('--\nget layers with %s eles', eles.length); //log eles.map(function(ele){ return ele.id() }) ); if (lvl == null) { lvl = Math.ceil(log2(zoom * pxRatio)); if (lvl < minLvl) { lvl = minLvl; } else if (zoom >= maxZoom || lvl > maxLvl) { return null; } } self.validateLayersElesOrdering(lvl, eles); var layersByLvl = self.layersByLevel; var scale = Math.pow(2, lvl); var layers = layersByLvl[lvl] = layersByLvl[lvl] || []; var bb; var lvlComplete = self.levelIsComplete(lvl, eles); var tmpLayers; var checkTempLevels = function checkTempLevels() { var canUseAsTmpLvl = function canUseAsTmpLvl(l) { self.validateLayersElesOrdering(l, eles); if (self.levelIsComplete(l, eles)) { tmpLayers = layersByLvl[l]; return true; } }; var checkLvls = function checkLvls(dir) { if (tmpLayers) { return; } for (var l = lvl + dir; minLvl <= l && l <= maxLvl; l += dir) { if (canUseAsTmpLvl(l)) { break; } } }; checkLvls(+1); checkLvls(-1); // remove the invalid layers; they will be replaced as needed later in this function for (var i = layers.length - 1; i >= 0; i--) { var layer = layers[i]; if (layer.invalid) { removeFromArray(layers, layer); } } }; if (!lvlComplete) { // if the current level is incomplete, then use the closest, best quality layerset temporarily // and later queue the current layerset so we can get the proper quality level soon checkTempLevels(); } else { // log('level complete, using existing layers\n--'); return layers; } var getBb = function getBb() { if (!bb) { bb = makeBoundingBox(); for (var i = 0; i < eles.length; i++) { updateBoundingBox(bb, eles[i].boundingBox()); } } return bb; }; var makeLayer = function makeLayer(opts) { opts = opts || {}; var after = opts.after; getBb(); var area = bb.w * scale * (bb.h * scale); if (area > maxLayerArea) { return null; } var layer = self.makeLayer(bb, lvl); if (after != null) { var index = layers.indexOf(after) + 1; layers.splice(index, 0, layer); } else if (opts.insert === undefined || opts.insert) { // no after specified => first layer made so put at start layers.unshift(layer); } // if( tmpLayers ){ //self.queueLayer( layer ); // } return layer; }; if (self.skipping && !firstGet) { // log('skip layers'); return null; } // log('do layers'); var layer = null; var maxElesPerLayer = eles.length / defNumLayers; var allowLazyQueueing = !firstGet; for (var i = 0; i < eles.length; i++) { var ele = eles[i]; var rs = ele._private.rscratch; var caches = rs.imgLayerCaches = rs.imgLayerCaches || {}; // log('look at ele', ele.id()); var existingLayer = caches[lvl]; if (existingLayer) { // reuse layer for later eles // log('reuse layer for', ele.id()); layer = existingLayer; continue; } if (!layer || layer.eles.length >= maxElesPerLayer || !boundingBoxInBoundingBox(layer.bb, ele.boundingBox())) { // log('make new layer for ele %s', ele.id()); layer = makeLayer({ insert: true, after: layer }); // if now layer can be built then we can't use layers at this level if (!layer) { return null; } // log('new layer with id %s', layer.id); } if (tmpLayers || allowLazyQueueing) { // log('queue ele %s in layer %s', ele.id(), layer.id); self.queueLayer(layer, ele); } else { // log('draw ele %s in layer %s', ele.id(), layer.id); self.drawEleInLayer(layer, ele, lvl, pxRatio); } layer.eles.push(ele); caches[lvl] = layer; } // log('--'); if (tmpLayers) { // then we only queued the current layerset and can't draw it yet return tmpLayers; } if (allowLazyQueueing) { // log('lazy queue level', lvl); return null; } return layers; }; // a layer may want to use an ele cache of a higher level to avoid blurriness // so the layer level might not equal the ele level LTCp.getEleLevelForLayerLevel = function (lvl, pxRatio) { return lvl; }; LTCp.drawEleInLayer = function (layer, ele, lvl, pxRatio) { var self = this; var r = this.renderer; var context = layer.context; var bb = ele.boundingBox(); if (bb.w === 0 || bb.h === 0 || !ele.visible()) { return; } lvl = self.getEleLevelForLayerLevel(lvl, pxRatio); { r.setImgSmoothing(context, false); } { r.drawCachedElement(context, ele, null, null, lvl, useHighQualityEleTxrReqs); } { r.setImgSmoothing(context, true); } }; LTCp.levelIsComplete = function (lvl, eles) { var self = this; var layers = self.layersByLevel[lvl]; if (!layers || layers.length === 0) { return false; } var numElesInLayers = 0; for (var i = 0; i < layers.length; i++) { var layer = layers[i]; // if there are any eles needed to be drawn yet, the level is not complete if (layer.reqs > 0) { return false; } // if the layer is invalid, the level is not complete if (layer.invalid) { return false; } numElesInLayers += layer.eles.length; } // we should have exactly the number of eles passed in to be complete if (numElesInLayers !== eles.length) { return false; } return true; }; LTCp.validateLayersElesOrdering = function (lvl, eles) { var layers = this.layersByLevel[lvl]; if (!layers) { return; } // if in a layer the eles are not in the same order, then the layer is invalid // (i.e. there is an ele in between the eles in the layer) for (var i = 0; i < layers.length; i++) { var layer = layers[i]; var offset = -1; // find the offset for (var j = 0; j < eles.length; j++) { if (layer.eles[0] === eles[j]) { offset = j; break; } } if (offset < 0) { // then the layer has nonexistent elements and is invalid this.invalidateLayer(layer); continue; } // the eles in the layer must be in the same continuous order, else the layer is invalid var o = offset; for (var j = 0; j < layer.eles.length; j++) { if (layer.eles[j] !== eles[o + j]) { // log('invalidate based on ordering', layer.id); this.invalidateLayer(layer); break; } } } }; LTCp.updateElementsInLayers = function (eles, update) { var self = this; var isEles = element(eles[0]); // collect udpated elements (cascaded from the layers) and update each // layer itself along the way for (var i = 0; i < eles.length; i++) { var req = isEles ? null : eles[i]; var ele = isEles ? eles[i] : eles[i].ele; var rs = ele._private.rscratch; var caches = rs.imgLayerCaches = rs.imgLayerCaches || {}; for (var l = minLvl; l <= maxLvl; l++) { var layer = caches[l]; if (!layer) { continue; } // if update is a request from the ele cache, then it affects only // the matching level if (req && self.getEleLevelForLayerLevel(layer.level) !== req.level) { continue; } update(layer, ele, req); } } }; LTCp.haveLayers = function () { var self = this; var haveLayers = false; for (var l = minLvl; l <= maxLvl; l++) { var layers = self.layersByLevel[l]; if (layers && layers.length > 0) { haveLayers = true; break; } } return haveLayers; }; LTCp.invalidateElements = function (eles) { var self = this; if (eles.length === 0) { return; } self.lastInvalidationTime = performanceNow(); // log('update invalidate layer time from eles'); if (eles.length === 0 || !self.haveLayers()) { return; } self.updateElementsInLayers(eles, function invalAssocLayers(layer, ele, req) { self.invalidateLayer(layer); }); }; LTCp.invalidateLayer = function (layer) { // log('update invalidate layer time'); this.lastInvalidationTime = performanceNow(); if (layer.invalid) { return; } // save cycles var lvl = layer.level; var eles = layer.eles; var layers = this.layersByLevel[lvl]; // log('invalidate layer', layer.id ); removeFromArray(layers, layer); // layer.eles = []; layer.elesQueue = []; layer.invalid = true; if (layer.replacement) { layer.replacement.invalid = true; } for (var i = 0; i < eles.length; i++) { var caches = eles[i]._private.rscratch.imgLayerCaches; if (caches) { caches[lvl] = null; } } }; LTCp.refineElementTextures = function (eles) { var self = this; // log('refine', eles.length); self.updateElementsInLayers(eles, function refineEachEle(layer, ele, req) { var rLyr = layer.replacement; if (!rLyr) { rLyr = layer.replacement = self.makeLayer(layer.bb, layer.level); rLyr.replaces = layer; rLyr.eles = layer.eles; // log('make replacement layer %s for %s with level %s', rLyr.id, layer.id, rLyr.level); } if (!rLyr.reqs) { for (var i = 0; i < rLyr.eles.length; i++) { self.queueLayer(rLyr, rLyr.eles[i]); } // log('queue replacement layer refinement', rLyr.id); } }); }; LTCp.enqueueElementRefinement = function (ele) { this.eleTxrDeqs.merge(ele); this.scheduleElementRefinement(); }; LTCp.queueLayer = function (layer, ele) { var self = this; var q = self.layersQueue; var elesQ = layer.elesQueue; var hasId = elesQ.hasId = elesQ.hasId || {}; // if a layer is going to be replaced, queuing is a waste of time if (layer.replacement) { return; } if (ele) { if (hasId[ele.id()]) { return; } elesQ.push(ele); hasId[ele.id()] = true; } if (layer.reqs) { layer.reqs++; q.updateItem(layer); } else { layer.reqs = 1; q.push(layer); } }; LTCp.dequeue = function (pxRatio) { var self = this; var q = self.layersQueue; var deqd = []; var eleDeqs = 0; while (eleDeqs < maxDeqSize) { if (q.size() === 0) { break; } var layer = q.peek(); // if a layer has been or will be replaced, then don't waste time with it if (layer.replacement) { // log('layer %s in queue skipped b/c it already has a replacement', layer.id); q.pop(); continue; } // if this is a replacement layer that has been superceded, then forget it if (layer.replaces && layer !== layer.replaces.replacement) { // log('layer is no longer the most uptodate replacement; dequeued', layer.id) q.pop(); continue; } if (layer.invalid) { // log('replacement layer %s is invalid; dequeued', layer.id); q.pop(); continue; } var ele = layer.elesQueue.shift(); if (ele) { // log('dequeue layer %s', layer.id); self.drawEleInLayer(layer, ele, layer.level, pxRatio); eleDeqs++; } if (deqd.length === 0) { // we need only one entry in deqd to queue redrawing etc deqd.push(true); } // if the layer has all its eles done, then remove from the queue if (layer.elesQueue.length === 0) { q.pop(); layer.reqs = 0; // log('dequeue of layer %s complete', layer.id); // when a replacement layer is dequeued, it replaces the old layer in the level if (layer.replaces) { self.applyLayerReplacement(layer); } self.requestRedraw(); } } return deqd; }; LTCp.applyLayerReplacement = function (layer) { var self = this; var layersInLevel = self.layersByLevel[layer.level]; var replaced = layer.replaces; var index = layersInLevel.indexOf(replaced); // if the replaced layer is not in the active list for the level, then replacing // refs would be a mistake (i.e. overwriting the true active layer) if (index < 0 || replaced.invalid) { // log('replacement layer would have no effect', layer.id); return; } layersInLevel[index] = layer; // replace level ref // replace refs in eles for (var i = 0; i < layer.eles.length; i++) { var _p = layer.eles[i]._private; var cache = _p.imgLayerCaches = _p.imgLayerCaches || {}; if (cache) { cache[layer.level] = layer; } } // log('apply replacement layer %s over %s', layer.id, replaced.id); self.requestRedraw(); }; LTCp.requestRedraw = debounce__default["default"](function () { var r = this.renderer; r.redrawHint('eles', true); r.redrawHint('drag', true); r.redraw(); }, 100); LTCp.setupDequeueing = defs.setupDequeueing({ deqRedrawThreshold: deqRedrawThreshold, deqCost: deqCost, deqAvgCost: deqAvgCost, deqNoDrawCost: deqNoDrawCost, deqFastCost: deqFastCost, deq: function deq(self, pxRatio) { return self.dequeue(pxRatio); }, onDeqd: noop$1, shouldRedraw: trueify, priority: function priority(self) { return self.renderer.beforeRenderPriorities.lyrTxrDeq; } }); var CRp$a = {}; var impl; function polygon(context, points) { for (var i = 0; i < points.length; i++) { var pt = points[i]; context.lineTo(pt.x, pt.y); } } function triangleBackcurve(context, points, controlPoint) { var firstPt; for (var i = 0; i < points.length; i++) { var pt = points[i]; if (i === 0) { firstPt = pt; } context.lineTo(pt.x, pt.y); } context.quadraticCurveTo(controlPoint.x, controlPoint.y, firstPt.x, firstPt.y); } function triangleTee(context, trianglePoints, teePoints) { if (context.beginPath) { context.beginPath(); } var triPts = trianglePoints; for (var i = 0; i < triPts.length; i++) { var pt = triPts[i]; context.lineTo(pt.x, pt.y); } var teePts = teePoints; var firstTeePt = teePoints[0]; context.moveTo(firstTeePt.x, firstTeePt.y); for (var i = 1; i < teePts.length; i++) { var pt = teePts[i]; context.lineTo(pt.x, pt.y); } if (context.closePath) { context.closePath(); } } function circleTriangle(context, trianglePoints, rx, ry, r) { if (context.beginPath) { context.beginPath(); } context.arc(rx, ry, r, 0, Math.PI * 2, false); var triPts = trianglePoints; var firstTrPt = triPts[0]; context.moveTo(firstTrPt.x, firstTrPt.y); for (var i = 0; i < triPts.length; i++) { var pt = triPts[i]; context.lineTo(pt.x, pt.y); } if (context.closePath) { context.closePath(); } } function circle(context, rx, ry, r) { context.arc(rx, ry, r, 0, Math.PI * 2, false); } CRp$a.arrowShapeImpl = function (name) { return (impl || (impl = { 'polygon': polygon, 'triangle-backcurve': triangleBackcurve, 'triangle-tee': triangleTee, 'circle-triangle': circleTriangle, 'triangle-cross': triangleTee, 'circle': circle }))[name]; }; var CRp$9 = {}; CRp$9.drawElement = function (context, ele, shiftToOriginWithBb, showLabel, showOverlay, showOpacity) { var r = this; if (ele.isNode()) { r.drawNode(context, ele, shiftToOriginWithBb, showLabel, showOverlay, showOpacity); } else { r.drawEdge(context, ele, shiftToOriginWithBb, showLabel, showOverlay, showOpacity); } }; CRp$9.drawElementOverlay = function (context, ele) { var r = this; if (ele.isNode()) { r.drawNodeOverlay(context, ele); } else { r.drawEdgeOverlay(context, ele); } }; CRp$9.drawElementUnderlay = function (context, ele) { var r = this; if (ele.isNode()) { r.drawNodeUnderlay(context, ele); } else { r.drawEdgeUnderlay(context, ele); } }; CRp$9.drawCachedElementPortion = function (context, ele, eleTxrCache, pxRatio, lvl, reason, getRotation, getOpacity) { var r = this; var bb = eleTxrCache.getBoundingBox(ele); if (bb.w === 0 || bb.h === 0) { return; } // ignore zero size case var eleCache = eleTxrCache.getElement(ele, bb, pxRatio, lvl, reason); if (eleCache != null) { var opacity = getOpacity(r, ele); if (opacity === 0) { return; } var theta = getRotation(r, ele); var x1 = bb.x1, y1 = bb.y1, w = bb.w, h = bb.h; var x, y, sx, sy, smooth; if (theta !== 0) { var rotPt = eleTxrCache.getRotationPoint(ele); sx = rotPt.x; sy = rotPt.y; context.translate(sx, sy); context.rotate(theta); smooth = r.getImgSmoothing(context); if (!smooth) { r.setImgSmoothing(context, true); } var off = eleTxrCache.getRotationOffset(ele); x = off.x; y = off.y; } else { x = x1; y = y1; } var oldGlobalAlpha; if (opacity !== 1) { oldGlobalAlpha = context.globalAlpha; context.globalAlpha = oldGlobalAlpha * opacity; } context.drawImage(eleCache.texture.canvas, eleCache.x, 0, eleCache.width, eleCache.height, x, y, w, h); if (opacity !== 1) { context.globalAlpha = oldGlobalAlpha; } if (theta !== 0) { context.rotate(-theta); context.translate(-sx, -sy); if (!smooth) { r.setImgSmoothing(context, false); } } } else { eleTxrCache.drawElement(context, ele); // direct draw fallback } }; var getZeroRotation = function getZeroRotation() { return 0; }; var getLabelRotation = function getLabelRotation(r, ele) { return r.getTextAngle(ele, null); }; var getSourceLabelRotation = function getSourceLabelRotation(r, ele) { return r.getTextAngle(ele, 'source'); }; var getTargetLabelRotation = function getTargetLabelRotation(r, ele) { return r.getTextAngle(ele, 'target'); }; var getOpacity = function getOpacity(r, ele) { return ele.effectiveOpacity(); }; var getTextOpacity = function getTextOpacity(e, ele) { return ele.pstyle('text-opacity').pfValue * ele.effectiveOpacity(); }; CRp$9.drawCachedElement = function (context, ele, pxRatio, extent, lvl, requestHighQuality) { var r = this; var _r$data = r.data, eleTxrCache = _r$data.eleTxrCache, lblTxrCache = _r$data.lblTxrCache, slbTxrCache = _r$data.slbTxrCache, tlbTxrCache = _r$data.tlbTxrCache; var bb = ele.boundingBox(); var reason = requestHighQuality === true ? eleTxrCache.reasons.highQuality : null; if (bb.w === 0 || bb.h === 0 || !ele.visible()) { return; } if (!extent || boundingBoxesIntersect(bb, extent)) { var isEdge = ele.isEdge(); var badLine = ele.element()._private.rscratch.badLine; r.drawElementUnderlay(context, ele); r.drawCachedElementPortion(context, ele, eleTxrCache, pxRatio, lvl, reason, getZeroRotation, getOpacity); if (!isEdge || !badLine) { r.drawCachedElementPortion(context, ele, lblTxrCache, pxRatio, lvl, reason, getLabelRotation, getTextOpacity); } if (isEdge && !badLine) { r.drawCachedElementPortion(context, ele, slbTxrCache, pxRatio, lvl, reason, getSourceLabelRotation, getTextOpacity); r.drawCachedElementPortion(context, ele, tlbTxrCache, pxRatio, lvl, reason, getTargetLabelRotation, getTextOpacity); } r.drawElementOverlay(context, ele); } }; CRp$9.drawElements = function (context, eles) { var r = this; for (var i = 0; i < eles.length; i++) { var ele = eles[i]; r.drawElement(context, ele); } }; CRp$9.drawCachedElements = function (context, eles, pxRatio, extent) { var r = this; for (var i = 0; i < eles.length; i++) { var ele = eles[i]; r.drawCachedElement(context, ele, pxRatio, extent); } }; CRp$9.drawCachedNodes = function (context, eles, pxRatio, extent) { var r = this; for (var i = 0; i < eles.length; i++) { var ele = eles[i]; if (!ele.isNode()) { continue; } r.drawCachedElement(context, ele, pxRatio, extent); } }; CRp$9.drawLayeredElements = function (context, eles, pxRatio, extent) { var r = this; var layers = r.data.lyrTxrCache.getLayers(eles, pxRatio); if (layers) { for (var i = 0; i < layers.length; i++) { var layer = layers[i]; var bb = layer.bb; if (bb.w === 0 || bb.h === 0) { continue; } context.drawImage(layer.canvas, bb.x1, bb.y1, bb.w, bb.h); } } else { // fall back on plain caching if no layers r.drawCachedElements(context, eles, pxRatio, extent); } }; /* global Path2D */ var CRp$8 = {}; CRp$8.drawEdge = function (context, edge, shiftToOriginWithBb) { var drawLabel = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true; var shouldDrawOverlay = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true; var shouldDrawOpacity = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true; var r = this; var rs = edge._private.rscratch; if (shouldDrawOpacity && !edge.visible()) { return; } // if bezier ctrl pts can not be calculated, then die if (rs.badLine || rs.allpts == null || isNaN(rs.allpts[0])) { // isNaN in case edge is impossible and browser bugs (e.g. safari) return; } var bb; if (shiftToOriginWithBb) { bb = shiftToOriginWithBb; context.translate(-bb.x1, -bb.y1); } var opacity = shouldDrawOpacity ? edge.pstyle('opacity').value : 1; var lineOpacity = shouldDrawOpacity ? edge.pstyle('line-opacity').value : 1; var curveStyle = edge.pstyle('curve-style').value; var lineStyle = edge.pstyle('line-style').value; var edgeWidth = edge.pstyle('width').pfValue; var lineCap = edge.pstyle('line-cap').value; var effectiveLineOpacity = opacity * lineOpacity; // separate arrow opacity would require arrow-opacity property var effectiveArrowOpacity = opacity * lineOpacity; var drawLine = function drawLine() { var strokeOpacity = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : effectiveLineOpacity; if (curveStyle === 'straight-triangle') { r.eleStrokeStyle(context, edge, strokeOpacity); r.drawEdgeTrianglePath(edge, context, rs.allpts); } else { context.lineWidth = edgeWidth; context.lineCap = lineCap; r.eleStrokeStyle(context, edge, strokeOpacity); r.drawEdgePath(edge, context, rs.allpts, lineStyle); context.lineCap = 'butt'; // reset for other drawing functions } }; var drawOverlay = function drawOverlay() { if (!shouldDrawOverlay) { return; } r.drawEdgeOverlay(context, edge); }; var drawUnderlay = function drawUnderlay() { if (!shouldDrawOverlay) { return; } r.drawEdgeUnderlay(context, edge); }; var drawArrows = function drawArrows() { var arrowOpacity = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : effectiveArrowOpacity; r.drawArrowheads(context, edge, arrowOpacity); }; var drawText = function drawText() { r.drawElementText(context, edge, null, drawLabel); }; context.lineJoin = 'round'; var ghost = edge.pstyle('ghost').value === 'yes'; if (ghost) { var gx = edge.pstyle('ghost-offset-x').pfValue; var gy = edge.pstyle('ghost-offset-y').pfValue; var ghostOpacity = edge.pstyle('ghost-opacity').value; var effectiveGhostOpacity = effectiveLineOpacity * ghostOpacity; context.translate(gx, gy); drawLine(effectiveGhostOpacity); drawArrows(effectiveGhostOpacity); context.translate(-gx, -gy); } drawUnderlay(); drawLine(); drawArrows(); drawOverlay(); drawText(); if (shiftToOriginWithBb) { context.translate(bb.x1, bb.y1); } }; var drawEdgeOverlayUnderlay = function drawEdgeOverlayUnderlay(overlayOrUnderlay) { if (!['overlay', 'underlay'].includes(overlayOrUnderlay)) { throw new Error('Invalid state'); } return function (context, edge) { if (!edge.visible()) { return; } var opacity = edge.pstyle("".concat(overlayOrUnderlay, "-opacity")).value; if (opacity === 0) { return; } var r = this; var usePaths = r.usePaths(); var rs = edge._private.rscratch; var padding = edge.pstyle("".concat(overlayOrUnderlay, "-padding")).pfValue; var width = 2 * padding; var color = edge.pstyle("".concat(overlayOrUnderlay, "-color")).value; context.lineWidth = width; if (rs.edgeType === 'self' && !usePaths) { context.lineCap = 'butt'; } else { context.lineCap = 'round'; } r.colorStrokeStyle(context, color[0], color[1], color[2], opacity); r.drawEdgePath(edge, context, rs.allpts, 'solid'); }; }; CRp$8.drawEdgeOverlay = drawEdgeOverlayUnderlay('overlay'); CRp$8.drawEdgeUnderlay = drawEdgeOverlayUnderlay('underlay'); CRp$8.drawEdgePath = function (edge, context, pts, type) { var rs = edge._private.rscratch; var canvasCxt = context; var path; var pathCacheHit = false; var usePaths = this.usePaths(); var lineDashPattern = edge.pstyle('line-dash-pattern').pfValue; var lineDashOffset = edge.pstyle('line-dash-offset').pfValue; if (usePaths) { var pathCacheKey = pts.join('$'); var keyMatches = rs.pathCacheKey && rs.pathCacheKey === pathCacheKey; if (keyMatches) { path = context = rs.pathCache; pathCacheHit = true; } else { path = context = new Path2D(); rs.pathCacheKey = pathCacheKey; rs.pathCache = path; } } if (canvasCxt.setLineDash) { // for very outofdate browsers switch (type) { case 'dotted': canvasCxt.setLineDash([1, 1]); break; case 'dashed': canvasCxt.setLineDash(lineDashPattern); canvasCxt.lineDashOffset = lineDashOffset; break; case 'solid': canvasCxt.setLineDash([]); break; } } if (!pathCacheHit && !rs.badLine) { if (context.beginPath) { context.beginPath(); } context.moveTo(pts[0], pts[1]); switch (rs.edgeType) { case 'bezier': case 'self': case 'compound': case 'multibezier': for (var i = 2; i + 3 < pts.length; i += 4) { context.quadraticCurveTo(pts[i], pts[i + 1], pts[i + 2], pts[i + 3]); } break; case 'straight': case 'segments': case 'haystack': for (var _i = 2; _i + 1 < pts.length; _i += 2) { context.lineTo(pts[_i], pts[_i + 1]); } break; } } context = canvasCxt; if (usePaths) { context.stroke(path); } else { context.stroke(); } // reset any line dashes if (context.setLineDash) { // for very outofdate browsers context.setLineDash([]); } }; CRp$8.drawEdgeTrianglePath = function (edge, context, pts) { // use line stroke style for triangle fill style context.fillStyle = context.strokeStyle; var edgeWidth = edge.pstyle('width').pfValue; for (var i = 0; i + 1 < pts.length; i += 2) { var vector = [pts[i + 2] - pts[i], pts[i + 3] - pts[i + 1]]; var length = Math.sqrt(vector[0] * vector[0] + vector[1] * vector[1]); var normal = [vector[1] / length, -vector[0] / length]; var triangleHead = [normal[0] * edgeWidth / 2, normal[1] * edgeWidth / 2]; context.beginPath(); context.moveTo(pts[i] - triangleHead[0], pts[i + 1] - triangleHead[1]); context.lineTo(pts[i] + triangleHead[0], pts[i + 1] + triangleHead[1]); context.lineTo(pts[i + 2], pts[i + 3]); context.closePath(); context.fill(); } }; CRp$8.drawArrowheads = function (context, edge, opacity) { var rs = edge._private.rscratch; var isHaystack = rs.edgeType === 'haystack'; if (!isHaystack) { this.drawArrowhead(context, edge, 'source', rs.arrowStartX, rs.arrowStartY, rs.srcArrowAngle, opacity); } this.drawArrowhead(context, edge, 'mid-target', rs.midX, rs.midY, rs.midtgtArrowAngle, opacity); this.drawArrowhead(context, edge, 'mid-source', rs.midX, rs.midY, rs.midsrcArrowAngle, opacity); if (!isHaystack) { this.drawArrowhead(context, edge, 'target', rs.arrowEndX, rs.arrowEndY, rs.tgtArrowAngle, opacity); } }; CRp$8.drawArrowhead = function (context, edge, prefix, x, y, angle, opacity) { if (isNaN(x) || x == null || isNaN(y) || y == null || isNaN(angle) || angle == null) { return; } var self = this; var arrowShape = edge.pstyle(prefix + '-arrow-shape').value; if (arrowShape === 'none') { return; } var arrowClearFill = edge.pstyle(prefix + '-arrow-fill').value === 'hollow' ? 'both' : 'filled'; var arrowFill = edge.pstyle(prefix + '-arrow-fill').value; var edgeWidth = edge.pstyle('width').pfValue; var edgeOpacity = edge.pstyle('opacity').value; if (opacity === undefined) { opacity = edgeOpacity; } var gco = context.globalCompositeOperation; if (opacity !== 1 || arrowFill === 'hollow') { // then extra clear is needed context.globalCompositeOperation = 'destination-out'; self.colorFillStyle(context, 255, 255, 255, 1); self.colorStrokeStyle(context, 255, 255, 255, 1); self.drawArrowShape(edge, context, arrowClearFill, edgeWidth, arrowShape, x, y, angle); context.globalCompositeOperation = gco; } // otherwise, the opaque arrow clears it for free :) var color = edge.pstyle(prefix + '-arrow-color').value; self.colorFillStyle(context, color[0], color[1], color[2], opacity); self.colorStrokeStyle(context, color[0], color[1], color[2], opacity); self.drawArrowShape(edge, context, arrowFill, edgeWidth, arrowShape, x, y, angle); }; CRp$8.drawArrowShape = function (edge, context, fill, edgeWidth, shape, x, y, angle) { var r = this; var usePaths = this.usePaths() && shape !== 'triangle-cross'; var pathCacheHit = false; var path; var canvasContext = context; var translation = { x: x, y: y }; var scale = edge.pstyle('arrow-scale').value; var size = this.getArrowWidth(edgeWidth, scale); var shapeImpl = r.arrowShapes[shape]; if (usePaths) { var cache = r.arrowPathCache = r.arrowPathCache || []; var key = hashString(shape); var cachedPath = cache[key]; if (cachedPath != null) { path = context = cachedPath; pathCacheHit = true; } else { path = context = new Path2D(); cache[key] = path; } } if (!pathCacheHit) { if (context.beginPath) { context.beginPath(); } if (usePaths) { // store in the path cache with values easily manipulated later shapeImpl.draw(context, 1, 0, { x: 0, y: 0 }, 1); } else { shapeImpl.draw(context, size, angle, translation, edgeWidth); } if (context.closePath) { context.closePath(); } } context = canvasContext; if (usePaths) { // set transform to arrow position/orientation context.translate(x, y); context.rotate(angle); context.scale(size, size); } if (fill === 'filled' || fill === 'both') { if (usePaths) { context.fill(path); } else { context.fill(); } } if (fill === 'hollow' || fill === 'both') { context.lineWidth = (shapeImpl.matchEdgeWidth ? edgeWidth : 1) / (usePaths ? size : 1); context.lineJoin = 'miter'; if (usePaths) { context.stroke(path); } else { context.stroke(); } } if (usePaths) { // reset transform by applying inverse context.scale(1 / size, 1 / size); context.rotate(-angle); context.translate(-x, -y); } }; var CRp$7 = {}; CRp$7.safeDrawImage = function (context, img, ix, iy, iw, ih, x, y, w, h) { // detect problematic cases for old browsers with bad images (cheaper than try-catch) if (iw <= 0 || ih <= 0 || w <= 0 || h <= 0) { return; } try { context.drawImage(img, ix, iy, iw, ih, x, y, w, h); } catch (e) { warn(e); } }; CRp$7.drawInscribedImage = function (context, img, node, index, nodeOpacity) { var r = this; var pos = node.position(); var nodeX = pos.x; var nodeY = pos.y; var styleObj = node.cy().style(); var getIndexedStyle = styleObj.getIndexedStyle.bind(styleObj); var fit = getIndexedStyle(node, 'background-fit', 'value', index); var repeat = getIndexedStyle(node, 'background-repeat', 'value', index); var nodeW = node.width(); var nodeH = node.height(); var paddingX2 = node.padding() * 2; var nodeTW = nodeW + (getIndexedStyle(node, 'background-width-relative-to', 'value', index) === 'inner' ? 0 : paddingX2); var nodeTH = nodeH + (getIndexedStyle(node, 'background-height-relative-to', 'value', index) === 'inner' ? 0 : paddingX2); var rs = node._private.rscratch; var clip = getIndexedStyle(node, 'background-clip', 'value', index); var shouldClip = clip === 'node'; var imgOpacity = getIndexedStyle(node, 'background-image-opacity', 'value', index) * nodeOpacity; var smooth = getIndexedStyle(node, 'background-image-smoothing', 'value', index); var imgW = img.width || img.cachedW; var imgH = img.height || img.cachedH; // workaround for broken browsers like ie if (null == imgW || null == imgH) { document.body.appendChild(img); // eslint-disable-line no-undef imgW = img.cachedW = img.width || img.offsetWidth; imgH = img.cachedH = img.height || img.offsetHeight; document.body.removeChild(img); // eslint-disable-line no-undef } var w = imgW; var h = imgH; if (getIndexedStyle(node, 'background-width', 'value', index) !== 'auto') { if (getIndexedStyle(node, 'background-width', 'units', index) === '%') { w = getIndexedStyle(node, 'background-width', 'pfValue', index) * nodeTW; } else { w = getIndexedStyle(node, 'background-width', 'pfValue', index); } } if (getIndexedStyle(node, 'background-height', 'value', index) !== 'auto') { if (getIndexedStyle(node, 'background-height', 'units', index) === '%') { h = getIndexedStyle(node, 'background-height', 'pfValue', index) * nodeTH; } else { h = getIndexedStyle(node, 'background-height', 'pfValue', index); } } if (w === 0 || h === 0) { return; // no point in drawing empty image (and chrome is broken in this case) } if (fit === 'contain') { var scale = Math.min(nodeTW / w, nodeTH / h); w *= scale; h *= scale; } else if (fit === 'cover') { var scale = Math.max(nodeTW / w, nodeTH / h); w *= scale; h *= scale; } var x = nodeX - nodeTW / 2; // left var posXUnits = getIndexedStyle(node, 'background-position-x', 'units', index); var posXPfVal = getIndexedStyle(node, 'background-position-x', 'pfValue', index); if (posXUnits === '%') { x += (nodeTW - w) * posXPfVal; } else { x += posXPfVal; } var offXUnits = getIndexedStyle(node, 'background-offset-x', 'units', index); var offXPfVal = getIndexedStyle(node, 'background-offset-x', 'pfValue', index); if (offXUnits === '%') { x += (nodeTW - w) * offXPfVal; } else { x += offXPfVal; } var y = nodeY - nodeTH / 2; // top var posYUnits = getIndexedStyle(node, 'background-position-y', 'units', index); var posYPfVal = getIndexedStyle(node, 'background-position-y', 'pfValue', index); if (posYUnits === '%') { y += (nodeTH - h) * posYPfVal; } else { y += posYPfVal; } var offYUnits = getIndexedStyle(node, 'background-offset-y', 'units', index); var offYPfVal = getIndexedStyle(node, 'background-offset-y', 'pfValue', index); if (offYUnits === '%') { y += (nodeTH - h) * offYPfVal; } else { y += offYPfVal; } if (rs.pathCache) { x -= nodeX; y -= nodeY; nodeX = 0; nodeY = 0; } var gAlpha = context.globalAlpha; context.globalAlpha = imgOpacity; var smoothingEnabled = r.getImgSmoothing(context); var isSmoothingSwitched = false; if (smooth === 'no' && smoothingEnabled) { r.setImgSmoothing(context, false); isSmoothingSwitched = true; } else if (smooth === 'yes' && !smoothingEnabled) { r.setImgSmoothing(context, true); isSmoothingSwitched = true; } if (repeat === 'no-repeat') { if (shouldClip) { context.save(); if (rs.pathCache) { context.clip(rs.pathCache); } else { r.nodeShapes[r.getNodeShape(node)].draw(context, nodeX, nodeY, nodeTW, nodeTH); context.clip(); } } r.safeDrawImage(context, img, 0, 0, imgW, imgH, x, y, w, h); if (shouldClip) { context.restore(); } } else { var pattern = context.createPattern(img, repeat); context.fillStyle = pattern; r.nodeShapes[r.getNodeShape(node)].draw(context, nodeX, nodeY, nodeTW, nodeTH); context.translate(x, y); context.fill(); context.translate(-x, -y); } context.globalAlpha = gAlpha; if (isSmoothingSwitched) { r.setImgSmoothing(context, smoothingEnabled); } }; var CRp$6 = {}; CRp$6.eleTextBiggerThanMin = function (ele, scale) { if (!scale) { var zoom = ele.cy().zoom(); var pxRatio = this.getPixelRatio(); var lvl = Math.ceil(log2(zoom * pxRatio)); // the effective texture level scale = Math.pow(2, lvl); } var computedSize = ele.pstyle('font-size').pfValue * scale; var minSize = ele.pstyle('min-zoomed-font-size').pfValue; if (computedSize < minSize) { return false; } return true; }; CRp$6.drawElementText = function (context, ele, shiftToOriginWithBb, force, prefix) { var useEleOpacity = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true; var r = this; if (force == null) { if (useEleOpacity && !r.eleTextBiggerThanMin(ele)) { return; } } else if (force === false) { return; } if (ele.isNode()) { var label = ele.pstyle('label'); if (!label || !label.value) { return; } var justification = r.getLabelJustification(ele); context.textAlign = justification; context.textBaseline = 'bottom'; } else { var badLine = ele.element()._private.rscratch.badLine; var _label = ele.pstyle('label'); var srcLabel = ele.pstyle('source-label'); var tgtLabel = ele.pstyle('target-label'); if (badLine || (!_label || !_label.value) && (!srcLabel || !srcLabel.value) && (!tgtLabel || !tgtLabel.value)) { return; } context.textAlign = 'center'; context.textBaseline = 'bottom'; } var applyRotation = !shiftToOriginWithBb; var bb; if (shiftToOriginWithBb) { bb = shiftToOriginWithBb; context.translate(-bb.x1, -bb.y1); } if (prefix == null) { r.drawText(context, ele, null, applyRotation, useEleOpacity); if (ele.isEdge()) { r.drawText(context, ele, 'source', applyRotation, useEleOpacity); r.drawText(context, ele, 'target', applyRotation, useEleOpacity); } } else { r.drawText(context, ele, prefix, applyRotation, useEleOpacity); } if (shiftToOriginWithBb) { context.translate(bb.x1, bb.y1); } }; CRp$6.getFontCache = function (context) { var cache; this.fontCaches = this.fontCaches || []; for (var i = 0; i < this.fontCaches.length; i++) { cache = this.fontCaches[i]; if (cache.context === context) { return cache; } } cache = { context: context }; this.fontCaches.push(cache); return cache; }; // set up canvas context with font // returns transformed text string CRp$6.setupTextStyle = function (context, ele) { var useEleOpacity = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; // Font style var labelStyle = ele.pstyle('font-style').strValue; var labelSize = ele.pstyle('font-size').pfValue + 'px'; var labelFamily = ele.pstyle('font-family').strValue; var labelWeight = ele.pstyle('font-weight').strValue; var opacity = useEleOpacity ? ele.effectiveOpacity() * ele.pstyle('text-opacity').value : 1; var outlineOpacity = ele.pstyle('text-outline-opacity').value * opacity; var color = ele.pstyle('color').value; var outlineColor = ele.pstyle('text-outline-color').value; context.font = labelStyle + ' ' + labelWeight + ' ' + labelSize + ' ' + labelFamily; context.lineJoin = 'round'; // so text outlines aren't jagged this.colorFillStyle(context, color[0], color[1], color[2], opacity); this.colorStrokeStyle(context, outlineColor[0], outlineColor[1], outlineColor[2], outlineOpacity); }; // TODO ensure re-used function roundRect(ctx, x, y, width, height) { var radius = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 5; ctx.beginPath(); ctx.moveTo(x + radius, y); ctx.lineTo(x + width - radius, y); ctx.quadraticCurveTo(x + width, y, x + width, y + radius); ctx.lineTo(x + width, y + height - radius); ctx.quadraticCurveTo(x + width, y + height, x + width - radius, y + height); ctx.lineTo(x + radius, y + height); ctx.quadraticCurveTo(x, y + height, x, y + height - radius); ctx.lineTo(x, y + radius); ctx.quadraticCurveTo(x, y, x + radius, y); ctx.closePath(); ctx.fill(); } CRp$6.getTextAngle = function (ele, prefix) { var theta; var _p = ele._private; var rscratch = _p.rscratch; var pdash = prefix ? prefix + '-' : ''; var rotation = ele.pstyle(pdash + 'text-rotation'); var textAngle = getPrefixedProperty(rscratch, 'labelAngle', prefix); if (rotation.strValue === 'autorotate') { theta = ele.isEdge() ? textAngle : 0; } else if (rotation.strValue === 'none') { theta = 0; } else { theta = rotation.pfValue; } return theta; }; CRp$6.drawText = function (context, ele, prefix) { var applyRotation = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true; var useEleOpacity = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true; var _p = ele._private; var rscratch = _p.rscratch; var parentOpacity = useEleOpacity ? ele.effectiveOpacity() : 1; if (useEleOpacity && (parentOpacity === 0 || ele.pstyle('text-opacity').value === 0)) { return; } // use 'main' as an alias for the main label (i.e. null prefix) if (prefix === 'main') { prefix = null; } var textX = getPrefixedProperty(rscratch, 'labelX', prefix); var textY = getPrefixedProperty(rscratch, 'labelY', prefix); var orgTextX, orgTextY; // used for rotation var text = this.getLabelText(ele, prefix); if (text != null && text !== '' && !isNaN(textX) && !isNaN(textY)) { this.setupTextStyle(context, ele, useEleOpacity); var pdash = prefix ? prefix + '-' : ''; var textW = getPrefixedProperty(rscratch, 'labelWidth', prefix); var textH = getPrefixedProperty(rscratch, 'labelHeight', prefix); var marginX = ele.pstyle(pdash + 'text-margin-x').pfValue; var marginY = ele.pstyle(pdash + 'text-margin-y').pfValue; var isEdge = ele.isEdge(); var halign = ele.pstyle('text-halign').value; var valign = ele.pstyle('text-valign').value; if (isEdge) { halign = 'center'; valign = 'center'; } textX += marginX; textY += marginY; var theta; if (!applyRotation) { theta = 0; } else { theta = this.getTextAngle(ele, prefix); } if (theta !== 0) { orgTextX = textX; orgTextY = textY; context.translate(orgTextX, orgTextY); context.rotate(theta); textX = 0; textY = 0; } switch (valign) { case 'top': break; case 'center': textY += textH / 2; break; case 'bottom': textY += textH; break; } var backgroundOpacity = ele.pstyle('text-background-opacity').value; var borderOpacity = ele.pstyle('text-border-opacity').value; var textBorderWidth = ele.pstyle('text-border-width').pfValue; var backgroundPadding = ele.pstyle('text-background-padding').pfValue; if (backgroundOpacity > 0 || textBorderWidth > 0 && borderOpacity > 0) { var bgX = textX - backgroundPadding; switch (halign) { case 'left': bgX -= textW; break; case 'center': bgX -= textW / 2; break; } var bgY = textY - textH - backgroundPadding; var bgW = textW + 2 * backgroundPadding; var bgH = textH + 2 * backgroundPadding; if (backgroundOpacity > 0) { var textFill = context.fillStyle; var textBackgroundColor = ele.pstyle('text-background-color').value; context.fillStyle = 'rgba(' + textBackgroundColor[0] + ',' + textBackgroundColor[1] + ',' + textBackgroundColor[2] + ',' + backgroundOpacity * parentOpacity + ')'; var styleShape = ele.pstyle('text-background-shape').strValue; if (styleShape.indexOf('round') === 0) { roundRect(context, bgX, bgY, bgW, bgH, 2); } else { context.fillRect(bgX, bgY, bgW, bgH); } context.fillStyle = textFill; } if (textBorderWidth > 0 && borderOpacity > 0) { var textStroke = context.strokeStyle; var textLineWidth = context.lineWidth; var textBorderColor = ele.pstyle('text-border-color').value; var textBorderStyle = ele.pstyle('text-border-style').value; context.strokeStyle = 'rgba(' + textBorderColor[0] + ',' + textBorderColor[1] + ',' + textBorderColor[2] + ',' + borderOpacity * parentOpacity + ')'; context.lineWidth = textBorderWidth; if (context.setLineDash) { // for very outofdate browsers switch (textBorderStyle) { case 'dotted': context.setLineDash([1, 1]); break; case 'dashed': context.setLineDash([4, 2]); break; case 'double': context.lineWidth = textBorderWidth / 4; // 50% reserved for white between the two borders context.setLineDash([]); break; case 'solid': context.setLineDash([]); break; } } context.strokeRect(bgX, bgY, bgW, bgH); if (textBorderStyle === 'double') { var whiteWidth = textBorderWidth / 2; context.strokeRect(bgX + whiteWidth, bgY + whiteWidth, bgW - whiteWidth * 2, bgH - whiteWidth * 2); } if (context.setLineDash) { // for very outofdate browsers context.setLineDash([]); } context.lineWidth = textLineWidth; context.strokeStyle = textStroke; } } var lineWidth = 2 * ele.pstyle('text-outline-width').pfValue; // *2 b/c the stroke is drawn centred on the middle if (lineWidth > 0) { context.lineWidth = lineWidth; } if (ele.pstyle('text-wrap').value === 'wrap') { var lines = getPrefixedProperty(rscratch, 'labelWrapCachedLines', prefix); var lineHeight = getPrefixedProperty(rscratch, 'labelLineHeight', prefix); var halfTextW = textW / 2; var justification = this.getLabelJustification(ele); if (justification === 'auto') ; else if (halign === 'left') { // auto justification : right if (justification === 'left') { textX += -textW; } else if (justification === 'center') { textX += -halfTextW; } // else same as auto } else if (halign === 'center') { // auto justfication : center if (justification === 'left') { textX += -halfTextW; } else if (justification === 'right') { textX += halfTextW; } // else same as auto } else if (halign === 'right') { // auto justification : left if (justification === 'center') { textX += halfTextW; } else if (justification === 'right') { textX += textW; } // else same as auto } switch (valign) { case 'top': textY -= (lines.length - 1) * lineHeight; break; case 'center': case 'bottom': textY -= (lines.length - 1) * lineHeight; break; } for (var l = 0; l < lines.length; l++) { if (lineWidth > 0) { context.strokeText(lines[l], textX, textY); } context.fillText(lines[l], textX, textY); textY += lineHeight; } } else { if (lineWidth > 0) { context.strokeText(text, textX, textY); } context.fillText(text, textX, textY); } if (theta !== 0) { context.rotate(-theta); context.translate(-orgTextX, -orgTextY); } } }; /* global Path2D */ var CRp$5 = {}; CRp$5.drawNode = function (context, node, shiftToOriginWithBb) { var drawLabel = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true; var shouldDrawOverlay = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true; var shouldDrawOpacity = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true; var r = this; var nodeWidth, nodeHeight; var _p = node._private; var rs = _p.rscratch; var pos = node.position(); if (!number$1(pos.x) || !number$1(pos.y)) { return; // can't draw node with undefined position } if (shouldDrawOpacity && !node.visible()) { return; } var eleOpacity = shouldDrawOpacity ? node.effectiveOpacity() : 1; var usePaths = r.usePaths(); var path; var pathCacheHit = false; var padding = node.padding(); nodeWidth = node.width() + 2 * padding; nodeHeight = node.height() + 2 * padding; // // setup shift var bb; if (shiftToOriginWithBb) { bb = shiftToOriginWithBb; context.translate(-bb.x1, -bb.y1); } // // load bg image var bgImgProp = node.pstyle('background-image'); var urls = bgImgProp.value; var urlDefined = new Array(urls.length); var image = new Array(urls.length); var numImages = 0; for (var i = 0; i < urls.length; i++) { var url = urls[i]; var defd = urlDefined[i] = url != null && url !== 'none'; if (defd) { var bgImgCrossOrigin = node.cy().style().getIndexedStyle(node, 'background-image-crossorigin', 'value', i); numImages++; // get image, and if not loaded then ask to redraw when later loaded image[i] = r.getCachedImage(url, bgImgCrossOrigin, function () { _p.backgroundTimestamp = Date.now(); node.emitAndNotify('background'); }); } } // // setup styles var darkness = node.pstyle('background-blacken').value; var borderWidth = node.pstyle('border-width').pfValue; var bgOpacity = node.pstyle('background-opacity').value * eleOpacity; var borderColor = node.pstyle('border-color').value; var borderStyle = node.pstyle('border-style').value; var borderOpacity = node.pstyle('border-opacity').value * eleOpacity; context.lineJoin = 'miter'; // so borders are square with the node shape var setupShapeColor = function setupShapeColor() { var bgOpy = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : bgOpacity; r.eleFillStyle(context, node, bgOpy); }; var setupBorderColor = function setupBorderColor() { var bdrOpy = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : borderOpacity; r.colorStrokeStyle(context, borderColor[0], borderColor[1], borderColor[2], bdrOpy); }; // // setup shape var styleShape = node.pstyle('shape').strValue; var shapePts = node.pstyle('shape-polygon-points').pfValue; if (usePaths) { context.translate(pos.x, pos.y); var pathCache = r.nodePathCache = r.nodePathCache || []; var key = hashStrings(styleShape === 'polygon' ? styleShape + ',' + shapePts.join(',') : styleShape, '' + nodeHeight, '' + nodeWidth); var cachedPath = pathCache[key]; if (cachedPath != null) { path = cachedPath; pathCacheHit = true; rs.pathCache = path; } else { path = new Path2D(); pathCache[key] = rs.pathCache = path; } } var drawShape = function drawShape() { if (!pathCacheHit) { var npos = pos; if (usePaths) { npos = { x: 0, y: 0 }; } r.nodeShapes[r.getNodeShape(node)].draw(path || context, npos.x, npos.y, nodeWidth, nodeHeight); } if (usePaths) { context.fill(path); } else { context.fill(); } }; var drawImages = function drawImages() { var nodeOpacity = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : eleOpacity; var inside = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; var prevBging = _p.backgrounding; var totalCompleted = 0; for (var _i = 0; _i < image.length; _i++) { var bgContainment = node.cy().style().getIndexedStyle(node, 'background-image-containment', 'value', _i); if (inside && bgContainment === 'over' || !inside && bgContainment === 'inside') { totalCompleted++; continue; } if (urlDefined[_i] && image[_i].complete && !image[_i].error) { totalCompleted++; r.drawInscribedImage(context, image[_i], node, _i, nodeOpacity); } } _p.backgrounding = !(totalCompleted === numImages); if (prevBging !== _p.backgrounding) { // update style b/c :backgrounding state changed node.updateStyle(false); } }; var drawPie = function drawPie() { var redrawShape = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; var pieOpacity = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : eleOpacity; if (r.hasPie(node)) { r.drawPie(context, node, pieOpacity); // redraw/restore path if steps after pie need it if (redrawShape) { if (!usePaths) { r.nodeShapes[r.getNodeShape(node)].draw(context, pos.x, pos.y, nodeWidth, nodeHeight); } } } }; var darken = function darken() { var darkenOpacity = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : eleOpacity; var opacity = (darkness > 0 ? darkness : -darkness) * darkenOpacity; var c = darkness > 0 ? 0 : 255; if (darkness !== 0) { r.colorFillStyle(context, c, c, c, opacity); if (usePaths) { context.fill(path); } else { context.fill(); } } }; var drawBorder = function drawBorder() { if (borderWidth > 0) { context.lineWidth = borderWidth; context.lineCap = 'butt'; if (context.setLineDash) { // for very outofdate browsers switch (borderStyle) { case 'dotted': context.setLineDash([1, 1]); break; case 'dashed': context.setLineDash([4, 2]); break; case 'solid': case 'double': context.setLineDash([]); break; } } if (usePaths) { context.stroke(path); } else { context.stroke(); } if (borderStyle === 'double') { context.lineWidth = borderWidth / 3; var gco = context.globalCompositeOperation; context.globalCompositeOperation = 'destination-out'; if (usePaths) { context.stroke(path); } else { context.stroke(); } context.globalCompositeOperation = gco; } // reset in case we changed the border style if (context.setLineDash) { // for very outofdate browsers context.setLineDash([]); } } }; var drawOverlay = function drawOverlay() { if (shouldDrawOverlay) { r.drawNodeOverlay(context, node, pos, nodeWidth, nodeHeight); } }; var drawUnderlay = function drawUnderlay() { if (shouldDrawOverlay) { r.drawNodeUnderlay(context, node, pos, nodeWidth, nodeHeight); } }; var drawText = function drawText() { r.drawElementText(context, node, null, drawLabel); }; var ghost = node.pstyle('ghost').value === 'yes'; if (ghost) { var gx = node.pstyle('ghost-offset-x').pfValue; var gy = node.pstyle('ghost-offset-y').pfValue; var ghostOpacity = node.pstyle('ghost-opacity').value; var effGhostOpacity = ghostOpacity * eleOpacity; context.translate(gx, gy); setupShapeColor(ghostOpacity * bgOpacity); drawShape(); drawImages(effGhostOpacity, true); setupBorderColor(ghostOpacity * borderOpacity); drawBorder(); drawPie(darkness !== 0 || borderWidth !== 0); drawImages(effGhostOpacity, false); darken(effGhostOpacity); context.translate(-gx, -gy); } if (usePaths) { context.translate(-pos.x, -pos.y); } drawUnderlay(); if (usePaths) { context.translate(pos.x, pos.y); } setupShapeColor(); drawShape(); drawImages(eleOpacity, true); setupBorderColor(); drawBorder(); drawPie(darkness !== 0 || borderWidth !== 0); drawImages(eleOpacity, false); darken(); if (usePaths) { context.translate(-pos.x, -pos.y); } drawText(); drawOverlay(); // // clean up shift if (shiftToOriginWithBb) { context.translate(bb.x1, bb.y1); } }; var drawNodeOverlayUnderlay = function drawNodeOverlayUnderlay(overlayOrUnderlay) { if (!['overlay', 'underlay'].includes(overlayOrUnderlay)) { throw new Error('Invalid state'); } return function (context, node, pos, nodeWidth, nodeHeight) { var r = this; if (!node.visible()) { return; } var padding = node.pstyle("".concat(overlayOrUnderlay, "-padding")).pfValue; var opacity = node.pstyle("".concat(overlayOrUnderlay, "-opacity")).value; var color = node.pstyle("".concat(overlayOrUnderlay, "-color")).value; var shape = node.pstyle("".concat(overlayOrUnderlay, "-shape")).value; if (opacity > 0) { pos = pos || node.position(); if (nodeWidth == null || nodeHeight == null) { var _padding = node.padding(); nodeWidth = node.width() + 2 * _padding; nodeHeight = node.height() + 2 * _padding; } r.colorFillStyle(context, color[0], color[1], color[2], opacity); r.nodeShapes[shape].draw(context, pos.x, pos.y, nodeWidth + padding * 2, nodeHeight + padding * 2); context.fill(); } }; }; CRp$5.drawNodeOverlay = drawNodeOverlayUnderlay('overlay'); CRp$5.drawNodeUnderlay = drawNodeOverlayUnderlay('underlay'); // does the node have at least one pie piece? CRp$5.hasPie = function (node) { node = node[0]; // ensure ele ref return node._private.hasPie; }; CRp$5.drawPie = function (context, node, nodeOpacity, pos) { node = node[0]; // ensure ele ref pos = pos || node.position(); var cyStyle = node.cy().style(); var pieSize = node.pstyle('pie-size'); var x = pos.x; var y = pos.y; var nodeW = node.width(); var nodeH = node.height(); var radius = Math.min(nodeW, nodeH) / 2; // must fit in node var lastPercent = 0; // what % to continue drawing pie slices from on [0, 1] var usePaths = this.usePaths(); if (usePaths) { x = 0; y = 0; } if (pieSize.units === '%') { radius = radius * pieSize.pfValue; } else if (pieSize.pfValue !== undefined) { radius = pieSize.pfValue / 2; } for (var i = 1; i <= cyStyle.pieBackgroundN; i++) { // 1..N var size = node.pstyle('pie-' + i + '-background-size').value; var color = node.pstyle('pie-' + i + '-background-color').value; var opacity = node.pstyle('pie-' + i + '-background-opacity').value * nodeOpacity; var percent = size / 100; // map integer range [0, 100] to [0, 1] // percent can't push beyond 1 if (percent + lastPercent > 1) { percent = 1 - lastPercent; } var angleStart = 1.5 * Math.PI + 2 * Math.PI * lastPercent; // start at 12 o'clock and go clockwise var angleDelta = 2 * Math.PI * percent; var angleEnd = angleStart + angleDelta; // ignore if // - zero size // - we're already beyond the full circle // - adding the current slice would go beyond the full circle if (size === 0 || lastPercent >= 1 || lastPercent + percent > 1) { continue; } context.beginPath(); context.moveTo(x, y); context.arc(x, y, radius, angleStart, angleEnd); context.closePath(); this.colorFillStyle(context, color[0], color[1], color[2], opacity); context.fill(); lastPercent += percent; } }; var CRp$4 = {}; var motionBlurDelay = 100; // var isFirefox = typeof InstallTrigger !== 'undefined'; CRp$4.getPixelRatio = function () { var context = this.data.contexts[0]; if (this.forcedPixelRatio != null) { return this.forcedPixelRatio; } var backingStore = context.backingStorePixelRatio || context.webkitBackingStorePixelRatio || context.mozBackingStorePixelRatio || context.msBackingStorePixelRatio || context.oBackingStorePixelRatio || context.backingStorePixelRatio || 1; return (window.devicePixelRatio || 1) / backingStore; // eslint-disable-line no-undef }; CRp$4.paintCache = function (context) { var caches = this.paintCaches = this.paintCaches || []; var needToCreateCache = true; var cache; for (var i = 0; i < caches.length; i++) { cache = caches[i]; if (cache.context === context) { needToCreateCache = false; break; } } if (needToCreateCache) { cache = { context: context }; caches.push(cache); } return cache; }; CRp$4.createGradientStyleFor = function (context, shapeStyleName, ele, fill, opacity) { var gradientStyle; var usePaths = this.usePaths(); var colors = ele.pstyle(shapeStyleName + '-gradient-stop-colors').value, positions = ele.pstyle(shapeStyleName + '-gradient-stop-positions').pfValue; if (fill === 'radial-gradient') { if (ele.isEdge()) { var start = ele.sourceEndpoint(), end = ele.targetEndpoint(), mid = ele.midpoint(); var d1 = dist(start, mid); var d2 = dist(end, mid); gradientStyle = context.createRadialGradient(mid.x, mid.y, 0, mid.x, mid.y, Math.max(d1, d2)); } else { var pos = usePaths ? { x: 0, y: 0 } : ele.position(), width = ele.paddedWidth(), height = ele.paddedHeight(); gradientStyle = context.createRadialGradient(pos.x, pos.y, 0, pos.x, pos.y, Math.max(width, height)); } } else { if (ele.isEdge()) { var _start = ele.sourceEndpoint(), _end = ele.targetEndpoint(); gradientStyle = context.createLinearGradient(_start.x, _start.y, _end.x, _end.y); } else { var _pos = usePaths ? { x: 0, y: 0 } : ele.position(), _width = ele.paddedWidth(), _height = ele.paddedHeight(), halfWidth = _width / 2, halfHeight = _height / 2; var direction = ele.pstyle('background-gradient-direction').value; switch (direction) { case 'to-bottom': gradientStyle = context.createLinearGradient(_pos.x, _pos.y - halfHeight, _pos.x, _pos.y + halfHeight); break; case 'to-top': gradientStyle = context.createLinearGradient(_pos.x, _pos.y + halfHeight, _pos.x, _pos.y - halfHeight); break; case 'to-left': gradientStyle = context.createLinearGradient(_pos.x + halfWidth, _pos.y, _pos.x - halfWidth, _pos.y); break; case 'to-right': gradientStyle = context.createLinearGradient(_pos.x - halfWidth, _pos.y, _pos.x + halfWidth, _pos.y); break; case 'to-bottom-right': case 'to-right-bottom': gradientStyle = context.createLinearGradient(_pos.x - halfWidth, _pos.y - halfHeight, _pos.x + halfWidth, _pos.y + halfHeight); break; case 'to-top-right': case 'to-right-top': gradientStyle = context.createLinearGradient(_pos.x - halfWidth, _pos.y + halfHeight, _pos.x + halfWidth, _pos.y - halfHeight); break; case 'to-bottom-left': case 'to-left-bottom': gradientStyle = context.createLinearGradient(_pos.x + halfWidth, _pos.y - halfHeight, _pos.x - halfWidth, _pos.y + halfHeight); break; case 'to-top-left': case 'to-left-top': gradientStyle = context.createLinearGradient(_pos.x + halfWidth, _pos.y + halfHeight, _pos.x - halfWidth, _pos.y - halfHeight); break; } } } if (!gradientStyle) return null; // invalid gradient style var hasPositions = positions.length === colors.length; var length = colors.length; for (var i = 0; i < length; i++) { gradientStyle.addColorStop(hasPositions ? positions[i] : i / (length - 1), 'rgba(' + colors[i][0] + ',' + colors[i][1] + ',' + colors[i][2] + ',' + opacity + ')'); } return gradientStyle; }; CRp$4.gradientFillStyle = function (context, ele, fill, opacity) { var gradientStyle = this.createGradientStyleFor(context, 'background', ele, fill, opacity); if (!gradientStyle) return null; // error context.fillStyle = gradientStyle; }; CRp$4.colorFillStyle = function (context, r, g, b, a) { context.fillStyle = 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')'; // turn off for now, seems context does its own caching // var cache = this.paintCache(context); // var fillStyle = 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')'; // if( cache.fillStyle !== fillStyle ){ // context.fillStyle = cache.fillStyle = fillStyle; // } }; CRp$4.eleFillStyle = function (context, ele, opacity) { var backgroundFill = ele.pstyle('background-fill').value; if (backgroundFill === 'linear-gradient' || backgroundFill === 'radial-gradient') { this.gradientFillStyle(context, ele, backgroundFill, opacity); } else { var backgroundColor = ele.pstyle('background-color').value; this.colorFillStyle(context, backgroundColor[0], backgroundColor[1], backgroundColor[2], opacity); } }; CRp$4.gradientStrokeStyle = function (context, ele, fill, opacity) { var gradientStyle = this.createGradientStyleFor(context, 'line', ele, fill, opacity); if (!gradientStyle) return null; // error context.strokeStyle = gradientStyle; }; CRp$4.colorStrokeStyle = function (context, r, g, b, a) { context.strokeStyle = 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')'; // turn off for now, seems context does its own caching // var cache = this.paintCache(context); // var strokeStyle = 'rgba(' + r + ',' + g + ',' + b + ',' + a + ')'; // if( cache.strokeStyle !== strokeStyle ){ // context.strokeStyle = cache.strokeStyle = strokeStyle; // } }; CRp$4.eleStrokeStyle = function (context, ele, opacity) { var lineFill = ele.pstyle('line-fill').value; if (lineFill === 'linear-gradient' || lineFill === 'radial-gradient') { this.gradientStrokeStyle(context, ele, lineFill, opacity); } else { var lineColor = ele.pstyle('line-color').value; this.colorStrokeStyle(context, lineColor[0], lineColor[1], lineColor[2], opacity); } }; // Resize canvas CRp$4.matchCanvasSize = function (container) { var r = this; var data = r.data; var bb = r.findContainerClientCoords(); var width = bb[2]; var height = bb[3]; var pixelRatio = r.getPixelRatio(); var mbPxRatio = r.motionBlurPxRatio; if (container === r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_NODE] || container === r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_DRAG]) { pixelRatio = mbPxRatio; } var canvasWidth = width * pixelRatio; var canvasHeight = height * pixelRatio; var canvas; if (canvasWidth === r.canvasWidth && canvasHeight === r.canvasHeight) { return; // save cycles if same } r.fontCaches = null; // resizing resets the style var canvasContainer = data.canvasContainer; canvasContainer.style.width = width + 'px'; canvasContainer.style.height = height + 'px'; for (var i = 0; i < r.CANVAS_LAYERS; i++) { canvas = data.canvases[i]; canvas.width = canvasWidth; canvas.height = canvasHeight; canvas.style.width = width + 'px'; canvas.style.height = height + 'px'; } for (var i = 0; i < r.BUFFER_COUNT; i++) { canvas = data.bufferCanvases[i]; canvas.width = canvasWidth; canvas.height = canvasHeight; canvas.style.width = width + 'px'; canvas.style.height = height + 'px'; } r.textureMult = 1; if (pixelRatio <= 1) { canvas = data.bufferCanvases[r.TEXTURE_BUFFER]; r.textureMult = 2; canvas.width = canvasWidth * r.textureMult; canvas.height = canvasHeight * r.textureMult; } r.canvasWidth = canvasWidth; r.canvasHeight = canvasHeight; }; CRp$4.renderTo = function (cxt, zoom, pan, pxRatio) { this.render({ forcedContext: cxt, forcedZoom: zoom, forcedPan: pan, drawAllLayers: true, forcedPxRatio: pxRatio }); }; CRp$4.render = function (options) { options = options || staticEmptyObject(); var forcedContext = options.forcedContext; var drawAllLayers = options.drawAllLayers; var drawOnlyNodeLayer = options.drawOnlyNodeLayer; var forcedZoom = options.forcedZoom; var forcedPan = options.forcedPan; var r = this; var pixelRatio = options.forcedPxRatio === undefined ? this.getPixelRatio() : options.forcedPxRatio; var cy = r.cy; var data = r.data; var needDraw = data.canvasNeedsRedraw; var textureDraw = r.textureOnViewport && !forcedContext && (r.pinching || r.hoverData.dragging || r.swipePanning || r.data.wheelZooming); var motionBlur = options.motionBlur !== undefined ? options.motionBlur : r.motionBlur; var mbPxRatio = r.motionBlurPxRatio; var hasCompoundNodes = cy.hasCompoundNodes(); var inNodeDragGesture = r.hoverData.draggingEles; var inBoxSelection = r.hoverData.selecting || r.touchData.selecting ? true : false; motionBlur = motionBlur && !forcedContext && r.motionBlurEnabled && !inBoxSelection; var motionBlurFadeEffect = motionBlur; if (!forcedContext) { if (r.prevPxRatio !== pixelRatio) { r.invalidateContainerClientCoordsCache(); r.matchCanvasSize(r.container); r.redrawHint('eles', true); r.redrawHint('drag', true); } r.prevPxRatio = pixelRatio; } if (!forcedContext && r.motionBlurTimeout) { clearTimeout(r.motionBlurTimeout); } if (motionBlur) { if (r.mbFrames == null) { r.mbFrames = 0; } r.mbFrames++; if (r.mbFrames < 3) { // need several frames before even high quality motionblur motionBlurFadeEffect = false; } // go to lower quality blurry frames when several m/b frames have been rendered (avoids flashing) if (r.mbFrames > r.minMbLowQualFrames) { //r.fullQualityMb = false; r.motionBlurPxRatio = r.mbPxRBlurry; } } if (r.clearingMotionBlur) { r.motionBlurPxRatio = 1; } // b/c drawToContext() may be async w.r.t. redraw(), keep track of last texture frame // because a rogue async texture frame would clear needDraw if (r.textureDrawLastFrame && !textureDraw) { needDraw[r.NODE] = true; needDraw[r.SELECT_BOX] = true; } var style = cy.style(); var zoom = cy.zoom(); var effectiveZoom = forcedZoom !== undefined ? forcedZoom : zoom; var pan = cy.pan(); var effectivePan = { x: pan.x, y: pan.y }; var vp = { zoom: zoom, pan: { x: pan.x, y: pan.y } }; var prevVp = r.prevViewport; var viewportIsDiff = prevVp === undefined || vp.zoom !== prevVp.zoom || vp.pan.x !== prevVp.pan.x || vp.pan.y !== prevVp.pan.y; // we want the low quality motionblur only when the viewport is being manipulated etc (where it's not noticed) if (!viewportIsDiff && !(inNodeDragGesture && !hasCompoundNodes)) { r.motionBlurPxRatio = 1; } if (forcedPan) { effectivePan = forcedPan; } // apply pixel ratio effectiveZoom *= pixelRatio; effectivePan.x *= pixelRatio; effectivePan.y *= pixelRatio; var eles = r.getCachedZSortedEles(); function mbclear(context, x, y, w, h) { var gco = context.globalCompositeOperation; context.globalCompositeOperation = 'destination-out'; r.colorFillStyle(context, 255, 255, 255, r.motionBlurTransparency); context.fillRect(x, y, w, h); context.globalCompositeOperation = gco; } function setContextTransform(context, clear) { var ePan, eZoom, w, h; if (!r.clearingMotionBlur && (context === data.bufferContexts[r.MOTIONBLUR_BUFFER_NODE] || context === data.bufferContexts[r.MOTIONBLUR_BUFFER_DRAG])) { ePan = { x: pan.x * mbPxRatio, y: pan.y * mbPxRatio }; eZoom = zoom * mbPxRatio; w = r.canvasWidth * mbPxRatio; h = r.canvasHeight * mbPxRatio; } else { ePan = effectivePan; eZoom = effectiveZoom; w = r.canvasWidth; h = r.canvasHeight; } context.setTransform(1, 0, 0, 1, 0, 0); if (clear === 'motionBlur') { mbclear(context, 0, 0, w, h); } else if (!forcedContext && (clear === undefined || clear)) { context.clearRect(0, 0, w, h); } if (!drawAllLayers) { context.translate(ePan.x, ePan.y); context.scale(eZoom, eZoom); } if (forcedPan) { context.translate(forcedPan.x, forcedPan.y); } if (forcedZoom) { context.scale(forcedZoom, forcedZoom); } } if (!textureDraw) { r.textureDrawLastFrame = false; } if (textureDraw) { r.textureDrawLastFrame = true; if (!r.textureCache) { r.textureCache = {}; r.textureCache.bb = cy.mutableElements().boundingBox(); r.textureCache.texture = r.data.bufferCanvases[r.TEXTURE_BUFFER]; var cxt = r.data.bufferContexts[r.TEXTURE_BUFFER]; cxt.setTransform(1, 0, 0, 1, 0, 0); cxt.clearRect(0, 0, r.canvasWidth * r.textureMult, r.canvasHeight * r.textureMult); r.render({ forcedContext: cxt, drawOnlyNodeLayer: true, forcedPxRatio: pixelRatio * r.textureMult }); var vp = r.textureCache.viewport = { zoom: cy.zoom(), pan: cy.pan(), width: r.canvasWidth, height: r.canvasHeight }; vp.mpan = { x: (0 - vp.pan.x) / vp.zoom, y: (0 - vp.pan.y) / vp.zoom }; } needDraw[r.DRAG] = false; needDraw[r.NODE] = false; var context = data.contexts[r.NODE]; var texture = r.textureCache.texture; var vp = r.textureCache.viewport; context.setTransform(1, 0, 0, 1, 0, 0); if (motionBlur) { mbclear(context, 0, 0, vp.width, vp.height); } else { context.clearRect(0, 0, vp.width, vp.height); } var outsideBgColor = style.core('outside-texture-bg-color').value; var outsideBgOpacity = style.core('outside-texture-bg-opacity').value; r.colorFillStyle(context, outsideBgColor[0], outsideBgColor[1], outsideBgColor[2], outsideBgOpacity); context.fillRect(0, 0, vp.width, vp.height); var zoom = cy.zoom(); setContextTransform(context, false); context.clearRect(vp.mpan.x, vp.mpan.y, vp.width / vp.zoom / pixelRatio, vp.height / vp.zoom / pixelRatio); context.drawImage(texture, vp.mpan.x, vp.mpan.y, vp.width / vp.zoom / pixelRatio, vp.height / vp.zoom / pixelRatio); } else if (r.textureOnViewport && !forcedContext) { // clear the cache since we don't need it r.textureCache = null; } var extent = cy.extent(); var vpManip = r.pinching || r.hoverData.dragging || r.swipePanning || r.data.wheelZooming || r.hoverData.draggingEles || r.cy.animated(); var hideEdges = r.hideEdgesOnViewport && vpManip; var needMbClear = []; needMbClear[r.NODE] = !needDraw[r.NODE] && motionBlur && !r.clearedForMotionBlur[r.NODE] || r.clearingMotionBlur; if (needMbClear[r.NODE]) { r.clearedForMotionBlur[r.NODE] = true; } needMbClear[r.DRAG] = !needDraw[r.DRAG] && motionBlur && !r.clearedForMotionBlur[r.DRAG] || r.clearingMotionBlur; if (needMbClear[r.DRAG]) { r.clearedForMotionBlur[r.DRAG] = true; } if (needDraw[r.NODE] || drawAllLayers || drawOnlyNodeLayer || needMbClear[r.NODE]) { var useBuffer = motionBlur && !needMbClear[r.NODE] && mbPxRatio !== 1; var context = forcedContext || (useBuffer ? r.data.bufferContexts[r.MOTIONBLUR_BUFFER_NODE] : data.contexts[r.NODE]); var clear = motionBlur && !useBuffer ? 'motionBlur' : undefined; setContextTransform(context, clear); if (hideEdges) { r.drawCachedNodes(context, eles.nondrag, pixelRatio, extent); } else { r.drawLayeredElements(context, eles.nondrag, pixelRatio, extent); } if (r.debug) { r.drawDebugPoints(context, eles.nondrag); } if (!drawAllLayers && !motionBlur) { needDraw[r.NODE] = false; } } if (!drawOnlyNodeLayer && (needDraw[r.DRAG] || drawAllLayers || needMbClear[r.DRAG])) { var useBuffer = motionBlur && !needMbClear[r.DRAG] && mbPxRatio !== 1; var context = forcedContext || (useBuffer ? r.data.bufferContexts[r.MOTIONBLUR_BUFFER_DRAG] : data.contexts[r.DRAG]); setContextTransform(context, motionBlur && !useBuffer ? 'motionBlur' : undefined); if (hideEdges) { r.drawCachedNodes(context, eles.drag, pixelRatio, extent); } else { r.drawCachedElements(context, eles.drag, pixelRatio, extent); } if (r.debug) { r.drawDebugPoints(context, eles.drag); } if (!drawAllLayers && !motionBlur) { needDraw[r.DRAG] = false; } } if (r.showFps || !drawOnlyNodeLayer && needDraw[r.SELECT_BOX] && !drawAllLayers) { var context = forcedContext || data.contexts[r.SELECT_BOX]; setContextTransform(context); if (r.selection[4] == 1 && (r.hoverData.selecting || r.touchData.selecting)) { var zoom = r.cy.zoom(); var borderWidth = style.core('selection-box-border-width').value / zoom; context.lineWidth = borderWidth; context.fillStyle = 'rgba(' + style.core('selection-box-color').value[0] + ',' + style.core('selection-box-color').value[1] + ',' + style.core('selection-box-color').value[2] + ',' + style.core('selection-box-opacity').value + ')'; context.fillRect(r.selection[0], r.selection[1], r.selection[2] - r.selection[0], r.selection[3] - r.selection[1]); if (borderWidth > 0) { context.strokeStyle = 'rgba(' + style.core('selection-box-border-color').value[0] + ',' + style.core('selection-box-border-color').value[1] + ',' + style.core('selection-box-border-color').value[2] + ',' + style.core('selection-box-opacity').value + ')'; context.strokeRect(r.selection[0], r.selection[1], r.selection[2] - r.selection[0], r.selection[3] - r.selection[1]); } } if (data.bgActivePosistion && !r.hoverData.selecting) { var zoom = r.cy.zoom(); var pos = data.bgActivePosistion; context.fillStyle = 'rgba(' + style.core('active-bg-color').value[0] + ',' + style.core('active-bg-color').value[1] + ',' + style.core('active-bg-color').value[2] + ',' + style.core('active-bg-opacity').value + ')'; context.beginPath(); context.arc(pos.x, pos.y, style.core('active-bg-size').pfValue / zoom, 0, 2 * Math.PI); context.fill(); } var timeToRender = r.lastRedrawTime; if (r.showFps && timeToRender) { timeToRender = Math.round(timeToRender); var fps = Math.round(1000 / timeToRender); context.setTransform(1, 0, 0, 1, 0, 0); context.fillStyle = 'rgba(255, 0, 0, 0.75)'; context.strokeStyle = 'rgba(255, 0, 0, 0.75)'; context.lineWidth = 1; context.fillText('1 frame = ' + timeToRender + ' ms = ' + fps + ' fps', 0, 20); var maxFps = 60; context.strokeRect(0, 30, 250, 20); context.fillRect(0, 30, 250 * Math.min(fps / maxFps, 1), 20); } if (!drawAllLayers) { needDraw[r.SELECT_BOX] = false; } } // motionblur: blit rendered blurry frames if (motionBlur && mbPxRatio !== 1) { var cxtNode = data.contexts[r.NODE]; var txtNode = r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_NODE]; var cxtDrag = data.contexts[r.DRAG]; var txtDrag = r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_DRAG]; var drawMotionBlur = function drawMotionBlur(cxt, txt, needClear) { cxt.setTransform(1, 0, 0, 1, 0, 0); if (needClear || !motionBlurFadeEffect) { cxt.clearRect(0, 0, r.canvasWidth, r.canvasHeight); } else { mbclear(cxt, 0, 0, r.canvasWidth, r.canvasHeight); } var pxr = mbPxRatio; cxt.drawImage(txt, // img 0, 0, // sx, sy r.canvasWidth * pxr, r.canvasHeight * pxr, // sw, sh 0, 0, // x, y r.canvasWidth, r.canvasHeight // w, h ); }; if (needDraw[r.NODE] || needMbClear[r.NODE]) { drawMotionBlur(cxtNode, txtNode, needMbClear[r.NODE]); needDraw[r.NODE] = false; } if (needDraw[r.DRAG] || needMbClear[r.DRAG]) { drawMotionBlur(cxtDrag, txtDrag, needMbClear[r.DRAG]); needDraw[r.DRAG] = false; } } r.prevViewport = vp; if (r.clearingMotionBlur) { r.clearingMotionBlur = false; r.motionBlurCleared = true; r.motionBlur = true; } if (motionBlur) { r.motionBlurTimeout = setTimeout(function () { r.motionBlurTimeout = null; r.clearedForMotionBlur[r.NODE] = false; r.clearedForMotionBlur[r.DRAG] = false; r.motionBlur = false; r.clearingMotionBlur = !textureDraw; r.mbFrames = 0; needDraw[r.NODE] = true; needDraw[r.DRAG] = true; r.redraw(); }, motionBlurDelay); } if (!forcedContext) { cy.emit('render'); } }; var CRp$3 = {}; // @O Polygon drawing CRp$3.drawPolygonPath = function (context, x, y, width, height, points) { var halfW = width / 2; var halfH = height / 2; if (context.beginPath) { context.beginPath(); } context.moveTo(x + halfW * points[0], y + halfH * points[1]); for (var i = 1; i < points.length / 2; i++) { context.lineTo(x + halfW * points[i * 2], y + halfH * points[i * 2 + 1]); } context.closePath(); }; CRp$3.drawRoundPolygonPath = function (context, x, y, width, height, points) { var halfW = width / 2; var halfH = height / 2; var cornerRadius = getRoundPolygonRadius(width, height); if (context.beginPath) { context.beginPath(); } for (var _i = 0; _i < points.length / 4; _i++) { var sourceUv = void 0, destUv = void 0; if (_i === 0) { sourceUv = points.length - 2; } else { sourceUv = _i * 4 - 2; } destUv = _i * 4 + 2; var px = x + halfW * points[_i * 4]; var py = y + halfH * points[_i * 4 + 1]; var cosTheta = -points[sourceUv] * points[destUv] - points[sourceUv + 1] * points[destUv + 1]; var offset = cornerRadius / Math.tan(Math.acos(cosTheta) / 2); var cp0x = px - offset * points[sourceUv]; var cp0y = py - offset * points[sourceUv + 1]; var cp1x = px + offset * points[destUv]; var cp1y = py + offset * points[destUv + 1]; if (_i === 0) { context.moveTo(cp0x, cp0y); } else { context.lineTo(cp0x, cp0y); } context.arcTo(px, py, cp1x, cp1y, cornerRadius); } context.closePath(); }; // Round rectangle drawing CRp$3.drawRoundRectanglePath = function (context, x, y, width, height) { var halfWidth = width / 2; var halfHeight = height / 2; var cornerRadius = getRoundRectangleRadius(width, height); if (context.beginPath) { context.beginPath(); } // Start at top middle context.moveTo(x, y - halfHeight); // Arc from middle top to right side context.arcTo(x + halfWidth, y - halfHeight, x + halfWidth, y, cornerRadius); // Arc from right side to bottom context.arcTo(x + halfWidth, y + halfHeight, x, y + halfHeight, cornerRadius); // Arc from bottom to left side context.arcTo(x - halfWidth, y + halfHeight, x - halfWidth, y, cornerRadius); // Arc from left side to topBorder context.arcTo(x - halfWidth, y - halfHeight, x, y - halfHeight, cornerRadius); // Join line context.lineTo(x, y - halfHeight); context.closePath(); }; CRp$3.drawBottomRoundRectanglePath = function (context, x, y, width, height) { var halfWidth = width / 2; var halfHeight = height / 2; var cornerRadius = getRoundRectangleRadius(width, height); if (context.beginPath) { context.beginPath(); } // Start at top middle context.moveTo(x, y - halfHeight); context.lineTo(x + halfWidth, y - halfHeight); context.lineTo(x + halfWidth, y); context.arcTo(x + halfWidth, y + halfHeight, x, y + halfHeight, cornerRadius); context.arcTo(x - halfWidth, y + halfHeight, x - halfWidth, y, cornerRadius); context.lineTo(x - halfWidth, y - halfHeight); context.lineTo(x, y - halfHeight); context.closePath(); }; CRp$3.drawCutRectanglePath = function (context, x, y, width, height) { var halfWidth = width / 2; var halfHeight = height / 2; var cornerLength = getCutRectangleCornerLength(); if (context.beginPath) { context.beginPath(); } context.moveTo(x - halfWidth + cornerLength, y - halfHeight); context.lineTo(x + halfWidth - cornerLength, y - halfHeight); context.lineTo(x + halfWidth, y - halfHeight + cornerLength); context.lineTo(x + halfWidth, y + halfHeight - cornerLength); context.lineTo(x + halfWidth - cornerLength, y + halfHeight); context.lineTo(x - halfWidth + cornerLength, y + halfHeight); context.lineTo(x - halfWidth, y + halfHeight - cornerLength); context.lineTo(x - halfWidth, y - halfHeight + cornerLength); context.closePath(); }; CRp$3.drawBarrelPath = function (context, x, y, width, height) { var halfWidth = width / 2; var halfHeight = height / 2; var xBegin = x - halfWidth; var xEnd = x + halfWidth; var yBegin = y - halfHeight; var yEnd = y + halfHeight; var barrelCurveConstants = getBarrelCurveConstants(width, height); var wOffset = barrelCurveConstants.widthOffset; var hOffset = barrelCurveConstants.heightOffset; var ctrlPtXOffset = barrelCurveConstants.ctrlPtOffsetPct * wOffset; if (context.beginPath) { context.beginPath(); } context.moveTo(xBegin, yBegin + hOffset); context.lineTo(xBegin, yEnd - hOffset); context.quadraticCurveTo(xBegin + ctrlPtXOffset, yEnd, xBegin + wOffset, yEnd); context.lineTo(xEnd - wOffset, yEnd); context.quadraticCurveTo(xEnd - ctrlPtXOffset, yEnd, xEnd, yEnd - hOffset); context.lineTo(xEnd, yBegin + hOffset); context.quadraticCurveTo(xEnd - ctrlPtXOffset, yBegin, xEnd - wOffset, yBegin); context.lineTo(xBegin + wOffset, yBegin); context.quadraticCurveTo(xBegin + ctrlPtXOffset, yBegin, xBegin, yBegin + hOffset); context.closePath(); }; var sin0 = Math.sin(0); var cos0 = Math.cos(0); var sin = {}; var cos = {}; var ellipseStepSize = Math.PI / 40; for (var i = 0 * Math.PI; i < 2 * Math.PI; i += ellipseStepSize) { sin[i] = Math.sin(i); cos[i] = Math.cos(i); } CRp$3.drawEllipsePath = function (context, centerX, centerY, width, height) { if (context.beginPath) { context.beginPath(); } if (context.ellipse) { context.ellipse(centerX, centerY, width / 2, height / 2, 0, 0, 2 * Math.PI); } else { var xPos, yPos; var rw = width / 2; var rh = height / 2; for (var i = 0 * Math.PI; i < 2 * Math.PI; i += ellipseStepSize) { xPos = centerX - rw * sin[i] * sin0 + rw * cos[i] * cos0; yPos = centerY + rh * cos[i] * sin0 + rh * sin[i] * cos0; if (i === 0) { context.moveTo(xPos, yPos); } else { context.lineTo(xPos, yPos); } } } context.closePath(); }; /* global atob, ArrayBuffer, Uint8Array, Blob */ var CRp$2 = {}; CRp$2.createBuffer = function (w, h) { var buffer = document.createElement('canvas'); // eslint-disable-line no-undef buffer.width = w; buffer.height = h; return [buffer, buffer.getContext('2d')]; }; CRp$2.bufferCanvasImage = function (options) { var cy = this.cy; var eles = cy.mutableElements(); var bb = eles.boundingBox(); var ctrRect = this.findContainerClientCoords(); var width = options.full ? Math.ceil(bb.w) : ctrRect[2]; var height = options.full ? Math.ceil(bb.h) : ctrRect[3]; var specdMaxDims = number$1(options.maxWidth) || number$1(options.maxHeight); var pxRatio = this.getPixelRatio(); var scale = 1; if (options.scale !== undefined) { width *= options.scale; height *= options.scale; scale = options.scale; } else if (specdMaxDims) { var maxScaleW = Infinity; var maxScaleH = Infinity; if (number$1(options.maxWidth)) { maxScaleW = scale * options.maxWidth / width; } if (number$1(options.maxHeight)) { maxScaleH = scale * options.maxHeight / height; } scale = Math.min(maxScaleW, maxScaleH); width *= scale; height *= scale; } if (!specdMaxDims) { width *= pxRatio; height *= pxRatio; scale *= pxRatio; } var buffCanvas = document.createElement('canvas'); // eslint-disable-line no-undef buffCanvas.width = width; buffCanvas.height = height; buffCanvas.style.width = width + 'px'; buffCanvas.style.height = height + 'px'; var buffCxt = buffCanvas.getContext('2d'); // Rasterize the layers, but only if container has nonzero size if (width > 0 && height > 0) { buffCxt.clearRect(0, 0, width, height); buffCxt.globalCompositeOperation = 'source-over'; var zsortedEles = this.getCachedZSortedEles(); if (options.full) { // draw the full bounds of the graph buffCxt.translate(-bb.x1 * scale, -bb.y1 * scale); buffCxt.scale(scale, scale); this.drawElements(buffCxt, zsortedEles); buffCxt.scale(1 / scale, 1 / scale); buffCxt.translate(bb.x1 * scale, bb.y1 * scale); } else { // draw the current view var pan = cy.pan(); var translation = { x: pan.x * scale, y: pan.y * scale }; scale *= cy.zoom(); buffCxt.translate(translation.x, translation.y); buffCxt.scale(scale, scale); this.drawElements(buffCxt, zsortedEles); buffCxt.scale(1 / scale, 1 / scale); buffCxt.translate(-translation.x, -translation.y); } // need to fill bg at end like this in order to fill cleared transparent pixels in jpgs if (options.bg) { buffCxt.globalCompositeOperation = 'destination-over'; buffCxt.fillStyle = options.bg; buffCxt.rect(0, 0, width, height); buffCxt.fill(); } } return buffCanvas; }; function b64ToBlob(b64, mimeType) { var bytes = atob(b64); var buff = new ArrayBuffer(bytes.length); var buffUint8 = new Uint8Array(buff); for (var i = 0; i < bytes.length; i++) { buffUint8[i] = bytes.charCodeAt(i); } return new Blob([buff], { type: mimeType }); } function b64UriToB64(b64uri) { var i = b64uri.indexOf(','); return b64uri.substr(i + 1); } function output(options, canvas, mimeType) { var getB64Uri = function getB64Uri() { return canvas.toDataURL(mimeType, options.quality); }; switch (options.output) { case 'blob-promise': return new Promise$1(function (resolve, reject) { try { canvas.toBlob(function (blob) { if (blob != null) { resolve(blob); } else { reject(new Error('`canvas.toBlob()` sent a null value in its callback')); } }, mimeType, options.quality); } catch (err) { reject(err); } }); case 'blob': return b64ToBlob(b64UriToB64(getB64Uri()), mimeType); case 'base64': return b64UriToB64(getB64Uri()); case 'base64uri': default: return getB64Uri(); } } CRp$2.png = function (options) { return output(options, this.bufferCanvasImage(options), 'image/png'); }; CRp$2.jpg = function (options) { return output(options, this.bufferCanvasImage(options), 'image/jpeg'); }; var CRp$1 = {}; CRp$1.nodeShapeImpl = function (name, context, centerX, centerY, width, height, points) { switch (name) { case 'ellipse': return this.drawEllipsePath(context, centerX, centerY, width, height); case 'polygon': return this.drawPolygonPath(context, centerX, centerY, width, height, points); case 'round-polygon': return this.drawRoundPolygonPath(context, centerX, centerY, width, height, points); case 'roundrectangle': case 'round-rectangle': return this.drawRoundRectanglePath(context, centerX, centerY, width, height); case 'cutrectangle': case 'cut-rectangle': return this.drawCutRectanglePath(context, centerX, centerY, width, height); case 'bottomroundrectangle': case 'bottom-round-rectangle': return this.drawBottomRoundRectanglePath(context, centerX, centerY, width, height); case 'barrel': return this.drawBarrelPath(context, centerX, centerY, width, height); } }; var CR = CanvasRenderer; var CRp = CanvasRenderer.prototype; CRp.CANVAS_LAYERS = 3; // CRp.SELECT_BOX = 0; CRp.DRAG = 1; CRp.NODE = 2; CRp.BUFFER_COUNT = 3; // CRp.TEXTURE_BUFFER = 0; CRp.MOTIONBLUR_BUFFER_NODE = 1; CRp.MOTIONBLUR_BUFFER_DRAG = 2; function CanvasRenderer(options) { var r = this; r.data = { canvases: new Array(CRp.CANVAS_LAYERS), contexts: new Array(CRp.CANVAS_LAYERS), canvasNeedsRedraw: new Array(CRp.CANVAS_LAYERS), bufferCanvases: new Array(CRp.BUFFER_COUNT), bufferContexts: new Array(CRp.CANVAS_LAYERS) }; var tapHlOffAttr = '-webkit-tap-highlight-color'; var tapHlOffStyle = 'rgba(0,0,0,0)'; r.data.canvasContainer = document.createElement('div'); // eslint-disable-line no-undef var containerStyle = r.data.canvasContainer.style; r.data.canvasContainer.style[tapHlOffAttr] = tapHlOffStyle; containerStyle.position = 'relative'; containerStyle.zIndex = '0'; containerStyle.overflow = 'hidden'; var container = options.cy.container(); container.appendChild(r.data.canvasContainer); container.style[tapHlOffAttr] = tapHlOffStyle; var styleMap = { '-webkit-user-select': 'none', '-moz-user-select': '-moz-none', 'user-select': 'none', '-webkit-tap-highlight-color': 'rgba(0,0,0,0)', 'outline-style': 'none' }; if (ms()) { styleMap['-ms-touch-action'] = 'none'; styleMap['touch-action'] = 'none'; } for (var i = 0; i < CRp.CANVAS_LAYERS; i++) { var canvas = r.data.canvases[i] = document.createElement('canvas'); // eslint-disable-line no-undef r.data.contexts[i] = canvas.getContext('2d'); Object.keys(styleMap).forEach(function (k) { canvas.style[k] = styleMap[k]; }); canvas.style.position = 'absolute'; canvas.setAttribute('data-id', 'layer' + i); canvas.style.zIndex = String(CRp.CANVAS_LAYERS - i); r.data.canvasContainer.appendChild(canvas); r.data.canvasNeedsRedraw[i] = false; } r.data.topCanvas = r.data.canvases[0]; r.data.canvases[CRp.NODE].setAttribute('data-id', 'layer' + CRp.NODE + '-node'); r.data.canvases[CRp.SELECT_BOX].setAttribute('data-id', 'layer' + CRp.SELECT_BOX + '-selectbox'); r.data.canvases[CRp.DRAG].setAttribute('data-id', 'layer' + CRp.DRAG + '-drag'); for (var i = 0; i < CRp.BUFFER_COUNT; i++) { r.data.bufferCanvases[i] = document.createElement('canvas'); // eslint-disable-line no-undef r.data.bufferContexts[i] = r.data.bufferCanvases[i].getContext('2d'); r.data.bufferCanvases[i].style.position = 'absolute'; r.data.bufferCanvases[i].setAttribute('data-id', 'buffer' + i); r.data.bufferCanvases[i].style.zIndex = String(-i - 1); r.data.bufferCanvases[i].style.visibility = 'hidden'; //r.data.canvasContainer.appendChild(r.data.bufferCanvases[i]); } r.pathsEnabled = true; var emptyBb = makeBoundingBox(); var getBoxCenter = function getBoxCenter(bb) { return { x: (bb.x1 + bb.x2) / 2, y: (bb.y1 + bb.y2) / 2 }; }; var getCenterOffset = function getCenterOffset(bb) { return { x: -bb.w / 2, y: -bb.h / 2 }; }; var backgroundTimestampHasChanged = function backgroundTimestampHasChanged(ele) { var _p = ele[0]._private; var same = _p.oldBackgroundTimestamp === _p.backgroundTimestamp; return !same; }; var getStyleKey = function getStyleKey(ele) { return ele[0]._private.nodeKey; }; var getLabelKey = function getLabelKey(ele) { return ele[0]._private.labelStyleKey; }; var getSourceLabelKey = function getSourceLabelKey(ele) { return ele[0]._private.sourceLabelStyleKey; }; var getTargetLabelKey = function getTargetLabelKey(ele) { return ele[0]._private.targetLabelStyleKey; }; var drawElement = function drawElement(context, ele, bb, scaledLabelShown, useEleOpacity) { return r.drawElement(context, ele, bb, false, false, useEleOpacity); }; var drawLabel = function drawLabel(context, ele, bb, scaledLabelShown, useEleOpacity) { return r.drawElementText(context, ele, bb, scaledLabelShown, 'main', useEleOpacity); }; var drawSourceLabel = function drawSourceLabel(context, ele, bb, scaledLabelShown, useEleOpacity) { return r.drawElementText(context, ele, bb, scaledLabelShown, 'source', useEleOpacity); }; var drawTargetLabel = function drawTargetLabel(context, ele, bb, scaledLabelShown, useEleOpacity) { return r.drawElementText(context, ele, bb, scaledLabelShown, 'target', useEleOpacity); }; var getElementBox = function getElementBox(ele) { ele.boundingBox(); return ele[0]._private.bodyBounds; }; var getLabelBox = function getLabelBox(ele) { ele.boundingBox(); return ele[0]._private.labelBounds.main || emptyBb; }; var getSourceLabelBox = function getSourceLabelBox(ele) { ele.boundingBox(); return ele[0]._private.labelBounds.source || emptyBb; }; var getTargetLabelBox = function getTargetLabelBox(ele) { ele.boundingBox(); return ele[0]._private.labelBounds.target || emptyBb; }; var isLabelVisibleAtScale = function isLabelVisibleAtScale(ele, scaledLabelShown) { return scaledLabelShown; }; var getElementRotationPoint = function getElementRotationPoint(ele) { return getBoxCenter(getElementBox(ele)); }; var addTextMargin = function addTextMargin(prefix, pt, ele) { var pre = prefix ? prefix + '-' : ''; return { x: pt.x + ele.pstyle(pre + 'text-margin-x').pfValue, y: pt.y + ele.pstyle(pre + 'text-margin-y').pfValue }; }; var getRsPt = function getRsPt(ele, x, y) { var rs = ele[0]._private.rscratch; return { x: rs[x], y: rs[y] }; }; var getLabelRotationPoint = function getLabelRotationPoint(ele) { return addTextMargin('', getRsPt(ele, 'labelX', 'labelY'), ele); }; var getSourceLabelRotationPoint = function getSourceLabelRotationPoint(ele) { return addTextMargin('source', getRsPt(ele, 'sourceLabelX', 'sourceLabelY'), ele); }; var getTargetLabelRotationPoint = function getTargetLabelRotationPoint(ele) { return addTextMargin('target', getRsPt(ele, 'targetLabelX', 'targetLabelY'), ele); }; var getElementRotationOffset = function getElementRotationOffset(ele) { return getCenterOffset(getElementBox(ele)); }; var getSourceLabelRotationOffset = function getSourceLabelRotationOffset(ele) { return getCenterOffset(getSourceLabelBox(ele)); }; var getTargetLabelRotationOffset = function getTargetLabelRotationOffset(ele) { return getCenterOffset(getTargetLabelBox(ele)); }; var getLabelRotationOffset = function getLabelRotationOffset(ele) { var bb = getLabelBox(ele); var p = getCenterOffset(getLabelBox(ele)); if (ele.isNode()) { switch (ele.pstyle('text-halign').value) { case 'left': p.x = -bb.w; break; case 'right': p.x = 0; break; } switch (ele.pstyle('text-valign').value) { case 'top': p.y = -bb.h; break; case 'bottom': p.y = 0; break; } } return p; }; var eleTxrCache = r.data.eleTxrCache = new ElementTextureCache(r, { getKey: getStyleKey, doesEleInvalidateKey: backgroundTimestampHasChanged, drawElement: drawElement, getBoundingBox: getElementBox, getRotationPoint: getElementRotationPoint, getRotationOffset: getElementRotationOffset, allowEdgeTxrCaching: false, allowParentTxrCaching: false }); var lblTxrCache = r.data.lblTxrCache = new ElementTextureCache(r, { getKey: getLabelKey, drawElement: drawLabel, getBoundingBox: getLabelBox, getRotationPoint: getLabelRotationPoint, getRotationOffset: getLabelRotationOffset, isVisible: isLabelVisibleAtScale }); var slbTxrCache = r.data.slbTxrCache = new ElementTextureCache(r, { getKey: getSourceLabelKey, drawElement: drawSourceLabel, getBoundingBox: getSourceLabelBox, getRotationPoint: getSourceLabelRotationPoint, getRotationOffset: getSourceLabelRotationOffset, isVisible: isLabelVisibleAtScale }); var tlbTxrCache = r.data.tlbTxrCache = new ElementTextureCache(r, { getKey: getTargetLabelKey, drawElement: drawTargetLabel, getBoundingBox: getTargetLabelBox, getRotationPoint: getTargetLabelRotationPoint, getRotationOffset: getTargetLabelRotationOffset, isVisible: isLabelVisibleAtScale }); var lyrTxrCache = r.data.lyrTxrCache = new LayeredTextureCache(r); r.onUpdateEleCalcs(function invalidateTextureCaches(willDraw, eles) { // each cache should check for sub-key diff to see that the update affects that cache particularly eleTxrCache.invalidateElements(eles); lblTxrCache.invalidateElements(eles); slbTxrCache.invalidateElements(eles); tlbTxrCache.invalidateElements(eles); // any change invalidates the layers lyrTxrCache.invalidateElements(eles); // update the old bg timestamp so diffs can be done in the ele txr caches for (var _i = 0; _i < eles.length; _i++) { var _p = eles[_i]._private; _p.oldBackgroundTimestamp = _p.backgroundTimestamp; } }); var refineInLayers = function refineInLayers(reqs) { for (var i = 0; i < reqs.length; i++) { lyrTxrCache.enqueueElementRefinement(reqs[i].ele); } }; eleTxrCache.onDequeue(refineInLayers); lblTxrCache.onDequeue(refineInLayers); slbTxrCache.onDequeue(refineInLayers); tlbTxrCache.onDequeue(refineInLayers); } CRp.redrawHint = function (group, bool) { var r = this; switch (group) { case 'eles': r.data.canvasNeedsRedraw[CRp.NODE] = bool; break; case 'drag': r.data.canvasNeedsRedraw[CRp.DRAG] = bool; break; case 'select': r.data.canvasNeedsRedraw[CRp.SELECT_BOX] = bool; break; } }; // whether to use Path2D caching for drawing var pathsImpld = typeof Path2D !== 'undefined'; CRp.path2dEnabled = function (on) { if (on === undefined) { return this.pathsEnabled; } this.pathsEnabled = on ? true : false; }; CRp.usePaths = function () { return pathsImpld && this.pathsEnabled; }; CRp.setImgSmoothing = function (context, bool) { if (context.imageSmoothingEnabled != null) { context.imageSmoothingEnabled = bool; } else { context.webkitImageSmoothingEnabled = bool; context.mozImageSmoothingEnabled = bool; context.msImageSmoothingEnabled = bool; } }; CRp.getImgSmoothing = function (context) { if (context.imageSmoothingEnabled != null) { return context.imageSmoothingEnabled; } else { return context.webkitImageSmoothingEnabled || context.mozImageSmoothingEnabled || context.msImageSmoothingEnabled; } }; CRp.makeOffscreenCanvas = function (width, height) { var canvas; if ((typeof OffscreenCanvas === "undefined" ? "undefined" : _typeof(OffscreenCanvas)) !== ("undefined" )) { canvas = new OffscreenCanvas(width, height); } else { canvas = document.createElement('canvas'); // eslint-disable-line no-undef canvas.width = width; canvas.height = height; } return canvas; }; [CRp$a, CRp$9, CRp$8, CRp$7, CRp$6, CRp$5, CRp$4, CRp$3, CRp$2, CRp$1].forEach(function (props) { extend(CRp, props); }); var renderer = [{ name: 'null', impl: NullRenderer }, { name: 'base', impl: BR }, { name: 'canvas', impl: CR }]; var incExts = [{ type: 'layout', extensions: layout }, { type: 'renderer', extensions: renderer }]; var extensions = {}; // registered modules for extensions, indexed by name var modules = {}; function setExtension(type, name, registrant) { var ext = registrant; var overrideErr = function overrideErr(field) { warn('Can not register `' + name + '` for `' + type + '` since `' + field + '` already exists in the prototype and can not be overridden'); }; if (type === 'core') { if (Core.prototype[name]) { return overrideErr(name); } else { Core.prototype[name] = registrant; } } else if (type === 'collection') { if (Collection.prototype[name]) { return overrideErr(name); } else { Collection.prototype[name] = registrant; } } else if (type === 'layout') { // fill in missing layout functions in the prototype var Layout = function Layout(options) { this.options = options; registrant.call(this, options); // make sure layout has _private for use w/ std apis like .on() if (!plainObject(this._private)) { this._private = {}; } this._private.cy = options.cy; this._private.listeners = []; this.createEmitter(); }; var layoutProto = Layout.prototype = Object.create(registrant.prototype); var optLayoutFns = []; for (var i = 0; i < optLayoutFns.length; i++) { var fnName = optLayoutFns[i]; layoutProto[fnName] = layoutProto[fnName] || function () { return this; }; } // either .start() or .run() is defined, so autogen the other if (layoutProto.start && !layoutProto.run) { layoutProto.run = function () { this.start(); return this; }; } else if (!layoutProto.start && layoutProto.run) { layoutProto.start = function () { this.run(); return this; }; } var regStop = registrant.prototype.stop; layoutProto.stop = function () { var opts = this.options; if (opts && opts.animate) { var anis = this.animations; if (anis) { for (var _i = 0; _i < anis.length; _i++) { anis[_i].stop(); } } } if (regStop) { regStop.call(this); } else { this.emit('layoutstop'); } return this; }; if (!layoutProto.destroy) { layoutProto.destroy = function () { return this; }; } layoutProto.cy = function () { return this._private.cy; }; var getCy = function getCy(layout) { return layout._private.cy; }; var emitterOpts = { addEventFields: function addEventFields(layout, evt) { evt.layout = layout; evt.cy = getCy(layout); evt.target = layout; }, bubble: function bubble() { return true; }, parent: function parent(layout) { return getCy(layout); } }; extend(layoutProto, { createEmitter: function createEmitter() { this._private.emitter = new Emitter(emitterOpts, this); return this; }, emitter: function emitter() { return this._private.emitter; }, on: function on(evt, cb) { this.emitter().on(evt, cb); return this; }, one: function one(evt, cb) { this.emitter().one(evt, cb); return this; }, once: function once(evt, cb) { this.emitter().one(evt, cb); return this; }, removeListener: function removeListener(evt, cb) { this.emitter().removeListener(evt, cb); return this; }, removeAllListeners: function removeAllListeners() { this.emitter().removeAllListeners(); return this; }, emit: function emit(evt, params) { this.emitter().emit(evt, params); return this; } }); define.eventAliasesOn(layoutProto); ext = Layout; // replace with our wrapped layout } else if (type === 'renderer' && name !== 'null' && name !== 'base') { // user registered renderers inherit from base var BaseRenderer = getExtension('renderer', 'base'); var bProto = BaseRenderer.prototype; var RegistrantRenderer = registrant; var rProto = registrant.prototype; var Renderer = function Renderer() { BaseRenderer.apply(this, arguments); RegistrantRenderer.apply(this, arguments); }; var proto = Renderer.prototype; for (var pName in bProto) { var pVal = bProto[pName]; var existsInR = rProto[pName] != null; if (existsInR) { return overrideErr(pName); } proto[pName] = pVal; // take impl from base } for (var _pName in rProto) { proto[_pName] = rProto[_pName]; // take impl from registrant } bProto.clientFunctions.forEach(function (name) { proto[name] = proto[name] || function () { error('Renderer does not implement `renderer.' + name + '()` on its prototype'); }; }); ext = Renderer; } else if (type === '__proto__' || type === 'constructor' || type === 'prototype') { // to avoid potential prototype pollution return error(type + ' is an illegal type to be registered, possibly lead to prototype pollutions'); } return setMap({ map: extensions, keys: [type, name], value: ext }); } function getExtension(type, name) { return getMap({ map: extensions, keys: [type, name] }); } function setModule(type, name, moduleType, moduleName, registrant) { return setMap({ map: modules, keys: [type, name, moduleType, moduleName], value: registrant }); } function getModule(type, name, moduleType, moduleName) { return getMap({ map: modules, keys: [type, name, moduleType, moduleName] }); } var extension = function extension() { // e.g. extension('renderer', 'svg') if (arguments.length === 2) { return getExtension.apply(null, arguments); } // e.g. extension('renderer', 'svg', { ... }) else if (arguments.length === 3) { return setExtension.apply(null, arguments); } // e.g. extension('renderer', 'svg', 'nodeShape', 'ellipse') else if (arguments.length === 4) { return getModule.apply(null, arguments); } // e.g. extension('renderer', 'svg', 'nodeShape', 'ellipse', { ... }) else if (arguments.length === 5) { return setModule.apply(null, arguments); } else { error('Invalid extension access syntax'); } }; // allows a core instance to access extensions internally Core.prototype.extension = extension; // included extensions incExts.forEach(function (group) { group.extensions.forEach(function (ext) { setExtension(group.type, ext.name, ext.impl); }); }); // (useful for init) var Stylesheet = function Stylesheet() { if (!(this instanceof Stylesheet)) { return new Stylesheet(); } this.length = 0; }; var sheetfn = Stylesheet.prototype; sheetfn.instanceString = function () { return 'stylesheet'; }; // just store the selector to be parsed later sheetfn.selector = function (selector) { var i = this.length++; this[i] = { selector: selector, properties: [] }; return this; // chaining }; // just store the property to be parsed later sheetfn.css = function (name, value) { var i = this.length - 1; if (string(name)) { this[i].properties.push({ name: name, value: value }); } else if (plainObject(name)) { var map = name; var propNames = Object.keys(map); for (var j = 0; j < propNames.length; j++) { var key = propNames[j]; var mapVal = map[key]; if (mapVal == null) { continue; } var prop = Style.properties[key] || Style.properties[dash2camel(key)]; if (prop == null) { continue; } var _name = prop.name; var _value = mapVal; this[i].properties.push({ name: _name, value: _value }); } } return this; // chaining }; sheetfn.style = sheetfn.css; // generate a real style object from the dummy stylesheet sheetfn.generateStyle = function (cy) { var style = new Style(cy); return this.appendToStyle(style); }; // append a dummy stylesheet object on a real style object sheetfn.appendToStyle = function (style) { for (var i = 0; i < this.length; i++) { var context = this[i]; var selector = context.selector; var props = context.properties; style.selector(selector); // apply selector for (var j = 0; j < props.length; j++) { var prop = props[j]; style.css(prop.name, prop.value); // apply property } } return style; }; var version = "3.25.0"; var cytoscape = function cytoscape(options) { // if no options specified, use default if (options === undefined) { options = {}; } // create instance if (plainObject(options)) { return new Core(options); } // allow for registration of extensions else if (string(options)) { return extension.apply(extension, arguments); } }; // e.g. cytoscape.use( require('cytoscape-foo'), bar ) cytoscape.use = function (ext) { var args = Array.prototype.slice.call(arguments, 1); // args to pass to ext args.unshift(cytoscape); // cytoscape is first arg to ext ext.apply(null, args); return this; }; cytoscape.warnings = function (bool) { return warnings(bool); }; // replaced by build system cytoscape.version = version; // expose public apis (mostly for extensions) cytoscape.stylesheet = cytoscape.Stylesheet = Stylesheet; module.exports = cytoscape; /***/ }), /***/ "./node_modules/dagre/index.js": /*!*************************************!*\ !*** ./node_modules/dagre/index.js ***! \*************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { /* Copyright (c) 2012-2014 Chris Pettitt Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ module.exports = { graphlib: __webpack_require__(/*! ./lib/graphlib */ "./node_modules/dagre/lib/graphlib.js"), layout: __webpack_require__(/*! ./lib/layout */ "./node_modules/dagre/lib/layout.js"), debug: __webpack_require__(/*! ./lib/debug */ "./node_modules/dagre/lib/debug.js"), util: { time: (__webpack_require__(/*! ./lib/util */ "./node_modules/dagre/lib/util.js").time), notime: (__webpack_require__(/*! ./lib/util */ "./node_modules/dagre/lib/util.js").notime) }, version: __webpack_require__(/*! ./lib/version */ "./node_modules/dagre/lib/version.js") }; /***/ }), /***/ "./node_modules/dagre/lib/acyclic.js": /*!*******************************************!*\ !*** ./node_modules/dagre/lib/acyclic.js ***! \*******************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre/lib/lodash.js"); var greedyFAS = __webpack_require__(/*! ./greedy-fas */ "./node_modules/dagre/lib/greedy-fas.js"); module.exports = { run: run, undo: undo }; function run(g) { var fas = (g.graph().acyclicer === "greedy" ? greedyFAS(g, weightFn(g)) : dfsFAS(g)); _.forEach(fas, function(e) { var label = g.edge(e); g.removeEdge(e); label.forwardName = e.name; label.reversed = true; g.setEdge(e.w, e.v, label, _.uniqueId("rev")); }); function weightFn(g) { return function(e) { return g.edge(e).weight; }; } } function dfsFAS(g) { var fas = []; var stack = {}; var visited = {}; function dfs(v) { if (_.has(visited, v)) { return; } visited[v] = true; stack[v] = true; _.forEach(g.outEdges(v), function(e) { if (_.has(stack, e.w)) { fas.push(e); } else { dfs(e.w); } }); delete stack[v]; } _.forEach(g.nodes(), dfs); return fas; } function undo(g) { _.forEach(g.edges(), function(e) { var label = g.edge(e); if (label.reversed) { g.removeEdge(e); var forwardName = label.forwardName; delete label.reversed; delete label.forwardName; g.setEdge(e.w, e.v, label, forwardName); } }); } /***/ }), /***/ "./node_modules/dagre/lib/add-border-segments.js": /*!*******************************************************!*\ !*** ./node_modules/dagre/lib/add-border-segments.js ***! \*******************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre/lib/lodash.js"); var util = __webpack_require__(/*! ./util */ "./node_modules/dagre/lib/util.js"); module.exports = addBorderSegments; function addBorderSegments(g) { function dfs(v) { var children = g.children(v); var node = g.node(v); if (children.length) { _.forEach(children, dfs); } if (_.has(node, "minRank")) { node.borderLeft = []; node.borderRight = []; for (var rank = node.minRank, maxRank = node.maxRank + 1; rank < maxRank; ++rank) { addBorderNode(g, "borderLeft", "_bl", v, node, rank); addBorderNode(g, "borderRight", "_br", v, node, rank); } } } _.forEach(g.children(), dfs); } function addBorderNode(g, prop, prefix, sg, sgNode, rank) { var label = { width: 0, height: 0, rank: rank, borderType: prop }; var prev = sgNode[prop][rank - 1]; var curr = util.addDummyNode(g, "border", label, prefix); sgNode[prop][rank] = curr; g.setParent(curr, sg); if (prev) { g.setEdge(prev, curr, { weight: 1 }); } } /***/ }), /***/ "./node_modules/dagre/lib/coordinate-system.js": /*!*****************************************************!*\ !*** ./node_modules/dagre/lib/coordinate-system.js ***! \*****************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre/lib/lodash.js"); module.exports = { adjust: adjust, undo: undo }; function adjust(g) { var rankDir = g.graph().rankdir.toLowerCase(); if (rankDir === "lr" || rankDir === "rl") { swapWidthHeight(g); } } function undo(g) { var rankDir = g.graph().rankdir.toLowerCase(); if (rankDir === "bt" || rankDir === "rl") { reverseY(g); } if (rankDir === "lr" || rankDir === "rl") { swapXY(g); swapWidthHeight(g); } } function swapWidthHeight(g) { _.forEach(g.nodes(), function(v) { swapWidthHeightOne(g.node(v)); }); _.forEach(g.edges(), function(e) { swapWidthHeightOne(g.edge(e)); }); } function swapWidthHeightOne(attrs) { var w = attrs.width; attrs.width = attrs.height; attrs.height = w; } function reverseY(g) { _.forEach(g.nodes(), function(v) { reverseYOne(g.node(v)); }); _.forEach(g.edges(), function(e) { var edge = g.edge(e); _.forEach(edge.points, reverseYOne); if (_.has(edge, "y")) { reverseYOne(edge); } }); } function reverseYOne(attrs) { attrs.y = -attrs.y; } function swapXY(g) { _.forEach(g.nodes(), function(v) { swapXYOne(g.node(v)); }); _.forEach(g.edges(), function(e) { var edge = g.edge(e); _.forEach(edge.points, swapXYOne); if (_.has(edge, "x")) { swapXYOne(edge); } }); } function swapXYOne(attrs) { var x = attrs.x; attrs.x = attrs.y; attrs.y = x; } /***/ }), /***/ "./node_modules/dagre/lib/data/list.js": /*!*********************************************!*\ !*** ./node_modules/dagre/lib/data/list.js ***! \*********************************************/ /***/ (function(module) { /* * Simple doubly linked list implementation derived from Cormen, et al., * "Introduction to Algorithms". */ module.exports = List; function List() { var sentinel = {}; sentinel._next = sentinel._prev = sentinel; this._sentinel = sentinel; } List.prototype.dequeue = function() { var sentinel = this._sentinel; var entry = sentinel._prev; if (entry !== sentinel) { unlink(entry); return entry; } }; List.prototype.enqueue = function(entry) { var sentinel = this._sentinel; if (entry._prev && entry._next) { unlink(entry); } entry._next = sentinel._next; sentinel._next._prev = entry; sentinel._next = entry; entry._prev = sentinel; }; List.prototype.toString = function() { var strs = []; var sentinel = this._sentinel; var curr = sentinel._prev; while (curr !== sentinel) { strs.push(JSON.stringify(curr, filterOutLinks)); curr = curr._prev; } return "[" + strs.join(", ") + "]"; }; function unlink(entry) { entry._prev._next = entry._next; entry._next._prev = entry._prev; delete entry._next; delete entry._prev; } function filterOutLinks(k, v) { if (k !== "_next" && k !== "_prev") { return v; } } /***/ }), /***/ "./node_modules/dagre/lib/debug.js": /*!*****************************************!*\ !*** ./node_modules/dagre/lib/debug.js ***! \*****************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre/lib/lodash.js"); var util = __webpack_require__(/*! ./util */ "./node_modules/dagre/lib/util.js"); var Graph = (__webpack_require__(/*! ./graphlib */ "./node_modules/dagre/lib/graphlib.js").Graph); module.exports = { debugOrdering: debugOrdering }; /* istanbul ignore next */ function debugOrdering(g) { var layerMatrix = util.buildLayerMatrix(g); var h = new Graph({ compound: true, multigraph: true }).setGraph({}); _.forEach(g.nodes(), function(v) { h.setNode(v, { label: v }); h.setParent(v, "layer" + g.node(v).rank); }); _.forEach(g.edges(), function(e) { h.setEdge(e.v, e.w, {}, e.name); }); _.forEach(layerMatrix, function(layer, i) { var layerV = "layer" + i; h.setNode(layerV, { rank: "same" }); _.reduce(layer, function(u, v) { h.setEdge(u, v, { style: "invis" }); return v; }); }); return h; } /***/ }), /***/ "./node_modules/dagre/lib/graphlib.js": /*!********************************************!*\ !*** ./node_modules/dagre/lib/graphlib.js ***! \********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { /* global window */ var graphlib; if (true) { try { graphlib = __webpack_require__(/*! graphlib */ "./node_modules/graphlib/index.js"); } catch (e) { // continue regardless of error } } if (!graphlib) { graphlib = window.graphlib; } module.exports = graphlib; /***/ }), /***/ "./node_modules/dagre/lib/greedy-fas.js": /*!**********************************************!*\ !*** ./node_modules/dagre/lib/greedy-fas.js ***! \**********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre/lib/lodash.js"); var Graph = (__webpack_require__(/*! ./graphlib */ "./node_modules/dagre/lib/graphlib.js").Graph); var List = __webpack_require__(/*! ./data/list */ "./node_modules/dagre/lib/data/list.js"); /* * A greedy heuristic for finding a feedback arc set for a graph. A feedback * arc set is a set of edges that can be removed to make a graph acyclic. * The algorithm comes from: P. Eades, X. Lin, and W. F. Smyth, "A fast and * effective heuristic for the feedback arc set problem." This implementation * adjusts that from the paper to allow for weighted edges. */ module.exports = greedyFAS; var DEFAULT_WEIGHT_FN = _.constant(1); function greedyFAS(g, weightFn) { if (g.nodeCount() <= 1) { return []; } var state = buildState(g, weightFn || DEFAULT_WEIGHT_FN); var results = doGreedyFAS(state.graph, state.buckets, state.zeroIdx); // Expand multi-edges return _.flatten(_.map(results, function(e) { return g.outEdges(e.v, e.w); }), true); } function doGreedyFAS(g, buckets, zeroIdx) { var results = []; var sources = buckets[buckets.length - 1]; var sinks = buckets[0]; var entry; while (g.nodeCount()) { while ((entry = sinks.dequeue())) { removeNode(g, buckets, zeroIdx, entry); } while ((entry = sources.dequeue())) { removeNode(g, buckets, zeroIdx, entry); } if (g.nodeCount()) { for (var i = buckets.length - 2; i > 0; --i) { entry = buckets[i].dequeue(); if (entry) { results = results.concat(removeNode(g, buckets, zeroIdx, entry, true)); break; } } } } return results; } function removeNode(g, buckets, zeroIdx, entry, collectPredecessors) { var results = collectPredecessors ? [] : undefined; _.forEach(g.inEdges(entry.v), function(edge) { var weight = g.edge(edge); var uEntry = g.node(edge.v); if (collectPredecessors) { results.push({ v: edge.v, w: edge.w }); } uEntry.out -= weight; assignBucket(buckets, zeroIdx, uEntry); }); _.forEach(g.outEdges(entry.v), function(edge) { var weight = g.edge(edge); var w = edge.w; var wEntry = g.node(w); wEntry["in"] -= weight; assignBucket(buckets, zeroIdx, wEntry); }); g.removeNode(entry.v); return results; } function buildState(g, weightFn) { var fasGraph = new Graph(); var maxIn = 0; var maxOut = 0; _.forEach(g.nodes(), function(v) { fasGraph.setNode(v, { v: v, "in": 0, out: 0 }); }); // Aggregate weights on nodes, but also sum the weights across multi-edges // into a single edge for the fasGraph. _.forEach(g.edges(), function(e) { var prevWeight = fasGraph.edge(e.v, e.w) || 0; var weight = weightFn(e); var edgeWeight = prevWeight + weight; fasGraph.setEdge(e.v, e.w, edgeWeight); maxOut = Math.max(maxOut, fasGraph.node(e.v).out += weight); maxIn = Math.max(maxIn, fasGraph.node(e.w)["in"] += weight); }); var buckets = _.range(maxOut + maxIn + 3).map(function() { return new List(); }); var zeroIdx = maxIn + 1; _.forEach(fasGraph.nodes(), function(v) { assignBucket(buckets, zeroIdx, fasGraph.node(v)); }); return { graph: fasGraph, buckets: buckets, zeroIdx: zeroIdx }; } function assignBucket(buckets, zeroIdx, entry) { if (!entry.out) { buckets[0].enqueue(entry); } else if (!entry["in"]) { buckets[buckets.length - 1].enqueue(entry); } else { buckets[entry.out - entry["in"] + zeroIdx].enqueue(entry); } } /***/ }), /***/ "./node_modules/dagre/lib/layout.js": /*!******************************************!*\ !*** ./node_modules/dagre/lib/layout.js ***! \******************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre/lib/lodash.js"); var acyclic = __webpack_require__(/*! ./acyclic */ "./node_modules/dagre/lib/acyclic.js"); var normalize = __webpack_require__(/*! ./normalize */ "./node_modules/dagre/lib/normalize.js"); var rank = __webpack_require__(/*! ./rank */ "./node_modules/dagre/lib/rank/index.js"); var normalizeRanks = (__webpack_require__(/*! ./util */ "./node_modules/dagre/lib/util.js").normalizeRanks); var parentDummyChains = __webpack_require__(/*! ./parent-dummy-chains */ "./node_modules/dagre/lib/parent-dummy-chains.js"); var removeEmptyRanks = (__webpack_require__(/*! ./util */ "./node_modules/dagre/lib/util.js").removeEmptyRanks); var nestingGraph = __webpack_require__(/*! ./nesting-graph */ "./node_modules/dagre/lib/nesting-graph.js"); var addBorderSegments = __webpack_require__(/*! ./add-border-segments */ "./node_modules/dagre/lib/add-border-segments.js"); var coordinateSystem = __webpack_require__(/*! ./coordinate-system */ "./node_modules/dagre/lib/coordinate-system.js"); var order = __webpack_require__(/*! ./order */ "./node_modules/dagre/lib/order/index.js"); var position = __webpack_require__(/*! ./position */ "./node_modules/dagre/lib/position/index.js"); var util = __webpack_require__(/*! ./util */ "./node_modules/dagre/lib/util.js"); var Graph = (__webpack_require__(/*! ./graphlib */ "./node_modules/dagre/lib/graphlib.js").Graph); module.exports = layout; function layout(g, opts) { var time = opts && opts.debugTiming ? util.time : util.notime; time("layout", function() { var layoutGraph = time(" buildLayoutGraph", function() { return buildLayoutGraph(g); }); time(" runLayout", function() { runLayout(layoutGraph, time); }); time(" updateInputGraph", function() { updateInputGraph(g, layoutGraph); }); }); } function runLayout(g, time) { time(" makeSpaceForEdgeLabels", function() { makeSpaceForEdgeLabels(g); }); time(" removeSelfEdges", function() { removeSelfEdges(g); }); time(" acyclic", function() { acyclic.run(g); }); time(" nestingGraph.run", function() { nestingGraph.run(g); }); time(" rank", function() { rank(util.asNonCompoundGraph(g)); }); time(" injectEdgeLabelProxies", function() { injectEdgeLabelProxies(g); }); time(" removeEmptyRanks", function() { removeEmptyRanks(g); }); time(" nestingGraph.cleanup", function() { nestingGraph.cleanup(g); }); time(" normalizeRanks", function() { normalizeRanks(g); }); time(" assignRankMinMax", function() { assignRankMinMax(g); }); time(" removeEdgeLabelProxies", function() { removeEdgeLabelProxies(g); }); time(" normalize.run", function() { normalize.run(g); }); time(" parentDummyChains", function() { parentDummyChains(g); }); time(" addBorderSegments", function() { addBorderSegments(g); }); time(" order", function() { order(g); }); time(" insertSelfEdges", function() { insertSelfEdges(g); }); time(" adjustCoordinateSystem", function() { coordinateSystem.adjust(g); }); time(" position", function() { position(g); }); time(" positionSelfEdges", function() { positionSelfEdges(g); }); time(" removeBorderNodes", function() { removeBorderNodes(g); }); time(" normalize.undo", function() { normalize.undo(g); }); time(" fixupEdgeLabelCoords", function() { fixupEdgeLabelCoords(g); }); time(" undoCoordinateSystem", function() { coordinateSystem.undo(g); }); time(" translateGraph", function() { translateGraph(g); }); time(" assignNodeIntersects", function() { assignNodeIntersects(g); }); time(" reversePoints", function() { reversePointsForReversedEdges(g); }); time(" acyclic.undo", function() { acyclic.undo(g); }); } /* * Copies final layout information from the layout graph back to the input * graph. This process only copies whitelisted attributes from the layout graph * to the input graph, so it serves as a good place to determine what * attributes can influence layout. */ function updateInputGraph(inputGraph, layoutGraph) { _.forEach(inputGraph.nodes(), function(v) { var inputLabel = inputGraph.node(v); var layoutLabel = layoutGraph.node(v); if (inputLabel) { inputLabel.x = layoutLabel.x; inputLabel.y = layoutLabel.y; if (layoutGraph.children(v).length) { inputLabel.width = layoutLabel.width; inputLabel.height = layoutLabel.height; } } }); _.forEach(inputGraph.edges(), function(e) { var inputLabel = inputGraph.edge(e); var layoutLabel = layoutGraph.edge(e); inputLabel.points = layoutLabel.points; if (_.has(layoutLabel, "x")) { inputLabel.x = layoutLabel.x; inputLabel.y = layoutLabel.y; } }); inputGraph.graph().width = layoutGraph.graph().width; inputGraph.graph().height = layoutGraph.graph().height; } var graphNumAttrs = ["nodesep", "edgesep", "ranksep", "marginx", "marginy"]; var graphDefaults = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: "tb" }; var graphAttrs = ["acyclicer", "ranker", "rankdir", "align"]; var nodeNumAttrs = ["width", "height"]; var nodeDefaults = { width: 0, height: 0 }; var edgeNumAttrs = ["minlen", "weight", "width", "height", "labeloffset"]; var edgeDefaults = { minlen: 1, weight: 1, width: 0, height: 0, labeloffset: 10, labelpos: "r" }; var edgeAttrs = ["labelpos"]; /* * Constructs a new graph from the input graph, which can be used for layout. * This process copies only whitelisted attributes from the input graph to the * layout graph. Thus this function serves as a good place to determine what * attributes can influence layout. */ function buildLayoutGraph(inputGraph) { var g = new Graph({ multigraph: true, compound: true }); var graph = canonicalize(inputGraph.graph()); g.setGraph(_.merge({}, graphDefaults, selectNumberAttrs(graph, graphNumAttrs), _.pick(graph, graphAttrs))); _.forEach(inputGraph.nodes(), function(v) { var node = canonicalize(inputGraph.node(v)); g.setNode(v, _.defaults(selectNumberAttrs(node, nodeNumAttrs), nodeDefaults)); g.setParent(v, inputGraph.parent(v)); }); _.forEach(inputGraph.edges(), function(e) { var edge = canonicalize(inputGraph.edge(e)); g.setEdge(e, _.merge({}, edgeDefaults, selectNumberAttrs(edge, edgeNumAttrs), _.pick(edge, edgeAttrs))); }); return g; } /* * This idea comes from the Gansner paper: to account for edge labels in our * layout we split each rank in half by doubling minlen and halving ranksep. * Then we can place labels at these mid-points between nodes. * * We also add some minimal padding to the width to push the label for the edge * away from the edge itself a bit. */ function makeSpaceForEdgeLabels(g) { var graph = g.graph(); graph.ranksep /= 2; _.forEach(g.edges(), function(e) { var edge = g.edge(e); edge.minlen *= 2; if (edge.labelpos.toLowerCase() !== "c") { if (graph.rankdir === "TB" || graph.rankdir === "BT") { edge.width += edge.labeloffset; } else { edge.height += edge.labeloffset; } } }); } /* * Creates temporary dummy nodes that capture the rank in which each edge's * label is going to, if it has one of non-zero width and height. We do this * so that we can safely remove empty ranks while preserving balance for the * label's position. */ function injectEdgeLabelProxies(g) { _.forEach(g.edges(), function(e) { var edge = g.edge(e); if (edge.width && edge.height) { var v = g.node(e.v); var w = g.node(e.w); var label = { rank: (w.rank - v.rank) / 2 + v.rank, e: e }; util.addDummyNode(g, "edge-proxy", label, "_ep"); } }); } function assignRankMinMax(g) { var maxRank = 0; _.forEach(g.nodes(), function(v) { var node = g.node(v); if (node.borderTop) { node.minRank = g.node(node.borderTop).rank; node.maxRank = g.node(node.borderBottom).rank; maxRank = _.max(maxRank, node.maxRank); } }); g.graph().maxRank = maxRank; } function removeEdgeLabelProxies(g) { _.forEach(g.nodes(), function(v) { var node = g.node(v); if (node.dummy === "edge-proxy") { g.edge(node.e).labelRank = node.rank; g.removeNode(v); } }); } function translateGraph(g) { var minX = Number.POSITIVE_INFINITY; var maxX = 0; var minY = Number.POSITIVE_INFINITY; var maxY = 0; var graphLabel = g.graph(); var marginX = graphLabel.marginx || 0; var marginY = graphLabel.marginy || 0; function getExtremes(attrs) { var x = attrs.x; var y = attrs.y; var w = attrs.width; var h = attrs.height; minX = Math.min(minX, x - w / 2); maxX = Math.max(maxX, x + w / 2); minY = Math.min(minY, y - h / 2); maxY = Math.max(maxY, y + h / 2); } _.forEach(g.nodes(), function(v) { getExtremes(g.node(v)); }); _.forEach(g.edges(), function(e) { var edge = g.edge(e); if (_.has(edge, "x")) { getExtremes(edge); } }); minX -= marginX; minY -= marginY; _.forEach(g.nodes(), function(v) { var node = g.node(v); node.x -= minX; node.y -= minY; }); _.forEach(g.edges(), function(e) { var edge = g.edge(e); _.forEach(edge.points, function(p) { p.x -= minX; p.y -= minY; }); if (_.has(edge, "x")) { edge.x -= minX; } if (_.has(edge, "y")) { edge.y -= minY; } }); graphLabel.width = maxX - minX + marginX; graphLabel.height = maxY - minY + marginY; } function assignNodeIntersects(g) { _.forEach(g.edges(), function(e) { var edge = g.edge(e); var nodeV = g.node(e.v); var nodeW = g.node(e.w); var p1, p2; if (!edge.points) { edge.points = []; p1 = nodeW; p2 = nodeV; } else { p1 = edge.points[0]; p2 = edge.points[edge.points.length - 1]; } edge.points.unshift(util.intersectRect(nodeV, p1)); edge.points.push(util.intersectRect(nodeW, p2)); }); } function fixupEdgeLabelCoords(g) { _.forEach(g.edges(), function(e) { var edge = g.edge(e); if (_.has(edge, "x")) { if (edge.labelpos === "l" || edge.labelpos === "r") { edge.width -= edge.labeloffset; } switch (edge.labelpos) { case "l": edge.x -= edge.width / 2 + edge.labeloffset; break; case "r": edge.x += edge.width / 2 + edge.labeloffset; break; } } }); } function reversePointsForReversedEdges(g) { _.forEach(g.edges(), function(e) { var edge = g.edge(e); if (edge.reversed) { edge.points.reverse(); } }); } function removeBorderNodes(g) { _.forEach(g.nodes(), function(v) { if (g.children(v).length) { var node = g.node(v); var t = g.node(node.borderTop); var b = g.node(node.borderBottom); var l = g.node(_.last(node.borderLeft)); var r = g.node(_.last(node.borderRight)); node.width = Math.abs(r.x - l.x); node.height = Math.abs(b.y - t.y); node.x = l.x + node.width / 2; node.y = t.y + node.height / 2; } }); _.forEach(g.nodes(), function(v) { if (g.node(v).dummy === "border") { g.removeNode(v); } }); } function removeSelfEdges(g) { _.forEach(g.edges(), function(e) { if (e.v === e.w) { var node = g.node(e.v); if (!node.selfEdges) { node.selfEdges = []; } node.selfEdges.push({ e: e, label: g.edge(e) }); g.removeEdge(e); } }); } function insertSelfEdges(g) { var layers = util.buildLayerMatrix(g); _.forEach(layers, function(layer) { var orderShift = 0; _.forEach(layer, function(v, i) { var node = g.node(v); node.order = i + orderShift; _.forEach(node.selfEdges, function(selfEdge) { util.addDummyNode(g, "selfedge", { width: selfEdge.label.width, height: selfEdge.label.height, rank: node.rank, order: i + (++orderShift), e: selfEdge.e, label: selfEdge.label }, "_se"); }); delete node.selfEdges; }); }); } function positionSelfEdges(g) { _.forEach(g.nodes(), function(v) { var node = g.node(v); if (node.dummy === "selfedge") { var selfNode = g.node(node.e.v); var x = selfNode.x + selfNode.width / 2; var y = selfNode.y; var dx = node.x - x; var dy = selfNode.height / 2; g.setEdge(node.e, node.label); g.removeNode(v); node.label.points = [ { x: x + 2 * dx / 3, y: y - dy }, { x: x + 5 * dx / 6, y: y - dy }, { x: x + dx , y: y }, { x: x + 5 * dx / 6, y: y + dy }, { x: x + 2 * dx / 3, y: y + dy } ]; node.label.x = node.x; node.label.y = node.y; } }); } function selectNumberAttrs(obj, attrs) { return _.mapValues(_.pick(obj, attrs), Number); } function canonicalize(attrs) { var newAttrs = {}; _.forEach(attrs, function(v, k) { newAttrs[k.toLowerCase()] = v; }); return newAttrs; } /***/ }), /***/ "./node_modules/dagre/lib/lodash.js": /*!******************************************!*\ !*** ./node_modules/dagre/lib/lodash.js ***! \******************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { /* global window */ var lodash; if (true) { try { lodash = { cloneDeep: __webpack_require__(/*! lodash/cloneDeep */ "./node_modules/lodash/cloneDeep.js"), constant: __webpack_require__(/*! lodash/constant */ "./node_modules/lodash/constant.js"), defaults: __webpack_require__(/*! lodash/defaults */ "./node_modules/lodash/defaults.js"), each: __webpack_require__(/*! lodash/each */ "./node_modules/lodash/each.js"), filter: __webpack_require__(/*! lodash/filter */ "./node_modules/lodash/filter.js"), find: __webpack_require__(/*! lodash/find */ "./node_modules/lodash/find.js"), flatten: __webpack_require__(/*! lodash/flatten */ "./node_modules/lodash/flatten.js"), forEach: __webpack_require__(/*! lodash/forEach */ "./node_modules/lodash/forEach.js"), forIn: __webpack_require__(/*! lodash/forIn */ "./node_modules/lodash/forIn.js"), has: __webpack_require__(/*! lodash/has */ "./node_modules/lodash/has.js"), isUndefined: __webpack_require__(/*! lodash/isUndefined */ "./node_modules/lodash/isUndefined.js"), last: __webpack_require__(/*! lodash/last */ "./node_modules/lodash/last.js"), map: __webpack_require__(/*! lodash/map */ "./node_modules/lodash/map.js"), mapValues: __webpack_require__(/*! lodash/mapValues */ "./node_modules/lodash/mapValues.js"), max: __webpack_require__(/*! lodash/max */ "./node_modules/lodash/max.js"), merge: __webpack_require__(/*! lodash/merge */ "./node_modules/lodash/merge.js"), min: __webpack_require__(/*! lodash/min */ "./node_modules/lodash/min.js"), minBy: __webpack_require__(/*! lodash/minBy */ "./node_modules/lodash/minBy.js"), now: __webpack_require__(/*! lodash/now */ "./node_modules/lodash/now.js"), pick: __webpack_require__(/*! lodash/pick */ "./node_modules/lodash/pick.js"), range: __webpack_require__(/*! lodash/range */ "./node_modules/lodash/range.js"), reduce: __webpack_require__(/*! lodash/reduce */ "./node_modules/lodash/reduce.js"), sortBy: __webpack_require__(/*! lodash/sortBy */ "./node_modules/lodash/sortBy.js"), uniqueId: __webpack_require__(/*! lodash/uniqueId */ "./node_modules/lodash/uniqueId.js"), values: __webpack_require__(/*! lodash/values */ "./node_modules/lodash/values.js"), zipObject: __webpack_require__(/*! lodash/zipObject */ "./node_modules/lodash/zipObject.js"), }; } catch (e) { // continue regardless of error } } if (!lodash) { lodash = window._; } module.exports = lodash; /***/ }), /***/ "./node_modules/dagre/lib/nesting-graph.js": /*!*************************************************!*\ !*** ./node_modules/dagre/lib/nesting-graph.js ***! \*************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre/lib/lodash.js"); var util = __webpack_require__(/*! ./util */ "./node_modules/dagre/lib/util.js"); module.exports = { run: run, cleanup: cleanup }; /* * A nesting graph creates dummy nodes for the tops and bottoms of subgraphs, * adds appropriate edges to ensure that all cluster nodes are placed between * these boundries, and ensures that the graph is connected. * * In addition we ensure, through the use of the minlen property, that nodes * and subgraph border nodes to not end up on the same rank. * * Preconditions: * * 1. Input graph is a DAG * 2. Nodes in the input graph has a minlen attribute * * Postconditions: * * 1. Input graph is connected. * 2. Dummy nodes are added for the tops and bottoms of subgraphs. * 3. The minlen attribute for nodes is adjusted to ensure nodes do not * get placed on the same rank as subgraph border nodes. * * The nesting graph idea comes from Sander, "Layout of Compound Directed * Graphs." */ function run(g) { var root = util.addDummyNode(g, "root", {}, "_root"); var depths = treeDepths(g); var height = _.max(_.values(depths)) - 1; // Note: depths is an Object not an array var nodeSep = 2 * height + 1; g.graph().nestingRoot = root; // Multiply minlen by nodeSep to align nodes on non-border ranks. _.forEach(g.edges(), function(e) { g.edge(e).minlen *= nodeSep; }); // Calculate a weight that is sufficient to keep subgraphs vertically compact var weight = sumWeights(g) + 1; // Create border nodes and link them up _.forEach(g.children(), function(child) { dfs(g, root, nodeSep, weight, height, depths, child); }); // Save the multiplier for node layers for later removal of empty border // layers. g.graph().nodeRankFactor = nodeSep; } function dfs(g, root, nodeSep, weight, height, depths, v) { var children = g.children(v); if (!children.length) { if (v !== root) { g.setEdge(root, v, { weight: 0, minlen: nodeSep }); } return; } var top = util.addBorderNode(g, "_bt"); var bottom = util.addBorderNode(g, "_bb"); var label = g.node(v); g.setParent(top, v); label.borderTop = top; g.setParent(bottom, v); label.borderBottom = bottom; _.forEach(children, function(child) { dfs(g, root, nodeSep, weight, height, depths, child); var childNode = g.node(child); var childTop = childNode.borderTop ? childNode.borderTop : child; var childBottom = childNode.borderBottom ? childNode.borderBottom : child; var thisWeight = childNode.borderTop ? weight : 2 * weight; var minlen = childTop !== childBottom ? 1 : height - depths[v] + 1; g.setEdge(top, childTop, { weight: thisWeight, minlen: minlen, nestingEdge: true }); g.setEdge(childBottom, bottom, { weight: thisWeight, minlen: minlen, nestingEdge: true }); }); if (!g.parent(v)) { g.setEdge(root, top, { weight: 0, minlen: height + depths[v] }); } } function treeDepths(g) { var depths = {}; function dfs(v, depth) { var children = g.children(v); if (children && children.length) { _.forEach(children, function(child) { dfs(child, depth + 1); }); } depths[v] = depth; } _.forEach(g.children(), function(v) { dfs(v, 1); }); return depths; } function sumWeights(g) { return _.reduce(g.edges(), function(acc, e) { return acc + g.edge(e).weight; }, 0); } function cleanup(g) { var graphLabel = g.graph(); g.removeNode(graphLabel.nestingRoot); delete graphLabel.nestingRoot; _.forEach(g.edges(), function(e) { var edge = g.edge(e); if (edge.nestingEdge) { g.removeEdge(e); } }); } /***/ }), /***/ "./node_modules/dagre/lib/normalize.js": /*!*********************************************!*\ !*** ./node_modules/dagre/lib/normalize.js ***! \*********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre/lib/lodash.js"); var util = __webpack_require__(/*! ./util */ "./node_modules/dagre/lib/util.js"); module.exports = { run: run, undo: undo }; /* * Breaks any long edges in the graph into short segments that span 1 layer * each. This operation is undoable with the denormalize function. * * Pre-conditions: * * 1. The input graph is a DAG. * 2. Each node in the graph has a "rank" property. * * Post-condition: * * 1. All edges in the graph have a length of 1. * 2. Dummy nodes are added where edges have been split into segments. * 3. The graph is augmented with a "dummyChains" attribute which contains * the first dummy in each chain of dummy nodes produced. */ function run(g) { g.graph().dummyChains = []; _.forEach(g.edges(), function(edge) { normalizeEdge(g, edge); }); } function normalizeEdge(g, e) { var v = e.v; var vRank = g.node(v).rank; var w = e.w; var wRank = g.node(w).rank; var name = e.name; var edgeLabel = g.edge(e); var labelRank = edgeLabel.labelRank; if (wRank === vRank + 1) return; g.removeEdge(e); var dummy, attrs, i; for (i = 0, ++vRank; vRank < wRank; ++i, ++vRank) { edgeLabel.points = []; attrs = { width: 0, height: 0, edgeLabel: edgeLabel, edgeObj: e, rank: vRank }; dummy = util.addDummyNode(g, "edge", attrs, "_d"); if (vRank === labelRank) { attrs.width = edgeLabel.width; attrs.height = edgeLabel.height; attrs.dummy = "edge-label"; attrs.labelpos = edgeLabel.labelpos; } g.setEdge(v, dummy, { weight: edgeLabel.weight }, name); if (i === 0) { g.graph().dummyChains.push(dummy); } v = dummy; } g.setEdge(v, w, { weight: edgeLabel.weight }, name); } function undo(g) { _.forEach(g.graph().dummyChains, function(v) { var node = g.node(v); var origLabel = node.edgeLabel; var w; g.setEdge(node.edgeObj, origLabel); while (node.dummy) { w = g.successors(v)[0]; g.removeNode(v); origLabel.points.push({ x: node.x, y: node.y }); if (node.dummy === "edge-label") { origLabel.x = node.x; origLabel.y = node.y; origLabel.width = node.width; origLabel.height = node.height; } v = w; node = g.node(v); } }); } /***/ }), /***/ "./node_modules/dagre/lib/order/add-subgraph-constraints.js": /*!******************************************************************!*\ !*** ./node_modules/dagre/lib/order/add-subgraph-constraints.js ***! \******************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js"); module.exports = addSubgraphConstraints; function addSubgraphConstraints(g, cg, vs) { var prev = {}, rootPrev; _.forEach(vs, function(v) { var child = g.parent(v), parent, prevChild; while (child) { parent = g.parent(child); if (parent) { prevChild = prev[parent]; prev[parent] = child; } else { prevChild = rootPrev; rootPrev = child; } if (prevChild && prevChild !== child) { cg.setEdge(prevChild, child); return; } child = parent; } }); /* function dfs(v) { var children = v ? g.children(v) : g.children(); if (children.length) { var min = Number.POSITIVE_INFINITY, subgraphs = []; _.each(children, function(child) { var childMin = dfs(child); if (g.children(child).length) { subgraphs.push({ v: child, order: childMin }); } min = Math.min(min, childMin); }); _.reduce(_.sortBy(subgraphs, "order"), function(prev, curr) { cg.setEdge(prev.v, curr.v); return curr; }); return min; } return g.node(v).order; } dfs(undefined); */ } /***/ }), /***/ "./node_modules/dagre/lib/order/barycenter.js": /*!****************************************************!*\ !*** ./node_modules/dagre/lib/order/barycenter.js ***! \****************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js"); module.exports = barycenter; function barycenter(g, movable) { return _.map(movable, function(v) { var inV = g.inEdges(v); if (!inV.length) { return { v: v }; } else { var result = _.reduce(inV, function(acc, e) { var edge = g.edge(e), nodeU = g.node(e.v); return { sum: acc.sum + (edge.weight * nodeU.order), weight: acc.weight + edge.weight }; }, { sum: 0, weight: 0 }); return { v: v, barycenter: result.sum / result.weight, weight: result.weight }; } }); } /***/ }), /***/ "./node_modules/dagre/lib/order/build-layer-graph.js": /*!***********************************************************!*\ !*** ./node_modules/dagre/lib/order/build-layer-graph.js ***! \***********************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js"); var Graph = (__webpack_require__(/*! ../graphlib */ "./node_modules/dagre/lib/graphlib.js").Graph); module.exports = buildLayerGraph; /* * Constructs a graph that can be used to sort a layer of nodes. The graph will * contain all base and subgraph nodes from the request layer in their original * hierarchy and any edges that are incident on these nodes and are of the type * requested by the "relationship" parameter. * * Nodes from the requested rank that do not have parents are assigned a root * node in the output graph, which is set in the root graph attribute. This * makes it easy to walk the hierarchy of movable nodes during ordering. * * Pre-conditions: * * 1. Input graph is a DAG * 2. Base nodes in the input graph have a rank attribute * 3. Subgraph nodes in the input graph has minRank and maxRank attributes * 4. Edges have an assigned weight * * Post-conditions: * * 1. Output graph has all nodes in the movable rank with preserved * hierarchy. * 2. Root nodes in the movable layer are made children of the node * indicated by the root attribute of the graph. * 3. Non-movable nodes incident on movable nodes, selected by the * relationship parameter, are included in the graph (without hierarchy). * 4. Edges incident on movable nodes, selected by the relationship * parameter, are added to the output graph. * 5. The weights for copied edges are aggregated as need, since the output * graph is not a multi-graph. */ function buildLayerGraph(g, rank, relationship) { var root = createRootNode(g), result = new Graph({ compound: true }).setGraph({ root: root }) .setDefaultNodeLabel(function(v) { return g.node(v); }); _.forEach(g.nodes(), function(v) { var node = g.node(v), parent = g.parent(v); if (node.rank === rank || node.minRank <= rank && rank <= node.maxRank) { result.setNode(v); result.setParent(v, parent || root); // This assumes we have only short edges! _.forEach(g[relationship](v), function(e) { var u = e.v === v ? e.w : e.v, edge = result.edge(u, v), weight = !_.isUndefined(edge) ? edge.weight : 0; result.setEdge(u, v, { weight: g.edge(e).weight + weight }); }); if (_.has(node, "minRank")) { result.setNode(v, { borderLeft: node.borderLeft[rank], borderRight: node.borderRight[rank] }); } } }); return result; } function createRootNode(g) { var v; while (g.hasNode((v = _.uniqueId("_root")))); return v; } /***/ }), /***/ "./node_modules/dagre/lib/order/cross-count.js": /*!*****************************************************!*\ !*** ./node_modules/dagre/lib/order/cross-count.js ***! \*****************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js"); module.exports = crossCount; /* * A function that takes a layering (an array of layers, each with an array of * ordererd nodes) and a graph and returns a weighted crossing count. * * Pre-conditions: * * 1. Input graph must be simple (not a multigraph), directed, and include * only simple edges. * 2. Edges in the input graph must have assigned weights. * * Post-conditions: * * 1. The graph and layering matrix are left unchanged. * * This algorithm is derived from Barth, et al., "Bilayer Cross Counting." */ function crossCount(g, layering) { var cc = 0; for (var i = 1; i < layering.length; ++i) { cc += twoLayerCrossCount(g, layering[i-1], layering[i]); } return cc; } function twoLayerCrossCount(g, northLayer, southLayer) { // Sort all of the edges between the north and south layers by their position // in the north layer and then the south. Map these edges to the position of // their head in the south layer. var southPos = _.zipObject(southLayer, _.map(southLayer, function (v, i) { return i; })); var southEntries = _.flatten(_.map(northLayer, function(v) { return _.sortBy(_.map(g.outEdges(v), function(e) { return { pos: southPos[e.w], weight: g.edge(e).weight }; }), "pos"); }), true); // Build the accumulator tree var firstIndex = 1; while (firstIndex < southLayer.length) firstIndex <<= 1; var treeSize = 2 * firstIndex - 1; firstIndex -= 1; var tree = _.map(new Array(treeSize), function() { return 0; }); // Calculate the weighted crossings var cc = 0; _.forEach(southEntries.forEach(function(entry) { var index = entry.pos + firstIndex; tree[index] += entry.weight; var weightSum = 0; while (index > 0) { if (index % 2) { weightSum += tree[index + 1]; } index = (index - 1) >> 1; tree[index] += entry.weight; } cc += entry.weight * weightSum; })); return cc; } /***/ }), /***/ "./node_modules/dagre/lib/order/index.js": /*!***********************************************!*\ !*** ./node_modules/dagre/lib/order/index.js ***! \***********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js"); var initOrder = __webpack_require__(/*! ./init-order */ "./node_modules/dagre/lib/order/init-order.js"); var crossCount = __webpack_require__(/*! ./cross-count */ "./node_modules/dagre/lib/order/cross-count.js"); var sortSubgraph = __webpack_require__(/*! ./sort-subgraph */ "./node_modules/dagre/lib/order/sort-subgraph.js"); var buildLayerGraph = __webpack_require__(/*! ./build-layer-graph */ "./node_modules/dagre/lib/order/build-layer-graph.js"); var addSubgraphConstraints = __webpack_require__(/*! ./add-subgraph-constraints */ "./node_modules/dagre/lib/order/add-subgraph-constraints.js"); var Graph = (__webpack_require__(/*! ../graphlib */ "./node_modules/dagre/lib/graphlib.js").Graph); var util = __webpack_require__(/*! ../util */ "./node_modules/dagre/lib/util.js"); module.exports = order; /* * Applies heuristics to minimize edge crossings in the graph and sets the best * order solution as an order attribute on each node. * * Pre-conditions: * * 1. Graph must be DAG * 2. Graph nodes must be objects with a "rank" attribute * 3. Graph edges must have the "weight" attribute * * Post-conditions: * * 1. Graph nodes will have an "order" attribute based on the results of the * algorithm. */ function order(g) { var maxRank = util.maxRank(g), downLayerGraphs = buildLayerGraphs(g, _.range(1, maxRank + 1), "inEdges"), upLayerGraphs = buildLayerGraphs(g, _.range(maxRank - 1, -1, -1), "outEdges"); var layering = initOrder(g); assignOrder(g, layering); var bestCC = Number.POSITIVE_INFINITY, best; for (var i = 0, lastBest = 0; lastBest < 4; ++i, ++lastBest) { sweepLayerGraphs(i % 2 ? downLayerGraphs : upLayerGraphs, i % 4 >= 2); layering = util.buildLayerMatrix(g); var cc = crossCount(g, layering); if (cc < bestCC) { lastBest = 0; best = _.cloneDeep(layering); bestCC = cc; } } assignOrder(g, best); } function buildLayerGraphs(g, ranks, relationship) { return _.map(ranks, function(rank) { return buildLayerGraph(g, rank, relationship); }); } function sweepLayerGraphs(layerGraphs, biasRight) { var cg = new Graph(); _.forEach(layerGraphs, function(lg) { var root = lg.graph().root; var sorted = sortSubgraph(lg, root, cg, biasRight); _.forEach(sorted.vs, function(v, i) { lg.node(v).order = i; }); addSubgraphConstraints(lg, cg, sorted.vs); }); } function assignOrder(g, layering) { _.forEach(layering, function(layer) { _.forEach(layer, function(v, i) { g.node(v).order = i; }); }); } /***/ }), /***/ "./node_modules/dagre/lib/order/init-order.js": /*!****************************************************!*\ !*** ./node_modules/dagre/lib/order/init-order.js ***! \****************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js"); module.exports = initOrder; /* * Assigns an initial order value for each node by performing a DFS search * starting from nodes in the first rank. Nodes are assigned an order in their * rank as they are first visited. * * This approach comes from Gansner, et al., "A Technique for Drawing Directed * Graphs." * * Returns a layering matrix with an array per layer and each layer sorted by * the order of its nodes. */ function initOrder(g) { var visited = {}; var simpleNodes = _.filter(g.nodes(), function(v) { return !g.children(v).length; }); var maxRank = _.max(_.map(simpleNodes, function(v) { return g.node(v).rank; })); var layers = _.map(_.range(maxRank + 1), function() { return []; }); function dfs(v) { if (_.has(visited, v)) return; visited[v] = true; var node = g.node(v); layers[node.rank].push(v); _.forEach(g.successors(v), dfs); } var orderedVs = _.sortBy(simpleNodes, function(v) { return g.node(v).rank; }); _.forEach(orderedVs, dfs); return layers; } /***/ }), /***/ "./node_modules/dagre/lib/order/resolve-conflicts.js": /*!***********************************************************!*\ !*** ./node_modules/dagre/lib/order/resolve-conflicts.js ***! \***********************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js"); module.exports = resolveConflicts; /* * Given a list of entries of the form {v, barycenter, weight} and a * constraint graph this function will resolve any conflicts between the * constraint graph and the barycenters for the entries. If the barycenters for * an entry would violate a constraint in the constraint graph then we coalesce * the nodes in the conflict into a new node that respects the contraint and * aggregates barycenter and weight information. * * This implementation is based on the description in Forster, "A Fast and * Simple Hueristic for Constrained Two-Level Crossing Reduction," thought it * differs in some specific details. * * Pre-conditions: * * 1. Each entry has the form {v, barycenter, weight}, or if the node has * no barycenter, then {v}. * * Returns: * * A new list of entries of the form {vs, i, barycenter, weight}. The list * `vs` may either be a singleton or it may be an aggregation of nodes * ordered such that they do not violate constraints from the constraint * graph. The property `i` is the lowest original index of any of the * elements in `vs`. */ function resolveConflicts(entries, cg) { var mappedEntries = {}; _.forEach(entries, function(entry, i) { var tmp = mappedEntries[entry.v] = { indegree: 0, "in": [], out: [], vs: [entry.v], i: i }; if (!_.isUndefined(entry.barycenter)) { tmp.barycenter = entry.barycenter; tmp.weight = entry.weight; } }); _.forEach(cg.edges(), function(e) { var entryV = mappedEntries[e.v]; var entryW = mappedEntries[e.w]; if (!_.isUndefined(entryV) && !_.isUndefined(entryW)) { entryW.indegree++; entryV.out.push(mappedEntries[e.w]); } }); var sourceSet = _.filter(mappedEntries, function(entry) { return !entry.indegree; }); return doResolveConflicts(sourceSet); } function doResolveConflicts(sourceSet) { var entries = []; function handleIn(vEntry) { return function(uEntry) { if (uEntry.merged) { return; } if (_.isUndefined(uEntry.barycenter) || _.isUndefined(vEntry.barycenter) || uEntry.barycenter >= vEntry.barycenter) { mergeEntries(vEntry, uEntry); } }; } function handleOut(vEntry) { return function(wEntry) { wEntry["in"].push(vEntry); if (--wEntry.indegree === 0) { sourceSet.push(wEntry); } }; } while (sourceSet.length) { var entry = sourceSet.pop(); entries.push(entry); _.forEach(entry["in"].reverse(), handleIn(entry)); _.forEach(entry.out, handleOut(entry)); } return _.map(_.filter(entries, function(entry) { return !entry.merged; }), function(entry) { return _.pick(entry, ["vs", "i", "barycenter", "weight"]); }); } function mergeEntries(target, source) { var sum = 0; var weight = 0; if (target.weight) { sum += target.barycenter * target.weight; weight += target.weight; } if (source.weight) { sum += source.barycenter * source.weight; weight += source.weight; } target.vs = source.vs.concat(target.vs); target.barycenter = sum / weight; target.weight = weight; target.i = Math.min(source.i, target.i); source.merged = true; } /***/ }), /***/ "./node_modules/dagre/lib/order/sort-subgraph.js": /*!*******************************************************!*\ !*** ./node_modules/dagre/lib/order/sort-subgraph.js ***! \*******************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js"); var barycenter = __webpack_require__(/*! ./barycenter */ "./node_modules/dagre/lib/order/barycenter.js"); var resolveConflicts = __webpack_require__(/*! ./resolve-conflicts */ "./node_modules/dagre/lib/order/resolve-conflicts.js"); var sort = __webpack_require__(/*! ./sort */ "./node_modules/dagre/lib/order/sort.js"); module.exports = sortSubgraph; function sortSubgraph(g, v, cg, biasRight) { var movable = g.children(v); var node = g.node(v); var bl = node ? node.borderLeft : undefined; var br = node ? node.borderRight: undefined; var subgraphs = {}; if (bl) { movable = _.filter(movable, function(w) { return w !== bl && w !== br; }); } var barycenters = barycenter(g, movable); _.forEach(barycenters, function(entry) { if (g.children(entry.v).length) { var subgraphResult = sortSubgraph(g, entry.v, cg, biasRight); subgraphs[entry.v] = subgraphResult; if (_.has(subgraphResult, "barycenter")) { mergeBarycenters(entry, subgraphResult); } } }); var entries = resolveConflicts(barycenters, cg); expandSubgraphs(entries, subgraphs); var result = sort(entries, biasRight); if (bl) { result.vs = _.flatten([bl, result.vs, br], true); if (g.predecessors(bl).length) { var blPred = g.node(g.predecessors(bl)[0]), brPred = g.node(g.predecessors(br)[0]); if (!_.has(result, "barycenter")) { result.barycenter = 0; result.weight = 0; } result.barycenter = (result.barycenter * result.weight + blPred.order + brPred.order) / (result.weight + 2); result.weight += 2; } } return result; } function expandSubgraphs(entries, subgraphs) { _.forEach(entries, function(entry) { entry.vs = _.flatten(entry.vs.map(function(v) { if (subgraphs[v]) { return subgraphs[v].vs; } return v; }), true); }); } function mergeBarycenters(target, other) { if (!_.isUndefined(target.barycenter)) { target.barycenter = (target.barycenter * target.weight + other.barycenter * other.weight) / (target.weight + other.weight); target.weight += other.weight; } else { target.barycenter = other.barycenter; target.weight = other.weight; } } /***/ }), /***/ "./node_modules/dagre/lib/order/sort.js": /*!**********************************************!*\ !*** ./node_modules/dagre/lib/order/sort.js ***! \**********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js"); var util = __webpack_require__(/*! ../util */ "./node_modules/dagre/lib/util.js"); module.exports = sort; function sort(entries, biasRight) { var parts = util.partition(entries, function(entry) { return _.has(entry, "barycenter"); }); var sortable = parts.lhs, unsortable = _.sortBy(parts.rhs, function(entry) { return -entry.i; }), vs = [], sum = 0, weight = 0, vsIndex = 0; sortable.sort(compareWithBias(!!biasRight)); vsIndex = consumeUnsortable(vs, unsortable, vsIndex); _.forEach(sortable, function (entry) { vsIndex += entry.vs.length; vs.push(entry.vs); sum += entry.barycenter * entry.weight; weight += entry.weight; vsIndex = consumeUnsortable(vs, unsortable, vsIndex); }); var result = { vs: _.flatten(vs, true) }; if (weight) { result.barycenter = sum / weight; result.weight = weight; } return result; } function consumeUnsortable(vs, unsortable, index) { var last; while (unsortable.length && (last = _.last(unsortable)).i <= index) { unsortable.pop(); vs.push(last.vs); index++; } return index; } function compareWithBias(bias) { return function(entryV, entryW) { if (entryV.barycenter < entryW.barycenter) { return -1; } else if (entryV.barycenter > entryW.barycenter) { return 1; } return !bias ? entryV.i - entryW.i : entryW.i - entryV.i; }; } /***/ }), /***/ "./node_modules/dagre/lib/parent-dummy-chains.js": /*!*******************************************************!*\ !*** ./node_modules/dagre/lib/parent-dummy-chains.js ***! \*******************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre/lib/lodash.js"); module.exports = parentDummyChains; function parentDummyChains(g) { var postorderNums = postorder(g); _.forEach(g.graph().dummyChains, function(v) { var node = g.node(v); var edgeObj = node.edgeObj; var pathData = findPath(g, postorderNums, edgeObj.v, edgeObj.w); var path = pathData.path; var lca = pathData.lca; var pathIdx = 0; var pathV = path[pathIdx]; var ascending = true; while (v !== edgeObj.w) { node = g.node(v); if (ascending) { while ((pathV = path[pathIdx]) !== lca && g.node(pathV).maxRank < node.rank) { pathIdx++; } if (pathV === lca) { ascending = false; } } if (!ascending) { while (pathIdx < path.length - 1 && g.node(pathV = path[pathIdx + 1]).minRank <= node.rank) { pathIdx++; } pathV = path[pathIdx]; } g.setParent(v, pathV); v = g.successors(v)[0]; } }); } // Find a path from v to w through the lowest common ancestor (LCA). Return the // full path and the LCA. function findPath(g, postorderNums, v, w) { var vPath = []; var wPath = []; var low = Math.min(postorderNums[v].low, postorderNums[w].low); var lim = Math.max(postorderNums[v].lim, postorderNums[w].lim); var parent; var lca; // Traverse up from v to find the LCA parent = v; do { parent = g.parent(parent); vPath.push(parent); } while (parent && (postorderNums[parent].low > low || lim > postorderNums[parent].lim)); lca = parent; // Traverse from w to LCA parent = w; while ((parent = g.parent(parent)) !== lca) { wPath.push(parent); } return { path: vPath.concat(wPath.reverse()), lca: lca }; } function postorder(g) { var result = {}; var lim = 0; function dfs(v) { var low = lim; _.forEach(g.children(v), dfs); result[v] = { low: low, lim: lim++ }; } _.forEach(g.children(), dfs); return result; } /***/ }), /***/ "./node_modules/dagre/lib/position/bk.js": /*!***********************************************!*\ !*** ./node_modules/dagre/lib/position/bk.js ***! \***********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js"); var Graph = (__webpack_require__(/*! ../graphlib */ "./node_modules/dagre/lib/graphlib.js").Graph); var util = __webpack_require__(/*! ../util */ "./node_modules/dagre/lib/util.js"); /* * This module provides coordinate assignment based on Brandes and Köpf, "Fast * and Simple Horizontal Coordinate Assignment." */ module.exports = { positionX: positionX, findType1Conflicts: findType1Conflicts, findType2Conflicts: findType2Conflicts, addConflict: addConflict, hasConflict: hasConflict, verticalAlignment: verticalAlignment, horizontalCompaction: horizontalCompaction, alignCoordinates: alignCoordinates, findSmallestWidthAlignment: findSmallestWidthAlignment, balance: balance }; /* * Marks all edges in the graph with a type-1 conflict with the "type1Conflict" * property. A type-1 conflict is one where a non-inner segment crosses an * inner segment. An inner segment is an edge with both incident nodes marked * with the "dummy" property. * * This algorithm scans layer by layer, starting with the second, for type-1 * conflicts between the current layer and the previous layer. For each layer * it scans the nodes from left to right until it reaches one that is incident * on an inner segment. It then scans predecessors to determine if they have * edges that cross that inner segment. At the end a final scan is done for all * nodes on the current rank to see if they cross the last visited inner * segment. * * This algorithm (safely) assumes that a dummy node will only be incident on a * single node in the layers being scanned. */ function findType1Conflicts(g, layering) { var conflicts = {}; function visitLayer(prevLayer, layer) { var // last visited node in the previous layer that is incident on an inner // segment. k0 = 0, // Tracks the last node in this layer scanned for crossings with a type-1 // segment. scanPos = 0, prevLayerLength = prevLayer.length, lastNode = _.last(layer); _.forEach(layer, function(v, i) { var w = findOtherInnerSegmentNode(g, v), k1 = w ? g.node(w).order : prevLayerLength; if (w || v === lastNode) { _.forEach(layer.slice(scanPos, i +1), function(scanNode) { _.forEach(g.predecessors(scanNode), function(u) { var uLabel = g.node(u), uPos = uLabel.order; if ((uPos < k0 || k1 < uPos) && !(uLabel.dummy && g.node(scanNode).dummy)) { addConflict(conflicts, u, scanNode); } }); }); scanPos = i + 1; k0 = k1; } }); return layer; } _.reduce(layering, visitLayer); return conflicts; } function findType2Conflicts(g, layering) { var conflicts = {}; function scan(south, southPos, southEnd, prevNorthBorder, nextNorthBorder) { var v; _.forEach(_.range(southPos, southEnd), function(i) { v = south[i]; if (g.node(v).dummy) { _.forEach(g.predecessors(v), function(u) { var uNode = g.node(u); if (uNode.dummy && (uNode.order < prevNorthBorder || uNode.order > nextNorthBorder)) { addConflict(conflicts, u, v); } }); } }); } function visitLayer(north, south) { var prevNorthPos = -1, nextNorthPos, southPos = 0; _.forEach(south, function(v, southLookahead) { if (g.node(v).dummy === "border") { var predecessors = g.predecessors(v); if (predecessors.length) { nextNorthPos = g.node(predecessors[0]).order; scan(south, southPos, southLookahead, prevNorthPos, nextNorthPos); southPos = southLookahead; prevNorthPos = nextNorthPos; } } scan(south, southPos, south.length, nextNorthPos, north.length); }); return south; } _.reduce(layering, visitLayer); return conflicts; } function findOtherInnerSegmentNode(g, v) { if (g.node(v).dummy) { return _.find(g.predecessors(v), function(u) { return g.node(u).dummy; }); } } function addConflict(conflicts, v, w) { if (v > w) { var tmp = v; v = w; w = tmp; } var conflictsV = conflicts[v]; if (!conflictsV) { conflicts[v] = conflictsV = {}; } conflictsV[w] = true; } function hasConflict(conflicts, v, w) { if (v > w) { var tmp = v; v = w; w = tmp; } return _.has(conflicts[v], w); } /* * Try to align nodes into vertical "blocks" where possible. This algorithm * attempts to align a node with one of its median neighbors. If the edge * connecting a neighbor is a type-1 conflict then we ignore that possibility. * If a previous node has already formed a block with a node after the node * we're trying to form a block with, we also ignore that possibility - our * blocks would be split in that scenario. */ function verticalAlignment(g, layering, conflicts, neighborFn) { var root = {}, align = {}, pos = {}; // We cache the position here based on the layering because the graph and // layering may be out of sync. The layering matrix is manipulated to // generate different extreme alignments. _.forEach(layering, function(layer) { _.forEach(layer, function(v, order) { root[v] = v; align[v] = v; pos[v] = order; }); }); _.forEach(layering, function(layer) { var prevIdx = -1; _.forEach(layer, function(v) { var ws = neighborFn(v); if (ws.length) { ws = _.sortBy(ws, function(w) { return pos[w]; }); var mp = (ws.length - 1) / 2; for (var i = Math.floor(mp), il = Math.ceil(mp); i <= il; ++i) { var w = ws[i]; if (align[v] === v && prevIdx < pos[w] && !hasConflict(conflicts, v, w)) { align[w] = v; align[v] = root[v] = root[w]; prevIdx = pos[w]; } } } }); }); return { root: root, align: align }; } function horizontalCompaction(g, layering, root, align, reverseSep) { // This portion of the algorithm differs from BK due to a number of problems. // Instead of their algorithm we construct a new block graph and do two // sweeps. The first sweep places blocks with the smallest possible // coordinates. The second sweep removes unused space by moving blocks to the // greatest coordinates without violating separation. var xs = {}, blockG = buildBlockGraph(g, layering, root, reverseSep), borderType = reverseSep ? "borderLeft" : "borderRight"; function iterate(setXsFunc, nextNodesFunc) { var stack = blockG.nodes(); var elem = stack.pop(); var visited = {}; while (elem) { if (visited[elem]) { setXsFunc(elem); } else { visited[elem] = true; stack.push(elem); stack = stack.concat(nextNodesFunc(elem)); } elem = stack.pop(); } } // First pass, assign smallest coordinates function pass1(elem) { xs[elem] = blockG.inEdges(elem).reduce(function(acc, e) { return Math.max(acc, xs[e.v] + blockG.edge(e)); }, 0); } // Second pass, assign greatest coordinates function pass2(elem) { var min = blockG.outEdges(elem).reduce(function(acc, e) { return Math.min(acc, xs[e.w] - blockG.edge(e)); }, Number.POSITIVE_INFINITY); var node = g.node(elem); if (min !== Number.POSITIVE_INFINITY && node.borderType !== borderType) { xs[elem] = Math.max(xs[elem], min); } } iterate(pass1, blockG.predecessors.bind(blockG)); iterate(pass2, blockG.successors.bind(blockG)); // Assign x coordinates to all nodes _.forEach(align, function(v) { xs[v] = xs[root[v]]; }); return xs; } function buildBlockGraph(g, layering, root, reverseSep) { var blockGraph = new Graph(), graphLabel = g.graph(), sepFn = sep(graphLabel.nodesep, graphLabel.edgesep, reverseSep); _.forEach(layering, function(layer) { var u; _.forEach(layer, function(v) { var vRoot = root[v]; blockGraph.setNode(vRoot); if (u) { var uRoot = root[u], prevMax = blockGraph.edge(uRoot, vRoot); blockGraph.setEdge(uRoot, vRoot, Math.max(sepFn(g, v, u), prevMax || 0)); } u = v; }); }); return blockGraph; } /* * Returns the alignment that has the smallest width of the given alignments. */ function findSmallestWidthAlignment(g, xss) { return _.minBy(_.values(xss), function (xs) { var max = Number.NEGATIVE_INFINITY; var min = Number.POSITIVE_INFINITY; _.forIn(xs, function (x, v) { var halfWidth = width(g, v) / 2; max = Math.max(x + halfWidth, max); min = Math.min(x - halfWidth, min); }); return max - min; }); } /* * Align the coordinates of each of the layout alignments such that * left-biased alignments have their minimum coordinate at the same point as * the minimum coordinate of the smallest width alignment and right-biased * alignments have their maximum coordinate at the same point as the maximum * coordinate of the smallest width alignment. */ function alignCoordinates(xss, alignTo) { var alignToVals = _.values(alignTo), alignToMin = _.min(alignToVals), alignToMax = _.max(alignToVals); _.forEach(["u", "d"], function(vert) { _.forEach(["l", "r"], function(horiz) { var alignment = vert + horiz, xs = xss[alignment], delta; if (xs === alignTo) return; var xsVals = _.values(xs); delta = horiz === "l" ? alignToMin - _.min(xsVals) : alignToMax - _.max(xsVals); if (delta) { xss[alignment] = _.mapValues(xs, function(x) { return x + delta; }); } }); }); } function balance(xss, align) { return _.mapValues(xss.ul, function(ignore, v) { if (align) { return xss[align.toLowerCase()][v]; } else { var xs = _.sortBy(_.map(xss, v)); return (xs[1] + xs[2]) / 2; } }); } function positionX(g) { var layering = util.buildLayerMatrix(g); var conflicts = _.merge( findType1Conflicts(g, layering), findType2Conflicts(g, layering)); var xss = {}; var adjustedLayering; _.forEach(["u", "d"], function(vert) { adjustedLayering = vert === "u" ? layering : _.values(layering).reverse(); _.forEach(["l", "r"], function(horiz) { if (horiz === "r") { adjustedLayering = _.map(adjustedLayering, function(inner) { return _.values(inner).reverse(); }); } var neighborFn = (vert === "u" ? g.predecessors : g.successors).bind(g); var align = verticalAlignment(g, adjustedLayering, conflicts, neighborFn); var xs = horizontalCompaction(g, adjustedLayering, align.root, align.align, horiz === "r"); if (horiz === "r") { xs = _.mapValues(xs, function(x) { return -x; }); } xss[vert + horiz] = xs; }); }); var smallestWidth = findSmallestWidthAlignment(g, xss); alignCoordinates(xss, smallestWidth); return balance(xss, g.graph().align); } function sep(nodeSep, edgeSep, reverseSep) { return function(g, v, w) { var vLabel = g.node(v); var wLabel = g.node(w); var sum = 0; var delta; sum += vLabel.width / 2; if (_.has(vLabel, "labelpos")) { switch (vLabel.labelpos.toLowerCase()) { case "l": delta = -vLabel.width / 2; break; case "r": delta = vLabel.width / 2; break; } } if (delta) { sum += reverseSep ? delta : -delta; } delta = 0; sum += (vLabel.dummy ? edgeSep : nodeSep) / 2; sum += (wLabel.dummy ? edgeSep : nodeSep) / 2; sum += wLabel.width / 2; if (_.has(wLabel, "labelpos")) { switch (wLabel.labelpos.toLowerCase()) { case "l": delta = wLabel.width / 2; break; case "r": delta = -wLabel.width / 2; break; } } if (delta) { sum += reverseSep ? delta : -delta; } delta = 0; return sum; }; } function width(g, v) { return g.node(v).width; } /***/ }), /***/ "./node_modules/dagre/lib/position/index.js": /*!**************************************************!*\ !*** ./node_modules/dagre/lib/position/index.js ***! \**************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js"); var util = __webpack_require__(/*! ../util */ "./node_modules/dagre/lib/util.js"); var positionX = (__webpack_require__(/*! ./bk */ "./node_modules/dagre/lib/position/bk.js").positionX); module.exports = position; function position(g) { g = util.asNonCompoundGraph(g); positionY(g); _.forEach(positionX(g), function(x, v) { g.node(v).x = x; }); } function positionY(g) { var layering = util.buildLayerMatrix(g); var rankSep = g.graph().ranksep; var prevY = 0; _.forEach(layering, function(layer) { var maxHeight = _.max(_.map(layer, function(v) { return g.node(v).height; })); _.forEach(layer, function(v) { g.node(v).y = prevY + maxHeight / 2; }); prevY += maxHeight + rankSep; }); } /***/ }), /***/ "./node_modules/dagre/lib/rank/feasible-tree.js": /*!******************************************************!*\ !*** ./node_modules/dagre/lib/rank/feasible-tree.js ***! \******************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js"); var Graph = (__webpack_require__(/*! ../graphlib */ "./node_modules/dagre/lib/graphlib.js").Graph); var slack = (__webpack_require__(/*! ./util */ "./node_modules/dagre/lib/rank/util.js").slack); module.exports = feasibleTree; /* * Constructs a spanning tree with tight edges and adjusted the input node's * ranks to achieve this. A tight edge is one that is has a length that matches * its "minlen" attribute. * * The basic structure for this function is derived from Gansner, et al., "A * Technique for Drawing Directed Graphs." * * Pre-conditions: * * 1. Graph must be a DAG. * 2. Graph must be connected. * 3. Graph must have at least one node. * 5. Graph nodes must have been previously assigned a "rank" property that * respects the "minlen" property of incident edges. * 6. Graph edges must have a "minlen" property. * * Post-conditions: * * - Graph nodes will have their rank adjusted to ensure that all edges are * tight. * * Returns a tree (undirected graph) that is constructed using only "tight" * edges. */ function feasibleTree(g) { var t = new Graph({ directed: false }); // Choose arbitrary node from which to start our tree var start = g.nodes()[0]; var size = g.nodeCount(); t.setNode(start, {}); var edge, delta; while (tightTree(t, g) < size) { edge = findMinSlackEdge(t, g); delta = t.hasNode(edge.v) ? slack(g, edge) : -slack(g, edge); shiftRanks(t, g, delta); } return t; } /* * Finds a maximal tree of tight edges and returns the number of nodes in the * tree. */ function tightTree(t, g) { function dfs(v) { _.forEach(g.nodeEdges(v), function(e) { var edgeV = e.v, w = (v === edgeV) ? e.w : edgeV; if (!t.hasNode(w) && !slack(g, e)) { t.setNode(w, {}); t.setEdge(v, w, {}); dfs(w); } }); } _.forEach(t.nodes(), dfs); return t.nodeCount(); } /* * Finds the edge with the smallest slack that is incident on tree and returns * it. */ function findMinSlackEdge(t, g) { return _.minBy(g.edges(), function(e) { if (t.hasNode(e.v) !== t.hasNode(e.w)) { return slack(g, e); } }); } function shiftRanks(t, g, delta) { _.forEach(t.nodes(), function(v) { g.node(v).rank += delta; }); } /***/ }), /***/ "./node_modules/dagre/lib/rank/index.js": /*!**********************************************!*\ !*** ./node_modules/dagre/lib/rank/index.js ***! \**********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var rankUtil = __webpack_require__(/*! ./util */ "./node_modules/dagre/lib/rank/util.js"); var longestPath = rankUtil.longestPath; var feasibleTree = __webpack_require__(/*! ./feasible-tree */ "./node_modules/dagre/lib/rank/feasible-tree.js"); var networkSimplex = __webpack_require__(/*! ./network-simplex */ "./node_modules/dagre/lib/rank/network-simplex.js"); module.exports = rank; /* * Assigns a rank to each node in the input graph that respects the "minlen" * constraint specified on edges between nodes. * * This basic structure is derived from Gansner, et al., "A Technique for * Drawing Directed Graphs." * * Pre-conditions: * * 1. Graph must be a connected DAG * 2. Graph nodes must be objects * 3. Graph edges must have "weight" and "minlen" attributes * * Post-conditions: * * 1. Graph nodes will have a "rank" attribute based on the results of the * algorithm. Ranks can start at any index (including negative), we'll * fix them up later. */ function rank(g) { switch(g.graph().ranker) { case "network-simplex": networkSimplexRanker(g); break; case "tight-tree": tightTreeRanker(g); break; case "longest-path": longestPathRanker(g); break; default: networkSimplexRanker(g); } } // A fast and simple ranker, but results are far from optimal. var longestPathRanker = longestPath; function tightTreeRanker(g) { longestPath(g); feasibleTree(g); } function networkSimplexRanker(g) { networkSimplex(g); } /***/ }), /***/ "./node_modules/dagre/lib/rank/network-simplex.js": /*!********************************************************!*\ !*** ./node_modules/dagre/lib/rank/network-simplex.js ***! \********************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js"); var feasibleTree = __webpack_require__(/*! ./feasible-tree */ "./node_modules/dagre/lib/rank/feasible-tree.js"); var slack = (__webpack_require__(/*! ./util */ "./node_modules/dagre/lib/rank/util.js").slack); var initRank = (__webpack_require__(/*! ./util */ "./node_modules/dagre/lib/rank/util.js").longestPath); var preorder = (__webpack_require__(/*! ../graphlib */ "./node_modules/dagre/lib/graphlib.js").alg.preorder); var postorder = (__webpack_require__(/*! ../graphlib */ "./node_modules/dagre/lib/graphlib.js").alg.postorder); var simplify = (__webpack_require__(/*! ../util */ "./node_modules/dagre/lib/util.js").simplify); module.exports = networkSimplex; // Expose some internals for testing purposes networkSimplex.initLowLimValues = initLowLimValues; networkSimplex.initCutValues = initCutValues; networkSimplex.calcCutValue = calcCutValue; networkSimplex.leaveEdge = leaveEdge; networkSimplex.enterEdge = enterEdge; networkSimplex.exchangeEdges = exchangeEdges; /* * The network simplex algorithm assigns ranks to each node in the input graph * and iteratively improves the ranking to reduce the length of edges. * * Preconditions: * * 1. The input graph must be a DAG. * 2. All nodes in the graph must have an object value. * 3. All edges in the graph must have "minlen" and "weight" attributes. * * Postconditions: * * 1. All nodes in the graph will have an assigned "rank" attribute that has * been optimized by the network simplex algorithm. Ranks start at 0. * * * A rough sketch of the algorithm is as follows: * * 1. Assign initial ranks to each node. We use the longest path algorithm, * which assigns ranks to the lowest position possible. In general this * leads to very wide bottom ranks and unnecessarily long edges. * 2. Construct a feasible tight tree. A tight tree is one such that all * edges in the tree have no slack (difference between length of edge * and minlen for the edge). This by itself greatly improves the assigned * rankings by shorting edges. * 3. Iteratively find edges that have negative cut values. Generally a * negative cut value indicates that the edge could be removed and a new * tree edge could be added to produce a more compact graph. * * Much of the algorithms here are derived from Gansner, et al., "A Technique * for Drawing Directed Graphs." The structure of the file roughly follows the * structure of the overall algorithm. */ function networkSimplex(g) { g = simplify(g); initRank(g); var t = feasibleTree(g); initLowLimValues(t); initCutValues(t, g); var e, f; while ((e = leaveEdge(t))) { f = enterEdge(t, g, e); exchangeEdges(t, g, e, f); } } /* * Initializes cut values for all edges in the tree. */ function initCutValues(t, g) { var vs = postorder(t, t.nodes()); vs = vs.slice(0, vs.length - 1); _.forEach(vs, function(v) { assignCutValue(t, g, v); }); } function assignCutValue(t, g, child) { var childLab = t.node(child); var parent = childLab.parent; t.edge(child, parent).cutvalue = calcCutValue(t, g, child); } /* * Given the tight tree, its graph, and a child in the graph calculate and * return the cut value for the edge between the child and its parent. */ function calcCutValue(t, g, child) { var childLab = t.node(child); var parent = childLab.parent; // True if the child is on the tail end of the edge in the directed graph var childIsTail = true; // The graph's view of the tree edge we're inspecting var graphEdge = g.edge(child, parent); // The accumulated cut value for the edge between this node and its parent var cutValue = 0; if (!graphEdge) { childIsTail = false; graphEdge = g.edge(parent, child); } cutValue = graphEdge.weight; _.forEach(g.nodeEdges(child), function(e) { var isOutEdge = e.v === child, other = isOutEdge ? e.w : e.v; if (other !== parent) { var pointsToHead = isOutEdge === childIsTail, otherWeight = g.edge(e).weight; cutValue += pointsToHead ? otherWeight : -otherWeight; if (isTreeEdge(t, child, other)) { var otherCutValue = t.edge(child, other).cutvalue; cutValue += pointsToHead ? -otherCutValue : otherCutValue; } } }); return cutValue; } function initLowLimValues(tree, root) { if (arguments.length < 2) { root = tree.nodes()[0]; } dfsAssignLowLim(tree, {}, 1, root); } function dfsAssignLowLim(tree, visited, nextLim, v, parent) { var low = nextLim; var label = tree.node(v); visited[v] = true; _.forEach(tree.neighbors(v), function(w) { if (!_.has(visited, w)) { nextLim = dfsAssignLowLim(tree, visited, nextLim, w, v); } }); label.low = low; label.lim = nextLim++; if (parent) { label.parent = parent; } else { // TODO should be able to remove this when we incrementally update low lim delete label.parent; } return nextLim; } function leaveEdge(tree) { return _.find(tree.edges(), function(e) { return tree.edge(e).cutvalue < 0; }); } function enterEdge(t, g, edge) { var v = edge.v; var w = edge.w; // For the rest of this function we assume that v is the tail and w is the // head, so if we don't have this edge in the graph we should flip it to // match the correct orientation. if (!g.hasEdge(v, w)) { v = edge.w; w = edge.v; } var vLabel = t.node(v); var wLabel = t.node(w); var tailLabel = vLabel; var flip = false; // If the root is in the tail of the edge then we need to flip the logic that // checks for the head and tail nodes in the candidates function below. if (vLabel.lim > wLabel.lim) { tailLabel = wLabel; flip = true; } var candidates = _.filter(g.edges(), function(edge) { return flip === isDescendant(t, t.node(edge.v), tailLabel) && flip !== isDescendant(t, t.node(edge.w), tailLabel); }); return _.minBy(candidates, function(edge) { return slack(g, edge); }); } function exchangeEdges(t, g, e, f) { var v = e.v; var w = e.w; t.removeEdge(v, w); t.setEdge(f.v, f.w, {}); initLowLimValues(t); initCutValues(t, g); updateRanks(t, g); } function updateRanks(t, g) { var root = _.find(t.nodes(), function(v) { return !g.node(v).parent; }); var vs = preorder(t, root); vs = vs.slice(1); _.forEach(vs, function(v) { var parent = t.node(v).parent, edge = g.edge(v, parent), flipped = false; if (!edge) { edge = g.edge(parent, v); flipped = true; } g.node(v).rank = g.node(parent).rank + (flipped ? edge.minlen : -edge.minlen); }); } /* * Returns true if the edge is in the tree. */ function isTreeEdge(tree, u, v) { return tree.hasEdge(u, v); } /* * Returns true if the specified node is descendant of the root node per the * assigned low and lim attributes in the tree. */ function isDescendant(tree, vLabel, rootLabel) { return rootLabel.low <= vLabel.lim && vLabel.lim <= rootLabel.lim; } /***/ }), /***/ "./node_modules/dagre/lib/rank/util.js": /*!*********************************************!*\ !*** ./node_modules/dagre/lib/rank/util.js ***! \*********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var _ = __webpack_require__(/*! ../lodash */ "./node_modules/dagre/lib/lodash.js"); module.exports = { longestPath: longestPath, slack: slack }; /* * Initializes ranks for the input graph using the longest path algorithm. This * algorithm scales well and is fast in practice, it yields rather poor * solutions. Nodes are pushed to the lowest layer possible, leaving the bottom * ranks wide and leaving edges longer than necessary. However, due to its * speed, this algorithm is good for getting an initial ranking that can be fed * into other algorithms. * * This algorithm does not normalize layers because it will be used by other * algorithms in most cases. If using this algorithm directly, be sure to * run normalize at the end. * * Pre-conditions: * * 1. Input graph is a DAG. * 2. Input graph node labels can be assigned properties. * * Post-conditions: * * 1. Each node will be assign an (unnormalized) "rank" property. */ function longestPath(g) { var visited = {}; function dfs(v) { var label = g.node(v); if (_.has(visited, v)) { return label.rank; } visited[v] = true; var rank = _.min(_.map(g.outEdges(v), function(e) { return dfs(e.w) - g.edge(e).minlen; })); if (rank === Number.POSITIVE_INFINITY || // return value of _.map([]) for Lodash 3 rank === undefined || // return value of _.map([]) for Lodash 4 rank === null) { // return value of _.map([null]) rank = 0; } return (label.rank = rank); } _.forEach(g.sources(), dfs); } /* * Returns the amount of slack for the given edge. The slack is defined as the * difference between the length of the edge and its minimum length. */ function slack(g, e) { return g.node(e.w).rank - g.node(e.v).rank - g.edge(e).minlen; } /***/ }), /***/ "./node_modules/dagre/lib/util.js": /*!****************************************!*\ !*** ./node_modules/dagre/lib/util.js ***! \****************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; /* eslint "no-console": off */ var _ = __webpack_require__(/*! ./lodash */ "./node_modules/dagre/lib/lodash.js"); var Graph = (__webpack_require__(/*! ./graphlib */ "./node_modules/dagre/lib/graphlib.js").Graph); module.exports = { addDummyNode: addDummyNode, simplify: simplify, asNonCompoundGraph: asNonCompoundGraph, successorWeights: successorWeights, predecessorWeights: predecessorWeights, intersectRect: intersectRect, buildLayerMatrix: buildLayerMatrix, normalizeRanks: normalizeRanks, removeEmptyRanks: removeEmptyRanks, addBorderNode: addBorderNode, maxRank: maxRank, partition: partition, time: time, notime: notime }; /* * Adds a dummy node to the graph and return v. */ function addDummyNode(g, type, attrs, name) { var v; do { v = _.uniqueId(name); } while (g.hasNode(v)); attrs.dummy = type; g.setNode(v, attrs); return v; } /* * Returns a new graph with only simple edges. Handles aggregation of data * associated with multi-edges. */ function simplify(g) { var simplified = new Graph().setGraph(g.graph()); _.forEach(g.nodes(), function(v) { simplified.setNode(v, g.node(v)); }); _.forEach(g.edges(), function(e) { var simpleLabel = simplified.edge(e.v, e.w) || { weight: 0, minlen: 1 }; var label = g.edge(e); simplified.setEdge(e.v, e.w, { weight: simpleLabel.weight + label.weight, minlen: Math.max(simpleLabel.minlen, label.minlen) }); }); return simplified; } function asNonCompoundGraph(g) { var simplified = new Graph({ multigraph: g.isMultigraph() }).setGraph(g.graph()); _.forEach(g.nodes(), function(v) { if (!g.children(v).length) { simplified.setNode(v, g.node(v)); } }); _.forEach(g.edges(), function(e) { simplified.setEdge(e, g.edge(e)); }); return simplified; } function successorWeights(g) { var weightMap = _.map(g.nodes(), function(v) { var sucs = {}; _.forEach(g.outEdges(v), function(e) { sucs[e.w] = (sucs[e.w] || 0) + g.edge(e).weight; }); return sucs; }); return _.zipObject(g.nodes(), weightMap); } function predecessorWeights(g) { var weightMap = _.map(g.nodes(), function(v) { var preds = {}; _.forEach(g.inEdges(v), function(e) { preds[e.v] = (preds[e.v] || 0) + g.edge(e).weight; }); return preds; }); return _.zipObject(g.nodes(), weightMap); } /* * Finds where a line starting at point ({x, y}) would intersect a rectangle * ({x, y, width, height}) if it were pointing at the rectangle's center. */ function intersectRect(rect, point) { var x = rect.x; var y = rect.y; // Rectangle intersection algorithm from: // http://math.stackexchange.com/questions/108113/find-edge-between-two-boxes var dx = point.x - x; var dy = point.y - y; var w = rect.width / 2; var h = rect.height / 2; if (!dx && !dy) { throw new Error("Not possible to find intersection inside of the rectangle"); } var sx, sy; if (Math.abs(dy) * w > Math.abs(dx) * h) { // Intersection is top or bottom of rect. if (dy < 0) { h = -h; } sx = h * dx / dy; sy = h; } else { // Intersection is left or right of rect. if (dx < 0) { w = -w; } sx = w; sy = w * dy / dx; } return { x: x + sx, y: y + sy }; } /* * Given a DAG with each node assigned "rank" and "order" properties, this * function will produce a matrix with the ids of each node. */ function buildLayerMatrix(g) { var layering = _.map(_.range(maxRank(g) + 1), function() { return []; }); _.forEach(g.nodes(), function(v) { var node = g.node(v); var rank = node.rank; if (!_.isUndefined(rank)) { layering[rank][node.order] = v; } }); return layering; } /* * Adjusts the ranks for all nodes in the graph such that all nodes v have * rank(v) >= 0 and at least one node w has rank(w) = 0. */ function normalizeRanks(g) { var min = _.min(_.map(g.nodes(), function(v) { return g.node(v).rank; })); _.forEach(g.nodes(), function(v) { var node = g.node(v); if (_.has(node, "rank")) { node.rank -= min; } }); } function removeEmptyRanks(g) { // Ranks may not start at 0, so we need to offset them var offset = _.min(_.map(g.nodes(), function(v) { return g.node(v).rank; })); var layers = []; _.forEach(g.nodes(), function(v) { var rank = g.node(v).rank - offset; if (!layers[rank]) { layers[rank] = []; } layers[rank].push(v); }); var delta = 0; var nodeRankFactor = g.graph().nodeRankFactor; _.forEach(layers, function(vs, i) { if (_.isUndefined(vs) && i % nodeRankFactor !== 0) { --delta; } else if (delta) { _.forEach(vs, function(v) { g.node(v).rank += delta; }); } }); } function addBorderNode(g, prefix, rank, order) { var node = { width: 0, height: 0 }; if (arguments.length >= 4) { node.rank = rank; node.order = order; } return addDummyNode(g, "border", node, prefix); } function maxRank(g) { return _.max(_.map(g.nodes(), function(v) { var rank = g.node(v).rank; if (!_.isUndefined(rank)) { return rank; } })); } /* * Partition a collection into two groups: `lhs` and `rhs`. If the supplied * function returns true for an entry it goes into `lhs`. Otherwise it goes * into `rhs. */ function partition(collection, fn) { var result = { lhs: [], rhs: [] }; _.forEach(collection, function(value) { if (fn(value)) { result.lhs.push(value); } else { result.rhs.push(value); } }); return result; } /* * Returns a new function that wraps `fn` with a timer. The wrapper logs the * time it takes to execute the function. */ function time(name, fn) { var start = _.now(); try { return fn(); } finally { console.log(name + " time: " + (_.now() - start) + "ms"); } } function notime(name, fn) { return fn(); } /***/ }), /***/ "./node_modules/dagre/lib/version.js": /*!*******************************************!*\ !*** ./node_modules/dagre/lib/version.js ***! \*******************************************/ /***/ (function(module) { module.exports = "0.8.5"; /***/ }), /***/ "./node_modules/dependency-graph/lib/dep_graph.js": /*!********************************************************!*\ !*** ./node_modules/dependency-graph/lib/dep_graph.js ***! \********************************************************/ /***/ (function(__unused_webpack_module, exports) { /** * A simple dependency graph */ /** * Helper for creating a Topological Sort using Depth-First-Search on a set of edges. * * Detects cycles and throws an Error if one is detected (unless the "circular" * parameter is "true" in which case it ignores them). * * @param edges The set of edges to DFS through * @param leavesOnly Whether to only return "leaf" nodes (ones who have no edges) * @param result An array in which the results will be populated * @param circular A boolean to allow circular dependencies */ function createDFS(edges, leavesOnly, result, circular) { var visited = {}; return function (start) { if (visited[start]) { return; } var inCurrentPath = {}; var currentPath = []; var todo = []; // used as a stack todo.push({ node: start, processed: false }); while (todo.length > 0) { var current = todo[todo.length - 1]; // peek at the todo stack var processed = current.processed; var node = current.node; if (!processed) { // Haven't visited edges yet (visiting phase) if (visited[node]) { todo.pop(); continue; } else if (inCurrentPath[node]) { // It's not a DAG if (circular) { todo.pop(); // If we're tolerating cycles, don't revisit the node continue; } currentPath.push(node); throw new DepGraphCycleError(currentPath); } inCurrentPath[node] = true; currentPath.push(node); var nodeEdges = edges[node]; // (push edges onto the todo stack in reverse order to be order-compatible with the old DFS implementation) for (var i = nodeEdges.length - 1; i >= 0; i--) { todo.push({ node: nodeEdges[i], processed: false }); } current.processed = true; } else { // Have visited edges (stack unrolling phase) todo.pop(); currentPath.pop(); inCurrentPath[node] = false; visited[node] = true; if (!leavesOnly || edges[node].length === 0) { result.push(node); } } } }; } /** * Simple Dependency Graph */ var DepGraph = (exports.DepGraph = function DepGraph(opts) { this.nodes = {}; // Node -> Node/Data (treated like a Set) this.outgoingEdges = {}; // Node -> [Dependency Node] this.incomingEdges = {}; // Node -> [Dependant Node] this.circular = opts && !!opts.circular; // Allows circular deps }); DepGraph.prototype = { /** * The number of nodes in the graph. */ size: function () { return Object.keys(this.nodes).length; }, /** * Add a node to the dependency graph. If a node already exists, this method will do nothing. */ addNode: function (node, data) { if (!this.hasNode(node)) { // Checking the arguments length allows the user to add a node with undefined data if (arguments.length === 2) { this.nodes[node] = data; } else { this.nodes[node] = node; } this.outgoingEdges[node] = []; this.incomingEdges[node] = []; } }, /** * Remove a node from the dependency graph. If a node does not exist, this method will do nothing. */ removeNode: function (node) { if (this.hasNode(node)) { delete this.nodes[node]; delete this.outgoingEdges[node]; delete this.incomingEdges[node]; [this.incomingEdges, this.outgoingEdges].forEach(function (edgeList) { Object.keys(edgeList).forEach(function (key) { var idx = edgeList[key].indexOf(node); if (idx >= 0) { edgeList[key].splice(idx, 1); } }, this); }); } }, /** * Check if a node exists in the graph */ hasNode: function (node) { return this.nodes.hasOwnProperty(node); }, /** * Get the data associated with a node name */ getNodeData: function (node) { if (this.hasNode(node)) { return this.nodes[node]; } else { throw new Error("Node does not exist: " + node); } }, /** * Set the associated data for a given node name. If the node does not exist, this method will throw an error */ setNodeData: function (node, data) { if (this.hasNode(node)) { this.nodes[node] = data; } else { throw new Error("Node does not exist: " + node); } }, /** * Add a dependency between two nodes. If either of the nodes does not exist, * an Error will be thrown. */ addDependency: function (from, to) { if (!this.hasNode(from)) { throw new Error("Node does not exist: " + from); } if (!this.hasNode(to)) { throw new Error("Node does not exist: " + to); } if (this.outgoingEdges[from].indexOf(to) === -1) { this.outgoingEdges[from].push(to); } if (this.incomingEdges[to].indexOf(from) === -1) { this.incomingEdges[to].push(from); } return true; }, /** * Remove a dependency between two nodes. */ removeDependency: function (from, to) { var idx; if (this.hasNode(from)) { idx = this.outgoingEdges[from].indexOf(to); if (idx >= 0) { this.outgoingEdges[from].splice(idx, 1); } } if (this.hasNode(to)) { idx = this.incomingEdges[to].indexOf(from); if (idx >= 0) { this.incomingEdges[to].splice(idx, 1); } } }, /** * Return a clone of the dependency graph. If any custom data is attached * to the nodes, it will only be shallow copied. */ clone: function () { var source = this; var result = new DepGraph(); var keys = Object.keys(source.nodes); keys.forEach(function (n) { result.nodes[n] = source.nodes[n]; result.outgoingEdges[n] = source.outgoingEdges[n].slice(0); result.incomingEdges[n] = source.incomingEdges[n].slice(0); }); return result; }, /** * Get an array containing the direct dependencies of the specified node. * * Throws an Error if the specified node does not exist. */ directDependenciesOf: function (node) { if (this.hasNode(node)) { return this.outgoingEdges[node].slice(0); } else { throw new Error("Node does not exist: " + node); } }, /** * Get an array containing the nodes that directly depend on the specified node. * * Throws an Error if the specified node does not exist. */ directDependantsOf: function (node) { if (this.hasNode(node)) { return this.incomingEdges[node].slice(0); } else { throw new Error("Node does not exist: " + node); } }, /** * Get an array containing the nodes that the specified node depends on (transitively). * * Throws an Error if the graph has a cycle, or the specified node does not exist. * * If `leavesOnly` is true, only nodes that do not depend on any other nodes will be returned * in the array. */ dependenciesOf: function (node, leavesOnly) { if (this.hasNode(node)) { var result = []; var DFS = createDFS( this.outgoingEdges, leavesOnly, result, this.circular ); DFS(node); var idx = result.indexOf(node); if (idx >= 0) { result.splice(idx, 1); } return result; } else { throw new Error("Node does not exist: " + node); } }, /** * get an array containing the nodes that depend on the specified node (transitively). * * Throws an Error if the graph has a cycle, or the specified node does not exist. * * If `leavesOnly` is true, only nodes that do not have any dependants will be returned in the array. */ dependantsOf: function (node, leavesOnly) { if (this.hasNode(node)) { var result = []; var DFS = createDFS( this.incomingEdges, leavesOnly, result, this.circular ); DFS(node); var idx = result.indexOf(node); if (idx >= 0) { result.splice(idx, 1); } return result; } else { throw new Error("Node does not exist: " + node); } }, /** * Construct the overall processing order for the dependency graph. * * Throws an Error if the graph has a cycle. * * If `leavesOnly` is true, only nodes that do not depend on any other nodes will be returned. */ overallOrder: function (leavesOnly) { var self = this; var result = []; var keys = Object.keys(this.nodes); if (keys.length === 0) { return result; // Empty graph } else { if (!this.circular) { // Look for cycles - we run the DFS starting at all the nodes in case there // are several disconnected subgraphs inside this dependency graph. var CycleDFS = createDFS(this.outgoingEdges, false, [], this.circular); keys.forEach(function (n) { CycleDFS(n); }); } var DFS = createDFS( this.outgoingEdges, leavesOnly, result, this.circular ); // Find all potential starting points (nodes with nothing depending on them) an // run a DFS starting at these points to get the order keys .filter(function (node) { return self.incomingEdges[node].length === 0; }) .forEach(function (n) { DFS(n); }); // If we're allowing cycles - we need to run the DFS against any remaining // nodes that did not end up in the initial result (as they are part of a // subgraph that does not have a clear starting point) if (this.circular) { keys .filter(function (node) { return result.indexOf(node) === -1; }) .forEach(function (n) { DFS(n); }); } return result; } }, /** * Get an array of nodes that have no dependants (i.e. nothing depends on them). */ entryNodes: function () { var self = this; return Object.keys(this.nodes).filter(function (node) { return self.incomingEdges[node].length === 0; }); } }; // Create some aliases DepGraph.prototype.directDependentsOf = DepGraph.prototype.directDependantsOf; DepGraph.prototype.dependentsOf = DepGraph.prototype.dependantsOf; /** * Cycle error, including the path of the cycle. */ var DepGraphCycleError = (exports.DepGraphCycleError = function (cyclePath) { var message = "Dependency Cycle Found: " + cyclePath.join(" -> "); var instance = new Error(message); instance.cyclePath = cyclePath; Object.setPrototypeOf(instance, Object.getPrototypeOf(this)); if (Error.captureStackTrace) { Error.captureStackTrace(instance, DepGraphCycleError); } return instance; }); DepGraphCycleError.prototype = Object.create(Error.prototype, { constructor: { value: Error, enumerable: false, writable: true, configurable: true } }); Object.setPrototypeOf(DepGraphCycleError, Error); /***/ }), /***/ "./node_modules/fast-isnumeric/index.js": /*!**********************************************!*\ !*** ./node_modules/fast-isnumeric/index.js ***! \**********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; /** * inspired by is-number * but significantly simplified and sped up by ignoring number and string constructors * ie these return false: * new Number(1) * new String('1') */ var allBlankCharCodes = __webpack_require__(/*! is-string-blank */ "./node_modules/is-string-blank/index.js"); module.exports = function(n) { var type = typeof n; if(type === 'string') { var original = n; n = +n; // whitespace strings cast to zero - filter them out if(n===0 && allBlankCharCodes(original)) return false; } else if(type !== 'number') return false; return n - n < 1; }; /***/ }), /***/ "./node_modules/graphlib/index.js": /*!****************************************!*\ !*** ./node_modules/graphlib/index.js ***! \****************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { /** * Copyright (c) 2014, Chris Pettitt * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * 3. Neither the name of the copyright holder nor the names of its contributors * may be used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ var lib = __webpack_require__(/*! ./lib */ "./node_modules/graphlib/lib/index.js"); module.exports = { Graph: lib.Graph, json: __webpack_require__(/*! ./lib/json */ "./node_modules/graphlib/lib/json.js"), alg: __webpack_require__(/*! ./lib/alg */ "./node_modules/graphlib/lib/alg/index.js"), version: lib.version }; /***/ }), /***/ "./node_modules/graphlib/lib/alg/components.js": /*!*****************************************************!*\ !*** ./node_modules/graphlib/lib/alg/components.js ***! \*****************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var _ = __webpack_require__(/*! ../lodash */ "./node_modules/graphlib/lib/lodash.js"); module.exports = components; function components(g) { var visited = {}; var cmpts = []; var cmpt; function dfs(v) { if (_.has(visited, v)) return; visited[v] = true; cmpt.push(v); _.each(g.successors(v), dfs); _.each(g.predecessors(v), dfs); } _.each(g.nodes(), function(v) { cmpt = []; dfs(v); if (cmpt.length) { cmpts.push(cmpt); } }); return cmpts; } /***/ }), /***/ "./node_modules/graphlib/lib/alg/dfs.js": /*!**********************************************!*\ !*** ./node_modules/graphlib/lib/alg/dfs.js ***! \**********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var _ = __webpack_require__(/*! ../lodash */ "./node_modules/graphlib/lib/lodash.js"); module.exports = dfs; /* * A helper that preforms a pre- or post-order traversal on the input graph * and returns the nodes in the order they were visited. If the graph is * undirected then this algorithm will navigate using neighbors. If the graph * is directed then this algorithm will navigate using successors. * * Order must be one of "pre" or "post". */ function dfs(g, vs, order) { if (!_.isArray(vs)) { vs = [vs]; } var navigation = (g.isDirected() ? g.successors : g.neighbors).bind(g); var acc = []; var visited = {}; _.each(vs, function(v) { if (!g.hasNode(v)) { throw new Error("Graph does not have node: " + v); } doDfs(g, v, order === "post", visited, navigation, acc); }); return acc; } function doDfs(g, v, postorder, visited, navigation, acc) { if (!_.has(visited, v)) { visited[v] = true; if (!postorder) { acc.push(v); } _.each(navigation(v), function(w) { doDfs(g, w, postorder, visited, navigation, acc); }); if (postorder) { acc.push(v); } } } /***/ }), /***/ "./node_modules/graphlib/lib/alg/dijkstra-all.js": /*!*******************************************************!*\ !*** ./node_modules/graphlib/lib/alg/dijkstra-all.js ***! \*******************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var dijkstra = __webpack_require__(/*! ./dijkstra */ "./node_modules/graphlib/lib/alg/dijkstra.js"); var _ = __webpack_require__(/*! ../lodash */ "./node_modules/graphlib/lib/lodash.js"); module.exports = dijkstraAll; function dijkstraAll(g, weightFunc, edgeFunc) { return _.transform(g.nodes(), function(acc, v) { acc[v] = dijkstra(g, v, weightFunc, edgeFunc); }, {}); } /***/ }), /***/ "./node_modules/graphlib/lib/alg/dijkstra.js": /*!***************************************************!*\ !*** ./node_modules/graphlib/lib/alg/dijkstra.js ***! \***************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var _ = __webpack_require__(/*! ../lodash */ "./node_modules/graphlib/lib/lodash.js"); var PriorityQueue = __webpack_require__(/*! ../data/priority-queue */ "./node_modules/graphlib/lib/data/priority-queue.js"); module.exports = dijkstra; var DEFAULT_WEIGHT_FUNC = _.constant(1); function dijkstra(g, source, weightFn, edgeFn) { return runDijkstra(g, String(source), weightFn || DEFAULT_WEIGHT_FUNC, edgeFn || function(v) { return g.outEdges(v); }); } function runDijkstra(g, source, weightFn, edgeFn) { var results = {}; var pq = new PriorityQueue(); var v, vEntry; var updateNeighbors = function(edge) { var w = edge.v !== v ? edge.v : edge.w; var wEntry = results[w]; var weight = weightFn(edge); var distance = vEntry.distance + weight; if (weight < 0) { throw new Error("dijkstra does not allow negative edge weights. " + "Bad edge: " + edge + " Weight: " + weight); } if (distance < wEntry.distance) { wEntry.distance = distance; wEntry.predecessor = v; pq.decrease(w, distance); } }; g.nodes().forEach(function(v) { var distance = v === source ? 0 : Number.POSITIVE_INFINITY; results[v] = { distance: distance }; pq.add(v, distance); }); while (pq.size() > 0) { v = pq.removeMin(); vEntry = results[v]; if (vEntry.distance === Number.POSITIVE_INFINITY) { break; } edgeFn(v).forEach(updateNeighbors); } return results; } /***/ }), /***/ "./node_modules/graphlib/lib/alg/find-cycles.js": /*!******************************************************!*\ !*** ./node_modules/graphlib/lib/alg/find-cycles.js ***! \******************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var _ = __webpack_require__(/*! ../lodash */ "./node_modules/graphlib/lib/lodash.js"); var tarjan = __webpack_require__(/*! ./tarjan */ "./node_modules/graphlib/lib/alg/tarjan.js"); module.exports = findCycles; function findCycles(g) { return _.filter(tarjan(g), function(cmpt) { return cmpt.length > 1 || (cmpt.length === 1 && g.hasEdge(cmpt[0], cmpt[0])); }); } /***/ }), /***/ "./node_modules/graphlib/lib/alg/floyd-warshall.js": /*!*********************************************************!*\ !*** ./node_modules/graphlib/lib/alg/floyd-warshall.js ***! \*********************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var _ = __webpack_require__(/*! ../lodash */ "./node_modules/graphlib/lib/lodash.js"); module.exports = floydWarshall; var DEFAULT_WEIGHT_FUNC = _.constant(1); function floydWarshall(g, weightFn, edgeFn) { return runFloydWarshall(g, weightFn || DEFAULT_WEIGHT_FUNC, edgeFn || function(v) { return g.outEdges(v); }); } function runFloydWarshall(g, weightFn, edgeFn) { var results = {}; var nodes = g.nodes(); nodes.forEach(function(v) { results[v] = {}; results[v][v] = { distance: 0 }; nodes.forEach(function(w) { if (v !== w) { results[v][w] = { distance: Number.POSITIVE_INFINITY }; } }); edgeFn(v).forEach(function(edge) { var w = edge.v === v ? edge.w : edge.v; var d = weightFn(edge); results[v][w] = { distance: d, predecessor: v }; }); }); nodes.forEach(function(k) { var rowK = results[k]; nodes.forEach(function(i) { var rowI = results[i]; nodes.forEach(function(j) { var ik = rowI[k]; var kj = rowK[j]; var ij = rowI[j]; var altDistance = ik.distance + kj.distance; if (altDistance < ij.distance) { ij.distance = altDistance; ij.predecessor = kj.predecessor; } }); }); }); return results; } /***/ }), /***/ "./node_modules/graphlib/lib/alg/index.js": /*!************************************************!*\ !*** ./node_modules/graphlib/lib/alg/index.js ***! \************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { module.exports = { components: __webpack_require__(/*! ./components */ "./node_modules/graphlib/lib/alg/components.js"), dijkstra: __webpack_require__(/*! ./dijkstra */ "./node_modules/graphlib/lib/alg/dijkstra.js"), dijkstraAll: __webpack_require__(/*! ./dijkstra-all */ "./node_modules/graphlib/lib/alg/dijkstra-all.js"), findCycles: __webpack_require__(/*! ./find-cycles */ "./node_modules/graphlib/lib/alg/find-cycles.js"), floydWarshall: __webpack_require__(/*! ./floyd-warshall */ "./node_modules/graphlib/lib/alg/floyd-warshall.js"), isAcyclic: __webpack_require__(/*! ./is-acyclic */ "./node_modules/graphlib/lib/alg/is-acyclic.js"), postorder: __webpack_require__(/*! ./postorder */ "./node_modules/graphlib/lib/alg/postorder.js"), preorder: __webpack_require__(/*! ./preorder */ "./node_modules/graphlib/lib/alg/preorder.js"), prim: __webpack_require__(/*! ./prim */ "./node_modules/graphlib/lib/alg/prim.js"), tarjan: __webpack_require__(/*! ./tarjan */ "./node_modules/graphlib/lib/alg/tarjan.js"), topsort: __webpack_require__(/*! ./topsort */ "./node_modules/graphlib/lib/alg/topsort.js") }; /***/ }), /***/ "./node_modules/graphlib/lib/alg/is-acyclic.js": /*!*****************************************************!*\ !*** ./node_modules/graphlib/lib/alg/is-acyclic.js ***! \*****************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var topsort = __webpack_require__(/*! ./topsort */ "./node_modules/graphlib/lib/alg/topsort.js"); module.exports = isAcyclic; function isAcyclic(g) { try { topsort(g); } catch (e) { if (e instanceof topsort.CycleException) { return false; } throw e; } return true; } /***/ }), /***/ "./node_modules/graphlib/lib/alg/postorder.js": /*!****************************************************!*\ !*** ./node_modules/graphlib/lib/alg/postorder.js ***! \****************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var dfs = __webpack_require__(/*! ./dfs */ "./node_modules/graphlib/lib/alg/dfs.js"); module.exports = postorder; function postorder(g, vs) { return dfs(g, vs, "post"); } /***/ }), /***/ "./node_modules/graphlib/lib/alg/preorder.js": /*!***************************************************!*\ !*** ./node_modules/graphlib/lib/alg/preorder.js ***! \***************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var dfs = __webpack_require__(/*! ./dfs */ "./node_modules/graphlib/lib/alg/dfs.js"); module.exports = preorder; function preorder(g, vs) { return dfs(g, vs, "pre"); } /***/ }), /***/ "./node_modules/graphlib/lib/alg/prim.js": /*!***********************************************!*\ !*** ./node_modules/graphlib/lib/alg/prim.js ***! \***********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var _ = __webpack_require__(/*! ../lodash */ "./node_modules/graphlib/lib/lodash.js"); var Graph = __webpack_require__(/*! ../graph */ "./node_modules/graphlib/lib/graph.js"); var PriorityQueue = __webpack_require__(/*! ../data/priority-queue */ "./node_modules/graphlib/lib/data/priority-queue.js"); module.exports = prim; function prim(g, weightFunc) { var result = new Graph(); var parents = {}; var pq = new PriorityQueue(); var v; function updateNeighbors(edge) { var w = edge.v === v ? edge.w : edge.v; var pri = pq.priority(w); if (pri !== undefined) { var edgeWeight = weightFunc(edge); if (edgeWeight < pri) { parents[w] = v; pq.decrease(w, edgeWeight); } } } if (g.nodeCount() === 0) { return result; } _.each(g.nodes(), function(v) { pq.add(v, Number.POSITIVE_INFINITY); result.setNode(v); }); // Start from an arbitrary node pq.decrease(g.nodes()[0], 0); var init = false; while (pq.size() > 0) { v = pq.removeMin(); if (_.has(parents, v)) { result.setEdge(v, parents[v]); } else if (init) { throw new Error("Input graph is not connected: " + g); } else { init = true; } g.nodeEdges(v).forEach(updateNeighbors); } return result; } /***/ }), /***/ "./node_modules/graphlib/lib/alg/tarjan.js": /*!*************************************************!*\ !*** ./node_modules/graphlib/lib/alg/tarjan.js ***! \*************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var _ = __webpack_require__(/*! ../lodash */ "./node_modules/graphlib/lib/lodash.js"); module.exports = tarjan; function tarjan(g) { var index = 0; var stack = []; var visited = {}; // node id -> { onStack, lowlink, index } var results = []; function dfs(v) { var entry = visited[v] = { onStack: true, lowlink: index, index: index++ }; stack.push(v); g.successors(v).forEach(function(w) { if (!_.has(visited, w)) { dfs(w); entry.lowlink = Math.min(entry.lowlink, visited[w].lowlink); } else if (visited[w].onStack) { entry.lowlink = Math.min(entry.lowlink, visited[w].index); } }); if (entry.lowlink === entry.index) { var cmpt = []; var w; do { w = stack.pop(); visited[w].onStack = false; cmpt.push(w); } while (v !== w); results.push(cmpt); } } g.nodes().forEach(function(v) { if (!_.has(visited, v)) { dfs(v); } }); return results; } /***/ }), /***/ "./node_modules/graphlib/lib/alg/topsort.js": /*!**************************************************!*\ !*** ./node_modules/graphlib/lib/alg/topsort.js ***! \**************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var _ = __webpack_require__(/*! ../lodash */ "./node_modules/graphlib/lib/lodash.js"); module.exports = topsort; topsort.CycleException = CycleException; function topsort(g) { var visited = {}; var stack = {}; var results = []; function visit(node) { if (_.has(stack, node)) { throw new CycleException(); } if (!_.has(visited, node)) { stack[node] = true; visited[node] = true; _.each(g.predecessors(node), visit); delete stack[node]; results.push(node); } } _.each(g.sinks(), visit); if (_.size(visited) !== g.nodeCount()) { throw new CycleException(); } return results; } function CycleException() {} CycleException.prototype = new Error(); // must be an instance of Error to pass testing /***/ }), /***/ "./node_modules/graphlib/lib/data/priority-queue.js": /*!**********************************************************!*\ !*** ./node_modules/graphlib/lib/data/priority-queue.js ***! \**********************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var _ = __webpack_require__(/*! ../lodash */ "./node_modules/graphlib/lib/lodash.js"); module.exports = PriorityQueue; /** * A min-priority queue data structure. This algorithm is derived from Cormen, * et al., "Introduction to Algorithms". The basic idea of a min-priority * queue is that you can efficiently (in O(1) time) get the smallest key in * the queue. Adding and removing elements takes O(log n) time. A key can * have its priority decreased in O(log n) time. */ function PriorityQueue() { this._arr = []; this._keyIndices = {}; } /** * Returns the number of elements in the queue. Takes `O(1)` time. */ PriorityQueue.prototype.size = function() { return this._arr.length; }; /** * Returns the keys that are in the queue. Takes `O(n)` time. */ PriorityQueue.prototype.keys = function() { return this._arr.map(function(x) { return x.key; }); }; /** * Returns `true` if **key** is in the queue and `false` if not. */ PriorityQueue.prototype.has = function(key) { return _.has(this._keyIndices, key); }; /** * Returns the priority for **key**. If **key** is not present in the queue * then this function returns `undefined`. Takes `O(1)` time. * * @param {Object} key */ PriorityQueue.prototype.priority = function(key) { var index = this._keyIndices[key]; if (index !== undefined) { return this._arr[index].priority; } }; /** * Returns the key for the minimum element in this queue. If the queue is * empty this function throws an Error. Takes `O(1)` time. */ PriorityQueue.prototype.min = function() { if (this.size() === 0) { throw new Error("Queue underflow"); } return this._arr[0].key; }; /** * Inserts a new key into the priority queue. If the key already exists in * the queue this function returns `false`; otherwise it will return `true`. * Takes `O(n)` time. * * @param {Object} key the key to add * @param {Number} priority the initial priority for the key */ PriorityQueue.prototype.add = function(key, priority) { var keyIndices = this._keyIndices; key = String(key); if (!_.has(keyIndices, key)) { var arr = this._arr; var index = arr.length; keyIndices[key] = index; arr.push({key: key, priority: priority}); this._decrease(index); return true; } return false; }; /** * Removes and returns the smallest key in the queue. Takes `O(log n)` time. */ PriorityQueue.prototype.removeMin = function() { this._swap(0, this._arr.length - 1); var min = this._arr.pop(); delete this._keyIndices[min.key]; this._heapify(0); return min.key; }; /** * Decreases the priority for **key** to **priority**. If the new priority is * greater than the previous priority, this function will throw an Error. * * @param {Object} key the key for which to raise priority * @param {Number} priority the new priority for the key */ PriorityQueue.prototype.decrease = function(key, priority) { var index = this._keyIndices[key]; if (priority > this._arr[index].priority) { throw new Error("New priority is greater than current priority. " + "Key: " + key + " Old: " + this._arr[index].priority + " New: " + priority); } this._arr[index].priority = priority; this._decrease(index); }; PriorityQueue.prototype._heapify = function(i) { var arr = this._arr; var l = 2 * i; var r = l + 1; var largest = i; if (l < arr.length) { largest = arr[l].priority < arr[largest].priority ? l : largest; if (r < arr.length) { largest = arr[r].priority < arr[largest].priority ? r : largest; } if (largest !== i) { this._swap(i, largest); this._heapify(largest); } } }; PriorityQueue.prototype._decrease = function(index) { var arr = this._arr; var priority = arr[index].priority; var parent; while (index !== 0) { parent = index >> 1; if (arr[parent].priority < priority) { break; } this._swap(index, parent); index = parent; } }; PriorityQueue.prototype._swap = function(i, j) { var arr = this._arr; var keyIndices = this._keyIndices; var origArrI = arr[i]; var origArrJ = arr[j]; arr[i] = origArrJ; arr[j] = origArrI; keyIndices[origArrJ.key] = i; keyIndices[origArrI.key] = j; }; /***/ }), /***/ "./node_modules/graphlib/lib/graph.js": /*!********************************************!*\ !*** ./node_modules/graphlib/lib/graph.js ***! \********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var _ = __webpack_require__(/*! ./lodash */ "./node_modules/graphlib/lib/lodash.js"); module.exports = Graph; var DEFAULT_EDGE_NAME = "\x00"; var GRAPH_NODE = "\x00"; var EDGE_KEY_DELIM = "\x01"; // Implementation notes: // // * Node id query functions should return string ids for the nodes // * Edge id query functions should return an "edgeObj", edge object, that is // composed of enough information to uniquely identify an edge: {v, w, name}. // * Internally we use an "edgeId", a stringified form of the edgeObj, to // reference edges. This is because we need a performant way to look these // edges up and, object properties, which have string keys, are the closest // we're going to get to a performant hashtable in JavaScript. function Graph(opts) { this._isDirected = _.has(opts, "directed") ? opts.directed : true; this._isMultigraph = _.has(opts, "multigraph") ? opts.multigraph : false; this._isCompound = _.has(opts, "compound") ? opts.compound : false; // Label for the graph itself this._label = undefined; // Defaults to be set when creating a new node this._defaultNodeLabelFn = _.constant(undefined); // Defaults to be set when creating a new edge this._defaultEdgeLabelFn = _.constant(undefined); // v -> label this._nodes = {}; if (this._isCompound) { // v -> parent this._parent = {}; // v -> children this._children = {}; this._children[GRAPH_NODE] = {}; } // v -> edgeObj this._in = {}; // u -> v -> Number this._preds = {}; // v -> edgeObj this._out = {}; // v -> w -> Number this._sucs = {}; // e -> edgeObj this._edgeObjs = {}; // e -> label this._edgeLabels = {}; } /* Number of nodes in the graph. Should only be changed by the implementation. */ Graph.prototype._nodeCount = 0; /* Number of edges in the graph. Should only be changed by the implementation. */ Graph.prototype._edgeCount = 0; /* === Graph functions ========= */ Graph.prototype.isDirected = function() { return this._isDirected; }; Graph.prototype.isMultigraph = function() { return this._isMultigraph; }; Graph.prototype.isCompound = function() { return this._isCompound; }; Graph.prototype.setGraph = function(label) { this._label = label; return this; }; Graph.prototype.graph = function() { return this._label; }; /* === Node functions ========== */ Graph.prototype.setDefaultNodeLabel = function(newDefault) { if (!_.isFunction(newDefault)) { newDefault = _.constant(newDefault); } this._defaultNodeLabelFn = newDefault; return this; }; Graph.prototype.nodeCount = function() { return this._nodeCount; }; Graph.prototype.nodes = function() { return _.keys(this._nodes); }; Graph.prototype.sources = function() { var self = this; return _.filter(this.nodes(), function(v) { return _.isEmpty(self._in[v]); }); }; Graph.prototype.sinks = function() { var self = this; return _.filter(this.nodes(), function(v) { return _.isEmpty(self._out[v]); }); }; Graph.prototype.setNodes = function(vs, value) { var args = arguments; var self = this; _.each(vs, function(v) { if (args.length > 1) { self.setNode(v, value); } else { self.setNode(v); } }); return this; }; Graph.prototype.setNode = function(v, value) { if (_.has(this._nodes, v)) { if (arguments.length > 1) { this._nodes[v] = value; } return this; } this._nodes[v] = arguments.length > 1 ? value : this._defaultNodeLabelFn(v); if (this._isCompound) { this._parent[v] = GRAPH_NODE; this._children[v] = {}; this._children[GRAPH_NODE][v] = true; } this._in[v] = {}; this._preds[v] = {}; this._out[v] = {}; this._sucs[v] = {}; ++this._nodeCount; return this; }; Graph.prototype.node = function(v) { return this._nodes[v]; }; Graph.prototype.hasNode = function(v) { return _.has(this._nodes, v); }; Graph.prototype.removeNode = function(v) { var self = this; if (_.has(this._nodes, v)) { var removeEdge = function(e) { self.removeEdge(self._edgeObjs[e]); }; delete this._nodes[v]; if (this._isCompound) { this._removeFromParentsChildList(v); delete this._parent[v]; _.each(this.children(v), function(child) { self.setParent(child); }); delete this._children[v]; } _.each(_.keys(this._in[v]), removeEdge); delete this._in[v]; delete this._preds[v]; _.each(_.keys(this._out[v]), removeEdge); delete this._out[v]; delete this._sucs[v]; --this._nodeCount; } return this; }; Graph.prototype.setParent = function(v, parent) { if (!this._isCompound) { throw new Error("Cannot set parent in a non-compound graph"); } if (_.isUndefined(parent)) { parent = GRAPH_NODE; } else { // Coerce parent to string parent += ""; for (var ancestor = parent; !_.isUndefined(ancestor); ancestor = this.parent(ancestor)) { if (ancestor === v) { throw new Error("Setting " + parent+ " as parent of " + v + " would create a cycle"); } } this.setNode(parent); } this.setNode(v); this._removeFromParentsChildList(v); this._parent[v] = parent; this._children[parent][v] = true; return this; }; Graph.prototype._removeFromParentsChildList = function(v) { delete this._children[this._parent[v]][v]; }; Graph.prototype.parent = function(v) { if (this._isCompound) { var parent = this._parent[v]; if (parent !== GRAPH_NODE) { return parent; } } }; Graph.prototype.children = function(v) { if (_.isUndefined(v)) { v = GRAPH_NODE; } if (this._isCompound) { var children = this._children[v]; if (children) { return _.keys(children); } } else if (v === GRAPH_NODE) { return this.nodes(); } else if (this.hasNode(v)) { return []; } }; Graph.prototype.predecessors = function(v) { var predsV = this._preds[v]; if (predsV) { return _.keys(predsV); } }; Graph.prototype.successors = function(v) { var sucsV = this._sucs[v]; if (sucsV) { return _.keys(sucsV); } }; Graph.prototype.neighbors = function(v) { var preds = this.predecessors(v); if (preds) { return _.union(preds, this.successors(v)); } }; Graph.prototype.isLeaf = function (v) { var neighbors; if (this.isDirected()) { neighbors = this.successors(v); } else { neighbors = this.neighbors(v); } return neighbors.length === 0; }; Graph.prototype.filterNodes = function(filter) { var copy = new this.constructor({ directed: this._isDirected, multigraph: this._isMultigraph, compound: this._isCompound }); copy.setGraph(this.graph()); var self = this; _.each(this._nodes, function(value, v) { if (filter(v)) { copy.setNode(v, value); } }); _.each(this._edgeObjs, function(e) { if (copy.hasNode(e.v) && copy.hasNode(e.w)) { copy.setEdge(e, self.edge(e)); } }); var parents = {}; function findParent(v) { var parent = self.parent(v); if (parent === undefined || copy.hasNode(parent)) { parents[v] = parent; return parent; } else if (parent in parents) { return parents[parent]; } else { return findParent(parent); } } if (this._isCompound) { _.each(copy.nodes(), function(v) { copy.setParent(v, findParent(v)); }); } return copy; }; /* === Edge functions ========== */ Graph.prototype.setDefaultEdgeLabel = function(newDefault) { if (!_.isFunction(newDefault)) { newDefault = _.constant(newDefault); } this._defaultEdgeLabelFn = newDefault; return this; }; Graph.prototype.edgeCount = function() { return this._edgeCount; }; Graph.prototype.edges = function() { return _.values(this._edgeObjs); }; Graph.prototype.setPath = function(vs, value) { var self = this; var args = arguments; _.reduce(vs, function(v, w) { if (args.length > 1) { self.setEdge(v, w, value); } else { self.setEdge(v, w); } return w; }); return this; }; /* * setEdge(v, w, [value, [name]]) * setEdge({ v, w, [name] }, [value]) */ Graph.prototype.setEdge = function() { var v, w, name, value; var valueSpecified = false; var arg0 = arguments[0]; if (typeof arg0 === "object" && arg0 !== null && "v" in arg0) { v = arg0.v; w = arg0.w; name = arg0.name; if (arguments.length === 2) { value = arguments[1]; valueSpecified = true; } } else { v = arg0; w = arguments[1]; name = arguments[3]; if (arguments.length > 2) { value = arguments[2]; valueSpecified = true; } } v = "" + v; w = "" + w; if (!_.isUndefined(name)) { name = "" + name; } var e = edgeArgsToId(this._isDirected, v, w, name); if (_.has(this._edgeLabels, e)) { if (valueSpecified) { this._edgeLabels[e] = value; } return this; } if (!_.isUndefined(name) && !this._isMultigraph) { throw new Error("Cannot set a named edge when isMultigraph = false"); } // It didn't exist, so we need to create it. // First ensure the nodes exist. this.setNode(v); this.setNode(w); this._edgeLabels[e] = valueSpecified ? value : this._defaultEdgeLabelFn(v, w, name); var edgeObj = edgeArgsToObj(this._isDirected, v, w, name); // Ensure we add undirected edges in a consistent way. v = edgeObj.v; w = edgeObj.w; Object.freeze(edgeObj); this._edgeObjs[e] = edgeObj; incrementOrInitEntry(this._preds[w], v); incrementOrInitEntry(this._sucs[v], w); this._in[w][e] = edgeObj; this._out[v][e] = edgeObj; this._edgeCount++; return this; }; Graph.prototype.edge = function(v, w, name) { var e = (arguments.length === 1 ? edgeObjToId(this._isDirected, arguments[0]) : edgeArgsToId(this._isDirected, v, w, name)); return this._edgeLabels[e]; }; Graph.prototype.hasEdge = function(v, w, name) { var e = (arguments.length === 1 ? edgeObjToId(this._isDirected, arguments[0]) : edgeArgsToId(this._isDirected, v, w, name)); return _.has(this._edgeLabels, e); }; Graph.prototype.removeEdge = function(v, w, name) { var e = (arguments.length === 1 ? edgeObjToId(this._isDirected, arguments[0]) : edgeArgsToId(this._isDirected, v, w, name)); var edge = this._edgeObjs[e]; if (edge) { v = edge.v; w = edge.w; delete this._edgeLabels[e]; delete this._edgeObjs[e]; decrementOrRemoveEntry(this._preds[w], v); decrementOrRemoveEntry(this._sucs[v], w); delete this._in[w][e]; delete this._out[v][e]; this._edgeCount--; } return this; }; Graph.prototype.inEdges = function(v, u) { var inV = this._in[v]; if (inV) { var edges = _.values(inV); if (!u) { return edges; } return _.filter(edges, function(edge) { return edge.v === u; }); } }; Graph.prototype.outEdges = function(v, w) { var outV = this._out[v]; if (outV) { var edges = _.values(outV); if (!w) { return edges; } return _.filter(edges, function(edge) { return edge.w === w; }); } }; Graph.prototype.nodeEdges = function(v, w) { var inEdges = this.inEdges(v, w); if (inEdges) { return inEdges.concat(this.outEdges(v, w)); } }; function incrementOrInitEntry(map, k) { if (map[k]) { map[k]++; } else { map[k] = 1; } } function decrementOrRemoveEntry(map, k) { if (!--map[k]) { delete map[k]; } } function edgeArgsToId(isDirected, v_, w_, name) { var v = "" + v_; var w = "" + w_; if (!isDirected && v > w) { var tmp = v; v = w; w = tmp; } return v + EDGE_KEY_DELIM + w + EDGE_KEY_DELIM + (_.isUndefined(name) ? DEFAULT_EDGE_NAME : name); } function edgeArgsToObj(isDirected, v_, w_, name) { var v = "" + v_; var w = "" + w_; if (!isDirected && v > w) { var tmp = v; v = w; w = tmp; } var edgeObj = { v: v, w: w }; if (name) { edgeObj.name = name; } return edgeObj; } function edgeObjToId(isDirected, edgeObj) { return edgeArgsToId(isDirected, edgeObj.v, edgeObj.w, edgeObj.name); } /***/ }), /***/ "./node_modules/graphlib/lib/index.js": /*!********************************************!*\ !*** ./node_modules/graphlib/lib/index.js ***! \********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { // Includes only the "core" of graphlib module.exports = { Graph: __webpack_require__(/*! ./graph */ "./node_modules/graphlib/lib/graph.js"), version: __webpack_require__(/*! ./version */ "./node_modules/graphlib/lib/version.js") }; /***/ }), /***/ "./node_modules/graphlib/lib/json.js": /*!*******************************************!*\ !*** ./node_modules/graphlib/lib/json.js ***! \*******************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var _ = __webpack_require__(/*! ./lodash */ "./node_modules/graphlib/lib/lodash.js"); var Graph = __webpack_require__(/*! ./graph */ "./node_modules/graphlib/lib/graph.js"); module.exports = { write: write, read: read }; function write(g) { var json = { options: { directed: g.isDirected(), multigraph: g.isMultigraph(), compound: g.isCompound() }, nodes: writeNodes(g), edges: writeEdges(g) }; if (!_.isUndefined(g.graph())) { json.value = _.clone(g.graph()); } return json; } function writeNodes(g) { return _.map(g.nodes(), function(v) { var nodeValue = g.node(v); var parent = g.parent(v); var node = { v: v }; if (!_.isUndefined(nodeValue)) { node.value = nodeValue; } if (!_.isUndefined(parent)) { node.parent = parent; } return node; }); } function writeEdges(g) { return _.map(g.edges(), function(e) { var edgeValue = g.edge(e); var edge = { v: e.v, w: e.w }; if (!_.isUndefined(e.name)) { edge.name = e.name; } if (!_.isUndefined(edgeValue)) { edge.value = edgeValue; } return edge; }); } function read(json) { var g = new Graph(json.options).setGraph(json.value); _.each(json.nodes, function(entry) { g.setNode(entry.v, entry.value); if (entry.parent) { g.setParent(entry.v, entry.parent); } }); _.each(json.edges, function(entry) { g.setEdge({ v: entry.v, w: entry.w, name: entry.name }, entry.value); }); return g; } /***/ }), /***/ "./node_modules/graphlib/lib/lodash.js": /*!*********************************************!*\ !*** ./node_modules/graphlib/lib/lodash.js ***! \*********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { /* global window */ var lodash; if (true) { try { lodash = { clone: __webpack_require__(/*! lodash/clone */ "./node_modules/lodash/clone.js"), constant: __webpack_require__(/*! lodash/constant */ "./node_modules/lodash/constant.js"), each: __webpack_require__(/*! lodash/each */ "./node_modules/lodash/each.js"), filter: __webpack_require__(/*! lodash/filter */ "./node_modules/lodash/filter.js"), has: __webpack_require__(/*! lodash/has */ "./node_modules/lodash/has.js"), isArray: __webpack_require__(/*! lodash/isArray */ "./node_modules/lodash/isArray.js"), isEmpty: __webpack_require__(/*! lodash/isEmpty */ "./node_modules/lodash/isEmpty.js"), isFunction: __webpack_require__(/*! lodash/isFunction */ "./node_modules/lodash/isFunction.js"), isUndefined: __webpack_require__(/*! lodash/isUndefined */ "./node_modules/lodash/isUndefined.js"), keys: __webpack_require__(/*! lodash/keys */ "./node_modules/lodash/keys.js"), map: __webpack_require__(/*! lodash/map */ "./node_modules/lodash/map.js"), reduce: __webpack_require__(/*! lodash/reduce */ "./node_modules/lodash/reduce.js"), size: __webpack_require__(/*! lodash/size */ "./node_modules/lodash/size.js"), transform: __webpack_require__(/*! lodash/transform */ "./node_modules/lodash/transform.js"), union: __webpack_require__(/*! lodash/union */ "./node_modules/lodash/union.js"), values: __webpack_require__(/*! lodash/values */ "./node_modules/lodash/values.js") }; } catch (e) { // continue regardless of error } } if (!lodash) { lodash = window._; } module.exports = lodash; /***/ }), /***/ "./node_modules/graphlib/lib/version.js": /*!**********************************************!*\ !*** ./node_modules/graphlib/lib/version.js ***! \**********************************************/ /***/ (function(module) { module.exports = '2.1.8'; /***/ }), /***/ "./node_modules/heap/index.js": /*!************************************!*\ !*** ./node_modules/heap/index.js ***! \************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { module.exports = __webpack_require__(/*! ./lib/heap */ "./node_modules/heap/lib/heap.js"); /***/ }), /***/ "./node_modules/heap/lib/heap.js": /*!***************************************!*\ !*** ./node_modules/heap/lib/heap.js ***! \***************************************/ /***/ (function(module, exports) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// Generated by CoffeeScript 1.8.0 (function() { var Heap, defaultCmp, floor, heapify, heappop, heappush, heappushpop, heapreplace, insort, min, nlargest, nsmallest, updateItem, _siftdown, _siftup; floor = Math.floor, min = Math.min; /* Default comparison function to be used */ defaultCmp = function(x, y) { if (x < y) { return -1; } if (x > y) { return 1; } return 0; }; /* Insert item x in list a, and keep it sorted assuming a is sorted. If x is already in a, insert it to the right of the rightmost x. Optional args lo (default 0) and hi (default a.length) bound the slice of a to be searched. */ insort = function(a, x, lo, hi, cmp) { var mid; if (lo == null) { lo = 0; } if (cmp == null) { cmp = defaultCmp; } if (lo < 0) { throw new Error('lo must be non-negative'); } if (hi == null) { hi = a.length; } while (lo < hi) { mid = floor((lo + hi) / 2); if (cmp(x, a[mid]) < 0) { hi = mid; } else { lo = mid + 1; } } return ([].splice.apply(a, [lo, lo - lo].concat(x)), x); }; /* Push item onto heap, maintaining the heap invariant. */ heappush = function(array, item, cmp) { if (cmp == null) { cmp = defaultCmp; } array.push(item); return _siftdown(array, 0, array.length - 1, cmp); }; /* Pop the smallest item off the heap, maintaining the heap invariant. */ heappop = function(array, cmp) { var lastelt, returnitem; if (cmp == null) { cmp = defaultCmp; } lastelt = array.pop(); if (array.length) { returnitem = array[0]; array[0] = lastelt; _siftup(array, 0, cmp); } else { returnitem = lastelt; } return returnitem; }; /* Pop and return the current smallest value, and add the new item. This is more efficient than heappop() followed by heappush(), and can be more appropriate when using a fixed size heap. Note that the value returned may be larger than item! That constrains reasonable use of this routine unless written as part of a conditional replacement: if item > array[0] item = heapreplace(array, item) */ heapreplace = function(array, item, cmp) { var returnitem; if (cmp == null) { cmp = defaultCmp; } returnitem = array[0]; array[0] = item; _siftup(array, 0, cmp); return returnitem; }; /* Fast version of a heappush followed by a heappop. */ heappushpop = function(array, item, cmp) { var _ref; if (cmp == null) { cmp = defaultCmp; } if (array.length && cmp(array[0], item) < 0) { _ref = [array[0], item], item = _ref[0], array[0] = _ref[1]; _siftup(array, 0, cmp); } return item; }; /* Transform list into a heap, in-place, in O(array.length) time. */ heapify = function(array, cmp) { var i, _i, _j, _len, _ref, _ref1, _results, _results1; if (cmp == null) { cmp = defaultCmp; } _ref1 = (function() { _results1 = []; for (var _j = 0, _ref = floor(array.length / 2); 0 <= _ref ? _j < _ref : _j > _ref; 0 <= _ref ? _j++ : _j--){ _results1.push(_j); } return _results1; }).apply(this).reverse(); _results = []; for (_i = 0, _len = _ref1.length; _i < _len; _i++) { i = _ref1[_i]; _results.push(_siftup(array, i, cmp)); } return _results; }; /* Update the position of the given item in the heap. This function should be called every time the item is being modified. */ updateItem = function(array, item, cmp) { var pos; if (cmp == null) { cmp = defaultCmp; } pos = array.indexOf(item); if (pos === -1) { return; } _siftdown(array, 0, pos, cmp); return _siftup(array, pos, cmp); }; /* Find the n largest elements in a dataset. */ nlargest = function(array, n, cmp) { var elem, result, _i, _len, _ref; if (cmp == null) { cmp = defaultCmp; } result = array.slice(0, n); if (!result.length) { return result; } heapify(result, cmp); _ref = array.slice(n); for (_i = 0, _len = _ref.length; _i < _len; _i++) { elem = _ref[_i]; heappushpop(result, elem, cmp); } return result.sort(cmp).reverse(); }; /* Find the n smallest elements in a dataset. */ nsmallest = function(array, n, cmp) { var elem, i, los, result, _i, _j, _len, _ref, _ref1, _results; if (cmp == null) { cmp = defaultCmp; } if (n * 10 <= array.length) { result = array.slice(0, n).sort(cmp); if (!result.length) { return result; } los = result[result.length - 1]; _ref = array.slice(n); for (_i = 0, _len = _ref.length; _i < _len; _i++) { elem = _ref[_i]; if (cmp(elem, los) < 0) { insort(result, elem, 0, null, cmp); result.pop(); los = result[result.length - 1]; } } return result; } heapify(array, cmp); _results = []; for (i = _j = 0, _ref1 = min(n, array.length); 0 <= _ref1 ? _j < _ref1 : _j > _ref1; i = 0 <= _ref1 ? ++_j : --_j) { _results.push(heappop(array, cmp)); } return _results; }; _siftdown = function(array, startpos, pos, cmp) { var newitem, parent, parentpos; if (cmp == null) { cmp = defaultCmp; } newitem = array[pos]; while (pos > startpos) { parentpos = (pos - 1) >> 1; parent = array[parentpos]; if (cmp(newitem, parent) < 0) { array[pos] = parent; pos = parentpos; continue; } break; } return array[pos] = newitem; }; _siftup = function(array, pos, cmp) { var childpos, endpos, newitem, rightpos, startpos; if (cmp == null) { cmp = defaultCmp; } endpos = array.length; startpos = pos; newitem = array[pos]; childpos = 2 * pos + 1; while (childpos < endpos) { rightpos = childpos + 1; if (rightpos < endpos && !(cmp(array[childpos], array[rightpos]) < 0)) { childpos = rightpos; } array[pos] = array[childpos]; pos = childpos; childpos = 2 * pos + 1; } array[pos] = newitem; return _siftdown(array, startpos, pos, cmp); }; Heap = (function() { Heap.push = heappush; Heap.pop = heappop; Heap.replace = heapreplace; Heap.pushpop = heappushpop; Heap.heapify = heapify; Heap.updateItem = updateItem; Heap.nlargest = nlargest; Heap.nsmallest = nsmallest; function Heap(cmp) { this.cmp = cmp != null ? cmp : defaultCmp; this.nodes = []; } Heap.prototype.push = function(x) { return heappush(this.nodes, x, this.cmp); }; Heap.prototype.pop = function() { return heappop(this.nodes, this.cmp); }; Heap.prototype.peek = function() { return this.nodes[0]; }; Heap.prototype.contains = function(x) { return this.nodes.indexOf(x) !== -1; }; Heap.prototype.replace = function(x) { return heapreplace(this.nodes, x, this.cmp); }; Heap.prototype.pushpop = function(x) { return heappushpop(this.nodes, x, this.cmp); }; Heap.prototype.heapify = function() { return heapify(this.nodes, this.cmp); }; Heap.prototype.updateItem = function(x) { return updateItem(this.nodes, x, this.cmp); }; Heap.prototype.clear = function() { return this.nodes = []; }; Heap.prototype.empty = function() { return this.nodes.length === 0; }; Heap.prototype.size = function() { return this.nodes.length; }; Heap.prototype.clone = function() { var heap; heap = new Heap(); heap.nodes = this.nodes.slice(0); return heap; }; Heap.prototype.toArray = function() { return this.nodes.slice(0); }; Heap.prototype.insert = Heap.prototype.push; Heap.prototype.top = Heap.prototype.peek; Heap.prototype.front = Heap.prototype.peek; Heap.prototype.has = Heap.prototype.contains; Heap.prototype.copy = Heap.prototype.clone; return Heap; })(); (function(root, factory) { if (true) { return !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else {} })(this, function() { return Heap; }); }).call(this); /***/ }), /***/ "./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js": /*!**********************************************************************************!*\ !*** ./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js ***! \**********************************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var reactIs = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js"); /** * Copyright 2015, Yahoo! Inc. * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. */ var REACT_STATICS = { childContextTypes: true, contextType: true, contextTypes: true, defaultProps: true, displayName: true, getDefaultProps: true, getDerivedStateFromError: true, getDerivedStateFromProps: true, mixins: true, propTypes: true, type: true }; var KNOWN_STATICS = { name: true, length: true, prototype: true, caller: true, callee: true, arguments: true, arity: true }; var FORWARD_REF_STATICS = { '$$typeof': true, render: true, defaultProps: true, displayName: true, propTypes: true }; var MEMO_STATICS = { '$$typeof': true, compare: true, defaultProps: true, displayName: true, propTypes: true, type: true }; var TYPE_STATICS = {}; TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS; TYPE_STATICS[reactIs.Memo] = MEMO_STATICS; function getStatics(component) { // React v16.11 and below if (reactIs.isMemo(component)) { return MEMO_STATICS; } // React v16.12 and above return TYPE_STATICS[component['$$typeof']] || REACT_STATICS; } var defineProperty = Object.defineProperty; var getOwnPropertyNames = Object.getOwnPropertyNames; var getOwnPropertySymbols = Object.getOwnPropertySymbols; var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; var getPrototypeOf = Object.getPrototypeOf; var objectPrototype = Object.prototype; function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) { if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components if (objectPrototype) { var inheritedComponent = getPrototypeOf(sourceComponent); if (inheritedComponent && inheritedComponent !== objectPrototype) { hoistNonReactStatics(targetComponent, inheritedComponent, blacklist); } } var keys = getOwnPropertyNames(sourceComponent); if (getOwnPropertySymbols) { keys = keys.concat(getOwnPropertySymbols(sourceComponent)); } var targetStatics = getStatics(targetComponent); var sourceStatics = getStatics(sourceComponent); for (var i = 0; i < keys.length; ++i) { var key = keys[i]; if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) { var descriptor = getOwnPropertyDescriptor(sourceComponent, key); try { // Avoid failures from read-only properties defineProperty(targetComponent, key, descriptor); } catch (e) {} } } } return targetComponent; } module.exports = hoistNonReactStatics; /***/ }), /***/ "./node_modules/invariant/browser.js": /*!*******************************************!*\ !*** ./node_modules/invariant/browser.js ***! \*******************************************/ /***/ (function(module) { "use strict"; /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ /** * Use invariant() to assert state which your program assumes to be true. * * Provide sprintf-style format (only %s is supported) and arguments * to provide information about what broke and what you were * expecting. * * The invariant message will be stripped in production, but the invariant * will remain to ensure logic does not differ in production. */ var invariant = function(condition, format, a, b, c, d, e, f) { if (true) { if (format === undefined) { throw new Error('invariant requires an error message argument'); } } if (!condition) { var error; if (format === undefined) { error = new Error( 'Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.' ); } else { var args = [a, b, c, d, e, f]; var argIndex = 0; error = new Error( format.replace(/%s/g, function() { return args[argIndex++]; }) ); error.name = 'Invariant Violation'; } error.framesToPop = 1; // we don't care about invariant's own frame throw error; } }; module.exports = invariant; /***/ }), /***/ "./node_modules/is-string-blank/index.js": /*!***********************************************!*\ !*** ./node_modules/is-string-blank/index.js ***! \***********************************************/ /***/ (function(module) { "use strict"; /** * Is this string all whitespace? * This solution kind of makes my brain hurt, but it's significantly faster * than !str.trim() or any other solution I could find. * * whitespace codes from: http://en.wikipedia.org/wiki/Whitespace_character * and verified with: * * for(var i = 0; i < 65536; i++) { * var s = String.fromCharCode(i); * if(+s===0 && !s.trim()) console.log(i, s); * } * * which counts a couple of these as *not* whitespace, but finds nothing else * that *is* whitespace. Note that charCodeAt stops at 16 bits, but it appears * that there are no whitespace characters above this, and code points above * this do not map onto white space characters. */ module.exports = function(str){ var l = str.length, a; for(var i = 0; i < l; i++) { a = str.charCodeAt(i); if((a < 9 || a > 13) && (a !== 32) && (a !== 133) && (a !== 160) && (a !== 5760) && (a !== 6158) && (a < 8192 || a > 8205) && (a !== 8232) && (a !== 8233) && (a !== 8239) && (a !== 8287) && (a !== 8288) && (a !== 12288) && (a !== 65279)) { return false; } } return true; } /***/ }), /***/ "./node_modules/layout-base/layout-base.js": /*!*************************************************!*\ !*** ./node_modules/layout-base/layout-base.js ***! \*************************************************/ /***/ (function(module) { (function webpackUniversalModuleDefinition(root, factory) { if(true) module.exports = factory(); else {} })(this, function() { return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __nested_webpack_require_543__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __nested_webpack_require_543__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __nested_webpack_require_543__.m = modules; /******/ /******/ // expose the module cache /******/ __nested_webpack_require_543__.c = installedModules; /******/ /******/ // identity function for calling harmony imports with the correct context /******/ __nested_webpack_require_543__.i = function(value) { return value; }; /******/ /******/ // define getter function for harmony exports /******/ __nested_webpack_require_543__.d = function(exports, name, getter) { /******/ if(!__nested_webpack_require_543__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { /******/ configurable: false, /******/ enumerable: true, /******/ get: getter /******/ }); /******/ } /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __nested_webpack_require_543__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __nested_webpack_require_543__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __nested_webpack_require_543__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __nested_webpack_require_543__.p = ""; /******/ /******/ // Load entry module and return exports /******/ return __nested_webpack_require_543__(__nested_webpack_require_543__.s = 28); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; function LayoutConstants() {} /** * Layout Quality: 0:draft, 1:default, 2:proof */ LayoutConstants.QUALITY = 1; /** * Default parameters */ LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED = false; LayoutConstants.DEFAULT_INCREMENTAL = false; LayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT = true; LayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT = false; LayoutConstants.DEFAULT_ANIMATION_PERIOD = 50; LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES = false; // ----------------------------------------------------------------------------- // Section: General other constants // ----------------------------------------------------------------------------- /* * Margins of a graph to be applied on bouding rectangle of its contents. We * assume margins on all four sides to be uniform. */ LayoutConstants.DEFAULT_GRAPH_MARGIN = 15; /* * Whether to consider labels in node dimensions or not */ LayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS = false; /* * Default dimension of a non-compound node. */ LayoutConstants.SIMPLE_NODE_SIZE = 40; /* * Default dimension of a non-compound node. */ LayoutConstants.SIMPLE_NODE_HALF_SIZE = LayoutConstants.SIMPLE_NODE_SIZE / 2; /* * Empty compound node size. When a compound node is empty, its both * dimensions should be of this value. */ LayoutConstants.EMPTY_COMPOUND_NODE_SIZE = 40; /* * Minimum length that an edge should take during layout */ LayoutConstants.MIN_EDGE_LENGTH = 1; /* * World boundaries that layout operates on */ LayoutConstants.WORLD_BOUNDARY = 1000000; /* * World boundaries that random positioning can be performed with */ LayoutConstants.INITIAL_WORLD_BOUNDARY = LayoutConstants.WORLD_BOUNDARY / 1000; /* * Coordinates of the world center */ LayoutConstants.WORLD_CENTER_X = 1200; LayoutConstants.WORLD_CENTER_Y = 900; module.exports = LayoutConstants; /***/ }), /* 1 */ /***/ (function(module, exports, __nested_webpack_require_4947__) { "use strict"; var LGraphObject = __nested_webpack_require_4947__(2); var IGeometry = __nested_webpack_require_4947__(8); var IMath = __nested_webpack_require_4947__(9); function LEdge(source, target, vEdge) { LGraphObject.call(this, vEdge); this.isOverlapingSourceAndTarget = false; this.vGraphObject = vEdge; this.bendpoints = []; this.source = source; this.target = target; } LEdge.prototype = Object.create(LGraphObject.prototype); for (var prop in LGraphObject) { LEdge[prop] = LGraphObject[prop]; } LEdge.prototype.getSource = function () { return this.source; }; LEdge.prototype.getTarget = function () { return this.target; }; LEdge.prototype.isInterGraph = function () { return this.isInterGraph; }; LEdge.prototype.getLength = function () { return this.length; }; LEdge.prototype.isOverlapingSourceAndTarget = function () { return this.isOverlapingSourceAndTarget; }; LEdge.prototype.getBendpoints = function () { return this.bendpoints; }; LEdge.prototype.getLca = function () { return this.lca; }; LEdge.prototype.getSourceInLca = function () { return this.sourceInLca; }; LEdge.prototype.getTargetInLca = function () { return this.targetInLca; }; LEdge.prototype.getOtherEnd = function (node) { if (this.source === node) { return this.target; } else if (this.target === node) { return this.source; } else { throw "Node is not incident with this edge"; } }; LEdge.prototype.getOtherEndInGraph = function (node, graph) { var otherEnd = this.getOtherEnd(node); var root = graph.getGraphManager().getRoot(); while (true) { if (otherEnd.getOwner() == graph) { return otherEnd; } if (otherEnd.getOwner() == root) { break; } otherEnd = otherEnd.getOwner().getParent(); } return null; }; LEdge.prototype.updateLength = function () { var clipPointCoordinates = new Array(4); this.isOverlapingSourceAndTarget = IGeometry.getIntersection(this.target.getRect(), this.source.getRect(), clipPointCoordinates); if (!this.isOverlapingSourceAndTarget) { this.lengthX = clipPointCoordinates[0] - clipPointCoordinates[2]; this.lengthY = clipPointCoordinates[1] - clipPointCoordinates[3]; if (Math.abs(this.lengthX) < 1.0) { this.lengthX = IMath.sign(this.lengthX); } if (Math.abs(this.lengthY) < 1.0) { this.lengthY = IMath.sign(this.lengthY); } this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY); } }; LEdge.prototype.updateLengthSimple = function () { this.lengthX = this.target.getCenterX() - this.source.getCenterX(); this.lengthY = this.target.getCenterY() - this.source.getCenterY(); if (Math.abs(this.lengthX) < 1.0) { this.lengthX = IMath.sign(this.lengthX); } if (Math.abs(this.lengthY) < 1.0) { this.lengthY = IMath.sign(this.lengthY); } this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY); }; module.exports = LEdge; /***/ }), /* 2 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; function LGraphObject(vGraphObject) { this.vGraphObject = vGraphObject; } module.exports = LGraphObject; /***/ }), /* 3 */ /***/ (function(module, exports, __nested_webpack_require_8167__) { "use strict"; var LGraphObject = __nested_webpack_require_8167__(2); var Integer = __nested_webpack_require_8167__(10); var RectangleD = __nested_webpack_require_8167__(13); var LayoutConstants = __nested_webpack_require_8167__(0); var RandomSeed = __nested_webpack_require_8167__(16); var PointD = __nested_webpack_require_8167__(5); function LNode(gm, loc, size, vNode) { //Alternative constructor 1 : LNode(LGraphManager gm, Point loc, Dimension size, Object vNode) if (size == null && vNode == null) { vNode = loc; } LGraphObject.call(this, vNode); //Alternative constructor 2 : LNode(Layout layout, Object vNode) if (gm.graphManager != null) gm = gm.graphManager; this.estimatedSize = Integer.MIN_VALUE; this.inclusionTreeDepth = Integer.MAX_VALUE; this.vGraphObject = vNode; this.edges = []; this.graphManager = gm; if (size != null && loc != null) this.rect = new RectangleD(loc.x, loc.y, size.width, size.height);else this.rect = new RectangleD(); } LNode.prototype = Object.create(LGraphObject.prototype); for (var prop in LGraphObject) { LNode[prop] = LGraphObject[prop]; } LNode.prototype.getEdges = function () { return this.edges; }; LNode.prototype.getChild = function () { return this.child; }; LNode.prototype.getOwner = function () { // if (this.owner != null) { // if (!(this.owner == null || this.owner.getNodes().indexOf(this) > -1)) { // throw "assert failed"; // } // } return this.owner; }; LNode.prototype.getWidth = function () { return this.rect.width; }; LNode.prototype.setWidth = function (width) { this.rect.width = width; }; LNode.prototype.getHeight = function () { return this.rect.height; }; LNode.prototype.setHeight = function (height) { this.rect.height = height; }; LNode.prototype.getCenterX = function () { return this.rect.x + this.rect.width / 2; }; LNode.prototype.getCenterY = function () { return this.rect.y + this.rect.height / 2; }; LNode.prototype.getCenter = function () { return new PointD(this.rect.x + this.rect.width / 2, this.rect.y + this.rect.height / 2); }; LNode.prototype.getLocation = function () { return new PointD(this.rect.x, this.rect.y); }; LNode.prototype.getRect = function () { return this.rect; }; LNode.prototype.getDiagonal = function () { return Math.sqrt(this.rect.width * this.rect.width + this.rect.height * this.rect.height); }; /** * This method returns half the diagonal length of this node. */ LNode.prototype.getHalfTheDiagonal = function () { return Math.sqrt(this.rect.height * this.rect.height + this.rect.width * this.rect.width) / 2; }; LNode.prototype.setRect = function (upperLeft, dimension) { this.rect.x = upperLeft.x; this.rect.y = upperLeft.y; this.rect.width = dimension.width; this.rect.height = dimension.height; }; LNode.prototype.setCenter = function (cx, cy) { this.rect.x = cx - this.rect.width / 2; this.rect.y = cy - this.rect.height / 2; }; LNode.prototype.setLocation = function (x, y) { this.rect.x = x; this.rect.y = y; }; LNode.prototype.moveBy = function (dx, dy) { this.rect.x += dx; this.rect.y += dy; }; LNode.prototype.getEdgeListToNode = function (to) { var edgeList = []; var edge; var self = this; self.edges.forEach(function (edge) { if (edge.target == to) { if (edge.source != self) throw "Incorrect edge source!"; edgeList.push(edge); } }); return edgeList; }; LNode.prototype.getEdgesBetween = function (other) { var edgeList = []; var edge; var self = this; self.edges.forEach(function (edge) { if (!(edge.source == self || edge.target == self)) throw "Incorrect edge source and/or target"; if (edge.target == other || edge.source == other) { edgeList.push(edge); } }); return edgeList; }; LNode.prototype.getNeighborsList = function () { var neighbors = new Set(); var self = this; self.edges.forEach(function (edge) { if (edge.source == self) { neighbors.add(edge.target); } else { if (edge.target != self) { throw "Incorrect incidency!"; } neighbors.add(edge.source); } }); return neighbors; }; LNode.prototype.withChildren = function () { var withNeighborsList = new Set(); var childNode; var children; withNeighborsList.add(this); if (this.child != null) { var nodes = this.child.getNodes(); for (var i = 0; i < nodes.length; i++) { childNode = nodes[i]; children = childNode.withChildren(); children.forEach(function (node) { withNeighborsList.add(node); }); } } return withNeighborsList; }; LNode.prototype.getNoOfChildren = function () { var noOfChildren = 0; var childNode; if (this.child == null) { noOfChildren = 1; } else { var nodes = this.child.getNodes(); for (var i = 0; i < nodes.length; i++) { childNode = nodes[i]; noOfChildren += childNode.getNoOfChildren(); } } if (noOfChildren == 0) { noOfChildren = 1; } return noOfChildren; }; LNode.prototype.getEstimatedSize = function () { if (this.estimatedSize == Integer.MIN_VALUE) { throw "assert failed"; } return this.estimatedSize; }; LNode.prototype.calcEstimatedSize = function () { if (this.child == null) { return this.estimatedSize = (this.rect.width + this.rect.height) / 2; } else { this.estimatedSize = this.child.calcEstimatedSize(); this.rect.width = this.estimatedSize; this.rect.height = this.estimatedSize; return this.estimatedSize; } }; LNode.prototype.scatter = function () { var randomCenterX; var randomCenterY; var minX = -LayoutConstants.INITIAL_WORLD_BOUNDARY; var maxX = LayoutConstants.INITIAL_WORLD_BOUNDARY; randomCenterX = LayoutConstants.WORLD_CENTER_X + RandomSeed.nextDouble() * (maxX - minX) + minX; var minY = -LayoutConstants.INITIAL_WORLD_BOUNDARY; var maxY = LayoutConstants.INITIAL_WORLD_BOUNDARY; randomCenterY = LayoutConstants.WORLD_CENTER_Y + RandomSeed.nextDouble() * (maxY - minY) + minY; this.rect.x = randomCenterX; this.rect.y = randomCenterY; }; LNode.prototype.updateBounds = function () { if (this.getChild() == null) { throw "assert failed"; } if (this.getChild().getNodes().length != 0) { // wrap the children nodes by re-arranging the boundaries var childGraph = this.getChild(); childGraph.updateBounds(true); this.rect.x = childGraph.getLeft(); this.rect.y = childGraph.getTop(); this.setWidth(childGraph.getRight() - childGraph.getLeft()); this.setHeight(childGraph.getBottom() - childGraph.getTop()); // Update compound bounds considering its label properties if (LayoutConstants.NODE_DIMENSIONS_INCLUDE_LABELS) { var width = childGraph.getRight() - childGraph.getLeft(); var height = childGraph.getBottom() - childGraph.getTop(); if (this.labelWidth) { if (this.labelPosHorizontal == "left") { this.rect.x -= this.labelWidth; this.setWidth(width + this.labelWidth); } else if (this.labelPosHorizontal == "center" && this.labelWidth > width) { this.rect.x -= (this.labelWidth - width) / 2; this.setWidth(this.labelWidth); } else if (this.labelPosHorizontal == "right") { this.setWidth(width + this.labelWidth); } } if (this.labelHeight) { if (this.labelPosVertical == "top") { this.rect.y -= this.labelHeight; this.setHeight(height + this.labelHeight); } else if (this.labelPosVertical == "center" && this.labelHeight > height) { this.rect.y -= (this.labelHeight - height) / 2; this.setHeight(this.labelHeight); } else if (this.labelPosVertical == "bottom") { this.setHeight(height + this.labelHeight); } } } } }; LNode.prototype.getInclusionTreeDepth = function () { if (this.inclusionTreeDepth == Integer.MAX_VALUE) { throw "assert failed"; } return this.inclusionTreeDepth; }; LNode.prototype.transform = function (trans) { var left = this.rect.x; if (left > LayoutConstants.WORLD_BOUNDARY) { left = LayoutConstants.WORLD_BOUNDARY; } else if (left < -LayoutConstants.WORLD_BOUNDARY) { left = -LayoutConstants.WORLD_BOUNDARY; } var top = this.rect.y; if (top > LayoutConstants.WORLD_BOUNDARY) { top = LayoutConstants.WORLD_BOUNDARY; } else if (top < -LayoutConstants.WORLD_BOUNDARY) { top = -LayoutConstants.WORLD_BOUNDARY; } var leftTop = new PointD(left, top); var vLeftTop = trans.inverseTransformPoint(leftTop); this.setLocation(vLeftTop.x, vLeftTop.y); }; LNode.prototype.getLeft = function () { return this.rect.x; }; LNode.prototype.getRight = function () { return this.rect.x + this.rect.width; }; LNode.prototype.getTop = function () { return this.rect.y; }; LNode.prototype.getBottom = function () { return this.rect.y + this.rect.height; }; LNode.prototype.getParent = function () { if (this.owner == null) { return null; } return this.owner.getParent(); }; module.exports = LNode; /***/ }), /* 4 */ /***/ (function(module, exports, __nested_webpack_require_17290__) { "use strict"; var LayoutConstants = __nested_webpack_require_17290__(0); function FDLayoutConstants() {} //FDLayoutConstants inherits static props in LayoutConstants for (var prop in LayoutConstants) { FDLayoutConstants[prop] = LayoutConstants[prop]; } FDLayoutConstants.MAX_ITERATIONS = 2500; FDLayoutConstants.DEFAULT_EDGE_LENGTH = 50; FDLayoutConstants.DEFAULT_SPRING_STRENGTH = 0.45; FDLayoutConstants.DEFAULT_REPULSION_STRENGTH = 4500.0; FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH = 0.4; FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH = 1.0; FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR = 3.8; FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = 1.5; FDLayoutConstants.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION = true; FDLayoutConstants.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION = true; FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL = 0.3; FDLayoutConstants.COOLING_ADAPTATION_FACTOR = 0.33; FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT = 1000; FDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT = 5000; FDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL = 100.0; FDLayoutConstants.MAX_NODE_DISPLACEMENT = FDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL * 3; FDLayoutConstants.MIN_REPULSION_DIST = FDLayoutConstants.DEFAULT_EDGE_LENGTH / 10.0; FDLayoutConstants.CONVERGENCE_CHECK_PERIOD = 100; FDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = 0.1; FDLayoutConstants.MIN_EDGE_LENGTH = 1; FDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD = 10; module.exports = FDLayoutConstants; /***/ }), /* 5 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; function PointD(x, y) { if (x == null && y == null) { this.x = 0; this.y = 0; } else { this.x = x; this.y = y; } } PointD.prototype.getX = function () { return this.x; }; PointD.prototype.getY = function () { return this.y; }; PointD.prototype.setX = function (x) { this.x = x; }; PointD.prototype.setY = function (y) { this.y = y; }; PointD.prototype.getDifference = function (pt) { return new DimensionD(this.x - pt.x, this.y - pt.y); }; PointD.prototype.getCopy = function () { return new PointD(this.x, this.y); }; PointD.prototype.translate = function (dim) { this.x += dim.width; this.y += dim.height; return this; }; module.exports = PointD; /***/ }), /* 6 */ /***/ (function(module, exports, __nested_webpack_require_19670__) { "use strict"; var LGraphObject = __nested_webpack_require_19670__(2); var Integer = __nested_webpack_require_19670__(10); var LayoutConstants = __nested_webpack_require_19670__(0); var LGraphManager = __nested_webpack_require_19670__(7); var LNode = __nested_webpack_require_19670__(3); var LEdge = __nested_webpack_require_19670__(1); var RectangleD = __nested_webpack_require_19670__(13); var Point = __nested_webpack_require_19670__(12); var LinkedList = __nested_webpack_require_19670__(11); function LGraph(parent, obj2, vGraph) { LGraphObject.call(this, vGraph); this.estimatedSize = Integer.MIN_VALUE; this.margin = LayoutConstants.DEFAULT_GRAPH_MARGIN; this.edges = []; this.nodes = []; this.isConnected = false; this.parent = parent; if (obj2 != null && obj2 instanceof LGraphManager) { this.graphManager = obj2; } else if (obj2 != null && obj2 instanceof Layout) { this.graphManager = obj2.graphManager; } } LGraph.prototype = Object.create(LGraphObject.prototype); for (var prop in LGraphObject) { LGraph[prop] = LGraphObject[prop]; } LGraph.prototype.getNodes = function () { return this.nodes; }; LGraph.prototype.getEdges = function () { return this.edges; }; LGraph.prototype.getGraphManager = function () { return this.graphManager; }; LGraph.prototype.getParent = function () { return this.parent; }; LGraph.prototype.getLeft = function () { return this.left; }; LGraph.prototype.getRight = function () { return this.right; }; LGraph.prototype.getTop = function () { return this.top; }; LGraph.prototype.getBottom = function () { return this.bottom; }; LGraph.prototype.isConnected = function () { return this.isConnected; }; LGraph.prototype.add = function (obj1, sourceNode, targetNode) { if (sourceNode == null && targetNode == null) { var newNode = obj1; if (this.graphManager == null) { throw "Graph has no graph mgr!"; } if (this.getNodes().indexOf(newNode) > -1) { throw "Node already in graph!"; } newNode.owner = this; this.getNodes().push(newNode); return newNode; } else { var newEdge = obj1; if (!(this.getNodes().indexOf(sourceNode) > -1 && this.getNodes().indexOf(targetNode) > -1)) { throw "Source or target not in graph!"; } if (!(sourceNode.owner == targetNode.owner && sourceNode.owner == this)) { throw "Both owners must be this graph!"; } if (sourceNode.owner != targetNode.owner) { return null; } // set source and target newEdge.source = sourceNode; newEdge.target = targetNode; // set as intra-graph edge newEdge.isInterGraph = false; // add to graph edge list this.getEdges().push(newEdge); // add to incidency lists sourceNode.edges.push(newEdge); if (targetNode != sourceNode) { targetNode.edges.push(newEdge); } return newEdge; } }; LGraph.prototype.remove = function (obj) { var node = obj; if (obj instanceof LNode) { if (node == null) { throw "Node is null!"; } if (!(node.owner != null && node.owner == this)) { throw "Owner graph is invalid!"; } if (this.graphManager == null) { throw "Owner graph manager is invalid!"; } // remove incident edges first (make a copy to do it safely) var edgesToBeRemoved = node.edges.slice(); var edge; var s = edgesToBeRemoved.length; for (var i = 0; i < s; i++) { edge = edgesToBeRemoved[i]; if (edge.isInterGraph) { this.graphManager.remove(edge); } else { edge.source.owner.remove(edge); } } // now the node itself var index = this.nodes.indexOf(node); if (index == -1) { throw "Node not in owner node list!"; } this.nodes.splice(index, 1); } else if (obj instanceof LEdge) { var edge = obj; if (edge == null) { throw "Edge is null!"; } if (!(edge.source != null && edge.target != null)) { throw "Source and/or target is null!"; } if (!(edge.source.owner != null && edge.target.owner != null && edge.source.owner == this && edge.target.owner == this)) { throw "Source and/or target owner is invalid!"; } var sourceIndex = edge.source.edges.indexOf(edge); var targetIndex = edge.target.edges.indexOf(edge); if (!(sourceIndex > -1 && targetIndex > -1)) { throw "Source and/or target doesn't know this edge!"; } edge.source.edges.splice(sourceIndex, 1); if (edge.target != edge.source) { edge.target.edges.splice(targetIndex, 1); } var index = edge.source.owner.getEdges().indexOf(edge); if (index == -1) { throw "Not in owner's edge list!"; } edge.source.owner.getEdges().splice(index, 1); } }; LGraph.prototype.updateLeftTop = function () { var top = Integer.MAX_VALUE; var left = Integer.MAX_VALUE; var nodeTop; var nodeLeft; var margin; var nodes = this.getNodes(); var s = nodes.length; for (var i = 0; i < s; i++) { var lNode = nodes[i]; nodeTop = lNode.getTop(); nodeLeft = lNode.getLeft(); if (top > nodeTop) { top = nodeTop; } if (left > nodeLeft) { left = nodeLeft; } } // Do we have any nodes in this graph? if (top == Integer.MAX_VALUE) { return null; } if (nodes[0].getParent().paddingLeft != undefined) { margin = nodes[0].getParent().paddingLeft; } else { margin = this.margin; } this.left = left - margin; this.top = top - margin; // Apply the margins and return the result return new Point(this.left, this.top); }; LGraph.prototype.updateBounds = function (recursive) { // calculate bounds var left = Integer.MAX_VALUE; var right = -Integer.MAX_VALUE; var top = Integer.MAX_VALUE; var bottom = -Integer.MAX_VALUE; var nodeLeft; var nodeRight; var nodeTop; var nodeBottom; var margin; var nodes = this.nodes; var s = nodes.length; for (var i = 0; i < s; i++) { var lNode = nodes[i]; if (recursive && lNode.child != null) { lNode.updateBounds(); } nodeLeft = lNode.getLeft(); nodeRight = lNode.getRight(); nodeTop = lNode.getTop(); nodeBottom = lNode.getBottom(); if (left > nodeLeft) { left = nodeLeft; } if (right < nodeRight) { right = nodeRight; } if (top > nodeTop) { top = nodeTop; } if (bottom < nodeBottom) { bottom = nodeBottom; } } var boundingRect = new RectangleD(left, top, right - left, bottom - top); if (left == Integer.MAX_VALUE) { this.left = this.parent.getLeft(); this.right = this.parent.getRight(); this.top = this.parent.getTop(); this.bottom = this.parent.getBottom(); } if (nodes[0].getParent().paddingLeft != undefined) { margin = nodes[0].getParent().paddingLeft; } else { margin = this.margin; } this.left = boundingRect.x - margin; this.right = boundingRect.x + boundingRect.width + margin; this.top = boundingRect.y - margin; this.bottom = boundingRect.y + boundingRect.height + margin; }; LGraph.calculateBounds = function (nodes) { var left = Integer.MAX_VALUE; var right = -Integer.MAX_VALUE; var top = Integer.MAX_VALUE; var bottom = -Integer.MAX_VALUE; var nodeLeft; var nodeRight; var nodeTop; var nodeBottom; var s = nodes.length; for (var i = 0; i < s; i++) { var lNode = nodes[i]; nodeLeft = lNode.getLeft(); nodeRight = lNode.getRight(); nodeTop = lNode.getTop(); nodeBottom = lNode.getBottom(); if (left > nodeLeft) { left = nodeLeft; } if (right < nodeRight) { right = nodeRight; } if (top > nodeTop) { top = nodeTop; } if (bottom < nodeBottom) { bottom = nodeBottom; } } var boundingRect = new RectangleD(left, top, right - left, bottom - top); return boundingRect; }; LGraph.prototype.getInclusionTreeDepth = function () { if (this == this.graphManager.getRoot()) { return 1; } else { return this.parent.getInclusionTreeDepth(); } }; LGraph.prototype.getEstimatedSize = function () { if (this.estimatedSize == Integer.MIN_VALUE) { throw "assert failed"; } return this.estimatedSize; }; LGraph.prototype.calcEstimatedSize = function () { var size = 0; var nodes = this.nodes; var s = nodes.length; for (var i = 0; i < s; i++) { var lNode = nodes[i]; size += lNode.calcEstimatedSize(); } if (size == 0) { this.estimatedSize = LayoutConstants.EMPTY_COMPOUND_NODE_SIZE; } else { this.estimatedSize = size / Math.sqrt(this.nodes.length); } return this.estimatedSize; }; LGraph.prototype.updateConnected = function () { var self = this; if (this.nodes.length == 0) { this.isConnected = true; return; } var queue = new LinkedList(); var visited = new Set(); var currentNode = this.nodes[0]; var neighborEdges; var currentNeighbor; var childrenOfNode = currentNode.withChildren(); childrenOfNode.forEach(function (node) { queue.push(node); visited.add(node); }); while (queue.length !== 0) { currentNode = queue.shift(); // Traverse all neighbors of this node neighborEdges = currentNode.getEdges(); var size = neighborEdges.length; for (var i = 0; i < size; i++) { var neighborEdge = neighborEdges[i]; currentNeighbor = neighborEdge.getOtherEndInGraph(currentNode, this); // Add unvisited neighbors to the list to visit if (currentNeighbor != null && !visited.has(currentNeighbor)) { var childrenOfNeighbor = currentNeighbor.withChildren(); childrenOfNeighbor.forEach(function (node) { queue.push(node); visited.add(node); }); } } } this.isConnected = false; if (visited.size >= this.nodes.length) { var noOfVisitedInThisGraph = 0; visited.forEach(function (visitedNode) { if (visitedNode.owner == self) { noOfVisitedInThisGraph++; } }); if (noOfVisitedInThisGraph == this.nodes.length) { this.isConnected = true; } } }; module.exports = LGraph; /***/ }), /* 7 */ /***/ (function(module, exports, __nested_webpack_require_29738__) { "use strict"; var LGraph; var LEdge = __nested_webpack_require_29738__(1); function LGraphManager(layout) { LGraph = __nested_webpack_require_29738__(6); // It may be better to initilize this out of this function but it gives an error (Right-hand side of 'instanceof' is not callable) now. this.layout = layout; this.graphs = []; this.edges = []; } LGraphManager.prototype.addRoot = function () { var ngraph = this.layout.newGraph(); var nnode = this.layout.newNode(null); var root = this.add(ngraph, nnode); this.setRootGraph(root); return this.rootGraph; }; LGraphManager.prototype.add = function (newGraph, parentNode, newEdge, sourceNode, targetNode) { //there are just 2 parameters are passed then it adds an LGraph else it adds an LEdge if (newEdge == null && sourceNode == null && targetNode == null) { if (newGraph == null) { throw "Graph is null!"; } if (parentNode == null) { throw "Parent node is null!"; } if (this.graphs.indexOf(newGraph) > -1) { throw "Graph already in this graph mgr!"; } this.graphs.push(newGraph); if (newGraph.parent != null) { throw "Already has a parent!"; } if (parentNode.child != null) { throw "Already has a child!"; } newGraph.parent = parentNode; parentNode.child = newGraph; return newGraph; } else { //change the order of the parameters targetNode = newEdge; sourceNode = parentNode; newEdge = newGraph; var sourceGraph = sourceNode.getOwner(); var targetGraph = targetNode.getOwner(); if (!(sourceGraph != null && sourceGraph.getGraphManager() == this)) { throw "Source not in this graph mgr!"; } if (!(targetGraph != null && targetGraph.getGraphManager() == this)) { throw "Target not in this graph mgr!"; } if (sourceGraph == targetGraph) { newEdge.isInterGraph = false; return sourceGraph.add(newEdge, sourceNode, targetNode); } else { newEdge.isInterGraph = true; // set source and target newEdge.source = sourceNode; newEdge.target = targetNode; // add edge to inter-graph edge list if (this.edges.indexOf(newEdge) > -1) { throw "Edge already in inter-graph edge list!"; } this.edges.push(newEdge); // add edge to source and target incidency lists if (!(newEdge.source != null && newEdge.target != null)) { throw "Edge source and/or target is null!"; } if (!(newEdge.source.edges.indexOf(newEdge) == -1 && newEdge.target.edges.indexOf(newEdge) == -1)) { throw "Edge already in source and/or target incidency list!"; } newEdge.source.edges.push(newEdge); newEdge.target.edges.push(newEdge); return newEdge; } } }; LGraphManager.prototype.remove = function (lObj) { if (lObj instanceof LGraph) { var graph = lObj; if (graph.getGraphManager() != this) { throw "Graph not in this graph mgr"; } if (!(graph == this.rootGraph || graph.parent != null && graph.parent.graphManager == this)) { throw "Invalid parent node!"; } // first the edges (make a copy to do it safely) var edgesToBeRemoved = []; edgesToBeRemoved = edgesToBeRemoved.concat(graph.getEdges()); var edge; var s = edgesToBeRemoved.length; for (var i = 0; i < s; i++) { edge = edgesToBeRemoved[i]; graph.remove(edge); } // then the nodes (make a copy to do it safely) var nodesToBeRemoved = []; nodesToBeRemoved = nodesToBeRemoved.concat(graph.getNodes()); var node; s = nodesToBeRemoved.length; for (var i = 0; i < s; i++) { node = nodesToBeRemoved[i]; graph.remove(node); } // check if graph is the root if (graph == this.rootGraph) { this.setRootGraph(null); } // now remove the graph itself var index = this.graphs.indexOf(graph); this.graphs.splice(index, 1); // also reset the parent of the graph graph.parent = null; } else if (lObj instanceof LEdge) { edge = lObj; if (edge == null) { throw "Edge is null!"; } if (!edge.isInterGraph) { throw "Not an inter-graph edge!"; } if (!(edge.source != null && edge.target != null)) { throw "Source and/or target is null!"; } // remove edge from source and target nodes' incidency lists if (!(edge.source.edges.indexOf(edge) != -1 && edge.target.edges.indexOf(edge) != -1)) { throw "Source and/or target doesn't know this edge!"; } var index = edge.source.edges.indexOf(edge); edge.source.edges.splice(index, 1); index = edge.target.edges.indexOf(edge); edge.target.edges.splice(index, 1); // remove edge from owner graph manager's inter-graph edge list if (!(edge.source.owner != null && edge.source.owner.getGraphManager() != null)) { throw "Edge owner graph or owner graph manager is null!"; } if (edge.source.owner.getGraphManager().edges.indexOf(edge) == -1) { throw "Not in owner graph manager's edge list!"; } var index = edge.source.owner.getGraphManager().edges.indexOf(edge); edge.source.owner.getGraphManager().edges.splice(index, 1); } }; LGraphManager.prototype.updateBounds = function () { this.rootGraph.updateBounds(true); }; LGraphManager.prototype.getGraphs = function () { return this.graphs; }; LGraphManager.prototype.getAllNodes = function () { if (this.allNodes == null) { var nodeList = []; var graphs = this.getGraphs(); var s = graphs.length; for (var i = 0; i < s; i++) { nodeList = nodeList.concat(graphs[i].getNodes()); } this.allNodes = nodeList; } return this.allNodes; }; LGraphManager.prototype.resetAllNodes = function () { this.allNodes = null; }; LGraphManager.prototype.resetAllEdges = function () { this.allEdges = null; }; LGraphManager.prototype.resetAllNodesToApplyGravitation = function () { this.allNodesToApplyGravitation = null; }; LGraphManager.prototype.getAllEdges = function () { if (this.allEdges == null) { var edgeList = []; var graphs = this.getGraphs(); var s = graphs.length; for (var i = 0; i < graphs.length; i++) { edgeList = edgeList.concat(graphs[i].getEdges()); } edgeList = edgeList.concat(this.edges); this.allEdges = edgeList; } return this.allEdges; }; LGraphManager.prototype.getAllNodesToApplyGravitation = function () { return this.allNodesToApplyGravitation; }; LGraphManager.prototype.setAllNodesToApplyGravitation = function (nodeList) { if (this.allNodesToApplyGravitation != null) { throw "assert failed"; } this.allNodesToApplyGravitation = nodeList; }; LGraphManager.prototype.getRoot = function () { return this.rootGraph; }; LGraphManager.prototype.setRootGraph = function (graph) { if (graph.getGraphManager() != this) { throw "Root not in this graph mgr!"; } this.rootGraph = graph; // root graph must have a root node associated with it for convenience if (graph.parent == null) { graph.parent = this.layout.newNode("Root node"); } }; LGraphManager.prototype.getLayout = function () { return this.layout; }; LGraphManager.prototype.isOneAncestorOfOther = function (firstNode, secondNode) { if (!(firstNode != null && secondNode != null)) { throw "assert failed"; } if (firstNode == secondNode) { return true; } // Is second node an ancestor of the first one? var ownerGraph = firstNode.getOwner(); var parentNode; do { parentNode = ownerGraph.getParent(); if (parentNode == null) { break; } if (parentNode == secondNode) { return true; } ownerGraph = parentNode.getOwner(); if (ownerGraph == null) { break; } } while (true); // Is first node an ancestor of the second one? ownerGraph = secondNode.getOwner(); do { parentNode = ownerGraph.getParent(); if (parentNode == null) { break; } if (parentNode == firstNode) { return true; } ownerGraph = parentNode.getOwner(); if (ownerGraph == null) { break; } } while (true); return false; }; LGraphManager.prototype.calcLowestCommonAncestors = function () { var edge; var sourceNode; var targetNode; var sourceAncestorGraph; var targetAncestorGraph; var edges = this.getAllEdges(); var s = edges.length; for (var i = 0; i < s; i++) { edge = edges[i]; sourceNode = edge.source; targetNode = edge.target; edge.lca = null; edge.sourceInLca = sourceNode; edge.targetInLca = targetNode; if (sourceNode == targetNode) { edge.lca = sourceNode.getOwner(); continue; } sourceAncestorGraph = sourceNode.getOwner(); while (edge.lca == null) { edge.targetInLca = targetNode; targetAncestorGraph = targetNode.getOwner(); while (edge.lca == null) { if (targetAncestorGraph == sourceAncestorGraph) { edge.lca = targetAncestorGraph; break; } if (targetAncestorGraph == this.rootGraph) { break; } if (edge.lca != null) { throw "assert failed"; } edge.targetInLca = targetAncestorGraph.getParent(); targetAncestorGraph = edge.targetInLca.getOwner(); } if (sourceAncestorGraph == this.rootGraph) { break; } if (edge.lca == null) { edge.sourceInLca = sourceAncestorGraph.getParent(); sourceAncestorGraph = edge.sourceInLca.getOwner(); } } if (edge.lca == null) { throw "assert failed"; } } }; LGraphManager.prototype.calcLowestCommonAncestor = function (firstNode, secondNode) { if (firstNode == secondNode) { return firstNode.getOwner(); } var firstOwnerGraph = firstNode.getOwner(); do { if (firstOwnerGraph == null) { break; } var secondOwnerGraph = secondNode.getOwner(); do { if (secondOwnerGraph == null) { break; } if (secondOwnerGraph == firstOwnerGraph) { return secondOwnerGraph; } secondOwnerGraph = secondOwnerGraph.getParent().getOwner(); } while (true); firstOwnerGraph = firstOwnerGraph.getParent().getOwner(); } while (true); return firstOwnerGraph; }; LGraphManager.prototype.calcInclusionTreeDepths = function (graph, depth) { if (graph == null && depth == null) { graph = this.rootGraph; depth = 1; } var node; var nodes = graph.getNodes(); var s = nodes.length; for (var i = 0; i < s; i++) { node = nodes[i]; node.inclusionTreeDepth = depth; if (node.child != null) { this.calcInclusionTreeDepths(node.child, depth + 1); } } }; LGraphManager.prototype.includesInvalidEdge = function () { var edge; var edgesToRemove = []; var s = this.edges.length; for (var i = 0; i < s; i++) { edge = this.edges[i]; if (this.isOneAncestorOfOther(edge.source, edge.target)) { edgesToRemove.push(edge); } } // Remove invalid edges from graph manager for (var i = 0; i < edgesToRemove.length; i++) { this.remove(edgesToRemove[i]); } // Invalid edges are cleared, so return false return false; }; module.exports = LGraphManager; /***/ }), /* 8 */ /***/ (function(module, exports, __nested_webpack_require_41052__) { "use strict"; /** * This class maintains a list of static geometry related utility methods. * * * Copyright: i-Vis Research Group, Bilkent University, 2007 - present */ var Point = __nested_webpack_require_41052__(12); function IGeometry() {} /** * This method calculates *half* the amount in x and y directions of the two * input rectangles needed to separate them keeping their respective * positioning, and returns the result in the input array. An input * separation buffer added to the amount in both directions. We assume that * the two rectangles do intersect. */ IGeometry.calcSeparationAmount = function (rectA, rectB, overlapAmount, separationBuffer) { if (!rectA.intersects(rectB)) { throw "assert failed"; } var directions = new Array(2); this.decideDirectionsForOverlappingNodes(rectA, rectB, directions); overlapAmount[0] = Math.min(rectA.getRight(), rectB.getRight()) - Math.max(rectA.x, rectB.x); overlapAmount[1] = Math.min(rectA.getBottom(), rectB.getBottom()) - Math.max(rectA.y, rectB.y); // update the overlapping amounts for the following cases: if (rectA.getX() <= rectB.getX() && rectA.getRight() >= rectB.getRight()) { /* Case x.1: * * rectA * | | * | _________ | * | | | | * |________|_______|______| * | | * | | * rectB */ overlapAmount[0] += Math.min(rectB.getX() - rectA.getX(), rectA.getRight() - rectB.getRight()); } else if (rectB.getX() <= rectA.getX() && rectB.getRight() >= rectA.getRight()) { /* Case x.2: * * rectB * | | * | _________ | * | | | | * |________|_______|______| * | | * | | * rectA */ overlapAmount[0] += Math.min(rectA.getX() - rectB.getX(), rectB.getRight() - rectA.getRight()); } if (rectA.getY() <= rectB.getY() && rectA.getBottom() >= rectB.getBottom()) { /* Case y.1: * ________ rectA * | * | * ______|____ rectB * | | * | | * ______|____| * | * | * |________ * */ overlapAmount[1] += Math.min(rectB.getY() - rectA.getY(), rectA.getBottom() - rectB.getBottom()); } else if (rectB.getY() <= rectA.getY() && rectB.getBottom() >= rectA.getBottom()) { /* Case y.2: * ________ rectB * | * | * ______|____ rectA * | | * | | * ______|____| * | * | * |________ * */ overlapAmount[1] += Math.min(rectA.getY() - rectB.getY(), rectB.getBottom() - rectA.getBottom()); } // find slope of the line passes two centers var slope = Math.abs((rectB.getCenterY() - rectA.getCenterY()) / (rectB.getCenterX() - rectA.getCenterX())); // if centers are overlapped if (rectB.getCenterY() === rectA.getCenterY() && rectB.getCenterX() === rectA.getCenterX()) { // assume the slope is 1 (45 degree) slope = 1.0; } var moveByY = slope * overlapAmount[0]; var moveByX = overlapAmount[1] / slope; if (overlapAmount[0] < moveByX) { moveByX = overlapAmount[0]; } else { moveByY = overlapAmount[1]; } // return half the amount so that if each rectangle is moved by these // amounts in opposite directions, overlap will be resolved overlapAmount[0] = -1 * directions[0] * (moveByX / 2 + separationBuffer); overlapAmount[1] = -1 * directions[1] * (moveByY / 2 + separationBuffer); }; /** * This method decides the separation direction of overlapping nodes * * if directions[0] = -1, then rectA goes left * if directions[0] = 1, then rectA goes right * if directions[1] = -1, then rectA goes up * if directions[1] = 1, then rectA goes down */ IGeometry.decideDirectionsForOverlappingNodes = function (rectA, rectB, directions) { if (rectA.getCenterX() < rectB.getCenterX()) { directions[0] = -1; } else { directions[0] = 1; } if (rectA.getCenterY() < rectB.getCenterY()) { directions[1] = -1; } else { directions[1] = 1; } }; /** * This method calculates the intersection (clipping) points of the two * input rectangles with line segment defined by the centers of these two * rectangles. The clipping points are saved in the input double array and * whether or not the two rectangles overlap is returned. */ IGeometry.getIntersection2 = function (rectA, rectB, result) { //result[0-1] will contain clipPoint of rectA, result[2-3] will contain clipPoint of rectB var p1x = rectA.getCenterX(); var p1y = rectA.getCenterY(); var p2x = rectB.getCenterX(); var p2y = rectB.getCenterY(); //if two rectangles intersect, then clipping points are centers if (rectA.intersects(rectB)) { result[0] = p1x; result[1] = p1y; result[2] = p2x; result[3] = p2y; return true; } //variables for rectA var topLeftAx = rectA.getX(); var topLeftAy = rectA.getY(); var topRightAx = rectA.getRight(); var bottomLeftAx = rectA.getX(); var bottomLeftAy = rectA.getBottom(); var bottomRightAx = rectA.getRight(); var halfWidthA = rectA.getWidthHalf(); var halfHeightA = rectA.getHeightHalf(); //variables for rectB var topLeftBx = rectB.getX(); var topLeftBy = rectB.getY(); var topRightBx = rectB.getRight(); var bottomLeftBx = rectB.getX(); var bottomLeftBy = rectB.getBottom(); var bottomRightBx = rectB.getRight(); var halfWidthB = rectB.getWidthHalf(); var halfHeightB = rectB.getHeightHalf(); //flag whether clipping points are found var clipPointAFound = false; var clipPointBFound = false; // line is vertical if (p1x === p2x) { if (p1y > p2y) { result[0] = p1x; result[1] = topLeftAy; result[2] = p2x; result[3] = bottomLeftBy; return false; } else if (p1y < p2y) { result[0] = p1x; result[1] = bottomLeftAy; result[2] = p2x; result[3] = topLeftBy; return false; } else { //not line, return null; } } // line is horizontal else if (p1y === p2y) { if (p1x > p2x) { result[0] = topLeftAx; result[1] = p1y; result[2] = topRightBx; result[3] = p2y; return false; } else if (p1x < p2x) { result[0] = topRightAx; result[1] = p1y; result[2] = topLeftBx; result[3] = p2y; return false; } else { //not valid line, return null; } } else { //slopes of rectA's and rectB's diagonals var slopeA = rectA.height / rectA.width; var slopeB = rectB.height / rectB.width; //slope of line between center of rectA and center of rectB var slopePrime = (p2y - p1y) / (p2x - p1x); var cardinalDirectionA = void 0; var cardinalDirectionB = void 0; var tempPointAx = void 0; var tempPointAy = void 0; var tempPointBx = void 0; var tempPointBy = void 0; //determine whether clipping point is the corner of nodeA if (-slopeA === slopePrime) { if (p1x > p2x) { result[0] = bottomLeftAx; result[1] = bottomLeftAy; clipPointAFound = true; } else { result[0] = topRightAx; result[1] = topLeftAy; clipPointAFound = true; } } else if (slopeA === slopePrime) { if (p1x > p2x) { result[0] = topLeftAx; result[1] = topLeftAy; clipPointAFound = true; } else { result[0] = bottomRightAx; result[1] = bottomLeftAy; clipPointAFound = true; } } //determine whether clipping point is the corner of nodeB if (-slopeB === slopePrime) { if (p2x > p1x) { result[2] = bottomLeftBx; result[3] = bottomLeftBy; clipPointBFound = true; } else { result[2] = topRightBx; result[3] = topLeftBy; clipPointBFound = true; } } else if (slopeB === slopePrime) { if (p2x > p1x) { result[2] = topLeftBx; result[3] = topLeftBy; clipPointBFound = true; } else { result[2] = bottomRightBx; result[3] = bottomLeftBy; clipPointBFound = true; } } //if both clipping points are corners if (clipPointAFound && clipPointBFound) { return false; } //determine Cardinal Direction of rectangles if (p1x > p2x) { if (p1y > p2y) { cardinalDirectionA = this.getCardinalDirection(slopeA, slopePrime, 4); cardinalDirectionB = this.getCardinalDirection(slopeB, slopePrime, 2); } else { cardinalDirectionA = this.getCardinalDirection(-slopeA, slopePrime, 3); cardinalDirectionB = this.getCardinalDirection(-slopeB, slopePrime, 1); } } else { if (p1y > p2y) { cardinalDirectionA = this.getCardinalDirection(-slopeA, slopePrime, 1); cardinalDirectionB = this.getCardinalDirection(-slopeB, slopePrime, 3); } else { cardinalDirectionA = this.getCardinalDirection(slopeA, slopePrime, 2); cardinalDirectionB = this.getCardinalDirection(slopeB, slopePrime, 4); } } //calculate clipping Point if it is not found before if (!clipPointAFound) { switch (cardinalDirectionA) { case 1: tempPointAy = topLeftAy; tempPointAx = p1x + -halfHeightA / slopePrime; result[0] = tempPointAx; result[1] = tempPointAy; break; case 2: tempPointAx = bottomRightAx; tempPointAy = p1y + halfWidthA * slopePrime; result[0] = tempPointAx; result[1] = tempPointAy; break; case 3: tempPointAy = bottomLeftAy; tempPointAx = p1x + halfHeightA / slopePrime; result[0] = tempPointAx; result[1] = tempPointAy; break; case 4: tempPointAx = bottomLeftAx; tempPointAy = p1y + -halfWidthA * slopePrime; result[0] = tempPointAx; result[1] = tempPointAy; break; } } if (!clipPointBFound) { switch (cardinalDirectionB) { case 1: tempPointBy = topLeftBy; tempPointBx = p2x + -halfHeightB / slopePrime; result[2] = tempPointBx; result[3] = tempPointBy; break; case 2: tempPointBx = bottomRightBx; tempPointBy = p2y + halfWidthB * slopePrime; result[2] = tempPointBx; result[3] = tempPointBy; break; case 3: tempPointBy = bottomLeftBy; tempPointBx = p2x + halfHeightB / slopePrime; result[2] = tempPointBx; result[3] = tempPointBy; break; case 4: tempPointBx = bottomLeftBx; tempPointBy = p2y + -halfWidthB * slopePrime; result[2] = tempPointBx; result[3] = tempPointBy; break; } } } return false; }; /** * This method returns in which cardinal direction does input point stays * 1: North * 2: East * 3: South * 4: West */ IGeometry.getCardinalDirection = function (slope, slopePrime, line) { if (slope > slopePrime) { return line; } else { return 1 + line % 4; } }; /** * This method calculates the intersection of the two lines defined by * point pairs (s1,s2) and (f1,f2). */ IGeometry.getIntersection = function (s1, s2, f1, f2) { if (f2 == null) { return this.getIntersection2(s1, s2, f1); } var x1 = s1.x; var y1 = s1.y; var x2 = s2.x; var y2 = s2.y; var x3 = f1.x; var y3 = f1.y; var x4 = f2.x; var y4 = f2.y; var x = void 0, y = void 0; // intersection point var a1 = void 0, a2 = void 0, b1 = void 0, b2 = void 0, c1 = void 0, c2 = void 0; // coefficients of line eqns. var denom = void 0; a1 = y2 - y1; b1 = x1 - x2; c1 = x2 * y1 - x1 * y2; // { a1*x + b1*y + c1 = 0 is line 1 } a2 = y4 - y3; b2 = x3 - x4; c2 = x4 * y3 - x3 * y4; // { a2*x + b2*y + c2 = 0 is line 2 } denom = a1 * b2 - a2 * b1; if (denom === 0) { return null; } x = (b1 * c2 - b2 * c1) / denom; y = (a2 * c1 - a1 * c2) / denom; return new Point(x, y); }; /** * This method finds and returns the angle of the vector from the + x-axis * in clockwise direction (compatible w/ Java coordinate system!). */ IGeometry.angleOfVector = function (Cx, Cy, Nx, Ny) { var C_angle = void 0; if (Cx !== Nx) { C_angle = Math.atan((Ny - Cy) / (Nx - Cx)); if (Nx < Cx) { C_angle += Math.PI; } else if (Ny < Cy) { C_angle += this.TWO_PI; } } else if (Ny < Cy) { C_angle = this.ONE_AND_HALF_PI; // 270 degrees } else { C_angle = this.HALF_PI; // 90 degrees } return C_angle; }; /** * This method checks whether the given two line segments (one with point * p1 and p2, the other with point p3 and p4) intersect at a point other * than these points. */ IGeometry.doIntersect = function (p1, p2, p3, p4) { var a = p1.x; var b = p1.y; var c = p2.x; var d = p2.y; var p = p3.x; var q = p3.y; var r = p4.x; var s = p4.y; var det = (c - a) * (s - q) - (r - p) * (d - b); if (det === 0) { return false; } else { var lambda = ((s - q) * (r - a) + (p - r) * (s - b)) / det; var gamma = ((b - d) * (r - a) + (c - a) * (s - b)) / det; return 0 < lambda && lambda < 1 && 0 < gamma && gamma < 1; } }; /** * This method checks and calculates the intersection of * a line segment and a circle. */ IGeometry.findCircleLineIntersections = function (Ex, Ey, Lx, Ly, Cx, Cy, r) { // E is the starting point of the ray, // L is the end point of the ray, // C is the center of sphere you're testing against // r is the radius of that sphere // Compute: // d = L - E ( Direction vector of ray, from start to end ) // f = E - C ( Vector from center sphere to ray start ) // Then the intersection is found by.. // P = E + t * d // This is a parametric equation: // Px = Ex + tdx // Py = Ey + tdy // get a, b, c values var a = (Lx - Ex) * (Lx - Ex) + (Ly - Ey) * (Ly - Ey); var b = 2 * ((Ex - Cx) * (Lx - Ex) + (Ey - Cy) * (Ly - Ey)); var c = (Ex - Cx) * (Ex - Cx) + (Ey - Cy) * (Ey - Cy) - r * r; // get discriminant var disc = b * b - 4 * a * c; if (disc >= 0) { // insert into quadratic formula var t1 = (-b + Math.sqrt(b * b - 4 * a * c)) / (2 * a); var t2 = (-b - Math.sqrt(b * b - 4 * a * c)) / (2 * a); var intersections = null; if (t1 >= 0 && t1 <= 1) { // t1 is the intersection, and it's closer than t2 // (since t1 uses -b - discriminant) // Impale, Poke return [t1]; } // here t1 didn't intersect so we are either started // inside the sphere or completely past it if (t2 >= 0 && t2 <= 1) { // ExitWound return [t2]; } return intersections; } else return null; }; // ----------------------------------------------------------------------------- // Section: Class Constants // ----------------------------------------------------------------------------- /** * Some useful pre-calculated constants */ IGeometry.HALF_PI = 0.5 * Math.PI; IGeometry.ONE_AND_HALF_PI = 1.5 * Math.PI; IGeometry.TWO_PI = 2.0 * Math.PI; IGeometry.THREE_PI = 3.0 * Math.PI; module.exports = IGeometry; /***/ }), /* 9 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; function IMath() {} /** * This method returns the sign of the input value. */ IMath.sign = function (value) { if (value > 0) { return 1; } else if (value < 0) { return -1; } else { return 0; } }; IMath.floor = function (value) { return value < 0 ? Math.ceil(value) : Math.floor(value); }; IMath.ceil = function (value) { return value < 0 ? Math.floor(value) : Math.ceil(value); }; module.exports = IMath; /***/ }), /* 10 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; function Integer() {} Integer.MAX_VALUE = 2147483647; Integer.MIN_VALUE = -2147483648; module.exports = Integer; /***/ }), /* 11 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var nodeFrom = function nodeFrom(value) { return { value: value, next: null, prev: null }; }; var add = function add(prev, node, next, list) { if (prev !== null) { prev.next = node; } else { list.head = node; } if (next !== null) { next.prev = node; } else { list.tail = node; } node.prev = prev; node.next = next; list.length++; return node; }; var _remove = function _remove(node, list) { var prev = node.prev, next = node.next; if (prev !== null) { prev.next = next; } else { list.head = next; } if (next !== null) { next.prev = prev; } else { list.tail = prev; } node.prev = node.next = null; list.length--; return node; }; var LinkedList = function () { function LinkedList(vals) { var _this = this; _classCallCheck(this, LinkedList); this.length = 0; this.head = null; this.tail = null; if (vals != null) { vals.forEach(function (v) { return _this.push(v); }); } } _createClass(LinkedList, [{ key: "size", value: function size() { return this.length; } }, { key: "insertBefore", value: function insertBefore(val, otherNode) { return add(otherNode.prev, nodeFrom(val), otherNode, this); } }, { key: "insertAfter", value: function insertAfter(val, otherNode) { return add(otherNode, nodeFrom(val), otherNode.next, this); } }, { key: "insertNodeBefore", value: function insertNodeBefore(newNode, otherNode) { return add(otherNode.prev, newNode, otherNode, this); } }, { key: "insertNodeAfter", value: function insertNodeAfter(newNode, otherNode) { return add(otherNode, newNode, otherNode.next, this); } }, { key: "push", value: function push(val) { return add(this.tail, nodeFrom(val), null, this); } }, { key: "unshift", value: function unshift(val) { return add(null, nodeFrom(val), this.head, this); } }, { key: "remove", value: function remove(node) { return _remove(node, this); } }, { key: "pop", value: function pop() { return _remove(this.tail, this).value; } }, { key: "popNode", value: function popNode() { return _remove(this.tail, this); } }, { key: "shift", value: function shift() { return _remove(this.head, this).value; } }, { key: "shiftNode", value: function shiftNode() { return _remove(this.head, this); } }, { key: "get_object_at", value: function get_object_at(index) { if (index <= this.length()) { var i = 1; var current = this.head; while (i < index) { current = current.next; i++; } return current.value; } } }, { key: "set_object_at", value: function set_object_at(index, value) { if (index <= this.length()) { var i = 1; var current = this.head; while (i < index) { current = current.next; i++; } current.value = value; } } }]); return LinkedList; }(); module.exports = LinkedList; /***/ }), /* 12 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* *This class is the javascript implementation of the Point.java class in jdk */ function Point(x, y, p) { this.x = null; this.y = null; if (x == null && y == null && p == null) { this.x = 0; this.y = 0; } else if (typeof x == 'number' && typeof y == 'number' && p == null) { this.x = x; this.y = y; } else if (x.constructor.name == 'Point' && y == null && p == null) { p = x; this.x = p.x; this.y = p.y; } } Point.prototype.getX = function () { return this.x; }; Point.prototype.getY = function () { return this.y; }; Point.prototype.getLocation = function () { return new Point(this.x, this.y); }; Point.prototype.setLocation = function (x, y, p) { if (x.constructor.name == 'Point' && y == null && p == null) { p = x; this.setLocation(p.x, p.y); } else if (typeof x == 'number' && typeof y == 'number' && p == null) { //if both parameters are integer just move (x,y) location if (parseInt(x) == x && parseInt(y) == y) { this.move(x, y); } else { this.x = Math.floor(x + 0.5); this.y = Math.floor(y + 0.5); } } }; Point.prototype.move = function (x, y) { this.x = x; this.y = y; }; Point.prototype.translate = function (dx, dy) { this.x += dx; this.y += dy; }; Point.prototype.equals = function (obj) { if (obj.constructor.name == "Point") { var pt = obj; return this.x == pt.x && this.y == pt.y; } return this == obj; }; Point.prototype.toString = function () { return new Point().constructor.name + "[x=" + this.x + ",y=" + this.y + "]"; }; module.exports = Point; /***/ }), /* 13 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; function RectangleD(x, y, width, height) { this.x = 0; this.y = 0; this.width = 0; this.height = 0; if (x != null && y != null && width != null && height != null) { this.x = x; this.y = y; this.width = width; this.height = height; } } RectangleD.prototype.getX = function () { return this.x; }; RectangleD.prototype.setX = function (x) { this.x = x; }; RectangleD.prototype.getY = function () { return this.y; }; RectangleD.prototype.setY = function (y) { this.y = y; }; RectangleD.prototype.getWidth = function () { return this.width; }; RectangleD.prototype.setWidth = function (width) { this.width = width; }; RectangleD.prototype.getHeight = function () { return this.height; }; RectangleD.prototype.setHeight = function (height) { this.height = height; }; RectangleD.prototype.getRight = function () { return this.x + this.width; }; RectangleD.prototype.getBottom = function () { return this.y + this.height; }; RectangleD.prototype.intersects = function (a) { if (this.getRight() < a.x) { return false; } if (this.getBottom() < a.y) { return false; } if (a.getRight() < this.x) { return false; } if (a.getBottom() < this.y) { return false; } return true; }; RectangleD.prototype.getCenterX = function () { return this.x + this.width / 2; }; RectangleD.prototype.getMinX = function () { return this.getX(); }; RectangleD.prototype.getMaxX = function () { return this.getX() + this.width; }; RectangleD.prototype.getCenterY = function () { return this.y + this.height / 2; }; RectangleD.prototype.getMinY = function () { return this.getY(); }; RectangleD.prototype.getMaxY = function () { return this.getY() + this.height; }; RectangleD.prototype.getWidthHalf = function () { return this.width / 2; }; RectangleD.prototype.getHeightHalf = function () { return this.height / 2; }; module.exports = RectangleD; /***/ }), /* 14 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; function UniqueIDGeneretor() {} UniqueIDGeneretor.lastID = 0; UniqueIDGeneretor.createID = function (obj) { if (UniqueIDGeneretor.isPrimitive(obj)) { return obj; } if (obj.uniqueID != null) { return obj.uniqueID; } obj.uniqueID = UniqueIDGeneretor.getString(); UniqueIDGeneretor.lastID++; return obj.uniqueID; }; UniqueIDGeneretor.getString = function (id) { if (id == null) id = UniqueIDGeneretor.lastID; return "Object#" + id + ""; }; UniqueIDGeneretor.isPrimitive = function (arg) { var type = typeof arg === "undefined" ? "undefined" : _typeof(arg); return arg == null || type != "object" && type != "function"; }; module.exports = UniqueIDGeneretor; /***/ }), /* 15 */ /***/ (function(module, exports, __nested_webpack_require_66321__) { "use strict"; function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } var LayoutConstants = __nested_webpack_require_66321__(0); var LGraphManager = __nested_webpack_require_66321__(7); var LNode = __nested_webpack_require_66321__(3); var LEdge = __nested_webpack_require_66321__(1); var LGraph = __nested_webpack_require_66321__(6); var PointD = __nested_webpack_require_66321__(5); var Transform = __nested_webpack_require_66321__(17); var Emitter = __nested_webpack_require_66321__(29); function Layout(isRemoteUse) { Emitter.call(this); //Layout Quality: 0:draft, 1:default, 2:proof this.layoutQuality = LayoutConstants.QUALITY; //Whether layout should create bendpoints as needed or not this.createBendsAsNeeded = LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED; //Whether layout should be incremental or not this.incremental = LayoutConstants.DEFAULT_INCREMENTAL; //Whether we animate from before to after layout node positions this.animationOnLayout = LayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT; //Whether we animate the layout process or not this.animationDuringLayout = LayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT; //Number iterations that should be done between two successive animations this.animationPeriod = LayoutConstants.DEFAULT_ANIMATION_PERIOD; /** * Whether or not leaf nodes (non-compound nodes) are of uniform sizes. When * they are, both spring and repulsion forces between two leaf nodes can be * calculated without the expensive clipping point calculations, resulting * in major speed-up. */ this.uniformLeafNodeSizes = LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES; /** * This is used for creation of bendpoints by using dummy nodes and edges. * Maps an LEdge to its dummy bendpoint path. */ this.edgeToDummyNodes = new Map(); this.graphManager = new LGraphManager(this); this.isLayoutFinished = false; this.isSubLayout = false; this.isRemoteUse = false; if (isRemoteUse != null) { this.isRemoteUse = isRemoteUse; } } Layout.RANDOM_SEED = 1; Layout.prototype = Object.create(Emitter.prototype); Layout.prototype.getGraphManager = function () { return this.graphManager; }; Layout.prototype.getAllNodes = function () { return this.graphManager.getAllNodes(); }; Layout.prototype.getAllEdges = function () { return this.graphManager.getAllEdges(); }; Layout.prototype.getAllNodesToApplyGravitation = function () { return this.graphManager.getAllNodesToApplyGravitation(); }; Layout.prototype.newGraphManager = function () { var gm = new LGraphManager(this); this.graphManager = gm; return gm; }; Layout.prototype.newGraph = function (vGraph) { return new LGraph(null, this.graphManager, vGraph); }; Layout.prototype.newNode = function (vNode) { return new LNode(this.graphManager, vNode); }; Layout.prototype.newEdge = function (vEdge) { return new LEdge(null, null, vEdge); }; Layout.prototype.checkLayoutSuccess = function () { return this.graphManager.getRoot() == null || this.graphManager.getRoot().getNodes().length == 0 || this.graphManager.includesInvalidEdge(); }; Layout.prototype.runLayout = function () { this.isLayoutFinished = false; if (this.tilingPreLayout) { this.tilingPreLayout(); } this.initParameters(); var isLayoutSuccessfull; if (this.checkLayoutSuccess()) { isLayoutSuccessfull = false; } else { isLayoutSuccessfull = this.layout(); } if (LayoutConstants.ANIMATE === 'during') { // If this is a 'during' layout animation. Layout is not finished yet. // We need to perform these in index.js when layout is really finished. return false; } if (isLayoutSuccessfull) { if (!this.isSubLayout) { this.doPostLayout(); } } if (this.tilingPostLayout) { this.tilingPostLayout(); } this.isLayoutFinished = true; return isLayoutSuccessfull; }; /** * This method performs the operations required after layout. */ Layout.prototype.doPostLayout = function () { //assert !isSubLayout : "Should not be called on sub-layout!"; // Propagate geometric changes to v-level objects if (!this.incremental) { this.transform(); } this.update(); }; /** * This method updates the geometry of the target graph according to * calculated layout. */ Layout.prototype.update2 = function () { // update bend points if (this.createBendsAsNeeded) { this.createBendpointsFromDummyNodes(); // reset all edges, since the topology has changed this.graphManager.resetAllEdges(); } // perform edge, node and root updates if layout is not called // remotely if (!this.isRemoteUse) { // update all edges var edge; var allEdges = this.graphManager.getAllEdges(); for (var i = 0; i < allEdges.length; i++) { edge = allEdges[i]; // this.update(edge); } // recursively update nodes var node; var nodes = this.graphManager.getRoot().getNodes(); for (var i = 0; i < nodes.length; i++) { node = nodes[i]; // this.update(node); } // update root graph this.update(this.graphManager.getRoot()); } }; Layout.prototype.update = function (obj) { if (obj == null) { this.update2(); } else if (obj instanceof LNode) { var node = obj; if (node.getChild() != null) { // since node is compound, recursively update child nodes var nodes = node.getChild().getNodes(); for (var i = 0; i < nodes.length; i++) { update(nodes[i]); } } // if the l-level node is associated with a v-level graph object, // then it is assumed that the v-level node implements the // interface Updatable. if (node.vGraphObject != null) { // cast to Updatable without any type check var vNode = node.vGraphObject; // call the update method of the interface vNode.update(node); } } else if (obj instanceof LEdge) { var edge = obj; // if the l-level edge is associated with a v-level graph object, // then it is assumed that the v-level edge implements the // interface Updatable. if (edge.vGraphObject != null) { // cast to Updatable without any type check var vEdge = edge.vGraphObject; // call the update method of the interface vEdge.update(edge); } } else if (obj instanceof LGraph) { var graph = obj; // if the l-level graph is associated with a v-level graph object, // then it is assumed that the v-level object implements the // interface Updatable. if (graph.vGraphObject != null) { // cast to Updatable without any type check var vGraph = graph.vGraphObject; // call the update method of the interface vGraph.update(graph); } } }; /** * This method is used to set all layout parameters to default values * determined at compile time. */ Layout.prototype.initParameters = function () { if (!this.isSubLayout) { this.layoutQuality = LayoutConstants.QUALITY; this.animationDuringLayout = LayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT; this.animationPeriod = LayoutConstants.DEFAULT_ANIMATION_PERIOD; this.animationOnLayout = LayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT; this.incremental = LayoutConstants.DEFAULT_INCREMENTAL; this.createBendsAsNeeded = LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED; this.uniformLeafNodeSizes = LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES; } if (this.animationDuringLayout) { this.animationOnLayout = false; } }; Layout.prototype.transform = function (newLeftTop) { if (newLeftTop == undefined) { this.transform(new PointD(0, 0)); } else { // create a transformation object (from Eclipse to layout). When an // inverse transform is applied, we get upper-left coordinate of the // drawing or the root graph at given input coordinate (some margins // already included in calculation of left-top). var trans = new Transform(); var leftTop = this.graphManager.getRoot().updateLeftTop(); if (leftTop != null) { trans.setWorldOrgX(newLeftTop.x); trans.setWorldOrgY(newLeftTop.y); trans.setDeviceOrgX(leftTop.x); trans.setDeviceOrgY(leftTop.y); var nodes = this.getAllNodes(); var node; for (var i = 0; i < nodes.length; i++) { node = nodes[i]; node.transform(trans); } } } }; Layout.prototype.positionNodesRandomly = function (graph) { if (graph == undefined) { //assert !this.incremental; this.positionNodesRandomly(this.getGraphManager().getRoot()); this.getGraphManager().getRoot().updateBounds(true); } else { var lNode; var childGraph; var nodes = graph.getNodes(); for (var i = 0; i < nodes.length; i++) { lNode = nodes[i]; childGraph = lNode.getChild(); if (childGraph == null) { lNode.scatter(); } else if (childGraph.getNodes().length == 0) { lNode.scatter(); } else { this.positionNodesRandomly(childGraph); lNode.updateBounds(); } } } }; /** * This method returns a list of trees where each tree is represented as a * list of l-nodes. The method returns a list of size 0 when: * - The graph is not flat or * - One of the component(s) of the graph is not a tree. */ Layout.prototype.getFlatForest = function () { var flatForest = []; var isForest = true; // Quick reference for all nodes in the graph manager associated with // this layout. The list should not be changed. var allNodes = this.graphManager.getRoot().getNodes(); // First be sure that the graph is flat var isFlat = true; for (var i = 0; i < allNodes.length; i++) { if (allNodes[i].getChild() != null) { isFlat = false; } } // Return empty forest if the graph is not flat. if (!isFlat) { return flatForest; } // Run BFS for each component of the graph. var visited = new Set(); var toBeVisited = []; var parents = new Map(); var unProcessedNodes = []; unProcessedNodes = unProcessedNodes.concat(allNodes); // Each iteration of this loop finds a component of the graph and // decides whether it is a tree or not. If it is a tree, adds it to the // forest and continued with the next component. while (unProcessedNodes.length > 0 && isForest) { toBeVisited.push(unProcessedNodes[0]); // Start the BFS. Each iteration of this loop visits a node in a // BFS manner. while (toBeVisited.length > 0 && isForest) { //pool operation var currentNode = toBeVisited[0]; toBeVisited.splice(0, 1); visited.add(currentNode); // Traverse all neighbors of this node var neighborEdges = currentNode.getEdges(); for (var i = 0; i < neighborEdges.length; i++) { var currentNeighbor = neighborEdges[i].getOtherEnd(currentNode); // If BFS is not growing from this neighbor. if (parents.get(currentNode) != currentNeighbor) { // We haven't previously visited this neighbor. if (!visited.has(currentNeighbor)) { toBeVisited.push(currentNeighbor); parents.set(currentNeighbor, currentNode); } // Since we have previously visited this neighbor and // this neighbor is not parent of currentNode, given // graph contains a component that is not tree, hence // it is not a forest. else { isForest = false; break; } } } } // The graph contains a component that is not a tree. Empty // previously found trees. The method will end. if (!isForest) { flatForest = []; } // Save currently visited nodes as a tree in our forest. Reset // visited and parents lists. Continue with the next component of // the graph, if any. else { var temp = [].concat(_toConsumableArray(visited)); flatForest.push(temp); //flatForest = flatForest.concat(temp); //unProcessedNodes.removeAll(visited); for (var i = 0; i < temp.length; i++) { var value = temp[i]; var index = unProcessedNodes.indexOf(value); if (index > -1) { unProcessedNodes.splice(index, 1); } } visited = new Set(); parents = new Map(); } } return flatForest; }; /** * This method creates dummy nodes (an l-level node with minimal dimensions) * for the given edge (one per bendpoint). The existing l-level structure * is updated accordingly. */ Layout.prototype.createDummyNodesForBendpoints = function (edge) { var dummyNodes = []; var prev = edge.source; var graph = this.graphManager.calcLowestCommonAncestor(edge.source, edge.target); for (var i = 0; i < edge.bendpoints.length; i++) { // create new dummy node var dummyNode = this.newNode(null); dummyNode.setRect(new Point(0, 0), new Dimension(1, 1)); graph.add(dummyNode); // create new dummy edge between prev and dummy node var dummyEdge = this.newEdge(null); this.graphManager.add(dummyEdge, prev, dummyNode); dummyNodes.add(dummyNode); prev = dummyNode; } var dummyEdge = this.newEdge(null); this.graphManager.add(dummyEdge, prev, edge.target); this.edgeToDummyNodes.set(edge, dummyNodes); // remove real edge from graph manager if it is inter-graph if (edge.isInterGraph()) { this.graphManager.remove(edge); } // else, remove the edge from the current graph else { graph.remove(edge); } return dummyNodes; }; /** * This method creates bendpoints for edges from the dummy nodes * at l-level. */ Layout.prototype.createBendpointsFromDummyNodes = function () { var edges = []; edges = edges.concat(this.graphManager.getAllEdges()); edges = [].concat(_toConsumableArray(this.edgeToDummyNodes.keys())).concat(edges); for (var k = 0; k < edges.length; k++) { var lEdge = edges[k]; if (lEdge.bendpoints.length > 0) { var path = this.edgeToDummyNodes.get(lEdge); for (var i = 0; i < path.length; i++) { var dummyNode = path[i]; var p = new PointD(dummyNode.getCenterX(), dummyNode.getCenterY()); // update bendpoint's location according to dummy node var ebp = lEdge.bendpoints.get(i); ebp.x = p.x; ebp.y = p.y; // remove the dummy node, dummy edges incident with this // dummy node is also removed (within the remove method) dummyNode.getOwner().remove(dummyNode); } // add the real edge to graph this.graphManager.add(lEdge, lEdge.source, lEdge.target); } } }; Layout.transform = function (sliderValue, defaultValue, minDiv, maxMul) { if (minDiv != undefined && maxMul != undefined) { var value = defaultValue; if (sliderValue <= 50) { var minValue = defaultValue / minDiv; value -= (defaultValue - minValue) / 50 * (50 - sliderValue); } else { var maxValue = defaultValue * maxMul; value += (maxValue - defaultValue) / 50 * (sliderValue - 50); } return value; } else { var a, b; if (sliderValue <= 50) { a = 9.0 * defaultValue / 500.0; b = defaultValue / 10.0; } else { a = 9.0 * defaultValue / 50.0; b = -8 * defaultValue; } return a * sliderValue + b; } }; /** * This method finds and returns the center of the given nodes, assuming * that the given nodes form a tree in themselves. */ Layout.findCenterOfTree = function (nodes) { var list = []; list = list.concat(nodes); var removedNodes = []; var remainingDegrees = new Map(); var foundCenter = false; var centerNode = null; if (list.length == 1 || list.length == 2) { foundCenter = true; centerNode = list[0]; } for (var i = 0; i < list.length; i++) { var node = list[i]; var degree = node.getNeighborsList().size; remainingDegrees.set(node, node.getNeighborsList().size); if (degree == 1) { removedNodes.push(node); } } var tempList = []; tempList = tempList.concat(removedNodes); while (!foundCenter) { var tempList2 = []; tempList2 = tempList2.concat(tempList); tempList = []; for (var i = 0; i < list.length; i++) { var node = list[i]; var index = list.indexOf(node); if (index >= 0) { list.splice(index, 1); } var neighbours = node.getNeighborsList(); neighbours.forEach(function (neighbour) { if (removedNodes.indexOf(neighbour) < 0) { var otherDegree = remainingDegrees.get(neighbour); var newDegree = otherDegree - 1; if (newDegree == 1) { tempList.push(neighbour); } remainingDegrees.set(neighbour, newDegree); } }); } removedNodes = removedNodes.concat(tempList); if (list.length == 1 || list.length == 2) { foundCenter = true; centerNode = list[0]; } } return centerNode; }; /** * During the coarsening process, this layout may be referenced by two graph managers * this setter function grants access to change the currently being used graph manager */ Layout.prototype.setGraphManager = function (gm) { this.graphManager = gm; }; module.exports = Layout; /***/ }), /* 16 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; function RandomSeed() {} // adapted from: https://stackoverflow.com/a/19303725 RandomSeed.seed = 1; RandomSeed.x = 0; RandomSeed.nextDouble = function () { RandomSeed.x = Math.sin(RandomSeed.seed++) * 10000; return RandomSeed.x - Math.floor(RandomSeed.x); }; module.exports = RandomSeed; /***/ }), /* 17 */ /***/ (function(module, exports, __nested_webpack_require_84109__) { "use strict"; var PointD = __nested_webpack_require_84109__(5); function Transform(x, y) { this.lworldOrgX = 0.0; this.lworldOrgY = 0.0; this.ldeviceOrgX = 0.0; this.ldeviceOrgY = 0.0; this.lworldExtX = 1.0; this.lworldExtY = 1.0; this.ldeviceExtX = 1.0; this.ldeviceExtY = 1.0; } Transform.prototype.getWorldOrgX = function () { return this.lworldOrgX; }; Transform.prototype.setWorldOrgX = function (wox) { this.lworldOrgX = wox; }; Transform.prototype.getWorldOrgY = function () { return this.lworldOrgY; }; Transform.prototype.setWorldOrgY = function (woy) { this.lworldOrgY = woy; }; Transform.prototype.getWorldExtX = function () { return this.lworldExtX; }; Transform.prototype.setWorldExtX = function (wex) { this.lworldExtX = wex; }; Transform.prototype.getWorldExtY = function () { return this.lworldExtY; }; Transform.prototype.setWorldExtY = function (wey) { this.lworldExtY = wey; }; /* Device related */ Transform.prototype.getDeviceOrgX = function () { return this.ldeviceOrgX; }; Transform.prototype.setDeviceOrgX = function (dox) { this.ldeviceOrgX = dox; }; Transform.prototype.getDeviceOrgY = function () { return this.ldeviceOrgY; }; Transform.prototype.setDeviceOrgY = function (doy) { this.ldeviceOrgY = doy; }; Transform.prototype.getDeviceExtX = function () { return this.ldeviceExtX; }; Transform.prototype.setDeviceExtX = function (dex) { this.ldeviceExtX = dex; }; Transform.prototype.getDeviceExtY = function () { return this.ldeviceExtY; }; Transform.prototype.setDeviceExtY = function (dey) { this.ldeviceExtY = dey; }; Transform.prototype.transformX = function (x) { var xDevice = 0.0; var worldExtX = this.lworldExtX; if (worldExtX != 0.0) { xDevice = this.ldeviceOrgX + (x - this.lworldOrgX) * this.ldeviceExtX / worldExtX; } return xDevice; }; Transform.prototype.transformY = function (y) { var yDevice = 0.0; var worldExtY = this.lworldExtY; if (worldExtY != 0.0) { yDevice = this.ldeviceOrgY + (y - this.lworldOrgY) * this.ldeviceExtY / worldExtY; } return yDevice; }; Transform.prototype.inverseTransformX = function (x) { var xWorld = 0.0; var deviceExtX = this.ldeviceExtX; if (deviceExtX != 0.0) { xWorld = this.lworldOrgX + (x - this.ldeviceOrgX) * this.lworldExtX / deviceExtX; } return xWorld; }; Transform.prototype.inverseTransformY = function (y) { var yWorld = 0.0; var deviceExtY = this.ldeviceExtY; if (deviceExtY != 0.0) { yWorld = this.lworldOrgY + (y - this.ldeviceOrgY) * this.lworldExtY / deviceExtY; } return yWorld; }; Transform.prototype.inverseTransformPoint = function (inPoint) { var outPoint = new PointD(this.inverseTransformX(inPoint.x), this.inverseTransformY(inPoint.y)); return outPoint; }; module.exports = Transform; /***/ }), /* 18 */ /***/ (function(module, exports, __nested_webpack_require_86996__) { "use strict"; function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } var Layout = __nested_webpack_require_86996__(15); var FDLayoutConstants = __nested_webpack_require_86996__(4); var LayoutConstants = __nested_webpack_require_86996__(0); var IGeometry = __nested_webpack_require_86996__(8); var IMath = __nested_webpack_require_86996__(9); function FDLayout() { Layout.call(this); this.useSmartIdealEdgeLengthCalculation = FDLayoutConstants.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION; this.gravityConstant = FDLayoutConstants.DEFAULT_GRAVITY_STRENGTH; this.compoundGravityConstant = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_STRENGTH; this.gravityRangeFactor = FDLayoutConstants.DEFAULT_GRAVITY_RANGE_FACTOR; this.compoundGravityRangeFactor = FDLayoutConstants.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR; this.displacementThresholdPerNode = 3.0 * FDLayoutConstants.DEFAULT_EDGE_LENGTH / 100; this.coolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL; this.initialCoolingFactor = FDLayoutConstants.DEFAULT_COOLING_FACTOR_INCREMENTAL; this.totalDisplacement = 0.0; this.oldTotalDisplacement = 0.0; this.maxIterations = FDLayoutConstants.MAX_ITERATIONS; } FDLayout.prototype = Object.create(Layout.prototype); for (var prop in Layout) { FDLayout[prop] = Layout[prop]; } FDLayout.prototype.initParameters = function () { Layout.prototype.initParameters.call(this, arguments); this.totalIterations = 0; this.notAnimatedIterations = 0; this.useFRGridVariant = FDLayoutConstants.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION; this.grid = []; }; FDLayout.prototype.calcIdealEdgeLengths = function () { var edge; var originalIdealLength; var lcaDepth; var source; var target; var sizeOfSourceInLca; var sizeOfTargetInLca; var allEdges = this.getGraphManager().getAllEdges(); for (var i = 0; i < allEdges.length; i++) { edge = allEdges[i]; originalIdealLength = edge.idealLength; if (edge.isInterGraph) { source = edge.getSource(); target = edge.getTarget(); sizeOfSourceInLca = edge.getSourceInLca().getEstimatedSize(); sizeOfTargetInLca = edge.getTargetInLca().getEstimatedSize(); if (this.useSmartIdealEdgeLengthCalculation) { edge.idealLength += sizeOfSourceInLca + sizeOfTargetInLca - 2 * LayoutConstants.SIMPLE_NODE_SIZE; } lcaDepth = edge.getLca().getInclusionTreeDepth(); edge.idealLength += originalIdealLength * FDLayoutConstants.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR * (source.getInclusionTreeDepth() + target.getInclusionTreeDepth() - 2 * lcaDepth); } } }; FDLayout.prototype.initSpringEmbedder = function () { var s = this.getAllNodes().length; if (this.incremental) { if (s > FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) { this.coolingFactor = Math.max(this.coolingFactor * FDLayoutConstants.COOLING_ADAPTATION_FACTOR, this.coolingFactor - (s - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) / (FDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) * this.coolingFactor * (1 - FDLayoutConstants.COOLING_ADAPTATION_FACTOR)); } this.maxNodeDisplacement = FDLayoutConstants.MAX_NODE_DISPLACEMENT_INCREMENTAL; } else { if (s > FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) { this.coolingFactor = Math.max(FDLayoutConstants.COOLING_ADAPTATION_FACTOR, 1.0 - (s - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) / (FDLayoutConstants.ADAPTATION_UPPER_NODE_LIMIT - FDLayoutConstants.ADAPTATION_LOWER_NODE_LIMIT) * (1 - FDLayoutConstants.COOLING_ADAPTATION_FACTOR)); } else { this.coolingFactor = 1.0; } this.initialCoolingFactor = this.coolingFactor; this.maxNodeDisplacement = FDLayoutConstants.MAX_NODE_DISPLACEMENT; } this.maxIterations = Math.max(this.getAllNodes().length * 5, this.maxIterations); // Reassign this attribute by using new constant value this.displacementThresholdPerNode = 3.0 * FDLayoutConstants.DEFAULT_EDGE_LENGTH / 100; this.totalDisplacementThreshold = this.displacementThresholdPerNode * this.getAllNodes().length; this.repulsionRange = this.calcRepulsionRange(); }; FDLayout.prototype.calcSpringForces = function () { var lEdges = this.getAllEdges(); var edge; for (var i = 0; i < lEdges.length; i++) { edge = lEdges[i]; this.calcSpringForce(edge, edge.idealLength); } }; FDLayout.prototype.calcRepulsionForces = function () { var gridUpdateAllowed = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; var forceToNodeSurroundingUpdate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; var i, j; var nodeA, nodeB; var lNodes = this.getAllNodes(); var processedNodeSet; if (this.useFRGridVariant) { if (this.totalIterations % FDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD == 1 && gridUpdateAllowed) { this.updateGrid(); } processedNodeSet = new Set(); // calculate repulsion forces between each nodes and its surrounding for (i = 0; i < lNodes.length; i++) { nodeA = lNodes[i]; this.calculateRepulsionForceOfANode(nodeA, processedNodeSet, gridUpdateAllowed, forceToNodeSurroundingUpdate); processedNodeSet.add(nodeA); } } else { for (i = 0; i < lNodes.length; i++) { nodeA = lNodes[i]; for (j = i + 1; j < lNodes.length; j++) { nodeB = lNodes[j]; // If both nodes are not members of the same graph, skip. if (nodeA.getOwner() != nodeB.getOwner()) { continue; } this.calcRepulsionForce(nodeA, nodeB); } } } }; FDLayout.prototype.calcGravitationalForces = function () { var node; var lNodes = this.getAllNodesToApplyGravitation(); for (var i = 0; i < lNodes.length; i++) { node = lNodes[i]; this.calcGravitationalForce(node); } }; FDLayout.prototype.moveNodes = function () { var lNodes = this.getAllNodes(); var node; for (var i = 0; i < lNodes.length; i++) { node = lNodes[i]; node.move(); } }; FDLayout.prototype.calcSpringForce = function (edge, idealLength) { var sourceNode = edge.getSource(); var targetNode = edge.getTarget(); var length; var springForce; var springForceX; var springForceY; // Update edge length if (this.uniformLeafNodeSizes && sourceNode.getChild() == null && targetNode.getChild() == null) { edge.updateLengthSimple(); } else { edge.updateLength(); if (edge.isOverlapingSourceAndTarget) { return; } } length = edge.getLength(); if (length == 0) return; // Calculate spring forces springForce = edge.edgeElasticity * (length - idealLength); // Project force onto x and y axes springForceX = springForce * (edge.lengthX / length); springForceY = springForce * (edge.lengthY / length); // Apply forces on the end nodes sourceNode.springForceX += springForceX; sourceNode.springForceY += springForceY; targetNode.springForceX -= springForceX; targetNode.springForceY -= springForceY; }; FDLayout.prototype.calcRepulsionForce = function (nodeA, nodeB) { var rectA = nodeA.getRect(); var rectB = nodeB.getRect(); var overlapAmount = new Array(2); var clipPoints = new Array(4); var distanceX; var distanceY; var distanceSquared; var distance; var repulsionForce; var repulsionForceX; var repulsionForceY; if (rectA.intersects(rectB)) // two nodes overlap { // calculate separation amount in x and y directions IGeometry.calcSeparationAmount(rectA, rectB, overlapAmount, FDLayoutConstants.DEFAULT_EDGE_LENGTH / 2.0); repulsionForceX = 2 * overlapAmount[0]; repulsionForceY = 2 * overlapAmount[1]; var childrenConstant = nodeA.noOfChildren * nodeB.noOfChildren / (nodeA.noOfChildren + nodeB.noOfChildren); // Apply forces on the two nodes nodeA.repulsionForceX -= childrenConstant * repulsionForceX; nodeA.repulsionForceY -= childrenConstant * repulsionForceY; nodeB.repulsionForceX += childrenConstant * repulsionForceX; nodeB.repulsionForceY += childrenConstant * repulsionForceY; } else // no overlap { // calculate distance if (this.uniformLeafNodeSizes && nodeA.getChild() == null && nodeB.getChild() == null) // simply base repulsion on distance of node centers { distanceX = rectB.getCenterX() - rectA.getCenterX(); distanceY = rectB.getCenterY() - rectA.getCenterY(); } else // use clipping points { IGeometry.getIntersection(rectA, rectB, clipPoints); distanceX = clipPoints[2] - clipPoints[0]; distanceY = clipPoints[3] - clipPoints[1]; } // No repulsion range. FR grid variant should take care of this. if (Math.abs(distanceX) < FDLayoutConstants.MIN_REPULSION_DIST) { distanceX = IMath.sign(distanceX) * FDLayoutConstants.MIN_REPULSION_DIST; } if (Math.abs(distanceY) < FDLayoutConstants.MIN_REPULSION_DIST) { distanceY = IMath.sign(distanceY) * FDLayoutConstants.MIN_REPULSION_DIST; } distanceSquared = distanceX * distanceX + distanceY * distanceY; distance = Math.sqrt(distanceSquared); // Here we use half of the nodes' repulsion values for backward compatibility repulsionForce = (nodeA.nodeRepulsion / 2 + nodeB.nodeRepulsion / 2) * nodeA.noOfChildren * nodeB.noOfChildren / distanceSquared; // Project force onto x and y axes repulsionForceX = repulsionForce * distanceX / distance; repulsionForceY = repulsionForce * distanceY / distance; // Apply forces on the two nodes nodeA.repulsionForceX -= repulsionForceX; nodeA.repulsionForceY -= repulsionForceY; nodeB.repulsionForceX += repulsionForceX; nodeB.repulsionForceY += repulsionForceY; } }; FDLayout.prototype.calcGravitationalForce = function (node) { var ownerGraph; var ownerCenterX; var ownerCenterY; var distanceX; var distanceY; var absDistanceX; var absDistanceY; var estimatedSize; ownerGraph = node.getOwner(); ownerCenterX = (ownerGraph.getRight() + ownerGraph.getLeft()) / 2; ownerCenterY = (ownerGraph.getTop() + ownerGraph.getBottom()) / 2; distanceX = node.getCenterX() - ownerCenterX; distanceY = node.getCenterY() - ownerCenterY; absDistanceX = Math.abs(distanceX) + node.getWidth() / 2; absDistanceY = Math.abs(distanceY) + node.getHeight() / 2; if (node.getOwner() == this.graphManager.getRoot()) // in the root graph { estimatedSize = ownerGraph.getEstimatedSize() * this.gravityRangeFactor; if (absDistanceX > estimatedSize || absDistanceY > estimatedSize) { node.gravitationForceX = -this.gravityConstant * distanceX; node.gravitationForceY = -this.gravityConstant * distanceY; } } else // inside a compound { estimatedSize = ownerGraph.getEstimatedSize() * this.compoundGravityRangeFactor; if (absDistanceX > estimatedSize || absDistanceY > estimatedSize) { node.gravitationForceX = -this.gravityConstant * distanceX * this.compoundGravityConstant; node.gravitationForceY = -this.gravityConstant * distanceY * this.compoundGravityConstant; } } }; FDLayout.prototype.isConverged = function () { var converged; var oscilating = false; if (this.totalIterations > this.maxIterations / 3) { oscilating = Math.abs(this.totalDisplacement - this.oldTotalDisplacement) < 2; } converged = this.totalDisplacement < this.totalDisplacementThreshold; this.oldTotalDisplacement = this.totalDisplacement; return converged || oscilating; }; FDLayout.prototype.animate = function () { if (this.animationDuringLayout && !this.isSubLayout) { if (this.notAnimatedIterations == this.animationPeriod) { this.update(); this.notAnimatedIterations = 0; } else { this.notAnimatedIterations++; } } }; //This method calculates the number of children (weight) for all nodes FDLayout.prototype.calcNoOfChildrenForAllNodes = function () { var node; var allNodes = this.graphManager.getAllNodes(); for (var i = 0; i < allNodes.length; i++) { node = allNodes[i]; node.noOfChildren = node.getNoOfChildren(); } }; // ----------------------------------------------------------------------------- // Section: FR-Grid Variant Repulsion Force Calculation // ----------------------------------------------------------------------------- FDLayout.prototype.calcGrid = function (graph) { var sizeX = 0; var sizeY = 0; sizeX = parseInt(Math.ceil((graph.getRight() - graph.getLeft()) / this.repulsionRange)); sizeY = parseInt(Math.ceil((graph.getBottom() - graph.getTop()) / this.repulsionRange)); var grid = new Array(sizeX); for (var i = 0; i < sizeX; i++) { grid[i] = new Array(sizeY); } for (var i = 0; i < sizeX; i++) { for (var j = 0; j < sizeY; j++) { grid[i][j] = new Array(); } } return grid; }; FDLayout.prototype.addNodeToGrid = function (v, left, top) { var startX = 0; var finishX = 0; var startY = 0; var finishY = 0; startX = parseInt(Math.floor((v.getRect().x - left) / this.repulsionRange)); finishX = parseInt(Math.floor((v.getRect().width + v.getRect().x - left) / this.repulsionRange)); startY = parseInt(Math.floor((v.getRect().y - top) / this.repulsionRange)); finishY = parseInt(Math.floor((v.getRect().height + v.getRect().y - top) / this.repulsionRange)); for (var i = startX; i <= finishX; i++) { for (var j = startY; j <= finishY; j++) { this.grid[i][j].push(v); v.setGridCoordinates(startX, finishX, startY, finishY); } } }; FDLayout.prototype.updateGrid = function () { var i; var nodeA; var lNodes = this.getAllNodes(); this.grid = this.calcGrid(this.graphManager.getRoot()); // put all nodes to proper grid cells for (i = 0; i < lNodes.length; i++) { nodeA = lNodes[i]; this.addNodeToGrid(nodeA, this.graphManager.getRoot().getLeft(), this.graphManager.getRoot().getTop()); } }; FDLayout.prototype.calculateRepulsionForceOfANode = function (nodeA, processedNodeSet, gridUpdateAllowed, forceToNodeSurroundingUpdate) { if (this.totalIterations % FDLayoutConstants.GRID_CALCULATION_CHECK_PERIOD == 1 && gridUpdateAllowed || forceToNodeSurroundingUpdate) { var surrounding = new Set(); nodeA.surrounding = new Array(); var nodeB; var grid = this.grid; for (var i = nodeA.startX - 1; i < nodeA.finishX + 2; i++) { for (var j = nodeA.startY - 1; j < nodeA.finishY + 2; j++) { if (!(i < 0 || j < 0 || i >= grid.length || j >= grid[0].length)) { for (var k = 0; k < grid[i][j].length; k++) { nodeB = grid[i][j][k]; // If both nodes are not members of the same graph, // or both nodes are the same, skip. if (nodeA.getOwner() != nodeB.getOwner() || nodeA == nodeB) { continue; } // check if the repulsion force between // nodeA and nodeB has already been calculated if (!processedNodeSet.has(nodeB) && !surrounding.has(nodeB)) { var distanceX = Math.abs(nodeA.getCenterX() - nodeB.getCenterX()) - (nodeA.getWidth() / 2 + nodeB.getWidth() / 2); var distanceY = Math.abs(nodeA.getCenterY() - nodeB.getCenterY()) - (nodeA.getHeight() / 2 + nodeB.getHeight() / 2); // if the distance between nodeA and nodeB // is less then calculation range if (distanceX <= this.repulsionRange && distanceY <= this.repulsionRange) { //then add nodeB to surrounding of nodeA surrounding.add(nodeB); } } } } } } nodeA.surrounding = [].concat(_toConsumableArray(surrounding)); } for (i = 0; i < nodeA.surrounding.length; i++) { this.calcRepulsionForce(nodeA, nodeA.surrounding[i]); } }; FDLayout.prototype.calcRepulsionRange = function () { return 0.0; }; module.exports = FDLayout; /***/ }), /* 19 */ /***/ (function(module, exports, __nested_webpack_require_103214__) { "use strict"; var LEdge = __nested_webpack_require_103214__(1); var FDLayoutConstants = __nested_webpack_require_103214__(4); function FDLayoutEdge(source, target, vEdge) { LEdge.call(this, source, target, vEdge); // Ideal length and elasticity value for this edge this.idealLength = FDLayoutConstants.DEFAULT_EDGE_LENGTH; this.edgeElasticity = FDLayoutConstants.DEFAULT_SPRING_STRENGTH; } FDLayoutEdge.prototype = Object.create(LEdge.prototype); for (var prop in LEdge) { FDLayoutEdge[prop] = LEdge[prop]; } module.exports = FDLayoutEdge; /***/ }), /* 20 */ /***/ (function(module, exports, __nested_webpack_require_103820__) { "use strict"; var LNode = __nested_webpack_require_103820__(3); var FDLayoutConstants = __nested_webpack_require_103820__(4); function FDLayoutNode(gm, loc, size, vNode) { // alternative constructor is handled inside LNode LNode.call(this, gm, loc, size, vNode); // Repulsion value of this node this.nodeRepulsion = FDLayoutConstants.DEFAULT_REPULSION_STRENGTH; //Spring, repulsion and gravitational forces acting on this node this.springForceX = 0; this.springForceY = 0; this.repulsionForceX = 0; this.repulsionForceY = 0; this.gravitationForceX = 0; this.gravitationForceY = 0; //Amount by which this node is to be moved in this iteration this.displacementX = 0; this.displacementY = 0; //Start and finish grid coordinates that this node is fallen into this.startX = 0; this.finishX = 0; this.startY = 0; this.finishY = 0; //Geometric neighbors of this node this.surrounding = []; } FDLayoutNode.prototype = Object.create(LNode.prototype); for (var prop in LNode) { FDLayoutNode[prop] = LNode[prop]; } FDLayoutNode.prototype.setGridCoordinates = function (_startX, _finishX, _startY, _finishY) { this.startX = _startX; this.finishX = _finishX; this.startY = _startY; this.finishY = _finishY; }; module.exports = FDLayoutNode; /***/ }), /* 21 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; function DimensionD(width, height) { this.width = 0; this.height = 0; if (width !== null && height !== null) { this.height = height; this.width = width; } } DimensionD.prototype.getWidth = function () { return this.width; }; DimensionD.prototype.setWidth = function (width) { this.width = width; }; DimensionD.prototype.getHeight = function () { return this.height; }; DimensionD.prototype.setHeight = function (height) { this.height = height; }; module.exports = DimensionD; /***/ }), /* 22 */ /***/ (function(module, exports, __nested_webpack_require_105759__) { "use strict"; var UniqueIDGeneretor = __nested_webpack_require_105759__(14); function HashMap() { this.map = {}; this.keys = []; } HashMap.prototype.put = function (key, value) { var theId = UniqueIDGeneretor.createID(key); if (!this.contains(theId)) { this.map[theId] = value; this.keys.push(key); } }; HashMap.prototype.contains = function (key) { var theId = UniqueIDGeneretor.createID(key); return this.map[key] != null; }; HashMap.prototype.get = function (key) { var theId = UniqueIDGeneretor.createID(key); return this.map[theId]; }; HashMap.prototype.keySet = function () { return this.keys; }; module.exports = HashMap; /***/ }), /* 23 */ /***/ (function(module, exports, __nested_webpack_require_106487__) { "use strict"; var UniqueIDGeneretor = __nested_webpack_require_106487__(14); function HashSet() { this.set = {}; } ; HashSet.prototype.add = function (obj) { var theId = UniqueIDGeneretor.createID(obj); if (!this.contains(theId)) this.set[theId] = obj; }; HashSet.prototype.remove = function (obj) { delete this.set[UniqueIDGeneretor.createID(obj)]; }; HashSet.prototype.clear = function () { this.set = {}; }; HashSet.prototype.contains = function (obj) { return this.set[UniqueIDGeneretor.createID(obj)] == obj; }; HashSet.prototype.isEmpty = function () { return this.size() === 0; }; HashSet.prototype.size = function () { return Object.keys(this.set).length; }; //concats this.set to the given list HashSet.prototype.addAllTo = function (list) { var keys = Object.keys(this.set); var length = keys.length; for (var i = 0; i < length; i++) { list.push(this.set[keys[i]]); } }; HashSet.prototype.size = function () { return Object.keys(this.set).length; }; HashSet.prototype.addAll = function (list) { var s = list.length; for (var i = 0; i < s; i++) { var v = list[i]; this.add(v); } }; module.exports = HashSet; /***/ }), /* 24 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; // Some matrix (1d and 2d array) operations function Matrix() {} /** * matrix multiplication * array1, array2 and result are 2d arrays */ Matrix.multMat = function (array1, array2) { var result = []; for (var i = 0; i < array1.length; i++) { result[i] = []; for (var j = 0; j < array2[0].length; j++) { result[i][j] = 0; for (var k = 0; k < array1[0].length; k++) { result[i][j] += array1[i][k] * array2[k][j]; } } } return result; }; /** * matrix transpose * array and result are 2d arrays */ Matrix.transpose = function (array) { var result = []; for (var i = 0; i < array[0].length; i++) { result[i] = []; for (var j = 0; j < array.length; j++) { result[i][j] = array[j][i]; } } return result; }; /** * multiply array with constant * array and result are 1d arrays */ Matrix.multCons = function (array, constant) { var result = []; for (var i = 0; i < array.length; i++) { result[i] = array[i] * constant; } return result; }; /** * substract two arrays * array1, array2 and result are 1d arrays */ Matrix.minusOp = function (array1, array2) { var result = []; for (var i = 0; i < array1.length; i++) { result[i] = array1[i] - array2[i]; } return result; }; /** * dot product of two arrays with same size * array1 and array2 are 1d arrays */ Matrix.dotProduct = function (array1, array2) { var product = 0; for (var i = 0; i < array1.length; i++) { product += array1[i] * array2[i]; } return product; }; /** * magnitude of an array * array is 1d array */ Matrix.mag = function (array) { return Math.sqrt(this.dotProduct(array, array)); }; /** * normalization of an array * array and result are 1d array */ Matrix.normalize = function (array) { var result = []; var magnitude = this.mag(array); for (var i = 0; i < array.length; i++) { result[i] = array[i] / magnitude; } return result; }; /** * multiply an array with centering matrix * array and result are 1d array */ Matrix.multGamma = function (array) { var result = []; var sum = 0; for (var i = 0; i < array.length; i++) { sum += array[i]; } sum *= -1 / array.length; for (var _i = 0; _i < array.length; _i++) { result[_i] = sum + array[_i]; } return result; }; /** * a special matrix multiplication * result = 0.5 * C * INV * C^T * array * array and result are 1d, C and INV are 2d arrays */ Matrix.multL = function (array, C, INV) { var result = []; var temp1 = []; var temp2 = []; // multiply by C^T for (var i = 0; i < C[0].length; i++) { var sum = 0; for (var j = 0; j < C.length; j++) { sum += -0.5 * C[j][i] * array[j]; } temp1[i] = sum; } // multiply the result by INV for (var _i2 = 0; _i2 < INV.length; _i2++) { var _sum = 0; for (var _j = 0; _j < INV.length; _j++) { _sum += INV[_i2][_j] * temp1[_j]; } temp2[_i2] = _sum; } // multiply the result by C for (var _i3 = 0; _i3 < C.length; _i3++) { var _sum2 = 0; for (var _j2 = 0; _j2 < C[0].length; _j2++) { _sum2 += C[_i3][_j2] * temp2[_j2]; } result[_i3] = _sum2; } return result; }; module.exports = Matrix; /***/ }), /* 25 */ /***/ (function(module, exports, __nested_webpack_require_111039__) { "use strict"; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } /** * A classic Quicksort algorithm with Hoare's partition * - Works also on LinkedList objects * * Copyright: i-Vis Research Group, Bilkent University, 2007 - present */ var LinkedList = __nested_webpack_require_111039__(11); var Quicksort = function () { function Quicksort(A, compareFunction) { _classCallCheck(this, Quicksort); if (compareFunction !== null || compareFunction !== undefined) this.compareFunction = this._defaultCompareFunction; var length = void 0; if (A instanceof LinkedList) length = A.size();else length = A.length; this._quicksort(A, 0, length - 1); } _createClass(Quicksort, [{ key: '_quicksort', value: function _quicksort(A, p, r) { if (p < r) { var q = this._partition(A, p, r); this._quicksort(A, p, q); this._quicksort(A, q + 1, r); } } }, { key: '_partition', value: function _partition(A, p, r) { var x = this._get(A, p); var i = p; var j = r; while (true) { while (this.compareFunction(x, this._get(A, j))) { j--; }while (this.compareFunction(this._get(A, i), x)) { i++; }if (i < j) { this._swap(A, i, j); i++; j--; } else return j; } } }, { key: '_get', value: function _get(object, index) { if (object instanceof LinkedList) return object.get_object_at(index);else return object[index]; } }, { key: '_set', value: function _set(object, index, value) { if (object instanceof LinkedList) object.set_object_at(index, value);else object[index] = value; } }, { key: '_swap', value: function _swap(A, i, j) { var temp = this._get(A, i); this._set(A, i, this._get(A, j)); this._set(A, j, temp); } }, { key: '_defaultCompareFunction', value: function _defaultCompareFunction(a, b) { return b > a; } }]); return Quicksort; }(); module.exports = Quicksort; /***/ }), /* 26 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; // Singular Value Decomposition implementation function SVD() {}; /* Below singular value decomposition (svd) code including hypot function is adopted from https://github.com/dragonfly-ai/JamaJS Some changes are applied to make the code compatible with the fcose code and to make it independent from Jama. Input matrix is changed to a 2D array instead of Jama matrix. Matrix dimensions are taken according to 2D array instead of using Jama functions. An object that includes singular value components is created for return. The types of input parameters of the hypot function are removed. let is used instead of var for the variable initialization. */ /* Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "{}" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright {yyyy} {name of copyright owner} Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ SVD.svd = function (A) { this.U = null; this.V = null; this.s = null; this.m = 0; this.n = 0; this.m = A.length; this.n = A[0].length; var nu = Math.min(this.m, this.n); this.s = function (s) { var a = []; while (s-- > 0) { a.push(0); }return a; }(Math.min(this.m + 1, this.n)); this.U = function (dims) { var allocate = function allocate(dims) { if (dims.length == 0) { return 0; } else { var array = []; for (var i = 0; i < dims[0]; i++) { array.push(allocate(dims.slice(1))); } return array; } }; return allocate(dims); }([this.m, nu]); this.V = function (dims) { var allocate = function allocate(dims) { if (dims.length == 0) { return 0; } else { var array = []; for (var i = 0; i < dims[0]; i++) { array.push(allocate(dims.slice(1))); } return array; } }; return allocate(dims); }([this.n, this.n]); var e = function (s) { var a = []; while (s-- > 0) { a.push(0); }return a; }(this.n); var work = function (s) { var a = []; while (s-- > 0) { a.push(0); }return a; }(this.m); var wantu = true; var wantv = true; var nct = Math.min(this.m - 1, this.n); var nrt = Math.max(0, Math.min(this.n - 2, this.m)); for (var k = 0; k < Math.max(nct, nrt); k++) { if (k < nct) { this.s[k] = 0; for (var i = k; i < this.m; i++) { this.s[k] = SVD.hypot(this.s[k], A[i][k]); } ; if (this.s[k] !== 0.0) { if (A[k][k] < 0.0) { this.s[k] = -this.s[k]; } for (var _i = k; _i < this.m; _i++) { A[_i][k] /= this.s[k]; } ; A[k][k] += 1.0; } this.s[k] = -this.s[k]; } for (var j = k + 1; j < this.n; j++) { if (function (lhs, rhs) { return lhs && rhs; }(k < nct, this.s[k] !== 0.0)) { var t = 0; for (var _i2 = k; _i2 < this.m; _i2++) { t += A[_i2][k] * A[_i2][j]; } ; t = -t / A[k][k]; for (var _i3 = k; _i3 < this.m; _i3++) { A[_i3][j] += t * A[_i3][k]; } ; } e[j] = A[k][j]; } ; if (function (lhs, rhs) { return lhs && rhs; }(wantu, k < nct)) { for (var _i4 = k; _i4 < this.m; _i4++) { this.U[_i4][k] = A[_i4][k]; } ; } if (k < nrt) { e[k] = 0; for (var _i5 = k + 1; _i5 < this.n; _i5++) { e[k] = SVD.hypot(e[k], e[_i5]); } ; if (e[k] !== 0.0) { if (e[k + 1] < 0.0) { e[k] = -e[k]; } for (var _i6 = k + 1; _i6 < this.n; _i6++) { e[_i6] /= e[k]; } ; e[k + 1] += 1.0; } e[k] = -e[k]; if (function (lhs, rhs) { return lhs && rhs; }(k + 1 < this.m, e[k] !== 0.0)) { for (var _i7 = k + 1; _i7 < this.m; _i7++) { work[_i7] = 0.0; } ; for (var _j = k + 1; _j < this.n; _j++) { for (var _i8 = k + 1; _i8 < this.m; _i8++) { work[_i8] += e[_j] * A[_i8][_j]; } ; } ; for (var _j2 = k + 1; _j2 < this.n; _j2++) { var _t = -e[_j2] / e[k + 1]; for (var _i9 = k + 1; _i9 < this.m; _i9++) { A[_i9][_j2] += _t * work[_i9]; } ; } ; } if (wantv) { for (var _i10 = k + 1; _i10 < this.n; _i10++) { this.V[_i10][k] = e[_i10]; }; } } }; var p = Math.min(this.n, this.m + 1); if (nct < this.n) { this.s[nct] = A[nct][nct]; } if (this.m < p) { this.s[p - 1] = 0.0; } if (nrt + 1 < p) { e[nrt] = A[nrt][p - 1]; } e[p - 1] = 0.0; if (wantu) { for (var _j3 = nct; _j3 < nu; _j3++) { for (var _i11 = 0; _i11 < this.m; _i11++) { this.U[_i11][_j3] = 0.0; } ; this.U[_j3][_j3] = 1.0; }; for (var _k = nct - 1; _k >= 0; _k--) { if (this.s[_k] !== 0.0) { for (var _j4 = _k + 1; _j4 < nu; _j4++) { var _t2 = 0; for (var _i12 = _k; _i12 < this.m; _i12++) { _t2 += this.U[_i12][_k] * this.U[_i12][_j4]; }; _t2 = -_t2 / this.U[_k][_k]; for (var _i13 = _k; _i13 < this.m; _i13++) { this.U[_i13][_j4] += _t2 * this.U[_i13][_k]; }; }; for (var _i14 = _k; _i14 < this.m; _i14++) { this.U[_i14][_k] = -this.U[_i14][_k]; }; this.U[_k][_k] = 1.0 + this.U[_k][_k]; for (var _i15 = 0; _i15 < _k - 1; _i15++) { this.U[_i15][_k] = 0.0; }; } else { for (var _i16 = 0; _i16 < this.m; _i16++) { this.U[_i16][_k] = 0.0; }; this.U[_k][_k] = 1.0; } }; } if (wantv) { for (var _k2 = this.n - 1; _k2 >= 0; _k2--) { if (function (lhs, rhs) { return lhs && rhs; }(_k2 < nrt, e[_k2] !== 0.0)) { for (var _j5 = _k2 + 1; _j5 < nu; _j5++) { var _t3 = 0; for (var _i17 = _k2 + 1; _i17 < this.n; _i17++) { _t3 += this.V[_i17][_k2] * this.V[_i17][_j5]; }; _t3 = -_t3 / this.V[_k2 + 1][_k2]; for (var _i18 = _k2 + 1; _i18 < this.n; _i18++) { this.V[_i18][_j5] += _t3 * this.V[_i18][_k2]; }; }; } for (var _i19 = 0; _i19 < this.n; _i19++) { this.V[_i19][_k2] = 0.0; }; this.V[_k2][_k2] = 1.0; }; } var pp = p - 1; var iter = 0; var eps = Math.pow(2.0, -52.0); var tiny = Math.pow(2.0, -966.0); while (p > 0) { var _k3 = void 0; var kase = void 0; for (_k3 = p - 2; _k3 >= -1; _k3--) { if (_k3 === -1) { break; } if (Math.abs(e[_k3]) <= tiny + eps * (Math.abs(this.s[_k3]) + Math.abs(this.s[_k3 + 1]))) { e[_k3] = 0.0; break; } }; if (_k3 === p - 2) { kase = 4; } else { var ks = void 0; for (ks = p - 1; ks >= _k3; ks--) { if (ks === _k3) { break; } var _t4 = (ks !== p ? Math.abs(e[ks]) : 0.0) + (ks !== _k3 + 1 ? Math.abs(e[ks - 1]) : 0.0); if (Math.abs(this.s[ks]) <= tiny + eps * _t4) { this.s[ks] = 0.0; break; } }; if (ks === _k3) { kase = 3; } else if (ks === p - 1) { kase = 1; } else { kase = 2; _k3 = ks; } } _k3++; switch (kase) { case 1: { var f = e[p - 2]; e[p - 2] = 0.0; for (var _j6 = p - 2; _j6 >= _k3; _j6--) { var _t5 = SVD.hypot(this.s[_j6], f); var cs = this.s[_j6] / _t5; var sn = f / _t5; this.s[_j6] = _t5; if (_j6 !== _k3) { f = -sn * e[_j6 - 1]; e[_j6 - 1] = cs * e[_j6 - 1]; } if (wantv) { for (var _i20 = 0; _i20 < this.n; _i20++) { _t5 = cs * this.V[_i20][_j6] + sn * this.V[_i20][p - 1]; this.V[_i20][p - 1] = -sn * this.V[_i20][_j6] + cs * this.V[_i20][p - 1]; this.V[_i20][_j6] = _t5; }; } }; }; break; case 2: { var _f = e[_k3 - 1]; e[_k3 - 1] = 0.0; for (var _j7 = _k3; _j7 < p; _j7++) { var _t6 = SVD.hypot(this.s[_j7], _f); var _cs = this.s[_j7] / _t6; var _sn = _f / _t6; this.s[_j7] = _t6; _f = -_sn * e[_j7]; e[_j7] = _cs * e[_j7]; if (wantu) { for (var _i21 = 0; _i21 < this.m; _i21++) { _t6 = _cs * this.U[_i21][_j7] + _sn * this.U[_i21][_k3 - 1]; this.U[_i21][_k3 - 1] = -_sn * this.U[_i21][_j7] + _cs * this.U[_i21][_k3 - 1]; this.U[_i21][_j7] = _t6; }; } }; }; break; case 3: { var scale = Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[p - 1]), Math.abs(this.s[p - 2])), Math.abs(e[p - 2])), Math.abs(this.s[_k3])), Math.abs(e[_k3])); var sp = this.s[p - 1] / scale; var spm1 = this.s[p - 2] / scale; var epm1 = e[p - 2] / scale; var sk = this.s[_k3] / scale; var ek = e[_k3] / scale; var b = ((spm1 + sp) * (spm1 - sp) + epm1 * epm1) / 2.0; var c = sp * epm1 * (sp * epm1); var shift = 0.0; if (function (lhs, rhs) { return lhs || rhs; }(b !== 0.0, c !== 0.0)) { shift = Math.sqrt(b * b + c); if (b < 0.0) { shift = -shift; } shift = c / (b + shift); } var _f2 = (sk + sp) * (sk - sp) + shift; var g = sk * ek; for (var _j8 = _k3; _j8 < p - 1; _j8++) { var _t7 = SVD.hypot(_f2, g); var _cs2 = _f2 / _t7; var _sn2 = g / _t7; if (_j8 !== _k3) { e[_j8 - 1] = _t7; } _f2 = _cs2 * this.s[_j8] + _sn2 * e[_j8]; e[_j8] = _cs2 * e[_j8] - _sn2 * this.s[_j8]; g = _sn2 * this.s[_j8 + 1]; this.s[_j8 + 1] = _cs2 * this.s[_j8 + 1]; if (wantv) { for (var _i22 = 0; _i22 < this.n; _i22++) { _t7 = _cs2 * this.V[_i22][_j8] + _sn2 * this.V[_i22][_j8 + 1]; this.V[_i22][_j8 + 1] = -_sn2 * this.V[_i22][_j8] + _cs2 * this.V[_i22][_j8 + 1]; this.V[_i22][_j8] = _t7; }; } _t7 = SVD.hypot(_f2, g); _cs2 = _f2 / _t7; _sn2 = g / _t7; this.s[_j8] = _t7; _f2 = _cs2 * e[_j8] + _sn2 * this.s[_j8 + 1]; this.s[_j8 + 1] = -_sn2 * e[_j8] + _cs2 * this.s[_j8 + 1]; g = _sn2 * e[_j8 + 1]; e[_j8 + 1] = _cs2 * e[_j8 + 1]; if (wantu && _j8 < this.m - 1) { for (var _i23 = 0; _i23 < this.m; _i23++) { _t7 = _cs2 * this.U[_i23][_j8] + _sn2 * this.U[_i23][_j8 + 1]; this.U[_i23][_j8 + 1] = -_sn2 * this.U[_i23][_j8] + _cs2 * this.U[_i23][_j8 + 1]; this.U[_i23][_j8] = _t7; }; } }; e[p - 2] = _f2; iter = iter + 1; }; break; case 4: { if (this.s[_k3] <= 0.0) { this.s[_k3] = this.s[_k3] < 0.0 ? -this.s[_k3] : 0.0; if (wantv) { for (var _i24 = 0; _i24 <= pp; _i24++) { this.V[_i24][_k3] = -this.V[_i24][_k3]; }; } } while (_k3 < pp) { if (this.s[_k3] >= this.s[_k3 + 1]) { break; } var _t8 = this.s[_k3]; this.s[_k3] = this.s[_k3 + 1]; this.s[_k3 + 1] = _t8; if (wantv && _k3 < this.n - 1) { for (var _i25 = 0; _i25 < this.n; _i25++) { _t8 = this.V[_i25][_k3 + 1]; this.V[_i25][_k3 + 1] = this.V[_i25][_k3]; this.V[_i25][_k3] = _t8; }; } if (wantu && _k3 < this.m - 1) { for (var _i26 = 0; _i26 < this.m; _i26++) { _t8 = this.U[_i26][_k3 + 1]; this.U[_i26][_k3 + 1] = this.U[_i26][_k3]; this.U[_i26][_k3] = _t8; }; } _k3++; }; iter = 0; p--; }; break; } }; var result = { U: this.U, V: this.V, S: this.s }; return result; }; // sqrt(a^2 + b^2) without under/overflow. SVD.hypot = function (a, b) { var r = void 0; if (Math.abs(a) > Math.abs(b)) { r = b / a; r = Math.abs(a) * Math.sqrt(1 + r * r); } else if (b != 0) { r = a / b; r = Math.abs(b) * Math.sqrt(1 + r * r); } else { r = 0.0; } return r; }; module.exports = SVD; /***/ }), /* 27 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } /** * Needleman-Wunsch algorithm is an procedure to compute the optimal global alignment of two string * sequences by S.B.Needleman and C.D.Wunsch (1970). * * Aside from the inputs, you can assign the scores for, * - Match: The two characters at the current index are same. * - Mismatch: The two characters at the current index are different. * - Insertion/Deletion(gaps): The best alignment involves one letter aligning to a gap in the other string. */ var NeedlemanWunsch = function () { function NeedlemanWunsch(sequence1, sequence2) { var match_score = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1; var mismatch_penalty = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : -1; var gap_penalty = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : -1; _classCallCheck(this, NeedlemanWunsch); this.sequence1 = sequence1; this.sequence2 = sequence2; this.match_score = match_score; this.mismatch_penalty = mismatch_penalty; this.gap_penalty = gap_penalty; // Just the remove redundancy this.iMax = sequence1.length + 1; this.jMax = sequence2.length + 1; // Grid matrix of scores this.grid = new Array(this.iMax); for (var i = 0; i < this.iMax; i++) { this.grid[i] = new Array(this.jMax); for (var j = 0; j < this.jMax; j++) { this.grid[i][j] = 0; } } // Traceback matrix (2D array, each cell is an array of boolean values for [`Diag`, `Up`, `Left`] positions) this.tracebackGrid = new Array(this.iMax); for (var _i = 0; _i < this.iMax; _i++) { this.tracebackGrid[_i] = new Array(this.jMax); for (var _j = 0; _j < this.jMax; _j++) { this.tracebackGrid[_i][_j] = [null, null, null]; } } // The aligned sequences (return multiple possibilities) this.alignments = []; // Final alignment score this.score = -1; // Calculate scores and tracebacks this.computeGrids(); } _createClass(NeedlemanWunsch, [{ key: "getScore", value: function getScore() { return this.score; } }, { key: "getAlignments", value: function getAlignments() { return this.alignments; } // Main dynamic programming procedure }, { key: "computeGrids", value: function computeGrids() { // Fill in the first row for (var j = 1; j < this.jMax; j++) { this.grid[0][j] = this.grid[0][j - 1] + this.gap_penalty; this.tracebackGrid[0][j] = [false, false, true]; } // Fill in the first column for (var i = 1; i < this.iMax; i++) { this.grid[i][0] = this.grid[i - 1][0] + this.gap_penalty; this.tracebackGrid[i][0] = [false, true, false]; } // Fill the rest of the grid for (var _i2 = 1; _i2 < this.iMax; _i2++) { for (var _j2 = 1; _j2 < this.jMax; _j2++) { // Find the max score(s) among [`Diag`, `Up`, `Left`] var diag = void 0; if (this.sequence1[_i2 - 1] === this.sequence2[_j2 - 1]) diag = this.grid[_i2 - 1][_j2 - 1] + this.match_score;else diag = this.grid[_i2 - 1][_j2 - 1] + this.mismatch_penalty; var up = this.grid[_i2 - 1][_j2] + this.gap_penalty; var left = this.grid[_i2][_j2 - 1] + this.gap_penalty; // If there exists multiple max values, capture them for multiple paths var maxOf = [diag, up, left]; var indices = this.arrayAllMaxIndexes(maxOf); // Update Grids this.grid[_i2][_j2] = maxOf[indices[0]]; this.tracebackGrid[_i2][_j2] = [indices.includes(0), indices.includes(1), indices.includes(2)]; } } // Update alignment score this.score = this.grid[this.iMax - 1][this.jMax - 1]; } // Gets all possible valid sequence combinations }, { key: "alignmentTraceback", value: function alignmentTraceback() { var inProcessAlignments = []; inProcessAlignments.push({ pos: [this.sequence1.length, this.sequence2.length], seq1: "", seq2: "" }); while (inProcessAlignments[0]) { var current = inProcessAlignments[0]; var directions = this.tracebackGrid[current.pos[0]][current.pos[1]]; if (directions[0]) { inProcessAlignments.push({ pos: [current.pos[0] - 1, current.pos[1] - 1], seq1: this.sequence1[current.pos[0] - 1] + current.seq1, seq2: this.sequence2[current.pos[1] - 1] + current.seq2 }); } if (directions[1]) { inProcessAlignments.push({ pos: [current.pos[0] - 1, current.pos[1]], seq1: this.sequence1[current.pos[0] - 1] + current.seq1, seq2: '-' + current.seq2 }); } if (directions[2]) { inProcessAlignments.push({ pos: [current.pos[0], current.pos[1] - 1], seq1: '-' + current.seq1, seq2: this.sequence2[current.pos[1] - 1] + current.seq2 }); } if (current.pos[0] === 0 && current.pos[1] === 0) this.alignments.push({ sequence1: current.seq1, sequence2: current.seq2 }); inProcessAlignments.shift(); } return this.alignments; } // Helper Functions }, { key: "getAllIndexes", value: function getAllIndexes(arr, val) { var indexes = [], i = -1; while ((i = arr.indexOf(val, i + 1)) !== -1) { indexes.push(i); } return indexes; } }, { key: "arrayAllMaxIndexes", value: function arrayAllMaxIndexes(array) { return this.getAllIndexes(array, Math.max.apply(null, array)); } }]); return NeedlemanWunsch; }(); module.exports = NeedlemanWunsch; /***/ }), /* 28 */ /***/ (function(module, exports, __nested_webpack_require_145732__) { "use strict"; var layoutBase = function layoutBase() { return; }; layoutBase.FDLayout = __nested_webpack_require_145732__(18); layoutBase.FDLayoutConstants = __nested_webpack_require_145732__(4); layoutBase.FDLayoutEdge = __nested_webpack_require_145732__(19); layoutBase.FDLayoutNode = __nested_webpack_require_145732__(20); layoutBase.DimensionD = __nested_webpack_require_145732__(21); layoutBase.HashMap = __nested_webpack_require_145732__(22); layoutBase.HashSet = __nested_webpack_require_145732__(23); layoutBase.IGeometry = __nested_webpack_require_145732__(8); layoutBase.IMath = __nested_webpack_require_145732__(9); layoutBase.Integer = __nested_webpack_require_145732__(10); layoutBase.Point = __nested_webpack_require_145732__(12); layoutBase.PointD = __nested_webpack_require_145732__(5); layoutBase.RandomSeed = __nested_webpack_require_145732__(16); layoutBase.RectangleD = __nested_webpack_require_145732__(13); layoutBase.Transform = __nested_webpack_require_145732__(17); layoutBase.UniqueIDGeneretor = __nested_webpack_require_145732__(14); layoutBase.Quicksort = __nested_webpack_require_145732__(25); layoutBase.LinkedList = __nested_webpack_require_145732__(11); layoutBase.LGraphObject = __nested_webpack_require_145732__(2); layoutBase.LGraph = __nested_webpack_require_145732__(6); layoutBase.LEdge = __nested_webpack_require_145732__(1); layoutBase.LGraphManager = __nested_webpack_require_145732__(7); layoutBase.LNode = __nested_webpack_require_145732__(3); layoutBase.Layout = __nested_webpack_require_145732__(15); layoutBase.LayoutConstants = __nested_webpack_require_145732__(0); layoutBase.NeedlemanWunsch = __nested_webpack_require_145732__(27); layoutBase.Matrix = __nested_webpack_require_145732__(24); layoutBase.SVD = __nested_webpack_require_145732__(26); module.exports = layoutBase; /***/ }), /* 29 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; function Emitter() { this.listeners = []; } var p = Emitter.prototype; p.addListener = function (event, callback) { this.listeners.push({ event: event, callback: callback }); }; p.removeListener = function (event, callback) { for (var i = this.listeners.length; i >= 0; i--) { var l = this.listeners[i]; if (l.event === event && l.callback === callback) { this.listeners.splice(i, 1); } } }; p.emit = function (event, data) { for (var i = 0; i < this.listeners.length; i++) { var l = this.listeners[i]; if (event === l.event) { l.callback(data); } } }; module.exports = Emitter; /***/ }) /******/ ]); }); /***/ }), /***/ "./node_modules/lodash.curry/index.js": /*!********************************************!*\ !*** ./node_modules/lodash.curry/index.js ***! \********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { /** * lodash (Custom Build) * Build: `lodash modularize exports="npm" -o ./` * Copyright jQuery Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */ /** Used as the `TypeError` message for "Functions" methods. */ var FUNC_ERROR_TEXT = 'Expected a function'; /** Used as the internal argument placeholder. */ var PLACEHOLDER = '__lodash_placeholder__'; /** Used to compose bitmasks for function metadata. */ var BIND_FLAG = 1, BIND_KEY_FLAG = 2, CURRY_BOUND_FLAG = 4, CURRY_FLAG = 8, CURRY_RIGHT_FLAG = 16, PARTIAL_FLAG = 32, PARTIAL_RIGHT_FLAG = 64, ARY_FLAG = 128, REARG_FLAG = 256, FLIP_FLAG = 512; /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0, MAX_SAFE_INTEGER = 9007199254740991, MAX_INTEGER = 1.7976931348623157e+308, NAN = 0 / 0; /** Used to associate wrap methods with their bit flags. */ var wrapFlags = [ ['ary', ARY_FLAG], ['bind', BIND_FLAG], ['bindKey', BIND_KEY_FLAG], ['curry', CURRY_FLAG], ['curryRight', CURRY_RIGHT_FLAG], ['flip', FLIP_FLAG], ['partial', PARTIAL_FLAG], ['partialRight', PARTIAL_RIGHT_FLAG], ['rearg', REARG_FLAG] ]; /** `Object#toString` result references. */ var funcTag = '[object Function]', genTag = '[object GeneratorFunction]', symbolTag = '[object Symbol]'; /** * Used to match `RegExp` * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). */ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; /** Used to match leading and trailing whitespace. */ var reTrim = /^\s+|\s+$/g; /** Used to match wrap detail comments. */ var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, reSplitDetails = /,? & /; /** Used to detect bad signed hexadecimal string values. */ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; /** Used to detect binary string values. */ var reIsBinary = /^0b[01]+$/i; /** Used to detect host constructors (Safari). */ var reIsHostCtor = /^\[object .+?Constructor\]$/; /** Used to detect octal string values. */ var reIsOctal = /^0o[0-7]+$/i; /** Used to detect unsigned integer values. */ var reIsUint = /^(?:0|[1-9]\d*)$/; /** Built-in method references without a dependency on `root`. */ var freeParseInt = parseInt; /** Detect free variable `global` from Node.js. */ var freeGlobal = typeof __webpack_require__.g == 'object' && __webpack_require__.g && __webpack_require__.g.Object === Object && __webpack_require__.g; /** Detect free variable `self`. */ var freeSelf = typeof self == 'object' && self && self.Object === Object && self; /** Used as a reference to the global object. */ var root = freeGlobal || freeSelf || Function('return this')(); /** * A faster alternative to `Function#apply`, this function invokes `func` * with the `this` binding of `thisArg` and the arguments of `args`. * * @private * @param {Function} func The function to invoke. * @param {*} thisArg The `this` binding of `func`. * @param {Array} args The arguments to invoke `func` with. * @returns {*} Returns the result of `func`. */ function apply(func, thisArg, args) { switch (args.length) { case 0: return func.call(thisArg); case 1: return func.call(thisArg, args[0]); case 2: return func.call(thisArg, args[0], args[1]); case 3: return func.call(thisArg, args[0], args[1], args[2]); } return func.apply(thisArg, args); } /** * A specialized version of `_.forEach` for arrays without support for * iteratee shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns `array`. */ function arrayEach(array, iteratee) { var index = -1, length = array ? array.length : 0; while (++index < length) { if (iteratee(array[index], index, array) === false) { break; } } return array; } /** * A specialized version of `_.includes` for arrays without support for * specifying an index to search from. * * @private * @param {Array} [array] The array to inspect. * @param {*} target The value to search for. * @returns {boolean} Returns `true` if `target` is found, else `false`. */ function arrayIncludes(array, value) { var length = array ? array.length : 0; return !!length && baseIndexOf(array, value, 0) > -1; } /** * The base implementation of `_.findIndex` and `_.findLastIndex` without * support for iteratee shorthands. * * @private * @param {Array} array The array to inspect. * @param {Function} predicate The function invoked per iteration. * @param {number} fromIndex The index to search from. * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {number} Returns the index of the matched value, else `-1`. */ function baseFindIndex(array, predicate, fromIndex, fromRight) { var length = array.length, index = fromIndex + (fromRight ? 1 : -1); while ((fromRight ? index-- : ++index < length)) { if (predicate(array[index], index, array)) { return index; } } return -1; } /** * The base implementation of `_.indexOf` without `fromIndex` bounds checks. * * @private * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} fromIndex The index to search from. * @returns {number} Returns the index of the matched value, else `-1`. */ function baseIndexOf(array, value, fromIndex) { if (value !== value) { return baseFindIndex(array, baseIsNaN, fromIndex); } var index = fromIndex - 1, length = array.length; while (++index < length) { if (array[index] === value) { return index; } } return -1; } /** * The base implementation of `_.isNaN` without support for number objects. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. */ function baseIsNaN(value) { return value !== value; } /** * Gets the number of `placeholder` occurrences in `array`. * * @private * @param {Array} array The array to inspect. * @param {*} placeholder The placeholder to search for. * @returns {number} Returns the placeholder count. */ function countHolders(array, placeholder) { var length = array.length, result = 0; while (length--) { if (array[length] === placeholder) { result++; } } return result; } /** * Gets the value at `key` of `object`. * * @private * @param {Object} [object] The object to query. * @param {string} key The key of the property to get. * @returns {*} Returns the property value. */ function getValue(object, key) { return object == null ? undefined : object[key]; } /** * Checks if `value` is a host object in IE < 9. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a host object, else `false`. */ function isHostObject(value) { // Many host objects are `Object` objects that can coerce to strings // despite having improperly defined `toString` methods. var result = false; if (value != null && typeof value.toString != 'function') { try { result = !!(value + ''); } catch (e) {} } return result; } /** * Replaces all `placeholder` elements in `array` with an internal placeholder * and returns an array of their indexes. * * @private * @param {Array} array The array to modify. * @param {*} placeholder The placeholder to replace. * @returns {Array} Returns the new array of placeholder indexes. */ function replaceHolders(array, placeholder) { var index = -1, length = array.length, resIndex = 0, result = []; while (++index < length) { var value = array[index]; if (value === placeholder || value === PLACEHOLDER) { array[index] = PLACEHOLDER; result[resIndex++] = index; } } return result; } /** Used for built-in method references. */ var funcProto = Function.prototype, objectProto = Object.prototype; /** Used to detect overreaching core-js shims. */ var coreJsData = root['__core-js_shared__']; /** Used to detect methods masquerading as native. */ var maskSrcKey = (function() { var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); return uid ? ('Symbol(src)_1.' + uid) : ''; }()); /** Used to resolve the decompiled source of functions. */ var funcToString = funcProto.toString; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var objectToString = objectProto.toString; /** Used to detect if a method is native. */ var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' ); /** Built-in value references. */ var objectCreate = Object.create; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax = Math.max, nativeMin = Math.min; /* Used to set `toString` methods. */ var defineProperty = (function() { var func = getNative(Object, 'defineProperty'), name = getNative.name; return (name && name.length > 2) ? func : undefined; }()); /** * The base implementation of `_.create` without support for assigning * properties to the created object. * * @private * @param {Object} prototype The object to inherit from. * @returns {Object} Returns the new object. */ function baseCreate(proto) { return isObject(proto) ? objectCreate(proto) : {}; } /** * The base implementation of `_.isNative` without bad shim checks. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a native function, * else `false`. */ function baseIsNative(value) { if (!isObject(value) || isMasked(value)) { return false; } var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor; return pattern.test(toSource(value)); } /** * Creates an array that is the composition of partially applied arguments, * placeholders, and provided arguments into a single array of arguments. * * @private * @param {Array} args The provided arguments. * @param {Array} partials The arguments to prepend to those provided. * @param {Array} holders The `partials` placeholder indexes. * @params {boolean} [isCurried] Specify composing for a curried function. * @returns {Array} Returns the new array of composed arguments. */ function composeArgs(args, partials, holders, isCurried) { var argsIndex = -1, argsLength = args.length, holdersLength = holders.length, leftIndex = -1, leftLength = partials.length, rangeLength = nativeMax(argsLength - holdersLength, 0), result = Array(leftLength + rangeLength), isUncurried = !isCurried; while (++leftIndex < leftLength) { result[leftIndex] = partials[leftIndex]; } while (++argsIndex < holdersLength) { if (isUncurried || argsIndex < argsLength) { result[holders[argsIndex]] = args[argsIndex]; } } while (rangeLength--) { result[leftIndex++] = args[argsIndex++]; } return result; } /** * This function is like `composeArgs` except that the arguments composition * is tailored for `_.partialRight`. * * @private * @param {Array} args The provided arguments. * @param {Array} partials The arguments to append to those provided. * @param {Array} holders The `partials` placeholder indexes. * @params {boolean} [isCurried] Specify composing for a curried function. * @returns {Array} Returns the new array of composed arguments. */ function composeArgsRight(args, partials, holders, isCurried) { var argsIndex = -1, argsLength = args.length, holdersIndex = -1, holdersLength = holders.length, rightIndex = -1, rightLength = partials.length, rangeLength = nativeMax(argsLength - holdersLength, 0), result = Array(rangeLength + rightLength), isUncurried = !isCurried; while (++argsIndex < rangeLength) { result[argsIndex] = args[argsIndex]; } var offset = argsIndex; while (++rightIndex < rightLength) { result[offset + rightIndex] = partials[rightIndex]; } while (++holdersIndex < holdersLength) { if (isUncurried || argsIndex < argsLength) { result[offset + holders[holdersIndex]] = args[argsIndex++]; } } return result; } /** * Copies the values of `source` to `array`. * * @private * @param {Array} source The array to copy values from. * @param {Array} [array=[]] The array to copy values to. * @returns {Array} Returns `array`. */ function copyArray(source, array) { var index = -1, length = source.length; array || (array = Array(length)); while (++index < length) { array[index] = source[index]; } return array; } /** * Creates a function that wraps `func` to invoke it with the optional `this` * binding of `thisArg`. * * @private * @param {Function} func The function to wrap. * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {*} [thisArg] The `this` binding of `func`. * @returns {Function} Returns the new wrapped function. */ function createBind(func, bitmask, thisArg) { var isBind = bitmask & BIND_FLAG, Ctor = createCtor(func); function wrapper() { var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; return fn.apply(isBind ? thisArg : this, arguments); } return wrapper; } /** * Creates a function that produces an instance of `Ctor` regardless of * whether it was invoked as part of a `new` expression or by `call` or `apply`. * * @private * @param {Function} Ctor The constructor to wrap. * @returns {Function} Returns the new wrapped function. */ function createCtor(Ctor) { return function() { // Use a `switch` statement to work with class constructors. See // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist // for more details. var args = arguments; switch (args.length) { case 0: return new Ctor; case 1: return new Ctor(args[0]); case 2: return new Ctor(args[0], args[1]); case 3: return new Ctor(args[0], args[1], args[2]); case 4: return new Ctor(args[0], args[1], args[2], args[3]); case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); } var thisBinding = baseCreate(Ctor.prototype), result = Ctor.apply(thisBinding, args); // Mimic the constructor's `return` behavior. // See https://es5.github.io/#x13.2.2 for more details. return isObject(result) ? result : thisBinding; }; } /** * Creates a function that wraps `func` to enable currying. * * @private * @param {Function} func The function to wrap. * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {number} arity The arity of `func`. * @returns {Function} Returns the new wrapped function. */ function createCurry(func, bitmask, arity) { var Ctor = createCtor(func); function wrapper() { var length = arguments.length, args = Array(length), index = length, placeholder = getHolder(wrapper); while (index--) { args[index] = arguments[index]; } var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder) ? [] : replaceHolders(args, placeholder); length -= holders.length; if (length < arity) { return createRecurry( func, bitmask, createHybrid, wrapper.placeholder, undefined, args, holders, undefined, undefined, arity - length); } var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; return apply(fn, this, args); } return wrapper; } /** * Creates a function that wraps `func` to invoke it with optional `this` * binding of `thisArg`, partial application, and currying. * * @private * @param {Function|string} func The function or method name to wrap. * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {*} [thisArg] The `this` binding of `func`. * @param {Array} [partials] The arguments to prepend to those provided to * the new function. * @param {Array} [holders] The `partials` placeholder indexes. * @param {Array} [partialsRight] The arguments to append to those provided * to the new function. * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. * @param {Array} [argPos] The argument positions of the new function. * @param {number} [ary] The arity cap of `func`. * @param {number} [arity] The arity of `func`. * @returns {Function} Returns the new wrapped function. */ function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { var isAry = bitmask & ARY_FLAG, isBind = bitmask & BIND_FLAG, isBindKey = bitmask & BIND_KEY_FLAG, isCurried = bitmask & (CURRY_FLAG | CURRY_RIGHT_FLAG), isFlip = bitmask & FLIP_FLAG, Ctor = isBindKey ? undefined : createCtor(func); function wrapper() { var length = arguments.length, args = Array(length), index = length; while (index--) { args[index] = arguments[index]; } if (isCurried) { var placeholder = getHolder(wrapper), holdersCount = countHolders(args, placeholder); } if (partials) { args = composeArgs(args, partials, holders, isCurried); } if (partialsRight) { args = composeArgsRight(args, partialsRight, holdersRight, isCurried); } length -= holdersCount; if (isCurried && length < arity) { var newHolders = replaceHolders(args, placeholder); return createRecurry( func, bitmask, createHybrid, wrapper.placeholder, thisArg, args, newHolders, argPos, ary, arity - length ); } var thisBinding = isBind ? thisArg : this, fn = isBindKey ? thisBinding[func] : func; length = args.length; if (argPos) { args = reorder(args, argPos); } else if (isFlip && length > 1) { args.reverse(); } if (isAry && ary < length) { args.length = ary; } if (this && this !== root && this instanceof wrapper) { fn = Ctor || createCtor(fn); } return fn.apply(thisBinding, args); } return wrapper; } /** * Creates a function that wraps `func` to invoke it with the `this` binding * of `thisArg` and `partials` prepended to the arguments it receives. * * @private * @param {Function} func The function to wrap. * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {*} thisArg The `this` binding of `func`. * @param {Array} partials The arguments to prepend to those provided to * the new function. * @returns {Function} Returns the new wrapped function. */ function createPartial(func, bitmask, thisArg, partials) { var isBind = bitmask & BIND_FLAG, Ctor = createCtor(func); function wrapper() { var argsIndex = -1, argsLength = arguments.length, leftIndex = -1, leftLength = partials.length, args = Array(leftLength + argsLength), fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; while (++leftIndex < leftLength) { args[leftIndex] = partials[leftIndex]; } while (argsLength--) { args[leftIndex++] = arguments[++argsIndex]; } return apply(fn, isBind ? thisArg : this, args); } return wrapper; } /** * Creates a function that wraps `func` to continue currying. * * @private * @param {Function} func The function to wrap. * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @param {Function} wrapFunc The function to create the `func` wrapper. * @param {*} placeholder The placeholder value. * @param {*} [thisArg] The `this` binding of `func`. * @param {Array} [partials] The arguments to prepend to those provided to * the new function. * @param {Array} [holders] The `partials` placeholder indexes. * @param {Array} [argPos] The argument positions of the new function. * @param {number} [ary] The arity cap of `func`. * @param {number} [arity] The arity of `func`. * @returns {Function} Returns the new wrapped function. */ function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) { var isCurry = bitmask & CURRY_FLAG, newHolders = isCurry ? holders : undefined, newHoldersRight = isCurry ? undefined : holders, newPartials = isCurry ? partials : undefined, newPartialsRight = isCurry ? undefined : partials; bitmask |= (isCurry ? PARTIAL_FLAG : PARTIAL_RIGHT_FLAG); bitmask &= ~(isCurry ? PARTIAL_RIGHT_FLAG : PARTIAL_FLAG); if (!(bitmask & CURRY_BOUND_FLAG)) { bitmask &= ~(BIND_FLAG | BIND_KEY_FLAG); } var result = wrapFunc(func, bitmask, thisArg, newPartials, newHolders, newPartialsRight, newHoldersRight, argPos, ary, arity); result.placeholder = placeholder; return setWrapToString(result, func, bitmask); } /** * Creates a function that either curries or invokes `func` with optional * `this` binding and partially applied arguments. * * @private * @param {Function|string} func The function or method name to wrap. * @param {number} bitmask The bitmask flags. * The bitmask may be composed of the following flags: * 1 - `_.bind` * 2 - `_.bindKey` * 4 - `_.curry` or `_.curryRight` of a bound function * 8 - `_.curry` * 16 - `_.curryRight` * 32 - `_.partial` * 64 - `_.partialRight` * 128 - `_.rearg` * 256 - `_.ary` * 512 - `_.flip` * @param {*} [thisArg] The `this` binding of `func`. * @param {Array} [partials] The arguments to be partially applied. * @param {Array} [holders] The `partials` placeholder indexes. * @param {Array} [argPos] The argument positions of the new function. * @param {number} [ary] The arity cap of `func`. * @param {number} [arity] The arity of `func`. * @returns {Function} Returns the new wrapped function. */ function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { var isBindKey = bitmask & BIND_KEY_FLAG; if (!isBindKey && typeof func != 'function') { throw new TypeError(FUNC_ERROR_TEXT); } var length = partials ? partials.length : 0; if (!length) { bitmask &= ~(PARTIAL_FLAG | PARTIAL_RIGHT_FLAG); partials = holders = undefined; } ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0); arity = arity === undefined ? arity : toInteger(arity); length -= holders ? holders.length : 0; if (bitmask & PARTIAL_RIGHT_FLAG) { var partialsRight = partials, holdersRight = holders; partials = holders = undefined; } var newData = [ func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity ]; func = newData[0]; bitmask = newData[1]; thisArg = newData[2]; partials = newData[3]; holders = newData[4]; arity = newData[9] = newData[9] == null ? (isBindKey ? 0 : func.length) : nativeMax(newData[9] - length, 0); if (!arity && bitmask & (CURRY_FLAG | CURRY_RIGHT_FLAG)) { bitmask &= ~(CURRY_FLAG | CURRY_RIGHT_FLAG); } if (!bitmask || bitmask == BIND_FLAG) { var result = createBind(func, bitmask, thisArg); } else if (bitmask == CURRY_FLAG || bitmask == CURRY_RIGHT_FLAG) { result = createCurry(func, bitmask, arity); } else if ((bitmask == PARTIAL_FLAG || bitmask == (BIND_FLAG | PARTIAL_FLAG)) && !holders.length) { result = createPartial(func, bitmask, thisArg, partials); } else { result = createHybrid.apply(undefined, newData); } return setWrapToString(result, func, bitmask); } /** * Gets the argument placeholder value for `func`. * * @private * @param {Function} func The function to inspect. * @returns {*} Returns the placeholder value. */ function getHolder(func) { var object = func; return object.placeholder; } /** * Gets the native function at `key` of `object`. * * @private * @param {Object} object The object to query. * @param {string} key The key of the method to get. * @returns {*} Returns the function if it's native, else `undefined`. */ function getNative(object, key) { var value = getValue(object, key); return baseIsNative(value) ? value : undefined; } /** * Extracts wrapper details from the `source` body comment. * * @private * @param {string} source The source to inspect. * @returns {Array} Returns the wrapper details. */ function getWrapDetails(source) { var match = source.match(reWrapDetails); return match ? match[1].split(reSplitDetails) : []; } /** * Inserts wrapper `details` in a comment at the top of the `source` body. * * @private * @param {string} source The source to modify. * @returns {Array} details The details to insert. * @returns {string} Returns the modified source. */ function insertWrapDetails(source, details) { var length = details.length, lastIndex = length - 1; details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex]; details = details.join(length > 2 ? ', ' : ' '); return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n'); } /** * Checks if `value` is a valid array-like index. * * @private * @param {*} value The value to check. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. */ function isIndex(value, length) { length = length == null ? MAX_SAFE_INTEGER : length; return !!length && (typeof value == 'number' || reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length); } /** * Checks if `func` has its source masked. * * @private * @param {Function} func The function to check. * @returns {boolean} Returns `true` if `func` is masked, else `false`. */ function isMasked(func) { return !!maskSrcKey && (maskSrcKey in func); } /** * Reorder `array` according to the specified indexes where the element at * the first index is assigned as the first element, the element at * the second index is assigned as the second element, and so on. * * @private * @param {Array} array The array to reorder. * @param {Array} indexes The arranged array indexes. * @returns {Array} Returns `array`. */ function reorder(array, indexes) { var arrLength = array.length, length = nativeMin(indexes.length, arrLength), oldArray = copyArray(array); while (length--) { var index = indexes[length]; array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; } return array; } /** * Sets the `toString` method of `wrapper` to mimic the source of `reference` * with wrapper details in a comment at the top of the source body. * * @private * @param {Function} wrapper The function to modify. * @param {Function} reference The reference function. * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @returns {Function} Returns `wrapper`. */ var setWrapToString = !defineProperty ? identity : function(wrapper, reference, bitmask) { var source = (reference + ''); return defineProperty(wrapper, 'toString', { 'configurable': true, 'enumerable': false, 'value': constant(insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask))) }); }; /** * Converts `func` to its source code. * * @private * @param {Function} func The function to process. * @returns {string} Returns the source code. */ function toSource(func) { if (func != null) { try { return funcToString.call(func); } catch (e) {} try { return (func + ''); } catch (e) {} } return ''; } /** * Updates wrapper `details` based on `bitmask` flags. * * @private * @returns {Array} details The details to modify. * @param {number} bitmask The bitmask flags. See `createWrap` for more details. * @returns {Array} Returns `details`. */ function updateWrapDetails(details, bitmask) { arrayEach(wrapFlags, function(pair) { var value = '_.' + pair[0]; if ((bitmask & pair[1]) && !arrayIncludes(details, value)) { details.push(value); } }); return details.sort(); } /** * Creates a function that accepts arguments of `func` and either invokes * `func` returning its result, if at least `arity` number of arguments have * been provided, or returns a function that accepts the remaining `func` * arguments, and so on. The arity of `func` may be specified if `func.length` * is not sufficient. * * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds, * may be used as a placeholder for provided arguments. * * **Note:** This method doesn't set the "length" property of curried functions. * * @static * @memberOf _ * @since 2.0.0 * @category Function * @param {Function} func The function to curry. * @param {number} [arity=func.length] The arity of `func`. * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. * @returns {Function} Returns the new curried function. * @example * * var abc = function(a, b, c) { * return [a, b, c]; * }; * * var curried = _.curry(abc); * * curried(1)(2)(3); * // => [1, 2, 3] * * curried(1, 2)(3); * // => [1, 2, 3] * * curried(1, 2, 3); * // => [1, 2, 3] * * // Curried with placeholders. * curried(1)(_, 3)(2); * // => [1, 2, 3] */ function curry(func, arity, guard) { arity = guard ? undefined : arity; var result = createWrap(func, CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity); result.placeholder = curry.placeholder; return result; } /** * Checks if `value` is classified as a `Function` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a function, else `false`. * @example * * _.isFunction(_); * // => true * * _.isFunction(/abc/); * // => false */ function isFunction(value) { // The use of `Object#toString` avoids issues with the `typeof` operator // in Safari 8-9 which returns 'object' for typed array and other constructors. var tag = isObject(value) ? objectToString.call(value) : ''; return tag == funcTag || tag == genTag; } /** * Checks if `value` is the * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an object, else `false`. * @example * * _.isObject({}); * // => true * * _.isObject([1, 2, 3]); * // => true * * _.isObject(_.noop); * // => true * * _.isObject(null); * // => false */ function isObject(value) { var type = typeof value; return !!value && (type == 'object' || type == 'function'); } /** * Checks if `value` is object-like. A value is object-like if it's not `null` * and has a `typeof` result of "object". * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is object-like, else `false`. * @example * * _.isObjectLike({}); * // => true * * _.isObjectLike([1, 2, 3]); * // => true * * _.isObjectLike(_.noop); * // => false * * _.isObjectLike(null); * // => false */ function isObjectLike(value) { return !!value && typeof value == 'object'; } /** * Checks if `value` is classified as a `Symbol` primitive or object. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. * @example * * _.isSymbol(Symbol.iterator); * // => true * * _.isSymbol('abc'); * // => false */ function isSymbol(value) { return typeof value == 'symbol' || (isObjectLike(value) && objectToString.call(value) == symbolTag); } /** * Converts `value` to a finite number. * * @static * @memberOf _ * @since 4.12.0 * @category Lang * @param {*} value The value to convert. * @returns {number} Returns the converted number. * @example * * _.toFinite(3.2); * // => 3.2 * * _.toFinite(Number.MIN_VALUE); * // => 5e-324 * * _.toFinite(Infinity); * // => 1.7976931348623157e+308 * * _.toFinite('3.2'); * // => 3.2 */ function toFinite(value) { if (!value) { return value === 0 ? value : 0; } value = toNumber(value); if (value === INFINITY || value === -INFINITY) { var sign = (value < 0 ? -1 : 1); return sign * MAX_INTEGER; } return value === value ? value : 0; } /** * Converts `value` to an integer. * * **Note:** This method is loosely based on * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to convert. * @returns {number} Returns the converted integer. * @example * * _.toInteger(3.2); * // => 3 * * _.toInteger(Number.MIN_VALUE); * // => 0 * * _.toInteger(Infinity); * // => 1.7976931348623157e+308 * * _.toInteger('3.2'); * // => 3 */ function toInteger(value) { var result = toFinite(value), remainder = result % 1; return result === result ? (remainder ? result - remainder : result) : 0; } /** * Converts `value` to a number. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to process. * @returns {number} Returns the number. * @example * * _.toNumber(3.2); * // => 3.2 * * _.toNumber(Number.MIN_VALUE); * // => 5e-324 * * _.toNumber(Infinity); * // => Infinity * * _.toNumber('3.2'); * // => 3.2 */ function toNumber(value) { if (typeof value == 'number') { return value; } if (isSymbol(value)) { return NAN; } if (isObject(value)) { var other = typeof value.valueOf == 'function' ? value.valueOf() : value; value = isObject(other) ? (other + '') : other; } if (typeof value != 'string') { return value === 0 ? value : +value; } value = value.replace(reTrim, ''); var isBinary = reIsBinary.test(value); return (isBinary || reIsOctal.test(value)) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : (reIsBadHex.test(value) ? NAN : +value); } /** * Creates a function that returns `value`. * * @static * @memberOf _ * @since 2.4.0 * @category Util * @param {*} value The value to return from the new function. * @returns {Function} Returns the new constant function. * @example * * var objects = _.times(2, _.constant({ 'a': 1 })); * * console.log(objects); * // => [{ 'a': 1 }, { 'a': 1 }] * * console.log(objects[0] === objects[1]); * // => true */ function constant(value) { return function() { return value; }; } /** * This method returns the first argument it receives. * * @static * @since 0.1.0 * @memberOf _ * @category Util * @param {*} value Any value. * @returns {*} Returns `value`. * @example * * var object = { 'a': 1 }; * * console.log(_.identity(object) === object); * // => true */ function identity(value) { return value; } // Assign default placeholders. curry.placeholder = {}; module.exports = curry; /***/ }), /***/ "./node_modules/lodash/_DataView.js": /*!******************************************!*\ !*** ./node_modules/lodash/_DataView.js ***! \******************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var getNative = __webpack_require__(/*! ./_getNative */ "./node_modules/lodash/_getNative.js"), root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js"); /* Built-in method references that are verified to be native. */ var DataView = getNative(root, 'DataView'); module.exports = DataView; /***/ }), /***/ "./node_modules/lodash/_Hash.js": /*!**************************************!*\ !*** ./node_modules/lodash/_Hash.js ***! \**************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var hashClear = __webpack_require__(/*! ./_hashClear */ "./node_modules/lodash/_hashClear.js"), hashDelete = __webpack_require__(/*! ./_hashDelete */ "./node_modules/lodash/_hashDelete.js"), hashGet = __webpack_require__(/*! ./_hashGet */ "./node_modules/lodash/_hashGet.js"), hashHas = __webpack_require__(/*! ./_hashHas */ "./node_modules/lodash/_hashHas.js"), hashSet = __webpack_require__(/*! ./_hashSet */ "./node_modules/lodash/_hashSet.js"); /** * Creates a hash object. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function Hash(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `Hash`. Hash.prototype.clear = hashClear; Hash.prototype['delete'] = hashDelete; Hash.prototype.get = hashGet; Hash.prototype.has = hashHas; Hash.prototype.set = hashSet; module.exports = Hash; /***/ }), /***/ "./node_modules/lodash/_ListCache.js": /*!*******************************************!*\ !*** ./node_modules/lodash/_ListCache.js ***! \*******************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var listCacheClear = __webpack_require__(/*! ./_listCacheClear */ "./node_modules/lodash/_listCacheClear.js"), listCacheDelete = __webpack_require__(/*! ./_listCacheDelete */ "./node_modules/lodash/_listCacheDelete.js"), listCacheGet = __webpack_require__(/*! ./_listCacheGet */ "./node_modules/lodash/_listCacheGet.js"), listCacheHas = __webpack_require__(/*! ./_listCacheHas */ "./node_modules/lodash/_listCacheHas.js"), listCacheSet = __webpack_require__(/*! ./_listCacheSet */ "./node_modules/lodash/_listCacheSet.js"); /** * Creates an list cache object. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function ListCache(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `ListCache`. ListCache.prototype.clear = listCacheClear; ListCache.prototype['delete'] = listCacheDelete; ListCache.prototype.get = listCacheGet; ListCache.prototype.has = listCacheHas; ListCache.prototype.set = listCacheSet; module.exports = ListCache; /***/ }), /***/ "./node_modules/lodash/_Map.js": /*!*************************************!*\ !*** ./node_modules/lodash/_Map.js ***! \*************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var getNative = __webpack_require__(/*! ./_getNative */ "./node_modules/lodash/_getNative.js"), root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js"); /* Built-in method references that are verified to be native. */ var Map = getNative(root, 'Map'); module.exports = Map; /***/ }), /***/ "./node_modules/lodash/_MapCache.js": /*!******************************************!*\ !*** ./node_modules/lodash/_MapCache.js ***! \******************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var mapCacheClear = __webpack_require__(/*! ./_mapCacheClear */ "./node_modules/lodash/_mapCacheClear.js"), mapCacheDelete = __webpack_require__(/*! ./_mapCacheDelete */ "./node_modules/lodash/_mapCacheDelete.js"), mapCacheGet = __webpack_require__(/*! ./_mapCacheGet */ "./node_modules/lodash/_mapCacheGet.js"), mapCacheHas = __webpack_require__(/*! ./_mapCacheHas */ "./node_modules/lodash/_mapCacheHas.js"), mapCacheSet = __webpack_require__(/*! ./_mapCacheSet */ "./node_modules/lodash/_mapCacheSet.js"); /** * Creates a map cache object to store key-value pairs. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function MapCache(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `MapCache`. MapCache.prototype.clear = mapCacheClear; MapCache.prototype['delete'] = mapCacheDelete; MapCache.prototype.get = mapCacheGet; MapCache.prototype.has = mapCacheHas; MapCache.prototype.set = mapCacheSet; module.exports = MapCache; /***/ }), /***/ "./node_modules/lodash/_Promise.js": /*!*****************************************!*\ !*** ./node_modules/lodash/_Promise.js ***! \*****************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var getNative = __webpack_require__(/*! ./_getNative */ "./node_modules/lodash/_getNative.js"), root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js"); /* Built-in method references that are verified to be native. */ var Promise = getNative(root, 'Promise'); module.exports = Promise; /***/ }), /***/ "./node_modules/lodash/_Set.js": /*!*************************************!*\ !*** ./node_modules/lodash/_Set.js ***! \*************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var getNative = __webpack_require__(/*! ./_getNative */ "./node_modules/lodash/_getNative.js"), root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js"); /* Built-in method references that are verified to be native. */ var Set = getNative(root, 'Set'); module.exports = Set; /***/ }), /***/ "./node_modules/lodash/_SetCache.js": /*!******************************************!*\ !*** ./node_modules/lodash/_SetCache.js ***! \******************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var MapCache = __webpack_require__(/*! ./_MapCache */ "./node_modules/lodash/_MapCache.js"), setCacheAdd = __webpack_require__(/*! ./_setCacheAdd */ "./node_modules/lodash/_setCacheAdd.js"), setCacheHas = __webpack_require__(/*! ./_setCacheHas */ "./node_modules/lodash/_setCacheHas.js"); /** * * Creates an array cache object to store unique values. * * @private * @constructor * @param {Array} [values] The values to cache. */ function SetCache(values) { var index = -1, length = values == null ? 0 : values.length; this.__data__ = new MapCache; while (++index < length) { this.add(values[index]); } } // Add methods to `SetCache`. SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; SetCache.prototype.has = setCacheHas; module.exports = SetCache; /***/ }), /***/ "./node_modules/lodash/_Stack.js": /*!***************************************!*\ !*** ./node_modules/lodash/_Stack.js ***! \***************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var ListCache = __webpack_require__(/*! ./_ListCache */ "./node_modules/lodash/_ListCache.js"), stackClear = __webpack_require__(/*! ./_stackClear */ "./node_modules/lodash/_stackClear.js"), stackDelete = __webpack_require__(/*! ./_stackDelete */ "./node_modules/lodash/_stackDelete.js"), stackGet = __webpack_require__(/*! ./_stackGet */ "./node_modules/lodash/_stackGet.js"), stackHas = __webpack_require__(/*! ./_stackHas */ "./node_modules/lodash/_stackHas.js"), stackSet = __webpack_require__(/*! ./_stackSet */ "./node_modules/lodash/_stackSet.js"); /** * Creates a stack cache object to store key-value pairs. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function Stack(entries) { var data = this.__data__ = new ListCache(entries); this.size = data.size; } // Add methods to `Stack`. Stack.prototype.clear = stackClear; Stack.prototype['delete'] = stackDelete; Stack.prototype.get = stackGet; Stack.prototype.has = stackHas; Stack.prototype.set = stackSet; module.exports = Stack; /***/ }), /***/ "./node_modules/lodash/_Symbol.js": /*!****************************************!*\ !*** ./node_modules/lodash/_Symbol.js ***! \****************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js"); /** Built-in value references. */ var Symbol = root.Symbol; module.exports = Symbol; /***/ }), /***/ "./node_modules/lodash/_Uint8Array.js": /*!********************************************!*\ !*** ./node_modules/lodash/_Uint8Array.js ***! \********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js"); /** Built-in value references. */ var Uint8Array = root.Uint8Array; module.exports = Uint8Array; /***/ }), /***/ "./node_modules/lodash/_WeakMap.js": /*!*****************************************!*\ !*** ./node_modules/lodash/_WeakMap.js ***! \*****************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var getNative = __webpack_require__(/*! ./_getNative */ "./node_modules/lodash/_getNative.js"), root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js"); /* Built-in method references that are verified to be native. */ var WeakMap = getNative(root, 'WeakMap'); module.exports = WeakMap; /***/ }), /***/ "./node_modules/lodash/_apply.js": /*!***************************************!*\ !*** ./node_modules/lodash/_apply.js ***! \***************************************/ /***/ (function(module) { /** * A faster alternative to `Function#apply`, this function invokes `func` * with the `this` binding of `thisArg` and the arguments of `args`. * * @private * @param {Function} func The function to invoke. * @param {*} thisArg The `this` binding of `func`. * @param {Array} args The arguments to invoke `func` with. * @returns {*} Returns the result of `func`. */ function apply(func, thisArg, args) { switch (args.length) { case 0: return func.call(thisArg); case 1: return func.call(thisArg, args[0]); case 2: return func.call(thisArg, args[0], args[1]); case 3: return func.call(thisArg, args[0], args[1], args[2]); } return func.apply(thisArg, args); } module.exports = apply; /***/ }), /***/ "./node_modules/lodash/_arrayEach.js": /*!*******************************************!*\ !*** ./node_modules/lodash/_arrayEach.js ***! \*******************************************/ /***/ (function(module) { /** * A specialized version of `_.forEach` for arrays without support for * iteratee shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns `array`. */ function arrayEach(array, iteratee) { var index = -1, length = array == null ? 0 : array.length; while (++index < length) { if (iteratee(array[index], index, array) === false) { break; } } return array; } module.exports = arrayEach; /***/ }), /***/ "./node_modules/lodash/_arrayFilter.js": /*!*********************************************!*\ !*** ./node_modules/lodash/_arrayFilter.js ***! \*********************************************/ /***/ (function(module) { /** * A specialized version of `_.filter` for arrays without support for * iteratee shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {Array} Returns the new filtered array. */ function arrayFilter(array, predicate) { var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = []; while (++index < length) { var value = array[index]; if (predicate(value, index, array)) { result[resIndex++] = value; } } return result; } module.exports = arrayFilter; /***/ }), /***/ "./node_modules/lodash/_arrayIncludes.js": /*!***********************************************!*\ !*** ./node_modules/lodash/_arrayIncludes.js ***! \***********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseIndexOf = __webpack_require__(/*! ./_baseIndexOf */ "./node_modules/lodash/_baseIndexOf.js"); /** * A specialized version of `_.includes` for arrays without support for * specifying an index to search from. * * @private * @param {Array} [array] The array to inspect. * @param {*} target The value to search for. * @returns {boolean} Returns `true` if `target` is found, else `false`. */ function arrayIncludes(array, value) { var length = array == null ? 0 : array.length; return !!length && baseIndexOf(array, value, 0) > -1; } module.exports = arrayIncludes; /***/ }), /***/ "./node_modules/lodash/_arrayIncludesWith.js": /*!***************************************************!*\ !*** ./node_modules/lodash/_arrayIncludesWith.js ***! \***************************************************/ /***/ (function(module) { /** * This function is like `arrayIncludes` except that it accepts a comparator. * * @private * @param {Array} [array] The array to inspect. * @param {*} target The value to search for. * @param {Function} comparator The comparator invoked per element. * @returns {boolean} Returns `true` if `target` is found, else `false`. */ function arrayIncludesWith(array, value, comparator) { var index = -1, length = array == null ? 0 : array.length; while (++index < length) { if (comparator(value, array[index])) { return true; } } return false; } module.exports = arrayIncludesWith; /***/ }), /***/ "./node_modules/lodash/_arrayLikeKeys.js": /*!***********************************************!*\ !*** ./node_modules/lodash/_arrayLikeKeys.js ***! \***********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseTimes = __webpack_require__(/*! ./_baseTimes */ "./node_modules/lodash/_baseTimes.js"), isArguments = __webpack_require__(/*! ./isArguments */ "./node_modules/lodash/isArguments.js"), isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"), isBuffer = __webpack_require__(/*! ./isBuffer */ "./node_modules/lodash/isBuffer.js"), isIndex = __webpack_require__(/*! ./_isIndex */ "./node_modules/lodash/_isIndex.js"), isTypedArray = __webpack_require__(/*! ./isTypedArray */ "./node_modules/lodash/isTypedArray.js"); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Creates an array of the enumerable property names of the array-like `value`. * * @private * @param {*} value The value to query. * @param {boolean} inherited Specify returning inherited property names. * @returns {Array} Returns the array of property names. */ function arrayLikeKeys(value, inherited) { var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length; for (var key in value) { if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && ( // Safari 9 has enumerable `arguments.length` in strict mode. key == 'length' || // Node.js 0.10 has enumerable non-index properties on buffers. (isBuff && (key == 'offset' || key == 'parent')) || // PhantomJS 2 has enumerable non-index properties on typed arrays. (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || // Skip index properties. isIndex(key, length) ))) { result.push(key); } } return result; } module.exports = arrayLikeKeys; /***/ }), /***/ "./node_modules/lodash/_arrayMap.js": /*!******************************************!*\ !*** ./node_modules/lodash/_arrayMap.js ***! \******************************************/ /***/ (function(module) { /** * A specialized version of `_.map` for arrays without support for iteratee * shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the new mapped array. */ function arrayMap(array, iteratee) { var index = -1, length = array == null ? 0 : array.length, result = Array(length); while (++index < length) { result[index] = iteratee(array[index], index, array); } return result; } module.exports = arrayMap; /***/ }), /***/ "./node_modules/lodash/_arrayPush.js": /*!*******************************************!*\ !*** ./node_modules/lodash/_arrayPush.js ***! \*******************************************/ /***/ (function(module) { /** * Appends the elements of `values` to `array`. * * @private * @param {Array} array The array to modify. * @param {Array} values The values to append. * @returns {Array} Returns `array`. */ function arrayPush(array, values) { var index = -1, length = values.length, offset = array.length; while (++index < length) { array[offset + index] = values[index]; } return array; } module.exports = arrayPush; /***/ }), /***/ "./node_modules/lodash/_arrayReduce.js": /*!*********************************************!*\ !*** ./node_modules/lodash/_arrayReduce.js ***! \*********************************************/ /***/ (function(module) { /** * A specialized version of `_.reduce` for arrays without support for * iteratee shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @param {*} [accumulator] The initial value. * @param {boolean} [initAccum] Specify using the first element of `array` as * the initial value. * @returns {*} Returns the accumulated value. */ function arrayReduce(array, iteratee, accumulator, initAccum) { var index = -1, length = array == null ? 0 : array.length; if (initAccum && length) { accumulator = array[++index]; } while (++index < length) { accumulator = iteratee(accumulator, array[index], index, array); } return accumulator; } module.exports = arrayReduce; /***/ }), /***/ "./node_modules/lodash/_arraySome.js": /*!*******************************************!*\ !*** ./node_modules/lodash/_arraySome.js ***! \*******************************************/ /***/ (function(module) { /** * A specialized version of `_.some` for arrays without support for iteratee * shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {boolean} Returns `true` if any element passes the predicate check, * else `false`. */ function arraySome(array, predicate) { var index = -1, length = array == null ? 0 : array.length; while (++index < length) { if (predicate(array[index], index, array)) { return true; } } return false; } module.exports = arraySome; /***/ }), /***/ "./node_modules/lodash/_asciiSize.js": /*!*******************************************!*\ !*** ./node_modules/lodash/_asciiSize.js ***! \*******************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseProperty = __webpack_require__(/*! ./_baseProperty */ "./node_modules/lodash/_baseProperty.js"); /** * Gets the size of an ASCII `string`. * * @private * @param {string} string The string inspect. * @returns {number} Returns the string size. */ var asciiSize = baseProperty('length'); module.exports = asciiSize; /***/ }), /***/ "./node_modules/lodash/_assignMergeValue.js": /*!**************************************************!*\ !*** ./node_modules/lodash/_assignMergeValue.js ***! \**************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseAssignValue = __webpack_require__(/*! ./_baseAssignValue */ "./node_modules/lodash/_baseAssignValue.js"), eq = __webpack_require__(/*! ./eq */ "./node_modules/lodash/eq.js"); /** * This function is like `assignValue` except that it doesn't assign * `undefined` values. * * @private * @param {Object} object The object to modify. * @param {string} key The key of the property to assign. * @param {*} value The value to assign. */ function assignMergeValue(object, key, value) { if ((value !== undefined && !eq(object[key], value)) || (value === undefined && !(key in object))) { baseAssignValue(object, key, value); } } module.exports = assignMergeValue; /***/ }), /***/ "./node_modules/lodash/_assignValue.js": /*!*********************************************!*\ !*** ./node_modules/lodash/_assignValue.js ***! \*********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseAssignValue = __webpack_require__(/*! ./_baseAssignValue */ "./node_modules/lodash/_baseAssignValue.js"), eq = __webpack_require__(/*! ./eq */ "./node_modules/lodash/eq.js"); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Assigns `value` to `key` of `object` if the existing value is not equivalent * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. * * @private * @param {Object} object The object to modify. * @param {string} key The key of the property to assign. * @param {*} value The value to assign. */ function assignValue(object, key, value) { var objValue = object[key]; if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || (value === undefined && !(key in object))) { baseAssignValue(object, key, value); } } module.exports = assignValue; /***/ }), /***/ "./node_modules/lodash/_assocIndexOf.js": /*!**********************************************!*\ !*** ./node_modules/lodash/_assocIndexOf.js ***! \**********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var eq = __webpack_require__(/*! ./eq */ "./node_modules/lodash/eq.js"); /** * Gets the index at which the `key` is found in `array` of key-value pairs. * * @private * @param {Array} array The array to inspect. * @param {*} key The key to search for. * @returns {number} Returns the index of the matched value, else `-1`. */ function assocIndexOf(array, key) { var length = array.length; while (length--) { if (eq(array[length][0], key)) { return length; } } return -1; } module.exports = assocIndexOf; /***/ }), /***/ "./node_modules/lodash/_baseAssign.js": /*!********************************************!*\ !*** ./node_modules/lodash/_baseAssign.js ***! \********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var copyObject = __webpack_require__(/*! ./_copyObject */ "./node_modules/lodash/_copyObject.js"), keys = __webpack_require__(/*! ./keys */ "./node_modules/lodash/keys.js"); /** * The base implementation of `_.assign` without support for multiple sources * or `customizer` functions. * * @private * @param {Object} object The destination object. * @param {Object} source The source object. * @returns {Object} Returns `object`. */ function baseAssign(object, source) { return object && copyObject(source, keys(source), object); } module.exports = baseAssign; /***/ }), /***/ "./node_modules/lodash/_baseAssignIn.js": /*!**********************************************!*\ !*** ./node_modules/lodash/_baseAssignIn.js ***! \**********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var copyObject = __webpack_require__(/*! ./_copyObject */ "./node_modules/lodash/_copyObject.js"), keysIn = __webpack_require__(/*! ./keysIn */ "./node_modules/lodash/keysIn.js"); /** * The base implementation of `_.assignIn` without support for multiple sources * or `customizer` functions. * * @private * @param {Object} object The destination object. * @param {Object} source The source object. * @returns {Object} Returns `object`. */ function baseAssignIn(object, source) { return object && copyObject(source, keysIn(source), object); } module.exports = baseAssignIn; /***/ }), /***/ "./node_modules/lodash/_baseAssignValue.js": /*!*************************************************!*\ !*** ./node_modules/lodash/_baseAssignValue.js ***! \*************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var defineProperty = __webpack_require__(/*! ./_defineProperty */ "./node_modules/lodash/_defineProperty.js"); /** * The base implementation of `assignValue` and `assignMergeValue` without * value checks. * * @private * @param {Object} object The object to modify. * @param {string} key The key of the property to assign. * @param {*} value The value to assign. */ function baseAssignValue(object, key, value) { if (key == '__proto__' && defineProperty) { defineProperty(object, key, { 'configurable': true, 'enumerable': true, 'value': value, 'writable': true }); } else { object[key] = value; } } module.exports = baseAssignValue; /***/ }), /***/ "./node_modules/lodash/_baseClone.js": /*!*******************************************!*\ !*** ./node_modules/lodash/_baseClone.js ***! \*******************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var Stack = __webpack_require__(/*! ./_Stack */ "./node_modules/lodash/_Stack.js"), arrayEach = __webpack_require__(/*! ./_arrayEach */ "./node_modules/lodash/_arrayEach.js"), assignValue = __webpack_require__(/*! ./_assignValue */ "./node_modules/lodash/_assignValue.js"), baseAssign = __webpack_require__(/*! ./_baseAssign */ "./node_modules/lodash/_baseAssign.js"), baseAssignIn = __webpack_require__(/*! ./_baseAssignIn */ "./node_modules/lodash/_baseAssignIn.js"), cloneBuffer = __webpack_require__(/*! ./_cloneBuffer */ "./node_modules/lodash/_cloneBuffer.js"), copyArray = __webpack_require__(/*! ./_copyArray */ "./node_modules/lodash/_copyArray.js"), copySymbols = __webpack_require__(/*! ./_copySymbols */ "./node_modules/lodash/_copySymbols.js"), copySymbolsIn = __webpack_require__(/*! ./_copySymbolsIn */ "./node_modules/lodash/_copySymbolsIn.js"), getAllKeys = __webpack_require__(/*! ./_getAllKeys */ "./node_modules/lodash/_getAllKeys.js"), getAllKeysIn = __webpack_require__(/*! ./_getAllKeysIn */ "./node_modules/lodash/_getAllKeysIn.js"), getTag = __webpack_require__(/*! ./_getTag */ "./node_modules/lodash/_getTag.js"), initCloneArray = __webpack_require__(/*! ./_initCloneArray */ "./node_modules/lodash/_initCloneArray.js"), initCloneByTag = __webpack_require__(/*! ./_initCloneByTag */ "./node_modules/lodash/_initCloneByTag.js"), initCloneObject = __webpack_require__(/*! ./_initCloneObject */ "./node_modules/lodash/_initCloneObject.js"), isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"), isBuffer = __webpack_require__(/*! ./isBuffer */ "./node_modules/lodash/isBuffer.js"), isMap = __webpack_require__(/*! ./isMap */ "./node_modules/lodash/isMap.js"), isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"), isSet = __webpack_require__(/*! ./isSet */ "./node_modules/lodash/isSet.js"), keys = __webpack_require__(/*! ./keys */ "./node_modules/lodash/keys.js"), keysIn = __webpack_require__(/*! ./keysIn */ "./node_modules/lodash/keysIn.js"); /** Used to compose bitmasks for cloning. */ var CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG = 4; /** `Object#toString` result references. */ var argsTag = '[object Arguments]', arrayTag = '[object Array]', boolTag = '[object Boolean]', dateTag = '[object Date]', errorTag = '[object Error]', funcTag = '[object Function]', genTag = '[object GeneratorFunction]', mapTag = '[object Map]', numberTag = '[object Number]', objectTag = '[object Object]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', symbolTag = '[object Symbol]', weakMapTag = '[object WeakMap]'; var arrayBufferTag = '[object ArrayBuffer]', dataViewTag = '[object DataView]', float32Tag = '[object Float32Array]', float64Tag = '[object Float64Array]', int8Tag = '[object Int8Array]', int16Tag = '[object Int16Array]', int32Tag = '[object Int32Array]', uint8Tag = '[object Uint8Array]', uint8ClampedTag = '[object Uint8ClampedArray]', uint16Tag = '[object Uint16Array]', uint32Tag = '[object Uint32Array]'; /** Used to identify `toStringTag` values supported by `_.clone`. */ var cloneableTags = {}; cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false; /** * The base implementation of `_.clone` and `_.cloneDeep` which tracks * traversed objects. * * @private * @param {*} value The value to clone. * @param {boolean} bitmask The bitmask flags. * 1 - Deep clone * 2 - Flatten inherited properties * 4 - Clone symbols * @param {Function} [customizer] The function to customize cloning. * @param {string} [key] The key of `value`. * @param {Object} [object] The parent object of `value`. * @param {Object} [stack] Tracks traversed objects and their clone counterparts. * @returns {*} Returns the cloned value. */ function baseClone(value, bitmask, customizer, key, object, stack) { var result, isDeep = bitmask & CLONE_DEEP_FLAG, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG; if (customizer) { result = object ? customizer(value, key, object, stack) : customizer(value); } if (result !== undefined) { return result; } if (!isObject(value)) { return value; } var isArr = isArray(value); if (isArr) { result = initCloneArray(value); if (!isDeep) { return copyArray(value, result); } } else { var tag = getTag(value), isFunc = tag == funcTag || tag == genTag; if (isBuffer(value)) { return cloneBuffer(value, isDeep); } if (tag == objectTag || tag == argsTag || (isFunc && !object)) { result = (isFlat || isFunc) ? {} : initCloneObject(value); if (!isDeep) { return isFlat ? copySymbolsIn(value, baseAssignIn(result, value)) : copySymbols(value, baseAssign(result, value)); } } else { if (!cloneableTags[tag]) { return object ? value : {}; } result = initCloneByTag(value, tag, isDeep); } } // Check for circular references and return its corresponding clone. stack || (stack = new Stack); var stacked = stack.get(value); if (stacked) { return stacked; } stack.set(value, result); if (isSet(value)) { value.forEach(function(subValue) { result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); }); } else if (isMap(value)) { value.forEach(function(subValue, key) { result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); }); } var keysFunc = isFull ? (isFlat ? getAllKeysIn : getAllKeys) : (isFlat ? keysIn : keys); var props = isArr ? undefined : keysFunc(value); arrayEach(props || value, function(subValue, key) { if (props) { key = subValue; subValue = value[key]; } // Recursively populate clone (susceptible to call stack limits). assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); }); return result; } module.exports = baseClone; /***/ }), /***/ "./node_modules/lodash/_baseCreate.js": /*!********************************************!*\ !*** ./node_modules/lodash/_baseCreate.js ***! \********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"); /** Built-in value references. */ var objectCreate = Object.create; /** * The base implementation of `_.create` without support for assigning * properties to the created object. * * @private * @param {Object} proto The object to inherit from. * @returns {Object} Returns the new object. */ var baseCreate = (function() { function object() {} return function(proto) { if (!isObject(proto)) { return {}; } if (objectCreate) { return objectCreate(proto); } object.prototype = proto; var result = new object; object.prototype = undefined; return result; }; }()); module.exports = baseCreate; /***/ }), /***/ "./node_modules/lodash/_baseEach.js": /*!******************************************!*\ !*** ./node_modules/lodash/_baseEach.js ***! \******************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseForOwn = __webpack_require__(/*! ./_baseForOwn */ "./node_modules/lodash/_baseForOwn.js"), createBaseEach = __webpack_require__(/*! ./_createBaseEach */ "./node_modules/lodash/_createBaseEach.js"); /** * The base implementation of `_.forEach` without support for iteratee shorthands. * * @private * @param {Array|Object} collection The collection to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array|Object} Returns `collection`. */ var baseEach = createBaseEach(baseForOwn); module.exports = baseEach; /***/ }), /***/ "./node_modules/lodash/_baseExtremum.js": /*!**********************************************!*\ !*** ./node_modules/lodash/_baseExtremum.js ***! \**********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var isSymbol = __webpack_require__(/*! ./isSymbol */ "./node_modules/lodash/isSymbol.js"); /** * The base implementation of methods like `_.max` and `_.min` which accepts a * `comparator` to determine the extremum value. * * @private * @param {Array} array The array to iterate over. * @param {Function} iteratee The iteratee invoked per iteration. * @param {Function} comparator The comparator used to compare values. * @returns {*} Returns the extremum value. */ function baseExtremum(array, iteratee, comparator) { var index = -1, length = array.length; while (++index < length) { var value = array[index], current = iteratee(value); if (current != null && (computed === undefined ? (current === current && !isSymbol(current)) : comparator(current, computed) )) { var computed = current, result = value; } } return result; } module.exports = baseExtremum; /***/ }), /***/ "./node_modules/lodash/_baseFilter.js": /*!********************************************!*\ !*** ./node_modules/lodash/_baseFilter.js ***! \********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseEach = __webpack_require__(/*! ./_baseEach */ "./node_modules/lodash/_baseEach.js"); /** * The base implementation of `_.filter` without support for iteratee shorthands. * * @private * @param {Array|Object} collection The collection to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {Array} Returns the new filtered array. */ function baseFilter(collection, predicate) { var result = []; baseEach(collection, function(value, index, collection) { if (predicate(value, index, collection)) { result.push(value); } }); return result; } module.exports = baseFilter; /***/ }), /***/ "./node_modules/lodash/_baseFindIndex.js": /*!***********************************************!*\ !*** ./node_modules/lodash/_baseFindIndex.js ***! \***********************************************/ /***/ (function(module) { /** * The base implementation of `_.findIndex` and `_.findLastIndex` without * support for iteratee shorthands. * * @private * @param {Array} array The array to inspect. * @param {Function} predicate The function invoked per iteration. * @param {number} fromIndex The index to search from. * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {number} Returns the index of the matched value, else `-1`. */ function baseFindIndex(array, predicate, fromIndex, fromRight) { var length = array.length, index = fromIndex + (fromRight ? 1 : -1); while ((fromRight ? index-- : ++index < length)) { if (predicate(array[index], index, array)) { return index; } } return -1; } module.exports = baseFindIndex; /***/ }), /***/ "./node_modules/lodash/_baseFlatten.js": /*!*********************************************!*\ !*** ./node_modules/lodash/_baseFlatten.js ***! \*********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var arrayPush = __webpack_require__(/*! ./_arrayPush */ "./node_modules/lodash/_arrayPush.js"), isFlattenable = __webpack_require__(/*! ./_isFlattenable */ "./node_modules/lodash/_isFlattenable.js"); /** * The base implementation of `_.flatten` with support for restricting flattening. * * @private * @param {Array} array The array to flatten. * @param {number} depth The maximum recursion depth. * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. * @param {Array} [result=[]] The initial result value. * @returns {Array} Returns the new flattened array. */ function baseFlatten(array, depth, predicate, isStrict, result) { var index = -1, length = array.length; predicate || (predicate = isFlattenable); result || (result = []); while (++index < length) { var value = array[index]; if (depth > 0 && predicate(value)) { if (depth > 1) { // Recursively flatten arrays (susceptible to call stack limits). baseFlatten(value, depth - 1, predicate, isStrict, result); } else { arrayPush(result, value); } } else if (!isStrict) { result[result.length] = value; } } return result; } module.exports = baseFlatten; /***/ }), /***/ "./node_modules/lodash/_baseFor.js": /*!*****************************************!*\ !*** ./node_modules/lodash/_baseFor.js ***! \*****************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var createBaseFor = __webpack_require__(/*! ./_createBaseFor */ "./node_modules/lodash/_createBaseFor.js"); /** * The base implementation of `baseForOwn` which iterates over `object` * properties returned by `keysFunc` and invokes `iteratee` for each property. * Iteratee functions may exit iteration early by explicitly returning `false`. * * @private * @param {Object} object The object to iterate over. * @param {Function} iteratee The function invoked per iteration. * @param {Function} keysFunc The function to get the keys of `object`. * @returns {Object} Returns `object`. */ var baseFor = createBaseFor(); module.exports = baseFor; /***/ }), /***/ "./node_modules/lodash/_baseForOwn.js": /*!********************************************!*\ !*** ./node_modules/lodash/_baseForOwn.js ***! \********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseFor = __webpack_require__(/*! ./_baseFor */ "./node_modules/lodash/_baseFor.js"), keys = __webpack_require__(/*! ./keys */ "./node_modules/lodash/keys.js"); /** * The base implementation of `_.forOwn` without support for iteratee shorthands. * * @private * @param {Object} object The object to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Object} Returns `object`. */ function baseForOwn(object, iteratee) { return object && baseFor(object, iteratee, keys); } module.exports = baseForOwn; /***/ }), /***/ "./node_modules/lodash/_baseGet.js": /*!*****************************************!*\ !*** ./node_modules/lodash/_baseGet.js ***! \*****************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var castPath = __webpack_require__(/*! ./_castPath */ "./node_modules/lodash/_castPath.js"), toKey = __webpack_require__(/*! ./_toKey */ "./node_modules/lodash/_toKey.js"); /** * The base implementation of `_.get` without support for default values. * * @private * @param {Object} object The object to query. * @param {Array|string} path The path of the property to get. * @returns {*} Returns the resolved value. */ function baseGet(object, path) { path = castPath(path, object); var index = 0, length = path.length; while (object != null && index < length) { object = object[toKey(path[index++])]; } return (index && index == length) ? object : undefined; } module.exports = baseGet; /***/ }), /***/ "./node_modules/lodash/_baseGetAllKeys.js": /*!************************************************!*\ !*** ./node_modules/lodash/_baseGetAllKeys.js ***! \************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var arrayPush = __webpack_require__(/*! ./_arrayPush */ "./node_modules/lodash/_arrayPush.js"), isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"); /** * The base implementation of `getAllKeys` and `getAllKeysIn` which uses * `keysFunc` and `symbolsFunc` to get the enumerable property names and * symbols of `object`. * * @private * @param {Object} object The object to query. * @param {Function} keysFunc The function to get the keys of `object`. * @param {Function} symbolsFunc The function to get the symbols of `object`. * @returns {Array} Returns the array of property names and symbols. */ function baseGetAllKeys(object, keysFunc, symbolsFunc) { var result = keysFunc(object); return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); } module.exports = baseGetAllKeys; /***/ }), /***/ "./node_modules/lodash/_baseGetTag.js": /*!********************************************!*\ !*** ./node_modules/lodash/_baseGetTag.js ***! \********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js"), getRawTag = __webpack_require__(/*! ./_getRawTag */ "./node_modules/lodash/_getRawTag.js"), objectToString = __webpack_require__(/*! ./_objectToString */ "./node_modules/lodash/_objectToString.js"); /** `Object#toString` result references. */ var nullTag = '[object Null]', undefinedTag = '[object Undefined]'; /** Built-in value references. */ var symToStringTag = Symbol ? Symbol.toStringTag : undefined; /** * The base implementation of `getTag` without fallbacks for buggy environments. * * @private * @param {*} value The value to query. * @returns {string} Returns the `toStringTag`. */ function baseGetTag(value) { if (value == null) { return value === undefined ? undefinedTag : nullTag; } return (symToStringTag && symToStringTag in Object(value)) ? getRawTag(value) : objectToString(value); } module.exports = baseGetTag; /***/ }), /***/ "./node_modules/lodash/_baseGt.js": /*!****************************************!*\ !*** ./node_modules/lodash/_baseGt.js ***! \****************************************/ /***/ (function(module) { /** * The base implementation of `_.gt` which doesn't coerce arguments. * * @private * @param {*} value The value to compare. * @param {*} other The other value to compare. * @returns {boolean} Returns `true` if `value` is greater than `other`, * else `false`. */ function baseGt(value, other) { return value > other; } module.exports = baseGt; /***/ }), /***/ "./node_modules/lodash/_baseHas.js": /*!*****************************************!*\ !*** ./node_modules/lodash/_baseHas.js ***! \*****************************************/ /***/ (function(module) { /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * The base implementation of `_.has` without support for deep paths. * * @private * @param {Object} [object] The object to query. * @param {Array|string} key The key to check. * @returns {boolean} Returns `true` if `key` exists, else `false`. */ function baseHas(object, key) { return object != null && hasOwnProperty.call(object, key); } module.exports = baseHas; /***/ }), /***/ "./node_modules/lodash/_baseHasIn.js": /*!*******************************************!*\ !*** ./node_modules/lodash/_baseHasIn.js ***! \*******************************************/ /***/ (function(module) { /** * The base implementation of `_.hasIn` without support for deep paths. * * @private * @param {Object} [object] The object to query. * @param {Array|string} key The key to check. * @returns {boolean} Returns `true` if `key` exists, else `false`. */ function baseHasIn(object, key) { return object != null && key in Object(object); } module.exports = baseHasIn; /***/ }), /***/ "./node_modules/lodash/_baseIndexOf.js": /*!*********************************************!*\ !*** ./node_modules/lodash/_baseIndexOf.js ***! \*********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseFindIndex = __webpack_require__(/*! ./_baseFindIndex */ "./node_modules/lodash/_baseFindIndex.js"), baseIsNaN = __webpack_require__(/*! ./_baseIsNaN */ "./node_modules/lodash/_baseIsNaN.js"), strictIndexOf = __webpack_require__(/*! ./_strictIndexOf */ "./node_modules/lodash/_strictIndexOf.js"); /** * The base implementation of `_.indexOf` without `fromIndex` bounds checks. * * @private * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} fromIndex The index to search from. * @returns {number} Returns the index of the matched value, else `-1`. */ function baseIndexOf(array, value, fromIndex) { return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex); } module.exports = baseIndexOf; /***/ }), /***/ "./node_modules/lodash/_baseIsArguments.js": /*!*************************************************!*\ !*** ./node_modules/lodash/_baseIsArguments.js ***! \*************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"), isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js"); /** `Object#toString` result references. */ var argsTag = '[object Arguments]'; /** * The base implementation of `_.isArguments`. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an `arguments` object, */ function baseIsArguments(value) { return isObjectLike(value) && baseGetTag(value) == argsTag; } module.exports = baseIsArguments; /***/ }), /***/ "./node_modules/lodash/_baseIsEqual.js": /*!*********************************************!*\ !*** ./node_modules/lodash/_baseIsEqual.js ***! \*********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseIsEqualDeep = __webpack_require__(/*! ./_baseIsEqualDeep */ "./node_modules/lodash/_baseIsEqualDeep.js"), isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js"); /** * The base implementation of `_.isEqual` which supports partial comparisons * and tracks traversed objects. * * @private * @param {*} value The value to compare. * @param {*} other The other value to compare. * @param {boolean} bitmask The bitmask flags. * 1 - Unordered comparison * 2 - Partial comparison * @param {Function} [customizer] The function to customize comparisons. * @param {Object} [stack] Tracks traversed `value` and `other` objects. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. */ function baseIsEqual(value, other, bitmask, customizer, stack) { if (value === other) { return true; } if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { return value !== value && other !== other; } return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); } module.exports = baseIsEqual; /***/ }), /***/ "./node_modules/lodash/_baseIsEqualDeep.js": /*!*************************************************!*\ !*** ./node_modules/lodash/_baseIsEqualDeep.js ***! \*************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var Stack = __webpack_require__(/*! ./_Stack */ "./node_modules/lodash/_Stack.js"), equalArrays = __webpack_require__(/*! ./_equalArrays */ "./node_modules/lodash/_equalArrays.js"), equalByTag = __webpack_require__(/*! ./_equalByTag */ "./node_modules/lodash/_equalByTag.js"), equalObjects = __webpack_require__(/*! ./_equalObjects */ "./node_modules/lodash/_equalObjects.js"), getTag = __webpack_require__(/*! ./_getTag */ "./node_modules/lodash/_getTag.js"), isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"), isBuffer = __webpack_require__(/*! ./isBuffer */ "./node_modules/lodash/isBuffer.js"), isTypedArray = __webpack_require__(/*! ./isTypedArray */ "./node_modules/lodash/isTypedArray.js"); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1; /** `Object#toString` result references. */ var argsTag = '[object Arguments]', arrayTag = '[object Array]', objectTag = '[object Object]'; /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * A specialized version of `baseIsEqual` for arrays and objects which performs * deep comparisons and tracks traversed objects enabling objects with circular * references to be compared. * * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} [stack] Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other); objTag = objTag == argsTag ? objectTag : objTag; othTag = othTag == argsTag ? objectTag : othTag; var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag; if (isSameTag && isBuffer(object)) { if (!isBuffer(other)) { return false; } objIsArr = true; objIsObj = false; } if (isSameTag && !objIsObj) { stack || (stack = new Stack); return (objIsArr || isTypedArray(object)) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); } if (!(bitmask & COMPARE_PARTIAL_FLAG)) { var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); if (objIsWrapped || othIsWrapped) { var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other; stack || (stack = new Stack); return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); } } if (!isSameTag) { return false; } stack || (stack = new Stack); return equalObjects(object, other, bitmask, customizer, equalFunc, stack); } module.exports = baseIsEqualDeep; /***/ }), /***/ "./node_modules/lodash/_baseIsMap.js": /*!*******************************************!*\ !*** ./node_modules/lodash/_baseIsMap.js ***! \*******************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var getTag = __webpack_require__(/*! ./_getTag */ "./node_modules/lodash/_getTag.js"), isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js"); /** `Object#toString` result references. */ var mapTag = '[object Map]'; /** * The base implementation of `_.isMap` without Node.js optimizations. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a map, else `false`. */ function baseIsMap(value) { return isObjectLike(value) && getTag(value) == mapTag; } module.exports = baseIsMap; /***/ }), /***/ "./node_modules/lodash/_baseIsMatch.js": /*!*********************************************!*\ !*** ./node_modules/lodash/_baseIsMatch.js ***! \*********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var Stack = __webpack_require__(/*! ./_Stack */ "./node_modules/lodash/_Stack.js"), baseIsEqual = __webpack_require__(/*! ./_baseIsEqual */ "./node_modules/lodash/_baseIsEqual.js"); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; /** * The base implementation of `_.isMatch` without support for iteratee shorthands. * * @private * @param {Object} object The object to inspect. * @param {Object} source The object of property values to match. * @param {Array} matchData The property names, values, and compare flags to match. * @param {Function} [customizer] The function to customize comparisons. * @returns {boolean} Returns `true` if `object` is a match, else `false`. */ function baseIsMatch(object, source, matchData, customizer) { var index = matchData.length, length = index, noCustomizer = !customizer; if (object == null) { return !length; } object = Object(object); while (index--) { var data = matchData[index]; if ((noCustomizer && data[2]) ? data[1] !== object[data[0]] : !(data[0] in object) ) { return false; } } while (++index < length) { data = matchData[index]; var key = data[0], objValue = object[key], srcValue = data[1]; if (noCustomizer && data[2]) { if (objValue === undefined && !(key in object)) { return false; } } else { var stack = new Stack; if (customizer) { var result = customizer(objValue, srcValue, key, object, source, stack); } if (!(result === undefined ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) : result )) { return false; } } } return true; } module.exports = baseIsMatch; /***/ }), /***/ "./node_modules/lodash/_baseIsNaN.js": /*!*******************************************!*\ !*** ./node_modules/lodash/_baseIsNaN.js ***! \*******************************************/ /***/ (function(module) { /** * The base implementation of `_.isNaN` without support for number objects. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. */ function baseIsNaN(value) { return value !== value; } module.exports = baseIsNaN; /***/ }), /***/ "./node_modules/lodash/_baseIsNative.js": /*!**********************************************!*\ !*** ./node_modules/lodash/_baseIsNative.js ***! \**********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var isFunction = __webpack_require__(/*! ./isFunction */ "./node_modules/lodash/isFunction.js"), isMasked = __webpack_require__(/*! ./_isMasked */ "./node_modules/lodash/_isMasked.js"), isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"), toSource = __webpack_require__(/*! ./_toSource */ "./node_modules/lodash/_toSource.js"); /** * Used to match `RegExp` * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). */ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; /** Used to detect host constructors (Safari). */ var reIsHostCtor = /^\[object .+?Constructor\]$/; /** Used for built-in method references. */ var funcProto = Function.prototype, objectProto = Object.prototype; /** Used to resolve the decompiled source of functions. */ var funcToString = funcProto.toString; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** Used to detect if a method is native. */ var reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' ); /** * The base implementation of `_.isNative` without bad shim checks. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a native function, * else `false`. */ function baseIsNative(value) { if (!isObject(value) || isMasked(value)) { return false; } var pattern = isFunction(value) ? reIsNative : reIsHostCtor; return pattern.test(toSource(value)); } module.exports = baseIsNative; /***/ }), /***/ "./node_modules/lodash/_baseIsSet.js": /*!*******************************************!*\ !*** ./node_modules/lodash/_baseIsSet.js ***! \*******************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var getTag = __webpack_require__(/*! ./_getTag */ "./node_modules/lodash/_getTag.js"), isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js"); /** `Object#toString` result references. */ var setTag = '[object Set]'; /** * The base implementation of `_.isSet` without Node.js optimizations. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a set, else `false`. */ function baseIsSet(value) { return isObjectLike(value) && getTag(value) == setTag; } module.exports = baseIsSet; /***/ }), /***/ "./node_modules/lodash/_baseIsTypedArray.js": /*!**************************************************!*\ !*** ./node_modules/lodash/_baseIsTypedArray.js ***! \**************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"), isLength = __webpack_require__(/*! ./isLength */ "./node_modules/lodash/isLength.js"), isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js"); /** `Object#toString` result references. */ var argsTag = '[object Arguments]', arrayTag = '[object Array]', boolTag = '[object Boolean]', dateTag = '[object Date]', errorTag = '[object Error]', funcTag = '[object Function]', mapTag = '[object Map]', numberTag = '[object Number]', objectTag = '[object Object]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', weakMapTag = '[object WeakMap]'; var arrayBufferTag = '[object ArrayBuffer]', dataViewTag = '[object DataView]', float32Tag = '[object Float32Array]', float64Tag = '[object Float64Array]', int8Tag = '[object Int8Array]', int16Tag = '[object Int16Array]', int32Tag = '[object Int32Array]', uint8Tag = '[object Uint8Array]', uint8ClampedTag = '[object Uint8ClampedArray]', uint16Tag = '[object Uint16Array]', uint32Tag = '[object Uint32Array]'; /** Used to identify `toStringTag` values of typed arrays. */ var typedArrayTags = {}; typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; /** * The base implementation of `_.isTypedArray` without Node.js optimizations. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. */ function baseIsTypedArray(value) { return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; } module.exports = baseIsTypedArray; /***/ }), /***/ "./node_modules/lodash/_baseIteratee.js": /*!**********************************************!*\ !*** ./node_modules/lodash/_baseIteratee.js ***! \**********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseMatches = __webpack_require__(/*! ./_baseMatches */ "./node_modules/lodash/_baseMatches.js"), baseMatchesProperty = __webpack_require__(/*! ./_baseMatchesProperty */ "./node_modules/lodash/_baseMatchesProperty.js"), identity = __webpack_require__(/*! ./identity */ "./node_modules/lodash/identity.js"), isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"), property = __webpack_require__(/*! ./property */ "./node_modules/lodash/property.js"); /** * The base implementation of `_.iteratee`. * * @private * @param {*} [value=_.identity] The value to convert to an iteratee. * @returns {Function} Returns the iteratee. */ function baseIteratee(value) { // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. if (typeof value == 'function') { return value; } if (value == null) { return identity; } if (typeof value == 'object') { return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value); } return property(value); } module.exports = baseIteratee; /***/ }), /***/ "./node_modules/lodash/_baseKeys.js": /*!******************************************!*\ !*** ./node_modules/lodash/_baseKeys.js ***! \******************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var isPrototype = __webpack_require__(/*! ./_isPrototype */ "./node_modules/lodash/_isPrototype.js"), nativeKeys = __webpack_require__(/*! ./_nativeKeys */ "./node_modules/lodash/_nativeKeys.js"); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ function baseKeys(object) { if (!isPrototype(object)) { return nativeKeys(object); } var result = []; for (var key in Object(object)) { if (hasOwnProperty.call(object, key) && key != 'constructor') { result.push(key); } } return result; } module.exports = baseKeys; /***/ }), /***/ "./node_modules/lodash/_baseKeysIn.js": /*!********************************************!*\ !*** ./node_modules/lodash/_baseKeysIn.js ***! \********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"), isPrototype = __webpack_require__(/*! ./_isPrototype */ "./node_modules/lodash/_isPrototype.js"), nativeKeysIn = __webpack_require__(/*! ./_nativeKeysIn */ "./node_modules/lodash/_nativeKeysIn.js"); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ function baseKeysIn(object) { if (!isObject(object)) { return nativeKeysIn(object); } var isProto = isPrototype(object), result = []; for (var key in object) { if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { result.push(key); } } return result; } module.exports = baseKeysIn; /***/ }), /***/ "./node_modules/lodash/_baseLt.js": /*!****************************************!*\ !*** ./node_modules/lodash/_baseLt.js ***! \****************************************/ /***/ (function(module) { /** * The base implementation of `_.lt` which doesn't coerce arguments. * * @private * @param {*} value The value to compare. * @param {*} other The other value to compare. * @returns {boolean} Returns `true` if `value` is less than `other`, * else `false`. */ function baseLt(value, other) { return value < other; } module.exports = baseLt; /***/ }), /***/ "./node_modules/lodash/_baseMap.js": /*!*****************************************!*\ !*** ./node_modules/lodash/_baseMap.js ***! \*****************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseEach = __webpack_require__(/*! ./_baseEach */ "./node_modules/lodash/_baseEach.js"), isArrayLike = __webpack_require__(/*! ./isArrayLike */ "./node_modules/lodash/isArrayLike.js"); /** * The base implementation of `_.map` without support for iteratee shorthands. * * @private * @param {Array|Object} collection The collection to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the new mapped array. */ function baseMap(collection, iteratee) { var index = -1, result = isArrayLike(collection) ? Array(collection.length) : []; baseEach(collection, function(value, key, collection) { result[++index] = iteratee(value, key, collection); }); return result; } module.exports = baseMap; /***/ }), /***/ "./node_modules/lodash/_baseMatches.js": /*!*********************************************!*\ !*** ./node_modules/lodash/_baseMatches.js ***! \*********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseIsMatch = __webpack_require__(/*! ./_baseIsMatch */ "./node_modules/lodash/_baseIsMatch.js"), getMatchData = __webpack_require__(/*! ./_getMatchData */ "./node_modules/lodash/_getMatchData.js"), matchesStrictComparable = __webpack_require__(/*! ./_matchesStrictComparable */ "./node_modules/lodash/_matchesStrictComparable.js"); /** * The base implementation of `_.matches` which doesn't clone `source`. * * @private * @param {Object} source The object of property values to match. * @returns {Function} Returns the new spec function. */ function baseMatches(source) { var matchData = getMatchData(source); if (matchData.length == 1 && matchData[0][2]) { return matchesStrictComparable(matchData[0][0], matchData[0][1]); } return function(object) { return object === source || baseIsMatch(object, source, matchData); }; } module.exports = baseMatches; /***/ }), /***/ "./node_modules/lodash/_baseMatchesProperty.js": /*!*****************************************************!*\ !*** ./node_modules/lodash/_baseMatchesProperty.js ***! \*****************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseIsEqual = __webpack_require__(/*! ./_baseIsEqual */ "./node_modules/lodash/_baseIsEqual.js"), get = __webpack_require__(/*! ./get */ "./node_modules/lodash/get.js"), hasIn = __webpack_require__(/*! ./hasIn */ "./node_modules/lodash/hasIn.js"), isKey = __webpack_require__(/*! ./_isKey */ "./node_modules/lodash/_isKey.js"), isStrictComparable = __webpack_require__(/*! ./_isStrictComparable */ "./node_modules/lodash/_isStrictComparable.js"), matchesStrictComparable = __webpack_require__(/*! ./_matchesStrictComparable */ "./node_modules/lodash/_matchesStrictComparable.js"), toKey = __webpack_require__(/*! ./_toKey */ "./node_modules/lodash/_toKey.js"); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; /** * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. * * @private * @param {string} path The path of the property to get. * @param {*} srcValue The value to match. * @returns {Function} Returns the new spec function. */ function baseMatchesProperty(path, srcValue) { if (isKey(path) && isStrictComparable(srcValue)) { return matchesStrictComparable(toKey(path), srcValue); } return function(object) { var objValue = get(object, path); return (objValue === undefined && objValue === srcValue) ? hasIn(object, path) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); }; } module.exports = baseMatchesProperty; /***/ }), /***/ "./node_modules/lodash/_baseMerge.js": /*!*******************************************!*\ !*** ./node_modules/lodash/_baseMerge.js ***! \*******************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var Stack = __webpack_require__(/*! ./_Stack */ "./node_modules/lodash/_Stack.js"), assignMergeValue = __webpack_require__(/*! ./_assignMergeValue */ "./node_modules/lodash/_assignMergeValue.js"), baseFor = __webpack_require__(/*! ./_baseFor */ "./node_modules/lodash/_baseFor.js"), baseMergeDeep = __webpack_require__(/*! ./_baseMergeDeep */ "./node_modules/lodash/_baseMergeDeep.js"), isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"), keysIn = __webpack_require__(/*! ./keysIn */ "./node_modules/lodash/keysIn.js"), safeGet = __webpack_require__(/*! ./_safeGet */ "./node_modules/lodash/_safeGet.js"); /** * The base implementation of `_.merge` without support for multiple sources. * * @private * @param {Object} object The destination object. * @param {Object} source The source object. * @param {number} srcIndex The index of `source`. * @param {Function} [customizer] The function to customize merged values. * @param {Object} [stack] Tracks traversed source values and their merged * counterparts. */ function baseMerge(object, source, srcIndex, customizer, stack) { if (object === source) { return; } baseFor(source, function(srcValue, key) { stack || (stack = new Stack); if (isObject(srcValue)) { baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); } else { var newValue = customizer ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack) : undefined; if (newValue === undefined) { newValue = srcValue; } assignMergeValue(object, key, newValue); } }, keysIn); } module.exports = baseMerge; /***/ }), /***/ "./node_modules/lodash/_baseMergeDeep.js": /*!***********************************************!*\ !*** ./node_modules/lodash/_baseMergeDeep.js ***! \***********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var assignMergeValue = __webpack_require__(/*! ./_assignMergeValue */ "./node_modules/lodash/_assignMergeValue.js"), cloneBuffer = __webpack_require__(/*! ./_cloneBuffer */ "./node_modules/lodash/_cloneBuffer.js"), cloneTypedArray = __webpack_require__(/*! ./_cloneTypedArray */ "./node_modules/lodash/_cloneTypedArray.js"), copyArray = __webpack_require__(/*! ./_copyArray */ "./node_modules/lodash/_copyArray.js"), initCloneObject = __webpack_require__(/*! ./_initCloneObject */ "./node_modules/lodash/_initCloneObject.js"), isArguments = __webpack_require__(/*! ./isArguments */ "./node_modules/lodash/isArguments.js"), isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"), isArrayLikeObject = __webpack_require__(/*! ./isArrayLikeObject */ "./node_modules/lodash/isArrayLikeObject.js"), isBuffer = __webpack_require__(/*! ./isBuffer */ "./node_modules/lodash/isBuffer.js"), isFunction = __webpack_require__(/*! ./isFunction */ "./node_modules/lodash/isFunction.js"), isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"), isPlainObject = __webpack_require__(/*! ./isPlainObject */ "./node_modules/lodash/isPlainObject.js"), isTypedArray = __webpack_require__(/*! ./isTypedArray */ "./node_modules/lodash/isTypedArray.js"), safeGet = __webpack_require__(/*! ./_safeGet */ "./node_modules/lodash/_safeGet.js"), toPlainObject = __webpack_require__(/*! ./toPlainObject */ "./node_modules/lodash/toPlainObject.js"); /** * A specialized version of `baseMerge` for arrays and objects which performs * deep merges and tracks traversed objects enabling objects with circular * references to be merged. * * @private * @param {Object} object The destination object. * @param {Object} source The source object. * @param {string} key The key of the value to merge. * @param {number} srcIndex The index of `source`. * @param {Function} mergeFunc The function to merge values. * @param {Function} [customizer] The function to customize assigned values. * @param {Object} [stack] Tracks traversed source values and their merged * counterparts. */ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { var objValue = safeGet(object, key), srcValue = safeGet(source, key), stacked = stack.get(srcValue); if (stacked) { assignMergeValue(object, key, stacked); return; } var newValue = customizer ? customizer(objValue, srcValue, (key + ''), object, source, stack) : undefined; var isCommon = newValue === undefined; if (isCommon) { var isArr = isArray(srcValue), isBuff = !isArr && isBuffer(srcValue), isTyped = !isArr && !isBuff && isTypedArray(srcValue); newValue = srcValue; if (isArr || isBuff || isTyped) { if (isArray(objValue)) { newValue = objValue; } else if (isArrayLikeObject(objValue)) { newValue = copyArray(objValue); } else if (isBuff) { isCommon = false; newValue = cloneBuffer(srcValue, true); } else if (isTyped) { isCommon = false; newValue = cloneTypedArray(srcValue, true); } else { newValue = []; } } else if (isPlainObject(srcValue) || isArguments(srcValue)) { newValue = objValue; if (isArguments(objValue)) { newValue = toPlainObject(objValue); } else if (!isObject(objValue) || isFunction(objValue)) { newValue = initCloneObject(srcValue); } } else { isCommon = false; } } if (isCommon) { // Recursively merge objects and arrays (susceptible to call stack limits). stack.set(srcValue, newValue); mergeFunc(newValue, srcValue, srcIndex, customizer, stack); stack['delete'](srcValue); } assignMergeValue(object, key, newValue); } module.exports = baseMergeDeep; /***/ }), /***/ "./node_modules/lodash/_baseOrderBy.js": /*!*********************************************!*\ !*** ./node_modules/lodash/_baseOrderBy.js ***! \*********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var arrayMap = __webpack_require__(/*! ./_arrayMap */ "./node_modules/lodash/_arrayMap.js"), baseGet = __webpack_require__(/*! ./_baseGet */ "./node_modules/lodash/_baseGet.js"), baseIteratee = __webpack_require__(/*! ./_baseIteratee */ "./node_modules/lodash/_baseIteratee.js"), baseMap = __webpack_require__(/*! ./_baseMap */ "./node_modules/lodash/_baseMap.js"), baseSortBy = __webpack_require__(/*! ./_baseSortBy */ "./node_modules/lodash/_baseSortBy.js"), baseUnary = __webpack_require__(/*! ./_baseUnary */ "./node_modules/lodash/_baseUnary.js"), compareMultiple = __webpack_require__(/*! ./_compareMultiple */ "./node_modules/lodash/_compareMultiple.js"), identity = __webpack_require__(/*! ./identity */ "./node_modules/lodash/identity.js"), isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"); /** * The base implementation of `_.orderBy` without param guards. * * @private * @param {Array|Object} collection The collection to iterate over. * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. * @param {string[]} orders The sort orders of `iteratees`. * @returns {Array} Returns the new sorted array. */ function baseOrderBy(collection, iteratees, orders) { if (iteratees.length) { iteratees = arrayMap(iteratees, function(iteratee) { if (isArray(iteratee)) { return function(value) { return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee); } } return iteratee; }); } else { iteratees = [identity]; } var index = -1; iteratees = arrayMap(iteratees, baseUnary(baseIteratee)); var result = baseMap(collection, function(value, key, collection) { var criteria = arrayMap(iteratees, function(iteratee) { return iteratee(value); }); return { 'criteria': criteria, 'index': ++index, 'value': value }; }); return baseSortBy(result, function(object, other) { return compareMultiple(object, other, orders); }); } module.exports = baseOrderBy; /***/ }), /***/ "./node_modules/lodash/_basePick.js": /*!******************************************!*\ !*** ./node_modules/lodash/_basePick.js ***! \******************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var basePickBy = __webpack_require__(/*! ./_basePickBy */ "./node_modules/lodash/_basePickBy.js"), hasIn = __webpack_require__(/*! ./hasIn */ "./node_modules/lodash/hasIn.js"); /** * The base implementation of `_.pick` without support for individual * property identifiers. * * @private * @param {Object} object The source object. * @param {string[]} paths The property paths to pick. * @returns {Object} Returns the new object. */ function basePick(object, paths) { return basePickBy(object, paths, function(value, path) { return hasIn(object, path); }); } module.exports = basePick; /***/ }), /***/ "./node_modules/lodash/_basePickBy.js": /*!********************************************!*\ !*** ./node_modules/lodash/_basePickBy.js ***! \********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseGet = __webpack_require__(/*! ./_baseGet */ "./node_modules/lodash/_baseGet.js"), baseSet = __webpack_require__(/*! ./_baseSet */ "./node_modules/lodash/_baseSet.js"), castPath = __webpack_require__(/*! ./_castPath */ "./node_modules/lodash/_castPath.js"); /** * The base implementation of `_.pickBy` without support for iteratee shorthands. * * @private * @param {Object} object The source object. * @param {string[]} paths The property paths to pick. * @param {Function} predicate The function invoked per property. * @returns {Object} Returns the new object. */ function basePickBy(object, paths, predicate) { var index = -1, length = paths.length, result = {}; while (++index < length) { var path = paths[index], value = baseGet(object, path); if (predicate(value, path)) { baseSet(result, castPath(path, object), value); } } return result; } module.exports = basePickBy; /***/ }), /***/ "./node_modules/lodash/_baseProperty.js": /*!**********************************************!*\ !*** ./node_modules/lodash/_baseProperty.js ***! \**********************************************/ /***/ (function(module) { /** * The base implementation of `_.property` without support for deep paths. * * @private * @param {string} key The key of the property to get. * @returns {Function} Returns the new accessor function. */ function baseProperty(key) { return function(object) { return object == null ? undefined : object[key]; }; } module.exports = baseProperty; /***/ }), /***/ "./node_modules/lodash/_basePropertyDeep.js": /*!**************************************************!*\ !*** ./node_modules/lodash/_basePropertyDeep.js ***! \**************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseGet = __webpack_require__(/*! ./_baseGet */ "./node_modules/lodash/_baseGet.js"); /** * A specialized version of `baseProperty` which supports deep paths. * * @private * @param {Array|string} path The path of the property to get. * @returns {Function} Returns the new accessor function. */ function basePropertyDeep(path) { return function(object) { return baseGet(object, path); }; } module.exports = basePropertyDeep; /***/ }), /***/ "./node_modules/lodash/_baseRange.js": /*!*******************************************!*\ !*** ./node_modules/lodash/_baseRange.js ***! \*******************************************/ /***/ (function(module) { /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeCeil = Math.ceil, nativeMax = Math.max; /** * The base implementation of `_.range` and `_.rangeRight` which doesn't * coerce arguments. * * @private * @param {number} start The start of the range. * @param {number} end The end of the range. * @param {number} step The value to increment or decrement by. * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {Array} Returns the range of numbers. */ function baseRange(start, end, step, fromRight) { var index = -1, length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), result = Array(length); while (length--) { result[fromRight ? length : ++index] = start; start += step; } return result; } module.exports = baseRange; /***/ }), /***/ "./node_modules/lodash/_baseReduce.js": /*!********************************************!*\ !*** ./node_modules/lodash/_baseReduce.js ***! \********************************************/ /***/ (function(module) { /** * The base implementation of `_.reduce` and `_.reduceRight`, without support * for iteratee shorthands, which iterates over `collection` using `eachFunc`. * * @private * @param {Array|Object} collection The collection to iterate over. * @param {Function} iteratee The function invoked per iteration. * @param {*} accumulator The initial value. * @param {boolean} initAccum Specify using the first or last element of * `collection` as the initial value. * @param {Function} eachFunc The function to iterate over `collection`. * @returns {*} Returns the accumulated value. */ function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { eachFunc(collection, function(value, index, collection) { accumulator = initAccum ? (initAccum = false, value) : iteratee(accumulator, value, index, collection); }); return accumulator; } module.exports = baseReduce; /***/ }), /***/ "./node_modules/lodash/_baseRest.js": /*!******************************************!*\ !*** ./node_modules/lodash/_baseRest.js ***! \******************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var identity = __webpack_require__(/*! ./identity */ "./node_modules/lodash/identity.js"), overRest = __webpack_require__(/*! ./_overRest */ "./node_modules/lodash/_overRest.js"), setToString = __webpack_require__(/*! ./_setToString */ "./node_modules/lodash/_setToString.js"); /** * The base implementation of `_.rest` which doesn't validate or coerce arguments. * * @private * @param {Function} func The function to apply a rest parameter to. * @param {number} [start=func.length-1] The start position of the rest parameter. * @returns {Function} Returns the new function. */ function baseRest(func, start) { return setToString(overRest(func, start, identity), func + ''); } module.exports = baseRest; /***/ }), /***/ "./node_modules/lodash/_baseSet.js": /*!*****************************************!*\ !*** ./node_modules/lodash/_baseSet.js ***! \*****************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var assignValue = __webpack_require__(/*! ./_assignValue */ "./node_modules/lodash/_assignValue.js"), castPath = __webpack_require__(/*! ./_castPath */ "./node_modules/lodash/_castPath.js"), isIndex = __webpack_require__(/*! ./_isIndex */ "./node_modules/lodash/_isIndex.js"), isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"), toKey = __webpack_require__(/*! ./_toKey */ "./node_modules/lodash/_toKey.js"); /** * The base implementation of `_.set`. * * @private * @param {Object} object The object to modify. * @param {Array|string} path The path of the property to set. * @param {*} value The value to set. * @param {Function} [customizer] The function to customize path creation. * @returns {Object} Returns `object`. */ function baseSet(object, path, value, customizer) { if (!isObject(object)) { return object; } path = castPath(path, object); var index = -1, length = path.length, lastIndex = length - 1, nested = object; while (nested != null && ++index < length) { var key = toKey(path[index]), newValue = value; if (key === '__proto__' || key === 'constructor' || key === 'prototype') { return object; } if (index != lastIndex) { var objValue = nested[key]; newValue = customizer ? customizer(objValue, key, nested) : undefined; if (newValue === undefined) { newValue = isObject(objValue) ? objValue : (isIndex(path[index + 1]) ? [] : {}); } } assignValue(nested, key, newValue); nested = nested[key]; } return object; } module.exports = baseSet; /***/ }), /***/ "./node_modules/lodash/_baseSetToString.js": /*!*************************************************!*\ !*** ./node_modules/lodash/_baseSetToString.js ***! \*************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var constant = __webpack_require__(/*! ./constant */ "./node_modules/lodash/constant.js"), defineProperty = __webpack_require__(/*! ./_defineProperty */ "./node_modules/lodash/_defineProperty.js"), identity = __webpack_require__(/*! ./identity */ "./node_modules/lodash/identity.js"); /** * The base implementation of `setToString` without support for hot loop shorting. * * @private * @param {Function} func The function to modify. * @param {Function} string The `toString` result. * @returns {Function} Returns `func`. */ var baseSetToString = !defineProperty ? identity : function(func, string) { return defineProperty(func, 'toString', { 'configurable': true, 'enumerable': false, 'value': constant(string), 'writable': true }); }; module.exports = baseSetToString; /***/ }), /***/ "./node_modules/lodash/_baseSortBy.js": /*!********************************************!*\ !*** ./node_modules/lodash/_baseSortBy.js ***! \********************************************/ /***/ (function(module) { /** * The base implementation of `_.sortBy` which uses `comparer` to define the * sort order of `array` and replaces criteria objects with their corresponding * values. * * @private * @param {Array} array The array to sort. * @param {Function} comparer The function to define sort order. * @returns {Array} Returns `array`. */ function baseSortBy(array, comparer) { var length = array.length; array.sort(comparer); while (length--) { array[length] = array[length].value; } return array; } module.exports = baseSortBy; /***/ }), /***/ "./node_modules/lodash/_baseTimes.js": /*!*******************************************!*\ !*** ./node_modules/lodash/_baseTimes.js ***! \*******************************************/ /***/ (function(module) { /** * The base implementation of `_.times` without support for iteratee shorthands * or max array length checks. * * @private * @param {number} n The number of times to invoke `iteratee`. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the array of results. */ function baseTimes(n, iteratee) { var index = -1, result = Array(n); while (++index < n) { result[index] = iteratee(index); } return result; } module.exports = baseTimes; /***/ }), /***/ "./node_modules/lodash/_baseToString.js": /*!**********************************************!*\ !*** ./node_modules/lodash/_baseToString.js ***! \**********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js"), arrayMap = __webpack_require__(/*! ./_arrayMap */ "./node_modules/lodash/_arrayMap.js"), isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"), isSymbol = __webpack_require__(/*! ./isSymbol */ "./node_modules/lodash/isSymbol.js"); /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0; /** Used to convert symbols to primitives and strings. */ var symbolProto = Symbol ? Symbol.prototype : undefined, symbolToString = symbolProto ? symbolProto.toString : undefined; /** * The base implementation of `_.toString` which doesn't convert nullish * values to empty strings. * * @private * @param {*} value The value to process. * @returns {string} Returns the string. */ function baseToString(value) { // Exit early for strings to avoid a performance hit in some environments. if (typeof value == 'string') { return value; } if (isArray(value)) { // Recursively convert values (susceptible to call stack limits). return arrayMap(value, baseToString) + ''; } if (isSymbol(value)) { return symbolToString ? symbolToString.call(value) : ''; } var result = (value + ''); return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; } module.exports = baseToString; /***/ }), /***/ "./node_modules/lodash/_baseTrim.js": /*!******************************************!*\ !*** ./node_modules/lodash/_baseTrim.js ***! \******************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var trimmedEndIndex = __webpack_require__(/*! ./_trimmedEndIndex */ "./node_modules/lodash/_trimmedEndIndex.js"); /** Used to match leading whitespace. */ var reTrimStart = /^\s+/; /** * The base implementation of `_.trim`. * * @private * @param {string} string The string to trim. * @returns {string} Returns the trimmed string. */ function baseTrim(string) { return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '') : string; } module.exports = baseTrim; /***/ }), /***/ "./node_modules/lodash/_baseUnary.js": /*!*******************************************!*\ !*** ./node_modules/lodash/_baseUnary.js ***! \*******************************************/ /***/ (function(module) { /** * The base implementation of `_.unary` without support for storing metadata. * * @private * @param {Function} func The function to cap arguments for. * @returns {Function} Returns the new capped function. */ function baseUnary(func) { return function(value) { return func(value); }; } module.exports = baseUnary; /***/ }), /***/ "./node_modules/lodash/_baseUniq.js": /*!******************************************!*\ !*** ./node_modules/lodash/_baseUniq.js ***! \******************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var SetCache = __webpack_require__(/*! ./_SetCache */ "./node_modules/lodash/_SetCache.js"), arrayIncludes = __webpack_require__(/*! ./_arrayIncludes */ "./node_modules/lodash/_arrayIncludes.js"), arrayIncludesWith = __webpack_require__(/*! ./_arrayIncludesWith */ "./node_modules/lodash/_arrayIncludesWith.js"), cacheHas = __webpack_require__(/*! ./_cacheHas */ "./node_modules/lodash/_cacheHas.js"), createSet = __webpack_require__(/*! ./_createSet */ "./node_modules/lodash/_createSet.js"), setToArray = __webpack_require__(/*! ./_setToArray */ "./node_modules/lodash/_setToArray.js"); /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; /** * The base implementation of `_.uniqBy` without support for iteratee shorthands. * * @private * @param {Array} array The array to inspect. * @param {Function} [iteratee] The iteratee invoked per element. * @param {Function} [comparator] The comparator invoked per element. * @returns {Array} Returns the new duplicate free array. */ function baseUniq(array, iteratee, comparator) { var index = -1, includes = arrayIncludes, length = array.length, isCommon = true, result = [], seen = result; if (comparator) { isCommon = false; includes = arrayIncludesWith; } else if (length >= LARGE_ARRAY_SIZE) { var set = iteratee ? null : createSet(array); if (set) { return setToArray(set); } isCommon = false; includes = cacheHas; seen = new SetCache; } else { seen = iteratee ? [] : result; } outer: while (++index < length) { var value = array[index], computed = iteratee ? iteratee(value) : value; value = (comparator || value !== 0) ? value : 0; if (isCommon && computed === computed) { var seenIndex = seen.length; while (seenIndex--) { if (seen[seenIndex] === computed) { continue outer; } } if (iteratee) { seen.push(computed); } result.push(value); } else if (!includes(seen, computed, comparator)) { if (seen !== result) { seen.push(computed); } result.push(value); } } return result; } module.exports = baseUniq; /***/ }), /***/ "./node_modules/lodash/_baseValues.js": /*!********************************************!*\ !*** ./node_modules/lodash/_baseValues.js ***! \********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var arrayMap = __webpack_require__(/*! ./_arrayMap */ "./node_modules/lodash/_arrayMap.js"); /** * The base implementation of `_.values` and `_.valuesIn` which creates an * array of `object` property values corresponding to the property names * of `props`. * * @private * @param {Object} object The object to query. * @param {Array} props The property names to get values for. * @returns {Object} Returns the array of property values. */ function baseValues(object, props) { return arrayMap(props, function(key) { return object[key]; }); } module.exports = baseValues; /***/ }), /***/ "./node_modules/lodash/_baseZipObject.js": /*!***********************************************!*\ !*** ./node_modules/lodash/_baseZipObject.js ***! \***********************************************/ /***/ (function(module) { /** * This base implementation of `_.zipObject` which assigns values using `assignFunc`. * * @private * @param {Array} props The property identifiers. * @param {Array} values The property values. * @param {Function} assignFunc The function to assign values. * @returns {Object} Returns the new object. */ function baseZipObject(props, values, assignFunc) { var index = -1, length = props.length, valsLength = values.length, result = {}; while (++index < length) { var value = index < valsLength ? values[index] : undefined; assignFunc(result, props[index], value); } return result; } module.exports = baseZipObject; /***/ }), /***/ "./node_modules/lodash/_cacheHas.js": /*!******************************************!*\ !*** ./node_modules/lodash/_cacheHas.js ***! \******************************************/ /***/ (function(module) { /** * Checks if a `cache` value for `key` exists. * * @private * @param {Object} cache The cache to query. * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function cacheHas(cache, key) { return cache.has(key); } module.exports = cacheHas; /***/ }), /***/ "./node_modules/lodash/_castFunction.js": /*!**********************************************!*\ !*** ./node_modules/lodash/_castFunction.js ***! \**********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var identity = __webpack_require__(/*! ./identity */ "./node_modules/lodash/identity.js"); /** * Casts `value` to `identity` if it's not a function. * * @private * @param {*} value The value to inspect. * @returns {Function} Returns cast function. */ function castFunction(value) { return typeof value == 'function' ? value : identity; } module.exports = castFunction; /***/ }), /***/ "./node_modules/lodash/_castPath.js": /*!******************************************!*\ !*** ./node_modules/lodash/_castPath.js ***! \******************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"), isKey = __webpack_require__(/*! ./_isKey */ "./node_modules/lodash/_isKey.js"), stringToPath = __webpack_require__(/*! ./_stringToPath */ "./node_modules/lodash/_stringToPath.js"), toString = __webpack_require__(/*! ./toString */ "./node_modules/lodash/toString.js"); /** * Casts `value` to a path array if it's not one. * * @private * @param {*} value The value to inspect. * @param {Object} [object] The object to query keys on. * @returns {Array} Returns the cast property path array. */ function castPath(value, object) { if (isArray(value)) { return value; } return isKey(value, object) ? [value] : stringToPath(toString(value)); } module.exports = castPath; /***/ }), /***/ "./node_modules/lodash/_cloneArrayBuffer.js": /*!**************************************************!*\ !*** ./node_modules/lodash/_cloneArrayBuffer.js ***! \**************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var Uint8Array = __webpack_require__(/*! ./_Uint8Array */ "./node_modules/lodash/_Uint8Array.js"); /** * Creates a clone of `arrayBuffer`. * * @private * @param {ArrayBuffer} arrayBuffer The array buffer to clone. * @returns {ArrayBuffer} Returns the cloned array buffer. */ function cloneArrayBuffer(arrayBuffer) { var result = new arrayBuffer.constructor(arrayBuffer.byteLength); new Uint8Array(result).set(new Uint8Array(arrayBuffer)); return result; } module.exports = cloneArrayBuffer; /***/ }), /***/ "./node_modules/lodash/_cloneBuffer.js": /*!*********************************************!*\ !*** ./node_modules/lodash/_cloneBuffer.js ***! \*********************************************/ /***/ (function(module, exports, __webpack_require__) { /* module decorator */ module = __webpack_require__.nmd(module); var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js"); /** Detect free variable `exports`. */ var freeExports = true && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ var freeModule = freeExports && "object" == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; /** Built-in value references. */ var Buffer = moduleExports ? root.Buffer : undefined, allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined; /** * Creates a clone of `buffer`. * * @private * @param {Buffer} buffer The buffer to clone. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Buffer} Returns the cloned buffer. */ function cloneBuffer(buffer, isDeep) { if (isDeep) { return buffer.slice(); } var length = buffer.length, result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); buffer.copy(result); return result; } module.exports = cloneBuffer; /***/ }), /***/ "./node_modules/lodash/_cloneDataView.js": /*!***********************************************!*\ !*** ./node_modules/lodash/_cloneDataView.js ***! \***********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var cloneArrayBuffer = __webpack_require__(/*! ./_cloneArrayBuffer */ "./node_modules/lodash/_cloneArrayBuffer.js"); /** * Creates a clone of `dataView`. * * @private * @param {Object} dataView The data view to clone. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Object} Returns the cloned data view. */ function cloneDataView(dataView, isDeep) { var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); } module.exports = cloneDataView; /***/ }), /***/ "./node_modules/lodash/_cloneRegExp.js": /*!*********************************************!*\ !*** ./node_modules/lodash/_cloneRegExp.js ***! \*********************************************/ /***/ (function(module) { /** Used to match `RegExp` flags from their coerced string values. */ var reFlags = /\w*$/; /** * Creates a clone of `regexp`. * * @private * @param {Object} regexp The regexp to clone. * @returns {Object} Returns the cloned regexp. */ function cloneRegExp(regexp) { var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); result.lastIndex = regexp.lastIndex; return result; } module.exports = cloneRegExp; /***/ }), /***/ "./node_modules/lodash/_cloneSymbol.js": /*!*********************************************!*\ !*** ./node_modules/lodash/_cloneSymbol.js ***! \*********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js"); /** Used to convert symbols to primitives and strings. */ var symbolProto = Symbol ? Symbol.prototype : undefined, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; /** * Creates a clone of the `symbol` object. * * @private * @param {Object} symbol The symbol object to clone. * @returns {Object} Returns the cloned symbol object. */ function cloneSymbol(symbol) { return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; } module.exports = cloneSymbol; /***/ }), /***/ "./node_modules/lodash/_cloneTypedArray.js": /*!*************************************************!*\ !*** ./node_modules/lodash/_cloneTypedArray.js ***! \*************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var cloneArrayBuffer = __webpack_require__(/*! ./_cloneArrayBuffer */ "./node_modules/lodash/_cloneArrayBuffer.js"); /** * Creates a clone of `typedArray`. * * @private * @param {Object} typedArray The typed array to clone. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Object} Returns the cloned typed array. */ function cloneTypedArray(typedArray, isDeep) { var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); } module.exports = cloneTypedArray; /***/ }), /***/ "./node_modules/lodash/_compareAscending.js": /*!**************************************************!*\ !*** ./node_modules/lodash/_compareAscending.js ***! \**************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var isSymbol = __webpack_require__(/*! ./isSymbol */ "./node_modules/lodash/isSymbol.js"); /** * Compares values to sort them in ascending order. * * @private * @param {*} value The value to compare. * @param {*} other The other value to compare. * @returns {number} Returns the sort order indicator for `value`. */ function compareAscending(value, other) { if (value !== other) { var valIsDefined = value !== undefined, valIsNull = value === null, valIsReflexive = value === value, valIsSymbol = isSymbol(value); var othIsDefined = other !== undefined, othIsNull = other === null, othIsReflexive = other === other, othIsSymbol = isSymbol(other); if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || (valIsNull && othIsDefined && othIsReflexive) || (!valIsDefined && othIsReflexive) || !valIsReflexive) { return 1; } if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || (othIsNull && valIsDefined && valIsReflexive) || (!othIsDefined && valIsReflexive) || !othIsReflexive) { return -1; } } return 0; } module.exports = compareAscending; /***/ }), /***/ "./node_modules/lodash/_compareMultiple.js": /*!*************************************************!*\ !*** ./node_modules/lodash/_compareMultiple.js ***! \*************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var compareAscending = __webpack_require__(/*! ./_compareAscending */ "./node_modules/lodash/_compareAscending.js"); /** * Used by `_.orderBy` to compare multiple properties of a value to another * and stable sort them. * * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, * specify an order of "desc" for descending or "asc" for ascending sort order * of corresponding values. * * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {boolean[]|string[]} orders The order to sort by for each property. * @returns {number} Returns the sort order indicator for `object`. */ function compareMultiple(object, other, orders) { var index = -1, objCriteria = object.criteria, othCriteria = other.criteria, length = objCriteria.length, ordersLength = orders.length; while (++index < length) { var result = compareAscending(objCriteria[index], othCriteria[index]); if (result) { if (index >= ordersLength) { return result; } var order = orders[index]; return result * (order == 'desc' ? -1 : 1); } } // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications // that causes it, under certain circumstances, to provide the same value for // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 // for more details. // // This also ensures a stable sort in V8 and other engines. // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. return object.index - other.index; } module.exports = compareMultiple; /***/ }), /***/ "./node_modules/lodash/_copyArray.js": /*!*******************************************!*\ !*** ./node_modules/lodash/_copyArray.js ***! \*******************************************/ /***/ (function(module) { /** * Copies the values of `source` to `array`. * * @private * @param {Array} source The array to copy values from. * @param {Array} [array=[]] The array to copy values to. * @returns {Array} Returns `array`. */ function copyArray(source, array) { var index = -1, length = source.length; array || (array = Array(length)); while (++index < length) { array[index] = source[index]; } return array; } module.exports = copyArray; /***/ }), /***/ "./node_modules/lodash/_copyObject.js": /*!********************************************!*\ !*** ./node_modules/lodash/_copyObject.js ***! \********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var assignValue = __webpack_require__(/*! ./_assignValue */ "./node_modules/lodash/_assignValue.js"), baseAssignValue = __webpack_require__(/*! ./_baseAssignValue */ "./node_modules/lodash/_baseAssignValue.js"); /** * Copies properties of `source` to `object`. * * @private * @param {Object} source The object to copy properties from. * @param {Array} props The property identifiers to copy. * @param {Object} [object={}] The object to copy properties to. * @param {Function} [customizer] The function to customize copied values. * @returns {Object} Returns `object`. */ function copyObject(source, props, object, customizer) { var isNew = !object; object || (object = {}); var index = -1, length = props.length; while (++index < length) { var key = props[index]; var newValue = customizer ? customizer(object[key], source[key], key, object, source) : undefined; if (newValue === undefined) { newValue = source[key]; } if (isNew) { baseAssignValue(object, key, newValue); } else { assignValue(object, key, newValue); } } return object; } module.exports = copyObject; /***/ }), /***/ "./node_modules/lodash/_copySymbols.js": /*!*********************************************!*\ !*** ./node_modules/lodash/_copySymbols.js ***! \*********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var copyObject = __webpack_require__(/*! ./_copyObject */ "./node_modules/lodash/_copyObject.js"), getSymbols = __webpack_require__(/*! ./_getSymbols */ "./node_modules/lodash/_getSymbols.js"); /** * Copies own symbols of `source` to `object`. * * @private * @param {Object} source The object to copy symbols from. * @param {Object} [object={}] The object to copy symbols to. * @returns {Object} Returns `object`. */ function copySymbols(source, object) { return copyObject(source, getSymbols(source), object); } module.exports = copySymbols; /***/ }), /***/ "./node_modules/lodash/_copySymbolsIn.js": /*!***********************************************!*\ !*** ./node_modules/lodash/_copySymbolsIn.js ***! \***********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var copyObject = __webpack_require__(/*! ./_copyObject */ "./node_modules/lodash/_copyObject.js"), getSymbolsIn = __webpack_require__(/*! ./_getSymbolsIn */ "./node_modules/lodash/_getSymbolsIn.js"); /** * Copies own and inherited symbols of `source` to `object`. * * @private * @param {Object} source The object to copy symbols from. * @param {Object} [object={}] The object to copy symbols to. * @returns {Object} Returns `object`. */ function copySymbolsIn(source, object) { return copyObject(source, getSymbolsIn(source), object); } module.exports = copySymbolsIn; /***/ }), /***/ "./node_modules/lodash/_coreJsData.js": /*!********************************************!*\ !*** ./node_modules/lodash/_coreJsData.js ***! \********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js"); /** Used to detect overreaching core-js shims. */ var coreJsData = root['__core-js_shared__']; module.exports = coreJsData; /***/ }), /***/ "./node_modules/lodash/_createAssigner.js": /*!************************************************!*\ !*** ./node_modules/lodash/_createAssigner.js ***! \************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseRest = __webpack_require__(/*! ./_baseRest */ "./node_modules/lodash/_baseRest.js"), isIterateeCall = __webpack_require__(/*! ./_isIterateeCall */ "./node_modules/lodash/_isIterateeCall.js"); /** * Creates a function like `_.assign`. * * @private * @param {Function} assigner The function to assign values. * @returns {Function} Returns the new assigner function. */ function createAssigner(assigner) { return baseRest(function(object, sources) { var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : undefined, guard = length > 2 ? sources[2] : undefined; customizer = (assigner.length > 3 && typeof customizer == 'function') ? (length--, customizer) : undefined; if (guard && isIterateeCall(sources[0], sources[1], guard)) { customizer = length < 3 ? undefined : customizer; length = 1; } object = Object(object); while (++index < length) { var source = sources[index]; if (source) { assigner(object, source, index, customizer); } } return object; }); } module.exports = createAssigner; /***/ }), /***/ "./node_modules/lodash/_createBaseEach.js": /*!************************************************!*\ !*** ./node_modules/lodash/_createBaseEach.js ***! \************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var isArrayLike = __webpack_require__(/*! ./isArrayLike */ "./node_modules/lodash/isArrayLike.js"); /** * Creates a `baseEach` or `baseEachRight` function. * * @private * @param {Function} eachFunc The function to iterate over a collection. * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {Function} Returns the new base function. */ function createBaseEach(eachFunc, fromRight) { return function(collection, iteratee) { if (collection == null) { return collection; } if (!isArrayLike(collection)) { return eachFunc(collection, iteratee); } var length = collection.length, index = fromRight ? length : -1, iterable = Object(collection); while ((fromRight ? index-- : ++index < length)) { if (iteratee(iterable[index], index, iterable) === false) { break; } } return collection; }; } module.exports = createBaseEach; /***/ }), /***/ "./node_modules/lodash/_createBaseFor.js": /*!***********************************************!*\ !*** ./node_modules/lodash/_createBaseFor.js ***! \***********************************************/ /***/ (function(module) { /** * Creates a base function for methods like `_.forIn` and `_.forOwn`. * * @private * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {Function} Returns the new base function. */ function createBaseFor(fromRight) { return function(object, iteratee, keysFunc) { var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length; while (length--) { var key = props[fromRight ? length : ++index]; if (iteratee(iterable[key], key, iterable) === false) { break; } } return object; }; } module.exports = createBaseFor; /***/ }), /***/ "./node_modules/lodash/_createFind.js": /*!********************************************!*\ !*** ./node_modules/lodash/_createFind.js ***! \********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseIteratee = __webpack_require__(/*! ./_baseIteratee */ "./node_modules/lodash/_baseIteratee.js"), isArrayLike = __webpack_require__(/*! ./isArrayLike */ "./node_modules/lodash/isArrayLike.js"), keys = __webpack_require__(/*! ./keys */ "./node_modules/lodash/keys.js"); /** * Creates a `_.find` or `_.findLast` function. * * @private * @param {Function} findIndexFunc The function to find the collection index. * @returns {Function} Returns the new find function. */ function createFind(findIndexFunc) { return function(collection, predicate, fromIndex) { var iterable = Object(collection); if (!isArrayLike(collection)) { var iteratee = baseIteratee(predicate, 3); collection = keys(collection); predicate = function(key) { return iteratee(iterable[key], key, iterable); }; } var index = findIndexFunc(collection, predicate, fromIndex); return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; }; } module.exports = createFind; /***/ }), /***/ "./node_modules/lodash/_createRange.js": /*!*********************************************!*\ !*** ./node_modules/lodash/_createRange.js ***! \*********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseRange = __webpack_require__(/*! ./_baseRange */ "./node_modules/lodash/_baseRange.js"), isIterateeCall = __webpack_require__(/*! ./_isIterateeCall */ "./node_modules/lodash/_isIterateeCall.js"), toFinite = __webpack_require__(/*! ./toFinite */ "./node_modules/lodash/toFinite.js"); /** * Creates a `_.range` or `_.rangeRight` function. * * @private * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {Function} Returns the new range function. */ function createRange(fromRight) { return function(start, end, step) { if (step && typeof step != 'number' && isIterateeCall(start, end, step)) { end = step = undefined; } // Ensure the sign of `-0` is preserved. start = toFinite(start); if (end === undefined) { end = start; start = 0; } else { end = toFinite(end); } step = step === undefined ? (start < end ? 1 : -1) : toFinite(step); return baseRange(start, end, step, fromRight); }; } module.exports = createRange; /***/ }), /***/ "./node_modules/lodash/_createSet.js": /*!*******************************************!*\ !*** ./node_modules/lodash/_createSet.js ***! \*******************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var Set = __webpack_require__(/*! ./_Set */ "./node_modules/lodash/_Set.js"), noop = __webpack_require__(/*! ./noop */ "./node_modules/lodash/noop.js"), setToArray = __webpack_require__(/*! ./_setToArray */ "./node_modules/lodash/_setToArray.js"); /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0; /** * Creates a set object of `values`. * * @private * @param {Array} values The values to add to the set. * @returns {Object} Returns the new set. */ var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) { return new Set(values); }; module.exports = createSet; /***/ }), /***/ "./node_modules/lodash/_defineProperty.js": /*!************************************************!*\ !*** ./node_modules/lodash/_defineProperty.js ***! \************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var getNative = __webpack_require__(/*! ./_getNative */ "./node_modules/lodash/_getNative.js"); var defineProperty = (function() { try { var func = getNative(Object, 'defineProperty'); func({}, '', {}); return func; } catch (e) {} }()); module.exports = defineProperty; /***/ }), /***/ "./node_modules/lodash/_equalArrays.js": /*!*********************************************!*\ !*** ./node_modules/lodash/_equalArrays.js ***! \*********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var SetCache = __webpack_require__(/*! ./_SetCache */ "./node_modules/lodash/_SetCache.js"), arraySome = __webpack_require__(/*! ./_arraySome */ "./node_modules/lodash/_arraySome.js"), cacheHas = __webpack_require__(/*! ./_cacheHas */ "./node_modules/lodash/_cacheHas.js"); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; /** * A specialized version of `baseIsEqualDeep` for arrays with support for * partial deep comparisons. * * @private * @param {Array} array The array to compare. * @param {Array} other The other array to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} stack Tracks traversed `array` and `other` objects. * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. */ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array.length, othLength = other.length; if (arrLength != othLength && !(isPartial && othLength > arrLength)) { return false; } // Check that cyclic values are equal. var arrStacked = stack.get(array); var othStacked = stack.get(other); if (arrStacked && othStacked) { return arrStacked == other && othStacked == array; } var index = -1, result = true, seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined; stack.set(array, other); stack.set(other, array); // Ignore non-index properties. while (++index < arrLength) { var arrValue = array[index], othValue = other[index]; if (customizer) { var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack); } if (compared !== undefined) { if (compared) { continue; } result = false; break; } // Recursively compare arrays (susceptible to call stack limits). if (seen) { if (!arraySome(other, function(othValue, othIndex) { if (!cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { return seen.push(othIndex); } })) { result = false; break; } } else if (!( arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack) )) { result = false; break; } } stack['delete'](array); stack['delete'](other); return result; } module.exports = equalArrays; /***/ }), /***/ "./node_modules/lodash/_equalByTag.js": /*!********************************************!*\ !*** ./node_modules/lodash/_equalByTag.js ***! \********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js"), Uint8Array = __webpack_require__(/*! ./_Uint8Array */ "./node_modules/lodash/_Uint8Array.js"), eq = __webpack_require__(/*! ./eq */ "./node_modules/lodash/eq.js"), equalArrays = __webpack_require__(/*! ./_equalArrays */ "./node_modules/lodash/_equalArrays.js"), mapToArray = __webpack_require__(/*! ./_mapToArray */ "./node_modules/lodash/_mapToArray.js"), setToArray = __webpack_require__(/*! ./_setToArray */ "./node_modules/lodash/_setToArray.js"); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; /** `Object#toString` result references. */ var boolTag = '[object Boolean]', dateTag = '[object Date]', errorTag = '[object Error]', mapTag = '[object Map]', numberTag = '[object Number]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', symbolTag = '[object Symbol]'; var arrayBufferTag = '[object ArrayBuffer]', dataViewTag = '[object DataView]'; /** Used to convert symbols to primitives and strings. */ var symbolProto = Symbol ? Symbol.prototype : undefined, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; /** * A specialized version of `baseIsEqualDeep` for comparing objects of * the same `toStringTag`. * * **Note:** This function only supports comparing values with tags of * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. * * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {string} tag The `toStringTag` of the objects to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} stack Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { switch (tag) { case dataViewTag: if ((object.byteLength != other.byteLength) || (object.byteOffset != other.byteOffset)) { return false; } object = object.buffer; other = other.buffer; case arrayBufferTag: if ((object.byteLength != other.byteLength) || !equalFunc(new Uint8Array(object), new Uint8Array(other))) { return false; } return true; case boolTag: case dateTag: case numberTag: // Coerce booleans to `1` or `0` and dates to milliseconds. // Invalid dates are coerced to `NaN`. return eq(+object, +other); case errorTag: return object.name == other.name && object.message == other.message; case regexpTag: case stringTag: // Coerce regexes to strings and treat strings, primitives and objects, // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring // for more details. return object == (other + ''); case mapTag: var convert = mapToArray; case setTag: var isPartial = bitmask & COMPARE_PARTIAL_FLAG; convert || (convert = setToArray); if (object.size != other.size && !isPartial) { return false; } // Assume cyclic values are equal. var stacked = stack.get(object); if (stacked) { return stacked == other; } bitmask |= COMPARE_UNORDERED_FLAG; // Recursively compare objects (susceptible to call stack limits). stack.set(object, other); var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); stack['delete'](object); return result; case symbolTag: if (symbolValueOf) { return symbolValueOf.call(object) == symbolValueOf.call(other); } } return false; } module.exports = equalByTag; /***/ }), /***/ "./node_modules/lodash/_equalObjects.js": /*!**********************************************!*\ !*** ./node_modules/lodash/_equalObjects.js ***! \**********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var getAllKeys = __webpack_require__(/*! ./_getAllKeys */ "./node_modules/lodash/_getAllKeys.js"); /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1; /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * A specialized version of `baseIsEqualDeep` for objects with support for * partial deep comparisons. * * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} stack Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { var isPartial = bitmask & COMPARE_PARTIAL_FLAG, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length; if (objLength != othLength && !isPartial) { return false; } var index = objLength; while (index--) { var key = objProps[index]; if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { return false; } } // Check that cyclic values are equal. var objStacked = stack.get(object); var othStacked = stack.get(other); if (objStacked && othStacked) { return objStacked == other && othStacked == object; } var result = true; stack.set(object, other); stack.set(other, object); var skipCtor = isPartial; while (++index < objLength) { key = objProps[index]; var objValue = object[key], othValue = other[key]; if (customizer) { var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack); } // Recursively compare objects (susceptible to call stack limits). if (!(compared === undefined ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) : compared )) { result = false; break; } skipCtor || (skipCtor = key == 'constructor'); } if (result && !skipCtor) { var objCtor = object.constructor, othCtor = other.constructor; // Non `Object` object instances with different constructors are not equal. if (objCtor != othCtor && ('constructor' in object && 'constructor' in other) && !(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) { result = false; } } stack['delete'](object); stack['delete'](other); return result; } module.exports = equalObjects; /***/ }), /***/ "./node_modules/lodash/_flatRest.js": /*!******************************************!*\ !*** ./node_modules/lodash/_flatRest.js ***! \******************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var flatten = __webpack_require__(/*! ./flatten */ "./node_modules/lodash/flatten.js"), overRest = __webpack_require__(/*! ./_overRest */ "./node_modules/lodash/_overRest.js"), setToString = __webpack_require__(/*! ./_setToString */ "./node_modules/lodash/_setToString.js"); /** * A specialized version of `baseRest` which flattens the rest array. * * @private * @param {Function} func The function to apply a rest parameter to. * @returns {Function} Returns the new function. */ function flatRest(func) { return setToString(overRest(func, undefined, flatten), func + ''); } module.exports = flatRest; /***/ }), /***/ "./node_modules/lodash/_freeGlobal.js": /*!********************************************!*\ !*** ./node_modules/lodash/_freeGlobal.js ***! \********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { /** Detect free variable `global` from Node.js. */ var freeGlobal = typeof __webpack_require__.g == 'object' && __webpack_require__.g && __webpack_require__.g.Object === Object && __webpack_require__.g; module.exports = freeGlobal; /***/ }), /***/ "./node_modules/lodash/_getAllKeys.js": /*!********************************************!*\ !*** ./node_modules/lodash/_getAllKeys.js ***! \********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseGetAllKeys = __webpack_require__(/*! ./_baseGetAllKeys */ "./node_modules/lodash/_baseGetAllKeys.js"), getSymbols = __webpack_require__(/*! ./_getSymbols */ "./node_modules/lodash/_getSymbols.js"), keys = __webpack_require__(/*! ./keys */ "./node_modules/lodash/keys.js"); /** * Creates an array of own enumerable property names and symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names and symbols. */ function getAllKeys(object) { return baseGetAllKeys(object, keys, getSymbols); } module.exports = getAllKeys; /***/ }), /***/ "./node_modules/lodash/_getAllKeysIn.js": /*!**********************************************!*\ !*** ./node_modules/lodash/_getAllKeysIn.js ***! \**********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseGetAllKeys = __webpack_require__(/*! ./_baseGetAllKeys */ "./node_modules/lodash/_baseGetAllKeys.js"), getSymbolsIn = __webpack_require__(/*! ./_getSymbolsIn */ "./node_modules/lodash/_getSymbolsIn.js"), keysIn = __webpack_require__(/*! ./keysIn */ "./node_modules/lodash/keysIn.js"); /** * Creates an array of own and inherited enumerable property names and * symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names and symbols. */ function getAllKeysIn(object) { return baseGetAllKeys(object, keysIn, getSymbolsIn); } module.exports = getAllKeysIn; /***/ }), /***/ "./node_modules/lodash/_getMapData.js": /*!********************************************!*\ !*** ./node_modules/lodash/_getMapData.js ***! \********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var isKeyable = __webpack_require__(/*! ./_isKeyable */ "./node_modules/lodash/_isKeyable.js"); /** * Gets the data for `map`. * * @private * @param {Object} map The map to query. * @param {string} key The reference key. * @returns {*} Returns the map data. */ function getMapData(map, key) { var data = map.__data__; return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map; } module.exports = getMapData; /***/ }), /***/ "./node_modules/lodash/_getMatchData.js": /*!**********************************************!*\ !*** ./node_modules/lodash/_getMatchData.js ***! \**********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var isStrictComparable = __webpack_require__(/*! ./_isStrictComparable */ "./node_modules/lodash/_isStrictComparable.js"), keys = __webpack_require__(/*! ./keys */ "./node_modules/lodash/keys.js"); /** * Gets the property names, values, and compare flags of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the match data of `object`. */ function getMatchData(object) { var result = keys(object), length = result.length; while (length--) { var key = result[length], value = object[key]; result[length] = [key, value, isStrictComparable(value)]; } return result; } module.exports = getMatchData; /***/ }), /***/ "./node_modules/lodash/_getNative.js": /*!*******************************************!*\ !*** ./node_modules/lodash/_getNative.js ***! \*******************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseIsNative = __webpack_require__(/*! ./_baseIsNative */ "./node_modules/lodash/_baseIsNative.js"), getValue = __webpack_require__(/*! ./_getValue */ "./node_modules/lodash/_getValue.js"); /** * Gets the native function at `key` of `object`. * * @private * @param {Object} object The object to query. * @param {string} key The key of the method to get. * @returns {*} Returns the function if it's native, else `undefined`. */ function getNative(object, key) { var value = getValue(object, key); return baseIsNative(value) ? value : undefined; } module.exports = getNative; /***/ }), /***/ "./node_modules/lodash/_getPrototype.js": /*!**********************************************!*\ !*** ./node_modules/lodash/_getPrototype.js ***! \**********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var overArg = __webpack_require__(/*! ./_overArg */ "./node_modules/lodash/_overArg.js"); /** Built-in value references. */ var getPrototype = overArg(Object.getPrototypeOf, Object); module.exports = getPrototype; /***/ }), /***/ "./node_modules/lodash/_getRawTag.js": /*!*******************************************!*\ !*** ./node_modules/lodash/_getRawTag.js ***! \*******************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js"); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var nativeObjectToString = objectProto.toString; /** Built-in value references. */ var symToStringTag = Symbol ? Symbol.toStringTag : undefined; /** * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. * * @private * @param {*} value The value to query. * @returns {string} Returns the raw `toStringTag`. */ function getRawTag(value) { var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag]; try { value[symToStringTag] = undefined; var unmasked = true; } catch (e) {} var result = nativeObjectToString.call(value); if (unmasked) { if (isOwn) { value[symToStringTag] = tag; } else { delete value[symToStringTag]; } } return result; } module.exports = getRawTag; /***/ }), /***/ "./node_modules/lodash/_getSymbols.js": /*!********************************************!*\ !*** ./node_modules/lodash/_getSymbols.js ***! \********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var arrayFilter = __webpack_require__(/*! ./_arrayFilter */ "./node_modules/lodash/_arrayFilter.js"), stubArray = __webpack_require__(/*! ./stubArray */ "./node_modules/lodash/stubArray.js"); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Built-in value references. */ var propertyIsEnumerable = objectProto.propertyIsEnumerable; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeGetSymbols = Object.getOwnPropertySymbols; /** * Creates an array of the own enumerable symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of symbols. */ var getSymbols = !nativeGetSymbols ? stubArray : function(object) { if (object == null) { return []; } object = Object(object); return arrayFilter(nativeGetSymbols(object), function(symbol) { return propertyIsEnumerable.call(object, symbol); }); }; module.exports = getSymbols; /***/ }), /***/ "./node_modules/lodash/_getSymbolsIn.js": /*!**********************************************!*\ !*** ./node_modules/lodash/_getSymbolsIn.js ***! \**********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var arrayPush = __webpack_require__(/*! ./_arrayPush */ "./node_modules/lodash/_arrayPush.js"), getPrototype = __webpack_require__(/*! ./_getPrototype */ "./node_modules/lodash/_getPrototype.js"), getSymbols = __webpack_require__(/*! ./_getSymbols */ "./node_modules/lodash/_getSymbols.js"), stubArray = __webpack_require__(/*! ./stubArray */ "./node_modules/lodash/stubArray.js"); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeGetSymbols = Object.getOwnPropertySymbols; /** * Creates an array of the own and inherited enumerable symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of symbols. */ var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { var result = []; while (object) { arrayPush(result, getSymbols(object)); object = getPrototype(object); } return result; }; module.exports = getSymbolsIn; /***/ }), /***/ "./node_modules/lodash/_getTag.js": /*!****************************************!*\ !*** ./node_modules/lodash/_getTag.js ***! \****************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var DataView = __webpack_require__(/*! ./_DataView */ "./node_modules/lodash/_DataView.js"), Map = __webpack_require__(/*! ./_Map */ "./node_modules/lodash/_Map.js"), Promise = __webpack_require__(/*! ./_Promise */ "./node_modules/lodash/_Promise.js"), Set = __webpack_require__(/*! ./_Set */ "./node_modules/lodash/_Set.js"), WeakMap = __webpack_require__(/*! ./_WeakMap */ "./node_modules/lodash/_WeakMap.js"), baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"), toSource = __webpack_require__(/*! ./_toSource */ "./node_modules/lodash/_toSource.js"); /** `Object#toString` result references. */ var mapTag = '[object Map]', objectTag = '[object Object]', promiseTag = '[object Promise]', setTag = '[object Set]', weakMapTag = '[object WeakMap]'; var dataViewTag = '[object DataView]'; /** Used to detect maps, sets, and weakmaps. */ var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), promiseCtorString = toSource(Promise), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap); /** * Gets the `toStringTag` of `value`. * * @private * @param {*} value The value to query. * @returns {string} Returns the `toStringTag`. */ var getTag = baseGetTag; // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || (Map && getTag(new Map) != mapTag) || (Promise && getTag(Promise.resolve()) != promiseTag) || (Set && getTag(new Set) != setTag) || (WeakMap && getTag(new WeakMap) != weakMapTag)) { getTag = function(value) { var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : undefined, ctorString = Ctor ? toSource(Ctor) : ''; if (ctorString) { switch (ctorString) { case dataViewCtorString: return dataViewTag; case mapCtorString: return mapTag; case promiseCtorString: return promiseTag; case setCtorString: return setTag; case weakMapCtorString: return weakMapTag; } } return result; }; } module.exports = getTag; /***/ }), /***/ "./node_modules/lodash/_getValue.js": /*!******************************************!*\ !*** ./node_modules/lodash/_getValue.js ***! \******************************************/ /***/ (function(module) { /** * Gets the value at `key` of `object`. * * @private * @param {Object} [object] The object to query. * @param {string} key The key of the property to get. * @returns {*} Returns the property value. */ function getValue(object, key) { return object == null ? undefined : object[key]; } module.exports = getValue; /***/ }), /***/ "./node_modules/lodash/_hasPath.js": /*!*****************************************!*\ !*** ./node_modules/lodash/_hasPath.js ***! \*****************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var castPath = __webpack_require__(/*! ./_castPath */ "./node_modules/lodash/_castPath.js"), isArguments = __webpack_require__(/*! ./isArguments */ "./node_modules/lodash/isArguments.js"), isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"), isIndex = __webpack_require__(/*! ./_isIndex */ "./node_modules/lodash/_isIndex.js"), isLength = __webpack_require__(/*! ./isLength */ "./node_modules/lodash/isLength.js"), toKey = __webpack_require__(/*! ./_toKey */ "./node_modules/lodash/_toKey.js"); /** * Checks if `path` exists on `object`. * * @private * @param {Object} object The object to query. * @param {Array|string} path The path to check. * @param {Function} hasFunc The function to check properties. * @returns {boolean} Returns `true` if `path` exists, else `false`. */ function hasPath(object, path, hasFunc) { path = castPath(path, object); var index = -1, length = path.length, result = false; while (++index < length) { var key = toKey(path[index]); if (!(result = object != null && hasFunc(object, key))) { break; } object = object[key]; } if (result || ++index != length) { return result; } length = object == null ? 0 : object.length; return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object)); } module.exports = hasPath; /***/ }), /***/ "./node_modules/lodash/_hasUnicode.js": /*!********************************************!*\ !*** ./node_modules/lodash/_hasUnicode.js ***! \********************************************/ /***/ (function(module) { /** Used to compose unicode character classes. */ var rsAstralRange = '\\ud800-\\udfff', rsComboMarksRange = '\\u0300-\\u036f', reComboHalfMarksRange = '\\ufe20-\\ufe2f', rsComboSymbolsRange = '\\u20d0-\\u20ff', rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, rsVarRange = '\\ufe0e\\ufe0f'; /** Used to compose unicode capture groups. */ var rsZWJ = '\\u200d'; /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); /** * Checks if `string` contains Unicode symbols. * * @private * @param {string} string The string to inspect. * @returns {boolean} Returns `true` if a symbol is found, else `false`. */ function hasUnicode(string) { return reHasUnicode.test(string); } module.exports = hasUnicode; /***/ }), /***/ "./node_modules/lodash/_hashClear.js": /*!*******************************************!*\ !*** ./node_modules/lodash/_hashClear.js ***! \*******************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ "./node_modules/lodash/_nativeCreate.js"); /** * Removes all key-value entries from the hash. * * @private * @name clear * @memberOf Hash */ function hashClear() { this.__data__ = nativeCreate ? nativeCreate(null) : {}; this.size = 0; } module.exports = hashClear; /***/ }), /***/ "./node_modules/lodash/_hashDelete.js": /*!********************************************!*\ !*** ./node_modules/lodash/_hashDelete.js ***! \********************************************/ /***/ (function(module) { /** * Removes `key` and its value from the hash. * * @private * @name delete * @memberOf Hash * @param {Object} hash The hash to modify. * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function hashDelete(key) { var result = this.has(key) && delete this.__data__[key]; this.size -= result ? 1 : 0; return result; } module.exports = hashDelete; /***/ }), /***/ "./node_modules/lodash/_hashGet.js": /*!*****************************************!*\ !*** ./node_modules/lodash/_hashGet.js ***! \*****************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ "./node_modules/lodash/_nativeCreate.js"); /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED = '__lodash_hash_undefined__'; /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Gets the hash value for `key`. * * @private * @name get * @memberOf Hash * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function hashGet(key) { var data = this.__data__; if (nativeCreate) { var result = data[key]; return result === HASH_UNDEFINED ? undefined : result; } return hasOwnProperty.call(data, key) ? data[key] : undefined; } module.exports = hashGet; /***/ }), /***/ "./node_modules/lodash/_hashHas.js": /*!*****************************************!*\ !*** ./node_modules/lodash/_hashHas.js ***! \*****************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ "./node_modules/lodash/_nativeCreate.js"); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Checks if a hash value for `key` exists. * * @private * @name has * @memberOf Hash * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function hashHas(key) { var data = this.__data__; return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); } module.exports = hashHas; /***/ }), /***/ "./node_modules/lodash/_hashSet.js": /*!*****************************************!*\ !*** ./node_modules/lodash/_hashSet.js ***! \*****************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ "./node_modules/lodash/_nativeCreate.js"); /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED = '__lodash_hash_undefined__'; /** * Sets the hash `key` to `value`. * * @private * @name set * @memberOf Hash * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the hash instance. */ function hashSet(key, value) { var data = this.__data__; this.size += this.has(key) ? 0 : 1; data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; return this; } module.exports = hashSet; /***/ }), /***/ "./node_modules/lodash/_initCloneArray.js": /*!************************************************!*\ !*** ./node_modules/lodash/_initCloneArray.js ***! \************************************************/ /***/ (function(module) { /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Initializes an array clone. * * @private * @param {Array} array The array to clone. * @returns {Array} Returns the initialized clone. */ function initCloneArray(array) { var length = array.length, result = new array.constructor(length); // Add properties assigned by `RegExp#exec`. if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { result.index = array.index; result.input = array.input; } return result; } module.exports = initCloneArray; /***/ }), /***/ "./node_modules/lodash/_initCloneByTag.js": /*!************************************************!*\ !*** ./node_modules/lodash/_initCloneByTag.js ***! \************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var cloneArrayBuffer = __webpack_require__(/*! ./_cloneArrayBuffer */ "./node_modules/lodash/_cloneArrayBuffer.js"), cloneDataView = __webpack_require__(/*! ./_cloneDataView */ "./node_modules/lodash/_cloneDataView.js"), cloneRegExp = __webpack_require__(/*! ./_cloneRegExp */ "./node_modules/lodash/_cloneRegExp.js"), cloneSymbol = __webpack_require__(/*! ./_cloneSymbol */ "./node_modules/lodash/_cloneSymbol.js"), cloneTypedArray = __webpack_require__(/*! ./_cloneTypedArray */ "./node_modules/lodash/_cloneTypedArray.js"); /** `Object#toString` result references. */ var boolTag = '[object Boolean]', dateTag = '[object Date]', mapTag = '[object Map]', numberTag = '[object Number]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', symbolTag = '[object Symbol]'; var arrayBufferTag = '[object ArrayBuffer]', dataViewTag = '[object DataView]', float32Tag = '[object Float32Array]', float64Tag = '[object Float64Array]', int8Tag = '[object Int8Array]', int16Tag = '[object Int16Array]', int32Tag = '[object Int32Array]', uint8Tag = '[object Uint8Array]', uint8ClampedTag = '[object Uint8ClampedArray]', uint16Tag = '[object Uint16Array]', uint32Tag = '[object Uint32Array]'; /** * Initializes an object clone based on its `toStringTag`. * * **Note:** This function only supports cloning values with tags of * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. * * @private * @param {Object} object The object to clone. * @param {string} tag The `toStringTag` of the object to clone. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Object} Returns the initialized clone. */ function initCloneByTag(object, tag, isDeep) { var Ctor = object.constructor; switch (tag) { case arrayBufferTag: return cloneArrayBuffer(object); case boolTag: case dateTag: return new Ctor(+object); case dataViewTag: return cloneDataView(object, isDeep); case float32Tag: case float64Tag: case int8Tag: case int16Tag: case int32Tag: case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: return cloneTypedArray(object, isDeep); case mapTag: return new Ctor; case numberTag: case stringTag: return new Ctor(object); case regexpTag: return cloneRegExp(object); case setTag: return new Ctor; case symbolTag: return cloneSymbol(object); } } module.exports = initCloneByTag; /***/ }), /***/ "./node_modules/lodash/_initCloneObject.js": /*!*************************************************!*\ !*** ./node_modules/lodash/_initCloneObject.js ***! \*************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseCreate = __webpack_require__(/*! ./_baseCreate */ "./node_modules/lodash/_baseCreate.js"), getPrototype = __webpack_require__(/*! ./_getPrototype */ "./node_modules/lodash/_getPrototype.js"), isPrototype = __webpack_require__(/*! ./_isPrototype */ "./node_modules/lodash/_isPrototype.js"); /** * Initializes an object clone. * * @private * @param {Object} object The object to clone. * @returns {Object} Returns the initialized clone. */ function initCloneObject(object) { return (typeof object.constructor == 'function' && !isPrototype(object)) ? baseCreate(getPrototype(object)) : {}; } module.exports = initCloneObject; /***/ }), /***/ "./node_modules/lodash/_isFlattenable.js": /*!***********************************************!*\ !*** ./node_modules/lodash/_isFlattenable.js ***! \***********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var Symbol = __webpack_require__(/*! ./_Symbol */ "./node_modules/lodash/_Symbol.js"), isArguments = __webpack_require__(/*! ./isArguments */ "./node_modules/lodash/isArguments.js"), isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"); /** Built-in value references. */ var spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined; /** * Checks if `value` is a flattenable `arguments` object or array. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. */ function isFlattenable(value) { return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]); } module.exports = isFlattenable; /***/ }), /***/ "./node_modules/lodash/_isIndex.js": /*!*****************************************!*\ !*** ./node_modules/lodash/_isIndex.js ***! \*****************************************/ /***/ (function(module) { /** Used as references for various `Number` constants. */ var MAX_SAFE_INTEGER = 9007199254740991; /** Used to detect unsigned integer values. */ var reIsUint = /^(?:0|[1-9]\d*)$/; /** * Checks if `value` is a valid array-like index. * * @private * @param {*} value The value to check. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. */ function isIndex(value, length) { var type = typeof value; length = length == null ? MAX_SAFE_INTEGER : length; return !!length && (type == 'number' || (type != 'symbol' && reIsUint.test(value))) && (value > -1 && value % 1 == 0 && value < length); } module.exports = isIndex; /***/ }), /***/ "./node_modules/lodash/_isIterateeCall.js": /*!************************************************!*\ !*** ./node_modules/lodash/_isIterateeCall.js ***! \************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var eq = __webpack_require__(/*! ./eq */ "./node_modules/lodash/eq.js"), isArrayLike = __webpack_require__(/*! ./isArrayLike */ "./node_modules/lodash/isArrayLike.js"), isIndex = __webpack_require__(/*! ./_isIndex */ "./node_modules/lodash/_isIndex.js"), isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"); /** * Checks if the given arguments are from an iteratee call. * * @private * @param {*} value The potential iteratee value argument. * @param {*} index The potential iteratee index or key argument. * @param {*} object The potential iteratee object argument. * @returns {boolean} Returns `true` if the arguments are from an iteratee call, * else `false`. */ function isIterateeCall(value, index, object) { if (!isObject(object)) { return false; } var type = typeof index; if (type == 'number' ? (isArrayLike(object) && isIndex(index, object.length)) : (type == 'string' && index in object) ) { return eq(object[index], value); } return false; } module.exports = isIterateeCall; /***/ }), /***/ "./node_modules/lodash/_isKey.js": /*!***************************************!*\ !*** ./node_modules/lodash/_isKey.js ***! \***************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"), isSymbol = __webpack_require__(/*! ./isSymbol */ "./node_modules/lodash/isSymbol.js"); /** Used to match property names within property paths. */ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/; /** * Checks if `value` is a property name and not a property path. * * @private * @param {*} value The value to check. * @param {Object} [object] The object to query keys on. * @returns {boolean} Returns `true` if `value` is a property name, else `false`. */ function isKey(value, object) { if (isArray(value)) { return false; } var type = typeof value; if (type == 'number' || type == 'symbol' || type == 'boolean' || value == null || isSymbol(value)) { return true; } return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || (object != null && value in Object(object)); } module.exports = isKey; /***/ }), /***/ "./node_modules/lodash/_isKeyable.js": /*!*******************************************!*\ !*** ./node_modules/lodash/_isKeyable.js ***! \*******************************************/ /***/ (function(module) { /** * Checks if `value` is suitable for use as unique object key. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is suitable, else `false`. */ function isKeyable(value) { var type = typeof value; return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') ? (value !== '__proto__') : (value === null); } module.exports = isKeyable; /***/ }), /***/ "./node_modules/lodash/_isMasked.js": /*!******************************************!*\ !*** ./node_modules/lodash/_isMasked.js ***! \******************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var coreJsData = __webpack_require__(/*! ./_coreJsData */ "./node_modules/lodash/_coreJsData.js"); /** Used to detect methods masquerading as native. */ var maskSrcKey = (function() { var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); return uid ? ('Symbol(src)_1.' + uid) : ''; }()); /** * Checks if `func` has its source masked. * * @private * @param {Function} func The function to check. * @returns {boolean} Returns `true` if `func` is masked, else `false`. */ function isMasked(func) { return !!maskSrcKey && (maskSrcKey in func); } module.exports = isMasked; /***/ }), /***/ "./node_modules/lodash/_isPrototype.js": /*!*********************************************!*\ !*** ./node_modules/lodash/_isPrototype.js ***! \*********************************************/ /***/ (function(module) { /** Used for built-in method references. */ var objectProto = Object.prototype; /** * Checks if `value` is likely a prototype object. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. */ function isPrototype(value) { var Ctor = value && value.constructor, proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; return value === proto; } module.exports = isPrototype; /***/ }), /***/ "./node_modules/lodash/_isStrictComparable.js": /*!****************************************************!*\ !*** ./node_modules/lodash/_isStrictComparable.js ***! \****************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"); /** * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` if suitable for strict * equality comparisons, else `false`. */ function isStrictComparable(value) { return value === value && !isObject(value); } module.exports = isStrictComparable; /***/ }), /***/ "./node_modules/lodash/_listCacheClear.js": /*!************************************************!*\ !*** ./node_modules/lodash/_listCacheClear.js ***! \************************************************/ /***/ (function(module) { /** * Removes all key-value entries from the list cache. * * @private * @name clear * @memberOf ListCache */ function listCacheClear() { this.__data__ = []; this.size = 0; } module.exports = listCacheClear; /***/ }), /***/ "./node_modules/lodash/_listCacheDelete.js": /*!*************************************************!*\ !*** ./node_modules/lodash/_listCacheDelete.js ***! \*************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ "./node_modules/lodash/_assocIndexOf.js"); /** Used for built-in method references. */ var arrayProto = Array.prototype; /** Built-in value references. */ var splice = arrayProto.splice; /** * Removes `key` and its value from the list cache. * * @private * @name delete * @memberOf ListCache * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function listCacheDelete(key) { var data = this.__data__, index = assocIndexOf(data, key); if (index < 0) { return false; } var lastIndex = data.length - 1; if (index == lastIndex) { data.pop(); } else { splice.call(data, index, 1); } --this.size; return true; } module.exports = listCacheDelete; /***/ }), /***/ "./node_modules/lodash/_listCacheGet.js": /*!**********************************************!*\ !*** ./node_modules/lodash/_listCacheGet.js ***! \**********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ "./node_modules/lodash/_assocIndexOf.js"); /** * Gets the list cache value for `key`. * * @private * @name get * @memberOf ListCache * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function listCacheGet(key) { var data = this.__data__, index = assocIndexOf(data, key); return index < 0 ? undefined : data[index][1]; } module.exports = listCacheGet; /***/ }), /***/ "./node_modules/lodash/_listCacheHas.js": /*!**********************************************!*\ !*** ./node_modules/lodash/_listCacheHas.js ***! \**********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ "./node_modules/lodash/_assocIndexOf.js"); /** * Checks if a list cache value for `key` exists. * * @private * @name has * @memberOf ListCache * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function listCacheHas(key) { return assocIndexOf(this.__data__, key) > -1; } module.exports = listCacheHas; /***/ }), /***/ "./node_modules/lodash/_listCacheSet.js": /*!**********************************************!*\ !*** ./node_modules/lodash/_listCacheSet.js ***! \**********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ "./node_modules/lodash/_assocIndexOf.js"); /** * Sets the list cache `key` to `value`. * * @private * @name set * @memberOf ListCache * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the list cache instance. */ function listCacheSet(key, value) { var data = this.__data__, index = assocIndexOf(data, key); if (index < 0) { ++this.size; data.push([key, value]); } else { data[index][1] = value; } return this; } module.exports = listCacheSet; /***/ }), /***/ "./node_modules/lodash/_mapCacheClear.js": /*!***********************************************!*\ !*** ./node_modules/lodash/_mapCacheClear.js ***! \***********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var Hash = __webpack_require__(/*! ./_Hash */ "./node_modules/lodash/_Hash.js"), ListCache = __webpack_require__(/*! ./_ListCache */ "./node_modules/lodash/_ListCache.js"), Map = __webpack_require__(/*! ./_Map */ "./node_modules/lodash/_Map.js"); /** * Removes all key-value entries from the map. * * @private * @name clear * @memberOf MapCache */ function mapCacheClear() { this.size = 0; this.__data__ = { 'hash': new Hash, 'map': new (Map || ListCache), 'string': new Hash }; } module.exports = mapCacheClear; /***/ }), /***/ "./node_modules/lodash/_mapCacheDelete.js": /*!************************************************!*\ !*** ./node_modules/lodash/_mapCacheDelete.js ***! \************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var getMapData = __webpack_require__(/*! ./_getMapData */ "./node_modules/lodash/_getMapData.js"); /** * Removes `key` and its value from the map. * * @private * @name delete * @memberOf MapCache * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function mapCacheDelete(key) { var result = getMapData(this, key)['delete'](key); this.size -= result ? 1 : 0; return result; } module.exports = mapCacheDelete; /***/ }), /***/ "./node_modules/lodash/_mapCacheGet.js": /*!*********************************************!*\ !*** ./node_modules/lodash/_mapCacheGet.js ***! \*********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var getMapData = __webpack_require__(/*! ./_getMapData */ "./node_modules/lodash/_getMapData.js"); /** * Gets the map value for `key`. * * @private * @name get * @memberOf MapCache * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function mapCacheGet(key) { return getMapData(this, key).get(key); } module.exports = mapCacheGet; /***/ }), /***/ "./node_modules/lodash/_mapCacheHas.js": /*!*********************************************!*\ !*** ./node_modules/lodash/_mapCacheHas.js ***! \*********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var getMapData = __webpack_require__(/*! ./_getMapData */ "./node_modules/lodash/_getMapData.js"); /** * Checks if a map value for `key` exists. * * @private * @name has * @memberOf MapCache * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function mapCacheHas(key) { return getMapData(this, key).has(key); } module.exports = mapCacheHas; /***/ }), /***/ "./node_modules/lodash/_mapCacheSet.js": /*!*********************************************!*\ !*** ./node_modules/lodash/_mapCacheSet.js ***! \*********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var getMapData = __webpack_require__(/*! ./_getMapData */ "./node_modules/lodash/_getMapData.js"); /** * Sets the map `key` to `value`. * * @private * @name set * @memberOf MapCache * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the map cache instance. */ function mapCacheSet(key, value) { var data = getMapData(this, key), size = data.size; data.set(key, value); this.size += data.size == size ? 0 : 1; return this; } module.exports = mapCacheSet; /***/ }), /***/ "./node_modules/lodash/_mapToArray.js": /*!********************************************!*\ !*** ./node_modules/lodash/_mapToArray.js ***! \********************************************/ /***/ (function(module) { /** * Converts `map` to its key-value pairs. * * @private * @param {Object} map The map to convert. * @returns {Array} Returns the key-value pairs. */ function mapToArray(map) { var index = -1, result = Array(map.size); map.forEach(function(value, key) { result[++index] = [key, value]; }); return result; } module.exports = mapToArray; /***/ }), /***/ "./node_modules/lodash/_matchesStrictComparable.js": /*!*********************************************************!*\ !*** ./node_modules/lodash/_matchesStrictComparable.js ***! \*********************************************************/ /***/ (function(module) { /** * A specialized version of `matchesProperty` for source values suitable * for strict equality comparisons, i.e. `===`. * * @private * @param {string} key The key of the property to get. * @param {*} srcValue The value to match. * @returns {Function} Returns the new spec function. */ function matchesStrictComparable(key, srcValue) { return function(object) { if (object == null) { return false; } return object[key] === srcValue && (srcValue !== undefined || (key in Object(object))); }; } module.exports = matchesStrictComparable; /***/ }), /***/ "./node_modules/lodash/_memoizeCapped.js": /*!***********************************************!*\ !*** ./node_modules/lodash/_memoizeCapped.js ***! \***********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var memoize = __webpack_require__(/*! ./memoize */ "./node_modules/lodash/memoize.js"); /** Used as the maximum memoize cache size. */ var MAX_MEMOIZE_SIZE = 500; /** * A specialized version of `_.memoize` which clears the memoized function's * cache when it exceeds `MAX_MEMOIZE_SIZE`. * * @private * @param {Function} func The function to have its output memoized. * @returns {Function} Returns the new memoized function. */ function memoizeCapped(func) { var result = memoize(func, function(key) { if (cache.size === MAX_MEMOIZE_SIZE) { cache.clear(); } return key; }); var cache = result.cache; return result; } module.exports = memoizeCapped; /***/ }), /***/ "./node_modules/lodash/_nativeCreate.js": /*!**********************************************!*\ !*** ./node_modules/lodash/_nativeCreate.js ***! \**********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var getNative = __webpack_require__(/*! ./_getNative */ "./node_modules/lodash/_getNative.js"); /* Built-in method references that are verified to be native. */ var nativeCreate = getNative(Object, 'create'); module.exports = nativeCreate; /***/ }), /***/ "./node_modules/lodash/_nativeKeys.js": /*!********************************************!*\ !*** ./node_modules/lodash/_nativeKeys.js ***! \********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var overArg = __webpack_require__(/*! ./_overArg */ "./node_modules/lodash/_overArg.js"); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeKeys = overArg(Object.keys, Object); module.exports = nativeKeys; /***/ }), /***/ "./node_modules/lodash/_nativeKeysIn.js": /*!**********************************************!*\ !*** ./node_modules/lodash/_nativeKeysIn.js ***! \**********************************************/ /***/ (function(module) { /** * This function is like * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) * except that it includes inherited enumerable properties. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ function nativeKeysIn(object) { var result = []; if (object != null) { for (var key in Object(object)) { result.push(key); } } return result; } module.exports = nativeKeysIn; /***/ }), /***/ "./node_modules/lodash/_nodeUtil.js": /*!******************************************!*\ !*** ./node_modules/lodash/_nodeUtil.js ***! \******************************************/ /***/ (function(module, exports, __webpack_require__) { /* module decorator */ module = __webpack_require__.nmd(module); var freeGlobal = __webpack_require__(/*! ./_freeGlobal */ "./node_modules/lodash/_freeGlobal.js"); /** Detect free variable `exports`. */ var freeExports = true && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ var freeModule = freeExports && "object" == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; /** Detect free variable `process` from Node.js. */ var freeProcess = moduleExports && freeGlobal.process; /** Used to access faster Node.js helpers. */ var nodeUtil = (function() { try { // Use `util.types` for Node.js 10+. var types = freeModule && freeModule.require && freeModule.require('util').types; if (types) { return types; } // Legacy `process.binding('util')` for Node.js < 10. return freeProcess && freeProcess.binding && freeProcess.binding('util'); } catch (e) {} }()); module.exports = nodeUtil; /***/ }), /***/ "./node_modules/lodash/_objectToString.js": /*!************************************************!*\ !*** ./node_modules/lodash/_objectToString.js ***! \************************************************/ /***/ (function(module) { /** Used for built-in method references. */ var objectProto = Object.prototype; /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var nativeObjectToString = objectProto.toString; /** * Converts `value` to a string using `Object.prototype.toString`. * * @private * @param {*} value The value to convert. * @returns {string} Returns the converted string. */ function objectToString(value) { return nativeObjectToString.call(value); } module.exports = objectToString; /***/ }), /***/ "./node_modules/lodash/_overArg.js": /*!*****************************************!*\ !*** ./node_modules/lodash/_overArg.js ***! \*****************************************/ /***/ (function(module) { /** * Creates a unary function that invokes `func` with its argument transformed. * * @private * @param {Function} func The function to wrap. * @param {Function} transform The argument transform. * @returns {Function} Returns the new function. */ function overArg(func, transform) { return function(arg) { return func(transform(arg)); }; } module.exports = overArg; /***/ }), /***/ "./node_modules/lodash/_overRest.js": /*!******************************************!*\ !*** ./node_modules/lodash/_overRest.js ***! \******************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var apply = __webpack_require__(/*! ./_apply */ "./node_modules/lodash/_apply.js"); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax = Math.max; /** * A specialized version of `baseRest` which transforms the rest array. * * @private * @param {Function} func The function to apply a rest parameter to. * @param {number} [start=func.length-1] The start position of the rest parameter. * @param {Function} transform The rest array transform. * @returns {Function} Returns the new function. */ function overRest(func, start, transform) { start = nativeMax(start === undefined ? (func.length - 1) : start, 0); return function() { var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length); while (++index < length) { array[index] = args[start + index]; } index = -1; var otherArgs = Array(start + 1); while (++index < start) { otherArgs[index] = args[index]; } otherArgs[start] = transform(array); return apply(func, this, otherArgs); }; } module.exports = overRest; /***/ }), /***/ "./node_modules/lodash/_root.js": /*!**************************************!*\ !*** ./node_modules/lodash/_root.js ***! \**************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var freeGlobal = __webpack_require__(/*! ./_freeGlobal */ "./node_modules/lodash/_freeGlobal.js"); /** Detect free variable `self`. */ var freeSelf = typeof self == 'object' && self && self.Object === Object && self; /** Used as a reference to the global object. */ var root = freeGlobal || freeSelf || Function('return this')(); module.exports = root; /***/ }), /***/ "./node_modules/lodash/_safeGet.js": /*!*****************************************!*\ !*** ./node_modules/lodash/_safeGet.js ***! \*****************************************/ /***/ (function(module) { /** * Gets the value at `key`, unless `key` is "__proto__" or "constructor". * * @private * @param {Object} object The object to query. * @param {string} key The key of the property to get. * @returns {*} Returns the property value. */ function safeGet(object, key) { if (key === 'constructor' && typeof object[key] === 'function') { return; } if (key == '__proto__') { return; } return object[key]; } module.exports = safeGet; /***/ }), /***/ "./node_modules/lodash/_setCacheAdd.js": /*!*********************************************!*\ !*** ./node_modules/lodash/_setCacheAdd.js ***! \*********************************************/ /***/ (function(module) { /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED = '__lodash_hash_undefined__'; /** * Adds `value` to the array cache. * * @private * @name add * @memberOf SetCache * @alias push * @param {*} value The value to cache. * @returns {Object} Returns the cache instance. */ function setCacheAdd(value) { this.__data__.set(value, HASH_UNDEFINED); return this; } module.exports = setCacheAdd; /***/ }), /***/ "./node_modules/lodash/_setCacheHas.js": /*!*********************************************!*\ !*** ./node_modules/lodash/_setCacheHas.js ***! \*********************************************/ /***/ (function(module) { /** * Checks if `value` is in the array cache. * * @private * @name has * @memberOf SetCache * @param {*} value The value to search for. * @returns {number} Returns `true` if `value` is found, else `false`. */ function setCacheHas(value) { return this.__data__.has(value); } module.exports = setCacheHas; /***/ }), /***/ "./node_modules/lodash/_setToArray.js": /*!********************************************!*\ !*** ./node_modules/lodash/_setToArray.js ***! \********************************************/ /***/ (function(module) { /** * Converts `set` to an array of its values. * * @private * @param {Object} set The set to convert. * @returns {Array} Returns the values. */ function setToArray(set) { var index = -1, result = Array(set.size); set.forEach(function(value) { result[++index] = value; }); return result; } module.exports = setToArray; /***/ }), /***/ "./node_modules/lodash/_setToString.js": /*!*********************************************!*\ !*** ./node_modules/lodash/_setToString.js ***! \*********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseSetToString = __webpack_require__(/*! ./_baseSetToString */ "./node_modules/lodash/_baseSetToString.js"), shortOut = __webpack_require__(/*! ./_shortOut */ "./node_modules/lodash/_shortOut.js"); /** * Sets the `toString` method of `func` to return `string`. * * @private * @param {Function} func The function to modify. * @param {Function} string The `toString` result. * @returns {Function} Returns `func`. */ var setToString = shortOut(baseSetToString); module.exports = setToString; /***/ }), /***/ "./node_modules/lodash/_shortOut.js": /*!******************************************!*\ !*** ./node_modules/lodash/_shortOut.js ***! \******************************************/ /***/ (function(module) { /** Used to detect hot functions by number of calls within a span of milliseconds. */ var HOT_COUNT = 800, HOT_SPAN = 16; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeNow = Date.now; /** * Creates a function that'll short out and invoke `identity` instead * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` * milliseconds. * * @private * @param {Function} func The function to restrict. * @returns {Function} Returns the new shortable function. */ function shortOut(func) { var count = 0, lastCalled = 0; return function() { var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled); lastCalled = stamp; if (remaining > 0) { if (++count >= HOT_COUNT) { return arguments[0]; } } else { count = 0; } return func.apply(undefined, arguments); }; } module.exports = shortOut; /***/ }), /***/ "./node_modules/lodash/_stackClear.js": /*!********************************************!*\ !*** ./node_modules/lodash/_stackClear.js ***! \********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var ListCache = __webpack_require__(/*! ./_ListCache */ "./node_modules/lodash/_ListCache.js"); /** * Removes all key-value entries from the stack. * * @private * @name clear * @memberOf Stack */ function stackClear() { this.__data__ = new ListCache; this.size = 0; } module.exports = stackClear; /***/ }), /***/ "./node_modules/lodash/_stackDelete.js": /*!*********************************************!*\ !*** ./node_modules/lodash/_stackDelete.js ***! \*********************************************/ /***/ (function(module) { /** * Removes `key` and its value from the stack. * * @private * @name delete * @memberOf Stack * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function stackDelete(key) { var data = this.__data__, result = data['delete'](key); this.size = data.size; return result; } module.exports = stackDelete; /***/ }), /***/ "./node_modules/lodash/_stackGet.js": /*!******************************************!*\ !*** ./node_modules/lodash/_stackGet.js ***! \******************************************/ /***/ (function(module) { /** * Gets the stack value for `key`. * * @private * @name get * @memberOf Stack * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function stackGet(key) { return this.__data__.get(key); } module.exports = stackGet; /***/ }), /***/ "./node_modules/lodash/_stackHas.js": /*!******************************************!*\ !*** ./node_modules/lodash/_stackHas.js ***! \******************************************/ /***/ (function(module) { /** * Checks if a stack value for `key` exists. * * @private * @name has * @memberOf Stack * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function stackHas(key) { return this.__data__.has(key); } module.exports = stackHas; /***/ }), /***/ "./node_modules/lodash/_stackSet.js": /*!******************************************!*\ !*** ./node_modules/lodash/_stackSet.js ***! \******************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var ListCache = __webpack_require__(/*! ./_ListCache */ "./node_modules/lodash/_ListCache.js"), Map = __webpack_require__(/*! ./_Map */ "./node_modules/lodash/_Map.js"), MapCache = __webpack_require__(/*! ./_MapCache */ "./node_modules/lodash/_MapCache.js"); /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; /** * Sets the stack `key` to `value`. * * @private * @name set * @memberOf Stack * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the stack cache instance. */ function stackSet(key, value) { var data = this.__data__; if (data instanceof ListCache) { var pairs = data.__data__; if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { pairs.push([key, value]); this.size = ++data.size; return this; } data = this.__data__ = new MapCache(pairs); } data.set(key, value); this.size = data.size; return this; } module.exports = stackSet; /***/ }), /***/ "./node_modules/lodash/_strictIndexOf.js": /*!***********************************************!*\ !*** ./node_modules/lodash/_strictIndexOf.js ***! \***********************************************/ /***/ (function(module) { /** * A specialized version of `_.indexOf` which performs strict equality * comparisons of values, i.e. `===`. * * @private * @param {Array} array The array to inspect. * @param {*} value The value to search for. * @param {number} fromIndex The index to search from. * @returns {number} Returns the index of the matched value, else `-1`. */ function strictIndexOf(array, value, fromIndex) { var index = fromIndex - 1, length = array.length; while (++index < length) { if (array[index] === value) { return index; } } return -1; } module.exports = strictIndexOf; /***/ }), /***/ "./node_modules/lodash/_stringSize.js": /*!********************************************!*\ !*** ./node_modules/lodash/_stringSize.js ***! \********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var asciiSize = __webpack_require__(/*! ./_asciiSize */ "./node_modules/lodash/_asciiSize.js"), hasUnicode = __webpack_require__(/*! ./_hasUnicode */ "./node_modules/lodash/_hasUnicode.js"), unicodeSize = __webpack_require__(/*! ./_unicodeSize */ "./node_modules/lodash/_unicodeSize.js"); /** * Gets the number of symbols in `string`. * * @private * @param {string} string The string to inspect. * @returns {number} Returns the string size. */ function stringSize(string) { return hasUnicode(string) ? unicodeSize(string) : asciiSize(string); } module.exports = stringSize; /***/ }), /***/ "./node_modules/lodash/_stringToPath.js": /*!**********************************************!*\ !*** ./node_modules/lodash/_stringToPath.js ***! \**********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var memoizeCapped = __webpack_require__(/*! ./_memoizeCapped */ "./node_modules/lodash/_memoizeCapped.js"); /** Used to match property names within property paths. */ var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; /** Used to match backslashes in property paths. */ var reEscapeChar = /\\(\\)?/g; /** * Converts `string` to a property path array. * * @private * @param {string} string The string to convert. * @returns {Array} Returns the property path array. */ var stringToPath = memoizeCapped(function(string) { var result = []; if (string.charCodeAt(0) === 46 /* . */) { result.push(''); } string.replace(rePropName, function(match, number, quote, subString) { result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); }); return result; }); module.exports = stringToPath; /***/ }), /***/ "./node_modules/lodash/_toKey.js": /*!***************************************!*\ !*** ./node_modules/lodash/_toKey.js ***! \***************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var isSymbol = __webpack_require__(/*! ./isSymbol */ "./node_modules/lodash/isSymbol.js"); /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0; /** * Converts `value` to a string key if it's not a string or symbol. * * @private * @param {*} value The value to inspect. * @returns {string|symbol} Returns the key. */ function toKey(value) { if (typeof value == 'string' || isSymbol(value)) { return value; } var result = (value + ''); return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; } module.exports = toKey; /***/ }), /***/ "./node_modules/lodash/_toSource.js": /*!******************************************!*\ !*** ./node_modules/lodash/_toSource.js ***! \******************************************/ /***/ (function(module) { /** Used for built-in method references. */ var funcProto = Function.prototype; /** Used to resolve the decompiled source of functions. */ var funcToString = funcProto.toString; /** * Converts `func` to its source code. * * @private * @param {Function} func The function to convert. * @returns {string} Returns the source code. */ function toSource(func) { if (func != null) { try { return funcToString.call(func); } catch (e) {} try { return (func + ''); } catch (e) {} } return ''; } module.exports = toSource; /***/ }), /***/ "./node_modules/lodash/_trimmedEndIndex.js": /*!*************************************************!*\ !*** ./node_modules/lodash/_trimmedEndIndex.js ***! \*************************************************/ /***/ (function(module) { /** Used to match a single whitespace character. */ var reWhitespace = /\s/; /** * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace * character of `string`. * * @private * @param {string} string The string to inspect. * @returns {number} Returns the index of the last non-whitespace character. */ function trimmedEndIndex(string) { var index = string.length; while (index-- && reWhitespace.test(string.charAt(index))) {} return index; } module.exports = trimmedEndIndex; /***/ }), /***/ "./node_modules/lodash/_unicodeSize.js": /*!*********************************************!*\ !*** ./node_modules/lodash/_unicodeSize.js ***! \*********************************************/ /***/ (function(module) { /** Used to compose unicode character classes. */ var rsAstralRange = '\\ud800-\\udfff', rsComboMarksRange = '\\u0300-\\u036f', reComboHalfMarksRange = '\\ufe20-\\ufe2f', rsComboSymbolsRange = '\\u20d0-\\u20ff', rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, rsVarRange = '\\ufe0e\\ufe0f'; /** Used to compose unicode capture groups. */ var rsAstral = '[' + rsAstralRange + ']', rsCombo = '[' + rsComboRange + ']', rsFitz = '\\ud83c[\\udffb-\\udfff]', rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', rsNonAstral = '[^' + rsAstralRange + ']', rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', rsZWJ = '\\u200d'; /** Used to compose unicode regexes. */ var reOptMod = rsModifier + '?', rsOptVar = '[' + rsVarRange + ']?', rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', rsSeq = rsOptVar + reOptMod + rsOptJoin, rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); /** * Gets the size of a Unicode `string`. * * @private * @param {string} string The string inspect. * @returns {number} Returns the string size. */ function unicodeSize(string) { var result = reUnicode.lastIndex = 0; while (reUnicode.test(string)) { ++result; } return result; } module.exports = unicodeSize; /***/ }), /***/ "./node_modules/lodash/clone.js": /*!**************************************!*\ !*** ./node_modules/lodash/clone.js ***! \**************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseClone = __webpack_require__(/*! ./_baseClone */ "./node_modules/lodash/_baseClone.js"); /** Used to compose bitmasks for cloning. */ var CLONE_SYMBOLS_FLAG = 4; /** * Creates a shallow clone of `value`. * * **Note:** This method is loosely based on the * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) * and supports cloning arrays, array buffers, booleans, date objects, maps, * numbers, `Object` objects, regexes, sets, strings, symbols, and typed * arrays. The own enumerable properties of `arguments` objects are cloned * as plain objects. An empty object is returned for uncloneable values such * as error objects, functions, DOM nodes, and WeakMaps. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to clone. * @returns {*} Returns the cloned value. * @see _.cloneDeep * @example * * var objects = [{ 'a': 1 }, { 'b': 2 }]; * * var shallow = _.clone(objects); * console.log(shallow[0] === objects[0]); * // => true */ function clone(value) { return baseClone(value, CLONE_SYMBOLS_FLAG); } module.exports = clone; /***/ }), /***/ "./node_modules/lodash/cloneDeep.js": /*!******************************************!*\ !*** ./node_modules/lodash/cloneDeep.js ***! \******************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseClone = __webpack_require__(/*! ./_baseClone */ "./node_modules/lodash/_baseClone.js"); /** Used to compose bitmasks for cloning. */ var CLONE_DEEP_FLAG = 1, CLONE_SYMBOLS_FLAG = 4; /** * This method is like `_.clone` except that it recursively clones `value`. * * @static * @memberOf _ * @since 1.0.0 * @category Lang * @param {*} value The value to recursively clone. * @returns {*} Returns the deep cloned value. * @see _.clone * @example * * var objects = [{ 'a': 1 }, { 'b': 2 }]; * * var deep = _.cloneDeep(objects); * console.log(deep[0] === objects[0]); * // => false */ function cloneDeep(value) { return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); } module.exports = cloneDeep; /***/ }), /***/ "./node_modules/lodash/constant.js": /*!*****************************************!*\ !*** ./node_modules/lodash/constant.js ***! \*****************************************/ /***/ (function(module) { /** * Creates a function that returns `value`. * * @static * @memberOf _ * @since 2.4.0 * @category Util * @param {*} value The value to return from the new function. * @returns {Function} Returns the new constant function. * @example * * var objects = _.times(2, _.constant({ 'a': 1 })); * * console.log(objects); * // => [{ 'a': 1 }, { 'a': 1 }] * * console.log(objects[0] === objects[1]); * // => true */ function constant(value) { return function() { return value; }; } module.exports = constant; /***/ }), /***/ "./node_modules/lodash/debounce.js": /*!*****************************************!*\ !*** ./node_modules/lodash/debounce.js ***! \*****************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"), now = __webpack_require__(/*! ./now */ "./node_modules/lodash/now.js"), toNumber = __webpack_require__(/*! ./toNumber */ "./node_modules/lodash/toNumber.js"); /** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax = Math.max, nativeMin = Math.min; /** * Creates a debounced function that delays invoking `func` until after `wait` * milliseconds have elapsed since the last time the debounced function was * invoked. The debounced function comes with a `cancel` method to cancel * delayed `func` invocations and a `flush` method to immediately invoke them. * Provide `options` to indicate whether `func` should be invoked on the * leading and/or trailing edge of the `wait` timeout. The `func` is invoked * with the last arguments provided to the debounced function. Subsequent * calls to the debounced function return the result of the last `func` * invocation. * * **Note:** If `leading` and `trailing` options are `true`, `func` is * invoked on the trailing edge of the timeout only if the debounced function * is invoked more than once during the `wait` timeout. * * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred * until to the next tick, similar to `setTimeout` with a timeout of `0`. * * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) * for details over the differences between `_.debounce` and `_.throttle`. * * @static * @memberOf _ * @since 0.1.0 * @category Function * @param {Function} func The function to debounce. * @param {number} [wait=0] The number of milliseconds to delay. * @param {Object} [options={}] The options object. * @param {boolean} [options.leading=false] * Specify invoking on the leading edge of the timeout. * @param {number} [options.maxWait] * The maximum time `func` is allowed to be delayed before it's invoked. * @param {boolean} [options.trailing=true] * Specify invoking on the trailing edge of the timeout. * @returns {Function} Returns the new debounced function. * @example * * // Avoid costly calculations while the window size is in flux. * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); * * // Invoke `sendMail` when clicked, debouncing subsequent calls. * jQuery(element).on('click', _.debounce(sendMail, 300, { * 'leading': true, * 'trailing': false * })); * * // Ensure `batchLog` is invoked once after 1 second of debounced calls. * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); * var source = new EventSource('/stream'); * jQuery(source).on('message', debounced); * * // Cancel the trailing debounced invocation. * jQuery(window).on('popstate', debounced.cancel); */ function debounce(func, wait, options) { var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true; if (typeof func != 'function') { throw new TypeError(FUNC_ERROR_TEXT); } wait = toNumber(wait) || 0; if (isObject(options)) { leading = !!options.leading; maxing = 'maxWait' in options; maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; trailing = 'trailing' in options ? !!options.trailing : trailing; } function invokeFunc(time) { var args = lastArgs, thisArg = lastThis; lastArgs = lastThis = undefined; lastInvokeTime = time; result = func.apply(thisArg, args); return result; } function leadingEdge(time) { // Reset any `maxWait` timer. lastInvokeTime = time; // Start the timer for the trailing edge. timerId = setTimeout(timerExpired, wait); // Invoke the leading edge. return leading ? invokeFunc(time) : result; } function remainingWait(time) { var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, timeWaiting = wait - timeSinceLastCall; return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting; } function shouldInvoke(time) { var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime; // Either this is the first call, activity has stopped and we're at the // trailing edge, the system time has gone backwards and we're treating // it as the trailing edge, or we've hit the `maxWait` limit. return (lastCallTime === undefined || (timeSinceLastCall >= wait) || (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); } function timerExpired() { var time = now(); if (shouldInvoke(time)) { return trailingEdge(time); } // Restart the timer. timerId = setTimeout(timerExpired, remainingWait(time)); } function trailingEdge(time) { timerId = undefined; // Only invoke if we have `lastArgs` which means `func` has been // debounced at least once. if (trailing && lastArgs) { return invokeFunc(time); } lastArgs = lastThis = undefined; return result; } function cancel() { if (timerId !== undefined) { clearTimeout(timerId); } lastInvokeTime = 0; lastArgs = lastCallTime = lastThis = timerId = undefined; } function flush() { return timerId === undefined ? result : trailingEdge(now()); } function debounced() { var time = now(), isInvoking = shouldInvoke(time); lastArgs = arguments; lastThis = this; lastCallTime = time; if (isInvoking) { if (timerId === undefined) { return leadingEdge(lastCallTime); } if (maxing) { // Handle invocations in a tight loop. clearTimeout(timerId); timerId = setTimeout(timerExpired, wait); return invokeFunc(lastCallTime); } } if (timerId === undefined) { timerId = setTimeout(timerExpired, wait); } return result; } debounced.cancel = cancel; debounced.flush = flush; return debounced; } module.exports = debounce; /***/ }), /***/ "./node_modules/lodash/defaults.js": /*!*****************************************!*\ !*** ./node_modules/lodash/defaults.js ***! \*****************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseRest = __webpack_require__(/*! ./_baseRest */ "./node_modules/lodash/_baseRest.js"), eq = __webpack_require__(/*! ./eq */ "./node_modules/lodash/eq.js"), isIterateeCall = __webpack_require__(/*! ./_isIterateeCall */ "./node_modules/lodash/_isIterateeCall.js"), keysIn = __webpack_require__(/*! ./keysIn */ "./node_modules/lodash/keysIn.js"); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Assigns own and inherited enumerable string keyed properties of source * objects to the destination object for all destination properties that * resolve to `undefined`. Source objects are applied from left to right. * Once a property is set, additional values of the same property are ignored. * * **Note:** This method mutates `object`. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The destination object. * @param {...Object} [sources] The source objects. * @returns {Object} Returns `object`. * @see _.defaultsDeep * @example * * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); * // => { 'a': 1, 'b': 2 } */ var defaults = baseRest(function(object, sources) { object = Object(object); var index = -1; var length = sources.length; var guard = length > 2 ? sources[2] : undefined; if (guard && isIterateeCall(sources[0], sources[1], guard)) { length = 1; } while (++index < length) { var source = sources[index]; var props = keysIn(source); var propsIndex = -1; var propsLength = props.length; while (++propsIndex < propsLength) { var key = props[propsIndex]; var value = object[key]; if (value === undefined || (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { object[key] = source[key]; } } } return object; }); module.exports = defaults; /***/ }), /***/ "./node_modules/lodash/each.js": /*!*************************************!*\ !*** ./node_modules/lodash/each.js ***! \*************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { module.exports = __webpack_require__(/*! ./forEach */ "./node_modules/lodash/forEach.js"); /***/ }), /***/ "./node_modules/lodash/eq.js": /*!***********************************!*\ !*** ./node_modules/lodash/eq.js ***! \***********************************/ /***/ (function(module) { /** * Performs a * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * comparison between two values to determine if they are equivalent. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to compare. * @param {*} other The other value to compare. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * * var object = { 'a': 1 }; * var other = { 'a': 1 }; * * _.eq(object, object); * // => true * * _.eq(object, other); * // => false * * _.eq('a', 'a'); * // => true * * _.eq('a', Object('a')); * // => false * * _.eq(NaN, NaN); * // => true */ function eq(value, other) { return value === other || (value !== value && other !== other); } module.exports = eq; /***/ }), /***/ "./node_modules/lodash/filter.js": /*!***************************************!*\ !*** ./node_modules/lodash/filter.js ***! \***************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var arrayFilter = __webpack_require__(/*! ./_arrayFilter */ "./node_modules/lodash/_arrayFilter.js"), baseFilter = __webpack_require__(/*! ./_baseFilter */ "./node_modules/lodash/_baseFilter.js"), baseIteratee = __webpack_require__(/*! ./_baseIteratee */ "./node_modules/lodash/_baseIteratee.js"), isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"); /** * Iterates over elements of `collection`, returning an array of all elements * `predicate` returns truthy for. The predicate is invoked with three * arguments: (value, index|key, collection). * * **Note:** Unlike `_.remove`, this method returns a new array. * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [predicate=_.identity] The function invoked per iteration. * @returns {Array} Returns the new filtered array. * @see _.reject * @example * * var users = [ * { 'user': 'barney', 'age': 36, 'active': true }, * { 'user': 'fred', 'age': 40, 'active': false } * ]; * * _.filter(users, function(o) { return !o.active; }); * // => objects for ['fred'] * * // The `_.matches` iteratee shorthand. * _.filter(users, { 'age': 36, 'active': true }); * // => objects for ['barney'] * * // The `_.matchesProperty` iteratee shorthand. * _.filter(users, ['active', false]); * // => objects for ['fred'] * * // The `_.property` iteratee shorthand. * _.filter(users, 'active'); * // => objects for ['barney'] * * // Combining several predicates using `_.overEvery` or `_.overSome`. * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]])); * // => objects for ['fred', 'barney'] */ function filter(collection, predicate) { var func = isArray(collection) ? arrayFilter : baseFilter; return func(collection, baseIteratee(predicate, 3)); } module.exports = filter; /***/ }), /***/ "./node_modules/lodash/find.js": /*!*************************************!*\ !*** ./node_modules/lodash/find.js ***! \*************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var createFind = __webpack_require__(/*! ./_createFind */ "./node_modules/lodash/_createFind.js"), findIndex = __webpack_require__(/*! ./findIndex */ "./node_modules/lodash/findIndex.js"); /** * Iterates over elements of `collection`, returning the first element * `predicate` returns truthy for. The predicate is invoked with three * arguments: (value, index|key, collection). * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to inspect. * @param {Function} [predicate=_.identity] The function invoked per iteration. * @param {number} [fromIndex=0] The index to search from. * @returns {*} Returns the matched element, else `undefined`. * @example * * var users = [ * { 'user': 'barney', 'age': 36, 'active': true }, * { 'user': 'fred', 'age': 40, 'active': false }, * { 'user': 'pebbles', 'age': 1, 'active': true } * ]; * * _.find(users, function(o) { return o.age < 40; }); * // => object for 'barney' * * // The `_.matches` iteratee shorthand. * _.find(users, { 'age': 1, 'active': true }); * // => object for 'pebbles' * * // The `_.matchesProperty` iteratee shorthand. * _.find(users, ['active', false]); * // => object for 'fred' * * // The `_.property` iteratee shorthand. * _.find(users, 'active'); * // => object for 'barney' */ var find = createFind(findIndex); module.exports = find; /***/ }), /***/ "./node_modules/lodash/findIndex.js": /*!******************************************!*\ !*** ./node_modules/lodash/findIndex.js ***! \******************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseFindIndex = __webpack_require__(/*! ./_baseFindIndex */ "./node_modules/lodash/_baseFindIndex.js"), baseIteratee = __webpack_require__(/*! ./_baseIteratee */ "./node_modules/lodash/_baseIteratee.js"), toInteger = __webpack_require__(/*! ./toInteger */ "./node_modules/lodash/toInteger.js"); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax = Math.max; /** * This method is like `_.find` except that it returns the index of the first * element `predicate` returns truthy for instead of the element itself. * * @static * @memberOf _ * @since 1.1.0 * @category Array * @param {Array} array The array to inspect. * @param {Function} [predicate=_.identity] The function invoked per iteration. * @param {number} [fromIndex=0] The index to search from. * @returns {number} Returns the index of the found element, else `-1`. * @example * * var users = [ * { 'user': 'barney', 'active': false }, * { 'user': 'fred', 'active': false }, * { 'user': 'pebbles', 'active': true } * ]; * * _.findIndex(users, function(o) { return o.user == 'barney'; }); * // => 0 * * // The `_.matches` iteratee shorthand. * _.findIndex(users, { 'user': 'fred', 'active': false }); * // => 1 * * // The `_.matchesProperty` iteratee shorthand. * _.findIndex(users, ['active', false]); * // => 0 * * // The `_.property` iteratee shorthand. * _.findIndex(users, 'active'); * // => 2 */ function findIndex(array, predicate, fromIndex) { var length = array == null ? 0 : array.length; if (!length) { return -1; } var index = fromIndex == null ? 0 : toInteger(fromIndex); if (index < 0) { index = nativeMax(length + index, 0); } return baseFindIndex(array, baseIteratee(predicate, 3), index); } module.exports = findIndex; /***/ }), /***/ "./node_modules/lodash/flatten.js": /*!****************************************!*\ !*** ./node_modules/lodash/flatten.js ***! \****************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseFlatten = __webpack_require__(/*! ./_baseFlatten */ "./node_modules/lodash/_baseFlatten.js"); /** * Flattens `array` a single level deep. * * @static * @memberOf _ * @since 0.1.0 * @category Array * @param {Array} array The array to flatten. * @returns {Array} Returns the new flattened array. * @example * * _.flatten([1, [2, [3, [4]], 5]]); * // => [1, 2, [3, [4]], 5] */ function flatten(array) { var length = array == null ? 0 : array.length; return length ? baseFlatten(array, 1) : []; } module.exports = flatten; /***/ }), /***/ "./node_modules/lodash/forEach.js": /*!****************************************!*\ !*** ./node_modules/lodash/forEach.js ***! \****************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var arrayEach = __webpack_require__(/*! ./_arrayEach */ "./node_modules/lodash/_arrayEach.js"), baseEach = __webpack_require__(/*! ./_baseEach */ "./node_modules/lodash/_baseEach.js"), castFunction = __webpack_require__(/*! ./_castFunction */ "./node_modules/lodash/_castFunction.js"), isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"); /** * Iterates over elements of `collection` and invokes `iteratee` for each element. * The iteratee is invoked with three arguments: (value, index|key, collection). * Iteratee functions may exit iteration early by explicitly returning `false`. * * **Note:** As with other "Collections" methods, objects with a "length" * property are iterated like arrays. To avoid this behavior use `_.forIn` * or `_.forOwn` for object iteration. * * @static * @memberOf _ * @since 0.1.0 * @alias each * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Array|Object} Returns `collection`. * @see _.forEachRight * @example * * _.forEach([1, 2], function(value) { * console.log(value); * }); * // => Logs `1` then `2`. * * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { * console.log(key); * }); * // => Logs 'a' then 'b' (iteration order is not guaranteed). */ function forEach(collection, iteratee) { var func = isArray(collection) ? arrayEach : baseEach; return func(collection, castFunction(iteratee)); } module.exports = forEach; /***/ }), /***/ "./node_modules/lodash/forIn.js": /*!**************************************!*\ !*** ./node_modules/lodash/forIn.js ***! \**************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseFor = __webpack_require__(/*! ./_baseFor */ "./node_modules/lodash/_baseFor.js"), castFunction = __webpack_require__(/*! ./_castFunction */ "./node_modules/lodash/_castFunction.js"), keysIn = __webpack_require__(/*! ./keysIn */ "./node_modules/lodash/keysIn.js"); /** * Iterates over own and inherited enumerable string keyed properties of an * object and invokes `iteratee` for each property. The iteratee is invoked * with three arguments: (value, key, object). Iteratee functions may exit * iteration early by explicitly returning `false`. * * @static * @memberOf _ * @since 0.3.0 * @category Object * @param {Object} object The object to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Object} Returns `object`. * @see _.forInRight * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.forIn(new Foo, function(value, key) { * console.log(key); * }); * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). */ function forIn(object, iteratee) { return object == null ? object : baseFor(object, castFunction(iteratee), keysIn); } module.exports = forIn; /***/ }), /***/ "./node_modules/lodash/get.js": /*!************************************!*\ !*** ./node_modules/lodash/get.js ***! \************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseGet = __webpack_require__(/*! ./_baseGet */ "./node_modules/lodash/_baseGet.js"); /** * Gets the value at `path` of `object`. If the resolved value is * `undefined`, the `defaultValue` is returned in its place. * * @static * @memberOf _ * @since 3.7.0 * @category Object * @param {Object} object The object to query. * @param {Array|string} path The path of the property to get. * @param {*} [defaultValue] The value returned for `undefined` resolved values. * @returns {*} Returns the resolved value. * @example * * var object = { 'a': [{ 'b': { 'c': 3 } }] }; * * _.get(object, 'a[0].b.c'); * // => 3 * * _.get(object, ['a', '0', 'b', 'c']); * // => 3 * * _.get(object, 'a.b.c', 'default'); * // => 'default' */ function get(object, path, defaultValue) { var result = object == null ? undefined : baseGet(object, path); return result === undefined ? defaultValue : result; } module.exports = get; /***/ }), /***/ "./node_modules/lodash/has.js": /*!************************************!*\ !*** ./node_modules/lodash/has.js ***! \************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseHas = __webpack_require__(/*! ./_baseHas */ "./node_modules/lodash/_baseHas.js"), hasPath = __webpack_require__(/*! ./_hasPath */ "./node_modules/lodash/_hasPath.js"); /** * Checks if `path` is a direct property of `object`. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The object to query. * @param {Array|string} path The path to check. * @returns {boolean} Returns `true` if `path` exists, else `false`. * @example * * var object = { 'a': { 'b': 2 } }; * var other = _.create({ 'a': _.create({ 'b': 2 }) }); * * _.has(object, 'a'); * // => true * * _.has(object, 'a.b'); * // => true * * _.has(object, ['a', 'b']); * // => true * * _.has(other, 'a'); * // => false */ function has(object, path) { return object != null && hasPath(object, path, baseHas); } module.exports = has; /***/ }), /***/ "./node_modules/lodash/hasIn.js": /*!**************************************!*\ !*** ./node_modules/lodash/hasIn.js ***! \**************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseHasIn = __webpack_require__(/*! ./_baseHasIn */ "./node_modules/lodash/_baseHasIn.js"), hasPath = __webpack_require__(/*! ./_hasPath */ "./node_modules/lodash/_hasPath.js"); /** * Checks if `path` is a direct or inherited property of `object`. * * @static * @memberOf _ * @since 4.0.0 * @category Object * @param {Object} object The object to query. * @param {Array|string} path The path to check. * @returns {boolean} Returns `true` if `path` exists, else `false`. * @example * * var object = _.create({ 'a': _.create({ 'b': 2 }) }); * * _.hasIn(object, 'a'); * // => true * * _.hasIn(object, 'a.b'); * // => true * * _.hasIn(object, ['a', 'b']); * // => true * * _.hasIn(object, 'b'); * // => false */ function hasIn(object, path) { return object != null && hasPath(object, path, baseHasIn); } module.exports = hasIn; /***/ }), /***/ "./node_modules/lodash/identity.js": /*!*****************************************!*\ !*** ./node_modules/lodash/identity.js ***! \*****************************************/ /***/ (function(module) { /** * This method returns the first argument it receives. * * @static * @since 0.1.0 * @memberOf _ * @category Util * @param {*} value Any value. * @returns {*} Returns `value`. * @example * * var object = { 'a': 1 }; * * console.log(_.identity(object) === object); * // => true */ function identity(value) { return value; } module.exports = identity; /***/ }), /***/ "./node_modules/lodash/isArguments.js": /*!********************************************!*\ !*** ./node_modules/lodash/isArguments.js ***! \********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseIsArguments = __webpack_require__(/*! ./_baseIsArguments */ "./node_modules/lodash/_baseIsArguments.js"), isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js"); /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** Built-in value references. */ var propertyIsEnumerable = objectProto.propertyIsEnumerable; /** * Checks if `value` is likely an `arguments` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an `arguments` object, * else `false`. * @example * * _.isArguments(function() { return arguments; }()); * // => true * * _.isArguments([1, 2, 3]); * // => false */ var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); }; module.exports = isArguments; /***/ }), /***/ "./node_modules/lodash/isArray.js": /*!****************************************!*\ !*** ./node_modules/lodash/isArray.js ***! \****************************************/ /***/ (function(module) { /** * Checks if `value` is classified as an `Array` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an array, else `false`. * @example * * _.isArray([1, 2, 3]); * // => true * * _.isArray(document.body.children); * // => false * * _.isArray('abc'); * // => false * * _.isArray(_.noop); * // => false */ var isArray = Array.isArray; module.exports = isArray; /***/ }), /***/ "./node_modules/lodash/isArrayLike.js": /*!********************************************!*\ !*** ./node_modules/lodash/isArrayLike.js ***! \********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var isFunction = __webpack_require__(/*! ./isFunction */ "./node_modules/lodash/isFunction.js"), isLength = __webpack_require__(/*! ./isLength */ "./node_modules/lodash/isLength.js"); /** * Checks if `value` is array-like. A value is considered array-like if it's * not a function and has a `value.length` that's an integer greater than or * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is array-like, else `false`. * @example * * _.isArrayLike([1, 2, 3]); * // => true * * _.isArrayLike(document.body.children); * // => true * * _.isArrayLike('abc'); * // => true * * _.isArrayLike(_.noop); * // => false */ function isArrayLike(value) { return value != null && isLength(value.length) && !isFunction(value); } module.exports = isArrayLike; /***/ }), /***/ "./node_modules/lodash/isArrayLikeObject.js": /*!**************************************************!*\ !*** ./node_modules/lodash/isArrayLikeObject.js ***! \**************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var isArrayLike = __webpack_require__(/*! ./isArrayLike */ "./node_modules/lodash/isArrayLike.js"), isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js"); /** * This method is like `_.isArrayLike` except that it also checks if `value` * is an object. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an array-like object, * else `false`. * @example * * _.isArrayLikeObject([1, 2, 3]); * // => true * * _.isArrayLikeObject(document.body.children); * // => true * * _.isArrayLikeObject('abc'); * // => false * * _.isArrayLikeObject(_.noop); * // => false */ function isArrayLikeObject(value) { return isObjectLike(value) && isArrayLike(value); } module.exports = isArrayLikeObject; /***/ }), /***/ "./node_modules/lodash/isBuffer.js": /*!*****************************************!*\ !*** ./node_modules/lodash/isBuffer.js ***! \*****************************************/ /***/ (function(module, exports, __webpack_require__) { /* module decorator */ module = __webpack_require__.nmd(module); var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js"), stubFalse = __webpack_require__(/*! ./stubFalse */ "./node_modules/lodash/stubFalse.js"); /** Detect free variable `exports`. */ var freeExports = true && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ var freeModule = freeExports && "object" == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; /** Built-in value references. */ var Buffer = moduleExports ? root.Buffer : undefined; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; /** * Checks if `value` is a buffer. * * @static * @memberOf _ * @since 4.3.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. * @example * * _.isBuffer(new Buffer(2)); * // => true * * _.isBuffer(new Uint8Array(2)); * // => false */ var isBuffer = nativeIsBuffer || stubFalse; module.exports = isBuffer; /***/ }), /***/ "./node_modules/lodash/isEmpty.js": /*!****************************************!*\ !*** ./node_modules/lodash/isEmpty.js ***! \****************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseKeys = __webpack_require__(/*! ./_baseKeys */ "./node_modules/lodash/_baseKeys.js"), getTag = __webpack_require__(/*! ./_getTag */ "./node_modules/lodash/_getTag.js"), isArguments = __webpack_require__(/*! ./isArguments */ "./node_modules/lodash/isArguments.js"), isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"), isArrayLike = __webpack_require__(/*! ./isArrayLike */ "./node_modules/lodash/isArrayLike.js"), isBuffer = __webpack_require__(/*! ./isBuffer */ "./node_modules/lodash/isBuffer.js"), isPrototype = __webpack_require__(/*! ./_isPrototype */ "./node_modules/lodash/_isPrototype.js"), isTypedArray = __webpack_require__(/*! ./isTypedArray */ "./node_modules/lodash/isTypedArray.js"); /** `Object#toString` result references. */ var mapTag = '[object Map]', setTag = '[object Set]'; /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Checks if `value` is an empty object, collection, map, or set. * * Objects are considered empty if they have no own enumerable string keyed * properties. * * Array-like values such as `arguments` objects, arrays, buffers, strings, or * jQuery-like collections are considered empty if they have a `length` of `0`. * Similarly, maps and sets are considered empty if they have a `size` of `0`. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is empty, else `false`. * @example * * _.isEmpty(null); * // => true * * _.isEmpty(true); * // => true * * _.isEmpty(1); * // => true * * _.isEmpty([1, 2, 3]); * // => false * * _.isEmpty({ 'a': 1 }); * // => false */ function isEmpty(value) { if (value == null) { return true; } if (isArrayLike(value) && (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' || isBuffer(value) || isTypedArray(value) || isArguments(value))) { return !value.length; } var tag = getTag(value); if (tag == mapTag || tag == setTag) { return !value.size; } if (isPrototype(value)) { return !baseKeys(value).length; } for (var key in value) { if (hasOwnProperty.call(value, key)) { return false; } } return true; } module.exports = isEmpty; /***/ }), /***/ "./node_modules/lodash/isFunction.js": /*!*******************************************!*\ !*** ./node_modules/lodash/isFunction.js ***! \*******************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"), isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"); /** `Object#toString` result references. */ var asyncTag = '[object AsyncFunction]', funcTag = '[object Function]', genTag = '[object GeneratorFunction]', proxyTag = '[object Proxy]'; /** * Checks if `value` is classified as a `Function` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a function, else `false`. * @example * * _.isFunction(_); * // => true * * _.isFunction(/abc/); * // => false */ function isFunction(value) { if (!isObject(value)) { return false; } // The use of `Object#toString` avoids issues with the `typeof` operator // in Safari 9 which returns 'object' for typed arrays and other constructors. var tag = baseGetTag(value); return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; } module.exports = isFunction; /***/ }), /***/ "./node_modules/lodash/isLength.js": /*!*****************************************!*\ !*** ./node_modules/lodash/isLength.js ***! \*****************************************/ /***/ (function(module) { /** Used as references for various `Number` constants. */ var MAX_SAFE_INTEGER = 9007199254740991; /** * Checks if `value` is a valid array-like length. * * **Note:** This method is loosely based on * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. * @example * * _.isLength(3); * // => true * * _.isLength(Number.MIN_VALUE); * // => false * * _.isLength(Infinity); * // => false * * _.isLength('3'); * // => false */ function isLength(value) { return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; } module.exports = isLength; /***/ }), /***/ "./node_modules/lodash/isMap.js": /*!**************************************!*\ !*** ./node_modules/lodash/isMap.js ***! \**************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseIsMap = __webpack_require__(/*! ./_baseIsMap */ "./node_modules/lodash/_baseIsMap.js"), baseUnary = __webpack_require__(/*! ./_baseUnary */ "./node_modules/lodash/_baseUnary.js"), nodeUtil = __webpack_require__(/*! ./_nodeUtil */ "./node_modules/lodash/_nodeUtil.js"); /* Node.js helper references. */ var nodeIsMap = nodeUtil && nodeUtil.isMap; /** * Checks if `value` is classified as a `Map` object. * * @static * @memberOf _ * @since 4.3.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a map, else `false`. * @example * * _.isMap(new Map); * // => true * * _.isMap(new WeakMap); * // => false */ var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; module.exports = isMap; /***/ }), /***/ "./node_modules/lodash/isObject.js": /*!*****************************************!*\ !*** ./node_modules/lodash/isObject.js ***! \*****************************************/ /***/ (function(module) { /** * Checks if `value` is the * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an object, else `false`. * @example * * _.isObject({}); * // => true * * _.isObject([1, 2, 3]); * // => true * * _.isObject(_.noop); * // => true * * _.isObject(null); * // => false */ function isObject(value) { var type = typeof value; return value != null && (type == 'object' || type == 'function'); } module.exports = isObject; /***/ }), /***/ "./node_modules/lodash/isObjectLike.js": /*!*********************************************!*\ !*** ./node_modules/lodash/isObjectLike.js ***! \*********************************************/ /***/ (function(module) { /** * Checks if `value` is object-like. A value is object-like if it's not `null` * and has a `typeof` result of "object". * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is object-like, else `false`. * @example * * _.isObjectLike({}); * // => true * * _.isObjectLike([1, 2, 3]); * // => true * * _.isObjectLike(_.noop); * // => false * * _.isObjectLike(null); * // => false */ function isObjectLike(value) { return value != null && typeof value == 'object'; } module.exports = isObjectLike; /***/ }), /***/ "./node_modules/lodash/isPlainObject.js": /*!**********************************************!*\ !*** ./node_modules/lodash/isPlainObject.js ***! \**********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"), getPrototype = __webpack_require__(/*! ./_getPrototype */ "./node_modules/lodash/_getPrototype.js"), isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js"); /** `Object#toString` result references. */ var objectTag = '[object Object]'; /** Used for built-in method references. */ var funcProto = Function.prototype, objectProto = Object.prototype; /** Used to resolve the decompiled source of functions. */ var funcToString = funcProto.toString; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** Used to infer the `Object` constructor. */ var objectCtorString = funcToString.call(Object); /** * Checks if `value` is a plain object, that is, an object created by the * `Object` constructor or one with a `[[Prototype]]` of `null`. * * @static * @memberOf _ * @since 0.8.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. * @example * * function Foo() { * this.a = 1; * } * * _.isPlainObject(new Foo); * // => false * * _.isPlainObject([1, 2, 3]); * // => false * * _.isPlainObject({ 'x': 0, 'y': 0 }); * // => true * * _.isPlainObject(Object.create(null)); * // => true */ function isPlainObject(value) { if (!isObjectLike(value) || baseGetTag(value) != objectTag) { return false; } var proto = getPrototype(value); if (proto === null) { return true; } var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; return typeof Ctor == 'function' && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString; } module.exports = isPlainObject; /***/ }), /***/ "./node_modules/lodash/isSet.js": /*!**************************************!*\ !*** ./node_modules/lodash/isSet.js ***! \**************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseIsSet = __webpack_require__(/*! ./_baseIsSet */ "./node_modules/lodash/_baseIsSet.js"), baseUnary = __webpack_require__(/*! ./_baseUnary */ "./node_modules/lodash/_baseUnary.js"), nodeUtil = __webpack_require__(/*! ./_nodeUtil */ "./node_modules/lodash/_nodeUtil.js"); /* Node.js helper references. */ var nodeIsSet = nodeUtil && nodeUtil.isSet; /** * Checks if `value` is classified as a `Set` object. * * @static * @memberOf _ * @since 4.3.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a set, else `false`. * @example * * _.isSet(new Set); * // => true * * _.isSet(new WeakSet); * // => false */ var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; module.exports = isSet; /***/ }), /***/ "./node_modules/lodash/isString.js": /*!*****************************************!*\ !*** ./node_modules/lodash/isString.js ***! \*****************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"), isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"), isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js"); /** `Object#toString` result references. */ var stringTag = '[object String]'; /** * Checks if `value` is classified as a `String` primitive or object. * * @static * @since 0.1.0 * @memberOf _ * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a string, else `false`. * @example * * _.isString('abc'); * // => true * * _.isString(1); * // => false */ function isString(value) { return typeof value == 'string' || (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); } module.exports = isString; /***/ }), /***/ "./node_modules/lodash/isSymbol.js": /*!*****************************************!*\ !*** ./node_modules/lodash/isSymbol.js ***! \*****************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "./node_modules/lodash/_baseGetTag.js"), isObjectLike = __webpack_require__(/*! ./isObjectLike */ "./node_modules/lodash/isObjectLike.js"); /** `Object#toString` result references. */ var symbolTag = '[object Symbol]'; /** * Checks if `value` is classified as a `Symbol` primitive or object. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. * @example * * _.isSymbol(Symbol.iterator); * // => true * * _.isSymbol('abc'); * // => false */ function isSymbol(value) { return typeof value == 'symbol' || (isObjectLike(value) && baseGetTag(value) == symbolTag); } module.exports = isSymbol; /***/ }), /***/ "./node_modules/lodash/isTypedArray.js": /*!*********************************************!*\ !*** ./node_modules/lodash/isTypedArray.js ***! \*********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseIsTypedArray = __webpack_require__(/*! ./_baseIsTypedArray */ "./node_modules/lodash/_baseIsTypedArray.js"), baseUnary = __webpack_require__(/*! ./_baseUnary */ "./node_modules/lodash/_baseUnary.js"), nodeUtil = __webpack_require__(/*! ./_nodeUtil */ "./node_modules/lodash/_nodeUtil.js"); /* Node.js helper references. */ var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; /** * Checks if `value` is classified as a typed array. * * @static * @memberOf _ * @since 3.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. * @example * * _.isTypedArray(new Uint8Array); * // => true * * _.isTypedArray([]); * // => false */ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; module.exports = isTypedArray; /***/ }), /***/ "./node_modules/lodash/isUndefined.js": /*!********************************************!*\ !*** ./node_modules/lodash/isUndefined.js ***! \********************************************/ /***/ (function(module) { /** * Checks if `value` is `undefined`. * * @static * @since 0.1.0 * @memberOf _ * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. * @example * * _.isUndefined(void 0); * // => true * * _.isUndefined(null); * // => false */ function isUndefined(value) { return value === undefined; } module.exports = isUndefined; /***/ }), /***/ "./node_modules/lodash/keys.js": /*!*************************************!*\ !*** ./node_modules/lodash/keys.js ***! \*************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var arrayLikeKeys = __webpack_require__(/*! ./_arrayLikeKeys */ "./node_modules/lodash/_arrayLikeKeys.js"), baseKeys = __webpack_require__(/*! ./_baseKeys */ "./node_modules/lodash/_baseKeys.js"), isArrayLike = __webpack_require__(/*! ./isArrayLike */ "./node_modules/lodash/isArrayLike.js"); /** * Creates an array of the own enumerable property names of `object`. * * **Note:** Non-object values are coerced to objects. See the * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) * for more details. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.keys(new Foo); * // => ['a', 'b'] (iteration order is not guaranteed) * * _.keys('hi'); * // => ['0', '1'] */ function keys(object) { return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); } module.exports = keys; /***/ }), /***/ "./node_modules/lodash/keysIn.js": /*!***************************************!*\ !*** ./node_modules/lodash/keysIn.js ***! \***************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var arrayLikeKeys = __webpack_require__(/*! ./_arrayLikeKeys */ "./node_modules/lodash/_arrayLikeKeys.js"), baseKeysIn = __webpack_require__(/*! ./_baseKeysIn */ "./node_modules/lodash/_baseKeysIn.js"), isArrayLike = __webpack_require__(/*! ./isArrayLike */ "./node_modules/lodash/isArrayLike.js"); /** * Creates an array of the own and inherited enumerable property names of `object`. * * **Note:** Non-object values are coerced to objects. * * @static * @memberOf _ * @since 3.0.0 * @category Object * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.keysIn(new Foo); * // => ['a', 'b', 'c'] (iteration order is not guaranteed) */ function keysIn(object) { return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); } module.exports = keysIn; /***/ }), /***/ "./node_modules/lodash/last.js": /*!*************************************!*\ !*** ./node_modules/lodash/last.js ***! \*************************************/ /***/ (function(module) { /** * Gets the last element of `array`. * * @static * @memberOf _ * @since 0.1.0 * @category Array * @param {Array} array The array to query. * @returns {*} Returns the last element of `array`. * @example * * _.last([1, 2, 3]); * // => 3 */ function last(array) { var length = array == null ? 0 : array.length; return length ? array[length - 1] : undefined; } module.exports = last; /***/ }), /***/ "./node_modules/lodash/map.js": /*!************************************!*\ !*** ./node_modules/lodash/map.js ***! \************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var arrayMap = __webpack_require__(/*! ./_arrayMap */ "./node_modules/lodash/_arrayMap.js"), baseIteratee = __webpack_require__(/*! ./_baseIteratee */ "./node_modules/lodash/_baseIteratee.js"), baseMap = __webpack_require__(/*! ./_baseMap */ "./node_modules/lodash/_baseMap.js"), isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"); /** * Creates an array of values by running each element in `collection` thru * `iteratee`. The iteratee is invoked with three arguments: * (value, index|key, collection). * * Many lodash methods are guarded to work as iteratees for methods like * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. * * The guarded methods are: * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, * `template`, `trim`, `trimEnd`, `trimStart`, and `words` * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Array} Returns the new mapped array. * @example * * function square(n) { * return n * n; * } * * _.map([4, 8], square); * // => [16, 64] * * _.map({ 'a': 4, 'b': 8 }, square); * // => [16, 64] (iteration order is not guaranteed) * * var users = [ * { 'user': 'barney' }, * { 'user': 'fred' } * ]; * * // The `_.property` iteratee shorthand. * _.map(users, 'user'); * // => ['barney', 'fred'] */ function map(collection, iteratee) { var func = isArray(collection) ? arrayMap : baseMap; return func(collection, baseIteratee(iteratee, 3)); } module.exports = map; /***/ }), /***/ "./node_modules/lodash/mapValues.js": /*!******************************************!*\ !*** ./node_modules/lodash/mapValues.js ***! \******************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseAssignValue = __webpack_require__(/*! ./_baseAssignValue */ "./node_modules/lodash/_baseAssignValue.js"), baseForOwn = __webpack_require__(/*! ./_baseForOwn */ "./node_modules/lodash/_baseForOwn.js"), baseIteratee = __webpack_require__(/*! ./_baseIteratee */ "./node_modules/lodash/_baseIteratee.js"); /** * Creates an object with the same keys as `object` and values generated * by running each own enumerable string keyed property of `object` thru * `iteratee`. The iteratee is invoked with three arguments: * (value, key, object). * * @static * @memberOf _ * @since 2.4.0 * @category Object * @param {Object} object The object to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Object} Returns the new mapped object. * @see _.mapKeys * @example * * var users = { * 'fred': { 'user': 'fred', 'age': 40 }, * 'pebbles': { 'user': 'pebbles', 'age': 1 } * }; * * _.mapValues(users, function(o) { return o.age; }); * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) * * // The `_.property` iteratee shorthand. * _.mapValues(users, 'age'); * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) */ function mapValues(object, iteratee) { var result = {}; iteratee = baseIteratee(iteratee, 3); baseForOwn(object, function(value, key, object) { baseAssignValue(result, key, iteratee(value, key, object)); }); return result; } module.exports = mapValues; /***/ }), /***/ "./node_modules/lodash/max.js": /*!************************************!*\ !*** ./node_modules/lodash/max.js ***! \************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseExtremum = __webpack_require__(/*! ./_baseExtremum */ "./node_modules/lodash/_baseExtremum.js"), baseGt = __webpack_require__(/*! ./_baseGt */ "./node_modules/lodash/_baseGt.js"), identity = __webpack_require__(/*! ./identity */ "./node_modules/lodash/identity.js"); /** * Computes the maximum value of `array`. If `array` is empty or falsey, * `undefined` is returned. * * @static * @since 0.1.0 * @memberOf _ * @category Math * @param {Array} array The array to iterate over. * @returns {*} Returns the maximum value. * @example * * _.max([4, 2, 8, 6]); * // => 8 * * _.max([]); * // => undefined */ function max(array) { return (array && array.length) ? baseExtremum(array, identity, baseGt) : undefined; } module.exports = max; /***/ }), /***/ "./node_modules/lodash/memoize.js": /*!****************************************!*\ !*** ./node_modules/lodash/memoize.js ***! \****************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var MapCache = __webpack_require__(/*! ./_MapCache */ "./node_modules/lodash/_MapCache.js"); /** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; /** * Creates a function that memoizes the result of `func`. If `resolver` is * provided, it determines the cache key for storing the result based on the * arguments provided to the memoized function. By default, the first argument * provided to the memoized function is used as the map cache key. The `func` * is invoked with the `this` binding of the memoized function. * * **Note:** The cache is exposed as the `cache` property on the memoized * function. Its creation may be customized by replacing the `_.memoize.Cache` * constructor with one whose instances implement the * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) * method interface of `clear`, `delete`, `get`, `has`, and `set`. * * @static * @memberOf _ * @since 0.1.0 * @category Function * @param {Function} func The function to have its output memoized. * @param {Function} [resolver] The function to resolve the cache key. * @returns {Function} Returns the new memoized function. * @example * * var object = { 'a': 1, 'b': 2 }; * var other = { 'c': 3, 'd': 4 }; * * var values = _.memoize(_.values); * values(object); * // => [1, 2] * * values(other); * // => [3, 4] * * object.a = 2; * values(object); * // => [1, 2] * * // Modify the result cache. * values.cache.set(object, ['a', 'b']); * values(object); * // => ['a', 'b'] * * // Replace `_.memoize.Cache`. * _.memoize.Cache = WeakMap; */ function memoize(func, resolver) { if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { throw new TypeError(FUNC_ERROR_TEXT); } var memoized = function() { var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache; if (cache.has(key)) { return cache.get(key); } var result = func.apply(this, args); memoized.cache = cache.set(key, result) || cache; return result; }; memoized.cache = new (memoize.Cache || MapCache); return memoized; } // Expose `MapCache`. memoize.Cache = MapCache; module.exports = memoize; /***/ }), /***/ "./node_modules/lodash/merge.js": /*!**************************************!*\ !*** ./node_modules/lodash/merge.js ***! \**************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseMerge = __webpack_require__(/*! ./_baseMerge */ "./node_modules/lodash/_baseMerge.js"), createAssigner = __webpack_require__(/*! ./_createAssigner */ "./node_modules/lodash/_createAssigner.js"); /** * This method is like `_.assign` except that it recursively merges own and * inherited enumerable string keyed properties of source objects into the * destination object. Source properties that resolve to `undefined` are * skipped if a destination value exists. Array and plain object properties * are merged recursively. Other objects and value types are overridden by * assignment. Source objects are applied from left to right. Subsequent * sources overwrite property assignments of previous sources. * * **Note:** This method mutates `object`. * * @static * @memberOf _ * @since 0.5.0 * @category Object * @param {Object} object The destination object. * @param {...Object} [sources] The source objects. * @returns {Object} Returns `object`. * @example * * var object = { * 'a': [{ 'b': 2 }, { 'd': 4 }] * }; * * var other = { * 'a': [{ 'c': 3 }, { 'e': 5 }] * }; * * _.merge(object, other); * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } */ var merge = createAssigner(function(object, source, srcIndex) { baseMerge(object, source, srcIndex); }); module.exports = merge; /***/ }), /***/ "./node_modules/lodash/min.js": /*!************************************!*\ !*** ./node_modules/lodash/min.js ***! \************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseExtremum = __webpack_require__(/*! ./_baseExtremum */ "./node_modules/lodash/_baseExtremum.js"), baseLt = __webpack_require__(/*! ./_baseLt */ "./node_modules/lodash/_baseLt.js"), identity = __webpack_require__(/*! ./identity */ "./node_modules/lodash/identity.js"); /** * Computes the minimum value of `array`. If `array` is empty or falsey, * `undefined` is returned. * * @static * @since 0.1.0 * @memberOf _ * @category Math * @param {Array} array The array to iterate over. * @returns {*} Returns the minimum value. * @example * * _.min([4, 2, 8, 6]); * // => 2 * * _.min([]); * // => undefined */ function min(array) { return (array && array.length) ? baseExtremum(array, identity, baseLt) : undefined; } module.exports = min; /***/ }), /***/ "./node_modules/lodash/minBy.js": /*!**************************************!*\ !*** ./node_modules/lodash/minBy.js ***! \**************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseExtremum = __webpack_require__(/*! ./_baseExtremum */ "./node_modules/lodash/_baseExtremum.js"), baseIteratee = __webpack_require__(/*! ./_baseIteratee */ "./node_modules/lodash/_baseIteratee.js"), baseLt = __webpack_require__(/*! ./_baseLt */ "./node_modules/lodash/_baseLt.js"); /** * This method is like `_.min` except that it accepts `iteratee` which is * invoked for each element in `array` to generate the criterion by which * the value is ranked. The iteratee is invoked with one argument: (value). * * @static * @memberOf _ * @since 4.0.0 * @category Math * @param {Array} array The array to iterate over. * @param {Function} [iteratee=_.identity] The iteratee invoked per element. * @returns {*} Returns the minimum value. * @example * * var objects = [{ 'n': 1 }, { 'n': 2 }]; * * _.minBy(objects, function(o) { return o.n; }); * // => { 'n': 1 } * * // The `_.property` iteratee shorthand. * _.minBy(objects, 'n'); * // => { 'n': 1 } */ function minBy(array, iteratee) { return (array && array.length) ? baseExtremum(array, baseIteratee(iteratee, 2), baseLt) : undefined; } module.exports = minBy; /***/ }), /***/ "./node_modules/lodash/noop.js": /*!*************************************!*\ !*** ./node_modules/lodash/noop.js ***! \*************************************/ /***/ (function(module) { /** * This method returns `undefined`. * * @static * @memberOf _ * @since 2.3.0 * @category Util * @example * * _.times(2, _.noop); * // => [undefined, undefined] */ function noop() { // No operation performed. } module.exports = noop; /***/ }), /***/ "./node_modules/lodash/now.js": /*!************************************!*\ !*** ./node_modules/lodash/now.js ***! \************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var root = __webpack_require__(/*! ./_root */ "./node_modules/lodash/_root.js"); /** * Gets the timestamp of the number of milliseconds that have elapsed since * the Unix epoch (1 January 1970 00:00:00 UTC). * * @static * @memberOf _ * @since 2.4.0 * @category Date * @returns {number} Returns the timestamp. * @example * * _.defer(function(stamp) { * console.log(_.now() - stamp); * }, _.now()); * // => Logs the number of milliseconds it took for the deferred invocation. */ var now = function() { return root.Date.now(); }; module.exports = now; /***/ }), /***/ "./node_modules/lodash/pick.js": /*!*************************************!*\ !*** ./node_modules/lodash/pick.js ***! \*************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var basePick = __webpack_require__(/*! ./_basePick */ "./node_modules/lodash/_basePick.js"), flatRest = __webpack_require__(/*! ./_flatRest */ "./node_modules/lodash/_flatRest.js"); /** * Creates an object composed of the picked `object` properties. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The source object. * @param {...(string|string[])} [paths] The property paths to pick. * @returns {Object} Returns the new object. * @example * * var object = { 'a': 1, 'b': '2', 'c': 3 }; * * _.pick(object, ['a', 'c']); * // => { 'a': 1, 'c': 3 } */ var pick = flatRest(function(object, paths) { return object == null ? {} : basePick(object, paths); }); module.exports = pick; /***/ }), /***/ "./node_modules/lodash/property.js": /*!*****************************************!*\ !*** ./node_modules/lodash/property.js ***! \*****************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseProperty = __webpack_require__(/*! ./_baseProperty */ "./node_modules/lodash/_baseProperty.js"), basePropertyDeep = __webpack_require__(/*! ./_basePropertyDeep */ "./node_modules/lodash/_basePropertyDeep.js"), isKey = __webpack_require__(/*! ./_isKey */ "./node_modules/lodash/_isKey.js"), toKey = __webpack_require__(/*! ./_toKey */ "./node_modules/lodash/_toKey.js"); /** * Creates a function that returns the value at `path` of a given object. * * @static * @memberOf _ * @since 2.4.0 * @category Util * @param {Array|string} path The path of the property to get. * @returns {Function} Returns the new accessor function. * @example * * var objects = [ * { 'a': { 'b': 2 } }, * { 'a': { 'b': 1 } } * ]; * * _.map(objects, _.property('a.b')); * // => [2, 1] * * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); * // => [1, 2] */ function property(path) { return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path); } module.exports = property; /***/ }), /***/ "./node_modules/lodash/range.js": /*!**************************************!*\ !*** ./node_modules/lodash/range.js ***! \**************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var createRange = __webpack_require__(/*! ./_createRange */ "./node_modules/lodash/_createRange.js"); /** * Creates an array of numbers (positive and/or negative) progressing from * `start` up to, but not including, `end`. A step of `-1` is used if a negative * `start` is specified without an `end` or `step`. If `end` is not specified, * it's set to `start` with `start` then set to `0`. * * **Note:** JavaScript follows the IEEE-754 standard for resolving * floating-point values which can produce unexpected results. * * @static * @since 0.1.0 * @memberOf _ * @category Util * @param {number} [start=0] The start of the range. * @param {number} end The end of the range. * @param {number} [step=1] The value to increment or decrement by. * @returns {Array} Returns the range of numbers. * @see _.inRange, _.rangeRight * @example * * _.range(4); * // => [0, 1, 2, 3] * * _.range(-4); * // => [0, -1, -2, -3] * * _.range(1, 5); * // => [1, 2, 3, 4] * * _.range(0, 20, 5); * // => [0, 5, 10, 15] * * _.range(0, -4, -1); * // => [0, -1, -2, -3] * * _.range(1, 4, 0); * // => [1, 1, 1] * * _.range(0); * // => [] */ var range = createRange(); module.exports = range; /***/ }), /***/ "./node_modules/lodash/reduce.js": /*!***************************************!*\ !*** ./node_modules/lodash/reduce.js ***! \***************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var arrayReduce = __webpack_require__(/*! ./_arrayReduce */ "./node_modules/lodash/_arrayReduce.js"), baseEach = __webpack_require__(/*! ./_baseEach */ "./node_modules/lodash/_baseEach.js"), baseIteratee = __webpack_require__(/*! ./_baseIteratee */ "./node_modules/lodash/_baseIteratee.js"), baseReduce = __webpack_require__(/*! ./_baseReduce */ "./node_modules/lodash/_baseReduce.js"), isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"); /** * Reduces `collection` to a value which is the accumulated result of running * each element in `collection` thru `iteratee`, where each successive * invocation is supplied the return value of the previous. If `accumulator` * is not given, the first element of `collection` is used as the initial * value. The iteratee is invoked with four arguments: * (accumulator, value, index|key, collection). * * Many lodash methods are guarded to work as iteratees for methods like * `_.reduce`, `_.reduceRight`, and `_.transform`. * * The guarded methods are: * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, * and `sortBy` * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @param {*} [accumulator] The initial value. * @returns {*} Returns the accumulated value. * @see _.reduceRight * @example * * _.reduce([1, 2], function(sum, n) { * return sum + n; * }, 0); * // => 3 * * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { * (result[value] || (result[value] = [])).push(key); * return result; * }, {}); * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) */ function reduce(collection, iteratee, accumulator) { var func = isArray(collection) ? arrayReduce : baseReduce, initAccum = arguments.length < 3; return func(collection, baseIteratee(iteratee, 4), accumulator, initAccum, baseEach); } module.exports = reduce; /***/ }), /***/ "./node_modules/lodash/set.js": /*!************************************!*\ !*** ./node_modules/lodash/set.js ***! \************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseSet = __webpack_require__(/*! ./_baseSet */ "./node_modules/lodash/_baseSet.js"); /** * Sets the value at `path` of `object`. If a portion of `path` doesn't exist, * it's created. Arrays are created for missing index properties while objects * are created for all other missing properties. Use `_.setWith` to customize * `path` creation. * * **Note:** This method mutates `object`. * * @static * @memberOf _ * @since 3.7.0 * @category Object * @param {Object} object The object to modify. * @param {Array|string} path The path of the property to set. * @param {*} value The value to set. * @returns {Object} Returns `object`. * @example * * var object = { 'a': [{ 'b': { 'c': 3 } }] }; * * _.set(object, 'a[0].b.c', 4); * console.log(object.a[0].b.c); * // => 4 * * _.set(object, ['x', '0', 'y', 'z'], 5); * console.log(object.x[0].y.z); * // => 5 */ function set(object, path, value) { return object == null ? object : baseSet(object, path, value); } module.exports = set; /***/ }), /***/ "./node_modules/lodash/size.js": /*!*************************************!*\ !*** ./node_modules/lodash/size.js ***! \*************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseKeys = __webpack_require__(/*! ./_baseKeys */ "./node_modules/lodash/_baseKeys.js"), getTag = __webpack_require__(/*! ./_getTag */ "./node_modules/lodash/_getTag.js"), isArrayLike = __webpack_require__(/*! ./isArrayLike */ "./node_modules/lodash/isArrayLike.js"), isString = __webpack_require__(/*! ./isString */ "./node_modules/lodash/isString.js"), stringSize = __webpack_require__(/*! ./_stringSize */ "./node_modules/lodash/_stringSize.js"); /** `Object#toString` result references. */ var mapTag = '[object Map]', setTag = '[object Set]'; /** * Gets the size of `collection` by returning its length for array-like * values or the number of own enumerable string keyed properties for objects. * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object|string} collection The collection to inspect. * @returns {number} Returns the collection size. * @example * * _.size([1, 2, 3]); * // => 3 * * _.size({ 'a': 1, 'b': 2 }); * // => 2 * * _.size('pebbles'); * // => 7 */ function size(collection) { if (collection == null) { return 0; } if (isArrayLike(collection)) { return isString(collection) ? stringSize(collection) : collection.length; } var tag = getTag(collection); if (tag == mapTag || tag == setTag) { return collection.size; } return baseKeys(collection).length; } module.exports = size; /***/ }), /***/ "./node_modules/lodash/sortBy.js": /*!***************************************!*\ !*** ./node_modules/lodash/sortBy.js ***! \***************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseFlatten = __webpack_require__(/*! ./_baseFlatten */ "./node_modules/lodash/_baseFlatten.js"), baseOrderBy = __webpack_require__(/*! ./_baseOrderBy */ "./node_modules/lodash/_baseOrderBy.js"), baseRest = __webpack_require__(/*! ./_baseRest */ "./node_modules/lodash/_baseRest.js"), isIterateeCall = __webpack_require__(/*! ./_isIterateeCall */ "./node_modules/lodash/_isIterateeCall.js"); /** * Creates an array of elements, sorted in ascending order by the results of * running each element in a collection thru each iteratee. This method * performs a stable sort, that is, it preserves the original sort order of * equal elements. The iteratees are invoked with one argument: (value). * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {...(Function|Function[])} [iteratees=[_.identity]] * The iteratees to sort by. * @returns {Array} Returns the new sorted array. * @example * * var users = [ * { 'user': 'fred', 'age': 48 }, * { 'user': 'barney', 'age': 36 }, * { 'user': 'fred', 'age': 30 }, * { 'user': 'barney', 'age': 34 } * ]; * * _.sortBy(users, [function(o) { return o.user; }]); * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]] * * _.sortBy(users, ['user', 'age']); * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]] */ var sortBy = baseRest(function(collection, iteratees) { if (collection == null) { return []; } var length = iteratees.length; if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) { iteratees = []; } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { iteratees = [iteratees[0]]; } return baseOrderBy(collection, baseFlatten(iteratees, 1), []); }); module.exports = sortBy; /***/ }), /***/ "./node_modules/lodash/stubArray.js": /*!******************************************!*\ !*** ./node_modules/lodash/stubArray.js ***! \******************************************/ /***/ (function(module) { /** * This method returns a new empty array. * * @static * @memberOf _ * @since 4.13.0 * @category Util * @returns {Array} Returns the new empty array. * @example * * var arrays = _.times(2, _.stubArray); * * console.log(arrays); * // => [[], []] * * console.log(arrays[0] === arrays[1]); * // => false */ function stubArray() { return []; } module.exports = stubArray; /***/ }), /***/ "./node_modules/lodash/stubFalse.js": /*!******************************************!*\ !*** ./node_modules/lodash/stubFalse.js ***! \******************************************/ /***/ (function(module) { /** * This method returns `false`. * * @static * @memberOf _ * @since 4.13.0 * @category Util * @returns {boolean} Returns `false`. * @example * * _.times(2, _.stubFalse); * // => [false, false] */ function stubFalse() { return false; } module.exports = stubFalse; /***/ }), /***/ "./node_modules/lodash/toFinite.js": /*!*****************************************!*\ !*** ./node_modules/lodash/toFinite.js ***! \*****************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var toNumber = __webpack_require__(/*! ./toNumber */ "./node_modules/lodash/toNumber.js"); /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0, MAX_INTEGER = 1.7976931348623157e+308; /** * Converts `value` to a finite number. * * @static * @memberOf _ * @since 4.12.0 * @category Lang * @param {*} value The value to convert. * @returns {number} Returns the converted number. * @example * * _.toFinite(3.2); * // => 3.2 * * _.toFinite(Number.MIN_VALUE); * // => 5e-324 * * _.toFinite(Infinity); * // => 1.7976931348623157e+308 * * _.toFinite('3.2'); * // => 3.2 */ function toFinite(value) { if (!value) { return value === 0 ? value : 0; } value = toNumber(value); if (value === INFINITY || value === -INFINITY) { var sign = (value < 0 ? -1 : 1); return sign * MAX_INTEGER; } return value === value ? value : 0; } module.exports = toFinite; /***/ }), /***/ "./node_modules/lodash/toInteger.js": /*!******************************************!*\ !*** ./node_modules/lodash/toInteger.js ***! \******************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var toFinite = __webpack_require__(/*! ./toFinite */ "./node_modules/lodash/toFinite.js"); /** * Converts `value` to an integer. * * **Note:** This method is loosely based on * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to convert. * @returns {number} Returns the converted integer. * @example * * _.toInteger(3.2); * // => 3 * * _.toInteger(Number.MIN_VALUE); * // => 0 * * _.toInteger(Infinity); * // => 1.7976931348623157e+308 * * _.toInteger('3.2'); * // => 3 */ function toInteger(value) { var result = toFinite(value), remainder = result % 1; return result === result ? (remainder ? result - remainder : result) : 0; } module.exports = toInteger; /***/ }), /***/ "./node_modules/lodash/toNumber.js": /*!*****************************************!*\ !*** ./node_modules/lodash/toNumber.js ***! \*****************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseTrim = __webpack_require__(/*! ./_baseTrim */ "./node_modules/lodash/_baseTrim.js"), isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"), isSymbol = __webpack_require__(/*! ./isSymbol */ "./node_modules/lodash/isSymbol.js"); /** Used as references for various `Number` constants. */ var NAN = 0 / 0; /** Used to detect bad signed hexadecimal string values. */ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; /** Used to detect binary string values. */ var reIsBinary = /^0b[01]+$/i; /** Used to detect octal string values. */ var reIsOctal = /^0o[0-7]+$/i; /** Built-in method references without a dependency on `root`. */ var freeParseInt = parseInt; /** * Converts `value` to a number. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to process. * @returns {number} Returns the number. * @example * * _.toNumber(3.2); * // => 3.2 * * _.toNumber(Number.MIN_VALUE); * // => 5e-324 * * _.toNumber(Infinity); * // => Infinity * * _.toNumber('3.2'); * // => 3.2 */ function toNumber(value) { if (typeof value == 'number') { return value; } if (isSymbol(value)) { return NAN; } if (isObject(value)) { var other = typeof value.valueOf == 'function' ? value.valueOf() : value; value = isObject(other) ? (other + '') : other; } if (typeof value != 'string') { return value === 0 ? value : +value; } value = baseTrim(value); var isBinary = reIsBinary.test(value); return (isBinary || reIsOctal.test(value)) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : (reIsBadHex.test(value) ? NAN : +value); } module.exports = toNumber; /***/ }), /***/ "./node_modules/lodash/toPath.js": /*!***************************************!*\ !*** ./node_modules/lodash/toPath.js ***! \***************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var arrayMap = __webpack_require__(/*! ./_arrayMap */ "./node_modules/lodash/_arrayMap.js"), copyArray = __webpack_require__(/*! ./_copyArray */ "./node_modules/lodash/_copyArray.js"), isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"), isSymbol = __webpack_require__(/*! ./isSymbol */ "./node_modules/lodash/isSymbol.js"), stringToPath = __webpack_require__(/*! ./_stringToPath */ "./node_modules/lodash/_stringToPath.js"), toKey = __webpack_require__(/*! ./_toKey */ "./node_modules/lodash/_toKey.js"), toString = __webpack_require__(/*! ./toString */ "./node_modules/lodash/toString.js"); /** * Converts `value` to a property path array. * * @static * @memberOf _ * @since 4.0.0 * @category Util * @param {*} value The value to convert. * @returns {Array} Returns the new property path array. * @example * * _.toPath('a.b.c'); * // => ['a', 'b', 'c'] * * _.toPath('a[0].b.c'); * // => ['a', '0', 'b', 'c'] */ function toPath(value) { if (isArray(value)) { return arrayMap(value, toKey); } return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value))); } module.exports = toPath; /***/ }), /***/ "./node_modules/lodash/toPlainObject.js": /*!**********************************************!*\ !*** ./node_modules/lodash/toPlainObject.js ***! \**********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var copyObject = __webpack_require__(/*! ./_copyObject */ "./node_modules/lodash/_copyObject.js"), keysIn = __webpack_require__(/*! ./keysIn */ "./node_modules/lodash/keysIn.js"); /** * Converts `value` to a plain object flattening inherited enumerable string * keyed properties of `value` to own properties of the plain object. * * @static * @memberOf _ * @since 3.0.0 * @category Lang * @param {*} value The value to convert. * @returns {Object} Returns the converted plain object. * @example * * function Foo() { * this.b = 2; * } * * Foo.prototype.c = 3; * * _.assign({ 'a': 1 }, new Foo); * // => { 'a': 1, 'b': 2 } * * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); * // => { 'a': 1, 'b': 2, 'c': 3 } */ function toPlainObject(value) { return copyObject(value, keysIn(value)); } module.exports = toPlainObject; /***/ }), /***/ "./node_modules/lodash/toString.js": /*!*****************************************!*\ !*** ./node_modules/lodash/toString.js ***! \*****************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseToString = __webpack_require__(/*! ./_baseToString */ "./node_modules/lodash/_baseToString.js"); /** * Converts `value` to a string. An empty string is returned for `null` * and `undefined` values. The sign of `-0` is preserved. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to convert. * @returns {string} Returns the converted string. * @example * * _.toString(null); * // => '' * * _.toString(-0); * // => '-0' * * _.toString([1, 2, 3]); * // => '1,2,3' */ function toString(value) { return value == null ? '' : baseToString(value); } module.exports = toString; /***/ }), /***/ "./node_modules/lodash/transform.js": /*!******************************************!*\ !*** ./node_modules/lodash/transform.js ***! \******************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var arrayEach = __webpack_require__(/*! ./_arrayEach */ "./node_modules/lodash/_arrayEach.js"), baseCreate = __webpack_require__(/*! ./_baseCreate */ "./node_modules/lodash/_baseCreate.js"), baseForOwn = __webpack_require__(/*! ./_baseForOwn */ "./node_modules/lodash/_baseForOwn.js"), baseIteratee = __webpack_require__(/*! ./_baseIteratee */ "./node_modules/lodash/_baseIteratee.js"), getPrototype = __webpack_require__(/*! ./_getPrototype */ "./node_modules/lodash/_getPrototype.js"), isArray = __webpack_require__(/*! ./isArray */ "./node_modules/lodash/isArray.js"), isBuffer = __webpack_require__(/*! ./isBuffer */ "./node_modules/lodash/isBuffer.js"), isFunction = __webpack_require__(/*! ./isFunction */ "./node_modules/lodash/isFunction.js"), isObject = __webpack_require__(/*! ./isObject */ "./node_modules/lodash/isObject.js"), isTypedArray = __webpack_require__(/*! ./isTypedArray */ "./node_modules/lodash/isTypedArray.js"); /** * An alternative to `_.reduce`; this method transforms `object` to a new * `accumulator` object which is the result of running each of its own * enumerable string keyed properties thru `iteratee`, with each invocation * potentially mutating the `accumulator` object. If `accumulator` is not * provided, a new object with the same `[[Prototype]]` will be used. The * iteratee is invoked with four arguments: (accumulator, value, key, object). * Iteratee functions may exit iteration early by explicitly returning `false`. * * @static * @memberOf _ * @since 1.3.0 * @category Object * @param {Object} object The object to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @param {*} [accumulator] The custom accumulator value. * @returns {*} Returns the accumulated value. * @example * * _.transform([2, 3, 4], function(result, n) { * result.push(n *= n); * return n % 2 == 0; * }, []); * // => [4, 9] * * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { * (result[value] || (result[value] = [])).push(key); * }, {}); * // => { '1': ['a', 'c'], '2': ['b'] } */ function transform(object, iteratee, accumulator) { var isArr = isArray(object), isArrLike = isArr || isBuffer(object) || isTypedArray(object); iteratee = baseIteratee(iteratee, 4); if (accumulator == null) { var Ctor = object && object.constructor; if (isArrLike) { accumulator = isArr ? new Ctor : []; } else if (isObject(object)) { accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {}; } else { accumulator = {}; } } (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) { return iteratee(accumulator, value, index, object); }); return accumulator; } module.exports = transform; /***/ }), /***/ "./node_modules/lodash/union.js": /*!**************************************!*\ !*** ./node_modules/lodash/union.js ***! \**************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseFlatten = __webpack_require__(/*! ./_baseFlatten */ "./node_modules/lodash/_baseFlatten.js"), baseRest = __webpack_require__(/*! ./_baseRest */ "./node_modules/lodash/_baseRest.js"), baseUniq = __webpack_require__(/*! ./_baseUniq */ "./node_modules/lodash/_baseUniq.js"), isArrayLikeObject = __webpack_require__(/*! ./isArrayLikeObject */ "./node_modules/lodash/isArrayLikeObject.js"); /** * Creates an array of unique values, in order, from all given arrays using * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. * * @static * @memberOf _ * @since 0.1.0 * @category Array * @param {...Array} [arrays] The arrays to inspect. * @returns {Array} Returns the new array of combined values. * @example * * _.union([2], [1, 2]); * // => [2, 1] */ var union = baseRest(function(arrays) { return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); }); module.exports = union; /***/ }), /***/ "./node_modules/lodash/uniqueId.js": /*!*****************************************!*\ !*** ./node_modules/lodash/uniqueId.js ***! \*****************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var toString = __webpack_require__(/*! ./toString */ "./node_modules/lodash/toString.js"); /** Used to generate unique IDs. */ var idCounter = 0; /** * Generates a unique ID. If `prefix` is given, the ID is appended to it. * * @static * @since 0.1.0 * @memberOf _ * @category Util * @param {string} [prefix=''] The value to prefix the ID with. * @returns {string} Returns the unique ID. * @example * * _.uniqueId('contact_'); * // => 'contact_104' * * _.uniqueId(); * // => '105' */ function uniqueId(prefix) { var id = ++idCounter; return toString(prefix) + id; } module.exports = uniqueId; /***/ }), /***/ "./node_modules/lodash/values.js": /*!***************************************!*\ !*** ./node_modules/lodash/values.js ***! \***************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var baseValues = __webpack_require__(/*! ./_baseValues */ "./node_modules/lodash/_baseValues.js"), keys = __webpack_require__(/*! ./keys */ "./node_modules/lodash/keys.js"); /** * Creates an array of the own enumerable string keyed property values of `object`. * * **Note:** Non-object values are coerced to objects. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The object to query. * @returns {Array} Returns the array of property values. * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.values(new Foo); * // => [1, 2] (iteration order is not guaranteed) * * _.values('hi'); * // => ['h', 'i'] */ function values(object) { return object == null ? [] : baseValues(object, keys(object)); } module.exports = values; /***/ }), /***/ "./node_modules/lodash/zipObject.js": /*!******************************************!*\ !*** ./node_modules/lodash/zipObject.js ***! \******************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var assignValue = __webpack_require__(/*! ./_assignValue */ "./node_modules/lodash/_assignValue.js"), baseZipObject = __webpack_require__(/*! ./_baseZipObject */ "./node_modules/lodash/_baseZipObject.js"); /** * This method is like `_.fromPairs` except that it accepts two arrays, * one of property identifiers and one of corresponding values. * * @static * @memberOf _ * @since 0.4.0 * @category Array * @param {Array} [props=[]] The property identifiers. * @param {Array} [values=[]] The property values. * @returns {Object} Returns the new object. * @example * * _.zipObject(['a', 'b'], [1, 2]); * // => { 'a': 1, 'b': 2 } */ function zipObject(props, values) { return baseZipObject(props || [], values || [], assignValue); } module.exports = zipObject; /***/ }), /***/ "./node_modules/prop-types/lib/ReactPropTypesSecret.js": /*!*************************************************************!*\ !*** ./node_modules/prop-types/lib/ReactPropTypesSecret.js ***! \*************************************************************/ /***/ (function(module) { "use strict"; /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; module.exports = ReactPropTypesSecret; /***/ }), /***/ "./node_modules/react-base16-styling/lib/esm/colorConverters.js": /*!**********************************************************************!*\ !*** ./node_modules/react-base16-styling/lib/esm/colorConverters.js ***! \**********************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ rgb2yuv: function() { return /* binding */ rgb2yuv; }, /* harmony export */ yuv2rgb: function() { return /* binding */ yuv2rgb; } /* harmony export */ }); function yuv2rgb(yuv) { var y = yuv[0], u = yuv[1], v = yuv[2]; var r, g, b; r = y * 1 + u * 0 + v * 1.13983; g = y * 1 + u * -0.39465 + v * -0.5806; b = y * 1 + u * 2.02311 + v * 0; r = Math.min(Math.max(0, r), 1); g = Math.min(Math.max(0, g), 1); b = Math.min(Math.max(0, b), 1); return [r * 255, g * 255, b * 255]; } function rgb2yuv(rgb) { var r = rgb[0] / 255, g = rgb[1] / 255, b = rgb[2] / 255; var y = r * 0.299 + g * 0.587 + b * 0.114; var u = r * -0.14713 + g * -0.28886 + b * 0.436; var v = r * 0.615 + g * -0.51499 + b * -0.10001; return [y, u, v]; } /***/ }), /***/ "./node_modules/react-base16-styling/lib/esm/index.js": /*!************************************************************!*\ !*** ./node_modules/react-base16-styling/lib/esm/index.js ***! \************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ createStyling: function() { return /* binding */ createStyling; }, /* harmony export */ getBase16Theme: function() { return /* binding */ getBase16Theme; }, /* harmony export */ invertBase16Theme: function() { return /* binding */ invertBase16Theme; }, /* harmony export */ invertTheme: function() { return /* binding */ invertTheme; } /* harmony export */ }); /* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "./node_modules/@babel/runtime/helpers/esm/typeof.js"); /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var base16__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! base16 */ "./node_modules/base16/lib/index.js"); /* harmony import */ var color__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! color */ "./node_modules/color/index.js"); /* harmony import */ var color__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(color__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var lodash_curry__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lodash.curry */ "./node_modules/lodash.curry/index.js"); /* harmony import */ var lodash_curry__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lodash_curry__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _colorConverters__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./colorConverters */ "./node_modules/react-base16-styling/lib/esm/colorConverters.js"); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } var DEFAULT_BASE16 = base16__WEBPACK_IMPORTED_MODULE_3__["default"]; var BASE16_KEYS = Object.keys(DEFAULT_BASE16); // we need a correcting factor, so that a dark, but not black background color // converts to bright enough inversed color var flip = function flip(x) { return x < 0.25 ? 1 : x < 0.5 ? 0.9 - x : 1.1 - x; }; var invertColor = function invertColor(hexString) { var color = color__WEBPACK_IMPORTED_MODULE_4___default()(hexString); var _rgb2yuv = (0,_colorConverters__WEBPACK_IMPORTED_MODULE_6__.rgb2yuv)(color.array()), _rgb2yuv2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__["default"])(_rgb2yuv, 3), y = _rgb2yuv2[0], u = _rgb2yuv2[1], v = _rgb2yuv2[2]; var flippedYuv = [flip(y), u, v]; var rgb = (0,_colorConverters__WEBPACK_IMPORTED_MODULE_6__.yuv2rgb)(flippedYuv); return color__WEBPACK_IMPORTED_MODULE_4___default().rgb(rgb).hex(); }; var merger = function merger(styling) { return function (prevStyling) { return { className: [prevStyling.className, styling.className].filter(Boolean).join(' '), style: _objectSpread(_objectSpread({}, prevStyling.style || {}), styling.style || {}) }; }; }; var mergeStyling = function mergeStyling(customStyling, defaultStyling) { if (customStyling === undefined) { return defaultStyling; } if (defaultStyling === undefined) { return customStyling; } var customType = (0,_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__["default"])(customStyling); var defaultType = (0,_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__["default"])(defaultStyling); switch (customType) { case 'string': switch (defaultType) { case 'string': return [defaultStyling, customStyling].filter(Boolean).join(' '); case 'object': return merger({ className: customStyling, style: defaultStyling }); case 'function': return function (styling) { for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } return merger({ className: customStyling })(defaultStyling.apply(void 0, [styling].concat(args))); }; } break; case 'object': switch (defaultType) { case 'string': return merger({ className: defaultStyling, style: customStyling }); case 'object': return _objectSpread(_objectSpread({}, defaultStyling), customStyling); case 'function': return function (styling) { for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { args[_key2 - 1] = arguments[_key2]; } return merger({ style: customStyling })(defaultStyling.apply(void 0, [styling].concat(args))); }; } break; case 'function': switch (defaultType) { case 'string': return function (styling) { for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) { args[_key3 - 1] = arguments[_key3]; } return customStyling.apply(void 0, [merger(styling)({ className: defaultStyling })].concat(args)); }; case 'object': return function (styling) { for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) { args[_key4 - 1] = arguments[_key4]; } return customStyling.apply(void 0, [merger(styling)({ style: defaultStyling })].concat(args)); }; case 'function': return function (styling) { for (var _len5 = arguments.length, args = new Array(_len5 > 1 ? _len5 - 1 : 0), _key5 = 1; _key5 < _len5; _key5++) { args[_key5 - 1] = arguments[_key5]; } return customStyling.apply(void 0, [defaultStyling.apply(void 0, [styling].concat(args))].concat(args)); }; } } }; var mergeStylings = function mergeStylings(customStylings, defaultStylings) { var keys = Object.keys(defaultStylings); for (var key in customStylings) { if (keys.indexOf(key) === -1) keys.push(key); } return keys.reduce(function (mergedStyling, key) { return mergedStyling[key] = mergeStyling(customStylings[key], defaultStylings[key]), mergedStyling; }, {}); }; var getStylingByKeys = function getStylingByKeys(mergedStyling, keys) { for (var _len6 = arguments.length, args = new Array(_len6 > 2 ? _len6 - 2 : 0), _key6 = 2; _key6 < _len6; _key6++) { args[_key6 - 2] = arguments[_key6]; } if (keys === null) { return mergedStyling; } if (!Array.isArray(keys)) { keys = [keys]; } var styles = keys.map(function (key) { return mergedStyling[key]; }).filter(Boolean); var props = styles.reduce(function (obj, s) { if (typeof s === 'string') { obj.className = [obj.className, s].filter(Boolean).join(' '); } else if ((0,_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__["default"])(s) === 'object') { obj.style = _objectSpread(_objectSpread({}, obj.style), s); } else if (typeof s === 'function') { obj = _objectSpread(_objectSpread({}, obj), s.apply(void 0, [obj].concat(args))); } return obj; }, { className: '', style: {} }); if (!props.className) { delete props.className; } if (Object.keys(props.style).length === 0) { delete props.style; } return props; }; var invertBase16Theme = function invertBase16Theme(base16Theme) { return Object.keys(base16Theme).reduce(function (t, key) { return t[key] = /^base/.test(key) ? invertColor(base16Theme[key]) : key === 'scheme' ? base16Theme[key] + ':inverted' : base16Theme[key], t; }, {}); }; var createStyling = lodash_curry__WEBPACK_IMPORTED_MODULE_5___default()(function (getStylingFromBase16) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var themeOrStyling = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; var _options$defaultBase = options.defaultBase16, defaultBase16 = _options$defaultBase === void 0 ? DEFAULT_BASE16 : _options$defaultBase, _options$base16Themes = options.base16Themes, base16Themes = _options$base16Themes === void 0 ? null : _options$base16Themes; var base16Theme = getBase16Theme(themeOrStyling, base16Themes); if (base16Theme) { themeOrStyling = _objectSpread(_objectSpread({}, base16Theme), themeOrStyling); } var theme = BASE16_KEYS.reduce(function (t, key) { return t[key] = themeOrStyling[key] || defaultBase16[key], t; }, {}); var customStyling = Object.keys(themeOrStyling).reduce(function (s, key) { return BASE16_KEYS.indexOf(key) === -1 ? (s[key] = themeOrStyling[key], s) : s; }, {}); var defaultStyling = getStylingFromBase16(theme); var mergedStyling = mergeStylings(customStyling, defaultStyling); for (var _len7 = arguments.length, args = new Array(_len7 > 3 ? _len7 - 3 : 0), _key7 = 3; _key7 < _len7; _key7++) { args[_key7 - 3] = arguments[_key7]; } return lodash_curry__WEBPACK_IMPORTED_MODULE_5___default()(getStylingByKeys, 2).apply(void 0, [mergedStyling].concat(args)); }, 3); var isStylingConfig = function isStylingConfig(theme) { return !!theme.extend; }; var getBase16Theme = function getBase16Theme(theme, base16Themes) { if (theme && isStylingConfig(theme) && theme.extend) { theme = theme.extend; } if (typeof theme === 'string') { var _theme$split = theme.split(':'), _theme$split2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_2__["default"])(_theme$split, 2), _themeName = _theme$split2[0], modifier = _theme$split2[1]; if (base16Themes) { theme = base16Themes[_themeName]; } else { theme = base16__WEBPACK_IMPORTED_MODULE_3__[_themeName]; } if (modifier === 'inverted') { theme = invertBase16Theme(theme); } } return theme && Object.prototype.hasOwnProperty.call(theme, 'base00') ? theme : undefined; }; var invertTheme = function invertTheme(theme) { if (typeof theme === 'string') { return "".concat(theme, ":inverted"); } if (theme && isStylingConfig(theme) && theme.extend) { if (typeof theme.extend === 'string') { return _objectSpread(_objectSpread({}, theme), {}, { extend: "".concat(theme.extend, ":inverted") }); } return _objectSpread(_objectSpread({}, theme), {}, { extend: invertBase16Theme(theme.extend) }); } if (theme) { return invertBase16Theme(theme); } return theme; }; /***/ }), /***/ "./node_modules/react-is/cjs/react-is.development.js": /*!***********************************************************!*\ !*** ./node_modules/react-is/cjs/react-is.development.js ***! \***********************************************************/ /***/ (function(__unused_webpack_module, exports) { "use strict"; /** @license React v16.13.1 * react-is.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ if (true) { (function() { 'use strict'; // The Symbol used to tag the ReactElement-like types. If there is no native Symbol // nor polyfill, then a plain number is used for performance. var hasSymbol = typeof Symbol === 'function' && Symbol.for; var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7; var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca; var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb; var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc; var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2; var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd; var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary // (unstable) APIs that have been removed. Can we remove the symbols? var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf; var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf; var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0; var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1; var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8; var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3; var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4; var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9; var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5; var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6; var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7; function isValidElementType(type) { return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE); } function typeOf(object) { if (typeof object === 'object' && object !== null) { var $$typeof = object.$$typeof; switch ($$typeof) { case REACT_ELEMENT_TYPE: var type = object.type; switch (type) { case REACT_ASYNC_MODE_TYPE: case REACT_CONCURRENT_MODE_TYPE: case REACT_FRAGMENT_TYPE: case REACT_PROFILER_TYPE: case REACT_STRICT_MODE_TYPE: case REACT_SUSPENSE_TYPE: return type; default: var $$typeofType = type && type.$$typeof; switch ($$typeofType) { case REACT_CONTEXT_TYPE: case REACT_FORWARD_REF_TYPE: case REACT_LAZY_TYPE: case REACT_MEMO_TYPE: case REACT_PROVIDER_TYPE: return $$typeofType; default: return $$typeof; } } case REACT_PORTAL_TYPE: return $$typeof; } } return undefined; } // AsyncMode is deprecated along with isAsyncMode var AsyncMode = REACT_ASYNC_MODE_TYPE; var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE; var ContextConsumer = REACT_CONTEXT_TYPE; var ContextProvider = REACT_PROVIDER_TYPE; var Element = REACT_ELEMENT_TYPE; var ForwardRef = REACT_FORWARD_REF_TYPE; var Fragment = REACT_FRAGMENT_TYPE; var Lazy = REACT_LAZY_TYPE; var Memo = REACT_MEMO_TYPE; var Portal = REACT_PORTAL_TYPE; var Profiler = REACT_PROFILER_TYPE; var StrictMode = REACT_STRICT_MODE_TYPE; var Suspense = REACT_SUSPENSE_TYPE; var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated function isAsyncMode(object) { { if (!hasWarnedAboutDeprecatedIsAsyncMode) { hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.'); } } return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE; } function isConcurrentMode(object) { return typeOf(object) === REACT_CONCURRENT_MODE_TYPE; } function isContextConsumer(object) { return typeOf(object) === REACT_CONTEXT_TYPE; } function isContextProvider(object) { return typeOf(object) === REACT_PROVIDER_TYPE; } function isElement(object) { return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; } function isForwardRef(object) { return typeOf(object) === REACT_FORWARD_REF_TYPE; } function isFragment(object) { return typeOf(object) === REACT_FRAGMENT_TYPE; } function isLazy(object) { return typeOf(object) === REACT_LAZY_TYPE; } function isMemo(object) { return typeOf(object) === REACT_MEMO_TYPE; } function isPortal(object) { return typeOf(object) === REACT_PORTAL_TYPE; } function isProfiler(object) { return typeOf(object) === REACT_PROFILER_TYPE; } function isStrictMode(object) { return typeOf(object) === REACT_STRICT_MODE_TYPE; } function isSuspense(object) { return typeOf(object) === REACT_SUSPENSE_TYPE; } exports.AsyncMode = AsyncMode; exports.ConcurrentMode = ConcurrentMode; exports.ContextConsumer = ContextConsumer; exports.ContextProvider = ContextProvider; exports.Element = Element; exports.ForwardRef = ForwardRef; exports.Fragment = Fragment; exports.Lazy = Lazy; exports.Memo = Memo; exports.Portal = Portal; exports.Profiler = Profiler; exports.StrictMode = StrictMode; exports.Suspense = Suspense; exports.isAsyncMode = isAsyncMode; exports.isConcurrentMode = isConcurrentMode; exports.isContextConsumer = isContextConsumer; exports.isContextProvider = isContextProvider; exports.isElement = isElement; exports.isForwardRef = isForwardRef; exports.isFragment = isFragment; exports.isLazy = isLazy; exports.isMemo = isMemo; exports.isPortal = isPortal; exports.isProfiler = isProfiler; exports.isStrictMode = isStrictMode; exports.isSuspense = isSuspense; exports.isValidElementType = isValidElementType; exports.typeOf = typeOf; })(); } /***/ }), /***/ "./node_modules/react-is/index.js": /*!****************************************!*\ !*** ./node_modules/react-is/index.js ***! \****************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; if (false) {} else { module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "./node_modules/react-is/cjs/react-is.development.js"); } /***/ }), /***/ "./node_modules/react-json-tree/lib/esm/ItemRange.js": /*!***********************************************************!*\ !*** ./node_modules/react-json-tree/lib/esm/ItemRange.js ***! \***********************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ ItemRange; } /* harmony export */ }); /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); /* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _JSONArrow__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./JSONArrow */ "./node_modules/react-json-tree/lib/esm/JSONArrow.js"); function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__["default"])(this, result); }; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } var ItemRange = /*#__PURE__*/function (_React$Component) { (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__["default"])(ItemRange, _React$Component); var _super = _createSuper(ItemRange); function ItemRange(props) { var _this; (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_1__["default"])(this, ItemRange); _this = _super.call(this, props); (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__["default"])((0,_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_3__["default"])(_this), "handleClick", function () { _this.setState({ expanded: !_this.state.expanded }); }); _this.state = { expanded: false }; return _this; } (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_2__["default"])(ItemRange, [{ key: "render", value: function render() { var _this$props = this.props, styling = _this$props.styling, from = _this$props.from, to = _this$props.to, renderChildNodes = _this$props.renderChildNodes, nodeType = _this$props.nodeType; return this.state.expanded ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default().createElement("div", styling('itemRange', this.state.expanded), renderChildNodes(this.props, from, to)) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default().createElement("div", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, styling('itemRange', this.state.expanded), { onClick: this.handleClick }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default().createElement(_JSONArrow__WEBPACK_IMPORTED_MODULE_10__["default"], { nodeType: nodeType, styling: styling, expanded: false, onClick: this.handleClick, arrowStyle: "double" }), "".concat(from, " ... ").concat(to)); } }]); return ItemRange; }((react__WEBPACK_IMPORTED_MODULE_8___default().Component)); (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__["default"])(ItemRange, "propTypes", { styling: (prop_types__WEBPACK_IMPORTED_MODULE_9___default().func).isRequired, from: (prop_types__WEBPACK_IMPORTED_MODULE_9___default().number).isRequired, to: (prop_types__WEBPACK_IMPORTED_MODULE_9___default().number).isRequired, renderChildNodes: (prop_types__WEBPACK_IMPORTED_MODULE_9___default().func).isRequired, nodeType: (prop_types__WEBPACK_IMPORTED_MODULE_9___default().string).isRequired }); /***/ }), /***/ "./node_modules/react-json-tree/lib/esm/JSONArrayNode.js": /*!***************************************************************!*\ !*** ./node_modules/react-json-tree/lib/esm/JSONArrayNode.js ***! \***************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _JSONNestedNode__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./JSONNestedNode */ "./node_modules/react-json-tree/lib/esm/JSONNestedNode.js"); var _excluded = ["data"]; // Returns the "n Items" string for this node, // generating and caching it if it hasn't been created yet. function createItemString(data) { return "".concat(data.length, " ").concat(data.length !== 1 ? 'items' : 'item'); } // Configures to render an Array var JSONArrayNode = function JSONArrayNode(_ref) { var data = _ref.data, props = (0,_babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(_ref, _excluded); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_JSONNestedNode__WEBPACK_IMPORTED_MODULE_4__["default"], (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, props, { data: data, nodeType: "Array", nodeTypeIndicator: "[]", createItemString: createItemString, expandable: data.length > 0 })); }; JSONArrayNode.propTypes = { data: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().array) }; /* harmony default export */ __webpack_exports__["default"] = (JSONArrayNode); /***/ }), /***/ "./node_modules/react-json-tree/lib/esm/JSONArrow.js": /*!***********************************************************!*\ !*** ./node_modules/react-json-tree/lib/esm/JSONArrow.js ***! \***********************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__); var JSONArrow = function JSONArrow(_ref) { var styling = _ref.styling, arrowStyle = _ref.arrowStyle, expanded = _ref.expanded, nodeType = _ref.nodeType, onClick = _ref.onClick; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, styling('arrowContainer', arrowStyle), { onClick: onClick }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", styling(['arrow', 'arrowSign'], nodeType, expanded, arrowStyle), "\u25B6", arrowStyle === 'double' && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", styling(['arrowSign', 'arrowSignInner']), "\u25B6"))); }; JSONArrow.propTypes = { styling: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().func).isRequired, arrowStyle: prop_types__WEBPACK_IMPORTED_MODULE_2___default().oneOf(['single', 'double']), expanded: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().bool).isRequired, nodeType: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().string).isRequired, onClick: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().func).isRequired }; JSONArrow.defaultProps = { arrowStyle: 'single' }; /* harmony default export */ __webpack_exports__["default"] = (JSONArrow); /***/ }), /***/ "./node_modules/react-json-tree/lib/esm/JSONIterableNode.js": /*!******************************************************************!*\ !*** ./node_modules/react-json-tree/lib/esm/JSONIterableNode.js ***! \******************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _JSONNestedNode__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./JSONNestedNode */ "./node_modules/react-json-tree/lib/esm/JSONNestedNode.js"); function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } // Returns the "n Items" string for this node, // generating and caching it if it hasn't been created yet. function createItemString(data, limit) { var count = 0; var hasMore = false; if (Number.isSafeInteger(data.size)) { count = data.size; } else { // eslint-disable-next-line no-unused-vars var _iterator = _createForOfIteratorHelper(data), _step; try { for (_iterator.s(); !(_step = _iterator.n()).done;) { var entry = _step.value; if (limit && count + 1 > limit) { hasMore = true; break; } count += 1; } } catch (err) { _iterator.e(err); } finally { _iterator.f(); } } return "".concat(hasMore ? '>' : '').concat(count, " ").concat(count !== 1 ? 'entries' : 'entry'); } // Configures to render an iterable var JSONIterableNode = function JSONIterableNode(_ref) { var props = (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, _ref); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_JSONNestedNode__WEBPACK_IMPORTED_MODULE_2__["default"], (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, props, { nodeType: "Iterable", nodeTypeIndicator: "()", createItemString: createItemString })); }; /* harmony default export */ __webpack_exports__["default"] = (JSONIterableNode); /***/ }), /***/ "./node_modules/react-json-tree/lib/esm/JSONNestedNode.js": /*!****************************************************************!*\ !*** ./node_modules/react-json-tree/lib/esm/JSONNestedNode.js ***! \****************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ JSONNestedNode; } /* harmony export */ }); /* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); /* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"); /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var _JSONArrow__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./JSONArrow */ "./node_modules/react-json-tree/lib/esm/JSONArrow.js"); /* harmony import */ var _getCollectionEntries__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./getCollectionEntries */ "./node_modules/react-json-tree/lib/esm/getCollectionEntries.js"); /* harmony import */ var _JSONNode__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./JSONNode */ "./node_modules/react-json-tree/lib/esm/JSONNode.js"); /* harmony import */ var _ItemRange__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./ItemRange */ "./node_modules/react-json-tree/lib/esm/ItemRange.js"); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__["default"])(this, result); }; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } function isRange(rangeOrEntry) { return rangeOrEntry.to !== undefined; } function renderChildNodes(props, from, to) { var nodeType = props.nodeType, data = props.data, collectionLimit = props.collectionLimit, circularCache = props.circularCache, keyPath = props.keyPath, postprocessValue = props.postprocessValue, sortObjectKeys = props.sortObjectKeys; var childNodes = []; (0,_getCollectionEntries__WEBPACK_IMPORTED_MODULE_11__["default"])(nodeType, data, sortObjectKeys, collectionLimit, from, to).forEach(function (entry) { if (isRange(entry)) { childNodes.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default().createElement(_ItemRange__WEBPACK_IMPORTED_MODULE_12__["default"], (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_8__["default"])({}, props, { key: "ItemRange--".concat(entry.from, "-").concat(entry.to), from: entry.from, to: entry.to, renderChildNodes: renderChildNodes }))); } else { var key = entry.key, value = entry.value; var isCircular = circularCache.indexOf(value) !== -1; childNodes.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default().createElement(_JSONNode__WEBPACK_IMPORTED_MODULE_13__["default"], (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_8__["default"])({}, props, { postprocessValue: postprocessValue, collectionLimit: collectionLimit, key: "Node--".concat(key), keyPath: [key].concat((0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_7__["default"])(keyPath)), value: postprocessValue(value), circularCache: [].concat((0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_7__["default"])(circularCache), [value]), isCircular: isCircular, hideRoot: false }))); } }); return childNodes; } function getStateFromProps(props) { // calculate individual node expansion if necessary var expanded = !props.isCircular ? props.shouldExpandNode(props.keyPath, props.data, props.level) : false; return { expanded: expanded }; } var JSONNestedNode = /*#__PURE__*/function (_React$Component) { (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__["default"])(JSONNestedNode, _React$Component); var _super = _createSuper(JSONNestedNode); function JSONNestedNode(props) { var _this; (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__["default"])(this, JSONNestedNode); _this = _super.call(this, props); (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__["default"])((0,_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2__["default"])(_this), "handleClick", function () { if (_this.props.expandable) { _this.setState({ expanded: !_this.state.expanded }); } }); _this.state = getStateFromProps(props); return _this; } (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__["default"])(JSONNestedNode, [{ key: "UNSAFE_componentWillReceiveProps", value: function UNSAFE_componentWillReceiveProps(nextProps) { var nextState = getStateFromProps(nextProps); if (getStateFromProps(this.props).expanded !== nextState.expanded) { this.setState(nextState); } } }, { key: "shouldComponentUpdate", value: function shouldComponentUpdate(nextProps, nextState) { var _this2 = this; return !!Object.keys(nextProps).find(function (key) { return key !== 'circularCache' && (key === 'keyPath' ? nextProps[key].join('/') !== _this2.props[key].join('/') : nextProps[key] !== _this2.props[key]); }) || nextState.expanded !== this.state.expanded; } }, { key: "render", value: function render() { var _this$props = this.props, getItemString = _this$props.getItemString, nodeTypeIndicator = _this$props.nodeTypeIndicator, nodeType = _this$props.nodeType, data = _this$props.data, hideRoot = _this$props.hideRoot, createItemString = _this$props.createItemString, styling = _this$props.styling, collectionLimit = _this$props.collectionLimit, keyPath = _this$props.keyPath, labelRenderer = _this$props.labelRenderer, expandable = _this$props.expandable; var expanded = this.state.expanded; var renderedChildren = expanded || hideRoot && this.props.level === 0 ? renderChildNodes(_objectSpread(_objectSpread({}, this.props), {}, { level: this.props.level + 1 })) : null; var itemType = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default().createElement("span", styling('nestedNodeItemType', expanded), nodeTypeIndicator); var renderedItemString = getItemString(nodeType, data, itemType, createItemString(data, collectionLimit), keyPath); var stylingArgs = [keyPath, nodeType, expanded, expandable]; return hideRoot ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default().createElement("li", styling.apply(void 0, ['rootNode'].concat(stylingArgs)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default().createElement("ul", styling.apply(void 0, ['rootNodeChildren'].concat(stylingArgs)), renderedChildren)) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default().createElement("li", styling.apply(void 0, ['nestedNode'].concat(stylingArgs)), expandable && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default().createElement(_JSONArrow__WEBPACK_IMPORTED_MODULE_14__["default"], { styling: styling, nodeType: nodeType, expanded: expanded, onClick: this.handleClick }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default().createElement("label", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_8__["default"])({}, styling.apply(void 0, [['label', 'nestedNodeLabel']].concat(stylingArgs)), { onClick: this.handleClick }), labelRenderer.apply(void 0, stylingArgs)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default().createElement("span", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_8__["default"])({}, styling.apply(void 0, ['nestedNodeItemString'].concat(stylingArgs)), { onClick: this.handleClick }), renderedItemString), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default().createElement("ul", styling.apply(void 0, ['nestedNodeChildren'].concat(stylingArgs)), renderedChildren)); } }]); return JSONNestedNode; }((react__WEBPACK_IMPORTED_MODULE_9___default().Component)); (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__["default"])(JSONNestedNode, "propTypes", { getItemString: (prop_types__WEBPACK_IMPORTED_MODULE_10___default().func).isRequired, nodeTypeIndicator: (prop_types__WEBPACK_IMPORTED_MODULE_10___default().any), nodeType: (prop_types__WEBPACK_IMPORTED_MODULE_10___default().string).isRequired, data: (prop_types__WEBPACK_IMPORTED_MODULE_10___default().any), hideRoot: (prop_types__WEBPACK_IMPORTED_MODULE_10___default().bool).isRequired, createItemString: (prop_types__WEBPACK_IMPORTED_MODULE_10___default().func).isRequired, styling: (prop_types__WEBPACK_IMPORTED_MODULE_10___default().func).isRequired, collectionLimit: (prop_types__WEBPACK_IMPORTED_MODULE_10___default().number), keyPath: prop_types__WEBPACK_IMPORTED_MODULE_10___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_10___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_10___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_10___default().number)])).isRequired, labelRenderer: (prop_types__WEBPACK_IMPORTED_MODULE_10___default().func).isRequired, shouldExpandNode: (prop_types__WEBPACK_IMPORTED_MODULE_10___default().func), level: (prop_types__WEBPACK_IMPORTED_MODULE_10___default().number).isRequired, sortObjectKeys: prop_types__WEBPACK_IMPORTED_MODULE_10___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_10___default().func), (prop_types__WEBPACK_IMPORTED_MODULE_10___default().bool)]), isCircular: (prop_types__WEBPACK_IMPORTED_MODULE_10___default().bool), expandable: (prop_types__WEBPACK_IMPORTED_MODULE_10___default().bool) }); (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_6__["default"])(JSONNestedNode, "defaultProps", { data: [], circularCache: [], level: 0, expandable: true }); /***/ }), /***/ "./node_modules/react-json-tree/lib/esm/JSONNode.js": /*!**********************************************************!*\ !*** ./node_modules/react-json-tree/lib/esm/JSONNode.js ***! \**********************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _objType__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./objType */ "./node_modules/react-json-tree/lib/esm/objType.js"); /* harmony import */ var _JSONObjectNode__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./JSONObjectNode */ "./node_modules/react-json-tree/lib/esm/JSONObjectNode.js"); /* harmony import */ var _JSONArrayNode__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./JSONArrayNode */ "./node_modules/react-json-tree/lib/esm/JSONArrayNode.js"); /* harmony import */ var _JSONIterableNode__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./JSONIterableNode */ "./node_modules/react-json-tree/lib/esm/JSONIterableNode.js"); /* harmony import */ var _JSONValueNode__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./JSONValueNode */ "./node_modules/react-json-tree/lib/esm/JSONValueNode.js"); var _excluded = ["getItemString", "keyPath", "labelRenderer", "styling", "value", "valueRenderer", "isCustomNode"]; function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } var JSONNode = function JSONNode(_ref) { var getItemString = _ref.getItemString, keyPath = _ref.keyPath, labelRenderer = _ref.labelRenderer, styling = _ref.styling, value = _ref.value, valueRenderer = _ref.valueRenderer, isCustomNode = _ref.isCustomNode, rest = (0,_babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__["default"])(_ref, _excluded); var nodeType = isCustomNode(value) ? 'Custom' : (0,_objType__WEBPACK_IMPORTED_MODULE_5__["default"])(value); var simpleNodeProps = { getItemString: getItemString, key: keyPath[0], keyPath: keyPath, labelRenderer: labelRenderer, nodeType: nodeType, styling: styling, value: value, valueRenderer: valueRenderer }; var nestedNodeProps = _objectSpread(_objectSpread(_objectSpread({}, rest), simpleNodeProps), {}, { data: value, isCustomNode: isCustomNode }); switch (nodeType) { case 'Object': case 'Error': case 'WeakMap': case 'WeakSet': return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(_JSONObjectNode__WEBPACK_IMPORTED_MODULE_6__["default"], nestedNodeProps); case 'Array': return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(_JSONArrayNode__WEBPACK_IMPORTED_MODULE_7__["default"], nestedNodeProps); case 'Iterable': case 'Map': case 'Set': return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(_JSONIterableNode__WEBPACK_IMPORTED_MODULE_8__["default"], nestedNodeProps); case 'String': return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(_JSONValueNode__WEBPACK_IMPORTED_MODULE_9__["default"], (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, simpleNodeProps, { valueGetter: function valueGetter(raw) { return "\"".concat(raw, "\""); } })); case 'Number': return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(_JSONValueNode__WEBPACK_IMPORTED_MODULE_9__["default"], simpleNodeProps); case 'Boolean': return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(_JSONValueNode__WEBPACK_IMPORTED_MODULE_9__["default"], (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, simpleNodeProps, { valueGetter: function valueGetter(raw) { return raw ? 'true' : 'false'; } })); case 'Date': return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(_JSONValueNode__WEBPACK_IMPORTED_MODULE_9__["default"], (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, simpleNodeProps, { valueGetter: function valueGetter(raw) { return raw.toISOString(); } })); case 'Null': return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(_JSONValueNode__WEBPACK_IMPORTED_MODULE_9__["default"], (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, simpleNodeProps, { valueGetter: function valueGetter() { return 'null'; } })); case 'Undefined': return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(_JSONValueNode__WEBPACK_IMPORTED_MODULE_9__["default"], (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, simpleNodeProps, { valueGetter: function valueGetter() { return 'undefined'; } })); case 'Function': case 'Symbol': return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(_JSONValueNode__WEBPACK_IMPORTED_MODULE_9__["default"], (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, simpleNodeProps, { valueGetter: function valueGetter(raw) { return raw.toString(); } })); case 'Custom': return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(_JSONValueNode__WEBPACK_IMPORTED_MODULE_9__["default"], simpleNodeProps); default: return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(_JSONValueNode__WEBPACK_IMPORTED_MODULE_9__["default"], (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, simpleNodeProps, { valueGetter: function valueGetter() { return "<".concat(nodeType, ">"); } })); } }; JSONNode.propTypes = { getItemString: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().func).isRequired, keyPath: prop_types__WEBPACK_IMPORTED_MODULE_4___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_4___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_4___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_4___default().number)]).isRequired).isRequired, labelRenderer: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().func).isRequired, styling: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().func).isRequired, value: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().any), valueRenderer: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().func).isRequired, isCustomNode: (prop_types__WEBPACK_IMPORTED_MODULE_4___default().func).isRequired }; /* harmony default export */ __webpack_exports__["default"] = (JSONNode); /***/ }), /***/ "./node_modules/react-json-tree/lib/esm/JSONObjectNode.js": /*!****************************************************************!*\ !*** ./node_modules/react-json-tree/lib/esm/JSONObjectNode.js ***! \****************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _JSONNestedNode__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./JSONNestedNode */ "./node_modules/react-json-tree/lib/esm/JSONNestedNode.js"); var _excluded = ["data"]; // Returns the "n Items" string for this node, // generating and caching it if it hasn't been created yet. function createItemString(data) { var len = Object.getOwnPropertyNames(data).length; return "".concat(len, " ").concat(len !== 1 ? 'keys' : 'key'); } // Configures to render an Object var JSONObjectNode = function JSONObjectNode(_ref) { var data = _ref.data, props = (0,_babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(_ref, _excluded); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2___default().createElement(_JSONNestedNode__WEBPACK_IMPORTED_MODULE_4__["default"], (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, props, { data: data, nodeType: "Object", nodeTypeIndicator: props.nodeType === 'Error' ? 'Error()' : '{}', createItemString: createItemString, expandable: Object.getOwnPropertyNames(data).length > 0 })); }; JSONObjectNode.propTypes = { data: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().object), nodeType: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().string).isRequired }; /* harmony default export */ __webpack_exports__["default"] = (JSONObjectNode); /***/ }), /***/ "./node_modules/react-json-tree/lib/esm/JSONValueNode.js": /*!***************************************************************!*\ !*** ./node_modules/react-json-tree/lib/esm/JSONValueNode.js ***! \***************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__); var JSONValueNode = function JSONValueNode(_ref) { var nodeType = _ref.nodeType, styling = _ref.styling, labelRenderer = _ref.labelRenderer, keyPath = _ref.keyPath, valueRenderer = _ref.valueRenderer, value = _ref.value, _ref$valueGetter = _ref.valueGetter, valueGetter = _ref$valueGetter === void 0 ? function (value) { return value; } : _ref$valueGetter; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("li", styling('value', nodeType, keyPath), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("label", styling(['label', 'valueLabel'], nodeType, keyPath), labelRenderer(keyPath, nodeType, false, false)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("span", styling('valueText', nodeType, keyPath), valueRenderer.apply(void 0, [valueGetter(value), value].concat((0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__["default"])(keyPath))))); }; JSONValueNode.propTypes = { nodeType: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().string).isRequired, styling: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().func).isRequired, labelRenderer: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().func).isRequired, keyPath: prop_types__WEBPACK_IMPORTED_MODULE_2___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_2___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_2___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_2___default().number)]).isRequired).isRequired, valueRenderer: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().func).isRequired, value: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().any), valueGetter: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().func) }; /* harmony default export */ __webpack_exports__["default"] = (JSONValueNode); /***/ }), /***/ "./node_modules/react-json-tree/lib/esm/createStylingFromTheme.js": /*!************************************************************************!*\ !*** ./node_modules/react-json-tree/lib/esm/createStylingFromTheme.js ***! \************************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var react_base16_styling__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-base16-styling */ "./node_modules/react-base16-styling/lib/esm/index.js"); /* harmony import */ var _themes_solarized__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./themes/solarized */ "./node_modules/react-json-tree/lib/esm/themes/solarized.js"); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } var colorMap = function colorMap(theme) { return { BACKGROUND_COLOR: theme.base00, TEXT_COLOR: theme.base07, STRING_COLOR: theme.base0B, DATE_COLOR: theme.base0B, NUMBER_COLOR: theme.base09, BOOLEAN_COLOR: theme.base09, NULL_COLOR: theme.base08, UNDEFINED_COLOR: theme.base08, FUNCTION_COLOR: theme.base08, SYMBOL_COLOR: theme.base08, LABEL_COLOR: theme.base0D, ARROW_COLOR: theme.base0D, ITEM_STRING_COLOR: theme.base0B, ITEM_STRING_EXPANDED_COLOR: theme.base03 }; }; var valueColorMap = function valueColorMap(colors) { return { String: colors.STRING_COLOR, Date: colors.DATE_COLOR, Number: colors.NUMBER_COLOR, Boolean: colors.BOOLEAN_COLOR, Null: colors.NULL_COLOR, Undefined: colors.UNDEFINED_COLOR, Function: colors.FUNCTION_COLOR, Symbol: colors.SYMBOL_COLOR }; }; var getDefaultThemeStyling = function getDefaultThemeStyling(theme) { var colors = colorMap(theme); return { tree: { border: 0, padding: 0, marginTop: '0.5em', marginBottom: '0.5em', marginLeft: '0.125em', marginRight: 0, listStyle: 'none', MozUserSelect: 'none', WebkitUserSelect: 'none', backgroundColor: colors.BACKGROUND_COLOR }, value: function value(_ref, nodeType, keyPath) { var style = _ref.style; return { style: _objectSpread(_objectSpread({}, style), {}, { paddingTop: '0.25em', paddingRight: 0, marginLeft: '0.875em', WebkitUserSelect: 'text', MozUserSelect: 'text', wordWrap: 'break-word', paddingLeft: keyPath.length > 1 ? '2.125em' : '1.25em', textIndent: '-0.5em', wordBreak: 'break-all' }) }; }, label: { display: 'inline-block', color: colors.LABEL_COLOR }, valueLabel: { margin: '0 0.5em 0 0' }, valueText: function valueText(_ref2, nodeType) { var style = _ref2.style; return { style: _objectSpread(_objectSpread({}, style), {}, { color: valueColorMap(colors)[nodeType] }) }; }, itemRange: function itemRange(styling, expanded) { return { style: { paddingTop: expanded ? 0 : '0.25em', cursor: 'pointer', color: colors.LABEL_COLOR } }; }, arrow: function arrow(_ref3, nodeType, expanded) { var style = _ref3.style; return { style: _objectSpread(_objectSpread({}, style), {}, { marginLeft: 0, transition: '150ms', WebkitTransition: '150ms', MozTransition: '150ms', WebkitTransform: expanded ? 'rotateZ(90deg)' : 'rotateZ(0deg)', MozTransform: expanded ? 'rotateZ(90deg)' : 'rotateZ(0deg)', transform: expanded ? 'rotateZ(90deg)' : 'rotateZ(0deg)', transformOrigin: '45% 50%', WebkitTransformOrigin: '45% 50%', MozTransformOrigin: '45% 50%', position: 'relative', lineHeight: '1.1em', fontSize: '0.75em' }) }; }, arrowContainer: function arrowContainer(_ref4, arrowStyle) { var style = _ref4.style; return { style: _objectSpread(_objectSpread({}, style), {}, { display: 'inline-block', paddingRight: '0.5em', paddingLeft: arrowStyle === 'double' ? '1em' : 0, cursor: 'pointer' }) }; }, arrowSign: { color: colors.ARROW_COLOR }, arrowSignInner: { position: 'absolute', top: 0, left: '-0.4em' }, nestedNode: function nestedNode(_ref5, keyPath, nodeType, expanded, expandable) { var style = _ref5.style; return { style: _objectSpread(_objectSpread({}, style), {}, { position: 'relative', paddingTop: '0.25em', marginLeft: keyPath.length > 1 ? '0.875em' : 0, paddingLeft: !expandable ? '1.125em' : 0 }) }; }, rootNode: { padding: 0, margin: 0 }, nestedNodeLabel: function nestedNodeLabel(_ref6, keyPath, nodeType, expanded, expandable) { var style = _ref6.style; return { style: _objectSpread(_objectSpread({}, style), {}, { margin: 0, padding: 0, WebkitUserSelect: expandable ? 'inherit' : 'text', MozUserSelect: expandable ? 'inherit' : 'text', cursor: expandable ? 'pointer' : 'default' }) }; }, nestedNodeItemString: function nestedNodeItemString(_ref7, keyPath, nodeType, expanded) { var style = _ref7.style; return { style: _objectSpread(_objectSpread({}, style), {}, { paddingLeft: '0.5em', cursor: 'default', color: expanded ? colors.ITEM_STRING_EXPANDED_COLOR : colors.ITEM_STRING_COLOR }) }; }, nestedNodeItemType: { marginLeft: '0.3em', marginRight: '0.3em' }, nestedNodeChildren: function nestedNodeChildren(_ref8, nodeType, expanded) { var style = _ref8.style; return { style: _objectSpread(_objectSpread({}, style), {}, { padding: 0, margin: 0, listStyle: 'none', display: expanded ? 'block' : 'none' }) }; }, rootNodeChildren: { padding: 0, margin: 0, listStyle: 'none' } }; }; var createStylingFromTheme = (0,react_base16_styling__WEBPACK_IMPORTED_MODULE_1__.createStyling)(getDefaultThemeStyling, { defaultBase16: _themes_solarized__WEBPACK_IMPORTED_MODULE_2__["default"] }); /* harmony default export */ __webpack_exports__["default"] = (createStylingFromTheme); /***/ }), /***/ "./node_modules/react-json-tree/lib/esm/getCollectionEntries.js": /*!**********************************************************************!*\ !*** ./node_modules/react-json-tree/lib/esm/getCollectionEntries.js ***! \**********************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ getCollectionEntries; } /* harmony export */ }); /* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js"); function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } function getLength(type, collection) { if (type === 'Object') { // eslint-disable-next-line @typescript-eslint/ban-types return Object.keys(collection).length; } else if (type === 'Array') { return collection.length; } return Infinity; } function isIterableMap(collection) { return typeof collection.set === 'function'; } function getEntries(type, collection, sortObjectKeys) { var from = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; var to = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : Infinity; var res; if (type === 'Object') { var keys = Object.getOwnPropertyNames(collection); if (sortObjectKeys) { keys.sort(sortObjectKeys === true ? undefined : sortObjectKeys); } keys = keys.slice(from, to + 1); res = { entries: keys.map(function (key) { return { key: key, value: collection[key] }; }) }; } else if (type === 'Array') { res = { entries: collection.slice(from, to + 1).map(function (val, idx) { return { key: idx + from, value: val }; }) }; } else { var idx = 0; var entries = []; var done = true; var isMap = isIterableMap(collection); var _iterator = _createForOfIteratorHelper(collection), _step; try { for (_iterator.s(); !(_step = _iterator.n()).done;) { var item = _step.value; if (idx > to) { done = false; break; } if (from <= idx) { if (isMap && Array.isArray(item)) { if (typeof item[0] === 'string' || typeof item[0] === 'number') { entries.push({ key: item[0], value: item[1] }); } else { entries.push({ key: "[entry ".concat(idx, "]"), value: { '[key]': item[0], '[value]': item[1] } }); } } else { entries.push({ key: idx, value: item }); } } idx++; } } catch (err) { _iterator.e(err); } finally { _iterator.f(); } res = { hasMore: !done, entries: entries }; } return res; } function getRanges(from, to, limit) { var ranges = []; while (to - from > limit * limit) { limit = limit * limit; } for (var i = from; i <= to; i += limit) { ranges.push({ from: i, to: Math.min(to, i + limit - 1) }); } return ranges; } function getCollectionEntries(type, collection, sortObjectKeys, limit) { var from = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0; var to = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : Infinity; var getEntriesBound = getEntries.bind(null, type, collection, sortObjectKeys); if (!limit) { return getEntriesBound().entries; } var isSubset = to < Infinity; var length = Math.min(to - from, getLength(type, collection)); if (type !== 'Iterable') { if (length <= limit || limit < 7) { return getEntriesBound(from, to).entries; } } else { if (length <= limit && !isSubset) { return getEntriesBound(from, to).entries; } } var limitedEntries; if (type === 'Iterable') { var _getEntriesBound = getEntriesBound(from, from + limit - 1), hasMore = _getEntriesBound.hasMore, entries = _getEntriesBound.entries; limitedEntries = hasMore ? [].concat((0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__["default"])(entries), (0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__["default"])(getRanges(from + limit, from + 2 * limit - 1, limit))) : entries; } else { limitedEntries = isSubset ? getRanges(from, to, limit) : [].concat((0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__["default"])(getEntriesBound(0, limit - 5).entries), (0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__["default"])(getRanges(limit - 4, length - 5, limit)), (0,_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__["default"])(getEntriesBound(length - 4, length - 1).entries)); } return limitedEntries; } /***/ }), /***/ "./node_modules/react-json-tree/lib/esm/index.js": /*!*******************************************************!*\ !*** ./node_modules/react-json-tree/lib/esm/index.js ***! \*******************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ JSONTree: function() { return /* binding */ JSONTree; } /* harmony export */ }); /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* harmony import */ var _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"); /* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js"); /* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/esm/createClass.js"); /* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/esm/inherits.js"); /* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js"); /* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js"); /* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); /* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! prop-types */ "prop-types"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var _JSONNode__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./JSONNode */ "./node_modules/react-json-tree/lib/esm/JSONNode.js"); /* harmony import */ var _createStylingFromTheme__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./createStylingFromTheme */ "./node_modules/react-json-tree/lib/esm/createStylingFromTheme.js"); /* harmony import */ var react_base16_styling__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! react-base16-styling */ "./node_modules/react-base16-styling/lib/esm/index.js"); var _excluded = ["data", "keyPath", "postprocessValue", "hideRoot", "theme", "invertTheme"]; function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_6__["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_5__["default"])(this, result); }; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } // ES6 + inline style port of JSONViewer https://bitbucket.org/davevedder/react-json-viewer/ // all credits and original code to the author // Dave Vedder http://www.eskimospy.com/ // port by Daniele Zannotti http://www.github.com/dzannotti var identity = function identity(value) { return value; }; var expandRootNode = function expandRootNode(keyPath, data, level) { return level === 0; }; var defaultItemString = function defaultItemString(type, data, itemType, itemString) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default().createElement("span", null, itemType, " ", itemString); }; var defaultLabelRenderer = function defaultLabelRenderer(_ref) { var _ref2 = (0,_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_8__["default"])(_ref, 1), label = _ref2[0]; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default().createElement("span", null, label, ":"); }; var noCustomNode = function noCustomNode() { return false; }; function checkLegacyTheming(theme, props) { var deprecatedStylingMethodsMap = { getArrowStyle: 'arrow', getListStyle: 'nestedNodeChildren', getItemStringStyle: 'nestedNodeItemString', getLabelStyle: 'label', getValueStyle: 'valueText' }; var deprecatedStylingMethods = Object.keys(deprecatedStylingMethodsMap).filter(function (name) { return props[name]; }); if (deprecatedStylingMethods.length > 0) { if (typeof theme === 'string') { theme = { extend: theme }; } else { theme = _objectSpread({}, theme); } deprecatedStylingMethods.forEach(function (name) { // eslint-disable-next-line no-console console.error("Styling method \"".concat(name, "\" is deprecated, use \"theme\" property instead")); theme[deprecatedStylingMethodsMap[name]] = function (_ref3) { var style = _ref3.style; for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } return { style: _objectSpread(_objectSpread({}, style), props[name].apply(props, args)) }; }; }); } return theme; } function getStateFromProps(props) { var theme = checkLegacyTheming(props.theme, props); if (props.invertTheme) { theme = (0,react_base16_styling__WEBPACK_IMPORTED_MODULE_11__.invertTheme)(theme); } return { styling: (0,_createStylingFromTheme__WEBPACK_IMPORTED_MODULE_12__["default"])(theme) }; } var JSONTree = /*#__PURE__*/function (_React$Component) { (0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__["default"])(JSONTree, _React$Component); var _super = _createSuper(JSONTree); function JSONTree(props) { var _this; (0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__["default"])(this, JSONTree); _this = _super.call(this, props); _this.state = getStateFromProps(props); return _this; } (0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__["default"])(JSONTree, [{ key: "UNSAFE_componentWillReceiveProps", value: function UNSAFE_componentWillReceiveProps(nextProps) { var _this2 = this; if (['theme', 'invertTheme'].find(function (k) { return nextProps[k] !== _this2.props[k]; })) { this.setState(getStateFromProps(nextProps)); } } }, { key: "shouldComponentUpdate", value: function shouldComponentUpdate(nextProps) { var _this3 = this; return !!Object.keys(nextProps).find(function (k) { return k === 'keyPath' ? nextProps[k].join('/') !== _this3.props[k].join('/') : nextProps[k] !== _this3.props[k]; }); } }, { key: "render", value: function render() { var _this$props = this.props, value = _this$props.data, keyPath = _this$props.keyPath, postprocessValue = _this$props.postprocessValue, hideRoot = _this$props.hideRoot, theme = _this$props.theme, _ = _this$props.invertTheme, rest = (0,_babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__["default"])(_this$props, _excluded); var styling = this.state.styling; return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default().createElement("ul", styling('tree'), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default().createElement(_JSONNode__WEBPACK_IMPORTED_MODULE_13__["default"], (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, _objectSpread({ postprocessValue: postprocessValue, hideRoot: hideRoot, styling: styling }, rest), { keyPath: hideRoot ? [] : keyPath, value: postprocessValue(value) }))); } }]); return JSONTree; }((react__WEBPACK_IMPORTED_MODULE_9___default().Component)); (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__["default"])(JSONTree, "propTypes", { data: (prop_types__WEBPACK_IMPORTED_MODULE_10___default().any), hideRoot: (prop_types__WEBPACK_IMPORTED_MODULE_10___default().bool), theme: prop_types__WEBPACK_IMPORTED_MODULE_10___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_10___default().object), (prop_types__WEBPACK_IMPORTED_MODULE_10___default().string)]), invertTheme: (prop_types__WEBPACK_IMPORTED_MODULE_10___default().bool), keyPath: prop_types__WEBPACK_IMPORTED_MODULE_10___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_10___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_10___default().string), (prop_types__WEBPACK_IMPORTED_MODULE_10___default().number)])), postprocessValue: (prop_types__WEBPACK_IMPORTED_MODULE_10___default().func), sortObjectKeys: prop_types__WEBPACK_IMPORTED_MODULE_10___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_10___default().func), (prop_types__WEBPACK_IMPORTED_MODULE_10___default().bool)]) }); (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_7__["default"])(JSONTree, "defaultProps", { shouldExpandNode: expandRootNode, hideRoot: false, keyPath: ['root'], getItemString: defaultItemString, labelRenderer: defaultLabelRenderer, valueRenderer: identity, postprocessValue: identity, isCustomNode: noCustomNode, collectionLimit: 50, invertTheme: true }); /***/ }), /***/ "./node_modules/react-json-tree/lib/esm/objType.js": /*!*********************************************************!*\ !*** ./node_modules/react-json-tree/lib/esm/objType.js ***! \*********************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ objType; } /* harmony export */ }); function objType(obj) { var type = Object.prototype.toString.call(obj).slice(8, -1); if (type === 'Object' && typeof obj[Symbol.iterator] === 'function') { return 'Iterable'; } if (type === 'Custom' && obj.constructor !== Object && obj instanceof Object) { // For projects implementing objects overriding `.prototype[Symbol.toStringTag]` return 'Object'; } return type; } /***/ }), /***/ "./node_modules/react-json-tree/lib/esm/themes/solarized.js": /*!******************************************************************!*\ !*** ./node_modules/react-json-tree/lib/esm/themes/solarized.js ***! \******************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = ({ scheme: 'solarized', author: 'ethan schoonover (http://ethanschoonover.com/solarized)', base00: '#002b36', base01: '#073642', base02: '#586e75', base03: '#657b83', base04: '#839496', base05: '#93a1a1', base06: '#eee8d5', base07: '#fdf6e3', base08: '#dc322f', base09: '#cb4b16', base0A: '#b58900', base0B: '#859900', base0C: '#2aa198', base0D: '#268bd2', base0E: '#6c71c4', base0F: '#d33682' }); /***/ }), /***/ "./node_modules/redux-actions/es/createAction.js": /*!*******************************************************!*\ !*** ./node_modules/redux-actions/es/createAction.js ***! \*******************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ createAction; } /* harmony export */ }); /* harmony import */ var invariant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! invariant */ "./node_modules/invariant/browser.js"); /* harmony import */ var invariant__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(invariant__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _utils_isFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/isFunction */ "./node_modules/redux-actions/es/utils/isFunction.js"); /* harmony import */ var _utils_identity__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/identity */ "./node_modules/redux-actions/es/utils/identity.js"); /* harmony import */ var _utils_isNull__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/isNull */ "./node_modules/redux-actions/es/utils/isNull.js"); function createAction(type, payloadCreator, metaCreator) { if (payloadCreator === void 0) { payloadCreator = _utils_identity__WEBPACK_IMPORTED_MODULE_1__["default"]; } invariant__WEBPACK_IMPORTED_MODULE_0___default()((0,_utils_isFunction__WEBPACK_IMPORTED_MODULE_2__["default"])(payloadCreator) || (0,_utils_isNull__WEBPACK_IMPORTED_MODULE_3__["default"])(payloadCreator), 'Expected payloadCreator to be a function, undefined or null'); var finalPayloadCreator = (0,_utils_isNull__WEBPACK_IMPORTED_MODULE_3__["default"])(payloadCreator) || payloadCreator === _utils_identity__WEBPACK_IMPORTED_MODULE_1__["default"] ? _utils_identity__WEBPACK_IMPORTED_MODULE_1__["default"] : function (head) { for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } return head instanceof Error ? head : payloadCreator.apply(void 0, [head].concat(args)); }; var hasMeta = (0,_utils_isFunction__WEBPACK_IMPORTED_MODULE_2__["default"])(metaCreator); var typeString = type.toString(); var actionCreator = function actionCreator() { var payload = finalPayloadCreator.apply(void 0, arguments); var action = { type: type }; if (payload instanceof Error) { action.error = true; } if (payload !== undefined) { action.payload = payload; } if (hasMeta) { action.meta = metaCreator.apply(void 0, arguments); } return action; }; actionCreator.toString = function () { return typeString; }; return actionCreator; } /***/ }), /***/ "./node_modules/redux-actions/es/utils/identity.js": /*!*********************************************************!*\ !*** ./node_modules/redux-actions/es/utils/identity.js ***! \*********************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function (value) { return value; }); /***/ }), /***/ "./node_modules/redux-actions/es/utils/isFunction.js": /*!***********************************************************!*\ !*** ./node_modules/redux-actions/es/utils/isFunction.js ***! \***********************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function (value) { return typeof value === 'function'; }); /***/ }), /***/ "./node_modules/redux-actions/es/utils/isNull.js": /*!*******************************************************!*\ !*** ./node_modules/redux-actions/es/utils/isNull.js ***! \*******************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = (function (value) { return value === null; }); /***/ }), /***/ "./node_modules/redux-thunk/es/index.js": /*!**********************************************!*\ !*** ./node_modules/redux-thunk/es/index.js ***! \**********************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /** A function that accepts a potential "extra argument" value to be injected later, * and returns an instance of the thunk middleware that uses that value */ function createThunkMiddleware(extraArgument) { // Standard Redux middleware definition pattern: // See: https://redux.js.org/tutorials/fundamentals/part-4-store#writing-custom-middleware var middleware = function middleware(_ref) { var dispatch = _ref.dispatch, getState = _ref.getState; return function (next) { return function (action) { // The thunk middleware looks for any functions that were passed to `store.dispatch`. // If this "action" is really a function, call it and return the result. if (typeof action === 'function') { // Inject the store's `dispatch` and `getState` methods, as well as any "extra arg" return action(dispatch, getState, extraArgument); } // Otherwise, pass the action down the middleware chain as usual return next(action); }; }; }; return middleware; } var thunk = createThunkMiddleware(); // Attach the factory function so users can create a customized version // with whatever "extra arg" they want to inject into their thunks thunk.withExtraArgument = createThunkMiddleware; /* harmony default export */ __webpack_exports__["default"] = (thunk); /***/ }), /***/ "./node_modules/redux/es/redux.js": /*!****************************************!*\ !*** ./node_modules/redux/es/redux.js ***! \****************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ __DO_NOT_USE__ActionTypes: function() { return /* binding */ ActionTypes; }, /* harmony export */ applyMiddleware: function() { return /* binding */ applyMiddleware; }, /* harmony export */ bindActionCreators: function() { return /* binding */ bindActionCreators; }, /* harmony export */ combineReducers: function() { return /* binding */ combineReducers; }, /* harmony export */ compose: function() { return /* binding */ compose; }, /* harmony export */ createStore: function() { return /* binding */ createStore; }, /* harmony export */ legacy_createStore: function() { return /* binding */ legacy_createStore; } /* harmony export */ }); /* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ "./node_modules/@babel/runtime/helpers/esm/objectSpread2.js"); /** * Adapted from React: https://github.com/facebook/react/blob/master/packages/shared/formatProdErrorMessage.js * * Do not require this module directly! Use normal throw error calls. These messages will be replaced with error codes * during build. * @param {number} code */ function formatProdErrorMessage(code) { return "Minified Redux error #" + code + "; visit https://redux.js.org/Errors?code=" + code + " for the full message or " + 'use the non-minified dev environment for full errors. '; } // Inlined version of the `symbol-observable` polyfill var $$observable = (function () { return typeof Symbol === 'function' && Symbol.observable || '@@observable'; })(); /** * These are private action types reserved by Redux. * For any unknown actions, you must return the current state. * If the current state is undefined, you must return the initial state. * Do not reference these action types directly in your code. */ var randomString = function randomString() { return Math.random().toString(36).substring(7).split('').join('.'); }; var ActionTypes = { INIT: "@@redux/INIT" + randomString(), REPLACE: "@@redux/REPLACE" + randomString(), PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() { return "@@redux/PROBE_UNKNOWN_ACTION" + randomString(); } }; /** * @param {any} obj The object to inspect. * @returns {boolean} True if the argument appears to be a plain object. */ function isPlainObject(obj) { if (typeof obj !== 'object' || obj === null) return false; var proto = obj; while (Object.getPrototypeOf(proto) !== null) { proto = Object.getPrototypeOf(proto); } return Object.getPrototypeOf(obj) === proto; } // Inlined / shortened version of `kindOf` from https://github.com/jonschlinkert/kind-of function miniKindOf(val) { if (val === void 0) return 'undefined'; if (val === null) return 'null'; var type = typeof val; switch (type) { case 'boolean': case 'string': case 'number': case 'symbol': case 'function': { return type; } } if (Array.isArray(val)) return 'array'; if (isDate(val)) return 'date'; if (isError(val)) return 'error'; var constructorName = ctorName(val); switch (constructorName) { case 'Symbol': case 'Promise': case 'WeakMap': case 'WeakSet': case 'Map': case 'Set': return constructorName; } // other return type.slice(8, -1).toLowerCase().replace(/\s/g, ''); } function ctorName(val) { return typeof val.constructor === 'function' ? val.constructor.name : null; } function isError(val) { return val instanceof Error || typeof val.message === 'string' && val.constructor && typeof val.constructor.stackTraceLimit === 'number'; } function isDate(val) { if (val instanceof Date) return true; return typeof val.toDateString === 'function' && typeof val.getDate === 'function' && typeof val.setDate === 'function'; } function kindOf(val) { var typeOfVal = typeof val; if (true) { typeOfVal = miniKindOf(val); } return typeOfVal; } /** * @deprecated * * **We recommend using the `configureStore` method * of the `@reduxjs/toolkit` package**, which replaces `createStore`. * * Redux Toolkit is our recommended approach for writing Redux logic today, * including store setup, reducers, data fetching, and more. * * **For more details, please read this Redux docs page:** * **https://redux.js.org/introduction/why-rtk-is-redux-today** * * `configureStore` from Redux Toolkit is an improved version of `createStore` that * simplifies setup and helps avoid common bugs. * * You should not be using the `redux` core package by itself today, except for learning purposes. * The `createStore` method from the core `redux` package will not be removed, but we encourage * all users to migrate to using Redux Toolkit for all Redux code. * * If you want to use `createStore` without this visual deprecation warning, use * the `legacy_createStore` import instead: * * `import { legacy_createStore as createStore} from 'redux'` * */ function createStore(reducer, preloadedState, enhancer) { var _ref2; if (typeof preloadedState === 'function' && typeof enhancer === 'function' || typeof enhancer === 'function' && typeof arguments[3] === 'function') { throw new Error( false ? 0 : 'It looks like you are passing several store enhancers to ' + 'createStore(). This is not supported. Instead, compose them ' + 'together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.'); } if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') { enhancer = preloadedState; preloadedState = undefined; } if (typeof enhancer !== 'undefined') { if (typeof enhancer !== 'function') { throw new Error( false ? 0 : "Expected the enhancer to be a function. Instead, received: '" + kindOf(enhancer) + "'"); } return enhancer(createStore)(reducer, preloadedState); } if (typeof reducer !== 'function') { throw new Error( false ? 0 : "Expected the root reducer to be a function. Instead, received: '" + kindOf(reducer) + "'"); } var currentReducer = reducer; var currentState = preloadedState; var currentListeners = []; var nextListeners = currentListeners; var isDispatching = false; /** * This makes a shallow copy of currentListeners so we can use * nextListeners as a temporary list while dispatching. * * This prevents any bugs around consumers calling * subscribe/unsubscribe in the middle of a dispatch. */ function ensureCanMutateNextListeners() { if (nextListeners === currentListeners) { nextListeners = currentListeners.slice(); } } /** * Reads the state tree managed by the store. * * @returns {any} The current state tree of your application. */ function getState() { if (isDispatching) { throw new Error( false ? 0 : 'You may not call store.getState() while the reducer is executing. ' + 'The reducer has already received the state as an argument. ' + 'Pass it down from the top reducer instead of reading it from the store.'); } return currentState; } /** * Adds a change listener. It will be called any time an action is dispatched, * and some part of the state tree may potentially have changed. You may then * call `getState()` to read the current state tree inside the callback. * * You may call `dispatch()` from a change listener, with the following * caveats: * * 1. The subscriptions are snapshotted just before every `dispatch()` call. * If you subscribe or unsubscribe while the listeners are being invoked, this * will not have any effect on the `dispatch()` that is currently in progress. * However, the next `dispatch()` call, whether nested or not, will use a more * recent snapshot of the subscription list. * * 2. The listener should not expect to see all state changes, as the state * might have been updated multiple times during a nested `dispatch()` before * the listener is called. It is, however, guaranteed that all subscribers * registered before the `dispatch()` started will be called with the latest * state by the time it exits. * * @param {Function} listener A callback to be invoked on every dispatch. * @returns {Function} A function to remove this change listener. */ function subscribe(listener) { if (typeof listener !== 'function') { throw new Error( false ? 0 : "Expected the listener to be a function. Instead, received: '" + kindOf(listener) + "'"); } if (isDispatching) { throw new Error( false ? 0 : 'You may not call store.subscribe() while the reducer is executing. ' + 'If you would like to be notified after the store has been updated, subscribe from a ' + 'component and invoke store.getState() in the callback to access the latest state. ' + 'See https://redux.js.org/api/store#subscribelistener for more details.'); } var isSubscribed = true; ensureCanMutateNextListeners(); nextListeners.push(listener); return function unsubscribe() { if (!isSubscribed) { return; } if (isDispatching) { throw new Error( false ? 0 : 'You may not unsubscribe from a store listener while the reducer is executing. ' + 'See https://redux.js.org/api/store#subscribelistener for more details.'); } isSubscribed = false; ensureCanMutateNextListeners(); var index = nextListeners.indexOf(listener); nextListeners.splice(index, 1); currentListeners = null; }; } /** * Dispatches an action. It is the only way to trigger a state change. * * The `reducer` function, used to create the store, will be called with the * current state tree and the given `action`. Its return value will * be considered the **next** state of the tree, and the change listeners * will be notified. * * The base implementation only supports plain object actions. If you want to * dispatch a Promise, an Observable, a thunk, or something else, you need to * wrap your store creating function into the corresponding middleware. For * example, see the documentation for the `redux-thunk` package. Even the * middleware will eventually dispatch plain object actions using this method. * * @param {Object} action A plain object representing “what changed”. It is * a good idea to keep actions serializable so you can record and replay user * sessions, or use the time travelling `redux-devtools`. An action must have * a `type` property which may not be `undefined`. It is a good idea to use * string constants for action types. * * @returns {Object} For convenience, the same action object you dispatched. * * Note that, if you use a custom middleware, it may wrap `dispatch()` to * return something else (for example, a Promise you can await). */ function dispatch(action) { if (!isPlainObject(action)) { throw new Error( false ? 0 : "Actions must be plain objects. Instead, the actual type was: '" + kindOf(action) + "'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples."); } if (typeof action.type === 'undefined') { throw new Error( false ? 0 : 'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.'); } if (isDispatching) { throw new Error( false ? 0 : 'Reducers may not dispatch actions.'); } try { isDispatching = true; currentState = currentReducer(currentState, action); } finally { isDispatching = false; } var listeners = currentListeners = nextListeners; for (var i = 0; i < listeners.length; i++) { var listener = listeners[i]; listener(); } return action; } /** * Replaces the reducer currently used by the store to calculate the state. * * You might need this if your app implements code splitting and you want to * load some of the reducers dynamically. You might also need this if you * implement a hot reloading mechanism for Redux. * * @param {Function} nextReducer The reducer for the store to use instead. * @returns {void} */ function replaceReducer(nextReducer) { if (typeof nextReducer !== 'function') { throw new Error( false ? 0 : "Expected the nextReducer to be a function. Instead, received: '" + kindOf(nextReducer)); } currentReducer = nextReducer; // This action has a similiar effect to ActionTypes.INIT. // Any reducers that existed in both the new and old rootReducer // will receive the previous state. This effectively populates // the new state tree with any relevant data from the old one. dispatch({ type: ActionTypes.REPLACE }); } /** * Interoperability point for observable/reactive libraries. * @returns {observable} A minimal observable of state changes. * For more information, see the observable proposal: * https://github.com/tc39/proposal-observable */ function observable() { var _ref; var outerSubscribe = subscribe; return _ref = { /** * The minimal observable subscription method. * @param {Object} observer Any object that can be used as an observer. * The observer object should have a `next` method. * @returns {subscription} An object with an `unsubscribe` method that can * be used to unsubscribe the observable from the store, and prevent further * emission of values from the observable. */ subscribe: function subscribe(observer) { if (typeof observer !== 'object' || observer === null) { throw new Error( false ? 0 : "Expected the observer to be an object. Instead, received: '" + kindOf(observer) + "'"); } function observeState() { if (observer.next) { observer.next(getState()); } } observeState(); var unsubscribe = outerSubscribe(observeState); return { unsubscribe: unsubscribe }; } }, _ref[$$observable] = function () { return this; }, _ref; } // When a store is created, an "INIT" action is dispatched so that every // reducer returns their initial state. This effectively populates // the initial state tree. dispatch({ type: ActionTypes.INIT }); return _ref2 = { dispatch: dispatch, subscribe: subscribe, getState: getState, replaceReducer: replaceReducer }, _ref2[$$observable] = observable, _ref2; } /** * Creates a Redux store that holds the state tree. * * **We recommend using `configureStore` from the * `@reduxjs/toolkit` package**, which replaces `createStore`: * **https://redux.js.org/introduction/why-rtk-is-redux-today** * * The only way to change the data in the store is to call `dispatch()` on it. * * There should only be a single store in your app. To specify how different * parts of the state tree respond to actions, you may combine several reducers * into a single reducer function by using `combineReducers`. * * @param {Function} reducer A function that returns the next state tree, given * the current state tree and the action to handle. * * @param {any} [preloadedState] The initial state. You may optionally specify it * to hydrate the state from the server in universal apps, or to restore a * previously serialized user session. * If you use `combineReducers` to produce the root reducer function, this must be * an object with the same shape as `combineReducers` keys. * * @param {Function} [enhancer] The store enhancer. You may optionally specify it * to enhance the store with third-party capabilities such as middleware, * time travel, persistence, etc. The only store enhancer that ships with Redux * is `applyMiddleware()`. * * @returns {Store} A Redux store that lets you read the state, dispatch actions * and subscribe to changes. */ var legacy_createStore = createStore; /** * Prints a warning in the console if it exists. * * @param {String} message The warning message. * @returns {void} */ function warning(message) { /* eslint-disable no-console */ if (typeof console !== 'undefined' && typeof console.error === 'function') { console.error(message); } /* eslint-enable no-console */ try { // This error was thrown as a convenience so that if you enable // "break on all exceptions" in your console, // it would pause the execution at this line. throw new Error(message); } catch (e) {} // eslint-disable-line no-empty } function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) { var reducerKeys = Object.keys(reducers); var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer'; if (reducerKeys.length === 0) { return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.'; } if (!isPlainObject(inputState)) { return "The " + argumentName + " has unexpected type of \"" + kindOf(inputState) + "\". Expected argument to be an object with the following " + ("keys: \"" + reducerKeys.join('", "') + "\""); } var unexpectedKeys = Object.keys(inputState).filter(function (key) { return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key]; }); unexpectedKeys.forEach(function (key) { unexpectedKeyCache[key] = true; }); if (action && action.type === ActionTypes.REPLACE) return; if (unexpectedKeys.length > 0) { return "Unexpected " + (unexpectedKeys.length > 1 ? 'keys' : 'key') + " " + ("\"" + unexpectedKeys.join('", "') + "\" found in " + argumentName + ". ") + "Expected to find one of the known reducer keys instead: " + ("\"" + reducerKeys.join('", "') + "\". Unexpected keys will be ignored."); } } function assertReducerShape(reducers) { Object.keys(reducers).forEach(function (key) { var reducer = reducers[key]; var initialState = reducer(undefined, { type: ActionTypes.INIT }); if (typeof initialState === 'undefined') { throw new Error( false ? 0 : "The slice reducer for key \"" + key + "\" returned undefined during initialization. " + "If the state passed to the reducer is undefined, you must " + "explicitly return the initial state. The initial state may " + "not be undefined. If you don't want to set a value for this reducer, " + "you can use null instead of undefined."); } if (typeof reducer(undefined, { type: ActionTypes.PROBE_UNKNOWN_ACTION() }) === 'undefined') { throw new Error( false ? 0 : "The slice reducer for key \"" + key + "\" returned undefined when probed with a random type. " + ("Don't try to handle '" + ActionTypes.INIT + "' or other actions in \"redux/*\" ") + "namespace. They are considered private. Instead, you must return the " + "current state for any unknown actions, unless it is undefined, " + "in which case you must return the initial state, regardless of the " + "action type. The initial state may not be undefined, but can be null."); } }); } /** * Turns an object whose values are different reducer functions, into a single * reducer function. It will call every child reducer, and gather their results * into a single state object, whose keys correspond to the keys of the passed * reducer functions. * * @param {Object} reducers An object whose values correspond to different * reducer functions that need to be combined into one. One handy way to obtain * it is to use ES6 `import * as reducers` syntax. The reducers may never return * undefined for any action. Instead, they should return their initial state * if the state passed to them was undefined, and the current state for any * unrecognized action. * * @returns {Function} A reducer function that invokes every reducer inside the * passed object, and builds a state object with the same shape. */ function combineReducers(reducers) { var reducerKeys = Object.keys(reducers); var finalReducers = {}; for (var i = 0; i < reducerKeys.length; i++) { var key = reducerKeys[i]; if (true) { if (typeof reducers[key] === 'undefined') { warning("No reducer provided for key \"" + key + "\""); } } if (typeof reducers[key] === 'function') { finalReducers[key] = reducers[key]; } } var finalReducerKeys = Object.keys(finalReducers); // This is used to make sure we don't warn about the same // keys multiple times. var unexpectedKeyCache; if (true) { unexpectedKeyCache = {}; } var shapeAssertionError; try { assertReducerShape(finalReducers); } catch (e) { shapeAssertionError = e; } return function combination(state, action) { if (state === void 0) { state = {}; } if (shapeAssertionError) { throw shapeAssertionError; } if (true) { var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache); if (warningMessage) { warning(warningMessage); } } var hasChanged = false; var nextState = {}; for (var _i = 0; _i < finalReducerKeys.length; _i++) { var _key = finalReducerKeys[_i]; var reducer = finalReducers[_key]; var previousStateForKey = state[_key]; var nextStateForKey = reducer(previousStateForKey, action); if (typeof nextStateForKey === 'undefined') { var actionType = action && action.type; throw new Error( false ? 0 : "When called with an action of type " + (actionType ? "\"" + String(actionType) + "\"" : '(unknown type)') + ", the slice reducer for key \"" + _key + "\" returned undefined. " + "To ignore an action, you must explicitly return the previous state. " + "If you want this reducer to hold no value, you can return null instead of undefined."); } nextState[_key] = nextStateForKey; hasChanged = hasChanged || nextStateForKey !== previousStateForKey; } hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length; return hasChanged ? nextState : state; }; } function bindActionCreator(actionCreator, dispatch) { return function () { return dispatch(actionCreator.apply(this, arguments)); }; } /** * Turns an object whose values are action creators, into an object with the * same keys, but with every function wrapped into a `dispatch` call so they * may be invoked directly. This is just a convenience method, as you can call * `store.dispatch(MyActionCreators.doSomething())` yourself just fine. * * For convenience, you can also pass an action creator as the first argument, * and get a dispatch wrapped function in return. * * @param {Function|Object} actionCreators An object whose values are action * creator functions. One handy way to obtain it is to use ES6 `import * as` * syntax. You may also pass a single function. * * @param {Function} dispatch The `dispatch` function available on your Redux * store. * * @returns {Function|Object} The object mimicking the original object, but with * every action creator wrapped into the `dispatch` call. If you passed a * function as `actionCreators`, the return value will also be a single * function. */ function bindActionCreators(actionCreators, dispatch) { if (typeof actionCreators === 'function') { return bindActionCreator(actionCreators, dispatch); } if (typeof actionCreators !== 'object' || actionCreators === null) { throw new Error( false ? 0 : "bindActionCreators expected an object or a function, but instead received: '" + kindOf(actionCreators) + "'. " + "Did you write \"import ActionCreators from\" instead of \"import * as ActionCreators from\"?"); } var boundActionCreators = {}; for (var key in actionCreators) { var actionCreator = actionCreators[key]; if (typeof actionCreator === 'function') { boundActionCreators[key] = bindActionCreator(actionCreator, dispatch); } } return boundActionCreators; } /** * Composes single-argument functions from right to left. The rightmost * function can take multiple arguments as it provides the signature for * the resulting composite function. * * @param {...Function} funcs The functions to compose. * @returns {Function} A function obtained by composing the argument functions * from right to left. For example, compose(f, g, h) is identical to doing * (...args) => f(g(h(...args))). */ function compose() { for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) { funcs[_key] = arguments[_key]; } if (funcs.length === 0) { return function (arg) { return arg; }; } if (funcs.length === 1) { return funcs[0]; } return funcs.reduce(function (a, b) { return function () { return a(b.apply(void 0, arguments)); }; }); } /** * Creates a store enhancer that applies middleware to the dispatch method * of the Redux store. This is handy for a variety of tasks, such as expressing * asynchronous actions in a concise manner, or logging every action payload. * * See `redux-thunk` package as an example of the Redux middleware. * * Because middleware is potentially asynchronous, this should be the first * store enhancer in the composition chain. * * Note that each middleware will be given the `dispatch` and `getState` functions * as named arguments. * * @param {...Function} middlewares The middleware chain to be applied. * @returns {Function} A store enhancer applying the middleware. */ function applyMiddleware() { for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) { middlewares[_key] = arguments[_key]; } return function (createStore) { return function () { var store = createStore.apply(void 0, arguments); var _dispatch = function dispatch() { throw new Error( false ? 0 : 'Dispatching while constructing your middleware is not allowed. ' + 'Other middleware would not be applied to this dispatch.'); }; var middlewareAPI = { getState: store.getState, dispatch: function dispatch() { return _dispatch.apply(void 0, arguments); } }; var chain = middlewares.map(function (middleware) { return middleware(middlewareAPI); }); _dispatch = compose.apply(void 0, chain)(store.dispatch); return (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__["default"])((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__["default"])({}, store), {}, { dispatch: _dispatch }); }; }; } /***/ }), /***/ "./node_modules/simple-swizzle/index.js": /*!**********************************************!*\ !*** ./node_modules/simple-swizzle/index.js ***! \**********************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var isArrayish = __webpack_require__(/*! is-arrayish */ "./node_modules/simple-swizzle/node_modules/is-arrayish/index.js"); var concat = Array.prototype.concat; var slice = Array.prototype.slice; var swizzle = module.exports = function swizzle(args) { var results = []; for (var i = 0, len = args.length; i < len; i++) { var arg = args[i]; if (isArrayish(arg)) { // http://jsperf.com/javascript-array-concat-vs-push/98 results = concat.call(results, slice.call(arg)); } else { results.push(arg); } } return results; }; swizzle.wrap = function (fn) { return function () { return fn(swizzle(arguments)); }; }; /***/ }), /***/ "./node_modules/simple-swizzle/node_modules/is-arrayish/index.js": /*!***********************************************************************!*\ !*** ./node_modules/simple-swizzle/node_modules/is-arrayish/index.js ***! \***********************************************************************/ /***/ (function(module) { module.exports = function isArrayish(obj) { if (!obj || typeof obj === 'string') { return false; } return obj instanceof Array || Array.isArray(obj) || (obj.length >= 0 && (obj.splice instanceof Function || (Object.getOwnPropertyDescriptor(obj, (obj.length - 1)) && obj.constructor.name !== 'String'))); }; /***/ }), /***/ "./src/components/core/Toolbar.css": /*!*****************************************!*\ !*** ./src/components/core/Toolbar.css ***! \*****************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ "./node_modules/style-loader/dist/runtime/styleDomAPI.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertBySelector.js */ "./node_modules/style-loader/dist/runtime/insertBySelector.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ "./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ "./node_modules/style-loader/dist/runtime/insertStyleElement.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ "./node_modules/style-loader/dist/runtime/styleTagTransform.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _node_modules_css_loader_dist_cjs_js_Toolbar_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!./Toolbar.css */ "./node_modules/css-loader/dist/cjs.js!./src/components/core/Toolbar.css"); var options = {}; options.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default()); options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default()); options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head"); options.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default()); options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default()); var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_Toolbar_css__WEBPACK_IMPORTED_MODULE_6__["default"], options); /* harmony default export */ __webpack_exports__["default"] = (_node_modules_css_loader_dist_cjs_js_Toolbar_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_Toolbar_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_Toolbar_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined); /***/ }), /***/ "./src/components/error/CallbackGraph/CallbackGraphContainer.css": /*!***********************************************************************!*\ !*** ./src/components/error/CallbackGraph/CallbackGraphContainer.css ***! \***********************************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ "./node_modules/style-loader/dist/runtime/styleDomAPI.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/insertBySelector.js */ "./node_modules/style-loader/dist/runtime/insertBySelector.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ "./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ "./node_modules/style-loader/dist/runtime/insertStyleElement.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ "./node_modules/style-loader/dist/runtime/styleTagTransform.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _node_modules_css_loader_dist_cjs_js_CallbackGraphContainer_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../../../node_modules/css-loader/dist/cjs.js!./CallbackGraphContainer.css */ "./node_modules/css-loader/dist/cjs.js!./src/components/error/CallbackGraph/CallbackGraphContainer.css"); var options = {}; options.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default()); options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default()); options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head"); options.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default()); options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default()); var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_CallbackGraphContainer_css__WEBPACK_IMPORTED_MODULE_6__["default"], options); /* harmony default export */ __webpack_exports__["default"] = (_node_modules_css_loader_dist_cjs_js_CallbackGraphContainer_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_CallbackGraphContainer_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_CallbackGraphContainer_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined); /***/ }), /***/ "./src/components/error/FrontEnd/FrontEndError.css": /*!*********************************************************!*\ !*** ./src/components/error/FrontEnd/FrontEndError.css ***! \*********************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ "./node_modules/style-loader/dist/runtime/styleDomAPI.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/insertBySelector.js */ "./node_modules/style-loader/dist/runtime/insertBySelector.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ "./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ "./node_modules/style-loader/dist/runtime/insertStyleElement.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ "./node_modules/style-loader/dist/runtime/styleTagTransform.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _node_modules_css_loader_dist_cjs_js_FrontEndError_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../../../node_modules/css-loader/dist/cjs.js!./FrontEndError.css */ "./node_modules/css-loader/dist/cjs.js!./src/components/error/FrontEnd/FrontEndError.css"); var options = {}; options.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default()); options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default()); options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head"); options.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default()); options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default()); var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_FrontEndError_css__WEBPACK_IMPORTED_MODULE_6__["default"], options); /* harmony default export */ __webpack_exports__["default"] = (_node_modules_css_loader_dist_cjs_js_FrontEndError_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_FrontEndError_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_FrontEndError_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined); /***/ }), /***/ "./src/components/error/GlobalErrorOverlay.css": /*!*****************************************************!*\ !*** ./src/components/error/GlobalErrorOverlay.css ***! \*****************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ "./node_modules/style-loader/dist/runtime/styleDomAPI.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertBySelector.js */ "./node_modules/style-loader/dist/runtime/insertBySelector.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ "./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ "./node_modules/style-loader/dist/runtime/insertStyleElement.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ "./node_modules/style-loader/dist/runtime/styleTagTransform.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _node_modules_css_loader_dist_cjs_js_GlobalErrorOverlay_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!./GlobalErrorOverlay.css */ "./node_modules/css-loader/dist/cjs.js!./src/components/error/GlobalErrorOverlay.css"); var options = {}; options.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default()); options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default()); options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head"); options.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default()); options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default()); var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_GlobalErrorOverlay_css__WEBPACK_IMPORTED_MODULE_6__["default"], options); /* harmony default export */ __webpack_exports__["default"] = (_node_modules_css_loader_dist_cjs_js_GlobalErrorOverlay_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_GlobalErrorOverlay_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_GlobalErrorOverlay_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined); /***/ }), /***/ "./src/components/error/Percy.css": /*!****************************************!*\ !*** ./src/components/error/Percy.css ***! \****************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ "./node_modules/style-loader/dist/runtime/styleDomAPI.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertBySelector.js */ "./node_modules/style-loader/dist/runtime/insertBySelector.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ "./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ "./node_modules/style-loader/dist/runtime/insertStyleElement.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ "./node_modules/style-loader/dist/runtime/styleTagTransform.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _node_modules_css_loader_dist_cjs_js_Percy_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!./Percy.css */ "./node_modules/css-loader/dist/cjs.js!./src/components/error/Percy.css"); var options = {}; options.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default()); options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default()); options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head"); options.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default()); options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default()); var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_Percy_css__WEBPACK_IMPORTED_MODULE_6__["default"], options); /* harmony default export */ __webpack_exports__["default"] = (_node_modules_css_loader_dist_cjs_js_Percy_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_Percy_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_Percy_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined); /***/ }), /***/ "./src/components/error/menu/DebugMenu.css": /*!*************************************************!*\ !*** ./src/components/error/menu/DebugMenu.css ***! \*************************************************/ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ "./node_modules/style-loader/dist/runtime/styleDomAPI.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/insertBySelector.js */ "./node_modules/style-loader/dist/runtime/insertBySelector.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ "./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ "./node_modules/style-loader/dist/runtime/insertStyleElement.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ "./node_modules/style-loader/dist/runtime/styleTagTransform.js"); /* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _node_modules_css_loader_dist_cjs_js_DebugMenu_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../../../node_modules/css-loader/dist/cjs.js!./DebugMenu.css */ "./node_modules/css-loader/dist/cjs.js!./src/components/error/menu/DebugMenu.css"); var options = {}; options.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default()); options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default()); options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head"); options.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default()); options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default()); var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_DebugMenu_css__WEBPACK_IMPORTED_MODULE_6__["default"], options); /* harmony default export */ __webpack_exports__["default"] = (_node_modules_css_loader_dist_cjs_js_DebugMenu_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_DebugMenu_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_DebugMenu_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined); /***/ }), /***/ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js": /*!****************************************************************************!*\ !*** ./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js ***! \****************************************************************************/ /***/ (function(module) { "use strict"; var stylesInDOM = []; function getIndexByIdentifier(identifier) { var result = -1; for (var i = 0; i < stylesInDOM.length; i++) { if (stylesInDOM[i].identifier === identifier) { result = i; break; } } return result; } function modulesToDom(list, options) { var idCountMap = {}; var identifiers = []; for (var i = 0; i < list.length; i++) { var item = list[i]; var id = options.base ? item[0] + options.base : item[0]; var count = idCountMap[id] || 0; var identifier = "".concat(id, " ").concat(count); idCountMap[id] = count + 1; var indexByIdentifier = getIndexByIdentifier(identifier); var obj = { css: item[1], media: item[2], sourceMap: item[3], supports: item[4], layer: item[5] }; if (indexByIdentifier !== -1) { stylesInDOM[indexByIdentifier].references++; stylesInDOM[indexByIdentifier].updater(obj); } else { var updater = addElementStyle(obj, options); options.byIndex = i; stylesInDOM.splice(i, 0, { identifier: identifier, updater: updater, references: 1 }); } identifiers.push(identifier); } return identifiers; } function addElementStyle(obj, options) { var api = options.domAPI(options); api.update(obj); var updater = function updater(newObj) { if (newObj) { if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) { return; } api.update(obj = newObj); } else { api.remove(); } }; return updater; } module.exports = function (list, options) { options = options || {}; list = list || []; var lastIdentifiers = modulesToDom(list, options); return function update(newList) { newList = newList || []; for (var i = 0; i < lastIdentifiers.length; i++) { var identifier = lastIdentifiers[i]; var index = getIndexByIdentifier(identifier); stylesInDOM[index].references--; } var newLastIdentifiers = modulesToDom(newList, options); for (var _i = 0; _i < lastIdentifiers.length; _i++) { var _identifier = lastIdentifiers[_i]; var _index = getIndexByIdentifier(_identifier); if (stylesInDOM[_index].references === 0) { stylesInDOM[_index].updater(); stylesInDOM.splice(_index, 1); } } lastIdentifiers = newLastIdentifiers; }; }; /***/ }), /***/ "./node_modules/style-loader/dist/runtime/insertBySelector.js": /*!********************************************************************!*\ !*** ./node_modules/style-loader/dist/runtime/insertBySelector.js ***! \********************************************************************/ /***/ (function(module) { "use strict"; var memo = {}; /* istanbul ignore next */ function getTarget(target) { if (typeof memo[target] === "undefined") { var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) { try { // This will throw an exception if access to iframe is blocked // due to cross-origin restrictions styleTarget = styleTarget.contentDocument.head; } catch (e) { // istanbul ignore next styleTarget = null; } } memo[target] = styleTarget; } return memo[target]; } /* istanbul ignore next */ function insertBySelector(insert, style) { var target = getTarget(insert); if (!target) { throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid."); } target.appendChild(style); } module.exports = insertBySelector; /***/ }), /***/ "./node_modules/style-loader/dist/runtime/insertStyleElement.js": /*!**********************************************************************!*\ !*** ./node_modules/style-loader/dist/runtime/insertStyleElement.js ***! \**********************************************************************/ /***/ (function(module) { "use strict"; /* istanbul ignore next */ function insertStyleElement(options) { var element = document.createElement("style"); options.setAttributes(element, options.attributes); options.insert(element, options.options); return element; } module.exports = insertStyleElement; /***/ }), /***/ "./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js": /*!**********************************************************************************!*\ !*** ./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js ***! \**********************************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; /* istanbul ignore next */ function setAttributesWithoutAttributes(styleElement) { var nonce = true ? __webpack_require__.nc : 0; if (nonce) { styleElement.setAttribute("nonce", nonce); } } module.exports = setAttributesWithoutAttributes; /***/ }), /***/ "./node_modules/style-loader/dist/runtime/styleDomAPI.js": /*!***************************************************************!*\ !*** ./node_modules/style-loader/dist/runtime/styleDomAPI.js ***! \***************************************************************/ /***/ (function(module) { "use strict"; /* istanbul ignore next */ function apply(styleElement, options, obj) { var css = ""; if (obj.supports) { css += "@supports (".concat(obj.supports, ") {"); } if (obj.media) { css += "@media ".concat(obj.media, " {"); } var needLayer = typeof obj.layer !== "undefined"; if (needLayer) { css += "@layer".concat(obj.layer.length > 0 ? " ".concat(obj.layer) : "", " {"); } css += obj.css; if (needLayer) { css += "}"; } if (obj.media) { css += "}"; } if (obj.supports) { css += "}"; } var sourceMap = obj.sourceMap; if (sourceMap && typeof btoa !== "undefined") { css += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */"); } // For old IE /* istanbul ignore if */ options.styleTagTransform(css, styleElement, options.options); } function removeStyleElement(styleElement) { // istanbul ignore if if (styleElement.parentNode === null) { return false; } styleElement.parentNode.removeChild(styleElement); } /* istanbul ignore next */ function domAPI(options) { if (typeof document === "undefined") { return { update: function update() {}, remove: function remove() {} }; } var styleElement = options.insertStyleElement(options); return { update: function update(obj) { apply(styleElement, options, obj); }, remove: function remove() { removeStyleElement(styleElement); } }; } module.exports = domAPI; /***/ }), /***/ "./node_modules/style-loader/dist/runtime/styleTagTransform.js": /*!*********************************************************************!*\ !*** ./node_modules/style-loader/dist/runtime/styleTagTransform.js ***! \*********************************************************************/ /***/ (function(module) { "use strict"; /* istanbul ignore next */ function styleTagTransform(css, styleElement) { if (styleElement.styleSheet) { styleElement.styleSheet.cssText = css; } else { while (styleElement.firstChild) { styleElement.removeChild(styleElement.firstChild); } styleElement.appendChild(document.createTextNode(css)); } } module.exports = styleTagTransform; /***/ }), /***/ "./node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js": /*!**********************************************************************************************!*\ !*** ./node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js ***! \**********************************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; /** * @license React * use-sync-external-store-shim.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ if (true) { (function() { 'use strict'; /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if ( typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === 'function' ) { __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error()); } var React = __webpack_require__(/*! react */ "react"); var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; function error(format) { { { for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { args[_key2 - 1] = arguments[_key2]; } printWarning('error', format, args); } } } function printWarning(level, format, args) { // When changing this logic, you might want to also // update consoleWithStackDev.www.js as well. { var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; var stack = ReactDebugCurrentFrame.getStackAddendum(); if (stack !== '') { format += '%s'; args = args.concat([stack]); } // eslint-disable-next-line react-internal/safe-string-coercion var argsWithFormat = args.map(function (item) { return String(item); }); // Careful: RN currently depends on this prefix argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it // breaks IE9: https://github.com/facebook/react/issues/13610 // eslint-disable-next-line react-internal/no-production-logging Function.prototype.apply.call(console[level], console, argsWithFormat); } } /** * inlined Object.is polyfill to avoid requiring consumers ship their own * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is */ function is(x, y) { return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare ; } var objectIs = typeof Object.is === 'function' ? Object.is : is; // dispatch for CommonJS interop named imports. var useState = React.useState, useEffect = React.useEffect, useLayoutEffect = React.useLayoutEffect, useDebugValue = React.useDebugValue; var didWarnOld18Alpha = false; var didWarnUncachedGetSnapshot = false; // Disclaimer: This shim breaks many of the rules of React, and only works // because of a very particular set of implementation details and assumptions // -- change any one of them and it will break. The most important assumption // is that updates are always synchronous, because concurrent rendering is // only available in versions of React that also have a built-in // useSyncExternalStore API. And we only use this shim when the built-in API // does not exist. // // Do not assume that the clever hacks used by this hook also work in general. // The point of this shim is to replace the need for hacks by other libraries. function useSyncExternalStore(subscribe, getSnapshot, // Note: The shim does not use getServerSnapshot, because pre-18 versions of // React do not expose a way to check if we're hydrating. So users of the shim // will need to track that themselves and return the correct value // from `getSnapshot`. getServerSnapshot) { { if (!didWarnOld18Alpha) { if (React.startTransition !== undefined) { didWarnOld18Alpha = true; error('You are using an outdated, pre-release alpha of React 18 that ' + 'does not support useSyncExternalStore. The ' + 'use-sync-external-store shim will not work correctly. Upgrade ' + 'to a newer pre-release.'); } } } // Read the current snapshot from the store on every render. Again, this // breaks the rules of React, and only works here because of specific // implementation details, most importantly that updates are // always synchronous. var value = getSnapshot(); { if (!didWarnUncachedGetSnapshot) { var cachedValue = getSnapshot(); if (!objectIs(value, cachedValue)) { error('The result of getSnapshot should be cached to avoid an infinite loop'); didWarnUncachedGetSnapshot = true; } } } // Because updates are synchronous, we don't queue them. Instead we force a // re-render whenever the subscribed state changes by updating an some // arbitrary useState hook. Then, during render, we call getSnapshot to read // the current value. // // Because we don't actually use the state returned by the useState hook, we // can save a bit of memory by storing other stuff in that slot. // // To implement the early bailout, we need to track some things on a mutable // object. Usually, we would put that in a useRef hook, but we can stash it in // our useState hook instead. // // To force a re-render, we call forceUpdate({inst}). That works because the // new object always fails an equality check. var _useState = useState({ inst: { value: value, getSnapshot: getSnapshot } }), inst = _useState[0].inst, forceUpdate = _useState[1]; // Track the latest getSnapshot function with a ref. This needs to be updated // in the layout phase so we can access it during the tearing check that // happens on subscribe. useLayoutEffect(function () { inst.value = value; inst.getSnapshot = getSnapshot; // Whenever getSnapshot or subscribe changes, we need to check in the // commit phase if there was an interleaved mutation. In concurrent mode // this can happen all the time, but even in synchronous mode, an earlier // effect may have mutated the store. if (checkIfSnapshotChanged(inst)) { // Force a re-render. forceUpdate({ inst: inst }); } }, [subscribe, value, getSnapshot]); useEffect(function () { // Check for changes right before subscribing. Subsequent changes will be // detected in the subscription handler. if (checkIfSnapshotChanged(inst)) { // Force a re-render. forceUpdate({ inst: inst }); } var handleStoreChange = function () { // TODO: Because there is no cross-renderer API for batching updates, it's // up to the consumer of this library to wrap their subscription event // with unstable_batchedUpdates. Should we try to detect when this isn't // the case and print a warning in development? // The store changed. Check if the snapshot changed since the last time we // read from the store. if (checkIfSnapshotChanged(inst)) { // Force a re-render. forceUpdate({ inst: inst }); } }; // Subscribe to the store and return a clean-up function. return subscribe(handleStoreChange); }, [subscribe]); useDebugValue(value); return value; } function checkIfSnapshotChanged(inst) { var latestGetSnapshot = inst.getSnapshot; var prevValue = inst.value; try { var nextValue = latestGetSnapshot(); return !objectIs(prevValue, nextValue); } catch (error) { return true; } } function useSyncExternalStore$1(subscribe, getSnapshot, getServerSnapshot) { // Note: The shim does not use getServerSnapshot, because pre-18 versions of // React do not expose a way to check if we're hydrating. So users of the shim // will need to track that themselves and return the correct value // from `getSnapshot`. return getSnapshot(); } var canUseDOM = !!(typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined'); var isServerEnvironment = !canUseDOM; var shim = isServerEnvironment ? useSyncExternalStore$1 : useSyncExternalStore; var useSyncExternalStore$2 = React.useSyncExternalStore !== undefined ? React.useSyncExternalStore : shim; exports.useSyncExternalStore = useSyncExternalStore$2; /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if ( typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === 'function' ) { __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error()); } })(); } /***/ }), /***/ "./node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js": /*!************************************************************************************************************!*\ !*** ./node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js ***! \************************************************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; /** * @license React * use-sync-external-store-shim/with-selector.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ if (true) { (function() { 'use strict'; /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if ( typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === 'function' ) { __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error()); } var React = __webpack_require__(/*! react */ "react"); var shim = __webpack_require__(/*! use-sync-external-store/shim */ "./node_modules/use-sync-external-store/shim/index.js"); /** * inlined Object.is polyfill to avoid requiring consumers ship their own * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is */ function is(x, y) { return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare ; } var objectIs = typeof Object.is === 'function' ? Object.is : is; var useSyncExternalStore = shim.useSyncExternalStore; // for CommonJS interop. var useRef = React.useRef, useEffect = React.useEffect, useMemo = React.useMemo, useDebugValue = React.useDebugValue; // Same as useSyncExternalStore, but supports selector and isEqual arguments. function useSyncExternalStoreWithSelector(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) { // Use this to track the rendered snapshot. var instRef = useRef(null); var inst; if (instRef.current === null) { inst = { hasValue: false, value: null }; instRef.current = inst; } else { inst = instRef.current; } var _useMemo = useMemo(function () { // Track the memoized state using closure variables that are local to this // memoized instance of a getSnapshot function. Intentionally not using a // useRef hook, because that state would be shared across all concurrent // copies of the hook/component. var hasMemo = false; var memoizedSnapshot; var memoizedSelection; var memoizedSelector = function (nextSnapshot) { if (!hasMemo) { // The first time the hook is called, there is no memoized result. hasMemo = true; memoizedSnapshot = nextSnapshot; var _nextSelection = selector(nextSnapshot); if (isEqual !== undefined) { // Even if the selector has changed, the currently rendered selection // may be equal to the new selection. We should attempt to reuse the // current value if possible, to preserve downstream memoizations. if (inst.hasValue) { var currentSelection = inst.value; if (isEqual(currentSelection, _nextSelection)) { memoizedSelection = currentSelection; return currentSelection; } } } memoizedSelection = _nextSelection; return _nextSelection; } // We may be able to reuse the previous invocation's result. // We may be able to reuse the previous invocation's result. var prevSnapshot = memoizedSnapshot; var prevSelection = memoizedSelection; if (objectIs(prevSnapshot, nextSnapshot)) { // The snapshot is the same as last time. Reuse the previous selection. return prevSelection; } // The snapshot has changed, so we need to compute a new selection. // The snapshot has changed, so we need to compute a new selection. var nextSelection = selector(nextSnapshot); // If a custom isEqual function is provided, use that to check if the data // has changed. If it hasn't, return the previous selection. That signals // to React that the selections are conceptually equal, and we can bail // out of rendering. // If a custom isEqual function is provided, use that to check if the data // has changed. If it hasn't, return the previous selection. That signals // to React that the selections are conceptually equal, and we can bail // out of rendering. if (isEqual !== undefined && isEqual(prevSelection, nextSelection)) { return prevSelection; } memoizedSnapshot = nextSnapshot; memoizedSelection = nextSelection; return nextSelection; }; // Assigning this to a constant so that Flow knows it can't change. // Assigning this to a constant so that Flow knows it can't change. var maybeGetServerSnapshot = getServerSnapshot === undefined ? null : getServerSnapshot; var getSnapshotWithSelector = function () { return memoizedSelector(getSnapshot()); }; var getServerSnapshotWithSelector = maybeGetServerSnapshot === null ? undefined : function () { return memoizedSelector(maybeGetServerSnapshot()); }; return [getSnapshotWithSelector, getServerSnapshotWithSelector]; }, [getSnapshot, getServerSnapshot, selector, isEqual]), getSelection = _useMemo[0], getServerSelection = _useMemo[1]; var value = useSyncExternalStore(subscribe, getSelection, getServerSelection); useEffect(function () { inst.hasValue = true; inst.value = value; }, [value]); useDebugValue(value); return value; } exports.useSyncExternalStoreWithSelector = useSyncExternalStoreWithSelector; /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ if ( typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === 'function' ) { __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error()); } })(); } /***/ }), /***/ "./node_modules/use-sync-external-store/shim/index.js": /*!************************************************************!*\ !*** ./node_modules/use-sync-external-store/shim/index.js ***! \************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; if (false) {} else { module.exports = __webpack_require__(/*! ../cjs/use-sync-external-store-shim.development.js */ "./node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js"); } /***/ }), /***/ "./node_modules/use-sync-external-store/shim/with-selector.js": /*!********************************************************************!*\ !*** ./node_modules/use-sync-external-store/shim/with-selector.js ***! \********************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; if (false) {} else { module.exports = __webpack_require__(/*! ../cjs/use-sync-external-store-shim/with-selector.development.js */ "./node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js"); } /***/ }), /***/ "prop-types": /*!****************************!*\ !*** external "PropTypes" ***! \****************************/ /***/ (function(module) { "use strict"; module.exports = window["PropTypes"]; /***/ }), /***/ "react": /*!************************!*\ !*** external "React" ***! \************************/ /***/ (function(module) { "use strict"; module.exports = window["React"]; /***/ }), /***/ "react-dom": /*!***************************!*\ !*** external "ReactDOM" ***! \***************************/ /***/ (function(module) { "use strict"; module.exports = window["ReactDOM"]; /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js": /*!*********************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js ***! \*********************************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _arrayLikeToArray; } /* harmony export */ }); function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js": /*!*******************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js ***! \*******************************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _arrayWithHoles; } /* harmony export */ }); function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js": /*!**********************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js ***! \**********************************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _arrayWithoutHoles; } /* harmony export */ }); /* harmony import */ var _arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayLikeToArray.js */ "./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js"); function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__["default"])(arr); } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js": /*!**************************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js ***! \**************************************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _assertThisInitialized; } /* harmony export */ }); function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/classCallCheck.js": /*!*******************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js ***! \*******************************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _classCallCheck; } /* harmony export */ }); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/createClass.js": /*!****************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/createClass.js ***! \****************************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _createClass; } /* harmony export */ }); /* harmony import */ var _toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toPropertyKey.js */ "./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js"); function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, (0,_toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__["default"])(descriptor.key), descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js": /*!*******************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/defineProperty.js ***! \*******************************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _defineProperty; } /* harmony export */ }); /* harmony import */ var _toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toPropertyKey.js */ "./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js"); function _defineProperty(obj, key, value) { key = (0,_toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__["default"])(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/extends.js": /*!************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/extends.js ***! \************************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _extends; } /* harmony export */ }); function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js": /*!*******************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js ***! \*******************************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _getPrototypeOf; } /* harmony export */ }); function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/inherits.js": /*!*************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/inherits.js ***! \*************************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _inherits; } /* harmony export */ }); /* harmony import */ var _setPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./setPrototypeOf.js */ "./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js"); function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) (0,_setPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__["default"])(subClass, superClass); } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/iterableToArray.js": /*!********************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js ***! \********************************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _iterableToArray; } /* harmony export */ }); function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js": /*!*************************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js ***! \*************************************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _iterableToArrayLimit; } /* harmony export */ }); function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js": /*!********************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js ***! \********************************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _nonIterableRest; } /* harmony export */ }); function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js": /*!**********************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js ***! \**********************************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _nonIterableSpread; } /* harmony export */ }); function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/objectSpread2.js": /*!******************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js ***! \******************************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _objectSpread2; } /* harmony export */ }); /* harmony import */ var _defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defineProperty.js */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } function _objectSpread2(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0,_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js": /*!****************************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js ***! \****************************************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _objectWithoutProperties; } /* harmony export */ }); /* harmony import */ var _objectWithoutPropertiesLoose_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./objectWithoutPropertiesLoose.js */ "./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js"); function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = (0,_objectWithoutPropertiesLoose_js__WEBPACK_IMPORTED_MODULE_0__["default"])(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js": /*!*********************************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js ***! \*********************************************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _objectWithoutPropertiesLoose; } /* harmony export */ }); function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js": /*!******************************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js ***! \******************************************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _possibleConstructorReturn; } /* harmony export */ }); /* harmony import */ var _typeof_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./typeof.js */ "./node_modules/@babel/runtime/helpers/esm/typeof.js"); /* harmony import */ var _assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./assertThisInitialized.js */ "./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js"); function _possibleConstructorReturn(self, call) { if (call && ((0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return (0,_assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__["default"])(self); } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js": /*!*******************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js ***! \*******************************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _setPrototypeOf; } /* harmony export */ }); function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/slicedToArray.js": /*!******************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js ***! \******************************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _slicedToArray; } /* harmony export */ }); /* harmony import */ var _arrayWithHoles_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayWithHoles.js */ "./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js"); /* harmony import */ var _iterableToArrayLimit_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./iterableToArrayLimit.js */ "./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js"); /* harmony import */ var _unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js"); /* harmony import */ var _nonIterableRest_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./nonIterableRest.js */ "./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js"); function _slicedToArray(arr, i) { return (0,_arrayWithHoles_js__WEBPACK_IMPORTED_MODULE_0__["default"])(arr) || (0,_iterableToArrayLimit_js__WEBPACK_IMPORTED_MODULE_1__["default"])(arr, i) || (0,_unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__["default"])(arr, i) || (0,_nonIterableRest_js__WEBPACK_IMPORTED_MODULE_3__["default"])(); } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js": /*!**********************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js ***! \**********************************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _toConsumableArray; } /* harmony export */ }); /* harmony import */ var _arrayWithoutHoles_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayWithoutHoles.js */ "./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js"); /* harmony import */ var _iterableToArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./iterableToArray.js */ "./node_modules/@babel/runtime/helpers/esm/iterableToArray.js"); /* harmony import */ var _unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js"); /* harmony import */ var _nonIterableSpread_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./nonIterableSpread.js */ "./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js"); function _toConsumableArray(arr) { return (0,_arrayWithoutHoles_js__WEBPACK_IMPORTED_MODULE_0__["default"])(arr) || (0,_iterableToArray_js__WEBPACK_IMPORTED_MODULE_1__["default"])(arr) || (0,_unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__["default"])(arr) || (0,_nonIterableSpread_js__WEBPACK_IMPORTED_MODULE_3__["default"])(); } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/toPrimitive.js": /*!****************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/toPrimitive.js ***! \****************************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _toPrimitive; } /* harmony export */ }); /* harmony import */ var _typeof_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./typeof.js */ "./node_modules/@babel/runtime/helpers/esm/typeof.js"); function _toPrimitive(input, hint) { if ((0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if ((0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js": /*!******************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js ***! \******************************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _toPropertyKey; } /* harmony export */ }); /* harmony import */ var _typeof_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./typeof.js */ "./node_modules/@babel/runtime/helpers/esm/typeof.js"); /* harmony import */ var _toPrimitive_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./toPrimitive.js */ "./node_modules/@babel/runtime/helpers/esm/toPrimitive.js"); function _toPropertyKey(arg) { var key = (0,_toPrimitive_js__WEBPACK_IMPORTED_MODULE_1__["default"])(arg, "string"); return (0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(key) === "symbol" ? key : String(key); } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/typeof.js": /*!***********************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/typeof.js ***! \***********************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _typeof; } /* harmony export */ }); function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js": /*!*******************************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js ***! \*******************************************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _unsupportedIterableToArray; } /* harmony export */ }); /* harmony import */ var _arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayLikeToArray.js */ "./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js"); function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__["default"])(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__["default"])(o, minLen); } /***/ }), /***/ "./node_modules/ramda/es/F.js": /*!************************************!*\ !*** ./node_modules/ramda/es/F.js ***! \************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /** * A function that always returns `false`. Any passed in parameters are ignored. * * @func * @memberOf R * @since v0.9.0 * @category Function * @sig * -> Boolean * @param {*} * @return {Boolean} * @see R.T * @example * * R.F(); //=> false */ var F = function F() { return false; }; /* harmony default export */ __webpack_exports__["default"] = (F); /***/ }), /***/ "./node_modules/ramda/es/T.js": /*!************************************!*\ !*** ./node_modules/ramda/es/T.js ***! \************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /** * A function that always returns `true`. Any passed in parameters are ignored. * * @func * @memberOf R * @since v0.9.0 * @category Function * @sig * -> Boolean * @param {*} * @return {Boolean} * @see R.F * @example * * R.T(); //=> true */ var T = function T() { return true; }; /* harmony default export */ __webpack_exports__["default"] = (T); /***/ }), /***/ "./node_modules/ramda/es/__.js": /*!*************************************!*\ !*** ./node_modules/ramda/es/__.js ***! \*************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /** * A special placeholder value used to specify "gaps" within curried functions, * allowing partial application of any combination of arguments, regardless of * their positions. * * If `g` is a curried ternary function and `_` is `R.__`, the following are * equivalent: * * - `g(1, 2, 3)` * - `g(_, 2, 3)(1)` * - `g(_, _, 3)(1)(2)` * - `g(_, _, 3)(1, 2)` * - `g(_, 2, _)(1, 3)` * - `g(_, 2)(1)(3)` * - `g(_, 2)(1, 3)` * - `g(_, 2)(_, 3)(1)` * * @name __ * @constant * @memberOf R * @since v0.6.0 * @category Function * @example * * const greet = R.replace('{name}', R.__, 'Hello, {name}!'); * greet('Alice'); //=> 'Hello, Alice!' */ /* harmony default export */ __webpack_exports__["default"] = ({ '@@functional/placeholder': true }); /***/ }), /***/ "./node_modules/ramda/es/add.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/add.js ***! \**************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Adds two values. * * @func * @memberOf R * @since v0.1.0 * @category Math * @sig Number -> Number -> Number * @param {Number} a * @param {Number} b * @return {Number} * @see R.subtract * @example * * R.add(2, 3); //=> 5 * R.add(7)(10); //=> 17 */ var add = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function add(a, b) { return Number(a) + Number(b); }); /* harmony default export */ __webpack_exports__["default"] = (add); /***/ }), /***/ "./node_modules/ramda/es/addIndex.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/addIndex.js ***! \*******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_concat_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_concat.js */ "./node_modules/ramda/es/internal/_concat.js"); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _curryN_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./curryN.js */ "./node_modules/ramda/es/curryN.js"); /** * Creates a new list iteration function from an existing one by adding two new * parameters to its callback function: the current index, and the entire list. * * This would turn, for instance, [`R.map`](#map) function into one that * more closely resembles `Array.prototype.map`. Note that this will only work * for functions in which the iteration callback function is the first * parameter, and where the list is the last parameter. (This latter might be * unimportant if the list parameter is not used.) * * @func * @memberOf R * @since v0.15.0 * @category Function * @category List * @sig (((a ...) -> b) ... -> [a] -> *) -> (((a ..., Int, [a]) -> b) ... -> [a] -> *) * @param {Function} fn A list iteration function that does not pass index or list to its callback * @return {Function} An altered list iteration function that passes (item, index, list) to its callback * @example * * const mapIndexed = R.addIndex(R.map); * mapIndexed((val, idx) => idx + '-' + val, ['f', 'o', 'o', 'b', 'a', 'r']); * //=> ['0-f', '1-o', '2-o', '3-b', '4-a', '5-r'] */ var addIndex = /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_1__["default"])(function addIndex(fn) { return (0,_curryN_js__WEBPACK_IMPORTED_MODULE_2__["default"])(fn.length, function () { var idx = 0; var origFn = arguments[0]; var list = arguments[arguments.length - 1]; var args = Array.prototype.slice.call(arguments, 0); args[0] = function () { var result = origFn.apply(this, (0,_internal_concat_js__WEBPACK_IMPORTED_MODULE_0__["default"])(arguments, [idx, list])); idx += 1; return result; }; return fn.apply(this, args); }); }); /* harmony default export */ __webpack_exports__["default"] = (addIndex); /***/ }), /***/ "./node_modules/ramda/es/addIndexRight.js": /*!************************************************!*\ !*** ./node_modules/ramda/es/addIndexRight.js ***! \************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_concat_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_concat.js */ "./node_modules/ramda/es/internal/_concat.js"); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _curryN_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./curryN.js */ "./node_modules/ramda/es/curryN.js"); /** * As with `addIndex`, `addIndexRight` creates a new list iteration function * from an existing one by adding two new parameters to its callback function: * the current index, and the entire list. * * Unlike `addIndex`, `addIndexRight` iterates from the right to the left. * * @func * @memberOf R * @since v0.29.0 * @category Function * @category List * @sig ((a ... -> b) ... -> [a] -> *) -> (a ..., Int, [a] -> b) ... -> [a] -> *) * @param {Function} fn A list iteration function that does not pass index or list to its callback * @return {Function} An altered list iteration function that passes (item, index, list) to its callback * @example * * const revmap = (fn, ary) => R.map(fn, R.reverse(ary)); * const revmapIndexed = R.addIndexRight(revmap); * revmapIndexed((val, idx) => idx + '-' + val, ['f', 'o', 'o', 'b', 'a', 'r']); * //=> [ '5-r', '4-a', '3-b', '2-o', '1-o', '0-f' ] */ var addIndexRight = /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_1__["default"])(function addIndex(fn) { return (0,_curryN_js__WEBPACK_IMPORTED_MODULE_2__["default"])(fn.length, function () { var origFn = arguments[0]; var list = arguments[arguments.length - 1]; var idx = list.length - 1; var args = Array.prototype.slice.call(arguments, 0); args[0] = function () { var result = origFn.apply(this, (0,_internal_concat_js__WEBPACK_IMPORTED_MODULE_0__["default"])(arguments, [idx, list])); idx -= 1; return result; }; return fn.apply(this, args); }); }); /* harmony default export */ __webpack_exports__["default"] = (addIndexRight); /***/ }), /***/ "./node_modules/ramda/es/adjust.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/adjust.js ***! \*****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_concat_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_concat.js */ "./node_modules/ramda/es/internal/_concat.js"); /* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Applies a function to the value at the given index of an array, returning a * new copy of the array with the element at the given index replaced with the * result of the function application. * * @func * @memberOf R * @since v0.14.0 * @category List * @sig Number -> (a -> a) -> [a] -> [a] * @param {Number} idx The index. * @param {Function} fn The function to apply. * @param {Array|Arguments} list An array-like object whose value * at the supplied index will be replaced. * @return {Array} A copy of the supplied array-like object with * the element at index `idx` replaced with the value * returned by applying `fn` to the existing element. * @see R.update * @example * * R.adjust(1, R.toUpper, ['a', 'b', 'c', 'd']); //=> ['a', 'B', 'c', 'd'] * R.adjust(-1, R.toUpper, ['a', 'b', 'c', 'd']); //=> ['a', 'b', 'c', 'D'] * @symb R.adjust(-1, f, [a, b]) = [a, f(b)] * @symb R.adjust(0, f, [a, b]) = [f(a), b] */ var adjust = /*#__PURE__*/ (0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_1__["default"])(function adjust(idx, fn, list) { var len = list.length; if (idx >= len || idx < -len) { return list; } var _idx = (len + idx) % len; var _list = (0,_internal_concat_js__WEBPACK_IMPORTED_MODULE_0__["default"])(list); _list[_idx] = fn(list[_idx]); return _list; }); /* harmony default export */ __webpack_exports__["default"] = (adjust); /***/ }), /***/ "./node_modules/ramda/es/all.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/all.js ***! \**************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable.js */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_xall_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xall.js */ "./node_modules/ramda/es/internal/_xall.js"); /** * Returns `true` if all elements of the list match the predicate, `false` if * there are any that don't. * * Dispatches to the `all` method of the second argument, if present. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig (a -> Boolean) -> [a] -> Boolean * @param {Function} fn The predicate function. * @param {Array} list The array to consider. * @return {Boolean} `true` if the predicate is satisfied by every element, `false` * otherwise. * @see R.any, R.none, R.transduce * @example * * const equals3 = R.equals(3); * R.all(equals3)([3, 3, 3, 3]); //=> true * R.all(equals3)([3, 3, 1, 3]); //=> false */ var all = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/ (0,_internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__["default"])(['all'], _internal_xall_js__WEBPACK_IMPORTED_MODULE_2__["default"], function all(fn, list) { var idx = 0; while (idx < list.length) { if (!fn(list[idx])) { return false; } idx += 1; } return true; })); /* harmony default export */ __webpack_exports__["default"] = (all); /***/ }), /***/ "./node_modules/ramda/es/allPass.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/allPass.js ***! \******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _curryN_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./curryN.js */ "./node_modules/ramda/es/curryN.js"); /* harmony import */ var _max_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./max.js */ "./node_modules/ramda/es/max.js"); /* harmony import */ var _pluck_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./pluck.js */ "./node_modules/ramda/es/pluck.js"); /* harmony import */ var _reduce_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./reduce.js */ "./node_modules/ramda/es/reduce.js"); /** * Takes a list of predicates and returns a predicate that returns true for a * given list of arguments if every one of the provided predicates is satisfied * by those arguments. * * The function returned is a curried function whose arity matches that of the * highest-arity predicate. * * @func * @memberOf R * @since v0.9.0 * @category Logic * @sig [(*... -> Boolean)] -> (*... -> Boolean) * @param {Array} predicates An array of predicates to check * @return {Function} The combined predicate * @see R.anyPass, R.both * @example * * const isQueen = R.propEq('rank', 'Q'); * const isSpade = R.propEq('suit', '♠︎'); * const isQueenOfSpades = R.allPass([isQueen, isSpade]); * * isQueenOfSpades({rank: 'Q', suit: '♣︎'}); //=> false * isQueenOfSpades({rank: 'Q', suit: '♠︎'}); //=> true */ var allPass = /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function allPass(preds) { return (0,_curryN_js__WEBPACK_IMPORTED_MODULE_1__["default"])((0,_reduce_js__WEBPACK_IMPORTED_MODULE_4__["default"])(_max_js__WEBPACK_IMPORTED_MODULE_2__["default"], 0, (0,_pluck_js__WEBPACK_IMPORTED_MODULE_3__["default"])('length', preds)), function () { var idx = 0; var len = preds.length; while (idx < len) { if (!preds[idx].apply(this, arguments)) { return false; } idx += 1; } return true; }); }); /* harmony default export */ __webpack_exports__["default"] = (allPass); /***/ }), /***/ "./node_modules/ramda/es/always.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/always.js ***! \*****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /** * Returns a function that always returns the given value. Note that for * non-primitives the value returned is a reference to the original value. * * This function is known as `const`, `constant`, or `K` (for K combinator) in * other languages and libraries. * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig a -> (* -> a) * @param {*} val The value to wrap in a function * @return {Function} A Function :: * -> val. * @example * * const t = R.always('Tee'); * t(); //=> 'Tee' */ var always = /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function always(val) { return function () { return val; }; }); /* harmony default export */ __webpack_exports__["default"] = (always); /***/ }), /***/ "./node_modules/ramda/es/and.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/and.js ***! \**************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns the first argument if it is falsy, otherwise the second argument. * Acts as the boolean `and` statement if both inputs are `Boolean`s. * * @func * @memberOf R * @since v0.1.0 * @category Logic * @sig a -> b -> a | b * @param {Any} a * @param {Any} b * @return {Any} * @see R.both, R.or * @example * * R.and(true, true); //=> true * R.and(true, false); //=> false * R.and(false, true); //=> false * R.and(false, false); //=> false */ var and = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function and(a, b) { return a && b; }); /* harmony default export */ __webpack_exports__["default"] = (and); /***/ }), /***/ "./node_modules/ramda/es/andThen.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/andThen.js ***! \******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_assertPromise_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_assertPromise.js */ "./node_modules/ramda/es/internal/_assertPromise.js"); /** * Returns the result of applying the onSuccess function to the value inside * a successfully resolved promise. This is useful for working with promises * inside function compositions. * * @func * @memberOf R * @since v0.27.1 * @category Function * @sig (a -> b) -> (Promise e a) -> (Promise e b) * @sig (a -> (Promise e b)) -> (Promise e a) -> (Promise e b) * @param {Function} onSuccess The function to apply. Can return a value or a promise of a value. * @param {Promise} p * @return {Promise} The result of calling `p.then(onSuccess)` * @see R.otherwise * @example * * const makeQuery = email => ({ query: { email }}); * const fetchMember = request => * Promise.resolve({ firstName: 'Bob', lastName: 'Loblaw', id: 42 }); * * //getMemberName :: String -> Promise ({ firstName, lastName }) * const getMemberName = R.pipe( * makeQuery, * fetchMember, * R.andThen(R.pick(['firstName', 'lastName'])) * ); * * getMemberName('bob@gmail.com').then(console.log); */ var andThen = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function andThen(f, p) { (0,_internal_assertPromise_js__WEBPACK_IMPORTED_MODULE_1__["default"])('andThen', p); return p.then(f); }); /* harmony default export */ __webpack_exports__["default"] = (andThen); /***/ }), /***/ "./node_modules/ramda/es/any.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/any.js ***! \**************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable.js */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_xany_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xany.js */ "./node_modules/ramda/es/internal/_xany.js"); /** * Returns `true` if at least one of the elements of the list match the predicate, * `false` otherwise. * * Dispatches to the `any` method of the second argument, if present. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig (a -> Boolean) -> [a] -> Boolean * @param {Function} fn The predicate function. * @param {Array} list The array to consider. * @return {Boolean} `true` if the predicate is satisfied by at least one element, `false` * otherwise. * @see R.all, R.none, R.transduce * @example * * const lessThan0 = R.flip(R.lt)(0); * const lessThan2 = R.flip(R.lt)(2); * R.any(lessThan0)([1, 2]); //=> false * R.any(lessThan2)([1, 2]); //=> true */ var any = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/ (0,_internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__["default"])(['any'], _internal_xany_js__WEBPACK_IMPORTED_MODULE_2__["default"], function any(fn, list) { var idx = 0; while (idx < list.length) { if (fn(list[idx])) { return true; } idx += 1; } return false; })); /* harmony default export */ __webpack_exports__["default"] = (any); /***/ }), /***/ "./node_modules/ramda/es/anyPass.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/anyPass.js ***! \******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _curryN_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./curryN.js */ "./node_modules/ramda/es/curryN.js"); /* harmony import */ var _max_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./max.js */ "./node_modules/ramda/es/max.js"); /* harmony import */ var _pluck_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./pluck.js */ "./node_modules/ramda/es/pluck.js"); /* harmony import */ var _reduce_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./reduce.js */ "./node_modules/ramda/es/reduce.js"); /** * Takes a list of predicates and returns a predicate that returns true for a * given list of arguments if at least one of the provided predicates is * satisfied by those arguments. * * The function returned is a curried function whose arity matches that of the * highest-arity predicate. * * @func * @memberOf R * @since v0.9.0 * @category Logic * @sig [(*... -> Boolean)] -> (*... -> Boolean) * @param {Array} predicates An array of predicates to check * @return {Function} The combined predicate * @see R.allPass, R.either * @example * * const isClub = R.propEq('suit', '♣'); * const isSpade = R.propEq('suit', '♠'); * const isBlackCard = R.anyPass([isClub, isSpade]); * * isBlackCard({rank: '10', suit: '♣'}); //=> true * isBlackCard({rank: 'Q', suit: '♠'}); //=> true * isBlackCard({rank: 'Q', suit: '♦'}); //=> false */ var anyPass = /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function anyPass(preds) { return (0,_curryN_js__WEBPACK_IMPORTED_MODULE_1__["default"])((0,_reduce_js__WEBPACK_IMPORTED_MODULE_4__["default"])(_max_js__WEBPACK_IMPORTED_MODULE_2__["default"], 0, (0,_pluck_js__WEBPACK_IMPORTED_MODULE_3__["default"])('length', preds)), function () { var idx = 0; var len = preds.length; while (idx < len) { if (preds[idx].apply(this, arguments)) { return true; } idx += 1; } return false; }); }); /* harmony default export */ __webpack_exports__["default"] = (anyPass); /***/ }), /***/ "./node_modules/ramda/es/ap.js": /*!*************************************!*\ !*** ./node_modules/ramda/es/ap.js ***! \*************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_concat_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_concat.js */ "./node_modules/ramda/es/internal/_concat.js"); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_reduce_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_reduce.js */ "./node_modules/ramda/es/internal/_reduce.js"); /* harmony import */ var _map_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./map.js */ "./node_modules/ramda/es/map.js"); /** * ap applies a list of functions to a list of values. * * Dispatches to the `ap` method of the first argument, if present. Also * treats curried functions as applicatives. * * @func * @memberOf R * @since v0.3.0 * @category Function * @sig [a -> b] -> [a] -> [b] * @sig Apply f => f (a -> b) -> f a -> f b * @sig (r -> a -> b) -> (r -> a) -> (r -> b) * @param {*} applyF * @param {*} applyX * @return {*} * @example * * R.ap([R.multiply(2), R.add(3)], [1,2,3]); //=> [2, 4, 6, 4, 5, 6] * R.ap([R.concat('tasty '), R.toUpper], ['pizza', 'salad']); //=> ["tasty pizza", "tasty salad", "PIZZA", "SALAD"] * * // R.ap can also be used as S combinator * // when only two functions are passed * R.ap(R.concat, R.toUpper)('Ramda') //=> 'RamdaRAMDA' * @symb R.ap([f, g], [a, b]) = [f(a), f(b), g(a), g(b)] */ var ap = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__["default"])(function ap(applyF, applyX) { return typeof applyX['fantasy-land/ap'] === 'function' ? applyX['fantasy-land/ap'](applyF) : typeof applyF.ap === 'function' ? applyF.ap(applyX) : typeof applyF === 'function' ? function (x) { return applyF(x)(applyX(x)); } : (0,_internal_reduce_js__WEBPACK_IMPORTED_MODULE_2__["default"])(function (acc, f) { return (0,_internal_concat_js__WEBPACK_IMPORTED_MODULE_0__["default"])(acc, (0,_map_js__WEBPACK_IMPORTED_MODULE_3__["default"])(f, applyX)); }, [], applyF); }); /* harmony default export */ __webpack_exports__["default"] = (ap); /***/ }), /***/ "./node_modules/ramda/es/aperture.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/aperture.js ***! \*******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_aperture_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_aperture.js */ "./node_modules/ramda/es/internal/_aperture.js"); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_dispatchable.js */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_xaperture_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_xaperture.js */ "./node_modules/ramda/es/internal/_xaperture.js"); /** * Returns a new list, composed of n-tuples of consecutive elements. If `n` is * greater than the length of the list, an empty list is returned. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.12.0 * @category List * @sig Number -> [a] -> [[a]] * @param {Number} n The size of the tuples to create * @param {Array} list The list to split into `n`-length tuples * @return {Array} The resulting list of `n`-length tuples * @see R.transduce * @example * * R.aperture(2, [1, 2, 3, 4, 5]); //=> [[1, 2], [2, 3], [3, 4], [4, 5]] * R.aperture(3, [1, 2, 3, 4, 5]); //=> [[1, 2, 3], [2, 3, 4], [3, 4, 5]] * R.aperture(7, [1, 2, 3, 4, 5]); //=> [] */ var aperture = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/ (0,_internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_2__["default"])([], _internal_xaperture_js__WEBPACK_IMPORTED_MODULE_3__["default"], _internal_aperture_js__WEBPACK_IMPORTED_MODULE_0__["default"])); /* harmony default export */ __webpack_exports__["default"] = (aperture); /***/ }), /***/ "./node_modules/ramda/es/append.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/append.js ***! \*****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_concat_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_concat.js */ "./node_modules/ramda/es/internal/_concat.js"); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns a new list containing the contents of the given list, followed by * the given element. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig a -> [a] -> [a] * @param {*} el The element to add to the end of the new list. * @param {Array} list The list of elements to add a new item to. * list. * @return {Array} A new list containing the elements of the old list followed by `el`. * @see R.prepend * @example * * R.append('tests', ['write', 'more']); //=> ['write', 'more', 'tests'] * R.append('tests', []); //=> ['tests'] * R.append(['tests'], ['write', 'more']); //=> ['write', 'more', ['tests']] */ var append = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__["default"])(function append(el, list) { return (0,_internal_concat_js__WEBPACK_IMPORTED_MODULE_0__["default"])(list, [el]); }); /* harmony default export */ __webpack_exports__["default"] = (append); /***/ }), /***/ "./node_modules/ramda/es/apply.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/apply.js ***! \****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Applies function `fn` to the argument list `args`. This is useful for * creating a fixed-arity function from a variadic function. `fn` should be a * bound function if context is significant. * * @func * @memberOf R * @since v0.7.0 * @category Function * @sig (*... -> a) -> [*] -> a * @param {Function} fn The function which will be called with `args` * @param {Array} args The arguments to call `fn` with * @return {*} result The result, equivalent to `fn(...args)` * @see R.call, R.unapply * @example * * const nums = [1, 2, 3, -99, 42, 6, 7]; * R.apply(Math.max, nums); //=> 42 * @symb R.apply(f, [a, b, c]) = f(a, b, c) */ var apply = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function apply(fn, args) { return fn.apply(this, args); }); /* harmony default export */ __webpack_exports__["default"] = (apply); /***/ }), /***/ "./node_modules/ramda/es/applySpec.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/applySpec.js ***! \********************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _internal_isArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isArray.js */ "./node_modules/ramda/es/internal/_isArray.js"); /* harmony import */ var _apply_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./apply.js */ "./node_modules/ramda/es/apply.js"); /* harmony import */ var _curryN_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./curryN.js */ "./node_modules/ramda/es/curryN.js"); /* harmony import */ var _max_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./max.js */ "./node_modules/ramda/es/max.js"); /* harmony import */ var _pluck_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./pluck.js */ "./node_modules/ramda/es/pluck.js"); /* harmony import */ var _reduce_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./reduce.js */ "./node_modules/ramda/es/reduce.js"); /* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./keys.js */ "./node_modules/ramda/es/keys.js"); /* harmony import */ var _values_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./values.js */ "./node_modules/ramda/es/values.js"); // Use custom mapValues function to avoid issues with specs that include a "map" key and R.map // delegating calls to .map function mapValues(fn, obj) { return (0,_internal_isArray_js__WEBPACK_IMPORTED_MODULE_1__["default"])(obj) ? obj.map(fn) : (0,_keys_js__WEBPACK_IMPORTED_MODULE_7__["default"])(obj).reduce(function (acc, key) { acc[key] = fn(obj[key]); return acc; }, {}); } /** * Given a spec object recursively mapping properties to functions, creates a * function producing an object of the same structure, by mapping each property * to the result of calling its associated function with the supplied arguments. * * @func * @memberOf R * @since v0.20.0 * @category Function * @sig {k: ((a, b, ..., m) -> v)} -> ((a, b, ..., m) -> {k: v}) * @param {Object} spec an object recursively mapping properties to functions for * producing the values for these properties. * @return {Function} A function that returns an object of the same structure * as `spec', with each property set to the value returned by calling its * associated function with the supplied arguments. * @see R.converge, R.juxt * @example * * const getMetrics = R.applySpec({ * sum: R.add, * nested: { mul: R.multiply } * }); * getMetrics(2, 4); // => { sum: 6, nested: { mul: 8 } } * @symb R.applySpec({ x: f, y: { z: g } })(a, b) = { x: f(a, b), y: { z: g(a, b) } } */ var applySpec = /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function applySpec(spec) { spec = mapValues(function (v) { return typeof v == 'function' ? v : applySpec(v); }, spec); return (0,_curryN_js__WEBPACK_IMPORTED_MODULE_3__["default"])((0,_reduce_js__WEBPACK_IMPORTED_MODULE_6__["default"])(_max_js__WEBPACK_IMPORTED_MODULE_4__["default"], 0, (0,_pluck_js__WEBPACK_IMPORTED_MODULE_5__["default"])('length', (0,_values_js__WEBPACK_IMPORTED_MODULE_8__["default"])(spec))), function () { var args = arguments; return mapValues(function (f) { return (0,_apply_js__WEBPACK_IMPORTED_MODULE_2__["default"])(f, args); }, spec); }); }); /* harmony default export */ __webpack_exports__["default"] = (applySpec); /***/ }), /***/ "./node_modules/ramda/es/applyTo.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/applyTo.js ***! \******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Takes a value and applies a function to it. * * This function is also known as the `thrush` combinator. * * @func * @memberOf R * @since v0.25.0 * @category Function * @sig a -> (a -> b) -> b * @param {*} x The value * @param {Function} f The function to apply * @return {*} The result of applying `f` to `x` * @example * * const t42 = R.applyTo(42); * t42(R.identity); //=> 42 * t42(R.add(1)); //=> 43 */ var applyTo = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function applyTo(x, f) { return f(x); }); /* harmony default export */ __webpack_exports__["default"] = (applyTo); /***/ }), /***/ "./node_modules/ramda/es/ascend.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/ascend.js ***! \*****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Makes an ascending comparator function out of a function that returns a value * that can be compared with `<` and `>`. * * @func * @memberOf R * @since v0.23.0 * @category Function * @sig Ord b => (a -> b) -> a -> a -> Number * @param {Function} fn A function of arity one that returns a value that can be compared * @param {*} a The first item to be compared. * @param {*} b The second item to be compared. * @return {Number} `-1` if fn(a) < fn(b), `1` if fn(b) < fn(a), otherwise `0` * @see R.descend * @example * * const byAge = R.ascend(R.prop('age')); * const people = [ * { name: 'Emma', age: 70 }, * { name: 'Peter', age: 78 }, * { name: 'Mikhail', age: 62 }, * ]; * const peopleByYoungestFirst = R.sort(byAge, people); * //=> [{ name: 'Mikhail', age: 62 },{ name: 'Emma', age: 70 }, { name: 'Peter', age: 78 }] */ var ascend = /*#__PURE__*/ (0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function ascend(fn, a, b) { var aa = fn(a); var bb = fn(b); return aa < bb ? -1 : aa > bb ? 1 : 0; }); /* harmony default export */ __webpack_exports__["default"] = (ascend); /***/ }), /***/ "./node_modules/ramda/es/assoc.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/assoc.js ***! \****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _assocPath_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./assocPath.js */ "./node_modules/ramda/es/assocPath.js"); /** * Makes a shallow clone of an object, setting or overriding the specified * property with the given value. Note that this copies and flattens prototype * properties onto the new object as well. All non-primitive properties are * copied by reference. * * @func * @memberOf R * @since v0.8.0 * @category Object * @typedefn Idx = String | Int * @sig Idx -> a -> {k: v} -> {k: v} * @param {String|Number} prop The property name to set * @param {*} val The new value * @param {Object} obj The object to clone * @return {Object} A new object equivalent to the original except for the changed property. * @see R.dissoc, R.pick * @example * * R.assoc('c', 3, {a: 1, b: 2}); //=> {a: 1, b: 2, c: 3} */ var assoc = /*#__PURE__*/ (0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function assoc(prop, val, obj) { return (0,_assocPath_js__WEBPACK_IMPORTED_MODULE_1__["default"])([prop], val, obj); }); /* harmony default export */ __webpack_exports__["default"] = (assoc); /***/ }), /***/ "./node_modules/ramda/es/assocPath.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/assocPath.js ***! \********************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _internal_has_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_has.js */ "./node_modules/ramda/es/internal/_has.js"); /* harmony import */ var _internal_isInteger_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_isInteger.js */ "./node_modules/ramda/es/internal/_isInteger.js"); /* harmony import */ var _internal_assoc_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_assoc.js */ "./node_modules/ramda/es/internal/_assoc.js"); /* harmony import */ var _isNil_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./isNil.js */ "./node_modules/ramda/es/isNil.js"); /** * Makes a shallow clone of an object, setting or overriding the nodes required * to create the given path, and placing the specific value at the tail end of * that path. Note that this copies and flattens prototype properties onto the * new object as well. All non-primitive properties are copied by reference. * * @func * @memberOf R * @since v0.8.0 * @category Object * @typedefn Idx = String | Int | Symbol * @sig [Idx] -> a -> {a} -> {a} * @param {Array} path the path to set * @param {*} val The new value * @param {Object} obj The object to clone * @return {Object} A new object equivalent to the original except along the specified path. * @see R.dissocPath * @example * * R.assocPath(['a', 'b', 'c'], 42, {a: {b: {c: 0}}}); //=> {a: {b: {c: 42}}} * * // Any missing or non-object keys in path will be overridden * R.assocPath(['a', 'b', 'c'], 42, {a: 5}); //=> {a: {b: {c: 42}}} */ var assocPath = /*#__PURE__*/ (0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function assocPath(path, val, obj) { if (path.length === 0) { return val; } var idx = path[0]; if (path.length > 1) { var nextObj = !(0,_isNil_js__WEBPACK_IMPORTED_MODULE_4__["default"])(obj) && (0,_internal_has_js__WEBPACK_IMPORTED_MODULE_1__["default"])(idx, obj) && typeof obj[idx] === 'object' ? obj[idx] : (0,_internal_isInteger_js__WEBPACK_IMPORTED_MODULE_2__["default"])(path[1]) ? [] : {}; val = assocPath(Array.prototype.slice.call(path, 1), val, nextObj); } return (0,_internal_assoc_js__WEBPACK_IMPORTED_MODULE_3__["default"])(idx, val, obj); }); /* harmony default export */ __webpack_exports__["default"] = (assocPath); /***/ }), /***/ "./node_modules/ramda/es/binary.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/binary.js ***! \*****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _nAry_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./nAry.js */ "./node_modules/ramda/es/nAry.js"); /** * Wraps a function of any arity (including nullary) in a function that accepts * exactly 2 parameters. Any extraneous parameters will not be passed to the * supplied function. * * @func * @memberOf R * @since v0.2.0 * @category Function * @sig (a -> b -> c -> ... -> z) -> ((a, b) -> z) * @param {Function} fn The function to wrap. * @return {Function} A new function wrapping `fn`. The new function is guaranteed to be of * arity 2. * @see R.nAry, R.unary * @example * * const takesThreeArgs = function(a, b, c) { * return [a, b, c]; * }; * takesThreeArgs.length; //=> 3 * takesThreeArgs(1, 2, 3); //=> [1, 2, 3] * * const takesTwoArgs = R.binary(takesThreeArgs); * takesTwoArgs.length; //=> 2 * // Only 2 arguments are passed to the wrapped function * takesTwoArgs(1, 2, 3); //=> [1, 2, undefined] * @symb R.binary(f)(a, b, c) = f(a, b) */ var binary = /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function binary(fn) { return (0,_nAry_js__WEBPACK_IMPORTED_MODULE_1__["default"])(2, fn); }); /* harmony default export */ __webpack_exports__["default"] = (binary); /***/ }), /***/ "./node_modules/ramda/es/bind.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/bind.js ***! \***************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_arity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_arity.js */ "./node_modules/ramda/es/internal/_arity.js"); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Creates a function that is bound to a context. * Note: `R.bind` does not provide the additional argument-binding capabilities of * [Function.prototype.bind](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind). * * @func * @memberOf R * @since v0.6.0 * @category Function * @category Object * @sig (* -> *) -> {*} -> (* -> *) * @param {Function} fn The function to bind to context * @param {Object} thisObj The context to bind `fn` to * @return {Function} A function that will execute in the context of `thisObj`. * @see R.partial * @example * * const log = R.bind(console.log, console); * R.pipe(R.assoc('a', 2), R.tap(log), R.assoc('a', 3))({a: 1}); //=> {a: 3} * // logs {a: 2} * @symb R.bind(f, o)(a, b) = f.call(o, a, b) */ var bind = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__["default"])(function bind(fn, thisObj) { return (0,_internal_arity_js__WEBPACK_IMPORTED_MODULE_0__["default"])(fn.length, function () { return fn.apply(thisObj, arguments); }); }); /* harmony default export */ __webpack_exports__["default"] = (bind); /***/ }), /***/ "./node_modules/ramda/es/both.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/both.js ***! \***************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_isFunction_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isFunction.js */ "./node_modules/ramda/es/internal/_isFunction.js"); /* harmony import */ var _and_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./and.js */ "./node_modules/ramda/es/and.js"); /* harmony import */ var _lift_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./lift.js */ "./node_modules/ramda/es/lift.js"); /** * A function which calls the two provided functions and returns the `&&` * of the results. * It returns the result of the first function if it is false-y and the result * of the second function otherwise. Note that this is short-circuited, * meaning that the second function will not be invoked if the first returns a * false-y value. * * In addition to functions, `R.both` also accepts any fantasy-land compatible * applicative functor. * * @func * @memberOf R * @since v0.12.0 * @category Logic * @sig (*... -> Boolean) -> (*... -> Boolean) -> (*... -> Boolean) * @param {Function} f A predicate * @param {Function} g Another predicate * @return {Function} a function that applies its arguments to `f` and `g` and `&&`s their outputs together. * @see R.either, R.allPass, R.and * @example * * const gt10 = R.gt(R.__, 10) * const lt20 = R.lt(R.__, 20) * const f = R.both(gt10, lt20); * f(15); //=> true * f(30); //=> false * * R.both(Maybe.Just(false), Maybe.Just(55)); // => Maybe.Just(false) * R.both([false, false, 'a'], [11]); //=> [false, false, 11] */ var both = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function both(f, g) { return (0,_internal_isFunction_js__WEBPACK_IMPORTED_MODULE_1__["default"])(f) ? function _both() { return f.apply(this, arguments) && g.apply(this, arguments); } : (0,_lift_js__WEBPACK_IMPORTED_MODULE_3__["default"])(_and_js__WEBPACK_IMPORTED_MODULE_2__["default"])(f, g); }); /* harmony default export */ __webpack_exports__["default"] = (both); /***/ }), /***/ "./node_modules/ramda/es/call.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/call.js ***! \***************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /** * Returns the result of calling its first argument with the remaining * arguments. This is occasionally useful as a converging function for * [`R.converge`](#converge): the first branch can produce a function while the * remaining branches produce values to be passed to that function as its * arguments. * * @func * @memberOf R * @since v0.9.0 * @category Function * @sig ((*... -> a), *...) -> a * @param {Function} fn The function to apply to the remaining arguments. * @param {...*} args Any number of positional arguments. * @return {*} * @see R.apply * @example * * R.call(R.add, 1, 2); //=> 3 * * const indentN = R.pipe( * R.repeat(' '), * R.join(''), * R.replace(/^(?!$)/gm) * ); * * const format = R.converge( * R.call, * [ * R.pipe(R.prop('indent'), indentN), * R.prop('value') * ] * ); * * format({indent: 2, value: 'foo\nbar\nbaz\n'}); //=> ' foo\n bar\n baz\n' * @symb R.call(f, a, b) = f(a, b) */ var call = /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function call(fn) { return fn.apply(this, Array.prototype.slice.call(arguments, 1)); }); /* harmony default export */ __webpack_exports__["default"] = (call); /***/ }), /***/ "./node_modules/ramda/es/chain.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/chain.js ***! \****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable.js */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_makeFlat_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_makeFlat.js */ "./node_modules/ramda/es/internal/_makeFlat.js"); /* harmony import */ var _internal_xchain_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_xchain.js */ "./node_modules/ramda/es/internal/_xchain.js"); /* harmony import */ var _map_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./map.js */ "./node_modules/ramda/es/map.js"); /** * `chain` maps a function over a list and concatenates the results. `chain` * is also known as `flatMap` in some libraries. * * Dispatches to the `chain` method of the second argument, if present, * according to the [FantasyLand Chain spec](https://github.com/fantasyland/fantasy-land#chain). * * If second argument is a function, `chain(f, g)(x)` is equivalent to `f(g(x), x)`. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.3.0 * @category List * @sig Chain m => (a -> m b) -> m a -> m b * @param {Function} fn The function to map with * @param {Array} list The list to map over * @return {Array} The result of flat-mapping `list` with `fn` * @example * * const duplicate = n => [n, n]; * R.chain(duplicate, [1, 2, 3]); //=> [1, 1, 2, 2, 3, 3] * * R.chain(R.append, R.head)([1, 2, 3]); //=> [1, 2, 3, 1] */ var chain = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/ (0,_internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__["default"])(['fantasy-land/chain', 'chain'], _internal_xchain_js__WEBPACK_IMPORTED_MODULE_3__["default"], function chain(fn, monad) { if (typeof monad === 'function') { return function (x) { return fn(monad(x))(x); }; } return (0,_internal_makeFlat_js__WEBPACK_IMPORTED_MODULE_2__["default"])(false)((0,_map_js__WEBPACK_IMPORTED_MODULE_4__["default"])(fn, monad)); })); /* harmony default export */ __webpack_exports__["default"] = (chain); /***/ }), /***/ "./node_modules/ramda/es/clamp.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/clamp.js ***! \****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Restricts a number to be within a range. * * Also works for other ordered types such as Strings and Dates. * * @func * @memberOf R * @since v0.20.0 * @category Relation * @sig Ord a => a -> a -> a -> a * @param {Number} minimum The lower limit of the clamp (inclusive) * @param {Number} maximum The upper limit of the clamp (inclusive) * @param {Number} value Value to be clamped * @return {Number} Returns `minimum` when `val < minimum`, `maximum` when `val > maximum`, returns `val` otherwise * @example * * R.clamp(1, 10, -5) // => 1 * R.clamp(1, 10, 15) // => 10 * R.clamp(1, 10, 4) // => 4 */ var clamp = /*#__PURE__*/ (0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function clamp(min, max, value) { if (min > max) { throw new Error('min must not be greater than max in clamp(min, max, value)'); } return value < min ? min : value > max ? max : value; }); /* harmony default export */ __webpack_exports__["default"] = (clamp); /***/ }), /***/ "./node_modules/ramda/es/clone.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/clone.js ***! \****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_clone_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_clone.js */ "./node_modules/ramda/es/internal/_clone.js"); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /** * Creates a deep copy of the source that can be used in place of the source * object without retaining any references to it. * The source object may contain (nested) `Array`s and `Object`s, * `Number`s, `String`s, `Boolean`s and `Date`s. * `Function`s are assigned by reference rather than copied. * * Dispatches to a `clone` method if present. * * Note that if the source object has multiple nodes that share a reference, * the returned object will have the same structure, but the references will * be pointed to the location within the cloned value. * * @func * @memberOf R * @since v0.1.0 * @category Object * @sig {*} -> {*} * @param {*} value The object or array to clone * @return {*} A deeply cloned copy of `val` * @example * * const objects = [{}, {}, {}]; * const objectsClone = R.clone(objects); * objects === objectsClone; //=> false * objects[0] === objectsClone[0]; //=> false */ var clone = /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_1__["default"])(function clone(value) { return value != null && typeof value.clone === 'function' ? value.clone() : (0,_internal_clone_js__WEBPACK_IMPORTED_MODULE_0__["default"])(value, true); }); /* harmony default export */ __webpack_exports__["default"] = (clone); /***/ }), /***/ "./node_modules/ramda/es/collectBy.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/collectBy.js ***! \********************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_reduce_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_reduce.js */ "./node_modules/ramda/es/internal/_reduce.js"); /** * Splits a list into sub-lists, based on the result of calling a key-returning function on each element, * and grouping the results according to values returned. * * @func * @memberOf R * @since v0.28.0 * @category List * @typedefn Idx = String | Int | Symbol * @sig Idx a => (b -> a) -> [b] -> [[b]] * @param {Function} fn Function :: a -> Idx * @param {Array} list The array to group * @return {Array} * An array of arrays where each sub-array contains items for which * the String-returning function has returned the same value. * @see R.groupBy, R.partition * @example * R.collectBy(R.prop('type'), [ * {type: 'breakfast', item: '☕️'}, * {type: 'lunch', item: '🌯'}, * {type: 'dinner', item: '🍝'}, * {type: 'breakfast', item: '🥐'}, * {type: 'lunch', item: '🍕'} * ]); * * // [ [ {type: 'breakfast', item: '☕️'}, * // {type: 'breakfast', item: '🥐'} ], * // [ {type: 'lunch', item: '🌯'}, * // {type: 'lunch', item: '🍕'} ], * // [ {type: 'dinner', item: '🍝'} ] ] */ var collectBy = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function collectBy(fn, list) { var group = (0,_internal_reduce_js__WEBPACK_IMPORTED_MODULE_1__["default"])(function (o, x) { var tag = fn(x); if (o[tag] === undefined) { o[tag] = []; } o[tag].push(x); return o; }, {}, list); var newList = []; for (var tag in group) { newList.push(group[tag]); } return newList; }); /* harmony default export */ __webpack_exports__["default"] = (collectBy); /***/ }), /***/ "./node_modules/ramda/es/comparator.js": /*!*********************************************!*\ !*** ./node_modules/ramda/es/comparator.js ***! \*********************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /** * Makes a comparator function out of a function that reports whether the first * element is less than the second. * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig ((a, b) -> Boolean) -> ((a, b) -> Number) * @param {Function} pred A predicate function of arity two which will return `true` if the first argument * is less than the second, `false` otherwise * @return {Function} A Function :: a -> b -> Int that returns `-1` if a < b, `1` if b < a, otherwise `0` * @example * * const byAge = R.comparator((a, b) => a.age < b.age); * const people = [ * { name: 'Emma', age: 70 }, * { name: 'Peter', age: 78 }, * { name: 'Mikhail', age: 62 }, * ]; * const peopleByIncreasingAge = R.sort(byAge, people); * //=> [{ name: 'Mikhail', age: 62 },{ name: 'Emma', age: 70 }, { name: 'Peter', age: 78 }] */ var comparator = /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function comparator(pred) { return function (a, b) { return pred(a, b) ? -1 : pred(b, a) ? 1 : 0; }; }); /* harmony default export */ __webpack_exports__["default"] = (comparator); /***/ }), /***/ "./node_modules/ramda/es/complement.js": /*!*********************************************!*\ !*** ./node_modules/ramda/es/complement.js ***! \*********************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _lift_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lift.js */ "./node_modules/ramda/es/lift.js"); /* harmony import */ var _not_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./not.js */ "./node_modules/ramda/es/not.js"); /** * Takes a function `f` and returns a function `g` such that if called with the same arguments * when `f` returns a "truthy" value, `g` returns `false` and when `f` returns a "falsy" value `g` returns `true`. * * `R.complement` may be applied to any functor * * @func * @memberOf R * @since v0.12.0 * @category Logic * @sig (*... -> *) -> (*... -> Boolean) * @param {Function} f * @return {Function} * @see R.not * @example * * const isNotNil = R.complement(R.isNil); * R.isNil(null); //=> true * isNotNil(null); //=> false * R.isNil(7); //=> false * isNotNil(7); //=> true */ var complement = /*#__PURE__*/ (0,_lift_js__WEBPACK_IMPORTED_MODULE_0__["default"])(_not_js__WEBPACK_IMPORTED_MODULE_1__["default"]); /* harmony default export */ __webpack_exports__["default"] = (complement); /***/ }), /***/ "./node_modules/ramda/es/compose.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/compose.js ***! \******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ compose; } /* harmony export */ }); /* harmony import */ var _pipe_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./pipe.js */ "./node_modules/ramda/es/pipe.js"); /* harmony import */ var _reverse_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reverse.js */ "./node_modules/ramda/es/reverse.js"); /** * Performs right-to-left function composition. The last argument may have * any arity; the remaining arguments must be unary. * * **Note:** The result of compose is not automatically curried. * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig ((y -> z), (x -> y), ..., (o -> p), ((a, b, ..., n) -> o)) -> ((a, b, ..., n) -> z) * @param {...Function} ...functions The functions to compose * @return {Function} * @see R.pipe * @example * * const classyGreeting = (firstName, lastName) => "The name's " + lastName + ", " + firstName + " " + lastName * const yellGreeting = R.compose(R.toUpper, classyGreeting); * yellGreeting('James', 'Bond'); //=> "THE NAME'S BOND, JAMES BOND" * * R.compose(Math.abs, R.add(1), R.multiply(2))(-4) //=> 7 * * @symb R.compose(f, g, h)(a, b) = f(g(h(a, b))) * @symb R.compose(f, g, h)(a)(b) = f(g(h(a)))(b) */ function compose() { if (arguments.length === 0) { throw new Error('compose requires at least one argument'); } return _pipe_js__WEBPACK_IMPORTED_MODULE_0__["default"].apply(this, (0,_reverse_js__WEBPACK_IMPORTED_MODULE_1__["default"])(arguments)); } /***/ }), /***/ "./node_modules/ramda/es/composeWith.js": /*!**********************************************!*\ !*** ./node_modules/ramda/es/composeWith.js ***! \**********************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _pipeWith_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./pipeWith.js */ "./node_modules/ramda/es/pipeWith.js"); /* harmony import */ var _reverse_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reverse.js */ "./node_modules/ramda/es/reverse.js"); /** * Performs right-to-left function composition using transforming function. The last function may have * any arity; the remaining functions must be unary. Unlike `compose`, functions are passed in an array. * * **Note:** The result of composeWith is not automatically curried. Transforming function is not used * on the last argument. * * @func * @memberOf R * @since v0.26.0 * @category Function * @sig ((* -> *), [(y -> z), (x -> y), ..., (o -> p), ((a, b, ..., n) -> o)]) -> ((a, b, ..., n) -> z) * @param {Function} transformer The transforming function * @param {Array} functions The functions to compose * @return {Function} * @see R.compose, R.pipeWith * @example * * const composeWhileNotNil = R.composeWith((f, res) => R.isNil(res) ? res : f(res)); * * composeWhileNotNil([R.inc, R.prop('age')])({age: 1}) //=> 2 * composeWhileNotNil([R.inc, R.prop('age')])({}) //=> undefined * * @symb R.composeWith(f)([g, h, i])(...args) = f(g, f(h, i(...args))) */ var composeWith = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function composeWith(xf, list) { return _pipeWith_js__WEBPACK_IMPORTED_MODULE_1__["default"].apply(this, [xf, (0,_reverse_js__WEBPACK_IMPORTED_MODULE_2__["default"])(list)]); }); /* harmony default export */ __webpack_exports__["default"] = (composeWith); /***/ }), /***/ "./node_modules/ramda/es/concat.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/concat.js ***! \*****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_isArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isArray.js */ "./node_modules/ramda/es/internal/_isArray.js"); /* harmony import */ var _internal_isFunction_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_isFunction.js */ "./node_modules/ramda/es/internal/_isFunction.js"); /* harmony import */ var _internal_isString_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_isString.js */ "./node_modules/ramda/es/internal/_isString.js"); /* harmony import */ var _toString_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./toString.js */ "./node_modules/ramda/es/toString.js"); /** * Returns the result of concatenating the given lists or strings. * * Note: `R.concat` expects both arguments to be of the same type, * unlike the native `Array.prototype.concat` method. It will throw * an error if you `concat` an Array with a non-Array value. * * Dispatches to the `concat` method of the first argument, if present. * Can also concatenate two members of a [fantasy-land * compatible semigroup](https://github.com/fantasyland/fantasy-land#semigroup). * * @func * @memberOf R * @since v0.1.0 * @category List * @sig [a] -> [a] -> [a] * @sig String -> String -> String * @param {Array|String} firstList The first list * @param {Array|String} secondList The second list * @return {Array|String} A list consisting of the elements of `firstList` followed by the elements of * `secondList`. * * @example * * R.concat('ABC', 'DEF'); // 'ABCDEF' * R.concat([4, 5, 6], [1, 2, 3]); //=> [4, 5, 6, 1, 2, 3] * R.concat([], []); //=> [] */ var concat = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function concat(a, b) { if ((0,_internal_isArray_js__WEBPACK_IMPORTED_MODULE_1__["default"])(a)) { if ((0,_internal_isArray_js__WEBPACK_IMPORTED_MODULE_1__["default"])(b)) { return a.concat(b); } throw new TypeError((0,_toString_js__WEBPACK_IMPORTED_MODULE_4__["default"])(b) + ' is not an array'); } if ((0,_internal_isString_js__WEBPACK_IMPORTED_MODULE_3__["default"])(a)) { if ((0,_internal_isString_js__WEBPACK_IMPORTED_MODULE_3__["default"])(b)) { return a + b; } throw new TypeError((0,_toString_js__WEBPACK_IMPORTED_MODULE_4__["default"])(b) + ' is not a string'); } if (a != null && (0,_internal_isFunction_js__WEBPACK_IMPORTED_MODULE_2__["default"])(a['fantasy-land/concat'])) { return a['fantasy-land/concat'](b); } if (a != null && (0,_internal_isFunction_js__WEBPACK_IMPORTED_MODULE_2__["default"])(a.concat)) { return a.concat(b); } throw new TypeError((0,_toString_js__WEBPACK_IMPORTED_MODULE_4__["default"])(a) + ' does not have a method named "concat" or "fantasy-land/concat"'); }); /* harmony default export */ __webpack_exports__["default"] = (concat); /***/ }), /***/ "./node_modules/ramda/es/cond.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/cond.js ***! \***************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_arity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_arity.js */ "./node_modules/ramda/es/internal/_arity.js"); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _map_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./map.js */ "./node_modules/ramda/es/map.js"); /* harmony import */ var _max_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./max.js */ "./node_modules/ramda/es/max.js"); /* harmony import */ var _reduce_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./reduce.js */ "./node_modules/ramda/es/reduce.js"); /** * Returns a function, `fn`, which encapsulates `if/else, if/else, ...` logic. * `R.cond` takes a list of [predicate, transformer] pairs. All of the arguments * to `fn` are applied to each of the predicates in turn until one returns a * "truthy" value, at which point `fn` returns the result of applying its * arguments to the corresponding transformer. If none of the predicates * matches, `fn` returns undefined. * * **Please note**: This is not a direct substitute for a `switch` statement. * Remember that both elements of every pair passed to `cond` are *functions*, * and `cond` returns a function. * * @func * @memberOf R * @since v0.6.0 * @category Logic * @sig [[(*... -> Boolean),(*... -> *)]] -> (*... -> *) * @param {Array} pairs A list of [predicate, transformer] * @return {Function} * @see R.ifElse, R.unless, R.when * @example * * const fn = R.cond([ * [R.equals(0), R.always('water freezes at 0°C')], * [R.equals(100), R.always('water boils at 100°C')], * [R.T, temp => 'nothing special happens at ' + temp + '°C'] * ]); * fn(0); //=> 'water freezes at 0°C' * fn(50); //=> 'nothing special happens at 50°C' * fn(100); //=> 'water boils at 100°C' */ var cond = /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_1__["default"])(function cond(pairs) { var arity = (0,_reduce_js__WEBPACK_IMPORTED_MODULE_4__["default"])(_max_js__WEBPACK_IMPORTED_MODULE_3__["default"], 0, (0,_map_js__WEBPACK_IMPORTED_MODULE_2__["default"])(function (pair) { return pair[0].length; }, pairs)); return (0,_internal_arity_js__WEBPACK_IMPORTED_MODULE_0__["default"])(arity, function () { var idx = 0; while (idx < pairs.length) { if (pairs[idx][0].apply(this, arguments)) { return pairs[idx][1].apply(this, arguments); } idx += 1; } }); }); /* harmony default export */ __webpack_exports__["default"] = (cond); /***/ }), /***/ "./node_modules/ramda/es/construct.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/construct.js ***! \********************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _constructN_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constructN.js */ "./node_modules/ramda/es/constructN.js"); /** * Wraps a constructor function inside a curried function that can be called * with the same arguments and returns the same type. * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig (* -> {*}) -> (* -> {*}) * @param {Function} fn The constructor function to wrap. * @return {Function} A wrapped, curried constructor function. * @see R.invoker * @example * * // Constructor function * function Animal(kind) { * this.kind = kind; * }; * Animal.prototype.sighting = function() { * return "It's a " + this.kind + "!"; * } * * const AnimalConstructor = R.construct(Animal) * * // Notice we no longer need the 'new' keyword: * AnimalConstructor('Pig'); //=> {"kind": "Pig", "sighting": function (){...}}; * * const animalTypes = ["Lion", "Tiger", "Bear"]; * const animalSighting = R.invoker(0, 'sighting'); * const sightNewAnimal = R.compose(animalSighting, AnimalConstructor); * R.map(sightNewAnimal, animalTypes); //=> ["It's a Lion!", "It's a Tiger!", "It's a Bear!"] */ var construct = /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function construct(Fn) { return (0,_constructN_js__WEBPACK_IMPORTED_MODULE_1__["default"])(Fn.length, Fn); }); /* harmony default export */ __webpack_exports__["default"] = (construct); /***/ }), /***/ "./node_modules/ramda/es/constructN.js": /*!*********************************************!*\ !*** ./node_modules/ramda/es/constructN.js ***! \*********************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _curry_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./curry.js */ "./node_modules/ramda/es/curry.js"); /* harmony import */ var _nAry_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./nAry.js */ "./node_modules/ramda/es/nAry.js"); /** * Wraps a constructor function inside a curried function that can be called * with the same arguments and returns the same type. The arity of the function * returned is specified to allow using variadic constructor functions. * * @func * @memberOf R * @since v0.4.0 * @category Function * @sig Number -> (* -> {*}) -> (* -> {*}) * @param {Number} n The arity of the constructor function. * @param {Function} Fn The constructor function to wrap. * @return {Function} A wrapped, curried constructor function. * @example * * // Variadic Constructor function * function Salad() { * this.ingredients = arguments; * } * * Salad.prototype.recipe = function() { * const instructions = R.map(ingredient => 'Add a dollop of ' + ingredient, this.ingredients); * return R.join('\n', instructions); * }; * * const ThreeLayerSalad = R.constructN(3, Salad); * * // Notice we no longer need the 'new' keyword, and the constructor is curried for 3 arguments. * const salad = ThreeLayerSalad('Mayonnaise')('Potato Chips')('Ketchup'); * * console.log(salad.recipe()); * // Add a dollop of Mayonnaise * // Add a dollop of Potato Chips * // Add a dollop of Ketchup */ var constructN = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function constructN(n, Fn) { if (n > 10) { throw new Error('Constructor with greater than ten arguments'); } if (n === 0) { return function () { return new Fn(); }; } return (0,_curry_js__WEBPACK_IMPORTED_MODULE_1__["default"])((0,_nAry_js__WEBPACK_IMPORTED_MODULE_2__["default"])(n, function ($0, $1, $2, $3, $4, $5, $6, $7, $8, $9) { switch (n) { case 1: return new Fn($0); case 2: return new Fn($0, $1); case 3: return new Fn($0, $1, $2); case 4: return new Fn($0, $1, $2, $3); case 5: return new Fn($0, $1, $2, $3, $4); case 6: return new Fn($0, $1, $2, $3, $4, $5); case 7: return new Fn($0, $1, $2, $3, $4, $5, $6); case 8: return new Fn($0, $1, $2, $3, $4, $5, $6, $7); case 9: return new Fn($0, $1, $2, $3, $4, $5, $6, $7, $8); case 10: return new Fn($0, $1, $2, $3, $4, $5, $6, $7, $8, $9); } })); }); /* harmony default export */ __webpack_exports__["default"] = (constructN); /***/ }), /***/ "./node_modules/ramda/es/converge.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/converge.js ***! \*******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_map_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_map.js */ "./node_modules/ramda/es/internal/_map.js"); /* harmony import */ var _curryN_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./curryN.js */ "./node_modules/ramda/es/curryN.js"); /* harmony import */ var _max_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./max.js */ "./node_modules/ramda/es/max.js"); /* harmony import */ var _pluck_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./pluck.js */ "./node_modules/ramda/es/pluck.js"); /* harmony import */ var _reduce_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./reduce.js */ "./node_modules/ramda/es/reduce.js"); /** * Accepts a converging function and a list of branching functions and returns * a new function. The arity of the new function is the same as the arity of * the longest branching function. When invoked, this new function is applied * to some arguments, and each branching function is applied to those same * arguments. The results of each branching function are passed as arguments * to the converging function to produce the return value. * * @func * @memberOf R * @since v0.4.2 * @category Function * @sig ((x1, x2, ...) -> z) -> [((a, b, ...) -> x1), ((a, b, ...) -> x2), ...] -> (a -> b -> ... -> z) * @param {Function} after A function. `after` will be invoked with the return values of * `fn1` and `fn2` as its arguments. * @param {Array} functions A list of functions. * @return {Function} A new function. * @see R.useWith * @example * * const average = R.converge(R.divide, [R.sum, R.length]) * average([1, 2, 3, 4, 5, 6, 7]) //=> 4 * * const strangeConcat = R.converge(R.concat, [R.toUpper, R.toLower]) * strangeConcat("Yodel") //=> "YODELyodel" * * @symb R.converge(f, [g, h])(a, b) = f(g(a, b), h(a, b)) */ var converge = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function converge(after, fns) { return (0,_curryN_js__WEBPACK_IMPORTED_MODULE_2__["default"])((0,_reduce_js__WEBPACK_IMPORTED_MODULE_5__["default"])(_max_js__WEBPACK_IMPORTED_MODULE_3__["default"], 0, (0,_pluck_js__WEBPACK_IMPORTED_MODULE_4__["default"])('length', fns)), function () { var args = arguments; var context = this; return after.apply(context, (0,_internal_map_js__WEBPACK_IMPORTED_MODULE_1__["default"])(function (fn) { return fn.apply(context, args); }, fns)); }); }); /* harmony default export */ __webpack_exports__["default"] = (converge); /***/ }), /***/ "./node_modules/ramda/es/count.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/count.js ***! \****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_reduce_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_reduce.js */ "./node_modules/ramda/es/internal/_reduce.js"); /* harmony import */ var _curry_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./curry.js */ "./node_modules/ramda/es/curry.js"); /** * Returns the number of items in a given `list` matching the predicate `f` * * @func * @memberOf R * @since v0.28.0 * @category List * @sig (a -> Boolean) -> [a] -> Number * @param {Function} predicate to match items against * @return {Array} list of items to count in * @example * * const even = x => x % 2 == 0; * * R.count(even, [1, 2, 3, 4, 5]); // => 2 * R.map(R.count(even), [[1, 1, 1], [2, 3, 4, 5], [6]]); // => [0, 2, 1] */ var count = /*#__PURE__*/ (0,_curry_js__WEBPACK_IMPORTED_MODULE_1__["default"])(function (pred, list) { return (0,_internal_reduce_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function (a, e) { return pred(e) ? a + 1 : a; }, 0, list); }); /* harmony default export */ __webpack_exports__["default"] = (count); /***/ }), /***/ "./node_modules/ramda/es/countBy.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/countBy.js ***! \******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _reduceBy_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./reduceBy.js */ "./node_modules/ramda/es/reduceBy.js"); /** * Counts the elements of a list according to how many match each value of a * key generated by the supplied function. Returns an object mapping the keys * produced by `fn` to the number of occurrences in the list. Note that all * keys are coerced to strings because of how JavaScript objects work. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig (a -> String) -> [a] -> {*} * @param {Function} fn The function used to map values to keys. * @param {Array} list The list to count elements from. * @return {Object} An object mapping keys to number of occurrences in the list. * @example * * const numbers = [1.0, 1.1, 1.2, 2.0, 3.0, 2.2]; * R.countBy(Math.floor)(numbers); //=> {'1': 3, '2': 2, '3': 1} * * const letters = ['a', 'b', 'A', 'a', 'B', 'c']; * R.countBy(R.toLower)(letters); //=> {'a': 3, 'b': 2, 'c': 1} */ var countBy = /*#__PURE__*/ (0,_reduceBy_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function (acc, elem) { return acc + 1; }, 0); /* harmony default export */ __webpack_exports__["default"] = (countBy); /***/ }), /***/ "./node_modules/ramda/es/curry.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/curry.js ***! \****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _curryN_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./curryN.js */ "./node_modules/ramda/es/curryN.js"); /** * Returns a curried equivalent of the provided function. The curried function * has two unusual capabilities. First, its arguments needn't be provided one * at a time. If `f` is a ternary function and `g` is `R.curry(f)`, the * following are equivalent: * * - `g(1)(2)(3)` * - `g(1)(2, 3)` * - `g(1, 2)(3)` * - `g(1, 2, 3)` * * Secondly, the special placeholder value [`R.__`](#__) may be used to specify * "gaps", allowing partial application of any combination of arguments, * regardless of their positions. If `g` is as above and `_` is [`R.__`](#__), * the following are equivalent: * * - `g(1, 2, 3)` * - `g(_, 2, 3)(1)` * - `g(_, _, 3)(1)(2)` * - `g(_, _, 3)(1, 2)` * - `g(_, 2)(1)(3)` * - `g(_, 2)(1, 3)` * - `g(_, 2)(_, 3)(1)` * * Please note that default parameters don't count towards a [function arity](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/length) * and therefore `curry` won't work well with those: * * ``` * const h = R.curry((a, b, c = 2) => a + b + c); * * h(40); * //=> function (waits for `b`) * * h(39)(1); * //=> 42 * * h(1)(2, 3); * //=> 6 * * h(1)(2)(7); * //=> Error! (`3` is not a function!) * ``` * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig (* -> a) -> (* -> a) * @param {Function} fn The function to curry. * @return {Function} A new, curried function. * @see R.curryN, R.partial * @example * * const addFourNumbers = (a, b, c, d) => a + b + c + d; * * const curriedAddFourNumbers = R.curry(addFourNumbers); * const f = curriedAddFourNumbers(1, 2); * const g = f(3); * g(4); //=> 10 */ var curry = /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function curry(fn) { return (0,_curryN_js__WEBPACK_IMPORTED_MODULE_1__["default"])(fn.length, fn); }); /* harmony default export */ __webpack_exports__["default"] = (curry); /***/ }), /***/ "./node_modules/ramda/es/curryN.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/curryN.js ***! \*****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_arity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_arity.js */ "./node_modules/ramda/es/internal/_arity.js"); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_curryN_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_curryN.js */ "./node_modules/ramda/es/internal/_curryN.js"); /** * Returns a curried equivalent of the provided function, with the specified * arity. The curried function has two unusual capabilities. First, its * arguments needn't be provided one at a time. If `g` is `R.curryN(3, f)`, the * following are equivalent: * * - `g(1)(2)(3)` * - `g(1)(2, 3)` * - `g(1, 2)(3)` * - `g(1, 2, 3)` * * Secondly, the special placeholder value [`R.__`](#__) may be used to specify * "gaps", allowing partial application of any combination of arguments, * regardless of their positions. If `g` is as above and `_` is [`R.__`](#__), * the following are equivalent: * * - `g(1, 2, 3)` * - `g(_, 2, 3)(1)` * - `g(_, _, 3)(1)(2)` * - `g(_, _, 3)(1, 2)` * - `g(_, 2)(1)(3)` * - `g(_, 2)(1, 3)` * - `g(_, 2)(_, 3)(1)` * * @func * @memberOf R * @since v0.5.0 * @category Function * @sig Number -> (* -> a) -> (* -> a) * @param {Number} length The arity for the returned function. * @param {Function} fn The function to curry. * @return {Function} A new, curried function. * @see R.curry * @example * * const sumArgs = (...args) => R.sum(args); * * const curriedAddFourNumbers = R.curryN(4, sumArgs); * const f = curriedAddFourNumbers(1, 2); * const g = f(3); * g(4); //=> 10 */ var curryN = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_2__["default"])(function curryN(length, fn) { if (length === 1) { return (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_1__["default"])(fn); } return (0,_internal_arity_js__WEBPACK_IMPORTED_MODULE_0__["default"])(length, (0,_internal_curryN_js__WEBPACK_IMPORTED_MODULE_3__["default"])(length, [], fn)); }); /* harmony default export */ __webpack_exports__["default"] = (curryN); /***/ }), /***/ "./node_modules/ramda/es/dec.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/dec.js ***! \**************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _add_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./add.js */ "./node_modules/ramda/es/add.js"); /** * Decrements its argument. * * @func * @memberOf R * @since v0.9.0 * @category Math * @sig Number -> Number * @param {Number} n * @return {Number} n - 1 * @see R.inc * @example * * R.dec(42); //=> 41 */ var dec = /*#__PURE__*/ (0,_add_js__WEBPACK_IMPORTED_MODULE_0__["default"])(-1); /* harmony default export */ __webpack_exports__["default"] = (dec); /***/ }), /***/ "./node_modules/ramda/es/defaultTo.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/defaultTo.js ***! \********************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns the second argument if it is not `null`, `undefined` or `NaN`; * otherwise the first argument is returned. * * @func * @memberOf R * @since v0.10.0 * @category Logic * @sig a -> b -> a | b * @param {a} default The default value. * @param {b} val `val` will be returned instead of `default` unless `val` is `null`, `undefined` or `NaN`. * @return {*} The second value if it is not `null`, `undefined` or `NaN`, otherwise the default value * @example * * const defaultTo42 = R.defaultTo(42); * * defaultTo42(null); //=> 42 * defaultTo42(undefined); //=> 42 * defaultTo42(false); //=> false * defaultTo42('Ramda'); //=> 'Ramda' * // parseInt('string') results in NaN * defaultTo42(parseInt('string')); //=> 42 */ var defaultTo = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function defaultTo(d, v) { return v == null || v !== v ? d : v; }); /* harmony default export */ __webpack_exports__["default"] = (defaultTo); /***/ }), /***/ "./node_modules/ramda/es/descend.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/descend.js ***! \******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Makes a descending comparator function out of a function that returns a value * that can be compared with `<` and `>`. * * @func * @memberOf R * @since v0.23.0 * @category Function * @sig Ord b => (a -> b) -> a -> a -> Number * @param {Function} fn A function of arity one that returns a value that can be compared * @param {*} a The first item to be compared. * @param {*} b The second item to be compared. * @return {Number} `-1` if fn(a) > fn(b), `1` if fn(b) > fn(a), otherwise `0` * @see R.ascend * @example * * const byAge = R.descend(R.prop('age')); * const people = [ * { name: 'Emma', age: 70 }, * { name: 'Peter', age: 78 }, * { name: 'Mikhail', age: 62 }, * ]; * const peopleByOldestFirst = R.sort(byAge, people); * //=> [{ name: 'Peter', age: 78 }, { name: 'Emma', age: 70 }, { name: 'Mikhail', age: 62 }] */ var descend = /*#__PURE__*/ (0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function descend(fn, a, b) { var aa = fn(a); var bb = fn(b); return aa > bb ? -1 : aa < bb ? 1 : 0; }); /* harmony default export */ __webpack_exports__["default"] = (descend); /***/ }), /***/ "./node_modules/ramda/es/difference.js": /*!*********************************************!*\ !*** ./node_modules/ramda/es/difference.js ***! \*********************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_Set_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_Set.js */ "./node_modules/ramda/es/internal/_Set.js"); /** * Finds the set (i.e. no duplicates) of all elements in the first list not * contained in the second list. Objects and Arrays are compared in terms of * value equality, not reference equality. * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig [*] -> [*] -> [*] * @param {Array} list1 The first list. * @param {Array} list2 The second list. * @return {Array} The elements in `list1` that are not in `list2`. * @see R.differenceWith, R.symmetricDifference, R.symmetricDifferenceWith, R.without * @example * * R.difference([1,2,3,4], [7,6,5,4,3]); //=> [1,2] * R.difference([7,6,5,4,3], [1,2,3,4]); //=> [7,6,5] * R.difference([{a: 1}, {b: 2}], [{a: 1}, {c: 3}]) //=> [{b: 2}] */ var difference = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function difference(first, second) { var out = []; var idx = 0; var firstLen = first.length; var secondLen = second.length; var toFilterOut = new _internal_Set_js__WEBPACK_IMPORTED_MODULE_1__["default"](); for (var i = 0; i < secondLen; i += 1) { toFilterOut.add(second[i]); } while (idx < firstLen) { if (toFilterOut.add(first[idx])) { out[out.length] = first[idx]; } idx += 1; } return out; }); /* harmony default export */ __webpack_exports__["default"] = (difference); /***/ }), /***/ "./node_modules/ramda/es/differenceWith.js": /*!*************************************************!*\ !*** ./node_modules/ramda/es/differenceWith.js ***! \*************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_includesWith_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_includesWith.js */ "./node_modules/ramda/es/internal/_includesWith.js"); /* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Finds the set (i.e. no duplicates) of all elements in the first list not * contained in the second list. Duplication is determined according to the * value returned by applying the supplied predicate to two list elements. * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig ((a, a) -> Boolean) -> [a] -> [a] -> [a] * @param {Function} pred A predicate used to test whether two items are equal. * @param {Array} list1 The first list. * @param {Array} list2 The second list. * @return {Array} The elements in `list1` that are not in `list2`. * @see R.difference, R.symmetricDifference, R.symmetricDifferenceWith * @example * * const cmp = (x, y) => x.a === y.a; * const l1 = [{a: 1}, {a: 2}, {a: 3}]; * const l2 = [{a: 3}, {a: 4}]; * R.differenceWith(cmp, l1, l2); //=> [{a: 1}, {a: 2}] * * R.differenceWith(R.equals, [1, 2, 3, 3, 3], []); //=> [1, 2, 3] * R.differenceWith(R.equals, [1, 2, 3, 3, 3], [1]); //=> [2, 3] */ var differenceWith = /*#__PURE__*/ (0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_1__["default"])(function differenceWith(pred, first, second) { var out = []; var idx = 0; var firstLen = first.length; while (idx < firstLen) { if (!(0,_internal_includesWith_js__WEBPACK_IMPORTED_MODULE_0__["default"])(pred, first[idx], second) && !(0,_internal_includesWith_js__WEBPACK_IMPORTED_MODULE_0__["default"])(pred, first[idx], out)) { out.push(first[idx]); } idx += 1; } return out; }); /* harmony default export */ __webpack_exports__["default"] = (differenceWith); /***/ }), /***/ "./node_modules/ramda/es/dissoc.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/dissoc.js ***! \*****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _dissocPath_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./dissocPath.js */ "./node_modules/ramda/es/dissocPath.js"); /** * Returns a new object that does not contain a `prop` property. * * @func * @memberOf R * @since v0.10.0 * @category Object * @sig String -> {k: v} -> {k: v} * @param {String} prop The name of the property to dissociate * @param {Object} obj The object to clone * @return {Object} A new object equivalent to the original but without the specified property * @see R.assoc, R.omit * @example * * R.dissoc('b', {a: 1, b: 2, c: 3}); //=> {a: 1, c: 3} */ var dissoc = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function dissoc(prop, obj) { return (0,_dissocPath_js__WEBPACK_IMPORTED_MODULE_1__["default"])([prop], obj); }); /* harmony default export */ __webpack_exports__["default"] = (dissoc); /***/ }), /***/ "./node_modules/ramda/es/dissocPath.js": /*!*********************************************!*\ !*** ./node_modules/ramda/es/dissocPath.js ***! \*********************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dissoc_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dissoc.js */ "./node_modules/ramda/es/internal/_dissoc.js"); /* harmony import */ var _internal_isInteger_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_isInteger.js */ "./node_modules/ramda/es/internal/_isInteger.js"); /* harmony import */ var _internal_isArray_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_isArray.js */ "./node_modules/ramda/es/internal/_isArray.js"); /* harmony import */ var _assoc_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./assoc.js */ "./node_modules/ramda/es/assoc.js"); /** * Makes a shallow clone of an object. Note that this copies and flattens * prototype properties onto the new object as well. All non-primitive * properties are copied by reference. * * @private * @param {String|Integer} prop The prop operating * @param {Object|Array} obj The object to clone * @return {Object|Array} A new object equivalent to the original. */ function _shallowCloneObject(prop, obj) { if ((0,_internal_isInteger_js__WEBPACK_IMPORTED_MODULE_2__["default"])(prop) && (0,_internal_isArray_js__WEBPACK_IMPORTED_MODULE_3__["default"])(obj)) { return [].concat(obj); } var result = {}; for (var p in obj) { result[p] = obj[p]; } return result; } /** * Makes a shallow clone of an object, omitting the property at the given path. * Note that this copies and flattens prototype properties onto the new object * as well. All non-primitive properties are copied by reference. * * @func * @memberOf R * @since v0.11.0 * @category Object * @typedefn Idx = String | Int | Symbol * @sig [Idx] -> {k: v} -> {k: v} * @param {Array} path The path to the value to omit * @param {Object} obj The object to clone * @return {Object} A new object without the property at path * @see R.assocPath * @example * * R.dissocPath(['a', 'b', 'c'], {a: {b: {c: 42}}}); //=> {a: {b: {}}} */ var dissocPath = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function dissocPath(path, obj) { if (obj == null) { return obj; } switch (path.length) { case 0: return obj; case 1: return (0,_internal_dissoc_js__WEBPACK_IMPORTED_MODULE_1__["default"])(path[0], obj); default: var head = path[0]; var tail = Array.prototype.slice.call(path, 1); if (obj[head] == null) { return _shallowCloneObject(head, obj); } else { return (0,_assoc_js__WEBPACK_IMPORTED_MODULE_4__["default"])(head, dissocPath(tail, obj[head]), obj); } } }); /* harmony default export */ __webpack_exports__["default"] = (dissocPath); /***/ }), /***/ "./node_modules/ramda/es/divide.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/divide.js ***! \*****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Divides two numbers. Equivalent to `a / b`. * * @func * @memberOf R * @since v0.1.0 * @category Math * @sig Number -> Number -> Number * @param {Number} a The first value. * @param {Number} b The second value. * @return {Number} The result of `a / b`. * @see R.multiply * @example * * R.divide(71, 100); //=> 0.71 * * const half = R.divide(R.__, 2); * half(42); //=> 21 * * const reciprocal = R.divide(1); * reciprocal(4); //=> 0.25 */ var divide = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function divide(a, b) { return a / b; }); /* harmony default export */ __webpack_exports__["default"] = (divide); /***/ }), /***/ "./node_modules/ramda/es/drop.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/drop.js ***! \***************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable.js */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_xdrop_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xdrop.js */ "./node_modules/ramda/es/internal/_xdrop.js"); /* harmony import */ var _slice_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./slice.js */ "./node_modules/ramda/es/slice.js"); /** * Returns all but the first `n` elements of the given list, string, or * transducer/transformer (or object with a `drop` method). * * Dispatches to the `drop` method of the second argument, if present. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig Number -> [a] -> [a] * @sig Number -> String -> String * @param {Number} n * @param {*} list * @return {*} A copy of list without the first `n` elements * @see R.take, R.transduce, R.dropLast, R.dropWhile * @example * * R.drop(1, ['foo', 'bar', 'baz']); //=> ['bar', 'baz'] * R.drop(2, ['foo', 'bar', 'baz']); //=> ['baz'] * R.drop(3, ['foo', 'bar', 'baz']); //=> [] * R.drop(4, ['foo', 'bar', 'baz']); //=> [] * R.drop(3, 'ramda'); //=> 'da' */ var drop = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/ (0,_internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__["default"])(['drop'], _internal_xdrop_js__WEBPACK_IMPORTED_MODULE_2__["default"], function drop(n, xs) { return (0,_slice_js__WEBPACK_IMPORTED_MODULE_3__["default"])(Math.max(0, n), Infinity, xs); })); /* harmony default export */ __webpack_exports__["default"] = (drop); /***/ }), /***/ "./node_modules/ramda/es/dropLast.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/dropLast.js ***! \*******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable.js */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_dropLast_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_dropLast.js */ "./node_modules/ramda/es/internal/_dropLast.js"); /* harmony import */ var _internal_xdropLast_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_xdropLast.js */ "./node_modules/ramda/es/internal/_xdropLast.js"); /** * Returns a list containing all but the last `n` elements of the given `list`. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.16.0 * @category List * @sig Number -> [a] -> [a] * @sig Number -> String -> String * @param {Number} n The number of elements of `list` to skip. * @param {Array} list The list of elements to consider. * @return {Array} A copy of the list with only the first `list.length - n` elements * @see R.takeLast, R.drop, R.dropWhile, R.dropLastWhile * @example * * R.dropLast(1, ['foo', 'bar', 'baz']); //=> ['foo', 'bar'] * R.dropLast(2, ['foo', 'bar', 'baz']); //=> ['foo'] * R.dropLast(3, ['foo', 'bar', 'baz']); //=> [] * R.dropLast(4, ['foo', 'bar', 'baz']); //=> [] * R.dropLast(3, 'ramda'); //=> 'ra' */ var dropLast = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/ (0,_internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__["default"])([], _internal_xdropLast_js__WEBPACK_IMPORTED_MODULE_3__["default"], _internal_dropLast_js__WEBPACK_IMPORTED_MODULE_2__["default"])); /* harmony default export */ __webpack_exports__["default"] = (dropLast); /***/ }), /***/ "./node_modules/ramda/es/dropLastWhile.js": /*!************************************************!*\ !*** ./node_modules/ramda/es/dropLastWhile.js ***! \************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable.js */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_dropLastWhile_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_dropLastWhile.js */ "./node_modules/ramda/es/internal/_dropLastWhile.js"); /* harmony import */ var _internal_xdropLastWhile_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_xdropLastWhile.js */ "./node_modules/ramda/es/internal/_xdropLastWhile.js"); /** * Returns a new list excluding all the tailing elements of a given list which * satisfy the supplied predicate function. It passes each value from the right * to the supplied predicate function, skipping elements until the predicate * function returns a `falsy` value. The predicate function is applied to one argument: * *(value)*. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.16.0 * @category List * @sig (a -> Boolean) -> [a] -> [a] * @sig (a -> Boolean) -> String -> String * @param {Function} predicate The function to be called on each element * @param {Array} xs The collection to iterate over. * @return {Array} A new array without any trailing elements that return `falsy` values from the `predicate`. * @see R.takeLastWhile, R.addIndex, R.drop, R.dropWhile * @example * * const lteThree = x => x <= 3; * * R.dropLastWhile(lteThree, [1, 2, 3, 4, 3, 2, 1]); //=> [1, 2, 3, 4] * * R.dropLastWhile(x => x !== 'd' , 'Ramda'); //=> 'Ramd' */ var dropLastWhile = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/ (0,_internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__["default"])([], _internal_xdropLastWhile_js__WEBPACK_IMPORTED_MODULE_3__["default"], _internal_dropLastWhile_js__WEBPACK_IMPORTED_MODULE_2__["default"])); /* harmony default export */ __webpack_exports__["default"] = (dropLastWhile); /***/ }), /***/ "./node_modules/ramda/es/dropRepeats.js": /*!**********************************************!*\ !*** ./node_modules/ramda/es/dropRepeats.js ***! \**********************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable.js */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_xdropRepeatsWith_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xdropRepeatsWith.js */ "./node_modules/ramda/es/internal/_xdropRepeatsWith.js"); /* harmony import */ var _dropRepeatsWith_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./dropRepeatsWith.js */ "./node_modules/ramda/es/dropRepeatsWith.js"); /* harmony import */ var _equals_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./equals.js */ "./node_modules/ramda/es/equals.js"); /** * Returns a new list without any consecutively repeating elements. * [`R.equals`](#equals) is used to determine equality. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.14.0 * @category List * @sig [a] -> [a] * @param {Array} list The array to consider. * @return {Array} `list` without repeating elements. * @see R.transduce * @example * * R.dropRepeats([1, 1, 1, 2, 3, 4, 4, 2, 2]); //=> [1, 2, 3, 4, 2] */ var dropRepeats = /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/ (0,_internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__["default"])([], function () { return (0,_internal_xdropRepeatsWith_js__WEBPACK_IMPORTED_MODULE_2__["default"])(_equals_js__WEBPACK_IMPORTED_MODULE_4__["default"]); }, /*#__PURE__*/ (0,_dropRepeatsWith_js__WEBPACK_IMPORTED_MODULE_3__["default"])(_equals_js__WEBPACK_IMPORTED_MODULE_4__["default"]))); /* harmony default export */ __webpack_exports__["default"] = (dropRepeats); /***/ }), /***/ "./node_modules/ramda/es/dropRepeatsBy.js": /*!************************************************!*\ !*** ./node_modules/ramda/es/dropRepeatsBy.js ***! \************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable.js */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_xdropRepeatsWith_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xdropRepeatsWith.js */ "./node_modules/ramda/es/internal/_xdropRepeatsWith.js"); /* harmony import */ var _dropRepeatsWith_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./dropRepeatsWith.js */ "./node_modules/ramda/es/dropRepeatsWith.js"); /* harmony import */ var _eqBy_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./eqBy.js */ "./node_modules/ramda/es/eqBy.js"); /** * Returns a new list without any consecutively repeating elements, * based upon the value returned by applying the supplied function to * each list element. [`R.equals`](#equals) is used to determine equality. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.29.0 * @category List * @sig (a -> b) -> [a] -> [a] * @param {Function} fn A function used to produce a value to use during comparisons. * @param {Array} list The array to consider. * @return {Array} `list` without repeating elements. * @see R.transduce * @example * * R.dropRepeatsBy(Math.abs, [1, -1, -1, 2, 3, -4, 4, 2, 2]); //=> [1, 2, 3, -4, 2] */ var dropRepeatsBy = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function (fn, list) { return (0,_internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__["default"])([], function () { return (0,_internal_xdropRepeatsWith_js__WEBPACK_IMPORTED_MODULE_2__["default"])((0,_eqBy_js__WEBPACK_IMPORTED_MODULE_4__["default"])(fn)); }, (0,_dropRepeatsWith_js__WEBPACK_IMPORTED_MODULE_3__["default"])((0,_eqBy_js__WEBPACK_IMPORTED_MODULE_4__["default"])(fn)))(list); }); /* harmony default export */ __webpack_exports__["default"] = (dropRepeatsBy); /***/ }), /***/ "./node_modules/ramda/es/dropRepeatsWith.js": /*!**************************************************!*\ !*** ./node_modules/ramda/es/dropRepeatsWith.js ***! \**************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable.js */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_xdropRepeatsWith_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xdropRepeatsWith.js */ "./node_modules/ramda/es/internal/_xdropRepeatsWith.js"); /* harmony import */ var _last_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./last.js */ "./node_modules/ramda/es/last.js"); /** * Returns a new list without any consecutively repeating elements. Equality is * determined by applying the supplied predicate to each pair of consecutive elements. The * first element in a series of equal elements will be preserved. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.14.0 * @category List * @sig ((a, a) -> Boolean) -> [a] -> [a] * @param {Function} pred A predicate used to test whether two items are equal. * @param {Array} list The array to consider. * @return {Array} `list` without repeating elements. * @see R.transduce * @example * * const l = [1, -1, 1, 3, 4, -4, -4, -5, 5, 3, 3]; * R.dropRepeatsWith(R.eqBy(Math.abs), l); //=> [1, 3, 4, -5, 3] */ var dropRepeatsWith = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/ (0,_internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__["default"])([], _internal_xdropRepeatsWith_js__WEBPACK_IMPORTED_MODULE_2__["default"], function dropRepeatsWith(pred, list) { var result = []; var idx = 1; var len = list.length; if (len !== 0) { result[0] = list[0]; while (idx < len) { if (!pred((0,_last_js__WEBPACK_IMPORTED_MODULE_3__["default"])(result), list[idx])) { result[result.length] = list[idx]; } idx += 1; } } return result; })); /* harmony default export */ __webpack_exports__["default"] = (dropRepeatsWith); /***/ }), /***/ "./node_modules/ramda/es/dropWhile.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/dropWhile.js ***! \********************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable.js */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_xdropWhile_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xdropWhile.js */ "./node_modules/ramda/es/internal/_xdropWhile.js"); /* harmony import */ var _slice_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./slice.js */ "./node_modules/ramda/es/slice.js"); /** * Returns a new list excluding the leading elements of a given list which * satisfy the supplied predicate function. It passes each value to the supplied * predicate function, skipping elements while the predicate function returns * `true`. The predicate function is applied to one argument: *(value)*. * * Dispatches to the `dropWhile` method of the second argument, if present. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.9.0 * @category List * @sig (a -> Boolean) -> [a] -> [a] * @sig (a -> Boolean) -> String -> String * @param {Function} fn The function called per iteration. * @param {Array} xs The collection to iterate over. * @return {Array} A new array. * @see R.takeWhile, R.transduce, R.addIndex * @example * * const lteTwo = x => x <= 2; * * R.dropWhile(lteTwo, [1, 2, 3, 4, 3, 2, 1]); //=> [3, 4, 3, 2, 1] * * R.dropWhile(x => x !== 'd' , 'Ramda'); //=> 'da' */ var dropWhile = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/ (0,_internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__["default"])(['dropWhile'], _internal_xdropWhile_js__WEBPACK_IMPORTED_MODULE_2__["default"], function dropWhile(pred, xs) { var idx = 0; var len = xs.length; while (idx < len && pred(xs[idx])) { idx += 1; } return (0,_slice_js__WEBPACK_IMPORTED_MODULE_3__["default"])(idx, Infinity, xs); })); /* harmony default export */ __webpack_exports__["default"] = (dropWhile); /***/ }), /***/ "./node_modules/ramda/es/either.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/either.js ***! \*****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_isFunction_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isFunction.js */ "./node_modules/ramda/es/internal/_isFunction.js"); /* harmony import */ var _lift_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lift.js */ "./node_modules/ramda/es/lift.js"); /* harmony import */ var _or_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./or.js */ "./node_modules/ramda/es/or.js"); /** * A function wrapping calls to the two functions in an `||` operation, * returning the result of the first function if it is truth-y and the result * of the second function otherwise. Note that this is short-circuited, * meaning that the second function will not be invoked if the first returns a * truth-y value. * * In addition to functions, `R.either` also accepts any fantasy-land compatible * applicative functor. * * @func * @memberOf R * @since v0.12.0 * @category Logic * @sig (*... -> Boolean) -> (*... -> Boolean) -> (*... -> Boolean) * @param {Function} f a predicate * @param {Function} g another predicate * @return {Function} a function that applies its arguments to `f` and `g` and `||`s their outputs together. * @see R.both, R.anyPass, R.or * @example * * const gt10 = x => x > 10; * const even = x => x % 2 === 0; * const f = R.either(gt10, even); * f(101); //=> true * f(8); //=> true * * R.either(Maybe.Just(false), Maybe.Just(55)); // => Maybe.Just(55) * R.either([false, false, 'a'], [11]) // => [11, 11, "a"] */ var either = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function either(f, g) { return (0,_internal_isFunction_js__WEBPACK_IMPORTED_MODULE_1__["default"])(f) ? function _either() { return f.apply(this, arguments) || g.apply(this, arguments); } : (0,_lift_js__WEBPACK_IMPORTED_MODULE_2__["default"])(_or_js__WEBPACK_IMPORTED_MODULE_3__["default"])(f, g); }); /* harmony default export */ __webpack_exports__["default"] = (either); /***/ }), /***/ "./node_modules/ramda/es/empty.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/empty.js ***! \****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _internal_isArguments_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isArguments.js */ "./node_modules/ramda/es/internal/_isArguments.js"); /* harmony import */ var _internal_isArray_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_isArray.js */ "./node_modules/ramda/es/internal/_isArray.js"); /* harmony import */ var _internal_isObject_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_isObject.js */ "./node_modules/ramda/es/internal/_isObject.js"); /* harmony import */ var _internal_isString_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./internal/_isString.js */ "./node_modules/ramda/es/internal/_isString.js"); /* harmony import */ var _internal_isTypedArray_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./internal/_isTypedArray.js */ "./node_modules/ramda/es/internal/_isTypedArray.js"); /** * Returns the empty value of its argument's type. Ramda defines the empty * value of Array (`[]`), Object (`{}`), String (`''`), * TypedArray (`Uint8Array []`, `Float32Array []`, etc), and Arguments. Other * types are supported if they define `.empty`, * `.prototype.empty` or implement the * [FantasyLand Monoid spec](https://github.com/fantasyland/fantasy-land#monoid). * * Dispatches to the `empty` method of the first argument, if present. * * @func * @memberOf R * @since v0.3.0 * @category Function * @sig a -> a * @param {*} x * @return {*} * @example * * R.empty(Just(42)); //=> Nothing() * R.empty([1, 2, 3]); //=> [] * R.empty('unicorns'); //=> '' * R.empty({x: 1, y: 2}); //=> {} * R.empty(Uint8Array.from('123')); //=> Uint8Array [] */ var empty = /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function empty(x) { return x != null && typeof x['fantasy-land/empty'] === 'function' ? x['fantasy-land/empty']() : x != null && x.constructor != null && typeof x.constructor['fantasy-land/empty'] === 'function' ? x.constructor['fantasy-land/empty']() : x != null && typeof x.empty === 'function' ? x.empty() : x != null && x.constructor != null && typeof x.constructor.empty === 'function' ? x.constructor.empty() : (0,_internal_isArray_js__WEBPACK_IMPORTED_MODULE_2__["default"])(x) ? [] : (0,_internal_isString_js__WEBPACK_IMPORTED_MODULE_4__["default"])(x) ? '' : (0,_internal_isObject_js__WEBPACK_IMPORTED_MODULE_3__["default"])(x) ? {} : (0,_internal_isArguments_js__WEBPACK_IMPORTED_MODULE_1__["default"])(x) ? function () { return arguments; }() : (0,_internal_isTypedArray_js__WEBPACK_IMPORTED_MODULE_5__["default"])(x) ? x.constructor.from('') : void 0 // else ; }); /* harmony default export */ __webpack_exports__["default"] = (empty); /***/ }), /***/ "./node_modules/ramda/es/endsWith.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/endsWith.js ***! \*******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _equals_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./equals.js */ "./node_modules/ramda/es/equals.js"); /* harmony import */ var _takeLast_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./takeLast.js */ "./node_modules/ramda/es/takeLast.js"); /** * Checks if a list ends with the provided sublist. * * Similarly, checks if a string ends with the provided substring. * * @func * @memberOf R * @since v0.24.0 * @category List * @sig [a] -> [a] -> Boolean * @sig String -> String -> Boolean * @param {*} suffix * @param {*} list * @return {Boolean} * @see R.startsWith * @example * * R.endsWith('c', 'abc') //=> true * R.endsWith('b', 'abc') //=> false * R.endsWith(['c'], ['a', 'b', 'c']) //=> true * R.endsWith(['b'], ['a', 'b', 'c']) //=> false */ var endsWith = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function (suffix, list) { return (0,_equals_js__WEBPACK_IMPORTED_MODULE_1__["default"])((0,_takeLast_js__WEBPACK_IMPORTED_MODULE_2__["default"])(suffix.length, list), suffix); }); /* harmony default export */ __webpack_exports__["default"] = (endsWith); /***/ }), /***/ "./node_modules/ramda/es/eqBy.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/eqBy.js ***! \***************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _equals_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./equals.js */ "./node_modules/ramda/es/equals.js"); /** * Takes a function and two values in its domain and returns `true` if the * values map to the same value in the codomain; `false` otherwise. * * @func * @memberOf R * @since v0.18.0 * @category Relation * @sig (a -> b) -> a -> a -> Boolean * @param {Function} f * @param {*} x * @param {*} y * @return {Boolean} * @example * * R.eqBy(Math.abs, 5, -5); //=> true */ var eqBy = /*#__PURE__*/ (0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function eqBy(f, x, y) { return (0,_equals_js__WEBPACK_IMPORTED_MODULE_1__["default"])(f(x), f(y)); }); /* harmony default export */ __webpack_exports__["default"] = (eqBy); /***/ }), /***/ "./node_modules/ramda/es/eqProps.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/eqProps.js ***! \******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _equals_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./equals.js */ "./node_modules/ramda/es/equals.js"); /** * Reports whether two objects have the same value, in [`R.equals`](#equals) * terms, for the specified property. Useful as a curried predicate. * * @func * @memberOf R * @since v0.1.0 * @category Object * @sig k -> {k: v} -> {k: v} -> Boolean * @param {String} prop The name of the property to compare * @param {Object} obj1 * @param {Object} obj2 * @return {Boolean} * * @example * * const o1 = { a: 1, b: 2, c: 3, d: 4 }; * const o2 = { a: 10, b: 20, c: 3, d: 40 }; * R.eqProps('a', o1, o2); //=> false * R.eqProps('c', o1, o2); //=> true */ var eqProps = /*#__PURE__*/ (0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function eqProps(prop, obj1, obj2) { return (0,_equals_js__WEBPACK_IMPORTED_MODULE_1__["default"])(obj1[prop], obj2[prop]); }); /* harmony default export */ __webpack_exports__["default"] = (eqProps); /***/ }), /***/ "./node_modules/ramda/es/equals.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/equals.js ***! \*****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_equals_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_equals.js */ "./node_modules/ramda/es/internal/_equals.js"); /** * Returns `true` if its arguments are equivalent, `false` otherwise. Handles * cyclical data structures. * * Dispatches symmetrically to the `equals` methods of both arguments, if * present. * * @func * @memberOf R * @since v0.15.0 * @category Relation * @sig a -> b -> Boolean * @param {*} a * @param {*} b * @return {Boolean} * @example * * R.equals(1, 1); //=> true * R.equals(1, '1'); //=> false * R.equals([1, 2, 3], [1, 2, 3]); //=> true * * const a = {}; a.v = a; * const b = {}; b.v = b; * R.equals(a, b); //=> true */ var equals = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function equals(a, b) { return (0,_internal_equals_js__WEBPACK_IMPORTED_MODULE_1__["default"])(a, b, [], []); }); /* harmony default export */ __webpack_exports__["default"] = (equals); /***/ }), /***/ "./node_modules/ramda/es/evolve.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/evolve.js ***! \*****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_isArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isArray.js */ "./node_modules/ramda/es/internal/_isArray.js"); /* harmony import */ var _internal_isObject_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_isObject.js */ "./node_modules/ramda/es/internal/_isObject.js"); /** * Creates a new object by recursively evolving a shallow copy of `object`, * according to the `transformation` functions. All non-primitive properties * are copied by reference. * * A `transformation` function will not be invoked if its corresponding key * does not exist in the evolved object. * * @func * @memberOf R * @since v0.9.0 * @category Object * @sig {k: (v -> v)} -> {k: v} -> {k: v} * @param {Object} transformations The object specifying transformation functions to apply * to the object. * @param {Object} object The object to be transformed. * @return {Object} The transformed object. * @example * * const tomato = {firstName: ' Tomato ', data: {elapsed: 100, remaining: 1400}, id:123}; * const transformations = { * firstName: R.trim, * lastName: R.trim, // Will not get invoked. * data: {elapsed: R.add(1), remaining: R.add(-1)} * }; * R.evolve(transformations, tomato); //=> {firstName: 'Tomato', data: {elapsed: 101, remaining: 1399}, id:123} */ var evolve = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function evolve(transformations, object) { if (!(0,_internal_isObject_js__WEBPACK_IMPORTED_MODULE_2__["default"])(object) && !(0,_internal_isArray_js__WEBPACK_IMPORTED_MODULE_1__["default"])(object)) { return object; } var result = object instanceof Array ? [] : {}; var transformation, key, type; for (key in object) { transformation = transformations[key]; type = typeof transformation; result[key] = type === 'function' ? transformation(object[key]) : transformation && type === 'object' ? evolve(transformation, object[key]) : object[key]; } return result; }); /* harmony default export */ __webpack_exports__["default"] = (evolve); /***/ }), /***/ "./node_modules/ramda/es/filter.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/filter.js ***! \*****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_arrayReduce_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_arrayReduce.js */ "./node_modules/ramda/es/internal/_arrayReduce.js"); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_dispatchable.js */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_filter_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_filter.js */ "./node_modules/ramda/es/internal/_filter.js"); /* harmony import */ var _internal_isObject_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./internal/_isObject.js */ "./node_modules/ramda/es/internal/_isObject.js"); /* harmony import */ var _internal_xfilter_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./internal/_xfilter.js */ "./node_modules/ramda/es/internal/_xfilter.js"); /* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./keys.js */ "./node_modules/ramda/es/keys.js"); /** * Takes a predicate and a `Filterable`, and returns a new filterable of the * same type containing the members of the given filterable which satisfy the * given predicate. Filterable objects include plain objects or any object * that has a filter method such as `Array`. * * Dispatches to the `filter` method of the second argument, if present. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.1.0 * @category List * @category Object * @sig Filterable f => (a -> Boolean) -> f a -> f a * @param {Function} pred * @param {Array} filterable * @return {Array} Filterable * @see R.reject, R.transduce, R.addIndex * @example * * const isEven = n => n % 2 === 0; * * R.filter(isEven, [1, 2, 3, 4]); //=> [2, 4] * * R.filter(isEven, {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, d: 4} */ var filter = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/ (0,_internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_2__["default"])(['fantasy-land/filter', 'filter'], _internal_xfilter_js__WEBPACK_IMPORTED_MODULE_5__["default"], function (pred, filterable) { return (0,_internal_isObject_js__WEBPACK_IMPORTED_MODULE_4__["default"])(filterable) ? (0,_internal_arrayReduce_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function (acc, key) { if (pred(filterable[key])) { acc[key] = filterable[key]; } return acc; }, {}, (0,_keys_js__WEBPACK_IMPORTED_MODULE_6__["default"])(filterable)) : // else (0,_internal_filter_js__WEBPACK_IMPORTED_MODULE_3__["default"])(pred, filterable); })); /* harmony default export */ __webpack_exports__["default"] = (filter); /***/ }), /***/ "./node_modules/ramda/es/find.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/find.js ***! \***************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable.js */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_xfind_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xfind.js */ "./node_modules/ramda/es/internal/_xfind.js"); /** * Returns the first element of the list which matches the predicate, or * `undefined` if no element matches. * * Dispatches to the `find` method of the second argument, if present. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig (a -> Boolean) -> [a] -> a | undefined * @param {Function} fn The predicate function used to determine if the element is the * desired one. * @param {Array} list The array to consider. * @return {Object} The element found, or `undefined`. * @see R.transduce * @example * * const xs = [{a: 1}, {a: 2}, {a: 3}]; * R.find(R.propEq('a', 2))(xs); //=> {a: 2} * R.find(R.propEq('a', 4))(xs); //=> undefined */ var find = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/ (0,_internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__["default"])(['find'], _internal_xfind_js__WEBPACK_IMPORTED_MODULE_2__["default"], function find(fn, list) { var idx = 0; var len = list.length; while (idx < len) { if (fn(list[idx])) { return list[idx]; } idx += 1; } })); /* harmony default export */ __webpack_exports__["default"] = (find); /***/ }), /***/ "./node_modules/ramda/es/findIndex.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/findIndex.js ***! \********************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable.js */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_xfindIndex_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xfindIndex.js */ "./node_modules/ramda/es/internal/_xfindIndex.js"); /** * Returns the index of the first element of the list which matches the * predicate, or `-1` if no element matches. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.1.1 * @category List * @sig (a -> Boolean) -> [a] -> Number * @param {Function} fn The predicate function used to determine if the element is the * desired one. * @param {Array} list The array to consider. * @return {Number} The index of the element found, or `-1`. * @see R.transduce, R.indexOf * @example * * const xs = [{a: 1}, {a: 2}, {a: 3}]; * R.findIndex(R.propEq('a', 2))(xs); //=> 1 * R.findIndex(R.propEq('a', 4))(xs); //=> -1 */ var findIndex = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/ (0,_internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__["default"])([], _internal_xfindIndex_js__WEBPACK_IMPORTED_MODULE_2__["default"], function findIndex(fn, list) { var idx = 0; var len = list.length; while (idx < len) { if (fn(list[idx])) { return idx; } idx += 1; } return -1; })); /* harmony default export */ __webpack_exports__["default"] = (findIndex); /***/ }), /***/ "./node_modules/ramda/es/findLast.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/findLast.js ***! \*******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable.js */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_xfindLast_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xfindLast.js */ "./node_modules/ramda/es/internal/_xfindLast.js"); /** * Returns the last element of the list which matches the predicate, or * `undefined` if no element matches. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.1.1 * @category List * @sig (a -> Boolean) -> [a] -> a | undefined * @param {Function} fn The predicate function used to determine if the element is the * desired one. * @param {Array} list The array to consider. * @return {Object} The element found, or `undefined`. * @see R.transduce * @example * * const xs = [{a: 1, b: 0}, {a:1, b: 1}]; * R.findLast(R.propEq('a', 1))(xs); //=> {a: 1, b: 1} * R.findLast(R.propEq('a', 4))(xs); //=> undefined */ var findLast = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/ (0,_internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__["default"])([], _internal_xfindLast_js__WEBPACK_IMPORTED_MODULE_2__["default"], function findLast(fn, list) { var idx = list.length - 1; while (idx >= 0) { if (fn(list[idx])) { return list[idx]; } idx -= 1; } })); /* harmony default export */ __webpack_exports__["default"] = (findLast); /***/ }), /***/ "./node_modules/ramda/es/findLastIndex.js": /*!************************************************!*\ !*** ./node_modules/ramda/es/findLastIndex.js ***! \************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable.js */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_xfindLastIndex_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xfindLastIndex.js */ "./node_modules/ramda/es/internal/_xfindLastIndex.js"); /** * Returns the index of the last element of the list which matches the * predicate, or `-1` if no element matches. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.1.1 * @category List * @sig (a -> Boolean) -> [a] -> Number * @param {Function} fn The predicate function used to determine if the element is the * desired one. * @param {Array} list The array to consider. * @return {Number} The index of the element found, or `-1`. * @see R.transduce, R.lastIndexOf * @example * * const xs = [{a: 1, b: 0}, {a:1, b: 1}]; * R.findLastIndex(R.propEq('a', 1))(xs); //=> 1 * R.findLastIndex(R.propEq('a', 4))(xs); //=> -1 */ var findLastIndex = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/ (0,_internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__["default"])([], _internal_xfindLastIndex_js__WEBPACK_IMPORTED_MODULE_2__["default"], function findLastIndex(fn, list) { var idx = list.length - 1; while (idx >= 0) { if (fn(list[idx])) { return idx; } idx -= 1; } return -1; })); /* harmony default export */ __webpack_exports__["default"] = (findLastIndex); /***/ }), /***/ "./node_modules/ramda/es/flatten.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/flatten.js ***! \******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _internal_makeFlat_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_makeFlat.js */ "./node_modules/ramda/es/internal/_makeFlat.js"); /** * Returns a new list by pulling every item out of it (and all its sub-arrays) * and putting them in a new array, depth-first. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig [a] -> [b] * @param {Array} list The array to consider. * @return {Array} The flattened list. * @see R.unnest * @example * * R.flatten([1, 2, [3, 4], 5, [6, [7, 8, [9, [10, 11], 12]]]]); * //=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] */ var flatten = /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/ (0,_internal_makeFlat_js__WEBPACK_IMPORTED_MODULE_1__["default"])(true)); /* harmony default export */ __webpack_exports__["default"] = (flatten); /***/ }), /***/ "./node_modules/ramda/es/flip.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/flip.js ***! \***************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _curryN_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./curryN.js */ "./node_modules/ramda/es/curryN.js"); /** * Returns a new function much like the supplied one, except that the first two * arguments' order is reversed. * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig ((a, b, c, ...) -> z) -> (b -> a -> c -> ... -> z) * @param {Function} fn The function to invoke with its first two parameters reversed. * @return {*} The result of invoking `fn` with its first two parameters' order reversed. * @example * * const mergeThree = (a, b, c) => [].concat(a, b, c); * * mergeThree(1, 2, 3); //=> [1, 2, 3] * * R.flip(mergeThree)(1, 2, 3); //=> [2, 1, 3] * @symb R.flip(f)(a, b, c) = f(b, a, c) */ var flip = /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function flip(fn) { return (0,_curryN_js__WEBPACK_IMPORTED_MODULE_1__["default"])(fn.length, function (a, b) { var args = Array.prototype.slice.call(arguments, 0); args[0] = b; args[1] = a; return fn.apply(this, args); }); }); /* harmony default export */ __webpack_exports__["default"] = (flip); /***/ }), /***/ "./node_modules/ramda/es/forEach.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/forEach.js ***! \******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_checkForMethod_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_checkForMethod.js */ "./node_modules/ramda/es/internal/_checkForMethod.js"); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Iterate over an input `list`, calling a provided function `fn` for each * element in the list. * * `fn` receives one argument: *(value)*. * * Note: `R.forEach` does not skip deleted or unassigned indices (sparse * arrays), unlike the native `Array.prototype.forEach` method. For more * details on this behavior, see: * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach#Description * * Also note that, unlike `Array.prototype.forEach`, Ramda's `forEach` returns * the original array. In some libraries this function is named `each`. * * Dispatches to the `forEach` method of the second argument, if present. * * @func * @memberOf R * @since v0.1.1 * @category List * @sig (a -> *) -> [a] -> [a] * @param {Function} fn The function to invoke. Receives one argument, `value`. * @param {Array} list The list to iterate over. * @return {Array} The original list. * @see R.addIndex * @example * * const printXPlusFive = x => console.log(x + 5); * R.forEach(printXPlusFive, [1, 2, 3]); //=> [1, 2, 3] * // logs 6 * // logs 7 * // logs 8 * @symb R.forEach(f, [a, b, c]) = [a, b, c] */ var forEach = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/ (0,_internal_checkForMethod_js__WEBPACK_IMPORTED_MODULE_0__["default"])('forEach', function forEach(fn, list) { var len = list.length; var idx = 0; while (idx < len) { fn(list[idx]); idx += 1; } return list; })); /* harmony default export */ __webpack_exports__["default"] = (forEach); /***/ }), /***/ "./node_modules/ramda/es/forEachObjIndexed.js": /*!****************************************************!*\ !*** ./node_modules/ramda/es/forEachObjIndexed.js ***! \****************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./keys.js */ "./node_modules/ramda/es/keys.js"); /** * Iterate over an input `object`, calling a provided function `fn` for each * key and value in the object. * * `fn` receives three argument: *(value, key, obj)*. * * @func * @memberOf R * @since v0.23.0 * @category Object * @sig ((a, String, StrMap a) -> Any) -> StrMap a -> StrMap a * @param {Function} fn The function to invoke. Receives three argument, `value`, `key`, `obj`. * @param {Object} obj The object to iterate over. * @return {Object} The original object. * @example * * const printKeyConcatValue = (value, key) => console.log(key + ':' + value); * R.forEachObjIndexed(printKeyConcatValue, {x: 1, y: 2}); //=> {x: 1, y: 2} * // logs x:1 * // logs y:2 * @symb R.forEachObjIndexed(f, {x: a, y: b}) = {x: a, y: b} */ var forEachObjIndexed = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function forEachObjIndexed(fn, obj) { var keyList = (0,_keys_js__WEBPACK_IMPORTED_MODULE_1__["default"])(obj); var idx = 0; while (idx < keyList.length) { var key = keyList[idx]; fn(obj[key], key, obj); idx += 1; } return obj; }); /* harmony default export */ __webpack_exports__["default"] = (forEachObjIndexed); /***/ }), /***/ "./node_modules/ramda/es/fromPairs.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/fromPairs.js ***! \********************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /** * Creates a new object from a list key-value pairs. If a key appears in * multiple pairs, the rightmost pair is included in the object. * * @func * @memberOf R * @since v0.3.0 * @category List * @sig [[k,v]] -> {k: v} * @param {Array} pairs An array of two-element arrays that will be the keys and values of the output object. * @return {Object} The object made by pairing up `keys` and `values`. * @see R.toPairs, R.pair * @example * * R.fromPairs([['a', 1], ['b', 2], ['c', 3]]); //=> {a: 1, b: 2, c: 3} */ var fromPairs = /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function fromPairs(pairs) { var result = {}; var idx = 0; while (idx < pairs.length) { result[pairs[idx][0]] = pairs[idx][1]; idx += 1; } return result; }); /* harmony default export */ __webpack_exports__["default"] = (fromPairs); /***/ }), /***/ "./node_modules/ramda/es/groupBy.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/groupBy.js ***! \******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_checkForMethod_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_checkForMethod.js */ "./node_modules/ramda/es/internal/_checkForMethod.js"); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _reduceBy_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reduceBy.js */ "./node_modules/ramda/es/reduceBy.js"); /** * Splits a list into sub-lists stored in an object, based on the result of * calling a key-returning function on each element, and grouping the * results according to values returned. * * Dispatches to the `groupBy` method of the second argument, if present. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.1.0 * @category List * @typedefn Idx = String | Int | Symbol * @sig Idx a => (b -> a) -> [b] -> {a: [b]} * @param {Function} fn Function :: a -> Idx * @param {Array} list The array to group * @return {Object} An object with the output of `fn` for keys, mapped to arrays of elements * that produced that key when passed to `fn`. * @see R.reduceBy, R.transduce, R.indexBy, R.collectBy * @example * * const byGrade = R.groupBy(function(student) { * const score = student.score; * return score < 65 ? 'F' : * score < 70 ? 'D' : * score < 80 ? 'C' : * score < 90 ? 'B' : 'A'; * }); * const students = [{name: 'Abby', score: 84}, * {name: 'Eddy', score: 58}, * // ... * {name: 'Jack', score: 69}]; * byGrade(students); * // { * // 'A': [{name: 'Dianne', score: 99}], * // 'B': [{name: 'Abby', score: 84}] * // // ..., * // 'F': [{name: 'Eddy', score: 58}] * // } */ var groupBy = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/ (0,_internal_checkForMethod_js__WEBPACK_IMPORTED_MODULE_0__["default"])('groupBy', /*#__PURE__*/ (0,_reduceBy_js__WEBPACK_IMPORTED_MODULE_2__["default"])(function (acc, item) { acc.push(item); return acc; }, []))); /* harmony default export */ __webpack_exports__["default"] = (groupBy); /***/ }), /***/ "./node_modules/ramda/es/groupWith.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/groupWith.js ***! \********************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Takes a list and returns a list of lists where each sublist's elements are * all satisfied pairwise comparison according to the provided function. * Only adjacent elements are passed to the comparison function. * * @func * @memberOf R * @since v0.21.0 * @category List * @sig ((a, a) → Boolean) → [a] → [[a]] * @param {Function} fn Function for determining whether two given (adjacent) * elements should be in the same group * @param {Array} list The array to group. Also accepts a string, which will be * treated as a list of characters. * @return {List} A list that contains sublists of elements, * whose concatenations are equal to the original list. * @example * * R.groupWith(R.equals, [0, 1, 1, 2, 3, 5, 8, 13, 21]) * //=> [[0], [1, 1], [2], [3], [5], [8], [13], [21]] * * R.groupWith((a, b) => a + 1 === b, [0, 1, 1, 2, 3, 5, 8, 13, 21]) * //=> [[0, 1], [1, 2, 3], [5], [8], [13], [21]] * * R.groupWith((a, b) => a % 2 === b % 2, [0, 1, 1, 2, 3, 5, 8, 13, 21]) * //=> [[0], [1, 1], [2], [3, 5], [8], [13, 21]] * * const isVowel = R.test(/^[aeiou]$/i); * R.groupWith(R.eqBy(isVowel), 'aestiou') * //=> ['ae', 'st', 'iou'] */ var groupWith = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function (fn, list) { var res = []; var idx = 0; var len = list.length; while (idx < len) { var nextidx = idx + 1; while (nextidx < len && fn(list[nextidx - 1], list[nextidx])) { nextidx += 1; } res.push(list.slice(idx, nextidx)); idx = nextidx; } return res; }); /* harmony default export */ __webpack_exports__["default"] = (groupWith); /***/ }), /***/ "./node_modules/ramda/es/gt.js": /*!*************************************!*\ !*** ./node_modules/ramda/es/gt.js ***! \*************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns `true` if the first argument is greater than the second; `false` * otherwise. * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig Ord a => a -> a -> Boolean * @param {*} a * @param {*} b * @return {Boolean} * @see R.lt * @example * * R.gt(2, 1); //=> true * R.gt(2, 2); //=> false * R.gt(2, 3); //=> false * R.gt('a', 'z'); //=> false * R.gt('z', 'a'); //=> true */ var gt = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function gt(a, b) { return a > b; }); /* harmony default export */ __webpack_exports__["default"] = (gt); /***/ }), /***/ "./node_modules/ramda/es/gte.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/gte.js ***! \**************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns `true` if the first argument is greater than or equal to the second; * `false` otherwise. * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig Ord a => a -> a -> Boolean * @param {Number} a * @param {Number} b * @return {Boolean} * @see R.lte * @example * * R.gte(2, 1); //=> true * R.gte(2, 2); //=> true * R.gte(2, 3); //=> false * R.gte('a', 'z'); //=> false * R.gte('z', 'a'); //=> true */ var gte = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function gte(a, b) { return a >= b; }); /* harmony default export */ __webpack_exports__["default"] = (gte); /***/ }), /***/ "./node_modules/ramda/es/has.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/has.js ***! \**************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _hasPath_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./hasPath.js */ "./node_modules/ramda/es/hasPath.js"); /** * Returns whether or not an object has an own property with the specified name * * @func * @memberOf R * @since v0.7.0 * @category Object * @sig s -> {s: x} -> Boolean * @param {String} prop The name of the property to check for. * @param {Object} obj The object to query. * @return {Boolean} Whether the property exists. * @example * * const hasName = R.has('name'); * hasName({name: 'alice'}); //=> true * hasName({name: 'bob'}); //=> true * hasName({}); //=> false * * const point = {x: 0, y: 0}; * const pointHas = R.has(R.__, point); * pointHas('x'); //=> true * pointHas('y'); //=> true * pointHas('z'); //=> false */ var has = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function has(prop, obj) { return (0,_hasPath_js__WEBPACK_IMPORTED_MODULE_1__["default"])([prop], obj); }); /* harmony default export */ __webpack_exports__["default"] = (has); /***/ }), /***/ "./node_modules/ramda/es/hasIn.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/hasIn.js ***! \****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _isNil_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./isNil.js */ "./node_modules/ramda/es/isNil.js"); /** * Returns whether or not an object or its prototype chain has a property with * the specified name * * @func * @memberOf R * @since v0.7.0 * @category Object * @sig s -> {s: x} -> Boolean * @param {String} prop The name of the property to check for. * @param {Object} obj The object to query. * @return {Boolean} Whether the property exists. * @example * * function Rectangle(width, height) { * this.width = width; * this.height = height; * } * Rectangle.prototype.area = function() { * return this.width * this.height; * }; * * const square = new Rectangle(2, 2); * R.hasIn('width', square); //=> true * R.hasIn('area', square); //=> true */ var hasIn = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function hasIn(prop, obj) { if ((0,_isNil_js__WEBPACK_IMPORTED_MODULE_1__["default"])(obj)) { return false; } return prop in obj; }); /* harmony default export */ __webpack_exports__["default"] = (hasIn); /***/ }), /***/ "./node_modules/ramda/es/hasPath.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/hasPath.js ***! \******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_has_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_has.js */ "./node_modules/ramda/es/internal/_has.js"); /* harmony import */ var _isNil_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./isNil.js */ "./node_modules/ramda/es/isNil.js"); /** * Returns whether or not a path exists in an object. Only the object's * own properties are checked. * * @func * @memberOf R * @since v0.26.0 * @category Object * @typedefn Idx = String | Int | Symbol * @sig [Idx] -> {a} -> Boolean * @param {Array} path The path to use. * @param {Object} obj The object to check the path in. * @return {Boolean} Whether the path exists. * @see R.has * @example * * R.hasPath(['a', 'b'], {a: {b: 2}}); // => true * R.hasPath(['a', 'b'], {a: {b: undefined}}); // => true * R.hasPath(['a', 'b'], {a: {c: 2}}); // => false * R.hasPath(['a', 'b'], {}); // => false */ var hasPath = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function hasPath(_path, obj) { if (_path.length === 0 || (0,_isNil_js__WEBPACK_IMPORTED_MODULE_2__["default"])(obj)) { return false; } var val = obj; var idx = 0; while (idx < _path.length) { if (!(0,_isNil_js__WEBPACK_IMPORTED_MODULE_2__["default"])(val) && (0,_internal_has_js__WEBPACK_IMPORTED_MODULE_1__["default"])(_path[idx], val)) { val = val[_path[idx]]; idx += 1; } else { return false; } } return true; }); /* harmony default export */ __webpack_exports__["default"] = (hasPath); /***/ }), /***/ "./node_modules/ramda/es/head.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/head.js ***! \***************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _nth_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./nth.js */ "./node_modules/ramda/es/nth.js"); /** * Returns the first element of the given list or string. In some libraries * this function is named `first`. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig [a] -> a | Undefined * @sig String -> String * @param {Array|String} list * @return {*} * @see R.tail, R.init, R.last * @example * * R.head(['fi', 'fo', 'fum']); //=> 'fi' * R.head([]); //=> undefined * * R.head('abc'); //=> 'a' * R.head(''); //=> '' */ var head = /*#__PURE__*/ (0,_nth_js__WEBPACK_IMPORTED_MODULE_0__["default"])(0); /* harmony default export */ __webpack_exports__["default"] = (head); /***/ }), /***/ "./node_modules/ramda/es/identical.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/identical.js ***! \********************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_objectIs_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_objectIs.js */ "./node_modules/ramda/es/internal/_objectIs.js"); /** * Returns true if its arguments are identical, false otherwise. Values are * identical if they reference the same memory. `NaN` is identical to `NaN`; * `0` and `-0` are not identical. * * Note this is merely a curried version of ES6 `Object.is`. * * `identical` does not support the `__` placeholder. * * @func * @memberOf R * @since v0.15.0 * @category Relation * @sig a -> a -> Boolean * @param {*} a * @param {*} b * @return {Boolean} * @example * * const o = {}; * R.identical(o, o); //=> true * R.identical(1, 1); //=> true * R.identical(1, '1'); //=> false * R.identical([], []); //=> false * R.identical(0, -0); //=> false * R.identical(NaN, NaN); //=> true */ var identical = function identical(a, b) { switch (arguments.length) { case 0: return identical; case 1: return function () { return function unaryIdentical(_b) { switch (arguments.length) { case 0: return unaryIdentical; default: return (0,_internal_objectIs_js__WEBPACK_IMPORTED_MODULE_0__["default"])(a, _b); } }; }(); default: return (0,_internal_objectIs_js__WEBPACK_IMPORTED_MODULE_0__["default"])(a, b); } }; // In order to support Cross-origin Window objects as arguments to identical, // it cannot be implemented as _curry2(_objectIs). // The reason is that _curry2 checks if a function argument is the placeholder __ // by accessing a paritcular property. However, across URL origins access // to most properties of Window is forbidden. /* harmony default export */ __webpack_exports__["default"] = (identical); /***/ }), /***/ "./node_modules/ramda/es/identity.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/identity.js ***! \*******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _internal_identity_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_identity.js */ "./node_modules/ramda/es/internal/_identity.js"); /** * A function that does nothing but return the parameter supplied to it. Good * as a default or placeholder function. * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig a -> a * @param {*} x The value to return. * @return {*} The input value, `x`. * @example * * R.identity(1); //=> 1 * * const obj = {}; * R.identity(obj) === obj; //=> true * @symb R.identity(a) = a */ var identity = /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])(_internal_identity_js__WEBPACK_IMPORTED_MODULE_1__["default"]); /* harmony default export */ __webpack_exports__["default"] = (identity); /***/ }), /***/ "./node_modules/ramda/es/ifElse.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/ifElse.js ***! \*****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _curryN_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./curryN.js */ "./node_modules/ramda/es/curryN.js"); /** * Creates a function that will process either the `onTrue` or the `onFalse` * function depending upon the result of the `condition` predicate. * * Note that `ifElse` takes its arity from the longest of the three functions passed to it. * * @func * @memberOf R * @since v0.8.0 * @category Logic * @sig (*... -> Boolean) -> (*... -> *) -> (*... -> *) -> (*... -> *) * @param {Function} condition A predicate function * @param {Function} onTrue A function to invoke when the `condition` evaluates to a truthy value. * @param {Function} onFalse A function to invoke when the `condition` evaluates to a falsy value. * @return {Function} A new function that will process either the `onTrue` or the `onFalse` * function depending upon the result of the `condition` predicate. * @see R.unless, R.when, R.cond * @example * * const incCount = R.ifElse( * R.has('count'), * R.over(R.lensProp('count'), R.inc), * R.assoc('count', 1) * ); * incCount({ count: 1 }); //=> { count: 2 } * incCount({}); //=> { count: 1 } */ var ifElse = /*#__PURE__*/ (0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function ifElse(condition, onTrue, onFalse) { return (0,_curryN_js__WEBPACK_IMPORTED_MODULE_1__["default"])(Math.max(condition.length, onTrue.length, onFalse.length), function _ifElse() { return condition.apply(this, arguments) ? onTrue.apply(this, arguments) : onFalse.apply(this, arguments); }); }); /* harmony default export */ __webpack_exports__["default"] = (ifElse); /***/ }), /***/ "./node_modules/ramda/es/inc.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/inc.js ***! \**************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _add_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./add.js */ "./node_modules/ramda/es/add.js"); /** * Increments its argument. * * @func * @memberOf R * @since v0.9.0 * @category Math * @sig Number -> Number * @param {Number} n * @return {Number} n + 1 * @see R.dec * @example * * R.inc(42); //=> 43 */ var inc = /*#__PURE__*/ (0,_add_js__WEBPACK_IMPORTED_MODULE_0__["default"])(1); /* harmony default export */ __webpack_exports__["default"] = (inc); /***/ }), /***/ "./node_modules/ramda/es/includes.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/includes.js ***! \*******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_includes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_includes.js */ "./node_modules/ramda/es/internal/_includes.js"); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns `true` if the specified value is equal, in [`R.equals`](#equals) * terms, to at least one element of the given list; `false` otherwise. * Also works with strings. * * @func * @memberOf R * @since v0.26.0 * @category List * @sig a -> [a] -> Boolean * @param {Object} a The item to compare against. * @param {Array} list The array to consider. * @return {Boolean} `true` if an equivalent item is in the list, `false` otherwise. * @see R.any * @example * * R.includes(3, [1, 2, 3]); //=> true * R.includes(4, [1, 2, 3]); //=> false * R.includes({ name: 'Fred' }, [{ name: 'Fred' }]); //=> true * R.includes([42], [[42]]); //=> true * R.includes('ba', 'banana'); //=>true */ var includes = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__["default"])(_internal_includes_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (includes); /***/ }), /***/ "./node_modules/ramda/es/index.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/index.js ***! \****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ F: function() { return /* reexport safe */ _F_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }, /* harmony export */ T: function() { return /* reexport safe */ _T_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }, /* harmony export */ __: function() { return /* reexport safe */ _js__WEBPACK_IMPORTED_MODULE_2__["default"]; }, /* harmony export */ add: function() { return /* reexport safe */ _add_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }, /* harmony export */ addIndex: function() { return /* reexport safe */ _addIndex_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }, /* harmony export */ addIndexRight: function() { return /* reexport safe */ _addIndexRight_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }, /* harmony export */ adjust: function() { return /* reexport safe */ _adjust_js__WEBPACK_IMPORTED_MODULE_6__["default"]; }, /* harmony export */ all: function() { return /* reexport safe */ _all_js__WEBPACK_IMPORTED_MODULE_7__["default"]; }, /* harmony export */ allPass: function() { return /* reexport safe */ _allPass_js__WEBPACK_IMPORTED_MODULE_8__["default"]; }, /* harmony export */ always: function() { return /* reexport safe */ _always_js__WEBPACK_IMPORTED_MODULE_9__["default"]; }, /* harmony export */ and: function() { return /* reexport safe */ _and_js__WEBPACK_IMPORTED_MODULE_10__["default"]; }, /* harmony export */ andThen: function() { return /* reexport safe */ _andThen_js__WEBPACK_IMPORTED_MODULE_223__["default"]; }, /* harmony export */ any: function() { return /* reexport safe */ _any_js__WEBPACK_IMPORTED_MODULE_11__["default"]; }, /* harmony export */ anyPass: function() { return /* reexport safe */ _anyPass_js__WEBPACK_IMPORTED_MODULE_12__["default"]; }, /* harmony export */ ap: function() { return /* reexport safe */ _ap_js__WEBPACK_IMPORTED_MODULE_13__["default"]; }, /* harmony export */ aperture: function() { return /* reexport safe */ _aperture_js__WEBPACK_IMPORTED_MODULE_14__["default"]; }, /* harmony export */ append: function() { return /* reexport safe */ _append_js__WEBPACK_IMPORTED_MODULE_15__["default"]; }, /* harmony export */ apply: function() { return /* reexport safe */ _apply_js__WEBPACK_IMPORTED_MODULE_16__["default"]; }, /* harmony export */ applySpec: function() { return /* reexport safe */ _applySpec_js__WEBPACK_IMPORTED_MODULE_17__["default"]; }, /* harmony export */ applyTo: function() { return /* reexport safe */ _applyTo_js__WEBPACK_IMPORTED_MODULE_18__["default"]; }, /* harmony export */ ascend: function() { return /* reexport safe */ _ascend_js__WEBPACK_IMPORTED_MODULE_19__["default"]; }, /* harmony export */ assoc: function() { return /* reexport safe */ _assoc_js__WEBPACK_IMPORTED_MODULE_20__["default"]; }, /* harmony export */ assocPath: function() { return /* reexport safe */ _assocPath_js__WEBPACK_IMPORTED_MODULE_21__["default"]; }, /* harmony export */ binary: function() { return /* reexport safe */ _binary_js__WEBPACK_IMPORTED_MODULE_22__["default"]; }, /* harmony export */ bind: function() { return /* reexport safe */ _bind_js__WEBPACK_IMPORTED_MODULE_23__["default"]; }, /* harmony export */ both: function() { return /* reexport safe */ _both_js__WEBPACK_IMPORTED_MODULE_24__["default"]; }, /* harmony export */ call: function() { return /* reexport safe */ _call_js__WEBPACK_IMPORTED_MODULE_25__["default"]; }, /* harmony export */ chain: function() { return /* reexport safe */ _chain_js__WEBPACK_IMPORTED_MODULE_26__["default"]; }, /* harmony export */ clamp: function() { return /* reexport safe */ _clamp_js__WEBPACK_IMPORTED_MODULE_27__["default"]; }, /* harmony export */ clone: function() { return /* reexport safe */ _clone_js__WEBPACK_IMPORTED_MODULE_28__["default"]; }, /* harmony export */ collectBy: function() { return /* reexport safe */ _collectBy_js__WEBPACK_IMPORTED_MODULE_29__["default"]; }, /* harmony export */ comparator: function() { return /* reexport safe */ _comparator_js__WEBPACK_IMPORTED_MODULE_30__["default"]; }, /* harmony export */ complement: function() { return /* reexport safe */ _complement_js__WEBPACK_IMPORTED_MODULE_31__["default"]; }, /* harmony export */ compose: function() { return /* reexport safe */ _compose_js__WEBPACK_IMPORTED_MODULE_32__["default"]; }, /* harmony export */ composeWith: function() { return /* reexport safe */ _composeWith_js__WEBPACK_IMPORTED_MODULE_33__["default"]; }, /* harmony export */ concat: function() { return /* reexport safe */ _concat_js__WEBPACK_IMPORTED_MODULE_34__["default"]; }, /* harmony export */ cond: function() { return /* reexport safe */ _cond_js__WEBPACK_IMPORTED_MODULE_35__["default"]; }, /* harmony export */ construct: function() { return /* reexport safe */ _construct_js__WEBPACK_IMPORTED_MODULE_36__["default"]; }, /* harmony export */ constructN: function() { return /* reexport safe */ _constructN_js__WEBPACK_IMPORTED_MODULE_37__["default"]; }, /* harmony export */ converge: function() { return /* reexport safe */ _converge_js__WEBPACK_IMPORTED_MODULE_38__["default"]; }, /* harmony export */ count: function() { return /* reexport safe */ _count_js__WEBPACK_IMPORTED_MODULE_39__["default"]; }, /* harmony export */ countBy: function() { return /* reexport safe */ _countBy_js__WEBPACK_IMPORTED_MODULE_40__["default"]; }, /* harmony export */ curry: function() { return /* reexport safe */ _curry_js__WEBPACK_IMPORTED_MODULE_41__["default"]; }, /* harmony export */ curryN: function() { return /* reexport safe */ _curryN_js__WEBPACK_IMPORTED_MODULE_42__["default"]; }, /* harmony export */ dec: function() { return /* reexport safe */ _dec_js__WEBPACK_IMPORTED_MODULE_43__["default"]; }, /* harmony export */ defaultTo: function() { return /* reexport safe */ _defaultTo_js__WEBPACK_IMPORTED_MODULE_44__["default"]; }, /* harmony export */ descend: function() { return /* reexport safe */ _descend_js__WEBPACK_IMPORTED_MODULE_45__["default"]; }, /* harmony export */ difference: function() { return /* reexport safe */ _difference_js__WEBPACK_IMPORTED_MODULE_46__["default"]; }, /* harmony export */ differenceWith: function() { return /* reexport safe */ _differenceWith_js__WEBPACK_IMPORTED_MODULE_47__["default"]; }, /* harmony export */ dissoc: function() { return /* reexport safe */ _dissoc_js__WEBPACK_IMPORTED_MODULE_48__["default"]; }, /* harmony export */ dissocPath: function() { return /* reexport safe */ _dissocPath_js__WEBPACK_IMPORTED_MODULE_49__["default"]; }, /* harmony export */ divide: function() { return /* reexport safe */ _divide_js__WEBPACK_IMPORTED_MODULE_50__["default"]; }, /* harmony export */ drop: function() { return /* reexport safe */ _drop_js__WEBPACK_IMPORTED_MODULE_51__["default"]; }, /* harmony export */ dropLast: function() { return /* reexport safe */ _dropLast_js__WEBPACK_IMPORTED_MODULE_52__["default"]; }, /* harmony export */ dropLastWhile: function() { return /* reexport safe */ _dropLastWhile_js__WEBPACK_IMPORTED_MODULE_53__["default"]; }, /* harmony export */ dropRepeats: function() { return /* reexport safe */ _dropRepeats_js__WEBPACK_IMPORTED_MODULE_54__["default"]; }, /* harmony export */ dropRepeatsBy: function() { return /* reexport safe */ _dropRepeatsBy_js__WEBPACK_IMPORTED_MODULE_55__["default"]; }, /* harmony export */ dropRepeatsWith: function() { return /* reexport safe */ _dropRepeatsWith_js__WEBPACK_IMPORTED_MODULE_56__["default"]; }, /* harmony export */ dropWhile: function() { return /* reexport safe */ _dropWhile_js__WEBPACK_IMPORTED_MODULE_57__["default"]; }, /* harmony export */ either: function() { return /* reexport safe */ _either_js__WEBPACK_IMPORTED_MODULE_58__["default"]; }, /* harmony export */ empty: function() { return /* reexport safe */ _empty_js__WEBPACK_IMPORTED_MODULE_59__["default"]; }, /* harmony export */ endsWith: function() { return /* reexport safe */ _endsWith_js__WEBPACK_IMPORTED_MODULE_60__["default"]; }, /* harmony export */ eqBy: function() { return /* reexport safe */ _eqBy_js__WEBPACK_IMPORTED_MODULE_61__["default"]; }, /* harmony export */ eqProps: function() { return /* reexport safe */ _eqProps_js__WEBPACK_IMPORTED_MODULE_62__["default"]; }, /* harmony export */ equals: function() { return /* reexport safe */ _equals_js__WEBPACK_IMPORTED_MODULE_63__["default"]; }, /* harmony export */ evolve: function() { return /* reexport safe */ _evolve_js__WEBPACK_IMPORTED_MODULE_64__["default"]; }, /* harmony export */ filter: function() { return /* reexport safe */ _filter_js__WEBPACK_IMPORTED_MODULE_65__["default"]; }, /* harmony export */ find: function() { return /* reexport safe */ _find_js__WEBPACK_IMPORTED_MODULE_66__["default"]; }, /* harmony export */ findIndex: function() { return /* reexport safe */ _findIndex_js__WEBPACK_IMPORTED_MODULE_67__["default"]; }, /* harmony export */ findLast: function() { return /* reexport safe */ _findLast_js__WEBPACK_IMPORTED_MODULE_68__["default"]; }, /* harmony export */ findLastIndex: function() { return /* reexport safe */ _findLastIndex_js__WEBPACK_IMPORTED_MODULE_69__["default"]; }, /* harmony export */ flatten: function() { return /* reexport safe */ _flatten_js__WEBPACK_IMPORTED_MODULE_70__["default"]; }, /* harmony export */ flip: function() { return /* reexport safe */ _flip_js__WEBPACK_IMPORTED_MODULE_71__["default"]; }, /* harmony export */ forEach: function() { return /* reexport safe */ _forEach_js__WEBPACK_IMPORTED_MODULE_72__["default"]; }, /* harmony export */ forEachObjIndexed: function() { return /* reexport safe */ _forEachObjIndexed_js__WEBPACK_IMPORTED_MODULE_73__["default"]; }, /* harmony export */ fromPairs: function() { return /* reexport safe */ _fromPairs_js__WEBPACK_IMPORTED_MODULE_74__["default"]; }, /* harmony export */ groupBy: function() { return /* reexport safe */ _groupBy_js__WEBPACK_IMPORTED_MODULE_75__["default"]; }, /* harmony export */ groupWith: function() { return /* reexport safe */ _groupWith_js__WEBPACK_IMPORTED_MODULE_76__["default"]; }, /* harmony export */ gt: function() { return /* reexport safe */ _gt_js__WEBPACK_IMPORTED_MODULE_77__["default"]; }, /* harmony export */ gte: function() { return /* reexport safe */ _gte_js__WEBPACK_IMPORTED_MODULE_78__["default"]; }, /* harmony export */ has: function() { return /* reexport safe */ _has_js__WEBPACK_IMPORTED_MODULE_79__["default"]; }, /* harmony export */ hasIn: function() { return /* reexport safe */ _hasIn_js__WEBPACK_IMPORTED_MODULE_80__["default"]; }, /* harmony export */ hasPath: function() { return /* reexport safe */ _hasPath_js__WEBPACK_IMPORTED_MODULE_81__["default"]; }, /* harmony export */ head: function() { return /* reexport safe */ _head_js__WEBPACK_IMPORTED_MODULE_82__["default"]; }, /* harmony export */ identical: function() { return /* reexport safe */ _identical_js__WEBPACK_IMPORTED_MODULE_83__["default"]; }, /* harmony export */ identity: function() { return /* reexport safe */ _identity_js__WEBPACK_IMPORTED_MODULE_84__["default"]; }, /* harmony export */ ifElse: function() { return /* reexport safe */ _ifElse_js__WEBPACK_IMPORTED_MODULE_85__["default"]; }, /* harmony export */ inc: function() { return /* reexport safe */ _inc_js__WEBPACK_IMPORTED_MODULE_86__["default"]; }, /* harmony export */ includes: function() { return /* reexport safe */ _includes_js__WEBPACK_IMPORTED_MODULE_87__["default"]; }, /* harmony export */ indexBy: function() { return /* reexport safe */ _indexBy_js__WEBPACK_IMPORTED_MODULE_88__["default"]; }, /* harmony export */ indexOf: function() { return /* reexport safe */ _indexOf_js__WEBPACK_IMPORTED_MODULE_89__["default"]; }, /* harmony export */ init: function() { return /* reexport safe */ _init_js__WEBPACK_IMPORTED_MODULE_90__["default"]; }, /* harmony export */ innerJoin: function() { return /* reexport safe */ _innerJoin_js__WEBPACK_IMPORTED_MODULE_91__["default"]; }, /* harmony export */ insert: function() { return /* reexport safe */ _insert_js__WEBPACK_IMPORTED_MODULE_92__["default"]; }, /* harmony export */ insertAll: function() { return /* reexport safe */ _insertAll_js__WEBPACK_IMPORTED_MODULE_93__["default"]; }, /* harmony export */ intersection: function() { return /* reexport safe */ _intersection_js__WEBPACK_IMPORTED_MODULE_94__["default"]; }, /* harmony export */ intersperse: function() { return /* reexport safe */ _intersperse_js__WEBPACK_IMPORTED_MODULE_95__["default"]; }, /* harmony export */ into: function() { return /* reexport safe */ _into_js__WEBPACK_IMPORTED_MODULE_96__["default"]; }, /* harmony export */ invert: function() { return /* reexport safe */ _invert_js__WEBPACK_IMPORTED_MODULE_97__["default"]; }, /* harmony export */ invertObj: function() { return /* reexport safe */ _invertObj_js__WEBPACK_IMPORTED_MODULE_98__["default"]; }, /* harmony export */ invoker: function() { return /* reexport safe */ _invoker_js__WEBPACK_IMPORTED_MODULE_99__["default"]; }, /* harmony export */ is: function() { return /* reexport safe */ _is_js__WEBPACK_IMPORTED_MODULE_100__["default"]; }, /* harmony export */ isEmpty: function() { return /* reexport safe */ _isEmpty_js__WEBPACK_IMPORTED_MODULE_101__["default"]; }, /* harmony export */ isNil: function() { return /* reexport safe */ _isNil_js__WEBPACK_IMPORTED_MODULE_102__["default"]; }, /* harmony export */ isNotNil: function() { return /* reexport safe */ _isNotNil_js__WEBPACK_IMPORTED_MODULE_103__["default"]; }, /* harmony export */ join: function() { return /* reexport safe */ _join_js__WEBPACK_IMPORTED_MODULE_104__["default"]; }, /* harmony export */ juxt: function() { return /* reexport safe */ _juxt_js__WEBPACK_IMPORTED_MODULE_105__["default"]; }, /* harmony export */ keys: function() { return /* reexport safe */ _keys_js__WEBPACK_IMPORTED_MODULE_106__["default"]; }, /* harmony export */ keysIn: function() { return /* reexport safe */ _keysIn_js__WEBPACK_IMPORTED_MODULE_107__["default"]; }, /* harmony export */ last: function() { return /* reexport safe */ _last_js__WEBPACK_IMPORTED_MODULE_108__["default"]; }, /* harmony export */ lastIndexOf: function() { return /* reexport safe */ _lastIndexOf_js__WEBPACK_IMPORTED_MODULE_109__["default"]; }, /* harmony export */ length: function() { return /* reexport safe */ _length_js__WEBPACK_IMPORTED_MODULE_110__["default"]; }, /* harmony export */ lens: function() { return /* reexport safe */ _lens_js__WEBPACK_IMPORTED_MODULE_111__["default"]; }, /* harmony export */ lensIndex: function() { return /* reexport safe */ _lensIndex_js__WEBPACK_IMPORTED_MODULE_112__["default"]; }, /* harmony export */ lensPath: function() { return /* reexport safe */ _lensPath_js__WEBPACK_IMPORTED_MODULE_113__["default"]; }, /* harmony export */ lensProp: function() { return /* reexport safe */ _lensProp_js__WEBPACK_IMPORTED_MODULE_114__["default"]; }, /* harmony export */ lift: function() { return /* reexport safe */ _lift_js__WEBPACK_IMPORTED_MODULE_115__["default"]; }, /* harmony export */ liftN: function() { return /* reexport safe */ _liftN_js__WEBPACK_IMPORTED_MODULE_116__["default"]; }, /* harmony export */ lt: function() { return /* reexport safe */ _lt_js__WEBPACK_IMPORTED_MODULE_117__["default"]; }, /* harmony export */ lte: function() { return /* reexport safe */ _lte_js__WEBPACK_IMPORTED_MODULE_118__["default"]; }, /* harmony export */ map: function() { return /* reexport safe */ _map_js__WEBPACK_IMPORTED_MODULE_119__["default"]; }, /* harmony export */ mapAccum: function() { return /* reexport safe */ _mapAccum_js__WEBPACK_IMPORTED_MODULE_120__["default"]; }, /* harmony export */ mapAccumRight: function() { return /* reexport safe */ _mapAccumRight_js__WEBPACK_IMPORTED_MODULE_121__["default"]; }, /* harmony export */ mapObjIndexed: function() { return /* reexport safe */ _mapObjIndexed_js__WEBPACK_IMPORTED_MODULE_122__["default"]; }, /* harmony export */ match: function() { return /* reexport safe */ _match_js__WEBPACK_IMPORTED_MODULE_123__["default"]; }, /* harmony export */ mathMod: function() { return /* reexport safe */ _mathMod_js__WEBPACK_IMPORTED_MODULE_124__["default"]; }, /* harmony export */ max: function() { return /* reexport safe */ _max_js__WEBPACK_IMPORTED_MODULE_125__["default"]; }, /* harmony export */ maxBy: function() { return /* reexport safe */ _maxBy_js__WEBPACK_IMPORTED_MODULE_126__["default"]; }, /* harmony export */ mean: function() { return /* reexport safe */ _mean_js__WEBPACK_IMPORTED_MODULE_127__["default"]; }, /* harmony export */ median: function() { return /* reexport safe */ _median_js__WEBPACK_IMPORTED_MODULE_128__["default"]; }, /* harmony export */ memoizeWith: function() { return /* reexport safe */ _memoizeWith_js__WEBPACK_IMPORTED_MODULE_129__["default"]; }, /* harmony export */ mergeAll: function() { return /* reexport safe */ _mergeAll_js__WEBPACK_IMPORTED_MODULE_130__["default"]; }, /* harmony export */ mergeDeepLeft: function() { return /* reexport safe */ _mergeDeepLeft_js__WEBPACK_IMPORTED_MODULE_131__["default"]; }, /* harmony export */ mergeDeepRight: function() { return /* reexport safe */ _mergeDeepRight_js__WEBPACK_IMPORTED_MODULE_132__["default"]; }, /* harmony export */ mergeDeepWith: function() { return /* reexport safe */ _mergeDeepWith_js__WEBPACK_IMPORTED_MODULE_133__["default"]; }, /* harmony export */ mergeDeepWithKey: function() { return /* reexport safe */ _mergeDeepWithKey_js__WEBPACK_IMPORTED_MODULE_134__["default"]; }, /* harmony export */ mergeLeft: function() { return /* reexport safe */ _mergeLeft_js__WEBPACK_IMPORTED_MODULE_135__["default"]; }, /* harmony export */ mergeRight: function() { return /* reexport safe */ _mergeRight_js__WEBPACK_IMPORTED_MODULE_136__["default"]; }, /* harmony export */ mergeWith: function() { return /* reexport safe */ _mergeWith_js__WEBPACK_IMPORTED_MODULE_137__["default"]; }, /* harmony export */ mergeWithKey: function() { return /* reexport safe */ _mergeWithKey_js__WEBPACK_IMPORTED_MODULE_138__["default"]; }, /* harmony export */ min: function() { return /* reexport safe */ _min_js__WEBPACK_IMPORTED_MODULE_139__["default"]; }, /* harmony export */ minBy: function() { return /* reexport safe */ _minBy_js__WEBPACK_IMPORTED_MODULE_140__["default"]; }, /* harmony export */ modify: function() { return /* reexport safe */ _modify_js__WEBPACK_IMPORTED_MODULE_141__["default"]; }, /* harmony export */ modifyPath: function() { return /* reexport safe */ _modifyPath_js__WEBPACK_IMPORTED_MODULE_142__["default"]; }, /* harmony export */ modulo: function() { return /* reexport safe */ _modulo_js__WEBPACK_IMPORTED_MODULE_143__["default"]; }, /* harmony export */ move: function() { return /* reexport safe */ _move_js__WEBPACK_IMPORTED_MODULE_144__["default"]; }, /* harmony export */ multiply: function() { return /* reexport safe */ _multiply_js__WEBPACK_IMPORTED_MODULE_145__["default"]; }, /* harmony export */ nAry: function() { return /* reexport safe */ _nAry_js__WEBPACK_IMPORTED_MODULE_146__["default"]; }, /* harmony export */ negate: function() { return /* reexport safe */ _negate_js__WEBPACK_IMPORTED_MODULE_148__["default"]; }, /* harmony export */ none: function() { return /* reexport safe */ _none_js__WEBPACK_IMPORTED_MODULE_149__["default"]; }, /* harmony export */ not: function() { return /* reexport safe */ _not_js__WEBPACK_IMPORTED_MODULE_150__["default"]; }, /* harmony export */ nth: function() { return /* reexport safe */ _nth_js__WEBPACK_IMPORTED_MODULE_151__["default"]; }, /* harmony export */ nthArg: function() { return /* reexport safe */ _nthArg_js__WEBPACK_IMPORTED_MODULE_152__["default"]; }, /* harmony export */ o: function() { return /* reexport safe */ _o_js__WEBPACK_IMPORTED_MODULE_153__["default"]; }, /* harmony export */ objOf: function() { return /* reexport safe */ _objOf_js__WEBPACK_IMPORTED_MODULE_154__["default"]; }, /* harmony export */ of: function() { return /* reexport safe */ _of_js__WEBPACK_IMPORTED_MODULE_155__["default"]; }, /* harmony export */ omit: function() { return /* reexport safe */ _omit_js__WEBPACK_IMPORTED_MODULE_156__["default"]; }, /* harmony export */ on: function() { return /* reexport safe */ _on_js__WEBPACK_IMPORTED_MODULE_157__["default"]; }, /* harmony export */ once: function() { return /* reexport safe */ _once_js__WEBPACK_IMPORTED_MODULE_158__["default"]; }, /* harmony export */ or: function() { return /* reexport safe */ _or_js__WEBPACK_IMPORTED_MODULE_159__["default"]; }, /* harmony export */ otherwise: function() { return /* reexport safe */ _otherwise_js__WEBPACK_IMPORTED_MODULE_160__["default"]; }, /* harmony export */ over: function() { return /* reexport safe */ _over_js__WEBPACK_IMPORTED_MODULE_161__["default"]; }, /* harmony export */ pair: function() { return /* reexport safe */ _pair_js__WEBPACK_IMPORTED_MODULE_162__["default"]; }, /* harmony export */ partial: function() { return /* reexport safe */ _partial_js__WEBPACK_IMPORTED_MODULE_163__["default"]; }, /* harmony export */ partialObject: function() { return /* reexport safe */ _partialObject_js__WEBPACK_IMPORTED_MODULE_147__["default"]; }, /* harmony export */ partialRight: function() { return /* reexport safe */ _partialRight_js__WEBPACK_IMPORTED_MODULE_164__["default"]; }, /* harmony export */ partition: function() { return /* reexport safe */ _partition_js__WEBPACK_IMPORTED_MODULE_165__["default"]; }, /* harmony export */ path: function() { return /* reexport safe */ _path_js__WEBPACK_IMPORTED_MODULE_166__["default"]; }, /* harmony export */ pathEq: function() { return /* reexport safe */ _pathEq_js__WEBPACK_IMPORTED_MODULE_168__["default"]; }, /* harmony export */ pathOr: function() { return /* reexport safe */ _pathOr_js__WEBPACK_IMPORTED_MODULE_169__["default"]; }, /* harmony export */ pathSatisfies: function() { return /* reexport safe */ _pathSatisfies_js__WEBPACK_IMPORTED_MODULE_170__["default"]; }, /* harmony export */ paths: function() { return /* reexport safe */ _paths_js__WEBPACK_IMPORTED_MODULE_167__["default"]; }, /* harmony export */ pick: function() { return /* reexport safe */ _pick_js__WEBPACK_IMPORTED_MODULE_171__["default"]; }, /* harmony export */ pickAll: function() { return /* reexport safe */ _pickAll_js__WEBPACK_IMPORTED_MODULE_172__["default"]; }, /* harmony export */ pickBy: function() { return /* reexport safe */ _pickBy_js__WEBPACK_IMPORTED_MODULE_173__["default"]; }, /* harmony export */ pipe: function() { return /* reexport safe */ _pipe_js__WEBPACK_IMPORTED_MODULE_174__["default"]; }, /* harmony export */ pipeWith: function() { return /* reexport safe */ _pipeWith_js__WEBPACK_IMPORTED_MODULE_175__["default"]; }, /* harmony export */ pluck: function() { return /* reexport safe */ _pluck_js__WEBPACK_IMPORTED_MODULE_176__["default"]; }, /* harmony export */ prepend: function() { return /* reexport safe */ _prepend_js__WEBPACK_IMPORTED_MODULE_177__["default"]; }, /* harmony export */ product: function() { return /* reexport safe */ _product_js__WEBPACK_IMPORTED_MODULE_178__["default"]; }, /* harmony export */ project: function() { return /* reexport safe */ _project_js__WEBPACK_IMPORTED_MODULE_179__["default"]; }, /* harmony export */ promap: function() { return /* reexport safe */ _promap_js__WEBPACK_IMPORTED_MODULE_180__["default"]; }, /* harmony export */ prop: function() { return /* reexport safe */ _prop_js__WEBPACK_IMPORTED_MODULE_181__["default"]; }, /* harmony export */ propEq: function() { return /* reexport safe */ _propEq_js__WEBPACK_IMPORTED_MODULE_182__["default"]; }, /* harmony export */ propIs: function() { return /* reexport safe */ _propIs_js__WEBPACK_IMPORTED_MODULE_183__["default"]; }, /* harmony export */ propOr: function() { return /* reexport safe */ _propOr_js__WEBPACK_IMPORTED_MODULE_184__["default"]; }, /* harmony export */ propSatisfies: function() { return /* reexport safe */ _propSatisfies_js__WEBPACK_IMPORTED_MODULE_185__["default"]; }, /* harmony export */ props: function() { return /* reexport safe */ _props_js__WEBPACK_IMPORTED_MODULE_186__["default"]; }, /* harmony export */ range: function() { return /* reexport safe */ _range_js__WEBPACK_IMPORTED_MODULE_187__["default"]; }, /* harmony export */ reduce: function() { return /* reexport safe */ _reduce_js__WEBPACK_IMPORTED_MODULE_188__["default"]; }, /* harmony export */ reduceBy: function() { return /* reexport safe */ _reduceBy_js__WEBPACK_IMPORTED_MODULE_189__["default"]; }, /* harmony export */ reduceRight: function() { return /* reexport safe */ _reduceRight_js__WEBPACK_IMPORTED_MODULE_190__["default"]; }, /* harmony export */ reduceWhile: function() { return /* reexport safe */ _reduceWhile_js__WEBPACK_IMPORTED_MODULE_191__["default"]; }, /* harmony export */ reduced: function() { return /* reexport safe */ _reduced_js__WEBPACK_IMPORTED_MODULE_192__["default"]; }, /* harmony export */ reject: function() { return /* reexport safe */ _reject_js__WEBPACK_IMPORTED_MODULE_193__["default"]; }, /* harmony export */ remove: function() { return /* reexport safe */ _remove_js__WEBPACK_IMPORTED_MODULE_194__["default"]; }, /* harmony export */ repeat: function() { return /* reexport safe */ _repeat_js__WEBPACK_IMPORTED_MODULE_195__["default"]; }, /* harmony export */ replace: function() { return /* reexport safe */ _replace_js__WEBPACK_IMPORTED_MODULE_196__["default"]; }, /* harmony export */ reverse: function() { return /* reexport safe */ _reverse_js__WEBPACK_IMPORTED_MODULE_197__["default"]; }, /* harmony export */ scan: function() { return /* reexport safe */ _scan_js__WEBPACK_IMPORTED_MODULE_198__["default"]; }, /* harmony export */ sequence: function() { return /* reexport safe */ _sequence_js__WEBPACK_IMPORTED_MODULE_199__["default"]; }, /* harmony export */ set: function() { return /* reexport safe */ _set_js__WEBPACK_IMPORTED_MODULE_200__["default"]; }, /* harmony export */ slice: function() { return /* reexport safe */ _slice_js__WEBPACK_IMPORTED_MODULE_201__["default"]; }, /* harmony export */ sort: function() { return /* reexport safe */ _sort_js__WEBPACK_IMPORTED_MODULE_202__["default"]; }, /* harmony export */ sortBy: function() { return /* reexport safe */ _sortBy_js__WEBPACK_IMPORTED_MODULE_203__["default"]; }, /* harmony export */ sortWith: function() { return /* reexport safe */ _sortWith_js__WEBPACK_IMPORTED_MODULE_204__["default"]; }, /* harmony export */ split: function() { return /* reexport safe */ _split_js__WEBPACK_IMPORTED_MODULE_205__["default"]; }, /* harmony export */ splitAt: function() { return /* reexport safe */ _splitAt_js__WEBPACK_IMPORTED_MODULE_206__["default"]; }, /* harmony export */ splitEvery: function() { return /* reexport safe */ _splitEvery_js__WEBPACK_IMPORTED_MODULE_207__["default"]; }, /* harmony export */ splitWhen: function() { return /* reexport safe */ _splitWhen_js__WEBPACK_IMPORTED_MODULE_208__["default"]; }, /* harmony export */ splitWhenever: function() { return /* reexport safe */ _splitWhenever_js__WEBPACK_IMPORTED_MODULE_209__["default"]; }, /* harmony export */ startsWith: function() { return /* reexport safe */ _startsWith_js__WEBPACK_IMPORTED_MODULE_210__["default"]; }, /* harmony export */ subtract: function() { return /* reexport safe */ _subtract_js__WEBPACK_IMPORTED_MODULE_211__["default"]; }, /* harmony export */ sum: function() { return /* reexport safe */ _sum_js__WEBPACK_IMPORTED_MODULE_212__["default"]; }, /* harmony export */ swap: function() { return /* reexport safe */ _swap_js__WEBPACK_IMPORTED_MODULE_213__["default"]; }, /* harmony export */ symmetricDifference: function() { return /* reexport safe */ _symmetricDifference_js__WEBPACK_IMPORTED_MODULE_214__["default"]; }, /* harmony export */ symmetricDifferenceWith: function() { return /* reexport safe */ _symmetricDifferenceWith_js__WEBPACK_IMPORTED_MODULE_215__["default"]; }, /* harmony export */ tail: function() { return /* reexport safe */ _tail_js__WEBPACK_IMPORTED_MODULE_216__["default"]; }, /* harmony export */ take: function() { return /* reexport safe */ _take_js__WEBPACK_IMPORTED_MODULE_217__["default"]; }, /* harmony export */ takeLast: function() { return /* reexport safe */ _takeLast_js__WEBPACK_IMPORTED_MODULE_218__["default"]; }, /* harmony export */ takeLastWhile: function() { return /* reexport safe */ _takeLastWhile_js__WEBPACK_IMPORTED_MODULE_219__["default"]; }, /* harmony export */ takeWhile: function() { return /* reexport safe */ _takeWhile_js__WEBPACK_IMPORTED_MODULE_220__["default"]; }, /* harmony export */ tap: function() { return /* reexport safe */ _tap_js__WEBPACK_IMPORTED_MODULE_221__["default"]; }, /* harmony export */ test: function() { return /* reexport safe */ _test_js__WEBPACK_IMPORTED_MODULE_222__["default"]; }, /* harmony export */ thunkify: function() { return /* reexport safe */ _thunkify_js__WEBPACK_IMPORTED_MODULE_264__["default"]; }, /* harmony export */ times: function() { return /* reexport safe */ _times_js__WEBPACK_IMPORTED_MODULE_224__["default"]; }, /* harmony export */ toLower: function() { return /* reexport safe */ _toLower_js__WEBPACK_IMPORTED_MODULE_225__["default"]; }, /* harmony export */ toPairs: function() { return /* reexport safe */ _toPairs_js__WEBPACK_IMPORTED_MODULE_226__["default"]; }, /* harmony export */ toPairsIn: function() { return /* reexport safe */ _toPairsIn_js__WEBPACK_IMPORTED_MODULE_227__["default"]; }, /* harmony export */ toString: function() { return /* reexport safe */ _toString_js__WEBPACK_IMPORTED_MODULE_228__["default"]; }, /* harmony export */ toUpper: function() { return /* reexport safe */ _toUpper_js__WEBPACK_IMPORTED_MODULE_229__["default"]; }, /* harmony export */ transduce: function() { return /* reexport safe */ _transduce_js__WEBPACK_IMPORTED_MODULE_230__["default"]; }, /* harmony export */ transpose: function() { return /* reexport safe */ _transpose_js__WEBPACK_IMPORTED_MODULE_231__["default"]; }, /* harmony export */ traverse: function() { return /* reexport safe */ _traverse_js__WEBPACK_IMPORTED_MODULE_232__["default"]; }, /* harmony export */ trim: function() { return /* reexport safe */ _trim_js__WEBPACK_IMPORTED_MODULE_233__["default"]; }, /* harmony export */ tryCatch: function() { return /* reexport safe */ _tryCatch_js__WEBPACK_IMPORTED_MODULE_234__["default"]; }, /* harmony export */ type: function() { return /* reexport safe */ _type_js__WEBPACK_IMPORTED_MODULE_235__["default"]; }, /* harmony export */ unapply: function() { return /* reexport safe */ _unapply_js__WEBPACK_IMPORTED_MODULE_236__["default"]; }, /* harmony export */ unary: function() { return /* reexport safe */ _unary_js__WEBPACK_IMPORTED_MODULE_237__["default"]; }, /* harmony export */ uncurryN: function() { return /* reexport safe */ _uncurryN_js__WEBPACK_IMPORTED_MODULE_238__["default"]; }, /* harmony export */ unfold: function() { return /* reexport safe */ _unfold_js__WEBPACK_IMPORTED_MODULE_239__["default"]; }, /* harmony export */ union: function() { return /* reexport safe */ _union_js__WEBPACK_IMPORTED_MODULE_240__["default"]; }, /* harmony export */ unionWith: function() { return /* reexport safe */ _unionWith_js__WEBPACK_IMPORTED_MODULE_241__["default"]; }, /* harmony export */ uniq: function() { return /* reexport safe */ _uniq_js__WEBPACK_IMPORTED_MODULE_242__["default"]; }, /* harmony export */ uniqBy: function() { return /* reexport safe */ _uniqBy_js__WEBPACK_IMPORTED_MODULE_243__["default"]; }, /* harmony export */ uniqWith: function() { return /* reexport safe */ _uniqWith_js__WEBPACK_IMPORTED_MODULE_244__["default"]; }, /* harmony export */ unless: function() { return /* reexport safe */ _unless_js__WEBPACK_IMPORTED_MODULE_245__["default"]; }, /* harmony export */ unnest: function() { return /* reexport safe */ _unnest_js__WEBPACK_IMPORTED_MODULE_246__["default"]; }, /* harmony export */ until: function() { return /* reexport safe */ _until_js__WEBPACK_IMPORTED_MODULE_247__["default"]; }, /* harmony export */ unwind: function() { return /* reexport safe */ _unwind_js__WEBPACK_IMPORTED_MODULE_248__["default"]; }, /* harmony export */ update: function() { return /* reexport safe */ _update_js__WEBPACK_IMPORTED_MODULE_249__["default"]; }, /* harmony export */ useWith: function() { return /* reexport safe */ _useWith_js__WEBPACK_IMPORTED_MODULE_250__["default"]; }, /* harmony export */ values: function() { return /* reexport safe */ _values_js__WEBPACK_IMPORTED_MODULE_251__["default"]; }, /* harmony export */ valuesIn: function() { return /* reexport safe */ _valuesIn_js__WEBPACK_IMPORTED_MODULE_252__["default"]; }, /* harmony export */ view: function() { return /* reexport safe */ _view_js__WEBPACK_IMPORTED_MODULE_253__["default"]; }, /* harmony export */ when: function() { return /* reexport safe */ _when_js__WEBPACK_IMPORTED_MODULE_254__["default"]; }, /* harmony export */ where: function() { return /* reexport safe */ _where_js__WEBPACK_IMPORTED_MODULE_255__["default"]; }, /* harmony export */ whereAny: function() { return /* reexport safe */ _whereAny_js__WEBPACK_IMPORTED_MODULE_256__["default"]; }, /* harmony export */ whereEq: function() { return /* reexport safe */ _whereEq_js__WEBPACK_IMPORTED_MODULE_257__["default"]; }, /* harmony export */ without: function() { return /* reexport safe */ _without_js__WEBPACK_IMPORTED_MODULE_258__["default"]; }, /* harmony export */ xor: function() { return /* reexport safe */ _xor_js__WEBPACK_IMPORTED_MODULE_259__["default"]; }, /* harmony export */ xprod: function() { return /* reexport safe */ _xprod_js__WEBPACK_IMPORTED_MODULE_260__["default"]; }, /* harmony export */ zip: function() { return /* reexport safe */ _zip_js__WEBPACK_IMPORTED_MODULE_261__["default"]; }, /* harmony export */ zipObj: function() { return /* reexport safe */ _zipObj_js__WEBPACK_IMPORTED_MODULE_262__["default"]; }, /* harmony export */ zipWith: function() { return /* reexport safe */ _zipWith_js__WEBPACK_IMPORTED_MODULE_263__["default"]; } /* harmony export */ }); /* harmony import */ var _F_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./F.js */ "./node_modules/ramda/es/F.js"); /* harmony import */ var _T_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./T.js */ "./node_modules/ramda/es/T.js"); /* harmony import */ var _js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./__.js */ "./node_modules/ramda/es/__.js"); /* harmony import */ var _add_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./add.js */ "./node_modules/ramda/es/add.js"); /* harmony import */ var _addIndex_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./addIndex.js */ "./node_modules/ramda/es/addIndex.js"); /* harmony import */ var _addIndexRight_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./addIndexRight.js */ "./node_modules/ramda/es/addIndexRight.js"); /* harmony import */ var _adjust_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./adjust.js */ "./node_modules/ramda/es/adjust.js"); /* harmony import */ var _all_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./all.js */ "./node_modules/ramda/es/all.js"); /* harmony import */ var _allPass_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./allPass.js */ "./node_modules/ramda/es/allPass.js"); /* harmony import */ var _always_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./always.js */ "./node_modules/ramda/es/always.js"); /* harmony import */ var _and_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./and.js */ "./node_modules/ramda/es/and.js"); /* harmony import */ var _any_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./any.js */ "./node_modules/ramda/es/any.js"); /* harmony import */ var _anyPass_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./anyPass.js */ "./node_modules/ramda/es/anyPass.js"); /* harmony import */ var _ap_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./ap.js */ "./node_modules/ramda/es/ap.js"); /* harmony import */ var _aperture_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./aperture.js */ "./node_modules/ramda/es/aperture.js"); /* harmony import */ var _append_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./append.js */ "./node_modules/ramda/es/append.js"); /* harmony import */ var _apply_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./apply.js */ "./node_modules/ramda/es/apply.js"); /* harmony import */ var _applySpec_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./applySpec.js */ "./node_modules/ramda/es/applySpec.js"); /* harmony import */ var _applyTo_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./applyTo.js */ "./node_modules/ramda/es/applyTo.js"); /* harmony import */ var _ascend_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./ascend.js */ "./node_modules/ramda/es/ascend.js"); /* harmony import */ var _assoc_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./assoc.js */ "./node_modules/ramda/es/assoc.js"); /* harmony import */ var _assocPath_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./assocPath.js */ "./node_modules/ramda/es/assocPath.js"); /* harmony import */ var _binary_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./binary.js */ "./node_modules/ramda/es/binary.js"); /* harmony import */ var _bind_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./bind.js */ "./node_modules/ramda/es/bind.js"); /* harmony import */ var _both_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./both.js */ "./node_modules/ramda/es/both.js"); /* harmony import */ var _call_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./call.js */ "./node_modules/ramda/es/call.js"); /* harmony import */ var _chain_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./chain.js */ "./node_modules/ramda/es/chain.js"); /* harmony import */ var _clamp_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./clamp.js */ "./node_modules/ramda/es/clamp.js"); /* harmony import */ var _clone_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./clone.js */ "./node_modules/ramda/es/clone.js"); /* harmony import */ var _collectBy_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./collectBy.js */ "./node_modules/ramda/es/collectBy.js"); /* harmony import */ var _comparator_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./comparator.js */ "./node_modules/ramda/es/comparator.js"); /* harmony import */ var _complement_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./complement.js */ "./node_modules/ramda/es/complement.js"); /* harmony import */ var _compose_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./compose.js */ "./node_modules/ramda/es/compose.js"); /* harmony import */ var _composeWith_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./composeWith.js */ "./node_modules/ramda/es/composeWith.js"); /* harmony import */ var _concat_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./concat.js */ "./node_modules/ramda/es/concat.js"); /* harmony import */ var _cond_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./cond.js */ "./node_modules/ramda/es/cond.js"); /* harmony import */ var _construct_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./construct.js */ "./node_modules/ramda/es/construct.js"); /* harmony import */ var _constructN_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./constructN.js */ "./node_modules/ramda/es/constructN.js"); /* harmony import */ var _converge_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./converge.js */ "./node_modules/ramda/es/converge.js"); /* harmony import */ var _count_js__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./count.js */ "./node_modules/ramda/es/count.js"); /* harmony import */ var _countBy_js__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./countBy.js */ "./node_modules/ramda/es/countBy.js"); /* harmony import */ var _curry_js__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./curry.js */ "./node_modules/ramda/es/curry.js"); /* harmony import */ var _curryN_js__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./curryN.js */ "./node_modules/ramda/es/curryN.js"); /* harmony import */ var _dec_js__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./dec.js */ "./node_modules/ramda/es/dec.js"); /* harmony import */ var _defaultTo_js__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./defaultTo.js */ "./node_modules/ramda/es/defaultTo.js"); /* harmony import */ var _descend_js__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./descend.js */ "./node_modules/ramda/es/descend.js"); /* harmony import */ var _difference_js__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./difference.js */ "./node_modules/ramda/es/difference.js"); /* harmony import */ var _differenceWith_js__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./differenceWith.js */ "./node_modules/ramda/es/differenceWith.js"); /* harmony import */ var _dissoc_js__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./dissoc.js */ "./node_modules/ramda/es/dissoc.js"); /* harmony import */ var _dissocPath_js__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ./dissocPath.js */ "./node_modules/ramda/es/dissocPath.js"); /* harmony import */ var _divide_js__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ./divide.js */ "./node_modules/ramda/es/divide.js"); /* harmony import */ var _drop_js__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ./drop.js */ "./node_modules/ramda/es/drop.js"); /* harmony import */ var _dropLast_js__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ./dropLast.js */ "./node_modules/ramda/es/dropLast.js"); /* harmony import */ var _dropLastWhile_js__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ./dropLastWhile.js */ "./node_modules/ramda/es/dropLastWhile.js"); /* harmony import */ var _dropRepeats_js__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ./dropRepeats.js */ "./node_modules/ramda/es/dropRepeats.js"); /* harmony import */ var _dropRepeatsBy_js__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ./dropRepeatsBy.js */ "./node_modules/ramda/es/dropRepeatsBy.js"); /* harmony import */ var _dropRepeatsWith_js__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! ./dropRepeatsWith.js */ "./node_modules/ramda/es/dropRepeatsWith.js"); /* harmony import */ var _dropWhile_js__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! ./dropWhile.js */ "./node_modules/ramda/es/dropWhile.js"); /* harmony import */ var _either_js__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(/*! ./either.js */ "./node_modules/ramda/es/either.js"); /* harmony import */ var _empty_js__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(/*! ./empty.js */ "./node_modules/ramda/es/empty.js"); /* harmony import */ var _endsWith_js__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(/*! ./endsWith.js */ "./node_modules/ramda/es/endsWith.js"); /* harmony import */ var _eqBy_js__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(/*! ./eqBy.js */ "./node_modules/ramda/es/eqBy.js"); /* harmony import */ var _eqProps_js__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(/*! ./eqProps.js */ "./node_modules/ramda/es/eqProps.js"); /* harmony import */ var _equals_js__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(/*! ./equals.js */ "./node_modules/ramda/es/equals.js"); /* harmony import */ var _evolve_js__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(/*! ./evolve.js */ "./node_modules/ramda/es/evolve.js"); /* harmony import */ var _filter_js__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(/*! ./filter.js */ "./node_modules/ramda/es/filter.js"); /* harmony import */ var _find_js__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(/*! ./find.js */ "./node_modules/ramda/es/find.js"); /* harmony import */ var _findIndex_js__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(/*! ./findIndex.js */ "./node_modules/ramda/es/findIndex.js"); /* harmony import */ var _findLast_js__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(/*! ./findLast.js */ "./node_modules/ramda/es/findLast.js"); /* harmony import */ var _findLastIndex_js__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(/*! ./findLastIndex.js */ "./node_modules/ramda/es/findLastIndex.js"); /* harmony import */ var _flatten_js__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(/*! ./flatten.js */ "./node_modules/ramda/es/flatten.js"); /* harmony import */ var _flip_js__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(/*! ./flip.js */ "./node_modules/ramda/es/flip.js"); /* harmony import */ var _forEach_js__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(/*! ./forEach.js */ "./node_modules/ramda/es/forEach.js"); /* harmony import */ var _forEachObjIndexed_js__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(/*! ./forEachObjIndexed.js */ "./node_modules/ramda/es/forEachObjIndexed.js"); /* harmony import */ var _fromPairs_js__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(/*! ./fromPairs.js */ "./node_modules/ramda/es/fromPairs.js"); /* harmony import */ var _groupBy_js__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(/*! ./groupBy.js */ "./node_modules/ramda/es/groupBy.js"); /* harmony import */ var _groupWith_js__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(/*! ./groupWith.js */ "./node_modules/ramda/es/groupWith.js"); /* harmony import */ var _gt_js__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(/*! ./gt.js */ "./node_modules/ramda/es/gt.js"); /* harmony import */ var _gte_js__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(/*! ./gte.js */ "./node_modules/ramda/es/gte.js"); /* harmony import */ var _has_js__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(/*! ./has.js */ "./node_modules/ramda/es/has.js"); /* harmony import */ var _hasIn_js__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(/*! ./hasIn.js */ "./node_modules/ramda/es/hasIn.js"); /* harmony import */ var _hasPath_js__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(/*! ./hasPath.js */ "./node_modules/ramda/es/hasPath.js"); /* harmony import */ var _head_js__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__(/*! ./head.js */ "./node_modules/ramda/es/head.js"); /* harmony import */ var _identical_js__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__(/*! ./identical.js */ "./node_modules/ramda/es/identical.js"); /* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__(/*! ./identity.js */ "./node_modules/ramda/es/identity.js"); /* harmony import */ var _ifElse_js__WEBPACK_IMPORTED_MODULE_85__ = __webpack_require__(/*! ./ifElse.js */ "./node_modules/ramda/es/ifElse.js"); /* harmony import */ var _inc_js__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__(/*! ./inc.js */ "./node_modules/ramda/es/inc.js"); /* harmony import */ var _includes_js__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__(/*! ./includes.js */ "./node_modules/ramda/es/includes.js"); /* harmony import */ var _indexBy_js__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__(/*! ./indexBy.js */ "./node_modules/ramda/es/indexBy.js"); /* harmony import */ var _indexOf_js__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__(/*! ./indexOf.js */ "./node_modules/ramda/es/indexOf.js"); /* harmony import */ var _init_js__WEBPACK_IMPORTED_MODULE_90__ = __webpack_require__(/*! ./init.js */ "./node_modules/ramda/es/init.js"); /* harmony import */ var _innerJoin_js__WEBPACK_IMPORTED_MODULE_91__ = __webpack_require__(/*! ./innerJoin.js */ "./node_modules/ramda/es/innerJoin.js"); /* harmony import */ var _insert_js__WEBPACK_IMPORTED_MODULE_92__ = __webpack_require__(/*! ./insert.js */ "./node_modules/ramda/es/insert.js"); /* harmony import */ var _insertAll_js__WEBPACK_IMPORTED_MODULE_93__ = __webpack_require__(/*! ./insertAll.js */ "./node_modules/ramda/es/insertAll.js"); /* harmony import */ var _intersection_js__WEBPACK_IMPORTED_MODULE_94__ = __webpack_require__(/*! ./intersection.js */ "./node_modules/ramda/es/intersection.js"); /* harmony import */ var _intersperse_js__WEBPACK_IMPORTED_MODULE_95__ = __webpack_require__(/*! ./intersperse.js */ "./node_modules/ramda/es/intersperse.js"); /* harmony import */ var _into_js__WEBPACK_IMPORTED_MODULE_96__ = __webpack_require__(/*! ./into.js */ "./node_modules/ramda/es/into.js"); /* harmony import */ var _invert_js__WEBPACK_IMPORTED_MODULE_97__ = __webpack_require__(/*! ./invert.js */ "./node_modules/ramda/es/invert.js"); /* harmony import */ var _invertObj_js__WEBPACK_IMPORTED_MODULE_98__ = __webpack_require__(/*! ./invertObj.js */ "./node_modules/ramda/es/invertObj.js"); /* harmony import */ var _invoker_js__WEBPACK_IMPORTED_MODULE_99__ = __webpack_require__(/*! ./invoker.js */ "./node_modules/ramda/es/invoker.js"); /* harmony import */ var _is_js__WEBPACK_IMPORTED_MODULE_100__ = __webpack_require__(/*! ./is.js */ "./node_modules/ramda/es/is.js"); /* harmony import */ var _isEmpty_js__WEBPACK_IMPORTED_MODULE_101__ = __webpack_require__(/*! ./isEmpty.js */ "./node_modules/ramda/es/isEmpty.js"); /* harmony import */ var _isNil_js__WEBPACK_IMPORTED_MODULE_102__ = __webpack_require__(/*! ./isNil.js */ "./node_modules/ramda/es/isNil.js"); /* harmony import */ var _isNotNil_js__WEBPACK_IMPORTED_MODULE_103__ = __webpack_require__(/*! ./isNotNil.js */ "./node_modules/ramda/es/isNotNil.js"); /* harmony import */ var _join_js__WEBPACK_IMPORTED_MODULE_104__ = __webpack_require__(/*! ./join.js */ "./node_modules/ramda/es/join.js"); /* harmony import */ var _juxt_js__WEBPACK_IMPORTED_MODULE_105__ = __webpack_require__(/*! ./juxt.js */ "./node_modules/ramda/es/juxt.js"); /* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_106__ = __webpack_require__(/*! ./keys.js */ "./node_modules/ramda/es/keys.js"); /* harmony import */ var _keysIn_js__WEBPACK_IMPORTED_MODULE_107__ = __webpack_require__(/*! ./keysIn.js */ "./node_modules/ramda/es/keysIn.js"); /* harmony import */ var _last_js__WEBPACK_IMPORTED_MODULE_108__ = __webpack_require__(/*! ./last.js */ "./node_modules/ramda/es/last.js"); /* harmony import */ var _lastIndexOf_js__WEBPACK_IMPORTED_MODULE_109__ = __webpack_require__(/*! ./lastIndexOf.js */ "./node_modules/ramda/es/lastIndexOf.js"); /* harmony import */ var _length_js__WEBPACK_IMPORTED_MODULE_110__ = __webpack_require__(/*! ./length.js */ "./node_modules/ramda/es/length.js"); /* harmony import */ var _lens_js__WEBPACK_IMPORTED_MODULE_111__ = __webpack_require__(/*! ./lens.js */ "./node_modules/ramda/es/lens.js"); /* harmony import */ var _lensIndex_js__WEBPACK_IMPORTED_MODULE_112__ = __webpack_require__(/*! ./lensIndex.js */ "./node_modules/ramda/es/lensIndex.js"); /* harmony import */ var _lensPath_js__WEBPACK_IMPORTED_MODULE_113__ = __webpack_require__(/*! ./lensPath.js */ "./node_modules/ramda/es/lensPath.js"); /* harmony import */ var _lensProp_js__WEBPACK_IMPORTED_MODULE_114__ = __webpack_require__(/*! ./lensProp.js */ "./node_modules/ramda/es/lensProp.js"); /* harmony import */ var _lift_js__WEBPACK_IMPORTED_MODULE_115__ = __webpack_require__(/*! ./lift.js */ "./node_modules/ramda/es/lift.js"); /* harmony import */ var _liftN_js__WEBPACK_IMPORTED_MODULE_116__ = __webpack_require__(/*! ./liftN.js */ "./node_modules/ramda/es/liftN.js"); /* harmony import */ var _lt_js__WEBPACK_IMPORTED_MODULE_117__ = __webpack_require__(/*! ./lt.js */ "./node_modules/ramda/es/lt.js"); /* harmony import */ var _lte_js__WEBPACK_IMPORTED_MODULE_118__ = __webpack_require__(/*! ./lte.js */ "./node_modules/ramda/es/lte.js"); /* harmony import */ var _map_js__WEBPACK_IMPORTED_MODULE_119__ = __webpack_require__(/*! ./map.js */ "./node_modules/ramda/es/map.js"); /* harmony import */ var _mapAccum_js__WEBPACK_IMPORTED_MODULE_120__ = __webpack_require__(/*! ./mapAccum.js */ "./node_modules/ramda/es/mapAccum.js"); /* harmony import */ var _mapAccumRight_js__WEBPACK_IMPORTED_MODULE_121__ = __webpack_require__(/*! ./mapAccumRight.js */ "./node_modules/ramda/es/mapAccumRight.js"); /* harmony import */ var _mapObjIndexed_js__WEBPACK_IMPORTED_MODULE_122__ = __webpack_require__(/*! ./mapObjIndexed.js */ "./node_modules/ramda/es/mapObjIndexed.js"); /* harmony import */ var _match_js__WEBPACK_IMPORTED_MODULE_123__ = __webpack_require__(/*! ./match.js */ "./node_modules/ramda/es/match.js"); /* harmony import */ var _mathMod_js__WEBPACK_IMPORTED_MODULE_124__ = __webpack_require__(/*! ./mathMod.js */ "./node_modules/ramda/es/mathMod.js"); /* harmony import */ var _max_js__WEBPACK_IMPORTED_MODULE_125__ = __webpack_require__(/*! ./max.js */ "./node_modules/ramda/es/max.js"); /* harmony import */ var _maxBy_js__WEBPACK_IMPORTED_MODULE_126__ = __webpack_require__(/*! ./maxBy.js */ "./node_modules/ramda/es/maxBy.js"); /* harmony import */ var _mean_js__WEBPACK_IMPORTED_MODULE_127__ = __webpack_require__(/*! ./mean.js */ "./node_modules/ramda/es/mean.js"); /* harmony import */ var _median_js__WEBPACK_IMPORTED_MODULE_128__ = __webpack_require__(/*! ./median.js */ "./node_modules/ramda/es/median.js"); /* harmony import */ var _memoizeWith_js__WEBPACK_IMPORTED_MODULE_129__ = __webpack_require__(/*! ./memoizeWith.js */ "./node_modules/ramda/es/memoizeWith.js"); /* harmony import */ var _mergeAll_js__WEBPACK_IMPORTED_MODULE_130__ = __webpack_require__(/*! ./mergeAll.js */ "./node_modules/ramda/es/mergeAll.js"); /* harmony import */ var _mergeDeepLeft_js__WEBPACK_IMPORTED_MODULE_131__ = __webpack_require__(/*! ./mergeDeepLeft.js */ "./node_modules/ramda/es/mergeDeepLeft.js"); /* harmony import */ var _mergeDeepRight_js__WEBPACK_IMPORTED_MODULE_132__ = __webpack_require__(/*! ./mergeDeepRight.js */ "./node_modules/ramda/es/mergeDeepRight.js"); /* harmony import */ var _mergeDeepWith_js__WEBPACK_IMPORTED_MODULE_133__ = __webpack_require__(/*! ./mergeDeepWith.js */ "./node_modules/ramda/es/mergeDeepWith.js"); /* harmony import */ var _mergeDeepWithKey_js__WEBPACK_IMPORTED_MODULE_134__ = __webpack_require__(/*! ./mergeDeepWithKey.js */ "./node_modules/ramda/es/mergeDeepWithKey.js"); /* harmony import */ var _mergeLeft_js__WEBPACK_IMPORTED_MODULE_135__ = __webpack_require__(/*! ./mergeLeft.js */ "./node_modules/ramda/es/mergeLeft.js"); /* harmony import */ var _mergeRight_js__WEBPACK_IMPORTED_MODULE_136__ = __webpack_require__(/*! ./mergeRight.js */ "./node_modules/ramda/es/mergeRight.js"); /* harmony import */ var _mergeWith_js__WEBPACK_IMPORTED_MODULE_137__ = __webpack_require__(/*! ./mergeWith.js */ "./node_modules/ramda/es/mergeWith.js"); /* harmony import */ var _mergeWithKey_js__WEBPACK_IMPORTED_MODULE_138__ = __webpack_require__(/*! ./mergeWithKey.js */ "./node_modules/ramda/es/mergeWithKey.js"); /* harmony import */ var _min_js__WEBPACK_IMPORTED_MODULE_139__ = __webpack_require__(/*! ./min.js */ "./node_modules/ramda/es/min.js"); /* harmony import */ var _minBy_js__WEBPACK_IMPORTED_MODULE_140__ = __webpack_require__(/*! ./minBy.js */ "./node_modules/ramda/es/minBy.js"); /* harmony import */ var _modify_js__WEBPACK_IMPORTED_MODULE_141__ = __webpack_require__(/*! ./modify.js */ "./node_modules/ramda/es/modify.js"); /* harmony import */ var _modifyPath_js__WEBPACK_IMPORTED_MODULE_142__ = __webpack_require__(/*! ./modifyPath.js */ "./node_modules/ramda/es/modifyPath.js"); /* harmony import */ var _modulo_js__WEBPACK_IMPORTED_MODULE_143__ = __webpack_require__(/*! ./modulo.js */ "./node_modules/ramda/es/modulo.js"); /* harmony import */ var _move_js__WEBPACK_IMPORTED_MODULE_144__ = __webpack_require__(/*! ./move.js */ "./node_modules/ramda/es/move.js"); /* harmony import */ var _multiply_js__WEBPACK_IMPORTED_MODULE_145__ = __webpack_require__(/*! ./multiply.js */ "./node_modules/ramda/es/multiply.js"); /* harmony import */ var _nAry_js__WEBPACK_IMPORTED_MODULE_146__ = __webpack_require__(/*! ./nAry.js */ "./node_modules/ramda/es/nAry.js"); /* harmony import */ var _partialObject_js__WEBPACK_IMPORTED_MODULE_147__ = __webpack_require__(/*! ./partialObject.js */ "./node_modules/ramda/es/partialObject.js"); /* harmony import */ var _negate_js__WEBPACK_IMPORTED_MODULE_148__ = __webpack_require__(/*! ./negate.js */ "./node_modules/ramda/es/negate.js"); /* harmony import */ var _none_js__WEBPACK_IMPORTED_MODULE_149__ = __webpack_require__(/*! ./none.js */ "./node_modules/ramda/es/none.js"); /* harmony import */ var _not_js__WEBPACK_IMPORTED_MODULE_150__ = __webpack_require__(/*! ./not.js */ "./node_modules/ramda/es/not.js"); /* harmony import */ var _nth_js__WEBPACK_IMPORTED_MODULE_151__ = __webpack_require__(/*! ./nth.js */ "./node_modules/ramda/es/nth.js"); /* harmony import */ var _nthArg_js__WEBPACK_IMPORTED_MODULE_152__ = __webpack_require__(/*! ./nthArg.js */ "./node_modules/ramda/es/nthArg.js"); /* harmony import */ var _o_js__WEBPACK_IMPORTED_MODULE_153__ = __webpack_require__(/*! ./o.js */ "./node_modules/ramda/es/o.js"); /* harmony import */ var _objOf_js__WEBPACK_IMPORTED_MODULE_154__ = __webpack_require__(/*! ./objOf.js */ "./node_modules/ramda/es/objOf.js"); /* harmony import */ var _of_js__WEBPACK_IMPORTED_MODULE_155__ = __webpack_require__(/*! ./of.js */ "./node_modules/ramda/es/of.js"); /* harmony import */ var _omit_js__WEBPACK_IMPORTED_MODULE_156__ = __webpack_require__(/*! ./omit.js */ "./node_modules/ramda/es/omit.js"); /* harmony import */ var _on_js__WEBPACK_IMPORTED_MODULE_157__ = __webpack_require__(/*! ./on.js */ "./node_modules/ramda/es/on.js"); /* harmony import */ var _once_js__WEBPACK_IMPORTED_MODULE_158__ = __webpack_require__(/*! ./once.js */ "./node_modules/ramda/es/once.js"); /* harmony import */ var _or_js__WEBPACK_IMPORTED_MODULE_159__ = __webpack_require__(/*! ./or.js */ "./node_modules/ramda/es/or.js"); /* harmony import */ var _otherwise_js__WEBPACK_IMPORTED_MODULE_160__ = __webpack_require__(/*! ./otherwise.js */ "./node_modules/ramda/es/otherwise.js"); /* harmony import */ var _over_js__WEBPACK_IMPORTED_MODULE_161__ = __webpack_require__(/*! ./over.js */ "./node_modules/ramda/es/over.js"); /* harmony import */ var _pair_js__WEBPACK_IMPORTED_MODULE_162__ = __webpack_require__(/*! ./pair.js */ "./node_modules/ramda/es/pair.js"); /* harmony import */ var _partial_js__WEBPACK_IMPORTED_MODULE_163__ = __webpack_require__(/*! ./partial.js */ "./node_modules/ramda/es/partial.js"); /* harmony import */ var _partialRight_js__WEBPACK_IMPORTED_MODULE_164__ = __webpack_require__(/*! ./partialRight.js */ "./node_modules/ramda/es/partialRight.js"); /* harmony import */ var _partition_js__WEBPACK_IMPORTED_MODULE_165__ = __webpack_require__(/*! ./partition.js */ "./node_modules/ramda/es/partition.js"); /* harmony import */ var _path_js__WEBPACK_IMPORTED_MODULE_166__ = __webpack_require__(/*! ./path.js */ "./node_modules/ramda/es/path.js"); /* harmony import */ var _paths_js__WEBPACK_IMPORTED_MODULE_167__ = __webpack_require__(/*! ./paths.js */ "./node_modules/ramda/es/paths.js"); /* harmony import */ var _pathEq_js__WEBPACK_IMPORTED_MODULE_168__ = __webpack_require__(/*! ./pathEq.js */ "./node_modules/ramda/es/pathEq.js"); /* harmony import */ var _pathOr_js__WEBPACK_IMPORTED_MODULE_169__ = __webpack_require__(/*! ./pathOr.js */ "./node_modules/ramda/es/pathOr.js"); /* harmony import */ var _pathSatisfies_js__WEBPACK_IMPORTED_MODULE_170__ = __webpack_require__(/*! ./pathSatisfies.js */ "./node_modules/ramda/es/pathSatisfies.js"); /* harmony import */ var _pick_js__WEBPACK_IMPORTED_MODULE_171__ = __webpack_require__(/*! ./pick.js */ "./node_modules/ramda/es/pick.js"); /* harmony import */ var _pickAll_js__WEBPACK_IMPORTED_MODULE_172__ = __webpack_require__(/*! ./pickAll.js */ "./node_modules/ramda/es/pickAll.js"); /* harmony import */ var _pickBy_js__WEBPACK_IMPORTED_MODULE_173__ = __webpack_require__(/*! ./pickBy.js */ "./node_modules/ramda/es/pickBy.js"); /* harmony import */ var _pipe_js__WEBPACK_IMPORTED_MODULE_174__ = __webpack_require__(/*! ./pipe.js */ "./node_modules/ramda/es/pipe.js"); /* harmony import */ var _pipeWith_js__WEBPACK_IMPORTED_MODULE_175__ = __webpack_require__(/*! ./pipeWith.js */ "./node_modules/ramda/es/pipeWith.js"); /* harmony import */ var _pluck_js__WEBPACK_IMPORTED_MODULE_176__ = __webpack_require__(/*! ./pluck.js */ "./node_modules/ramda/es/pluck.js"); /* harmony import */ var _prepend_js__WEBPACK_IMPORTED_MODULE_177__ = __webpack_require__(/*! ./prepend.js */ "./node_modules/ramda/es/prepend.js"); /* harmony import */ var _product_js__WEBPACK_IMPORTED_MODULE_178__ = __webpack_require__(/*! ./product.js */ "./node_modules/ramda/es/product.js"); /* harmony import */ var _project_js__WEBPACK_IMPORTED_MODULE_179__ = __webpack_require__(/*! ./project.js */ "./node_modules/ramda/es/project.js"); /* harmony import */ var _promap_js__WEBPACK_IMPORTED_MODULE_180__ = __webpack_require__(/*! ./promap.js */ "./node_modules/ramda/es/promap.js"); /* harmony import */ var _prop_js__WEBPACK_IMPORTED_MODULE_181__ = __webpack_require__(/*! ./prop.js */ "./node_modules/ramda/es/prop.js"); /* harmony import */ var _propEq_js__WEBPACK_IMPORTED_MODULE_182__ = __webpack_require__(/*! ./propEq.js */ "./node_modules/ramda/es/propEq.js"); /* harmony import */ var _propIs_js__WEBPACK_IMPORTED_MODULE_183__ = __webpack_require__(/*! ./propIs.js */ "./node_modules/ramda/es/propIs.js"); /* harmony import */ var _propOr_js__WEBPACK_IMPORTED_MODULE_184__ = __webpack_require__(/*! ./propOr.js */ "./node_modules/ramda/es/propOr.js"); /* harmony import */ var _propSatisfies_js__WEBPACK_IMPORTED_MODULE_185__ = __webpack_require__(/*! ./propSatisfies.js */ "./node_modules/ramda/es/propSatisfies.js"); /* harmony import */ var _props_js__WEBPACK_IMPORTED_MODULE_186__ = __webpack_require__(/*! ./props.js */ "./node_modules/ramda/es/props.js"); /* harmony import */ var _range_js__WEBPACK_IMPORTED_MODULE_187__ = __webpack_require__(/*! ./range.js */ "./node_modules/ramda/es/range.js"); /* harmony import */ var _reduce_js__WEBPACK_IMPORTED_MODULE_188__ = __webpack_require__(/*! ./reduce.js */ "./node_modules/ramda/es/reduce.js"); /* harmony import */ var _reduceBy_js__WEBPACK_IMPORTED_MODULE_189__ = __webpack_require__(/*! ./reduceBy.js */ "./node_modules/ramda/es/reduceBy.js"); /* harmony import */ var _reduceRight_js__WEBPACK_IMPORTED_MODULE_190__ = __webpack_require__(/*! ./reduceRight.js */ "./node_modules/ramda/es/reduceRight.js"); /* harmony import */ var _reduceWhile_js__WEBPACK_IMPORTED_MODULE_191__ = __webpack_require__(/*! ./reduceWhile.js */ "./node_modules/ramda/es/reduceWhile.js"); /* harmony import */ var _reduced_js__WEBPACK_IMPORTED_MODULE_192__ = __webpack_require__(/*! ./reduced.js */ "./node_modules/ramda/es/reduced.js"); /* harmony import */ var _reject_js__WEBPACK_IMPORTED_MODULE_193__ = __webpack_require__(/*! ./reject.js */ "./node_modules/ramda/es/reject.js"); /* harmony import */ var _remove_js__WEBPACK_IMPORTED_MODULE_194__ = __webpack_require__(/*! ./remove.js */ "./node_modules/ramda/es/remove.js"); /* harmony import */ var _repeat_js__WEBPACK_IMPORTED_MODULE_195__ = __webpack_require__(/*! ./repeat.js */ "./node_modules/ramda/es/repeat.js"); /* harmony import */ var _replace_js__WEBPACK_IMPORTED_MODULE_196__ = __webpack_require__(/*! ./replace.js */ "./node_modules/ramda/es/replace.js"); /* harmony import */ var _reverse_js__WEBPACK_IMPORTED_MODULE_197__ = __webpack_require__(/*! ./reverse.js */ "./node_modules/ramda/es/reverse.js"); /* harmony import */ var _scan_js__WEBPACK_IMPORTED_MODULE_198__ = __webpack_require__(/*! ./scan.js */ "./node_modules/ramda/es/scan.js"); /* harmony import */ var _sequence_js__WEBPACK_IMPORTED_MODULE_199__ = __webpack_require__(/*! ./sequence.js */ "./node_modules/ramda/es/sequence.js"); /* harmony import */ var _set_js__WEBPACK_IMPORTED_MODULE_200__ = __webpack_require__(/*! ./set.js */ "./node_modules/ramda/es/set.js"); /* harmony import */ var _slice_js__WEBPACK_IMPORTED_MODULE_201__ = __webpack_require__(/*! ./slice.js */ "./node_modules/ramda/es/slice.js"); /* harmony import */ var _sort_js__WEBPACK_IMPORTED_MODULE_202__ = __webpack_require__(/*! ./sort.js */ "./node_modules/ramda/es/sort.js"); /* harmony import */ var _sortBy_js__WEBPACK_IMPORTED_MODULE_203__ = __webpack_require__(/*! ./sortBy.js */ "./node_modules/ramda/es/sortBy.js"); /* harmony import */ var _sortWith_js__WEBPACK_IMPORTED_MODULE_204__ = __webpack_require__(/*! ./sortWith.js */ "./node_modules/ramda/es/sortWith.js"); /* harmony import */ var _split_js__WEBPACK_IMPORTED_MODULE_205__ = __webpack_require__(/*! ./split.js */ "./node_modules/ramda/es/split.js"); /* harmony import */ var _splitAt_js__WEBPACK_IMPORTED_MODULE_206__ = __webpack_require__(/*! ./splitAt.js */ "./node_modules/ramda/es/splitAt.js"); /* harmony import */ var _splitEvery_js__WEBPACK_IMPORTED_MODULE_207__ = __webpack_require__(/*! ./splitEvery.js */ "./node_modules/ramda/es/splitEvery.js"); /* harmony import */ var _splitWhen_js__WEBPACK_IMPORTED_MODULE_208__ = __webpack_require__(/*! ./splitWhen.js */ "./node_modules/ramda/es/splitWhen.js"); /* harmony import */ var _splitWhenever_js__WEBPACK_IMPORTED_MODULE_209__ = __webpack_require__(/*! ./splitWhenever.js */ "./node_modules/ramda/es/splitWhenever.js"); /* harmony import */ var _startsWith_js__WEBPACK_IMPORTED_MODULE_210__ = __webpack_require__(/*! ./startsWith.js */ "./node_modules/ramda/es/startsWith.js"); /* harmony import */ var _subtract_js__WEBPACK_IMPORTED_MODULE_211__ = __webpack_require__(/*! ./subtract.js */ "./node_modules/ramda/es/subtract.js"); /* harmony import */ var _sum_js__WEBPACK_IMPORTED_MODULE_212__ = __webpack_require__(/*! ./sum.js */ "./node_modules/ramda/es/sum.js"); /* harmony import */ var _swap_js__WEBPACK_IMPORTED_MODULE_213__ = __webpack_require__(/*! ./swap.js */ "./node_modules/ramda/es/swap.js"); /* harmony import */ var _symmetricDifference_js__WEBPACK_IMPORTED_MODULE_214__ = __webpack_require__(/*! ./symmetricDifference.js */ "./node_modules/ramda/es/symmetricDifference.js"); /* harmony import */ var _symmetricDifferenceWith_js__WEBPACK_IMPORTED_MODULE_215__ = __webpack_require__(/*! ./symmetricDifferenceWith.js */ "./node_modules/ramda/es/symmetricDifferenceWith.js"); /* harmony import */ var _tail_js__WEBPACK_IMPORTED_MODULE_216__ = __webpack_require__(/*! ./tail.js */ "./node_modules/ramda/es/tail.js"); /* harmony import */ var _take_js__WEBPACK_IMPORTED_MODULE_217__ = __webpack_require__(/*! ./take.js */ "./node_modules/ramda/es/take.js"); /* harmony import */ var _takeLast_js__WEBPACK_IMPORTED_MODULE_218__ = __webpack_require__(/*! ./takeLast.js */ "./node_modules/ramda/es/takeLast.js"); /* harmony import */ var _takeLastWhile_js__WEBPACK_IMPORTED_MODULE_219__ = __webpack_require__(/*! ./takeLastWhile.js */ "./node_modules/ramda/es/takeLastWhile.js"); /* harmony import */ var _takeWhile_js__WEBPACK_IMPORTED_MODULE_220__ = __webpack_require__(/*! ./takeWhile.js */ "./node_modules/ramda/es/takeWhile.js"); /* harmony import */ var _tap_js__WEBPACK_IMPORTED_MODULE_221__ = __webpack_require__(/*! ./tap.js */ "./node_modules/ramda/es/tap.js"); /* harmony import */ var _test_js__WEBPACK_IMPORTED_MODULE_222__ = __webpack_require__(/*! ./test.js */ "./node_modules/ramda/es/test.js"); /* harmony import */ var _andThen_js__WEBPACK_IMPORTED_MODULE_223__ = __webpack_require__(/*! ./andThen.js */ "./node_modules/ramda/es/andThen.js"); /* harmony import */ var _times_js__WEBPACK_IMPORTED_MODULE_224__ = __webpack_require__(/*! ./times.js */ "./node_modules/ramda/es/times.js"); /* harmony import */ var _toLower_js__WEBPACK_IMPORTED_MODULE_225__ = __webpack_require__(/*! ./toLower.js */ "./node_modules/ramda/es/toLower.js"); /* harmony import */ var _toPairs_js__WEBPACK_IMPORTED_MODULE_226__ = __webpack_require__(/*! ./toPairs.js */ "./node_modules/ramda/es/toPairs.js"); /* harmony import */ var _toPairsIn_js__WEBPACK_IMPORTED_MODULE_227__ = __webpack_require__(/*! ./toPairsIn.js */ "./node_modules/ramda/es/toPairsIn.js"); /* harmony import */ var _toString_js__WEBPACK_IMPORTED_MODULE_228__ = __webpack_require__(/*! ./toString.js */ "./node_modules/ramda/es/toString.js"); /* harmony import */ var _toUpper_js__WEBPACK_IMPORTED_MODULE_229__ = __webpack_require__(/*! ./toUpper.js */ "./node_modules/ramda/es/toUpper.js"); /* harmony import */ var _transduce_js__WEBPACK_IMPORTED_MODULE_230__ = __webpack_require__(/*! ./transduce.js */ "./node_modules/ramda/es/transduce.js"); /* harmony import */ var _transpose_js__WEBPACK_IMPORTED_MODULE_231__ = __webpack_require__(/*! ./transpose.js */ "./node_modules/ramda/es/transpose.js"); /* harmony import */ var _traverse_js__WEBPACK_IMPORTED_MODULE_232__ = __webpack_require__(/*! ./traverse.js */ "./node_modules/ramda/es/traverse.js"); /* harmony import */ var _trim_js__WEBPACK_IMPORTED_MODULE_233__ = __webpack_require__(/*! ./trim.js */ "./node_modules/ramda/es/trim.js"); /* harmony import */ var _tryCatch_js__WEBPACK_IMPORTED_MODULE_234__ = __webpack_require__(/*! ./tryCatch.js */ "./node_modules/ramda/es/tryCatch.js"); /* harmony import */ var _type_js__WEBPACK_IMPORTED_MODULE_235__ = __webpack_require__(/*! ./type.js */ "./node_modules/ramda/es/type.js"); /* harmony import */ var _unapply_js__WEBPACK_IMPORTED_MODULE_236__ = __webpack_require__(/*! ./unapply.js */ "./node_modules/ramda/es/unapply.js"); /* harmony import */ var _unary_js__WEBPACK_IMPORTED_MODULE_237__ = __webpack_require__(/*! ./unary.js */ "./node_modules/ramda/es/unary.js"); /* harmony import */ var _uncurryN_js__WEBPACK_IMPORTED_MODULE_238__ = __webpack_require__(/*! ./uncurryN.js */ "./node_modules/ramda/es/uncurryN.js"); /* harmony import */ var _unfold_js__WEBPACK_IMPORTED_MODULE_239__ = __webpack_require__(/*! ./unfold.js */ "./node_modules/ramda/es/unfold.js"); /* harmony import */ var _union_js__WEBPACK_IMPORTED_MODULE_240__ = __webpack_require__(/*! ./union.js */ "./node_modules/ramda/es/union.js"); /* harmony import */ var _unionWith_js__WEBPACK_IMPORTED_MODULE_241__ = __webpack_require__(/*! ./unionWith.js */ "./node_modules/ramda/es/unionWith.js"); /* harmony import */ var _uniq_js__WEBPACK_IMPORTED_MODULE_242__ = __webpack_require__(/*! ./uniq.js */ "./node_modules/ramda/es/uniq.js"); /* harmony import */ var _uniqBy_js__WEBPACK_IMPORTED_MODULE_243__ = __webpack_require__(/*! ./uniqBy.js */ "./node_modules/ramda/es/uniqBy.js"); /* harmony import */ var _uniqWith_js__WEBPACK_IMPORTED_MODULE_244__ = __webpack_require__(/*! ./uniqWith.js */ "./node_modules/ramda/es/uniqWith.js"); /* harmony import */ var _unless_js__WEBPACK_IMPORTED_MODULE_245__ = __webpack_require__(/*! ./unless.js */ "./node_modules/ramda/es/unless.js"); /* harmony import */ var _unnest_js__WEBPACK_IMPORTED_MODULE_246__ = __webpack_require__(/*! ./unnest.js */ "./node_modules/ramda/es/unnest.js"); /* harmony import */ var _until_js__WEBPACK_IMPORTED_MODULE_247__ = __webpack_require__(/*! ./until.js */ "./node_modules/ramda/es/until.js"); /* harmony import */ var _unwind_js__WEBPACK_IMPORTED_MODULE_248__ = __webpack_require__(/*! ./unwind.js */ "./node_modules/ramda/es/unwind.js"); /* harmony import */ var _update_js__WEBPACK_IMPORTED_MODULE_249__ = __webpack_require__(/*! ./update.js */ "./node_modules/ramda/es/update.js"); /* harmony import */ var _useWith_js__WEBPACK_IMPORTED_MODULE_250__ = __webpack_require__(/*! ./useWith.js */ "./node_modules/ramda/es/useWith.js"); /* harmony import */ var _values_js__WEBPACK_IMPORTED_MODULE_251__ = __webpack_require__(/*! ./values.js */ "./node_modules/ramda/es/values.js"); /* harmony import */ var _valuesIn_js__WEBPACK_IMPORTED_MODULE_252__ = __webpack_require__(/*! ./valuesIn.js */ "./node_modules/ramda/es/valuesIn.js"); /* harmony import */ var _view_js__WEBPACK_IMPORTED_MODULE_253__ = __webpack_require__(/*! ./view.js */ "./node_modules/ramda/es/view.js"); /* harmony import */ var _when_js__WEBPACK_IMPORTED_MODULE_254__ = __webpack_require__(/*! ./when.js */ "./node_modules/ramda/es/when.js"); /* harmony import */ var _where_js__WEBPACK_IMPORTED_MODULE_255__ = __webpack_require__(/*! ./where.js */ "./node_modules/ramda/es/where.js"); /* harmony import */ var _whereAny_js__WEBPACK_IMPORTED_MODULE_256__ = __webpack_require__(/*! ./whereAny.js */ "./node_modules/ramda/es/whereAny.js"); /* harmony import */ var _whereEq_js__WEBPACK_IMPORTED_MODULE_257__ = __webpack_require__(/*! ./whereEq.js */ "./node_modules/ramda/es/whereEq.js"); /* harmony import */ var _without_js__WEBPACK_IMPORTED_MODULE_258__ = __webpack_require__(/*! ./without.js */ "./node_modules/ramda/es/without.js"); /* harmony import */ var _xor_js__WEBPACK_IMPORTED_MODULE_259__ = __webpack_require__(/*! ./xor.js */ "./node_modules/ramda/es/xor.js"); /* harmony import */ var _xprod_js__WEBPACK_IMPORTED_MODULE_260__ = __webpack_require__(/*! ./xprod.js */ "./node_modules/ramda/es/xprod.js"); /* harmony import */ var _zip_js__WEBPACK_IMPORTED_MODULE_261__ = __webpack_require__(/*! ./zip.js */ "./node_modules/ramda/es/zip.js"); /* harmony import */ var _zipObj_js__WEBPACK_IMPORTED_MODULE_262__ = __webpack_require__(/*! ./zipObj.js */ "./node_modules/ramda/es/zipObj.js"); /* harmony import */ var _zipWith_js__WEBPACK_IMPORTED_MODULE_263__ = __webpack_require__(/*! ./zipWith.js */ "./node_modules/ramda/es/zipWith.js"); /* harmony import */ var _thunkify_js__WEBPACK_IMPORTED_MODULE_264__ = __webpack_require__(/*! ./thunkify.js */ "./node_modules/ramda/es/thunkify.js"); /***/ }), /***/ "./node_modules/ramda/es/indexBy.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/indexBy.js ***! \******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _reduceBy_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./reduceBy.js */ "./node_modules/ramda/es/reduceBy.js"); /** * Given a function that generates a key, turns a list of objects into an * object indexing the objects by the given key. Note that if multiple * objects generate the same value for the indexing key only the last value * will be included in the generated object. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.19.0 * @category List * @typedefn Idx = String | Int | Symbol * @sig Idx a => (b -> a) -> [b] -> {a: b} * @param {Function} fn Function :: a -> Idx * @param {Array} array The array of objects to index * @return {Object} An object indexing each array element by the given property. * @see R.groupBy * @example * * const list = [{id: 'xyz', title: 'A'}, {id: 'abc', title: 'B'}]; * R.indexBy(R.prop('id'), list); * //=> {abc: {id: 'abc', title: 'B'}, xyz: {id: 'xyz', title: 'A'}} */ var indexBy = /*#__PURE__*/ (0,_reduceBy_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function (acc, elem) { return elem; }, null); /* harmony default export */ __webpack_exports__["default"] = (indexBy); /***/ }), /***/ "./node_modules/ramda/es/indexOf.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/indexOf.js ***! \******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_indexOf_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_indexOf.js */ "./node_modules/ramda/es/internal/_indexOf.js"); /* harmony import */ var _internal_isArray_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_isArray.js */ "./node_modules/ramda/es/internal/_isArray.js"); /** * Returns the position of the first occurrence of an item in an array, or -1 * if the item is not included in the array. [`R.equals`](#equals) is used to * determine equality. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig a -> [a] -> Number * @param {*} target The item to find. * @param {Array} xs The array to search in. * @return {Number} the index of the target, or -1 if the target is not found. * @see R.lastIndexOf, R.findIndex * @example * * R.indexOf(3, [1,2,3,4]); //=> 2 * R.indexOf(10, [1,2,3,4]); //=> -1 */ var indexOf = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function indexOf(target, xs) { return typeof xs.indexOf === 'function' && !(0,_internal_isArray_js__WEBPACK_IMPORTED_MODULE_2__["default"])(xs) ? xs.indexOf(target) : (0,_internal_indexOf_js__WEBPACK_IMPORTED_MODULE_1__["default"])(xs, target, 0); }); /* harmony default export */ __webpack_exports__["default"] = (indexOf); /***/ }), /***/ "./node_modules/ramda/es/init.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/init.js ***! \***************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _slice_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./slice.js */ "./node_modules/ramda/es/slice.js"); /** * Returns all but the last element of the given list or string. * * @func * @memberOf R * @since v0.9.0 * @category List * @sig [a] -> [a] * @sig String -> String * @param {*} list * @return {*} * @see R.last, R.head, R.tail * @example * * R.init([1, 2, 3]); //=> [1, 2] * R.init([1, 2]); //=> [1] * R.init([1]); //=> [] * R.init([]); //=> [] * * R.init('abc'); //=> 'ab' * R.init('ab'); //=> 'a' * R.init('a'); //=> '' * R.init(''); //=> '' */ var init = /*#__PURE__*/ (0,_slice_js__WEBPACK_IMPORTED_MODULE_0__["default"])(0, -1); /* harmony default export */ __webpack_exports__["default"] = (init); /***/ }), /***/ "./node_modules/ramda/es/innerJoin.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/innerJoin.js ***! \********************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_includesWith_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_includesWith.js */ "./node_modules/ramda/es/internal/_includesWith.js"); /* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _internal_filter_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_filter.js */ "./node_modules/ramda/es/internal/_filter.js"); /** * Takes a predicate `pred`, a list `xs`, and a list `ys`, and returns a list * `xs'` comprising each of the elements of `xs` which is equal to one or more * elements of `ys` according to `pred`. * * `pred` must be a binary function expecting an element from each list. * * `xs`, `ys`, and `xs'` are treated as sets, semantically, so ordering should * not be significant, but since `xs'` is ordered the implementation guarantees * that its values are in the same order as they appear in `xs`. Duplicates are * not removed, so `xs'` may contain duplicates if `xs` contains duplicates. * * @func * @memberOf R * @since v0.24.0 * @category Relation * @sig ((a, b) -> Boolean) -> [a] -> [b] -> [a] * @param {Function} pred * @param {Array} xs * @param {Array} ys * @return {Array} * @see R.intersection * @example * * R.innerJoin( * (record, id) => record.id === id, * [{id: 824, name: 'Richie Furay'}, * {id: 956, name: 'Dewey Martin'}, * {id: 313, name: 'Bruce Palmer'}, * {id: 456, name: 'Stephen Stills'}, * {id: 177, name: 'Neil Young'}], * [177, 456, 999] * ); * //=> [{id: 456, name: 'Stephen Stills'}, {id: 177, name: 'Neil Young'}] */ var innerJoin = /*#__PURE__*/ (0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_1__["default"])(function innerJoin(pred, xs, ys) { return (0,_internal_filter_js__WEBPACK_IMPORTED_MODULE_2__["default"])(function (x) { return (0,_internal_includesWith_js__WEBPACK_IMPORTED_MODULE_0__["default"])(pred, x, ys); }, xs); }); /* harmony default export */ __webpack_exports__["default"] = (innerJoin); /***/ }), /***/ "./node_modules/ramda/es/insert.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/insert.js ***! \*****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Inserts the supplied element into the list, at the specified `index`. _Note that * this is not destructive_: it returns a copy of the list with the changes. * No lists have been harmed in the application of this function. * * @func * @memberOf R * @since v0.2.2 * @category List * @sig Number -> a -> [a] -> [a] * @param {Number} index The position to insert the element * @param {*} elt The element to insert into the Array * @param {Array} list The list to insert into * @return {Array} A new Array with `elt` inserted at `index`. * @example * * R.insert(2, 'x', [1,2,3,4]); //=> [1,2,'x',3,4] */ var insert = /*#__PURE__*/ (0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function insert(idx, elt, list) { idx = idx < list.length && idx >= 0 ? idx : list.length; var result = Array.prototype.slice.call(list, 0); result.splice(idx, 0, elt); return result; }); /* harmony default export */ __webpack_exports__["default"] = (insert); /***/ }), /***/ "./node_modules/ramda/es/insertAll.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/insertAll.js ***! \********************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Inserts the sub-list into the list, at the specified `index`. _Note that this is not * destructive_: it returns a copy of the list with the changes. * No lists have been harmed in the application of this function. * * @func * @memberOf R * @since v0.9.0 * @category List * @sig Number -> [a] -> [a] -> [a] * @param {Number} index The position to insert the sub-list * @param {Array} elts The sub-list to insert into the Array * @param {Array} list The list to insert the sub-list into * @return {Array} A new Array with `elts` inserted starting at `index`. * @example * * R.insertAll(2, ['x','y','z'], [1,2,3,4]); //=> [1,2,'x','y','z',3,4] */ var insertAll = /*#__PURE__*/ (0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function insertAll(idx, elts, list) { idx = idx < list.length && idx >= 0 ? idx : list.length; return [].concat(Array.prototype.slice.call(list, 0, idx), elts, Array.prototype.slice.call(list, idx)); }); /* harmony default export */ __webpack_exports__["default"] = (insertAll); /***/ }), /***/ "./node_modules/ramda/es/internal/_Set.js": /*!************************************************!*\ !*** ./node_modules/ramda/es/internal/_Set.js ***! \************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _includes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_includes.js */ "./node_modules/ramda/es/internal/_includes.js"); var _Set = /*#__PURE__*/ function () { function _Set() { /* globals Set */ this._nativeSet = typeof Set === 'function' ? new Set() : null; this._items = {}; } // until we figure out why jsdoc chokes on this // @param item The item to add to the Set // @returns {boolean} true if the item did not exist prior, otherwise false // _Set.prototype.add = function (item) { return !hasOrAdd(item, true, this); }; // // @param item The item to check for existence in the Set // @returns {boolean} true if the item exists in the Set, otherwise false // _Set.prototype.has = function (item) { return hasOrAdd(item, false, this); }; // // Combines the logic for checking whether an item is a member of the set and // for adding a new item to the set. // // @param item The item to check or add to the Set instance. // @param shouldAdd If true, the item will be added to the set if it doesn't // already exist. // @param set The set instance to check or add to. // @return {boolean} true if the item already existed, otherwise false. // return _Set; }(); function hasOrAdd(item, shouldAdd, set) { var type = typeof item; var prevSize, newSize; switch (type) { case 'string': case 'number': // distinguish between +0 and -0 if (item === 0 && 1 / item === -Infinity) { if (set._items['-0']) { return true; } else { if (shouldAdd) { set._items['-0'] = true; } return false; } } // these types can all utilise the native Set if (set._nativeSet !== null) { if (shouldAdd) { prevSize = set._nativeSet.size; set._nativeSet.add(item); newSize = set._nativeSet.size; return newSize === prevSize; } else { return set._nativeSet.has(item); } } else { if (!(type in set._items)) { if (shouldAdd) { set._items[type] = {}; set._items[type][item] = true; } return false; } else if (item in set._items[type]) { return true; } else { if (shouldAdd) { set._items[type][item] = true; } return false; } } case 'boolean': // set._items['boolean'] holds a two element array // representing [ falseExists, trueExists ] if (type in set._items) { var bIdx = item ? 1 : 0; if (set._items[type][bIdx]) { return true; } else { if (shouldAdd) { set._items[type][bIdx] = true; } return false; } } else { if (shouldAdd) { set._items[type] = item ? [false, true] : [true, false]; } return false; } case 'function': // compare functions for reference equality if (set._nativeSet !== null) { if (shouldAdd) { prevSize = set._nativeSet.size; set._nativeSet.add(item); newSize = set._nativeSet.size; return newSize === prevSize; } else { return set._nativeSet.has(item); } } else { if (!(type in set._items)) { if (shouldAdd) { set._items[type] = [item]; } return false; } if (!(0,_includes_js__WEBPACK_IMPORTED_MODULE_0__["default"])(item, set._items[type])) { if (shouldAdd) { set._items[type].push(item); } return false; } return true; } case 'undefined': if (set._items[type]) { return true; } else { if (shouldAdd) { set._items[type] = true; } return false; } case 'object': if (item === null) { if (!set._items['null']) { if (shouldAdd) { set._items['null'] = true; } return false; } return true; } /* falls through */ default: // reduce the search size of heterogeneous sets by creating buckets // for each type. type = Object.prototype.toString.call(item); if (!(type in set._items)) { if (shouldAdd) { set._items[type] = [item]; } return false; } // scan through all previously applied items if (!(0,_includes_js__WEBPACK_IMPORTED_MODULE_0__["default"])(item, set._items[type])) { if (shouldAdd) { set._items[type].push(item); } return false; } return true; } } // A simple Set type that honours R.equals semantics /* harmony default export */ __webpack_exports__["default"] = (_Set); /***/ }), /***/ "./node_modules/ramda/es/internal/_aperture.js": /*!*****************************************************!*\ !*** ./node_modules/ramda/es/internal/_aperture.js ***! \*****************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _aperture; } /* harmony export */ }); function _aperture(n, list) { var idx = 0; var limit = list.length - (n - 1); var acc = new Array(limit >= 0 ? limit : 0); while (idx < limit) { acc[idx] = Array.prototype.slice.call(list, idx, idx + n); idx += 1; } return acc; } /***/ }), /***/ "./node_modules/ramda/es/internal/_arity.js": /*!**************************************************!*\ !*** ./node_modules/ramda/es/internal/_arity.js ***! \**************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _arity; } /* harmony export */ }); function _arity(n, fn) { /* eslint-disable no-unused-vars */ switch (n) { case 0: return function () { return fn.apply(this, arguments); }; case 1: return function (a0) { return fn.apply(this, arguments); }; case 2: return function (a0, a1) { return fn.apply(this, arguments); }; case 3: return function (a0, a1, a2) { return fn.apply(this, arguments); }; case 4: return function (a0, a1, a2, a3) { return fn.apply(this, arguments); }; case 5: return function (a0, a1, a2, a3, a4) { return fn.apply(this, arguments); }; case 6: return function (a0, a1, a2, a3, a4, a5) { return fn.apply(this, arguments); }; case 7: return function (a0, a1, a2, a3, a4, a5, a6) { return fn.apply(this, arguments); }; case 8: return function (a0, a1, a2, a3, a4, a5, a6, a7) { return fn.apply(this, arguments); }; case 9: return function (a0, a1, a2, a3, a4, a5, a6, a7, a8) { return fn.apply(this, arguments); }; case 10: return function (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) { return fn.apply(this, arguments); }; default: throw new Error('First argument to _arity must be a non-negative integer no greater than ten'); } } /***/ }), /***/ "./node_modules/ramda/es/internal/_arrayFromIterator.js": /*!**************************************************************!*\ !*** ./node_modules/ramda/es/internal/_arrayFromIterator.js ***! \**************************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _arrayFromIterator; } /* harmony export */ }); function _arrayFromIterator(iter) { var list = []; var next; while (!(next = iter.next()).done) { list.push(next.value); } return list; } /***/ }), /***/ "./node_modules/ramda/es/internal/_arrayReduce.js": /*!********************************************************!*\ !*** ./node_modules/ramda/es/internal/_arrayReduce.js ***! \********************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _arrayReduce; } /* harmony export */ }); function _arrayReduce(reducer, acc, list) { var index = 0; var length = list.length; while (index < length) { acc = reducer(acc, list[index]); index += 1; } return acc; } /***/ }), /***/ "./node_modules/ramda/es/internal/_assertPromise.js": /*!**********************************************************!*\ !*** ./node_modules/ramda/es/internal/_assertPromise.js ***! \**********************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _assertPromise; } /* harmony export */ }); /* harmony import */ var _isFunction_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_isFunction.js */ "./node_modules/ramda/es/internal/_isFunction.js"); /* harmony import */ var _toString_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_toString.js */ "./node_modules/ramda/es/internal/_toString.js"); function _assertPromise(name, p) { if (p == null || !(0,_isFunction_js__WEBPACK_IMPORTED_MODULE_0__["default"])(p.then)) { throw new TypeError('`' + name + '` expected a Promise, received ' + (0,_toString_js__WEBPACK_IMPORTED_MODULE_1__["default"])(p, [])); } } /***/ }), /***/ "./node_modules/ramda/es/internal/_assoc.js": /*!**************************************************!*\ !*** ./node_modules/ramda/es/internal/_assoc.js ***! \**************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _assoc; } /* harmony export */ }); /* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_isArray.js */ "./node_modules/ramda/es/internal/_isArray.js"); /* harmony import */ var _isInteger_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_isInteger.js */ "./node_modules/ramda/es/internal/_isInteger.js"); /** * Makes a shallow clone of an object, setting or overriding the specified * property with the given value. Note that this copies and flattens prototype * properties onto the new object as well. All non-primitive properties are * copied by reference. * * @private * @param {String|Number} prop The property name to set * @param {*} val The new value * @param {Object|Array} obj The object to clone * @return {Object|Array} A new object equivalent to the original except for the changed property. */ function _assoc(prop, val, obj) { if ((0,_isInteger_js__WEBPACK_IMPORTED_MODULE_1__["default"])(prop) && (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__["default"])(obj)) { var arr = [].concat(obj); arr[prop] = val; return arr; } var result = {}; for (var p in obj) { result[p] = obj[p]; } result[prop] = val; return result; } /***/ }), /***/ "./node_modules/ramda/es/internal/_checkForMethod.js": /*!***********************************************************!*\ !*** ./node_modules/ramda/es/internal/_checkForMethod.js ***! \***********************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _checkForMethod; } /* harmony export */ }); /* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_isArray.js */ "./node_modules/ramda/es/internal/_isArray.js"); /** * This checks whether a function has a [methodname] function. If it isn't an * array it will execute that function otherwise it will default to the ramda * implementation. * * @private * @param {Function} fn ramda implementation * @param {String} methodname property to check for a custom implementation * @return {Object} Whatever the return value of the method is. */ function _checkForMethod(methodname, fn) { return function () { var length = arguments.length; if (length === 0) { return fn(); } var obj = arguments[length - 1]; return (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__["default"])(obj) || typeof obj[methodname] !== 'function' ? fn.apply(this, arguments) : obj[methodname].apply(obj, Array.prototype.slice.call(arguments, 0, length - 1)); }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_clone.js": /*!**************************************************!*\ !*** ./node_modules/ramda/es/internal/_clone.js ***! \**************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _clone; } /* harmony export */ }); /* harmony import */ var _cloneRegExp_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_cloneRegExp.js */ "./node_modules/ramda/es/internal/_cloneRegExp.js"); /* harmony import */ var _type_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../type.js */ "./node_modules/ramda/es/type.js"); /** * Copies an object. * * @private * @param {*} value The value to be copied * @param {Boolean} deep Whether or not to perform deep cloning. * @return {*} The copied value. */ function _clone(value, deep, map) { map || (map = new _ObjectMap()); // this avoids the slower switch with a quick if decision removing some milliseconds in each run. if (_isPrimitive(value)) { return value; } var copy = function copy(copiedValue) { // Check for circular and same references on the object graph and return its corresponding clone. var cachedCopy = map.get(value); if (cachedCopy) { return cachedCopy; } map.set(value, copiedValue); for (var key in value) { if (Object.prototype.hasOwnProperty.call(value, key)) { copiedValue[key] = deep ? _clone(value[key], true, map) : value[key]; } } return copiedValue; }; switch ((0,_type_js__WEBPACK_IMPORTED_MODULE_1__["default"])(value)) { case 'Object': return copy(Object.create(Object.getPrototypeOf(value))); case 'Array': return copy([]); case 'Date': return new Date(value.valueOf()); case 'RegExp': return (0,_cloneRegExp_js__WEBPACK_IMPORTED_MODULE_0__["default"])(value); case 'Int8Array': case 'Uint8Array': case 'Uint8ClampedArray': case 'Int16Array': case 'Uint16Array': case 'Int32Array': case 'Uint32Array': case 'Float32Array': case 'Float64Array': case 'BigInt64Array': case 'BigUint64Array': return value.slice(); default: return value; } } function _isPrimitive(param) { var type = typeof param; return param == null || type != 'object' && type != 'function'; } var _ObjectMap = /*#__PURE__*/ function () { function _ObjectMap() { this.map = {}; this.length = 0; } _ObjectMap.prototype.set = function (key, value) { var hashedKey = this.hash(key); var bucket = this.map[hashedKey]; if (!bucket) { this.map[hashedKey] = bucket = []; } bucket.push([key, value]); this.length += 1; }; _ObjectMap.prototype.hash = function (key) { var hashedKey = []; for (var value in key) { hashedKey.push(Object.prototype.toString.call(key[value])); } return hashedKey.join(); }; _ObjectMap.prototype.get = function (key) { /** * depending on the number of objects to be cloned is faster to just iterate over the items in the map just because the hash function is so costly, * on my tests this number is 180, anything above that using the hash function is faster. */ if (this.length <= 180) { for (var p in this.map) { var _bucket = this.map[p]; for (var i = 0; i < _bucket.length; i += 1) { var element = _bucket[i]; if (element[0] === key) { return element[1]; } } } return; } var hashedKey = this.hash(key); var bucket = this.map[hashedKey]; if (!bucket) { return; } for (var _i = 0; _i < bucket.length; _i += 1) { var _element = bucket[_i]; if (_element[0] === key) { return _element[1]; } } }; return _ObjectMap; }(); /***/ }), /***/ "./node_modules/ramda/es/internal/_cloneRegExp.js": /*!********************************************************!*\ !*** ./node_modules/ramda/es/internal/_cloneRegExp.js ***! \********************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _cloneRegExp; } /* harmony export */ }); function _cloneRegExp(pattern) { return new RegExp(pattern.source, pattern.flags ? pattern.flags : (pattern.global ? 'g' : '') + (pattern.ignoreCase ? 'i' : '') + (pattern.multiline ? 'm' : '') + (pattern.sticky ? 'y' : '') + (pattern.unicode ? 'u' : '') + (pattern.dotAll ? 's' : '')); } /***/ }), /***/ "./node_modules/ramda/es/internal/_complement.js": /*!*******************************************************!*\ !*** ./node_modules/ramda/es/internal/_complement.js ***! \*******************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _complement; } /* harmony export */ }); function _complement(f) { return function () { return !f.apply(this, arguments); }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_concat.js": /*!***************************************************!*\ !*** ./node_modules/ramda/es/internal/_concat.js ***! \***************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _concat; } /* harmony export */ }); /** * Private `concat` function to merge two array-like objects. * * @private * @param {Array|Arguments} [set1=[]] An array-like object. * @param {Array|Arguments} [set2=[]] An array-like object. * @return {Array} A new, merged array. * @example * * _concat([4, 5, 6], [1, 2, 3]); //=> [4, 5, 6, 1, 2, 3] */ function _concat(set1, set2) { set1 = set1 || []; set2 = set2 || []; var idx; var len1 = set1.length; var len2 = set2.length; var result = []; idx = 0; while (idx < len1) { result[result.length] = set1[idx]; idx += 1; } idx = 0; while (idx < len2) { result[result.length] = set2[idx]; idx += 1; } return result; } /***/ }), /***/ "./node_modules/ramda/es/internal/_createPartialApplicator.js": /*!********************************************************************!*\ !*** ./node_modules/ramda/es/internal/_createPartialApplicator.js ***! \********************************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _createPartialApplicator; } /* harmony export */ }); /* harmony import */ var _arity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_arity.js */ "./node_modules/ramda/es/internal/_arity.js"); /* harmony import */ var _curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); function _createPartialApplicator(concat) { return (0,_curry2_js__WEBPACK_IMPORTED_MODULE_1__["default"])(function (fn, args) { return (0,_arity_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Math.max(0, fn.length - args.length), function () { return fn.apply(this, concat(args, arguments)); }); }); } /***/ }), /***/ "./node_modules/ramda/es/internal/_createReduce.js": /*!*********************************************************!*\ !*** ./node_modules/ramda/es/internal/_createReduce.js ***! \*********************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _createReduce; } /* harmony export */ }); /* harmony import */ var _isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_isArrayLike.js */ "./node_modules/ramda/es/internal/_isArrayLike.js"); var symIterator = typeof Symbol !== 'undefined' ? Symbol.iterator : '@@iterator'; function _createReduce(arrayReduce, methodReduce, iterableReduce) { return function _reduce(xf, acc, list) { if ((0,_isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__["default"])(list)) { return arrayReduce(xf, acc, list); } if (list == null) { return acc; } if (typeof list['fantasy-land/reduce'] === 'function') { return methodReduce(xf, acc, list, 'fantasy-land/reduce'); } if (list[symIterator] != null) { return iterableReduce(xf, acc, list[symIterator]()); } if (typeof list.next === 'function') { return iterableReduce(xf, acc, list); } if (typeof list.reduce === 'function') { return methodReduce(xf, acc, list, 'reduce'); } throw new TypeError('reduce: list must be array or iterable'); }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_curry1.js": /*!***************************************************!*\ !*** ./node_modules/ramda/es/internal/_curry1.js ***! \***************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _curry1; } /* harmony export */ }); /* harmony import */ var _isPlaceholder_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_isPlaceholder.js */ "./node_modules/ramda/es/internal/_isPlaceholder.js"); /** * Optimized internal one-arity curry function. * * @private * @category Function * @param {Function} fn The function to curry. * @return {Function} The curried function. */ function _curry1(fn) { return function f1(a) { if (arguments.length === 0 || (0,_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_0__["default"])(a)) { return f1; } else { return fn.apply(this, arguments); } }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_curry2.js": /*!***************************************************!*\ !*** ./node_modules/ramda/es/internal/_curry2.js ***! \***************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _curry2; } /* harmony export */ }); /* harmony import */ var _curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _isPlaceholder_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_isPlaceholder.js */ "./node_modules/ramda/es/internal/_isPlaceholder.js"); /** * Optimized internal two-arity curry function. * * @private * @category Function * @param {Function} fn The function to curry. * @return {Function} The curried function. */ function _curry2(fn) { return function f2(a, b) { switch (arguments.length) { case 0: return f2; case 1: return (0,_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_1__["default"])(a) ? f2 : (0,_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function (_b) { return fn(a, _b); }); default: return (0,_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_1__["default"])(a) && (0,_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_1__["default"])(b) ? f2 : (0,_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_1__["default"])(a) ? (0,_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function (_a) { return fn(_a, b); }) : (0,_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_1__["default"])(b) ? (0,_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function (_b) { return fn(a, _b); }) : fn(a, b); } }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_curry3.js": /*!***************************************************!*\ !*** ./node_modules/ramda/es/internal/_curry3.js ***! \***************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _curry3; } /* harmony export */ }); /* harmony import */ var _curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _isPlaceholder_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_isPlaceholder.js */ "./node_modules/ramda/es/internal/_isPlaceholder.js"); /** * Optimized internal three-arity curry function. * * @private * @category Function * @param {Function} fn The function to curry. * @return {Function} The curried function. */ function _curry3(fn) { return function f3(a, b, c) { switch (arguments.length) { case 0: return f3; case 1: return (0,_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_2__["default"])(a) ? f3 : (0,_curry2_js__WEBPACK_IMPORTED_MODULE_1__["default"])(function (_b, _c) { return fn(a, _b, _c); }); case 2: return (0,_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_2__["default"])(a) && (0,_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_2__["default"])(b) ? f3 : (0,_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_2__["default"])(a) ? (0,_curry2_js__WEBPACK_IMPORTED_MODULE_1__["default"])(function (_a, _c) { return fn(_a, b, _c); }) : (0,_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_2__["default"])(b) ? (0,_curry2_js__WEBPACK_IMPORTED_MODULE_1__["default"])(function (_b, _c) { return fn(a, _b, _c); }) : (0,_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function (_c) { return fn(a, b, _c); }); default: return (0,_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_2__["default"])(a) && (0,_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_2__["default"])(b) && (0,_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_2__["default"])(c) ? f3 : (0,_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_2__["default"])(a) && (0,_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_2__["default"])(b) ? (0,_curry2_js__WEBPACK_IMPORTED_MODULE_1__["default"])(function (_a, _b) { return fn(_a, _b, c); }) : (0,_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_2__["default"])(a) && (0,_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_2__["default"])(c) ? (0,_curry2_js__WEBPACK_IMPORTED_MODULE_1__["default"])(function (_a, _c) { return fn(_a, b, _c); }) : (0,_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_2__["default"])(b) && (0,_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_2__["default"])(c) ? (0,_curry2_js__WEBPACK_IMPORTED_MODULE_1__["default"])(function (_b, _c) { return fn(a, _b, _c); }) : (0,_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_2__["default"])(a) ? (0,_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function (_a) { return fn(_a, b, c); }) : (0,_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_2__["default"])(b) ? (0,_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function (_b) { return fn(a, _b, c); }) : (0,_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_2__["default"])(c) ? (0,_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function (_c) { return fn(a, b, _c); }) : fn(a, b, c); } }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_curryN.js": /*!***************************************************!*\ !*** ./node_modules/ramda/es/internal/_curryN.js ***! \***************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _curryN; } /* harmony export */ }); /* harmony import */ var _arity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_arity.js */ "./node_modules/ramda/es/internal/_arity.js"); /* harmony import */ var _isPlaceholder_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_isPlaceholder.js */ "./node_modules/ramda/es/internal/_isPlaceholder.js"); /** * Internal curryN function. * * @private * @category Function * @param {Number} length The arity of the curried function. * @param {Array} received An array of arguments received thus far. * @param {Function} fn The function to curry. * @return {Function} The curried function. */ function _curryN(length, received, fn) { return function () { var combined = []; var argsIdx = 0; var left = length; var combinedIdx = 0; while (combinedIdx < received.length || argsIdx < arguments.length) { var result; if (combinedIdx < received.length && (!(0,_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_1__["default"])(received[combinedIdx]) || argsIdx >= arguments.length)) { result = received[combinedIdx]; } else { result = arguments[argsIdx]; argsIdx += 1; } combined[combinedIdx] = result; if (!(0,_isPlaceholder_js__WEBPACK_IMPORTED_MODULE_1__["default"])(result)) { left -= 1; } combinedIdx += 1; } return left <= 0 ? fn.apply(this, combined) : (0,_arity_js__WEBPACK_IMPORTED_MODULE_0__["default"])(left, _curryN(length, combined, fn)); }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_dispatchable.js": /*!*********************************************************!*\ !*** ./node_modules/ramda/es/internal/_dispatchable.js ***! \*********************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _dispatchable; } /* harmony export */ }); /* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_isArray.js */ "./node_modules/ramda/es/internal/_isArray.js"); /* harmony import */ var _isTransformer_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_isTransformer.js */ "./node_modules/ramda/es/internal/_isTransformer.js"); /** * Returns a function that dispatches with different strategies based on the * object in list position (last argument). If it is an array, executes [fn]. * Otherwise, if it has a function with one of the given method names, it will * execute that function (functor case). Otherwise, if it is a transformer, * uses transducer created by [transducerCreator] to return a new transformer * (transducer case). * Otherwise, it will default to executing [fn]. * * @private * @param {Array} methodNames properties to check for a custom implementation * @param {Function} transducerCreator transducer factory if object is transformer * @param {Function} fn default ramda implementation * @return {Function} A function that dispatches on object in list position */ function _dispatchable(methodNames, transducerCreator, fn) { return function () { if (arguments.length === 0) { return fn(); } var obj = arguments[arguments.length - 1]; if (!(0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__["default"])(obj)) { var idx = 0; while (idx < methodNames.length) { if (typeof obj[methodNames[idx]] === 'function') { return obj[methodNames[idx]].apply(obj, Array.prototype.slice.call(arguments, 0, -1)); } idx += 1; } if ((0,_isTransformer_js__WEBPACK_IMPORTED_MODULE_1__["default"])(obj)) { var transducer = transducerCreator.apply(null, Array.prototype.slice.call(arguments, 0, -1)); return transducer(obj); } } return fn.apply(this, arguments); }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_dissoc.js": /*!***************************************************!*\ !*** ./node_modules/ramda/es/internal/_dissoc.js ***! \***************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _dissoc; } /* harmony export */ }); /* harmony import */ var _isInteger_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_isInteger.js */ "./node_modules/ramda/es/internal/_isInteger.js"); /* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_isArray.js */ "./node_modules/ramda/es/internal/_isArray.js"); /* harmony import */ var _remove_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../remove.js */ "./node_modules/ramda/es/remove.js"); /** * Returns a new object that does not contain a `prop` property. * * @private * @param {String|Number} prop The name of the property to dissociate * @param {Object|Array} obj The object to clone * @return {Object} A new object equivalent to the original but without the specified property */ function _dissoc(prop, obj) { if (obj == null) { return obj; } if ((0,_isInteger_js__WEBPACK_IMPORTED_MODULE_0__["default"])(prop) && (0,_isArray_js__WEBPACK_IMPORTED_MODULE_1__["default"])(obj)) { return (0,_remove_js__WEBPACK_IMPORTED_MODULE_2__["default"])(prop, 1, obj); } var result = {}; for (var p in obj) { result[p] = obj[p]; } delete result[prop]; return result; } /***/ }), /***/ "./node_modules/ramda/es/internal/_dropLast.js": /*!*****************************************************!*\ !*** ./node_modules/ramda/es/internal/_dropLast.js ***! \*****************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ dropLast; } /* harmony export */ }); /* harmony import */ var _take_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../take.js */ "./node_modules/ramda/es/take.js"); function dropLast(n, xs) { return (0,_take_js__WEBPACK_IMPORTED_MODULE_0__["default"])(n < xs.length ? xs.length - n : 0, xs); } /***/ }), /***/ "./node_modules/ramda/es/internal/_dropLastWhile.js": /*!**********************************************************!*\ !*** ./node_modules/ramda/es/internal/_dropLastWhile.js ***! \**********************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ dropLastWhile; } /* harmony export */ }); /* harmony import */ var _slice_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../slice.js */ "./node_modules/ramda/es/slice.js"); function dropLastWhile(pred, xs) { var idx = xs.length - 1; while (idx >= 0 && pred(xs[idx])) { idx -= 1; } return (0,_slice_js__WEBPACK_IMPORTED_MODULE_0__["default"])(0, idx + 1, xs); } /***/ }), /***/ "./node_modules/ramda/es/internal/_equals.js": /*!***************************************************!*\ !*** ./node_modules/ramda/es/internal/_equals.js ***! \***************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _equals; } /* harmony export */ }); /* harmony import */ var _arrayFromIterator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_arrayFromIterator.js */ "./node_modules/ramda/es/internal/_arrayFromIterator.js"); /* harmony import */ var _includesWith_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_includesWith.js */ "./node_modules/ramda/es/internal/_includesWith.js"); /* harmony import */ var _functionName_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_functionName.js */ "./node_modules/ramda/es/internal/_functionName.js"); /* harmony import */ var _has_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./_has.js */ "./node_modules/ramda/es/internal/_has.js"); /* harmony import */ var _objectIs_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./_objectIs.js */ "./node_modules/ramda/es/internal/_objectIs.js"); /* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../keys.js */ "./node_modules/ramda/es/keys.js"); /* harmony import */ var _type_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../type.js */ "./node_modules/ramda/es/type.js"); /** * private _uniqContentEquals function. * That function is checking equality of 2 iterator contents with 2 assumptions * - iterators lengths are the same * - iterators values are unique * * false-positive result will be returned for comparison of, e.g. * - [1,2,3] and [1,2,3,4] * - [1,1,1] and [1,2,3] * */ function _uniqContentEquals(aIterator, bIterator, stackA, stackB) { var a = (0,_arrayFromIterator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(aIterator); var b = (0,_arrayFromIterator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(bIterator); function eq(_a, _b) { return _equals(_a, _b, stackA.slice(), stackB.slice()); } // if *a* array contains any element that is not included in *b* return !(0,_includesWith_js__WEBPACK_IMPORTED_MODULE_1__["default"])(function (b, aItem) { return !(0,_includesWith_js__WEBPACK_IMPORTED_MODULE_1__["default"])(eq, aItem, b); }, b, a); } function _equals(a, b, stackA, stackB) { if ((0,_objectIs_js__WEBPACK_IMPORTED_MODULE_4__["default"])(a, b)) { return true; } var typeA = (0,_type_js__WEBPACK_IMPORTED_MODULE_6__["default"])(a); if (typeA !== (0,_type_js__WEBPACK_IMPORTED_MODULE_6__["default"])(b)) { return false; } if (typeof a['fantasy-land/equals'] === 'function' || typeof b['fantasy-land/equals'] === 'function') { return typeof a['fantasy-land/equals'] === 'function' && a['fantasy-land/equals'](b) && typeof b['fantasy-land/equals'] === 'function' && b['fantasy-land/equals'](a); } if (typeof a.equals === 'function' || typeof b.equals === 'function') { return typeof a.equals === 'function' && a.equals(b) && typeof b.equals === 'function' && b.equals(a); } switch (typeA) { case 'Arguments': case 'Array': case 'Object': if (typeof a.constructor === 'function' && (0,_functionName_js__WEBPACK_IMPORTED_MODULE_2__["default"])(a.constructor) === 'Promise') { return a === b; } break; case 'Boolean': case 'Number': case 'String': if (!(typeof a === typeof b && (0,_objectIs_js__WEBPACK_IMPORTED_MODULE_4__["default"])(a.valueOf(), b.valueOf()))) { return false; } break; case 'Date': if (!(0,_objectIs_js__WEBPACK_IMPORTED_MODULE_4__["default"])(a.valueOf(), b.valueOf())) { return false; } break; case 'Error': return a.name === b.name && a.message === b.message; case 'RegExp': if (!(a.source === b.source && a.global === b.global && a.ignoreCase === b.ignoreCase && a.multiline === b.multiline && a.sticky === b.sticky && a.unicode === b.unicode)) { return false; } break; } var idx = stackA.length - 1; while (idx >= 0) { if (stackA[idx] === a) { return stackB[idx] === b; } idx -= 1; } switch (typeA) { case 'Map': if (a.size !== b.size) { return false; } return _uniqContentEquals(a.entries(), b.entries(), stackA.concat([a]), stackB.concat([b])); case 'Set': if (a.size !== b.size) { return false; } return _uniqContentEquals(a.values(), b.values(), stackA.concat([a]), stackB.concat([b])); case 'Arguments': case 'Array': case 'Object': case 'Boolean': case 'Number': case 'String': case 'Date': case 'Error': case 'RegExp': case 'Int8Array': case 'Uint8Array': case 'Uint8ClampedArray': case 'Int16Array': case 'Uint16Array': case 'Int32Array': case 'Uint32Array': case 'Float32Array': case 'Float64Array': case 'ArrayBuffer': break; default: // Values of other types are only equal if identical. return false; } var keysA = (0,_keys_js__WEBPACK_IMPORTED_MODULE_5__["default"])(a); if (keysA.length !== (0,_keys_js__WEBPACK_IMPORTED_MODULE_5__["default"])(b).length) { return false; } var extendedStackA = stackA.concat([a]); var extendedStackB = stackB.concat([b]); idx = keysA.length - 1; while (idx >= 0) { var key = keysA[idx]; if (!((0,_has_js__WEBPACK_IMPORTED_MODULE_3__["default"])(key, b) && _equals(b[key], a[key], extendedStackA, extendedStackB))) { return false; } idx -= 1; } return true; } /***/ }), /***/ "./node_modules/ramda/es/internal/_filter.js": /*!***************************************************!*\ !*** ./node_modules/ramda/es/internal/_filter.js ***! \***************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _filter; } /* harmony export */ }); function _filter(fn, list) { var idx = 0; var len = list.length; var result = []; while (idx < len) { if (fn(list[idx])) { result[result.length] = list[idx]; } idx += 1; } return result; } /***/ }), /***/ "./node_modules/ramda/es/internal/_flatCat.js": /*!****************************************************!*\ !*** ./node_modules/ramda/es/internal/_flatCat.js ***! \****************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _forceReduced_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_forceReduced.js */ "./node_modules/ramda/es/internal/_forceReduced.js"); /* harmony import */ var _isArrayLike_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_isArrayLike.js */ "./node_modules/ramda/es/internal/_isArrayLike.js"); /* harmony import */ var _xArrayReduce_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_xArrayReduce.js */ "./node_modules/ramda/es/internal/_xArrayReduce.js"); /* harmony import */ var _xReduce_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./_xReduce.js */ "./node_modules/ramda/es/internal/_xReduce.js"); /* harmony import */ var _xfBase_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./_xfBase.js */ "./node_modules/ramda/es/internal/_xfBase.js"); var tInit = '@@transducer/init'; var tStep = '@@transducer/step'; var tResult = '@@transducer/result'; var XPreservingReduced = /*#__PURE__*/ function () { function XPreservingReduced(xf) { this.xf = xf; } XPreservingReduced.prototype[tInit] = _xfBase_js__WEBPACK_IMPORTED_MODULE_4__["default"].init; XPreservingReduced.prototype[tResult] = _xfBase_js__WEBPACK_IMPORTED_MODULE_4__["default"].result; XPreservingReduced.prototype[tStep] = function (result, input) { var ret = this.xf[tStep](result, input); return ret['@@transducer/reduced'] ? (0,_forceReduced_js__WEBPACK_IMPORTED_MODULE_0__["default"])(ret) : ret; }; return XPreservingReduced; }(); var XFlatCat = /*#__PURE__*/ function () { function XFlatCat(xf) { this.xf = new XPreservingReduced(xf); } XFlatCat.prototype[tInit] = _xfBase_js__WEBPACK_IMPORTED_MODULE_4__["default"].init; XFlatCat.prototype[tResult] = _xfBase_js__WEBPACK_IMPORTED_MODULE_4__["default"].result; XFlatCat.prototype[tStep] = function (result, input) { return !(0,_isArrayLike_js__WEBPACK_IMPORTED_MODULE_1__["default"])(input) ? (0,_xArrayReduce_js__WEBPACK_IMPORTED_MODULE_2__["default"])(this.xf, result, [input]) : (0,_xReduce_js__WEBPACK_IMPORTED_MODULE_3__["default"])(this.xf, result, input); }; return XFlatCat; }(); var _flatCat = function _xcat(xf) { return new XFlatCat(xf); }; /* harmony default export */ __webpack_exports__["default"] = (_flatCat); /***/ }), /***/ "./node_modules/ramda/es/internal/_forceReduced.js": /*!*********************************************************!*\ !*** ./node_modules/ramda/es/internal/_forceReduced.js ***! \*********************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _forceReduced; } /* harmony export */ }); function _forceReduced(x) { return { '@@transducer/value': x, '@@transducer/reduced': true }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_functionName.js": /*!*********************************************************!*\ !*** ./node_modules/ramda/es/internal/_functionName.js ***! \*********************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _functionName; } /* harmony export */ }); function _functionName(f) { // String(x => x) evaluates to "x => x", so the pattern may not match. var match = String(f).match(/^function (\w*)/); return match == null ? '' : match[1]; } /***/ }), /***/ "./node_modules/ramda/es/internal/_has.js": /*!************************************************!*\ !*** ./node_modules/ramda/es/internal/_has.js ***! \************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _has; } /* harmony export */ }); function _has(prop, obj) { return Object.prototype.hasOwnProperty.call(obj, prop); } /***/ }), /***/ "./node_modules/ramda/es/internal/_identity.js": /*!*****************************************************!*\ !*** ./node_modules/ramda/es/internal/_identity.js ***! \*****************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _identity; } /* harmony export */ }); function _identity(x) { return x; } /***/ }), /***/ "./node_modules/ramda/es/internal/_includes.js": /*!*****************************************************!*\ !*** ./node_modules/ramda/es/internal/_includes.js ***! \*****************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _includes; } /* harmony export */ }); /* harmony import */ var _indexOf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_indexOf.js */ "./node_modules/ramda/es/internal/_indexOf.js"); function _includes(a, list) { return (0,_indexOf_js__WEBPACK_IMPORTED_MODULE_0__["default"])(list, a, 0) >= 0; } /***/ }), /***/ "./node_modules/ramda/es/internal/_includesWith.js": /*!*********************************************************!*\ !*** ./node_modules/ramda/es/internal/_includesWith.js ***! \*********************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _includesWith; } /* harmony export */ }); function _includesWith(pred, x, list) { var idx = 0; var len = list.length; while (idx < len) { if (pred(x, list[idx])) { return true; } idx += 1; } return false; } /***/ }), /***/ "./node_modules/ramda/es/internal/_indexOf.js": /*!****************************************************!*\ !*** ./node_modules/ramda/es/internal/_indexOf.js ***! \****************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _indexOf; } /* harmony export */ }); /* harmony import */ var _equals_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../equals.js */ "./node_modules/ramda/es/equals.js"); function _indexOf(list, a, idx) { var inf, item; // Array.prototype.indexOf doesn't exist below IE9 if (typeof list.indexOf === 'function') { switch (typeof a) { case 'number': if (a === 0) { // manually crawl the list to distinguish between +0 and -0 inf = 1 / a; while (idx < list.length) { item = list[idx]; if (item === 0 && 1 / item === inf) { return idx; } idx += 1; } return -1; } else if (a !== a) { // NaN while (idx < list.length) { item = list[idx]; if (typeof item === 'number' && item !== item) { return idx; } idx += 1; } return -1; } // non-zero numbers can utilise Set return list.indexOf(a, idx); // all these types can utilise Set case 'string': case 'boolean': case 'function': case 'undefined': return list.indexOf(a, idx); case 'object': if (a === null) { // null can utilise Set return list.indexOf(a, idx); } } } // anything else not covered above, defer to R.equals while (idx < list.length) { if ((0,_equals_js__WEBPACK_IMPORTED_MODULE_0__["default"])(list[idx], a)) { return idx; } idx += 1; } return -1; } /***/ }), /***/ "./node_modules/ramda/es/internal/_isArguments.js": /*!********************************************************!*\ !*** ./node_modules/ramda/es/internal/_isArguments.js ***! \********************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _has_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_has.js */ "./node_modules/ramda/es/internal/_has.js"); var toString = Object.prototype.toString; var _isArguments = /*#__PURE__*/ function () { return toString.call(arguments) === '[object Arguments]' ? function _isArguments(x) { return toString.call(x) === '[object Arguments]'; } : function _isArguments(x) { return (0,_has_js__WEBPACK_IMPORTED_MODULE_0__["default"])('callee', x); }; }(); /* harmony default export */ __webpack_exports__["default"] = (_isArguments); /***/ }), /***/ "./node_modules/ramda/es/internal/_isArray.js": /*!****************************************************!*\ !*** ./node_modules/ramda/es/internal/_isArray.js ***! \****************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /** * Tests whether or not an object is an array. * * @private * @param {*} val The object to test. * @return {Boolean} `true` if `val` is an array, `false` otherwise. * @example * * _isArray([]); //=> true * _isArray(null); //=> false * _isArray({}); //=> false */ /* harmony default export */ __webpack_exports__["default"] = (Array.isArray || function _isArray(val) { return val != null && val.length >= 0 && Object.prototype.toString.call(val) === '[object Array]'; }); /***/ }), /***/ "./node_modules/ramda/es/internal/_isArrayLike.js": /*!********************************************************!*\ !*** ./node_modules/ramda/es/internal/_isArrayLike.js ***! \********************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_isArray.js */ "./node_modules/ramda/es/internal/_isArray.js"); /* harmony import */ var _isString_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_isString.js */ "./node_modules/ramda/es/internal/_isString.js"); /** * Tests whether or not an object is similar to an array. * * @private * @category Type * @category List * @sig * -> Boolean * @param {*} x The object to test. * @return {Boolean} `true` if `x` has a numeric length property and extreme indices defined; `false` otherwise. * @example * * _isArrayLike([]); //=> true * _isArrayLike(true); //=> false * _isArrayLike({}); //=> false * _isArrayLike({length: 10}); //=> false * _isArrayLike({0: 'zero', 9: 'nine', length: 10}); //=> true * _isArrayLike({nodeType: 1, length: 1}) // => false */ var _isArrayLike = /*#__PURE__*/ (0,_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function isArrayLike(x) { if ((0,_isArray_js__WEBPACK_IMPORTED_MODULE_1__["default"])(x)) { return true; } if (!x) { return false; } if (typeof x !== 'object') { return false; } if ((0,_isString_js__WEBPACK_IMPORTED_MODULE_2__["default"])(x)) { return false; } if (x.length === 0) { return true; } if (x.length > 0) { return x.hasOwnProperty(0) && x.hasOwnProperty(x.length - 1); } return false; }); /* harmony default export */ __webpack_exports__["default"] = (_isArrayLike); /***/ }), /***/ "./node_modules/ramda/es/internal/_isFunction.js": /*!*******************************************************!*\ !*** ./node_modules/ramda/es/internal/_isFunction.js ***! \*******************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _isFunction; } /* harmony export */ }); function _isFunction(x) { var type = Object.prototype.toString.call(x); return type === '[object Function]' || type === '[object AsyncFunction]' || type === '[object GeneratorFunction]' || type === '[object AsyncGeneratorFunction]'; } /***/ }), /***/ "./node_modules/ramda/es/internal/_isInteger.js": /*!******************************************************!*\ !*** ./node_modules/ramda/es/internal/_isInteger.js ***! \******************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /** * Determine if the passed argument is an integer. * * @private * @param {*} n * @category Type * @return {Boolean} */ /* harmony default export */ __webpack_exports__["default"] = (Number.isInteger || function _isInteger(n) { return n << 0 === n; }); /***/ }), /***/ "./node_modules/ramda/es/internal/_isNumber.js": /*!*****************************************************!*\ !*** ./node_modules/ramda/es/internal/_isNumber.js ***! \*****************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _isNumber; } /* harmony export */ }); function _isNumber(x) { return Object.prototype.toString.call(x) === '[object Number]'; } /***/ }), /***/ "./node_modules/ramda/es/internal/_isObject.js": /*!*****************************************************!*\ !*** ./node_modules/ramda/es/internal/_isObject.js ***! \*****************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _isObject; } /* harmony export */ }); function _isObject(x) { return Object.prototype.toString.call(x) === '[object Object]'; } /***/ }), /***/ "./node_modules/ramda/es/internal/_isPlaceholder.js": /*!**********************************************************!*\ !*** ./node_modules/ramda/es/internal/_isPlaceholder.js ***! \**********************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _isPlaceholder; } /* harmony export */ }); function _isPlaceholder(a) { return a != null && typeof a === 'object' && a['@@functional/placeholder'] === true; } /***/ }), /***/ "./node_modules/ramda/es/internal/_isRegExp.js": /*!*****************************************************!*\ !*** ./node_modules/ramda/es/internal/_isRegExp.js ***! \*****************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _isRegExp; } /* harmony export */ }); function _isRegExp(x) { return Object.prototype.toString.call(x) === '[object RegExp]'; } /***/ }), /***/ "./node_modules/ramda/es/internal/_isString.js": /*!*****************************************************!*\ !*** ./node_modules/ramda/es/internal/_isString.js ***! \*****************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _isString; } /* harmony export */ }); function _isString(x) { return Object.prototype.toString.call(x) === '[object String]'; } /***/ }), /***/ "./node_modules/ramda/es/internal/_isTransformer.js": /*!**********************************************************!*\ !*** ./node_modules/ramda/es/internal/_isTransformer.js ***! \**********************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _isTransformer; } /* harmony export */ }); function _isTransformer(obj) { return obj != null && typeof obj['@@transducer/step'] === 'function'; } /***/ }), /***/ "./node_modules/ramda/es/internal/_isTypedArray.js": /*!*********************************************************!*\ !*** ./node_modules/ramda/es/internal/_isTypedArray.js ***! \*********************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _isTypedArray; } /* harmony export */ }); /** * Tests whether or not an object is a typed array. * * @private * @param {*} val The object to test. * @return {Boolean} `true` if `val` is a typed array, `false` otherwise. * @example * * _isTypedArray(new Uint8Array([])); //=> true * _isTypedArray(new Float32Array([])); //=> true * _isTypedArray([]); //=> false * _isTypedArray(null); //=> false * _isTypedArray({}); //=> false */ function _isTypedArray(val) { var type = Object.prototype.toString.call(val); return type === '[object Uint8ClampedArray]' || type === '[object Int8Array]' || type === '[object Uint8Array]' || type === '[object Int16Array]' || type === '[object Uint16Array]' || type === '[object Int32Array]' || type === '[object Uint32Array]' || type === '[object Float32Array]' || type === '[object Float64Array]' || type === '[object BigInt64Array]' || type === '[object BigUint64Array]'; } /***/ }), /***/ "./node_modules/ramda/es/internal/_makeFlat.js": /*!*****************************************************!*\ !*** ./node_modules/ramda/es/internal/_makeFlat.js ***! \*****************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _makeFlat; } /* harmony export */ }); /* harmony import */ var _isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_isArrayLike.js */ "./node_modules/ramda/es/internal/_isArrayLike.js"); /** * `_makeFlat` is a helper function that returns a one-level or fully recursive * function based on the flag passed in. * * @private */ function _makeFlat(recursive) { return function flatt(list) { var value, jlen, j; var result = []; var idx = 0; var ilen = list.length; while (idx < ilen) { if ((0,_isArrayLike_js__WEBPACK_IMPORTED_MODULE_0__["default"])(list[idx])) { value = recursive ? flatt(list[idx]) : list[idx]; j = 0; jlen = value.length; while (j < jlen) { result[result.length] = value[j]; j += 1; } } else { result[result.length] = list[idx]; } idx += 1; } return result; }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_map.js": /*!************************************************!*\ !*** ./node_modules/ramda/es/internal/_map.js ***! \************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _map; } /* harmony export */ }); function _map(fn, functor) { var idx = 0; var len = functor.length; var result = Array(len); while (idx < len) { result[idx] = fn(functor[idx]); idx += 1; } return result; } /***/ }), /***/ "./node_modules/ramda/es/internal/_modify.js": /*!***************************************************!*\ !*** ./node_modules/ramda/es/internal/_modify.js ***! \***************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _modify; } /* harmony export */ }); /* harmony import */ var _isArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_isArray.js */ "./node_modules/ramda/es/internal/_isArray.js"); /* harmony import */ var _isInteger_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_isInteger.js */ "./node_modules/ramda/es/internal/_isInteger.js"); /** * Makes a shallow clone of an object, applying the given fn to the specified * property with the given value. Note that this copies and flattens prototype * properties onto the new object as well. All non-primitive properties are * copied by reference. * * @private * @param {String|Number} prop The property name to set * @param {Function} fn The function to apply to the property * @param {Object|Array} obj The object to clone * @return {Object|Array} A new object equivalent to the original except for the changed property. */ function _modify(prop, fn, obj) { if ((0,_isInteger_js__WEBPACK_IMPORTED_MODULE_1__["default"])(prop) && (0,_isArray_js__WEBPACK_IMPORTED_MODULE_0__["default"])(obj)) { var arr = [].concat(obj); arr[prop] = fn(arr[prop]); return arr; } var result = {}; for (var p in obj) { result[p] = obj[p]; } result[prop] = fn(result[prop]); return result; } /***/ }), /***/ "./node_modules/ramda/es/internal/_objectAssign.js": /*!*********************************************************!*\ !*** ./node_modules/ramda/es/internal/_objectAssign.js ***! \*********************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _has_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_has.js */ "./node_modules/ramda/es/internal/_has.js"); // Based on https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign function _objectAssign(target) { if (target == null) { throw new TypeError('Cannot convert undefined or null to object'); } var output = Object(target); var idx = 1; var length = arguments.length; while (idx < length) { var source = arguments[idx]; if (source != null) { for (var nextKey in source) { if ((0,_has_js__WEBPACK_IMPORTED_MODULE_0__["default"])(nextKey, source)) { output[nextKey] = source[nextKey]; } } } idx += 1; } return output; } /* harmony default export */ __webpack_exports__["default"] = (typeof Object.assign === 'function' ? Object.assign : _objectAssign); /***/ }), /***/ "./node_modules/ramda/es/internal/_objectIs.js": /*!*****************************************************!*\ !*** ./node_modules/ramda/es/internal/_objectIs.js ***! \*****************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); // Based on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is function _objectIs(a, b) { // SameValue algorithm if (a === b) { // Steps 1-5, 7-10 // Steps 6.b-6.e: +0 != -0 return a !== 0 || 1 / a === 1 / b; } else { // Step 6.a: NaN == NaN return a !== a && b !== b; } } /* harmony default export */ __webpack_exports__["default"] = (typeof Object.is === 'function' ? Object.is : _objectIs); /***/ }), /***/ "./node_modules/ramda/es/internal/_pipe.js": /*!*************************************************!*\ !*** ./node_modules/ramda/es/internal/_pipe.js ***! \*************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _pipe; } /* harmony export */ }); function _pipe(f, g) { return function () { return g.call(this, f.apply(this, arguments)); }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_promap.js": /*!***************************************************!*\ !*** ./node_modules/ramda/es/internal/_promap.js ***! \***************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _promap; } /* harmony export */ }); function _promap(f, g, profunctor) { return function (x) { return g(profunctor(f(x))); }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_quote.js": /*!**************************************************!*\ !*** ./node_modules/ramda/es/internal/_quote.js ***! \**************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _quote; } /* harmony export */ }); function _quote(s) { var escaped = s.replace(/\\/g, '\\\\').replace(/[\b]/g, '\\b') // \b matches word boundary; [\b] matches backspace .replace(/\f/g, '\\f').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/\t/g, '\\t').replace(/\v/g, '\\v').replace(/\0/g, '\\0'); return '"' + escaped.replace(/"/g, '\\"') + '"'; } /***/ }), /***/ "./node_modules/ramda/es/internal/_reduce.js": /*!***************************************************!*\ !*** ./node_modules/ramda/es/internal/_reduce.js ***! \***************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _arrayReduce_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_arrayReduce.js */ "./node_modules/ramda/es/internal/_arrayReduce.js"); /* harmony import */ var _createReduce_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_createReduce.js */ "./node_modules/ramda/es/internal/_createReduce.js"); function _iterableReduce(reducer, acc, iter) { var step = iter.next(); while (!step.done) { acc = reducer(acc, step.value); step = iter.next(); } return acc; } function _methodReduce(reducer, acc, obj, methodName) { return obj[methodName](reducer, acc); } var _reduce = /*#__PURE__*/ (0,_createReduce_js__WEBPACK_IMPORTED_MODULE_1__["default"])(_arrayReduce_js__WEBPACK_IMPORTED_MODULE_0__["default"], _methodReduce, _iterableReduce); /* harmony default export */ __webpack_exports__["default"] = (_reduce); /***/ }), /***/ "./node_modules/ramda/es/internal/_reduced.js": /*!****************************************************!*\ !*** ./node_modules/ramda/es/internal/_reduced.js ***! \****************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _reduced; } /* harmony export */ }); function _reduced(x) { return x && x['@@transducer/reduced'] ? x : { '@@transducer/value': x, '@@transducer/reduced': true }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_stepCat.js": /*!****************************************************!*\ !*** ./node_modules/ramda/es/internal/_stepCat.js ***! \****************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _stepCat; } /* harmony export */ }); /* harmony import */ var _objectAssign_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_objectAssign.js */ "./node_modules/ramda/es/internal/_objectAssign.js"); /* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_identity.js */ "./node_modules/ramda/es/internal/_identity.js"); /* harmony import */ var _isArrayLike_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_isArrayLike.js */ "./node_modules/ramda/es/internal/_isArrayLike.js"); /* harmony import */ var _isTransformer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./_isTransformer.js */ "./node_modules/ramda/es/internal/_isTransformer.js"); /* harmony import */ var _objOf_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../objOf.js */ "./node_modules/ramda/es/objOf.js"); var _stepCatArray = { '@@transducer/init': Array, '@@transducer/step': function transducerStep(xs, x) { xs.push(x); return xs; }, '@@transducer/result': _identity_js__WEBPACK_IMPORTED_MODULE_1__["default"] }; var _stepCatString = { '@@transducer/init': String, '@@transducer/step': function transducerStep(a, b) { return a + b; }, '@@transducer/result': _identity_js__WEBPACK_IMPORTED_MODULE_1__["default"] }; var _stepCatObject = { '@@transducer/init': Object, '@@transducer/step': function transducerStep(result, input) { return (0,_objectAssign_js__WEBPACK_IMPORTED_MODULE_0__["default"])(result, (0,_isArrayLike_js__WEBPACK_IMPORTED_MODULE_2__["default"])(input) ? (0,_objOf_js__WEBPACK_IMPORTED_MODULE_4__["default"])(input[0], input[1]) : input); }, '@@transducer/result': _identity_js__WEBPACK_IMPORTED_MODULE_1__["default"] }; function _stepCat(obj) { if ((0,_isTransformer_js__WEBPACK_IMPORTED_MODULE_3__["default"])(obj)) { return obj; } if ((0,_isArrayLike_js__WEBPACK_IMPORTED_MODULE_2__["default"])(obj)) { return _stepCatArray; } if (typeof obj === 'string') { return _stepCatString; } if (typeof obj === 'object') { return _stepCatObject; } throw new Error('Cannot create transformer for ' + obj); } /***/ }), /***/ "./node_modules/ramda/es/internal/_toISOString.js": /*!********************************************************!*\ !*** ./node_modules/ramda/es/internal/_toISOString.js ***! \********************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /** * Polyfill from . */ var pad = function pad(n) { return (n < 10 ? '0' : '') + n; }; var _toISOString = typeof Date.prototype.toISOString === 'function' ? function _toISOString(d) { return d.toISOString(); } : function _toISOString(d) { return d.getUTCFullYear() + '-' + pad(d.getUTCMonth() + 1) + '-' + pad(d.getUTCDate()) + 'T' + pad(d.getUTCHours()) + ':' + pad(d.getUTCMinutes()) + ':' + pad(d.getUTCSeconds()) + '.' + (d.getUTCMilliseconds() / 1000).toFixed(3).slice(2, 5) + 'Z'; }; /* harmony default export */ __webpack_exports__["default"] = (_toISOString); /***/ }), /***/ "./node_modules/ramda/es/internal/_toString.js": /*!*****************************************************!*\ !*** ./node_modules/ramda/es/internal/_toString.js ***! \*****************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _toString; } /* harmony export */ }); /* harmony import */ var _includes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_includes.js */ "./node_modules/ramda/es/internal/_includes.js"); /* harmony import */ var _map_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_map.js */ "./node_modules/ramda/es/internal/_map.js"); /* harmony import */ var _quote_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_quote.js */ "./node_modules/ramda/es/internal/_quote.js"); /* harmony import */ var _toISOString_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./_toISOString.js */ "./node_modules/ramda/es/internal/_toISOString.js"); /* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../keys.js */ "./node_modules/ramda/es/keys.js"); /* harmony import */ var _reject_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../reject.js */ "./node_modules/ramda/es/reject.js"); function _toString(x, seen) { var recur = function recur(y) { var xs = seen.concat([x]); return (0,_includes_js__WEBPACK_IMPORTED_MODULE_0__["default"])(y, xs) ? '' : _toString(y, xs); }; // mapPairs :: (Object, [String]) -> [String] var mapPairs = function mapPairs(obj, keys) { return (0,_map_js__WEBPACK_IMPORTED_MODULE_1__["default"])(function (k) { return (0,_quote_js__WEBPACK_IMPORTED_MODULE_2__["default"])(k) + ': ' + recur(obj[k]); }, keys.slice().sort()); }; switch (Object.prototype.toString.call(x)) { case '[object Arguments]': return '(function() { return arguments; }(' + (0,_map_js__WEBPACK_IMPORTED_MODULE_1__["default"])(recur, x).join(', ') + '))'; case '[object Array]': return '[' + (0,_map_js__WEBPACK_IMPORTED_MODULE_1__["default"])(recur, x).concat(mapPairs(x, (0,_reject_js__WEBPACK_IMPORTED_MODULE_5__["default"])(function (k) { return /^\d+$/.test(k); }, (0,_keys_js__WEBPACK_IMPORTED_MODULE_4__["default"])(x)))).join(', ') + ']'; case '[object Boolean]': return typeof x === 'object' ? 'new Boolean(' + recur(x.valueOf()) + ')' : x.toString(); case '[object Date]': return 'new Date(' + (isNaN(x.valueOf()) ? recur(NaN) : (0,_quote_js__WEBPACK_IMPORTED_MODULE_2__["default"])((0,_toISOString_js__WEBPACK_IMPORTED_MODULE_3__["default"])(x))) + ')'; case '[object Map]': return 'new Map(' + recur(Array.from(x)) + ')'; case '[object Null]': return 'null'; case '[object Number]': return typeof x === 'object' ? 'new Number(' + recur(x.valueOf()) + ')' : 1 / x === -Infinity ? '-0' : x.toString(10); case '[object Set]': return 'new Set(' + recur(Array.from(x).sort()) + ')'; case '[object String]': return typeof x === 'object' ? 'new String(' + recur(x.valueOf()) + ')' : (0,_quote_js__WEBPACK_IMPORTED_MODULE_2__["default"])(x); case '[object Undefined]': return 'undefined'; default: if (typeof x.toString === 'function') { var repr = x.toString(); if (repr !== '[object Object]') { return repr; } } return '{' + mapPairs(x, (0,_keys_js__WEBPACK_IMPORTED_MODULE_4__["default"])(x)).join(', ') + '}'; } } /***/ }), /***/ "./node_modules/ramda/es/internal/_xArrayReduce.js": /*!*********************************************************!*\ !*** ./node_modules/ramda/es/internal/_xArrayReduce.js ***! \*********************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _xArrayReduce; } /* harmony export */ }); function _xArrayReduce(xf, acc, list) { var idx = 0; var len = list.length; while (idx < len) { acc = xf['@@transducer/step'](acc, list[idx]); if (acc && acc['@@transducer/reduced']) { acc = acc['@@transducer/value']; break; } idx += 1; } return xf['@@transducer/result'](acc); } /***/ }), /***/ "./node_modules/ramda/es/internal/_xReduce.js": /*!****************************************************!*\ !*** ./node_modules/ramda/es/internal/_xReduce.js ***! \****************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _createReduce_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_createReduce.js */ "./node_modules/ramda/es/internal/_createReduce.js"); /* harmony import */ var _xArrayReduce_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_xArrayReduce.js */ "./node_modules/ramda/es/internal/_xArrayReduce.js"); /* harmony import */ var _bind_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../bind.js */ "./node_modules/ramda/es/bind.js"); function _xIterableReduce(xf, acc, iter) { var step = iter.next(); while (!step.done) { acc = xf['@@transducer/step'](acc, step.value); if (acc && acc['@@transducer/reduced']) { acc = acc['@@transducer/value']; break; } step = iter.next(); } return xf['@@transducer/result'](acc); } function _xMethodReduce(xf, acc, obj, methodName) { return xf['@@transducer/result'](obj[methodName]((0,_bind_js__WEBPACK_IMPORTED_MODULE_2__["default"])(xf['@@transducer/step'], xf), acc)); } var _xReduce = /*#__PURE__*/ (0,_createReduce_js__WEBPACK_IMPORTED_MODULE_0__["default"])(_xArrayReduce_js__WEBPACK_IMPORTED_MODULE_1__["default"], _xMethodReduce, _xIterableReduce); /* harmony default export */ __webpack_exports__["default"] = (_xReduce); /***/ }), /***/ "./node_modules/ramda/es/internal/_xall.js": /*!*************************************************!*\ !*** ./node_modules/ramda/es/internal/_xall.js ***! \*************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _xall; } /* harmony export */ }); /* harmony import */ var _reduced_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_reduced.js */ "./node_modules/ramda/es/internal/_reduced.js"); /* harmony import */ var _xfBase_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_xfBase.js */ "./node_modules/ramda/es/internal/_xfBase.js"); var XAll = /*#__PURE__*/ function () { function XAll(f, xf) { this.xf = xf; this.f = f; this.all = true; } XAll.prototype['@@transducer/init'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_1__["default"].init; XAll.prototype['@@transducer/result'] = function (result) { if (this.all) { result = this.xf['@@transducer/step'](result, true); } return this.xf['@@transducer/result'](result); }; XAll.prototype['@@transducer/step'] = function (result, input) { if (!this.f(input)) { this.all = false; result = (0,_reduced_js__WEBPACK_IMPORTED_MODULE_0__["default"])(this.xf['@@transducer/step'](result, false)); } return result; }; return XAll; }(); function _xall(f) { return function (xf) { return new XAll(f, xf); }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_xany.js": /*!*************************************************!*\ !*** ./node_modules/ramda/es/internal/_xany.js ***! \*************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _xany; } /* harmony export */ }); /* harmony import */ var _reduced_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_reduced.js */ "./node_modules/ramda/es/internal/_reduced.js"); /* harmony import */ var _xfBase_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_xfBase.js */ "./node_modules/ramda/es/internal/_xfBase.js"); var XAny = /*#__PURE__*/ function () { function XAny(f, xf) { this.xf = xf; this.f = f; this.any = false; } XAny.prototype['@@transducer/init'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_1__["default"].init; XAny.prototype['@@transducer/result'] = function (result) { if (!this.any) { result = this.xf['@@transducer/step'](result, false); } return this.xf['@@transducer/result'](result); }; XAny.prototype['@@transducer/step'] = function (result, input) { if (this.f(input)) { this.any = true; result = (0,_reduced_js__WEBPACK_IMPORTED_MODULE_0__["default"])(this.xf['@@transducer/step'](result, true)); } return result; }; return XAny; }(); function _xany(f) { return function (xf) { return new XAny(f, xf); }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_xaperture.js": /*!******************************************************!*\ !*** ./node_modules/ramda/es/internal/_xaperture.js ***! \******************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _xaperture; } /* harmony export */ }); /* harmony import */ var _concat_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_concat.js */ "./node_modules/ramda/es/internal/_concat.js"); /* harmony import */ var _xfBase_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_xfBase.js */ "./node_modules/ramda/es/internal/_xfBase.js"); var XAperture = /*#__PURE__*/ function () { function XAperture(n, xf) { this.xf = xf; this.pos = 0; this.full = false; this.acc = new Array(n); } XAperture.prototype['@@transducer/init'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_1__["default"].init; XAperture.prototype['@@transducer/result'] = function (result) { this.acc = null; return this.xf['@@transducer/result'](result); }; XAperture.prototype['@@transducer/step'] = function (result, input) { this.store(input); return this.full ? this.xf['@@transducer/step'](result, this.getCopy()) : result; }; XAperture.prototype.store = function (input) { this.acc[this.pos] = input; this.pos += 1; if (this.pos === this.acc.length) { this.pos = 0; this.full = true; } }; XAperture.prototype.getCopy = function () { return (0,_concat_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Array.prototype.slice.call(this.acc, this.pos), Array.prototype.slice.call(this.acc, 0, this.pos)); }; return XAperture; }(); function _xaperture(n) { return function (xf) { return new XAperture(n, xf); }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_xchain.js": /*!***************************************************!*\ !*** ./node_modules/ramda/es/internal/_xchain.js ***! \***************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _xchain; } /* harmony export */ }); /* harmony import */ var _flatCat_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_flatCat.js */ "./node_modules/ramda/es/internal/_flatCat.js"); /* harmony import */ var _xmap_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_xmap.js */ "./node_modules/ramda/es/internal/_xmap.js"); function _xchain(f) { return function (xf) { return (0,_xmap_js__WEBPACK_IMPORTED_MODULE_1__["default"])(f)((0,_flatCat_js__WEBPACK_IMPORTED_MODULE_0__["default"])(xf)); }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_xdrop.js": /*!**************************************************!*\ !*** ./node_modules/ramda/es/internal/_xdrop.js ***! \**************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _xdrop; } /* harmony export */ }); /* harmony import */ var _xfBase_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_xfBase.js */ "./node_modules/ramda/es/internal/_xfBase.js"); var XDrop = /*#__PURE__*/ function () { function XDrop(n, xf) { this.xf = xf; this.n = n; } XDrop.prototype['@@transducer/init'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_0__["default"].init; XDrop.prototype['@@transducer/result'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_0__["default"].result; XDrop.prototype['@@transducer/step'] = function (result, input) { if (this.n > 0) { this.n -= 1; return result; } return this.xf['@@transducer/step'](result, input); }; return XDrop; }(); function _xdrop(n) { return function (xf) { return new XDrop(n, xf); }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_xdropLast.js": /*!******************************************************!*\ !*** ./node_modules/ramda/es/internal/_xdropLast.js ***! \******************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _xdropLast; } /* harmony export */ }); /* harmony import */ var _xfBase_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_xfBase.js */ "./node_modules/ramda/es/internal/_xfBase.js"); var XDropLast = /*#__PURE__*/ function () { function XDropLast(n, xf) { if (n <= 0) { return xf; } this.xf = xf; this.pos = 0; this.full = false; this.acc = new Array(n); } XDropLast.prototype['@@transducer/init'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_0__["default"].init; XDropLast.prototype['@@transducer/result'] = function (result) { this.acc = null; return this.xf['@@transducer/result'](result); }; XDropLast.prototype['@@transducer/step'] = function (result, input) { if (this.full) { result = this.xf['@@transducer/step'](result, this.acc[this.pos]); } this.store(input); return result; }; XDropLast.prototype.store = function (input) { this.acc[this.pos] = input; this.pos += 1; if (this.pos === this.acc.length) { this.pos = 0; this.full = true; } }; return XDropLast; }(); function _xdropLast(n) { return function (xf) { return new XDropLast(n, xf); }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_xdropLastWhile.js": /*!***********************************************************!*\ !*** ./node_modules/ramda/es/internal/_xdropLastWhile.js ***! \***********************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _xdropLastWhile; } /* harmony export */ }); /* harmony import */ var _xfBase_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_xfBase.js */ "./node_modules/ramda/es/internal/_xfBase.js"); /* harmony import */ var _xReduce_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_xReduce.js */ "./node_modules/ramda/es/internal/_xReduce.js"); var XDropLastWhile = /*#__PURE__*/ function () { function XDropLastWhile(fn, xf) { this.f = fn; this.retained = []; this.xf = xf; } XDropLastWhile.prototype['@@transducer/init'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_0__["default"].init; XDropLastWhile.prototype['@@transducer/result'] = function (result) { this.retained = null; return this.xf['@@transducer/result'](result); }; XDropLastWhile.prototype['@@transducer/step'] = function (result, input) { return this.f(input) ? this.retain(result, input) : this.flush(result, input); }; XDropLastWhile.prototype.flush = function (result, input) { result = (0,_xReduce_js__WEBPACK_IMPORTED_MODULE_1__["default"])(this.xf, result, this.retained); this.retained = []; return this.xf['@@transducer/step'](result, input); }; XDropLastWhile.prototype.retain = function (result, input) { this.retained.push(input); return result; }; return XDropLastWhile; }(); function _xdropLastWhile(fn) { return function (xf) { return new XDropLastWhile(fn, xf); }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_xdropRepeatsWith.js": /*!*************************************************************!*\ !*** ./node_modules/ramda/es/internal/_xdropRepeatsWith.js ***! \*************************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _xdropRepeatsWith; } /* harmony export */ }); /* harmony import */ var _xfBase_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_xfBase.js */ "./node_modules/ramda/es/internal/_xfBase.js"); var XDropRepeatsWith = /*#__PURE__*/ function () { function XDropRepeatsWith(pred, xf) { this.xf = xf; this.pred = pred; this.lastValue = undefined; this.seenFirstValue = false; } XDropRepeatsWith.prototype['@@transducer/init'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_0__["default"].init; XDropRepeatsWith.prototype['@@transducer/result'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_0__["default"].result; XDropRepeatsWith.prototype['@@transducer/step'] = function (result, input) { var sameAsLast = false; if (!this.seenFirstValue) { this.seenFirstValue = true; } else if (this.pred(this.lastValue, input)) { sameAsLast = true; } this.lastValue = input; return sameAsLast ? result : this.xf['@@transducer/step'](result, input); }; return XDropRepeatsWith; }(); function _xdropRepeatsWith(pred) { return function (xf) { return new XDropRepeatsWith(pred, xf); }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_xdropWhile.js": /*!*******************************************************!*\ !*** ./node_modules/ramda/es/internal/_xdropWhile.js ***! \*******************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _xdropWhile; } /* harmony export */ }); /* harmony import */ var _xfBase_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_xfBase.js */ "./node_modules/ramda/es/internal/_xfBase.js"); var XDropWhile = /*#__PURE__*/ function () { function XDropWhile(f, xf) { this.xf = xf; this.f = f; } XDropWhile.prototype['@@transducer/init'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_0__["default"].init; XDropWhile.prototype['@@transducer/result'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_0__["default"].result; XDropWhile.prototype['@@transducer/step'] = function (result, input) { if (this.f) { if (this.f(input)) { return result; } this.f = null; } return this.xf['@@transducer/step'](result, input); }; return XDropWhile; }(); function _xdropWhile(f) { return function (xf) { return new XDropWhile(f, xf); }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_xfBase.js": /*!***************************************************!*\ !*** ./node_modules/ramda/es/internal/_xfBase.js ***! \***************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony default export */ __webpack_exports__["default"] = ({ init: function init() { return this.xf['@@transducer/init'](); }, result: function result(_result) { return this.xf['@@transducer/result'](_result); } }); /***/ }), /***/ "./node_modules/ramda/es/internal/_xfilter.js": /*!****************************************************!*\ !*** ./node_modules/ramda/es/internal/_xfilter.js ***! \****************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _xfilter; } /* harmony export */ }); /* harmony import */ var _xfBase_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_xfBase.js */ "./node_modules/ramda/es/internal/_xfBase.js"); var XFilter = /*#__PURE__*/ function () { function XFilter(f, xf) { this.xf = xf; this.f = f; } XFilter.prototype['@@transducer/init'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_0__["default"].init; XFilter.prototype['@@transducer/result'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_0__["default"].result; XFilter.prototype['@@transducer/step'] = function (result, input) { return this.f(input) ? this.xf['@@transducer/step'](result, input) : result; }; return XFilter; }(); function _xfilter(f) { return function (xf) { return new XFilter(f, xf); }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_xfind.js": /*!**************************************************!*\ !*** ./node_modules/ramda/es/internal/_xfind.js ***! \**************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _xfind; } /* harmony export */ }); /* harmony import */ var _reduced_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_reduced.js */ "./node_modules/ramda/es/internal/_reduced.js"); /* harmony import */ var _xfBase_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_xfBase.js */ "./node_modules/ramda/es/internal/_xfBase.js"); var XFind = /*#__PURE__*/ function () { function XFind(f, xf) { this.xf = xf; this.f = f; this.found = false; } XFind.prototype['@@transducer/init'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_1__["default"].init; XFind.prototype['@@transducer/result'] = function (result) { if (!this.found) { result = this.xf['@@transducer/step'](result, void 0); } return this.xf['@@transducer/result'](result); }; XFind.prototype['@@transducer/step'] = function (result, input) { if (this.f(input)) { this.found = true; result = (0,_reduced_js__WEBPACK_IMPORTED_MODULE_0__["default"])(this.xf['@@transducer/step'](result, input)); } return result; }; return XFind; }(); function _xfind(f) { return function (xf) { return new XFind(f, xf); }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_xfindIndex.js": /*!*******************************************************!*\ !*** ./node_modules/ramda/es/internal/_xfindIndex.js ***! \*******************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _xfindIndex; } /* harmony export */ }); /* harmony import */ var _reduced_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_reduced.js */ "./node_modules/ramda/es/internal/_reduced.js"); /* harmony import */ var _xfBase_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_xfBase.js */ "./node_modules/ramda/es/internal/_xfBase.js"); var XFindIndex = /*#__PURE__*/ function () { function XFindIndex(f, xf) { this.xf = xf; this.f = f; this.idx = -1; this.found = false; } XFindIndex.prototype['@@transducer/init'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_1__["default"].init; XFindIndex.prototype['@@transducer/result'] = function (result) { if (!this.found) { result = this.xf['@@transducer/step'](result, -1); } return this.xf['@@transducer/result'](result); }; XFindIndex.prototype['@@transducer/step'] = function (result, input) { this.idx += 1; if (this.f(input)) { this.found = true; result = (0,_reduced_js__WEBPACK_IMPORTED_MODULE_0__["default"])(this.xf['@@transducer/step'](result, this.idx)); } return result; }; return XFindIndex; }(); function _xfindIndex(f) { return function (xf) { return new XFindIndex(f, xf); }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_xfindLast.js": /*!******************************************************!*\ !*** ./node_modules/ramda/es/internal/_xfindLast.js ***! \******************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _xfindLast; } /* harmony export */ }); /* harmony import */ var _xfBase_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_xfBase.js */ "./node_modules/ramda/es/internal/_xfBase.js"); var XFindLast = /*#__PURE__*/ function () { function XFindLast(f, xf) { this.xf = xf; this.f = f; } XFindLast.prototype['@@transducer/init'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_0__["default"].init; XFindLast.prototype['@@transducer/result'] = function (result) { return this.xf['@@transducer/result'](this.xf['@@transducer/step'](result, this.last)); }; XFindLast.prototype['@@transducer/step'] = function (result, input) { if (this.f(input)) { this.last = input; } return result; }; return XFindLast; }(); function _xfindLast(f) { return function (xf) { return new XFindLast(f, xf); }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_xfindLastIndex.js": /*!***********************************************************!*\ !*** ./node_modules/ramda/es/internal/_xfindLastIndex.js ***! \***********************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _xfindLastIndex; } /* harmony export */ }); /* harmony import */ var _xfBase_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_xfBase.js */ "./node_modules/ramda/es/internal/_xfBase.js"); var XFindLastIndex = /*#__PURE__*/ function () { function XFindLastIndex(f, xf) { this.xf = xf; this.f = f; this.idx = -1; this.lastIdx = -1; } XFindLastIndex.prototype['@@transducer/init'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_0__["default"].init; XFindLastIndex.prototype['@@transducer/result'] = function (result) { return this.xf['@@transducer/result'](this.xf['@@transducer/step'](result, this.lastIdx)); }; XFindLastIndex.prototype['@@transducer/step'] = function (result, input) { this.idx += 1; if (this.f(input)) { this.lastIdx = this.idx; } return result; }; return XFindLastIndex; }(); function _xfindLastIndex(f) { return function (xf) { return new XFindLastIndex(f, xf); }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_xmap.js": /*!*************************************************!*\ !*** ./node_modules/ramda/es/internal/_xmap.js ***! \*************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _xfBase_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_xfBase.js */ "./node_modules/ramda/es/internal/_xfBase.js"); var XMap = /*#__PURE__*/ function () { function XMap(f, xf) { this.xf = xf; this.f = f; } XMap.prototype['@@transducer/init'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_0__["default"].init; XMap.prototype['@@transducer/result'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_0__["default"].result; XMap.prototype['@@transducer/step'] = function (result, input) { return this.xf['@@transducer/step'](result, this.f(input)); }; return XMap; }(); var _xmap = function _xmap(f) { return function (xf) { return new XMap(f, xf); }; }; /* harmony default export */ __webpack_exports__["default"] = (_xmap); /***/ }), /***/ "./node_modules/ramda/es/internal/_xpromap.js": /*!****************************************************!*\ !*** ./node_modules/ramda/es/internal/_xpromap.js ***! \****************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _xpromap; } /* harmony export */ }); /* harmony import */ var _xfBase_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_xfBase.js */ "./node_modules/ramda/es/internal/_xfBase.js"); /* harmony import */ var _promap_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_promap.js */ "./node_modules/ramda/es/internal/_promap.js"); var XPromap = /*#__PURE__*/ function () { function XPromap(f, g, xf) { this.xf = xf; this.f = f; this.g = g; } XPromap.prototype['@@transducer/init'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_0__["default"].init; XPromap.prototype['@@transducer/result'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_0__["default"].result; XPromap.prototype['@@transducer/step'] = function (result, input) { return this.xf['@@transducer/step'](result, (0,_promap_js__WEBPACK_IMPORTED_MODULE_1__["default"])(this.f, this.g, input)); }; return XPromap; }(); function _xpromap(f, g) { return function (xf) { return new XPromap(f, g, xf); }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_xreduceBy.js": /*!******************************************************!*\ !*** ./node_modules/ramda/es/internal/_xreduceBy.js ***! \******************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _xreduceBy; } /* harmony export */ }); /* harmony import */ var _clone_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_clone.js */ "./node_modules/ramda/es/internal/_clone.js"); /* harmony import */ var _has_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_has.js */ "./node_modules/ramda/es/internal/_has.js"); /* harmony import */ var _xfBase_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./_xfBase.js */ "./node_modules/ramda/es/internal/_xfBase.js"); var XReduceBy = /*#__PURE__*/ function () { function XReduceBy(valueFn, valueAcc, keyFn, xf) { this.valueFn = valueFn; this.valueAcc = valueAcc; this.keyFn = keyFn; this.xf = xf; this.inputs = {}; } XReduceBy.prototype['@@transducer/init'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_2__["default"].init; XReduceBy.prototype['@@transducer/result'] = function (result) { var key; for (key in this.inputs) { if ((0,_has_js__WEBPACK_IMPORTED_MODULE_1__["default"])(key, this.inputs)) { result = this.xf['@@transducer/step'](result, this.inputs[key]); if (result['@@transducer/reduced']) { result = result['@@transducer/value']; break; } } } this.inputs = null; return this.xf['@@transducer/result'](result); }; XReduceBy.prototype['@@transducer/step'] = function (result, input) { var key = this.keyFn(input); this.inputs[key] = this.inputs[key] || [key, (0,_clone_js__WEBPACK_IMPORTED_MODULE_0__["default"])(this.valueAcc, false)]; this.inputs[key][1] = this.valueFn(this.inputs[key][1], input); return result; }; return XReduceBy; }(); function _xreduceBy(valueFn, valueAcc, keyFn) { return function (xf) { return new XReduceBy(valueFn, valueAcc, keyFn, xf); }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_xscan.js": /*!**************************************************!*\ !*** ./node_modules/ramda/es/internal/_xscan.js ***! \**************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _xfBase_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_xfBase.js */ "./node_modules/ramda/es/internal/_xfBase.js"); var tInit = '@@transducer/init'; var tStep = '@@transducer/step'; var XScan = /*#__PURE__*/ function () { function XScan(reducer, acc, xf) { this.xf = xf; this.f = reducer; this.acc = acc; } XScan.prototype[tInit] = function () { return this.xf[tStep](this.xf[tInit](), this.acc); }; XScan.prototype['@@transducer/result'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_1__["default"].result; XScan.prototype[tStep] = function (result, input) { if (result['@@transducer/reduced']) { return result; } this.acc = this.f(this.acc, input); return this.xf[tStep](result, this.acc); }; return XScan; }(); var _xscan = /*#__PURE__*/ (0,_curry3_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function _xscan(reducer, acc, xf) { return new XScan(reducer, acc, xf); }); /* harmony default export */ __webpack_exports__["default"] = (_xscan); /***/ }), /***/ "./node_modules/ramda/es/internal/_xtake.js": /*!**************************************************!*\ !*** ./node_modules/ramda/es/internal/_xtake.js ***! \**************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _xtake; } /* harmony export */ }); /* harmony import */ var _reduced_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_reduced.js */ "./node_modules/ramda/es/internal/_reduced.js"); /* harmony import */ var _xfBase_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_xfBase.js */ "./node_modules/ramda/es/internal/_xfBase.js"); var XTake = /*#__PURE__*/ function () { function XTake(n, xf) { this.xf = xf; this.n = n; this.i = 0; } XTake.prototype['@@transducer/init'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_1__["default"].init; XTake.prototype['@@transducer/result'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_1__["default"].result; XTake.prototype['@@transducer/step'] = function (result, input) { this.i += 1; var ret = this.n === 0 ? result : this.xf['@@transducer/step'](result, input); return this.n >= 0 && this.i >= this.n ? (0,_reduced_js__WEBPACK_IMPORTED_MODULE_0__["default"])(ret) : ret; }; return XTake; }(); function _xtake(n) { return function (xf) { return new XTake(n, xf); }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_xtakeWhile.js": /*!*******************************************************!*\ !*** ./node_modules/ramda/es/internal/_xtakeWhile.js ***! \*******************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _xtakeWhile; } /* harmony export */ }); /* harmony import */ var _reduced_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_reduced.js */ "./node_modules/ramda/es/internal/_reduced.js"); /* harmony import */ var _xfBase_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_xfBase.js */ "./node_modules/ramda/es/internal/_xfBase.js"); var XTakeWhile = /*#__PURE__*/ function () { function XTakeWhile(f, xf) { this.xf = xf; this.f = f; } XTakeWhile.prototype['@@transducer/init'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_1__["default"].init; XTakeWhile.prototype['@@transducer/result'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_1__["default"].result; XTakeWhile.prototype['@@transducer/step'] = function (result, input) { return this.f(input) ? this.xf['@@transducer/step'](result, input) : (0,_reduced_js__WEBPACK_IMPORTED_MODULE_0__["default"])(result); }; return XTakeWhile; }(); function _xtakeWhile(f) { return function (xf) { return new XTakeWhile(f, xf); }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_xtap.js": /*!*************************************************!*\ !*** ./node_modules/ramda/es/internal/_xtap.js ***! \*************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _xtap; } /* harmony export */ }); /* harmony import */ var _xfBase_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_xfBase.js */ "./node_modules/ramda/es/internal/_xfBase.js"); var XTap = /*#__PURE__*/ function () { function XTap(f, xf) { this.xf = xf; this.f = f; } XTap.prototype['@@transducer/init'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_0__["default"].init; XTap.prototype['@@transducer/result'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_0__["default"].result; XTap.prototype['@@transducer/step'] = function (result, input) { this.f(input); return this.xf['@@transducer/step'](result, input); }; return XTap; }(); function _xtap(f) { return function (xf) { return new XTap(f, xf); }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_xuniqBy.js": /*!****************************************************!*\ !*** ./node_modules/ramda/es/internal/_xuniqBy.js ***! \****************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _xuniqBy; } /* harmony export */ }); /* harmony import */ var _Set_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_Set.js */ "./node_modules/ramda/es/internal/_Set.js"); /* harmony import */ var _xfBase_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_xfBase.js */ "./node_modules/ramda/es/internal/_xfBase.js"); var XUniqBy = /*#__PURE__*/ function () { function XUniqBy(f, xf) { this.xf = xf; this.f = f; this.set = new _Set_js__WEBPACK_IMPORTED_MODULE_0__["default"](); } XUniqBy.prototype['@@transducer/init'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_1__["default"].init; XUniqBy.prototype['@@transducer/result'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_1__["default"].result; XUniqBy.prototype['@@transducer/step'] = function (result, input) { return this.set.add(this.f(input)) ? this.xf['@@transducer/step'](result, input) : result; }; return XUniqBy; }(); function _xuniqBy(f) { return function (xf) { return new XUniqBy(f, xf); }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_xuniqWith.js": /*!******************************************************!*\ !*** ./node_modules/ramda/es/internal/_xuniqWith.js ***! \******************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _xuniqWith; } /* harmony export */ }); /* harmony import */ var _includesWith_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_includesWith.js */ "./node_modules/ramda/es/internal/_includesWith.js"); /* harmony import */ var _xfBase_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_xfBase.js */ "./node_modules/ramda/es/internal/_xfBase.js"); var XUniqWith = /*#__PURE__*/ function () { function XUniqWith(pred, xf) { this.xf = xf; this.pred = pred; this.items = []; } XUniqWith.prototype['@@transducer/init'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_1__["default"].init; XUniqWith.prototype['@@transducer/result'] = _xfBase_js__WEBPACK_IMPORTED_MODULE_1__["default"].result; XUniqWith.prototype['@@transducer/step'] = function (result, input) { if ((0,_includesWith_js__WEBPACK_IMPORTED_MODULE_0__["default"])(this.pred, input, this.items)) { return result; } else { this.items.push(input); return this.xf['@@transducer/step'](result, input); } }; return XUniqWith; }(); function _xuniqWith(pred) { return function (xf) { return new XUniqWith(pred, xf); }; } /***/ }), /***/ "./node_modules/ramda/es/internal/_xwrap.js": /*!**************************************************!*\ !*** ./node_modules/ramda/es/internal/_xwrap.js ***! \**************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ _xwrap; } /* harmony export */ }); var XWrap = /*#__PURE__*/ function () { function XWrap(fn) { this.f = fn; } XWrap.prototype['@@transducer/init'] = function () { throw new Error('init not implemented on XWrap'); }; XWrap.prototype['@@transducer/result'] = function (acc) { return acc; }; XWrap.prototype['@@transducer/step'] = function (acc, x) { return this.f(acc, x); }; return XWrap; }(); function _xwrap(fn) { return new XWrap(fn); } /***/ }), /***/ "./node_modules/ramda/es/intersection.js": /*!***********************************************!*\ !*** ./node_modules/ramda/es/intersection.js ***! \***********************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_filter_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_filter.js */ "./node_modules/ramda/es/internal/_filter.js"); /* harmony import */ var _internal_Set_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_Set.js */ "./node_modules/ramda/es/internal/_Set.js"); /* harmony import */ var _uniq_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./uniq.js */ "./node_modules/ramda/es/uniq.js"); /** * Combines two lists into a set (i.e. no duplicates) composed of those * elements common to both lists. * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig [*] -> [*] -> [*] * @param {Array} list1 The first list. * @param {Array} list2 The second list. * @return {Array} The list of elements found in both `list1` and `list2`. * @see R.innerJoin * @example * * R.intersection([1,2,3,4], [7,6,5,4,3]); //=> [4, 3] */ var intersection = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function intersection(list1, list2) { var toKeep = new _internal_Set_js__WEBPACK_IMPORTED_MODULE_2__["default"](); for (var i = 0; i < list1.length; i += 1) { toKeep.add(list1[i]); } return (0,_uniq_js__WEBPACK_IMPORTED_MODULE_3__["default"])((0,_internal_filter_js__WEBPACK_IMPORTED_MODULE_1__["default"])(toKeep.has.bind(toKeep), list2)); }); /* harmony default export */ __webpack_exports__["default"] = (intersection); /***/ }), /***/ "./node_modules/ramda/es/intersperse.js": /*!**********************************************!*\ !*** ./node_modules/ramda/es/intersperse.js ***! \**********************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_checkForMethod_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_checkForMethod.js */ "./node_modules/ramda/es/internal/_checkForMethod.js"); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Creates a new list with the separator interposed between elements. * * Dispatches to the `intersperse` method of the second argument, if present. * * @func * @memberOf R * @since v0.14.0 * @category List * @sig a -> [a] -> [a] * @param {*} separator The element to add to the list. * @param {Array} list The list to be interposed. * @return {Array} The new list. * @example * * R.intersperse('a', ['b', 'n', 'n', 's']); //=> ['b', 'a', 'n', 'a', 'n', 'a', 's'] */ var intersperse = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/ (0,_internal_checkForMethod_js__WEBPACK_IMPORTED_MODULE_0__["default"])('intersperse', function intersperse(separator, list) { var out = []; var idx = 0; var length = list.length; while (idx < length) { if (idx === length - 1) { out.push(list[idx]); } else { out.push(list[idx], separator); } idx += 1; } return out; })); /* harmony default export */ __webpack_exports__["default"] = (intersperse); /***/ }), /***/ "./node_modules/ramda/es/into.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/into.js ***! \***************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _internal_isTransformer_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isTransformer.js */ "./node_modules/ramda/es/internal/_isTransformer.js"); /* harmony import */ var _internal_xReduce_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xReduce.js */ "./node_modules/ramda/es/internal/_xReduce.js"); /* harmony import */ var _internal_stepCat_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_stepCat.js */ "./node_modules/ramda/es/internal/_stepCat.js"); /** * Transforms the items of the list with the transducer and appends the * transformed items to the accumulator using an appropriate iterator function * based on the accumulator type. * * The accumulator can be an array, string, object or a transformer. Iterated * items will be appended to arrays and concatenated to strings. Objects will * be merged directly or 2-item arrays will be merged as key, value pairs. * * The accumulator can also be a transformer object that provides a 2-arity * reducing iterator function, step, 0-arity initial value function, init, and * 1-arity result extraction function result. The step function is used as the * iterator function in reduce. The result function is used to convert the * final accumulator into the return type and in most cases is R.identity. The * init function is used to provide the initial accumulator. * * The iteration is performed with [`R.reduce`](#reduce) after initializing the * transducer. * * @func * @memberOf R * @since v0.12.0 * @category List * @sig a -> (b -> b) -> [c] -> a * @param {*} acc The initial accumulator value. * @param {Function} xf The transducer function. Receives a transformer and returns a transformer. * @param {Array} list The list to iterate over. * @return {*} The final, accumulated value. * @see R.transduce * @example * * const numbers = [1, 2, 3, 4]; * const transducer = R.compose(R.map(R.add(1)), R.take(2)); * * R.into([], transducer, numbers); //=> [2, 3] * * const intoArray = R.into([]); * intoArray(transducer, numbers); //=> [2, 3] */ var into = /*#__PURE__*/ (0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function into(acc, transducer, list) { var xf = transducer((0,_internal_isTransformer_js__WEBPACK_IMPORTED_MODULE_1__["default"])(acc) ? acc : (0,_internal_stepCat_js__WEBPACK_IMPORTED_MODULE_3__["default"])(acc)); return (0,_internal_xReduce_js__WEBPACK_IMPORTED_MODULE_2__["default"])(xf, xf['@@transducer/init'](), list); }); /* harmony default export */ __webpack_exports__["default"] = (into); /***/ }), /***/ "./node_modules/ramda/es/invert.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/invert.js ***! \*****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _internal_has_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_has.js */ "./node_modules/ramda/es/internal/_has.js"); /* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./keys.js */ "./node_modules/ramda/es/keys.js"); /** * Same as [`R.invertObj`](#invertObj), however this accounts for objects with * duplicate values by putting the values into an array. * * @func * @memberOf R * @since v0.9.0 * @category Object * @sig {s: x} -> {x: [ s, ... ]} * @param {Object} obj The object or array to invert * @return {Object} out A new object with keys in an array. * @see R.invertObj * @example * * const raceResultsByFirstName = { * first: 'alice', * second: 'jake', * third: 'alice', * }; * R.invert(raceResultsByFirstName); * //=> { 'alice': ['first', 'third'], 'jake':['second'] } */ var invert = /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function invert(obj) { var props = (0,_keys_js__WEBPACK_IMPORTED_MODULE_2__["default"])(obj); var len = props.length; var idx = 0; var out = {}; while (idx < len) { var key = props[idx]; var val = obj[key]; var list = (0,_internal_has_js__WEBPACK_IMPORTED_MODULE_1__["default"])(val, out) ? out[val] : out[val] = []; list[list.length] = key; idx += 1; } return out; }); /* harmony default export */ __webpack_exports__["default"] = (invert); /***/ }), /***/ "./node_modules/ramda/es/invertObj.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/invertObj.js ***! \********************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./keys.js */ "./node_modules/ramda/es/keys.js"); /** * Returns a new object with the keys of the given object as values, and the * values of the given object, which are coerced to strings, as keys. Note * that the last key found is preferred when handling the same value. * * @func * @memberOf R * @since v0.9.0 * @category Object * @sig {s: x} -> {x: s} * @param {Object} obj The object or array to invert * @return {Object} out A new object * @see R.invert * @example * * const raceResults = { * first: 'alice', * second: 'jake' * }; * R.invertObj(raceResults); * //=> { 'alice': 'first', 'jake':'second' } * * // Alternatively: * const raceResults = ['alice', 'jake']; * R.invertObj(raceResults); * //=> { 'alice': '0', 'jake':'1' } */ var invertObj = /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function invertObj(obj) { var props = (0,_keys_js__WEBPACK_IMPORTED_MODULE_1__["default"])(obj); var len = props.length; var idx = 0; var out = {}; while (idx < len) { var key = props[idx]; out[obj[key]] = key; idx += 1; } return out; }); /* harmony default export */ __webpack_exports__["default"] = (invertObj); /***/ }), /***/ "./node_modules/ramda/es/invoker.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/invoker.js ***! \******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_isFunction_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isFunction.js */ "./node_modules/ramda/es/internal/_isFunction.js"); /* harmony import */ var _curryN_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./curryN.js */ "./node_modules/ramda/es/curryN.js"); /* harmony import */ var _toString_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./toString.js */ "./node_modules/ramda/es/toString.js"); /** * Given an `arity` (Number) and a `name` (String) the `invoker` function * returns a curried function that takes `arity` arguments and a `context` * object. It will "invoke" the `name`'d function (a method) on the `context` * object. * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig Number -> String -> (a -> b -> ... -> n -> Object -> *) * @param {Number} arity Number of arguments the returned function should take * before the target object. * @param {String} method Name of any of the target object's methods to call. * @return {Function} A new curried function. * @see R.construct * @example * // A function with no arguments * const asJson = invoker(0, "json") * // Just like calling .then((response) => response.json()) * fetch("http://example.com/index.json").then(asJson) * * // A function with one argument * const sliceFrom = invoker(1, 'slice'); * sliceFrom(6, 'abcdefghijklm'); //=> 'ghijklm' * * // A function with two arguments * const sliceFrom6 = invoker(2, 'slice')(6); * sliceFrom6(8, 'abcdefghijklm'); //=> 'gh' * * // NOTE: You can't simply pass some of the arguments to the initial invoker function. * const firstCreditCardSection = invoker(2, "slice", 0, 4) * firstCreditCardSection("4242 4242 4242 4242") // => Function<...> * * // Since invoker returns a curried function, you may partially apply it to create the function you need. * const firstCreditCardSection = invoker(2, "slice")(0, 4) * firstCreditCardSection("4242 4242 4242 4242") // => "4242" * * @symb R.invoker(0, 'method')(o) = o['method']() * @symb R.invoker(1, 'method')(a, o) = o['method'](a) * @symb R.invoker(2, 'method')(a, b, o) = o['method'](a, b) */ var invoker = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function invoker(arity, method) { return (0,_curryN_js__WEBPACK_IMPORTED_MODULE_2__["default"])(arity + 1, function () { var target = arguments[arity]; if (target != null && (0,_internal_isFunction_js__WEBPACK_IMPORTED_MODULE_1__["default"])(target[method])) { return target[method].apply(target, Array.prototype.slice.call(arguments, 0, arity)); } throw new TypeError((0,_toString_js__WEBPACK_IMPORTED_MODULE_3__["default"])(target) + ' does not have a method named "' + method + '"'); }); }); /* harmony default export */ __webpack_exports__["default"] = (invoker); /***/ }), /***/ "./node_modules/ramda/es/is.js": /*!*************************************!*\ !*** ./node_modules/ramda/es/is.js ***! \*************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /** * See if an object (i.e. `val`) is an instance of the supplied constructor. This * function will check up the inheritance chain, if any. * If `val` was created using `Object.create`, `R.is(Object, val) === true`. * * @func * @memberOf R * @since v0.3.0 * @category Type * @sig (* -> {*}) -> a -> Boolean * @param {Object} ctor A constructor * @param {*} val The value to test * @return {Boolean} * @example * * R.is(Object, {}); //=> true * R.is(Number, 1); //=> true * R.is(Object, 1); //=> false * R.is(String, 's'); //=> true * R.is(String, new String('')); //=> true * R.is(Object, new String('')); //=> true * R.is(Object, 's'); //=> false * R.is(Number, {}); //=> false */ var is = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function is(Ctor, val) { return val instanceof Ctor || val != null && (val.constructor === Ctor || Ctor.name === 'Object' && typeof val === 'object'); }); /* harmony default export */ __webpack_exports__["default"] = (is); /***/ }), /***/ "./node_modules/ramda/es/isEmpty.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/isEmpty.js ***! \******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _empty_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./empty.js */ "./node_modules/ramda/es/empty.js"); /* harmony import */ var _equals_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./equals.js */ "./node_modules/ramda/es/equals.js"); /** * Returns `true` if the given value is its type's empty value; `false` * otherwise. * * @func * @memberOf R * @since v0.1.0 * @category Logic * @sig a -> Boolean * @param {*} x * @return {Boolean} * @see R.empty * @example * * R.isEmpty([1, 2, 3]); //=> false * R.isEmpty([]); //=> true * R.isEmpty(''); //=> true * R.isEmpty(null); //=> false * R.isEmpty({}); //=> true * R.isEmpty({length: 0}); //=> false * R.isEmpty(Uint8Array.from('')); //=> true */ var isEmpty = /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function isEmpty(x) { return x != null && (0,_equals_js__WEBPACK_IMPORTED_MODULE_2__["default"])(x, (0,_empty_js__WEBPACK_IMPORTED_MODULE_1__["default"])(x)); }); /* harmony default export */ __webpack_exports__["default"] = (isEmpty); /***/ }), /***/ "./node_modules/ramda/es/isNil.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/isNil.js ***! \****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /** * Checks if the input value is `null` or `undefined`. * * @func * @memberOf R * @since v0.9.0 * @category Type * @sig * -> Boolean * @param {*} x The value to test. * @return {Boolean} `true` if `x` is `undefined` or `null`, otherwise `false`. * @example * * R.isNil(null); //=> true * R.isNil(undefined); //=> true * R.isNil(0); //=> false * R.isNil([]); //=> false */ var isNil = /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function isNil(x) { return x == null; }); /* harmony default export */ __webpack_exports__["default"] = (isNil); /***/ }), /***/ "./node_modules/ramda/es/isNotNil.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/isNotNil.js ***! \*******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _isNil_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./isNil.js */ "./node_modules/ramda/es/isNil.js"); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /** * Checks if the input value is not `null` and not `undefined`. * * @func * @memberOf R * @since v0.29.0 * @category Type * @sig * -> Boolean * @param {*} x The value to test. * @return {Boolean} `true` if `x` is not `undefined` or not `null`, otherwise `false`. * @example * * R.isNotNil(null); //=> false * R.isNotNil(undefined); //=> false * R.isNotNil(0); //=> true * R.isNotNil([]); //=> true */ var isNotNil = /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_1__["default"])(function isNotNil(x) { return !(0,_isNil_js__WEBPACK_IMPORTED_MODULE_0__["default"])(x); }); /* harmony default export */ __webpack_exports__["default"] = (isNotNil); /***/ }), /***/ "./node_modules/ramda/es/join.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/join.js ***! \***************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _invoker_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./invoker.js */ "./node_modules/ramda/es/invoker.js"); /** * Returns a string made by inserting the `separator` between each element and * concatenating all the elements into a single string. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig String -> [a] -> String * @param {Number|String} separator The string used to separate the elements. * @param {Array} xs The elements to join into a string. * @return {String} str The string made by concatenating `xs` with `separator`. * @see R.split * @example * * const spacer = R.join(' '); * spacer(['a', 2, 3.4]); //=> 'a 2 3.4' * R.join('|', [1, 2, 3]); //=> '1|2|3' */ var join = /*#__PURE__*/ (0,_invoker_js__WEBPACK_IMPORTED_MODULE_0__["default"])(1, 'join'); /* harmony default export */ __webpack_exports__["default"] = (join); /***/ }), /***/ "./node_modules/ramda/es/juxt.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/juxt.js ***! \***************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _converge_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./converge.js */ "./node_modules/ramda/es/converge.js"); /** * juxt applies a list of functions to a list of values. * * @func * @memberOf R * @since v0.19.0 * @category Function * @sig [(a, b, ..., m) -> n] -> ((a, b, ..., m) -> [n]) * @param {Array} fns An array of functions * @return {Function} A function that returns a list of values after applying each of the original `fns` to its parameters. * @see R.applySpec * @example * * const getRange = R.juxt([Math.min, Math.max]); * getRange(3, 4, 9, -3); //=> [-3, 9] * @symb R.juxt([f, g, h])(a, b) = [f(a, b), g(a, b), h(a, b)] */ var juxt = /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function juxt(fns) { return (0,_converge_js__WEBPACK_IMPORTED_MODULE_1__["default"])(function () { return Array.prototype.slice.call(arguments, 0); }, fns); }); /* harmony default export */ __webpack_exports__["default"] = (juxt); /***/ }), /***/ "./node_modules/ramda/es/keys.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/keys.js ***! \***************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _internal_has_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_has.js */ "./node_modules/ramda/es/internal/_has.js"); /* harmony import */ var _internal_isArguments_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_isArguments.js */ "./node_modules/ramda/es/internal/_isArguments.js"); // cover IE < 9 keys issues var hasEnumBug = ! /*#__PURE__*/ { toString: null }.propertyIsEnumerable('toString'); var nonEnumerableProps = ['constructor', 'valueOf', 'isPrototypeOf', 'toString', 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString']; // Safari bug var hasArgsEnumBug = /*#__PURE__*/ function () { 'use strict'; return arguments.propertyIsEnumerable('length'); }(); var contains = function contains(list, item) { var idx = 0; while (idx < list.length) { if (list[idx] === item) { return true; } idx += 1; } return false; }; /** * Returns a list containing the names of all the enumerable own properties of * the supplied object. * Note that the order of the output array is not guaranteed to be consistent * across different JS platforms. * * @func * @memberOf R * @since v0.1.0 * @category Object * @sig {k: v} -> [k] * @param {Object} obj The object to extract properties from * @return {Array} An array of the object's own properties. * @see R.keysIn, R.values, R.toPairs * @example * * R.keys({a: 1, b: 2, c: 3}); //=> ['a', 'b', 'c'] */ var keys = typeof Object.keys === 'function' && !hasArgsEnumBug ? /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function keys(obj) { return Object(obj) !== obj ? [] : Object.keys(obj); }) : /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function keys(obj) { if (Object(obj) !== obj) { return []; } var prop, nIdx; var ks = []; var checkArgsLength = hasArgsEnumBug && (0,_internal_isArguments_js__WEBPACK_IMPORTED_MODULE_2__["default"])(obj); for (prop in obj) { if ((0,_internal_has_js__WEBPACK_IMPORTED_MODULE_1__["default"])(prop, obj) && (!checkArgsLength || prop !== 'length')) { ks[ks.length] = prop; } } if (hasEnumBug) { nIdx = nonEnumerableProps.length - 1; while (nIdx >= 0) { prop = nonEnumerableProps[nIdx]; if ((0,_internal_has_js__WEBPACK_IMPORTED_MODULE_1__["default"])(prop, obj) && !contains(ks, prop)) { ks[ks.length] = prop; } nIdx -= 1; } } return ks; }); /* harmony default export */ __webpack_exports__["default"] = (keys); /***/ }), /***/ "./node_modules/ramda/es/keysIn.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/keysIn.js ***! \*****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /** * Returns a list containing the names of all the properties of the supplied * object, including prototype properties. * Note that the order of the output array is not guaranteed to be consistent * across different JS platforms. * * @func * @memberOf R * @since v0.2.0 * @category Object * @sig {k: v} -> [k] * @param {Object} obj The object to extract properties from * @return {Array} An array of the object's own and prototype properties. * @see R.keys, R.valuesIn * @example * * const F = function() { this.x = 'X'; }; * F.prototype.y = 'Y'; * const f = new F(); * R.keysIn(f); //=> ['x', 'y'] */ var keysIn = /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function keysIn(obj) { var prop; var ks = []; for (prop in obj) { ks[ks.length] = prop; } return ks; }); /* harmony default export */ __webpack_exports__["default"] = (keysIn); /***/ }), /***/ "./node_modules/ramda/es/last.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/last.js ***! \***************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _nth_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./nth.js */ "./node_modules/ramda/es/nth.js"); /** * Returns the last element of the given list or string. * * @func * @memberOf R * @since v0.1.4 * @category List * @sig [a] -> a | Undefined * @sig String -> String * @param {*} list * @return {*} * @see R.init, R.head, R.tail * @example * * R.last(['fi', 'fo', 'fum']); //=> 'fum' * R.last([]); //=> undefined * * R.last('abc'); //=> 'c' * R.last(''); //=> '' */ var last = /*#__PURE__*/ (0,_nth_js__WEBPACK_IMPORTED_MODULE_0__["default"])(-1); /* harmony default export */ __webpack_exports__["default"] = (last); /***/ }), /***/ "./node_modules/ramda/es/lastIndexOf.js": /*!**********************************************!*\ !*** ./node_modules/ramda/es/lastIndexOf.js ***! \**********************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_isArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isArray.js */ "./node_modules/ramda/es/internal/_isArray.js"); /* harmony import */ var _equals_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./equals.js */ "./node_modules/ramda/es/equals.js"); /** * Returns the position of the last occurrence of an item in an array, or -1 if * the item is not included in the array. [`R.equals`](#equals) is used to * determine equality. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig a -> [a] -> Number * @param {*} target The item to find. * @param {Array} xs The array to search in. * @return {Number} the index of the target, or -1 if the target is not found. * @see R.indexOf, R.findLastIndex * @example * * R.lastIndexOf(3, [-1,3,3,0,1,2,3,4]); //=> 6 * R.lastIndexOf(10, [1,2,3,4]); //=> -1 */ var lastIndexOf = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function lastIndexOf(target, xs) { if (typeof xs.lastIndexOf === 'function' && !(0,_internal_isArray_js__WEBPACK_IMPORTED_MODULE_1__["default"])(xs)) { return xs.lastIndexOf(target); } else { var idx = xs.length - 1; while (idx >= 0) { if ((0,_equals_js__WEBPACK_IMPORTED_MODULE_2__["default"])(xs[idx], target)) { return idx; } idx -= 1; } return -1; } }); /* harmony default export */ __webpack_exports__["default"] = (lastIndexOf); /***/ }), /***/ "./node_modules/ramda/es/length.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/length.js ***! \*****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _internal_isNumber_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isNumber.js */ "./node_modules/ramda/es/internal/_isNumber.js"); /** * Returns the number of elements in the array by returning `list.length`. * * @func * @memberOf R * @since v0.3.0 * @category List * @sig [a] -> Number * @param {Array} list The array to inspect. * @return {Number} The length of the array. * @example * * R.length([]); //=> 0 * R.length([1, 2, 3]); //=> 3 */ var length = /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function length(list) { return list != null && (0,_internal_isNumber_js__WEBPACK_IMPORTED_MODULE_1__["default"])(list.length) ? list.length : NaN; }); /* harmony default export */ __webpack_exports__["default"] = (length); /***/ }), /***/ "./node_modules/ramda/es/lens.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/lens.js ***! \***************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _map_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./map.js */ "./node_modules/ramda/es/map.js"); /** * Returns a lens for the given getter and setter functions. The getter "gets" * the value of the focus; the setter "sets" the value of the focus. The setter * should not mutate the data structure. * * @func * @memberOf R * @since v0.8.0 * @category Object * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s * @sig (s -> a) -> ((a, s) -> s) -> Lens s a * @param {Function} getter * @param {Function} setter * @return {Lens} * @see R.view, R.set, R.over, R.lensIndex, R.lensProp * @example * * const xLens = R.lens(R.prop('x'), R.assoc('x')); * * R.view(xLens, {x: 1, y: 2}); //=> 1 * R.set(xLens, 4, {x: 1, y: 2}); //=> {x: 4, y: 2} * R.over(xLens, R.negate, {x: 1, y: 2}); //=> {x: -1, y: 2} */ var lens = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function lens(getter, setter) { return function (toFunctorFn) { return function (target) { return (0,_map_js__WEBPACK_IMPORTED_MODULE_1__["default"])(function (focus) { return setter(focus, target); }, toFunctorFn(getter(target))); }; }; }); /* harmony default export */ __webpack_exports__["default"] = (lens); /***/ }), /***/ "./node_modules/ramda/es/lensIndex.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/lensIndex.js ***! \********************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _lens_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lens.js */ "./node_modules/ramda/es/lens.js"); /* harmony import */ var _nth_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./nth.js */ "./node_modules/ramda/es/nth.js"); /* harmony import */ var _update_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./update.js */ "./node_modules/ramda/es/update.js"); /** * Returns a lens whose focus is the specified index. * * @func * @memberOf R * @since v0.14.0 * @category Object * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s * @sig Number -> Lens s a * @param {Number} n * @return {Lens} * @see R.view, R.set, R.over, R.nth * @example * * const headLens = R.lensIndex(0); * * R.view(headLens, ['a', 'b', 'c']); //=> 'a' * R.set(headLens, 'x', ['a', 'b', 'c']); //=> ['x', 'b', 'c'] * R.over(headLens, R.toUpper, ['a', 'b', 'c']); //=> ['A', 'b', 'c'] */ var lensIndex = /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function lensIndex(n) { return (0,_lens_js__WEBPACK_IMPORTED_MODULE_1__["default"])((0,_nth_js__WEBPACK_IMPORTED_MODULE_2__["default"])(n), (0,_update_js__WEBPACK_IMPORTED_MODULE_3__["default"])(n)); }); /* harmony default export */ __webpack_exports__["default"] = (lensIndex); /***/ }), /***/ "./node_modules/ramda/es/lensPath.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/lensPath.js ***! \*******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _assocPath_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./assocPath.js */ "./node_modules/ramda/es/assocPath.js"); /* harmony import */ var _lens_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lens.js */ "./node_modules/ramda/es/lens.js"); /* harmony import */ var _path_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./path.js */ "./node_modules/ramda/es/path.js"); /** * Returns a lens whose focus is the specified path. * * @func * @memberOf R * @since v0.19.0 * @category Object * @typedefn Idx = String | Int | Symbol * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s * @sig [Idx] -> Lens s a * @param {Array} path The path to use. * @return {Lens} * @see R.view, R.set, R.over * @example * * const xHeadYLens = R.lensPath(['x', 0, 'y']); * * R.view(xHeadYLens, {x: [{y: 2, z: 3}, {y: 4, z: 5}]}); * //=> 2 * R.set(xHeadYLens, 1, {x: [{y: 2, z: 3}, {y: 4, z: 5}]}); * //=> {x: [{y: 1, z: 3}, {y: 4, z: 5}]} * R.over(xHeadYLens, R.negate, {x: [{y: 2, z: 3}, {y: 4, z: 5}]}); * //=> {x: [{y: -2, z: 3}, {y: 4, z: 5}]} */ var lensPath = /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function lensPath(p) { return (0,_lens_js__WEBPACK_IMPORTED_MODULE_2__["default"])((0,_path_js__WEBPACK_IMPORTED_MODULE_3__["default"])(p), (0,_assocPath_js__WEBPACK_IMPORTED_MODULE_1__["default"])(p)); }); /* harmony default export */ __webpack_exports__["default"] = (lensPath); /***/ }), /***/ "./node_modules/ramda/es/lensProp.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/lensProp.js ***! \*******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _assoc_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./assoc.js */ "./node_modules/ramda/es/assoc.js"); /* harmony import */ var _lens_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lens.js */ "./node_modules/ramda/es/lens.js"); /* harmony import */ var _prop_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./prop.js */ "./node_modules/ramda/es/prop.js"); /** * Returns a lens whose focus is the specified property. * * @func * @memberOf R * @since v0.14.0 * @category Object * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s * @sig String -> Lens s a * @param {String} k * @return {Lens} * @see R.view, R.set, R.over * @example * * const xLens = R.lensProp('x'); * * R.view(xLens, {x: 1, y: 2}); //=> 1 * R.set(xLens, 4, {x: 1, y: 2}); //=> {x: 4, y: 2} * R.over(xLens, R.negate, {x: 1, y: 2}); //=> {x: -1, y: 2} */ var lensProp = /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function lensProp(k) { return (0,_lens_js__WEBPACK_IMPORTED_MODULE_2__["default"])((0,_prop_js__WEBPACK_IMPORTED_MODULE_3__["default"])(k), (0,_assoc_js__WEBPACK_IMPORTED_MODULE_1__["default"])(k)); }); /* harmony default export */ __webpack_exports__["default"] = (lensProp); /***/ }), /***/ "./node_modules/ramda/es/lift.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/lift.js ***! \***************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _liftN_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./liftN.js */ "./node_modules/ramda/es/liftN.js"); /** * "lifts" a function of arity >= 1 so that it may "map over" a list, Function or other * object that satisfies the [FantasyLand Apply spec](https://github.com/fantasyland/fantasy-land#apply). * * @func * @memberOf R * @since v0.7.0 * @category Function * @sig (*... -> *) -> ([*]... -> [*]) * @param {Function} fn The function to lift into higher context * @return {Function} The lifted function. * @see R.liftN * @example * * const madd3 = R.lift((a, b, c) => a + b + c); * * madd3([100, 200], [30, 40], [5, 6, 7]); //=> [135, 136, 137, 145, 146, 147, 235, 236, 237, 245, 246, 247] * * const madd5 = R.lift((a, b, c, d, e) => a + b + c + d + e); * * madd5([10, 20], [1], [2, 3], [4], [100, 200]); //=> [117, 217, 118, 218, 127, 227, 128, 228] */ var lift = /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function lift(fn) { return (0,_liftN_js__WEBPACK_IMPORTED_MODULE_1__["default"])(fn.length, fn); }); /* harmony default export */ __webpack_exports__["default"] = (lift); /***/ }), /***/ "./node_modules/ramda/es/liftN.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/liftN.js ***! \****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_arrayReduce_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_arrayReduce.js */ "./node_modules/ramda/es/internal/_arrayReduce.js"); /* harmony import */ var _ap_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ap.js */ "./node_modules/ramda/es/ap.js"); /* harmony import */ var _curryN_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./curryN.js */ "./node_modules/ramda/es/curryN.js"); /* harmony import */ var _map_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./map.js */ "./node_modules/ramda/es/map.js"); /** * "lifts" a function to be the specified arity, so that it may "map over" that * many lists, Functions or other objects that satisfy the [FantasyLand Apply spec](https://github.com/fantasyland/fantasy-land#apply). * * @func * @memberOf R * @since v0.7.0 * @category Function * @sig Number -> (*... -> *) -> ([*]... -> [*]) * @param {Function} fn The function to lift into higher context * @return {Function} The lifted function. * @see R.lift, R.ap * @example * * const madd3 = R.liftN(3, (...args) => R.sum(args)); * madd3([1,2,3], [1,2,3], [1]); //=> [3, 4, 5, 4, 5, 6, 5, 6, 7] */ var liftN = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function liftN(arity, fn) { var lifted = (0,_curryN_js__WEBPACK_IMPORTED_MODULE_3__["default"])(arity, fn); return (0,_curryN_js__WEBPACK_IMPORTED_MODULE_3__["default"])(arity, function () { return (0,_internal_arrayReduce_js__WEBPACK_IMPORTED_MODULE_1__["default"])(_ap_js__WEBPACK_IMPORTED_MODULE_2__["default"], (0,_map_js__WEBPACK_IMPORTED_MODULE_4__["default"])(lifted, arguments[0]), Array.prototype.slice.call(arguments, 1)); }); }); /* harmony default export */ __webpack_exports__["default"] = (liftN); /***/ }), /***/ "./node_modules/ramda/es/lt.js": /*!*************************************!*\ !*** ./node_modules/ramda/es/lt.js ***! \*************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns `true` if the first argument is less than the second; `false` * otherwise. * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig Ord a => a -> a -> Boolean * @param {*} a * @param {*} b * @return {Boolean} * @see R.gt * @example * * R.lt(2, 1); //=> false * R.lt(2, 2); //=> false * R.lt(2, 3); //=> true * R.lt('a', 'z'); //=> true * R.lt('z', 'a'); //=> false */ var lt = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function lt(a, b) { return a < b; }); /* harmony default export */ __webpack_exports__["default"] = (lt); /***/ }), /***/ "./node_modules/ramda/es/lte.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/lte.js ***! \**************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns `true` if the first argument is less than or equal to the second; * `false` otherwise. * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig Ord a => a -> a -> Boolean * @param {Number} a * @param {Number} b * @return {Boolean} * @see R.gte * @example * * R.lte(2, 1); //=> false * R.lte(2, 2); //=> true * R.lte(2, 3); //=> true * R.lte('a', 'z'); //=> true * R.lte('z', 'a'); //=> false */ var lte = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function lte(a, b) { return a <= b; }); /* harmony default export */ __webpack_exports__["default"] = (lte); /***/ }), /***/ "./node_modules/ramda/es/map.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/map.js ***! \**************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_arrayReduce_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_arrayReduce.js */ "./node_modules/ramda/es/internal/_arrayReduce.js"); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_dispatchable.js */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_map_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_map.js */ "./node_modules/ramda/es/internal/_map.js"); /* harmony import */ var _internal_xmap_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./internal/_xmap.js */ "./node_modules/ramda/es/internal/_xmap.js"); /* harmony import */ var _curryN_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./curryN.js */ "./node_modules/ramda/es/curryN.js"); /* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./keys.js */ "./node_modules/ramda/es/keys.js"); /** * Takes a function and * a [functor](https://github.com/fantasyland/fantasy-land#functor), * applies the function to each of the functor's values, and returns * a functor of the same shape. * * Ramda provides suitable `map` implementations for `Array` and `Object`, * so this function may be applied to `[1, 2, 3]` or `{x: 1, y: 2, z: 3}`. * * Dispatches to the `map` method of the second argument, if present. * * Acts as a transducer if a transformer is given in list position. * * Also treats functions as functors and will compose them together. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig Functor f => (a -> b) -> f a -> f b * @param {Function} fn The function to be called on every element of the input `list`. * @param {Array} list The list to be iterated over. * @return {Array} The new list. * @see R.transduce, R.addIndex, R.pluck, R.project * @example * * const double = x => x * 2; * * R.map(double, [1, 2, 3]); //=> [2, 4, 6] * * R.map(double, {x: 1, y: 2, z: 3}); //=> {x: 2, y: 4, z: 6} * @symb R.map(f, [a, b]) = [f(a), f(b)] * @symb R.map(f, { x: a, y: b }) = { x: f(a), y: f(b) } * @symb R.map(f, functor_o) = functor_o.map(f) */ var map = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/ (0,_internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_2__["default"])(['fantasy-land/map', 'map'], _internal_xmap_js__WEBPACK_IMPORTED_MODULE_4__["default"], function map(fn, functor) { switch (Object.prototype.toString.call(functor)) { case '[object Function]': return (0,_curryN_js__WEBPACK_IMPORTED_MODULE_5__["default"])(functor.length, function () { return fn.call(this, functor.apply(this, arguments)); }); case '[object Object]': return (0,_internal_arrayReduce_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function (acc, key) { acc[key] = fn(functor[key]); return acc; }, {}, (0,_keys_js__WEBPACK_IMPORTED_MODULE_6__["default"])(functor)); default: return (0,_internal_map_js__WEBPACK_IMPORTED_MODULE_3__["default"])(fn, functor); } })); /* harmony default export */ __webpack_exports__["default"] = (map); /***/ }), /***/ "./node_modules/ramda/es/mapAccum.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/mapAccum.js ***! \*******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js"); /** * The `mapAccum` function behaves like a combination of map and reduce; it * applies a function to each element of a list, passing an accumulating * parameter from left to right, and returning a final value of this * accumulator together with the new list. * * The iterator function receives two arguments, *acc* and *value*, and should * return a tuple *[acc, value]*. * * @func * @memberOf R * @since v0.10.0 * @category List * @sig ((acc, x) -> (acc, y)) -> acc -> [x] -> (acc, [y]) * @param {Function} fn The function to be called on every element of the input `list`. * @param {*} acc The accumulator value. * @param {Array} list The list to iterate over. * @return {*} The final, accumulated value. * @see R.scan, R.addIndex, R.mapAccumRight * @example * * const digits = ['1', '2', '3', '4']; * const appender = (a, b) => [a + b, a + b]; * * R.mapAccum(appender, 0, digits); //=> ['01234', ['01', '012', '0123', '01234']] * @symb R.mapAccum(f, a, [b, c, d]) = [ * f(f(f(a, b)[0], c)[0], d)[0], * [ * f(a, b)[1], * f(f(a, b)[0], c)[1], * f(f(f(a, b)[0], c)[0], d)[1] * ] * ] */ var mapAccum = /*#__PURE__*/ (0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function mapAccum(fn, acc, list) { var idx = 0; var len = list.length; var result = []; var tuple = [acc]; while (idx < len) { tuple = fn(tuple[0], list[idx]); result[idx] = tuple[1]; idx += 1; } return [tuple[0], result]; }); /* harmony default export */ __webpack_exports__["default"] = (mapAccum); /***/ }), /***/ "./node_modules/ramda/es/mapAccumRight.js": /*!************************************************!*\ !*** ./node_modules/ramda/es/mapAccumRight.js ***! \************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js"); /** * The `mapAccumRight` function behaves like a combination of map and reduce; it * applies a function to each element of a list, passing an accumulating * parameter from right to left, and returning a final value of this * accumulator together with the new list. * * Similar to [`mapAccum`](#mapAccum), except moves through the input list from * the right to the left. * * The iterator function receives two arguments, *acc* and *value*, and should * return a tuple *[acc, value]*. * * @func * @memberOf R * @since v0.10.0 * @category List * @sig ((acc, x) -> (acc, y)) -> acc -> [x] -> (acc, [y]) * @param {Function} fn The function to be called on every element of the input `list`. * @param {*} acc The accumulator value. * @param {Array} list The list to iterate over. * @return {*} The final, accumulated value. * @see R.addIndex, R.mapAccum * @example * * const digits = ['1', '2', '3', '4']; * const appender = (a, b) => [b + a, b + a]; * * R.mapAccumRight(appender, 5, digits); //=> ['12345', ['12345', '2345', '345', '45']] * @symb R.mapAccumRight(f, a, [b, c, d]) = [ * f(f(f(a, d)[0], c)[0], b)[0], * [ * f(a, d)[1], * f(f(a, d)[0], c)[1], * f(f(f(a, d)[0], c)[0], b)[1] * ] * ] */ var mapAccumRight = /*#__PURE__*/ (0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function mapAccumRight(fn, acc, list) { var idx = list.length - 1; var result = []; var tuple = [acc]; while (idx >= 0) { tuple = fn(tuple[0], list[idx]); result[idx] = tuple[1]; idx -= 1; } return [tuple[0], result]; }); /* harmony default export */ __webpack_exports__["default"] = (mapAccumRight); /***/ }), /***/ "./node_modules/ramda/es/mapObjIndexed.js": /*!************************************************!*\ !*** ./node_modules/ramda/es/mapObjIndexed.js ***! \************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_arrayReduce_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_arrayReduce.js */ "./node_modules/ramda/es/internal/_arrayReduce.js"); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./keys.js */ "./node_modules/ramda/es/keys.js"); /** * An Object-specific version of [`map`](#map). The function is applied to three * arguments: *(value, key, obj)*. If only the value is significant, use * [`map`](#map) instead. * * @func * @memberOf R * @since v0.9.0 * @category Object * @sig ((*, String, Object) -> *) -> Object -> Object * @param {Function} fn * @param {Object} obj * @return {Object} * @see R.map * @example * * const xyz = { x: 1, y: 2, z: 3 }; * const prependKeyAndDouble = (num, key, obj) => key + (num * 2); * * R.mapObjIndexed(prependKeyAndDouble, xyz); //=> { x: 'x2', y: 'y4', z: 'z6' } */ var mapObjIndexed = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__["default"])(function mapObjIndexed(fn, obj) { return (0,_internal_arrayReduce_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function (acc, key) { acc[key] = fn(obj[key], key, obj); return acc; }, {}, (0,_keys_js__WEBPACK_IMPORTED_MODULE_2__["default"])(obj)); }); /* harmony default export */ __webpack_exports__["default"] = (mapObjIndexed); /***/ }), /***/ "./node_modules/ramda/es/match.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/match.js ***! \****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Tests a regular expression against a String. Note that this function will * return an empty array when there are no matches. This differs from * [`String.prototype.match`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/match) * which returns `null` when there are no matches. * * @func * @memberOf R * @since v0.1.0 * @category String * @sig RegExp -> String -> [String | Undefined] * @param {RegExp} rx A regular expression. * @param {String} str The string to match against * @return {Array} The list of matches or empty array. * @see R.test * @example * * R.match(/([a-z]a)/g, 'bananas'); //=> ['ba', 'na', 'na'] * R.match(/a/, 'b'); //=> [] * R.match(/a/, null); //=> TypeError: null does not have a method named "match" */ var match = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function match(rx, str) { return str.match(rx) || []; }); /* harmony default export */ __webpack_exports__["default"] = (match); /***/ }), /***/ "./node_modules/ramda/es/mathMod.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/mathMod.js ***! \******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_isInteger_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isInteger.js */ "./node_modules/ramda/es/internal/_isInteger.js"); /** * `mathMod` behaves like the modulo operator should mathematically, unlike the * `%` operator (and by extension, [`R.modulo`](#modulo)). So while * `-17 % 5` is `-2`, `mathMod(-17, 5)` is `3`. `mathMod` requires Integer * arguments, and returns NaN when the modulus is zero or negative. * * @func * @memberOf R * @since v0.3.0 * @category Math * @sig Number -> Number -> Number * @param {Number} m The dividend. * @param {Number} p the modulus. * @return {Number} The result of `b mod a`. * @see R.modulo * @example * * R.mathMod(-17, 5); //=> 3 * R.mathMod(17, 5); //=> 2 * R.mathMod(17, -5); //=> NaN * R.mathMod(17, 0); //=> NaN * R.mathMod(17.2, 5); //=> NaN * R.mathMod(17, 5.3); //=> NaN * * const clock = R.mathMod(R.__, 12); * clock(15); //=> 3 * clock(24); //=> 0 * * const seventeenMod = R.mathMod(17); * seventeenMod(3); //=> 2 * seventeenMod(4); //=> 1 * seventeenMod(10); //=> 7 */ var mathMod = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function mathMod(m, p) { if (!(0,_internal_isInteger_js__WEBPACK_IMPORTED_MODULE_1__["default"])(m)) { return NaN; } if (!(0,_internal_isInteger_js__WEBPACK_IMPORTED_MODULE_1__["default"])(p) || p < 1) { return NaN; } return (m % p + p) % p; }); /* harmony default export */ __webpack_exports__["default"] = (mathMod); /***/ }), /***/ "./node_modules/ramda/es/max.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/max.js ***! \**************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _toString_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./toString.js */ "./node_modules/ramda/es/toString.js"); /** * Returns the larger of its two arguments. * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig Ord a => a -> a -> a * @param {*} a * @param {*} b * @return {*} * @see R.maxBy, R.min * @example * * R.max(789, 123); //=> 789 * R.max('a', 'b'); //=> 'b' */ var max = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function max(a, b) { if (a === b) { return b; } function safeMax(x, y) { if (x > y !== y > x) { return y > x ? y : x; } return undefined; } var maxByValue = safeMax(a, b); if (maxByValue !== undefined) { return maxByValue; } var maxByType = safeMax(typeof a, typeof b); if (maxByType !== undefined) { return maxByType === typeof a ? a : b; } var stringA = (0,_toString_js__WEBPACK_IMPORTED_MODULE_1__["default"])(a); var maxByStringValue = safeMax(stringA, (0,_toString_js__WEBPACK_IMPORTED_MODULE_1__["default"])(b)); if (maxByStringValue !== undefined) { return maxByStringValue === stringA ? a : b; } return b; }); /* harmony default export */ __webpack_exports__["default"] = (max); /***/ }), /***/ "./node_modules/ramda/es/maxBy.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/maxBy.js ***! \****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _max_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./max.js */ "./node_modules/ramda/es/max.js"); /** * Takes a function and two values, and returns whichever value produces the * larger result when passed to the provided function. * * @func * @memberOf R * @since v0.8.0 * @category Relation * @sig Ord b => (a -> b) -> a -> a -> a * @param {Function} f * @param {*} a * @param {*} b * @return {*} * @see R.max, R.minBy * @example * * // square :: Number -> Number * const square = n => n * n; * * R.maxBy(square, -3, 2); //=> -3 * * R.reduce(R.maxBy(square), 0, [3, -5, 4, 1, -2]); //=> -5 * R.reduce(R.maxBy(square), 0, []); //=> 0 */ var maxBy = /*#__PURE__*/ (0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function maxBy(f, a, b) { var resultB = f(b); return (0,_max_js__WEBPACK_IMPORTED_MODULE_1__["default"])(f(a), resultB) === resultB ? b : a; }); /* harmony default export */ __webpack_exports__["default"] = (maxBy); /***/ }), /***/ "./node_modules/ramda/es/mean.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/mean.js ***! \***************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _sum_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./sum.js */ "./node_modules/ramda/es/sum.js"); /** * Returns the mean of the given list of numbers. * * @func * @memberOf R * @since v0.14.0 * @category Math * @sig [Number] -> Number * @param {Array} list * @return {Number} * @see R.median * @example * * R.mean([2, 7, 9]); //=> 6 * R.mean([]); //=> NaN */ var mean = /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function mean(list) { return (0,_sum_js__WEBPACK_IMPORTED_MODULE_1__["default"])(list) / list.length; }); /* harmony default export */ __webpack_exports__["default"] = (mean); /***/ }), /***/ "./node_modules/ramda/es/median.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/median.js ***! \*****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _mean_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mean.js */ "./node_modules/ramda/es/mean.js"); /** * Returns the median of the given list of numbers. * * @func * @memberOf R * @since v0.14.0 * @category Math * @sig [Number] -> Number * @param {Array} list * @return {Number} * @see R.mean * @example * * R.median([2, 9, 7]); //=> 7 * R.median([7, 2, 10, 9]); //=> 8 * R.median([]); //=> NaN */ var median = /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function median(list) { var len = list.length; if (len === 0) { return NaN; } var width = 2 - len % 2; var idx = (len - width) / 2; return (0,_mean_js__WEBPACK_IMPORTED_MODULE_1__["default"])(Array.prototype.slice.call(list, 0).sort(function (a, b) { return a < b ? -1 : a > b ? 1 : 0; }).slice(idx, idx + width)); }); /* harmony default export */ __webpack_exports__["default"] = (median); /***/ }), /***/ "./node_modules/ramda/es/memoizeWith.js": /*!**********************************************!*\ !*** ./node_modules/ramda/es/memoizeWith.js ***! \**********************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_arity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_arity.js */ "./node_modules/ramda/es/internal/_arity.js"); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_has_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_has.js */ "./node_modules/ramda/es/internal/_has.js"); /** * Takes a string-returning function `keyGen` and a function `fn` and returns * a new function that returns cached results for subsequent * calls with the same arguments. * * When the function is invoked, `keyGen` is applied to the same arguments * and its result becomes the cache key. If the cache contains something * under that key, the function simply returns it and does not invoke `fn` at all. * * Otherwise `fn` is applied to the same arguments and its return value * is cached under that key and returned by the function. * * Care must be taken when implementing `keyGen` to avoid key collision, * or if tracking references, memory leaks and mutating arguments. * * @func * @memberOf R * @since v0.24.0 * @category Function * @sig (*... -> String) -> (*... -> a) -> (*... -> a) * @param {Function} keyGen The function to generate the cache key. * @param {Function} fn The function to memoize. * @return {Function} Memoized version of `fn`. * @example * const withAge = memoizeWith(o => `${o.birth}/${o.death}`, ({birth, death}) => { * // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^ * // keyGen fn * console.log(`computing age for ${birth}/${death}`); * return ({birth, death, age: death - birth}); * }); * * withAge({birth: 1921, death: 1999}); * //=> LOG: computing age for 1921/1999 * //=> {birth: 1921, death: 1999, age: 78} (returned from fn) * * withAge({birth: 1921, death: 1999}); * //=> {birth: 1921, death: 1999, age: 78} (returned from cache) */ var memoizeWith = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__["default"])(function memoizeWith(keyGen, fn) { var cache = {}; return (0,_internal_arity_js__WEBPACK_IMPORTED_MODULE_0__["default"])(fn.length, function () { var key = keyGen.apply(this, arguments); if (!(0,_internal_has_js__WEBPACK_IMPORTED_MODULE_2__["default"])(key, cache)) { cache[key] = fn.apply(this, arguments); } return cache[key]; }); }); /* harmony default export */ __webpack_exports__["default"] = (memoizeWith); /***/ }), /***/ "./node_modules/ramda/es/mergeAll.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/mergeAll.js ***! \*******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_objectAssign_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_objectAssign.js */ "./node_modules/ramda/es/internal/_objectAssign.js"); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /** * Creates one new object with the own properties from a list of objects. * If a key exists in more than one object, the value from the last * object it exists in will be used. * * @func * @memberOf R * @since v0.10.0 * @category List * @sig [{k: v}] -> {k: v} * @param {Array} list An array of objects * @return {Object} A merged object. * @see R.reduce * @example * * R.mergeAll([{foo:1},{bar:2},{baz:3}]); //=> {foo:1,bar:2,baz:3} * R.mergeAll([{foo:1},{foo:2},{bar:2}]); //=> {foo:2,bar:2} * @symb R.mergeAll([{ x: 1 }, { y: 2 }, { z: 3 }]) = { x: 1, y: 2, z: 3 } */ var mergeAll = /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_1__["default"])(function mergeAll(list) { return _internal_objectAssign_js__WEBPACK_IMPORTED_MODULE_0__["default"].apply(null, [{}].concat(list)); }); /* harmony default export */ __webpack_exports__["default"] = (mergeAll); /***/ }), /***/ "./node_modules/ramda/es/mergeDeepLeft.js": /*!************************************************!*\ !*** ./node_modules/ramda/es/mergeDeepLeft.js ***! \************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _mergeDeepWithKey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mergeDeepWithKey.js */ "./node_modules/ramda/es/mergeDeepWithKey.js"); /** * Creates a new object with the own properties of the first object merged with * the own properties of the second object. If a key exists in both objects: * - and both values are objects, the two values will be recursively merged * - otherwise the value from the first object will be used. * * @func * @memberOf R * @since v0.24.0 * @category Object * @sig {a} -> {a} -> {a} * @param {Object} lObj * @param {Object} rObj * @return {Object} * @see R.merge, R.mergeDeepRight, R.mergeDeepWith, R.mergeDeepWithKey * @example * * R.mergeDeepLeft({ name: 'fred', age: 10, contact: { email: 'moo@example.com' }}, * { age: 40, contact: { email: 'baa@example.com' }}); * //=> { name: 'fred', age: 10, contact: { email: 'moo@example.com' }} */ var mergeDeepLeft = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function mergeDeepLeft(lObj, rObj) { return (0,_mergeDeepWithKey_js__WEBPACK_IMPORTED_MODULE_1__["default"])(function (k, lVal, rVal) { return lVal; }, lObj, rObj); }); /* harmony default export */ __webpack_exports__["default"] = (mergeDeepLeft); /***/ }), /***/ "./node_modules/ramda/es/mergeDeepRight.js": /*!*************************************************!*\ !*** ./node_modules/ramda/es/mergeDeepRight.js ***! \*************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _mergeDeepWithKey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mergeDeepWithKey.js */ "./node_modules/ramda/es/mergeDeepWithKey.js"); /** * Creates a new object with the own properties of the first object merged with * the own properties of the second object. If a key exists in both objects: * - and both values are objects, the two values will be recursively merged * - otherwise the value from the second object will be used. * * @func * @memberOf R * @since v0.24.0 * @category Object * @sig {a} -> {a} -> {a} * @param {Object} lObj * @param {Object} rObj * @return {Object} * @see R.merge, R.mergeDeepLeft, R.mergeDeepWith, R.mergeDeepWithKey * @example * * R.mergeDeepRight({ name: 'fred', age: 10, contact: { email: 'moo@example.com' }}, * { age: 40, contact: { email: 'baa@example.com' }}); * //=> { name: 'fred', age: 40, contact: { email: 'baa@example.com' }} */ var mergeDeepRight = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function mergeDeepRight(lObj, rObj) { return (0,_mergeDeepWithKey_js__WEBPACK_IMPORTED_MODULE_1__["default"])(function (k, lVal, rVal) { return rVal; }, lObj, rObj); }); /* harmony default export */ __webpack_exports__["default"] = (mergeDeepRight); /***/ }), /***/ "./node_modules/ramda/es/mergeDeepWith.js": /*!************************************************!*\ !*** ./node_modules/ramda/es/mergeDeepWith.js ***! \************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _mergeDeepWithKey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mergeDeepWithKey.js */ "./node_modules/ramda/es/mergeDeepWithKey.js"); /** * Creates a new object with the own properties of the two provided objects. * If a key exists in both objects: * - and both associated values are also objects then the values will be * recursively merged. * - otherwise the provided function is applied to associated values using the * resulting value as the new value associated with the key. * If a key only exists in one object, the value will be associated with the key * of the resulting object. * * @func * @memberOf R * @since v0.24.0 * @category Object * @sig ((a, a) -> a) -> {a} -> {a} -> {a} * @param {Function} fn * @param {Object} lObj * @param {Object} rObj * @return {Object} * @see R.mergeWith, R.mergeDeepWithKey * @example * * R.mergeDeepWith(R.concat, * { a: true, c: { values: [10, 20] }}, * { b: true, c: { values: [15, 35] }}); * //=> { a: true, b: true, c: { values: [10, 20, 15, 35] }} */ var mergeDeepWith = /*#__PURE__*/ (0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function mergeDeepWith(fn, lObj, rObj) { return (0,_mergeDeepWithKey_js__WEBPACK_IMPORTED_MODULE_1__["default"])(function (k, lVal, rVal) { return fn(lVal, rVal); }, lObj, rObj); }); /* harmony default export */ __webpack_exports__["default"] = (mergeDeepWith); /***/ }), /***/ "./node_modules/ramda/es/mergeDeepWithKey.js": /*!***************************************************!*\ !*** ./node_modules/ramda/es/mergeDeepWithKey.js ***! \***************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _internal_isObject_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isObject.js */ "./node_modules/ramda/es/internal/_isObject.js"); /* harmony import */ var _mergeWithKey_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mergeWithKey.js */ "./node_modules/ramda/es/mergeWithKey.js"); /** * Creates a new object with the own properties of the two provided objects. * If a key exists in both objects: * - and both associated values are also objects then the values will be * recursively merged. * - otherwise the provided function is applied to the key and associated values * using the resulting value as the new value associated with the key. * If a key only exists in one object, the value will be associated with the key * of the resulting object. * * @func * @memberOf R * @since v0.24.0 * @category Object * @sig ((String, a, a) -> a) -> {a} -> {a} -> {a} * @param {Function} fn * @param {Object} lObj * @param {Object} rObj * @return {Object} * @see R.mergeWithKey, R.mergeDeepWith * @example * * let concatValues = (k, l, r) => k == 'values' ? R.concat(l, r) : r * R.mergeDeepWithKey(concatValues, * { a: true, c: { thing: 'foo', values: [10, 20] }}, * { b: true, c: { thing: 'bar', values: [15, 35] }}); * //=> { a: true, b: true, c: { thing: 'bar', values: [10, 20, 15, 35] }} */ var mergeDeepWithKey = /*#__PURE__*/ (0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function mergeDeepWithKey(fn, lObj, rObj) { return (0,_mergeWithKey_js__WEBPACK_IMPORTED_MODULE_2__["default"])(function (k, lVal, rVal) { if ((0,_internal_isObject_js__WEBPACK_IMPORTED_MODULE_1__["default"])(lVal) && (0,_internal_isObject_js__WEBPACK_IMPORTED_MODULE_1__["default"])(rVal)) { return mergeDeepWithKey(fn, lVal, rVal); } else { return fn(k, lVal, rVal); } }, lObj, rObj); }); /* harmony default export */ __webpack_exports__["default"] = (mergeDeepWithKey); /***/ }), /***/ "./node_modules/ramda/es/mergeLeft.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/mergeLeft.js ***! \********************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_objectAssign_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_objectAssign.js */ "./node_modules/ramda/es/internal/_objectAssign.js"); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Create a new object with the own properties of the first object merged with * the own properties of the second object. If a key exists in both objects, * the value from the first object will be used. * * @func * @memberOf R * @since v0.26.0 * @category Object * @sig {k: v} -> {k: v} -> {k: v} * @param {Object} l * @param {Object} r * @return {Object} * @see R.mergeRight, R.mergeDeepLeft, R.mergeWith, R.mergeWithKey * @example * * R.mergeLeft({ 'age': 40 }, { 'name': 'fred', 'age': 10 }); * //=> { 'name': 'fred', 'age': 40 } * * const resetToDefault = R.mergeLeft({x: 0}); * resetToDefault({x: 5, y: 2}); //=> {x: 0, y: 2} * @symb R.mergeLeft(a, b) = {...b, ...a} */ var mergeLeft = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__["default"])(function mergeLeft(l, r) { return (0,_internal_objectAssign_js__WEBPACK_IMPORTED_MODULE_0__["default"])({}, r, l); }); /* harmony default export */ __webpack_exports__["default"] = (mergeLeft); /***/ }), /***/ "./node_modules/ramda/es/mergeRight.js": /*!*********************************************!*\ !*** ./node_modules/ramda/es/mergeRight.js ***! \*********************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_objectAssign_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_objectAssign.js */ "./node_modules/ramda/es/internal/_objectAssign.js"); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Create a new object with the own properties of the first object merged with * the own properties of the second object. If a key exists in both objects, * the value from the second object will be used. * * @func * @memberOf R * @since v0.26.0 * @category Object * @sig {k: v} -> {k: v} -> {k: v} * @param {Object} l * @param {Object} r * @return {Object} * @see R.mergeLeft, R.mergeDeepRight, R.mergeWith, R.mergeWithKey * @example * * R.mergeRight({ 'name': 'fred', 'age': 10 }, { 'age': 40 }); * //=> { 'name': 'fred', 'age': 40 } * * const withDefaults = R.mergeRight({x: 0, y: 0}); * withDefaults({y: 2}); //=> {x: 0, y: 2} * @symb R.mergeRight(a, b) = {...a, ...b} */ var mergeRight = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__["default"])(function mergeRight(l, r) { return (0,_internal_objectAssign_js__WEBPACK_IMPORTED_MODULE_0__["default"])({}, l, r); }); /* harmony default export */ __webpack_exports__["default"] = (mergeRight); /***/ }), /***/ "./node_modules/ramda/es/mergeWith.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/mergeWith.js ***! \********************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _mergeWithKey_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mergeWithKey.js */ "./node_modules/ramda/es/mergeWithKey.js"); /** * Creates a new object with the own properties of the two provided objects. If * a key exists in both objects, the provided function is applied to the values * associated with the key in each object, with the result being used as the * value associated with the key in the returned object. * * @func * @memberOf R * @since v0.19.0 * @category Object * @sig ((a, a) -> a) -> {a} -> {a} -> {a} * @param {Function} fn * @param {Object} l * @param {Object} r * @return {Object} * @see R.mergeDeepWith, R.merge, R.mergeWithKey * @example * * R.mergeWith(R.concat, * { a: true, values: [10, 20] }, * { b: true, values: [15, 35] }); * //=> { a: true, b: true, values: [10, 20, 15, 35] } */ var mergeWith = /*#__PURE__*/ (0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function mergeWith(fn, l, r) { return (0,_mergeWithKey_js__WEBPACK_IMPORTED_MODULE_1__["default"])(function (_, _l, _r) { return fn(_l, _r); }, l, r); }); /* harmony default export */ __webpack_exports__["default"] = (mergeWith); /***/ }), /***/ "./node_modules/ramda/es/mergeWithKey.js": /*!***********************************************!*\ !*** ./node_modules/ramda/es/mergeWithKey.js ***! \***********************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _internal_has_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_has.js */ "./node_modules/ramda/es/internal/_has.js"); /** * Creates a new object with the own properties of the two provided objects. If * a key exists in both objects, the provided function is applied to the key * and the values associated with the key in each object, with the result being * used as the value associated with the key in the returned object. * * @func * @memberOf R * @since v0.19.0 * @category Object * @sig ((String, a, a) -> a) -> {a} -> {a} -> {a} * @param {Function} fn * @param {Object} l * @param {Object} r * @return {Object} * @see R.mergeDeepWithKey, R.merge, R.mergeWith * @example * * let concatValues = (k, l, r) => k == 'values' ? R.concat(l, r) : r * R.mergeWithKey(concatValues, * { a: true, thing: 'foo', values: [10, 20] }, * { b: true, thing: 'bar', values: [15, 35] }); * //=> { a: true, b: true, thing: 'bar', values: [10, 20, 15, 35] } * @symb R.mergeWithKey(f, { x: 1, y: 2 }, { y: 5, z: 3 }) = { x: 1, y: f('y', 2, 5), z: 3 } */ var mergeWithKey = /*#__PURE__*/ (0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function mergeWithKey(fn, l, r) { var result = {}; var k; l = l || {}; r = r || {}; for (k in l) { if ((0,_internal_has_js__WEBPACK_IMPORTED_MODULE_1__["default"])(k, l)) { result[k] = (0,_internal_has_js__WEBPACK_IMPORTED_MODULE_1__["default"])(k, r) ? fn(k, l[k], r[k]) : l[k]; } } for (k in r) { if ((0,_internal_has_js__WEBPACK_IMPORTED_MODULE_1__["default"])(k, r) && !(0,_internal_has_js__WEBPACK_IMPORTED_MODULE_1__["default"])(k, result)) { result[k] = r[k]; } } return result; }); /* harmony default export */ __webpack_exports__["default"] = (mergeWithKey); /***/ }), /***/ "./node_modules/ramda/es/min.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/min.js ***! \**************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _toString_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./toString.js */ "./node_modules/ramda/es/toString.js"); /** * Returns the smaller of its two arguments. * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig Ord a => a -> a -> a * @param {*} a * @param {*} b * @return {*} * @see R.minBy, R.max * @example * * R.min(789, 123); //=> 123 * R.min('a', 'b'); //=> 'a' */ var min = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function min(a, b) { if (a === b) { return a; } function safeMin(x, y) { if (x < y !== y < x) { return y < x ? y : x; } return undefined; } var minByValue = safeMin(a, b); if (minByValue !== undefined) { return minByValue; } var minByType = safeMin(typeof a, typeof b); if (minByType !== undefined) { return minByType === typeof a ? a : b; } var stringA = (0,_toString_js__WEBPACK_IMPORTED_MODULE_1__["default"])(a); var minByStringValue = safeMin(stringA, (0,_toString_js__WEBPACK_IMPORTED_MODULE_1__["default"])(b)); if (minByStringValue !== undefined) { return minByStringValue === stringA ? a : b; } return a; }); /* harmony default export */ __webpack_exports__["default"] = (min); /***/ }), /***/ "./node_modules/ramda/es/minBy.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/minBy.js ***! \****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _min_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./min.js */ "./node_modules/ramda/es/min.js"); /** * Takes a function and two values, and returns whichever value produces the * smaller result when passed to the provided function. * * @func * @memberOf R * @since v0.8.0 * @category Relation * @sig Ord b => (a -> b) -> a -> a -> a * @param {Function} f * @param {*} a * @param {*} b * @return {*} * @see R.min, R.maxBy * @example * * // square :: Number -> Number * const square = n => n * n; * * R.minBy(square, -3, 2); //=> 2 * * R.reduce(R.minBy(square), Infinity, [3, -5, 4, 1, -2]); //=> 1 * R.reduce(R.minBy(square), Infinity, []); //=> Infinity */ var minBy = /*#__PURE__*/ (0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function minBy(f, a, b) { var resultB = f(b); return (0,_min_js__WEBPACK_IMPORTED_MODULE_1__["default"])(f(a), resultB) === resultB ? b : a; }); /* harmony default export */ __webpack_exports__["default"] = (minBy); /***/ }), /***/ "./node_modules/ramda/es/modify.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/modify.js ***! \*****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _modifyPath_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./modifyPath.js */ "./node_modules/ramda/es/modifyPath.js"); /** * Creates a copy of the passed object by applying an `fn` function to the given `prop` property. * * The function will not be invoked, and the object will not change * if its corresponding property does not exist in the object. * All non-primitive properties are copied to the new object by reference. * * @func * @memberOf R * @since v0.28.0 * @category Object * @sig Idx -> (v -> v) -> {k: v} -> {k: v} * @param {String|Number} prop The property to be modified. * @param {Function} fn The function to apply to the property. * @param {Object} object The object to be transformed. * @return {Object} The transformed object. * @example * * const person = {name: 'James', age: 20, pets: ['dog', 'cat']}; * R.modify('age', R.add(1), person); //=> {name: 'James', age: 21, pets: ['dog', 'cat']} * R.modify('pets', R.append('turtle'), person); //=> {name: 'James', age: 20, pets: ['dog', 'cat', 'turtle']} */ var modify = /*#__PURE__*/ (0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function modify(prop, fn, object) { return (0,_modifyPath_js__WEBPACK_IMPORTED_MODULE_1__["default"])([prop], fn, object); }); /* harmony default export */ __webpack_exports__["default"] = (modify); /***/ }), /***/ "./node_modules/ramda/es/modifyPath.js": /*!*********************************************!*\ !*** ./node_modules/ramda/es/modifyPath.js ***! \*********************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _internal_isArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isArray.js */ "./node_modules/ramda/es/internal/_isArray.js"); /* harmony import */ var _internal_isObject_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_isObject.js */ "./node_modules/ramda/es/internal/_isObject.js"); /* harmony import */ var _internal_has_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_has.js */ "./node_modules/ramda/es/internal/_has.js"); /* harmony import */ var _internal_assoc_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./internal/_assoc.js */ "./node_modules/ramda/es/internal/_assoc.js"); /* harmony import */ var _internal_modify_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./internal/_modify.js */ "./node_modules/ramda/es/internal/_modify.js"); /** * Creates a shallow clone of the passed object by applying an `fn` function * to the value at the given path. * * The function will not be invoked, and the object will not change * if its corresponding path does not exist in the object. * All non-primitive properties are copied to the new object by reference. * * @func * @memberOf R * @since v0.28.0 * @category Object * @sig [Idx] -> (v -> v) -> {k: v} -> {k: v} * @param {Array} path The path to be modified. * @param {Function} fn The function to apply to the path. * @param {Object} object The object to be transformed. * @return {Object} The transformed object. * @example * * const person = {name: 'James', address: { zipCode: '90216' }}; * R.modifyPath(['address', 'zipCode'], R.reverse, person); //=> {name: 'James', address: { zipCode: '61209' }} * * // Can handle arrays too * const person = {name: 'James', addresses: [{ zipCode: '90216' }]}; * R.modifyPath(['addresses', 0, 'zipCode'], R.reverse, person); //=> {name: 'James', addresses: [{ zipCode: '61209' }]} */ var modifyPath = /*#__PURE__*/ (0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function modifyPath(path, fn, object) { if (!(0,_internal_isObject_js__WEBPACK_IMPORTED_MODULE_2__["default"])(object) && !(0,_internal_isArray_js__WEBPACK_IMPORTED_MODULE_1__["default"])(object) || path.length === 0) { return object; } var idx = path[0]; if (!(0,_internal_has_js__WEBPACK_IMPORTED_MODULE_3__["default"])(idx, object)) { return object; } if (path.length === 1) { return (0,_internal_modify_js__WEBPACK_IMPORTED_MODULE_5__["default"])(idx, fn, object); } var val = modifyPath(Array.prototype.slice.call(path, 1), fn, object[idx]); if (val === object[idx]) { return object; } return (0,_internal_assoc_js__WEBPACK_IMPORTED_MODULE_4__["default"])(idx, val, object); }); /* harmony default export */ __webpack_exports__["default"] = (modifyPath); /***/ }), /***/ "./node_modules/ramda/es/modulo.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/modulo.js ***! \*****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Divides the first parameter by the second and returns the remainder. Note * that this function preserves the JavaScript-style behavior for modulo. For * mathematical modulo see [`mathMod`](#mathMod). * * @func * @memberOf R * @since v0.1.1 * @category Math * @sig Number -> Number -> Number * @param {Number} a The value to the divide. * @param {Number} b The pseudo-modulus * @return {Number} The result of `b % a`. * @see R.mathMod * @example * * R.modulo(17, 3); //=> 2 * // JS behavior: * R.modulo(-17, 3); //=> -2 * R.modulo(17, -3); //=> 2 * * const isOdd = R.modulo(R.__, 2); * isOdd(42); //=> 0 * isOdd(21); //=> 1 */ var modulo = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function modulo(a, b) { return a % b; }); /* harmony default export */ __webpack_exports__["default"] = (modulo); /***/ }), /***/ "./node_modules/ramda/es/move.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/move.js ***! \***************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Move an item, at index `from`, to index `to`, in a list of elements. * A new list will be created containing the new elements order. * * @func * @memberOf R * @since v0.27.1 * @category List * @sig Number -> Number -> [a] -> [a] * @param {Number} from The source index * @param {Number} to The destination index * @param {Array} list The list which will serve to realise the move * @return {Array} The new list reordered * @example * * R.move(0, 2, ['a', 'b', 'c', 'd', 'e', 'f']); //=> ['b', 'c', 'a', 'd', 'e', 'f'] * R.move(-1, 0, ['a', 'b', 'c', 'd', 'e', 'f']); //=> ['f', 'a', 'b', 'c', 'd', 'e'] list rotation */ var move = /*#__PURE__*/ (0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function (from, to, list) { var length = list.length; var result = list.slice(); var positiveFrom = from < 0 ? length + from : from; var positiveTo = to < 0 ? length + to : to; var item = result.splice(positiveFrom, 1); return positiveFrom < 0 || positiveFrom >= list.length || positiveTo < 0 || positiveTo >= list.length ? list : [].concat(result.slice(0, positiveTo)).concat(item).concat(result.slice(positiveTo, list.length)); }); /* harmony default export */ __webpack_exports__["default"] = (move); /***/ }), /***/ "./node_modules/ramda/es/multiply.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/multiply.js ***! \*******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Multiplies two numbers. Equivalent to `a * b` but curried. * * @func * @memberOf R * @since v0.1.0 * @category Math * @sig Number -> Number -> Number * @param {Number} a The first value. * @param {Number} b The second value. * @return {Number} The result of `a * b`. * @see R.divide * @example * * const double = R.multiply(2); * const triple = R.multiply(3); * double(3); //=> 6 * triple(4); //=> 12 * R.multiply(2, 5); //=> 10 */ var multiply = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function multiply(a, b) { return a * b; }); /* harmony default export */ __webpack_exports__["default"] = (multiply); /***/ }), /***/ "./node_modules/ramda/es/nAry.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/nAry.js ***! \***************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Wraps a function of any arity (including nullary) in a function that accepts * exactly `n` parameters. Any extraneous parameters will not be passed to the * supplied function. * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig Number -> (* -> a) -> (* -> a) * @param {Number} n The desired arity of the new function. * @param {Function} fn The function to wrap. * @return {Function} A new function wrapping `fn`. The new function is guaranteed to be of * arity `n`. * @see R.binary, R.unary * @example * * const takesTwoArgs = (a, b) => [a, b]; * * takesTwoArgs.length; //=> 2 * takesTwoArgs(1, 2); //=> [1, 2] * * const takesOneArg = R.nAry(1, takesTwoArgs); * takesOneArg.length; //=> 1 * // Only `n` arguments are passed to the wrapped function * takesOneArg(1, 2); //=> [1, undefined] * @symb R.nAry(0, f)(a, b) = f() * @symb R.nAry(1, f)(a, b) = f(a) * @symb R.nAry(2, f)(a, b) = f(a, b) */ var nAry = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function nAry(n, fn) { switch (n) { case 0: return function () { return fn.call(this); }; case 1: return function (a0) { return fn.call(this, a0); }; case 2: return function (a0, a1) { return fn.call(this, a0, a1); }; case 3: return function (a0, a1, a2) { return fn.call(this, a0, a1, a2); }; case 4: return function (a0, a1, a2, a3) { return fn.call(this, a0, a1, a2, a3); }; case 5: return function (a0, a1, a2, a3, a4) { return fn.call(this, a0, a1, a2, a3, a4); }; case 6: return function (a0, a1, a2, a3, a4, a5) { return fn.call(this, a0, a1, a2, a3, a4, a5); }; case 7: return function (a0, a1, a2, a3, a4, a5, a6) { return fn.call(this, a0, a1, a2, a3, a4, a5, a6); }; case 8: return function (a0, a1, a2, a3, a4, a5, a6, a7) { return fn.call(this, a0, a1, a2, a3, a4, a5, a6, a7); }; case 9: return function (a0, a1, a2, a3, a4, a5, a6, a7, a8) { return fn.call(this, a0, a1, a2, a3, a4, a5, a6, a7, a8); }; case 10: return function (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) { return fn.call(this, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9); }; default: throw new Error('First argument to nAry must be a non-negative integer no greater than ten'); } }); /* harmony default export */ __webpack_exports__["default"] = (nAry); /***/ }), /***/ "./node_modules/ramda/es/negate.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/negate.js ***! \*****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /** * Negates its argument. * * @func * @memberOf R * @since v0.9.0 * @category Math * @sig Number -> Number * @param {Number} n * @return {Number} * @example * * R.negate(42); //=> -42 */ var negate = /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function negate(n) { return -n; }); /* harmony default export */ __webpack_exports__["default"] = (negate); /***/ }), /***/ "./node_modules/ramda/es/none.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/none.js ***! \***************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_complement_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_complement.js */ "./node_modules/ramda/es/internal/_complement.js"); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _all_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./all.js */ "./node_modules/ramda/es/all.js"); /** * Returns `true` if no elements of the list match the predicate, `false` * otherwise. * * Dispatches to the `all` method of the second argument, if present. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.12.0 * @category List * @sig (a -> Boolean) -> [a] -> Boolean * @param {Function} fn The predicate function. * @param {Array} list The array to consider. * @return {Boolean} `true` if the predicate is not satisfied by every element, `false` otherwise. * @see R.all, R.any * @example * * const isEven = n => n % 2 === 0; * const isOdd = n => n % 2 !== 0; * * R.none(isEven, [1, 3, 5, 7, 9, 11]); //=> true * R.none(isOdd, [1, 3, 5, 7, 8, 11]); //=> false */ var none = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__["default"])(function none(fn, input) { return (0,_all_js__WEBPACK_IMPORTED_MODULE_2__["default"])((0,_internal_complement_js__WEBPACK_IMPORTED_MODULE_0__["default"])(fn), input); }); /* harmony default export */ __webpack_exports__["default"] = (none); /***/ }), /***/ "./node_modules/ramda/es/not.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/not.js ***! \**************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /** * A function that returns the `!` of its argument. It will return `true` when * passed false-y value, and `false` when passed a truth-y one. * * @func * @memberOf R * @since v0.1.0 * @category Logic * @sig * -> Boolean * @param {*} a any value * @return {Boolean} the logical inverse of passed argument. * @see R.complement * @example * * R.not(true); //=> false * R.not(false); //=> true * R.not(0); //=> true * R.not(1); //=> false */ var not = /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function not(a) { return !a; }); /* harmony default export */ __webpack_exports__["default"] = (not); /***/ }), /***/ "./node_modules/ramda/es/nth.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/nth.js ***! \**************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_isString_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isString.js */ "./node_modules/ramda/es/internal/_isString.js"); /** * Returns the nth element of the given list or string. If n is negative the * element at index length + n is returned. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig Number -> [a] -> a | Undefined * @sig Number -> String -> String * @param {Number} offset * @param {*} list * @return {*} * @example * * const list = ['foo', 'bar', 'baz', 'quux']; * R.nth(1, list); //=> 'bar' * R.nth(-1, list); //=> 'quux' * R.nth(-99, list); //=> undefined * * R.nth(2, 'abc'); //=> 'c' * R.nth(3, 'abc'); //=> '' * @symb R.nth(-1, [a, b, c]) = c * @symb R.nth(0, [a, b, c]) = a * @symb R.nth(1, [a, b, c]) = b */ var nth = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function nth(offset, list) { var idx = offset < 0 ? list.length + offset : offset; return (0,_internal_isString_js__WEBPACK_IMPORTED_MODULE_1__["default"])(list) ? list.charAt(idx) : list[idx]; }); /* harmony default export */ __webpack_exports__["default"] = (nth); /***/ }), /***/ "./node_modules/ramda/es/nthArg.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/nthArg.js ***! \*****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _curryN_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./curryN.js */ "./node_modules/ramda/es/curryN.js"); /* harmony import */ var _nth_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./nth.js */ "./node_modules/ramda/es/nth.js"); /** * Returns a function which returns its nth argument. * * @func * @memberOf R * @since v0.9.0 * @category Function * @sig Number -> *... -> * * @param {Number} n * @return {Function} * @example * * R.nthArg(1)('a', 'b', 'c'); //=> 'b' * R.nthArg(-1)('a', 'b', 'c'); //=> 'c' * @symb R.nthArg(-1)(a, b, c) = c * @symb R.nthArg(0)(a, b, c) = a * @symb R.nthArg(1)(a, b, c) = b */ var nthArg = /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function nthArg(n) { var arity = n < 0 ? 1 : n + 1; return (0,_curryN_js__WEBPACK_IMPORTED_MODULE_1__["default"])(arity, function () { return (0,_nth_js__WEBPACK_IMPORTED_MODULE_2__["default"])(n, arguments); }); }); /* harmony default export */ __webpack_exports__["default"] = (nthArg); /***/ }), /***/ "./node_modules/ramda/es/o.js": /*!************************************!*\ !*** ./node_modules/ramda/es/o.js ***! \************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js"); /** * `o` is a curried composition function that returns a unary function. * Like [`compose`](#compose), `o` performs right-to-left function composition. * Unlike [`compose`](#compose), the rightmost function passed to `o` will be * invoked with only one argument. Also, unlike [`compose`](#compose), `o` is * limited to accepting only 2 unary functions. The name o was chosen because * of its similarity to the mathematical composition operator ∘. * * @func * @memberOf R * @since v0.24.0 * @category Function * @sig (b -> c) -> (a -> b) -> a -> c * @param {Function} f * @param {Function} g * @return {Function} * @see R.compose, R.pipe * @example * * const classyGreeting = name => "The name's " + name.last + ", " + name.first + " " + name.last * const yellGreeting = R.o(R.toUpper, classyGreeting); * yellGreeting({first: 'James', last: 'Bond'}); //=> "THE NAME'S BOND, JAMES BOND" * * R.o(R.multiply(10), R.add(10))(-4) //=> 60 * * @symb R.o(f, g, x) = f(g(x)) */ var o = /*#__PURE__*/ (0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function o(f, g, x) { return f(g(x)); }); /* harmony default export */ __webpack_exports__["default"] = (o); /***/ }), /***/ "./node_modules/ramda/es/objOf.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/objOf.js ***! \****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Creates an object containing a single key:value pair. * * @func * @memberOf R * @since v0.18.0 * @category Object * @sig String -> a -> {String:a} * @param {String} key * @param {*} val * @return {Object} * @see R.pair * @example * * const matchPhrases = R.compose( * R.objOf('must'), * R.map(R.objOf('match_phrase')) * ); * matchPhrases(['foo', 'bar', 'baz']); //=> {must: [{match_phrase: 'foo'}, {match_phrase: 'bar'}, {match_phrase: 'baz'}]} */ var objOf = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function objOf(key, val) { var obj = {}; obj[key] = val; return obj; }); /* harmony default export */ __webpack_exports__["default"] = (objOf); /***/ }), /***/ "./node_modules/ramda/es/of.js": /*!*************************************!*\ !*** ./node_modules/ramda/es/of.js ***! \*************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Given a constructor and a value, returns a new instance of that constructor * containing the value. * * Dispatches to the `fantasy-land/of` method of the constructor first (if present) * or to the `of` method last (if present). When neither are present, wraps the * value in an array. * * Note this `of` is different from the ES6 `of`; See * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/of * * @func * @memberOf R * @since v0.3.0 * @category Function * @sig (* -> {*}) -> a -> {a} * @param {Object} Ctor A constructor * @param {*} val any value * @return {*} An instance of the `Ctor` wrapping `val`. * @example * * R.of(Array, 42); //=> [42] * R.of(Array, [42]); //=> [[42]] * R.of(Maybe, 42); //=> Maybe.Just(42) */ var of = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function of(Ctor, val) { return typeof Ctor['fantasy-land/of'] === 'function' ? Ctor['fantasy-land/of'](val) : typeof Ctor.of === 'function' ? Ctor.of(val) : [val]; }); /* harmony default export */ __webpack_exports__["default"] = (of); /***/ }), /***/ "./node_modules/ramda/es/omit.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/omit.js ***! \***************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns a partial copy of an object omitting the keys specified. * * @func * @memberOf R * @since v0.1.0 * @category Object * @sig [String] -> {String: *} -> {String: *} * @param {Array} names an array of String property names to omit from the new object * @param {Object} obj The object to copy from * @return {Object} A new object with properties from `names` not on it. * @see R.pick * @example * * R.omit(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, c: 3} */ var omit = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function omit(names, obj) { var result = {}; var index = {}; var idx = 0; var len = names.length; while (idx < len) { index[names[idx]] = 1; idx += 1; } for (var prop in obj) { if (!index.hasOwnProperty(prop)) { result[prop] = obj[prop]; } } return result; }); /* harmony default export */ __webpack_exports__["default"] = (omit); /***/ }), /***/ "./node_modules/ramda/es/on.js": /*!*************************************!*\ !*** ./node_modules/ramda/es/on.js ***! \*************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curryN_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curryN.js */ "./node_modules/ramda/es/internal/_curryN.js"); /** * Takes a binary function `f`, a unary function `g`, and two values. * Applies `g` to each value, then applies the result of each to `f`. * * Also known as the P combinator. * * @func * @memberOf R * @since v0.28.0 * @category Function * @sig ((a, a) -> b) -> (c -> a) -> c -> c -> b * @param {Function} f a binary function * @param {Function} g a unary function * @param {any} a any value * @param {any} b any value * @return {any} The result of `f` * @example * * const eqBy = R.on((a, b) => a === b); * eqBy(R.prop('a'), {b:0, a:1}, {a:1}) //=> true; * * const containsInsensitive = R.on(R.includes, R.toLower); * containsInsensitive('o', 'FOO'); //=> true * @symb R.on(f, g, a, b) = f(g(a), g(b)) */ var on = /*#__PURE__*/ (0,_internal_curryN_js__WEBPACK_IMPORTED_MODULE_0__["default"])(4, [], function on(f, g, a, b) { return f(g(a), g(b)); }); /* harmony default export */ __webpack_exports__["default"] = (on); /***/ }), /***/ "./node_modules/ramda/es/once.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/once.js ***! \***************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_arity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_arity.js */ "./node_modules/ramda/es/internal/_arity.js"); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /** * Accepts a function `fn` and returns a function that guards invocation of * `fn` such that `fn` can only ever be called once, no matter how many times * the returned function is invoked. The first value calculated is returned in * subsequent invocations. * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig (a... -> b) -> (a... -> b) * @param {Function} fn The function to wrap in a call-only-once wrapper. * @return {Function} The wrapped function. * @example * * const addOneOnce = R.once(x => x + 1); * addOneOnce(10); //=> 11 * addOneOnce(addOneOnce(50)); //=> 11 */ var once = /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_1__["default"])(function once(fn) { var called = false; var result; return (0,_internal_arity_js__WEBPACK_IMPORTED_MODULE_0__["default"])(fn.length, function () { if (called) { return result; } called = true; result = fn.apply(this, arguments); return result; }); }); /* harmony default export */ __webpack_exports__["default"] = (once); /***/ }), /***/ "./node_modules/ramda/es/or.js": /*!*************************************!*\ !*** ./node_modules/ramda/es/or.js ***! \*************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns the first argument if it is truthy, otherwise the second argument. * Acts as the boolean `or` statement if both inputs are `Boolean`s. * * @func * @memberOf R * @since v0.1.0 * @category Logic * @sig a -> b -> a | b * @param {Any} a * @param {Any} b * @return {Any} * @see R.either, R.and * @example * * R.or(true, true); //=> true * R.or(true, false); //=> true * R.or(false, true); //=> true * R.or(false, false); //=> false */ var or = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function or(a, b) { return a || b; }); /* harmony default export */ __webpack_exports__["default"] = (or); /***/ }), /***/ "./node_modules/ramda/es/otherwise.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/otherwise.js ***! \********************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_assertPromise_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_assertPromise.js */ "./node_modules/ramda/es/internal/_assertPromise.js"); /** * Returns the result of applying the onFailure function to the value inside * a failed promise. This is useful for handling rejected promises * inside function compositions. * * @func * @memberOf R * @since v0.26.0 * @category Function * @sig (e -> b) -> (Promise e a) -> (Promise e b) * @sig (e -> (Promise f b)) -> (Promise e a) -> (Promise f b) * @param {Function} onFailure The function to apply. Can return a value or a promise of a value. * @param {Promise} p * @return {Promise} The result of calling `p.then(null, onFailure)` * @see R.andThen * @example * * const failedFetch = id => Promise.reject('bad ID'); * const useDefault = () => ({ firstName: 'Bob', lastName: 'Loblaw' }); * * //recoverFromFailure :: String -> Promise ({ firstName, lastName }) * const recoverFromFailure = R.pipe( * failedFetch, * R.otherwise(useDefault), * R.andThen(R.pick(['firstName', 'lastName'])), * ); * recoverFromFailure(12345).then(console.log); */ var otherwise = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function otherwise(f, p) { (0,_internal_assertPromise_js__WEBPACK_IMPORTED_MODULE_1__["default"])('otherwise', p); return p.then(null, f); }); /* harmony default export */ __webpack_exports__["default"] = (otherwise); /***/ }), /***/ "./node_modules/ramda/es/over.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/over.js ***! \***************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js"); // `Identity` is a functor that holds a single value, where `map` simply // transforms the held value with the provided function. var Identity = function Identity(x) { return { value: x, map: function map(f) { return Identity(f(x)); } }; }; /** * Returns the result of "setting" the portion of the given data structure * focused by the given lens to the result of applying the given function to * the focused value. * * @func * @memberOf R * @since v0.16.0 * @category Object * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s * @sig Lens s a -> (a -> a) -> s -> s * @param {Lens} lens * @param {*} v * @param {*} x * @return {*} * @see R.view, R.set, R.lens, R.lensIndex, R.lensProp, R.lensPath * @example * * const headLens = R.lensIndex(0); * * R.over(headLens, R.toUpper, ['foo', 'bar', 'baz']); //=> ['FOO', 'bar', 'baz'] */ var over = /*#__PURE__*/ (0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function over(lens, f, x) { // The value returned by the getter function is first transformed with `f`, // then set as the value of an `Identity`. This is then mapped over with the // setter function of the lens. return lens(function (y) { return Identity(f(y)); })(x).value; }); /* harmony default export */ __webpack_exports__["default"] = (over); /***/ }), /***/ "./node_modules/ramda/es/pair.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/pair.js ***! \***************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Takes two arguments, `fst` and `snd`, and returns `[fst, snd]`. * * @func * @memberOf R * @since v0.18.0 * @category List * @sig a -> b -> (a,b) * @param {*} fst * @param {*} snd * @return {Array} * @see R.objOf, R.of * @example * * R.pair('foo', 'bar'); //=> ['foo', 'bar'] */ var pair = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function pair(fst, snd) { return [fst, snd]; }); /* harmony default export */ __webpack_exports__["default"] = (pair); /***/ }), /***/ "./node_modules/ramda/es/partial.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/partial.js ***! \******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_concat_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_concat.js */ "./node_modules/ramda/es/internal/_concat.js"); /* harmony import */ var _internal_createPartialApplicator_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_createPartialApplicator.js */ "./node_modules/ramda/es/internal/_createPartialApplicator.js"); /** * Takes a function `f` and a list of arguments, and returns a function `g`. * When applied, `g` returns the result of applying `f` to the arguments * provided initially followed by the arguments provided to `g`. * * @func * @memberOf R * @since v0.10.0 * @category Function * @sig ((a, b, c, ..., n) -> x) -> [a, b, c, ...] -> ((d, e, f, ..., n) -> x) * @param {Function} f * @param {Array} args * @return {Function} * @see R.partialRight, R.curry * @example * * const multiply2 = (a, b) => a * b; * const double = R.partial(multiply2, [2]); * double(3); //=> 6 * * const greet = (salutation, title, firstName, lastName) => * salutation + ', ' + title + ' ' + firstName + ' ' + lastName + '!'; * * const sayHello = R.partial(greet, ['Hello']); * const sayHelloToMs = R.partial(sayHello, ['Ms.']); * sayHelloToMs('Jane', 'Jones'); //=> 'Hello, Ms. Jane Jones!' * @symb R.partial(f, [a, b])(c, d) = f(a, b, c, d) */ var partial = /*#__PURE__*/ (0,_internal_createPartialApplicator_js__WEBPACK_IMPORTED_MODULE_1__["default"])(_internal_concat_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (partial); /***/ }), /***/ "./node_modules/ramda/es/partialObject.js": /*!************************************************!*\ !*** ./node_modules/ramda/es/partialObject.js ***! \************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _mergeDeepRight_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./mergeDeepRight.js */ "./node_modules/ramda/es/mergeDeepRight.js"); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); var _this = undefined; /** * Takes a function `f` and an object, and returns a function `g`. * When applied, `g` returns the result of applying `f` to the object * provided initially merged deeply (right) with the object provided as an argument to `g`. * * @func * @memberOf R * @since v0.28.0 * @category Function * @sig (({ a, b, c, ..., n }) -> x) -> { a, b, c, ...} -> ({ d, e, f, ..., n } -> x) * @param {Function} f * @param {Object} props * @return {Function} * @see R.partial, R.partialRight, R.curry, R.mergeDeepRight * @example * * const multiply2 = ({ a, b }) => a * b; * const double = R.partialObject(multiply2, { a: 2 }); * double({ b: 2 }); //=> 4 * * const greet = ({ salutation, title, firstName, lastName }) => * salutation + ', ' + title + ' ' + firstName + ' ' + lastName + '!'; * * const sayHello = R.partialObject(greet, { salutation: 'Hello' }); * const sayHelloToMs = R.partialObject(sayHello, { title: 'Ms.' }); * sayHelloToMs({ firstName: 'Jane', lastName: 'Jones' }); //=> 'Hello, Ms. Jane Jones!' * @symb R.partialObject(f, { a, b })({ c, d }) = f({ a, b, c, d }) */ var partialObject = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__["default"])(function (f, o) { return function (props) { return f.call(_this, (0,_mergeDeepRight_js__WEBPACK_IMPORTED_MODULE_0__["default"])(o, props)); }; }); /* harmony default export */ __webpack_exports__["default"] = (partialObject); /***/ }), /***/ "./node_modules/ramda/es/partialRight.js": /*!***********************************************!*\ !*** ./node_modules/ramda/es/partialRight.js ***! \***********************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_concat_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_concat.js */ "./node_modules/ramda/es/internal/_concat.js"); /* harmony import */ var _internal_createPartialApplicator_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_createPartialApplicator.js */ "./node_modules/ramda/es/internal/_createPartialApplicator.js"); /* harmony import */ var _flip_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./flip.js */ "./node_modules/ramda/es/flip.js"); /** * Takes a function `f` and a list of arguments, and returns a function `g`. * When applied, `g` returns the result of applying `f` to the arguments * provided to `g` followed by the arguments provided initially. * * @func * @memberOf R * @since v0.10.0 * @category Function * @sig ((a, b, c, ..., n) -> x) -> [d, e, f, ..., n] -> ((a, b, c, ...) -> x) * @param {Function} f * @param {Array} args * @return {Function} * @see R.partial * @example * * const greet = (salutation, title, firstName, lastName) => * salutation + ', ' + title + ' ' + firstName + ' ' + lastName + '!'; * * const greetMsJaneJones = R.partialRight(greet, ['Ms.', 'Jane', 'Jones']); * * greetMsJaneJones('Hello'); //=> 'Hello, Ms. Jane Jones!' * @symb R.partialRight(f, [a, b])(c, d) = f(c, d, a, b) */ var partialRight = /*#__PURE__*/ (0,_internal_createPartialApplicator_js__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/ (0,_flip_js__WEBPACK_IMPORTED_MODULE_2__["default"])(_internal_concat_js__WEBPACK_IMPORTED_MODULE_0__["default"])); /* harmony default export */ __webpack_exports__["default"] = (partialRight); /***/ }), /***/ "./node_modules/ramda/es/partition.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/partition.js ***! \********************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _filter_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./filter.js */ "./node_modules/ramda/es/filter.js"); /* harmony import */ var _juxt_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./juxt.js */ "./node_modules/ramda/es/juxt.js"); /* harmony import */ var _reject_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reject.js */ "./node_modules/ramda/es/reject.js"); /** * Takes a predicate and a list or other `Filterable` object and returns the * pair of filterable objects of the same type of elements which do and do not * satisfy, the predicate, respectively. Filterable objects include plain objects or any object * that has a filter method such as `Array`. * * @func * @memberOf R * @since v0.1.4 * @category List * @sig Filterable f => (a -> Boolean) -> f a -> [f a, f a] * @param {Function} pred A predicate to determine which side the element belongs to. * @param {Array} filterable the list (or other filterable) to partition. * @return {Array} An array, containing first the subset of elements that satisfy the * predicate, and second the subset of elements that do not satisfy. * @see R.filter, R.reject * @example * * R.partition(R.includes('s'), ['sss', 'ttt', 'foo', 'bars']); * // => [ [ 'sss', 'bars' ], [ 'ttt', 'foo' ] ] * * R.partition(R.includes('s'), { a: 'sss', b: 'ttt', foo: 'bars' }); * // => [ { a: 'sss', foo: 'bars' }, { b: 'ttt' } ] */ var partition = /*#__PURE__*/ (0,_juxt_js__WEBPACK_IMPORTED_MODULE_1__["default"])([_filter_js__WEBPACK_IMPORTED_MODULE_0__["default"], _reject_js__WEBPACK_IMPORTED_MODULE_2__["default"]]); /* harmony default export */ __webpack_exports__["default"] = (partition); /***/ }), /***/ "./node_modules/ramda/es/path.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/path.js ***! \***************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _paths_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./paths.js */ "./node_modules/ramda/es/paths.js"); /** * Retrieves the value at a given path. The nodes of the path can be arbitrary strings or non-negative integers. * For anything else, the value is unspecified. Integer paths are meant to index arrays, strings are meant for objects. * * @func * @memberOf R * @since v0.2.0 * @category Object * @typedefn Idx = String | Int | Symbol * @sig [Idx] -> {a} -> a | Undefined * @sig Idx = String | NonNegativeInt * @param {Array} path The path to use. * @param {Object} obj The object or array to retrieve the nested property from. * @return {*} The data at `path`. * @see R.prop, R.nth, R.assocPath, R.dissocPath * @example * * R.path(['a', 'b'], {a: {b: 2}}); //=> 2 * R.path(['a', 'b'], {c: {b: 2}}); //=> undefined * R.path(['a', 'b', 0], {a: {b: [1, 2, 3]}}); //=> 1 * R.path(['a', 'b', -2], {a: {b: [1, 2, 3]}}); //=> 2 * R.path([2], {'2': 2}); //=> 2 * R.path([-2], {'-2': 'a'}); //=> undefined */ var path = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function path(pathAr, obj) { return (0,_paths_js__WEBPACK_IMPORTED_MODULE_1__["default"])([pathAr], obj)[0]; }); /* harmony default export */ __webpack_exports__["default"] = (path); /***/ }), /***/ "./node_modules/ramda/es/pathEq.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/pathEq.js ***! \*****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _equals_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./equals.js */ "./node_modules/ramda/es/equals.js"); /* harmony import */ var _path_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./path.js */ "./node_modules/ramda/es/path.js"); /** * Determines whether a nested path on an object has a specific value, in * [`R.equals`](#equals) terms. Most likely used to filter a list. * * @func * @memberOf R * @since v0.7.0 * @category Relation * @typedefn Idx = String | Int | Symbol * @sig a -> [Idx] -> {a} -> Boolean * @param {*} val The value to compare the nested property with * @param {Array} path The path of the nested property to use * @param {Object} obj The object to check the nested property in * @return {Boolean} `true` if the value equals the nested object property, * `false` otherwise. * @see R.whereEq, R.propEq, R.pathSatisfies, R.equals * @example * * const user1 = { address: { zipCode: 90210 } }; * const user2 = { address: { zipCode: 55555 } }; * const user3 = { name: 'Bob' }; * const users = [ user1, user2, user3 ]; * const isFamous = R.pathEq(90210, ['address', 'zipCode']); * R.filter(isFamous, users); //=> [ user1 ] */ var pathEq = /*#__PURE__*/ (0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function pathEq(val, _path, obj) { return (0,_equals_js__WEBPACK_IMPORTED_MODULE_1__["default"])((0,_path_js__WEBPACK_IMPORTED_MODULE_2__["default"])(_path, obj), val); }); /* harmony default export */ __webpack_exports__["default"] = (pathEq); /***/ }), /***/ "./node_modules/ramda/es/pathOr.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/pathOr.js ***! \*****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _defaultTo_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./defaultTo.js */ "./node_modules/ramda/es/defaultTo.js"); /* harmony import */ var _path_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./path.js */ "./node_modules/ramda/es/path.js"); /** * If the given, non-null object has a value at the given path, returns the * value at that path. Otherwise returns the provided default value. * * @func * @memberOf R * @since v0.18.0 * @category Object * @typedefn Idx = String | Int | Symbol * @sig a -> [Idx] -> {a} -> a * @param {*} d The default value. * @param {Array} p The path to use. * @param {Object} obj The object to retrieve the nested property from. * @return {*} The data at `path` of the supplied object or the default value. * @example * * R.pathOr('N/A', ['a', 'b'], {a: {b: 2}}); //=> 2 * R.pathOr('N/A', ['a', 'b'], {c: {b: 2}}); //=> "N/A" */ var pathOr = /*#__PURE__*/ (0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function pathOr(d, p, obj) { return (0,_defaultTo_js__WEBPACK_IMPORTED_MODULE_1__["default"])(d, (0,_path_js__WEBPACK_IMPORTED_MODULE_2__["default"])(p, obj)); }); /* harmony default export */ __webpack_exports__["default"] = (pathOr); /***/ }), /***/ "./node_modules/ramda/es/pathSatisfies.js": /*!************************************************!*\ !*** ./node_modules/ramda/es/pathSatisfies.js ***! \************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _path_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./path.js */ "./node_modules/ramda/es/path.js"); /** * Returns `true` if the specified object property at given path satisfies the * given predicate; `false` otherwise. * * @func * @memberOf R * @since v0.19.0 * @category Logic * @typedefn Idx = String | Int | Symbol * @sig (a -> Boolean) -> [Idx] -> {a} -> Boolean * @param {Function} pred * @param {Array} propPath * @param {*} obj * @return {Boolean} * @see R.propSatisfies, R.path * @example * * R.pathSatisfies(y => y > 0, ['x', 'y'], {x: {y: 2}}); //=> true * R.pathSatisfies(R.is(Object), [], {x: {y: 2}}); //=> true */ var pathSatisfies = /*#__PURE__*/ (0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function pathSatisfies(pred, propPath, obj) { return pred((0,_path_js__WEBPACK_IMPORTED_MODULE_1__["default"])(propPath, obj)); }); /* harmony default export */ __webpack_exports__["default"] = (pathSatisfies); /***/ }), /***/ "./node_modules/ramda/es/paths.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/paths.js ***! \****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_isInteger_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isInteger.js */ "./node_modules/ramda/es/internal/_isInteger.js"); /* harmony import */ var _nth_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./nth.js */ "./node_modules/ramda/es/nth.js"); /** * Retrieves the values at given paths of an object. * * @func * @memberOf R * @since v0.27.1 * @category Object * @typedefn Idx = [String | Int | Symbol] * @sig [Idx] -> {a} -> [a | Undefined] * @param {Array} pathsArray The array of paths to be fetched. * @param {Object} obj The object to retrieve the nested properties from. * @return {Array} A list consisting of values at paths specified by "pathsArray". * @see R.path * @example * * R.paths([['a', 'b'], ['p', 0, 'q']], {a: {b: 2}, p: [{q: 3}]}); //=> [2, 3] * R.paths([['a', 'b'], ['p', 'r']], {a: {b: 2}, p: [{q: 3}]}); //=> [2, undefined] */ var paths = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function paths(pathsArray, obj) { return pathsArray.map(function (paths) { var val = obj; var idx = 0; var p; while (idx < paths.length) { if (val == null) { return; } p = paths[idx]; val = (0,_internal_isInteger_js__WEBPACK_IMPORTED_MODULE_1__["default"])(p) ? (0,_nth_js__WEBPACK_IMPORTED_MODULE_2__["default"])(p, val) : val[p]; idx += 1; } return val; }); }); /* harmony default export */ __webpack_exports__["default"] = (paths); /***/ }), /***/ "./node_modules/ramda/es/pick.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/pick.js ***! \***************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns a partial copy of an object containing only the keys specified. If * the key does not exist, the property is ignored. * * @func * @memberOf R * @since v0.1.0 * @category Object * @sig [k] -> {k: v} -> {k: v} * @param {Array} names an array of String property names to copy onto a new object * @param {Object} obj The object to copy from * @return {Object} A new object with only properties from `names` on it. * @see R.omit, R.props * @example * * R.pick(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1, d: 4} * R.pick(['a', 'e', 'f'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1} */ var pick = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function pick(names, obj) { var result = {}; var idx = 0; while (idx < names.length) { if (names[idx] in obj) { result[names[idx]] = obj[names[idx]]; } idx += 1; } return result; }); /* harmony default export */ __webpack_exports__["default"] = (pick); /***/ }), /***/ "./node_modules/ramda/es/pickAll.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/pickAll.js ***! \******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Similar to `pick` except that this one includes a `key: undefined` pair for * properties that don't exist. * * @func * @memberOf R * @since v0.1.0 * @category Object * @sig [k] -> {k: v} -> {k: v} * @param {Array} names an array of String property names to copy onto a new object * @param {Object} obj The object to copy from * @return {Object} A new object with only properties from `names` on it. * @see R.pick * @example * * R.pickAll(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1, d: 4} * R.pickAll(['a', 'e', 'f'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1, e: undefined, f: undefined} */ var pickAll = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function pickAll(names, obj) { var result = {}; var idx = 0; var len = names.length; while (idx < len) { var name = names[idx]; result[name] = obj[name]; idx += 1; } return result; }); /* harmony default export */ __webpack_exports__["default"] = (pickAll); /***/ }), /***/ "./node_modules/ramda/es/pickBy.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/pickBy.js ***! \*****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns a partial copy of an object containing only the keys that satisfy * the supplied predicate. * * @func * @memberOf R * @since v0.8.0 * @category Object * @sig ((v, k) -> Boolean) -> {k: v} -> {k: v} * @param {Function} pred A predicate to determine whether or not a key * should be included on the output object. * @param {Object} obj The object to copy from * @return {Object} A new object with only properties that satisfy `pred` * on it. * @see R.pick, R.filter * @example * * const isUpperCase = (val, key) => key.toUpperCase() === key; * R.pickBy(isUpperCase, {a: 1, b: 2, A: 3, B: 4}); //=> {A: 3, B: 4} */ var pickBy = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function pickBy(test, obj) { var result = {}; for (var prop in obj) { if (test(obj[prop], prop, obj)) { result[prop] = obj[prop]; } } return result; }); /* harmony default export */ __webpack_exports__["default"] = (pickBy); /***/ }), /***/ "./node_modules/ramda/es/pipe.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/pipe.js ***! \***************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": function() { return /* binding */ pipe; } /* harmony export */ }); /* harmony import */ var _internal_arity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_arity.js */ "./node_modules/ramda/es/internal/_arity.js"); /* harmony import */ var _internal_pipe_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_pipe.js */ "./node_modules/ramda/es/internal/_pipe.js"); /* harmony import */ var _reduce_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reduce.js */ "./node_modules/ramda/es/reduce.js"); /* harmony import */ var _tail_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./tail.js */ "./node_modules/ramda/es/tail.js"); /** * Performs left-to-right function composition. The first argument may have * any arity; the remaining arguments must be unary. * * In some libraries this function is named `sequence`. * * **Note:** The result of pipe is not automatically curried. * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig (((a, b, ..., n) -> o), (o -> p), ..., (x -> y), (y -> z)) -> ((a, b, ..., n) -> z) * @param {...Function} functions * @return {Function} * @see R.compose * @example * * const f = R.pipe(Math.pow, R.negate, R.inc); * * f(3, 4); // -(3^4) + 1 * @symb R.pipe(f, g, h)(a, b) = h(g(f(a, b))) * @symb R.pipe(f, g, h)(a)(b) = h(g(f(a)))(b) */ function pipe() { if (arguments.length === 0) { throw new Error('pipe requires at least one argument'); } return (0,_internal_arity_js__WEBPACK_IMPORTED_MODULE_0__["default"])(arguments[0].length, (0,_reduce_js__WEBPACK_IMPORTED_MODULE_2__["default"])(_internal_pipe_js__WEBPACK_IMPORTED_MODULE_1__["default"], arguments[0], (0,_tail_js__WEBPACK_IMPORTED_MODULE_3__["default"])(arguments))); } /***/ }), /***/ "./node_modules/ramda/es/pipeWith.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/pipeWith.js ***! \*******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_arity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_arity.js */ "./node_modules/ramda/es/internal/_arity.js"); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _head_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./head.js */ "./node_modules/ramda/es/head.js"); /* harmony import */ var _internal_reduce_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_reduce.js */ "./node_modules/ramda/es/internal/_reduce.js"); /* harmony import */ var _tail_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./tail.js */ "./node_modules/ramda/es/tail.js"); /* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./identity.js */ "./node_modules/ramda/es/identity.js"); /** * Performs left-to-right function composition using transforming function. The first function may have * any arity; the remaining functions must be unary. * * **Note:** The result of pipeWith is not automatically curried. Transforming function is not used on the * first argument. * * @func * @memberOf R * @since v0.26.0 * @category Function * @sig ((* -> *), [((a, b, ..., n) -> o), (o -> p), ..., (x -> y), (y -> z)]) -> ((a, b, ..., n) -> z) * @param {Function} transformer The transforming function * @param {Array} functions The functions to pipe * @return {Function} * @see R.composeWith, R.pipe * @example * * const pipeWhileNotNil = R.pipeWith((f, res) => R.isNil(res) ? res : f(res)); * const f = pipeWhileNotNil([Math.pow, R.negate, R.inc]) * * f(3, 4); // -(3^4) + 1 * @symb R.pipeWith(f)([g, h, i])(...args) = f(i, f(h, g(...args))) */ var pipeWith = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__["default"])(function pipeWith(xf, list) { if (list.length <= 0) { return _identity_js__WEBPACK_IMPORTED_MODULE_5__["default"]; } var headList = (0,_head_js__WEBPACK_IMPORTED_MODULE_2__["default"])(list); var tailList = (0,_tail_js__WEBPACK_IMPORTED_MODULE_4__["default"])(list); return (0,_internal_arity_js__WEBPACK_IMPORTED_MODULE_0__["default"])(headList.length, function () { return (0,_internal_reduce_js__WEBPACK_IMPORTED_MODULE_3__["default"])(function (result, f) { return xf.call(this, f, result); }, headList.apply(this, arguments), tailList); }); }); /* harmony default export */ __webpack_exports__["default"] = (pipeWith); /***/ }), /***/ "./node_modules/ramda/es/pluck.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/pluck.js ***! \****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _map_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./map.js */ "./node_modules/ramda/es/map.js"); /* harmony import */ var _prop_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./prop.js */ "./node_modules/ramda/es/prop.js"); /** * Returns a new list by plucking the same named property off all objects in * the list supplied. * * `pluck` will work on * any [functor](https://github.com/fantasyland/fantasy-land#functor) in * addition to arrays, as it is equivalent to `R.map(R.prop(k), f)`. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig Functor f => k -> f {k: v} -> f v * @param {Number|String} key The key name to pluck off of each object. * @param {Array} f The array or functor to consider. * @return {Array} The list of values for the given key. * @see R.project, R.prop, R.props * @example * * var getAges = R.pluck('age'); * getAges([{name: 'fred', age: 29}, {name: 'wilma', age: 27}]); //=> [29, 27] * * R.pluck(0, [[1, 2], [3, 4]]); //=> [1, 3] * R.pluck('val', {a: {val: 3}, b: {val: 5}}); //=> {a: 3, b: 5} * @symb R.pluck('x', [{x: 1, y: 2}, {x: 3, y: 4}, {x: 5, y: 6}]) = [1, 3, 5] * @symb R.pluck(0, [[1, 2], [3, 4], [5, 6]]) = [1, 3, 5] */ var pluck = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function pluck(p, list) { return (0,_map_js__WEBPACK_IMPORTED_MODULE_1__["default"])((0,_prop_js__WEBPACK_IMPORTED_MODULE_2__["default"])(p), list); }); /* harmony default export */ __webpack_exports__["default"] = (pluck); /***/ }), /***/ "./node_modules/ramda/es/prepend.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/prepend.js ***! \******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_concat_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_concat.js */ "./node_modules/ramda/es/internal/_concat.js"); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns a new list with the given element at the front, followed by the * contents of the list. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig a -> [a] -> [a] * @param {*} el The item to add to the head of the output list. * @param {Array} list The array to add to the tail of the output list. * @return {Array} A new array. * @see R.append * @example * * R.prepend('fee', ['fi', 'fo', 'fum']); //=> ['fee', 'fi', 'fo', 'fum'] */ var prepend = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__["default"])(function prepend(el, list) { return (0,_internal_concat_js__WEBPACK_IMPORTED_MODULE_0__["default"])([el], list); }); /* harmony default export */ __webpack_exports__["default"] = (prepend); /***/ }), /***/ "./node_modules/ramda/es/product.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/product.js ***! \******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _multiply_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./multiply.js */ "./node_modules/ramda/es/multiply.js"); /* harmony import */ var _reduce_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reduce.js */ "./node_modules/ramda/es/reduce.js"); /** * Multiplies together all the elements of a list. * * @func * @memberOf R * @since v0.1.0 * @category Math * @sig [Number] -> Number * @param {Array} list An array of numbers * @return {Number} The product of all the numbers in the list. * @see R.reduce * @example * * R.product([2,4,6,8,100,1]); //=> 38400 */ var product = /*#__PURE__*/ (0,_reduce_js__WEBPACK_IMPORTED_MODULE_1__["default"])(_multiply_js__WEBPACK_IMPORTED_MODULE_0__["default"], 1); /* harmony default export */ __webpack_exports__["default"] = (product); /***/ }), /***/ "./node_modules/ramda/es/project.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/project.js ***! \******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_map_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_map.js */ "./node_modules/ramda/es/internal/_map.js"); /* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./identity.js */ "./node_modules/ramda/es/identity.js"); /* harmony import */ var _pickAll_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./pickAll.js */ "./node_modules/ramda/es/pickAll.js"); /* harmony import */ var _useWith_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./useWith.js */ "./node_modules/ramda/es/useWith.js"); /** * Reasonable analog to SQL `select` statement. * * @func * @memberOf R * @since v0.1.0 * @category Object * @category Relation * @sig [k] -> [{k: v}] -> [{k: v}] * @param {Array} props The property names to project * @param {Array} objs The objects to query * @return {Array} An array of objects with just the `props` properties. * @see R.pluck, R.props, R.prop * @example * * const abby = {name: 'Abby', age: 7, hair: 'blond', grade: 2}; * const fred = {name: 'Fred', age: 12, hair: 'brown', grade: 7}; * const kids = [abby, fred]; * R.project(['name', 'grade'], kids); //=> [{name: 'Abby', grade: 2}, {name: 'Fred', grade: 7}] */ var project = /*#__PURE__*/ (0,_useWith_js__WEBPACK_IMPORTED_MODULE_3__["default"])(_internal_map_js__WEBPACK_IMPORTED_MODULE_0__["default"], [_pickAll_js__WEBPACK_IMPORTED_MODULE_2__["default"], _identity_js__WEBPACK_IMPORTED_MODULE_1__["default"]]); // passing `identity` gives correct arity /* harmony default export */ __webpack_exports__["default"] = (project); /***/ }), /***/ "./node_modules/ramda/es/promap.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/promap.js ***! \*****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable.js */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_promap_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_promap.js */ "./node_modules/ramda/es/internal/_promap.js"); /* harmony import */ var _internal_xpromap_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_xpromap.js */ "./node_modules/ramda/es/internal/_xpromap.js"); /** * Takes two functions as pre- and post- processors respectively for a third function, * i.e. `promap(f, g, h)(x) === g(h(f(x)))`. * * Dispatches to the `promap` method of the third argument, if present, * according to the [FantasyLand Profunctor spec](https://github.com/fantasyland/fantasy-land#profunctor). * * Acts as a transducer if a transformer is given in profunctor position. * * @func * @memberOf R * @since v0.28.0 * @category Function * @sig (a -> b) -> (c -> d) -> (b -> c) -> (a -> d) * @sig Profunctor p => (a -> b) -> (c -> d) -> p b c -> p a d * @param {Function} f The preprocessor function, a -> b * @param {Function} g The postprocessor function, c -> d * @param {Profunctor} profunctor The profunctor instance to be promapped, e.g. b -> c * @return {Profunctor} The new profunctor instance, e.g. a -> d * @see R.transduce * @example * * const decodeChar = R.promap(s => s.charCodeAt(), String.fromCharCode, R.add(-8)) * const decodeString = R.promap(R.split(''), R.join(''), R.map(decodeChar)) * decodeString("ziuli") //=> "ramda" * * @symb R.promap(f, g, h) = x => g(h(f(x))) * @symb R.promap(f, g, profunctor) = profunctor.promap(f, g) */ var promap = /*#__PURE__*/ (0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/ (0,_internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__["default"])(['fantasy-land/promap', 'promap'], _internal_xpromap_js__WEBPACK_IMPORTED_MODULE_3__["default"], _internal_promap_js__WEBPACK_IMPORTED_MODULE_2__["default"])); /* harmony default export */ __webpack_exports__["default"] = (promap); /***/ }), /***/ "./node_modules/ramda/es/prop.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/prop.js ***! \***************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_isInteger_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isInteger.js */ "./node_modules/ramda/es/internal/_isInteger.js"); /* harmony import */ var _nth_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./nth.js */ "./node_modules/ramda/es/nth.js"); /** * Returns a function that when supplied an object returns the indicated * property of that object, if it exists. * * @func * @memberOf R * @since v0.1.0 * @category Object * @typedefn Idx = String | Int | Symbol * @sig Idx -> {s: a} -> a | Undefined * @param {String|Number} p The property name or array index * @param {Object} obj The object to query * @return {*} The value at `obj.p`. * @see R.path, R.props, R.pluck, R.project, R.nth * @example * * R.prop('x', {x: 100}); //=> 100 * R.prop('x', {}); //=> undefined * R.prop(0, [100]); //=> 100 * R.compose(R.inc, R.prop('x'))({ x: 3 }) //=> 4 */ var prop = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function prop(p, obj) { if (obj == null) { return; } return (0,_internal_isInteger_js__WEBPACK_IMPORTED_MODULE_1__["default"])(p) ? (0,_nth_js__WEBPACK_IMPORTED_MODULE_2__["default"])(p, obj) : obj[p]; }); /* harmony default export */ __webpack_exports__["default"] = (prop); /***/ }), /***/ "./node_modules/ramda/es/propEq.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/propEq.js ***! \*****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _prop_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./prop.js */ "./node_modules/ramda/es/prop.js"); /* harmony import */ var _equals_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./equals.js */ "./node_modules/ramda/es/equals.js"); /** * Returns `true` if the specified object property is equal, in * [`R.equals`](#equals) terms, to the given value; `false` otherwise. * You can test multiple properties with [`R.whereEq`](#whereEq), * and test nested path property with [`R.pathEq`](#pathEq). * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig a -> String -> Object -> Boolean * @param {*} val The value to compare the property with * @param {String} name the specified object property's key * @param {*} obj The object to check the property in * @return {Boolean} `true` if the value equals the specified object property, * `false` otherwise. * @see R.whereEq, R.pathEq, R.propSatisfies, R.equals * @example * * const abby = {name: 'Abby', age: 7, hair: 'blond'}; * const fred = {name: 'Fred', age: 12, hair: 'brown'}; * const rusty = {name: 'Rusty', age: 10, hair: 'brown'}; * const alois = {name: 'Alois', age: 15, disposition: 'surly'}; * const kids = [abby, fred, rusty, alois]; * const hasBrownHair = R.propEq('brown', 'hair'); * R.filter(hasBrownHair, kids); //=> [fred, rusty] */ var propEq = /*#__PURE__*/ (0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function propEq(val, name, obj) { return (0,_equals_js__WEBPACK_IMPORTED_MODULE_2__["default"])(val, (0,_prop_js__WEBPACK_IMPORTED_MODULE_1__["default"])(name, obj)); }); /* harmony default export */ __webpack_exports__["default"] = (propEq); /***/ }), /***/ "./node_modules/ramda/es/propIs.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/propIs.js ***! \*****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _prop_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./prop.js */ "./node_modules/ramda/es/prop.js"); /* harmony import */ var _is_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./is.js */ "./node_modules/ramda/es/is.js"); /** * Returns `true` if the specified object property is of the given type; * `false` otherwise. * * @func * @memberOf R * @since v0.16.0 * @category Type * @sig Type -> String -> Object -> Boolean * @param {Function} type * @param {String} name * @param {*} obj * @return {Boolean} * @see R.is, R.propSatisfies * @example * * R.propIs(Number, 'x', {x: 1, y: 2}); //=> true * R.propIs(Number, 'x', {x: 'foo'}); //=> false * R.propIs(Number, 'x', {}); //=> false */ var propIs = /*#__PURE__*/ (0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function propIs(type, name, obj) { return (0,_is_js__WEBPACK_IMPORTED_MODULE_2__["default"])(type, (0,_prop_js__WEBPACK_IMPORTED_MODULE_1__["default"])(name, obj)); }); /* harmony default export */ __webpack_exports__["default"] = (propIs); /***/ }), /***/ "./node_modules/ramda/es/propOr.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/propOr.js ***! \*****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _defaultTo_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./defaultTo.js */ "./node_modules/ramda/es/defaultTo.js"); /* harmony import */ var _prop_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./prop.js */ "./node_modules/ramda/es/prop.js"); /** * Return the specified property of the given non-null object if the property * is present and it's value is not `null`, `undefined` or `NaN`. * * Otherwise the first argument is returned. * * @func * @memberOf R * @since v0.6.0 * @category Object * @sig a -> String -> Object -> a * @param {*} val The default value. * @param {String} p The name of the property to return. * @param {Object} obj The object to query. * @return {*} The value of given property of the supplied object or the default value. * @example * * const alice = { * name: 'ALICE', * age: 101 * }; * const favorite = R.prop('favoriteLibrary'); * const favoriteWithDefault = R.propOr('Ramda', 'favoriteLibrary'); * * favorite(alice); //=> undefined * favoriteWithDefault(alice); //=> 'Ramda' */ var propOr = /*#__PURE__*/ (0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function propOr(val, p, obj) { return (0,_defaultTo_js__WEBPACK_IMPORTED_MODULE_1__["default"])(val, (0,_prop_js__WEBPACK_IMPORTED_MODULE_2__["default"])(p, obj)); }); /* harmony default export */ __webpack_exports__["default"] = (propOr); /***/ }), /***/ "./node_modules/ramda/es/propSatisfies.js": /*!************************************************!*\ !*** ./node_modules/ramda/es/propSatisfies.js ***! \************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _prop_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./prop.js */ "./node_modules/ramda/es/prop.js"); /** * Returns `true` if the specified object property satisfies the given * predicate; `false` otherwise. You can test multiple properties with * [`R.where`](#where). * * @func * @memberOf R * @since v0.16.0 * @category Logic * @sig (a -> Boolean) -> String -> {String: a} -> Boolean * @param {Function} pred * @param {String} name * @param {*} obj * @return {Boolean} * @see R.where, R.propEq, R.propIs * @example * * R.propSatisfies(x => x > 0, 'x', {x: 1, y: 2}); //=> true */ var propSatisfies = /*#__PURE__*/ (0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function propSatisfies(pred, name, obj) { return pred((0,_prop_js__WEBPACK_IMPORTED_MODULE_1__["default"])(name, obj)); }); /* harmony default export */ __webpack_exports__["default"] = (propSatisfies); /***/ }), /***/ "./node_modules/ramda/es/props.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/props.js ***! \****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _path_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./path.js */ "./node_modules/ramda/es/path.js"); /** * Acts as multiple `prop`: array of keys in, array of values out. Preserves * order. * * @func * @memberOf R * @since v0.1.0 * @category Object * @sig [k] -> {k: v} -> [v] * @param {Array} ps The property names to fetch * @param {Object} obj The object to query * @return {Array} The corresponding values or partially applied function. * @see R.prop, R.pluck, R.project * @example * * R.props(['x', 'y'], {x: 1, y: 2}); //=> [1, 2] * R.props(['c', 'a', 'b'], {b: 2, a: 1}); //=> [undefined, 1, 2] * * const fullName = R.compose(R.join(' '), R.props(['first', 'last'])); * fullName({last: 'Bullet-Tooth', age: 33, first: 'Tony'}); //=> 'Tony Bullet-Tooth' */ var props = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function props(ps, obj) { return ps.map(function (p) { return (0,_path_js__WEBPACK_IMPORTED_MODULE_1__["default"])([p], obj); }); }); /* harmony default export */ __webpack_exports__["default"] = (props); /***/ }), /***/ "./node_modules/ramda/es/range.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/range.js ***! \****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_isNumber_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isNumber.js */ "./node_modules/ramda/es/internal/_isNumber.js"); /** * Returns a list of numbers from `from` (inclusive) to `to` (exclusive). * * @func * @memberOf R * @since v0.1.0 * @category List * @sig Number -> Number -> [Number] * @param {Number} from The first number in the list. * @param {Number} to One more than the last number in the list. * @return {Array} The list of numbers in the set `[a, b)`. * @example * * R.range(1, 5); //=> [1, 2, 3, 4] * R.range(50, 53); //=> [50, 51, 52] */ var range = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function range(from, to) { if (!((0,_internal_isNumber_js__WEBPACK_IMPORTED_MODULE_1__["default"])(from) && (0,_internal_isNumber_js__WEBPACK_IMPORTED_MODULE_1__["default"])(to))) { throw new TypeError('Both arguments to range must be numbers'); } var result = []; var n = from; while (n < to) { result.push(n); n += 1; } return result; }); /* harmony default export */ __webpack_exports__["default"] = (range); /***/ }), /***/ "./node_modules/ramda/es/reduce.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/reduce.js ***! \*****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _internal_xReduce_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_xReduce.js */ "./node_modules/ramda/es/internal/_xReduce.js"); /* harmony import */ var _internal_xwrap_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xwrap.js */ "./node_modules/ramda/es/internal/_xwrap.js"); /** * Returns a single item by iterating through the list, successively calling * the iterator function and passing it an accumulator value and the current * value from the array, and then passing the result to the next call. * * The iterator function receives two values: *(acc, value)*. It may use * [`R.reduced`](#reduced) to shortcut the iteration. * * The arguments' order of [`reduceRight`](#reduceRight)'s iterator function * is *(value, acc)*. * * Note: `R.reduce` does not skip deleted or unassigned indices (sparse * arrays), unlike the native `Array.prototype.reduce` method. For more details * on this behavior, see: * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce#Description * * Be cautious of mutating and returning the accumulator. If you reuse it across * invocations, it will continue to accumulate onto the same value. The general * recommendation is to always return a new value. If you can't do so for * performance reasons, then be sure to reinitialize the accumulator on each * invocation. * * Dispatches to the `reduce` method of the third argument, if present. When * doing so, it is up to the user to handle the [`R.reduced`](#reduced) * shortcuting, as this is not implemented by `reduce`. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig ((a, b) -> a) -> a -> [b] -> a * @param {Function} fn The iterator function. Receives two values, the accumulator and the * current element from the array. * @param {*} acc The accumulator value. * @param {Array} list The list to iterate over. * @return {*} The final, accumulated value. * @see R.reduced, R.addIndex, R.reduceRight * @example * * R.reduce(R.subtract, 0, [1, 2, 3, 4]) // => ((((0 - 1) - 2) - 3) - 4) = -10 * // - -10 * // / \ / \ * // - 4 -6 4 * // / \ / \ * // - 3 ==> -3 3 * // / \ / \ * // - 2 -1 2 * // / \ / \ * // 0 1 0 1 * * @symb R.reduce(f, a, [b, c, d]) = f(f(f(a, b), c), d) */ var reduce = /*#__PURE__*/ (0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function (xf, acc, list) { return (0,_internal_xReduce_js__WEBPACK_IMPORTED_MODULE_1__["default"])(typeof xf === 'function' ? (0,_internal_xwrap_js__WEBPACK_IMPORTED_MODULE_2__["default"])(xf) : xf, acc, list); }); /* harmony default export */ __webpack_exports__["default"] = (reduce); /***/ }), /***/ "./node_modules/ramda/es/reduceBy.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/reduceBy.js ***! \*******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_clone_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_clone.js */ "./node_modules/ramda/es/internal/_clone.js"); /* harmony import */ var _internal_curryN_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curryN.js */ "./node_modules/ramda/es/internal/_curryN.js"); /* harmony import */ var _internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_dispatchable.js */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_has_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_has.js */ "./node_modules/ramda/es/internal/_has.js"); /* harmony import */ var _internal_reduced_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./internal/_reduced.js */ "./node_modules/ramda/es/internal/_reduced.js"); /* harmony import */ var _internal_xReduce_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./internal/_xReduce.js */ "./node_modules/ramda/es/internal/_xReduce.js"); /* harmony import */ var _internal_xreduceBy_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./internal/_xreduceBy.js */ "./node_modules/ramda/es/internal/_xreduceBy.js"); /* harmony import */ var _internal_xwrap_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./internal/_xwrap.js */ "./node_modules/ramda/es/internal/_xwrap.js"); /** * Groups the elements of the list according to the result of calling * the String-returning function `keyFn` on each element and reduces the elements * of each group to a single value via the reducer function `valueFn`. * * The value function receives two values: *(acc, value)*. It may use * [`R.reduced`](#reduced) to short circuit the iteration. * * This function is basically a more general [`groupBy`](#groupBy) function. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.20.0 * @category List * @sig ((a, b) -> a) -> a -> (b -> String) -> [b] -> {String: a} * @param {Function} valueFn The function that reduces the elements of each group to a single * value. Receives two values, accumulator for a particular group and the current element. * @param {*} acc The (initial) accumulator value for each group. * @param {Function} keyFn The function that maps the list's element into a key. * @param {Array} list The array to group. * @return {Object} An object with the output of `keyFn` for keys, mapped to the output of * `valueFn` for elements which produced that key when passed to `keyFn`. * @see R.groupBy, R.reduce, R.reduced * @example * * const groupNames = (acc, {name}) => acc.concat(name) * const toGrade = ({score}) => * score < 65 ? 'F' : * score < 70 ? 'D' : * score < 80 ? 'C' : * score < 90 ? 'B' : 'A' * * var students = [ * {name: 'Abby', score: 83}, * {name: 'Bart', score: 62}, * {name: 'Curt', score: 88}, * {name: 'Dora', score: 92}, * ] * * reduceBy(groupNames, [], toGrade, students) * //=> {"A": ["Dora"], "B": ["Abby", "Curt"], "F": ["Bart"]} */ var reduceBy = /*#__PURE__*/ (0,_internal_curryN_js__WEBPACK_IMPORTED_MODULE_1__["default"])(4, [], /*#__PURE__*/ (0,_internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_2__["default"])([], _internal_xreduceBy_js__WEBPACK_IMPORTED_MODULE_6__["default"], function reduceBy(valueFn, valueAcc, keyFn, list) { var xf = (0,_internal_xwrap_js__WEBPACK_IMPORTED_MODULE_7__["default"])(function (acc, elt) { var key = keyFn(elt); var value = valueFn((0,_internal_has_js__WEBPACK_IMPORTED_MODULE_3__["default"])(key, acc) ? acc[key] : (0,_internal_clone_js__WEBPACK_IMPORTED_MODULE_0__["default"])(valueAcc, false), elt); if (value && value['@@transducer/reduced']) { return (0,_internal_reduced_js__WEBPACK_IMPORTED_MODULE_4__["default"])(acc); } acc[key] = value; return acc; }); return (0,_internal_xReduce_js__WEBPACK_IMPORTED_MODULE_5__["default"])(xf, {}, list); })); /* harmony default export */ __webpack_exports__["default"] = (reduceBy); /***/ }), /***/ "./node_modules/ramda/es/reduceRight.js": /*!**********************************************!*\ !*** ./node_modules/ramda/es/reduceRight.js ***! \**********************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Returns a single item by iterating through the list, successively calling * the iterator function and passing it an accumulator value and the current * value from the array, and then passing the result to the next call. * * Similar to [`reduce`](#reduce), except moves through the input list from the * right to the left. * * The iterator function receives two values: *(value, acc)*, while the arguments' * order of `reduce`'s iterator function is *(acc, value)*. `reduceRight` may use [`reduced`](#reduced) * to short circuit the iteration. * * Note: `R.reduceRight` does not skip deleted or unassigned indices (sparse * arrays), unlike the native `Array.prototype.reduceRight` method. For more details * on this behavior, see: * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduceRight#Description * * Be cautious of mutating and returning the accumulator. If you reuse it across * invocations, it will continue to accumulate onto the same value. The general * recommendation is to always return a new value. If you can't do so for * performance reasons, then be sure to reinitialize the accumulator on each * invocation. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig ((a, b) -> b) -> b -> [a] -> b * @param {Function} fn The iterator function. Receives two values, the current element from the array * and the accumulator. * @param {*} acc The accumulator value. * @param {Array} list The list to iterate over. * @return {*} The final, accumulated value. * @see R.reduce, R.addIndex, R.reduced * @example * * R.reduceRight(R.subtract, 0, [1, 2, 3, 4]) // => (1 - (2 - (3 - (4 - 0)))) = -2 * // - -2 * // / \ / \ * // 1 - 1 3 * // / \ / \ * // 2 - ==> 2 -1 * // / \ / \ * // 3 - 3 4 * // / \ / \ * // 4 0 4 0 * * @symb R.reduceRight(f, a, [b, c, d]) = f(b, f(c, f(d, a))) */ var reduceRight = /*#__PURE__*/ (0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function reduceRight(fn, acc, list) { var idx = list.length - 1; while (idx >= 0) { acc = fn(list[idx], acc); if (acc && acc['@@transducer/reduced']) { acc = acc['@@transducer/value']; break; } idx -= 1; } return acc; }); /* harmony default export */ __webpack_exports__["default"] = (reduceRight); /***/ }), /***/ "./node_modules/ramda/es/reduceWhile.js": /*!**********************************************!*\ !*** ./node_modules/ramda/es/reduceWhile.js ***! \**********************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curryN_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curryN.js */ "./node_modules/ramda/es/internal/_curryN.js"); /* harmony import */ var _internal_xReduce_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_xReduce.js */ "./node_modules/ramda/es/internal/_xReduce.js"); /* harmony import */ var _internal_xwrap_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xwrap.js */ "./node_modules/ramda/es/internal/_xwrap.js"); /* harmony import */ var _internal_reduced_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_reduced.js */ "./node_modules/ramda/es/internal/_reduced.js"); /** * Like [`reduce`](#reduce), `reduceWhile` returns a single item by iterating * through the list, successively calling the iterator function. `reduceWhile` * also takes a predicate that is evaluated before each step. If the predicate * returns `false`, it "short-circuits" the iteration and returns the current * value of the accumulator. `reduceWhile` may alternatively be short-circuited * via [`reduced`](#reduced). * * @func * @memberOf R * @since v0.22.0 * @category List * @sig ((a, b) -> Boolean) -> ((a, b) -> a) -> a -> [b] -> a * @param {Function} pred The predicate. It is passed the accumulator and the * current element. * @param {Function} fn The iterator function. Receives two values, the * accumulator and the current element. * @param {*} a The accumulator value. * @param {Array} list The list to iterate over. * @return {*} The final, accumulated value. * @see R.reduce, R.reduced * @example * * const isOdd = (acc, x) => x % 2 !== 0; * const xs = [1, 3, 5, 60, 777, 800]; * R.reduceWhile(isOdd, R.add, 0, xs); //=> 9 * * const ys = [2, 4, 6] * R.reduceWhile(isOdd, R.add, 111, ys); //=> 111 */ var reduceWhile = /*#__PURE__*/ (0,_internal_curryN_js__WEBPACK_IMPORTED_MODULE_0__["default"])(4, [], function _reduceWhile(pred, fn, a, list) { var xf = (0,_internal_xwrap_js__WEBPACK_IMPORTED_MODULE_2__["default"])(function (acc, x) { return pred(acc, x) ? fn(acc, x) : (0,_internal_reduced_js__WEBPACK_IMPORTED_MODULE_3__["default"])(acc); }); return (0,_internal_xReduce_js__WEBPACK_IMPORTED_MODULE_1__["default"])(xf, a, list); }); /* harmony default export */ __webpack_exports__["default"] = (reduceWhile); /***/ }), /***/ "./node_modules/ramda/es/reduced.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/reduced.js ***! \******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _internal_reduced_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_reduced.js */ "./node_modules/ramda/es/internal/_reduced.js"); /** * Returns a value wrapped to indicate that it is the final value of the reduce * and transduce functions. The returned value should be considered a black * box: the internal structure is not guaranteed to be stable. * * This optimization is available to the below functions: * - [`reduce`](#reduce) * - [`reduceWhile`](#reduceWhile) * - [`reduceBy`](#reduceBy) * - [`reduceRight`](#reduceRight) * - [`transduce`](#transduce) * * @func * @memberOf R * @since v0.15.0 * @category List * @sig a -> * * @param {*} x The final value of the reduce. * @return {*} The wrapped value. * @see R.reduce, R.reduceWhile, R.reduceBy, R.reduceRight, R.transduce * @example * * R.reduce( * (acc, item) => item > 3 ? R.reduced(acc) : acc.concat(item), * [], * [1, 2, 3, 4, 5]) // [1, 2, 3] */ var reduced = /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])(_internal_reduced_js__WEBPACK_IMPORTED_MODULE_1__["default"]); /* harmony default export */ __webpack_exports__["default"] = (reduced); /***/ }), /***/ "./node_modules/ramda/es/reject.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/reject.js ***! \*****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_complement_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_complement.js */ "./node_modules/ramda/es/internal/_complement.js"); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _filter_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./filter.js */ "./node_modules/ramda/es/filter.js"); /** * The complement of [`filter`](#filter). * * Acts as a transducer if a transformer is given in list position. Filterable * objects include plain objects or any object that has a filter method such * as `Array`. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig Filterable f => (a -> Boolean) -> f a -> f a * @param {Function} pred * @param {Array} filterable * @return {Array} * @see R.filter, R.transduce, R.addIndex * @example * * const isOdd = (n) => n % 2 !== 0; * * R.reject(isOdd, [1, 2, 3, 4]); //=> [2, 4] * * R.reject(isOdd, {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, d: 4} */ var reject = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__["default"])(function reject(pred, filterable) { return (0,_filter_js__WEBPACK_IMPORTED_MODULE_2__["default"])((0,_internal_complement_js__WEBPACK_IMPORTED_MODULE_0__["default"])(pred), filterable); }); /* harmony default export */ __webpack_exports__["default"] = (reject); /***/ }), /***/ "./node_modules/ramda/es/remove.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/remove.js ***! \*****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Removes the sub-list of `list` starting at index `start` and containing * `count` elements. _Note that this is not destructive_: it returns a copy of * the list with the changes. * No lists have been harmed in the application of this function. * * @func * @memberOf R * @since v0.2.2 * @category List * @sig Number -> Number -> [a] -> [a] * @param {Number} start The position to start removing elements * @param {Number} count The number of elements to remove * @param {Array} list The list to remove from * @return {Array} A new Array with `count` elements from `start` removed. * @see R.without * @example * * R.remove(2, 3, [1,2,3,4,5,6,7,8]); //=> [1,2,6,7,8] */ var remove = /*#__PURE__*/ (0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function remove(start, count, list) { var result = Array.prototype.slice.call(list, 0); result.splice(start, count); return result; }); /* harmony default export */ __webpack_exports__["default"] = (remove); /***/ }), /***/ "./node_modules/ramda/es/repeat.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/repeat.js ***! \*****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _always_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./always.js */ "./node_modules/ramda/es/always.js"); /* harmony import */ var _times_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./times.js */ "./node_modules/ramda/es/times.js"); /** * Returns a fixed list of size `n` containing a specified identical value. * * @func * @memberOf R * @since v0.1.1 * @category List * @sig a -> n -> [a] * @param {*} value The value to repeat. * @param {Number} n The desired size of the output list. * @return {Array} A new array containing `n` `value`s. * @see R.times * @example * * R.repeat('hi', 5); //=> ['hi', 'hi', 'hi', 'hi', 'hi'] * * const obj = {}; * const repeatedObjs = R.repeat(obj, 5); //=> [{}, {}, {}, {}, {}] * repeatedObjs[0] === repeatedObjs[1]; //=> true * @symb R.repeat(a, 0) = [] * @symb R.repeat(a, 1) = [a] * @symb R.repeat(a, 2) = [a, a] */ var repeat = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function repeat(value, n) { return (0,_times_js__WEBPACK_IMPORTED_MODULE_2__["default"])((0,_always_js__WEBPACK_IMPORTED_MODULE_1__["default"])(value), n); }); /* harmony default export */ __webpack_exports__["default"] = (repeat); /***/ }), /***/ "./node_modules/ramda/es/replace.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/replace.js ***! \******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Replace a substring or regex match in a string with a replacement. * * The first two parameters correspond to the parameters of the * `String.prototype.replace()` function, so the second parameter can also be a * function. * * @func * @memberOf R * @since v0.7.0 * @category String * @sig RegExp|String -> String -> String -> String * @param {RegExp|String} pattern A regular expression or a substring to match. * @param {String} replacement The string to replace the matches with. * @param {String} str The String to do the search and replacement in. * @return {String} The result. * @example * * R.replace('foo', 'bar', 'foo foo foo'); //=> 'bar foo foo' * R.replace(/foo/, 'bar', 'foo foo foo'); //=> 'bar foo foo' * * // Use the "g" (global) flag to replace all occurrences: * R.replace(/foo/g, 'bar', 'foo foo foo'); //=> 'bar bar bar' */ var replace = /*#__PURE__*/ (0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function replace(regex, replacement, str) { return str.replace(regex, replacement); }); /* harmony default export */ __webpack_exports__["default"] = (replace); /***/ }), /***/ "./node_modules/ramda/es/reverse.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/reverse.js ***! \******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _internal_isString_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isString.js */ "./node_modules/ramda/es/internal/_isString.js"); /** * Returns a new list or string with the elements or characters in reverse * order. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig [a] -> [a] * @sig String -> String * @param {Array|String} list * @return {Array|String} * @example * * R.reverse([1, 2, 3]); //=> [3, 2, 1] * R.reverse([1, 2]); //=> [2, 1] * R.reverse([1]); //=> [1] * R.reverse([]); //=> [] * * R.reverse('abc'); //=> 'cba' * R.reverse('ab'); //=> 'ba' * R.reverse('a'); //=> 'a' * R.reverse(''); //=> '' */ var reverse = /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function reverse(list) { return (0,_internal_isString_js__WEBPACK_IMPORTED_MODULE_1__["default"])(list) ? list.split('').reverse().join('') : Array.prototype.slice.call(list, 0).reverse(); }); /* harmony default export */ __webpack_exports__["default"] = (reverse); /***/ }), /***/ "./node_modules/ramda/es/scan.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/scan.js ***! \***************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable.js */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_xscan_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xscan.js */ "./node_modules/ramda/es/internal/_xscan.js"); /** * Scan is similar to [`reduce`](#reduce), but returns a list of successively * reduced values from the left. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.10.0 * @category List * @sig ((a, b) -> a) -> a -> [b] -> [a] * @param {Function} fn The iterator function. Receives two values, the accumulator and the * current element from the array * @param {*} acc The accumulator value. * @param {Array} list The list to iterate over. * @return {Array} A list of all intermediately reduced values. * @see R.reduce, R.mapAccum * @example * * const numbers = [1, 2, 3, 4]; * const factorials = R.scan(R.multiply, 1, numbers); //=> [1, 1, 2, 6, 24] * @symb R.scan(f, a, [b, c]) = [a, f(a, b), f(f(a, b), c)] */ var scan = /*#__PURE__*/ (0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/ (0,_internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__["default"])([], _internal_xscan_js__WEBPACK_IMPORTED_MODULE_2__["default"], function scan(fn, acc, list) { var idx = 0; var len = list.length; var result = [acc]; while (idx < len) { acc = fn(acc, list[idx]); result[idx + 1] = acc; idx += 1; } return result; })); /* harmony default export */ __webpack_exports__["default"] = (scan); /***/ }), /***/ "./node_modules/ramda/es/sequence.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/sequence.js ***! \*******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _ap_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ap.js */ "./node_modules/ramda/es/ap.js"); /* harmony import */ var _map_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./map.js */ "./node_modules/ramda/es/map.js"); /* harmony import */ var _prepend_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./prepend.js */ "./node_modules/ramda/es/prepend.js"); /* harmony import */ var _reduceRight_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./reduceRight.js */ "./node_modules/ramda/es/reduceRight.js"); /* harmony import */ var _internal_identity_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./internal/_identity.js */ "./node_modules/ramda/es/internal/_identity.js"); /** * Transforms a [Traversable](https://github.com/fantasyland/fantasy-land#traversable) * of [Applicative](https://github.com/fantasyland/fantasy-land#applicative) into an * Applicative of Traversable. * * Dispatches to the `"fantasy-land/traverse"` or the `traverse` method of the second argument, if present. * * @func * @memberOf R * @since v0.19.0 * @category List * @sig fantasy-land/of :: TypeRep f => f ~> a -> f a * @sig (Applicative f, Traversable t) => TypeRep f -> t (f a) -> f (t a) * @sig (Applicative f, Traversable t) => (a -> f a) -> t (f a) -> f (t a) * @param {Object|Function} TypeRepresentative with an `of` or `fantasy-land/of` method * @param {*} traversable * @return {*} * @see R.traverse * @example * * R.sequence(Maybe.of, [Just(1), Just(2), Just(3)]); //=> Just([1, 2, 3]) * R.sequence(Maybe.of, [Just(1), Just(2), Nothing()]); //=> Nothing() * * R.sequence(R.of(Array), Just([1, 2, 3])); //=> [Just(1), Just(2), Just(3)] * R.sequence(R.of(Array), Nothing()); //=> [Nothing()] */ var sequence = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function sequence(F, traversable) { var of = typeof F['fantasy-land/of'] === 'function' ? F['fantasy-land/of'] : typeof F.of === 'function' ? F.of : F; var TypeRep = { 'fantasy-land/of': of }; return typeof traversable['fantasy-land/traverse'] === 'function' ? traversable['fantasy-land/traverse'](TypeRep, _internal_identity_js__WEBPACK_IMPORTED_MODULE_5__["default"]) : typeof traversable.traverse === 'function' ? traversable.traverse(TypeRep, _internal_identity_js__WEBPACK_IMPORTED_MODULE_5__["default"]) : (0,_reduceRight_js__WEBPACK_IMPORTED_MODULE_4__["default"])(function (x, acc) { return (0,_ap_js__WEBPACK_IMPORTED_MODULE_1__["default"])((0,_map_js__WEBPACK_IMPORTED_MODULE_2__["default"])(_prepend_js__WEBPACK_IMPORTED_MODULE_3__["default"], x), acc); }, of([]), traversable); }); /* harmony default export */ __webpack_exports__["default"] = (sequence); /***/ }), /***/ "./node_modules/ramda/es/set.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/set.js ***! \**************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _always_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./always.js */ "./node_modules/ramda/es/always.js"); /* harmony import */ var _over_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./over.js */ "./node_modules/ramda/es/over.js"); /** * Returns the result of "setting" the portion of the given data structure * focused by the given lens to the given value. * * @func * @memberOf R * @since v0.16.0 * @category Object * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s * @sig Lens s a -> a -> s -> s * @param {Lens} lens * @param {*} v * @param {*} x * @return {*} * @see R.view, R.over, R.lens, R.lensIndex, R.lensProp, R.lensPath * @example * * const xLens = R.lensProp('x'); * * R.set(xLens, 4, {x: 1, y: 2}); //=> {x: 4, y: 2} * R.set(xLens, 8, {x: 1, y: 2}); //=> {x: 8, y: 2} */ var set = /*#__PURE__*/ (0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function set(lens, v, x) { return (0,_over_js__WEBPACK_IMPORTED_MODULE_2__["default"])(lens, (0,_always_js__WEBPACK_IMPORTED_MODULE_1__["default"])(v), x); }); /* harmony default export */ __webpack_exports__["default"] = (set); /***/ }), /***/ "./node_modules/ramda/es/slice.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/slice.js ***! \****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_checkForMethod_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_checkForMethod.js */ "./node_modules/ramda/es/internal/_checkForMethod.js"); /* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Returns the elements of the given list or string (or object with a `slice` * method) from `fromIndex` (inclusive) to `toIndex` (exclusive). * * Dispatches to the `slice` method of the third argument, if present. * * @func * @memberOf R * @since v0.1.4 * @category List * @sig Number -> Number -> [a] -> [a] * @sig Number -> Number -> String -> String * @param {Number} fromIndex The start index (inclusive). * @param {Number} toIndex The end index (exclusive). * @param {*} list * @return {*} * @example * * R.slice(1, 3, ['a', 'b', 'c', 'd']); //=> ['b', 'c'] * R.slice(1, Infinity, ['a', 'b', 'c', 'd']); //=> ['b', 'c', 'd'] * R.slice(0, -1, ['a', 'b', 'c', 'd']); //=> ['a', 'b', 'c'] * R.slice(-3, -1, ['a', 'b', 'c', 'd']); //=> ['b', 'c'] * R.slice(0, 3, 'ramda'); //=> 'ram' */ var slice = /*#__PURE__*/ (0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/ (0,_internal_checkForMethod_js__WEBPACK_IMPORTED_MODULE_0__["default"])('slice', function slice(fromIndex, toIndex, list) { return Array.prototype.slice.call(list, fromIndex, toIndex); })); /* harmony default export */ __webpack_exports__["default"] = (slice); /***/ }), /***/ "./node_modules/ramda/es/sort.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/sort.js ***! \***************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Returns a copy of the list, sorted according to the comparator function, * which should accept two values at a time and return a negative number if the * first value is smaller, a positive number if it's larger, and zero if they * are equal. Please note that this is a **copy** of the list. It does not * modify the original. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig ((a, a) -> Number) -> [a] -> [a] * @param {Function} comparator A sorting function :: a -> b -> Int * @param {Array} list The list to sort * @return {Array} a new array with its elements sorted by the comparator function. * @see R.ascend, R.descend * @example * * const diff = function(a, b) { return a - b; }; * R.sort(diff, [4,2,7,5]); //=> [2, 4, 5, 7] */ var sort = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function sort(comparator, list) { return Array.prototype.slice.call(list, 0).sort(comparator); }); /* harmony default export */ __webpack_exports__["default"] = (sort); /***/ }), /***/ "./node_modules/ramda/es/sortBy.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/sortBy.js ***! \*****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Sorts the list according to the supplied function. * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig Ord b => (a -> b) -> [a] -> [a] * @param {Function} fn * @param {Array} list The list to sort. * @return {Array} A new list sorted by the keys generated by `fn`. * @example * * const sortByFirstItem = R.sortBy(R.prop(0)); * const pairs = [[-1, 1], [-2, 2], [-3, 3]]; * sortByFirstItem(pairs); //=> [[-3, 3], [-2, 2], [-1, 1]] * * const sortByNameCaseInsensitive = R.sortBy(R.compose(R.toLower, R.prop('name'))); * const alice = { * name: 'ALICE', * age: 101 * }; * const bob = { * name: 'Bob', * age: -10 * }; * const clara = { * name: 'clara', * age: 314.159 * }; * const people = [clara, bob, alice]; * sortByNameCaseInsensitive(people); //=> [alice, bob, clara] */ var sortBy = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function sortBy(fn, list) { return Array.prototype.slice.call(list, 0).sort(function (a, b) { var aa = fn(a); var bb = fn(b); return aa < bb ? -1 : aa > bb ? 1 : 0; }); }); /* harmony default export */ __webpack_exports__["default"] = (sortBy); /***/ }), /***/ "./node_modules/ramda/es/sortWith.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/sortWith.js ***! \*******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Sorts a list according to a list of comparators. * * @func * @memberOf R * @since v0.23.0 * @category Relation * @sig [(a, a) -> Number] -> [a] -> [a] * @param {Array} functions A list of comparator functions. * @param {Array} list The list to sort. * @return {Array} A new list sorted according to the comarator functions. * @see R.ascend, R.descend * @example * * const alice = { * name: 'alice', * age: 40 * }; * const bob = { * name: 'bob', * age: 30 * }; * const clara = { * name: 'clara', * age: 40 * }; * const people = [clara, bob, alice]; * const ageNameSort = R.sortWith([ * R.descend(R.prop('age')), * R.ascend(R.prop('name')) * ]); * ageNameSort(people); //=> [alice, clara, bob] */ var sortWith = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function sortWith(fns, list) { return Array.prototype.slice.call(list, 0).sort(function (a, b) { var result = 0; var i = 0; while (result === 0 && i < fns.length) { result = fns[i](a, b); i += 1; } return result; }); }); /* harmony default export */ __webpack_exports__["default"] = (sortWith); /***/ }), /***/ "./node_modules/ramda/es/split.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/split.js ***! \****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _invoker_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./invoker.js */ "./node_modules/ramda/es/invoker.js"); /** * Splits a string into an array of strings based on the given * separator. * * @func * @memberOf R * @since v0.1.0 * @category String * @sig (String | RegExp) -> String -> [String] * @param {String|RegExp} sep The pattern. * @param {String} str The string to separate into an array. * @return {Array} The array of strings from `str` separated by `sep`. * @see R.join * @example * * const pathComponents = R.split('/'); * R.tail(pathComponents('/usr/local/bin/node')); //=> ['usr', 'local', 'bin', 'node'] * * R.split('.', 'a.b.c.xyz.d'); //=> ['a', 'b', 'c', 'xyz', 'd'] */ var split = /*#__PURE__*/ (0,_invoker_js__WEBPACK_IMPORTED_MODULE_0__["default"])(1, 'split'); /* harmony default export */ __webpack_exports__["default"] = (split); /***/ }), /***/ "./node_modules/ramda/es/splitAt.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/splitAt.js ***! \******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _length_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./length.js */ "./node_modules/ramda/es/length.js"); /* harmony import */ var _slice_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./slice.js */ "./node_modules/ramda/es/slice.js"); /** * Splits a given list or string at a given index. * * @func * @memberOf R * @since v0.19.0 * @category List * @sig Number -> [a] -> [[a], [a]] * @sig Number -> String -> [String, String] * @param {Number} index The index where the array/string is split. * @param {Array|String} array The array/string to be split. * @return {Array} * @example * * R.splitAt(1, [1, 2, 3]); //=> [[1], [2, 3]] * R.splitAt(5, 'hello world'); //=> ['hello', ' world'] * R.splitAt(-1, 'foobar'); //=> ['fooba', 'r'] */ var splitAt = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function splitAt(index, array) { return [(0,_slice_js__WEBPACK_IMPORTED_MODULE_2__["default"])(0, index, array), (0,_slice_js__WEBPACK_IMPORTED_MODULE_2__["default"])(index, (0,_length_js__WEBPACK_IMPORTED_MODULE_1__["default"])(array), array)]; }); /* harmony default export */ __webpack_exports__["default"] = (splitAt); /***/ }), /***/ "./node_modules/ramda/es/splitEvery.js": /*!*********************************************!*\ !*** ./node_modules/ramda/es/splitEvery.js ***! \*********************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _slice_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./slice.js */ "./node_modules/ramda/es/slice.js"); /** * Splits a collection into slices of the specified length. * * @func * @memberOf R * @since v0.16.0 * @category List * @sig Number -> [a] -> [[a]] * @sig Number -> String -> [String] * @param {Number} n * @param {Array} list * @return {Array} * @example * * R.splitEvery(3, [1, 2, 3, 4, 5, 6, 7]); //=> [[1, 2, 3], [4, 5, 6], [7]] * R.splitEvery(3, 'foobarbaz'); //=> ['foo', 'bar', 'baz'] */ var splitEvery = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function splitEvery(n, list) { if (n <= 0) { throw new Error('First argument to splitEvery must be a positive integer'); } var result = []; var idx = 0; while (idx < list.length) { result.push((0,_slice_js__WEBPACK_IMPORTED_MODULE_1__["default"])(idx, idx += n, list)); } return result; }); /* harmony default export */ __webpack_exports__["default"] = (splitEvery); /***/ }), /***/ "./node_modules/ramda/es/splitWhen.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/splitWhen.js ***! \********************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Takes a list and a predicate and returns a pair of lists with the following properties: * * - the result of concatenating the two output lists is equivalent to the input list; * - none of the elements of the first output list satisfies the predicate; and * - if the second output list is non-empty, its first element satisfies the predicate. * * @func * @memberOf R * @since v0.19.0 * @category List * @sig (a -> Boolean) -> [a] -> [[a], [a]] * @param {Function} pred The predicate that determines where the array is split. * @param {Array} list The array to be split. * @return {Array} * @example * * R.splitWhen(R.equals(2), [1, 2, 3, 1, 2, 3]); //=> [[1], [2, 3, 1, 2, 3]] */ var splitWhen = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function splitWhen(pred, list) { var idx = 0; var len = list.length; var prefix = []; while (idx < len && !pred(list[idx])) { prefix.push(list[idx]); idx += 1; } return [prefix, Array.prototype.slice.call(list, idx)]; }); /* harmony default export */ __webpack_exports__["default"] = (splitWhen); /***/ }), /***/ "./node_modules/ramda/es/splitWhenever.js": /*!************************************************!*\ !*** ./node_modules/ramda/es/splitWhenever.js ***! \************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curryN_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curryN.js */ "./node_modules/ramda/es/internal/_curryN.js"); /** * Splits an array into slices on every occurrence of a value. * * @func * @memberOf R * @since v0.26.1 * @category List * @sig (a -> Boolean) -> [a] -> [[a]] * @param {Function} pred The predicate that determines where the array is split. * @param {Array} list The array to be split. * @return {Array} * @example * * R.splitWhenever(R.equals(2), [1, 2, 3, 2, 4, 5, 2, 6, 7]); //=> [[1], [3], [4, 5], [6, 7]] */ var splitWhenever = /*#__PURE__*/ (0,_internal_curryN_js__WEBPACK_IMPORTED_MODULE_0__["default"])(2, [], function splitWhenever(pred, list) { var acc = []; var curr = []; for (var i = 0; i < list.length; i = i + 1) { if (!pred(list[i])) { curr.push(list[i]); } if ((i < list.length - 1 && pred(list[i + 1]) || i === list.length - 1) && curr.length > 0) { acc.push(curr); curr = []; } } return acc; }); /* harmony default export */ __webpack_exports__["default"] = (splitWhenever); /***/ }), /***/ "./node_modules/ramda/es/startsWith.js": /*!*********************************************!*\ !*** ./node_modules/ramda/es/startsWith.js ***! \*********************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _equals_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./equals.js */ "./node_modules/ramda/es/equals.js"); /* harmony import */ var _take_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./take.js */ "./node_modules/ramda/es/take.js"); /** * Checks if a list starts with the provided sublist. * * Similarly, checks if a string starts with the provided substring. * * @func * @memberOf R * @since v0.24.0 * @category List * @sig [a] -> [a] -> Boolean * @sig String -> String -> Boolean * @param {*} prefix * @param {*} list * @return {Boolean} * @see R.endsWith * @example * * R.startsWith('a', 'abc') //=> true * R.startsWith('b', 'abc') //=> false * R.startsWith(['a'], ['a', 'b', 'c']) //=> true * R.startsWith(['b'], ['a', 'b', 'c']) //=> false */ var startsWith = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function (prefix, list) { return (0,_equals_js__WEBPACK_IMPORTED_MODULE_1__["default"])((0,_take_js__WEBPACK_IMPORTED_MODULE_2__["default"])(prefix.length, list), prefix); }); /* harmony default export */ __webpack_exports__["default"] = (startsWith); /***/ }), /***/ "./node_modules/ramda/es/subtract.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/subtract.js ***! \*******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Subtracts its second argument from its first argument. * * @func * @memberOf R * @since v0.1.0 * @category Math * @sig Number -> Number -> Number * @param {Number} a The first value. * @param {Number} b The second value. * @return {Number} The result of `a - b`. * @see R.add * @example * * R.subtract(10, 8); //=> 2 * * const minus5 = R.subtract(R.__, 5); * minus5(17); //=> 12 * * const complementaryAngle = R.subtract(90); * complementaryAngle(30); //=> 60 * complementaryAngle(72); //=> 18 */ var subtract = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function subtract(a, b) { return Number(a) - Number(b); }); /* harmony default export */ __webpack_exports__["default"] = (subtract); /***/ }), /***/ "./node_modules/ramda/es/sum.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/sum.js ***! \**************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _add_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./add.js */ "./node_modules/ramda/es/add.js"); /* harmony import */ var _reduce_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./reduce.js */ "./node_modules/ramda/es/reduce.js"); /** * Adds together all the elements of a list. * * @func * @memberOf R * @since v0.1.0 * @category Math * @sig [Number] -> Number * @param {Array} list An array of numbers * @return {Number} The sum of all the numbers in the list. * @see R.reduce * @example * * R.sum([2,4,6,8,100,1]); //=> 121 */ var sum = /*#__PURE__*/ (0,_reduce_js__WEBPACK_IMPORTED_MODULE_1__["default"])(_add_js__WEBPACK_IMPORTED_MODULE_0__["default"], 0); /* harmony default export */ __webpack_exports__["default"] = (sum); /***/ }), /***/ "./node_modules/ramda/es/swap.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/swap.js ***! \***************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _internal_isArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isArray.js */ "./node_modules/ramda/es/internal/_isArray.js"); /* harmony import */ var _internal_isString_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_isString.js */ "./node_modules/ramda/es/internal/_isString.js"); /* harmony import */ var _clone_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./clone.js */ "./node_modules/ramda/es/clone.js"); var swapObject = function swapObject(indexA, indexB, o) { var copy = (0,_clone_js__WEBPACK_IMPORTED_MODULE_3__["default"])(o); var properties = Object.getOwnPropertyNames(copy); if (properties.includes(indexA) && properties.includes(indexB)) { var tmp = copy[indexA]; copy[indexA] = copy[indexB]; copy[indexB] = tmp; } return copy; }; var swapList = function swapList(indexA, indexB, list) { var length = list.length; var result = list.slice(); var positiveIndexA = indexA < 0 ? length + indexA : indexA; var positiveIndexB = indexB < 0 ? length + indexB : indexB; var positiveMin = Math.min(positiveIndexA, positiveIndexB); var positiveMax = Math.max(positiveIndexA, positiveIndexB); if (positiveIndexA < 0 || positiveIndexA > length) { return result; } if (positiveIndexB < 0 || positiveIndexB > length) { return result; } if (positiveIndexA === positiveIndexB) { return result; } result = [].concat(result.slice(0, positiveMin)).concat(result[positiveMax]).concat(result.slice(positiveMin + 1, positiveMax)).concat(result[positiveMin]).concat(result.slice(positiveMax + 1, length)); return result; }; var swapString = function swapString(indexA, indexB, s) { var result = swapList(indexA, indexB, s); return (0,_internal_isArray_js__WEBPACK_IMPORTED_MODULE_1__["default"])(result) ? result.join('') : result; }; /** * Swap an item, at index `indexA` with another item, at index `indexB`, in an object or a list of elements. * A new result will be created containing the new elements order. * * @func * @memberOf R * @since v0.29.0 * @category List * @sig Number -> Number -> [a] -> [a] * @param {Number|string|Object} indexA The first index * @param {Number|string|Object} indexB The second index * @param {Array|Object} o Either the object or list which will serve to realise the swap * @return {Array|Object} The new object or list reordered * @example * * R.swap(0, 2, ['a', 'b', 'c', 'd', 'e', 'f']); //=> ['c', 'b', 'a', 'd', 'e', 'f'] * R.swap(-1, 0, ['a', 'b', 'c', 'd', 'e', 'f']); //=> ['f', 'b', 'c', 'd', 'e', 'a'] list rotation * R.swap('a', 'b', {a: 1, b: 2}); //=> {a: 2, b: 2} * R.swap(0, 2, 'foo'); //=> 'oof' */ var swap = /*#__PURE__*/ (0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function (indexA, indexB, o) { if ((0,_internal_isArray_js__WEBPACK_IMPORTED_MODULE_1__["default"])(o)) { return swapList(indexA, indexB, o); } else if ((0,_internal_isString_js__WEBPACK_IMPORTED_MODULE_2__["default"])(o)) { return swapString(indexA, indexB, o); } else { return swapObject(indexA, indexB, o); } }); /* harmony default export */ __webpack_exports__["default"] = (swap); /***/ }), /***/ "./node_modules/ramda/es/symmetricDifference.js": /*!******************************************************!*\ !*** ./node_modules/ramda/es/symmetricDifference.js ***! \******************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _concat_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./concat.js */ "./node_modules/ramda/es/concat.js"); /* harmony import */ var _difference_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./difference.js */ "./node_modules/ramda/es/difference.js"); /** * Finds the set (i.e. no duplicates) of all elements contained in the first or * second list, but not both. * * @func * @memberOf R * @since v0.19.0 * @category Relation * @sig [*] -> [*] -> [*] * @param {Array} list1 The first list. * @param {Array} list2 The second list. * @return {Array} The elements in `list1` or `list2`, but not both. * @see R.symmetricDifferenceWith, R.difference, R.differenceWith * @example * * R.symmetricDifference([1,2,3,4], [7,6,5,4,3]); //=> [1,2,7,6,5] * R.symmetricDifference([7,6,5,4,3], [1,2,3,4]); //=> [7,6,5,1,2] */ var symmetricDifference = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function symmetricDifference(list1, list2) { return (0,_concat_js__WEBPACK_IMPORTED_MODULE_1__["default"])((0,_difference_js__WEBPACK_IMPORTED_MODULE_2__["default"])(list1, list2), (0,_difference_js__WEBPACK_IMPORTED_MODULE_2__["default"])(list2, list1)); }); /* harmony default export */ __webpack_exports__["default"] = (symmetricDifference); /***/ }), /***/ "./node_modules/ramda/es/symmetricDifferenceWith.js": /*!**********************************************************!*\ !*** ./node_modules/ramda/es/symmetricDifferenceWith.js ***! \**********************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _concat_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./concat.js */ "./node_modules/ramda/es/concat.js"); /* harmony import */ var _differenceWith_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./differenceWith.js */ "./node_modules/ramda/es/differenceWith.js"); /** * Finds the set (i.e. no duplicates) of all elements contained in the first or * second list, but not both. Duplication is determined according to the value * returned by applying the supplied predicate to two list elements. * * @func * @memberOf R * @since v0.19.0 * @category Relation * @sig ((a, a) -> Boolean) -> [a] -> [a] -> [a] * @param {Function} pred A predicate used to test whether two items are equal. * @param {Array} list1 The first list. * @param {Array} list2 The second list. * @return {Array} The elements in `list1` or `list2`, but not both. * @see R.symmetricDifference, R.difference, R.differenceWith * @example * * const eqA = R.eqBy(R.prop('a')); * const l1 = [{a: 1}, {a: 2}, {a: 3}, {a: 4}]; * const l2 = [{a: 3}, {a: 4}, {a: 5}, {a: 6}]; * R.symmetricDifferenceWith(eqA, l1, l2); //=> [{a: 1}, {a: 2}, {a: 5}, {a: 6}] */ var symmetricDifferenceWith = /*#__PURE__*/ (0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function symmetricDifferenceWith(pred, list1, list2) { return (0,_concat_js__WEBPACK_IMPORTED_MODULE_1__["default"])((0,_differenceWith_js__WEBPACK_IMPORTED_MODULE_2__["default"])(pred, list1, list2), (0,_differenceWith_js__WEBPACK_IMPORTED_MODULE_2__["default"])(pred, list2, list1)); }); /* harmony default export */ __webpack_exports__["default"] = (symmetricDifferenceWith); /***/ }), /***/ "./node_modules/ramda/es/tail.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/tail.js ***! \***************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_checkForMethod_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_checkForMethod.js */ "./node_modules/ramda/es/internal/_checkForMethod.js"); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _slice_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./slice.js */ "./node_modules/ramda/es/slice.js"); /** * Returns all but the first element of the given list or string (or object * with a `tail` method). * * Dispatches to the `slice` method of the first argument, if present. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig [a] -> [a] * @sig String -> String * @param {*} list * @return {*} * @see R.head, R.init, R.last * @example * * R.tail([1, 2, 3]); //=> [2, 3] * R.tail([1, 2]); //=> [2] * R.tail([1]); //=> [] * R.tail([]); //=> [] * * R.tail('abc'); //=> 'bc' * R.tail('ab'); //=> 'b' * R.tail('a'); //=> '' * R.tail(''); //=> '' */ var tail = /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/ (0,_internal_checkForMethod_js__WEBPACK_IMPORTED_MODULE_0__["default"])('tail', /*#__PURE__*/ (0,_slice_js__WEBPACK_IMPORTED_MODULE_2__["default"])(1, Infinity))); /* harmony default export */ __webpack_exports__["default"] = (tail); /***/ }), /***/ "./node_modules/ramda/es/take.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/take.js ***! \***************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable.js */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_xtake_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xtake.js */ "./node_modules/ramda/es/internal/_xtake.js"); /* harmony import */ var _slice_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./slice.js */ "./node_modules/ramda/es/slice.js"); /** * Returns the first `n` elements of the given list, string, or * transducer/transformer (or object with a `take` method). * * Dispatches to the `take` method of the second argument, if present. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig Number -> [a] -> [a] * @sig Number -> String -> String * @param {Number} n * @param {*} list * @return {*} * @see R.drop * @example * * R.take(1, ['foo', 'bar', 'baz']); //=> ['foo'] * R.take(2, ['foo', 'bar', 'baz']); //=> ['foo', 'bar'] * R.take(3, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz'] * R.take(4, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz'] * R.take(3, 'ramda'); //=> 'ram' * * const personnel = [ * 'Dave Brubeck', * 'Paul Desmond', * 'Eugene Wright', * 'Joe Morello', * 'Gerry Mulligan', * 'Bob Bates', * 'Joe Dodge', * 'Ron Crotty' * ]; * * const takeFive = R.take(5); * takeFive(personnel); * //=> ['Dave Brubeck', 'Paul Desmond', 'Eugene Wright', 'Joe Morello', 'Gerry Mulligan'] * @symb R.take(-1, [a, b]) = [a, b] * @symb R.take(0, [a, b]) = [] * @symb R.take(1, [a, b]) = [a] * @symb R.take(2, [a, b]) = [a, b] */ var take = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/ (0,_internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__["default"])(['take'], _internal_xtake_js__WEBPACK_IMPORTED_MODULE_2__["default"], function take(n, xs) { return (0,_slice_js__WEBPACK_IMPORTED_MODULE_3__["default"])(0, n < 0 ? Infinity : n, xs); })); /* harmony default export */ __webpack_exports__["default"] = (take); /***/ }), /***/ "./node_modules/ramda/es/takeLast.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/takeLast.js ***! \*******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _drop_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./drop.js */ "./node_modules/ramda/es/drop.js"); /** * Returns a new list containing the last `n` elements of the given list. * If `n > list.length`, returns a list of `list.length` elements. * * @func * @memberOf R * @since v0.16.0 * @category List * @sig Number -> [a] -> [a] * @sig Number -> String -> String * @param {Number} n The number of elements to return. * @param {Array} xs The collection to consider. * @return {Array} * @see R.dropLast * @example * * R.takeLast(1, ['foo', 'bar', 'baz']); //=> ['baz'] * R.takeLast(2, ['foo', 'bar', 'baz']); //=> ['bar', 'baz'] * R.takeLast(3, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz'] * R.takeLast(4, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz'] * R.takeLast(3, 'ramda'); //=> 'mda' */ var takeLast = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function takeLast(n, xs) { return (0,_drop_js__WEBPACK_IMPORTED_MODULE_1__["default"])(n >= 0 ? xs.length - n : 0, xs); }); /* harmony default export */ __webpack_exports__["default"] = (takeLast); /***/ }), /***/ "./node_modules/ramda/es/takeLastWhile.js": /*!************************************************!*\ !*** ./node_modules/ramda/es/takeLastWhile.js ***! \************************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _slice_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./slice.js */ "./node_modules/ramda/es/slice.js"); /** * Returns a new list containing the last `n` elements of a given list, passing * each value to the supplied predicate function, and terminating when the * predicate function returns `false`. Excludes the element that caused the * predicate function to fail. The predicate function is passed one argument: * *(value)*. * * @func * @memberOf R * @since v0.16.0 * @category List * @sig (a -> Boolean) -> [a] -> [a] * @sig (a -> Boolean) -> String -> String * @param {Function} fn The function called per iteration. * @param {Array} xs The collection to iterate over. * @return {Array} A new array. * @see R.dropLastWhile, R.addIndex * @example * * const isNotOne = x => x !== 1; * * R.takeLastWhile(isNotOne, [1, 2, 3, 4]); //=> [2, 3, 4] * * R.takeLastWhile(x => x !== 'R' , 'Ramda'); //=> 'amda' */ var takeLastWhile = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function takeLastWhile(fn, xs) { var idx = xs.length - 1; while (idx >= 0 && fn(xs[idx])) { idx -= 1; } return (0,_slice_js__WEBPACK_IMPORTED_MODULE_1__["default"])(idx + 1, Infinity, xs); }); /* harmony default export */ __webpack_exports__["default"] = (takeLastWhile); /***/ }), /***/ "./node_modules/ramda/es/takeWhile.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/takeWhile.js ***! \********************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable.js */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_xtakeWhile_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xtakeWhile.js */ "./node_modules/ramda/es/internal/_xtakeWhile.js"); /* harmony import */ var _slice_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./slice.js */ "./node_modules/ramda/es/slice.js"); /** * Returns a new list containing the first `n` elements of a given list, * passing each value to the supplied predicate function, and terminating when * the predicate function returns `false`. Excludes the element that caused the * predicate function to fail. The predicate function is passed one argument: * *(value)*. * * Dispatches to the `takeWhile` method of the second argument, if present. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig (a -> Boolean) -> [a] -> [a] * @sig (a -> Boolean) -> String -> String * @param {Function} fn The function called per iteration. * @param {Array} xs The collection to iterate over. * @return {Array} A new array. * @see R.dropWhile, R.transduce, R.addIndex * @example * * const isNotFour = x => x !== 4; * * R.takeWhile(isNotFour, [1, 2, 3, 4, 3, 2, 1]); //=> [1, 2, 3] * * R.takeWhile(x => x !== 'd' , 'Ramda'); //=> 'Ram' */ var takeWhile = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/ (0,_internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__["default"])(['takeWhile'], _internal_xtakeWhile_js__WEBPACK_IMPORTED_MODULE_2__["default"], function takeWhile(fn, xs) { var idx = 0; var len = xs.length; while (idx < len && fn(xs[idx])) { idx += 1; } return (0,_slice_js__WEBPACK_IMPORTED_MODULE_3__["default"])(0, idx, xs); })); /* harmony default export */ __webpack_exports__["default"] = (takeWhile); /***/ }), /***/ "./node_modules/ramda/es/tap.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/tap.js ***! \**************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable.js */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_xtap_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_xtap.js */ "./node_modules/ramda/es/internal/_xtap.js"); /** * Runs the given function with the supplied object, then returns the object. * * Acts as a transducer if a transformer is given as second parameter. * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig (a -> *) -> a -> a * @param {Function} fn The function to call with `x`. The return value of `fn` will be thrown away. * @param {*} x * @return {*} `x`. * @example * * const sayX = x => console.log('x is ' + x); * R.tap(sayX, 100); //=> 100 * // logs 'x is 100' * @symb R.tap(f, a) = (f(a), a) */ var tap = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/ (0,_internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__["default"])([], _internal_xtap_js__WEBPACK_IMPORTED_MODULE_2__["default"], function tap(fn, x) { fn(x); return x; })); /* harmony default export */ __webpack_exports__["default"] = (tap); /***/ }), /***/ "./node_modules/ramda/es/test.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/test.js ***! \***************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_cloneRegExp_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_cloneRegExp.js */ "./node_modules/ramda/es/internal/_cloneRegExp.js"); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_isRegExp_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_isRegExp.js */ "./node_modules/ramda/es/internal/_isRegExp.js"); /* harmony import */ var _toString_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./toString.js */ "./node_modules/ramda/es/toString.js"); /** * Determines whether a given string matches a given regular expression. * * @func * @memberOf R * @since v0.12.0 * @category String * @sig RegExp -> String -> Boolean * @param {RegExp} pattern * @param {String} str * @return {Boolean} * @see R.match * @example * * R.test(/^x/, 'xyz'); //=> true * R.test(/^y/, 'xyz'); //=> false */ var test = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__["default"])(function test(pattern, str) { if (!(0,_internal_isRegExp_js__WEBPACK_IMPORTED_MODULE_2__["default"])(pattern)) { throw new TypeError('‘test’ requires a value of type RegExp as its first argument; received ' + (0,_toString_js__WEBPACK_IMPORTED_MODULE_3__["default"])(pattern)); } return (0,_internal_cloneRegExp_js__WEBPACK_IMPORTED_MODULE_0__["default"])(pattern).test(str); }); /* harmony default export */ __webpack_exports__["default"] = (test); /***/ }), /***/ "./node_modules/ramda/es/thunkify.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/thunkify.js ***! \*******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _curryN_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./curryN.js */ "./node_modules/ramda/es/curryN.js"); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /** * Creates a thunk out of a function. A thunk delays a calculation until * its result is needed, providing lazy evaluation of arguments. * * @func * @memberOf R * @since v0.26.0 * @category Function * @sig ((a, b, ..., j) -> k) -> (a, b, ..., j) -> (() -> k) * @param {Function} fn A function to wrap in a thunk * @return {Function} Expects arguments for `fn` and returns a new function * that, when called, applies those arguments to `fn`. * @see R.partial, R.partialRight * @example * * R.thunkify(R.identity)(42)(); //=> 42 * R.thunkify((a, b) => a + b)(25, 17)(); //=> 42 */ var thunkify = /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_1__["default"])(function thunkify(fn) { return (0,_curryN_js__WEBPACK_IMPORTED_MODULE_0__["default"])(fn.length, function createThunk() { var fnArgs = arguments; return function invokeThunk() { return fn.apply(this, fnArgs); }; }); }); /* harmony default export */ __webpack_exports__["default"] = (thunkify); /***/ }), /***/ "./node_modules/ramda/es/times.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/times.js ***! \****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Calls an input function `n` times, returning an array containing the results * of those function calls. * * `fn` is passed one argument: The current value of `n`, which begins at `0` * and is gradually incremented to `n - 1`. * * @func * @memberOf R * @since v0.2.3 * @category List * @sig (Number -> a) -> Number -> [a] * @param {Function} fn The function to invoke. Passed one argument, the current value of `n`. * @param {Number} n A value between `0` and `n - 1`. Increments after each function call. * @return {Array} An array containing the return values of all calls to `fn`. * @see R.repeat * @example * * R.times(R.identity, 5); //=> [0, 1, 2, 3, 4] * @symb R.times(f, 0) = [] * @symb R.times(f, 1) = [f(0)] * @symb R.times(f, 2) = [f(0), f(1)] */ var times = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function times(fn, n) { var len = Number(n); var idx = 0; var list; if (len < 0 || isNaN(len)) { throw new RangeError('n must be a non-negative number'); } list = []; while (idx < len) { list.push(fn(idx)); idx += 1; } return list; }); /* harmony default export */ __webpack_exports__["default"] = (times); /***/ }), /***/ "./node_modules/ramda/es/toLower.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/toLower.js ***! \******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _invoker_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./invoker.js */ "./node_modules/ramda/es/invoker.js"); /** * The lower case version of a string. * * @func * @memberOf R * @since v0.9.0 * @category String * @sig String -> String * @param {String} str The string to lower case. * @return {String} The lower case version of `str`. * @see R.toUpper * @example * * R.toLower('XYZ'); //=> 'xyz' */ var toLower = /*#__PURE__*/ (0,_invoker_js__WEBPACK_IMPORTED_MODULE_0__["default"])(0, 'toLowerCase'); /* harmony default export */ __webpack_exports__["default"] = (toLower); /***/ }), /***/ "./node_modules/ramda/es/toPairs.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/toPairs.js ***! \******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _internal_has_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_has.js */ "./node_modules/ramda/es/internal/_has.js"); /** * Converts an object into an array of key, value arrays. Only the object's * own properties are used. * Note that the order of the output array is not guaranteed to be consistent * across different JS platforms. * * @func * @memberOf R * @since v0.4.0 * @category Object * @sig {String: *} -> [[String,*]] * @param {Object} obj The object to extract from * @return {Array} An array of key, value arrays from the object's own properties. * @see R.fromPairs, R.keys, R.values * @example * * R.toPairs({a: 1, b: 2, c: 3}); //=> [['a', 1], ['b', 2], ['c', 3]] */ var toPairs = /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function toPairs(obj) { var pairs = []; for (var prop in obj) { if ((0,_internal_has_js__WEBPACK_IMPORTED_MODULE_1__["default"])(prop, obj)) { pairs[pairs.length] = [prop, obj[prop]]; } } return pairs; }); /* harmony default export */ __webpack_exports__["default"] = (toPairs); /***/ }), /***/ "./node_modules/ramda/es/toPairsIn.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/toPairsIn.js ***! \********************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /** * Converts an object into an array of key, value arrays. The object's own * properties and prototype properties are used. Note that the order of the * output array is not guaranteed to be consistent across different JS * platforms. * * @func * @memberOf R * @since v0.4.0 * @category Object * @sig {String: *} -> [[String,*]] * @param {Object} obj The object to extract from * @return {Array} An array of key, value arrays from the object's own * and prototype properties. * @example * * const F = function() { this.x = 'X'; }; * F.prototype.y = 'Y'; * const f = new F(); * R.toPairsIn(f); //=> [['x','X'], ['y','Y']] */ var toPairsIn = /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function toPairsIn(obj) { var pairs = []; for (var prop in obj) { pairs[pairs.length] = [prop, obj[prop]]; } return pairs; }); /* harmony default export */ __webpack_exports__["default"] = (toPairsIn); /***/ }), /***/ "./node_modules/ramda/es/toString.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/toString.js ***! \*******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _internal_toString_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_toString.js */ "./node_modules/ramda/es/internal/_toString.js"); /** * Returns the string representation of the given value. `eval`'ing the output * should result in a value equivalent to the input value. Many of the built-in * `toString` methods do not satisfy this requirement. * * If the given value is an `[object Object]` with a `toString` method other * than `Object.prototype.toString`, this method is invoked with no arguments * to produce the return value. This means user-defined constructor functions * can provide a suitable `toString` method. For example: * * function Point(x, y) { * this.x = x; * this.y = y; * } * * Point.prototype.toString = function() { * return 'new Point(' + this.x + ', ' + this.y + ')'; * }; * * R.toString(new Point(1, 2)); //=> 'new Point(1, 2)' * * @func * @memberOf R * @since v0.14.0 * @category String * @sig * -> String * @param {*} val * @return {String} * @example * * R.toString(42); //=> '42' * R.toString('abc'); //=> '"abc"' * R.toString([1, 2, 3]); //=> '[1, 2, 3]' * R.toString({foo: 1, bar: 2, baz: 3}); //=> '{"bar": 2, "baz": 3, "foo": 1}' * R.toString(new Date('2001-02-03T04:05:06Z')); //=> 'new Date("2001-02-03T04:05:06.000Z")' */ var toString = /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function toString(val) { return (0,_internal_toString_js__WEBPACK_IMPORTED_MODULE_1__["default"])(val, []); }); /* harmony default export */ __webpack_exports__["default"] = (toString); /***/ }), /***/ "./node_modules/ramda/es/toUpper.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/toUpper.js ***! \******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _invoker_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./invoker.js */ "./node_modules/ramda/es/invoker.js"); /** * The upper case version of a string. * * @func * @memberOf R * @since v0.9.0 * @category String * @sig String -> String * @param {String} str The string to upper case. * @return {String} The upper case version of `str`. * @see R.toLower * @example * * R.toUpper('abc'); //=> 'ABC' */ var toUpper = /*#__PURE__*/ (0,_invoker_js__WEBPACK_IMPORTED_MODULE_0__["default"])(0, 'toUpperCase'); /* harmony default export */ __webpack_exports__["default"] = (toUpper); /***/ }), /***/ "./node_modules/ramda/es/transduce.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/transduce.js ***! \********************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_xReduce_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_xReduce.js */ "./node_modules/ramda/es/internal/_xReduce.js"); /* harmony import */ var _internal_xwrap_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_xwrap.js */ "./node_modules/ramda/es/internal/_xwrap.js"); /* harmony import */ var _curryN_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./curryN.js */ "./node_modules/ramda/es/curryN.js"); /** * Initializes a transducer using supplied iterator function. Returns a single * item by iterating through the list, successively calling the transformed * iterator function and passing it an accumulator value and the current value * from the array, and then passing the result to the next call. * * The iterator function receives two values: *(acc, value)*. It will be * wrapped as a transformer to initialize the transducer. A transformer can be * passed directly in place of an iterator function. In both cases, iteration * may be stopped early with the [`R.reduced`](#reduced) function. * * A transducer is a function that accepts a transformer and returns a * transformer and can be composed directly. * * A transformer is an object that provides a 2-arity reducing iterator * function, step, 0-arity initial value function, init, and 1-arity result * extraction function, result. The step function is used as the iterator * function in reduce. The result function is used to convert the final * accumulator into the return type and in most cases is * [`R.identity`](#identity). The init function can be used to provide an * initial accumulator, but is ignored by transduce. * * The iteration is performed with [`R.reduce`](#reduce) after initializing the transducer. * * @func * @memberOf R * @since v0.12.0 * @category List * @sig (c -> c) -> ((a, b) -> a) -> a -> [b] -> a * @param {Function} xf The transducer function. Receives a transformer and returns a transformer. * @param {Function} fn The iterator function. Receives two values, the accumulator and the * current element from the array. Wrapped as transformer, if necessary, and used to * initialize the transducer * @param {*} acc The initial accumulator value. * @param {Array} list The list to iterate over. * @return {*} The final, accumulated value. * @see R.reduce, R.reduced, R.into * @example * * const numbers = [1, 2, 3, 4]; * const transducer = R.compose(R.map(R.add(1)), R.take(2)); * R.transduce(transducer, R.flip(R.append), [], numbers); //=> [2, 3] * * const isOdd = (x) => x % 2 !== 0; * const firstOddTransducer = R.compose(R.filter(isOdd), R.take(1)); * R.transduce(firstOddTransducer, R.flip(R.append), [], R.range(0, 100)); //=> [1] */ var transduce = /*#__PURE__*/ (0,_curryN_js__WEBPACK_IMPORTED_MODULE_2__["default"])(4, function transduce(xf, fn, acc, list) { return (0,_internal_xReduce_js__WEBPACK_IMPORTED_MODULE_0__["default"])(xf(typeof fn === 'function' ? (0,_internal_xwrap_js__WEBPACK_IMPORTED_MODULE_1__["default"])(fn) : fn), acc, list); }); /* harmony default export */ __webpack_exports__["default"] = (transduce); /***/ }), /***/ "./node_modules/ramda/es/transpose.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/transpose.js ***! \********************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /** * Transposes the rows and columns of a 2D list. * When passed a list of `n` lists of length `x`, * returns a list of `x` lists of length `n`. * * * @func * @memberOf R * @since v0.19.0 * @category List * @sig [[a]] -> [[a]] * @param {Array} list A 2D list * @return {Array} A 2D list * @example * * R.transpose([[1, 'a'], [2, 'b'], [3, 'c']]) //=> [[1, 2, 3], ['a', 'b', 'c']] * R.transpose([[1, 2, 3], ['a', 'b', 'c']]) //=> [[1, 'a'], [2, 'b'], [3, 'c']] * * // If some of the rows are shorter than the following rows, their elements are skipped: * R.transpose([[10, 11], [20], [], [30, 31, 32]]) //=> [[10, 20, 30], [11, 31], [32]] * @symb R.transpose([[a], [b], [c]]) = [a, b, c] * @symb R.transpose([[a, b], [c, d]]) = [[a, c], [b, d]] * @symb R.transpose([[a, b], [c]]) = [[a, c], [b]] */ var transpose = /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function transpose(outerlist) { var i = 0; var result = []; while (i < outerlist.length) { var innerlist = outerlist[i]; var j = 0; while (j < innerlist.length) { if (typeof result[j] === 'undefined') { result[j] = []; } result[j].push(innerlist[j]); j += 1; } i += 1; } return result; }); /* harmony default export */ __webpack_exports__["default"] = (transpose); /***/ }), /***/ "./node_modules/ramda/es/traverse.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/traverse.js ***! \*******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _map_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./map.js */ "./node_modules/ramda/es/map.js"); /* harmony import */ var _sequence_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./sequence.js */ "./node_modules/ramda/es/sequence.js"); /** * Maps an [Applicative](https://github.com/fantasyland/fantasy-land#applicative)-returning * function over a [Traversable](https://github.com/fantasyland/fantasy-land#traversable), * then uses [`sequence`](#sequence) to transform the resulting Traversable of Applicative * into an Applicative of Traversable. * * Dispatches to the `traverse` method of the third argument, if present. * * @func * @memberOf R * @since v0.19.0 * @category List * @sig fantasy-land/of :: TypeRep f => f ~> a -> f a * @sig (Applicative f, Traversable t) => TypeRep f -> (a -> f b) -> t a -> f (t b) * @sig (Applicative f, Traversable t) => (b -> f b) -> (a -> f b) -> t a -> f (t b) * @param {Object|Function} TypeRepresentative with an `of` or `fantasy-land/of` method * @param {Function} f * @param {*} traversable * @return {*} * @see R.sequence * @example * * // Returns `Maybe.Nothing` if the given divisor is `0` * const safeDiv = n => d => d === 0 ? Maybe.Nothing() : Maybe.Just(n / d) * * R.traverse(Maybe.of, safeDiv(10), [2, 4, 5]); //=> Maybe.Just([5, 2.5, 2]) * R.traverse(Maybe.of, safeDiv(10), [2, 0, 5]); //=> Maybe.Nothing * * // Using a Type Representative * R.traverse(Maybe, safeDiv(10), Right(4)); //=> Just(Right(2.5)) * R.traverse(Maybe, safeDiv(10), Right(0)); //=> Nothing * R.traverse(Maybe, safeDiv(10), Left("X")); //=> Just(Left("X")) */ var traverse = /*#__PURE__*/ (0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function traverse(F, f, traversable) { var of = typeof F['fantasy-land/of'] === 'function' ? F['fantasy-land/of'] : typeof F.of === 'function' ? F.of : F; var TypeRep = { 'fantasy-land/of': of }; return typeof traversable['fantasy-land/traverse'] === 'function' ? traversable['fantasy-land/traverse'](TypeRep, f) : typeof traversable.traverse === 'function' ? traversable.traverse(TypeRep, f) : (0,_sequence_js__WEBPACK_IMPORTED_MODULE_2__["default"])(TypeRep, (0,_map_js__WEBPACK_IMPORTED_MODULE_1__["default"])(f, traversable)); }); /* harmony default export */ __webpack_exports__["default"] = (traverse); /***/ }), /***/ "./node_modules/ramda/es/trim.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/trim.js ***! \***************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); var ws = "\t\n\x0B\f\r \xA0\u1680\u2000\u2001\u2002\u2003" + "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" + "\u2029\uFEFF"; var zeroWidth = "\u200B"; var hasProtoTrim = typeof String.prototype.trim === 'function'; /** * Removes (strips) whitespace from both ends of the string. * * @func * @memberOf R * @since v0.6.0 * @category String * @sig String -> String * @param {String} str The string to trim. * @return {String} Trimmed version of `str`. * @example * * R.trim(' xyz '); //=> 'xyz' * R.map(R.trim, R.split(',', 'x, y, z')); //=> ['x', 'y', 'z'] */ var trim = !hasProtoTrim || /*#__PURE__*/ ws.trim() || ! /*#__PURE__*/ zeroWidth.trim() ? /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function trim(str) { var beginRx = new RegExp('^[' + ws + '][' + ws + ']*'); var endRx = new RegExp('[' + ws + '][' + ws + ']*$'); return str.replace(beginRx, '').replace(endRx, ''); }) : /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function trim(str) { return str.trim(); }); /* harmony default export */ __webpack_exports__["default"] = (trim); /***/ }), /***/ "./node_modules/ramda/es/tryCatch.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/tryCatch.js ***! \*******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_arity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_arity.js */ "./node_modules/ramda/es/internal/_arity.js"); /* harmony import */ var _internal_concat_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_concat.js */ "./node_modules/ramda/es/internal/_concat.js"); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /** * `tryCatch` takes two functions, a `tryer` and a `catcher`. The returned * function evaluates the `tryer`; if it does not throw, it simply returns the * result. If the `tryer` *does* throw, the returned function evaluates the * `catcher` function and returns its result. Note that for effective * composition with this function, both the `tryer` and `catcher` functions * must return the same type of results. * * @func * @memberOf R * @since v0.20.0 * @category Function * @sig (...x -> a) -> ((e, ...x) -> a) -> (...x -> a) * @param {Function} tryer The function that may throw. * @param {Function} catcher The function that will be evaluated if `tryer` throws. * @return {Function} A new function that will catch exceptions and send them to the catcher. * @example * * R.tryCatch(R.prop('x'), R.F)({x: true}); //=> true * R.tryCatch(() => { throw 'foo'}, R.always('caught'))('bar') // => * 'caught' * R.tryCatch(R.times(R.identity), R.always([]))('s') // => [] * R.tryCatch(() => { throw 'this is not a valid value'}, (err, value)=>({error : err, value }))('bar') // => {'error': 'this is not a valid value', 'value': 'bar'} */ var tryCatch = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_2__["default"])(function _tryCatch(tryer, catcher) { return (0,_internal_arity_js__WEBPACK_IMPORTED_MODULE_0__["default"])(tryer.length, function () { try { return tryer.apply(this, arguments); } catch (e) { return catcher.apply(this, (0,_internal_concat_js__WEBPACK_IMPORTED_MODULE_1__["default"])([e], arguments)); } }); }); /* harmony default export */ __webpack_exports__["default"] = (tryCatch); /***/ }), /***/ "./node_modules/ramda/es/type.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/type.js ***! \***************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /** * Gives a single-word string description of the (native) type of a value, * returning such answers as 'Object', 'Number', 'Array', or 'Null'. Does not * attempt to distinguish user Object types any further, reporting them all as * 'Object'. * * @func * @memberOf R * @since v0.8.0 * @category Type * @sig * -> String * @param {*} val The value to test * @return {String} * @example * * R.type({}); //=> "Object" * R.type(1); //=> "Number" * R.type(false); //=> "Boolean" * R.type('s'); //=> "String" * R.type(null); //=> "Null" * R.type([]); //=> "Array" * R.type(/[A-z]/); //=> "RegExp" * R.type(() => {}); //=> "Function" * R.type(undefined); //=> "Undefined" */ var type = /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function type(val) { return val === null ? 'Null' : val === undefined ? 'Undefined' : Object.prototype.toString.call(val).slice(8, -1); }); /* harmony default export */ __webpack_exports__["default"] = (type); /***/ }), /***/ "./node_modules/ramda/es/unapply.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/unapply.js ***! \******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /** * Takes a function `fn`, which takes a single array argument, and returns a * function which: * * - takes any number of positional arguments; * - passes these arguments to `fn` as an array; and * - returns the result. * * In other words, `R.unapply` derives a variadic function from a function which * takes an array. `R.unapply` is the inverse of [`R.apply`](#apply). * * @func * @memberOf R * @since v0.8.0 * @category Function * @sig ([*...] -> a) -> (*... -> a) * @param {Function} fn * @return {Function} * @see R.apply * @example * * R.unapply(JSON.stringify)(1, 2, 3); //=> '[1,2,3]' * @symb R.unapply(f)(a, b) = f([a, b]) */ var unapply = /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function unapply(fn) { return function () { return fn(Array.prototype.slice.call(arguments, 0)); }; }); /* harmony default export */ __webpack_exports__["default"] = (unapply); /***/ }), /***/ "./node_modules/ramda/es/unary.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/unary.js ***! \****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _nAry_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./nAry.js */ "./node_modules/ramda/es/nAry.js"); /** * Wraps a function of any arity (including nullary) in a function that accepts * exactly 1 parameter. Any extraneous parameters will not be passed to the * supplied function. * * @func * @memberOf R * @since v0.2.0 * @category Function * @sig (a -> b -> c -> ... -> z) -> (a -> z) * @param {Function} fn The function to wrap. * @return {Function} A new function wrapping `fn`. The new function is guaranteed to be of * arity 1. * @see R.binary, R.nAry * @example * * const takesTwoArgs = function(a, b) { * return [a, b]; * }; * takesTwoArgs.length; //=> 2 * takesTwoArgs(1, 2); //=> [1, 2] * * const takesOneArg = R.unary(takesTwoArgs); * takesOneArg.length; //=> 1 * // Only 1 argument is passed to the wrapped function * takesOneArg(1, 2); //=> [1, undefined] * @symb R.unary(f)(a, b, c) = f(a) */ var unary = /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function unary(fn) { return (0,_nAry_js__WEBPACK_IMPORTED_MODULE_1__["default"])(1, fn); }); /* harmony default export */ __webpack_exports__["default"] = (unary); /***/ }), /***/ "./node_modules/ramda/es/uncurryN.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/uncurryN.js ***! \*******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _curryN_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./curryN.js */ "./node_modules/ramda/es/curryN.js"); /** * Returns a function of arity `n` from a (manually) curried function. * Note that, the returned function is actually a ramda style * curryied function, which can accept one or more arguments in each * function calling. * * @func * @memberOf R * @since v0.14.0 * @category Function * @sig Number -> (a -> b -> c ... -> z) -> ((a -> b -> c ...) -> z) * @param {Number} length The arity for the returned function. * @param {Function} fn The function to uncurry. * @return {Function} A new function. * @see R.curry, R.curryN * @example * * const addFour = a => b => c => d => a + b + c + d; * * const uncurriedAddFour = R.uncurryN(4, addFour); * uncurriedAddFour(1, 2, 3, 4); //=> 10 */ var uncurryN = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function uncurryN(depth, fn) { return (0,_curryN_js__WEBPACK_IMPORTED_MODULE_1__["default"])(depth, function () { var currentDepth = 1; var value = fn; var idx = 0; var endIdx; while (currentDepth <= depth && typeof value === 'function') { endIdx = currentDepth === depth ? arguments.length : idx + value.length; value = value.apply(this, Array.prototype.slice.call(arguments, idx, endIdx)); currentDepth += 1; idx = endIdx; } return value; }); }); /* harmony default export */ __webpack_exports__["default"] = (uncurryN); /***/ }), /***/ "./node_modules/ramda/es/unfold.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/unfold.js ***! \*****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Builds a list from a seed value. Accepts an iterator function, which returns * either false to stop iteration or an array of length 2 containing the value * to add to the resulting list and the seed to be used in the next call to the * iterator function. * * The iterator function receives one argument: *(seed)*. * * @func * @memberOf R * @since v0.10.0 * @category List * @sig (a -> [b]) -> * -> [b] * @param {Function} fn The iterator function. receives one argument, `seed`, and returns * either false to quit iteration or an array of length two to proceed. The element * at index 0 of this array will be added to the resulting array, and the element * at index 1 will be passed to the next call to `fn`. * @param {*} seed The seed value. * @return {Array} The final list. * @example * * const f = n => n > 50 ? false : [-n, n + 10]; * R.unfold(f, 10); //=> [-10, -20, -30, -40, -50] * @symb R.unfold(f, x) = [f(x)[0], f(f(x)[1])[0], f(f(f(x)[1])[1])[0], ...] */ var unfold = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function unfold(fn, seed) { var pair = fn(seed); var result = []; while (pair && pair.length) { result[result.length] = pair[0]; pair = fn(pair[1]); } return result; }); /* harmony default export */ __webpack_exports__["default"] = (unfold); /***/ }), /***/ "./node_modules/ramda/es/union.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/union.js ***! \****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_concat_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_concat.js */ "./node_modules/ramda/es/internal/_concat.js"); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _compose_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./compose.js */ "./node_modules/ramda/es/compose.js"); /* harmony import */ var _uniq_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./uniq.js */ "./node_modules/ramda/es/uniq.js"); /** * Combines two lists into a set (i.e. no duplicates) composed of the elements * of each list. * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig [*] -> [*] -> [*] * @param {Array} as The first list. * @param {Array} bs The second list. * @return {Array} The first and second lists concatenated, with * duplicates removed. * @example * * R.union([1, 2, 3], [2, 3, 4]); //=> [1, 2, 3, 4] */ var union = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/ (0,_compose_js__WEBPACK_IMPORTED_MODULE_2__["default"])(_uniq_js__WEBPACK_IMPORTED_MODULE_3__["default"], _internal_concat_js__WEBPACK_IMPORTED_MODULE_0__["default"])); /* harmony default export */ __webpack_exports__["default"] = (union); /***/ }), /***/ "./node_modules/ramda/es/unionWith.js": /*!********************************************!*\ !*** ./node_modules/ramda/es/unionWith.js ***! \********************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_concat_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_concat.js */ "./node_modules/ramda/es/internal/_concat.js"); /* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _uniqWith_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./uniqWith.js */ "./node_modules/ramda/es/uniqWith.js"); /** * Combines two lists into a set (i.e. no duplicates) composed of the elements * of each list. Duplication is determined according to the value returned by * applying the supplied predicate to two list elements. If an element exists * in both lists, the first element from the first list will be used. * * @func * @memberOf R * @since v0.1.0 * @category Relation * @sig ((a, a) -> Boolean) -> [*] -> [*] -> [*] * @param {Function} pred A predicate used to test whether two items are equal. * @param {Array} list1 The first list. * @param {Array} list2 The second list. * @return {Array} The first and second lists concatenated, with * duplicates removed. * @see R.union * @example * * const l1 = [{a: 1}, {a: 2}]; * const l2 = [{a: 1}, {a: 4}]; * R.unionWith(R.eqBy(R.prop('a')), l1, l2); //=> [{a: 1}, {a: 2}, {a: 4}] */ var unionWith = /*#__PURE__*/ (0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_1__["default"])(function unionWith(pred, list1, list2) { return (0,_uniqWith_js__WEBPACK_IMPORTED_MODULE_2__["default"])(pred, (0,_internal_concat_js__WEBPACK_IMPORTED_MODULE_0__["default"])(list1, list2)); }); /* harmony default export */ __webpack_exports__["default"] = (unionWith); /***/ }), /***/ "./node_modules/ramda/es/uniq.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/uniq.js ***! \***************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./identity.js */ "./node_modules/ramda/es/identity.js"); /* harmony import */ var _uniqBy_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./uniqBy.js */ "./node_modules/ramda/es/uniqBy.js"); /** * Returns a new list containing only one copy of each element in the original * list. [`R.equals`](#equals) is used to determine equality. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig [a] -> [a] * @param {Array} list The array to consider. * @return {Array} The list of unique items. * @example * * R.uniq([1, 1, 2, 1]); //=> [1, 2] * R.uniq([1, '1']); //=> [1, '1'] * R.uniq([[42], [42]]); //=> [[42]] */ var uniq = /*#__PURE__*/ (0,_uniqBy_js__WEBPACK_IMPORTED_MODULE_1__["default"])(_identity_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (uniq); /***/ }), /***/ "./node_modules/ramda/es/uniqBy.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/uniqBy.js ***! \*****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_Set_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_Set.js */ "./node_modules/ramda/es/internal/_Set.js"); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_dispatchable.js */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_xuniqBy_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_xuniqBy.js */ "./node_modules/ramda/es/internal/_xuniqBy.js"); /** * Returns a new list containing only one copy of each element in the original * list, based upon the value returned by applying the supplied function to * each list element. Prefers the first item if the supplied function produces * the same value on two items. [`R.equals`](#equals) is used for comparison. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.16.0 * @category List * @sig (a -> b) -> [a] -> [a] * @param {Function} fn A function used to produce a value to use during comparisons. * @param {Array} list The array to consider. * @return {Array} The list of unique items. * @example * * R.uniqBy(Math.abs, [-1, -5, 2, 10, 1, 2]); //=> [-1, -5, 2, 10] */ var uniqBy = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_1__["default"])( /*#__PURE__*/ (0,_internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_2__["default"])([], _internal_xuniqBy_js__WEBPACK_IMPORTED_MODULE_3__["default"], function (fn, list) { var set = new _internal_Set_js__WEBPACK_IMPORTED_MODULE_0__["default"](); var result = []; var idx = 0; var appliedItem, item; while (idx < list.length) { item = list[idx]; appliedItem = fn(item); if (set.add(appliedItem)) { result.push(item); } idx += 1; } return result; })); /* harmony default export */ __webpack_exports__["default"] = (uniqBy); /***/ }), /***/ "./node_modules/ramda/es/uniqWith.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/uniqWith.js ***! \*******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_dispatchable.js */ "./node_modules/ramda/es/internal/_dispatchable.js"); /* harmony import */ var _internal_includesWith_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_includesWith.js */ "./node_modules/ramda/es/internal/_includesWith.js"); /* harmony import */ var _internal_xuniqWith_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_xuniqWith.js */ "./node_modules/ramda/es/internal/_xuniqWith.js"); /** * Returns a new list containing only one copy of each element in the original * list, based upon the value returned by applying the supplied predicate to * two list elements. Prefers the first item if two items compare equal based * on the predicate. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.2.0 * @category List * @sig ((a, a) -> Boolean) -> [a] -> [a] * @param {Function} pred A predicate used to test whether two items are equal. * @param {Array} list The array to consider. * @return {Array} The list of unique items. * @example * * const strEq = R.eqBy(String); * R.uniqWith(strEq)([1, '1', 2, 1]); //=> [1, 2] * R.uniqWith(strEq)([{}, {}]); //=> [{}] * R.uniqWith(strEq)([1, '1', 1]); //=> [1] * R.uniqWith(strEq)(['1', 1, 1]); //=> ['1'] */ var uniqWith = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])( /*#__PURE__*/ (0,_internal_dispatchable_js__WEBPACK_IMPORTED_MODULE_1__["default"])([], _internal_xuniqWith_js__WEBPACK_IMPORTED_MODULE_3__["default"], function (pred, list) { var idx = 0; var len = list.length; var result = []; var item; while (idx < len) { item = list[idx]; if (!(0,_internal_includesWith_js__WEBPACK_IMPORTED_MODULE_2__["default"])(pred, item, result)) { result[result.length] = item; } idx += 1; } return result; })); /* harmony default export */ __webpack_exports__["default"] = (uniqWith); /***/ }), /***/ "./node_modules/ramda/es/unless.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/unless.js ***! \*****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Tests the final argument by passing it to the given predicate function. If * the predicate is not satisfied, the function will return the result of * calling the `whenFalseFn` function with the same argument. If the predicate * is satisfied, the argument is returned as is. * * @func * @memberOf R * @since v0.18.0 * @category Logic * @sig (a -> Boolean) -> (a -> b) -> a -> a | b * @param {Function} pred A predicate function * @param {Function} whenFalseFn A function to invoke when the `pred` evaluates * to a falsy value. * @param {*} x An object to test with the `pred` function and * pass to `whenFalseFn` if necessary. * @return {*} Either `x` or the result of applying `x` to `whenFalseFn`. * @see R.ifElse, R.when, R.cond * @example * * let safeInc = R.unless(R.isNil, R.inc); * safeInc(null); //=> null * safeInc(1); //=> 2 */ var unless = /*#__PURE__*/ (0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function unless(pred, whenFalseFn, x) { return pred(x) ? x : whenFalseFn(x); }); /* harmony default export */ __webpack_exports__["default"] = (unless); /***/ }), /***/ "./node_modules/ramda/es/unnest.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/unnest.js ***! \*****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_identity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_identity.js */ "./node_modules/ramda/es/internal/_identity.js"); /* harmony import */ var _chain_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./chain.js */ "./node_modules/ramda/es/chain.js"); /** * Shorthand for `R.chain(R.identity)`, which removes one level of nesting from * any [Chain](https://github.com/fantasyland/fantasy-land#chain). * * @func * @memberOf R * @since v0.3.0 * @category List * @sig Chain c => c (c a) -> c a * @param {*} list * @return {*} * @see R.flatten, R.chain * @example * * R.unnest([1, [2], [[3]]]); //=> [1, 2, [3]] * R.unnest([[1, 2], [3, 4], [5, 6]]); //=> [1, 2, 3, 4, 5, 6] */ var unnest = /*#__PURE__*/ (0,_chain_js__WEBPACK_IMPORTED_MODULE_1__["default"])(_internal_identity_js__WEBPACK_IMPORTED_MODULE_0__["default"]); /* harmony default export */ __webpack_exports__["default"] = (unnest); /***/ }), /***/ "./node_modules/ramda/es/until.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/until.js ***! \****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Takes a predicate, a transformation function, and an initial value, * and returns a value of the same type as the initial value. * It does so by applying the transformation until the predicate is satisfied, * at which point it returns the satisfactory value. * * @func * @memberOf R * @since v0.20.0 * @category Logic * @sig (a -> Boolean) -> (a -> a) -> a -> a * @param {Function} pred A predicate function * @param {Function} fn The iterator function * @param {*} init Initial value * @return {*} Final value that satisfies predicate * @example * * R.until(R.gt(R.__, 100), R.multiply(2))(1) // => 128 */ var until = /*#__PURE__*/ (0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function until(pred, fn, init) { var val = init; while (!pred(val)) { val = fn(val); } return val; }); /* harmony default export */ __webpack_exports__["default"] = (until); /***/ }), /***/ "./node_modules/ramda/es/unwind.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/unwind.js ***! \*****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_isArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_isArray.js */ "./node_modules/ramda/es/internal/_isArray.js"); /* harmony import */ var _internal_map_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./internal/_map.js */ "./node_modules/ramda/es/internal/_map.js"); /* harmony import */ var _internal_assoc_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./internal/_assoc.js */ "./node_modules/ramda/es/internal/_assoc.js"); /** * * Deconstructs an array field from the input documents to output a document for each element. * Each output document is the input document with the value of the array field replaced by the element. * * @func * @memberOf R * @since v0.28.0 * @category Object * @sig String -> {k: [v]} -> [{k: v}] * @param {String} key The key to determine which property of the object should be unwind * @param {Object} object The object containing list under property named as key which is to unwind * @return {List} A new list of object containing the value of input key having list replaced by each element in the object. * @example * * R.unwind('hobbies', { * name: 'alice', * hobbies: ['Golf', 'Hacking'], * colors: ['red', 'green'], * }); * // [ * // { name: 'alice', hobbies: 'Golf', colors: ['red', 'green'] }, * // { name: 'alice', hobbies: 'Hacking', colors: ['red', 'green'] } * // ] */ var unwind = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function (key, object) { // If key is not in object or key is not as a list in object if (!(key in object && (0,_internal_isArray_js__WEBPACK_IMPORTED_MODULE_1__["default"])(object[key]))) { return [object]; } // Map over object[key] which is a list and assoc each element with key return (0,_internal_map_js__WEBPACK_IMPORTED_MODULE_2__["default"])(function (item) { return (0,_internal_assoc_js__WEBPACK_IMPORTED_MODULE_3__["default"])(key, item, object); }, object[key]); }); /* harmony default export */ __webpack_exports__["default"] = (unwind); /***/ }), /***/ "./node_modules/ramda/es/update.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/update.js ***! \*****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js"); /* harmony import */ var _adjust_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./adjust.js */ "./node_modules/ramda/es/adjust.js"); /* harmony import */ var _always_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./always.js */ "./node_modules/ramda/es/always.js"); /** * Returns a new copy of the array with the element at the provided index * replaced with the given value. * * @func * @memberOf R * @since v0.14.0 * @category List * @sig Number -> a -> [a] -> [a] * @param {Number} idx The index to update. * @param {*} x The value to exist at the given index of the returned array. * @param {Array|Arguments} list The source array-like object to be updated. * @return {Array} A copy of `list` with the value at index `idx` replaced with `x`. * @see R.adjust * @example * * R.update(1, '_', ['a', 'b', 'c']); //=> ['a', '_', 'c'] * R.update(-1, '_', ['a', 'b', 'c']); //=> ['a', 'b', '_'] * @symb R.update(-1, a, [b, c]) = [b, a] * @symb R.update(0, a, [b, c]) = [a, c] * @symb R.update(1, a, [b, c]) = [b, a] */ var update = /*#__PURE__*/ (0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function update(idx, x, list) { return (0,_adjust_js__WEBPACK_IMPORTED_MODULE_1__["default"])(idx, (0,_always_js__WEBPACK_IMPORTED_MODULE_2__["default"])(x), list); }); /* harmony default export */ __webpack_exports__["default"] = (update); /***/ }), /***/ "./node_modules/ramda/es/useWith.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/useWith.js ***! \******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _curryN_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./curryN.js */ "./node_modules/ramda/es/curryN.js"); /** * Accepts a function `fn` and a list of transformer functions and returns a * new curried function. When the new function is invoked, it calls the * function `fn` with parameters consisting of the result of calling each * supplied handler on successive arguments to the new function. * * If more arguments are passed to the returned function than transformer * functions, those arguments are passed directly to `fn` as additional * parameters. If you expect additional arguments that don't need to be * transformed, although you can ignore them, it's best to pass an identity * function so that the new function reports the correct arity. * * @func * @memberOf R * @since v0.1.0 * @category Function * @sig ((x1, x2, ...) -> z) -> [(a -> x1), (b -> x2), ...] -> (a -> b -> ... -> z) * @param {Function} fn The function to wrap. * @param {Array} transformers A list of transformer functions * @return {Function} The wrapped function. * @see R.converge * @example * * R.useWith(Math.pow, [R.identity, R.identity])(3, 4); //=> 81 * R.useWith(Math.pow, [R.identity, R.identity])(3)(4); //=> 81 * R.useWith(Math.pow, [R.dec, R.inc])(3, 4); //=> 32 * R.useWith(Math.pow, [R.dec, R.inc])(3)(4); //=> 32 * @symb R.useWith(f, [g, h])(a, b) = f(g(a), h(b)) */ var useWith = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function useWith(fn, transformers) { return (0,_curryN_js__WEBPACK_IMPORTED_MODULE_1__["default"])(transformers.length, function () { var args = []; var idx = 0; while (idx < transformers.length) { args.push(transformers[idx].call(this, arguments[idx])); idx += 1; } return fn.apply(this, args.concat(Array.prototype.slice.call(arguments, transformers.length))); }); }); /* harmony default export */ __webpack_exports__["default"] = (useWith); /***/ }), /***/ "./node_modules/ramda/es/values.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/values.js ***! \*****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /* harmony import */ var _keys_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./keys.js */ "./node_modules/ramda/es/keys.js"); /** * Returns a list of all the enumerable own properties of the supplied object. * Note that the order of the output array is not guaranteed across different * JS platforms. * * @func * @memberOf R * @since v0.1.0 * @category Object * @sig {k: v} -> [v] * @param {Object} obj The object to extract values from * @return {Array} An array of the values of the object's own properties. * @see R.valuesIn, R.keys, R.toPairs * @example * * R.values({a: 1, b: 2, c: 3}); //=> [1, 2, 3] */ var values = /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function values(obj) { var props = (0,_keys_js__WEBPACK_IMPORTED_MODULE_1__["default"])(obj); var len = props.length; var vals = []; var idx = 0; while (idx < len) { vals[idx] = obj[props[idx]]; idx += 1; } return vals; }); /* harmony default export */ __webpack_exports__["default"] = (values); /***/ }), /***/ "./node_modules/ramda/es/valuesIn.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/valuesIn.js ***! \*******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry1.js */ "./node_modules/ramda/es/internal/_curry1.js"); /** * Returns a list of all the properties, including prototype properties, of the * supplied object. * Note that the order of the output array is not guaranteed to be consistent * across different JS platforms. * * @func * @memberOf R * @since v0.2.0 * @category Object * @sig {k: v} -> [v] * @param {Object} obj The object to extract values from * @return {Array} An array of the values of the object's own and prototype properties. * @see R.values, R.keysIn * @example * * const F = function() { this.x = 'X'; }; * F.prototype.y = 'Y'; * const f = new F(); * R.valuesIn(f); //=> ['X', 'Y'] */ var valuesIn = /*#__PURE__*/ (0,_internal_curry1_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function valuesIn(obj) { var prop; var vs = []; for (prop in obj) { vs[vs.length] = obj[prop]; } return vs; }); /* harmony default export */ __webpack_exports__["default"] = (valuesIn); /***/ }), /***/ "./node_modules/ramda/es/view.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/view.js ***! \***************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); // `Const` is a functor that effectively ignores the function given to `map`. var Const = function Const(x) { return { value: x, 'fantasy-land/map': function fantasyLandMap() { return this; } }; }; /** * Returns a "view" of the given data structure, determined by the given lens. * The lens's focus determines which portion of the data structure is visible. * * @func * @memberOf R * @since v0.16.0 * @category Object * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s * @sig Lens s a -> s -> a * @param {Lens} lens * @param {*} x * @return {*} * @see R.set, R.over, R.lens, R.lensIndex, R.lensProp, R.lensPath * @example * * const xLens = R.lensProp('x'); * * R.view(xLens, {x: 1, y: 2}); //=> 1 * R.view(xLens, {x: 4, y: 2}); //=> 4 */ var view = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function view(lens, x) { // Using `Const` effectively ignores the setter function of the `lens`, // leaving the value returned by the getter function unmodified. return lens(Const)(x).value; }); /* harmony default export */ __webpack_exports__["default"] = (view); /***/ }), /***/ "./node_modules/ramda/es/when.js": /*!***************************************!*\ !*** ./node_modules/ramda/es/when.js ***! \***************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Tests the final argument by passing it to the given predicate function. If * the predicate is satisfied, the function will return the result of calling * the `whenTrueFn` function with the same argument. If the predicate is not * satisfied, the argument is returned as is. * * @func * @memberOf R * @since v0.18.0 * @category Logic * @sig (a -> Boolean) -> (a -> b) -> a -> a | b * @param {Function} pred A predicate function * @param {Function} whenTrueFn A function to invoke when the `condition` * evaluates to a truthy value. * @param {*} x An object to test with the `pred` function and * pass to `whenTrueFn` if necessary. * @return {*} Either `x` or the result of applying `x` to `whenTrueFn`. * @see R.ifElse, R.unless, R.cond * @example * * // truncate :: String -> String * const truncate = R.when( * R.propSatisfies(R.gt(R.__, 10), 'length'), * R.pipe(R.take(10), R.append('…'), R.join('')) * ); * truncate('12345'); //=> '12345' * truncate('0123456789ABC'); //=> '0123456789…' */ var when = /*#__PURE__*/ (0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function when(pred, whenTrueFn, x) { return pred(x) ? whenTrueFn(x) : x; }); /* harmony default export */ __webpack_exports__["default"] = (when); /***/ }), /***/ "./node_modules/ramda/es/where.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/where.js ***! \****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_has_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_has.js */ "./node_modules/ramda/es/internal/_has.js"); /** * Takes a spec object and a test object; returns true if the test satisfies * the spec. Each of the spec's own properties must be a predicate function. * Each predicate is applied to the value of the corresponding property of the * test object. `where` returns true if all the predicates return true, false * otherwise. * * `where` is well suited to declaratively expressing constraints for other * functions such as [`filter`](#filter) and [`find`](#find). * * @func * @memberOf R * @since v0.1.1 * @category Object * @sig {String: (* -> Boolean)} -> {String: *} -> Boolean * @param {Object} spec * @param {Object} testObj * @return {Boolean} * @see R.propSatisfies, R.whereEq * @example * * // pred :: Object -> Boolean * const pred = R.where({ * a: R.equals('foo'), * b: R.complement(R.equals('bar')), * x: R.gt(R.__, 10), * y: R.lt(R.__, 20) * }); * * pred({a: 'foo', b: 'xxx', x: 11, y: 19}); //=> true * pred({a: 'xxx', b: 'xxx', x: 11, y: 19}); //=> false * pred({a: 'foo', b: 'bar', x: 11, y: 19}); //=> false * pred({a: 'foo', b: 'xxx', x: 10, y: 19}); //=> false * pred({a: 'foo', b: 'xxx', x: 11, y: 20}); //=> false */ var where = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function where(spec, testObj) { for (var prop in spec) { if ((0,_internal_has_js__WEBPACK_IMPORTED_MODULE_1__["default"])(prop, spec) && !spec[prop](testObj[prop])) { return false; } } return true; }); /* harmony default export */ __webpack_exports__["default"] = (where); /***/ }), /***/ "./node_modules/ramda/es/whereAny.js": /*!*******************************************!*\ !*** ./node_modules/ramda/es/whereAny.js ***! \*******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_has_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_has.js */ "./node_modules/ramda/es/internal/_has.js"); /** * Takes a spec object and a test object; each of the spec's own properties must be a predicate function. * Each predicate is applied to the value of the corresponding property of the * test object. `whereAny` returns true if at least one of the predicates return true, * false otherwise. * * `whereAny` is well suited to declaratively expressing constraints for other * functions such as [`filter`](#filter) and [`find`](#find). * * @func * @memberOf R * @since v0.28.0 * @category Object * @sig {String: (* -> Boolean)} -> {String: *} -> Boolean * @param {Object} spec * @param {Object} testObj * @return {Boolean} * @see R.propSatisfies, R.where * @example * * // pred :: Object -> Boolean * const pred = R.whereAny({ * a: R.equals('foo'), * b: R.complement(R.equals('xxx')), * x: R.gt(R.__, 10), * y: R.lt(R.__, 20) * }); * * pred({a: 'foo', b: 'xxx', x: 8, y: 34}); //=> true * pred({a: 'xxx', b: 'xxx', x: 9, y: 21}); //=> false * pred({a: 'bar', b: 'xxx', x: 10, y: 20}); //=> false * pred({a: 'foo', b: 'bar', x: 10, y: 20}); //=> true * pred({a: 'foo', b: 'xxx', x: 11, y: 20}); //=> true */ var whereAny = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function whereAny(spec, testObj) { for (var prop in spec) { if ((0,_internal_has_js__WEBPACK_IMPORTED_MODULE_1__["default"])(prop, spec) && spec[prop](testObj[prop])) { return true; } } return false; }); /* harmony default export */ __webpack_exports__["default"] = (whereAny); /***/ }), /***/ "./node_modules/ramda/es/whereEq.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/whereEq.js ***! \******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _equals_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./equals.js */ "./node_modules/ramda/es/equals.js"); /* harmony import */ var _map_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./map.js */ "./node_modules/ramda/es/map.js"); /* harmony import */ var _where_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./where.js */ "./node_modules/ramda/es/where.js"); /** * Takes a spec object and a test object; returns true if the test satisfies * the spec, false otherwise. An object satisfies the spec if, for each of the * spec's own properties, accessing that property of the object gives the same * value (in [`R.equals`](#equals) terms) as accessing that property of the * spec. * * `whereEq` is a specialization of [`where`](#where). * * @func * @memberOf R * @since v0.14.0 * @category Object * @sig {String: *} -> {String: *} -> Boolean * @param {Object} spec * @param {Object} testObj * @return {Boolean} * @see R.propEq, R.where * @example * * // pred :: Object -> Boolean * const pred = R.whereEq({a: 1, b: 2}); * * pred({a: 1}); //=> false * pred({a: 1, b: 2}); //=> true * pred({a: 1, b: 2, c: 3}); //=> true * pred({a: 1, b: 1}); //=> false */ var whereEq = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function whereEq(spec, testObj) { return (0,_where_js__WEBPACK_IMPORTED_MODULE_3__["default"])((0,_map_js__WEBPACK_IMPORTED_MODULE_2__["default"])(_equals_js__WEBPACK_IMPORTED_MODULE_1__["default"], spec), testObj); }); /* harmony default export */ __webpack_exports__["default"] = (whereEq); /***/ }), /***/ "./node_modules/ramda/es/without.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/without.js ***! \******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /* harmony import */ var _internal_Set_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./internal/_Set.js */ "./node_modules/ramda/es/internal/_Set.js"); /* harmony import */ var _reject_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./reject.js */ "./node_modules/ramda/es/reject.js"); /** * Returns a new list without values in the first argument. * [`R.equals`](#equals) is used to determine equality. * * Acts as a transducer if a transformer is given in list position. * * @func * @memberOf R * @since v0.19.0 * @category List * @sig [a] -> [a] -> [a] * @param {Array} list1 The values to be removed from `list2`. * @param {Array} list2 The array to remove values from. * @return {Array} The new array without values in `list1`. * @see R.transduce, R.difference, R.remove * @example * * R.without([1, 2], [1, 2, 1, 3, 4]); //=> [3, 4] */ var without = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function without(xs, list) { var toRemove = new _internal_Set_js__WEBPACK_IMPORTED_MODULE_1__["default"](); for (var i = 0; i < xs.length; i += 1) { toRemove.add(xs[i]); } return (0,_reject_js__WEBPACK_IMPORTED_MODULE_2__["default"])(toRemove.has.bind(toRemove), list); }); /* harmony default export */ __webpack_exports__["default"] = (without); /***/ }), /***/ "./node_modules/ramda/es/xor.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/xor.js ***! \**************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Exclusive disjunction logical operation. * Returns `true` if one of the arguments is truthy and the other is falsy. * Otherwise, it returns `false`. * * @func * @memberOf R * @since v0.27.1 * @category Logic * @sig a -> b -> Boolean * @param {Any} a * @param {Any} b * @return {Boolean} true if one of the arguments is truthy and the other is falsy * @see R.or, R.and * @example * * R.xor(true, true); //=> false * R.xor(true, false); //=> true * R.xor(false, true); //=> true * R.xor(false, false); //=> false */ var xor = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function xor(a, b) { return Boolean(!a ^ !b); }); /* harmony default export */ __webpack_exports__["default"] = (xor); /***/ }), /***/ "./node_modules/ramda/es/xprod.js": /*!****************************************!*\ !*** ./node_modules/ramda/es/xprod.js ***! \****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Creates a new list out of the two supplied by creating each possible pair * from the lists. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig [a] -> [b] -> [[a,b]] * @param {Array} as The first list. * @param {Array} bs The second list. * @return {Array} The list made by combining each possible pair from * `as` and `bs` into pairs (`[a, b]`). * @example * * R.xprod([1, 2], ['a', 'b']); //=> [[1, 'a'], [1, 'b'], [2, 'a'], [2, 'b']] * @symb R.xprod([a, b], [c, d]) = [[a, c], [a, d], [b, c], [b, d]] */ var xprod = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function xprod(a, b) { // = xprodWith(prepend); (takes about 3 times as long...) var idx = 0; var ilen = a.length; var j; var jlen = b.length; var result = []; while (idx < ilen) { j = 0; while (j < jlen) { result[result.length] = [a[idx], b[j]]; j += 1; } idx += 1; } return result; }); /* harmony default export */ __webpack_exports__["default"] = (xprod); /***/ }), /***/ "./node_modules/ramda/es/zip.js": /*!**************************************!*\ !*** ./node_modules/ramda/es/zip.js ***! \**************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Creates a new list out of the two supplied by pairing up equally-positioned * items from both lists. The returned list is truncated to the length of the * shorter of the two input lists. * Note: `zip` is equivalent to `zipWith(function(a, b) { return [a, b] })`. * * @func * @memberOf R * @since v0.1.0 * @category List * @sig [a] -> [b] -> [[a,b]] * @param {Array} list1 The first array to consider. * @param {Array} list2 The second array to consider. * @return {Array} The list made by pairing up same-indexed elements of `list1` and `list2`. * @example * * R.zip([1, 2, 3], ['a', 'b', 'c']); //=> [[1, 'a'], [2, 'b'], [3, 'c']] * @symb R.zip([a, b, c], [d, e, f]) = [[a, d], [b, e], [c, f]] */ var zip = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function zip(a, b) { var rv = []; var idx = 0; var len = Math.min(a.length, b.length); while (idx < len) { rv[idx] = [a[idx], b[idx]]; idx += 1; } return rv; }); /* harmony default export */ __webpack_exports__["default"] = (zip); /***/ }), /***/ "./node_modules/ramda/es/zipObj.js": /*!*****************************************!*\ !*** ./node_modules/ramda/es/zipObj.js ***! \*****************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry2.js */ "./node_modules/ramda/es/internal/_curry2.js"); /** * Creates a new object out of a list of keys and a list of values. * Key/value pairing is truncated to the length of the shorter of the two lists. * Note: `zipObj` is equivalent to `pipe(zip, fromPairs)`. * * @func * @memberOf R * @since v0.3.0 * @category List * @sig [String] -> [*] -> {String: *} * @param {Array} keys The array that will be properties on the output object. * @param {Array} values The list of values on the output object. * @return {Object} The object made by pairing up same-indexed elements of `keys` and `values`. * @example * * R.zipObj(['a', 'b', 'c'], [1, 2, 3]); //=> {a: 1, b: 2, c: 3} */ var zipObj = /*#__PURE__*/ (0,_internal_curry2_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function zipObj(keys, values) { var idx = 0; var len = Math.min(keys.length, values.length); var out = {}; while (idx < len) { out[keys[idx]] = values[idx]; idx += 1; } return out; }); /* harmony default export */ __webpack_exports__["default"] = (zipObj); /***/ }), /***/ "./node_modules/ramda/es/zipWith.js": /*!******************************************!*\ !*** ./node_modules/ramda/es/zipWith.js ***! \******************************************/ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./internal/_curry3.js */ "./node_modules/ramda/es/internal/_curry3.js"); /** * Creates a new list out of the two supplied by applying the function to each * equally-positioned pair in the lists. The returned list is truncated to the * length of the shorter of the two input lists. * * @function * @memberOf R * @since v0.1.0 * @category List * @sig ((a, b) -> c) -> [a] -> [b] -> [c] * @param {Function} fn The function used to combine the two elements into one value. * @param {Array} list1 The first array to consider. * @param {Array} list2 The second array to consider. * @return {Array} The list made by combining same-indexed elements of `list1` and `list2` * using `fn`. * @example * * const f = (x, y) => { * // ... * }; * R.zipWith(f, [1, 2, 3], ['a', 'b', 'c']); * //=> [f(1, 'a'), f(2, 'b'), f(3, 'c')] * @symb R.zipWith(fn, [a, b, c], [d, e, f]) = [fn(a, d), fn(b, e), fn(c, f)] */ var zipWith = /*#__PURE__*/ (0,_internal_curry3_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function zipWith(fn, a, b) { var rv = []; var idx = 0; var len = Math.min(a.length, b.length); while (idx < len) { rv[idx] = fn(a[idx], b[idx]); idx += 1; } return rv; }); /* harmony default export */ __webpack_exports__["default"] = (zipWith); /***/ }) /******/ }); /************************************************************************/ /******/ // The module cache /******/ var __webpack_module_cache__ = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ var cachedModule = __webpack_module_cache__[moduleId]; /******/ if (cachedModule !== undefined) { /******/ return cachedModule.exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = __webpack_module_cache__[moduleId] = { /******/ id: moduleId, /******/ loaded: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.loaded = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /************************************************************************/ /******/ /* webpack/runtime/compat get default export */ /******/ !function() { /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function() { return module['default']; } : /******/ function() { return module; }; /******/ __webpack_require__.d(getter, { a: getter }); /******/ return getter; /******/ }; /******/ }(); /******/ /******/ /* webpack/runtime/define property getters */ /******/ !function() { /******/ // define getter functions for harmony exports /******/ __webpack_require__.d = function(exports, definition) { /******/ for(var key in definition) { /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); /******/ } /******/ } /******/ }; /******/ }(); /******/ /******/ /* webpack/runtime/global */ /******/ !function() { /******/ __webpack_require__.g = (function() { /******/ if (typeof globalThis === 'object') return globalThis; /******/ try { /******/ return this || new Function('return this')(); /******/ } catch (e) { /******/ if (typeof window === 'object') return window; /******/ } /******/ })(); /******/ }(); /******/ /******/ /* webpack/runtime/hasOwnProperty shorthand */ /******/ !function() { /******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } /******/ }(); /******/ /******/ /* webpack/runtime/make namespace object */ /******/ !function() { /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ }(); /******/ /******/ /* webpack/runtime/node module decorator */ /******/ !function() { /******/ __webpack_require__.nmd = function(module) { /******/ module.paths = []; /******/ if (!module.children) module.children = []; /******/ return module; /******/ }; /******/ }(); /******/ /******/ /* webpack/runtime/nonce */ /******/ !function() { /******/ __webpack_require__.nc = undefined; /******/ }(); /******/ /************************************************************************/ var __webpack_exports__ = {}; // This entry need to be wrapped in an IIFE because it need to be in strict mode. !function() { "use strict"; var __webpack_exports__ = {}; /*!********************************************!*\ !*** ./node_modules/whatwg-fetch/fetch.js ***! \********************************************/ __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ DOMException: function() { return /* binding */ DOMException; }, /* harmony export */ Headers: function() { return /* binding */ Headers; }, /* harmony export */ Request: function() { return /* binding */ Request; }, /* harmony export */ Response: function() { return /* binding */ Response; }, /* harmony export */ fetch: function() { return /* binding */ fetch; } /* harmony export */ }); var global = (typeof globalThis !== 'undefined' && globalThis) || (typeof self !== 'undefined' && self) || (typeof global !== 'undefined' && global) var support = { searchParams: 'URLSearchParams' in global, iterable: 'Symbol' in global && 'iterator' in Symbol, blob: 'FileReader' in global && 'Blob' in global && (function() { try { new Blob() return true } catch (e) { return false } })(), formData: 'FormData' in global, arrayBuffer: 'ArrayBuffer' in global } function isDataView(obj) { return obj && DataView.prototype.isPrototypeOf(obj) } if (support.arrayBuffer) { var viewClasses = [ '[object Int8Array]', '[object Uint8Array]', '[object Uint8ClampedArray]', '[object Int16Array]', '[object Uint16Array]', '[object Int32Array]', '[object Uint32Array]', '[object Float32Array]', '[object Float64Array]' ] var isArrayBufferView = ArrayBuffer.isView || function(obj) { return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1 } } function normalizeName(name) { if (typeof name !== 'string') { name = String(name) } if (/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(name) || name === '') { throw new TypeError('Invalid character in header field name: "' + name + '"') } return name.toLowerCase() } function normalizeValue(value) { if (typeof value !== 'string') { value = String(value) } return value } // Build a destructive iterator for the value list function iteratorFor(items) { var iterator = { next: function() { var value = items.shift() return {done: value === undefined, value: value} } } if (support.iterable) { iterator[Symbol.iterator] = function() { return iterator } } return iterator } function Headers(headers) { this.map = {} if (headers instanceof Headers) { headers.forEach(function(value, name) { this.append(name, value) }, this) } else if (Array.isArray(headers)) { headers.forEach(function(header) { this.append(header[0], header[1]) }, this) } else if (headers) { Object.getOwnPropertyNames(headers).forEach(function(name) { this.append(name, headers[name]) }, this) } } Headers.prototype.append = function(name, value) { name = normalizeName(name) value = normalizeValue(value) var oldValue = this.map[name] this.map[name] = oldValue ? oldValue + ', ' + value : value } Headers.prototype['delete'] = function(name) { delete this.map[normalizeName(name)] } Headers.prototype.get = function(name) { name = normalizeName(name) return this.has(name) ? this.map[name] : null } Headers.prototype.has = function(name) { return this.map.hasOwnProperty(normalizeName(name)) } Headers.prototype.set = function(name, value) { this.map[normalizeName(name)] = normalizeValue(value) } Headers.prototype.forEach = function(callback, thisArg) { for (var name in this.map) { if (this.map.hasOwnProperty(name)) { callback.call(thisArg, this.map[name], name, this) } } } Headers.prototype.keys = function() { var items = [] this.forEach(function(value, name) { items.push(name) }) return iteratorFor(items) } Headers.prototype.values = function() { var items = [] this.forEach(function(value) { items.push(value) }) return iteratorFor(items) } Headers.prototype.entries = function() { var items = [] this.forEach(function(value, name) { items.push([name, value]) }) return iteratorFor(items) } if (support.iterable) { Headers.prototype[Symbol.iterator] = Headers.prototype.entries } function consumed(body) { if (body.bodyUsed) { return Promise.reject(new TypeError('Already read')) } body.bodyUsed = true } function fileReaderReady(reader) { return new Promise(function(resolve, reject) { reader.onload = function() { resolve(reader.result) } reader.onerror = function() { reject(reader.error) } }) } function readBlobAsArrayBuffer(blob) { var reader = new FileReader() var promise = fileReaderReady(reader) reader.readAsArrayBuffer(blob) return promise } function readBlobAsText(blob) { var reader = new FileReader() var promise = fileReaderReady(reader) reader.readAsText(blob) return promise } function readArrayBufferAsText(buf) { var view = new Uint8Array(buf) var chars = new Array(view.length) for (var i = 0; i < view.length; i++) { chars[i] = String.fromCharCode(view[i]) } return chars.join('') } function bufferClone(buf) { if (buf.slice) { return buf.slice(0) } else { var view = new Uint8Array(buf.byteLength) view.set(new Uint8Array(buf)) return view.buffer } } function Body() { this.bodyUsed = false this._initBody = function(body) { /* fetch-mock wraps the Response object in an ES6 Proxy to provide useful test harness features such as flush. However, on ES5 browsers without fetch or Proxy support pollyfills must be used; the proxy-pollyfill is unable to proxy an attribute unless it exists on the object before the Proxy is created. This change ensures Response.bodyUsed exists on the instance, while maintaining the semantic of setting Request.bodyUsed in the constructor before _initBody is called. */ this.bodyUsed = this.bodyUsed this._bodyInit = body if (!body) { this._bodyText = '' } else if (typeof body === 'string') { this._bodyText = body } else if (support.blob && Blob.prototype.isPrototypeOf(body)) { this._bodyBlob = body } else if (support.formData && FormData.prototype.isPrototypeOf(body)) { this._bodyFormData = body } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) { this._bodyText = body.toString() } else if (support.arrayBuffer && support.blob && isDataView(body)) { this._bodyArrayBuffer = bufferClone(body.buffer) // IE 10-11 can't handle a DataView body. this._bodyInit = new Blob([this._bodyArrayBuffer]) } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) { this._bodyArrayBuffer = bufferClone(body) } else { this._bodyText = body = Object.prototype.toString.call(body) } if (!this.headers.get('content-type')) { if (typeof body === 'string') { this.headers.set('content-type', 'text/plain;charset=UTF-8') } else if (this._bodyBlob && this._bodyBlob.type) { this.headers.set('content-type', this._bodyBlob.type) } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) { this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8') } } } if (support.blob) { this.blob = function() { var rejected = consumed(this) if (rejected) { return rejected } if (this._bodyBlob) { return Promise.resolve(this._bodyBlob) } else if (this._bodyArrayBuffer) { return Promise.resolve(new Blob([this._bodyArrayBuffer])) } else if (this._bodyFormData) { throw new Error('could not read FormData body as blob') } else { return Promise.resolve(new Blob([this._bodyText])) } } this.arrayBuffer = function() { if (this._bodyArrayBuffer) { var isConsumed = consumed(this) if (isConsumed) { return isConsumed } if (ArrayBuffer.isView(this._bodyArrayBuffer)) { return Promise.resolve( this._bodyArrayBuffer.buffer.slice( this._bodyArrayBuffer.byteOffset, this._bodyArrayBuffer.byteOffset + this._bodyArrayBuffer.byteLength ) ) } else { return Promise.resolve(this._bodyArrayBuffer) } } else { return this.blob().then(readBlobAsArrayBuffer) } } } this.text = function() { var rejected = consumed(this) if (rejected) { return rejected } if (this._bodyBlob) { return readBlobAsText(this._bodyBlob) } else if (this._bodyArrayBuffer) { return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer)) } else if (this._bodyFormData) { throw new Error('could not read FormData body as text') } else { return Promise.resolve(this._bodyText) } } if (support.formData) { this.formData = function() { return this.text().then(decode) } } this.json = function() { return this.text().then(JSON.parse) } return this } // HTTP methods whose capitalization should be normalized var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT'] function normalizeMethod(method) { var upcased = method.toUpperCase() return methods.indexOf(upcased) > -1 ? upcased : method } function Request(input, options) { if (!(this instanceof Request)) { throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.') } options = options || {} var body = options.body if (input instanceof Request) { if (input.bodyUsed) { throw new TypeError('Already read') } this.url = input.url this.credentials = input.credentials if (!options.headers) { this.headers = new Headers(input.headers) } this.method = input.method this.mode = input.mode this.signal = input.signal if (!body && input._bodyInit != null) { body = input._bodyInit input.bodyUsed = true } } else { this.url = String(input) } this.credentials = options.credentials || this.credentials || 'same-origin' if (options.headers || !this.headers) { this.headers = new Headers(options.headers) } this.method = normalizeMethod(options.method || this.method || 'GET') this.mode = options.mode || this.mode || null this.signal = options.signal || this.signal this.referrer = null if ((this.method === 'GET' || this.method === 'HEAD') && body) { throw new TypeError('Body not allowed for GET or HEAD requests') } this._initBody(body) if (this.method === 'GET' || this.method === 'HEAD') { if (options.cache === 'no-store' || options.cache === 'no-cache') { // Search for a '_' parameter in the query string var reParamSearch = /([?&])_=[^&]*/ if (reParamSearch.test(this.url)) { // If it already exists then set the value with the current time this.url = this.url.replace(reParamSearch, '$1_=' + new Date().getTime()) } else { // Otherwise add a new '_' parameter to the end with the current time var reQueryString = /\?/ this.url += (reQueryString.test(this.url) ? '&' : '?') + '_=' + new Date().getTime() } } } } Request.prototype.clone = function() { return new Request(this, {body: this._bodyInit}) } function decode(body) { var form = new FormData() body .trim() .split('&') .forEach(function(bytes) { if (bytes) { var split = bytes.split('=') var name = split.shift().replace(/\+/g, ' ') var value = split.join('=').replace(/\+/g, ' ') form.append(decodeURIComponent(name), decodeURIComponent(value)) } }) return form } function parseHeaders(rawHeaders) { var headers = new Headers() // Replace instances of \r\n and \n followed by at least one space or horizontal tab with a space // https://tools.ietf.org/html/rfc7230#section-3.2 var preProcessedHeaders = rawHeaders.replace(/\r?\n[\t ]+/g, ' ') // Avoiding split via regex to work around a common IE11 bug with the core-js 3.6.0 regex polyfill // https://github.com/github/fetch/issues/748 // https://github.com/zloirock/core-js/issues/751 preProcessedHeaders .split('\r') .map(function(header) { return header.indexOf('\n') === 0 ? header.substr(1, header.length) : header }) .forEach(function(line) { var parts = line.split(':') var key = parts.shift().trim() if (key) { var value = parts.join(':').trim() headers.append(key, value) } }) return headers } Body.call(Request.prototype) function Response(bodyInit, options) { if (!(this instanceof Response)) { throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.') } if (!options) { options = {} } this.type = 'default' this.status = options.status === undefined ? 200 : options.status this.ok = this.status >= 200 && this.status < 300 this.statusText = options.statusText === undefined ? '' : '' + options.statusText this.headers = new Headers(options.headers) this.url = options.url || '' this._initBody(bodyInit) } Body.call(Response.prototype) Response.prototype.clone = function() { return new Response(this._bodyInit, { status: this.status, statusText: this.statusText, headers: new Headers(this.headers), url: this.url }) } Response.error = function() { var response = new Response(null, {status: 0, statusText: ''}) response.type = 'error' return response } var redirectStatuses = [301, 302, 303, 307, 308] Response.redirect = function(url, status) { if (redirectStatuses.indexOf(status) === -1) { throw new RangeError('Invalid status code') } return new Response(null, {status: status, headers: {location: url}}) } var DOMException = global.DOMException try { new DOMException() } catch (err) { DOMException = function(message, name) { this.message = message this.name = name var error = Error(message) this.stack = error.stack } DOMException.prototype = Object.create(Error.prototype) DOMException.prototype.constructor = DOMException } function fetch(input, init) { return new Promise(function(resolve, reject) { var request = new Request(input, init) if (request.signal && request.signal.aborted) { return reject(new DOMException('Aborted', 'AbortError')) } var xhr = new XMLHttpRequest() function abortXhr() { xhr.abort() } xhr.onload = function() { var options = { status: xhr.status, statusText: xhr.statusText, headers: parseHeaders(xhr.getAllResponseHeaders() || '') } options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL') var body = 'response' in xhr ? xhr.response : xhr.responseText setTimeout(function() { resolve(new Response(body, options)) }, 0) } xhr.onerror = function() { setTimeout(function() { reject(new TypeError('Network request failed')) }, 0) } xhr.ontimeout = function() { setTimeout(function() { reject(new TypeError('Network request failed')) }, 0) } xhr.onabort = function() { setTimeout(function() { reject(new DOMException('Aborted', 'AbortError')) }, 0) } function fixUrl(url) { try { return url === '' && global.location.href ? global.location.href : url } catch (e) { return url } } xhr.open(request.method, fixUrl(request.url), true) if (request.credentials === 'include') { xhr.withCredentials = true } else if (request.credentials === 'omit') { xhr.withCredentials = false } if ('responseType' in xhr) { if (support.blob) { xhr.responseType = 'blob' } else if ( support.arrayBuffer && request.headers.get('Content-Type') && request.headers.get('Content-Type').indexOf('application/octet-stream') !== -1 ) { xhr.responseType = 'arraybuffer' } } if (init && typeof init.headers === 'object' && !(init.headers instanceof Headers)) { Object.getOwnPropertyNames(init.headers).forEach(function(name) { xhr.setRequestHeader(name, normalizeValue(init.headers[name])) }) } else { request.headers.forEach(function(value, name) { xhr.setRequestHeader(name, value) }) } if (request.signal) { request.signal.addEventListener('abort', abortXhr) xhr.onreadystatechange = function() { // DONE (success or failure) if (xhr.readyState === 4) { request.signal.removeEventListener('abort', abortXhr) } } } xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit) }) } fetch.polyfill = true if (!global.fetch) { global.fetch = fetch global.Headers = Headers global.Request = Request global.Response = Response } }(); // This entry need to be wrapped in an IIFE because it need to be in strict mode. !function() { "use strict"; /*!**********************!*\ !*** ./src/index.js ***! \**********************/ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _DashRenderer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DashRenderer */ "./src/DashRenderer.js"); // make DashRenderer globally available window.DashRenderer = _DashRenderer__WEBPACK_IMPORTED_MODULE_0__.DashRenderer; }(); window.dash_renderer = __webpack_exports__; /******/ })() ; //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGFzaF9yZW5kZXJlci5kZXYuanMiLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O0FBQUEsZUFBZSxLQUFpRCxrQkFBa0IsbUJBQU8sQ0FBQyxvQkFBTyxHQUFHLENBQStLLENBQUMscUJBQXFCLG1CQUFtQixTQUFTLGNBQWMsNEJBQTRCLFlBQVkscUJBQXFCLDJEQUEyRCx1Q0FBdUMscUNBQXFDLG9CQUFvQixFQUFFLGlCQUFpQiw0RkFBNEYsZUFBZSx3Q0FBd0MsU0FBUyxFQUFFLG1CQUFtQiw4QkFBOEIscURBQXFELDBCQUEwQiw2Q0FBNkMsc0JBQXNCLDZEQUE2RCxZQUFZLGVBQWUsU0FBUyxpQkFBaUIsaUNBQWlDLGlCQUFpQixZQUFZLFVBQVUsc0JBQXNCLG1CQUFtQixpREFBaUQsaUJBQWlCLGdCQUFnQixZQUFZLGlCQUFpQixhQUFhLDBDQUEwQyxTQUFTLDZDQUE2QyxTQUFTLCtCQUErQixTQUFTLCtCQUErQixTQUFTLEdBQUcsV0FBVywwQkFBMEIsSUFBSSx3QkFBd0IsU0FBUyxpQkFBaUIseUNBQXlDLGNBQWMsa0JBQWtCLHVCQUF1QixrQ0FBa0MsbUJBQW1CLGNBQWMsc0JBQXNCLGNBQWMsdUJBQXVCLFVBQVUsSUFBSS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ICAgICAgICAgID8gJ2AnICsgc3BlYy5pZCArICdgJ1xuICAgICAgICAgICAgICAgICAgICAgICAgOiBKU09OLnN0cmluZ2lmeShzcGVjLmlkKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKGFueVZhbHMgPyAnIHdpdGggTUFUQ0ggdmFsdWVzICcgKyBhbnlWYWxzIDogJycpKSArXG4gICAgICAgICAgICAgICAgICAgICcgYW5kIHRoZSBwcm9wZXJ0eSBpcyBgJyArXG4gICAgICAgICAgICAgICAgICAgIHNwZWMucHJvcGVydHkgK1xuICAgICAgICAgICAgICAgICAgICAoaXNTdHJcbiAgICAgICAgICAgICAgICAgICAgICAgID8gJ2AuIFRoZSBzdHJpbmcgaWRzIGluIHRoZSBjdXJyZW50IGxheW91dCBhcmU6IFsnICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBrZXlzKHBhdGhzLnN0cnMpLmpvaW4oJywgJykgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICddJ1xuICAgICAgICAgICAgICAgICAgICAgICAgOiAnYC4gVGhlIHdpbGRjYXJkIGlkcyBjdXJyZW50bHkgYXZhaWxhYmxlIGFyZSBsb2dnZWQgYWJvdmUuJyk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICBtc2cgPVxuICAgICAgICAgICAgICAgICdNdWx0aXBsZSBvYmplY3RzIHdlcmUgZm91bmQgZm9yIGFuIGAnICtcbiAgICAgICAgICAgICAgICAgICAgZGVwVHlwZSArXG4gICAgICAgICAgICAgICAgICAgICdgIG9mIGEgY2FsbGJhY2sgdGhhdCBvbmx5IHRha2VzIG9uZSB2YWx1ZS4gVGhlIGlkIHNwZWMgaXMgJyArXG4gICAgICAgICAgICAgICAgICAgIEpTT04uc3RyaW5naWZ5KHNwZWMuaWQpICtcbiAgICAgICAgICAgICAgICAgICAgKGFueVZhbHMgPyAnIHdpdGggTUFUQ0ggdmFsdWVzICcgKyBhbnlWYWxzIDogJycpICtcb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sbGJhY2sgY29udGV4dFxuICAgICAgICBkYy5jYWxsYmFja19jb250ZXh0ID0ge307XG4gICAgICAgIGRjLmNhbGxiYWNrX2NvbnRleHQudHJpZ2dlcmVkID0gcGF5bG9hZC5jaGFuZ2VkUHJvcElkcy5tYXAocHJvcF9pZCA9PiAoe1xuICAgICAgICAgICAgcHJvcF9pZDogcHJvcF9pZCxcbiAgICAgICAgICAgIHZhbHVlOiBpbnB1dERpY3RbcHJvcF9pZF1cbiAgICAgICAgfSkpO1xuICAgICAgICBkYy5jYWxsYmFja19jb250ZXh0LmlucHV0c19saXN0ID0gaW5wdXRzO1xuICAgICAgICBkYy5jYWxsYmFja19jb250ZXh0LmlucHV0cyA9IGlucHV0RGljdDtcbiAgICAgICAgZGMuY2FsbGJhY2tfY29udGV4dC5zdGF0ZXNfbGlzdCA9IHN0YXRlO1xuICAgICAgICBkYy5jYWxsYmFja19jb250ZXh0LnN0YXRlcyA9IHN0YXRlRGljdDtcbiAgICAgICAgbGV0IHJldHVyblZhbHVlID0gZGNbbmFtZXNwYWNlXVtmdW5jdGlvbl9uYW1lXSguLi5hcmdzKTtcbiAgICAgICAgZGVsZXRlIGRjLmNhbGxiYWNrX2NvbnRleHQ7XG4gICAgICAgIGlmICh0eXBlb2YgcmV0dXJuVmFsdWU/LnRoZW4gPT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgICAgIHJldHVyblZhbHVlID0gYXdhaXQgcmV0dXJuVmFsdWU7XG4gICAgICAgIH1cbiAgICAgICAgemlwSWZBcnJheShvdXRwdXRzLCByZXR1cm5WYWx1ZSkuZm9yRWFjaCgoW291dGksIHJldGldKSA9PiB7XG4gICAgICAgICAgICB6aXBJZkFycmF5KG91dGksIHJldGkpLmZvckVhY2goKFtvdXRpaiwgcmV0aWpdKSA9PiB7XG4gICAgICAgICAgICAgICAgY29uc3QgeyBpZCwgcHJvcGVydHkgfSA9IG91dGlqO1xuICAgICAgICAgICAgICAgIGNvbnN0IGlkU3RyID0gc3RyaW5naWZ5SWQoaWQpO1xuICAgICAgICAgICAgICAgIGNvbnN0IGRhdGFGb3JJZCA9IChyZXN1bHRbaWRTdHJdID0gcmVzdWx0W2lkU3RyXSB8fCB7fSk7XG4gICAgICAgICAgICAgICAgaWYgKHJldGlqICE9PSBkYy5ub191cGRhdGUpIHtcbiAgICAgICAgICAgICAgICAgICAgZGF0YUZvcklkW2NsZWFuT3V0cHV0UHJvcChwcm9wZXJ0eSldID0gcmV0aWo7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0pO1xuICAgIH1cbiAgICBjYXRjaCAoZSkge1xuICAgICAgICBpZiAoZSA9PT0gZGMuUHJldmVudFVwZGF0ZSkge1xuICAgICAgICAgICAgc3RhdHVzID0gU1RBVFVTLlBSRVZFTlRfVVBEQVRFO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgc3RhdHVzID0gU1RBVFVTLkNMSUVOVFNJREVfRVJST1I7XG4gICAgICAgICAgICB0aHJvdyBlO1xuICAgICAgICB9XG4gICAgfVxuICAgIGZpbmFsbHkge1xuICAgICAgICBkZWxldGUgZGMuY2FsbGJhY2tfY29udGV4dDtcbiAgICAgICAgLy8gU2V0dGluZyBzZXJ2ZXIgPSBjbGllbnQgZm9yY2VzIG5ldHdvcmsgPSAwXG4gICAgICAgIGNvbnN0IHRvdGFsVGltZSA9IERhdGUubm93KCkgLSByZXF1ZXN0VGltZTtcbiAgICAgICAgY29uc3QgcmVzb3VyY2VzID0ge1xuICAgICAgICAgICAgX19kYXNoX3NlcnZlcjogdG90YWxUaW1lLFxuICAgICAgICAgICAgX19kYXNoX2NsaWVudDogdG90YWxUaW1lLFxuICAgICAgICAgICAgX19kYXNoX3VwbG9hZDogMCxcbiAgICAgICAgICAgIF9fZGFzaF9kb3dubG9hZDogMFxuICAgICAgICB9O1xuICAgICAgICBpZiAoY29uZmlnLnVpKSB7XG4gICAgICAgICAgICBkaXNwYXRjaCh1cGRhdGVSZXNvdXJjZVVzYWdlKHtcbiAgICAgICAgICAgICAgICBpZDogcGF5bG9hZC5vdXRwdXQsXG4gICAgICAgICAgICAgICAgdXNhZ2U6IHJlc291cmNlcyxcbiAgICAgICAgICAgICAgICBzdGF0dXMsXG4gICAgICAgICAgICAgICAgcmVzdWx0LFxuICAgICAgICAgICAgICAgIGlucHV0cyxcbiAgICAgICAgICAgICAgICBzdGF0ZVxuICAgICAgICAgICAgfSkpO1xuICAgICAgICB9XG4gICAgfVxuICAgIHJldHVybiByZXN1bHQ7XG59XG5mdW5jdGlvbiBzaWRlVXBkYXRlKG91dHB1dHMsIGRpc3BhdGNoLCBwYXRocykge1xuICAgIHRvUGFpcnMob3V0cHV0cykuZm9yRWFjaCgoW2lkLCB2YWx1ZV0pID0+IHtcbiAgICAgICAgY29uc3QgW2NvbXBvbmVudElkLCBwcm9wTmFtZV0gPSBpZC5zcGxpdCgnLicpO1xuICAgICAgICBjb25zdCBjb21wb25lbnRQYXRoID0gcGF0aHMuc3Ryc1tjb21wb25lbnRJZF07XG4gICAgICAgIGRpc3BhdGNoKHVwZGF0ZVByb3BzKHtcbiAgICAgICAgICAgIHByb3BzOiB7IFtwcm9wTmFtZV06IHZhbHVlIH0sXG4gICAgICAgICAgICBpdGVtcGF0aDogY29tcG9uZW50UGF0aFxuICAgICAgICB9KSk7XG4gICAgICAgIGRpc3BhdGNoKG5vdGlmeU9ic2VydmVycyh7IGlkOiBjb21wb25lbnRJZCwgcHJvcHM6IHsgW3Byb3BOYW1lXTogdmFsdWUgfSB9KSk7XG4gICAgfSk7XG59XG5mdW5jdGlvbiBoYW5kbGVTZXJ2ZXJzaWRlKGRpc3BhdGNoLCBob29rcywgY29uZmlnLCBwYXlsb2FkLCBwYXRocywgbG9uZywgYWRkaXRpb25hbEFyZ3MsIGdldFN0YXRlLCBvdXRwdXQpIHtcbiAgICBpZiAoaG9va3MucmVxdWVzdF9wcmUpIHtcbiAgICAgICAgaG9va3MucmVxdWVzdF9wcmUocGF5bG9hZCk7XG4gICAgfVxuICAgIGNvbnN0IHJlcXVlc3RUaW1lID0gRGF0ZS5ub3coKTtcbiAgICBjb25zdCBib2R5ID0gSlNPTi5zdHJpbmdpZnkocGF5bG9hZCk7XG4gICAgbGV0IGNhY2hlS2V5O1xuICAgIGxldCBqb2I7XG4gICAgbGV0IHJ1bm5pbmdPZmY7XG4gICAgbGV0IHByb2dyZXNzRGVmYXVsdDtcbiAgICBsZXQgbW9yZUFyZ3MgPSBhZGRpdGlvbmFsQXJncztcbiAgICBjb25zdCBmZXRjaENhbGxiYWNrID0gKCkgPT4ge1xuICAgICAgICBjb25zdCBoZWFkZXJzID0gZ2V0Q1NSRkhlYWRlcigpO1xuICAgICAgICBsZXQgdXJsID0gYCR7dXJsQmFzZShjb25maWcpfV9kYXNoLXVwZGF0ZS1jb21wb25lbnRgO1xuICAgICAgICBjb25zdCBhZGRBcmcgPSAobmFtZSwgdmFsdWUpID0+IHtcbiAgICAgICAgICAgIGxldCBkZWxpbSA9ICc/JztcbiAgICAgICAgICAgIGlmICh1cmwuaW5jbHVkZXMoJz8nKSkge1xuICAgICAgICAgICAgICAgIGRlbGltID0gJyYnO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdXJsID0gYCR7dXJsfSR7ZGVsaW19JHtuYW1lfT0ke3ZhbHVlfWA7XG4gICAgICAgIH07XG4gICAgICAgIGlmIChjYWNoZUtleSkge1xuICAgICAgICAgICAgYWRkQXJnKCdjYWNoZUtleScsIGNhY2hlS2V5KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAoam9iKSB7XG4gICAgICAgICAgICBhZGRBcmcoJ2pvYicsIGpvYik7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1vcmVBcmdzKSB7XG4gICAgICAgICAgICBtb3JlQXJncy5mb3JFYWNoKChba2V5LCB2YWx1ZV0pID0+IGFkZEFyZyhrZXksIHZhbHVlKSk7XG4gICAgICAgICAgICBtb3JlQXJncyA9IG1vcmVBcmdzLmZpbHRlcigoW18sIF9fLCBzaW5nbGVdKSA9PiAhc2luZ2xlKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gZmV0Y2godXJsLCBtZXJnZURlZXBSaWdodChjb25maWcuZmV0Y2gsIHtcbiAgICAgICAgICAgIG1ldGhvZDogJ1BPU1QnLFxuICAgICAgICAgICAgaGVhZGVycyxcbiAgICAgICAgICAgIGJvZHlcbiAgICAgICAgfSkpO1xuICAgIH07XG4gICAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0+IHtcbiAgICAgICAgY29uc3QgaGFuZGxlT3V0cHV0ID0gKHJlcykgPT4ge1xuICAgICAgICAgICAgY29uc3QgeyBzdGF0dXMgfSA9IHJlcztcbiAgICAgICAgICAgIGlmIChqb2IpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBjYWxsYmFja0pvYiA9IGdldFN0YXRlKCkuY2FsbGJhY2tKb2JzW2pvYl07XG4gICAgICAgICAgICAgICAgaWYgKGNhbGxiYWNrSm9iPy5vdXRkYXRlZCkge1xuICAgICAgICAgICAgICAgICAgICBkaXNwYXRjaChyZW1vdmVDYWxsYmFja0pvYih7IGpvYklkOiBqb2IgfSkpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVzb2x2ZSh7fSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gcmVjb3JkUHJvZmlsZShyZXN1bHQpIHtcbiAgICAgICAgICAgICAgICBpZiAoY29uZmlnLnVpKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIENhbGxiYWNrIHByb2ZpbGluZyAtIG9ubHkgcmVsZXZhbnQgaWYgd2UncmUgc2hvd2luZyB0aGUgZGVidWcgdWlcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcmVzb3VyY2VzID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgX19kYXNoX3NlcnZlcjogMCxcbiAgICAgICAgICAgICAgICAgICAgICAgIF9fZGFzaF9jbGllbnQ6IERhdGUubm93KCkgLSByZXF1ZXN0VGltZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIF9fZGFzaF91cGxvYWQ6IGJvZHkubGVuZ3RoLFxuICAgICAgICAgICAgICAgICAgICAgICAgX19kYXNoX2Rvd25sb2FkOiBOdW1iZXIocmVzLmhlYWRlcnMuZ2V0KCdDb250ZW50LUxlbmd0aCcpKVxuICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICBjb25zdCB0aW1pbmdIZWFkZXJzID0gcmVzLmhlYWRlcnMuZ2V0KCdTZXJ2ZXItVGltaW5nJykgfHwgJyc7XG4gICAgICAgICAgICAgICAgICAgIHRpbWluZ0hlYWRlcnMuc3BsaXQoJywnKS5mb3JFYWNoKChoZWFkZXIpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IG5hbWUgPSBoZWFkZXIuc3BsaXQoJzsnKVswXTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGR1ciA9IGhlYWRlci5tYXRjaCgvO2R1cj1bMC05Ll0rLyk7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoZHVyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzb3VyY2VzW25hbWVdID0gTnVtYmVyKGR1clswXS5zbGljZSg1KSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICBkaXNwYXRjaCh1cGRhdGVSZXNvdXJjZVVzYWdlKHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBwYXlsb2FkLm91dHB1dCxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVzYWdlOiByZXNvdXJjZXMsXG4gICAgICAgICAgICAgICAgICAgICAgICBzdGF0dXMsXG4gICAgICAgICAgICAgICAgICAgICAgICByZXN1bHQsXG4gICAgICAgICAgICAgICAgICAgICAgICBpbnB1dHM6IHBheWxvYWQuaW5wdXRzLFxuICAgICAgICAgICAgICAgICAgICAgICAgc3RhdGU6IHBheWxvYWQuc3RhdGVcbiAgICAgICAgICAgICAgICAgICAgfSkpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNvbnN0IGZpbmlzaExpbmUgPSAoZGF0YSkgPT4ge1xuICAgICAgICAgICAgICAgIGNvbnN0IHsgbXVsdGksIHJlc3BvbnNlIH0gPSBkYXRhO1xuICAgICAgICAgICAgICAgIGlmIChob29rcy5yZXF1ZXN0X3Bvc3QpIHtcbiAgICAgICAgICAgICAgICAgICAgaG9va3MucmVxdWVzdF9wb3N0KHBheWxvYWQsIHJlc3BvbnNlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgbGV0IHJlc3VsdDtcbiAgICAgICAgICAgICAgICBpZiAobXVsdGkpIHtcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0ID0gcmVzcG9uc2U7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCB7IG91dHB1dCB9ID0gcGF5bG9hZDtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgaWQgPSBvdXRwdXQuc3Vic3RyKDAsIG91dHB1dC5sYXN0SW5kZXhPZignLicpKTtcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0ID0geyBbaWRdOiByZXNwb25zZS5wcm9wcyB9O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZWNvcmRQcm9maWxlKHJlc3VsdCk7XG4gICAgICAgICAgICAgICAgcmVzb2x2ZShyZXN1bHQpO1xuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIGNvbnN0IGNvbXBsZXRlSm9iID0gKCkgPT4ge1xuICAgICAgICAgICAgICAgIGlmIChqb2IpIHtcbiAgICAgICAgICAgICAgICAgICAgZGlzcGF0Y2gocmVtb3ZlQ2FsbGJhY2tKb2IoeyBqb2JJZDogam9iIH0pKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHJ1bm5pbmdPZmYpIHtcbiAgICAgICAgICAgICAgICAgICAgc2lkZVVwZGF0ZShydW5uaW5nT2ZmLCBkaXNwYXRjaCwgcGF0aHMpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAocHJvZ3Jlc3NEZWZhdWx0KSB7XG4gICAgICAgICAgICAgICAgICAgIHNpZGVVcGRhdGUocHJvZ3Jlc3NEZWZhdWx0LCBkaXNwYXRjaCwgcGF0aHMpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICBpZiAoc3RhdHVzID09PSBTVEFUVVMuT0spIHtcbiAgICAgICAgICAgICAgICByZXMuanNvbigpLnRoZW4oKGRhdGEpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFjYWNoZUtleSAmJiBkYXRhLmNhY2hlS2V5KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjYWNoZUtleSA9IGRhdGEuY2FjaGVLZXk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKCFqb2IgJiYgZGF0YS5qb2IpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGpvYkluZm8gPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgam9iSWQ6IGRhdGEuam9iLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhY2hlS2V5OiBkYXRhLmNhY2hlS2V5LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhbmNlbElucHV0czogZGF0YS5jYW5jZWwsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJvZ3Jlc3NEZWZhdWx0OiBkYXRhLnByb2dyZXNzRGVmYXVsdCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvdXRwdXRcbiAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgICAgICBkaXNwYXRjaChhZGRDYWxsYmFja0pvYihqb2JJbmZvKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBqb2IgPSBkYXRhLmpvYjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAoZGF0YS5wcm9ncmVzcykge1xuICAgICAgICAgICAgICAgICAgICAgICAgc2lkZVVwZGF0ZShkYXRhLnByb2dyZXNzLCBkaXNwYXRjaCwgcGF0aHMpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmIChkYXRhLnJ1bm5pbmcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNpZGVVcGRhdGUoZGF0YS5ydW5uaW5nLCBkaXNwYXRjaCwgcGF0aHMpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmICghcnVubmluZ09mZiAmJiBkYXRhLnJ1bm5pbmdPZmYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJ1bm5pbmdPZmYgPSBkYXRhLnJ1bm5pbmdPZmY7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKCFwcm9ncmVzc0RlZmF1bHQgJiYgZGF0YS5wcm9ncmVzc0RlZmF1bHQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHByb2dyZXNzRGVmYXVsdCA9IGRhdGEucHJvZ3Jlc3NEZWZhdWx0O1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmICghbG9uZyB8fCBkYXRhLnJlc3BvbnNlICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbXBsZXRlSm9iKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBmaW5pc2hMaW5lKGRhdGEpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gUG9sbCBjaGFpbi5cbiAgICAgICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoaGFuZGxlLCBsb25nLmludGVydmFsICE9PSB1bmRlZmluZWQgPyBsb25nLmludGVydmFsIDogNTAwKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSBpZiAoc3RhdHVzID09PSBTVEFUVVMuUFJFVkVOVF9VUERBVEUpIHtcbiAgICAgICAgICAgICAgICBjb21wbGV0ZUpvYigpO1xuICAgICAgICAgICAgICAgIHJlY29yZFByb2ZpbGUoe30pO1xuICAgICAgICAgICAgICAgIHJlc29sdmUoe30pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgY29tcGxldGVKb2IoKTtcbiAgICAgICAgICAgICAgICByZWplY3QocmVzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcbiAgICAgICAgY29uc3QgaGFuZGxlRXJyb3IgPSAoKSA9PiB7XG4gICAgICAgICAgICBpZiAoY29uZmlnLnVpKSB7XG4gICAgICAgICAgICAgICAgZGlzcGF0Y2godXBkYXRlUmVzb3VyY2VVc2FnZSh7XG4gICAgICAgICAgICAgICAgICAgIGlkOiBwYXlsb2FkLm91dHB1dCxcbiAgICAgICAgICAgICAgICAgICAgc3RhdHVzOiBTVEFUVVMuTk9fUkVTUE9OU0UsXG4gICAgICAgICAgICAgICAgICAgIHJlc3VsdDoge30sXG4gICAgICAgICAgICAgICAgICAgIGlucHV0czogcGF5bG9hZC5pbnB1dHMsXG4gICAgICAgICAgICAgICAgICAgIHN0YXRlOiBwYXlsb2FkLnN0YXRlXG4gICAgICAgICAgICAgICAgfSkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVqZW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xuICAgICAgICBjb25zdCBvdXRwdXRzID0gW107XG4gICAgICAgIGNvbnN0IG91dHB1dEVycm9ycyA9IFtdO1xuICAgICAgICBhbGxPdXRwdXRzLmZvckVhY2goKG91dCwgaSkgPT4ge1xuICAgICAgICAgICAgY29uc3QgW291dGksIGVycmldID0gdW53cmFwSWZOb3RNdWx0aShwYXRocywgbWFwKHBpY2soWydpZCcsICdwcm9wZXJ0eSddKSwgb3V0KSwgY2IuY2FsbGJhY2sub3V0cHV0c1tpXSwgY2IuYW55VmFscywgJ091dHB1dCcpO1xuICAgICAgICAgICAgb3V0cHV0cy5wdXNoKG91dGkpO1xuICAgICAgICAgICAgaWYgKGVycmkpIHtcbiAgICAgICAgICAgICAgICBvdXRwdXRFcnJvcnMucHVzaChlcnJpKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICAgIGlmIChvdXRwdXRFcnJvcnMubGVuZ3RoKSB7XG4gICAgICAgICAgICBpZiAoZmxhdHRlbihpblZhbHMpLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgIHJlZkVycihvdXRwdXRFcnJvcnMsIHBhdGhzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8vIFRoaXMgY2FzZSBpcyBhbGwtZW1wdHkgbXVsdGl2YWx1ZWQgd2lsZGNhcmQgaW5wdXRzLFxuICAgICAgICAgICAgLy8gd2hpY2ggd2Ugd291bGQgbm9ybWFsbHkgZmlyZSB0aGUgY2FsbGJhY2sgZm9yLCBleGNlcHRcbiAgICAgICAgICAgIC8vIHNvbWUgb3V0cHV0cyBhcmUgbWlzc2luZy4gU28gaW5zdGVhZCB3ZSB0cmVhdCBpdCBsaWtlXG4gICAgICAgICAgICAvLyByZWd1bGFyIG1pc3NpbmcgaW5wdXRzIGFuZCBqdXN0IHNpbGVudGx5IHByZXZlbnQgaXQuXG4gICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgIC4uLmNiLFxuICAgICAgICAgICAgICAgIGV4ZWN1dGlvblByb21pc2U6IG51bGxcbiAgICAgICAgICAgIH07XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgX19leGVjdXRlID0gYXN5bmMgKCkgPT4ge1xuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICBjb25zdCBwYXlsb2FkID0ge1xuICAgICAgICAgICAgICAgICAgICBvdXRwdXQsXG4gICAgICAgICAgICAgICAgICAgIG91dHB1dHM6IGlzTXVsdGlPdXRwdXRQcm9wKG91dHB1dCkgPyBvdXRwdXRzIDogb3V0cHV0c1swXSxcbiAgICAgICAgICAgICAgICAgICAgaW5wdXRzOiBpblZhbHMsXG4gICAgICAgICAgICAgICAgICAgIGNoYW5nZWRQcm9wSWRzOiBrZXlzKGNiLmNoYW5nZWRQcm9wSWRzKSxcbiAgICAgICAgICAgICAgICAgICAgc3RhdGU6IGNiLmNhbGxiYWNrLnN0YXRlLmxlbmd0aFxuICAgICAgICAgICAgICAgICAgICAgICAgPyBmaWxsVmFscyhwYXRocywgbGF5b3V0LCBjYiwgc3RhdGUsICdTdGF0ZScpXG4gICAgICAgICAgICAgICAgICAgICAgICA6IHVuZGVmaW5lZFxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgaWYgKGNsaWVudHNpZGVfZnVuY3Rpb24pIHtcbiAgICAgICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGRhdGEgPSBhd2FpdCBoYW5kbGVDbGllbnRzaWRlKGRpc3BhdGNoLCBjbGllbnRzaWRlX2Z1bmN0aW9uLCBjb25maWcsIHBheWxvYWQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHsgZGF0YSwgcGF5bG9hZCB9O1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGNhdGNoIChlcnJvcikge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHsgZXJyb3IsIHBheWxvYWQgfTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBsZXQgbmV3Q29uZmlnID0gY29uZmlnO1xuICAgICAgICAgICAgICAgIGxldCBuZXdIZWFkZXJzID0gbnVsbDtcbiAgICAgICAgICAgICAgICBsZXQgbGFzdEVycm9yO1xuICAgICAgICAgICAgICAgIGNvbnN0IGFkZGl0aW9uYWxBcmdzID0gW107XG4gICAgICAgICAgICAgICAgdmFsdWVzKGdldFN0YXRlKCkuY2FsbGJhY2tKb2JzKS5mb3JFYWNoKChqb2IpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNiLmNhbGxiYWNrLm91dHB1dCA9PT0gam9iLm91dHB1dCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gVGVybWluYXRlIHRoZSBvbGQgam9icyB0aGF0IGFyZSBub3QgY29tcGxldGVkXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBzZXQgYXMgb3V0ZGF0ZWQgZm9yIHRoZSBjYWxsYmFjayBwcm9taXNlIHRvXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyByZXNvbHZlIGFuZCByZW1vdmUgYWZ0ZXIuXG4gICAgICAgICAgICAgICAgICAgICAgICBhZGRpdGlvbmFsQXJncy5wdXNoKFsnb2xkSm9iJywgam9iLmpvYklkLCB0cnVlXSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBkaXNwYXRjaChzZXRDYWxsYmFja0pvYk91dGRhdGVkKHsgam9iSWQ6IGpvYi5qb2JJZCB9KSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKCFqb2IuY2FuY2VsSW5wdXRzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgY29uc3QgaW50ZXIgPSBpbnRlcnNlY3Rpb24oam9iLmNhbmNlbElucHV0cywgY2IuY2FsbGJhY2suaW5wdXRzKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGludGVyLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYWRkaXRpb25hbEFyZ3MucHVzaChbJ2NhbmNlbEpvYicsIGpvYi5qb2JJZF0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGpvYi5wcm9ncmVzc0RlZmF1bHQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaWRlVXBkYXRlKGpvYi5wcm9ncmVzc0RlZmF1bHQsIGRpc3BhdGNoLCBwYXRocyk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICBmb3IgKGxldCByZXRyeSA9IDA7IHJldHJ5IDw9IE1BWF9BVVRIX1JFVFJJRVM7IHJldHJ5KyspIHtcbiAgICAgICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkYXRhID0gYXdhaXQgaGFuZGxlU2VydmVyc2lkZShkaXNwYXRjaCwgaG9va3MsIG5ld0NvbmZpZywgcGF5bG9hZCwgcGF0aHMsIGxvbmcsIGFkZGl0aW9uYWxBcmdzLmxlbmd0aCA/IGFkZGl0aW9uYWxBcmdzIDogdW5kZWZpbmVkLCBnZXRTdGF0ZSwgY2IuY2FsbGJhY2sub3V0cHV0KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChuZXdIZWFkZXJzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGlzcGF0Y2goYWRkSHR0cEhlYWRlcnMobmV3SGVhZGVycykpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gTGF5b3V0IG1heSBoYXZlIGNoYW5nZWQuXG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBjdXJyZW50TGF5b3V0ID0gZ2V0U3RhdGUoKS5sYXlvdXQ7XG4gICAgICAgICAgICAgICAgICAgICAgICBmbGF0dGVuKG91dHB1dHMpLmZvckVhY2goKG91dCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHByb3BOYW1lID0gY2xlYW5PdXRwdXRQcm9wKG91dC5wcm9wZXJ0eSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgb3V0cHV0UGF0aCA9IGdldFBhdGgocGF0aHMsIG91dC5pZCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgcHJldmlvdXNWYWx1ZSA9IHBhdGgob3V0cHV0UGF0aC5jb25jYXQoWydwcm9wcycsIHByb3BOYW1lXSksIGN1cnJlbnRMYXlvdXQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGRhdGFQYXRoID0gW3N0cmluZ2lmeUlkKG91dC5pZCksIHByb3BOYW1lXTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBvdXRwdXRWYWx1ZSA9IHBhdGgoZGF0YVBhdGgsIGRhdGEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpc1BhdGNoKG91dHB1dFZhbHVlKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocHJldmlvdXNWYWx1ZSA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0Nhbm5vdCBwYXRjaCB1bmRlZmluZWQnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhID0gYXNzb2NQYXRoKGRhdGFQYXRoLCBoYW5kbGVQYXRjaChwcmV2aW91c1ZhbHVlLCBvdXRwdXRWYWx1ZSksIGRhdGEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGR5bmFtaWNfY3JlYXRvcikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoKCkgPT4gZGlzcGF0Y2gocmVxdWVzdERlcGVuZGVuY2llcygpKSwgMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4geyBkYXRhLCBwYXlsb2FkIH07XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgY2F0Y2ggKHJlcykge1xuICAgICAgICAgICAgICAgICAgICAgICAgbGFzdEVycm9yID0gcmVzO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHJldHJ5IDw9IE1BWF9BVVRIX1JFVFJJRVMgJiZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAocmVzLnN0YXR1cyA9PT0gU1RBVFVTLlVOQVVUSE9SSVpFRCB8fFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXMuc3RhdHVzID09PSBTVEFUVVMuQkFEX1JFUVVFU1QpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgYm9keSA9IGF3YWl0IHJlcy50ZXh0KCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGJvZHkuaW5jbHVkZXMoSldUX0VYUElSRURfTUVTU0FHRSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGhvb2tzLnJlcXVlc3RfcmVmcmVzaF9qd3QgIT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBvbGRKd3QgPSBudWxsO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNvbmZpZy5mZXRjaC5oZWFkZXJzLkF1dGhvcml6YXRpb24pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbGRKd3QgPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWcuZmV0Y2guaGVhZGVycy5BdXRob3JpemF0aW9uLnN1YnN0cignQmVhcmVyICcubGVuZ3RoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IG5ld0p3dCA9IGF3YWl0IGhvb2tzLnJlcXVlc3RfcmVmcmVzaF9qd3Qob2xkSnd0KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChuZXdKd3QpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdIZWFkZXJzID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBdXRob3JpemF0aW9uOiBgQmVhcmVyICR7bmV3Snd0fWBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld0NvbmZpZyA9IG1lcmdlRGVlcFJpZ2h0KGNvbmZpZywge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmZXRjaDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyczogbmV3SGVhZGVyc1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAvLyB3ZSByZWFjaCBoZXJlIHdoZW4gd2UgcnVuIG91dCBvZiByZXRyaWVzLlxuICAgICAgICAgICAgICAgIHJldHVybiB7IGVycm9yOiBsYXN0RXJyb3IsIHBheWxvYWQ6IG51bGwgfTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhdGNoIChlcnJvcikge1xuICAgICAgICAgICAgICAgIHJldHVybiB7IGVycm9yLCBwYXlsb2FkOiBudWxsIH07XG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG4gICAgICAgIGNvbnN0IG5ld0NiID0ge1xuICAgICAgICAgICAgLi4uY2IsXG4gICAgICAgICAgICBleGVjdXRpb25Qcm9taXNlOiBfX2V4ZWN1dGUoKVxuICAgICAgICB9O1xuICAgICAgICByZXR1cm4gbmV3Q2I7XG4gICAgfVxuICAgIGNhdGNoIChlcnJvcikge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgLi4uY2IsXG4gICAgICAgICAgICBleGVjdXRpb25Qcm9taXNlOiB7IGVycm9yLCBwYXlsb2FkOiBudWxsIH1cbiAgICAgICAgfTtcbiAgICB9XG59XG4iLCJpbXBvcnQgeyBhbGwsIGFzc29jLCBjb25jYXQsIGRpZmZlcmVuY2UsIGZpbHRlciwgZmxhdHRlbiwgaXNFbXB0eSwga2V5cywgbWFwLCBtZXJnZVdpdGgsIHBhcnRpdGlvbiwgcGF0aCwgcGlja0J5LCBwcm9wcywgcmVkdWNlLCB6aXBPYmogfSBmcm9tICdyYW1kYSc7XG5pbXBvcnQgeyBhZGRBbGxSZXNvbHZlZEZyb21PdXRwdXRzLCBnZXRVbmZpbHRlcmVkTGF5b3V0Q2FsbGJhY2tzLCBpZE1hdGNoLCBpc011bHRpVmFsdWVkLCBzc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25zdCB7IHByb3BzIH0gPSBhcHBseVBlcnNpc3RlbmNlKHsgcHJvcHM6IHVwZGF0ZWRQcm9wcyB9LCBkaXNwYXRjaCk7XG4gICAgICAgICAgICBkaXNwYXRjaCh1cGRhdGVQcm9wcyh7XG4gICAgICAgICAgICAgICAgaXRlbXBhdGgsXG4gICAgICAgICAgICAgICAgcHJvcHMsXG4gICAgICAgICAgICAgICAgc291cmNlOiAncmVzcG9uc2UnXG4gICAgICAgICAgICB9KSk7XG4gICAgICAgICAgICByZXR1cm4gcHJvcHM7XG4gICAgICAgIH1cbiAgICAgICAgbGV0IHJlcXVlc3RlZENhbGxiYWNrcyA9IFtdO1xuICAgICAgICBjb25zdCBzdG9yZWRDYWxsYmFja3MgPSBbXTtcbiAgICAgICAgZXhlY3V0ZWQuZm9yRWFjaChjYiA9PiB7XG4gICAgICAgICAgICBjb25zdCBwcmVkZWNlc3NvcnMgPSBjb25jYXQoY2IucHJlZGVjZXNzb3JzID8/IFtdLCBbY2IuY2FsbGJhY2tdKTtcbiAgICAgICAgICAgIGNvbnN0IHsgY2FsbGJhY2s6IHsgY2xpZW50c2lkZV9mdW5jdGlvbiwgb3V0cHV0IH0sIGV4ZWN1dGlvblJlc3VsdCB9ID0gY2I7XG4gICAgICAgICAgICBpZiAoaXNOaWwoZXhlY3V0aW9uUmVzdWx0KSkge1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNvbnN0IHsgZGF0YSwgZXJyb3IsIHBheWxvYWQgfSA9IGV4ZWN1dGlvblJlc3VsdDtcbiAgICAgICAgICAgIGlmIChkYXRhICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgICBPYmplY3QuZW50cmllcyhkYXRhKS5mb3JFYWNoKChbaWQsIHByb3BzXSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBwYXJzZWRJZCA9IHBhcnNlSWZXaWxkY2FyZChpZCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHsgZ3JhcGhzLCBsYXlvdXQ6IG9sZExheW91dCwgcGF0aHM6IG9sZFBhdGhzIH0gPSBnZXRTdGF0ZSgpO1xuICAgICAgICAgICAgICAgICAgICAvLyBDb21wb25lbnRzIHdpbGwgdHJpZ2dlciBjYWxsYmFja3Mgb24gdGhlaXIgb3duIGFzIHJlcXVpcmVkIChlZy4gZGVyaXZlZClcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgYXBwbGllZFByb3BzID0gYXBwbHlQcm9wcyhwYXJzZWRJZCwgcHJvcHMpO1xuICAgICAgICAgICAgICAgICAgICAvLyBBZGQgY2FsbGJhY2tzIGZvciBtb2RpZmllZCBpbnB1dHNcbiAgICAgICAgICAgICAgICAgICAgcmVxdWVzdGVkQ2FsbGJhY2tzID0gY29uY2F0KHJlcXVlc3RlZENhbGxiYWNrcywgZmxhdHRlbihtYXAocHJvcCA9PiBnZXRDYWxsYmFja3NCeUlucHV0KGdyYXBocywgb2xkUGF0aHMsIHBhcnNlZElkLCBwcm9wLCB0cnVlKSwga2V5cyhwcm9wcykpKS5tYXAocmNiID0+ICh7XG4gICAgICAgICAgICAgICAgICAgICAgICAuLi5yY2IsXG4gICAgICAgICAgICAgICAgICAgICAgICBwcmVkZWNlc3NvcnNcbiAgICAgICAgICAgICAgICAgICAgfSkpKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgYmFzZVBhdGggPSBnZXRQYXRoKG9sZFBhdGhzLCBwYXJzZWRJZCk7XG4gICAgICAgICAgICAgICAgICAgIGlmICghYmFzZVBhdGgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBjb25zdCBvbGRPYmogPSBwYXRoKGJhc2VQYXRoLCBvbGRMYXlvdXQpO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBjaGlsZHJlblByb3BzID0gcGF0aE9yKCdkZWZhdWx0VmFsdWUnLCBbb2xkT2JqLm5hbWVzcGFjZSwgb2xkT2JqLnR5cGVdLCB3aW5kb3cuX19kYXNocHJpdmF0ZV9jaGlsZHJlblByb3BzKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgaGFuZGxlUGF0aHMgPSAoY2hpbGRyZW4sIG9sZENoaWxkcmVuLCBvbGRDaGlsZHJlblBhdGgsIGZpbHRlclJvb3QgPSBmYWxzZSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgb1BhdGhzID0gZ2V0U3RhdGUoKS5wYXRocztcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHBhdGhzID0gY29tcHV0ZVBhdGhzKGNoaWxkcmVuLCBvbGRDaGlsZHJlblBhdGgsIG9QYXRocyk7XG4gICAgICAgICAgICAgICAgICAgICAgICBkaXNwYXRjaChzZXRQYXRocyhwYXRocykpO1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gR2V0IGNhbGxiYWNrcyBmb3IgbmV3IGxheW91dCAody8gZXhlY3V0aW9uIGdyb3VwKVxuICAgICAgICAgICAgICAgICAgICAgICAgcmVxdWVzdGVkQ2FsbGJhY2tzID0gY29uY2F0KHJlcXVlc3RlZENhbGxiYWNrcywgZ2V0TGF5b3V0Q2FsbGJhY2tzKGdyYXBocywgcGF0aHMsIGNoaWxkcmVuLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2h1bmtQYXRoOiBvbGRDaGlsZHJlblBhdGgsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZmlsdGVyUm9vdFxuICAgICAgICAgICAgICAgICAgICAgICAgfSkubWFwKHJjYiA9PiAoe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC4uLnJjYixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcmVkZWNlc3NvcnNcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBXaWxkY2FyZCBjYWxsYmFja3Mgd2l0aCBhcnJheSBpbnB1dHMgKEFMTCAvIEFMTFNNQUxMRVIpIG5lZWQgdG8gdHJpZ2dlclxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gZXZlbiBkdWUgdG8gdGhlIGRlbGV0aW9uIG9mIGNvbXBvbmVudHNcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlcXVlc3RlZENhbGxiYWNrcyA9IGNvbmNhdChyZXF1ZXN0ZWRDYWxsYmFja3MsIGdldExheW91dENhbGxiYWNrcyhncmFwaHMsIG9sZFBhdGhzLCBvbGRDaGlsZHJlbiwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlbW92ZWRBcnJheUlucHV0c09ubHk6IHRydWUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3UGF0aHM6IHBhdGhzLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNodW5rUGF0aDogb2xkQ2hpbGRyZW5QYXRoLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpbHRlclJvb3RcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pLm1hcChyY2IgPT4gKHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAuLi5yY2IsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJlZGVjZXNzb3JzXG4gICAgICAgICAgICAgICAgICAgICAgICB9KSkpO1xuICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICBsZXQgcmVjb21wdXRlZCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICBbJ2NoaWxkcmVuJ11cbiAgICAgICAgICAgICAgICAgICAgICAgIC5jb25jYXQoY2hpbGRyZW5Qcm9wcylcbiAgICAgICAgICAgICAgICAgICAgICAgIC5mb3JFYWNoKGNoaWxkcmVuUHJvcCA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAocmVjb21wdXRlZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjaGlsZHJlblByb3AuaW5jbHVkZXMoJ1tdJykpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBbZnJvbnRQYXRoXSA9IGNoaWxkcmVuUHJvcFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuc3BsaXQoJ1tdJylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLm1hcChwID0+IHAuc3BsaXQoJy4nKS5maWx0ZXIoZSA9PiBlKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgZnJvbnRPYmogPSBwYXRoKGZyb250UGF0aCwgYXBwbGllZFByb3BzKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWZyb250T2JqKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQ3Jhd2wgbGF5b3V0IG5lZWRzIHRoZSBucy90eXBlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaGFuZGxlUGF0aHMoe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuLi5vbGRPYmosXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByb3BzOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuLi5vbGRPYmoucHJvcHMsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuLi5hcHBsaWVkUHJvcHNcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIG9sZE9iaiwgYmFzZVBhdGgsIGtleXMoYXBwbGllZFByb3BzKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gT25seSBkbyBpdCBvbmNlIGZvciB0aGUgY29tcG9uZW50LlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlY29tcHV0ZWQgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgY2hpbGRyZW5Qcm9wUGF0aCA9IGNoaWxkcmVuUHJvcC5zcGxpdCgnLicpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGNoaWxkcmVuID0gcGF0aChjaGlsZHJlblByb3BQYXRoLCBhcHBsaWVkUHJvcHMpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghY2hpbGRyZW4pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBvbGRDaGlsZHJlblBhdGggPSBjb25jYXQoZ2V0UGF0aChvbGRQYXRocywgcGFyc2VkSWQpLCBbJ3Byb3BzJ10uY29uY2F0KGNoaWxkcmVuUHJvcFBhdGgpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBvbGRDaGlsZHJlbiA9IHBhdGgob2xkQ2hpbGRyZW5QYXRoLCBvbGRMYXlvdXQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhhbmRsZVBhdGhzKGNoaWxkcmVuLCBvbGRDaGlsZHJlbiwgb2xkQ2hpbGRyZW5QYXRoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIC8vIHBlcnNpc3RlbmNlIGVkZ2UgY2FzZTogaWYgeW91IGV4cGxpY2l0bHkgdXBkYXRlIHRoZVxuICAgICAgICAgICAgICAgICAgICAvLyBwZXJzaXN0ZW5jZSBrZXksIG90aGVyIHByb3BzIG1heSBjaGFuZ2UgdGhhdCByZXF1aXJlIHVzXG4gICAgICAgICAgICAgICAgICAgIC8vIHRvIGZpcmUgYWRkaXRpb25hbCBjYWxsYmFja3NcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgYWRkZWRQcm9wcyA9IHBpY2tCeSgoXywgaykgPT4gIShrIGluIHByb3BzKSwgYXBwbGllZFByb3BzKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFpc0VtcHR5KGFkZGVkUHJvcHMpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCB7IGdyYXBoczogY3VycmVudEdyYXBocywgcGF0aHMgfSA9IGdldFN0YXRlKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXF1ZXN0ZWRDYWxsYmFja3MgPSBjb25jYXQocmVxdWVzdGVkQ2FsbGJhY2tzLCBpbmNsdWRlT2JzZXJ2ZXJzKGlkLCBhZGRlZFByb3BzLCBjdXJyZW50R3JhcGhzLCBwYXRocykubWFwKHJjYiA9PiAoe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC4uLnJjYixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcmVkZWNlc3NvcnNcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pKSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAvLyBBZGQgaW5mb3JtYXRpb24gYWJvdXQgcG90ZW50aWFsbHkgdXBkYXRlZCBvdXRwdXRzIHZzLiB1cGRhdGVkIG91dHB1dHMsXG4gICAgICAgICAgICAgICAgLy8gdGhpcyB3aWxsIGJlIHVzZWQgdG8gZHJvcCBjYWxsYmFja3MgZnJvbSBleGVjdXRpb24gZ3JvdXBzIHdoZW4gbm8gb3V0cHV0XG4gICAgICAgICAgICAgICAgLy8gbWF0Y2hpbmcgdGhlIGRvd25zdHJlYW0gY2FsbGJhY2sncyBpbnB1dHMgd2VyZSBtb2RpZmllZFxuICAgICAgICAgICAgICAgIHN0b3JlZENhbGxiYWNrcy5wdXNoKHtcbiAgICAgICAgICAgICAgICAgICAgLi4uY2IsXG4gICAgICAgICAgICAgICAgICAgIGV4ZWN1dGlvbk1ldGE6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGFsbFByb3BzOiBtYXAoY29tYmluZUlkQW5kUHJvcCwgZmxhdHRlbihjYi5nZXRPdXRwdXRzKGdldFN0YXRlKCkucGF0aHMpKSksXG4gICAgICAgICAgICAgICAgICAgICAgICB1cGRhdGVkUHJvcHM6IGZsYXR0ZW4obWFwKChbaWQsIHZhbHVlXSkgPT4gbWFwKHByb3BlcnR5ID0+IGNvbWJpbmVJZEFuZFByb3AoeyBpZCwgcHJvcGVydHkgfSksIGtleXModmFsdWUpKSwgdG9QYWlycyhkYXRhKSkpXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChlcnJvciAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgY29uc3Qgb3V0cHV0cyA9IHBheWxvYWRcbiAgICAgICAgICAgICAgICAgICAgPyBtYXAoY29tYmluZUlkQW5kUHJvcCwgZmxhdHRlbihbcGF5bG9hZC5vdXRwdXRzXSkpLmpvaW4oJywgJylcbiAgICAgICAgICAgICAgICAgICAgOiBvdXRwdXQ7XG4gICAgICAgICAgICAgICAgbGV0IG1lc3NhZ2UgPSBgQ2FsbGJhY2sgZXJyb3IgdXBkYXRpbmcgJHtvdXRwdXRzfWA7XG4gICAgICAgICAgICAgICAgaWYgKGNsaWVudHNpZGVfZnVuY3Rpb24pIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgeyBuYW1lc3BhY2U6IG5zLCBmdW5jdGlvbl9uYW1lOiBmbiB9ID0gY2xpZW50c2lkZV9mdW5jdGlvbjtcbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZSArPSBgIHZpYSBjbGllbnRzaWRlIGZ1bmN0aW9uICR7bnN9LiR7Zm59YDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaGFuZGxlQXN5bmNFcnJvcihlcnJvciwgbWVzc2FnZSwgZGlzcGF0Y2gpO1xuICAgICAgICAgICAgICAgIHN0b3JlZENhbGxiYWNrcy5wdXNoKHtcbiAgICAgICAgICAgICAgICAgICAgLi4uY2IsXG4gICAgICAgICAgICAgICAgICAgIGV4ZWN1dGlvbk1ldGE6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGFsbFByb3BzOiBtYXAoY29tYmluZUlkQW5kUHJvcCwgZmxhdHRlbihjYi5nZXRPdXRwdXRzKGdldFN0YXRlKCkucGF0aHMpKSksXG4gICAgICAgICAgICAgICAgICAgICAgICB1cGRhdGVkUHJvcHM6IFtdXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICAgIGRpc3BhdGNoKGFnZ3JlZ2F0ZUNhbGxiYWNrcyhbXG4gICAgICAgICAgICBleGVjdXRlZC5sZW5ndGggPyByZW1vdmVFeGVjdXRlZENhbGxiYWNrcyhleGVjdXRlZCkgOiBudWxsLFxuICAgICAgICAgICAgZXhlY3V0ZWQubGVuZ3RoID8gYWRkQ29tcGxldGVkQ2FsbGJhY2tzKGV4ZWN1dGVkLmxlbmd0aCkgOiBudWxsLFxuICAgICAgICAgICAgc3RvcmVkQ2FsbGJhY2tzLmxlbmd0aFxuICAgICAgICAgICAgICAgID8gYWRkU3RvcmVkQ2FsbGJhY2tzKHN0b3JlZENhbGxiYWNrcylcbiAgICAgICAgICAgICAgICA6IG51bGwsXG4gICAgICAgICAgICByZXF1ZXN0ZWRDYWxsYmFja3MubGVuZ3RoXG4gICAgICAgICAgICAgICAgPyBhZGRSZXF1ZXN0ZWRDYWxsYmFja3MocmVxdWVzdGVkQ2FsbGJhY2tzKVxuICAgICAgICAgIC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pcyBub2RlIGFuZCBuZXN0ZWQgbm9kZXMuXG4gICAgICAgICovXG4gICAgICAgIGNvbnN0IGxvYWRpbmdQYXRocyA9IGZsYXR0ZW4obWFwKGNiID0+IGNiLmdldE91dHB1dHMocGF0aHMpLCBbLi4uZXhlY3V0aW5nLCAuLi53YXRjaGVkLCAuLi5leGVjdXRlZF0pKTtcbiAgICAgICAgY29uc3QgbmV4dE1hcCA9IGlzRW1wdHkobG9hZGluZ1BhdGhzKVxuICAgICAgICAgICAgPyBudWxsXG4gICAgICAgICAgICA6IHJlZHVjZSgocmVzLCB7IGlkLCBwcm9wZXJ0eSwgcGF0aCB9KSA9PiB7XG4gICAgICAgICAgICAgICAgbGV0IHRhcmdldCA9IHJlcztcbiAgICAgICAgICAgICAgICBjb25zdCBpZHByb3AgPSB7IGlkLCBwcm9wZXJ0eSB9O1xuICAgICAgICAgICAgICAgIC8vIEFzc2lnbiBhbGwgYWZmZWN0ZWQgcHJvcHMgZm9yIHRoaXMgcGF0aCBhbmQgbmVzdGVkIHBhdGhzXG4gICAgICAgICAgICAgICAgdGFyZ2V0Ll9fZGFzaHByaXZhdGVfX2lkcHJvcHNfXyA9XG4gICAgICAgICAgICAgICAgICAgIHRhcmdldC5fX2Rhc2hwcml2YXRlX19pZHByb3BzX18gfHwgW107XG4gICAgICAgICAgICAgICAgdGFyZ2V0Ll9fZGFzaHByaXZhdGVfX2lkcHJvcHNfXy5wdXNoKGlkcHJvcCk7XG4gICAgICAgICAgICAgICAgcGF0aC5mb3JFYWNoKChwLCBpKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIHRhcmdldCA9IHRhcmdldFtwXSA9XG4gICAgICAgICAgICAgICAgICAgICAgICB0YXJnZXRbcF0gPz9cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAocCA9PT0gJ2NoaWxkcmVuJyAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlb2YgcGF0aFtpICsgMV0gPT09ICdudW1iZXInXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gW11cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiB7fSk7XG4gICAgICAgICAgICAgICAgICAgIHRhcmdldC5fX2Rhc2hwcml2YXRlX19pZHByb3BzX18gPVxuICAgICAgICAgICAgICAgICAgICAgICAgdGFyZ2V0Ll9fZGFzaHByaXZhdGVfX2lkcHJvcHNfXyB8fCBbXTtcbiAgICAgICAgICAgICAgICAgICAgdGFyZ2V0Ll9fZGFzaHByaXZhdGVfX2lkcHJvcHNfXy5wdXNoKGlkcHJvcCk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgLy8gQXNzaWduIG9uZSBhZmZlY3RlZCBwcm9wIGZvciB0aGlzIHBhdGhcbiAgICAgICAgICAgICAgICB0YXJnZXQuX19kYXNocHJpdmF0ZV9faWRwcm9wX18gPVxuICAgICAgICAgICAgICAgICAgICB0YXJnZXQuX19kYXNocHJpdmF0ZV9faWRwcm9wX18gfHwgaWRwcm9wO1xuICAgICAgICAgICAgICAgIHJldHVybiByZXM7XG4gICAgICAgICAgICB9LCB7fSwgbG9hZGluZ1BhdGhzKTtcbiAgICAgICAgaWYgKCFlcXVhbHMobmV4dE1hcCwgbG9hZGluZ01hcCkpIHtcbiAgICAgICAgICAgIGRpc3BhdGNoKHNldExvYWRpbmdNYXAobmV4dE1hcCkpO1xuICAgICAgICB9XG4gICAgfSxcbiAgICBpbnB1dHM6IFsnY2FsbGJhY2tzLmV4ZWN1dGluZycsICdjYWxsYmFja3Mud2F0Y2hlZCcsICdjYWxsYmFja3MuZXhlY3V0ZWQnXVxufTtcbmV4cG9ydCBkZWZhdWx0IG9ic2VydmVyO1xuIiwiaW1wb3J0IHsgZmluZCwgZmxhdHRlbiwgbWFwLCBwYXJ0aXRpb24sIHBsdWNrLCBzb3J0LCB1bmlxIH0gZnJvbSAncmFtZGEnO1xuaW1wb3J0IHsgYWRkQmxvY2tlZENhbGxiYWNrcywgYW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XAgPT4ge1xuICAgICAgICAgICAgaWYgKGdyb3VwLmxlbmd0aCA9PT0gMSkge1xuICAgICAgICAgICAgICAgIC8vIGtlZXAgY2FsbGJhY2sgaWYgaXRzIHRoZSBvbmx5IG9uZSBvZiBpdHMga2luZFxuICAgICAgICAgICAgICAgIHJNZXJnZWREdXBsaWNhdGVzLnB1c2goZ3JvdXBbMF0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgY29uc3QgaW5pdGlhbCA9IGdyb3VwLmZpbmQoY2IgPT4gY2IuaW5pdGlhbENhbGwpO1xuICAgICAgICAgICAgICAgIGlmIChpbml0aWFsKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIGRyb3AgdGhlIGluaXRpYWwgY2FsbGJhY2sgaWYgaXQncyBub3QgYWxvbmVcbiAgICAgICAgICAgICAgICAgICAgckR1cGxpY2F0ZXMucHVzaChpbml0aWFsKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY29uc3QgZ3JvdXBXaXRob3V0SW5pdGlhbCA9IGdyb3VwLmZpbHRlcihjYiA9PiBjYiAhPT0gaW5pdGlhbCk7XG4gICAgICAgICAgICAgICAgaWYgKGdyb3VwV2l0aG91dEluaXRpYWwubGVuZ3RoID09PSAxKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIGlmIHRoZXJlJ3Mgb25seSBvbmUgY2FsbGJhY2sgYmVzaWRlIHRoZSBpbml0aWFsIG9uZSwga2VlcCB0aGF0IGNhbGxiYWNrXG4gICAgICAgICAgICAgICAgICAgIHJNZXJnZWREdXBsaWNhdGVzLnB1c2goZ3JvdXBXaXRob3V0SW5pdGlhbFswXSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAvLyBvdGhlcndpc2UgbWVyZ2UgYWxsIHJlbWFpbmluZyBjYWxsYmFja3MgdG9nZXRoZXJcbiAgICAgICAgICAgICAgICAgICAgckR1cGxpY2F0ZXMgPSBjb25jYXQockR1cGxpY2F0ZXMsIGdyb3VwV2l0aG91dEluaXRpYWwpO1xuICAgICAgICAgICAgICAgICAgICByTWVyZ2VkRHVwbGljYXRlcy5wdXNoKG1lcmdlTGVmdCh7XG4gICAgICAgICAgICAgICAgICAgICAgICBjaGFuZ2VkUHJvcElkczogcmVkdWNlKG1lcmdlV2l0aChNYXRoLm1heCksIHt9LCBwbHVjaygnY2hhbmdlZFByb3BJZHMnLCBncm91cFdpdGhvdXRJbml0aWFsKSksXG4gICAgICAgICAgICAgICAgICAgICAgICBleGVjdXRpb25Hcm91cDogZmlsdGVyKGV4ZyA9PiBCb29sZWFuKGV4ZyksIHBsdWNrKCdleGVjdXRpb25Hcm91cCcsIGdyb3VwV2l0aG91dEluaXRpYWwpKS5zbGljZSgtMSlbMF1cbiAgICAgICAgICAgICAgICAgICAgfSwgZ3JvdXBXaXRob3V0SW5pdGlhbC5zbGljZSgtMSlbMF0pKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgICAgICAvKlxuICAgICAgICAgICAgVE9ETz9cbiAgICAgICAgICAgIENsZWFuIHVwIHRoZSBgcmVxdWVzdGVkYCBsaXN0IC0gZHVyaW5nIHRoZSBkaXNwYXRjaCBwaGFzZSxcbiAgICAgICAgICAgIGR1cGxpY2F0ZXMgd2lsbCBiZSByZW1vdmVkIGZvciByZWFsXG4gICAgICAgICovXG4gICAgICAgIHJlcXVlc3RlZCA9IHJNZXJnZWREdXBsaWNhdGVzO1xuICAgICAgICAvKlxuICAgICAgICAgICAgMi4gUmVtb3ZlIGR1cGxpY2F0ZWQgYHByaW9yaXRpemVkYCwgYGV4ZWN1dGluZ2AgYW5kIGB3YXRjaGluZ2AgY2FsbGJhY2tzXG4gICAgICAgICovXG4gICAgICAgIC8qXG4gICAgICAgICAgICBFeHRyYWN0IGFsbCBidXQgdGhlIGZpcnN0IGN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dpZnlJZChpZHByb3BzLmlkKVxuICAgICAgICB9O1xuICAgIH1cbiAgICByZXR1cm4gTlVMTF9MT0FESU5HX1NUQVRFO1xufVxuZXhwb3J0IGNvbnN0IGdldExvYWRpbmdIYXNoID0gKGNvbXBvbmVudFBhdGgsIGxvYWRpbmdNYXApID0+ICgobG9hZGluZ01hcCAmJlxuICAgIHBhdGgoY29tcG9uZW50UGF0aCwgbG9hZGluZ01hcClcbiAgICAgICAgPy5fX2Rhc2hwcml2YXRlX19pZHByb3BzX18pID8/XG4gICAgW10pXG4gICAgLm1hcCgoeyBpZCwgcHJvcGVydHkgfSkgPT4gYCR7aWR9LiR7cHJvcGVydHl9YClcbiAgICAuam9pbignLCcpO1xuZXhwb3J0IGZ1bmN0aW9uIHZhbGlkYXRlQ29tcG9uZW50KGNvbXBvbmVudERlZmluaXRpb24pIHtcbiAgICBpZiAodHlwZShjb21wb25lbnREZWZpbml0aW9uKSA9PT0gJ0FycmF5Jykge1xuICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ1RoZSBjaGlsZHJlbiBwcm9wZXJ0eSBvZiBhIGNvbXBvbmVudCBpcyBhIGxpc3Qgb2YgbGlzdHMsIGluc3RlYWQgJyArXG4gICAgICAgICAgICAnb2YganVzdCBhIGxpc3QuICcgK1xuICAgICAgICAgICAgJ0NoZWNrIHRoZSBjb21wb25lbnQgdGhhdCBoYXMgdGhlIGZvbGxvd2luZyBjb250ZW50cywgJyArXG4gICAgICAgICAgICAnYW5kIHJlbW92ZSBvbmUgb2YgdGhlIGxldmVscyBvZiBuZXN0aW5nOiBcXG4nICtcbiAgICAgICAgICAgIEpTT04uc3RyaW5naWZ5KGNvbXBvbmVudERlZmluaXRpb24sIG51bGwsIDIpKTtcbiAgICB9XG4gICAgaWYgKHR5cGUoY29tcG9uZW50RGVmaW5pdGlvbikgPT09ICdPYmplY3QnICYmXG4gICAgICAgICEoaGFzKCduYW1lc3BhY2UnLCBjb21wb25lbnREZWZpbml0aW9uKSAmJ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AgIFtdLFxuICAgICAgICAgICAgICAgICAgICAgICAgbG9hZGluZ01hcFxuICAgICAgICAgICAgICAgICAgICApfVxuICAgICAgICAgICAgICAgICAgICBfZGFzaHByaXZhdGVfbG9hZGluZ1N0YXRlSGFzaD17Z2V0TG9hZGluZ0hhc2goXG4gICAgICAgICAgICAgICAgICAgICAgICBbXSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxvYWRpbmdNYXBcbiAgICAgICAgICAgICAgICAgICAgKX1cbiAgICAgICAgICAgICAgICAgICAgX2Rhc2hwcml2YXRlX3BhdGg9e0pTT04uc3RyaW5naWZ5KFtdKX1cbiAgICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgPC9EYXNoQ29udGV4dC5Qcm92aWRlcj5cbiAgICAgICAgKTtcbiAgICB9IGVsc2Uge1xuICAgICAgICBjb250ZW50ID0gPGRpdiBjbGFzc05hbWU9J19kYXNoLWxvYWRpbmcnPkxvYWRpbmcuLi48L2Rpdj47XG4gICAgfVxuXG4gICAgcmV0dXJuIGNvbmZpZyAmJiBjb25maWcudWkgPT09IHRydWUgPyAoXG4gICAgICAgIDxHbG9iYWxFcnJvckNvbnRhaW5lcj57Y29udGVudH08L0dsb2JhbEVycm9yQ29udGFpbmVyPlxuICAgICkgOiAoXG4gICAgICAgIGNvbnRlbnRcbiAgICApO1xufTtcblxuZnVuY3Rpb24gc3RvcmVFZmZlY3QocHJvcHMsIGV2ZW50cywgc2V0RXJyb3JMb2FkaW5nKSB7XG4gICAgY29uc3Qge1xuICAgICAgICBhcHBMaWZlY3ljbGUsXG4gICAgICAgIGRlcGVuZGVuY2llc1JlcXVlc3QsXG4gICAgICAgIGRpc3BhdGNoLFxuICAgICAgICBlcnJvcixcbiAgICAgICAgZ3JhcGhzLFxuICAgICAgICBob29rcyxcbiAgICAgICAgbGF5b3V0LFxuICAgICAgICBsYXlvdXRSZXF1ZXN0XG4gICAgfSA9IHByb3BzO1xuXG4gICAgYmF0Y2goKCkgPT4ge1xuICAgICAgICBpZiAoaXNFbXB0eShsYXlvdXRSZXF1ZXN0KSkge1xuICAgICAgICAgICAgaWYgKHR5cGVvZiBob29rcy5sYXlvdXRfcHJlID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICAgICAgaG9va3MubGF5b3V0X3ByZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZGlzcGF0Y2goYXBpVGh1bmsoJ19kYXNoLWxheW91dCcsICdHRVQnLCAnbGF5b3V0UmVxdWVzdCcpKTtcbiAgICAgICAgfSBlbHNlIGlmIChsYXlvdXRSZXF1ZXN0LnN0YXR1cyA9PT0gU1RBVFVTLk9LKSB7XG4gICAgICAgICAgICBpZiAoaXNFbXB0eShsYXlvdXQpKSB7XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBob29rcy5sYXlvdXRfcG9zdCA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICAgICAgICAgICAgICBob29rcy5sYXlvdXRfcG9zdChsYXlvdXRSZXF1ZXN0LmNvbnRlbnQpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjb25zdCBmaW5hbExheW91dCA9IGFwcGx5UGVyc2lzdGVuY2UoXG4gICAgICAgICAgICAgICAgICAgIGxheW91dFJlcXVlc3QuY29udGVudCxcbiAgICAgICAgICAgICAgICAgICAgZGlzcGF0Y2hcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIGRpc3BhdGNoKFxuICAgICAgICAgICAgICAgICAgICBzZXRQYXRocyhcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbXB1dGVQYXRocyhmaW5hbExheW91dCwgW10sIG51bGwsIGV2ZW50cy5jdXJyZW50KVxuICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICBkaXNwYXRjaChzZXRMYXlvdXQoZmluYWxMYXlvdXQpKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChpc0VtcHR5KGRlcGVuZGVuY2llc1JlcXVlc3QpKSB7XG4gICAgICAgICAgICBkaXNwYXRjaChcbiAgICAgICAgICAgICAgICBhcGlUaHVuaygnX2Rhc2gtZGVwZW5kZW5jaWVzJywgJ0dFVCcsICdkZXBlbmRlbmNpZXNSZXF1ZXN0JylcbiAgICAgICAgICAgICk7XG4gICAgICAgIH0gZWxzZSBpZiAoXG4gICAgICAgICAgICBkZXBlbmRlbmNpZXNSZXF1ZXN0LnN0YXR1cyA9PT0gU1RBVFVTLk9LICYmXG4gICAgICAgICAgICBpc0VtcHR5KGdyYXBocylcbiAgICAgICAgKSB7XG4gICAgICAgICAgICBkaXNwYXRjaChcbiAgICAgICAgICAgICAgICBzZXRHcmFwaHMoXG4gICAgICAgICAgICAgICAgICAgIGNvbXB1dGVHcmFwaHMoXG4gICAgICAgICAgICAgICAgICAgICAgICBkZXBlbmRlbmNpZXNSZXF1ZXN0LmNvbnRlbnQsXG4gICAgICAgICAgICAgICAgICAgICAgICBkaXNwYXRjaEVycm9yKGRpc3BhdGNoKVxuICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChcbiAgICAgICAgICAgIC8vIGRlcGVuZGVuY2llc1JlcXVlc3QgYW5kIGl0cyBjb21wdXRlZCBzdG9yZXNcbiAgICAgICAgICAgIGRlcGVuZGVuY2llc1JlcXVlc3Quc3RhdHVzID09PSBTVEFUVVMuT0sgJiZcbiAgICAgICAgICAgICFpc0VtcHR5KGdyYXBocykgJiZcbiAgICAgICAgICAgIC8vIExheW91dFJlcXVlc3QgYW5kIGl0cyBjb21wdXRlZCBzdG9yZXNcbiAgICAgICAgICAgIGxheW91dFJlcXVlc3Quc3RhdHVzID09PSBTVEFUVVMuT0sgJiZcbiAgICAgICAgICAgICFpc0VtcHR5KGxheW91dCkgJiZcbiAgICAgICAgICAgIC8vIEhhc24ndCBhbHJ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4gICAgICAgICAgICBwcm9wcy5ob29rcy5yZXF1ZXN0X3Bvc3QgIT09IG51bGwgfHxcbiAgICAgICAgICAgIHByb3BzLmhvb2tzLmNhbGxiYWNrX3Jlc29sdmVkICE9PSBudWxsIHx8XG4gICAgICAgICAgICBwcm9wcy5ob29rcy5yZXF1ZXN0X3JlZnJlc2hfand0ICE9PSBudWxsXG4gICAgICAgICkge1xuICAgICAgICAgICAgbGV0IGhvb2tzID0gcHJvcHMuaG9va3M7XG5cbiAgICAgICAgICAgIGlmIChob29rcy5yZXF1ZXN0X3JlZnJlc2hfand0KSB7XG4gICAgICAgICAgICAgICAgaG9va3MgPSB7XG4gICAgICAgICAgICAgICAgICAgIC4uLmhvb2tzLFxuICAgICAgICAgICAgICAgICAgICByZXF1ZXN0X3JlZnJlc2hfand0OiBtZW1vaXplV2l0aChcbiAgICAgICAgICAgICAgICAgICAgICAgIGlkZW50aXR5LFxuICAgICAgICAgICAgICAgICAgICAgICAgaG9va3MucmVxdWVzdF9yZWZyZXNoX2p3dFxuICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgcHJvcHMuZGlzcGF0Y2goc2V0SG9va3MoaG9va3MpKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIFVOU0FGRV9jb21wb25lbnRXaWxsTW91bnQoKSB7XG4gICAgICAgIGNvbnN0IHtkaXNwYXRjaH0gPSB0aGlzLnByb3BzO1xuICAgICAgICBjb25zdCBjb25maWcgPSBnZXRDb25maWdGcm9tRE9NKCk7XG5cbiAgICAgICAgLy8gcHJlc2V0IGNvbW1vbiByZXF1ZXN0IHBhcmFtcyBpbiB0aGUgY29uZmlnXG4gICAgICAgIGNvbmZpZy5mZXRjaCA9IHtcbiAgICAgICAgICAgIGNyZWRlbnRpYWxzOiAnc2FtZS1vcmlnaW4nLFxuICAgICAgICAgICAgaGVhZGVyczoge1xuICAgICAgICAgICAgICAgIEFjY2VwdDogJ2FwcGxpY2F0aW9uL2pzb24nLFxuICAgICAgICAgICAgICAgICdDb250ZW50LVR5cGUnOiAnYXBwbGljYXRpb24vanNvbidcbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcblxuICAgICAgICBkaXNwYXRjaChzZXRDb25maWcoY29uZmlnKSk7XG4gICAgfVxuXG4gICAgcmVuZGVyKCkge1xuICAgICAgICBjb25zdCB7Y29uZmlnfSA9IHRoaXMucHJvcHM7XG4gICAgICAgIGlmICh0eXBlKGNvbmZpZykgPT09ICdOdWxsJykge1xuICAgICAgICAgICAgcmV0dXJuIDxkaXYgY2xhc3NOYW1lPSdfZGFzaC1sb2FkaW5nJz5Mb2FkaW5nLi4uPC9kaXY+O1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IHtzaG93X3VuZG9fcmVkb30gPSBjb25maWc7XG4gICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICA8UmVhY3QuRnJhZ21lbnQ+XG4gICAgICAgICAgICAgICAge3Nob3dfdW5kb19yZWRvID8gPFRvb2xiYXIgLz4gOiBudWxsfVxuICAgICAgICAgICAgICAgIDxBUElDb250cm9sbGVyIC8+XG4gICAgICAgICAgICAgICAgPExvYWRpbmcgLz5cbiAgICAgICAgICAgICAgICA8UmVsb2FkZXIgLz5cbiAgICAgICAgICAgIDwvUmVhY3QuRnJhZ21lbnQ+XG4gICAgICAgICk7XG4gICAgfVxufVxuXG5VbmNvbm5lY3RlZEFwcENvbnRhaW5lci5wcm9wVHlwZXMgPSB7XG4gICAgaG9va3M6IFByb3BUeXBlcy5vYmplY3QsXG4gICAgZGlzcGF0Y2g6IFByb3BUeXBlcy5mdW5jLFxuICAgIGNvbmZpZzogUHJvcFR5cGVzLm9iamVjdFxufTtcblxuY29uc3QgQXBwQ29udGFpbmVyID0gY29ubmVjdChcbiAgICBzdGF0ZSA9PiAoe1xuICAgICAgICBoaXN0b3J5OiBzdGF0ZS5oaXN0b3J5LFxuICAgICAgICBjb25maWc6IHN0YX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A9IG1lcmdlUmlnaHQocHJvcHMsIGV4dHJhUHJvcHMpO1xuICAgIGlmIChBcnJheS5pc0FycmF5KGNoaWxkcmVuKSkge1xuICAgICAgICByZXR1cm4gUmVhY3QuY3JlYXRlRWxlbWVudChlbGVtZW50LCBhbGxQcm9wcywgLi4uY2hpbGRyZW4pO1xuICAgIH1cbiAgICByZXR1cm4gUmVhY3QuY3JlYXRlRWxlbWVudChlbGVtZW50LCBhbGxQcm9wcywgY2hpbGRyZW4pO1xufVxuXG5mdW5jdGlvbiBpc0RyeUNvbXBvbmVudChvYmopIHtcbiAgICByZXR1cm4gKFxuICAgICAgICB0eXBlKG9iaikgPT09ICdPYmplY3QnICYmXG4gICAgICAgIGhhcygndHlwZScsIG9iaikgJiZcbiAgICAgICAgaGFzKCduYW1lc3BhY2UnLCBvYmopICYmXG4gICAgICAgIGhhcygncHJvcHMnLCBvYmopXG4gICAgKTtcbn1cblxuY29uc3QgRGFzaFdyYXBwZXIgPSBwcm9wcyA9PiB7XG4gICAgY29uc3QgY29udGV4dCA9IHVzZUNvbnRleHQoRGFzaENvbnRleHQpO1xuICAgIHJldHVybiAoXG4gICAgICAgIDxCYXNlVHJlZUNvbnRhaW5lclxuICAgICAgICAgICAgey4uLmNvbnRleHQuZm4oKX1cbiAgICAgICAgICAgIHsuLi5wcm9wc31cbiAgICAgICAgICAgIF9kYXNocHJpdmF0ZV9wYXRoPXtKU09OLnBhcnNlKHByb3BzLl9kYXNocHJpdmF0ZV9wYXRoKX1cbiAgICAgICAgLz5cbiAgICApO1xufTtcblxuY29uc3QgVHJlZUNvbnRhaW5lciA9IG1lbW8oRGFzaFdyYXBwZXIpO1xuXG5jbGFzcyBCYXNlVHJlZUNvbnRhaW5lciBleHRlbmRzIENvbXBvbmVudCB7XG4gICAgY29uc3RydWN0b3IocHJvcHMpIHtcbiAgICAgICAgc3VwZXIocHJvcHMpO1xuXG4gICAgICAgIHRoaXMuc2V0UHJvcHMgPSB0aGlzLnNldFByb3BzLmJpbmQodGhpcyk7XG4gICAgfVxuXG4gICAgY3JlYXRlQ29udGFpbmVyKHByb3BzLCBjb21wb25lbnQsIHBhdGgsIGtleSA9IHVuZGVmaW5lZCkge1xuICAgICAgICByZXR1cm4gaXNTaW1wbGVDb21wb25lbnQoY29tcG9uZW50KSA/IChcbiAgICAgICAgICAgIGNvbXBvbmVudFxuICAgICAgICApIDogKFxuICAgICAgICAgICAgPFRyZWVDb250YWluZXJcbiAgICAgICAgICAgICAgICBrZXk9e1xuICAgICAgICAgICAgICAgICAgICAoY29tcG9uZW50ICYmXG4gICAgICAgICAgICAgICAgICAgICAgICBjb21wb25lbnQucHJvcHMgJiZcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0cmluZ2lmeUlkKGNvbXBvbmVudC5wcm9wcy5pZCkpIHx8XG4gICAgICAgICAgICAgICAgICAgIGtleVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBfZGFzaHByaXZhdGVfZXJyb3I9e3Byb3BzLl9kYXNocHJpdmF0ZV9lcnJvcn1cbiAgICAgICAgICAgICAgICBfZGFzaHByaXZhdGVfbGF5b3V0PXtjb21wb25lbnR9XG4gICAgICAgICAgICAgICAgX2Rhc2hwcml2YXRlX2xvYWRpbmdTdGF0ZT17Z2V0TG9hZGluZ1N0YXRlKFxuICAgICAgICAgICAgICAgICAgICBjb21wb25lbnQsXG4gICAgICAgICAgICAgICAgICAgIHBhdGgsXG4gICAgICAgICAgICAgICAgICAgIHByb3BzLl9kYXNocHJpdmF0ZV9sb2FkaW5nTWFwXG4gICAgICAgICAgICAgICAgKX1cbiAgICAgICAgICAgICAgICBfZGFzaHByaXZhdGVfbG9hZGluZ1N0YXRlSGFzaD17Z2V0TG9hZGluZ0hhc2goXG4gICAgICAgICAgICAgICAgICAgIHBhdGgsXG4gICAgICAgICAgICAgICAgICAgIHByb3BzLl9kYXNocHJpdmF0ZV9sb2FkaW5nTWFwXG4gICAgICAgICAgICAgICAgKX1cbiAgICAgICAgICAgICAgICBfZGFzaHByaXZhdGVfcGF0aD17SlNPTi5zdHJpbmdpZnkocGF0aCl9XG4gICAgICAgICAgICAvPlxuICAgICAgICApO1xuICAgIH1cblxuICAgIHNldFByb3BzKG5ld1Byb3BzKSB7XG4gICAgICAgIGNvbnN0IHtfZGFzaHByaXZhdGVfZGlzcGF0Y2gsIF9kYXNocHJpdmF0ZV9wYXRoLCBfZGFzaHByaXZhdGVfbGF5b3V0fSA9XG4gICAgICAgICAgICB0aGlzLnByb3BzO1xuXG4gICAgICAgIGNvbnN0IG9sZFByb3BzID0gdGhpcy5nZXRMYXlvdXRQcm9wcygpO1xuICAgICAgICBjb25zdCB7aWR9ID0gb2xkUHJvcHM7XG4gICAgICAgIGNvbnN0IGNoYW5nZWRQcm9wcyA9IHBpY2tCeShcbiAgICAgICAgICAgICh2YWwsIGtleSkgPT4gIWVxdWFscyh2YWwsIG9sZFByb3BzW2tleV0pLFxuICAgICAgICAgICAgbmV3UHJvcHNcbiAgICAgICAgKTtcblxuICAgICAgICBpZiAoIWlzRW1wdHkoY2hhbmdlZFByb3BzKSkge1xuICAgICAgICAgICAgX2Rhc2hwcml2YXRlX2Rpc3BhdGNoKChkaXNwYXRjaCwgZ2V0U3RhdGUpID0+IHtcbiAgICAgICAgICAgICAgICBjb25zdCB7Z3JhcGhzfSA9IGdldFN0YXRlKCk7XG4gICAgICAgICAgICAgICAgLy8gSWRlbnRpZnkgdGhlIG1vZGlmaWVkIHByb3BzIHRoYXQgYXJlIHJlcXVpcmVkIGZvciBjYWxsYmFja3NcbiAgICAgICAgICAgICAgICBjb25zdCB3YXRjaGVkS2V5cyA9IGdldFdhdGNoZWRLZXlzKFxuICAgICAgICAgICAgICAgICAgICBpZCxcbiAgICAgICAgICAgICAgICAgICAga2V5cyhjaGFuZ2VkUHJvcHMpLFxuICAgICAgICAgICAgICAgICAgICBncmFwaHNcbiAgICAgICAgICAgICAgICApO1xuXG4gICAgICAgICAgICAgICAgYmF0Y2goKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAvLyBzZXRQcm9wcyBoZXJlIGlzIHRyaWdnZXJlZCBieSB0aGUgVUkgLSByZWNvcmQgdGhlc2UgY2hhbmdlc1xuICAgICAgICAgICAgICAgICAgICAvLyBmb3IgcGVyc2lzdGVuY2VcbiAgICAgICAgICAgICAgICAgICAgcmVjb3JkVWlFZGl0KF9kYXNocHJpdmF0ZV9sYXlvdXQsIG5ld1Byb3BzLCBkaXNwYXRjaCk7XG5cbiAgICAgICAgICAgICAgICAgICAgLy8gT25seSBkaXNwYXRjaCBjaGFuZ2VzIHRvIERhc2ggaWYgYSB3YXRjaGVkIHByb3AgY2hhbmdlZFxuICAgICAgICAgICAgICAgICAgICBpZiAod2F0Y2hlZEtleXMubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBkaXNwYXRjaChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBub3RpZnlPYnNlcnZlcnMoe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJvcHM6IHBpY2sod2F0Y2hlZEtleXMsIGNoYW5nZWRQcm9wcylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIC8vIEFsd2F5cyB1cGRhdGUgdGhpcyBjb21wb25lbnQncyBwcm9wc1xuICAgICAgICAgICAgICAgICAgICBkaXNwYXRjaChcbiAgICAgICAgICAgICAgICAgICAgICAgIHVwZGF0ZVByb3BzKHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcm9wczogY2hhbmdlZFByb3BzLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1wYXRoOiBfZGFzaHByaXZhdGVfcGF0aFxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgZ2V0Q2hpbGRyZW4oY29tcG9uZW50cywgcGF0aCkge1xuICAgICAgICBpZiAoaXNOaWwoY29tcG9uZW50cykpIHtcbiAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIEFycmF5LmlzQXJyYXkoY29tcG9uZW50cylcbiAgICAgICAgICAgID8gYWRkSW5kZXgobWFwKShcbiAgICAgICAgICAgICAgICAgIChjb21wb25lbnQsIGkpID0+XG4gICAgICAgICAgICAgICAgICAgICAgdGhpcy5jcmVhdGVDb250YWluZXIoXG4gICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucHJvcHMsXG4gICAgICAgICAgICAgICAgICAgICAgICAgIGNvbXBvbmVudCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgY29uY2F0KHBhdGgsIFsncHJvcHMnLCAnY2hpbGRyZW4nLCBpXSlcbiAgICAgICAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICAgICAgY29tcG9uZW50c1xuICAgICAgICAgICAgICApXG4gICAgICAgICAgICA6IHRoaXMuY3JlYXRlQ29udGFpbmVyKFxuICAgICAgICAgICAgICAgICAgdGhpcy5wcm9wcyxcbiAgICAgICAgICAgICAgICAgIGNvbXBvbmVudHMsXG4gICAgICAgICAgICAgICAgICBjb25jYXQocGF0aCwgWydwcm9wcycsICdjaGlsZHJlbiddKVxuICAgICAgICAgICAgICApO1xuICAgIH1cblxuICAgIHdyYXBDaGlsZHJlblByb3Aobm9kZSwgY2hpbGRyZW5Qcm9wKSB7XG4gICAgICAgIGlmIChBcnJheS5pc0FycmF5KG5vZGUpKSB7XG4gICAgICAgICAgICByZXR1cm4gbm9kZS5tYXAoKG4sIGkpID0+XG4gICAgICAgICAgICAgICAgaXNEcnlDb21wb25lbnQobilcbiAgICAgICAgICAgICAgICAgICAgPyB0aGlzLmNyZWF0ZUNvbnRhaW5lcihcbiAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wcm9wcyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgbixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgY29uY2F0KHRoaXMucHJvcHMuX2Rhc2hwcml2YXRlX3BhdGgsIFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdwcm9wcycsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuLi5jaGlsZHJlblByb3AsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpXG4gICAgICAgICAgICAgICAgICAgICAgICAgIF0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICBpXG4gICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICA6IG5cbiAgICAgICAgICAgICk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKCFpc0RyeUNvbXBvbmVudChub2RlKSkge1xuICAgICAgICAgICAgcmV0dXJuIG5vZGU7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHRoaXMuY3JlYXRlQ29udGFpbmVyKFxuICAgICAgICAgICAgdGhpcy5wcm9wcyxcbiAgICAgICAgICAgIG5vZGUsXG4gICAgICAgICAgICBjb25jYXQodGhpcy5wcm9wcy5fZGFzaHByaXZhdGVfcGF0aCwgWydwcm9wcycsIC4uLmNoaWxkcmVuUHJvcF0pXG4gICAgICAgICk7XG4gICAgfVxuXG4gICAgZ2V0Q29tcG9uZW50KF9kYXNocHJpdmF0ZV9sYXlvdXQsIGNoaWxkcmVuLCBsb2FkaW5nX3N0YXRlLCBzZXRQcm9wcykge1xuICAgICAgICBjb25zdCB7X2Rhc2hwcml2YXRlX2NvbmZpZywgX2Rhc2hwcml2YXRlX2Rpc3BhdGNoLCBfZGFzaHByaXZhdGVfZXJyb3J9ID1cbiAgICAgICAgICAgIHRoaXMucHJvcHM7XG5cbiAgICAgICAgaWYgKGlzRW1wdHkoX2Rhc2hwcml2YXRlX2xheW91dCkpIHtcbiAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGlzU2ltcGxlQ29tcG9uZW50KF9kYXNocHJpdmF0ZV9sYXlvdXQpKSB7XG4gICAgICAgICAgICByZXR1cm4gX2Rhc2hwcml2YXRlX2xheW91dDtcbiAgICAgICAgfVxuICAgICAgICB2YWxpZGF0ZUNvbXBvbmVudChfZGFzaHByaXZhdGVfbGF5b3V0KTtcblxuICAgICAgICBjb25zdCBlbGVtZW50ID0gUmVnaXN0cnkucmVzb2x2ZShfZGFzaHByaXZhdGVfbGF5b3V0KTtcblxuICAgICAgICAvLyBIeWRyYXRlIGNvbXBvbmVudHMgcHJvcHNcbiAgICAgICAgY29uc3QgY2hpbGRyZW5Qcm9wcyA9IHBhdGhPcihcbiAgICAgICAgICAgIFtdLFxuICAgICAgICAgICAgW1xuICAgICAgICAgICAgICAgICdjaGlsZHJlbl9wcm9wcycsXG4gICAgICAgICAgICAgICAgX2Rhc2hwcml2YXRlX2xheW91dC5uYW1lc3BhY2UsXG4gICAgICAgICAgICAgICAgX2Rhc2hwcml2YXRlX2xheW91dC50eXBlXG4gICAgICAgICAgICBdLFxuICAgICAgICAgICAgX2Rhc2hwcml2YXRlX2NvbmZpZ1xuICAgICAgICApO1xuICAgICAgICBsZXQgcHJvcHMgPSBkaXNzb2MoJ2NoaWxkcmVuJywgX2Rhc2hwcml2YXRlX2xheW91dC5wcm9wcyk7XG5cbiAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBjaGlsZHJlblByb3BzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICBjb25zdCBjaGlsZHJlblByb3AgPSBjaGlsZHJlblByb3BzW2ldO1xuXG4gICAgICAgICAgICBjb25zdCBoYW5kbGVPYmplY3QgPSAob2JqLCBvcGF0aCkgPT4ge1xuICAgICAgICAgICAgICAgIHJldHVybiBtYXBPYmpJbmRleGVkKFxuICAgICAgICAgICAgICAgICAgICAobm9kZSwgaykgPT4gdGhpcy53cmFwQ2hpbGRyZW5Qcm9wKG5vZGUsIFsuLi5vcGF0aCwga10pLFxuICAgICAgICAgICAgICAgICAgICBvYmpcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgaWYgKGNoaWxkcmVuUHJvcC5pbmNsdWRlcygnLicpKSB7XG4gICAgICAgICAgICAgICAgbGV0IHBhdGggPSBjaGlsZHJlblByb3Auc3BsaXQoJy4nKTtcbiAgICAgICAgICAgICAgICBsZXQgbm9kZTtcbiAgICAgICAgICAgICAgICBsZXQgbm9kZVZhbHVlO1xuICAgICAgICAgICAgICAgIGlmIChjaGlsZHJlblByb3AuaW5jbHVkZXMoJ1tdJykpIHtcbiAgICAgICAgICAgICAgICAgICAgbGV0IGZyb250UGF0aCA9IFtdLFxuICAgICAgICAgICAgICAgICAgICAgICAgYmFja1BhdGggPSBbXSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvdW5kID0gZmFsc2UsXG4gICAgICAgICAgICAgICAgICAgICAgICBoYXNPYmplY3QgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgcGF0aC5mb3JFYWNoKHAgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFmb3VuZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwLmluY2x1ZGVzKCdbXScpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvdW5kID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHAuaW5jbHVkZXMoJ3t9JykpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhhc09iamVjdCA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmcm9udFBhdGgucHVzaChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwLnJlcGxhY2UoJ3t9JywgJycpLnJlcGxhY2UoJ1tdJywgJycpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnJvbnRQYXRoLnB1c2gocC5yZXBsYWNlKCdbXScsICcnKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHAuaW5jbHVkZXMoJ3t9JykpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGFzT2JqZWN0ID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnJvbnRQYXRoLnB1c2gocC5yZXBsYWNlKCd7fScsICcnKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnJvbnRQYXRoLnB1c2gocCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocC5pbmNsdWRlcygne30nKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoYXNPYmplY3QgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYWNrUGF0aC5wdXNoKHAucmVwbGFjZSgne30nLCAnJykpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tQYXRoLnB1c2gocCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgICAgICBub2RlID0gcnBhdGgoZnJvbnRQYXRoLCBwcm9wcyk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChub2RlID09PSB1bmRlZmluZWQgfHwgIW5vZGUubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBjb25zdCBmaXJzdE5vZGUgPSBycGF0aChiYWNrUGF0aCwgbm9kZVswXSk7XG4gICAgICAgICAgICAgICAgICAgIGlmICghZmlyc3ROb2RlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIG5vZGVWYWx1ZSA9IG5vZGUubWFwKChlbGVtZW50LCBpKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBlbGVtZW50UGF0aCA9IGNvbmNhdChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmcm9udFBhdGgsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uY2F0KFtpXSwgYmFja1BhdGgpXG4gICAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGxpc3RWYWx1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChoYXNPYmplY3QpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoYmFja1BhdGgubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpc3RWYWx1ZSA9IGhhbmRsZU9iamVjdChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJwYXRoKGJhY2tQYXRoLCBlbGVtZW50KSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsZW1lbnRQYXRoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGlzdFZhbHVlID0gaGFuZGxlT2JqZWN0KGVsZW1lbnQsIGVsZW1lbnRQYXRoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpc3RWYWx1ZSA9IHRoaXMud3JhcENoaWxkcmVuUHJvcChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcnBhdGgoYmFja1BhdGgsIGVsZW1lbnQpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbGVtZW50UGF0aFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gYXNzb2NQYXRoKGJhY2tQYXRoLCBsaXN0VmFsdWUsIGVsZW1lbnQpO1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgcGF0aCA9IGZyb250UGF0aDtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBpZiAoY2hpbGRyZW5Qcm9wLmluY2x1ZGVzKCd7fScpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBPbmx5IHN1cHBvcnRzIG9uZSBsZXZlbCBvZiBuZXN0aW5nLlxuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgZnJvbnQgPSBbXTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkeW5hbWljID0gW107XG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgaGFzQmFjayA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgYmFja1BhdGggPSBbXTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaiA9IDA7IGogPCBwYXRoLmxlbmd0aDsgaisrKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgY3VyID0gcGF0aFtqXTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoY3VyLmluY2x1ZGVzKCd7fScpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGR5bmFtaWMgPSBjb25jYXQoZnJvbnQsIFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1ci5yZXBsYWNlKCd7fScsICcnKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGogPCBwYXRoLmxlbmd0aCAtIDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhhc0JhY2sgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGhhc0JhY2spIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tQYXRoLnB1c2goY3VyKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZyb250LnB1c2goY3VyKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgZHluVmFsdWUgPSBycGF0aChkeW5hbWljLCBwcm9wcyk7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoZHluVmFsdWUgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vZGVWYWx1ZSA9IG1hcE9iakluZGV4ZWQoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkLCBrKSA9PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy53cmFwQ2hpbGRyZW5Qcm9wKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhhc0JhY2sgPyBycGF0aChiYWNrUGF0aCwgZCkgOiBkLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhhc0JhY2tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBjb25jYXQoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGR5bmFtaWMsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmNhdChba10sIGJhY2tQYXRoKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBjb25jYXQoZHluYW1pYywgW2tdKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZHluVmFsdWVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhdGggPSBkeW5hbWljO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgbm9kZSA9IHJwYXRoKHBhdGgsIHByb3BzKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChub2RlID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIG5vZGVWYWx1ZSA9IHRoaXMud3JhcENoaWxkcmVuUHJvcChub2RlLCBwYXRoKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBwcm9wcyA9IGFzc29jUGF0aChwYXRoLCBub2RlVmFsdWUsIHByb3BzKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgaWYgKGNoaWxkcmVuUHJvcC5pbmNsdWRlcygne30nKSkge1xuICAgICAgICAgICAgICAgICAgICBsZXQgb3BhdGggPSBjaGlsZHJlblByb3AucmVwbGFjZSgne30nLCAnJyk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGlzQXJyYXkgPSBjaGlsZHJlblByb3AuaW5jbHVkZXMoJ1tdJyk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChpc0FycmF5KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBvcGF0aCA9IG9wYXRoLnJlcGxhY2UoJ1tdJywgJycpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IG5vZGUgPSBwcm9wc1tvcGF0aF07XG5cbiAgICAgICAgICAgICAgICAgICAgaWYgKG5vZGUgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlzQXJyYXkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBqID0gMDsgaiA8IG5vZGUubGVuZ3RoOyBqKyspIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgYVBhdGggPSBjb25jYXQoW29wYXRoXSwgW2pdKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJvcHMgPSBhc3NvY1BhdGgoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhUGF0aCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhhbmRsZU9iamVjdChub2RlW2pdLCBhUGF0aCksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcm9wc1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJvcHMgPSBhc3NvYyhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb3BhdGgsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhhbmRsZU9iamVjdChub2RlLCBbb3BhdGhdKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJvcHNcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3Qgbm9kZSA9IHByb3BzW2NoaWxkcmVuUHJvcF07XG4gICAgICAgICAgICAgICAgICAgIGlmIChub2RlICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHByb3BzID0gYXNzb2MoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2hpbGRyZW5Qcm9wLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMud3JhcENoaWxkcmVuUHJvcChub2RlLCBbY2hpbGRyZW5Qcm9wXSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJvcHNcbiAgICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodHlwZShwcm9wcy5pZCkgPT09ICdPYmplY3QnKSB7XG4gICAgICAgICAgICAvLyBUdXJuIG9iamVjdCBpZHMgKGZvciB3aWxkY2FyZHMpIGludG8gdW5pcXVlIHN0cmluZ3MuXG4gICAgICAgICAgICAvLyBCZWNhdXNlIG9mIHRoZSBgZGlzc29jYCBhYm92ZSB3ZSdyZSBub3QgbXV0YXRpbmcgdGhlIGxheW91dCxcbiAgICAgICAgICAgIC8vIGp1c3QgdGhlIGlkIHdlIHBhc3Mgb24gdG8gdGhlIHJlbmRlcmVkIGNvbXBvbmVudFxuICAgICAgICAgICAgcHJvcHMuaWQgPSBzdHJpbmdpZnlJZChwcm9wcy5pZCk7XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgZXh0cmFQcm9wcyA9IHtcbiAgICAgICAgICAgIGxvYWRpbmdfc3RhdGU6IGxvYWRpbmdfc3RhdGUgfHwgTk9UX0xPQURJTkcsXG4gICAgICAgICAgICBzZXRQcm9wc1xuICAgICAgICB9O1xuXG4gICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICA8Q29tcG9uZW50RXJyb3JCb3VuZGFyeVxuICAgICAgICAgICAgICAgIGNvbXBvbmVudFR5cGU9e19kYXNocHJpdmF0ZV9sYXlvdXQudHlwZX1cbiAgICAgICAgICAgICAgICBjb21wb25lbnRJZD17cHJvcHMuaWR9XG4gICAgICAgICAgICAgICAga2V5PXtwcm9wcy5pZH1cbiAgICAgICAgICAgICAgICBkaXNwYXRjaD17X2Rhc2hwcml2YXRlX2Rpc3BhdGNofVxuICAgICAgICAgICAgICAgIGVycm9yPXtfZGFzaHByaXZhdGVfZXJyb3J9XG4gICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAge19kYXNocHJpdmF0ZV9jb25maWcucHJvcHNfY2hlY2sgPyAoXG4gICAgICAgICAgICAgICAgICAgIDxDaGVja2VkQ29tcG9uZW50XG4gICAgICAgICAgICAgICAgICAgICAgICBjaGlsZHJlbj17Y2hpbGRyZW59XG4gICAgICAgICAgICAgICAgICAgICAgICBlbGVtZW50PXtlbGVtZW50fVxuICAgICAgICAgICAgICAgICAgICAgICAgcHJvcHM9e3Byb3BzfVxuICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmFQcm9wcz17ZXh0cmFQcm9wc31cbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU9e19kYXNocHJpdmF0ZV9sYXlvdXQudHlwZX1cbiAgICAgICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgICApIDogKFxuICAgICAgICAgICAgICAgICAgICBjcmVhdGVFbGVtZW50KGVsZW1lbnQsIHByb3BzLCBleHRyYVByb3BzLCBjaGlsZHJlbilcbiAgICAgICAgICAgICAgICApfVxuICAgICAgICAgICAgPC9Db21wb25lbnRFcnJvckJvdW5kYXJ5PlxuICAgICAgICApO1xuICAgIH1cblxuICAgIGdldExheW91dFByb3BzKCkge1xuICAgICAgICByZXR1cm4gcHJvcE9yKHt9LCAncHJvcHMnLCB0aGlzLnByb3BzLl9kYXNocHJpdmF0ZV9sYXlvdXQpO1xuICAgIH1cblxuICAgIHJlbmRlcigpIHtcbiAgICAgICAgY29uc3Qge1xuICAgICAgICAgICAgX2Rhc2hwcml2YXRlX2xheW91dCxcbiAgICAgICAgICAgIF9kYXNocHJpdmF0ZV9sb2FkaW5nU3RhdGUsXG4gICAgICAgICAgICBfZGFzaHByaXZhdGVfcGF0aFxuICAgICAgICB9ID0gdGhpcy5wcm9wcztcblxuICAgICAgICBjb25zdCBsYXlvdXRQcm9wcyA9IHRoaXMuZ2V0TGF5b3V0UHJvcHMoKTtcblxuICAgICAgICBjb25zdCBjaGlsZHJlbiA9IHRoaXMuZ2V0Q2hpbGRyZW4oXG4gICAgICAgICAgICBsYXlvdXRQcm9wcy5jaGlsZHJlbixcbiAgICAgICAgICAgIF9kYXNocHJpdmF0ZV9wYXRoXG4gICAgICAgICk7XG5cbiAgICAgICAgcmV0dXJuIHRoaXMuZ2V0Q29tcG9uZW50KFxuICAgICAgICAgICAgX2Rhc2hwcml2YXRlX2xheW91dCxcbiAgICAgICAgICAgIGNoaWxkcmVuLF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VuZHBvaW50LCBtZXRob2QsIHN0b3JlLCBpZCwgYm9keSkge1xuICAgIHJldHVybiBhc3luYyAoZGlzcGF0Y2gsIGdldFN0YXRlKSA9PiB7XG4gICAgICAgIGxldCB7Y29uZmlnLCBob29rc30gPSBnZXRTdGF0ZSgpO1xuICAgICAgICBsZXQgbmV3SGVhZGVycyA9IG51bGw7XG5cbiAgICAgICAgY29uc3QgdXJsID0gYCR7dXJsQmFzZShjb25maWcpfSR7ZW5kcG9pbnR9YDtcblxuICAgICAgICBmdW5jdGlvbiBzZXRDb25uZWN0aW9uU3RhdHVzKGNvbm5lY3RlZCkge1xuICAgICAgICAgICAgaWYgKGdldFN0YXRlKCkuZXJyb3IuYmFja0VuZENvbm5lY3RlZCAhPT0gY29ubmVjdGVkKSB7XG4gICAgICAgICAgICAgICAgZGlzcGF0Y2goe1xuICAgICAgICAgICAgICAgICAgICB0eXBlOiAnU0VUX0NPTk5FQ1RJT05fU1RBVFVTJyxcbiAgICAgICAgICAgICAgICAgICAgcGF5bG9hZDogY29ubmVjdGVkXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBkaXNwYXRjaCh7XG4gICAgICAgICAgICB0eXBlOiBzdG9yZSxcbiAgICAgICAgICAgIHBheWxvYWQ6IHtpZCwgc3RhdHVzOiAnbG9hZGluZyd9XG4gICAgICAgIH0pO1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgICBsZXQgcmVzO1xuICAgICAgICAgICAgZm9yIChsZXQgcmV0cnkgPSAwOyByZXRyeSA8PSBNQVhfQVVUSF9SRVRSSUVTOyByZXRyeSsrKSB7XG4gICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgcmVzID0gYXdhaXQgcmVxdWVzdFttZXRob2RdKHVybCwgY29uZmlnLmZldGNoLCBib2R5KTtcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIGZldGNoIHJlamVjdGlvbiAtIHRoaXMgbWVhbnMgdGhlIHJlcXVlc3QgZGlkbid0IHJldHVybixcbiAgICAgICAgICAgICAgICAgICAgLy8gd2UgZG9uJ3QgZ2V0IGhlcmUgZnJvbSA0MDAvNTAwIGVycm9ycywgb25seSBuZXR3b3JrXG4gICAgICAgICAgICAgICAgICAgIC8vIGVycm9ycyBvciB1bnJlc3BvbnNpdmUgc2VydmVycy5cbiAgICAgICAgICAgICAgICAgICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIG5vLWNvbnNvbGVcbiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ2ZldGNoIGVycm9yJywgcmVzKTtcbiAgICAgICAgICAgICAgICAgICAgc2V0Q29ubmVjdGlvblN0YXR1cyhmYWxzZSk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgIHJlcy5zdGF0dXMgPT09IFNUQVRVUy5VTkFVVEhPUklaRUQgfHxcbiAgICAgICAgICAgICAgICAgICAgcmVzLnN0YXR1cyA9PT0gU1RBVFVTLkJBRF9SRVFVRVNUXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChob29rcy5yZXF1ZXN0X3JlZnJlc2hfand0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBib2R5ID0gYXdhaXQgcmVzLnRleHQoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChib2R5LmluY2x1ZGVzKEpXVF9FWFBJUkVEX01FU1NBR0UpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgbmV3Snd0ID0gYXdhaXQgaG9va3MucmVxdWVzdF9yZWZyZXNoX2p3dChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlnLmZldGNoLmhlYWRlcnMuQXV0aG9yaXphdGlvbi5zdWJzdHIoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnQmVhcmVyICcubGVuZ3RoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChuZXdKd3QpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3SGVhZGVycyA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEF1dGhvcml6YXRpb246IGBCZWFyZXIgJHtuZXdKd3R9YFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZyA9IG1lcmdlRGVlcFJpZ2h0KGNvbmZpZywge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmV0Y2g6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOiBuZXdIZWFkZXJzXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgY29uc3QgY29udGVudFR5cGUgPSByZXMuaGVhZGVycy5nZXQoJ2NvbnRlbnQtdHlwZScpO1xuXG4gICAgICAgICAgICBpZiAobmV3SGVhZGVycykge1xuICAgICAgICAgICAgICAgIGRpc3BhdGNoKGFkZEh0dHBIZWFkZXJzKG5ld0hlYWRlcnMpKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHNldENvbm5lY3Rpb25TdGF0dXModHJ1ZSk7XG4gICAgICAgICAgICBpZiAoY29udGVudFR5cGUgJiYgY29udGVudFR5cGUuaW5kZXhPZignYXBwbGljYXRpb24vanNvbicpICE9PSAtMSkge1xuICAgICAgICAgICAgICAgIHJldHVybiByZXMuanNvbigpLnRoZW4oanNvbiA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGRpc3BhdGNoKHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6IHN0b3JlLFxuICAgICAgICAgICAgICAgICAgICAgICAgcGF5bG9hZDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXR1czogcmVzLnN0YXR1cyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250ZW50OiBqc29uLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkXG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4ganNvbjtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGxvZ1dhcm5pbmdPbmNlKFxuICAgICAgICAgICAgICAgICdSZXNwb25zZSBpcyBtaXNzaW5nIGhlYWRlcjogY29udGVudC10eXBlOiBhcHBsaWNhdGlvbi9qc29uJ1xuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIHJldHVybiBkaXNwYXRjaCh7XG4gICAgICAgICAgICAgICAgdHlwZTogc3RvcmUsXG4gICAgICAgICAgICAgICAgcGF5bG9hZDoge1xuICAgICAgICAgICAgICAgICAgICBpZCxcbiAgICAgICAgICAgICAgICAgICAgc3RhdHVzOiByZXMuc3RhdHVzXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgY29uc3QgbWVzc2Fn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ICAgICAgICAgICAgICAgaGVhZCxcbiAgICAgICAgICAgICAgICAndGhlcmUgYXJlIG5vIGBJbnB1dGAgZWxlbWVudHMuJyxcbiAgICAgICAgICAgICAgICAnV2l0aG91dCBgSW5wdXRgIGVsZW1lbnRzLCBpdCB3aWxsIG5ldmVyIGdldCBjYWxsZWQuJyxcbiAgICAgICAgICAgICAgICAnJyxcbiAgICAgICAgICAgICAgICAnU3Vic2NyaWJpbmcgdG8gYElucHV0YCBjb21wb25lbnRzIHdpbGwgY2F1c2UgdGhlJyxcbiAgICAgICAgICAgICAgICAnY2FsbGJhY2sgdG8gYmUgY2FsbGVkIHdoZW5ldmVyIHRoZWlyIHZhbHVlcyBjaGFuZ2UuJ1xuICAgICAgICAgICAgXSk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBzcGVjID0gW1xuICAgICAgICAgICAgW291dHB1dHMsICdPdXRwdXQnXSxcbiAgICAgICAgICAgIFtpbnB1dHMsICdJbnB1dCddLFxuICAgICAgICAgICAgW3N0YXRlLCAnU3RhdGUnXVxuICAgICAgICBdO1xuICAgICAgICBzcGVjLmZvckVhY2goKFthcmdzLCBjbHNdKSA9PiB7XG4gICAgICAgICAgICBpZiAoY2xzID09PSAnT3V0cHV0JyAmJiAhaGFzT3V0cHV0cykge1xuICAgICAgICAgICAgICAgIC8vIGp1c3QgYSBxdWlyayBvZiBob3cgd2UgcGFzcyAmIHBhcnNlIG91dHB1dHMgLSBpZiB5b3UgZG9uJ3RcbiAgICAgICAgICAgICAgICAvLyBwcm92aWRlIG9uZSwgaXQgbG9va3MgbGlrZSBhIHNpbmdsZSBibGFuayBvdXRwdXQuIFRoaXMgaXNcbiAgICAgICAgICAgICAgICAvLyBhY3R1YWxseSB1c2VmdWwgZm9yIGdyYWNlZnVsIGZhaWx1cmUsIHNvIHdlIHdvcmsgYXJvdW5kIGl0LlxuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKC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dLnByb3BlcnR5ID0gJHtKU09OLnN0cmluZ2lmeShwcm9wZXJ0eSl9YCxcbiAgICAgICAgICAgICdidXQgd2UgZXhwZWN0ZWQgYHByb3BlcnR5YCB0byBiZSBhIG5vbi1lbXB0eSBzdHJpbmcuJ1xuICAgICAgICBdKTtcbiAgICB9XG5cbiAgICBpZiAodHlwZW9mIGlkID09PSAnb2JqZWN0Jykge1xuICAgICAgICBpZiAoaXNFbXB0eShpZCkpIHtcbiAgICAgICAgICAgIGRpc3BhdGNoRXJyb3IoJ0NhbGxiYWNrIGl0ZW0gbWlzc2luZyBJRCcsIFtcbiAgICAgICAgICAgICAgICBoZWFkLFxuICAgICAgICAgICAgICAgIGAke2Nsc31bJHtpfV0uaWQgPSB7fWAsXG4gICAgICAgICAgICAgICAgJ0V2ZXJ5IGl0ZW0gbGlua2VkIHRvIGEgY2FsbGJhY2sgbmVlZHMgYW4gSUQnXG4gICAgICAgICAgICBdKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGZvckVhY2hPYmpJbmRleGVkKCh2LCBrKSA9PiB7XG4gICAgICAgICAgICBpZiAoIWspIHtcbiAgICAgICAgICAgICAgICBkaXNwYXRjaEVycm9yKCdDYWxsYmFjayB3aWxkY2FyZCBJRCBlcnJvcicsIFtcbiAgICAgICAgICAgICAgICAgICAgaGVhZCxcbiAgICAgICAgICAgICAgICAgICAgYCR7Y2xzfVske2l9XS5pZCBoYXMga2V5IFwiJHtrfVwiYCxcbiAgICAgICAgICAgICAgICAgICAgJ0tleXMgbXVzdCBiZSBub24tZW1wdHkgc3RyaW5ncy4nXG4gICAgICAgICAgICAgICAgXSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICh0eXBlb2YgdiA9PT0gJ29iamVjdCcgJiYgdi53aWxkKSB7XG4gICAgICAgICAgICAgICAgaWYgKGFsbG93ZWRXaWxkY2FyZHNbY2xzXVt2LndpbGRdICE9PSB2KSB7XG4gICAgICAgICAgICAgICAgICAgIGRpc3BhdGNoRXJyb3IoJ0NhbGxiYWNrIHdpbGRjYXJkIElEIGVycm9yJywgW1xuICAgICAgICAgICAgICAgICAgICAgICAgaGVhZCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGAke2Nsc31bJHtpfV0uaWRbXCIke2t9XCJdID0gJHt2LndpbGR9YCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGBBbGxvd2VkIHdpbGRjYXJkcyBmb3IgJHtjbHN9cyBhcmU6YCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGtleXMoYWxsb3dlZFdpbGRjYXJkc1tjbHNdKS5qb2luKCcsICcpXG4gICAgICAgICAgICAgICAgICAgIF0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSBpZiAoIWluY2x1ZGVzKHR5cGVvZiB2LCB3aWxkY2FyZFZhbFR5cGVzKSkge1xuICAgICAgICAgICAgICAgIGRpc3BhdGNoRXJyb3IoJ0NhbGxiYWNrIHdpbGRjYXJkIElEIGVycm9yJywgW1xuICAgICAgICAgICAgICAgICAgICBoZWFkLFxuICAgICAgICAgICAgICAgICAgICBgJHtjbHN9WyR7aX1dLmlkW1wiJHtrfVwiXSA9ICR7SlNPTi5zdHJpbmdpZnkodil9YCxcbiAgICAgICAgICAgICAgICAgICAgJ1dpbGRjYXJkIGNhbGxiYWNrIElEIHZhbHVlcyBtdXN0IGJlIGVpdGhlciB3aWxkY2FyZHMnLFxuICAgICAgICAgICAgICAgICAgICAnb3IgY29uc3RhbnRzIG9mIG9uZSBvZiB0aGVzZSB0eXBlczonLFxuICAgICAgICAgICAgICAgICAgICB3aWxkY2FyZFZhbFR5cGVzLmpvaW4oJywgJylcbiAgICAgICAgICAgICAgICBdKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSwgaWQpO1xuICAgIH0gZWxzZSBpZiAodHlwZW9mIGlkID09PSAnc3RyaW5nJykge1xuICAgICAgICBpZiAoIWlkKSB7XG4gICAgICAgICAgICBkaXNwYXRjaEVyc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vdXRPYmpzKSB7XG4gICAgY29uc3QgbmV3T3V0cHV0U3RycyA9IHt9O1xuICAgIGNvbnN0IG5ld091dHB1dE9ianMgPSBbXTtcbiAgICBvdXRwdXRzLmZvckVhY2goKHtpZCwgcHJvcGVydHl9LCBpKSA9PiB7XG4gICAgICAgIGlmICh0eXBlb2YgaWQgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICBjb25zdCBpZFByb3AgPSBjb21iaW5lSWRBbmRQcm9wKHtpZCwgcHJvcGVydHl9KTtcbiAgICAgICAgICAgIGlmIChuZXdPdXRwdXRTdHJzW2lkUHJvcF0pIHtcbiAgICAgICAgICAgICAgICBkaXNwYXRjaEVycm9yKCdEdXBsaWNhdGUgY2FsbGJhY2sgT3V0cHV0cycsIFtcbiAgICAgICAgICAgICAgICAgICAgaGVhZCxcbiAgICAgICAgICAgICAgICAgICAgYE91dHB1dCAke2l9ICgke2lkUHJvcH0pIGlzIGFscmVhZHkgdXNlZCBieSB0aGlzIGNhbGxiYWNrLmBcbiAgICAgICAgICAgICAgICBdKTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAob3V0U3Ryc1tpZFByb3BdKSB7XG4gICAgICAgICAgICAgICAgZGlzcGF0Y2hFcnJvcignRHVwbGljYXRlIGNhbGxiYWNrIG91dHB1dHMnLCBbXG4gICAgICAgICAgICAgICAgICAgIGhlYWQsXG4gICAgICAgICAgICAgICAgICAgIGBPdXRwdXQgJHtpfSAoJHtpZFByb3B9KSBpcyBhbHJlYWR5IGluIHVzZS5gLFxuICAgICAgICAgICAgICAgICAgICAnVG8gcmVzb2x2ZSB0aGlzLCBzZXQgYGFsbG93X2R1cGxpY2F0ZT1UcnVlYCBvbicsXG4gICAgICAgICAgICAgICAgICAgICdkdXBsaWNhdGUgb3V0cHV0cywgb3IgY29tYmluZSB0aGUgb3V0cHV0cyBpbnRvJyxcbiAgICAgICAgICAgICAgICAgICAgJ29uZSBjYWxsYmFjayBmdW5jdGlvbiwgZGlzdGluZ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XJsYXAgPyAndGhpcycgOiAnYSBkaWZmZXJlbnQnfSBjYWxsYmFjay5gXG4gICAgICAgICAgICAgICAgXSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIG5ld091dHB1dE9ianMucHVzaChpZE9iaik7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9KTtcbiAgICBrZXlzKG5ld091dHB1dFN0cnMpLmZvckVhY2goayA9PiB7XG4gICAgICAgIG91dFN0cnNba10gPSAxO1xuICAgIH0pO1xuICAgIG5ld091dHB1dE9ianMuZm9yRWFjaChpZE9iaiA9PiB7XG4gICAgICAgIG91dE9ianMucHVzaChpZE9iaik7XG4gICAgfSk7XG59XG5cbmZ1bmN0aW9uIGNoZWNrSW5PdXRPdmVybGFwKG91dCwgaW5wdXRzKSB7XG4gICAgY29uc3Qge2lkOiBvdXRJZCwgcHJvcGVydHk6IG91dFByb3B9ID0gb3V0O1xuICAgIHJldHVybiBpbnB1dHMuc29tZShpbl8gPT4ge1xuICAgICAgICBjb25zdCB7aWQ6IGluSWQsIHByb3BlcnR5OiBpblByb3B9ID0gaW5fO1xuICAgICAgICBpZiAob3V0UHJvcCAhPT0gaW5Qcm9wIHx8IHR5cGVvZiBvdXRJZCAhPT0gdHlwZW9mIGluSWQpIHtcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgfVxuICAgICAgICBpZiAodHlwZW9mIG91dElkID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgaWYgKG91dElkID09PSBpbklkKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSBpZiAod2lsZGNhcmRPdmVybGFwKGluXywgW291dF0pKSB7XG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgfSk7XG59XG5cbmZ1bmN0aW9uIGZpbmRNaXNtY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3JFYWNoKChhcmcsIGkpID0+IHtcbiAgICAgICAgICAgIGNvbnN0IHttYXRjaEtleXMsIGFsbHNtYWxsZXJLZXlzfSA9IGZpbmRXaWxkY2FyZEtleXMoYXJnLmlkKTtcbiAgICAgICAgICAgIGNvbnN0IGFsbFdpbGRjYXJkS2V5cyA9IG1hdGNoS2V5cy5jb25jYXQoYWxsc21hbGxlcktleXMpO1xuICAgICAgICAgICAgY29uc3QgZGlmZiA9IGRpZmZlcmVuY2UoYWxsV2lsZGNhcmRLZXlzLCBvdXQwTWF0Y2hLZXlzKTtcbiAgICAgICAgICAgIGlmIChkaWZmLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgIGRpZmYuc29ydCgpO1xuICAgICAgICAgICAgICAgIGRpc3BhdGNoRXJyb3IoJ2BJbnB1dGAgLyBgU3RhdGVgIHdpbGRjYXJkcyBub3QgaW4gYE91dHB1dGBzJywgW1xuICAgICAgICAgICAgICAgICAgICBoZWFkLFxuICAgICAgICAgICAgICAgICAgICBgJHtjbHN9ICR7aX0gKCR7Y29tYmluZUlkQW5kUHJvcChhcmcpfSlgLFxuICAgICAgICAgICAgICAgICAgICBgaGFzIE1BVENIIG9yIEFMTFNNQUxMRVIgb24ga2V5KHMpICR7ZGlmZi5qb2luKCcsICcpfWAsXG4gICAgICAgICAgICAgICAgICAgIGB3aGVyZSBPdXRwdXQgMCAoJHtjb21iaW5lSWRBbmRQcm9wKG91dHB1dHNbMF0pfSlgLFxuICAgICAgICAgICAgICAgICAgICAnZG9lcyBub3QgaGF2ZSBhIE1BVENIIHdpbGRjYXJkLiBJbnB1dHMgYW5kIFN0YXRlIGRvIG5vdCcsXG4gICAgICAgICAgICAgICAgICAgICduZWVkIGV2ZXJ5IE1BVENIIGZyb20gdGhlIE91dHB1dChzKSwgYnV0IHRoZXkgY2Fubm90IGhhdmUnLFxuICAgICAgICAgICAgICAgICAgICAnZXh0cmFzIGJleW9uZCB0aGUgT3V0cHV0KHMpLidcbiAgICAgICAgICAg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GgsIGxheW91dCk7XG4gICAgICAgIGNvbnN0IGVsZW1lbnQgPSBSZWdpc3RyeS5yZXNvbHZlKGNvbXBvbmVudCk7XG5cbiAgICAgICAgLy8gbm90ZTogRmxvdyBjb21wb25lbnRzIGRvIG5vdCBoYXZlIHByb3BUeXBlcywgc28gd2UgY2FuJ3QgdmFsaWRhdGUuXG4gICAgICAgIGlmIChlbGVtZW50ICYmIGVsZW1lbnQucHJvcFR5cGVzICYmICFlbGVtZW50LnByb3BUeXBlc1twcm9wXSkge1xuICAgICAgICAgICAgLy8gbG9vayBmb3Igd2lsZGNhcmQgcHJvcHMgKGllIGRhdGEtKiBldGMpXG4gICAgICAgICAgICBmb3IgKGNvbnN0IHByb3BOYW1lIGluIGVsZW1lbnQucHJvcFR5cGVzKSB7XG4gICAgICAgICAgICAgICAgY29uc3QgbGFzdCA9IHByb3BOYW1lLmxlbmd0aCAtIDE7XG4gICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICBwcm9wTmFtZS5jaGFyQXQobGFzdCkgPT09ICcqJyAmJlxuICAgICAgICAgICAgICAgICAgICBwcm9wLnN1YnN0cigwLCBsYXN0KSA9PT0gcHJvcE5hbWUuc3Vic3RyKDAsIGxhc3QpXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjb25zdCB7dHlwZSwgbmFtZXNwYWNlfSA9IGNvbXBvbmVudDtcbiAgICAgICAgICAgIGRpc3BhdGNoRXJyb3IoJ0ludmFsaWQgcHJvcCBmb3IgdGhpcyBjb21wb25lbnQnLCBbXG4gICAgICAgICAgICAgICAgYFByb3BlcnR5IFwiJHtwcm9wfVwiIHdhcyB1c2VkIHdpdGggY29tcG9uZW50IElEOmAsXG4gICAgICAgICAgICAgICAgYCAgJHtKU09OLnN0cmluZ2lmeShpZCl9YCxcbiAgICAgICAgICAgICAgIC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G4gICAgICAgIH1cbiAgICAgICAgY2FsbGJhY2tJZHNDaGVja2VkRm9yU3RhdGVbb3V0cHV0XSA9IDE7XG5cbiAgICAgICAgY29uc3QgY2xzID0gJ1N0YXRlJztcblxuICAgICAgICBzdGF0ZS5mb3JFYWNoKCh7aWQsIHByb3BlcnR5fSkgPT4ge1xuICAgICAgICAgICAgaWYgKHR5cGVvZiBpZCA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBpZFBhdGggPSBnZXRQYXRoKHBhdGhzLCBpZCk7XG4gICAgICAgICAgICAgICAgaWYgKCFpZFBhdGgpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHZhbGlkYXRlSWRzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBtaXNzaW5nSWQoaWQsIGNscywgW2NhbGxiYWNrXSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICB2YWxpZGF0ZVByb3AoaWQsIGlkUGF0aCwgcHJvcGVydHksIGNscywgW2NhbGxiYWNrXSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8gT25seSB2YWxpZGF0ZSBwcm9wcyBmb3IgU3RhdGUgb2JqZWN0IGlkcyB0aGF0IHdlIGRvbid0IG5lZWQgdG9cbiAgICAgICAgICAgIC8vIHJlc29sdmUgdGhlbSB0byBzcGVjaWZpYyBpbnB1dHMgb3Igb3V0cHV0c1xuICAgICAgICAgICAgZWxzZSBpZiAoIWludGVyc2VjdGlvbihbTUFUQ0gsIEFMTFNNQUxMRVJdLCB2YWx1ZXMoaWQpKS5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICB2YWxpZGF0ZUlkUGF0dGVyblByb3AoaWQsIHByb3BlcnR5LCBjbHMsIFtjYWxsYmFja10pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiB2YWxpZGF0ZU1hcChtYXAsIGNscywgZG9TdGF0ZSkge1xuICAgICAgICBmb3IgKGNvbnN0IGlkIGluIG1hcCkge1xuICAgICAgICAgICAgY29uc3QgaWRQcm9wcyA9IG1hcFtpZF07XG4gICAgICAgICAgICBjb25zdCBpZFBhdGggPSBnZXRQYXRoKHBhdGhzLCBpZCk7XG4gICAgICAgICAgICBpZiAoIWlkUGF0aCkge1xuICAgICAgICAgICAgICAgIGlmICh2YWxpZGF0ZUlkcykge1xuICAgICAgICAgICAgICAgICAgICBtaXNzaW5nSWQoaWQsIGNscywgZmxhdHRlbih2YWx1ZXMoaWRQcm9wcykpKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGZvciAoY29uc3QgcHJvcGVydHkgaW4gaWRQcm9wcykge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBjYWxsYmFja3MgPSBpZFByb3BzW3Byb3BlcnR5XTtcbiAgICAgICAgICAgICAgICAgICAgdmFsaWRhdGVQcm9wKGlkLCBpZFBhdGgsIHByb3BlcnR5LCBjbHMsIGNhbGxiYWNrcyk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChkb1N0YXRlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBJdCB3b3VsZCBiZSByZWR1bmRhbnQgdG8gY2hlY2sgc3RhdGUgb24gYm90aCBpbnB1dHNcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGFuZCBvdXRwdXRzIC0gc28gb25seSBzZXQgZG9TdGF0ZSBmb3Igb3V0cHV0cy5cbiAgICAgICAgICAgICAgICAgICAgICAgIGNhbGxiYWNrcy5mb3JFYWNoKHZhbGlkYXRlU3RhdGUpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgdmFsaWRhdGVNYXAob3V0cHV0TWFwL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FyZFBsYWNlaG9sZGVyc1trZXldKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB3aWxkY2FyZFBsYWNlaG9sZGVyc1trZXldID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4YWN0OiBbXSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHBhbmQ6IDBcbiAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgY29uc3Qga2V5UGxhY2Vob2xkZXJzID0gd2lsZGNhcmRQbGFjZWhvbGRlcnNba2V5XTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHZhbCAmJiB2YWwud2lsZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHZhbC5leHBhbmQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBrZXlQbGFjZWhvbGRlcnMuZXhwYW5kICs9IDE7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoa2V5UGxhY2Vob2xkZXJzLmV4YWN0LmluZGV4T2YodmFsKSA9PT0gLTEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGtleVBsYWNlaG9sZGVycy5leGFjdC5wdXNoKHZhbCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9LCBpZCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgIH0pO1xuXG4gICAgZm9yRWFjaE9iakluZGV4ZWQoa2V5UGxhY2Vob2xkZXJzID0+IHtcbiAgICAgICAgY29uc3Qge2V4YWN0LCBleHBhbmR9ID0ga2V5UGxhY2Vob2xkZXJzO1xuICAgICAgICBjb25zdCB2YWxzID0gZXhhY3Quc2xpY2UoKS5zb3J0KGlkVmFsU29ydCk7XG4gICAgICAgIGlmIChleHBhbmQpIHtcbiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgZXhwYW5kOyBpKyspIHtcbiAgICAgICAgICAgICAgICBpZiAoZXhhY3QubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhbHMuc3BsaWNlKDAsIDAsIFt2YWxCZWZvcmUodmFsc1swXSldKTtcbiAgICAgICAgICAgICAgICAgICAgdmFscy5wdXNoKHZhbEFmdGVyKHZhbHNbdmFscy5sZW5ndGggLSAxXSkpO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHZhbHMucHVzaChpKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSBpZiAoIWV4YWN0Lmxlbmd0aCkge1xuICAgICAgICAgICAgLy8gb25seSBNQVRDSC9BTEwgLSBzdGlsbCBuZWVkIGEgdmFsdWVcbiAgICAgICAgICAgIHZhbHMucHVzaCgwKTtcbiAgICAgICAgfVxuICAgICAgICBrZXlQbGFjZWhvbGRlcnMudmFscyA9IHZhbHM7XG4gICAgfSwgd2lsZGNhcmRQbGFjZWhvbGRlcnMpO1xuXG4gICAgZnVuY3Rpb24gbWFrZUFsbElkcyhpZFNwZWMsIG91dElkRmluYWwpIHtcbiAgICAgICAgbGV0IGlkTGlzdCA9IFt7fV07XG4gICAgICAgIGZvckVhY2hPYmpJbmRleGVkKCh2YWwsIGtleSkgPT4ge1xuICAgICAgICAgICAgY29uc3QgdGVzdFZhbHMgPSB3aWxkY2FyZFBsYWNlaG9sZGVyc1trZXldLnZhbHM7XG4gICAgICAgICAgICBjb25zdCBvdXRWYWxJbmRleCA9IHRlc3RWYWxzLmluZGV4T2Yob3V0SWRGaW5hbFtrZXldKTtcbiAgICAgICAgICAgIGxldCBuZXdWYWxzID0gW3ZhbF07XG4gICAgICAgICAgICBpZiAodmFsICYmIHZhbC53aWxkKSB7XG4gICAgICAgICAgICAgICAgaWYgKHZhbCA9PT0gQUxMU01BTExFUikge1xuICAgICAgICAgICAgICAgICAgICBpZiAob3V0VmFsSW5kZXggPiAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBuZXdWYWxzID0gdGVzdFZhbHMuc2xpY2UoMCwgb3V0VmFsSW5kZXgpO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gbm8gc21hbGxlciBpdGVtcyAtIGRlbGV0ZSBhbGwgb3V0cHV0cy5cbiAgICAgICAgICAgICAgICAgICAgICAgIG5ld1ZhbHMgPSBbXTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIE1BVENIIG9yIEFMTFxuICAgICAgICAgICAgICAgICAgICAvLyBNQVRDSCAqaXMqIEFMTCBmb3Igb3V0cHV0cywgaWUgd2UgZG9uJ3QgYWxyZWFkeSBoYXZlIGFcbiAgICAgICAgICAgICAgICAgICAgLy8gdmFsdWUgc3BlY2lmaWVkIGluIGBvdXRJZEZpbmFsYFxuICAgICAgICAgICAgICAgICAgICBuZXdWYWxzID1cbiAgICAgICAgICAgICAgICAgICAgICAgIG91dFZhbEluZGV4ID09PSAtMSB8fCB2YWwgPT09IEFMTFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gdGVzdFZhbHNcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IFtvdXRJZEZpbmFsW2tleV1dO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8vIHJlcGxpY2F0ZXMgZXZlcnl0aGluZyBpbiBpZExpc3Qgb25jZSBmb3IgZWFjaCBpdGVtIGluXG4gICAgICAgICAgICAvLyBuZXdWYWxzLCBhdHRhY2hpbmcgZWFjaCB2YWx1ZSBhdCBrZXkuXG4gICAgICAgICAgICBpZExpc3QgPSBhcChhcChbYXNzb2Moa2V5KV0sIG5ld1ZhbHMpLCBpZExpc3QpO1xuICAgICAgICB9LCBpZFNwZWMpO1xuICAgICA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AgICAgICAgICAgICAgIGNvbnN0IHtpZDogaW5JZCwgcHJvcGVydHl9ID0gaW5PYmo7XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBpbklkID09PSAnb2JqZWN0Jykge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBpbklkTGlzdCA9IG1ha2VBbGxJZHMoaW5JZCwgb3V0SWRGaW5hbCk7XG4gICAgICAgICAgICAgICAgICAgIGluSWRMaXN0LmZvckVhY2goaWQgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgYWRkSW5wdXRUb011bHRpKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbWJpbmVJZEFuZFByb3Aoe2lkLCBwcm9wZXJ0eX0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG91dElkUHJvcFxuICAgICAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgYWRkSW5wdXRUb011bHRpKGNvbWJpbmVJZEFuZFByb3AoaW5PYmopLCBvdXRJZFByb3ApO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gV2UnbGwgY29udGludWUgdG8gdXNlIGRlcC5vdXRwdXQgYXMgaXRzIGlkLCBidXQgYWRkIG91dHB1dHMgYXMgd2VsbFxuICAgICAgICAvLyBmb3IgY29udmVuaWVuY2UgYW5kIHN5bW1ldHJ5IHdpdGggdGhlIHN0cnVjdHVyZSBvZiBpbnB1dHMgYW5kIHN0YXRlLlxuICAgICAgICAvLyBBbHNvIGNvbGxlY3QgTUFUQ0gga2V5cyBpbiB0aGUgb3V0cHV0IChhbGwgb3V0cHV0cyBtdXN0IHNoYXJlIHRoZXNlKVxuICAgICAgICAvLyBhbmQgQUxMIGtleXMgaW4gdGhlIGZpcnN0IG91dHB1dCAobmVlZCBub3QgYmUgc2hhc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G91dElkTmFtZSA9IGNvbWJpbmVJZEFuZFByb3AodGVtcE91dElkUHJvcCk7XG4gICAgICAgICAgICAgICAgICAgIC8vIGlmIHRoaXMgb3V0cHV0IGlzIGFsc28gYW4gaW5wdXQsIGFkZCBgb3V0cHV0VGFnYCB0byB0aGUgbmFtZVxuICAgICAgICAgICAgICAgICAgICBpZiAoYWxzb0lucHV0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBkdXBsaWNhdGVPdXRwdXRzLnB1c2godGVtcE91dElkUHJvcCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBvdXRJZE5hbWUgKz0gb3V0cHV0VGFnO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGFkZE91dHB1dFRvTXVsdGkoaWQsIG91dElkTmFtZSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgYWRkUGF0dGVybihvdXRwdXRQYXR0ZXJucywgb3V0SWQsIHByb3BlcnR5LCBmaW5hbERlcGVuZGVuY3kpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBsZXQgb3V0SWROYW1lID0gY29tYmluZUlkQW5kUHJvcChvdXRJZFByb3ApO1xuICAgICAgICAgICAgICAgIC8vIGlmIHRoaXMgb3V0cHV0IGlzIGFsc28gYW4gaW5wdXQsIGFkZCBgb3V0cHV0VGFnYCB0byB0aGUgbmFtZVxuICAgICAgICAgICAgICAgIGlmIChhbHNvSW5wdXQpIHtcbiAgICAgICAgICAgICAgICAgICAgZHVwbGljYXRlT3V0cHV0cy5wdXNoKG91dElkUHJvcCk7XG4gICAgICAgICAgICAgICAgICAgIG91dElkTmFtZSArPSBvdXRwdXRUYWc7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGFkZE91dHB1dFRvTXVsdGkoe30sIG91dElkTmFtZSk7XG4gICAgICAgICAgICAgICAgYWRkTWFwKG91dHB1dE1hcCwgb3V0SWQsIHByb3BlcnR5LCBmaW5hbERlcGVuZGVuY3kpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcblxuICAgICAgICBpbnB1dHMuZm9yRWFjaChpbnB1dE9iamVjdCA9PiB7XG4gICAgICAgICAgICBjb25zdCB7aWQ6IGluSWQsIHByb3BlcnR5OiBpblByb3B9ID0gaW5wdXRPYmplY3Q7XG4gICAgICAgICAgICBpZiAodHlwZW9mIGluSWQgPT09ICdvYmplY3QnKSB7XG4gICAgICAgICAgICAgICAgYWRkUGF0dGVybihpbnB1dFBhdHRlcm5zLCBpbklkLCBpblByb3AsIGZpbmFsRGVwZW5kZW5jeSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGFkZE1hcChpbnB1dE1hcCwgaW5JZCwgaW5Qcm9wLCBmaW5hbERlcGVuZGVuY3kpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICB9KTtcblxuICAgIC8vIHNlY29uZCBwYXNzIGZvciBhZGRpbmcgbmV3IG91dHB1dCBub2RlcyBhcyBkZXBlbmRlbmNpZXMgd2hlcmUgbmVlZGVkXG4gICAgZHVwbGljYXRlT3V0cHV0cy5mb3JFYWNoKGR1cGVPdXRJZFByb3AgPT4ge1xuICAgICAgICBjb25zdCBvcmlnaW5hbE5hbWUgPSBjb21iaW5lSWRBbmRQcm9wKGR1cGVPdXRJZFByb3ApO1xuICAgICAgICBjb25zdCBuZXdOYW1lID0gb3JpZ2luYWxOYW1lLmNvbmNhdChvdXRwdXRUYWcpO1xuICAgICAgICBmb3IgKHZhciBjbnQgPSAwOyBjbnQgPCBjYkluLmxlbmd0aDsgY250KyspIHtcbiAgICAgICAgICAgIC8vIGNoZWNrIGlmIGlucHV0IHRvIHRoZSBjYWxsYmFja1xuICAgICAgICAgICAgaWYgKGNiSW5bY250XS5zb21lKGluTmFtZSA9PiBpbk5hbWUgPT09IG9yaWdpbmFsTmFtZSkpIHtcbiAgICAgICAgICAgICAgICAvKiBtYWtlIHN1cmUgaXQncyBub3QgYWxzbyBhbiBvdXRwdXQgb2YgdGhlIGNhbGxiYWNrXG4gICAgICAgICAgICAgICAgICogKHRoaXMgd2lsbCBiZSB0aGUgb3JpZ2luYWwgY2FsbGJhY2spXG4gICAgICAgICAgICAgICAgICovXG4gICAgICAgICAgICAgICAgaWYgKCFjYk91dFtjbnRdLnNvbWUob3V0TmFtZSA9PiBvdXROYW1lID09PSBuZXdOYW1lKSkge1xuICAgICAgICAgICAgICAgICAgICBjYk91dFtjbnRdLmZvckVhY2gob3V0TmFtZSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBhZGRJbnB1dFRvTXVsdGkobmV3TmFtZSwgb3V0TmFtZSwgZmFsc2UpO1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9KTtcblxuICAgIHJldHVybiBmaW5hbEdyYXBocztcbn1cblxuZnVuY3Rpb24gZmluZFdpbGRjYXJkS2V5cyhpZCkge1xuICAgIGNvbnN0IG1hdGNoS2V5cyA9IFtdO1xuICAgIGNvbnN0IGFsbHNtYWxsZXJLZXlzID0gW107XG4gICAgaWYgKHR5cGVvZiBpZCA9PT0gJ29iamVjdCcpIHtcbiAgICAgICAgZm9yRWFjaE9iakluZGV4ZWQoKHZhbCwga2V5KSA9PiB7XG4gICAgICAgICAgICBpZiAodmFsID09PSBNQVRDSCkge1xuICAgICAgICAgICAgICAgIG1hdGNoS2V5cy5wdXNoKGtleSk7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKHZhbCA9PT0gQUxMU01BTExFUikge1xuICAgICAgICAgICAgICAgIGFsbHNtYWxsZXJLZXlzLnB1c2goa2V5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSwgaWQpO1xuICAgICAgICBtYXRjaEtleXMuc29ydCgpO1xuICAgICAgICBhbGxzbWFsbGVyS2V5cy5zb3J0KCk7XG4gICAgfVxuICAgIHJldHVybi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F0IHRoaXMgc3RhZ2UuXG4gICAgICAgICAgICBpZiAocmVmS2V5cyAmJiBwYXR0ZXJuVmFsICE9PSBBTEwpIHtcbiAgICAgICAgICAgICAgICBjb25zdCByZWZJbmRleCA9IHJlZktleXMuaW5kZXhPZihrZXlzW2ldKTtcbiAgICAgICAgICAgICAgICBjb25zdCByZWZQYXR0ZXJuVmFsID0gcmVmUGF0dGVyblZhbHNbcmVmSW5kZXhdO1xuICAgICAgICAgICAgICAgIC8vIFNhbml0eSBjaGVjay4gU2hvdWxkbid0IGV2ZXIgZmFpbCB0aGlzLCBpZiB0aGUgYmFjayBlbmRcbiAgICAgICAgICAgICAgICAvLyBkaWQgaXRzIGpvYiB2YWxpZGF0aW5nIGNhbGxiYWNrcy5cbiAgICAgICAgICAgICAgICAvLyBZb3UgY2FuJ3QgcmVzb2x2ZSBhbiBpbnB1dCBhZ2FpbnN0IGFuIGlucHV0LCBiZWNhdXNlXG4gICAgICAgICAgICAgICAgLy8gdHdvIEFMTFNNQUxMRVIncyB3b3VsZG4ndCBtYWtlIHNlbnNlIVxuICAgICAgICAgICAgICAgIGlmIChwYXR0ZXJuVmFsID09PSBBTExTTUFMTEVSICYmIHJlZlBhdHRlcm5WYWwgPT09IEFMTFNNQUxMRVIpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFxuICAgICAgICAgICAgICAgICAgICAgICAgJ2ludmFsaWQgd2lsZGNhcmQgaWQgcGFpcjogJyArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgSlNPTi5zdHJpbmdpZnkoe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBrZXlzLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXR0ZXJuVmFscyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFscyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmS2V5cyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmUGF0dGVyblZhbHMsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZlZhbHNcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgIGlkVmFsU29ydCh2YWwsIHJlZlZhbHNbcmVmSW5kZXhdKSAhPT1cbiAgICAgICAgICAgICAgICAgICAgKHBhdHRlcm5WYWwgPT09IEFMTFNNQUxMRVJcbiAgICAgICAgICAgICAgICAgICAgICAgID8gLTFcbiAgICAgICAgICAgICAgICAgICAgICAgIDogcmVmUGF0dGVyblZhbCA9PT0gQUxMU01BTExFUlxuICAgICAgICAgICAgICAgICAgICAgICAgPyAxXG4gICAgICAgICAgICAgICAgICAgICAgICA6IDApXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSBpZiAodmFsICE9PSBwYXR0ZXJuVmFsKSB7XG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIHRydWU7XG59XG5cbmZ1bmN0aW9uIGdldEFueVZhbHMocGF0dGVyblZhbHMsIHZhbHMpIHtcbiAgICBjb25zdCBtYXRjaGVzID0gW107XG4gICAgZm9yIChsZXQgaSA9IDA7IGkgPCBwYXR0ZXJuVmFscy5sZW5ndGg7IGkrKykge1xuICAgICAgICBpZiAocGF0dGVyblZhbHNbaV0gPT09IE1BVENIKSB7XG4gICAgICAgICAgICBtYXRjaGVzLnB1c2godmFsc1tpXSk7XG4gICAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIG1hdGNoZXMubGVuZ3RoID8gSlNPTi5zdHJpbmdpZnkobWF0Y2hlcykgOiAnJztcbn1c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ZSB7XG4gICAgICAgICAgICAgICAgLypcbiAgICAgICAgICAgICAgICAgKiBJZiBldmVyeSBvdXRwdXQgaGFzIEFMTCB3ZSBuZWVkIHRvIHJlZHVjZSByZXNvbHZlZCBzZXRcbiAgICAgICAgICAgICAgICAgKiB0byBvbmUgaXRlbSBwZXIgY29tYmluYXRpb24gb2YgTUFUQ0ggdmFsdWVzLlxuICAgICAgICAgICAgICAgICAqIFRoYXQgd2lsbCBnaXZlIG9uZSByZXN1bHQgcGVyIGNhbGxiYWNrIGludm9jYXRpb24uXG4gICAgICAgICAgICAgICAgICovXG4gICAgICAgICAgICAgICAgY29uc3QgYW55U2VlbiA9IHt9O1xuICAgICAgICAgICAgICAgIG91dHB1dHMuZm9yRWFjaChvdXRQYXR0ZXJuID0+IHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3Qgb3V0U2V0ID0gcmVzb2x2ZShwYXRocykob3V0UGF0dGVybikuZmlsdGVyKGkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgbWF0Y2hTdHIgPSBKU09OLnN0cmluZ2lmeShwcm9wcyhtYXRjaEtleXMsIGkuaWQpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghYW55U2VlblttYXRjaFN0cl0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbnlTZWVuW21hdGNoU3RyXSA9IDE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICBhZGRSZXNvbHZlZEZyb21PdXRwdXRzKFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FsbGJhY2ssXG4gICAgICAgICAgICAgICAgICAgICAgICBvdXRQYXR0ZXJuLFxuICAgICAgICAgICAgICAgICAgICAgICAgb3V0U2V0LFx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5cbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIGdldFVuZmlsdGVyZWRMYXlvdXRDYWxsYmFja3MoZ3JhcGhzLCBwYXRocywgbGF5b3V0Q2h1bmssIG9wdHMpIHtcbiAgICBjb25zdCB7b3V0cHV0c09ubHksIHJlbW92ZWRBcnJheUlucHV0c09ubHksIG5ld1BhdGhzLCBjaHVua1BhdGh9ID0gb3B0cztcbiAgICBjb25zdCBmb3VuZENiSWRzID0ge307XG4gICAgY29uc3QgY2FsbGJhY2tzID0gW107XG5cbiAgICBmdW5jdGlvbiBhZGRDYWxsYmFjayhjYWxsYmFjaykge1xuICAgICAgICBpZiAoY2FsbGJhY2spIHtcbiAgICAgICAgICAgIGNvbnN0IGZvdW5kSW5kZXggPSBmb3VuZENiSWRzW2NhbGxiYWNrLnJlc29sdmVkSWRdO1xuICAgICAgICAgICAgaWYgKGZvdW5kSW5kZXggIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgIGNvbnN0IGZvdW5kQ2IgPSBjYWxsYmFja3NbZm91bmRJbmRleF07XG4gICAgICAgICAgICAgICAgZm91bmRDYi5jaGFuZ2VkUHJvcElkcyA9IG1lcmdlTWF4KFxuICAgICAgICAgICAgICAgICAgICBmb3VuZENiLmNoYW5nZWRQcm9wSWRzLFxuICAgICAgICAgICAgICAgICAgICBjYWxsYmFjay5jaGFuZ2VkUHJvcElkc1xuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgaWYgKGNhbGxiYWNrLmluaXRpYWxDYWxsKSB7XG4gICAgICAgICAgICAgICAgICAgIGZvdW5kQ2IuaW5pdGlhbENhbGwgPSB0cnVlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgZm91bmRDYklkc1tjYWxsYmFjay5yZXNvbHZlZElkXSA9IGNhbGxiYWNrcy5sZW5ndGg7XG4gICAgICAgICAgICAgICAgY2FsbGJhY2tzLnB1c2goY2FsbGJhY2spO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gYWRkQ2FsbGJhY2tJZkFycmF5KGlkU3RyKSB7XG4gICAgICAgIHJldHVybiBjYiA9PlxuICAgICAgICAgICAgY2IuZ2V0SW5wdXRzKHBhdGhzKS5zb21lKGluaSA9PiB7XG4gICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICBBcnJheS5pc0FycmF5KGluaSkgJiZcbiAgICAgICAgICAgICAgICAgICAgaW5pLnNvbWUoaW5paiA9PiBzdHJpbmdpZnlJZChpbmlqLmlkKSA9PT0gaWRTdHIpXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIFRoaXMgY2FsbGJhY2sgc2hvdWxkIHRyaWdnZXIgZXZlbiB3aXRoIG5vIGNoYW5nZWRQcm9wcyxcbiAgICAgICAgICAgICAgICAgICAgLy8gc2luY2UgdGhlIHByb3BzIHRoYXQgY2hhbmdlZCBubyBsb25nZXIgZXhpc3QuXG4gICAgICAgICAgICAgICAgICAgIC8vIFdlJ3JlIGtpbmQgb2YgYWJ1c2luZyB0aGUgYGluaXRpYWxDYWxsYCBmbGFnIGhlcmUsIGl0J3NcbiAgICAgICAgICAgICAgICAgICAgLy8gbW9yZSBsaWtlIGEgXCJmaW5hbCBjYWxsXCIgZm9yIHRoZSByZW1vdmVkIGlucHV0cywgYnV0XG4gICAgICAgICAgICAgICAgICAgIC8vIHRoaXMgY2FzZSBpcyBub3Qgc3ViamVjdCB0byBgcHJldmVudF9pbml0aWFsX2NhbGxgLlxuICAgICAgICAgICAgICAgICAgICBpZiAoZmxhdHRlbihjYi5nZXRPdXRwdXRzKG5ld1BhdGhzKSkubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjYi5pbml0aWFsQ2FsbCA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgICAgICBjYi5jaGFuZ2VkUHJvcElkcyA9IHt9O1xuICAgICAgICAgICAgICAgICAgICAgICAgYWRkQ2FsbGJhY2soY2IpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICB9KTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBoYW5kbGVPbmVJZChpZCwgb3V0SWRDYWxsYmFja3MsIGluSWRDYWxsYmFja3MpIHtcbiAgICAgICAgaWYgKG91dElkQ2FsbGJhY2tzKSB7XG4gICAgICAgICAgICBmb3IgKGNvbnN0IHByb3BlcnR5IGluIG91dElkQ2FsbGJhY2tzKSB7XG4gICAgICAgICAgICAgICAgY29uc3QgY2IgPSBnZXRDYWxsYmFja0J5T3V0cHV0KGdyYXBocywgcGF0aHMsIGlkLCBwcm9wZXJ0eSk7XG4gICAgICAgICAgICAgICAgaWYgKGNiKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIGNhbGxiYWNrcyBmb3VuZCBpbiB0aGUgbGF5b3V0IGJ5IG91dHB1dCBzaG91bGQgYWx3YXlzIHJ1blxuICAgICAgICAgICAgICAgICAgICAvLyB1bmxlc3Mgc3BlY2lmaWNhbGx5IHJlcXVlc3RlZCBub3QgdG8uXG4gICAgICAgICAgICAgICAgICAgIC8vIGllIHRoaXMgaXMgdGhlIGluaXRpYWwgY2FsbCBvZiB0aGlzIGNhbGxiYWNrIGV2ZW4gaWYgaXQnc1xuICAgICAgICAgICAgICAgICAgICAvLyBub3QgdGhlIHBhZ2UgaW5pdGlhbGl6YXRpb24gYnV0IGp1c3QgYSBuZXcgbGF5b3V0IGNodW5rXG4gICAgICAgICAgICAgICAgICAgIGlmICghY2IuY2FsbGJhY2sucHJldmVudF9pbml0aWFsX2NhbGwpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNiLmluaXRpYWxDYWxsID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGFkZENhbGxiYWNrKGNiKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBpZiAoIW91dHB1dHNPbmx5ICYmIGluSWRDYWxsYmFja3MpIHtcbiAgICAgICAgICAgIGNvbnN0IG1heWJlQWRkQ2FsbGJhY2sgPSByZW1vdmVkQXJyYXlJbnB1dHNPbmx5XG4gICAgICAgICAgICAgICAgPyBhZGRDYWxsYmFja0lmQXJyYXkoc3RyaW5naWZ5SWQoaWQpKVxuICAgICAgICAgICAgICAgIDogYWRkQ2FsbGJhY2s7XG4gICAgICAgICAgICBsZXQgaGFuZGxlVGhpc0NhbGxiYWNrID0gbWF5YmVBZGRDYWxsYmFjaztcbiAgICAgICAgICAgIGlmIChjaHVua1BhdGgpIHtcbiAgICAgICAgICAgICAgICBoYW5kbGVUaGlzQ2FsbGJhY2sgPSBjYiA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICFhbGwoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhcnRzV2l0aChjaHVua1BhdGgpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBsdWNrKCdwYXRoJywgZmxhdHRlbihjYi5nZXRPdXRwdXRzKHBhdGhzKSkpXG4gICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbWF5YmVBZGRDYWxsYmFjayhjYik7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZm9yIChjb25zdCBwcm9wZXJ0eSBpbiBpbklkQ2FsbGJhY2tzKSB7XG4gICAgICAgICAgICAgICAgZ2V0Q2FsbGJhY2tzQnlJbnB1dChcbiAgICAgICAgICAgICAgICAgICAgZ3JhcGhzLFxuICAgICAgICAgICAgICAgICAgICBwYXRocyxcbiAgICAgICAgICAgICAgICAgICAgaWQsXG4gICAgICAgICAgICAgICAgICAgIHByb3BlcnR5LFxuICAgICAgICAgICAgICAgICAgICBJTkRJUkVDVFxuICAgICAgICAgICAgICAgICkuZm9yRWFjaChoYW5kbGVUaGlzQ2FsbGJhY2spO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgY3Jhd2xMYXlvdXQobGF5b3V0Q2h1bmssIGNoaWxkID0+IHtcbiAgICAgICAgY29uc3QgaWQgPSBwYXRoKFsncHJvcHMnLCAnaWQnXSwgY2hpbGQpO1xuICAgICAgICBpZiAoaWQpIHtcbiAgICAgICAgICAgIGlmICh0eXBlb2YgaWQgPT09ICdzdHJpbmcnICYmICFyZW1vdmVkQXJyYXlJbnB1dHNPbmx5KSB7XG4gICAgICAgICAgICAgICAgaGFuZGxlT25lSWQoaWQsIGdyYXBocy5vdXRwdXRNYXBbaWRdLCBncmFwaHMuaW5wdXRNYXBbaWRdKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgY29uc3Qga2V5U3RyID0gT2JqZWN0LmtleXMoaWQpLnNvcnQoKS5qb2luKCcsJyk7XG4gICAgICAgICAgICAgICAgaGFuZGxlT25lSWQoXG4gICAgICAgICAgICAgICAgICAgIGlkLFxuICAgICAgICAgICAgICAgICAgICAhcmVtb3ZlZEFycmF5SW5wdXRzT25seSAmJiBncmFwaHMub3V0cHV0UGF0dGVybnNba2V5U3RyXSxcbiAgICAgICAgICAgICAgICAgICAgZ3JhcGhzLmlucHV0UGF0dGVybnNba2V5U3RyXVxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9KTtcblxuICAgIHJldHVybiBtYXAoXG4gICAgICAgIGNiID0+ICh7XG4gICAgICAgICAgICAuLi5jYixcbiAgICAgICAgICAgIHByaW9yaXR5OiBnZXRQc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0KTtcbiAgICAgICAgY29uc3QgcmVhZHkgPSBpc1JlYWR5KGNvbXBvbmVudCk7XG5cbiAgICAgICAgaWYgKHJlYWR5ICYmIHR5cGVvZiByZWFkeS50aGVuID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICBwcm9taXNlcy5wdXNoKFxuICAgICAgICAgICAgICAgIFByb21pc2UucmFjZShbXG4gICAgICAgICAgICAgICAgICAgIHJlYWR5LFxuICAgICAgICAgICAgICAgICAgICByZW5kZXJlZC50aGVuKFxuICAgICAgICAgICAgICAgICAgICAgICAgKCkgPT4gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoc3RyaW5naWZ5SWQoaWQpKSAmJiByZWFkeVxuICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgXSlcbiAgICAgICAgICAgICk7XG4gICAgICAgIH1cbiAgICB9KTtcblxuICAgIHJldHVybiBwcm9taXNlcy5sZW5ndGggPyBQcm9taXNlLmFsbChwcm9taXNlcykgOiB0cnVlO1xufTtcbiIsImltcG9ydCB7XG4gICAgY29uY2F0LFxuICAgIGZpbHRlcixcbiAgICBmaW5kLFxuICAgIGZvckVhY2hPYmpJbmRleGVkLFxuICAgIGluc2VydCxcbiAgICBwYXRoLFxuICAgIHByb3BFcSxcbiAgICBwcm9wcyxcbiAgICBpbmRleE9mXG59IGZyb20gJ3JhbWRhJztcblxuaW1wb3J0IHtjcmF3bExheW91dH0gZnJvbSAnLi91dGlscyc7XG5cbi8qXG4gKiBzdGF0ZS5wYXRocyBoYXMgc3RydWN0dXJlOlxuICoge1xuICogICBzdHJzOiB7W2lkXTogcGF0aH0gLy8gZm9yIHJlZ3VsYXIgc3RyaW5nIGlkc1xuICogICBvYmpzOiB7W2tleVN0cl06IFt7dmFsdWVzLCBwYXRofV19IC8vIGZvciB3aWxkY2FyZCBpZHNcbiAqIH1cbiAqIGtleVN0cjogc29ydGVkIGtleXMgb2YgdGhlIGlkLCBqb2luZWQgd2l0aCAnLCc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pdGVtcGF0aCkgPT4ge1xuICAgICAgICBjb25zdCBpZCA9IHBhdGgoWydwcm9wcycsICdpZCddLCBjaGlsZCk7XG4gICAgICAgIGlmIChpZCkge1xuICAgICAgICAgICAgaWYgKHR5cGVvZiBpZCA9PT0gJ29iamVjdCcpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBrZXlzID0gT2JqZWN0LmtleXMoaWQpLnNvcnQoKTtcbiAgICAgICAgICAgICAgICBjb25zdCB2YWx1ZXMgPSBwcm9wcyhrZXlzLCBpZCk7XG4gICAgICAgICAgICAgICAgY29uc3Qga2V5U3RyID0ga2V5cy5qb2luKCcsJyk7XG4gICAgICAgICAgICAgICAgY29uc3QgcGF0aHMgPSAob2Jqc1trZXlTdHJdID0gb2Jqc1trZXlTdHJdIHx8IFtdKTtcbiAgICAgICAgICAgICAgICBjb25zdCBvbGRpZSA9IG9sZE9ianNba2V5U3RyXSB8fCBbXTtcbiAgICAgICAgICAgICAgICBjb25zdCBpdGVtID0ge3ZhbHVlcywgcGF0aDogY29uY2F0KHN0YXJ0aW5nUGF0aCwgaXRlbXBhdGgpfTtcbiAgICAgICAgICAgICAgICBjb25zdCBpbmRleCA9IGluZGV4T2YoaXRlbSwgb2xkaWUpO1xuICAgICAgICAgICAgICAgIGlmIChpbmRleCA9PT0gLTEpIHtcbiAgICAgICAgICAgICAgICAgICAgcGF0aHMucHVzaChpdGVtKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBvYmpzW2tleVN0cl0gPSBpbnNlcnQoaW5kZXgsIGl0ZW0sIHBhdGhzKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHN0cnNbaWRdID0gY29uY2F0KHN0YXJ0aW5nUGF0aCwgaXRlbXBhdGgpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfSk7XG5cbiAgICAvLyBXZSBpbmNsdWRlIGFuIGV2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xkcmVuJ107XG5cbi8vIGNyYXdsIGEgbGF5b3V0IG9iamVjdCBvciBjaGlsZHJlbiBhcnJheSwgYXBwbHkgYSBmdW5jdGlvbiBvbiBldmVyeSBvYmplY3RcbmV4cG9ydCBjb25zdCBjcmF3bExheW91dCA9IChcbiAgICBvYmplY3QsXG4gICAgZnVuYyxcbiAgICBjdXJyZW50UGF0aCA9IFtdLFxuICAgIGV4dHJhUGF0aCA9IHVuZGVmaW5lZFxuKSA9PiB7XG4gICAgaWYgKEFycmF5LmlzQXJyYXkob2JqZWN0KSkge1xuICAgICAgICAvLyBjaGlsZHJlbiBhcnJheVxuICAgICAgICBvYmplY3QuZm9yRWFjaCgoY2hpbGQsIGkpID0+IHtcbiAgICAgICAgICAgIGlmIChleHRyYVBhdGgpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBvYmpPZiA9IGZpbmRJbmRleChwID0+IGluY2x1ZGVzKCd7fScsIHApLCBleHRyYVBhdGgpO1xuICAgICAgICAgICAgICAgIGlmIChvYmpPZiAhPT0gLTEpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgZnJvbnQgPSBzbGljZSgwLCBvYmpPZiwgZXh0cmFQYXRoKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgYmFjayA9IHNsaWNlKG9iak9mLCBleHRyYVBhdGgubGVuZ3RoLCBleHRyYVBhdGgpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoZnJvbnQubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjcmF3bExheW91dChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXRoKGZyb250LCBjaGlsZCksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuYyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25jYXQoY3VycmVudFBhdGgsIGNvbmNhdChbaV0sIGZyb250KSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFja1xuICAgICAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGJhY2tQYXRoID0gYmFja1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5tYXAocCA9PiBwLnJlcGxhY2UoJ3t9JywgJycpKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5maWx0ZXIoZSA9PiBlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjaGlsZE9iaixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaGlsZFBhdGggPSBjb25jYXQoW2ldLCBiYWNrUGF0aCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoYmFja1BhdGgubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2hpbGRPYmogPSBwYXRoKGJhY2tQYXRoLCBjaGlsZCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNoaWxkT2JqID0gY2hpbGQ7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGNvbnN0IGtleSBpbiBjaGlsZE9iaikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHZhbHVlID0gY2hpbGRPYmpba2V5XTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjcmF3bExheW91dChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmMsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmNhdChjdXJyZW50UGF0aCwgY2hpbGRQYXRoLmNvbmNhdChba2V5XSkpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGNyYXdsTGF5b3V0KFxuICAgICAgICAgICAgICAgICAgICAgICAgcGF0aChleHRyYVBhdGgsIGNoaWxkKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmMsXG4gICAgICAgICAgICAgICAgICAgICAgICBjb25jYXQoY3VycmVudFBhdGgsIGNvbmNhdChbaV0sIGV4dHJhUGF0aCkpXG4gICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBjcmF3bExheW91dChjaGlsZCwgZnVuYywgYXBwZW5kKGksIGN1cnJlbnRQYXRoKSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgIH0gZWxzZSBpZiAodHlwZShvYmplY3QpID09PSAnT2JqZWN0Jykge1xuICAgICAgICBmdW5jKG9iamVjdCwgY3VycmVudFBhdGgpO1xuXG4gICAgICAgIGNvbnN0IGNoaWxkcmVuID0gcGF0aChwcm9wc0NoaWxkcmVuLCBvYmplY3QpO1xuICAgICAgICBpZiAoY2hpbGRyZW4pIHtcbiAgICAgICAgICAgIGNvbnN0IG5ld1BhdGggPSBjb25jYXQoY3VycmVudFBhdGgsIHByb3BzQ2hpbGRyZW4pO1xuICAgICAgICAgICAgY3Jhd2xMYXlvdXQoY2hpbGRyZW4sIGZ1bmMsIG5ld1BhdGgpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgY2hpbGRyZW5Qcm9wcyA9IHBhdGhPcihcbiAgICAgICAgICAgIFtdLFxuICAgICAgICAgICAgW29iamVjdC5uYW1lc3BhY2UsIG9iamVjdC50eXBlXSxcbiAgICAgICAgICAgIHdpbmRvdy5fX2Rhc2hwcml2YXRlX2NoaWxkcmVuUHJvcHNcbiAgICAgICAgKTtcbiAgICAgICAgY2hpbGRyZW5Qcm9wcy5mb3JFYWNoKGNoaWxkcmVuUHJvcCA9PiB7XG4gICAgICAgICAgICBpZiAoY2hpbGRyZW5Qcm9wLmluY2x1ZGVzKCdbXScpKSB7XG4gICAgICAgICAgICAgICAgbGV0IFtmcm9udFBhdGgsIGJhY2tQYXRoXSA9IGNoaWxkcmVuUHJvcFxuICAgICAgICAgICAgICAgICAgICAuc3BsaXQoJ1tdJylcbiAgICAgICAgICAgICAgICAgICAgLm1hcChwID0+IHAuc3BsaXQoJy4nKS5maWx0ZXIoZSA9PiBlKSk7XG5cbiAgICAgICAgICAgICAgICBjb25zdCBmcm9udCA9IGNvbmNhdChbJ3Byb3BzJ10sIGZyb250UGF0aCk7XG4gICAgICAgICAgICAgICAgY29uc3QgYmFzZVBhdGggPSBjb25jYXQoY3VycmVudFBhdGgsIGZyb250KTtcbiAgICAgICAgICAgICAgICBjcmF3bExheW91dChwYXRoKGZyb250LCBvYmplY3QpLCBmdW5jLCBiYXNlUGF0aCwgYmFja1BhdGgpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBpZiAoY2hpbGRyZW5Qcm9wLmluY2x1ZGVzKCd7fScpKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IG9wYXRoID0gY2hpbGRyZW5Qcm9wLnNwbGl0KCcuJyk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGZyb250UGF0aCA9IFtdO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBiYWNrUGF0aCA9IFtdO1xuICAgICAgICAgICAgICAgICAgICBsZXQgZm91bmQgPSBmYWxzZTtcblxuICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IG9wYXRoLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBjdXJQYXRoID0gb3BhdGhbaV07XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWZvdW5kICYmIGN1clBhdGguaW5jbHVkZXMoJ3t9JykpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3VuZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZnJvbnRQYXRoLnB1c2goY3VyUGF0aC5yZXBsYWNlKCd7fScsICcnKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChmb3VuZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYWNrUGF0aC5wdXNoKGN1clBhdGgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZyb250UGF0aC5wdXNoKGN1clBhdGgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBjb25zdCBuZXdQYXRoID0gY29uY2F0KGN1cnJlbnRQYXRoLCBbXG4gICAgICAgICAgICAgICAgICAgICAgICAncHJvcHMnLFxuICAgICAgICAgICAgICAgICAgICAgICAgLi4uZnJvbnRQYXRoXG4gICAgICAgICAgICAgICAgICAgIF0pO1xuXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IG9WYWx1ZSA9IHBhdGgoWydwcm9wcycsIC4uLmZyb250UGF0aF0sIG9iamVjdCk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChvVmFsdWUgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChjb25zdCBrZXkgaW4gb1ZhbHVlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgdmFsdWUgPSBvVmFsdWVba2V5XTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoYmFja1BhdGgubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNyYXdsTGF5b3V0KFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGF0aChiYWNrUGF0aCwgdmFsdWUpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuYyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmNhdChuZXdQYXRoLCBba2V5LCAuLi5iYWNrUGF0aF0pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3Jhd2xMYXlvdXQodmFsdWUsIGZ1bmMsIFsuLi5uZXdQYXRoLCBrZXldKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBuZXdQYXRoID0gY29uY2F0KGN1cnJlbnRQYXRoLCBbXG4gICAgICAgICAgICAgICAgICAgICAgICAncHJvcHMnLFxuICAgICAgICAgICAgICAgICAgICAgICAgLi4uY2hpbGRyZW5Qcm9wLnNwbGl0KCcuJylcbiAgICAgICAgICAgICAgICAgICAgXSk7XG4gICAgICAgICAgICAgICAgICAgIGNyYXdsTGF5b3V0KFxuICAgICAgICAgICAgICAgICAgICAgICAgcGF0aChbJ3Byb3BzJywgLi4uY2hpbGRyZW5Qcm9wLnNwbGl0KCcuJyldLCBvYmplY3QpLFxuICAgICAgICAgICAgICAgICAgICAgICAgZnVuYyxcbiAgICAgICAgICAgICAgICAgICAgICAgIG5ld1BhdGhcbiAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgIH1cbn07XG5cbi8vIFRoZXJlIGFyZSBwYWNrYWdlcyBmb3IgdGhpcyBidXQgaXQncyBzaW1wbGUgZW5vdWdoLC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V4Y2VwdCB3aXRoIGEgYmV0dGVyIG1lc3NhZ2UuXG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiB0eXBlU3BlY3NbdHlwZVNwZWNOYW1lXSAhPT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICAgICAgICAgICAgICBlcnJvciA9IEVycm9yKFxuICAgICAgICAgICAgICAgICAgICAgICAgKGNvbXBvbmVudE5hbWUgfHwgJ1JlYWN0IGNsYXNzJykgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICc6ICcgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvY2F0aW9uICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnIHR5cGUgYCcgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGVTcGVjTmFtZSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2AgaXMgaW52YWxpZDsgJyArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2l0IG11c3QgYmUgYSBmdW5jdGlvbiwgdXN1YWxseSBmcm9tIHRoZSBgcHJvcC10eXBlc2AgcGFja2FnZSwgYnV0IHJlY2VpdmVkIGAnICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlb2YgdHlwZVNwZWNzW3R5cGVTcGVjTmFtZV0gK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdgLidcbiAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgZXJyb3IubmFtZSA9ICdJbnZhcmlhbnQgVmlvbGF0aW9uJztcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBlcnJvciA9IHR5cGVTcGVjc1t0eXBlU3BlY05hbWVdKFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWVzLFxuICAgICAgICAgICAgICAgICAgICAgICAgdHlwZVNwZWNOYW1lLFxuICAgICAgICAgICAgICAgICAgICAgICAgY29tcG9uZW50TmFtZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxvY2F0aW9uLFxuICAgICAgICAgICAgICAgICAgICAgICAgbnVsbCxcbiAgICAgICAgICAgICAgICAgICAgICAgIFJlYWN0UHJvcFR5cGVzU2VjcmV0XG4gICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBjYXRjaCAoZXgpIHtcbiAgICAgICAgICAgICAgICBlcnJvciA9IGV4O1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKGVycm9yICYmICEoZXJyb3IgaW5zdGFuY2VvZiBFcnJvcikpIHtcbiAgICAgICAgICAgICAgICBlcnJvcnMucHVzaChcbiAgICAgICAgICAgICAgICAgICAgKGNvbXBvbmVudE5hbWUgfHwgJ1JlYWN0IGNsYXNzJykgK1xuICAgICAgICAgICAgICAgICAgICAgICAgJzogdHlwZSBzcGVjaWZpY2F0aW9uIG9mICcgK1xuICAgICAgICAgICAgICAgICAgICAgICAgbG9jYXRpb24gK1xuICAgICAgICAgICAgICAgICAgICAgICAgJyBgJyArXG4gICAgICAgICAgICAgICAgICAgICAgICB0eXBlU3BlY05hbWUgK1xuICAgICAgICAgICAgICAgICAgICAgICAgJ2AgaXMgaW52YWxpZDsgdGhlIHR5cGUgY2hlY2tlciAnICtcbiAgICAgICAgICAgICAgICAgICAgICAgICdmdW5jdGlvbiBtdXN0IHJldHVybiBgbnVsbGAgb3IgYW4gYEVycm9yYCBidXQgcmV0dXJuZWQgYSAnICtcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGVvZiBlcnJvciArXG4gICAgICAgICAgICAgICAgICAgICAgICAnLiAnICtcbiAgICAgICAgICAgICAgICAgICAgICAgICdZb3UgbWF5IGhhdmUgZm9yZ290dGVuIHRvIHBhc3MgYW4gYXJndW1lbnQgdG8gdGhlIHR5cGUgY2hlY2tlciAnICtcbiAgICAgICAgICAgICAgICAgICAgICAgICdjcmVhdG9yIChhcnJheU9mLCBpbnN0YW5jZU9mL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GVudC5oYXJkKSBvciBuZXcgcGFja2FnZSBhc3NldHNcbiAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICByZWxvYWRSZXF1ZXN0LmNvbnRlbnQuaGFyZCB8fFxuICAgICAgICAgICAgICAgICFlcXVhbHMoXG4gICAgICAgICAgICAgICAgICAgIHJlbG9hZFJlcXVlc3QuY29udGVudC5wYWNrYWdlcy5sZW5ndGgsXG4gICAgICAgICAgICAgICAgICAgIHBhdGhPcihcbiAgICAgICAgICAgICAgICAgICAgICAgIFtdLFxuICAgICAgICAgICAgICAgICAgICAgICAgWydyZWxvYWRSZXF1ZXN0JywgJ2NvbnRlbnQnLCAncGFja2FnZXMnXSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHByZXZTdGF0ZVxuICAgICAgICAgICAgICAgICAgICApLmxlbmd0aFxuICAgICAgICAgICAgICAgICkgfHxcbiAgICAgICAgICAgICAgICAhZXF1YWxzKFxuICAgICAgICAgICAgICAgICAgICBzb3J0KGNvbXBhcmF0b3IobHQpLCByZWxvYWRSZXF1ZXN0LmNvbnRlbnQucGFja2FnZXMpLFxuICAgICAgICAgICAgICAgICAgICBzb3J0KFxuICAgICAgICAgICAgICAgICAgICAgICAgY29tcGFyYXRvcihsdCksXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXRoT3IoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgW10sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgWydyZWxvYWRSZXF1ZXN0JywgJ2NvbnRlbnQnLCAncGFja2FnZXMnXSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcmV2U3RhdGVcbiAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIC8vIExvb2sgaWYgaXQgd2FzIGEgY3NzIGZpbGUuXG4gICAgICAgICAgICAgICAgbGV0IHdhc19jc3MgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgcHJlZmVyLWNvbnN0XG4gICAgICAgICAgICAgICAgZm9yIChsZXQgYSBvZiByZWxvYWRSZXF1ZXN0LmNvbnRlbnQuZmlsZXMpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGEuaXNfY3NzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB3YXNfY3NzID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IG5vZGVzVG9EaXNhYmxlID0gW107XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIFNlYXJjaCBmb3IgdGhlIG9sZCBmaWxlIGJ5IHhwYXRoLlxuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgaXQgPSBkb2N1bWVudC5ldmFsdWF0ZShcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBgLy9saW5rW2NvbnRhaW5zKEBocmVmLCBcIiR7YS51cmx9XCIpXWAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5faGVhZFxuICAgICAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBub2RlID0gaXQuaXRlcmF0ZU5leHQoKTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgd2hpbGUgKG5vZGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBub2Rlc1RvRGlzYWJsZS5wdXNoKG5vZGUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vZGUgPSBpdC5pdGVyYXRlTmV4dCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgICAgICBmb3JFYWNoKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG4gPT4gbi5zZXRBdHRyaWJ1dGUoJ2Rpc2FibGVkJywgJ2Rpc2FibGVkJyksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbm9kZXNUb0Rpc2FibGVcbiAgICAgICAgICAgICAgICAgICAgICAgICk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChhLm1vZGlmaWVkID4gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGxpbmsgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdsaW5rJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluay5ocmVmID0gYCR7YS51cmx9P209JHthLm1vZGlmaWVkfWA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluay50eXBlID0gJ3RleHQvY3NzJztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaW5rLnJlbCA9ICdzdHlsZXNoZWV0JztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9oZWFkLmFwcGVuZENoaWxkKGxpbmspO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEVsc2UgdGhlIGZpbGUgd2FzIGRlbGV0ZWQuXG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBJZiB0aGVyZSdzIGFub3RoZXIga2luZCBvZiBmaWxlIGhlcmUgZG8gYSBoYXJkIHJlbG9hZC5cbiAgICAgICAgICAgICAgICAgICAgICAgIHdhc19jc3MgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICghd2FzX2Nzcykge1xuICAgICAgICAgICAgICAgICAgICAvLyBBc3NldHMgZmlsZSBoYXZlIGNoYW5nZWRcbiAgICAgICAgICAgICAgICAgICAgLy8gb3IgYSBjb21wb25lbnQgbGliIGhhcyBiZWVuIGFkZGVkL3JlbW92ZWQgLVxuICAgICAgICAgICAgICAgICAgICAvLyBNdXN0IGRvIGEgaGFyZCByZWxvYWRcbiAgICAgICAgICAgICAgICAgICAgd2luZG93LmxvY2F0aW9uLnJlbG9hZCgpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgLy8gQmFja2VuZCBjb2RlIGNoYW5nZWQgLSBjYW4gZG8gYSBzb2Z0IHJlbG9hZCBpbiBwbGFjZVxuICAgICAgICAgICAgICAgIGRpc3BhdGNoKHt0eXBlOiAnUkVMT0FEJ30pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2UgaWYgKFxuICAgICAgICAgICAgdGhpcy5zdGF0ZS5pbnRlcnZhbElkICE9PSBudWxsICYmXG4gICAgICAgICAgICByZWxvYWRSZXF1ZXN0LnN0YXR1cyA9PT0gNTAwXG4gICAgICAgICkge1xuICAgICAgICAgICAgaWYgKHRoaXMuX3JldHJ5ID4gdGhpcy5zdGF0ZS5tYXhfcmV0cnkpIHtcbiAgICAgICAgICAgICAgICB0aGlzLmNsZWFySW50ZXJ2YWwoKTtcbiAgICAgICAgICAgICAgICAvLyBJbnRlZ3JhdGUgd2l0aCBkZXYgdG9vbHMgdWk/IVxuICAgICAgICAgICAgICAgIHdpbmRvdy5hbGVydChcbiAgICAgICAgICAgICAgICAgICAgYEhvdCByZWxvYWRpbmcgaXMgZGlzYWJsZWQgYWZ0ZXIgZmFpbGluZyAke3RoaXMuX3JldHJ5fSB0aW1lcy4gYCArXG4gICAgICAgICAgICAgICAgICAgICAgICAnUGxlYXNlIGNoZWNrIHlvdXIgYXBwbGljYXRpb24gZm9yIGVycm9ycywgdGhlbiByZWZyZXNoIHRoZSBwYWdlLidcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdGhpcy5fcmV0cnkrKztcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGNvbXBvbmVudERpZE1vdW50KCkge1xuICAgICAgICBjb25zdCB7ZGlzcGF0Y2gs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AgICAgIGNvbnN1bWVkLnB1c2gocGFyZW50SWQpO1xuICAgICAgICAgICAgZWxlbWVudHMucHVzaCh7XG4gICAgICAgICAgICAgICAgZGF0YToge1xuICAgICAgICAgICAgICAgICAgICBpZDogcGFyZW50SWQsXG4gICAgICAgICAgICAgICAgICAgIGxhYmVsOiBpZFN0cixcbiAgICAgICAgICAgICAgICAgICAgdHlwZTogaWRUeXBlXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBzdHJ1Y3R1cmVbcGFyZW50SWRdID0gW107XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoIWNvbnN1bWVkLmluY2x1ZGVzKGNoaWxkSWQpKSB7XG4gICAgICAgICAgICBjb25zdW1lZC5wdXNoKGNoaWxkSWQpO1xuICAgICAgICAgICAgZWxlbWVudHMucHVzaCh7XG4gICAgICAgICAgICAgICAgZGF0YToge1xuICAgICAgICAgICAgICAgICAgICBpZDogY2hpbGRJZCxcbiAgICAgICAgICAgICAgICAgICAgbGFiZWw6IHByb3BlcnR5LFxuICAgICAgICAgICAgICAgICAgICBwYXJlbnQ6IHBhcmVudElkLFxuICAgICAgICAgICAgICAgICAgICB0eXBlOiAncHJvcGVydHknXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBzdHJ1Y3R1cmVbcGFyZW50SWRdLnB1c2goY2hpbGRJZCk7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gY2hpbGRJZDtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiByZWNvcmRFZGdlKHNvdXJjZSwgdGFyZ2V0LCB0eXBlKSB7XG4gICAgICAgIGVsZW1lbnRzLnB1c2goe1xuICAgICAgICAgICAgZGF0YToge1xuICAgICAgICAgICAgICAgIHNvdXJjZTogc291cmNlLFxuICAgICAgICAgICAgICAgIHRhcmdldDogdGFyZ2V0LFxuICAgICAgICAgICAgICAgIHR5cGU6IHR5cGVcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgfVxuXG4gICAgKGdyYXBocy5jYWxsYmFja3MgfHwgW10pLmZvckVhY2goKGNhbGxiYWNrLCBpKSA9PiB7XG4gICAgICAgIGNvbnN0IGNiID0gYF9fZGFzaF9jYWxsYmFja19fLiR7Y2FsbGJhY2sub3V0cHV0fWA7XG4gICAgICAgIGNvbnN0IGNiUHJvZmlsZSA9IHByb2ZpbGUuY2FsbGJhY2tzW2NhbGxiYWNrLm91dHB1dF0gfHwge307XG4gICAgICAgIGNvbnN0IGNvdW50ID0gY2JQcm9maWxlLmNvdW50IHx8IDA7XG4gICAgICAgIGNvbnN0IHRpbWUgPSBjYlByb2ZpbGUudG90YWwgfHwgMDtcblxuICAgICAgICBlbGVtZW50cy5wdXNoKHtcbiAgICAgICAgICAgIGRhdGE6IHtcbiAgICAgICAgICAgICAgICBpZDogY2IsXG4gICAgICAgICAgICAgICAgbGFiZWw6IGBjYWxsYmFjay4ke2l9YCxcbiAgICAgICAgICAgICAgICB0eXBlOiAnY2FsbGJhY2snLFxuICAgICAgICAgICAgICAgIG1vZGU6IGNhbGxiYWNrLmNsaWVudHNpZGVfZnVuY3Rpb24gPyAnY2xpZW50JyA6ICdzZXJ2ZXInLFxuICAgICAgICAgICAgICAgIGNvdW50OiBjb3VudCxcbiAgICAgICAgICAgICAgICB0aW1lOiBjb3VudCA+IDAgPyBNYXRoLnJvdW5kKHRpbWUgLyBjb3VudCkgOiAwLFxuICAgICAgICAgICAgICAgIGxvYWRpbmdTZXQ6IERhdGUubm93KCksXG4gICAgICAgICAgICAgICAgZXJyb3JTZXQ6IERhdGUubm93KClcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG5cbiAgICAgICAgY2FsbGJhY2sub3V0cHV0cy5tYXAoKHtpZCwgcHJvcGVydHl9KSA9PiB7XG4gICAgICAgICAgICBjb25zdCBub2RlSWQgPSByZWNvcmROb2RlKGlkLCBwcm9wZXJ0eSk7XG4gICAgICAgICAgICByZW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xiYWNrLWRhZy0tY29udGFpbmVyJz5cbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT0nZGFzaC1jYWxsYmFjay1kYWctLW1lc3NhZ2UnPlxuICAgICAgICAgICAgICAgICAgICA8ZGl2PldhaXRpbmcgZm9yIGFwcCB0byBiZSByZWFkeS4uLjwvZGl2PlxuICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICk7XG4gICAgfVxuXG4gICAgLy8gRklYTUU6IE1vdmUgdG8gYSBuZXcgY29tcG9uZW50P1xuICAgIC8vIEdlbmVyYXRlIHRoZSBlbGVtZW50IGludHJvc3BlY3Rpb24gZGF0YS5cbiAgICBsZXQgZWxlbWVudE5hbWUgPSAnJztcbiAgICBsZXQgZWxlbWVudEluZm8gPSB7fTtcbiAgICBsZXQgaGFzUGF0dGVybnMgPSBmYWxzZTtcblxuICAgIGlmIChzZWxlY3RlZCkge1xuICAgICAgICBjb25zdCBkYXRhID0gc2VsZWN0ZWQuZGF0YSgpO1xuXG4gICAgICAgIHN3aXRjaCAoZGF0YS50eXBlKSB7XG4gICAgICAgICAgICBjYXNlICdjb21wb25lbnQnOiB7XG4gICAgICAgICAgICAgICAgY29uc3QgcmVzdCA9IG9taXQoWydpZCddLCBnZXRDb21wb25lbnQoZGF0YS5pZCk/LnByb3BzKTtcbiAgICAgICAgICAgICAgICBlbGVtZW50SW5mbyA9IHJlc3Q7XG4gICAgICAgICAgICAgICAgZWxlbWVudE5hbWUgPSBkYXRhLmlkO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBjYXNlICdwcm9wZXJ0eSc6IHtcbiAgICAgICAgICAgICAgICBlbGVtZW50TmFtZSA9IGRhdGEucGFyZW50O1xuICAgICAgICAgICAgICAgIGVsZW1lbnRJbmZvW2RhdGEubGFiZWxdID0gZ2V0UHJvcFZhbHVlKGRhdGEpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyBjYWxsYmFja1xuICAgICAgICAgICAgZGVmYXVsdDoge1xuICAgICAgICAgICAgICAgIGVsZW1lbnRJbmZvLnR5cGUgPSBkYXRhLm1vZGU7XG5cbiAgICAgICAgICAgICAgICAvLyBSZW1vdmUgdWlkIGFuZCBzZXQgcHJvZmlsZS5cbiAgICAgICAgICAgICAgICBjb25zdCBjYWxsYmFja091dHB1dElkID0gZGF0YS5pZC5zbGljZShjYlByZWZpeExlbik7XG4gICAgICAgICAgICAgICAgZWxlbWVudE5hbWUgPSBjbGVhbk91dHB1dElkKGNhbGxiYWNrT3V0cHV0SWQpO1xuICAgICAgICAgICAgICAgIGNvbnN0IGNiUHJvZmlsZSA9IHByb2ZpbGUuY2FsbGJhY2tzW2NhbGxiYWNrT3V0cHV0SWRdO1xuICAgICAgICAgICAgICAgIGlmIChjYlByb2ZpbGUpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3Qge1xuICAgICAgICAgICAgICAgICAgICAgICAgY291bnQsXG4gICAgICAgICAgICAgICAgICAgICAgICBzdGF0dXMsXG4gICAgICAgICAgICAgICAgICAgICAgICBuZXR3b3JrLFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVzb3VyY2VzLFxuICAgICAgICAgICAgICAgICAgICAgICAgdG90YWwsXG4gICAgICAgICAgICAgICAgICAgICAgICBjb21wdXRlLFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0LFxuICAgICAgICAgICAgICAgICAgICAgICAgaW5wdXRzLFxuICAgICAgICAgICAgICAgICAgICAgICAgc3RhdGVcbiAgICAgICAgICAgICAgICAgICAgfSA9IGNiUHJvZmlsZTtcblxuICAgICAgICAgICAgICAgICAgICBjb25zdCBhdmcgPSB2ID0+IE1hdGgucm91bmQodiAvIChjb3VudCB8fCAxKSk7XG5cbiAgICAgICAgICAgICAgICAgICAgZWxlbWVudEluZm9bJ2NhbGwgY291bnQnXSA9IGNvdW50O1xuICAgICAgICAgICAgICAgICAgICBlbGVtZW50SW5mby5zdGF0dXMgPSByZWR1Y2VTdGF0dXMoc3RhdHVzKTtcblxuICAgICAgICAgICAgICAgICAgICBjb25zdCB0aW1pbmcgPSAoZWxlbWVudEluZm9bJ3RpbWUgKGF2ZyBtaWxsaXNlY29uZHMpJ10gPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0b3RhbDogYXZnKHRvdGFsKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbXB1dGU6IGF2Zyhjb21wdXRlKVxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGRhdGEubW9kZSA9PT0gJ3NlcnZlcicpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpbWluZy5uZXR3b3JrID0gYXZnKG5ldHdvcmsudGltZSk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGVsZW1lbnRJbmZvWydkYXRhIHRyYW5zZmVyIChhdmcgYnl0ZXMpJ10gPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZG93bmxvYWQ6IGF2ZyhuZXR3b3JrLmRvd25sb2FkKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cGxvYWQ6IGF2ZyhuZXR3b3JrLnVwbG9hZClcbiAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZm9yIChjb25zdCBrZXkgaW4gcmVzb3VyY2VzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aW1pbmdbJ3VzZXI6ICcgKyBrZXldID0gYXZnKHJlc291cmNlc1trZXldKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIGVsZW1lbnRJbmZvLm91dHB1dHMgPSBmbGF0dGVuT3V0cHV0cyhyZXN1bHQpO1xuICAgICAgICAgICAgICAgICAgICBlbGVtZW50SW5mby5pbnB1dHMgPSBmbGF0dGVuSW5wdXRzKGlucHV0cywge30pO1xuICAgICAgICAgICAgICAgICAgICBlbGVtZW50SW5mby5zdGF0ZSA9IGZsYXR0ZW5JbnB1dHMoc3RhdGUsIHt9KTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBlbGVtZW50SW5mb1snY2FsbCBjb3VudCddID0gMDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBjb25zdCBjeUxheW91dCA9XG4gICAgICAgIGNob3NlblR5cGUgPT09IGxheW91dFR5cGVcbiAgICAgICAgICAgID8gZ3JhcGhMYXlvdXRcbiAgICAgICAgICAgIDogbWVyZ2VSaWdodChsYXlvdXRzW2xheW91dFR5cGVdLCB7cmVhZHk6IHNldFByZXNldExheW91dH0pO1xuXG4gICAgcmV0dXJuIChcbiAgICAgICAgPGRpdiBjbGFzc05hbWU9J2Rhc2gtY2FsbGJhY2stZGFnLS1jb250YWluZXInPlxuICAgICAgICAgICAgPEN5dG9zY2FwZUNvbXBvbmVudFxuICAgICAgICAgICAgICAgIHN0eWxlPXt7d2lkdGg6ICcxMDAlJywgaGVpZ2h0OiAnMTAwJSd9fVxuICAgICAgICAgICAgICAgIGN5PXtzZXRDeXRvc2NhcGV9XG4gICAgICAgICAgICAgICAgZWxlbWVudHM9e2VsZW1lbnRzfVxuICAgICAgICAgICAgICAgIGxheW91dD17Y3lMYXlvdXR9XG4gICAgICAgICAgICAgICAgc3R5bGVzaGVldD17c3R5bGVzaGVldH1cbiAgICAgICAgICAgIC8+XG4gICAgICAgICAgICB7c2VsZWN0ZWQgPyAoXG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9J2Rhc2gtY2FsbGJhY2stZGFnLS1pbmZvJz5cbiAgICAgICAgICAgICAgICAgICAge2hhc1BhdHRlcm5zID8gKFxuICAgICAgICAgICAgICAgICAgICAgICAgPGRpdj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBJbmZvIGlzbid0IHN1cHBvcnRlZCBmb3IgcGF0dGVybi1tYXRjaGluZyBJRHMgYXRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzIHRpbWVcbiAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgICAgICApIDogbnVsbH1cbiAgICAgICAgICAgICAgICAgICAgPEpTT05UcmVlXG4gICAgICAgICAgICAgICAgICAgICAgICBkYXRhPXtlbGVtZW50SW5mb31cbiAgICAgICAgICAgICAgICAgICAgICAgIHRoZW1lPSdzdW1tZXJmcnVpdCdcbiAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsUmVuZGVyZXI9e19rZXlzID0+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgX2tleXMubGVuZ3RoID09PSAxID8gZWxlbWVudE5hbWUgOiBfa2V5c1swXVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgZ2V0SXRlbVN0cmluZz17KHR5cGUsIGRhdGEsIGl0ZW1UeXBlKSA9PiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPHNwYW4+e2l0ZW1UeXBlfTwvc3Bhbj5cbiAgICAgICAgICAgICAgICAgICAgICAgICl9XG4gICAgICAgICAgICAgICAgICAgICAgICBzaG91bGRFeHBhbmROb2RlPXsoa2V5TmFtZSwgZGF0YSwgbGV2ZWwpID0+IGxldmVsIDwgMX1cbiAgICAgICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICkgOiBudWxsfVxuICAgICAgICAgICAgPHNlbGVjdFxuICAgICAgICAgICAgICAgIGNsYXNzTmFtZT0nZGFzaC1jYWxsYmFjay1kYWctLWxheW91dFNlbGVjdG9yJ1xuICAgICAgICAgICAgICAgIG9uQ2hhbmdlPXtlID0+IHNldExheW91dFR5cGUoZS50YXJnZXQudmFsdWUpfVxuICAgICAgICAgICAgICAgIHZhbHVlPXtsYXlvdXRUeXBlfVxuICAgICAgICAgICAgICAgIHJlZj17bGF5b3V0U2VsZWN0b3J9XG4gICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAge2tleXMobGF5b3V0cykubWFwKGsgPT4gKFxuICAgICAgICAgICAgICAgICAgICA8b3B0aW9uIHZhbHVlPXtrfSBrZXk9e2t9PlxuICAgICAgICAgICAgICAgICAgICAgICAge2t9XG4gICAgICAgICAgICAgICAgICAgIDwvb3B0aW9uPlxuICAgICAgICAgICAgICAgICkpfVxuICAgICAgICAgICAgPC9zZWxlY3Q+XG4gICAgICAgIDwvZGl2PlxuICAgICk7XG59XG5cbkNhbGxiYWNrR3JhcGgucHJvcFR5cGVzID0ge307XG5cbmNsYXNzIFVuY29ubmVjdGVkQ2FsbGJhY2tHcmFwaENvbnRhaW5lciBleHRlbmRzIENvbXBvbmVudCB7XG4gICAgY29uc3RydWN0b3IocHJvcHMpIHtcbiAgICAgICAgc3VwZXIocHJvcHMpO1xuICAgICAgICB0aGlzLnN0YXRlID0ge2hhc0Vycm9yOiBmYWxzZX07XG4gICAgfVxuXG4gICAgc3RhdGljIGdldERlcml2ZWRTdGF0ZUZyb21FcnJvcihfKSB7XG4gICAgICAgIHJldHVybiB7aGFzRXJyb3I6IHRydWV9O1xuICAgIH1cblxuICAgIGNvbXBvbmVudERpZENhdGNoKGVycm9yLCBpbmZvKSB7XG4gICAgICAgIGNvbnN0IHtkaXNwYXRjaH0gPSB0aGlzLnByb3BzO1xuICAgICAgICBkaXNwYXRjaChcbiAgICAgICAgICAgIG9uRXJyb3Ioe1xuICAgICAgICAgICAgICAgIG15SUQ6IHRoaXMuc3RhdGUubXlJRCxcbiAgICAgICAgICAgICAgICB0eXBlOiAnZnJvbnRFbmQnLFxuICAgICAgICAgICAgICAgIGVycm9yLFxuICAgICAgICAgICAgICAgIGluZm9cbiAgICAgICAgICAgIH0pXG4gICAgICAgICk7XG4gICAgfVxuXG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IH0sXG5cbiAgICB7XG4gICAgICAgIHNlbGVjdG9yOiAnZWRnZScsXG4gICAgICAgIHN0eWxlOiB7XG4gICAgICAgICAgICB3aWR0aDogMixcbiAgICAgICAgICAgICdsaW5lLWNvbG9yJzogJyM4ODg4ODgnLFxuICAgICAgICAgICAgJ3RhcmdldC1hcnJvdy1jb2xvcic6ICcjODg4ODg4JyxcbiAgICAgICAgICAgICd0YXJnZXQtYXJyb3ctc2hhcGUnOiAndHJpYW5nbGUnLFxuICAgICAgICAgICAgJ3RhcmdldC1hcnJvdy1maWxsJzogJ2ZpbGxlZCcsXG4gICAgICAgICAgICAnYXJyb3ctc2NhbGUnOiAxLFxuICAgICAgICAgICAgJ2N1cnZlLXN0eWxlJzogJ2JlemllcicsXG4gICAgICAgICAgICAnY29udHJvbC1wb2ludC1zdGVwLXNpemUnOiA0MCxcbiAgICAgICAgICAgICd0cmFuc2l0aW9uLXByb3BlcnR5JzogJ2xpbmUtY29sb3IsIHRhcmdldC1hcnJvdy1jb2xvcicsXG4gICAgICAgICAgICAndHJhbnNpdGlvbi1kdXJhdGlvbic6ICcwLjI1cycsXG4gICAgICAgICAgICAndHJhbnNpdGlvbi10aW1pbmctZnVuY3Rpb24nOiAnZWFzZS1pbi1vdXQtc2luZSdcbiAgICAgICAgfVxuICAgIH0sXG5cbiAgICB7XG4gICAgICAgIHNlbGVjdG9yOiAnZWRnZVt0eXBlPVwiaGlkZGVuXCJdJyxcbiAgICAgICAgc3R5bGU6IHtcbiAgICAgICAgICAgIGRpc3BsYXk6ICdub25lJ1xuICAgICAgICB9XG4gICAgfSxcblxuICAgIHtcbiAgICAgICAgc2VsZWN0b3I6ICdlZGdlW3R5cGU9XCJvdXRwdXRcIl0nLFxuICAgICAgICBzdHlsZToge1xuICAgICAgICAgICAgJ2xpbmUtY29sb3InOiAnIzAwODBEMCcsXG4gICAgICAgICAgICAndGFyZ2V0LWFycm93LWNvbG9yJzogJyMwMDgwRDAnXG4gICAgICAgIH1cbiAgICB9LFxuXG4gICAge1xuICAgICAgICBzZWxlY3RvcjogJ2VkZ2VbdHlwZT1cInN0YXRlXCJdJyxcbiAgICAgICAgc3R5bGU6IHtcbiAgICAgICAgICAgICdsaW5lLXN0eWxlJzogJ2Rhc2hlZCdcbiAgICAgICAgfVxuICAgIH0sXG5cbiAgICB7XG4gICAgICAgIHNlbGVjdG9yOiAnbm9kZScsXG4gICAgICAgIHN0eWxlOiB7XG4gICAgICAgICAgICBjb2xvcjogJyMzMzMzMzMnLFxuICAgICAgICAgICAgcGFkZGluZzogNixcbiAgICAgICAgICAgICd0ZXh0LXZhbGlnbic6ICdjZW50ZXInLFxuICAgICAgICAgICAgJ3RleHQtaGFsaWduJzogJ2NlbnRlcicsXG4gICAgICAgICAgICAnYm9yZGVyLXdpZHRoJzogMixcbiAgICAgICAgICAgICdib3JkZXItb3BhY2l0eSc6IDAsXG4gICAgICAgICAgICAnYm9yZGVyLXN0eWxlJzogJ3NvbGlkJyxcbiAgICAgICAgICAgICdib3JkZXItY29sb3InOiAnIzg4ODg4OCcsXG4gICAgICAgICAgICAndHJhbnNpdGlvbi1wcm9wZXJ0eSc6ICdib3JkZXItb3BhY2l0eScsXG4gICAgICAgICAgICAndHJhbnNpdGlvbi1kdXJhdGlvbic6ICcwLjI1cycsXG4gICAgICAgICAgICAndHJhbnNpdGlvbi10aW1pbmctZnVuY3Rpb24nOiAnZWFzZS1pbi1vdXQtc2luZSdcbiAgICAgICAgfVxuICAgIH0sXG5cbiAgICB7XG4gICAgICAgIHNlbGVjdG9yOiAnbm9kZVt0eXBlPVwiY2FsbGJhY2tcIl0nLFxuICAgICAgICBzdHlsZToge1xuICAgICAgICAgICAgd2lkdGg6IDM1LFxuICAgICAgICAgICAgaGVpZ2h0OiAyNSxcbiAgICAgICAgICAgIHNoYXBlOiAncm91bmQtcmVjdGFuZ2xlJyxcbiAgICAgICAgICAgIGxhYmVsOiBlID0+IGAke2UuZGF0YSgpLmNvdW50fVxcbiR7ZS5kYXRhKCkudGltZX0gbXNgLFxuICAgICAgICAgICAgJ3RleHQtd3JhcCc6ICd3cmFwJyxcbiAgICAgICAgICAgICd0ZXh0LWp1c3RpZmljYXRpb24nOiAnY2VudGVyJ1xuICAgICAgICB9XG4gICAgfSxcblxuICAgIHtcbiAgICAgICAgc2VsZWN0b3I6ICdub2RlW3R5cGU9XCJjYWxsYmFja1wiXVttb2RlPVwiY2xpZW50XCJdJyxcbiAgICAgICAgc3R5bGU6IHtcbiAgICAgICAgICAgIGNvbG9yOiAnIzMyMzMzMCcsXG4gICAgICAgICAgICAnYmFja2dyb3VuZC1jb2xvcic6ICcjRjBEQjRGJ1xuICAgICAgICB9XG4gICAgfSxcblxuICAgIHtcbiAgICAgICAgc2VsZWN0b3I6ICdub2RlW3R5cGU9XCJjYWxsYmFja1wiXVttb2RlPVwic2VydmVyXCJdJyxcbiAgICAgICAgc3R5bGU6IHtcbiAgICAgICAgICAgIGNvbG9yOiAnIzMyMzMzMCcsXG4gICAgICAgICAgICAnYmFja2dyb3VuZC1jb2xvcic6ICcjMDBDQzk2J1xuICAgICAgICB9XG4gICAgfSxcblxuICAgIHtcbiAgICAgICAgc2VsZWN0b3I6ICdub2RlW3R5cGU9XCJjb21wb25lbnRcIl0sIG5vZGVbdHlwZT1cIndpbGRjYXJkXCJdJyxcbiAgICAgICAgc3R5bGU6IHtcbiAgICAgICAgICAgIHdpZHRoOiAnbGFiZWwnLFxuICAgICAgICAgICAgLy8gaGVpZ2h0OiAnbGFiZWwnLFxuICAgICAgICAgICAgc2hhcGU6ICdyZWN0YW5nbGUnLFxuICAgICAgICAgICAgY29udGVudDogZSA9PiBlLmRhdGEoKS5sYWJlbC5yZXBsYWNlKC9cIi9nLCAnJyksXG4gICAgICAgICAgICAndGV4dC12YWxpZ24nOiAndG9wJyxcbiAgICAgICAgICAgICdiYWNrZ3JvdW5kLWNvbG9yJzogJyNCOUMyQ0UnXG4gICAgICAgIH1cbiAgICB9LFxuXG4gICAge1xuICAgICAgICBzZWxlY3RvcjogJ25vZGVbdHlwZT1cInByb3BlcnR5XCJdJyxcbiAgICAgICAgc3R5bGU6IHtcbiAgICAgICAgICAgIHdpZHRoOiAnbGFiZWwnLFxuICAgICAgICAgICAgaGVpZ2h0OiAyMCxcbiAgICAgICAgICAgIHNoYXBlOiAncmVjdGFuZ2xlJyxcbiAgICAgICAgICAgIGNvbnRlbnQ6ICdkYXRhKGxhYmVsKScsXG4gICAgICAgICAgICBjb2xvcjogJ3doaXRlJyxcbiAgICAgICAgICAgICdiYWNrZ3JvdW5kLWNvbG9yJzogJyMxMDlERkYnXG4gICAgICAgIH1cbiAgICB9LFxuXG4gICAge1xuICAgICAgICBzZWxlY3RvcjogJy5zZWxlY3RlZC1ub2RlJyxcbiAgICAgICAgc3R5bGU6IHtcbiAgICAgICAgICAgIGdob3N0OiAneWVzJyxcbiAgICAgICAgICAgICdnaG9zdC1vZmZzZXQteCc6IDIsXG4gICAgICAgICAgICAnZ2hvc3Qtb2Zmc2V0LXknOiAyLFxuICAgICAgICAgICAgJ2dob3N0LW9wYWNpdHknOiAwLjI1LFxuICAgICAgICAgICAgJ2JvcmRlci1vcGFjaXR5JzogMVxuICAgICAgICB9XG4gICAgfSxcblxuICAgIHtcbiAgICAgICAgc2VsZWN0b3I6ICcucHJvcC1jaGFuZ2VkLCAuY2FsbGJhY2stbG9hZGluZycsXG4gICAgICAgIHN0eWxlOiB7XG4gICAgICAgICAgICAnYm9yZGVyLWNvbG9yJzogJyNDQzQzQjcnLFxuICAgICAgICAgICAgJ2JvcmRlci13aWR0aCc6IDIsXG4gICAgICAgICAgICAnYm9yZGVyLW9wYWNpdHknOiAxXG4gICAgICAgIH1cbiAgICB9LFxuXG4gICAge1xuICAgICAgICBzZWxlY3RvcjogJy5jYWxsYmFjay1lcnJvcicsXG4gICAgICAgIHN0eWxlOiB7XG4gICAgICAgICAgICAnYmFja2dyb3VuZC1jb2xvcic6ICcjRTEzMzJFJ1xuICAgICAgICB9XG4gICAgfSxcblxu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cygnY2FsbGJhY2stbG9hZGluZycpKSB7XG4gICAgICAgIGNvbnN0IHRpbWVMZWZ0ID0gbm9kZS5kYXRhKCdsb2FkaW5nU2V0JykgKyBmbGFzaFRpbWUgLSBEYXRlLm5vdygpO1xuICAgICAgICBzZXRUaW1lb3V0KFxuICAgICAgICAgICAgKCkgPT4gbm9kZS5yZW1vdmVDbGFzcygnY2FsbGJhY2stbG9hZGluZycpLFxuICAgICAgICAgICAgTWF0aC5tYXgodGltZUxlZnQsIDApXG4gICAgICAgICk7XG4gICAgfVxuXG4gICAgaWYgKFxuICAgICAgICBsYXRlc3QgIT09ICdsb2FkaW5nJyAmJlxuICAgICAgICBsYXRlc3QgIT09IFNUQVRVU01BUFtTVEFUVVMuT0tdICYmXG4gICAgICAgIGxhdGVzdCAhPT0gU1RBVFVTTUFQW1NUQVRVUy5QUkVWRU5UX1VQREFURV1cbiAgICApIHtcbiAgICAgICAgbm9kZS5kYXRhKCdlcnJvclNldCcsIERhdGUubm93KCkpO1xuICAgICAgICBub2RlLmFkZENsYXNzKCdjYWxsYmFjay1lcnJvcicpO1xuICAgIH0gZWxzZSBpZiAobm9kZS5oYXNDbGFzcygnY2FsbGJhY2stZXJyb3InKSkge1xuICAgICAgICBjb25zdCB0aW1lTGVmdCA9IG5vZGUuZGF0YSgnZXJyb3JTZXQnKSArIGZsYXNoVGltZSAtIERhdGUubm93KCk7XG4gICAgICAgIHNldFRpbWVvdXQoXG4gICAgICAgICAgICAoKSA9PiBub2RlLnJlbW92ZUNsYXNzKCdjYWxsYmFjay1lcnJvcicpLFxuICAgICAgICAgICAgTWF0aC5tYXgodGltZUxlZnQsIDApXG4gICAgICAgICk7XG4gICAgfVxuXG4gICAgLy8gRklYTUU6IFRoaXMgd2lsbCBmbGFzaCBicmFuY2hlcyB0aGF0IHJldHVybiBub191cGRhdGUhIVxuICAgIC8vIElmIHRoZSBjYWxsYmFjayByZXNvbHZlZCBwcm9wZXJseSwgZmxhc2ggdGhlIG91dHB1dHMuXG4gICAgaWYgKGxhdGVzdCA9PT0gU1RBVFVTTUFQW1NUQVRVUy5PS10pIHtcbiAgICAgICAgbm9kZS5lZGdlc1RvKCcqJykuZmxhc2hDbGFzcygndHJpZ2dlcmVkJywgZmxhc2hUaW1lKTtcbiAgICB9XG59XG4iLCJpbXBvcnQge0NvbXBvbmVudH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IFByb3BUeXBlcyBmcm9tICdwcm9wLXR5cGVzJztcbmltcG9ydCB7b25FcnJvciwgcmV2ZXJ0fSBmcm9tICcuLi8uLi9hY3Rpb25zJztcblxuY2xhc3MgQ29tcG9uZW50RXJyb3JCb3VuZGFyeSBleHRlbmRzIENvbXBvbmVudCB7XG4gICAgY29uc3RydWN0b3IocHJvcHMpIHtcbiAgICAgICAgc3VwZXIocHJvcHMpO1xuICAgICAgICB0aGlzLnN0YXRlID0ge1xuICAgICAgICAgICAgbXlJRDogcHJvcHMuY29tcG9uZW50SWQsXG4gICAgICAgICAgICBvbGRDaGlsZHJlbjogbnVsbCxcbiAgICAgICAgICAgIGhhc0Vycm9yOiBmYWxzZVxuICAgICAgICB9O1xuICAgIH1cblxuICAgIHN0YXRpYyBnZXREZXJpdmVkU3RhdGVGcm9tRXJyb3IoXykge1xuICAgICAgICByZXR1cm4ge2hhc0Vycm9yOiB0cnVlfTtcbiAgICB9XG5cbiAgICBjb21wb25lbnREaWRDYXRjaChlcnJvciwgaW5mbykge1xuICAgICAgICBjb25zdCB7ZGlzcGF0Y2h9ID0gdGhpcy5wcm9wcztcbiAgICAgICAgZGlzcGF0Y2goXG4gICAgICAgICAgICBvbkVycm9yKHtcbiAgICAgICAgICAgICAgICBteUlEOiB0aGlzLnN0YXRlLm15SUQsXG4gICAgICAgICAgICAgICAgdHlwZTogJ2Zyb250RW5kJyxcbiAgICAgICAgICAgICAgICBlcnJvcixcbiAgICAgICAgICAgICAgICBpbmZvXG4gICAgICAgICAgICB9KVxuICAgICAgICApO1xuICAgICAgICBkaXNwYX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AgICAgICAgICAgIGNsYXNzTmFtZT0nZGFzaC1mZS1lcnJvci10b3AgdGVzdC1kZXZ0b29scy1lcnJvci10b2dnbGUnXG4gICAgICAgICAgICAgICAgb25DbGljaz17KCkgPT4gdGhpcy5zZXRTdGF0ZSh7Y29sbGFwc2VkOiAhY29sbGFwc2VkfSl9XG4gICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgPHNwYW4gY2xhc3NOYW1lPSdkYXNoLWZlLWVycm9yLXRvcF9fZ3JvdXAnPlxuICAgICAgICAgICAgICAgICAgICDim5HvuI9cbiAgICAgICAgICAgICAgICAgICAgPHNwYW4gY2xhc3NOYW1lPSdkYXNoLWZlLWVycm9yX190aXRsZSc+XG4gICAgICAgICAgICAgICAgICAgICAgICB7ZS5lcnJvci5tZXNzYWdlIHx8ICdFcnJvcid9XG4gICAgICAgICAgICAgICAgICAgIDwvc3Bhbj5cbiAgICAgICAgICAgICAgICA8L3NwYW4+XG4gICAgICAgICAgICAgICAgPHNwYW4gY2xhc3NOYW1lPSdkYXNoLWZlLWVycm9yLXRvcF9fZ3JvdXAnPlxuICAgICAgICAgICAgICAgICAgICA8c3BhbiBjbGFzc05hbWU9J2Rhc2gtZmUtZXJyb3JfX3RpbWVzdGFtcCBwZXJjeS1oaWRlJz5cbiAgICAgICAgICAgICAgICAgICAgICAgIHtgJHtlLnRpbWVzdGFtcC50b0xvY2FsZVRpbWVTdHJpbmcoKX1gfVxuICAgICAgICAgICAgICAgICAgICA8L3NwYW4+XG4gICAgICAgICAgICAgICAgICAgIDxzcGFuIGNsYXNzTmFtZT0nZGFzaC1mZS1lcnJvcl9fdGltZXN0YW1wIHBlcmN5LXNob3cnPlxuICAgICAgICAgICAgICAgICAgICAgICAgey8qIFNwZWNpYWwgcGVyY3kgdGltZXN0YW1wIGZvciB2aXN1YWwgdGVzdGluZy5cbiAgICAgICAgICAgICAgICAgICAgICAgICAqIEhpZGRlbiBkdXJpbmcgcmVndWxhciB1c2FnZS5cbiAgICAgICAgICAgICAgICAgICAgICAgICAqL31cbiAgICAgICAgICAgICAgICAgICAgICAgIDAwOjAwOjAwIFBNXG4gICAgICAgICAgICAgICAgICAgIDwvc3Bhbj5cblxuICAgICAgICAgICAgICAgICAgICA8Q29sbGFwc2VJY29uXG4gICAgICAgICAgICAgICAgICAgICAgICBjbGFzc05hbWU9e2BkYXNoLWZlLWVycm9yX19jb2xsYXBzZSAke1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbGxhcHNlZCA/ICdkYXNoLWZlLWVycm9yX19jb2xsYXBzZS0tZmxpcHBlZCcgOiAnJ1xuICAgICAgICAgICAgICAgICAgICAgICAgfWB9XG4gICAgICAgICAgICAgICAgICAgICAgICBvbkNsaWNrPXsoKSA9PiB0aGlzLnNldFN0YXRlKHtjb2xsYXBzZWQ6ICFjb2xsYXBzZWR9KX1cbiAgICAgICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgICA8L3NwYW4+XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgKTtcbiAgICAgICAgLyogZXNsaW50LWVuYWJsZSBuby1pbmxpbmUtY29tbWVudHMgKi9cblxuICAgICAgICByZXR1cm4gY29sbGFwc2VkID8gKFxuICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9J2Rhc2gtZXJyb3ItY2FyZF9fbGlzdC1pdGVtJz57ZXJyb3JIZWFkZXJ9PC9kaXY+XG4gICAgICAgICkgOiAoXG4gICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT17Y2FyZENsYXNzZXN9PlxuICAgICAgICAgICAgICAgIHtlcnJvckhlYWRlcn1cbiAgICAgICAgICAgICAgICA8RXJyb3JDb250ZW50IGVycm9yPXtlLmVycm9yfSAvPlxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICk7XG4gICAgfVxufVxuXG5jb25zdCBNQVhfTUVTU0FHRV9MRU5HVEggPSA0MDtcbi8qIGVzbGludC1kaXNhYmxlIG5vLWlubGluZS1jb21tZW50cyAqL1xuZnVuY3Rpb24gVW5jb25uZWN0ZWRFcnJvckNvbnRlbnQoe2Vycm9yLCBiYXNlfSkge1xuICAgIHJldHVybiAoXG4gICAgICAgIDxkaXYgY2xhc3NOYW1lPSdlcnJvci1jb250YWluZXInPlxuICAgICAgICAgICAgey8qXG4gICAgICAgICAgICAgKiA0MCBpcyBhIHJvdWdoIGhldXJpc3RpYyAtIGlmIGxvbmdlciB0aGFuIDQwIHRoZW4gdGhlXG4gICAgICAgICAgICAgKiBtZXNzYWdlIG1pZ2h0IG92ZXJmbG93IGludG8gZWxsaXBzZXMgaW4gdGhlIHRpdGxlIGFib3ZlICZcbiAgICAgICAgICAgICAqIHdpbGwgbmVlZCB0byBiZSBkaXNwbGF5ZWQgaW4gZnVsbCBpbiB0aGlzIGVycm9yIGJvZHlcbiAgICAgICAgICAgICAqL31cbiAgICAgICAgICAgIHt0eXBlb2YgZXJyb3IubWVzc2FnZSAhPT0gJ3N0cmluZycgfHxcbiAgICAgICAgICAgIGVycm9yLm1lc3NhZ2UubGVuZ3RoIDwgTUFYX01FU1NBR0VfTEVOR1RIID8gbnVsbCA6IChcbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT0nZGFzaC1mZS1lcnJvcl9fc3QnPlxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT0nZGFzaC1mZS1lcnJvcl9faW5mbyBkYXNoLWZlLWVycm9yX19jdXJ2ZWQnPlxuICAgICAgICAgICAgICAgICAgICAgICAge2Vycm9yLm1lc3NhZ2V9XG4gICAgICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgKX1cblxuICAgICAgICAgICAge3R5cGVvZiBlcnJvci5zdGFjayAhPT0gJ3N0cmluZycgPyBudWxsIDogKFxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPSdkYXNoLWZlLWVycm9yX19zdCc+XG4gICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPSdkYXNoLWZlLWVycm9yX19pbmZvJz5cbiAgICAgICAgICAgICAgICAgICAgICAgIDxkZXRhaWxzPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxzdW1tYXJ5PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8aT5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChUaGlzIGVycm9yIG9yaWdpbmF0ZWQgZnJvbSB0aGUgYnVpbHQtaW5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEphdmFTY3JpcHQgY29kZSB0aGF0IHJ1bnMgRGFzaCBhcHBzLiBDbGlja1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdG8gc2VlIHRoZSBmdWxsIHN0YWNrIHRyYWNlIG9yIG9wZW4geW91clxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJvd3NlcidzIGNvbnNvbGUuKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2k+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9zdW1tYXJ5PlxuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAge2Vycm9yLnN0YWNrLnNwbGl0KCdcXG4nKS5tYXAoKGxpbmUsIGkpID0+IChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHAga2V5PXtpfT57bGluZX08L3A+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKSl9XG4gICAgICAgICAgICAgICAgICAgICAgICA8L2RldGFpbHM+XG4gICAgICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgKX1cbiAgICAgICAgICAgIHsvKiBCYWNrZW5kIEVycm9yICovfVxuICAgICAgICAgICAge3R5cGVvZiBlcnJvci5odG1sICE9PSAnc3RyaW5nJyA/IG51bGwgOiBlcnJvci5odG1sXG4gICAgICAgICAgICAgICAgICAuc3Vic3RyaW5nKDAsICc8IWRvY3R5cGUnLmxlbmd0aClcbiAgICAgICAgICAgICAgICAgIC50b0xvd2VyQ2FzZSgpID09PSAnPCFkb2N0eXBlJyA/IChcbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT0nZGFzaC1iZS1lcnJvcl9fc3QnPlxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT0nZGFzaC1iYWNrZW5kLWVycm9yJz5cbiAgICAgICAgICAgICAgICAgICAgICAgIHsvKiBFbWJlZCB3ZXJremV1ZyBkZWJ1Z2dlciBpbiBhbiBpZnJhbWUgdG8gcHJldmVudFxuICAgICAgICAgICAgICAgICAgICAgICAgQ1NTIGxlYWtpbmcgLSB3ZXJremV1ZyBIVE1MIGluY2x1ZGVzIGEgYnVuY2hcbiAgICAgICAgICAgICAgICAgICAgICAgIG9mIENTUyBvbiBiYXNlIGh0bWwgZWxlbWVudHMgbGlrZSBgPGJvZHkvPmBcbiAgICAgICAgICAgICAgICAgICAgICAqL31cblxuICAgICAgICAgICAgICAgICAgICAgICAgPGlmcmFtZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNyY0RvYz17ZXJyb3IuaHRtbFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAucmVwbGFjZShcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICc8L2hlYWQ+JyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGA8c3R5bGUgdHlwZT1cInRleHQvY3NzXCI+JHt3ZXJremV1Z0Nzc308L3N0eWxlPjwvaGVhZD5gXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLnJlcGxhY2UoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnPVwiP19fZGVidWdnZXJfXycsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBgPVwiJHtiYXNlfT9fX2RlYnVnZ2VyX19gXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICl9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3R5bGU9e3tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLypcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICogNjdweCBvZiBwYWRkaW5nIGFuZCBtYXJnaW4gYmV0d2VlbiB0aGlzXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqIGlmcmFtZSBhbmQgdGhlIHBhcmVudCBjb250YWluZXIuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqIDY3IHdhcyBkZXRlcm1pbmVkIG1hbnVhbGx5IGluIHRoZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiBicm93c2VyJ3MgZGV2IHRvb2xzLlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi9cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6ICdjYWxjKDYwMHB4IC0gNjdweCknLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6ICc3NXZoJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyOiAnbm9uZSdcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICApIDogKFxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPSdkYXNoLWJlLWVycm9yX19zdHInPlxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT0nZGFzaC1iYWNrZW5kLWVycm9yJz57ZXJyb3IuaHRtbH08L2Rpdj5cbiAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICl9XG4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ZGFzaC1lcnJvci1jYXJkLS1hbGVydHMtdHJheSc7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPXtjYXJkQ2xhc3Nlc30+XG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9J2Rhc2gtZXJyb3ItY2FyZF9fdG9wYmFyJz5cbiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9J2Rhc2gtZXJyb3ItY2FyZF9fbWVzc2FnZSc+XG4gICAgICAgICAgICAgICAgICAgICAgICDwn5uRIEVycm9ycyAoXG4gICAgICAgICAgICAgICAgICAgICAgICA8c3Ryb25nIGNsYXNzTmFtZT0ndGVzdC1kZXZ0b29scy1lcnJvci1jb3VudCc+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAge2Vycm9yc0xlbmd0aH1cbiAgICAgICAgICAgICAgICAgICAgICAgIDwvc3Ryb25nPlxuICAgICAgICAgICAgICAgICAgICAgICAgKXtjb25uZWN0ZWQgPyBudWxsIDogJ1xcdTAwYTAg8J+aqyBTZXJ2ZXIgVW5hdmFpbGFibGUnfVxuICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgPGRpdlxuICAgICAgICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lPSdkYXNoLWZlLWVycm9yX19pY29uLXgnXG4gICAgICAgICAgICAgICAgICAgICAgICBvbkNsaWNrPXsoKSA9PiBjbGlja0hhbmRsZXIoKX1cbiAgICAgICAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgICAgICAgICAgw5dcbiAgICAgICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9J2Rhc2gtZXJyb3ItY2FyZF9fbGlzdCc+e2Vycm9yRWxlbWVudHN9PC9kaXY+XG4gICAgICAgICAgICA8L2Rpdj5c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BzKSB7XG4gICAgICAgIHN1cGVyKHByb3BzKTtcbiAgICB9XG5cbiAgICByZW5kZXIoKSB7XG4gICAgICAgIGNvbnN0IHt2aXNpYmxlLCBlcnJvciwgZXJyb3JzT3BlbmVkLCBjbGlja0hhbmRsZXJ9ID0gdGhpcy5wcm9wcztcblxuICAgICAgICBsZXQgZnJvbnRFbmRFcnJvcnM7XG4gICAgICAgIGlmIChlcnJvcnNPcGVuZWQpIHtcbiAgICAgICAgICAgIGNvbnN0IGVycm9ycyA9IGNvbmNhdChlcnJvci5mcm9udEVuZCwgZXJyb3IuYmFja0VuZCk7XG5cbiAgICAgICAgICAgIGZyb250RW5kRXJyb3JzID0gKFxuICAgICAgICAgICAgICAgIDxGcm9udEVuZEVycm9yQ29udGFpbmVyXG4gICAgICAgICAgICAgICAgICAgIGVycm9ycz17ZXJyb3JzfVxuICAgICAgICAgICAgICAgICAgICBjb25uZWN0ZWQ9e2Vycm9yLmJhY2tFbmRDb25uZWN0ZWR9XG4gICAgICAgICAgICAgICAgICAgIGVycm9yc09wZW5lZD17ZXJyb3JzT3BlbmVkfVxuICAgICAgICAgICAgICAgICAgICBjbGlja0hhbmRsZXI9e2NsaWNrSGFuZGxlcn1cbiAgICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgPGRpdj5cbiAgICAgICAgICAgICAgICA8ZGl2Pnt0aGlzLnByb3BzLmNoaWxkcmVufTwvZGl2PlxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPSdkYXNoLWVycm9yLW1lbnUnPlxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT17dmlzaWJsZSA/ICdkYXNoLWZlLWVycm9ycycgOiAnJ30+XG4gICAgICAgICAgICAgICAgICAgICAgICB7ZnJvbnRFbmRFcnJvcnN9XG4gICAgICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICA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BzKTtcblxuICAgICAgICB0aGlzLnN0YXRlID0ge1xuICAgICAgICAgICAgb3BlbmVkOiBmYWxzZSxcbiAgICAgICAgICAgIGNhbGxiYWNrR3JhcGhPcGVuZWQ6IGZhbHNlLFxuICAgICAgICAgICAgZXJyb3JzT3BlbmVkOiB0cnVlXG4gICAgICAgIH07XG4gICAgfVxuICAgIHJlbmRlcigpIHtcbiAgICAgICAgY29uc3Qge29wZW5lZCwgZXJyb3JzT3BlbmVkLCBjYWxsYmFja0dyYXBoT3BlbmVkfSA9IHRoaXMuc3RhdGU7XG4gICAgICAgIGNvbnN0IHtlcnJvciwgaG90UmVsb2FkfSA9IHRoaXMucHJvcHM7XG5cbiAgICAgICAgY29uc3QgZXJyQ291bnQgPSBlcnJvci5mcm9udEVuZC5sZW5ndGggKyBlcnJvci5iYWNrRW5kLmxlbmd0aDtcbiAgICAgICAgY29uc3QgY29ubmVjdGVkID0gZXJyb3IuYmFja0VuZENvbm5lY3RlZDtcblxuICAgICAgICBjb25zdCB0b2dnbGVFcnJvcnMgPSAoKSA9PiB7XG4gICAgICAgICAgICB0aGlzLnNldFN0YXRlKHtlcnJvcnNPcGVuZWQ6ICFlcnJvcnNPcGVuZWR9KTtcbiAgICAgICAgfTtcblxuICAgICAgICBjb25zdCBzdGF0dXMgPSBob3RSZWxvYWRcbiAgICAgICAgICAgID8gY29ubmVjdGVkXG4gICAgICAgICAgICAgICAgPyAnYXZhaWxhYmxlJ1xuICAgICAgICAgICAgICAgIDogJ3VuYXZhaWxhYmxlJ1xuICAgICAgICAgICAgOiAnY29sZCc7XG4gICAgICAgIGNvbnN0IF9TdGF0dXNJY29uID0gaG90UmVsb2FkXG4gICAgICAgICAgICA/IGNvbm5lY3RlZFxuICAgICAgICAgICAgICAgID8gQ2hlY2tJY29uXG4gICAgICAgICAgICAgICAgOiBPZmZJY29uXG4gICAgICAgICAgICA6IENsb2NrSWNvbjtcblxuICAgICAgICBjb25zdCBtZW51Q29udGVudCA9IG9wZW5lZCA/IChcbiAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPSdkYXNoLWRlYnVnLW1lbnVfX2NvbnRlbnQnPlxuICAgICAgICAgICAgICAgIHtjYWxsYmFja0dyYXBoT3BlbmVkID8gPENhbGxiYWNrR3JhcGhDb250YWluZXIgLz4gOiBudWxsfVxuICAgICAgICAgICAgICAgIHtidXR0b25GYWN0b3J5KFxuICAgICAgICAgICAgICAgICAgICBjYWxsYmFja0dyYXBoT3BlbmVkLFxuICAgICAgICAgICAgICAgICAgICAnY2FsbGJhY2tzJyxcbiAgICAgICAgICAgICAgICAgICAgKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zZXRTdGF0ZSh7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FsbGJhY2tHcmFwaE9wZW5lZDogIWNhbGxiYWNrR3JhcGhPcGVuZWRcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICBHcmFwaEljb24sXG4gICAgICAgICAgICAgICAgICAgICdncmFwaCcsXG4gICAgICAgICAgICAgICAgICAgICdDYWxsYmFja3MnXG4gICAgICAgICAgICAgICAgKX1cbiAgICAgICAgICAgICAgICB7YnV0dG9uRmFjdG9yeShcbiAgICAgICAgICAgICAgICAgICAgZXJyb3JzT3BlbmVkLFxuICAgICAgICAgICAgICAgICAgICAnZXJyb3JzJyxcbiAgICAgICAgICAgICAgICAgICAgdG9nZ2xlRXJyb3JzLFxuICAgICAgICAgICAgICAgICAgICBCZWxsSWNvbixcbiAgICAgICAgICAgICAgICAgICAgJ2JlbGwnLFxuICAgICAgICAgICAgICAgICAgICBlcnJDb3VudCArICcgRXJyb3InICsgKGVyckNvdW50ID09PSAxID8gJycgOiAncycpXG4gICAgICAgICAgICAgICAgKX1cbiAgICAgICAgICAgICAgICB7YnV0dG9uRmFjdG9yeShcbiAgICAgICAgICAgICAgICAgICAgZmFsc2UsXG4gICAgICAgICAgICAgICAgICAgIHN0YXR1cyxcbiAgICAgICAgICAgICAgICAgICAgbnVsbCxcbiAgICAgICAgICAgICAgICAgICAgX1N0YXR1c0ljb24sXG4gICAgICAgICAgICAgICAgICAgICdpbmRpY2F0b3InLFxuICAgICAgICAgICAgICAgICAgICAnU2VydmVyJ1xuICAgICAgICAgICAgICAgICl9XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgKSA6IChcbiAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPSdkYXNoLWRlYnVnLW1lbnVfX2NvbnRlbnQnIC8+XG4gICAgICAgICk7XG5cbiAgICAgICAgY29uc3QgYWxlcnRzTGFiZWwgPVxuICAgICAgICAgICAgKGVyckNvdW50IHx8ICFjb25uZWN0ZWQpICYmICFvcGVuZWQgPyAoXG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9J2Rhc2gtZGVidWctYWxlcnQtbGFiZWwnPlxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT0nZGFzaC1kZWJ1Zy1hbGVydCcgb25DbGljaz17dG9nZ2xlRXJyb3JzfT5cbiAgICAgICAgICAgICAgICAgICAgICAgIHtlcnJDb3VudCA/IChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT0nZGFzaC1kZWJ1Zy1lcnJvci1jb3VudCc+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHsn8J+bkSAnICsgZXJyQ291bnR9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgICAgICAgICApIDogbnVsbH1cbiAgICAgICAgICAgICAgICAgICAgICAgIHtjb25uZWN0ZWQgPyBudWxsIDogKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPSdkYXNoLWRlYnVnLWRpc2Nvbm5lY3RlZCc+8J+aqzwvZGl2PlxuICAgICAgICAgICAgICAgICAgICAgICAgKX1cbiAgICAgICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICApIDogbnVsbDtcblxuICAgICAgICBjb25zdCBvcGVuVmFyaWFudCA9IG9wZW5lZCA/ICdvcGVuJyA6ICdjbG9zZWQnO1xuXG4gICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICA8ZGl2PlxuICAgICAgICAgICAgICAgIHthbGVydHNMYWJlbH1cbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT17Y2xhc3NlcygnZGFzaC1kZWJ1Zy1tZW51X19vdXRlcicsIG9wZW5WYXJpYW50KX0+XG4gICAgICAgICAgICAgICAgICAgIHttZW51Q29udGVudH1cbiAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICA8ZGl2XG4gICAgICAgICAgICAgICAgICAgIGNsYXNzTmFtZT17Y2xhc3NlcygnZGFzaC1kZWJ1Zy1tZW51Jywgb3BlblZhcmlhbnQpfVxuICAgICAgICAgICAgICAgICAgICBvbkNsaWNrPXsoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnNldFN0YXRlKHtvcGVuZWQ6ICFvcGVuZWR9KTtcbiAgICAgICAgICAgICAgICAgICAgfX1cbiAgICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgICAgIDxEZWJ1Z0ljb25cbiAgICAgICAgICAgICAgICAgICAgICAgIGNsYXNzTmFtZT17Y2xhc3NlcygnZGFzaC1kZWJ1Zy1tZW51X19pY29uJywgJ2RlYnVnJyl9XG4gICAgICAgICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgPEdsb2JhbEVycm9yT3ZlcmxheVxuICAgICAgICAgICAgICAgICAgICBlcnJvcj17ZXJyb3J9XG4gICAgICAgICAgICAgICAgICAgIHZpc2libGU9e2VyckNvdW50ID4gMH1cbiAgICAgICAgICAgICAg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ICAgICAgIGVsZW1lbnQsXG4gICAgICAgIHBlcnNpc3RlbmNlLFxuICAgICAgICBwZXJzaXN0ZWRfcHJvcHMsXG4gICAgICAgIHBlcnNpc3RlbmNlX3R5cGVcbiAgICB9ID0gZ2V0UHJvcHMoY29tcG9uZW50KTtcblxuICAgIGxldCBsYXlvdXRPdXQgPSBsYXlvdXQ7XG4gICAgaWYgKGNhblBlcnNpc3QgJiYgcGVyc2lzdGVuY2UpIHtcbiAgICAgICAgY29uc3Qgc3RvcmFnZSA9IGdldFN0b3JlKHBlcnNpc3RlbmNlX3R5cGUsIGRpc3BhdGNoKTtcbiAgICAgICAgY29uc3QgdXBkYXRlID0ge307XG4gICAgICAgIGZvckVhY2goXG4gICAgICAgICAgICBwZXJzaXN0ZWRQcm9wID0+XG4gICAgICAgICAgICAgICAgbW9kUHJvcChcbiAgICAgICAgICAgICAgICAgICAgZ2V0VmFsc0tleShpZCwgcGVyc2lzdGVkUHJvcCwgcGVyc2lzdGVuY2UpLFxuICAgICAgICAgICAgICAgICAgICBzdG9yYWdlLFxuICAgICAgICAgICAgICAgICAgICBlbGVtZW50LFxuICAgICAgICAgICAgICAgICAgICBwcm9wcyxcbiAgICAgICAgICAgICAgICAgICAgcGVyc2lzdGVkUHJvcCxcbiAgICAgICAgICAgICAgICAgICAgdXBkYXRlXG4gICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgIHBlcnNpc3RlZF9wcm9wc1xuICAgICAgICApO1xuXG4gICAgICAgIGZvciAoY29uc3QgcHJvcE5hbWUgaW4gdXBkYXRlKSB7XG4gICAgICAgICAgICBsYXlvdXRPdXQgPSBzZXQoXG4gICAgICAgICAgICAgICAgbGVuc1BhdGgocGF0aC5jb25jYXQoJ3Byb3BzJywgcHJvcE5hbWUpKSxcbiAgICAgICAgICAgICAgICB1cGRhdGVbcHJvcE5hbWVdLFxuICAgICAgICAgICAgICAgIGxheW91dE91dFxuICAgICAgICAgICAgKTtcbiAgICAgICAgfVxuICAgIH1cbl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AhPT0gcGVyc2lzdGVuY2VfdHlwZSB8fFxuICAgICAgICBmaW5hbFBlcnNpc3RlZFByb3BzICE9PSBwZXJzaXN0ZWRfcHJvcHM7XG5cbiAgICBjb25zdCBub3RJbk5ld1Byb3BzID0gcGVyc2lzdGVkUHJvcCA9PlxuICAgICAgICAhKHBlcnNpc3RlZFByb3Auc3BsaXQoJy4nKVswXSBpbiBuZXdQcm9wcyk7XG5cbiAgICBjb25zdCB1cGRhdGUgPSB7fTtcblxuICAgIGxldCBkZXBlcnNpc3RlZFByb3BzID0gcHJvcHM7XG5cbiAgICBpZiAocGVyc2lzdGVuY2VDaGFuZ2VkICYmIHBlcnNpc3RlbmNlKSB7XG4gICAgICAgIC8vIGNsZWFyIHByZXZpb3VzbHktYXBwbGllZCBwZXJzaXN0ZW5jZVxuICAgICAgICBjb25zdCBzdG9yYWdlID0gZ2V0U3RvcmUocGVyc2lzdGVuY2VfdHlwZSwgZGlzcGF0Y2gpO1xuICAgICAgICBmb3JFYWNoKFxuICAgICAgICAgICAgcGVyc2lzdGVkUHJvcCA9PlxuICAgICAgICAgICAgICAgIG1vZFByb3AoXG4gICAgICAgICAgICAgICAgICAgIGdldFZhbHNLZXkoaWQsIHBlcnNpc3RlZFByb3AsIHBlcnNpc3RlbmNlKSxcbiAgICAgICAgICAgICAgICAgICAgc3RvcmFnZSxcbiAgICAgICAgICAgICAgICAgICAgZWxlbWVudCxcbiAgICAgICAgICAgICAgICAgICAgcHJvcHMsXG4gICAgICAgICAgICAgICAgICAgIHBlcnNpc3RlZFByb3AsXG4gICAgICAgICAgICAgICAgICAgIHVwZGF0ZSxcbiAgICAgICAgICAgICAgICAgICAgVU5ET1xuICAgICAgICAgICAgICAgICksXG4gICAgICAgICAgICBmaWx0ZXIobm90SW5OZXdQcm9wcywgcGVyc2lzdGVkX3Byb3BzKVxuICAgICAgICApO1xuICAgICAgICBkZXBlcnNpc3RlZFByb3BzID0gbWVyZ2VSaWdodChwcm9wcywgdXBkYXRlKTtcbiAgICB9XG5cbiAgICBpZiAoZmluYWxQZXJzaXN0ZW5jZSkge1xuICAgICAgICBjb25zdCBmaW5hbFN0b3JhZ2UgPSBnZXRTdG9yZShmaW5hbFBlcnNpc3RlbmNlVHlwZSwgZGlzcGF0Y2gpO1xuXG4gICAgICAgIGlmIChwZXJzaXN0ZW5jZUNoYW5nZWQpIHtcbiAgICAgICAgICAgIC8vIGFwcGx5IG5ldyBwZXJzaXN0ZW5jZVxuICAgICAgICAgICAgZm9yRWFjaChcbiAgICAgICAgICAgICAgICBwZXJzaXN0ZWRQcm9wID0+XG4gICAgICAgICAgICAgICAgICAgIG1vZFByb3AoXG4gICAgICAgICAgICAgICAgICAgICAgICBnZXRWYWxzS2V5KGlkLCBwZXJzaXN0ZWRQcm9wLCBmaW5hbFBlcnNpc3RlbmNlKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGZpbmFsU3RvcmFnZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGVsZW1lbnQsXG4gICAgICAgICAgICAgICAgICAgICAgICBkZXBlcnNpc3RlZFByb3BzLFxuICAgICAgICAgICAgICAgICAgICAgICAgcGVyc2lzdGVkUHJvcCxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVwZGF0ZVxuICAgICAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICAgIGZpbHRlcihub3RJbk5ld1Byb3BzLCBmaW5hbFBlcnNpc3RlZFByb3BzKVxuICAgICAgICAgICAgKTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIG5vdyB0aGUgbWFpbiBwb2ludCAtIGNsZWFyIGFueSBlZGl0IG9mIGEgcHJvcCB0aGF0IGNoYW5nZWRcbiAgICAgICAgLy8gbm90ZSB0aGF0IHRoaXMgaXMgaW5kZXBlbmRlbnQgb2YgdGhlIG5ldyBwcm9wIHZhbHVlLlxuICAgICAgICBjb25zdCB0cmFuc2Zvcm1zID0gZWxlbWVudC5wZXJzaXN0ZW5jZVRyYW5zZm9ybXMgfHwge307XG4gICAgICAgIGZvciAoY29uc3QgcHJvcE5hbWUgaW4gbmV3UHJvcHMpIHtcbiAgICAgICAgICAgIGNvbnN0IHByb3BUcmFuc2Zvcm1zID0gdHJhbnNmb3Jtc1twcm9wTmFtZV07XG4gICAgICAgICAgICBpZiAocHJvcFRyYW5zZm9ybXMpIHtcbiAgICAgICAgICAgICAgICBmb3IgKGNvbnN0IHByb3BQYXJ0IGluIHByb3BUcmFuc2Zvcm1zKSB7XG4gICAgICAgICAgICAgICAgICAgIGZpbmFsU3RvcmFnZS5yZW1vdmVJdGVtKFxuICAgICAgICAgICAgICAgICAgICAgICAgZ2V0VmFsc0tleShcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBgJHtwcm9wTmFtZX0uJHtwcm9wUGFydH1gLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpbmFsUGVyc2lzdGVuY2VcbiAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGZpbmFsU3RvcmFnZS5yZW1vdmVJdGVtKFxuICAgICAgICAgICAgICAgICAgICBnZXRWYWxzS2V5KGlkLCBwcm9wTmFtZSwgZmluYWxQZXJzaXN0ZW5jZSlcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuICAgIHJldHVybiBwZXJzaXN0ZW5jZUNoYW5nZWQgPyBtZXJnZVJpZ2h0KG5ld1Byb3BzLCB1cGRhdGUpIDogbmV3UHJvcHM7XG59XG4iLCJpbXBvcnQge2Fzc29jLCBhc3NvY1BhdGgsIG1lcmdlUmlnaHR9IGZyb20gJ3JhbWRhJztcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gY3JlYXRlQXBpUmVkdWNlcihzdG9yZSkge1xuICAgIHJldH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9IGZyb20gJ3JhbWRhJztcblxuY29uc3QgaW5pdGlhbEVycm9yID0ge1xuICAgIGZyb250RW5kOiBbXSxcbiAgICBiYWNrRW5kOiBbXSxcbiAgICBiYWNrRW5kQ29ubmVjdGVkOiB0cnVlXG59O1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBlcnJvcihzdGF0ZSA9IGluaXRpYWxFcnJvciwgYWN0aW9uKSB7XG4gICAgc3dpdGNoIChhY3Rpb24udHlwZSkge1xuICAgICAgICBjYXNlICdPTl9FUlJPUic6IHtcbiAgICAgICAgICAgIGNvbnN0IHtmcm9udEVuZCwgYmFja0VuZCwgYmFja0VuZENvbm5lY3RlZH0gPSBzdGF0ZTtcbiAgICAgICAgICAgIC8vIGxvZyBlcnJvcnMgdG8gdGhlIGNvbnNvbGUgZm9yIHN0YWNrIHRyYWNpbmcgYW5kIHNvIHRoZXkncmVcbiAgICAgICAgICAgIC8vIGF2YWlsYWJsZSBldmVuIHdpdGggZGVidWdnaW5nIG9mZlxuICAgICAgICAgICAgLyogZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIG5vLWNvbnNvbGUgKi9cbiAgICAgICAgICAgIGNvbnNvbGUuZXJyb3IoYWN0aW9uLnBheWxvYWQuZXJyb3IpO1xuXG4gICAgICAgICAgICBpZiAoYWN0aW9uLnBheWxvYWQudHlwZSA9PT0gJ2Zyb250RW5kJykge1xuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgIGZyb250RW5kOiBbXG4gICAgICAgICAgICAgICAgICAgICAgICBtZXJnZVJpZ2h0KGFjdGlvbi5wYXlsb2FkLCB7dGltZXN0YW1wOiBuZXcgRGF0ZSgpfSksXG4gICAgICAgICAgICAgICAgICAgICAgICAuLi5mcm9udEVuZFxuICAgICAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgICAgICBiYWNrRW5kLFxuICAgICAgICAgICAgICAgICAgICBiYWNrRW5kQ29ubmVjdGVkXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoYWN0aW9uLnBheWxvYWQudHlwZSA9PT0gJ2JhY2tFbmQnKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgZnJvbnRFbmQsXG4gICAgICAgICAgICAgICAgICAgIGJhY2tFbmQ6IFtcbiAgICAgICAgICAgICAgICAgICAgICAgIG1lcmdlUmlnaHQoYWN0aW9uLnBheWxvYWQsIHt0aW1lc3RhbXA6IG5ldyBEYXRlKCl9KSxcbiAgICAgICAgICAgICAgICAgICAgICAgIC4uLmJhY2tFbmRcbiAgICAgICAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICAgICAgICAgYmFja0VuZENvbm5lY3RlZFxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gc3RhdGU7XG4gICAgICAgIH1cbiAgICAgICAgY2FzZSAnU0VUX0NPTk5FQ1RJT05fU1RBVFVTJzoge1xuICAgICAgICAgICAgcmV0dXJuIG1lcmdlUmlnaHQoc3RhdGUsIHtiYWNrRW5kQ29ubmVjdGVkOiBhY3Rpb24ucGF5bG9hZH0pO1xuICAgICAgICB9XG5cbiAgICAgICAgZGVmYXVsdDoge1xuICAgICAgICAgICAgcmV0dXJuIHN0YXRlO1xuICAgICAgICB9XG4gICAgfVxufVxuIiwiY29uc3QgaW5pdGlhbEhpc3RvcnkgPSB7XG4gICAgcGFzdDogW10sXG4gICAgcHJlc2VudDoge30sXG4gICAgZnV0dXJlOiBbXVxufTtcblxuZnVuY3Rpb24gaGlzdG9yeShzdGF0ZSA9IGluaXRpYWxIaXN0b3J5LCBhY3Rpb24pIHtcbiAgICBzd2l0Y2ggKGFjdGlvbi50eXBlKSB7XG4gICAgICAgIGNhc2UgJ1VORE8nOiB7XG4gICAgICAgICAgICBjb25zdCB7cGFzdCwgcHJlc2VudCwgZnV0dXJlfSA9IHN0YXRlO1xuICAgICAgICAgICAgY29uc3QgcHJldmlvdXMgPSBwYXN0W3Bhc3QubGVuZ3RoIC0gMV07XG4gICAgICAgICAgICBjb25zdCBuZXdQYXN0ID0gcGFzdC5zbGljZSgwLCBwYXN0Lmxlbmd0aCAtIDEpO1xuICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICBwYXN0OiBuZXdQYXN0LFxuICAgICAgICAgICAgICAgIHByZXNlbnQ6IHByZXZpb3VzLFxuICAgICAgICAgICAgICAgIGZ1dHVyZTogW3ByZXNlbnQsIC4uLmZ1dHVyZV1cbiAgICAgICAgICAgIH07XG4gICAgICAgIH1cblxuICAgICAgICBjYXNlICdSRURPJzoge1xuICAgICAgICAgICAgY29uc3Qge3Bhc3QsIHByZXNlbnQsIGZ1dHVyZX0gPSBzdGF0ZTtcbiAgICAgICAgICAgIGNvbnN0IG5leHQgPSBmdXR1cmVbMF07XG4gICAgICAgICAgICBjb25zdCBuZXdGdXR1cmUgPSBmdXR1cmUuc2xpY2UoMSk7XG4gICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgIHBhc3Q6IFsuLi5wYXN0LCBwcmVzZW50XSxcbiAgICAgICAgICAgICAgICBwcmVzZW50OiBuZXh0LFxuICAgICAgICAgICAgICAgIGZ1dHVyZTogbmV3RnV0dXJlXG4gICAgICAgICAgICB9O1xuICAgICAgICB9XG5cbiAgICAgICAgY2FzZSAnUkVWRVJUJzoge1xuICAgICAgICAgICAgY29uc3Qge3Bhc3QsIGZ1dHVyZX0gPSBzdGF0ZTtcbiAgICAgICAgICAgIGNvbnN0IHByZXZpb3VzID0gcGFzdFtwYXN0Lmxlbmd0aCAtIDFdO1xuICAgICAgICAgICAgY29uc3QgbmV3UGFzdCA9IHBhc3Quc2xpY2UoMCwgcGFzdC5sZW5ndGggLSAxKTtcbiAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgcGFzdDogbmV3UGFzdCxcbiAgICAgICAgICAgICA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F0dXNNYXBwZWQ7XG4gICAgICAgIGNiLnN0YXR1c1tzdGF0dXNNYXBwZWRdID0gKGNiLnN0YXR1c1tzdGF0dXNNYXBwZWRdIHx8IDApICsgMTtcbiAgICAgICAgY2IucmVzdWx0ID0gYWN0aW9uLnBheWxvYWQucmVzdWx0O1xuICAgICAgICBjYi5pbnB1dHMgPSBhY3Rpb24ucGF5bG9hZC5pbnB1dHM7XG4gICAgICAgIGNiLnN0YXRlID0gYWN0aW9uLnBheWxvYWQuc3RhdGU7XG5cbiAgICAgICAgaWYgKHVzYWdlKSB7XG4gICAgICAgICAgICBjb25zdCB7XG4gICAgICAgICAgICAgICAgX19kYXNoX2NsaWVudCxcbiAgICAgICAgICAgICAgICBfX2Rhc2hfc2VydmVyLFxuICAgICAgICAgICAgICAgIF9fZGFzaF91cGxvYWQsXG4gICAgICAgICAgICAgICAgX19kYXNoX2Rvd25sb2FkLFxuICAgICAgICAgICAgICAgIC4uLnVzZXJcbiAgICAgICAgICAgIH0gPSB1c2FnZTtcblxuICAgICAgICAgICAgY2IudG90YWwgKz0gX19kYXNoX2NsaWVudDtcbiAgICAgICAgICAgIGNiLmNvbXB1dGUgKz0gX19kYXNoX3NlcnZlcjtcbiAgICAgICAgICAgIGNiLm5ldHdvcmsudGltZSArPSBfX2Rhc2hfY2xpZW50IC0gX19kYXNoX3NlcnZlcjtcbiAgICAgICAgICAgIGNiLm5ldHdvcmsudXBsb2FkICs9IF9fZGFzaF91cGxvYWQ7XG4gICAgICAgICAgICBjYi5uZXR3b3JrLmRvd25sb2FkICs9IF9fZGFzaF9kb3dubG9hZDtcblxuICAgICAgICAgICAgZm9yIChjb25zdCByIGluIHVzZXIpIHtcbiAgICAgICAgICAgICAgICBpZiAodXNlci5oYXNPd25Qcm9wZXJ0eShyKSkge1xuICAgICAgICAgICAgICAgICAgICBjYlJlc291cmNlc1tyXSA9IChjYlJlc291cmNlc1tyXSB8fCAwKSArIHVzZXJbcl07XG4gICAgICAgICAgICAgICAgIC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raW5nRW5hYmxlZCA9IGZhbHNlO1xuICAgICAgaWYgKGN5LmxheW91dFV0aWxpdGllcyAmJiBvcHRpb25zLnBhY2tDb21wb25lbnRzKSB7XG4gICAgICAgIGxheVV0aWwgPSBjeS5sYXlvdXRVdGlsaXRpZXMoXCJnZXRcIik7XG4gICAgICAgIGlmICghbGF5VXRpbCkgbGF5VXRpbCA9IGN5LmxheW91dFV0aWxpdGllcygpO1xuICAgICAgICBwYWNraW5nRW5hYmxlZCA9IHRydWU7XG4gICAgICB9XG5cbiAgICAgIGlmIChlbGVzLm5vZGVzKCkubGVuZ3RoID4gMCkge1xuICAgICAgICAvLyBpZiBwYWNraW5nIGlzIG5vdCBlbmFibGVkLCBwZXJmb3JtIGxheW91dCBvbiB0aGUgd2hvbGUgZ3JhcGhcbiAgICAgICAgaWYgKCFwYWNraW5nRW5hYmxlZCkge1xuICAgICAgICAgIC8vIHN0b3JlIGNvbXBvbmVudCBjZW50ZXJcbiAgICAgICAgICB2YXIgYm91bmRpbmdCb3ggPSBvcHRpb25zLmVsZXMuYm91bmRpbmdCb3goKTtcbiAgICAgICAgICBjb21wb25lbnRDZW50ZXJzLnB1c2goeyB4OiBib3VuZGluZ0JveC54MSArIGJvdW5kaW5nQm94LncgLyAyLCB5OiBib3VuZGluZ0JveC55MSArIGJvdW5kaW5nQm94LmggLyAyIH0pO1xuICAgICAgICAgIC8vIGFwcGx5IHNwZWN0cmFsIGxheW91dFxuICAgICAgICAgIGlmIChvcHRpb25zLnJhbmRvbWl6ZSkge1xuICAgICAgICAgICAgdmFyIHJlc3VsdCA9IHNwZWN0cmFsTGF5b3V0KG9wdGlvbnMpO1xuICAgICAgICAgICAgc3BlY3RyYWxSZXN1bHQucHVzaChyZXN1bHQpO1xuICAgICAgICAgIH1cbiAgICAgICAgICAvLyBhcHBseSBjb3NlIGxheW91dCBhcyBwb3N0cHJvY2Vzc2luZ1xuICAgICAgICAgIGlmIChvcHRpb25zLnF1YWxpdHkgPT0gXCJkZWZ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gKyBib3VuZGluZ0JveC5oIC8gMiB9KTtcbiAgICAgICAgICB9KTtcblxuICAgICAgICAgIC8vc2VuZCBlYWNoIGNvbXBvbmVudCB0byBzcGVjdHJhbCBsYXlvdXQgaWYgcmFuZG9taXplZFxuICAgICAgICAgIGlmIChvcHRpb25zLnJhbmRvbWl6ZSkge1xuICAgICAgICAgICAgY29tcG9uZW50cy5mb3JFYWNoKGZ1bmN0aW9uIChjb21wb25lbnQpIHtcbiAgICAgICAgICAgICAgb3B0aW9ucy5lbGVzID0gY29tcG9uZW50O1xuICAgICAgICAgICAgICBzcGVjdHJhbFJlc3VsdC5wdXNoKHNwZWN0cmFsTGF5b3V0KG9wdGlvbnMpKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGlmIChvcHRpb25zLnF1YWxpdHkgPT0gXCJkZWZhdWx0XCIgfHwgb3B0aW9ucy5xdWFsaXR5ID09IFwicHJvb2ZcIikge1xuICAgICAgICAgICAgdmFyIHRvQmVUaWxlZE5vZGVzID0gY3kuY29sbGVjdGlvbigpO1xuICAgICAgICAgICAgaWYgKG9wdGlvbnMudGlsZSkge1xuICAgICAgICAgICAgICAvLyBiZWhhdmUgbm9kZXMgdG8gYmUgdGlsZWQgYXMgb25lIGNvbXBvbmVudFxuICAgICAgICAgICAgICB2YXIgbm9kZUluZGV4ZXMgPSBuZXcgTWFwKCk7XG4gICAgICAgICAgICAgIHZhciBfeENvb3JkcyA9IFtdO1xuICAgICAgICAgICAgICB2YXIgX3lDb29yZHMgPSBbXTtcbiAgICAgICAgICAgICAgdmFyIGNvdW50ID0gMDtcbiAgICAgICAgICAgICAgdmFyIHRlbXBTcGVjdHJhbFJlc3VsdCA9IHsgbm9kZUluZGV4ZXM6IG5vZGVJbmRleGVzLCB4Q29vcmRzOiBfeENvb3JkcywgeUNvb3JkczogX3lDb29yZHMgfTtcbiAgICAgICAgICAgICAgdmFyIGluZGV4ZXNUb0JlRGVsZXRlZCA9IFtdO1xuICAgICAgICAgICAgICBjb21wb25lbnRzLmZvckVhY2goZnVuY3Rpb24gKGNvbXBvbmVudCwgaW5kZXgpIHtcbiAgICAgICAgICAgICAgICBpZiAoY29tcG9uZW50LmVkZ2VzKCkubGVuZ3RoID09IDApIHtcbiAgICAgICAgICAgICAgICAgIGNvbXBvbmVudC5ub2RlcygpLmZvckVhY2goZnVuY3Rpb24gKG5vZGUsIGkpIHtcbiAgICAgICAgICAgICAgICAgICAgdG9CZVRpbGVkTm9kZXMubWVyZ2UoY29tcG9uZW50Lm5vZGVzKClbaV0pO1xuICAgICAgICAgICAgICAgICAgICBpZiAoIW5vZGUuaXNQYXJlbnQoKSkge1xuICAgICAgICAgICAgICAgICAgICAgIHRlbXBTcGVjdHJhbFJlc3VsdC5ub2RlSW5kZXhlcy5zZXQoY29tcG9uZW50Lm5vZGVzKClbaV0uaWQoKSwgY291bnQrKyk7XG4gICAgICAgICAgICAgICAgICAgICAgdGVtcFNwZWN0cmFsUmVzdWx0LnhDb29yZHMucHVzaChjb21wb25lbnQubm9kZXMoKVswXS5wb3NpdGlvbigpLngpO1xuICAgICAgICAgICAgICAgICAgICAgIHRlbXBTcGVjdHJhbFJlc3VsdC55Q29vcmRzLnB1c2goY29tcG9uZW50Lm5vZGVzKClbMF0ucG9zaXRpb24oKS55KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICBpbmRleGVzVG9CZURlbGV0ZWQucHVzaChpbmRleCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgaWYgKHRvQmVUaWxlZE5vZGVzLmxlbmd0aCA+IDEpIHtcbiAgICAgICAgICAgICAgICB2YXIgX2JvdW5kaW5nQm94ID0gdG9CZVRpbGVkTm9kZXMuYm91bmRpbmdCb3goKTtcbiAgICAgICAgICAgICAgICBjb21wb25lbnRDZW50ZXJzLnB1c2goeyB4OiBfYm91bmRpbmdCb3gueDEgKyBfYm91bmRpbmdCb3gudyAvIDIsIHk6IF9ib3VuZGluZ0JveC55MSArIF9ib3VuZGluZ0JveC5oIC8gMiB9KTtcbiAgICAgICAgICAgICAgICBjb21wb25lbnRzLnB1c2godG9CZVRpbGVkTm9kZXMpO1xuICAgICAgICAgICAgICAgIHNwZWN0cmFsUmVzdWx0LnB1c2godGVtcFNwZWN0cmFsUmVzdWx0KTtcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBpID0gaW5kZXhlc1RvQmVEZWxldGVkLmxlbmd0aCAtIDE7IGkgPj0gMDsgaS0tKSB7XG4gICAgICAgICAgICAgICAgICBjb21wb25lbnRzLnNwbGljZShpbmRleGVzVG9CZURlbGV0ZWRbaV0sIDEpO1xuICAgICAgICAgICAgICAgICAgc3BlY3RyYWxSZXN1bHQuc3BsaWNlKGluZGV4ZXNUb0JlRGVsZXRlZFtpXSwgMSk7XG4gICAgICAgICAgICAgICAgICBjb21wb25lbnRDZW50ZXJzLnNwbGljZShpbmRleGVzVG9CZURlbGV0ZWRbaV0sIDEpO1xuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNvbXBvbmVudHMuZm9yRWFjaChmdW5jdGlvbiAoY29tcG9uZW50LCBpbmRleCkge1xuICAgICAgICAgICAgICAvLyBzZW5kIGVhY2ggY29tcG9uZW50IHRvIGNvc2UgbGF5b3V0XG4gICAgICAgICAgICAgIG9wdGlvbnMuZWxlcyA9IGNvbXBvbmVudDtcbiAgICAgICAgICAgICAgY29zZVJlc3VsdC5wdXNoKGNvc2VMYXlvdXQob3B0aW9ucywgc3BlY3RyYWxSZXN1bHRbaW5kZXhdKSk7XG4gICAgICAgICAgICAgIGF1eC5yZWxvY2F0ZUNvbXBvbmVudChjb21wb25lbnRDZW50ZXJzW2luZGV4XSwgY29zZVJlc3VsdFtpbmRleF0sIG9wdGlvbnMpOyAvLyByZWxvY2F0ZSB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GhpZGRlbkVsZXMpLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgICAgICB2YXIgc3ViZ3JhcGggPSB7fTtcbiAgICAgICAgICAgICAgICBzdWJncmFwaC5lZGdlcyA9IFtdO1xuICAgICAgICAgICAgICAgIHN1YmdyYXBoLm5vZGVzID0gW107XG4gICAgICAgICAgICAgICAgdmFyIG5vZGVJbmRleCA9IHZvaWQgMDtcbiAgICAgICAgICAgICAgICBjb21wb25lbnQubm9kZXMoKS5ub3QoaGlkZGVuRWxlcykuZm9yRWFjaChmdW5jdGlvbiAobm9kZSkge1xuICAgICAgICAgICAgICAgICAgaWYgKG9wdGlvbnMucXVhbGl0eSA9PSBcImRyYWZ0XCIpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFub2RlLmlzUGFyZW50KCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICBub2RlSW5kZXggPSBub2RlSW5kZXhlcy5nZXQobm9kZS5pZCgpKTtcbiAgICAgICAgICAgICAgICAgICAgICBzdWJncmFwaC5ub2Rlcy5wdXNoKHsgeDogc3BlY3RyYWxSZXN1bHRbaW5kZXhdLnhDb29yZHNbbm9kZUluZGV4XSAtIG5vZGUuYm91bmRpbmdib3goKS53IC8gMiwgeTogc3BlY3RyYWxSZXN1bHRbaW5kZXhdLnlDb29yZHNbbm9kZUluZGV4XSAtIG5vZGUuYm91bmRpbmdib3goKS5oIC8gMiwgd2lkdGg6IG5vZGUuYm91bmRpbmdib3goKS53LCBoZWlnaHQ6IG5vZGUuYm91bmRpbmdib3goKS5oIH0pO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgIHZhciBwYXJlbnRJbmZvID0gYXV4LmNhbGNCb3VuZGluZ0JveChub2RlLCBzcGVjdHJhbFJlc3VsdFtpbmRleF0ueENvb3Jkcywgc3BlY3RyYWxSZXN1bHRbaW5kZXhdLnlDb29yZHMsIG5vZGVJbmRleGVzKTtcbiAgICAgICAgICAgICAgICAgICAgICBzdWJncmFwaC5ub2Rlcy5wdXNoKHsgeDogcGFyZW50SW5mby50b3BMZWZ0WCwgeTogcGFyZW50SW5mby50b3BMZWZ0WSwgd2lkdGg6IHBhcmVudEluZm8ud2lkdGgsIGhlaWdodDogcGFyZW50SW5mby5oZWlnaHQgfSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChjb3NlUmVzdWx0W2luZGV4XVtub2RlLmlkKCldKSB7XG4gICAgICAgICAgICAgICAgICAgICAgc3ViZ3JhcGgubm9kZXMucHVzaCh7IHg6IGNvc2VSZXN1bHRbaW5kZXhdW25vZGUuaWQoKV0uZ2V0TGVmdCgpLCB5OiBjb3NlUmVzdWx0W2luZGV4XVtub2RlLmlkKCldLmdldFRvcCgpLCB3aWR0aDogY29zZVJlc3VsdFtpbmRleF1bbm9kZS5pZCgpXS5nZXRXaWR0aCgpLCBoZWlnaHQ6IGNvc2VSZXN1bHRbaW5kZXhdW25vZGUuaWQoKV0uZ2V0SGVpZ2h0KCkgfSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICBjb21wb25lbnQuZWRnZXMoKS5mb3JFYWNoKGZ1bmN0aW9uIChlZGdlKSB7XG4gICAgICAgICAgICAgICAgICB2YXIgc291cmNlID0gZWRnZS5zb3VyY2UoKTtcbiAgICAgICAgICAgICAgICAgIHZhciB0YXJnZXQgPSBlZGdlLnRhcmdldCgpO1xuICAgICAgICAgICAgICAgICAgaWYgKHNvdXJjZS5jc3MoXCJkaXNwbGF5XCIpICE9IFwibm9uZVwiICYmIHRhcmdldC5jc3MoXCJkaXNwbGF5XCIpICE9IFwibm9uZVwiKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChvcHRpb25zLnF1YWxpdHkgPT0gXCJkcmFmdFwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgdmFyIHNvdXJjZU5vZGVJbmRleCA9IG5vZGVJbmRleGVzLmdldChzb3VyY2UuaWQoKSk7XG4gICAgICAgICAgICAgICAgICAgICAgdmFyIHRhcmdldE5vZGVJbmRleCA9IG5vZGVJbmRleGVzLmdldCh0YXJnZXQuaWQoKSk7XG4gICAgICAgICAgICAgICAgICAgICAgdmFyIHNvdXJjZUNlbnRlciA9IFtdO1xuICAgICAgICAgICAgICAgICAgICAgIHZhciB0YXJnZXRDZW50ZXIgPSBbXTtcbiAgICAgICAgICAgICAgICAgICAgICBpZiAoc291cmNlLmlzUGFyZW50KCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBwYXJlbnRJbmZvID0gYXV4LmNhbGNCb3VuZGluZ0JveChzb3VyY2UsIHNwZWN0cmFsUmVzdWx0W2luZGV4XS54Q29vcmRzLCBzcGVjdHJhbFJlc3VsdFtpbmRleF0ueUNvb3Jkcywgbm9kZUluZGV4ZXMpO1xuICAgICAgICAgICAgICAgICAgICAgICAgc291cmNlQ2VudGVyLnB1c2gocGFyZW50SW5mby50b3BMZWZ0WCArIHBhcmVudEluZm8ud2lkdGggLyAyKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNvdXJjZUNlbnRlci5wdXNoKHBhcmVudEluZm8udG9wTGVmdFkgKyBwYXJlbnRJbmZvLmhlaWdodCAvIDIpO1xuICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBzb3VyY2VDZW50ZXIucHVzaChzcGVjdHJhbFJlc3VsdFtpbmRleF0ueENvb3Jkc1tzb3VyY2VOb2RlSW5kZXhdKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNvdXJjZUNlbnRlci5wdXNoKHNwZWN0cmFsUmVzdWx0W2luZGV4XS55Q29vcmRzW3NvdXJjZU5vZGVJbmRleF0pO1xuICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICBpZiAodGFyZ2V0LmlzUGFyZW50KCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBfcGFyZW50SW5mbyA9IGF1eC5jYWxjQm91bmRpbmdCb3godGFyZ2V0LCBzcGVjdHJhbFJlc3VsdFtpbmRleF0ueENvb3Jkcywgc3BlY3RyYWxSZXN1bHRbaW5kZXhdLnlDb29yZHMsIG5vZGVJbmRleGVzKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRhcmdldENlbnRlci5wdXNoKF9wYXJlbnRJbmZvLnRvcExlZnRYICsgX3BhcmVudEluZm8ud2lkdGggLyAyKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRhcmdldENlbnRlci5wdXNoKF9wYXJlbnRJbmZvLnRvcExlZnRZICsgX3BhcmVudEluZm8uaGVpZ2h0IC8gMik7XG4gICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRhcmdldENlbnRlci5wdXNoKHNwZWN0cmFsUmVzdWx0W2luZGV4XS54Q29vcmRzW3RhcmdldE5vZGVJbmRleF0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGFyZ2V0Q2VudGVyLnB1c2goc3BlY3RyYWxSZXN1bHRbaW5kZXhdLnlDb29yZHNbdGFyZ2V0Tm9kZUluZGV4XSk7XG4gICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgIHN1YmdyYXBoLmVkZ2VzLnB1c2goeyBzdGFydFg6IHNvdXJjZUNlbnRlclswXSwgc3RhcnRZOiBzb3VyY2VDZW50ZXJbMV0sIGVuZFg6IHRhcmdldENlbnRlclswXSwgZW5kWTogdGFyZ2V0Q2VudGVyWzFdIH0pO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgIGlmIChjb3NlUmVzdWx0W2luZGV4XVtzb3VyY2UuaWQoKV0gJiYgY29zZVJlc3VsdFtp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biAgICAgICAgICAgICAgICAgIHJldHVybiB4ICsgc2hpZnRSZXN1bHRbaW5kZXhdLmR4O1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIHZhciBuZXdZQ29vcmRzID0gcmVzdWx0LnlDb29yZHMubWFwKGZ1bmN0aW9uICh5KSB7XG4gICAgICAgICAgICAgICAgICByZXR1cm4geSArIHNoaWZ0UmVzdWx0W2luZGV4XS5keTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICByZXN1bHQueENvb3JkcyA9IG5ld1hDb29yZHM7XG4gICAgICAgICAgICAgICAgcmVzdWx0LnlDb29yZHMgPSBuZXdZQ29vcmRzO1xuICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHZhciBfY291bnQgPSAwO1xuICAgICAgICAgICAgICBjb21wb25lbnRzRXZhbHVhdGVkLmZvckVhY2goZnVuY3Rpb24gKGluZGV4KSB7XG4gICAgICAgICAgICAgICAgT2JqZWN0LmtleXMoY29zZVJlc3VsdFtpbmRleF0pLmZvckVhY2goZnVuY3Rpb24gKGl0ZW0pIHtcbiAgICAgICAgICAgICAgICAgIHZhciBub2RlUmVjdGFuZ2xlID0gY29zZVJlc3VsdFtpbmRleF1baXRlbV07XG4gICAgICAgICAgICAgICAgICBub2RlUmVjdGFuZ2xlLnNldENlbnRlcihub2RlUmVjdGFuZ2xlLmdldENlbnRlclgoKSArIHNoaWZ0UmVzdWx0W19jb3VudF0uZHgsIG5vZGVSZWN0YW5nbGUuZ2V0Q2VudGVyWSgpICsgc2hpZnRSZXN1bHRbX2NvdW50XS5keSk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgX2NvdW50Kys7XG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICAvLyBnZXQgZWFjaCBlbGVtZW50J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hbCA9PSBcInJpZ2h0XCIpIHtcbiAgICAgICAgICAgICAgICBwb3MueCAtPSBub2RlLmxhYmVsV2lkdGggLyAyO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAobm9kZS5sYWJlbEhlaWdodCkge1xuICAgICAgICAgICAgICBpZiAobm9kZS5sYWJlbFBvc1ZlcnRpY2FsID09IFwidG9wXCIpIHtcbiAgICAgICAgICAgICAgICBwb3MueSArPSBub2RlLmxhYmVsSGVpZ2h0IC8gMjtcbiAgICAgICAgICAgICAgfSBlbHNlIGlmIChub2RlLmxhYmVsUG9zVmVydGljYWwgPT0gXCJib3R0b21cIikge1xuICAgICAgICAgICAgICAgIHBvcy55IC09IG5vZGUubGFiZWxIZWlnaHQgLyAyO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChwb3MgPT0gdW5kZWZpbmVkKSBwb3MgPSB7IHg6IGVsZS5wb3NpdGlvbihcInhcIiksIHk6IGVsZS5wb3NpdGlvbihcInlcIikgfTtcbiAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgeDogcG9zLngsXG4gICAgICAgICAgICB5OiBwb3MueVxuICAgICAgICAgIH07XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgdmFyIF9wb3MgPSB2b2lkIDA7XG4gICAgICAgICAgc3BlY3RyYWxSZXN1bHQuZm9yRWFjaChmdW5jdGlvbiAocmVzdWx0KSB7XG4gICAgICAgICAgICB2YXIgaW5kZXggPSByZXN1bHQubm9kZUluZGV4ZXMuZ2V0KGVsZS5pZCgpKTtcbiAgICAgICAgICAgIGlmIChpbmRleCAhPSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgX3BvcyA9IHsgeDogcmVzdWx0LnhDb29yZHNbaW5kZXhdLCB5OiByZXN1bHQueUNvb3Jkc1tpbmRleF0gfTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB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dGlvbiAobm9kZUlkKSB7XG4gICAgICAgICAgICBub2RlVG9EdW1teUZvclZlcnRpY2FsQWxpZ25tZW50LnNldChub2RlSWQsIFwiZHVtbXlcIiArIGkpO1xuICAgICAgICAgICAgc2VsZi5kdW1teVRvTm9kZUZvclZlcnRpY2FsQWxpZ25tZW50LmdldChcImR1bW15XCIgKyBpKS5wdXNoKG5vZGVJZCk7XG4gICAgICAgICAgICBpZiAoc2VsZi5maXhlZE5vZGVTZXQuaGFzKG5vZGVJZCkpIHtcbiAgICAgICAgICAgICAgc2VsZi5maXhlZE5vZGVzT25Ib3Jpem9udGFsLmFkZChcImR1bW15XCIgKyBpKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgaWYgKHRoaXMuY29uc3RyYWludHMuYWxpZ25tZW50Q29uc3RyYWludC5ob3Jpem9udGFsKSB7XG4gICAgICAgIHZhciBob3Jpem9udGFsQWxpZ25tZW50ID0gdGhpcy5jb25zdHJhaW50cy5hbGlnbm1lbnRDb25zdHJhaW50Lmhvcml6b250YWw7XG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgaG9yaXpvbnRhbEFsaWdubWVudC5sZW5ndGg7IGkrKykge1xuICAgICAgICAgIHRoaXMuZHVtbXlUb05vZGVGb3JIb3Jpem9udGFsQWxpZ25tZW50LnNldChcImR1bW15XCIgKyBpLCBbXSk7XG4gICAgICAgICAgaG9yaXpvbnRhbEFsaWdubWVudFtpXS5mb3JFYWNoKGZ1bmN0aW9uIChub2RlSWQpIHtcbiAgICAgICAgICAgIG5vZGVUb0R1bW15Rm9ySG9yaXpvbnRhbEFsaWdubWVudC5zZXQobm9kZUlkLCBcImR1bW15XCIgKyBpKTtcbiAgICAgICAgICAgIHNlbGYuZHVtbXlUb05vZGVGb3JIb3Jpem9udGFsQWxpZ25tZW50LmdldChcImR1bW15XCIgKyBpKS5wdXNoKG5vZGVJZCk7XG4gICAgICAgICAgICB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0ZpeGVkID0gW107XG4gICAgICAgIHZhciBxdWV1ZSA9IG5ldyBMaW5rZWRMaXN0KCk7XG4gICAgICAgIHZhciB2aXNpdGVkID0gbmV3IFNldCgpO1xuICAgICAgICB2YXIgY291bnQgPSAwO1xuXG4gICAgICAgIGdyYXBoLmZvckVhY2goZnVuY3Rpb24gKHZhbHVlLCBrZXkpIHtcbiAgICAgICAgICBpZiAoIXZpc2l0ZWQuaGFzKGtleSkpIHtcbiAgICAgICAgICAgIGNvbXBvbmVudHNbY291bnRdID0gW107XG4gICAgICAgICAgICBpc0ZpeGVkW2NvdW50XSA9IGZhbHNlO1xuICAgICAgICAgICAgdmFyIGN1cnJlbnROb2RlID0ga2V5O1xuICAgICAgICAgICAgcXVldWUucHVzaChjdXJyZW50Tm9kZSk7XG4gICAgICAgICAgICB2aXNpdGVkLmFkZChjdXJyZW50Tm9kZSk7XG4gICAgICAgICAgICBjb21wb25lbnRzW2NvdW50XS5wdXNoKGN1cnJlbnROb2RlKTtcblxuICAgICAgICAgICAgd2hpbGUgKHF1ZXVlLmxlbmd0aCAhPSAwKSB7XG4gICAgICAgICAgICAgIGN1cnJlbnROb2RlID0gcXVldWUuc2hpZnQoKTtcbiAgICAgICAgICAgICAgaWYgKGZpeGVkTm9kZXMuaGFzKGN1cnJlbnROb2RlKSkge1xuICAgICAgICAgICAgICAgIGlzRml4ZWRbY291bnRdID0gdHJ1ZTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB2YXIgbmVpZ2hib3JzID0gZ3JhcGguZ2V0KGN1cnJlbnROb2RlKTtcbiAgICAgICAgICAgICAgbmVpZ2hib3JzLmZvckVhY2goZnVuY3Rpb24gKG5laWdoYm9yKSB7XG4gICAgICAgICAgICAgICAgaWYgKCF2aXNpdGVkLmhhcyhuZWlnaGJvcikpIHtcbiAgICAgICAgICAgICAgICAgIHF1ZXVlLnB1c2gobmVpZ2hib3IpO1xuICAgICAgICAgICAgICAgICAgdmlzaXRlZC5hZGQobmVpZ2hib3IpO1xuICAgICAgICAgICAgICAgICAgY29tcG9uZW50c1tjb3VudF0ucHVzaChuZWlnaGJvcik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNvdW50Kys7XG4gICAgICAgICAgfVxuICAgICAgICB9KTtcblxuICAgICAgICByZXR1cm4geyBjb21wb25lbnRzOiBjb21wb25lbnRzLCBpc0ZpeGVkOiBpc0ZpeGVkIH07XG4gICAgICB9O1xuXG4gICAgICB2YXIgcmVzdWx0T25Ib3Jpem9udGFsID0gY29uc3RydWN0Q29tcG9uZW50cyhzdWJHcmFwaE9uSG9yaXpvbnRhbCwgc2VsZi5maXhlZE5vZGVzT25Ib3Jpem9udGFsKTtcbiAgICAgIHRoaXMuY29tcG9uZW50c09uSG9yaXpvbnRhbCA9IHJlc3VsdE9uSG9yaXpvbnRhbC5jb21wb25lbnRzO1xuICAgICAgdGhpcy5maXhlZENvbXBvbmVudHNPbkhvcml6b250YWwgPSByZXN1bHRPbkhvcml6b250YWwuaXNGaXhlZDtcbiAgICAgIHZhciByZXN1bHRPblZlcnRpY2FsID0gY29uc3RydWN0Q29tcG9uZW50cyhzdWJHcmFwaE9uVmVydGljYWwsIHNlbGYuZml4ZWROb2Rlc09uVmVydGljYWwpO1xuICAgICAgdGhpcy5jb21wb25lbnRzT25WZXJ0aWNhbCA9IHJlc3VsdE9uVmVydGljYWwuY29tcG9uZW50cztcbiAgICAgIHRoaXMuZml4ZWRDb21wb25lbnRzT25WZXJ0aWNhbCA9IHJlc3VsdE9uVmVydGljYWwuaXNGaXhlZDtcbiAgICB9XG4gIH1cbn07XG5cbi8vIHVwZGF0ZXMgbm9kZSBkaXNwbGFjZW1lbnRzIGJhc2VkIG9uIGNvbnN0cmFpbnRzXG5Db1NFTGF5b3V0LnByb3RvdHlwZS51cGRhdGVEaXNwbGFjZW1lbnRzID0gZnVuY3Rpb24gKCkge1xuICB2YXIgc2Vs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WxmLm5vZGVUb1RlbXBQb3NpdGlvbk1hcEhvcml6b250YWwuZ2V0KGNvbnN0cmFpbnQubGVmdCkgKyBkaXNwbGFjZW1lbnQ7XG4gICAgICAgICAgICAgIGlmIChkaWZmIDwgY29uc3RyYWludC5nYXApIHtcbiAgICAgICAgICAgICAgICBkaXNwbGFjZW1lbnQgKz0gY29uc3RyYWludC5nYXAgLSBkaWZmO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSk7XG4gICAgICAgICAgc2VsZi5ub2RlVG9UZW1wUG9zaXRpb25NYXBIb3Jpem9udGFsLnNldChub2RlSWQsIHNlbGYubm9kZVRvVGVtcFBvc2l0aW9uTWFwSG9yaXpvbnRhbC5nZXQobm9kZUlkKSArIGRpc3BsYWNlbWVudCk7XG4gICAgICAgICAgaWYgKHNlbGYuZHVtbXlUb05vZGVGb3JWZXJ0aWNhbEFsaWdubWVudC5oYXMobm9kZUlkKSkge1xuICAgICAgICAgICAgc2VsZi5kdW1teVRvTm9kZUZvclZlcnRpY2FsQWxpZ25tZW50LmdldChub2RlSWQpLmZvckVhY2goZnVuY3Rpb24gKG5vZGVJZCkge1xuICAgICAgICAgICAgICBzZWxmLmlkVG9Ob2RlTWFwLmdldChub2RlSWQpLmRpc3BsYWNlbWVudFggPSBkaXNwbGFjZW1lbnQ7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgc2VsZi5pZFRvTm9kZU1hcC5nZXQobm9kZUlkKS5kaXNwbGFjZW1lbnRYID0gZGlzcGxhY2VtZW50O1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSk7XG5cbiAgICAgIHRoaXMubm9kZXNJblJlbGF0aXZlVmVydGljYWwuZm9yRWFjaChmdW5jdGlvbiAobm9kZUlkKSB7XG4gICAgICAgIGlmICghc2VsZi5maXhlZE5vZGVzT25Ib3Jpem9udGFsLmhhcyhub2RlSWQpKSB7XG4gICAg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NpdGlvbk1hcFZlcnRpY2FsLmdldChjb25zdHJhaW50LnRvcCkgKyBkaXNwbGFjZW1lbnQ7XG4gICAgICAgICAgICAgIGlmIChkaWZmIDwgY29uc3RyYWludC5nYXApIHtcbiAgICAgICAgICAgICAgICBkaXNwbGFjZW1lbnQgKz0gY29uc3RyYWludC5nYXAgLSBkaWZmO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSk7XG4gICAgICAgICAgc2VsZi5ub2RlVG9UZW1wUG9zaXRpb25NYXBWZXJ0aWNhbC5zZXQobm9kZUlkLCBzZWxmLm5vZGVUb1RlbXBQb3NpdGlvbk1hcFZlcnRpY2FsLmdldChub2RlSWQpICsgZGlzcGxhY2VtZW50KTtcbiAgICAgICAgICBpZiAoc2VsZi5kdW1teVRvTm9kZUZvckhvcml6b250YWxBbGlnbm1lbnQuaGFzKG5vZGVJZCkpIHtcbiAgICAgICAgICAgIHNlbGYuZHVtbXlUb05vZGVGb3JIb3Jpem9udGFsQWxpZ25tZW50LmdldChub2RlSWQpLmZvckVhY2goZnVuY3Rpb24gKG5vZGVJZCkge1xuICAgICAgICAgICAgICBzZWxmLmlkVG9Ob2RlTWFwLmdldChub2RlSWQpLmRpc3BsYWNlbWVudFkgPSBkaXNwbGFjZW1lbnQ7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgc2VsZi5pZFRvTm9kZU1hcC5nZXQobm9kZUlkKS5kaXNwbGFjZW1lbnRZID0gZGlzcGxhY2VtZW50O1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfSBlbHNlIHtcbiAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgdGhpcy5jb21wb25lbnRzT25Ib3Jpem9udGFsLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgIHZhciBjb21wb25lbnQgPSB0aGlzLmNvbXBvbmVudHNPbkhvcml6b250YWxbaV07XG4gICAgICAgIGlmICh0aGlzLmZpeGVkQ29tcG9uZW50c09uSG9yaXpvbnRhbFtpXSkge1xuICAgICAgICAgIGZvciAodmFyIGogPSAwOyBqIDwgY29tcG9uZW50Lmxlbmd0aDsgaisrKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5kdW1teVRvTm9kZUZvclZlcnRpY2FsQWxpZ25tZW50Lmhhcyhjb21wb25lbnRbal0pKSB7XG4gICAgICAgICAgICAgIHRoaXMuZHVtbXlUb05vZGVGb3JWZXJ0aWNhbEFsaWdubWVudC5nZXQoY29tcG9uZW50W2pdKS5mb3JFYWNoKGZ1bmN0aW9uIChub2RlSWQpIHtcbiAgICAgICAgICAgICAgICBzZWxmLmlkVG9Ob2RlTWFwLmdldChub2RlSWQpLmRpc3BsYWNlbWVudFggPSAwO1xuICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHRoaXMuaWRUb05vZGVNYXAuZ2V0KGNvbXBvbmVudFtqXSkuZGlzcGxhY2VtZW50WCA9IDA7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHZhciBzdW0gPSAwO1xuICAgICAgICAgIHZhciBjb3VudCA9IDA7XG4gICAgICAgICAgZm9yICh2YXIgaiA9IDA7IGogPCBjb21wb25lbnQubGVuZ3RoOyBqKyspIHtcbiAgICAgICAgICAgIGlmICh0aGlzLmR1bW15VG9Ob2RlRm9yVmVydGljYWxBbGlnbm1lbnQuaGFzKGNvbXBvbmVudFtqXSkpIHtcbiAgICAgICAgICAgICAgdmFyIGFjdHVhbE5vZGVzID0gdGhpcy5kdW1teVRvTm9kZUZvclZlcnRpY2FsQWxpZ25tZW50LmdldChjb21wb25lbnRbal0pO1xuICAgICAgICAgICAgICBzdW0gKz0gYWN0dWFsTm9kZXMubGVuZ3RoICogdGhpcy5pZFRvTm9kZU1hcC5nZXQoYWN0dWFsTm9kZXNbMF0pLmRpc3BsYWNlbWVudFg7XG4gICAgICAgICAgICAgIGNvdW50ICs9IGFjdHVhbE5vZGVzLmxlbmd0aDtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHN1bSArPSB0aGlzLmlkVG9Ob2RlTWFwLmdldChjb21wb25lbnRbal0pLmRpc3BsYWNlbWVudFg7XG4gICAgICAgICAgICAgIGNvdW50Kys7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIHZhciBhdmVyYWdlRGlzcGxhY2VtZW50ID0gc3VtIC8gY291bnQ7XG4gICAgICAgICAgZm9yICh2YXIgaiA9IDA7IGogPCBjb21wb25lbnQubGVuZ3RoOyBqKyspIHtcbiAgICAgICAgICAgIGlmICh0aGlzLmR1bW15VG9Ob2RlRm9yVmVydGljYWxBbGlnbm1lbnQuaGFzKGNvbXBvbmVudFtqXSkpIHtcbiAgICAgICAgICAgICAgdGhpcy5kdW1teVRvTm9kZUZvclZlcnRpY2FsQWxpZ25tZW50LmdldChjb21wb25lbnRbal0pLmZvckVhY2goZnVuY3Rpb24gKG5vZGVJZCkge1xuICAgICAgICAgICAgICAgIHNlbGYuaWRUb05vZGVNYXAuZ2V0KG5vZGVJZCkuZGlzcGxhY2VtZW50WCA9IGF2ZXJhZ2VEaXNwbGFjZW1lbnQ7XG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgdGhpcy5pZFRvTm9kZU1hcC5nZXQoY29tcG9uZW50W2pdKS5kaXNwbGFjZW1lbnRYID0gYXZlcmFnZURpc3BsYWNlbWVudDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCB0aGlzLmNvbXBvbmVudHNPblZlcnRpY2FsLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgIHZhciBjb21wb25lbnQgPSB0aGlzLmNvbXBvbmVudHNPblZlcnRpY2FsW2ldO1xuICAgICAgICBpZiAodGhpcy5maXhlZENvbXBvbmVudHNPblZlcnRpY2FsW2ldKSB7XG4gICAgICAgICAgZm9yICh2YXIgaiA9IDA7IGogPCBjb21wb25lbnQubGVuZ3RoOyBqKyspIHtcbiAgICAgICAgICAgIGlmICh0aGlzLmR1bW15VG9Ob2RlRm9ySG9yaXpvbnRhbEFsaWdubWVudC5oYXMoY29tcG9uZW50W2pdKSkge1xuICAgICAgICAgICAgICB0aGlzLmR1bW15VG9Ob2RlRm9ySG9yaXpvbnRhbEFsaWdubWVudC5nZXQoY29tcG9uZW50W2pdKS5mb3JFYWNoKGZ1bmN0aW9uIChub2RlSWQpIHtcbiAgICAgICAgICAgICAgICBzZWxmLmlkVG9Ob2RlTWFwLmdldChub2RlSWQpLmRpc3BsYWNlbWVudFkgPSAwO1xuICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHRoaXMuaWRUb05vZGVNYXAuZ2V0KGNvbXBvbmVudFtqXSkuZGlzcGxhY2VtZW50WSA9IDA7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHZhciBzdW0gPSAwO1xuICAgICAgICAgIHZhciBjb3VudCA9IDA7XG4gICAgICAgICAgZm9yICh2YXIgaiA9IDA7IGogPCBjb21wb25lbnQubGVuZ3RoOyBqKyspIHtcbiAgICAgICAgICAgIGlmICh0aGlzLmR1bW15VG9Ob2RlRm9ySG9yaXpvbnRhbEFsaWdubWVudC5oYXMoY29tcG9uZW50W2pdKSkge1xuICAgICAgICAgICAgICB2YXIgYWN0dWFsTm9kZXMgPSB0aGlzLmR1bW15VG9Ob2RlRm9ySG9yaXpvbnRhbEFsaWdubWVudC5nZXQoY29tcG9uZW50W2pdKTtcbiAgICAgICAgICAgICAgc3VtICs9IGFjdHVhbE5vZGVzLmxlbmd0aCAqIHRoaXMuaWRUb05vZGVNYXAuZ2V0KGFjdHVhbE5vZGVzWzBdKS5kaXNwbGFjZW1lbnRZO1xuICAgICAgICAgICAgICBjb3VudCArPSBhY3R1YWxOb2Rlcy5sZW5ndGg7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBzdW0gKz0gdGhpcy5pZFRvTm9kZU1hcC5nZXQoY29tcG9uZW50W2pdKS5kaXNwbGFjZW1lbnRZO1xuICAgICAgICAgICAgICBjb3VudCsrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgICB2YXIgYXZlcmFnZURpc3BsYWNlbWVudCA9IHN1bSAvIGNvdW50O1xuICAgICAgICAgIGZvciAodmFyIGogPSAwOyBqIDwgY29tcG9uZW50Lmxlbmd0aDsgaisrKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5kdW1teVRvTm9kZUZvckhvcml6b250YWxBbGlnbm1lbnQuaGFzKGNvbXBvbmVudFtqXSkpIHtcbiAgICAgICAgICAgICAgdGhpcy5kdW1teVRvTm9kZUZvckhvcml6b250YWxBbGlnbm1lbnQuZ2V0KGNvbXBvbmVudFtqXSkuZm9yRWFjaChmdW5jdGlvbiAobm9kZUlkKSB7XG4gICAgICAgICAgICAgICAgc2VsZi5pZFRvTm9kZU1hcC5nZXQobm9kZUlkKS5kaXNwbGFjZW1lbnRZID0gYXZlcmFnZURpc3BsYWNlbWVudDtcbiAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICB0aGlzLmlkVG9Ob2RlTWFwLmdldChjb21wb25lbnRbal0pLmRpc3BsYWNlbWVudFkgPSBhdmVyYWdlRGlzcGxhY2VtZW50O1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cbiAgfVxufTtcblxuQ29TRUxheW91dC5wcm90b3R5cGUuY2FsY3VsYXRlTm9kZXNUb0FwcGx5R3Jhdml0YXRpb25UbyA9IGZ1b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aGFzZVxuICAgIGlmIChmaXhlZE5vZGVzKSB7XG4gICAgICBjb21wb25lbnRTb3VyY2VzLmZvckVhY2goZnVuY3Rpb24gKGNvbXBvbmVudCkge1xuICAgICAgICB2YXIgZml4ZWRJZHMgPSBbXTtcbiAgICAgICAgY29tcG9uZW50LmZvckVhY2goZnVuY3Rpb24gKG5vZGVJZCkge1xuICAgICAgICAgIGlmIChmaXhlZE5vZGVzLmhhcyhub2RlSWQpKSB7XG4gICAgICAgICAgICBmaXhlZElkcy5wdXNoKG5vZGVJZCk7XG4gICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgICAgaWYgKGZpeGVkSWRzLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICB2YXIgcG9zaXRpb24gPSAwO1xuICAgICAgICAgIGZpeGVkSWRzLmZvckVhY2goZnVuY3Rpb24gKGZpeGVkSWQpIHtcbiAgICAgICAgICAgIGlmIChkaXJlY3Rpb24gPT0gXCJob3Jpem9udGFsXCIpIHtcbiAgICAgICAgICAgICAgcG9zaXRpb25NYXAuc2V0KGZpeGVkSWQsIG5vZGVJbmRleGVzLmhhcyhmaXhlZElkKSA/IHhDb29yZHNbbm9kZUluZGV4ZXMuZ2V0KGZpeGVkSWQpXSA6IGR1bW15UG9zaXRpb25zLmdldChmaXhlZElkKSk7XG4gICAgICAgICAgICAgIHBvc2l0aW9uICs9IHBvc2l0aW9uTWFwLmdldChmaXhlZElkKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHBvc2l0aW9uTWFwLnNldChmaXhlZElkLCBub2RlSW5kZXhlcy5oYXMoZml4ZWRJZCkgPyB5Q29vcmRzW25vZGVJbmRleGVzLmdldChmaXhlZElkKV0gOiBkdW1teVBvc2l0aW9ucy5nZXQoZml4ZWRJZCkpO1xuICAgICAgICAgICAgICBwb3NpdGlvbiArPSBwb3NpdGlvbk1hcC5nZXQoZml4ZWRJZCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSk7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gICAgICAgICAgICAgdmFyIG5vZGVJZCA9IF9zdGVwMi52YWx1ZTtcblxuICAgICAgICAgICAgICBpZiAoZml4ZWROb2Rlcy5oYXMobm9kZUlkKSkge1xuICAgICAgICAgICAgICAgIGlzRml4ZWRDb21wb25lbnQgPSB0cnVlO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSBjYXRjaCAoZXJyKSB7XG4gICAgICAgICAgICBfZGlkSXRlcmF0b3JFcnJvcjIgPSB0cnVlO1xuICAgICAgICAgICAgX2l0ZXJhdG9yRXJyb3IyID0gZXJyO1xuICAgICAgICAgIH0gZmluYWxseSB7XG4gICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICBpZiAoIV9pdGVyYXRvck5vcm1hbENvbXBsZXRpb24yICYmIF9pdGVyYXRvcjIucmV0dXJuKSB7XG4gICAgICAgICAgICAgICAgX2l0ZXJhdG9yMi5yZXR1cm4oKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBmaW5hbGx5IHtcbiAgICAgICAgICAgICAgaWYgKF9kaWRJdGVyYXRvckVycm9yMikge1xuICAgICAgICAgICAgICAgIHRocm93IF9pdGVyYXRvckVycm9yMjtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cblxuICAgICAgICAgIGlmICghaXNGaXhlZENvbXBvbmVudCkge1xuICAgICAgICAgICAgdmFyIGlzRXhpc3QgPSBmYWxzZTtcbiAgICAgICAgICAgIHZhciBleGlzdEF0ID0gdm9pZCAwO1xuICAgICAgICAgICAgX2NvbXBvbmVudHMuZm9yRWFjaChmdW5jdGlvbiAoY29tcG9uZW50LCBpbmRleCkge1xuICAgICAgICAgICAgICBpZiAoY29tcG9uZW50LmhhcyhbXS5jb25jYXQoX3RvQ29uc3VtYWJsZUFycmF5KHZhbHVlKSlbMF0pKSB7XG4gICAgICAgICAgICAgICAgaXNFeGlzdCA9IHRydWU7XG4gICAgICAgICAgICAgICAgZXhpc3RBdCA9IGluZGV4O1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIGlmICghaXNFeGlzdCkge1xuICAgICAgICAgICAgICBfY29tcG9uZW50cy5wdXNoKG5ldyBTZXQodmFsdWUpKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHZhbHVlLmZvckVhY2goZnVuY3Rpb24gKGVsZSkge1xuICAgICAgICAgICAgICAgIF9jb21wb25lbnRzW2V4aXN0QXRdLmFkZChlbGUpO1xuICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0pO1xuXG4gICAgICBfY29tcG9uZW50cy5mb3JFYWNoKGZ1bmN0aW9uIChjb21wb25lbnQsIGluZGV4KSB7XG4gICAgICAgIHZhciBtaW5CZWZvcmUgPSBOdW1iZXIuUE9TSVRJVkVfSU5GSU5JVFk7XG4gICAgICAgIHZhciBtaW5BZnRlciA9IE51bWJlci5QT1NJVElWRV9JTkZJTklUWTtcbiAgICAgICAgdmFyIG1heEJlZm9yZSA9IE51bWJlci5ORUdBVElWRV9JTkZJTklUWTtcbiAgICAgICAgdmFyIG1heEFmdGVyID0gTnVtYmVyLk5FR0FUSVZFX0lORklOSVRZO1xuXG4gICAgICAgIHZhciBfaXRlcmF0b3JOb3JtYWxDb21wbGV0aW9uMyA9IHRydWU7XG4gICAgICAgIHZhciBfZGlkSXRlcmF0b3JFcnJvcjMgPSBmYWxzZTtcbiAgICAgICAgdmFyIF9pdGVyYXRvckVycm9yMyA9IHVuZGVmaW5lZDtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgIGZvciAodmFyIF9pdGVyYXRvcjMgPSBjb21wb25lbnRbU3ltYm9sLml0ZXJhdG9yXSgpLCBfc3RlcDM7ICEoX2l0ZXJhdG9yTm9ybWFsQ29tcGxldGlvbjMgPSAoX3N0ZXAzID0gX2l0ZXJhdG9yMy5uZXh0KCkpLmRvbmUpOyBfaXRlcmF0b3JOb3JtYWxDb21wbGV0aW9uMyA9IHRydWUpIHtcbiAgICAgICAgICAgIHZhciBub2RlSWQgPSBfc3RlcDMudmFsdWU7XG5cbiAgICAgICAgICAgIHZhciBwb3NCZWZvcmUgPSB2b2lkIDA7XG4gICAgICAgICAgICBpZiAoZGlyZWN0aW9uID09IFwiaG9yaXpvbnRhbFwiKSB7XG4gICAgICAgICAgICAgIHBvc0JlZm9yZSA9IG5vZGVJbmRleGVzLmhhcyhub2RlSWQpID8geENvb3Jkc1tub2RlSW5kZXhlcy5nZXQobm9kZUlkKV0gOiBkdW1teVBvc2l0aW9ucy5nZXQobm9kZUlkKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHBvc0JlZm9yZSA9IG5vZGVJbmRleGVzLmhhcyhub2RlSWQpID8geUNvb3Jkc1tub2RlSW5kZXhlcy5nZXQobm9kZUlkKV0gOiBkdW1teVBvc2l0aW9ucy5nZXQobm9kZUlkKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciBwb3NBZnRlciA9IHBvc2l0aW9uTWFwLmdldChub2RlSWQpO1xuICAgICAgICAgICAgaWYgKHBvc0JlZm9yZSA8IG1pbkJlZm9yZSkge1xuICAgICAgICAgICAgICBtaW5CZWZvcmUgPSBwb3NCZWZvcmU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAocG9zQmVmb3JlID4gbWF4QmVmb3JlKSB7XG4gICAgICAgICAgICAgIG1heEJlZm9yZSA9IHBvc0JlZm9yZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChwb3NBZnRlciA8IG1pbkFmdGVyKSB7XG4gICAgICAgICAgICAgIG1pbkFmdGVyID0gcG9zQWZ0ZXI7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAocG9zQWZ0ZXIgPiBtYXhBZnRlcikge1xuICAgICAgICAgICAgICBtYXhBZnRlciA9IH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FsaWdubWVudFNldC5hZGQobm9kZUlkKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgdmFyIGludGVyc2VjdGlvbiA9IG5ldyBTZXQoW10uY29uY2F0KF90b0NvbnN1bWFibGVBcnJheShhbGlnbm1lbnRTZXQpKS5maWx0ZXIoZnVuY3Rpb24gKHgpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGZpeGVkTm9kZXMuaGFzKHgpO1xuICAgICAgICAgICAgfSkpO1xuICAgICAgICAgICAgdmFyIHhQb3MgPSB2b2lkIDA7XG4gICAgICAgICAgICBpZiAoaW50ZXJzZWN0aW9uLnNpemUgPiAwKSB4UG9zID0geENvb3Jkc1tub2RlSW5kZXhlcy5nZXQoaW50ZXJzZWN0aW9uLnZhbHVlcygpLm5leHQoKS52YWx1ZSldO2Vsc2UgeFBvcyA9IGNhbGN1bGF0ZUF2Z1Bvc2l0aW9uKGFsaWdubWVudFNldCkueDtcblxuICAgICAgICAgICAgdmVydGljYWxBbGlnbltfaTRdLmZvckVhY2goZnVuY3Rpb24gKG5vZGVJZCkge1xuICAgICAgICAgICAgICB0YXJnZXRNYXRyaXhbY291bnRdID0gW3hQb3MsIHlDb29yZHNbbm9kZUluZGV4ZXMuZ2V0KG5vZGVJZCldXTtcbiAgICAgICAgICAgICAgc291cmNlTWF0cml4W2NvdW50XSA9IFt4Q29vcmRzW25vZGVJbmRleGVzLmdldChub2RlSWQpXSwgeUNvb3Jkc1tub2RlSW5kZXhlcy5nZXQobm9kZUlkKV1dO1xuICAgICAgICAgICAgICBjb3VudCsrO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfTtcblxuICAgICAgICAgIGZvciAodmFyIF9pNCA9IDA7IF9pNCA8IHZlcnRpY2FsQWxpZ24ubGVuZ3RoOyBfaTQrKykge1xuICAgICAgICAgICAgX2xvb3AyKF9pNCk7XG4gICAgICAgICAgfVxuICAgICAgICAgIHN0YW5kYXJkVHJhbnNmb3JtYXRpb24gPSB0cnVlO1xuICAgICAgICB9XG4gICAgICAgIGlmIChjb25zdHJhaW50cy5hbGlnbm1lbnRDb25zdHJhaW50Lmhvcml6b250YWwpIHtcbiAgICAgICAgICB2YXIgaG9yaXpvbnRhbEFsaWduID0gY29uc3RyYWludHMuYWxpZ25tZW50Q29uc3RyYWludC5ob3Jpem9udGFsO1xuXG4gICAgICAgICAgdmFyIF9sb29wMyA9IGZ1bmN0aW9uIF9sb29wMyhfaTUpIHtcbiAgICAgICAgICAgIHZhciBhbGlnbm1lbnRTZXQgPSBuZXcgU2V0KCk7XG4gICAgICAgICAgICBob3Jpem9udGFsQWxpZ25bX2k1XS5mb3JFYWNoKGZ1bmN0aW9uIChub2RlSWQpIHtcbiAgICAgICAgICAgICAgYWxpZ25tZW50U2V0LmFkZChub2RlSWQpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB2YXIgaW50ZXJzZWN0aW9uID0gbmV3IFNldChbXS5jb25jYXQoX3RvQ29uc3VtYWJsZUFycmF5KGFsaWdubWVudFNldCkpLmZpbHRlcihmdW5jdGlvbiAoeCkge1xuICAgICAgICAgICAgICByZXR1cm4gZml4ZWROb2Rlcy5oYXMoeCk7XG4gICAgICAgICAgICB9KSk7XG4gICAgICAgICAgICB2YXIgeVBvcyA9IHZvaWQgMDtcbiAgICAgICAgICAgIGlmIChpbnRlcnNlY3Rpb24uc2l6ZSA+IDApIHlQb3MgPSB4Q29vcmRzW25vZGVJbmRleGVzLmdldChpbnRlcnNlY3Rpb24udmFsdWVzKCkubmV4dCgpLnZhbHVlKV07ZWxzZSB5UG9zID0gY2FsY3VsYXRlQXZnUG9zaXRpb24oYWxpZ25tZW50U2V0KS55O1xuXG4gICAgICAgICAgICBob3Jpem9udGFsQWxpZ25bX2k1XS5mb3JFYWNoKGZ1bmN0aW9uIChub2RlSWQpIHtcbiAgICAgICAgICAgICAgdGFyZ2V0TWF0cml4W2NvdW50XSA9IFt4Q29vcmRzW25vZGVJbmRleGVzLmdldChub2RlSWQpXS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G9yaXpvbnRhbFwiKSB7XG4gICAgICAgICAgICAgIGlmIChzdWJHcmFwaE9uSG9yaXpvbnRhbC5oYXMobm9kZUlkKSkge1xuICAgICAgICAgICAgICAgIHN1YkdyYXBoT25Ib3Jpem9udGFsLmdldChub2RlSWQpLnB1c2goYWRqYWNlbnQpO1xuICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHN1YkdyYXBoT25Ib3Jpem9udGFsLnNldChub2RlSWQsIFthZGphY2VudF0pO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGlmICghc3ViR3JhcGhPbkhvcml6b250YWwuaGFzKGFkamFjZW50LmlkKSkge1xuICAgICAgICAgICAgICAgIHN1YkdyYXBoT25Ib3Jpem9udGFsLnNldChhZGphY2VudC5pZCwgW10pO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGNvbnN0cmFpbnRzSW5sYXJnZXN0Q29tcG9uZW50LnB1c2goeyBsZWZ0OiBub2RlSWQsIHJpZ2h0OiBhZGphY2VudC5pZCB9KTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIGlmIChzdWJHcmFwaE9uVmVydGljYWwuaGFzKG5vZGVJZCkpIHtcbiAgICAgICAgICAgICAgICBzdWJHcmFwaE9uVmVydGljYWwuZ2V0KG5vZGVJZCkucHVzaChhZGphY2VudCk7XG4gICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgc3ViR3JhcGhPblZlcnRpY2FsLnNldChub2RlSWQsIFthZGphY2VudF0pO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGlmICghc3ViR3JhcGhPblZlcnRpY2FsLmhhcyhhZGphY2VudC5pZCkpIHtcbiAgICAgICAgICAgICAgICBzdWJHcmFwaE9uVmVydGljYWwuc2V0KGFkamFjZW50LmlkLCBbXSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgY29uc3RyYWludHNJbmxhcmdlc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VmVydGljYWxBbGlnbm1lbnQuc2V0KG5vZGVJZCwgXCJkdW1teVwiICsgX2kxMSk7XG4gICAgICAgICAgICAgICAgZHVtbXlUb05vZGVGb3JWZXJ0aWNhbEFsaWdubWVudC5nZXQoXCJkdW1teVwiICsgX2kxMSkucHVzaChub2RlSWQpO1xuICAgICAgICAgICAgICAgIGlmIChmaXhlZE5vZGVzLmhhcyhub2RlSWQpKSB7XG4gICAgICAgICAgICAgICAgICBmaXhlZE5vZGVzT25Ib3Jpem9udGFsLmFkZChcImR1bW15XCIgKyBfaTExKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICBkdW1teVBvc2l0aW9uc0ZvclZlcnRpY2FsQWxpZ25tZW50LnNldChcImR1bW15XCIgKyBfaTExLCB4Q29vcmRzW25vZGVJbmRleGVzLmdldCh2ZXJ0aWNhbEFsaWdubWVudFtfaTExXVswXSldKTtcbiAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgIGZvciAodmFyIF9pMTEgPSAwOyBfaTExIDwgdmVydGljYWxBbGlnbm1lbnQubGVuZ3RoOyBfaTExKyspIHtcbiAgICAgICAgICAgICAgX2xvb3A2KF9pMTEpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoY29uc3RyYWludHMuYWxpZ25tZW50Q29uc3RyYWludC5ob3Jpem9udGFsKSB7XG4gICAgICAgICAgICB2YXIgaG9yaXpvbnRhbEFsaWdubWVudCA9IGNvbnN0cmFpbnRzLmFsaWdubWVudENvbnN0cmFpbnQuaG9yaXpvbnRhbDtcblxuICAgICAgICAgICAgdmFyIF9sb29wNyA9IGZ1bmN0aW9uIF9sb29wNyhfaTEyKSB7XG4gICAgICAgICAgICAgIGR1bW15VG9Ob2RlRm9ySG9yaXpvbnRhbEFsaWdubWVudC5zZXQoXCJkdW1teVwiICsgX2kxMiwgW10pO1xuICAgICAgICAgICAgICBob3Jpem9udGFsQWxpZ25tZW50W19pMTJdLmZvckVhY2goZnVuY3Rpb24gKG5vZGVJZCkge1xuICAgICAgICAgICAgICAgIG5vZGVUb0R1bW15Rm9ySG9yaXpvbnRhbEFsaWdubWVudC5zZXQobm9kZUlkLCBcImR1bW15XCIgKyBfaTEyKTtcbiAgICAgICAgICAgICAgICBkdW1teVRvTm9kZUZvckhvcml6b250YWxBbGlnbm1lbnQuZ2V0KFwiZHVtbXlcIiArIF9pMTIpLnB1c2gobm9kZUlkKTtcbiAgICAgICAgICAgICAgICBpZiAoZml4ZWROb2Rlcy5oYXMobm9kZUlkKSkge1xuICAgICAgICAgICAgICAgICAgZml4ZWROb2Rlc09uVmVydGljYWwuYWRkKFwiZHVtbXlcIiArIF9pMTIpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgIGR1bW15UG9zaXRpb25zRm9ySG9yaXpvbnRhbEFsaWdubWVudC5zZXQoXCJkdW1teVwiICsgX2kxMiwgeUNvb3Jkc1tub2RlSW5kZXhlcy5nZXQoaG9yaXpvbnRhbEFsaWdubWVudFtfaTEyXVswXSldKTtcbiAgICAgICAgICAgIH07XG5cbiAgICAgICAgICAgIGZvciAodmFyIF9pMTIgPSAwOyBfaTEyIDwgaG9yaXpvbnRhbEFsaWdubWVudC5sZW5ndGg7IF9pMTIrKykge1xuICAgICAgICAgICAgICBfbG9vcDcoX2kxMik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgLy8gY29uc3RydWN0IGhvcml6b250YWwgYW5kIHZlcnRpY2FsIGRhZ3MgKHN1YmdyYXBocykgZnJvbSBvdmVyYWxsIGRhZ1xuICAgICAgICB2YXIgZGFnT25Ib3Jpem9udGFsID0gbmV3IE1hcCgpO1xuICAgICAgICB2YXIgZGFnT25WZXJ0aWNhbCA9IG5ldyBNYXAoKTtcblxuICAgICAgICB2YXIgX2xvb3A4ID0gZnVuY3Rpb24gX2xvb3A4KG5vZGVJZCkge1xuICAgICAgICAgIGRhZy5nZXQobm9kZUlkKS5mb3JFYWNoKGZ1bmN0aW9uIChhZGphY2VudCkge1xuICAgICAgICAgICAgdmFyIHNvdXJjZUlkID0gdm9pZCAwO1xuICAgICAgICAgICAgdmFyIHRhcmdldE5vZGUgPSB2b2lkIDA7XG4gICAgICAgICAgICBpZiAoYWRqYWNlbnRbXCJkaXJlY3Rpb25cIl0gPT0gXCJob3Jpem9udGFsXCIpIHtcbiAgICAgICAgICAgICAgc291cmNlSWQgPSBub2RlVG9EdW1teUZvclZlcnRpY2FsQWxpZ25tZW50LmdldChub2RlSWQpID8gbm9kZVRvRHVtbXlGb3JWZXJ0aWNhbEFsaWdubWVudC5nZXQobm9kZUlkKSA6IG5vZGVJZDtcbiAgICAgICAgICAgICAgaWYgKG5vZGVUb0R1bW15Rm9yVmVydGljYWxBbGlnbm1lbnQuZ2V0KGFkamFjZW50LmlkKSkge1xuICAgICAgICAgICAgICAgIHRhcmdldE5vZGUgPSB7IGlkOiBub2RlVG9EdW1teUZvclZlcnRpY2FsQWxpZ25tZW50LmdldChhZGphY2VudC5pZCksIGdhcDogYWRqYWNlbnQuZ2FwLCBkaXJlY3Rpb246IGFkamFjZW50LmRpcmVjdGlvbiB9O1xuICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHRhcmdldE5vZGUgPSBhZGphY2VudDtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBpZiAoZGFnT25Ib3Jpem9udGFsLmhhcyhzb3VyY2VJZCkpIHtcbiAgICAgICAgICAgICAgICBkYWdPbkhvcml6b250YWwuZ2V0KHNvdXJjZUlkKS5wdXNoKHRhcmdldE5vZGUpO1xuICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGRhZ09uSG9yaXpvbnRhbC5zZXQoc291cmNlSWQsIFt0YXJnZXROb2RlXSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgaWYgKCFkYWdPbkhvcml6b250YWwuaGFzKHRhcmdldE5vZGUuaWQpKSB7XG4gICAgICAgICAgICAgICAgZGFnT25Ib3Jpem9udGFsLnNldCh0YXJnZXROb2RlLmlkLCBbXSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHNvdXJjZUlkID0gbm9kZVRvRHVtbXlGb3JIb3Jpem9udGFsQWxpZ25tZW50LmdldChub2RlSWQpID8gbm9kZVRvRHVtbXlGb3JIb3Jpem9udGFsQWxpZ25tZW50LmdldChub2RlSWQpIDogbm9kZUlkO1xuICAgICAgICAgICAgICBpZiAobm9kZVRvRHVtbXlGb3JIb3Jpem9udGFsQWxpZ25tZW50LmdldChhZGphY2VudC5pZCkpIHtcbiAgICAgICAgICAgICAgICB0YXJnZXROb2RlID0geyBpZDogbm9kZVRvRHVtbXlGb3JIb3Jpem9udGFsQWxpZ25tZW50LmdldChhZGphY2VudC5pZCksIGdhcDogYWRqYWNlbnQuZ2FwLCBkaXJlY3Rpb246IGFkamFjZW50LmRpcmVjdGlvbiB9O1xuICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHRhcmdldE5vZGUgPSBhZGphY2VudDtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBpZiAoZGFnT25WZXJ0aWNhbC5oYXMoc291cmNlSWQpKSB7XG4gICAgICAgICAgICAgICAgZGFnT25WZXJ0aWNhbC5nZXQoc291cmNlSWQpLnB1c2godGFyZ2V0Tm9kZSk7XG4gICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgZGFnT25WZXJ0aWNhbC5zZXQoc291cmNlSWQsIFt0YXJnZXROb2RlXSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgaWYgKCFkYWdPblZlcnRpY2FsLmhhcyh0YXJnZXROb2RlLmlkKSkge1xuICAgICAgICAgICAgICAgIGRhZ09uVmVydGljYWwuc2V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aW5hbGx5IHtcbiAgICAgICAgICAgIGlmIChfZGlkSXRlcmF0b3JFcnJvcjUpIHtcbiAgICAgICAgICAgICAgdGhyb3cgX2l0ZXJhdG9yRXJyb3I1O1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHZhciB1bmRpcmVjdGVkT25Ib3Jpem9udGFsID0gZGFnVG9VbmRpcmVjdGVkKGRhZ09uSG9yaXpvbnRhbCk7XG4gICAgICAgIHZhciB1bmRpcmVjdGVkT25WZXJ0aWNhbCA9IGRhZ1RvVW5kaXJlY3RlZChkYWdPblZlcnRpY2FsKTtcbiAgICAgICAgdmFyIGNvbXBvbmVudHNPbkhvcml6b250YWwgPSBmaW5kQ29tcG9uZW50cyh1bmRpcmVjdGVkT25Ib3Jpem9udGFsKTtcbiAgICAgICAgdmFyIGNvbXBvbmVudHNPblZlcnRpY2FsID0gZmluZENvbXBvbmVudHModW5kaXJlY3RlZE9uVmVydGljYWwpO1xuICAgICAgICB2YXIgcmV2ZXJzZWREYWdPbkhvcml6b250YWwgPSBkYWdUb1JldmVyc2VkKGRhZ09uSG9yaXpvbnRhbCk7XG4gICAgICAgIHZhciByZXZlcnNlZERhZ09uVmVydGljYWwgPSBkYWdUb1JldmVyc2VkKGRhZ09uVmVydGljYWwpO1xuICAgICAgICB2YXIgY29tcG9uZW50U291cmNlc09uSG9yaXpvbnRhbCA9IFtdO1xuICAgICAgICB2YXIgY29tcG9uZW50U291cmNlc09uVmVydGljYWwgPSBbXTtcblxuICAgICAgICBjb21wb25lbnRzT25Ib3Jpem9udGFsLmZvckVhY2goZnVuY3Rpb24gKGNvbXBvbmVudCwgaW5kZXgpIHtcbiAgICAgICAgICBjb21wb25lbnRTb3VyY2VzT25Ib3Jpem9udGFsW2luZGV4XSA9IFtdO1xuICAgICAgICAgIGNvbXBvbmVudC5mb3JFYWNoKGZ1bmN0aW9uIChub2RlSWQpIHtcbiAgICAgICAgICAgIGlmIChyZXZlcn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cbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9IGZpbmFsbHkge1xuICAgICAgICAgICAgaWYgKF9kaWRJdGVyYXRvckVycm9yNykge1xuICAgICAgICAgICAgICB0aHJvdyBfaXRlcmF0b3JFcnJvcjc7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9KSgpO1xuICAgIH1cbiAgfVxuXG4gIC8vIGFzc2lnbiBuZXcgY29vcmRpbmF0ZXMgdG8gbm9kZXMgYWZ0ZXIgY29uc3RyYWludCBoYW5kbGluZ1xuICBmb3IgKHZhciBfaTEzID0gMDsgX2kxMyA8IGFsbE5vZGVzLmxlbmd0aDsgX2kxMysrKSB7XG4gICAgdmFyIF9ub2RlID0gYWxsTm9kZXNbX2kxM107XG4gICAgaWYgKF9ub2RlLmdldENoaWxkKCkgPT0gbnVsbCkge1xuICAgICAgX25vZGUuc2V0Q2VudGVyKHhDb29yZHNbbm9kZUluZGV4ZXMuZ2V0KF9ub2RlLmlkKV0sIHlDb29yZHNbbm9kZUluZGV4ZXMuZ2V0KF9ub2RlLmlkKV0pO1xuICAgIH1cbiAgfVxufTtcblxubW9kdWxlLmV4cG9ydHMgPSBDb25zdHJhaW50SGFuZGxlcjtcblxuLyoqKi8gfSksXG5cbi8qKiovIDU1MTpcbi8qKiovICgobW9kdWxlKSA9PiB7XG5cbm1vZHVsZS5leHBvcnRzID0gX19XRUJQQUNLX0VYVEVSTkFMX01PRFVMRV9fNTUxX187XG5cbi8qKiovIH0pXG5cbi8qKioqKiovIFx0fSk7XG4vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqL1xuLyoqKioqKi8gXHQvLyBUaGUgbW9kdWxlIGNhY2hlXG4vKioqKioqLyBcdHZhciBfX3dlYnBhY2tfbW9kdWxlX2NhY2hlX18gPSB7fTtcbi8qKioqKiovIFx0XG4vKioqKioqLyBcdC8vIFRoZSByZXF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ZWQgJiYgZS5kYXRhKCdzb3VyY2UnKSAhPT0gY01pbklkKSB7XG4gICAgICAgICAgY29udGludWU7XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgd1NyYyA9IGUuc291cmNlKCk7XG4gICAgICAgIHZhciB3VGd0ID0gZS50YXJnZXQoKTtcbiAgICAgICAgdmFyIHcgPSB3U3JjLmlkKCkgIT09IGNNaW5JZCA/IHdTcmMgOiB3VGd0O1xuICAgICAgICB2YXIgd2lkID0gdy5pZCgpOyAvLyBub2RlIG11c3QgYmUgaW4gc2V0IG9mIGNhbGxpbmcgZWxlc1xuXG4gICAgICAgIGlmICghdGhpcy5oYXNFbGVtZW50V2l0aElkKHdpZCkpIHtcbiAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgfSAvLyBpZiBub2RlIGlzIGluIGNsb3NlZFNldCwgaWdub3JlIGl0XG5cblxuICAgICAgICBpZiAoY2xvc2VkU2V0SWRzW3dpZF0pIHtcbiAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgfSAvLyBOZXcgdGVudGF0aXZlIHNjb3JlIGZvciBub2RlIHdcblxuXG4gICAgICAgIHZhciB0ZW1wU2NvcmUgPSBnU2NvcmVbY01pbklkXSArIHdlaWdodChlKTsgLy8gVXBkYXRlIGdTY29yZSBmb3Igbm9kZSB3IGlmOlxuICAgICAgICAvLyAgIHcgbm90IHByZXNlbnQgaW4gb3BlblNldFxuICAgICAgICAvLyBPUlxuICAgICAgICAvLyAgIHRlbnRhdGl2ZSBnU2NvcmUgaXMgbGVzcyB0aGFuIHByZXZpb3VzIHZhbHVlXG4gICAgICAgIC8vIHcgbm90IGluIG9wZW5TZXRcblxuICAgICAgICBpZiAoIWlzSW5PcGVuU2V0KHdpZCkpIHtcbiAgICAgICAgICBnU2NvcmVbd2lkXSA9IHRlbXBTY29yZTtcbiAgICAgICAgICBmU2NvcmVbd2lkXSA9IHRlbXBTY29yZSArIGhldXJpc3RpYyh3KTtcbiAgICAgICAgICBhZGRUb09wZ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HVuZGlyZWN0ZWQgZ3JhcGgsIHByb2Nlc3MgJ3JldmVyc2VkJyBlZGdlXG5cblxuICAgICAgaWYgKCFkaXJlY3RlZCkge1xuICAgICAgICB2YXIgdHMgPSB0ICogTiArIHM7IC8vIHRhcmdldCB0byBzb3VyY2UgaW5kZXhcblxuICAgICAgICBpZiAoIWRpcmVjdGVkICYmIGRpc3RbdHNdID4gX3dlaWdodCkge1xuICAgICAgICAgIGRpc3RbdHNdID0gX3dlaWdodDtcbiAgICAgICAgICBuZXh0W3RzXSA9IHM7XG4gICAgICAgICAgZWRnZU5leHRbdHNdID0gZWRnZTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0gLy8gTWFpbiBsb29wXG5cblxuICAgIGZvciAodmFyIGsgPSAwOyBrIDwgTjsgaysrKSB7XG4gICAgICBmb3IgKHZhciBfaTIgPSAwOyBfaTIgPCBOOyBfaTIrKykge1xuICAgICAgICB2YXIgaWsgPSBfaTIgKiBOICsgaztcblxuICAgICAgICBmb3IgKHZhciBfaiA9IDA7IF9qIDwgTjsgX2orKykge1xuICAgICAgICAgIHZhciBpaiA9IF9pMiAqIE4gKyBfajtcbiAgICAgICAgICB2YXIga2ogPSBrICogTiArIF9qO1xuXG4gICAgICAgICAgaWYgKGRpc3RbaWtdICsgZGlzdFtral0gPCBkaXN0W2lqXSkge1xuICAgICAgICAgICAgZGlzdFtpal0gPSBkaXN0W2lrXSArIGRpc3Rba2pdO1xuICAgICAgICAgICAgbmV4dFtpal0gPSBuZXh0W2lrXTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG5cbiAgICB2YXIgZ2V0QXJnRWxlID0gZnVuY3Rpb24gZ2V0QXJnRWxlKGVsZSkge1xuICAgICAgcmV0dXJuIChzdHJpbmcoZWxlKSA/IGN5LmZpbHRlcihlbGUpIDogZWxlKVswXTtcbiAgICB9O1xuXG4gICAgdmFyIGluZGV4T2ZBcmdFbGUgPSBmdW5jdGlvbiBpbmRleE9mQXJnRWxlKGVsZSkge1xuICAgICAgcmV0dXJuIGluZGV4T2YoZ2V0QXJnRWxlKGVsZSkpO1xuICAgIH07XG5cbiAgICB2YXIgcmVzID0ge1xuICAgICAgZGlzdGFuY2U6IGZ1bmN0aW9uIGRpc3RhbmNlKGZyb20sIHRvKSB7XG4gICAgICAgIHZhciBpID0gaW5kZXhPZkFyZ0VsZShmcm9tKTtcbiAgICAgICAgdmFyIGogPSBpbmRleE9mQXJnRWxlKHRvKTtcbiAgICAgICAgcmV0dXJuIGRpc3RbaSAqIE4gKyBqXTtcbiAgICAgIH0sXG4gICAgICBwYXRoOiBmdW5jdGlvbiBwYXRoKGZyb20sIHRvKSB7XG4gICAgICAgIHZhciBpID0gaW5kZXhPZkFyZ0VsZShmcm9tKTtcbiAgICAgICAgdmFyIGogPSBpbmRleE9mQXJnRWxlKHRvKTtcbiAgICAgICAgdmFyIGZyb21Ob2RlID0gYXRJbmRleChpKTtcblxuICAgICAgICBpZiAoaSA9PT0gaikge1xuICAgICAgICAgIHJldHVybiBmcm9tTm9kZS5jb2xsZWN0aW9uKCk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAobmV4dFtpICogTiArIGpdID09IG51bGwpIHtcbiAgICAgICAgICByZXR1cm4gY3kuY29sbGVjdGlvbigpO1xuICAgICAgICB9XG5cbiAgICAgICAgdmFyIHBhdGggPSBjeS5jb2xsZWN0aW9uKCk7XG4gICAgICAgIHZhciBwcmV2ID0gaTtcbiAgICAgICAgdmFyIGVkZ2U7XG4gICAgICAgIHBhdGgubWVyZ2UoZnJvbU5vZGUpO1xuXG4gICAgICAgIHdoaWxlIChpICE9PSBqKSB7XG4gICAgICAgICAgcHJldiA9IGk7XG4gICAgICAgICAgaSA9IG5leHRbaSAqIE4gKyBqXTtcbiAgICAgICAgICBlZGdlID0gZWRnZU5leHRbcHJldiAqIE4gKyBpXTtcbiAgICAgICAgICBwYXRoLm1lcmdlKGVkZ2UpO1xuICAgICAgICAgIHBhdGgub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wcmVkO1xuXG4gICAgICAgICAgICAgIHdoaWxlIChjeWNsZS5pbmRleE9mKF9ub2RlKSA9PT0gLTEpIHtcbiAgICAgICAgICAgICAgICBjeWNsZS5wdXNoKF9ub2RlKTtcbiAgICAgICAgICAgICAgICBjeWNsZS5wdXNoKGdldEluZm8oX25vZGUpLmVkZ2UpO1xuICAgICAgICAgICAgICAgIF9ub2RlID0gZ2V0SW5mbyhfbm9kZSkucHJlZDtcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgIGN5Y2xlID0gY3ljbGUuc2xpY2UoY3ljbGUuaW5kZXhPZihfbm9kZSkpO1xuICAgICAgICAgICAgICB2YXIgc21hbGxlc3RJZCA9IGN5Y2xlWzBdLmlkKCk7XG4gICAgICAgICAgICAgIHZhciBzbWFsbGVzdEluZGV4ID0gMDtcblxuICAgICAgICAgICAgICBmb3IgKHZhciBjID0gMjsgYyA8IGN5Y2xlLmxlbmd0aDsgYyArPSAyKSB7XG4gICAgICAgICAgICAgICAgaWYgKGN5Y2xlW2NdLmlkKCkgPCBzbWFsbGVzdElkKSB7XG4gICAgICAgICAgICAgICAgICBzbWFsbGVzdElkID0gY3ljbGVbY10uaWQoKTtcbiAgICAgICAgICAgICAgICAgIHNtYWxsZXN0SW5kZXggPSBjO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgIGN5Y2xlID0gY3ljbGUuc2xpY2Uoc21hbGxlc3RJbmRleCkuY29uY2F0KGN5Y2xlLnNsaWNlKDAsIHNtYWxsZXN0SW5kZXgpKTtcbiAgICAgICAgICAgICAgY3ljbGUucHVzaChjeWNsZVswXSk7XG4gICAgICAgICAgICAgIHZhciBjeWNsZUlkID0gY3ljbGUubWFwKGZ1bmN0aW9uIChlbCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBlbC5pZCgpO1xuICAgICAgICAgICAgICB9KS5qb2luKFwiLFwiKTtcblxuICAgICAgICAgICAgICBpZiAobmVn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HJldHVybiB7XG4gICAgeDogcDAueCArIG5vcm1WZWMueCAqIGQsXG4gICAgeTogcDAueSArIG5vcm1WZWMueSAqIGRcbiAgfTtcbn07XG52YXIgYm91bmQgPSBmdW5jdGlvbiBib3VuZChtaW4sIHZhbCwgbWF4KSB7XG4gIHJldHVybiBNYXRoLm1heChtaW4sIE1hdGgubWluKG1heCwgdmFsKSk7XG59OyAvLyBtYWtlcyBhIGZ1bGwgYmIgKHgxLCB5MSwgeDIsIHkyLCB3LCBoKSBmcm9tIGltcGxpY2l0IHBhcmFtc1xuXG52YXIgbWFrZUJvdW5kaW5nQm94ID0gZnVuY3Rpb24gbWFrZUJvdW5kaW5nQm94KGJiKSB7XG4gIGlmIChiYiA9PSBudWxsKSB7XG4gICAgcmV0dXJuIHtcbiAgICAgIHgxOiBJbmZpbml0eSxcbiAgICAgIHkxOiBJbmZpbml0eSxcbiAgICAgIHgyOiAtSW5maW5pdHksXG4gICAgICB5MjogLUluZmluaXR5LFxuICAgICAgdzogMCxcbiAgICAgIGg6IDBcbiAgICB9O1xuICB9IGVsc2UgaWYgKGJiLngxICE9IG51bGwgJiYgYmIueTEgIT0gbnVsbCkge1xuICAgIGlmIChiYi54MiAhPSBudWxsICYmIGJiLnkyICE9IG51bGwgJiYgYmIueDIgPj0gYmIueDEgJiYgYmIueTIgPj0gYmIueTEpIHtcbiAgICAgIHJldHVybiB7XG4gICAgICAgIHgxOiBiYi54MSxcbiAgICAgICAgeTE6IGJiLnkxLFxuICAgICAgICB4MjogYmIueDIsXG4gICAgICAgIHkyOiBiYi55MixcbiAgICAgICAgdzogYmIueDIgLSBiYi54MSxcbiAgICAgICAgaDogYmIueTIgLSBiYi55MVxuICAgICAgfTtcbiAgICB9IGVsc2UgaWYgKGJiLncgIT0gbnVsbCAmJiBiYi5oICE9IG51bGwgJiYgYmIudyA+PSAwICYmIGJiLmggPj0gMCkge1xuICAgICAgcmV0dXJuIHtcbiAgICAgICAgeDE6IGJiLngxLFxuICAgICAgICB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GRbX3ZdICsgZWRnZVdlaWdodDtcblxuICAgICAgICAgICAgICBpZiAoUS5ub2Rlcy5pbmRleE9mKHcpIDwgMCkge1xuICAgICAgICAgICAgICAgIC8vaWYgdyBpcyBub3QgaW4gUVxuICAgICAgICAgICAgICAgIFEucHVzaCh3KTtcbiAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAvLyB1cGRhdGUgcG9zaXRpb24gaWYgdyBpcyBpbiBRXG4gICAgICAgICAgICAgICAgUS51cGRhdGVJdGVtKHcpO1xuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgZ1t3XSA9IDA7XG4gICAgICAgICAgICAgIFBbd10gPSBbXTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKGRbd10gPT0gZFtfdl0gKyBlZGdlV2VpZ2h0KSB7XG4gICAgICAgICAgICAgIGdbd10gPSBnW3ddICsgZ1tfdl07XG4gICAgICAgICAgICAgIFBbd10ucHVzaChfdik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGZvciAodmFyIF9qID0gMDsgX2ogPCBBW192XS5sZW5ndGg7IF9qKyspIHtcbiAgICAgICAgICAgIHZhciBfdyA9IEFbX3ZdW19qXS5pZCgpO1xuXG4gICAgICAgICAgICBpZiAoZFtfd10gPT0gSW5maW5pdHkpIHtcbiAgICAgICAgICAgICAgUS5wdXNoKF93KTtcbiAgICAgICAgICAgICAgZFtfd10gPSBkW192XSArIDE7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChkW193XSA9PSBkW192XSArIDEpIHtcbiAgICAgICAgICAgICAgZ1tfd10gPSBnW193XSArIGdbX3ZdO1xuXG4gICAgICAgICAgICAgIFBbX3ddLnB1c2goX3YpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICB2YXIgZSA9IHt9O1xuXG4gICA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DsgX2k3IDwgZS5sZW5ndGg7IF9pNysrKSB7XG4gICAgZVtfaTddID0gMDtcbiAgfVxuXG4gIHZhciBpdGVyO1xuXG4gIGZvciAoaXRlciA9IDA7IGl0ZXIgPCBvcHRzLm1heEl0ZXJhdGlvbnM7IGl0ZXIrKykge1xuICAgIC8vIG1haW4gYWxnb3JpdGhtaWMgbG9vcFxuICAgIC8vIFVwZGF0ZSBSIHJlc3BvbnNpYmlsaXR5IG1hdHJpeFxuICAgIGZvciAodmFyIF9pOCA9IDA7IF9pOCA8IG47IF9pOCsrKSB7XG4gICAgICB2YXIgbWF4ID0gLUluZmluaXR5LFxuICAgICAgICAgIG1heDIgPSAtSW5maW5pdHksXG4gICAgICAgICAgbWF4SSA9IC0xLFxuICAgICAgICAgIEFTID0gMC4wO1xuXG4gICAgICBmb3IgKHZhciBfaiA9IDA7IF9qIDwgbjsgX2orKykge1xuICAgICAgICBvbGRbX2pdID0gUltfaTggKiBuICsgX2pdO1xuICAgICAgICBBUyA9IEFbX2k4ICogbiArIF9qXSArIFNbX2k4ICogbiArIF9qXTtcblxuICAgICAgICBpZiAoQVMgPj0gbWF4KSB7XG4gICAgICAgICAgbWF4MiA9IG1heDtcbiAgICAgICAgICBtYXggPSBBUztcbiAgICAgICAgICBtYXhJID0gX2o7XG4gICAgICAgIH0gZWxzZSBpZiAoQVMgPiBtYXgyKSB7XG4gICAgICAgICAgbWF4MiA9IEFTO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIGZvciAodmFyIF9qMiA9IDA7IF9qMiA8IG47IF9qMisrKSB7XG4gICAgICAgIFJbX2k4ICogbiArIF9qMl0gPSAoMSAtIG9wdHMuZGFtcGluZykgKiAoU1tfaTggKiBuICsgX2oyXSAtIG1heCkgKyBvcHRzLmRhbXBpbmcgKiBvbGRbX2oyXTtcbiAgICAgIH1cblxuICAgICAgUltfaTggKiBuICsgbWF4SV0gPSAoMSAtIG9wdHMuZGFtcGluZykgKiAoU1tfaTggKiBuICsg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ZGdlSWRdID0gdHJ1ZTtcbiAgICAgICAgICAgIHN0YWNrLnB1c2goe1xuICAgICAgICAgICAgICB4OiBjdXJyZW50Tm9kZSxcbiAgICAgICAgICAgICAgeTogb3RoZXJOb2RlSWQsXG4gICAgICAgICAgICAgIGVkZ2U6IGVkZ2VcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGlmICghKG90aGVyTm9kZUlkIGluIG5vZGVzKSkge1xuICAgICAgICAgICAgYmljb25uZWN0ZWRTZWFyY2gocm9vdCwgb3RoZXJOb2RlSWQsIGN1cnJlbnROb2RlKTtcbiAgICAgICAgICAgIG5vZGVzW2N1cnJlbnROb2RlXS5sb3cgPSBNYXRoLm1pbihub2Rlc1tjdXJyZW50Tm9kZV0ubG93LCBub2Rlc1tvdGhlck5vZGVJZF0ubG93KTtcblxuICAgICAgICAgICAgaWYgKG5vZGVzW2N1cnJlbnROb2RlXS5pZCA8PSBub2Rlc1tvdGhlck5vZGVJZF0ubG93KSB7XG4gICAgICAgICAgICAgIG5vZGVzW2N1cnJlbnROb2RlXS5jdXRWZXJ0ZXggPSB0cnVlO1xuICAgICAgICAgICAgICBidWlsZENvbXBvbmVudChjdXJyZW50Tm9kZSwgb3RoZXJOb2RlSWQpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBub2Rlc1tjdXJyZW50Tm9kZV0ubG93ID0gTWF0aC5taW4obm9kZXNbY3VycmVudE5vZGVdLmxvdywgbm9kZXNbb3RoZXJOb2RlSWRdLmlkKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgIH1cbiAgfTtcblxuICBlbGVzLmZvckVhY2goZnVuY3Rpb24gKGVsZSkge1xuICAgIGlmIChlbGUuaXNOb2RlKCkpIHtcbiAgICAgIHZhciBub2RlSWQgPSBlbGUuaWQoKTtcblxuICAgICAgaWYgKCEobm9kZUlkIGluIG5vZGVzKSkge1xuICA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gZml0LnBhZGRpbmcpO1xuXG4gICAgICAgIGlmIChmaXRWcCAhPSBudWxsKSB7XG4gICAgICAgICAgcHJvcGVydGllcy5wYW4gPSBmaXRWcC5wYW47XG4gICAgICAgICAgcHJvcGVydGllcy56b29tID0gZml0VnAuem9vbTtcbiAgICAgICAgfVxuICAgICAgfSAvLyBvdmVycmlkZSB6b29tICgmIHBvdGVudGlhbGx5IHBhbikgdy8gem9vbSBvYmogaWYgc2V0XG5cblxuICAgICAgaWYgKGlzQ29yZSAmJiBwbGFpbk9iamVjdChwcm9wZXJ0aWVzLnpvb20pKSB7XG4gICAgICAgIHZhciB2cCA9IGN5LmdldFpvb21lZFZpZXdwb3J0KHByb3BlcnRpZXMuem9vbSk7XG5cbiAgICAgICAgaWYgKHZwICE9IG51bGwpIHtcbiAgICAgICAgICBpZiAodnAuem9vbWVkKSB7XG4gICAgICAgICAgICBwcm9wZXJ0aWVzLnpvb20gPSB2cC56b29tO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGlmICh2cC5wYW5uZWQpIHtcbiAgICAgICAgICAgIHByb3BlcnRpZXMucGFuID0gdnAucGFuO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBwcm9wZXJ0aWVzLnpvb20gPSBudWxsOyAvLyBhbiBpbmF2YWxpZCB6b29tIChlLmcuIG5vIGRlbHRhKSBnZXRzIGF1dG9tYXRpY2FsbHkgZGVzdHJveWVkXG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgcmV0dXJuIG5ldyBBbmltYXRpb24oYWxsWzBdLCBwcm9wZXJ0aWVzKTtcbiAgICB9O1xuICB9LFxuICAvLyBhbmltYXRlXG4gIGFuaW1hdGU6IGZ1bmN0aW9uIGFuaW1hdGUoKSB7XG4gICAgcmV0dXJuIGZ1bmN0aW9uIGFuaW1hdGVJbXBsKHByb3BlcnRpZXMsIHBhcmFtcykge1xuICAgICAgdmFyIHNlbGYgPSB0aGlzO1xuICAgICAgdm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lZmluZWQpIHtcbiAgICAgICAgICAgICAgICAgIHNldF9fZGVmYXVsdFtcImRlZmF1bHRcIl0oZWxlLl9wcml2YXRlW3AuZmllbGRdLCBwYXRoLCB2YWx1ZSk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgIGVsZS5fcHJpdmF0ZVtwLmZpZWxkXVtuYW1lXSA9IHZhbHVlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSAvLyB1cGRhdGUgbWFwcGVycyBpZiBhc2tlZFxuXG5cbiAgICAgICAgICAgIGlmIChwLnVwZGF0ZVN0eWxlKSB7XG4gICAgICAgICAgICAgIHNlbGYudXBkYXRlU3R5bGUoKTtcbiAgICAgICAgICAgIH0gLy8gY2FsbCBvblNldCBjYWxsYmFja1xuXG5cbiAgICAgICAgICAgIHAub25TZXQoc2VsZik7XG5cbiAgICAgICAgICAgIGlmIChwLnNldHRpbmdUcmlnZ2Vyc0V2ZW50KSB7XG4gICAgICAgICAgICAgIHNlbGZbcC50cmlnZ2VyRm5OYW1lXShwLnNldHRpbmdFdmVudCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9IC8vIC5kYXRhKHsgJ2Zvbyc6ICdiYXInIH0pXG5cbiAgICAgIH0gZWxzZSBpZiAocC5hbGxvd1NldHRpbmcgJiYgcGxhaW5PYmplY3QobmFtZSkpIHtcbiAgICAgICAgLy8gZXh0ZW5kXG4gICAgICAgIHZhciBvYmogPSBuYW1lO1xuICAgICAgICB2YXIgaywgdjtcbiAgICAgICAgdmFyIGtleXMgPSBPYmplY3Qua2V5cyhvYmopO1xuICAgICAgICBwLmJlZm9yZVNldChzZWxmLCBvYmopO1xuXG4gICAgICAgIGZvciAodmFyIF9pID0gMDsgX2kgPCBrZXlzLmxlbmd0aDsgX2krKykge1xuICAgICAgICAgIGsgPSBrZXlzW19pXTtcbiAgICAgICAgICB2ID0gb2JqW2tdO1xuXG4gICAgICAgICAgdmFyIF92YWxpZCA9ICFwLmltbXV0YWJsZUtleXNba107XG5cbiAgICAgICAgICBpZiAoX3ZhbGlkKSB7XG4gICAgICAgICAgICBmb3IgKHZhciBqID0gMDsgaiA8IGFsbC5sZW5ndGg7IGorKykge1xuICAgICAgICAgICAgICB2YXIgX2VsZSA9IGFsbFtqXTtcblxuICAgICAgICAgICAgICBpZiAocC5jYW5TZXQoX2VsZSkpIHtcbiAgICAgICAgICAgICAgICBfZWxlLl9wcml2YXRlW3AuZmllbGRdW2tdID0gdjtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfSAvLyB1cGRhdGUgbWFwcGVycyBpZiBhc2tlZFxuXG5cbiAgICAgICAgaWYgKHAudXBkYXRlU3R5bGUpIHtcbiAgICAgICAgICBzZWxmLnVwZGF0ZVN0eWxlKCk7XG4gICAgICAgIH0gLy8gY2FsbCBvblNldCBjYWxsYmFja1xuXG5cbiAgICAgICAgcC5vblNldChzZWxmKTtcblxuICAgICAgICBpZiAocC5zZXR0aW5nVHJpZ2dlcnNFdmVudCkge1xuICAgICAgICAgIHNlbGZbcC50cmlnZ2VyRm5OYW1lXShwLnNldHRpbmdFdmVudCk7XG4gICAgICAgIH0gLy8gLmRhdGEoZnVuY3Rpb24oKXsgLi4uIH0pXG5cbiAgICAgIH0gZWxzZSBpZiAocC5hbGxvd0JpbmRpbmcgJiYgZm4kNihuYW1lKSkge1xuICAgICAgICAvLyBiaW5kIHRvIGV2ZW50XG4gICAgICAgIHZhciBmbiA9IG5hbWU7XG4gICAgICAgIHNlbGYub24ocC5iaW5kaW5nRXZlbnQsIGZuKTsgLy8gLmRhdGEoKVxuICAgICAgfSBlbHNlIGlmIChwLmFsbG93R2V0dGluZyAmJiBuYW1lID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgLy8gZ2V0IHdob2xlIG9iamVjdFxuICAgICAgICB2YXIgX3JldDtcblxuICAg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cbiAgICAgIHJldHVybiAnJztcbiAgICB9IGVsc2Uge1xuICAgICAgcmV0dXJuIG9iajtcbiAgICB9XG4gIH07XG5cbiAgdmFyIGNsZWFuVmFsID0gZnVuY3Rpb24gY2xlYW5WYWwodmFsKSB7XG4gICAgaWYgKHN0cmluZyh2YWwpKSB7XG4gICAgICByZXR1cm4gJ1wiJyArIHZhbCArICdcIic7XG4gICAgfSBlbHNlIHtcbiAgICAgIHJldHVybiBjbGVhbih2YWwpO1xuICAgIH1cbiAgfTtcblxuICB2YXIgc3BhY2UgPSBmdW5jdGlvbiBzcGFjZSh2YWwpIHtcbiAgICByZXR1cm4gJyAnICsgdmFsICsgJyAnO1xuICB9O1xuXG4gIHZhciBjaGVja1RvU3RyaW5nID0gZnVuY3Rpb24gY2hlY2tUb1N0cmluZyhjaGVjaywgc3ViamVjdCkge1xuICAgIHZhciB0eXBlID0gY2hlY2sudHlwZSxcbiAgICAgICAgdmFsdWUgPSBjaGVjay52YWx1ZTtcblxuICAgIHN3aXRjaCAodHlwZSkge1xuICAgICAgY2FzZSBUeXBlLkdST1VQOlxuICAgICAgICB7XG4gICAgICAgICAgdmFyIGdyb3VwID0gY2xlYW4odmFsdWUpO1xuICAgICAgICAgIHJldHVybiBncm91cC5zdWJzdHJpbmcoMCwgZ3JvdXAubGVuZ3RoIC0gMSk7XG4gICAgICAgIH1cblxuICAgICAgY2FzZSBUeXBlLkRBVEFfQ09NUEFSRTpcbiAgICAgICAge1xuICAgICAgICAgIHZhciBmaWVsZCA9IGNoZWNrLmZpZWxkLFxuICAgICAgICAgICAgICBvcGVyYXRvciA9IGNoZWNrLm9wZXJhdG9yO1xuICAgICAgICAgIHJldHVybiAnWycgKyBmaWVsZCArIHNwYWNlKGNsZWFuKG9wZXJhdG9yKSkgKyBjbGVhblZhbCh2YWx1ZSkgKyAnXSc7XG4gICAgICAgIH1cblxuICAgICAgY2FzZSBUeXBlLkRBVEFfQk9PTDpcbiAgICAgICAge1xuICAgICAgICAgIHZhciBfb3BlcmF0b3IgPSBjaGVjay5vcGVyYXRvcixcbiAgICAgICAgICAgICAgX2ZpZWxkID0gY2hlY2suZmllbGQ7XG4gICAgICAgICAgcmV0dXJuICdbJyArIGNsZWFuKF9vcGVyYXRvcikgKyBfZmllbGQgKyAnXSc7XG4gICAgICAgIH1cblxuICAgICAgY2FzZSBUeXBlLkRBVEFfRVhJU1Q6XG4gICAgICAgIHtcbiAgICAgICAgICB2YXIgX2ZpZWxkMiA9IGNoZWNrLmZpZWxkO1xuICAgICAgICAgIHJldHVybiAnWycgKyBfZmllbGQyICsgJ10nO1xuICAgICAgICB9XG5cbiAgICAgIGNhc2UgVHlwZS5NRVRBX0NPTVBBUkU6XG4gICAgICAgIHtcbiAgICAgICAgICB2YXIgX29wZXJhdG9yMiA9IGNoZWNrLm9wZXJhdG9yLFxuICAgICAgICAgICAgICBfZmllbGQzID0gY2hlY2suZmllbGQ7XG4gICAgICAgICAgcmV0dXJuICdbWycgKyBfZmllbGQzICsgc3BhY2UoY2xlYW4oX29wZXJhdG9yMikpICsgY2xlYW5WYWwodmFsdWUpICsgJ11dJztcbiAgICAgICAgfVxuXG4gICAgICBjYXNlIFR5cGUuU1RBVEU6XG4gICAgICAgIHtcbiAgICAgICAgICByZXR1cm4gdmFsdWU7XG4gICAgICAgIH1cblxuICAgICAgY2FzZSBUeXBlLklEOlxuICAgICAgICB7XG4gICAgICAgICAgcmV0dXJuICcjJyArIHZhbHVlO1xuICAgICAgICB9XG5cbiAgICAgIGNhc2UgVHlwZS5DTEFTUzpcbiAgICAgICAge1xuICAgICAgICAgIHJldHVybiAnLicgKyB2YWx1ZTtcbiAgICAgICAgfVxuXG4gICAgICBjYXNlIFR5cGUuUEFSRU5UOlxuICAgICAgY2FzZSBUeXBlLkNISUxEOlxuICAgICAgICB7XG4gICAgICAgICAgcmV0dXJuIHF1ZXJ5VG9TdHJpbmcoY2hlY2sucGFyZW50LCBzdWJqZWN0KSArIHNwYWNlKCc+JykgKyBxdWVy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SB7XG4gICAgICAgIHg6IG51bWJlciQxKGRpbS54KSA/IGRpbS54IDogMCxcbiAgICAgICAgeTogbnVtYmVyJDEoZGltLnkpID8gZGltLnkgOiAwXG4gICAgICB9O1xuICAgICAgc2lsZW50ID0gdmFsO1xuICAgIH0gZWxzZSBpZiAoc3RyaW5nKGRpbSkgJiYgbnVtYmVyJDEodmFsKSkge1xuICAgICAgZGVsdGEgPSB7XG4gICAgICAgIHg6IDAsXG4gICAgICAgIHk6IDBcbiAgICAgIH07XG4gICAgICBkZWx0YVtkaW1dID0gdmFsO1xuICAgIH1cblxuICAgIGlmIChkZWx0YSAhPSBudWxsKSB7XG4gICAgICB2YXIgY3kgPSB0aGlzLmN5KCk7XG4gICAgICBjeS5zdGFydEJhdGNoKCk7XG5cbiAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgdGhpcy5sZW5ndGg7IGkrKykge1xuICAgICAgICB2YXIgZWxlID0gdGhpc1tpXTsgLy8gZXhjbHVkZSBhbnkgbm9kZSB0aGF0IGlzIGEgZGVzY2VuZGFudCBvZiB0aGUgY2FsbGluZyBjb2xsZWN0aW9uXG5cbiAgICAgICAgaWYgKGN5Lmhhc0NvbXBvdW5kTm9kZXMoKSAmJiBlbGUuaXNDaGlsZCgpICYmIGVsZS5hbmNlc3RvcnMoKS5hbnlTYW1lKHRoaXMpKSB7XG4gICAgICAgICAgY29udGludWU7XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgcG9zID0gZWxlLnBvc2l0aW9uKCk7XG4gICAgICAgIHZhciBuZXdQb3MgPSB7XG4gICAgICAgICAgeDogcG9zLnggKyBkZWx0YS54LFxuICAgICAgICAgIHk6IHBvcy55ICsgZGVsdGEueVxuICAgICAgICB9O1xuXG4gICAgICAgIGlmIChzaWxlbnQpIHtcbiAgICAgICAgICBlbGUuc2lsZW50UG9zaXRpb24obmV3UG9zKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBlbGUucG9zaXRpb24obmV3UG9zKTtc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lvbigpIDoge1xuICAgICAgICAgICAgeDogMCxcbiAgICAgICAgICAgIHk6IDBcbiAgICAgICAgICB9O1xuXG4gICAgICAgICAgaWYgKHZhbCAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAvLyBzZXQgb25lIGRpbWVuc2lvblxuICAgICAgICAgICAgX2VsZTIucG9zaXRpb24oZGltLCB2YWwgKyBvcmlnaW5bZGltXSk7XG4gICAgICAgICAgfSBlbHNlIGlmIChwcG9zICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIC8vIHNldCB3aG9sZSBwb3NpdGlvblxuICAgICAgICAgICAgX2VsZTIucG9zaXRpb24oe1xuICAgICAgICAgICAgICB4OiBwcG9zLnggKyBvcmlnaW4ueCxcbiAgICAgICAgICAgICAgeTogcHBvcy55ICsgb3JpZ2luLnlcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSBlbHNlIHtcbiAgICAgICAgLy8gZ2V0dGluZ1xuICAgICAgICB2YXIgcG9zID0gZWxlLnBvc2l0aW9uKCk7XG5cbiAgICAgICAgdmFyIF9wYXJlbnQgPSBoYXNDb21wb3VuZE5vZGVzID8gZWxlLnBhcmVudCgpIDogbnVsbDtcblxuICAgICAgICB2YXIgX2hhc1BhcmVudCA9IF9wYXJlbnQgJiYgX3BhcmVudC5sZW5ndGggPiAwO1xuXG4gICAgICAgIHZhciBfcmVsYXRpdmVUb1BhcmVudCA9IF9oYXNQYXJlbnQ7XG5cbiAgICAgICAgaWYgKF9oYXNQYXJlbnQpIHtcbiAgICAgICAgICBfcGFyZW50ID0gX3BhcmVudFswXTtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBfb3JpZ2luID0gX3JlbGF0aXZlVG9QYXJlbnQgPyBfcGFyZW50LnBvc2l0aW9uKCkgOiB7XG4gICAgICAgICAgeDogMCxcbiAgICAgICAgICB5OiAwXG4gICAgICAgIH07XG5cbiAgICAgICAgcHBvcyA9IHt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BseTI7XG5cbiAgICBpZiAoaXNFZGdlKSB7XG4gICAgICBseDEgPSBsYWJlbFggLSBsd18yO1xuICAgICAgbHgyID0gbGFiZWxYICsgbHdfMjtcbiAgICAgIGx5MSA9IGxhYmVsWSAtIGxoXzI7XG4gICAgICBseTIgPSBsYWJlbFkgKyBsaF8yO1xuICAgIH0gZWxzZSB7XG4gICAgICBzd2l0Y2ggKGhhbGlnbi52YWx1ZSkge1xuICAgICAgICBjYXNlICdsZWZ0JzpcbiAgICAgICAgICBseDEgPSBsYWJlbFggLSBsdztcbiAgICAgICAgICBseDIgPSBsYWJlbFg7XG4gICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgY2FzZSAnY2VudGVyJzpcbiAgICAgICAgICBseDEgPSBsYWJlbFggLSBsd18yO1xuICAgICAgICAgIGx4MiA9IGxhYmVsWCArIGx3XzI7XG4gICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgY2FzZSAncmlnaHQnOlxuICAgICAgICAgIGx4MSA9IGxhYmVsWDtcbiAgICAgICAgICBseDIgPSBsYWJlbFggKyBsdztcbiAgICAgICAgICBicmVhaztcbiAgICAgIH1cblxuICAgICAgc3dpdGNoICh2YWxpZ24udmFsdWUpIHtcbiAgICAgICAgY2FzZSAndG9wJzpcbiAgICAgICAgICBseTEgPSBsYWJlbFkgLSBsaDtcbiAgICAgICAgICBseTIgPSBsYWJlbFk7XG4gICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgY2FzZSAnY2VudGVyJzpcbiAgICAgICAgICBseTEgPSBsYWJlbFkgLSBsaF8yO1xuICAgICAgICAgIGx5MiA9IGxhYmVsWSArIGxoXzI7XG4gICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgY2FzZSAnYm90dG9tJzpcbiAgICAgICAgICBseTEgPSBsYWJlbFk7XG4gICAgICAgICAgbHkyID0gbGFiZWxZICsgbGg7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICB9XG4gICAgfSAvLyBzaGlmdCBieSBtYX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RhdGlvbi5wZlZhbHVlICE9PSAwO1xuXG4gICAgaWYgKGlzQXV0b3JvdGF0ZSB8fCBpc1BmVmFsdWUpIHtcbiAgICAgIHZhciB0aGV0YSA9IGlzQXV0b3JvdGF0ZSA/IHByZWZpeGVkUHJvcGVydHkoX3AucnN0eWxlLCAnbGFiZWxBbmdsZScsIHByZWZpeCkgOiByb3RhdGlvbi5wZlZhbHVlO1xuICAgICAgdmFyIGNvcyA9IE1hdGguY29zKHRoZXRhKTtcbiAgICAgIHZhciBzaW4gPSBNYXRoLnNpbih0aGV0YSk7IC8vIHJvdGF0aW9uIHBvaW50IChkZWZhdWx0IHZhbHVlIGZvciBjZW50ZXItY2VudGVyKVxuXG4gICAgICB2YXIgeG8gPSAobHgxICsgbHgyKSAvIDI7XG4gICAgICB2YXIgeW8gPSAobHkxICsgbHkyKSAvIDI7XG5cbiAgICAgIGlmICghaXNFZGdlKSB7XG4gICAgICAgIHN3aXRjaCAoaGFsaWduLnZhbHVlKSB7XG4gICAgICAgICAgY2FzZSAnbGVmdCc6XG4gICAgICAgICAgICB4byA9IGx4MjtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgY2FzZSAncmlnaHQnOlxuICAgICAgICAgICAgeG8gPSBseDE7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICAgIHN3aXRjaCAodmFsaWduLnZhbHVlKSB7XG4gICAgICAgICAgY2FzZSAndG9wJzpcbiAgICAgICAgICAgIHlvID0gbHkyO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBjYXNlICdib3R0b20nOlxuICAgICAgICAgICAgeW8gPSBseTE7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICB2YXIgcm90YXRlID0gZnVuY3Rpb24gcm90YXRlKHgsIHkpIHtcbiAgICAgICAgeCA9IHggLSB4bztcbiAgICAgICAgeSA9IHkgLSB5bztcbiAgICAgICAgcmV0dXJ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gIGV4MSA9IGhwdHNbMF0ueDtcbiAgICAgICAgICAgIGV5MSA9IGhwdHNbMF0ueTtcbiAgICAgICAgICAgIGV4MiA9IGhwdHNbMV0ueDtcbiAgICAgICAgICAgIGV5MiA9IGhwdHNbMV0ueTtcblxuICAgICAgICAgICAgaWYgKGV4MSA+IGV4Mikge1xuICAgICAgICAgICAgICB2YXIgdGVtcCA9IGV4MTtcbiAgICAgICAgICAgICAgZXgxID0gZXgyO1xuICAgICAgICAgICAgICBleDIgPSB0ZW1wO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoZXkxID4gZXkyKSB7XG4gICAgICAgICAgICAgIHZhciBfdGVtcCA9IGV5MTtcbiAgICAgICAgICAgICAgZXkxID0gZXkyO1xuICAgICAgICAgICAgICBleTIgPSBfdGVtcDtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdXBkYXRlQm91bmRzKGJvdW5kcywgZXgxIC0gd0hhbGYsIGV5MSAtIHdIYWxmLCBleDIgKyB3SGFsZiwgZXkyICsgd0hhbGYpO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIGlmIChjdXJ2ZVN0eWxlID09PSAnYmV6aWVyJyB8fCBjdXJ2ZVN0eWxlID09PSAndW5idW5kbGVkLWJlemllcicgfHwgY3VydmVTdHlsZSA9PT0gJ3NlZ21lbnRzJyB8fCBjdXJ2ZVN0eWxlID09PSAndGF4aScpIHtcbiAgICAgICAgICB2YXIgcHRzO1xuXG4gICAgICAgICAgc3dpdGNoIChjdXJ2ZVN0eWxlKSB7XG4gICAgICAgICAgICBjYXNlICdiZXppZXInOlxuICAgICAgICAgICAgY2FzZSAndW5idW5kbGVkLWJlemllcic6XG4gICAgICAgICAgICAgIHB0cyA9IHJzdHlsZS5iZXppZXJQdHM7XG4gICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICBjYXNlICdzZWdtZW50cyc6XG4gICAgICAgICAgICBjYXNlICd0YXhpJzpcbiAgICAgIC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G4gICAgICAgICAgICBkdXJhdGlvbjogb3B0aW9ucy5hbmltYXRpb25EdXJhdGlvbixcbiAgICAgICAgICAgIGVhc2luZzogb3B0aW9ucy5hbmltYXRpb25FYXNpbmdcbiAgICAgICAgICB9KTtcbiAgICAgICAgICBsYXlvdXQuYW5pbWF0aW9ucy5wdXNoKGFuaSk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgbm9kZS5wb3NpdGlvbihuZXdQb3MpO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIGlmIChvcHRpb25zLmZpdCkge1xuICAgICAgICB2YXIgZml0QW5pID0gY3kuYW5pbWF0aW9uKHtcbiAgICAgICAgICBmaXQ6IHtcbiAgICAgICAgICAgIGJvdW5kaW5nQm94OiBsYXlvdXRFbGVzLmJvdW5kaW5nQm94QXQoZ2V0RmluYWxQb3MpLFxuICAgICAgICAgICAgcGFkZGluZzogb3B0aW9ucy5wYWRkaW5nXG4gICAgICAgICAgfSxcbiAgICAgICAgICBkdXJhdGlvbjogb3B0aW9ucy5hbmltYXRpb25EdXJhdGlvbixcbiAgICAgICAgICBlYXNpbmc6IG9wdGlvbnMuYW5pbWF0aW9uRWFzaW5nXG4gICAgICAgIH0pO1xuICAgICAgICBsYXlvdXQuYW5pbWF0aW9ucy5wdXNoKGZpdEFuaSk7XG4gICAgICB9IGVsc2UgaWYgKG9wdGlvbnMuem9vbSAhPT0gdW5kZWZpbmVkICYmIG9wdGlvbnMucGFuICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgdmFyIHpvb21QYW5BbmkgPSBjeS5hbmltYXRpb24oe1xuICAgICAgICAgIHpvb206IG9wdGlvbnMuem9vbSxcbiAgICAgICAgICBwYW46IG9wdGlvbnMucGFuLFxuICAgICAgICAgIGR1cmF0aW9uOiBvcHRpb25zLmFuaW1hdGlvbkR1cmF0aW9uLFxuICAgICAgICAgIGVhc2luZzogb3B0aW9ucy5hbmltYXRpb25FYXNpbmdcbiAgICAgICAgfSk7XG4gICAgICAgIGxheW91dC5hbmltYXRpb25zLnB1c2goem9vbVBhbkFuaSk7XG4gICAgICB9XG5cbiAgICAgIGxheW91dC5hbmltYXRpb25zLmZvckVhY2goZnVuY3Rpb24gKGFuaSkge1xuICAgICAgICByZXR1cm4gYW5pLnBsYXkoKTtcbiAgICAgIH0pO1xuICAgICAgbGF5b3V0Lm9uZSgnbGF5b3V0cmVhZHknLCBvcHRpb25zLnJlYWR5KTtcbiAgICAgIGxheW91dC5lbWl0KHtcbiAgICAgICAgdHlwZTogJ2xheW91dHJlYWR5JyxcbiAgICAgICAgbGF5b3V0OiBsYXlvdXRcbiAgICAgIH0pO1xuICAgICAgUHJvbWlzZSQxLmFsbChsYXlvdXQuYW5pbWF0aW9ucy5tYXAoZnVuY3Rpb24gKGFuaSkge1xuICAgICAgICByZXR1cm4gYW5pLnByb21pc2UoKTtcbiAgICAgIH0pKS50aGVuKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgbGF5b3V0Lm9uZSgnbGF5b3V0c3RvcCcsIG9wdGlvbnMuc3RvcCk7XG4gICAgICAgIGxheW91dC5lbWl0KHtcbiAgICAgICAgICB0eXBlOiAnbGF5b3V0c3RvcCcsXG4gICAgICAgICAgbGF5b3V0OiBsYXlvdXRcbiAgICAgICAgfSk7XG4gICAgICB9KTtcbiAgICB9IGVsc2Uge1xuICAgICAgbm9kZXMucG9zaXRpb25zKGdldEZpbmFsUG9zKTtcblxuICAgICAgaWYgKG9wdGlvbnMuZml0KSB7XG4gICAgICAgIGN5LmZpdChvcHRpb25zLmVsZXMsIG9wdGlvbnMucGFkZGluZyk7XG4gICAgICB9XG5cbiAgICAgIGlmIChvcHRpb25zLnpvb20gIT0gbnVsbCkge1xuICAgICAgICBjeS56b29tKG9wdGlvbnMuem9vbSk7XG4gICAgICB9XG5cbiAgICAgIGlmIChvcHRpb25zLnBhbikge1xuICAgICAgICBjeS5wYW4ob3B0aW9ucy5wYW4pO1xuICAgICAgfVxuXG4gICAgICBsYXl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WFrZSBzdXJlIHRvIGJvdW5kIHBlcmNlbnQgdmFsdWVcblxuXG4gICAgICAgIGlmIChwZXJjZW50IDwgMCkge1xuICAgICAgICAgIHBlcmNlbnQgPSAwO1xuICAgICAgICB9IGVsc2UgaWYgKHBlcmNlbnQgPiAxKSB7XG4gICAgICAgICAgcGVyY2VudCA9IDE7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodHlwZS5jb2xvcikge1xuICAgICAgICAgIHZhciByMSA9IHByb3AudmFsdWVNaW5bMF07XG4gICAgICAgICAgdmFyIHIyID0gcHJvcC52YWx1ZU1heFswXTtcbiAgICAgICAgICB2YXIgZzEgPSBwcm9wLnZhbHVlTWluWzFdO1xuICAgICAgICAgIHZhciBnMiA9IHByb3AudmFsdWVNYXhbMV07XG4gICAgICAgICAgdmFyIGIxID0gcHJvcC52YWx1ZU1pblsyXTtcbiAgICAgICAgICB2YXIgYjIgPSBwcm9wLnZhbHVlTWF4WzJdO1xuICAgICAgICAgIHZhciBhMSA9IHByb3AudmFsdWVNaW5bM10gPT0gbnVsbCA/IDEgOiBwcm9wLnZhbHVlTWluWzNdO1xuICAgICAgICAgIHZhciBhMiA9IHByb3AudmFsdWVNYXhbM10gPT0gbnVsbCA/IDEgOiBwcm9wLnZhbHVlTWF4WzNdO1xuICAgICAgICAgIHZhciBjbHIgPSBbTWF0aC5yb3VuZChyMSArIChyMiAtIHIxKSAqIHBlcmNlbnQpLCBNYXRoLnJvdW5kKGcxICsgKGcyIC0gZzEpICogcGVyY2VudCksIE1hdGgucm91bmQoYjEgKyAoYjIgLSBiMSkgKiBwZXJjZW50KSwgTWF0aC5yb3VuZChhMSArIChhMiAtIGExKSAqIHBlcmNlbnQpXTtcbiAgICAgICAgICBmbGF0UHJvcCA9IHtcbiAgICAgICAgICAgIC8vIGNvbG91cnMgYXJlIHNpbXBsZSwgc28ganVzdCBjcmVhdGUgdGhlIGZsYXQgcHJvcGVydHkgaW5zdGVhZCBvZiBleHBlbnNpdmUgc3Ry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pb24gZ2V0VmFsdWVTdHJpbmdXaXRoVW5pdHModmFsLCB1bml0cykge1xuICAgICAgICAgIHJldHVybiBnZXRSZW5kZXJlZFZhbHVlKHZhbCkgKyB1bml0cztcbiAgICAgICAgfTtcblxuICAgICAgICB2YXIgaXNBcnJheVZhbHVlID0gYXJyYXkodmFsdWUpO1xuICAgICAgICB2YXIgaGF2ZVVuaXRzID0gaXNBcnJheVZhbHVlID8gdW5pdHMuZXZlcnkoZnVuY3Rpb24gKHUpIHtcbiAgICAgICAgICByZXR1cm4gdSAhPSBudWxsO1xuICAgICAgICB9KSA6IHVuaXRzICE9IG51bGw7XG5cbiAgICAgICAgaWYgKGhhdmVVbml0cykge1xuICAgICAgICAgIGlmIChpc0FycmF5VmFsdWUpIHtcbiAgICAgICAgICAgIHJldHVybiB2YWx1ZS5tYXAoZnVuY3Rpb24gKHYsIGkpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGdldFZhbHVlU3RyaW5nV2l0aFVuaXRzKHYsIHVuaXRzW2ldKTtcbiAgICAgICAgICAgIH0pLmpvaW4oJyAnKTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuIGdldFZhbHVlU3RyaW5nV2l0aFVuaXRzKHZhbHVlLCB1bml0cyk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGlmIChpc0FycmF5VmFsdWUpIHtcbiAgICAgICAgICAgIHJldHVybiB2YWx1ZS5tYXAoZnVuY3Rpb24gKHYpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIHN0cmluZyh2KSA/IHYgOiAnJyArIGdldFJlbmRlcmVkVmFsdWUodik7XG4gICAgICAgICAgICB9KS5qb2luKCcgJyk7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJldHVybiAnJyArIGdldFJlbmRlcmVkVmFsdWUodmFsdWUpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSBlbHNlIGlmI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XQ6IHtcbiAgICAgIGVudW1zOiBbJ25vbmUnLCAnY29udGFpbicsICdjb3ZlciddLFxuICAgICAgbXVsdGlwbGU6IHRydWVcbiAgICB9LFxuICAgIGJnQ3Jvc3NPcmlnaW46IHtcbiAgICAgIGVudW1zOiBbJ2Fub255bW91cycsICd1c2UtY3JlZGVudGlhbHMnLCAnbnVsbCddLFxuICAgICAgbXVsdGlwbGU6IHRydWVcbiAgICB9LFxuICAgIGJnQ2xpcDoge1xuICAgICAgZW51bXM6IFsnbm9uZScsICdub2RlJ10sXG4gICAgICBtdWx0aXBsZTogdHJ1ZVxuICAgIH0sXG4gICAgYmdDb250YWlubWVudDoge1xuICAgICAgZW51bXM6IFsnaW5zaWRlJywgJ292ZXInXSxcbiAgICAgIG11bHRpcGxlOiB0cnVlXG4gICAgfSxcbiAgICBjb2xvcjoge1xuICAgICAgY29sb3I6IHRydWVcbiAgICB9LFxuICAgIGNvbG9yczoge1xuICAgICAgY29sb3I6IHRydWUsXG4gICAgICBtdWx0aXBsZTogdHJ1ZVxuICAgIH0sXG4gICAgZmlsbDoge1xuICAgICAgZW51bXM6IFsnc29saWQnLCAnbGluZWFyLWdyYWRpZW50JywgJ3JhZGlhbC1ncmFkaWVudCddXG4gICAgfSxcbiAgICBib29sOiB7XG4gICAgICBlbnVtczogWyd5ZXMnLCAnbm8nXVxuICAgIH0sXG4gICAgYm9vbHM6IHtcbiAgICAgIGVudW1zOiBbJ3llcycsICdubyddLFxuICAgICAgbXVsdGlwbGU6IHRydWVcbiAgICB9LFxuICAgIGxpbmVTdHlsZToge1xuICAgICAgZW51bXM6IFsnc29saWQnLCAnZG90dGVkJywgJ2Rhc2hlZCddXG4gICAgfSxcbiAgICBsaW5lQ2FwOiB7XG4gICAgICBlbnVtczogWydidXR0JywgJ3JvdW5kJywgJ3NxdWFyZSddXG4gICAgfSxcbiAgICBib3JkZXJTdHlsZToge1xuICAgICAgZW51bXM6IFsnc29saWQnLCAnZG90dGVkJywgJ2Rhc2h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JywgJ2NpcmNsZS10cmlhbmdsZScsICd0cmlhbmdsZS1jcm9zcycsICd0cmlhbmdsZS1iYWNrY3VydmUnLCAndmVlJywgJ3NxdWFyZScsICdjaXJjbGUnLCAnZGlhbW9uZCcsICdjaGV2cm9uJywgJ25vbmUnXVxuICAgIH0sXG4gICAgYXJyb3dGaWxsOiB7XG4gICAgICBlbnVtczogWydmaWxsZWQnLCAnaG9sbG93J11cbiAgICB9LFxuICAgIGRpc3BsYXk6IHtcbiAgICAgIGVudW1zOiBbJ2VsZW1lbnQnLCAnbm9uZSddXG4gICAgfSxcbiAgICB2aXNpYmlsaXR5OiB7XG4gICAgICBlbnVtczogWydoaWRkZW4nLCAndmlzaWJsZSddXG4gICAgfSxcbiAgICB6Q29tcG91bmREZXB0aDoge1xuICAgICAgZW51bXM6IFsnYm90dG9tJywgJ29ycGhhbicsICdhdXRvJywgJ3RvcCddXG4gICAgfSxcbiAgICB6SW5kZXhDb21wYXJlOiB7XG4gICAgICBlbnVtczogWydhdXRvJywgJ21hbnVhbCddXG4gICAgfSxcbiAgICB2YWxpZ246IHtcbiAgICAgIGVudW1zOiBbJ3RvcCcsICdjZW50ZXInLCAnYm90dG9tJ11cbiAgICB9LFxuICAgIGhhbGlnbjoge1xuICAgICAgZW51bXM6IFsnbGVmdCcsICdjZW50ZXInLCAncmlnaHQnXVxuICAgIH0sXG4gICAganVzdGlmaWNhdGlvbjoge1xuICAgICAgZW51bXM6IFsnbGVmdCcsICdjZW50ZXInLCAncmlnaHQnLCAnYXV0byddXG4gICAgfSxcbiAgICB0ZXh0OiB7XG4gICAgICBzdHJpbmc6IHRydWVcbiAgICB9LFxuICAgIGRhdGE6IHtcbiAgICAgIG1hcHBpbmc6IHRydWUsXG4gICAgICByZWdleDogZGF0YSgnZGF0YScpXG4gICAgfSxcbiAgICBsYXlvdXREYXRhOiB7XG4gICAgICBtYXBwaW5nOiB0cnVlLFxuICAgICAgcmVnZXg6IGRhdGEoJ2xheW91dERhdGEnKVxu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gYXJnc1swXTtcbiAgICAgICAgICByZXR1cm4gcGFuW2RpbV07XG4gICAgICAgIH0gZWxzZSBpZiAocGxhaW5PYmplY3QoYXJnc1swXSkpIHtcbiAgICAgICAgICAvLyAucGFuKHsgeDogMCwgeTogMTAwIH0pXG4gICAgICAgICAgaWYgKCF0aGlzLl9wcml2YXRlLnBhbm5pbmdFbmFibGVkKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBkaW1zID0gYXJnc1swXTtcbiAgICAgICAgICB4ID0gZGltcy54O1xuICAgICAgICAgIHkgPSBkaW1zLnk7XG5cbiAgICAgICAgICBpZiAobnVtYmVyJDEoeCkpIHtcbiAgICAgICAgICAgIHBhbi54ID0geDtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBpZiAobnVtYmVyJDEoeSkpIHtcbiAgICAgICAgICAgIHBhbi55ID0geTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICB0aGlzLmVtaXQoJ3BhbiB2aWV3cG9ydCcpO1xuICAgICAgICB9XG5cbiAgICAgICAgYnJlYWs7XG5cbiAgICAgIGNhc2UgMjpcbiAgICAgICAgLy8gLnBhbigneCcsIDEwMClcbiAgICAgICAgaWYgKCF0aGlzLl9wcml2YXRlLnBhbm5pbmdFbmFibGVkKSB7XG4gICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH1cblxuICAgICAgICBkaW0gPSBhcmdzWzBdO1xuICAgICAgICB2YWwgPSBhcmdzWzFdO1xuXG4gICAgICAgIGlmICgoZGltID09PSAneCcgfHwgZGltID09PSAneScpICYmIG51bWJlciQxKHZhbCkpIHtcbiAgICAgICAgICBwYW5bZGltXSA9IHZhbDtcbiAgICAgICAgfVxuXG4gICAgICAgIHRoaXMuZW1pdCgncGFuIHZpZXdwb3J0Jyk7XG4gICAgICAgIGJyZWFrO1xuICAgICAgLy8gaW52YWxpZFxuICAgIH1cblxuICAgIHRoaXMubm90aWZ5KCd2aWV3cG9ydCcpO1xuICAgIHJldHVybiB0aGlzOyAvLyBjaGFpbmluZ1xuICB9LFxuICBwYW5CeTogZnVuY3Rpb24gcGFuQnkoYXJnMCwgYXJnMSkge1xuICAgIHZhciBhcmdzID0gYXJndW1lbnRzO1xuICAgIHZhciBwYW4gPSB0aGlzLl9wcml2YXRlLnBhbjtcbiAgICB2YXIgZGltLCB2YWwsIGRpbXMsIHgsIHk7XG5cbiAgICBpZiAoIXRoaXMuX3ByaXZhdGUucGFubmluZ0VuYWJsZWQpIHtcbiAgICAgIHJldHVybiB0aGlzO1xuICAgIH1cblxuICAgIHN3aXRjaCAoYXJncy5sZW5ndGgpIHtcbiAgICAgIGNhc2UgMTpcbiAgICAgICAgaWYgKHBsYWluT2JqZWN0KGFyZzApKSB7XG4gICAgICAgICAgLy8gLnBhbkJ5KHsgeDogMCwgeTogMTAwIH0pXG4gICAgICAgICAgZGltcyA9IGFyZ3NbMF07XG4gICAgICAgICAgeCA9IGRpbXMueDtcbiAgICAgICAgICB5ID0gZGltcy55O1xuXG4gICAgICAgICAgaWYgKG51bWJlciQxKHgpKSB7XG4gICAgICAgICAgICBwYW4ueCArPSB4O1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGlmIChudW1iZXIkMSh5KSkge1xuICAgICAgICAgICAgcGFuLnkgKz0geTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICB0aGlzLmVtaXQoJ3BhbiB2aWV3cG9ydCcpO1xuICAgICAgICB9XG5cbiAgICAgICAgYnJlYWs7XG5cbiAgICAgIGNhc2UgMjpcbiAgICAgICAgLy8gLnBhbkJ5KCd4JywgMTAwKVxuICAgICAgICBkaW0gPSBhcmcwO1xuICAgICAgICB2YWwgPSBhcmcxO1xuXG4gICAgICAgIGlmICgoZGltID09PSAneCcgfHwgZGltID09PSAneScpICYmIG51bWJlciQxKHZhbCkpIHtcbiAgICAgICAgICBwYW5bZGltXSArPSB2YWw7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLm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1pbigodyAtIDIgKiBwYWRkaW5nKSAvIGJiLncsIChoIC0gMiAqIHBhZGRpbmcpIC8gYmIuaCk7IC8vIGNyb3Agem9vbVxuXG4gICAgICB6b29tID0gem9vbSA+IHRoaXMuX3ByaXZhdGUubWF4Wm9vbSA/IHRoaXMuX3ByaXZhdGUubWF4Wm9vbSA6IHpvb207XG4gICAgICB6b29tID0gem9vbSA8IHRoaXMuX3ByaXZhdGUubWluWm9vbSA/IHRoaXMuX3ByaXZhdGUubWluWm9vbSA6IHpvb207XG4gICAgICB2YXIgcGFuID0ge1xuICAgICAgICAvLyBub3cgcGFuIHRvIG1pZGRsZVxuICAgICAgICB4OiAodyAtIHpvb20gKiAoYmIueDEgKyBiYi54MikpIC8gMixcbiAgICAgICAgeTogKGggLSB6b29tICogKGJiLnkxICsgYmIueTIpKSAvIDJcbiAgICAgIH07XG4gICAgICByZXR1cm4ge1xuICAgICAgICB6b29tOiB6b29tLFxuICAgICAgICBwYW46IHBhblxuICAgICAgfTtcbiAgICB9XG5cbiAgICByZXR1cm47XG4gIH0sXG4gIHpvb21SYW5nZTogZnVuY3Rpb24gem9vbVJhbmdlKG1pbiwgbWF4KSB7XG4gICAgdmFyIF9wID0gdGhpcy5fcHJpdmF0ZTtcblxuICAgIGlmIChtYXggPT0gbnVsbCkge1xuICAgICAgdmFyIG9wdHMgPSBtaW47XG4gICAgICBtaW4gPSBvcHRzLm1pbjtcbiAgICAgIG1heCA9IG9wdHMubWF4O1xuICAgIH1cblxuICAgIGlmIChudW1iZXIkMShtaW4pICYmIG51bWJlciQxKG1heCkgJiYgbWluIDw9IG1heCkge1xuICAgICAgX3AubWluWm9vbSA9IG1pbjtcbiAgICAgIF9wLm1heFpvb20gPSBtYXg7XG4gICAgfSBlbHNlIGlmIChudW1iZXIkMShtaW4pICYmIG1heCA9PT0gdW5kZWZpbmVkICYmIG1pbiA8PSBfcC5tYXhab29tKSB7XG4gICAgICBfcC5taW5ab29tID0gbWluO1xuICAgIH0gZWxzZSBpZiAobnVtYmVyJDEobWF4KSAmJiBtaW4gPT09IHVuZGVmaW5lZCAmJiBtYXggPj0gX3AubWluWm9vbSkge1xuICAgICAgX3AubWF4Wm9vbSA9IG1heDtcbiAgICB9XG5cbiAgICByZXR1cm4gdGhpcztcbiAgfSxcbiAgbWluWm9vbTogZnVuY3Rpb24gbWluWm9vbSh6b29tKSB7XG4gICAgaWYgKHpvb20gPT09IHVuZGVmaW5lZCkge1xuICAgICAgcmV0dXJuIHRoaXMuX3ByaXZhdGUubWluWm9vbTtcbiAgICB9IGVsc2Uge1xuICAgICAgcmV0dXJuIHRoaXMuem9vbVJhbmdlKHtcbiAgICAgICAgbWluOiB6b29tXG4gICAgICB9KTtcbiAgICB9XG4gIH0sXG4gIG1heFpvb206IGZ1bmN0aW9uIG1heFpvb20oem9vbSkge1xuICAgIGlmICh6b29tID09PSB1bmRlZmluZWQpIHtcbiAgICAgIHJldHVybiB0aGlzLl9wcml2YXRlLm1heFpvb207XG4gICAgfSBlbHNlIHtcbiAgICAgIHJldHVybiB0aGlzLnpvb21SYW5nZSh7XG4gICAgICAgIG1heDogem9vbVxuICAgICAgfSk7XG4gICAgfVxuICB9LFxuICBnZXRab29tZWRWaWV3cG9ydDogZnVuY3Rpb24gZ2V0Wm9vbWVkVmlld3BvcnQocGFyYW1zKSB7XG4gICAgdmFyIF9wID0gdGhpcy5fcHJpdmF0ZTtcbiAgICB2YXIgY3VycmVudFBhbiA9IF9wLnBhbjtcbiAgICB2YXIgY3VycmVudFpvb20gPSBfcC56b29tO1xuICAgIHZhciBwb3M7IC8vIGluIHJlbmRlcmVkIHB4XG5cbiAgICB2YXIgem9vbTtcbiAgICB2YXIgYmFpbCA9IGZhbHNlO1xuXG4gICAgaWYgKCFfcC56b29taW5nRW5hYmxlZCkge1xuICAgICAgLy8gem9vbWluZyBkaXNhYmxlZFxuICAgICAgYmFpbCA9IHRydWU7XG4gICAgfVxuXG4gICAgaWYgKG51bWJlciQxKHBhcmFtcykpIHt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Bwb3NpdGlvblxuICAgICAgdmFyIHBhbjEgPSBjdXJyZW50UGFuO1xuICAgICAgdmFyIHpvb20xID0gY3VycmVudFpvb207XG4gICAgICB2YXIgem9vbTIgPSB6b29tO1xuICAgICAgdmFyIHBhbjIgPSB7XG4gICAgICAgIHg6IC16b29tMiAvIHpvb20xICogKHBvcy54IC0gcGFuMS54KSArIHBvcy54LFxuICAgICAgICB5OiAtem9vbTIgLyB6b29tMSAqIChwb3MueSAtIHBhbjEueSkgKyBwb3MueVxuICAgICAgfTtcbiAgICAgIHJldHVybiB7XG4gICAgICAgIHpvb21lZDogdHJ1ZSxcbiAgICAgICAgcGFubmVkOiB0cnVlLFxuICAgICAgICB6b29tOiB6b29tMixcbiAgICAgICAgcGFuOiBwYW4yXG4gICAgICB9O1xuICAgIH0gZWxzZSB7XG4gICAgICAvLyBqdXN0IHNldCB0aGUgem9vbVxuICAgICAgcmV0dXJuIHtcbiAgICAgICAgem9vbWVkOiB0cnVlLFxuICAgICAgICBwYW5uZWQ6IGZhbHNlLFxuICAgICAgICB6b29tOiB6b29tLFxuICAgICAgICBwYW46IGN1cnJlbnRQYW5cbiAgICAgIH07XG4gICAgfVxuICB9LFxuICB6b29tOiBmdW5jdGlvbiB6b29tKHBhcmFtcykge1xuICAgIGlmIChwYXJhbXMgPT09IHVuZGVmaW5lZCkge1xuICAgICAgLy8gZ2V0XG4gICAgICByZXR1cm4gdGhpcy5fcHJpdmF0ZS56b29tO1xuICAgIH0gZWxzZSB7XG4gICAgICAvLyBzZXRcbiAgICAgIHZhciB2cCA9IHRoaXMuZ2V0Wm9vbWVkVmlld3BvcnQocGFyYW1zKTtcbiAgICAgIHZhciBfcCA9IHRoaXMuX3ByaXZhdGU7XG5cbiAgICAgIGlmICh2cCA9PSBudWxsIHx8ICF2cC56b29tZWQpIHtcbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICB9XG5cbiAgICAgIF9wLnpvb20gPSB2cC56b29tO1xuXG4gICAgICBpZiAodn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ICAgICAgfSBlbHNlIHtcbiAgICAgICAgX3Auem9vbSA9IHo7XG4gICAgICAgIGV2ZW50cy5wdXNoKCd6b29tJyk7XG4gICAgICB9XG4gICAgfVxuXG4gICAgaWYgKHBhbkRlZmQgJiYgKCF6b29tRmFpbGVkIHx8ICFvcHRzLmNhbmNlbE9uRmFpbGVkWm9vbSkgJiYgX3AucGFubmluZ0VuYWJsZWQpIHtcbiAgICAgIHZhciBwID0gb3B0cy5wYW47XG5cbiAgICAgIGlmIChudW1iZXIkMShwLngpKSB7XG4gICAgICAgIF9wLnBhbi54ID0gcC54O1xuICAgICAgICBwYW5GYWlsZWQgPSBmYWxzZTtcbiAgICAgIH1cblxuICAgICAgaWYgKG51bWJlciQxKHAueSkpIHtcbiAgICAgICAgX3AucGFuLnkgPSBwLnk7XG4gICAgICAgIHBhbkZhaWxlZCA9IGZhbHNlO1xuICAgICAgfVxuXG4gICAgICBpZiAoIXBhbkZhaWxlZCkge1xuICAgICAgICBldmVudHMucHVzaCgncGFuJyk7XG4gICAgICB9XG4gICAgfVxuXG4gICAgaWYgKGV2ZW50cy5sZW5ndGggPiAwKSB7XG4gICAgICBldmVudHMucHVzaCgndmlld3BvcnQnKTtcbiAgICAgIHRoaXMuZW1pdChldmVudHMuam9pbignICcpKTtcbiAgICAgIHRoaXMubm90aWZ5KCd2aWV3cG9ydCcpO1xuICAgIH1cblxuICAgIHJldHVybiB0aGlzOyAvLyBjaGFpbmluZ1xuICB9LFxuICBjZW50ZXI6IGZ1bmN0aW9uIGNlbnRlcihlbGVtZW50cykge1xuICAgIHZhciBwYW4gPSB0aGlzLmdldENlbnRlclBhbihlbGVtZW50cyk7XG5cbiAgICBpZiAocGFuKSB7XG4gICAgICB0aGlzLl9wcml2YXRlLnBhbiA9IHBhbjtcbiAgICAgIHRoaXMuZW1pdCgncGFuIHZpZXdwb3J0Jyk7XG4gICAgICB0aGlzLm5vdGlmeSgndmlld3BvcnQnKTtcbiAgICB9XG5cbiAgICByZXR1cm4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dWxkIGJlIHVwZGF0ZWRcbiAgICAgICAgICAgICAgdG9Nb2QucHVzaCh7XG4gICAgICAgICAgICAgICAgZWxlOiBlbGUsXG4gICAgICAgICAgICAgICAganNvbjoganNvblxuICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIC8vIG90aGVyd2lzZSBzaG91bGQgYmUgYWRkZWRcbiAgICAgICAgICAgICAgaWYgKGdyKSB7XG4gICAgICAgICAgICAgICAganNvbi5ncm91cCA9IGdyO1xuICAgICAgICAgICAgICAgIHRvQWRkLnB1c2goanNvbik7XG4gICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdG9BZGQucHVzaChqc29uKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cblxuICAgICAgICAgIGN5LmFkZCh0b0FkZCk7XG5cbiAgICAgICAgICBmb3IgKHZhciBfaSA9IDA7IF9pIDwgdG9Nb2QubGVuZ3RoOyBfaSsrKSB7XG4gICAgICAgICAgICB2YXIgX3RvTW9kJF9pID0gdG9Nb2RbX2ldLFxuICAgICAgICAgICAgICAgIF9lbGUgPSBfdG9Nb2QkX2kuZWxlLFxuICAgICAgICAgICAgICAgIF9qc29uID0gX3RvTW9kJF9pLmpzb247XG5cbiAgICAgICAgICAgIF9lbGUuanNvbihfanNvbik7XG4gICAgICAgICAgfVxuICAgICAgICB9O1xuXG4gICAgICAgIGlmIChhcnJheShvYmouZWxlbWVudHMpKSB7XG4gICAgICAgICAgLy8gZWxlbWVudHM6IFtdXG4gICAgICAgICAgdXBkYXRlRWxlcyhvYmouZWxlbWVudHMpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIC8vIGVsZW1lbnRzOiB7IG5vZGVzOiBbXSwgZWRnZXM6IFtdIH1cbiAgICAgICAgICB2YXIgZ3JzID0gWydub2RlcycsICdlZGdlcyddO1xuXG4gICAgICAgICAgZm9yICh2YXIgaS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S5mb3JFYWNoKGZ1bmN0aW9uIChlbGUpIHtcbiAgICAgICAgICByZXR1cm4gZ2V0RnJlc2hSZWYoZWxlKS5yZW1vdmUoKTtcbiAgICAgICAgfSk7XG4gICAgICB9XG5cbiAgICAgIGlmIChvYmouc3R5bGUpIHtcbiAgICAgICAgY3kuc3R5bGUob2JqLnN0eWxlKTtcbiAgICAgIH1cblxuICAgICAgaWYgKG9iai56b29tICE9IG51bGwgJiYgb2JqLnpvb20gIT09IF9wLnpvb20pIHtcbiAgICAgICAgY3kuem9vbShvYmouem9vbSk7XG4gICAgICB9XG5cbiAgICAgIGlmIChvYmoucGFuKSB7XG4gICAgICAgIGlmIChvYmoucGFuLnggIT09IF9wLnBhbi54IHx8IG9iai5wYW4ueSAhPT0gX3AucGFuLnkpIHtcbiAgICAgICAgICBjeS5wYW4ob2JqLnBhbik7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgaWYgKG9iai5kYXRhKSB7XG4gICAgICAgIGN5LmRhdGEob2JqLmRhdGEpO1xuICAgICAgfVxuXG4gICAgICB2YXIgZmllbGRzID0gWydtaW5ab29tJywgJ21heFpvb20nLCAnem9vbWluZ0VuYWJsZWQnLCAndXNlclpvb21pbmdFbmFibGVkJywgJ3Bhbm5pbmdFbmFibGVkJywgJ3VzZXJQYW5uaW5nRW5hYmxlZCcsICdib3hTZWxlY3Rpb25FbmFibGVkJywgJ2F1dG9sb2NrJywgJ2F1dG91bmdyYWJpZnknLCAnYXV0b3Vuc2VsZWN0aWZ5JywgJ211bHRpQ2xpY2tEZWJvdW5jZVRpbWUnXTtcblxuICAgICAgZm9yICh2YXIgX2kyID0gMDsgX2kyIDwgZmllbGRzLmxlbmd0aDsgX2kyKyspIHtcbiAgICAgICAgdmFyIGYgPSBmaWVsZHNbX2kyXTtcblxuICAgICAgICBpZiAob2JqW2ZdICE9IG51bGwpIHtcbiAgICAgICAgICBjeVtmXShvYmpbZl0pO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIGN5LmVuZEJhdGNoKCk7XG4gICAgICByZXR1cm4gdGhpczsgLy8gY2hhaW5pbmdcbiAgICB9IGVsc2Uge1xuICAgICAgLy8gZ2V0XG4gICAgICB2YXIgZmxhdCA9ICEhb2JqO1xuICAgICAgdmFyIGpzb24gPSB7fTtcblxuICAgICAgaWYgKGZsYXQpIHtcbiAgICAgICAganNvbi5lbGVtZW50cyA9IHRoaXMuZWxlbWVudHMoKS5tYXAoZnVuY3Rpb24gKGVsZSkge1xuICAgICAgICAgIHJldHVybiBlbGUuanNvbigpO1xuICAgICAgICB9KTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIGpzb24uZWxlbWVudHMgPSB7fTtcbiAgICAgICAgZWxlcy5mb3JFYWNoKGZ1bmN0aW9uIChlbGUpIHtcbiAgICAgICAgICB2YXIgZ3JvdXAgPSBlbGUuZ3JvdXAoKTtcblxuICAgICAgICAgIGlmICghanNvbi5lbGVtZW50c1tncm91cF0pIHtcbiAgICAgICAgICAgIGpzb24uZWxlbWVudHNbZ3JvdXBdID0gW107XG4gICAgICAgICAgfVxuXG4gICAgICAgICAganNvbi5lbGVtZW50c1tncm91cF0ucHVzaChlbGUuanNvbigpKTtcbiAgICAgICAgfSk7XG4gICAgICB9XG5cbiAgICAgIGlmICh0aGlzLl9wcml2YXRlLnN0eWxlRW5hYmxlZCkge1xuICAgICAgICBqc29uLnN0eWxlID0gY3kuc3R5bGUoKS5qc29uKCk7XG4gICAgICB9XG5cbiAgICAgIGpzb24uZGF0YSA9IGNvcHkoY3kuZGF0YSgpKTtcbiAgICAgIHZhciBvcHRpb25zID0gX3Aub3B0aW9ucztcbiAgICAgIGpzb24uem9vbWluZ0VuYWJsZWQgPSBfcC56b29taW5nRW5hYmxlZDtcbiAgICAgIGpzb24udXNlclpvb21pbmdFbmFibGVkID0gX3AudXNlclpvb21pbmdFbmFibGVkO1xuICAgICAganNvbi56b29tID0gX3Auem9vbTtcbiAgICAgIGpzb24ubWluWm9vbSA9IF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5jbXB0SWQ7XG4gICAgdmFyIGNvbXBvbmVudCA9IGNvbXBvbmVudHNbY2lkXSA9IGNvbXBvbmVudHNbY2lkXSB8fCBbXTtcbiAgICBjb21wb25lbnQucHVzaChub2RlKTtcbiAgfVxuXG4gIHZhciB0b3RhbEEgPSAwO1xuXG4gIGZvciAodmFyIGkgPSAwOyBpIDwgY29tcG9uZW50cy5sZW5ndGg7IGkrKykge1xuICAgIHZhciBjID0gY29tcG9uZW50c1tpXTtcblxuICAgIGlmICghYykge1xuICAgICAgY29udGludWU7XG4gICAgfVxuXG4gICAgYy54MSA9IEluZmluaXR5O1xuICAgIGMueDIgPSAtSW5maW5pdHk7XG4gICAgYy55MSA9IEluZmluaXR5O1xuICAgIGMueTIgPSAtSW5maW5pdHk7XG5cbiAgICBmb3IgKHZhciBqID0gMDsgaiA8IGMubGVuZ3RoOyBqKyspIHtcbiAgICAgIHZhciBuID0gY1tqXTtcbiAgICAgIGMueDEgPSBNYXRoLm1pbihjLngxLCBuLnBvc2l0aW9uWCAtIG4ud2lkdGggLyAyKTtcbiAgICAgIGMueDIgPSBNYXRoLm1heChjLngyLCBuLnBvc2l0aW9uWCArIG4ud2lkdGggLyAyKTtcbiAgICAgIGMueTEgPSBNYXRoLm1pbihjLnkxLCBuLnBvc2l0aW9uWSAtIG4uaGVpZ2h0IC8gMik7XG4gICAgICBjLnkyID0gTWF0aC5tYXgoYy55Miwgbi5wb3NpdGlvblkgKyBuLmhlaWdodCAvIDIpO1xuICAgIH1cblxuICAgIGMudyA9IGMueDIgLSBjLngxO1xuICAgIGMuaCA9IGMueTIgLSBjLnkxO1xuICAgIHRvdGFsQSArPSBjLncgKiBjLmg7XG4gIH1cblxuICBjb21wb25lbnRzLnNvcnQoZnVuY3Rpb24gKGMxLCBjMikge1xuICAgIHJldHVybiBjMi53ICogYzIuaCAtIGMxLncgKiBjMS5oO1xuICB9KTtcbiAgdmFyIHggPSAwO1xuICB2YXIgeSA9IDA7XG4gIHZhciB1c2VkV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2YgdGltZXMgdG8gc3BsaXQgd2lkdGhcbiAgICB2YXIgY2VsbHMgPSBub2Rlcy5zaXplKCk7XG4gICAgdmFyIHNwbGl0cyA9IE1hdGguc3FydChjZWxscyAqIGJiLmggLyBiYi53KTtcbiAgICB2YXIgcm93cyA9IE1hdGgucm91bmQoc3BsaXRzKTtcbiAgICB2YXIgY29scyA9IE1hdGgucm91bmQoYmIudyAvIGJiLmggKiBzcGxpdHMpO1xuXG4gICAgdmFyIHNtYWxsID0gZnVuY3Rpb24gc21hbGwodmFsKSB7XG4gICAgICBpZiAodmFsID09IG51bGwpIHtcbiAgICAgICAgcmV0dXJuIE1hdGgubWluKHJvd3MsIGNvbHMpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdmFyIG1pbiA9IE1hdGgubWluKHJvd3MsIGNvbHMpO1xuXG4gICAgICAgIGlmIChtaW4gPT0gcm93cykge1xuICAgICAgICAgIHJvd3MgPSB2YWw7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgY29scyA9IHZhbDtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH07XG5cbiAgICB2YXIgbGFyZ2UgPSBmdW5jdGlvbiBsYXJnZSh2YWwpIHtcbiAgICAgIGlmICh2YWwgPT0gbnVsbCkge1xuICAgICAgICByZXR1cm4gTWF0aC5tYXgocm93cywgY29scyk7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICB2YXIgbWF4ID0gTWF0aC5tYXgocm93cywgY29scyk7XG5cbiAgICAgICAgaWYgKG1heCA9PSByb3dzKSB7XG4gICAgICAgICAgcm93cyA9IHZhbDtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBjb2xzID0gdmFsO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfTtcblxuICAgIHZhciBvUm93cyA9IG9wdGlvbnMucm93cztcbiAgICB2YXIgb0NvbHMgPSBvcHRpb25zLmNvbHMgIT0gbnVsbCA/IG9wdGlvbnMuY29scyA6IG9wdGlvbnMuY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ICB2YXIgX25vZGUgPSBub2Rlc1tfaV07XG4gICAgICB2YXIgcmNQb3MgPSBvcHRpb25zLnBvc2l0aW9uKF9ub2RlKTtcblxuICAgICAgaWYgKHJjUG9zICYmIChyY1Bvcy5yb3cgIT09IHVuZGVmaW5lZCB8fCByY1Bvcy5jb2wgIT09IHVuZGVmaW5lZCkpIHtcbiAgICAgICAgLy8gbXVzdCBoYXZlIGF0IGxlYXN0IHJvdyBvciBjb2wgZGVmJ2RcbiAgICAgICAgdmFyIF9wb3MgPSB7XG4gICAgICAgICAgcm93OiByY1Bvcy5yb3csXG4gICAgICAgICAgY29sOiByY1Bvcy5jb2xcbiAgICAgICAgfTtcblxuICAgICAgICBpZiAoX3Bvcy5jb2wgPT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgIC8vIGZpbmQgdW51c2VkIGNvbFxuICAgICAgICAgIF9wb3MuY29sID0gMDtcblxuICAgICAgICAgIHdoaWxlICh1c2VkKF9wb3Mucm93LCBfcG9zLmNvbCkpIHtcbiAgICAgICAgICAgIF9wb3MuY29sKys7XG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2UgaWYgKF9wb3Mucm93ID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAvLyBmaW5kIHVudXNlZCByb3dcbiAgICAgICAgICBfcG9zLnJvdyA9IDA7XG5cbiAgICAgICAgICB3aGlsZSAodXNlZChfcG9zLnJvdywgX3Bvcy5jb2wpKSB7XG4gICAgICAgICAgICBfcG9zLnJvdysrO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGlkMm1hblBvc1tfbm9kZS5pZCgpXSA9IF9wb3M7XG4gICAgICAgIHVzZShfcG9zLnJvdywgX3Bvcy5jb2wpO1xuICAgICAgfVxuICAgIH1cblxuICAgIHZhciBnZXRQb3MgPSBmdW5jdGlvbiBnZXRQb3MoZWxlbWVudCwgaSkge1xuICAgICAgdmFyIHgsIHk7XG5cbiAgICAgIGlmIChlbGVtZW50LmxvY2t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cGFpckluZm8uZWxlcyxcbiAgICAgICAgICBzcmNQb3M6IHRndFBvcyxcbiAgICAgICAgICB0Z3RQb3M6IHNyY1BvcyxcbiAgICAgICAgICBzcmNXOiB0Z3RXLFxuICAgICAgICAgIHNyY0g6IHRndEgsXG4gICAgICAgICAgdGd0Vzogc3JjVyxcbiAgICAgICAgICB0Z3RIOiBzcmNILFxuICAgICAgICAgIHNyY0ludG46IHRndEludG4sXG4gICAgICAgICAgdGd0SW50bjogc3JjSW50bixcbiAgICAgICAgICBzcmNTaGFwZTogdGd0U2hhcGUsXG4gICAgICAgICAgdGd0U2hhcGU6IHNyY1NoYXBlLFxuICAgICAgICAgIHBvc1B0czoge1xuICAgICAgICAgICAgeDE6IHBvc1B0cy54MixcbiAgICAgICAgICAgIHkxOiBwb3NQdHMueTIsXG4gICAgICAgICAgICB4MjogcG9zUHRzLngxLFxuICAgICAgICAgICAgeTI6IHBvc1B0cy55MVxuICAgICAgICAgIH0sXG4gICAgICAgICAgaW50ZXJzZWN0aW9uUHRzOiB7XG4gICAgICAgICAgICB4MTogaW50ZXJzZWN0aW9uUHRzLngyLFxuICAgICAgICAgICAgeTE6IGludGVyc2VjdGlvblB0cy55MixcbiAgICAgICAgICAgIHgyOiBpbnRlcnNlY3Rpb25QdHMueDEsXG4gICAgICAgICAgICB5MjogaW50ZXJzZWN0aW9uUHRzLnkxXG4gICAgICAgICAgfSxcbiAgICAgICAgICB2ZWN0b3I6IHtcbiAgICAgICAgICAgIHg6IC12ZWN0b3IueCxcbiAgICAgICAgICAgIHk6IC12ZWN0b3IueVxuICAgICAgICAgIH0sXG4gICAgICAgICAgdmVjdG9yTm9ybToge1xuICAgICAgICAgICAgeDogLXZlY3Rvck5vcm0ueCxcbiAgICAgICAgICAgIHk6IC12ZWN0b3JOb3JtLnlcbiAgICAgICAgICB9LFxuICAgICAgICAgIHZlY3Rvck5vcm1JbnZlcnNlOiB7XG4gICAgICAgICAgICB4OiAtdmVjdG9yTm9ybUludmVyc2U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mJiBqID09PSBfY3Auc2VnbWVudHMubGVuZ3RoIC0gMTtcbiAgICAgICAgICAgICAgc3RhcnREaXN0ID0gdG90YWxEaXN0O1xuICAgICAgICAgICAgICB0b3RhbERpc3QgKz0gX3NlZy5sZW5ndGg7XG5cbiAgICAgICAgICAgICAgaWYgKHRvdGFsRGlzdCA+PSBvZmZzZXQgfHwgbGFzdFNlZykge1xuICAgICAgICAgICAgICAgIHNlbGVjdGVkID0ge1xuICAgICAgICAgICAgICAgICAgY3A6IF9jcCxcbiAgICAgICAgICAgICAgICAgIHNlZ21lbnQ6IF9zZWdcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChzZWxlY3RlZCkge1xuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICB2YXIgY3AgPSBzZWxlY3RlZC5jcDtcbiAgICAgICAgICB2YXIgc2VnID0gc2VsZWN0ZWQuc2VnbWVudDtcbiAgICAgICAgICB2YXIgdFNlZ21lbnQgPSAob2Zmc2V0IC0gc3RhcnREaXN0KSAvIHNlZy5sZW5ndGg7XG4gICAgICAgICAgdmFyIHNlZ0R0ID0gc2VnLnQxIC0gc2VnLnQwO1xuICAgICAgICAgIHZhciB0ID0gaXNTcmMgPyBzZWcudDAgKyBzZWdEdCAqIHRTZWdtZW50IDogc2VnLnQxIC0gc2VnRHQgKiB0U2VnbWVudDtcbiAgICAgICAgICB0ID0gYm91bmQoMCwgdCwgMSk7XG4gICAgICAgICAgcCA9IHFiZXppZXJQdEF0KGNwLnAwLCBjcC5wMSwgY3AucDIsIHQpO1xuICAgICAgICAgIGFuZ2xlID0gYmV6aWVyQW5nbGUoY3AucDAsIGNwLnAxLCBjcC5wMiwgdCk7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cblxuICAgICAgY2FzZSAnc3RyYWlnaHQnOlxuICAgICAgY2FzZSAnc2VnbWVudHMnOlxuICAgICAgY2FzZSAnaGF5c3RhY2snOlxuICAgICAgICB7XG4gICAgICAgICAgdmFyIGQgPSAwLFxuICAgICAgICAgICAgICBkaSxcbiAgICAgICAgICAgICAgZDA7XG4gICAgICAgICAgdmFyIHAwLCBwMTtcbiAgICAgICAgICB2YXIgbCA9IHJzLmFsbHB0cy5sZW5ndGg7XG5cbiAgICAgICAgICBmb3IgKHZhciBfaTIgPSAwOyBfaTIgKyAzIDwgbDsgX2kyICs9IDIpIHtcbiAgICAgICAgICAgIGlmIChpc1NyYykge1xuICAgICAgICAgICAgICBwMCA9IHtcbiAgICAgICAgICAgICAgICB4OiBycy5hbGxwdHNbX2kyXSxcbiAgICAgICAgICAgICAgICB5OiBycy5hbGxwdHNbX2kyICsgMV1cbiAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgcDEgPSB7XG4gICAgICAgICAgICAgICAgeDogcnMuYWxscHRzW19pMiArIDJdLFxuICAgICAgICAgICAgICAgIHk6IHJzLmFsbHB0c1tfaTIgKyAzXVxuICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgcDAgPSB7XG4gICAgICAgICAgICAgICAgeDogcnMuYWxscHRzW2wgLSAyIC0gX2kyXSxcbiAgICAgICAgICAgICAgICB5OiBycy5hbGxwdHNbbCAtIDEgLSBfaTJdXG4gICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgIHAxID0ge1xuICAgICAgICAgICAgICAgIHg6IHJzLmFsbHB0c1tsIC0gNCAtIF9pMl0sXG4gICAgICAgICAgICAgICAgeTogcnMuYWxscHRzW2wgLSAzIC0gX2kyXVxuICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBkaSA9IGRpc3QocDAsIHAxKTtcbiAgICAgICAgICAgIGQwID0gZDtcbiAgICAgICAgICAgIGQgKz0gZGk7XG5cbi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IHZhciBlbGUgPSByLmhvdmVyRGF0YS5kb3duO1xuXG4gICAgICAgICAgaWYgKGVsZSkge1xuICAgICAgICAgICAgZWxlLmVtaXQoe1xuICAgICAgICAgICAgICBvcmlnaW5hbEV2ZW50OiBlLFxuICAgICAgICAgICAgICB0eXBlOiAndGFwaG9sZCcsXG4gICAgICAgICAgICAgIHBvc2l0aW9uOiB7XG4gICAgICAgICAgICAgICAgeDogcG9zWzBdLFxuICAgICAgICAgICAgICAgIHk6IHBvc1sxXVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgY3kuZW1pdCh7XG4gICAgICAgICAgICAgIG9yaWdpbmFsRXZlbnQ6IGUsXG4gICAgICAgICAgICAgIHR5cGU6ICd0YXBob2xkJyxcbiAgICAgICAgICAgICAgcG9zaXRpb246IHtcbiAgICAgICAgICAgICAgICB4OiBwb3NbMF0sXG4gICAgICAgICAgICAgICAgeTogcG9zWzFdXG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSwgci50YXBob2xkRHVyYXRpb24pO1xuICAgIH07IC8vIFJpZ2h0IGNsaWNrIGJ1dHRvblxuXG5cbiAgICBpZiAoZS53aGljaCA9PSAzKSB7XG4gICAgICByLmhvdmVyRGF0YS5jeHRTdGFydGVkID0gdHJ1ZTtcbiAgICAgIHZhciBjeHRFdnQgPSB7XG4gICAgICAgIG9yaWdpbmFsRXZlbnQ6IGUsXG4gICAgICAgIHR5cGU6ICdjeHR0YXBzdGFydCcsXG4gICAgICAgIHBvc2l0aW9uOiB7XG4gICAgICAgICAgeDogcG9zWzBdLFxuICAgICAgICAgIHk6IHBvc1sxXVxuICAgICAgICB9XG4gICAgICB9O1xuXG4gICAgICBpZiAobmVhcikge1xuICAgICAgICBuZWFyLmFjdGl2YXRlKCk7XG4gICAgICAgIG5lYXIuZW1pdChjeHRFdnQpO1xuICAgICAgICByLmhvdmVyRGF0YS5kb3duID0gbmVhcjtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIGN5LmVtaXQoY3h0RXZ0KTtcbiAgICAgIH1cblxuICAgICAgci5ob3ZlckRhdGEuZG93blRpbWUgPSBuZXcgRGF0ZSgpLmdldFRpbWUoKTtcbiAgICAgIHIuaG92ZXJEYXRhLmN4dERyYWdnZWQgPSBmYWxzZTsgLy8gUHJpbWFyeSBidXR0b25cbiAgICB9IGVsc2UgaWYgKGUud2hpY2ggPT0gMSkge1xuICAgICAgaWYgKG5lYXIpIHtcbiAgICAgICAgbmVhci5hY3RpdmF0ZSgpO1xuICAgICAgfSAvLyBFbGVtZW50IGRyYWdnaW5nXG5cblxuICAgICAge1xuICAgICAgICAvLyBJZiBzb21ldGhpbmcgaXMgdW5kZXIgdGhlIGN1cnNvciBhbmQgaXQgaXMgZHJhZ2dhYmxlLCBwcmVwYXJlIHRvIGdyYWIgaXRcbiAgICAgICAgaWYgKG5lYXIgIT0gbnVsbCkge1xuICAgICAgICAgIGlmIChyLm5vZGVJc0dyYWJiYWJsZShuZWFyKSkge1xuICAgICAgICAgICAgdmFyIG1ha2VFdmVudCA9IGZ1bmN0aW9uIG1ha2VFdmVudCh0eXBlKSB7XG4gICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgb3JpZ2luYWxFdmVudDogZSxcbiAgICAgICAgICAgICAgICB0eXBlOiB0eXBlLFxuICAgICAgICAgICAgICAgIHBvc2l0aW9uOiB7XG4gICAgICAgICAgICAgICAgICB4OiBwb3NbMF0sXG4gICAgICAgICAgICAgICAgICB5OiBwb3NbMV1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICB2YXIgdHJpZ2dlckdyYWIgPSBmdW5jdGlvbiB0cmlnZ2VyR3JhYihlbGUpIHtcbiAgICAgICAgICAgICAgZWxlLmVtaXQobWFrZUV2ZW50KCdncmFiJykpO1xuICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgc2V0R3JhYlRhcmdldChuZWFyKTtcblxuICAgICAgICAgICAgaWYgKCFuZWFyLnNlbGVjdGVkKCkpIHtcbiAgICAgICAgICAgICAgZHJhZ2dlZEVsZW1lbnRzID0gci5kcmFnRGF0YS5wb3NzaWJsZURyYWdFbGVtZW50cyA9IGN5LmNvbGxlY3Rpb24oKTtcbiAgICAgICAgICAgICAgYWRkTm9kZVRvRHJhZyhuZWFyLCB7XG4gICAgICAgICAgICAgICAgYWRkVG9MaXN0OiBkcmFnZ2VkRWxlbWVudHNcbiAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgIG5lYXIuZW1pdChtYWtlRXZlbnQoJ2dyYWJvbicpKS5lbWl0KG1ha2VFdmVudCgnZ3JhYicpKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIGRyYWdnZWRFbGVtZW50cyA9IHIuZHJhZ0RhdGEucG9zc2libGVEcmFnRWxlbWVudHMgPSBjeS5jb2xsZWN0aW9uKCk7XG4gICAgICAgICAgICAgIHZhciBzZWxlY3RlZE5vZGVzID0gY3kuJChmdW5jdGlvbiAoZWxlKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGVsZS5pc05vZGUoKSAmJiBlbGUuc2VsZWN0ZWQoKSAmJiByLm5vZGVJc0dyYWJiYWJsZShlbGUpO1xuICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgYWRkTm9kZXNUb0RyYWcoc2VsZWN0ZWROb2Rlcywge1xuICAgICAgICAgICAgICAgIGFkZFRvTGlzdDogZHJhZ2dlZEVsZW1lbnRzXG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICBuZWFyLmVtaXQobWFrZUV2ZW50KCdncmFib24nKSk7XG4gICAgICAgICAgICAgIHNlbGVjdGVkTm9kZXMuZm9yRWFjaCh0cmlnZ2VyR3JhYik7XG4gICAgICAgICAgICB9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ICdjeHRkcmFnJyxcbiAgICAgICAgICBwb3NpdGlvbjoge1xuICAgICAgICAgICAgeDogcG9zWzBdLFxuICAgICAgICAgICAgeTogcG9zWzFdXG4gICAgICAgICAgfVxuICAgICAgICB9O1xuXG4gICAgICAgIGlmIChkb3duKSB7XG4gICAgICAgICAgZG93bi5lbWl0KGN4dEV2dCk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgY3kuZW1pdChjeHRFdnQpO1xuICAgICAgICB9XG5cbiAgICAgICAgci5ob3ZlckRhdGEuY3h0RHJhZ2dlZCA9IHRydWU7XG5cbiAgICAgICAgaWYgKCFyLmhvdmVyRGF0YS5jeHRPdmVyIHx8IG5lYXIgIT09IHIuaG92ZXJEYXRhLmN4dE92ZXIpIHtcbiAgICAgICAgICBpZiAoci5ob3ZlckRhdGEuY3h0T3Zlcikge1xuICAgICAgICAgICAgci5ob3ZlckRhdGEuY3h0T3Zlci5lbWl0KHtcbiAgICAgICAgICAgICAgb3JpZ2luYWxFdmVudDogZSxcbiAgICAgICAgICAgICAgdHlwZTogJ2N4dGRyYWdvdXQnLFxuICAgICAgICAgICAgICBwb3NpdGlvbjoge1xuICAgICAgICAgICAgICAgIHg6IHBvc1swXSxcbiAgICAgICAgICAgICAgICB5OiBwb3NbMV1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgci5ob3ZlckRhdGEuY3h0T3ZlciA9IG5lYXI7XG5cbiAgICAgICAgICBpZiAobmVhcikge1xuICAgICAgICAgICAgbmVhci5lbWl0KHtcbiAgICAgICAgICAgICAgb3JpZ2luYWxFdmVudDogZSxcbiAgICAgICAgICAgICAgdHlwZTogJ2N4dGRyYWdvdmVyJyxcbiAgICAgICAgICAgICAgcG9zaXRpb246IHtcbiAgICAgICAgICAgICAgICB4OiBwb3NbMF0sXG4gICAgICAgICAgICAgICAgeTogcG9zWzFdXG4gICAgICAgICAgICAgIH1cbiAgICAgICAg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1cbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChkb3duICYmIGRvd24ucGFubmFibGUoKSAmJiBkb3duLmFjdGl2ZSgpKSB7XG4gICAgICAgICAgZG93bi51bmFjdGl2YXRlKCk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9IGVsc2Uge1xuICAgICAgaWYgKGRvd24gJiYgZG93bi5wYW5uYWJsZSgpICYmIGRvd24uYWN0aXZlKCkpIHtcbiAgICAgICAgZG93bi51bmFjdGl2YXRlKCk7XG4gICAgICB9XG5cbiAgICAgIGlmICgoIWRvd24gfHwgIWRvd24uZ3JhYmJlZCgpKSAmJiBuZWFyICE9IGxhc3QpIHtcbiAgICAgICAgaWYgKGxhc3QpIHtcbiAgICAgICAgICB0cmlnZ2VyRXZlbnRzKGxhc3QsIFsnbW91c2VvdXQnLCAndGFwZHJhZ291dCddLCBlLCB7XG4gICAgICAgICAgICB4OiBwb3NbMF0sXG4gICAgICAgICAgICB5OiBwb3NbMV1cbiAgICAgICAgICB9KTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChuZWFyKSB7XG4gICAgICAgICAgdHJpZ2dlckV2ZW50cyhuZWFyLCBbJ21vdXNlb3ZlcicsICd0YXBkcmFnb3ZlciddLCBlLCB7XG4gICAgICAgICAgICB4OiBwb3NbMF0sXG4gICAgICAgICAgICB5OiBwb3NbMV1cbiAgICAgICAgICB9KTtcbiAgICAgICAgfVxuXG4gICAgICAgIHIuaG92ZXJEYXRhLmxhc3QgPSBuZWFyO1xuICAgICAgfVxuXG4gICAgICBpZiAoZG93bikge1xuICAgICAgICBpZiAoaXNPdmVyVGhyZXNob2xkRHJhZykge1xuICAgICAgICAgIC8vIHRoZW4gd2UgY2FuIHRha2UgYWN0aW9uXG4gICAgICAgICAgaWYgKGN5LmJveFNlbGVjdGlvbkVuYWJsZWQoKSAmJiBtdWx0U2VsS2V5RG93bikge1xuICAgICAgICAgICAgLy8gdGhlbiBzZWxlY3Rpb24gb3ZlcnJpZGVzXG4gICAgICAgICAgICBpZiAoZG93biAmJiBkb3duLmdyYWJiZWQoKSkge1xuICAgICAgICAgICAgICBmcmVlRHJhZ2dlZEVsZW1lbnRzKGRyYWdnZWRFbGVtZW50cyk7XG4gICAgICAgICAgICAgIGRvd24uZW1pdCgnZnJlZW9uJyk7XG4gICAgICAgICAgICAgIGRyYWdnZWRFbGVtZW50cy5lbWl0KCdmcmVlJyk7XG5cbiAgICAgICAgICAgICAgaWYgKHIuZHJhZ0RhdGEuZGlkRHJhZykge1xuICAgICAgICAgICAgICAgIGRvd24uZW1pdCgnZHJhZ2ZyZWVvbicpO1xuICAgICAgICAgICAgICAgIGRyYWdnZWRFbGVtZW50cy5lbWl0KCdkcmFnZnJlZScpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGdvSW50b0JveE1vZGUoKTtcbiAgICAgICAgICB9IGVsc2UgaWYgKGRvd24gJiYgZG93bi5ncmFiYmVkKCkgJiYgci5ub2RlSXNEcmFnZ2FibGUoZG93bikpIHtcbiAgICAgICAgICAgIC8vIGRyYWcgbm9kZVxuICAgICAgICAgICAgdmFyIGp1c3RTdGFydGVkRHJhZyA9ICFyLmRyYWdEYXRhLmRpZERyYWc7XG5cbiAgICAgICAgICAgIGlmIChqdXN0U3RhcnRlZERyYWcpIHtcbiAgICAgICAgICAgICAgci5yZWRyYXdIaW50KCdlbGVzJywgdHJ1ZSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHIuZHJhZ0RhdGEuZGlkRHJhZyA9IHRydWU7IC8vIGluZGljYXRlIHRoYXQgd2UgYWN0dWFsbHkgZGlkIGRyYWcgdGhlIG5vZGVcbiAgICAgICAgICAgIC8vIG5vdywgYWRkIHRoZSBlbGVtZW50cyB0byB0aGUgZHJhZyBsYXllciBpZiBub3QgZG9uZSBhbHJlYWR5XG5cbiAgICAgICAgICAgIGlmICghci5ob3ZlckRhdGEuZHJhZ2dpbmdFbGVzKSB7XG4gICAgICAgICAgICAgIGFkZE5vZGVzVG9EcmFnKGRyYWdnZWRFbGVtZW50cywge1xuICAgICAgICAgICAgICAgIGluRHJhZ0xheWVyOiB0cnVlXG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YXIgdG90YWxTaGlmdCA9IHtcbiAgICAgICAgICAgICAgeDogMCxcbiAgICAgICAgICAgICAgeTogMFxuICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgaWYgKG51bWJlciQxKGRpc3BbMF0pICYmIG51bWJlciQxKGRpc3BbMV0pKSB7XG4gICAgICAgICAgICAgIHRvdGFsU2hpZnQueCArPSBkaXNwWzBdO1xuICAgICAgICAgICAgICB0b3RhbFNoaWZ0LnkgKz0gZGlzcFsxXTtcblxuICAgICAgICAgICAgICBpZiAoanVzdFN0YXJ0ZWREcmFnKSB7XG4gICAgICAgICAgICAgICAgdmFyIGRyYWdEZWx0YSA9IHIuaG92ZXJEYXRhLmRyYWdEZWx0YTtcblxuICAgICAgICAgICAgICAgIGlmIChkcmFnRGVsdGEgJiYgbnVtYmVyJDEoZHJhZ0RlbHRhWzBdKSAmJiBudW1iZXIkMShkcmFnRGVsdGFbMV0pKSB7XG4gICAgICAgICAgICAgICAgICB0b3RhbFNoaWZ0LnggKz0gZHJhZ0RlbHRhWzBdO1xuICAgICAgICAgICAgICAgICAgdG90YWxTaGlmdC55ICs9IGRyYWdEZWx0YVsxXTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgci5ob3ZlckRhdGEuZHJhZ2dpbmdFbGVzID0gdHJ1ZTtcbiAgICAgICAgICAgIGRyYWdnZWRFbGVtZW50cy5zaWxlbnRTaGlmdCh0b3RhbFNoaWZ0KS5lbWl0KCdwb3NpdGlvbiBkcmFnJyk7XG4gICAgICAgICAgICByLnJlZHJhd0hpbnQoJ2RyYWcnLCB0cnVlKTtcbiAgICAgICAgIC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gICAgICkge1xuICAgICAgICB0cmlnZ2VyRXZlbnRzKGRvd24sIFtcImNsaWNrXCIsIFwidGFwXCIsIFwidmNsaWNrXCJdLCBlLCB7XG4gICAgICAgICAgeDogcG9zWzBdLFxuICAgICAgICAgIHk6IHBvc1sxXVxuICAgICAgICB9KTtcbiAgICAgICAgZGlkRG91YmxlQ2xpY2sgPSBmYWxzZTtcblxuICAgICAgICBpZiAoZS50aW1lU3RhbXAgLSBwcmV2Q2xpY2tUaW1lU3RhbXAgPD0gY3kubXVsdGlDbGlja0RlYm91bmNlVGltZSgpKSB7XG4gICAgICAgICAgY2xpY2tUaW1lb3V0ICYmIGNsZWFyVGltZW91dChjbGlja1RpbWVvdXQpO1xuICAgICAgICAgIGRpZERvdWJsZUNsaWNrID0gdHJ1ZTtcbiAgICAgICAgICBwcmV2Q2xpY2tUaW1lU3RhbXAgPSBudWxsO1xuICAgICAgICAgIHRyaWdnZXJFdmVudHMoZG93biwgW1wiZGJsY2xpY2tcIiwgXCJkYmx0YXBcIiwgXCJ2ZGJsY2xpY2tcIl0sIGUsIHtcbiAgICAgICAgICAgIHg6IHBvc1swXSxcbiAgICAgICAgICAgIHk6IHBvc1sxXVxuICAgICAgICAgIH0pO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGNsaWNrVGltZW91dCA9IHNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgaWYgKGRpZERvdWJsZUNsaWNrKSByZXR1cm47XG4gICAgICAgICAgICB0cmlnZ2VyRXZlbnRzKGRvd24sIFtcIm9uZWNsaWNrXCIsIFwib25ldGFwXCIsIFwidm9uZWNsaWNrXCJdLCBlLCB7XG4gICAgICAgICAgICAgIHg6IHBvc1swXSxcbiAgICAgICAgICAgICAgeTogcG9zWzFdXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9LCBjeS5tdWx0aUNsaWNrRGVib3VuY2VUaW1lKCkpO1xuICAgICAgICAgIHByZXZDbGlja1RpbWVTdG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FyMSA9IHIuZmluZE5lYXJlc3RFbGVtZW50KG5vd1swXSwgbm93WzFdLCB0cnVlLCB0cnVlKTtcbiAgICAgICAgdmFyIG5lYXIyID0gci5maW5kTmVhcmVzdEVsZW1lbnQobm93WzJdLCBub3dbM10sIHRydWUsIHRydWUpO1xuXG4gICAgICAgIGlmIChuZWFyMSAmJiBuZWFyMS5pc05vZGUoKSkge1xuICAgICAgICAgIG5lYXIxLmFjdGl2YXRlKCkuZW1pdCh7XG4gICAgICAgICAgICBvcmlnaW5hbEV2ZW50OiBlLFxuICAgICAgICAgICAgdHlwZTogJ2N4dHRhcHN0YXJ0JyxcbiAgICAgICAgICAgIHBvc2l0aW9uOiB7XG4gICAgICAgICAgICAgIHg6IG5vd1swXSxcbiAgICAgICAgICAgICAgeTogbm93WzFdXG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSk7XG4gICAgICAgICAgci50b3VjaERhdGEuc3RhcnQgPSBuZWFyMTtcbiAgICAgICAgfSBlbHNlIGlmIChuZWFyMiAmJiBuZWFyMi5pc05vZGUoKSkge1xuICAgICAgICAgIG5lYXIyLmFjdGl2YXRlKCkuZW1pdCh7XG4gICAgICAgICAgICBvcmlnaW5hbEV2ZW50OiBlLFxuICAgICAgICAgICAgdHlwZTogJ2N4dHRhcHN0YXJ0JyxcbiAgICAgICAgICAgIHBvc2l0aW9uOiB7XG4gICAgICAgICAgICAgIHg6IG5vd1swXSxcbiAgICAgICAgICAgICAgeTogbm93WzFdXG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSk7XG4gICAgICAgICAgci50b3VjaERhdGEuc3RhcnQgPSBuZWFyMjtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBjeS5lbWl0KHtcbiAgICAgICAgICAgIG9yaWdpbmFsRXZlbnQ6IGUsXG4gICAgICAgICAgICB0eXBlOiAnY3h0dGFwc3RhcnQnLFxuICAgICAgICAgICAgcG9zaXRpb246IHtcbiAgICAgICAgICAgICAgeDogbm93WzBdLFxuICAgICAgICAgICAgICB5OiBub3dbMV1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChyLnRvdWNoRGF0YS5zdGFydCkge1xuICAgICAgICAgIHIudG91Y2hEYXRhLnN0YXJ0Ll9wcml2YXRlLmdyYWJiZWQgPSBmYWxzZTtcbiAgICAgICAgfVxuXG4gICAgICAgIHIudG91Y2hEYXRhLmN4dCA9IHRydWU7XG4gICAgICAgIHIudG91Y2hEYXRhLmN4dERyYWdnZWQgPSBmYWxzZTtcbiAgICAgICAgci5kYXRhLmJnQWN0aXZlUG9zaXN0aW9uID0gdW5kZWZpbmVkO1xuICAgICAgICByLnJlZHJhdygpO1xuICAgICAgICByZXR1cm47XG4gICAgICB9XG4gICAgfVxuXG4gICAgaWYgKGUudG91Y2hlc1syXSkge1xuICAgICAgLy8gaWdub3JlXG4gICAgICAvLyBzYWZhcmkgb24gaW9zIHBhbnMgdGhlIHBhZ2Ugb3RoZXJ3aXNlIChub3JtYWxseSB5b3Ugc2hvdWxkIGJlIGFibGUgdG8gcHJldmVudGRlZmF1bHQgb24gdG91Y2htb3ZlLi4uKVxuICAgICAgaWYgKGN5LmJveFNlbGVjdGlvbkVuYWJsZWQoKSkge1xuICAgICAgICBlLnByZXZlbnREZWZhdWx0KCk7XG4gICAgICB9XG4gICAgfSBlbHNlIGlmIChlLnRvdWNoZXNbMV0pIDsgZWxzZSBpZiAoZS50b3VjaGVzWzBdKSB7XG4gICAgICB2YXIgbmVhcnMgPSByLmZpbmROZWFyZXN0RWxlbWVudHMobm93WzBdLCBub3dbMV0sIHRydWUsIHRydWUpO1xuICAgICAgdmFyIG5lYXIgPSBuZWFyc1swXTtcblxuICAgICAgaWYgKG5lYXIgIT0gbnVsbCkge1xuICAgICAgICBuZWFyLmFjdGl2YXRlKCk7XG4gICAgICAgIHIudG91Y2hEYXRhLnN0YXJ0ID0gbmVhcjtcbiAgICAgICAgci50b3VjaERhdGEuc3R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Q6IGUsXG4gICAgICAgICAgICAgIHR5cGU6IHR5cGUsXG4gICAgICAgICAgICAgIHBvc2l0aW9uOiB7XG4gICAgICAgICAgICAgICAgeDogbm93WzBdLFxuICAgICAgICAgICAgICAgIHk6IG5vd1sxXVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9O1xuICAgICAgICAgIH07XG5cbiAgICAgICAgICBuZWFyLmVtaXQobWFrZUV2ZW50KCdncmFib24nKSk7XG5cbiAgICAgICAgICBpZiAoc2VsZWN0ZWROb2Rlcykge1xuICAgICAgICAgICAgc2VsZWN0ZWROb2Rlcy5mb3JFYWNoKGZ1bmN0aW9uIChuKSB7XG4gICAgICAgICAgICAgIG4uZW1pdChtYWtlRXZlbnQoJ2dyYWInKSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgbmVhci5lbWl0KG1ha2VFdmVudCgnZ3JhYicpKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgdHJpZ2dlckV2ZW50cyhuZWFyLCBbJ3RvdWNoc3RhcnQnLCAndGFwc3RhcnQnLCAndm1vdXNlZG93biddLCBlLCB7XG4gICAgICAgIHg6IG5vd1swXSxcbiAgICAgICAgeTogbm93WzFdXG4gICAgICB9KTtcblxuICAgICAgaWYgKG5lYXIgPT0gbnVsbCkge1xuICAgICAgICByLmRhdGEuYmdBY3RpdmVQb3Npc3Rpb24gPSB7XG4gICAgICAgICAgeDogcG9zWzBdLFxuICAgICAgICAgIHk6IHBvc1sxXVxuICAgICAgICB9O1xuICAgICAgICByLnJlZHJhd0hpbnQoJ3NlbGVjdCcsIHRydWUpO1xuICAgICAgICByLnJlZHJhdygpO1xuICAgICAgfSAvLyBUYXAsIHRhcGhvbGRcbiAgICAgIC8vIC0tLS0tXG5cblxuICAgICAgci50b3VjaERhdGEuc2luZ2xlVG91Y2hNb3ZlZCA9IGZhbHNlO1xuICAgICAgci50b3VjaERhdGEu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Dogbm93WzBdLFxuICAgICAgICAgICAgeTogbm93WzFdXG4gICAgICAgICAgfVxuICAgICAgICB9O1xuXG4gICAgICAgIGlmIChyLnRvdWNoRGF0YS5zdGFydCkge1xuICAgICAgICAgIHIudG91Y2hEYXRhLnN0YXJ0LnVuYWN0aXZhdGUoKS5lbWl0KGN4dEV2dCk7XG4gICAgICAgICAgci50b3VjaERhdGEuc3RhcnQgPSBudWxsO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGN5LmVtaXQoY3h0RXZ0KTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0gLy8gY29udGV4dCBzd2lwZVxuXG5cbiAgICBpZiAoY2FwdHVyZSAmJiByLnRvdWNoRGF0YS5jeHQpIHtcbiAgICAgIHZhciBjeHRFdnQgPSB7XG4gICAgICAgIG9yaWdpbmFsRXZlbnQ6IGUsXG4gICAgICAgIHR5cGU6ICdjeHRkcmFnJyxcbiAgICAgICAgcG9zaXRpb246IHtcbiAgICAgICAgICB4OiBub3dbMF0sXG4gICAgICAgICAgeTogbm93WzFdXG4gICAgICAgIH1cbiAgICAgIH07XG4gICAgICByLmRhdGEuYmdBY3RpdmVQb3Npc3Rpb24gPSB1bmRlZmluZWQ7XG4gICAgICByLnJlZHJhd0hpbnQoJ3NlbGVjdCcsIHRydWUpO1xuXG4gICAgICBpZiAoci50b3VjaERhdGEuc3RhcnQpIHtcbiAgICAgICAgci50b3VjaERhdGEuc3RhcnQuZW1pdChjeHRFdnQpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgY3kuZW1pdChjeHRFdnQpO1xuICAgICAgfVxuXG4gICAgICBpZiAoci50b3VjaERhdGEuc3RhcnQpIHtcbiAgICAgICAgci50b3VjaERhdGEuc3RhcnQuX3ByaXZhdGUuZ3JhYmJlZCA9IGZhbHNlO1xuICAgICAgfVxuXG4gICAgICByLnRvdWNoRGF0YS5jeHREcmFnZ2VkID0gdHJ1ZTtcbiAgICAgIHZhciBuZWFyID0gci5maW5kTmVhcmVzdEVsZW1lbnQobm93WzBdLCBub3dbMV0sIHRydWUsIHRydWUpO1xuXG4gICAgICBpZiAoIXIudG91Y2hEYXRhLmN4dE92ZXIgfHwgbmVhciAhPT0gci50b3VjaERhdGEuY3h0T3Zlcikge1xuICAgICAgICBpZiAoci50b3VjaERhdGEuY3h0T3Zlcikge1xuICAgICAgICAgIHIudG91Y2hEYXRhLmN4dE92ZXIuZW1pdCh7XG4gICAgICAgICAgICBvcmlnaW5hbEV2ZW50OiBlLFxuICAgICAgICAgICAgdHlwZTogJ2N4dGRyYWdvdXQnLFxuICAgICAgICAgICAgcG9zaXRpb246IHtcbiAgICAgICAgICAgICAgeDogbm93WzBdLFxuICAgICAgICAgICAgICB5OiBub3dbMV1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KTtcbiAgICAgICAgfVxuXG4gICAgICAgIHIudG91Y2hEYXRhLmN4dE92ZXIgPSBuZWFyO1xuXG4gICAgICAgIGlmIChuZWFyKSB7XG4gICAgICAgICAgbmVhci5lbWl0KHtcbiAgICAgICAgICAgIG9yaWdpbmFsRXZlbnQ6IGUsXG4gICAgICAgICAgICB0eXBlOiAnY3h0ZHJhZ292ZXInLFxuICAgICAgICAgICAgcG9zaXRpb246IHtcbiAgICAgICAgICAgICAgeDogbm93WzBdLFxuICAgICAgICAgICAgICB5OiBub3dbMV1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgfSAvLyBib3ggc2VsZWN0aW9uXG5cbiAgICB9IGVsc2UgaWYgKGNhcHR1cmUgJiYgZS50b3VjaGVzWzJdICYmIGN5LmJveFNlbGVjdGlvbkVuYWJsZWQoKSkge1xuICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgci5kYXRhLmJnQWN0aXZlUG9zaXN0aW9uID0gdW5kZWZpbmVkO1xuICAgICAgdGhpcy5sYXN0VGhyZWVUb3VjaCA9ICtuZXcgRGF0ZSgpO1xuXG4gICAgICBpZiAoIXIudG91Y2hEYXRhLnNlbGVjdGluZykge1xuICAgICAgICBjeS5lbWl0KHtcbiAgICAgICAgICBvcmlnaW5hbEV2ZW50OiBlLFxuICAgICAgICAgIHR5cGU6ICdib3hzdGFydCcsXG4gICAgICAgICAgcG9zaXRpb246IHtcbiAgICAgICAgICAgIHg6IG5vd1swXSxcbiAgICAgICAgICAgIHk6IG5vd1sxXVxuICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICB9XG5cbiAgICAgIHIudG91Y2hEYXRhLnNlbGVjdGluZyA9IHRydWU7XG4gICAgICByLnRvdWNoRGF0YS5kaWRTZWxlY3QgPSB0cnVlO1xuICAgICAgc2VsZWN0WzRdID0gMTtcblxuICAgICAgaWYgKCFzZWxlY3QgfHwgc2VsZWN0Lmxlbmd0aCA9PT0gMCB8fCBzZWxlY3RbMF0gPT09IHVuZGVmaW5lZCkge1xuICAgICAgICBzZWxlY3RbMF0gPSAobm93WzBdICsgbm93WzJdICsgbm93WzRdKSAvIDM7XG4gICAgICAgIHNlbGVjdFsxXSA9IChub3dbMV0gKyBub3dbM10gKyBub3dbNV0pIC8gMztcbiAgICAgICAgc2VsZWN0WzJdID0gKG5vd1swXSArIG5vd1syXSArIG5vd1s0XSkgLyAzICsgMTtcbiAgICAgICAgc2VsZWN0WzNdID0gKG5vd1sxXSArIG5vd1szXSArIG5vd1s1XSkgLyAzICsgMTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHNlbGVjdFsyXSA9IChub3dbMF0gKyBub3dbMl0gKyBub3dbNF0pIC8gMztcbiAgICAgICAgc2VsZWN0WzNdID0gKG5vd1sxXSArIG5vd1szXSArIG5vd1s1XSkgLyAzO1xuICAgICAgfVxuXG4gICAgICByLnJlZHJhd0hpbnQoJ3NlbGVjdCcsIHRydWUpO1xuICAgICAgci5yZWRyYXcoKTsgLy8gcGluY2ggdG8gem9vbVxuICAgIH0gZWxzZSBpZiAoY2FwdHVyZSAmJiBlLnRvdWNoZX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KCdkcmFnZnJlZW9uJyk7XG5cbiAgICAgICAgICAgIGRyYWdnZWRFbGVzLmVtaXQoJ2RyYWdmcmVlJyk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgY3kudmlld3BvcnQoe1xuICAgICAgICAgIHpvb206IHpvb20yLFxuICAgICAgICAgIHBhbjogcGFuMixcbiAgICAgICAgICBjYW5jZWxPbkZhaWxlZFpvb206IHRydWVcbiAgICAgICAgfSk7XG4gICAgICAgIGN5LmVtaXQoJ3BpbmNoem9vbScpO1xuICAgICAgICBkaXN0YW5jZTEgPSBkaXN0YW5jZTI7XG4gICAgICAgIGYxeDEgPSBmMXgyO1xuICAgICAgICBmMXkxID0gZjF5MjtcbiAgICAgICAgZjJ4MSA9IGYyeDI7XG4gICAgICAgIGYyeTEgPSBmMnkyO1xuICAgICAgICByLnBpbmNoaW5nID0gdHJ1ZTtcbiAgICAgIH0gLy8gUmUtcHJvamVjdFxuXG5cbiAgICAgIGlmIChlLnRvdWNoZXNbMF0pIHtcbiAgICAgICAgdmFyIHBvcyA9IHIucHJvamVjdEludG9WaWV3cG9ydChlLnRvdWNoZXNbMF0uY2xpZW50WCwgZS50b3VjaGVzWzBdLmNsaWVudFkpO1xuICAgICAgICBub3dbMF0gPSBwb3NbMF07XG4gICAgICAgIG5vd1sxXSA9IHBvc1sxXTtcbiAgICAgIH1cblxuICAgICAgaWYgKGUudG91Y2hlc1sxXSkge1xuICAgICAgICB2YXIgcG9zID0gci5wcm9qZWN0SW50b1ZpZXdwb3J0KGUudG91Y2hlc1sxXS5jbGllbnRYLCBlLnRvdWNoZXNbMV0uY2xpZW50WSk7XG4gICAgICAgIG5vd1syXSA9IHBvc1swXTtcbiAgICAgICAgbm93WzNdID0gcG9zWzFdO1xuICAgICAgfVxuXG4gICAgICBpZiAoZS50b3VjaGVzWzJdKSB7XG4gICAgICAgIHZhciBwb3MgPSByLnByb2plY3RJbnRvVmlld3BvcnQoZS50b3VjaGVzWzJdLmNsa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VzdFN0YXJ0ZWREcmFnKSB7XG4gICAgICAgICAgICBhZGROb2Rlc1RvRHJhZyhkcmFnZ2VkRWxlcywge1xuICAgICAgICAgICAgICBpbkRyYWdMYXllcjogdHJ1ZVxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgci5kcmFnRGF0YS5kaWREcmFnID0gdHJ1ZTtcbiAgICAgICAgICB2YXIgdG90YWxTaGlmdCA9IHtcbiAgICAgICAgICAgIHg6IDAsXG4gICAgICAgICAgICB5OiAwXG4gICAgICAgICAgfTtcblxuICAgICAgICAgIGlmIChudW1iZXIkMShkaXNwWzBdKSAmJiBudW1iZXIkMShkaXNwWzFdKSkge1xuICAgICAgICAgICAgdG90YWxTaGlmdC54ICs9IGRpc3BbMF07XG4gICAgICAgICAgICB0b3RhbFNoaWZ0LnkgKz0gZGlzcFsxXTtcblxuICAgICAgICAgICAgaWYgKGp1c3RTdGFydGVkRHJhZykge1xuICAgICAgICAgICAgICByLnJlZHJhd0hpbnQoJ2VsZXMnLCB0cnVlKTtcbiAgICAgICAgICAgICAgdmFyIGRyYWdEZWx0YSA9IHIudG91Y2hEYXRhLmRyYWdEZWx0YTtcblxuICAgICAgICAgICAgICBpZiAoZHJhZ0RlbHRhICYmIG51bWJlciQxKGRyYWdEZWx0YVswXSkgJiYgbnVtYmVyJDEoZHJhZ0RlbHRhWzFdKSkge1xuICAgICAgICAgICAgICAgIHRvdGFsU2hpZnQueCArPSBkcmFnRGVsdGFbMF07XG4gICAgICAgICAgICAgICAgdG90YWxTaGlmdC55ICs9IGRyYWdEZWx0YVsxXTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cblxuICAgICAgICAgIHIuaG92ZXJEYXRhLmRyYWdnaW5nRWxlcyA9IHRydWU7XG4gICAgICAgICAgZHJhZ2dlZEVsZXMuc2lsZW50U2hpZnQodG90YWxTaGlmdCkuZW1pdCgncG9zaXRpb24gZHJhZycpO1xuICA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VhciAhPSBsYXN0KSB7XG4gICAgICAgICAgaWYgKGxhc3QpIHtcbiAgICAgICAgICAgIGxhc3QuZW1pdCh7XG4gICAgICAgICAgICAgIG9yaWdpbmFsRXZlbnQ6IGUsXG4gICAgICAgICAgICAgIHR5cGU6ICd0YXBkcmFnb3V0JyxcbiAgICAgICAgICAgICAgcG9zaXRpb246IHtcbiAgICAgICAgICAgICAgICB4OiBub3dbMF0sXG4gICAgICAgICAgICAgICAgeTogbm93WzFdXG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGlmIChuZWFyKSB7XG4gICAgICAgICAgICBuZWFyLmVtaXQoe1xuICAgICAgICAgICAgICBvcmlnaW5hbEV2ZW50OiBlLFxuICAgICAgICAgICAgICB0eXBlOiAndGFwZHJhZ292ZXInLFxuICAgICAgICAgICAgICBwb3NpdGlvbjoge1xuICAgICAgICAgICAgICAgIHg6IG5vd1swXSxcbiAgICAgICAgICAgICAgICB5OiBub3dbMV1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgci50b3VjaERhdGEubGFzdCA9IG5lYXI7XG4gICAgICB9IC8vIGNoZWNrIHRvIGNhbmNlbCB0YXBob2xkXG5cbiAgICAgIGlmIChjYXB0dXJlKSB7XG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgbm93Lmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgaWYgKG5vd1tpXSAmJiByLnRvdWNoRGF0YS5zdGFydFBvc2l0aW9uW2ldICYmIGlzT3ZlclRocmVzaG9sZERyYWcpIHtcbiAgICAgICAgICAgIHIudG91Y2hEYXRhLnNpbmdsZVRvdWNoTW92ZWQgPSB0cnVlO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSAvLyBwYW5uaW5nXG5cblxuICAgICAgaWYgKGNhcHR1cmUgJiYgKHN0YXJ0ID09IG51bGwgfHwgc3RhcnQucGFubmFibGUoKSkgJiYgY3kucGFubmluZ0VuYWJsZWQoKSAmJiBjeS51c2VyUGFubmluZ0VuYWJsZWQoKSkge1xuICAgICAgICB2YXIgYWxsb3dQYXNzdGhyb3VnaCA9IGFsbG93UGFubmluZ1Bhc3N0aHJvdWdoKHN0YXJ0LCByLnRvdWNoRGF0YS5zdGFydHMpO1xuXG4gICAgICAgIGlmIChhbGxvd1Bhc3N0aHJvdWdoKSB7XG4gICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xuXG4gICAgICAgICAgaWYgKCFyLmRhdGEuYmdBY3RpdmVQb3Npc3Rpb24pIHtcbiAgICAgICAgICAgIHIuZGF0YS5iZ0FjdGl2ZVBvc2lzdGlvbiA9IGFycmF5MnBvaW50KHIudG91Y2hEYXRhLnN0YXJ0UG9zaXRpb24pO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGlmIChyLnN3aXBlUGFubmluZykge1xuICAgICAgICAgICAgY3kucGFuQnkoe1xuICAgICAgICAgICAgICB4OiBkaXNwWzBdICogem9vbSxcbiAgICAgICAgICAgICAgeTogZGlzcFsxXSAqIHpvb21cbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgY3kuZW1pdCgnZHJhZ3BhbicpO1xuICAgICAgICAgIH0gZWxzZSBpZiAoaXNPdmVyVGhyZXNob2xkRHJhZykge1xuICAgICAgICAgICAgci5zd2lwZVBhbm5pbmcgPSB0cnVlO1xuICAgICAgICAgICAgY3kucGFuQnkoe1xuICAgICAgICAgICAgICB4OiBkeCAqIHpvb20sXG4gICAgICAgICAgICAgIHk6IGR5ICogem9vbVxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBjeS5lbWl0KCdkcmFncGFuJyk7XG5cbiAgICAgICAgICAgIGlmIChzdGFydCkge1xuICAgICAgICAgICAgICBzdGFydC51bmFjdGl2YXRlKCk7XG4gICAgICAgICAgICAgIHIucmVkcmF3SGludCgnc2VsZWN0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Eubm93O1xuICAgIHZhciBlYXJsaWVyID0gci50b3VjaERhdGEuZWFybGllcjtcblxuICAgIGlmIChlLnRvdWNoZXNbMF0pIHtcbiAgICAgIHZhciBwb3MgPSByLnByb2plY3RJbnRvVmlld3BvcnQoZS50b3VjaGVzWzBdLmNsaWVudFgsIGUudG91Y2hlc1swXS5jbGllbnRZKTtcbiAgICAgIG5vd1swXSA9IHBvc1swXTtcbiAgICAgIG5vd1sxXSA9IHBvc1sxXTtcbiAgICB9XG5cbiAgICBpZiAoZS50b3VjaGVzWzFdKSB7XG4gICAgICB2YXIgcG9zID0gci5wcm9qZWN0SW50b1ZpZXdwb3J0KGUudG91Y2hlc1sxXS5jbGllbnRYLCBlLnRvdWNoZXNbMV0uY2xpZW50WSk7XG4gICAgICBub3dbMl0gPSBwb3NbMF07XG4gICAgICBub3dbM10gPSBwb3NbMV07XG4gICAgfVxuXG4gICAgaWYgKGUudG91Y2hlc1syXSkge1xuICAgICAgdmFyIHBvcyA9IHIucHJvamVjdEludG9WaWV3cG9ydChlLnRvdWNoZXNbMl0uY2xpZW50WCwgZS50b3VjaGVzWzJdLmNsaWVudFkpO1xuICAgICAgbm93WzRdID0gcG9zWzBdO1xuICAgICAgbm93WzVdID0gcG9zWzFdO1xuICAgIH1cblxuICAgIGlmIChzdGFydCkge1xuICAgICAgc3RhcnQudW5hY3RpdmF0ZSgpO1xuICAgIH1cblxuICAgIHZhciBjdHhUYXBlbmQ7XG5cbiAgICBpZiAoci50b3VjaERhdGEuY3h0KSB7XG4gICAgICBjdHhUYXBlbmQgPSB7XG4gICAgICAgIG9yaWdpbmFsRXZlbnQ6IGUsXG4gICAgICAgIHR5cGU6ICdjeHR0YXBlbmQnLFxuICAgICAgICBwb3NpdGlvbjoge1xuICAgICAgICAgIHg6IG5vd1swXSxcbiAgICAgICAgICB5OiBub3dbMV1cbiAgICAgICAgfVxuICAgICAgfTtcblxuICAgICAgaWYgKHN0YXJ0KSB7XG4gICAgICAgIHN0YXJ0LmV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gICAgICB5OiBub3dbMV1cbiAgICAgICAgfSk7XG4gICAgICAgIGRpZERvdWJsZVRvdWNoID0gZmFsc2U7XG5cbiAgICAgICAgaWYgKGUudGltZVN0YW1wIC0gcHJldlRvdWNoVGltZVN0YW1wIDw9IGN5Lm11bHRpQ2xpY2tEZWJvdW5jZVRpbWUoKSkge1xuICAgICAgICAgIHRvdWNoVGltZW91dCAmJiBjbGVhclRpbWVvdXQodG91Y2hUaW1lb3V0KTtcbiAgICAgICAgICBkaWREb3VibGVUb3VjaCA9IHRydWU7XG4gICAgICAgICAgcHJldlRvdWNoVGltZVN0YW1wID0gbnVsbDtcbiAgICAgICAgICB0cmlnZ2VyRXZlbnRzKHN0YXJ0LCBbJ2RibHRhcCcsICd2ZGJsY2xpY2snXSwgZSwge1xuICAgICAgICAgICAgeDogbm93WzBdLFxuICAgICAgICAgICAgeTogbm93WzFdXG4gICAgICAgICAgfSk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgdG91Y2hUaW1lb3V0ID0gc2V0VGltZW91dChmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgICBpZiAoZGlkRG91YmxlVG91Y2gpIHJldHVybjtcbiAgICAgICAgICAgIHRyaWdnZXJFdmVudHMoc3RhcnQsIFsnb25ldGFwJywgJ3ZvbmVjbGljayddLCBlLCB7XG4gICAgICAgICAgICAgIHg6IG5vd1swXSxcbiAgICAgICAgICAgICAgeTogbm93WzFdXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9LCBjeS5tdWx0aUNsaWNrRGVib3VuY2VUaW1lKCkpO1xuICAgICAgICAgIHByZXZUb3VjaFRpbWVTdGFtcCA9IGUudGltZVN0YW1wO1xuICAgICAgICB9XG4gICAgICB9IC8vIFByZXBhcmUgdG8gc2VsZWN0IHRoZSBjdXJyZW50bHkgdG91Y2hlZCBub2RlLCBvbmx5IGlmIGl0IGhhc24ndCBiZWVuIGRyYWdnZWQgcGFzdCBhIGNlcnRhaW4gZGlzdGFuY2V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G4gICAgICAgICAgeDogcHRzWzJdLFxuICAgICAgICAgIHk6IHB0c1szXVxuICAgICAgICB9LCB7XG4gICAgICAgICAgeDogcHRzWzRdLFxuICAgICAgICAgIHk6IHB0c1s1XVxuICAgICAgICB9LCB0MCk7XG4gICAgICAgIHZhciBtMSA9IHFiZXppZXJQdEF0KHtcbiAgICAgICAgICB4OiBwdHNbMF0sXG4gICAgICAgICAgeTogcHRzWzFdXG4gICAgICAgIH0sIHtcbiAgICAgICAgICB4OiBwdHNbMl0sXG4gICAgICAgICAgeTogcHRzWzNdXG4gICAgICAgIH0sIHtcbiAgICAgICAgICB4OiBwdHNbNF0sXG4gICAgICAgICAgeTogcHRzWzVdXG4gICAgICAgIH0sIHQxKTtcbiAgICAgICAgdmFyIG0yID0gcWJlemllclB0QXQoe1xuICAgICAgICAgIHg6IHB0c1swXSxcbiAgICAgICAgICB5OiBwdHNbMV1cbiAgICAgICAgfSwge1xuICAgICAgICAgIHg6IHB0c1syXSxcbiAgICAgICAgICB5OiBwdHNbM11cbiAgICAgICAgfSwge1xuICAgICAgICAgIHg6IHB0c1s0XSxcbiAgICAgICAgICB5OiBwdHNbNV1cbiAgICAgICAgfSwgdDIpO1xuICAgICAgICByZXR1cm4gW3B0c1swXSwgcHRzWzFdLCBtMC54LCBtMC55LCBtMS54LCBtMS55LCBtMi54LCBtMi55LCBwdHNbNF0sIHB0c1s1XV07XG4gICAgICB9O1xuXG4gICAgICB2YXIgcHRzID0gW10uY29uY2F0KGFwcHJveGltYXRlQmFycmVsQ3VydmVQdHMoYlB0cy50b3BMZWZ0KSwgYXBwcm94aW1hdGVCYXJyZWxDdXJ2ZVB0cyhiUHRzLnRvcFJpZ2h0KSwgYXBwcm94aW1hdGVCYXJyZWxDdXJ2ZVB0cyhiUHRzLmJvdHRvbVJpZ2h0KSwgYXBwcm94aW1hdGVCYXJyZWxDdXJ2ZVB0cyhiUHRzLmJvdHRvbUxlZnQpKTtcbiAgICAgIHJldHVybiBwb2x5Z29u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NUaW1lKSB7XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cblxuICAgICAgICAgIHZhciB0aGlzRGVxZCA9IG9wdHMuZGVxKHNlbGYsIHBpeGVsUmF0aW8sIGV4dGVudCk7XG5cbiAgICAgICAgICBpZiAodGhpc0RlcWQubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCB0aGlzRGVxZC5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICBkZXFkLnB1c2godGhpc0RlcWRbaV0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICB9XG4gICAgICAgIH0gLy8gY2FsbGJhY2tzIG9uIGRlcXVldWVcblxuXG4gICAgICAgIGlmIChkZXFkLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICBvcHRzLm9uRGVxZChzZWxmLCBkZXFkKTtcblxuICAgICAgICAgIGlmICghd2lsbERyYXcgJiYgb3B0cy5zaG91bGRSZWRyYXcoc2VsZiwgZGVxZCwgcGl4ZWxSYXRpbywgZXh0ZW50KSkge1xuICAgICAgICAgICAgcXVldWVSZWRyYXcoKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH07XG5cbiAgICAgIHZhciBwcmlvcml0eSA9IG9wdHMucHJpb3JpdHkgfHwgbm9vcCQxO1xuICAgICAgci5iZWZvcmVSZW5kZXIoZGVxdWV1ZSwgcHJpb3JpdHkoc2VsZikpO1xuICAgIH07XG4gIH1cbn07XG5cbi8vIFVzZXMga2V5cyBzbyBlbGVtZW50cyBtYXkgc2hhcmUgdGhlIHNhbWUgY2FjaGUuXG5cbnZhciBFbGVtZW50VGV4dHVyZUNhY2hlTG9va3VwID0gLyojX19QVVJFX18qL2Z1bmN0aW9uICgpIHtcbiAgZnVuY3Rpb24gRWxlbWVudFRleHR1cmVDYWNoZUxvb2t1cChnZX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xuXG4gICAgICAgIGlmIChjb250ZXh0LnNldExpbmVEYXNoKSB7XG4gICAgICAgICAgLy8gZm9yIHZlcnkgb3V0b2ZkYXRlIGJyb3dzZXJzXG4gICAgICAgICAgc3dpdGNoICh0ZXh0Qm9yZGVyU3R5bGUpIHtcbiAgICAgICAgICAgIGNhc2UgJ2RvdHRlZCc6XG4gICAgICAgICAgICAgIGNvbnRleHQuc2V0TGluZURhc2goWzEsIDFdKTtcbiAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgIGNhc2UgJ2Rhc2hlZCc6XG4gICAgICAgICAgICAgIGNvbnRleHQuc2V0TGluZURhc2goWzQsIDJdKTtcbiAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgIGNhc2UgJ2RvdWJsZSc6XG4gICAgICAgICAgICAgIGNvbnRleHQubGluZVdpZHRoID0gdGV4dEJvcmRlcldpZHRoIC8gNDsgLy8gNTAlIHJlc2VydmVkIGZvciB3aGl0ZSBiZXR3ZWVuIHRoZSB0d28gYm9yZGVyc1xuXG4gICAgICAgICAgICAgIGNvbnRleHQuc2V0TGluZURhc2goW10pO1xuICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgY2FzZSAnc29saWQnOlxuICAgICAgICAgICAgICBjb250ZXh0LnNldExpbmVEYXNoKFtdKTtcbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgY29udGV4dC5zdHJva2VSZWN0KGJnWCwgYmdZLCBiZ1csIGJnSCk7XG5cbiAgICAgICAgaWYgKHRleHRCb3JkZXJTdHlsZSA9PT0gJ2RvdWJsZScpIHtcbiAgICAgICAgICB2YXIgd2hpdGVXaWR0aCA9IHRleHRCb3JkZXJXaWR0aCAvIDI7XG4gICAgICAgICAgY29udGV4dC5zdHJva2VSZWN0KGJnWCArIHdoaXRlV2lkdGgsIGJnWSArIHdoaXRlV2lkdGgsIGJnVyAtIHdoaXRlV2lk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uZmlsbCgpO1xuICAgICAgfVxuICAgIH1cbiAgfTtcblxuICB2YXIgZHJhd0JvcmRlciA9IGZ1bmN0aW9uIGRyYXdCb3JkZXIoKSB7XG4gICAgaWYgKGJvcmRlcldpZHRoID4gMCkge1xuICAgICAgY29udGV4dC5saW5lV2lkdGggPSBib3JkZXJXaWR0aDtcbiAgICAgIGNvbnRleHQubGluZUNhcCA9ICdidXR0JztcblxuICAgICAgaWYgKGNvbnRleHQuc2V0TGluZURhc2gpIHtcbiAgICAgICAgLy8gZm9yIHZlcnkgb3V0b2ZkYXRlIGJyb3dzZXJzXG4gICAgICAgIHN3aXRjaCAoYm9yZGVyU3R5bGUpIHtcbiAgICAgICAgICBjYXNlICdkb3R0ZWQnOlxuICAgICAgICAgICAgY29udGV4dC5zZXRMaW5lRGFzaChbMSwgMV0pO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBjYXNlICdkYXNoZWQnOlxuICAgICAgICAgICAgY29udGV4dC5zZXRMaW5lRGFzaChbNCwgMl0pO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBjYXNlICdzb2xpZCc6XG4gICAgICAgICAgY2FzZSAnZG91YmxlJzpcbiAgICAgICAgICAgIGNvbnRleHQuc2V0TGluZURhc2goW10pO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgaWYgKHVzZVBhdGhzKSB7XG4gICAgICAgIGNvbnRleHQuc3Ryb2tlKHBhdGgpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgY29udGV4dC5zdHJva2UoKTtcbiAgICAgIH1cblxuICAgICAgaWYgKGJvcmRlclN0eWxlID09PSAnZG91YmxlJykge1xuICAgICAgICBjb250ZXh0LmxpbmVXaWR0aCA9IGJvcmRlcldpZHRoIC8gMztcbiAgICAgICAgdmFyIGdjbyA9IGNvbnRleHQuZ2xvYmFsQ29tcG9zaXRlT3BlcmF0aW9uO1xuICAgICAgICBjb250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UgaWYgKHJlY3RCLmdldFgoKSA8PSByZWN0QS5nZXRYKCkgJiYgcmVjdEIuZ2V0UmlnaHQoKSA+PSByZWN0QS5nZXRSaWdodCgpKSB7XG4gICAgLyogQ2FzZSB4LjI6XG4gICAgKlxuICAgICogcmVjdEJcbiAgICAqIFx0fCAgICAgICAgICAgICAgICAgICAgICAgfFxuICAgICogXHR8ICAgICAgICBfX19fX19fX18gICAgICB8XG4gICAgKiBcdHwgICAgICAgIHwgICAgICAgfCAgICAgIHxcbiAgICAqIFx0fF9fX19fX19ffF9fX19fX198X19fX19ffFxuICAgICogXHRcdFx0IHwgICAgICAgfFxuICAgICogICAgICAgICAgIHwgICAgICAgfFxuICAgICogICAgICAgIHJlY3RBXG4gICAgKi9cbiAgICBvdmVybGFwQW1vdW50WzBdICs9IE1hdGgubWluKHJlY3RBLmdldFgoKSAtIHJlY3RCLmdldFgoKSwgcmVjdEIuZ2V0UmlnaHQoKSAtIHJlY3RBLmdldFJpZ2h0KCkpO1xuICB9XG4gIGlmIChyZWN0QS5nZXRZKCkgPD0gcmVjdEIuZ2V0WSgpICYmIHJlY3RBLmdldEJvdHRvbSgpID49IHJlY3RCLmdldEJvdHRvbSgpKSB7XG4gICAgLyogQ2FzZSB5LjE6XG4gICAgICogICAgICAgICAgX19fX19fX18gcmVjdEFcbiAgICAgKiAgICAgICAgIHxcbiAgICAgKiAgICAgICAgIHxcbiAgICAgKiAgIF9fX19fX3xfX19fICByZWN0QlxuICAgICAqICAgICAgICAgfCAgICB8XG4gICAgICogICAgICAgICB8ICAgIHxcbiAgICAgKiAgIF9fX19fX3xfX19ffFxuICAgICAqICAgICAgICAgfFxuICAgICAqICAgICAgICAgfFxuICAgICAqICAgICAgICAgfF9fX19fX19fXG4gICAgICpcbiAgICAgKi9cbiAgICBvdmVybGFwQW1vdW50WzFdICs9IE1hdGgubWluKHJlY3RCLmdldFkoKSAtIHJlY3RBLmdldFkoKSwgcmVjdEEuZ2V0Qm90dG9tKCkgLSByZW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gIGNhc2UgMTpcbiAgICAgICAgICAgIHRlbXBQb2ludEF5ID0gdG9wTGVmdEF5O1xuICAgICAgICAgICAgdGVtcFBvaW50QXggPSBwMXggKyAtaGFsZkhlaWdodEEgLyBzbG9wZVByaW1lO1xuICAgICAgICAgICAgcmVzdWx0WzBdID0gdGVtcFBvaW50QXg7XG4gICAgICAgICAgICByZXN1bHRbMV0gPSB0ZW1wUG9pbnRBeTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgIHRlbXBQb2ludEF4ID0gYm90dG9tUmlnaHRBeDtcbiAgICAgICAgICAgIHRlbXBQb2ludEF5ID0gcDF5ICsgaGFsZldpZHRoQSAqIHNsb3BlUHJpbWU7XG4gICAgICAgICAgICByZXN1bHRbMF0gPSB0ZW1wUG9pbnRBeDtcbiAgICAgICAgICAgIHJlc3VsdFsxXSA9IHRlbXBQb2ludEF5O1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgdGVtcFBvaW50QXkgPSBib3R0b21MZWZ0QXk7XG4gICAgICAgICAgICB0ZW1wUG9pbnRBeCA9IHAxeCArIGhhbGZIZWlnaHRBIC8gc2xvcGVQcmltZTtcbiAgICAgICAgICAgIHJlc3VsdFswXSA9IHRlbXBQb2ludEF4O1xuICAgICAgICAgICAgcmVzdWx0WzFdID0gdGVtcFBvaW50QXk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICB0ZW1wUG9pbnRBeCA9IGJvdHRvbUxlZnRBeDtcbiAgICAgICAgICAgIHRlbXBQb2ludEF5ID0gcDF5ICsgLWhhbGZXaWR0aEEgKiBzbG9wZVByaW1lO1xuICAgICAgICAgICAgcmVzdWx0WzBdID0gdGVtcFBvaW50QXg7XG4gICAgICAgICAgICByZXN1bHRbMV0gPSB0ZW1wUG9pbnRBeTtcbiAgICAgICAgICAgIGJyZWFr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cbiAgICBfY3JlYXRlQ2xhc3MoUXVpY2tzb3J0LCBbe1xuICAgICAgICBrZXk6ICdfcXVpY2tzb3J0JyxcbiAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIF9xdWlja3NvcnQoQSwgcCwgcikge1xuICAgICAgICAgICAgaWYgKHAgPCByKSB7XG4gICAgICAgICAgICAgICAgdmFyIHEgPSB0aGlzLl9wYXJ0aXRpb24oQSwgcCwgcik7XG4gICAgICAgICAgICAgICAgdGhpcy5fcXVpY2tzb3J0KEEsIHAsIHEpO1xuICAgICAgICAgICAgICAgIHRoaXMuX3F1aWNrc29ydChBLCBxICsgMSwgcik7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9LCB7XG4gICAgICAgIGtleTogJ19wYXJ0aXRpb24nLFxuICAgICAgICB2YWx1ZTogZnVuY3Rpb24gX3BhcnRpdGlvbihBLCBwLCByKSB7XG4gICAgICAgICAgICB2YXIgeCA9IHRoaXMuX2dldChBLCBwKTtcbiAgICAgICAgICAgIHZhciBpID0gcDtcbiAgICAgICAgICAgIHZhciBqID0gcjtcbiAgICAgICAgICAgIHdoaWxlICh0cnVlKSB7XG4gICAgICAgICAgICAgICAgd2hpbGUgKHRoaXMuY29tcGFyZUZ1bmN0aW9uKHgsIHRoaXMuX2dldChBLCBqKSkpIHtcbiAgICAgICAgICAgICAgICAgICAgai0tO1xuICAgICAgICAgICAgICAgIH13aGlsZSAodGhpcy5jb21wYXJlRnVuY3Rpb24odGhpcy5fZ2V0KEEsIGkpLCB4KSkge1xuICAgICAgICAgICAgICAgICAgICBpKys7XG4gICAgICAgICAgICAgICAgfWlmIChpIDwgaikge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLl9zd2FwKEEsIGksIGopO1xuICAgICAgICAgICAgICAgICAgICBpKys7XG4gICAgICAgICAgICAgICAgICAgIGotLTtcbiAgICAgICAgICAgICAgICB9IGVsc2UgcmV0dXJuIGo7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cb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CgwLCBNYXRoLm1pbih0aGlzLm4gLSAyLCB0aGlzLm0pKTtcbiAgZm9yICh2YXIgayA9IDA7IGsgPCBNYXRoLm1heChuY3QsIG5ydCk7IGsrKykge1xuICAgIGlmIChrIDwgbmN0KSB7XG4gICAgICB0aGlzLnNba10gPSAwO1xuICAgICAgZm9yICh2YXIgaSA9IGs7IGkgPCB0aGlzLm07IGkrKykge1xuICAgICAgICB0aGlzLnNba10gPSBTVkQuaHlwb3QodGhpcy5zW2tdLCBBW2ldW2tdKTtcbiAgICAgIH1cbiAgICAgIDtcbiAgICAgIGlmICh0aGlzLnNba10gIT09IDAuMCkge1xuICAgICAgICBpZiAoQVtrXVtrXSA8IDAuMCkge1xuICAgICAgICAgIHRoaXMuc1trXSA9IC10aGlzLnNba107XG4gICAgICAgIH1cbiAgICAgICAgZm9yICh2YXIgX2kgPSBrOyBfaSA8IHRoaXMubTsgX2krKykge1xuICAgICAgICAgIEFbX2ldW2tdIC89IHRoaXMuc1trXTtcbiAgICAgICAgfVxuICAgICAgICA7XG4gICAgICAgIEFba11ba10gKz0gMS4wO1xuICAgICAgfVxuICAgICAgdGhpcy5zW2tdID0gLXRoaXMuc1trXTtcbiAgICB9XG4gICAgZm9yICh2YXIgaiA9IGsgKyAxOyBqIDwgdGhpcy5uOyBqKyspIHtcbiAgICAgIGlmIChmdW5jdGlvbiAobGhzLCByaHMpIHtcbiAgICAgICAgcmV0dXJuIGxocyAmJiByaHM7XG4gICAgICB9KGsgPCBuY3QsIHRoaXMuc1trXSAhPT0gMC4wKSkge1xuICAgICAgICB2YXIgdCA9IDA7XG4gICAgICAgIGZvciAodmFyIF9pMiA9IGs7IF9pMiA8IHRoaXMubTsgX2kyKyspIHtcbiAgICAgICAgICB0ICs9IEFbX2kyXVtrXSAqIEFbX2kyXVtqXTtcbiAgICAgICAgfVxuICAgICAgICA7XG4gICAgICAgIHQgPSAtdCAvIEFba11ba107XG4gICAgICAgIGZvciAodmFyIF9pMyA9IGs7IF9pMyA8IHRoaXMubTsgX2kzKyspIHtcbiAgICAgICAgICBBW19pM11bal0gKz0gdCAqIEFbX2kzXVtrXTtcbiAgICAgICAgfVxuICAgICAgICA7XG4gICAgICB9XG4gICAgICBlW2pdID0gQVtrXVtqXTtcbiAgICB9XG4gICAgO1xuICAgIGlmIChmdW5jdGlvbiAobGhzLCByaHMpIHtcbiAgICAgIHJldHVybiBsaHMgJiYgcmhzO1xuICAgIH0od2FudHUsIGsgPCBuY3QpKSB7XG4gICAgICBmb3IgKHZhciBfaTQgPSBrOyBfaTQgPCB0aGlzLm07IF9pNCsrKSB7XG4gICAgICAgIHRoaXMuVVtfaTRdW2tdID0gQVtfaTRdW2tdO1xuICAgICAgfVxuICAgICAgO1xuICAgIH1cbiAgICBpZiAoayA8IG5ydCkge1xuICAgICAgZVtrXSA9IDA7XG4gICAgICBmb3IgKHZhciBfaTUgPSBrICsgMTsgX2k1IDwgdGhpcy5uOyBfaTUrKykge1xuICAgICAgICBlW2tdID0gU1ZELmh5cG90KGVba10sIGVbX2k1XSk7XG4gICAgICB9XG4gICAgICA7XG4gICAgICBpZiAoZVtrXSAhPT0gMC4wKSB7XG4gICAgICAgIGlmIChlW2sgKyAxXSA8IDAuMCkge1xuICAgICAgICAgIGVba10gPSAtZVtrXTtcbiAgICAgICAgfVxuICAgICAgICBmb3IgKHZhciBfaTYgPSBrICsgMTsgX2k2IDwgdGhpcy5uOyBfaTYrKykge1xuICAgICAgICAgIGVbX2k2XSAvPSBlW2tdO1xuICAgICAgICB9XG4gICAgICAgIDtcbiAgICAgICAgZVtrICsgMV0gKz0gMS4wO1xuICAgICAgfVxuICAgICAgZVtrXSA9IC1lW2tdO1xuICAgICAgaWYgKGZ1bmN0aW9uIChsaHMsIHJocykge1xuICAgICAgICByZXR1cm4gbGhzICYmIHJocztcbiAgICAgIH0oayArIDEgPCB0aGlzLm0sIGVba10gIT09IDAuMCkpIHtcbiAgICAgICAgZm9yICh2YXIgX2k3ID0gayArIDE7IF9pNyA8IHRoaXMubTsgX2k3KyspIHtcbiAgICAgICAgICB3b3JrW19pN10gPSAwLjA7XG4gICAgICAgIH1cbiAgICAgICAgO1xuICAgICAgICBmb3IgKHZhciBfaiA9IGsgKyAxOyBfaiA8IHRoaXMubjsgX2orKykge1xuICAgICAgICAgIGZvciAodmFyIF9pOCA9IGsgKyAxOyBfaTggPCB0aGlzLm07IF9pOCsrKSB7XG4gICAgICAgICAgICB3b3JrW19pOF0gKz0gZVtfal0gKiBBW19pOF1bX2pdO1xuICAgICAgICAgIH1cbiAgICAgICAgICA7XG4gICAgICAgIH1cbiAgICAgICAgO1xuICAgICAgICBmb3IgKHZhciBfajIgPSBrICsgMTsgX2oyIDwgdGhpcy5uOyBfajIrKykge1xuICAgICAgICAgIHZhciBfdCA9IC1lW19qMl0gLyBlW2sgKyAxXTtcbiAgICAgICAgICBmb3IgKHZhciBfaTkgPSBrICsgMTsgX2k5IDwgdGhpcy5tOyBfaTkrKykge1xuICAgICAgICAgICAgQVtfaTldW19qMl0gKz0gX3QgKiB3b3JrW19pOV07XG4gICAgICAgICAgfVxuICAgICAgICAgIDtcbiAgICAgICAgfVxuICAgICAgICA7XG4gICAgICB9XG4gICAgICBpZiAod2FudHYpIHtcbiAgICAgICAgZm9yICh2YXIgX2kxMCA9IGsgKyAxOyBfaTEwIDwgdGhpcy5uOyBfaTEwKyspIHtcbiAgICAgICAgICB0aGlzLlZbX2kxMF1ba10gPSBlW19pMTBdO1xuICAgICAgICB9O1xuICAgICAgfVxuICAgIH1cbiAgfTtcbiAgdmFyIHAgPSBNYXRoLm1pbih0aGlzLm4sIHRoaXMubSArIDEpO1xuICBpZiAobmN0IDwgdGhpcy5uKSB7XG4gICAgdGhpcy5zW25jdF0gPSBBW25jdF1bbmN0XTtcbiAgfVxuICBpZiAodGhpcy5tIDwgcCkge1xuICAgIHRoaXMuc1twIC0gMV0gPSAwLjA7XG4gIH1cbiAgaWYgKG5ydCArIDEgPCBwKSB7XG4gICAgZVtucnRdID0gQVtucnRdW3AgLSAxXTtcbiAgfVxuICBlW3AgLSAxXSA9IDAuMDtcbiAgaWYgKHdhbnR1KSB7XG4gICAgZm9yICh2YXIgX2ozID0gbmN0OyBfajMgPCBudTsgX2ozKyspIHtcbiAgICAgIGZvciAodmFyIF9pMTEgPSAwOyBfaTExIDwgdGhpcy5tOyBfaTExKyspIHtcbiAgICAgICAgdGhpcy5VW19pMTFdW19qM10gPSAwLjA7XG4gICAgICB9XG4gICAgICA7XG4gICAgICB0aGlzLlVbX2ozXVtfajNdID0gMS4wO1xuICAgIH07XG4gICAgZm9yICh2YXIgX2sgPSBuY3QgLSAxOyBfayA+PSAwOyBfay0tKSB7XG4gICAgICBpZiAodGhpcy5zW19rXSAhPT0gMC4wKSB7XG4gICAgICAgIGZvciAodmFyIF9qNCA9IF9rICsgMTsgX2o0IDwgbnU7IF9qNCsrKSB7XG4gICAgICAgICAgdmFyIF90MiA9IDA7XG4gICAgICAgICAgZm9yICh2YXIgX2kxMiA9IF9rOyBfaTEyIDwgdGhpcy5tOyBfaTEyKyspIHtcbiAgICAgICAgICAgIF90MiArPSB0aGlzLlVbX2kxMl1bX2tdICogdGhpcy5VW19pMTJdW19qNF07XG4gICAgICAgICAgfTtcbiAgICAgICAgICBfdDIgPSAtX3QyIC8gdGhpcy5VW19rXVtfa107XG4gICAgICAgICAgZm9yICh2YXIgX2kxMyA9IF9rOyBfaTEzIDwgdGhpcy5tOyBfaTEzKyspIHtcbiAgICAgICAgICAgIHRoaXMuVVtfaTEzXVtfajRdICs9IF90MiAqIHRoaXMuVVtfaTEzXVtfa107XG4gICAgICAgICAgfTtcbiAgICAgICAgfTtcbiAgICAgICAgZm9yICh2YXIgX2kxNCA9IF9rOyBfaTE0IDwgdGhpcy5tOyBfaTE0KyspIHtcbiAgICAgICAgICB0aGlzLlVbX2kxNF1bX2tdID0gLXRoaXMuVVtfaTE0XVtfa107XG4gICAgICAgIH07XG4gICAgICAgIHRoaXMuVVtfa11bX2tdID0gMS4wICsgdGhpcy5VW19rXVtfa107XG4gICAgICAgIGZvciAodmFyIF9pMTUgPSAwOyBfaTE1IDwgX2sgLSAxOyBfaTE1KyspIHtcbiAgICAgICAgICB0aGlzLlVbX2kxNV1bX2tdID0gMC4wO1xuICAgICAgICB9O1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgZm9yICh2YXIgX2kxNiA9IDA7IF9pMTYgPCB0aGlzLm07IF9pMTYrKykge1xuICAgICAgICAgIHRoaXMuVVtfaTE2XVtfa10gPSAwLjA7XG4gICAgICAgIH07XG4gICAgICAgIHRoaXMuVVtfa11bX2tdID0gMS4wO1xuICAgICAgfVxuICAgIH07XG4gIH1cbiAgaWYgKHdhbnR2KSB7XG4gICAgZm9yICh2YXIgX2syID0gdGhpcy5uIC0gMTsgX2syID49IDA7IF9rMi0tKSB7XG4gICAgICBpZiAoZnVuY3Rpb24gKGxocywgcmhzKSB7XG4gICAgICAgIHJldHVybiBsaHMgJiYgcmhzO1xuICAgICAgfShfazIgPCBucnQsIGVbX2syXSAhPT0gMC4wKSkge1xuICAgICAgICBmb3IgKHZhciBfajUgPSBfazIgKyAxOyBfajUgPCBudTsgX2o1KyspIHtcbiAgICAgICAgICB2YXIgX3QzID0gMDtcbiAgICAgICAgICBmb3IgKHZhciBfaTE3ID0gX2syICsgMTsgX2kxNyA8IHRoaXMubjsgX2kxNysrKSB7XG4gICAgICAgICAgICBfdDMgKz0gdGhpcy5WW19pMTddW19rMl0gKiB0aGlzLlZbX2kxN11bX2o1XTtcbiAgICAgICAgICB9O1xuICAgICAgICAgIF90MyA9IC1fdDMgLyB0aGlzLlZbX2syICsgMV1bX2syXTtcbiAgICAgICAgICBmb3IgKHZhciBfaTE4ID0gX2syICsgMTsgX2kxOCA8IHRoaXMubjsgX2kxOCsrKSB7XG4gICAgICAgICAgICB0aGlzLlZbX2kxOF1bX2o1XSArPSBfdDMgKiB0aGlzLlZbX2kxOF1bX2syXTtcbiAgICAgICAgICB9O1xuICAgICAgICB9O1xuICAgICAgfVxuICAgICAgZm9yICh2YXIgX2kxOSA9IDA7IF9pMTkgPCB0aGlzLm47IF9pMTkrKykge1xuICAgICAgICB0aGlzLlZbX2kxOV1bX2syXSA9IDAuMDtcbiAgICAgIH07XG4gICAgICB0aGlzLlZbX2syXVtfazJdID0gMS4wO1xuICAgIH07XG4gIH1cbiAgdmFyIHBwID0gcCAtIDE7XG4gIHZhciBpdGVyID0gMDtcbiAgdmFyIGVwcyA9IE1hdGgucG93KDIuMCwgLTUyLjApO1xuICB2YXIgdGlueSA9IE1hdGgucG93KDIuMCwgLTk2Ni4wKTtcbiAgd2hpbGUgKHAgPiAwKSB7XG4gICAgdmFyIF9rMyA9IHZvaWQgMDtcbiAgICB2YXIga2FzZSA9IHZvaWQgMDtcbiAgICBmb3IgKF9rMyA9IHAgLSAyOyBfazMgPj0gLTE7IF9rMy0tKSB7XG4gICAgICBpZiAoX2szID09PSAtMSkge1xuICAgICAgICBicmVhaztcbiAgICAgIH1cbiAgICAgIGlmIChNYXRoLmFicyhlW19rM10pIDw9IHRpbnkgKyBlcHMgKiAoTWF0aC5hYnModGhpcy5zW19rM10pICsgTWF0aC5hYnModGhpcy5zW19rMyArIDFdKSkpIHtcbiAgICAgICAgZVtfazNdID0gMC4wO1xuICAgICAgICBicmVhaztcbiAgICAgIH1cbiAgICB9O1xuICAgIGlmIChfazMgPT09IHAgLSAyKSB7XG4gICAgICBrYXNlID0gNDtcbiAgICB9IGVsc2Uge1xuICAgICAgdmFyIGtzID0gdm9pZCAwO1xuICAgICAgZm9yIChrcyA9IHAgLSAxOyBrcyA+PSBfazM7IGtzLS0pIHtcbiAgICAgICAgaWYgKGtzID09PSBfazMpIHtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICB2YXIgX3Q0ID0gKGtzICE9PSBwID8gTWF0aC5hYnMoZVtrc10pIDogMC4wKSArIChrcyAhPT0gX2szICsgMSA/IE1hdGguYWJzKGVba3MgLSAxXSkgOiAwLjApO1xuICAgICAgICBpZiAoTWF0aC5hYnModGhpcy5zW2tzXSkgPD0gdGlueSArIGVwcyAqIF90NCkge1xuICAgICAgICAgIHRoaXMuc1trc10gPSAwLjA7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgIH07XG4gICAgICBpZiAoa3MgPT09IF9rMykge1xuICAgICAgICBrYXNlID0gMztcbiAgICAgIH0gZWxzZSBpZiAoa3MgPT09IHAgLSAxKSB7XG4gICAgICAgIGthc2UgPSAxO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAga2FzZSA9IDI7XG4gICAgICAgIF9rMyA9IGtzO1xuICAgICAgfVxuICAgIH1cbiAgICBfazMrKztcbiAgICBzd2l0Y2ggKGthc2UpIHtcbiAgICAgIGNhc2UgMTpcbiAgICAgICAge1xuICAgICAgICAgIHZhciBmID0gZVtwIC0gMl07XG4gICAgICAgICAgZVtwIC0gMl0gPSAwLjA7XG4gICAgICAgICAgZm9yICh2YXIgX2o2ID0gcCAtIDI7IF9qNiA+PSBfazM7IF9qNi0tKSB7XG4gICAgICAgICAgICB2YXIgX3Q1ID0gU1ZELmh5cG90KHRoaXMuc1tfajZdLCBmKTtcbiAgICAgICAgICAgIHZhciBjcyA9IHRoaXMuc1tfajZdIC8gX3Q1O1xuICAgICAgICAgICAgdmFyIHNuID0gZiAvIF90NTtcbiAgICAgICAgICAgIHRoaXMuc1tfajZdID0gX3Q1O1xuICAgICAgICAgICAgaWYgKF9qNiAhPT0gX2szKSB7XG4gICAgICAgICAgICAgIGYgPSAtc24gKiBlW19qNiAtIDFdO1xuICAgICAgICAgICAgICBlW19qNiAtIDFdID0gY3MgKiBlW19qNiAtIDFdO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHdhbnR2KSB7XG4gICAgICAgICAgICAgIGZvciAodmFyIF9pMjAgPSAwOyBfaTIwIDwgdGhpcy5uOyBfaTIwKyspIHtcbiAgICAgICAgICAgICAgICBfdDUgPSBjcyAqIHRoaXMuVltfaTIwXVtfajZdICsgc24gKiB0aGlzLlZbX2kyMF1bcCAtIDFdO1xuICAgICAgICAgICAgICAgIHRoaXMuVltfaTIwXVtwIC0gMV0gPSAtc24gKiB0aGlzLlZbX2kyMF1bX2o2XSArIGNzICogdGhpcy5WW19pMjBdW3AgLSAxXTtcbiAgICAgICAgICAgICAgICB0aGlzLlZbX2kyMF1bX2o2XSA9IF90NTtcbiAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9O1xuICAgICAgICB9O1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgMjpcbiAgICAgICAge1xuICAgICAgICAgIHZhciBfZiA9IGVbX2szIC0gMV07XG4gICAgICAgICAgZVtfazMgLSAxXSA9IDAuMDtcbiAgICAgICAgICBmb3IgKHZhciBfajcgPSBfazM7IF9qNyA8IHA7IF9qNysrKSB7XG4gICAgICAgICAgICB2YXIgX3Q2ID0gU1ZELmh5cG90KHRoaXMuc1tfajddLCBfZik7XG4gICAgICAgICAgICB2YXIgX2NzID0gdGhpcy5zW19qN10gLyBfdDY7XG4gICAgICAgICAgICB2YXIgX3NuID0gX2YgLyBfdDY7XG4gICAgICAgICAgICB0aGlzLnNbX2o3XSA9IF90NjtcbiAgICAgICAgICAgIF9mID0gLV9zbiAqIGVbX2o3XTtcbiAgICAgICAgICAgIGVbX2o3XSA9IF9jcyAqIGVbX2o3XTtcbiAgICAgICAgICAgIGlmICh3YW50dSkge1xuICAgICAgICAgICAgICBmb3IgKHZhciBfaTIxID0gMDsgX2kyMSA8IHRoaXMubTsgX2kyMSsrKSB7XG4gICAgICAgICAgICAgICAgX3Q2ID0gX2NzICogdGhpcy5VW19pMjFdW19qN10gKyBfc24gKiB0aGlzLlVbX2kyMV1bX2szIC0gMV07XG4gICAgICAgICAgICAgICAgdGhpcy5VW19pMjFdW19rMyAtIDFdID0gLV9zbiAqIHRoaXMuVVtfaTIxXVtfajddICsgX2NzICogdGhpcy5VW19pMjFdW19rMyAtIDFdO1xuICAgICAgICAgICAgICAgIHRoaXMuVVtfaTIxXVtfajddID0gX3Q2O1xuICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH07XG4gICAgICAgIH07XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSAzOlxuICAgICAgICB7XG4gICAgICAgICAgdmFyIHNjYWxlID0gTWF0aC5tYXgoTWF0aC5tYXgoTWF0aC5tYXgoTWF0aC5tYXgoTWF0aC5hYnModGhpcy5zW3AgLSAxXSksIE1hdGguYWJzKHRoaXMuc1twIC0gMl0pKSwgTWF0aC5hYnMoZVtwIC0gMl0pKSwgTWF0aC5hYnModGhpcy5zW19rM10pKSwgTWF0aC5hYnMoZVtfazNdKSk7XG4gICAgICAgICAgdmFyIHNwID0gdGhpcy5zW3AgLSAxXSAvIHNjYWxlO1xuICAgICAgICAgIHZhciBzcG0xID0gdGhpcy5zW3AgLSAyXSAvIHNjYWxlO1xuICAgICAgICAgIHZhciBlcG0xID0gZVtwIC0gMl0gLyBzY2FsZTtcbiAgICAgICAgICB2YXIgc2sgPSB0aGlzLnNbX2szXSAvIHNjYWxlO1xuICAgICAgICAgIHZhciBlayA9IGVbX2szXSAvIHNjYWxlO1xuICAgICAgICAgIHZhciBiID0gKChzcG0xICsgc3ApICogKHNwbTEgLSBzcCkgKyBlcG0xICogZXBtMSkgLyAyLjA7XG4gICAgICAgICAgdmFyIGMgPSBzcCAqIGVwbTEgKiAoc3AgKiBlcG0xKTtcbiAgICAgICAgICB2YXIgc2hpZnQgPSAwLjA7XG4gICAgICAgICAgaWYgKGZ1bmN0aW9uIChsaHMsIHJocykge1xuICAgICAgICAgICAgcmV0dXJuIGxocyB8fCByaHM7XG4gICAgICAgICAgfShiICE9PSAwLjAsIGMgIT09IDAuMCkpIHtcbiAgICAgICAgICAgIHNoaWZ0ID0gTWF0aC5zcXJ0KGIgKiBiICsgYyk7XG4gICAgICAgICAgICBpZiAoYiA8IDAuMCkge1xuICAgICAgICAgICAgICBzaGlmdCA9IC1zaGlmdDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHNoaWZ0ID0gYyAvIChiICsgc2hpZnQpO1xuICAgICAgICAgIH1cbiAgICAgICAgICB2YXIgX2YyID0gKHNrICsgc3ApICogKHNrIC0gc3ApICsgc2hpZnQ7XG4gICAgICAgICAgdmFyIGcgPSBzayAqIGVrO1xuICAgICAgICAgIGZvciAodmFyIF9qOCA9IF9rMzsgX2o4IDwgcCAtIDE7IF9qOCsrKSB7XG4gICAgICAgICAgICB2YXIgX3Q3ID0gU1ZELmh5cG90KF9mMiwgZyk7XG4gICAgICAgICAgICB2YXIgX2NzMiA9IF9mMiAvIF90NztcbiAgICAgICAgICAgIHZhciBfc24yID0gZyAvIF90NztcbiAgICAgICAgICAgIGlmIChfajggIT09IF9rMykge1xuICAgICAgICAgICAgICBlW19qOCAtIDFdID0gX3Q3O1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgX2YyID0gX2NzMiAqIHRoaXMuc1tfajhdICsgX3NuMiAqIGVbX2o4XTtcbiAgICAgICAgICAgIGVbX2o4XSA9IF9jczIgKiBlW19qOF0gLSBfc24yICogdGhpcy5zW19qOF07XG4gICAgICAgICAgICBnID0gX3NuMiAqIHRoaXMuc1tfajggKyAxXTtcbiAgICAgICAgICAgIHRoaXMuc1tfajggKyAxXSA9IF9jczIgKiB0aGlzLnNbX2o4ICsgMV07XG4gICAgICAgICAgICBpZiAod2FudHYpIHtcbiAgICAgICAgICAgICAgZm9yICh2YXIgX2kyMiA9IDA7IF9pMjIgPCB0aGlzLm47IF9pMjIrKykge1xuICAgICAgICAgICAgICAgIF90NyA9IF9jczIgKiB0aGlzLlZbX2kyMl1bX2o4XSArIF9zbjIgKiB0aGlzLlZbX2kyMl1bX2o4ICsgMV07XG4gICAgICAgICAgICAgICAgdGhpcy5WW19pMjJdW19qOCArIDFdID0gLV9zbjIgKiB0aGlzLlZbX2kyMl1bX2o4XSArIF9jczIgKiB0aGlzLlZbX2kyMl1bX2o4ICsgMV07XG4gICAgICAgICAgICAgICAgdGhpcy5WW19pMjJdW19qOF0gPSBfdDc7XG4gICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBfdDcgPSBTVkQuaHlwb3QoX2YyLCBnKTtcbiAgICAgICAgICAgIF9jczIgPSBfZjIgLyBfdDc7XG4gICAgICAgICAgICBfc24yID0gZyAvIF90NztcbiAgICAgICAgICAgIHRoaXMuc1tfajhdID0gX3Q3O1xuICAgICAgICAgICAgX2YyID0gX2NzMiAqIGVbX2o4XSArIF9zbjIgKiB0aGlzLnNbX2o4ICsgMV07XG4gICAgICAgICAgICB0aGlzLnNbX2o4ICsgMV0gPSAtX3NuMiAqIGVbX2o4XSArIF9jczIgKiB0aGlzLnNbX2o4ICsgMV07XG4gICAgICAgICAgICBnID0gX3NuMiAqIGVbX2o4ICsgMV07XG4gICAgICAgICAgICBlW19qOCArIDFdID0gX2NzMiAqIGVbX2o4ICsgMV07XG4gICAgICAgICAgICBpZiAod2FudHUgJiYgX2o4IDwgdGhpcy5tIC0gMSkge1xuICAgICAgICAgICAgICBmb3IgKHZhciBfaTIzID0gMDsgX2kyMyA8IHRoaXMubTsgX2kyMysrKSB7XG4gICAgICAgICAgICAgICAgX3Q3ID0gX2NzMiAqIHRoaXMuVVtfaTIzXVtfajhdICsgX3NuMiAqIHRoaXMuVVtfaTIzXVtfajggKyAxXTtcbiAgICAgICAgICAgICAgICB0aGlzLlVbX2kyM11bX2o4ICsgMV0gPSAtX3NuMiAqIHRoaXMuVVtfaTIzXVtfajhdICsgX2NzMiAqIHRoaXMuVVtfaTIzXVtfajggKyAxXTtcbiAgICAgICAgICAgICAgICB0aGlzLlVbX2kyM11bX2o4XSA9IF90NztcbiAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9O1xuICAgICAgICAgIGVbcCAtIDJdID0gX2YyO1xuICAgICAgICAgIGl0ZXIgPSBpdGVyICsgMTtcbiAgICAgICAgfTtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlIDQ6XG4gICAgICAgIHtcbiAgICAgICAgICBpZiAodGhpcy5zW19rM10gPD0gMC4wKSB7XG4gICAgICAgICAgICB0aGlzLnNbX2szXSA9IHRoaXMuc1tfazNdIDwgMC4wID8gLXRoaXMuc1tfazNdIDogMC4wO1xuICAgICAgICAgICAgaWYgKHdhbnR2KSB7XG4gICAgICAgICAgICAgIGZvciAodmFyIF9pMjQgPSAwOyBfaTI0IDw9IHBwOyBfaTI0KyspIHtcbiAgICAgICAgICAgICAgICB0aGlzLlZbX2kyNF1bX2szXSA9IC10aGlzLlZbX2kyNF1bX2szXTtcbiAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgICAgd2hpbGUgKF9rMyA8IHBwKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5zW19rM10gPj0gdGhpcy5zW19rMyArIDFdKSB7XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdmFyIF90OCA9IHRoaXMuc1tfazNdO1xuICAgICAgICAgICAgdGhpcy5zW19rM10gPSB0aGlzLnNbX2szICsgMV07XG4gICAgICAgICAgICB0aGlzLnNbX2szICsgMV0gPSBfdDg7XG4gICAgICAgICAgICBpZiAod2FudHYgJiYgX2szIDwgdGhpcy5uIC0gMSkge1xuICAgICAgICAgICAgICBmb3IgKHZhciBfaTI1ID0gMDsgX2kyNSA8IHRoaXMubjsgX2kyNSsrKSB7XG4gICAgICAgICAgICAgICAgX3Q4ID0gdGhpcy5WW19pMjVdW19rMyArIDFdO1xuICAgICAgICAgICAgICAgIHRoaXMuVltfaTI1XVtfazMgKyAxXSA9IHRoaXMuVltfaTI1XVtfazNdO1xuICAgICAgICAgICAgICAgIHRoaXMuVltfaTI1XVtfazNdID0gX3Q4O1xuICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHdhbnR1ICYmIF9rMyA8IHRoaXMubSAtIDEpIHtcbiAgICAgICAgICAgICAgZm9yICh2YXIgX2kyNiA9IDA7IF9pMjYgPCB0aGlzLm07IF9pMjYrKykge1xuICAgICAgICAgICAgICAgIF90OCA9IHRoaXMuVVtfaTI2XVtfazMgKyAxXTtcbiAgICAgICAgICAgICAgICB0aGlzLlVbX2kyNl1bX2szICsgMV0gPSB0aGlzLlVbX2kyNl1bX2szXTtcbiAgICAgICAgICAgICAgICB0aGlzLlVbX2kyNl1bX2szXSA9IF90ODtcbiAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIF9rMysrO1xuICAgICAgICAgIH07XG4gICAgICAgICAgaXRlciA9IDA7XG4gICAgICAgICAgcC0tO1xuICAgICAgICB9O1xuICAgICAgICBicmVhaztcbiAgICB9XG4gIH07XG4gIHZhciByZXN1bHQgPSB7IFU6IHRoaXMuVSwgVjogdGhpcy5WLCBTOiB0aGlzLnMgfTtcbiAgcmV0dXJuIHJlc3VsdDtcbn07XG5cbi8vIHNxcnQoYV4yICsgYl4yKSB3aXRob3V0IHVuZGVyL292ZXJmbG93LlxuU1ZELmh5cG90ID0gZnVuY3Rpb24gKGEsIGIpIHtcbiAgdmFyIHIgPSB2b2lkIDA7XG4gIGlmIChNYXRoLmFicyhhKSA+IE1hdGguYWJzKGIpKSB7XG4gICAgciA9IGIgLyBhO1xuICAgIHIgPSBNYXRoLmFicyhhKSAqIE1hdGguc3FydCgxICsgciAqIHIpO1xuICB9IGVsc2UgaWYgKGIgIT0gMCkge1xuICAgIHIgPSBhIC8gYjtcbiAgICByID0gTWF0aC5hYnMoYikgKiBNYXRoLnNxcnQoMSArIHIgKiByKTtcbiAgfSBlbHNlIHtcbiAgICByID0gMC4wO1xuICB9XG4gIHJldHVybiByO1xufTtcblxubW9kdWxlLmV4cG9ydHMgPSBTVkQ7XG5cbi8qKiovIH0pLFxuLyogMjcgKi9cbi8qKiovIChmdW5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BbGlnbm1lbnRzLnB1c2goeyBwb3M6IFtjdXJyZW50LnBvc1swXSAtIDEsIGN1cnJlbnQucG9zWzFdIC0gMV0sXG4gICAgICAgICAgICAgICAgICAgICAgICBzZXExOiB0aGlzLnNlcXVlbmNlMVtjdXJyZW50LnBvc1swXSAtIDFdICsgY3VycmVudC5zZXExLFxuICAgICAgICAgICAgICAgICAgICAgICAgc2VxMjogdGhpcy5zZXF1ZW5jZTJbY3VycmVudC5wb3NbMV0gLSAxXSArIGN1cnJlbnQuc2VxMlxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKGRpcmVjdGlvbnNbMV0pIHtcbiAgICAgICAgICAgICAgICAgICAgaW5Qcm9jZXNzQWxpZ25tZW50cy5wdXNoKHsgcG9zOiBbY3VycmVudC5wb3NbMF0gLSAxLCBjdXJyZW50LnBvc1sxXV0sXG4gICAgICAgICAgICAgICAgICAgICAgICBzZXExOiB0aGlzLnNlcXVlbmNlMVtjdXJyZW50LnBvc1swXSAtIDFdICsgY3VycmVudC5zZXExLFxuICAgICAgICAgICAgICAgICAgICAgICAgc2VxMjogJy0nICsgY3VycmVudC5zZXEyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoZGlyZWN0aW9uc1syXSkge1xuICAgICAgICAgICAgICAgICAgICBpblByb2Nlc3NBbGlnbm1lbnRzLnB1c2goeyBwb3M6IFtjdXJyZW50LnBvc1swXSwgY3VycmVudC5wb3NbMV0gLSAxXSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlcTE6ICctJyArIGN1cnJlbnQuc2VxMSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlcTI6IHRoaXMuc2VxdWVuY2UyW2N1cnJlbnQucG9zWzFdIC0gMV0gKyBjdXJyZW50LnNlcTJcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKGN1cnJlbnQucG9zWzBdID09PSAwICYmIGN1cnJlbnQucG9zWzFdID09PSAwKSB0aGlzLmFsaWdubWVudHMucHVzaCh7IHNlcXVlbmNlMTogY3VycmVudC5zZXExLFxuICAgICAgICAgICAgICAgICAgICBzZXF1ZW5jZTI6IGN1cnJlbnQuc2VxMlxuICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgaW5Qcm9jZXNzQWxpZ25tZW50cy5zaGlmdCgpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZXR1cm4gdGhpcy5hbGlnbm1lbnRzO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gSGVscGVyIEZ1bmN0aW9uc1xuXG4gICAgfSwge1xuICAgICAgICBrZXk6IFwiZ2V0QWxsSW5kZXhlc1wiLFxuICAgICAgICB2YWx1ZTogZnVuY3Rpb24gZ2V0QWxsSW5kZXhlcyhhcnIsIHZhbCkge1xuICAgICAgICAgICAgdmFyIGluZGV4ZXMgPSBbXSxcbiAgICAgICAgICAgICAgICBpID0gLTE7XG4gICAgICAgICAgICB3aGlsZSAoKGkgPSBhcnIuaW5kZXhPZih2YWwsIGkgKyAxKSkgIT09IC0xKSB7XG4gICAgICAgICAgICAgICAgaW5kZXhlcy5wdXNoKGkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIGluZGV4ZXM7XG4gICAgICAgIH1cbiAgICB9LCB7XG4gICAgICAgIGtleTogXCJhcnJheUFsbE1heEluZGV4ZXNcIixcbiAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIGFycmF5QWxsTWF4SW5kZXhlcyhhcnJheSkge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuZ2V0QWxsSW5kZXhlcyhhcnJheSwgTWF0aC5tYXguYXBwbHkobnVsbCwgYXJyYXkpKTtcbiAgICAgICAgfVxuICAgIH1dKTtcblxuICAgIHJldHVybiBOZWVkbG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koX2xlbjMgPiAxID8gX2xlbjMgLSAxIDogMCksIF9rZXkzID0gMTsgX2tleTMgPCBfbGVuMzsgX2tleTMrKykge1xuICAgICAgICAgICAgICBhcmdzW19rZXkzIC0gMV0gPSBhcmd1bWVudHNbX2tleTNdO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZXR1cm4gY3VzdG9tU3R5bGluZy5hcHBseSh2b2lkIDAsIFttZXJnZXIoc3R5bGluZykoe1xuICAgICAgICAgICAgICBjbGFzc05hbWU6IGRlZmF1bHRTdHlsaW5nXG4gICAgICAgICAgICB9KV0uY29uY2F0KGFyZ3MpKTtcbiAgICAgICAgICB9O1xuXG4gICAgICAgIGNhc2UgJ29iamVjdCc6XG4gICAgICAgICAgcmV0dXJuIGZ1bmN0aW9uIChzdHlsaW5nKSB7XG4gICAgICAgICAgICBmb3IgKHZhciBfbGVuNCA9IGFyZ3VtZW50cy5sZW5ndGgsIGFyZ3MgPSBuZXcgQXJyYXkoX2xlbjQgPiAxID8gX2xlbjQgLSAxIDogMCksIF9rZXk0ID0gMTsgX2tleTQgPCBfbGVuNDsgX2tleTQrKykge1xuICAgICAgICAgICAgICBhcmdzW19rZXk0IC0gMV0gPSBhcmd1bWVudHNbX2tleTRdO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZXR1cm4gY3VzdG9tU3R5bGluZy5hcHBseSh2b2lkIDAsIFttZXJnZXIoc3R5bGluZykoe1xuICAgICAgICAgICAgICBzdHlsZTogZGVmYXVsdFN0eWxpbmdcbiAgICAgICAgICAgIH0pXS5jb25jYXQoYXJncykpO1xuICAgICAgICAgIH07XG5cbiAgICAgICAgY2FzZSAnZnVuY3Rpb24nOlxuICAgICAgICAgIHJldHVybiBmdW5jdGlvbiAoc3R5bGluZykge1xuICAgICAgICAgICAgZm9yICh2YXIgX2xlbjUgPSBhcmd1bWVudHMubGVuZ3RoLCBhcmdzID0gbmV3IEFycmF5KF9sZW41ID4gMSA/IF9sZW41IC0gMSA6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ICB9XG4gICAgICB9O1xuICAgIH0sXG4gICAgYXJyb3c6IGZ1bmN0aW9uIGFycm93KF9yZWYzLCBub2RlVHlwZSwgZXhwYW5kZWQpIHtcbiAgICAgIHZhciBzdHlsZSA9IF9yZWYzLnN0eWxlO1xuICAgICAgcmV0dXJuIHtcbiAgICAgICAgc3R5bGU6IF9vYmplY3RTcHJlYWQoX29iamVjdFNwcmVhZCh7fSwgc3R5bGUpLCB7fSwge1xuICAgICAgICAgIG1hcmdpbkxlZnQ6IDAsXG4gICAgICAgICAgdHJhbnNpdGlvbjogJzE1MG1zJyxcbiAgICAgICAgICBXZWJraXRUcmFuc2l0aW9uOiAnMTUwbXMnLFxuICAgICAgICAgIE1velRyYW5zaXRpb246ICcxNTBtcycsXG4gICAgICAgICAgV2Via2l0VHJhbnNmb3JtOiBleHBhbmRlZCA/ICdyb3RhdGVaKDkwZGVnKScgOiAncm90YXRlWigwZGVnKScsXG4gICAgICAgICAgTW96VHJhbnNmb3JtOiBleHBhbmRlZCA/ICdyb3RhdGVaKDkwZGVnKScgOiAncm90YXRlWigwZGVnKScsXG4gICAgICAgICAgdHJhbnNmb3JtOiBleHBhbmRlZCA/ICdyb3RhdGVaKDkwZGVnKScgOiAncm90YXRlWigwZGVnKScsXG4gICAgICAgICAgdHJhbnNmb3JtT3JpZ2luOiAnNDUlIDUwJScsXG4gICAgICAgICAgV2Via2l0VHJhbnNmb3JtT3JpZ2luOiAnNDUlIDUwJScsXG4gICAgICAgICAgTW96VHJhbnNmb3JtT3JpZ2luOiAnNDUlIDUwJScsXG4gICAgICAgICAgcG9zaXRpb246ICdyZWxhdGl2ZScsXG4gICAgICAgICAgbGluZUhlaWdodDogJzEuMWVtJyxcbiAgICAgICAgICBmb250U2l6ZTogJzAuNzVlbSdcbiAgICAgICAgfSlcbiAgICAgIH07XG4gICAgfSxcbiAgICBhcnJvd0NvbnRhaW5lcjogZnVuY3Rpb24gYXJyb3dDb250YWluZXIoX3JlZjQsIGFycm93U3R5bG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cbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChmcm9tIDw9IGlkeCkge1xuICAgICAgICAgIGlmIChpc01hcCAmJiBBcnJheS5pc0FycmF5KGl0ZW0pKSB7XG4gICAgICAgICAgICBpZiAodHlwZW9mIGl0ZW1bMF0gPT09ICdzdHJpbmcnIHx8IHR5cGVvZiBpdGVtWzBdID09PSAnbnVtYmVyJykge1xuICAgICAgICAgICAgICBlbnRyaWVzLnB1c2goe1xuICAgICAgICAgICAgICAgIGtleTogaXRlbVswXSxcbiAgICAgICAgICAgICAgICB2YWx1ZTogaXRlbVsxXVxuICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIGVudHJpZXMucHVzaCh7XG4gICAgICAgICAgICAgICAga2V5OiBcIltlbnRyeSBcIi5jb25jYXQoaWR4LCBcIl1cIiksXG4gICAgICAgICAgICAgICAgdmFsdWU6IHtcbiAgICAgICAgICAgICAgICAgICdba2V5XSc6IGl0ZW1bMF0sXG4gICAgICAgICAgICAgICAgICAnW3ZhbHVlXSc6IGl0ZW1bMV1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBlbnRyaWVzLnB1c2goe1xuICAgICAgICAgICAgICBrZXk6IGlkeCxcbiAgICAgICAgICAgICAgdmFsdWU6IGl0ZW1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGlkeCsrO1xuICAgICAgfVxuICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgX2l0ZXJhdG9yLmUoZXJyKTtcbiAgICB9IGZpbmFsbHkge1xuICAgICAgX2l0ZXJhdG9yLmYoKTtcbiAgICB9XG5cbiAgICByZXMgPSB7XG4gICAgICBoYXNNb3JlOiAhZG9uZSxcbiAgICAgIGVudHJpZXM6I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IF90aGlzMiA9IHRoaXM7XG5cbiAgICAgIGlmIChbJ3RoZW1lJywgJ2ludmVydFRoZW1lJ10uZmluZChmdW5jdGlvbiAoaykge1xuICAgICAgICByZXR1cm4gbmV4dFByb3BzW2tdICE9PSBfdGhpczIucHJvcHNba107XG4gICAgICB9KSkge1xuICAgICAgICB0aGlzLnNldFN0YXRlKGdldFN0YXRlRnJvbVByb3BzKG5leHRQcm9wcykpO1xuICAgICAgfVxuICAgIH1cbiAgfSwge1xuICAgIGtleTogXCJzaG91bGRDb21wb25lbnRVcGRhdGVcIixcbiAgICB2YWx1ZTogZnVuY3Rpb24gc2hvdWxkQ29tcG9uZW50VXBkYXRlKG5leHRQcm9wcykge1xuICAgICAgdmFyIF90aGlzMyA9IHRoaXM7XG5cbiAgICAgIHJldHVybiAhIU9iamVjdC5rZXlzKG5leHRQcm9wcykuZmluZChmdW5jdGlvbiAoaykge1xuICAgICAgICByZXR1cm4gayA9PT0gJ2tleVBhdGgnID8gbmV4dFByb3BzW2tdLmpvaW4oJy8nKSAhPT0gX3RoaXMzLnByb3BzW2tdLmpvaW4oJy8nKSA6IG5leHRQcm9wc1trXSAhPT0gX3RoaXMzLnByb3BzW2tdO1xuICAgICAgfSk7XG4gICAgfVxuICB9LCB7XG4gICAga2V5OiBcInJlbmRlclwiLFxuICAgIHZhbHVlOiBmdW5jdGlvbiByZW5kZXIoKSB7XG4gICAgICB2YXIgX3RoaXMkcHJvcHMgPSB0aGlzLnByb3BzLFxuICAgICAgICAgIHZhbHVlID0gX3RoaXMkcHJvcHMuZGF0YSxcbiAgICAgICAgICBrZXlQYXRoID0gX3RoaXMkcHJvcHMua2V5UGF0aCxcbiAgICAgICAgICBwb3N0cHJvY2Vzc1ZhbHVlID0gX3RoaXMkcHJvcHMucG9zdHByb2Nlc3NWYWx1ZSxcbiAgICAgICAgICBoaWRlUm9vdCA9IF90aGlzJHByb3BzLmhpZGVSb290LFxuICAgICAgICAgIHRoZW1lID0gX3RoaXMkcHJvc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3Iga2V5cywgbWFwcGVkIHRvIGFycmF5cyBvZiBlbGVtZW50c1xuICogICAgICAgICB0aGF0IHByb2R1Y2VkIHRoYXQga2V5IHdoZW4gcGFzc2VkIHRvIGBmbmAuXG4gKiBAc2VlIFIucmVkdWNlQnksIFIudHJhbnNkdWNlLCBSLmluZGV4QnksIFIuY29sbGVjdEJ5XG4gKiBAZXhhbXBsZVxuICpcbiAqICAgICAgY29uc3QgYnlHcmFkZSA9IFIuZ3JvdXBCeShmdW5jdGlvbihzdHVkZW50KSB7XG4gKiAgICAgICAgY29uc3Qgc2NvcmUgPSBzdHVkZW50LnNjb3JlO1xuICogICAgICAgIHJldHVybiBzY29yZSA8IDY1ID8gJ0YnIDpcbiAqICAgICAgICAgICAgICAgc2NvcmUgPCA3MCA/ICdEJyA6XG4gKiAgICAgICAgICAgICAgIHNjb3JlIDwgODAgPyAnQycgOlxuICogICAgICAgICAgICAgICBzY29yZSA8IDkwID8gJ0InIDogJ0EnO1xuICogICAgICB9KTtcbiAqICAgICAgY29uc3Qgc3R1ZGVudHMgPSBbe25hbWU6ICdBYmJ5Jywgc2NvcmU6IDg0fSxcbiAqICAgICAgICAgICAgICAgICAgICAgIHtuYW1lOiAnRWRkeScsIHNjb3JlOiA1OH0sXG4gKiAgICAgICAgICAgICAgICAgICAgICAvLyAuLi5cbiAqICAgICAgICAgICAgICAgICAgICAgIHtuYW1lOiAnSmFjaycsIHNjb3JlOiA2OX1dO1xuICogICAgICBieUdyYWRlKHN0dWRlbnRzKTtcbiAqICAgICAgLy8ge1xuICogICAgICAvLyAgICdBJzogW3tuYW1lOiAnRGlhbm5lJywgc2NvcmU6IDk5fV0sXG4gKiAgICAgIC8vICAgJ0InOiBbe25hbWU6ICdBYmJ5Jywgc2NvcmU6IDg0fV1cbiAqICAgICAgLy8gICAvLyAuLi4sXG4gKiAgICAgIC8vICAgJ0YnOiBbe25hbWU6ICdFZGR5Jywgc2NvcmU6IDU4fV1cbiAqICAgICAgLy8gfVxuICov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AgICAgIH1cblxuICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICghX2luY2x1ZGVzKGl0ZW0sIHNldC5faXRlbXNbdHlwZV0pKSB7XG4gICAgICAgICAgaWYgKHNob3VsZEFkZCkge1xuICAgICAgICAgICAgc2V0Ll9pdGVtc1t0eXBlXS5wdXNoKGl0ZW0pO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgfVxuXG4gICAgY2FzZSAndW5kZWZpbmVkJzpcbiAgICAgIGlmIChzZXQuX2l0ZW1zW3R5cGVdKSB7XG4gICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgaWYgKHNob3VsZEFkZCkge1xuICAgICAgICAgIHNldC5faXRlbXNbdHlwZV0gPSB0cnVlO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgfVxuXG4gICAgY2FzZSAnb2JqZWN0JzpcbiAgICAgIGlmIChpdGVtID09PSBudWxsKSB7XG4gICAgICAgIGlmICghc2V0Ll9pdGVtc1snbnVsbCddKSB7XG4gICAgICAgICAgaWYgKHNob3VsZEFkZCkge1xuICAgICAgICAgICAgc2V0Ll9pdGVtc1snbnVsbCddID0gdHJ1ZTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgIH1cblxuICAgIC8qIGZhbGxzIHRocm91Z2ggKi9cblxuICAgIGRlZmF1bHQ6XG4gICAgICAvLyByZWR1Y2UgdGhlIHNlYXJjaCBzaXplIG9mIGhldGVyb2dlbmVvdXMgc2V0cyBieSBjcmVhdGluZyBidWNrZXRzXG4gICAgICAvLyBmb3IgZWFjaCB0eXBlLlxuICAgICAgdHlwZSA9IE9iam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l0ZW0gPT09IDAgJiYgMSAvIGl0ZW0gPT09IGluZikge1xuICAgICAgICAgICAgICByZXR1cm4gaWR4O1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZHggKz0gMTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICByZXR1cm4gLTE7XG4gICAgICAgIH0gZWxzZSBpZiAoYSAhPT0gYSkge1xuICAgICAgICAgIC8vIE5hTlxuICAgICAgICAgIHdoaWxlIChpZHggPCBsaXN0Lmxlbmd0aCkge1xuICAgICAgICAgICAgaXRlbSA9IGxpc3RbaWR4XTtcblxuICAgICAgICAgICAgaWYgKHR5cGVvZiBpdGVtID09PSAnbnVtYmVyJyAmJiBpdGVtICE9PSBpdGVtKSB7XG4gICAgICAgICAgICAgIHJldHVybiBpZHg7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlkeCArPSAxO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIHJldHVybiAtMTtcbiAgICAgICAgfSAvLyBub24temVybyBudW1iZXJzIGNhbiB1dGlsaXNlIFNldFxuXG5cbiAgICAgICAgcmV0dXJuIGxpc3QuaW5kZXhPZihhLCBpZHgpO1xuICAgICAgLy8gYWxsIHRoZXNlIHR5cGVzIGNhbiB1dGlsaXNlIFNldFxuXG4gICAgICBjYXNlICdzdHJpbmcnOlxuICAgICAgY2FzZSAnYm9vbGVhbic6XG4gICAgICBjYXNlICdmdW5jdGlvbic6XG4gICAgICBjYXNlICd1bmRlZmluZWQnOlxuICAgICAgICByZXR1cm4gbGlzdC5pbmRleE9mKGEsIGlkeCk7XG5cbiAgICAgIGNhc2UgJ29iamVjdCc6XG4gICAgICAgIGlmIChhID09PSBudWxsKSB7XG4gICAgICAgICAgLy8gbnVsbCBjYW4gdXRpbGlzZSBTZXRcbiAgICAgICAgICByZXR1cm4gbGlzdC5pbmRleE9mKGEsIGlkeCk7XG4gICAgICAgIH1cblxuICAgIH1cbiAgfSAvLyBhbnl0aGluZyBlbHNlIG5vdCBj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