diff --git a/asset-manifest.json b/asset-manifest.json index 82ba0da7..1d9b1a1f 100644 --- a/asset-manifest.json +++ b/asset-manifest.json @@ -1,7 +1,7 @@ { "files": { "main.css": "/static/css/main.e968180d.css", - "main.js": "/static/js/main.fb3d6317.js", + "main.js": "/static/js/main.25d332d2.js", "static/media/fa-solid-900.ttf": "/static/media/fa-solid-900.4a2cd718d7031b732e76.ttf", "static/media/fa-brands-400.ttf": "/static/media/fa-brands-400.150de8eaa454d669c405.ttf", "static/media/fa-solid-900.woff2": "/static/media/fa-solid-900.bb975c966c37455a1bc3.woff2", @@ -13,10 +13,10 @@ "static/media/fa-v4compatibility.woff2": "/static/media/fa-v4compatibility.68577e40f3e70067b5da.woff2", "index.html": "/index.html", "main.e968180d.css.map": "/static/css/main.e968180d.css.map", - "main.fb3d6317.js.map": "/static/js/main.fb3d6317.js.map" + "main.25d332d2.js.map": "/static/js/main.25d332d2.js.map" }, "entrypoints": [ "static/css/main.e968180d.css", - "static/js/main.fb3d6317.js" + "static/js/main.25d332d2.js" ] } \ No newline at end of file diff --git a/index.html b/index.html index ac72ca80..53a2013f 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -
a||125d?(a.sortIndex=c,f(t,a),null===h(r)&&a===h(t)&&(B?(E(L),L=-1):B=!0,K(H,c-d))):(a.sortIndex=e,f(r,a),A||z||(A=!0,I(J)));return a};\nexports.unstable_shouldYield=M;exports.unstable_wrapCallback=function(a){var b=y;return function(){var c=y;y=b;try{return a.apply(this,arguments)}finally{y=c}}};\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/scheduler.production.min.js');\n} else {\n module.exports = require('./cjs/scheduler.development.js');\n}\n","/**\n * @license React\n * use-sync-external-store-shim.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var e=require(\"react\");function h(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var k=\"function\"===typeof Object.is?Object.is:h,l=e.useState,m=e.useEffect,n=e.useLayoutEffect,p=e.useDebugValue;function q(a,b){var d=b(),f=l({inst:{value:d,getSnapshot:b}}),c=f[0].inst,g=f[1];n(function(){c.value=d;c.getSnapshot=b;r(c)&&g({inst:c})},[a,d,b]);m(function(){r(c)&&g({inst:c});return a(function(){r(c)&&g({inst:c})})},[a]);p(d);return d}\nfunction r(a){var b=a.getSnapshot;a=a.value;try{var d=b();return!k(a,d)}catch(f){return!0}}function t(a,b){return b()}var u=\"undefined\"===typeof window||\"undefined\"===typeof window.document||\"undefined\"===typeof window.document.createElement?t:q;exports.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:u;\n","/**\n * @license React\n * use-sync-external-store-shim/with-selector.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var h=require(\"react\"),n=require(\"use-sync-external-store/shim\");function p(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var q=\"function\"===typeof Object.is?Object.is:p,r=n.useSyncExternalStore,t=h.useRef,u=h.useEffect,v=h.useMemo,w=h.useDebugValue;\nexports.useSyncExternalStoreWithSelector=function(a,b,e,l,g){var c=t(null);if(null===c.current){var f={hasValue:!1,value:null};c.current=f}else f=c.current;c=v(function(){function a(a){if(!c){c=!0;d=a;a=l(a);if(void 0!==g&&f.hasValue){var b=f.value;if(g(b,a))return k=b}return k=a}b=k;if(q(d,a))return b;var e=l(a);if(void 0!==g&&g(b,e))return b;d=a;return k=e}var c=!1,d,k,m=void 0===e?null:e;return[function(){return a(b())},null===m?void 0:function(){return a(m())}]},[b,e,l,g]);var d=r(a,c[0],c[1]);\nu(function(){f.hasValue=!0;f.value=d},[d]);w(d);return d};\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim.production.min.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim.development.js');\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim/with-selector.production.min.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim/with-selector.development.js');\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nexport default function _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}","export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}","export default function _iterableToArrayLimit(arr, i) {\n var _i = null == arr ? null : \"undefined\" != typeof Symbol && arr[Symbol.iterator] || arr[\"@@iterator\"];\n if (null != _i) {\n var _s,\n _e,\n _x,\n _r,\n _arr = [],\n _n = !0,\n _d = !1;\n try {\n if (_x = (_i = _i.call(arr)).next, 0 === i) {\n if (Object(_i) !== _i) return;\n _n = !1;\n } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);\n } catch (err) {\n _d = !0, _e = err;\n } finally {\n try {\n if (!_n && null != _i[\"return\"] && (_r = _i[\"return\"](), Object(_r) !== _r)) return;\n } finally {\n if (_d) throw _e;\n }\n }\n return _arr;\n }\n}","export default function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}","import _typeof from \"./typeof.js\";\nexport default function _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","import defineProperty from \"./defineProperty.js\";\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n enumerableOnly && (symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n })), keys.push.apply(keys, symbols);\n }\n return keys;\n}\nexport default function _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = null != arguments[i] ? arguments[i] : {};\n i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {\n defineProperty(target, key, source[key]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}","import unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nexport default function _createForOfIteratorHelper(o, allowArrayLike) {\n var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"];\n if (!it) {\n if (Array.isArray(o) || (it = unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n if (it) o = it;\n var i = 0;\n var F = function F() {};\n return {\n s: F,\n n: function n() {\n if (i >= o.length) return {\n done: true\n };\n return {\n done: false,\n value: o[i++]\n };\n },\n e: function e(_e) {\n throw _e;\n },\n f: F\n };\n }\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n var normalCompletion = true,\n didErr = false,\n err;\n return {\n s: function s() {\n it = it.call(o);\n },\n n: function n() {\n var step = it.next();\n normalCompletion = step.done;\n return step;\n },\n e: function e(_e2) {\n didErr = true;\n err = _e2;\n },\n f: function f() {\n try {\n if (!normalCompletion && it[\"return\"] != null) it[\"return\"]();\n } finally {\n if (didErr) throw err;\n }\n }\n };\n}","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose.js\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}","export default function isSame(v1, v2) {\n return String(v1) === String(v2);\n}\n","import isSame from './isSame';\n\nexport default function getOption(value, options) {\n if (Array.isArray(value)) {\n return value\n .map((v) => options.find((o) => isSame(o.value, v)))\n .filter((o) => o);\n }\n\n return options.find((o) => isSame(o.value, value)) || null;\n}\n","export default function toArray(value) {\n return Array.isArray(value) ? value : [value];\n}\n","import isSame from './isSame';\nimport toArray from './toArray';\n\nexport default function updateOption(newOption, oldOption, multiple) {\n if (!newOption) {\n return oldOption;\n }\n\n if (!multiple) {\n return newOption;\n }\n\n if (!oldOption) {\n return toArray(newOption);\n }\n\n const nextOption = toArray(oldOption);\n const newOptionIndex = nextOption.findIndex((o) =>\n isSame(o.value, newOption.value),\n );\n\n if (newOptionIndex >= 0) {\n nextOption.splice(newOptionIndex, 1);\n } else {\n nextOption.push(newOption);\n }\n\n return nextOption;\n}\n","export default function getDisplayValue(option, options, placeholder) {\n if (!option && !placeholder) {\n return options && options.length ? options[0].name || '' : '';\n }\n\n const isMultiple = Array.isArray(option);\n\n if (!option && !isMultiple) {\n return '';\n }\n\n return isMultiple\n ? option\n .map((o) => o.name)\n .filter(Boolean)\n .join(', ')\n : option.name || '';\n}\n","export default function getValue(option) {\n if (!option) return null;\n\n if (Array.isArray(option)) {\n return option.filter(Boolean).map((o) => o.value);\n }\n\n return option.value || null;\n}\n","export default function groupOptions(options) {\n const nextOptions = [];\n\n options.forEach((option) => {\n if (option.group) {\n const group = nextOptions.findIndex((o) => o.type === 'group' && o.name === option.group);\n\n if (group >= 0) {\n nextOptions[group].items.push(option);\n } else {\n nextOptions.push({\n items: [option],\n type: 'group',\n name: option.group,\n });\n }\n } else {\n nextOptions.push(option);\n }\n });\n\n return nextOptions;\n}\n","function search(q, text) {\n const searchLength = q.length;\n const textLength = text.length;\n\n if (searchLength > textLength) {\n return false;\n }\n\n if (text.indexOf(q) >= 0) {\n return true;\n }\n\n mainLoop: for (let i = 0, j = 0; i < searchLength; i += 1) {\n const ch = q.charCodeAt(i);\n\n while (j < textLength) {\n if (text.charCodeAt(j++) === ch) {\n continue mainLoop;\n }\n }\n\n return false;\n }\n\n return true;\n}\n\nexport default function fuzzySearch(options, query) {\n return !query.length\n ? options\n : options.filter((o) =>\n search(\n query.toLowerCase(),\n `${o.name} ${o.group || ''}`.trim().toLowerCase(),\n ),\n );\n}\n","export default function reduce(middleware, items, query) {\n return middleware.filter(Boolean)\n .reduce((data, cb) => cb(data, query), items)\n .map((item, i) => ({ ...item, index: i }));\n}\n","export default function flattenOptions(options) {\n let index = 0;\n\n return options.map((option) => {\n if (option.type === 'group') {\n return option.items.map((o) => ({\n ...o,\n group: option.name,\n index: index++,\n }));\n }\n\n return { ...option, index: index++ };\n }).flat();\n}\n","import { useEffect, useState } from 'react';\nimport flattenOptions from './lib/flattenOptions';\n\nexport default function useOptions(\n defaultOptions,\n getOptions,\n debounceTime,\n search,\n) {\n const [options, setOptions] = useState(() => flattenOptions(defaultOptions));\n const [fetching, setFetching] = useState(false);\n\n useEffect(() => {\n let timeout;\n\n if (!getOptions) {\n return;\n }\n\n timeout = setTimeout(() => {\n const optionsReq = getOptions(search, options);\n\n setFetching(true);\n\n Promise.resolve(optionsReq)\n .then((newOptions) => setOptions(flattenOptions(newOptions)))\n .finally(() => setFetching(false));\n }, debounceTime);\n\n return () => {\n clearTimeout(timeout);\n };\n }, [search]);\n\n useEffect(() => {\n setOptions(flattenOptions(defaultOptions));\n }, [defaultOptions]);\n\n return [options, fetching];\n}\n","export default function highlight(current, dir, options) {\n const max = options.length - 1;\n let option = null;\n let i = -1;\n let newHighlighted = current;\n\n while (i++ <= max && (!option || option.disabled)) {\n newHighlighted =\n dir === 'down' ? newHighlighted + 1 : newHighlighted - 1;\n\n if (newHighlighted < 0) {\n newHighlighted = max;\n } else if (newHighlighted > max) {\n newHighlighted = 0;\n }\n\n option = options[newHighlighted];\n }\n\n return newHighlighted;\n}\n","import { useState } from 'react';\nimport highlight from './lib/highlight';\n\nexport default function useHighlight(options, onSelect, ref) {\n const [highlighted, setHighlighted] = useState(-1);\n\n return [\n {\n onKeyDown: (e) => {\n const key = e.key.replace('Arrow', '').toLowerCase();\n\n if (key === 'down' || key === 'up') {\n e.preventDefault();\n setHighlighted(highlight(highlighted, key, options));\n }\n },\n onKeyUp: (e) => {\n if (e.key === 'Escape') {\n e.preventDefault();\n ref.current.blur();\n } else if (e.key === 'Enter') {\n e.preventDefault();\n\n if (options[highlighted]) {\n onSelect(options[highlighted].value);\n }\n }\n },\n },\n highlighted,\n setHighlighted,\n ];\n}\n","import { useEffect, useRef, useState } from 'react';\nimport getOption from './lib/getOption';\nimport updateOption from './lib/updateOption';\nimport getDisplayValue from './lib/getDisplayValue';\nimport getValue from './lib/getValue';\nimport groupOptions from './lib/groupOptions';\nimport fuzzySearch from './lib/fuzzySearch';\nimport reduce from './lib/reduce';\nimport useOptions from './useOptions';\nimport useHighlight from './useHighlight';\n\nconst nullCb = () => {};\n\nexport default function useSelect({\n options: defaultOptions,\n defaultValue,\n value,\n multiple,\n search,\n onChange = nullCb,\n onFocus = nullCb,\n onBlur = nullCb,\n closeOnSelect = true,\n placeholder,\n getOptions,\n filterOptions,\n useFuzzySearch = true,\n debounce,\n}) {\n const ref = useRef();\n const [option, setOption] = useState(null);\n const [q, setSearch] = useState('');\n const [focus, setFocus] = useState(false);\n const [options, fetching] = useOptions(\n defaultOptions,\n getOptions,\n debounce,\n q,\n );\n\n const onSelect = (v) => {\n const newOption = updateOption(\n getOption(decodeURIComponent(v), options),\n option,\n multiple,\n );\n\n if (value === undefined) {\n setOption(newOption);\n }\n\n onChange(getValue(newOption), newOption);\n\n setTimeout(() => {\n if (ref.current && closeOnSelect) {\n ref.current.blur();\n }\n }, 0);\n };\n\n const [keyHandlers, highlighted, setHighlighted] = useHighlight(\n options,\n onSelect,\n ref,\n );\n const middleware = [\n useFuzzySearch ? fuzzySearch : null,\n ...(filterOptions ? filterOptions : []),\n ];\n\n const snapshot = {\n search: q,\n focus,\n option,\n value: getValue(option),\n fetching,\n highlighted,\n options: groupOptions(reduce(middleware, options, q)),\n displayValue: getDisplayValue(option, options, placeholder),\n };\n\n const valueProps = {\n tabIndex: '0',\n readOnly: !search,\n placeholder,\n value: focus && search ? q : snapshot.displayValue,\n ref,\n ...keyHandlers,\n onFocus: (e) => {\n setFocus(true);\n onFocus(e);\n },\n onBlur: (e) => {\n setFocus(false);\n setSearch('');\n setHighlighted(-1);\n onBlur(e);\n },\n onMouseDown: (e) => {\n if (focus) {\n e.preventDefault();\n ref.current.blur();\n }\n },\n onChange: search\n ? ({ target }) => setSearch(target.value)\n : null,\n };\n\n const optionProps = {\n tabIndex: '-1',\n onMouseDown(e) {\n e.preventDefault();\n onSelect(e.currentTarget.value);\n },\n };\n\n useEffect(() => {\n setOption(getOption(\n value === undefined ? defaultValue : value,\n options,\n ));\n }, [value, options]);\n\n return [snapshot, valueProps, optionProps];\n}\n","const isString = (str) => typeof str === 'string';\nconst getClassName = (str, className) =>\n isString(className) ? `${className}-${str}` : className[str];\n\nexport default function classes(classNames, className) {\n if (isString(classNames)) return getClassName(classNames, className);\n\n return Object.entries(classNames)\n .filter(([cls, display]) => cls && display)\n .map(([cls]) => getClassName(cls, className))\n .join(' ');\n}\n","/* eslint-disable react/prop-types */\nimport { memo } from 'react';\n\nfunction Option({\n optionProps,\n highlighted,\n selected,\n option,\n cls,\n renderOption,\n disabled,\n}) {\n const props = {\n ...optionProps,\n value: encodeURIComponent(option.value),\n disabled,\n };\n const className = cls({\n option: true,\n 'is-selected': selected,\n 'is-highlighted': highlighted,\n });\n\n return (\n a||125d?(a.sortIndex=c,f(t,a),null===h(r)&&a===h(t)&&(B?(E(L),L=-1):B=!0,K(H,c-d))):(a.sortIndex=e,f(r,a),A||z||(A=!0,I(J)));return a};\nexports.unstable_shouldYield=M;exports.unstable_wrapCallback=function(a){var b=y;return function(){var c=y;y=b;try{return a.apply(this,arguments)}finally{y=c}}};\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/scheduler.production.min.js');\n} else {\n module.exports = require('./cjs/scheduler.development.js');\n}\n","/**\n * @license React\n * use-sync-external-store-shim.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var e=require(\"react\");function h(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var k=\"function\"===typeof Object.is?Object.is:h,l=e.useState,m=e.useEffect,n=e.useLayoutEffect,p=e.useDebugValue;function q(a,b){var d=b(),f=l({inst:{value:d,getSnapshot:b}}),c=f[0].inst,g=f[1];n(function(){c.value=d;c.getSnapshot=b;r(c)&&g({inst:c})},[a,d,b]);m(function(){r(c)&&g({inst:c});return a(function(){r(c)&&g({inst:c})})},[a]);p(d);return d}\nfunction r(a){var b=a.getSnapshot;a=a.value;try{var d=b();return!k(a,d)}catch(f){return!0}}function t(a,b){return b()}var u=\"undefined\"===typeof window||\"undefined\"===typeof window.document||\"undefined\"===typeof window.document.createElement?t:q;exports.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:u;\n","/**\n * @license React\n * use-sync-external-store-shim/with-selector.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var h=require(\"react\"),n=require(\"use-sync-external-store/shim\");function p(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var q=\"function\"===typeof Object.is?Object.is:p,r=n.useSyncExternalStore,t=h.useRef,u=h.useEffect,v=h.useMemo,w=h.useDebugValue;\nexports.useSyncExternalStoreWithSelector=function(a,b,e,l,g){var c=t(null);if(null===c.current){var f={hasValue:!1,value:null};c.current=f}else f=c.current;c=v(function(){function a(a){if(!c){c=!0;d=a;a=l(a);if(void 0!==g&&f.hasValue){var b=f.value;if(g(b,a))return k=b}return k=a}b=k;if(q(d,a))return b;var e=l(a);if(void 0!==g&&g(b,e))return b;d=a;return k=e}var c=!1,d,k,m=void 0===e?null:e;return[function(){return a(b())},null===m?void 0:function(){return a(m())}]},[b,e,l,g]);var d=r(a,c[0],c[1]);\nu(function(){f.hasValue=!0;f.value=d},[d]);w(d);return d};\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim.production.min.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim.development.js');\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim/with-selector.production.min.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim/with-selector.development.js');\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nexport default function _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}","export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}","export default function _iterableToArrayLimit(arr, i) {\n var _i = null == arr ? null : \"undefined\" != typeof Symbol && arr[Symbol.iterator] || arr[\"@@iterator\"];\n if (null != _i) {\n var _s,\n _e,\n _x,\n _r,\n _arr = [],\n _n = !0,\n _d = !1;\n try {\n if (_x = (_i = _i.call(arr)).next, 0 === i) {\n if (Object(_i) !== _i) return;\n _n = !1;\n } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);\n } catch (err) {\n _d = !0, _e = err;\n } finally {\n try {\n if (!_n && null != _i[\"return\"] && (_r = _i[\"return\"](), Object(_r) !== _r)) return;\n } finally {\n if (_d) throw _e;\n }\n }\n return _arr;\n }\n}","export default function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}","import _typeof from \"./typeof.js\";\nexport default function _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","import defineProperty from \"./defineProperty.js\";\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n enumerableOnly && (symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n })), keys.push.apply(keys, symbols);\n }\n return keys;\n}\nexport default function _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = null != arguments[i] ? arguments[i] : {};\n i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {\n defineProperty(target, key, source[key]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}","import unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nexport default function _createForOfIteratorHelper(o, allowArrayLike) {\n var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"];\n if (!it) {\n if (Array.isArray(o) || (it = unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n if (it) o = it;\n var i = 0;\n var F = function F() {};\n return {\n s: F,\n n: function n() {\n if (i >= o.length) return {\n done: true\n };\n return {\n done: false,\n value: o[i++]\n };\n },\n e: function e(_e) {\n throw _e;\n },\n f: F\n };\n }\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n var normalCompletion = true,\n didErr = false,\n err;\n return {\n s: function s() {\n it = it.call(o);\n },\n n: function n() {\n var step = it.next();\n normalCompletion = step.done;\n return step;\n },\n e: function e(_e2) {\n didErr = true;\n err = _e2;\n },\n f: function f() {\n try {\n if (!normalCompletion && it[\"return\"] != null) it[\"return\"]();\n } finally {\n if (didErr) throw err;\n }\n }\n };\n}","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose.js\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n return target;\n}","export default function isSame(v1, v2) {\n return String(v1) === String(v2);\n}\n","import isSame from './isSame';\n\nexport default function getOption(value, options) {\n if (Array.isArray(value)) {\n return value\n .map((v) => options.find((o) => isSame(o.value, v)))\n .filter((o) => o);\n }\n\n return options.find((o) => isSame(o.value, value)) || null;\n}\n","export default function toArray(value) {\n return Array.isArray(value) ? value : [value];\n}\n","import isSame from './isSame';\nimport toArray from './toArray';\n\nexport default function updateOption(newOption, oldOption, multiple) {\n if (!newOption) {\n return oldOption;\n }\n\n if (!multiple) {\n return newOption;\n }\n\n if (!oldOption) {\n return toArray(newOption);\n }\n\n const nextOption = toArray(oldOption);\n const newOptionIndex = nextOption.findIndex((o) =>\n isSame(o.value, newOption.value),\n );\n\n if (newOptionIndex >= 0) {\n nextOption.splice(newOptionIndex, 1);\n } else {\n nextOption.push(newOption);\n }\n\n return nextOption;\n}\n","export default function getDisplayValue(option, options, placeholder) {\n if (!option && !placeholder) {\n return options && options.length ? options[0].name || '' : '';\n }\n\n const isMultiple = Array.isArray(option);\n\n if (!option && !isMultiple) {\n return '';\n }\n\n return isMultiple\n ? option\n .map((o) => o.name)\n .filter(Boolean)\n .join(', ')\n : option.name || '';\n}\n","export default function getValue(option) {\n if (!option) return null;\n\n if (Array.isArray(option)) {\n return option.filter(Boolean).map((o) => o.value);\n }\n\n return option.value || null;\n}\n","export default function groupOptions(options) {\n const nextOptions = [];\n\n options.forEach((option) => {\n if (option.group) {\n const group = nextOptions.findIndex((o) => o.type === 'group' && o.name === option.group);\n\n if (group >= 0) {\n nextOptions[group].items.push(option);\n } else {\n nextOptions.push({\n items: [option],\n type: 'group',\n name: option.group,\n });\n }\n } else {\n nextOptions.push(option);\n }\n });\n\n return nextOptions;\n}\n","function search(q, text) {\n const searchLength = q.length;\n const textLength = text.length;\n\n if (searchLength > textLength) {\n return false;\n }\n\n if (text.indexOf(q) >= 0) {\n return true;\n }\n\n mainLoop: for (let i = 0, j = 0; i < searchLength; i += 1) {\n const ch = q.charCodeAt(i);\n\n while (j < textLength) {\n if (text.charCodeAt(j++) === ch) {\n continue mainLoop;\n }\n }\n\n return false;\n }\n\n return true;\n}\n\nexport default function fuzzySearch(options, query) {\n return !query.length\n ? options\n : options.filter((o) =>\n search(\n query.toLowerCase(),\n `${o.name} ${o.group || ''}`.trim().toLowerCase(),\n ),\n );\n}\n","export default function reduce(middleware, items, query) {\n return middleware.filter(Boolean)\n .reduce((data, cb) => cb(data, query), items)\n .map((item, i) => ({ ...item, index: i }));\n}\n","export default function flattenOptions(options) {\n let index = 0;\n\n return options.map((option) => {\n if (option.type === 'group') {\n return option.items.map((o) => ({\n ...o,\n group: option.name,\n index: index++,\n }));\n }\n\n return { ...option, index: index++ };\n }).flat();\n}\n","import { useEffect, useState } from 'react';\nimport flattenOptions from './lib/flattenOptions';\n\nexport default function useOptions(\n defaultOptions,\n getOptions,\n debounceTime,\n search,\n) {\n const [options, setOptions] = useState(() => flattenOptions(defaultOptions));\n const [fetching, setFetching] = useState(false);\n\n useEffect(() => {\n let timeout;\n\n if (!getOptions) {\n return;\n }\n\n timeout = setTimeout(() => {\n const optionsReq = getOptions(search, options);\n\n setFetching(true);\n\n Promise.resolve(optionsReq)\n .then((newOptions) => setOptions(flattenOptions(newOptions)))\n .finally(() => setFetching(false));\n }, debounceTime);\n\n return () => {\n clearTimeout(timeout);\n };\n }, [search]);\n\n useEffect(() => {\n setOptions(flattenOptions(defaultOptions));\n }, [defaultOptions]);\n\n return [options, fetching];\n}\n","export default function highlight(current, dir, options) {\n const max = options.length - 1;\n let option = null;\n let i = -1;\n let newHighlighted = current;\n\n while (i++ <= max && (!option || option.disabled)) {\n newHighlighted =\n dir === 'down' ? newHighlighted + 1 : newHighlighted - 1;\n\n if (newHighlighted < 0) {\n newHighlighted = max;\n } else if (newHighlighted > max) {\n newHighlighted = 0;\n }\n\n option = options[newHighlighted];\n }\n\n return newHighlighted;\n}\n","import { useState } from 'react';\nimport highlight from './lib/highlight';\n\nexport default function useHighlight(options, onSelect, ref) {\n const [highlighted, setHighlighted] = useState(-1);\n\n return [\n {\n onKeyDown: (e) => {\n const key = e.key.replace('Arrow', '').toLowerCase();\n\n if (key === 'down' || key === 'up') {\n e.preventDefault();\n setHighlighted(highlight(highlighted, key, options));\n }\n },\n onKeyUp: (e) => {\n if (e.key === 'Escape') {\n e.preventDefault();\n ref.current.blur();\n } else if (e.key === 'Enter') {\n e.preventDefault();\n\n if (options[highlighted]) {\n onSelect(options[highlighted].value);\n }\n }\n },\n },\n highlighted,\n setHighlighted,\n ];\n}\n","import { useEffect, useRef, useState } from 'react';\nimport getOption from './lib/getOption';\nimport updateOption from './lib/updateOption';\nimport getDisplayValue from './lib/getDisplayValue';\nimport getValue from './lib/getValue';\nimport groupOptions from './lib/groupOptions';\nimport fuzzySearch from './lib/fuzzySearch';\nimport reduce from './lib/reduce';\nimport useOptions from './useOptions';\nimport useHighlight from './useHighlight';\n\nconst nullCb = () => {};\n\nexport default function useSelect({\n options: defaultOptions,\n defaultValue,\n value,\n multiple,\n search,\n onChange = nullCb,\n onFocus = nullCb,\n onBlur = nullCb,\n closeOnSelect = true,\n placeholder,\n getOptions,\n filterOptions,\n useFuzzySearch = true,\n debounce,\n}) {\n const ref = useRef();\n const [option, setOption] = useState(null);\n const [q, setSearch] = useState('');\n const [focus, setFocus] = useState(false);\n const [options, fetching] = useOptions(\n defaultOptions,\n getOptions,\n debounce,\n q,\n );\n\n const onSelect = (v) => {\n const newOption = updateOption(\n getOption(decodeURIComponent(v), options),\n option,\n multiple,\n );\n\n if (value === undefined) {\n setOption(newOption);\n }\n\n onChange(getValue(newOption), newOption);\n\n setTimeout(() => {\n if (ref.current && closeOnSelect) {\n ref.current.blur();\n }\n }, 0);\n };\n\n const [keyHandlers, highlighted, setHighlighted] = useHighlight(\n options,\n onSelect,\n ref,\n );\n const middleware = [\n useFuzzySearch ? fuzzySearch : null,\n ...(filterOptions ? filterOptions : []),\n ];\n\n const snapshot = {\n search: q,\n focus,\n option,\n value: getValue(option),\n fetching,\n highlighted,\n options: groupOptions(reduce(middleware, options, q)),\n displayValue: getDisplayValue(option, options, placeholder),\n };\n\n const valueProps = {\n tabIndex: '0',\n readOnly: !search,\n placeholder,\n value: focus && search ? q : snapshot.displayValue,\n ref,\n ...keyHandlers,\n onFocus: (e) => {\n setFocus(true);\n onFocus(e);\n },\n onBlur: (e) => {\n setFocus(false);\n setSearch('');\n setHighlighted(-1);\n onBlur(e);\n },\n onMouseDown: (e) => {\n if (focus) {\n e.preventDefault();\n ref.current.blur();\n }\n },\n onChange: search\n ? ({ target }) => setSearch(target.value)\n : null,\n };\n\n const optionProps = {\n tabIndex: '-1',\n onMouseDown(e) {\n e.preventDefault();\n onSelect(e.currentTarget.value);\n },\n };\n\n useEffect(() => {\n setOption(getOption(\n value === undefined ? defaultValue : value,\n options,\n ));\n }, [value, options]);\n\n return [snapshot, valueProps, optionProps];\n}\n","const isString = (str) => typeof str === 'string';\nconst getClassName = (str, className) =>\n isString(className) ? `${className}-${str}` : className[str];\n\nexport default function classes(classNames, className) {\n if (isString(classNames)) return getClassName(classNames, className);\n\n return Object.entries(classNames)\n .filter(([cls, display]) => cls && display)\n .map(([cls]) => getClassName(cls, className))\n .join(' ');\n}\n","/* eslint-disable react/prop-types */\nimport { memo } from 'react';\n\nfunction Option({\n optionProps,\n highlighted,\n selected,\n option,\n cls,\n renderOption,\n disabled,\n}) {\n const props = {\n ...optionProps,\n value: encodeURIComponent(option.value),\n disabled,\n };\n const className = cls({\n option: true,\n 'is-selected': selected,\n 'is-highlighted': highlighted,\n });\n\n return (\n \n {options.map((o) => {\n if (o.type === 'group') {\n return (\n
\n );\n}\n\nexport default memo(Options);\n","export default function isSelected(option, selectedOption) {\n if (!selectedOption) return false;\n\n return Array.isArray(selectedOption)\n ? selectedOption.findIndex((o) => o.value === option.value) >= 0\n : selectedOption.value === option.value;\n}\n","import { memo, forwardRef, useEffect, useRef, useState } from \"react\";\nimport PropTypes from 'prop-types';\nimport useSelect from './useSelect';\nimport classes from './lib/classes';\nimport Options from './components/Options';\n\nconst SelectSearch = forwardRef(\n (\n {\n disabled,\n placeholder,\n multiple,\n search,\n autoFocus,\n autoComplete,\n id,\n closeOnSelect,\n className,\n renderValue,\n renderOption,\n renderGroupHeader,\n fuzzySearch,\n emptyMessage,\n value,\n ...hookProps\n },\n ref,\n ) => {\n const selectRef = useRef(null);\n const cls = (classNames) => classes(classNames, className);\n const [controlledValue, setControlledValue] = useState(value);\n const [snapshot, valueProps, optionProps] = useSelect({\n value: controlledValue,\n placeholder,\n multiple,\n search,\n closeOnSelect: closeOnSelect && !multiple,\n useFuzzySearch: fuzzySearch,\n ...hookProps,\n });\n const { highlighted, value: snapValue, fetching, focus } = snapshot;\n\n const props = {\n ...valueProps,\n autoFocus,\n autoComplete,\n disabled,\n };\n\n useEffect(() => {\n const { current } = selectRef;\n\n if (current) {\n const val = Array.isArray(snapValue) ? snapValue[0] : snapValue;\n const selected = current.querySelector(\n highlighted > -1\n ? `[data-index=\"${highlighted}\"]`\n : `[value=\"${encodeURIComponent(val)}\"]`,\n );\n\n if (selected) {\n const rect = current.getBoundingClientRect();\n const selectedRect = selected.getBoundingClientRect();\n\n current.scrollTop =\n selected.offsetTop -\n rect.height / 2 +\n selectedRect.height / 2;\n }\n }\n }, [snapValue, highlighted, selectRef.current]);\n\n useEffect(() => setControlledValue(value), [value]);\n\n return (\n \n {!snapshot.options.length && emptyMessage && (\n
\n )}\n
\n {map.tiers.join(', ')}\n
\n {tags}\n
\n \n ))}\n {tooltip || ''}\n \n {badge}\n \n )\n }\n\n return badge\n}\n\nexport default MapBoss\n","import { ratingColor, scrollToElement } from '../common'\n\nconst MapConnected = ({ connected }) => {\n return connected.map(m => (\n <>\n \n
\n >\n ))\n}\n\nexport default MapConnected\n","import './MapCards.css'\nimport { useMemo } from 'react'\n\nfunction calcRate(mapRate, price, stack) {\n let perMap = 1\n let everyMap = 1 / mapRate\n if (everyMap < 1) {\n perMap = Math.floor(1 / everyMap)\n everyMap = 1\n } else {\n everyMap = Math.ceil(everyMap)\n }\n\n return {\n perMap: perMap * stack,\n everyMap,\n value: Math.round(price * mapRate * stack * 1000) / 1000\n }\n}\n\nfunction calculateCardData(card) {\n const mapRate = (card.weight / card.mapWeight) * card.dropPoolItems\n const kiracRate = card.weight / card.kiracWeight\n\n const calcMap = calcRate(mapRate, card.price, 1)\n const calcKirac = calcRate(kiracRate, card.price, card.stack)\n\n return {\n ...card,\n map: calcMap,\n kirac: calcKirac\n }\n}\n\nfunction CardRateTooltip({ rate, description, name }) {\n const perDescription = rate.everyMap > 1 ? description + 's' : description\n return !!name ? (\n <>\n {rate.perMap} {name} every {rate.everyMap > 1 && rate.everyMap} {perDescription}\n
= {rate.value} per {description}\n
\n >\n ) : (\n <>\n = {rate.perMap} every {rate.everyMap > 1 && rate.everyMap} {perDescription}\n
= {rate.value} per {description}\n
\n >\n )\n}\n\nconst MapCard = ({ unique, card }) => {\n let badgeClass\n if (card.score >= 8) {\n badgeClass = 'bg-light text-dark'\n } else if (card.score >= 5) {\n badgeClass = 'bg-primary text-light'\n } else if (card.score >= 2) {\n badgeClass = 'bg-info text-dark'\n } else if (card.score >= 0.5) {\n badgeClass = 'bg-dark text-info border border-1 border-info'\n } else {\n badgeClass = 'bg-secondary text-dark'\n }\n\n if (card.unknown) {\n badgeClass += ' border border-1 border-dark shadow-info'\n } else if (card.weight === 0) {\n badgeClass += ' border border-1 border-dark shadow-danger'\n } else if (card.boss) {\n badgeClass += ' border border-1 border-dark shadow-warning'\n }\n\n badgeClass = `badge m-1 ${badgeClass}`\n\n let img = '/img/alch.png'\n if (card.price >= 100) {\n img = '/img/divine.png'\n } else if (card.price >= 20) {\n img = '/img/exalt.png'\n } else if (card.price >= 5) {\n img = '/img/chaos.png'\n }\n\n const tooltip = card.weight > 0 && (\n <>\n
\n {card.weight} (card weight)\n
/ {card.mapWeight} (drop pool weight)\n {card.dropPoolItems > 1 && (\n <>\n
* {Math.round(card.dropPoolItems)} (drop pool items)\n >\n )}\n
\n
\n {card.weight} (card weight)\n
/ {card.kiracWeight} (map pool weight)\n
\n
\n Price: {card.price} \n
\n Weight: {card.weight}\n {(card.drop.min_level || card.drop.max_level) && (\n <>\n
\n Drop level: {dropLevel}\n >\n )}\n {card.boss && (\n <>\n
\n Boss drop\n >\n )}\n {card.unknown && (\n <>\n
\n Unknown weight\n >\n )}\n {card.weight === 0 && !card.unknown && (\n <>\n
\n Cannot drop\n >\n )}\n {tooltip}\n \n \n \n {card.boss && }\n {card.name}\n \n \n )\n}\n\nconst MapCards = ({ cardValueSourceInput, unique, cards }) => {\n const total = useMemo(() => Math.round(cards.reduce((a, b) => a + b.value, 0) * 100) / 100, [cards])\n const cardsWithData = useMemo(() => cards.filter(c => !c.hidden).map(c => calculateCardData(c)), [cards])\n\n return (\n \n \n )\n}\n\nexport default Map\n","import { useEffect, useRef, useState } from 'react'\n\nexport default function useLazy() {\n const [visible, setVisible] = useState(false)\n const ref = useRef(null)\n\n useEffect(() => {\n const observer = new IntersectionObserver(es => {\n const [e] = es\n if (e.isIntersecting) {\n setVisible(true)\n e.target.classList.remove('lazy-bg')\n observer.unobserve(e.target)\n }\n })\n\n const cur = ref.current\n\n if (cur) {\n observer.observe(cur)\n }\n\n return () => cur && observer.unobserve(cur)\n }, [ref, setVisible])\n\n return [ref, visible]\n}\n","import 'bootstrap/dist/css/bootstrap.css'\nimport '@fortawesome/fontawesome-free/css/all.min.css'\nimport './App.css'\n\nimport { useCallback, useMemo, useRef, useTransition } from 'react'\nimport SelectSearch from 'react-select-search'\nimport {\n defaultCardBaseline,\n githubRepo,\n issueTemplate,\n mfAcademyInvite,\n preparedCards,\n preparedGlobals,\n preparedMaps,\n preparedTags\n} from './data'\nimport Loader from './components/Loader'\nimport Atlas from './components/Atlas'\nimport { calculateScore, copyToClipboard, filter, mapTierToLevel } from './common'\nimport Tags from './components/Tags'\nimport usePersistedState from './hooks/usePersistedState'\nimport useInputField from './hooks/useInputField'\nimport GoToTop from './components/GoToTop'\nimport Map from './components/Map'\nimport { ReactFlowProvider } from 'reactflow'\n\nfunction rateMaps(\n foundMaps,\n foundCards,\n layoutInput,\n densityInput,\n bossInput,\n cardInput,\n cardBaselineInput,\n cardBaselineNumberInput,\n cardMinPriceInput,\n cardPriceSourceInput,\n cardValueSourceInput,\n cardDisplayInput,\n voidstones\n) {\n let cardWeightBaseline = preparedCards.find(c => c.name === cardBaselineInput).weight\n if (cardBaselineNumberInput > 0) {\n cardWeightBaseline /= cardBaselineNumberInput\n } else if (cardBaselineNumberInput < 0) {\n cardWeightBaseline *= Math.abs(cardBaselineNumberInput)\n }\n\n // First calculate value for cards\n const mapsWithCardValues = foundMaps.map(map => {\n const mapLevel = mapTierToLevel(map.tiers[voidstones])\n const mapCards = []\n let mapWeight = 0\n let bossWeight = 0\n\n for (let card of map.cards) {\n const cardMinLevel = (card.drop || {}).min_level || 0\n const cardMaxLevel = (card.drop || {}).max_level || 99\n const dropEligible = mapLevel >= cardMinLevel && mapLevel <= cardMaxLevel\n const weight = dropEligible ? card.weight || 0 : 0\n const price = (cardPriceSourceInput === 'standard' ? card.standardPrice : card.price) || 0\n\n bossWeight += weight\n if (!card.boss) {\n mapWeight += weight\n }\n\n mapCards.push({\n ...card,\n price,\n weight,\n unknown: !card.weight\n })\n }\n\n for (let card of mapCards) {\n card.mapWeight = preparedGlobals.droppool_weight + (card.boss ? bossWeight : mapWeight)\n card.kiracWeight = bossWeight\n card.dropPoolItems = 1 / (cardWeightBaseline / card.mapWeight) / (card.boss ? 10 : 1)\n\n const dropEligible = card.weight > 0\n const priceEligible = card.price >= cardMinPriceInput\n if (!card.unknown) {\n if (\n (cardDisplayInput === 'high+drop' && (!dropEligible || !priceEligible)) ||\n (cardDisplayInput === 'high' && !priceEligible) ||\n (cardDisplayInput === 'drop' && !dropEligible)\n ) {\n card.hidden = true\n card.value = 0\n continue\n }\n }\n\n if (!priceEligible) {\n card.value = 0\n continue\n }\n\n if (cardValueSourceInput === 'kirac') {\n card.value = map.unique ? 0 : card.stack * card.price * (card.weight / card.kiracWeight)\n } else {\n card.value = card.price * (card.weight / card.mapWeight) * card.dropPoolItems\n }\n }\n\n return {\n ...map,\n cards: mapCards.sort((a, b) => b.price - a.price).sort((a, b) => b.value - a.value)\n }\n })\n\n // Now calculate score for each card\n calculateScore(\n mapsWithCardValues.flatMap(m => m.cards),\n 10\n )\n\n // Now finally calculate overall map score\n const rated = calculateScore(\n mapsWithCardValues.map(map => {\n const layoutValue = (map.rating.layout || 0) * layoutInput\n const densityValue = (map.rating.density || 0) * densityInput\n const bossValue = (map.rating.boss || 0) * bossInput\n let cardValue = 0\n\n for (let card of map.cards) {\n cardValue += card.score * cardInput\n }\n\n map.value = layoutValue + densityValue + bossValue + cardValue\n return map\n }),\n 100\n )\n\n // Now find scores for connected maps\n for (let map of rated) {\n const connectedOut = []\n for (let connected of map.connected || []) {\n connectedOut.push({\n name: connected,\n score: (rated.find(rm => rm.name === connected) || {}).score || 0\n })\n }\n map.connected = connectedOut\n }\n\n return rated.sort((a, b) => b.score - a.score)\n}\n\nfunction parseSearch(s) {\n return (s || '')\n .split(',')\n .map(e => e.trim().toLowerCase())\n .filter(e => e)\n .map(e => ({\n value: e.replace(/[+-]/g, ''),\n neg: e.startsWith('-')\n }))\n}\n\nfunction buildSearch(s) {\n return s.map(v => (v.neg ? '-' : '') + v.value).join(', ')\n}\n\nfunction filterMaps(ratedMaps, currentSearch) {\n return ratedMaps\n .filter(m => !currentSearch || filter(currentSearch, m.search))\n .sort(\n (a, b) =>\n Number(filter(currentSearch, b.name.toLowerCase())) - Number(filter(currentSearch, a.name.toLowerCase()))\n )\n}\n\nfunction App() {\n const [isPending, startTransition] = useTransition()\n const shareableRef = useRef(null)\n const poeRegexRef = useRef(null)\n const searchRef = useRef(null)\n\n const [atlasFull, setAtlasFull] = usePersistedState('atlasFull', false, startTransition)\n const [atlasVoidstones, setAtlasVoidstones] = usePersistedState('atlasVoidstones', 0, startTransition)\n\n const [searchInput, setSearchInput] = usePersistedState('searchInput', '', startTransition, shareableRef)\n const [layoutInput, setLayoutInput, layoutReset, layoutRef] = useInputField(\n 'layoutInput',\n 3,\n startTransition,\n shareableRef\n )\n const [densityInput, setDensityInput, densityReset, densityRef] = useInputField(\n 'densityInput',\n 2,\n startTransition,\n shareableRef\n )\n const [bossInput, setBossInput, bossReset, bossRef] = useInputField('bossInput', 1, startTransition, shareableRef)\n const [cardInput, setCardInput, cardReset, cardRef] = useInputField(\n 'cardWeightInput',\n 2,\n startTransition,\n shareableRef\n )\n const [cardBaselineInput, setCardBaselineInput, cardBaselineReset] = useInputField(\n 'cardBaselineInput',\n defaultCardBaseline,\n startTransition,\n shareableRef\n )\n const [cardBaselineNumberInput, setCardBaselineNumberInput, cardBaselineNumberReset, cardBaselineNumberRef] =\n useInputField('cardBaselineNumberInput', 1, startTransition, shareableRef)\n const [cardMinPriceInput, setCardMinPriceInput, cardMinPriceReset, cardMinPriceRef] = useInputField(\n 'cardMinPriceInput',\n 10,\n startTransition,\n shareableRef\n )\n const [cardPriceSourceInput, setCardPriceSourceInput, cardPriceSourceReset, cardPriceSourceRef] = useInputField(\n 'cardPriceSourceInput',\n 'league',\n startTransition,\n shareableRef\n )\n const [cardValueSourceInput, setCardValueSourceInput, cardValueSourceReset, cardValueSourceRef] = useInputField(\n 'cardValueSourceInput',\n 'map',\n startTransition,\n shareableRef\n )\n const [cardDisplayInput, setCardDisplayInput, cardDisplayReset, cardDisplayRef] = useInputField(\n 'cardDisplayInput',\n 'all',\n startTransition,\n shareableRef\n )\n\n const ratedMaps = useMemo(\n () =>\n rateMaps(\n preparedMaps,\n preparedCards,\n layoutInput,\n densityInput,\n bossInput,\n cardInput,\n cardBaselineInput,\n cardBaselineNumberInput,\n cardMinPriceInput,\n cardPriceSourceInput,\n cardValueSourceInput,\n cardDisplayInput,\n atlasVoidstones\n ),\n [\n layoutInput,\n densityInput,\n bossInput,\n cardInput,\n cardBaselineInput,\n cardBaselineNumberInput,\n cardMinPriceInput,\n cardPriceSourceInput,\n cardValueSourceInput,\n cardDisplayInput,\n atlasVoidstones\n ]\n )\n const currentSearch = useMemo(() => parseSearch(searchInput), [searchInput])\n\n const filteredMaps = useMemo(() => filterMaps(ratedMaps, currentSearch), [ratedMaps, currentSearch])\n\n const poeRegex = useMemo(() => {\n const re = '\"' + [...new Set(filteredMaps.map(m => m.shorthand))].join('|') + '\"'\n if (re.length > 50) {\n let splitMaps = re.substring(0,49).split('|')\n return splitMaps.splice(0,splitMaps.length - 1).join('|') + '\"'\n }\n return re\n }, [filteredMaps])\n\n const addToInput = useCallback(\n (v, neg, remove) => {\n let s = parseSearch(searchRef.current.value || '')\n\n if (remove) {\n s = s.filter(sv => sv.value !== v)\n } else {\n const sv = s.find(sv => sv.value === v)\n if (sv) {\n sv.neg = neg\n } else {\n s.push({ value: v, neg: neg })\n }\n }\n\n const val = buildSearch(s)\n searchRef.current.value = val\n setSearchInput(val)\n },\n [setSearchInput, searchRef]\n )\n\n let containerClass = 'container-fluid p-2'\n let searchClass = ''\n let inputSectionClass = ''\n let inputClass = ''\n let bigInputClass = ''\n let fullInputClass = ''\n let atlasClass = ''\n\n if (atlasFull) {\n containerClass = containerClass + ' col-lg-3 col-12 full-height'\n searchClass = 'p-1'\n inputClass = 'col-lg-12 col-md-6 col-12 p-1'\n bigInputClass = inputClass\n fullInputClass = inputClass\n atlasClass = 'col-lg-9 col-12'\n } else {\n containerClass = containerClass + ' row g-0'\n searchClass = 'col-lg-4 col-12 p-1'\n inputSectionClass = 'col col-lg-8 col-12'\n inputClass = 'col-lg-3 col-md-6 col-12 p-1'\n bigInputClass = 'col-lg-6 col-md-6 col-12 p-1'\n fullInputClass = 'col-lg-12 col-md-6 col-12 p-1'\n }\n\n return (\n <>\n \n \n {visible ? (\n <>\n \n \n \n \n \n \n \n \n \n \n >\n ) : (\n <>\n \n \n \n \n \n >\n )}\n
\n This is not minimal layout rating filter, this will simply push maps with good layouts lower\n or higher in list.\n \n \n \n
\n This is not minimal density rating filter, this will simply push maps with good density lower\n or higher in list.\n \n \n \n
\n This is not minimal boss rating filter, this will simply push maps with good boss lower or\n higher in list.\n \n \n \n
\n This is not minimal card weight filter, this will simply push maps with good cards lower or\n higher in list.\n \n \n \n
\n Try to not go under 6c as poe.ninja tends to overvalue the low cost cards by a lot\n even though when you click on listings the data say something else.\n \n \n \n
\n This is used for calculating how many drop pool items you get on average and that is used for{' '}\n calculating chance to get card per map.\n
\n You should set this value to your observed drop rate of index card (for example Union in Cemetery)\n so the site can predict drop rates for your current farming strategy.\n \n \n \n \n \n
\n \n \n \n \n {filteredMaps.map(m => (\n \n ))}\n \n \n \n \n Map name, colored based on natural tier with map tiers for each Voidstone next to it.\n \n
\n Under it Score calculated by summing Layout, Density, Boss and Card ratings multiplied by their\n respective weights and recalculated to number betwen 0 and 100.\n
\n tier 1-5\n tier 6-10\n tier 11-16\n
\n bad/unknown\n >=30 neutral\n >=50 good\n >=70 great\n \n Map\n \n \n \n \n How straightforward is the map to clear or how good it is for league mechanics.\n \n
\n This data is opinionated, if you disagree with any rating please open issue on GitHub with\n explanation.\n
\n unknown\n bad\n >=3 neutral\n >=5 good\n >=7 great\n \n Layout\n \n \n \n \n How many total base mobs does the map have. Do not accounts for extra sources of mobs like league\n mechanics and sextants.\n \n
\n This data is based on actual mob counts in maps counted using rampage. Some newer maps and unique maps\n might be missing data as they still need to be collected.\n
\n unknown\n bad\n >=3 neutral\n >=5 good\n >=7 great\n \n Density\n \n \n \n \n How annoying/dangerous is the boss to kill.\n \n
\n This data is opinionated, if you disagree with any rating please open issue on GitHub with\n explanation.\n
\n unknown\n hard/annoying\n >=3 neutral\n >=5 alright\n >=7 easy/fast\n \n Boss\n \n \n \n Maps adjacent to this map on atlas with score on left.\n Connected\n \n \n \n \n \n Cards that drop in the map sorted by drop rate and price. Cards under{' '}\n {cardMinPriceInput}c are filtered out from rating. Adjust Average card per map if the\n card drop rates are not matching with your observed results.\n \n
\n not very good\n >=0.5 decent\n >=2 good\n >=5 great\n >=8 amazing\n \n Cards\n \n
\n Current league: {preparedGlobals.league}\n
\n Last data update: {preparedGlobals.lastUpdate}\n
\n Join the{' '}\n \n MF Academy Discord\n \n .\n \n {options.map((o) => {\n if (o.type === 'group') {\n return (\n
\n );\n}\n\nexport default memo(Options);\n","export default function isSelected(option, selectedOption) {\n if (!selectedOption) return false;\n\n return Array.isArray(selectedOption)\n ? selectedOption.findIndex((o) => o.value === option.value) >= 0\n : selectedOption.value === option.value;\n}\n","import { memo, forwardRef, useEffect, useRef, useState } from \"react\";\nimport PropTypes from 'prop-types';\nimport useSelect from './useSelect';\nimport classes from './lib/classes';\nimport Options from './components/Options';\n\nconst SelectSearch = forwardRef(\n (\n {\n disabled,\n placeholder,\n multiple,\n search,\n autoFocus,\n autoComplete,\n id,\n closeOnSelect,\n className,\n renderValue,\n renderOption,\n renderGroupHeader,\n fuzzySearch,\n emptyMessage,\n value,\n ...hookProps\n },\n ref,\n ) => {\n const selectRef = useRef(null);\n const cls = (classNames) => classes(classNames, className);\n const [controlledValue, setControlledValue] = useState(value);\n const [snapshot, valueProps, optionProps] = useSelect({\n value: controlledValue,\n placeholder,\n multiple,\n search,\n closeOnSelect: closeOnSelect && !multiple,\n useFuzzySearch: fuzzySearch,\n ...hookProps,\n });\n const { highlighted, value: snapValue, fetching, focus } = snapshot;\n\n const props = {\n ...valueProps,\n autoFocus,\n autoComplete,\n disabled,\n };\n\n useEffect(() => {\n const { current } = selectRef;\n\n if (current) {\n const val = Array.isArray(snapValue) ? snapValue[0] : snapValue;\n const selected = current.querySelector(\n highlighted > -1\n ? `[data-index=\"${highlighted}\"]`\n : `[value=\"${encodeURIComponent(val)}\"]`,\n );\n\n if (selected) {\n const rect = current.getBoundingClientRect();\n const selectedRect = selected.getBoundingClientRect();\n\n current.scrollTop =\n selected.offsetTop -\n rect.height / 2 +\n selectedRect.height / 2;\n }\n }\n }, [snapValue, highlighted, selectRef.current]);\n\n useEffect(() => setControlledValue(value), [value]);\n\n return (\n \n {!snapshot.options.length && emptyMessage && (\n
\n )}\n
\n {map.tiers.join(', ')}\n
\n {tags}\n
\n \n ))}\n {tooltip || ''}\n \n {badge}\n \n )\n }\n\n return badge\n}\n\nexport default MapBoss\n","import { ratingColor, scrollToElement } from '../common'\n\nconst MapConnected = ({ connected }) => {\n return connected.map(m => (\n <>\n \n
\n >\n ))\n}\n\nexport default MapConnected\n","import './MapCards.css'\nimport { useMemo } from 'react'\n\nfunction calcRate(mapRate, price, stack) {\n let perMap = 1\n let everyMap = 1 / mapRate\n if (everyMap < 1) {\n perMap = Math.floor(1 / everyMap)\n everyMap = 1\n } else {\n everyMap = Math.ceil(everyMap)\n }\n\n return {\n perMap: perMap * stack,\n everyMap,\n value: Math.round(price * mapRate * stack * 1000) / 1000\n }\n}\n\nfunction calculateCardData(card) {\n const mapRate = (card.weight / card.mapWeight) * card.dropPoolItems\n const kiracRate = card.weight / card.kiracWeight\n\n const calcMap = calcRate(mapRate, card.price, 1)\n const calcKirac = calcRate(kiracRate, card.price, card.stack)\n\n return {\n ...card,\n map: calcMap,\n kirac: calcKirac\n }\n}\n\nfunction CardRateTooltip({ rate, description, name }) {\n const perDescription = rate.everyMap > 1 ? description + 's' : description\n return !!name ? (\n <>\n {rate.perMap} {name} every {rate.everyMap > 1 && rate.everyMap} {perDescription}\n
= {rate.value} per {description}\n
\n >\n ) : (\n <>\n = {rate.perMap} every {rate.everyMap > 1 && rate.everyMap} {perDescription}\n
= {rate.value} per {description}\n
\n >\n )\n}\n\nconst MapCard = ({ unique, card }) => {\n let badgeClass\n if (card.score >= 8) {\n badgeClass = 'bg-light text-dark'\n } else if (card.score >= 5) {\n badgeClass = 'bg-primary text-light'\n } else if (card.score >= 2) {\n badgeClass = 'bg-info text-dark'\n } else if (card.score >= 0.5) {\n badgeClass = 'bg-dark text-info border border-1 border-info'\n } else {\n badgeClass = 'bg-secondary text-dark'\n }\n\n if (card.unknown) {\n badgeClass += ' border border-1 border-dark shadow-info'\n } else if (card.weight === 0) {\n badgeClass += ' border border-1 border-dark shadow-danger'\n } else if (card.boss) {\n badgeClass += ' border border-1 border-dark shadow-warning'\n }\n\n badgeClass = `badge m-1 ${badgeClass}`\n\n let img = '/img/alch.png'\n if (card.price >= 100) {\n img = '/img/divine.png'\n } else if (card.price >= 20) {\n img = '/img/exalt.png'\n } else if (card.price >= 5) {\n img = '/img/chaos.png'\n }\n\n const tooltip = card.weight > 0 && (\n <>\n
\n {card.weight} (card weight)\n
/ {card.mapWeight} (drop pool weight)\n {card.dropPoolItems > 1 && (\n <>\n
* {Math.round(card.dropPoolItems)} (drop pool items)\n >\n )}\n
\n
\n {card.weight} (card weight)\n
/ {card.kiracWeight} (map pool weight)\n
\n
\n Price: {card.price} \n
\n Weight: {card.weight}\n {(card.drop.min_level || card.drop.max_level) && (\n <>\n
\n Drop level: {dropLevel}\n >\n )}\n {card.boss && (\n <>\n
\n Boss drop\n >\n )}\n {card.unknown && (\n <>\n
\n Unknown weight\n >\n )}\n {card.weight === 0 && !card.unknown && (\n <>\n
\n Cannot drop\n >\n )}\n {tooltip}\n \n \n \n {card.boss && }\n {card.name}\n \n \n )\n}\n\nconst MapCards = ({ cardValueSourceInput, unique, cards }) => {\n const total = useMemo(() => Math.round(cards.reduce((a, b) => a + b.value, 0) * 100) / 100, [cards])\n const cardsWithData = useMemo(() => cards.filter(c => !c.hidden).map(c => calculateCardData(c)), [cards])\n\n return (\n \n \n )\n}\n\nexport default Map\n","import { useEffect, useRef, useState } from 'react'\n\nexport default function useLazy() {\n const [visible, setVisible] = useState(false)\n const ref = useRef(null)\n\n useEffect(() => {\n const observer = new IntersectionObserver(es => {\n const [e] = es\n if (e.isIntersecting) {\n setVisible(true)\n e.target.classList.remove('lazy-bg')\n observer.unobserve(e.target)\n }\n })\n\n const cur = ref.current\n\n if (cur) {\n observer.observe(cur)\n }\n\n return () => cur && observer.unobserve(cur)\n }, [ref, setVisible])\n\n return [ref, visible]\n}\n","import 'bootstrap/dist/css/bootstrap.css'\nimport '@fortawesome/fontawesome-free/css/all.min.css'\nimport './App.css'\n\nimport { useCallback, useMemo, useRef, useTransition } from 'react'\nimport SelectSearch from 'react-select-search'\nimport {\n defaultCardBaseline,\n githubRepo,\n issueTemplate,\n mfAcademyInvite,\n preparedCards,\n preparedGlobals,\n preparedMaps,\n preparedTags\n} from './data'\nimport Loader from './components/Loader'\nimport Atlas from './components/Atlas'\nimport { calculateScore, copyToClipboard, filter, mapTierToLevel } from './common'\nimport Tags from './components/Tags'\nimport usePersistedState from './hooks/usePersistedState'\nimport useInputField from './hooks/useInputField'\nimport GoToTop from './components/GoToTop'\nimport Map from './components/Map'\nimport { ReactFlowProvider } from 'reactflow'\n\nfunction rateMaps(\n foundMaps,\n foundCards,\n layoutInput,\n densityInput,\n bossInput,\n cardInput,\n cardBaselineInput,\n cardBaselineNumberInput,\n cardMinPriceInput,\n cardPriceSourceInput,\n cardValueSourceInput,\n cardDisplayInput,\n voidstones\n) {\n let cardWeightBaseline = preparedCards.find(c => c.name === cardBaselineInput).weight\n if (cardBaselineNumberInput > 0) {\n cardWeightBaseline /= cardBaselineNumberInput\n } else if (cardBaselineNumberInput < 0) {\n cardWeightBaseline *= Math.abs(cardBaselineNumberInput)\n }\n\n // First calculate value for cards\n const mapsWithCardValues = foundMaps.map(map => {\n const mapLevel = mapTierToLevel(map.tiers[voidstones])\n const mapCards = []\n let mapWeight = 0\n let bossWeight = 0\n\n for (let card of map.cards) {\n const cardMinLevel = (card.drop || {}).min_level || 0\n const cardMaxLevel = (card.drop || {}).max_level || 99\n const dropEligible = mapLevel >= cardMinLevel && mapLevel <= cardMaxLevel\n const weight = dropEligible ? card.weight || 0 : 0\n const price = (cardPriceSourceInput === 'standard' ? card.standardPrice : card.price) || 0\n\n bossWeight += weight\n if (!card.boss) {\n mapWeight += weight\n }\n\n mapCards.push({\n ...card,\n price,\n weight,\n unknown: !card.weight\n })\n }\n\n for (let card of mapCards) {\n card.mapWeight = preparedGlobals.droppool_weight + (card.boss ? bossWeight : mapWeight)\n card.kiracWeight = bossWeight\n card.dropPoolItems = 1 / (cardWeightBaseline / card.mapWeight) / (card.boss ? 10 : 1)\n\n const dropEligible = card.weight > 0\n const priceEligible = card.price >= cardMinPriceInput\n if (!card.unknown) {\n if (\n (cardDisplayInput === 'high+drop' && (!dropEligible || !priceEligible)) ||\n (cardDisplayInput === 'high' && !priceEligible) ||\n (cardDisplayInput === 'drop' && !dropEligible)\n ) {\n card.hidden = true\n card.value = 0\n continue\n }\n }\n\n if (!priceEligible) {\n card.value = 0\n continue\n }\n\n if (cardValueSourceInput === 'kirac') {\n card.value = map.unique ? 0 : card.stack * card.price * (card.weight / card.kiracWeight)\n } else {\n card.value = card.price * (card.weight / card.mapWeight) * card.dropPoolItems\n }\n }\n\n return {\n ...map,\n cards: mapCards.sort((a, b) => b.price - a.price).sort((a, b) => b.value - a.value)\n }\n })\n\n // Now calculate score for each card\n calculateScore(\n mapsWithCardValues.flatMap(m => m.cards),\n 10\n )\n\n // Now finally calculate overall map score\n const rated = calculateScore(\n mapsWithCardValues.map(map => {\n const layoutValue = (map.rating.layout || 0) * layoutInput\n const densityValue = (map.rating.density || 0) * densityInput\n const bossValue = (map.rating.boss || 0) * bossInput\n let cardValue = 0\n\n for (let card of map.cards) {\n cardValue += card.score * cardInput\n }\n\n map.value = layoutValue + densityValue + bossValue + cardValue\n return map\n }),\n 100\n )\n\n // Now find scores for connected maps\n for (let map of rated) {\n const connectedOut = []\n for (let connected of map.connected || []) {\n connectedOut.push({\n name: connected,\n score: (rated.find(rm => rm.name === connected) || {}).score || 0\n })\n }\n map.connected = connectedOut\n }\n\n return rated.sort((a, b) => b.score - a.score)\n}\n\nfunction parseSearch(s) {\n return (s || '')\n .split(',')\n .map(e => e.trim().toLowerCase())\n .filter(e => e)\n .map(e => ({\n value: e.replace(/[+-]/g, ''),\n neg: e.startsWith('-')\n }))\n}\n\nfunction buildSearch(s) {\n return s.map(v => (v.neg ? '-' : '') + v.value).join(', ')\n}\n\nfunction filterMaps(ratedMaps, currentSearch) {\n return ratedMaps\n .filter(m => !currentSearch || filter(currentSearch, m.search))\n .sort(\n (a, b) =>\n Number(filter(currentSearch, b.name.toLowerCase())) - Number(filter(currentSearch, a.name.toLowerCase()))\n )\n}\n\nfunction App() {\n const [isPending, startTransition] = useTransition()\n const shareableRef = useRef(null)\n const poeRegexRef = useRef(null)\n const searchRef = useRef(null)\n\n const [atlasFull, setAtlasFull] = usePersistedState('atlasFull', false, startTransition)\n const [atlasVoidstones, setAtlasVoidstones] = usePersistedState('atlasVoidstones', 0, startTransition)\n\n const [searchInput, setSearchInput] = usePersistedState('searchInput', '', startTransition, shareableRef)\n const [layoutInput, setLayoutInput, layoutReset, layoutRef] = useInputField(\n 'layoutInput',\n 3,\n startTransition,\n shareableRef\n )\n const [densityInput, setDensityInput, densityReset, densityRef] = useInputField(\n 'densityInput',\n 2,\n startTransition,\n shareableRef\n )\n const [bossInput, setBossInput, bossReset, bossRef] = useInputField('bossInput', 1, startTransition, shareableRef)\n const [cardInput, setCardInput, cardReset, cardRef] = useInputField(\n 'cardWeightInput',\n 2,\n startTransition,\n shareableRef\n )\n const [cardBaselineInput, setCardBaselineInput, cardBaselineReset] = useInputField(\n 'cardBaselineInput',\n defaultCardBaseline,\n startTransition,\n shareableRef\n )\n const [cardBaselineNumberInput, setCardBaselineNumberInput, cardBaselineNumberReset, cardBaselineNumberRef] =\n useInputField('cardBaselineNumberInput', 1, startTransition, shareableRef)\n const [cardMinPriceInput, setCardMinPriceInput, cardMinPriceReset, cardMinPriceRef] = useInputField(\n 'cardMinPriceInput',\n 10,\n startTransition,\n shareableRef\n )\n const [cardPriceSourceInput, setCardPriceSourceInput, cardPriceSourceReset, cardPriceSourceRef] = useInputField(\n 'cardPriceSourceInput',\n 'league',\n startTransition,\n shareableRef\n )\n const [cardValueSourceInput, setCardValueSourceInput, cardValueSourceReset, cardValueSourceRef] = useInputField(\n 'cardValueSourceInput',\n 'map',\n startTransition,\n shareableRef\n )\n const [cardDisplayInput, setCardDisplayInput, cardDisplayReset, cardDisplayRef] = useInputField(\n 'cardDisplayInput',\n 'all',\n startTransition,\n shareableRef\n )\n\n const ratedMaps = useMemo(\n () =>\n rateMaps(\n preparedMaps,\n preparedCards,\n layoutInput,\n densityInput,\n bossInput,\n cardInput,\n cardBaselineInput,\n cardBaselineNumberInput,\n cardMinPriceInput,\n cardPriceSourceInput,\n cardValueSourceInput,\n cardDisplayInput,\n atlasVoidstones\n ),\n [\n layoutInput,\n densityInput,\n bossInput,\n cardInput,\n cardBaselineInput,\n cardBaselineNumberInput,\n cardMinPriceInput,\n cardPriceSourceInput,\n cardValueSourceInput,\n cardDisplayInput,\n atlasVoidstones\n ]\n )\n const currentSearch = useMemo(() => parseSearch(searchInput), [searchInput])\n\n const filteredMaps = useMemo(() => filterMaps(ratedMaps, currentSearch), [ratedMaps, currentSearch])\n\n const poeRegex = useMemo(() => {\n const re = '\"' + [...new Set(filteredMaps.map(m => m.shorthand))].join('|') + '\"'\n if (re.length > 50) {\n let splitMaps = re.substring(0,49).split('|')\n return splitMaps.splice(0,splitMaps.length - 1).join('|') + '\"'\n }\n return re\n }, [filteredMaps])\n\n const addToInput = useCallback(\n (v, neg, remove) => {\n let s = parseSearch(searchRef.current.value || '')\n\n if (remove) {\n s = s.filter(sv => sv.value !== v)\n } else {\n const sv = s.find(sv => sv.value === v)\n if (sv) {\n sv.neg = neg\n } else {\n s.push({ value: v, neg: neg })\n }\n }\n\n const val = buildSearch(s)\n searchRef.current.value = val\n setSearchInput(val)\n },\n [setSearchInput, searchRef]\n )\n\n let containerClass = 'container-fluid p-2'\n let searchClass = ''\n let inputSectionClass = ''\n let inputClass = ''\n let bigInputClass = ''\n let fullInputClass = ''\n let atlasClass = ''\n\n if (atlasFull) {\n containerClass = containerClass + ' col-lg-3 col-12 full-height'\n searchClass = 'p-1'\n inputClass = 'col-lg-12 col-md-6 col-12 p-1'\n bigInputClass = inputClass\n fullInputClass = inputClass\n atlasClass = 'col-lg-9 col-12'\n } else {\n containerClass = containerClass + ' row g-0'\n searchClass = 'col-lg-4 col-12 p-1'\n inputSectionClass = 'col col-lg-8 col-12'\n inputClass = 'col-lg-3 col-md-6 col-12 p-1'\n bigInputClass = 'col-lg-6 col-md-6 col-12 p-1'\n fullInputClass = 'col-lg-12 col-md-6 col-12 p-1'\n }\n\n return (\n <>\n \n \n {visible ? (\n <>\n \n \n \n \n \n \n \n \n \n \n >\n ) : (\n <>\n \n \n \n \n \n >\n )}\n
\n This is not minimal layout rating filter, this will simply push maps with good layouts lower\n or higher in list.\n \n \n \n
\n This is not minimal density rating filter, this will simply push maps with good density lower\n or higher in list.\n \n \n \n
\n This is not minimal boss rating filter, this will simply push maps with good boss lower or\n higher in list.\n \n \n \n
\n This is not minimal card weight filter, this will simply push maps with good cards lower or\n higher in list.\n \n \n \n
\n Try to not go under 6c as poe.ninja tends to overvalue the low cost cards by a lot\n even though when you click on listings the data say something else.\n \n \n \n
\n This is used for calculating how many drop pool items you get on average and that is used for{' '}\n calculating chance to get card per map.\n
\n You should set this value to your observed drop rate of index card (for example Union in Cemetery)\n so the site can predict drop rates for your current farming strategy.\n \n \n \n \n \n
\n \n \n \n \n {filteredMaps.map(m => (\n \n ))}\n \n \n \n \n Map name, colored based on natural tier with map tiers for each Voidstone next to it.\n \n
\n Under it Score calculated by summing Layout, Density, Boss and Card ratings multiplied by their\n respective weights and recalculated to number betwen 0 and 100.\n
\n tier 1-5\n tier 6-10\n tier 11-16\n
\n bad/unknown\n >=30 neutral\n >=50 good\n >=70 great\n \n Map\n \n \n \n \n How straightforward is the map to clear or how good it is for league mechanics.\n \n
\n This data is opinionated, if you disagree with any rating please open issue on GitHub with\n explanation.\n
\n unknown\n bad\n >=3 neutral\n >=5 good\n >=7 great\n \n Layout\n \n \n \n \n How many total base mobs does the map have. Do not accounts for extra sources of mobs like league\n mechanics and sextants.\n \n
\n This data is based on actual mob counts in maps counted using rampage. Some newer maps and unique maps\n might be missing data as they still need to be collected.\n
\n unknown\n bad\n >=3 neutral\n >=5 good\n >=7 great\n \n Density\n \n \n \n \n How annoying/dangerous is the boss to kill.\n \n
\n This data is opinionated, if you disagree with any rating please open issue on GitHub with\n explanation.\n
\n unknown\n hard/annoying\n >=3 neutral\n >=5 alright\n >=7 easy/fast\n \n Boss\n \n \n \n Maps adjacent to this map on atlas with score on left.\n Connected\n \n \n \n \n \n Cards that drop in the map sorted by drop rate and price. Cards under{' '}\n {cardMinPriceInput}c are filtered out from rating. Adjust Average card per map if the\n card drop rates are not matching with your observed results.\n \n
\n not very good\n >=0.5 decent\n >=2 good\n >=5 great\n >=8 amazing\n \n Cards\n \n
\n Current league: {preparedGlobals.league}\n
\n Last data update: {preparedGlobals.lastUpdate}\n
\n Join the{' '}\n \n MF Academy Discord\n \n .\n o(l,t))d=0&&a._call.call(void 0,e),a=a._next;--ot}()}finally{ot=0,function(){var e,a,t=tt,r=1/0;for(;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(a=t._next,t._next=null,t=e?e._next=a:tt=a);rt=e,bt(r)}(),ct=0}}function yt(){var e=pt.now(),a=e-dt;a>lt&&(ut-=a,dt=e)}function bt(e){ot||(st&&(st=clearTimeout(st)),e-ct>24?(e<1/0&&(st=setTimeout(vt,e-pt.now()-ut)),it&&(it=clearInterval(it))):(it||(dt=pt.now(),it=setInterval(yt,lt)),ot=1,ht(vt)))}function wt(e,a,t){var r=new Mt;return a=null==a?0:+a,r.restart((function(t){r.stop(),e(t+a)}),a,t),r}Mt.prototype=gt.prototype={constructor:Mt,restart:function(e,a,t){if("function"!==typeof e)throw new TypeError("callback is not a function");t=(null==t?mt():+t)+(null==a?0:+a),this._next||rt===this||(rt?rt._next=this:tt=this,rt=this),this._call=e,this._time=t,bt()},stop:function(){this._call&&(this._call=null,this._time=1/0,bt())}};var Wt=_e("start","end","cancel","interrupt"),St=[],_t=0,kt=1,xt=2,Ct=3,At=4,Tt=5,Pt=6;function jt(e,a,t,r,n,o){var s=e.__transition;if(s){if(t in s)return}else e.__transition={};!function(e,a,t){var r,n=e.__transition;function o(e){t.state=kt,t.timer.restart(s,t.delay,t.time),t.delay<=e&&s(e-t.delay)}function s(o){var d,c,u,p;if(t.state!==kt)return l();for(d in n)if((p=n[d]).name===t.name){if(p.state===Ct)return wt(s);p.state===At?(p.state=Pt,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete n[d]):+d_t)throw new Error("too late; already scheduled");return t}function Et(e,a){var t=Dt(e,a);if(t.state>Ct)throw new Error("too late; already running");return t}function Dt(e,a){var t=e.__transition;if(!t||!(t=t[a]))throw new Error("transition not found");return t}function Nt(e,a){var t,r,n,o=e.__transition,s=!0;if(o){for(n in a=null==a?null:a+"",o)(t=o[n]).name===a?(r=t.state>xt&&t.state180?a+=360:a-e>180&&(e+=360),o.push({i:t.push(n(t)+"rotate(",null,r)-2,x:Lt(e,a)})):a&&t.push(n(t)+"rotate("+a+r)}(o.rotate,s.rotate,i,l),function(e,a,t,o){e!==a?o.push({i:t.push(n(t)+"skewX(",null,r)-2,x:Lt(e,a)}):a&&t.push(n(t)+"skewX("+a+r)}(o.skewX,s.skewX,i,l),function(e,a,t,r,o,s){if(e!==t||a!==r){var i=o.push(n(o)+"scale(",null,",",null,")");s.push({i:i-4,x:Lt(e,t)},{i:i-2,x:Lt(a,r)})}else 1===t&&1===r||o.push(n(o)+"scale("+t+","+r+")")}(o.scaleX,o.scaleY,s.scaleX,s.scaleY,i,l),o=s=null,function(e){for(var a,t=-1,r=l.length;++tr?(r+n)/2:Math.min(0,r)||Math.max(0,n),s>o?(o+s)/2:Math.min(0,o)||Math.max(0,s))}sn.prototype;t(164);var gn,vn,yn,bn=["position","children","className","style"],wn=["x","y","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","children","className"],Wn=["type","position","isValidConnection","isConnectable","isConnectableStart","isConnectableEnd","id","onConnect","children","className","onMouseDown","onTouchStart"],Sn=["nodes","edges","defaultNodes","defaultEdges","className","nodeTypes","edgeTypes","onNodeClick","onEdgeClick","onInit","onMove","onMoveStart","onMoveEnd","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","onNodeMouseEnter","onNodeMouseMove","onNodeMouseLeave","onNodeContextMenu","onNodeDoubleClick","onNodeDragStart","onNodeDrag","onNodeDragStop","onNodesDelete","onEdgesDelete","onSelectionChange","onSelectionDragStart","onSelectionDrag","onSelectionDragStop","onSelectionContextMenu","onSelectionStart","onSelectionEnd","connectionMode","connectionLineType","connectionLineStyle","connectionLineComponent","connectionLineContainerStyle","deleteKeyCode","selectionKeyCode","selectionOnDrag","selectionMode","panActivationKeyCode","multiSelectionKeyCode","zoomActivationKeyCode","snapToGrid","snapGrid","onlyRenderVisibleElements","selectNodesOnDrag","nodesDraggable","nodesConnectable","nodesFocusable","nodeOrigin","edgesFocusable","edgesUpdatable","elementsSelectable","defaultViewport","minZoom","maxZoom","translateExtent","preventScrolling","nodeExtent","defaultMarkerColor","zoomOnScroll","zoomOnPinch","panOnScroll","panOnScrollSpeed","panOnScrollMode","zoomOnDoubleClick","panOnDrag","onPaneClick","onPaneMouseEnter","onPaneMouseMove","onPaneMouseLeave","onPaneScroll","onPaneContextMenu","children","onEdgeUpdate","onEdgeContextMenu","onEdgeDoubleClick","onEdgeMouseEnter","onEdgeMouseMove","onEdgeMouseLeave","onEdgeUpdateStart","onEdgeUpdateEnd","edgeUpdaterRadius","onNodesChange","onEdgesChange","noDragClassName","noWheelClassName","noPanClassName","fitView","fitViewOptions","connectOnClick","attributionPosition","proOptions","defaultEdgeOptions","elevateNodesOnSelect","elevateEdgesOnSelect","disableKeyboardA11y","autoPanOnConnect","autoPanOnNodeDrag","connectionRadius","isValidConnection","onError","style","id"],_n=(0,e.createContext)(null),kn=_n.Provider,xn={error001:function(){return"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001"},error002:function(){return"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them."},error003:function(e){return'Node type "'.concat(e,'" not found. Using fallback type "default".')},error004:function(){return"The React Flow parent container needs a width and a height to render the graph."},error005:function(){return"Only child nodes can use a parent extent."},error006:function(){return"Can't create edge. An edge needs a source and a target."},error007:function(e){return"The old edge with id=".concat(e," does not exist.")},error009:function(e){return'Marker type "'.concat(e,"\" doesn't exist.")},error008:function(e,a){return"Couldn't create edge for ".concat(e?"target":"source",' handle id: "').concat(e?a.targetHandle:a.sourceHandle,'", edge id: ').concat(a.id,".")},error010:function(){return"Handle: No node id found. Make sure to only use a Handle inside a custom Node."},error011:function(e){return'Edge type "'.concat(e,'" not found. Using fallback type "default".')}},Cn=xn.error001();function An(a,t){var r=(0,e.useContext)(_n);if(null===r)throw new Error(Cn);return fe(r,a,t)}var Tn=function(){var a=(0,e.useContext)(_n);if(null===a)throw new Error(Cn);return(0,e.useMemo)((function(){return{getState:a.getState,setState:a.setState,subscribe:a.subscribe,destroy:a.destroy}}),[a])},Pn=function(e){return e.userSelectionActive?"none":"all"};function jn(e){var a=e.position,t=e.children,r=e.className,n=e.style,s=h(e,bn),i=An(Pn),l="".concat(a).split("-");return(0,m.jsx)("div",u(u({className:he(["react-flow__panel",r].concat(o(l))),style:u(u({},n),{},{pointerEvents:i})},s),{},{children:t}))}function Bn(e){var a=e.proOptions,t=e.position,r=void 0===t?"bottom-right":t;return null!==a&&void 0!==a&&a.hideAttribution?null:(0,m.jsx)(jn,{position:r,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:(0,m.jsx)("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}var En=(0,e.memo)((function(a){var t=a.x,r=a.y,n=a.label,o=a.labelStyle,i=void 0===o?{}:o,l=a.labelShowBg,d=void 0===l||l,c=a.labelBgStyle,p=void 0===c?{}:c,f=a.labelBgPadding,M=void 0===f?[2,4]:f,g=a.labelBgBorderRadius,v=void 0===g?2:g,y=a.children,b=a.className,w=h(a,wn),W=(0,e.useRef)(null),S=s((0,e.useState)({x:0,y:0,width:0,height:0}),2),_=S[0],k=S[1],x=he(["react-flow__edge-textwrapper",b]);return(0,e.useEffect)((function(){if(W.current){var e=W.current.getBBox();k({x:e.x,y:e.y,width:e.width,height:e.height})}}),[n]),"undefined"!==typeof n&&n?(0,m.jsxs)("g",u(u({transform:"translate(".concat(t-_.width/2," ").concat(r-_.height/2,")"),className:x,visibility:_.width?"visible":"hidden"},w),{},{children:[d&&(0,m.jsx)("rect",{width:_.width+2*M[0],x:-M[0],y:-M[1],height:_.height+2*M[1],className:"react-flow__edge-textbg",style:p,rx:v,ry:v}),(0,m.jsx)("text",{className:"react-flow__edge-text",y:_.height/2,dy:"0.3em",ref:W,style:i,children:n}),y]})):null})),Dn=function(e){return{width:e.offsetWidth,height:e.offsetHeight}},Nn=function(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(e,a),t)},Ln=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{x:0,y:0},a=arguments.length>1?arguments[1]:void 0;return{x:Nn(e.x,a[0][0],a[1][0]),y:Nn(e.y,a[0][1],a[1][1])}},In=function(e,a,t){return et?-Nn(Math.abs(e-t),1,50)/50:0},Fn=function(e,a){return[20*In(e.x,35,a.width-35),20*In(e.y,35,a.height-35)]},Rn=function(e){var a,t;return(null===(a=e.getRootNode)||void 0===a?void 0:a.call(e))||(null===(t=window)||void 0===t?void 0:t.document)},On=function(e,a){return{x:Math.min(e.x,a.x),y:Math.min(e.y,a.y),x2:Math.max(e.x2,a.x2),y2:Math.max(e.y2,a.y2)}},Vn=function(e){var a=e.x,t=e.y;return{x:a,y:t,x2:a+e.width,y2:t+e.height}},zn=function(e){var a=e.x,t=e.y;return{x:a,y:t,width:e.x2-a,height:e.y2-t}},Gn=function(e){return u(u({},e.positionAbsolute||{x:0,y:0}),{},{width:e.width||0,height:e.height||0})},Hn=function(e,a){var t=Math.max(0,Math.min(e.x+e.width,a.x+a.width)-Math.max(e.x,a.x)),r=Math.max(0,Math.min(e.y+e.height,a.y+a.height)-Math.max(e.y,a.y));return Math.ceil(t*r)},Un=function(e){return qn(e.width)&&qn(e.height)&&qn(e.x)&&qn(e.y)},qn=function(e){return!isNaN(e)&&isFinite(e)},Kn=Symbol.for("internals"),Yn=["Enter"," ","Escape"],Xn=function(e,a){0};function Qn(e){var a,t,r=function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,n=(null===(a=r.composedPath)||void 0===a||null===(t=a.call(r))||void 0===t?void 0:t[0])||e.target;return["INPUT","SELECT","TEXTAREA"].includes(null===n||void 0===n?void 0:n.nodeName)||(null===n||void 0===n?void 0:n.hasAttribute("contenteditable"))||!(null===n||void 0===n||!n.closest(".nokey"))}var $n=function(e){return"clientX"in e},Zn=function(e,a){var t,r,n,o,s=$n(e),i=s?e.clientX:null===(t=e.touches)||void 0===t?void 0:t[0].clientX,l=s?e.clientY:null===(r=e.touches)||void 0===r?void 0:r[0].clientY;return{x:i-(null!==(n=null===a||void 0===a?void 0:a.left)&&void 0!==n?n:0),y:l-(null!==(o=null===a||void 0===a?void 0:a.top)&&void 0!==o?o:0)}},Jn=function(e){var a=e.id,t=e.path,r=e.labelX,n=e.labelY,o=e.label,s=e.labelStyle,i=e.labelShowBg,l=e.labelBgStyle,d=e.labelBgPadding,c=e.labelBgBorderRadius,u=e.style,p=e.markerEnd,h=e.markerStart,f=e.interactionWidth,M=void 0===f?20:f;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("path",{id:a,style:u,d:t,fill:"none",className:"react-flow__edge-path",markerEnd:p,markerStart:h}),M&&(0,m.jsx)("path",{d:t,fill:"none",strokeOpacity:0,strokeWidth:M,className:"react-flow__edge-interaction"}),o&&qn(r)&&qn(n)?(0,m.jsx)(En,{x:r,y:n,label:o,labelStyle:s,labelShowBg:i,labelBgStyle:l,labelBgPadding:d,labelBgBorderRadius:c}):null]})};Jn.displayName="BaseEdge";var eo,ao,to,ro,no,oo;function so(e,a,t){return void 0===t?t:function(r){var n=a().edges.find((function(a){return a.id===e}));n&&t(r,u({},n))}}function io(e){var a=e.sourceX,t=e.sourceY,r=e.targetX,n=e.targetY,o=Math.abs(r-a)/2,s=rM[P],E=f[P]