@sassoftware/restaf 5.3.3-6 → 5.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/restaf.js CHANGED
@@ -2536,7 +2536,7 @@ eval("/* harmony import */ var _fixImages__WEBPACK_IMPORTED_MODULE_0__ = __webpa
2536
2536
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2537
2537
 
2538
2538
  "use strict";
2539
- eval("/* WEBPACK VAR INJECTION */(function(Buffer) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return trustedGrant; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return keepAlive; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return request; });\n/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/typeof */ \"../../../node_modules/@babel/runtime/helpers/typeof.js\");\n/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"../../../node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! axios */ \"../../../node_modules/axios/index.js\");\n/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! qs */ \"../../../node_modules/qs/lib/index.js\");\n/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(qs__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _fixResponse__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./fixResponse */ \"./serverCalls/fixResponse.js\");\n/* harmony import */ var https__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! https */ \"../../../node_modules/https-browserify/index.js\");\n/* harmony import */ var https__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(https__WEBPACK_IMPORTED_MODULE_5__);\n\n\nfunction 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; }\nfunction _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) { _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(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; }\n/* eslint-disable no-prototype-builtins */\n/*------------------------------------------------------------------------------------\r\n Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights reserved Licensed under the Apache License, Version 2.0 (the \"License\");\r\n you may not use this file except in compliance with the License.\r\n You may obtain a copy of the License at\r\n\r\n http://www.apache.org/licenses/LICENSE-2.0\r\n\r\n Unless required by applicable law or agreed to in writing, software\r\n distributed under the License is distributed on an \"AS IS\" BASIS,\r\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n See the License for the specific language governing permissions and\r\n limitations under the License.\r\n ---------------------------------------------------------------------------------------*/\n\n\n\n\n\n\n// axios.defaults.withCredentials = true\naxios__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"].interceptors.response.use(function (response) {\n return response;\n}, function (error) {\n return Promise.reject(error);\n});\n\n/* X-Uaa-Csrf */\nfunction trustedGrant(iconfig) {\n var link = iconfig.link;\n var auth1 = Buffer.from(iconfig.clientID + \":\" + iconfig.clientSecret).toString(\"base64\");\n debugger;\n auth1 = \"Basic \" + auth1;\n var baseUrl = patchURL4ns(iconfig, link.href);\n var config = {\n method: link.method,\n baseURL: baseUrl,\n url: link.href,\n /*iconfig.host + link.href,*/\n\n headers: {\n Accept: link.responseType,\n \"Content-Type\": link.type /* Axios seems to be case sensitive */,\n Authorization: auth1\n },\n withCredentials: false,\n data: {\n grant_type: \"password\",\n username: iconfig.user,\n password: iconfig.password\n },\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n transformResponse: function transformResponse(data) {\n return data;\n },\n transformRequest: function transformRequest(data) {\n return qs__WEBPACK_IMPORTED_MODULE_3___default.a.stringify(data);\n }\n };\n var storeConfig = {\n protocol: 'https://',\n sslOption: {}\n };\n //TBD: Need to update the whole flow to be consistent with the storeConfig\n return makeCall(config, iconfig, config);\n}\nfunction request(iconfig) {\n \"use strict\";\n\n var link = iconfig.link,\n logonInfo = iconfig.logonInfo;\n var iLink = _objectSpread({}, link);\n var payload = iconfig.hasOwnProperty(\"payload\") ? iconfig.payload : null;\n var iqs = null;\n var idata = null;\n var iheaders = null;\n var ixsrf = null;\n var casAction = null;\n debugger;\n if (payload !== null) {\n casAction = hasItem(payload, \"action\");\n iqs = hasItem(payload, \"qs\");\n idata = hasItem(payload, \"data\");\n iheaders = hasItem(payload, \"headers\");\n ixsrf = hasItem(payload, \"xsrf\");\n }\n var baseUrl = patchURL4ns(logonInfo, iLink.href);\n // let url = `${l}${iLink.href}`;\n\n // handle casaction upload\n casAction = casAction != null ? casAction.toLowerCase() : null;\n var url = casAction !== null ? \"\".concat(iLink.href, \"/\").concat(casAction) : \"\".concat(iLink.href);\n if (iLink.hasOwnProperty(\"customHandling\") && casAction !== null) {\n // casAction = casAction.toLowerCase();\n if (casAction === \"table.upload\") {\n iLink.method = \"PUT\";\n iLink.type = \"application/octet-stream\";\n iLink.responseType = \"application/json\";\n }\n }\n var config = {\n method: iLink.method,\n baseURL: baseUrl,\n url: url,\n transformResponse: function transformResponse(data) {\n return data;\n },\n validateStatus: function validateStatus(status) {\n /* 304 for state calls */\n debugger;\n return status === 302 || status === 304 || status >= 200 && status < 300;\n }\n };\n config.headers = {};\n if (logonInfo.token !== null) {\n config.headers['Authorization'] = logonInfo.tokenType + \" \" + logonInfo.token;\n } else {\n config.withCredentials = iconfig.withCredentials == null ? true : iconfig.withCredentials;\n }\n var type = fullType(iLink.type);\n if (iLink.hasOwnProperty(\"responseType\")) {\n if (type !== null) {\n config.headers[\"Content-Type\"] = type;\n }\n config.headers.Accept = fullType(iLink.responseType);\n } else if (type !== null) {\n config.headers.Accept = type;\n if (iLink.method === \"PUT\" || iLink.method === \"POST\" || iLink.method === \"PATCH\") {\n config.headers[\"Content-Type\"] = type;\n }\n }\n if (iheaders !== null) {\n for (var ih in iheaders) {\n //noinspection JSUnfilteredForInLoop\n if (ih.toLowerCase() === \"json-parameters\") {\n //noinspection JSUnfilteredForInLoop\n config.headers[ih] = _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default()(iheaders[ih]) === \"object\" ? JSON.stringify(iheaders[ih]) : iheaders[ih];\n } else {\n //noinspection JSUnfilteredForInLoop\n config.headers[ih] = iheaders[ih];\n }\n }\n }\n if (ixsrf !== null) {\n /* TBD: fix parallel calls to get of this conditional */\n var xsrfHeaderName = ixsrf[\"x-csrf-header\"];\n if (xsrfHeaderName != null) {\n config.xsrfCookieName = null;\n config.xsrfHeaderName = xsrfHeaderName;\n // https://github.com/axios/axios/issues/2024\n config.headers[xsrfHeaderName] = ixsrf[xsrfHeaderName];\n }\n if (ixsrf[\"tkhttp-id\"] != null) {\n config.headers[\"tkhttp-id\"] = ixsrf[\"tkhttp-id\"];\n }\n } else {\n if (config.type === 'ADD_SERVICE') {\n config.xsrfHeaderName = 'X_CSRF_TOKEN';\n config.headers['X-CSRF-TOKEN'] = \"Fetch\";\n }\n }\n if (iqs !== null) {\n config.params = _objectSpread({}, iqs);\n }\n config.data = idata === null ? {} : idata;\n config.maxContentLength = 2 * 10063256;\n var httpOptions = iconfig.storeConfig.httpOptions;\n if (httpOptions != null) {\n for (var k in httpOptions) {\n config[k] = httpOptions[k];\n }\n }\n setupProxy(iconfig, config);\n return makeCall(config, iconfig, logonInfo);\n}\n// setup if using reverse proxy server\nfunction setupProxy(iconfig, config) {\n var options = iconfig.logonInfo.options;\n if (options != null && options.proxyServer != null) {\n var proxy = options.proxy;\n if (proxy.pathname != null && proxy.pathname.trim().length > 0) {\n config.url = \"\".concat(proxy.pathname).concat(config.url); //prepend url with proxy path\n }\n config.baseURL = \"\".concat(proxy.protocol, \"//\").concat(proxy.host); //override base url\n }\n}\n// patch the url for namespace - useful for k8s to make calls into another namespace\nfunction patchURL4ns(logInfo, link) {\n var host = logInfo.host;\n if (logInfo.options != null && logInfo.options.ns != null) {\n var service = link.split(\"/\")[1];\n host = \"\".concat(logInfo.protocol).concat(service, \".{logInfo.options.ns}.svc.cluster.local\");\n }\n return host;\n}\nfunction makeCall(config, iconfig, storeConfig) {\n if (storeConfig.protocol === \"https://\" && config.agent == null) {\n var opt = storeConfig.sslOptions != null ? storeConfig.sslOptions : {};\n var agent = new https__WEBPACK_IMPORTED_MODULE_5___default.a.Agent(opt);\n config.httpsAgent = agent;\n }\n return new Promise(function (resolve, reject) {\n Object(axios__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(config).then(function (response) {\n parseJSON(response.data).then(function (data) {\n iconfig.data = null; /* get rid of the payload*/\n response.data = {\n results: data,\n iconfig: Object.assign({}, iconfig)\n };\n if (data.hasOwnProperty(\"errorCode\")) {\n //noinspection JSUnresolvedVariable\n response.status = response.data.results.httpStatusCode;\n response.statusText = \"errorCode: \".concat(response.data.results.errorCode);\n reject({\n response: response\n });\n } else {\n resolve(Object(_fixResponse__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(response));\n }\n }).catch(function () {\n iconfig.data = null;\n response.data = {\n results: response.data,\n iconfig: Object.assign({}, iconfig)\n };\n resolve(Object(_fixResponse__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(response));\n });\n }).catch(function (error) {\n reject(error);\n });\n });\n}\nfunction parseJSON(data) {\n //noinspection JSUnusedLocalSymbols\n return new Promise(function (resolve, reject) {\n if (_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default()(data) === \"object\") {\n resolve(data);\n } else {\n var temp = data.replace(/\\r?\\n|\\r/g, \" \");\n try {\n var odata = JSON.parse(temp);\n resolve(odata);\n } catch (err) {\n resolve(data);\n }\n }\n });\n}\nfunction hasItem(payload, name) {\n for (var _i = 0, _Object$keys = Object.keys(payload); _i < _Object$keys.length; _i++) {\n var k = _Object$keys[_i];\n if (k.toUpperCase() === name.toUpperCase()) {\n return payload[k];\n }\n }\n return null;\n}\nfunction fullType(type) {\n var ntype = type;\n if (ntype === undefined || ntype === null) {\n ntype = null;\n } else {\n if (ntype.indexOf(\"application/vnd\") !== -1) {\n if (ntype.indexOf(\"+json\") === -1) {\n ntype = ntype + \"+json\";\n }\n }\n }\n return ntype;\n}\n\n// Code below is for experimenting.\n\nfunction keepAlive(action) {\n return Object(axios__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(action.payload);\n}\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/buffer/index.js */ \"../../../node_modules/buffer/index.js\").Buffer))\n\n//# sourceURL=webpack://restaf/./serverCalls/index.js?");
2539
+ eval("/* WEBPACK VAR INJECTION */(function(Buffer) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return trustedGrant; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return keepAlive; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return request; });\n/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/typeof */ \"../../../node_modules/@babel/runtime/helpers/typeof.js\");\n/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"../../../node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! axios */ \"../../../node_modules/axios/index.js\");\n/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! qs */ \"../../../node_modules/qs/lib/index.js\");\n/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(qs__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _fixResponse__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./fixResponse */ \"./serverCalls/fixResponse.js\");\n/* harmony import */ var https__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! https */ \"../../../node_modules/https-browserify/index.js\");\n/* harmony import */ var https__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(https__WEBPACK_IMPORTED_MODULE_5__);\n\n\nfunction 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; }\nfunction _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) { _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(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; }\n/* eslint-disable no-prototype-builtins */\n/*------------------------------------------------------------------------------------\r\n Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights reserved Licensed under the Apache License, Version 2.0 (the \"License\");\r\n you may not use this file except in compliance with the License.\r\n You may obtain a copy of the License at\r\n\r\n http://www.apache.org/licenses/LICENSE-2.0\r\n\r\n Unless required by applicable law or agreed to in writing, software\r\n distributed under the License is distributed on an \"AS IS\" BASIS,\r\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n See the License for the specific language governing permissions and\r\n limitations under the License.\r\n ---------------------------------------------------------------------------------------*/\n\n\n\n\n\n\n// axios.defaults.withCredentials = true\naxios__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"].interceptors.response.use(function (response) {\n return response;\n}, function (error) {\n return Promise.reject(error);\n});\n\n/* X-Uaa-Csrf */\nfunction trustedGrant(iconfig) {\n var link = iconfig.link;\n var auth1 = Buffer.from(iconfig.clientID + \":\" + iconfig.clientSecret).toString(\"base64\");\n debugger;\n auth1 = \"Basic \" + auth1;\n var baseUrl = patchURL4ns(iconfig, link.href);\n var config = {\n method: link.method,\n baseURL: baseUrl,\n url: link.href,\n /*iconfig.host + link.href,*/\n\n headers: {\n Accept: link.responseType,\n \"Content-Type\": link.type /* Axios seems to be case sensitive */,\n Authorization: auth1\n },\n withCredentials: false,\n data: {\n grant_type: \"password\",\n username: iconfig.user,\n password: iconfig.password\n },\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n transformResponse: function transformResponse(data) {\n return data;\n },\n transformRequest: function transformRequest(data) {\n return qs__WEBPACK_IMPORTED_MODULE_3___default.a.stringify(data);\n }\n };\n var storeConfig = {\n protocol: 'https://',\n sslOption: {}\n };\n //TBD: Need to update the whole flow to be consistent with the storeConfig\n return makeCall(config, iconfig, config);\n}\nfunction request(iconfig) {\n \"use strict\";\n\n var link = iconfig.link,\n logonInfo = iconfig.logonInfo;\n var iLink = _objectSpread({}, link);\n var payload = iconfig.hasOwnProperty(\"payload\") ? iconfig.payload : null;\n var iqs = null;\n var idata = null;\n var iheaders = null;\n var ixsrf = null;\n var casAction = null;\n debugger;\n if (payload !== null) {\n casAction = hasItem(payload, \"action\");\n iqs = hasItem(payload, \"qs\");\n idata = hasItem(payload, \"data\");\n iheaders = hasItem(payload, \"headers\");\n ixsrf = hasItem(payload, \"xsrf\");\n }\n var baseUrl = patchURL4ns(logonInfo, iLink.href);\n // let url = `${l}${iLink.href}`;\n\n // handle casaction upload\n casAction = casAction != null ? casAction.toLowerCase() : null;\n var url = casAction !== null ? \"\".concat(iLink.href, \"/\").concat(casAction) : \"\".concat(iLink.href);\n if (iLink.hasOwnProperty(\"customHandling\") && casAction !== null) {\n // casAction = casAction.toLowerCase();\n if (casAction === \"table.upload\") {\n iLink.method = \"PUT\";\n iLink.type = \"application/octet-stream\";\n iLink.responseType = \"application/json\";\n }\n }\n var config = {\n method: iLink.method,\n baseURL: baseUrl,\n url: url,\n transformResponse: function transformResponse(data) {\n return data;\n },\n validateStatus: function validateStatus(status) {\n /* 304 for state calls */\n debugger;\n return status === 302 || status === 304 || status >= 200 && status < 300;\n }\n };\n config.headers = {};\n if (logonInfo.token !== null) {\n config.headers['Authorization'] = logonInfo.tokenType + \" \" + logonInfo.token;\n } else {\n config.withCredentials = iconfig.withCredentials == null ? true : iconfig.withCredentials;\n }\n var type = fullType(iLink.type);\n if (iLink.hasOwnProperty(\"responseType\")) {\n if (type !== null) {\n config.headers[\"Content-Type\"] = type;\n }\n config.headers.Accept = fullType(iLink.responseType);\n } else if (type !== null) {\n config.headers.Accept = type;\n if (iLink.method === \"PUT\" || iLink.method === \"POST\" || iLink.method === \"PATCH\") {\n config.headers[\"Content-Type\"] = type;\n }\n }\n if (iheaders !== null) {\n for (var ih in iheaders) {\n //noinspection JSUnfilteredForInLoop\n if (ih.toLowerCase() === \"json-parameters\") {\n //noinspection JSUnfilteredForInLoop\n config.headers[ih] = _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default()(iheaders[ih]) === \"object\" ? JSON.stringify(iheaders[ih]) : iheaders[ih];\n } else {\n //noinspection JSUnfilteredForInLoop\n config.headers[ih] = iheaders[ih];\n }\n }\n }\n if (ixsrf !== null) {\n /* TBD: fix parallel calls to get of this conditional */\n var xsrfHeaderName = ixsrf[\"x-csrf-header\"];\n if (xsrfHeaderName != null) {\n config.xsrfCookieName = null;\n config.xsrfHeaderName = xsrfHeaderName;\n // https://github.com/axios/axios/issues/2024\n config.headers[xsrfHeaderName] = ixsrf[xsrfHeaderName];\n }\n if (ixsrf[\"tkhttp-id\"] != null) {\n config.headers[\"tkhttp-id\"] = ixsrf[\"tkhttp-id\"];\n }\n } else {\n if (config.type === 'ADD_SERVICE') {\n config.xsrfHeaderName = 'X_CSRF_TOKEN';\n config.headers['X-CSRF-TOKEN'] = \"Fetch\";\n }\n }\n if (iqs !== null) {\n config.params = _objectSpread({}, iqs);\n }\n config.data = idata === null ? {} : idata;\n config.maxContentLength = 2 * 10063256;\n // let httpOptions = (iconfig.storeConfig.config != null ? iconfig.storeConfig.config.httpOptions : null);\n\n /*\r\n let httpOptions = iconfig.storeConfig.httpOptions;\r\n if (httpOptions != null) {\r\n for (let k in httpOptions) {\r\n config[k] = httpOptions[k];\r\n }\r\n }\r\n */\n setupProxy(iconfig, config);\n return makeCall(config, iconfig, logonInfo);\n}\n// setup if using reverse proxy server\nfunction setupProxy(iconfig, config) {\n var options = iconfig.logonInfo.options;\n if (options != null && options.proxyServer != null) {\n var proxy = options.proxy;\n if (proxy.pathname != null && proxy.pathname.trim().length > 0) {\n config.url = \"\".concat(proxy.pathname).concat(config.url); //prepend url with proxy path\n }\n config.baseURL = \"\".concat(proxy.protocol, \"//\").concat(proxy.host); //override base url\n }\n}\n// patch the url for namespace - useful for k8s to make calls into another namespace\nfunction patchURL4ns(logInfo, link) {\n var host = logInfo.host;\n if (logInfo.options != null && logInfo.options.ns != null) {\n var service = link.split(\"/\")[1];\n host = \"\".concat(logInfo.protocol).concat(service, \".{logInfo.options.ns}.svc.cluster.local\");\n }\n return host;\n}\nfunction makeCall(config, iconfig, storeConfig) {\n if (storeConfig.protocol === \"https://\" && config.agent == null) {\n // let opt = storeConfig.sslOptions != null ? storeConfig.sslOptions : {};\n var opts = iconfig.storeConfig.httpOptions != null ? iconfig.storeConfig.httpOptions : {};\n var agent = new https__WEBPACK_IMPORTED_MODULE_5___default.a.Agent(opts);\n config.httpsAgent = agent;\n }\n return new Promise(function (resolve, reject) {\n Object(axios__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(config).then(function (response) {\n parseJSON(response.data).then(function (data) {\n iconfig.data = null; /* get rid of the payload*/\n response.data = {\n results: data,\n iconfig: Object.assign({}, iconfig)\n };\n if (data.hasOwnProperty(\"errorCode\")) {\n //noinspection JSUnresolvedVariable\n response.status = response.data.results.httpStatusCode;\n response.statusText = \"errorCode: \".concat(response.data.results.errorCode);\n reject({\n response: response\n });\n } else {\n resolve(Object(_fixResponse__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(response));\n }\n }).catch(function () {\n iconfig.data = null;\n response.data = {\n results: response.data,\n iconfig: Object.assign({}, iconfig)\n };\n resolve(Object(_fixResponse__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(response));\n });\n }).catch(function (error) {\n reject(error);\n });\n });\n}\nfunction parseJSON(data) {\n //noinspection JSUnusedLocalSymbols\n return new Promise(function (resolve, reject) {\n if (_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default()(data) === \"object\") {\n resolve(data);\n } else {\n var temp = data.replace(/\\r?\\n|\\r/g, \" \");\n try {\n var odata = JSON.parse(temp);\n resolve(odata);\n } catch (err) {\n resolve(data);\n }\n }\n });\n}\nfunction hasItem(payload, name) {\n for (var _i = 0, _Object$keys = Object.keys(payload); _i < _Object$keys.length; _i++) {\n var k = _Object$keys[_i];\n if (k.toUpperCase() === name.toUpperCase()) {\n return payload[k];\n }\n }\n return null;\n}\nfunction fullType(type) {\n var ntype = type;\n if (ntype === undefined || ntype === null) {\n ntype = null;\n } else {\n if (ntype.indexOf(\"application/vnd\") !== -1) {\n if (ntype.indexOf(\"+json\") === -1) {\n ntype = ntype + \"+json\";\n }\n }\n }\n return ntype;\n}\n\n// Code below is for experimenting.\n\nfunction keepAlive(action) {\n return Object(axios__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(action.payload);\n}\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node_modules/buffer/index.js */ \"../../../node_modules/buffer/index.js\").Buffer))\n\n//# sourceURL=webpack://restaf/./serverCalls/index.js?");
2540
2540
 
2541
2541
  /***/ }),
2542
2542
 
@@ -1,4 +1,4 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("restaf",[],e):"object"==typeof exports?exports.restaf=e():t.restaf=e()}(window,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=58)}([function(t,e,r){"use strict";(function(t,n){var o=r(21);const{toString:i}=Object.prototype,{getPrototypeOf:a}=Object,{iterator:u,toStringTag:s}=Symbol,c=(f=Object.create(null),t=>{const e=i.call(t);return f[e]||(f[e]=e.slice(8,-1).toLowerCase())});var f;const l=t=>(t=t.toLowerCase(),e=>c(e)===t),p=t=>e=>typeof e===t,{isArray:h}=Array,d=p("undefined");const y=l("ArrayBuffer");const v=p("string"),g=p("function"),m=p("number"),_=t=>null!==t&&"object"==typeof t,b=t=>{if("object"!==c(t))return!1;const e=a(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||s in t||u in t)},w=l("Date"),O=l("File"),S=l("Blob"),E=l("FileList"),j=l("URLSearchParams"),[x,A,k,T]=["ReadableStream","Request","Response","Headers"].map(l);function P(t,e,{allOwnKeys:r=!1}={}){if(null==t)return;let n,o;if("object"!=typeof t&&(t=[t]),h(t))for(n=0,o=t.length;n<o;n++)e.call(null,t[n],n,t);else{const o=r?Object.getOwnPropertyNames(t):Object.keys(t),i=o.length;let a;for(n=0;n<i;n++)a=o[n],e.call(null,t[a],a,t)}}function R(t,e){e=e.toLowerCase();const r=Object.keys(t);let n,o=r.length;for(;o-- >0;)if(n=r[o],e===n.toLowerCase())return n;return null}const I="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:Object({}),C=t=>!d(t)&&t!==I;const L=(M="undefined"!=typeof Uint8Array&&a(Uint8Array),t=>M&&t instanceof M);var M;const D=l("HTMLFormElement"),N=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),U=l("RegExp"),B=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};P(r,(r,o)=>{let i;!1!==(i=e(r,o,t))&&(n[o]=i||r)}),Object.defineProperties(t,n)};const z=l("AsyncFunction"),q=(F="function"==typeof t,W=g(I.postMessage),F?t:W?(H="axios@"+Math.random(),G=[],I.addEventListener("message",({source:t,data:e})=>{t===I&&e===H&&G.length&&G.shift()()},!1),t=>{G.push(t),I.postMessage(H,"*")}):t=>setTimeout(t));var F,W,H,G;const K="undefined"!=typeof queueMicrotask?queueMicrotask.bind(I):void 0!==n&&n.nextTick||q;e.a={isArray:h,isArrayBuffer:y,isBuffer:function(t){return null!==t&&!d(t)&&null!==t.constructor&&!d(t.constructor)&&g(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||g(t.append)&&("formdata"===(e=c(t))||"object"===e&&g(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&y(t.buffer),e},isString:v,isNumber:m,isBoolean:t=>!0===t||!1===t,isObject:_,isPlainObject:b,isReadableStream:x,isRequest:A,isResponse:k,isHeaders:T,isUndefined:d,isDate:w,isFile:O,isBlob:S,isRegExp:U,isFunction:g,isStream:t=>_(t)&&g(t.pipe),isURLSearchParams:j,isTypedArray:L,isFileList:E,forEach:P,merge:function t(){const{caseless:e}=C(this)&&this||{},r={},n=(n,o)=>{const i=e&&R(r,o)||o;b(r[i])&&b(n)?r[i]=t(r[i],n):b(n)?r[i]=t({},n):h(n)?r[i]=n.slice():r[i]=n};for(let t=0,e=arguments.length;t<e;t++)arguments[t]&&P(arguments[t],n);return r},extend:(t,e,r,{allOwnKeys:n}={})=>(P(e,(e,n)=>{r&&g(e)?t[n]=Object(o.a)(e,r):t[n]=e},{allOwnKeys:n}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},toFlatObject:(t,e,r,n)=>{let o,i,u;const s={};if(e=e||{},null==t)return e;do{for(o=Object.getOwnPropertyNames(t),i=o.length;i-- >0;)u=o[i],n&&!n(u,t,e)||s[u]||(e[u]=t[u],s[u]=!0);t=!1!==r&&a(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},kindOf:c,kindOfTest:l,endsWith:(t,e,r)=>{t=String(t),(void 0===r||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return-1!==n&&n===r},toArray:t=>{if(!t)return null;if(h(t))return t;let e=t.length;if(!m(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},forEachEntry:(t,e)=>{const r=(t&&t[u]).call(t);let n;for(;(n=r.next())&&!n.done;){const r=n.value;e.call(t,r[0],r[1])}},matchAll:(t,e)=>{let r;const n=[];for(;null!==(r=t.exec(e));)n.push(r);return n},isHTMLForm:D,hasOwnProperty:N,hasOwnProp:N,reduceDescriptors:B,freezeMethods:t=>{B(t,(e,r)=>{if(g(t)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=t[r];g(n)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))})},toObjectSet:(t,e)=>{const r={},n=t=>{t.forEach(t=>{r[t]=!0})};return h(t)?n(t):n(String(t).split(e)),r},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,r){return e.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(t,e)=>null!=t&&Number.isFinite(t=+t)?t:e,findKey:R,global:I,isContextDefined:C,isSpecCompliantForm:function(t){return!!(t&&g(t.append)&&"FormData"===t[s]&&t[u])},toJSONObject:t=>{const e=new Array(10),r=(t,n)=>{if(_(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[n]=t;const o=h(t)?[]:{};return P(t,(t,e)=>{const i=r(t,n+1);!d(i)&&(o[e]=i)}),e[n]=void 0,o}}return t};return r(t,0)},isAsyncFn:z,isThenable:t=>t&&(_(t)||g(t))&&g(t.then)&&g(t.catch),setImmediate:q,asap:K,isIterable:t=>null!=t&&g(t[u])}}).call(this,r(47).setImmediate,r(11))},function(t,e,r){var n=r(61)();t.exports=n;try{regeneratorRuntime=n}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},function(t,e,r){"use strict";var n=r(0);function o(t,e,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}n.a.inherits(o,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n.a.toJSONObject(this.config),code:this.code,status:this.status}}});const i=o.prototype,a={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{a[t]={value:t}}),Object.defineProperties(o,a),Object.defineProperty(i,"isAxiosError",{value:!0}),o.from=(t,e,r,a,u,s)=>{const c=Object.create(i);return n.a.toFlatObject(t,c,(function(t){return t!==Error.prototype}),t=>"isAxiosError"!==t),o.call(c,t.message,e,r,a,u),c.cause=t,c.name=t.name,s&&Object.assign(c,s),c},e.a=o},function(t,e,r){var n=r(59);t.exports=function(t,e,r){return(e=n(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){function r(t,e,r,n,o,i,a){try{var u=t[i](a),s=u.value}catch(t){return void r(t)}u.done?e(s):Promise.resolve(s).then(n,o)}t.exports=function(t){return function(){var e=this,n=arguments;return new Promise((function(o,i){var a=t.apply(e,n);function u(t){r(a,o,i,u,s,"next",t)}function s(t){r(a,o,i,u,s,"throw",t)}u(void 0)}))}},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){function r(e){return t.exports=r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,r(e)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){var n=r(111),o=r(112),i=r(113),a=r(114);t.exports=function(t){return n(t)||o(t)||i(t)||a()},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){"use strict";r.r(e),r.d(e,"Collection",(function(){return m})),r.d(e,"Iterable",(function(){return ln})),r.d(e,"List",(function(){return Ve})),r.d(e,"Map",(function(){return Ee})),r.d(e,"OrderedMap",(function(){return ur})),r.d(e,"OrderedSet",(function(){return Kr})),r.d(e,"PairSorting",(function(){return Xr})),r.d(e,"Range",(function(){return Tr})),r.d(e,"Record",(function(){return Zr})),r.d(e,"Repeat",(function(){return an})),r.d(e,"Seq",(function(){return U})),r.d(e,"Set",(function(){return Or})),r.d(e,"Stack",(function(){return pr})),r.d(e,"fromJS",(function(){return un})),r.d(e,"get",(function(){return $t})),r.d(e,"getIn",(function(){return Pr})),r.d(e,"has",(function(){return Yt})),r.d(e,"hasIn",(function(){return Ir})),r.d(e,"hash",(function(){return nt})),r.d(e,"is",(function(){return Q})),r.d(e,"isAssociative",(function(){return g})),r.d(e,"isCollection",(function(){return d})),r.d(e,"isImmutable",(function(){return E})),r.d(e,"isIndexed",(function(){return v})),r.d(e,"isKeyed",(function(){return y})),r.d(e,"isList",(function(){return Ke})),r.d(e,"isMap",(function(){return J})),r.d(e,"isOrdered",(function(){return x})),r.d(e,"isOrderedMap",(function(){return X})),r.d(e,"isOrderedSet",(function(){return mr})),r.d(e,"isPlainObject",(function(){return Gt})),r.d(e,"isRecord",(function(){return S})),r.d(e,"isSeq",(function(){return O})),r.d(e,"isSet",(function(){return gr})),r.d(e,"isStack",(function(){return lr})),r.d(e,"isValueObject",(function(){return Z})),r.d(e,"merge",(function(){return fe})),r.d(e,"mergeDeep",(function(){return pe})),r.d(e,"mergeDeepWith",(function(){return he})),r.d(e,"mergeWith",(function(){return le})),r.d(e,"remove",(function(){return Xt})),r.d(e,"removeIn",(function(){return re})),r.d(e,"set",(function(){return Zt})),r.d(e,"setIn",(function(){return te})),r.d(e,"update",(function(){return oe})),r.d(e,"updateIn",(function(){return Qt})),r.d(e,"version",(function(){return cn}));var n={};function o(t){t&&(t.value=!0)}function i(){}function a(t){return void 0===t.size&&(t.size=t.__iterate(s)),t.size}function u(t,e){if("number"!=typeof e){var r=e>>>0;if(""+r!==e||4294967295===r)return NaN;e=r}return e<0?a(t)+e:e}function s(){return!0}function c(t,e,r){return(0===t&&!h(t)||void 0!==r&&t<=-r)&&(void 0===e||void 0!==r&&e>=r)}function f(t,e){return p(t,e,0)}function l(t,e){return p(t,e,e)}function p(t,e,r){return void 0===t?r:h(t)?e===1/0?e:0|Math.max(0,e+t):void 0===e||e===t?t:0|Math.min(e,t)}function h(t){return t<0||0===t&&1/t==-1/0}function d(t){return Boolean(t&&t["@@__IMMUTABLE_ITERABLE__@@"])}function y(t){return Boolean(t&&t["@@__IMMUTABLE_KEYED__@@"])}function v(t){return Boolean(t&&t["@@__IMMUTABLE_INDEXED__@@"])}function g(t){return y(t)||v(t)}var m=function(t){return d(t)?t:U(t)},_=function(t){function e(t){return y(t)?t:B(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(m),b=function(t){function e(t){return v(t)?t:z(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(m),w=function(t){function e(t){return d(t)&&!g(t)?t:q(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(m);m.Keyed=_,m.Indexed=b,m.Set=w;function O(t){return Boolean(t&&t["@@__IMMUTABLE_SEQ__@@"])}function S(t){return Boolean(t&&t["@@__IMMUTABLE_RECORD__@@"])}function E(t){return d(t)||S(t)}var j="@@__IMMUTABLE_ORDERED__@@";function x(t){return Boolean(t&&t[j])}var A="function"==typeof Symbol&&Symbol.iterator,k=A||"@@iterator",T=function(t){this.next=t};function P(t,e,r,n){var o=0===t?e:1===t?r:[e,r];return n?n.value=o:n={value:o,done:!1},n}function R(){return{value:void 0,done:!0}}function I(t){return!!Array.isArray(t)||!!M(t)}function C(t){return t&&"function"==typeof t.next}function L(t){var e=M(t);return e&&e.call(t)}function M(t){var e=t&&(A&&t[A]||t["@@iterator"]);if("function"==typeof e)return e}T.prototype.toString=function(){return"[Iterator]"},T.KEYS=0,T.VALUES=1,T.ENTRIES=2,T.prototype.inspect=T.prototype.toSource=function(){return this.toString()},T.prototype[k]=function(){return this};var D=Object.prototype.hasOwnProperty;function N(t){return!(!Array.isArray(t)&&"string"!=typeof t)||t&&"object"==typeof t&&Number.isInteger(t.length)&&t.length>=0&&(0===t.length?1===Object.keys(t).length:t.hasOwnProperty(t.length-1))}var U=function(t){function e(t){return null==t?K():E(t)?t.toSeq():function(t){var e=$(t);if(e)return(n=M(r=t))&&n===r.entries?e.fromEntrySeq():function(t){var e=M(t);return e&&e===t.keys}(t)?e.toSetSeq():e;var r,n;if("object"==typeof t)return new W(t);throw new TypeError("Expected Array or collection object of values, or keyed object: "+t)}(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toSeq=function(){return this},e.prototype.toString=function(){return this.__toString("Seq {","}")},e.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},e.prototype.__iterate=function(t,e){var r=this._cache;if(r){for(var n=r.length,o=0;o!==n;){var i=r[e?n-++o:o++];if(!1===t(i[1],i[0],this))break}return o}return this.__iterateUncached(t,e)},e.prototype.__iterator=function(t,e){var r=this._cache;if(r){var n=r.length,o=0;return new T((function(){if(o===n)return{value:void 0,done:!0};var i=r[e?n-++o:o++];return P(t,i[0],i[1])}))}return this.__iteratorUncached(t,e)},e}(m),B=function(t){function e(t){return null==t?K().toKeyedSeq():d(t)?y(t)?t.toSeq():t.fromEntrySeq():S(t)?t.toSeq():V(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toKeyedSeq=function(){return this},e}(U),z=function(t){function e(t){return null==t?K():d(t)?y(t)?t.entrySeq():t.toIndexedSeq():S(t)?t.toSeq().entrySeq():Y(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return e(arguments)},e.prototype.toIndexedSeq=function(){return this},e.prototype.toString=function(){return this.__toString("Seq [","]")},e}(U),q=function(t){function e(t){return(d(t)&&!g(t)?t:z(t)).toSetSeq()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return e(arguments)},e.prototype.toSetSeq=function(){return this},e}(U);U.isSeq=O,U.Keyed=B,U.Set=q,U.Indexed=z,U.prototype["@@__IMMUTABLE_SEQ__@@"]=!0;var F=function(t){function e(t){this._array=t,this.size=t.length}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t,e){return this.has(t)?this._array[u(this,t)]:e},e.prototype.__iterate=function(t,e){for(var r=this._array,n=r.length,o=0;o!==n;){var i=e?n-++o:o++;if(!1===t(r[i],i,this))break}return o},e.prototype.__iterator=function(t,e){var r=this._array,n=r.length,o=0;return new T((function(){if(o===n)return{value:void 0,done:!0};var i=e?n-++o:o++;return P(t,i,r[i])}))},e}(z),W=function(t){function e(t){var e=Object.keys(t).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t):[]);this._object=t,this._keys=e,this.size=e.length}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},e.prototype.has=function(t){return D.call(this._object,t)},e.prototype.__iterate=function(t,e){for(var r=this._object,n=this._keys,o=n.length,i=0;i!==o;){var a=n[e?o-++i:i++];if(!1===t(r[a],a,this))break}return i},e.prototype.__iterator=function(t,e){var r=this._object,n=this._keys,o=n.length,i=0;return new T((function(){if(i===o)return{value:void 0,done:!0};var a=n[e?o-++i:i++];return P(t,a,r[a])}))},e}(B);W.prototype[j]=!0;var H,G=function(t){function e(t){this._collection=t,this.size=t.length||t.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var r=L(this._collection),n=0;if(C(r))for(var o;!(o=r.next()).done&&!1!==t(o.value,n++,this););return n},e.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=L(this._collection);if(!C(r))return new T(R);var n=0;return new T((function(){var e=r.next();return e.done?e:P(t,n++,e.value)}))},e}(z);function K(){return H||(H=new F([]))}function V(t){var e=$(t);if(e)return e.fromEntrySeq();if("object"==typeof t)return new W(t);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+t)}function Y(t){var e=$(t);if(e)return e;throw new TypeError("Expected Array or collection object of values: "+t)}function $(t){return N(t)?new F(t):I(t)?new G(t):void 0}function J(t){return Boolean(t&&t["@@__IMMUTABLE_MAP__@@"])}function X(t){return J(t)&&x(t)}function Z(t){return Boolean(t&&"function"==typeof t.equals&&"function"==typeof t.hashCode)}function Q(t,e){if(t===e||t!=t&&e!=e)return!0;if(!t||!e)return!1;if("function"==typeof t.valueOf&&"function"==typeof e.valueOf){if((t=t.valueOf())===(e=e.valueOf())||t!=t&&e!=e)return!0;if(!t||!e)return!1}return!!(Z(t)&&Z(e)&&t.equals(e))}var tt="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){var r=65535&(t|=0),n=65535&(e|=0);return r*n+((t>>>16)*n+r*(e>>>16)<<16>>>0)|0};function et(t){return t>>>1&1073741824|3221225471&t}var rt=Object.prototype.valueOf;function nt(t){if(null==t)return ot(t);if("function"==typeof t.hashCode)return et(t.hashCode(t));var e,r=(e=t).valueOf!==rt&&"function"==typeof e.valueOf?e.valueOf(e):e;if(null==r)return ot(r);switch(typeof r){case"boolean":return r?1108378657:1108378656;case"number":return function(t){if(t!=t||t===1/0)return 0;var e=0|t;e!==t&&(e^=4294967295*t);for(;t>4294967295;)e^=t/=4294967295;return et(e)}(r);case"string":return r.length>dt?function(t){var e=gt[t];void 0===e&&(e=it(t),vt===yt&&(vt=0,gt={}),vt++,gt[t]=e);return e}(r):it(r);case"object":case"function":return function(t){var e;if(ft&&void 0!==(e=ct.get(t)))return e;if(void 0!==(e=t[ht]))return e;if(!ut){if(void 0!==(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[ht]))return e;if(void 0!==(e=function(t){if(t&&t.nodeType>0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}(t)))return e}if(e=st(),ft)ct.set(t,e);else{if(void 0!==at&&!1===at(t))throw new Error("Non-extensible objects are not allowed as keys.");if(ut)Object.defineProperty(t,ht,{enumerable:!1,configurable:!1,writable:!1,value:e});else if(void 0!==t.propertyIsEnumerable&&t.propertyIsEnumerable===t.constructor.prototype.propertyIsEnumerable)t.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},t.propertyIsEnumerable[ht]=e;else{if(void 0===t.nodeType)throw new Error("Unable to set a non-enumerable property on object.");t[ht]=e}}return e}(r);case"symbol":return function(t){var e=lt[t];if(void 0!==e)return e;return e=st(),lt[t]=e,e}(r);default:if("function"==typeof r.toString)return it(r.toString());throw new Error("Value type "+typeof r+" cannot be hashed.")}}function ot(t){return null===t?1108378658:1108378659}function it(t){for(var e=0,r=0;r<t.length;r++)e=31*e+t.charCodeAt(r)|0;return et(e)}var at=Object.isExtensible,ut=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}();function st(){var t=++pt;return 1073741824&pt&&(pt=0),t}var ct,ft="function"==typeof WeakMap;ft&&(ct=new WeakMap);var lt=Object.create(null),pt=0,ht="__immutablehash__";"function"==typeof Symbol&&(ht=Symbol(ht));var dt=16,yt=255,vt=0,gt={},mt=function(t){function e(t,e){this._iter=t,this._useKeys=e,this.size=t.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t,e){return this._iter.get(t,e)},e.prototype.has=function(t){return this._iter.has(t)},e.prototype.valueSeq=function(){return this._iter.valueSeq()},e.prototype.reverse=function(){var t=this,e=Et(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},e.prototype.map=function(t,e){var r=this,n=St(this,t,e);return this._useKeys||(n.valueSeq=function(){return r._iter.toSeq().map(t,e)}),n},e.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate((function(e,n){return t(e,n,r)}),e)},e.prototype.__iterator=function(t,e){return this._iter.__iterator(t,e)},e}(B);mt.prototype[j]=!0;var _t=function(t){function e(t){this._iter=t,this.size=t.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.includes=function(t){return this._iter.includes(t)},e.prototype.__iterate=function(t,e){var r=this,n=0;return e&&a(this),this._iter.__iterate((function(o){return t(o,e?r.size-++n:n++,r)}),e)},e.prototype.__iterator=function(t,e){var r=this,n=this._iter.__iterator(1,e),o=0;return e&&a(this),new T((function(){var i=n.next();return i.done?i:P(t,e?r.size-++o:o++,i.value,i)}))},e}(z),bt=function(t){function e(t){this._iter=t,this.size=t.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.has=function(t){return this._iter.includes(t)},e.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate((function(e){return t(e,e,r)}),e)},e.prototype.__iterator=function(t,e){var r=this._iter.__iterator(1,e);return new T((function(){var e=r.next();return e.done?e:P(t,e.value,e.value,e)}))},e}(q),wt=function(t){function e(t){this._iter=t,this.size=t.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.entrySeq=function(){return this._iter.toSeq()},e.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate((function(e){if(e){Mt(e);var n=d(e);return t(n?e.get(1):e[1],n?e.get(0):e[0],r)}}),e)},e.prototype.__iterator=function(t,e){var r=this._iter.__iterator(1,e);return new T((function(){for(;;){var e=r.next();if(e.done)return e;var n=e.value;if(n){Mt(n);var o=d(n);return P(t,o?n.get(0):n[0],o?n.get(1):n[1],e)}}}))},e}(B);function Ot(t){var e=Nt(t);return e._iter=t,e.size=t.size,e.flip=function(){return t},e.reverse=function(){var e=t.reverse.apply(this);return e.flip=function(){return t.reverse()},e},e.has=function(e){return t.includes(e)},e.includes=function(e){return t.has(e)},e.cacheResult=Ut,e.__iterateUncached=function(e,r){var n=this;return t.__iterate((function(t,r){return!1!==e(r,t,n)}),r)},e.__iteratorUncached=function(e,r){if(2===e){var n=t.__iterator(e,r);return new T((function(){var t=n.next();if(!t.done){var e=t.value[0];t.value[0]=t.value[1],t.value[1]=e}return t}))}return t.__iterator(1===e?0:1,r)},e}function St(t,e,r){var o=Nt(t);return o.size=t.size,o.has=function(e){return t.has(e)},o.get=function(o,i){var a=t.get(o,n);return a===n?i:e.call(r,a,o,t)},o.__iterateUncached=function(n,o){var i=this;return t.__iterate((function(t,o,a){return!1!==n(e.call(r,t,o,a),o,i)}),o)},o.__iteratorUncached=function(n,o){var i=t.__iterator(2,o);return new T((function(){var o=i.next();if(o.done)return o;var a=o.value,u=a[0];return P(n,u,e.call(r,a[1],u,t),o)}))},o}function Et(t,e){var r=this,n=Nt(t);return n._iter=t,n.size=t.size,n.reverse=function(){return t},t.flip&&(n.flip=function(){var e=Ot(t);return e.reverse=function(){return t.flip()},e}),n.get=function(r,n){return t.get(e?r:-1-r,n)},n.has=function(r){return t.has(e?r:-1-r)},n.includes=function(e){return t.includes(e)},n.cacheResult=Ut,n.__iterate=function(r,n){var o=this,i=0;return n&&a(t),t.__iterate((function(t,a){return r(t,e?a:n?o.size-++i:i++,o)}),!n)},n.__iterator=function(n,o){var i=0;o&&a(t);var u=t.__iterator(2,!o);return new T((function(){var t=u.next();if(t.done)return t;var a=t.value;return P(n,e?a[0]:o?r.size-++i:i++,a[1],t)}))},n}function jt(t,e,r,o){var i=Nt(t);return o&&(i.has=function(o){var i=t.get(o,n);return i!==n&&!!e.call(r,i,o,t)},i.get=function(o,i){var a=t.get(o,n);return a!==n&&e.call(r,a,o,t)?a:i}),i.__iterateUncached=function(n,i){var a=this,u=0;return t.__iterate((function(t,i,s){if(e.call(r,t,i,s))return u++,n(t,o?i:u-1,a)}),i),u},i.__iteratorUncached=function(n,i){var a=t.__iterator(2,i),u=0;return new T((function(){for(;;){var i=a.next();if(i.done)return i;var s=i.value,c=s[0],f=s[1];if(e.call(r,f,c,t))return P(n,o?c:u++,f,i)}}))},i}function xt(t,e,r,n){var o=t.size;if(c(e,r,o))return t;var i=f(e,o),a=l(r,o);if(i!=i||a!=a)return xt(t.toSeq().cacheResult(),e,r,n);var s,p=a-i;p==p&&(s=p<0?0:p);var h=Nt(t);return h.size=0===s?s:t.size&&s||void 0,!n&&O(t)&&s>=0&&(h.get=function(e,r){return(e=u(this,e))>=0&&e<s?t.get(e+i,r):r}),h.__iterateUncached=function(e,r){var o=this;if(0===s)return 0;if(r)return this.cacheResult().__iterate(e,r);var a=0,u=!0,c=0;return t.__iterate((function(t,r){if(!u||!(u=a++<i))return c++,!1!==e(t,n?r:c-1,o)&&c!==s})),c},h.__iteratorUncached=function(e,r){if(0!==s&&r)return this.cacheResult().__iterator(e,r);if(0===s)return new T(R);var o=t.__iterator(e,r),a=0,u=0;return new T((function(){for(;a++<i;)o.next();if(++u>s)return{value:void 0,done:!0};var t=o.next();return n||1===e||t.done?t:P(e,u-1,0===e?void 0:t.value[1],t)}))},h}function At(t,e,r,n){var o=Nt(t);return o.__iterateUncached=function(o,i){var a=this;if(i)return this.cacheResult().__iterate(o,i);var u=!0,s=0;return t.__iterate((function(t,i,c){if(!u||!(u=e.call(r,t,i,c)))return s++,o(t,n?i:s-1,a)})),s},o.__iteratorUncached=function(o,i){var a=this;if(i)return this.cacheResult().__iterator(o,i);var u=t.__iterator(2,i),s=!0,c=0;return new T((function(){var t,i,f;do{if((t=u.next()).done)return n||1===o?t:P(o,c++,0===o?void 0:t.value[1],t);var l=t.value;i=l[0],f=l[1],s&&(s=e.call(r,f,i,a))}while(s);return 2===o?t:P(o,i,f,t)}))},o}function kt(t,e){var r=y(t),n=[t].concat(e).map((function(t){return d(t)?r&&(t=_(t)):t=r?V(t):Y(Array.isArray(t)?t:[t]),t})).filter((function(t){return 0!==t.size}));if(0===n.length)return t;if(1===n.length){var o=n[0];if(o===t||r&&y(o)||v(t)&&v(o))return o}var i=new F(n);return r?i=i.toKeyedSeq():v(t)||(i=i.toSetSeq()),(i=i.flatten(!0)).size=n.reduce((function(t,e){if(void 0!==t){var r=e.size;if(void 0!==r)return t+r}}),0),i}function Tt(t,e,r){var n=Nt(t);return n.__iterateUncached=function(o,i){if(i)return this.cacheResult().__iterate(o,i);var a=0,u=!1;return function t(s,c){s.__iterate((function(i,s){return(!e||c<e)&&d(i)?t(i,c+1):(a++,!1===o(i,r?s:a-1,n)&&(u=!0)),!u}),i)}(t,0),a},n.__iteratorUncached=function(n,o){if(o)return this.cacheResult().__iterator(n,o);var i=t.__iterator(n,o),a=[],u=0;return new T((function(){for(;i;){var t=i.next();if(!1===t.done){var s=t.value;if(2===n&&(s=s[1]),e&&!(a.length<e)||!d(s))return r?t:P(n,u++,s,t);a.push(i),i=s.__iterator(n,o)}else i=a.pop()}return{value:void 0,done:!0}}))},n}function Pt(t,e,r){e||(e=Bt);var n=y(t),o=0,i=t.toSeq().map((function(e,n){return[n,e,o++,r?r(e,n,t):e]})).valueSeq().toArray();return i.sort((function(t,r){return e(t[3],r[3])||t[2]-r[2]})).forEach(n?function(t,e){i[e].length=2}:function(t,e){i[e]=t[1]}),n?B(i):v(t)?z(i):q(i)}function Rt(t,e,r){if(e||(e=Bt),r){var n=t.toSeq().map((function(e,n){return[e,r(e,n,t)]})).reduce((function(t,r){return It(e,t[1],r[1])?r:t}));return n&&n[0]}return t.reduce((function(t,r){return It(e,t,r)?r:t}))}function It(t,e,r){var n=t(r,e);return 0===n&&r!==e&&(null==r||r!=r)||n>0}function Ct(t,e,r,n){var o=Nt(t),i=new F(r).map((function(t){return t.size}));return o.size=n?i.max():i.min(),o.__iterate=function(t,e){for(var r,n=this.__iterator(1,e),o=0;!(r=n.next()).done&&!1!==t(r.value,o++,this););return o},o.__iteratorUncached=function(t,o){var i=r.map((function(t){return t=m(t),L(o?t.reverse():t)})),a=0,u=!1;return new T((function(){var r;return u||(r=i.map((function(t){return t.next()})),u=n?r.every((function(t){return t.done})):r.some((function(t){return t.done}))),u?{value:void 0,done:!0}:P(t,a++,e.apply(null,r.map((function(t){return t.value}))))}))},o}function Lt(t,e){return t===e?t:O(t)?e:t.constructor(e)}function Mt(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function Dt(t){return y(t)?_:v(t)?b:w}function Nt(t){return Object.create((y(t)?B:v(t)?z:q).prototype)}function Ut(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):U.prototype.cacheResult.call(this)}function Bt(t,e){return void 0===t&&void 0===e?0:void 0===t?1:void 0===e?-1:t>e?1:t<e?-1:0}function zt(t,e){e=e||0;for(var r=Math.max(0,t.length-e),n=new Array(r),o=0;o<r;o++)n[o]=t[o+e];return n}function qt(t,e){if(!t)throw new Error(e)}function Ft(t){qt(t!==1/0,"Cannot perform this action with an infinite size.")}function Wt(t){if(N(t)&&"string"!=typeof t)return t;if(x(t))return t.toArray();throw new TypeError("Invalid keyPath: expected Ordered Collection or Array: "+t)}_t.prototype.cacheResult=mt.prototype.cacheResult=bt.prototype.cacheResult=wt.prototype.cacheResult=Ut;var Ht=Object.prototype.toString;function Gt(t){if(!t||"object"!=typeof t||"[object Object]"!==Ht.call(t))return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;for(var r=e,n=Object.getPrototypeOf(e);null!==n;)r=n,n=Object.getPrototypeOf(r);return r===e}function Kt(t){return"object"==typeof t&&(E(t)||Array.isArray(t)||Gt(t))}function Vt(t){try{return"string"==typeof t?JSON.stringify(t):String(t)}catch(e){return JSON.stringify(t)}}function Yt(t,e){return E(t)?t.has(e):Kt(t)&&D.call(t,e)}function $t(t,e,r){return E(t)?t.get(e,r):Yt(t,e)?"function"==typeof t.get?t.get(e):t[e]:r}function Jt(t){if(Array.isArray(t))return zt(t);var e={};for(var r in t)D.call(t,r)&&(e[r]=t[r]);return e}function Xt(t,e){if(!Kt(t))throw new TypeError("Cannot update non-data-structure value: "+t);if(E(t)){if(!t.remove)throw new TypeError("Cannot update immutable value without .remove() method: "+t);return t.remove(e)}if(!D.call(t,e))return t;var r=Jt(t);return Array.isArray(r)?r.splice(e,1):delete r[e],r}function Zt(t,e,r){if(!Kt(t))throw new TypeError("Cannot update non-data-structure value: "+t);if(E(t)){if(!t.set)throw new TypeError("Cannot update immutable value without .set() method: "+t);return t.set(e,r)}if(D.call(t,e)&&r===t[e])return t;var n=Jt(t);return n[e]=r,n}function Qt(t,e,r,o){o||(o=r,r=void 0);var i=function t(e,r,o,i,a,u){var s=r===n;if(i===o.length){var c=s?a:r,f=u(c);return f===c?r:f}if(!s&&!Kt(r))throw new TypeError("Cannot update within non-data-structure value in path ["+o.slice(0,i).map(Vt)+"]: "+r);var l=o[i],p=s?n:$t(r,l,n),h=t(p===n?e:E(p),p,o,i+1,a,u);return h===p?r:h===n?Xt(r,l):Zt(s?e?De():{}:r,l,h)}(E(t),t,Wt(e),0,r,o);return i===n?r:i}function te(t,e,r){return Qt(t,e,n,(function(){return r}))}function ee(t,e){return te(this,t,e)}function re(t,e){return Qt(t,e,(function(){return n}))}function ne(t){return re(this,t)}function oe(t,e,r,n){return Qt(t,[e],r,n)}function ie(t,e,r){return 1===arguments.length?t(this):oe(this,t,e,r)}function ae(t,e,r){return Qt(this,t,e,r)}function ue(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return ce(this,t)}function se(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];if("function"!=typeof t)throw new TypeError("Invalid merger function: "+t);return ce(this,e,t)}function ce(t,e,r){for(var o=[],i=0;i<e.length;i++){var a=_(e[i]);0!==a.size&&o.push(a)}return 0===o.length?t:0!==t.toSeq().size||t.__ownerID||1!==o.length?t.withMutations((function(t){for(var e=r?function(e,o){oe(t,o,n,(function(t){return t===n?e:r(t,e,o)}))}:function(e,r){t.set(r,e)},i=0;i<o.length;i++)o[i].forEach(e)})):t.constructor(o[0])}function fe(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return ye(t,e)}function le(t,e){for(var r=[],n=arguments.length-2;n-- >0;)r[n]=arguments[n+2];return ye(e,r,t)}function pe(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return de(t,e)}function he(t,e){for(var r=[],n=arguments.length-2;n-- >0;)r[n]=arguments[n+2];return de(e,r,t)}function de(t,e,r){return ye(t,e,function(t){return function e(r,n,o){return Kt(r)&&Kt(n)&&(i=n,a=U(r),u=U(i),v(a)===v(u)&&y(a)===y(u))?ye(r,[n],e):t?t(r,n,o):n;var i,a,u}}(r))}function ye(t,e,r){if(!Kt(t))throw new TypeError("Cannot merge into non-data-structure value: "+t);if(E(t))return"function"==typeof r&&t.mergeWith?t.mergeWith.apply(t,[r].concat(e)):t.merge?t.merge.apply(t,e):t.concat.apply(t,e);for(var n=Array.isArray(t),o=t,i=n?b:_,a=n?function(e){o===t&&(o=Jt(o)),o.push(e)}:function(e,n){var i=D.call(o,n),a=i&&r?r(o[n],e,n):e;i&&a===o[n]||(o===t&&(o=Jt(o)),o[n]=a)},u=0;u<e.length;u++)i(e[u]).forEach(a);return o}function ve(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return de(this,t)}function ge(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return de(this,e,t)}function me(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return Qt(this,t,De(),(function(t){return ye(t,e)}))}function _e(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return Qt(this,t,De(),(function(t){return de(t,e)}))}function be(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this}function we(){return this.__ownerID?this:this.__ensureOwner(new i)}function Oe(){return this.__ensureOwner()}function Se(){return this.__altered}var Ee=function(t){function e(e){return null==e?De():J(e)&&!x(e)?e:De().withMutations((function(r){var n=t(e);Ft(n.size),n.forEach((function(t,e){return r.set(e,t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return De().withMutations((function(e){for(var r=0;r<t.length;r+=2){if(r+1>=t.length)throw new Error("Missing value for key: "+t[r]);e.set(t[r],t[r+1])}}))},e.prototype.toString=function(){return this.__toString("Map {","}")},e.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},e.prototype.set=function(t,e){return Ne(this,t,e)},e.prototype.remove=function(t){return Ne(this,t,n)},e.prototype.deleteAll=function(t){var e=m(t);return 0===e.size?this:this.withMutations((function(t){e.forEach((function(e){return t.remove(e)}))}))},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):De()},e.prototype.sort=function(t){return ur(Pt(this,t))},e.prototype.sortBy=function(t,e){return ur(Pt(this,e,t))},e.prototype.map=function(t,e){var r=this;return this.withMutations((function(n){n.forEach((function(o,i){n.set(i,t.call(e,o,i,r))}))}))},e.prototype.__iterator=function(t,e){return new Ie(this,t,e)},e.prototype.__iterate=function(t,e){var r=this,n=0;return this._root&&this._root.iterate((function(e){return n++,t(e[1],e[0],r)}),e),n},e.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Me(this.size,this._root,t,this.__hash):0===this.size?De():(this.__ownerID=t,this.__altered=!1,this)},e}(_);Ee.isMap=J;var je=Ee.prototype;je["@@__IMMUTABLE_MAP__@@"]=!0,je.delete=je.remove,je.removeAll=je.deleteAll,je.setIn=ee,je.removeIn=je.deleteIn=ne,je.update=ie,je.updateIn=ae,je.merge=je.concat=ue,je.mergeWith=se,je.mergeDeep=ve,je.mergeDeepWith=ge,je.mergeIn=me,je.mergeDeepIn=_e,je.withMutations=be,je.wasAltered=Se,je.asImmutable=Oe,je["@@transducer/init"]=je.asMutable=we,je["@@transducer/step"]=function(t,e){return t.set(e[0],e[1])},je["@@transducer/result"]=function(t){return t.asImmutable()};var xe=function(t,e){this.ownerID=t,this.entries=e};xe.prototype.get=function(t,e,r,n){for(var o=this.entries,i=0,a=o.length;i<a;i++)if(Q(r,o[i][0]))return o[i][1];return n},xe.prototype.update=function(t,e,r,a,u,s,c){for(var f=u===n,l=this.entries,p=0,h=l.length;p<h&&!Q(a,l[p][0]);p++);var d=p<h;if(d?l[p][1]===u:f)return this;if(o(c),(f||!d)&&o(s),!f||1!==l.length){if(!d&&!f&&l.length>=We)return function(t,e,r,n){t||(t=new i);for(var o=new Pe(t,nt(r),[r,n]),a=0;a<e.length;a++){var u=e[a];o=o.update(t,0,void 0,u[0],u[1])}return o}(t,l,a,u);var y=t&&t===this.ownerID,v=y?l:zt(l);return d?f?p===h-1?v.pop():v[p]=v.pop():v[p]=[a,u]:v.push([a,u]),y?(this.entries=v,this):new xe(t,v)}};var Ae=function(t,e,r){this.ownerID=t,this.bitmap=e,this.nodes=r};Ae.prototype.get=function(t,e,r,n){void 0===e&&(e=nt(r));var o=1<<(31&(0===t?e:e>>>t)),i=this.bitmap;return 0==(i&o)?n:this.nodes[qe(i&o-1)].get(t+5,e,r,n)},Ae.prototype.update=function(t,e,r,o,i,a,u){void 0===r&&(r=nt(o));var s=31&(0===e?r:r>>>e),c=1<<s,f=this.bitmap,l=0!=(f&c);if(!l&&i===n)return this;var p=qe(f&c-1),h=this.nodes,d=l?h[p]:void 0,y=Ue(d,t,e+5,r,o,i,a,u);if(y===d)return this;if(!l&&y&&h.length>=He)return function(t,e,r,n,o){for(var i=0,a=new Array(32),u=0;0!==r;u++,r>>>=1)a[u]=1&r?e[i++]:void 0;return a[n]=o,new ke(t,i+1,a)}(t,h,f,s,y);if(l&&!y&&2===h.length&&Be(h[1^p]))return h[1^p];if(l&&y&&1===h.length&&Be(y))return y;var v=t&&t===this.ownerID,g=l?y?f:f^c:f|c,m=l?y?Fe(h,p,y,v):function(t,e,r){var n=t.length-1;if(r&&e===n)return t.pop(),t;for(var o=new Array(n),i=0,a=0;a<n;a++)a===e&&(i=1),o[a]=t[a+i];return o}(h,p,v):function(t,e,r,n){var o=t.length+1;if(n&&e+1===o)return t[e]=r,t;for(var i=new Array(o),a=0,u=0;u<o;u++)u===e?(i[u]=r,a=-1):i[u]=t[u+a];return i}(h,p,y,v);return v?(this.bitmap=g,this.nodes=m,this):new Ae(t,g,m)};var ke=function(t,e,r){this.ownerID=t,this.count=e,this.nodes=r};ke.prototype.get=function(t,e,r,n){void 0===e&&(e=nt(r));var o=31&(0===t?e:e>>>t),i=this.nodes[o];return i?i.get(t+5,e,r,n):n},ke.prototype.update=function(t,e,r,o,i,a,u){void 0===r&&(r=nt(o));var s=31&(0===e?r:r>>>e),c=i===n,f=this.nodes,l=f[s];if(c&&!l)return this;var p=Ue(l,t,e+5,r,o,i,a,u);if(p===l)return this;var h=this.count;if(l){if(!p&&--h<Ge)return function(t,e,r,n){for(var o=0,i=0,a=new Array(r),u=0,s=1,c=e.length;u<c;u++,s<<=1){var f=e[u];void 0!==f&&u!==n&&(o|=s,a[i++]=f)}return new Ae(t,o,a)}(t,f,h,s)}else h++;var d=t&&t===this.ownerID,y=Fe(f,s,p,d);return d?(this.count=h,this.nodes=y,this):new ke(t,h,y)};var Te=function(t,e,r){this.ownerID=t,this.keyHash=e,this.entries=r};Te.prototype.get=function(t,e,r,n){for(var o=this.entries,i=0,a=o.length;i<a;i++)if(Q(r,o[i][0]))return o[i][1];return n},Te.prototype.update=function(t,e,r,i,a,u,s){void 0===r&&(r=nt(i));var c=a===n;if(r!==this.keyHash)return c?this:(o(s),o(u),ze(this,t,e,r,[i,a]));for(var f=this.entries,l=0,p=f.length;l<p&&!Q(i,f[l][0]);l++);var h=l<p;if(h?f[l][1]===a:c)return this;if(o(s),(c||!h)&&o(u),c&&2===p)return new Pe(t,this.keyHash,f[1^l]);var d=t&&t===this.ownerID,y=d?f:zt(f);return h?c?l===p-1?y.pop():y[l]=y.pop():y[l]=[i,a]:y.push([i,a]),d?(this.entries=y,this):new Te(t,this.keyHash,y)};var Pe=function(t,e,r){this.ownerID=t,this.keyHash=e,this.entry=r};Pe.prototype.get=function(t,e,r,n){return Q(r,this.entry[0])?this.entry[1]:n},Pe.prototype.update=function(t,e,r,i,a,u,s){var c=a===n,f=Q(i,this.entry[0]);return(f?a===this.entry[1]:c)?this:(o(s),c?void o(u):f?t&&t===this.ownerID?(this.entry[1]=a,this):new Pe(t,this.keyHash,[i,a]):(o(u),ze(this,t,e,nt(i),[i,a])))},xe.prototype.iterate=Te.prototype.iterate=function(t,e){for(var r=this.entries,n=0,o=r.length-1;n<=o;n++)if(!1===t(r[e?o-n:n]))return!1},Ae.prototype.iterate=ke.prototype.iterate=function(t,e){for(var r=this.nodes,n=0,o=r.length-1;n<=o;n++){var i=r[e?o-n:n];if(i&&!1===i.iterate(t,e))return!1}},Pe.prototype.iterate=function(t,e){return t(this.entry)};var Re,Ie=function(t){function e(t,e,r){this._type=e,this._reverse=r,this._stack=t._root&&Le(t._root)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.next=function(){for(var t=this._type,e=this._stack;e;){var r=e.node,n=e.index++,o=void 0;if(r.entry){if(0===n)return Ce(t,r.entry)}else if(r.entries){if(n<=(o=r.entries.length-1))return Ce(t,r.entries[this._reverse?o-n:n])}else if(n<=(o=r.nodes.length-1)){var i=r.nodes[this._reverse?o-n:n];if(i){if(i.entry)return Ce(t,i.entry);e=this._stack=Le(i,e)}continue}e=this._stack=this._stack.__prev}return{value:void 0,done:!0}},e}(T);function Ce(t,e){return P(t,e[0],e[1])}function Le(t,e){return{node:t,index:0,__prev:e}}function Me(t,e,r,n){var o=Object.create(je);return o.size=t,o._root=e,o.__ownerID=r,o.__hash=n,o.__altered=!1,o}function De(){return Re||(Re=Me(0))}function Ne(t,e,r){var o,i;if(t._root){var a={value:!1},u={value:!1};if(o=Ue(t._root,t.__ownerID,0,void 0,e,r,a,u),!u.value)return t;i=t.size+(a.value?r===n?-1:1:0)}else{if(r===n)return t;i=1,o=new xe(t.__ownerID,[[e,r]])}return t.__ownerID?(t.size=i,t._root=o,t.__hash=void 0,t.__altered=!0,t):o?Me(i,o):De()}function Ue(t,e,r,i,a,u,s,c){return t?t.update(e,r,i,a,u,s,c):u===n?t:(o(c),o(s),new Pe(e,i,[a,u]))}function Be(t){return t.constructor===Pe||t.constructor===Te}function ze(t,e,r,n,o){if(t.keyHash===n)return new Te(e,n,[t.entry,o]);var i,a=31&(0===r?t.keyHash:t.keyHash>>>r),u=31&(0===r?n:n>>>r),s=a===u?[ze(t,e,r+5,n,o)]:(i=new Pe(e,n,o),a<u?[t,i]:[i,t]);return new Ae(e,1<<a|1<<u,s)}function qe(t){return t=(t=(858993459&(t-=t>>1&1431655765))+(t>>2&858993459))+(t>>4)&252645135,t+=t>>8,127&(t+=t>>16)}function Fe(t,e,r,n){var o=n?t:zt(t);return o[e]=r,o}var We=8,He=16,Ge=8;function Ke(t){return Boolean(t&&t["@@__IMMUTABLE_LIST__@@"])}var Ve=function(t){function e(e){var r=tr();if(null==e)return r;if(Ke(e))return e;var n=t(e),o=n.size;return 0===o?r:(Ft(o),o>0&&o<32?Qe(0,o,5,null,new $e(n.toArray())):r.withMutations((function(t){t.setSize(o),n.forEach((function(e,r){return t.set(r,e)}))})))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("List [","]")},e.prototype.get=function(t,e){if((t=u(this,t))>=0&&t<this.size){var r=nr(this,t+=this._origin);return r&&r.array[31&t]}return e},e.prototype.set=function(t,e){return function(t,e,r){if((e=u(t,e))!=e)return t;if(e>=t.size||e<0)return t.withMutations((function(t){e<0?or(t,e).set(0,r):or(t,0,e+1).set(e,r)}));e+=t._origin;var n=t._tail,o=t._root,i={value:!1};e>=ir(t._capacity)?n=er(n,t.__ownerID,0,e,r,i):o=er(o,t.__ownerID,t._level,e,r,i);if(!i.value)return t;if(t.__ownerID)return t._root=o,t._tail=n,t.__hash=void 0,t.__altered=!0,t;return Qe(t._origin,t._capacity,t._level,o,n)}(this,t,e)},e.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},e.prototype.insert=function(t,e){return this.splice(t,0,e)},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=5,this._root=this._tail=this.__hash=void 0,this.__altered=!0,this):tr()},e.prototype.push=function(){var t=arguments,e=this.size;return this.withMutations((function(r){or(r,0,e+t.length);for(var n=0;n<t.length;n++)r.set(e+n,t[n])}))},e.prototype.pop=function(){return or(this,0,-1)},e.prototype.unshift=function(){var t=arguments;return this.withMutations((function(e){or(e,-t.length);for(var r=0;r<t.length;r++)e.set(r,t[r])}))},e.prototype.shift=function(){return or(this,1)},e.prototype.concat=function(){for(var e=arguments,r=[],n=0;n<arguments.length;n++){var o=e[n],i=t("string"!=typeof o&&I(o)?o:[o]);0!==i.size&&r.push(i)}return 0===r.length?this:0!==this.size||this.__ownerID||1!==r.length?this.withMutations((function(t){r.forEach((function(e){return e.forEach((function(e){return t.push(e)}))}))})):this.constructor(r[0])},e.prototype.setSize=function(t){return or(this,0,t)},e.prototype.map=function(t,e){var r=this;return this.withMutations((function(n){for(var o=0;o<r.size;o++)n.set(o,t.call(e,n.get(o),o,r))}))},e.prototype.slice=function(t,e){var r=this.size;return c(t,e,r)?this:or(this,f(t,r),l(e,r))},e.prototype.__iterator=function(t,e){var r=e?this.size:0,n=Ze(this,e);return new T((function(){var o=n();return o===Xe?{value:void 0,done:!0}:P(t,e?--r:r++,o)}))},e.prototype.__iterate=function(t,e){for(var r,n=e?this.size:0,o=Ze(this,e);(r=o())!==Xe&&!1!==t(r,e?--n:n++,this););return n},e.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Qe(this._origin,this._capacity,this._level,this._root,this._tail,t,this.__hash):0===this.size?tr():(this.__ownerID=t,this.__altered=!1,this)},e}(b);Ve.isList=Ke;var Ye=Ve.prototype;Ye["@@__IMMUTABLE_LIST__@@"]=!0,Ye.delete=Ye.remove,Ye.merge=Ye.concat,Ye.setIn=ee,Ye.deleteIn=Ye.removeIn=ne,Ye.update=ie,Ye.updateIn=ae,Ye.mergeIn=me,Ye.mergeDeepIn=_e,Ye.withMutations=be,Ye.wasAltered=Se,Ye.asImmutable=Oe,Ye["@@transducer/init"]=Ye.asMutable=we,Ye["@@transducer/step"]=function(t,e){return t.push(e)},Ye["@@transducer/result"]=function(t){return t.asImmutable()};var $e=function(t,e){this.array=t,this.ownerID=e};$e.prototype.removeBefore=function(t,e,r){if(r===e?1<<e:0===this.array.length)return this;var n=r>>>e&31;if(n>=this.array.length)return new $e([],t);var o,i=0===n;if(e>0){var a=this.array[n];if((o=a&&a.removeBefore(t,e-5,r))===a&&i)return this}if(i&&!o)return this;var u=rr(this,t);if(!i)for(var s=0;s<n;s++)u.array[s]=void 0;return o&&(u.array[n]=o),u},$e.prototype.removeAfter=function(t,e,r){if(r===(e?1<<e:0)||0===this.array.length)return this;var n,o=r-1>>>e&31;if(o>=this.array.length)return this;if(e>0){var i=this.array[o];if((n=i&&i.removeAfter(t,e-5,r))===i&&o===this.array.length-1)return this}var a=rr(this,t);return a.array.splice(o+1),n&&(a.array[o]=n),a};var Je,Xe={};function Ze(t,e){var r=t._origin,n=t._capacity,o=ir(n),i=t._tail;return a(t._root,t._level,0);function a(t,u,s){return 0===u?function(t,a){var u=a===o?i&&i.array:t&&t.array,s=a>r?0:r-a,c=n-a;c>32&&(c=32);return function(){if(s===c)return Xe;var t=e?--c:s++;return u&&u[t]}}(t,s):function(t,o,i){var u,s=t&&t.array,c=i>r?0:r-i>>o,f=1+(n-i>>o);f>32&&(f=32);return function(){for(;;){if(u){var t=u();if(t!==Xe)return t;u=null}if(c===f)return Xe;var r=e?--f:c++;u=a(s&&s[r],o-5,i+(r<<o))}}}(t,u,s)}}function Qe(t,e,r,n,o,i,a){var u=Object.create(Ye);return u.size=e-t,u._origin=t,u._capacity=e,u._level=r,u._root=n,u._tail=o,u.__ownerID=i,u.__hash=a,u.__altered=!1,u}function tr(){return Je||(Je=Qe(0,0,5))}function er(t,e,r,n,i,a){var u,s=n>>>r&31,c=t&&s<t.array.length;if(!c&&void 0===i)return t;if(r>0){var f=t&&t.array[s],l=er(f,e,r-5,n,i,a);return l===f?t:((u=rr(t,e)).array[s]=l,u)}return c&&t.array[s]===i?t:(a&&o(a),u=rr(t,e),void 0===i&&s===u.array.length-1?u.array.pop():u.array[s]=i,u)}function rr(t,e){return e&&t&&e===t.ownerID?t:new $e(t?t.array.slice():[],e)}function nr(t,e){if(e>=ir(t._capacity))return t._tail;if(e<1<<t._level+5){for(var r=t._root,n=t._level;r&&n>0;)r=r.array[e>>>n&31],n-=5;return r}}function or(t,e,r){void 0!==e&&(e|=0),void 0!==r&&(r|=0);var n=t.__ownerID||new i,o=t._origin,a=t._capacity,u=o+e,s=void 0===r?a:r<0?a+r:o+r;if(u===o&&s===a)return t;if(u>=s)return t.clear();for(var c=t._level,f=t._root,l=0;u+l<0;)f=new $e(f&&f.array.length?[void 0,f]:[],n),l+=1<<(c+=5);l&&(u+=l,o+=l,s+=l,a+=l);for(var p=ir(a),h=ir(s);h>=1<<c+5;)f=new $e(f&&f.array.length?[f]:[],n),c+=5;var d=t._tail,y=h<p?nr(t,s-1):h>p?new $e([],n):d;if(d&&h>p&&u<a&&d.array.length){for(var v=f=rr(f,n),g=c;g>5;g-=5){var m=p>>>g&31;v=v.array[m]=rr(v.array[m],n)}v.array[p>>>5&31]=d}if(s<a&&(y=y&&y.removeAfter(n,0,s)),u>=h)u-=h,s-=h,c=5,f=null,y=y&&y.removeBefore(n,0,u);else if(u>o||h<p){for(l=0;f;){var _=u>>>c&31;if(_!==h>>>c&31)break;_&&(l+=(1<<c)*_),c-=5,f=f.array[_]}f&&u>o&&(f=f.removeBefore(n,c,u-l)),f&&h<p&&(f=f.removeAfter(n,c,h-l)),l&&(u-=l,s-=l)}return t.__ownerID?(t.size=s-u,t._origin=u,t._capacity=s,t._level=c,t._root=f,t._tail=y,t.__hash=void 0,t.__altered=!0,t):Qe(u,s,c,f,y)}function ir(t){return t<32?0:t-1>>>5<<5}var ar,ur=function(t){function e(t){return null==t?cr():X(t)?t:cr().withMutations((function(e){var r=_(t);Ft(r.size),r.forEach((function(t,r){return e.set(r,t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("OrderedMap {","}")},e.prototype.get=function(t,e){var r=this._map.get(t);return void 0!==r?this._list.get(r)[1]:e},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this.__altered=!0,this):cr()},e.prototype.set=function(t,e){return fr(this,t,e)},e.prototype.remove=function(t){return fr(this,t,n)},e.prototype.__iterate=function(t,e){var r=this;return this._list.__iterate((function(e){return e&&t(e[1],e[0],r)}),e)},e.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},e.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),r=this._list.__ensureOwner(t);return t?sr(e,r,t,this.__hash):0===this.size?cr():(this.__ownerID=t,this.__altered=!1,this._map=e,this._list=r,this)},e}(Ee);function sr(t,e,r,n){var o=Object.create(ur.prototype);return o.size=t?t.size:0,o._map=t,o._list=e,o.__ownerID=r,o.__hash=n,o.__altered=!1,o}function cr(){return ar||(ar=sr(De(),tr()))}function fr(t,e,r){var o,i,a=t._map,u=t._list,s=a.get(e),c=void 0!==s;if(r===n){if(!c)return t;u.size>=32&&u.size>=2*a.size?(o=(i=u.filter((function(t,e){return void 0!==t&&s!==e}))).toKeyedSeq().map((function(t){return t[0]})).flip().toMap(),t.__ownerID&&(o.__ownerID=i.__ownerID=t.__ownerID)):(o=a.remove(e),i=s===u.size-1?u.pop():u.set(s,void 0))}else if(c){if(r===u.get(s)[1])return t;o=a,i=u.set(s,[e,r])}else o=a.set(e,u.size),i=u.set(u.size,[e,r]);return t.__ownerID?(t.size=o.size,t._map=o,t._list=i,t.__hash=void 0,t.__altered=!0,t):sr(o,i)}ur.isOrderedMap=X,ur.prototype[j]=!0,ur.prototype.delete=ur.prototype.remove;function lr(t){return Boolean(t&&t["@@__IMMUTABLE_STACK__@@"])}var pr=function(t){function e(t){return null==t?vr():lr(t)?t:vr().pushAll(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("Stack [","]")},e.prototype.get=function(t,e){var r=this._head;for(t=u(this,t);r&&t--;)r=r.next;return r?r.value:e},e.prototype.peek=function(){return this._head&&this._head.value},e.prototype.push=function(){var t=arguments;if(0===arguments.length)return this;for(var e=this.size+arguments.length,r=this._head,n=arguments.length-1;n>=0;n--)r={value:t[n],next:r};return this.__ownerID?(this.size=e,this._head=r,this.__hash=void 0,this.__altered=!0,this):yr(e,r)},e.prototype.pushAll=function(e){if(0===(e=t(e)).size)return this;if(0===this.size&&lr(e))return e;Ft(e.size);var r=this.size,n=this._head;return e.__iterate((function(t){r++,n={value:t,next:n}}),!0),this.__ownerID?(this.size=r,this._head=n,this.__hash=void 0,this.__altered=!0,this):yr(r,n)},e.prototype.pop=function(){return this.slice(1)},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):vr()},e.prototype.slice=function(e,r){if(c(e,r,this.size))return this;var n=f(e,this.size);if(l(r,this.size)!==this.size)return t.prototype.slice.call(this,e,r);for(var o=this.size-n,i=this._head;n--;)i=i.next;return this.__ownerID?(this.size=o,this._head=i,this.__hash=void 0,this.__altered=!0,this):yr(o,i)},e.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?yr(this.size,this._head,t,this.__hash):0===this.size?vr():(this.__ownerID=t,this.__altered=!1,this)},e.prototype.__iterate=function(t,e){var r=this;if(e)return new F(this.toArray()).__iterate((function(e,n){return t(e,n,r)}),e);for(var n=0,o=this._head;o&&!1!==t(o.value,n++,this);)o=o.next;return n},e.prototype.__iterator=function(t,e){if(e)return new F(this.toArray()).__iterator(t,e);var r=0,n=this._head;return new T((function(){if(n){var e=n.value;return n=n.next,P(t,r++,e)}return{value:void 0,done:!0}}))},e}(b);pr.isStack=lr;var hr,dr=pr.prototype;function yr(t,e,r,n){var o=Object.create(dr);return o.size=t,o._head=e,o.__ownerID=r,o.__hash=n,o.__altered=!1,o}function vr(){return hr||(hr=yr(0))}dr["@@__IMMUTABLE_STACK__@@"]=!0,dr.shift=dr.pop,dr.unshift=dr.push,dr.unshiftAll=dr.pushAll,dr.withMutations=be,dr.wasAltered=Se,dr.asImmutable=Oe,dr["@@transducer/init"]=dr.asMutable=we,dr["@@transducer/step"]=function(t,e){return t.unshift(e)},dr["@@transducer/result"]=function(t){return t.asImmutable()};function gr(t){return Boolean(t&&t["@@__IMMUTABLE_SET__@@"])}function mr(t){return gr(t)&&x(t)}function _r(t,e){if(t===e)return!0;if(!d(e)||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.__hash&&void 0!==e.__hash&&t.__hash!==e.__hash||y(t)!==y(e)||v(t)!==v(e)||x(t)!==x(e))return!1;if(0===t.size&&0===e.size)return!0;var r=!g(t);if(x(t)){var o=t.entries();return e.every((function(t,e){var n=o.next().value;return n&&Q(n[1],t)&&(r||Q(n[0],e))}))&&o.next().done}var i=!1;if(void 0===t.size)if(void 0===e.size)"function"==typeof t.cacheResult&&t.cacheResult();else{i=!0;var a=t;t=e,e=a}var u=!0,s=e.__iterate((function(e,o){if(r?!t.has(e):i?!Q(e,t.get(o,n)):!Q(t.get(o,n),e))return u=!1,!1}));return u&&t.size===s}function br(t,e){var r=function(r){t.prototype[r]=e[r]};return Object.keys(e).forEach(r),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(r),t}function wr(t){if(!t||"object"!=typeof t)return t;if(!d(t)){if(!Kt(t))return t;t=U(t)}if(y(t)){var e={};return t.__iterate((function(t,r){e[r]=wr(t)})),e}var r=[];return t.__iterate((function(t){r.push(wr(t))})),r}var Or=function(t){function e(e){return null==e?Ar():gr(e)&&!x(e)?e:Ar().withMutations((function(r){var n=t(e);Ft(n.size),n.forEach((function(t){return r.add(t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.fromKeys=function(t){return this(_(t).keySeq())},e.intersect=function(t){return(t=m(t).toArray()).length?Er.intersect.apply(e(t.pop()),t):Ar()},e.union=function(t){return(t=m(t).toArray()).length?Er.union.apply(e(t.pop()),t):Ar()},e.prototype.toString=function(){return this.__toString("Set {","}")},e.prototype.has=function(t){return this._map.has(t)},e.prototype.add=function(t){return jr(this,this._map.set(t,t))},e.prototype.remove=function(t){return jr(this,this._map.remove(t))},e.prototype.clear=function(){return jr(this,this._map.clear())},e.prototype.map=function(t,e){var r=this,n=!1,o=jr(this,this._map.mapEntries((function(o){var i=o[1],a=t.call(e,i,i,r);return a!==i&&(n=!0),[a,a]}),e));return n?o:this},e.prototype.union=function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];return 0===(e=e.filter((function(t){return 0!==t.size}))).length?this:0!==this.size||this.__ownerID||1!==e.length?this.withMutations((function(r){for(var n=0;n<e.length;n++)"string"==typeof e[n]?r.add(e[n]):t(e[n]).forEach((function(t){return r.add(t)}))})):this.constructor(e[0])},e.prototype.intersect=function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];if(0===e.length)return this;e=e.map((function(e){return t(e)}));var n=[];return this.forEach((function(t){e.every((function(e){return e.includes(t)}))||n.push(t)})),this.withMutations((function(t){n.forEach((function(e){t.remove(e)}))}))},e.prototype.subtract=function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];if(0===e.length)return this;e=e.map((function(e){return t(e)}));var n=[];return this.forEach((function(t){e.some((function(e){return e.includes(t)}))&&n.push(t)})),this.withMutations((function(t){n.forEach((function(e){t.remove(e)}))}))},e.prototype.sort=function(t){return Kr(Pt(this,t))},e.prototype.sortBy=function(t,e){return Kr(Pt(this,e,t))},e.prototype.wasAltered=function(){return this._map.wasAltered()},e.prototype.__iterate=function(t,e){var r=this;return this._map.__iterate((function(e){return t(e,e,r)}),e)},e.prototype.__iterator=function(t,e){return this._map.__iterator(t,e)},e.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t);return t?this.__make(e,t):0===this.size?this.__empty():(this.__ownerID=t,this._map=e,this)},e}(w);Or.isSet=gr;var Sr,Er=Or.prototype;function jr(t,e){return t.__ownerID?(t.size=e.size,t._map=e,t):e===t._map?t:0===e.size?t.__empty():t.__make(e)}function xr(t,e){var r=Object.create(Er);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function Ar(){return Sr||(Sr=xr(De()))}Er["@@__IMMUTABLE_SET__@@"]=!0,Er.delete=Er.remove,Er.merge=Er.concat=Er.union,Er.withMutations=be,Er.asImmutable=Oe,Er["@@transducer/init"]=Er.asMutable=we,Er["@@transducer/step"]=function(t,e){return t.add(e)},Er["@@transducer/result"]=function(t){return t.asImmutable()},Er.__empty=Ar,Er.__make=xr;var kr,Tr=function(t){function e(t,r,n){if(!(this instanceof e))return new e(t,r,n);if(qt(0!==n,"Cannot step a Range by 0"),t=t||0,void 0===r&&(r=1/0),n=void 0===n?1:Math.abs(n),r<t&&(n=-n),this._start=t,this._end=r,this._step=n,this.size=Math.max(0,Math.ceil((r-t)/n-1)+1),0===this.size){if(kr)return kr;kr=this}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},e.prototype.get=function(t,e){return this.has(t)?this._start+u(this,t)*this._step:e},e.prototype.includes=function(t){var e=(t-this._start)/this._step;return e>=0&&e<this.size&&e===Math.floor(e)},e.prototype.slice=function(t,r){return c(t,r,this.size)?this:(t=f(t,this.size),(r=l(r,this.size))<=t?new e(0,0):new e(this.get(t,this._end),this.get(r,this._end),this._step))},e.prototype.indexOf=function(t){var e=t-this._start;if(e%this._step==0){var r=e/this._step;if(r>=0&&r<this.size)return r}return-1},e.prototype.lastIndexOf=function(t){return this.indexOf(t)},e.prototype.__iterate=function(t,e){for(var r=this.size,n=this._step,o=e?this._start+(r-1)*n:this._start,i=0;i!==r&&!1!==t(o,e?r-++i:i++,this);)o+=e?-n:n;return i},e.prototype.__iterator=function(t,e){var r=this.size,n=this._step,o=e?this._start+(r-1)*n:this._start,i=0;return new T((function(){if(i===r)return{value:void 0,done:!0};var a=o;return o+=e?-n:n,P(t,e?r-++i:i++,a)}))},e.prototype.equals=function(t){return t instanceof e?this._start===t._start&&this._end===t._end&&this._step===t._step:_r(this,t)},e}(z);function Pr(t,e,r){for(var o=Wt(e),i=0;i!==o.length;)if((t=$t(t,o[i++],n))===n)return r;return t}function Rr(t,e){return Pr(this,t,e)}function Ir(t,e){return Pr(t,e,n)!==n}function Cr(){Ft(this.size);var t={};return this.__iterate((function(e,r){t[r]=e})),t}m.isIterable=d,m.isKeyed=y,m.isIndexed=v,m.isAssociative=g,m.isOrdered=x,m.Iterator=T,br(m,{toArray:function(){Ft(this.size);var t=new Array(this.size||0),e=y(this),r=0;return this.__iterate((function(n,o){t[r++]=e?[o,n]:n})),t},toIndexedSeq:function(){return new _t(this)},toJS:function(){return wr(this)},toKeyedSeq:function(){return new mt(this,!0)},toMap:function(){return Ee(this.toKeyedSeq())},toObject:Cr,toOrderedMap:function(){return ur(this.toKeyedSeq())},toOrderedSet:function(){return Kr(y(this)?this.valueSeq():this)},toSet:function(){return Or(y(this)?this.valueSeq():this)},toSetSeq:function(){return new bt(this)},toSeq:function(){return v(this)?this.toIndexedSeq():y(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return pr(y(this)?this.valueSeq():this)},toList:function(){return Ve(y(this)?this.valueSeq():this)},toString:function(){return"[Collection]"},__toString:function(t,e){return 0===this.size?t+e:t+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+e},concat:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return Lt(this,kt(this,t))},includes:function(t){return this.some((function(e){return Q(e,t)}))},entries:function(){return this.__iterator(2)},every:function(t,e){Ft(this.size);var r=!0;return this.__iterate((function(n,o,i){if(!t.call(e,n,o,i))return r=!1,!1})),r},filter:function(t,e){return Lt(this,jt(this,t,e,!0))},partition:function(t,e){return function(t,e,r){var n=y(t),o=[[],[]];t.__iterate((function(i,a){o[e.call(r,i,a,t)?1:0].push(n?[a,i]:i)}));var i=Dt(t);return o.map((function(e){return Lt(t,i(e))}))}(this,t,e)},find:function(t,e,r){var n=this.findEntry(t,e);return n?n[1]:r},forEach:function(t,e){return Ft(this.size),this.__iterate(e?t.bind(e):t)},join:function(t){Ft(this.size),t=void 0!==t?""+t:",";var e="",r=!0;return this.__iterate((function(n){r?r=!1:e+=t,e+=null!=n?n.toString():""})),e},keys:function(){return this.__iterator(0)},map:function(t,e){return Lt(this,St(this,t,e))},reduce:function(t,e,r){return Ur(this,t,e,r,arguments.length<2,!1)},reduceRight:function(t,e,r){return Ur(this,t,e,r,arguments.length<2,!0)},reverse:function(){return Lt(this,Et(this,!0))},slice:function(t,e){return Lt(this,xt(this,t,e,!0))},some:function(t,e){Ft(this.size);var r=!1;return this.__iterate((function(n,o,i){if(t.call(e,n,o,i))return r=!0,!1})),r},sort:function(t){return Lt(this,Pt(this,t))},values:function(){return this.__iterator(1)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(t,e){return a(t?this.toSeq().filter(t,e):this)},countBy:function(t,e){return function(t,e,r){var n=Ee().asMutable();return t.__iterate((function(o,i){n.update(e.call(r,o,i,t),0,(function(t){return t+1}))})),n.asImmutable()}(this,t,e)},equals:function(t){return _r(this,t)},entrySeq:function(){var t=this;if(t._cache)return new F(t._cache);var e=t.toSeq().map(zr).toIndexedSeq();return e.fromEntrySeq=function(){return t.toSeq()},e},filterNot:function(t,e){return this.filter(qr(t),e)},findEntry:function(t,e,r){var n=r;return this.__iterate((function(r,o,i){if(t.call(e,r,o,i))return n=[o,r],!1})),n},findKey:function(t,e){var r=this.findEntry(t,e);return r&&r[0]},findLast:function(t,e,r){return this.toKeyedSeq().reverse().find(t,e,r)},findLastEntry:function(t,e,r){return this.toKeyedSeq().reverse().findEntry(t,e,r)},findLastKey:function(t,e){return this.toKeyedSeq().reverse().findKey(t,e)},first:function(t){return this.find(s,null,t)},flatMap:function(t,e){return Lt(this,function(t,e,r){var n=Dt(t);return t.toSeq().map((function(o,i){return n(e.call(r,o,i,t))})).flatten(!0)}(this,t,e))},flatten:function(t){return Lt(this,Tt(this,t,!0))},fromEntrySeq:function(){return new wt(this)},get:function(t,e){return this.find((function(e,r){return Q(r,t)}),void 0,e)},getIn:Rr,groupBy:function(t,e){return function(t,e,r){var n=y(t),o=(x(t)?ur():Ee()).asMutable();t.__iterate((function(i,a){o.update(e.call(r,i,a,t),(function(t){return(t=t||[]).push(n?[a,i]:i),t}))}));var i=Dt(t);return o.map((function(e){return Lt(t,i(e))})).asImmutable()}(this,t,e)},has:function(t){return this.get(t,n)!==n},hasIn:function(t){return Ir(this,t)},isSubset:function(t){return t="function"==typeof t.includes?t:m(t),this.every((function(e){return t.includes(e)}))},isSuperset:function(t){return(t="function"==typeof t.isSubset?t:m(t)).isSubset(this)},keyOf:function(t){return this.findKey((function(e){return Q(e,t)}))},keySeq:function(){return this.toSeq().map(Br).toIndexedSeq()},last:function(t){return this.toSeq().reverse().first(t)},lastKeyOf:function(t){return this.toKeyedSeq().reverse().keyOf(t)},max:function(t){return Rt(this,t)},maxBy:function(t,e){return Rt(this,e,t)},min:function(t){return Rt(this,t?Fr(t):Hr)},minBy:function(t,e){return Rt(this,e?Fr(e):Hr,t)},rest:function(){return this.slice(1)},skip:function(t){return 0===t?this:this.slice(Math.max(0,t))},skipLast:function(t){return 0===t?this:this.slice(0,-Math.max(0,t))},skipWhile:function(t,e){return Lt(this,At(this,t,e,!0))},skipUntil:function(t,e){return this.skipWhile(qr(t),e)},sortBy:function(t,e){return Lt(this,Pt(this,e,t))},take:function(t){return this.slice(0,Math.max(0,t))},takeLast:function(t){return this.slice(-Math.max(0,t))},takeWhile:function(t,e){return Lt(this,function(t,e,r){var n=Nt(t);return n.__iterateUncached=function(n,o){var i=this;if(o)return this.cacheResult().__iterate(n,o);var a=0;return t.__iterate((function(t,o,u){return e.call(r,t,o,u)&&++a&&n(t,o,i)})),a},n.__iteratorUncached=function(n,o){var i=this;if(o)return this.cacheResult().__iterator(n,o);var a=t.__iterator(2,o),u=!0;return new T((function(){if(!u)return{value:void 0,done:!0};var t=a.next();if(t.done)return t;var o=t.value,s=o[0],c=o[1];return e.call(r,c,s,i)?2===n?t:P(n,s,c,t):(u=!1,{value:void 0,done:!0})}))},n}(this,t,e))},takeUntil:function(t,e){return this.takeWhile(qr(t),e)},update:function(t){return t(this)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=function(t){if(t.size===1/0)return 0;var e=x(t),r=y(t),n=e?1:0;return function(t,e){return e=tt(e,3432918353),e=tt(e<<15|e>>>-15,461845907),e=tt(e<<13|e>>>-13,5),e=tt((e=(e+3864292196|0)^t)^e>>>16,2246822507),e=et((e=tt(e^e>>>13,3266489909))^e>>>16)}(t.__iterate(r?e?function(t,e){n=31*n+Gr(nt(t),nt(e))|0}:function(t,e){n=n+Gr(nt(t),nt(e))|0}:e?function(t){n=31*n+nt(t)|0}:function(t){n=n+nt(t)|0}),n)}(this))}});var Lr=m.prototype;Lr["@@__IMMUTABLE_ITERABLE__@@"]=!0,Lr[k]=Lr.values,Lr.toJSON=Lr.toArray,Lr.__toStringMapper=Vt,Lr.inspect=Lr.toSource=function(){return this.toString()},Lr.chain=Lr.flatMap,Lr.contains=Lr.includes,br(_,{flip:function(){return Lt(this,Ot(this))},mapEntries:function(t,e){var r=this,n=0;return Lt(this,this.toSeq().map((function(o,i){return t.call(e,[i,o],n++,r)})).fromEntrySeq())},mapKeys:function(t,e){var r=this;return Lt(this,this.toSeq().flip().map((function(n,o){return t.call(e,n,o,r)})).flip())}});var Mr=_.prototype;Mr["@@__IMMUTABLE_KEYED__@@"]=!0,Mr[k]=Lr.entries,Mr.toJSON=Cr,Mr.__toStringMapper=function(t,e){return Vt(e)+": "+Vt(t)},br(b,{toKeyedSeq:function(){return new mt(this,!1)},filter:function(t,e){return Lt(this,jt(this,t,e,!1))},findIndex:function(t,e){var r=this.findEntry(t,e);return r?r[0]:-1},indexOf:function(t){var e=this.keyOf(t);return void 0===e?-1:e},lastIndexOf:function(t){var e=this.lastKeyOf(t);return void 0===e?-1:e},reverse:function(){return Lt(this,Et(this,!1))},slice:function(t,e){return Lt(this,xt(this,t,e,!1))},splice:function(t,e){var r=arguments.length;if(e=Math.max(e||0,0),0===r||2===r&&!e)return this;t=f(t,t<0?this.count():this.size);var n=this.slice(0,t);return Lt(this,1===r?n:n.concat(zt(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var r=this.findLastEntry(t,e);return r?r[0]:-1},first:function(t){return this.get(0,t)},flatten:function(t){return Lt(this,Tt(this,t,!1))},get:function(t,e){return(t=u(this,t))<0||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find((function(e,r){return r===t}),void 0,e)},has:function(t){return(t=u(this,t))>=0&&(void 0!==this.size?this.size===1/0||t<this.size:-1!==this.indexOf(t))},interpose:function(t){return Lt(this,function(t,e){var r=Nt(t);return r.size=t.size&&2*t.size-1,r.__iterateUncached=function(r,n){var o=this,i=0;return t.__iterate((function(t){return(!i||!1!==r(e,i++,o))&&!1!==r(t,i++,o)}),n),i},r.__iteratorUncached=function(r,n){var o,i=t.__iterator(1,n),a=0;return new T((function(){return(!o||a%2)&&(o=i.next()).done?o:a%2?P(r,a++,e):P(r,a++,o.value,o)}))},r}(this,t))},interleave:function(){var t=[this].concat(zt(arguments)),e=Ct(this.toSeq(),z.of,t),r=e.flatten(!0);return e.size&&(r.size=e.size*t.length),Lt(this,r)},keySeq:function(){return Tr(0,this.size)},last:function(t){return this.get(-1,t)},skipWhile:function(t,e){return Lt(this,At(this,t,e,!1))},zip:function(){var t=[this].concat(zt(arguments));return Lt(this,Ct(this,Wr,t))},zipAll:function(){var t=[this].concat(zt(arguments));return Lt(this,Ct(this,Wr,t,!0))},zipWith:function(t){var e=zt(arguments);return e[0]=this,Lt(this,Ct(this,t,e))}});var Dr=b.prototype;Dr["@@__IMMUTABLE_INDEXED__@@"]=!0,Dr[j]=!0,br(w,{get:function(t,e){return this.has(t)?t:e},includes:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}});var Nr=w.prototype;function Ur(t,e,r,n,o,i){return Ft(t.size),t.__iterate((function(t,i,a){o?(o=!1,r=t):r=e.call(n,r,t,i,a)}),i),r}function Br(t,e){return e}function zr(t,e){return[e,t]}function qr(t){return function(){return!t.apply(this,arguments)}}function Fr(t){return function(){return-t.apply(this,arguments)}}function Wr(){return zt(arguments)}function Hr(t,e){return t<e?1:t>e?-1:0}function Gr(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}Nr.has=Lr.includes,Nr.contains=Nr.includes,Nr.keys=Nr.values,br(B,Mr),br(z,Dr),br(q,Nr);var Kr=function(t){function e(t){return null==t?Jr():mr(t)?t:Jr().withMutations((function(e){var r=w(t);Ft(r.size),r.forEach((function(t){return e.add(t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.fromKeys=function(t){return this(_(t).keySeq())},e.prototype.toString=function(){return this.__toString("OrderedSet {","}")},e}(Or);Kr.isOrderedSet=mr;var Vr,Yr=Kr.prototype;function $r(t,e){var r=Object.create(Yr);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function Jr(){return Vr||(Vr=$r(cr()))}Yr[j]=!0,Yr.zip=Dr.zip,Yr.zipWith=Dr.zipWith,Yr.zipAll=Dr.zipAll,Yr.__empty=Jr,Yr.__make=$r;var Xr={LeftThenRight:-1,RightThenLeft:1};var Zr=function(t,e){var r;!function(t){if(S(t))throw new Error("Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.");if(E(t))throw new Error("Can not call `Record` with an immutable Collection as default values. Use a plain javascript object instead.");if(null===t||"object"!=typeof t)throw new Error("Can not call `Record` with a non-object as default values. Use a plain javascript object instead.")}(t);var n=function(i){var a=this;if(i instanceof n)return i;if(!(this instanceof n))return new n(i);if(!r){r=!0;var u=Object.keys(t),s=o._indices={};o._name=e,o._keys=u,o._defaultValues=t;for(var c=0;c<u.length;c++){var f=u[c];s[f]=c,o[f]?"object"==typeof console&&console.warn&&console.warn("Cannot define "+en(this)+' with property "'+f+'" since that property name is part of the Record API.'):nn(o,f)}}return this.__ownerID=void 0,this._values=Ve().withMutations((function(t){t.setSize(a._keys.length),_(i).forEach((function(e,r){t.set(a._indices[r],e===a._defaultValues[r]?void 0:e)}))})),this},o=n.prototype=Object.create(Qr);return o.constructor=n,e&&(n.displayName=e),n};Zr.prototype.toString=function(){for(var t,e=en(this)+" { ",r=this._keys,n=0,o=r.length;n!==o;n++)e+=(n?", ":"")+(t=r[n])+": "+Vt(this.get(t));return e+" }"},Zr.prototype.equals=function(t){return this===t||S(t)&&rn(this).equals(rn(t))},Zr.prototype.hashCode=function(){return rn(this).hashCode()},Zr.prototype.has=function(t){return this._indices.hasOwnProperty(t)},Zr.prototype.get=function(t,e){if(!this.has(t))return e;var r=this._indices[t],n=this._values.get(r);return void 0===n?this._defaultValues[t]:n},Zr.prototype.set=function(t,e){if(this.has(t)){var r=this._values.set(this._indices[t],e===this._defaultValues[t]?void 0:e);if(r!==this._values&&!this.__ownerID)return tn(this,r)}return this},Zr.prototype.remove=function(t){return this.set(t)},Zr.prototype.clear=function(){var t=this._values.clear().setSize(this._keys.length);return this.__ownerID?this:tn(this,t)},Zr.prototype.wasAltered=function(){return this._values.wasAltered()},Zr.prototype.toSeq=function(){return rn(this)},Zr.prototype.toJS=function(){return wr(this)},Zr.prototype.entries=function(){return this.__iterator(2)},Zr.prototype.__iterator=function(t,e){return rn(this).__iterator(t,e)},Zr.prototype.__iterate=function(t,e){return rn(this).__iterate(t,e)},Zr.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._values.__ensureOwner(t);return t?tn(this,e,t):(this.__ownerID=t,this._values=e,this)},Zr.isRecord=S,Zr.getDescriptiveName=en;var Qr=Zr.prototype;function tn(t,e,r){var n=Object.create(Object.getPrototypeOf(t));return n._values=e,n.__ownerID=r,n}function en(t){return t.constructor.displayName||t.constructor.name||"Record"}function rn(t){return V(t._keys.map((function(e){return[e,t.get(e)]})))}function nn(t,e){try{Object.defineProperty(t,e,{get:function(){return this.get(e)},set:function(t){qt(this.__ownerID,"Cannot set on an immutable record."),this.set(e,t)}})}catch(t){}}Qr["@@__IMMUTABLE_RECORD__@@"]=!0,Qr.delete=Qr.remove,Qr.deleteIn=Qr.removeIn=ne,Qr.getIn=Rr,Qr.hasIn=Lr.hasIn,Qr.merge=ue,Qr.mergeWith=se,Qr.mergeIn=me,Qr.mergeDeep=ve,Qr.mergeDeepWith=ge,Qr.mergeDeepIn=_e,Qr.setIn=ee,Qr.update=ie,Qr.updateIn=ae,Qr.withMutations=be,Qr.asMutable=we,Qr.asImmutable=Oe,Qr[k]=Qr.entries,Qr.toJSON=Qr.toObject=Lr.toObject,Qr.inspect=Qr.toSource=function(){return this.toString()};var on,an=function(t){function e(t,r){if(!(this instanceof e))return new e(t,r);if(this._value=t,this.size=void 0===r?1/0:Math.max(0,r),0===this.size){if(on)return on;on=this}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},e.prototype.get=function(t,e){return this.has(t)?this._value:e},e.prototype.includes=function(t){return Q(this._value,t)},e.prototype.slice=function(t,r){var n=this.size;return c(t,r,n)?this:new e(this._value,l(r,n)-f(t,n))},e.prototype.reverse=function(){return this},e.prototype.indexOf=function(t){return Q(this._value,t)?0:-1},e.prototype.lastIndexOf=function(t){return Q(this._value,t)?this.size:-1},e.prototype.__iterate=function(t,e){for(var r=this.size,n=0;n!==r&&!1!==t(this._value,e?r-++n:n++,this););return n},e.prototype.__iterator=function(t,e){var r=this,n=this.size,o=0;return new T((function(){return o===n?{value:void 0,done:!0}:P(t,e?n-++o:o++,r._value)}))},e.prototype.equals=function(t){return t instanceof e?Q(this._value,t._value):_r(t)},e}(z);function un(t,e){return function t(e,r,n,o,i,a){if("string"!=typeof n&&!E(n)&&(N(n)||I(n)||Gt(n))){if(~e.indexOf(n))throw new TypeError("Cannot convert circular structure to Immutable");e.push(n),i&&""!==o&&i.push(o);var u=r.call(a,o,U(n).map((function(o,a){return t(e,r,o,a,i,n)})),i&&i.slice());return e.pop(),i&&i.pop(),u}return n}([],e||sn,t,"",e&&e.length>2?[]:void 0,{"":t})}function sn(t,e){return v(e)?e.toList():y(e)?e.toMap():e.toSet()}var cn="4.3.4",fn={version:cn,Collection:m,Iterable:m,Seq:U,Map:Ee,OrderedMap:ur,List:Ve,Stack:pr,Set:Or,OrderedSet:Kr,PairSorting:Xr,Record:Zr,Range:Tr,Repeat:an,is:Q,fromJS:un,hash:nt,isImmutable:E,isCollection:d,isKeyed:y,isIndexed:v,isAssociative:g,isOrdered:x,isValueObject:Z,isPlainObject:Gt,isSeq:O,isList:Ke,isMap:J,isOrderedMap:X,isStack:lr,isSet:gr,isOrderedSet:mr,isRecord:S,get:$t,getIn:Pr,has:Yt,hasIn:Ir,merge:fe,mergeDeep:pe,mergeWith:le,mergeDeepWith:he,remove:Xt,removeIn:re,set:Zt,setIn:te,update:oe,updateIn:Qt},ln=m;e.default=fn},function(t,e,r){"use strict";(function(t){r.d(e,"c",(function(){return y})),r.d(e,"a",(function(){return w})),r.d(e,"b",(function(){return v}));var n=r(5),o=r.n(n),i=r(3),a=r.n(i),u=r(30),s=r(17),c=r.n(s),f=r(27),l=r(20),p=r.n(l);function h(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function d(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?h(Object(r),!0).forEach((function(e){a()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function y(e){var r=e.link,n=t.from(e.clientID+":"+e.clientSecret).toString("base64");n="Basic "+n;var o=g(e,r.href),i={method:r.method,baseURL:o,url:r.href,headers:{Accept:r.responseType,"Content-Type":r.type,Authorization:n},withCredentials:!1,data:{grant_type:"password",username:e.user,password:e.password},validateStatus:function(t){return t>=200&&t<300},transformResponse:function(t){return t},transformRequest:function(t){return c.a.stringify(t)}};return m(i,e,i)}function v(t){var e=t.link,r=t.logonInfo,n=d({},e),i=t.hasOwnProperty("payload")?t.payload:null,a=null,u=null,s=null,c=null,f=null;null!==i&&(f=_(i,"action"),a=_(i,"qs"),u=_(i,"data"),s=_(i,"headers"),c=_(i,"xsrf"));var l=g(r,n.href),p=null!==(f=null!=f?f.toLowerCase():null)?"".concat(n.href,"/").concat(f):"".concat(n.href);n.hasOwnProperty("customHandling")&&null!==f&&"table.upload"===f&&(n.method="PUT",n.type="application/octet-stream",n.responseType="application/json");var h={method:n.method,baseURL:l,url:p,transformResponse:function(t){return t},validateStatus:function(t){return 302===t||304===t||t>=200&&t<300},headers:{}};null!==r.token?h.headers.Authorization=r.tokenType+" "+r.token:h.withCredentials=null==t.withCredentials||t.withCredentials;var y=b(n.type);if(n.hasOwnProperty("responseType")?(null!==y&&(h.headers["Content-Type"]=y),h.headers.Accept=b(n.responseType)):null!==y&&(h.headers.Accept=y,"PUT"!==n.method&&"POST"!==n.method&&"PATCH"!==n.method||(h.headers["Content-Type"]=y)),null!==s)for(var v in s)"json-parameters"===v.toLowerCase()?h.headers[v]="object"===o()(s[v])?JSON.stringify(s[v]):s[v]:h.headers[v]=s[v];if(null!==c){var w=c["x-csrf-header"];null!=w&&(h.xsrfCookieName=null,h.xsrfHeaderName=w,h.headers[w]=c[w]),null!=c["tkhttp-id"]&&(h.headers["tkhttp-id"]=c["tkhttp-id"])}else"ADD_SERVICE"===h.type&&(h.xsrfHeaderName="X_CSRF_TOKEN",h.headers["X-CSRF-TOKEN"]="Fetch");null!==a&&(h.params=d({},a)),h.data=null===u?{}:u,h.maxContentLength=20126512;var O=t.storeConfig.httpOptions;if(null!=O)for(var S in O)h[S]=O[S];return function(t,e){var r=t.logonInfo.options;if(null!=r&&null!=r.proxyServer){var n=r.proxy;null!=n.pathname&&n.pathname.trim().length>0&&(e.url="".concat(n.pathname).concat(e.url)),e.baseURL="".concat(n.protocol,"//").concat(n.host)}}(t,h),m(h,t,r)}function g(t,e){var r=t.host;if(null!=t.options&&null!=t.options.ns){var n=e.split("/")[1];r="".concat(t.protocol).concat(n,".{logInfo.options.ns}.svc.cluster.local")}return r}function m(t,e,r){if("https://"===r.protocol&&null==t.agent){var n=null!=r.sslOptions?r.sslOptions:{},i=new p.a.Agent(n);t.httpsAgent=i}return new Promise((function(r,n){Object(u.a)(t).then((function(t){var i;(i=t.data,new Promise((function(t,e){if("object"===o()(i))t(i);else{var r=i.replace(/\r?\n|\r/g," ");try{t(JSON.parse(r))}catch(e){t(i)}}}))).then((function(o){e.data=null,t.data={results:o,iconfig:Object.assign({},e)},o.hasOwnProperty("errorCode")?(t.status=t.data.results.httpStatusCode,t.statusText="errorCode: ".concat(t.data.results.errorCode),n({response:t})):r(Object(f.a)(t))})).catch((function(){e.data=null,t.data={results:t.data,iconfig:Object.assign({},e)},r(Object(f.a)(t))}))})).catch((function(t){n(t)}))}))}function _(t,e){for(var r=0,n=Object.keys(t);r<n.length;r++){var o=n[r];if(o.toUpperCase()===e.toUpperCase())return t[o]}return null}function b(t){var e=t;return null==e?e=null:-1!==e.indexOf("application/vnd")&&-1===e.indexOf("+json")&&(e+="+json"),e}function w(t){return Object(u.a)(t.payload)}u.a.interceptors.response.use((function(t){return t}),(function(t){return Promise.reject(t)}))}).call(this,r(9).Buffer)},function(t,e,r){"use strict";
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("restaf",[],e):"object"==typeof exports?exports.restaf=e():t.restaf=e()}(window,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=58)}([function(t,e,r){"use strict";(function(t,n){var o=r(21);const{toString:i}=Object.prototype,{getPrototypeOf:a}=Object,{iterator:u,toStringTag:s}=Symbol,c=(f=Object.create(null),t=>{const e=i.call(t);return f[e]||(f[e]=e.slice(8,-1).toLowerCase())});var f;const l=t=>(t=t.toLowerCase(),e=>c(e)===t),p=t=>e=>typeof e===t,{isArray:h}=Array,d=p("undefined");const y=l("ArrayBuffer");const v=p("string"),g=p("function"),m=p("number"),_=t=>null!==t&&"object"==typeof t,b=t=>{if("object"!==c(t))return!1;const e=a(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||s in t||u in t)},w=l("Date"),O=l("File"),S=l("Blob"),E=l("FileList"),j=l("URLSearchParams"),[x,A,k,T]=["ReadableStream","Request","Response","Headers"].map(l);function P(t,e,{allOwnKeys:r=!1}={}){if(null==t)return;let n,o;if("object"!=typeof t&&(t=[t]),h(t))for(n=0,o=t.length;n<o;n++)e.call(null,t[n],n,t);else{const o=r?Object.getOwnPropertyNames(t):Object.keys(t),i=o.length;let a;for(n=0;n<i;n++)a=o[n],e.call(null,t[a],a,t)}}function R(t,e){e=e.toLowerCase();const r=Object.keys(t);let n,o=r.length;for(;o-- >0;)if(n=r[o],e===n.toLowerCase())return n;return null}const I="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:Object({}),C=t=>!d(t)&&t!==I;const L=(M="undefined"!=typeof Uint8Array&&a(Uint8Array),t=>M&&t instanceof M);var M;const D=l("HTMLFormElement"),N=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),U=l("RegExp"),B=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};P(r,(r,o)=>{let i;!1!==(i=e(r,o,t))&&(n[o]=i||r)}),Object.defineProperties(t,n)};const z=l("AsyncFunction"),q=(F="function"==typeof t,W=g(I.postMessage),F?t:W?(H="axios@"+Math.random(),G=[],I.addEventListener("message",({source:t,data:e})=>{t===I&&e===H&&G.length&&G.shift()()},!1),t=>{G.push(t),I.postMessage(H,"*")}):t=>setTimeout(t));var F,W,H,G;const K="undefined"!=typeof queueMicrotask?queueMicrotask.bind(I):void 0!==n&&n.nextTick||q;e.a={isArray:h,isArrayBuffer:y,isBuffer:function(t){return null!==t&&!d(t)&&null!==t.constructor&&!d(t.constructor)&&g(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||g(t.append)&&("formdata"===(e=c(t))||"object"===e&&g(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&y(t.buffer),e},isString:v,isNumber:m,isBoolean:t=>!0===t||!1===t,isObject:_,isPlainObject:b,isReadableStream:x,isRequest:A,isResponse:k,isHeaders:T,isUndefined:d,isDate:w,isFile:O,isBlob:S,isRegExp:U,isFunction:g,isStream:t=>_(t)&&g(t.pipe),isURLSearchParams:j,isTypedArray:L,isFileList:E,forEach:P,merge:function t(){const{caseless:e}=C(this)&&this||{},r={},n=(n,o)=>{const i=e&&R(r,o)||o;b(r[i])&&b(n)?r[i]=t(r[i],n):b(n)?r[i]=t({},n):h(n)?r[i]=n.slice():r[i]=n};for(let t=0,e=arguments.length;t<e;t++)arguments[t]&&P(arguments[t],n);return r},extend:(t,e,r,{allOwnKeys:n}={})=>(P(e,(e,n)=>{r&&g(e)?t[n]=Object(o.a)(e,r):t[n]=e},{allOwnKeys:n}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},toFlatObject:(t,e,r,n)=>{let o,i,u;const s={};if(e=e||{},null==t)return e;do{for(o=Object.getOwnPropertyNames(t),i=o.length;i-- >0;)u=o[i],n&&!n(u,t,e)||s[u]||(e[u]=t[u],s[u]=!0);t=!1!==r&&a(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},kindOf:c,kindOfTest:l,endsWith:(t,e,r)=>{t=String(t),(void 0===r||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return-1!==n&&n===r},toArray:t=>{if(!t)return null;if(h(t))return t;let e=t.length;if(!m(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},forEachEntry:(t,e)=>{const r=(t&&t[u]).call(t);let n;for(;(n=r.next())&&!n.done;){const r=n.value;e.call(t,r[0],r[1])}},matchAll:(t,e)=>{let r;const n=[];for(;null!==(r=t.exec(e));)n.push(r);return n},isHTMLForm:D,hasOwnProperty:N,hasOwnProp:N,reduceDescriptors:B,freezeMethods:t=>{B(t,(e,r)=>{if(g(t)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=t[r];g(n)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))})},toObjectSet:(t,e)=>{const r={},n=t=>{t.forEach(t=>{r[t]=!0})};return h(t)?n(t):n(String(t).split(e)),r},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,r){return e.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(t,e)=>null!=t&&Number.isFinite(t=+t)?t:e,findKey:R,global:I,isContextDefined:C,isSpecCompliantForm:function(t){return!!(t&&g(t.append)&&"FormData"===t[s]&&t[u])},toJSONObject:t=>{const e=new Array(10),r=(t,n)=>{if(_(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[n]=t;const o=h(t)?[]:{};return P(t,(t,e)=>{const i=r(t,n+1);!d(i)&&(o[e]=i)}),e[n]=void 0,o}}return t};return r(t,0)},isAsyncFn:z,isThenable:t=>t&&(_(t)||g(t))&&g(t.then)&&g(t.catch),setImmediate:q,asap:K,isIterable:t=>null!=t&&g(t[u])}}).call(this,r(47).setImmediate,r(11))},function(t,e,r){var n=r(61)();t.exports=n;try{regeneratorRuntime=n}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},function(t,e,r){"use strict";var n=r(0);function o(t,e,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}n.a.inherits(o,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n.a.toJSONObject(this.config),code:this.code,status:this.status}}});const i=o.prototype,a={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{a[t]={value:t}}),Object.defineProperties(o,a),Object.defineProperty(i,"isAxiosError",{value:!0}),o.from=(t,e,r,a,u,s)=>{const c=Object.create(i);return n.a.toFlatObject(t,c,(function(t){return t!==Error.prototype}),t=>"isAxiosError"!==t),o.call(c,t.message,e,r,a,u),c.cause=t,c.name=t.name,s&&Object.assign(c,s),c},e.a=o},function(t,e,r){var n=r(59);t.exports=function(t,e,r){return(e=n(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){function r(t,e,r,n,o,i,a){try{var u=t[i](a),s=u.value}catch(t){return void r(t)}u.done?e(s):Promise.resolve(s).then(n,o)}t.exports=function(t){return function(){var e=this,n=arguments;return new Promise((function(o,i){var a=t.apply(e,n);function u(t){r(a,o,i,u,s,"next",t)}function s(t){r(a,o,i,u,s,"throw",t)}u(void 0)}))}},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){function r(e){return t.exports=r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,r(e)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){var n=r(111),o=r(112),i=r(113),a=r(114);t.exports=function(t){return n(t)||o(t)||i(t)||a()},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){"use strict";r.r(e),r.d(e,"Collection",(function(){return m})),r.d(e,"Iterable",(function(){return ln})),r.d(e,"List",(function(){return Ve})),r.d(e,"Map",(function(){return Ee})),r.d(e,"OrderedMap",(function(){return ur})),r.d(e,"OrderedSet",(function(){return Kr})),r.d(e,"PairSorting",(function(){return Xr})),r.d(e,"Range",(function(){return Tr})),r.d(e,"Record",(function(){return Zr})),r.d(e,"Repeat",(function(){return an})),r.d(e,"Seq",(function(){return U})),r.d(e,"Set",(function(){return Or})),r.d(e,"Stack",(function(){return pr})),r.d(e,"fromJS",(function(){return un})),r.d(e,"get",(function(){return $t})),r.d(e,"getIn",(function(){return Pr})),r.d(e,"has",(function(){return Yt})),r.d(e,"hasIn",(function(){return Ir})),r.d(e,"hash",(function(){return nt})),r.d(e,"is",(function(){return Q})),r.d(e,"isAssociative",(function(){return g})),r.d(e,"isCollection",(function(){return d})),r.d(e,"isImmutable",(function(){return E})),r.d(e,"isIndexed",(function(){return v})),r.d(e,"isKeyed",(function(){return y})),r.d(e,"isList",(function(){return Ke})),r.d(e,"isMap",(function(){return J})),r.d(e,"isOrdered",(function(){return x})),r.d(e,"isOrderedMap",(function(){return X})),r.d(e,"isOrderedSet",(function(){return mr})),r.d(e,"isPlainObject",(function(){return Gt})),r.d(e,"isRecord",(function(){return S})),r.d(e,"isSeq",(function(){return O})),r.d(e,"isSet",(function(){return gr})),r.d(e,"isStack",(function(){return lr})),r.d(e,"isValueObject",(function(){return Z})),r.d(e,"merge",(function(){return fe})),r.d(e,"mergeDeep",(function(){return pe})),r.d(e,"mergeDeepWith",(function(){return he})),r.d(e,"mergeWith",(function(){return le})),r.d(e,"remove",(function(){return Xt})),r.d(e,"removeIn",(function(){return re})),r.d(e,"set",(function(){return Zt})),r.d(e,"setIn",(function(){return te})),r.d(e,"update",(function(){return oe})),r.d(e,"updateIn",(function(){return Qt})),r.d(e,"version",(function(){return cn}));var n={};function o(t){t&&(t.value=!0)}function i(){}function a(t){return void 0===t.size&&(t.size=t.__iterate(s)),t.size}function u(t,e){if("number"!=typeof e){var r=e>>>0;if(""+r!==e||4294967295===r)return NaN;e=r}return e<0?a(t)+e:e}function s(){return!0}function c(t,e,r){return(0===t&&!h(t)||void 0!==r&&t<=-r)&&(void 0===e||void 0!==r&&e>=r)}function f(t,e){return p(t,e,0)}function l(t,e){return p(t,e,e)}function p(t,e,r){return void 0===t?r:h(t)?e===1/0?e:0|Math.max(0,e+t):void 0===e||e===t?t:0|Math.min(e,t)}function h(t){return t<0||0===t&&1/t==-1/0}function d(t){return Boolean(t&&t["@@__IMMUTABLE_ITERABLE__@@"])}function y(t){return Boolean(t&&t["@@__IMMUTABLE_KEYED__@@"])}function v(t){return Boolean(t&&t["@@__IMMUTABLE_INDEXED__@@"])}function g(t){return y(t)||v(t)}var m=function(t){return d(t)?t:U(t)},_=function(t){function e(t){return y(t)?t:B(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(m),b=function(t){function e(t){return v(t)?t:z(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(m),w=function(t){function e(t){return d(t)&&!g(t)?t:q(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(m);m.Keyed=_,m.Indexed=b,m.Set=w;function O(t){return Boolean(t&&t["@@__IMMUTABLE_SEQ__@@"])}function S(t){return Boolean(t&&t["@@__IMMUTABLE_RECORD__@@"])}function E(t){return d(t)||S(t)}var j="@@__IMMUTABLE_ORDERED__@@";function x(t){return Boolean(t&&t[j])}var A="function"==typeof Symbol&&Symbol.iterator,k=A||"@@iterator",T=function(t){this.next=t};function P(t,e,r,n){var o=0===t?e:1===t?r:[e,r];return n?n.value=o:n={value:o,done:!1},n}function R(){return{value:void 0,done:!0}}function I(t){return!!Array.isArray(t)||!!M(t)}function C(t){return t&&"function"==typeof t.next}function L(t){var e=M(t);return e&&e.call(t)}function M(t){var e=t&&(A&&t[A]||t["@@iterator"]);if("function"==typeof e)return e}T.prototype.toString=function(){return"[Iterator]"},T.KEYS=0,T.VALUES=1,T.ENTRIES=2,T.prototype.inspect=T.prototype.toSource=function(){return this.toString()},T.prototype[k]=function(){return this};var D=Object.prototype.hasOwnProperty;function N(t){return!(!Array.isArray(t)&&"string"!=typeof t)||t&&"object"==typeof t&&Number.isInteger(t.length)&&t.length>=0&&(0===t.length?1===Object.keys(t).length:t.hasOwnProperty(t.length-1))}var U=function(t){function e(t){return null==t?K():E(t)?t.toSeq():function(t){var e=$(t);if(e)return(n=M(r=t))&&n===r.entries?e.fromEntrySeq():function(t){var e=M(t);return e&&e===t.keys}(t)?e.toSetSeq():e;var r,n;if("object"==typeof t)return new W(t);throw new TypeError("Expected Array or collection object of values, or keyed object: "+t)}(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toSeq=function(){return this},e.prototype.toString=function(){return this.__toString("Seq {","}")},e.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},e.prototype.__iterate=function(t,e){var r=this._cache;if(r){for(var n=r.length,o=0;o!==n;){var i=r[e?n-++o:o++];if(!1===t(i[1],i[0],this))break}return o}return this.__iterateUncached(t,e)},e.prototype.__iterator=function(t,e){var r=this._cache;if(r){var n=r.length,o=0;return new T((function(){if(o===n)return{value:void 0,done:!0};var i=r[e?n-++o:o++];return P(t,i[0],i[1])}))}return this.__iteratorUncached(t,e)},e}(m),B=function(t){function e(t){return null==t?K().toKeyedSeq():d(t)?y(t)?t.toSeq():t.fromEntrySeq():S(t)?t.toSeq():V(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toKeyedSeq=function(){return this},e}(U),z=function(t){function e(t){return null==t?K():d(t)?y(t)?t.entrySeq():t.toIndexedSeq():S(t)?t.toSeq().entrySeq():Y(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return e(arguments)},e.prototype.toIndexedSeq=function(){return this},e.prototype.toString=function(){return this.__toString("Seq [","]")},e}(U),q=function(t){function e(t){return(d(t)&&!g(t)?t:z(t)).toSetSeq()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return e(arguments)},e.prototype.toSetSeq=function(){return this},e}(U);U.isSeq=O,U.Keyed=B,U.Set=q,U.Indexed=z,U.prototype["@@__IMMUTABLE_SEQ__@@"]=!0;var F=function(t){function e(t){this._array=t,this.size=t.length}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t,e){return this.has(t)?this._array[u(this,t)]:e},e.prototype.__iterate=function(t,e){for(var r=this._array,n=r.length,o=0;o!==n;){var i=e?n-++o:o++;if(!1===t(r[i],i,this))break}return o},e.prototype.__iterator=function(t,e){var r=this._array,n=r.length,o=0;return new T((function(){if(o===n)return{value:void 0,done:!0};var i=e?n-++o:o++;return P(t,i,r[i])}))},e}(z),W=function(t){function e(t){var e=Object.keys(t).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t):[]);this._object=t,this._keys=e,this.size=e.length}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t,e){return void 0===e||this.has(t)?this._object[t]:e},e.prototype.has=function(t){return D.call(this._object,t)},e.prototype.__iterate=function(t,e){for(var r=this._object,n=this._keys,o=n.length,i=0;i!==o;){var a=n[e?o-++i:i++];if(!1===t(r[a],a,this))break}return i},e.prototype.__iterator=function(t,e){var r=this._object,n=this._keys,o=n.length,i=0;return new T((function(){if(i===o)return{value:void 0,done:!0};var a=n[e?o-++i:i++];return P(t,a,r[a])}))},e}(B);W.prototype[j]=!0;var H,G=function(t){function e(t){this._collection=t,this.size=t.length||t.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__iterateUncached=function(t,e){if(e)return this.cacheResult().__iterate(t,e);var r=L(this._collection),n=0;if(C(r))for(var o;!(o=r.next()).done&&!1!==t(o.value,n++,this););return n},e.prototype.__iteratorUncached=function(t,e){if(e)return this.cacheResult().__iterator(t,e);var r=L(this._collection);if(!C(r))return new T(R);var n=0;return new T((function(){var e=r.next();return e.done?e:P(t,n++,e.value)}))},e}(z);function K(){return H||(H=new F([]))}function V(t){var e=$(t);if(e)return e.fromEntrySeq();if("object"==typeof t)return new W(t);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+t)}function Y(t){var e=$(t);if(e)return e;throw new TypeError("Expected Array or collection object of values: "+t)}function $(t){return N(t)?new F(t):I(t)?new G(t):void 0}function J(t){return Boolean(t&&t["@@__IMMUTABLE_MAP__@@"])}function X(t){return J(t)&&x(t)}function Z(t){return Boolean(t&&"function"==typeof t.equals&&"function"==typeof t.hashCode)}function Q(t,e){if(t===e||t!=t&&e!=e)return!0;if(!t||!e)return!1;if("function"==typeof t.valueOf&&"function"==typeof e.valueOf){if((t=t.valueOf())===(e=e.valueOf())||t!=t&&e!=e)return!0;if(!t||!e)return!1}return!!(Z(t)&&Z(e)&&t.equals(e))}var tt="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(t,e){var r=65535&(t|=0),n=65535&(e|=0);return r*n+((t>>>16)*n+r*(e>>>16)<<16>>>0)|0};function et(t){return t>>>1&1073741824|3221225471&t}var rt=Object.prototype.valueOf;function nt(t){if(null==t)return ot(t);if("function"==typeof t.hashCode)return et(t.hashCode(t));var e,r=(e=t).valueOf!==rt&&"function"==typeof e.valueOf?e.valueOf(e):e;if(null==r)return ot(r);switch(typeof r){case"boolean":return r?1108378657:1108378656;case"number":return function(t){if(t!=t||t===1/0)return 0;var e=0|t;e!==t&&(e^=4294967295*t);for(;t>4294967295;)e^=t/=4294967295;return et(e)}(r);case"string":return r.length>dt?function(t){var e=gt[t];void 0===e&&(e=it(t),vt===yt&&(vt=0,gt={}),vt++,gt[t]=e);return e}(r):it(r);case"object":case"function":return function(t){var e;if(ft&&void 0!==(e=ct.get(t)))return e;if(void 0!==(e=t[ht]))return e;if(!ut){if(void 0!==(e=t.propertyIsEnumerable&&t.propertyIsEnumerable[ht]))return e;if(void 0!==(e=function(t){if(t&&t.nodeType>0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}(t)))return e}if(e=st(),ft)ct.set(t,e);else{if(void 0!==at&&!1===at(t))throw new Error("Non-extensible objects are not allowed as keys.");if(ut)Object.defineProperty(t,ht,{enumerable:!1,configurable:!1,writable:!1,value:e});else if(void 0!==t.propertyIsEnumerable&&t.propertyIsEnumerable===t.constructor.prototype.propertyIsEnumerable)t.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},t.propertyIsEnumerable[ht]=e;else{if(void 0===t.nodeType)throw new Error("Unable to set a non-enumerable property on object.");t[ht]=e}}return e}(r);case"symbol":return function(t){var e=lt[t];if(void 0!==e)return e;return e=st(),lt[t]=e,e}(r);default:if("function"==typeof r.toString)return it(r.toString());throw new Error("Value type "+typeof r+" cannot be hashed.")}}function ot(t){return null===t?1108378658:1108378659}function it(t){for(var e=0,r=0;r<t.length;r++)e=31*e+t.charCodeAt(r)|0;return et(e)}var at=Object.isExtensible,ut=function(){try{return Object.defineProperty({},"@",{}),!0}catch(t){return!1}}();function st(){var t=++pt;return 1073741824&pt&&(pt=0),t}var ct,ft="function"==typeof WeakMap;ft&&(ct=new WeakMap);var lt=Object.create(null),pt=0,ht="__immutablehash__";"function"==typeof Symbol&&(ht=Symbol(ht));var dt=16,yt=255,vt=0,gt={},mt=function(t){function e(t,e){this._iter=t,this._useKeys=e,this.size=t.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t,e){return this._iter.get(t,e)},e.prototype.has=function(t){return this._iter.has(t)},e.prototype.valueSeq=function(){return this._iter.valueSeq()},e.prototype.reverse=function(){var t=this,e=Et(this,!0);return this._useKeys||(e.valueSeq=function(){return t._iter.toSeq().reverse()}),e},e.prototype.map=function(t,e){var r=this,n=St(this,t,e);return this._useKeys||(n.valueSeq=function(){return r._iter.toSeq().map(t,e)}),n},e.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate((function(e,n){return t(e,n,r)}),e)},e.prototype.__iterator=function(t,e){return this._iter.__iterator(t,e)},e}(B);mt.prototype[j]=!0;var _t=function(t){function e(t){this._iter=t,this.size=t.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.includes=function(t){return this._iter.includes(t)},e.prototype.__iterate=function(t,e){var r=this,n=0;return e&&a(this),this._iter.__iterate((function(o){return t(o,e?r.size-++n:n++,r)}),e)},e.prototype.__iterator=function(t,e){var r=this,n=this._iter.__iterator(1,e),o=0;return e&&a(this),new T((function(){var i=n.next();return i.done?i:P(t,e?r.size-++o:o++,i.value,i)}))},e}(z),bt=function(t){function e(t){this._iter=t,this.size=t.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.has=function(t){return this._iter.includes(t)},e.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate((function(e){return t(e,e,r)}),e)},e.prototype.__iterator=function(t,e){var r=this._iter.__iterator(1,e);return new T((function(){var e=r.next();return e.done?e:P(t,e.value,e.value,e)}))},e}(q),wt=function(t){function e(t){this._iter=t,this.size=t.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.entrySeq=function(){return this._iter.toSeq()},e.prototype.__iterate=function(t,e){var r=this;return this._iter.__iterate((function(e){if(e){Mt(e);var n=d(e);return t(n?e.get(1):e[1],n?e.get(0):e[0],r)}}),e)},e.prototype.__iterator=function(t,e){var r=this._iter.__iterator(1,e);return new T((function(){for(;;){var e=r.next();if(e.done)return e;var n=e.value;if(n){Mt(n);var o=d(n);return P(t,o?n.get(0):n[0],o?n.get(1):n[1],e)}}}))},e}(B);function Ot(t){var e=Nt(t);return e._iter=t,e.size=t.size,e.flip=function(){return t},e.reverse=function(){var e=t.reverse.apply(this);return e.flip=function(){return t.reverse()},e},e.has=function(e){return t.includes(e)},e.includes=function(e){return t.has(e)},e.cacheResult=Ut,e.__iterateUncached=function(e,r){var n=this;return t.__iterate((function(t,r){return!1!==e(r,t,n)}),r)},e.__iteratorUncached=function(e,r){if(2===e){var n=t.__iterator(e,r);return new T((function(){var t=n.next();if(!t.done){var e=t.value[0];t.value[0]=t.value[1],t.value[1]=e}return t}))}return t.__iterator(1===e?0:1,r)},e}function St(t,e,r){var o=Nt(t);return o.size=t.size,o.has=function(e){return t.has(e)},o.get=function(o,i){var a=t.get(o,n);return a===n?i:e.call(r,a,o,t)},o.__iterateUncached=function(n,o){var i=this;return t.__iterate((function(t,o,a){return!1!==n(e.call(r,t,o,a),o,i)}),o)},o.__iteratorUncached=function(n,o){var i=t.__iterator(2,o);return new T((function(){var o=i.next();if(o.done)return o;var a=o.value,u=a[0];return P(n,u,e.call(r,a[1],u,t),o)}))},o}function Et(t,e){var r=this,n=Nt(t);return n._iter=t,n.size=t.size,n.reverse=function(){return t},t.flip&&(n.flip=function(){var e=Ot(t);return e.reverse=function(){return t.flip()},e}),n.get=function(r,n){return t.get(e?r:-1-r,n)},n.has=function(r){return t.has(e?r:-1-r)},n.includes=function(e){return t.includes(e)},n.cacheResult=Ut,n.__iterate=function(r,n){var o=this,i=0;return n&&a(t),t.__iterate((function(t,a){return r(t,e?a:n?o.size-++i:i++,o)}),!n)},n.__iterator=function(n,o){var i=0;o&&a(t);var u=t.__iterator(2,!o);return new T((function(){var t=u.next();if(t.done)return t;var a=t.value;return P(n,e?a[0]:o?r.size-++i:i++,a[1],t)}))},n}function jt(t,e,r,o){var i=Nt(t);return o&&(i.has=function(o){var i=t.get(o,n);return i!==n&&!!e.call(r,i,o,t)},i.get=function(o,i){var a=t.get(o,n);return a!==n&&e.call(r,a,o,t)?a:i}),i.__iterateUncached=function(n,i){var a=this,u=0;return t.__iterate((function(t,i,s){if(e.call(r,t,i,s))return u++,n(t,o?i:u-1,a)}),i),u},i.__iteratorUncached=function(n,i){var a=t.__iterator(2,i),u=0;return new T((function(){for(;;){var i=a.next();if(i.done)return i;var s=i.value,c=s[0],f=s[1];if(e.call(r,f,c,t))return P(n,o?c:u++,f,i)}}))},i}function xt(t,e,r,n){var o=t.size;if(c(e,r,o))return t;var i=f(e,o),a=l(r,o);if(i!=i||a!=a)return xt(t.toSeq().cacheResult(),e,r,n);var s,p=a-i;p==p&&(s=p<0?0:p);var h=Nt(t);return h.size=0===s?s:t.size&&s||void 0,!n&&O(t)&&s>=0&&(h.get=function(e,r){return(e=u(this,e))>=0&&e<s?t.get(e+i,r):r}),h.__iterateUncached=function(e,r){var o=this;if(0===s)return 0;if(r)return this.cacheResult().__iterate(e,r);var a=0,u=!0,c=0;return t.__iterate((function(t,r){if(!u||!(u=a++<i))return c++,!1!==e(t,n?r:c-1,o)&&c!==s})),c},h.__iteratorUncached=function(e,r){if(0!==s&&r)return this.cacheResult().__iterator(e,r);if(0===s)return new T(R);var o=t.__iterator(e,r),a=0,u=0;return new T((function(){for(;a++<i;)o.next();if(++u>s)return{value:void 0,done:!0};var t=o.next();return n||1===e||t.done?t:P(e,u-1,0===e?void 0:t.value[1],t)}))},h}function At(t,e,r,n){var o=Nt(t);return o.__iterateUncached=function(o,i){var a=this;if(i)return this.cacheResult().__iterate(o,i);var u=!0,s=0;return t.__iterate((function(t,i,c){if(!u||!(u=e.call(r,t,i,c)))return s++,o(t,n?i:s-1,a)})),s},o.__iteratorUncached=function(o,i){var a=this;if(i)return this.cacheResult().__iterator(o,i);var u=t.__iterator(2,i),s=!0,c=0;return new T((function(){var t,i,f;do{if((t=u.next()).done)return n||1===o?t:P(o,c++,0===o?void 0:t.value[1],t);var l=t.value;i=l[0],f=l[1],s&&(s=e.call(r,f,i,a))}while(s);return 2===o?t:P(o,i,f,t)}))},o}function kt(t,e){var r=y(t),n=[t].concat(e).map((function(t){return d(t)?r&&(t=_(t)):t=r?V(t):Y(Array.isArray(t)?t:[t]),t})).filter((function(t){return 0!==t.size}));if(0===n.length)return t;if(1===n.length){var o=n[0];if(o===t||r&&y(o)||v(t)&&v(o))return o}var i=new F(n);return r?i=i.toKeyedSeq():v(t)||(i=i.toSetSeq()),(i=i.flatten(!0)).size=n.reduce((function(t,e){if(void 0!==t){var r=e.size;if(void 0!==r)return t+r}}),0),i}function Tt(t,e,r){var n=Nt(t);return n.__iterateUncached=function(o,i){if(i)return this.cacheResult().__iterate(o,i);var a=0,u=!1;return function t(s,c){s.__iterate((function(i,s){return(!e||c<e)&&d(i)?t(i,c+1):(a++,!1===o(i,r?s:a-1,n)&&(u=!0)),!u}),i)}(t,0),a},n.__iteratorUncached=function(n,o){if(o)return this.cacheResult().__iterator(n,o);var i=t.__iterator(n,o),a=[],u=0;return new T((function(){for(;i;){var t=i.next();if(!1===t.done){var s=t.value;if(2===n&&(s=s[1]),e&&!(a.length<e)||!d(s))return r?t:P(n,u++,s,t);a.push(i),i=s.__iterator(n,o)}else i=a.pop()}return{value:void 0,done:!0}}))},n}function Pt(t,e,r){e||(e=Bt);var n=y(t),o=0,i=t.toSeq().map((function(e,n){return[n,e,o++,r?r(e,n,t):e]})).valueSeq().toArray();return i.sort((function(t,r){return e(t[3],r[3])||t[2]-r[2]})).forEach(n?function(t,e){i[e].length=2}:function(t,e){i[e]=t[1]}),n?B(i):v(t)?z(i):q(i)}function Rt(t,e,r){if(e||(e=Bt),r){var n=t.toSeq().map((function(e,n){return[e,r(e,n,t)]})).reduce((function(t,r){return It(e,t[1],r[1])?r:t}));return n&&n[0]}return t.reduce((function(t,r){return It(e,t,r)?r:t}))}function It(t,e,r){var n=t(r,e);return 0===n&&r!==e&&(null==r||r!=r)||n>0}function Ct(t,e,r,n){var o=Nt(t),i=new F(r).map((function(t){return t.size}));return o.size=n?i.max():i.min(),o.__iterate=function(t,e){for(var r,n=this.__iterator(1,e),o=0;!(r=n.next()).done&&!1!==t(r.value,o++,this););return o},o.__iteratorUncached=function(t,o){var i=r.map((function(t){return t=m(t),L(o?t.reverse():t)})),a=0,u=!1;return new T((function(){var r;return u||(r=i.map((function(t){return t.next()})),u=n?r.every((function(t){return t.done})):r.some((function(t){return t.done}))),u?{value:void 0,done:!0}:P(t,a++,e.apply(null,r.map((function(t){return t.value}))))}))},o}function Lt(t,e){return t===e?t:O(t)?e:t.constructor(e)}function Mt(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function Dt(t){return y(t)?_:v(t)?b:w}function Nt(t){return Object.create((y(t)?B:v(t)?z:q).prototype)}function Ut(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):U.prototype.cacheResult.call(this)}function Bt(t,e){return void 0===t&&void 0===e?0:void 0===t?1:void 0===e?-1:t>e?1:t<e?-1:0}function zt(t,e){e=e||0;for(var r=Math.max(0,t.length-e),n=new Array(r),o=0;o<r;o++)n[o]=t[o+e];return n}function qt(t,e){if(!t)throw new Error(e)}function Ft(t){qt(t!==1/0,"Cannot perform this action with an infinite size.")}function Wt(t){if(N(t)&&"string"!=typeof t)return t;if(x(t))return t.toArray();throw new TypeError("Invalid keyPath: expected Ordered Collection or Array: "+t)}_t.prototype.cacheResult=mt.prototype.cacheResult=bt.prototype.cacheResult=wt.prototype.cacheResult=Ut;var Ht=Object.prototype.toString;function Gt(t){if(!t||"object"!=typeof t||"[object Object]"!==Ht.call(t))return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;for(var r=e,n=Object.getPrototypeOf(e);null!==n;)r=n,n=Object.getPrototypeOf(r);return r===e}function Kt(t){return"object"==typeof t&&(E(t)||Array.isArray(t)||Gt(t))}function Vt(t){try{return"string"==typeof t?JSON.stringify(t):String(t)}catch(e){return JSON.stringify(t)}}function Yt(t,e){return E(t)?t.has(e):Kt(t)&&D.call(t,e)}function $t(t,e,r){return E(t)?t.get(e,r):Yt(t,e)?"function"==typeof t.get?t.get(e):t[e]:r}function Jt(t){if(Array.isArray(t))return zt(t);var e={};for(var r in t)D.call(t,r)&&(e[r]=t[r]);return e}function Xt(t,e){if(!Kt(t))throw new TypeError("Cannot update non-data-structure value: "+t);if(E(t)){if(!t.remove)throw new TypeError("Cannot update immutable value without .remove() method: "+t);return t.remove(e)}if(!D.call(t,e))return t;var r=Jt(t);return Array.isArray(r)?r.splice(e,1):delete r[e],r}function Zt(t,e,r){if(!Kt(t))throw new TypeError("Cannot update non-data-structure value: "+t);if(E(t)){if(!t.set)throw new TypeError("Cannot update immutable value without .set() method: "+t);return t.set(e,r)}if(D.call(t,e)&&r===t[e])return t;var n=Jt(t);return n[e]=r,n}function Qt(t,e,r,o){o||(o=r,r=void 0);var i=function t(e,r,o,i,a,u){var s=r===n;if(i===o.length){var c=s?a:r,f=u(c);return f===c?r:f}if(!s&&!Kt(r))throw new TypeError("Cannot update within non-data-structure value in path ["+o.slice(0,i).map(Vt)+"]: "+r);var l=o[i],p=s?n:$t(r,l,n),h=t(p===n?e:E(p),p,o,i+1,a,u);return h===p?r:h===n?Xt(r,l):Zt(s?e?De():{}:r,l,h)}(E(t),t,Wt(e),0,r,o);return i===n?r:i}function te(t,e,r){return Qt(t,e,n,(function(){return r}))}function ee(t,e){return te(this,t,e)}function re(t,e){return Qt(t,e,(function(){return n}))}function ne(t){return re(this,t)}function oe(t,e,r,n){return Qt(t,[e],r,n)}function ie(t,e,r){return 1===arguments.length?t(this):oe(this,t,e,r)}function ae(t,e,r){return Qt(this,t,e,r)}function ue(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return ce(this,t)}function se(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];if("function"!=typeof t)throw new TypeError("Invalid merger function: "+t);return ce(this,e,t)}function ce(t,e,r){for(var o=[],i=0;i<e.length;i++){var a=_(e[i]);0!==a.size&&o.push(a)}return 0===o.length?t:0!==t.toSeq().size||t.__ownerID||1!==o.length?t.withMutations((function(t){for(var e=r?function(e,o){oe(t,o,n,(function(t){return t===n?e:r(t,e,o)}))}:function(e,r){t.set(r,e)},i=0;i<o.length;i++)o[i].forEach(e)})):t.constructor(o[0])}function fe(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return ye(t,e)}function le(t,e){for(var r=[],n=arguments.length-2;n-- >0;)r[n]=arguments[n+2];return ye(e,r,t)}function pe(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return de(t,e)}function he(t,e){for(var r=[],n=arguments.length-2;n-- >0;)r[n]=arguments[n+2];return de(e,r,t)}function de(t,e,r){return ye(t,e,function(t){return function e(r,n,o){return Kt(r)&&Kt(n)&&(i=n,a=U(r),u=U(i),v(a)===v(u)&&y(a)===y(u))?ye(r,[n],e):t?t(r,n,o):n;var i,a,u}}(r))}function ye(t,e,r){if(!Kt(t))throw new TypeError("Cannot merge into non-data-structure value: "+t);if(E(t))return"function"==typeof r&&t.mergeWith?t.mergeWith.apply(t,[r].concat(e)):t.merge?t.merge.apply(t,e):t.concat.apply(t,e);for(var n=Array.isArray(t),o=t,i=n?b:_,a=n?function(e){o===t&&(o=Jt(o)),o.push(e)}:function(e,n){var i=D.call(o,n),a=i&&r?r(o[n],e,n):e;i&&a===o[n]||(o===t&&(o=Jt(o)),o[n]=a)},u=0;u<e.length;u++)i(e[u]).forEach(a);return o}function ve(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return de(this,t)}function ge(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return de(this,e,t)}function me(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return Qt(this,t,De(),(function(t){return ye(t,e)}))}function _e(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return Qt(this,t,De(),(function(t){return de(t,e)}))}function be(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this}function we(){return this.__ownerID?this:this.__ensureOwner(new i)}function Oe(){return this.__ensureOwner()}function Se(){return this.__altered}var Ee=function(t){function e(e){return null==e?De():J(e)&&!x(e)?e:De().withMutations((function(r){var n=t(e);Ft(n.size),n.forEach((function(t,e){return r.set(e,t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return De().withMutations((function(e){for(var r=0;r<t.length;r+=2){if(r+1>=t.length)throw new Error("Missing value for key: "+t[r]);e.set(t[r],t[r+1])}}))},e.prototype.toString=function(){return this.__toString("Map {","}")},e.prototype.get=function(t,e){return this._root?this._root.get(0,void 0,t,e):e},e.prototype.set=function(t,e){return Ne(this,t,e)},e.prototype.remove=function(t){return Ne(this,t,n)},e.prototype.deleteAll=function(t){var e=m(t);return 0===e.size?this:this.withMutations((function(t){e.forEach((function(e){return t.remove(e)}))}))},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):De()},e.prototype.sort=function(t){return ur(Pt(this,t))},e.prototype.sortBy=function(t,e){return ur(Pt(this,e,t))},e.prototype.map=function(t,e){var r=this;return this.withMutations((function(n){n.forEach((function(o,i){n.set(i,t.call(e,o,i,r))}))}))},e.prototype.__iterator=function(t,e){return new Ie(this,t,e)},e.prototype.__iterate=function(t,e){var r=this,n=0;return this._root&&this._root.iterate((function(e){return n++,t(e[1],e[0],r)}),e),n},e.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Me(this.size,this._root,t,this.__hash):0===this.size?De():(this.__ownerID=t,this.__altered=!1,this)},e}(_);Ee.isMap=J;var je=Ee.prototype;je["@@__IMMUTABLE_MAP__@@"]=!0,je.delete=je.remove,je.removeAll=je.deleteAll,je.setIn=ee,je.removeIn=je.deleteIn=ne,je.update=ie,je.updateIn=ae,je.merge=je.concat=ue,je.mergeWith=se,je.mergeDeep=ve,je.mergeDeepWith=ge,je.mergeIn=me,je.mergeDeepIn=_e,je.withMutations=be,je.wasAltered=Se,je.asImmutable=Oe,je["@@transducer/init"]=je.asMutable=we,je["@@transducer/step"]=function(t,e){return t.set(e[0],e[1])},je["@@transducer/result"]=function(t){return t.asImmutable()};var xe=function(t,e){this.ownerID=t,this.entries=e};xe.prototype.get=function(t,e,r,n){for(var o=this.entries,i=0,a=o.length;i<a;i++)if(Q(r,o[i][0]))return o[i][1];return n},xe.prototype.update=function(t,e,r,a,u,s,c){for(var f=u===n,l=this.entries,p=0,h=l.length;p<h&&!Q(a,l[p][0]);p++);var d=p<h;if(d?l[p][1]===u:f)return this;if(o(c),(f||!d)&&o(s),!f||1!==l.length){if(!d&&!f&&l.length>=We)return function(t,e,r,n){t||(t=new i);for(var o=new Pe(t,nt(r),[r,n]),a=0;a<e.length;a++){var u=e[a];o=o.update(t,0,void 0,u[0],u[1])}return o}(t,l,a,u);var y=t&&t===this.ownerID,v=y?l:zt(l);return d?f?p===h-1?v.pop():v[p]=v.pop():v[p]=[a,u]:v.push([a,u]),y?(this.entries=v,this):new xe(t,v)}};var Ae=function(t,e,r){this.ownerID=t,this.bitmap=e,this.nodes=r};Ae.prototype.get=function(t,e,r,n){void 0===e&&(e=nt(r));var o=1<<(31&(0===t?e:e>>>t)),i=this.bitmap;return 0==(i&o)?n:this.nodes[qe(i&o-1)].get(t+5,e,r,n)},Ae.prototype.update=function(t,e,r,o,i,a,u){void 0===r&&(r=nt(o));var s=31&(0===e?r:r>>>e),c=1<<s,f=this.bitmap,l=0!=(f&c);if(!l&&i===n)return this;var p=qe(f&c-1),h=this.nodes,d=l?h[p]:void 0,y=Ue(d,t,e+5,r,o,i,a,u);if(y===d)return this;if(!l&&y&&h.length>=He)return function(t,e,r,n,o){for(var i=0,a=new Array(32),u=0;0!==r;u++,r>>>=1)a[u]=1&r?e[i++]:void 0;return a[n]=o,new ke(t,i+1,a)}(t,h,f,s,y);if(l&&!y&&2===h.length&&Be(h[1^p]))return h[1^p];if(l&&y&&1===h.length&&Be(y))return y;var v=t&&t===this.ownerID,g=l?y?f:f^c:f|c,m=l?y?Fe(h,p,y,v):function(t,e,r){var n=t.length-1;if(r&&e===n)return t.pop(),t;for(var o=new Array(n),i=0,a=0;a<n;a++)a===e&&(i=1),o[a]=t[a+i];return o}(h,p,v):function(t,e,r,n){var o=t.length+1;if(n&&e+1===o)return t[e]=r,t;for(var i=new Array(o),a=0,u=0;u<o;u++)u===e?(i[u]=r,a=-1):i[u]=t[u+a];return i}(h,p,y,v);return v?(this.bitmap=g,this.nodes=m,this):new Ae(t,g,m)};var ke=function(t,e,r){this.ownerID=t,this.count=e,this.nodes=r};ke.prototype.get=function(t,e,r,n){void 0===e&&(e=nt(r));var o=31&(0===t?e:e>>>t),i=this.nodes[o];return i?i.get(t+5,e,r,n):n},ke.prototype.update=function(t,e,r,o,i,a,u){void 0===r&&(r=nt(o));var s=31&(0===e?r:r>>>e),c=i===n,f=this.nodes,l=f[s];if(c&&!l)return this;var p=Ue(l,t,e+5,r,o,i,a,u);if(p===l)return this;var h=this.count;if(l){if(!p&&--h<Ge)return function(t,e,r,n){for(var o=0,i=0,a=new Array(r),u=0,s=1,c=e.length;u<c;u++,s<<=1){var f=e[u];void 0!==f&&u!==n&&(o|=s,a[i++]=f)}return new Ae(t,o,a)}(t,f,h,s)}else h++;var d=t&&t===this.ownerID,y=Fe(f,s,p,d);return d?(this.count=h,this.nodes=y,this):new ke(t,h,y)};var Te=function(t,e,r){this.ownerID=t,this.keyHash=e,this.entries=r};Te.prototype.get=function(t,e,r,n){for(var o=this.entries,i=0,a=o.length;i<a;i++)if(Q(r,o[i][0]))return o[i][1];return n},Te.prototype.update=function(t,e,r,i,a,u,s){void 0===r&&(r=nt(i));var c=a===n;if(r!==this.keyHash)return c?this:(o(s),o(u),ze(this,t,e,r,[i,a]));for(var f=this.entries,l=0,p=f.length;l<p&&!Q(i,f[l][0]);l++);var h=l<p;if(h?f[l][1]===a:c)return this;if(o(s),(c||!h)&&o(u),c&&2===p)return new Pe(t,this.keyHash,f[1^l]);var d=t&&t===this.ownerID,y=d?f:zt(f);return h?c?l===p-1?y.pop():y[l]=y.pop():y[l]=[i,a]:y.push([i,a]),d?(this.entries=y,this):new Te(t,this.keyHash,y)};var Pe=function(t,e,r){this.ownerID=t,this.keyHash=e,this.entry=r};Pe.prototype.get=function(t,e,r,n){return Q(r,this.entry[0])?this.entry[1]:n},Pe.prototype.update=function(t,e,r,i,a,u,s){var c=a===n,f=Q(i,this.entry[0]);return(f?a===this.entry[1]:c)?this:(o(s),c?void o(u):f?t&&t===this.ownerID?(this.entry[1]=a,this):new Pe(t,this.keyHash,[i,a]):(o(u),ze(this,t,e,nt(i),[i,a])))},xe.prototype.iterate=Te.prototype.iterate=function(t,e){for(var r=this.entries,n=0,o=r.length-1;n<=o;n++)if(!1===t(r[e?o-n:n]))return!1},Ae.prototype.iterate=ke.prototype.iterate=function(t,e){for(var r=this.nodes,n=0,o=r.length-1;n<=o;n++){var i=r[e?o-n:n];if(i&&!1===i.iterate(t,e))return!1}},Pe.prototype.iterate=function(t,e){return t(this.entry)};var Re,Ie=function(t){function e(t,e,r){this._type=e,this._reverse=r,this._stack=t._root&&Le(t._root)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.next=function(){for(var t=this._type,e=this._stack;e;){var r=e.node,n=e.index++,o=void 0;if(r.entry){if(0===n)return Ce(t,r.entry)}else if(r.entries){if(n<=(o=r.entries.length-1))return Ce(t,r.entries[this._reverse?o-n:n])}else if(n<=(o=r.nodes.length-1)){var i=r.nodes[this._reverse?o-n:n];if(i){if(i.entry)return Ce(t,i.entry);e=this._stack=Le(i,e)}continue}e=this._stack=this._stack.__prev}return{value:void 0,done:!0}},e}(T);function Ce(t,e){return P(t,e[0],e[1])}function Le(t,e){return{node:t,index:0,__prev:e}}function Me(t,e,r,n){var o=Object.create(je);return o.size=t,o._root=e,o.__ownerID=r,o.__hash=n,o.__altered=!1,o}function De(){return Re||(Re=Me(0))}function Ne(t,e,r){var o,i;if(t._root){var a={value:!1},u={value:!1};if(o=Ue(t._root,t.__ownerID,0,void 0,e,r,a,u),!u.value)return t;i=t.size+(a.value?r===n?-1:1:0)}else{if(r===n)return t;i=1,o=new xe(t.__ownerID,[[e,r]])}return t.__ownerID?(t.size=i,t._root=o,t.__hash=void 0,t.__altered=!0,t):o?Me(i,o):De()}function Ue(t,e,r,i,a,u,s,c){return t?t.update(e,r,i,a,u,s,c):u===n?t:(o(c),o(s),new Pe(e,i,[a,u]))}function Be(t){return t.constructor===Pe||t.constructor===Te}function ze(t,e,r,n,o){if(t.keyHash===n)return new Te(e,n,[t.entry,o]);var i,a=31&(0===r?t.keyHash:t.keyHash>>>r),u=31&(0===r?n:n>>>r),s=a===u?[ze(t,e,r+5,n,o)]:(i=new Pe(e,n,o),a<u?[t,i]:[i,t]);return new Ae(e,1<<a|1<<u,s)}function qe(t){return t=(t=(858993459&(t-=t>>1&1431655765))+(t>>2&858993459))+(t>>4)&252645135,t+=t>>8,127&(t+=t>>16)}function Fe(t,e,r,n){var o=n?t:zt(t);return o[e]=r,o}var We=8,He=16,Ge=8;function Ke(t){return Boolean(t&&t["@@__IMMUTABLE_LIST__@@"])}var Ve=function(t){function e(e){var r=tr();if(null==e)return r;if(Ke(e))return e;var n=t(e),o=n.size;return 0===o?r:(Ft(o),o>0&&o<32?Qe(0,o,5,null,new $e(n.toArray())):r.withMutations((function(t){t.setSize(o),n.forEach((function(e,r){return t.set(r,e)}))})))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("List [","]")},e.prototype.get=function(t,e){if((t=u(this,t))>=0&&t<this.size){var r=nr(this,t+=this._origin);return r&&r.array[31&t]}return e},e.prototype.set=function(t,e){return function(t,e,r){if((e=u(t,e))!=e)return t;if(e>=t.size||e<0)return t.withMutations((function(t){e<0?or(t,e).set(0,r):or(t,0,e+1).set(e,r)}));e+=t._origin;var n=t._tail,o=t._root,i={value:!1};e>=ir(t._capacity)?n=er(n,t.__ownerID,0,e,r,i):o=er(o,t.__ownerID,t._level,e,r,i);if(!i.value)return t;if(t.__ownerID)return t._root=o,t._tail=n,t.__hash=void 0,t.__altered=!0,t;return Qe(t._origin,t._capacity,t._level,o,n)}(this,t,e)},e.prototype.remove=function(t){return this.has(t)?0===t?this.shift():t===this.size-1?this.pop():this.splice(t,1):this},e.prototype.insert=function(t,e){return this.splice(t,0,e)},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=5,this._root=this._tail=this.__hash=void 0,this.__altered=!0,this):tr()},e.prototype.push=function(){var t=arguments,e=this.size;return this.withMutations((function(r){or(r,0,e+t.length);for(var n=0;n<t.length;n++)r.set(e+n,t[n])}))},e.prototype.pop=function(){return or(this,0,-1)},e.prototype.unshift=function(){var t=arguments;return this.withMutations((function(e){or(e,-t.length);for(var r=0;r<t.length;r++)e.set(r,t[r])}))},e.prototype.shift=function(){return or(this,1)},e.prototype.concat=function(){for(var e=arguments,r=[],n=0;n<arguments.length;n++){var o=e[n],i=t("string"!=typeof o&&I(o)?o:[o]);0!==i.size&&r.push(i)}return 0===r.length?this:0!==this.size||this.__ownerID||1!==r.length?this.withMutations((function(t){r.forEach((function(e){return e.forEach((function(e){return t.push(e)}))}))})):this.constructor(r[0])},e.prototype.setSize=function(t){return or(this,0,t)},e.prototype.map=function(t,e){var r=this;return this.withMutations((function(n){for(var o=0;o<r.size;o++)n.set(o,t.call(e,n.get(o),o,r))}))},e.prototype.slice=function(t,e){var r=this.size;return c(t,e,r)?this:or(this,f(t,r),l(e,r))},e.prototype.__iterator=function(t,e){var r=e?this.size:0,n=Ze(this,e);return new T((function(){var o=n();return o===Xe?{value:void 0,done:!0}:P(t,e?--r:r++,o)}))},e.prototype.__iterate=function(t,e){for(var r,n=e?this.size:0,o=Ze(this,e);(r=o())!==Xe&&!1!==t(r,e?--n:n++,this););return n},e.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?Qe(this._origin,this._capacity,this._level,this._root,this._tail,t,this.__hash):0===this.size?tr():(this.__ownerID=t,this.__altered=!1,this)},e}(b);Ve.isList=Ke;var Ye=Ve.prototype;Ye["@@__IMMUTABLE_LIST__@@"]=!0,Ye.delete=Ye.remove,Ye.merge=Ye.concat,Ye.setIn=ee,Ye.deleteIn=Ye.removeIn=ne,Ye.update=ie,Ye.updateIn=ae,Ye.mergeIn=me,Ye.mergeDeepIn=_e,Ye.withMutations=be,Ye.wasAltered=Se,Ye.asImmutable=Oe,Ye["@@transducer/init"]=Ye.asMutable=we,Ye["@@transducer/step"]=function(t,e){return t.push(e)},Ye["@@transducer/result"]=function(t){return t.asImmutable()};var $e=function(t,e){this.array=t,this.ownerID=e};$e.prototype.removeBefore=function(t,e,r){if(r===e?1<<e:0===this.array.length)return this;var n=r>>>e&31;if(n>=this.array.length)return new $e([],t);var o,i=0===n;if(e>0){var a=this.array[n];if((o=a&&a.removeBefore(t,e-5,r))===a&&i)return this}if(i&&!o)return this;var u=rr(this,t);if(!i)for(var s=0;s<n;s++)u.array[s]=void 0;return o&&(u.array[n]=o),u},$e.prototype.removeAfter=function(t,e,r){if(r===(e?1<<e:0)||0===this.array.length)return this;var n,o=r-1>>>e&31;if(o>=this.array.length)return this;if(e>0){var i=this.array[o];if((n=i&&i.removeAfter(t,e-5,r))===i&&o===this.array.length-1)return this}var a=rr(this,t);return a.array.splice(o+1),n&&(a.array[o]=n),a};var Je,Xe={};function Ze(t,e){var r=t._origin,n=t._capacity,o=ir(n),i=t._tail;return a(t._root,t._level,0);function a(t,u,s){return 0===u?function(t,a){var u=a===o?i&&i.array:t&&t.array,s=a>r?0:r-a,c=n-a;c>32&&(c=32);return function(){if(s===c)return Xe;var t=e?--c:s++;return u&&u[t]}}(t,s):function(t,o,i){var u,s=t&&t.array,c=i>r?0:r-i>>o,f=1+(n-i>>o);f>32&&(f=32);return function(){for(;;){if(u){var t=u();if(t!==Xe)return t;u=null}if(c===f)return Xe;var r=e?--f:c++;u=a(s&&s[r],o-5,i+(r<<o))}}}(t,u,s)}}function Qe(t,e,r,n,o,i,a){var u=Object.create(Ye);return u.size=e-t,u._origin=t,u._capacity=e,u._level=r,u._root=n,u._tail=o,u.__ownerID=i,u.__hash=a,u.__altered=!1,u}function tr(){return Je||(Je=Qe(0,0,5))}function er(t,e,r,n,i,a){var u,s=n>>>r&31,c=t&&s<t.array.length;if(!c&&void 0===i)return t;if(r>0){var f=t&&t.array[s],l=er(f,e,r-5,n,i,a);return l===f?t:((u=rr(t,e)).array[s]=l,u)}return c&&t.array[s]===i?t:(a&&o(a),u=rr(t,e),void 0===i&&s===u.array.length-1?u.array.pop():u.array[s]=i,u)}function rr(t,e){return e&&t&&e===t.ownerID?t:new $e(t?t.array.slice():[],e)}function nr(t,e){if(e>=ir(t._capacity))return t._tail;if(e<1<<t._level+5){for(var r=t._root,n=t._level;r&&n>0;)r=r.array[e>>>n&31],n-=5;return r}}function or(t,e,r){void 0!==e&&(e|=0),void 0!==r&&(r|=0);var n=t.__ownerID||new i,o=t._origin,a=t._capacity,u=o+e,s=void 0===r?a:r<0?a+r:o+r;if(u===o&&s===a)return t;if(u>=s)return t.clear();for(var c=t._level,f=t._root,l=0;u+l<0;)f=new $e(f&&f.array.length?[void 0,f]:[],n),l+=1<<(c+=5);l&&(u+=l,o+=l,s+=l,a+=l);for(var p=ir(a),h=ir(s);h>=1<<c+5;)f=new $e(f&&f.array.length?[f]:[],n),c+=5;var d=t._tail,y=h<p?nr(t,s-1):h>p?new $e([],n):d;if(d&&h>p&&u<a&&d.array.length){for(var v=f=rr(f,n),g=c;g>5;g-=5){var m=p>>>g&31;v=v.array[m]=rr(v.array[m],n)}v.array[p>>>5&31]=d}if(s<a&&(y=y&&y.removeAfter(n,0,s)),u>=h)u-=h,s-=h,c=5,f=null,y=y&&y.removeBefore(n,0,u);else if(u>o||h<p){for(l=0;f;){var _=u>>>c&31;if(_!==h>>>c&31)break;_&&(l+=(1<<c)*_),c-=5,f=f.array[_]}f&&u>o&&(f=f.removeBefore(n,c,u-l)),f&&h<p&&(f=f.removeAfter(n,c,h-l)),l&&(u-=l,s-=l)}return t.__ownerID?(t.size=s-u,t._origin=u,t._capacity=s,t._level=c,t._root=f,t._tail=y,t.__hash=void 0,t.__altered=!0,t):Qe(u,s,c,f,y)}function ir(t){return t<32?0:t-1>>>5<<5}var ar,ur=function(t){function e(t){return null==t?cr():X(t)?t:cr().withMutations((function(e){var r=_(t);Ft(r.size),r.forEach((function(t,r){return e.set(r,t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("OrderedMap {","}")},e.prototype.get=function(t,e){var r=this._map.get(t);return void 0!==r?this._list.get(r)[1]:e},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this.__altered=!0,this):cr()},e.prototype.set=function(t,e){return fr(this,t,e)},e.prototype.remove=function(t){return fr(this,t,n)},e.prototype.__iterate=function(t,e){var r=this;return this._list.__iterate((function(e){return e&&t(e[1],e[0],r)}),e)},e.prototype.__iterator=function(t,e){return this._list.fromEntrySeq().__iterator(t,e)},e.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t),r=this._list.__ensureOwner(t);return t?sr(e,r,t,this.__hash):0===this.size?cr():(this.__ownerID=t,this.__altered=!1,this._map=e,this._list=r,this)},e}(Ee);function sr(t,e,r,n){var o=Object.create(ur.prototype);return o.size=t?t.size:0,o._map=t,o._list=e,o.__ownerID=r,o.__hash=n,o.__altered=!1,o}function cr(){return ar||(ar=sr(De(),tr()))}function fr(t,e,r){var o,i,a=t._map,u=t._list,s=a.get(e),c=void 0!==s;if(r===n){if(!c)return t;u.size>=32&&u.size>=2*a.size?(o=(i=u.filter((function(t,e){return void 0!==t&&s!==e}))).toKeyedSeq().map((function(t){return t[0]})).flip().toMap(),t.__ownerID&&(o.__ownerID=i.__ownerID=t.__ownerID)):(o=a.remove(e),i=s===u.size-1?u.pop():u.set(s,void 0))}else if(c){if(r===u.get(s)[1])return t;o=a,i=u.set(s,[e,r])}else o=a.set(e,u.size),i=u.set(u.size,[e,r]);return t.__ownerID?(t.size=o.size,t._map=o,t._list=i,t.__hash=void 0,t.__altered=!0,t):sr(o,i)}ur.isOrderedMap=X,ur.prototype[j]=!0,ur.prototype.delete=ur.prototype.remove;function lr(t){return Boolean(t&&t["@@__IMMUTABLE_STACK__@@"])}var pr=function(t){function e(t){return null==t?vr():lr(t)?t:vr().pushAll(t)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("Stack [","]")},e.prototype.get=function(t,e){var r=this._head;for(t=u(this,t);r&&t--;)r=r.next;return r?r.value:e},e.prototype.peek=function(){return this._head&&this._head.value},e.prototype.push=function(){var t=arguments;if(0===arguments.length)return this;for(var e=this.size+arguments.length,r=this._head,n=arguments.length-1;n>=0;n--)r={value:t[n],next:r};return this.__ownerID?(this.size=e,this._head=r,this.__hash=void 0,this.__altered=!0,this):yr(e,r)},e.prototype.pushAll=function(e){if(0===(e=t(e)).size)return this;if(0===this.size&&lr(e))return e;Ft(e.size);var r=this.size,n=this._head;return e.__iterate((function(t){r++,n={value:t,next:n}}),!0),this.__ownerID?(this.size=r,this._head=n,this.__hash=void 0,this.__altered=!0,this):yr(r,n)},e.prototype.pop=function(){return this.slice(1)},e.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):vr()},e.prototype.slice=function(e,r){if(c(e,r,this.size))return this;var n=f(e,this.size);if(l(r,this.size)!==this.size)return t.prototype.slice.call(this,e,r);for(var o=this.size-n,i=this._head;n--;)i=i.next;return this.__ownerID?(this.size=o,this._head=i,this.__hash=void 0,this.__altered=!0,this):yr(o,i)},e.prototype.__ensureOwner=function(t){return t===this.__ownerID?this:t?yr(this.size,this._head,t,this.__hash):0===this.size?vr():(this.__ownerID=t,this.__altered=!1,this)},e.prototype.__iterate=function(t,e){var r=this;if(e)return new F(this.toArray()).__iterate((function(e,n){return t(e,n,r)}),e);for(var n=0,o=this._head;o&&!1!==t(o.value,n++,this);)o=o.next;return n},e.prototype.__iterator=function(t,e){if(e)return new F(this.toArray()).__iterator(t,e);var r=0,n=this._head;return new T((function(){if(n){var e=n.value;return n=n.next,P(t,r++,e)}return{value:void 0,done:!0}}))},e}(b);pr.isStack=lr;var hr,dr=pr.prototype;function yr(t,e,r,n){var o=Object.create(dr);return o.size=t,o._head=e,o.__ownerID=r,o.__hash=n,o.__altered=!1,o}function vr(){return hr||(hr=yr(0))}dr["@@__IMMUTABLE_STACK__@@"]=!0,dr.shift=dr.pop,dr.unshift=dr.push,dr.unshiftAll=dr.pushAll,dr.withMutations=be,dr.wasAltered=Se,dr.asImmutable=Oe,dr["@@transducer/init"]=dr.asMutable=we,dr["@@transducer/step"]=function(t,e){return t.unshift(e)},dr["@@transducer/result"]=function(t){return t.asImmutable()};function gr(t){return Boolean(t&&t["@@__IMMUTABLE_SET__@@"])}function mr(t){return gr(t)&&x(t)}function _r(t,e){if(t===e)return!0;if(!d(e)||void 0!==t.size&&void 0!==e.size&&t.size!==e.size||void 0!==t.__hash&&void 0!==e.__hash&&t.__hash!==e.__hash||y(t)!==y(e)||v(t)!==v(e)||x(t)!==x(e))return!1;if(0===t.size&&0===e.size)return!0;var r=!g(t);if(x(t)){var o=t.entries();return e.every((function(t,e){var n=o.next().value;return n&&Q(n[1],t)&&(r||Q(n[0],e))}))&&o.next().done}var i=!1;if(void 0===t.size)if(void 0===e.size)"function"==typeof t.cacheResult&&t.cacheResult();else{i=!0;var a=t;t=e,e=a}var u=!0,s=e.__iterate((function(e,o){if(r?!t.has(e):i?!Q(e,t.get(o,n)):!Q(t.get(o,n),e))return u=!1,!1}));return u&&t.size===s}function br(t,e){var r=function(r){t.prototype[r]=e[r]};return Object.keys(e).forEach(r),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(r),t}function wr(t){if(!t||"object"!=typeof t)return t;if(!d(t)){if(!Kt(t))return t;t=U(t)}if(y(t)){var e={};return t.__iterate((function(t,r){e[r]=wr(t)})),e}var r=[];return t.__iterate((function(t){r.push(wr(t))})),r}var Or=function(t){function e(e){return null==e?Ar():gr(e)&&!x(e)?e:Ar().withMutations((function(r){var n=t(e);Ft(n.size),n.forEach((function(t){return r.add(t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.fromKeys=function(t){return this(_(t).keySeq())},e.intersect=function(t){return(t=m(t).toArray()).length?Er.intersect.apply(e(t.pop()),t):Ar()},e.union=function(t){return(t=m(t).toArray()).length?Er.union.apply(e(t.pop()),t):Ar()},e.prototype.toString=function(){return this.__toString("Set {","}")},e.prototype.has=function(t){return this._map.has(t)},e.prototype.add=function(t){return jr(this,this._map.set(t,t))},e.prototype.remove=function(t){return jr(this,this._map.remove(t))},e.prototype.clear=function(){return jr(this,this._map.clear())},e.prototype.map=function(t,e){var r=this,n=!1,o=jr(this,this._map.mapEntries((function(o){var i=o[1],a=t.call(e,i,i,r);return a!==i&&(n=!0),[a,a]}),e));return n?o:this},e.prototype.union=function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];return 0===(e=e.filter((function(t){return 0!==t.size}))).length?this:0!==this.size||this.__ownerID||1!==e.length?this.withMutations((function(r){for(var n=0;n<e.length;n++)"string"==typeof e[n]?r.add(e[n]):t(e[n]).forEach((function(t){return r.add(t)}))})):this.constructor(e[0])},e.prototype.intersect=function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];if(0===e.length)return this;e=e.map((function(e){return t(e)}));var n=[];return this.forEach((function(t){e.every((function(e){return e.includes(t)}))||n.push(t)})),this.withMutations((function(t){n.forEach((function(e){t.remove(e)}))}))},e.prototype.subtract=function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];if(0===e.length)return this;e=e.map((function(e){return t(e)}));var n=[];return this.forEach((function(t){e.some((function(e){return e.includes(t)}))&&n.push(t)})),this.withMutations((function(t){n.forEach((function(e){t.remove(e)}))}))},e.prototype.sort=function(t){return Kr(Pt(this,t))},e.prototype.sortBy=function(t,e){return Kr(Pt(this,e,t))},e.prototype.wasAltered=function(){return this._map.wasAltered()},e.prototype.__iterate=function(t,e){var r=this;return this._map.__iterate((function(e){return t(e,e,r)}),e)},e.prototype.__iterator=function(t,e){return this._map.__iterator(t,e)},e.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._map.__ensureOwner(t);return t?this.__make(e,t):0===this.size?this.__empty():(this.__ownerID=t,this._map=e,this)},e}(w);Or.isSet=gr;var Sr,Er=Or.prototype;function jr(t,e){return t.__ownerID?(t.size=e.size,t._map=e,t):e===t._map?t:0===e.size?t.__empty():t.__make(e)}function xr(t,e){var r=Object.create(Er);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function Ar(){return Sr||(Sr=xr(De()))}Er["@@__IMMUTABLE_SET__@@"]=!0,Er.delete=Er.remove,Er.merge=Er.concat=Er.union,Er.withMutations=be,Er.asImmutable=Oe,Er["@@transducer/init"]=Er.asMutable=we,Er["@@transducer/step"]=function(t,e){return t.add(e)},Er["@@transducer/result"]=function(t){return t.asImmutable()},Er.__empty=Ar,Er.__make=xr;var kr,Tr=function(t){function e(t,r,n){if(!(this instanceof e))return new e(t,r,n);if(qt(0!==n,"Cannot step a Range by 0"),t=t||0,void 0===r&&(r=1/0),n=void 0===n?1:Math.abs(n),r<t&&(n=-n),this._start=t,this._end=r,this._step=n,this.size=Math.max(0,Math.ceil((r-t)/n-1)+1),0===this.size){if(kr)return kr;kr=this}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},e.prototype.get=function(t,e){return this.has(t)?this._start+u(this,t)*this._step:e},e.prototype.includes=function(t){var e=(t-this._start)/this._step;return e>=0&&e<this.size&&e===Math.floor(e)},e.prototype.slice=function(t,r){return c(t,r,this.size)?this:(t=f(t,this.size),(r=l(r,this.size))<=t?new e(0,0):new e(this.get(t,this._end),this.get(r,this._end),this._step))},e.prototype.indexOf=function(t){var e=t-this._start;if(e%this._step==0){var r=e/this._step;if(r>=0&&r<this.size)return r}return-1},e.prototype.lastIndexOf=function(t){return this.indexOf(t)},e.prototype.__iterate=function(t,e){for(var r=this.size,n=this._step,o=e?this._start+(r-1)*n:this._start,i=0;i!==r&&!1!==t(o,e?r-++i:i++,this);)o+=e?-n:n;return i},e.prototype.__iterator=function(t,e){var r=this.size,n=this._step,o=e?this._start+(r-1)*n:this._start,i=0;return new T((function(){if(i===r)return{value:void 0,done:!0};var a=o;return o+=e?-n:n,P(t,e?r-++i:i++,a)}))},e.prototype.equals=function(t){return t instanceof e?this._start===t._start&&this._end===t._end&&this._step===t._step:_r(this,t)},e}(z);function Pr(t,e,r){for(var o=Wt(e),i=0;i!==o.length;)if((t=$t(t,o[i++],n))===n)return r;return t}function Rr(t,e){return Pr(this,t,e)}function Ir(t,e){return Pr(t,e,n)!==n}function Cr(){Ft(this.size);var t={};return this.__iterate((function(e,r){t[r]=e})),t}m.isIterable=d,m.isKeyed=y,m.isIndexed=v,m.isAssociative=g,m.isOrdered=x,m.Iterator=T,br(m,{toArray:function(){Ft(this.size);var t=new Array(this.size||0),e=y(this),r=0;return this.__iterate((function(n,o){t[r++]=e?[o,n]:n})),t},toIndexedSeq:function(){return new _t(this)},toJS:function(){return wr(this)},toKeyedSeq:function(){return new mt(this,!0)},toMap:function(){return Ee(this.toKeyedSeq())},toObject:Cr,toOrderedMap:function(){return ur(this.toKeyedSeq())},toOrderedSet:function(){return Kr(y(this)?this.valueSeq():this)},toSet:function(){return Or(y(this)?this.valueSeq():this)},toSetSeq:function(){return new bt(this)},toSeq:function(){return v(this)?this.toIndexedSeq():y(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return pr(y(this)?this.valueSeq():this)},toList:function(){return Ve(y(this)?this.valueSeq():this)},toString:function(){return"[Collection]"},__toString:function(t,e){return 0===this.size?t+e:t+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+e},concat:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return Lt(this,kt(this,t))},includes:function(t){return this.some((function(e){return Q(e,t)}))},entries:function(){return this.__iterator(2)},every:function(t,e){Ft(this.size);var r=!0;return this.__iterate((function(n,o,i){if(!t.call(e,n,o,i))return r=!1,!1})),r},filter:function(t,e){return Lt(this,jt(this,t,e,!0))},partition:function(t,e){return function(t,e,r){var n=y(t),o=[[],[]];t.__iterate((function(i,a){o[e.call(r,i,a,t)?1:0].push(n?[a,i]:i)}));var i=Dt(t);return o.map((function(e){return Lt(t,i(e))}))}(this,t,e)},find:function(t,e,r){var n=this.findEntry(t,e);return n?n[1]:r},forEach:function(t,e){return Ft(this.size),this.__iterate(e?t.bind(e):t)},join:function(t){Ft(this.size),t=void 0!==t?""+t:",";var e="",r=!0;return this.__iterate((function(n){r?r=!1:e+=t,e+=null!=n?n.toString():""})),e},keys:function(){return this.__iterator(0)},map:function(t,e){return Lt(this,St(this,t,e))},reduce:function(t,e,r){return Ur(this,t,e,r,arguments.length<2,!1)},reduceRight:function(t,e,r){return Ur(this,t,e,r,arguments.length<2,!0)},reverse:function(){return Lt(this,Et(this,!0))},slice:function(t,e){return Lt(this,xt(this,t,e,!0))},some:function(t,e){Ft(this.size);var r=!1;return this.__iterate((function(n,o,i){if(t.call(e,n,o,i))return r=!0,!1})),r},sort:function(t){return Lt(this,Pt(this,t))},values:function(){return this.__iterator(1)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(t,e){return a(t?this.toSeq().filter(t,e):this)},countBy:function(t,e){return function(t,e,r){var n=Ee().asMutable();return t.__iterate((function(o,i){n.update(e.call(r,o,i,t),0,(function(t){return t+1}))})),n.asImmutable()}(this,t,e)},equals:function(t){return _r(this,t)},entrySeq:function(){var t=this;if(t._cache)return new F(t._cache);var e=t.toSeq().map(zr).toIndexedSeq();return e.fromEntrySeq=function(){return t.toSeq()},e},filterNot:function(t,e){return this.filter(qr(t),e)},findEntry:function(t,e,r){var n=r;return this.__iterate((function(r,o,i){if(t.call(e,r,o,i))return n=[o,r],!1})),n},findKey:function(t,e){var r=this.findEntry(t,e);return r&&r[0]},findLast:function(t,e,r){return this.toKeyedSeq().reverse().find(t,e,r)},findLastEntry:function(t,e,r){return this.toKeyedSeq().reverse().findEntry(t,e,r)},findLastKey:function(t,e){return this.toKeyedSeq().reverse().findKey(t,e)},first:function(t){return this.find(s,null,t)},flatMap:function(t,e){return Lt(this,function(t,e,r){var n=Dt(t);return t.toSeq().map((function(o,i){return n(e.call(r,o,i,t))})).flatten(!0)}(this,t,e))},flatten:function(t){return Lt(this,Tt(this,t,!0))},fromEntrySeq:function(){return new wt(this)},get:function(t,e){return this.find((function(e,r){return Q(r,t)}),void 0,e)},getIn:Rr,groupBy:function(t,e){return function(t,e,r){var n=y(t),o=(x(t)?ur():Ee()).asMutable();t.__iterate((function(i,a){o.update(e.call(r,i,a,t),(function(t){return(t=t||[]).push(n?[a,i]:i),t}))}));var i=Dt(t);return o.map((function(e){return Lt(t,i(e))})).asImmutable()}(this,t,e)},has:function(t){return this.get(t,n)!==n},hasIn:function(t){return Ir(this,t)},isSubset:function(t){return t="function"==typeof t.includes?t:m(t),this.every((function(e){return t.includes(e)}))},isSuperset:function(t){return(t="function"==typeof t.isSubset?t:m(t)).isSubset(this)},keyOf:function(t){return this.findKey((function(e){return Q(e,t)}))},keySeq:function(){return this.toSeq().map(Br).toIndexedSeq()},last:function(t){return this.toSeq().reverse().first(t)},lastKeyOf:function(t){return this.toKeyedSeq().reverse().keyOf(t)},max:function(t){return Rt(this,t)},maxBy:function(t,e){return Rt(this,e,t)},min:function(t){return Rt(this,t?Fr(t):Hr)},minBy:function(t,e){return Rt(this,e?Fr(e):Hr,t)},rest:function(){return this.slice(1)},skip:function(t){return 0===t?this:this.slice(Math.max(0,t))},skipLast:function(t){return 0===t?this:this.slice(0,-Math.max(0,t))},skipWhile:function(t,e){return Lt(this,At(this,t,e,!0))},skipUntil:function(t,e){return this.skipWhile(qr(t),e)},sortBy:function(t,e){return Lt(this,Pt(this,e,t))},take:function(t){return this.slice(0,Math.max(0,t))},takeLast:function(t){return this.slice(-Math.max(0,t))},takeWhile:function(t,e){return Lt(this,function(t,e,r){var n=Nt(t);return n.__iterateUncached=function(n,o){var i=this;if(o)return this.cacheResult().__iterate(n,o);var a=0;return t.__iterate((function(t,o,u){return e.call(r,t,o,u)&&++a&&n(t,o,i)})),a},n.__iteratorUncached=function(n,o){var i=this;if(o)return this.cacheResult().__iterator(n,o);var a=t.__iterator(2,o),u=!0;return new T((function(){if(!u)return{value:void 0,done:!0};var t=a.next();if(t.done)return t;var o=t.value,s=o[0],c=o[1];return e.call(r,c,s,i)?2===n?t:P(n,s,c,t):(u=!1,{value:void 0,done:!0})}))},n}(this,t,e))},takeUntil:function(t,e){return this.takeWhile(qr(t),e)},update:function(t){return t(this)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=function(t){if(t.size===1/0)return 0;var e=x(t),r=y(t),n=e?1:0;return function(t,e){return e=tt(e,3432918353),e=tt(e<<15|e>>>-15,461845907),e=tt(e<<13|e>>>-13,5),e=tt((e=(e+3864292196|0)^t)^e>>>16,2246822507),e=et((e=tt(e^e>>>13,3266489909))^e>>>16)}(t.__iterate(r?e?function(t,e){n=31*n+Gr(nt(t),nt(e))|0}:function(t,e){n=n+Gr(nt(t),nt(e))|0}:e?function(t){n=31*n+nt(t)|0}:function(t){n=n+nt(t)|0}),n)}(this))}});var Lr=m.prototype;Lr["@@__IMMUTABLE_ITERABLE__@@"]=!0,Lr[k]=Lr.values,Lr.toJSON=Lr.toArray,Lr.__toStringMapper=Vt,Lr.inspect=Lr.toSource=function(){return this.toString()},Lr.chain=Lr.flatMap,Lr.contains=Lr.includes,br(_,{flip:function(){return Lt(this,Ot(this))},mapEntries:function(t,e){var r=this,n=0;return Lt(this,this.toSeq().map((function(o,i){return t.call(e,[i,o],n++,r)})).fromEntrySeq())},mapKeys:function(t,e){var r=this;return Lt(this,this.toSeq().flip().map((function(n,o){return t.call(e,n,o,r)})).flip())}});var Mr=_.prototype;Mr["@@__IMMUTABLE_KEYED__@@"]=!0,Mr[k]=Lr.entries,Mr.toJSON=Cr,Mr.__toStringMapper=function(t,e){return Vt(e)+": "+Vt(t)},br(b,{toKeyedSeq:function(){return new mt(this,!1)},filter:function(t,e){return Lt(this,jt(this,t,e,!1))},findIndex:function(t,e){var r=this.findEntry(t,e);return r?r[0]:-1},indexOf:function(t){var e=this.keyOf(t);return void 0===e?-1:e},lastIndexOf:function(t){var e=this.lastKeyOf(t);return void 0===e?-1:e},reverse:function(){return Lt(this,Et(this,!1))},slice:function(t,e){return Lt(this,xt(this,t,e,!1))},splice:function(t,e){var r=arguments.length;if(e=Math.max(e||0,0),0===r||2===r&&!e)return this;t=f(t,t<0?this.count():this.size);var n=this.slice(0,t);return Lt(this,1===r?n:n.concat(zt(arguments,2),this.slice(t+e)))},findLastIndex:function(t,e){var r=this.findLastEntry(t,e);return r?r[0]:-1},first:function(t){return this.get(0,t)},flatten:function(t){return Lt(this,Tt(this,t,!1))},get:function(t,e){return(t=u(this,t))<0||this.size===1/0||void 0!==this.size&&t>this.size?e:this.find((function(e,r){return r===t}),void 0,e)},has:function(t){return(t=u(this,t))>=0&&(void 0!==this.size?this.size===1/0||t<this.size:-1!==this.indexOf(t))},interpose:function(t){return Lt(this,function(t,e){var r=Nt(t);return r.size=t.size&&2*t.size-1,r.__iterateUncached=function(r,n){var o=this,i=0;return t.__iterate((function(t){return(!i||!1!==r(e,i++,o))&&!1!==r(t,i++,o)}),n),i},r.__iteratorUncached=function(r,n){var o,i=t.__iterator(1,n),a=0;return new T((function(){return(!o||a%2)&&(o=i.next()).done?o:a%2?P(r,a++,e):P(r,a++,o.value,o)}))},r}(this,t))},interleave:function(){var t=[this].concat(zt(arguments)),e=Ct(this.toSeq(),z.of,t),r=e.flatten(!0);return e.size&&(r.size=e.size*t.length),Lt(this,r)},keySeq:function(){return Tr(0,this.size)},last:function(t){return this.get(-1,t)},skipWhile:function(t,e){return Lt(this,At(this,t,e,!1))},zip:function(){var t=[this].concat(zt(arguments));return Lt(this,Ct(this,Wr,t))},zipAll:function(){var t=[this].concat(zt(arguments));return Lt(this,Ct(this,Wr,t,!0))},zipWith:function(t){var e=zt(arguments);return e[0]=this,Lt(this,Ct(this,t,e))}});var Dr=b.prototype;Dr["@@__IMMUTABLE_INDEXED__@@"]=!0,Dr[j]=!0,br(w,{get:function(t,e){return this.has(t)?t:e},includes:function(t){return this.has(t)},keySeq:function(){return this.valueSeq()}});var Nr=w.prototype;function Ur(t,e,r,n,o,i){return Ft(t.size),t.__iterate((function(t,i,a){o?(o=!1,r=t):r=e.call(n,r,t,i,a)}),i),r}function Br(t,e){return e}function zr(t,e){return[e,t]}function qr(t){return function(){return!t.apply(this,arguments)}}function Fr(t){return function(){return-t.apply(this,arguments)}}function Wr(){return zt(arguments)}function Hr(t,e){return t<e?1:t>e?-1:0}function Gr(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}Nr.has=Lr.includes,Nr.contains=Nr.includes,Nr.keys=Nr.values,br(B,Mr),br(z,Dr),br(q,Nr);var Kr=function(t){function e(t){return null==t?Jr():mr(t)?t:Jr().withMutations((function(e){var r=w(t);Ft(r.size),r.forEach((function(t){return e.add(t)}))}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.fromKeys=function(t){return this(_(t).keySeq())},e.prototype.toString=function(){return this.__toString("OrderedSet {","}")},e}(Or);Kr.isOrderedSet=mr;var Vr,Yr=Kr.prototype;function $r(t,e){var r=Object.create(Yr);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}function Jr(){return Vr||(Vr=$r(cr()))}Yr[j]=!0,Yr.zip=Dr.zip,Yr.zipWith=Dr.zipWith,Yr.zipAll=Dr.zipAll,Yr.__empty=Jr,Yr.__make=$r;var Xr={LeftThenRight:-1,RightThenLeft:1};var Zr=function(t,e){var r;!function(t){if(S(t))throw new Error("Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.");if(E(t))throw new Error("Can not call `Record` with an immutable Collection as default values. Use a plain javascript object instead.");if(null===t||"object"!=typeof t)throw new Error("Can not call `Record` with a non-object as default values. Use a plain javascript object instead.")}(t);var n=function(i){var a=this;if(i instanceof n)return i;if(!(this instanceof n))return new n(i);if(!r){r=!0;var u=Object.keys(t),s=o._indices={};o._name=e,o._keys=u,o._defaultValues=t;for(var c=0;c<u.length;c++){var f=u[c];s[f]=c,o[f]?"object"==typeof console&&console.warn&&console.warn("Cannot define "+en(this)+' with property "'+f+'" since that property name is part of the Record API.'):nn(o,f)}}return this.__ownerID=void 0,this._values=Ve().withMutations((function(t){t.setSize(a._keys.length),_(i).forEach((function(e,r){t.set(a._indices[r],e===a._defaultValues[r]?void 0:e)}))})),this},o=n.prototype=Object.create(Qr);return o.constructor=n,e&&(n.displayName=e),n};Zr.prototype.toString=function(){for(var t,e=en(this)+" { ",r=this._keys,n=0,o=r.length;n!==o;n++)e+=(n?", ":"")+(t=r[n])+": "+Vt(this.get(t));return e+" }"},Zr.prototype.equals=function(t){return this===t||S(t)&&rn(this).equals(rn(t))},Zr.prototype.hashCode=function(){return rn(this).hashCode()},Zr.prototype.has=function(t){return this._indices.hasOwnProperty(t)},Zr.prototype.get=function(t,e){if(!this.has(t))return e;var r=this._indices[t],n=this._values.get(r);return void 0===n?this._defaultValues[t]:n},Zr.prototype.set=function(t,e){if(this.has(t)){var r=this._values.set(this._indices[t],e===this._defaultValues[t]?void 0:e);if(r!==this._values&&!this.__ownerID)return tn(this,r)}return this},Zr.prototype.remove=function(t){return this.set(t)},Zr.prototype.clear=function(){var t=this._values.clear().setSize(this._keys.length);return this.__ownerID?this:tn(this,t)},Zr.prototype.wasAltered=function(){return this._values.wasAltered()},Zr.prototype.toSeq=function(){return rn(this)},Zr.prototype.toJS=function(){return wr(this)},Zr.prototype.entries=function(){return this.__iterator(2)},Zr.prototype.__iterator=function(t,e){return rn(this).__iterator(t,e)},Zr.prototype.__iterate=function(t,e){return rn(this).__iterate(t,e)},Zr.prototype.__ensureOwner=function(t){if(t===this.__ownerID)return this;var e=this._values.__ensureOwner(t);return t?tn(this,e,t):(this.__ownerID=t,this._values=e,this)},Zr.isRecord=S,Zr.getDescriptiveName=en;var Qr=Zr.prototype;function tn(t,e,r){var n=Object.create(Object.getPrototypeOf(t));return n._values=e,n.__ownerID=r,n}function en(t){return t.constructor.displayName||t.constructor.name||"Record"}function rn(t){return V(t._keys.map((function(e){return[e,t.get(e)]})))}function nn(t,e){try{Object.defineProperty(t,e,{get:function(){return this.get(e)},set:function(t){qt(this.__ownerID,"Cannot set on an immutable record."),this.set(e,t)}})}catch(t){}}Qr["@@__IMMUTABLE_RECORD__@@"]=!0,Qr.delete=Qr.remove,Qr.deleteIn=Qr.removeIn=ne,Qr.getIn=Rr,Qr.hasIn=Lr.hasIn,Qr.merge=ue,Qr.mergeWith=se,Qr.mergeIn=me,Qr.mergeDeep=ve,Qr.mergeDeepWith=ge,Qr.mergeDeepIn=_e,Qr.setIn=ee,Qr.update=ie,Qr.updateIn=ae,Qr.withMutations=be,Qr.asMutable=we,Qr.asImmutable=Oe,Qr[k]=Qr.entries,Qr.toJSON=Qr.toObject=Lr.toObject,Qr.inspect=Qr.toSource=function(){return this.toString()};var on,an=function(t){function e(t,r){if(!(this instanceof e))return new e(t,r);if(this._value=t,this.size=void 0===r?1/0:Math.max(0,r),0===this.size){if(on)return on;on=this}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},e.prototype.get=function(t,e){return this.has(t)?this._value:e},e.prototype.includes=function(t){return Q(this._value,t)},e.prototype.slice=function(t,r){var n=this.size;return c(t,r,n)?this:new e(this._value,l(r,n)-f(t,n))},e.prototype.reverse=function(){return this},e.prototype.indexOf=function(t){return Q(this._value,t)?0:-1},e.prototype.lastIndexOf=function(t){return Q(this._value,t)?this.size:-1},e.prototype.__iterate=function(t,e){for(var r=this.size,n=0;n!==r&&!1!==t(this._value,e?r-++n:n++,this););return n},e.prototype.__iterator=function(t,e){var r=this,n=this.size,o=0;return new T((function(){return o===n?{value:void 0,done:!0}:P(t,e?n-++o:o++,r._value)}))},e.prototype.equals=function(t){return t instanceof e?Q(this._value,t._value):_r(t)},e}(z);function un(t,e){return function t(e,r,n,o,i,a){if("string"!=typeof n&&!E(n)&&(N(n)||I(n)||Gt(n))){if(~e.indexOf(n))throw new TypeError("Cannot convert circular structure to Immutable");e.push(n),i&&""!==o&&i.push(o);var u=r.call(a,o,U(n).map((function(o,a){return t(e,r,o,a,i,n)})),i&&i.slice());return e.pop(),i&&i.pop(),u}return n}([],e||sn,t,"",e&&e.length>2?[]:void 0,{"":t})}function sn(t,e){return v(e)?e.toList():y(e)?e.toMap():e.toSet()}var cn="4.3.4",fn={version:cn,Collection:m,Iterable:m,Seq:U,Map:Ee,OrderedMap:ur,List:Ve,Stack:pr,Set:Or,OrderedSet:Kr,PairSorting:Xr,Record:Zr,Range:Tr,Repeat:an,is:Q,fromJS:un,hash:nt,isImmutable:E,isCollection:d,isKeyed:y,isIndexed:v,isAssociative:g,isOrdered:x,isValueObject:Z,isPlainObject:Gt,isSeq:O,isList:Ke,isMap:J,isOrderedMap:X,isStack:lr,isSet:gr,isOrderedSet:mr,isRecord:S,get:$t,getIn:Pr,has:Yt,hasIn:Ir,merge:fe,mergeDeep:pe,mergeWith:le,mergeDeepWith:he,remove:Xt,removeIn:re,set:Zt,setIn:te,update:oe,updateIn:Qt},ln=m;e.default=fn},function(t,e,r){"use strict";(function(t){r.d(e,"c",(function(){return y})),r.d(e,"a",(function(){return w})),r.d(e,"b",(function(){return v}));var n=r(5),o=r.n(n),i=r(3),a=r.n(i),u=r(30),s=r(17),c=r.n(s),f=r(27),l=r(20),p=r.n(l);function h(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function d(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?h(Object(r),!0).forEach((function(e){a()(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function y(e){var r=e.link,n=t.from(e.clientID+":"+e.clientSecret).toString("base64");n="Basic "+n;var o=g(e,r.href),i={method:r.method,baseURL:o,url:r.href,headers:{Accept:r.responseType,"Content-Type":r.type,Authorization:n},withCredentials:!1,data:{grant_type:"password",username:e.user,password:e.password},validateStatus:function(t){return t>=200&&t<300},transformResponse:function(t){return t},transformRequest:function(t){return c.a.stringify(t)}};return m(i,e,i)}function v(t){var e=t.link,r=t.logonInfo,n=d({},e),i=t.hasOwnProperty("payload")?t.payload:null,a=null,u=null,s=null,c=null,f=null;null!==i&&(f=_(i,"action"),a=_(i,"qs"),u=_(i,"data"),s=_(i,"headers"),c=_(i,"xsrf"));var l=g(r,n.href),p=null!==(f=null!=f?f.toLowerCase():null)?"".concat(n.href,"/").concat(f):"".concat(n.href);n.hasOwnProperty("customHandling")&&null!==f&&"table.upload"===f&&(n.method="PUT",n.type="application/octet-stream",n.responseType="application/json");var h={method:n.method,baseURL:l,url:p,transformResponse:function(t){return t},validateStatus:function(t){return 302===t||304===t||t>=200&&t<300},headers:{}};null!==r.token?h.headers.Authorization=r.tokenType+" "+r.token:h.withCredentials=null==t.withCredentials||t.withCredentials;var y=b(n.type);if(n.hasOwnProperty("responseType")?(null!==y&&(h.headers["Content-Type"]=y),h.headers.Accept=b(n.responseType)):null!==y&&(h.headers.Accept=y,"PUT"!==n.method&&"POST"!==n.method&&"PATCH"!==n.method||(h.headers["Content-Type"]=y)),null!==s)for(var v in s)"json-parameters"===v.toLowerCase()?h.headers[v]="object"===o()(s[v])?JSON.stringify(s[v]):s[v]:h.headers[v]=s[v];if(null!==c){var w=c["x-csrf-header"];null!=w&&(h.xsrfCookieName=null,h.xsrfHeaderName=w,h.headers[w]=c[w]),null!=c["tkhttp-id"]&&(h.headers["tkhttp-id"]=c["tkhttp-id"])}else"ADD_SERVICE"===h.type&&(h.xsrfHeaderName="X_CSRF_TOKEN",h.headers["X-CSRF-TOKEN"]="Fetch");return null!==a&&(h.params=d({},a)),h.data=null===u?{}:u,h.maxContentLength=20126512,function(t,e){var r=t.logonInfo.options;if(null!=r&&null!=r.proxyServer){var n=r.proxy;null!=n.pathname&&n.pathname.trim().length>0&&(e.url="".concat(n.pathname).concat(e.url)),e.baseURL="".concat(n.protocol,"//").concat(n.host)}}(t,h),m(h,t,r)}function g(t,e){var r=t.host;if(null!=t.options&&null!=t.options.ns){var n=e.split("/")[1];r="".concat(t.protocol).concat(n,".{logInfo.options.ns}.svc.cluster.local")}return r}function m(t,e,r){if("https://"===r.protocol&&null==t.agent){var n=null!=e.storeConfig.httpOptions?e.storeConfig.httpOptions:{},i=new p.a.Agent(n);t.httpsAgent=i}return new Promise((function(r,n){Object(u.a)(t).then((function(t){var i;(i=t.data,new Promise((function(t,e){if("object"===o()(i))t(i);else{var r=i.replace(/\r?\n|\r/g," ");try{t(JSON.parse(r))}catch(e){t(i)}}}))).then((function(o){e.data=null,t.data={results:o,iconfig:Object.assign({},e)},o.hasOwnProperty("errorCode")?(t.status=t.data.results.httpStatusCode,t.statusText="errorCode: ".concat(t.data.results.errorCode),n({response:t})):r(Object(f.a)(t))})).catch((function(){e.data=null,t.data={results:t.data,iconfig:Object.assign({},e)},r(Object(f.a)(t))}))})).catch((function(t){n(t)}))}))}function _(t,e){for(var r=0,n=Object.keys(t);r<n.length;r++){var o=n[r];if(o.toUpperCase()===e.toUpperCase())return t[o]}return null}function b(t){var e=t;return null==e?e=null:-1!==e.indexOf("application/vnd")&&-1===e.indexOf("+json")&&(e+="+json"),e}function w(t){return Object(u.a)(t.payload)}u.a.interceptors.response.use((function(t){return t}),(function(t){return Promise.reject(t)}))}).call(this,r(9).Buffer)},function(t,e,r){"use strict";
2
2
  /*!
3
3
  * The buffer module from node.js, for the browser.
4
4
  *
package/lib/restaf.js CHANGED
@@ -2536,7 +2536,7 @@ eval("/* harmony import */ var _fixImages__WEBPACK_IMPORTED_MODULE_0__ = __webpa
2536
2536
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
2537
2537
 
2538
2538
  "use strict";
2539
- eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return trustedGrant; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return keepAlive; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return request; });\n/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/typeof */ \"../../../node_modules/@babel/runtime/helpers/typeof.js\");\n/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"../../../node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! axios */ \"../../../node_modules/axios/index.js\");\n/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! qs */ \"../../../node_modules/qs/lib/index.js\");\n/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(qs__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _fixResponse__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./fixResponse */ \"./serverCalls/fixResponse.js\");\n/* harmony import */ var https__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! https */ \"https\");\n/* harmony import */ var https__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(https__WEBPACK_IMPORTED_MODULE_5__);\n\n\nfunction 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; }\nfunction _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) { _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(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; }\n/* eslint-disable no-prototype-builtins */\n/*------------------------------------------------------------------------------------\r\n Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights reserved Licensed under the Apache License, Version 2.0 (the \"License\");\r\n you may not use this file except in compliance with the License.\r\n You may obtain a copy of the License at\r\n\r\n http://www.apache.org/licenses/LICENSE-2.0\r\n\r\n Unless required by applicable law or agreed to in writing, software\r\n distributed under the License is distributed on an \"AS IS\" BASIS,\r\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n See the License for the specific language governing permissions and\r\n limitations under the License.\r\n ---------------------------------------------------------------------------------------*/\n\n\n\n\n\n\n// axios.defaults.withCredentials = true\naxios__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"].interceptors.response.use(function (response) {\n return response;\n}, function (error) {\n return Promise.reject(error);\n});\n\n/* X-Uaa-Csrf */\nfunction trustedGrant(iconfig) {\n var link = iconfig.link;\n var auth1 = Buffer.from(iconfig.clientID + \":\" + iconfig.clientSecret).toString(\"base64\");\n debugger;\n auth1 = \"Basic \" + auth1;\n var baseUrl = patchURL4ns(iconfig, link.href);\n var config = {\n method: link.method,\n baseURL: baseUrl,\n url: link.href,\n /*iconfig.host + link.href,*/\n\n headers: {\n Accept: link.responseType,\n \"Content-Type\": link.type /* Axios seems to be case sensitive */,\n Authorization: auth1\n },\n withCredentials: false,\n data: {\n grant_type: \"password\",\n username: iconfig.user,\n password: iconfig.password\n },\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n transformResponse: function transformResponse(data) {\n return data;\n },\n transformRequest: function transformRequest(data) {\n return qs__WEBPACK_IMPORTED_MODULE_3___default.a.stringify(data);\n }\n };\n var storeConfig = {\n protocol: 'https://',\n sslOption: {}\n };\n //TBD: Need to update the whole flow to be consistent with the storeConfig\n return makeCall(config, iconfig, config);\n}\nfunction request(iconfig) {\n \"use strict\";\n\n var link = iconfig.link,\n logonInfo = iconfig.logonInfo;\n var iLink = _objectSpread({}, link);\n var payload = iconfig.hasOwnProperty(\"payload\") ? iconfig.payload : null;\n var iqs = null;\n var idata = null;\n var iheaders = null;\n var ixsrf = null;\n var casAction = null;\n debugger;\n if (payload !== null) {\n casAction = hasItem(payload, \"action\");\n iqs = hasItem(payload, \"qs\");\n idata = hasItem(payload, \"data\");\n iheaders = hasItem(payload, \"headers\");\n ixsrf = hasItem(payload, \"xsrf\");\n }\n var baseUrl = patchURL4ns(logonInfo, iLink.href);\n // let url = `${l}${iLink.href}`;\n\n // handle casaction upload\n casAction = casAction != null ? casAction.toLowerCase() : null;\n var url = casAction !== null ? \"\".concat(iLink.href, \"/\").concat(casAction) : \"\".concat(iLink.href);\n if (iLink.hasOwnProperty(\"customHandling\") && casAction !== null) {\n // casAction = casAction.toLowerCase();\n if (casAction === \"table.upload\") {\n iLink.method = \"PUT\";\n iLink.type = \"application/octet-stream\";\n iLink.responseType = \"application/json\";\n }\n }\n var config = {\n method: iLink.method,\n baseURL: baseUrl,\n url: url,\n transformResponse: function transformResponse(data) {\n return data;\n },\n validateStatus: function validateStatus(status) {\n /* 304 for state calls */\n debugger;\n return status === 302 || status === 304 || status >= 200 && status < 300;\n }\n };\n config.headers = {};\n if (logonInfo.token !== null) {\n config.headers['Authorization'] = logonInfo.tokenType + \" \" + logonInfo.token;\n } else {\n config.withCredentials = iconfig.withCredentials == null ? true : iconfig.withCredentials;\n }\n var type = fullType(iLink.type);\n if (iLink.hasOwnProperty(\"responseType\")) {\n if (type !== null) {\n config.headers[\"Content-Type\"] = type;\n }\n config.headers.Accept = fullType(iLink.responseType);\n } else if (type !== null) {\n config.headers.Accept = type;\n if (iLink.method === \"PUT\" || iLink.method === \"POST\" || iLink.method === \"PATCH\") {\n config.headers[\"Content-Type\"] = type;\n }\n }\n if (iheaders !== null) {\n for (var ih in iheaders) {\n //noinspection JSUnfilteredForInLoop\n if (ih.toLowerCase() === \"json-parameters\") {\n //noinspection JSUnfilteredForInLoop\n config.headers[ih] = _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default()(iheaders[ih]) === \"object\" ? JSON.stringify(iheaders[ih]) : iheaders[ih];\n } else {\n //noinspection JSUnfilteredForInLoop\n config.headers[ih] = iheaders[ih];\n }\n }\n }\n if (ixsrf !== null) {\n /* TBD: fix parallel calls to get of this conditional */\n var xsrfHeaderName = ixsrf[\"x-csrf-header\"];\n if (xsrfHeaderName != null) {\n config.xsrfCookieName = null;\n config.xsrfHeaderName = xsrfHeaderName;\n // https://github.com/axios/axios/issues/2024\n config.headers[xsrfHeaderName] = ixsrf[xsrfHeaderName];\n }\n if (ixsrf[\"tkhttp-id\"] != null) {\n config.headers[\"tkhttp-id\"] = ixsrf[\"tkhttp-id\"];\n }\n } else {\n if (config.type === 'ADD_SERVICE') {\n config.xsrfHeaderName = 'X_CSRF_TOKEN';\n config.headers['X-CSRF-TOKEN'] = \"Fetch\";\n }\n }\n if (iqs !== null) {\n config.params = _objectSpread({}, iqs);\n }\n config.data = idata === null ? {} : idata;\n config.maxContentLength = 2 * 10063256;\n var httpOptions = iconfig.storeConfig.httpOptions;\n if (httpOptions != null) {\n for (var k in httpOptions) {\n config[k] = httpOptions[k];\n }\n }\n setupProxy(iconfig, config);\n return makeCall(config, iconfig, logonInfo);\n}\n// setup if using reverse proxy server\nfunction setupProxy(iconfig, config) {\n var options = iconfig.logonInfo.options;\n if (options != null && options.proxyServer != null) {\n var proxy = options.proxy;\n if (proxy.pathname != null && proxy.pathname.trim().length > 0) {\n config.url = \"\".concat(proxy.pathname).concat(config.url); //prepend url with proxy path\n }\n config.baseURL = \"\".concat(proxy.protocol, \"//\").concat(proxy.host); //override base url\n }\n}\n// patch the url for namespace - useful for k8s to make calls into another namespace\nfunction patchURL4ns(logInfo, link) {\n var host = logInfo.host;\n if (logInfo.options != null && logInfo.options.ns != null) {\n var service = link.split(\"/\")[1];\n host = \"\".concat(logInfo.protocol).concat(service, \".{logInfo.options.ns}.svc.cluster.local\");\n }\n return host;\n}\nfunction makeCall(config, iconfig, storeConfig) {\n if (storeConfig.protocol === \"https://\" && config.agent == null) {\n var opt = storeConfig.sslOptions != null ? storeConfig.sslOptions : {};\n var agent = new https__WEBPACK_IMPORTED_MODULE_5___default.a.Agent(opt);\n config.httpsAgent = agent;\n }\n return new Promise(function (resolve, reject) {\n Object(axios__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(config).then(function (response) {\n parseJSON(response.data).then(function (data) {\n iconfig.data = null; /* get rid of the payload*/\n response.data = {\n results: data,\n iconfig: Object.assign({}, iconfig)\n };\n if (data.hasOwnProperty(\"errorCode\")) {\n //noinspection JSUnresolvedVariable\n response.status = response.data.results.httpStatusCode;\n response.statusText = \"errorCode: \".concat(response.data.results.errorCode);\n reject({\n response: response\n });\n } else {\n resolve(Object(_fixResponse__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(response));\n }\n }).catch(function () {\n iconfig.data = null;\n response.data = {\n results: response.data,\n iconfig: Object.assign({}, iconfig)\n };\n resolve(Object(_fixResponse__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(response));\n });\n }).catch(function (error) {\n reject(error);\n });\n });\n}\nfunction parseJSON(data) {\n //noinspection JSUnusedLocalSymbols\n return new Promise(function (resolve, reject) {\n if (_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default()(data) === \"object\") {\n resolve(data);\n } else {\n var temp = data.replace(/\\r?\\n|\\r/g, \" \");\n try {\n var odata = JSON.parse(temp);\n resolve(odata);\n } catch (err) {\n resolve(data);\n }\n }\n });\n}\nfunction hasItem(payload, name) {\n for (var _i = 0, _Object$keys = Object.keys(payload); _i < _Object$keys.length; _i++) {\n var k = _Object$keys[_i];\n if (k.toUpperCase() === name.toUpperCase()) {\n return payload[k];\n }\n }\n return null;\n}\nfunction fullType(type) {\n var ntype = type;\n if (ntype === undefined || ntype === null) {\n ntype = null;\n } else {\n if (ntype.indexOf(\"application/vnd\") !== -1) {\n if (ntype.indexOf(\"+json\") === -1) {\n ntype = ntype + \"+json\";\n }\n }\n }\n return ntype;\n}\n\n// Code below is for experimenting.\n\nfunction keepAlive(action) {\n return Object(axios__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(action.payload);\n}\n\n\n//# sourceURL=webpack://restaf/./serverCalls/index.js?");
2539
+ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return trustedGrant; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return keepAlive; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return request; });\n/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/typeof */ \"../../../node_modules/@babel/runtime/helpers/typeof.js\");\n/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"../../../node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! axios */ \"../../../node_modules/axios/index.js\");\n/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! qs */ \"../../../node_modules/qs/lib/index.js\");\n/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(qs__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _fixResponse__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./fixResponse */ \"./serverCalls/fixResponse.js\");\n/* harmony import */ var https__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! https */ \"https\");\n/* harmony import */ var https__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(https__WEBPACK_IMPORTED_MODULE_5__);\n\n\nfunction 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; }\nfunction _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) { _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(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; }\n/* eslint-disable no-prototype-builtins */\n/*------------------------------------------------------------------------------------\r\n Copyright © 2023, SAS Institute Inc., Cary, NC, USA. All Rights reserved Licensed under the Apache License, Version 2.0 (the \"License\");\r\n you may not use this file except in compliance with the License.\r\n You may obtain a copy of the License at\r\n\r\n http://www.apache.org/licenses/LICENSE-2.0\r\n\r\n Unless required by applicable law or agreed to in writing, software\r\n distributed under the License is distributed on an \"AS IS\" BASIS,\r\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n See the License for the specific language governing permissions and\r\n limitations under the License.\r\n ---------------------------------------------------------------------------------------*/\n\n\n\n\n\n\n// axios.defaults.withCredentials = true\naxios__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"].interceptors.response.use(function (response) {\n return response;\n}, function (error) {\n return Promise.reject(error);\n});\n\n/* X-Uaa-Csrf */\nfunction trustedGrant(iconfig) {\n var link = iconfig.link;\n var auth1 = Buffer.from(iconfig.clientID + \":\" + iconfig.clientSecret).toString(\"base64\");\n debugger;\n auth1 = \"Basic \" + auth1;\n var baseUrl = patchURL4ns(iconfig, link.href);\n var config = {\n method: link.method,\n baseURL: baseUrl,\n url: link.href,\n /*iconfig.host + link.href,*/\n\n headers: {\n Accept: link.responseType,\n \"Content-Type\": link.type /* Axios seems to be case sensitive */,\n Authorization: auth1\n },\n withCredentials: false,\n data: {\n grant_type: \"password\",\n username: iconfig.user,\n password: iconfig.password\n },\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n transformResponse: function transformResponse(data) {\n return data;\n },\n transformRequest: function transformRequest(data) {\n return qs__WEBPACK_IMPORTED_MODULE_3___default.a.stringify(data);\n }\n };\n var storeConfig = {\n protocol: 'https://',\n sslOption: {}\n };\n //TBD: Need to update the whole flow to be consistent with the storeConfig\n return makeCall(config, iconfig, config);\n}\nfunction request(iconfig) {\n \"use strict\";\n\n var link = iconfig.link,\n logonInfo = iconfig.logonInfo;\n var iLink = _objectSpread({}, link);\n var payload = iconfig.hasOwnProperty(\"payload\") ? iconfig.payload : null;\n var iqs = null;\n var idata = null;\n var iheaders = null;\n var ixsrf = null;\n var casAction = null;\n debugger;\n if (payload !== null) {\n casAction = hasItem(payload, \"action\");\n iqs = hasItem(payload, \"qs\");\n idata = hasItem(payload, \"data\");\n iheaders = hasItem(payload, \"headers\");\n ixsrf = hasItem(payload, \"xsrf\");\n }\n var baseUrl = patchURL4ns(logonInfo, iLink.href);\n // let url = `${l}${iLink.href}`;\n\n // handle casaction upload\n casAction = casAction != null ? casAction.toLowerCase() : null;\n var url = casAction !== null ? \"\".concat(iLink.href, \"/\").concat(casAction) : \"\".concat(iLink.href);\n if (iLink.hasOwnProperty(\"customHandling\") && casAction !== null) {\n // casAction = casAction.toLowerCase();\n if (casAction === \"table.upload\") {\n iLink.method = \"PUT\";\n iLink.type = \"application/octet-stream\";\n iLink.responseType = \"application/json\";\n }\n }\n var config = {\n method: iLink.method,\n baseURL: baseUrl,\n url: url,\n transformResponse: function transformResponse(data) {\n return data;\n },\n validateStatus: function validateStatus(status) {\n /* 304 for state calls */\n debugger;\n return status === 302 || status === 304 || status >= 200 && status < 300;\n }\n };\n config.headers = {};\n if (logonInfo.token !== null) {\n config.headers['Authorization'] = logonInfo.tokenType + \" \" + logonInfo.token;\n } else {\n config.withCredentials = iconfig.withCredentials == null ? true : iconfig.withCredentials;\n }\n var type = fullType(iLink.type);\n if (iLink.hasOwnProperty(\"responseType\")) {\n if (type !== null) {\n config.headers[\"Content-Type\"] = type;\n }\n config.headers.Accept = fullType(iLink.responseType);\n } else if (type !== null) {\n config.headers.Accept = type;\n if (iLink.method === \"PUT\" || iLink.method === \"POST\" || iLink.method === \"PATCH\") {\n config.headers[\"Content-Type\"] = type;\n }\n }\n if (iheaders !== null) {\n for (var ih in iheaders) {\n //noinspection JSUnfilteredForInLoop\n if (ih.toLowerCase() === \"json-parameters\") {\n //noinspection JSUnfilteredForInLoop\n config.headers[ih] = _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default()(iheaders[ih]) === \"object\" ? JSON.stringify(iheaders[ih]) : iheaders[ih];\n } else {\n //noinspection JSUnfilteredForInLoop\n config.headers[ih] = iheaders[ih];\n }\n }\n }\n if (ixsrf !== null) {\n /* TBD: fix parallel calls to get of this conditional */\n var xsrfHeaderName = ixsrf[\"x-csrf-header\"];\n if (xsrfHeaderName != null) {\n config.xsrfCookieName = null;\n config.xsrfHeaderName = xsrfHeaderName;\n // https://github.com/axios/axios/issues/2024\n config.headers[xsrfHeaderName] = ixsrf[xsrfHeaderName];\n }\n if (ixsrf[\"tkhttp-id\"] != null) {\n config.headers[\"tkhttp-id\"] = ixsrf[\"tkhttp-id\"];\n }\n } else {\n if (config.type === 'ADD_SERVICE') {\n config.xsrfHeaderName = 'X_CSRF_TOKEN';\n config.headers['X-CSRF-TOKEN'] = \"Fetch\";\n }\n }\n if (iqs !== null) {\n config.params = _objectSpread({}, iqs);\n }\n config.data = idata === null ? {} : idata;\n config.maxContentLength = 2 * 10063256;\n // let httpOptions = (iconfig.storeConfig.config != null ? iconfig.storeConfig.config.httpOptions : null);\n\n /*\r\n let httpOptions = iconfig.storeConfig.httpOptions;\r\n if (httpOptions != null) {\r\n for (let k in httpOptions) {\r\n config[k] = httpOptions[k];\r\n }\r\n }\r\n */\n setupProxy(iconfig, config);\n return makeCall(config, iconfig, logonInfo);\n}\n// setup if using reverse proxy server\nfunction setupProxy(iconfig, config) {\n var options = iconfig.logonInfo.options;\n if (options != null && options.proxyServer != null) {\n var proxy = options.proxy;\n if (proxy.pathname != null && proxy.pathname.trim().length > 0) {\n config.url = \"\".concat(proxy.pathname).concat(config.url); //prepend url with proxy path\n }\n config.baseURL = \"\".concat(proxy.protocol, \"//\").concat(proxy.host); //override base url\n }\n}\n// patch the url for namespace - useful for k8s to make calls into another namespace\nfunction patchURL4ns(logInfo, link) {\n var host = logInfo.host;\n if (logInfo.options != null && logInfo.options.ns != null) {\n var service = link.split(\"/\")[1];\n host = \"\".concat(logInfo.protocol).concat(service, \".{logInfo.options.ns}.svc.cluster.local\");\n }\n return host;\n}\nfunction makeCall(config, iconfig, storeConfig) {\n if (storeConfig.protocol === \"https://\" && config.agent == null) {\n // let opt = storeConfig.sslOptions != null ? storeConfig.sslOptions : {};\n var opts = iconfig.storeConfig.httpOptions != null ? iconfig.storeConfig.httpOptions : {};\n var agent = new https__WEBPACK_IMPORTED_MODULE_5___default.a.Agent(opts);\n config.httpsAgent = agent;\n }\n return new Promise(function (resolve, reject) {\n Object(axios__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(config).then(function (response) {\n parseJSON(response.data).then(function (data) {\n iconfig.data = null; /* get rid of the payload*/\n response.data = {\n results: data,\n iconfig: Object.assign({}, iconfig)\n };\n if (data.hasOwnProperty(\"errorCode\")) {\n //noinspection JSUnresolvedVariable\n response.status = response.data.results.httpStatusCode;\n response.statusText = \"errorCode: \".concat(response.data.results.errorCode);\n reject({\n response: response\n });\n } else {\n resolve(Object(_fixResponse__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(response));\n }\n }).catch(function () {\n iconfig.data = null;\n response.data = {\n results: response.data,\n iconfig: Object.assign({}, iconfig)\n };\n resolve(Object(_fixResponse__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(response));\n });\n }).catch(function (error) {\n reject(error);\n });\n });\n}\nfunction parseJSON(data) {\n //noinspection JSUnusedLocalSymbols\n return new Promise(function (resolve, reject) {\n if (_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_0___default()(data) === \"object\") {\n resolve(data);\n } else {\n var temp = data.replace(/\\r?\\n|\\r/g, \" \");\n try {\n var odata = JSON.parse(temp);\n resolve(odata);\n } catch (err) {\n resolve(data);\n }\n }\n });\n}\nfunction hasItem(payload, name) {\n for (var _i = 0, _Object$keys = Object.keys(payload); _i < _Object$keys.length; _i++) {\n var k = _Object$keys[_i];\n if (k.toUpperCase() === name.toUpperCase()) {\n return payload[k];\n }\n }\n return null;\n}\nfunction fullType(type) {\n var ntype = type;\n if (ntype === undefined || ntype === null) {\n ntype = null;\n } else {\n if (ntype.indexOf(\"application/vnd\") !== -1) {\n if (ntype.indexOf(\"+json\") === -1) {\n ntype = ntype + \"+json\";\n }\n }\n }\n return ntype;\n}\n\n// Code below is for experimenting.\n\nfunction keepAlive(action) {\n return Object(axios__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(action.payload);\n}\n\n\n//# sourceURL=webpack://restaf/./serverCalls/index.js?");
2540
2540
 
2541
2541
  /***/ }),
2542
2542
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sassoftware/restaf",
3
- "version": "5.3.3-6",
3
+ "version": "5.4.0",
4
4
  "description": "Library for writing SAS Viya application using REST APIs",
5
5
  "author": "Deva Kumaraswamy <deva.kumar@sas.com>",
6
6
  "license": "Apache-2.0",