aiware-js 2.26.0 → 2.27.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.
Files changed (59) hide show
  1. package/index.esm.js +1 -1
  2. package/js-core.esm.js +14 -14
  3. package/js-core.esm16.js +1 -1
  4. package/js-core.esm2.js +1 -1
  5. package/js-core.esm20.js +1 -230
  6. package/js-core.esm21.js +211 -65
  7. package/js-core.esm22.js +78 -1
  8. package/js-core.esm23.js +1 -1
  9. package/js-core.esm24.js +1 -1
  10. package/js-core.esm25.js +1 -1
  11. package/js-core.esm26.js +1 -1
  12. package/js-core.esm27.js +1 -1
  13. package/js-core.esm28.js +1 -1
  14. package/js-core.esm29.js +1 -1
  15. package/js-core.esm30.js +1 -1
  16. package/js-core.esm31.js +1 -1
  17. package/js-core.esm32.js +1 -14
  18. package/js-core.esm33.js +1 -12
  19. package/js-core.esm34.js +1 -54
  20. package/js-core.esm35.js +1 -1
  21. package/js-core.esm36.js +1 -1
  22. package/js-core.esm37.js +1 -108
  23. package/js-core.esm38.js +14 -1
  24. package/js-core.esm39.js +12 -214
  25. package/js-core.esm4.js +1 -1
  26. package/js-core.esm40.js +54 -1
  27. package/js-core.esm41.js +1 -1
  28. package/js-core.esm42.js +1 -1
  29. package/js-core.esm43.js +108 -1
  30. package/js-core.esm44.js +1 -37
  31. package/js-core.esm45.js +214 -1
  32. package/js-core.esm46.js +1 -1
  33. package/js-core.esm47.js +37 -1
  34. package/js-core.esm48.js +1 -1
  35. package/js-core.esm49.js +1 -31
  36. package/js-core.esm5.js +3 -3
  37. package/js-core.esm50.js +1 -32
  38. package/js-core.esm51.js +1 -85
  39. package/js-core.esm52.js +1 -1
  40. package/js-core.esm53.js +1 -54
  41. package/js-core.esm54.js +1 -133
  42. package/js-core.esm55.js +26 -82
  43. package/js-core.esm56.js +32 -1
  44. package/js-core.esm57.js +80 -38
  45. package/js-core.esm58.js +1 -20
  46. package/js-core.esm59.js +55 -1
  47. package/js-core.esm60.js +133 -0
  48. package/js-core.esm61.js +87 -0
  49. package/js-core.esm62.js +1 -0
  50. package/js-core.esm63.js +1 -0
  51. package/js-core.esm64.js +90 -0
  52. package/js-core.esm65.js +20 -0
  53. package/js-core.esm66.js +1 -0
  54. package/js-core.esm7.js +3 -3
  55. package/js-core.umd.js +196 -148
  56. package/locales/en.json +1 -1
  57. package/locales/es.json +1 -1
  58. package/locales/fr.json +1 -1
  59. package/package.json +5 -4
@@ -0,0 +1,90 @@
1
+ import{bh as React,r as react,gv as murmur2,gw as unitlessKeys,x as classNames,dF as isObject_1,c0 as _baseIteratee,d4 as upperFirst_1,dQ as _baseGetTag,dP as isObjectLike_1,dU as isFunction_1,c7 as commonjsGlobal$1,z as createSvgIcon,C as interopRequireDefault,j as jsxRuntime,m as makeStyles,H as createSlice,c8 as combineReducers,F as FormattedMessage,eo as injectIntl,cd as Close,bT as Hide,i as useDispatch,dc as useIntl,k as useSelector,A as AIWareIntlProvider,b0 as Tabs,b1 as Tab,a7 as Divider$1,cg as TabPanel,eC as userSelector,B as Box,T as Typography$2,a8 as Tooltip$1,a9 as IconButton,fr as Settings,fC as FilterRemove,cC as Filter,gx as BottomQueue,gy as TopQueue,gz as Pause,gA as Cancel,ct as CustomTabs,a2 as all,at as Button,G as Grid,gB as FormattedRelativeTime,fT as NullState,ec as hidePanel,cm as mountPanel,bM as img$s,ar as Checkbox,cZ as takeEvery$1,gu as View,gC as Hidden,fR as ErrorState,ai as select,ff as selectApiConfigs,ah as put,M as preferredLanguageSelector,v as FormControl$1,aR as Dialog,aT as DialogContent,aU as DialogActions,aV as Select$1,aW as MenuItem$1,p as lodash,w as TextField$1,bC as CircularProgress,co as MoreVert,cy as baseGraphQLApiWithError,fk as Popover,fl as MenuList,fB as ProcessingDetail}from"./js-core.esm.js";import{A as AutoSizer}from"./js-core.esm47.js";import{I as InfiniteLoader}from"./js-core.esm46.js";import{V as VariableSizeList}from"./js-core.esm31.js";import{L as LocalizationProvider,A as AdapterDateFns,C as CalendarPicker}from"./js-core.esm23.js";import{formatJobForDisplay}from"./js-core.esm43.js";import{_ as _baseUniq}from"./js-core.esm34.js";import{A as Autocomplete}from"./js-core.esm24.js";import{C as Chip}from"./js-core.esm32.js";import"./js-core.esm8.js";import"./js-core.esm50.js";import"./js-core.esm35.js";import"./js-core.esm28.js";import"./js-core.esm44.js";import"./js-core.esm33.js";import"./js-core.esm45.js";import"./js-core.esm41.js";import"./js-core.esm51.js";import"./js-core.esm48.js";import"./js-core.esm12.js";import"./js-core.esm13.js";import"./js-core.esm18.js";import"./js-core.esm17.js";import"./js-core.esm49.js";import"./js-core.esm20.js";var reactIs={exports:{}},reactIs_production_min={},b="function"==typeof Symbol&&Symbol.for,c$1=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k$1=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119;function z(i){if("object"==typeof i&&null!==i){var o=i.$$typeof;switch(o){case c$1:switch(i=i.type){case l:case m:case e:case g:case f:case p:return i;default:switch(i=i&&i.$$typeof){case k$1:case n:case t:case r:case h:return i;default:return o}}case d:return o}}}function A(e){return z(e)===m}function toArray$1(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=[];return React.Children.forEach(e,function(e){null==e&&!t.keepEmpty||(Array.isArray(e)?n=n.concat(toArray$1(e)):reactIs.exports.isFragment(e)&&e.props?n=n.concat(toArray$1(e.props.children,t)):n.push(e))}),n}reactIs_production_min.AsyncMode=l,reactIs_production_min.ConcurrentMode=m,reactIs_production_min.ContextConsumer=k$1,reactIs_production_min.ContextProvider=h,reactIs_production_min.Element=c$1,reactIs_production_min.ForwardRef=n,reactIs_production_min.Fragment=e,reactIs_production_min.Lazy=t,reactIs_production_min.Memo=r,reactIs_production_min.Portal=d,reactIs_production_min.Profiler=g,reactIs_production_min.StrictMode=f,reactIs_production_min.Suspense=p,reactIs_production_min.isAsyncMode=function(e){return A(e)||z(e)===l},reactIs_production_min.isConcurrentMode=A,reactIs_production_min.isContextConsumer=function(e){return z(e)===k$1},reactIs_production_min.isContextProvider=function(e){return z(e)===h},reactIs_production_min.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===c$1},reactIs_production_min.isForwardRef=function(e){return z(e)===n},reactIs_production_min.isFragment=function(t){return z(t)===e},reactIs_production_min.isLazy=function(e){return z(e)===t},reactIs_production_min.isMemo=function(e){return z(e)===r},reactIs_production_min.isPortal=function(e){return z(e)===d},reactIs_production_min.isProfiler=function(e){return z(e)===g},reactIs_production_min.isStrictMode=function(e){return z(e)===f},reactIs_production_min.isSuspense=function(e){return z(e)===p},reactIs_production_min.isValidElementType=function(i){return"string"==typeof i||"function"==typeof i||i===e||i===m||i===g||i===f||i===p||i===q||"object"==typeof i&&null!==i&&(i.$$typeof===t||i.$$typeof===r||i.$$typeof===h||i.$$typeof===k$1||i.$$typeof===n||i.$$typeof===w||i.$$typeof===x||i.$$typeof===y||i.$$typeof===v)},reactIs_production_min.typeOf=z,reactIs.exports=reactIs_production_min;var warned={};function warning$1(e,t){}function call$c(e,t,n){t||warned[n]||(e(!1,n),warned[n]=!0)}function warningOnce(e,t){call$c(warning$1,e,t)}function _typeof$6(e){return(_typeof$6="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _toPrimitive$2(e,t){if("object"!==_typeof$6(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==_typeof$6(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}function _toPropertyKey$2(e){e=_toPrimitive$2(e,"string");return"symbol"===_typeof$6(e)?e:String(e)}function _defineProperty$4(e,t,n){return(t=_toPropertyKey$2(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ownKeys$6(t,e){var n,i=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,n)),i}function _objectSpread2$2(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ownKeys$6(Object(n),!0).forEach(function(e){_defineProperty$4(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ownKeys$6(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function _typeof$5(e){return(_typeof$5="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _toPrimitive$1(e,t){if("object"!==_typeof$5(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==_typeof$5(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}function _toPropertyKey$1(e){e=_toPrimitive$1(e,"string");return"symbol"===_typeof$5(e)?e:String(e)}function _defineProperty$3(e,t,n){return(t=_toPropertyKey$1(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ownKeys$5(t,e){var n,i=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,n)),i}function _objectSpread2$1(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ownKeys$5(Object(n),!0).forEach(function(e){_defineProperty$3(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ownKeys$5(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function _arrayLikeToArray$2(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function _arrayWithoutHoles$2(e){if(Array.isArray(e))return _arrayLikeToArray$2(e)}function _iterableToArray$2(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _unsupportedIterableToArray$2(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray$2(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray$2(e,t):void 0}}function _nonIterableSpread$2(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _toConsumableArray$2(e){return _arrayWithoutHoles$2(e)||_iterableToArray$2(e)||_unsupportedIterableToArray$2(e)||_nonIterableSpread$2()}function _classCallCheck$4(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$4(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,_toPropertyKey$1(i.key),i)}}function _createClass$4(e,t,n){return t&&_defineProperties$4(e.prototype,t),n&&_defineProperties$4(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var Entity=function(){function e(){_classCallCheck$4(this,e),_defineProperty$3(this,"cache",new Map)}return _createClass$4(e,[{key:"get",value:function(e){return this.cache.get(e.join("%"))||null}},{key:"update",value:function(e,t){e=e.join("%"),t=t(this.cache.get(e));null===t?this.cache.delete(e):this.cache.set(e,t)}}]),e}(),ATTR_TOKEN="data-token-hash",ATTR_MARK="data-css-hash",CSS_IN_JS_INSTANCE="__cssinjs_instance__",CSS_IN_JS_INSTANCE_ID=Math.random().toString(12).slice(2);function createCache(){var e,t,i;return"undefined"!=typeof document&&document.head&&document.body&&(e=document.body.querySelectorAll("style[".concat(ATTR_MARK,"]"))||[],t=document.head.firstChild,Array.from(e).forEach(function(e){e[CSS_IN_JS_INSTANCE]=e[CSS_IN_JS_INSTANCE]||CSS_IN_JS_INSTANCE_ID,document.head.insertBefore(e,t)}),i={},Array.from(document.querySelectorAll("style[".concat(ATTR_MARK,"]"))).forEach(function(e){var t,n=e.getAttribute(ATTR_MARK);i[n]?e[CSS_IN_JS_INSTANCE]===CSS_IN_JS_INSTANCE_ID&&null!=(t=e.parentNode)&&t.removeChild(e):i[n]=!0})),new Entity}var StyleContext=react.exports.createContext({hashPriority:"low",cache:createCache(),defaultCache:!0}),StyleContext$1=StyleContext;function _arrayWithHoles$2(e){if(Array.isArray(e))return e}function _iterableToArrayLimit$1(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=o.call(n)).done)&&(s.push(i.value),s.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw r}}return s}}function _nonIterableRest$2(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _slicedToArray$1(e,t){return _arrayWithHoles$2(e)||_iterableToArrayLimit$1(e,t)||_unsupportedIterableToArray$2(e,t)||_nonIterableRest$2()}function useClientCache(e,t,n,i){var r=react.exports.useContext(StyleContext$1).cache,o=[e].concat(_toConsumableArray$2(t));return react.exports.useMemo(function(){r.update(o,function(e){var e=_slicedToArray$1(e||[],2),t=e[0];return[(void 0===t?0:t)+1,e[1]||n()]})},[o.join("_")]),react.exports.useEffect(function(){return function(){r.update(o,function(e){var e=_slicedToArray$1(e||[],2),t=e[0],t=void 0===t?0:t,e=e[1];return 0==t-1?(null!=i&&i(e,!1),null):[t-1,e]})}},o),r.get(o)[1]}function canUseDom(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}function contains(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1}var APPEND_ORDER="data-rc-order",MARK_KEY="rc-util-key",containerCache=new Map;function getMark(){var e=(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}).mark;return e?e.startsWith("data-")?e:"data-".concat(e):MARK_KEY}function getContainer(e){return e.attachTo||document.querySelector("head")||document.body}function getOrder(e){return"queue"===e?"prependQueue":e?"prepend":"append"}function findStyles(e){return Array.from((containerCache.get(e)||e).children).filter(function(e){return"STYLE"===e.tagName})}function injectCSS(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(!canUseDom())return null;var n=t.csp,i=t.prepend,r=document.createElement("style"),n=(r.setAttribute(APPEND_ORDER,getOrder(i)),null!=n&&n.nonce&&(r.nonce=null==n?void 0:n.nonce),r.innerHTML=e,getContainer(t)),t=n.firstChild;if(i){if("queue"===i){i=findStyles(n).filter(function(e){return["prepend","prependQueue"].includes(e.getAttribute(APPEND_ORDER))});if(i.length)return n.insertBefore(r,i[i.length-1].nextSibling),r}n.insertBefore(r,t)}else n.appendChild(r);return r}function findExistNode(t){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return findStyles(getContainer(n)).find(function(e){return e.getAttribute(getMark(n))===t})}function removeCSS(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=findExistNode(e,t);n&&getContainer(t).removeChild(n)}function syncRealContainer(e,t){var n=containerCache.get(e);n&&contains(document,n)||(t=(n=injectCSS("",t)).parentNode,containerCache.set(e,t),e.removeChild(n))}function updateCSS(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},i=(syncRealContainer(getContainer(n),n),findExistNode(t,n));if(i)return null!=(r=n.csp)&&r.nonce&&i.nonce!==(null==(r=n.csp)?void 0:r.nonce)&&(i.nonce=null==(r=n.csp)?void 0:r.nonce),i.innerHTML!==e&&(i.innerHTML=e),i;var r=injectCSS(e,n);return r.setAttribute(getMark(n),t),r}function flattenToken(n){var i="";return Object.keys(n).forEach(function(e){var t=n[e];i+=e,t&&"object"===_typeof$5(t)?i+=flattenToken(t):i+=t}),i}function token2key(e,t){return murmur2("".concat(t,"_").concat(flattenToken(e)))}var layerKey="layer-".concat(Date.now(),"-").concat(Math.random()).replace(/\./g,""),layerWidth="903px";function supportSelector(e,t){var n;return!!canUseDom()&&(updateCSS(e,layerKey),(e=document.createElement("div")).style.position="fixed",e.style.left="0",e.style.top="0",null!=t&&t(e),document.body.appendChild(e),t=getComputedStyle(e).width===layerWidth,null!=(n=e.parentNode)&&n.removeChild(e),removeCSS(layerKey),t)}var canLayer=void 0;function supportLayer(){return canLayer=void 0===canLayer?supportSelector("@layer ".concat(layerKey," { .").concat(layerKey," { width: ").concat(layerWidth,"!important; } }"),function(e){e.className=layerKey}):canLayer}var EMPTY_OVERRIDE={},hashPrefix="css",tokenKeys=new Map;function recordCleanToken(e){tokenKeys.set(e,(tokenKeys.get(e)||0)+1)}function removeStyleTags(e){"undefined"!=typeof document&&document.querySelectorAll("style[".concat(ATTR_TOKEN,'="').concat(e,'"]')).forEach(function(e){var t;e[CSS_IN_JS_INSTANCE]===CSS_IN_JS_INSTANCE_ID&&null!=(t=e.parentNode)&&t.removeChild(e)})}function cleanTokenStyle(e){tokenKeys.set(e,(tokenKeys.get(e)||0)-1);var e=Array.from(tokenKeys.keys()),t=e.filter(function(e){return(tokenKeys.get(e)||0)<=0});t.length<e.length&&t.forEach(function(e){removeStyleTags(e),tokenKeys.delete(e)})}function useCacheToken(n,e){var t=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},i=t.salt,r=void 0===i?"":i,i=t.override,o=void 0===i?EMPTY_OVERRIDE:i,a=t.formatToken,s=react.exports.useMemo(function(){return Object.assign.apply(Object,[{}].concat(_toConsumableArray$2(e)))},[e]),i=react.exports.useMemo(function(){return flattenToken(s)},[s]),t=react.exports.useMemo(function(){return flattenToken(o)},[o]);return useClientCache("token",[r,n.id,i,t],function(){var e=_objectSpread2$1(_objectSpread2$1({},n.getDerivativeToken(s)),o),t=token2key(e=a?a(e):e,r),t=(recordCleanToken(e._tokenKey=t),"".concat(hashPrefix,"-").concat(murmur2(t)));return e._hashId=t,[e,t]},function(e){cleanTokenStyle(e[0]._tokenKey)})}function _extends$5(){return(_extends$5=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n,i=arguments[t];for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e}).apply(this,arguments)}var COMMENT="comm",RULESET="rule",DECLARATION="decl",IMPORT="@import",KEYFRAMES="@keyframes",abs=Math.abs,from=String.fromCharCode;function trim(e){return e.trim()}function replace$3(e,t,n){return e.replace(t,n)}function indexof(e,t){return e.indexOf(t)}function charat(e,t){return 0|e.charCodeAt(t)}function substr(e,t,n){return e.slice(t,n)}function strlen(e){return e.length}function sizeof(e){return e.length}function append(e,t){return t.push(e),e}var line=1,column=1,length$1=0,position=0,character=0,characters="";function node(e,t,n,i,r,o,a){return{value:e,root:t,parent:n,type:i,props:r,children:o,line:line,column:column,length:a,return:""}}function char(){return character}function prev(){return character=0<position?charat(characters,--position):0,column--,10===character&&(column=1,line--),character}function next(){return character=position<length$1?charat(characters,position++):0,column++,10===character&&(column=1,line++),character}function peek(){return charat(characters,position)}function caret(){return position}function slice(e,t){return substr(characters,e,t)}function token(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function alloc(e){return line=column=1,length$1=strlen(characters=e),position=0,[]}function dealloc(e){return characters="",e}function delimit(e){return trim(slice(position-1,delimiter(91===e?e+2:40===e?e+1:e)))}function whitespace$2(e){for(;(character=peek())&&character<33;)next();return 2<token(e)||3<token(character)?"":" "}function escaping(e,t){for(;--t&&next()&&!(character<48||102<character||57<character&&character<65||70<character&&character<97););return slice(e,caret()+(t<6&&32==peek()&&32==next()))}function delimiter(e){for(;next();)switch(character){case e:return position;case 34:case 39:34!==e&&39!==e&&delimiter(character);break;case 40:41===e&&delimiter(e);break;case 92:next()}return position}function commenter(e,t){for(;next()&&e+character!==57&&(e+character!==84||47!==peek()););return"/*"+slice(t,position-1)+"*"+from(47===e?e:next())}function identifier(e){for(;!token(peek());)next();return slice(e,position)}function compile(e){return dealloc(parse("",null,null,null,[""],e=alloc(e),0,[0],e))}function parse(e,t,n,i,r,o,a,s,l){for(var c,u,d,h=0,p=0,f=a,g=0,y=0,m=1,v=1,b=1,x=0,w="",_=r,S=w;v;)switch(c=x,x=next()){case 40:if(108!=c&&58==charat(S,f-1)){-1!=indexof(S+=replace$3(delimit(x),"&","&\f"),"&\f")&&(b=-1);break}case 34:case 39:case 91:S+=delimit(x);break;case 9:case 10:case 13:case 32:S+=whitespace$2(c);break;case 92:S+=escaping(caret()-1,7);continue;case 47:switch(peek()){case 42:case 47:append(comment(commenter(next(),caret()),t,n),l);break;default:S+="/"}break;case 123*m:s[h++]=strlen(S)*b;case 125*m:case 59:case 0:switch(x){case 0:case 125:v=0;case 59+p:0<y&&strlen(S)-f&&append(32<y?declaration(S+";",i,n,f-1):declaration(replace$3(S," ","")+";",i,n,f-2),l);break;case 59:S+=";";default:if(append(d=ruleset(S,t,n,h,p,r,s,w,_=[],u=[],f),o),123===x)if(0===p)parse(S,t,d,d,_,o,f,s,u);else switch(99===g&&110===charat(S,3)?100:g){case 100:case 109:case 115:parse(e,d,d,i&&append(ruleset(e,d,d,0,0,r,s,w,r,_=[],f),u),r,u,f,s,i?_:u);break;default:parse(S,d,d,d,[""],u,0,s,u)}}h=p=y=0,m=b=1,w=S="",f=a;break;case 58:f=1+strlen(S),y=c;default:if(m<1)if(123==x)--m;else if(125==x&&0==m++&&125==prev())continue;switch(S+=from(x),x*m){case 38:b=0<p?1:(S+="\f",-1);break;case 44:s[h++]=(strlen(S)-1)*b,b=1;break;case 64:45===peek()&&(S+=delimit(next())),g=peek(),p=f=strlen(w=S+=identifier(caret())),x++;break;case 45:45===c&&2==strlen(S)&&(m=0)}}return o}function ruleset(e,t,n,i,r,o,a,s,l,c,u){for(var d,h=r-1,p=0===r?o:[""],f=sizeof(p),g=0,y=0;g<i;++g)for(var m,v=0,b=substr(e,h+1,h=abs(d=a[g]));v<f;++v)(m=trim(0<d?p[v]+" "+b:replace$3(b,/&\f/g,p[v])))&&(l[y++]=m);return node(e,t,n,0===r?RULESET:s,l,c,u)}function comment(e,t,n){return node(e,t,n,COMMENT,from(char()),substr(e,2,-2),0)}function declaration(e,t,n,i){return node(e,t,n,DECLARATION,substr(e,0,i),substr(e,i+1,-1),i)}function serialize(e,t){for(var n="",i=sizeof(e),r=0;r<i;r++)n+=t(e[r],r,e,t)||"";return n}function stringify$1(e,t,n,i){switch(e.type){case IMPORT:case DECLARATION:return e.return=e.return||e.value;case COMMENT:return"";case KEYFRAMES:return e.return=e.value+"{"+serialize(e.children,i)+"}";case RULESET:e.value=e.props.join(",")}return strlen(n=serialize(e.children,i))?e.return=e.value+"{"+n+"}":""}var isClientSide=canUseDom(),SKIP_CHECK="_skip_check_";function normalizeStyle(e){return serialize(compile(e),stringify$1).replace(/\{%%%\:[^;];}/g,";")}function isCompoundCSSProperty(e){return"object"===_typeof$5(e)&&e&&SKIP_CHECK in e}function injectSelectorHash(e,t,n){if(!t)return e;var t=".".concat(t),i="low"===n?":where(".concat(t,")"):t;return e.split(",").map(function(e){var e=e.trim().split(/\s+/),t=e[0]||"",n=(null==(n=t.match(/^\w+/))?void 0:n[0])||"";return[t="".concat(n).concat(i).concat(t.slice(n.length))].concat(_toConsumableArray$2(e.slice(1))).join(" ")}).join(",")}var globalEffectStyleKeys=new Set,parseStyle=function a(e){var t,s=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{root:!0,parentSelectors:[]},l=n.root,c=n.injectHash,u=n.parentSelectors,d=s.hashId,n=s.layer,h=(s.path,s.hashPriority),i=s.transformers,r=void 0===i?[]:i,p=(s.linters,""),f={};function g(e){var t,n=e.getName(d);f[n]||(t=_slicedToArray$1(a(e.style,s,{root:!1,parentSelectors:u}),1)[0],f[n]="@keyframes ".concat(e.getName(d)).concat(t))}return function t(e,n){var i=1<arguments.length&&void 0!==n?n:[];return e.forEach(function(e){Array.isArray(e)?t(e,i):e&&i.push(e)}),i}(Array.isArray(e)?e:[e]).forEach(function(e){var o,e="string"!=typeof e||l?e:{};"string"==typeof e?p+="".concat(e,"\n"):e._keyframe?g(e):(o=r.reduce(function(e,t){var n;return(null==t||null==(n=t.visit)?void 0:n.call(t,e))||e},e),Object.keys(o).forEach(function(e){var t,n,i,r=o[e];"object"!==_typeof$5(r)||!r||"animationName"===e&&r._keyframe||isCompoundCSSProperty(r)?(t=null!=(t=null==r?void 0:r.value)?t:r,n=e.replace(/[A-Z]/g,function(e){return"-".concat(e.toLowerCase())}),i=t,unitlessKeys[e]||"number"!=typeof t||0===t||(i="".concat(t,"px")),"animationName"===e&&null!=r&&r._keyframe&&(g(r),i=r.getName(d)),p+="".concat(n,":").concat(i,";")):(t=!1,n=e.trim(),i=!1,(l||c)&&d?n.startsWith("@")?t=!0:n=injectSelectorHash(e,d,h):!l||d||"&"!==n&&""!==n||(i=!(n="")),r=(e=_slicedToArray$1(a(r,s,{root:i,injectHash:t,parentSelectors:[].concat(_toConsumableArray$2(u),[n])}),2))[0],i=e[1],f=_objectSpread2$1(_objectSpread2$1({},f),i),p+="".concat(n).concat(r))}))}),l?n&&supportLayer()&&(t=(i=n.split(","))[i.length-1].trim(),p="@layer ".concat(t," {").concat(p,"}"),1<i.length&&(p="@layer ".concat(n,"{%%%:%}").concat(p))):p="{".concat(p,"}"),[p,f]};function uniqueHash(e,t){return murmur2("".concat(e.join("%")).concat(t))}function Empty$3(){return null}function useStyleRegister(e,r){var t=e.token,o=e.path,a=e.hashId,s=e.layer,e=react.exports.useContext(StyleContext$1),n=e.autoClear,i=(e.mock,e.defaultCache),l=e.hashPriority,c=e.container,u=e.ssrInline,d=e.transformers,h=e.linters,p=t._tokenKey,f=[p].concat(_toConsumableArray$2(o)),g=isClientSide,e=useClientCache("style",f,function(){var e,t=r(),t=_slicedToArray$1(parseStyle(t,{hashId:a,hashPriority:l,layer:s,path:o.join("-"),transformers:d,linters:h}),2),n=t[0],i=t[1],t=normalizeStyle(n),n=uniqueHash(f,t);return g&&((e=updateCSS(t,n,{mark:ATTR_MARK,prepend:"queue",attachTo:c}))[CSS_IN_JS_INSTANCE]=CSS_IN_JS_INSTANCE_ID,e.setAttribute(ATTR_TOKEN,p),Object.keys(i).forEach(function(e){globalEffectStyleKeys.has(e)||(globalEffectStyleKeys.add(e),updateCSS(normalizeStyle(i[e]),"_effect-".concat(e),{mark:ATTR_MARK,prepend:"queue",attachTo:c}))})),[t,p,n]},function(e,t){e=_slicedToArray$1(e,3)[2];(t||n)&&isClientSide&&removeCSS(e,{mark:ATTR_MARK})}),t=_slicedToArray$1(e,3),y=t[0],m=t[1],v=t[2];return function(e){var t;return t=u&&!g&&i?react.exports.createElement("style",_extends$5({},(_defineProperty$3(t={},ATTR_TOKEN,m),_defineProperty$3(t,ATTR_MARK,v),t),{dangerouslySetInnerHTML:{__html:y}})):react.exports.createElement(Empty$3,null),react.exports.createElement(react.exports.Fragment,null,t,e)}}function sameDerivativeOption(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var ThemeCache=function(){function t(){_classCallCheck$4(this,t),_defineProperty$3(this,"cache",void 0),_defineProperty$3(this,"keys",void 0),_defineProperty$3(this,"cacheCallTimes",void 0),this.cache=new Map,this.keys=[],this.cacheCallTimes=0}return _createClass$4(t,[{key:"size",value:function(){return this.keys.length}},{key:"internalGet",value:function(e){var t,n=1<arguments.length&&void 0!==arguments[1]&&arguments[1],i={map:this.cache};return e.forEach(function(e){var t;i=!i||null==(t=i)||null==(t=t.map)?void 0:t.get(e)}),null!=(t=i)&&t.value&&n&&(i.value[1]=this.cacheCallTimes++),null==(t=i)?void 0:t.value}},{key:"get",value:function(e){return null==(e=this.internalGet(e,!0))?void 0:e[0]}},{key:"has",value:function(e){return!!this.internalGet(e)}},{key:"set",value:function(n,i){var e,r=this,o=(this.has(n)||(this.size()+1>t.MAX_CACHE_SIZE+t.MAX_CACHE_OFFSET&&(e=this.keys.reduce(function(e,t){var n=_slicedToArray$1(e,2)[1];return r.internalGet(t)[1]<n?[t,r.internalGet(t)[1]]:e},[this.keys[0],this.cacheCallTimes]),e=_slicedToArray$1(e,1)[0],this.delete(e)),this.keys.push(n)),this.cache);n.forEach(function(e,t){t===n.length-1?o.set(e,{value:[i,r.cacheCallTimes++]}):((t=o.get(e))?t.map||(t.map=new Map):o.set(e,{map:new Map}),o=o.get(e).map)})}},{key:"deleteByPath",value:function(e,t){var n=e.get(t[0]);if(1===t.length)return n.map?e.set(t[0],{map:n.map}):e.delete(t[0]),null==(i=n.value)?void 0:i[0];var i=this.deleteByPath(n.map,t.slice(1));return n.map&&0!==n.map.size||n.value||e.delete(t[0]),i}},{key:"delete",value:function(t){if(this.has(t))return this.keys=this.keys.filter(function(e){return!sameDerivativeOption(e,t)}),this.deleteByPath(this.cache,t)}}]),t}(),uuid=(_defineProperty$3(ThemeCache,"MAX_CACHE_SIZE",20),_defineProperty$3(ThemeCache,"MAX_CACHE_OFFSET",5),0),Theme=function(){function t(e){_classCallCheck$4(this,t),_defineProperty$3(this,"derivatives",void 0),_defineProperty$3(this,"id",void 0),this.derivatives=Array.isArray(e)?e:[e],this.id=uuid,0===e.length&&warning$1(0<e.length),uuid+=1}return _createClass$4(t,[{key:"getDerivativeToken",value:function(n){return this.derivatives.reduce(function(e,t){return t(n,e)},void 0)}}]),t}(),cacheThemes=new ThemeCache;function createTheme(e){e=Array.isArray(e)?e:[e];return cacheThemes.has(e)||cacheThemes.set(e,new Theme(e)),cacheThemes.get(e)}function noSplit(e){return e.notSplit=!0,e}function _extends$4(){return(_extends$4=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n,i=arguments[t];for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e}).apply(this,arguments)}function _objectWithoutPropertiesLoose$2(e,t){if(null==e)return{};for(var n,i={},r=Object.keys(e),o=0;o<r.length;o++)n=r[o],0<=t.indexOf(n)||(i[n]=e[n]);return i}function _objectWithoutProperties$2(e,t){if(null==e)return{};var n,i=_objectWithoutPropertiesLoose$2(e,t);if(Object.getOwnPropertySymbols)for(var r=Object.getOwnPropertySymbols(e),o=0;o<r.length;o++)n=r[o],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _typeof$4(e){return(_typeof$4="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _toPrimitive(e,t){if("object"!==_typeof$4(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==_typeof$4(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"===_typeof$4(e)?e:String(e)}function _defineProperty$2(e,t,n){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ownKeys$4(t,e){var n,i=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,n)),i}function _objectSpread2(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ownKeys$4(Object(n),!0).forEach(function(e){_defineProperty$2(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ownKeys$4(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function _arrayLikeToArray$1(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function _arrayWithoutHoles$1(e){if(Array.isArray(e))return _arrayLikeToArray$1(e)}function _iterableToArray$1(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _unsupportedIterableToArray$1(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray$1(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray$1(e,t):void 0}}function _nonIterableSpread$1(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _toConsumableArray$1(e){return _arrayWithoutHoles$1(e)||_iterableToArray$1(e)||_unsupportedIterableToArray$1(e)||_nonIterableSpread$1()}function _classCallCheck$3(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$3(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,_toPropertyKey(i.key),i)}}function _createClass$3(e,t,n){return t&&_defineProperties$3(e.prototype,t),n&&_defineProperties$3(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _assertThisInitialized$3(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _setPrototypeOf$4(e,t){return(_setPrototypeOf$4=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function _inherits$3(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf$4(e,t)}function _getPrototypeOf$4(e){return(_getPrototypeOf$4=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _isNativeReflectConstruct$4(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _possibleConstructorReturn$3(e,t){if(t&&("object"===_typeof$4(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized$3(e)}function _createSuper$3(n){var i=_isNativeReflectConstruct$4();return function(){var e,t=_getPrototypeOf$4(n);return _possibleConstructorReturn$3(this,i?(e=_getPrototypeOf$4(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}noSplit(["borderTop","borderBottom"]),noSplit(["borderTop"]),noSplit(["borderBottom"]),noSplit(["borderLeft","borderRight"]),noSplit(["borderLeft"]),noSplit(["borderRight"]);var HOOK_MARK="RC_FORM_INTERNAL_HOOKS",warningFunc=function(){warningOnce(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},Context=react.exports.createContext({getFieldValue:warningFunc,getFieldsValue:warningFunc,getFieldError:warningFunc,getFieldWarning:warningFunc,getFieldsError:warningFunc,isFieldsTouched:warningFunc,isFieldTouched:warningFunc,isFieldValidating:warningFunc,isFieldsValidating:warningFunc,resetFields:warningFunc,setFields:warningFunc,setFieldValue:warningFunc,setFieldsValue:warningFunc,validateFields:warningFunc,submit:warningFunc,getInternalHooks:function(){return warningFunc(),{dispatch:warningFunc,initEntityValue:warningFunc,registerField:warningFunc,useSubscribe:warningFunc,setInitialValues:warningFunc,destroyForm:warningFunc,setCallbacks:warningFunc,registerWatch:warningFunc,getFields:warningFunc,setValidateMessages:warningFunc,setPreserve:warningFunc,getInitialValue:warningFunc}}});function toArray(e){return null==e?[]:Array.isArray(e)?e:[e]}function _regeneratorRuntime(){_regeneratorRuntime=function(){return a};var a={},e=Object.prototype,l=e.hasOwnProperty,c=Object.defineProperty||function(e,t,n){e[t]=n.value},t="function"==typeof Symbol?Symbol:{},i=t.iterator||"@@iterator",n=t.asyncIterator||"@@asyncIterator",r=t.toStringTag||"@@toStringTag";function o(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{o({},"")}catch(e){o=function(e,t,n){return e[t]=n}}function s(e,t,n,i){var r,o,a,s,t=t&&t.prototype instanceof h?t:h,t=Object.create(t.prototype),i=new w(i||[]);return c(t,"_invoke",{value:(r=e,o=n,a=i,s="suspendedStart",function(e,t){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===e)throw t;return S()}for(a.method=e,a.arg=t;;){var n=a.delegate;if(n){n=function e(t,n){var i=n.method,r=t.iterator[i];if(void 0===r)return n.delegate=null,"throw"===i&&t.iterator.return&&(n.method="return",n.arg=void 0,e(t,n),"throw"===n.method)||"return"!==i&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+i+"' method")),d;i=u(r,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,d;r=i.arg;return r?r.done?(n[t.resultName]=r.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,d):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,d)}(n,a);if(n){if(n===d)continue;return n}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===s)throw s="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);s="executing";n=u(r,o,a);if("normal"===n.type){if(s=a.done?"completed":"suspendedYield",n.arg===d)continue;return{value:n.arg,done:a.done}}"throw"===n.type&&(s="completed",a.method="throw",a.arg=n.arg)}})}),t}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}a.wrap=s;var d={};function h(){}function p(){}function f(){}var t={},g=(o(t,i,function(){return this}),Object.getPrototypeOf),g=g&&g(g(_([]))),y=(g&&g!==e&&l.call(g,i)&&(t=g),f.prototype=h.prototype=Object.create(t));function m(e){["next","throw","return"].forEach(function(t){o(e,t,function(e){return this._invoke(t,e)})})}function v(a,s){var t;c(this,"_invoke",{value:function(n,i){function e(){return new s(function(e,t){!function t(e,n,i,r){var o,e=u(a[e],a,n);if("throw"!==e.type)return(n=(o=e.arg).value)&&"object"==_typeof$4(n)&&l.call(n,"__await")?s.resolve(n.__await).then(function(e){t("next",e,i,r)},function(e){t("throw",e,i,r)}):s.resolve(n).then(function(e){o.value=e,i(o)},function(e){return t("throw",e,i,r)});r(e.arg)}(n,i,e,t)})}return t=t?t.then(e,e):e()}})}function b(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function w(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(b,this),this.reset(!0)}function _(t){if(t){var n,e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return n=-1,(e=function e(){for(;++n<t.length;)if(l.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e}).next=e}return{next:S}}function S(){return{value:void 0,done:!0}}return c(y,"constructor",{value:p.prototype=f,configurable:!0}),c(f,"constructor",{value:p,configurable:!0}),p.displayName=o(f,r,"GeneratorFunction"),a.isGeneratorFunction=function(e){e="function"==typeof e&&e.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},a.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,o(e,r,"GeneratorFunction")),e.prototype=Object.create(y),e},a.awrap=function(e){return{__await:e}},m(v.prototype),o(v.prototype,n,function(){return this}),a.AsyncIterator=v,a.async=function(e,t,n,i,r){void 0===r&&(r=Promise);var o=new v(s(e,t,n,i),r);return a.isGeneratorFunction(t)?o:o.next().then(function(e){return e.done?e.value:o.next()})},m(y),o(y,r,"Generator"),o(y,i,function(){return this}),o(y,"toString",function(){return"[object Generator]"}),a.keys=function(e){var t,n=Object(e),i=[];for(t in n)i.push(t);return i.reverse(),function e(){for(;i.length;){var t=i.pop();if(t in n)return e.value=t,e.done=!1,e}return e.done=!0,e}},a.values=_,w.prototype={constructor:w,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&l.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var i=this;function e(e,t){return o.type="throw",o.arg=n,i.next=e,t&&(i.method="next",i.arg=void 0),!!t}for(var t=this.tryEntries.length-1;0<=t;--t){var r=this.tryEntries[t],o=r.completion;if("root"===r.tryLoc)return e("end");if(r.tryLoc<=this.prev){var a=l.call(r,"catchLoc"),s=l.call(r,"finallyLoc");if(a&&s){if(this.prev<r.catchLoc)return e(r.catchLoc,!0);if(this.prev<r.finallyLoc)return e(r.finallyLoc)}else if(a){if(this.prev<r.catchLoc)return e(r.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<r.finallyLoc)return e(r.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;0<=n;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&l.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var r=i;break}}var o=(r=r&&("break"===e||"continue"===e)&&r.tryLoc<=t&&t<=r.finallyLoc?null:r)?r.completion:{};return o.type=e,o.arg=t,r?(this.method="next",this.next=r.finallyLoc,d):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),x(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var n,i,r=this.tryEntries[t];if(r.tryLoc===e)return"throw"===(n=r.completion).type&&(i=n.arg,x(r)),i}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:_(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},a}function asyncGeneratorStep(e,t,n,i,r,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(i,r)}function _asyncToGenerator(s){return function(){var e=this,a=arguments;return new Promise(function(t,n){var i=s.apply(e,a);function r(e){asyncGeneratorStep(i,t,n,r,o,"next",e)}function o(e){asyncGeneratorStep(i,t,n,r,o,"throw",e)}r(void 0)})}}function _extends$3(){return(_extends$3=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n,i=arguments[t];for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e}).apply(this,arguments)}function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype),_setPrototypeOf$3(e.prototype.constructor=e,t)}function _getPrototypeOf$3(e){return(_getPrototypeOf$3=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _setPrototypeOf$3(e,t){return(_setPrototypeOf$3=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function _isNativeReflectConstruct$3(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _construct(e,t,n){return(_construct=_isNativeReflectConstruct$3()?Reflect.construct.bind():function(e,t,n){var i=[null];i.push.apply(i,t);t=new(Function.bind.apply(e,i));return n&&_setPrototypeOf$3(t,n.prototype),t}).apply(null,arguments)}function _isNativeFunction(e){return-1!==Function.toString.call(e).indexOf("[native code]")}function _wrapNativeSuper(e){var n="function"==typeof Map?new Map:void 0;return(_wrapNativeSuper=function(e){if(null===e||!_isNativeFunction(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return _construct(e,arguments,_getPrototypeOf$3(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf$3(t,e)})(e)}var formatRegExp=/%[sdj%]/g,warning=function(){};function convertFieldsError(e){if(!e||!e.length)return null;var n={};return e.forEach(function(e){var t=e.field;n[t]=n[t]||[],n[t].push(e)}),n}function format(e){for(var t=arguments.length,n=new Array(1<t?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];var r=0,o=n.length;return"function"==typeof e?e.apply(null,n):"string"==typeof e?e.replace(formatRegExp,function(e){if("%%"===e)return"%";if(o<=r)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}break;default:return e}}):e}function isNativeStringType(e){return"string"===e||"url"===e||"hex"===e||"email"===e||"date"===e||"pattern"===e}function isEmptyValue(e,t){return null==e||(!("array"!==t||!Array.isArray(e)||e.length)||!(!isNativeStringType(t)||"string"!=typeof e||e))}function asyncParallelArray(e,t,n){var i=[],r=0,o=e.length;function a(e){i.push.apply(i,e||[]),++r===o&&n(i)}e.forEach(function(e){t(e,a)})}function asyncSerialArray(n,i,r){var o=0,a=n.length;!function e(t){t&&t.length?r(t):(t=o,o+=1,t<a?i(n[t],e):r([]))}([])}function flattenObjArr(t){var n=[];return Object.keys(t).forEach(function(e){n.push.apply(n,t[e]||[])}),n}var AsyncValidationError=function(i){function e(e,t){var n=i.call(this,"Async Validation Error")||this;return n.errors=e,n.fields=t,n}return _inheritsLoose(e,i),e}(_wrapNativeSuper(Error));function asyncMap(r,e,o,a,s){if(e.first)return(t=new Promise(function(t,n){asyncSerialArray(flattenObjArr(r),o,function(e){return a(e),e.length?n(new AsyncValidationError(e,convertFieldsError(e))):t(s)})})).catch(function(e){return e}),t;var l=!0===e.firstFields?Object.keys(r):e.firstFields||[],c=Object.keys(r),u=c.length,d=0,h=[],t=new Promise(function(t,n){function i(e){if(h.push.apply(h,e),++d===u)return a(h),h.length?n(new AsyncValidationError(h,convertFieldsError(h))):t(s)}c.length||(a(h),t(s)),c.forEach(function(e){var t=r[e];(-1!==l.indexOf(e)?asyncSerialArray:asyncParallelArray)(t,o,i)})});return t.catch(function(e){return e}),t}function isErrorObj(e){return!(!e||void 0===e.message)}function getValue$2(e,t){for(var n=e,i=0;i<t.length;i++){if(null==n)return n;n=n[t[i]]}return n}function complementError(n,i){return function(e){var t=n.fullFields?getValue$2(i,n.fullFields):i[e.field||n.fullField];return isErrorObj(e)?(e.field=e.field||n.fullField,e.fieldValue=t,e):{message:"function"==typeof e?e():e,fieldValue:t,field:e.field||n.fullField}}}function deepMerge(e,t){if(t)for(var n in t){var i;t.hasOwnProperty(n)&&("object"==typeof(i=t[n])&&"object"==typeof e[n]?e[n]=_extends$3({},e[n],i):e[n]=i)}return e}var urlReg,required$1=function(e,t,n,i,r,o){!e.required||n.hasOwnProperty(e.field)&&!isEmptyValue(t,o||e.type)||i.push(format(r.messages.required,e.fullField))},whitespace$1=function(e,t,n,i,r){!/^\s+$/.test(t)&&""!==t||i.push(format(r.messages.whitespace,e.fullField))},getUrlRegex=function(){if(urlReg)return urlReg;function t(e){return e&&e.includeBoundaries?"(?:(?<=\\s|^)(?="+n+")|(?<="+n+")(?=\\s|$))":""}function e(e){return e&&e.exact?a:new RegExp("(?:"+t(e)+i+t(e)+")|(?:"+t(e)+o+t(e)+")","g")}var n="[a-fA-F\\d:]",i="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",r="[a-fA-F\\d]{1,4}",o=("\n(?:\n(?:"+r+":){7}(?:"+r+"|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8\n(?:"+r+":){6}(?:"+i+"|:"+r+"|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4\n(?:"+r+":){5}(?::"+i+"|(?::"+r+"){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4\n(?:"+r+":){4}(?:(?::"+r+"){0,1}:"+i+"|(?::"+r+"){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4\n(?:"+r+":){3}(?:(?::"+r+"){0,2}:"+i+"|(?::"+r+"){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4\n(?:"+r+":){2}(?:(?::"+r+"){0,3}:"+i+"|(?::"+r+"){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4\n(?:"+r+":){1}(?:(?::"+r+"){0,4}:"+i+"|(?::"+r+"){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4\n(?::(?:(?::"+r+"){0,5}:"+i+"|(?::"+r+"){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4\n)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1\n").replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),a=new RegExp("(?:^"+i+"$)|(?:^"+o+"$)"),s=new RegExp("^"+i+"$"),l=new RegExp("^"+o+"$"),r=(e.v4=function(e){return e&&e.exact?s:new RegExp(t(e)+i+t(e),"g")},e.v6=function(e){return e&&e.exact?l:new RegExp(""+t(e)+o+t(e),"g")},e.v4().source),c=e.v6().source;return urlReg=new RegExp("(?:^"+("(?:(?:(?:[a-z]+:)?//)|www\\.)(?:\\S+(?::\\S*)?@)?(?:localhost|"+r+"|"+c+'|(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:[/?#][^\\s"]*)?')+"$)","i")},pattern$2={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},types={integer:function(e){return types.number(e)&&parseInt(e,10)===e},float:function(e){return types.number(e)&&!types.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch(e){return!1}},date:function(e){return"function"==typeof e.getTime&&"function"==typeof e.getMonth&&"function"==typeof e.getYear&&!isNaN(e.getTime())},number:function(e){return!isNaN(e)&&"number"==typeof e},object:function(e){return"object"==typeof e&&!types.array(e)},method:function(e){return"function"==typeof e},email:function(e){return"string"==typeof e&&e.length<=320&&!!e.match(pattern$2.email)},url:function(e){return"string"==typeof e&&e.length<=2048&&!!e.match(getUrlRegex())},hex:function(e){return"string"==typeof e&&!!e.match(pattern$2.hex)}},type$1=function(e,t,n,i,r){e.required&&void 0===t?required$1(e,t,n,i,r):(n=e.type,-1<["integer","float","array","regexp","object","method","email","number","date","url","hex"].indexOf(n)?types[n](t)||i.push(format(r.messages.types[n],e.fullField,e.type)):n&&typeof t!==e.type&&i.push(format(r.messages.types[n],e.fullField,e.type)))},range=function(e,t,n,i,r){var o="number"==typeof e.len,a="number"==typeof e.min,s="number"==typeof e.max,l=t,c=null,u="number"==typeof t,d="string"==typeof t,h=Array.isArray(t);if(u?c="number":d?c="string":h&&(c="array"),!c)return!1;h&&(l=t.length),d&&(l=t.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"_").length),o?l!==e.len&&i.push(format(r.messages[c].len,e.fullField,e.len)):a&&!s&&l<e.min?i.push(format(r.messages[c].min,e.fullField,e.min)):s&&!a&&l>e.max?i.push(format(r.messages[c].max,e.fullField,e.max)):a&&s&&(l<e.min||l>e.max)&&i.push(format(r.messages[c].range,e.fullField,e.min,e.max))},ENUM$1="enum",enumerable$1=function(e,t,n,i,r){e[ENUM$1]=Array.isArray(e[ENUM$1])?e[ENUM$1]:[],-1===e[ENUM$1].indexOf(t)&&i.push(format(r.messages[ENUM$1],e.fullField,e[ENUM$1].join(", ")))},pattern$1=function(e,t,n,i,r){e.pattern&&(e.pattern instanceof RegExp?(e.pattern.lastIndex=0,e.pattern.test(t)||i.push(format(r.messages.pattern.mismatch,e.fullField,t,e.pattern))):"string"!=typeof e.pattern||new RegExp(e.pattern).test(t)||i.push(format(r.messages.pattern.mismatch,e.fullField,t,e.pattern)))},rules={required:required$1,whitespace:whitespace$1,type:type$1,range:range,enum:enumerable$1,pattern:pattern$1},string=function(e,t,n,i,r){var o=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(isEmptyValue(t,"string")&&!e.required)return n();rules.required(e,t,i,o,r,"string"),isEmptyValue(t,"string")||(rules.type(e,t,i,o,r),rules.range(e,t,i,o,r),rules.pattern(e,t,i,o,r),!0===e.whitespace&&rules.whitespace(e,t,i,o,r))}n(o)},method=function(e,t,n,i,r){var o=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(isEmptyValue(t)&&!e.required)return n();rules.required(e,t,i,o,r),void 0!==t&&rules.type(e,t,i,o,r)}n(o)},number=function(e,t,n,i,r){var o=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(isEmptyValue(t=""===t?void 0:t)&&!e.required)return n();rules.required(e,t,i,o,r),void 0!==t&&(rules.type(e,t,i,o,r),rules.range(e,t,i,o,r))}n(o)},_boolean=function(e,t,n,i,r){var o=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(isEmptyValue(t)&&!e.required)return n();rules.required(e,t,i,o,r),void 0!==t&&rules.type(e,t,i,o,r)}n(o)},regexp=function(e,t,n,i,r){var o=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(isEmptyValue(t)&&!e.required)return n();rules.required(e,t,i,o,r),isEmptyValue(t)||rules.type(e,t,i,o,r)}n(o)},integer=function(e,t,n,i,r){var o=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(isEmptyValue(t)&&!e.required)return n();rules.required(e,t,i,o,r),void 0!==t&&(rules.type(e,t,i,o,r),rules.range(e,t,i,o,r))}n(o)},floatFn=function(e,t,n,i,r){var o=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(isEmptyValue(t)&&!e.required)return n();rules.required(e,t,i,o,r),void 0!==t&&(rules.type(e,t,i,o,r),rules.range(e,t,i,o,r))}n(o)},array=function(e,t,n,i,r){var o=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(null==t&&!e.required)return n();rules.required(e,t,i,o,r,"array"),null!=t&&(rules.type(e,t,i,o,r),rules.range(e,t,i,o,r))}n(o)},object=function(e,t,n,i,r){var o=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(isEmptyValue(t)&&!e.required)return n();rules.required(e,t,i,o,r),void 0!==t&&rules.type(e,t,i,o,r)}n(o)},ENUM="enum",enumerable=function(e,t,n,i,r){var o=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(isEmptyValue(t)&&!e.required)return n();rules.required(e,t,i,o,r),void 0!==t&&rules[ENUM](e,t,i,o,r)}n(o)},pattern=function(e,t,n,i,r){var o=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(isEmptyValue(t,"string")&&!e.required)return n();rules.required(e,t,i,o,r),isEmptyValue(t,"string")||rules.pattern(e,t,i,o,r)}n(o)},date=function(e,t,n,i,r){var o=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(isEmptyValue(t,"date")&&!e.required)return n();rules.required(e,t,i,o,r),isEmptyValue(t,"date")||(t=t instanceof Date?t:new Date(t),rules.type(e,t,i,o,r),t&&rules.range(e,t.getTime(),i,o,r))}n(o)},required=function(e,t,n,i,r){var o=[],a=Array.isArray(t)?"array":typeof t;rules.required(e,t,i,o,r,a),n(o)},type=function(e,t,n,i,r){var o=e.type,a=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(isEmptyValue(t,o)&&!e.required)return n();rules.required(e,t,i,a,r,o),isEmptyValue(t,o)||rules.type(e,t,i,a,r)}n(a)},any=function(e,t,n,i,r){var o=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(isEmptyValue(t)&&!e.required)return n();rules.required(e,t,i,o,r)}n(o)},validators={string:string,method:method,number:number,boolean:_boolean,regexp:regexp,integer:integer,float:floatFn,array:array,object:object,enum:enumerable,pattern:pattern,date:date,url:type,hex:type,email:type,required:required,any:any};function newMessages(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var messages=newMessages(),Schema=function(){function d(e){this.rules=null,this._messages=messages,this.define(e)}var e=d.prototype;return e.define=function(n){var i=this;if(!n)throw new Error("Cannot configure a schema with no rules");if("object"!=typeof n||Array.isArray(n))throw new Error("Rules must be an object");this.rules={},Object.keys(n).forEach(function(e){var t=n[e];i.rules[e]=Array.isArray(t)?t:[t]})},e.messages=function(e){return e&&(this._messages=deepMerge(newMessages(),e)),this._messages},e.validate=function(i,e,t){var r=this,l=i,c=e=void 0===e?{}:e,o=t=void 0===t?function(){}:t;if("function"==typeof c&&(o=c,c={}),!this.rules||0===Object.keys(this.rules).length)return o&&o(null,l),Promise.resolve(l);function n(e){var t,n=[];for(var i,r=0;r<e.length;r++)i=e[r],Array.isArray(i)?n=n.concat.apply(n,i):n.push(i);n.length?(t=convertFieldsError(n),o(n,t)):o(null,l)}c.messages?(deepMerge(e=(e=this.messages())===messages?newMessages():e,c.messages),c.messages=e):c.messages=this.messages();var a={},u=((c.keys||Object.keys(this.rules)).forEach(function(t){var e=r.rules[t],n=l[t];e.forEach(function(e){"function"==typeof e.transform&&(l===i&&(l=_extends$3({},l)),n=l[t]=e.transform(n)),(e="function"==typeof e?{validator:e}:_extends$3({},e)).validator=r.getValidationMethod(e),e.validator&&(e.field=t,e.fullField=e.fullField||t,e.type=r.getType(e),a[t]=a[t]||[],a[t].push({rule:e,value:n,source:l,field:t}))})}),{});return asyncMap(a,c,function(t,o){var a,e,s=t.rule;function n(e){void 0===e&&(e=[]);var e=Array.isArray(e)?e:[e],n=(!c.suppressWarning&&e.length&&d.warning("async-validator:",e),(e=e.length&&void 0!==s.message?[].concat(s.message):e).map(complementError(s,l)));if(c.first&&n.length)return u[s.field]=1,o(n);if(a){if(s.required&&!t.value)return void 0!==s.message?n=[].concat(s.message).map(complementError(s,l)):c.error&&(n=[c.error(s,format(c.messages.required,s.field))]),o(n);var i={},r=(s.defaultField&&Object.keys(t.value).map(function(e){i[e]=s.defaultField}),i=_extends$3({},i,t.rule.fields),{}),e=(Object.keys(i).forEach(function(e){var t=i[e],t=Array.isArray(t)?t:[t];r[e]=t.map(function(e,t){return _extends$3({},t,{fullField:s.fullField+"."+e,fullFields:s.fullFields?[].concat(s.fullFields,[e]):[e]})}.bind(null,e))}),new d(r));e.messages(c.messages),t.rule.options&&(t.rule.options.messages=c.messages,t.rule.options.error=c.error),e.validate(t.value,t.rule.options||c,function(e){var t=[];n&&n.length&&t.push.apply(t,n),e&&e.length&&t.push.apply(t,e),o(t.length?t:null)})}else o(n)}if(a=!("object"!==s.type&&"array"!==s.type||"object"!=typeof s.fields&&"object"!=typeof s.defaultField)&&(s.required||!s.required&&t.value),s.field=t.field,s.asyncValidator)e=s.asyncValidator(s,t.value,n,t.source,c);else if(s.validator){try{e=s.validator(s,t.value,n,t.source,c)}catch(e){null!=console.error&&console.error(e),c.suppressValidatorError||setTimeout(function(){throw e},0),n(e.message)}!0===e?n():!1===e?n("function"==typeof s.message?s.message(s.fullField||s.field):s.message||(s.fullField||s.field)+" fails"):e instanceof Array?n(e):e instanceof Error&&n(e.message)}e&&e.then&&e.then(function(){return n()},n)},function(e){n(e)},l)},e.getType=function(e){if(void 0===e.type&&e.pattern instanceof RegExp&&(e.type="pattern"),"function"!=typeof e.validator&&e.type&&!validators.hasOwnProperty(e.type))throw new Error(format("Unknown rule type %s",e.type));return e.type||"string"},e.getValidationMethod=function(e){if("function"==typeof e.validator)return e.validator;var t=Object.keys(e),n=t.indexOf("message");return-1!==n&&t.splice(n,1),1===t.length&&"required"===t[0]?validators.required:validators[this.getType(e)]||void 0},d}(),typeTemplate$1=(Schema.register=function(e,t){if("function"!=typeof t)throw new Error("Cannot register a validator by type, validator is not a function");validators[e]=t},Schema.warning=warning,Schema.messages=messages,Schema.validators=validators,"'${name}' is not a valid ${type}"),defaultValidateMessages={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:typeTemplate$1,method:typeTemplate$1,array:typeTemplate$1,object:typeTemplate$1,number:typeTemplate$1,date:typeTemplate$1,boolean:typeTemplate$1,integer:typeTemplate$1,float:typeTemplate$1,regexp:typeTemplate$1,email:typeTemplate$1,url:typeTemplate$1,hex:typeTemplate$1},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}};function get$1(e,t){for(var n=e,i=0;i<t.length;i+=1){if(null==n)return;n=n[t[i]]}return n}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _arrayWithHoles$1(e){if(Array.isArray(e))return e}function _nonIterableRest$1(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _toArray(e){return _arrayWithHoles$1(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableRest$1()}function internalSet(e,t,n,i){if(!t.length)return n;var t=_toArray(t),r=t[0],t=t.slice(1),e=e||"number"!=typeof r?Array.isArray(e)?_toConsumableArray(e):_objectSpread2$2({},e):[];return i&&void 0===n&&1===t.length?delete e[r][t[0]]:e[r]=internalSet(e[r],t,n,i),e}function set$1(e,t,n){var i=3<arguments.length&&void 0!==arguments[3]&&arguments[3];return t.length&&i&&void 0===n&&!get$1(e,t.slice(0,-1))?e:internalSet(e,t,n,i)}function cloneDeep(e){return Array.isArray(e)?cloneArrayDeep(e):"object"===_typeof$4(e)&&null!==e?cloneObjectDeep(e):e}function cloneObjectDeep(e){if(Object.getPrototypeOf(e)!==Object.prototype)return e;var t,n={};for(t in e)n[t]=cloneDeep(e[t]);return n}function cloneArrayDeep(e){return e.map(function(e){return cloneDeep(e)})}function getNamePath(e){return toArray(e)}function getValue$1(e,t){return get$1(e,t)}function setValue(e,t,n){return set$1(e,t,n,3<arguments.length&&void 0!==arguments[3]&&arguments[3])}function cloneByNamePathList(n,e){var i={};return e.forEach(function(e){var t=getValue$1(n,e);i=setValue(i,e,t)}),i}function containsNamePath(e,t){return e&&e.some(function(e){return matchNamePath(e,t)})}function isObject$7(e){return"object"===_typeof$4(e)&&null!==e&&Object.getPrototypeOf(e)===Object.prototype}function internalSetValues(e,r){var o=Array.isArray(e)?_toConsumableArray$1(e):_objectSpread2({},e);return r&&Object.keys(r).forEach(function(e){var t=o[e],n=r[e],i=isObject$7(t)&&isObject$7(n);o[e]=i?internalSetValues(t,n||{}):cloneDeep(n)}),o}function setValues(e){for(var t=arguments.length,n=new Array(1<t?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return n.reduce(function(e,t){return internalSetValues(e,t)},e)}function matchNamePath(e,n){return!(!e||!n||e.length!==n.length)&&e.every(function(e,t){return n[t]===e})}function isSimilar(n,i){if(n===i)return!0;if(!n&&i||n&&!i)return!1;if(!n||!i||"object"!==_typeof$4(n)||"object"!==_typeof$4(i))return!1;var e=Object.keys(n),t=Object.keys(i);return _toConsumableArray$1(new Set([].concat(e,t))).every(function(e){var t=n[e],e=i[e];return"function"==typeof t&&"function"==typeof e||t===e})}function defaultGetValueFromEvent(e){var t=arguments.length<=1?void 0:arguments[1];return t&&t.target&&"object"===_typeof$4(t.target)&&e in t.target?t.target[e]:t}function move(e,t,n){var i=e.length;if(t<0||i<=t||n<0||i<=n)return e;var r=e[t],o=t-n;return 0<o?[].concat(_toConsumableArray$1(e.slice(0,n)),[r],_toConsumableArray$1(e.slice(n,t)),_toConsumableArray$1(e.slice(t+1,i))):o<0?[].concat(_toConsumableArray$1(e.slice(0,t)),_toConsumableArray$1(e.slice(t+1,n+1)),[r],_toConsumableArray$1(e.slice(n+1,i))):e}var AsyncValidator=Schema;function replaceMessage(e,t){return e.replace(/\$\{\w+\}/g,function(e){e=e.slice(2,-1);return t[e]})}var CODE_LOGIC_ERROR="CODE_LOGIC_ERROR";function validateRule(e,t,n,i,r){return _validateRule.apply(this,arguments)}function _validateRule(){return(_validateRule=_asyncToGenerator(_regeneratorRuntime().mark(function e(n,t,i,r,o){var a,s,l,c,u,d,h;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return delete(u=_objectSpread2({},i)).ruleIndex,u.validator&&(a=u.validator,u.validator=function(){try{return a.apply(void 0,arguments)}catch(e){return console.error(e),Promise.reject(CODE_LOGIC_ERROR)}}),s=null,u&&"array"===u.type&&u.defaultField&&(s=u.defaultField,delete u.defaultField),u=new AsyncValidator(_defineProperty$2({},n,[u])),l=setValues({},defaultValidateMessages,r.validateMessages),u.messages(l),c=[],e.prev=9,e.next=12,Promise.resolve(u.validate(_defineProperty$2({},n,t),_objectSpread2({},r)));case 12:e.next=17;break;case 14:e.prev=14,e.t0=e.catch(9),e.t0.errors&&(c=e.t0.errors.map(function(e,t){e=e.message,e=e===CODE_LOGIC_ERROR?l.default:e;return react.exports.isValidElement(e)?react.exports.cloneElement(e,{key:"error_".concat(t)}):e}));case 17:if(!c.length&&s)return e.next=20,Promise.all(t.map(function(e,t){return validateRule("".concat(n,".").concat(t),e,s,r,o)}));e.next=22;break;case 20:return u=e.sent,e.abrupt("return",u.reduce(function(e,t){return[].concat(_toConsumableArray$1(e),_toConsumableArray$1(t))},[]));case 22:return d=_objectSpread2(_objectSpread2({},i),{},{name:n,enum:(i.enum||[]).join(", ")},o),h=c.map(function(e){return"string"==typeof e?replaceMessage(e,d):e}),e.abrupt("return",h);case 25:case"end":return e.stop()}},e,null,[[9,14]])}))).apply(this,arguments)}function validateRules(e,a,t,s,n,l){var c=e.join("."),u=t.map(function(e,t){var n=e.validator,e=_objectSpread2(_objectSpread2({},e),{},{ruleIndex:t});return n&&(e.validator=function(e,t,i){var r=!1,e=n(e,t,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];Promise.resolve().then(function(){warningOnce(!r,"Your validator function has already return a promise. `callback` will be ignored."),r||i.apply(void 0,t)})});warningOnce(r=e&&"function"==typeof e.then&&"function"==typeof e.catch,"`callback` is deprecated. Please return a promise instead."),r&&e.then(function(){i()}).catch(function(e){i(e||" ")})}),e}).sort(function(e,t){var n=e.warningOnly,e=e.ruleIndex,i=t.warningOnly,t=t.ruleIndex;return!!n==!!i?e-t:n?1:-1});return(e=!0===n?new Promise(function(){var n=_asyncToGenerator(_regeneratorRuntime().mark(function e(t,n){var i,r,o;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:i=0;case 1:if(i<u.length)return r=u[i],e.next=5,validateRule(c,a,r,s,l);e.next=12;break;case 5:if((o=e.sent).length)return n([{errors:o,rule:r}]),e.abrupt("return");e.next=9;break;case 9:i+=1,e.next=1;break;case 12:t([]);case 13:case"end":return e.stop()}},e)}));return function(e,t){return n.apply(this,arguments)}}()):(n?finishOnFirstFailed:finishOnAllFailed)(u.map(function(t){return validateRule(c,a,t,s,l).then(function(e){return{errors:e,rule:t}})})).then(function(e){return Promise.reject(e)})).catch(function(e){return e}),e}function finishOnAllFailed(e){return _finishOnAllFailed.apply(this,arguments)}function _finishOnAllFailed(){return(_finishOnAllFailed=_asyncToGenerator(_regeneratorRuntime().mark(function e(t){return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.all(t).then(function(e){var t;return(t=[]).concat.apply(t,_toConsumableArray$1(e))}));case 1:case"end":return e.stop()}},e)}))).apply(this,arguments)}function finishOnFirstFailed(e){return _finishOnFirstFailed.apply(this,arguments)}function _finishOnFirstFailed(){return(_finishOnFirstFailed=_asyncToGenerator(_regeneratorRuntime().mark(function e(n){var i;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=0,e.abrupt("return",new Promise(function(t){n.forEach(function(e){e.then(function(e){e.errors.length&&t([e]),(i+=1)===n.length&&t([])})})}));case 2:case"end":return e.stop()}},e)}))).apply(this,arguments)}var _excluded$2=["name"],EMPTY_ERRORS=[];function requireUpdate(e,t,n,i,r,o){return"function"==typeof e?e(t,n,"source"in o?{source:o.source}:{}):i!==r}var Field=function(){_inherits$3(n,react.exports.Component);var t=_createSuper$3(n);function n(e){var g;return _classCallCheck$3(this,n),(g=t.call(this,e)).state={resetCount:0},g.cancelRegisterFunc=null,g.mounted=!1,g.touched=!1,g.dirty=!1,g.validatePromise=null,g.prevValidating=void 0,g.errors=EMPTY_ERRORS,g.warnings=EMPTY_ERRORS,g.cancelRegister=function(){var e=g.props,t=e.preserve,n=e.isListField,e=e.name;g.cancelRegisterFunc&&g.cancelRegisterFunc(n,t,getNamePath(e)),g.cancelRegisterFunc=null},g.getNamePath=function(){var e=g.props,t=e.name,e=e.fieldContext.prefixName;return void 0!==t?[].concat(_toConsumableArray$1(void 0===e?[]:e),_toConsumableArray$1(t)):[]},g.getRules=function(){var e=g.props,t=e.rules,t=void 0===t?[]:t,n=e.fieldContext;return t.map(function(e){return"function"==typeof e?e(n):e})},g.refresh=function(){g.mounted&&g.setState(function(e){return{resetCount:e.resetCount+1}})},g.triggerMetaEvent=function(e){var t=g.props.onMetaChange;null!=t&&t(_objectSpread2(_objectSpread2({},g.getMeta()),{},{destroy:e}))},g.onStoreChange=function(e,t,n){var i,r=g.props,o=r.shouldUpdate,a=r.dependencies,s=void 0===a?[]:a,l=r.onReset,c=n.store,u=g.getNamePath(),d=g.getValue(e),h=g.getValue(c),p=t&&containsNamePath(t,u);switch("valueUpdate"===n.type&&"external"===n.source&&d!==h&&(g.touched=!0,g.dirty=!0,g.validatePromise=null,g.errors=EMPTY_ERRORS,g.warnings=EMPTY_ERRORS,g.triggerMetaEvent()),n.type){case"reset":if(!t||p)return g.touched=!1,g.dirty=!1,g.validatePromise=null,g.errors=EMPTY_ERRORS,g.warnings=EMPTY_ERRORS,g.triggerMetaEvent(),null!=l&&l(),void g.refresh();break;case"remove":if(o)return void g.reRender();break;case"setField":if(p)return"touched"in(i=n.data)&&(g.touched=i.touched),"validating"in i&&!("originRCField"in i)&&(g.validatePromise=i.validating?Promise.resolve([]):null),"errors"in i&&(g.errors=i.errors||EMPTY_ERRORS),"warnings"in i&&(g.warnings=i.warnings||EMPTY_ERRORS),g.dirty=!0,g.triggerMetaEvent(),void g.reRender();if(o&&!u.length&&requireUpdate(o,e,c,d,h,n))return void g.reRender();break;case"dependenciesUpdate":if(s.map(getNamePath).some(function(e){return containsNamePath(n.relatedFields,e)}))return void g.reRender();break;default:if(p||(!s.length||u.length||o)&&requireUpdate(o,e,c,d,h,n))return void g.reRender()}!0===o&&g.reRender()},g.validateRules=function(r){var o=g.getNamePath(),a=g.getValue(),s=Promise.resolve().then(function(){if(!g.mounted)return[];var e=g.props,t=e.validateFirst,t=void 0!==t&&t,e=e.messageVariables,n=(r||{}).triggerName,i=g.getRules(),i=(n&&(i=i.filter(function(e){return e}).filter(function(e){e=e.validateTrigger;return!e||toArray(e).includes(n)})),validateRules(o,a,i,r,t,e));return i.catch(function(e){return e}).then(function(){var e,n,i,t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:EMPTY_ERRORS;g.validatePromise===s&&(g.validatePromise=null,n=[],i=[],null!=(e=t.forEach)&&e.call(t,function(e){var t=e.rule.warningOnly,e=e.errors,e=void 0===e?EMPTY_ERRORS:e;t?i.push.apply(i,_toConsumableArray$1(e)):n.push.apply(n,_toConsumableArray$1(e))}),g.errors=n,g.warnings=i,g.triggerMetaEvent(),g.reRender())}),i});return g.validatePromise=s,g.dirty=!0,g.errors=EMPTY_ERRORS,g.warnings=EMPTY_ERRORS,g.triggerMetaEvent(),g.reRender(),s},g.isFieldValidating=function(){return!!g.validatePromise},g.isFieldTouched=function(){return g.touched},g.isFieldDirty=function(){return!(!g.dirty&&void 0===g.props.initialValue)||void 0!==(0,g.props.fieldContext.getInternalHooks(HOOK_MARK).getInitialValue)(g.getNamePath())},g.getErrors=function(){return g.errors},g.getWarnings=function(){return g.warnings},g.isListField=function(){return g.props.isListField},g.isList=function(){return g.props.isList},g.isPreserve=function(){return g.props.preserve},g.getMeta=function(){return g.prevValidating=g.isFieldValidating(),{touched:g.isFieldTouched(),validating:g.prevValidating,errors:g.errors,warnings:g.warnings,name:g.getNamePath()}},g.getOnlyChild=function(e){if("function"==typeof e)return t=g.getMeta(),_objectSpread2(_objectSpread2({},g.getOnlyChild(e(g.getControlled(),t,g.props.fieldContext))),{},{isFunction:!0});var t=toArray$1(e);return 1===t.length&&react.exports.isValidElement(t[0])?{child:t[0],isFunction:!1}:{child:t,isFunction:!1}},g.getValue=function(e){var t=g.props.fieldContext.getFieldsValue,n=g.getNamePath();return getValue$1(e||t(!0),n)},g.getControlled=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=g.props,n=t.trigger,i=t.validateTrigger,r=t.getValueFromEvent,o=t.normalize,a=t.valuePropName,s=t.getValueProps,t=t.fieldContext,i=void 0!==i?i:t.validateTrigger,l=g.getNamePath(),c=t.getInternalHooks,u=t.getFieldsValue,d=c(HOOK_MARK).dispatch,h=g.getValue(),t=s||function(e){return _defineProperty$2({},a,e)},p=e[n],f=_objectSpread2(_objectSpread2({},e),t(h));return f[n]=function(){var e;g.touched=!0,g.dirty=!0,g.triggerMetaEvent();for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];e=r?r.apply(void 0,n):defaultGetValueFromEvent.apply(void 0,[a].concat(n)),o&&(e=o(e,h,u(!0))),d({type:"updateValue",namePath:l,value:e}),p&&p.apply(void 0,n)},toArray(i||[]).forEach(function(t){var n=f[t];f[t]=function(){n&&n.apply(void 0,arguments);var e=g.props.rules;e&&e.length&&d({type:"validateField",namePath:l,triggerName:t})}}),f},e.fieldContext&&(0,(0,e.fieldContext.getInternalHooks)(HOOK_MARK).initEntityValue)(_assertThisInitialized$3(g)),g}return _createClass$3(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.shouldUpdate,e=e.fieldContext;this.mounted=!0,e&&(e=(0,e.getInternalHooks)(HOOK_MARK).registerField,this.cancelRegisterFunc=e(this)),!0===t&&this.reRender()}},{key:"componentWillUnmount",value:function(){this.cancelRegister(),this.triggerMetaEvent(!0),this.mounted=!1}},{key:"reRender",value:function(){this.mounted&&this.forceUpdate()}},{key:"render",value:function(){var e=this.state.resetCount,t=this.props.children,t=this.getOnlyChild(t),n=t.child,t=t.isFunction?n:react.exports.isValidElement(n)?react.exports.cloneElement(n,this.getControlled(n.props)):(warningOnce(!n,"`children` of Field is not validate ReactElement."),n);return react.exports.createElement(react.exports.Fragment,{key:e},t)}}]),n}();function WrapperField(e){var t=e.name,e=_objectWithoutProperties$2(e,_excluded$2),n=react.exports.useContext(Context),t=void 0!==t?getNamePath(t):void 0,i="keep";return e.isListField||(i="_".concat((t||[]).join("_"))),react.exports.createElement(Field,_extends$4({key:i,name:t},e,{fieldContext:n}))}Field.contextType=Context,Field.defaultProps={trigger:"onChange",valuePropName:"value"};var ListContext=react.exports.createContext(null),List=function(e){var t=e.name,n=e.initialValue,a=e.children,i=e.rules,e=e.validateTrigger,s=react.exports.useContext(Context),l=react.exports.useRef({keys:[],id:0}).current,c=react.exports.useMemo(function(){var e=getNamePath(s.prefixName)||[];return[].concat(_toConsumableArray$1(e),_toConsumableArray$1(getNamePath(t)))},[s.prefixName,t]),r=react.exports.useMemo(function(){return _objectSpread2(_objectSpread2({},s),{},{prefixName:c})},[s,c]),o=react.exports.useMemo(function(){return{getKey:function(e){var t=c.length,n=e[t];return[l.keys[n],e.slice(t+1)]}}},[c]);if("function"!=typeof a)return warningOnce(!1,"Form.List only accepts function as children."),null;return react.exports.createElement(ListContext.Provider,{value:o},react.exports.createElement(Context.Provider,{value:r},react.exports.createElement(WrapperField,{name:[],shouldUpdate:function(e,t,n){return"internal"!==n.source&&e!==t},rules:i,validateTrigger:e,initialValue:n,isList:!0},function(e,t){function i(){return o(c||[])||[]}var n=e.value,r=e.onChange,o=s.getFieldValue,e={add:function(e,t){var n=i();0<=t&&t<=n.length?(l.keys=[].concat(_toConsumableArray$1(l.keys.slice(0,t)),[l.id],_toConsumableArray$1(l.keys.slice(t))),r([].concat(_toConsumableArray$1(n.slice(0,t)),[e],_toConsumableArray$1(n.slice(t))))):(l.keys=[].concat(_toConsumableArray$1(l.keys),[l.id]),r([].concat(_toConsumableArray$1(n),[e]))),l.id+=1},remove:function(e){var t=i(),n=new Set(Array.isArray(e)?e:[e]);n.size<=0||(l.keys=l.keys.filter(function(e,t){return!n.has(t)}),r(t.filter(function(e,t){return!n.has(t)})))},move:function(e,t){var n;e!==t&&(n=i(),e<0||e>=n.length||t<0||t>=n.length||(l.keys=move(l.keys,e,t),r(move(n,e,t))))}},n=(void 0===n?[]:n)||[];return Array.isArray(n)||(n=[]),a(n.map(function(e,t){var n=l.keys[t];return void 0===n&&(l.keys[t]=l.id,n=l.keys[t],l.id+=1),{name:t,key:n,isListField:!0}}),e,t)})))};function _arrayWithHoles(e){if(Array.isArray(e))return e}function _iterableToArrayLimit(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,r,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=o.call(n)).done)&&(s.push(i.value),s.length!==t);l=!0);}catch(e){c=!0,r=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw r}}return s}}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray$1(e,t)||_nonIterableRest()}function allPromiseFinish(e){var r=!1,o=e.length,a=[];return e.length?new Promise(function(n,i){e.forEach(function(e,t){e.catch(function(e){return r=!0,e}).then(function(e){--o,a[t]=e,0<o||(r&&i(a),n(a))})})}):Promise.resolve([])}var SPLIT="__@field_split__";function normalize$1(e){return e.map(function(e){return"".concat(_typeof$4(e),":").concat(e)}).join(SPLIT)}var NameMap=function(){function e(){_classCallCheck$3(this,e),this.kvs=new Map}return _createClass$3(e,[{key:"set",value:function(e,t){this.kvs.set(normalize$1(e),t)}},{key:"get",value:function(e){return this.kvs.get(normalize$1(e))}},{key:"update",value:function(e,t){t=t(this.get(e));t?this.set(e,t):this.delete(e)}},{key:"delete",value:function(e){this.kvs.delete(normalize$1(e))}},{key:"map",value:function(n){return _toConsumableArray$1(this.kvs.entries()).map(function(e){var e=_slicedToArray(e,2),t=e[0],e=e[1],t=t.split(SPLIT);return n({key:t.map(function(e){var e=_slicedToArray(e.match(/^([^:]*):(.*)$/),3),t=e[1],e=e[2];return"number"===t?Number(e):e}),value:e})})}},{key:"toJSON",value:function(){var n={};return this.map(function(e){var t=e.key,e=e.value;return n[t.join(".")]=e,null}),n}}]),e}(),_excluded$1=["name","errors"],FormStore=_createClass$3(function e(t){var u=this;_classCallCheck$3(this,e),this.formHooked=!1,this.forceRootUpdate=void 0,this.subscribable=!0,this.store={},this.fieldEntities=[],this.initialValues={},this.callbacks={},this.validateMessages=null,this.preserve=null,this.lastValidatePromise=null,this.getForm=function(){return{getFieldValue:u.getFieldValue,getFieldsValue:u.getFieldsValue,getFieldError:u.getFieldError,getFieldWarning:u.getFieldWarning,getFieldsError:u.getFieldsError,isFieldsTouched:u.isFieldsTouched,isFieldTouched:u.isFieldTouched,isFieldValidating:u.isFieldValidating,isFieldsValidating:u.isFieldsValidating,resetFields:u.resetFields,setFields:u.setFields,setFieldValue:u.setFieldValue,setFieldsValue:u.setFieldsValue,validateFields:u.validateFields,submit:u.submit,_init:!0,getInternalHooks:u.getInternalHooks}},this.getInternalHooks=function(e){return e===HOOK_MARK?(u.formHooked=!0,{dispatch:u.dispatch,initEntityValue:u.initEntityValue,registerField:u.registerField,useSubscribe:u.useSubscribe,setInitialValues:u.setInitialValues,destroyForm:u.destroyForm,setCallbacks:u.setCallbacks,setValidateMessages:u.setValidateMessages,getFields:u.getFields,setPreserve:u.setPreserve,getInitialValue:u.getInitialValue,registerWatch:u.registerWatch}):(warningOnce(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)},this.useSubscribe=function(e){u.subscribable=e},this.prevWithoutPreserves=null,this.setInitialValues=function(t,e){var n;u.initialValues=t||{},e&&(n=setValues({},t,u.store),null!=(e=u.prevWithoutPreserves)&&e.map(function(e){e=e.key;n=setValue(n,e,getValue$1(t,e))}),u.prevWithoutPreserves=null,u.updateStore(n))},this.destroyForm=function(){var t=new NameMap;u.getFieldEntities(!0).forEach(function(e){u.isMergedPreserve(e.isPreserve())||t.set(e.getNamePath(),!0)}),u.prevWithoutPreserves=t},this.getInitialValue=function(e){var t=getValue$1(u.initialValues,e);return e.length?cloneDeep(t):t},this.setCallbacks=function(e){u.callbacks=e},this.setValidateMessages=function(e){u.validateMessages=e},this.setPreserve=function(e){u.preserve=e},this.watchList=[],this.registerWatch=function(t){return u.watchList.push(t),function(){u.watchList=u.watchList.filter(function(e){return e!==t})}},this.notifyWatch=function(){var t,n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];u.watchList.length&&(t=u.getFieldsValue(),u.watchList.forEach(function(e){e(t,n)}))},this.timeoutId=null,this.warningUnhooked=function(){},this.updateStore=function(e){u.store=e},this.getFieldEntities=function(){return 0<arguments.length&&void 0!==arguments[0]&&arguments[0]?u.fieldEntities.filter(function(e){return e.getNamePath().length}):u.fieldEntities},this.getFieldsMap=function(){var e=0<arguments.length&&void 0!==arguments[0]&&arguments[0],n=new NameMap;return u.getFieldEntities(e).forEach(function(e){var t=e.getNamePath();n.set(t,e)}),n},this.getFieldEntitiesForNamePathList=function(e){if(!e)return u.getFieldEntities(!0);var n=u.getFieldsMap(!0);return e.map(function(e){var t=getNamePath(e);return n.get(t)||{INVALIDATE_NAME_PATH:getNamePath(e)}})},this.getFieldsValue=function(i,r){if(u.warningUnhooked(),!0===i&&!r)return u.store;var e=u.getFieldEntitiesForNamePathList(Array.isArray(i)?i:null),o=[];return e.forEach(function(e){var t,n="INVALIDATE_NAME_PATH"in e?e.INVALIDATE_NAME_PATH:e.getNamePath();!i&&null!=(t=e.isListField)&&t.call(e)||(r?(t="getMeta"in e?e.getMeta():null,r(t)&&o.push(n)):o.push(n))}),cloneByNamePathList(u.store,o.map(getNamePath))},this.getFieldValue=function(e){u.warningUnhooked();e=getNamePath(e);return getValue$1(u.store,e)},this.getFieldsError=function(n){return u.warningUnhooked(),u.getFieldEntitiesForNamePathList(n).map(function(e,t){return!e||"INVALIDATE_NAME_PATH"in e?{name:getNamePath(n[t]),errors:[],warnings:[]}:{name:e.getNamePath(),errors:e.getErrors(),warnings:e.getWarnings()}})},this.getFieldError=function(e){u.warningUnhooked();e=getNamePath(e);return u.getFieldsError([e])[0].errors},this.getFieldWarning=function(e){u.warningUnhooked();e=getNamePath(e);return u.getFieldsError([e])[0].warnings},this.isFieldsTouched=function(){u.warningUnhooked();for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];function i(e){return e.isFieldTouched()}var r,o=t[0],a=t[1],s=!1,o=(0===t.length?r=null:s=1===t.length?Array.isArray(o)?(r=o.map(getNamePath),!1):(r=null,o):(r=o.map(getNamePath),a),u.getFieldEntities(!0));if(!r)return s?o.every(i):o.some(i);function l(e){return e.some(i)}var c=new NameMap,a=(r.forEach(function(e){c.set(e,[])}),o.forEach(function(t){var n=t.getNamePath();r.forEach(function(e){e.every(function(e,t){return n[t]===e})&&c.update(e,function(e){return[].concat(_toConsumableArray$1(e),[t])})})}),c.map(function(e){return e.value}));return s?a.every(l):a.some(l)},this.isFieldTouched=function(e){return u.warningUnhooked(),u.isFieldsTouched([e])},this.isFieldsValidating=function(e){u.warningUnhooked();var t=u.getFieldEntities();if(!e)return t.some(function(e){return e.isFieldValidating()});var n=e.map(getNamePath);return t.some(function(e){var t=e.getNamePath();return containsNamePath(n,t)&&e.isFieldValidating()})},this.isFieldValidating=function(e){return u.warningUnhooked(),u.isFieldsValidating([e])},this.resetWithFieldInitialValue=function(){var t,i=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},r=new NameMap,e=u.getFieldEntities(!0);e.forEach(function(e){var t,n=e.props.initialValue,i=e.getNamePath();void 0!==n&&((t=r.get(i)||new Set).add({entity:e,value:n}),r.set(i,t))});i.entities?t=i.entities:i.namePathList?(t=[],i.namePathList.forEach(function(e){e=r.get(e);e&&t.push.apply(t,_toConsumableArray$1(_toConsumableArray$1(e).map(function(e){return e.entity})))})):t=e,t.forEach(function(e){var t,n;void 0!==e.props.initialValue&&(e=e.getNamePath(),void 0!==u.getInitialValue(e)?warningOnce(!1,"Form already set 'initialValues' with path '".concat(e.join("."),"'. Field can not overwrite it.")):(t=r.get(e))&&1<t.size?warningOnce(!1,"Multiple Field with path '".concat(e.join("."),"' set 'initialValue'. Can not decide which one to pick.")):t&&(n=u.getFieldValue(e),i.skipExist&&void 0!==n||u.updateStore(setValue(u.store,e,_toConsumableArray$1(t)[0].value))))})},this.resetFields=function(e){u.warningUnhooked();var t=u.store;if(!e)return u.updateStore(setValues({},u.initialValues)),u.resetWithFieldInitialValue(),u.notifyObservers(t,null,{type:"reset"}),void u.notifyWatch();e=e.map(getNamePath);e.forEach(function(e){var t=u.getInitialValue(e);u.updateStore(setValue(u.store,e,t))}),u.resetWithFieldInitialValue({namePathList:e}),u.notifyObservers(t,e,{type:"reset"}),u.notifyWatch(e)},this.setFields=function(e){u.warningUnhooked();var i=u.store,r=[];e.forEach(function(e){var t=e.name,n=(e.errors,_objectWithoutProperties$2(e,_excluded$1)),t=getNamePath(t);r.push(t),"value"in n&&u.updateStore(setValue(u.store,t,n.value)),u.notifyObservers(i,[t],{type:"setField",data:e})}),u.notifyWatch(r)},this.getFields=function(){return u.getFieldEntities(!0).map(function(e){var t=e.getNamePath(),e=_objectSpread2(_objectSpread2({},e.getMeta()),{},{name:t,value:u.getFieldValue(t)});return Object.defineProperty(e,"originRCField",{value:!0}),e})},this.initEntityValue=function(e){var t=e.props.initialValue;void 0!==t&&(e=e.getNamePath(),void 0===getValue$1(u.store,e)&&u.updateStore(setValue(u.store,e,t)))},this.isMergedPreserve=function(e){e=void 0!==e?e:u.preserve;return null==e||e},this.registerField=function(r){u.fieldEntities.push(r);var e,o=r.getNamePath();return u.notifyWatch([o]),void 0!==r.props.initialValue&&(e=u.store,u.resetWithFieldInitialValue({entities:[r],skipExist:!0}),u.notifyObservers(e,[r.getNamePath()],{type:"valueUpdate",source:"internal"})),function(e,t){var n,i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:[];u.fieldEntities=u.fieldEntities.filter(function(e){return e!==r}),u.isMergedPreserve(t)||e&&!(1<i.length)||(i=e?void 0:u.getInitialValue(o),o.length&&u.getFieldValue(o)!==i&&u.fieldEntities.every(function(e){return!matchNamePath(e.getNamePath(),o)})&&(n=u.store,u.updateStore(setValue(n,o,i,!0)),u.notifyObservers(n,[o],{type:"remove"}),u.triggerDependenciesUpdate(n,o))),u.notifyWatch([o])}},this.dispatch=function(e){switch(e.type){case"updateValue":var t=e.namePath,n=e.value;u.updateValue(t,n);break;case"validateField":t=e.namePath,n=e.triggerName;u.validateFields([t],{triggerName:n})}},this.notifyObservers=function(t,n,e){var i;u.subscribable?(i=_objectSpread2(_objectSpread2({},e),{},{store:u.getFieldsValue(!0)}),u.getFieldEntities().forEach(function(e){(0,e.onStoreChange)(t,n,i)})):u.forceRootUpdate()},this.triggerDependenciesUpdate=function(e,t){var n=u.getDependencyChildrenFields(t);return n.length&&u.validateFields(n),u.notifyObservers(e,n,{type:"dependenciesUpdate",relatedFields:[t].concat(_toConsumableArray$1(n))}),n},this.updateValue=function(e,t){var e=getNamePath(e),n=u.store,t=(u.updateStore(setValue(u.store,e,t)),u.notifyObservers(n,[e],{type:"valueUpdate",source:"internal"}),u.notifyWatch([e]),u.triggerDependenciesUpdate(n,e)),n=u.callbacks.onValuesChange;n&&n(cloneByNamePathList(u.store,[e]),u.getFieldsValue()),u.triggerOnFieldsChange([e].concat(_toConsumableArray$1(t)))},this.setFieldsValue=function(e){u.warningUnhooked();var t=u.store;e&&(e=setValues(u.store,e),u.updateStore(e)),u.notifyObservers(t,null,{type:"valueUpdate",source:"external"}),u.notifyWatch()},this.setFieldValue=function(e,t){u.setFields([{name:e,value:t}])},this.getDependencyChildrenFields=function(e){var i=new Set,r=[],o=new NameMap;return u.getFieldEntities().forEach(function(t){(t.props.dependencies||[]).forEach(function(e){e=getNamePath(e);o.update(e,function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:new Set;return e.add(t),e})})}),function n(e){(o.get(e)||new Set).forEach(function(e){var t;i.has(e)||(i.add(e),t=e.getNamePath(),e.isFieldDirty()&&t.length&&(r.push(t),n(t)))})}(e),r},this.triggerOnFieldsChange=function(t,e){var n,i,r=u.callbacks.onFieldsChange;r&&(n=u.getFields(),e&&(i=new NameMap,e.forEach(function(e){var t=e.name,e=e.errors;i.set(t,e)}),n.forEach(function(e){e.errors=i.get(e.name)||e.errors})),r(n.filter(function(e){e=e.name;return containsNamePath(t,e)}),n))},this.validateFields=function(n,i){u.warningUnhooked();var o=!!n,a=o?n.map(getNamePath):[],s=[],t=(u.getFieldEntities(!0).forEach(function(e){var r,t;o||a.push(e.getNamePath()),null!=i&&i.recursive&&o&&((t=e.getNamePath()).every(function(e,t){return n[t]===e||void 0===n[t]})&&a.push(t)),e.props.rules&&e.props.rules.length&&(r=e.getNamePath(),o&&!containsNamePath(a,r)||(t=e.validateRules(_objectSpread2({validateMessages:_objectSpread2(_objectSpread2({},defaultValidateMessages),u.validateMessages)},i)),s.push(t.then(function(){return{name:r,errors:[],warnings:[]}}).catch(function(e){var t,n=[],i=[];return null!=(t=e.forEach)&&t.call(e,function(e){var t=e.rule.warningOnly,e=e.errors;t?i.push.apply(i,_toConsumableArray$1(e)):n.push.apply(n,_toConsumableArray$1(e))}),n.length?Promise.reject({name:r,errors:n,warnings:i}):{name:r,errors:n,warnings:i}}))))}),allPromiseFinish(s)),e=((u.lastValidatePromise=t).catch(function(e){return e}).then(function(e){var t=e.map(function(e){return e.name});u.notifyObservers(u.store,t,{type:"validateFinish"}),u.triggerOnFieldsChange(t,e)}),t.then(function(){return u.lastValidatePromise===t?Promise.resolve(u.getFieldsValue(a)):Promise.reject([])}).catch(function(e){e=e.filter(function(e){return e&&e.errors.length});return Promise.reject({values:u.getFieldsValue(a),errorFields:e,outOfDate:u.lastValidatePromise!==t})}));return e.catch(function(e){return e}),e},this.submit=function(){u.warningUnhooked(),u.validateFields().then(function(e){var t=u.callbacks.onFinish;if(t)try{t(e)}catch(e){console.error(e)}}).catch(function(e){var t=u.callbacks.onFinishFailed;t&&t(e)})},this.forceRootUpdate=t});function useForm(e){var t=react.exports.useRef(),n=_slicedToArray(react.exports.useState({}),2)[1];return t.current||(e?t.current=e:(e=new FormStore(function(){n({})}),t.current=e.getForm())),[t.current]}var FormContext=react.exports.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),FormProvider=function(e){var t=e.validateMessages,n=e.onFormChange,i=e.onFormFinish,e=e.children,r=react.exports.useContext(FormContext),o=react.exports.useRef({});return react.exports.createElement(FormContext.Provider,{value:_objectSpread2(_objectSpread2({},r),{},{validateMessages:_objectSpread2(_objectSpread2({},r.validateMessages),t),triggerFormChange:function(e,t){n&&n(e,{changedFields:t,forms:o.current}),r.triggerFormChange(e,t)},triggerFormFinish:function(e,t){i&&i(e,{values:t,forms:o.current}),r.triggerFormFinish(e,t)},registerForm:function(e,t){e&&(o.current=_objectSpread2(_objectSpread2({},o.current),{},_defineProperty$2({},e,t))),r.registerForm(e,t)},unregisterForm:function(e){var t=_objectSpread2({},o.current);delete t[e],o.current=t,r.unregisterForm(e)}})},e)},_excluded=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed"],Form=function(e,t){var r=e.name,n=e.initialValues,i=e.fields,o=e.form,a=e.preserve,s=e.children,l=e.component,l=void 0===l?"form":l,c=e.validateMessages,u=e.validateTrigger,d=void 0===u?"onChange":u,u=e.onValuesChange,h=e.onFieldsChange,p=e.onFinish,f=e.onFinishFailed,g=_objectWithoutProperties$2(e,_excluded),y=react.exports.useContext(FormContext),m=_slicedToArray(useForm(o),1)[0],e=m.getInternalHooks(HOOK_MARK),o=e.useSubscribe,v=e.setInitialValues,b=e.setCallbacks,x=e.setValidateMessages,w=e.setPreserve,_=e.destroyForm,e=(react.exports.useImperativeHandle(t,function(){return m}),react.exports.useEffect(function(){return y.registerForm(r,m),function(){y.unregisterForm(r)}},[y,m,r]),x(_objectSpread2(_objectSpread2({},y.validateMessages),c)),b({onValuesChange:u,onFieldsChange:function(e){if(y.triggerFormChange(r,e),h){for(var t=arguments.length,n=new Array(1<t?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];h.apply(void 0,[e].concat(n))}},onFinish:function(e){y.triggerFormFinish(r,e),p&&p(e)},onFinishFailed:f}),w(a),react.exports.useRef(null)),t=(v(n,!e.current),e.current||(e.current=!0),react.exports.useEffect(function(){return _},[]),"function"==typeof s),S=(x=t?s(m.getFieldsValue(!0),m):s,o(!t),react.exports.useRef()),c=(react.exports.useEffect(function(){isSimilar(S.current||[],i||[])||m.setFields(i||[]),S.current=i},[i,m]),react.exports.useMemo(function(){return _objectSpread2(_objectSpread2({},m),{},{validateTrigger:d})},[m,d])),b=react.exports.createElement(Context.Provider,{value:c},x);return!1===l?b:react.exports.createElement(l,_extends$4({},g,{onSubmit:function(e){e.preventDefault(),e.stopPropagation(),m.submit()},onReset:function(e){var t;e.preventDefault(),m.resetFields(),null!=(t=g.onReset)&&t.call(g,e)}}),b)};function stringify(e){try{return JSON.stringify(e)}catch(e){return Math.random()}}function useWatch(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=t[0],i=void 0===i?[]:i,r=t[1],o=_slicedToArray(react.exports.useState(),2),a=o[0],s=o[1],o=react.exports.useMemo(function(){return stringify(a)},[a]),l=react.exports.useRef(o),o=(l.current=o,react.exports.useContext(Context)),c=r||o,u=c&&c._init,r=getNamePath(i),d=react.exports.useRef(r);return d.current=r,react.exports.useEffect(function(){var e,t;if(u)return t=c.getFieldsValue,e=(0,(0,c.getInternalHooks)(HOOK_MARK).registerWatch)(function(e){var e=getValue$1(e,d.current),t=stringify(e);l.current!==t&&(l.current=t,s(e))}),t=getValue$1(t(),d.current),s(t),e},[u]),a}var InternalForm=react.exports.forwardRef(Form),RefForm=InternalForm,enUS$2=(RefForm.FormProvider=FormProvider,RefForm.Field=WrapperField,RefForm.List=List,RefForm.useForm=useForm,RefForm.useWatch=useWatch,{items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"}),locale$5={locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",yearFormat:"YYYY",dateFormat:"M/D/YYYY",dayFormat:"D",dateTimeFormat:"M/D/YYYY HH:mm:ss",monthBeforeYear:!0,previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"};const locale$4={placeholder:"Select time",rangePlaceholder:["Start time","End time"]};var TimePicker=locale$4;const locale$3={lang:Object.assign({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},locale$5),timePickerLocale:Object.assign({},TimePicker)};var enUS$1=locale$3;const typeTemplate="${label} is not a valid ${type}",localeValues={locale:"en",Pagination:enUS$2,DatePicker:locale$3,TimePicker:TimePicker,Calendar:locale$3,global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckall:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand"},PageHeader:{back:"Back"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:typeTemplate,method:typeTemplate,array:typeTemplate,object:typeTemplate,number:typeTemplate,date:typeTemplate,boolean:typeTemplate,integer:typeTemplate,float:typeTemplate,regexp:typeTemplate,email:typeTemplate,url:typeTemplate,hex:typeTemplate},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"},QRCode:{expired:"QR code expired",refresh:"Refresh"}};var defaultLocale=localeValues;const LocaleContext=react.exports.createContext(void 0);var LocaleContext$1=LocaleContext;const LocaleReceiver=e=>{const{componentName:n="global",defaultLocale:i,children:t}=e,r=react.exports.useContext(LocaleContext$1);var e=react.exports.useMemo(()=>{const e=i||defaultLocale[n];var t=null!=(t=null===r||void 0===r?void 0:r[n])?t:{};return Object.assign(Object.assign({},e instanceof Function?e():e),t||{})},[n,i,r]),o=react.exports.useMemo(()=>{var e=r&&r.locale;return r&&r.exist&&!e?defaultLocale.locale:e},[r]);return t(e,o,r)};var LocaleReceiver$1=LocaleReceiver,version$1="5.1.4";function bound01(e,t){var n=isPercentage(e=isOnePointZero(e)?"100%":e);return e=360===t?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:360===t?(e<0?e%t+t:e%t)/parseFloat(String(t)):e%t/parseFloat(String(t))}function clamp01(e){return Math.min(1,Math.max(0,e))}function isOnePointZero(e){return"string"==typeof e&&-1!==e.indexOf(".")&&1===parseFloat(e)}function isPercentage(e){return"string"==typeof e&&-1!==e.indexOf("%")}function boundAlpha(e){return e=parseFloat(e),e=isNaN(e)||e<0||1<e?1:e}function convertToPercentage(e){return e<=1?"".concat(100*Number(e),"%"):e}function pad2(e){return 1===e.length?"0"+e:String(e)}function rgbToRgb(e,t,n){return{r:255*bound01(e,255),g:255*bound01(t,255),b:255*bound01(n,255)}}function rgbToHsl(e,t,n){e=bound01(e,255),t=bound01(t,255),n=bound01(n,255);var i=Math.max(e,t,n),r=Math.min(e,t,n),o=0,a=0,s=(i+r)/2;if(i===r)o=a=0;else{var l=i-r,a=.5<s?l/(2-i-r):l/(i+r);switch(i){case e:o=(t-n)/l+(t<n?6:0);break;case t:o=(n-e)/l+2;break;case n:o=(e-t)/l+4}o/=6}return{h:o,s:a,l:s}}function hue2rgb(e,t,n){return n<0&&(n+=1),1<n&&--n,n<1/6?e+6*n*(t-e):n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function hslToRgb(e,t,n){var i,r,o;return e=bound01(e,360),t=bound01(t,100),n=bound01(n,100),0===t?i=o=r=n:(i=hue2rgb(t=2*n-(n=n<.5?n*(1+t):n+t-n*t),n,e+1/3),r=hue2rgb(t,n,e),o=hue2rgb(t,n,e-1/3)),{r:255*i,g:255*r,b:255*o}}function rgbToHsv(e,t,n){e=bound01(e,255),t=bound01(t,255),n=bound01(n,255);var i=Math.max(e,t,n),r=Math.min(e,t,n),o=0,a=i,s=i-r,l=0===i?0:s/i;if(i===r)o=0;else{switch(i){case e:o=(t-n)/s+(t<n?6:0);break;case t:o=(n-e)/s+2;break;case n:o=(e-t)/s+4}o/=6}return{h:o,s:l,v:a}}function hsvToRgb(e,t,n){e=6*bound01(e,360),t=bound01(t,100),n=bound01(n,100);var i=Math.floor(e),e=e-i,r=n*(1-t),o=n*(1-e*t),e=n*(1-(1-e)*t),t=i%6;return{r:255*[n,o,r,r,e,n][t],g:255*[e,n,n,o,r,r][t],b:255*[r,r,e,n,n,o][t]}}function rgbToHex(e,t,n,i){e=[pad2(Math.round(e).toString(16)),pad2(Math.round(t).toString(16)),pad2(Math.round(n).toString(16))];return i&&e[0].startsWith(e[0].charAt(1))&&e[1].startsWith(e[1].charAt(1))&&e[2].startsWith(e[2].charAt(1))?e[0].charAt(0)+e[1].charAt(0)+e[2].charAt(0):e.join("")}function rgbaToHex(e,t,n,i,r){e=[pad2(Math.round(e).toString(16)),pad2(Math.round(t).toString(16)),pad2(Math.round(n).toString(16)),pad2(convertDecimalToHex(i))];return r&&e[0].startsWith(e[0].charAt(1))&&e[1].startsWith(e[1].charAt(1))&&e[2].startsWith(e[2].charAt(1))&&e[3].startsWith(e[3].charAt(1))?e[0].charAt(0)+e[1].charAt(0)+e[2].charAt(0)+e[3].charAt(0):e.join("")}function convertDecimalToHex(e){return Math.round(255*parseFloat(e)).toString(16)}function convertHexToDecimal(e){return parseIntFromHex(e)/255}function parseIntFromHex(e){return parseInt(e,16)}function numberInputToObject(e){return{r:e>>16,g:(65280&e)>>8,b:255&e}}var names={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function inputToRGB(e){var t,n={r:0,g:0,b:0},i=1,r=null,o=!1,a=!1;return"object"==typeof(e="string"==typeof e?stringInputToObject(e):e)&&(isValidCSSUnit(e.r)&&isValidCSSUnit(e.g)&&isValidCSSUnit(e.b)?(n=rgbToRgb(e.r,e.g,e.b),o=!0,a="%"===String(e.r).substr(-1)?"prgb":"rgb"):isValidCSSUnit(e.h)&&isValidCSSUnit(e.s)&&isValidCSSUnit(e.v)?(r=convertToPercentage(e.s),t=convertToPercentage(e.v),n=hsvToRgb(e.h,r,t),o=!0,a="hsv"):isValidCSSUnit(e.h)&&isValidCSSUnit(e.s)&&isValidCSSUnit(e.l)&&(r=convertToPercentage(e.s),t=convertToPercentage(e.l),n=hslToRgb(e.h,r,t),o=!0,a="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(i=e.a)),i=boundAlpha(i),{ok:o,format:e.format||a,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a:i}}var CSS_INTEGER="[-\\+]?\\d+%?",CSS_NUMBER="[-\\+]?\\d*\\.\\d+%?",CSS_UNIT="(?:".concat(CSS_NUMBER,")|(?:").concat(CSS_INTEGER,")"),PERMISSIVE_MATCH3="[\\s|\\(]+(".concat(CSS_UNIT,")[,|\\s]+(").concat(CSS_UNIT,")[,|\\s]+(").concat(CSS_UNIT,")\\s*\\)?"),PERMISSIVE_MATCH4="[\\s|\\(]+(".concat(CSS_UNIT,")[,|\\s]+(").concat(CSS_UNIT,")[,|\\s]+(").concat(CSS_UNIT,")[,|\\s]+(").concat(CSS_UNIT,")\\s*\\)?"),matchers={CSS_UNIT:new RegExp(CSS_UNIT),rgb:new RegExp("rgb"+PERMISSIVE_MATCH3),rgba:new RegExp("rgba"+PERMISSIVE_MATCH4),hsl:new RegExp("hsl"+PERMISSIVE_MATCH3),hsla:new RegExp("hsla"+PERMISSIVE_MATCH4),hsv:new RegExp("hsv"+PERMISSIVE_MATCH3),hsva:new RegExp("hsva"+PERMISSIVE_MATCH4),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function stringInputToObject(e){if(0===(e=e.trim().toLowerCase()).length)return!1;var t=!1;if(names[e])e=names[e],t=!0;else if("transparent"===e)return{r:0,g:0,b:0,a:0,format:"name"};var n=matchers.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=matchers.rgba.exec(e))?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=matchers.hsl.exec(e))?{h:n[1],s:n[2],l:n[3]}:(n=matchers.hsla.exec(e))?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=matchers.hsv.exec(e))?{h:n[1],s:n[2],v:n[3]}:(n=matchers.hsva.exec(e))?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=matchers.hex8.exec(e))?{r:parseIntFromHex(n[1]),g:parseIntFromHex(n[2]),b:parseIntFromHex(n[3]),a:convertHexToDecimal(n[4]),format:t?"name":"hex8"}:(n=matchers.hex6.exec(e))?{r:parseIntFromHex(n[1]),g:parseIntFromHex(n[2]),b:parseIntFromHex(n[3]),format:t?"name":"hex"}:(n=matchers.hex4.exec(e))?{r:parseIntFromHex(n[1]+n[1]),g:parseIntFromHex(n[2]+n[2]),b:parseIntFromHex(n[3]+n[3]),a:convertHexToDecimal(n[4]+n[4]),format:t?"name":"hex8"}:!!(n=matchers.hex3.exec(e))&&{r:parseIntFromHex(n[1]+n[1]),g:parseIntFromHex(n[2]+n[2]),b:parseIntFromHex(n[3]+n[3]),format:t?"name":"hex"}}function isValidCSSUnit(e){return Boolean(matchers.CSS_UNIT.exec(String(e)))}var TinyColor=function(){function s(e,t){if(void 0===t&&(t={}),(e=void 0===e?"":e)instanceof s)return e;"number"==typeof e&&(e=numberInputToObject(e));var n=inputToRGB(this.originalInput=e);this.originalInput=e,this.r=n.r,this.g=n.g,this.b=n.b,this.a=n.a,this.roundA=Math.round(100*this.a)/100,this.format=null!=(e=t.format)?e:n.format,this.gradientType=t.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=n.ok}return s.prototype.isDark=function(){return this.getBrightness()<128},s.prototype.isLight=function(){return!this.isDark()},s.prototype.getBrightness=function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},s.prototype.getLuminance=function(){var e=this.toRgb(),t=e.r/255,n=e.g/255,e=e.b/255,t=t<=.03928?t/12.92:Math.pow((.055+t)/1.055,2.4),n=n<=.03928?n/12.92:Math.pow((.055+n)/1.055,2.4),e=e<=.03928?e/12.92:Math.pow((.055+e)/1.055,2.4);return.2126*t+.7152*n+.0722*e},s.prototype.getAlpha=function(){return this.a},s.prototype.setAlpha=function(e){return this.a=boundAlpha(e),this.roundA=Math.round(100*this.a)/100,this},s.prototype.isMonochrome=function(){return 0===this.toHsl().s},s.prototype.toHsv=function(){var e=rgbToHsv(this.r,this.g,this.b);return{h:360*e.h,s:e.s,v:e.v,a:this.a}},s.prototype.toHsvString=function(){var e=rgbToHsv(this.r,this.g,this.b),t=Math.round(360*e.h),n=Math.round(100*e.s),e=Math.round(100*e.v);return 1===this.a?"hsv(".concat(t,", ").concat(n,"%, ").concat(e,"%)"):"hsva(".concat(t,", ").concat(n,"%, ").concat(e,"%, ").concat(this.roundA,")")},s.prototype.toHsl=function(){var e=rgbToHsl(this.r,this.g,this.b);return{h:360*e.h,s:e.s,l:e.l,a:this.a}},s.prototype.toHslString=function(){var e=rgbToHsl(this.r,this.g,this.b),t=Math.round(360*e.h),n=Math.round(100*e.s),e=Math.round(100*e.l);return 1===this.a?"hsl(".concat(t,", ").concat(n,"%, ").concat(e,"%)"):"hsla(".concat(t,", ").concat(n,"%, ").concat(e,"%, ").concat(this.roundA,")")},s.prototype.toHex=function(e){return rgbToHex(this.r,this.g,this.b,e=void 0===e?!1:e)},s.prototype.toHexString=function(e){return"#"+this.toHex(e=void 0===e?!1:e)},s.prototype.toHex8=function(e){return rgbaToHex(this.r,this.g,this.b,this.a,e=void 0===e?!1:e)},s.prototype.toHex8String=function(e){return"#"+this.toHex8(e=void 0===e?!1:e)},s.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},s.prototype.toRgbString=function(){var e=Math.round(this.r),t=Math.round(this.g),n=Math.round(this.b);return 1===this.a?"rgb(".concat(e,", ").concat(t,", ").concat(n,")"):"rgba(".concat(e,", ").concat(t,", ").concat(n,", ").concat(this.roundA,")")},s.prototype.toPercentageRgb=function(){function e(e){return"".concat(Math.round(100*bound01(e,255)),"%")}return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}},s.prototype.toPercentageRgbString=function(){function e(e){return Math.round(100*bound01(e,255))}return 1===this.a?"rgb(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%)"):"rgba(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%, ").concat(this.roundA,")")},s.prototype.toName=function(){if(0===this.a)return"transparent";if(this.a<1)return!1;for(var e="#"+rgbToHex(this.r,this.g,this.b,!1),t=0,n=Object.entries(names);t<n.length;t++){var i=n[t],r=i[0];if(e===i[1])return r}return!1},s.prototype.toString=function(e){var t=Boolean(e),n=(e=null!=e?e:this.format,!1),i=this.a<1&&0<=this.a;return t||!i||!e.startsWith("hex")&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),(n="hsv"===e?this.toHsvString():n)||this.toHexString()):"name"===e&&0===this.a?this.toName():this.toRgbString()},s.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},s.prototype.clone=function(){return new s(this.toString())},s.prototype.lighten=function(e){void 0===e&&(e=10);var t=this.toHsl();return t.l+=e/100,t.l=clamp01(t.l),new s(t)},s.prototype.brighten=function(e){void 0===e&&(e=10);var t=this.toRgb();return t.r=Math.max(0,Math.min(255,t.r-Math.round(-e/100*255))),t.g=Math.max(0,Math.min(255,t.g-Math.round(-e/100*255))),t.b=Math.max(0,Math.min(255,t.b-Math.round(-e/100*255))),new s(t)},s.prototype.darken=function(e){void 0===e&&(e=10);var t=this.toHsl();return t.l-=e/100,t.l=clamp01(t.l),new s(t)},s.prototype.tint=function(e){return this.mix("white",e=void 0===e?10:e)},s.prototype.shade=function(e){return this.mix("black",e=void 0===e?10:e)},s.prototype.desaturate=function(e){void 0===e&&(e=10);var t=this.toHsl();return t.s-=e/100,t.s=clamp01(t.s),new s(t)},s.prototype.saturate=function(e){void 0===e&&(e=10);var t=this.toHsl();return t.s+=e/100,t.s=clamp01(t.s),new s(t)},s.prototype.greyscale=function(){return this.desaturate(100)},s.prototype.spin=function(e){var t=this.toHsl(),e=(t.h+e)%360;return t.h=e<0?360+e:e,new s(t)},s.prototype.mix=function(e,t){void 0===t&&(t=50);var n=this.toRgb(),e=new s(e).toRgb(),t=t/100;return new s({r:(e.r-n.r)*t+n.r,g:(e.g-n.g)*t+n.g,b:(e.b-n.b)*t+n.b,a:(e.a-n.a)*t+n.a})},s.prototype.analogous=function(e,t){void 0===e&&(e=6),void 0===t&&(t=30);var n=this.toHsl(),i=360/t,r=[this];for(n.h=(n.h-(i*e>>1)+720)%360;--e;)n.h=(n.h+i)%360,r.push(new s(n));return r},s.prototype.complement=function(){var e=this.toHsl();return e.h=(e.h+180)%360,new s(e)},s.prototype.monochromatic=function(e){void 0===e&&(e=6);for(var t=this.toHsv(),n=t.h,i=t.s,r=t.v,o=[],a=1/e;e--;)o.push(new s({h:n,s:i,v:r})),r=(r+a)%1;return o},s.prototype.splitcomplement=function(){var e=this.toHsl(),t=e.h;return[this,new s({h:(t+72)%360,s:e.s,l:e.l}),new s({h:(t+216)%360,s:e.s,l:e.l})]},s.prototype.onBackground=function(e){var t=this.toRgb(),e=new s(e).toRgb();return new s({r:e.r+(t.r-e.r)*t.a,g:e.g+(t.g-e.g)*t.a,b:e.b+(t.b-e.b)*t.a})},s.prototype.triad=function(){return this.polyad(3)},s.prototype.tetrad=function(){return this.polyad(4)},s.prototype.polyad=function(e){for(var t=this.toHsl(),n=t.h,i=[this],r=360/e,o=1;o<e;o++)i.push(new s({h:(n+o*r)%360,s:t.s,l:t.l}));return i},s.prototype.equals=function(e){return this.toRgbString()===new s(e).toRgbString()},s}(),hueStep=2,saturationStep=.16,saturationStep2=.05,brightnessStep1=.05,brightnessStep2=.15,lightColorCount=5,darkColorCount=4,darkColorMap=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function toHsv(e){e=rgbToHsv(e.r,e.g,e.b);return{h:360*e.h,s:e.s,v:e.v}}function toHex(e){var t=e.r,n=e.g,e=e.b;return"#".concat(rgbToHex(t,n,e,!1))}function mix(e,t,n){n/=100;return{r:(t.r-e.r)*n+e.r,g:(t.g-e.g)*n+e.g,b:(t.b-e.b)*n+e.b}}function getHue(e,t,n){n=60<=Math.round(e.h)&&Math.round(e.h)<=240?n?Math.round(e.h)-hueStep*t:Math.round(e.h)+hueStep*t:n?Math.round(e.h)+hueStep*t:Math.round(e.h)-hueStep*t;return n<0?n+=360:360<=n&&(n-=360),n}function getSaturation(e,t,n){if(0===e.h&&0===e.s)return e.s;e=n?e.s-saturationStep*t:t===darkColorCount?e.s+saturationStep:e.s+saturationStep2*t;return 1<e&&(e=1),(e=n&&t===lightColorCount&&.1<e?.1:e)<.06&&(e=.06),Number(e.toFixed(2))}function getValue(e,t,n){n=n?e.v+brightnessStep1*t:e.v-brightnessStep2*t;return 1<n&&(n=1),Number(n.toFixed(2))}function generate(e){for(var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},i=[],t=inputToRGB(e),r=lightColorCount;0<r;--r){var o=toHsv(t),o=toHex(inputToRGB({h:getHue(o,r,!0),s:getSaturation(o,r,!0),v:getValue(o,r,!0)}));i.push(o)}i.push(toHex(t));for(var a=1;a<=darkColorCount;a+=1){var s=toHsv(t),s=toHex(inputToRGB({h:getHue(s,a),s:getSaturation(s,a),v:getValue(s,a)}));i.push(s)}return"dark"===n.theme?darkColorMap.map(function(e){var t=e.index,e=e.opacity;return toHex(mix(inputToRGB(n.backgroundColor||"#141414"),inputToRGB(i[t]),100*e))}):i}var presetPrimaryColors={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},presetPalettes={},presetDarkPalettes={};Object.keys(presetPrimaryColors).forEach(function(e){presetPalettes[e]=generate(presetPrimaryColors[e]),presetPalettes[e].primary=presetPalettes[e][5],presetDarkPalettes[e]=generate(presetPrimaryColors[e],{theme:"dark",backgroundColor:"#141414"}),presetDarkPalettes[e].primary=presetDarkPalettes[e][5]});const genControlHeight=e=>{e=e.controlHeight;return{controlHeightSM:.75*e,controlHeightXS:.5*e,controlHeightLG:1.25*e}};var genControlHeight$1=genControlHeight;function genSizeMapToken(e){var{sizeUnit:e,sizeStep:t}=e;return{sizeXXL:e*(t+8),sizeXL:e*(t+4),sizeLG:e*(t+2),sizeMD:e*(t+1),sizeMS:e*t,size:e*t,sizeSM:e*(t-1),sizeXS:e*(t-2),sizeXXS:e*(t-3)}}const defaultPresetColors={blue:"#1677ff",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#eb2f96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},seedToken=Object.assign(Object.assign({},defaultPresetColors),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
2
+ 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
3
+ 'Noto Color Emoji'`,fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1});var defaultSeedToken=seedToken;function genColorMapToken(e,t){let{generateColorPalettes:n,generateNeutralColorPalettes:i}=t;var{colorSuccess:t,colorWarning:e,colorError:r,colorInfo:o,colorPrimary:a,colorBgBase:s,colorTextBase:l}=e,a=n(a),t=n(t),e=n(e),r=n(r),o=n(o),s=i(s,l);return Object.assign(Object.assign({},s),{colorPrimaryBg:a[1],colorPrimaryBgHover:a[2],colorPrimaryBorder:a[3],colorPrimaryBorderHover:a[4],colorPrimaryHover:a[5],colorPrimary:a[6],colorPrimaryActive:a[7],colorPrimaryTextHover:a[8],colorPrimaryText:a[9],colorPrimaryTextActive:a[10],colorSuccessBg:t[1],colorSuccessBgHover:t[2],colorSuccessBorder:t[3],colorSuccessBorderHover:t[4],colorSuccessHover:t[4],colorSuccess:t[6],colorSuccessActive:t[7],colorSuccessTextHover:t[8],colorSuccessText:t[9],colorSuccessTextActive:t[10],colorErrorBg:r[1],colorErrorBgHover:r[2],colorErrorBorder:r[3],colorErrorBorderHover:r[4],colorErrorHover:r[5],colorError:r[6],colorErrorActive:r[7],colorErrorTextHover:r[8],colorErrorText:r[9],colorErrorTextActive:r[10],colorWarningBg:e[1],colorWarningBgHover:e[2],colorWarningBorder:e[3],colorWarningBorderHover:e[4],colorWarningHover:e[4],colorWarning:e[6],colorWarningActive:e[7],colorWarningTextHover:e[8],colorWarningText:e[9],colorWarningTextActive:e[10],colorInfoBg:o[1],colorInfoBgHover:o[2],colorInfoBorder:o[3],colorInfoBorderHover:o[4],colorInfoHover:o[4],colorInfo:o[6],colorInfoActive:o[7],colorInfoTextHover:o[8],colorInfoText:o[9],colorInfoTextActive:o[10],colorBgMask:new TinyColor("#000").setAlpha(.45).toRgbString(),colorWhite:"#fff"})}const genRadius=e=>{let t=e,n=e,i=e,r=e;return e<6&&5<=e?t=e+1:e<16&&6<=e?t=e+2:16<=e&&(t=16),e<7&&5<=e?n=4:e<8&&7<=e?n=5:e<14&&8<=e?n=6:e<16&&14<=e?n=7:16<=e&&(n=8),e<6&&2<=e?i=1:6<=e&&(i=2),4<e&&e<8?r=4:8<=e&&(r=6),{borderRadius:16<e?16:e,borderRadiusXS:i,borderRadiusSM:n,borderRadiusLG:t,borderRadiusOuter:r}};var genRadius$1=genRadius;function genCommonMapToken(e){var{motionUnit:e,motionBase:t,borderRadius:n,lineWidth:i}=e;return Object.assign({motionDurationFast:(t+e).toFixed(1)+"s",motionDurationMid:(t+2*e).toFixed(1)+"s",motionDurationSlow:(t+3*e).toFixed(1)+"s",lineWidthBold:i+1},genRadius$1(n))}const getAlphaColor$1=(e,t)=>new TinyColor(e).setAlpha(t).toRgbString(),getSolidColor=(e,t)=>{const n=new TinyColor(e);return n.darken(t).toHexString()},generateColorPalettes=e=>{e=generate(e);return{1:e[0],2:e[1],3:e[2],4:e[3],5:e[4],6:e[5],7:e[6],8:e[4],9:e[5],10:e[6]}},generateNeutralColorPalettes=(e,t)=>{e=e||"#fff",t=t||"#000";return{colorBgBase:e,colorTextBase:t,colorText:getAlphaColor$1(t,.88),colorTextSecondary:getAlphaColor$1(t,.65),colorTextTertiary:getAlphaColor$1(t,.45),colorTextQuaternary:getAlphaColor$1(t,.25),colorFill:getAlphaColor$1(t,.15),colorFillSecondary:getAlphaColor$1(t,.06),colorFillTertiary:getAlphaColor$1(t,.04),colorFillQuaternary:getAlphaColor$1(t,.02),colorBgLayout:getSolidColor(e,4),colorBgContainer:getSolidColor(e,0),colorBgElevated:getSolidColor(e,0),colorBgSpotlight:getAlphaColor$1(t,.85),colorBorder:getSolidColor(e,15),colorBorderSecondary:getSolidColor(e,6)}};function getFontSizes(i){const e=new Array(10).fill(null).map((e,t)=>{var n=i*Math.pow(2.71828,(t-1)/5),t=1<t?Math.floor(n):Math.ceil(n);return 2*Math.floor(t/2)});return e[1]=i,e.map(e=>{return{size:e,lineHeight:(e+8)/e}})}const genFontMapToken=e=>{const t=getFontSizes(e);var e=t.map(e=>e.size),n=t.map(e=>e.lineHeight);return{fontSizeSM:e[0],fontSize:e[1],fontSizeLG:e[2],fontSizeXL:e[3],fontSizeHeading1:e[6],fontSizeHeading2:e[5],fontSizeHeading3:e[4],fontSizeHeading4:e[3],fontSizeHeading5:e[2],lineHeight:n[1],lineHeightLG:n[2],lineHeightSM:n[0],lineHeightHeading1:n[6],lineHeightHeading2:n[5],lineHeightHeading3:n[4],lineHeightHeading4:n[3],lineHeightHeading5:n[2]}};var genFontMapToken$1=genFontMapToken;function derivative(e){var t=Object.keys(defaultPresetColors).map(i=>{const r=generate(e[i]);return new Array(10).fill(1).reduce((e,t,n)=>(e[i+"-"+(n+1)]=r[n],e),{})}).reduce((e,t)=>e=Object.assign(Object.assign({},e),t),{});return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e),t),genColorMapToken(e,{generateColorPalettes:generateColorPalettes,generateNeutralColorPalettes:generateNeutralColorPalettes})),genFontMapToken$1(e.fontSize)),genSizeMapToken(e)),genControlHeight$1(e)),genCommonMapToken(e))}function isStableColor(e){return 0<=e&&e<=255}function getAlphaColor(e,t){var{r:n,g:i,b:r,a:o}=new TinyColor(e).toRgb();if(o<1)return e;var{r:a,g:s,b:l}=new TinyColor(t).toRgb();for(let e=.01;e<=1;e+=.01){var c=Math.round((n-a*(1-e))/e),u=Math.round((i-s*(1-e))/e),d=Math.round((r-l*(1-e))/e);if(isStableColor(c)&&isStableColor(u)&&isStableColor(d))return new TinyColor({r:c,g:u,b:d,a:Math.round(100*e)/100}).toRgbString()}return new TinyColor({r:n,g:i,b:r,a:1}).toRgbString()}var __rest$1=function(e,t){var n={};for(r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function formatToken(e){var t=e["override"],e=__rest$1(e,["override"]);const n=Object.assign({},t);Object.keys(defaultSeedToken).forEach(e=>{delete n[e]});t=Object.assign(Object.assign({},e),n);return Object.assign(Object.assign(Object.assign({},t),{colorLink:t.colorInfoText,colorLinkHover:t.colorInfoHover,colorLinkActive:t.colorInfoActive,colorFillContent:t.colorFillSecondary,colorFillContentHover:t.colorFill,colorFillAlter:t.colorFillQuaternary,colorBgContainerDisabled:t.colorFillTertiary,colorBorderBg:t.colorBgContainer,colorSplit:getAlphaColor(t.colorBorderSecondary,t.colorBgContainer),colorTextPlaceholder:t.colorTextQuaternary,colorTextDisabled:t.colorTextQuaternary,colorTextHeading:t.colorText,colorTextLabel:t.colorTextSecondary,colorTextDescription:t.colorTextTertiary,colorTextLightSolid:t.colorWhite,colorHighlight:t.colorError,colorBgTextHover:t.colorFillSecondary,colorBgTextActive:t.colorFill,colorIcon:t.colorTextTertiary,colorIconHover:t.colorText,colorErrorOutline:getAlphaColor(t.colorErrorBg,t.colorBgContainer),colorWarningOutline:getAlphaColor(t.colorWarningBg,t.colorBgContainer),fontSizeIcon:t.fontSizeSM,lineWidth:t.lineWidth,controlOutlineWidth:2*t.lineWidth,controlInteractiveSize:t.controlHeight/2,controlItemBgHover:t.colorFillTertiary,controlItemBgActive:t.colorPrimaryBg,controlItemBgActiveHover:t.colorPrimaryBgHover,controlItemBgActiveDisabled:t.colorFill,controlTmpOutline:t.colorFillQuaternary,controlOutline:getAlphaColor(t.colorPrimaryBg,t.colorBgContainer),lineType:t.lineType,borderRadius:t.borderRadius,borderRadiusXS:t.borderRadiusXS,borderRadiusSM:t.borderRadiusSM,borderRadiusLG:t.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:t.sizeXXS,paddingXS:t.sizeXS,paddingSM:t.sizeSM,padding:t.size,paddingMD:t.sizeMD,paddingLG:t.sizeLG,paddingXL:t.sizeXL,paddingContentHorizontalLG:t.sizeLG,paddingContentVerticalLG:t.sizeMS,paddingContentHorizontal:t.sizeMS,paddingContentVertical:t.sizeSM,paddingContentHorizontalSM:t.size,paddingContentVerticalSM:t.sizeXS,marginXXS:t.sizeXXS,marginXS:t.sizeXS,marginSM:t.sizeSM,margin:t.size,marginMD:t.sizeMD,marginLG:t.sizeLG,marginXL:t.sizeXL,marginXXL:t.sizeXXL,boxShadow:`
4
+ 0 1px 2px 0 rgba(0, 0, 0, 0.03),
5
+ 0 1px 6px -1px rgba(0, 0, 0, 0.02),
6
+ 0 2px 4px 0 rgba(0, 0, 0, 0.02)
7
+ `,boxShadowSecondary:`
8
+ 0 6px 16px 0 rgba(0, 0, 0, 0.08),
9
+ 0 3px 6px -4px rgba(0, 0, 0, 0.12),
10
+ 0 9px 28px 8px rgba(0, 0, 0, 0.05)
11
+ `,screenXS:480,screenXSMin:480,screenXSMax:575,screenSM:576,screenSMMin:576,screenSMMax:767,screenMD:768,screenMDMin:768,screenMDMax:991,screenLG:992,screenLGMin:992,screenLGMax:1199,screenXL:1200,screenXLMin:1200,screenXLMax:1599,screenXXL:1600,screenXXLMin:1600,boxShadowPopoverArrow:"3px 3px 7px rgba(0, 0, 0, 0.1)",boxShadowCard:`
12
+ 0 1px 2px -2px ${new TinyColor("rgba(0, 0, 0, 0.16)").toRgbString()},
13
+ 0 3px 6px 0 ${new TinyColor("rgba(0, 0, 0, 0.12)").toRgbString()},
14
+ 0 5px 12px 4px ${new TinyColor("rgba(0, 0, 0, 0.09)").toRgbString()}
15
+ `,boxShadowDrawerRight:`
16
+ -6px 0 16px 0 rgba(0, 0, 0, 0.08),
17
+ -3px 0 6px -4px rgba(0, 0, 0, 0.12),
18
+ -9px 0 28px 8px rgba(0, 0, 0, 0.05)
19
+ `,boxShadowDrawerLeft:`
20
+ 6px 0 16px 0 rgba(0, 0, 0, 0.08),
21
+ 3px 0 6px -4px rgba(0, 0, 0, 0.12),
22
+ 9px 0 28px 8px rgba(0, 0, 0, 0.05)
23
+ `,boxShadowDrawerUp:`
24
+ 0 6px 16px 0 rgba(0, 0, 0, 0.08),
25
+ 0 3px 6px -4px rgba(0, 0, 0, 0.12),
26
+ 0 9px 28px 8px rgba(0, 0, 0, 0.05)
27
+ `,boxShadowDrawerDown:`
28
+ 0 -6px 16px 0 rgba(0, 0, 0, 0.08),
29
+ 0 -3px 6px -4px rgba(0, 0, 0, 0.12),
30
+ 0 -9px 28px 8px rgba(0, 0, 0, 0.05)
31
+ `,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),n)}const genLinkStyle=e=>({a:{color:e.colorLink,textDecoration:e.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:"color "+e.motionDurationSlow,"-webkit-text-decoration-skip":"objects","&:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive},"&:active,\n &:hover":{textDecoration:e.linkHoverDecoration,outline:0},"&:focus":{textDecoration:e.linkFocusDecoration,outline:0},"&[disabled]":{color:e.colorTextDisabled,cursor:"not-allowed"}}}),genCommonStyle=(e,t)=>{var{fontFamily:e,fontSize:n}=e,t=`[class^="${t}"], [class*=" ${t}"]`;return{[t]:{fontFamily:e,fontSize:n,boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"},[t]:{boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}}}}},defaultIconPrefixCls="anticon",defaultGetPrefixCls=(e,t)=>t||(e?"ant-"+e:"ant"),ConfigContext=react.exports.createContext({getPrefixCls:defaultGetPrefixCls,iconPrefixCls:defaultIconPrefixCls});function genComponentStyleHook(c,u,d){return r=>{const[e,o,a]=useToken(),{getPrefixCls:t,iconPrefixCls:s}=react.exports.useContext(ConfigContext),l=t();return useStyleRegister({theme:e,token:o,hashId:a,path:["Shared",l]},()=>[{"&":genLinkStyle(o)}]),[useStyleRegister({theme:e,token:o,hashId:a,path:[c,r,s]},()=>{const{token:e,flush:t}=statisticToken(o);var n="function"==typeof d?d(e):d,n=Object.assign(Object.assign({},n),o[c]),i=merge(e,{componentCls:"."+r,prefixCls:r,iconCls:"."+s,antCls:"."+l},n),i=u(i,{hashId:a,prefixCls:r,rootPrefixCls:l,iconPrefixCls:s,overrideComponentToken:o[c]});return t(c,n),[genCommonStyle(o,r),i]}),a]}}const enableStatistic="undefined"!=typeof CSSINJS_STATISTIC;let recording=!0;function merge(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!enableStatistic)return Object.assign.apply(Object,[{}].concat(t));recording=!1;const i={};return t.forEach(t=>{const e=Object.keys(t);e.forEach(e=>{Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:()=>t[e]})})}),recording=!0,i}function noop$1(){}function statisticToken(e){let n,t=e,i=noop$1;return enableStatistic&&(n=new Set,t=new Proxy(e,{get(e,t){return recording&&n.add(t),e[t]}}),i=(e,t)=>{Array.from(n)}),{token:t,keys:n,flush:i}}const defaultTheme=createTheme(derivative),defaultConfig={token:defaultSeedToken,hashed:!0},DesignTokenContext=React.createContext(defaultConfig);function useToken(){var{token:e,hashed:t,theme:n,components:i}=React.useContext(DesignTokenContext),r=version$1+"-"+(t||""),n=n||defaultTheme,[r,e]=useCacheToken(n,[defaultSeedToken,e],{salt:r,override:Object.assign({override:e},i),formatToken:formatToken});return[n,r,t?e:""]}const Empty$2=()=>react.exports.createElement("svg",{width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},react.exports.createElement("g",{fill:"none",fillRule:"evenodd"},react.exports.createElement("g",{transform:"translate(24 31.67)"},react.exports.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),react.exports.createElement("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"}),react.exports.createElement("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"}),react.exports.createElement("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"}),react.exports.createElement("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"})),react.exports.createElement("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"}),react.exports.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},react.exports.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),react.exports.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))));var DefaultEmptyImg=Empty$2;const Simple=()=>{var[,e]=useToken();const{colorFill:t,colorFillTertiary:n,colorFillQuaternary:i,colorBgContainer:r}=e;var{borderColor:e,shadowColor:o,contentColor:a}=react.exports.useMemo(()=>({borderColor:new TinyColor(t).onBackground(r).toHexString(),shadowColor:new TinyColor(n).onBackground(r).toHexString(),contentColor:new TinyColor(i).onBackground(r).toHexString()}),[t,n,i,r]);return react.exports.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},react.exports.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},react.exports.createElement("ellipse",{fill:o,cx:"32",cy:"33",rx:"32",ry:"7"}),react.exports.createElement("g",{fillRule:"nonzero",stroke:e},react.exports.createElement("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),react.exports.createElement("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:a}))))};var SimpleEmptyImg=Simple;const genSharedEmptyStyle=e=>{var{componentCls:t,margin:n,marginXS:i,marginXL:r,fontSize:o,lineHeight:a}=e;return{[t]:{marginInline:i,fontSize:o,lineHeight:a,textAlign:"center",[t+"-image"]:{height:e.emptyImgHeight,marginBottom:i,opacity:e.opacityImage,img:{height:"100%"},svg:{height:"100%",margin:"auto"}},[t+"-footer"]:{marginTop:n},"&-normal":{marginBlock:r,color:e.colorTextDisabled,[t+"-image"]:{height:e.emptyImgHeightMD}},"&-small":{marginBlock:i,color:e.colorTextDisabled,[t+"-image"]:{height:e.emptyImgHeightSM}}}}};var useStyle=genComponentStyleHook("Empty",e=>{var{componentCls:t,controlHeightLG:n}=e,e=merge(e,{emptyImgCls:t+"-img",emptyImgHeight:2.5*n,emptyImgHeightMD:n,emptyImgHeightSM:.875*n});return[genSharedEmptyStyle(e)]}),__rest=function(e,t){var n={};for(r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};const defaultEmptyImg=react.exports.createElement(DefaultEmptyImg,null),simpleEmptyImg=react.exports.createElement(SimpleEmptyImg,null),Empty=e=>{var{className:n,prefixCls:t,image:i=defaultEmptyImg,description:r,children:o,imageStyle:a}=e,s=__rest(e,["className","prefixCls","image","description","children","imageStyle"]);const{getPrefixCls:l,direction:c}=react.exports.useContext(ConfigContext),u=l("empty",t),[d,h]=useStyle(u);return d(react.exports.createElement(LocaleReceiver$1,{componentName:"Empty"},e=>{e=void 0!==r?r:e.description;let t=null;return t="string"==typeof i?react.exports.createElement("img",{alt:"string"==typeof e?e:"empty",src:i}):i,react.exports.createElement("div",Object.assign({className:classNames(h,u,{[u+"-normal"]:i===simpleEmptyImg,[u+"-rtl"]:"rtl"===c},n)},s),react.exports.createElement("div",{className:u+"-image",style:a},t),e&&react.exports.createElement("div",{className:u+"-description"},e),o&&react.exports.createElement("div",{className:u+"-footer"},o))}))};Empty.PRESENTED_IMAGE_DEFAULT=defaultEmptyImg,Empty.PRESENTED_IMAGE_SIMPLE=simpleEmptyImg;var Empty$1=Empty;function _typeof$3(e){return(_typeof$3="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var SVGContainerPropKeys=["viewBox","children"],SVGElementPropKeys=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","type","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","points","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],EventKeys=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],filterProps=function(e,t,n){if(!e||"function"==typeof e||"boolean"==typeof e)return null;var i=e;if(react.exports.isValidElement(e)&&(i=e.props),!isObject_1(i))return null;var r={};return Object.keys(i).forEach(function(e){(SVGElementPropKeys.includes(e)||n&&SVGContainerPropKeys.includes(e)||t&&EventKeys.includes(e))&&(r[e]=i[e])}),r},getEventHandlerOfChild=function(t,n,i){return function(e){return t(n,i,e),null}},adaptEventsOfChild=function(n,i,r){if(!isObject_1(n)||"object"!==_typeof$3(n))return null;var o=null;return Object.keys(n).forEach(function(e){var t=n[e];EventKeys.includes(e)&&"function"==typeof t&&((o=o||{})[e]=getEventHandlerOfChild(t,i,r))}),o};function _extends$2(){return(_extends$2=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,i=arguments[t];for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e}).apply(this,arguments)}function _objectWithoutProperties$1(e,t){if(null==e)return{};var n,i=_objectWithoutPropertiesLoose$1(e,t);if(Object.getOwnPropertySymbols)for(var r=Object.getOwnPropertySymbols(e),o=0;o<r.length;o++)n=r[o],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _objectWithoutPropertiesLoose$1(e,t){if(null==e)return{};for(var n,i={},r=Object.keys(e),o=0;o<r.length;o++)n=r[o],0<=t.indexOf(n)||(i[n]=e[n]);return i}function Surface(e){var t=e.children,n=e.width,i=e.height,r=e.viewBox,o=e.className,a=e.style,s=_objectWithoutProperties$1(e,["children","width","height","viewBox","className","style"]),r=r||{width:n,height:i,x:0,y:0},o=classNames("recharts-surface",o);return React.createElement("svg",_extends$2({},filterProps(s,!0,!0),{className:o,width:n,height:i,style:a,viewBox:"".concat(r.x," ").concat(r.y," ").concat(r.width," ").concat(r.height),version:"1.1"}),React.createElement("title",null,e.title),React.createElement("desc",null,e.desc),t)}var baseIteratee=_baseIteratee,baseUniq=_baseUniq;function uniqBy(e,t){return e&&e.length?baseUniq(e,baseIteratee(t)):[]}var uniqBy_1=uniqBy;const pi$1=Math.PI,tau$1=2*pi$1,epsilon=1e-6,tauEpsilon=tau$1-epsilon;function Path(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function path(){return new Path}function constant(e){return function(){return e}}Path.prototype=path.prototype={constructor:Path,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,i){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+i)},bezierCurveTo:function(e,t,n,i,r,o){this._+="C"+ +e+","+ +t+","+ +n+","+ +i+","+(this._x1=+r)+","+(this._y1=+o)},arcTo:function(e,t,n,i,r){var o,a,s=this._x1,l=this._y1,c=(n=+n)-(e=+e),u=(i=+i)-(t=+t),d=s-e,h=l-t,p=d*d+h*h;if((r=+r)<0)throw new Error("negative radius: "+r);null===this._x1?this._+="M"+(this._x1=e)+","+(this._y1=t):p>epsilon&&(Math.abs(h*c-u*d)>epsilon&&r?(a=c*c+u*u,i=(n=n-s)*n+(s=i-l)*s,l=Math.sqrt(a),o=Math.sqrt(p),p=(a=r*Math.tan((pi$1-Math.acos((a+p-i)/(2*l*o)))/2))/o,i=a/l,Math.abs(p-1)>epsilon&&(this._+="L"+(e+p*d)+","+(t+p*h)),this._+="A"+r+","+r+",0,0,"+ +(d*s<h*n)+","+(this._x1=e+i*c)+","+(this._y1=t+i*u)):this._+="L"+(this._x1=e)+","+(this._y1=t))},arc:function(e,t,n,i,r,o){e=+e,t=+t,o=!!o;var a=(n=+n)*Math.cos(i),s=n*Math.sin(i),l=e+a,c=t+s,u=1^o,o=o?i-r:r-i;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>epsilon||Math.abs(this._y1-c)>epsilon)&&(this._+="L"+l+","+c),n&&((o=o<0?o%tau$1+tau$1:o)>tauEpsilon?this._+="A"+n+","+n+",0,1,"+u+","+(e-a)+","+(t-s)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):o>epsilon&&(this._+="A"+n+","+n+",0,"+ +(o>=pi$1)+","+u+","+(this._x1=e+n*Math.cos(r))+","+(this._y1=t+n*Math.sin(r))))},rect:function(e,t,n,i){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +i+"h"+-n+"Z"},toString:function(){return this._}};var pi=Math.PI,tau=2*pi,symbolCircle={draw:function(e,t){t=Math.sqrt(t/pi);e.moveTo(t,0),e.arc(0,0,t,0,tau)}},symbolCross={draw:function(e,t){t=Math.sqrt(t/5)/2;e.moveTo(-3*t,-t),e.lineTo(-t,-t),e.lineTo(-t,-3*t),e.lineTo(t,-3*t),e.lineTo(t,-t),e.lineTo(3*t,-t),e.lineTo(3*t,t),e.lineTo(t,t),e.lineTo(t,3*t),e.lineTo(-t,3*t),e.lineTo(-t,t),e.lineTo(-3*t,t),e.closePath()}},tan30=Math.sqrt(1/3),tan30_2=2*tan30,symbolDiamond={draw:function(e,t){var t=Math.sqrt(t/tan30_2),n=t*tan30;e.moveTo(0,-t),e.lineTo(n,0),e.lineTo(0,t),e.lineTo(-n,0),e.closePath()}},ka=.8908130915292852,kr=Math.sin(pi/10)/Math.sin(7*pi/10),kx=Math.sin(tau/10)*kr,ky=-Math.cos(tau/10)*kr,symbolStar={draw:function(e,t){var n=Math.sqrt(t*ka),i=kx*n,r=ky*n;e.moveTo(0,-n),e.lineTo(i,r);for(var o=1;o<5;++o){var a=tau*o/5,s=Math.cos(a),a=Math.sin(a);e.lineTo(a*n,-s*n),e.lineTo(s*i-a*r,a*i+s*r)}e.closePath()}},symbolSquare={draw:function(e,t){var t=Math.sqrt(t),n=-t/2;e.rect(n,n,t,t)}},sqrt3=Math.sqrt(3),symbolTriangle={draw:function(e,t){t=-Math.sqrt(t/(3*sqrt3));e.moveTo(0,2*t),e.lineTo(-sqrt3*t,-t),e.lineTo(sqrt3*t,-t),e.closePath()}},c=-.5,s=Math.sqrt(3)/2,k=1/Math.sqrt(12),a=3*(k/2+1),symbolWye={draw:function(e,t){var t=Math.sqrt(t/a),n=t/2,i=t*k,r=n,t=t*k+t,o=-r,l=t;e.moveTo(n,i),e.lineTo(r,t),e.lineTo(o,l),e.lineTo(c*n-s*i,s*n+c*i),e.lineTo(c*r-s*t,s*r+c*t),e.lineTo(c*o-s*l,s*o+c*l),e.lineTo(c*n+s*i,c*i-s*n),e.lineTo(c*r+s*t,c*t-s*r),e.lineTo(c*o+s*l,c*l-s*o),e.closePath()}};function shapeSymbol(t,n){var i=null;function r(){var e;if(i=i||(e=path()),t.apply(this,arguments).draw(i,+n.apply(this,arguments)),e)return i=null,e+""||null}return t="function"==typeof t?t:constant(t||symbolCircle),n="function"==typeof n?n:constant(void 0===n?64:+n),r.type=function(e){return arguments.length?(t="function"==typeof e?e:constant(e),r):t},r.size=function(e){return arguments.length?(n="function"==typeof e?e:constant(+e),r):n},r.context=function(e){return arguments.length?(i=null==e?null:e,r):i},r}function _typeof$2(e){return(_typeof$2="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _extends$1(){return(_extends$1=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,i=arguments[t];for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e}).apply(this,arguments)}function _classCallCheck$2(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$2(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function _createClass$2(e,t,n){return t&&_defineProperties$2(e.prototype,t),n&&_defineProperties$2(e,n),e}function _inherits$2(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$2(e,t)}function _setPrototypeOf$2(e,t){return(_setPrototypeOf$2=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$2(n){var i=_isNativeReflectConstruct$2();return function(){var e,t=_getPrototypeOf$2(n);return _possibleConstructorReturn$2(this,i?(e=_getPrototypeOf$2(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$2(e,t){return!t||"object"!==_typeof$2(t)&&"function"!=typeof t?_assertThisInitialized$2(e):t}function _assertThisInitialized$2(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$2(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$2(e){return(_getPrototypeOf$2=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var symbolFactories={symbolCircle:symbolCircle,symbolCross:symbolCross,symbolDiamond:symbolDiamond,symbolSquare:symbolSquare,symbolStar:symbolStar,symbolTriangle:symbolTriangle,symbolWye:symbolWye},RADIAN=Math.PI/180,getSymbolFactory=function(e){e="symbol".concat(upperFirst_1(e));return symbolFactories[e]||symbolCircle},calculateAreaSize=function(e,t,n){if("area"===t)return e;switch(n){case"cross":return 5*e*e/9;case"diamond":return.5*e*e/Math.sqrt(3);case"square":return e*e;case"star":var i=18*RADIAN;return 1.25*e*e*(Math.tan(i)-Math.tan(2*i)*Math.pow(Math.tan(i),2));case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},Symbols=function(){_inherits$2(t,react.exports.PureComponent);var e=_createSuper$2(t);function t(){return _classCallCheck$2(this,t),e.apply(this,arguments)}return _createClass$2(t,[{key:"getPath",value:function(){var e=this.props,t=e.size,n=e.sizeType,e=e.type,i=getSymbolFactory(e);return shapeSymbol().type(i).size(calculateAreaSize(t,n,e))()}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.cx,i=e.cy,e=e.size;return n===+n&&i===+i&&e===+e?React.createElement("path",_extends$1({},filterProps(this.props,!0),{className:classNames("recharts-symbols",t),transform:"translate(".concat(n,", ").concat(i,")"),d:this.getPath()})):null}}]),t}();function _typeof$1(e){return(_typeof$1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,i=arguments[t];for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e}).apply(this,arguments)}function ownKeys$3(t,e){var n,i=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,n)),i}function _objectSpread$1(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ownKeys$3(Object(n),!0).forEach(function(e){_defineProperty$1(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ownKeys$3(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function _defineProperty$1(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _classCallCheck$1(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties$1(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function _createClass$1(e,t,n){return t&&_defineProperties$1(e.prototype,t),n&&_defineProperties$1(e,n),e}function _inherits$1(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf$1(e,t)}function _setPrototypeOf$1(e,t){return(_setPrototypeOf$1=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper$1(n){var i=_isNativeReflectConstruct$1();return function(){var e,t=_getPrototypeOf$1(n);return _possibleConstructorReturn$1(this,i?(e=_getPrototypeOf$1(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn$1(e,t){return!t||"object"!==_typeof$1(t)&&"function"!=typeof t?_assertThisInitialized$1(e):t}function _assertThisInitialized$1(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct$1(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf$1(e){return(_getPrototypeOf$1=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Symbols.defaultProps={type:"circle",size:64,sizeType:"area"},Symbols.registerSymbol=function(e,t){symbolFactories["symbol".concat(upperFirst_1(e))]=t};var SIZE=32,DefaultLegendContent=function(){_inherits$1(t,react.exports.PureComponent);var e=_createSuper$1(t);function t(){return _classCallCheck$1(this,t),e.apply(this,arguments)}return _createClass$1(t,[{key:"renderIcon",value:function(e){var t=this.props.inactiveColor,n=SIZE/2,i=SIZE/6,r=SIZE/3,t=e.inactive?t:e.color;return"plainline"===e.type?React.createElement("line",{strokeWidth:4,fill:"none",stroke:t,strokeDasharray:e.payload.strokeDasharray,x1:0,y1:n,x2:SIZE,y2:n,className:"recharts-legend-icon"}):"line"===e.type?React.createElement("path",{strokeWidth:4,fill:"none",stroke:t,d:"M0,".concat(n,"h").concat(r,"\n A").concat(i,",").concat(i,",0,1,1,").concat(2*r,",").concat(n,"\n H").concat(SIZE,"M").concat(2*r,",").concat(n,"\n A").concat(i,",").concat(i,",0,1,1,").concat(r,",").concat(n),className:"recharts-legend-icon"}):"rect"===e.type?React.createElement("path",{stroke:"none",fill:t,d:"M0,".concat(SIZE/8,"h").concat(SIZE,"v").concat(3*SIZE/4,"h").concat(-SIZE,"z"),className:"recharts-legend-icon"}):React.isValidElement(e.legendIcon)?(delete(i=_objectSpread$1({},e)).legendIcon,React.cloneElement(e.legendIcon,i)):React.createElement(Symbols,{fill:t,cx:n,cy:n,size:SIZE,sizeType:"diameter",type:e.type})}},{key:"renderItems",value:function(){var o=this,e=this.props,t=e.payload,a=e.iconSize,n=e.layout,s=e.formatter,l=e.inactiveColor,c={x:0,y:0,width:SIZE,height:SIZE},u={display:"horizontal"===n?"inline-block":"block",marginRight:10},d={display:"inline-block",verticalAlign:"middle",marginRight:4};return t.map(function(e,t){var n=e.formatter||s,i=classNames((_defineProperty$1(i={"recharts-legend-item":!0},"legend-item-".concat(t),!0),_defineProperty$1(i,"inactive",e.inactive),i));if("none"===e.type)return null;var r=e.inactive?l:e.color;return React.createElement("li",_extends({className:i,style:u,key:"legend-item-".concat(t)},adaptEventsOfChild(o.props,e,t)),React.createElement(Surface,{width:a,height:a,viewBox:c,style:d},o.renderIcon(e)),React.createElement("span",{className:"recharts-legend-item-text",style:{color:r}},n?n(e.value,e,t):e.value))})}},{key:"render",value:function(){var e=this.props,t=e.payload,n=e.layout,e=e.align;return t&&t.length?React.createElement("ul",{className:"recharts-default-legend",style:{padding:0,margin:0,textAlign:"horizontal"===n?e:"left"}},this.renderItems()):null}}]),t}(),baseGetTag=(DefaultLegendContent.displayName="Legend",DefaultLegendContent.defaultProps={iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"},_baseGetTag),isObjectLike=isObjectLike_1,numberTag="[object Number]";function isNumber$2(e){return"number"==typeof e||isObjectLike(e)&&baseGetTag(e)==numberTag}var isNumber_1=isNumber$2,isNumber$1=isNumber_1;function isNaN$1(e){return isNumber$1(e)&&e!=+e}var _isNaN=isNaN$1,isNumber=function(e){return isNumber_1(e)&&!_isNaN(e)};function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ownKeys$2(t,e){var n,i=Object.keys(t);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(t),e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,n)),i}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ownKeys$2(Object(n),!0).forEach(function(e){_defineProperty(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ownKeys$2(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(n){var i=_isNativeReflectConstruct();return function(){var e,t=_getPrototypeOf(n);return _possibleConstructorReturn(this,i?(e=_getPrototypeOf(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?_assertThisInitialized(e):t}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _objectWithoutProperties(e,t){if(null==e)return{};var n,i=_objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols)for(var r=Object.getOwnPropertySymbols(e),o=0;o<r.length;o++)n=r[o],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n]);return i}function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};for(var n,i={},r=Object.keys(e),o=0;o<r.length;o++)n=r[o],0<=t.indexOf(n)||(i[n]=e[n]);return i}function defaultUniqBy(e){return e.value}function getUniqPayload(e,t){return!0===e?uniqBy_1(t,defaultUniqBy):isFunction_1(e)?uniqBy_1(t,e):t}function renderContent(e,t){if(React.isValidElement(e))return React.cloneElement(e,t);if(isFunction_1(e))return React.createElement(e,t);t.ref;e=_objectWithoutProperties(t,["ref"]);return React.createElement(DefaultLegendContent,e)}var match$6,version,activeXDocument,store,wmget,wmhas,wmset,set,get,has,STATE,IteratorPrototype$2,PrototypeOfArrayIteratorPrototype,arrayIterator,EPS=1,Legend=function(){_inherits(o,react.exports.PureComponent);var r=_createSuper(o);function o(){var e;_classCallCheck(this,o);for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r.call.apply(r,[this].concat(n))).wrapperNode=void 0,e.state={boxWidth:-1,boxHeight:-1},e}return _createClass(o,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){return this.wrapperNode&&this.wrapperNode.getBoundingClientRect?this.wrapperNode.getBoundingClientRect():null}},{key:"getBBoxSnapshot",value:function(){var e=this.state,t=e.boxWidth,e=e.boxHeight;return 0<=t&&0<=e?{width:t,height:e}:null}},{key:"getDefaultPosition",value:function(e){var t,n,i=this.props,r=i.layout,o=i.align,a=i.verticalAlign,s=i.margin,l=i.chartWidth,i=i.chartHeight;return e&&(void 0!==e.left&&null!==e.left||void 0!==e.right&&null!==e.right)||(t="center"===o&&"vertical"===r?{left:((l||0)-(this.getBBoxSnapshot()||{width:0}).width)/2}:"right"===o?{right:s&&s.right||0}:{left:s&&s.left||0}),e&&(void 0!==e.top&&null!==e.top||void 0!==e.bottom&&null!==e.bottom)||(n="middle"===a?{top:((i||0)-(this.getBBoxSnapshot()||{height:0}).height)/2}:"bottom"===a?{bottom:s&&s.bottom||0}:{top:s&&s.top||0}),_objectSpread(_objectSpread({},t),n)}},{key:"updateBBox",value:function(){var e,t=this.state,n=t.boxWidth,t=t.boxHeight,i=this.props.onBBoxUpdate;this.wrapperNode&&this.wrapperNode.getBoundingClientRect?(e=this.wrapperNode.getBoundingClientRect(),(Math.abs(e.width-n)>EPS||Math.abs(e.height-t)>EPS)&&this.setState({boxWidth:e.width,boxHeight:e.height},function(){i&&i(e)})):-1===n&&-1===t||this.setState({boxWidth:-1,boxHeight:-1},function(){i&&i(null)})}},{key:"render",value:function(){var t=this,e=this.props,n=e.content,i=e.width,r=e.height,o=e.wrapperStyle,a=e.payloadUniqBy,e=e.payload,i=_objectSpread(_objectSpread({position:"absolute",width:i||"auto",height:r||"auto"},this.getDefaultPosition(o)),o);return React.createElement("div",{className:"recharts-legend-wrapper",style:i,ref:function(e){t.wrapperNode=e}},renderContent(n,_objectSpread(_objectSpread({},this.props),{},{payload:getUniqPayload(a,e)})))}}],[{key:"getWithHeight",value:function(e,t){var n=e.props.layout;return"vertical"===n&&isNumber(e.props.height)?{height:e.props.height}:"horizontal"===n?{width:e.props.width||t}:null}}]),o}(),visData=(Legend.displayName="Legend",Legend.defaultProps={iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"},{exports:{}}),visNetwork=(!function(){var F=visData.exports;function D(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function N(e){return e&&e.Math==Math&&e}function e(e){try{return!!e()}catch(e){return!0}}function t(e){return"function"==typeof e}function L(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}function B(e){return ie(ne(e),8,-1)}function z(e){if(null==e)throw se("Can't call method on "+e);return e}function H(e){return le(ce(e))}function n(e){return"object"==typeof e?null!==e:ue(e)}function W(e){return pe(e)?e:void 0}function V(e,t){return arguments.length<2?W(de[e])||W(he[e]):de[e]&&de[e][t]||he[e]&&he[e][t]}var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==commonjsGlobal$1?commonjsGlobal$1:"undefined"!=typeof self?self:{},U={exports:{}},i=N("object"==typeof globalThis&&globalThis)||N("object"==typeof window&&window)||N("object"==typeof self&&self)||N("object"==typeof i&&i)||function(){return this}()||Function("return this")(),r=!e(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),q=(K=Function.prototype).apply,G=K.call,K="object"==typeof Reflect&&Reflect.apply||(r?G.bind(q):function(){return G.apply(q,arguments)}),o=r,a=(s=Function.prototype).bind,Y=s.call,J=o&&a.bind(Y,Y),s=o?function(e){return e&&J(e)}:function(e){return e&&function(){return Y.apply(e,arguments)}},a={},o=!e(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),X=Function.prototype.call,Q=r?X.bind(X):function(){return X.apply(X,arguments)},Z={},ee={}.propertyIsEnumerable,te=Object.getOwnPropertyDescriptor,l=te&&!ee.call({1:2},1);Z.f=l?function(e){e=te(this,e);return!!e&&e.enumerable}:ee;var ne=(l=s)({}.toString),ie=l("".slice),ee=s,l=e,re=B,oe=i.Object,ae=ee("".split),ee=l(function(){return!oe("z").propertyIsEnumerable(0)})?function(e){return"String"==re(e)?ae(e,""):oe(e)}:oe,se=i.TypeError,le=ee,ce=z,ue=t,de=l={},he=i,pe=t,c=s({}.isPrototypeOf),fe=V("navigator","userAgent")||"",u=fe,ge=i.process,d=i.Deno,ge=ge&&ge.versions||d&&d.version;function ye(e){try{return ke(e)}catch(e){return"Object"}}function me(e){if(je(e))return e;throw Ce(Te(e)+" is not a function")}function ve(e,t){e=e[t];return null==e?void 0:Pe(e)}function be(e,t){var n,i;if("string"===t&&Ie(n=e.toString)&&!Re(i=$e(n,e)))return i;if(Ie(n=e.valueOf)&&!Re(i=$e(n,e)))return i;if("string"!==t&&Ie(n=e.toString)&&!Re(i=$e(n,e)))return i;throw Me("Can't convert object to primitive value")}(d=ge&&ge.v8)&&(h=d.split("."),Ee=0<h[0]&&h[0]<4?1:+(h[0]+h[1])),!Ee&&u&&(!(h=u.match(/Edge\/(\d+)/))||74<=h[1])&&(h=u.match(/Chrome\/(\d+)/))&&(Ee=+h[1]);var xe=ge=Ee,d=e,h=(u=!!Object.getOwnPropertySymbols&&!d(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&xe&&xe<41}))&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,we=V,_e=t,Se=c,Oe=i.Object,Ee=h?function(e){return"symbol"==typeof e}:function(e){var t=we("Symbol");return _e(t)&&Se(t.prototype,Oe(e))},ke=i.String,je=t,Te=ye,Ce=i.TypeError,Pe=me,$e=Q,Ie=t,Re=n,Me=i.TypeError,d={exports:{}},Ae=i,Fe=Object.defineProperty,De=function(t,n){try{Fe(Ae,t,{value:n,configurable:!0,writable:!0})}catch(e){Ae[t]=n}return n},Ne=De=i[y="__core-js_shared__"]||De(y,{});function p(e){return Ge(qe(e))}function Le(e){return"Symbol("+(void 0===e?"":e)+")_"+Ze(++Xe+Qe,36)}function f(e){var t;return tt(ot,e)&&(it||"string"==typeof ot[e])||(t="Symbol."+e,it&&tt(at,e)?ot[e]=at[e]:ot[e]=(rt&&st?st:lt)(t)),ot[e]}function Be(e){e=yt(e,"string");return mt(e)?e:e+""}function ze(e){return bt?vt.createElement(e):{}}function He(e,t){e=Rt[It(e)];return e==At||e!=Mt&&(Pt(t)?Ct(t):!!t)}function We(e,t){return Ft(e),void 0===t?e:Dt?Nt(e,t):function(){return e.apply(t,arguments)}}function Ve(e){if(Lt(e))return e;throw zt(Bt(e)+" is not an object")}function Ue(i){function r(e,t,n){if(this instanceof r){switch(arguments.length){case 0:return new i;case 1:return new i(e);case 2:return new i(e,t)}return new i(e,t,n)}return en(i,this,arguments)}return r.prototype=i.prototype,r}function g(e,t){var n,i,r,o,a,s=e.target,l=e.global,c=e.stat,u=e.proto,d=l?Zt:c?Zt[s]:(Zt[s]||{}).prototype,h=l?an:an[s]||ln(an,s,{})[s],p=h.prototype;for(n in t)o=on(l?n:s+(c?".":"#")+n,e.forced),o=!o&&d&&cn(d,n),r=h[n],o&&(a=e.noTargetGet?(a=rn(d,n))&&a.value:d[n]),i=o&&a?a:t[n],o&&typeof r==typeof i||(o=e.bind&&o?sn(i,Zt):e.wrap&&o?Ue(i):u&&nn(i)?tn(i):i,(e.sham||i&&i.sham||r&&r.sham)&&ln(o,"sham",!0),ln(h,n,o),u&&(cn(an,r=s+"Prototype")||ln(an,r,{}),ln(an[r],n,i),e.real&&p&&!p[n]&&ln(p,n,i)))}(d.exports=function(e,t){return Ne[e]||(Ne[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.21.1",mode:"pure",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.21.1/LICENSE",source:"https://github.com/zloirock/core-js"});var qe=z,Ge=i.Object,Ke=p,Ye=s({}.hasOwnProperty),y=Object.hasOwn||function(e,t){return Ye(Ke(e),t)},Je=s,Xe=0,Qe=Math.random(),Ze=Je(1..toString),Je=i,et=d.exports,tt=y,nt=Le,it=u,rt=h,ot=et("wks"),at=Je.Symbol,st=at&&at.for,lt=rt?at:at&&at.withoutSetter||nt,ct=Q,ut=n,dt=Ee,ht=ve,pt=be,h=f,ft=i.TypeError,gt=h("toPrimitive"),yt=function(e,t){if(!ut(e)||dt(e))return e;var n=ht(e,gt);if(n){if(n=ct(n,e,t=void 0===t?"default":t),!ut(n)||dt(n))return n;throw ft("Can't convert object to primitive value")}return pt(e,t=void 0===t?"number":t)},mt=Ee,et=n,vt=i.document,bt=et(vt)&&et(vt.createElement),xt=ze,Je=!o&&!e(function(){return 7!=Object.defineProperty(xt("div"),"a",{get:function(){return 7}}).a}),wt=Q,_t=Z,St=L,Ot=H,Et=Be,kt=y,jt=Je,Tt=Object.getOwnPropertyDescriptor,Ct=(a.f=o?Tt:function(e,t){if(e=Ot(e),t=Et(t),jt)try{return Tt(e,t)}catch(e){}if(kt(e,t))return St(!wt(_t.f,e,t),e[t])},e),Pt=t,$t=/#|\.prototype\./,It=He.normalize=function(e){return String(e).replace($t,".").toLowerCase()},Rt=He.data={},Mt=He.NATIVE="N",At=He.POLYFILL="P",nt=He,Ft=me,Dt=r,Nt=s(s.bind),h={},et=o&&e(function(){return 42!=Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),Lt=n,Bt=i.String,zt=i.TypeError,Ht=Je,Wt=Ve,Vt=Be,Ut=i.TypeError,qt=Object.defineProperty,Gt=Object.getOwnPropertyDescriptor,Kt="enumerable",Yt="configurable",Jt="writable",Je=(h.f=o?et?function(e,t,n){var i;return Wt(e),t=Vt(t),Wt(n),"function"==typeof e&&"prototype"===t&&"value"in n&&Jt in n&&!n[Jt]&&((i=Gt(e,t))&&i[Jt]&&(e[t]=n.value,n={configurable:(Yt in n?n:i)[Yt],enumerable:(Kt in n?n:i)[Kt],writable:!1})),qt(e,t,n)}:qt:function(e,t,n){if(Wt(e),t=Vt(t),Wt(n),Ht)try{return qt(e,t,n)}catch(e){}if("get"in n||"set"in n)throw Ut("Accessors not supported");return"value"in n&&(e[t]=n.value),e},o),Xt=h,Qt=L,Je=Je?function(e,t,n){return Xt.f(e,t,Qt(1,n))}:function(e,t,n){return e[t]=n,e},Zt=i,en=K,tn=s,nn=t,rn=a.f,on=nt,an=l,sn=We,ln=Je,cn=y,nt=g,un=h.f,dn=(nt({target:"Object",stat:!0,forced:Object.defineProperty!==un,sham:!o},{defineProperty:un}),l.Object),nt=U.exports=function(e,t,n){return dn.defineProperty(e,t,n)};dn.defineProperty.sham&&(nt.sham=!0);var hn=un=U.exports;function pn(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),hn(e,i.key,i)}}function fn(e,t,n){t&&pn(e.prototype,t),n&&pn(e,n),hn(e,"prototype",{writable:!1})}function m(e,t,n){return t in e?hn(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gn(e,t,n){if(!_n(jn,t)){for(var i=[],r=0;r<t;r++)i[r]="a["+r+"]";jn[t]=On("C,a","return new C("+kn(i,",")+")")}return jn[t](e,n)}function v(e){return Tn[e+"Prototype"]}function yn(e){e=+e;return e!=e||0==e?0:(0<e?Mn:Rn)(e)}function mn(e){return Dn(e.length)}function vn(c){return function(e,t,n,i){Nn(t);var r=Ln(e),o=Bn(r),a=zn(r),s=c?a-1:0,l=c?-1:1;if(n<2)for(;;){if(s in o){i=o[s],s+=l;break}if(s+=l,c?s<0:a<=s)throw Hn("Reduce of empty array with no initial value")}for(;c?0<=s:s<a;s+=l)s in o&&(i=t(i,o[s],s,r));return i}}function bn(e,t){var n=[][e];return!!n&&Wn(function(){n.call(null,t||function(){return 1},1)})}var nt=s([].slice),U=s,xn=me,wn=n,_n=y,Sn=nt,On=i.Function,En=U([].concat),kn=U([].join),jn={},U=r?On.bind:function(t){var n=xn(this),e=n.prototype,i=Sn(arguments,1),r=function(){var e=En(i,Sn(arguments));return this instanceof r?gn(n,e.length,e):n.apply(t,e)};return wn(e)&&(r.prototype=e),r},Tn=(g({target:"Function",proto:!0,forced:Function.bind!==U},{bind:U}),l),r=v("Function").bind,Cn=c,Pn=r,$n=Function.prototype,In=function(e){var t=e.bind;return e===$n||Cn($n,e)&&t===$n.bind?Pn:t},Rn=Math.ceil,Mn=Math.floor,An=yn,Fn=Math.min,Dn=function(e){return 0<e?Fn(An(e),9007199254740991):0},Nn=me,Ln=p,Bn=ee,zn=mn,Hn=i.TypeError,r={left:vn(!1),right:vn(!0)},Wn=e,b="process"==B(i.process),Vn=g,Un=r.left,r=ge;function qn(e,t){try{return e[t]}catch(e){}}Vn({target:"Array",proto:!0,forced:!bn("reduce")||!b&&79<r&&r<83},{reduce:function(e){var t=arguments.length;return Un(this,e,t,1<t?arguments[1]:void 0)}});var Vn=v("Array").reduce,Gn=c,Kn=Vn,Yn=Array.prototype,Jn=function(e){var t=e.reduce;return e===Yn||Gn(Yn,e)&&t===Yn.reduce?Kn:t},Xn=B,b=Array.isArray||function(e){return"Array"==Xn(e)},Vn=((r={})[f("toStringTag")]="z","[object z]"===String(r)),r=i,x=Vn,Qn=t,Zn=B,ei=f("toStringTag"),ti=r.Object,ni="Arguments"==Zn(function(){return arguments}()),r=x?Zn:function(e){var t;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(t=qn(e=ti(e),ei))?t:ni?Zn(e):"Object"==(t=Zn(e))&&Qn(e.callee)?"Arguments":t},x=t,ii=De,ri=s(Function.toString);function oi(){}function ai(e){if(!hi(e))return!1;try{return yi(oi,gi,e),!0}catch(e){return!1}}function si(e){if(!hi(e))return!1;switch(pi(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return bi||!!vi(mi,fi(e))}catch(e){return!0}}function li(e,t){return new(Ei(e))(0===t?0:t)}function ci(h){var p=1==h,f=2==h,g=3==h,y=4==h,m=6==h,v=7==h,b=5==h||m;return function(e,t,n,i){for(var r,o,a=Ti(e),s=ji(a),l=ki(t,n),c=Ci(s),u=0,t=i||Pi,d=p?t(e,c):f||v?t(e,0):void 0;u<c;u++)if((b||u in s)&&(o=l(r=s[u],u,a),h))if(p)d[u]=o;else if(o)switch(h){case 3:return!0;case 5:return r;case 6:return u;case 2:$i(d,r)}else switch(h){case 4:return!1;case 7:$i(d,r)}return m?-1:g||y?y:d}}function ui(t){return 51<=Ri||!Ii(function(){var e=[];return(e.constructor={})[Mi]=function(){return{foo:1}},1!==e[t](Boolean).foo})}x(ii.inspectSource)||(ii.inspectSource=function(e){return ri(e)});var x=ii.inspectSource,ii=s,di=e,hi=t,pi=r,fi=x,gi=[],yi=V("Reflect","construct"),mi=/^\s*(?:class|function)\b/,vi=ii(mi.exec),bi=!mi.exec(oi),ii=(si.sham=!0,!yi||di(function(){var e;return ai(ai.call)||!ai(Object)||!ai(function(){e=!0})||e})?si:ai),di=i,xi=b,wi=ii,_i=n,Si=f("species"),Oi=di.Array,Ei=function(e){var t;return xi(e)&&(t=e.constructor,(wi(t)&&(t===Oi||xi(t.prototype))||_i(t)&&null===(t=t[Si]))&&(t=void 0)),void 0===t?Oi:t},ki=We,ji=ee,Ti=p,Ci=mn,Pi=li,$i=s([].push),di={forEach:ci(0),map:ci(1),filter:ci(2),some:ci(3),every:ci(4),find:ci(5),findIndex:ci(6),filterReject:ci(7)},Ii=e,Ri=ge,Mi=f("species"),w=g,Ai=di.filter,w=(w({target:"Array",proto:!0,forced:!ui("filter")},{filter:function(e){return Ai(this,e,1<arguments.length?arguments[1]:void 0)}}),v("Array").filter),Fi=c,Di=w,Ni=Array.prototype,S=function(e){var t=e.filter;return e===Ni||Fi(Ni,e)&&t===Ni.filter?Di:t},w=g,Li=di.map;function Bi(e,t,n,i,r,o,a,s){for(var l,c,u=r,d=0,h=!!a&&Gi(a,s);d<i;){if(d in n){if(l=h?h(n[d],d,t):n[d],0<o&&Ui(l))c=qi(l),u=Bi(e,t,l,c,u,o-1)-1;else{if(9007199254740991<=u)throw Ki("Exceed the acceptable array length");e[u]=l}u++}d++}return u}w({target:"Array",proto:!0,forced:!ui("map")},{map:function(e){return Li(this,e,1<arguments.length?arguments[1]:void 0)}});var w=v("Array").map,zi=c,Hi=w,Wi=Array.prototype,Vi=function(e){var t=e.map;return e===Wi||zi(Wi,e)&&t===Wi.map?Hi:t},Ui=b,qi=mn,Gi=We,Ki=i.TypeError,Yi=Bi,Ji=me,Xi=p,Qi=mn,Zi=li,w=(g({target:"Array",proto:!0},{flatMap:function(e){var t,n=Xi(this),i=Qi(n);return Ji(e),(t=Zi(n,0)).length=Yi(t,n,n,i,0,1,e,1<arguments.length?arguments[1]:void 0),t}}),v("Array").flatMap),er=c,tr=w,nr=Array.prototype,ir=function(e){var t=e.flatMap;return e===nr||er(nr,e)&&t===nr.flatMap?tr:t};function rr(e){return new br(e)}function or(e){if("Symbol"===xr(e))throw TypeError("Cannot convert a Symbol value to a string");return wr(e)}function ar(r){return function(e,t){var n,e=Sr(Or(e)),t=_r(t),i=e.length;return t<0||i<=t?r?"":void 0:(n=kr(e,t))<55296||56319<n||t+1===i||(i=kr(e,t+1))<56320||57343<i?r?Er(e,t):n:r?jr(e,t,t+2):i-56320+(n-55296<<10)+65536}}function sr(e){return $r[e]||($r[e]=Pr(e))}function lr(e){return hr(e)?dr(e):ur(e,{})}function cr(t){return function(e){if(Ir(e)&&(e=dr(e)).type===t)return e;throw Nr("Incompatible receiver, "+t+" required")}}var ur,dr,hr,pr,fr,gr,yr,mr,vr=function(){function r(e,t,n){var i;D(this,r),m(this,"_source",void 0),m(this,"_transformers",void 0),m(this,"_target",void 0),m(this,"_listeners",{add:In(i=this._add).call(i,this),remove:In(i=this._remove).call(i,this),update:In(i=this._update).call(i,this)}),this._source=e,this._transformers=t,this._target=n}return fn(r,[{key:"all",value:function(){return this._target.update(this._transformItems(this._source.get())),this}},{key:"start",value:function(){return this._source.on("add",this._listeners.add),this._source.on("remove",this._listeners.remove),this._source.on("update",this._listeners.update),this}},{key:"stop",value:function(){return this._source.off("add",this._listeners.add),this._source.off("remove",this._listeners.remove),this._source.off("update",this._listeners.update),this}},{key:"_transformItems",value:function(e){var t;return Jn(t=this._transformers).call(t,function(e,t){return t(e)},e)}},{key:"_add",value:function(e,t){null!=t&&this._target.add(this._transformItems(this._source.get(t.items)))}},{key:"_update",value:function(e,t){null!=t&&this._target.update(this._transformItems(this._source.get(t.items)))}},{key:"_remove",value:function(e,t){null!=t&&this._target.remove(this._transformItems(t.oldData))}}]),r}(),br=function(){function t(e){D(this,t),m(this,"_source",void 0),m(this,"_transformers",[]),this._source=e}return fn(t,[{key:"filter",value:function(t){return this._transformers.push(function(e){return S(e).call(e,t)}),this}},{key:"map",value:function(t){return this._transformers.push(function(e){return Vi(e).call(e,t)}),this}},{key:"flatMap",value:function(t){return this._transformers.push(function(e){return ir(e).call(e,t)}),this}},{key:"to",value:function(e){return new vr(this._source,this._transformers,e)}}]),t}(),xr=r,wr=i.String,_r=yn,Sr=or,Or=z,Er=(w=s)("".charAt),kr=w("".charCodeAt),jr=w("".slice),w={codeAt:ar(!1),charAt:ar(!0)},Tr=t,Cr=i.WeakMap,Tr=Tr(Cr)&&/native code/.test(x(Cr)),x=d.exports,Pr=Le,$r=x("keys"),x=s,Ir=n,Rr=Je,Mr=y,Ar=sr,Fr=Cr={},Dr="Object already initialized",Nr=i.TypeError,Lr=i.WeakMap;function Br(e,t){e=Wr(e);return e<0?Vr(e+t,0):Ur(e,t)}function zr(s){return function(e,t,n){var i,r=qr(e),o=Kr(r),a=Gr(n,o);if(s&&t!=t){for(;a<o;)if((i=r[a++])!=i)return!0}else for(;a<o;a++)if((s||a in r)&&r[a]===t)return s||a||0;return!s&&-1}}function Hr(e,t){var n,i=Jr(e),r=0,o=[];for(n in i)!Yr(Qr,n)&&Yr(i,n)&&Zr(o,n);for(;t.length>r;)!Yr(i,n=t[r++])||~Xr(o,n)||Zr(o,n);return o}hr=Tr||De.state?(pr=De.state||(De.state=new Lr),fr=x(pr.get),gr=x(pr.has),yr=x(pr.set),ur=function(e,t){if(gr(pr,e))throw new Nr(Dr);return t.facade=e,yr(pr,e,t),t},dr=function(e){return fr(pr,e)||{}},function(e){return gr(pr,e)}):(mr=Ar("state"),Fr[mr]=!0,ur=function(e,t){if(Mr(e,mr))throw new Nr(Dr);return t.facade=e,Rr(e,mr,t),t},dr=function(e){return Mr(e,mr)?e[mr]:{}},function(e){return Mr(e,mr)});var Tr={set:ur,get:dr,has:hr,enforce:lr,getterFor:cr},De=o,Lr=y,x=Function.prototype,Ar=De&&Object.getOwnPropertyDescriptor,Lr={EXISTS:Fr=Lr(x,"name"),PROPER:Fr&&"something"===function(){}.name,CONFIGURABLE:Fr&&(!De||Ar(x,"name").configurable)},Fr={},Wr=yn,Vr=Math.max,Ur=Math.min,qr=H,Gr=Br,Kr=mn,De={includes:zr(!0),indexOf:zr(!1)},Ar=s,Yr=y,Jr=H,Xr=De.indexOf,Qr=Cr,Zr=Ar([].push),eo=Hr,to=x=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ar=Object.keys||function(e){return eo(e,to)},no=h,io=Ve,ro=H,oo=Ar;function ao(){}function so(e){e.write(_o("")),e.close();var t=e.parentWindow.Object;return e=null,t}function lo(){var e=vo("iframe"),t="java"+xo+":";return e.style.display="none",mo.appendChild(e),e.src=String(t),(t=e.contentWindow.document).open(),t.write(_o("document.F=Object")),t.close(),t.F}function co(e,t,n,i){i&&i.enumerable?e[t]=n:Io(e,t,n)}Fr.f=o&&!et?Object.defineProperties:function(e,t){io(e);for(var n,i=ro(t),r=oo(t),o=r.length,a=0;a<o;)no.f(e,n=r[a++],i[n]);return e};var uo,ho,et=V("document","documentElement"),po=Ve,fo=Fr,go=x,yo=Cr,mo=et,vo=ze,bo="prototype",xo="script",wo=sr("IE_PROTO"),_o=function(e){return"<"+xo+">"+e+"</"+xo+">"},So=function(){try{uo=new ActiveXObject("htmlfile")}catch(e){}So="undefined"==typeof document||document.domain&&uo?so(uo):lo();for(var e=go.length;e--;)delete So[bo][go[e]];return So()},et=(yo[wo]=!0,Object.create||function(e,t){var n;return null!==e?(ao[bo]=po(e),n=new ao,ao[bo]=null,n[wo]=e):n=So(),void 0===t?n:fo.f(n,t)}),yo=!e(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),Oo=i,Eo=y,ko=t,jo=p,To=yo,Co=sr("IE_PROTO"),Po=Oo.Object,$o=Po.prototype,Oo=To?Po.getPrototypeOf:function(e){e=jo(e);if(Eo(e,Co))return e[Co];var t=e.constructor;return ko(t)&&e instanceof t?t.prototype:e instanceof Po?$o:null},Io=Je,To=e,Ro=t,Mo=et,_=Oo,Ao=co,Fo=f("iterator"),Do=!1;function No(e,t,n,i){e&&(n=n?e:e.prototype,ea(n,na)||Qo(n,na,{configurable:!0,value:t}),i&&!Xo&&Zo(n,"toString",ta))}function Lo(){return this}function Bo(e,t,n,i){t+=" Iterator";return e.prototype=ra(ia,{next:oa(+!i,n)}),aa(e,t,!1,!0),sa[t]=Lo,e}function zo(){return this}function Ho(e,t,n,i,r,o,a){ya(n,t,i);function s(e){if(e===r&&p)return p;if(!_a&&e in d)return d[e];switch(e){case"keys":case Oa:case Ea:return function(){return new n(this,e)}}return function(){return new n(this)}}var l,c,i=t+" Iterator",u=!1,d=e.prototype,h=d[Sa]||d["@@iterator"]||r&&d[r],p=!_a&&h||s(r),f="Array"==t&&d.entries||h;if(f&&(f=ma(f.call(new e)))!==Object.prototype&&f.next&&(va(f,i,!0,!0),xa[i]=zo),wa&&r==Oa&&h&&h.name!==Oa&&(u=!0,p=function(){return ga(h,this)}),r)if(l={values:s(Oa),keys:o?p:s("keys"),entries:s(Ea)},a)for(c in l)!_a&&!u&&c in d||ba(d,c,l[c]);else fa({target:t,proto:!0,forced:_a||u},l);return a&&d[Sa]!==p&&ba(d,Sa,p,{name:r}),xa[t]=p,l}function Wo(e,t,n){var i,r;Ia(e);try{if(!(i=Ra(e,"return"))){if("throw"===t)throw n;return n}i=$a(i,e)}catch(e){r=!0,i=e}if("throw"===t)throw n;if(r)throw i;return Ia(i),n}function Vo(t,e,n,i){try{return i?e(Ma(n)[0],n[1]):e(n)}catch(e){Aa(t,"throw",e)}}function Uo(e){return void 0!==e&&(Fa.Array===e||Na[Da]===e)}function qo(e,t,n){t=La(t);t in e?Ba.f(e,t,za(0,n)):e[t]=n}function Go(e){if(null!=e)return Wa(e,Ua)||Wa(e,"@@iterator")||Va[Ha(e)]}function Ko(e,t){var n=arguments.length<2?Ja(e):t;if(Ga(n))return Ka(qa(n,e));throw Xa(Ya(e)+" is not iterable")}function Yo(e){var t,n,i,r,o,a,s=es(e),l=is(this),c=arguments.length,u=1<c?arguments[1]:void 0,d=void 0!==u,c=(d&&(u=Qa(u,2<c?arguments[2]:void 0)),ss(s)),h=0;if(!c||this==ls&&ns(c))for(t=rs(s),n=l?new this(t):ls(t);h<t;h++)a=d?u(s[h],h):s[h],os(n,h,a);else for(r=as(s,c),o=r.next,n=l?new this:[];!(i=Za(o,r)).done;h++)a=d?ts(r,u,[i.value,h],!0):i.value,os(n,h,a);return n.length=h,n}[].keys&&("next"in(O=[].keys())?(_=_(_(O)))!==Object.prototype&&(ho=_):Do=!0),ho=null==ho||To(function(){var e={};return ho[Fo].call(e)!==e})?{}:Mo(ho),Ro(ho[Fo])||Ao(ho,Fo,function(){return this});var O={IteratorPrototype:ho,BUGGY_SAFARI_ITERATORS:Do},Jo=r,Xo=Vn,Qo=h.f,Zo=Je,ea=y,ta=Vn?{}.toString:function(){return"[object "+Jo(this)+"]"},na=f("toStringTag"),_={},ia=O.IteratorPrototype,ra=et,oa=L,aa=No,sa=_,la=t,ca=i.String,ua=i.TypeError,da=s,ha=Ve,pa=function(e){if("object"==typeof e||la(e))return e;throw ua("Can't set "+ca(e)+" as a prototype")},To=Object.setPrototypeOf||("__proto__"in{}?function(){var n,i=!1,e={};try{(n=da(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(e,[]),i=e instanceof Array}catch(e){}return function(e,t){return ha(e),pa(t),i?n(e,t):e.__proto__=t,e}}():void 0),fa=g,ga=Q,ya=Bo,ma=Oo,va=No,ba=co,Mo=f,xa=_,wa=Lr.PROPER,_a=O.BUGGY_SAFARI_ITERATORS,Sa=Mo("iterator"),Oa="values",Ea="entries",ka=w.charAt,ja=or,Ao=Ho,Ta="String Iterator",Ca=(Ro=Tr).set,Pa=Ro.getterFor(Ta),$a=(Ao(String,"String",function(e){Ca(this,{type:Ta,string:ja(e),index:0})},function(){var e=Pa(this),t=e.string,n=e.index;return n>=t.length?{value:void 0,done:!0}:(t=ka(t,n),e.index+=t.length,{value:t,done:!1})}),Q),Ia=Ve,Ra=ve,Ma=Ve,Aa=Wo,Fa=_,Da=f("iterator"),Na=Array.prototype,La=Be,Ba=h,za=L,Ha=r,Wa=ve,Va=_,Ua=f("iterator"),qa=Q,Ga=me,Ka=Ve,Ya=ye,Ja=Go,Xa=i.TypeError,Qa=We,Za=Q,es=p,ts=Vo,ns=Uo,is=ii,rs=mn,os=qo,as=Ko,ss=Go,ls=i.Array,cs=f("iterator"),us=!1;try{var ds=0;(As={next:function(){return{done:!!ds++}},return:function(){us=!0}})[cs]=function(){return this},Array.from(As,function(){throw 2})}catch(e){}Do=Yo,g({target:"Array",stat:!0,forced:!function(e){if(void 0||us){var t=!1;try{var n={};n[cs]=function(){return{next:function(){return{done:t=!0}}}},e(n)}catch(e){}return t}}(function(e){Array.from(e)})},{from:Do});var hs=Vn=l.Array.from,ps=H,O=_,Mo=Tr,w=(h.f,Ho),fs="Array Iterator",gs=Mo.set,ys=Mo.getterFor(fs);w(Array,"Array",function(e,t){gs(this,{type:fs,target:ps(e),index:0,kind:t})},function(){var e=ys(this),t=e.target,n=e.kind,i=e.index++;return!t||i>=t.length?{value:e.target=void 0,done:!0}:"keys"==n?{value:i,done:!1}:"values"==n?{value:t[i],done:!1}:{value:[i,t[i]],done:!1}},"values"),O.Arguments=O.Array;var ms,Ro=Go,Ao={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},vs=i,bs=r,xs=Je,ws=_,_s=f("toStringTag");for(ms in Ao){var Ss=vs[ms];(Ss=Ss&&Ss.prototype)&&bs(Ss)!==_s&&xs(Ss,_s,ms),ws[ms]=ws.Array}function Os(e,t,n){for(var i=Ls(e),r=Ns(t,i),o=Ns(void 0===n?i:n,i),a=zs(Hs(o-r,0)),s=0;r<o;r++,s++)Bs(a,s,e[r]);return a.length=s,a}function Es(e){try{return Us(e)}catch(e){return qs(Gs)}}function E(e){var t=Ys.Symbol||(Ys.Symbol={});Js(t,e)||Qs(t,e,{value:Xs.f(e)})}function ks(e,t){var n=ql[e]=pl(Nl);return Ml(n,{type:Il,tag:e,description:t}),tl||(n.description=t),n}function js(e,t,n){e===Fl&&js(Gl,t,n),sl(e);t=ul(t);return sl(n),k(ql,t)?(n.enumerable?(k(e,j)&&e[j][t]&&(e[j][t]=!1),n=pl(n,{enumerable:hl(0,!1)})):(k(e,j)||Hl(e,j,hl(1,{})),e[j][t]=!0),Xl(e,t,n)):Hl(e,t,n)}function Ts(t,e){sl(t);var n=cl(e),e=fl(n).concat(Rs(n));return $l(e,function(e){tl&&!el(Ps,n,e)||js(t,e,n[e])}),t}function Cs(e,t){return void 0===t?pl(e):Ts(pl(e),t)}function Ps(e){var e=ul(e),t=el(Vl,this,e);return!(this===Fl&&k(ql,e)&&!k(Gl,e))&&(!(t||!k(this,e)||!k(ql,e)||k(this,j)&&this[j][e])||t)}function $s(e,t){var n,e=cl(e),t=ul(t);if(e!==Fl||!k(ql,t)||k(Gl,t))return n=zl(e,t),!n||!k(ql,t)||k(e,j)&&e[j][t]||(n.enumerable=!0),n}function Is(e){var e=Wl(cl(e)),t=[];return $l(e,function(e){k(ql,e)||k(Ol,e)||Ul(t,e)}),t}function Rs(e){var t=e===Fl,e=Wl(t?Gl:cl(e)),n=[];return $l(e,function(e){!k(ql,e)||t&&!k(Fl,e)||Ul(n,ql[e])}),n}var Ms=Ro,As={},Fs=Hr,Ds=x.concat("length","prototype"),Do=(As.f=Object.getOwnPropertyNames||function(e){return Fs(e,Ds)},{}),Ns=Br,Ls=mn,Bs=qo,zs=i.Array,Hs=Math.max,Ws=B,Vs=H,Us=As.f,qs=Os,Gs="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Do.f=function(e){return Gs&&"Window"==Ws(e)?Es(e):Us(Vs(e))},(Mo={}).f=Object.getOwnPropertySymbols;(w={}).f=f;var Ks,Ys=l,Js=y,Xs=w,Qs=h.f,O=g,_=i,Ao=V,Zs=K,el=Q,Ro=s,tl=o,x=u,u=e,k=y,nl=b,il=t,rl=n,ol=c,al=Ee,sl=Ve,ll=p,cl=H,ul=Be,dl=or,hl=L,pl=et,fl=Ar,Ee=As,gl=Do,yl=Mo,ml=a,vl=h,bl=Fr,xl=Z,wl=nt,_l=co,d=d.exports,Sl=sr,Ol=Cr,El=Le,kl=f,jl=w,Tl=E,Cl=No,Pl=Tr,$l=di.forEach,j=Sl("hidden"),Il="Symbol",Sl="prototype",Rl=kl("toPrimitive"),Ml=Pl.set,Al=Pl.getterFor(Il),Fl=Object[Sl],Dl=_.Symbol,Nl=Dl&&Dl[Sl],Ll=_.TypeError,Pl=_.QObject,Bl=Ao("JSON","stringify"),zl=ml.f,Hl=vl.f,Wl=gl.f,Vl=xl.f,Ul=Ro([].push),ql=d("symbols"),Gl=d("op-symbols"),Kl=d("string-to-symbol-registry"),Yl=d("symbol-to-string-registry"),_=d("wks"),Jl=!Pl||!Pl[Sl]||!Pl[Sl].findChild,Xl=tl&&u(function(){return 7!=pl(Hl({},"a",{get:function(){return Hl(this,"a",{value:7}).a}})).a})?function(e,t,n){var i=zl(Fl,t);i&&delete Fl[t],Hl(e,t,n),i&&e!==Fl&&Hl(Fl,t,i)}:Hl,Ql=(x||(Nl=(Dl=function(){if(ol(Nl,this))throw Ll("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?dl(arguments[0]):void 0,t=El(e),n=function(e){this===Fl&&el(n,Gl,e),k(this,j)&&k(this[j],t)&&(this[j][t]=!1),Xl(this,t,hl(1,e))};return tl&&Jl&&Xl(Fl,t,{configurable:!0,set:n}),ks(t,e)})[Sl],_l(Nl,"toString",function(){return Al(this).tag}),_l(Dl,"withoutSetter",function(e){return ks(El(e),e)}),xl.f=Ps,vl.f=js,bl.f=Ts,ml.f=$s,Ee.f=gl.f=Is,yl.f=Rs,jl.f=function(e){return ks(kl(e),e)},tl&&Hl(Nl,"description",{configurable:!0,get:function(){return Al(this).description}})),O({global:!0,wrap:!0,forced:!x,sham:!x},{Symbol:Dl}),$l(fl(_),function(e){Tl(e)}),O({target:Il,stat:!0,forced:!x},{for:function(e){e=dl(e);if(k(Kl,e))return Kl[e];var t=Dl(e);return Kl[e]=t,Yl[t]=e,t},keyFor:function(e){if(!al(e))throw Ll(e+" is not a symbol");if(k(Yl,e))return Yl[e]},useSetter:function(){Jl=!0},useSimple:function(){Jl=!1}}),O({target:"Object",stat:!0,forced:!x,sham:!tl},{create:Cs,defineProperty:js,defineProperties:Ts,getOwnPropertyDescriptor:$s}),O({target:"Object",stat:!0,forced:!x},{getOwnPropertyNames:Is,getOwnPropertySymbols:Rs}),O({target:"Object",stat:!0,forced:u(function(){yl.f(1)})},{getOwnPropertySymbols:function(e){return yl.f(ll(e))}}),Bl&&(Ao=!x||u(function(){var e=Dl();return"[null]"!=Bl([e])||"{}"!=Bl({a:e})||"{}"!=Bl(Object(e))}),O({target:"JSON",stat:!0,forced:Ao},{stringify:function(e,t,n){var i=wl(arguments),r=t;if((rl(t)||void 0!==e)&&!al(e))return nl(t)||(t=function(e,t){if(il(r)&&(t=el(r,this,e,t)),!al(t))return t}),i[1]=t,Zs(Bl,null,i)}})),Nl[Rl]||(Ks=Nl.valueOf,_l(Nl,Rl,function(e){return el(Ks,this)})),Cl(Dl,Il),Ol[j]=!0,l.Object.getOwnPropertySymbols),Ro={exports:{}},d=g,Pl=e,Zl=H,ec=a.f,Sl=o,xl=Pl(function(){ec(1)}),tc=(d({target:"Object",stat:!0,forced:!Sl||xl,sham:!Sl},{getOwnPropertyDescriptor:function(e,t){return ec(Zl(e),t)}}),l.Object),vl=Ro.exports=function(e,t){return tc.getOwnPropertyDescriptor(e,t)},nc=(tc.getOwnPropertyDescriptor.sham&&(vl.sham=!0),Ro.exports),bl=V,ic=As,rc=Mo,oc=Ve,ac=s([].concat),sc=ml=bl("Reflect","ownKeys")||function(e){var t=ic.f(oc(e)),n=rc.f;return n?ac(t,n(e)):t},lc=H,cc=a,uc=qo,dc=(g({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(e){for(var t,n,i=lc(e),r=cc.f,o=sc(i),a={},s=0;o.length>s;)void 0!==(n=r(i,t=o[s++]))&&uc(a,t,n);return a}}),l.Object.getOwnPropertyDescriptors),Ee={exports:{}},gl=g,jl=Fr.f,hc=(gl({target:"Object",stat:!0,forced:Object.defineProperties!==jl,sham:!o},{defineProperties:jl}),l.Object),_=Ee.exports=function(e,t){return hc.defineProperties(e,t)},pc=(hc.defineProperties.sham&&(_.sham=!0),Ee.exports),fc=un;g({target:"Array",stat:!0},{isArray:b});var gc=x=l.Array.isArray;function yc(e){if(gc(e))return e}function mc(e){var t;if(bc(e))return t=e[Oc],void 0!==t?t:vc(e)}var u=g,O=i,Ao=e,vc=b,bc=n,xc=p,wc=mn,_c=qo,Sc=li,_l=ui,Cl=ge,Oc=(Rl=f)("isConcatSpreadable"),Ec=9007199254740991,kc="Maximum allowed index exceeded",jc=O.TypeError,Pl=51<=Cl||!Ao(function(){var e=[];return e[Oc]=!1,e.concat()[0]!==e}),d=_l("concat"),Tc=(u({target:"Array",proto:!0,forced:xl=!Pl||!d},{concat:function(e){for(var t,n,i,r=xc(this),o=Sc(r,0),a=0,s=-1,l=arguments.length;s<l;s++)if(mc(i=-1===s?r:arguments[s])){if(n=wc(i),Ec<a+n)throw jc(kc);for(t=0;t<n;t++,a++)t in i&&_c(o,a,i[t])}else{if(Ec<=a)throw jc(kc);_c(o,a++,i)}return o.length=a,o}}),(Sl=E)("asyncIterator"),E("hasInstance"),E("isConcatSpreadable"),E("iterator"),E("match"),E("matchAll"),E("replace"),E("search"),E("species"),E("split"),E("toPrimitive"),E("toStringTag"),E("unscopables"),No(i.JSON,"JSON",!0),Ro=vl=l.Symbol,E("asyncDispose"),E("dispose"),E("matcher"),E("metadata"),E("observable"),E("patternMatch"),E("replaceAll"),Ro);function Cc(e,t){var n=null==e?null:void 0!==Tc&&Ms(e)||e["@@iterator"];if(null!=n){var i,r,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(i=n.next()).done)&&(o.push(i.value),!t||o.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw r}}return o}}var bl=g,a=i,Pc=b,$c=ii,Ic=n,Rc=Br,Mc=mn,Ac=H,Fc=qo,Fr=f,Dc=nt,gl=ui("slice"),Nc=Fr("species"),Lc=a.Array,Bc=Math.max;function zc(e){var t=e.slice;return e===Vc||Hc(Vc,e)&&t===Vc.slice?Wc:t}bl({target:"Array",proto:!0,forced:!gl},{slice:function(e,t){var n,i,r,o=Ac(this),a=Mc(o),s=Rc(e,a),l=Rc(void 0===t?a:t,a);if(Pc(o)&&(n=o.constructor,(n=$c(n)&&(n===Lc||Pc(n.prototype))||Ic(n)&&null===(n=n[Nc])?void 0:n)===Lc||void 0===n))return Dc(o,s,l);for(i=new(void 0===n?Lc:n)(Bc(l-s,0)),r=0;s<l;s++,r++)s in o&&Fc(i,r,o[s]);return i.length=r,i}});var jl=v("Array").slice,Hc=c,Wc=jl,Vc=Array.prototype,Uc=zc,qc=Vn;function Gc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Kc(e,t){if(e){if("string"==typeof e)return Gc(e,t);var n=Uc(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?qc(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Gc(e,t):void 0}}function Yc(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function T(e,t){return yc(e)||Cc(e,t)||Kc(e,t)||Yc()}var Jc=_=w.f("iterator");function Xc(e){return(Xc="function"==typeof Tc&&"symbol"==typeof Jc?function(e){return typeof e}:function(e){return e&&"function"==typeof Tc&&e.constructor===Tc&&e!==Tc.prototype?"symbol":typeof e})(e)}function Qc(e){if(gc(e))return Gc(e)}function Zc(e){if(void 0!==Tc&&null!=Ms(e)||null!=e["@@iterator"])return qc(e)}function eu(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function C(e){return Qc(e)||Zc(e)||Kc(e)||eu()}var tu=vl,Ee=v("Array").concat,nu=c,iu=Ee,ru=Array.prototype,ou=function(e){var t=e.concat;return e===ru||nu(ru,e)&&t===ru.concat?iu:t},au=zc,su=(g({target:"Reflect",stat:!0},{ownKeys:ml}),l.Reflect.ownKeys),P=x,un=g,lu=p,cu=Ar,Rl=e(function(){cu(1)}),uu=(un({target:"Object",stat:!0,forced:Rl},{keys:function(e){return cu(lu(e))}}),l.Object.keys),O=g,Cl=s,du=i.Date,hu=Cl(du.prototype.getTime),pu=(O({target:"Date",stat:!0},{now:function(){return hu(new du)}}),l.Date.now,di.forEach),Ao=bn("forEach")?[].forEach:function(e){return pu(this,e,1<arguments.length?arguments[1]:void 0)},_l=(g({target:"Array",proto:!0,forced:[].forEach!=Ao},{forEach:Ao}),v("Array").forEach),fu=r,gu=y,yu=c,mu=_l,vu=Array.prototype,bu={DOMTokenList:!0,NodeList:!0},xu=function(e){var t=e.forEach;return e===vu||yu(vu,e)&&t===vu.forEach||gu(bu,fu(e))?mu:t},Pl=g,wu=b,_u=s([].reverse),d=[1,2],u=(Pl({target:"Array",proto:!0,forced:String(d)===String(d.reverse())},{reverse:function(){return wu(this)&&(this.length=this.length),_u(this)}}),v("Array").reverse),Su=c,Ou=u,Eu=Array.prototype,ku=function(e){var t=e.reverse;return e===Eu||Su(Eu,e)&&t===Eu.reverse?Ou:t},xl=g,Sl=i,ju=Br,Tu=yn,Cu=mn,Pu=p,$u=li,Iu=qo,Ro=ui("splice"),Ru=Sl.TypeError,Mu=Math.max,Au=Math.min,Fr=(xl({target:"Array",proto:!0,forced:!Ro},{splice:function(e,t){var n,i,r,o,a,s,l=Pu(this),c=Cu(l),u=ju(e,c),d=arguments.length;if(0===d?n=i=0:i=1===d?(n=0,c-u):(n=d-2,Au(Mu(Tu(t),0),c-u)),9007199254740991<c+n-i)throw Ru("Maximum allowed length exceeded");for(r=$u(l,i),o=0;o<i;o++)(a=u+o)in l&&Iu(r,o,l[a]);if(n<(r.length=i)){for(o=u;o<c-i;o++)s=o+n,(a=o+i)in l?l[s]=l[a]:delete l[s];for(o=c;c-i+n<o;o--)delete l[o-1]}else if(i<n)for(o=c-i;u<o;o--)s=o+n-1,(a=o+i-1)in l?l[s]=l[a]:delete l[s];for(o=0;o<n;o++)l[o+u]=arguments[o+2];return l.length=c-i+n,r}}),v("Array").splice),Fu=c,Du=Fr,Nu=Array.prototype,Lu=function(e){var t=e.splice;return e===Nu||Fu(Nu,e)&&t===Nu.splice?Du:t},Bu=o,a=s,zu=Q,bl=e,Hu=Ar,Wu=Mo,Vu=Z,Uu=p,qu=ee,Gu=Object.assign,Ku=Object.defineProperty,Yu=a([].concat),gl=!Gu||bl(function(){if(Bu&&1!==Gu({b:1},Gu(Ku({},"a",{enumerable:!0,get:function(){Ku(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),i="abcdefghijklmnopqrst";return e[n]=7,i.split("").forEach(function(e){t[e]=e}),7!=Gu({},e)[n]||Hu(Gu({},t)).join("")!=i})?function(e,t){for(var n=Uu(e),i=arguments.length,r=1,o=Wu.f,a=Vu.f;r<i;)for(var s,l=qu(arguments[r++]),c=o?Yu(Hu(l),o(l)):Hu(l),u=c.length,d=0;d<u;)s=c[d++],Bu&&!zu(a,l,s)||(n[s]=l[s]);return n}:Gu,Ju=(g({target:"Object",stat:!0,forced:Object.assign!==gl},{assign:gl}),l.Object.assign),jl=g,Xu=De.includes;function Qu(e){if(nd(e))throw id("The method doesn't accept regular expressions");return e}jl({target:"Array",proto:!0},{includes:function(e){return Xu(this,e,1<arguments.length?arguments[1]:void 0)}}),v("Array").includes;var Zu=n,ed=B,td=f("match"),nd=function(e){var t;return Zu(e)&&(void 0!==(t=e[td])?!!t:"RegExp"==ed(e))},id=i.TypeError,rd=f("match"),Vn=g,od=Qu,ad=z,sd=or,w=function(t){var n=/./;try{"/./"[t](n)}catch(e){try{return n[rd]=!1,"/./"[t](n)}catch(e){}}return!1},ld=s("".indexOf),cd=(Vn({target:"String",proto:!0,forced:!w("includes")},{includes:function(e){return!!~ld(sd(ad(this)),sd(od(e)),1<arguments.length?arguments[1]:void 0)}}),v("String").includes,p),ud=Oo,vl=yo;function dd(s){return function(e){for(var t,n=fd(e),i=pd(n),r=i.length,o=0,a=[];o<r;)t=i[o++],hd&&!gd(n,t)||yd(a,s?[t,n[t]]:n[t]);return a}}g({target:"Object",stat:!0,forced:e(function(){ud(1)}),sham:!vl},{getPrototypeOf:function(e){return ud(cd(e))}});var Ee=l.Object.getPrototypeOf,hd=o,pd=Ar,fd=H,gd=(ml=s)(Z.f),yd=ml([].push),md=(dd(!0),dd(!1));function vd(t){return function(e){e=xd(bd(e));return 1&t&&(e=wd(e,_d,"")),e=2&t?wd(e,Sd,""):e}}(x=g)({target:"Object",stat:!0},{values:function(e){return md(e)}}),l.Object.values;var bd=z,xd=or,Rl=un="\t\n\v\f\r                 \u2028\u2029\ufeff",wd=s("".replace),Cl="["+Rl+"]",_d=RegExp("^"+Cl+Cl+"*"),Sd=RegExp(Cl+Cl+"*$"),O={start:vd(1),end:vd(2),trim:vd(3)},Ao=e,_l=s,Od=or,Ed=O.trim,b=un,kd=i.parseInt,jd=(Pl=i.Symbol)&&Pl.iterator,Td=/^[+-]?0x/i,Cd=_l(Td.exec),d=8!==kd(b+"08")||22!==kd(b+"0x16")||jd&&!Ao(function(){kd(Object(jd))})?function(e,t){e=Ed(Od(e));return kd(e,t>>>0||(Cd(Td,e)?16:10))}:kd,u=(g({global:!0,forced:parseInt!=d},{parseInt:d}),g),Sl=s,Pd=De.indexOf,xl=bn,$d=Sl([].indexOf),Id=!!$d&&1/$d([1],1,-0)<0,Ro=xl("indexOf"),Rd=(u({target:"Array",proto:!0,forced:Id||!Ro},{indexOf:function(e){var t=1<arguments.length?arguments[1]:void 0;return Id?$d(this,e,t)||0:Pd(this,e,t)}}),v("Array").indexOf,Lr.PROPER),Md=e,Ad=un,Fr=g,Fd=O.trim;function Dd(e,t){return Ld.create(e,t)}function Nd(e,t,n){var i=Ud(n,t-1),n=Ud(n,t+1);return Vd(Jd,e)&&!Vd(Xd,n)||Vd(Xd,e)&&!Vd(Jd,i)?"\\u"+Kd(qd(e,0),16):e}Fr({target:"String",proto:!0,forced:function(e){return Md(function(){return!!Ad[e]()||"​…᠎"!=="​…᠎"[e]()||Rd&&Ad[e].name!==e})}("trim")},{trim:function(){return Fd(this)}}),v("String").trim,g({target:"Object",stat:!0,sham:!o},{create:et});var Ld=l.Object,Bd=Dd,Mo=g,ee=V,zd=K,a=s,bl=e,Hd=i.Array,Wd=ee("JSON","stringify"),Vd=a(/./.exec),Ud=a("".charAt),qd=a("".charCodeAt),Gd=a("".replace),Kd=a(1..toString),Yd=/[\uD800-\uDFFF]/g,Jd=/^[\uD800-\uDBFF]$/,Xd=/^[\uDC00-\uDFFF]$/,gl=bl(function(){return'"\\udf06\\ud834"'!==Wd("\udf06\ud834")||'"\\udead"'!==Wd("\udead")}),Qd=(Wd&&Mo({target:"JSON",stat:!0,forced:gl},{stringify:function(e,t,n){for(var i=0,r=arguments.length,o=Hd(r);i<r;i++)o[i]=arguments[i];var a=zd(Wd,null,o);return"string"==typeof a?Gd(a,Yd,Nd):a}}),l),Zd=K;function eh(o){return function(e,t){var n=2<ah(arguments.length,1),i=rh(e)?e:sh(e),r=n?oh(arguments,2):void 0;return o(n?function(){ih(i,this,r)}:i,t)}}Qd.JSON||(Qd.JSON={stringify:JSON.stringify});var th=function(e,t,n){return Zd(Qd.JSON.stringify,null,arguments)},nh=i.TypeError,jl=g,Vn=i,ih=K,rh=t,oh=nt,ah=function(e,t){if(e<t)throw nh("Not enough arguments");return e},w=/MSIE .\./.test(fe),sh=Vn.Function,lh=(jl({global:!0,bind:!0,forced:w},{setTimeout:eh(Vn.setTimeout),setInterval:eh(Vn.setInterval)}),l.setTimeout),ch=p,uh=Br,dh=mn;function hh(e){if(e)return ph(e)}function ph(e){for(var t in hh.prototype)e[t]=hh.prototype[t];return e}function fh(){return(fh=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,i=arguments[t];for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e}).apply(this,arguments)}function gh(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}function yh(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}g({target:"Array",proto:!0},{fill:function(e){for(var t=ch(this),n=dh(t),i=arguments.length,r=uh(1<i?arguments[1]:void 0,n),i=2<i?arguments[2]:void 0,o=void 0===i?n:uh(i,n);r<o;)t[r++]=e;return t}}),v("Array").fill,((Oo={exports:{}}).exports=hh).prototype.on=hh.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},hh.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},hh.prototype.off=hh.prototype.removeListener=hh.prototype.removeAllListeners=hh.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,i=this._callbacks["$"+e];if(!i)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var r=0;r<i.length;r++)if((n=i[r])===t||n.fn===t){i.splice(r,1);break}return 0===i.length&&delete this._callbacks["$"+e],this},hh.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],i=1;i<arguments.length;i++)t[i-1]=arguments[i];if(n)for(var i=0,r=(n=n.slice(0)).length;i<r;++i)n[i].apply(this,t);return this},hh.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},hh.prototype.hasListeners=function(e){return!!this.listeners(e).length},yo=Oo.exports,Ty="function"!=typeof Object.assign?function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var i=arguments[n];if(null!=i)for(var r in i)i.hasOwnProperty(r)&&(t[r]=i[r])}return t}:Object.assign;var mh,vh=Ty,bh=["","webkit","Moz","MS","ms","o"],vl="undefined"==typeof document?{style:{}}:document.createElement("div"),xh=Math.round,wh=Math.abs,_h=Date.now;function Sh(e,t){for(var n,i=t[0].toUpperCase()+t.slice(1),r=0;r<bh.length;){if((n=(n=bh[r])?n+i:t)in e)return n;r++}}mh="undefined"==typeof window?{}:window;var Oh=Sh(vl.style,"touchAction"),Eh=void 0!==Oh;function kh(){if(!Eh)return!1;var t={},n=mh.CSS&&mh.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(e){return t[e]=!n||mh.CSS.supports("touch-action",e)}),t}var jh="manipulation",Th="none",Ch="pan-x",Ph="pan-y",$h=kh(),Ar=/mobile|tablet|ip(ad|hone|od)|android/i,Ih="ontouchstart"in mh,Rh=void 0!==Sh(mh,"PointerEvent"),Mh=Ih&&Ar.test(navigator.userAgent),Ah="touch",Z="pen",ml="kinect",$=1,I=4,R=8,Fh=["x","y"],Dh=["clientX","clientY"];function Nh(e,t,n){if(e)if(e.forEach)e.forEach(t,n);else if(void 0!==e.length)for(i=0;i<e.length;)t.call(n,e[i],i,e),i++;else for(var i in e)e.hasOwnProperty(i)&&t.call(n,e[i],i,e)}function Lh(e,t){return"function"==typeof e?e.apply(t&&t[0]||void 0,t):e}function Bh(e,t){return-1<e.indexOf(t)}function zh(e){if(Bh(e,Th))return Th;var t=Bh(e,Ch),n=Bh(e,Ph);return t&&n?Th:t||n?t?Ch:Ph:Bh(e,jh)?jh:"auto"}var Hh=function(){function e(e,t){this.manager=e,this.set(t)}var t=e.prototype;return t.set=function(e){"compute"===e&&(e=this.compute()),Eh&&this.manager.element.style&&$h[e]&&(this.manager.element.style[Oh]=e),this.actions=e.toLowerCase().trim()},t.update=function(){this.set(this.manager.options.touchAction)},t.compute=function(){var t=[];return Nh(this.manager.recognizers,function(e){Lh(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))}),zh(t.join(" "))},t.preventDefaults=function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented)t.preventDefault();else{var i=this.actions,r=Bh(i,Th)&&!$h.none,o=Bh(i,Ph)&&!$h[Ph],i=Bh(i,Ch)&&!$h[Ch];if(r){var a=1===e.pointers.length,s=e.distance<2,e=e.deltaTime<250;if(a&&s&&e)return}if(!i||!o)return r||o&&6&n||i&&24&n?this.preventSrc(t):void 0}},t.preventSrc=function(e){this.manager.session.prevented=!0,e.preventDefault()},e}();function Wh(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function Vh(e){var t=e.length;if(1===t)return{x:xh(e[0].clientX),y:xh(e[0].clientY)};for(var n=0,i=0,r=0;r<t;)n+=e[r].clientX,i+=e[r].clientY,r++;return{x:xh(n/t),y:xh(i/t)}}function Uh(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:xh(e.pointers[n].clientX),clientY:xh(e.pointers[n].clientY)},n++;return{timeStamp:_h(),pointers:t,center:Vh(t),deltaX:e.deltaX,deltaY:e.deltaY}}function qh(e,t,n){var i=t[(n=n||Fh)[0]]-e[n[0]],t=t[n[1]]-e[n[1]];return Math.sqrt(i*i+t*t)}function Gh(e,t,n){var i=t[(n=n||Fh)[0]]-e[n[0]],t=t[n[1]]-e[n[1]];return 180*Math.atan2(t,i)/Math.PI}function Kh(e,t){return e===t?1:wh(e)>=wh(t)?e<0?2:4:t<0?8:16}function Yh(e,t){var n=t.center,i=e.offsetDelta||{},r=e.prevDelta||{},o=e.prevInput||{};t.eventType!==$&&o.eventType!==I||(r=e.prevDelta={x:o.deltaX||0,y:o.deltaY||0},i=e.offsetDelta={x:n.x,y:n.y}),t.deltaX=r.x+(n.x-i.x),t.deltaY=r.y+(n.y-i.y)}function Jh(e,t,n){return{x:t/e||0,y:n/e||0}}function Xh(e,t){return qh(t[0],t[1],Dh)/qh(e[0],e[1],Dh)}function Qh(e,t){return Gh(t[1],t[0],Dh)+Gh(e[1],e[0],Dh)}function Zh(e,t){var n,i,r,o,a=e.lastInterval||t,s=t.timeStamp-a.timeStamp;t.eventType!==R&&(25<s||void 0===a.velocity)?(n=(r=Jh(s,s=t.deltaX-a.deltaX,o=t.deltaY-a.deltaY)).x,i=r.y,r=wh(r.x)>wh(r.y)?r.x:r.y,o=Kh(s,o),e.lastInterval=t):(r=a.velocity,n=a.velocityX,i=a.velocityY,o=a.direction),t.velocity=r,t.velocityX=n,t.velocityY=i,t.direction=o}function ep(e,t){var n=e.session,i=t.pointers,r=i.length,r=(n.firstInput||(n.firstInput=Uh(t)),1<r&&!n.firstMultiple?n.firstMultiple=Uh(t):1===r&&(n.firstMultiple=!1),n.firstInput),o=n.firstMultiple,a=(o||r).center,s=t.center=Vh(i),r=(t.timeStamp=_h(),t.deltaTime=t.timeStamp-r.timeStamp,t.angle=Gh(a,s),t.distance=qh(a,s),Yh(n,t),t.offsetDirection=Kh(t.deltaX,t.deltaY),Jh(t.deltaTime,t.deltaX,t.deltaY)),a=(t.overallVelocityX=r.x,t.overallVelocityY=r.y,t.overallVelocity=wh(r.x)>wh(r.y)?r.x:r.y,t.scale=o?Xh(o.pointers,i):1,t.rotation=o?Qh(o.pointers,i):0,t.maxPointers=!n.prevInput||t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers,Zh(n,t),e.element),s=t.srcEvent,r=s.composedPath?s.composedPath()[0]:s.path?s.path[0]:s.target;Wh(r,a)&&(a=r),t.target=a}function tp(e,t,n){var i=n.pointers.length,r=n.changedPointers.length,o=t&$&&i-r==0,i=t&(I|R)&&i-r==0;n.isFirst=!!o,n.isFinal=!!i,o&&(e.session={}),n.eventType=t,ep(e,n),e.emit("hammer.input",n),e.recognize(n),e.session.prevInput=n}function np(e){return e.trim().split(/\s+/g)}function ip(t,e,n){Nh(np(e),function(e){t.addEventListener(e,n,!1)})}function rp(t,e,n){Nh(np(e),function(e){t.removeEventListener(e,n,!1)})}function op(e){e=e.ownerDocument||e;return e.defaultView||e.parentWindow||window}var ap=function(){function e(t,e){var n=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){Lh(t.options.enable,[t])&&n.handler(e)},this.init()}var t=e.prototype;return t.handler=function(){},t.init=function(){this.evEl&&ip(this.element,this.evEl,this.domHandler),this.evTarget&&ip(this.target,this.evTarget,this.domHandler),this.evWin&&ip(op(this.element),this.evWin,this.domHandler)},t.destroy=function(){this.evEl&&rp(this.element,this.evEl,this.domHandler),this.evTarget&&rp(this.target,this.evTarget,this.domHandler),this.evWin&&rp(op(this.element),this.evWin,this.domHandler)},e}();function sp(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var i=0;i<e.length;){if(n&&e[i][n]==t||!n&&e[i]===t)return i;i++}return-1}var lp={pointerdown:$,pointermove:2,pointerup:I,pointercancel:R,pointerout:R},cp={2:Ah,3:Z,4:"mouse",5:ml},up="pointerdown",dp="pointermove pointerup pointercancel",hp=(mh.MSPointerEvent&&!mh.PointerEvent&&(up="MSPointerDown",dp="MSPointerMove MSPointerUp MSPointerCancel"),function(t){function n(){var e=n.prototype;return e.evEl=up,e.evWin=dp,(e=t.apply(this,arguments)||this).store=e.manager.session.pointerEvents=[],e}return gh(n,t),n.prototype.handler=function(e){var t=this.store,n=!1,i=e.type.toLowerCase().replace("ms",""),i=lp[i],r=cp[e.pointerType]||e.pointerType,o=r===Ah,a=sp(t,e.pointerId,"pointerId");i&$&&(0===e.button||o)?a<0&&(t.push(e),a=t.length-1):i&(I|R)&&(n=!0),a<0||(t[a]=e,this.callback(this.manager,i,{pointers:t,changedPointers:[e],pointerType:r,srcEvent:e}),n&&t.splice(a,1))},n}(ap));function pp(e){return Array.prototype.slice.call(e,0)}function fp(e,n,t){for(var i=[],r=[],o=0;o<e.length;){var a=n?e[o][n]:e[o];sp(r,a)<0&&i.push(e[o]),r[o]=a,o++}return i=t?n?i.sort(function(e,t){return e[n]>t[n]}):i.sort():i}var gp={touchstart:$,touchmove:2,touchend:I,touchcancel:R},yp=function(t){function n(){var e;return n.prototype.evTarget="touchstart touchmove touchend touchcancel",(e=t.apply(this,arguments)||this).targetIds={},e}return gh(n,t),n.prototype.handler=function(e){var t=gp[e.type],n=mp.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:Ah,srcEvent:e})},n}(ap);function mp(e,t){var n,i=pp(e.touches),r=this.targetIds;if(t&(2|$)&&1===i.length)return r[i[0].identifier]=!0,[i,i];var o=pp(e.changedTouches),a=[],s=this.target,l=i.filter(function(e){return Wh(e.target,s)});if(t===$)for(n=0;n<l.length;)r[l[n].identifier]=!0,n++;for(n=0;n<o.length;)r[o[n].identifier]&&a.push(o[n]),t&(I|R)&&delete r[o[n].identifier],n++;return a.length?[fp(l.concat(a),"identifier",!0),a]:void 0}var vp={mousedown:$,mousemove:2,mouseup:I},bp=function(t){function n(){var e=n.prototype;return e.evEl="mousedown",e.evWin="mousemove mouseup",(e=t.apply(this,arguments)||this).pressed=!1,e}return gh(n,t),n.prototype.handler=function(e){var t=vp[e.type];t&$&&0===e.button&&(this.pressed=!0),2&t&&1!==e.which&&(t=I),this.pressed&&(t&I&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:"mouse",srcEvent:e}))},n}(ap),xp=2500,wp=25;function _p(e){var t,n,e=e.changedPointers[0];e.identifier===this.primaryTouch&&(t={x:e.clientX,y:e.clientY},n=this.lastTouches,this.lastTouches.push(t),setTimeout(function(){var e=n.indexOf(t);-1<e&&n.splice(e,1)},xp))}function Sp(e,t){e&$?(this.primaryTouch=t.changedPointers[0].identifier,_p.call(this,t)):e&(I|R)&&_p.call(this,t)}function Op(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,i=0;i<this.lastTouches.length;i++){var r=this.lastTouches[i],o=Math.abs(t-r.x),r=Math.abs(n-r.y);if(o<=wp&&r<=wp)return!0}return!1}var Ep=function(){return function(n){function e(e,t){var o=n.call(this,e,t)||this;return o.handler=function(e,t,n){var i=n.pointerType===Ah,r="mouse"===n.pointerType;if(!(r&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)Sp.call(yh(yh(o)),t,n);else if(r&&Op.call(yh(yh(o)),n))return;o.callback(e,t,n)}},o.touch=new yp(o.manager,o.handler),o.mouse=new bp(o.manager,o.handler),o.primaryTouch=null,o.lastTouches=[],o}return gh(e,n),e.prototype.destroy=function(){this.touch.destroy(),this.mouse.destroy()},e}(ap)}();function kp(e){var t=e.options.inputClass,t=t||(Rh?hp:Mh?yp:Ih?Ep:bp);return new t(e,tp)}function jp(e,t,n){return Array.isArray(e)&&(Nh(e,n[t],n),1)}var Tp=1;function Cp(e,t){t=t.manager;return t?t.get(e):e}function Pp(e){return 16&e?"cancel":8&e?"end":4&e?"move":2&e?"start":""}var $p=function(){function e(e){this.options=fh({enable:!0},e=void 0===e?{}:e),this.id=Tp++,this.manager=null,this.state=1,this.simultaneous={},this.requireFail=[]}var t=e.prototype;return t.set=function(e){return vh(this.options,e),this.manager&&this.manager.touchAction.update(),this},t.recognizeWith=function(e){if(jp(e,"recognizeWith",this))return this;var t=this.simultaneous;return t[(e=Cp(e,this)).id]||(t[e.id]=e).recognizeWith(this),this},t.dropRecognizeWith=function(e){return jp(e,"dropRecognizeWith",this)||(e=Cp(e,this),delete this.simultaneous[e.id]),this},t.requireFailure=function(e){if(jp(e,"requireFailure",this))return this;var t=this.requireFail;return-1===sp(t,e=Cp(e,this))&&(t.push(e),e.requireFailure(this)),this},t.dropRequireFailure=function(e){if(jp(e,"dropRequireFailure",this))return this;e=Cp(e,this);e=sp(this.requireFail,e);return-1<e&&this.requireFail.splice(e,1),this},t.hasRequireFailures=function(){return 0<this.requireFail.length},t.canRecognizeWith=function(e){return!!this.simultaneous[e.id]},t.emit=function(t){var n=this,e=this.state;function i(e){n.manager.emit(e,t)}e<8&&i(n.options.event+Pp(e)),i(n.options.event),t.additionalEvent&&i(t.additionalEvent),8<=e&&i(n.options.event+Pp(e))},t.tryEmit=function(e){if(this.canEmit())return this.emit(e);this.state=32},t.canEmit=function(){for(var e=0;e<this.requireFail.length;){if(!(33&this.requireFail[e].state))return!1;e++}return!0},t.recognize=function(e){e=vh({},e);if(!Lh(this.options.enable,[this,e]))return this.reset(),void(this.state=32);56&this.state&&(this.state=1),this.state=this.process(e),30&this.state&&this.tryEmit(e)},t.process=function(e){},t.getTouchAction=function(){},t.reset=function(){},e}(),Ip=function(t){function e(e){return(e=t.call(this,fh({event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},e=void 0===e?{}:e))||this).pTime=!1,e.pCenter=!1,e._timer=null,e._input=null,e.count=0,e}gh(e,t);var n=e.prototype;return n.getTouchAction=function(){return[jh]},n.process=function(e){var t=this,n=this.options,i=e.pointers.length===n.pointers,r=e.distance<n.threshold,o=e.deltaTime<n.time;if(this.reset(),e.eventType&$&&0===this.count)return this.failTimeout();if(r&&o&&i){if(e.eventType!==I)return this.failTimeout();r=!this.pTime||e.timeStamp-this.pTime<n.interval,o=!this.pCenter||qh(this.pCenter,e.center)<n.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,o&&r?this.count+=1:this.count=1,this._input=e,0==this.count%n.taps)return this.hasRequireFailures()?(this._timer=setTimeout(function(){t.state=8,t.tryEmit()},n.interval),2):8}return 32},n.failTimeout=function(){var e=this;return this._timer=setTimeout(function(){e.state=32},this.options.interval),32},n.reset=function(){clearTimeout(this._timer)},n.emit=function(){8===this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},e}($p),Rp=function(t){function e(e){return t.call(this,fh({pointers:1},e=void 0===e?{}:e))||this}gh(e,t);var n=e.prototype;return n.attrTest=function(e){var t=this.options.pointers;return 0===t||e.pointers.length===t},n.process=function(e){var t=this.state,n=e.eventType,i=6&t,e=this.attrTest(e);return i&&(n&R||!e)?16|t:i||e?n&I?8|t:2&t?4|t:2:32},e}($p);function Mp(e){return 16===e?"down":8===e?"up":2===e?"left":4===e?"right":""}var Ap=function(n){function e(e){return(e=n.call(this,fh({event:"pan",threshold:10,pointers:1,direction:30},e=void 0===e?{}:e))||this).pX=null,e.pY=null,e}gh(e,n);var t=e.prototype;return t.getTouchAction=function(){var e=this.options.direction,t=[];return 6&e&&t.push(Ph),24&e&&t.push(Ch),t},t.directionTest=function(e){var t=this.options,n=!0,i=e.distance,r=e.direction,o=e.deltaX,a=e.deltaY;return r&t.direction||(i=6&t.direction?(r=0===o?1:o<0?2:4,n=o!==this.pX,Math.abs(e.deltaX)):(r=0===a?1:a<0?8:16,n=a!==this.pY,Math.abs(e.deltaY))),e.direction=r,n&&i>t.threshold&&r&t.direction},t.attrTest=function(e){return Rp.prototype.attrTest.call(this,e)&&(2&this.state||!(2&this.state)&&this.directionTest(e))},t.emit=function(e){this.pX=e.deltaX,this.pY=e.deltaY;var t=Mp(e.direction);t&&(e.additionalEvent=this.options.event+t),n.prototype.emit.call(this,e)},e}(Rp),Fp=function(i){function e(e){return i.call(this,fh({event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},e=void 0===e?{}:e))||this}gh(e,i);var t=e.prototype;return t.getTouchAction=function(){return Ap.prototype.getTouchAction.call(this)},t.attrTest=function(e){var t,n=this.options.direction;return 30&n?t=e.overallVelocity:6&n?t=e.overallVelocityX:24&n&&(t=e.overallVelocityY),i.prototype.attrTest.call(this,e)&&n&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers===this.options.pointers&&wh(t)>this.options.velocity&&e.eventType&I},t.emit=function(e){var t=Mp(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)},e}(Rp),Dp=function(n){function e(e){return n.call(this,fh({event:"pinch",threshold:0,pointers:2},e=void 0===e?{}:e))||this}gh(e,n);var t=e.prototype;return t.getTouchAction=function(){return[Th]},t.attrTest=function(e){return n.prototype.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||2&this.state)},t.emit=function(e){var t;1!==e.scale&&(t=e.scale<1?"in":"out",e.additionalEvent=this.options.event+t),n.prototype.emit.call(this,e)},e}(Rp),Np=function(t){function e(e){return t.call(this,fh({event:"rotate",threshold:0,pointers:2},e=void 0===e?{}:e))||this}gh(e,t);var n=e.prototype;return n.getTouchAction=function(){return[Th]},n.attrTest=function(e){return t.prototype.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)},e}(Rp),Lp=function(t){function e(e){return(e=t.call(this,fh({event:"press",pointers:1,time:251,threshold:9},e=void 0===e?{}:e))||this)._timer=null,e._input=null,e}gh(e,t);var n=e.prototype;return n.getTouchAction=function(){return["auto"]},n.process=function(e){var t=this,n=this.options,i=e.pointers.length===n.pointers,r=e.distance<n.threshold,o=e.deltaTime>n.time;if(this._input=e,!r||!i||e.eventType&(I|R)&&!o)this.reset();else if(e.eventType&$)this.reset(),this._timer=setTimeout(function(){t.state=8,t.tryEmit()},n.time);else if(e.eventType&I)return 8;return 32},n.reset=function(){clearTimeout(this._timer)},n.emit=function(e){8===this.state&&(e&&e.eventType&I?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=_h(),this.manager.emit(this.options.event,this._input)))},e}($p),Bp={domEvents:!1,touchAction:"compute",enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},zp=[[Np,{enable:!1}],[Dp,{enable:!1},["rotate"]],[Fp,{direction:6}],[Ap,{direction:6},["swipe"]],[Ip],[Ip,{event:"doubletap",taps:2},["tap"]],[Lp]];function Hp(n,i){var r,o=n.element;o.style&&(Nh(n.options.cssProps,function(e,t){r=Sh(o.style,t),i?(n.oldCssProps[r]=o.style[r],o.style[r]=e):o.style[r]=n.oldCssProps[r]||""}),i||(n.oldCssProps={}))}function Wp(e,t){var n=document.createEvent("Event");n.initEvent(e,!0,!0),(n.gesture=t).target.dispatchEvent(n)}var Vp=function(){function e(e,t){var n=this;this.options=vh({},Bp,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=kp(this),this.touchAction=new Hh(this,this.options.touchAction),Hp(this,!0),Nh(this.options.recognizers,function(e){var t=n.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])},this)}var t=e.prototype;return t.set=function(e){return vh(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},t.stop=function(e){this.session.stopped=e?2:1},t.recognize=function(e){var t=this.session;if(!t.stopped){this.touchAction.preventDefaults(e);for(var n,i=this.recognizers,r=t.curRecognizer,o=((!r||8&r.state)&&(r=t.curRecognizer=null),0);o<i.length;)n=i[o],2===t.stopped||r&&n!==r&&!n.canRecognizeWith(r)?n.reset():n.recognize(e),!r&&14&n.state&&(r=t.curRecognizer=n),o++}},t.get=function(e){if(e instanceof $p)return e;for(var t=this.recognizers,n=0;n<t.length;n++)if(t[n].options.event===e)return t[n];return null},t.add=function(e){if(jp(e,"add",this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),(e.manager=this).touchAction.update(),e},t.remove=function(e){if(jp(e,"remove",this))return this;var t=this.get(e);return e&&-1!==(t=sp(e=this.recognizers,t))&&(e.splice(t,1),this.touchAction.update()),this},t.on=function(e,t){if(void 0===e||void 0===t)return this;var n=this.handlers;return Nh(np(e),function(e){n[e]=n[e]||[],n[e].push(t)}),this},t.off=function(e,t){if(void 0===e)return this;var n=this.handlers;return Nh(np(e),function(e){t?n[e]&&n[e].splice(sp(n[e],t),1):delete n[e]}),this},t.emit=function(e,t){this.options.domEvents&&Wp(e,t);var n=this.handlers[e]&&this.handlers[e].slice();if(n&&n.length){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var i=0;i<n.length;)n[i](t),i++}},t.destroy=function(){this.element&&Hp(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},e}(),Up={touchstart:$,touchmove:2,touchend:I,touchcancel:R},qp=function(t){function n(){var e=n.prototype;return e.evTarget="touchstart",e.evWin="touchstart touchmove touchend touchcancel",(e=t.apply(this,arguments)||this).started=!1,e}return gh(n,t),n.prototype.handler=function(e){var t,n=Up[e.type];n===$&&(this.started=!0),this.started&&(t=Gp.call(this,e,n),n&(I|R)&&t[0].length-t[1].length==0&&(this.started=!1),this.callback(this.manager,n,{pointers:t[0],changedPointers:t[1],pointerType:Ah,srcEvent:e}))},n}(ap);function Gp(e,t){var n=pp(e.touches),e=pp(e.changedTouches);return[n=t&(I|R)?fp(n.concat(e),"identifier",!0):n,e]}function Kp(n,e,t){var i="DEPRECATED METHOD: "+e+"\n"+t+" AT \n";return function(){var e=new Error("get-stack-trace"),e=e&&e.stack?e.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",t=window.console&&(window.console.warn||window.console.log);return t&&t.call(window.console,i,e),n.apply(this,arguments)}}var Yp=Kp(function(e,t,n){for(var i=Object.keys(t),r=0;r<i.length;)n&&void 0!==e[i[r]]||(e[i[r]]=t[i[r]]),r++;return e},"extend","Use `assign`."),Jp=Kp(function(e,t){return Yp(e,t,!0)},"merge","Use `assign`.");function Xp(e,t,n){var t=t.prototype,i=e.prototype=Object.create(t);i.constructor=e,i._super=t,n&&vh(i,n)}function Qp(e,t){return function(){return e.apply(t,arguments)}}function Zp(e,t){var n,i=void 0!==tu&&Ms(e)||e["@@iterator"];if(!i){if(P(e)||(i=ef(e))||t&&e&&"number"==typeof e.length)return i&&(e=i),n=0,{s:t=function(){},n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,a=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return o=e.done,e},e:function(e){a=!0,r=e},f:function(){try{o||null==i.return||i.return()}finally{if(a)throw r}}}}function ef(e,t){if(e){if("string"==typeof e)return tf(e,t);var n=au(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?hs(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?tf(e,t):void 0}}function tf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}x=function(){function e(e,t){return void 0===t&&(t={}),new Vp(e,fh({recognizers:zp.concat()},t))}return e.VERSION="2.0.17-rc",e.DIRECTION_ALL=30,e.DIRECTION_DOWN=16,e.DIRECTION_LEFT=2,e.DIRECTION_RIGHT=4,e.DIRECTION_UP=8,e.DIRECTION_HORIZONTAL=6,e.DIRECTION_VERTICAL=24,e.DIRECTION_NONE=1,e.DIRECTION_DOWN=16,e.INPUT_START=$,e.INPUT_MOVE=2,e.INPUT_END=I,e.INPUT_CANCEL=R,e.STATE_POSSIBLE=1,e.STATE_BEGAN=2,e.STATE_CHANGED=4,e.STATE_ENDED=8,e.STATE_RECOGNIZED=8,e.STATE_CANCELLED=16,e.STATE_FAILED=32,e.Manager=Vp,e.Input=ap,e.TouchAction=Hh,e.TouchInput=yp,e.MouseInput=bp,e.PointerEventInput=hp,e.TouchMouseInput=Ep,e.SingleTouchInput=qp,e.Recognizer=$p,e.AttrRecognizer=Rp,e.Tap=Ip,e.Pan=Ap,e.Swipe=Fp,e.Pinch=Dp,e.Rotate=Np,e.Press=Lp,e.on=ip,e.off=rp,e.each=Nh,e.merge=Jp,e.extend=Yp,e.bindFn=Qp,e.assign=vh,e.inherit=Xp,e.bindFn=Qp,e.prefixed=Sh,e.toArray=pp,e.inArray=sp,e.uniqueArray=fp,e.splitStr=np,e.boolOrFn=Lh,e.hasParent=Wh,e.addEventListeners=ip,e.removeEventListeners=rp,e.defaults=vh({},Bp,{preset:zp}),e}();var nf=tu("DELETE");function rf(e){for(var t,n=arguments.length,i=new Array(1<n?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return of.apply(void 0,ou(t=[{},e]).call(t,i))}function of(){var e=af.apply(void 0,arguments);return lf(e),e}function af(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];if(n.length<2)return n[0];if(2<n.length)return af.apply(void 0,ou(e=[of(n[0],n[1])]).call(e,C(au(n).call(n,2))));var r,o=n[0],a=n[1],s=Zp(su(a));try{for(s.s();!(r=s.n()).done;){var l=r.value;Object.prototype.propertyIsEnumerable.call(a,l)&&(a[l]===nf?delete o[l]:null===o[l]||null===a[l]||"object"!==Xc(o[l])||"object"!==Xc(a[l])||P(o[l])||P(a[l])?o[l]=sf(a[l]):o[l]=af(o[l],a[l]))}}catch(e){s.e(e)}finally{s.f()}return o}function sf(e){return P(e)?Vi(e).call(e,sf):"object"===Xc(e)&&null!==e?af({},e):e}function lf(e){for(var t=0,n=uu(e);t<n.length;t++){var i=n[t];e[i]===nf?delete e[i]:"object"===Xc(e[i])&&null!==e[i]&&lf(e[i])}}function cf(){function e(){}return{on:e,off:e,destroy:e,emit:e,get:function(){return{set:e}}}}var uf="undefined"!=typeof window?window.Hammer||x:cf;function df(t){var n=this,i=(this._cleanupQueue=[],this.active=!1,this._dom={container:t,overlay:document.createElement("div")},this._dom.overlay.classList.add("vis-overlay"),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(function(){n._dom.overlay.parentNode.removeChild(n._dom.overlay)}),uf(this._dom.overlay)),e=(i.on("tap",In(e=this._onTapOverlay).call(e,this)),this._cleanupQueue.push(function(){i.destroy()}),["tap","doubletap","press","pinch","pan","panstart","panmove","panend"]);xu(e).call(e,function(e){i.on(e,function(e){e.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=function(e){hf(e.target,t)||n.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push(function(){document.body.removeEventListener("click",n._onClick)})),this._escListener=function(e){("key"in e?"Escape"===e.key:27===e.keyCode)&&n.deactivate()}}function hf(e,t){for(;e;){if(e===t)return 1;e=e.parentNode}}yo(df.prototype),df.current=null,df.prototype.destroy=function(){this.deactivate();var e,t,n=Zp(ku(e=Lu(e=this._cleanupQueue).call(e,0)).call(e));try{for(n.s();!(t=n.n()).done;)(0,t.value)()}catch(e){n.e(e)}finally{n.f()}},df.prototype.activate=function(){df.current&&df.current.deactivate(),(df.current=this).active=!0,this._dom.overlay.style.display="none",this._dom.container.classList.add("vis-active"),this.emit("change"),this.emit("activate"),document.body.addEventListener("keydown",this._escListener)},df.prototype.deactivate=function(){this.active=!1,this._dom.overlay.style.display="block",this._dom.container.classList.remove("vis-active"),document.body.removeEventListener("keydown",this._escListener),this.emit("change"),this.emit("deactivate")},df.prototype._onTapOverlay=function(e){this.activate(),e.srcEvent.stopPropagation()};var pf=ii,ff=ye,gf=i.TypeError,Rl=g,yf=K,mf=U,vf=function(e){if(pf(e))return e;throw gf(ff(e)+" is not a constructor")},bf=Ve,xf=n,wf=et,Cl=e,_f=V("Reflect","construct"),Sf=Object.prototype,Of=[].push,Ef=Cl(function(){function e(){}return!(_f(function(){},[],e)instanceof e)}),kf=!Cl(function(){_f(function(){})}),jf=(Rl({target:"Reflect",stat:!0,forced:Pl=Ef||kf,sham:Pl},{construct:function(e,t){vf(e),bf(t);var n=arguments.length<3?e:vf(arguments[2]);if(kf&&!Ef)return _f(e,t,n);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var i=[null];return yf(Of,i,t),new(yf(mf,e,i))}i=n.prototype,n=wf(xf(i)?i:Sf),i=yf(e,n,t);return xf(i)?i:n}}),l.Reflect.construct);function Tf(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Cf=Dd,Pf=(g({target:"Object",stat:!0},{setPrototypeOf:To}),l.Object.setPrototypeOf);function $f(e,t){return($f=Pf||function(e,t){return e.__proto__=t,e})(e,t)}function If(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Cf(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),hn(e,"prototype",{writable:!1}),t&&$f(e,t)}function Rf(e,t){if(t&&("object"===Xc(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Tf(e)}var Mf=Ee;function Af(e){return(Af=Pf?Mf:function(e){return e.__proto__||Mf(e)})(e)}b=function(a){var l,e=Object.prototype,c=e.hasOwnProperty,t="function"==typeof Symbol?Symbol:{},i=t.iterator||"@@iterator",n=t.asyncIterator||"@@asyncIterator",r=t.toStringTag||"@@toStringTag";function o(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{o({},"")}catch(e){o=function(e,t,n){return e[t]=n}}function s(e,t,n,i){var r,o,a,s,t=t&&t.prototype instanceof y?t:y,t=Object.create(t.prototype),i=new E(i||[]);return t._invoke=(r=e,o=n,a=i,s=d,function(e,t){if(s===p)throw new Error("Generator is already running");if(s===f){if("throw"===e)throw t;return j()}for(a.method=e,a.arg=t;;){var n=a.delegate;if(n){n=function e(t,n){var i=t.iterator[n.method];if(i===l){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=l,e(t,n),"throw"===n.method))return g;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}i=u(i,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;i=i.arg;if(!i)return n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g;{if(!i.done)return i;n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=l)}n.delegate=null;return g}(n,a);if(n){if(n===g)continue;return n}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(s===d)throw s=f,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);s=p;n=u(r,o,a);if("normal"===n.type){if(s=a.done?f:h,n.arg!==g)return{value:n.arg,done:a.done}}else"throw"===n.type&&(s=f,a.method="throw",a.arg=n.arg)}}),t}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}a.wrap=s;var d="suspendedStart",h="suspendedYield",p="executing",f="completed",g={};function y(){}function m(){}function v(){}var t={},b=(o(t,i,function(){return this}),Object.getPrototypeOf),b=b&&b(b(k([]))),x=(b&&b!==e&&c.call(b,i)&&(t=b),v.prototype=y.prototype=Object.create(t));function w(e){["next","throw","return"].forEach(function(t){o(e,t,function(e){return this._invoke(t,e)})})}function _(a,s){var t;this._invoke=function(n,i){function e(){return new s(function(e,t){!function t(e,n,i,r){var o,e=u(a[e],a,n);if("throw"!==e.type)return(n=(o=e.arg).value)&&"object"==typeof n&&c.call(n,"__await")?s.resolve(n.__await).then(function(e){t("next",e,i,r)},function(e){t("throw",e,i,r)}):s.resolve(n).then(function(e){o.value=e,i(o)},function(e){return t("throw",e,i,r)});r(e.arg)}(n,i,e,t)})}return t=t?t.then(e,e):e()}}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function k(t){if(t){var n,e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return n=-1,(e=function e(){for(;++n<t.length;)if(c.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=l,e.done=!0,e}).next=e}return{next:j}}function j(){return{value:l,done:!0}}return o(x,"constructor",m.prototype=v),o(v,"constructor",m),m.displayName=o(v,r,"GeneratorFunction"),a.isGeneratorFunction=function(e){e="function"==typeof e&&e.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},a.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,o(e,r,"GeneratorFunction")),e.prototype=Object.create(x),e},a.awrap=function(e){return{__await:e}},w(_.prototype),o(_.prototype,n,function(){return this}),a.AsyncIterator=_,a.async=function(e,t,n,i,r){void 0===r&&(r=Promise);var o=new _(s(e,t,n,i),r);return a.isGeneratorFunction(t)?o:o.next().then(function(e){return e.done?e.value:o.next()})},w(x),o(x,r,"Generator"),o(x,i,function(){return this}),o(x,"toString",function(){return"[object Generator]"}),a.keys=function(n){var e,i=[];for(e in n)i.push(e);return i.reverse(),function e(){for(;i.length;){var t=i.pop();if(t in n)return e.value=t,e.done=!1,e}return e.done=!0,e}},a.values=k,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=l,this.done=!1,this.delegate=null,this.method="next",this.arg=l,this.tryEntries.forEach(O),!e)for(var t in this)"t"===t.charAt(0)&&c.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=l)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var i=this;function e(e,t){return o.type="throw",o.arg=n,i.next=e,t&&(i.method="next",i.arg=l),!!t}for(var t=this.tryEntries.length-1;0<=t;--t){var r=this.tryEntries[t],o=r.completion;if("root"===r.tryLoc)return e("end");if(r.tryLoc<=this.prev){var a=c.call(r,"catchLoc"),s=c.call(r,"finallyLoc");if(a&&s){if(this.prev<r.catchLoc)return e(r.catchLoc,!0);if(this.prev<r.finallyLoc)return e(r.finallyLoc)}else if(a){if(this.prev<r.catchLoc)return e(r.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<r.finallyLoc)return e(r.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;0<=n;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&c.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var r=i;break}}var o=(r=r&&("break"===e||"continue"===e)&&r.tryLoc<=t&&t<=r.finallyLoc?null:r)?r.completion:{};return o.type=e,o.arg=t,r?(this.method="next",this.next=r.finallyLoc,g):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),g}},catch:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var n,i,r=this.tryEntries[t];if(r.tryLoc===e)return"throw"===(n=r.completion).type&&(i=n.arg,O(r)),i}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:k(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=l),g}},a}((_l={exports:{}}).exports);try{regeneratorRuntime=b}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=b:Function("r","regeneratorRuntime = r")(b)}function Ff(e){Uf(e,Xf,{value:{objectID:"O"+Qf++,weakData:{}}})}var M=_l.exports,Ao={exports:{}},d=e(function(){var e;"function"==typeof ArrayBuffer&&(e=new ArrayBuffer(8),Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8}))}),De=e,Df=n,Nf=B,Lf=d,Bf=Object.isExtensible,Sl=De(function(){Bf(1)})||Lf?function(e){return!!Df(e)&&((!Lf||"ArrayBuffer"!=Nf(e))&&(!Bf||Bf(e)))}:Bf,xl=!e(function(){return Object.isExtensible(Object.preventExtensions({}))}),zf=g,Hf=s,u=Cr,Wf=n,Vf=y,Uf=h.f,qf=As,Gf=Do,Kf=Sl,Yf=xl,Jf=!1,Xf=Le("meta"),Qf=0,Zf=Ao.exports={enable:function(){Zf.enable=function(){},Jf=!0;var r=qf.f,o=Hf([].splice),e={};e[Xf]=1,r(e).length&&(qf.f=function(e){for(var t=r(e),n=0,i=t.length;n<i;n++)if(t[n]===Xf){o(t,n,1);break}return t},zf({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Gf.f}))},fastKey:function(e,t){if(!Wf(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!Vf(e,Xf)){if(!Kf(e))return"F";if(!t)return"E";Ff(e)}return e[Xf].objectID},getWeakData:function(e,t){if(!Vf(e,Xf)){if(!Kf(e))return!0;if(!t)return!1;Ff(e)}return e[Xf].weakData},onFreeze:function(e){return Yf&&Jf&&Kf(e)&&!Vf(e,Xf)&&Ff(e),e}};function eg(e,t){this.stopped=e,this.result=t}function tg(e,t,n){function i(e){return o&&fg(o,"normal",e),new eg(!0,e)}function r(e){return h?(sg(e),f?g(e[0],e[1],i):g(e[0],e[1])):f?g(e,i):g(e)}var o,a,s,l,c,u,d=n&&n.that,h=!(!n||!n.AS_ENTRIES),p=!(!n||!n.IS_ITERATOR),f=!(!n||!n.INTERRUPTED),g=og(t,d);if(p)o=e;else{if(!(n=pg(e)))throw gg(lg(e)+" is not iterable");if(cg(n)){for(a=0,s=ug(e);a<s;a++)if((l=r(e[a]))&&dg(yg,l))return l;return new eg(!1)}o=hg(e,n)}for(c=o.next;!(u=ag(c,o)).done;){try{l=r(u.value)}catch(e){fg(o,"throw",e)}if("object"==typeof l&&l&&dg(yg,l))return l}return new eg(!1)}function ng(e,t){if(mg(t,e))return e;throw vg("Incorrect invocation")}function ig(n,e,t){var i,o,a,r=-1!==n.indexOf("Map"),s=-1!==n.indexOf("Weak"),l=r?"set":"add",c=xg[n],u=c&&c.prototype,d={};return $g&&kg(c)&&(s||u.forEach&&!_g(function(){(new c).entries().next()}))?(o=(i=e(function(e,t){Ig(Eg(e,o),{type:n,collection:new c}),null!=t&&Og(t,e[l],{that:e,AS_ENTRIES:r})})).prototype,a=Rg(n),Pg(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(i){var r="add"==i||"set"==i;i in u&&(!s||"clear"!=i)&&Sg(o,i,function(e,t){var n=a(this).collection;if(!r&&s&&!jg(e))return"get"==i&&void 0;n=n[i](0===e?0:e,t);return r?this:n})}),s||Cg(o,"size",{configurable:!0,get:function(){return a(this).collection.size}})):(i=t.getConstructor(e,n,r,l),wg.enable()),Tg(i,n,!1,!0),d[n]=i,bg({global:!0,forced:!0},d),s||t.setStrong(i,n,r),i}function rg(e,t,n){for(var i in t)n&&n.unsafe&&e[i]?e[i]=t[i]:Mg(e,i,t[i],n);return e}u[Xf]=!0;var og=We,ag=Q,sg=Ve,lg=ye,cg=Uo,ug=mn,dg=c,hg=Ko,pg=Go,fg=Wo,gg=i.TypeError,yg=eg.prototype,mg=c,vg=i.TypeError,bg=g,xg=i,wg=Ao.exports,_g=e,Sg=Je,Og=tg,Eg=ng,kg=t,jg=n,Tg=No,Cg=h.f,Pg=di.forEach,$g=o,Ig=Tr.set,Rg=Tr.getterFor,Mg=co,Ag=V,Fg=h,Dg=o,Ng=f("species"),Lg=h.f,Bg=et,zg=rg,Hg=We,Wg=ng,Vg=tg,Ug=Ho,qg=function(e){var e=Ag(e),t=Fg.f;Dg&&e&&!e[Ng]&&t(e,Ng,{configurable:!0,get:function(){return this}})},Gg=o,Kg=Ao.exports.fastKey,Yg=Tr.set,Jg=Tr.getterFor,Xg=(ig("Map",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},Ro={getConstructor:function(e,n,i,r){function o(e,t,n){var i,r=l(e),o=a(e,t);return o?o.value=n:(r.last=o={index:i=Kg(t,!0),key:t,value:n,previous:t=r.last,next:void 0,removed:!1},r.first||(r.first=o),t&&(t.next=o),Gg?r.size++:e.size++,"F"!==i&&(r.index[i]=o)),e}function a(e,t){var n,e=l(e),i=Kg(t);if("F"!==i)return e.index[i];for(n=e.first;n;n=n.next)if(n.key==t)return n}var e=e(function(e,t){Wg(e,s),Yg(e,{type:n,index:Bg(null),first:void 0,last:void 0,size:0}),Gg||(e.size=0),null!=t&&Vg(t,e[r],{that:e,AS_ENTRIES:i})}),s=e.prototype,l=Jg(n);return zg(s,{clear:function(){for(var e=l(this),t=e.index,n=e.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete t[n.index],n=n.next;e.first=e.last=void 0,Gg?e.size=0:this.size=0},delete:function(e){var t,n,i=l(this),e=a(this,e);return e&&(t=e.next,n=e.previous,delete i.index[e.index],e.removed=!0,n&&(n.next=t),t&&(t.previous=n),i.first==e&&(i.first=t),i.last==e&&(i.last=n),Gg?i.size--:this.size--),!!e},forEach:function(e){for(var t,n=l(this),i=Hg(e,1<arguments.length?arguments[1]:void 0);t=t?t.next:n.first;)for(i(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!a(this,e)}}),zg(s,i?{get:function(e){e=a(this,e);return e&&e.value},set:function(e,t){return o(this,0===e?0:e,t)}}:{add:function(e){return o(this,e=0===e?0:e,e)}}),Gg&&Lg(s,"size",{get:function(){return l(this).size}}),e},setStrong:function(e,t,n){var i=t+" Iterator",r=Jg(t),o=Jg(i);Ug(e,t,function(e,t){Yg(this,{type:i,target:e,state:r(e),kind:t,last:void 0})},function(){for(var e=o(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?"keys"==t?{value:n.key,done:!1}:"values"==t?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:{value:e.target=void 0,done:!0}},n?"entries":"values",!n,!0),qg(t)}}),l.Map),Lr=g,Qg=di.some;function Zg(e,t){var n=e.length,i=gy(n/2);return n<8?ey(e,t):ty(e,Zg(fy(e,0,i),t),Zg(fy(e,i),t),t)}function ey(e,t){for(var n,i,r=e.length,o=1;o<r;){for(n=e[i=o];i&&0<t(e[i-1],n);)e[i]=e[--i];i!==o++&&(e[i]=n)}return e}function ty(e,t,n,i){for(var r=t.length,o=n.length,a=0,s=0;a<r||s<o;)e[a+s]=a<r&&s<o?i(t[a],n[s])<=0?t[a++]:n[s++]:a<r?t[a++]:n[s++];return e}function ny(n){return function(e,t){return void 0===t?-1:void 0===e?1:void 0!==n?+n(e,t)||0:by(e)>by(t)?1:-1}}Lr({target:"Array",proto:!0,forced:!bn("some")},{some:function(e){return Qg(this,e,1<arguments.length?arguments[1]:void 0)}});var un=v("Array").some,iy=c,ry=un,oy=Array.prototype,ay=function(e){var t=e.some;return e===oy||iy(oy,e)&&t===oy.some?ry:t},O=v("Array").keys,sy=r,ly=y,cy=c,uy=O,dy=Array.prototype,hy={DOMTokenList:!0,NodeList:!0},py=function(e){var t=e.keys;return e===dy||cy(dy,e)&&t===dy.keys||ly(hy,sy(e))?uy:t},fy=Os,gy=Math.floor,Fr=Zg,a=!!(ee=fe.match(/firefox\/(\d+)/i))&&+ee[1],bl=/MSIE|Trident/.test(fe),gl=!!(Mo=fe.match(/AppleWebKit\/(\d+)\./))&&+Mo[1],nt=g,yy=me,my=p,vy=mn,by=or,w=e,xy=Fr,Vn=bn,wy=a,_y=bl,Sy=ge,Oy=gl,Ey=[],ky=(jl=s)(Ey.sort),jy=jl(Ey.push),Oo=w(function(){Ey.sort(void 0)}),Ty=w(function(){Ey.sort(null)}),vl=Vn("sort"),Cy=!w(function(){if(Sy)return Sy<70;if(!(wy&&3<wy)){if(_y)return!0;if(Oy)return Oy<603;for(var e,t,n,i="",r=65;r<76;r++){switch(e=String.fromCharCode(r),r){case 66:case 69:case 70:case 72:t=3;break;case 68:case 71:t=4;break;default:t=2}for(n=0;n<47;n++)Ey.push({k:e+n,v:t})}for(Ey.sort(function(e,t){return t.v-e.v}),n=0;n<Ey.length;n++)e=Ey[n].k.charAt(0),i.charAt(i.length-1)!==e&&(i+=e);return"DGBEFHACIJK"!==i}});nt({target:"Array",proto:!0,forced:Oo||!Ty||!vl||!Cy},{sort:function(e){void 0!==e&&yy(e);var t=my(this);if(Cy)return void 0===e?ky(t):ky(t,e);for(var n,i=[],r=vy(t),o=0;o<r;o++)o in t&&jy(i,t[o]);for(xy(i,ny(e)),n=i.length,o=0;o<n;)t[o]=i[o++];for(;o<r;)delete t[o++];return t}});var Py,Ar=v("Array").sort,$y=c,Iy=Ar,Ry=Array.prototype,My=function(e){var t=e.sort;return e===Ry||$y(Ry,e)&&t===Ry.sort?Iy:t},Z=v("Array").values,Ay=r,Fy=y,Dy=c,Ny=Z,Ly=Array.prototype,By={DOMTokenList:!0,NodeList:!0},zy=function(e){var t=e.values;return e===Ly||Dy(Ly,e)&&t===Ly.values||Fy(By,Ay(e))?Ny:t},Hy=_,ml=v("Array").entries,Wy=r,Vy=y,Uy=c,qy=ml,Gy=Array.prototype,Ky={DOMTokenList:!0,NodeList:!0},Yy=function(e){var t=e.entries;return e===Gy||Uy(Gy,e)&&t===Gy.entries||Vy(Ky,Wy(e))?qy:t},Jy=new Uint8Array(16);function Xy(){if(Py=Py||"undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto))return Py(Jy);throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported")}var Qy=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Zy(e){return"string"==typeof e&&Qy.test(e)}for(var A=[],em=0;em<256;++em)A.push((em+256).toString(16).substr(1));function tm(e,t){var n=1<arguments.length&&void 0!==t?t:0,n=(A[e[n+0]]+A[e[n+1]]+A[e[n+2]]+A[e[n+3]]+"-"+A[e[n+4]]+A[e[n+5]]+"-"+A[e[n+6]]+A[e[n+7]]+"-"+A[e[n+8]]+A[e[n+9]]+"-"+A[e[n+10]]+A[e[n+11]]+A[e[n+12]]+A[e[n+13]]+A[e[n+14]]+A[e[n+15]]).toLowerCase();if(Zy(n))return n;throw TypeError("Stringified UUID is invalid")}function nm(e,t,n){var i=(e=e||{}).random||(e.rng||Xy)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){n=n||0;for(var r=0;r<16;++r)t[n+r]=i[r];return t}return tm(i)}function im(e){return"string"==typeof e||"number"==typeof e}var rm=function(){function a(e){D(this,a),m(this,"delay",void 0),m(this,"max",void 0),m(this,"_queue",[]),m(this,"_timeout",null),m(this,"_extended",null),this.delay=null,this.max=1/0,this.setOptions(e)}return fn(a,[{key:"setOptions",value:function(e){e&&void 0!==e.delay&&(this.delay=e.delay),e&&void 0!==e.max&&(this.max=e.max),this._flushIfNeeded()}},{key:"destroy",value:function(){if(this.flush(),this._extended){for(var e=this._extended.object,t=this._extended.methods,n=0;n<t.length;n++){var i=t[n];i.original?e[i.name]=i.original:delete e[i.name]}this._extended=null}}},{key:"replace",value:function(e,t){var i=this,r=e[t];if(!r)throw new Error("Method "+t+" undefined");e[t]=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];i.queue({args:t,fn:r,context:this})}}},{key:"queue",value:function(e){"function"==typeof e?this._queue.push({fn:e}):this._queue.push(e),this._flushIfNeeded()}},{key:"_flushIfNeeded",value:function(){var e=this;this._queue.length>this.max&&this.flush(),null!=this._timeout&&(clearTimeout(this._timeout),this._timeout=null),0<this.queue.length&&"number"==typeof this.delay&&(this._timeout=lh(function(){e.flush()},this.delay))}},{key:"flush",value:function(){var e;xu(e=Lu(e=this._queue).call(e,0)).call(e,function(e){e.fn.apply(e.context||e.fn,e.args||[])})}}],[{key:"extend",value:function(e,t){var n=new a(t);if(void 0!==e.flush)throw new Error("Target object already has a property flush");e.flush=function(){n.flush()};var i=[{name:"flush",original:void 0}];if(t&&t.replace)for(var r=0;r<t.replace.length;r++){var o=t.replace[r];i.push({name:o,original:e[o]}),n.replace(e,o)}return n._extended={object:e,methods:i},n}}]),a}(),x=function(){function e(){D(this,e),m(this,"_subscribers",{"*":[],add:[],remove:[],update:[]}),m(this,"subscribe",e.prototype.on),m(this,"unsubscribe",e.prototype.off)}return fn(e,[{key:"_trigger",value:function(t,n,i){var e;if("*"===t)throw new Error("Cannot trigger event *");xu(e=ou(e=[]).call(e,C(this._subscribers[t]),C(this._subscribers["*"]))).call(e,function(e){e(t,n,null!=i?i:null)})}},{key:"on",value:function(e,t){"function"==typeof t&&this._subscribers[e].push(t)}},{key:"off",value:function(e,t){this._subscribers[e]=S(e=this._subscribers[e]).call(e,function(e){return e!==t})}}]),e}(),om=(ig("Set",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},Ro),l.Set),am=Ko;function sm(e,t){var n,i=void 0!==tu&&Ms(e)||e["@@iterator"];if(!i){if(P(e)||(i=lm(e))||t&&e&&"number"==typeof e.length)return i&&(e=i),n=0,{s:t=function(){},n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,a=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return o=e.done,e},e:function(e){a=!0,r=e},f:function(){try{o||null==i.return||i.return()}finally{if(a)throw r}}}}function lm(e,t){if(e){if("string"==typeof e)return cm(e,t);var n=au(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?hs(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?cm(e,t):void 0}}function cm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var um=Hy,dm=function(){function n(e){D(this,n),m(this,"_pairs",void 0),this._pairs=e}return fn(n,[{key:um,value:M.mark(function e(){var t,n,i;return M.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t=sm(this._pairs),e.prev=1,t.s();case 3:if((i=t.n()).done){e.next=9;break}return i=T(i.value,2),n=i[0],i=i[1],e.next=7,[n,i];case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case"end":return e.stop()}},e,this,[[1,11,14,17]])})},{key:"entries",value:M.mark(function e(){var t,n,i;return M.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t=sm(this._pairs),e.prev=1,t.s();case 3:if((i=t.n()).done){e.next=9;break}return i=T(i.value,2),n=i[0],i=i[1],e.next=7,[n,i];case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case"end":return e.stop()}},e,this,[[1,11,14,17]])})},{key:"keys",value:M.mark(function e(){var t,n;return M.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t=sm(this._pairs),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=9;break}return n=T(n.value,1),n=n[0],e.next=7,n;case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case"end":return e.stop()}},e,this,[[1,11,14,17]])})},{key:"values",value:M.mark(function e(){var t,n;return M.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t=sm(this._pairs),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=9;break}return n=T(n.value,2),n=n[1],e.next=7,n;case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case"end":return e.stop()}},e,this,[[1,11,14,17]])})},{key:"toIdArray",value:function(){var e;return Vi(e=C(this._pairs)).call(e,function(e){return e[0]})}},{key:"toItemArray",value:function(){var e;return Vi(e=C(this._pairs)).call(e,function(e){return e[1]})}},{key:"toEntryArray",value:function(){return C(this._pairs)}},{key:"toObjectMap",value:function(){var e,t=Bd(null),n=sm(this._pairs);try{for(n.s();!(e=n.n()).done;){var i=T(e.value,2),r=i[0],o=i[1];t[r]=o}}catch(e){n.e(e)}finally{n.f()}return t}},{key:"toMap",value:function(){return new Xg(this._pairs)}},{key:"toIdSet",value:function(){return new om(this.toIdArray())}},{key:"toItemSet",value:function(){return new om(this.toItemArray())}},{key:"cache",value:function(){return new n(C(this._pairs))}},{key:"distinct",value:function(e){var t,n=new om,i=sm(this._pairs);try{for(i.s();!(t=i.n()).done;){var r=T(t.value,2),o=r[0],a=r[1];n.add(e(a,o))}}catch(e){i.e(e)}finally{i.f()}return n}},{key:"filter",value:function(r){var o=this._pairs;return new n(m({},Hy,M.mark(function e(){var t,n,i;return M.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t=sm(o),e.prev=1,t.s();case 3:if((i=t.n()).done){e.next=10;break}if(i=T(i.value,2),n=i[0],i=i[1],r(i,n))return e.next=8,[n,i];e.next=8;break;case 8:e.next=3;break;case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(1),t.e(e.t0);case 15:return e.prev=15,t.f(),e.finish(15);case 18:case"end":return e.stop()}},e,null,[[1,12,15,18]])})))}},{key:"forEach",value:function(e){var t,n=sm(this._pairs);try{for(n.s();!(t=n.n()).done;){var i=T(t.value,2),r=i[0];e(i[1],r)}}catch(e){n.e(e)}finally{n.f()}}},{key:"map",value:function(r){var o=this._pairs;return new n(m({},Hy,M.mark(function e(){var t,n,i;return M.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t=sm(o),e.prev=1,t.s();case 3:if((i=t.n()).done){e.next=9;break}return i=T(i.value,2),n=i[0],i=i[1],e.next=7,[n,r(i,n)];case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case"end":return e.stop()}},e,null,[[1,11,14,17]])})))}},{key:"max",value:function(e){var t=am(this._pairs),n=t.next();if(n.done)return null;for(var i=n.value[1],r=e(n.value[1],n.value[0]);!(n=t.next()).done;){var o=T(n.value,2),a=o[0],o=o[1],a=e(o,a);r<a&&(r=a,i=o)}return i}},{key:"min",value:function(e){var t=am(this._pairs),n=t.next();if(n.done)return null;for(var i=n.value[1],r=e(n.value[1],n.value[0]);!(n=t.next()).done;){var o=T(n.value,2),a=o[0],o=o[1],a=e(o,a);a<r&&(r=a,i=o)}return i}},{key:"reduce",value:function(e,t){var n,i=sm(this._pairs);try{for(i.s();!(n=i.n()).done;){var r=T(n.value,2),o=r[0];t=e(t,r[1],o)}}catch(e){i.e(e)}finally{i.f()}return t}},{key:"sort",value:function(r){var t=this;return new n(m({},Hy,function(){var e;return am(My(e=C(t._pairs)).call(e,function(e,t){var e=T(e,2),n=e[0],e=e[1],t=T(t,2),i=t[0],t=t[1];return r(e,t,n,i)}))}))}}]),n}();function hm(t,e){var n,i=uu(t);return Ql&&(n=Ql(t),e&&(n=S(n).call(n,function(e){return nc(t,e).enumerable})),i.push.apply(i,n)),i}function pm(t){for(var e=1;e<arguments.length;e++){var n,i=null!=arguments[e]?arguments[e]:{};e%2?xu(n=hm(Object(i),!0)).call(n,function(e){m(t,e,i[e])}):dc?pc(t,dc(i)):xu(n=hm(Object(i))).call(n,function(e){fc(t,e,nc(i,e))})}return t}function fm(e,t){var n,i=void 0!==tu&&Ms(e)||e["@@iterator"];if(!i){if(P(e)||(i=gm(e))||t&&e&&"number"==typeof e.length)return i&&(e=i),n=0,{s:t=function(){},n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,a=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return o=e.done,e},e:function(e){a=!0,r=e},f:function(){try{o||null==i.return||i.return()}finally{if(a)throw r}}}}function gm(e,t){if(e){if("string"==typeof e)return ym(e,t);var n=au(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?hs(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ym(e,t):void 0}}function ym(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function mm(n){var i=vm();return function(){var e,t=Af(n);return Rf(this,i?(e=Af(this).constructor,jf(t,arguments,e)):t.apply(this,arguments))}}function vm(){if("undefined"==typeof Reflect||!jf)return!1;if(jf.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(jf(Boolean,[],function(){})),!0}catch(e){return!1}}function bm(e,t){return null==e[t]&&(e[t]=nm()),e}var xm=function(){If(r,x);var i=mm(r);function r(e,t){var n;return D(this,r),m(Tf(n=i.call(this)),"flush",void 0),m(Tf(n),"length",void 0),m(Tf(n),"_options",void 0),m(Tf(n),"_data",void 0),m(Tf(n),"_idProp",void 0),m(Tf(n),"_queue",null),e&&!P(e)&&(t=e,e=[]),n._options=t||{},n._data=new Xg,n.length=0,n._idProp=n._options.fieldId||"id",e&&e.length&&n.add(e),n.setOptions(t),n}return fn(r,[{key:"idProp",get:function(){return this._idProp}},{key:"setOptions",value:function(e){e&&void 0!==e.queue&&(!1===e.queue?this._queue&&(this._queue.destroy(),this._queue=null):(this._queue||(this._queue=rm.extend(this,{replace:["add","update","remove"]})),e.queue&&"object"===Xc(e.queue)&&this._queue.setOptions(e.queue)))}},{key:"add",value:function(e,t){var n,i=this,r=[];if(P(e)){var o=Vi(e).call(e,function(e){return e[i._idProp]});if(ay(o).call(o,function(e){return i._data.has(e)}))throw new Error("A duplicate id was found in the parameter array.");for(var a=0,s=e.length;a<s;a++)n=this._addItem(e[a]),r.push(n)}else{if(!e||"object"!==Xc(e))throw new Error("Unknown dataType");n=this._addItem(e),r.push(n)}return r.length&&this._trigger("add",{items:r},t),r}},{key:"update",value:function(e,t){function n(e){var t,n,i=e[c];null!=i&&r._data.has(i)?(t=e,i=Ju({},r._data.get(i)),n=r._updateItem(t),a.push(n),l.push(t),s.push(i)):(n=r._addItem(e),o.push(n))}var r=this,o=[],a=[],s=[],l=[],c=this._idProp;if(P(e))for(var i=0,u=e.length;i<u;i++)e[i]&&"object"===Xc(e[i])?n(e[i]):console.warn("Ignoring input item, which is not an object at index "+i);else{if(!e||"object"!==Xc(e))throw new Error("Unknown dataType");n(e)}return o.length&&this._trigger("add",{items:o},t),a.length&&this._trigger("update",{items:a,oldData:s,data:l},t),ou(o).call(o,a)}},{key:"updateOnly",value:function(e,t){var i=this,e=(P(e)||(e=[e]),Vi(e=Vi(e).call(e,function(e){var t=i._data.get(e[i._idProp]);if(null==t)throw new Error("Updating non-existent items is not allowed.");return{oldData:t,update:e}})).call(e,function(e){var t=e.oldData,e=e.update,n=t[i._idProp],e=rf(t,e);return i._data.set(n,e),{id:n,oldData:t,updatedData:e}}));return e.length?(e={items:Vi(e).call(e,function(e){return e.id}),oldData:Vi(e).call(e,function(e){return e.oldData}),data:Vi(e).call(e,function(e){return e.updatedData})},this._trigger("update",e,t),e.items):[]}},{key:"get",value:function(e,t){var n,i=void 0,r=void 0,o=void 0,t=(o=im(e)?(i=e,t):P(e)?(r=e,t):e)&&"Object"===o.returnType?"Object":"Array",a=o&&S(o),s=[],l=void 0;if(null!=i)(l=this._data.get(i))&&a&&!a(l)&&(l=void 0);else if(null!=r)for(var c=0,u=r.length;c<u;c++)null==(l=this._data.get(r[c]))||a&&!a(l)||s.push(l);else for(var d,h=0,p=(d=C(py(e=this._data).call(e))).length;h<p;h++)n=d[h],null==(l=this._data.get(n))||a&&!a(l)||s.push(l);if(o&&o.order&&null==i&&this._sort(s,o.order),o&&o.fields){var f=o.fields;if(null!=i&&null!=l)l=this._filterFields(l,f);else for(var g=0,y=s.length;g<y;g++)s[g]=this._filterFields(s[g],f)}if("Object"!=t)return null!=i?null!=(e=l)?e:null:s;for(var m={},v=0,b=s.length;v<b;v++){var x=s[v];m[x[this._idProp]]=x}return m}},{key:"getIds",value:function(e){var t=this._data,n=e&&S(e),e=e&&e.order,i=C(py(t).call(t)),r=[];if(n)if(e){for(var o=[],a=0,s=i.length;a<s;a++){var l=i[a],l=this._data.get(l);null!=l&&n(l)&&o.push(l)}this._sort(o,e);for(var c=0,u=o.length;c<u;c++)r.push(o[c][this._idProp])}else for(var d=0,h=i.length;d<h;d++){var p=i[d],p=this._data.get(p);null!=p&&n(p)&&r.push(p[this._idProp])}else if(e){for(var f=[],g=0,y=i.length;g<y;g++){var m=i[g];f.push(t.get(m))}this._sort(f,e);for(var v=0,b=f.length;v<b;v++)r.push(f[v][this._idProp])}else for(var x=0,w=i.length;x<w;x++){var _=i[x],_=t.get(_);null!=_&&r.push(_[this._idProp])}return r}},{key:"getDataSet",value:function(){return this}},{key:"forEach",value:function(e,t){var n=t&&S(t),i=this._data,r=C(py(i).call(i));if(t&&t.order)for(var o=this.get(t),a=0,s=o.length;a<s;a++){var l=o[a];e(l,l[this._idProp])}else for(var c=0,u=r.length;c<u;c++){var d=r[c],h=this._data.get(d);null==h||n&&!n(h)||e(h,d)}}},{key:"map",value:function(e,t){for(var n=t&&S(t),i=[],r=this._data,o=C(py(r).call(r)),a=0,s=o.length;a<s;a++){var l=o[a],c=this._data.get(l);null==c||n&&!n(c)||i.push(e(c,l))}return t&&t.order&&this._sort(i,t.order),i}},{key:"_filterFields",value:function(n,e){return n&&Jn(e=P(e)?e:uu(e)).call(e,function(e,t){return e[t]=n[t],e},{})}},{key:"_sort",value:function(e,t){if("string"==typeof t){var n=t;My(e).call(e,function(e,t){e=e[n],t=t[n];return t<e?1:e<t?-1:0})}else{if("function"!=typeof t)throw new TypeError("Order must be a function or a string");My(e).call(e,t)}}},{key:"remove",value:function(e,t){for(var n=[],i=[],r=P(e)?e:[e],o=0,a=r.length;o<a;o++){var s,l=this._remove(r[o]);!l||null!=(s=l[this._idProp])&&(n.push(s),i.push(l))}return n.length&&this._trigger("remove",{items:n,oldData:i},t),n}},{key:"_remove",value:function(e){var t;return im(e)?t=e:e&&"object"===Xc(e)&&(t=e[this._idProp]),null!=t&&this._data.has(t)?(e=this._data.get(t)||null,this._data.delete(t),--this.length,e):null}},{key:"clear",value:function(e){for(var t,n=C(py(t=this._data).call(t)),i=[],r=0,o=n.length;r<o;r++)i.push(this._data.get(n[r]));return this._data.clear(),this.length=0,this._trigger("remove",{items:n,oldData:i},e),n}},{key:"max",value:function(e){var t,n,i=null,r=null,o=fm(zy(t=this._data).call(t));try{for(o.s();!(n=o.n()).done;){var a=n.value,s=a[e];"number"==typeof s&&(null==r||r<s)&&(i=a,r=s)}}catch(e){o.e(e)}finally{o.f()}return i||null}},{key:"min",value:function(e){var t,n,i=null,r=null,o=fm(zy(t=this._data).call(t));try{for(o.s();!(n=o.n()).done;){var a=n.value,s=a[e];"number"==typeof s&&(null==r||s<r)&&(i=a,r=s)}}catch(e){o.e(e)}finally{o.f()}return i||null}},{key:"distinct",value:function(e){for(var t=this._data,n=C(py(t).call(t)),i=[],r=0,o=0,a=n.length;o<a;o++){for(var s=n[o],l=t.get(s)[e],c=!1,u=0;u<r;u++)if(i[u]==l){c=!0;break}c||void 0===l||(i[r]=l,r++)}return i}},{key:"_addItem",value:function(e){var e=bm(e,this._idProp),t=e[this._idProp];if(this._data.has(t))throw new Error("Cannot add item: item with id "+t+" already exists");return this._data.set(t,e),++this.length,t}},{key:"_updateItem",value:function(e){var t=e[this._idProp];if(null==t)throw new Error("Cannot update item: item has no id (item: "+th(e)+")");var n=this._data.get(t);if(n)return this._data.set(t,pm(pm({},n),e)),t;throw new Error("Cannot update item: no item with id "+t+" found")}},{key:"stream",value:function(r){var o,e;return r?(o=this._data,new dm(m({},Hy,M.mark(function e(){var t,n,i;return M.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t=fm(r),e.prev=1,t.s();case 3:if((n=t.n()).done){e.next=11;break}if(n=n.value,null!=(i=o.get(n)))return e.next=9,[n,i];e.next=9;break;case 9:e.next=3;break;case 11:e.next=16;break;case 13:e.prev=13,e.t0=e.catch(1),t.e(e.t0);case 16:return e.prev=16,t.f(),e.finish(16);case 19:case"end":return e.stop()}},e,null,[[1,13,16,19]])})))):new dm(m({},Hy,In(e=Yy(this._data)).call(e,this._data)))}}]),r}();function wm(e,t){var n,i=void 0!==tu&&Ms(e)||e["@@iterator"];if(!i){if(P(e)||(i=_m(e))||t&&e&&"number"==typeof e.length)return i&&(e=i),n=0,{s:t=function(){},n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,a=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return o=e.done,e},e:function(e){a=!0,r=e},f:function(){try{o||null==i.return||i.return()}finally{if(a)throw r}}}}function _m(e,t){if(e){if("string"==typeof e)return Sm(e,t);var n=au(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?hs(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Sm(e,t):void 0}}function Sm(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Om(n){var i=Em();return function(){var e,t=Af(n);return Rf(this,i?(e=Af(this).constructor,jf(t,arguments,e)):t.apply(this,arguments))}}function Em(){if("undefined"==typeof Reflect||!jf)return!1;if(jf.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(jf(Boolean,[],function(){})),!0}catch(e){return!1}}function km(e,t){return"object"===Xc(t)&&null!==t&&e===t.idProp&&"function"==typeof t.add&&"function"==typeof t.clear&&"function"==typeof t.distinct&&"function"==typeof xu(t)&&"function"==typeof t.get&&"function"==typeof t.getDataSet&&"function"==typeof t.getIds&&"number"==typeof t.length&&"function"==typeof Vi(t)&&"function"==typeof t.max&&"function"==typeof t.min&&"function"==typeof t.off&&"function"==typeof t.on&&"function"==typeof t.remove&&"function"==typeof t.setOptions&&"function"==typeof t.stream&&"function"==typeof t.update&&"function"==typeof t.updateOnly}function jm(e,t){return"object"===Xc(t)&&null!==t&&e===t.idProp&&"function"==typeof xu(t)&&"function"==typeof t.get&&"function"==typeof t.getDataSet&&"function"==typeof t.getIds&&"number"==typeof t.length&&"function"==typeof Vi(t)&&"function"==typeof t.off&&"function"==typeof t.on&&"function"==typeof t.stream&&km(e,t.getDataSet())}yo=function(){If(a,x);var i=Om(a);function a(e,t){var n;return D(this,a),m(Tf(n=i.call(this)),"length",0),m(Tf(n),"_listener",void 0),m(Tf(n),"_data",void 0),m(Tf(n),"_ids",new om),m(Tf(n),"_options",void 0),n._options=t||{},n._listener=In(t=n._onEvent).call(t,Tf(n)),n.setData(e),n}return fn(a,[{key:"idProp",get:function(){return this.getDataSet().idProp}},{key:"setData",value:function(e){var t,n;if(this._data&&(this._data.off&&this._data.off("*",this._listener),t=this._data.getIds({filter:S(this._options)}),n=this._data.get(t),this._ids.clear(),this.length=0,this._trigger("remove",{items:t,oldData:n})),null!=e){this._data=e;for(var i=this._data.getIds({filter:S(this._options)}),r=0,o=i.length;r<o;r++){var a=i[r];this._ids.add(a)}this.length=i.length,this._trigger("add",{items:i})}else this._data=new xm;this._data.on&&this._data.on("*",this._listener)}},{key:"refresh",value:function(){for(var e=this._data.getIds({filter:S(this._options)}),t=C(this._ids),n={},i=[],r=[],o=[],a=0,s=e.length;a<s;a++){var l=e[a];n[l]=!0,this._ids.has(l)||(i.push(l),this._ids.add(l))}for(var c=0,u=t.length;c<u;c++){var d=t[c],h=this._data.get(d);null==h?console.error("If you see this, report it please."):n[d]||(r.push(d),o.push(h),this._ids.delete(d))}this.length+=i.length-r.length,i.length&&this._trigger("add",{items:i}),r.length&&this._trigger("remove",{items:r,oldData:o})}},{key:"get",value:function(e,t){if(null==this._data)return null;var n=null,t=im(e)||P(e)?(n=e,t):e,e=Ju({},this._options,t),i=S(this._options),r=t&&S(t);return i&&r&&(e.filter=function(e){return i(e)&&r(e)}),null==n?this._data.get(e):this._data.get(n,e)}},{key:"getIds",value:function(e){var t,n,i;return this._data.length?(t=S(this._options),i=(n=null!=e?S(e):null)?t?function(e){return t(e)&&n(e)}:n:t,this._data.getIds({filter:i,order:e&&e.order})):[]}},{key:"forEach",value:function(e,t){var n,i,r,o;this._data&&(i=S(this._options),o=(r=t&&S(t))?i?function(e){return i(e)&&r(e)}:r:i,xu(n=this._data).call(n,e,{filter:o,order:t&&t.order}))}},{key:"map",value:function(e,t){var n,i,r,o;return this._data?(i=S(this._options),o=(r=t&&S(t))?i?function(e){return i(e)&&r(e)}:r:i,Vi(n=this._data).call(n,e,{filter:o,order:t&&t.order})):[]}},{key:"getDataSet",value:function(){return this._data.getDataSet()}},{key:"stream",value:function(e){return this._data.stream(e||m({},Hy,In(e=py(this._ids)).call(e,this._ids)))}},{key:"dispose",value:function(){null!=(e=this._data)&&e.off&&this._data.off("*",this._listener);var e,t,n="This data view has already been disposed of.",i={get:function(){throw new Error(n)},set:function(){throw new Error(n)},configurable:!1},r=wm(su(a.prototype));try{for(r.s();!(t=r.n()).done;){var o=t.value;fc(this,o,i)}}catch(e){r.e(e)}finally{r.f()}}},{key:"_onEvent",value:function(e,t,n){if(t&&t.items&&this._data){var i=t.items,r=[],o=[],a=[],s=[],l=[],c=[];switch(e){case"add":for(var u=0,d=i.length;u<d;u++){var h=i[u];this.get(h)&&(this._ids.add(h),r.push(h))}break;case"update":for(var p=0,f=i.length;p<f;p++){var g=i[p];this.get(g)?this._ids.has(g)?(o.push(g),l.push(t.data[p]),s.push(t.oldData[p])):(this._ids.add(g),r.push(g)):this._ids.has(g)&&(this._ids.delete(g),a.push(g),c.push(t.oldData[p]))}break;case"remove":for(var y=0,m=i.length;y<m;y++){var v=i[y];this._ids.has(v)&&(this._ids.delete(v),a.push(v),c.push(t.oldData[y]))}}this.length+=r.length-a.length,r.length&&this._trigger("add",{items:r},n),o.length&&this._trigger("update",{items:o,oldData:s,data:l},n),a.length&&this._trigger("remove",{items:a,oldData:c},n)}}}]),a}(),F.DELETE=nf,F.DataSet=xm,F.DataStream=dm,F.DataView=yo,F.Queue=rm,F.createNewDataPipeFrom=rr,F.isDataSetLike=km,F.isDataViewLike=jm,Object.defineProperty(F,"__esModule",{value:!0})}(),{exports:{}}),ErrorOutlineOutlined=(!function(){function A(e){return e&&e.Math==Math&&e}function e(e){try{return!!e()}catch(e){return!0}}function F(e){return"function"==typeof e}function D(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}function N(e){return ae(oe(e),8,-1)}function B(e){if(null==e)throw ue("Can't call method on "+e);return e}function z(e){return de(he(e))}function H(e){return"object"==typeof e?null!==e:pe(e)}function W(e){return ye(e)?e:void 0}function V(e,t){return arguments.length<2?W(fe[e])||W(ge[e]):fe[e]&&fe[e][t]||ge[e]&&ge[e][t]}var U=visNetwork.exports,q=visData.exports,t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==commonjsGlobal$1?commonjsGlobal$1:"undefined"!=typeof self?self:{},t=A("object"==typeof globalThis&&globalThis)||A("object"==typeof window&&window)||A("object"==typeof self&&self)||A("object"==typeof t&&t)||function(){return this}()||Function("return this")(),G=!e(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),K=(J=Function.prototype).apply,Y=J.call,J="object"==typeof Reflect&&Reflect.apply||(G?Y.bind(K):function(){return Y.apply(K,arguments)}),n=G,X=(i=Function.prototype).bind,Q=i.call,Z=n&&X.bind(Q,Q),i=n?function(e){return e&&Z(e)}:function(e){return e&&function(){return Q.apply(e,arguments)}},X={},n=!e(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),ee=Function.prototype.call,te=G?ee.bind(ee):function(){return ee.apply(ee,arguments)},ne={},ie={}.propertyIsEnumerable,re=Object.getOwnPropertyDescriptor,r=re&&!ie.call({1:2},1);ne.f=r?function(e){e=re(this,e);return!!e&&e.enumerable}:ie;var oe=(r=i)({}.toString),ae=r("".slice),ie=i,r=e,se=N,le=t.Object,ce=ie("".split),ie=r(function(){return!le("z").propertyIsEnumerable(0)})?function(e){return"String"==se(e)?ce(e,""):le(e)}:le,ue=t.TypeError,de=ie,he=B,pe=F,fe=r={},ge=t,ye=F,me=i({}.isPrototypeOf),ve=V("navigator","userAgent")||"",o=ve,be=t.process,a=t.Deno,be=be&&be.versions||a&&a.version;function xe(e){try{return Pe(e)}catch(e){return"Object"}}function we(e){if($e(e))return e;throw Re(Ie(e)+" is not a function")}function _e(e,t){e=e[t];return null==e?void 0:Me(e)}function Se(e,t){var n,i;if("string"===t&&Fe(n=e.toString)&&!De(i=Ae(n,e)))return i;if(Fe(n=e.valueOf)&&!De(i=Ae(n,e)))return i;if("string"!==t&&Fe(n=e.toString)&&!De(i=Ae(n,e)))return i;throw Ne("Can't convert object to primitive value")}(a=be&&be.v8)&&(s=a.split("."),Ce=0<s[0]&&s[0]<4?1:+(s[0]+s[1])),!Ce&&o&&(!(s=o.match(/Edge\/(\d+)/))||74<=s[1])&&(s=o.match(/Chrome\/(\d+)/))&&(Ce=+s[1]);var Oe=be=Ce,a=e,s=(o=!!Object.getOwnPropertySymbols&&!a(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Oe&&Oe<41}))&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Ee=V,ke=F,je=me,Te=t.Object,Ce=s?function(e){return"symbol"==typeof e}:function(e){var t=Ee("Symbol");return ke(t)&&je(t.prototype,Te(e))},Pe=t.String,$e=F,Ie=xe,Re=t.TypeError,Me=we,Ae=te,Fe=F,De=H,Ne=t.TypeError,a={exports:{}},Le=t,Be=Object.defineProperty,l=function(t,n){try{Be(Le,t,{value:n,configurable:!0,writable:!0})}catch(e){Le[t]=n}return n},ze=l=t[u="__core-js_shared__"]||l(u,{});function He(e){return it(nt(e))}function We(e){return"Symbol("+(void 0===e?"":e)+")_"+ct(++st+lt,36)}function Ve(e){var t;return dt(ft,e)&&(ht||"string"==typeof ft[e])||(t="Symbol."+e,ht&&dt(gt,e)?ft[e]=gt[e]:ft[e]=(pt&&yt?yt:mt)(t)),ft[e]}function Ue(e){e=Et(e,"string");return kt(e)?e:e+""}function qe(e){return Tt?jt.createElement(e):{}}function Ge(e,t){e=Ht[zt(e)];return e==Vt||e!=Wt&&(Lt(t)?Nt(t):!!t)}function Ke(e,t){return Ut(e),void 0===t?e:qt?Gt(e,t):function(){return e.apply(t,arguments)}}function Ye(e){if(Kt(e))return e;throw Jt(Yt(e)+" is not an object")}function Je(i){function r(e,t,n){if(this instanceof r){switch(arguments.length){case 0:return new i;case 1:return new i(e);case 2:return new i(e,t)}return new i(e,t,n)}return un(i,this,arguments)}return r.prototype=i.prototype,r}function c(e,t){var n,i,r,o,a,s=e.target,l=e.global,c=e.stat,u=e.proto,d=l?cn:c?cn[s]:(cn[s]||{}).prototype,h=l?gn:gn[s]||mn(gn,s,{})[s],p=h.prototype;for(n in t)o=fn(l?n:s+(c?".":"#")+n,e.forced),o=!o&&d&&vn(d,n),r=h[n],o&&(a=e.noTargetGet?(a=pn(d,n))&&a.value:d[n]),i=o&&a?a:t[n],o&&typeof r==typeof i||(o=e.bind&&o?yn(i,cn):e.wrap&&o?Je(i):u&&hn(i)?dn(i):i,(e.sham||i&&i.sham||r&&r.sham)&&mn(o,"sham",!0),mn(h,n,o),u&&(vn(gn,r=s+"Prototype")||mn(gn,r,{}),mn(gn[r],n,i),e.real&&p&&!p[n]&&mn(p,n,i)))}function Xe(e){e=+e;return e!=e||0==e?0:(0<e?xn:bn)(e)}function Qe(e,t){e=wn(e);return e<0?_n(e+t,0):Sn(e,t)}function Ze(e){return kn(e.length)}function et(s){return function(e,t,n){var i,r=jn(e),o=Cn(r),a=Tn(n,o);if(s&&t!=t){for(;a<o;)if((i=r[a++])!=i)return!0}else for(;a<o;a++)if((s||a in r)&&r[a]===t)return s||a||0;return!s&&-1}}function tt(e,t){var n,i=In(e),r=0,o=[];for(n in i)!$n(Mn,n)&&$n(i,n)&&An(o,n);for(;t.length>r;)!$n(i,n=t[r++])||~Rn(o,n)||An(o,n);return o}(a.exports=function(e,t){return ze[e]||(ze[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.21.1",mode:"pure",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.21.1/LICENSE",source:"https://github.com/zloirock/core-js"});var nt=B,it=t.Object,rt=He,ot=i({}.hasOwnProperty),u=Object.hasOwn||function(e,t){return ot(rt(e),t)},at=i,st=0,lt=Math.random(),ct=at(1..toString),at=t,ut=a.exports,dt=u,d=We,ht=o,pt=s,ft=ut("wks"),gt=at.Symbol,yt=gt&&gt.for,mt=pt?gt:gt&&gt.withoutSetter||d,vt=te,bt=H,xt=Ce,wt=_e,_t=Se,s=Ve,St=t.TypeError,Ot=s("toPrimitive"),Et=function(e,t){if(!bt(e)||xt(e))return e;var n=wt(e,Ot);if(n){if(n=vt(n,e,t=void 0===t?"default":t),!bt(n)||xt(n))return n;throw St("Can't convert object to primitive value")}return _t(e,t=void 0===t?"number":t)},kt=Ce,ut=H,jt=t.document,Tt=ut(jt)&&ut(jt.createElement),Ct=qe,at=!n&&!e(function(){return 7!=Object.defineProperty(Ct("div"),"a",{get:function(){return 7}}).a}),Pt=te,$t=ne,It=D,Rt=z,Mt=Ue,At=u,Ft=at,Dt=Object.getOwnPropertyDescriptor,Nt=(X.f=n?Dt:function(e,t){if(e=Rt(e),t=Mt(t),Ft)try{return Dt(e,t)}catch(e){}if(At(e,t))return It(!Pt($t.f,e,t),e[t])},e),Lt=F,Bt=/#|\.prototype\./,zt=Ge.normalize=function(e){return String(e).replace(Bt,".").toLowerCase()},Ht=Ge.data={},Wt=Ge.NATIVE="N",Vt=Ge.POLYFILL="P",d=Ge,Ut=we,qt=G,Gt=i(i.bind),s={},ut=n&&e(function(){return 42!=Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),Kt=H,Yt=t.String,Jt=t.TypeError,Xt=at,Qt=Ye,Zt=Ue,en=t.TypeError,tn=Object.defineProperty,nn=Object.getOwnPropertyDescriptor,rn="enumerable",on="configurable",an="writable",at=(s.f=n?ut?function(e,t,n){var i;return Qt(e),t=Zt(t),Qt(n),"function"==typeof e&&"prototype"===t&&"value"in n&&an in n&&!n[an]&&((i=nn(e,t))&&i[an]&&(e[t]=n.value,n={configurable:(on in n?n:i)[on],enumerable:(rn in n?n:i)[rn],writable:!1})),tn(e,t,n)}:tn:function(e,t,n){if(Qt(e),t=Zt(t),Qt(n),Xt)try{return tn(e,t,n)}catch(e){}if("get"in n||"set"in n)throw en("Accessors not supported");return"value"in n&&(e[t]=n.value),e},n),sn=s,ln=D,at=at?function(e,t,n){return sn.f(e,t,ln(1,n))}:function(e,t,n){return e[t]=n,e},cn=t,un=J,dn=i,hn=F,pn=X.f,fn=d,gn=r,yn=Ke,mn=at,vn=u,bn=Math.ceil,xn=Math.floor,wn=Xe,_n=Math.max,Sn=Math.min,On=Xe,En=Math.min,kn=function(e){return 0<e?En(On(e),9007199254740991):0},jn=z,Tn=Qe,Cn=Ze,d={includes:et(!0),indexOf:et(!1)},Pn=i,$n=u,In=z,Rn=d.indexOf,Mn=Xx={},An=Pn([].push),Fn=tt,Dn=Pn=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Nn=Object.keys||function(e){return Fn(e,Dn)},Ln=((vc={}).f=Object.getOwnPropertySymbols,n),Bn=i,zn=te,Hn=e,Wn=Nn,Vn=vc,Un=ne,qn=He,Gn=ie,Kn=Object.assign,Yn=Object.defineProperty,Jn=Bn([].concat),Bn=!Kn||Hn(function(){if(Ln&&1!==Kn({b:1},Kn(Yn({},"a",{enumerable:!0,get:function(){Yn(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),i="abcdefghijklmnopqrst";return e[n]=7,i.split("").forEach(function(e){t[e]=e}),7!=Kn({},e)[n]||Wn(Kn({},t)).join("")!=i})?function(e,t){for(var n=qn(e),i=arguments.length,r=1,o=Vn.f,a=Un.f;r<i;)for(var s,l=Gn(arguments[r++]),c=o?Jn(Wn(l),o(l)):Wn(l),u=c.length,d=0;d<u;)s=c[d++],Ln&&!zn(a,l,s)||(n[s]=l[s]);return n}:Kn;function Xn(e,t,n){if(!ni(si,t)){for(var i=[],r=0;r<t;r++)i[r]="a["+r+"]";si[t]=ri("C,a","return new C("+ai(i,",")+")")}return si[t](e,n)}function Qn(e){return li[e+"Prototype"]}c({target:"Object",stat:!0,forced:Object.assign!==Bn},{assign:Bn});var Zn=r.Object.assign,Hn=i([].slice),Bn=i,ei=we,ti=H,ni=u,ii=Hn,ri=t.Function,oi=Bn([].concat),ai=Bn([].join),si={},Bn=G?ri.bind:function(t){var n=ei(this),e=n.prototype,i=ii(arguments,1),r=function(){var e=oi(i,ii(arguments));return this instanceof r?Xn(n,e.length,e):n.apply(t,e)};return ti(e)&&(r.prototype=e),r},li=(c({target:"Function",proto:!0,forced:Function.bind!==Bn},{bind:Bn}),r),G=Qn("Function").bind,ci=me,ui=G,di=Function.prototype,h=function(e){var t=e.bind;return e===di||ci(di,e)&&t===di.bind?ui:t};function hi(e,t,n,i){e.beginPath(),e.arc(t,n,i,0,2*Math.PI,!1),e.closePath()}function pi(e,t,n,i){e.beginPath(),e.rect(t-i,n-i,2*i,2*i),e.closePath()}function fi(e,t,n,i){e.beginPath(),n+=.275*(i*=1.15);var i=2*i,r=i/2,o=Math.sqrt(3)/6*i,i=Math.sqrt(i*i-r*r);e.moveTo(t,n-(i-o)),e.lineTo(t+r,n+o),e.lineTo(t-r,n+o),e.lineTo(t,n-(i-o)),e.closePath()}function gi(e,t,n,i){e.beginPath(),n-=.275*(i*=1.15);var i=2*i,r=i/2,o=Math.sqrt(3)/6*i,i=Math.sqrt(i*i-r*r);e.moveTo(t,n+(i-o)),e.lineTo(t+r,n-o),e.lineTo(t-r,n-o),e.lineTo(t,n+(i-o)),e.closePath()}function yi(e,t,n,i){e.beginPath(),n+=.1*(i*=.82);for(var r=0;r<10;r++){var o=r%2==0?1.3*i:.5*i;e.lineTo(t+o*Math.sin(2*r*Math.PI/10),n-o*Math.cos(2*r*Math.PI/10))}e.closePath()}function mi(e,t,n,i){e.beginPath(),e.lineTo(t,n+i),e.lineTo(t+i,n),e.lineTo(t,n-i),e.lineTo(t-i,n),e.closePath()}function vi(e,t,n,i,r,o){var a=Math.PI/180;r-2*(o=i-2*o<0?i/2:o)<0&&(o=r/2),e.beginPath(),e.moveTo(t+o,n),e.lineTo(t+i-o,n),e.arc(t+i-o,n+o,o,270*a,360*a,!1),e.lineTo(t+i,n+r-o),e.arc(t+i-o,n+r-o,o,0,90*a,!1),e.lineTo(t+o,n+r),e.arc(t+o,n+r-o,o,90*a,180*a,!1),e.lineTo(t,n+o),e.arc(t+o,n+o,o,180*a,270*a,!1),e.closePath()}function bi(e,t,n,i,r){var o=i/2*.5522848,a=r/2*.5522848,s=t+i,l=n+r,i=t+i/2,r=n+r/2;e.beginPath(),e.moveTo(t,r),e.bezierCurveTo(t,r-a,i-o,n,i,n),e.bezierCurveTo(i+o,n,s,r-a,s,r),e.bezierCurveTo(s,r+a,i+o,l,i,l),e.bezierCurveTo(i-o,l,t,r+a,t,r),e.closePath()}function xi(e,t,n,i,r){var o=r*(1/3),a=i/2*.5522848,s=o/2*.5522848,l=t+i,c=n+o,i=t+i/2,u=n+o/2,o=n+(r-o/2),r=n+r;e.beginPath(),e.moveTo(l,u),e.bezierCurveTo(l,u+s,i+a,c,i,c),e.bezierCurveTo(i-a,c,t,u+s,t,u),e.bezierCurveTo(t,u-s,i-a,n,i,n),e.bezierCurveTo(i+a,n,l,u-s,l,u),e.lineTo(l,o),e.bezierCurveTo(l,o+s,i+a,r,i,r),e.bezierCurveTo(i-a,r,t,o+s,t,o),e.lineTo(t,u)}function wi(e,t,n,i,r,o){e.beginPath(),e.moveTo(t,n);for(var a=o.length,s=i-t,i=r-n,l=i/s,c=Math.sqrt(s*s+i*i),u=0,d=!0,h=0,p=+o[0];.1<=c;)c<(p=+o[u++%a])&&(p=c),h=Math.sqrt(p*p/(1+l*l)),t+=h=s<0?-h:h,n+=l*h,!0===d?e.lineTo(t,n):e.moveTo(t,n),c-=p,d=!d}function _i(e,t,n,i){e.beginPath();var r=2*Math.PI/6;e.moveTo(t+i,n);for(var o=1;o<6;o++)e.lineTo(t+i*Math.cos(r*o),n+i*Math.sin(r*o));e.closePath()}var Si={circle:hi,dashedLine:wi,database:xi,diamond:mi,ellipse:bi,ellipse_vis:bi,hexagon:_i,roundRect:vi,square:pi,star:yi,triangle:fi,triangleDown:gi};function Oi(r){return Object.prototype.hasOwnProperty.call(Si,r)?Si[r]:function(e){for(var t=arguments.length,n=new Array(1<t?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];CanvasRenderingContext2D.prototype[r].call(e,n)}}function Ei(e){if(e)return ki(e)}function ki(e){for(var t in Ei.prototype)e[t]=Ei.prototype[t];return e}function ji(e,t){try{return e[t]}catch(e){}}function Ti(e){if("Symbol"===Di(e))throw TypeError("Cannot convert a Symbol value to a string");return Ni(e)}function Ci(r){return function(e,t){var n,e=Bi(zi(e)),t=Li(t),i=e.length;return t<0||i<=t?r?"":void 0:(n=Wi(e,t))<55296||56319<n||t+1===i||(i=Wi(e,t+1))<56320||57343<i?r?Hi(e,t):n:r?Vi(e,t,t+2):i-56320+(n-55296<<10)+65536}}((G={exports:{}}).exports=Ei).prototype.on=Ei.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Ei.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Ei.prototype.off=Ei.prototype.removeListener=Ei.prototype.removeAllListeners=Ei.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,i=this._callbacks["$"+e];if(!i)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var r=0;r<i.length;r++)if((n=i[r])===t||n.fn===t){i.splice(r,1);break}return 0===i.length&&delete this._callbacks["$"+e],this},Ei.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],i=1;i<arguments.length;i++)t[i-1]=arguments[i];if(n)for(var i=0,r=(n=n.slice(0)).length;i<r;++i)n[i].apply(this,t);return this},Ei.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Ei.prototype.hasListeners=function(e){return!!this.listeners(e).length};var G=G.exports,p=((p={})[Ve("toStringTag")]="z","[object z]"===String(p)),Pi=t,$i=p,Ii=F,Ri=N,Mi=Ve("toStringTag"),Ai=Pi.Object,Fi="Arguments"==Ri(function(){return arguments}()),Di=Pi=$i?Ri:function(e){var t;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(t=ji(e=Ai(e),Mi))?t:Fi?Ri(e):"Object"==(t=Ri(e))&&Ii(e.callee)?"Arguments":t},Ni=t.String,Li=Xe,Bi=Ti,zi=B,Hi=($i=i)("".charAt),Wi=$i("".charCodeAt),Vi=$i("".slice),$i={codeAt:Ci(!1),charAt:Ci(!0)},Ui=F,qi=l,Gi=i(Function.toString);function Ki(e){return lr[e]||(lr[e]=sr(e))}function Yi(e){return Zi(e)?Qi(e):Xi(e,{})}function Ji(t){return function(e){if(cr(e)&&(e=Qi(e)).type===t)return e;throw fr("Incompatible receiver, "+t+" required")}}Ui(qi.inspectSource)||(qi.inspectSource=function(e){return Gi(e)});var Xi,Qi,Zi,er,tr,nr,ir,rr,Ui=qi.inspectSource,qi=F,or=Ui,ar=t.WeakMap,qi=qi(ar)&&/native code/.test(or(ar)),or=a.exports,sr=We,lr=or("keys"),ar=i,cr=H,ur=at,dr=u,or=l,l=Ki,hr=Xx,pr="Object already initialized",fr=t.TypeError,gr=t.WeakMap,or=(qi||or.state?(er=or.state||(or.state=new gr),tr=ar(er.get),nr=ar(er.has),ir=ar(er.set),Xi=function(e,t){if(nr(er,e))throw new fr(pr);return t.facade=e,ir(er,e,t),t},Qi=function(e){return tr(er,e)||{}},Zi=function(e){return nr(er,e)}):(rr=l("state"),hr[rr]=!0,Xi=function(e,t){if(dr(e,rr))throw new fr(pr);return t.facade=e,ur(e,rr,t),t},Qi=function(e){return dr(e,rr)?e[rr]:{}},Zi=function(e){return dr(e,rr)}),{set:Xi,get:Qi,has:Zi,enforce:Yi,getterFor:Ji}),gr=n,ar=u,l=Function.prototype,hr=gr&&Object.getOwnPropertyDescriptor,ar={EXISTS:ar=ar(l,"name"),PROPER:ar&&"something"===function(){}.name,CONFIGURABLE:ar&&(!gr||hr(l,"name").configurable)},yr=s,mr=Ye,vr=z,br=Nn;function xr(){}function wr(e){e.write(Mr("")),e.close();var t=e.parentWindow.Object;return e=null,t}function _r(){var e=Pr("iframe"),t="java"+Ir+":";return e.style.display="none",Cr.appendChild(e),e.src=String(t),(t=e.contentWindow.document).open(),t.write(Mr("document.F=Object")),t.close(),t.F}function Sr(e,t,n,i){i&&i.enumerable?e[t]=n:Wr(e,t,n)}(gr={}).f=n&&!ut?Object.defineProperties:function(e,t){mr(e);for(var n,i=vr(t),r=br(t),o=r.length,a=0;a<o;)yr.f(e,n=r[a++],i[n]);return e};var Or,Er,hr=V("document","documentElement"),kr=Ye,jr=gr,Tr=Pn,l=Xx,Cr=hr,Pr=qe,$r="prototype",Ir="script",Rr=Ki("IE_PROTO"),Mr=function(e){return"<"+Ir+">"+e+"</"+Ir+">"},Ar=function(){try{Or=new ActiveXObject("htmlfile")}catch(e){}Ar="undefined"==typeof document||document.domain&&Or?wr(Or):_r();for(var e=Tr.length;e--;)delete Ar[$r][Tr[e]];return Ar()},ut=(l[Rr]=!0,Object.create||function(e,t){var n;return null!==e?(xr[$r]=kr(e),n=new xr,xr[$r]=null,n[Rr]=e):n=Ar(),void 0===t?n:jr.f(n,t)}),hr=!e(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),l=t,Fr=u,Dr=F,Nr=He,Lr=hr,Br=Ki("IE_PROTO"),zr=l.Object,Hr=zr.prototype,l=Lr?zr.getPrototypeOf:function(e){e=Nr(e);if(Fr(e,Br))return e[Br];var t=e.constructor;return Dr(t)&&e instanceof t?t.prototype:e instanceof zr?Hr:null},Wr=at,Lr=e,Vr=F,f=ut,Ur=l,qr=Sr,Gr=Ve("iterator"),g=!1;function Kr(e,t,n,i){e&&(n=n?e:e.prototype,go(n,mo)||po(n,mo,{configurable:!0,value:t}),i&&!ho&&fo(n,"toString",yo))}function Yr(){return this}function Jr(e,t,n,i){t+=" Iterator";return e.prototype=bo(vo,{next:xo(+!i,n)}),wo(e,t,!1,!0),_o[t]=Yr,e}function Xr(){return this}function Qr(e,t,n,i,r,o,a){$o(n,t,i);function s(e){if(e===r&&p)return p;if(!Do&&e in d)return d[e];switch(e){case"keys":case Lo:case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}}var l,c,i=t+" Iterator",u=!1,d=e.prototype,h=d[No]||d["@@iterator"]||r&&d[r],p=!Do&&h||s(r),f="Array"==t&&d.entries||h;if(f&&(f=Io(f.call(new e)))!==Object.prototype&&f.next&&(Ro(f,i,!0,!0),Ao[i]=Xr),Fo&&r==Lo&&h&&h.name!==Lo&&(u=!0,p=function(){return Po(h,this)}),r)if(l={values:s(Lo),keys:o?p:s("keys"),entries:s("entries")},a)for(c in l)!Do&&!u&&c in d||Mo(d,c,l[c]);else Co({target:t,proto:!0,forced:Do||u},l);return a&&d[No]!==p&&Mo(d,No,p,{name:r}),Ao[t]=p,l}function Zr(e,t,n){var i,r;qo(e);try{if(!(i=Go(e,"return"))){if("throw"===t)throw n;return n}i=Uo(i,e)}catch(e){r=!0,i=e}if("throw"===t)throw n;if(r)throw i;return qo(i),n}function eo(t,e,n,i){try{return i?e(Ko(n)[0],n[1]):e(n)}catch(e){Yo(t,"throw",e)}}function to(e){return void 0!==e&&(Jo.Array===e||Qo[Xo]===e)}function no(){}function io(e){if(!Zo(e))return!1;try{return ia(no,na,e),!0}catch(e){return!1}}function ro(e){if(!Zo(e))return!1;switch(ea(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return aa||!!oa(ra,ta(e))}catch(e){return!0}}function oo(e,t,n){t=sa(t);t in e?la.f(e,t,ca(0,n)):e[t]=n}function ao(e){if(null!=e)return da(e,pa)||da(e,"@@iterator")||ha[ua(e)]}function so(e,t){var n=arguments.length<2?va(e):t;if(ga(n))return ya(fa(n,e));throw ba(ma(e)+" is not iterable")}function lo(e){var t,n,i,r,o,a,s=_a(e),l=Ea(this),c=arguments.length,u=1<c?arguments[1]:void 0,d=void 0!==u,c=(d&&(u=xa(u,2<c?arguments[2]:void 0)),Ca(s)),h=0;if(!c||this==Pa&&Oa(c))for(t=ka(s),n=l?new this(t):Pa(t);h<t;h++)a=d?u(s[h],h):s[h],ja(n,h,a);else for(r=Ta(s,c),o=r.next,n=l?new this:[];!(i=wa(o,r)).done;h++)a=d?Sa(r,u,[i.value,h],!0):i.value,ja(n,h,a);return n.length=h,n}[].keys&&("next"in(co=[].keys())?(Ur=Ur(Ur(co)))!==Object.prototype&&(Er=Ur):g=!0),Er=null==Er||Lr(function(){var e={};return Er[Gr].call(e)!==e})?{}:f(Er),Vr(Er[Gr])||qr(Er,Gr,function(){return this});var co={IteratorPrototype:Er,BUGGY_SAFARI_ITERATORS:g},uo=Pi,ho=p,po=s.f,fo=at,go=u,yo=p?{}.toString:function(){return"[object "+uo(this)+"]"},mo=Ve("toStringTag"),Ur={},vo=co.IteratorPrototype,bo=ut,xo=D,wo=Kr,_o=Ur,So=F,Oo=t.String,Eo=t.TypeError,ko=i,jo=Ye,To=function(e){if("object"==typeof e||So(e))return e;throw Eo("Can't set "+Oo(e)+" as a prototype")},Lr=Object.setPrototypeOf||("__proto__"in{}?function(){var n,i=!1,e={};try{(n=ko(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(e,[]),i=e instanceof Array}catch(e){}return function(e,t){return jo(e),To(t),i?n(e,t):e.__proto__=t,e}}():void 0),Co=c,Po=te,$o=Jr,Io=l,Ro=Kr,Mo=Sr,f=Ve,Ao=Ur,Fo=ar.PROPER,Do=co.BUGGY_SAFARI_ITERATORS,No=f("iterator"),Lo="values",Bo=$i.charAt,zo=Ti,qr=Qr,Ho="String Iterator",Wo=(Vr=or).set,Vo=Vr.getterFor(Ho),Uo=(qr(String,"String",function(e){Wo(this,{type:Ho,string:zo(e),index:0})},function(){var e=Vo(this),t=e.string,n=e.index;return n>=t.length?{value:void 0,done:!0}:(t=Bo(t,n),e.index+=t.length,{value:t,done:!1})}),te),qo=Ye,Go=_e,Ko=Ye,Yo=Zr,Jo=Ur,Xo=Ve("iterator"),Qo=Array.prototype,g=i,p=e,Zo=F,ea=Pi,ta=Ui,na=[],ia=V("Reflect","construct"),ra=/^\s*(?:class|function)\b/,oa=g(ra.exec),aa=!ra.exec(no),co=(ro.sham=!0,!ia||p(function(){var e;return io(io.call)||!io(Object)||!io(function(){e=!0})||e})?ro:io),sa=Ue,la=s,ca=D,ua=Pi,da=_e,ha=Ur,pa=Ve("iterator"),fa=te,ga=we,ya=Ye,ma=xe,va=ao,ba=t.TypeError,xa=Ke,wa=te,_a=He,Sa=eo,Oa=to,Ea=co,ka=Ze,ja=oo,Ta=so,Ca=ao,Pa=t.Array,$a=Ve("iterator"),Ia=!1;try{var Ra=0;(ss={next:function(){return{done:!!Ra++}},return:function(){Ia=!0}})[$a]=function(){return this},Array.from(ss,function(){throw 2})}catch(e){}f=lo,c({target:"Array",stat:!0,forced:!function(e){if(void 0||Ia){var t=!1;try{var n={};n[$a]=function(){return{next:function(){return{done:t=!0}}}},e(n)}catch(e){}return t}}(function(e){Array.from(e)})},{from:f});var Ma=$i=r.Array.from,Aa=z,Vr=Ur,qr=or,Ui=(s.f,Qr),Fa="Array Iterator",Da=qr.set,Na=qr.getterFor(Fa);Ui(Array,"Array",function(e,t){Da(this,{type:Fa,target:Aa(e),index:0,kind:t})},function(){var e=Na(this),t=e.target,n=e.kind,i=e.index++;return!t||i>=t.length?{value:e.target=void 0,done:!0}:"keys"==n?{value:i,done:!1}:"values"==n?{value:t[i],done:!1}:{value:[i,t[i]],done:!1}},"values"),Vr.Arguments=Vr.Array;var La,g=ao,p={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Ba=t,za=Pi,Ha=at,Wa=Ur,Va=Ve("toStringTag");for(La in p){var Ua=Ba[La];(Ua=Ua&&Ua.prototype)&&za(Ua)!==Va&&Ha(Ua,Va,La),Wa[La]=Wa.Array}function qa(e,t,n){for(var i=ds(e),r=us(t,i),o=us(void 0===n?i:n,i),a=ps(fs(o-r,0)),s=0;r<o;r++,s++)hs(a,s,e[r]);return a.length=s,a}function Ga(e){try{return ms(e)}catch(e){return vs(bs)}}function Ka(e){var t=ws.Symbol||(ws.Symbol={});_s(t,e)||Os(t,e,{value:Ss.f(e)})}function Ya(e,t){return new(Ps(e))(0===t?0:t)}function Ja(h){var p=1==h,f=2==h,g=3==h,y=4==h,m=6==h,v=7==h,b=5==h||m;return function(e,t,n,i){for(var r,o,a=Rs(e),s=Is(a),l=$s(t,n),c=Ms(s),u=0,t=i||As,d=p?t(e,c):f||v?t(e,0):void 0;u<c;u++)if((b||u in s)&&(o=l(r=s[u],u,a),h))if(p)d[u]=o;else if(o)switch(h){case 3:return!0;case 5:return r;case 6:return u;case 2:Fs(d,r)}else switch(h){case 4:return!1;case 7:Fs(d,r)}return m?-1:g||y?y:d}}function Xa(e,t){var n=Il[e]=Zs(Ol);return xl(n,{type:vl,tag:e,description:t}),Ls||(n.description=t),n}function Qa(e,t,n){e===_l&&Qa(Rl,t,n),Gs(e);t=Js(t);return Gs(n),zs(Il,t)?(n.enumerable?(zs(e,ml)&&e[ml][t]&&(e[ml][t]=!1),n=Zs(n,{enumerable:Qs(0,!1)})):(zs(e,ml)||Tl(e,ml,Qs(1,{})),e[ml][t]=!0),Dl(e,t,n)):Tl(e,t,n)}function Za(t,e){Gs(t);var n=Ys(e),e=el(n).concat(rs(n));return yl(e,function(e){Ls&&!Ns(ts,n,e)||Qa(t,e,n[e])}),t}function es(e,t){return void 0===t?Zs(e):Za(Zs(e),t)}function ts(e){var e=Js(e),t=Ns(Pl,this,e);return!(this===_l&&zs(Il,e)&&!zs(Rl,e))&&(!(t||!zs(this,e)||!zs(Il,e)||zs(this,ml)&&this[ml][e])||t)}function ns(e,t){var n,e=Ys(e),t=Js(t);if(e!==_l||!zs(Il,t)||zs(Rl,t))return n=jl(e,t),!n||!zs(Il,t)||zs(e,ml)&&e[ml][t]||(n.enumerable=!0),n}function is(e){var e=Cl(Ys(e)),t=[];return yl(e,function(e){zs(Il,e)||zs(cl,e)||$l(t,e)}),t}function rs(e){var t=e===_l,e=Cl(t?Rl:Ys(e)),n=[];return yl(e,function(e){!zs(Il,e)||t&&!zs(_l,e)||$l(n,Il[e])}),n}var os=g,as=N,ss=Array.isArray||function(e){return"Array"==as(e)},f={},ls=tt,cs=Pn.concat("length","prototype"),qr=(f.f=Object.getOwnPropertyNames||function(e){return ls(e,cs)},{}),us=Qe,ds=Ze,hs=oo,ps=t.Array,fs=Math.max,gs=N,ys=z,ms=f.f,vs=qa,bs="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];qr.f=function(e){return bs&&"Window"==gs(e)?Ga(e):ms(ys(e))};(Ui={}).f=Ve;var xs,ws=r,_s=u,Ss=Ui,Os=s.f,Vr=t,Es=ss,ks=co,js=H,Ts=Ve("species"),Cs=Vr.Array,Ps=function(e){var t;return Es(e)&&(t=e.constructor,(ks(t)&&(t===Cs||Es(t.prototype))||js(t)&&null===(t=t[Ts]))&&(t=void 0)),void 0===t?Cs:t},$s=Ke,Is=ie,Rs=He,Ms=Ze,As=Ya,Fs=i([].push),Ur={forEach:Ja(0),map:Ja(1),filter:Ja(2),some:Ja(3),every:Ja(4),find:Ja(5),findIndex:Ja(6),filterReject:Ja(7)},p=c,g=t,Pn=V,Ds=J,Ns=te,Vr=i,Ls=n,Bs=e,zs=u,Hs=ss,Ws=F,Vs=H,Us=me,qs=Ce,Gs=Ye,Ks=He,Ys=z,Js=Ue,Xs=Ti,Qs=D,Zs=ut,el=Nn,Ce=f,tl=qr,nl=vc,il=X,rl=s,y=gr,ol=ne,al=Hn,sl=Sr,a=a.exports,ll=Ki,cl=Xx,ul=We,dl=Ve,hl=Ui,pl=Ka,fl=Kr,gl=or,yl=Ur.forEach,ml=ll("hidden"),vl="Symbol",ll="prototype",bl=dl("toPrimitive"),xl=gl.set,wl=gl.getterFor(vl),_l=Object[ll],Sl=g.Symbol,Ol=Sl&&Sl[ll],El=g.TypeError,gl=g.QObject,kl=Pn("JSON","stringify"),jl=il.f,Tl=rl.f,Cl=tl.f,Pl=ol.f,$l=Vr([].push),Il=a("symbols"),Rl=a("op-symbols"),Ml=a("string-to-symbol-registry"),Al=a("symbol-to-string-registry"),g=a("wks"),Fl=!gl||!gl[ll]||!gl[ll].findChild,Dl=Ls&&Bs(function(){return 7!=Zs(Tl({},"a",{get:function(){return Tl(this,"a",{value:7}).a}})).a})?function(e,t,n){var i=jl(_l,t);i&&delete _l[t],Tl(e,t,n),i&&e!==_l&&Tl(_l,t,i)}:Tl,Nl=(o||(Ol=(Sl=function(){if(Us(Ol,this))throw El("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?Xs(arguments[0]):void 0,t=ul(e),n=function(e){this===_l&&Ns(n,Rl,e),zs(this,ml)&&zs(this[ml],t)&&(this[ml][t]=!1),Dl(this,t,Qs(1,e))};return Ls&&Fl&&Dl(_l,t,{configurable:!0,set:n}),Xa(t,e)})[ll],sl(Ol,"toString",function(){return wl(this).tag}),sl(Sl,"withoutSetter",function(e){return Xa(ul(e),e)}),ol.f=ts,rl.f=Qa,y.f=Za,il.f=ns,Ce.f=tl.f=is,nl.f=rs,hl.f=function(e){return Xa(dl(e),e)},Ls&&Tl(Ol,"description",{configurable:!0,get:function(){return wl(this).description}})),p({global:!0,wrap:!0,forced:!o,sham:!o},{Symbol:Sl}),yl(el(g),function(e){pl(e)}),p({target:vl,stat:!0,forced:!o},{for:function(e){e=Xs(e);if(zs(Ml,e))return Ml[e];var t=Sl(e);return Ml[e]=t,Al[t]=e,t},keyFor:function(e){if(!qs(e))throw El(e+" is not a symbol");if(zs(Al,e))return Al[e]},useSetter:function(){Fl=!0},useSimple:function(){Fl=!1}}),p({target:"Object",stat:!0,forced:!o,sham:!Ls},{create:es,defineProperty:Qa,defineProperties:Za,getOwnPropertyDescriptor:ns}),p({target:"Object",stat:!0,forced:!o},{getOwnPropertyNames:is,getOwnPropertySymbols:rs}),p({target:"Object",stat:!0,forced:Bs(function(){nl.f(1)})},{getOwnPropertySymbols:function(e){return nl.f(Ks(e))}}),kl&&(Pn=!o||Bs(function(){var e=Sl();return"[null]"!=kl([e])||"{}"!=kl({a:e})||"{}"!=kl(Object(e))}),p({target:"JSON",stat:!0,forced:Pn},{stringify:function(e,t,n){var i=al(arguments),r=t;if((Vs(t)||void 0!==e)&&!qs(e))return Hs(t)||(t=function(e,t){if(Ws(r)&&(t=Ns(r,this,e,t)),!qs(t))return t}),i[1]=t,Ds(kl,null,i)}})),Ol[bl]||(xs=Ol.valueOf,sl(Ol,bl,function(e){return Ns(xs,this)})),fl(Sl,vl),cl[ml]=!0,r.Object.getOwnPropertySymbols),Vr={exports:{}},a=c,gl=e,Ll=z,Bl=X.f,ll=n,ol=gl(function(){Bl(1)}),zl=(a({target:"Object",stat:!0,forced:!ll||ol,sham:!ll},{getOwnPropertyDescriptor:function(e,t){return Bl(Ll(e),t)}}),r.Object),rl=Vr.exports=function(e,t){return zl.getOwnPropertyDescriptor(e,t)};zl.getOwnPropertyDescriptor.sham&&(rl.sham=!0);var Hl=y=Vr.exports,il=V,Wl=f,Vl=vc,Ul=Ye,ql=i([].concat),Gl=Ce=il("Reflect","ownKeys")||function(e){var t=Wl.f(Ul(e)),n=Vl.f;return n?ql(t,n(e)):t},Kl=z,Yl=X,Jl=oo,Xl=(c({target:"Object",stat:!0,sham:!n},{getOwnPropertyDescriptors:function(e){for(var t,n,i=Kl(e),r=Yl.f,o=Gl(i),a={},s=0;o.length>s;)void 0!==(n=r(i,t=o[s++]))&&Jl(a,t,n);return a}}),r.Object.getOwnPropertyDescriptors),tl={exports:{}},hl=c,g=gr.f,Ql=(hl({target:"Object",stat:!0,forced:Object.defineProperties!==g,sham:!n},{defineProperties:g}),r.Object),o=tl.exports=function(e,t){return Ql.defineProperties(e,t)},Zl=(Ql.defineProperties.sham&&(o.sham=!0),tl.exports),Bs={exports:{}},p=c,Pn=s.f,ec=(p({target:"Object",stat:!0,forced:Object.defineProperty!==Pn,sham:!n},{defineProperty:Pn}),r.Object),sl=Bs.exports=function(e,t,n){return ec.defineProperty(e,t,n)};ec.defineProperty.sham&&(sl.sham=!0);var tc=bl=Bs.exports;function m(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var nc=bl;function ic(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),nc(e,i.key,i)}}function v(e,t,n){t&&ic(e.prototype,t),n&&ic(e,n),nc(e,"prototype",{writable:!1})}function rc(e,t,n){t in e?nc(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}c({target:"Array",stat:!0},{isArray:ss});var oc=fl=r.Array.isArray;function ac(e){if(oc(e))return e}function sc(t){return 51<=uc||!cc(function(){var e=[];return(e.constructor={})[dc]=function(){return{foo:1}},1!==e[t](Boolean).foo})}function lc(e){var t;if(pc(e))return t=e[bc],void 0!==t?t:hc(e)}var cc=e,uc=be,dc=(gl=Ve)("species"),a=c,ol=t,ll=e,hc=ss,pc=H,fc=He,gc=Ze,yc=oo,mc=Ya,rl=sc,vc=be,bc=(Vr=Ve)("isConcatSpreadable"),xc=9007199254740991,wc="Maximum allowed index exceeded",_c=ol.TypeError,il=51<=vc||!ll(function(){var e=[];return e[bc]=!1,e.concat()[0]!==e}),gr=rl("concat"),Sc=(a({target:"Array",proto:!0,forced:hl=!il||!gr},{concat:function(e){for(var t,n,i,r=fc(this),o=mc(r,0),a=0,s=-1,l=arguments.length;s<l;s++)if(lc(i=-1===s?r:arguments[s])){if(n=gc(i),xc<a+n)throw _c(wc);for(t=0;t<n;t++,a++)t in i&&yc(o,a,i[t])}else{if(xc<=a)throw _c(wc);yc(o,a++,i)}return o.length=a,o}}),(g=Ka)("asyncIterator"),Ka("hasInstance"),Ka("isConcatSpreadable"),Ka("iterator"),Ka("match"),Ka("matchAll"),Ka("replace"),Ka("search"),Ka("species"),Ka("split"),Ka("toPrimitive"),Ka("toStringTag"),Ka("unscopables"),Kr(t.JSON,"JSON",!0),tl=o=r.Symbol,Ka("asyncDispose"),Ka("dispose"),Ka("matcher"),Ka("metadata"),Ka("observable"),Ka("patternMatch"),Ka("replaceAll"),tl);function Oc(e,t){var n=null==e?null:void 0!==Sc&&os(e)||e["@@iterator"];if(null!=n){var i,r,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(i=n.next()).done)&&(o.push(i.value),!t||o.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw r}}return o}}var p=c,Pn=t,Ec=ss,kc=co,jc=H,Tc=Qe,Cc=Ze,Pc=z,$c=oo,sl=Ve,Ic=Hn,Bs=sc("slice"),Rc=sl("species"),Mc=Pn.Array,Ac=Math.max;function Fc(e){var t=e.slice;return e===Lc||Dc(Lc,e)&&t===Lc.slice?Nc:t}p({target:"Array",proto:!0,forced:!Bs},{slice:function(e,t){var n,i,r,o=Pc(this),a=Cc(o),s=Tc(e,a),l=Tc(void 0===t?a:t,a);if(Ec(o)&&(n=o.constructor,(n=kc(n)&&(n===Mc||Ec(n.prototype))||jc(n)&&null===(n=n[Rc])?void 0:n)===Mc||void 0===n))return Ic(o,s,l);for(i=new(void 0===n?Mc:n)(Ac(l-s,0)),r=0;s<l;s++,r++)s in o&&$c(i,r,o[s]);return i.length=r,i}});var bl=Qn("Array").slice,Dc=me,Nc=bl,Lc=Array.prototype,Bc=Fc,zc=$i;function Hc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Wc(e,t){if(e){if("string"==typeof e)return Hc(e,t);var n=Bc(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?zc(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Hc(e,t):void 0}}function Vc(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function L(e,t){return ac(e)||Oc(e,t)||Wc(e,t)||Vc()}var Uc=Ui.f("iterator");function b(e){return(b="function"==typeof Sc&&"symbol"==typeof Uc?function(e){return typeof e}:function(e){return e&&"function"==typeof Sc&&e.constructor===Sc&&e!==Sc.prototype?"symbol":typeof e})(e)}function qc(e){if(oc(e))return Hc(e)}function Gc(e){if(void 0!==Sc&&null!=os(e)||null!=e["@@iterator"])return zc(e)}function Kc(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Yc(e){return qc(e)||Gc(e)||Wc(e)||Kc()}var Jc=o,gl=Qn("Array").concat,Xc=me,Qc=gl,Zc=Array.prototype,eu=function(e){var t=e.concat;return e===Zc||Xc(Zc,e)&&t===Zc.concat?Qc:t},tu=Fc,x=(c({target:"Reflect",stat:!0},{ownKeys:Ce}),r.Reflect.ownKeys,fl),Vr=c,nu=Ur.map,ol=sc("map"),vc=(Vr({target:"Array",proto:!0,forced:!ol},{map:function(e){return nu(this,e,1<arguments.length?arguments[1]:void 0)}}),Qn("Array").map),iu=me,ru=vc,ou=Array.prototype,au=function(e){var t=e.map;return e===ou||iu(ou,e)&&t===ou.map?ru:t},ll=c,su=He,lu=Nn,rl=e(function(){lu(1)}),w=(ll({target:"Object",stat:!0,forced:rl},{keys:function(e){return lu(su(e))}}),r.Object.keys),il=c,gr=i,cu=t.Date,uu=gr(cu.prototype.getTime);function du(e,t){var n=[][e];return!!n&&pu(function(){n.call(null,t||function(){return 1},1)})}il({target:"Date",stat:!0},{now:function(){return uu(new cu)}});var hu=r.Date.now,pu=e,fu=Ur.forEach,a=du("forEach")?[].forEach:function(e){return fu(this,e,1<arguments.length?arguments[1]:void 0)},hl=(c({target:"Array",proto:!0,forced:[].forEach!=a},{forEach:a}),Qn("Array").forEach),gu=Pi,yu=u,mu=me,vu=hl,bu=Array.prototype,xu={DOMTokenList:!0,NodeList:!0},_=function(e){var t=e.forEach;return e===bu||mu(bu,e)&&t===bu.forEach||yu(xu,gu(e))?vu:t},g=c,wu=ss,_u=i([].reverse),tl=[1,2],sl=(g({target:"Array",proto:!0,forced:String(tl)===String(tl.reverse())},{reverse:function(){return wu(this)&&(this.length=this.length),_u(this)}}),Qn("Array").reverse),Su=me,Ou=sl,Eu=Array.prototype,ku=function(e){var t=e.reverse;return e===Eu||Su(Eu,e)&&t===Eu.reverse?Ou:t},Pn=c,p=t,ju=Qe,Tu=Xe,Cu=Ze,Pu=He,$u=Ya,Iu=oo,Bs=sc("splice"),Ru=p.TypeError,Mu=Math.max,Au=Math.min,bl=(Pn({target:"Array",proto:!0,forced:!Bs},{splice:function(e,t){var n,i,r,o,a,s,l=Pu(this),c=Cu(l),u=ju(e,c),d=arguments.length;if(0===d?n=i=0:i=1===d?(n=0,c-u):(n=d-2,Au(Mu(Tu(t),0),c-u)),9007199254740991<c+n-i)throw Ru("Maximum allowed length exceeded");for(r=$u(l,i),o=0;o<i;o++)(a=u+o)in l&&Iu(r,o,l[a]);if(n<(r.length=i)){for(o=u;o<c-i;o++)s=o+n,(a=o+i)in l?l[s]=l[a]:delete l[s];for(o=c;c-i+n<o;o--)delete l[o-1]}else if(i<n)for(o=c-i;u<o;o--)s=o+n-1,(a=o+i-1)in l?l[s]=l[a]:delete l[s];for(o=0;o<n;o++)l[o+u]=arguments[o+2];return l.length=c-i+n,r}}),Qn("Array").splice),Fu=me,Du=bl,Nu=Array.prototype,Lu=function(e){var t=e.splice;return e===Nu||Fu(Nu,e)&&t===Nu.splice?Du:t},$i=c,Bu=d.includes;function zu(e){if(Uu(e))throw qu("The method doesn't accept regular expressions");return e}$i({target:"Array",proto:!0},{includes:function(e){return Bu(this,e,1<arguments.length?arguments[1]:void 0)}});var Ui=Qn("Array").includes,Hu=H,Wu=N,Vu=Ve("match"),Uu=function(e){var t;return Hu(e)&&(void 0!==(t=e[Vu])?!!t:"RegExp"==Wu(e))},qu=t.TypeError,Gu=Ve("match"),o=c,Ku=zu,Yu=B,Ju=Ti,gl=function(t){var n=/./;try{"/./"[t](n)}catch(e){try{return n[Gu]=!1,"/./"[t](n)}catch(e){}}return!1},Xu=i("".indexOf),Ce=(o({target:"String",proto:!0,forced:!gl("includes")},{includes:function(e){return!!~Xu(Ju(Yu(this)),Ju(Ku(e)),1<arguments.length?arguments[1]:void 0)}}),Qn("String").includes),Qu=me,Zu=Ui,ed=Ce,td=Array.prototype,nd=String.prototype,id=function(e){var t=e.includes;return e===td||Qu(td,e)&&t===td.includes?Zu:"string"==typeof e||e===nd||Qu(nd,e)&&t===nd.includes?ed:t},rd=He,od=l,fl=hr;c({target:"Object",stat:!0,forced:e(function(){od(1)}),sham:!fl},{getPrototypeOf:function(e){return od(rd(e))}});var ad=Vr=r.Object.getPrototypeOf,ol=c,sd=Ur.filter;function ld(s){return function(e){for(var t,n=gd(e),i=fd(n),r=i.length,o=0,a=[];o<r;)t=i[o++],pd&&!yd(n,t)||md(a,s?[t,n[t]]:n[t]);return a}}ol({target:"Array",proto:!0,forced:!sc("filter")},{filter:function(e){return sd(this,e,1<arguments.length?arguments[1]:void 0)}});var vc=Qn("Array").filter,cd=me,ud=vc,dd=Array.prototype,hd=function(e){var t=e.filter;return e===dd||cd(dd,e)&&t===dd.filter?ud:t},pd=n,fd=Nn,gd=z,yd=(ll=i)(ne.f),md=ll([].push),vd=(ld(!0),ld(!1));function bd(t){return function(e){e=wd(xd(e));return 1&t&&(e=_d(e,Sd,"")),e=2&t?_d(e,Od,""):e}}(rl=c)({target:"Object",stat:!0},{values:function(e){return vd(e)}}),r.Object.values;var xd=B,wd=Ti,il=gr="\t\n\v\f\r                 \u2028\u2029\ufeff",_d=i("".replace),a="["+il+"]",Sd=RegExp("^"+a+a+"*"),Od=RegExp(a+a+"*$"),hl={start:bd(1),end:bd(2),trim:bd(3)},ss=e,g=i,Ed=Ti,kd=hl.trim,tl=gr,jd=t.parseInt,Td=(sl=t.Symbol)&&sl.iterator,Cd=/^[+-]?0x/i,Pd=g(Cd.exec),p=8!==jd(tl+"08")||22!==jd(tl+"0x16")||Td&&!ss(function(){jd(Object(Td))})?function(e,t){e=kd(Ed(e));return jd(e,t>>>0||(Pd(Cd,e)?16:10))}:jd,$d=(c({global:!0,forced:parseInt!=p},{parseInt:p}),r.parseInt),Pn=c,Bs=i,Id=d.indexOf,bl=du,Rd=Bs([].indexOf),Md=!!Rd&&1/Rd([1],1,-0)<0,$i=bl("indexOf"),o=(Pn({target:"Array",proto:!0,forced:Md||!$i},{indexOf:function(e){var t=1<arguments.length?arguments[1]:void 0;return Md?Rd(this,e,t)||0:Id(this,e,t)}}),Qn("Array").indexOf),Ad=me,Fd=o,Dd=Array.prototype,T=function(e){var t=e.indexOf;return e===Dd||Ad(Dd,e)&&t===Dd.indexOf?Fd:t},Nd=ar.PROPER,Ld=e,Bd=gr,gl=c,zd=hl.trim;function Hd(e,t){return Vd.create(e,t)}function Wd(e,t,n){var i=Jd(n,t-1),n=Jd(n,t+1);return Yd(th,e)&&!Yd(nh,n)||Yd(nh,e)&&!Yd(th,i)?"\\u"+Zd(Xd(e,0),16):e}gl({target:"String",proto:!0,forced:function(e){return Ld(function(){return!!Bd[e]()||"​…᠎"!=="​…᠎"[e]()||Nd&&Bd[e].name!==e})}("trim")},{trim:function(){return zd(this)}}),Qn("String").trim,c({target:"Object",stat:!0,sham:!n},{create:ut});var Vd=r.Object,Ud=Hd,Ui=c,Ce=V,qd=J,hr=i,fl=e,Gd=t.Array,Kd=Ce("JSON","stringify"),Yd=hr(/./.exec),Jd=hr("".charAt),Xd=hr("".charCodeAt),Qd=hr("".replace),Zd=hr(1..toString),eh=/[\uD800-\uDFFF]/g,th=/^[\uD800-\uDBFF]$/,nh=/^[\uDC00-\uDFFF]$/,ol=fl(function(){return'"\\udf06\\ud834"'!==Kd("\udf06\ud834")||'"\\udead"'!==Kd("\udead")}),ih=(Kd&&Ui({target:"JSON",stat:!0,forced:ol},{stringify:function(e,t,n){for(var i=0,r=arguments.length,o=Gd(r);i<r;i++)o[i]=arguments[i];var a=qd(Kd,null,o);return"string"==typeof a?Qd(a,eh,Wd):a}}),r),rh=J;function oh(o){return function(e,t){var n=2<dh(arguments.length,1),i=ch(e)?e:hh(e),r=n?uh(arguments,2):void 0;return o(n?function(){lh(i,this,r)}:i,t)}}ih.JSON||(ih.JSON={stringify:JSON.stringify});var ah=function(e,t,n){return rh(ih.JSON.stringify,null,arguments)},sh=t.TypeError,vc=c,Nn=t,lh=J,ch=F,uh=Hn,dh=function(e,t){if(e<t)throw sh("Not enough arguments");return e},ne=/MSIE .\./.test(ve),hh=Nn.Function,ph=(vc({global:!0,bind:!0,forced:ne},{setTimeout:oh(Nn.setTimeout),setInterval:oh(Nn.setInterval)}),r.setTimeout),fh=He,gh=Qe,yh=Ze,ll=(c({target:"Array",proto:!0},{fill:function(e){for(var t=fh(this),n=yh(t),i=arguments.length,r=gh(1<i?arguments[1]:void 0,n),i=2<i?arguments[2]:void 0,o=void 0===i?n:gh(i,n);r<o;)t[r++]=e;return t}}),Qn("Array").fill),mh=me,vh=ll,bh=Array.prototype,xh=function(e){var t=e.fill;return e===bh||mh(bh,e)&&t===bh.fill?vh:t};function wh(){return(wh=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,i=arguments[t];for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e}).apply(this,arguments)}function _h(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}function Sh(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}qm="function"!=typeof Object.assign?function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var i=arguments[n];if(null!=i)for(var r in i)i.hasOwnProperty(r)&&(t[r]=i[r])}return t}:Object.assign;var Oh,Eh=qm,kh=["","webkit","Moz","MS","ms","o"],rl="undefined"==typeof document?{style:{}}:document.createElement("div"),jh=Math.round,Th=Math.abs,Ch=Date.now;function Ph(e,t){for(var n,i=t[0].toUpperCase()+t.slice(1),r=0;r<kh.length;){if((n=(n=kh[r])?n+i:t)in e)return n;r++}}Oh="undefined"==typeof window?{}:window;var $h=Ph(rl.style,"touchAction"),Ih=void 0!==$h;function Rh(){if(!Ih)return!1;var t={},n=Oh.CSS&&Oh.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(e){return t[e]=!n||Oh.CSS.supports("touch-action",e)}),t}var Mh="manipulation",Ah="none",Fh="pan-x",Dh="pan-y",Nh=Rh(),il=/mobile|tablet|ip(ad|hone|od)|android/i,Lh="ontouchstart"in Oh,Bh=void 0!==Ph(Oh,"PointerEvent"),zh=Lh&&il.test(navigator.userAgent),Hh="touch",a="pen",sl="kinect",Wh=1,Vh=4,Uh=8,qh=["x","y"],Gh=["clientX","clientY"];function Kh(e,t,n){if(e)if(e.forEach)e.forEach(t,n);else if(void 0!==e.length)for(i=0;i<e.length;)t.call(n,e[i],i,e),i++;else for(var i in e)e.hasOwnProperty(i)&&t.call(n,e[i],i,e)}function Yh(e,t){return"function"==typeof e?e.apply(t&&t[0]||void 0,t):e}function Jh(e,t){return-1<e.indexOf(t)}function Xh(e){if(Jh(e,Ah))return Ah;var t=Jh(e,Fh),n=Jh(e,Dh);return t&&n?Ah:t||n?t?Fh:Dh:Jh(e,Mh)?Mh:"auto"}var Qh=function(){function e(e,t){this.manager=e,this.set(t)}var t=e.prototype;return t.set=function(e){"compute"===e&&(e=this.compute()),Ih&&this.manager.element.style&&Nh[e]&&(this.manager.element.style[$h]=e),this.actions=e.toLowerCase().trim()},t.update=function(){this.set(this.manager.options.touchAction)},t.compute=function(){var t=[];return Kh(this.manager.recognizers,function(e){Yh(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))}),Xh(t.join(" "))},t.preventDefaults=function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented)t.preventDefault();else{var i=this.actions,r=Jh(i,Ah)&&!Nh.none,o=Jh(i,Dh)&&!Nh[Dh],i=Jh(i,Fh)&&!Nh[Fh];if(r){var a=1===e.pointers.length,s=e.distance<2,e=e.deltaTime<250;if(a&&s&&e)return}if(!i||!o)return r||o&&6&n||i&&24&n?this.preventSrc(t):void 0}},t.preventSrc=function(e){this.manager.session.prevented=!0,e.preventDefault()},e}();function Zh(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function ep(e){var t=e.length;if(1===t)return{x:jh(e[0].clientX),y:jh(e[0].clientY)};for(var n=0,i=0,r=0;r<t;)n+=e[r].clientX,i+=e[r].clientY,r++;return{x:jh(n/t),y:jh(i/t)}}function tp(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:jh(e.pointers[n].clientX),clientY:jh(e.pointers[n].clientY)},n++;return{timeStamp:Ch(),pointers:t,center:ep(t),deltaX:e.deltaX,deltaY:e.deltaY}}function np(e,t,n){var i=t[(n=n||qh)[0]]-e[n[0]],t=t[n[1]]-e[n[1]];return Math.sqrt(i*i+t*t)}function ip(e,t,n){var i=t[(n=n||qh)[0]]-e[n[0]],t=t[n[1]]-e[n[1]];return 180*Math.atan2(t,i)/Math.PI}function rp(e,t){return e===t?1:Th(e)>=Th(t)?e<0?2:4:t<0?8:16}function op(e,t){var n=t.center,i=e.offsetDelta||{},r=e.prevDelta||{},o=e.prevInput||{};t.eventType!==Wh&&o.eventType!==Vh||(r=e.prevDelta={x:o.deltaX||0,y:o.deltaY||0},i=e.offsetDelta={x:n.x,y:n.y}),t.deltaX=r.x+(n.x-i.x),t.deltaY=r.y+(n.y-i.y)}function ap(e,t,n){return{x:t/e||0,y:n/e||0}}function sp(e,t){return np(t[0],t[1],Gh)/np(e[0],e[1],Gh)}function lp(e,t){return ip(t[1],t[0],Gh)+ip(e[1],e[0],Gh)}function cp(e,t){var n,i,r,o,a=e.lastInterval||t,s=t.timeStamp-a.timeStamp;t.eventType!==Uh&&(25<s||void 0===a.velocity)?(n=(r=ap(s,s=t.deltaX-a.deltaX,o=t.deltaY-a.deltaY)).x,i=r.y,r=Th(r.x)>Th(r.y)?r.x:r.y,o=rp(s,o),e.lastInterval=t):(r=a.velocity,n=a.velocityX,i=a.velocityY,o=a.direction),t.velocity=r,t.velocityX=n,t.velocityY=i,t.direction=o}function up(e,t){var n=e.session,i=t.pointers,r=i.length,r=(n.firstInput||(n.firstInput=tp(t)),1<r&&!n.firstMultiple?n.firstMultiple=tp(t):1===r&&(n.firstMultiple=!1),n.firstInput),o=n.firstMultiple,a=(o||r).center,s=t.center=ep(i),r=(t.timeStamp=Ch(),t.deltaTime=t.timeStamp-r.timeStamp,t.angle=ip(a,s),t.distance=np(a,s),op(n,t),t.offsetDirection=rp(t.deltaX,t.deltaY),ap(t.deltaTime,t.deltaX,t.deltaY)),a=(t.overallVelocityX=r.x,t.overallVelocityY=r.y,t.overallVelocity=Th(r.x)>Th(r.y)?r.x:r.y,t.scale=o?sp(o.pointers,i):1,t.rotation=o?lp(o.pointers,i):0,t.maxPointers=!n.prevInput||t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers,cp(n,t),e.element),s=t.srcEvent,r=s.composedPath?s.composedPath()[0]:s.path?s.path[0]:s.target;Zh(r,a)&&(a=r),t.target=a}function dp(e,t,n){var i=n.pointers.length,r=n.changedPointers.length,o=t&Wh&&i-r==0,i=t&(Vh|Uh)&&i-r==0;n.isFirst=!!o,n.isFinal=!!i,o&&(e.session={}),n.eventType=t,up(e,n),e.emit("hammer.input",n),e.recognize(n),e.session.prevInput=n}function hp(e){return e.trim().split(/\s+/g)}function pp(t,e,n){Kh(hp(e),function(e){t.addEventListener(e,n,!1)})}function fp(t,e,n){Kh(hp(e),function(e){t.removeEventListener(e,n,!1)})}function gp(e){e=e.ownerDocument||e;return e.defaultView||e.parentWindow||window}var yp=function(){function e(t,e){var n=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){Yh(t.options.enable,[t])&&n.handler(e)},this.init()}var t=e.prototype;return t.handler=function(){},t.init=function(){this.evEl&&pp(this.element,this.evEl,this.domHandler),this.evTarget&&pp(this.target,this.evTarget,this.domHandler),this.evWin&&pp(gp(this.element),this.evWin,this.domHandler)},t.destroy=function(){this.evEl&&fp(this.element,this.evEl,this.domHandler),this.evTarget&&fp(this.target,this.evTarget,this.domHandler),this.evWin&&fp(gp(this.element),this.evWin,this.domHandler)},e}();function mp(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var i=0;i<e.length;){if(n&&e[i][n]==t||!n&&e[i]===t)return i;i++}return-1}var vp={pointerdown:Wh,pointermove:2,pointerup:Vh,pointercancel:Uh,pointerout:Uh},bp={2:Hh,3:a,4:"mouse",5:sl},xp="pointerdown",wp="pointermove pointerup pointercancel",_p=(Oh.MSPointerEvent&&!Oh.PointerEvent&&(xp="MSPointerDown",wp="MSPointerMove MSPointerUp MSPointerCancel"),function(t){function n(){var e=n.prototype;return e.evEl=xp,e.evWin=wp,(e=t.apply(this,arguments)||this).store=e.manager.session.pointerEvents=[],e}return _h(n,t),n.prototype.handler=function(e){var t=this.store,n=!1,i=e.type.toLowerCase().replace("ms",""),i=vp[i],r=bp[e.pointerType]||e.pointerType,o=r===Hh,a=mp(t,e.pointerId,"pointerId");i&Wh&&(0===e.button||o)?a<0&&(t.push(e),a=t.length-1):i&(Vh|Uh)&&(n=!0),a<0||(t[a]=e,this.callback(this.manager,i,{pointers:t,changedPointers:[e],pointerType:r,srcEvent:e}),n&&t.splice(a,1))},n}(yp));function Sp(e){return Array.prototype.slice.call(e,0)}function Op(e,n,t){for(var i=[],r=[],o=0;o<e.length;){var a=n?e[o][n]:e[o];mp(r,a)<0&&i.push(e[o]),r[o]=a,o++}return i=t?n?i.sort(function(e,t){return e[n]>t[n]}):i.sort():i}var Ep={touchstart:Wh,touchmove:2,touchend:Vh,touchcancel:Uh},kp=function(t){function n(){var e;return n.prototype.evTarget="touchstart touchmove touchend touchcancel",(e=t.apply(this,arguments)||this).targetIds={},e}return _h(n,t),n.prototype.handler=function(e){var t=Ep[e.type],n=jp.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:Hh,srcEvent:e})},n}(yp);function jp(e,t){var n,i=Sp(e.touches),r=this.targetIds;if(t&(2|Wh)&&1===i.length)return r[i[0].identifier]=!0,[i,i];var o=Sp(e.changedTouches),a=[],s=this.target,l=i.filter(function(e){return Zh(e.target,s)});if(t===Wh)for(n=0;n<l.length;)r[l[n].identifier]=!0,n++;for(n=0;n<o.length;)r[o[n].identifier]&&a.push(o[n]),t&(Vh|Uh)&&delete r[o[n].identifier],n++;return a.length?[Op(l.concat(a),"identifier",!0),a]:void 0}var Tp={mousedown:Wh,mousemove:2,mouseup:Vh},Cp=function(t){function n(){var e=n.prototype;return e.evEl="mousedown",e.evWin="mousemove mouseup",(e=t.apply(this,arguments)||this).pressed=!1,e}return _h(n,t),n.prototype.handler=function(e){var t=Tp[e.type];t&Wh&&0===e.button&&(this.pressed=!0),2&t&&1!==e.which&&(t=Vh),this.pressed&&(t&Vh&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:"mouse",srcEvent:e}))},n}(yp),Pp=2500,$p=25;function Ip(e){var t,n,e=e.changedPointers[0];e.identifier===this.primaryTouch&&(t={x:e.clientX,y:e.clientY},n=this.lastTouches,this.lastTouches.push(t),setTimeout(function(){var e=n.indexOf(t);-1<e&&n.splice(e,1)},Pp))}function Rp(e,t){e&Wh?(this.primaryTouch=t.changedPointers[0].identifier,Ip.call(this,t)):e&(Vh|Uh)&&Ip.call(this,t)}function Mp(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,i=0;i<this.lastTouches.length;i++){var r=this.lastTouches[i],o=Math.abs(t-r.x),r=Math.abs(n-r.y);if(o<=$p&&r<=$p)return!0}return!1}var Ap=function(){return function(n){function e(e,t){var o=n.call(this,e,t)||this;return o.handler=function(e,t,n){var i=n.pointerType===Hh,r="mouse"===n.pointerType;if(!(r&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(i)Rp.call(Sh(Sh(o)),t,n);else if(r&&Mp.call(Sh(Sh(o)),n))return;o.callback(e,t,n)}},o.touch=new kp(o.manager,o.handler),o.mouse=new Cp(o.manager,o.handler),o.primaryTouch=null,o.lastTouches=[],o}return _h(e,n),e.prototype.destroy=function(){this.touch.destroy(),this.mouse.destroy()},e}(yp)}();function Fp(e){var t=e.options.inputClass,t=t||(Bh?_p:zh?kp:Lh?Ap:Cp);return new t(e,dp)}function Dp(e,t,n){return Array.isArray(e)&&(Kh(e,n[t],n),1)}var Np=1;function Lp(e,t){t=t.manager;return t?t.get(e):e}function Bp(e){return 16&e?"cancel":8&e?"end":4&e?"move":2&e?"start":""}var zp=function(){function e(e){this.options=wh({enable:!0},e=void 0===e?{}:e),this.id=Np++,this.manager=null,this.state=1,this.simultaneous={},this.requireFail=[]}var t=e.prototype;return t.set=function(e){return Eh(this.options,e),this.manager&&this.manager.touchAction.update(),this},t.recognizeWith=function(e){if(Dp(e,"recognizeWith",this))return this;var t=this.simultaneous;return t[(e=Lp(e,this)).id]||(t[e.id]=e).recognizeWith(this),this},t.dropRecognizeWith=function(e){return Dp(e,"dropRecognizeWith",this)||(e=Lp(e,this),delete this.simultaneous[e.id]),this},t.requireFailure=function(e){if(Dp(e,"requireFailure",this))return this;var t=this.requireFail;return-1===mp(t,e=Lp(e,this))&&(t.push(e),e.requireFailure(this)),this},t.dropRequireFailure=function(e){if(Dp(e,"dropRequireFailure",this))return this;e=Lp(e,this);e=mp(this.requireFail,e);return-1<e&&this.requireFail.splice(e,1),this},t.hasRequireFailures=function(){return 0<this.requireFail.length},t.canRecognizeWith=function(e){return!!this.simultaneous[e.id]},t.emit=function(t){var n=this,e=this.state;function i(e){n.manager.emit(e,t)}e<8&&i(n.options.event+Bp(e)),i(n.options.event),t.additionalEvent&&i(t.additionalEvent),8<=e&&i(n.options.event+Bp(e))},t.tryEmit=function(e){if(this.canEmit())return this.emit(e);this.state=32},t.canEmit=function(){for(var e=0;e<this.requireFail.length;){if(!(33&this.requireFail[e].state))return!1;e++}return!0},t.recognize=function(e){e=Eh({},e);if(!Yh(this.options.enable,[this,e]))return this.reset(),void(this.state=32);56&this.state&&(this.state=1),this.state=this.process(e),30&this.state&&this.tryEmit(e)},t.process=function(e){},t.getTouchAction=function(){},t.reset=function(){},e}(),Hp=function(t){function e(e){return(e=t.call(this,wh({event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},e=void 0===e?{}:e))||this).pTime=!1,e.pCenter=!1,e._timer=null,e._input=null,e.count=0,e}_h(e,t);var n=e.prototype;return n.getTouchAction=function(){return[Mh]},n.process=function(e){var t=this,n=this.options,i=e.pointers.length===n.pointers,r=e.distance<n.threshold,o=e.deltaTime<n.time;if(this.reset(),e.eventType&Wh&&0===this.count)return this.failTimeout();if(r&&o&&i){if(e.eventType!==Vh)return this.failTimeout();r=!this.pTime||e.timeStamp-this.pTime<n.interval,o=!this.pCenter||np(this.pCenter,e.center)<n.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,o&&r?this.count+=1:this.count=1,this._input=e,0==this.count%n.taps)return this.hasRequireFailures()?(this._timer=setTimeout(function(){t.state=8,t.tryEmit()},n.interval),2):8}return 32},n.failTimeout=function(){var e=this;return this._timer=setTimeout(function(){e.state=32},this.options.interval),32},n.reset=function(){clearTimeout(this._timer)},n.emit=function(){8===this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},e}(zp),Wp=function(t){function e(e){return t.call(this,wh({pointers:1},e=void 0===e?{}:e))||this}_h(e,t);var n=e.prototype;return n.attrTest=function(e){var t=this.options.pointers;return 0===t||e.pointers.length===t},n.process=function(e){var t=this.state,n=e.eventType,i=6&t,e=this.attrTest(e);return i&&(n&Uh||!e)?16|t:i||e?n&Vh?8|t:2&t?4|t:2:32},e}(zp);function Vp(e){return 16===e?"down":8===e?"up":2===e?"left":4===e?"right":""}var Up=function(n){function e(e){return(e=n.call(this,wh({event:"pan",threshold:10,pointers:1,direction:30},e=void 0===e?{}:e))||this).pX=null,e.pY=null,e}_h(e,n);var t=e.prototype;return t.getTouchAction=function(){var e=this.options.direction,t=[];return 6&e&&t.push(Dh),24&e&&t.push(Fh),t},t.directionTest=function(e){var t=this.options,n=!0,i=e.distance,r=e.direction,o=e.deltaX,a=e.deltaY;return r&t.direction||(i=6&t.direction?(r=0===o?1:o<0?2:4,n=o!==this.pX,Math.abs(e.deltaX)):(r=0===a?1:a<0?8:16,n=a!==this.pY,Math.abs(e.deltaY))),e.direction=r,n&&i>t.threshold&&r&t.direction},t.attrTest=function(e){return Wp.prototype.attrTest.call(this,e)&&(2&this.state||!(2&this.state)&&this.directionTest(e))},t.emit=function(e){this.pX=e.deltaX,this.pY=e.deltaY;var t=Vp(e.direction);t&&(e.additionalEvent=this.options.event+t),n.prototype.emit.call(this,e)},e}(Wp),qp=function(i){function e(e){return i.call(this,wh({event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},e=void 0===e?{}:e))||this}_h(e,i);var t=e.prototype;return t.getTouchAction=function(){return Up.prototype.getTouchAction.call(this)},t.attrTest=function(e){var t,n=this.options.direction;return 30&n?t=e.overallVelocity:6&n?t=e.overallVelocityX:24&n&&(t=e.overallVelocityY),i.prototype.attrTest.call(this,e)&&n&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers===this.options.pointers&&Th(t)>this.options.velocity&&e.eventType&Vh},t.emit=function(e){var t=Vp(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)},e}(Wp),Gp=function(n){function e(e){return n.call(this,wh({event:"pinch",threshold:0,pointers:2},e=void 0===e?{}:e))||this}_h(e,n);var t=e.prototype;return t.getTouchAction=function(){return[Ah]},t.attrTest=function(e){return n.prototype.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||2&this.state)},t.emit=function(e){var t;1!==e.scale&&(t=e.scale<1?"in":"out",e.additionalEvent=this.options.event+t),n.prototype.emit.call(this,e)},e}(Wp),Kp=function(t){function e(e){return t.call(this,wh({event:"rotate",threshold:0,pointers:2},e=void 0===e?{}:e))||this}_h(e,t);var n=e.prototype;return n.getTouchAction=function(){return[Ah]},n.attrTest=function(e){return t.prototype.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)},e}(Wp),Yp=function(t){function e(e){return(e=t.call(this,wh({event:"press",pointers:1,time:251,threshold:9},e=void 0===e?{}:e))||this)._timer=null,e._input=null,e}_h(e,t);var n=e.prototype;return n.getTouchAction=function(){return["auto"]},n.process=function(e){var t=this,n=this.options,i=e.pointers.length===n.pointers,r=e.distance<n.threshold,o=e.deltaTime>n.time;if(this._input=e,!r||!i||e.eventType&(Vh|Uh)&&!o)this.reset();else if(e.eventType&Wh)this.reset(),this._timer=setTimeout(function(){t.state=8,t.tryEmit()},n.time);else if(e.eventType&Vh)return 8;return 32},n.reset=function(){clearTimeout(this._timer)},n.emit=function(e){8===this.state&&(e&&e.eventType&Vh?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=Ch(),this.manager.emit(this.options.event,this._input)))},e}(zp),Jp={domEvents:!1,touchAction:"compute",enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},Xp=[[Kp,{enable:!1}],[Gp,{enable:!1},["rotate"]],[qp,{direction:6}],[Up,{direction:6},["swipe"]],[Hp],[Hp,{event:"doubletap",taps:2},["tap"]],[Yp]];function Qp(n,i){var r,o=n.element;o.style&&(Kh(n.options.cssProps,function(e,t){r=Ph(o.style,t),i?(n.oldCssProps[r]=o.style[r],o.style[r]=e):o.style[r]=n.oldCssProps[r]||""}),i||(n.oldCssProps={}))}function Zp(e,t){var n=document.createEvent("Event");n.initEvent(e,!0,!0),(n.gesture=t).target.dispatchEvent(n)}var ef=function(){function e(e,t){var n=this;this.options=Eh({},Jp,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=Fp(this),this.touchAction=new Qh(this,this.options.touchAction),Qp(this,!0),Kh(this.options.recognizers,function(e){var t=n.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])},this)}var t=e.prototype;return t.set=function(e){return Eh(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},t.stop=function(e){this.session.stopped=e?2:1},t.recognize=function(e){var t=this.session;if(!t.stopped){this.touchAction.preventDefaults(e);for(var n,i=this.recognizers,r=t.curRecognizer,o=((!r||8&r.state)&&(r=t.curRecognizer=null),0);o<i.length;)n=i[o],2===t.stopped||r&&n!==r&&!n.canRecognizeWith(r)?n.reset():n.recognize(e),!r&&14&n.state&&(r=t.curRecognizer=n),o++}},t.get=function(e){if(e instanceof zp)return e;for(var t=this.recognizers,n=0;n<t.length;n++)if(t[n].options.event===e)return t[n];return null},t.add=function(e){if(Dp(e,"add",this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),(e.manager=this).touchAction.update(),e},t.remove=function(e){if(Dp(e,"remove",this))return this;var t=this.get(e);return e&&-1!==(t=mp(e=this.recognizers,t))&&(e.splice(t,1),this.touchAction.update()),this},t.on=function(e,t){if(void 0===e||void 0===t)return this;var n=this.handlers;return Kh(hp(e),function(e){n[e]=n[e]||[],n[e].push(t)}),this},t.off=function(e,t){if(void 0===e)return this;var n=this.handlers;return Kh(hp(e),function(e){t?n[e]&&n[e].splice(mp(n[e],t),1):delete n[e]}),this},t.emit=function(e,t){this.options.domEvents&&Zp(e,t);var n=this.handlers[e]&&this.handlers[e].slice();if(n&&n.length){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var i=0;i<n.length;)n[i](t),i++}},t.destroy=function(){this.element&&Qp(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},e}(),tf={touchstart:Wh,touchmove:2,touchend:Vh,touchcancel:Uh},nf=function(t){function n(){var e=n.prototype;return e.evTarget="touchstart",e.evWin="touchstart touchmove touchend touchcancel",(e=t.apply(this,arguments)||this).started=!1,e}return _h(n,t),n.prototype.handler=function(e){var t,n=tf[e.type];n===Wh&&(this.started=!0),this.started&&(t=rf.call(this,e,n),n&(Vh|Uh)&&t[0].length-t[1].length==0&&(this.started=!1),this.callback(this.manager,n,{pointers:t[0],changedPointers:t[1],pointerType:Hh,srcEvent:e}))},n}(yp);function rf(e,t){var n=Sp(e.touches),e=Sp(e.changedTouches);return[n=t&(Vh|Uh)?Op(n.concat(e),"identifier",!0):n,e]}function of(n,e,t){var i="DEPRECATED METHOD: "+e+"\n"+t+" AT \n";return function(){var e=new Error("get-stack-trace"),e=e&&e.stack?e.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",t=window.console&&(window.console.warn||window.console.log);return t&&t.call(window.console,i,e),n.apply(this,arguments)}}var af=of(function(e,t,n){for(var i=Object.keys(t),r=0;r<i.length;)n&&void 0!==e[i[r]]||(e[i[r]]=t[i[r]]),r++;return e},"extend","Use `assign`."),sf=of(function(e,t){return af(e,t,!0)},"merge","Use `assign`.");function lf(e,t,n){var t=t.prototype,i=e.prototype=Object.create(t);i.constructor=e,i._super=t,n&&Eh(i,n)}function cf(e,t){return function(){return e.apply(t,arguments)}}function uf(e,t){var n,i=void 0!==Jc&&os(e)||e["@@iterator"];if(!i){if(x(e)||(i=df(e))||t&&e&&"number"==typeof e.length)return i&&(e=i),n=0,{s:t=function(){},n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,a=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return o=e.done,e},e:function(e){a=!0,r=e},f:function(){try{o||null==i.return||i.return()}finally{if(a)throw r}}}}function df(e,t){if(e){if("string"==typeof e)return hf(e,t);var n=tu(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Ma(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?hf(e,t):void 0}}function hf(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function pf(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ff(t.length?t:[hu()])}function ff(e){function t(){var e=2091639*i+2.3283064365386963e-10*a;return i=r,r=o,o=e-(a=0|e)}var n=L(gf(e),3),i=n[0],r=n[1],o=n[2],a=1;return t.uint32=function(){return 4294967296*t()},t.fract53=function(){return t()+11102230246251565e-32*(2097152*t()|0)},t.algorithm="Alea",t.seed=e,t.version="0.9",t}function gf(){for(var e=yf(),t=e(" "),n=e(" "),i=e(" "),r=0;r<arguments.length;r++)(t-=e(r<0||arguments.length<=r?void 0:arguments[r]))<0&&(t+=1),(n-=e(r<0||arguments.length<=r?void 0:arguments[r]))<0&&(n+=1),(i-=e(r<0||arguments.length<=r?void 0:arguments[r]))<0&&(i+=1);return[t,n,i]}function yf(){var r=4022871197;return function(e){for(var t=e.toString(),n=0;n<t.length;n++){var i=.02519603282416938*(r+=t.charCodeAt(n));r=(i=(i-(r=i>>>0))*r)>>>0,r+=4294967296*(i-=r)}return 2.3283064365386963e-10*(r>>>0)}}function mf(){function e(){}return{on:e,off:e,destroy:e,emit:e,get:function(){return{set:e}}}}g=function(){function e(e,t){return void 0===t&&(t={}),new ef(e,wh({recognizers:Xp.concat()},t))}return e.VERSION="2.0.17-rc",e.DIRECTION_ALL=30,e.DIRECTION_DOWN=16,e.DIRECTION_LEFT=2,e.DIRECTION_RIGHT=4,e.DIRECTION_UP=8,e.DIRECTION_HORIZONTAL=6,e.DIRECTION_VERTICAL=24,e.DIRECTION_NONE=1,e.DIRECTION_DOWN=16,e.INPUT_START=Wh,e.INPUT_MOVE=2,e.INPUT_END=Vh,e.INPUT_CANCEL=Uh,e.STATE_POSSIBLE=1,e.STATE_BEGAN=2,e.STATE_CHANGED=4,e.STATE_ENDED=8,e.STATE_RECOGNIZED=8,e.STATE_CANCELLED=16,e.STATE_FAILED=32,e.Manager=ef,e.Input=yp,e.TouchAction=Qh,e.TouchInput=kp,e.MouseInput=Cp,e.PointerEventInput=_p,e.TouchMouseInput=Ap,e.SingleTouchInput=nf,e.Recognizer=zp,e.AttrRecognizer=Wp,e.Tap=Hp,e.Pan=Up,e.Swipe=qp,e.Pinch=Gp,e.Rotate=Kp,e.Press=Yp,e.on=pp,e.off=fp,e.each=Kh,e.merge=sf,e.extend=af,e.bindFn=cf,e.assign=Eh,e.inherit=lf,e.bindFn=cf,e.prefixed=Ph,e.toArray=Sp,e.inArray=mp,e.uniqueArray=Op,e.splitStr=hp,e.boolOrFn=Yh,e.hasParent=Zh,e.addEventListeners=pp,e.removeEventListeners=fp,e.defaults=Eh({},Jp,{preset:Xp}),e}(),Jc("DELETE");var vf="undefined"!=typeof window?window.Hammer||g:mf;function bf(t){var n=this,i=(this._cleanupQueue=[],this.active=!1,this._dom={container:t,overlay:document.createElement("div")},this._dom.overlay.classList.add("vis-overlay"),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(function(){n._dom.overlay.parentNode.removeChild(n._dom.overlay)}),vf(this._dom.overlay)),e=(i.on("tap",h(e=this._onTapOverlay).call(e,this)),this._cleanupQueue.push(function(){i.destroy()}),["tap","doubletap","press","pinch","pan","panstart","panmove","panend"]);_(e).call(e,function(e){i.on(e,function(e){e.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=function(e){xf(e.target,t)||n.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push(function(){document.body.removeEventListener("click",n._onClick)})),this._escListener=function(e){("key"in e?"Escape"===e.key:27===e.keyCode)&&n.deactivate()}}function xf(e,t){for(;e;){if(e===t)return 1;e=e.parentNode}}G(bf.prototype),bf.current=null,bf.prototype.destroy=function(){this.deactivate();var e,t,n=uf(ku(e=Lu(e=this._cleanupQueue).call(e,0)).call(e));try{for(n.s();!(t=n.n()).done;)(0,t.value)()}catch(e){n.e(e)}finally{n.f()}},bf.prototype.activate=function(){bf.current&&bf.current.deactivate(),(bf.current=this).active=!0,this._dom.overlay.style.display="none",this._dom.container.classList.add("vis-active"),this.emit("change"),this.emit("activate"),document.body.addEventListener("keydown",this._escListener)},bf.prototype.deactivate=function(){this.active=!1,this._dom.overlay.style.display="block",this._dom.container.classList.remove("vis-active"),document.body.removeEventListener("keydown",this._escListener),this.emit("change"),this.emit("deactivate")},bf.prototype._onTapOverlay=function(e){this.activate(),e.srcEvent.stopPropagation()};var wf=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,_f=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,Sf=/^rgb\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *\)$/i,Of=/^rgba\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *([01]|0?\.\d+) *\)$/i;function Ef(e){if(e)for(;!0===e.hasChildNodes();){var t=e.firstChild;t&&(Ef(t),e.removeChild(t))}}function kf(e){return e instanceof String||"string"==typeof e}function jf(e){return"object"===b(e)&&null!==e}function Tf(e,t,n,i){var r=!1;(r=!0===i?null===t[n]&&void 0!==e[n]:r)?delete e[n]:e[n]=t[n]}function Cf(e,t,n){var i,r,o,a=2<arguments.length&&void 0!==n&&n;for(i in e)void 0!==t[i]&&(null===t[i]||"object"!==b(t[i])?Tf(e,t,i,a):(r=e[i],o=t[i],jf(r)&&jf(o)&&Cf(r,o,a)))}function Pf(e,t,n,i){var r=3<arguments.length&&void 0!==i&&i;if(x(n))throw new TypeError("Arrays are not supported by deepExtend");for(var o=0;o<e.length;o++){var a=e[o];if(Object.prototype.hasOwnProperty.call(n,a))if(n[a]&&n[a].constructor===Object)void 0===t[a]&&(t[a]={}),t[a].constructor===Object?S(t[a],n[a],!1,r):Tf(t,n,a,r);else{if(x(n[a]))throw new TypeError("Arrays are not supported by deepExtend");Tf(t,n,a,r)}}}function $f(e,t,n,i){var r,o=3<arguments.length&&void 0!==i&&i;if(x(n))throw new TypeError("Arrays are not supported by deepExtend");for(r in n)if(Object.prototype.hasOwnProperty.call(n,r)&&!id(e).call(e,r))if(n[r]&&n[r].constructor===Object)void 0===t[r]&&(t[r]={}),t[r].constructor===Object?S(t[r],n[r]):Tf(t,n,r,o);else if(x(n[r])){t[r]=[];for(var a=0;a<n[r].length;a++)t[r].push(n[r][a])}else Tf(t,n,r,o)}function S(e,t,n,i){var r,o,a=2<arguments.length&&void 0!==n&&n,s=3<arguments.length&&void 0!==i&&i;for(r in t)!Object.prototype.hasOwnProperty.call(t,r)&&!0!==a||("object"===b(t[r])&&null!==t[r]&&ad(t[r])===Object.prototype?void 0===e[r]?e[r]=S({},t[r],a):"object"===b(e[r])&&null!==e[r]&&ad(e[r])===Object.prototype?S(e[r],t[r],a):Tf(e,t,r,s):x(t[r])?e[r]=tu(o=t[r]).call(o):Tf(e,t,r,s));return e}function If(e,t){var n;return eu(n=[]).call(n,Yc(e),[t])}function Rf(e){return tu(e).call(e)}function Mf(e){return e.getBoundingClientRect().left}function Af(e){return e.getBoundingClientRect().top}function C(e,t){if(x(e))for(var n=e.length,i=0;i<n;i++)t(e[i],i,e);else for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t(e[r],r,e)}function Ff(e,t,n,i){var r;e.addEventListener?(void 0===i&&(i=!1),"mousewheel"===t&&id(r=navigator.userAgent).call(r,"Firefox")&&(t="DOMMouseScroll"),e.addEventListener(t,n,i)):e.attachEvent("on"+t,n)}function Df(e,t,n,i){var r;e.removeEventListener?(void 0===i&&(i=!1),"mousewheel"===t&&id(r=navigator.userAgent).call(r,"Firefox")&&(t="DOMMouseScroll"),e.removeEventListener(t,n,i)):e.detachEvent("on"+t,n)}function Nf(e){var t;switch(e.length){case 3:case 4:return(t=_f.exec(e))?{r:$d(t[1]+t[1],16),g:$d(t[2]+t[2],16),b:$d(t[3]+t[3],16)}:null;case 6:case 7:return(t=wf.exec(e))?{r:$d(t[1],16),g:$d(t[2],16),b:$d(t[3],16)}:null;default:return null}}function Lf(e,t){var n;return id(e).call(e,"rgba")?e:id(e).call(e,"rgb")?"rgba("+(n=e.substr(T(e).call(e,"(")+1).replace(")","").split(","))[0]+","+n[1]+","+n[2]+","+t+")":null==(n=Nf(e))?e:"rgba("+n.r+","+n.g+","+n.b+","+t+")"}function Bf(e,t,n){return"#"+tu(e=((1<<24)+(e<<16)+(t<<8)+n).toString(16)).call(e,1)}function zf(e,t){var n,i,r;return kf(e)?!0===qf(n=Gf(n=e)?Bf((i=au(i=n.substr(4).substr(0,n.length-5).split(",")).call(i,function(e){return $d(e)}))[0],i[1],i[2]):n)?(r={h:(i=Uf(n)).h,s:.8*i.s,v:Math.min(1,1.02*i.v)},{background:n,border:i=Vf((i={h:i.h,s:Math.min(1,1.25*i.s),v:.8*i.v}).h,i.s,i.v),highlight:{background:r=Vf(r.h,r.s,r.v),border:i},hover:{background:r,border:i}}):{background:n,border:n,highlight:{background:n,border:n},hover:{background:n,border:n}}:t?{background:e.background||t.background,border:e.border||t.border,highlight:kf(e.highlight)?{border:e.highlight,background:e.highlight}:{background:e.highlight&&e.highlight.background||t.highlight.background,border:e.highlight&&e.highlight.border||t.highlight.border},hover:kf(e.hover)?{border:e.hover,background:e.hover}:{border:e.hover&&e.hover.border||t.hover.border,background:e.hover&&e.hover.background||t.hover.background}}:{background:e.background||void 0,border:e.border||void 0,highlight:kf(e.highlight)?{border:e.highlight,background:e.highlight}:{background:e.highlight&&e.highlight.background||void 0,border:e.highlight&&e.highlight.border||void 0},hover:kf(e.hover)?{border:e.hover,background:e.hover}:{border:e.hover&&e.hover.border||void 0,background:e.hover&&e.hover.background||void 0}}}function Hf(e,t,n){e/=255,t/=255,n/=255;var i=Math.min(e,Math.min(t,n)),r=Math.max(e,Math.max(t,n));return i===r?{h:0,s:0,v:i}:{h:60*((e===i?3:n===i?1:5)-(e===i?t-n:n===i?e-t:n-e)/(r-i))/360,s:(r-i)/r,v:r}}function Wf(e,t,n){var i,r,o,a=Math.floor(6*e),e=6*e-a,s=n*(1-t),l=n*(1-e*t),c=n*(1-(1-e)*t);switch(a%6){case 0:i=n,r=c,o=s;break;case 1:i=l,r=n,o=s;break;case 2:i=s,r=n,o=c;break;case 3:i=s,r=l,o=n;break;case 4:i=c,r=s,o=n;break;case 5:i=n,r=s,o=l}return{r:Math.floor(255*i),g:Math.floor(255*r),b:Math.floor(255*o)}}function Vf(e,t,n){e=Wf(e,t,n);return Bf(e.r,e.g,e.b)}function Uf(e){var t=Nf(e);if(t)return Hf(t.r,t.g,t.b);throw new TypeError("'".concat(e,"' is not a valid color."))}function qf(e){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(e)}function Gf(e){return Sf.test(e)}function Kf(e){return Of.test(e)}function Yf(e){if(null===e||"object"!==b(e))return null;if(e instanceof Element)return e;var t,n=Ud(e);for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&"object"==b(e[t])&&(n[t]=Yf(e[t]));return n}function Jf(e,t,n,i){function r(e){return null!=e}function o(e){return null!==e&&"object"===b(e)}var a=3<arguments.length&&void 0!==i?i:{};if(!o(e))throw new Error("Parameter mergeTarget must be an object");if(!o(t))throw new Error("Parameter options must be an object");if(!r(n))throw new Error("Parameter option must have a value");if(!o(a))throw new Error("Parameter globalOptions must be an object");var s=t[n],a=o(a)&&!function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0}(a)?a[n]:void 0,l=a?a.enabled:void 0;if(void 0!==s){if("boolean"==typeof s)return o(e[n])||(e[n]={}),void(e[n].enabled=s);if(null===s&&!o(e[n])){if(!r(a))return;e[n]=Ud(a)}if(o(s)){var c=!0,s=(void 0!==s.enabled?c=s.enabled:void 0!==l&&(c=a.enabled),e),l=t,a=n;o(s[a])||(s[a]={});var u,d=l[a],h=s[a];for(u in d)Object.prototype.hasOwnProperty.call(d,u)&&(h[u]=d[u]);e[n].enabled=c}}}var Xf={linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return e*(2-e)},easeInOutQuad:function(e){return e<.5?2*e*e:(4-2*e)*e-1},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return--e*e*e+1},easeInOutCubic:function(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return 1- --e*e*e*e},easeInOutQuart:function(e){return e<.5?8*e*e*e*e:1-8*--e*e*e*e},easeInQuint:function(e){return e*e*e*e*e},easeOutQuint:function(e){return 1+--e*e*e*e*e},easeInOutQuint:function(e){return e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e}};function Qf(e,t){x(t)||(t=[t]);var n,i=uf(e);try{for(i.s();!(n=i.n()).done;){var r=n.value;if(r){for(var o=r[t[0]],a=1;a<t.length;a++)o=o&&o[t[a]];if(void 0!==o)break}}}catch(e){i.e(e)}finally{i.f()}return o}var Zf={black:"#000000",navy:"#000080",darkblue:"#00008B",mediumblue:"#0000CD",blue:"#0000FF",darkgreen:"#006400",green:"#008000",teal:"#008080",darkcyan:"#008B8B",deepskyblue:"#00BFFF",darkturquoise:"#00CED1",mediumspringgreen:"#00FA9A",lime:"#00FF00",springgreen:"#00FF7F",aqua:"#00FFFF",cyan:"#00FFFF",midnightblue:"#191970",dodgerblue:"#1E90FF",lightseagreen:"#20B2AA",forestgreen:"#228B22",seagreen:"#2E8B57",darkslategray:"#2F4F4F",limegreen:"#32CD32",mediumseagreen:"#3CB371",turquoise:"#40E0D0",royalblue:"#4169E1",steelblue:"#4682B4",darkslateblue:"#483D8B",mediumturquoise:"#48D1CC",indigo:"#4B0082",darkolivegreen:"#556B2F",cadetblue:"#5F9EA0",cornflowerblue:"#6495ED",mediumaquamarine:"#66CDAA",dimgray:"#696969",slateblue:"#6A5ACD",olivedrab:"#6B8E23",slategray:"#708090",lightslategray:"#778899",mediumslateblue:"#7B68EE",lawngreen:"#7CFC00",chartreuse:"#7FFF00",aquamarine:"#7FFFD4",maroon:"#800000",purple:"#800080",olive:"#808000",gray:"#808080",skyblue:"#87CEEB",lightskyblue:"#87CEFA",blueviolet:"#8A2BE2",darkred:"#8B0000",darkmagenta:"#8B008B",saddlebrown:"#8B4513",darkseagreen:"#8FBC8F",lightgreen:"#90EE90",mediumpurple:"#9370D8",darkviolet:"#9400D3",palegreen:"#98FB98",darkorchid:"#9932CC",yellowgreen:"#9ACD32",sienna:"#A0522D",brown:"#A52A2A",darkgray:"#A9A9A9",lightblue:"#ADD8E6",greenyellow:"#ADFF2F",paleturquoise:"#AFEEEE",lightsteelblue:"#B0C4DE",powderblue:"#B0E0E6",firebrick:"#B22222",darkgoldenrod:"#B8860B",mediumorchid:"#BA55D3",rosybrown:"#BC8F8F",darkkhaki:"#BDB76B",silver:"#C0C0C0",mediumvioletred:"#C71585",indianred:"#CD5C5C",peru:"#CD853F",chocolate:"#D2691E",tan:"#D2B48C",lightgrey:"#D3D3D3",palevioletred:"#D87093",thistle:"#D8BFD8",orchid:"#DA70D6",goldenrod:"#DAA520",crimson:"#DC143C",gainsboro:"#DCDCDC",plum:"#DDA0DD",burlywood:"#DEB887",lightcyan:"#E0FFFF",lavender:"#E6E6FA",darksalmon:"#E9967A",violet:"#EE82EE",palegoldenrod:"#EEE8AA",lightcoral:"#F08080",khaki:"#F0E68C",aliceblue:"#F0F8FF",honeydew:"#F0FFF0",azure:"#F0FFFF",sandybrown:"#F4A460",wheat:"#F5DEB3",beige:"#F5F5DC",whitesmoke:"#F5F5F5",mintcream:"#F5FFFA",ghostwhite:"#F8F8FF",salmon:"#FA8072",antiquewhite:"#FAEBD7",linen:"#FAF0E6",lightgoldenrodyellow:"#FAFAD2",oldlace:"#FDF5E6",red:"#FF0000",fuchsia:"#FF00FF",magenta:"#FF00FF",deeppink:"#FF1493",orangered:"#FF4500",tomato:"#FF6347",hotpink:"#FF69B4",coral:"#FF7F50",darkorange:"#FF8C00",lightsalmon:"#FFA07A",orange:"#FFA500",lightpink:"#FFB6C1",pink:"#FFC0CB",gold:"#FFD700",peachpuff:"#FFDAB9",navajowhite:"#FFDEAD",moccasin:"#FFE4B5",bisque:"#FFE4C4",mistyrose:"#FFE4E1",blanchedalmond:"#FFEBCD",papayawhip:"#FFEFD5",lavenderblush:"#FFF0F5",seashell:"#FFF5EE",cornsilk:"#FFF8DC",lemonchiffon:"#FFFACD",floralwhite:"#FFFAF0",snow:"#FFFAFA",yellow:"#FFFF00",lightyellow:"#FFFFE0",ivory:"#FFFFF0",white:"#FFFFFF"},eg=function(){function t(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:1;m(this,t),this.pixelRatio=e,this.generated=!1,this.centerCoordinates={x:144.5,y:144.5},this.r=289*.49,this.color={r:255,g:255,b:255,a:1},this.hueCircle=void 0,this.initialColor={r:255,g:255,b:255,a:1},this.previousColor=void 0,this.applied=!1,this.updateCallback=function(){},this.closeCallback=function(){},this._create()}return v(t,[{key:"insertTo",value:function(e){void 0!==this.hammer&&(this.hammer.destroy(),this.hammer=void 0),this.container=e,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}},{key:"setUpdateCallback",value:function(e){if("function"!=typeof e)throw new Error("Function attempted to set as colorPicker update callback is not a function.");this.updateCallback=e}},{key:"setCloseCallback",value:function(e){if("function"!=typeof e)throw new Error("Function attempted to set as colorPicker closing callback is not a function.");this.closeCallback=e}},{key:"_isColorString",value:function(e){if("string"==typeof e)return Zf[e]}},{key:"setColor",value:function(e){var t=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];if("none"!==e){var n,i=this._isColorString(e);if(!0===kf(e=void 0!==i?i:e)?!0===Gf(e)?n={r:(i=e.substr(4).substr(0,e.length-5).split(","))[0],g:i[1],b:i[2],a:1}:!0===Kf(e)?n={r:(i=e.substr(5).substr(0,e.length-6).split(","))[0],g:i[1],b:i[2],a:i[3]}:!0===qf(e)&&(n={r:(i=Nf(e)).r,g:i.g,b:i.b,a:1}):e instanceof Object&&void 0!==e.r&&void 0!==e.g&&void 0!==e.b&&(i=void 0!==e.a?e.a:"1.0",n={r:e.r,g:e.g,b:e.b,a:i}),void 0===n)throw new Error("Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: "+ah(e));this._setColor(n,t)}}},{key:"show",value:function(){void 0!==this.closeCallback&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display="block",this._generateHueCircle()}},{key:"_hide",value:function(){var e=this;!0===(!(0<arguments.length&&void 0!==arguments[0])||arguments[0])&&(this.previousColor=Zn({},this.color)),!0===this.applied&&this.updateCallback(this.initialColor),this.frame.style.display="none",ph(function(){void 0!==e.closeCallback&&(e.closeCallback(),e.closeCallback=void 0)},0)}},{key:"_save",value:function(){this.updateCallback(this.color),this.applied=!1,this._hide()}},{key:"_apply",value:function(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}},{key:"_loadLast",value:function(){void 0!==this.previousColor?this.setColor(this.previousColor,!1):alert("There is no last color to load...")}},{key:"_setColor",value:function(e){!0===(!(1<arguments.length&&void 0!==arguments[1])||arguments[1])&&(this.initialColor=Zn({},e));var t=Hf((this.color=e).r,e.g,e.b),n=2*Math.PI,i=this.r*t.s,r=this.centerCoordinates.x+i*Math.sin(n*t.h),i=this.centerCoordinates.y+i*Math.cos(n*t.h);this.colorPickerSelector.style.left=r-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=i-.5*this.colorPickerSelector.clientHeight+"px",this._updatePicker(e)}},{key:"_setOpacity",value:function(e){this.color.a=e/100,this._updatePicker(this.color)}},{key:"_setBrightness",value:function(e){var t=Hf(this.color.r,this.color.g,this.color.b),e=(t.v=e/100,Wf(t.h,t.s,t.v));e.a=this.color.a,this.color=e,this._updatePicker()}},{key:"_updatePicker",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.color,t=Hf(e.r,e.g,e.b),n=this.colorPickerCanvas.getContext("2d"),i=(void 0===this.pixelRation&&(this.pixelRatio=(window.devicePixelRatio||1)/(n.webkitBackingStorePixelRatio||n.mozBackingStorePixelRatio||n.msBackingStorePixelRatio||n.oBackingStorePixelRatio||n.backingStorePixelRatio||1)),n.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0),this.colorPickerCanvas.clientWidth),r=this.colorPickerCanvas.clientHeight;n.clearRect(0,0,i,r),n.putImageData(this.hueCircle,0,0),n.fillStyle="rgba(0,0,0,"+(1-t.v)+")",n.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),xh(n).call(n),this.brightnessRange.value=100*t.v,this.opacityRange.value=100*e.a,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}},{key:"_setSize",value:function(){this.colorPickerCanvas.style.width="100%",this.colorPickerCanvas.style.height="100%",this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}},{key:"_create",value:function(){var e;this.frame=document.createElement("div"),this.frame.className="vis-color-picker",this.colorPickerDiv=document.createElement("div"),this.colorPickerSelector=document.createElement("div"),this.colorPickerSelector.className="vis-selector",this.colorPickerDiv.appendChild(this.colorPickerSelector),this.colorPickerCanvas=document.createElement("canvas"),this.colorPickerDiv.appendChild(this.colorPickerCanvas),this.colorPickerCanvas.getContext?(e=this.colorPickerCanvas.getContext("2d"),this.pixelRatio=(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1),this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)):((e=document.createElement("DIV")).style.color="red",e.style.fontWeight="bold",e.style.padding="10px",e.innerText="Error: your browser does not support HTML canvas",this.colorPickerCanvas.appendChild(e)),this.colorPickerDiv.className="vis-color",this.opacityDiv=document.createElement("div"),this.opacityDiv.className="vis-opacity",this.brightnessDiv=document.createElement("div"),this.brightnessDiv.className="vis-brightness",this.arrowDiv=document.createElement("div"),this.arrowDiv.className="vis-arrow",this.opacityRange=document.createElement("input");try{this.opacityRange.type="range",this.opacityRange.min="0",this.opacityRange.max="100"}catch(e){}this.opacityRange.value="100",this.opacityRange.className="vis-range",this.brightnessRange=document.createElement("input");try{this.brightnessRange.type="range",this.brightnessRange.min="0",this.brightnessRange.max="100"}catch(e){}this.brightnessRange.value="100",this.brightnessRange.className="vis-range",this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);var t=this;this.opacityRange.onchange=function(){t._setOpacity(this.value)},this.opacityRange.oninput=function(){t._setOpacity(this.value)},this.brightnessRange.onchange=function(){t._setBrightness(this.value)},this.brightnessRange.oninput=function(){t._setBrightness(this.value)},this.brightnessLabel=document.createElement("div"),this.brightnessLabel.className="vis-label vis-brightness",this.brightnessLabel.innerText="brightness:",this.opacityLabel=document.createElement("div"),this.opacityLabel.className="vis-label vis-opacity",this.opacityLabel.innerText="opacity:",this.newColorDiv=document.createElement("div"),this.newColorDiv.className="vis-new-color",this.newColorDiv.innerText="new",this.initialColorDiv=document.createElement("div"),this.initialColorDiv.className="vis-initial-color",this.initialColorDiv.innerText="initial",this.cancelButton=document.createElement("div"),this.cancelButton.className="vis-button vis-cancel",this.cancelButton.innerText="cancel",this.cancelButton.onclick=h(e=this._hide).call(e,this,!1),this.applyButton=document.createElement("div"),this.applyButton.className="vis-button vis-apply",this.applyButton.innerText="apply",this.applyButton.onclick=h(e=this._apply).call(e,this),this.saveButton=document.createElement("div"),this.saveButton.className="vis-button vis-save",this.saveButton.innerText="save",this.saveButton.onclick=h(e=this._save).call(e,this),this.loadButton=document.createElement("div"),this.loadButton.className="vis-button vis-load",this.loadButton.innerText="load last",this.loadButton.onclick=h(e=this._loadLast).call(e,this),this.frame.appendChild(this.colorPickerDiv),this.frame.appendChild(this.arrowDiv),this.frame.appendChild(this.brightnessLabel),this.frame.appendChild(this.brightnessDiv),this.frame.appendChild(this.opacityLabel),this.frame.appendChild(this.opacityDiv),this.frame.appendChild(this.newColorDiv),this.frame.appendChild(this.initialColorDiv),this.frame.appendChild(this.cancelButton),this.frame.appendChild(this.applyButton),this.frame.appendChild(this.saveButton),this.frame.appendChild(this.loadButton)}},{key:"_bindHammer",value:function(){var t=this;this.drag={},this.pinch={},this.hammer=new vf(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.on("hammer.input",function(e){e.isFirst&&t._moveSelector(e)}),this.hammer.on("tap",function(e){t._moveSelector(e)}),this.hammer.on("panstart",function(e){t._moveSelector(e)}),this.hammer.on("panmove",function(e){t._moveSelector(e)}),this.hammer.on("panend",function(e){t._moveSelector(e)})}},{key:"_generateHueCircle",value:function(){if(!1===this.generated){for(var e,t,n,i,r=this.colorPickerCanvas.getContext("2d"),o=(void 0===this.pixelRation&&(this.pixelRatio=(window.devicePixelRatio||1)/(r.webkitBackingStorePixelRatio||r.mozBackingStorePixelRatio||r.msBackingStorePixelRatio||r.oBackingStorePixelRatio||r.backingStorePixelRatio||1)),r.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0),this.colorPickerCanvas.clientWidth),a=this.colorPickerCanvas.clientHeight,s=(r.clearRect(0,0,o,a),this.centerCoordinates={x:.5*o,y:.5*a},this.r=.49*o,2*Math.PI/360),l=1/this.r,c=0;c<360;c++)for(n=0;n<this.r;n++)e=this.centerCoordinates.x+n*Math.sin(s*c),t=this.centerCoordinates.y+n*Math.cos(s*c),i=Wf(c*(1/360),n*l,1),r.fillStyle="rgb("+i.r+","+i.g+","+i.b+")",r.fillRect(e-.5,t-.5,2,2);r.strokeStyle="rgba(0,0,0,1)",r.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),r.stroke(),this.hueCircle=r.getImageData(0,0,o,a)}this.generated=!0}},{key:"_moveSelector",value:function(e){var t=this.colorPickerDiv.getBoundingClientRect(),n=e.center.x-t.left,e=e.center.y-t.top,t=.5*this.colorPickerDiv.clientHeight,i=.5*this.colorPickerDiv.clientWidth,n=n-i,e=e-t,r=Math.atan2(n,e),n=.98*Math.min(Math.sqrt(n*n+e*e),i),e=Math.cos(r)*n+t,t=Math.sin(r)*n+i;this.colorPickerSelector.style.top=e-.5*this.colorPickerSelector.clientHeight+"px",this.colorPickerSelector.style.left=t-.5*this.colorPickerSelector.clientWidth+"px";i=(i=r/(2*Math.PI))<0?i+1:i,e=n/this.r,t=Hf(this.color.r,this.color.g,this.color.b),t.h=i,t.s=e,r=Wf(t.h,t.s,t.v);r.a=this.color.a,this.color=r,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}}]),t}();function tg(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];if(n.length<1)throw new TypeError("Invalid arguments.");return 1===n.length?document.createTextNode(n[0]):((e=document.createElement(n[0])).appendChild(tg.apply(void 0,Yc(tu(n).call(n,1)))),e)}var ng,ig=!1,rg="background: #FFeeee; color: #dd0000",og=bf,ag=function(){function o(e,t,n){var i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:1,r=4<arguments.length&&void 0!==arguments[4]?arguments[4]:function(){return!1};m(this,o),this.parent=e,this.changedOptions=[],this.container=t,this.allowCreation=!1,this.hideOption=r,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},Zn(this.options,this.defaultOptions),this.configureOptions=n,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new eg(i),this.wrapper=void 0}return v(o,[{key:"setOptions",value:function(e){if(void 0!==e){this.popupHistory={},this._removePopup();var t=!0;if("string"==typeof e)this.options.filter=e;else if(x(e))this.options.filter=e.join();else if("object"===b(e)){if(null==e)throw new TypeError("options cannot be null");void 0!==e.container&&(this.options.container=e.container),void 0!==hd(e)&&(this.options.filter=hd(e)),void 0!==e.showButton&&(this.options.showButton=e.showButton),void 0!==e.enabled&&(t=e.enabled)}else"boolean"==typeof e?(this.options.filter=!0,t=e):"function"==typeof e&&(this.options.filter=e,t=!0);!1===hd(this.options)&&(t=!1),this.options.enabled=t}this._clean()}},{key:"setModuleOptions",value:function(e){this.moduleOptions=e,!0===this.options.enabled&&(this._clean(),void 0!==this.options.container&&(this.container=this.options.container),this._create())}},{key:"_create",value:function(){this._clean(),this.changedOptions=[];var e,t=hd(this.options),n=0,i=!1;for(e in this.configureOptions)Object.prototype.hasOwnProperty.call(this.configureOptions,e)&&(i=this.allowCreation=!1,"function"==typeof t?i=(i=t(e,[]))||this._handleObject(this.configureOptions[e],[e],!0):!0!==t&&-1===T(t).call(t,e)||(i=!0),!1!==i&&(this.allowCreation=!0,0<n&&this._makeItem([]),this._makeHeader(e),this._handleObject(this.configureOptions[e],[e])),n++);this._makeButton(),this._push()}},{key:"_push",value:function(){this.wrapper=document.createElement("div"),this.wrapper.className="vis-configuration-wrapper",this.container.appendChild(this.wrapper);for(var e=0;e<this.domElements.length;e++)this.wrapper.appendChild(this.domElements[e]);this._showPopupIfNeeded()}},{key:"_clean",value:function(){for(var e=0;e<this.domElements.length;e++)this.wrapper.removeChild(this.domElements[e]);void 0!==this.wrapper&&(this.container.removeChild(this.wrapper),this.wrapper=void 0),this.domElements=[],this._removePopup()}},{key:"_getValue",value:function(e){for(var t=this.moduleOptions,n=0;n<e.length;n++){if(void 0===t[e[n]]){t=void 0;break}t=t[e[n]]}return t}},{key:"_makeItem",value:function(e){if(!0!==this.allowCreation)return 0;var t=document.createElement("div");t.className="vis-configuration vis-config-item vis-config-s"+e.length;for(var n=arguments.length,i=new Array(1<n?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return _(i).call(i,function(e){t.appendChild(e)}),this.domElements.push(t),this.domElements.length}},{key:"_makeHeader",value:function(e){var t=document.createElement("div");t.className="vis-configuration vis-config-header",t.innerText=e,this._makeItem([],t)}},{key:"_makeLabel",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]&&arguments[2],i=document.createElement("div");if(i.className="vis-configuration vis-config-label vis-config-s"+t.length,!0===n){for(;i.firstChild;)i.removeChild(i.firstChild);i.appendChild(tg("i","b",e))}else i.innerText=e+":";return i}},{key:"_makeDropdown",value:function(e,t,n){var i=document.createElement("select"),r=(i.className="vis-configuration vis-config-select",0);void 0!==t&&-1!==T(e).call(e,t)&&(r=T(e).call(e,t));for(var o=0;o<e.length;o++){var a=document.createElement("option");a.value=e[o],o===r&&(a.selected="selected"),a.innerText=e[o],i.appendChild(a)}var s=this,t=(i.onchange=function(){s._update(this.value,n)},this._makeLabel(n[n.length-1],n));this._makeItem(n,t,i)}},{key:"_makeRange",value:function(e,t,n){var i=e[0],r=e[1],o=e[2],e=e[3],a=document.createElement("input");a.className="vis-configuration vis-config-range";try{a.type="range",a.min=r,a.max=o}catch(e){}a.step=e;var e="",s=0,l=(void 0!==t?(t<0&&1.2*t<r?(a.min=Math.ceil(1.2*t),s=a.min,e="range increased"):t/1.2<r&&(a.min=Math.ceil(t/1.2),s=a.min,e="range increased"),o<1.2*t&&1!==o&&(a.max=Math.ceil(1.2*t),s=a.max,e="range increased"),a.value=t):a.value=i,document.createElement("input")),c=(l.className="vis-configuration vis-config-rangeinput",l.value=a.value,this),r=(a.onchange=function(){l.value=this.value,c._update(Number(this.value),n)},a.oninput=function(){l.value=this.value},this._makeLabel(n[n.length-1],n)),o=this._makeItem(n,r,a,l);""!==e&&this.popupHistory[o]!==s&&(this.popupHistory[o]=s,this._setupPopup(e,o))}},{key:"_makeButton",value:function(){var e,t=this;!0===this.options.showButton&&((e=document.createElement("div")).className="vis-configuration vis-config-button",e.innerText="generate options",e.onclick=function(){t._printOptions()},e.onmouseover=function(){e.className="vis-configuration vis-config-button hover"},e.onmouseout=function(){e.className="vis-configuration vis-config-button"},this.optionsContainer=document.createElement("div"),this.optionsContainer.className="vis-configuration vis-config-option-container",this.domElements.push(this.optionsContainer),this.domElements.push(e))}},{key:"_setupPopup",value:function(e,t){var n,i=this;!0===this.initialized&&!0===this.allowCreation&&this.popupCounter<this.popupLimit&&((n=document.createElement("div")).id="vis-configuration-popup",n.className="vis-configuration-popup",n.innerText=e,n.onclick=function(){i._removePopup()},this.popupCounter+=1,this.popupDiv={html:n,index:t})}},{key:"_removePopup",value:function(){void 0!==this.popupDiv.html&&(this.popupDiv.html.parentNode.removeChild(this.popupDiv.html),clearTimeout(this.popupDiv.hideTimeout),clearTimeout(this.popupDiv.deleteTimeout),this.popupDiv={})}},{key:"_showPopupIfNeeded",value:function(){var e,t=this;void 0!==this.popupDiv.html&&(e=this.domElements[this.popupDiv.index].getBoundingClientRect(),this.popupDiv.html.style.left=e.left+"px",this.popupDiv.html.style.top=e.top-30+"px",document.body.appendChild(this.popupDiv.html),this.popupDiv.hideTimeout=ph(function(){t.popupDiv.html.style.opacity=0},1500),this.popupDiv.deleteTimeout=ph(function(){t._removePopup()},1800))}},{key:"_makeCheckbox",value:function(e,t,n){var i=document.createElement("input"),r=(i.type="checkbox",i.className="vis-configuration vis-config-checkbox",i.checked=e,void 0===t||(i.checked=t)===e||"object"===b(e)&&t===e.enabled||this.changedOptions.push({path:n,value:t}),this),e=(i.onchange=function(){r._update(this.checked,n)},this._makeLabel(n[n.length-1],n));this._makeItem(n,e,i)}},{key:"_makeTextInput",value:function(e,t,n){var i=document.createElement("input"),r=(i.type="text",i.className="vis-configuration vis-config-text",(i.value=t)!==e&&this.changedOptions.push({path:n,value:t}),this),e=(i.onchange=function(){r._update(this.value,n)},this._makeLabel(n[n.length-1],n));this._makeItem(n,e,i)}},{key:"_makeColorField",value:function(e,t,n){var i=this,e=e[1],r=document.createElement("div"),e=("none"!==(t=void 0===t?e:t)?(r.className="vis-configuration vis-config-colorBlock",r.style.backgroundColor=t):r.className="vis-configuration vis-config-colorBlock none",t=void 0===t?e:t,r.onclick=function(){i._showColorPicker(t,r,n)},this._makeLabel(n[n.length-1],n));this._makeItem(n,e,r)}},{key:"_showColorPicker",value:function(e,t,n){var i=this;t.onclick=function(){},this.colorPicker.insertTo(t),this.colorPicker.show(),this.colorPicker.setColor(e),this.colorPicker.setUpdateCallback(function(e){e="rgba("+e.r+","+e.g+","+e.b+","+e.a+")";t.style.backgroundColor=e,i._update(e,n)}),this.colorPicker.setCloseCallback(function(){t.onclick=function(){i._showColorPicker(e,t,n)}})}},{key:"_handleObject",value:function(e){var t,n,i,r,o,a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],s=2<arguments.length&&void 0!==arguments[2]&&arguments[2],l=!1,c=hd(this.options),u=!1;for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(l=!0,n=e[t],i=If(a,t),"function"==typeof c&&!1===(l=c(t,a))&&!x(n)&&"string"!=typeof n&&"boolean"!=typeof n&&n instanceof Object&&(this.allowCreation=!1,l=this._handleObject(n,i,!0),this.allowCreation=!1===s),!1!==l&&(u=!0,r=this._getValue(i),x(n)?this._handleArray(n,r,i):"string"==typeof n?this._makeTextInput(n,r,i):"boolean"==typeof n?this._makeCheckbox(n,r,i):n instanceof Object?this.hideOption(a,t,this.moduleOptions)||(void 0!==n.enabled?(r=If(i,"enabled"),!0===(r=this._getValue(r))?(o=this._makeLabel(t,i,!0),this._makeItem(i,o),u=this._handleObject(n,i)||u):this._makeCheckbox(n,r,i)):(o=this._makeLabel(t,i,!0),this._makeItem(i,o),u=this._handleObject(n,i)||u)):console.error("dont know how to handle",n,t,i)));return u}},{key:"_handleArray",value:function(e,t,n){"string"==typeof e[0]&&"color"===e[0]?(this._makeColorField(e,t,n),e[1]!==t&&this.changedOptions.push({path:n,value:t})):"string"==typeof e[0]?(this._makeDropdown(e,t,n),e[0]!==t&&this.changedOptions.push({path:n,value:t})):"number"==typeof e[0]&&(this._makeRange(e,t,n),e[0]!==t&&this.changedOptions.push({path:n,value:Number(t)}))}},{key:"_update",value:function(e,t){e=this._constructOptions(e,t);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit("configChange",e),this.initialized=!0,this.parent.setOptions(e)}},{key:"_constructOptions",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},i=n;e="false"!==(e="true"===e||e)&&e;for(var r=0;r<t.length;r++)"global"!==t[r]&&(void 0===i[t[r]]&&(i[t[r]]={}),r!==t.length-1?i=i[t[r]]:i[t[r]]=e);return n}},{key:"_printOptions",value:function(){for(var e=this.getOptions();this.optionsContainer.firstChild;)this.optionsContainer.removeChild(this.optionsContainer.firstChild);this.optionsContainer.appendChild(tg("pre","const options = "+ah(e,null,2)))}},{key:"getOptions",value:function(){for(var e={},t=0;t<this.changedOptions.length;t++)this._constructOptions(this.changedOptions[t].value,this.changedOptions[t].path,e);return e}}]),o}(),sg=vf,lg=function(){function n(e,t){m(this,n),this.container=e,this.overflowMethod=t||"cap",this.x=0,this.y=0,this.padding=5,this.hidden=!1,this.frame=document.createElement("div"),this.frame.className="vis-tooltip",this.container.appendChild(this.frame)}return v(n,[{key:"setPosition",value:function(e,t){this.x=$d(e),this.y=$d(t)}},{key:"setText",value:function(e){if(e instanceof Element){for(;this.frame.firstChild;)this.frame.removeChild(this.frame.firstChild);this.frame.appendChild(e)}else this.frame.innerText=e}},{key:"show",value:function(e){var t,n,i,r,o,a,s;!0===(e=void 0===e?!0:e)?(e=this.frame.clientHeight,t=this.frame.clientWidth,n=this.frame.parentNode.clientHeight,i=this.frame.parentNode.clientWidth,o=r=0,"flip"==this.overflowMethod?(s=!(a=!1),this.y-e<this.padding&&(s=!1),r=(a=this.x+t>i-this.padding?!0:a)?this.x-t:this.x,o=s?this.y-e:this.y):((o=(o=this.y-e)+e+this.padding>n?n-e-this.padding:o)<this.padding&&(o=this.padding),(r=(r=this.x)+t+this.padding>i?i-t-this.padding:r)<this.padding&&(r=this.padding)),this.frame.style.left=r+"px",this.frame.style.top=o+"px",this.frame.style.visibility="visible",this.hidden=!1):this.hide()}},{key:"hide",value:function(){this.hidden=!0,this.frame.style.left="0",this.frame.style.top="0",this.frame.style.visibility="hidden"}},{key:"destroy",value:function(){this.frame.parentNode.removeChild(this.frame)}}]),n}(),cg=rg,ug=function(){function h(){m(this,h)}return v(h,null,[{key:"validate",value:function(e,t,n){ig=!1;var i=ng=t;return void 0!==n&&(i=t[n]),h.parse(e,i,[]),ig}},{key:"parse",value:function(e,t,n){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&h.check(i,e,t,n)}},{key:"check",value:function(e,t,n,i){var r,o,a;void 0===n[e]&&void 0===n.__any__?h.getSuggestion(e,n,i):(o=!0,void 0===n[r=e]&&void 0!==n.__any__&&(r="__any__",o="object"===h.getType(t[e])),a=n[r],o&&void 0!==a.__type__&&(a=a.__type__),h.checkFields(e,t,n,r,a,i))}},{key:"checkFields",value:function(t,e,n,i,r,o){function a(e){console.error("%c"+e+h.printLocation(o,t),rg)}var s=h.getType(e[t]),l=r[s];void 0!==l?"array"===h.getType(l)&&-1===T(l).call(l,e[t])?(a('Invalid option detected in "'+t+'". Allowed values are:'+h.print(l)+' not "'+e[t]+'". '),ig=!0):"object"===s&&"__any__"!==i&&(o=If(o,t),h.parse(e[t],n[i],o)):void 0===r.any&&(a('Invalid type received for "'+t+'". Expected: '+h.print(w(r))+". Received ["+s+'] "'+e[t]+'"'),ig=!0)}},{key:"getType",value:function(e){var t=b(e);return"object"===t?null===e?"null":e instanceof Boolean?"boolean":e instanceof Number?"number":e instanceof String?"string":x(e)?"array":e instanceof Date?"date":void 0!==e.nodeType?"dom":!0===e._isAMomentObject?"moment":"object":"number"===t?"number":"boolean"===t?"boolean":"string"===t?"string":void 0===t?"undefined":t}},{key:"getSuggestion",value:function(e,t,n){var i=h.findInOptions(e,t,n,!1),r=h.findInOptions(e,ng,[],!0),r=void 0!==i.indexMatch?" in "+h.printLocation(i.path,e,"")+'Perhaps it was incomplete? Did you mean: "'+i.indexMatch+'"?\n\n':r.distance<=4&&i.distance>r.distance?" in "+h.printLocation(i.path,e,"")+"Perhaps it was misplaced? Matching option found at: "+h.printLocation(r.path,r.closestMatch,""):i.distance<=8?'. Did you mean "'+i.closestMatch+'"?'+h.printLocation(i.path,e):". Did you mean one of these: "+h.print(w(t))+h.printLocation(n,e);console.error('%cUnknown option detected: "'+e+'"'+r,rg),ig=!0}},{key:"findInOptions",value:function(e,t,n){var i,r=3<arguments.length&&void 0!==arguments[3]&&arguments[3],o=1e9,a="",s=[],l=e.toLowerCase(),c=void 0;for(i in t){var u,d;void 0!==t[i].__type__&&!0===r?o>(d=h.findInOptions(e,t[i],If(n,i))).distance&&(a=d.closestMatch,s=d.path,o=d.distance,c=d.indexMatch):(-1!==T(d=i.toLowerCase()).call(d,l)&&(c=i),(u=h.levenshteinDistance(e,i))<o&&(a=i,s=Rf(n),o=u))}return{closestMatch:a,path:s,distance:o,indexMatch:c}}},{key:"printLocation",value:function(e,t){for(var n="\n\n"+(2<arguments.length&&void 0!==arguments[2]?arguments[2]:"Problem value found at: \n")+"options = {\n",i=0;i<e.length;i++){for(var r=0;r<i+1;r++)n+=" ";n+=e[i]+": {\n"}for(var o=0;o<e.length+1;o++)n+=" ";n+=t+"\n";for(var a=0;a<e.length+1;a++){for(var s=0;s<e.length-a;s++)n+=" ";n+="}\n"}return n+"\n\n"}},{key:"print",value:function(e){return ah(e).replace(/(")|(\[)|(\])|(,"__type__")/g,"").replace(/(,)/g,", ")}},{key:"levenshteinDistance",value:function(e,t){if(0===e.length)return t.length;if(0===t.length)return e.length;for(var n,i=[],r=0;r<=t.length;r++)i[r]=[r];for(n=0;n<=e.length;n++)i[0][n]=n;for(r=1;r<=t.length;r++)for(n=1;n<=e.length;n++)t.charAt(r-1)==e.charAt(n-1)?i[r][n]=i[r-1][n-1]:i[r][n]=Math.min(i[r-1][n-1]+1,Math.min(i[r][n-1]+1,i[r-1][n]+1));return i[t.length][e.length]}}]),h}();function dg(e){return yg=e,Tg()}var hg={fontsize:"font.size",fontcolor:"font.color",labelfontcolor:"font.color",fontname:"font.face",color:["color.border","color.background"],fillcolor:"color.background",tooltip:"title",labeltooltip:"title"},pg=Ud(hg),fg=(pg.color="color.color",pg.style="dashes",{NULL:0,DELIMITER:1,IDENTIFIER:2,UNKNOWN:3}),gg={"{":!0,"}":!0,"[":!0,"]":!0,";":!0,"=":!0,",":!0,"->":!0,"--":!0},yg="",mg=0,O="",E="",vg=fg.NULL;function bg(){mg=0,O=yg.charAt(0)}function xg(){mg++,O=yg.charAt(mg)}function wg(){return yg.charAt(mg+1)}function _g(e){e=e.charCodeAt(0);return e<47?35===e||46===e:e<59?47<e:e<91?64<e:e<96?95===e:e<123&&96<e}function Sg(e,t){if(e=e||{},t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function Og(e,t,n){for(var i=t.split("."),r=e;i.length;){var o=i.shift();i.length?(r[o]||(r[o]={}),r=r[o]):r[o]=n}}function Eg(e,t){for(var n,i,r=null,o=[e],a=e;a.parent;)o.push(a.parent),a=a.parent;if(a.nodes)for(n=0,i=a.nodes.length;n<i;n++)if(t.id===a.nodes[n].id){r=a.nodes[n];break}for(r||(r={id:t.id},e.node&&(r.attr=Sg(r.attr,e.node))),n=o.length-1;0<=n;n--){var s,l=o[n];l.nodes||(l.nodes=[]),-1===T(s=l.nodes).call(s,r)&&l.nodes.push(r)}t.attr&&(r.attr=Sg(r.attr,t.attr))}function kg(e,t){e.edges||(e.edges=[]),e.edges.push(t),e.edge&&(e=Sg({},e.edge),t.attr=Sg(e,t.attr))}function jg(e,t,n,i,r){t={from:t,to:n,type:i};return e.edge&&(t.attr=Sg({},e.edge)),t.attr=Sg(t.attr||{},r),null!=r&&r.hasOwnProperty("arrows")&&null!=r.arrows&&(t.arrows={to:{enabled:!0,type:r.arrows.type}},r.arrows=null),t}function k(){for(vg=fg.NULL,E="";" "===O||"\t"===O||"\n"===O||"\r"===O;)xg();do{var e=!1;if("#"===O){for(var t=mg-1;" "===yg.charAt(t)||"\t"===yg.charAt(t);)t--;if("\n"===yg.charAt(t)||""===yg.charAt(t)){for(;""!=O&&"\n"!=O;)xg();e=!0}}if("/"===O&&"/"===wg()){for(;""!=O&&"\n"!=O;)xg();e=!0}if("/"===O&&"*"===wg()){for(;""!=O;){if("*"===O&&"/"===wg()){xg(),xg();break}xg()}e=!0}for(;" "===O||"\t"===O||"\n"===O||"\r"===O;)xg()}while(e);if(""!==O){var n=O+wg();if(gg[n])return vg=fg.DELIMITER,E=n,xg(),void xg();if(gg[O])return vg=fg.DELIMITER,E=O,void xg();if(_g(O)||"-"===O){for(E+=O,xg();_g(O);)E+=O,xg();return"false"===E?E=!1:"true"===E?E=!0:isNaN(Number(E))||(E=Number(E)),void(vg=fg.IDENTIFIER)}if('"'===O){for(xg();""!=O&&('"'!=O||'"'===O&&'"'===wg());)'"'===O?(E+=O,xg()):"\\"===O&&"n"===wg()?(E+="\n",xg()):E+=O,xg();if('"'!=O)throw Fg('End of string " expected');return xg(),void(vg=fg.IDENTIFIER)}for(vg=fg.UNKNOWN;""!=O;)E+=O,xg();throw new SyntaxError('Syntax error in part "'+Dg(E,30)+'"')}vg=fg.DELIMITER}function Tg(){var e={};if(bg(),k(),"strict"===E&&(e.strict=!0,k()),"graph"!==E&&"digraph"!==E||(e.type=E,k()),vg===fg.IDENTIFIER&&(e.id=E,k()),"{"!=E)throw Fg("Angle bracket { expected");if(k(),Cg(e),"}"!=E)throw Fg("Angle bracket } expected");if(k(),""!==E)throw Fg("End of file expected");return k(),delete e.node,delete e.edge,delete e.graph,e}function Cg(e){for(;""!==E&&"}"!=E;)Pg(e),";"===E&&k()}function Pg(e){var t=$g(e);if(t)Mg(e,t);else{t=Ig(e);if(!t){if(vg!=fg.IDENTIFIER)throw Fg("Identifier expected");t=E;if(k(),"="===E){if(k(),vg!=fg.IDENTIFIER)throw Fg("Identifier expected");e[t]=E,k()}else Rg(e,t)}}}function $g(e){var t=null;if("subgraph"===E&&(t={type:"subgraph"},k(),vg===fg.IDENTIFIER&&(t.id=E,k())),"{"===E){if(k(),(t=t||{}).parent=e,t.node=e.node,t.edge=e.edge,t.graph=e.graph,Cg(t),"}"!=E)throw Fg("Angle bracket } expected");k(),delete t.node,delete t.edge,delete t.graph,delete t.parent,e.subgraphs||(e.subgraphs=[]),e.subgraphs.push(t)}return t}function Ig(e){return"node"===E?(k(),e.node=Ag(),"node"):"edge"===E?(k(),e.edge=Ag(),"edge"):"graph"===E?(k(),e.graph=Ag(),"graph"):null}function Rg(e,t){var n={id:t},i=Ag();i&&(n.attr=i),Eg(e,n),Mg(e,t)}function Mg(e,t){for(;"->"===E||"--"===E;){var n,i=E,r=(k(),$g(e));if(r)n=r;else{if(vg!=fg.IDENTIFIER)throw Fg("Identifier or subgraph expected");Eg(e,{id:n=E}),k()}kg(e,jg(e,t,n,i,Ag())),t=n}}function Ag(){for(var e=null,t={dashed:!0,solid:!1,dotted:[1,5]},n={dot:"circle",box:"box",crow:"crow",curve:"curve",icurve:"inv_curve",normal:"triangle",inv:"inv_triangle",diamond:"diamond",tee:"bar",vee:"vee"},i=new Array,r=new Array;"["===E;){for(k(),e={};""!==E&&"]"!=E;){if(vg!=fg.IDENTIFIER)throw Fg("Attribute name expected");var o=E;if(k(),"="!=E)throw Fg("Equal sign = expected");if(k(),vg!=fg.IDENTIFIER)throw Fg("Attribute value expected");var a=E;"style"===o&&(a=t[a]),"arrowhead"===o&&(o="arrows",a={to:{enabled:!0,type:n[a]}}),"arrowtail"===o&&(o="arrows",a={from:{enabled:!0,type:n[a]}}),i.push({attr:e,name:o,value:a}),r.push(o),k(),","==E&&k()}if("]"!=E)throw Fg("Bracket ] expected");k()}if(id(r).call(r,"dir")){for(var s={arrows:{}},l=0;l<i.length;l++)if("arrows"===i[l].name)if(null!=i[l].value.to)s.arrows.to=l;else{if(null==i[l].value.from)throw Fg("Invalid value of arrows");s.arrows.from=l}else"dir"===i[l].name&&(s.dir=l);var c,u,d=i[s.dir].value;if(!id(r).call(r,"arrows"))if("both"===d)i.push({attr:i[s.dir].attr,name:"arrows",value:{to:{enabled:!0}}}),s.arrows.to=i.length-1,i.push({attr:i[s.dir].attr,name:"arrows",value:{from:{enabled:!0}}}),s.arrows.from=i.length-1;else if("forward"===d)i.push({attr:i[s.dir].attr,name:"arrows",value:{to:{enabled:!0}}}),s.arrows.to=i.length-1;else if("back"===d)i.push({attr:i[s.dir].attr,name:"arrows",value:{from:{enabled:!0}}}),s.arrows.from=i.length-1;else{if("none"!==d)throw Fg('Invalid dir type "'+d+'"');i.push({attr:i[s.dir].attr,name:"arrows",value:""}),s.arrows.to=i.length-1}if("both"===d)s.arrows.to&&s.arrows.from?(u=i[s.arrows.to].value.to.type,c=i[s.arrows.from].value.from.type,i[s.arrows.to]={attr:i[s.arrows.to].attr,name:i[s.arrows.to].name,value:{to:{enabled:!0,type:u},from:{enabled:!0,type:c}}},Lu(i).call(i,s.arrows.from,1)):s.arrows.to?(u=i[s.arrows.to].value.to.type,i[s.arrows.to]={attr:i[s.arrows.to].attr,name:i[s.arrows.to].name,value:{to:{enabled:!0,type:u},from:{enabled:!0,type:c="arrow"}}}):s.arrows.from&&(c=i[s.arrows.from].value.from.type,i[s.arrows.from]={attr:i[s.arrows.from].attr,name:i[s.arrows.from].name,value:{to:{enabled:!0,type:u="arrow"},from:{enabled:!0,type:c}}});else if("back"===d)s.arrows.to&&s.arrows.from?(c=i[s.arrows.from].value.from.type,i[s.arrows.from]={attr:i[s.arrows.from].attr,name:i[s.arrows.from].name,value:{to:{enabled:!(u=""),type:u},from:{enabled:!0,type:c}}}):s.arrows.to?(u="",c="arrow",s.arrows.from=s.arrows.to,i[s.arrows.from]={attr:i[s.arrows.from].attr,name:i[s.arrows.from].name,value:{to:{enabled:!0,type:u},from:{enabled:!0,type:c}}}):s.arrows.from&&(c=i[s.arrows.from].value.from.type,i[s.arrows.to]={attr:i[s.arrows.from].attr,name:i[s.arrows.from].name,value:{to:{enabled:!(u=""),type:u},from:{enabled:!0,type:c}}}),i[s.arrows.from]={attr:i[s.arrows.from].attr,name:i[s.arrows.from].name,value:{from:{enabled:!0,type:i[s.arrows.from].value.from.type}}};else if("none"===d){var h=s.arrows.to||s.arrows.from;i[h]={attr:i[h].attr,name:i[h].name,value:""}}else{if("forward"!==d)throw Fg('Invalid dir type "'+d+'"');s.arrows.to&&s.arrows.from||s.arrows.to?(u=i[s.arrows.to].value.to.type,i[s.arrows.to]={attr:i[s.arrows.to].attr,name:i[s.arrows.to].name,value:{to:{enabled:!(c=""),type:u},from:{enabled:!0,type:c}}}):s.arrows.from&&(u="arrow",c="",s.arrows.to=s.arrows.from,i[s.arrows.to]={attr:i[s.arrows.to].attr,name:i[s.arrows.to].name,value:{to:{enabled:!0,type:u},from:{enabled:!0,type:c}}}),i[s.arrows.to]={attr:i[s.arrows.to].attr,name:i[s.arrows.to].name,value:{to:{enabled:!0,type:i[s.arrows.to].value.to.type}}}}Lu(i).call(i,s.dir,1)}if(id(r).call(r,"penwidth")){var p=[],f=i.length;for(l=0;l<f;l++)"width"!==i[l].name&&("penwidth"===i[l].name&&(i[l].name="width"),p.push(i[l]));i=p}for(f=i.length,l=0;l<f;l++)Og(i[l].attr,i[l].name,i[l].value);return e}function Fg(e){return new SyntaxError(e+', got "'+Dg(E,30)+'" (char '+mg+")")}function Dg(e,t){return e.length<=t?e:e.substr(0,27)+"..."}function Ng(t,e,n){x(t)?_(t).call(t,function(t){x(e)?_(e).call(e,function(e){n(t,e)}):n(t,e)}):x(e)?_(e).call(e,function(e){n(t,e)}):n(t,e)}function Lg(e,t,n){for(var i=t.split("."),t=i.pop(),r=e,o=0;o<i.length;o++){var a=i[o];a in r||(r[a]={}),r=r[a]}r[t]=n}function Bg(t,e){var n,i,r={};for(n in t)t.hasOwnProperty(n)&&(i=e[n],x(i)?_(i).call(i,function(e){Lg(r,e,t[n])}):Lg(r,"string"==typeof i?i:n,t[n]));return r}function zg(e){var t,r,e=dg(e),o={nodes:[],edges:[],options:{}};return e.nodes&&_(t=e.nodes).call(t,function(e){var t={id:e.id,label:String(e.label||e.id)};Sg(t,Bg(e.attr,hg)),t.image&&(t.shape="image"),o.nodes.push(t)}),e.edges&&(r=function(e){var t={from:e.from,to:e.to};return Sg(t,Bg(e.attr,pg)),null==t.arrows&&"->"===e.type&&(t.arrows="to"),t},_(t=e.edges).call(t,function(n){var e,t=n.from instanceof Object?n.from.nodes:{id:n.from},i=n.to instanceof Object?n.to.nodes:{id:n.to};n.from instanceof Object&&n.from.edges&&_(e=n.from.edges).call(e,function(e){e=r(e);o.edges.push(e)}),Ng(t,i,function(e,t){e=jg(o,e.id,t.id,n.type,n.attr),t=r(e);o.edges.push(t)}),n.to instanceof Object&&n.to.edges&&_(e=n.to.edges).call(e,function(e){e=r(e);o.edges.push(e)})})),e.attr&&(o.options=e.attr),o}function Hg(e,t){var n={edges:{inheritColor:!1},nodes:{fixed:!1,parseColor:!1}},t=(null!=t&&(null!=t.fixed&&(n.nodes.fixed=t.fixed),null!=t.parseColor&&(n.nodes.parseColor=t.parseColor),null!=t.inheritColor&&(n.edges.inheritColor=t.inheritColor)),e.edges),t=au(t).call(t,function(e){var t={from:e.source,id:e.id,to:e.target};return null!=e.attributes&&(t.attributes=e.attributes),null!=e.label&&(t.label=e.label),null!=e.attributes&&null!=e.attributes.title&&(t.title=e.attributes.title),"Directed"===e.type&&(t.arrows="to"),e.color&&!1===n.edges.inheritColor&&(t.color=e.color),t});return{nodes:au(e=e.nodes).call(e,function(e){var t={id:e.id,fixed:n.nodes.fixed&&null!=e.x&&null!=e.y};return null!=e.attributes&&(t.attributes=e.attributes),null!=e.label&&(t.label=e.label),null!=e.size&&(t.size=e.size),null!=e.attributes&&null!=e.attributes.title&&(t.title=e.attributes.title),null!=e.title&&(t.title=e.title),null!=e.x&&(t.x=e.x),null!=e.y&&(t.y=e.y),null!=e.color&&(!0===n.nodes.parseColor?t.color=e.color:t.color={background:e.color,border:e.color,highlight:{background:e.color,border:e.color},hover:{background:e.color,border:e.color}}),t}),edges:t}}tl=Object.freeze({__proto__:null,parseDOT:dg,DOTToGraph:zg});var ss=Object.freeze({__proto__:null,parseGephi:Hg}),Wg=Object.freeze({__proto__:null,en:{addDescription:"Click in an empty space to place a new node.",addEdge:"Add Edge",addNode:"Add Node",back:"Back",close:"Close",createEdgeError:"Cannot link edges to a cluster.",del:"Delete selected",deleteClusterError:"Clusters cannot be deleted.",edgeDescription:"Click on a node and drag the edge to another node to connect them.",edit:"Edit",editClusterError:"Clusters cannot be edited.",editEdge:"Edit Edge",editEdgeDescription:"Click on the control points and drag them to a node to connect to it.",editNode:"Edit Node"},de:{addDescription:"Klicke auf eine freie Stelle, um einen neuen Knoten zu plazieren.",addEdge:"Kante hinzufügen",addNode:"Knoten hinzufügen",back:"Zurück",close:"Schließen",createEdgeError:"Es ist nicht möglich, Kanten mit Clustern zu verbinden.",del:"Lösche Auswahl",deleteClusterError:"Cluster können nicht gelöscht werden.",edgeDescription:"Klicke auf einen Knoten und ziehe die Kante zu einem anderen Knoten, um diese zu verbinden.",edit:"Editieren",editClusterError:"Cluster können nicht editiert werden.",editEdge:"Kante editieren",editEdgeDescription:"Klicke auf die Verbindungspunkte und ziehe diese auf einen Knoten, um sie zu verbinden.",editNode:"Knoten editieren"},es:{addDescription:"Haga clic en un lugar vacío para colocar un nuevo nodo.",addEdge:"Añadir arista",addNode:"Añadir nodo",back:"Atrás",close:"Cerrar",createEdgeError:"No se puede conectar una arista a un grupo.",del:"Eliminar selección",deleteClusterError:"No es posible eliminar grupos.",edgeDescription:"Haga clic en un nodo y arrastre la arista hacia otro nodo para conectarlos.",edit:"Editar",editClusterError:"No es posible editar grupos.",editEdge:"Editar arista",editEdgeDescription:"Haga clic en un punto de control y arrastrelo a un nodo para conectarlo.",editNode:"Editar nodo"},it:{addDescription:"Clicca per aggiungere un nuovo nodo",addEdge:"Aggiungi un vertice",addNode:"Aggiungi un nodo",back:"Indietro",close:"Chiudere",createEdgeError:"Non si possono collegare vertici ad un cluster",del:"Cancella la selezione",deleteClusterError:"I cluster non possono essere cancellati",edgeDescription:"Clicca su un nodo e trascinalo ad un altro nodo per connetterli.",edit:"Modifica",editClusterError:"I clusters non possono essere modificati.",editEdge:"Modifica il vertice",editEdgeDescription:"Clicca sui Punti di controllo e trascinali ad un nodo per connetterli.",editNode:"Modifica il nodo"},nl:{addDescription:"Klik op een leeg gebied om een nieuwe node te maken.",addEdge:"Link toevoegen",addNode:"Node toevoegen",back:"Terug",close:"Sluiten",createEdgeError:"Kan geen link maken naar een cluster.",del:"Selectie verwijderen",deleteClusterError:"Clusters kunnen niet worden verwijderd.",edgeDescription:"Klik op een node en sleep de link naar een andere node om ze te verbinden.",edit:"Wijzigen",editClusterError:"Clusters kunnen niet worden aangepast.",editEdge:"Link wijzigen",editEdgeDescription:"Klik op de verbindingspunten en sleep ze naar een node om daarmee te verbinden.",editNode:"Node wijzigen"},pt:{addDescription:"Clique em um espaço em branco para adicionar um novo nó",addEdge:"Adicionar aresta",addNode:"Adicionar nó",back:"Voltar",close:"Fechar",createEdgeError:"Não foi possível linkar arestas a um cluster.",del:"Remover selecionado",deleteClusterError:"Clusters não puderam ser removidos.",edgeDescription:"Clique em um nó e arraste a aresta até outro nó para conectá-los",edit:"Editar",editClusterError:"Clusters não puderam ser editados.",editEdge:"Editar aresta",editEdgeDescription:"Clique nos pontos de controle e os arraste para um nó para conectá-los",editNode:"Editar nó"},ru:{addDescription:"Кликните в свободное место, чтобы добавить новый узел.",addEdge:"Добавить ребро",addNode:"Добавить узел",back:"Назад",close:"Закрывать",createEdgeError:"Невозможно соединить ребра в кластер.",del:"Удалить выбранное",deleteClusterError:"Кластеры не могут быть удалены",edgeDescription:"Кликните на узел и протяните ребро к другому узлу, чтобы соединить их.",edit:"Редактировать",editClusterError:"Кластеры недоступны для редактирования.",editEdge:"Редактировать ребро",editEdgeDescription:"Кликните на контрольные точки и перетащите их в узел, чтобы подключиться к нему.",editNode:"Редактировать узел"},cn:{addDescription:"单击空白处放置新节点。",addEdge:"添加连接线",addNode:"添加节点",back:"返回",close:"關閉",createEdgeError:"无法将连接线连接到群集。",del:"删除选定",deleteClusterError:"无法删除群集。",edgeDescription:"单击某个节点并将该连接线拖动到另一个节点以连接它们。",edit:"编辑",editClusterError:"无法编辑群集。",editEdge:"编辑连接线",editEdgeDescription:"单击控制节点并将它们拖到节点上连接。",editNode:"编辑节点"},uk:{addDescription:"Kлікніть на вільне місце, щоб додати новий вузол.",addEdge:"Додати край",addNode:"Додати вузол",back:"Назад",close:"Закрити",createEdgeError:"Не можливо об'єднати краї в групу.",del:"Видалити обране",deleteClusterError:"Групи не можуть бути видалені.",edgeDescription:"Клікніть на вузол і перетягніть край до іншого вузла, щоб їх з'єднати.",edit:"Редагувати",editClusterError:"Групи недоступні для редагування.",editEdge:"Редагувати край",editEdgeDescription:"Клікніть на контрольні точки і перетягніть їх у вузол, щоб підключитися до нього.",editNode:"Редагувати вузол"},fr:{addDescription:"Cliquez dans un endroit vide pour placer un nœud.",addEdge:"Ajouter un lien",addNode:"Ajouter un nœud",back:"Retour",close:"Fermer",createEdgeError:"Impossible de créer un lien vers un cluster.",del:"Effacer la sélection",deleteClusterError:"Les clusters ne peuvent pas être effacés.",edgeDescription:"Cliquez sur un nœud et glissez le lien vers un autre nœud pour les connecter.",edit:"Éditer",editClusterError:"Les clusters ne peuvent pas être édités.",editEdge:"Éditer le lien",editEdgeDescription:"Cliquez sur les points de contrôle et glissez-les pour connecter un nœud.",editNode:"Éditer le nœud"},cs:{addDescription:"Kluknutím do prázdného prostoru můžete přidat nový vrchol.",addEdge:"Přidat hranu",addNode:"Přidat vrchol",back:"Zpět",close:"Zavřít",createEdgeError:"Nelze připojit hranu ke shluku.",del:"Smazat výběr",deleteClusterError:"Nelze mazat shluky.",edgeDescription:"Přetažením z jednoho vrcholu do druhého můžete spojit tyto vrcholy novou hranou.",edit:"Upravit",editClusterError:"Nelze upravovat shluky.",editEdge:"Upravit hranu",editEdgeDescription:"Přetažením kontrolního vrcholu hrany ji můžete připojit k jinému vrcholu.",editNode:"Upravit vrchol"}});function Vg(e,t){try{var n=L(t.split(/[-_ /]/,2),2),i=n[0],r=n[1],o=null!=i?i.toLowerCase():null,a=null!=r?r.toUpperCase():null;if(o&&a){var s,l=o+"-"+a;if(Object.prototype.hasOwnProperty.call(e,l))return l;console.warn(eu(s="Unknown variant ".concat(a," of language ")).call(s,o,"."))}if(o){var c=o;if(Object.prototype.hasOwnProperty.call(e,c))return c;console.warn("Unknown language ".concat(o))}return console.warn("Unknown locale ".concat(t,", falling back to English.")),"en"}catch(e){return console.error(e),console.warn("Unexpected error while normalizing locale ".concat(t,", falling back to English.")),"en"}}function Ug(e){ny(e,ly,{value:{objectID:"O"+cy++,weakData:{}}})}var qg=function(){function e(){m(this,e),this.NUM_ITERATIONS=4,this.image=new Image,this.canvas=document.createElement("canvas")}return v(e,[{key:"init",value:function(){var e,t,n,i,r,o,a,s;this.initialized()||(this.src=this.image.src,s=this.image.width,i=this.image.height,this.width=s,this.height=i,e=Math.floor(i/2),t=Math.floor(i/4),n=Math.floor(i/8),i=Math.floor(i/16),r=Math.floor(s/2),o=Math.floor(s/4),a=Math.floor(s/8),s=Math.floor(s/16),this.canvas.width=3*o,this.canvas.height=e,this.coordinates=[[0,0,r,e],[r,0,o,t],[r,t,a,n],[5*a,t,s,i]],this._fillMipMap())}},{key:"initialized",value:function(){return void 0!==this.coordinates}},{key:"_fillMipMap",value:function(){var e=this.canvas.getContext("2d"),t=this.coordinates[0];e.drawImage(this.image,t[0],t[1],t[2],t[3]);for(var n=1;n<this.NUM_ITERATIONS;n++){var i=this.coordinates[n-1],r=this.coordinates[n];e.drawImage(this.canvas,i[0],i[1],i[2],i[3],r[0],r[1],r[2],r[3])}}},{key:"drawImageAtPosition",value:function(e,t,n,i,r,o){if(this.initialized())if(2<t){t*=.5;for(var a=0;2<t&&a<this.NUM_ITERATIONS;)t*=.5,a+=1;a>=this.NUM_ITERATIONS&&(a=this.NUM_ITERATIONS-1);var s=this.coordinates[a];e.drawImage(this.canvas,s[0],s[1],s[2],s[3],n,i,r,o)}else e.drawImage(this.image,n,i,r,o)}}]),e}(),Gg=function(){function t(e){m(this,t),this.images={},this.imageBroken={},this.callback=e}return v(t,[{key:"_tryloadBrokenUrl",value:function(e,t,n){void 0!==e&&void 0!==n&&(void 0===t?console.warn("No broken url image defined"):(n.image.onerror=function(){console.error("Could not load brokenImage:",t)},n.image.src=t))}},{key:"_redrawWithImage",value:function(e){this.callback&&this.callback(e)}},{key:"load",value:function(e,t){var n=this,i=this.images[e];if(i)return i;var r=new qg;return(this.images[e]=r).image.onload=function(){n._fixImageCoordinates(r.image),r.init(),n._redrawWithImage(r)},r.image.onerror=function(){console.error("Could not load image:",e),n._tryloadBrokenUrl(e,t,r)},r.image.src=e,r}},{key:"_fixImageCoordinates",value:function(e){0===e.width&&(document.body.appendChild(e),e.width=e.offsetWidth,e.height=e.offsetHeight,document.body.removeChild(e))}}]),t}(),p={exports:{}},d=e(function(){var e;"function"==typeof ArrayBuffer&&(e=new ArrayBuffer(8),Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8}))}),Bs=e,Kg=H,Yg=N,Jg=d,Xg=Object.isExtensible,bl=Bs(function(){Xg(1)})||Jg?function(e){return!!Kg(e)&&((!Jg||"ArrayBuffer"!=Yg(e))&&(!Xg||Xg(e)))}:Xg,Pn=!e(function(){return Object.isExtensible(Object.preventExtensions({}))}),Qg=c,Zg=i,$i=Xx,ey=H,ty=u,ny=s.f,iy=f,ry=qr,oy=bl,ay=Pn,sy=!1,ly=We("meta"),cy=0,uy=p.exports={enable:function(){uy.enable=function(){},sy=!0;var r=iy.f,o=Zg([].splice),e={};e[ly]=1,r(e).length&&(iy.f=function(e){for(var t=r(e),n=0,i=t.length;n<i;n++)if(t[n]===ly){o(t,n,1);break}return t},Qg({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:ry.f}))},fastKey:function(e,t){if(!ey(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!ty(e,ly)){if(!oy(e))return"F";if(!t)return"E";Ug(e)}return e[ly].objectID},getWeakData:function(e,t){if(!ty(e,ly)){if(!oy(e))return!0;if(!t)return!1;Ug(e)}return e[ly].weakData},onFreeze:function(e){return ay&&sy&&oy(e)&&!ty(e,ly)&&Ug(e),e}};function dy(e,t){this.stopped=e,this.result=t}function hy(e,t,n){function i(e){return o&&Ey(o,"normal",e),new dy(!0,e)}function r(e){return h?(vy(e),f?g(e[0],e[1],i):g(e[0],e[1])):f?g(e,i):g(e)}var o,a,s,l,c,u,d=n&&n.that,h=!(!n||!n.AS_ENTRIES),p=!(!n||!n.IS_ITERATOR),f=!(!n||!n.INTERRUPTED),g=yy(t,d);if(p)o=e;else{if(!(n=Oy(e)))throw ky(by(e)+" is not iterable");if(xy(n)){for(a=0,s=wy(e);a<s;a++)if((l=r(e[a]))&&_y(jy,l))return l;return new dy(!1)}o=Sy(e,n)}for(c=o.next;!(u=my(c,o)).done;){try{l=r(u.value)}catch(e){Ey(o,"throw",e)}if("object"==typeof l&&l&&_y(jy,l))return l}return new dy(!1)}function py(e,t){if(Ty(t,e))return e;throw Cy("Incorrect invocation")}function fy(n,e,t){var i,o,a,r=-1!==n.indexOf("Map"),s=-1!==n.indexOf("Weak"),l=r?"set":"add",c=$y[n],u=c&&c.prototype,d={};return Hy&&Dy(c)&&(s||u.forEach&&!Ry(function(){(new c).entries().next()}))?(o=(i=e(function(e,t){Wy(Fy(e,o),{type:n,collection:new c}),null!=t&&Ay(t,e[l],{that:e,AS_ENTRIES:r})})).prototype,a=Vy(n),zy(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(i){var r="add"==i||"set"==i;i in u&&(!s||"clear"!=i)&&My(o,i,function(e,t){var n=a(this).collection;if(!r&&s&&!Ny(e))return"get"==i&&void 0;n=n[i](0===e?0:e,t);return r?this:n})}),s||By(o,"size",{configurable:!0,get:function(){return a(this).collection.size}})):(i=t.getConstructor(e,n,r,l),Iy.enable()),Ly(i,n,!1,!0),d[n]=i,Py({global:!0,forced:!0},d),s||t.setStrong(i,n,r),i}function gy(e,t,n){for(var i in t)n&&n.unsafe&&e[i]?e[i]=t[i]:Uy(e,i,t[i],n);return e}$i[ly]=!0;var yy=Ke,my=te,vy=Ye,by=xe,xy=to,wy=Ze,_y=me,Sy=so,Oy=ao,Ey=Zr,ky=t.TypeError,jy=dy.prototype,Ty=me,Cy=t.TypeError,Py=c,$y=t,Iy=p.exports,Ry=e,My=at,Ay=hy,Fy=py,Dy=F,Ny=H,Ly=Kr,By=s.f,zy=Ur.forEach,Hy=n,Wy=or.set,Vy=or.getterFor,Uy=Sr,qy=V,Gy=s,Ky=n,Yy=Ve("species"),Jy=s.f,Xy=ut,Qy=gy,Zy=Ke,em=py,tm=hy,nm=Qr,im=function(e){var e=qy(e),t=Gy.f;Ky&&e&&!e[Yy]&&t(e,Yy,{configurable:!0,get:function(){return this}})},rm=n,om=p.exports.fastKey,am=or.set,sm=or.getterFor,lm=(fy("Map",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},o={getConstructor:function(e,n,i,r){function o(e,t,n){var i,r=l(e),o=a(e,t);return o?o.value=n:(r.last=o={index:i=om(t,!0),key:t,value:n,previous:t=r.last,next:void 0,removed:!1},r.first||(r.first=o),t&&(t.next=o),rm?r.size++:e.size++,"F"!==i&&(r.index[i]=o)),e}function a(e,t){var n,e=l(e),i=om(t);if("F"!==i)return e.index[i];for(n=e.first;n;n=n.next)if(n.key==t)return n}var e=e(function(e,t){em(e,s),am(e,{type:n,index:Xy(null),first:void 0,last:void 0,size:0}),rm||(e.size=0),null!=t&&tm(t,e[r],{that:e,AS_ENTRIES:i})}),s=e.prototype,l=sm(n);return Qy(s,{clear:function(){for(var e=l(this),t=e.index,n=e.first;n;)n.removed=!0,n.previous&&(n.previous=n.previous.next=void 0),delete t[n.index],n=n.next;e.first=e.last=void 0,rm?e.size=0:this.size=0},delete:function(e){var t,n,i=l(this),e=a(this,e);return e&&(t=e.next,n=e.previous,delete i.index[e.index],e.removed=!0,n&&(n.next=t),t&&(t.previous=n),i.first==e&&(i.first=t),i.last==e&&(i.last=n),rm?i.size--:this.size--),!!e},forEach:function(e){for(var t,n=l(this),i=Zy(e,1<arguments.length?arguments[1]:void 0);t=t?t.next:n.first;)for(i(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!a(this,e)}}),Qy(s,i?{get:function(e){e=a(this,e);return e&&e.value},set:function(e,t){return o(this,0===e?0:e,t)}}:{add:function(e){return o(this,e=0===e?0:e,e)}}),rm&&Jy(s,"size",{get:function(){return l(this).size}}),e},setStrong:function(e,t,n){var i=t+" Iterator",r=sm(t),o=sm(i);nm(e,t,function(e,t){am(this,{type:i,target:e,state:r(e),kind:t,last:void 0})},function(){for(var e=o(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?"keys"==t?{value:n.key,done:!1}:"values"==t?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:{value:e.target=void 0,done:!0}},n?"entries":"values",!n,!0),im(t)}}),r.Map),cm=function(){function e(){m(this,e),this.clear(),this._defaultIndex=0,this._groupIndex=0,this._defaultGroups=[{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#2B7CE9",background:"#D2E5FF"},hover:{border:"#2B7CE9",background:"#D2E5FF"}},{border:"#FFA500",background:"#FFFF00",highlight:{border:"#FFA500",background:"#FFFFA3"},hover:{border:"#FFA500",background:"#FFFFA3"}},{border:"#FA0A10",background:"#FB7E81",highlight:{border:"#FA0A10",background:"#FFAFB1"},hover:{border:"#FA0A10",background:"#FFAFB1"}},{border:"#41A906",background:"#7BE141",highlight:{border:"#41A906",background:"#A1EC76"},hover:{border:"#41A906",background:"#A1EC76"}},{border:"#E129F0",background:"#EB7DF4",highlight:{border:"#E129F0",background:"#F0B3F5"},hover:{border:"#E129F0",background:"#F0B3F5"}},{border:"#7C29F0",background:"#AD85E4",highlight:{border:"#7C29F0",background:"#D3BDF0"},hover:{border:"#7C29F0",background:"#D3BDF0"}},{border:"#C37F00",background:"#FFA807",highlight:{border:"#C37F00",background:"#FFCA66"},hover:{border:"#C37F00",background:"#FFCA66"}},{border:"#4220FB",background:"#6E6EFD",highlight:{border:"#4220FB",background:"#9B9BFD"},hover:{border:"#4220FB",background:"#9B9BFD"}},{border:"#FD5A77",background:"#FFC0CB",highlight:{border:"#FD5A77",background:"#FFD1D9"},hover:{border:"#FD5A77",background:"#FFD1D9"}},{border:"#4AD63A",background:"#C2FABC",highlight:{border:"#4AD63A",background:"#E6FFE3"},hover:{border:"#4AD63A",background:"#E6FFE3"}},{border:"#990000",background:"#EE0000",highlight:{border:"#BB0000",background:"#FF3333"},hover:{border:"#BB0000",background:"#FF3333"}},{border:"#FF6000",background:"#FF6000",highlight:{border:"#FF6000",background:"#FF6000"},hover:{border:"#FF6000",background:"#FF6000"}},{border:"#97C2FC",background:"#2B7CE9",highlight:{border:"#D2E5FF",background:"#2B7CE9"},hover:{border:"#D2E5FF",background:"#2B7CE9"}},{border:"#399605",background:"#255C03",highlight:{border:"#399605",background:"#255C03"},hover:{border:"#399605",background:"#255C03"}},{border:"#B70054",background:"#FF007E",highlight:{border:"#B70054",background:"#FF007E"},hover:{border:"#B70054",background:"#FF007E"}},{border:"#AD85E4",background:"#7C29F0",highlight:{border:"#D3BDF0",background:"#7C29F0"},hover:{border:"#D3BDF0",background:"#7C29F0"}},{border:"#4557FA",background:"#000EA1",highlight:{border:"#6E6EFD",background:"#000EA1"},hover:{border:"#6E6EFD",background:"#000EA1"}},{border:"#FFC0CB",background:"#FD5A77",highlight:{border:"#FFD1D9",background:"#FD5A77"},hover:{border:"#FFD1D9",background:"#FD5A77"}},{border:"#C2FABC",background:"#74D66A",highlight:{border:"#E6FFE3",background:"#74D66A"},hover:{border:"#E6FFE3",background:"#74D66A"}},{border:"#EE0000",background:"#990000",highlight:{border:"#FF3333",background:"#BB0000"},hover:{border:"#FF3333",background:"#BB0000"}}],this.options={},this.defaultOptions={useDefaultGroups:!0},Zn(this.options,this.defaultOptions)}return v(e,[{key:"setOptions",value:function(e){var t,n=["useDefaultGroups"];if(void 0!==e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&-1===T(n).call(n,i)&&(t=e[i],this.add(i,t))}},{key:"clear",value:function(){this._groups=new lm,this._groupNames=[]}},{key:"get",value:function(e){var t=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],n=this._groups.get(e);return void 0===n&&t&&(!1===this.options.useDefaultGroups&&0<this._groupNames.length?(t=this._groupIndex%this._groupNames.length,++this._groupIndex,(n={}).color=this._groups.get(this._groupNames[t])):(t=this._defaultIndex%this._defaultGroups.length,this._defaultIndex++,(n={}).color=this._defaultGroups[t]),this._groups.set(e,n)),n}},{key:"add",value:function(e,t){return this._groups.has(e)||this._groupNames.push(e),this._groups.set(e,t),t}}]),e}(),um=(c({target:"Number",stat:!0},{isNaN:function(e){return e!=e}}),r.Number.isNaN),dm=t.isFinite,hm=(c({target:"Number",stat:!0},{isFinite:Number.isFinite||function(e){return"number"==typeof e&&dm(e)}}),r.Number.isFinite),ar=c,pm=Ur.some,gl=(ar({target:"Array",proto:!0,forced:!du("some")},{some:function(e){return pm(this,e,1<arguments.length?arguments[1]:void 0)}}),Qn("Array").some),fm=me,gm=gl,ym=Array.prototype,mm=function(e){var t=e.some;return e===ym||fm(ym,e)&&t===ym.some?gm:t},Ce=t,hr=e,fl=i,vm=Ti,bm=hl.trim,Ui=gr,xm=fl("".charAt),wm=Ce.parseFloat,_m=(ol=Ce.Symbol)&&ol.iterator,Hn=1/wm(Ui+"-0")!=-1/0||_m&&!hr(function(){wm(Object(_m))})?function(e){var e=bm(vm(e)),t=wm(e);return 0===t&&"-"==xm(e,0)?-0:t}:wm,Sm=(c({global:!0,forced:parseFloat!=Hn},{parseFloat:Hn}),r.parseFloat),vc=c,ne=e,Nn=qr.f,Om=(vc({target:"Object",stat:!0,forced:ne(function(){return!Object.getOwnPropertyNames(1)})},{getOwnPropertyNames:Nn}),r.Object),Em=function(e){return Om.getOwnPropertyNames(e)};function km(e,t){var n=["node","edge","label"],i=!0,r=Qf(t,"chosen");if("boolean"==typeof r)i=r;else if("object"===b(r)){if(-1===T(n).call(n,e))throw new Error("choosify: subOption '"+e+"' should be one of '"+n.join("', '")+"'");r=Qf(t,["chosen",e]);"boolean"!=typeof r&&"function"!=typeof r||(i=r)}return i}function jm(e,t,n){var i;if(!(e.width<=0||e.height<=0))return void 0!==n&&(i={x:t.x-n.x,y:t.y-n.y},t=0!==n.angle?(n=-n.angle,{x:Math.cos(n)*i.x-Math.sin(n)*i.y,y:Math.sin(n)*i.x+Math.cos(n)*i.y}):i),n=e.x+e.width,i=e.y+e.width,e.left<t.x&&n>t.x&&e.top<t.y&&i>t.y}function Tm(e){return"string"==typeof e&&""!==e}function Cm(e,t,n,i){var r,o=i.x,a=i.y;return"function"==typeof i.distanceToBorder?(e=i.distanceToBorder(e,t),r=Math.sin(t)*e,(t=Math.cos(t)*e)===e?(o+=e,a=i.y):r===e?(o=i.x,a-=e):(o+=t,a-=r)):a=i.shape.width>i.shape.height?(o=i.x+.5*i.shape.width,i.y-n):(o=i.x+n,i.y-.5*i.shape.height),{x:o,y:a}}var ll=Qn("Array").values,Pm=Pi,$m=u,Im=me,Rm=ll,Mm=Array.prototype,Am={DOMTokenList:!0,NodeList:!0},Fm=function(e){var t=e.values;return e===Mm||Im(Mm,e)&&t===Mm.values||$m(Am,Pm(e))?Rm:t},Dm=function(){function t(e){m(this,t),this.measureText=e,this.current=0,this.width=0,this.height=0,this.lines=[]}return v(t,[{key:"_add",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"normal",i=(void 0===this.lines[e]&&(this.lines[e]={width:0,height:0,blocks:[]}),t),i=this.measureText(i=void 0!==t&&""!==t?i:" ",n),r=Zn({},Fm(i));r.text=t,r.width=i.width,r.mod=n,void 0!==t&&""!==t||(r.width=0),this.lines[e].blocks.push(r),this.lines[e].width+=r.width}},{key:"curWidth",value:function(){var e=this.lines[this.current];return void 0===e?0:e.width}},{key:"append",value:function(e){this._add(this.current,e,1<arguments.length&&void 0!==arguments[1]?arguments[1]:"normal")}},{key:"newLine",value:function(e){this._add(this.current,e,1<arguments.length&&void 0!==arguments[1]?arguments[1]:"normal"),this.current++}},{key:"determineLineHeights",value:function(){for(var e=0;e<this.lines.length;e++){var t=this.lines[e],n=0;if(void 0!==t.blocks)for(var i=0;i<t.blocks.length;i++){var r=t.blocks[i];n<r.height&&(n=r.height)}t.height=n}}},{key:"determineLabelSize",value:function(){for(var e=0,t=0,n=0;n<this.lines.length;n++){var i=this.lines[n];i.width>e&&(e=i.width),t+=i.height}this.width=e,this.height=t}},{key:"removeEmptyBlocks",value:function(){for(var e=[],t=0;t<this.lines.length;t++){var n=this.lines[t];if(0!==n.blocks.length&&(t!==this.lines.length-1||0!==n.width)){for(var i={},r=(Zn(i,n),i.blocks=[],void 0),o=[],a=0;a<n.blocks.length;a++){var s=n.blocks[a];0!==s.width?o.push(s):void 0===r&&(r=s)}0===o.length&&void 0!==r&&o.push(r),i.blocks=o,e.push(i)}}return e}},{key:"finalize",value:function(){this.determineLineHeights(),this.determineLabelSize();var e=this.removeEmptyBlocks();return{width:this.width,height:this.height,lines:e}}}]),t}(),Nm={"<b>":/<b>/,"<i>":/<i>/,"<code>":/<code>/,"</b>":/<\/b>/,"</i>":/<\/i>/,"</code>":/<\/code>/,"*":/\*/,_:/_/,"`":/`/,afterBold:/[^*]/,afterItal:/[^_]/,afterMono:/[^`]/},Lm=function(){function t(e){m(this,t),this.text=e,this.bold=!1,this.ital=!1,this.mono=!1,this.spacing=!1,this.position=0,this.buffer="",this.modStack=[],this.blocks=[]}return v(t,[{key:"mod",value:function(){return 0===this.modStack.length?"normal":this.modStack[0]}},{key:"modName",value:function(){return 0===this.modStack.length?"normal":"mono"===this.modStack[0]?"mono":this.bold&&this.ital?"boldital":this.bold?"bold":this.ital?"ital":void 0}},{key:"emitBlock",value:function(){this.spacing&&(this.add(" "),this.spacing=!1),0<this.buffer.length&&(this.blocks.push({text:this.buffer,mod:this.modName()}),this.buffer="")}},{key:"add",value:function(e){" "===e&&(this.spacing=!0),this.spacing&&(this.buffer+=" ",this.spacing=!1)," "!=e&&(this.buffer+=e)}},{key:"parseWS",value:function(e){return!!/[ \t]/.test(e)&&(this.mono?this.add(e):this.spacing=!0,!0)}},{key:"setTag",value:function(e){this.emitBlock(),this[e]=!0,this.modStack.unshift(e)}},{key:"unsetTag",value:function(e){this.emitBlock(),this[e]=!1,this.modStack.shift()}},{key:"parseStartTag",value:function(e,t){return!(this.mono||this[e]||!this.match(t))&&(this.setTag(e),!0)}},{key:"match",value:function(e){var t=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],n=L(this.prepareRegExp(e),2),i=n[0],n=n[1],i=i.test(this.text.substr(this.position,n));return i&&t&&(this.position+=n-1),i}},{key:"parseEndTag",value:function(e,t,n){var i=this.mod()===e;return!(!(i="mono"===e?i&&this.mono:i&&!this.mono)||!this.match(t))&&(void 0!==n&&this.position!==this.text.length-1&&!this.match(n,!1)||this.unsetTag(e),!0)}},{key:"replace",value:function(e,t){return!!this.match(e)&&(this.add(t),this.position+=length-1,!0)}},{key:"prepareRegExp",value:function(e){var t,n;return n=e instanceof RegExp?(t=e,1):(t=void 0!==(n=Nm[e])?n:new RegExp(e),e.length),[t,n]}}]),t}(),Bm=function(){function t(i,e,r,o){var a=this;m(this,t),this.ctx=i,this.parent=e,this.selected=r,this.hover=o;this.lines=new Dm(function(e,t){if(void 0===e)return 0;var t=a.parent.getFormattingValues(i,r,o,t),n=0;return{width:n=""!==e?a.ctx.measureText(e).width:n,values:t}})}return v(t,[{key:"process",value:function(e){if(!Tm(e))return this.lines.finalize();var t=this.parent.fontOptions,n=(e=(e=e.replace(/\r\n/g,"\n")).replace(/\r/g,"\n"),String(e).split("\n")),i=n.length;if(t.multi)for(var r=0;r<i;r++){var o=this.splitBlocks(n[r],t.multi);if(void 0!==o)if(0===o.length)this.lines.newLine("");else{if(0<t.maxWdt)for(var a=0;a<o.length;a++){var s=o[a].mod,l=o[a].text;this.splitStringIntoLines(l,s,!0)}else for(var c=0;c<o.length;c++){var u=o[c].mod,d=o[c].text;this.lines.append(d,u)}this.lines.newLine()}}else if(0<t.maxWdt)for(var h=0;h<i;h++)this.splitStringIntoLines(n[h]);else for(var p=0;p<i;p++)this.lines.newLine(n[p]);return this.lines.finalize()}},{key:"decodeMarkupSystem",value:function(e){var t="none";return"markdown"===e||"md"===e?t="markdown":!0!==e&&"html"!==e||(t="html"),t}},{key:"splitHtmlBlocks",value:function(e){for(var t=new Lm(e);t.position<t.text.length;){var n=t.text.charAt(t.position);t.parseWS(n)||/</.test(n)&&(t.parseStartTag("bold","<b>")||t.parseStartTag("ital","<i>")||t.parseStartTag("mono","<code>")||t.parseEndTag("bold","</b>")||t.parseEndTag("ital","</i>")||t.parseEndTag("mono","</code>"))||!!/&/.test(n)&&(t.replace(t.text,"&lt;","<")||t.replace(t.text,"&amp;","&")||t.add("&"),!0)||t.add(n),t.position++}return t.emitBlock(),t.blocks}},{key:"splitMarkdownBlocks",value:function(e){for(var t,n=this,i=new Lm(e),r=!0;i.position<i.text.length;){var o=i.text.charAt(i.position);i.parseWS(o)||!!/\\/.test(t=o)&&(i.position<n.text.length+1&&(i.position++,t=n.text.charAt(i.position),/ \t/.test(t)?i.spacing=!0:(i.add(t),r=!1)),!0)||(r||i.spacing)&&(i.parseStartTag("bold","*")||i.parseStartTag("ital","_")||i.parseStartTag("mono","`"))||i.parseEndTag("bold","*","afterBold")||i.parseEndTag("ital","_","afterItal")||i.parseEndTag("mono","`","afterMono")||(i.add(o),r=!1),i.position++}return i.emitBlock(),i.blocks}},{key:"splitBlocks",value:function(e,t){t=this.decodeMarkupSystem(t);return"none"===t?[{text:e,mod:"normal"}]:"markdown"===t?this.splitMarkdownBlocks(e):"html"===t?this.splitHtmlBlocks(e):void 0}},{key:"overMaxWidth",value:function(e){e=this.ctx.measureText(e).width;return this.lines.curWidth()+e>this.parent.fontOptions.maxWdt}},{key:"getLongestFit",value:function(e){for(var t="",n=0;n<e.length;){var i=t+(""===t?"":" ")+e[n];if(this.overMaxWidth(i))break;t=i,n++}return n}},{key:"getLongestFitWord",value:function(e){for(var t=0;t<e.length&&!this.overMaxWidth(tu(e).call(e,0,t));)t++;return t}},{key:"splitStringIntoLines",value:function(e){for(var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"normal",n=2<arguments.length&&void 0!==arguments[2]&&arguments[2],i=(this.parent.getFormattingValues(this.ctx,this.selected,this.hover,t),(e=(e=e.replace(/^( +)/g,"$1\r")).replace(/([^\r][^ ]*)( +)/g,"$1\r$2\r")).split("\r"));0<i.length;){var r,o,a=this.getLongestFit(i);0===a?(r=i[0],o=this.getLongestFitWord(r),this.lines.newLine(tu(r).call(r,0,o),t),i[0]=tu(r).call(r,o)):(" "===i[(r=a)-1]?a--:" "===i[r]&&r++,o=tu(i).call(i,0,a).join(""),a==i.length&&n?this.lines.append(o,t):this.lines.newLine(o,t),i=tu(i).call(i,r))}}}]),t}(),zm=["bold","ital","boldital","mono"],Hm=function(){function a(e,t){var n=2<arguments.length&&void 0!==arguments[2]&&arguments[2];m(this,a),this.body=e,this.pointToSelf=!1,this.baseSize=void 0,this.fontOptions={},this.setOptions(t),this.size={top:0,left:0,width:0,height:0,yLine:0},this.isEdgeLabel=n}return v(a,[{key:"setOptions",value:function(e){this.elementOptions=e,this.initFontOptions(e.font),Tm(e.label)?this.labelDirty=!0:e.label=void 0,void 0!==e.font&&null!==e.font&&("string"==typeof e.font?this.baseSize=this.fontOptions.size:"object"===b(e.font)&&void 0!==(e=e.font.size)&&(this.baseSize=e))}},{key:"initFontOptions",value:function(e){var n=this;C(zm,function(e){n.fontOptions[e]={}}),a.parseFontString(this.fontOptions,e)?this.fontOptions.vadjust=0:C(e,function(e,t){null!=e&&"object"!==b(e)&&(n.fontOptions[t]=e)})}},{key:"constrain",value:function(e){var t={constrainWidth:!1,maxWdt:-1,minWdt:-1,constrainHeight:!1,minHgt:-1,valign:"middle"},n=Qf(e,"widthConstraint"),n=("number"==typeof n?(t.maxWdt=Number(n),t.minWdt=Number(n)):"object"===b(n)&&("number"==typeof(n=Qf(e,["widthConstraint","maximum"]))&&(t.maxWdt=Number(n)),"number"==typeof(n=Qf(e,["widthConstraint","minimum"]))&&(t.minWdt=Number(n))),Qf(e,"heightConstraint"));return"number"==typeof n?t.minHgt=Number(n):"object"===b(n)&&("number"==typeof(n=Qf(e,["heightConstraint","minimum"]))&&(t.minHgt=Number(n)),"string"!=typeof(n=Qf(e,["heightConstraint","valign"]))||"top"!==n&&"bottom"!==n||(t.valign=n)),t}},{key:"update",value:function(e,t){this.setOptions(e,!0),this.propagateFonts(t),S(this.fontOptions,this.constrain(t)),this.fontOptions.chooser=km("label",t)}},{key:"adjustSizes",value:function(e){var t=e?e.right+e.left:0,t=(this.fontOptions.constrainWidth&&(this.fontOptions.maxWdt-=t,this.fontOptions.minWdt-=t),e?e.top+e.bottom:0);this.fontOptions.constrainHeight&&(this.fontOptions.minHgt-=t)}},{key:"addFontOptionsToPile",value:function(e,t){for(var n=0;n<t.length;++n)this.addFontToPile(e,t[n])}},{key:"addFontToPile",value:function(e,t){void 0!==t&&void 0!==t.font&&null!==t.font&&(t=t.font,e.push(t))}},{key:"getBasicOptions",value:function(e){for(var n={},t=0;t<e.length;++t){var i=e[t],r={};C(i=a.parseFontString(r,i)?r:i,function(e,t){void 0===e||Object.prototype.hasOwnProperty.call(n,t)||(-1!==T(zm).call(zm,t)?n[t]={}:n[t]=e)})}return n}},{key:"getFontOption",value:function(e,t,n){for(var i=0;i<e.length;++i){var r=e[i];if(Object.prototype.hasOwnProperty.call(r,t)&&null!=(r=r[t])){var o={};if(a.parseFontString(o,r)&&(r=o),Object.prototype.hasOwnProperty.call(r,n))return r[n]}}if(Object.prototype.hasOwnProperty.call(this.fontOptions,n))return this.fontOptions[n];throw new Error("Did not find value for multi-font for property: '"+n+"'")}},{key:"getFontOptions",value:function(e,t){for(var n={},i=["color","size","face","mod","vadjust"],r=0;r<i.length;++r){var o=i[r];n[o]=this.getFontOption(e,t,o)}return n}},{key:"propagateFonts",value:function(e){for(var t=this,i=[],n=(this.addFontOptionsToPile(i,e),this.fontOptions=this.getBasicOptions(i),0);n<zm.length;++n)!function(e){var e=zm[e],n=t.fontOptions[e];C(t.getFontOptions(i,e),function(e,t){n[t]=e}),n.size=Number(n.size),n.vadjust=Number(n.vadjust)}(n)}},{key:"draw",value:function(e,t,n,i,r){var o,a=5<arguments.length&&void 0!==arguments[5]?arguments[5]:"middle";void 0!==this.elementOptions.label&&(o=this.fontOptions.size*this.body.view.scale,this.elementOptions.label&&o<this.elementOptions.scaling.label.drawThreshold-1||(o>=this.elementOptions.scaling.label.maxVisible&&(o=Number(this.elementOptions.scaling.label.maxVisible)/this.body.view.scale),this.calculateLabelSize(e,i,r,t,n,a),this._drawBackground(e),this._drawText(e,t,this.size.yLine,a,o)))}},{key:"_drawBackground",value:function(e){var t;void 0!==this.fontOptions.background&&"none"!==this.fontOptions.background&&(e.fillStyle=this.fontOptions.background,t=this.getSize(),e.fillRect(t.left,t.top,t.width,t.height))}},{key:"_drawText",value:function(e,t,n){var i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:"middle",r=4<arguments.length?arguments[4]:void 0,i=L(this._setAlignment(e,t,n,i),2);t=i[0],n=i[1],e.textAlign="left",t-=this.size.width/2,this.fontOptions.valign&&this.size.height>this.size.labelHeight&&("top"===this.fontOptions.valign&&(n-=(this.size.height-this.size.labelHeight)/2),"bottom"===this.fontOptions.valign&&(n+=(this.size.height-this.size.labelHeight)/2));for(var o=0;o<this.lineCount;o++){var a=this.lines[o];if(a&&a.blocks){var s=0;this.isEdgeLabel||"center"===this.fontOptions.align?s+=(this.size.width-a.width)/2:"right"===this.fontOptions.align&&(s+=this.size.width-a.width);for(var l=0;l<a.blocks.length;l++){var c=a.blocks[l];e.font=c.font;var u=L(this._getColor(c.color,r,c.strokeColor),2),d=u[0],u=u[1];0<c.strokeWidth&&(e.lineWidth=c.strokeWidth,e.strokeStyle=u,e.lineJoin="round"),e.fillStyle=d,0<c.strokeWidth&&e.strokeText(c.text,t+s,n+c.vadjust),e.fillText(c.text,t+s,n+c.vadjust),s+=c.width}n+=a.height}}}},{key:"_setAlignment",value:function(e,t,n,i){return this.isEdgeLabel&&"horizontal"!==this.fontOptions.align&&!1===this.pointToSelf?(n=t=0,"top"===this.fontOptions.align?(e.textBaseline="alphabetic",n-=4):"bottom"===this.fontOptions.align?(e.textBaseline="hanging",n+=4):e.textBaseline="middle"):e.textBaseline=i,[t,n]}},{key:"_getColor",value:function(e,t,n){e=e||"#000000",n=n||"#ffffff";return t<=this.elementOptions.scaling.label.drawThreshold&&(e=Lf(e,t=Math.max(0,Math.min(1,1-(this.elementOptions.scaling.label.drawThreshold-t)))),n=Lf(n,t)),[e,n]}},{key:"getTextSize",value:function(e){return this._processLabel(e,1<arguments.length&&void 0!==arguments[1]&&arguments[1],2<arguments.length&&void 0!==arguments[2]&&arguments[2]),{width:this.size.width,height:this.size.height,lineCount:this.lineCount}}},{key:"getSize",value:function(){var e=this.size.left,t=this.size.top-1;if(this.isEdgeLabel){var n=.5*-this.size.width;switch(this.fontOptions.align){case"middle":e=n,t=.5*-this.size.height;break;case"top":e=n,t=-(this.size.height+2);break;case"bottom":e=n,t=2}}return{left:e,top:t,width:this.size.width,height:this.size.height}}},{key:"calculateLabelSize",value:function(e,t,n){var i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0,r=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,o=5<arguments.length&&void 0!==arguments[5]?arguments[5]:"middle";this._processLabel(e,t,n),this.size.left=i-.5*this.size.width,this.size.top=r-.5*this.size.height,this.size.yLine=r+.5*(1-this.lineCount)*this.fontOptions.size,"hanging"===o&&(this.size.top+=.5*this.fontOptions.size,this.size.top+=4,this.size.yLine+=4)}},{key:"getFormattingValues",value:function(e,t,n,i){function r(e,t,n){return"normal"===t?"mod"===n?"":e[n]:(void 0!==e[t][n]?e[t]:e)[n]}var o={color:r(this.fontOptions,i,"color"),size:r(this.fontOptions,i,"size"),face:r(this.fontOptions,i,"face"),mod:r(this.fontOptions,i,"mod"),vadjust:r(this.fontOptions,i,"vadjust"),strokeWidth:this.fontOptions.strokeWidth,strokeColor:this.fontOptions.strokeColor},i=((t||n)&&("normal"===i&&!0===this.fontOptions.chooser&&this.elementOptions.labelHighlightBold?o.mod="bold":"function"==typeof this.fontOptions.chooser&&this.fontOptions.chooser(o,this.elementOptions.id,t,n)),"");return void 0!==o.mod&&""!==o.mod&&(i+=o.mod+" "),i+=o.size+"px "+o.face,e.font=i.replace(/"/g,""),o.font=e.font,o.height=o.size,o}},{key:"differentState",value:function(e,t){return e!==this.selectedState||t!==this.hoverState}},{key:"_processLabelText",value:function(e,t,n,i){return new Bm(e,this,t,n).process(i)}},{key:"_processLabel",value:function(e,t,n){!1===this.labelDirty&&!this.differentState(t,n)||(e=this._processLabelText(e,t,n,this.elementOptions.label),0<this.fontOptions.minWdt&&e.width<this.fontOptions.minWdt&&(e.width=this.fontOptions.minWdt),this.size.labelHeight=e.height,0<this.fontOptions.minHgt&&e.height<this.fontOptions.minHgt&&(e.height=this.fontOptions.minHgt),this.lines=e.lines,this.lineCount=e.lines.length,this.size.width=e.width,this.size.height=e.height,this.selectedState=t,this.hoverState=n,this.labelDirty=!1)}},{key:"visible",value:function(){return 0!==this.size.width&&0!==this.size.height&&void 0!==this.elementOptions.label&&!(this.fontOptions.size*this.body.view.scale<this.elementOptions.scaling.label.drawThreshold-1)}}],[{key:"parseFontString",value:function(e,t){if(!t||"string"!=typeof t)return!1;t=t.split(" ");return e.size=+t[0].replace("px",""),e.face=t[1],e.color=t[2],!0}}]),a}(),Wm=co,Vm=xe,Um=t.TypeError,qm=c,Gm=J,Km=Bn,Ym=function(e){if(Wm(e))return e;throw Um(Vm(e)+" is not a constructor")},Jm=Ye,Xm=H,Qm=ut,rl=e,Zm=V("Reflect","construct"),ev=Object.prototype,tv=[].push,nv=rl(function(){function e(){}return!(Zm(function(){},[],e)instanceof e)}),iv=!rl(function(){Zm(function(){})}),j=(qm({target:"Reflect",stat:!0,forced:il=nv||iv,sham:il},{construct:function(e,t){Ym(e),Jm(t);var n=arguments.length<3?e:Ym(arguments[2]);if(iv&&!nv)return Zm(e,t,n);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var i=[null];return Gm(tv,i,t),new(Gm(Km,e,i))}i=n.prototype,n=Qm(Xm(i)?i:ev),i=Gm(e,n,t);return Xm(i)?i:n}}),r.Reflect.construct),rv=Hd,ov=(c({target:"Object",stat:!0},{setPrototypeOf:Lr}),r.Object.setPrototypeOf);function av(e,t){return(av=ov||function(e,t){return e.__proto__=t,e})(e,t)}function P(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=rv(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),nc(e,"prototype",{writable:!1}),t&&av(e,t)}function sv(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $(e,t){if(t&&("object"===b(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return sv(e)}var lv=Vr;function I(e){return(I=ov?lv:function(e){return e.__proto__||lv(e)})(e)}function cv(n){var i=uv();return function(){var e,t=I(n);return $(this,i?(e=I(this).constructor,j(t,arguments,e)):t.apply(this,arguments))}}function uv(){if("undefined"==typeof Reflect||!j)return!1;if(j.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(j(Boolean,[],function(){})),!0}catch(e){return!1}}a=function(){function i(e,t,n){m(this,i),this.body=t,this.labelModule=n,this.setOptions(e),this.top=void 0,this.left=void 0,this.height=void 0,this.width=void 0,this.radius=void 0,this.margin=void 0,this.refreshNeeded=!0,this.boundingBox={top:0,left:0,right:0,bottom:0}}return v(i,[{key:"setOptions",value:function(e){this.options=e}},{key:"_setMargins",value:function(e){this.margin={},this.options.margin&&("object"==b(this.options.margin)?(this.margin.top=this.options.margin.top,this.margin.right=this.options.margin.right,this.margin.bottom=this.options.margin.bottom,this.margin.left=this.options.margin.left):(this.margin.top=this.options.margin,this.margin.right=this.options.margin,this.margin.bottom=this.options.margin,this.margin.left=this.options.margin)),e.adjustSizes(this.margin)}},{key:"_distanceToBorder",value:function(e,t){var n=this.options.borderWidth;return e&&this.resize(e),Math.min(Math.abs(this.width/2/Math.cos(t)),Math.abs(this.height/2/Math.sin(t)))+n}},{key:"enableShadow",value:function(e,t){t.shadow&&(e.shadowColor=t.shadowColor,e.shadowBlur=t.shadowSize,e.shadowOffsetX=t.shadowX,e.shadowOffsetY=t.shadowY)}},{key:"disableShadow",value:function(e,t){t.shadow&&(e.shadowColor="rgba(0,0,0,0)",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0)}},{key:"enableBorderDashes",value:function(e,t){var n;!1!==t.borderDashes&&(void 0!==e.setLineDash?(n=t.borderDashes,e.setLineDash(n=!0===n?[5,15]:n)):(console.warn("setLineDash is not supported in this browser. The dashed borders cannot be used."),this.options.shapeProperties.borderDashes=!1,t.borderDashes=!1))}},{key:"disableBorderDashes",value:function(e,t){!1!==t.borderDashes&&(void 0!==e.setLineDash?e.setLineDash([0]):(console.warn("setLineDash is not supported in this browser. The dashed borders cannot be used."),this.options.shapeProperties.borderDashes=!1,t.borderDashes=!1))}},{key:"needsRefresh",value:function(e,t){return!0===this.refreshNeeded?!(this.refreshNeeded=!1):void 0===this.width||this.labelModule.differentState(e,t)}},{key:"initContextForDraw",value:function(e,t){var n=t.borderWidth/this.body.view.scale;e.lineWidth=Math.min(this.width,n),e.strokeStyle=t.borderColor,e.fillStyle=t.color}},{key:"performStroke",value:function(e,t){var n=t.borderWidth/this.body.view.scale;e.save(),0<n&&(this.enableBorderDashes(e,t),e.stroke(),this.disableBorderDashes(e,t)),e.restore()}},{key:"performFill",value:function(e,t){e.save(),e.fillStyle=t.color,this.enableShadow(e,t),xh(e).call(e),this.disableShadow(e,t),e.restore(),this.performStroke(e,t)}},{key:"_addBoundingBoxMargin",value:function(e){this.boundingBox.left-=e,this.boundingBox.top-=e,this.boundingBox.bottom+=e,this.boundingBox.right+=e}},{key:"_updateBoundingBox",value:function(e,t,n,i,r){void 0!==n&&this.resize(n,i,r),this.left=e-this.width/2,this.top=t-this.height/2,this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width}},{key:"updateBoundingBox",value:function(e,t,n,i,r){this._updateBoundingBox(e,t,n,i,r)}},{key:"getDimensionsFromLabel",value:function(e,t,n){this.textSize=this.labelModule.getTextSize(e,t,n);e=this.textSize.width,t=this.textSize.height;return 0===e&&(t=e=14),{width:e,height:t}}}]),i}();var dv=function(){P(r,a);var i=cv(r);function r(e,t,n){return m(this,r),(e=i.call(this,e,t,n))._setMargins(n),e}return v(r,[{key:"resize",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.selected,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:this.hover;this.needsRefresh(t,n)&&(t=this.getDimensionsFromLabel(e,t,n),this.width=t.width+this.margin.right+this.margin.left,this.height=t.height+this.margin.top+this.margin.bottom,this.radius=this.width/2)}},{key:"draw",value:function(e,t,n,i,r,o){this.resize(e,i,r),this.left=t-this.width/2,this.top=n-this.height/2,this.initContextForDraw(e,o),vi(e,this.left,this.top,this.width,this.height,o.borderRadius),this.performFill(e,o),this.updateBoundingBox(t,n,e,i,r),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,i,r)}},{key:"updateBoundingBox",value:function(e,t,n,i,r){this._updateBoundingBox(e,t,n,i,r);e=this.options.shapeProperties.borderRadius;this._addBoundingBoxMargin(e)}},{key:"distanceToBorder",value:function(e,t){e&&this.resize(e);e=this.options.borderWidth;return Math.min(Math.abs(this.width/2/Math.cos(t)),Math.abs(this.height/2/Math.sin(t)))+e}}]),r}();function hv(n){var i=pv();return function(){var e,t=I(n);return $(this,i?(e=I(this).constructor,j(t,arguments,e)):t.apply(this,arguments))}}function pv(){if("undefined"==typeof Reflect||!j)return!1;if(j.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(j(Boolean,[],function(){})),!0}catch(e){return!1}}function fv(n){var i=gv();return function(){var e,t=I(n);return $(this,i?(e=I(this).constructor,j(t,arguments,e)):t.apply(this,arguments))}}function gv(){if("undefined"==typeof Reflect||!j)return!1;if(j.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(j(Boolean,[],function(){})),!0}catch(e){return!1}}sl=function(){P(r,a);var i=hv(r);function r(e,t,n){return m(this,r),(e=i.call(this,e,t,n)).labelOffset=0,e.selected=!1,e}return v(r,[{key:"setOptions",value:function(e,t,n){this.options=e,void 0===t&&void 0===n||this.setImages(t,n)}},{key:"setImages",value:function(e,t){t&&this.selected?(this.imageObj=t,this.imageObjAlt=e):(this.imageObj=e,this.imageObjAlt=t)}},{key:"switchImages",value:function(e){var t=e&&!this.selected||!e&&this.selected;this.selected=e,void 0!==this.imageObjAlt&&t&&(e=this.imageObj,this.imageObj=this.imageObjAlt,this.imageObjAlt=e)}},{key:"_getImagePadding",value:function(){var e,t={top:0,right:0,bottom:0,left:0};return this.options.imagePadding&&("object"==b(e=this.options.imagePadding)?(t.top=e.top,t.right=e.right,t.bottom=e.bottom,t.left=e.left):(t.top=e,t.right=e,t.bottom=e,t.left=e)),t}},{key:"_resizeImage",value:function(){var e,t;t=!1===this.options.shapeProperties.useImageSize?(t=e=1,this.imageObj.width&&this.imageObj.height&&(this.imageObj.width>this.imageObj.height?e=this.imageObj.width/this.imageObj.height:t=this.imageObj.height/this.imageObj.width),e=2*this.options.size*e,2*this.options.size*t):(t=this._getImagePadding(),e=this.imageObj.width+t.left+t.right,this.imageObj.height+t.top+t.bottom),this.width=e,this.height=t,this.radius=.5*this.width}},{key:"_drawRawCircle",value:function(e,t,n,i){this.initContextForDraw(e,i),hi(e,t,n,i.size),this.performFill(e,i)}},{key:"_drawImageAtPosition",value:function(e,t){var n,i,r,o,a;0!=this.imageObj.width&&(e.globalAlpha=void 0!==t.opacity?t.opacity:1,this.enableShadow(e,t),n=1,!0===this.options.shapeProperties.interpolation&&(n=this.imageObj.width/this.width/this.body.view.scale),a=this._getImagePadding(),i=this.left+a.left,r=this.top+a.top,o=this.width-a.left-a.right,a=this.height-a.top-a.bottom,this.imageObj.drawImageAtPosition(e,n,i,r,o,a),this.disableShadow(e,t))}},{key:"_drawImageLabel",value:function(e,t,n,i,r){var o=0,a=(void 0!==this.height&&(o=.5*this.height,1<=(a=this.labelModule.getTextSize(e,i,r)).lineCount&&(o+=a.height/2)),n+o);this.options.label&&(this.labelOffset=o),this.labelModule.draw(e,t,a,i,r,"hanging")}}]),r}();var yv=function(){P(r,sl);var i=fv(r);function r(e,t,n){return m(this,r),(e=i.call(this,e,t,n))._setMargins(n),e}return v(r,[{key:"resize",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.selected,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:this.hover;this.needsRefresh(t,n)&&(t=this.getDimensionsFromLabel(e,t,n),n=Math.max(t.width+this.margin.right+this.margin.left,t.height+this.margin.top+this.margin.bottom),this.options.size=n/2,this.width=n,this.height=n,this.radius=this.width/2)}},{key:"draw",value:function(e,t,n,i,r,o){this.resize(e,i,r),this.left=t-this.width/2,this.top=n-this.height/2,this._drawRawCircle(e,t,n,o),this.updateBoundingBox(t,n),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,n,i,r)}},{key:"updateBoundingBox",value:function(e,t){this.boundingBox.top=t-this.options.size,this.boundingBox.left=e-this.options.size,this.boundingBox.right=e+this.options.size,this.boundingBox.bottom=t+this.options.size}},{key:"distanceToBorder",value:function(e){return e&&this.resize(e),.5*this.width}}]),r}();function mv(n){var i=vv();return function(){var e,t=I(n);return $(this,i?(e=I(this).constructor,j(t,arguments,e)):t.apply(this,arguments))}}function vv(){if("undefined"==typeof Reflect||!j)return!1;if(j.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(j(Boolean,[],function(){})),!0}catch(e){return!1}}var bv=function(){P(a,sl);var o=mv(a);function a(e,t,n,i,r){return m(this,a),(e=o.call(this,e,t,n)).setImages(i,r),e}return v(a,[{key:"resize",value:function(e){var t,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.selected,i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:this.hover;if(void 0===this.imageObj.src||void 0===this.imageObj.width||void 0===this.imageObj.height)return t=2*this.options.size,this.width=t,this.height=t,void(this.radius=.5*this.width);this.needsRefresh(n,i)&&this._resizeImage()}},{key:"draw",value:function(e,t,n,i,r,o){this.switchImages(i),this.resize();var a=t,s=n;"top-left"===this.options.shapeProperties.coordinateOrigin?(this.left=t,this.top=n,a+=this.width/2,s+=this.height/2):(this.left=t-this.width/2,this.top=n-this.height/2),this._drawRawCircle(e,a,s,o),e.save(),e.clip(),this._drawImageAtPosition(e,o),e.restore(),this._drawImageLabel(e,a,s,i,r),this.updateBoundingBox(t,n)}},{key:"updateBoundingBox",value:function(e,t){"top-left"===this.options.shapeProperties.coordinateOrigin?(this.boundingBox.top=t,this.boundingBox.left=e,this.boundingBox.right=e+2*this.options.size,this.boundingBox.bottom=t+2*this.options.size):(this.boundingBox.top=t-this.options.size,this.boundingBox.left=e-this.options.size,this.boundingBox.right=e+this.options.size,this.boundingBox.bottom=t+this.options.size),this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset)}},{key:"distanceToBorder",value:function(e){return e&&this.resize(e),.5*this.width}}]),a}();function xv(n){var i=wv();return function(){var e,t=I(n);return $(this,i?(e=I(this).constructor,j(t,arguments,e)):t.apply(this,arguments))}}function wv(){if("undefined"==typeof Reflect||!j)return!1;if(j.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(j(Boolean,[],function(){})),!0}catch(e){return!1}}function _v(t,e){var n,i=w(t);return Nl&&(n=Nl(t),e&&(n=hd(n).call(n,function(e){return Hl(t,e).enumerable})),i.push.apply(i,n)),i}function Sv(t){for(var e=1;e<arguments.length;e++){var n,i=null!=arguments[e]?arguments[e]:{};e%2?_(n=_v(Object(i),!0)).call(n,function(e){rc(t,e,i[e])}):Xl?Zl(t,Xl(i)):_(n=_v(Object(i))).call(n,function(e){tc(t,e,Hl(i,e))})}return t}function Ov(n){var i=Ev();return function(){var e,t=I(n);return $(this,i?(e=I(this).constructor,j(t,arguments,e)):t.apply(this,arguments))}}function Ev(){if("undefined"==typeof Reflect||!j)return!1;if(j.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(j(Boolean,[],function(){})),!0}catch(e){return!1}}g=function(){P(r,a);var i=xv(r);function r(e,t,n){return m(this,r),i.call(this,e,t,n)}return v(r,[{key:"resize",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.selected,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:this.hover,i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{size:this.options.size};this.needsRefresh(t,n)&&(this.labelModule.getTextSize(e,t,n),t=2*i.size,this.width=null!=(n=this.customSizeWidth)?n:t,this.height=null!=(i=this.customSizeHeight)?i:t,this.radius=.5*this.width)}},{key:"_drawShape",value:function(t,e,n,i,r,o,a,s){var l=this;return this.resize(t,o,a,s),this.left=i-this.width/2,this.top=r-this.height/2,this.initContextForDraw(t,s),Oi(e)(t,i,r,s.size),this.performFill(t,s),void 0!==this.options.icon&&void 0!==this.options.icon.code&&(t.font=(o?"bold ":"")+this.height/2+"px "+(this.options.icon.face||"FontAwesome"),t.fillStyle=this.options.icon.color||"black",t.textAlign="center",t.textBaseline="middle",t.fillText(this.options.icon.code,i,r)),{drawExternalLabel:function(){var e;void 0!==l.options.label&&(l.labelModule.calculateLabelSize(t,o,a,i,r,"hanging"),e=r+.5*l.height+.5*l.labelModule.size.height,l.labelModule.draw(t,i,e,o,a,"hanging")),l.updateBoundingBox(i,r)}}}},{key:"updateBoundingBox",value:function(e,t){this.boundingBox.top=t-this.options.size,this.boundingBox.left=e-this.options.size,this.boundingBox.right=e+this.options.size,this.boundingBox.bottom=t+this.options.size,void 0!==this.options.label&&0<this.labelModule.size.width&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height))}}]),r}();var kv=function(){P(o,g);var r=Ov(o);function o(e,t,n,i){return m(this,o),(e=r.call(this,e,t,n,i)).ctxRenderer=i,e}return v(o,[{key:"draw",value:function(e,t,n,i,r,o){this.resize(e,i,r,o),this.left=t-this.width/2,this.top=n-this.height/2,e.save();var a,t=this.ctxRenderer({ctx:e,id:this.options.id,x:t,y:n,state:{selected:i,hover:r},style:Sv({},o),label:this.options.label});return null!=t.drawNode&&t.drawNode(),e.restore(),t.drawExternalLabel&&(a=t.drawExternalLabel,t.drawExternalLabel=function(){e.save(),a(),e.restore()}),t.nodeDimensions&&(this.customSizeWidth=t.nodeDimensions.width,this.customSizeHeight=t.nodeDimensions.height),t}},{key:"distanceToBorder",value:function(e,t){return this._distanceToBorder(e,t)}}]),o}();function jv(n){var i=Tv();return function(){var e,t=I(n);return $(this,i?(e=I(this).constructor,j(t,arguments,e)):t.apply(this,arguments))}}function Tv(){if("undefined"==typeof Reflect||!j)return!1;if(j.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(j(Boolean,[],function(){})),!0}catch(e){return!1}}var Cv=function(){P(r,a);var i=jv(r);function r(e,t,n){return m(this,r),(e=i.call(this,e,t,n))._setMargins(n),e}return v(r,[{key:"resize",value:function(e,t,n){this.needsRefresh(t,n)&&(e=this.getDimensionsFromLabel(e,t,n).width+this.margin.right+this.margin.left,this.width=e,this.height=e,this.radius=this.width/2)}},{key:"draw",value:function(e,t,n,i,r,o){this.resize(e,i,r),this.left=t-this.width/2,this.top=n-this.height/2,this.initContextForDraw(e,o),xi(e,t-this.width/2,n-this.height/2,this.width,this.height),this.performFill(e,o),this.updateBoundingBox(t,n,e,i,r),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,i,r)}},{key:"distanceToBorder",value:function(e,t){return this._distanceToBorder(e,t)}}]),r}();function Pv(n){var i=$v();return function(){var e,t=I(n);return $(this,i?(e=I(this).constructor,j(t,arguments,e)):t.apply(this,arguments))}}function $v(){if("undefined"==typeof Reflect||!j)return!1;if(j.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(j(Boolean,[],function(){})),!0}catch(e){return!1}}var Iv=function(){P(r,g);var i=Pv(r);function r(e,t,n){return m(this,r),i.call(this,e,t,n)}return v(r,[{key:"draw",value:function(e,t,n,i,r,o){return this._drawShape(e,"diamond",4,t,n,i,r,o)}},{key:"distanceToBorder",value:function(e,t){return this._distanceToBorder(e,t)}}]),r}();function Rv(n){var i=Mv();return function(){var e,t=I(n);return $(this,i?(e=I(this).constructor,j(t,arguments,e)):t.apply(this,arguments))}}function Mv(){if("undefined"==typeof Reflect||!j)return!1;if(j.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(j(Boolean,[],function(){})),!0}catch(e){return!1}}var Av=function(){P(r,g);var i=Rv(r);function r(e,t,n){return m(this,r),i.call(this,e,t,n)}return v(r,[{key:"draw",value:function(e,t,n,i,r,o){return this._drawShape(e,"circle",2,t,n,i,r,o)}},{key:"distanceToBorder",value:function(e){return e&&this.resize(e),this.options.size}}]),r}();function Fv(n){var i=Dv();return function(){var e,t=I(n);return $(this,i?(e=I(this).constructor,j(t,arguments,e)):t.apply(this,arguments))}}function Dv(){if("undefined"==typeof Reflect||!j)return!1;if(j.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(j(Boolean,[],function(){})),!0}catch(e){return!1}}var Nv=function(){P(r,a);var i=Fv(r);function r(e,t,n){return m(this,r),i.call(this,e,t,n)}return v(r,[{key:"resize",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.selected,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:this.hover;this.needsRefresh(t,n)&&(t=this.getDimensionsFromLabel(e,t,n),this.height=2*t.height,this.width=t.width+t.height,this.radius=.5*this.width)}},{key:"draw",value:function(e,t,n,i,r,o){this.resize(e,i,r),this.left=t-.5*this.width,this.top=n-.5*this.height,this.initContextForDraw(e,o),bi(e,this.left,this.top,this.width,this.height),this.performFill(e,o),this.updateBoundingBox(t,n,e,i,r),this.labelModule.draw(e,t,n,i,r)}},{key:"distanceToBorder",value:function(e,t){e&&this.resize(e);var e=.5*this.width,n=.5*this.height,i=Math.sin(t)*e,t=Math.cos(t)*n;return e*n/Math.sqrt(i*i+t*t)}}]),r}();function Lv(n){var i=Bv();return function(){var e,t=I(n);return $(this,i?(e=I(this).constructor,j(t,arguments,e)):t.apply(this,arguments))}}function Bv(){if("undefined"==typeof Reflect||!j)return!1;if(j.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(j(Boolean,[],function(){})),!0}catch(e){return!1}}var zv=function(){P(r,a);var i=Lv(r);function r(e,t,n){return m(this,r),(e=i.call(this,e,t,n))._setMargins(n),e}return v(r,[{key:"resize",value:function(e,t,n){this.needsRefresh(t,n)&&(this.iconSize={width:Number(this.options.icon.size),height:Number(this.options.icon.size)},this.width=this.iconSize.width+this.margin.right+this.margin.left,this.height=this.iconSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}},{key:"draw",value:function(e,t,n,i,r,o){var a=this;return this.resize(e,i,r),this.options.icon.size=this.options.icon.size||50,this.left=t-this.width/2,this.top=n-this.height/2,this._icon(e,t,n,i,r,o),{drawExternalLabel:function(){void 0!==a.options.label&&a.labelModule.draw(e,a.left+a.iconSize.width/2+a.margin.left,n+a.height/2+5,i),a.updateBoundingBox(t,n)}}}},{key:"updateBoundingBox",value:function(e,t){this.boundingBox.top=t-.5*this.options.icon.size,this.boundingBox.left=e-.5*this.options.icon.size,this.boundingBox.right=e+.5*this.options.icon.size,this.boundingBox.bottom=t+.5*this.options.icon.size,void 0!==this.options.label&&0<this.labelModule.size.width&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height+5))}},{key:"_icon",value:function(e,t,n,i,r,o){var a=Number(this.options.icon.size);void 0!==this.options.icon.code?(e.font=[null!=this.options.icon.weight?this.options.icon.weight:i?"bold":"",(null!=this.options.icon.weight&&i?5:0)+a+"px",this.options.icon.face].join(" "),e.fillStyle=this.options.icon.color||"black",e.textAlign="center",e.textBaseline="middle",this.enableShadow(e,o),e.fillText(this.options.icon.code,t,n),this.disableShadow(e,o)):console.error("When using the icon shape, you need to define the code in the icon options object. This can be done per node or globally.")}},{key:"distanceToBorder",value:function(e,t){return this._distanceToBorder(e,t)}}]),r}();function Hv(n){var i=Wv();return function(){var e,t=I(n);return $(this,i?(e=I(this).constructor,j(t,arguments,e)):t.apply(this,arguments))}}function Wv(){if("undefined"==typeof Reflect||!j)return!1;if(j.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(j(Boolean,[],function(){})),!0}catch(e){return!1}}var Vv=function(){P(a,sl);var o=Hv(a);function a(e,t,n,i,r){return m(this,a),(e=o.call(this,e,t,n)).setImages(i,r),e}return v(a,[{key:"resize",value:function(e){var t,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.selected,i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:this.hover;if(void 0===this.imageObj.src||void 0===this.imageObj.width||void 0===this.imageObj.height)return t=2*this.options.size,this.width=t,void(this.height=t);this.needsRefresh(n,i)&&this._resizeImage()}},{key:"draw",value:function(e,t,n,i,r,o){e.save(),this.switchImages(i),this.resize();var a,s,l=t,c=n;"top-left"===this.options.shapeProperties.coordinateOrigin?(this.left=t,this.top=n,l+=this.width/2,c+=this.height/2):(this.left=t-this.width/2,this.top=n-this.height/2),!0===this.options.shapeProperties.useBorderWithImage&&(a=this.options.borderWidth,s=this.options.borderWidthSelected||2*this.options.borderWidth,s=(i?s:a)/this.body.view.scale,e.lineWidth=Math.min(this.width,s),e.beginPath(),a=(i?this.options.color.highlight:r?this.options.color.hover:this.options.color).border,s=(i?this.options.color.highlight:r?this.options.color.hover:this.options.color).background,void 0!==o.opacity&&(a=Lf(a,o.opacity),s=Lf(s,o.opacity)),e.strokeStyle=a,e.fillStyle=s,e.rect(this.left-.5*e.lineWidth,this.top-.5*e.lineWidth,this.width+e.lineWidth,this.height+e.lineWidth),xh(e).call(e),this.performStroke(e,o),e.closePath()),this._drawImageAtPosition(e,o),this._drawImageLabel(e,l,c,i,r),this.updateBoundingBox(t,n),e.restore()}},{key:"updateBoundingBox",value:function(e,t){this.resize(),"top-left"===this.options.shapeProperties.coordinateOrigin?(this.left=e,this.top=t):(this.left=e-this.width/2,this.top=t-this.height/2),this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width,void 0!==this.options.label&&0<this.labelModule.size.width&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset))}},{key:"distanceToBorder",value:function(e,t){return this._distanceToBorder(e,t)}}]),a}();function Uv(n){var i=qv();return function(){var e,t=I(n);return $(this,i?(e=I(this).constructor,j(t,arguments,e)):t.apply(this,arguments))}}function qv(){if("undefined"==typeof Reflect||!j)return!1;if(j.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(j(Boolean,[],function(){})),!0}catch(e){return!1}}var Gv=function(){P(r,g);var i=Uv(r);function r(e,t,n){return m(this,r),i.call(this,e,t,n)}return v(r,[{key:"draw",value:function(e,t,n,i,r,o){return this._drawShape(e,"square",2,t,n,i,r,o)}},{key:"distanceToBorder",value:function(e,t){return this._distanceToBorder(e,t)}}]),r}();function Kv(n){var i=Yv();return function(){var e,t=I(n);return $(this,i?(e=I(this).constructor,j(t,arguments,e)):t.apply(this,arguments))}}function Yv(){if("undefined"==typeof Reflect||!j)return!1;if(j.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(j(Boolean,[],function(){})),!0}catch(e){return!1}}var Jv=function(){P(r,g);var i=Kv(r);function r(e,t,n){return m(this,r),i.call(this,e,t,n)}return v(r,[{key:"draw",value:function(e,t,n,i,r,o){return this._drawShape(e,"hexagon",4,t,n,i,r,o)}},{key:"distanceToBorder",value:function(e,t){return this._distanceToBorder(e,t)}}]),r}();function Xv(n){var i=Qv();return function(){var e,t=I(n);return $(this,i?(e=I(this).constructor,j(t,arguments,e)):t.apply(this,arguments))}}function Qv(){if("undefined"==typeof Reflect||!j)return!1;if(j.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(j(Boolean,[],function(){})),!0}catch(e){return!1}}var Zv=function(){P(r,g);var i=Xv(r);function r(e,t,n){return m(this,r),i.call(this,e,t,n)}return v(r,[{key:"draw",value:function(e,t,n,i,r,o){return this._drawShape(e,"star",4,t,n,i,r,o)}},{key:"distanceToBorder",value:function(e,t){return this._distanceToBorder(e,t)}}]),r}();function eb(n){var i=tb();return function(){var e,t=I(n);return $(this,i?(e=I(this).constructor,j(t,arguments,e)):t.apply(this,arguments))}}function tb(){if("undefined"==typeof Reflect||!j)return!1;if(j.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(j(Boolean,[],function(){})),!0}catch(e){return!1}}var nb=function(){P(r,a);var i=eb(r);function r(e,t,n){return m(this,r),(e=i.call(this,e,t,n))._setMargins(n),e}return v(r,[{key:"resize",value:function(e,t,n){this.needsRefresh(t,n)&&(this.textSize=this.labelModule.getTextSize(e,t,n),this.width=this.textSize.width+this.margin.right+this.margin.left,this.height=this.textSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}},{key:"draw",value:function(e,t,n,i,r,o){this.resize(e,i,r),this.left=t-this.width/2,this.top=n-this.height/2,this.enableShadow(e,o),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,i,r),this.disableShadow(e,o),this.updateBoundingBox(t,n,e,i,r)}},{key:"distanceToBorder",value:function(e,t){return this._distanceToBorder(e,t)}}]),r}();function ib(n){var i=rb();return function(){var e,t=I(n);return $(this,i?(e=I(this).constructor,j(t,arguments,e)):t.apply(this,arguments))}}function rb(){if("undefined"==typeof Reflect||!j)return!1;if(j.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(j(Boolean,[],function(){})),!0}catch(e){return!1}}var ob=function(){P(r,g);var i=ib(r);function r(e,t,n){return m(this,r),i.call(this,e,t,n)}return v(r,[{key:"draw",value:function(e,t,n,i,r,o){return this._drawShape(e,"triangle",3,t,n,i,r,o)}},{key:"distanceToBorder",value:function(e,t){return this._distanceToBorder(e,t)}}]),r}();function ab(n){var i=sb();return function(){var e,t=I(n);return $(this,i?(e=I(this).constructor,j(t,arguments,e)):t.apply(this,arguments))}}function sb(){if("undefined"==typeof Reflect||!j)return!1;if(j.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(j(Boolean,[],function(){})),!0}catch(e){return!1}}var lb=function(){P(r,g);var i=ab(r);function r(e,t,n){return m(this,r),i.call(this,e,t,n)}return v(r,[{key:"draw",value:function(e,t,n,i,r,o){return this._drawShape(e,"triangleDown",3,t,n,i,r,o)}},{key:"distanceToBorder",value:function(e,t){return this._distanceToBorder(e,t)}}]),r}();function cb(t,e){var n,i=w(t);return Nl&&(n=Nl(t),e&&(n=hd(n).call(n,function(e){return Hl(t,e).enumerable})),i.push.apply(i,n)),i}function ub(t){for(var e=1;e<arguments.length;e++){var n,i=null!=arguments[e]?arguments[e]:{};e%2?_(n=cb(Object(i),!0)).call(n,function(e){rc(t,e,i[e])}):Xl?Zl(t,Xl(i)):_(n=cb(Object(i))).call(n,function(e){tc(t,e,Hl(i,e))})}return t}var db=function(){function a(e,t,n,i,r,o){m(this,a),this.options=Yf(r),this.globalOptions=r,this.defaultOptions=o,this.body=t,this.edges=[],this.id=void 0,this.imagelist=n,this.grouplist=i,this.x=void 0,this.y=void 0,this.baseSize=this.options.size,this.baseFontSize=this.options.font.size,this.predefinedPosition=!1,this.selected=!1,this.hover=!1,this.labelModule=new Hm(this.body,this.options,!1),this.setOptions(e)}return v(a,[{key:"attachEdge",value:function(e){var t;-1===T(t=this.edges).call(t,e)&&this.edges.push(e)}},{key:"detachEdge",value:function(e){var t=T(t=this.edges).call(t,e);-1!=t&&Lu(e=this.edges).call(e,t,1)}},{key:"setOptions",value:function(e){var t=this.options.shape;if(e){if(void 0!==e.color&&(this._localColor=e.color),void 0!==e.id&&(this.id=e.id),void 0===this.id)throw new Error("Node must have an id");a.checkMass(e,this.id),void 0!==e.x&&(null===e.x?(this.x=void 0,this.predefinedPosition=!1):(this.x=$d(e.x),this.predefinedPosition=!0)),void 0!==e.y&&(null===e.y?(this.y=void 0,this.predefinedPosition=!1):(this.y=$d(e.y),this.predefinedPosition=!0)),void 0!==e.size&&(this.baseSize=e.size),void 0!==e.value&&(e.value=Sm(e.value)),a.parseOptions(this.options,e,!0,this.globalOptions,this.grouplist);var n=[e,this.options,this.defaultOptions];return this.chooser=km("node",n),this._load_images(),this.updateLabelModule(e),void 0!==e.opacity&&a.checkOpacity(e.opacity)&&(this.options.opacity=e.opacity),this.updateShape(t),void 0!==e.hidden||void 0!==e.physics}}},{key:"_load_images",value:function(){if(("circularImage"===this.options.shape||"image"===this.options.shape)&&void 0===this.options.image)throw new Error("Option image must be defined for node type '"+this.options.shape+"'");if(void 0!==this.options.image){if(void 0===this.imagelist)throw new Error("Internal Error: No images provided");if("string"==typeof this.options.image)this.imageObj=this.imagelist.load(this.options.image,this.options.brokenImage,this.id);else{if(void 0===this.options.image.unselected)throw new Error("No unselected image provided");this.imageObj=this.imagelist.load(this.options.image.unselected,this.options.brokenImage,this.id),void 0!==this.options.image.selected?this.imageObjAlt=this.imagelist.load(this.options.image.selected,this.options.brokenImage,this.id):this.imageObjAlt=void 0}}}},{key:"getFormattingValues",value:function(){var e,t={color:this.options.color.background,opacity:this.options.opacity,borderWidth:this.options.borderWidth,borderColor:this.options.color.border,size:this.options.size,borderDashes:this.options.shapeProperties.borderDashes,borderRadius:this.options.shapeProperties.borderRadius,shadow:this.options.shadow.enabled,shadowColor:this.options.shadow.color,shadowSize:this.options.shadow.size,shadowX:this.options.shadow.x,shadowY:this.options.shadow.y};return this.selected||this.hover?!0===this.chooser?this.selected?(null!=this.options.borderWidthSelected?t.borderWidth=this.options.borderWidthSelected:t.borderWidth*=2,t.color=this.options.color.highlight.background,t.borderColor=this.options.color.highlight.border,t.shadow=this.options.shadow.enabled):this.hover&&(t.color=this.options.color.hover.background,t.borderColor=this.options.color.hover.border,t.shadow=this.options.shadow.enabled):"function"==typeof this.chooser&&(this.chooser(t,this.options.id,this.selected,this.hover),!1!==t.shadow||t.shadowColor===this.options.shadow.color&&t.shadowSize===this.options.shadow.size&&t.shadowX===this.options.shadow.x&&t.shadowY===this.options.shadow.y||(t.shadow=!0)):t.shadow=this.options.shadow.enabled,void 0!==this.options.opacity&&(e=this.options.opacity,t.borderColor=Lf(t.borderColor,e),t.color=Lf(t.color,e),t.shadowColor=Lf(t.shadowColor,e)),t}},{key:"updateLabelModule",value:function(e){void 0!==this.options.label&&null!==this.options.label||(this.options.label=""),a.updateGroupOptions(this.options,ub(ub({},e),{},{color:e&&e.color||this._localColor||void 0}),this.grouplist);var t=this.grouplist.get(this.options.group,!1),e=[e,this.options,t,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,e),void 0!==this.labelModule.baseSize&&(this.baseFontSize=this.labelModule.baseSize)}},{key:"updateShape",value:function(e){if(e===this.options.shape&&this.shape)this.shape.setOptions(this.options,this.imageObj,this.imageObjAlt);else switch(this.options.shape){case"box":this.shape=new dv(this.options,this.body,this.labelModule);break;case"circle":this.shape=new yv(this.options,this.body,this.labelModule);break;case"circularImage":this.shape=new bv(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"custom":this.shape=new kv(this.options,this.body,this.labelModule,this.options.ctxRenderer);break;case"database":this.shape=new Cv(this.options,this.body,this.labelModule);break;case"diamond":this.shape=new Iv(this.options,this.body,this.labelModule);break;case"dot":this.shape=new Av(this.options,this.body,this.labelModule);break;case"ellipse":this.shape=new Nv(this.options,this.body,this.labelModule);break;case"icon":this.shape=new zv(this.options,this.body,this.labelModule);break;case"image":this.shape=new Vv(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"square":this.shape=new Gv(this.options,this.body,this.labelModule);break;case"hexagon":this.shape=new Jv(this.options,this.body,this.labelModule);break;case"star":this.shape=new Zv(this.options,this.body,this.labelModule);break;case"text":this.shape=new nb(this.options,this.body,this.labelModule);break;case"triangle":this.shape=new ob(this.options,this.body,this.labelModule);break;case"triangleDown":this.shape=new lb(this.options,this.body,this.labelModule);break;default:this.shape=new Nv(this.options,this.body,this.labelModule)}this.needsRefresh()}},{key:"select",value:function(){this.selected=!0,this.needsRefresh()}},{key:"unselect",value:function(){this.selected=!1,this.needsRefresh()}},{key:"needsRefresh",value:function(){this.shape.refreshNeeded=!0}},{key:"getTitle",value:function(){return this.options.title}},{key:"distanceToBorder",value:function(e,t){return this.shape.distanceToBorder(e,t)}},{key:"isFixed",value:function(){return this.options.fixed.x&&this.options.fixed.y}},{key:"isSelected",value:function(){return this.selected}},{key:"getValue",value:function(){return this.options.value}},{key:"getLabelSize",value:function(){return this.labelModule.size()}},{key:"setValueRange",value:function(e,t,n){void 0!==this.options.value?(e=this.options.scaling.customScalingFunction(e,t,n,this.options.value),t=this.options.scaling.max-this.options.scaling.min,!0===this.options.scaling.label.enabled&&(n=this.options.scaling.label.max-this.options.scaling.label.min,this.options.font.size=this.options.scaling.label.min+e*n),this.options.size=this.options.scaling.min+e*t):(this.options.size=this.baseSize,this.options.font.size=this.baseFontSize),this.updateLabelModule()}},{key:"draw",value:function(e){var t=this.getFormattingValues();return this.shape.draw(e,this.x,this.y,this.selected,this.hover,t)||{}}},{key:"updateBoundingBox",value:function(e){this.shape.updateBoundingBox(this.x,this.y,e)}},{key:"resize",value:function(e){var t=this.getFormattingValues();this.shape.resize(e,this.selected,this.hover,t)}},{key:"getItemsOnPoint",value:function(e){var t=[];return this.labelModule.visible()&&jm(this.labelModule.getSize(),e)&&t.push({nodeId:this.id,labelId:0}),jm(this.shape.boundingBox,e)&&t.push({nodeId:this.id}),t}},{key:"isOverlappingWith",value:function(e){return this.shape.left<e.right&&this.shape.left+this.shape.width>e.left&&this.shape.top<e.bottom&&this.shape.top+this.shape.height>e.top}},{key:"isBoundingBoxOverlappingWith",value:function(e){return this.shape.boundingBox.left<e.right&&this.shape.boundingBox.right>e.left&&this.shape.boundingBox.top<e.bottom&&this.shape.boundingBox.bottom>e.top}}],[{key:"checkOpacity",value:function(e){return 0<=e&&e<=1}},{key:"checkCoordinateOrigin",value:function(e){return void 0===e||"center"===e||"top-left"===e}},{key:"updateGroupOptions",value:function(e,t,n){if(void 0!==n){var i=e.group;if(void 0!==t&&void 0!==t.group&&i!==t.group)throw new Error("updateGroupOptions: group values in options don't match.");("number"==typeof i||"string"==typeof i&&""!=i)&&(void 0===(n=n.get(i)).opacity||void 0!==t.opacity||a.checkOpacity(n.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+n.opacity),n.opacity=void 0),(i=hd(i=Em(t)).call(i,function(e){return null!=t[e]})).push("font"),$f(i,e,n),e.color=zf(e.color))}}},{key:"parseOptions",value:function(e,t){var n,i=2<arguments.length&&void 0!==arguments[2]&&arguments[2],r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{},o=4<arguments.length?arguments[4]:void 0;$f(["color","fixed","shadow"],e,t,i),a.checkMass(t),void 0===e.opacity||a.checkOpacity(e.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+e.opacity),e.opacity=void 0),void 0===t.opacity||a.checkOpacity(t.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+t.opacity),t.opacity=void 0),t.shapeProperties&&!a.checkCoordinateOrigin(t.shapeProperties.coordinateOrigin)&&console.error("Invalid option for node coordinateOrigin, found: "+t.shapeProperties.coordinateOrigin),Jf(e,t,"shadow",r),void 0!==t.color&&null!==t.color?(n=zf(t.color),Cf(e.color,n)):!0===i&&null===t.color&&(e.color=Yf(r.color)),void 0!==t.fixed&&null!==t.fixed&&("boolean"==typeof t.fixed?(e.fixed.x=t.fixed,e.fixed.y=t.fixed):(void 0!==t.fixed.x&&"boolean"==typeof t.fixed.x&&(e.fixed.x=t.fixed.x),void 0!==t.fixed.y&&"boolean"==typeof t.fixed.y&&(e.fixed.y=t.fixed.y))),!0===i&&null===t.font&&(e.font=Yf(r.font)),a.updateGroupOptions(e,t,o),void 0!==t.scaling&&Jf(e.scaling,t.scaling,"label",r.scaling)}},{key:"checkMass",value:function(e,t){void 0!==e.mass&&e.mass<=0&&(console.error("%cNegative or zero mass disallowed"+(void 0!==t?" in node id: "+t:"")+", setting mass to 1.",cg),e.mass=1)}}]),a}();function hb(e,t){var n,i=void 0!==Jc&&os(e)||e["@@iterator"];if(!i){if(x(e)||(i=pb(e))||t&&e&&"number"==typeof e.length)return i&&(e=i),n=0,{s:t=function(){},n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,a=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return o=e.done,e},e:function(e){a=!0,r=e},f:function(){try{o||null==i.return||i.return()}finally{if(a)throw r}}}}function pb(e,t){if(e){if("string"==typeof e)return fb(e,t);var n=tu(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Ma(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?fb(e,t):void 0}}function fb(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var gb=function(){function o(e,t,n,i){var r=this;if(m(this,o),this.body=e,this.images=t,this.groups=n,this.layoutEngine=i,this.body.functions.createNode=h(e=this.create).call(e,this),this.nodesListeners={add:function(e,t){r.add(t.items)},update:function(e,t){r.update(t.items,t.data,t.oldData)},remove:function(e,t){r.remove(t.items)}},this.defaultOptions={borderWidth:1,borderWidthSelected:void 0,brokenImage:void 0,color:{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#2B7CE9",background:"#D2E5FF"},hover:{border:"#2B7CE9",background:"#D2E5FF"}},opacity:void 0,fixed:{x:!1,y:!1},font:{color:"#343434",size:14,face:"arial",background:"none",strokeWidth:0,strokeColor:"#ffffff",align:"center",vadjust:0,multi:!1,bold:{mod:"bold"},boldital:{mod:"bold italic"},ital:{mod:"italic"},mono:{mod:"",size:15,face:"monospace",vadjust:2}},group:void 0,hidden:!1,icon:{face:"FontAwesome",code:void 0,size:50,color:"#2B7CE9"},image:void 0,imagePadding:{top:0,right:0,bottom:0,left:0},label:void 0,labelHighlightBold:!0,level:void 0,margin:{top:5,right:5,bottom:5,left:5},mass:1,physics:!0,scaling:{min:10,max:30,label:{enabled:!1,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(e,t,n,i){return t===e?.5:Math.max(0,(i-e)*(1/(t-e)))}},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:10,x:5,y:5},shape:"ellipse",shapeProperties:{borderDashes:!1,borderRadius:6,interpolation:!0,useImageSize:!1,useBorderWithImage:!1,coordinateOrigin:"center"},size:25,title:void 0,value:void 0,x:void 0,y:void 0},this.defaultOptions.mass<=0)throw"Internal error: mass in defaultOptions of NodesHandler may not be zero or negative";this.options=Yf(this.defaultOptions),this.bindEventListeners()}return v(o,[{key:"bindEventListeners",value:function(){var e,n=this;this.body.emitter.on("refreshNodes",h(e=this.refresh).call(e,this)),this.body.emitter.on("refresh",h(e=this.refresh).call(e,this)),this.body.emitter.on("destroy",function(){C(n.nodesListeners,function(e,t){n.body.data.nodes&&n.body.data.nodes.off(t,e)}),delete n.body.functions.createNode,delete n.nodesListeners.add,delete n.nodesListeners.update,delete n.nodesListeners.remove,delete n.nodesListeners})}},{key:"setOptions",value:function(e){if(void 0!==e){if(db.parseOptions(this.options,e),void 0!==e.opacity&&(um(e.opacity)||!hm(e.opacity)||e.opacity<0||1<e.opacity?console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+e.opacity):this.options.opacity=e.opacity),void 0!==e.shape)for(var t in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&this.body.nodes[t].updateShape();if(void 0!==e.font||void 0!==e.widthConstraint||void 0!==e.heightConstraint)for(var n=0,i=w(this.body.nodes);n<i.length;n++){var r=i[n];this.body.nodes[r].updateLabelModule(),this.body.nodes[r].needsRefresh()}if(void 0!==e.size)for(var o in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,o)&&this.body.nodes[o].needsRefresh();void 0===e.hidden&&void 0===e.physics||this.body.emitter.emit("_dataChanged")}}},{key:"setData",value:function(e){var n,t,i=1<arguments.length&&void 0!==arguments[1]&&arguments[1],r=this.body.data.nodes;if(q.isDataViewLike("id",e))this.body.data.nodes=e;else if(x(e))this.body.data.nodes=new q.DataSet,this.body.data.nodes.add(e);else{if(e)throw new TypeError("Array or DataSet expected");this.body.data.nodes=new q.DataSet}r&&C(this.nodesListeners,function(e,t){r.off(t,e)}),this.body.nodes={},this.body.data.nodes&&(C((n=this).nodesListeners,function(e,t){n.body.data.nodes.on(t,e)}),t=this.body.data.nodes.getIds(),this.add(t,!0)),!1===i&&this.body.emitter.emit("_dataChanged")}},{key:"add",value:function(e){for(var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1],n=[],i=0;i<e.length;i++){var r=e[i],o=this.body.data.nodes.get(r),o=this.create(o);n.push(o),this.body.nodes[r]=o}this.layoutEngine.positionInitially(n),!1===t&&this.body.emitter.emit("_dataChanged")}},{key:"update",value:function(e,t,n){for(var i=this.body.nodes,r=!1,o=0;o<e.length;o++){var a=e[o],s=i[a],l=t[o];void 0!==s?s.setOptions(l)&&(r=!0):(r=!0,s=this.create(l),i[a]=s)}!0===(r=r||void 0===n?r:mm(t).call(t,function(e,t){t=n[t];return t&&t.level!==e.level}))?this.body.emitter.emit("_dataChanged"):this.body.emitter.emit("_dataUpdated")}},{key:"remove",value:function(e){for(var t=this.body.nodes,n=0;n<e.length;n++)delete t[e[n]];this.body.emitter.emit("_dataChanged")}},{key:"create",value:function(e){return new(1<arguments.length&&void 0!==arguments[1]?arguments[1]:db)(e,this.body,this.images,this.groups,this.options,this.defaultOptions)}},{key:"refresh",value:function(){var n=this,i=0<arguments.length&&void 0!==arguments[0]&&arguments[0];C(this.body.nodes,function(e,t){t=n.body.data.nodes.get(t);void 0!==t&&(!0===i&&e.setOptions({x:null,y:null}),e.setOptions({fixed:!1}),e.setOptions(t))})}},{key:"getPositions",value:function(e){var t,n,i={};if(void 0!==e)if(!0===x(e))for(var r=0;r<e.length;r++)void 0!==this.body.nodes[e[r]]&&(t=this.body.nodes[e[r]],i[e[r]]={x:Math.round(t.x),y:Math.round(t.y)});else void 0!==this.body.nodes[e]&&(n=this.body.nodes[e],i[e]={x:Math.round(n.x),y:Math.round(n.y)});else for(var o=0;o<this.body.nodeIndices.length;o++){var a=this.body.nodes[this.body.nodeIndices[o]];i[this.body.nodeIndices[o]]={x:Math.round(a.x),y:Math.round(a.y)}}return i}},{key:"getPosition",value:function(e){if(null==e)throw new TypeError("No id was specified for getPosition method.");if(null==this.body.nodes[e])throw new ReferenceError("NodeId provided for getPosition does not exist. Provided: ".concat(e));return{x:Math.round(this.body.nodes[e].x),y:Math.round(this.body.nodes[e].y)}}},{key:"storePositions",value:function(){var e,t=[],n=this.body.data.nodes.getDataSet(),i=hb(n.get());try{for(i.s();!(e=i.n()).done;){var r=e.value,o=r.id,a=this.body.nodes[o],s=Math.round(a.x),l=Math.round(a.y);r.x===s&&r.y===l||t.push({id:o,x:s,y:l})}}catch(e){i.e(e)}finally{i.f()}n.update(t)}},{key:"getBoundingBox",value:function(e){if(void 0!==this.body.nodes[e])return this.body.nodes[e].shape.boundingBox}},{key:"getConnectedNodes",value:function(e,t){var n=[];if(void 0!==this.body.nodes[e])for(var i=this.body.nodes[e],r={},o=0;o<i.edges.length;o++){var a=i.edges[o];"to"!==t&&a.toId==i.id?void 0===r[a.fromId]&&(n.push(a.fromId),r[a.fromId]=!0):"from"!==t&&a.fromId==i.id&&void 0===r[a.toId]&&(n.push(a.toId),r[a.toId]=!0)}return n}},{key:"getConnectedEdges",value:function(e){var t=[];if(void 0!==this.body.nodes[e])for(var n=this.body.nodes[e],i=0;i<n.edges.length;i++)t.push(n.edges[i].id);else console.error("NodeId provided for getConnectedEdges does not exist. Provided: ",e);return t}},{key:"moveNode",value:function(e,t,n){var i=this;void 0!==this.body.nodes[e]?(this.body.nodes[e].x=Number(t),this.body.nodes[e].y=Number(n),ph(function(){i.body.emitter.emit("startSimulation")},0)):console.error("Node id supplied to moveNode does not exist. Provided: ",e)}}]),o}(),yb=u,mb=te,vb=H,bb=Ye,xb=function(e){return void 0!==e&&(yb(e,"value")||yb(e,"writable"))},wb=X,_b=l;function Sb(e,t){var n,i=arguments.length<3?e:arguments[2];return bb(e)===i?e[t]:(n=wb.f(e,t))?xb(n)?n.value:void 0===n.get?void 0:mb(n.get,i):vb(n=_b(e))?Sb(n,t,i):void 0}c({target:"Reflect",stat:!0},{get:Sb});var Ob=r.Reflect.get,Eb=y;function kb(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=I(e)););return e}function jb(){return(jb="undefined"!=typeof Reflect&&Ob?Ob:function(e,t,n){var i=kb(e,t);if(i)return i=Eb(i,t),i.get?i.get.call(arguments.length<3?e:n):i.value}).apply(this,arguments)}var d=c,Bs=Math.hypot,Tb=Math.abs,Cb=Math.sqrt,Pb=(d({target:"Math",stat:!0,forced:!!Bs&&Bs(1/0,NaN)!==1/0},{hypot:function(e,t){for(var n,i,r=0,o=0,a=arguments.length,s=0;o<a;)s<(n=Tb(arguments[o++]))?(r=r*(i=s/n)*i+1,s=n):r+=0<n?(i=n/s)*i:n;return s===1/0?1/0:s*Cb(r)}}),r.Math.hypot);function $b(n){var i=Ib();return function(){var e,t=I(n);return $(this,i?(e=I(this).constructor,j(t,arguments,e)):t.apply(this,arguments))}}function Ib(){if("undefined"==typeof Reflect||!j)return!1;if(j.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(j(Boolean,[],function(){})),!0}catch(e){return!1}}var Rb=function(){function e(){m(this,e)}return v(e,null,[{key:"transform",value:function(e,t){x(e)||(e=[e]);for(var n=t.point.x,i=t.point.y,r=t.angle,o=t.length,a=0;a<e.length;++a){var s=e[a],l=s.x*Math.cos(r)-s.y*Math.sin(r),c=s.x*Math.sin(r)+s.y*Math.cos(r);s.x=n+o*l,s.y=i+o*c}}},{key:"drawPath",value:function(e,t){e.beginPath(),e.moveTo(t[0].x,t[0].y);for(var n=1;n<t.length;++n)e.lineTo(t[n].x,t[n].y);e.closePath()}}]),e}(),Mb=function(){P(t,Rb);var e=$b(t);function t(){return m(this,t),e.apply(this,arguments)}return v(t,null,[{key:"draw",value:function(e,t){var n,i;return t.image&&(e.save(),e.translate(t.point.x,t.point.y),e.rotate(Math.PI/2+t.angle),n=null!=t.imageWidth?t.imageWidth:t.image.width,i=null!=t.imageHeight?t.imageHeight:t.image.height,t.image.drawImageAtPosition(e,1,-n/2,0,n,i),e.restore()),!1}}]),t}(),Ab=function(){P(t,Rb);var e=$b(t);function t(){return m(this,t),e.apply(this,arguments)}return v(t,null,[{key:"draw",value:function(e,t){var n=[{x:0,y:0},{x:-1,y:.3},{x:-.9,y:0},{x:-1,y:-.3}];return Rb.transform(n,t),Rb.drawPath(e,n),!0}}]),t}(),Fb=function(){function e(){m(this,e)}return v(e,null,[{key:"draw",value:function(e,t){var n=[{x:-1,y:0},{x:0,y:.3},{x:-.4,y:0},{x:0,y:-.3}];return Rb.transform(n,t),Rb.drawPath(e,n),!0}}]),e}(),Db=function(){function e(){m(this,e)}return v(e,null,[{key:"draw",value:function(e,t){var n={x:-.4,y:0},i=(Rb.transform(n,t),e.strokeStyle=e.fillStyle,e.fillStyle="rgba(0, 0, 0, 0)",Math.PI),r=t.angle-i/2,i=t.angle+i/2;return e.beginPath(),e.arc(n.x,n.y,.4*t.length,r,i,!1),e.stroke(),!0}}]),e}(),Nb=function(){function e(){m(this,e)}return v(e,null,[{key:"draw",value:function(e,t){var n={x:-.3,y:0},i=(Rb.transform(n,t),e.strokeStyle=e.fillStyle,e.fillStyle="rgba(0, 0, 0, 0)",Math.PI),r=t.angle+i/2,i=t.angle+3*i/2;return e.beginPath(),e.arc(n.x,n.y,.4*t.length,r,i,!1),e.stroke(),!0}}]),e}(),Lb=function(){function e(){m(this,e)}return v(e,null,[{key:"draw",value:function(e,t){var n=[{x:.02,y:0},{x:-1,y:.3},{x:-1,y:-.3}];return Rb.transform(n,t),Rb.drawPath(e,n),!0}}]),e}(),Bb=function(){function e(){m(this,e)}return v(e,null,[{key:"draw",value:function(e,t){var n=[{x:0,y:.3},{x:0,y:-.3},{x:-1,y:0}];return Rb.transform(n,t),Rb.drawPath(e,n),!0}}]),e}(),zb=function(){function e(){m(this,e)}return v(e,null,[{key:"draw",value:function(e,t){var n={x:-.4,y:0};return Rb.transform(n,t),hi(e,n.x,n.y,.4*t.length),!0}}]),e}(),Hb=function(){function e(){m(this,e)}return v(e,null,[{key:"draw",value:function(e,t){var n=[{x:0,y:.5},{x:0,y:-.5},{x:-.15,y:-.5},{x:-.15,y:.5}];return Rb.transform(n,t),Rb.drawPath(e,n),!0}}]),e}(),Wb=function(){function e(){m(this,e)}return v(e,null,[{key:"draw",value:function(e,t){var n=[{x:0,y:.3},{x:0,y:-.3},{x:-.6,y:-.3},{x:-.6,y:.3}];return Rb.transform(n,t),Rb.drawPath(e,n),!0}}]),e}(),Vb=function(){function e(){m(this,e)}return v(e,null,[{key:"draw",value:function(e,t){var n=[{x:0,y:0},{x:-.5,y:-.3},{x:-1,y:0},{x:-.5,y:.3}];return Rb.transform(n,t),Rb.drawPath(e,n),!0}}]),e}(),Ub=function(){function e(){m(this,e)}return v(e,null,[{key:"draw",value:function(e,t){var n=[{x:-1,y:.3},{x:-.5,y:0},{x:-1,y:-.3},{x:0,y:0}];return Rb.transform(n,t),Rb.drawPath(e,n),!0}}]),e}(),qb=function(){function e(){m(this,e)}return v(e,null,[{key:"draw",value:function(e,t){var n;switch(n=t.type?t.type.toLowerCase():n){case"image":return Mb.draw(e,t);case"circle":return zb.draw(e,t);case"box":return Wb.draw(e,t);case"crow":return Fb.draw(e,t);case"curve":return Db.draw(e,t);case"diamond":return Vb.draw(e,t);case"inv_curve":return Nb.draw(e,t);case"triangle":return Lb.draw(e,t);case"inv_triangle":return Bb.draw(e,t);case"bar":return Hb.draw(e,t);case"vee":return Ub.draw(e,t);default:return Ab.draw(e,t)}}}]),e}();function Gb(t,e){var n,i=w(t);return Nl&&(n=Nl(t),e&&(n=hd(n).call(n,function(e){return Hl(t,e).enumerable})),i.push.apply(i,n)),i}function Kb(t){for(var e=1;e<arguments.length;e++){var n,i=null!=arguments[e]?arguments[e]:{};e%2?_(n=Gb(Object(i),!0)).call(n,function(e){rc(t,e,i[e])}):Xl?Zl(t,Xl(i)):_(n=Gb(Object(i))).call(n,function(e){tc(t,e,Hl(i,e))})}return t}function Yb(t,e){var n,i=w(t);return Nl&&(n=Nl(t),e&&(n=hd(n).call(n,function(e){return Hl(t,e).enumerable})),i.push.apply(i,n)),i}function Jb(t){for(var e=1;e<arguments.length;e++){var n,i=null!=arguments[e]?arguments[e]:{};e%2?_(n=Yb(Object(i),!0)).call(n,function(e){rc(t,e,i[e])}):Xl?Zl(t,Xl(i)):_(n=Yb(Object(i))).call(n,function(e){tc(t,e,Hl(i,e))})}return t}function Xb(n){var i=Qb();return function(){var e,t=I(n);return $(this,i?(e=I(this).constructor,j(t,arguments,e)):t.apply(this,arguments))}}function Qb(){if("undefined"==typeof Reflect||!j)return!1;if(j.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(j(Boolean,[],function(){})),!0}catch(e){return!1}}function Zb(n){var i=e0();return function(){var e,t=I(n);return $(this,i?(e=I(this).constructor,j(t,arguments,e)):t.apply(this,arguments))}}function e0(){if("undefined"==typeof Reflect||!j)return!1;if(j.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(j(Boolean,[],function(){})),!0}catch(e){return!1}}Xx=function(){function i(e,t,n){m(this,i),this._body=t,this._labelModule=n,this.color={},this.colorDirty=!0,this.hoverWidth=1.5,this.selectionWidth=2,this.setOptions(e),this.fromPoint=this.from,this.toPoint=this.to}return v(i,[{key:"connect",value:function(){this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to]}},{key:"cleanup",value:function(){return!1}},{key:"setOptions",value:function(e){this.options=e,this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.id=this.options.id}},{key:"drawLine",value:function(e,t,n,i){var r=4<arguments.length&&void 0!==arguments[4]?arguments[4]:this.getViaNode();e.strokeStyle=this.getColor(e,t),e.lineWidth=t.width,!1!==t.dashes?this._drawDashedLine(e,t,r):this._drawLine(e,t,r)}},{key:"_drawLine",value:function(e,t,n,i,r){this.from!=this.to?this._line(e,t,n,i,r):(i=(n=L(this._getCircleData(e),3))[0],r=n[1],n=n[2],this._circle(e,t,i,r,n))}},{key:"_drawDashedLine",value:function(e,t,n,i,r){e.lineCap="round";var o,a,s=x(t.dashes)?t.dashes:[5,5];void 0!==e.setLineDash?(e.save(),e.setLineDash(s),e.lineDashOffset=0,this.from!=this.to?this._line(e,t,n):(o=(n=L(this._getCircleData(e),3))[0],a=n[1],n=n[2],this._circle(e,t,o,a,n)),e.setLineDash([0]),e.lineDashOffset=0,e.restore()):(this.from!=this.to?wi(e,this.from.x,this.from.y,this.to.x,this.to.y,s):(a=(o=L(this._getCircleData(e),3))[0],n=o[1],s=o[2],this._circle(e,t,a,n,s)),this.enableShadow(e,t),e.stroke(),this.disableShadow(e,t))}},{key:"findBorderPosition",value:function(e,t,n){return this.from!=this.to?this._findBorderPosition(e,t,n):this._findBorderPositionCircle(e,t,n)}},{key:"findBorderPositions",value:function(e){var t,n;return this.from!=this.to?{from:this._findBorderPosition(this.from,e),to:this._findBorderPosition(this.to,e)}:(t=(n=L(tu(n=this._getCircleData(e)).call(n,0,2),2))[0],n=n[1],{from:this._findBorderPositionCircle(this.from,e,{x:t,y:n,low:.25,high:.6,direction:-1}),to:this._findBorderPositionCircle(this.from,e,{x:t,y:n,low:.6,high:.8,direction:1})})}},{key:"_getCircleData",value:function(e){var t=this.options.selfReference.size,e=(void 0!==e&&void 0===this.from.shape.width&&this.from.shape.resize(e),Cm(e,this.options.selfReference.angle,t,this.from));return[e.x,e.y,t]}},{key:"_pointOnCircle",value:function(e,t,n,i){i=2*i*Math.PI;return{x:e+n*Math.cos(i),y:t-n*Math.sin(i)}}},{key:"_findBorderPositionCircle",value:function(e,t,n){var i=n.x,r=n.y,o=n.low,a=n.high,s=n.direction,l=this.options.selfReference.size,c=.5*(o+a),u=0,d=(!0===this.options.arrowStrikethrough&&(-1===s?u=this.options.endPointOffset.from:1===s&&(u=this.options.endPointOffset.to)),0);do{var c=.5*(o+a),h=this._pointOnCircle(i,r,l,c),p=Math.atan2(e.y-h.y,e.x-h.x),p=e.distanceToBorder(t,p)+u-Math.sqrt(Math.pow(h.x-e.x,2)+Math.pow(h.y-e.y,2))}while(!(Math.abs(p)<.05)&&(0<p?0<s?o=c:a=c:0<s?a=c:o=c,++d,o<=a&&d<10));return Kb(Kb({},h),{},{t:c})}},{key:"getLineWidth",value:function(e,t){return!0===e?Math.max(this.selectionWidth,.3/this._body.view.scale):!0===t?Math.max(this.hoverWidth,.3/this._body.view.scale):Math.max(this.options.width,.3/this._body.view.scale)}},{key:"getColor",value:function(e,t){var n,i;return!1!==t.inheritsColor?"both"===t.inheritsColor&&this.from.id!==this.to.id?(e=e.createLinearGradient(this.from.x,this.from.y,this.to.x,this.to.y),n=this.from.options.color.highlight.border,i=this.to.options.color.highlight.border,!1===this.from.selected&&!1===this.to.selected?(n=Lf(this.from.options.color.border,t.opacity),i=Lf(this.to.options.color.border,t.opacity)):!0===this.from.selected&&!1===this.to.selected?i=this.to.options.color.border:!1===this.from.selected&&!0===this.to.selected&&(n=this.from.options.color.border),e.addColorStop(0,n),e.addColorStop(1,i),e):"to"===t.inheritsColor?Lf(this.to.options.color.border,t.opacity):Lf(this.from.options.color.border,t.opacity):Lf(t.color,t.opacity)}},{key:"_circle",value:function(e,t,n,i,r){this.enableShadow(e,t);var o,a,s,l=0,c=2*Math.PI;this.options.selfReference.renderBehindTheNode||(s=this.options.selfReference.angle,o=this.options.selfReference.angle+Math.PI,a=this._findBorderPositionCircle(this.from,e,{x:n,y:i,low:s,high:o,direction:-1}),s=this._findBorderPositionCircle(this.from,e,{x:n,y:i,low:s,high:o,direction:1}),l=Math.atan2(a.y-i,a.x-n),c=Math.atan2(s.y-i,s.x-n)),e.beginPath(),e.arc(n,i,r,l,c,!1),e.stroke(),this.disableShadow(e,t)}},{key:"getDistanceToEdge",value:function(e,t,n,i,r,o){return this.from!=this.to?this._getDistanceToEdge(e,t,n,i,r,o):(t=(e=L(this._getCircleData(void 0),3))[0],n=e[1],i=e[2],e=t-r,t=n-o,Math.abs(Math.sqrt(e*e+t*t)-i))}},{key:"_getDistanceToLine",value:function(e,t,n,i,r,o){var n=n-e,i=i-t,a=((r-e)*n+(o-t)*i)/(n*n+i*i);1<a?a=1:a<0&&(a=0);e=e+a*n-r,n=t+a*i-o;return Math.sqrt(e*e+n*n)}},{key:"getArrowData",value:function(e,t,n,i,r,o){var a,s,l,c,u=o.width,o="from"===t?(c=this.from,l=this.to,h=o.fromArrowScale<0,d=Math.abs(o.fromArrowScale),o.fromArrowType):"to"===t?(c=this.to,l=this.from,h=o.toArrowScale<0,d=Math.abs(o.toArrowScale),o.toArrowType):(c=this.to,l=this.from,h=o.middleArrowScale<0,d=Math.abs(o.middleArrowScale),o.middleArrowType),d=15*d+3*u,h=(c!=l?(u=d/Pb(c.x-l.x,c.y-l.y),s="middle"!==t?!0===this.options.smooth.enabled?(s=this._findBorderPosition(c,e,{via:n}),a=this.getPoint(s.t+u*("from"===t?1:-1),n),a=Math.atan2(s.y-a.y,s.x-a.x),s):(a=Math.atan2(c.y-l.y,c.x-l.x),this._findBorderPosition(c,e)):(l=this.getPoint(.5+(s=(h?-u:u)/2),n),c=this.getPoint(.5-s,n),a=Math.atan2(l.y-c.y,l.x-c.x),this.getPoint(.5,n))):(u=(h=L(this._getCircleData(e),3))[0],l=h[1],c=h[2],"from"===t?(n=this.options.selfReference.angle,h=this.options.selfReference.angle+Math.PI,a=-2*(n=this._findBorderPositionCircle(this.from,e,{x:u,y:l,low:n,high:h,direction:-1})).t*Math.PI+1.5*Math.PI+.1*Math.PI,s=n):"to"===t?(h=this.options.selfReference.angle,n=this.options.selfReference.angle+Math.PI,a=-2*(t=this._findBorderPositionCircle(this.from,e,{x:u,y:l,low:h,high:n,direction:1})).t*Math.PI+1.5*Math.PI-1.1*Math.PI,s=t):(e=this.options.selfReference.angle/(2*Math.PI),s=this._pointOnCircle(u,l,c,e),a=-2*e*Math.PI+1.5*Math.PI+.1*Math.PI)),s.x-.9*d*Math.cos(a));return{point:s,core:{x:h,y:s.y-.9*d*Math.sin(a)},angle:a,length:d,type:o}}},{key:"drawArrowHead",value:function(e,t,n,i,r){e.strokeStyle=this.getColor(e,t),e.fillStyle=e.strokeStyle,e.lineWidth=t.width,qb.draw(e,r)&&(this.enableShadow(e,t),xh(e).call(e),this.disableShadow(e,t))}},{key:"enableShadow",value:function(e,t){!0===t.shadow&&(e.shadowColor=t.shadowColor,e.shadowBlur=t.shadowSize,e.shadowOffsetX=t.shadowX,e.shadowOffsetY=t.shadowY)}},{key:"disableShadow",value:function(e,t){!0===t.shadow&&(e.shadowColor="rgba(0,0,0,0)",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0)}},{key:"drawBackground",value:function(e,t){var n;!1!==t.background&&(n={strokeStyle:e.strokeStyle,lineWidth:e.lineWidth,dashes:e.dashes},e.strokeStyle=t.backgroundColor,e.lineWidth=t.backgroundSize,this.setStrokeDashed(e,t.backgroundDashes),e.stroke(),e.strokeStyle=n.strokeStyle,e.lineWidth=n.lineWidth,e.dashes=n.dashes,this.setStrokeDashed(e,t.dashes))}},{key:"setStrokeDashed",value:function(e,t){!1!==t?void 0!==e.setLineDash?(t=x(t)?t:[5,5],e.setLineDash(t)):console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used."):void 0!==e.setLineDash?e.setLineDash([]):console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.")}}]),i}(),f=function(){P(r,Xx);var i=Xb(r);function r(e,t,n){return m(this,r),i.call(this,e,t,n)}return v(r,[{key:"_findBorderPositionBezier",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:this._getViaCoordinates(),i=!1,r=1,o=0,a=this.to,s=this.options.endPointOffset?this.options.endPointOffset.to:0,l=(e.id===this.from.id&&(a=this.from,i=!0,s=this.options.endPointOffset?this.options.endPointOffset.from:0),!1===this.options.arrowStrikethrough&&(s=0),0);do{var c=.5*(o+r),u=this.getPoint(c,n),d=Math.atan2(a.y-u.y,a.x-u.x),d=a.distanceToBorder(t,d)+s-Math.sqrt(Math.pow(u.x-a.x,2)+Math.pow(u.y-a.y,2))}while(!(Math.abs(d)<.2)&&(d<0?!1===i?o=c:r=c:!1===i?r=c:o=c,++l,o<=r&&l<10));return Jb(Jb({},u),{},{t:c})}},{key:"_getDistanceToBezierEdge",value:function(e,t,n,i,r,o,a){for(var s,l,c,u=1e9,d=e,h=t,p=1;p<10;p++)c=.1*p,l=Math.pow(1-c,2)*e+2*c*(1-c)*a.x+Math.pow(c,2)*n,c=Math.pow(1-c,2)*t+2*c*(1-c)*a.y+Math.pow(c,2)*i,0<p&&(u=(s=this._getDistanceToLine(d,h,l,c,r,o))<u?s:u),d=l,h=c;return u}},{key:"_bezierCurve",value:function(e,t,n,i){e.beginPath(),e.moveTo(this.fromPoint.x,this.fromPoint.y),null!=n&&null!=n.x?null!=i&&null!=i.x?e.bezierCurveTo(n.x,n.y,i.x,i.y,this.toPoint.x,this.toPoint.y):e.quadraticCurveTo(n.x,n.y,this.toPoint.x,this.toPoint.y):e.lineTo(this.toPoint.x,this.toPoint.y),this.drawBackground(e,t),this.enableShadow(e,t),e.stroke(),this.disableShadow(e,t)}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}}]),r}();var t0=function(){P(o,f);var r=Zb(o);function o(e,t,n){var i;return m(this,o),(i=r.call(this,e,t,n)).via=i.via,i._boundFunction=function(){i.positionBezierNode()},i._body.emitter.on("_repositionBezierNodes",i._boundFunction),i}return v(o,[{key:"setOptions",value:function(e){jb(I(o.prototype),"setOptions",this).call(this,e);var t=!1;this.options.physics!==e.physics&&(t=!0),this.options=e,this.id=this.options.id,this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.setupSupportNode(),this.connect(),!0===t&&(this.via.setOptions({physics:this.options.physics}),this.positionBezierNode())}},{key:"connect",value:function(){this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],void 0===this.from||void 0===this.to||!1===this.options.physics||this.from.id===this.to.id?this.via.setOptions({physics:!1}):this.via.setOptions({physics:!0})}},{key:"cleanup",value:function(){return this._body.emitter.off("_repositionBezierNodes",this._boundFunction),void 0!==this.via&&(delete this._body.nodes[this.via.id],!(this.via=void 0))}},{key:"setupSupportNode",value:function(){var e,t;void 0===this.via&&(e="edgeId:"+this.id,t=this._body.functions.createNode({id:e,shape:"circle",physics:!0,hidden:!0}),this._body.nodes[e]=t,this.via=t,this.via.parentEdgeId=this.id,this.positionBezierNode())}},{key:"positionBezierNode",value:function(){void 0!==this.via&&void 0!==this.from&&void 0!==this.to?(this.via.x=.5*(this.from.x+this.to.x),this.via.y=.5*(this.from.y+this.to.y)):void 0!==this.via&&(this.via.x=0,this.via.y=0)}},{key:"_line",value:function(e,t,n){this._bezierCurve(e,t,n)}},{key:"_getViaCoordinates",value:function(){return this.via}},{key:"getViaNode",value:function(){return this.via}},{key:"getPoint",value:function(e){var t,n,i,r,o=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.via;return this.from===this.to?(t=(i=L(this._getCircleData(),3))[0],n=i[1],i=i[2],r=2*Math.PI*(1-e),{x:t+i*Math.sin(r),y:n+i-i*(1-Math.cos(r))}):{x:Math.pow(1-e,2)*this.fromPoint.x+2*e*(1-e)*o.x+Math.pow(e,2)*this.toPoint.x,y:Math.pow(1-e,2)*this.fromPoint.y+2*e*(1-e)*o.y+Math.pow(e,2)*this.toPoint.y}}},{key:"_findBorderPosition",value:function(e,t){return this._findBorderPositionBezier(e,t,this.via)}},{key:"_getDistanceToEdge",value:function(e,t,n,i,r,o){return this._getDistanceToBezierEdge(e,t,n,i,r,o,this.via)}}]),o}();function n0(n){var i=i0();return function(){var e,t=I(n);return $(this,i?(e=I(this).constructor,j(t,arguments,e)):t.apply(this,arguments))}}function i0(){if("undefined"==typeof Reflect||!j)return!1;if(j.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(j(Boolean,[],function(){})),!0}catch(e){return!1}}var r0=function(){P(r,f);var i=n0(r);function r(e,t,n){return m(this,r),i.call(this,e,t,n)}return v(r,[{key:"_line",value:function(e,t,n){this._bezierCurve(e,t,n)}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_getViaCoordinates",value:function(){var e,t,n=this.options.smooth.roundness,i=this.options.smooth.type,r=Math.abs(this.from.x-this.to.x),o=Math.abs(this.from.y-this.to.y);return"discrete"===i||"diagonalCross"===i?(t=e=r<=o?n*o:n*r,this.from.x>this.to.x&&(t=-t),this.from.y>=this.to.y&&(e=-e),t=this.from.x+t,e=this.from.y+e,"discrete"===i&&(r<=o?t=r<n*o?this.from.x:t:e=o<n*r?this.from.y:e),{x:t,y:e}):"straightCross"===i?(t=(1-n)*r,e=(1-n)*o,r<=o?(t=0,this.from.y<this.to.y&&(e=-e)):(this.from.x<this.to.x&&(t=-t),e=0),{x:this.to.x+t,y:this.to.y+e}):"horizontal"===i?(t=(1-n)*r,this.from.x<this.to.x&&(t=-t),{x:this.to.x+t,y:this.from.y}):"vertical"===i?(e=(1-n)*o,this.from.y<this.to.y&&(e=-e),{x:this.from.x,y:this.to.y+e}):"curvedCW"===i?(r=this.to.x-this.from.x,o=this.from.y-this.to.y,t=Math.sqrt(r*r+o*o),e=Math.PI,e=(Math.atan2(o,r)+(.5*n+.5)*e)%(2*e),{x:this.from.x+(.5*n+.5)*t*Math.sin(e),y:this.from.y+(.5*n+.5)*t*Math.cos(e)}):"curvedCCW"===i?(r=this.to.x-this.from.x,o=this.from.y-this.to.y,t=Math.sqrt(r*r+o*o),e=Math.PI,i=(Math.atan2(o,r)+(.5*-n+.5)*e)%(2*e),{x:this.from.x+(.5*n+.5)*t*Math.sin(i),y:this.from.y+(.5*n+.5)*t*Math.cos(i)}):(t=e=r<=o?n*o:n*r,this.from.x>this.to.x&&(t=-t),this.from.y>=this.to.y&&(e=-e),i=this.from.x+t,n=this.from.y+e,r<=o?i=this.from.x<=this.to.x?this.to.x<i?this.to.x:i:this.to.x>i?this.to.x:i:n=this.from.y>=this.to.y?this.to.y>n?this.to.y:n:this.to.y<n?this.to.y:n,{x:i,y:n})}},{key:"_findBorderPosition",value:function(e,t){return this._findBorderPositionBezier(e,t,(2<arguments.length&&void 0!==arguments[2]?arguments[2]:{}).via)}},{key:"_getDistanceToEdge",value:function(e,t,n,i,r,o){var a=6<arguments.length&&void 0!==arguments[6]?arguments[6]:this._getViaCoordinates();return this._getDistanceToBezierEdge(e,t,n,i,r,o,a)}},{key:"getPoint",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this._getViaCoordinates(),n=e;return{x:Math.pow(1-n,2)*this.fromPoint.x+2*n*(1-n)*t.x+Math.pow(n,2)*this.toPoint.x,y:Math.pow(1-n,2)*this.fromPoint.y+2*n*(1-n)*t.y+Math.pow(n,2)*this.toPoint.y}}}]),r}();function o0(n){var i=a0();return function(){var e,t=I(n);return $(this,i?(e=I(this).constructor,j(t,arguments,e)):t.apply(this,arguments))}}function a0(){if("undefined"==typeof Reflect||!j)return!1;if(j.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(j(Boolean,[],function(){})),!0}catch(e){return!1}}function s0(n){var i=l0();return function(){var e,t=I(n);return $(this,i?(e=I(this).constructor,j(t,arguments,e)):t.apply(this,arguments))}}function l0(){if("undefined"==typeof Reflect||!j)return!1;if(j.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(j(Boolean,[],function(){})),!0}catch(e){return!1}}var c0=function(e){P(r,e);var i=s0(r);function r(e,t,n){return m(this,r),i.call(this,e,t,n)}return v(r,[{key:"_line",value:function(e,t,n){var i=n[0],n=n[1];this._bezierCurve(e,t,i,n)}},{key:"_getViaCoordinates",value:function(){var e,t,n,i=this.from.x-this.to.x,r=this.from.y-this.to.y,o=this.options.smooth.roundness,i=(Math.abs(i)>Math.abs(r)||!0===this.options.smooth.forceDirection||"horizontal"===this.options.smooth.forceDirection)&&"vertical"!==this.options.smooth.forceDirection?(t=this.from.y,n=this.to.y,e=this.from.x-o*i,this.to.x+o*i):(t=this.from.y-o*r,n=this.to.y+o*r,e=this.from.x,this.to.x);return[{x:e,y:t},{x:i,y:n}]}},{key:"getViaNode",value:function(){return this._getViaCoordinates()}},{key:"_findBorderPosition",value:function(e,t){return this._findBorderPositionBezier(e,t)}},{key:"_getDistanceToEdge",value:function(e,t,n,i,r,o){var a=L(6<arguments.length&&void 0!==arguments[6]?arguments[6]:this._getViaCoordinates(),2),s=a[0],a=a[1];return this._getDistanceToBezierEdge2(e,t,n,i,r,o,s,a)}},{key:"getPoint",value:function(e){var t=L(1<arguments.length&&void 0!==arguments[1]?arguments[1]:this._getViaCoordinates(),2),n=t[0],t=t[1],i=e,i=[Math.pow(1-i,3),3*i*Math.pow(1-i,2),3*Math.pow(i,2)*(1-i),Math.pow(i,3)];return{x:i[0]*this.fromPoint.x+i[1]*n.x+i[2]*t.x+i[3]*this.toPoint.x,y:i[0]*this.fromPoint.y+i[1]*n.y+i[2]*t.y+i[3]*this.toPoint.y}}}]),r}(function(){P(r,f);var i=o0(r);function r(e,t,n){return m(this,r),i.call(this,e,t,n)}return v(r,[{key:"_getDistanceToBezierEdge2",value:function(e,t,n,i,r,o,a,s){for(var l=1e9,c=e,u=t,d=[0,0,0,0],h=1;h<10;h++){var p,f=.1*h,f=(d[0]=Math.pow(1-f,3),d[1]=3*f*Math.pow(1-f,2),d[2]=3*Math.pow(f,2)*(1-f),d[3]=Math.pow(f,3),d[0]*e+d[1]*a.x+d[2]*s.x+d[3]*n),g=d[0]*t+d[1]*a.y+d[2]*s.y+d[3]*i;0<h&&(l=(p=this._getDistanceToLine(c,u,f,g,r,o))<l?p:l),c=f,u=g}return l}}]),r}());function u0(n){var i=d0();return function(){var e,t=I(n);return $(this,i?(e=I(this).constructor,j(t,arguments,e)):t.apply(this,arguments))}}function d0(){if("undefined"==typeof Reflect||!j)return!1;if(j.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(j(Boolean,[],function(){})),!0}catch(e){return!1}}var h0=function(){P(r,Xx);var i=u0(r);function r(e,t,n){return m(this,r),i.call(this,e,t,n)}return v(r,[{key:"_line",value:function(e,t){e.beginPath(),e.moveTo(this.fromPoint.x,this.fromPoint.y),e.lineTo(this.toPoint.x,this.toPoint.y),this.enableShadow(e,t),e.stroke(),this.disableShadow(e,t)}},{key:"getViaNode",value:function(){}},{key:"getPoint",value:function(e){return{x:(1-e)*this.fromPoint.x+e*this.toPoint.x,y:(1-e)*this.fromPoint.y+e*this.toPoint.y}}},{key:"_findBorderPosition",value:function(e,t){var n=this.to,i=this.from,r=(e.id===this.from.id&&(n=this.from,i=this.to),Math.atan2(n.y-i.y,n.x-i.x)),o=n.x-i.x,a=n.y-i.y,o=Math.sqrt(o*o+a*a),a=(o-e.distanceToBorder(t,r))/o;return{x:(1-a)*i.x+a*n.x,y:(1-a)*i.y+a*n.y,t:0}}},{key:"_getDistanceToEdge",value:function(e,t,n,i,r,o){return this._getDistanceToLine(e,t,n,i,r,o)}}]),r}(),p0=function(){function o(e,t,n,i,r){if(m(this,o),void 0===t)throw new Error("No body provided");this.options=Yf(i),this.globalOptions=i,this.defaultOptions=r,this.body=t,this.imagelist=n,this.id=void 0,this.fromId=void 0,this.toId=void 0,this.selected=!1,this.hover=!1,this.labelDirty=!0,this.baseWidth=this.options.width,this.baseFontSize=this.options.font.size,this.from=void 0,this.to=void 0,this.edgeType=void 0,this.connected=!1,this.labelModule=new Hm(this.body,this.options,!0),this.setOptions(e)}return v(o,[{key:"setOptions",value:function(e){var t,n;if(e)return t=void 0!==e.physics&&this.options.physics!==e.physics||void 0!==e.hidden&&(this.options.hidden||!1)!==(e.hidden||!1)||void 0!==e.from&&this.options.from!==e.from||void 0!==e.to&&this.options.to!==e.to,o.parseOptions(this.options,e,!0,this.globalOptions),void 0!==e.id&&(this.id=e.id),void 0!==e.from&&(this.fromId=e.from),void 0!==e.to&&(this.toId=e.to),void 0!==e.title&&(this.title=e.title),void 0!==e.value&&(e.value=Sm(e.value)),n=[e,this.options,this.defaultOptions],this.chooser=km("edge",n),this.updateLabelModule(e),t=this.updateEdgeType()||t,this._setInteractionWidths(),this.connect(),t}},{key:"getFormattingValues",value:function(){var e=!0===this.options.arrows.to||!0===this.options.arrows.to.enabled,t=!0===this.options.arrows.from||!0===this.options.arrows.from.enabled,n=!0===this.options.arrows.middle||!0===this.options.arrows.middle.enabled,i=this.options.color.inherit,e={toArrow:e,toArrowScale:this.options.arrows.to.scaleFactor,toArrowType:this.options.arrows.to.type,toArrowSrc:this.options.arrows.to.src,toArrowImageWidth:this.options.arrows.to.imageWidth,toArrowImageHeight:this.options.arrows.to.imageHeight,middleArrow:n,middleArrowScale:this.options.arrows.middle.scaleFactor,middleArrowType:this.options.arrows.middle.type,middleArrowSrc:this.options.arrows.middle.src,middleArrowImageWidth:this.options.arrows.middle.imageWidth,middleArrowImageHeight:this.options.arrows.middle.imageHeight,fromArrow:t,fromArrowScale:this.options.arrows.from.scaleFactor,fromArrowType:this.options.arrows.from.type,fromArrowSrc:this.options.arrows.from.src,fromArrowImageWidth:this.options.arrows.from.imageWidth,fromArrowImageHeight:this.options.arrows.from.imageHeight,arrowStrikethrough:this.options.arrowStrikethrough,color:i?void 0:this.options.color.color,inheritsColor:i,opacity:this.options.color.opacity,hidden:this.options.hidden,length:this.options.length,shadow:this.options.shadow.enabled,shadowColor:this.options.shadow.color,shadowSize:this.options.shadow.size,shadowX:this.options.shadow.x,shadowY:this.options.shadow.y,dashes:this.options.dashes,width:this.options.width,background:this.options.background.enabled,backgroundColor:this.options.background.color,backgroundSize:this.options.background.size,backgroundDashes:this.options.background.dashes};return this.selected||this.hover?!0===this.chooser?this.selected?("function"==typeof(n=this.options.selectionWidth)?e.width=n(e.width):"number"==typeof n&&(e.width+=n),e.width=Math.max(e.width,.3/this.body.view.scale),e.color=this.options.color.highlight,e.shadow=this.options.shadow.enabled):this.hover&&("function"==typeof(t=this.options.hoverWidth)?e.width=t(e.width):"number"==typeof t&&(e.width+=t),e.width=Math.max(e.width,.3/this.body.view.scale),e.color=this.options.color.hover,e.shadow=this.options.shadow.enabled):"function"==typeof this.chooser&&(this.chooser(e,this.options.id,this.selected,this.hover),void 0!==e.color&&(e.inheritsColor=!1),!1!==e.shadow||e.shadowColor===this.options.shadow.color&&e.shadowSize===this.options.shadow.size&&e.shadowX===this.options.shadow.x&&e.shadowY===this.options.shadow.y||(e.shadow=!0)):(e.shadow=this.options.shadow.enabled,e.width=Math.max(e.width,.3/this.body.view.scale)),e}},{key:"updateLabelModule",value:function(e){e=[e,this.options,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,e),void 0!==this.labelModule.baseSize&&(this.baseFontSize=this.labelModule.baseSize)}},{key:"updateEdgeType",value:function(){var e=this.options.smooth,t=!1,n=!0;return void 0!==this.edgeType&&!0===(n=this.edgeType instanceof t0&&!0===e.enabled&&"dynamic"===e.type||this.edgeType instanceof c0&&!0===e.enabled&&"cubicBezier"===e.type||this.edgeType instanceof r0&&!0===e.enabled&&"dynamic"!==e.type&&"cubicBezier"!==e.type||this.edgeType instanceof h0&&!1===e.type.enabled?!1:n)&&(t=this.cleanup()),!0===n?!0===e.enabled?"dynamic"===e.type?(t=!0,this.edgeType=new t0(this.options,this.body,this.labelModule)):"cubicBezier"===e.type?this.edgeType=new c0(this.options,this.body,this.labelModule):this.edgeType=new r0(this.options,this.body,this.labelModule):this.edgeType=new h0(this.options,this.body,this.labelModule):this.edgeType.setOptions(this.options),t}},{key:"connect",value:function(){this.disconnect(),this.from=this.body.nodes[this.fromId]||void 0,this.to=this.body.nodes[this.toId]||void 0,this.connected=void 0!==this.from&&void 0!==this.to,!0===this.connected?(this.from.attachEdge(this),this.to.attachEdge(this)):(this.from&&this.from.detachEdge(this),this.to&&this.to.detachEdge(this)),this.edgeType.connect()}},{key:"disconnect",value:function(){this.from&&(this.from.detachEdge(this),this.from=void 0),this.to&&(this.to.detachEdge(this),this.to=void 0),this.connected=!1}},{key:"getTitle",value:function(){return this.title}},{key:"isSelected",value:function(){return this.selected}},{key:"getValue",value:function(){return this.options.value}},{key:"setValueRange",value:function(e,t,n){void 0!==this.options.value?(e=this.options.scaling.customScalingFunction(e,t,n,this.options.value),t=this.options.scaling.max-this.options.scaling.min,!0===this.options.scaling.label.enabled&&(n=this.options.scaling.label.max-this.options.scaling.label.min,this.options.font.size=this.options.scaling.label.min+e*n),this.options.width=this.options.scaling.min+e*t):(this.options.width=this.baseWidth,this.options.font.size=this.baseFontSize),this._setInteractionWidths(),this.updateLabelModule()}},{key:"_setInteractionWidths",value:function(){"function"==typeof this.options.hoverWidth?this.edgeType.hoverWidth=this.options.hoverWidth(this.options.width):this.edgeType.hoverWidth=this.options.hoverWidth+this.options.width,"function"==typeof this.options.selectionWidth?this.edgeType.selectionWidth=this.options.selectionWidth(this.options.width):this.edgeType.selectionWidth=this.options.selectionWidth+this.options.width}},{key:"draw",value:function(e){var t,n=this.getFormattingValues();n.hidden||(t=this.edgeType.getViaNode(),this.edgeType.drawLine(e,n,this.selected,this.hover,t),this.drawLabel(e,t))}},{key:"drawArrows",value:function(e){var t,n,i=this.getFormattingValues();i.hidden||(t=this.edgeType.getViaNode(),n={},this.edgeType.fromPoint=this.edgeType.from,this.edgeType.toPoint=this.edgeType.to,i.fromArrow&&(n.from=this.edgeType.getArrowData(e,"from",t,this.selected,this.hover,i),!1===i.arrowStrikethrough&&(this.edgeType.fromPoint=n.from.core),i.fromArrowSrc&&(n.from.image=this.imagelist.load(i.fromArrowSrc)),i.fromArrowImageWidth&&(n.from.imageWidth=i.fromArrowImageWidth),i.fromArrowImageHeight&&(n.from.imageHeight=i.fromArrowImageHeight)),i.toArrow&&(n.to=this.edgeType.getArrowData(e,"to",t,this.selected,this.hover,i),!1===i.arrowStrikethrough&&(this.edgeType.toPoint=n.to.core),i.toArrowSrc&&(n.to.image=this.imagelist.load(i.toArrowSrc)),i.toArrowImageWidth&&(n.to.imageWidth=i.toArrowImageWidth),i.toArrowImageHeight&&(n.to.imageHeight=i.toArrowImageHeight)),i.middleArrow&&(n.middle=this.edgeType.getArrowData(e,"middle",t,this.selected,this.hover,i),i.middleArrowSrc&&(n.middle.image=this.imagelist.load(i.middleArrowSrc)),i.middleArrowImageWidth&&(n.middle.imageWidth=i.middleArrowImageWidth),i.middleArrowImageHeight&&(n.middle.imageHeight=i.middleArrowImageHeight)),i.fromArrow&&this.edgeType.drawArrowHead(e,i,this.selected,this.hover,n.from),i.middleArrow&&this.edgeType.drawArrowHead(e,i,this.selected,this.hover,n.middle),i.toArrow&&this.edgeType.drawArrowHead(e,i,this.selected,this.hover,n.to))}},{key:"drawLabel",value:function(e,t){var n,i,r;void 0!==this.options.label&&(n=this.from,i=this.to,this.labelModule.differentState(this.selected,this.hover)&&this.labelModule.getTextSize(e,this.selected,this.hover),n.id!=i.id?(this.labelModule.pointToSelf=!1,r=this.edgeType.getPoint(.5,t),e.save(),0!=(i=this._getRotation(e)).angle&&(e.translate(i.x,i.y),e.rotate(i.angle)),this.labelModule.draw(e,r.x,r.y,this.selected,this.hover),e.restore()):(this.labelModule.pointToSelf=!0,t=Cm(e,this.options.selfReference.angle,this.options.selfReference.size,n),r=this._pointOnCircle(t.x,t.y,this.options.selfReference.size,this.options.selfReference.angle),this.labelModule.draw(e,r.x,r.y,this.selected,this.hover)))}},{key:"getItemsOnPoint",value:function(e){var t=[],n=(this.labelModule.visible()&&(n=this._getRotation(),jm(this.labelModule.getSize(),e,n)&&t.push({edgeId:this.id,labelId:0})),{left:e.x,top:e.y});return this.isOverlappingWith(n)&&t.push({edgeId:this.id}),t}},{key:"isOverlappingWith",value:function(e){var t,n,i,r,o;return!!this.connected&&(t=this.from.x,n=this.from.y,i=this.to.x,r=this.to.y,o=e.left,e=e.top,this.edgeType.getDistanceToEdge(t,n,i,r,o,e)<10)}},{key:"_getRotation",value:function(e){var t=this.edgeType.getViaNode(),t=this.edgeType.getPoint(.5,t),e=(void 0!==e&&this.labelModule.calculateLabelSize(e,this.selected,this.hover,t.x,t.y),{x:t.x,y:this.labelModule.size.yLine,angle:0});if(!this.labelModule.visible())return e;if("horizontal"===this.options.font.align)return e;var t=this.from.y-this.to.y,n=this.from.x-this.to.x,t=Math.atan2(t,n);return(t<-1&&n<0||0<t&&n<0)&&(t+=Math.PI),e.angle=t,e}},{key:"_pointOnCircle",value:function(e,t,n,i){return{x:e+n*Math.cos(i),y:t-n*Math.sin(i)}}},{key:"select",value:function(){this.selected=!0}},{key:"unselect",value:function(){this.selected=!1}},{key:"cleanup",value:function(){return this.edgeType.cleanup()}},{key:"remove",value:function(){this.cleanup(),this.disconnect(),delete this.body.edges[this.id]}},{key:"endPointsValid",value:function(){return void 0!==this.body.nodes[this.fromId]&&void 0!==this.body.nodes[this.toId]}}],[{key:"parseOptions",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]&&arguments[2],i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{},r=4<arguments.length&&void 0!==arguments[4]&&arguments[4];if(Pf(["endPointOffset","arrowStrikethrough","id","from","hidden","hoverWidth","labelHighlightBold","length","line","opacity","physics","scaling","selectionWidth","selfReferenceSize","selfReference","to","title","value","width","font","chosen","widthConstraint"],e,t,n),void 0!==t.endPointOffset&&void 0!==t.endPointOffset.from&&(hm(t.endPointOffset.from)?e.endPointOffset.from=t.endPointOffset.from:(e.endPointOffset.from=void 0!==i.endPointOffset.from?i.endPointOffset.from:0,console.error("endPointOffset.from is not a valid number"))),void 0!==t.endPointOffset&&void 0!==t.endPointOffset.to&&(hm(t.endPointOffset.to)?e.endPointOffset.to=t.endPointOffset.to:(e.endPointOffset.to=void 0!==i.endPointOffset.to?i.endPointOffset.to:0,console.error("endPointOffset.to is not a valid number"))),Tm(t.label)?e.label=t.label:Tm(e.label)||(e.label=void 0),Jf(e,t,"smooth",i),Jf(e,t,"shadow",i),Jf(e,t,"background",i),void 0!==t.dashes&&null!==t.dashes?e.dashes=t.dashes:!0===n&&null===t.dashes&&(e.dashes=Ud(i.dashes)),void 0!==t.scaling&&null!==t.scaling?(void 0!==t.scaling.min&&(e.scaling.min=t.scaling.min),void 0!==t.scaling.max&&(e.scaling.max=t.scaling.max),Jf(e.scaling,t.scaling,"label",i.scaling)):!0===n&&null===t.scaling&&(e.scaling=Ud(i.scaling)),void 0!==t.arrows&&null!==t.arrows)if("string"==typeof t.arrows){var o=t.arrows.toLowerCase();e.arrows.to.enabled=-1!=T(o).call(o,"to"),e.arrows.middle.enabled=-1!=T(o).call(o,"middle"),e.arrows.from.enabled=-1!=T(o).call(o,"from")}else{if("object"!==b(t.arrows))throw new Error("The arrow newOptions can only be an object or a string. Refer to the documentation. You used:"+ah(t.arrows));Jf(e.arrows,t.arrows,"to",i.arrows),Jf(e.arrows,t.arrows,"middle",i.arrows),Jf(e.arrows,t.arrows,"from",i.arrows)}else!0===n&&null===t.arrows&&(e.arrows=Ud(i.arrows));if(void 0!==t.color&&null!==t.color){var o=kf(t.color)?{color:t.color,highlight:t.color,hover:t.color,inherit:!1,opacity:1}:t.color,a=e.color;if(r)S(a,i.color,!1,n);else for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&delete a[s];kf(a)?((((a.color=a).highlight=a).hover=a).inherit=!1,void 0===o.opacity&&(a.opacity=1)):(r=!1,void 0!==o.color&&(a.color=o.color,r=!0),void 0!==o.highlight&&(a.highlight=o.highlight,r=!0),void 0!==o.hover&&(a.hover=o.hover,r=!0),void 0!==o.inherit&&(a.inherit=o.inherit),void 0!==o.opacity&&(a.opacity=Math.min(1,Math.max(0,o.opacity))),!0===r?a.inherit=!1:void 0===a.inherit&&(a.inherit="from"))}else!0===n&&null===t.color&&(e.color=Yf(i.color));!0===n&&null===t.font&&(e.font=Yf(i.font)),Object.prototype.hasOwnProperty.call(t,"selfReferenceSize")&&(console.warn("The selfReferenceSize property has been deprecated. Please use selfReference property instead. The selfReference can be set like thise selfReference:{size:30, angle:Math.PI / 4}"),e.selfReference.size=t.selfReferenceSize)}}]),o}(),f0=function(){function r(e,t,n){var i=this;m(this,r),this.body=e,this.images=t,this.groups=n,this.body.functions.createEdge=h(e=this.create).call(e,this),this.edgesListeners={add:function(e,t){i.add(t.items)},update:function(e,t){i.update(t.items)},remove:function(e,t){i.remove(t.items)}},this.options={},this.defaultOptions={arrows:{to:{enabled:!1,scaleFactor:1,type:"arrow"},middle:{enabled:!1,scaleFactor:1,type:"arrow"},from:{enabled:!1,scaleFactor:1,type:"arrow"}},endPointOffset:{from:0,to:0},arrowStrikethrough:!0,color:{color:"#848484",highlight:"#848484",hover:"#848484",inherit:"from",opacity:1},dashes:!1,font:{color:"#343434",size:14,face:"arial",background:"none",strokeWidth:2,strokeColor:"#ffffff",align:"horizontal",multi:!1,vadjust:0,bold:{mod:"bold"},boldital:{mod:"bold italic"},ital:{mod:"italic"},mono:{mod:"",size:15,face:"courier new",vadjust:2}},hidden:!1,hoverWidth:1.5,label:void 0,labelHighlightBold:!0,length:void 0,physics:!0,scaling:{min:1,max:15,label:{enabled:!0,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(e,t,n,i){return t===e?.5:Math.max(0,(i-e)*(1/(t-e)))}},selectionWidth:1.5,selfReference:{size:20,angle:Math.PI/4,renderBehindTheNode:!0},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:10,x:5,y:5},background:{enabled:!1,color:"rgba(111,111,111,1)",size:10,dashes:!1},smooth:{enabled:!0,type:"dynamic",forceDirection:"none",roundness:.5},title:void 0,width:1,value:void 0},S(this.options,this.defaultOptions),this.bindEventListeners()}return v(r,[{key:"bindEventListeners",value:function(){var e,a=this;this.body.emitter.on("_forceDisableDynamicCurves",function(e){var t,n,i,r=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],o=("dynamic"===e&&(e="continuous"),!1);for(t in a.body.edges)Object.prototype.hasOwnProperty.call(a.body.edges,t)&&(n=a.body.edges[t],null!=(i=a.body.data.edges.get(t))&&void 0!==(i=i.smooth)&&!0===i.enabled&&"dynamic"===i.type&&(void 0===e?n.setOptions({smooth:!1}):n.setOptions({smooth:{type:e}}),o=!0));!0===r&&!0===o&&a.body.emitter.emit("_dataChanged")}),this.body.emitter.on("_dataUpdated",function(){a.reconnectEdges()}),this.body.emitter.on("refreshEdges",h(e=this.refresh).call(e,this)),this.body.emitter.on("refresh",h(e=this.refresh).call(e,this)),this.body.emitter.on("destroy",function(){C(a.edgesListeners,function(e,t){a.body.data.edges&&a.body.data.edges.off(t,e)}),delete a.body.functions.createEdge,delete a.edgesListeners.add,delete a.edgesListeners.update,delete a.edgesListeners.remove,delete a.edgesListeners})}},{key:"setOptions",value:function(e){if(void 0!==e){p0.parseOptions(this.options,e,!0,this.defaultOptions,!0);var t=!1;if(void 0!==e.smooth)for(var n in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,n)&&(t=this.body.edges[n].updateEdgeType()||t);if(void 0!==e.font)for(var i in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,i)&&this.body.edges[i].updateLabelModule();void 0===e.hidden&&void 0===e.physics&&!0!==t||this.body.emitter.emit("_dataChanged")}}},{key:"setData",value:function(e){var t,n=this,i=1<arguments.length&&void 0!==arguments[1]&&arguments[1],r=this.body.data.edges;if(q.isDataViewLike("id",e))this.body.data.edges=e;else if(x(e))this.body.data.edges=new q.DataSet,this.body.data.edges.add(e);else{if(e)throw new TypeError("Array or DataSet expected");this.body.data.edges=new q.DataSet}r&&C(this.edgesListeners,function(e,t){r.off(t,e)}),this.body.edges={},this.body.data.edges&&(C(this.edgesListeners,function(e,t){n.body.data.edges.on(t,e)}),t=this.body.data.edges.getIds(),this.add(t,!0)),this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),!1===i&&this.body.emitter.emit("_dataChanged")}},{key:"add",value:function(e){for(var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1],n=this.body.edges,i=this.body.data.edges,r=0;r<e.length;r++){var o=e[r],a=n[o],a=(a&&a.disconnect(),i.get(o,{showInternalIds:!0}));n[o]=this.create(a)}this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),!1===t&&this.body.emitter.emit("_dataChanged")}},{key:"update",value:function(e){for(var t=this.body.edges,n=this.body.data.edges,i=!1,r=0;r<e.length;r++){var o=e[r],a=n.get(o),s=t[o];void 0!==s?(s.disconnect(),i=s.setOptions(a)||i,s.connect()):(this.body.edges[o]=this.create(a),i=!0)}!0===i?(this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),this.body.emitter.emit("_dataChanged")):this.body.emitter.emit("_dataUpdated")}},{key:"remove",value:function(e){var t,n=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];0!==e.length&&(t=this.body.edges,C(e,function(e){e=t[e];void 0!==e&&e.remove()}),n&&this.body.emitter.emit("_dataChanged"))}},{key:"refresh",value:function(){var n=this;C(this.body.edges,function(e,t){t=n.body.data.edges.get(t);void 0!==t&&e.setOptions(t)})}},{key:"create",value:function(e){return new p0(e,this.body,this.images,this.options,this.defaultOptions)}},{key:"reconnectEdges",value:function(){var e,t,n=this.body.nodes,i=this.body.edges;for(e in n)Object.prototype.hasOwnProperty.call(n,e)&&(n[e].edges=[]);for(e in i)Object.prototype.hasOwnProperty.call(i,e)&&((t=i[e]).from=null,t.to=null,t.connect())}},{key:"getConnectedNodes",value:function(e){var t=[];return void 0!==this.body.edges[e]&&(void 0!==(e=this.body.edges[e]).fromId&&t.push(e.fromId),void 0!==e.toId&&t.push(e.toId)),t}},{key:"_updateState",value:function(){this._addMissingEdges(),this._removeInvalidEdges()}},{key:"_removeInvalidEdges",value:function(){var i=this,r=[];C(this.body.edges,function(e,t){var n=i.body.nodes[e.toId],e=i.body.nodes[e.fromId];void 0!==n&&!0===n.isCluster||void 0!==e&&!0===e.isCluster||void 0!==n&&void 0!==e||r.push(t)}),this.remove(r,!1)}},{key:"_addMissingEdges",value:function(){var n,i,e=this.body.data.edges;null!=e&&(n=this.body.edges,i=[],_(e).call(e,function(e,t){void 0===n[t]&&i.push(t)}),this.add(i,!0))}}]),r}(),g0=function(){function i(e,t,n){m(this,i),this.body=e,this.physicsBody=t,this.barnesHutTree,this.setOptions(n),this._rng=pf("BARNES HUT SOLVER")}return v(i,[{key:"setOptions",value:function(e){this.options=e,this.thetaInversed=1/this.options.theta,this.overlapAvoidanceFactor=1-Math.max(0,Math.min(1,this.options.avoidOverlap))}},{key:"solve",value:function(){if(0!==this.options.gravitationalConstant&&0<this.physicsBody.physicsNodeIndices.length){var e,t=this.body.nodes,n=this.physicsBody.physicsNodeIndices,i=n.length,r=this._formBarnesHutTree(t,n);this.barnesHutTree=r;for(var o=0;o<i;o++)0<(e=t[n[o]]).options.mass&&this._getForceContributions(r.root,e)}}},{key:"_getForceContributions",value:function(e,t){this._getForceContribution(e.children.NW,t),this._getForceContribution(e.children.NE,t),this._getForceContribution(e.children.SW,t),this._getForceContribution(e.children.SE,t)}},{key:"_getForceContribution",value:function(e,t){var n,i,r;0<e.childrenCount&&(n=e.centerOfMass.x-t.x,i=e.centerOfMass.y-t.y,(r=Math.sqrt(n*n+i*i))*e.calcSize>this.thetaInversed?this._calculateForces(r,n,i,t,e):4===e.childrenCount?this._getForceContributions(e,t):e.children.data.id!=t.id&&this._calculateForces(r,n,i,t,e))}},{key:"_calculateForces",value:function(e,t,n,i,r){0===e&&(t=e=.1),this.overlapAvoidanceFactor<1&&i.shape.radius&&(e=Math.max(.1+this.overlapAvoidanceFactor*i.shape.radius,e-i.shape.radius));r=this.options.gravitationalConstant*r.mass*i.options.mass/Math.pow(e,3),e=n*r;this.physicsBody.forces[i.id].x+=t*r,this.physicsBody.forces[i.id].y+=e}},{key:"_formBarnesHutTree",value:function(e,t){for(var n,i=t.length,r=e[t[0]].x,o=e[t[0]].y,a=e[t[0]].x,s=e[t[0]].y,l=1;l<i;l++){var c=e[t[l]],u=c.x,d=c.y;0<c.options.mass&&(u<r&&(r=u),a<u&&(a=u),d<o&&(o=d),s<d&&(s=d))}var h=Math.abs(a-r)-Math.abs(s-o),h=(0<h?(o-=.5*h,s+=.5*h):(r+=.5*h,a-=.5*h),Math.max(1e-5,Math.abs(a-r))),p=.5*h,f=.5*(r+a),g=.5*(o+s),y={root:{centerOfMass:{x:0,y:0},mass:0,range:{minX:f-p,maxX:f+p,minY:g-p,maxY:g+p},size:h,calcSize:1/h,children:{data:null},maxWidth:0,level:0,childrenCount:4}};this._splitBranch(y.root);for(var m=0;m<i;m++)0<(n=e[t[m]]).options.mass&&this._placeInTree(y.root,n);return y}},{key:"_updateBranchMass",value:function(e,t){var n=e.centerOfMass,i=e.mass+t.options.mass,r=1/i,n=(n.x=n.x*e.mass+t.x*t.options.mass,n.x*=r,n.y=n.y*e.mass+t.y*t.options.mass,n.y*=r,e.mass=i,Math.max(Math.max(t.height,t.radius),t.width));e.maxWidth=e.maxWidth<n?n:e.maxWidth}},{key:"_placeInTree",value:function(e,t,n){1==n&&void 0!==n||this._updateBranchMass(e,t);n=e.children.NW.range,n=n.maxX>t.x?n.maxY>t.y?"NW":"SW":n.maxY>t.y?"NE":"SE";this._placeInRegion(e,t,n)}},{key:"_placeInRegion",value:function(e,t,n){var i=e.children[n];switch(i.childrenCount){case 0:i.children.data=t,i.childrenCount=1,this._updateBranchMass(i,t);break;case 1:i.children.data.x===t.x&&i.children.data.y===t.y?(t.x+=this._rng(),t.y+=this._rng()):(this._splitBranch(i),this._placeInTree(i,t));break;case 4:this._placeInTree(i,t)}}},{key:"_splitBranch",value:function(e){var t=null;1===e.childrenCount&&(t=e.children.data,e.mass=0,e.centerOfMass.x=0,e.centerOfMass.y=0),e.childrenCount=4,e.children.data=null,this._insertRegion(e,"NW"),this._insertRegion(e,"NE"),this._insertRegion(e,"SW"),this._insertRegion(e,"SE"),null!=t&&this._placeInTree(e,t)}},{key:"_insertRegion",value:function(e,t){var n,i,r,o,a=.5*e.size;switch(t){case"NW":n=e.range.minX,i=e.range.minX+a,r=e.range.minY,o=e.range.minY+a;break;case"NE":n=e.range.minX+a,i=e.range.maxX,r=e.range.minY,o=e.range.minY+a;break;case"SW":n=e.range.minX,i=e.range.minX+a,r=e.range.minY+a,o=e.range.maxY;break;case"SE":n=e.range.minX+a,i=e.range.maxX,r=e.range.minY+a,o=e.range.maxY}e.children[t]={centerOfMass:{x:0,y:0},mass:0,range:{minX:n,maxX:i,minY:r,maxY:o},size:.5*e.size,calcSize:2*e.calcSize,children:{data:null},maxWidth:0,level:e.level+1,childrenCount:0}}},{key:"_debug",value:function(e,t){void 0!==this.barnesHutTree&&(e.lineWidth=1,this._drawBranch(this.barnesHutTree.root,e,t))}},{key:"_drawBranch",value:function(e,t,n){void 0===n&&(n="#FF0000"),4===e.childrenCount&&(this._drawBranch(e.children.NW,t),this._drawBranch(e.children.NE,t),this._drawBranch(e.children.SE,t),this._drawBranch(e.children.SW,t)),t.strokeStyle=n,t.beginPath(),t.moveTo(e.range.minX,e.range.minY),t.lineTo(e.range.maxX,e.range.minY),t.stroke(),t.beginPath(),t.moveTo(e.range.maxX,e.range.minY),t.lineTo(e.range.maxX,e.range.maxY),t.stroke(),t.beginPath(),t.moveTo(e.range.maxX,e.range.maxY),t.lineTo(e.range.minX,e.range.maxY),t.stroke(),t.beginPath(),t.moveTo(e.range.minX,e.range.maxY),t.lineTo(e.range.minX,e.range.minY),t.stroke()}}]),i}(),y0=function(){function i(e,t,n){m(this,i),this._rng=pf("REPULSION SOLVER"),this.body=e,this.physicsBody=t,this.setOptions(n)}return v(i,[{key:"setOptions",value:function(e){this.options=e}},{key:"solve",value:function(){for(var e,t,n,i,r,o=this.body.nodes,a=this.physicsBody.physicsNodeIndices,s=this.physicsBody.forces,l=this.options.nodeDistance,c=-2/3/l,u=0;u<a.length-1;u++)for(var d=o[a[u]],h=u+1;h<a.length;h++)e=(r=o[a[h]]).x-d.x,n=r.y-d.y,0===(t=Math.sqrt(e*e+n*n))&&(e=t=.1*this._rng()),t<2*l&&(i=t<.5*l?1:c*t+4/3,n=n*(i/=t),s[d.id].x-=t=e*i,s[d.id].y-=n,s[r.id].x+=t,s[r.id].y+=n)}}]),i}(),m0=function(){function i(e,t,n){m(this,i),this.body=e,this.physicsBody=t,this.setOptions(n)}return v(i,[{key:"setOptions",value:function(e){this.options=e,this.overlapAvoidanceFactor=Math.max(0,Math.min(1,this.options.avoidOverlap||0))}},{key:"solve",value:function(){for(var e=this.body.nodes,t=this.physicsBody.physicsNodeIndices,n=this.physicsBody.forces,i=this.options.nodeDistance,r=0;r<t.length-1;r++)for(var o=e[t[r]],a=r+1;a<t.length;a++){var s,l,c,u,d,h=e[t[a]];o.level===h.level&&(d=i+this.overlapAvoidanceFactor*((o.shape.radius||0)/2+(h.shape.radius||0)/2),s=h.x-o.x,l=h.y-o.y,c=void 0,c=(u=Math.sqrt(s*s+l*l))<d?-Math.pow(.05*u,2)+Math.pow(.05*d,2):0,0!==u&&(c/=u),d=l*c,n[o.id].x-=u=s*c,n[o.id].y-=d,n[h.id].x+=u,n[h.id].y+=d)}}}]),i}(),v0=function(){function i(e,t,n){m(this,i),this.body=e,this.physicsBody=t,this.setOptions(n)}return v(i,[{key:"setOptions",value:function(e){this.options=e}},{key:"solve",value:function(){for(var e,t,n,i,r,o=this.physicsBody.physicsEdgeIndices,a=this.body.edges,s=0;s<o.length;s++)!0===(t=a[o[s]]).connected&&t.toId!==t.fromId&&void 0!==this.body.nodes[t.toId]&&void 0!==this.body.nodes[t.fromId]&&(void 0!==t.edgeType.via?(e=void 0===t.options.length?this.options.springLength:t.options.length,n=t.to,i=t.edgeType.via,r=t.from,this._calculateSpringForce(n,i,.5*e),this._calculateSpringForce(i,r,.5*e)):(e=void 0===t.options.length?1.5*this.options.springLength:t.options.length,this._calculateSpringForce(t.from,t.to,e)))}},{key:"_calculateSpringForce",value:function(e,t,n){var i=e.x-t.x,r=e.y-t.y,o=Math.max(Math.sqrt(i*i+r*r),.01),n=this.options.springConstant*(n-o)/o,o=i*n,i=r*n;void 0!==this.physicsBody.forces[e.id]&&(this.physicsBody.forces[e.id].x+=o,this.physicsBody.forces[e.id].y+=i),void 0!==this.physicsBody.forces[t.id]&&(this.physicsBody.forces[t.id].x-=o,this.physicsBody.forces[t.id].y-=i)}}]),i}(),b0=function(){function i(e,t,n){m(this,i),this.body=e,this.physicsBody=t,this.setOptions(n)}return v(i,[{key:"setOptions",value:function(e){this.options=e}},{key:"solve",value:function(){for(var e,t,n,i,r,o=this.body.edges,a=this.physicsBody.physicsEdgeIndices,s=this.physicsBody.physicsNodeIndices,l=this.physicsBody.forces,c=0;c<s.length;c++){var u=s[c];l[u].springFx=0,l[u].springFy=0}for(var d=0;d<a.length;d++)!0===(e=o[a[d]]).connected&&(i=void 0===e.options.length?this.options.springLength:e.options.length,n=e.from.x-e.to.x,t=e.from.y-e.to.y,r=Math.sqrt(n*n+t*t),n=n*(h=this.options.springConstant*(i-(r=0===r?.01:r))/r),i=t*h,e.to.level!=e.from.level?(void 0!==l[e.toId]&&(l[e.toId].springFx-=n,l[e.toId].springFy-=i),void 0!==l[e.fromId]&&(l[e.fromId].springFx+=n,l[e.fromId].springFy+=i)):(void 0!==l[e.toId]&&(l[e.toId].x-=.5*n,l[e.toId].y-=.5*i),void 0!==l[e.fromId]&&(l[e.fromId].x+=.5*n,l[e.fromId].y+=.5*i)));for(var h=1,p=0;p<s.length;p++){var f=s[p],g=Math.min(h,Math.max(-h,l[f].springFx)),y=Math.min(h,Math.max(-h,l[f].springFy));l[f].x+=g,l[f].y+=y}for(var m=0,v=0,b=0;b<s.length;b++){var x=s[b];m+=l[x].x,v+=l[x].y}for(var w=m/s.length,_=v/s.length,S=0;S<s.length;S++){var O=s[S];l[O].x-=w,l[O].y-=_}}}]),i}(),x0=function(){function i(e,t,n){m(this,i),this.body=e,this.physicsBody=t,this.setOptions(n)}return v(i,[{key:"setOptions",value:function(e){this.options=e}},{key:"solve",value:function(){for(var e=this.body.nodes,t=this.physicsBody.physicsNodeIndices,n=this.physicsBody.forces,i=0;i<t.length;i++){var r,o=-(r=e[t[i]]).x,a=-r.y,s=Math.sqrt(o*o+a*a);this._calculateForces(s,o,a,n,r)}}},{key:"_calculateForces",value:function(e,t,n,i,r){e=0===e?0:this.options.centralGravity/e;i[r.id].x=t*e,i[r.id].y=n*e}}]),i}();function w0(n){var i=_0();return function(){var e,t=I(n);return $(this,i?(e=I(this).constructor,j(t,arguments,e)):t.apply(this,arguments))}}function _0(){if("undefined"==typeof Reflect||!j)return!1;if(j.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(j(Boolean,[],function(){})),!0}catch(e){return!1}}var S0=function(){P(r,g0);var i=w0(r);function r(e,t,n){return m(this,r),(e=i.call(this,e,t,n))._rng=pf("FORCE ATLAS 2 BASED REPULSION SOLVER"),e}return v(r,[{key:"_calculateForces",value:function(e,t,n,i,r){0===e&&(t=e=.1*this._rng()),this.overlapAvoidanceFactor<1&&i.shape.radius&&(e=Math.max(.1+this.overlapAvoidanceFactor*i.shape.radius,e-i.shape.radius));var o=i.edges.length+1,r=this.options.gravitationalConstant*r.mass*i.options.mass*o/Math.pow(e,2),o=n*r;this.physicsBody.forces[i.id].x+=t*r,this.physicsBody.forces[i.id].y+=o}}]),r}();function O0(n){var i=E0();return function(){var e,t=I(n);return $(this,i?(e=I(this).constructor,j(t,arguments,e)):t.apply(this,arguments))}}function E0(){if("undefined"==typeof Reflect||!j)return!1;if(j.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(j(Boolean,[],function(){})),!0}catch(e){return!1}}var k0,j0=function(){P(r,x0);var i=O0(r);function r(e,t,n){return m(this,r),i.call(this,e,t,n)}return v(r,[{key:"_calculateForces",value:function(e,t,n,i,r){0<e&&(e=r.edges.length+1,e=this.options.centralGravity*e*r.options.mass,i[r.id].x=t*e,i[r.id].y=n*e)}}]),r}(),T0=function(){function t(e){m(this,t),this.body=e,this.physicsBody={physicsNodeIndices:[],physicsEdgeIndices:[],forces:{},velocities:{}},this.physicsEnabled=!0,this.simulationInterval=1e3/60,this.requiresTimeout=!0,this.previousStates={},this.referenceState={},this.freezeCache={},this.renderTimer=void 0,this.adaptiveTimestep=!1,this.adaptiveTimestepEnabled=!1,this.adaptiveCounter=0,this.adaptiveInterval=3,this.stabilized=!1,this.startedStabilization=!1,this.stabilizationIterations=0,this.ready=!1,this.options={},this.defaultOptions={enabled:!0,barnesHut:{theta:.5,gravitationalConstant:-2e3,centralGravity:.3,springLength:95,springConstant:.04,damping:.09,avoidOverlap:0},forceAtlas2Based:{theta:.5,gravitationalConstant:-50,centralGravity:.01,springConstant:.08,springLength:100,damping:.4,avoidOverlap:0},repulsion:{centralGravity:.2,springLength:200,springConstant:.05,nodeDistance:100,damping:.09,avoidOverlap:0},hierarchicalRepulsion:{centralGravity:0,springLength:100,springConstant:.01,nodeDistance:120,damping:.09},maxVelocity:50,minVelocity:.75,solver:"barnesHut",stabilization:{enabled:!0,iterations:1e3,updateInterval:50,onlyDynamicEdges:!1,fit:!0},timestep:.5,adaptiveTimestep:!0,wind:{x:0,y:0}},Zn(this.options,this.defaultOptions),this.timestep=.5,this.layoutFailed=!1,this.bindEventListeners()}return v(t,[{key:"bindEventListeners",value:function(){var e=this;this.body.emitter.on("initPhysics",function(){e.initPhysics()}),this.body.emitter.on("_layoutFailed",function(){e.layoutFailed=!0}),this.body.emitter.on("resetPhysics",function(){e.stopSimulation(),e.ready=!1}),this.body.emitter.on("disablePhysics",function(){e.physicsEnabled=!1,e.stopSimulation()}),this.body.emitter.on("restorePhysics",function(){e.setOptions(e.options),!0===e.ready&&e.startSimulation()}),this.body.emitter.on("startSimulation",function(){!0===e.ready&&e.startSimulation()}),this.body.emitter.on("stopSimulation",function(){e.stopSimulation()}),this.body.emitter.on("destroy",function(){e.stopSimulation(!1),e.body.emitter.off()}),this.body.emitter.on("_dataChanged",function(){e.updatePhysicsData()})}},{key:"setOptions",value:function(e){void 0!==e&&(!1===e?(this.options.enabled=!1,this.physicsEnabled=!1,this.stopSimulation()):!0===e?(this.options.enabled=!0,this.physicsEnabled=!0,this.startSimulation()):(this.physicsEnabled=!0,$f(["stabilization"],this.options,e),Jf(this.options,e,"stabilization"),void 0===e.enabled&&(this.options.enabled=!0),!1===this.options.enabled&&(this.physicsEnabled=!1,this.stopSimulation()),(e=this.options.wind)&&("number"==typeof e.x&&!um(e.x)||(e.x=0),"number"==typeof e.y&&!um(e.y)||(e.y=0)),this.timestep=this.options.timestep)),this.init()}},{key:"init",value:function(){var e;"forceAtlas2Based"===this.options.solver?(e=this.options.forceAtlas2Based,this.nodesSolver=new S0(this.body,this.physicsBody,e),this.edgesSolver=new v0(this.body,this.physicsBody,e),this.gravitySolver=new j0(this.body,this.physicsBody,e)):("repulsion"===this.options.solver?(e=this.options.repulsion,this.nodesSolver=new y0(this.body,this.physicsBody,e),this.edgesSolver=new v0(this.body,this.physicsBody,e)):"hierarchicalRepulsion"===this.options.solver?(e=this.options.hierarchicalRepulsion,this.nodesSolver=new m0(this.body,this.physicsBody,e),this.edgesSolver=new b0(this.body,this.physicsBody,e)):(e=this.options.barnesHut,this.nodesSolver=new g0(this.body,this.physicsBody,e),this.edgesSolver=new v0(this.body,this.physicsBody,e)),this.gravitySolver=new x0(this.body,this.physicsBody,e)),this.modelOptions=e}},{key:"initPhysics",value:function(){!0===this.physicsEnabled&&!0===this.options.enabled?!0===this.options.stabilization.enabled?this.stabilize():(this.stabilized=!1,this.ready=!0,this.body.emitter.emit("fit",{},this.layoutFailed),this.startSimulation()):(this.ready=!0,this.body.emitter.emit("fit"))}},{key:"startSimulation",value:function(){var e;!0===this.physicsEnabled&&!0===this.options.enabled?(this.stabilized=!1,this.adaptiveTimestep=!1,this.body.emitter.emit("_resizeNodes"),void 0===this.viewFunction&&(this.viewFunction=h(e=this.simulationStep).call(e,this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering"))):this.body.emitter.emit("_redraw")}},{key:"stopSimulation",value:function(){var e=!(0<arguments.length&&void 0!==arguments[0])||arguments[0];(this.stabilized=!0)===e&&this._emitStabilized(),void 0!==this.viewFunction&&(this.body.emitter.off("initRedraw",this.viewFunction),!(this.viewFunction=void 0)===e&&this.body.emitter.emit("_stopRendering"))}},{key:"simulationStep",value:function(){var e=hu();this.physicsTick(),(hu()-e<.4*this.simulationInterval||!0===this.runDoubleSpeed)&&!1===this.stabilized&&(this.physicsTick(),this.runDoubleSpeed=!0),!0===this.stabilized&&this.stopSimulation()}},{key:"_emitStabilized",value:function(){var e=this,t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.stabilizationIterations;(1<this.stabilizationIterations||!0===this.startedStabilization)&&ph(function(){e.body.emitter.emit("stabilized",{iterations:t}),e.startedStabilization=!1,e.stabilizationIterations=0},0)}},{key:"physicsStep",value:function(){this.gravitySolver.solve(),this.nodesSolver.solve(),this.edgesSolver.solve(),this.moveNodes()}},{key:"adjustTimeStep",value:function(){!0===this._evaluateStepQuality()?this.timestep=1.2*this.timestep:this.timestep/1.2<this.options.timestep?this.timestep=this.options.timestep:(this.adaptiveCounter=-1,this.timestep=Math.max(this.options.timestep,this.timestep/1.2))}},{key:"physicsTick",value:function(){this._startStabilizing(),!0!==this.stabilized&&(!0===this.adaptiveTimestep&&!0===this.adaptiveTimestepEnabled?(this.adaptiveCounter%this.adaptiveInterval==0?(this.timestep=2*this.timestep,this.physicsStep(),this.revert(),this.timestep=.5*this.timestep,this.physicsStep(),this.physicsStep(),this.adjustTimeStep()):this.physicsStep(),this.adaptiveCounter+=1):(this.timestep=this.options.timestep,this.physicsStep()),!0===this.stabilized&&this.revert(),this.stabilizationIterations++)}},{key:"updatePhysicsData",value:function(){this.physicsBody.forces={},this.physicsBody.physicsNodeIndices=[],this.physicsBody.physicsEdgeIndices=[];var e,t,n=this.body.nodes,i=this.body.edges;for(e in n)Object.prototype.hasOwnProperty.call(n,e)&&!0===n[e].options.physics&&this.physicsBody.physicsNodeIndices.push(n[e].id);for(t in i)Object.prototype.hasOwnProperty.call(i,t)&&!0===i[t].options.physics&&this.physicsBody.physicsEdgeIndices.push(i[t].id);for(var r,o=0;o<this.physicsBody.physicsNodeIndices.length;o++){var a=this.physicsBody.physicsNodeIndices[o];this.physicsBody.forces[a]={x:0,y:0},void 0===this.physicsBody.velocities[a]&&(this.physicsBody.velocities[a]={x:0,y:0})}for(r in this.physicsBody.velocities)void 0===n[r]&&delete this.physicsBody.velocities[r]}},{key:"revert",value:function(){var e=w(this.previousStates),t=this.body.nodes,n=this.physicsBody.velocities;this.referenceState={};for(var i=0;i<e.length;i++){var r=e[i];void 0!==t[r]?!0===t[r].options.physics&&(this.referenceState[r]={positions:{x:t[r].x,y:t[r].y}},n[r].x=this.previousStates[r].vx,n[r].y=this.previousStates[r].vy,t[r].x=this.previousStates[r].x,t[r].y=this.previousStates[r].y):delete this.previousStates[r]}}},{key:"_evaluateStepQuality",value:function(){var e,t,n,i=this.body.nodes,r=this.referenceState;for(n in this.referenceState)if(Object.prototype.hasOwnProperty.call(this.referenceState,n)&&void 0!==i[n]&&(e=i[n].x-r[n].positions.x,t=i[n].y-r[n].positions.y,.3<Math.sqrt(Math.pow(e,2)+Math.pow(t,2))))return!1;return!0}},{key:"moveNodes",value:function(){for(var e=this.physicsBody.physicsNodeIndices,t=0,n=0,i=0;i<e.length;i++){var r=e[i],r=this._performStep(r),t=Math.max(t,r);n+=r}this.adaptiveTimestepEnabled=n/e.length<5,this.stabilized=t<this.options.minVelocity}},{key:"calculateComponentVelocity",value:function(e,t,n){e+=(t-this.modelOptions.damping*e)/n*this.timestep;t=this.options.maxVelocity||1e9;return e=Math.abs(e)>t?0<e?t:-t:e}},{key:"_performStep",value:function(e){var t=this.body.nodes[e],n=this.physicsBody.forces[e],i=(this.options.wind&&(n.x+=this.options.wind.x,n.y+=this.options.wind.y),this.physicsBody.velocities[e]);return!(this.previousStates[e]={x:t.x,y:t.y,vx:i.x,vy:i.y})===t.options.fixed.x?(i.x=this.calculateComponentVelocity(i.x,n.x,t.options.mass),t.x+=i.x*this.timestep):(n.x=0,i.x=0),!1===t.options.fixed.y?(i.y=this.calculateComponentVelocity(i.y,n.y,t.options.mass),t.y+=i.y*this.timestep):(n.y=0,i.y=0),Math.sqrt(Math.pow(i.x,2)+Math.pow(i.y,2))}},{key:"_freezeNodes",value:function(){var e,t,n=this.body.nodes;for(e in n)Object.prototype.hasOwnProperty.call(n,e)&&n[e].x&&n[e].y&&(t=n[e].options.fixed,this.freezeCache[e]={x:t.x,y:t.y},t.x=!0,t.y=!0)}},{key:"_restoreFrozenNodes",value:function(){var e,t=this.body.nodes;for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&void 0!==this.freezeCache[e]&&(t[e].options.fixed.x=this.freezeCache[e].x,t[e].options.fixed.y=this.freezeCache[e].y);this.freezeCache={}}},{key:"stabilize",value:function(){var e=this,t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.options.stabilization.iterations;"number"!=typeof t&&(t=this.options.stabilization.iterations,console.error("The stabilize method needs a numeric amount of iterations. Switching to default: ",t)),0===this.physicsBody.physicsNodeIndices.length?this.ready=!0:(this.adaptiveTimestep=this.options.adaptiveTimestep,this.body.emitter.emit("_resizeNodes"),this.stopSimulation(),this.stabilized=!1,this.body.emitter.emit("_blockRedraw"),this.targetIterations=t,!0===this.options.stabilization.onlyDynamicEdges&&this._freezeNodes(),this.stabilizationIterations=0,ph(function(){return e._stabilizationBatch()},0))}},{key:"_startStabilizing",value:function(){return!0!==this.startedStabilization&&(this.body.emitter.emit("startStabilizing"),this.startedStabilization=!0)}},{key:"_stabilizationBatch",value:function(){function e(){return!1===i.stabilized&&i.stabilizationIterations<i.targetIterations}function t(){i.body.emitter.emit("stabilizationProgress",{iterations:i.stabilizationIterations,total:i.targetIterations})}for(var n,i=this,r=(this._startStabilizing()&&t(),0);e()&&r<this.options.stabilization.updateInterval;)this.physicsTick(),r++;t(),e()?ph(h(n=this._stabilizationBatch).call(n,this),0):this._finalizeStabilization()}},{key:"_finalizeStabilization",value:function(){this.body.emitter.emit("_allowRedraw"),!0===this.options.stabilization.fit&&this.body.emitter.emit("fit"),!0===this.options.stabilization.onlyDynamicEdges&&this._restoreFrozenNodes(),this.body.emitter.emit("stabilizationIterationsDone"),this.body.emitter.emit("_requestRedraw"),!0===this.stabilized?this._emitStabilized():this.startSimulation(),this.ready=!0}},{key:"_drawForces",value:function(e){for(var t=0;t<this.physicsBody.physicsNodeIndices.length;t++){var n=this.physicsBody.physicsNodeIndices[t],i=this.body.nodes[n],n=this.physicsBody.forces[n],r=Math.sqrt(Math.pow(n.x,2)+Math.pow(n.x,2)),o=Math.min(Math.max(5,r),15),a=3*o,r=Vf((180-180*Math.min(1,Math.max(0,.03*r)))/360,1,1),s={x:i.x+20*n.x,y:i.y+20*n.y},o=(e.lineWidth=o,e.strokeStyle=r,e.beginPath(),e.moveTo(i.x,i.y),e.lineTo(s.x,s.y),e.stroke(),Math.atan2(n.y,n.x));e.fillStyle=r,qb.draw(e,{type:"arrow",point:s,angle:o,length:a}),xh(e).call(e)}}}]),t}(),C0=new Uint8Array(16);function P0(){if(k0=k0||"undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto))return k0(C0);throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported")}var $0=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function I0(e){return"string"==typeof e&&$0.test(e)}for(var R0=[],M0=0;M0<256;++M0)R0.push((M0+256).toString(16).substr(1));function A0(e,t){var n=1<arguments.length&&void 0!==t?t:0,n=(R0[e[n+0]]+R0[e[n+1]]+R0[e[n+2]]+R0[e[n+3]]+"-"+R0[e[n+4]]+R0[e[n+5]]+"-"+R0[e[n+6]]+R0[e[n+7]]+"-"+R0[e[n+8]]+R0[e[n+9]]+"-"+R0[e[n+10]]+R0[e[n+11]]+R0[e[n+12]]+R0[e[n+13]]+R0[e[n+14]]+R0[e[n+15]]).toLowerCase();if(I0(n))return n;throw TypeError("Stringified UUID is invalid")}function F0(e,t,n){var i=(e=e||{}).random||(e.rng||P0)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){n=n||0;for(var r=0;r<16;++r)t[n+r]=i[r];return t}return A0(i)}var D0=function(){function e(){m(this,e)}return v(e,null,[{key:"getRange",value:function(e){var t,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],i=1e9,r=-1e9,o=1e9,a=-1e9;if(0<n.length)for(var s=0;s<n.length;s++)o>(t=e[n[s]]).shape.boundingBox.left&&(o=t.shape.boundingBox.left),a<t.shape.boundingBox.right&&(a=t.shape.boundingBox.right),i>t.shape.boundingBox.top&&(i=t.shape.boundingBox.top),r<t.shape.boundingBox.bottom&&(r=t.shape.boundingBox.bottom);return 1e9===o&&-1e9===a&&1e9===i&&-1e9===r&&(a=o=r=i=0),{minX:o,maxX:a,minY:i,maxY:r}}},{key:"getRangeCore",value:function(e){var t,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],i=1e9,r=-1e9,o=1e9,a=-1e9;if(0<n.length)for(var s=0;s<n.length;s++)o>(t=e[n[s]]).x&&(o=t.x),a<t.x&&(a=t.x),i>t.y&&(i=t.y),r<t.y&&(r=t.y);return 1e9===o&&-1e9===a&&1e9===i&&-1e9===r&&(a=o=r=i=0),{minX:o,maxX:a,minY:i,maxY:r}}},{key:"findCenter",value:function(e){return{x:.5*(e.maxX+e.minX),y:.5*(e.maxY+e.minY)}}},{key:"cloneOptions",value:function(e,t){var n={};return void 0===t||"node"===t?(S(n,e.options,!0),n.x=e.x,n.y=e.y,n.amountOfConnections=e.edges.length):S(n,e.options,!0),n}}]),e}();function N0(n){var i=L0();return function(){var e,t=I(n);return $(this,i?(e=I(this).constructor,j(t,arguments,e)):t.apply(this,arguments))}}function L0(){if("undefined"==typeof Reflect||!j)return!1;if(j.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(j(Boolean,[],function(){})),!0}catch(e){return!1}}var B0=function(){P(s,db);var a=N0(s);function s(e,t,n,i,r,o){return m(this,s),(e=a.call(this,e,t,n,i,r,o)).isCluster=!0,e.containedNodes={},e.containedEdges={},e}return v(s,[{key:"_openChildCluster",value:function(e){var r=this,t=this.body.nodes[e];if(void 0===this.containedNodes[e])throw new Error("node with id: "+e+" not in current cluster");if(!t.isCluster)throw new Error("node with id: "+e+" is not a cluster");delete this.containedNodes[e],C(t.edges,function(e){delete r.containedEdges[e.id]}),C(t.containedNodes,function(e,t){r.containedNodes[t]=e}),t.containedNodes={},C(t.containedEdges,function(e,t){r.containedEdges[t]=e}),t.containedEdges={},C(t.edges,function(i){C(r.edges,function(t){var e,n=T(n=t.clusteringEdgeReplacingIds).call(n,i.id);-1!==n&&(C(i.clusteringEdgeReplacingIds,function(e){t.clusteringEdgeReplacingIds.push(e),r.body.edges[e].edgeReplacedById=t.id}),Lu(e=t.clusteringEdgeReplacingIds).call(e,n,1))})}),t.edges=[]}}]),s}(),z0=function(){function n(e){var t=this;m(this,n),this.body=e,this.clusteredNodes={},this.clusteredEdges={},this.options={},this.defaultOptions={},Zn(this.options,this.defaultOptions),this.body.emitter.on("_resetData",function(){t.clusteredNodes={},t.clusteredEdges={}})}return v(n,[{key:"clusterByHubsize",value:function(e,t){void 0===e?e=this._getHubSize():"object"===b(e)&&(t=this._checkOptions(e),e=this._getHubSize());for(var n=[],i=0;i<this.body.nodeIndices.length;i++){var r=this.body.nodes[this.body.nodeIndices[i]];r.edges.length>=e&&n.push(r.id)}for(var o=0;o<n.length;o++)this.clusterByConnection(n[o],t,!0);this.body.emitter.emit("_dataChanged")}},{key:"cluster",value:function(){var n=this,i=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];if(void 0===i.joinCondition)throw new Error("Cannot call clusterByNodeData without a joinCondition function in the options.");var i=this._checkOptions(i),r={},o={};C(this.body.nodes,function(e,t){e.options&&!0===i.joinCondition(e.options)&&C((r[t]=e).edges,function(e){void 0===n.clusteredEdges[e.id]&&(o[e.id]=e)})}),this._cluster(r,o,i,e)}},{key:"clusterByEdgeCount",value:function(h,p){function e(e){var n={},t={},i=m.body.nodeIndices[e],r=m.body.nodes[i];if(void 0===b[i]){g=[];for(var o=y=0;o<r.edges.length;o++)f=r.edges[o],void 0===m.clusteredEdges[f.id]&&(f.toId!==f.fromId&&y++,g.push(f));if(y===h){for(var a=!0,s=0;s<g.length;s++){f=g[s];var l=m._getConnectedId(f,i);if(!function(e){if(void 0===p.joinCondition||null===p.joinCondition)return!0;e=D0.cloneOptions(e);return p.joinCondition(e)}(r)){a=!1;break}t[f.id]=f,n[i]=r,n[l]=m.body.nodes[l],b[i]=!0}if(0<w(n).length&&0<w(t).length&&!0===a){var c=function(){for(var e=0;e<v.length;++e)for(var t in n)if(void 0!==v[e].nodes[t])return v[e]}();if(void 0!==c){for(var u in n)void 0===c.nodes[u]&&(c.nodes[u]=n[u]);for(var d in t)void 0===c.edges[d]&&(c.edges[d]=t[d])}else v.push({nodes:n,edges:t})}}}}for(var f,g,y,m=this,t=!(2<arguments.length&&void 0!==arguments[2])||arguments[2],v=(p=this._checkOptions(p),[]),b={},n=0;n<this.body.nodeIndices.length;n++)e(n);for(var i=0;i<v.length;i++)this._cluster(v[i].nodes,v[i].edges,p,!1);!0===t&&this.body.emitter.emit("_dataChanged")}},{key:"clusterOutliers",value:function(e){this.clusterByEdgeCount(1,e,!(1<arguments.length&&void 0!==arguments[1])||arguments[1])}},{key:"clusterBridges",value:function(e){this.clusterByEdgeCount(2,e,!(1<arguments.length&&void 0!==arguments[1])||arguments[1])}},{key:"clusterByConnection",value:function(e,t){var n,i=!(2<arguments.length&&void 0!==arguments[2])||arguments[2];if(void 0===e)throw new Error("No nodeId supplied to clusterByConnection!");if(void 0===this.body.nodes[e])throw new Error("The nodeId given to clusterByConnection does not exist!");var r=this.body.nodes[e],o=(void 0===(t=this._checkOptions(t,r)).clusterNodeProperties.x&&(t.clusterNodeProperties.x=r.x),void 0===t.clusterNodeProperties.y&&(t.clusterNodeProperties.y=r.y),void 0===t.clusterNodeProperties.fixed&&(t.clusterNodeProperties.fixed={},t.clusterNodeProperties.fixed.x=r.options.fixed.x,t.clusterNodeProperties.fixed.y=r.options.fixed.y),{}),a={},s=r.id,l=D0.cloneOptions(r);o[s]=r;for(var c=0;c<r.edges.length;c++){var u,d,h=r.edges[c];void 0===this.clusteredEdges[h.id]&&(u=this._getConnectedId(h,s),void 0===this.clusteredNodes[u]&&(u!==s?void 0===t.joinCondition?(a[h.id]=h,o[u]=this.body.nodes[u]):(d=D0.cloneOptions(this.body.nodes[u]),!0===t.joinCondition(l,d)&&(a[h.id]=h,o[u]=this.body.nodes[u])):a[h.id]=h))}var p,f=au(n=w(o)).call(n,function(e){return o[e].id});for(p in o)if(Object.prototype.hasOwnProperty.call(o,p))for(var g=o[p],y=0;y<g.edges.length;y++){var m=g.edges[y];-1<T(f).call(f,this._getConnectedId(m,g.id))&&(a[m.id]=m)}this._cluster(o,a,t,i)}},{key:"_createClusterEdges",value:function(e,t,n,i){for(var r,o,a,s,l=w(e),c=[],u=0;u<l.length;u++)for(var d,h=e[d=l[u]],p=0;p<h.edges.length;p++)r=h.edges[p],void 0===this.clusteredEdges[r.id]&&(r.toId==r.fromId?t[r.id]=r:s=r.toId==d?(o=n.id,a=r.fromId):(o=r.toId,a=n.id,o),void 0===e[s]&&c.push({edge:r,fromId:a,toId:o}));for(var f=[],g=0;g<c.length;g++){var y=c[g],m=y.edge,v=function(e){for(var t=0;t<f.length;t++){var n=f[t],i=e.fromId===n.fromId&&e.toId===n.toId,r=e.fromId===n.toId&&e.toId===n.fromId;if(i||r)return n}return null}(y);null===v?(v=this._createClusteredEdge(y.fromId,y.toId,m,i),f.push(v)):v.clusteringEdgeReplacingIds.push(m.id),this.body.edges[m.id].edgeReplacedById=v.id,this._backupEdgeOptions(m),m.setOptions({physics:!1})}}},{key:"_checkOptions",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return void 0===e.clusterEdgeProperties&&(e.clusterEdgeProperties={}),void 0===e.clusterNodeProperties&&(e.clusterNodeProperties={}),e}},{key:"_cluster",value:function(e,t,n){var i,r=!(3<arguments.length&&void 0!==arguments[3])||arguments[3],o=[];for(i in e)Object.prototype.hasOwnProperty.call(e,i)&&void 0!==this.clusteredNodes[i]&&o.push(i);for(var a=0;a<o.length;++a)delete e[o[a]];if(0!=w(e).length&&(1!=w(e).length||1==n.clusterNodeProperties.allowSingleNodeCluster)){var s=S({},n.clusterNodeProperties);if(void 0!==n.processProperties){var l,c,u=[];for(l in e)Object.prototype.hasOwnProperty.call(e,l)&&(c=D0.cloneOptions(e[l]),u.push(c));var d,h,p=[];for(d in t)Object.prototype.hasOwnProperty.call(t,d)&&"clusterEdge:"!==d.substr(0,12)&&(h=D0.cloneOptions(t[d],"edge"),p.push(h));if(!(s=n.processProperties(s,u,p)))throw new Error("The processProperties function does not return properties!")}void 0===s.id&&(s.id="cluster:"+F0());var f=s.id,g=(void 0===s.label&&(s.label="cluster"),void 0),g=(void 0===s.x&&(g=this._getClusterPosition(e),s.x=g.x),void 0===s.y&&(void 0===g&&(g=this._getClusterPosition(e)),s.y=g.y),s.id=f,this.body.functions.createNode(s,B0));g.containedNodes=e,g.containedEdges=t,g.clusterEdgeProperties=n.clusterEdgeProperties,this.body.nodes[s.id]=g,this._clusterEdges(e,t,s,n.clusterEdgeProperties),!(s.id=void 0)===r&&this.body.emitter.emit("_dataChanged")}}},{key:"_backupEdgeOptions",value:function(e){void 0===this.clusteredEdges[e.id]&&(this.clusteredEdges[e.id]={physics:e.options.physics})}},{key:"_restoreEdge",value:function(e){var t=this.clusteredEdges[e.id];void 0!==t&&(e.setOptions({physics:t.physics}),delete this.clusteredEdges[e.id])}},{key:"isCluster",value:function(e){return void 0!==this.body.nodes[e]?!0===this.body.nodes[e].isCluster:(console.error("Node does not exist."),!1)}},{key:"_getClusterPosition",value:function(e){for(var t,n=w(e),i=e[n[0]].x,r=e[n[0]].x,o=e[n[0]].y,a=e[n[0]].y,s=1;s<n.length;s++)i=(t=e[n[s]]).x<i?t.x:i,r=t.x>r?t.x:r,o=t.y<o?t.y:o,a=t.y>a?t.y:a;return{x:.5*(i+r),y:.5*(o+a)}}},{key:"openCluster",value:function(e,t){var n=!(2<arguments.length&&void 0!==arguments[2])||arguments[2];if(void 0===e)throw new Error("No clusterNodeId supplied to openCluster.");var i=this.body.nodes[e];if(void 0===i)throw new Error("The clusterNodeId supplied to openCluster does not exist.");if(!0!==i.isCluster||void 0===i.containedNodes||void 0===i.containedEdges)throw new Error("The node:"+e+" is not a valid cluster.");var r=this.findNode(e),o=T(r).call(r,e)-1;if(0<=o)return r=r[o],this.body.nodes[r]._openChildCluster(e),delete this.body.nodes[e],void(!0===n&&this.body.emitter.emit("_dataChanged"));var a,s,l=i.containedNodes,c=i.containedEdges;if(void 0!==t&&void 0!==t.releaseFunction&&"function"==typeof t.releaseFunction){var u,d,h={},o={x:i.x,y:i.y};for(u in l)Object.prototype.hasOwnProperty.call(l,u)&&(d=this.body.nodes[u],h[u]={x:d.x,y:d.y});var p,f,g=t.releaseFunction(o,h);for(p in l)Object.prototype.hasOwnProperty.call(l,p)&&(f=this.body.nodes[p],void 0!==g[p]&&(f.x=(void 0===g[p].x?i:g[p]).x,f.y=(void 0===g[p].y?i:g[p]).y))}else C(l,function(e){!1===e.options.fixed.x&&(e.x=i.x),!1===e.options.fixed.y&&(e.y=i.y)});for(a in l)Object.prototype.hasOwnProperty.call(l,a)&&((s=this.body.nodes[a]).vx=i.vx,s.vy=i.vy,s.setOptions({physics:!0}),delete this.clusteredNodes[a]);for(var y=[],m=0;m<i.edges.length;m++)y.push(i.edges[m]);for(var v,b=0;b<y.length;b++){for(var x=y[b],w=this._getConnectedId(x,e),_=this.clusteredNodes[w],S=0;S<x.clusteringEdgeReplacingIds.length;S++){var O,E,k,j=x.clusteringEdgeReplacingIds[S],j=this.body.edges[j];void 0!==j&&(void 0!==_?(delete c[((O=this.body.nodes[_.clusterId]).containedEdges[j.id]=j).id],E=j.fromId,k=j.toId,j.toId==w?k=_.clusterId:E=_.clusterId,this._createClusteredEdge(E,k,j,O.clusterEdgeProperties,{hidden:!1,physics:!0})):this._restoreEdge(j))}x.remove()}for(v in c)Object.prototype.hasOwnProperty.call(c,v)&&this._restoreEdge(c[v]);delete this.body.nodes[e],!0===n&&this.body.emitter.emit("_dataChanged")}},{key:"getNodesInCluster",value:function(e){var t=[];if(!0===this.isCluster(e)){var n,i=this.body.nodes[e].containedNodes;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&t.push(this.body.nodes[n].id)}return t}},{key:"findNode",value:function(e){for(var t,n=[],i=0;void 0!==this.clusteredNodes[e]&&i<100;){if(void 0===(t=this.body.nodes[e]))return[];n.push(t.id),e=this.clusteredNodes[e].clusterId,i++}return void 0===(t=this.body.nodes[e])?[]:(n.push(t.id),ku(n).call(n),n)}},{key:"updateClusteredNode",value:function(e,t){if(void 0===e)throw new Error("No clusteredNodeId supplied to updateClusteredNode.");if(void 0===t)throw new Error("No newOptions supplied to updateClusteredNode.");if(void 0===this.body.nodes[e])throw new Error("The clusteredNodeId supplied to updateClusteredNode does not exist.");this.body.nodes[e].setOptions(t),this.body.emitter.emit("_dataChanged")}},{key:"updateEdge",value:function(e,t){if(void 0===e)throw new Error("No startEdgeId supplied to updateEdge.");if(void 0===t)throw new Error("No newOptions supplied to updateEdge.");if(void 0===this.body.edges[e])throw new Error("The startEdgeId supplied to updateEdge does not exist.");for(var n=this.getClusteredEdges(e),i=0;i<n.length;i++)this.body.edges[n[i]].setOptions(t);this.body.emitter.emit("_dataChanged")}},{key:"getClusteredEdges",value:function(e){for(var t=[],n=0;void 0!==e&&void 0!==this.body.edges[e]&&n<100;)t.push(this.body.edges[e].id),e=this.body.edges[e].edgeReplacedById,n++;return ku(t).call(t),t}},{key:"getBaseEdge",value:function(e){return this.getBaseEdges(e)[0]}},{key:"getBaseEdges",value:function(e){for(var t=[e],n=[],i=[],r=0;0<t.length&&r<100;){var o=t.pop();if(void 0!==o){var a=this.body.edges[o];if(void 0!==a){r++;var s=a.clusteringEdgeReplacingIds;if(void 0===s)i.push(o);else for(var l=0;l<s.length;++l){var c=s[l];-1===T(t).call(t,s)&&-1===T(n).call(n,s)&&t.push(c)}n.push(o)}}}return i}},{key:"_getConnectedId",value:function(e,t){return e.toId!=t?e.toId:(e.fromId,e.fromId)}},{key:"_getHubSize",value:function(){for(var e=0,t=0,n=0,i=0,r=0;r<this.body.nodeIndices.length;r++){var o=this.body.nodes[this.body.nodeIndices[r]];o.edges.length>i&&(i=o.edges.length),e+=o.edges.length,t+=Math.pow(o.edges.length,2),n+=1}e/=n;var a=(t/=n)-Math.pow(e,2),a=Math.sqrt(a),a=Math.floor(e+2*a);return a=i<a?i:a}},{key:"_createClusteredEdge",value:function(e,t,n,i,r){var o=D0.cloneOptions(n,"edge"),i=(S(o,i),o.from=e,o.to=t,o.id="clusterEdge:"+F0(),void 0!==r&&S(o,r),this.body.functions.createEdge(o));return i.clusteringEdgeReplacingIds=[n.id],i.connect(),this.body.edges[i.id]=i}},{key:"_clusterEdges",value:function(e,t,n,i){var r,o,a,s,l;if(t instanceof p0&&((r={})[(o=t).id]=o,t=r),e instanceof db&&((o={})[(r=e).id]=r,e=o),null==n)throw new Error("_clusterEdges: parameter clusterNode required");for(a in void 0===i&&(i=n.clusterEdgeProperties),this._createClusterEdges(e,t,n,i),t)Object.prototype.hasOwnProperty.call(t,a)&&void 0!==this.body.edges[a]&&(s=this.body.edges[a],this._backupEdgeOptions(s),s.setOptions({physics:!1}));for(l in e)Object.prototype.hasOwnProperty.call(e,l)&&(this.clusteredNodes[l]={clusterId:n.id,node:this.body.nodes[l]},this.body.nodes[l].setOptions({physics:!1}))}},{key:"_getClusterNodeForNode",value:function(e){if(void 0!==e){e=this.clusteredNodes[e];if(void 0!==e){e=e.clusterId;if(void 0!==e)return this.body.nodes[e]}}}},{key:"_filter",value:function(e,t){var n=[];return C(e,function(e){t(e)&&n.push(e)}),n}},{key:"_updateState",value:function(){var e,o=this,n=[],a={},t=function(t){C(o.body.nodes,function(e){!0===e.isCluster&&t(e)})};for(e in this.clusteredNodes)Object.prototype.hasOwnProperty.call(this.clusteredNodes,e)&&void 0===this.body.nodes[e]&&n.push(e);t(function(e){for(var t=0;t<n.length;t++)delete e.containedNodes[n[t]]});for(var i=0;i<n.length;i++)delete this.clusteredNodes[n[i]];C(this.clusteredEdges,function(e){var t=o.body.edges[e];void 0!==t&&t.endPointsValid()||(a[e]=e)}),t(function(e){C(e.containedEdges,function(e,t){e.endPointsValid()||a[t]||(a[t]=t)})}),C(this.body.edges,function(e,t){var n,i=!0,r=e.clusteringEdgeReplacingIds;void 0!==r&&(n=0,C(r,function(e){e=o.body.edges[e];void 0!==e&&e.endPointsValid()&&(n+=1)}),i=0<n),e.endPointsValid()&&i||(a[t]=t)}),t(function(i){C(a,function(n){delete i.containedEdges[n],C(i.edges,function(e,t){e.id===n?i.edges[t]=null:e.clusteringEdgeReplacingIds=o._filter(e.clusteringEdgeReplacingIds,function(e){return!a[e]})}),i.edges=o._filter(i.edges,function(e){return null!==e})})}),C(a,function(e){delete o.clusteredEdges[e]}),C(a,function(e){delete o.body.edges[e]});C(w(this.body.edges),function(e){var t=o.body.edges[e],n=o._isClusteredNode(t.fromId)||o._isClusteredNode(t.toId);n!==o._isClusteredEdge(t.id)&&(n?(void 0!==(n=o._getClusterNodeForNode(t.fromId))&&o._clusterEdges(o.body.nodes[t.fromId],t,n),void 0!==(n=o._getClusterNodeForNode(t.toId))&&o._clusterEdges(o.body.nodes[t.toId],t,n)):(delete o._clusterEdges[e],o._restoreEdge(t)))});for(var r=!1,s=!0;s;)!function(){var i=[];t(function(e){var t=w(e.containedNodes).length,n=!0===e.options.allowSingleNodeCluster;(n&&t<1||!n&&t<2)&&i.push(e.id)});for(var e=0;e<i.length;++e)o.openCluster(i[e],{},!1);s=0<i.length,r=r||s}();r&&this._updateState()}},{key:"_isClusteredNode",value:function(e){return void 0!==this.clusteredNodes[e]}},{key:"_isClusteredEdge",value:function(e){return void 0!==this.clusteredEdges[e]}}]),n}();function H0(e,t){var n,i=void 0!==Jc&&os(e)||e["@@iterator"];if(!i){if(x(e)||(i=W0(e))||t&&e&&"number"==typeof e.length)return i&&(e=i),n=0,{s:t=function(){},n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,a=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return o=e.done,e},e:function(e){a=!0,r=e},f:function(){try{o||null==i.return||i.return()}finally{if(a)throw r}}}}function W0(e,t){if(e){if("string"==typeof e)return V0(e,t);var n=tu(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Ma(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?V0(e,t):void 0}}function V0(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function U0(){var e;void 0!==window&&(e=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame),window.requestAnimationFrame=void 0===e?function(e){e()}:e}var q0=function(){function n(e,t){m(this,n),U0(),this.body=e,this.canvas=t,this.redrawRequested=!1,this.renderTimer=void 0,this.requiresTimeout=!0,this.renderingActive=!1,this.renderRequests=0,this.allowRedraw=!0,this.dragging=!1,this.zooming=!1,this.options={},this.defaultOptions={hideEdgesOnDrag:!1,hideEdgesOnZoom:!1,hideNodesOnDrag:!1},Zn(this.options,this.defaultOptions),this._determineBrowserMethod(),this.bindEventListeners()}return v(n,[{key:"bindEventListeners",value:function(){var e,t=this;this.body.emitter.on("dragStart",function(){t.dragging=!0}),this.body.emitter.on("dragEnd",function(){t.dragging=!1}),this.body.emitter.on("zoom",function(){t.zooming=!0,window.clearTimeout(t.zoomTimeoutId),t.zoomTimeoutId=ph(function(){var e;t.zooming=!1,h(e=t._requestRedraw).call(e,t)()},250)}),this.body.emitter.on("_resizeNodes",function(){t._resizeNodes()}),this.body.emitter.on("_redraw",function(){!1===t.renderingActive&&t._redraw()}),this.body.emitter.on("_blockRedraw",function(){t.allowRedraw=!1}),this.body.emitter.on("_allowRedraw",function(){t.allowRedraw=!0,t.redrawRequested=!1}),this.body.emitter.on("_requestRedraw",h(e=this._requestRedraw).call(e,this)),this.body.emitter.on("_startRendering",function(){t.renderRequests+=1,t.renderingActive=!0,t._startRendering()}),this.body.emitter.on("_stopRendering",function(){--t.renderRequests,t.renderingActive=0<t.renderRequests,t.renderTimer=void 0}),this.body.emitter.on("destroy",function(){t.renderRequests=0,t.allowRedraw=!1,!(t.renderingActive=!1)===t.requiresTimeout?clearTimeout(t.renderTimer):window.cancelAnimationFrame(t.renderTimer),t.body.emitter.off()})}},{key:"setOptions",value:function(e){void 0!==e&&Pf(["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag"],this.options,e)}},{key:"_requestNextFrame",value:function(e,t){var n,i;if("undefined"!=typeof window)return i=window,!0===this.requiresTimeout?n=ph(e,t):i.requestAnimationFrame&&(n=i.requestAnimationFrame(e)),n}},{key:"_startRendering",value:function(){var e;!0===this.renderingActive&&void 0===this.renderTimer&&(this.renderTimer=this._requestNextFrame(h(e=this._renderStep).call(e,this),this.simulationInterval))}},{key:"_renderStep",value:function(){!0===this.renderingActive&&(!(this.renderTimer=void 0)===this.requiresTimeout&&this._startRendering(),this._redraw(),!1===this.requiresTimeout&&this._startRendering())}},{key:"redraw",value:function(){this.body.emitter.emit("setSize"),this._redraw()}},{key:"_requestRedraw",value:function(){var e=this;!0!==this.redrawRequested&&!1===this.renderingActive&&!0===this.allowRedraw&&(this.redrawRequested=!0,this._requestNextFrame(function(){e._redraw(!1)},0))}},{key:"_redraw",value:function(){var e,t,n,i,r,o=0<arguments.length&&void 0!==arguments[0]&&arguments[0];!0===this.allowRedraw&&(this.body.emitter.emit("initRedraw"),this.redrawRequested=!1,e={drawExternalLabels:null},0!==this.canvas.frame.canvas.width&&0!==this.canvas.frame.canvas.height||this.canvas.setSize(),this.canvas.setTransform(),t=this.canvas.getContext(),n=this.canvas.frame.canvas.clientWidth,i=this.canvas.frame.canvas.clientHeight,t.clearRect(0,0,n,i),0!==this.canvas.frame.clientWidth&&(t.save(),t.translate(this.body.view.translation.x,this.body.view.translation.y),t.scale(this.body.view.scale,this.body.view.scale),t.beginPath(),this.body.emitter.emit("beforeDrawing",t),t.closePath(),!1===o&&(!1===this.dragging||!0===this.dragging&&!1===this.options.hideEdgesOnDrag)&&(!1===this.zooming||!0===this.zooming&&!1===this.options.hideEdgesOnZoom)&&this._drawEdges(t),(!1===this.dragging||!0===this.dragging&&!1===this.options.hideNodesOnDrag)&&(r=this._drawNodes(t,o).drawExternalLabels,e.drawExternalLabels=r),!1===o&&(!1===this.dragging||!0===this.dragging&&!1===this.options.hideEdgesOnDrag)&&(!1===this.zooming||!0===this.zooming&&!1===this.options.hideEdgesOnZoom)&&this._drawArrows(t),null!=e.drawExternalLabels&&e.drawExternalLabels(),!1===o&&this._drawSelectionBox(t),t.beginPath(),this.body.emitter.emit("afterDrawing",t),t.closePath(),t.restore(),!0===o&&t.clearRect(0,0,n,i)))}},{key:"_resizeNodes",value:function(){this.canvas.setTransform();var e,t,n=this.canvas.getContext(),i=(n.save(),n.translate(this.body.view.translation.x,this.body.view.translation.y),n.scale(this.body.view.scale,this.body.view.scale),this.body.nodes);for(t in i)Object.prototype.hasOwnProperty.call(i,t)&&((e=i[t]).resize(n),e.updateBoundingBox(n,e.selected));n.restore()}},{key:"_drawNodes",value:function(e){for(var t,n,i=1<arguments.length&&void 0!==arguments[1]&&arguments[1],r=this.body.nodes,o=this.body.nodeIndices,a=[],s=[],l=this.canvas.DOMtoCanvas({x:-20,y:-20}),c=this.canvas.DOMtoCanvas({x:this.canvas.frame.canvas.clientWidth+20,y:this.canvas.frame.canvas.clientHeight+20}),u={top:l.y,left:l.x,bottom:c.y,right:c.x},d=[],h=0;h<o.length;h++)(n=r[o[h]]).hover?s.push(o[h]):n.isSelected()?a.push(o[h]):!0===i?null!=(t=n.draw(e)).drawExternalLabel&&d.push(t.drawExternalLabel):!0===n.isBoundingBoxOverlappingWith(u)?null!=(t=n.draw(e)).drawExternalLabel&&d.push(t.drawExternalLabel):n.updateBoundingBox(e,n.selected);for(var p=a.length,f=s.length,g=0;g<p;g++){var y=(n=r[a[g]]).draw(e);null!=y.drawExternalLabel&&d.push(y.drawExternalLabel)}for(g=0;g<f;g++){var m=(n=r[s[g]]).draw(e);null!=m.drawExternalLabel&&d.push(m.drawExternalLabel)}return{drawExternalLabels:function(){var e,t=H0(d);try{for(t.s();!(e=t.n()).done;)(0,e.value)()}catch(e){t.e(e)}finally{t.f()}}}}},{key:"_drawEdges",value:function(e){for(var t=this.body.edges,n=this.body.edgeIndices,i=0;i<n.length;i++){var r=t[n[i]];!0===r.connected&&r.draw(e)}}},{key:"_drawArrows",value:function(e){for(var t=this.body.edges,n=this.body.edgeIndices,i=0;i<n.length;i++){var r=t[n[i]];!0===r.connected&&r.drawArrows(e)}}},{key:"_determineBrowserMethod",value:function(){var e;"undefined"!=typeof window?(e=navigator.userAgent.toLowerCase(),this.requiresTimeout=!1,(-1!=T(e).call(e,"msie 9.0")||-1!=T(e).call(e,"safari")&&T(e).call(e,"chrome")<=-1)&&(this.requiresTimeout=!0)):this.requiresTimeout=!0}},{key:"_drawSelectionBox",value:function(e){var t,n;this.body.selectionBox.show?(e.beginPath(),t=this.body.selectionBox.position.end.x-this.body.selectionBox.position.start.x,n=this.body.selectionBox.position.end.y-this.body.selectionBox.position.start.y,e.rect(this.body.selectionBox.position.start.x,this.body.selectionBox.position.start.y,t,n),e.fillStyle="rgba(151, 194, 252, 0.2)",e.fillRect(this.body.selectionBox.position.start.x,this.body.selectionBox.position.start.y,t,n),e.strokeStyle="rgba(151, 194, 252, 1)",e.stroke()):e.closePath()}}]),n}(),G0=r.setInterval;function K0(e,t){t.inputHandler=function(e){e.isFirst&&t(e)},e.on("hammer.input",t.inputHandler)}function Y0(e,t){t.inputHandler=function(e){e.isFinal&&t(e)},e.on("hammer.input",t.inputHandler)}var J0=function(){function t(e){m(this,t),this.body=e,this.pixelRatio=1,this.cameraState={},this.initialized=!1,this.canvasViewCenter={},this._cleanupCallbacks=[],this.options={},this.defaultOptions={autoResize:!0,height:"100%",width:"100%"},Zn(this.options,this.defaultOptions),this.bindEventListeners()}return v(t,[{key:"bindEventListeners",value:function(){var e,t=this;this.body.emitter.once("resize",function(e){0!==e.width&&(t.body.view.translation.x=.5*e.width),0!==e.height&&(t.body.view.translation.y=.5*e.height)}),this.body.emitter.on("setSize",h(e=this.setSize).call(e,this)),this.body.emitter.on("destroy",function(){t.hammerFrame.destroy(),t.hammer.destroy(),t._cleanUp()})}},{key:"setOptions",value:function(e){var t,n,i,r,o=this;void 0!==e&&Pf(["width","height","autoResize"],this.options,e),this._cleanUp(),!0===this.options.autoResize&&(window.ResizeObserver?(t=new ResizeObserver(function(){!0===o.setSize()&&o.body.emitter.emit("_requestRedraw")}),n=this.frame,t.observe(n),this._cleanupCallbacks.push(function(){t.unobserve(n)})):(i=G0(function(){!0===o.setSize()&&o.body.emitter.emit("_requestRedraw")},1e3),this._cleanupCallbacks.push(function(){clearInterval(i)})),r=h(e=this._onResize).call(e,this),Ff(window,"resize",r),this._cleanupCallbacks.push(function(){Df(window,"resize",r)}))}},{key:"_cleanUp",value:function(){var e;_(e=ku(e=Lu(e=this._cleanupCallbacks).call(e,0)).call(e)).call(e,function(e){try{e()}catch(e){console.error(e)}})}},{key:"_onResize",value:function(){this.setSize(),this.body.emitter.emit("_redraw")}},{key:"_getCameraState",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.pixelRatio;!0===this.initialized&&(this.cameraState.previousWidth=this.frame.canvas.width/e,this.cameraState.previousHeight=this.frame.canvas.height/e,this.cameraState.scale=this.body.view.scale,this.cameraState.position=this.DOMtoCanvas({x:.5*this.frame.canvas.width/e,y:.5*this.frame.canvas.height/e}))}},{key:"_setCameraState",value:function(){var e,t,n;void 0!==this.cameraState.scale&&0!==this.frame.canvas.clientWidth&&0!==this.frame.canvas.clientHeight&&0!==this.pixelRatio&&0<this.cameraState.previousWidth&&0<this.cameraState.previousHeight&&(e=this.frame.canvas.width/this.pixelRatio/this.cameraState.previousWidth,t=this.frame.canvas.height/this.pixelRatio/this.cameraState.previousHeight,n=this.cameraState.scale,1!=e&&1!=t?n=.5*this.cameraState.scale*(e+t):1!=e?n=this.cameraState.scale*e:1!=t&&(n=this.cameraState.scale*t),this.body.view.scale=n,t=(e=this.DOMtoCanvas({x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight})).x-this.cameraState.position.x,n=e.y-this.cameraState.position.y,this.body.view.translation.x+=t*this.body.view.scale,this.body.view.translation.y+=n*this.body.view.scale)}},{key:"_prepareValue",value:function(e){if("number"==typeof e)return e+"px";if("string"==typeof e){if(-1!==T(e).call(e,"%")||-1!==T(e).call(e,"px"))return e;if(-1===T(e).call(e,"%"))return e+"px"}throw new Error("Could not use the value supplied for width or height:"+e)}},{key:"_create",value:function(){for(;this.body.container.hasChildNodes();)this.body.container.removeChild(this.body.container.firstChild);var e;this.frame=document.createElement("div"),this.frame.className="vis-network",this.frame.style.position="relative",this.frame.style.overflow="hidden",this.frame.tabIndex=0,this.frame.canvas=document.createElement("canvas"),this.frame.canvas.style.position="relative",this.frame.appendChild(this.frame.canvas),this.frame.canvas.getContext?(this._setPixelRatio(),this.setTransform()):((e=document.createElement("DIV")).style.color="red",e.style.fontWeight="bold",e.style.padding="10px",e.innerText="Error: your browser does not support HTML canvas",this.frame.canvas.appendChild(e)),this.body.container.appendChild(this.frame),this.body.view.scale=1,this.body.view.translation={x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight},this._bindHammer()}},{key:"_bindHammer",value:function(){var t=this;void 0!==this.hammer&&this.hammer.destroy(),this.drag={},this.pinch={},this.hammer=new sg(this.frame.canvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.get("pan").set({threshold:5,direction:sg.DIRECTION_ALL}),K0(this.hammer,function(e){t.body.eventListeners.onTouch(e)}),this.hammer.on("tap",function(e){t.body.eventListeners.onTap(e)}),this.hammer.on("doubletap",function(e){t.body.eventListeners.onDoubleTap(e)}),this.hammer.on("press",function(e){t.body.eventListeners.onHold(e)}),this.hammer.on("panstart",function(e){t.body.eventListeners.onDragStart(e)}),this.hammer.on("panmove",function(e){t.body.eventListeners.onDrag(e)}),this.hammer.on("panend",function(e){t.body.eventListeners.onDragEnd(e)}),this.hammer.on("pinch",function(e){t.body.eventListeners.onPinch(e)}),this.frame.canvas.addEventListener("wheel",function(e){t.body.eventListeners.onMouseWheel(e)}),this.frame.canvas.addEventListener("mousemove",function(e){t.body.eventListeners.onMouseMove(e)}),this.frame.canvas.addEventListener("contextmenu",function(e){t.body.eventListeners.onContext(e)}),this.hammerFrame=new sg(this.frame),Y0(this.hammerFrame,function(e){t.body.eventListeners.onRelease(e)})}},{key:"setSize",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.options.width,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.options.height,e=this._prepareValue(e),t=this._prepareValue(t),n=!1,i=this.frame.canvas.width,r=this.frame.canvas.height,o=this.pixelRatio;return this._setPixelRatio(),e!=this.options.width||t!=this.options.height||this.frame.style.width!=e||this.frame.style.height!=t?(this._getCameraState(o),this.frame.style.width=e,this.frame.style.height=t,this.frame.canvas.style.width="100%",this.frame.canvas.style.height="100%",this.frame.canvas.width=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),this.frame.canvas.height=Math.round(this.frame.canvas.clientHeight*this.pixelRatio),this.options.width=e,this.options.height=t,this.canvasViewCenter={x:.5*this.frame.clientWidth,y:.5*this.frame.clientHeight},n=!0):(e=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),t=Math.round(this.frame.canvas.clientHeight*this.pixelRatio),this.frame.canvas.width===e&&this.frame.canvas.height===t||this._getCameraState(o),this.frame.canvas.width!==e&&(this.frame.canvas.width=e,n=!0),this.frame.canvas.height!==t&&(this.frame.canvas.height=t,n=!0)),!0===n&&(this.body.emitter.emit("resize",{width:Math.round(this.frame.canvas.width/this.pixelRatio),height:Math.round(this.frame.canvas.height/this.pixelRatio),oldWidth:Math.round(i/this.pixelRatio),oldHeight:Math.round(r/this.pixelRatio)}),this._setCameraState()),this.initialized=!0,n}},{key:"getContext",value:function(){return this.frame.canvas.getContext("2d")}},{key:"_determinePixelRatio",value:function(){var e=this.getContext();if(void 0===e)throw new Error("Could not get canvax context");var t=1,e=("undefined"!=typeof window&&(t=window.devicePixelRatio||1),e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1);return t/e}},{key:"_setPixelRatio",value:function(){this.pixelRatio=this._determinePixelRatio()}},{key:"setTransform",value:function(){var e=this.getContext();if(void 0===e)throw new Error("Could not get canvax context");e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}},{key:"_XconvertDOMtoCanvas",value:function(e){return(e-this.body.view.translation.x)/this.body.view.scale}},{key:"_XconvertCanvasToDOM",value:function(e){return e*this.body.view.scale+this.body.view.translation.x}},{key:"_YconvertDOMtoCanvas",value:function(e){return(e-this.body.view.translation.y)/this.body.view.scale}},{key:"_YconvertCanvasToDOM",value:function(e){return e*this.body.view.scale+this.body.view.translation.y}},{key:"canvasToDOM",value:function(e){return{x:this._XconvertCanvasToDOM(e.x),y:this._YconvertCanvasToDOM(e.y)}}},{key:"DOMtoCanvas",value:function(e){return{x:this._XconvertDOMtoCanvas(e.x),y:this._YconvertDOMtoCanvas(e.y)}}}]),t}();function X0(e,t){e=Zn({nodes:t,minZoomLevel:Number.MIN_VALUE,maxZoomLevel:1},null!=e?e:{});if(!x(e.nodes))throw new TypeError("Nodes has to be an array of ids.");if(0===e.nodes.length&&(e.nodes=t),!("number"==typeof e.minZoomLevel&&0<e.minZoomLevel))throw new TypeError("Min zoom level has to be a number higher than zero.");if("number"==typeof e.maxZoomLevel&&e.minZoomLevel<=e.maxZoomLevel)return e;throw new TypeError("Max zoom level has to be a number higher than min zoom level.")}var Q0=function(){function i(e,t){var n=this;m(this,i),this.body=e,this.canvas=t,this.animationSpeed=1/this.renderRefreshRate,this.animationEasingFunction="easeInOutQuint",this.easingTime=0,this.sourceScale=0,this.targetScale=0,this.sourceTranslation=0,this.targetTranslation=0,this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0,this.touchTime=0,this.viewFunction=void 0,this.body.emitter.on("fit",h(e=this.fit).call(e,this)),this.body.emitter.on("animationFinished",function(){n.body.emitter.emit("_stopRendering")}),this.body.emitter.on("unlockNode",h(t=this.releaseNode).call(t,this))}return v(i,[{key:"setOptions",value:function(){this.options=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}}},{key:"fit",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1],n=(e=X0(e,this.body.nodeIndices),this.canvas.frame.canvas.clientWidth),i=this.canvas.frame.canvas.clientHeight;if(0===n||0===i)s=1,a=D0.getRange(this.body.nodes,e.nodes);else if(!0===t){var r,o=0;for(r in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,r)&&!0===this.body.nodes[r].predefinedPosition&&(o+=1);if(o>.5*this.body.nodeIndices.length)return void this.fit(e,!1);var a=D0.getRange(this.body.nodes,e.nodes),s=12.662/(this.body.nodeIndices.length+7.4147)+.0964822;s*=Math.min(n/600,i/600)}else{this.body.emitter.emit("_resizeNodes"),a=D0.getRange(this.body.nodes,e.nodes);t=n/(1.1*Math.abs(a.maxX-a.minX)),n=i/(1.1*Math.abs(a.maxY-a.minY));s=t<=n?t:n}s>e.maxZoomLevel?s=e.maxZoomLevel:s<e.minZoomLevel&&(s=e.minZoomLevel);i={position:D0.findCenter(a),scale:s,animation:e.animation};this.moveTo(i)}},{key:"focus",value:function(e){var t,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};void 0!==this.body.nodes[e]?(t={x:this.body.nodes[e].x,y:this.body.nodes[e].y},n.position=t,n.lockedOnNode=e,this.moveTo(n)):console.error("Node: "+e+" cannot be found.")}},{key:"moveTo",value:function(e){if(void 0===e)e={};else{if(null!=e.offset){if(null!=e.offset.x){if(e.offset.x=+e.offset.x,!hm(e.offset.x))throw new TypeError('The option "offset.x" has to be a finite number.')}else e.offset.x=0;if(null!=e.offset.y){if(e.offset.y=+e.offset.y,!hm(e.offset.y))throw new TypeError('The option "offset.y" has to be a finite number.')}else e.offset.x=0}else e.offset={x:0,y:0};if(null!=e.position){if(null!=e.position.x){if(e.position.x=+e.position.x,!hm(e.position.x))throw new TypeError('The option "position.x" has to be a finite number.')}else e.position.x=0;if(null!=e.position.y){if(e.position.y=+e.position.y,!hm(e.position.y))throw new TypeError('The option "position.y" has to be a finite number.')}else e.position.x=0}else e.position=this.getViewPosition();if(null!=e.scale){if(e.scale=+e.scale,!(0<e.scale))throw new TypeError('The option "scale" has to be a number greater than zero.')}else e.scale=this.body.view.scale;void 0===e.animation&&(e.animation={duration:0}),!1===e.animation&&(e.animation={duration:0}),!0===e.animation&&(e.animation={}),void 0===e.animation.duration&&(e.animation.duration=1e3),void 0===e.animation.easingFunction&&(e.animation.easingFunction="easeInOutQuad"),this.animateView(e)}}},{key:"animateView",value:function(e){var t,n;void 0!==e&&(this.animationEasingFunction=e.animation.easingFunction,this.releaseNode(),!0===e.locked&&(this.lockedOnNodeId=e.lockedOnNode,this.lockedOnNodeOffset=e.offset),0!=this.easingTime&&this._transitionRedraw(!0),this.sourceScale=this.body.view.scale,this.sourceTranslation=this.body.view.translation,this.targetScale=e.scale,this.body.view.scale=this.targetScale,t=(n=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight})).x-e.position.x,n=n.y-e.position.y,this.targetTranslation={x:this.sourceTranslation.x+t*this.targetScale+e.offset.x,y:this.sourceTranslation.y+n*this.targetScale+e.offset.y},0===e.animation.duration?null!=this.lockedOnNodeId?(this.viewFunction=h(t=this._lockedRedraw).call(t,this),this.body.emitter.on("initRedraw",this.viewFunction)):(this.body.view.scale=this.targetScale,this.body.view.translation=this.targetTranslation,this.body.emitter.emit("_requestRedraw")):(this.animationSpeed=1/(60*e.animation.duration*.001)||1/60,this.animationEasingFunction=e.animation.easingFunction,this.viewFunction=h(n=this._transitionRedraw).call(n,this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering")))}},{key:"_lockedRedraw",value:function(){var e=this.body.nodes[this.lockedOnNodeId].x,t=this.body.nodes[this.lockedOnNodeId].y,n=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),e=n.x-e,n=n.y-t,t=this.body.view.translation,e={x:t.x+e*this.body.view.scale+this.lockedOnNodeOffset.x,y:t.y+n*this.body.view.scale+this.lockedOnNodeOffset.y};this.body.view.translation=e}},{key:"releaseNode",value:function(){void 0!==this.lockedOnNodeId&&void 0!==this.viewFunction&&(this.body.emitter.off("initRedraw",this.viewFunction),this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0)}},{key:"_transitionRedraw",value:function(){var e=0<arguments.length&&void 0!==arguments[0]&&arguments[0],e=(this.easingTime+=this.animationSpeed,this.easingTime=!0===e?1:this.easingTime,Xf[this.animationEasingFunction](this.easingTime));this.body.view.scale=this.sourceScale+(this.targetScale-this.sourceScale)*e,this.body.view.translation={x:this.sourceTranslation.x+(this.targetTranslation.x-this.sourceTranslation.x)*e,y:this.sourceTranslation.y+(this.targetTranslation.y-this.sourceTranslation.y)*e},1<=this.easingTime&&(this.body.emitter.off("initRedraw",this.viewFunction),this.easingTime=0,null!=this.lockedOnNodeId&&(this.viewFunction=h(e=this._lockedRedraw).call(e,this),this.body.emitter.on("initRedraw",this.viewFunction)),this.body.emitter.emit("animationFinished"))}},{key:"getScale",value:function(){return this.body.view.scale}},{key:"getViewPosition",value:function(){return this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight})}}]),i}();function Z0(e){for(var r=e&&e.preventDefault||!1,t=e&&e.container||window,i={},a={keydown:{},keyup:{}},s={},n=97;n<=122;n++)s[String.fromCharCode(n)]={code:n-97+65,shift:!1};for(n=65;n<=90;n++)s[String.fromCharCode(n)]={code:n,shift:!0};for(n=0;n<=9;n++)s[""+n]={code:48+n,shift:!1};for(n=1;n<=12;n++)s["F"+n]={code:111+n,shift:!1};for(n=0;n<=9;n++)s["num"+n]={code:96+n,shift:!1};s["num*"]={code:106,shift:!1},s["num+"]={code:107,shift:!1},s["num-"]={code:109,shift:!1},s["num/"]={code:111,shift:!1},s["num."]={code:110,shift:!1},s.left={code:37,shift:!1},s.up={code:38,shift:!1},s.right={code:39,shift:!1},s.down={code:40,shift:!1},s.space={code:32,shift:!1},s.enter={code:13,shift:!1},s.shift={code:16,shift:void 0},s.esc={code:27,shift:!1},s.backspace={code:8,shift:!1},s.tab={code:9,shift:!1},s.ctrl={code:17,shift:!1},s.alt={code:18,shift:!1},s.delete={code:46,shift:!1},s.pageup={code:33,shift:!1},s.pagedown={code:34,shift:!1},s["="]={code:187,shift:!1},s["-"]={code:189,shift:!1},s["]"]={code:221,shift:!1},s["["]={code:219,shift:!1};function o(e){c(e,"keydown")}function l(e){c(e,"keyup")}function c(e,t){if(void 0!==a[t][e.keyCode]){for(var n=a[t][e.keyCode],i=0;i<n.length;i++)(void 0===n[i].shift||1==n[i].shift&&1==e.shiftKey||0==n[i].shift&&0==e.shiftKey)&&n[i].fn(e);1==r&&e.preventDefault()}}return i.bind=function(e,t,n){if(void 0===n&&(n="keydown"),void 0===s[e])throw new Error("unsupported key: "+e);void 0===a[n][s[e].code]&&(a[n][s[e].code]=[]),a[n][s[e].code].push({fn:t,shift:s[e].shift})},i.bindAll=function(e,t){for(var n in void 0===t&&(t="keydown"),s)s.hasOwnProperty(n)&&i.bind(n,e,t)},i.getKey=function(e){for(var t in s)if(s.hasOwnProperty(t)){if(1==e.shiftKey&&1==s[t].shift&&e.keyCode==s[t].code)return t;if(0==e.shiftKey&&0==s[t].shift&&e.keyCode==s[t].code)return t;if(e.keyCode==s[t].code&&"shift"==t)return t}return"unknown key, currently not supported"},i.unbind=function(e,t,n){if(void 0===n&&(n="keydown"),void 0===s[e])throw new Error("unsupported key: "+e);if(void 0!==t){var i=[],r=a[n][s[e].code];if(void 0!==r)for(var o=0;o<r.length;o++)r[o].fn==t&&r[o].shift==s[e].shift||i.push(a[n][s[e].code][o]);a[n][s[e].code]=i}else a[n][s[e].code]=[]},i.reset=function(){a={keydown:{},keyup:{}}},i.destroy=function(){a={keydown:{},keyup:{}},t.removeEventListener("keydown",o,!0),t.removeEventListener("keyup",l,!0)},t.addEventListener("keydown",o,!0),t.addEventListener("keyup",l,!0),i}var e1=function(){function i(e,t){var n=this;m(this,i),this.body=e,this.canvas=t,this.iconsCreated=!1,this.navigationHammers=[],this.boundFunctions={},this.touchTime=0,this.activated=!1,this.body.emitter.on("activate",function(){n.activated=!0,n.configureKeyboardBindings()}),this.body.emitter.on("deactivate",function(){n.activated=!1,n.configureKeyboardBindings()}),this.body.emitter.on("destroy",function(){void 0!==n.keycharm&&n.keycharm.destroy()}),this.options={}}return v(i,[{key:"setOptions",value:function(e){void 0!==e&&(this.options=e,this.create())}},{key:"create",value:function(){!0===this.options.navigationButtons?!1===this.iconsCreated&&this.loadNavigationElements():!0===this.iconsCreated&&this.cleanNavigation(),this.configureKeyboardBindings()}},{key:"cleanNavigation",value:function(){if(0!=this.navigationHammers.length){for(var e=0;e<this.navigationHammers.length;e++)this.navigationHammers[e].destroy();this.navigationHammers=[]}this.navigationDOM&&this.navigationDOM.wrapper&&this.navigationDOM.wrapper.parentNode&&this.navigationDOM.wrapper.parentNode.removeChild(this.navigationDOM.wrapper),this.iconsCreated=!1}},{key:"loadNavigationElements",value:function(){var e=this,t=(this.cleanNavigation(),this.navigationDOM={},["up","down","left","right","zoomIn","zoomOut","zoomExtends"]),n=["_moveUp","_moveDown","_moveLeft","_moveRight","_zoomIn","_zoomOut","_fit"];this.navigationDOM.wrapper=document.createElement("div"),this.navigationDOM.wrapper.className="vis-navigation",this.canvas.frame.appendChild(this.navigationDOM.wrapper);for(var i=0;i<t.length;i++){this.navigationDOM[t[i]]=document.createElement("div"),this.navigationDOM[t[i]].className="vis-button vis-"+t[i],this.navigationDOM.wrapper.appendChild(this.navigationDOM[t[i]]);var r,o=new sg(this.navigationDOM[t[i]]);K0(o,"_fit"===n[i]?h(r=this._fit).call(r,this):h(r=this.bindToRedraw).call(r,this,n[i])),this.navigationHammers.push(o)}var a=new sg(this.canvas.frame);Y0(a,function(){e._stopMovement()}),this.navigationHammers.push(a),this.iconsCreated=!0}},{key:"bindToRedraw",value:function(e){var t;void 0===this.boundFunctions[e]&&(this.boundFunctions[e]=h(t=this[e]).call(t,this),this.body.emitter.on("initRedraw",this.boundFunctions[e]),this.body.emitter.emit("_startRendering"))}},{key:"unbindFromRedraw",value:function(e){void 0!==this.boundFunctions[e]&&(this.body.emitter.off("initRedraw",this.boundFunctions[e]),this.body.emitter.emit("_stopRendering"),delete this.boundFunctions[e])}},{key:"_fit",value:function(){700<(new Date).valueOf()-this.touchTime&&(this.body.emitter.emit("fit",{duration:700}),this.touchTime=(new Date).valueOf())}},{key:"_stopMovement",value:function(){for(var e in this.boundFunctions)Object.prototype.hasOwnProperty.call(this.boundFunctions,e)&&(this.body.emitter.off("initRedraw",this.boundFunctions[e]),this.body.emitter.emit("_stopRendering"));this.boundFunctions={}}},{key:"_moveUp",value:function(){this.body.view.translation.y+=this.options.keyboard.speed.y}},{key:"_moveDown",value:function(){this.body.view.translation.y-=this.options.keyboard.speed.y}},{key:"_moveLeft",value:function(){this.body.view.translation.x+=this.options.keyboard.speed.x}},{key:"_moveRight",value:function(){this.body.view.translation.x-=this.options.keyboard.speed.x}},{key:"_zoomIn",value:function(){var e=this.body.view.scale,t=this.body.view.scale*(1+this.options.keyboard.speed.zoom),n=this.body.view.translation,e=t/e,i=(1-e)*this.canvas.canvasViewCenter.x+n.x*e,n=(1-e)*this.canvas.canvasViewCenter.y+n.y*e;this.body.view.scale=t,this.body.view.translation={x:i,y:n},this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale,pointer:null})}},{key:"_zoomOut",value:function(){var e=this.body.view.scale,t=this.body.view.scale/(1+this.options.keyboard.speed.zoom),n=this.body.view.translation,e=t/e,i=(1-e)*this.canvas.canvasViewCenter.x+n.x*e,n=(1-e)*this.canvas.canvasViewCenter.y+n.y*e;this.body.view.scale=t,this.body.view.translation={x:i,y:n},this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale,pointer:null})}},{key:"configureKeyboardBindings",value:function(){var e,t=this;void 0!==this.keycharm&&this.keycharm.destroy(),!0===this.options.keyboard.enabled&&(!0===this.options.keyboard.bindToWindow?this.keycharm=Z0({container:window,preventDefault:!0}):this.keycharm=Z0({container:this.canvas.frame,preventDefault:!0}),this.keycharm.reset(),!0===this.activated&&(h(e=this.keycharm).call(e,"up",function(){t.bindToRedraw("_moveUp")},"keydown"),h(e=this.keycharm).call(e,"down",function(){t.bindToRedraw("_moveDown")},"keydown"),h(e=this.keycharm).call(e,"left",function(){t.bindToRedraw("_moveLeft")},"keydown"),h(e=this.keycharm).call(e,"right",function(){t.bindToRedraw("_moveRight")},"keydown"),h(e=this.keycharm).call(e,"=",function(){t.bindToRedraw("_zoomIn")},"keydown"),h(e=this.keycharm).call(e,"num+",function(){t.bindToRedraw("_zoomIn")},"keydown"),h(e=this.keycharm).call(e,"num-",function(){t.bindToRedraw("_zoomOut")},"keydown"),h(e=this.keycharm).call(e,"-",function(){t.bindToRedraw("_zoomOut")},"keydown"),h(e=this.keycharm).call(e,"[",function(){t.bindToRedraw("_zoomOut")},"keydown"),h(e=this.keycharm).call(e,"]",function(){t.bindToRedraw("_zoomIn")},"keydown"),h(e=this.keycharm).call(e,"pageup",function(){t.bindToRedraw("_zoomIn")},"keydown"),h(e=this.keycharm).call(e,"pagedown",function(){t.bindToRedraw("_zoomOut")},"keydown"),h(e=this.keycharm).call(e,"up",function(){t.unbindFromRedraw("_moveUp")},"keyup"),h(e=this.keycharm).call(e,"down",function(){t.unbindFromRedraw("_moveDown")},"keyup"),h(e=this.keycharm).call(e,"left",function(){t.unbindFromRedraw("_moveLeft")},"keyup"),h(e=this.keycharm).call(e,"right",function(){t.unbindFromRedraw("_moveRight")},"keyup"),h(e=this.keycharm).call(e,"=",function(){t.unbindFromRedraw("_zoomIn")},"keyup"),h(e=this.keycharm).call(e,"num+",function(){t.unbindFromRedraw("_zoomIn")},"keyup"),h(e=this.keycharm).call(e,"num-",function(){t.unbindFromRedraw("_zoomOut")},"keyup"),h(e=this.keycharm).call(e,"-",function(){t.unbindFromRedraw("_zoomOut")},"keyup"),h(e=this.keycharm).call(e,"[",function(){t.unbindFromRedraw("_zoomOut")},"keyup"),h(e=this.keycharm).call(e,"]",function(){t.unbindFromRedraw("_zoomIn")},"keyup"),h(e=this.keycharm).call(e,"pageup",function(){t.unbindFromRedraw("_zoomIn")},"keyup"),h(e=this.keycharm).call(e,"pagedown",function(){t.unbindFromRedraw("_zoomOut")},"keyup")))}}]),i}();function t1(e,t){var n,i=void 0!==Jc&&os(e)||e["@@iterator"];if(!i){if(x(e)||(i=n1(e))||t&&e&&"number"==typeof e.length)return i&&(e=i),n=0,{s:t=function(){},n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,a=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return o=e.done,e},e:function(e){a=!0,r=e},f:function(){try{o||null==i.return||i.return()}finally{if(a)throw r}}}}function n1(e,t){if(e){if("string"==typeof e)return i1(e,t);var n=tu(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Ma(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i1(e,t):void 0}}function i1(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var r1=function(){function i(e,t,n){m(this,i),this.body=e,this.canvas=t,this.selectionHandler=n,this.navigationHandler=new e1(e,t),this.body.eventListeners.onTap=h(n=this.onTap).call(n,this),this.body.eventListeners.onTouch=h(e=this.onTouch).call(e,this),this.body.eventListeners.onDoubleTap=h(t=this.onDoubleTap).call(t,this),this.body.eventListeners.onHold=h(n=this.onHold).call(n,this),this.body.eventListeners.onDragStart=h(e=this.onDragStart).call(e,this),this.body.eventListeners.onDrag=h(t=this.onDrag).call(t,this),this.body.eventListeners.onDragEnd=h(n=this.onDragEnd).call(n,this),this.body.eventListeners.onMouseWheel=h(e=this.onMouseWheel).call(e,this),this.body.eventListeners.onPinch=h(t=this.onPinch).call(t,this),this.body.eventListeners.onMouseMove=h(n=this.onMouseMove).call(n,this),this.body.eventListeners.onRelease=h(e=this.onRelease).call(e,this),this.body.eventListeners.onContext=h(t=this.onContext).call(t,this),this.touchTime=0,this.drag={},this.pinch={},this.popup=void 0,this.popupObj=void 0,this.popupTimer=void 0,this.body.functions.getPointer=h(n=this.getPointer).call(n,this),this.options={},this.defaultOptions={dragNodes:!0,dragView:!0,hover:!1,keyboard:{enabled:!1,speed:{x:10,y:10,zoom:.02},bindToWindow:!0,autoFocus:!0},navigationButtons:!1,tooltipDelay:300,zoomView:!0,zoomSpeed:1},Zn(this.options,this.defaultOptions),this.bindEventListeners()}return v(i,[{key:"bindEventListeners",value:function(){var e=this;this.body.emitter.on("destroy",function(){clearTimeout(e.popupTimer),delete e.body.functions.getPointer})}},{key:"setOptions",value:function(e){void 0!==e&&($f(["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag","keyboard","multiselect","selectable","selectConnectedEdges"],this.options,e),Jf(this.options,e,"keyboard"),e.tooltip&&(Zn(this.options.tooltip,e.tooltip),e.tooltip.color&&(this.options.tooltip.color=zf(e.tooltip.color)))),this.navigationHandler.setOptions(this.options)}},{key:"getPointer",value:function(e){return{x:e.x-Mf(this.canvas.frame.canvas),y:e.y-Af(this.canvas.frame.canvas)}}},{key:"onTouch",value:function(e){50<(new Date).valueOf()-this.touchTime&&(this.drag.pointer=this.getPointer(e.center),this.drag.pinched=!1,this.pinch.scale=this.body.view.scale,this.touchTime=(new Date).valueOf())}},{key:"onTap",value:function(e){var t=this.getPointer(e.center),n=this.selectionHandler.options.multiselect&&(e.changedPointers[0].ctrlKey||e.changedPointers[0].metaKey);this.checkSelectionChanges(t,n),this.selectionHandler.commitAndEmit(t,e),this.selectionHandler.generateClickEvent("click",e,t)}},{key:"onDoubleTap",value:function(e){var t=this.getPointer(e.center);this.selectionHandler.generateClickEvent("doubleClick",e,t)}},{key:"onHold",value:function(e){var t=this.getPointer(e.center),n=this.selectionHandler.options.multiselect;this.checkSelectionChanges(t,n),this.selectionHandler.commitAndEmit(t,e),this.selectionHandler.generateClickEvent("click",e,t),this.selectionHandler.generateClickEvent("hold",e,t)}},{key:"onRelease",value:function(e){var t;10<(new Date).valueOf()-this.touchTime&&(t=this.getPointer(e.center),this.selectionHandler.generateClickEvent("release",e,t),this.touchTime=(new Date).valueOf())}},{key:"onContext",value:function(e){var t=this.getPointer({x:e.clientX,y:e.clientY});this.selectionHandler.generateClickEvent("oncontext",e,t)}},{key:"checkSelectionChanges",value:function(e){!0===(1<arguments.length&&void 0!==arguments[1]&&arguments[1])?this.selectionHandler.selectAdditionalOnPoint(e):this.selectionHandler.selectOnPoint(e)}},{key:"_determineDifference",value:function(e,t){function n(e,t){for(var n=[],i=0;i<e.length;i++){var r=e[i];-1===T(t).call(t,r)&&n.push(r)}return n}return{nodes:n(e.nodes,t.nodes),edges:n(e.edges,t.edges)}}},{key:"onDragStart",value:function(e){if(!this.drag.dragging){void 0===this.drag.pointer&&this.onTouch(e);var t,n=this.selectionHandler.getNodeAt(this.drag.pointer);if(this.drag.dragging=!0,this.drag.selection=[],this.drag.translation=Zn({},this.body.view.translation),this.drag.nodeId=void 0,e.srcEvent.shiftKey&&(this.body.selectionBox.show=!0,t=this.getPointer(e.center),this.body.selectionBox.position.start={x:this.canvas._XconvertDOMtoCanvas(t.x),y:this.canvas._YconvertDOMtoCanvas(t.y)},this.body.selectionBox.position.end={x:this.canvas._XconvertDOMtoCanvas(t.x),y:this.canvas._YconvertDOMtoCanvas(t.y)}),void 0!==n&&!0===this.options.dragNodes){this.drag.nodeId=n.id,!1===n.isSelected()&&this.selectionHandler.setSelection({nodes:[n.id]}),this.selectionHandler.generateClickEvent("dragStart",e,this.drag.pointer);var i,r=t1(this.selectionHandler.getSelectedNodes());try{for(r.s();!(i=r.n()).done;){var o=i.value,a={id:o.id,node:o,x:o.x,y:o.y,xFixed:o.options.fixed.x,yFixed:o.options.fixed.y};o.options.fixed.x=!0,o.options.fixed.y=!0,this.drag.selection.push(a)}}catch(e){r.e(e)}finally{r.f()}}else this.selectionHandler.generateClickEvent("dragStart",e,this.drag.pointer,void 0,!0)}}},{key:"onDrag",value:function(e){var n=this;if(!0!==this.drag.pinched){this.body.emitter.emit("unlockNode");var t=this.getPointer(e.center),i=this.drag.selection;if(i&&i.length&&!0===this.options.dragNodes){this.selectionHandler.generateClickEvent("dragging",e,t);var r=t.x-this.drag.pointer.x,o=t.y-this.drag.pointer.y;_(i).call(i,function(e){var t=e.node;!1===e.xFixed&&(t.x=n.canvas._XconvertDOMtoCanvas(n.canvas._XconvertCanvasToDOM(e.x)+r)),!1===e.yFixed&&(t.y=n.canvas._YconvertDOMtoCanvas(n.canvas._YconvertCanvasToDOM(e.y)+o))}),this.body.emitter.emit("startSimulation")}else{if(e.srcEvent.shiftKey){if(this.selectionHandler.generateClickEvent("dragging",e,t,void 0,!0),void 0===this.drag.pointer)return void this.onDragStart(e);this.body.selectionBox.position.end={x:this.canvas._XconvertDOMtoCanvas(t.x),y:this.canvas._YconvertDOMtoCanvas(t.y)},this.body.emitter.emit("_requestRedraw")}!0!==this.options.dragView||e.srcEvent.shiftKey||(this.selectionHandler.generateClickEvent("dragging",e,t,void 0,!0),void 0===this.drag.pointer?this.onDragStart(e):(i=t.x-this.drag.pointer.x,e=t.y-this.drag.pointer.y,this.body.view.translation={x:this.drag.translation.x+i,y:this.drag.translation.y+e},this.body.emitter.emit("_requestRedraw")))}}}},{key:"onDragEnd",value:function(e){var t,n,i,r,o,a=this;this.drag.dragging=!1,this.body.selectionBox.show?(this.body.selectionBox.show=!1,o=this.body.selectionBox.position,t=Math.min(o.start.x,o.end.x),n=Math.min(o.start.y,o.end.y),i=Math.max(o.start.x,o.end.x),r=Math.max(o.start.y,o.end.y),o=hd(o=this.body.nodeIndices).call(o,function(e){e=a.body.nodes[e];return e.x>=t&&e.x<=i&&e.y>=n&&e.y<=r}),_(o).call(o,function(e){return a.selectionHandler.selectObject(a.body.nodes[e])}),o=this.getPointer(e.center),this.selectionHandler.commitAndEmit(o,e),this.selectionHandler.generateClickEvent("dragEnd",e,this.getPointer(e.center),void 0,!0),this.body.emitter.emit("_requestRedraw")):(o=this.drag.selection)&&o.length?(_(o).call(o,function(e){e.node.options.fixed.x=e.xFixed,e.node.options.fixed.y=e.yFixed}),this.selectionHandler.generateClickEvent("dragEnd",e,this.getPointer(e.center)),this.body.emitter.emit("startSimulation")):(this.selectionHandler.generateClickEvent("dragEnd",e,this.getPointer(e.center),void 0,!0),this.body.emitter.emit("_requestRedraw"))}},{key:"onPinch",value:function(e){var t=this.getPointer(e.center),e=(this.drag.pinched=!0,void 0===this.pinch.scale&&(this.pinch.scale=1),this.pinch.scale*e.scale);this.zoom(e,t)}},{key:"zoom",value:function(e,t){var n,i,r,o,a;!0===this.options.zoomView&&(n=this.body.view.scale,i=void(10<(e=e<1e-5?1e-5:e)&&(e=10)),void 0!==this.drag&&!0===this.drag.dragging&&(i=this.canvas.DOMtoCanvas(this.drag.pointer)),o=this.body.view.translation,r=(1-(a=e/n))*t.x+o.x*a,o=(1-a)*t.y+o.y*a,this.body.view.scale=e,this.body.view.translation={x:r,y:o},null!=i&&(a=this.canvas.canvasToDOM(i),this.drag.pointer.x=a.x,this.drag.pointer.y=a.y),this.body.emitter.emit("_requestRedraw"),n<e?this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale,pointer:t}):this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale,pointer:t}))}},{key:"onMouseWheel",value:function(e){var t,n;!0===this.options.zoomView&&(0!==e.deltaY&&(t=this.body.view.scale,t*=1+(e.deltaY<0?1:-1)*(.1*this.options.zoomSpeed),n=this.getPointer({x:e.clientX,y:e.clientY}),this.zoom(t,n)),e.preventDefault())}},{key:"onMouseMove",value:function(e){var t=this,n=this.getPointer({x:e.clientX,y:e.clientY}),i=!1;void 0!==this.popup&&(!1===this.popup.hidden&&this._checkHidePopup(n),!1===this.popup.hidden&&(i=!0,this.popup.setPosition(n.x+3,n.y-5),this.popup.show())),this.options.keyboard.autoFocus&&!1===this.options.keyboard.bindToWindow&&!0===this.options.keyboard.enabled&&this.canvas.frame.focus(),!1===i&&(void 0!==this.popupTimer&&(clearInterval(this.popupTimer),this.popupTimer=void 0),this.drag.dragging||(this.popupTimer=ph(function(){return t._checkShowPopup(n)},this.options.tooltipDelay))),!0===this.options.hover&&this.selectionHandler.hoverObject(e,n)}},{key:"_checkShowPopup",value:function(e){var t=this.canvas._XconvertDOMtoCanvas(e.x),n=this.canvas._YconvertDOMtoCanvas(e.y),i={left:t,top:n,right:t,bottom:n},t=void 0===this.popupObj?void 0:this.popupObj.id,r=!1,n="node";if(void 0===this.popupObj){for(var o,a=this.body.nodeIndices,s=this.body.nodes,l=[],c=0;c<a.length;c++)!0===(o=s[a[c]]).isOverlappingWith(i)&&(r=!0,void 0!==o.getTitle()&&l.push(a[c]));0<l.length&&(this.popupObj=s[l[l.length-1]],r=!0)}if(void 0===this.popupObj&&!1===r){for(var u,d=this.body.edgeIndices,h=this.body.edges,p=[],f=0;f<d.length;f++)!0===(u=h[d[f]]).isOverlappingWith(i)&&!0===u.connected&&void 0!==u.getTitle()&&p.push(d[f]);0<p.length&&(this.popupObj=h[p[p.length-1]],n="edge")}void 0!==this.popupObj?this.popupObj.id!==t&&(void 0===this.popup&&(this.popup=new lg(this.canvas.frame)),this.popup.popupTargetType=n,this.popup.popupTargetId=this.popupObj.id,this.popup.setPosition(e.x+3,e.y-5),this.popup.setText(this.popupObj.getTitle()),this.popup.show(),this.body.emitter.emit("showPopup",this.popupObj.id)):void 0!==this.popup&&(this.popup.hide(),this.body.emitter.emit("hidePopup"))}},{key:"_checkHidePopup",value:function(e){var t,n=this.selectionHandler._pointerToPositionObject(e),i=!1;"node"===this.popup.popupTargetType?void 0!==this.body.nodes[this.popup.popupTargetId]&&!0===(i=this.body.nodes[this.popup.popupTargetId].isOverlappingWith(n))&&(i=void 0!==(t=this.selectionHandler.getNodeAt(e))&&t.id===this.popup.popupTargetId):void 0===this.selectionHandler.getNodeAt(e)&&void 0!==this.body.edges[this.popup.popupTargetId]&&(i=this.body.edges[this.popup.popupTargetId].isOverlappingWith(n)),!1===i&&(this.popupObj=void 0,this.popup.hide(),this.body.emitter.emit("hidePopup"))}}]),i}();function o1(e){return e.frozen||(e.frozen=new a1)}function a1(){this.entries=[]}function s1(e,t){return v1(e.entries,function(e){return e[0]===t})}fy("Set",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},o);var l1=r.Set,Pn=i,c1=gy,u1=p.exports.getWeakData,d1=Ye,h1=H,p1=py,f1=hy,g1=u,y1=or.set,m1=or.getterFor,v1=Ur.find,b1=Ur.findIndex,x1=Pn([].splice),w1=0;function _1(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}a1.prototype={get:function(e){e=s1(this,e);if(e)return e[1]},has:function(e){return!!s1(this,e)},set:function(e,t){var n=s1(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(t){var e=b1(this.entries,function(e){return e[0]===t});return~e&&x1(this.entries,e,1),!!~e}};var S1,O1,E1,k1,j1,$i=i,at=gy,s=p.exports,n=fy,ar={getConstructor:function(e,n,i,r){function o(e,t,n){var i=s(e),r=u1(d1(t),!0);return!0===r?o1(i).set(t,n):r[i.id]=n,e}var e=e(function(e,t){p1(e,a),y1(e,{type:n,id:w1++,frozen:void 0}),null!=t&&f1(t,e[r],{that:e,AS_ENTRIES:i})}),a=e.prototype,s=m1(n);return c1(a,{delete:function(e){var t=s(this);if(!h1(e))return!1;var n=u1(e);return!0===n?o1(t).delete(e):n&&g1(n,t.id)&&delete n[t.id]},has:function(e){var t=s(this);if(!h1(e))return!1;var n=u1(e);return!0===n?o1(t).has(e):n&&g1(n,t.id)}}),c1(a,i?{get:function(e){var t,n=s(this);if(h1(e))return!0===(t=u1(e))?o1(n).get(e):t?t[n.id]:void 0},set:function(e,t){return o(this,e,t)}}:{add:function(e){return o(this,e,!0)}}),e}},T1=H,C1=bl,P1=or.enforce,gl=qi,hl=!t.ActiveXObject&&"ActiveXObject"in t,gr=n("WeakMap",_1,ar);function R(e,t,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e===t&&i:t.has(e))return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e);throw new TypeError("Cannot read private member from an object whose class did not declare it")}function $1(e,t,n,i,r){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===i?r.call(e,n):r?r.value=n:t.set(e,n)}function I1(e,t){var n,i=void 0!==Jc&&os(e)||e["@@iterator"];if(!i){if(x(e)||(i=R1(e))||t&&e&&"number"==typeof e.length)return i&&(e=i),n=0,{s:t=function(){},n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,a=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return o=e.done,e},e:function(e){a=!0,r=e},f:function(){try{o||null==i.return||i.return()}finally{if(a)throw r}}}}function R1(e,t){if(e){if("string"==typeof e)return M1(e,t);var n=tu(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Ma(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?M1(e,t):void 0}}function M1(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function A1(e,t){var n,i=new l1,r=I1(t);try{for(r.s();!(n=r.n()).done;){var o=n.value;e.has(o)||i.add(o)}}catch(e){r.e(e)}finally{r.f()}return i}gl&&hl&&(S1=ar.getConstructor(_1,"WeakMap",!0),s.enable(),fl=gr.prototype,O1=$i(fl.delete),E1=$i(fl.has),k1=$i(fl.get),j1=$i(fl.set),at(fl,{delete:function(e){var t;return T1(e)&&!C1(e)?((t=P1(this)).frozen||(t.frozen=new S1),O1(this,e)||t.frozen.delete(e)):O1(this,e)},has:function(e){var t;return T1(e)&&!C1(e)?((t=P1(this)).frozen||(t.frozen=new S1),E1(this,e)||t.frozen.has(e)):E1(this,e)},get:function(e){var t;return T1(e)&&!C1(e)?((t=P1(this)).frozen||(t.frozen=new S1),E1(this,e)?k1(this,e):t.frozen.get(e)):k1(this,e)},set:function(e,t){var n;return T1(e)&&!C1(e)?((n=P1(this)).frozen||(n.frozen=new S1),E1(this,e)?j1(this,e,t):n.frozen.set(e,t)):j1(this,e,t),this}})),Ce=r.WeakMap;var F1=function(){function e(){m(this,e),D1.set(this,new l1),N1.set(this,new l1)}return v(e,[{key:"size",get:function(){return R(this,N1,"f").size}},{key:"add",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var i=0,r=t;i<r.length;i++){var o=r[i];R(this,N1,"f").add(o)}}},{key:"delete",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var i=0,r=t;i<r.length;i++){var o=r[i];R(this,N1,"f").delete(o)}}},{key:"clear",value:function(){R(this,N1,"f").clear()}},{key:"getSelection",value:function(){return Yc(R(this,N1,"f"))}},{key:"getChanges",value:function(){return{added:Yc(A1(R(this,D1,"f"),R(this,N1,"f"))),deleted:Yc(A1(R(this,N1,"f"),R(this,D1,"f"))),previous:Yc(new l1(R(this,D1,"f"))),current:Yc(new l1(R(this,N1,"f")))}}},{key:"commit",value:function(){var e,t=this.getChanges(),n=($1(this,D1,R(this,N1,"f"),"f"),$1(this,N1,new l1(R(this,D1,"f")),"f"),I1(t.added));try{for(n.s();!(e=n.n()).done;)e.value.select()}catch(e){n.e(e)}finally{n.f()}var i,r=I1(t.deleted);try{for(r.s();!(i=r.n()).done;)i.value.unselect()}catch(e){r.e(e)}finally{r.f()}return t}}]),e}(),D1=new Ce,N1=new Ce,L1=function(){function t(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:function(){};m(this,t),G1.set(this,new F1),K1.set(this,new F1),Y1.set(this,void 0),$1(this,Y1,e,"f")}return v(t,[{key:"sizeNodes",get:function(){return R(this,G1,"f").size}},{key:"sizeEdges",get:function(){return R(this,K1,"f").size}},{key:"getNodes",value:function(){return R(this,G1,"f").getSelection()}},{key:"getEdges",value:function(){return R(this,K1,"f").getSelection()}},{key:"addNodes",value:function(){var e;(e=R(this,G1,"f")).add.apply(e,arguments)}},{key:"addEdges",value:function(){var e;(e=R(this,K1,"f")).add.apply(e,arguments)}},{key:"deleteNodes",value:function(e){R(this,G1,"f").delete(e)}},{key:"deleteEdges",value:function(e){R(this,K1,"f").delete(e)}},{key:"clear",value:function(){R(this,G1,"f").clear(),R(this,K1,"f").clear()}},{key:"commit",value:function(){for(var e,t={nodes:R(this,G1,"f").commit(),edges:R(this,K1,"f").commit()},n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return(e=R(this,Y1,"f")).call.apply(e,eu(e=[this,t]).call(e,i)),t}}]),t}();function B1(e,t){var n,i=void 0!==Jc&&os(e)||e["@@iterator"];if(!i){if(x(e)||(i=z1(e))||t&&e&&"number"==typeof e.length)return i&&(e=i),n=0,{s:t=function(){},n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,a=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return o=e.done,e},e:function(e){a=!0,r=e},f:function(){try{o||null==i.return||i.return()}finally{if(a)throw r}}}}function z1(e,t){if(e){if("string"==typeof e)return H1(e,t);var n=tu(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Ma(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?H1(e,t):void 0}}function H1(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function W1(e,t){var n=e.length,i=Q1(n/2);return n<8?V1(e,t):U1(e,W1(X1(e,0,i),t),W1(X1(e,i),t),t)}function V1(e,t){for(var n,i,r=e.length,o=1;o<r;){for(n=e[i=o];i&&0<t(e[i-1],n);)e[i]=e[--i];i!==o++&&(e[i]=n)}return e}function U1(e,t,n,i){for(var r=t.length,o=n.length,a=0,s=0;a<r||s<o;)e[a+s]=a<r&&s<o?i(t[a],n[s])<=0?t[a++]:n[s++]:a<r?t[a++]:n[s++];return e}function q1(n){return function(e,t){return void 0===t?-1:void 0===e?1:void 0!==n?+n(e,t)||0:nx(e)>nx(t)?1:-1}}var G1=new Ce,K1=new Ce,Y1=new Ce,J1=function(){function i(e,t){var n=this;m(this,i),this.body=e,this.canvas=t,this._selectionAccumulator=new L1,this.hoverObj={nodes:{},edges:{}},this.options={},this.defaultOptions={multiselect:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0},Zn(this.options,this.defaultOptions),this.body.emitter.on("_dataChanged",function(){n.updateSelection()})}return v(i,[{key:"setOptions",value:function(e){void 0!==e&&Pf(["multiselect","hoverConnectedEdges","selectable","selectConnectedEdges"],this.options,e)}},{key:"selectOnPoint",value:function(e){var t=!1;return!0===this.options.selectable&&(e=this.getNodeAt(e)||this.getEdgeAt(e),this.unselectAll(),void 0!==e&&(t=this.selectObject(e)),this.body.emitter.emit("_requestRedraw")),t}},{key:"selectAdditionalOnPoint",value:function(e){var t=!1;return!0===this.options.selectable&&void 0!==(e=this.getNodeAt(e)||this.getEdgeAt(e))&&((t=!0)===e.isSelected()?this.deselectObject(e):this.selectObject(e),this.body.emitter.emit("_requestRedraw")),t}},{key:"_initBaseEvent",value:function(e,t){var n={};return n.pointer={DOM:{x:t.x,y:t.y},canvas:this.canvas.DOMtoCanvas(t)},n.event=e,n}},{key:"generateClickEvent",value:function(e,t,n,i){var r=4<arguments.length&&void 0!==arguments[4]&&arguments[4],o=this._initBaseEvent(t,n);!0===r?(o.nodes=[],o.edges=[]):(r=this.getSelection(),o.nodes=r.nodes,o.edges=r.edges),void 0!==i&&(o.previousSelection=i),"click"==e&&(o.items=this.getClickedItems(n)),void 0!==t.controlEdge&&(o.controlEdge=t.controlEdge),this.body.emitter.emit(e,o)}},{key:"selectObject",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:this.options.selectConnectedEdges;return void 0!==e&&(e instanceof db?(!0===t&&(t=this._selectionAccumulator).addEdges.apply(t,Yc(e.edges)),this._selectionAccumulator.addNodes(e)):this._selectionAccumulator.addEdges(e),!0)}},{key:"deselectObject",value:function(e){!0===e.isSelected()&&(e.selected=!1,this._removeFromSelection(e))}},{key:"_getAllNodesOverlappingWith",value:function(e){for(var t=[],n=this.body.nodes,i=0;i<this.body.nodeIndices.length;i++){var r=this.body.nodeIndices[i];n[r].isOverlappingWith(e)&&t.push(r)}return t}},{key:"_pointerToPositionObject",value:function(e){e=this.canvas.DOMtoCanvas(e);return{left:e.x-1,top:e.y+1,right:e.x+1,bottom:e.y-1}}},{key:"getNodeAt",value:function(e){var t=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],n=this._pointerToPositionObject(e),n=this._getAllNodesOverlappingWith(n);return 0<n.length?!0===t?this.body.nodes[n[n.length-1]]:n[n.length-1]:void 0}},{key:"_getEdgesOverlappingWith",value:function(e,t){for(var n=this.body.edges,i=0;i<this.body.edgeIndices.length;i++){var r=this.body.edgeIndices[i];n[r].isOverlappingWith(e)&&t.push(r)}}},{key:"_getAllEdgesOverlappingWith",value:function(e){var t=[];return this._getEdgesOverlappingWith(e,t),t}},{key:"getEdgeAt",value:function(e){for(var t=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],n=this.canvas.DOMtoCanvas(e),i=10,r=null,o=this.body.edges,a=0;a<this.body.edgeIndices.length;a++){var s,l,c,u,d=this.body.edgeIndices[a],h=o[d];h.connected&&(s=h.from.x,l=h.from.y,c=h.to.x,u=h.to.y,(h=h.edgeType.getDistanceToEdge(s,l,c,u,n.x,n.y))<i&&(r=d,i=h))}return null!==r?!0===t?this.body.edges[r]:r:void 0}},{key:"_addToHover",value:function(e){e instanceof db?this.hoverObj.nodes[e.id]=e:this.hoverObj.edges[e.id]=e}},{key:"_removeFromSelection",value:function(e){var t;e instanceof db?(this._selectionAccumulator.deleteNodes(e),(t=this._selectionAccumulator).deleteEdges.apply(t,Yc(e.edges))):this._selectionAccumulator.deleteEdges(e)}},{key:"unselectAll",value:function(){this._selectionAccumulator.clear()}},{key:"getSelectedNodeCount",value:function(){return this._selectionAccumulator.sizeNodes}},{key:"getSelectedEdgeCount",value:function(){return this._selectionAccumulator.sizeEdges}},{key:"_hoverConnectedEdges",value:function(e){for(var t=0;t<e.edges.length;t++){var n=e.edges[t];n.hover=!0,this._addToHover(n)}}},{key:"emitBlurEvent",value:function(e,t,n){e=this._initBaseEvent(e,t);!0===n.hover&&(n.hover=!1,n instanceof db?(e.node=n.id,this.body.emitter.emit("blurNode",e)):(e.edge=n.id,this.body.emitter.emit("blurEdge",e)))}},{key:"emitHoverEvent",value:function(e,t,n){e=this._initBaseEvent(e,t),t=!1;return!1===n.hover&&(n.hover=!0,this._addToHover(n),t=!0,n instanceof db?(e.node=n.id,this.body.emitter.emit("hoverNode",e)):(e.edge=n.id,this.body.emitter.emit("hoverEdge",e))),t}},{key:"hoverObject",value:function(e,t){var n,i,r,o,a=this.getNodeAt(t),s=(void 0===a&&(a=this.getEdgeAt(t)),!1);for(n in this.hoverObj.nodes)Object.prototype.hasOwnProperty.call(this.hoverObj.nodes,n)&&(void 0===a||a instanceof db&&a.id!=n||a instanceof p0)&&(this.emitBlurEvent(e,t,this.hoverObj.nodes[n]),delete this.hoverObj.nodes[n],s=!0);for(i in this.hoverObj.edges)Object.prototype.hasOwnProperty.call(this.hoverObj.edges,i)&&(!0===s?(this.hoverObj.edges[i].hover=!1,delete this.hoverObj.edges[i]):(void 0===a||a instanceof p0&&a.id!=i||a instanceof db&&!a.hover)&&(this.emitBlurEvent(e,t,this.hoverObj.edges[i]),delete this.hoverObj.edges[i],s=!0));void 0!==a&&(r=w(this.hoverObj.edges).length,o=w(this.hoverObj.nodes).length,(s||a instanceof p0&&0===r&&0===o||a instanceof db&&0===r&&0===o)&&(s=this.emitHoverEvent(e,t,a)),a instanceof db&&!0===this.options.hoverConnectedEdges&&this._hoverConnectedEdges(a)),!0===s&&this.body.emitter.emit("_requestRedraw")}},{key:"commitWithoutEmitting",value:function(){this._selectionAccumulator.commit()}},{key:"commitAndEmit",value:function(e,t){var n=!1,i=this._selectionAccumulator.commit(),r={nodes:i.nodes.previous,edges:i.edges.previous};0<i.edges.deleted.length&&(this.generateClickEvent("deselectEdge",t,e,r),n=!0),0<i.nodes.deleted.length&&(this.generateClickEvent("deselectNode",t,e,r),n=!0),0<i.nodes.added.length&&(this.generateClickEvent("selectNode",t,e),n=!0),0<i.edges.added.length&&(this.generateClickEvent("selectEdge",t,e),n=!0),!0===n&&this.generateClickEvent("select",t,e)}},{key:"getSelection",value:function(){return{nodes:this.getSelectedNodeIds(),edges:this.getSelectedEdgeIds()}}},{key:"getSelectedNodes",value:function(){return this._selectionAccumulator.getNodes()}},{key:"getSelectedEdges",value:function(){return this._selectionAccumulator.getEdges()}},{key:"getSelectedNodeIds",value:function(){var e;return au(e=this._selectionAccumulator.getNodes()).call(e,function(e){return e.id})}},{key:"getSelectedEdgeIds",value:function(){var e;return au(e=this._selectionAccumulator.getEdges()).call(e,function(e){return e.id})}},{key:"setSelection",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(!e||!e.nodes&&!e.edges)throw new TypeError("Selection must be an object with nodes and/or edges properties");if(!t.unselectAll&&void 0!==t.unselectAll||this.unselectAll(),e.nodes){var n,i=B1(e.nodes);try{for(i.s();!(n=i.n()).done;){var r=n.value,o=this.body.nodes[r];if(!o)throw new RangeError('Node with id "'+r+'" not found');this.selectObject(o,t.highlightEdges)}}catch(e){i.e(e)}finally{i.f()}}if(e.edges){var a,s=B1(e.edges);try{for(s.s();!(a=s.n()).done;){var l=a.value,c=this.body.edges[l];if(!c)throw new RangeError('Edge with id "'+l+'" not found');this.selectObject(c)}}catch(e){s.e(e)}finally{s.f()}}this.body.emitter.emit("_requestRedraw"),this._selectionAccumulator.commit()}},{key:"selectNodes",value:function(e){if(!e||void 0===e.length)throw"Selection must be an array with ids";this.setSelection({nodes:e},{highlightEdges:!(1<arguments.length&&void 0!==arguments[1])||arguments[1]})}},{key:"selectEdges",value:function(e){if(!e||void 0===e.length)throw"Selection must be an array with ids";this.setSelection({edges:e})}},{key:"updateSelection",value:function(){for(var e in this._selectionAccumulator.getNodes())Object.prototype.hasOwnProperty.call(this.body.nodes,e.id)||this._selectionAccumulator.deleteNodes(e);for(var t in this._selectionAccumulator.getEdges())Object.prototype.hasOwnProperty.call(this.body.edges,t.id)||this._selectionAccumulator.deleteEdges(t)}},{key:"getClickedItems",value:function(e){for(var t=this.canvas.DOMtoCanvas(e),n=[],i=this.body.nodeIndices,r=this.body.nodes,o=i.length-1;0<=o;o--){var a=r[i[o]].getItemsOnPoint(t);n.push.apply(n,a)}for(var s=this.body.edgeIndices,l=this.body.edges,c=s.length-1;0<=c;c--){var u=l[s[c]].getItemsOnPoint(t);n.push.apply(n,u)}return n}}]),i}(),X1=qa,Q1=Math.floor,ol=W1,hr=!!(Ui=ve.match(/firefox\/(\d+)/i))&&+Ui[1],Hn=/MSIE|Trident/.test(ve),vc=!!(qr=ve.match(/AppleWebKit\/(\d+)\./))&&+qr[1],ne=c,Z1=we,ex=He,tx=Ze,nx=Ti,Pi=e,ix=ol,ll=du,rx=hr,ox=Hn,ax=be,sx=vc,lx=[],cx=(Nn=i)(lx.sort),ux=Nn(lx.push),co=Pi(function(){lx.sort(void 0)}),J=Pi(function(){lx.sort(null)}),Bn=ll("sort"),dx=!Pi(function(){if(ax)return ax<70;if(!(rx&&3<rx)){if(ox)return!0;if(sx)return sx<603;for(var e,t,n,i="",r=65;r<76;r++){switch(e=String.fromCharCode(r),r){case 66:case 69:case 70:case 72:t=3;break;case 68:case 71:t=4;break;default:t=2}for(n=0;n<47;n++)lx.push({k:e+n,v:t})}for(lx.sort(function(e,t){return t.v-e.v}),n=0;n<lx.length;n++)e=lx[n].k.charAt(0),i.charAt(i.length-1)!==e&&(i+=e);return"DGBEFHACIJK"!==i}});function hx(c){return function(e,t,n,i){mx(t);var r=vx(e),o=bx(r),a=xx(r),s=c?a-1:0,l=c?-1:1;if(n<2)for(;;){if(s in o){i=o[s],s+=l;break}if(s+=l,c?s<0:a<=s)throw wx("Reduce of empty array with no initial value")}for(;c?0<=s:s<a;s+=l)s in o&&(i=t(i,o[s],s,r));return i}}ne({target:"Array",proto:!0,forced:co||!J||!Bn||!dx},{sort:function(e){void 0!==e&&Z1(e);var t=ex(this);if(dx)return void 0===e?cx(t):cx(t,e);for(var n,i=[],r=tx(t),o=0;o<r;o++)o in t&&ux(i,t[o]);for(ix(i,q1(e)),n=i.length,o=0;o<n;)t[o]=i[o++];for(;o<r;)delete t[o++];return t}});var ut=Qn("Array").sort,px=me,fx=ut,gx=Array.prototype,yx=function(e){var t=e.sort;return e===gx||px(gx,e)&&t===gx.sort?fx:t},mx=we,vx=He,bx=ie,xx=Ze,wx=t.TypeError,rl={left:hx(!1),right:hx(!0)},qm="process"==N(t.process),il=c,_x=rl.left,Lr=be,Vr=qm,sl=(il({target:"Array",proto:!0,forced:!du("reduce")||!Vr&&79<Lr&&Lr<83},{reduce:function(e){var t=arguments.length;return _x(this,e,t,1<t?arguments[1]:void 0)}}),Qn("Array").reduce),Sx=me,Ox=sl,Ex=Array.prototype,kx=function(e){var t=e.reduce;return e===Ex||Sx(Ex,e)&&t===Ex.reduce?Ox:t},jx=(function(e){e.__esModule=!0,e.sort=function(e,t,n,i){if(!Array.isArray(e))throw new TypeError("Can only sort arrays");t?"function"!=typeof t&&(i=n,n=t,t=u):t=u;n=n||0;i=i||e.length;var r=i-n;if(!(r<2)){var o=0;if(r<c)o=d(e,n,i,t),h(e,n,i,n+o,t);else{var a,s=new p(e,t),l=function(e){var t=0;for(;c<=e;)t|=1&e,e>>=1;return e+t}(r);do{}while((o=d(e,n,i,t))<l&&(h(e,n,n+(a=l<(a=r)?l:a),n+o,t),o=a),s.pushRun(n,o),s.mergeRuns(),n+=o,0!==(r-=o));s.forceMergeRuns()}}};var c=32,o=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9];function a(e){return e<1e5?e<100?e<10?0:1:e<1e4?e<1e3?2:3:4:e<1e7?e<1e6?5:6:e<1e9?e<1e8?7:8:9}function u(e,t){if(e===t)return 0;if(~~e===e&&~~t===t){if(0===e||0===t)return e<t?-1:1;if(e<0||t<0){if(0<=t)return-1;if(0<=e)return 1;e=-e,t=-t}var n=a(e),i=a(t),r=0;return n<i?(e*=o[i-n-1],t/=10,r=-1):i<n&&(t*=o[n-i-1],e/=10,r=1),e===t?r:e<t?-1:1}n=String(e),i=String(t);return n===i?0:n<i?-1:1}function d(e,t,n,i){var r=t+1;if(r===n)return 1;if(i(e[r++],e[t])<0){for(;r<n&&i(e[r],e[r-1])<0;)r++;var o=e,a=t,s=r;for(s--;a<s;){var l=o[a];o[a++]=o[s],o[s--]=l}}else for(;r<n&&0<=i(e[r],e[r-1]);)r++;return r-t}function h(e,t,n,i,r){for(i===t&&i++;i<n;i++){for(var o=e[i],a=t,s=i;a<s;){var l=a+s>>>1;r(o,e[l])<0?s=l:a=1+l}var c=i-a;switch(c){case 3:e[a+3]=e[a+2];case 2:e[a+2]=e[a+1];case 1:e[a+1]=e[a];break;default:for(;0<c;)e[a+c]=e[a+c-1],c--}e[a]=o}}function m(e,t,n,i,r,o){var a=0,s=0,l=1;if(0<o(e,t[n+r])){for(s=i-r;l<s&&0<o(e,t[n+r+l]);)(l=1+((a=l)<<1))<=0&&(l=s);s<l&&(l=s),a+=r,l+=r}else{for(s=r+1;l<s&&o(e,t[n+r-l])<=0;)(l=1+((a=l)<<1))<=0&&(l=s);i=a,a=r-(l=s<l?s:l),l=r-i}for(a++;a<l;){var c=a+(l-a>>>1);0<o(e,t[n+c])?a=c+1:l=c}return l}function v(e,t,n,i,r,o){var a=0,s=0,l=1;if(o(e,t[n+r])<0){for(s=r+1;l<s&&o(e,t[n+r-l])<0;)(l=1+((a=l)<<1))<=0&&(l=s);var c=a,a=r-(l=s<l?s:l),l=r-c}else{for(s=i-r;l<s&&0<=o(e,t[n+r+l]);)(l=1+((a=l)<<1))<=0&&(l=s);s<l&&(l=s),a+=r,l+=r}for(a++;a<l;){var u=a+(l-a>>>1);o(e,t[n+u])<0?l=u:a=u+1}return l}n.prototype.pushRun=function(e,t){this.runStart[this.stackSize]=e,this.runLength[this.stackSize]=t,this.stackSize+=1},n.prototype.mergeRuns=function(){for(;1<this.stackSize;){var e=this.stackSize-2;if(1<=e&&this.runLength[e-1]<=this.runLength[e]+this.runLength[e+1]||2<=e&&this.runLength[e-2]<=this.runLength[e]+this.runLength[e-1])this.runLength[e-1]<this.runLength[e+1]&&e--;else if(this.runLength[e]>this.runLength[e+1])break;this.mergeAt(e)}},n.prototype.forceMergeRuns=function(){for(;1<this.stackSize;){var e=this.stackSize-2;0<e&&this.runLength[e-1]<this.runLength[e+1]&&e--,this.mergeAt(e)}},n.prototype.mergeAt=function(e){var t=this.compare,n=this.array,i=this.runStart[e],r=this.runLength[e],o=this.runStart[e+1],a=this.runLength[e+1],e=(this.runLength[e]=r+a,e===this.stackSize-3&&(this.runStart[e+1]=this.runStart[e+2],this.runLength[e+1]=this.runLength[e+2]),this.stackSize--,v(n[o],n,i,r,0,t));i+=e,0!=(r-=e)&&0!==(a=m(n[i+r-1],n,o,a,a-1,t))&&(r<=a?this.mergeLow(i,r,o,a):this.mergeHigh(i,r,o,a))},n.prototype.mergeLow=function(e,t,n,i){for(var r=this.compare,o=this.array,a=this.tmp,s=0,s=0;s<t;s++)a[s]=o[e+s];var l=0,c=n,u=e;if(o[u++]=o[c++],0==--i)for(s=0;s<t;s++)o[u+s]=a[l+s];else if(1===t){for(s=0;s<i;s++)o[u+s]=o[c+s];o[u+i]=a[l]}else{for(var d=this.minGallop;;){var h=0,p=0,f=!1;do{if(r(o[c],a[l])<0){if(o[u++]=o[c++],p++,(h=0)==--i){f=!0;break}}else if(o[u++]=a[l++],h++,p=0,1==--t){f=!0;break}}while((h|p)<d);if(f)break;do{if(0!==(h=v(o[c],a,l,t,0,r))){for(s=0;s<h;s++)o[u+s]=a[l+s];if(u+=h,l+=h,(t-=h)<=1){f=!0;break}}if(o[u++]=o[c++],0==--i){f=!0;break}if(0!==(p=m(a[l],o,c,i,0,r))){for(s=0;s<p;s++)o[u+s]=o[c+s];if(u+=p,c+=p,0===(i-=p)){f=!0;break}}if(o[u++]=a[l++],1==--t){f=!0;break}}while(d--,7<=h||7<=p);if(f)break;d<0&&(d=0),d+=2}if((this.minGallop=d)<1&&(this.minGallop=1),1===t){for(s=0;s<i;s++)o[u+s]=o[c+s];o[u+i]=a[l]}else{if(0===t)throw new Error("mergeLow preconditions were not respected");for(s=0;s<t;s++)o[u+s]=a[l+s]}}},n.prototype.mergeHigh=function(e,t,n,i){for(var r=this.compare,o=this.array,a=this.tmp,s=0,s=0;s<i;s++)a[s]=o[n+s];var l=e+t-1,c=i-1,u=n+i-1,d=0,h=0;if(o[u--]=o[l--],0==--t)for(d=u-(i-1),s=0;s<i;s++)o[d+s]=a[s];else if(1===i){for(h=(u-=t)+1,d=(l-=t)+1,s=t-1;0<=s;s--)o[h+s]=o[d+s];o[u]=a[c]}else{for(var p=this.minGallop;;){var f=0,g=0,y=!1;do{if(r(a[c],o[l])<0){if(o[u--]=o[l--],f++,(g=0)==--t){y=!0;break}}else if(o[u--]=a[c--],g++,f=0,1==--i){y=!0;break}}while((f|g)<p);if(y)break;do{if(0!==(f=t-v(a[c],o,e,t,t-1,r))){for(t-=f,h=(u-=f)+1,d=(l-=f)+1,s=f-1;0<=s;s--)o[h+s]=o[d+s];if(0===t){y=!0;break}}if(o[u--]=a[c--],1==--i){y=!0;break}if(0!==(g=i-m(o[l],a,0,i,i-1,r))){for(i-=g,h=(u-=g)+1,d=(c-=g)+1,s=0;s<g;s++)o[h+s]=a[d+s];if(i<=1){y=!0;break}}if(o[u--]=o[l--],0==--t){y=!0;break}}while(p--,7<=f||7<=g);if(y)break;p<0&&(p=0),p+=2}if((this.minGallop=p)<1&&(this.minGallop=1),1===i){for(h=(u-=t)+1,d=(l-=t)+1,s=t-1;0<=s;s--)o[h+s]=o[d+s];o[u]=a[c]}else{if(0===i)throw new Error("mergeHigh preconditions were not respected");for(d=u-(i-1),s=0;s<i;s++)o[d+s]=a[s]}}};var p=n;function n(e,t){if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");this.array=null,this.compare=null,this.minGallop=7,this.length=0,this.tmpStorageLength=256,this.stackLength=0,this.runStart=null,this.runLength=null,this.stackSize=0,this.array=e,this.compare=t,this.length=e.length,this.length<512&&(this.tmpStorageLength=this.length>>>1),this.tmp=new Array(this.tmpStorageLength),this.stackLength=this.length<120?5:this.length<1542?10:this.length<119151?19:40,this.runStart=new Array(this.stackLength),this.runLength=new Array(this.stackLength)}}(a={}),a);function Tx(n){var i=Cx();return function(){var e,t=I(n);return $(this,i?(e=I(this).constructor,j(t,arguments,e)):t.apply(this,arguments))}}function Cx(){if("undefined"==typeof Reflect||!j)return!1;if(j.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(j(Boolean,[],function(){})),!0}catch(e){return!1}}var g=function(){function e(){m(this,e)}return v(e,[{key:"abstract",value:function(){throw new Error("Can't instantiate abstract class!")}},{key:"fake_use",value:function(){}},{key:"curveType",value:function(){return this.abstract()}},{key:"getPosition",value:function(e){return this.fake_use(e),this.abstract()}},{key:"setPosition",value:function(e,t){this.fake_use(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:void 0),this.abstract()}},{key:"getTreeSize",value:function(e){return this.fake_use(e),this.abstract()}},{key:"sort",value:function(e){this.fake_use(e),this.abstract()}},{key:"fix",value:function(e,t){this.fake_use(e,t),this.abstract()}},{key:"shift",value:function(e,t){this.fake_use(e,t),this.abstract()}}]),e}(),Px=function(){P(i,g);var n=Tx(i);function i(e){var t;return m(this,i),(t=n.call(this)).layout=e,t}return v(i,[{key:"curveType",value:function(){return"horizontal"}},{key:"getPosition",value:function(e){return e.x}},{key:"setPosition",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:void 0;void 0!==n&&this.layout.hierarchical.addToOrdering(e,n),e.x=t}},{key:"getTreeSize",value:function(e){e=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,e);return{min:e.min_x,max:e.max_x}}},{key:"sort",value:function(e){jx.sort(e,function(e,t){return e.x-t.x})}},{key:"fix",value:function(e,t){e.y=this.layout.options.hierarchical.levelSeparation*t,e.options.fixed.y=!0}},{key:"shift",value:function(e,t){this.layout.body.nodes[e].x+=t}}]),i}(),$x=function(){P(i,g);var n=Tx(i);function i(e){var t;return m(this,i),(t=n.call(this)).layout=e,t}return v(i,[{key:"curveType",value:function(){return"vertical"}},{key:"getPosition",value:function(e){return e.y}},{key:"setPosition",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:void 0;void 0!==n&&this.layout.hierarchical.addToOrdering(e,n),e.y=t}},{key:"getTreeSize",value:function(e){e=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,e);return{min:e.min_y,max:e.max_y}}},{key:"sort",value:function(e){jx.sort(e,function(e,t){return e.y-t.y})}},{key:"fix",value:function(e,t){e.x=this.layout.options.hierarchical.levelSeparation*t,e.options.fixed.x=!0}},{key:"shift",value:function(e,t){this.layout.body.nodes[e].y+=t}}]),i}(),te=c,Ix=Ur.every,X=(te({target:"Array",proto:!0,forced:!du("every")},{every:function(e){return Ix(this,e,1<arguments.length?arguments[1]:void 0)}}),Qn("Array").every),Rx=me,Mx=X,Ax=Array.prototype,Fx=function(e){var t=e.every;return e===Ax||Rx(Ax,e)&&t===Ax.every?Mx:t};function Dx(e,t){var n,i=void 0!==Jc&&os(e)||e["@@iterator"];if(!i){if(x(e)||(i=Nx(e))||t&&e&&"number"==typeof e.length)return i&&(e=i),n=0,{s:t=function(){},n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,a=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return o=e.done,e},e:function(e){a=!0,r=e},f:function(){try{o||null==i.return||i.return()}finally{if(a)throw r}}}}function Nx(e,t){if(e){if("string"==typeof e)return Lx(e,t);var n=tu(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Ma(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Lx(e,t):void 0}}function Lx(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Bx(e,n){var t=new l1;return _(e).call(e,function(e){_(e=e.edges).call(e,function(e){e.connected&&t.add(e)})}),_(t).call(t,function(e){var t=e.from.id,e=e.to.id;null==n[t]&&(n[t]=0),(null==n[e]||n[t]>=n[e])&&(n[e]=n[t]+1)}),n}function zx(n){return Wx(function(t){var e;return Fx(e=hd(e=t.edges).call(e,function(e){return n.has(e.toId)})).call(e,function(e){return e.to===t})},function(e,t){return e<t},"from",n)}function Hx(n){return Wx(function(t){var e;return Fx(e=hd(e=t.edges).call(e,function(e){return n.has(e.toId)})).call(e,function(e){return e.from===t})},function(e,t){return t<e},"to",n)}function Wx(a,s,l,c){var e,u,d=Ud(null),h=kx(e=Yc(Fm(c).call(c))).call(e,function(e,t){return e+1+t.edges.length},0),p=l+"Id",f="to"===l?1:-1,t=Dx(c);try{function n(){var e=L(u.value,2),t=e[0],e=e[1];if(!c.has(t)||!a(e))return"continue";d[t]=0;for(var n,r=[e],o=0;n=r.pop();){var i=function(){var e,i;return c.has(t)?(i=d[n.id]+f,_(e=hd(e=n.edges).call(e,function(e){return e.connected&&e.to!==e.from&&e[l]!==n&&c.has(e.toId)&&c.has(e.fromId)})).call(e,function(e){var t=e[p],n=d[t];null!=n&&!s(i,n)||(d[t]=i,r.push(e[l]))}),h<o?{v:{v:Bx(c,d)}}:void++o):"continue"}();if("continue"!==i&&"object"===b(i))return i.v}}for(t.s();!(u=t.n()).done;){var i=n();if("continue"!==i&&"object"===b(i))return i.v}}catch(e){t.e(e)}finally{t.f()}return d}var Vx=function(){function e(){m(this,e),this.childrenReference={},this.parentReference={},this.trees={},this.distributionOrdering={},this.levels={},this.distributionIndex={},this.isTree=!1,this.treeIndex=-1}return v(e,[{key:"addRelation",value:function(e,t){void 0===this.childrenReference[e]&&(this.childrenReference[e]=[]),this.childrenReference[e].push(t),void 0===this.parentReference[t]&&(this.parentReference[t]=[]),this.parentReference[t].push(e)}},{key:"checkIfTree",value:function(){for(var e in this.parentReference)if(1<this.parentReference[e].length)return void(this.isTree=!1);this.isTree=!0}},{key:"numTrees",value:function(){return this.treeIndex+1}},{key:"setTreeIndex",value:function(e,t){void 0!==t&&void 0===this.trees[e.id]&&(this.trees[e.id]=t,this.treeIndex=Math.max(t,this.treeIndex))}},{key:"ensureLevel",value:function(e){void 0===this.levels[e]&&(this.levels[e]=0)}},{key:"getMaxLevel",value:function(e){var o=this,a={};return function e(t){if(void 0!==a[t])return a[t];var n=o.levels[t];if(o.childrenReference[t]){var i=o.childrenReference[t];if(0<i.length)for(var r=0;r<i.length;r++)n=Math.max(n,e(i[r]))}return a[t]=n}(e)}},{key:"levelDownstream",value:function(e,t){void 0===this.levels[t.id]&&(void 0===this.levels[e.id]&&(this.levels[e.id]=0),this.levels[t.id]=this.levels[e.id]+1)}},{key:"setMinLevelToZero",value:function(e){var t,n,i=1e9;for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&void 0!==this.levels[t]&&(i=Math.min(this.levels[t],i));for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&void 0!==this.levels[n]&&(this.levels[n]-=i)}},{key:"getTreeSize",value:function(e,t){var n,i,r=1e9,o=-1e9,a=1e9,s=-1e9;for(n in this.trees)Object.prototype.hasOwnProperty.call(this.trees,n)&&this.trees[n]===t&&(i=e[n],r=Math.min(i.x,r),o=Math.max(i.x,o),a=Math.min(i.y,a),s=Math.max(i.y,s));return{min_x:r,max_x:o,min_y:a,max_y:s}}},{key:"hasSameParent",value:function(e,t){var n=this.parentReference[e.id],i=this.parentReference[t.id];if(void 0===n||void 0===i)return!1;for(var r=0;r<n.length;r++)for(var o=0;o<i.length;o++)if(n[r]==i[o])return!0;return!1}},{key:"inSameSubNetwork",value:function(e,t){return this.trees[e.id]===this.trees[t.id]}},{key:"getLevels",value:function(){return w(this.distributionOrdering)}},{key:"addToOrdering",value:function(e,t){void 0===this.distributionOrdering[t]&&(this.distributionOrdering[t]=[]);var n,i=!1,r=this.distributionOrdering[t];for(n in r)if(r[n]===e){i=!0;break}i||(this.distributionOrdering[t].push(e),this.distributionIndex[e.id]=this.distributionOrdering[t].length-1)}}]),e}(),Ux=function(){function t(e){m(this,t),this.body=e,this._resetRNG(Math.random()+":"+hu()),this.setPhysics=!1,this.options={},this.optionsBackup={physics:{}},this.defaultOptions={randomSeed:void 0,improvedLayout:!0,clusterThreshold:150,hierarchical:{enabled:!1,levelSeparation:150,nodeSpacing:100,treeSpacing:200,blockShifting:!0,edgeMinimization:!0,parentCentralization:!0,direction:"UD",sortMethod:"hubsize"}},Zn(this.options,this.defaultOptions),this.bindEventListeners()}return v(t,[{key:"bindEventListeners",value:function(){var t=this;this.body.emitter.on("_dataChanged",function(){t.setupHierarchicalLayout()}),this.body.emitter.on("_dataLoaded",function(){t.layoutNetwork()}),this.body.emitter.on("_resetHierarchicalLayout",function(){t.setupHierarchicalLayout()}),this.body.emitter.on("_adjustEdgesForHierarchicalLayout",function(){var e;!0===t.options.hierarchical.enabled&&(e=t.direction.curveType(),t.body.emitter.emit("_forceDisableDynamicCurves",e,!1))})}},{key:"setOptions",value:function(e,t){if(void 0!==e){var n=this.options.hierarchical,i=n.enabled;if(Pf(["randomSeed","improvedLayout","clusterThreshold"],this.options,e),Jf(this.options,e,"hierarchical"),void 0!==e.randomSeed&&this._resetRNG(e.randomSeed),!0===n.enabled)return!0===i&&this.body.emitter.emit("refresh",!0),"RL"===n.direction||"DU"===n.direction?0<n.levelSeparation&&(n.levelSeparation*=-1):n.levelSeparation<0&&(n.levelSeparation*=-1),this.setDirectionStrategy(),this.body.emitter.emit("_resetHierarchicalLayout"),this.adaptAllOptionsForHierarchicalLayout(t);if(!0===i)return this.body.emitter.emit("refresh"),S(t,this.optionsBackup)}return t}},{key:"_resetRNG",value:function(e){this.initialRandomSeed=e,this._rng=pf(this.initialRandomSeed)}},{key:"adaptAllOptionsForHierarchicalLayout",value:function(e){var t,n;return!0===this.options.hierarchical.enabled&&(t=this.optionsBackup.physics,void 0===e.physics||!0===e.physics?(e.physics={enabled:void 0===t.enabled||t.enabled,solver:"hierarchicalRepulsion"},t.enabled=void 0===t.enabled||t.enabled,t.solver=t.solver||"barnesHut"):"object"===b(e.physics)?(t.enabled=void 0===e.physics.enabled||e.physics.enabled,t.solver=e.physics.solver||"barnesHut",e.physics.solver="hierarchicalRepulsion"):!1!==e.physics&&(t.solver="barnesHut",e.physics={solver:"hierarchicalRepulsion"}),t=this.direction.curveType(),void 0===e.edges?(this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},e.edges={smooth:!1}):void 0===e.edges.smooth?(this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},e.edges.smooth=!1):"boolean"==typeof e.edges.smooth?(this.optionsBackup.edges={smooth:e.edges.smooth},e.edges.smooth={enabled:e.edges.smooth,type:t}):(void 0!==(n=e.edges.smooth).type&&"dynamic"!==n.type&&(t=n.type),this.optionsBackup.edges={smooth:{enabled:void 0===n.enabled||n.enabled,type:void 0===n.type?"dynamic":n.type,roundness:void 0===n.roundness?.5:n.roundness,forceDirection:void 0!==n.forceDirection&&n.forceDirection}},e.edges.smooth={enabled:void 0===n.enabled||n.enabled,type:t,roundness:void 0===n.roundness?.5:n.roundness,forceDirection:void 0!==n.forceDirection&&n.forceDirection}),this.body.emitter.emit("_forceDisableDynamicCurves",t)),e}},{key:"positionInitially",value:function(e){if(!0!==this.options.hierarchical.enabled){this._resetRNG(this.initialRandomSeed);for(var t=e.length+50,n=0;n<e.length;n++){var i=e[n],r=2*Math.PI*this._rng();void 0===i.x&&(i.x=t*Math.cos(r)),void 0===i.y&&(i.y=t*Math.sin(r))}}}},{key:"layoutNetwork",value:function(){if(!0!==this.options.hierarchical.enabled&&!0===this.options.improvedLayout){for(var e=this.body.nodeIndices,t=0,n=0;n<e.length;n++)!0===this.body.nodes[e[n]].predefinedPosition&&(t+=1);if(t<.5*e.length){var i=0,r=this.options.clusterThreshold,o={clusterNodeProperties:{shape:"ellipse",label:"",group:"",font:{multi:!1}},clusterEdgeProperties:{label:"",font:{multi:!1},smooth:{enabled:!1}}};if(e.length>r){for(var a=e.length;e.length>r&&i<=10;){i+=1;var s=e.length;if(i%3==0?this.body.modules.clustering.clusterBridges(o):this.body.modules.clustering.clusterOutliers(o),s==e.length&&i%3!=0)return this._declusterAll(),this.body.emitter.emit("_layoutFailed"),void console.info("This network could not be positioned by this version of the improved layout algorithm. Please disable improvedLayout for better performance.")}this.body.modules.kamadaKawai.setOptions({springLength:Math.max(150,2*a)})}10<i&&console.info("The clustering didn't succeed within the amount of interations allowed, progressing with partial result."),this.body.modules.kamadaKawai.solve(e,this.body.edgeIndices,!0),this._shiftToCenter();for(var l=0;l<e.length;l++){var c=this.body.nodes[e[l]];!1===c.predefinedPosition&&(c.x+=70*(.5-this._rng()),c.y+=70*(.5-this._rng()))}this._declusterAll(),this.body.emitter.emit("_repositionBezierNodes")}}}},{key:"_shiftToCenter",value:function(){for(var e=D0.getRangeCore(this.body.nodes,this.body.nodeIndices),t=D0.findCenter(e),n=0;n<this.body.nodeIndices.length;n++){var i=this.body.nodes[this.body.nodeIndices[n]];i.x-=t.x,i.y-=t.y}}},{key:"_declusterAll",value:function(){for(var e=!0;!0===e;){for(var e=!1,t=0;t<this.body.nodeIndices.length;t++)!0===this.body.nodes[this.body.nodeIndices[t]].isCluster&&this.body.modules.clustering.openCluster(this.body.nodeIndices[t],{},!(e=!0));!0===e&&this.body.emitter.emit("_dataChanged")}}},{key:"getSeed",value:function(){return this.initialRandomSeed}},{key:"setupHierarchicalLayout",value:function(){if(!0===this.options.hierarchical.enabled&&0<this.body.nodeIndices.length){var e,t,n,i=!1,r=!1;for(t in this.lastNodeOnLevel={},this.hierarchical=new Vx,this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&(void 0!==(e=this.body.nodes[t]).options.level?(i=!0,this.hierarchical.levels[t]=e.options.level):r=!0);if(!0===r&&!0===i)throw new Error("To use the hierarchical layout, nodes require either no predefined levels or levels have to be defined for all nodes.");for(n in!0===r&&("hubsize"===(o=this.options.hierarchical.sortMethod)?this._determineLevelsByHubsize():"directed"===o?this._determineLevelsDirected():"custom"===o&&this._determineLevelsCustomCallback()),this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,n)&&this.hierarchical.ensureLevel(n);var o=this._getDistribution();this._generateMap(),this._placeNodesByHierarchy(o),this._condenseHierarchy(),this._shiftToCenter()}}},{key:"_condenseHierarchy",value:function(){function e(e,t){var n,i=m.hierarchical.trees;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&i[n]===e&&m.direction.shift(n,t)}function t(){for(var e=[],t=0;t<m.hierarchical.numTrees();t++)e.push(m.direction.getTreeSize(t));return e}function n(e,t){var n,i,r=2<arguments.length&&void 0!==arguments[2]&&arguments[2],o=m.direction.getPosition(e),a=m.direction.getPosition(t),a=Math.abs(a-o);(o=m.options.hierarchical.nodeSpacing)<a&&(a={},x(e,n={}),x(t,a),i=s(e,t),n=w(n,i),a=w(a,i),i=n[1],n=a[0],a=a[2],o<Math.abs(i-n)&&((i=(i=i-n+o)<-a+o?-a+o:i)<0&&(m._shiftBlock(t.id,i),(v=!0)===r&&m._centerParent(t))))}function i(e,s){for(var t=s.id,n=s.edges,i=m.hierarchical.levels[s.id],l=m.options.hierarchical.levelSeparation*m.options.hierarchical.levelSeparation,c={},r=[],o=0;o<n.length;o++){var a,u=n[o];u.toId!=u.fromId&&(a=u.toId==t?u.from:u.to,c[n[o].id]=a,m.hierarchical.levels[a.id]<i&&r.push(u))}function d(e,t){for(var n=m.direction.getPosition(s),i={},r=0;r<e;r++){var o=function(e,t){for(var n,i=0,r=0;r<t.length;r++)void 0!==c[t[r].id]&&(i+=(n=m.direction.getPosition(c[t[r].id])-e)/Math.sqrt(n*n+l));return i}(n,t),a=function(e,t){for(var n,i=0,r=0;r<t.length;r++)void 0!==c[t[r].id]&&(n=m.direction.getPosition(c[t[r].id])-e,i-=l*Math.pow(n*n+l,-1.5));return i}(n,t);if(void 0!==i[n-=Math.max(-40,Math.min(40,Math.round(o/a)))])break;i[n]=r}return n}var h,p,f,g,y=d(e,r);p=y,g=m.direction.getPosition(s),void 0===b[s.id]&&(x(s,h={}),b[s.id]=h),h=w(b[s.id]),f=h[2],h=h[3],p-=g,(g=0)<p?g=Math.min(p,h-m.options.hierarchical.nodeSpacing):p<0&&(g=-Math.min(-p,f-m.options.hierarchical.nodeSpacing)),0!=g&&(m._shiftBlock(s.id,g),v=!0),y=d(e,n),h=y,p=m.direction.getPosition(s),f=L(m._getSpaceAroundNode(s),2),g=f[0],f=f[1],0<(y=h-(e=p))?e=Math.min(p+(f-m.options.hierarchical.nodeSpacing),h):y<0&&(e=Math.max(p-(g-m.options.hierarchical.nodeSpacing),h)),e!==p&&(m.direction.setPosition(s,e),v=!0)}var m=this,v=!1,b={},x=function e(t,n){if(!n[t.id]&&(n[t.id]=!0,m.hierarchical.childrenReference[t.id])){var i=m.hierarchical.childrenReference[t.id];if(0<i.length)for(var r=0;r<i.length;r++)e(m.body.nodes[i[r]],n)}},w=function(e){var t,n,i,r,o,a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1e9,s=1e9,l=1e9,c=1e9,u=-1e9;for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&(o=m.body.nodes[t],n=m.hierarchical.levels[o.id],i=m.direction.getPosition(o),r=(o=L(m._getSpaceAroundNode(o,e),2))[0],o=o[1],s=Math.min(r,s),l=Math.min(o,l),n<=a&&(c=Math.min(i,c),u=Math.max(i,u)));return[c,u,s,l]},s=function(e,t){e=m.hierarchical.getMaxLevel(e.id),t=m.hierarchical.getMaxLevel(t.id);return Math.min(e,t)};if(!0===this.options.hierarchical.blockShifting){{var r=5;for(var o=m.hierarchical.getLevels(),o=ku(o).call(o),a=0;a<r;a++){v=!1;for(var l=n,c=o,u=!(_=y=g=f=p=h=d=void 0),d=m.hierarchical,h=0;h<c.length;h++){var p=c[h],f=d.distributionOrdering[p];if(1<f.length)for(var g=0;g<f.length-1;g++){var y=f[g],_=f[g+1];d.hasSameParent(y,_)&&d.inSameSubNetwork(y,_)&&l(y,_,u)}}if(!0!==v)break}}for(var S in m.body.nodes)Object.prototype.hasOwnProperty.call(m.body.nodes,S)&&m._centerParent(m.body.nodes[S])}if(!0===this.options.hierarchical.edgeMinimization)for(var F=20,O=m.hierarchical.getLevels(),O=ku(O).call(O),E=0;E<F;E++){v=!1;for(var k=0;k<O.length;k++)for(var D=O[k],j=m.hierarchical.distributionOrdering[D],T=0;T<j.length;T++)i(1e3,j[T]);if(!0!==v)break}if(!0===this.options.hierarchical.parentCentralization)for(var C=m.hierarchical.getLevels(),C=ku(C).call(C),P=0;P<C.length;P++)for(var N=C[P],$=m.hierarchical.distributionOrdering[N],I=0;I<$.length;I++)m._centerParent($[I]);for(var R=t(),M=0,A=0;A<R.length-1;A++)M+=R[A].max-R[A+1].min+m.options.hierarchical.treeSpacing,e(A+1,M)}},{key:"_getSpaceAroundNode",value:function(e,t){var n,i,r,o,a=!0,s=(void 0===t&&(a=!1),this.hierarchical.levels[e.id]);return void 0!==s?(n=this.hierarchical.distributionIndex[e.id],e=this.direction.getPosition(e),s=this.hierarchical.distributionOrdering[s],o=i=1e9,0!==n&&(r=s[n-1],(!0===a&&void 0===t[r.id]||!1===a)&&(i=e-this.direction.getPosition(r))),n!=s.length-1&&(r=s[n+1],(!0===a&&void 0===t[r.id]||!1===a)&&(s=this.direction.getPosition(r),o=Math.min(o,s-e))),[i,o]):[0,0]}},{key:"_centerParent",value:function(e){if(this.hierarchical.parentReference[e.id])for(var t=this.hierarchical.parentReference[e.id],n=0;n<t.length;n++){var i,r,o,a=t[n],s=this.body.nodes[a],a=this.hierarchical.childrenReference[a];void 0!==a&&(a=this._getCenterPosition(a),o=this.direction.getPosition(s),i=(r=L(this._getSpaceAroundNode(s),2))[0],r=r[1],((o=o-a)<0&&Math.abs(o)<r-this.options.hierarchical.nodeSpacing||0<o&&Math.abs(o)<i-this.options.hierarchical.nodeSpacing)&&this.direction.setPosition(s,a))}}},{key:"_placeNodesByHierarchy",value:function(e){for(var t in this.positionedNodes={},e)if(Object.prototype.hasOwnProperty.call(e,t)){var n,i=w(e[t]),i=this._indexArrayToNodes(i);yx(n=this.direction).call(n,i);for(var r=0,o=0;o<i.length;o++){var a,s,l=i[o];void 0===this.positionedNodes[l.id]&&(s=(a=this.options.hierarchical.nodeSpacing)*r,0<r&&(s=this.direction.getPosition(i[o-1])+a),this.direction.setPosition(l,s,t),this._validatePositionAndContinue(l,t,s),r++)}}}},{key:"_placeBranchNodes",value:function(e,t){var n=this.hierarchical.childrenReference[e];if(void 0!==n){for(var i=[],r=0;r<n.length;r++)i.push(this.body.nodes[n[r]]);yx(u=this.direction).call(u,i);for(var o=0;o<i.length;o++){var a=i[o],s=this.hierarchical.levels[a.id];if(!(t<s&&void 0===this.positionedNodes[a.id]))return;var l=this.options.hierarchical.nodeSpacing,c=void 0,c=0===o?this.direction.getPosition(this.body.nodes[e]):this.direction.getPosition(i[o-1])+l;this.direction.setPosition(a,c,s),this._validatePositionAndContinue(a,s,c)}var u=this._getCenterPosition(i);this.direction.setPosition(this.body.nodes[e],u,t)}}},{key:"_validatePositionAndContinue",value:function(e,t,n){var i;this.hierarchical.isTree&&(void 0!==this.lastNodeOnLevel[t]&&n-(i=this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[t]]))<this.options.hierarchical.nodeSpacing&&(i=i+this.options.hierarchical.nodeSpacing-n,n=this._findCommonParent(this.lastNodeOnLevel[t],e.id),this._shiftBlock(n.withChild,i)),this.lastNodeOnLevel[t]=e.id,this.positionedNodes[e.id]=!0,this._placeBranchNodes(e.id,t))}},{key:"_indexArrayToNodes",value:function(e){for(var t=[],n=0;n<e.length;n++)t.push(this.body.nodes[e[n]]);return t}},{key:"_getDistribution",value:function(){var e,t,n,i={};for(e in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,e)&&(t=this.body.nodes[e],n=void 0===this.hierarchical.levels[e]?0:this.hierarchical.levels[e],this.direction.fix(t,n),void 0===i[n]&&(i[n]={}),i[n][e]=t);return i}},{key:"_getActiveEdges",value:function(e){var n=this,i=[];return C(e.edges,function(e){var t;-1!==T(t=n.body.edgeIndices).call(t,e.id)&&i.push(e)}),i}},{key:"_getHubSizes",value:function(){var t=this,n={},i=(C(this.body.nodeIndices,function(e){e=t.body.nodes[e],e=t._getActiveEdges(e).length;n[e]=!0}),[]);return C(n,function(e){i.push(Number(e))}),yx(jx).call(jx,i,function(e,t){return t-e}),i}},{key:"_determineLevelsByHubsize",value:function(){for(var i=this,r=function(e,t){i.hierarchical.levelDownstream(e,t)},t=this._getHubSizes(),e=0;e<t.length&&"break"!==function(e){var n=t[e];if(0===n)return"break";C(i.body.nodeIndices,function(e){var t=i.body.nodes[e];n===i._getActiveEdges(t).length&&i._crawlNetwork(r,e)})}(e);++e);}},{key:"_determineLevelsCustomCallback",value:function(){var r=this;this._crawlNetwork(function(e,t,n){var i=r.hierarchical.levels[e.id];void 0===i&&(i=r.hierarchical.levels[e.id]=1e5),D0.cloneOptions(e,"node"),D0.cloneOptions(t,"node"),D0.cloneOptions(n,"edge");r.hierarchical.levels[t.id]=i+void 0}),this.hierarchical.setMinLevelToZero(this.body.nodes)}},{key:"_determineLevelsDirected",value:function(){var n=this,e=kx(e=this.body.nodeIndices).call(e,function(e,t){return e.set(t,n.body.nodes[t]),e},new lm);"roots"===this.options.hierarchical.shakeTowards?this.hierarchical.levels=Hx(e):this.hierarchical.levels=zx(e),this.hierarchical.setMinLevelToZero(this.body.nodes)}},{key:"_generateMap",value:function(){var n=this;this._crawlNetwork(function(e,t){n.hierarchical.levels[t.id]>n.hierarchical.levels[e.id]&&n.hierarchical.addRelation(e.id,t.id)}),this.hierarchical.checkIfTree()}},{key:"_crawlNetwork",value:function(){function a(e,t){if(void 0===c[e.id]){s.hierarchical.setTreeIndex(e,t),c[e.id]=!0;for(var n,i=s._getActiveEdges(e),r=0;r<i.length;r++){var o=i[r];!0===o.connected&&(n=o.toId==e.id?o.from:o.to,e.id!=n.id&&(l(e,n,o),a(n,t)))}}}var s=this,l=0<arguments.length&&void 0!==arguments[0]?arguments[0]:function(){},e=1<arguments.length?arguments[1]:void 0,c={};if(void 0===e)for(var t=0,n=0;n<this.body.nodeIndices.length;n++){var i=this.body.nodeIndices[n];void 0===c[i]&&(a(this.body.nodes[i],t),t+=1)}else{var r=this.body.nodes[e];void 0===r?console.error("Node not found:",e):a(r)}}},{key:"_shiftBlock",value:function(e,r){var o=this,a={};(function e(t){if(!a[t]){a[t]=!0,o.direction.shift(t,r);var n=o.hierarchical.childrenReference[t];if(void 0!==n)for(var i=0;i<n.length;i++)e(n[i])}})(e)}},{key:"_findCommonParent",value:function(e,t){function o(e,t){var n=a.hierarchical.parentReference[t];if(void 0!==n)for(var i=0;i<n.length;i++){var r=n[i];if(void 0!==e[r])return{foundParent:r,withChild:t};r=o(e,r);if(null!==r.foundParent)return r}return{foundParent:null,withChild:t}}var a=this,n={};return function e(t,n){var i=a.hierarchical.parentReference[n];if(void 0!==i)for(var r=0;r<i.length;r++){var o=i[r];t[o]=!0,e(t,o)}}(n,e),o(n,t)}},{key:"setDirectionStrategy",value:function(){var e="UD"===this.options.hierarchical.direction||"DU"===this.options.hierarchical.direction;this.direction=new(e?Px:$x)(this)}},{key:"_getCenterPosition",value:function(e){for(var t=1e9,n=-1e9,i=0;i<e.length;i++)var r=void 0,o=(r=void 0!==e[i].id?e[i]:(o=e[i],this.body.nodes[o]),this.direction.getPosition(r)),t=Math.min(t,o),n=Math.max(n,o);return.5*(t+n)}}]),t}();function qx(e,t){var n,i=void 0!==Jc&&os(e)||e["@@iterator"];if(!i){if(x(e)||(i=Gx(e))||t&&e&&"number"==typeof e.length)return i&&(e=i),n=0,{s:t=function(){},n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,a=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return o=e.done,e},e:function(e){a=!0,r=e},f:function(){try{o||null==i.return||i.return()}finally{if(a)throw r}}}}function Gx(e,t){if(e){if("string"==typeof e)return Kx(e,t);var n=tu(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Ma(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Kx(e,t):void 0}}function Kx(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Yx(e,t,n){return!(!id(e).call(e,"physics")||!id(e=Zx.physics.solver).call(e,t)||n.physics.solver===t||"wind"===t)}var Jx=function(){function o(e,t,n,i){var r=this;m(this,o),this.body=e,this.canvas=t,this.selectionHandler=n,this.interactionHandler=i,this.editMode=!1,this.manipulationDiv=void 0,this.editModeDiv=void 0,this.closeDiv=void 0,this._domEventListenerCleanupQueue=[],this.temporaryUIFunctions={},this.temporaryEventFunctions=[],this.touchTime=0,this.temporaryIds={nodes:[],edges:[]},this.guiEnabled=!1,this.inMode=!1,this.selectedControlNode=void 0,this.options={},this.defaultOptions={enabled:!1,initiallyActive:!1,addNode:!0,addEdge:!0,editNode:void 0,editEdge:!0,deleteNode:!0,deleteEdge:!0,controlNodeStyle:{shape:"dot",size:6,color:{background:"#ff0000",border:"#3c3c3c",highlight:{background:"#07f968",border:"#3c3c3c"}},borderWidth:2,borderWidthSelected:2}},Zn(this.options,this.defaultOptions),this.body.emitter.on("destroy",function(){r._clean()}),this.body.emitter.on("_dataChanged",h(e=this._restore).call(e,this)),this.body.emitter.on("_resetData",h(t=this._restore).call(t,this))}return v(o,[{key:"_restore",value:function(){!1!==this.inMode&&(!0===this.options.initiallyActive?this.enableEditMode():this.disableEditMode())}},{key:"setOptions",value:function(e,t,n){void 0!==t&&(void 0!==t.locale?this.options.locale=t.locale:this.options.locale=n.locale,void 0!==t.locales?this.options.locales=t.locales:this.options.locales=n.locales),void 0!==e&&("boolean"==typeof e?this.options.enabled=e:(this.options.enabled=!0,S(this.options,e)),!0===this.options.initiallyActive&&(this.editMode=!0),this._setup())}},{key:"toggleEditMode",value:function(){!0===this.editMode?this.disableEditMode():this.enableEditMode()}},{key:"enableEditMode",value:function(){this.editMode=!0,this._clean(),!0===this.guiEnabled&&(this.manipulationDiv.style.display="block",this.closeDiv.style.display="block",this.editModeDiv.style.display="none",this.showManipulatorToolbar())}},{key:"disableEditMode",value:function(){this.editMode=!1,this._clean(),!0===this.guiEnabled&&(this.manipulationDiv.style.display="none",this.closeDiv.style.display="none",this.editModeDiv.style.display="block",this._createEditButton())}},{key:"showManipulatorToolbar",value:function(){var e,t,n,i,r;this._clean(),this.manipulationDOM={},!0===this.guiEnabled&&(this.editMode=!0,this.manipulationDiv.style.display="block",this.closeDiv.style.display="block",n=(e=this.selectionHandler.getSelectedNodeCount())+(t=this.selectionHandler.getSelectedEdgeCount()),i=this.options.locales[this.options.locale],(r=!1)!==this.options.addNode&&(this._createAddNodeButton(i),r=!0),!1!==this.options.addEdge&&(!0===r?this._createSeperator(1):r=!0,this._createAddEdgeButton(i)),1===e&&"function"==typeof this.options.editNode?(!0===r?this._createSeperator(2):r=!0,this._createEditNodeButton(i)):1===t&&0===e&&!1!==this.options.editEdge&&(!0===r?this._createSeperator(3):r=!0,this._createEditEdgeButton(i)),0!==n&&(0<e&&!1!==this.options.deleteNode||0===e&&!1!==this.options.deleteEdge)&&(!0===r&&this._createSeperator(4),this._createDeleteButton(i)),this._bindElementEvents(this.closeDiv,h(t=this.toggleEditMode).call(t,this)),this._temporaryBindEvent("select",h(n=this.showManipulatorToolbar).call(n,this))),this.body.emitter.emit("_redraw")}},{key:"addNodeMode",value:function(){var e;!0!==this.editMode&&this.enableEditMode(),this._clean(),this.inMode="addNode",!0===this.guiEnabled&&(e=this.options.locales[this.options.locale],this.manipulationDOM={},this._createBackButton(e),this._createSeperator(),this._createDescription(e.addDescription||this.options.locales.en.addDescription),this._bindElementEvents(this.closeDiv,h(e=this.toggleEditMode).call(e,this))),this._temporaryBindEvent("click",h(e=this._performAddNode).call(e,this))}},{key:"editNode",value:function(){var t=this,e=(!0!==this.editMode&&this.enableEditMode(),this._clean(),this.selectionHandler.getSelectedNodes()[0]);if(void 0!==e){if(this.inMode="editNode","function"!=typeof this.options.editNode)throw new Error("No function has been configured to handle the editing of nodes.");if(!0!==e.isCluster){var n=S({},e.options,!1);if(n.x=e.x,n.y=e.y,2!==this.options.editNode.length)throw new Error("The function for edit does not support two arguments (data, callback)");this.options.editNode(n,function(e){null!=e&&"editNode"===t.inMode&&t.body.data.nodes.getDataSet().update(e),t.showManipulatorToolbar()})}else alert(this.options.locales[this.options.locale].editClusterError||this.options.locales.en.editClusterError)}else this.showManipulatorToolbar()}},{key:"addEdgeMode",value:function(){var e;!0!==this.editMode&&this.enableEditMode(),this._clean(),this.inMode="addEdge",!0===this.guiEnabled&&(e=this.options.locales[this.options.locale],this.manipulationDOM={},this._createBackButton(e),this._createSeperator(),this._createDescription(e.edgeDescription||this.options.locales.en.edgeDescription),this._bindElementEvents(this.closeDiv,h(e=this.toggleEditMode).call(e,this))),this._temporaryBindUI("onTouch",h(e=this._handleConnect).call(e,this)),this._temporaryBindUI("onDragEnd",h(e=this._finishConnect).call(e,this)),this._temporaryBindUI("onDrag",h(e=this._dragControlNode).call(e,this)),this._temporaryBindUI("onRelease",h(e=this._finishConnect).call(e,this)),this._temporaryBindUI("onDragStart",h(e=this._dragStartEdge).call(e,this)),this._temporaryBindUI("onHold",function(){})}},{key:"editEdgeMode",value:function(){var e,t,n,i;if((!0!==this.editMode&&this.enableEditMode(),this._clean(),this.inMode="editEdge","object"===b(this.options.editEdge)&&"function"==typeof this.options.editEdge.editWithoutDrag)&&(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],void 0!==this.edgeBeingEditedId))return e=this.body.edges[this.edgeBeingEditedId],void this._performEditEdge(e.from.id,e.to.id);!0===this.guiEnabled&&(e=this.options.locales[this.options.locale],this.manipulationDOM={},this._createBackButton(e),this._createSeperator(),this._createDescription(e.editEdgeDescription||this.options.locales.en.editEdgeDescription),this._bindElementEvents(this.closeDiv,h(e=this.toggleEditMode).call(e,this))),this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],void 0!==this.edgeBeingEditedId?(t=this.body.edges[this.edgeBeingEditedId],n=this._getNewTargetNode(t.from.x,t.from.y),i=this._getNewTargetNode(t.to.x,t.to.y),this.temporaryIds.nodes.push(n.id),this.temporaryIds.nodes.push(i.id),this.body.nodes[n.id]=n,this.body.nodeIndices.push(n.id),this.body.nodes[i.id]=i,this.body.nodeIndices.push(i.id),this._temporaryBindUI("onTouch",h(e=this._controlNodeTouch).call(e,this)),this._temporaryBindUI("onTap",function(){}),this._temporaryBindUI("onHold",function(){}),this._temporaryBindUI("onDragStart",h(e=this._controlNodeDragStart).call(e,this)),this._temporaryBindUI("onDrag",h(e=this._controlNodeDrag).call(e,this)),this._temporaryBindUI("onDragEnd",h(e=this._controlNodeDragEnd).call(e,this)),this._temporaryBindUI("onMouseMove",function(){}),this._temporaryBindEvent("beforeDrawing",function(e){e=t.edgeType.findBorderPositions(e);!1===n.selected&&(n.x=e.from.x,n.y=e.from.y),!1===i.selected&&(i.x=e.to.x,i.y=e.to.y)}),this.body.emitter.emit("_redraw")):this.showManipulatorToolbar()}},{key:"deleteSelected",value:function(){var t=this,e=(!0!==this.editMode&&this.enableEditMode(),this._clean(),this.inMode="delete",this.selectionHandler.getSelectedNodeIds()),n=this.selectionHandler.getSelectedEdgeIds(),i=void 0;if(0<e.length){for(var r=0;r<e.length;r++)if(!0===this.body.nodes[e[r]].isCluster)return void alert(this.options.locales[this.options.locale].deleteClusterError||this.options.locales.en.deleteClusterError);"function"==typeof this.options.deleteNode&&(i=this.options.deleteNode)}else 0<n.length&&"function"==typeof this.options.deleteEdge&&(i=this.options.deleteEdge);if("function"==typeof i){var o={nodes:e,edges:n};if(2!==i.length)throw new Error("The function for delete does not support two arguments (data, callback)");i(o,function(e){null!=e&&"delete"===t.inMode&&(t.body.data.edges.getDataSet().remove(e.edges),t.body.data.nodes.getDataSet().remove(e.nodes)),t.body.emitter.emit("startSimulation"),t.showManipulatorToolbar()})}else this.body.data.edges.getDataSet().remove(n),this.body.data.nodes.getDataSet().remove(e),this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar()}},{key:"_setup",value:function(){!0===this.options.enabled?(this.guiEnabled=!0,this._createWrappers(),!1===this.editMode?this._createEditButton():this.showManipulatorToolbar()):(this._removeManipulationDOM(),this.guiEnabled=!1)}},{key:"_createWrappers",value:function(){var e;void 0===this.manipulationDiv&&(this.manipulationDiv=document.createElement("div"),this.manipulationDiv.className="vis-manipulation",!0===this.editMode?this.manipulationDiv.style.display="block":this.manipulationDiv.style.display="none",this.canvas.frame.appendChild(this.manipulationDiv)),void 0===this.editModeDiv&&(this.editModeDiv=document.createElement("div"),this.editModeDiv.className="vis-edit-mode",!0===this.editMode?this.editModeDiv.style.display="none":this.editModeDiv.style.display="block",this.canvas.frame.appendChild(this.editModeDiv)),void 0===this.closeDiv&&(this.closeDiv=document.createElement("button"),this.closeDiv.className="vis-close",this.closeDiv.setAttribute("aria-label",null!=(e=null==(e=this.options.locales[this.options.locale])?void 0:e.close)?e:this.options.locales.en.close),this.closeDiv.style.display=this.manipulationDiv.style.display,this.canvas.frame.appendChild(this.closeDiv))}},{key:"_getNewTargetNode",value:function(e,t){var n=S({},this.options.controlNodeStyle),n=(n.id="targetNode"+F0(),n.hidden=!1,n.physics=!1,n.x=e,n.y=t,this.body.functions.createNode(n));return n.shape.boundingBox={left:e,right:e,top:t,bottom:t},n}},{key:"_createEditButton",value:function(){this._clean(),this.manipulationDOM={},Ef(this.editModeDiv);var e=this.options.locales[this.options.locale],e=this._createButton("editMode","vis-edit vis-edit-mode",e.edit||this.options.locales.en.edit);this.editModeDiv.appendChild(e),this._bindElementEvents(e,h(e=this.toggleEditMode).call(e,this))}},{key:"_clean",value:function(){!(this.inMode=!1)===this.guiEnabled&&(Ef(this.editModeDiv),Ef(this.manipulationDiv),this._cleanupDOMEventListeners()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit("restorePhysics")}},{key:"_cleanupDOMEventListeners",value:function(){var e,t,n=qx(Lu(e=this._domEventListenerCleanupQueue).call(e,0));try{for(n.s();!(t=n.n()).done;)(0,t.value)()}catch(e){n.e(e)}finally{n.f()}}},{key:"_removeManipulationDOM",value:function(){this._clean(),Ef(this.manipulationDiv),Ef(this.editModeDiv),Ef(this.closeDiv),this.manipulationDiv&&this.canvas.frame.removeChild(this.manipulationDiv),this.editModeDiv&&this.canvas.frame.removeChild(this.editModeDiv),this.closeDiv&&this.canvas.frame.removeChild(this.closeDiv),this.manipulationDiv=void 0,this.editModeDiv=void 0,this.closeDiv=void 0}},{key:"_createSeperator",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:1;this.manipulationDOM["seperatorLineDiv"+e]=document.createElement("div"),this.manipulationDOM["seperatorLineDiv"+e].className="vis-separator-line",this.manipulationDiv.appendChild(this.manipulationDOM["seperatorLineDiv"+e])}},{key:"_createAddNodeButton",value:function(e){var e=this._createButton("addNode","vis-add",e.addNode||this.options.locales.en.addNode);this.manipulationDiv.appendChild(e),this._bindElementEvents(e,h(e=this.addNodeMode).call(e,this))}},{key:"_createAddEdgeButton",value:function(e){var e=this._createButton("addEdge","vis-connect",e.addEdge||this.options.locales.en.addEdge);this.manipulationDiv.appendChild(e),this._bindElementEvents(e,h(e=this.addEdgeMode).call(e,this))}},{key:"_createEditNodeButton",value:function(e){var e=this._createButton("editNode","vis-edit",e.editNode||this.options.locales.en.editNode);this.manipulationDiv.appendChild(e),this._bindElementEvents(e,h(e=this.editNode).call(e,this))}},{key:"_createEditEdgeButton",value:function(e){var e=this._createButton("editEdge","vis-edit",e.editEdge||this.options.locales.en.editEdge);this.manipulationDiv.appendChild(e),this._bindElementEvents(e,h(e=this.editEdgeMode).call(e,this))}},{key:"_createDeleteButton",value:function(e){var t=this.options.rtl?"vis-delete-rtl":"vis-delete",t=this._createButton("delete",t,e.del||this.options.locales.en.del);this.manipulationDiv.appendChild(t),this._bindElementEvents(t,h(e=this.deleteSelected).call(e,this))}},{key:"_createBackButton",value:function(e){var e=this._createButton("back","vis-back",e.back||this.options.locales.en.back);this.manipulationDiv.appendChild(e),this._bindElementEvents(e,h(e=this.showManipulatorToolbar).call(e,this))}},{key:"_createButton",value:function(e,t,n){var i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:"vis-label";return this.manipulationDOM[e+"Div"]=document.createElement("button"),this.manipulationDOM[e+"Div"].className="vis-button "+t,this.manipulationDOM[e+"Label"]=document.createElement("div"),this.manipulationDOM[e+"Label"].className=i,this.manipulationDOM[e+"Label"].innerText=n,this.manipulationDOM[e+"Div"].appendChild(this.manipulationDOM[e+"Label"]),this.manipulationDOM[e+"Div"]}},{key:"_createDescription",value:function(e){this.manipulationDOM.descriptionLabel=document.createElement("div"),this.manipulationDOM.descriptionLabel.className="vis-none",this.manipulationDOM.descriptionLabel.innerText=e,this.manipulationDiv.appendChild(this.manipulationDOM.descriptionLabel)}},{key:"_temporaryBindEvent",value:function(e,t){this.temporaryEventFunctions.push({event:e,boundFunction:t}),this.body.emitter.on(e,t)}},{key:"_temporaryBindUI",value:function(e,t){if(void 0===this.body.eventListeners[e])throw new Error("This UI function does not exist. Typo? You tried: "+e+" possible are: "+ah(w(this.body.eventListeners)));this.temporaryUIFunctions[e]=this.body.eventListeners[e],this.body.eventListeners[e]=t}},{key:"_unbindTemporaryUIs",value:function(){for(var e in this.temporaryUIFunctions)Object.prototype.hasOwnProperty.call(this.temporaryUIFunctions,e)&&(this.body.eventListeners[e]=this.temporaryUIFunctions[e],delete this.temporaryUIFunctions[e]);this.temporaryUIFunctions={}}},{key:"_unbindTemporaryEvents",value:function(){for(var e=0;e<this.temporaryEventFunctions.length;e++){var t=this.temporaryEventFunctions[e].event,n=this.temporaryEventFunctions[e].boundFunction;this.body.emitter.off(t,n)}this.temporaryEventFunctions=[]}},{key:"_bindElementEvents",value:function(e,n){function t(e){var t=e.keyCode;"Enter"!==(e=e.key)&&" "!==e&&13!==t&&32!==t||n()}var i=new sg(e,{});K0(i,n),this._domEventListenerCleanupQueue.push(function(){i.destroy()});e.addEventListener("keyup",t,!1),this._domEventListenerCleanupQueue.push(function(){e.removeEventListener("keyup",t,!1)})}},{key:"_cleanupTemporaryNodesAndEdges",value:function(){for(var e=0;e<this.temporaryIds.edges.length;e++){this.body.edges[this.temporaryIds.edges[e]].disconnect(),delete this.body.edges[this.temporaryIds.edges[e]];var t,n=T(n=this.body.edgeIndices).call(n,this.temporaryIds.edges[e]);-1!==n&&Lu(t=this.body.edgeIndices).call(t,n,1)}for(var i=0;i<this.temporaryIds.nodes.length;i++){delete this.body.nodes[this.temporaryIds.nodes[i]];var r,o=T(o=this.body.nodeIndices).call(o,this.temporaryIds.nodes[i]);-1!==o&&Lu(r=this.body.nodeIndices).call(r,o,1)}this.temporaryIds={nodes:[],edges:[]}}},{key:"_controlNodeTouch",value:function(e){this.selectionHandler.unselectAll(),this.lastTouch=this.body.functions.getPointer(e.center),this.lastTouch.translation=Zn({},this.body.view.translation)}},{key:"_controlNodeDragStart",value:function(){var e=this.lastTouch,e=this.selectionHandler._pointerToPositionObject(e),t=this.body.nodes[this.temporaryIds.nodes[0]],n=this.body.nodes[this.temporaryIds.nodes[1]],i=this.body.edges[this.edgeBeingEditedId],r=(this.selectedControlNode=void 0,t.isOverlappingWith(e)),e=n.isOverlappingWith(e);!0===r?(this.selectedControlNode=t,i.edgeType.from=t):!0===e&&(this.selectedControlNode=n,i.edgeType.to=n),void 0!==this.selectedControlNode&&this.selectionHandler.selectObject(this.selectedControlNode),this.body.emitter.emit("_redraw")}},{key:"_controlNodeDrag",value:function(e){this.body.emitter.emit("disablePhysics");var t=this.body.functions.getPointer(e.center),t=this.canvas.DOMtoCanvas(t);void 0!==this.selectedControlNode?(this.selectedControlNode.x=t.x,this.selectedControlNode.y=t.y):this.interactionHandler.onDrag(e),this.body.emitter.emit("_redraw")}},{key:"_controlNodeDragEnd",value:function(e){var e=this.body.functions.getPointer(e.center),e=this.selectionHandler._pointerToPositionObject(e),t=this.body.edges[this.edgeBeingEditedId];if(void 0!==this.selectedControlNode){this.selectionHandler.unselectAll();for(var n=this.selectionHandler._getAllNodesOverlappingWith(e),i=void 0,r=n.length-1;0<=r;r--)if(n[r]!==this.selectedControlNode.id){i=this.body.nodes[n[r]];break}void 0!==i&&void 0!==this.selectedControlNode?!0===i.isCluster?alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError):(e=this.body.nodes[this.temporaryIds.nodes[0]],this.selectedControlNode.id===e.id?this._performEditEdge(i.id,t.to.id):this._performEditEdge(t.from.id,i.id)):(t.updateEdgeType(),this.body.emitter.emit("restorePhysics")),this.body.emitter.emit("_redraw")}}},{key:"_handleConnect",value:function(e){var t;100<(new Date).valueOf()-this.touchTime&&(this.lastTouch=this.body.functions.getPointer(e.center),this.lastTouch.translation=Zn({},this.body.view.translation),this.interactionHandler.drag.pointer=this.lastTouch,this.interactionHandler.drag.translation=this.lastTouch.translation,e=this.lastTouch,void 0!==(e=this.selectionHandler.getNodeAt(e))&&(!0===e.isCluster?alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError):(t=this._getNewTargetNode(e.x,e.y),this.body.nodes[t.id]=t,this.body.nodeIndices.push(t.id),e=this.body.functions.createEdge({id:"connectionEdge"+F0(),from:e.id,to:t.id,physics:!1,smooth:{enabled:!0,type:"continuous",roundness:.5}}),this.body.edges[e.id]=e,this.body.edgeIndices.push(e.id),this.temporaryIds.nodes.push(t.id),this.temporaryIds.edges.push(e.id))),this.touchTime=(new Date).valueOf())}},{key:"_dragControlNode",value:function(e){for(var t,n=this.body.functions.getPointer(e.center),i=this.selectionHandler._pointerToPositionObject(n),r=void 0,o=(void 0!==this.temporaryIds.edges[0]&&(r=this.body.edges[this.temporaryIds.edges[0]].fromId),this.selectionHandler._getAllNodesOverlappingWith(i)),a=void 0,s=o.length-1;0<=s;s--)if(-1===T(t=this.temporaryIds.nodes).call(t,o[s])){a=this.body.nodes[o[s]];break}e.controlEdge={from:r,to:a?a.id:void 0},this.selectionHandler.generateClickEvent("controlNodeDragging",e,n),void 0!==this.temporaryIds.nodes[0]?((i=this.body.nodes[this.temporaryIds.nodes[0]]).x=this.canvas._XconvertDOMtoCanvas(n.x),i.y=this.canvas._YconvertDOMtoCanvas(n.y),this.body.emitter.emit("_redraw")):this.interactionHandler.onDrag(e)}},{key:"_finishConnect",value:function(e){for(var t,n=this.body.functions.getPointer(e.center),i=this.selectionHandler._pointerToPositionObject(n),r=void 0,o=(void 0!==this.temporaryIds.edges[0]&&(r=this.body.edges[this.temporaryIds.edges[0]].fromId),this.selectionHandler._getAllNodesOverlappingWith(i)),a=void 0,s=o.length-1;0<=s;s--)if(-1===T(t=this.temporaryIds.nodes).call(t,o[s])){a=this.body.nodes[o[s]];break}this._cleanupTemporaryNodesAndEdges(),void 0!==a&&(!0===a.isCluster?alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError):void 0!==this.body.nodes[r]&&void 0!==this.body.nodes[a.id]&&this._performAddEdge(r,a.id)),e.controlEdge={from:r,to:a?a.id:void 0},this.selectionHandler.generateClickEvent("controlNodeDragEnd",e,n),this.body.emitter.emit("_redraw")}},{key:"_dragStartEdge",value:function(e){var t=this.lastTouch;this.selectionHandler.generateClickEvent("dragStart",e,t,void 0,!0)}},{key:"_performAddNode",value:function(e){var t=this,e={id:F0(),x:e.pointer.canvas.x,y:e.pointer.canvas.y,label:"new"};if("function"==typeof this.options.addNode){if(2!==this.options.addNode.length)throw this.showManipulatorToolbar(),new Error("The function for add does not support two arguments (data,callback)");this.options.addNode(e,function(e){null!=e&&"addNode"===t.inMode&&t.body.data.nodes.getDataSet().add(e),t.showManipulatorToolbar()})}else this.body.data.nodes.getDataSet().add(e),this.showManipulatorToolbar()}},{key:"_performAddEdge",value:function(e,t){var n=this,e={from:e,to:t};if("function"==typeof this.options.addEdge){if(2!==this.options.addEdge.length)throw new Error("The function for connect does not support two arguments (data,callback)");this.options.addEdge(e,function(e){null!=e&&"addEdge"===n.inMode&&(n.body.data.edges.getDataSet().add(e),n.selectionHandler.unselectAll(),n.showManipulatorToolbar())})}else this.body.data.edges.getDataSet().add(e),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}},{key:"_performEditEdge",value:function(e,t){var n=this,i={id:this.edgeBeingEditedId,from:e,to:t,label:this.body.data.edges.get(this.edgeBeingEditedId).label},e=this.options.editEdge;if("function"==typeof(e="object"===b(e)?e.editWithoutDrag:e)){if(2!==e.length)throw new Error("The function for edit does not support two arguments (data, callback)");e(i,function(e){null==e||"editEdge"!==n.inMode?(n.body.edges[i.id].updateEdgeType(),n.body.emitter.emit("_redraw")):(n.body.data.edges.getDataSet().update(e),n.selectionHandler.unselectAll()),n.showManipulatorToolbar()})}else this.body.data.edges.getDataSet().update(i),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}}]),o}(),Xx="dom",Qx={configure:{enabled:{boolean:y="boolean"},filter:{boolean:y,string:l="string",array:Bs="array",function:"function"},container:{dom:"dom"},showButton:{boolean:y},__type__:{object:f="object",boolean:y,string:l,array:Bs,function:"function"}},edges:{arrows:{to:{enabled:{boolean:y},scaleFactor:{number:d="number"},type:{string:o=["arrow","bar","box","circle","crow","curve","diamond","image","inv_curve","inv_triangle","triangle","vee"]},imageHeight:{number:d},imageWidth:{number:d},src:{string:l},__type__:{object:f,boolean:y}},middle:{enabled:{boolean:y},scaleFactor:{number:d},type:{string:o},imageWidth:{number:d},imageHeight:{number:d},src:{string:l},__type__:{object:f,boolean:y}},from:{enabled:{boolean:y},scaleFactor:{number:d},type:{string:o},imageWidth:{number:d},imageHeight:{number:d},src:{string:l},__type__:{object:f,boolean:y}},__type__:{string:["from","to","middle"],object:f}},endPointOffset:{from:{number:d},to:{number:d},__type__:{object:f,number:d}},arrowStrikethrough:{boolean:y},background:{enabled:{boolean:y},color:{string:l},size:{number:d},dashes:{boolean:y,array:Bs},__type__:{object:f,boolean:y}},chosen:{label:{boolean:y,function:"function"},edge:{boolean:y,function:"function"},__type__:{object:f,boolean:y}},color:{color:{string:l},highlight:{string:l},hover:{string:l},inherit:{string:["from","to","both"],boolean:y},opacity:{number:d},__type__:{object:f,string:l}},dashes:{boolean:y,array:Bs},font:{color:{string:l},size:{number:d},face:{string:l},background:{string:l},strokeWidth:{number:d},strokeColor:{string:l},align:{string:["horizontal","top","middle","bottom"]},vadjust:{number:d},multi:{boolean:y,string:l},bold:{color:{string:l},size:{number:d},face:{string:l},mod:{string:l},vadjust:{number:d},__type__:{object:f,string:l}},boldital:{color:{string:l},size:{number:d},face:{string:l},mod:{string:l},vadjust:{number:d},__type__:{object:f,string:l}},ital:{color:{string:l},size:{number:d},face:{string:l},mod:{string:l},vadjust:{number:d},__type__:{object:f,string:l}},mono:{color:{string:l},size:{number:d},face:{string:l},mod:{string:l},vadjust:{number:d},__type__:{object:f,string:l}},__type__:{object:f,string:l}},hidden:{boolean:y},hoverWidth:{function:"function",number:d},label:{string:l,undefined:"undefined"},labelHighlightBold:{boolean:y},length:{number:d,undefined:"undefined"},physics:{boolean:y},scaling:{min:{number:d},max:{number:d},label:{enabled:{boolean:y},min:{number:d},max:{number:d},maxVisible:{number:d},drawThreshold:{number:d},__type__:{object:f,boolean:y}},customScalingFunction:{function:"function"},__type__:{object:f}},selectionWidth:{function:"function",number:d},selfReferenceSize:{number:d},selfReference:{size:{number:d},angle:{number:d},renderBehindTheNode:{boolean:y},__type__:{object:f}},shadow:{enabled:{boolean:y},color:{string:l},size:{number:d},x:{number:d},y:{number:d},__type__:{object:f,boolean:y}},smooth:{enabled:{boolean:y},type:{string:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"]},roundness:{number:d},forceDirection:{string:["horizontal","vertical","none"],boolean:y},__type__:{object:f,boolean:y}},title:{string:l,undefined:"undefined"},width:{number:d},widthConstraint:{maximum:{number:d},__type__:{object:f,boolean:y,number:d}},value:{number:d,undefined:"undefined"},__type__:{object:f}},groups:{useDefaultGroups:{boolean:y},__any__:u={borderWidth:{number:d},borderWidthSelected:{number:d,undefined:"undefined"},brokenImage:{string:l,undefined:"undefined"},chosen:{label:{boolean:y,function:"function"},node:{boolean:y,function:"function"},__type__:{object:f,boolean:y}},color:{border:{string:l},background:{string:l},highlight:{border:{string:l},background:{string:l},__type__:{object:f,string:l}},hover:{border:{string:l},background:{string:l},__type__:{object:f,string:l}},__type__:{object:f,string:l}},opacity:{number:d,undefined:"undefined"},fixed:{x:{boolean:y},y:{boolean:y},__type__:{object:f,boolean:y}},font:{align:{string:l},color:{string:l},size:{number:d},face:{string:l},background:{string:l},strokeWidth:{number:d},strokeColor:{string:l},vadjust:{number:d},multi:{boolean:y,string:l},bold:{color:{string:l},size:{number:d},face:{string:l},mod:{string:l},vadjust:{number:d},__type__:{object:f,string:l}},boldital:{color:{string:l},size:{number:d},face:{string:l},mod:{string:l},vadjust:{number:d},__type__:{object:f,string:l}},ital:{color:{string:l},size:{number:d},face:{string:l},mod:{string:l},vadjust:{number:d},__type__:{object:f,string:l}},mono:{color:{string:l},size:{number:d},face:{string:l},mod:{string:l},vadjust:{number:d},__type__:{object:f,string:l}},__type__:{object:f,string:l}},group:{string:l,number:d,undefined:"undefined"},heightConstraint:{minimum:{number:d},valign:{string:l},__type__:{object:f,boolean:y,number:d}},hidden:{boolean:y},icon:{face:{string:l},code:{string:l},size:{number:d},color:{string:l},weight:{string:l,number:d},__type__:{object:f}},id:{string:l,number:d},image:{selected:{string:l,undefined:"undefined"},unselected:{string:l,undefined:"undefined"},__type__:{object:f,string:l}},imagePadding:{top:{number:d},right:{number:d},bottom:{number:d},left:{number:d},__type__:{object:f,number:d}},label:{string:l,undefined:"undefined"},labelHighlightBold:{boolean:y},level:{number:d,undefined:"undefined"},margin:{top:{number:d},right:{number:d},bottom:{number:d},left:{number:d},__type__:{object:f,number:d}},mass:{number:d},physics:{boolean:y},scaling:{min:{number:d},max:{number:d},label:{enabled:{boolean:y},min:{number:d},max:{number:d},maxVisible:{number:d},drawThreshold:{number:d},__type__:{object:f,boolean:y}},customScalingFunction:{function:"function"},__type__:{object:f}},shadow:{enabled:{boolean:y},color:{string:l},size:{number:d},x:{number:d},y:{number:d},__type__:{object:f,boolean:y}},shape:{string:["custom","ellipse","circle","database","box","text","image","circularImage","diamond","dot","star","triangle","triangleDown","square","icon","hexagon"]},ctxRenderer:{function:"function"},shapeProperties:{borderDashes:{boolean:y,array:Bs},borderRadius:{number:d},interpolation:{boolean:y},useImageSize:{boolean:y},useBorderWithImage:{boolean:y},coordinateOrigin:{string:["center","top-left"]},__type__:{object:f}},size:{number:d},title:{string:l,dom:"dom",undefined:"undefined"},value:{number:d,undefined:"undefined"},widthConstraint:{minimum:{number:d},maximum:{number:d},__type__:{object:f,boolean:y,number:d}},x:{number:d},y:{number:d},__type__:{object:f}},__type__:{object:f}},interaction:{dragNodes:{boolean:y},dragView:{boolean:y},hideEdgesOnDrag:{boolean:y},hideEdgesOnZoom:{boolean:y},hideNodesOnDrag:{boolean:y},hover:{boolean:y},keyboard:{enabled:{boolean:y},speed:{x:{number:d},y:{number:d},zoom:{number:d},__type__:{object:f}},bindToWindow:{boolean:y},autoFocus:{boolean:y},__type__:{object:f,boolean:y}},multiselect:{boolean:y},navigationButtons:{boolean:y},selectable:{boolean:y},selectConnectedEdges:{boolean:y},hoverConnectedEdges:{boolean:y},tooltipDelay:{number:d},zoomView:{boolean:y},zoomSpeed:{number:d},__type__:{object:f}},layout:{randomSeed:{undefined:"undefined",number:d,string:l},improvedLayout:{boolean:y},clusterThreshold:{number:d},hierarchical:{enabled:{boolean:y},levelSeparation:{number:d},nodeSpacing:{number:d},treeSpacing:{number:d},blockShifting:{boolean:y},edgeMinimization:{boolean:y},parentCentralization:{boolean:y},direction:{string:["UD","DU","LR","RL"]},sortMethod:{string:["hubsize","directed"]},shakeTowards:{string:["leaves","roots"]},__type__:{object:f,boolean:y}},__type__:{object:f}},manipulation:{enabled:{boolean:y},initiallyActive:{boolean:y},addNode:{boolean:y,function:"function"},addEdge:{boolean:y,function:"function"},editNode:{function:"function"},editEdge:{editWithoutDrag:{function:"function"},__type__:{object:f,boolean:y,function:"function"}},deleteNode:{boolean:y,function:"function"},deleteEdge:{boolean:y,function:"function"},controlNodeStyle:u,__type__:{object:f,boolean:y}},nodes:u,physics:{enabled:{boolean:y},barnesHut:{theta:{number:d},gravitationalConstant:{number:d},centralGravity:{number:d},springLength:{number:d},springConstant:{number:d},damping:{number:d},avoidOverlap:{number:d},__type__:{object:f}},forceAtlas2Based:{theta:{number:d},gravitationalConstant:{number:d},centralGravity:{number:d},springLength:{number:d},springConstant:{number:d},damping:{number:d},avoidOverlap:{number:d},__type__:{object:f}},repulsion:{centralGravity:{number:d},springLength:{number:d},springConstant:{number:d},nodeDistance:{number:d},damping:{number:d},__type__:{object:f}},hierarchicalRepulsion:{centralGravity:{number:d},springLength:{number:d},springConstant:{number:d},nodeDistance:{number:d},damping:{number:d},avoidOverlap:{number:d},__type__:{object:f}},maxVelocity:{number:d},minVelocity:{number:d},solver:{string:["barnesHut","repulsion","hierarchicalRepulsion","forceAtlas2Based"]},stabilization:{enabled:{boolean:y},iterations:{number:d},updateInterval:{number:d},onlyDynamicEdges:{boolean:y},fit:{boolean:y},__type__:{object:f,boolean:y}},timestep:{number:d},adaptiveTimestep:{boolean:y},wind:{x:{number:d},y:{number:d},__type__:{object:f}},__type__:{object:f,boolean:y}},autoResize:{boolean:y},clickToUse:{boolean:y},locale:{string:l},locales:{__any__:{any:"any"},__type__:{object:f}},height:{string:l},width:{string:l},__type__:{object:f}},Zx={nodes:{borderWidth:[1,0,10,1],borderWidthSelected:[2,0,10,1],color:{border:["color","#2B7CE9"],background:["color","#97C2FC"],highlight:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]},hover:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]}},opacity:[0,0,1,.1],fixed:{x:!1,y:!1},font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[0,0,50,1],strokeColor:["color","#ffffff"]},hidden:!1,labelHighlightBold:!0,physics:!0,scaling:{min:[10,0,200,1],max:[30,0,200,1],label:{enabled:!1,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},shape:["ellipse","box","circle","database","diamond","dot","square","star","text","triangle","triangleDown","hexagon"],shapeProperties:{borderDashes:!1,borderRadius:[6,0,20,1],interpolation:!0,useImageSize:!1},size:[25,0,200,1]},edges:{arrows:{to:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"},middle:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"},from:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"}},endPointOffset:{from:[0,-10,10,1],to:[0,-10,10,1]},arrowStrikethrough:!0,color:{color:["color","#848484"],highlight:["color","#848484"],hover:["color","#848484"],inherit:["from","to","both",!0,!1],opacity:[1,0,1,.05]},dashes:!1,font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[2,0,50,1],strokeColor:["color","#ffffff"],align:["horizontal","top","middle","bottom"]},hidden:!1,hoverWidth:[1.5,0,5,.1],labelHighlightBold:!0,physics:!0,scaling:{min:[1,0,100,1],max:[15,0,100,1],label:{enabled:!0,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},selectionWidth:[1.5,0,5,.1],selfReferenceSize:[20,0,200,1],selfReference:{size:[20,0,200,1],angle:[Math.PI/2,-6*Math.PI,6*Math.PI,Math.PI/8],renderBehindTheNode:!0},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},smooth:{enabled:!0,type:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"],forceDirection:["horizontal","vertical","none"],roundness:[.5,0,1,.05]},width:[1,0,30,1]},layout:{hierarchical:{enabled:!1,levelSeparation:[150,20,500,5],nodeSpacing:[100,20,500,5],treeSpacing:[200,20,500,5],blockShifting:!0,edgeMinimization:!0,parentCentralization:!0,direction:["UD","DU","LR","RL"],sortMethod:["hubsize","directed"],shakeTowards:["leaves","roots"]}},interaction:{dragNodes:!0,dragView:!0,hideEdgesOnDrag:!1,hideEdgesOnZoom:!1,hideNodesOnDrag:!1,hover:!1,keyboard:{enabled:!1,speed:{x:[10,0,40,1],y:[10,0,40,1],zoom:[.02,0,.1,.005]},bindToWindow:!0,autoFocus:!0},multiselect:!1,navigationButtons:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0,tooltipDelay:[300,0,1e3,25],zoomView:!0,zoomSpeed:[1,.1,2,.1]},manipulation:{enabled:!1,initiallyActive:!1},physics:{enabled:!0,barnesHut:{theta:[.5,.1,1,.05],gravitationalConstant:[-2e3,-3e4,0,50],centralGravity:[.3,0,10,.05],springLength:[95,0,500,5],springConstant:[.04,0,1.2,.005],damping:[.09,0,1,.01],avoidOverlap:[0,0,1,.01]},forceAtlas2Based:{theta:[.5,.1,1,.05],gravitationalConstant:[-50,-500,0,1],centralGravity:[.01,0,1,.005],springLength:[95,0,500,5],springConstant:[.08,0,1.2,.005],damping:[.4,0,1,.01],avoidOverlap:[0,0,1,.01]},repulsion:{centralGravity:[.2,0,10,.05],springLength:[200,0,500,5],springConstant:[.05,0,1.2,.005],nodeDistance:[100,0,500,5],damping:[.09,0,1,.01]},hierarchicalRepulsion:{centralGravity:[.2,0,10,.05],springLength:[100,0,500,5],springConstant:[.01,0,1.2,.005],nodeDistance:[120,0,500,5],damping:[.09,0,1,.01],avoidOverlap:[0,0,1,.01]},maxVelocity:[50,0,150,1],minVelocity:[.1,.01,.5,.01],solver:["barnesHut","forceAtlas2Based","repulsion","hierarchicalRepulsion"],timestep:[.5,.01,1,.01],wind:{x:[0,-10,10,.1],y:[0,-10,10,.1]}}},Pn=Object.freeze({__proto__:null,configuratorHideOption:Yx,allOptions:Qx,configureOptions:Zx}),ew=function(){function e(){m(this,e)}return v(e,[{key:"getDistances",value:function(e,t,n){for(var i={},r=e.edges,o=0;o<t.length;o++){var a={};i[t[o]]=a;for(var s=0;s<t.length;s++)a[t[s]]=o==s?0:1e9}for(var l=0;l<n.length;l++){var c=r[n[l]];!0===c.connected&&void 0!==i[c.fromId]&&void 0!==i[c.toId]&&(i[c.fromId][c.toId]=1,i[c.toId][c.fromId]=1)}for(var u=t.length,d=0;d<u;d++)for(var h=t[d],p=i[h],f=0;f<u-1;f++)for(var g=t[f],y=i[g],m=f+1;m<u;m++){var v=t[m],b=i[v],x=Math.min(y[v],y[h]+p[v]);y[v]=x,b[g]=x}return i}}]),e}(),tw=function(){function i(e,t,n){m(this,i),this.body=e,this.springLength=t,this.springConstant=n,this.distanceSolver=new ew}return v(i,[{key:"setOptions",value:function(e){e&&(e.springLength&&(this.springLength=e.springLength),e.springConstant&&(this.springConstant=e.springConstant))}},{key:"solve",value:function(e,t){for(var n=2<arguments.length&&void 0!==arguments[2]&&arguments[2],i=this.distanceSolver.getDistances(this.body,e,t),r=(this._createL_matrix(i),this._createK_matrix(i),this._createE_matrix(),0),o=Math.max(1e3,Math.min(10*this.body.nodeIndices.length,6e3)),a=1e9,s=0,l=0,c=0,u=0;.01<a&&r<o;){r+=1;var d=L(this._getHighestEnergyNode(n),4),h=d[0],a=d[1];for(s=d[2],l=d[3],c=a,u=0;1<c&&u<5;){u+=1,this._moveNode(h,s,l);var p=L(this._getEnergy(h),3),c=p[0],s=p[1],l=p[2]}}}},{key:"_getHighestEnergyNode",value:function(e){for(var t=this.body.nodeIndices,n=this.body.nodes,i=0,r=t[0],o=0,a=0,s=0;s<t.length;s++){var l,c,u,d=t[s];(!0!==n[d].predefinedPosition||!0===n[d].isCluster&&!0===e||!0!==n[d].options.fixed.x||!0!==n[d].options.fixed.y)&&(l=(u=L(this._getEnergy(d),3))[0],c=u[1],u=u[2],i<l&&(i=l,r=d,o=c,a=u))}return[r,i,o,a]}},{key:"_getEnergy",value:function(e){var e=L(this.E_sums[e],2),t=e[0],e=e[1];return[Math.sqrt(Math.pow(t,2)+Math.pow(e,2)),t,e]}},{key:"_moveNode",value:function(e,t,n){for(var i=this.body.nodeIndices,r=this.body.nodes,o=0,a=0,s=0,l=r[e].x,c=r[e].y,u=this.K_matrix[e],d=this.L_matrix[e],h=0;h<i.length;h++){var p,f,g,y,m=i[h];m!==e&&(p=r[m].x,f=r[m].y,g=u[m],m=d[m],y=1/Math.pow(Math.pow(l-p,2)+Math.pow(c-f,2),1.5),o+=g*(1-m*Math.pow(c-f,2)*y),a+=g*(m*(l-p)*(c-f)*y),s+=g*(1-m*Math.pow(l-p,2)*y))}var v=o,b=a,n=(t/v+n/b)/(b/v-s/b);r[e].x+=-(b*n+t)/v,r[e].y+=n,this._updateE_matrix(e)}},{key:"_createL_matrix",value:function(e){var t=this.body.nodeIndices,n=this.springLength;this.L_matrix=[];for(var i=0;i<t.length;i++){this.L_matrix[t[i]]={};for(var r=0;r<t.length;r++)this.L_matrix[t[i]][t[r]]=n*e[t[i]][t[r]]}}},{key:"_createK_matrix",value:function(e){var t=this.body.nodeIndices,n=this.springConstant;this.K_matrix=[];for(var i=0;i<t.length;i++){this.K_matrix[t[i]]={};for(var r=0;r<t.length;r++)this.K_matrix[t[i]][t[r]]=n*Math.pow(e[t[i]][t[r]],-2)}}},{key:"_createE_matrix",value:function(){var e=this.body.nodeIndices,t=this.body.nodes;this.E_matrix={},this.E_sums={};for(var n=0;n<e.length;n++)this.E_matrix[e[n]]=[];for(var i=0;i<e.length;i++){for(var r=e[i],o=t[r].x,a=t[r].y,s=0,l=0,c=i;c<e.length;c++){var u,d,h,p=e[c];p!==r&&(u=t[p].x,d=t[p].y,h=1/Math.sqrt(Math.pow(o-u,2)+Math.pow(a-d,2)),this.E_matrix[r][c]=[this.K_matrix[r][p]*(o-u-this.L_matrix[r][p]*(o-u)*h),this.K_matrix[r][p]*(a-d-this.L_matrix[r][p]*(a-d)*h)],this.E_matrix[p][i]=this.E_matrix[r][c],s+=this.E_matrix[r][c][0],l+=this.E_matrix[r][c][1])}this.E_sums[r]=[s,l]}}},{key:"_updateE_matrix",value:function(e){for(var t=this.body.nodeIndices,n=this.body.nodes,i=this.E_matrix[e],r=this.K_matrix[e],o=this.L_matrix[e],a=n[e].x,s=n[e].y,l=0,c=0,u=0;u<t.length;u++){var d,h,p,f,g,y=t[u];y!==e&&(d=(h=i[u])[0],h=h[1],p=n[y].x,f=n[y].y,g=1/Math.sqrt(Math.pow(a-p,2)+Math.pow(s-f,2)),p=r[y]*(a-p-o[y]*(a-p)*g),f=r[y]*(s-f-o[y]*(s-f)*g),i[u]=[p,f],l+=p,c+=f,(g=this.E_sums[y])[0]+=p-d,g[1]+=f-h)}this.E_sums[e]=[l,c]}}]),i}();function M(e,t,n){var i=this;if(!(this instanceof M))throw new SyntaxError("Constructor must be called with the new operator");this.options={},this.defaultOptions={locale:"en",locales:Wg,clickToUse:!1},Zn(this.options,this.defaultOptions),this.body={container:e,nodes:{},nodeIndices:[],edges:{},edgeIndices:[],emitter:{on:h(e=this.on).call(e,this),off:h(e=this.off).call(e,this),emit:h(e=this.emit).call(e,this),once:h(e=this.once).call(e,this)},eventListeners:{onTap:function(){},onTouch:function(){},onDoubleTap:function(){},onHold:function(){},onDragStart:function(){},onDrag:function(){},onDragEnd:function(){},onMouseWheel:function(){},onPinch:function(){},onMouseMove:function(){},onRelease:function(){},onContext:function(){}},data:{nodes:null,edges:null},functions:{createNode:function(){},createEdge:function(){},getPointer:function(){}},modules:{},view:{scale:1,translation:{x:0,y:0}},selectionBox:{show:!1,position:{start:{x:0,y:0},end:{x:0,y:0}}}},this.bindEventListeners(),this.images=new Gg(function(){return i.body.emitter.emit("_requestRedraw")}),this.groups=new cm,this.canvas=new J0(this.body),this.selectionHandler=new J1(this.body,this.canvas),this.interactionHandler=new r1(this.body,this.canvas,this.selectionHandler),this.view=new Q0(this.body,this.canvas),this.renderer=new q0(this.body,this.canvas),this.physics=new T0(this.body),this.layoutEngine=new Ux(this.body),this.clustering=new z0(this.body),this.manipulation=new Jx(this.body,this.canvas,this.selectionHandler,this.interactionHandler),this.nodesHandler=new gb(this.body,this.images,this.groups,this.layoutEngine),this.edgesHandler=new f0(this.body,this.images,this.groups),this.body.modules.kamadaKawai=new tw(this.body,150,.05),this.body.modules.clustering=this.clustering,this.canvas._create(),this.setOptions(n),this.setData(t)}G(M.prototype),M.prototype.setOptions=function(e){var t,n=this;void 0!==(e=null===e?void 0:e)&&(!0===ug.validate(e,Qx)&&console.error("%cErrors have been found in the supplied options object.",cg),Pf(["locale","locales","clickToUse"],this.options,e),void 0!==e.locale&&(e.locale=Vg(e.locales||this.options.locales,e.locale)),e=this.layoutEngine.setOptions(e.layout,e),this.canvas.setOptions(e),this.groups.setOptions(e.groups),this.nodesHandler.setOptions(e.nodes),this.edgesHandler.setOptions(e.edges),this.physics.setOptions(e.physics),this.manipulation.setOptions(e.manipulation,e,this.options),this.interactionHandler.setOptions(e.interaction),this.renderer.setOptions(e.interaction),this.selectionHandler.setOptions(e.interaction),void 0!==e.groups&&this.body.emitter.emit("refreshNodes"),"configure"in e&&(this.configurator||(this.configurator=new ag(this,this.body.container,Zx,this.canvas.pixelRatio,Yx)),this.configurator.setOptions(e.configure)),this.configurator&&!0===this.configurator.options.enabled&&(S((t={nodes:{},edges:{},layout:{},interaction:{},manipulation:{},physics:{},global:{}}).nodes,this.nodesHandler.options),S(t.edges,this.edgesHandler.options),S(t.layout,this.layoutEngine.options),S(t.interaction,this.selectionHandler.options),S(t.interaction,this.renderer.options),S(t.interaction,this.interactionHandler.options),S(t.manipulation,this.manipulation.options),S(t.physics,this.physics.options),S(t.global,this.canvas.options),S(t.global,this.options),this.configurator.setModuleOptions(t)),void 0!==e.clickToUse?!0===e.clickToUse?void 0===this.activator&&(this.activator=new og(this.canvas.frame),this.activator.on("change",function(){n.body.emitter.emit("activate")})):(void 0!==this.activator&&(this.activator.destroy(),delete this.activator),this.body.emitter.emit("activate")):this.body.emitter.emit("activate"),this.canvas.setSize(),this.body.emitter.emit("startSimulation"))},M.prototype._updateVisibleIndices=function(){var e,t,n,i,r,o,a=this.body.nodes,s=this.body.edges;for(e in this.body.nodeIndices=[],this.body.edgeIndices=[],a)!Object.prototype.hasOwnProperty.call(a,e)||this.clustering._isClusteredNode(e)||!1!==a[e].options.hidden||this.body.nodeIndices.push(a[e].id);for(t in s)Object.prototype.hasOwnProperty.call(s,t)&&(i=a[(n=s[t]).fromId],r=a[n.toId],o=void 0!==i&&void 0!==r,!this.clustering._isClusteredEdge(t)&&!1===n.options.hidden&&o&&!1===i.options.hidden&&!1===r.options.hidden&&this.body.edgeIndices.push(n.id))},M.prototype.bindEventListeners=function(){var e=this;this.body.emitter.on("_dataChanged",function(){e.edgesHandler._updateState(),e.body.emitter.emit("_dataUpdated")}),this.body.emitter.on("_dataUpdated",function(){e.clustering._updateState(),e._updateVisibleIndices(),e._updateValueRange(e.body.nodes),e._updateValueRange(e.body.edges),e.body.emitter.emit("startSimulation"),e.body.emitter.emit("_requestRedraw")})},M.prototype.setData=function(e){if(this.body.emitter.emit("resetPhysics"),this.body.emitter.emit("_resetData"),this.selectionHandler.unselectAll(),e&&e.dot&&(e.nodes||e.edges))throw new SyntaxError('Data must contain either parameter "dot" or parameter pair "nodes" and "edges", but not both.');var t;return this.setOptions(e&&e.options),e&&e.dot?(console.warn("The dot property has been deprecated. Please use the static convertDot method to convert DOT into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertDot(dotString);"),t=zg(e.dot),void this.setData(t)):e&&e.gephi?(console.warn("The gephi property has been deprecated. Please use the static convertGephi method to convert gephi into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertGephi(gephiJson);"),t=Hg(e.gephi),void this.setData(t)):(this.nodesHandler.setData(e&&e.nodes,!0),this.edgesHandler.setData(e&&e.edges,!0),this.body.emitter.emit("_dataChanged"),this.body.emitter.emit("_dataLoaded"),void this.body.emitter.emit("initPhysics"))},M.prototype.destroy=function(){for(var e in this.body.emitter.emit("destroy"),this.body.emitter.off(),this.off(),delete this.groups,delete this.canvas,delete this.selectionHandler,delete this.interactionHandler,delete this.view,delete this.renderer,delete this.physics,delete this.layoutEngine,delete this.clustering,delete this.manipulation,delete this.nodesHandler,delete this.edgesHandler,delete this.configurator,delete this.images,this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,e)&&delete this.body.nodes[e];for(var t in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,t)&&delete this.body.edges[t];Ef(this.body.container)},M.prototype._updateValueRange=function(e){var t,n,i=void 0,r=void 0,o=0;for(t in e)!Object.prototype.hasOwnProperty.call(e,t)||void 0!==(n=e[t].getValue())&&(i=void 0===i?n:Math.min(n,i),r=void 0===r?n:Math.max(n,r),o+=n);if(void 0!==i&&void 0!==r)for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&e[t].setValueRange(i,r,o)},M.prototype.isActive=function(){return!this.activator||this.activator.active},M.prototype.setSize=function(){return this.canvas.setSize.apply(this.canvas,arguments)},M.prototype.canvasToDOM=function(){return this.canvas.canvasToDOM.apply(this.canvas,arguments)},M.prototype.DOMtoCanvas=function(){return this.canvas.DOMtoCanvas.apply(this.canvas,arguments)},M.prototype.findNode=function(){return this.clustering.findNode.apply(this.clustering,arguments)},M.prototype.isCluster=function(){return this.clustering.isCluster.apply(this.clustering,arguments)},M.prototype.openCluster=function(){return this.clustering.openCluster.apply(this.clustering,arguments)},M.prototype.cluster=function(){return this.clustering.cluster.apply(this.clustering,arguments)},M.prototype.getNodesInCluster=function(){return this.clustering.getNodesInCluster.apply(this.clustering,arguments)},M.prototype.clusterByConnection=function(){return this.clustering.clusterByConnection.apply(this.clustering,arguments)},M.prototype.clusterByHubsize=function(){return this.clustering.clusterByHubsize.apply(this.clustering,arguments)},M.prototype.updateClusteredNode=function(){return this.clustering.updateClusteredNode.apply(this.clustering,arguments)},M.prototype.getClusteredEdges=function(){return this.clustering.getClusteredEdges.apply(this.clustering,arguments)},M.prototype.getBaseEdge=function(){return this.clustering.getBaseEdge.apply(this.clustering,arguments)},M.prototype.getBaseEdges=function(){return this.clustering.getBaseEdges.apply(this.clustering,arguments)},M.prototype.updateEdge=function(){return this.clustering.updateEdge.apply(this.clustering,arguments)},M.prototype.clusterOutliers=function(){return this.clustering.clusterOutliers.apply(this.clustering,arguments)},M.prototype.getSeed=function(){return this.layoutEngine.getSeed.apply(this.layoutEngine,arguments)},M.prototype.enableEditMode=function(){return this.manipulation.enableEditMode.apply(this.manipulation,arguments)},M.prototype.disableEditMode=function(){return this.manipulation.disableEditMode.apply(this.manipulation,arguments)},M.prototype.addNodeMode=function(){return this.manipulation.addNodeMode.apply(this.manipulation,arguments)},M.prototype.editNode=function(){return this.manipulation.editNode.apply(this.manipulation,arguments)},M.prototype.editNodeMode=function(){return console.warn("Deprecated: Please use editNode instead of editNodeMode."),this.manipulation.editNode.apply(this.manipulation,arguments)},M.prototype.addEdgeMode=function(){return this.manipulation.addEdgeMode.apply(this.manipulation,arguments)},M.prototype.editEdgeMode=function(){return this.manipulation.editEdgeMode.apply(this.manipulation,arguments)},M.prototype.deleteSelected=function(){return this.manipulation.deleteSelected.apply(this.manipulation,arguments)},M.prototype.getPositions=function(){return this.nodesHandler.getPositions.apply(this.nodesHandler,arguments)},M.prototype.getPosition=function(){return this.nodesHandler.getPosition.apply(this.nodesHandler,arguments)},M.prototype.storePositions=function(){return this.nodesHandler.storePositions.apply(this.nodesHandler,arguments)},M.prototype.moveNode=function(){return this.nodesHandler.moveNode.apply(this.nodesHandler,arguments)},M.prototype.getBoundingBox=function(){return this.nodesHandler.getBoundingBox.apply(this.nodesHandler,arguments)},M.prototype.getConnectedNodes=function(e){return void 0!==this.body.nodes[e]?this.nodesHandler.getConnectedNodes.apply(this.nodesHandler,arguments):this.edgesHandler.getConnectedNodes.apply(this.edgesHandler,arguments)},M.prototype.getConnectedEdges=function(){return this.nodesHandler.getConnectedEdges.apply(this.nodesHandler,arguments)},M.prototype.startSimulation=function(){return this.physics.startSimulation.apply(this.physics,arguments)},M.prototype.stopSimulation=function(){return this.physics.stopSimulation.apply(this.physics,arguments)},M.prototype.stabilize=function(){return this.physics.stabilize.apply(this.physics,arguments)},M.prototype.getSelection=function(){return this.selectionHandler.getSelection.apply(this.selectionHandler,arguments)},M.prototype.setSelection=function(){return this.selectionHandler.setSelection.apply(this.selectionHandler,arguments)},M.prototype.getSelectedNodes=function(){return this.selectionHandler.getSelectedNodeIds.apply(this.selectionHandler,arguments)},M.prototype.getSelectedEdges=function(){return this.selectionHandler.getSelectedEdgeIds.apply(this.selectionHandler,arguments)},M.prototype.getNodeAt=function(){var e=this.selectionHandler.getNodeAt.apply(this.selectionHandler,arguments);return void 0!==e&&void 0!==e.id?e.id:e},M.prototype.getEdgeAt=function(){var e=this.selectionHandler.getEdgeAt.apply(this.selectionHandler,arguments);return void 0!==e&&void 0!==e.id?e.id:e},M.prototype.selectNodes=function(){return this.selectionHandler.selectNodes.apply(this.selectionHandler,arguments)},M.prototype.selectEdges=function(){return this.selectionHandler.selectEdges.apply(this.selectionHandler,arguments)},M.prototype.unselectAll=function(){this.selectionHandler.unselectAll.apply(this.selectionHandler,arguments),this.selectionHandler.commitWithoutEmitting.apply(this.selectionHandler),this.redraw()},M.prototype.redraw=function(){return this.renderer.redraw.apply(this.renderer,arguments)},M.prototype.getScale=function(){return this.view.getScale.apply(this.view,arguments)},M.prototype.getViewPosition=function(){return this.view.getViewPosition.apply(this.view,arguments)},M.prototype.fit=function(){return this.view.fit.apply(this.view,arguments)},M.prototype.moveTo=function(){return this.view.moveTo.apply(this.view,arguments)},M.prototype.focus=function(){return this.view.focus.apply(this.view,arguments)},M.prototype.releaseNode=function(){return this.view.releaseNode.apply(this.view,arguments)},M.prototype.getOptionsFromConfigurator=function(){var e={};return e=this.configurator?this.configurator.getOptions.apply(this.configurator):e},p=zg,U.Network=M,U.NetworkImages=Gg,U.networkDOTParser=tl,U.networkGephiParser=ss,U.networkOptions=Pn,U.parseDOTNetwork=p,U.parseGephiNetwork=Hg,Object.defineProperty(U,"__esModule",{value:!0})}(),{}),_interopRequireDefault=interopRequireDefault.exports,default_1=(Object.defineProperty(ErrorOutlineOutlined,"__esModule",{value:!0}),ErrorOutlineOutlined.default=void 0),_createSvgIcon=_interopRequireDefault(createSvgIcon),_jsxRuntime=jsxRuntime.exports,_default=(0,_createSvgIcon.default)((0,_jsxRuntime.jsx)("path",{d:"M11 15h2v2h-2v-2zm0-8h2v6h-2V7zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutlineOutlined"),default_1=ErrorOutlineOutlined.default=_default,commonjsGlobal=(!function(){var e={};try{if(process)return process.env=Object.assign({},process.env),Object.assign(process.env,e)}catch(e){}globalThis.process={env:e}}(),"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{}),fails$j=function(e){try{return!!e()}catch(e){return!0}},fails$i=fails$j,functionBindNative=!fails$j(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),NATIVE_BIND$2=functionBindNative,FunctionPrototype$2=Function.prototype,bind=FunctionPrototype$2.bind,call$b=FunctionPrototype$2.call,uncurryThis$k=NATIVE_BIND$2&&bind.bind(call$b,call$b),functionUncurryThis=NATIVE_BIND$2?function(e){return e&&uncurryThis$k(e)}:function(e){return e&&function(){return call$b.apply(e,arguments)}},uncurryThis$j=functionUncurryThis,toString$8=uncurryThis$j({}.toString),stringSlice$5=uncurryThis$j("".slice),classofRaw$1=function(e){return stringSlice$5(toString$8(e),8,-1)},uncurryThis$i=functionUncurryThis,fails$h=fails$j,classof$5=classofRaw$1,$Object$4=Object,split=functionUncurryThis("".split),indexedObject=fails$h(function(){return!$Object$4("z").propertyIsEnumerable(0)})?function(e){return"String"==classof$5(e)?split(e,""):$Object$4(e)}:$Object$4,$TypeError$9=TypeError,requireObjectCoercible$7=function(e){if(null==e)throw $TypeError$9("Can't call method on "+e);return e},IndexedObject$1=indexedObject,requireObjectCoercible$6=requireObjectCoercible$7,toIndexedObject$5=function(e){return IndexedObject$1(requireObjectCoercible$6(e))},check=function(e){return e&&e.Math==Math&&e},global$e=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof commonjsGlobal&&commonjsGlobal)||function(){return this}()||Function("return this")(),shared$4={exports:{}},global$d=global$e,defineProperty$5=Object.defineProperty,defineGlobalProperty$3=function(t,n){try{defineProperty$5(global$d,t,{value:n,configurable:!0,writable:!0})}catch(e){global$d[t]=n}return n},global$c=global$e,defineGlobalProperty$2=defineGlobalProperty$3,SHARED="__core-js_shared__",store$3=global$e[SHARED]||defineGlobalProperty$2(SHARED,{}),sharedStore=store$3,store$2=sharedStore,requireObjectCoercible$5=((shared$4.exports=function(e,t){return store$2[e]||(store$2[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.24.1",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.24.1/LICENSE",source:"https://github.com/zloirock/core-js"}),requireObjectCoercible$7),$Object$3=Object,toObject$4=function(e){return $Object$3(requireObjectCoercible$5(e))},uncurryThis$h=functionUncurryThis,toObject$3=toObject$4,hasOwnProperty=functionUncurryThis({}.hasOwnProperty),hasOwnProperty_1=Object.hasOwn||function(e,t){return hasOwnProperty(toObject$3(e),t)},uncurryThis$g=functionUncurryThis,id=0,postfix=Math.random(),toString$7=uncurryThis$g(1..toString),uid$2=function(e){return"Symbol("+(void 0===e?"":e)+")_"+toString$7(++id+postfix,36)},isCallable$i=function(e){return"function"==typeof e},global$b=global$e,isCallable$h=isCallable$i,aFunction=function(e){return isCallable$h(e)?e:void 0},getBuiltIn$5=function(e,t){return arguments.length<2?aFunction(global$b[e]):global$b[e]&&global$b[e][t]},getBuiltIn$4=getBuiltIn$5,engineUserAgent=getBuiltIn$5("navigator","userAgent")||"",global$a=global$e,userAgent=engineUserAgent,process$1=global$a.process,Deno=global$a.Deno,versions=process$1&&process$1.versions||Deno&&Deno.version,v8=versions&&versions.v8,engineV8Version=version=!(version=v8?0<(match$6=v8.split("."))[0]&&match$6[0]<4?1:+(match$6[0]+match$6[1]):version)&&userAgent&&(!(match$6=userAgent.match(/Edge\/(\d+)/))||74<=match$6[1])&&(match$6=userAgent.match(/Chrome\/(\d+)/))?+match$6[1]:version,V8_VERSION=version,fails$g=fails$j,nativeSymbol=!!Object.getOwnPropertySymbols&&!fails$g(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&V8_VERSION&&V8_VERSION<41}),NATIVE_SYMBOL$1=nativeSymbol,useSymbolAsUid=nativeSymbol&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,global$9=global$e,shared$3=shared$4.exports,hasOwn$8=hasOwnProperty_1,uid$1=uid$2,NATIVE_SYMBOL=nativeSymbol,USE_SYMBOL_AS_UID$1=useSymbolAsUid,WellKnownSymbolsStore=shared$3("wks"),Symbol$1=global$9.Symbol,symbolFor=Symbol$1&&Symbol$1.for,createWellKnownSymbol=USE_SYMBOL_AS_UID$1?Symbol$1:Symbol$1&&Symbol$1.withoutSetter||uid$1,wellKnownSymbol$d=function(e){var t;return hasOwn$8(WellKnownSymbolsStore,e)&&(NATIVE_SYMBOL||"string"==typeof WellKnownSymbolsStore[e])||(t="Symbol."+e,NATIVE_SYMBOL&&hasOwn$8(Symbol$1,e)?WellKnownSymbolsStore[e]=Symbol$1[e]:WellKnownSymbolsStore[e]=(USE_SYMBOL_AS_UID$1&&symbolFor?symbolFor:createWellKnownSymbol)(t)),WellKnownSymbolsStore[e]},isCallable$g=isCallable$i,isObject$6=function(e){return"object"==typeof e?null!==e:isCallable$g(e)},isObject$5=isObject$6,$String$3=String,$TypeError$8=TypeError,anObject$a=function(e){if(isObject$5(e))return e;throw $TypeError$8($String$3(e)+" is not an object")},objectDefineProperties={},fails$f=fails$j,descriptors=!fails$j(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),DESCRIPTORS$9=descriptors,fails$e=fails$j,v8PrototypeDefineBug=descriptors&&fails$j(function(){return 42!=Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),objectDefineProperty={},global$8=global$e,isObject$4=isObject$6,document$1=global$e.document,EXISTS$1=isObject$4(document$1)&&isObject$4(document$1.createElement),documentCreateElement$2=function(e){return EXISTS$1?document$1.createElement(e):{}},DESCRIPTORS$8=descriptors,fails$d=fails$j,createElement=documentCreateElement$2,ie8DomDefine=!descriptors&&!fails$j(function(){return 7!=Object.defineProperty(createElement("div"),"a",{get:function(){return 7}}).a}),NATIVE_BIND$1=functionBindNative,call$a=Function.prototype.call,functionCall=NATIVE_BIND$1?call$a.bind(call$a):function(){return call$a.apply(call$a,arguments)},uncurryThis$f=functionUncurryThis,objectIsPrototypeOf=functionUncurryThis({}.isPrototypeOf),getBuiltIn$3=getBuiltIn$5,isCallable$f=isCallable$i,isPrototypeOf=objectIsPrototypeOf,USE_SYMBOL_AS_UID=useSymbolAsUid,$Object$2=Object,isSymbol$2=useSymbolAsUid?function(e){return"symbol"==typeof e}:function(e){var t=getBuiltIn$3("Symbol");return isCallable$f(t)&&isPrototypeOf(t.prototype,$Object$2(e))},$String$2=String,tryToString$2=function(e){try{return $String$2(e)}catch(e){return"Object"}},isCallable$e=isCallable$i,tryToString$1=tryToString$2,$TypeError$7=TypeError,aCallable$1=function(e){if(isCallable$e(e))return e;throw $TypeError$7(tryToString$1(e)+" is not a function")},aCallable=aCallable$1,getMethod$3=function(e,t){e=e[t];return null==e?void 0:aCallable(e)},call$9=functionCall,isCallable$d=isCallable$i,isObject$3=isObject$6,$TypeError$6=TypeError,ordinaryToPrimitive$1=function(e,t){var n,i;if("string"===t&&isCallable$d(n=e.toString)&&!isObject$3(i=call$9(n,e)))return i;if(isCallable$d(n=e.valueOf)&&!isObject$3(i=call$9(n,e)))return i;if("string"!==t&&isCallable$d(n=e.toString)&&!isObject$3(i=call$9(n,e)))return i;throw $TypeError$6("Can't convert object to primitive value")},call$8=functionCall,isObject$2=isObject$6,isSymbol$1=isSymbol$2,getMethod$2=getMethod$3,ordinaryToPrimitive=ordinaryToPrimitive$1,wellKnownSymbol$c=wellKnownSymbol$d,$TypeError$5=TypeError,TO_PRIMITIVE=wellKnownSymbol$d("toPrimitive"),toPrimitive$1=function(e,t){if(!isObject$2(e)||isSymbol$1(e))return e;var n=getMethod$2(e,TO_PRIMITIVE);if(n){if(n=call$8(n,e,t=void 0===t?"default":t),!isObject$2(n)||isSymbol$1(n))return n;throw $TypeError$5("Can't convert object to primitive value")}return ordinaryToPrimitive(e,t=void 0===t?"number":t)},toPrimitive=toPrimitive$1,isSymbol=isSymbol$2,toPropertyKey$3=function(e){e=toPrimitive(e,"string");return isSymbol(e)?e:e+""},DESCRIPTORS$7=descriptors,IE8_DOM_DEFINE$1=ie8DomDefine,V8_PROTOTYPE_DEFINE_BUG$1=v8PrototypeDefineBug,anObject$9=anObject$a,toPropertyKey$2=toPropertyKey$3,$TypeError$4=TypeError,$defineProperty=Object.defineProperty,$getOwnPropertyDescriptor$1=Object.getOwnPropertyDescriptor,ENUMERABLE="enumerable",CONFIGURABLE$1="configurable",WRITABLE="writable",ceil=(objectDefineProperty.f=DESCRIPTORS$7?V8_PROTOTYPE_DEFINE_BUG$1?function(e,t,n){var i;return anObject$9(e),t=toPropertyKey$2(t),anObject$9(n),"function"==typeof e&&"prototype"===t&&"value"in n&&WRITABLE in n&&!n[WRITABLE]&&((i=$getOwnPropertyDescriptor$1(e,t))&&i[WRITABLE]&&(e[t]=n.value,n={configurable:(CONFIGURABLE$1 in n?n:i)[CONFIGURABLE$1],enumerable:(ENUMERABLE in n?n:i)[ENUMERABLE],writable:!1})),$defineProperty(e,t,n)}:$defineProperty:function(e,t,n){if(anObject$9(e),t=toPropertyKey$2(t),anObject$9(n),IE8_DOM_DEFINE$1)try{return $defineProperty(e,t,n)}catch(e){}if("get"in n||"set"in n)throw $TypeError$4("Accessors not supported");return"value"in n&&(e[t]=n.value),e},Math.ceil),floor$1=Math.floor,mathTrunc=Math.trunc||function(e){e=+e;return(0<e?floor$1:ceil)(e)},trunc=mathTrunc,toIntegerOrInfinity$4=function(e){e=+e;return e!=e||0==e?0:trunc(e)},toIntegerOrInfinity$3=toIntegerOrInfinity$4,max$2=Math.max,min$3=Math.min,toAbsoluteIndex$2=function(e,t){e=toIntegerOrInfinity$3(e);return e<0?max$2(e+t,0):min$3(e,t)},toIntegerOrInfinity$2=toIntegerOrInfinity$4,min$2=Math.min,toLength$3=function(e){return 0<e?min$2(toIntegerOrInfinity$2(e),9007199254740991):0},toLength$2=toLength$3,lengthOfArrayLike$2=function(e){return toLength$2(e.length)},toIndexedObject$4=toIndexedObject$5,toAbsoluteIndex$1=toAbsoluteIndex$2,lengthOfArrayLike$1=lengthOfArrayLike$2,createMethod$2=function(s){return function(e,t,n){var i,r=toIndexedObject$4(e),o=lengthOfArrayLike$1(r),a=toAbsoluteIndex$1(n,o);if(s&&t!=t){for(;a<o;)if((i=r[a++])!=i)return!0}else for(;a<o;a++)if((s||a in r)&&r[a]===t)return s||a||0;return!s&&-1}},arrayIncludes={includes:createMethod$2(!0),indexOf:createMethod$2(!1)},hiddenKeys$4={},uncurryThis$e=functionUncurryThis,hasOwn$7=hasOwnProperty_1,toIndexedObject$3=toIndexedObject$5,indexOf$1=arrayIncludes.indexOf,hiddenKeys$3=hiddenKeys$4,push$2=uncurryThis$e([].push),objectKeysInternal=function(e,t){var n,i=toIndexedObject$3(e),r=0,o=[];for(n in i)!hasOwn$7(hiddenKeys$3,n)&&hasOwn$7(i,n)&&push$2(o,n);for(;t.length>r;)!hasOwn$7(i,n=t[r++])||~indexOf$1(o,n)||push$2(o,n);return o},enumBugKeys$3=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],internalObjectKeys$1=objectKeysInternal,enumBugKeys$2=enumBugKeys$3,objectKeys$2=Object.keys||function(e){return internalObjectKeys$1(e,enumBugKeys$2)},DESCRIPTORS$6=descriptors,V8_PROTOTYPE_DEFINE_BUG=v8PrototypeDefineBug,definePropertyModule$4=objectDefineProperty,anObject$8=anObject$a,toIndexedObject$2=toIndexedObject$5,objectKeys$1=objectKeys$2,getBuiltIn$2=(objectDefineProperties.f=DESCRIPTORS$6&&!V8_PROTOTYPE_DEFINE_BUG?Object.defineProperties:function(e,t){anObject$8(e);for(var n,i=toIndexedObject$2(t),r=objectKeys$1(t),o=r.length,a=0;a<o;)definePropertyModule$4.f(e,n=r[a++],i[n]);return e},getBuiltIn$5),html$1=getBuiltIn$5("document","documentElement"),shared$2=shared$4.exports,uid=uid$2,keys=shared$2("keys"),sharedKey$3=function(e){return keys[e]||(keys[e]=uid(e))},anObject$7=anObject$a,definePropertiesModule=objectDefineProperties,enumBugKeys$1=enumBugKeys$3,hiddenKeys$2=hiddenKeys$4,html=html$1,documentCreateElement$1=documentCreateElement$2,sharedKey$2=sharedKey$3,GT=">",LT="<",PROTOTYPE="prototype",SCRIPT="script",IE_PROTO$1=sharedKey$3("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(e){return LT+SCRIPT+GT+e+LT+"/"+SCRIPT+GT},NullProtoObjectViaActiveX=function(e){e.write(scriptTag("")),e.close();var t=e.parentWindow.Object;return e=null,t},NullProtoObjectViaIFrame=function(){var e=documentCreateElement$1("iframe"),t="java"+SCRIPT+":";return e.style.display="none",html.appendChild(e),e.src=String(t),(t=e.contentWindow.document).open(),t.write(scriptTag("document.F=Object")),t.close(),t.F},NullProtoObject=function(){try{activeXDocument=new ActiveXObject("htmlfile")}catch(e){}NullProtoObject="undefined"==typeof document||document.domain&&activeXDocument?NullProtoObjectViaActiveX(activeXDocument):NullProtoObjectViaIFrame();for(var e=enumBugKeys$1.length;e--;)delete NullProtoObject[PROTOTYPE][enumBugKeys$1[e]];return NullProtoObject()},objectCreate=(hiddenKeys$2[IE_PROTO$1]=!0,Object.create||function(e,t){var n;return null!==e?(EmptyConstructor[PROTOTYPE]=anObject$7(e),n=new EmptyConstructor,EmptyConstructor[PROTOTYPE]=null,n[IE_PROTO$1]=e):n=NullProtoObject(),void 0===t?n:definePropertiesModule.f(n,t)}),wellKnownSymbol$b=wellKnownSymbol$d,create$2=objectCreate,defineProperty$4=objectDefineProperty.f,UNSCOPABLES=wellKnownSymbol$b("unscopables"),ArrayPrototype=Array.prototype,addToUnscopables$1=(null==ArrayPrototype[UNSCOPABLES]&&defineProperty$4(ArrayPrototype,UNSCOPABLES,{configurable:!0,value:create$2(null)}),function(e){ArrayPrototype[UNSCOPABLES][e]=!0}),iterators={},uncurryThis$d=functionUncurryThis,isCallable$c=isCallable$i,store$1=sharedStore,functionToString=functionUncurryThis(Function.toString),inspectSource$3=(isCallable$c(store$1.inspectSource)||(store$1.inspectSource=function(e){return functionToString(e)}),store$1.inspectSource),global$7=global$e,isCallable$b=isCallable$i,inspectSource$2=inspectSource$3,WeakMap$1=global$e.WeakMap,nativeWeakMap=isCallable$b(WeakMap$1)&&/native code/.test(inspectSource$2(WeakMap$1)),createPropertyDescriptor$4=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},DESCRIPTORS$5=descriptors,definePropertyModule$3=objectDefineProperty,createPropertyDescriptor$3=createPropertyDescriptor$4,createNonEnumerableProperty$5=descriptors?function(e,t,n){return definePropertyModule$3.f(e,t,createPropertyDescriptor$3(1,n))}:function(e,t,n){return e[t]=n,e},NATIVE_WEAK_MAP=nativeWeakMap,global$6=global$e,uncurryThis$c=functionUncurryThis,isObject$1=isObject$6,createNonEnumerableProperty$4=createNonEnumerableProperty$5,hasOwn$6=hasOwnProperty_1,shared$1=sharedStore,sharedKey$1=sharedKey$3,hiddenKeys$1=hiddenKeys$4,OBJECT_ALREADY_INITIALIZED="Object already initialized",TypeError$1=global$6.TypeError,WeakMap=global$6.WeakMap,enforce=function(e){return has(e)?get(e):set(e,{})},getterFor=function(t){return function(e){if(isObject$1(e)&&(e=get(e)).type===t)return e;throw TypeError$1("Incompatible receiver, "+t+" required")}},internalState=(has=NATIVE_WEAK_MAP||shared$1.state?(store=shared$1.state||(shared$1.state=new WeakMap),wmget=uncurryThis$c(store.get),wmhas=uncurryThis$c(store.has),wmset=uncurryThis$c(store.set),set=function(e,t){if(wmhas(store,e))throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);return t.facade=e,wmset(store,e,t),t},get=function(e){return wmget(store,e)||{}},function(e){return wmhas(store,e)}):(STATE=sharedKey$1("state"),hiddenKeys$1[STATE]=!0,set=function(e,t){if(hasOwn$6(e,STATE))throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);return t.facade=e,createNonEnumerableProperty$4(e,STATE,t),t},get=function(e){return hasOwn$6(e,STATE)?e[STATE]:{}},function(e){return hasOwn$6(e,STATE)}),{set:set,get:get,has:has,enforce:enforce,getterFor:getterFor}),objectGetOwnPropertyDescriptor={},objectPropertyIsEnumerable={},$propertyIsEnumerable={}.propertyIsEnumerable,getOwnPropertyDescriptor$1=Object.getOwnPropertyDescriptor,NASHORN_BUG=getOwnPropertyDescriptor$1&&!$propertyIsEnumerable.call({1:2},1),DESCRIPTORS$4=(objectPropertyIsEnumerable.f=NASHORN_BUG?function(e){e=getOwnPropertyDescriptor$1(this,e);return!!e&&e.enumerable}:$propertyIsEnumerable,descriptors),call$7=functionCall,propertyIsEnumerableModule$1=objectPropertyIsEnumerable,createPropertyDescriptor$2=createPropertyDescriptor$4,toIndexedObject$1=toIndexedObject$5,toPropertyKey$1=toPropertyKey$3,hasOwn$5=hasOwnProperty_1,IE8_DOM_DEFINE=ie8DomDefine,$getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,makeBuiltIn$2=(objectGetOwnPropertyDescriptor.f=DESCRIPTORS$4?$getOwnPropertyDescriptor:function(e,t){if(e=toIndexedObject$1(e),t=toPropertyKey$1(t),IE8_DOM_DEFINE)try{return $getOwnPropertyDescriptor(e,t)}catch(e){}if(hasOwn$5(e,t))return createPropertyDescriptor$2(!call$7(propertyIsEnumerableModule$1.f,e,t),e[t])},{exports:{}}),DESCRIPTORS$3=descriptors,hasOwn$4=hasOwnProperty_1,FunctionPrototype$1=Function.prototype,getDescriptor=DESCRIPTORS$3&&Object.getOwnPropertyDescriptor,EXISTS=hasOwn$4(FunctionPrototype$1,"name"),PROPER=EXISTS&&"something"===function(){}.name,CONFIGURABLE=EXISTS&&(!DESCRIPTORS$3||getDescriptor(FunctionPrototype$1,"name").configurable),functionName={EXISTS:EXISTS,PROPER:PROPER,CONFIGURABLE:CONFIGURABLE},fails$c=fails$j,isCallable$a=isCallable$i,hasOwn$3=hasOwnProperty_1,DESCRIPTORS$2=descriptors,CONFIGURABLE_FUNCTION_NAME$1=functionName.CONFIGURABLE,inspectSource$1=inspectSource$3,InternalStateModule$1=internalState,enforceInternalState=InternalStateModule$1.enforce,getInternalState$2=InternalStateModule$1.get,defineProperty$3=Object.defineProperty,CONFIGURABLE_LENGTH=DESCRIPTORS$2&&!fails$c(function(){return 8!==defineProperty$3(function(){},"length",{value:8}).length}),TEMPLATE=String(String).split("String"),makeBuiltIn$1=makeBuiltIn$2.exports=function(e,t,n){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!hasOwn$3(e,"name")||CONFIGURABLE_FUNCTION_NAME$1&&e.name!==t)&&(DESCRIPTORS$2?defineProperty$3(e,"name",{value:t,configurable:!0}):e.name=t),CONFIGURABLE_LENGTH&&n&&hasOwn$3(n,"arity")&&e.length!==n.arity&&defineProperty$3(e,"length",{value:n.arity});try{n&&hasOwn$3(n,"constructor")&&n.constructor?DESCRIPTORS$2&&defineProperty$3(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}n=enforceInternalState(e);return hasOwn$3(n,"source")||(n.source=TEMPLATE.join("string"==typeof t?t:"")),e},isCallable$9=(Function.prototype.toString=makeBuiltIn$1(function(){return isCallable$a(this)&&getInternalState$2(this).source||inspectSource$1(this)},"toString"),isCallable$i),definePropertyModule$2=objectDefineProperty,makeBuiltIn=makeBuiltIn$2.exports,defineGlobalProperty$1=defineGlobalProperty$3,defineBuiltIn$4=function(e,t,n,i){var r=(i=i||{}).enumerable,o=void 0!==i.name?i.name:t;if(isCallable$9(n)&&makeBuiltIn(n,o,i),i.global)r?e[t]=n:defineGlobalProperty$1(t,n);else{try{i.unsafe?e[t]&&(r=!0):delete e[t]}catch(e){}r?e[t]=n:definePropertyModule$2.f(e,t,{value:n,enumerable:!1,configurable:!i.nonConfigurable,writable:!i.nonWritable})}return e},objectGetOwnPropertyNames={},internalObjectKeys=objectKeysInternal,enumBugKeys=enumBugKeys$3,hiddenKeys=enumBugKeys$3.concat("length","prototype"),objectGetOwnPropertySymbols=(objectGetOwnPropertyNames.f=Object.getOwnPropertyNames||function(e){return internalObjectKeys(e,hiddenKeys)},{}),getBuiltIn$1=(objectGetOwnPropertySymbols.f=Object.getOwnPropertySymbols,getBuiltIn$5),uncurryThis$b=functionUncurryThis,getOwnPropertyNamesModule=objectGetOwnPropertyNames,getOwnPropertySymbolsModule$1=objectGetOwnPropertySymbols,anObject$6=anObject$a,concat$2=functionUncurryThis([].concat),ownKeys$1=getBuiltIn$1("Reflect","ownKeys")||function(e){var t=getOwnPropertyNamesModule.f(anObject$6(e)),n=getOwnPropertySymbolsModule$1.f;return n?concat$2(t,n(e)):t},hasOwn$2=hasOwnProperty_1,ownKeys=ownKeys$1,getOwnPropertyDescriptorModule=objectGetOwnPropertyDescriptor,definePropertyModule$1=objectDefineProperty,copyConstructorProperties$1=function(e,t,n){for(var i=ownKeys(t),r=definePropertyModule$1.f,o=getOwnPropertyDescriptorModule.f,a=0;a<i.length;a++){var s=i[a];hasOwn$2(e,s)||n&&hasOwn$2(n,s)||r(e,s,o(t,s))}},fails$b=fails$j,isCallable$8=isCallable$i,replacement=/#|\.prototype\./,isForced$1=function(e,t){e=data[normalize(e)];return e==POLYFILL||e!=NATIVE&&(isCallable$8(t)?fails$b(t):!!t)},normalize=isForced$1.normalize=function(e){return String(e).replace(replacement,".").toLowerCase()},data=isForced$1.data={},NATIVE=isForced$1.NATIVE="N",POLYFILL=isForced$1.POLYFILL="P",isForced_1=isForced$1,global$5=global$e,getOwnPropertyDescriptor=objectGetOwnPropertyDescriptor.f,createNonEnumerableProperty$3=createNonEnumerableProperty$5,defineBuiltIn$3=defineBuiltIn$4,defineGlobalProperty=defineGlobalProperty$3,copyConstructorProperties=copyConstructorProperties$1,isForced=isForced_1,_export=function(e,t){var n,i,r,o=e.target,a=e.global,s=e.stat,l=a?global$5:s?global$5[o]||defineGlobalProperty(o,{}):(global$5[o]||{}).prototype;if(l)for(n in t){if(i=t[n],r=e.dontCallGetSet?(r=getOwnPropertyDescriptor(l,n))&&r.value:l[n],!isForced(a?n:o+(s?".":"#")+n,e.forced)&&void 0!==r){if(typeof i==typeof r)continue;copyConstructorProperties(i,r)}(e.sham||r&&r.sham)&&createNonEnumerableProperty$3(i,"sham",!0),defineBuiltIn$3(l,n,i,e)}},fails$a=fails$j,correctPrototypeGetter=!fails$j(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),hasOwn$1=hasOwnProperty_1,isCallable$7=isCallable$i,toObject$2=toObject$4,sharedKey=sharedKey$3,CORRECT_PROTOTYPE_GETTER=correctPrototypeGetter,IE_PROTO=sharedKey$3("IE_PROTO"),$Object$1=Object,ObjectPrototype=$Object$1.prototype,objectGetPrototypeOf=CORRECT_PROTOTYPE_GETTER?$Object$1.getPrototypeOf:function(e){e=toObject$2(e);if(hasOwn$1(e,IE_PROTO))return e[IE_PROTO];var t=e.constructor;return isCallable$7(t)&&e instanceof t?t.prototype:e instanceof $Object$1?ObjectPrototype:null},fails$9=fails$j,isCallable$6=isCallable$i,getPrototypeOf$1=objectGetPrototypeOf,defineBuiltIn$2=defineBuiltIn$4,wellKnownSymbol$a=wellKnownSymbol$d,ITERATOR$2=wellKnownSymbol$d("iterator"),BUGGY_SAFARI_ITERATORS$1=!1,NEW_ITERATOR_PROTOTYPE=([].keys&&("next"in(arrayIterator=[].keys())?(PrototypeOfArrayIteratorPrototype=getPrototypeOf$1(getPrototypeOf$1(arrayIterator)))!==Object.prototype&&(IteratorPrototype$2=PrototypeOfArrayIteratorPrototype):BUGGY_SAFARI_ITERATORS$1=!0),null==IteratorPrototype$2||fails$9(function(){var e={};return IteratorPrototype$2[ITERATOR$2].call(e)!==e})),iteratorsCore=(isCallable$6((IteratorPrototype$2=NEW_ITERATOR_PROTOTYPE?{}:IteratorPrototype$2)[ITERATOR$2])||defineBuiltIn$2(IteratorPrototype$2,ITERATOR$2,function(){return this}),{IteratorPrototype:IteratorPrototype$2,BUGGY_SAFARI_ITERATORS:BUGGY_SAFARI_ITERATORS$1}),defineProperty$2=objectDefineProperty.f,hasOwn=hasOwnProperty_1,wellKnownSymbol$9=wellKnownSymbol$d,TO_STRING_TAG$3=wellKnownSymbol$d("toStringTag"),setToStringTag$2=function(e,t,n){(e=e&&!n?e.prototype:e)&&!hasOwn(e,TO_STRING_TAG$3)&&defineProperty$2(e,TO_STRING_TAG$3,{configurable:!0,value:t})},IteratorPrototype$1=iteratorsCore.IteratorPrototype,create$1=objectCreate,createPropertyDescriptor$1=createPropertyDescriptor$4,setToStringTag$1=setToStringTag$2,Iterators$2=iterators,returnThis$1=function(){return this},createIteratorConstructor$1=function(e,t,n,i){t+=" Iterator";return e.prototype=create$1(IteratorPrototype$1,{next:createPropertyDescriptor$1(+!i,n)}),setToStringTag$1(e,t,!1),Iterators$2[t]=returnThis$1,e},isCallable$5=isCallable$i,$String$1=String,$TypeError$3=TypeError,aPossiblePrototype$1=function(e){if("object"==typeof e||isCallable$5(e))return e;throw $TypeError$3("Can't set "+$String$1(e)+" as a prototype")},uncurryThis$a=functionUncurryThis,anObject$5=anObject$a,aPossiblePrototype=aPossiblePrototype$1,objectSetPrototypeOf=Object.setPrototypeOf||("__proto__"in{}?function(){var n,i=!1,e={};try{(n=uncurryThis$a(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(e,[]),i=e instanceof Array}catch(e){}return function(e,t){return anObject$5(e),aPossiblePrototype(t),i?n(e,t):e.__proto__=t,e}}():void 0),$$4=_export,call$6=functionCall,FunctionName=functionName,isCallable$4=isCallable$i,createIteratorConstructor=createIteratorConstructor$1,getPrototypeOf=objectGetPrototypeOf,setPrototypeOf=objectSetPrototypeOf,setToStringTag=setToStringTag$2,createNonEnumerableProperty$2=createNonEnumerableProperty$5,defineBuiltIn$1=defineBuiltIn$4,wellKnownSymbol$8=wellKnownSymbol$d,Iterators$1=iterators,IteratorsCore=iteratorsCore,PROPER_FUNCTION_NAME$1=FunctionName.PROPER,CONFIGURABLE_FUNCTION_NAME=FunctionName.CONFIGURABLE,IteratorPrototype=IteratorsCore.IteratorPrototype,BUGGY_SAFARI_ITERATORS=IteratorsCore.BUGGY_SAFARI_ITERATORS,ITERATOR$1=wellKnownSymbol$8("iterator"),KEYS="keys",VALUES="values",ENTRIES="entries",returnThis=function(){return this},defineIterator$1=function(e,t,n,i,r,o,a){createIteratorConstructor(n,t,i);function s(e){if(e===r&&p)return p;if(!BUGGY_SAFARI_ITERATORS&&e in d)return d[e];switch(e){case KEYS:case VALUES:case ENTRIES:return function(){return new n(this,e)}}return function(){return new n(this)}}var l,c,i=t+" Iterator",u=!1,d=e.prototype,h=d[ITERATOR$1]||d["@@iterator"]||r&&d[r],p=!BUGGY_SAFARI_ITERATORS&&h||s(r),f="Array"==t&&d.entries||h;if(f&&(f=getPrototypeOf(f.call(new e)))!==Object.prototype&&f.next&&(getPrototypeOf(f)!==IteratorPrototype&&(setPrototypeOf?setPrototypeOf(f,IteratorPrototype):isCallable$4(f[ITERATOR$1])||defineBuiltIn$1(f,ITERATOR$1,returnThis)),setToStringTag(f,i,!0)),PROPER_FUNCTION_NAME$1&&r==VALUES&&h&&h.name!==VALUES&&(CONFIGURABLE_FUNCTION_NAME?createNonEnumerableProperty$2(d,"name",VALUES):(u=!0,p=function(){return call$6(h,this)})),r)if(l={values:s(VALUES),keys:o?p:s(KEYS),entries:s(ENTRIES)},a)for(c in l)!BUGGY_SAFARI_ITERATORS&&!u&&c in d||defineBuiltIn$1(d,c,l[c]);else $$4({target:t,proto:!0,forced:BUGGY_SAFARI_ITERATORS||u},l);return d[ITERATOR$1]!==p&&defineBuiltIn$1(d,ITERATOR$1,p,{name:r}),Iterators$1[t]=p,l},toIndexedObject=toIndexedObject$5,addToUnscopables=addToUnscopables$1,Iterators=iterators,InternalStateModule=internalState,defineProperty$1=objectDefineProperty.f,defineIterator=defineIterator$1,DESCRIPTORS$1=descriptors,ARRAY_ITERATOR="Array Iterator",setInternalState=InternalStateModule.set,getInternalState$1=InternalStateModule.getterFor(ARRAY_ITERATOR),es_array_iterator=defineIterator(Array,"Array",function(e,t){setInternalState(this,{type:ARRAY_ITERATOR,target:toIndexedObject(e),index:0,kind:t})},function(){var e=getInternalState$1(this),t=e.target,n=e.kind,i=e.index++;return!t||i>=t.length?{value:e.target=void 0,done:!0}:"keys"==n?{value:i,done:!1}:"values"==n?{value:t[i],done:!1}:{value:[i,t[i]],done:!1}},"values"),values=Iterators.Arguments=Iterators.Array;if(addToUnscopables("keys"),addToUnscopables("values"),addToUnscopables("entries"),DESCRIPTORS$1&&"values"!==values.name)try{defineProperty$1(values,"name",{value:"values"})}catch(e){}var COLLECTION_NAME,domIterables={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},documentCreateElement=documentCreateElement$2,classList=documentCreateElement$2("span").classList,DOMTokenListPrototype$1=classList&&classList.constructor&&classList.constructor.prototype,domTokenListPrototype=DOMTokenListPrototype$1===Object.prototype?void 0:DOMTokenListPrototype$1,global$4=global$e,DOMIterables=domIterables,DOMTokenListPrototype=domTokenListPrototype,ArrayIteratorMethods=es_array_iterator,createNonEnumerableProperty$1=createNonEnumerableProperty$5,wellKnownSymbol$7=wellKnownSymbol$d,ITERATOR=wellKnownSymbol$7("iterator"),TO_STRING_TAG$2=wellKnownSymbol$7("toStringTag"),ArrayValues=ArrayIteratorMethods.values,handlePrototype=function(t,e){if(t){if(t[ITERATOR]!==ArrayValues)try{createNonEnumerableProperty$1(t,ITERATOR,ArrayValues)}catch(e){t[ITERATOR]=ArrayValues}if(t[TO_STRING_TAG$2]||createNonEnumerableProperty$1(t,TO_STRING_TAG$2,e),DOMIterables[e])for(var n in ArrayIteratorMethods)if(t[n]!==ArrayIteratorMethods[n])try{createNonEnumerableProperty$1(t,n,ArrayIteratorMethods[n])}catch(e){t[n]=ArrayIteratorMethods[n]}}};for(COLLECTION_NAME in DOMIterables)handlePrototype(global$4[COLLECTION_NAME]&&global$4[COLLECTION_NAME].prototype,COLLECTION_NAME);handlePrototype(DOMTokenListPrototype,"DOMTokenList");var ETaskStatus,DESCRIPTORS=descriptors,uncurryThis$9=functionUncurryThis,call$5=functionCall,fails$8=fails$j,objectKeys=objectKeys$2,getOwnPropertySymbolsModule=objectGetOwnPropertySymbols,propertyIsEnumerableModule=objectPropertyIsEnumerable,toObject$1=toObject$4,IndexedObject=indexedObject,$assign=Object.assign,defineProperty=Object.defineProperty,concat$1=uncurryThis$9([].concat),objectAssign=!$assign||fails$8(function(){if(DESCRIPTORS&&1!==$assign({b:1},$assign(defineProperty({},"a",{enumerable:!0,get:function(){defineProperty(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),i="abcdefghijklmnopqrst";return e[n]=7,i.split("").forEach(function(e){t[e]=e}),7!=$assign({},e)[n]||objectKeys($assign({},t)).join("")!=i})?function(e,t){for(var n=toObject$1(e),i=arguments.length,r=1,o=getOwnPropertySymbolsModule.f,a=propertyIsEnumerableModule.f;r<i;)for(var s,l=IndexedObject(arguments[r++]),c=o?concat$1(objectKeys(l),o(l)):objectKeys(l),u=c.length,d=0;d<u;)s=c[d++],DESCRIPTORS&&!call$5(a,l,s)||(n[s]=l[s]);return n}:$assign,$$3=_export,assign=objectAssign;_export({target:"Object",stat:!0,arity:2,forced:Object.assign!==assign},{assign:assign});const JobsActionButtons=()=>jsxRuntime.exports.jsxs(Box,{children:[jsxRuntime.exports.jsx(Tooltip$1,Object.assign({componentsProps:{tooltip:{sx:{bgcolor:"#465364"}}},title:jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-center.jobs.bottom-q-btn",defaultMessage:"Bottom of Queue",description:"tooltip message on the bottom of queue button"})},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:()=>({}),"data-testid":"processing-center.jobs.bottom-q","aria-labelledby":"processing-center.jobs.bottom-q",size:"large"},{children:jsxRuntime.exports.jsx(BottomQueue,{style:{transform:"translate(2px, 4px)"}})}))})),jsxRuntime.exports.jsx(Tooltip$1,Object.assign({componentsProps:{tooltip:{sx:{bgcolor:"#465364"}}},title:jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-center.jobs.top-q-btn",defaultMessage:"Top of Queue",description:"tooltip message on the top of queue button"})},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:()=>({}),"data-testid":"processing-center.jobs.top-q","aria-labelledby":"processing-center.jobs.top-q",size:"large"},{children:jsxRuntime.exports.jsx(TopQueue,{style:{transform:"translate(2px, 3px)"}})}))})),jsxRuntime.exports.jsx(Tooltip$1,Object.assign({componentsProps:{tooltip:{sx:{bgcolor:"#465364"}}},title:jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-center.jobs.pause-btn",defaultMessage:"Pause Jobs",description:"tooltip message on the pause jobs button"})},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:()=>({}),"data-testid":"processing-center.jobs.pause","aria-labelledby":"processing-center.jobs.pause",size:"large"},{children:jsxRuntime.exports.jsx(Pause,{style:{transform:"translate(6px, 5px)"}})}))})),jsxRuntime.exports.jsx(Tooltip$1,Object.assign({componentsProps:{tooltip:{sx:{bgcolor:"#465364"}}},title:jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-center.jobs.cancel-btn",defaultMessage:"Cancel Jobs",description:"tooltip message on the cancel jobs button"})},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:()=>({}),"data-testid":"processing-center.jobs.cancel-btn","aria-labelledby":"processing-center.jobs.cancel-btn",size:"large"},{children:jsxRuntime.exports.jsx(Cancel,{style:{transform:"translate(2px, 2px)"}})}))}))]}),useStyles$c=makeStyles()(e=>({container:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",textAlign:"center",padding:"12px"},image:{maxWidth:"50%",marginBottom:"40px",marginTop:"25px",userSelect:"none",pointerEvents:"none",userDrag:"none"},header:{fontWeight:600,marginBottom:"12px",cursor:"default"},description:{opacity:.8}})),JobsEmptyState=({type:e})=>{var t=useStyles$c()["classes"];return jsxRuntime.exports.jsxs("div",Object.assign({className:t.container,"data-testid":"processing-center-jobs-empty-state"},{children:[jsxRuntime.exports.jsx("img",{src:img$s,alt:"No Current Jobs",className:t.image,"data-testid":"processing-center-jobs-empty-state-image"}),jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"body2",className:t.header,"data-testid":"processing-center-jobs-empty-state-header"},{children:"batch"===e?jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-center.batch-jobs.empty-state.title",defaultMessage:"No Current Batch Jobs",description:"Processing Center - Batch Jobs empty state"}):jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-center.single-jobs.empty-state.title",defaultMessage:"No Current Jobs",description:"Processing Center - Jobs empty state"})}))]}))},SLICE_NAME="processingCenterJobs",PAGE_LIMIT=30,namespace$1=(!function(e){e.RUNNING="running",e.STARTED="started",e.PAUSED="paused",e.ERROR="error",e.SCHEDULED="scheduled",e.PENDING="pending",e.QUEUED="queued",e.COMPLETE="complete",e.COMPLETED="completed",e.ABORTED="aborted",e.FAILED="failed",e.CANCELLED="cancelled",e.WAITING="waiting",e.RESUMING="resuming",e.ACCEPTED="accepted",e.STANDBY_PENDNG="standby_pending"}(ETaskStatus=ETaskStatus||{}),"processingCenterJobs"),initialState$1={status:"idle",jobs:[],offset:0,hasMore:!0,tableColumns:["id","source","status","tdo","user"],filters:{user:null,dateTimeFilter:{field:"createdDateTime"},status:[],engines:null},filtersVisibility:!1,engineFilterValues:[]},processingCenterJobsSlice=createSlice({name:SLICE_NAME+"/"+namespace$1,initialState:initialState$1,reducers:{fetchOrgJobsStart(e,t){e.status="loading"},fetchOrgJobsSuccess(e,t){e.status="success";var n=t.payload.appendItems?e.jobs:[];e.jobs=[...new Map([...n,...t.payload.records].map(e=>[e.id,e])).values()],e.hasMore=t.payload.hasMore,e.offset=t.payload.nextOffset},fetchOrgJobsFailure(e){e.status="failure"},changeTableColumns(e,t){e.tableColumns=t.payload},fetchJobDetailsStart(e,t){e.status="loading"},fetchJobDetailsSuccess(e,t){e.status="success";const n=e.jobs;var i=n.findIndex(e=>e.id===t.payload.id);-1!==i&&(n[i]=t.payload),e.jobs=n},fetchJobDetailsFailure(e){e.status="failure"},setFilterValue(e,t){e.filters[t.payload.filter]=t.payload.value},clearAllFilters(e){e.filters={user:null,dateTimeFilter:{field:"createdDateTime"},status:[],engines:null}},setFiltersVisibility(e,t){e.filtersVisibility=t.payload},fetchJobEnginesStart(e,t){e.status="loading"},fetchJobEnginesSuccess(e,t){e.status="success",e.engineFilterValues=t.payload.records},fetchJobEnginesFailure(e){e.status="failure"}}}),actions$1=processingCenterJobsSlice.actions;var processingCenter_jobs=processingCenterJobsSlice.reducer;const selectOrgJobs=e=>{var{jobs:e,hasMore:t,offset:n}=null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace$1];return{jobs:e,hasMore:t,offset:n}},selectStatus=e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace$1].status},selectJobsTableCols=e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace$1].tableColumns},selectJobById=t=>e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace$1].jobs.find(e=>e.id===t)},selectJobsTableFilters=e=>{e=(null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace$1]).filters;return e},selectJobsTableFiltersVisibility=e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace$1].filtersVisibility},selectJobsEngineFilterValues=e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace$1].engineFilterValues},useStyles$b=makeStyles()(e=>({badge:{borderRadius:"40px",fontFamily:"Nunito",fontWeight:800,fontSize:"9px",width:"fit-content",padding:"0 10px"},pending:{color:"rgba(249, 168, 37, 1)",background:"rgba(249, 168, 37, 0.2)"},running:{color:"rgba(13, 98, 210, 1)",background:"rgba(13, 98, 210, 0.2)"},complete:{color:"#1B5E20",background:"rgba(27, 94, 32, 0.2)"},queued:{color:"rgba(74, 20, 140, 1)",background:"rgba(74, 20, 140, 0.2)"},accepted:{},failed:{color:"rgba(183, 28, 28, 1)",background:"rgba(183, 28, 28, 0.2)"},cancelled:{background:"rgba(33, 33, 33, 0.1)",color:"rgba(33, 33, 33, 1)"},standby_pending:{},waiting:{},resuming:{},aborted:{color:"rgba(33, 33, 33, 1)",background:"rgba(33, 33, 33, 0.1)"},paused:{}})),JobStatusBadge=({status:e})=>{var t=useStyles$b()["classes"];return jsxRuntime.exports.jsx("div",Object.assign({className:classNames(t[e],t.badge)},{children:e.toUpperCase()}))},jobsDetailsPanel="JOBS_DETAILS_PANEL",useStyles$a=makeStyles()(e=>({menuList:{width:e.spacing(34),padding:e.spacing(1.5)},menuItem:{borderRadius:4,padding:e.spacing(1),"& > svg":{marginRight:e.spacing(2)},textTransform:"none"}})),JobsRowContextMenu=({anchorEl:e,id:t,jobId:i,open:n,onClose:r,isPanelFullScreen:o})=>{var a=useStyles$a()["classes"];const s=useDispatch();return jsxRuntime.exports.jsx(Popover,Object.assign({anchorEl:e,id:t,open:n,onClose:r,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"right"}},{children:jsxRuntime.exports.jsx(MenuList,Object.assign({role:"menu",className:a.menuList,"data-testid":"processing-center-job-user.menu"},{children:jsxRuntime.exports.jsxs(MenuItem$1,Object.assign({"data-testid":"processing-center-job.menu-item.status-update",onClick:e=>{var t,n;t=i,t={name:jobsDetailsPanel,config:{name:"Job Table Settings",id:t,isPanelFullScreen:o}},n={type:"APP_BAR_PANEL_TEMPLATE",marginTop:o?0:55,marginStart:o?0:80,size:"xlarge",zIndex:o?1011:1001,parentPanelId:"PROCESSING_CENTER_BROWSE",dimmed:0,dimmedStatus:"dimParent",borderBottom:!0},s(mountPanel({panelId:jobsDetailsPanel,microFrontend:t,panelConfig:n}))},className:a.menuItem,"data-test":"job-context-menu-item",sx:{cursor:"pointer"}},{children:[jsxRuntime.exports.jsx(IconButton,Object.assign({"data-testid":"processing-center-job.menu-item.job-details-icon",size:"small",sx:{marginRight:"10px"}},{children:jsxRuntime.exports.jsx(ProcessingDetail,{fontSize:"small"})})),jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-center-job-row.open-details-panel-btn",defaultMessage:"Job Detail",description:"Job Detail row context menu"})]}))}))}))},useStyles$9=makeStyles()(e=>({rowContainer:{height:"50px"},rowText:{color:"black"}})),JobsTableRow=({job:{id:e,status:t,template:n,createdBy:i,targetId:r},onSelectCheckbox:o,isSelected:a,cols:s,disableMenu:l,isPanelFullScreen:c})=>{var u=useStyles$9()["classes"];const[d,h]=react.exports.useState(null);var p=d?"contextMenuId-"+e:void 0;return jsxRuntime.exports.jsxs("div",Object.assign({"data-testid":"pc-jobs-table-row-"+e,className:u.rowContainer},{children:[jsxRuntime.exports.jsxs(Grid,Object.assign({direction:"row",justifyContent:"space-between",alignItems:"center",item:!0,container:!0,xs:12,sx:{pl:"13px",pr:"13px",height:"50px"}},{children:[jsxRuntime.exports.jsxs(Grid,Object.assign({xs:3,item:!0},{children:[jsxRuntime.exports.jsx(Checkbox,{size:"small",value:e,onChange:(e,t)=>o(t,e.target.value),checked:a}),jsxRuntime.exports.jsx(Tooltip$1,Object.assign({title:e,arrow:!0,componentsProps:{arrow:{sx:{color:"#465364"}},tooltip:{sx:{bgcolor:"#465364"}}}},{children:jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"caption",className:u.rowText},{children:e.substring(0,5)+"..."+e.substring(e.length-6,e.length)}))}))]})),s.find(e=>"source"===e)&&jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0},{children:jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"caption",className:u.rowText},{children:(null==(n=null==(a=null==n?void 0:n.jobConfig)?void 0:a.sourceData)?void 0:n.sourceId)||"N/A"}))})),s.find(e=>"tdo"===e)&&jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0},{children:jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"caption",className:u.rowText},{children:r}))})),s.find(e=>"tdo"===e)&&jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0},{children:jsxRuntime.exports.jsx(JobStatusBadge,{status:t})})),s.find(e=>"user"===e)&&jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0},{children:jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"caption",className:u.rowText},{children:i||"N/A"}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:1,item:!0,sx:{textAlign:"center"}},{children:!l&&jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(IconButton,Object.assign({"data-testid":"table-row-menu-button-"+e,onClick:e=>h(e.currentTarget),size:"small"},{children:jsxRuntime.exports.jsx(MoreVert,{fontSize:"small"})})),jsxRuntime.exports.jsx(JobsRowContextMenu,{anchorEl:d,id:p,jobId:e||"",open:!!d,onClose:()=>h(null),isPanelFullScreen:c,"data-testid":"processing-center-job.menu-icon"})]})}))]})),jsxRuntime.exports.jsx(Divider$1,{})]}))};function buildFormatLongFn(t){return function(e){e=e||{},e=e.width?String(e.width):t.defaultWidth;return t.formats[e]||t.formats[t.defaultWidth]}}function buildLocalizeFn(r){return function(e,t){var n,t=t||{},i=(t="formatting"===(t.context?String(t.context):"standalone")&&r.formattingValues?(i=r.defaultFormattingWidth||r.defaultWidth,n=t.width?String(t.width):i,r.formattingValues[n]||r.formattingValues[i]):(n=r.defaultWidth,i=t.width?String(t.width):r.defaultWidth,r.values[i]||r.values[n]),r.argumentCallback?r.argumentCallback(e):e);return t[i]}}function buildMatchPatternFn(r){return function(e,t){var e=String(e),t=t||{},n=e.match(r.matchPattern);if(!n)return null;var n=n[0],i=e.match(r.parsePattern);if(!i)return null;i=r.valueCallback?r.valueCallback(i[0]):i[0];return{value:i=t.valueCallback?t.valueCallback(i):i,rest:e.slice(n.length)}}}function buildMatchFn(o){return function(e,t){var e=String(e),t=t||{},n=t.width,i=n&&o.matchPatterns[n]||o.matchPatterns[o.defaultMatchWidth],i=e.match(i);if(!i)return null;var r=i[0],i=n&&o.parsePatterns[n]||o.parsePatterns[o.defaultParseWidth],n="[object Array]"===Object.prototype.toString.call(i)?findIndex(i,function(e){return e.test(r)}):findKey(i,function(e){return e.test(r)});return n=o.valueCallback?o.valueCallback(n):n,{value:n=t.valueCallback?t.valueCallback(n):n,rest:e.slice(r.length)}}}function findKey(e,t){for(var n in e)if(e.hasOwnProperty(n)&&t(e[n]))return n}function findIndex(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n}var formatDistanceLocale$2={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function formatDistance$2(e,t,n){return n=n||{},e="string"==typeof formatDistanceLocale$2[e]?formatDistanceLocale$2[e]:1===t?formatDistanceLocale$2[e].one:formatDistanceLocale$2[e].other.replace("{{count}}",t),n.addSuffix?0<n.comparison?"in "+e:e+" ago":e}var formatRelativeLocale$2={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function formatRelative$2(e,t,n,i){return formatRelativeLocale$2[e]}var eraValues$2={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},quarterValues$2={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},monthValues$2={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},dayValues$2={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},dayPeriodValues$2={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},formattingDayPeriodValues$1={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}};function ordinalNumber$2(e,t){var n=Number(e),e=n%100;if(20<e||e<10)switch(e%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"}var localize$4={ordinalNumber:ordinalNumber$2,era:buildLocalizeFn({values:eraValues$2,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues$2,defaultWidth:"wide",argumentCallback:function(e){return Number(e)-1}}),month:buildLocalizeFn({values:monthValues$2,defaultWidth:"wide"}),day:buildLocalizeFn({values:dayValues$2,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues$2,defaultWidth:"wide",formattingValues:formattingDayPeriodValues$1,defaultFormattingWidth:"wide"})},localize$5=localize$4,matchOrdinalNumberPattern$2=/^(\d+)(th|st|nd|rd)?/i,parseOrdinalNumberPattern$2=/\d+/i,matchEraPatterns$2={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},parseEraPatterns$2={any:[/^b/i,/^(a|c)/i]},matchQuarterPatterns$2={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},parseQuarterPatterns$2={any:[/1/i,/2/i,/3/i,/4/i]},matchMonthPatterns$2={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},parseMonthPatterns$2={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},matchDayPatterns$2={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},parseDayPatterns$2={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},matchDayPeriodPatterns$2={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},parseDayPeriodPatterns$2={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},match$4={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern$2,parsePattern:parseOrdinalNumberPattern$2,valueCallback:function(e){return parseInt(e,10)}}),era:buildMatchFn({matchPatterns:matchEraPatterns$2,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns$2,defaultParseWidth:"any"}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns$2,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns$2,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:buildMatchFn({matchPatterns:matchMonthPatterns$2,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns$2,defaultParseWidth:"any"}),day:buildMatchFn({matchPatterns:matchDayPatterns$2,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns$2,defaultParseWidth:"any"}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns$2,defaultMatchWidth:"any",parsePatterns:parseDayPeriodPatterns$2,defaultParseWidth:"any"})},match$5=match$4,dateFormats$2={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},timeFormats$2={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},dateTimeFormats$2={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},formatLong$4={date:buildFormatLongFn({formats:dateFormats$2,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats$2,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats$2,defaultWidth:"full"})},formatLong$5=formatLong$4,locale$2={code:"en-US",formatDistance:formatDistance$2,formatLong:formatLong$4,formatRelative:formatRelative$2,localize:localize$5,match:match$5,options:{weekStartsOn:0,firstWeekContainsDate:1}},enUS=locale$2,formatDistanceLocale$1={lessThanXSeconds:{one:"menos de un segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"medio minuto",lessThanXMinutes:{one:"menos de un minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"alrededor de 1 hora",other:"alrededor de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 día",other:"{{count}} días"},aboutXWeeks:{one:"alrededor de 1 semana",other:"alrededor de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"alrededor de 1 mes",other:"alrededor de {{count}} meses"},xMonths:{one:"1 mes",other:"{{count}} meses"},aboutXYears:{one:"alrededor de 1 año",other:"alrededor de {{count}} años"},xYears:{one:"1 año",other:"{{count}} años"},overXYears:{one:"más de 1 año",other:"más de {{count}} años"},almostXYears:{one:"casi 1 año",other:"casi {{count}} años"}};function formatDistance$1(e,t,n){return n=n||{},e="string"==typeof formatDistanceLocale$1[e]?formatDistanceLocale$1[e]:1===t?formatDistanceLocale$1[e].one:formatDistanceLocale$1[e].other.replace("{{count}}",t),n.addSuffix?0<n.comparison?"en "+e:"hace "+e:e}var dateFormats$1={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/y"},timeFormats$1={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},dateTimeFormats$1={full:"{{date}} 'a las' {{time}}",long:"{{date}} 'a las' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},formatLong$2={date:buildFormatLongFn({formats:dateFormats$1,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats$1,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats$1,defaultWidth:"full"})},formatLong$3=formatLong$2,formatRelativeLocale$1={lastWeek:"'el' eeee 'pasado a la' LT",yesterday:"'ayer a la' p",today:"'hoy a la' p",tomorrow:"'mañana a la' p",nextWeek:"eeee 'a la' p",other:"P"},formatRelativeLocalePlural={lastWeek:"'el' eeee 'pasado a las' p",yesterday:"'ayer a las' p",today:"'hoy a las' p",tomorrow:"'mañana a las' p",nextWeek:"eeee 'a las' p",other:"P"};function formatRelative$1(e,t,n,i){return(1!==t.getUTCHours()?formatRelativeLocalePlural:formatRelativeLocale$1)[e]}var eraValues$1={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","después de cristo"]},quarterValues$1={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},monthValues$1={narrow:["e","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],wide:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"]},dayValues$1={narrow:["d","l","m","m","j","v","s"],short:["do","lu","ma","mi","ju","vi","sa"],abbreviated:["dom","lun","mar","mié","jue","vie","sáb"],wide:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"]},dayPeriodValues$1={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"}},formattingDayPeriodValues={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"}};function ordinalNumber$1(e){return Number(e)+"º"}var localize$2={ordinalNumber:ordinalNumber$1,era:buildLocalizeFn({values:eraValues$1,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues$1,defaultWidth:"wide",argumentCallback:function(e){return Number(e)-1}}),month:buildLocalizeFn({values:monthValues$1,defaultWidth:"wide"}),day:buildLocalizeFn({values:dayValues$1,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues$1,defaultWidth:"wide",formattingValues:formattingDayPeriodValues,defaultFormattingWidth:"wide"})},localize$3=localize$2,matchOrdinalNumberPattern$1=/^(\d+)(º)?/i,parseOrdinalNumberPattern$1=/\d+/i,matchEraPatterns$1={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,wide:/^(antes de cristo|antes de la era com[uú]n|despu[eé]s de cristo|era com[uú]n)/i},parseEraPatterns$1={any:[/^ac/i,/^dc/i],wide:[/^(antes de cristo|antes de la era com[uú]n)/i,/^(despu[eé]s de cristo|era com[uú]n)/i]},matchQuarterPatterns$1={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},parseQuarterPatterns$1={any:[/1/i,/2/i,/3/i,/4/i]},matchMonthPatterns$1={narrow:/^[efmajsond]/i,abbreviated:/^(ene|feb|mar|abr|may|jun|jul|ago|sep|oct|nov|dic)/i,wide:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i},parseMonthPatterns$1={narrow:[/^e/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^en/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i]},matchDayPatterns$1={narrow:/^[dlmjvs]/i,short:/^(do|lu|ma|mi|ju|vi|sa)/i,abbreviated:/^(dom|lun|mar|mie|jue|vie|sab)/i,wide:/^(domingo|lunes|martes|mi[ée]rcoles|jueves|viernes|s[áa]bado)/i},parseDayPatterns$1={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^do/i,/^lu/i,/^ma/i,/^mi/i,/^ju/i,/^vi/i,/^sa/i]},matchDayPeriodPatterns$1={narrow:/^(a|p|mn|md|(de la|a las) (mañana|tarde|noche))/i,any:/^([ap]\.?\s?m\.?|medianoche|mediodia|(de la|a las) (mañana|tarde|noche))/i},parseDayPeriodPatterns$1={any:{am:/^a/i,pm:/^p/i,midnight:/^mn/i,noon:/^md/i,morning:/mañana/i,afternoon:/tarde/i,evening:/tarde/i,night:/noche/i}},match$2={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern$1,parsePattern:parseOrdinalNumberPattern$1,valueCallback:function(e){return parseInt(e,10)}}),era:buildMatchFn({matchPatterns:matchEraPatterns$1,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns$1,defaultParseWidth:"any"}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns$1,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns$1,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:buildMatchFn({matchPatterns:matchMonthPatterns$1,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns$1,defaultParseWidth:"any"}),day:buildMatchFn({matchPatterns:matchDayPatterns$1,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns$1,defaultParseWidth:"any"}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns$1,defaultMatchWidth:"any",parsePatterns:parseDayPeriodPatterns$1,defaultParseWidth:"any"})},match$3=match$2,locale$1={code:"es",formatDistance:formatDistance$1,formatLong:formatLong$3,formatRelative:formatRelative$1,localize:localize$3,match:match$2,options:{weekStartsOn:1,firstWeekContainsDate:1}},es=locale$1,formatDistanceLocale={lessThanXSeconds:{one:"moins d’une seconde",other:"moins de {{count}} secondes"},xSeconds:{one:"1 seconde",other:"{{count}} secondes"},halfAMinute:"30 secondes",lessThanXMinutes:{one:"moins d’une minute",other:"moins de {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"environ 1 heure",other:"environ {{count}} heures"},xHours:{one:"1 heure",other:"{{count}} heures"},xDays:{one:"1 jour",other:"{{count}} jours"},aboutXWeeks:{one:"environ 1 semaine",other:"environ {{count}} semaines"},xWeeks:{one:"1 semaine",other:"{{count}} semaines"},aboutXMonths:{one:"environ 1 mois",other:"environ {{count}} mois"},xMonths:{one:"1 mois",other:"{{count}} mois"},aboutXYears:{one:"environ 1 an",other:"environ {{count}} ans"},xYears:{one:"1 an",other:"{{count}} ans"},overXYears:{one:"plus d’un an",other:"plus de {{count}} ans"},almostXYears:{one:"presqu’un an",other:"presque {{count}} ans"}};function formatDistance(e,t,n){return n=n||{},e="string"==typeof formatDistanceLocale[e]?formatDistanceLocale[e]:1===t?formatDistanceLocale[e].one:formatDistanceLocale[e].other.replace("{{count}}",t),n.addSuffix?0<n.comparison?"dans "+e:"il y a "+e:e}var dateFormats={full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},timeFormats={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},dateTimeFormats={full:"{{date}} 'à' {{time}}",long:"{{date}} 'à' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},formatLong={date:buildFormatLongFn({formats:dateFormats,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats,defaultWidth:"full"})},formatLong$1=formatLong,formatRelativeLocale={lastWeek:"eeee 'dernier à' p",yesterday:"'hier à' p",today:"'aujourd’hui à' p",tomorrow:"'demain à' p'",nextWeek:"eeee 'prochain à' p",other:"P"};function formatRelative(e,t,n,i){return formatRelativeLocale[e]}var eraValues={narrow:["av. J.-C","ap. J.-C"],abbreviated:["av. J.-C","ap. J.-C"],wide:["avant Jésus-Christ","après Jésus-Christ"]},quarterValues={narrow:["T1","T2","T3","T4"],abbreviated:["1er trim.","2ème trim.","3ème trim.","4ème trim."],wide:["1er trimestre","2ème trimestre","3ème trimestre","4ème trimestre"]},monthValues={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],wide:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"]},dayValues={narrow:["D","L","M","M","J","V","S"],short:["di","lu","ma","me","je","ve","sa"],abbreviated:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],wide:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"]},dayPeriodValues={narrow:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"mat.",afternoon:"ap.m.",evening:"soir",night:"mat."},abbreviated:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"matin",afternoon:"après-midi",evening:"soir",night:"matin"},wide:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"du matin",afternoon:"de l’après-midi",evening:"du soir",night:"du matin"}};function ordinalNumber(e,t){e=Number(e),t=String((t||{}).unit);return 0===e?e:e+("year"===t||"hour"===t||"week"===t?1===e?"ère":"ème":1===e?"er":"ème")}var localize={ordinalNumber:ordinalNumber,era:buildLocalizeFn({values:eraValues,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues,defaultWidth:"wide",argumentCallback:function(e){return Number(e)-1}}),month:buildLocalizeFn({values:monthValues,defaultWidth:"wide"}),day:buildLocalizeFn({values:dayValues,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues,defaultWidth:"wide"})},localize$1=localize,matchOrdinalNumberPattern=/^(\d+)(ième|ère|ème|er|e)?/i,parseOrdinalNumberPattern=/\d+/i,matchEraPatterns={narrow:/^(av\.J\.C|ap\.J\.C|ap\.J\.-C)/i,abbreviated:/^(av\.J\.-C|av\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i,wide:/^(avant Jésus-Christ|après Jésus-Christ)/i},parseEraPatterns={any:[/^av/i,/^ap/i]},matchQuarterPatterns={narrow:/^[1234]/i,abbreviated:/^t[1234]/i,wide:/^[1234](er|ème|e)? trimestre/i},parseQuarterPatterns={any:[/1/i,/2/i,/3/i,/4/i]},matchMonthPatterns={narrow:/^[jfmasond]/i,abbreviated:/^(janv|févr|mars|avr|mai|juin|juill|juil|août|sept|oct|nov|déc)\.?/i,wide:/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i},parseMonthPatterns={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^av/i,/^ma/i,/^juin/i,/^juil/i,/^ao/i,/^s/i,/^o/i,/^n/i,/^d/i]},matchDayPatterns={narrow:/^[lmjvsd]/i,short:/^(di|lu|ma|me|je|ve|sa)/i,abbreviated:/^(dim|lun|mar|mer|jeu|ven|sam)\.?/i,wide:/^(dimanche|lundi|mardi|mercredi|jeudi|vendredi|samedi)/i},parseDayPatterns={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^di/i,/^lu/i,/^ma/i,/^me/i,/^je/i,/^ve/i,/^sa/i]},matchDayPeriodPatterns={narrow:/^(a|p|minuit|midi|mat\.?|ap\.?m\.?|soir|nuit)/i,any:/^([ap]\.?\s?m\.?|du matin|de l'après[-\s]midi|du soir|de la nuit)/i},parseDayPeriodPatterns={any:{am:/^a/i,pm:/^p/i,midnight:/^min/i,noon:/^mid/i,morning:/mat/i,afternoon:/ap/i,evening:/soir/i,night:/nuit/i}},match={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern,parsePattern:parseOrdinalNumberPattern,valueCallback:function(e){return parseInt(e,10)}}),era:buildMatchFn({matchPatterns:matchEraPatterns,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns,defaultParseWidth:"any"}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:buildMatchFn({matchPatterns:matchMonthPatterns,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns,defaultParseWidth:"any"}),day:buildMatchFn({matchPatterns:matchDayPatterns,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns,defaultParseWidth:"any"}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns,defaultMatchWidth:"any",parsePatterns:parseDayPeriodPatterns,defaultParseWidth:"any"})},match$1=match,locale={code:"fr",formatDistance:formatDistance,formatLong:formatLong$1,formatRelative:formatRelative,localize:localize$1,match:match,options:{weekStartsOn:1,firstWeekContainsDate:1}},fr=locale;const formattedMessages=e=>({jobsTableSettingsPanelHeaderTitle:e.formatMessage({id:"processing-center.jobs.settings-panel-header.title",defaultMessage:[{type:0,value:"Table Data Settings"}]}),jobsTableSettingsPanelHeaderDescription:e.formatMessage({id:"processing-center.jobs.settings-panel-header.description",defaultMessage:[{type:0,value:"Add and remove data from your table view."}]}),jobsDetailsPanelHeaderTitle:e.formatMessage({id:"processing-center.jobs.details-panel-header.title",defaultMessage:[{type:0,value:"Job Details"}]}),jobsDetailsPanelClose:e.formatMessage({id:"processing-center.jobs.details-panel-header.close-button",defaultMessage:[{type:0,value:"Close Panel"}]}),tabTitle_overview:e.formatMessage({id:"processing-center.jobs.details-panel.tab.tittle.overview",defaultMessage:[{type:0,value:"Overview"}]}),tabTitle_tasks:e.formatMessage({id:"processing-center.jobs.details-panel.tab.tittle.tasks",defaultMessage:[{type:0,value:"Tasks"}]}),tabTitle_errors:e.formatMessage({id:"processing-center.jobs.details-panel.tab.tittle.errors",defaultMessage:[{type:0,value:"Errors"}]}),okButtonLabel:e.formatMessage({id:"processing-center.jobs.ok-button-label",defaultMessage:[{type:0,value:"OK"}]}),clearButtonLabel:e.formatMessage({id:"processing-center.jobs.clear-button-label",defaultMessage:[{type:0,value:"Clear"}]}),jobsTableDateRangeFilterDefault:e.formatMessage({id:"processing-center.jobs.filter-range-default-value",defaultMessage:[{type:0,value:"Any Time"}]}),jobsTableDateRangeFilterLabel:e.formatMessage({id:"processing-center.jobs.filter-range-label",defaultMessage:[{type:0,value:"Processing Date/time"}]}),jobsTableUserFilterLabel:e.formatMessage({id:"processing-center.jobs.user-label",defaultMessage:[{type:0,value:"Email"}]}),jobsTableStatusFilterLabel:e.formatMessage({id:"processing-center.jobs.status-label",defaultMessage:[{type:0,value:"Status"}]}),jobTableFilterDefaultPlaceholder:e.formatMessage({id:"processing-center.jobs.default-filter-placeholder",defaultMessage:[{type:0,value:"All"}]})}),useStyles$8=makeStyles()(e=>({container:{padding:"12px 20px 4px",paddingTop:"10px",display:"flex",flexDirection:"row",justifyContent:"flex-start",opacity:.9},actions:{padding:"4px 20px 16px",paddingTop:"10px",display:"flex",flexDirection:"row",justifyContent:"flex-start",opacity:.9},button:{marginRight:"24px"},formControl:{marginRight:"12px"},dateRangeDisplay:{display:"flex",alignItems:"center",justifyContent:"start",fontWeight:400,fontSize:"10px",lineHeight:"16px",border:"1px solid #D5DFE9",borderRadius:"5px",padding:"0px 7px",boxSizing:"border-box",minWidth:"120px",minHeight:"28px",cursor:"pointer"},label:{fontWeight:700,fontSize:14,color:"#2A323C",marginBottom:0,display:"flex",justifyContent:"space-between"},selectField:{width:150,height:28,fontSize:"10px",lineHeight:"16px",fontWeight:400},title:{textTransform:"capitalize"}})),locales={en:enUS,fr:fr,es:es},DATE_RANGE_LIMIT=7776e6,toDate=e=>void 0===e?e:new Date(e),DateRangeFilter=()=>{const[e,t]=react.exports.useState(!1),n=useSelector(selectJobsTableFilters)["dateTimeFilter"],[i,r]=react.exports.useState({startDate:toDate(n.fromDateTime),endDate:toDate(n.toDateTime)});var o=useSelector(preferredLanguageSelector);const a=useIntl(),s=useDispatch();var l=useStyles$8()["classes"],{okButtonLabel:c,clearButtonLabel:u,jobsTableDateRangeFilterDefault:d}=formattedMessages(a),h=()=>{var e;s(actions$1.setFilterValue({filter:"dateTimeFilter",value:{fromDateTime:null==(e=i.startDate)?void 0:e.toISOString(),toDateTime:null==(e=i.endDate)?void 0:e.toISOString(),field:"createdDateTime"}})),t(!1)},d=n.fromDateTime||n.toDateTime?a.formatDate(n.fromDateTime)+" - "+a.formatDate(n.toDateTime):d;return jsxRuntime.exports.jsxs(FormControl$1,Object.assign({size:"small",className:l.formControl},{children:[jsxRuntime.exports.jsx("label",Object.assign({htmlFor:"jobs-filter-date-range",className:l.label},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-processing-center-jobs-filter-range-label",defaultMessage:"Processing Date/time",description:"label for the jobs filter date range picker"})})),jsxRuntime.exports.jsx("div",Object.assign({id:"jobs-filter-date-range",className:l.dateRangeDisplay,onClick:()=>{r({startDate:toDate(n.fromDateTime),endDate:toDate(n.toDateTime)}),t(!0)}},{children:d})),jsxRuntime.exports.jsxs(Dialog,Object.assign({open:e,disableEscapeKeyDown:!0,onClose:h,maxWidth:"md"},{children:[jsxRuntime.exports.jsx(DialogContent,{children:jsxRuntime.exports.jsx(FormControl$1,Object.assign({variant:"standard"},{children:jsxRuntime.exports.jsx(LocalizationProvider,Object.assign({dateAdapter:AdapterDateFns,adapterLocale:locales[o]},{children:jsxRuntime.exports.jsxs(Grid,Object.assign({container:!0,spacing:3},{children:[jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:12,md:6},{children:jsxRuntime.exports.jsx(CalendarPicker,{date:i.startDate||null,onChange:n=>{r(({endDate:e})=>{const t=e||new Date;return n&&t.getTime()>n.getTime()+DATE_RANGE_LIMIT&&t.setTime(n.getTime()+DATE_RANGE_LIMIT),{startDate:n||void 0,endDate:t}})},maxDate:i.endDate||new Date,defaultCalendarMonth:i.startDate})})),jsxRuntime.exports.jsx(Grid,Object.assign({item:!0,xs:12,md:6},{children:jsxRuntime.exports.jsx(CalendarPicker,{date:i.endDate||null,onChange:t=>{r(e=>Object.assign(Object.assign({},e),{endDate:t||void 0}))},maxDate:new Date,disabled:!i.startDate,defaultCalendarMonth:i.endDate})}))]}))}))}))}),jsxRuntime.exports.jsxs(DialogActions,{children:[jsxRuntime.exports.jsx(Button,Object.assign({onClick:()=>{s(actions$1.setFilterValue({filter:"dateTimeFilter",value:{field:"createdDateTime"}})),r({}),t(!1)}},{children:u})),jsxRuntime.exports.jsx(Button,Object.assign({onClick:h},{children:c}))]})]}))]}))},UserFilter=()=>{var e=useStyles$8()["classes"],t=useIntl();const{jobsTableUserFilterLabel:n,jobTableFilterDefaultPlaceholder:i}=formattedMessages(t);return jsxRuntime.exports.jsxs(FormControl$1,Object.assign({size:"small",className:e.formControl},{children:[jsxRuntime.exports.jsx("label",Object.assign({className:e.label},{children:n})),jsxRuntime.exports.jsx(Select$1,{multiple:!0,displayEmpty:!0,value:[],variant:"outlined",renderValue:e=>{if(0===e.length)return jsxRuntime.exports.jsx("div",{children:i});e=e.length;return jsxRuntime.exports.jsx(Tooltip$1,Object.assign({title:""},{children:jsxRuntime.exports.jsxs("span",{children:[e," Users"]})}))},className:e.selectField})]}))};var wellKnownSymbol$6=wellKnownSymbol$d,TO_STRING_TAG$1=wellKnownSymbol$d("toStringTag"),test={},toStringTagSupport=(test[TO_STRING_TAG$1]="z","[object z]"===String(test)),TO_STRING_TAG_SUPPORT=toStringTagSupport,isCallable$3=isCallable$i,classofRaw=classofRaw$1,wellKnownSymbol$5=wellKnownSymbol$d,TO_STRING_TAG=wellKnownSymbol$d("toStringTag"),$Object=Object,CORRECT_ARGUMENTS="Arguments"==classofRaw(function(){return arguments}()),tryGet=function(e,t){try{return e[t]}catch(e){}},classof$4=TO_STRING_TAG_SUPPORT?classofRaw:function(e){var t;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(t=tryGet(e=$Object(e),TO_STRING_TAG))?t:CORRECT_ARGUMENTS?classofRaw(e):"Object"==(t=classofRaw(e))&&isCallable$3(e.callee)?"Arguments":t},classof$3=classof$4,$String=String,toString$6=function(e){if("Symbol"===classof$3(e))throw TypeError("Cannot convert a Symbol value to a string");return $String(e)},anObject$4=anObject$a,regexpFlags$1=function(){var e=anObject$4(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},fails$7=fails$j,global$3=global$e,$RegExp$2=global$e.RegExp,UNSUPPORTED_Y$2=fails$7(function(){var e=$RegExp$2("a","y");return e.lastIndex=2,null!=e.exec("abcd")}),MISSED_STICKY=UNSUPPORTED_Y$2||fails$7(function(){return!$RegExp$2("a","y").sticky}),BROKEN_CARET=UNSUPPORTED_Y$2||fails$7(function(){var e=$RegExp$2("^r","gy");return e.lastIndex=2,null!=e.exec("str")}),regexpStickyHelpers={BROKEN_CARET:BROKEN_CARET,MISSED_STICKY:MISSED_STICKY,UNSUPPORTED_Y:UNSUPPORTED_Y$2},fails$6=fails$j,global$2=global$e,$RegExp$1=global$e.RegExp,regexpUnsupportedDotAll=fails$6(function(){var e=$RegExp$1(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)}),fails$5=fails$j,global$1=global$e,$RegExp=global$e.RegExp,regexpUnsupportedNcg=fails$5(function(){var e=$RegExp("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")}),call$4=functionCall,uncurryThis$8=functionUncurryThis,toString$5=toString$6,regexpFlags=regexpFlags$1,stickyHelpers$1=regexpStickyHelpers,shared=shared$4.exports,create=objectCreate,getInternalState=internalState.get,UNSUPPORTED_DOT_ALL=regexpUnsupportedDotAll,UNSUPPORTED_NCG=regexpUnsupportedNcg,nativeReplace=shared("native-string-replace",String.prototype.replace),nativeExec=RegExp.prototype.exec,patchedExec=nativeExec,charAt$3=uncurryThis$8("".charAt),indexOf=uncurryThis$8("".indexOf),replace$2=uncurryThis$8("".replace),stringSlice$4=uncurryThis$8("".slice),UPDATES_LAST_INDEX_WRONG=function(){var e=/a/,t=/b*/g;return call$4(nativeExec,e,"a"),call$4(nativeExec,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),UNSUPPORTED_Y$1=stickyHelpers$1.BROKEN_CARET,NPCG_INCLUDED=void 0!==/()??/.exec("")[1],PATCH=UPDATES_LAST_INDEX_WRONG||NPCG_INCLUDED||UNSUPPORTED_Y$1||UNSUPPORTED_DOT_ALL||UNSUPPORTED_NCG,regexpExec$3=patchedExec=PATCH?function(e){var t,n,i,r,o,a,s=this,l=getInternalState(s),e=toString$5(e),c=l.raw;if(c)return c.lastIndex=s.lastIndex,d=call$4(patchedExec,c,e),s.lastIndex=c.lastIndex,d;var u=l.groups,c=UNSUPPORTED_Y$1&&s.sticky,d=call$4(regexpFlags,s),l=s.source,h=0,p=e;if(c&&(d=replace$2(d,"y",""),-1===indexOf(d,"g")&&(d+="g"),p=stringSlice$4(e,s.lastIndex),0<s.lastIndex&&(!s.multiline||s.multiline&&"\n"!==charAt$3(e,s.lastIndex-1))&&(l="(?: "+l+")",p=" "+p,h++),t=new RegExp("^(?:"+l+")",d)),NPCG_INCLUDED&&(t=new RegExp("^"+l+"$(?!\\s)",d)),UPDATES_LAST_INDEX_WRONG&&(n=s.lastIndex),i=call$4(nativeExec,c?t:s,p),c?i?(i.input=stringSlice$4(i.input,h),i[0]=stringSlice$4(i[0],h),i.index=s.lastIndex,s.lastIndex+=i[0].length):s.lastIndex=0:UPDATES_LAST_INDEX_WRONG&&i&&(s.lastIndex=s.global?i.index+i[0].length:n),NPCG_INCLUDED&&i&&1<i.length&&call$4(nativeReplace,i[0],t,function(){for(r=1;r<arguments.length-2;r++)void 0===arguments[r]&&(i[r]=void 0)}),i&&u)for(i.groups=o=create(null),r=0;r<u.length;r++)o[(a=u[r])[0]]=i[a[1]];return i}:patchedExec,$$2=_export,exec$2=regexpExec$3,NATIVE_BIND=(_export({target:"RegExp",proto:!0,forced:/./.exec!==exec$2},{exec:exec$2}),functionBindNative),FunctionPrototype=Function.prototype,apply$2=FunctionPrototype.apply,call$3=FunctionPrototype.call,functionApply="object"==typeof Reflect&&Reflect.apply||(NATIVE_BIND?call$3.bind(apply$2):function(){return call$3.apply(apply$2,arguments)}),uncurryThis$7=functionUncurryThis,defineBuiltIn=defineBuiltIn$4,regexpExec$2=regexpExec$3,fails$4=fails$j,wellKnownSymbol$4=wellKnownSymbol$d,createNonEnumerableProperty=createNonEnumerableProperty$5,SPECIES$1=wellKnownSymbol$4("species"),RegExpPrototype=RegExp.prototype,fixRegexpWellKnownSymbolLogic=function(n,e,t,i){var a,r=wellKnownSymbol$4(n),s=!fails$4(function(){var e={};return e[r]=function(){return 7},7!=""[n](e)}),o=s&&!fails$4(function(){var e=!1,t=/a/;return"split"===n&&((t={constructor:{}}).constructor[SPECIES$1]=function(){return t},t.flags="",t[r]=/./[r]),t.exec=function(){return e=!0,null},t[r](""),!e});s&&o&&!t||(a=uncurryThis$7(/./[r]),o=e(r,""[n],function(e,t,n,i,r){var e=uncurryThis$7(e),o=t.exec;return o===regexpExec$2||o===RegExpPrototype.exec?s&&!r?{done:!0,value:a(t,n,i)}:{done:!0,value:e(n,t,i)}:{done:!1}}),defineBuiltIn(String.prototype,n,o[0]),defineBuiltIn(RegExpPrototype,r,o[1])),i&&createNonEnumerableProperty(RegExpPrototype[r],"sham",!0)},uncurryThis$6=functionUncurryThis,toIntegerOrInfinity$1=toIntegerOrInfinity$4,toString$4=toString$6,requireObjectCoercible$4=requireObjectCoercible$7,charAt$2=uncurryThis$6("".charAt),charCodeAt=uncurryThis$6("".charCodeAt),stringSlice$3=uncurryThis$6("".slice),createMethod$1=function(r){return function(e,t){var n,e=toString$4(requireObjectCoercible$4(e)),t=toIntegerOrInfinity$1(t),i=e.length;return t<0||i<=t?r?"":void 0:(n=charCodeAt(e,t))<55296||56319<n||t+1===i||(i=charCodeAt(e,t+1))<56320||57343<i?r?charAt$2(e,t):n:r?stringSlice$3(e,t,t+2):i-56320+(n-55296<<10)+65536}},stringMultibyte={codeAt:createMethod$1(!1),charAt:createMethod$1(!0)},charAt$1=stringMultibyte.charAt,advanceStringIndex$2=function(e,t,n){return t+(n?charAt$1(e,t).length:1)},uncurryThis$5=functionUncurryThis,toObject=toObject$4,floor=Math.floor,charAt=uncurryThis$5("".charAt),replace$1=uncurryThis$5("".replace),stringSlice$2=uncurryThis$5("".slice),SUBSTITUTION_SYMBOLS=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,SUBSTITUTION_SYMBOLS_NO_NAMED=/\$([$&'`]|\d{1,2})/g,getSubstitution$1=function(o,a,s,l,c,e){var u=s+o.length,d=l.length,t=SUBSTITUTION_SYMBOLS_NO_NAMED;return void 0!==c&&(c=toObject(c),t=SUBSTITUTION_SYMBOLS),replace$1(e,t,function(e,t){var n;switch(charAt(t,0)){case"$":return"$";case"&":return o;case"`":return stringSlice$2(a,0,s);case"'":return stringSlice$2(a,u);case"<":n=c[stringSlice$2(t,1,-1)];break;default:var i,r=+t;if(0==r)return e;if(d<r)return 0!==(i=floor(r/10))&&i<=d?void 0===l[i-1]?charAt(t,1):l[i-1]+charAt(t,1):e;n=l[r-1]}return void 0===n?"":n})},call$2=functionCall,anObject$3=anObject$a,isCallable$2=isCallable$i,classof$2=classofRaw$1,regexpExec$1=regexpExec$3,$TypeError$2=TypeError,regexpExecAbstract=function(e,t){var n=e.exec;if(isCallable$2(n))return null!==(n=call$2(n,e,t))&&anObject$3(n),n;if("RegExp"===classof$2(e))return call$2(regexpExec$1,e,t);throw $TypeError$2("RegExp#exec called on incompatible receiver")},apply$1=functionApply,call$1=functionCall,uncurryThis$4=functionUncurryThis,fixRegExpWellKnownSymbolLogic$1=fixRegexpWellKnownSymbolLogic,fails$3=fails$j,anObject$2=anObject$a,isCallable$1=isCallable$i,toIntegerOrInfinity=toIntegerOrInfinity$4,toLength$1=toLength$3,toString$3=toString$6,requireObjectCoercible$3=requireObjectCoercible$7,advanceStringIndex$1=advanceStringIndex$2,getMethod$1=getMethod$3,getSubstitution=getSubstitution$1,regExpExec=regexpExecAbstract,wellKnownSymbol$3=wellKnownSymbol$d,REPLACE=wellKnownSymbol$d("replace"),max$1=Math.max,min$1=Math.min,concat=uncurryThis$4([].concat),push$1=uncurryThis$4([].push),stringIndexOf$1=uncurryThis$4("".indexOf),stringSlice$1=uncurryThis$4("".slice),maybeToString=function(e){return void 0===e?e:String(e)},REPLACE_KEEPS_$0="$0"==="a".replace(/./,"$0"),REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE=!!/./[REPLACE]&&""===/./[REPLACE]("a","$0"),REPLACE_SUPPORTS_NAMED_GROUPS=!fails$3(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")});fixRegExpWellKnownSymbolLogic$1("replace",function(e,v,b){var x=REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE?"$":"$0";return[function(e,t){var n=requireObjectCoercible$3(this),i=null==e?void 0:getMethod$1(e,REPLACE);return i?call$1(i,e,n,t):call$1(v,toString$3(n),e,t)},function(e,t){var n=anObject$2(this),i=toString$3(e);if("string"==typeof t&&-1===stringIndexOf$1(t,x)&&-1===stringIndexOf$1(t,"$<")){e=b(v,n,i,t);if(e.done)return e.value}for(var r,o=isCallable$1(t),a=(o||(t=toString$3(t)),n.global),s=(a&&(r=n.unicode,n.lastIndex=0),[]);null!==(d=regExpExec(n,i))&&(push$1(s,d),a);)""===toString$3(d[0])&&(n.lastIndex=advanceStringIndex$1(i,toLength$1(n.lastIndex),r));for(var l="",c=0,u=0;u<s.length;u++){for(var d,h=toString$3((d=s[u])[0]),p=max$1(min$1(toIntegerOrInfinity(d.index),i.length),0),f=[],g=1;g<d.length;g++)push$1(f,maybeToString(d[g]));var y=d.groups,m=o?(m=concat([h],f,p,i),void 0!==y&&push$1(m,y),toString$3(apply$1(t,void 0,m))):getSubstitution(h,i,p,f,y,t);c<=p&&(l+=stringSlice$1(i,c,p)+m,c=p+h.length)}return l+stringSlice$1(i,c)}]},!REPLACE_SUPPORTS_NAMED_GROUPS||!REPLACE_KEEPS_$0||REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);const STATUSES=["pending","running","complete","queued","failed","cancelled"],StatusFilter=()=>{const[e,t]=react.exports.useState([]),n=useStyles$8()["classes"];var i=useIntl();const r=useDispatch(),{jobsTableStatusFilterLabel:o,jobTableFilterDefaultPlaceholder:a}=formattedMessages(i);return jsxRuntime.exports.jsxs(FormControl$1,Object.assign({size:"small",className:n.formControl},{children:[jsxRuntime.exports.jsx("label",Object.assign({className:n.label},{children:o})),jsxRuntime.exports.jsx(Select$1,Object.assign({multiple:!0,displayEmpty:!0,value:e,onChange:e=>{t(e.target.value)},onClose:()=>{r(actions$1.setFilterValue({filter:"status",value:e}))},variant:"outlined",renderValue:e=>{if(0===e.length)return jsxRuntime.exports.jsx("div",{children:a});var t=e["length"];return jsxRuntime.exports.jsx(Tooltip$1,Object.assign({title:e.join(", "),className:n.title},{children:jsxRuntime.exports.jsx("span",Object.assign({className:n.title},{children:1===t?e[0]:t+" Statuses"}))}))},className:n.selectField},{children:STATUSES.map(e=>jsxRuntime.exports.jsx(MenuItem$1,Object.assign({value:e},{children:e.replace("_"," ")})))}))]}))},namespace=SLICE_NAME,initialState={[namespace$1]:initialState$1},actions={[namespace$1]:actions$1},rootReducer=combineReducers({[namespace$1]:processingCenter_jobs}),useStyles$7=makeStyles()(e=>({engineLookupContainer:{},autoComplete:{width:"230px"},engineName:{"& .Sdk-MuiOutlinedInput-root":{padding:0},"& input":{paddingTop:"3px !important",paddingBottom:"4px !important",fontSize:"14px"}},chipContainer:{margin:"5px 0 5px 5px",height:"20px",maxWidth:"200px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},label:{fontWeight:700,fontSize:14,color:"#2A323C",marginBottom:0,display:"flex",justifyContent:"space-between"}})),JobsEnginesFilter=()=>{const[t,n]=react.exports.useState([]),i=useStyles$7()["classes"],[e,r]=react.exports.useState([]),o=useSelector(selectJobsEngineFilterValues),a=(react.exports.useEffect(()=>{var e=lodash.exports.xorBy(t,o,"id");r(e)},[o]),useDispatch());const s=lodash.exports.debounce(e=>{var t;3<=(null==(t=e.target.value)?void 0:t.length)&&a(actions.processingCenterJobs.fetchJobEnginesStart(e.target.value))},300);return jsxRuntime.exports.jsxs(FormControl$1,Object.assign({className:i.engineLookupContainer},{children:[jsxRuntime.exports.jsx("label",Object.assign({className:i.label},{children:"Engines"})),jsxRuntime.exports.jsx(Autocomplete,{"data-testid":"processing-center.jobs.engine-filter",className:i.autoComplete,multiple:!0,freeSolo:!0,openOnFocus:!0,disableClearable:!0,filterSelectedOptions:!0,id:"processing-center.jobs.engine-filter",options:e,getOptionLabel:e=>"string"==typeof e?"":null==e?void 0:e.name,value:t,onChange:(e,t)=>{n(t),a(actions.processingCenterJobs.fetchJobEnginesSuccess({records:[]})),a(actions.processingCenterJobs.setFilterValue({filter:"engines",value:t.map(e=>e.id)}))},renderOption:(e,t)=>react.exports.createElement("li",Object.assign({},e,{key:t.id}),jsxRuntime.exports.jsxs("div",Object.assign({style:{fontSize:"14px"}},{children:[jsxRuntime.exports.jsx("div",{children:t.name}),jsxRuntime.exports.jsx("div",Object.assign({style:{fontSize:"8px"}},{children:t.id}))]}))),renderTags:(e,n)=>e.map((e,t)=>react.exports.createElement(Chip,Object.assign({},n({index:t}),{className:i.chipContainer,variant:"outlined",key:e.id,label:e.name,deleteIcon:jsxRuntime.exports.jsx(Close,{fontSize:"small"})}))),renderInput:e=>jsxRuntime.exports.jsx(TextField$1,Object.assign({},e,{id:"jobs-engine-desc","data-testid":"jobs-engine-desc",inputProps:Object.assign(Object.assign({},e.inputProps),{classes:i,onKeyDown:e=>{"Enter"===e.key&&e.stopPropagation()}}),className:i.engineName,onChange:s}))})]}))},JobsTableFilters=()=>{const e=useDispatch();var t=useStyles$8()["classes"];return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:t.container},{children:[jsxRuntime.exports.jsx(UserFilter,{}),jsxRuntime.exports.jsx(DateRangeFilter,{}),jsxRuntime.exports.jsx(StatusFilter,{}),jsxRuntime.exports.jsx(JobsEnginesFilter,{})]})),jsxRuntime.exports.jsxs("div",Object.assign({className:t.actions},{children:[jsxRuntime.exports.jsx(Button,Object.assign({variant:"outlined",onClick:()=>{e(actions$1.fetchOrgJobsStart(!1))},className:t.button},{children:"Apply Filter"})),jsxRuntime.exports.jsx(Button,Object.assign({variant:"text",onClick:()=>{e(actions$1.clearAllFilters())},className:t.button},{children:"Clear All"}))]}))]})},useStyles$6=makeStyles()(e=>({root:{height:"100%"},loader:{display:"flex",marginTop:e.spacing(1),justifyContent:"center"}})),JobsTable=({setJobsAreSelected:e,isPanelFullScreen:i})=>{const{jobs:r=[],hasMore:t}=useSelector(selectOrgJobs),[o,a]=react.exports.useState([]),s=useSelector(selectStatus),l=useSelector(selectJobsTableCols);var n=useSelector(selectJobsTableFiltersVisibility);const c=useDispatch(),u=useStyles$6()["classes"],d=(react.exports.useEffect(()=>{c(actions$1.fetchOrgJobsStart(!0))},[c]),e=>!t||e<r.length),h=t?r.length+1:r.length,p=(react.exports.useEffect(()=>{e(!!o.length)},[o,e]),({index:t,style:e})=>{var n=!!o.find(e=>e===(r[t]||{}).id);return d(t)?jsxRuntime.exports.jsx("div",Object.assign({style:Object.assign({},e)},{children:jsxRuntime.exports.jsx(JobsTableRow,{job:r[t],onSelectCheckbox:(e,t)=>{e?a(e=>[...e,t]):a(e=>[...e,t])},disableMenu:!!o.length,isSelected:n,cols:l,isPanelFullScreen:i})}),t):jsxRuntime.exports.jsx("div",Object.assign({"data-test":"jobs-table-row-loader",style:Object.assign(Object.assign({},e),{top:0}),className:u.loader},{children:jsxRuntime.exports.jsx(CircularProgress,{size:36})}))});return jsxRuntime.exports.jsxs("div",Object.assign({className:u.root},{children:[n&&jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(JobsTableFilters,{}),jsxRuntime.exports.jsx(Divider$1,{})]}),jsxRuntime.exports.jsxs(Grid,Object.assign({direction:"row",justifyContent:"space-between",alignItems:"center",item:!0,container:!0,xs:12,"data-testid":"processing-center-jobs-table-header",sx:{pl:"13px",pr:"13px",height:"50px"}},{children:[jsxRuntime.exports.jsxs(Grid,Object.assign({xs:3,item:!0},{children:[jsxRuntime.exports.jsx(Checkbox,{size:"small",sx:{color:"#555F7C"},indeterminate:!!o.length,onChange:()=>{o.length?a([]):a(r.map(e=>e.id))},checked:!1}),jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"caption"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"pc-jobs-table.header.job-id-col",defaultMessage:"Job ID",description:"Job ID column header"})}))]})),l.find(e=>"source"===e)&&jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0},{children:jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"caption"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"pc-jobs-table.header.source-col",defaultMessage:"Source",description:"Source column header"})}))})),l.find(e=>"tdo"===e)&&jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0},{children:jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"caption"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"pc-jobs-table.header.tdo-col",defaultMessage:"TDO",description:"TDO column header"})}))})),l.find(e=>"status"===e)&&jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0},{children:jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"caption"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"pc-jobs-table.header.status-col",defaultMessage:"Status",description:"Status column header"})}))})),l.find(e=>"user"===e)&&jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0},{children:jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"caption"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"pc-jobs-table.header.user-col",defaultMessage:"User",description:"User column header"})}))})),jsxRuntime.exports.jsx(Grid,{xs:1,item:!0})]})),jsxRuntime.exports.jsx(Divider$1,{}),"failure"===s?jsxRuntime.exports.jsx(ErrorState,{onRetry:()=>c(actions$1.fetchOrgJobsStart(!0)),errorMessage:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-processing-center.jobs.error-message",defaultMessage:"Something went wrong while loading jobs list.",description:"Processing Center Jobs table loading error"})}):jsxRuntime.exports.jsx(AutoSizer,{children:({height:n,width:i})=>jsxRuntime.exports.jsx(InfiniteLoader,Object.assign({isItemLoaded:d,itemCount:h,loadMoreItems:()=>{"success"===s&&c(actions$1.fetchOrgJobsStart(!0))}},{children:({onItemsRendered:e,ref:t})=>jsxRuntime.exports.jsx("div",Object.assign({"data-testid":"list-wrapper"},{children:jsxRuntime.exports.jsx(VariableSizeList,Object.assign({height:n-40,itemCount:h,itemSize:()=>50,initialScrollOffset:0,onItemsRendered:e,ref:t,width:i},{children:p}))}))}))})]}))},useStyles$5=makeStyles()(e=>({tabsContainer:{"& .Sdk-Mui-selected":{color:"black"},"& .Sdk-MuiTabs-indicator":{backgroundColor:"#000"}},tabsParent:{padding:e.spacing(0,3,0,3),"& div":{borderBottom:"none"},"& div button":{fontFamily:"Nunito",fontWeight:400,flex:"0 1 auto !important",minWidth:"unset"}},tabPanels:{width:"100%",height:"calc(100vh - 55px - 64px - 69px - 22px)"}})),tabs=[{label:jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-center.jobs.single-tab",defaultMessage:"Single Jobs",description:"Single Jobs tab title"}),disabled:!1,id:"processing-center.jobs.single-tab-btn"},{label:jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-center.jobs.batch-tab",defaultMessage:"Batch Jobs",description:"Batch Jobs tab title"}),disabled:!1,id:"processing-center.jobs.batch-tab-btn"}],JobTabs=({setJobsAreSelected:e,isPanelFullScreen:t})=>{const[n,i]=react.exports.useState(0);var r=useStyles$5()["classes"];return jsxRuntime.exports.jsxs("div",Object.assign({className:r.tabsContainer},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:r.tabsParent},{children:jsxRuntime.exports.jsx(CustomTabs,{selectedId:n,onChangeTab:e=>{i(e)},tabsList:tabs})})),jsxRuntime.exports.jsx(Divider$1,{}),jsxRuntime.exports.jsxs(Box,Object.assign({className:r.tabPanels},{children:[jsxRuntime.exports.jsx(TabPanel,Object.assign({value:n,index:0},{children:jsxRuntime.exports.jsx(JobsTable,{setJobsAreSelected:e,isPanelFullScreen:t})})),jsxRuntime.exports.jsx(TabPanel,Object.assign({value:n,index:1},{children:jsxRuntime.exports.jsx(JobsEmptyState,{type:"batch"})}))]}))]}))};function __awaiter(e,a,s,l){return new(s=s||Promise)(function(n,t){function i(e){try{o(l.next(e))}catch(e){t(e)}}function r(e){try{o(l.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(i,r)}o((l=l.apply(e,a||[])).next())})}function fetchOrgJobs(a,s,l,c){return __awaiter(this,void 0,void 0,function*(){var e="fetchOrgJobs";const{status:t,dateTimeFilter:n,engines:i}=c;let r=`(offset: ${s} limit: `+l;if(t&&t.length&&(r+=` status: [${t}]`),n&&(n.fromDateTime||n.toDateTime)){let t="{ ";Object.keys(n).forEach(e=>{t+="field"===e?`${e}: ${n[e]} `:`${e}: "${n[e]}" `}),t+="}",r+=" dateTimeFilter: "+t}else r+=' dateTimeFilter: {fromDateTime: "2022-11-22T20:43:39.083Z" field: createdDateTime}';i&&i.length&&(r+=` engineIds: [${i.map(e=>`"${e}"`)}]`);var o=`
32
+ query ${e} {
33
+ jobs ${r+=")"} {
34
+ records {
35
+ id
36
+ template {
37
+ jobConfig
38
+ }
39
+ targetId
40
+ status
41
+ createdBy
42
+ }
43
+ }
44
+ }
45
+ `;return(yield baseGraphQLApiWithError(Object.assign({query:o,operationName:e},a))).jobs})}function fetchJobDetails(t,n){return __awaiter(this,void 0,void 0,function*(){var e="fetchJobDetails";return(yield baseGraphQLApiWithError(Object.assign({query:`
46
+ query ${e} {
47
+ job (id: "${n}") {
48
+ id
49
+ applicationId
50
+ createdDateTime
51
+ modifiedDateTime
52
+ createdBy
53
+ targetId
54
+ status
55
+ tasks {
56
+ records {
57
+ id
58
+ status
59
+ engine {
60
+ name
61
+ category {
62
+ name
63
+ }
64
+ }
65
+ queuedDateTime
66
+ failureMessage
67
+ createdDateTime
68
+ failureReason
69
+ taskOutput
70
+ }
71
+ }
72
+ scheduledJob {
73
+ organizationId
74
+ organization {
75
+ name
76
+ }
77
+ startDateTime
78
+ stopDateTime
79
+ }
80
+ }
81
+ }
82
+ `,operationName:e},t))).job})}function fetchJobEngines(t,n){return __awaiter(this,void 0,void 0,function*(){var e="fetchJobEngines";return(yield baseGraphQLApiWithError(Object.assign({query:`
83
+ query ${e} {
84
+ engines (limit: 100, offset: 0, filter: {name: "${n}"}) {
85
+ records {
86
+ id
87
+ name
88
+ }
89
+ }
90
+ }`,operationName:e},t))).engines})}function*fetchJobsSaga(e){try{var t,n=yield select(selectApiConfigs),{offset:i,hasMore:r}=yield select(selectOrgJobs),o=yield select(selectJobsTableFilters);r&&(t=(yield fetchOrgJobs(n,i,PAGE_LIMIT,o))["records"],yield put(actions$1.fetchOrgJobsSuccess({records:t,hasMore:PAGE_LIMIT===t.length,nextOffset:i+PAGE_LIMIT,appendItems:e.payload})))}catch(e){console.log(e),yield put(actions$1.fetchOrgJobsFailure())}}function*fetchJobDetailsSaga(e){try{var t,n=yield select(selectApiConfigs),i=yield select(selectJobById(e.payload));i&&!i.scheduledJob&&(t=yield fetchJobDetails(n,e.payload),yield put(actions$1.fetchJobDetailsSuccess(t)))}catch(e){console.log(e),yield put(actions$1.fetchOrgJobsFailure())}}function*clearFiltersSaga(e){yield put(actions$1.fetchOrgJobsStart(!1))}function*fetchJobEngineFilterValuesSaga(e){try{var t=yield fetchJobEngines(yield select(selectApiConfigs),e.payload);yield put(actions$1.fetchJobEnginesSuccess(t))}catch(e){console.log(e),yield put(actions$1.fetchJobEnginesFailure())}}function*fetchJobsWatcher(){yield takeEvery$1(actions$1.fetchOrgJobsStart,fetchJobsSaga)}function*fetchJobDetailsWatcher(){yield takeEvery$1(actions$1.fetchJobDetailsStart,fetchJobDetailsSaga)}function*clearFiltersWatcher(){yield takeEvery$1(actions$1.clearAllFilters,clearFiltersSaga)}function*fetchJobEngineFilterValuesWatcher(){yield takeEvery$1(actions$1.fetchJobEnginesStart,fetchJobEngineFilterValuesSaga)}function*rootSaga(){yield all([fetchJobsWatcher(),fetchJobDetailsWatcher(),clearFiltersWatcher(),fetchJobEngineFilterValuesWatcher()])}function getProcessingCenterJobsModule(){return{id:SLICE_NAME,reducerMap:{[SLICE_NAME]:rootReducer},sagas:[rootSaga],initialActions:[]}}const useStyles$4=makeStyles()(e=>({panelRoot:{padding:"0 20px 20px 30px",display:"flex",flexDirection:"column",justifyContent:"space-between",height:"100%"},buttonsContainer:{display:"flex",justifyContent:"end","& button":{marginLeft:"15px"}},col:{width:"284px",height:"45px",borderRadius:"4px",marginBottom:"14px",display:"flex",flexDirection:"column",justifyContent:"center",paddingLeft:"15px"},activeCol:{background:"#F2F5F9"},hiddenCol:{background:"#FAFAFA"},divider:{marginBottom:"14px"},iconWrapper:{height:"45px",display:"flex",flexDirection:"column",justifyContent:"center"},rowWrapper:{display:"flex",justifyContent:"space-between",cursor:"pointer"}})),JobsTableSettingsPanelComponent=({intl:e})=>{e=formattedMessages(e).jobsTableSettingsPanelHeaderDescription;const n=useStyles$4()["classes"];var t=useSelector(selectJobsTableCols)||[];const[i,r]=react.exports.useState(t),o=useDispatch(),a=t=>{i.find(e=>e===t)?r(e=>e.filter(e=>e!==t)):r(e=>[...e,t])};var t=t=>jsxRuntime.exports.jsx(Box,Object.assign({className:n.iconWrapper},{children:i.find(e=>e===t)?jsxRuntime.exports.jsx(View,{}):jsxRuntime.exports.jsx(Hidden,{style:{transform:"translate(1px, 3px"}})})),s=t=>classNames(i.find(e=>e===t)?n.activeCol:n.hiddenCol,n.col);return jsxRuntime.exports.jsxs("div",Object.assign({className:n.panelRoot},{children:[jsxRuntime.exports.jsxs(Box,{children:[jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"body2",sx:{marginBottom:"24px"}},{children:e})),jsxRuntime.exports.jsx(Box,{children:jsxRuntime.exports.jsx(Box,Object.assign({className:classNames(n.activeCol,n.col)},{children:jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"body2"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-center.jobs-data-settings.job-id-btn",defaultMessage:"Job ID",description:"Job ID button"})}))}))}),jsxRuntime.exports.jsx(Divider$1,{className:n.divider}),jsxRuntime.exports.jsxs(Box,Object.assign({onClick:()=>a("source"),className:n.rowWrapper},{children:[jsxRuntime.exports.jsx(Box,Object.assign({className:s("source")},{children:jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"body2"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-center.jobs-data-settings.source-btn",defaultMessage:"Source",description:"Source button"})}))})),t("source")]})),jsxRuntime.exports.jsxs(Box,Object.assign({onClick:()=>a("tdo"),className:n.rowWrapper},{children:[jsxRuntime.exports.jsx(Box,Object.assign({className:s("tdo")},{children:jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"body2"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-center.jobs-data-settings.tdo-btn",defaultMessage:"TDO ID",description:"TDO ID button"})}))})),t("tdo")]})),jsxRuntime.exports.jsxs(Box,Object.assign({onClick:()=>a("status"),className:n.rowWrapper},{children:[jsxRuntime.exports.jsx(Box,Object.assign({className:s("status")},{children:jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"body2"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-center.jobs-data-settings.status-btn",defaultMessage:"Status",description:"Status button"})}))})),t("status")]})),jsxRuntime.exports.jsxs(Box,Object.assign({onClick:()=>a("user"),className:n.rowWrapper},{children:[jsxRuntime.exports.jsx(Box,Object.assign({className:s("user")},{children:jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"body2"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-center.jobs-data-settings.user-btn",defaultMessage:"User",description:"User button"})}))})),t("user")]}))]}),jsxRuntime.exports.jsxs(Box,Object.assign({className:n.buttonsContainer},{children:[jsxRuntime.exports.jsx(Button,Object.assign({variant:"text",sx:{color:"black"},onClick:()=>o(hidePanel(jobsTableSettingsPanel))},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-center.jobs-data-settings.cancel-btn",defaultMessage:"Cancel",description:"Cancel button"})})),jsxRuntime.exports.jsx(Button,Object.assign({variant:"contained",onClick:()=>o(actions$1.changeTableColumns(i))&&o(hidePanel(jobsTableSettingsPanel))},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-center.jobs-data-settings.save-btn",defaultMessage:"Save",description:"Save button"})}))]}))]}))},JobsTableSettingsPanel=injectIntl(JobsTableSettingsPanelComponent),useStyles$3=makeStyles()(e=>({jobDetailsContainer:{display:"flex",flexDirection:"column",height:"calc(100vh - 55px - 5px)",alignItems:"stretch"},tabsContainer:{"& .Sdk-Mui-selected":{color:"black"},"& .Sdk-MuiTabs-indicator":{backgroundColor:"#000"}},tabsParent:{padding:e.spacing(0,3,0,3),"& div":{borderBottom:"none"},"& div button":{fontFamily:"Nunito",fontWeight:400,flex:"0 1 auto !important",minWidth:"unset"}},divider:{opacity:.9},secondBox:{display:"flex",flexDirection:"column",flexGrow:1}})),overviewTabStyles=makeStyles()(e=>({widget:{padding:e.spacing(6)},divider:{opacity:.9},infoContainer:{padding:e.spacing(6)}})),tasksAndErrorStyles=makeStyles()(e=>({tasksContainer:{padding:e.spacing(5),height:"100%"},rowText:{color:"#2A323C",fontWeight:400},tableHeader:{fontWeight:400},rowContainer:{"&:hover":{borderRadius:4,backgroundColor:"#EEF3F9"}}})),useStyles$2=makeStyles()(e=>({headerActionContainer:{alignItems:"center",display:"flex",flexGrow:1,height:"100%",justifyContent:"flex-end"},header:{alignItems:"center",display:"flex",justifyContent:"space-between",height:"55px",padding:e.spacing(6,3,6,6)},title:{color:"#5C6269"}})),iconTypes={close:jsxRuntime.exports.jsx(Close,{}),hide:jsxRuntime.exports.jsx(Hide,{})},Header=({panelId:e,jobsDetailsPanelHeaderTitle:t,jobsDetailsPanelClose:n,iconType:i="hide",handleClose:r,className:o})=>{var a=useStyles$2()["classes"];return jsxRuntime.exports.jsxs("header",Object.assign({className:o||a.header},{children:[jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"h1","data-testid":"processing-center-jobs-details-panel-header-title",className:a.title},{children:t})),jsxRuntime.exports.jsx("div",Object.assign({className:a.headerActionContainer},{children:jsxRuntime.exports.jsx(Tooltip$1,Object.assign({title:n},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:()=>r(e),"aria-labelledby":"processing-center-jobs-details-panel-close-button",size:"large"},{children:iconTypes[i]}))}))}))]}))};var isObject=isObject$6,classof$1=classofRaw$1,wellKnownSymbol$2=wellKnownSymbol$d,MATCH$1=wellKnownSymbol$d("match"),isRegexp=function(e){var t;return isObject(e)&&(void 0!==(t=e[MATCH$1])?!!t:"RegExp"==classof$1(e))},isRegExp$1=isRegexp,$TypeError$1=TypeError,notARegexp=function(e){if(isRegExp$1(e))throw $TypeError$1("The method doesn't accept regular expressions");return e},wellKnownSymbol$1=wellKnownSymbol$d,MATCH=wellKnownSymbol$d("match"),correctIsRegexpLogic=function(t){var n=/./;try{"/./"[t](n)}catch(e){try{return n[MATCH]=!1,"/./"[t](n)}catch(e){}}return!1},$$1=_export,uncurryThis$3=functionUncurryThis,notARegExp=notARegexp,requireObjectCoercible$2=requireObjectCoercible$7,toString$2=toString$6,correctIsRegExpLogic=correctIsRegexpLogic,stringIndexOf=functionUncurryThis("".indexOf),uncurryThis$2=($$1({target:"String",proto:!0,forced:!correctIsRegExpLogic("includes")},{includes:function(e){return!!~stringIndexOf(toString$2(requireObjectCoercible$2(this)),toString$2(notARegExp(e)),1<arguments.length?arguments[1]:void 0)}}),functionUncurryThis),fails$2=fails$j,isCallable=isCallable$i,classof=classof$4,getBuiltIn=getBuiltIn$5,inspectSource=inspectSource$3,noop=function(){},empty=[],construct=getBuiltIn$5("Reflect","construct"),constructorRegExp=/^\s*(?:class|function)\b/,exec$1=uncurryThis$2(constructorRegExp.exec),INCORRECT_TO_STRING=!constructorRegExp.exec(noop),isConstructorModern=function(e){if(!isCallable(e))return!1;try{return construct(noop,empty,e),!0}catch(e){return!1}},isConstructorLegacy=function(e){if(!isCallable(e))return!1;switch(classof(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return INCORRECT_TO_STRING||!!exec$1(constructorRegExp,inspectSource(e))}catch(e){return!0}},isConstructor$1=(isConstructorLegacy.sham=!0,!construct||fails$2(function(){var e;return isConstructorModern(isConstructorModern.call)||!isConstructorModern(Object)||!isConstructorModern(function(){e=!0})||e})?isConstructorLegacy:isConstructorModern),isConstructor=isConstructor$1,tryToString=tryToString$2,$TypeError=TypeError,aConstructor$1=function(e){if(isConstructor(e))return e;throw $TypeError(tryToString(e)+" is not a constructor")},anObject$1=anObject$a,aConstructor=aConstructor$1,wellKnownSymbol=wellKnownSymbol$d,SPECIES=wellKnownSymbol$d("species"),speciesConstructor$1=function(e,t){var e=anObject$1(e).constructor;return void 0===e||null==(e=anObject$1(e)[SPECIES])?t:aConstructor(e)},toPropertyKey=toPropertyKey$3,definePropertyModule=objectDefineProperty,createPropertyDescriptor=createPropertyDescriptor$4,createProperty$1=function(e,t,n){t=toPropertyKey(t);t in e?definePropertyModule.f(e,t,createPropertyDescriptor(0,n)):e[t]=n},toAbsoluteIndex=toAbsoluteIndex$2,lengthOfArrayLike=lengthOfArrayLike$2,createProperty=createProperty$1,$Array=Array,max=Math.max,arraySliceSimple=function(e,t,n){for(var i=lengthOfArrayLike(e),r=toAbsoluteIndex(t,i),o=toAbsoluteIndex(void 0===n?i:n,i),a=$Array(max(o-r,0)),s=0;r<o;r++,s++)createProperty(a,s,e[r]);return a.length=s,a},apply=functionApply,call=functionCall,uncurryThis$1=functionUncurryThis,fixRegExpWellKnownSymbolLogic=fixRegexpWellKnownSymbolLogic,isRegExp=isRegexp,anObject=anObject$a,requireObjectCoercible$1=requireObjectCoercible$7,speciesConstructor=speciesConstructor$1,advanceStringIndex=advanceStringIndex$2,toLength=toLength$3,toString$1=toString$6,getMethod=getMethod$3,arraySlice=arraySliceSimple,callRegExpExec=regexpExecAbstract,regexpExec=regexpExec$3,stickyHelpers=regexpStickyHelpers,fails$1=fails$j,UNSUPPORTED_Y=regexpStickyHelpers.UNSUPPORTED_Y,MAX_UINT32=4294967295,min=Math.min,$push=[].push,exec=uncurryThis$1(/./.exec),push=uncurryThis$1($push),stringSlice=uncurryThis$1("".slice),SPLIT_WORKS_WITH_OVERWRITTEN_EXEC=!fails$1(function(){var e=/(?:)/,t=e.exec,e=(e.exec=function(){return t.apply(this,arguments)},"ab".split(e));return 2!==e.length||"a"!==e[0]||"b"!==e[1]}),whitespaces$2=(fixRegExpWellKnownSymbolLogic("split",function(r,f,g){var y="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||1<".".split(/()()/).length||"".split(/.?/).length?function(e,t){var n=toString$1(requireObjectCoercible$1(this)),i=void 0===t?MAX_UINT32:t>>>0;if(0===i)return[];if(void 0===e)return[n];if(!isRegExp(e))return call(f,n,e,i);for(var r,o,a,s=[],t=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),l=0,c=new RegExp(e.source,t+"g");(r=call(regexpExec,c,n))&&!(l<(o=c.lastIndex)&&(push(s,stringSlice(n,l,r.index)),1<r.length&&r.index<n.length&&apply($push,s,arraySlice(r,1)),a=r[0].length,l=o,i<=s.length));)c.lastIndex===r.index&&c.lastIndex++;return l===n.length?!a&&exec(c,"")||push(s,""):push(s,stringSlice(n,l)),i<s.length?arraySlice(s,0,i):s}:"0".split(void 0,0).length?function(e,t){return void 0===e&&0===t?[]:call(f,this,e,t)}:f;return[function(e,t){var n=requireObjectCoercible$1(this),i=null==e?void 0:getMethod(e,r);return i?call(i,e,n,t):call(y,toString$1(n),e,t)},function(e,t){var n=anObject(this),i=toString$1(e),e=g(y,n,i,t,y!==f);if(e.done)return e.value;var e=speciesConstructor(n,RegExp),r=n.unicode,o=(n.ignoreCase?"i":"")+(n.multiline?"m":"")+(n.unicode?"u":"")+(UNSUPPORTED_Y?"g":"y"),a=new e(UNSUPPORTED_Y?"^(?:"+n.source+")":n,o),s=void 0===t?MAX_UINT32:t>>>0;if(0===s)return[];if(0===i.length)return null===callRegExpExec(a,i)?[i]:[];for(var l=0,c=0,u=[];c<i.length;){a.lastIndex=UNSUPPORTED_Y?0:c;var d,h=callRegExpExec(a,UNSUPPORTED_Y?stringSlice(i,c):i);if(null===h||(d=min(toLength(a.lastIndex+(UNSUPPORTED_Y?c:0)),i.length))===l)c=advanceStringIndex(i,c,r);else{if(push(u,stringSlice(i,l,c)),u.length===s)return u;for(var p=1;p<=h.length-1;p++)if(push(u,h[p]),u.length===s)return u;c=l=d}}return push(u,stringSlice(i,l)),u}]},!SPLIT_WORKS_WITH_OVERWRITTEN_EXEC,UNSUPPORTED_Y),"\t\n\v\f\r                 \u2028\u2029\ufeff"),uncurryThis=functionUncurryThis,requireObjectCoercible=requireObjectCoercible$7,toString=toString$6,whitespaces$1=whitespaces$2,replace=functionUncurryThis("".replace),whitespace="["+whitespaces$1+"]",ltrim=RegExp("^"+whitespace+whitespace+"*"),rtrim=RegExp(whitespace+whitespace+"*$"),createMethod=function(t){return function(e){e=toString(requireObjectCoercible(e));return 1&t&&(e=replace(e,ltrim,"")),e=2&t?replace(e,rtrim,""):e}},stringTrim={start:createMethod(1),end:createMethod(2),trim:createMethod(3)},PROPER_FUNCTION_NAME=functionName.PROPER,fails=fails$j,whitespaces=whitespaces$2,non="​…᠎",stringTrimForced=function(e){return fails(function(){return!!whitespaces[e]()||non[e]()!==non||PROPER_FUNCTION_NAME&&whitespaces[e].name!==e})},$=_export,$trim=stringTrim.trim,forcedStringTrimMethod=stringTrimForced;$({target:"String",proto:!0,forced:stringTrimForced("trim")},{trim:function(){return $trim(this)}});const formatTime=e=>{const t=e.toLocaleTimeString().split(" ");return t[0]=t[0].split(":"),t[0].pop(),t[0]=t[0].join(":"),t[0]+" "+t[1]},truncatedString=(e,t)=>e.length>t?jsxRuntime.exports.jsx(Tooltip$1,Object.assign({title:e},{children:jsxRuntime.exports.jsxs("span",{children:[e.slice(0,t).trim(),"..."]})})):jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{children:e}),getTimeDifference=e=>{var t=(new Date).getTime();return(new Date(e).getTime()-t)/1e3/60},totalRunTime=(e,t)=>{e=new Date(e).getTime();let n="";t=(new Date(t).getTime()-e)/1e3;return n=86400<=t?(e=Math.floor(t/86400))+" "+(1===e?"day":"days"):3600<=t?(e=Math.floor(t%86400/3600))+" "+(1===e?"hour":"hours"):60<=t?(e=Math.floor(t%3600/60))+" "+(1===e?"minute":"minutes"):"Just now"},useStyles$1=makeStyles()(()=>({boxLegend:{display:"flex",alignItems:"center",justifyContent:"center"},controlTree:{position:"absolute",right:0,top:0,zIndex:1},wrapper:{position:"relative"}}));function NetworkGraph({width:e,height:t,data:r,payloadLegend:n=[],heightLegend:i=40,onClickNode:o,hasError:a=!1}){const s=react.exports.useRef(),[l,c]=react.exports.useState(null);var u=useStyles$1()["classes"];const d={autoResize:!0,layout:{hierarchical:{direction:"LR",sortMethod:"directed",nodeSpacing:300,levelSeparation:450,shakeTowards:"roots"},improvedLayout:!1},interaction:{dragNodes:!1,dragView:!1,zoomView:!0,selectConnectedEdges:!1},edges:{width:5,selectionWidth:2,color:"#D5DFE9",arrows:{to:{enabled:!1}}},nodes:{fixed:{x:!0,y:!0},shape:"dot",borderWidth:0,borderWidthSelected:2},clickToUse:!1,physics:!0,scale:.4};react.exports.useEffect(()=>{let e=null;if(r){var{nodes:t=[],edges:n=[]}=r,t={nodes:new visData.exports.DataSet(t),edges:new visData.exports.DataSet(n)};if(l)l.setData(t);else if(s.current){const i=new visNetwork.exports.Network(s.current,t,d);c(i),e=({nodes:t})=>{var e=r.nodes.find(e=>e.id===t[0]);e&&({payload:e={}}=e,o&&o(e))},i.on("selectNode",e)}}return()=>{e&&l&&l.off("selectNode",e)}},[r]),react.exports.useEffect(()=>{l&&s.current&&l.moveTo({position:{x:0,y:0}})},[l]);var h=n.length||!1,p=h?t-i-10:t;return jsxRuntime.exports.jsx("div",Object.assign({style:{width:e,height:t},className:u.wrapper},{children:a?jsxRuntime.exports.jsxs(Box,Object.assign({sx:{position:"absolute",top:t/2-60,textAlign:"center",width:e}},{children:[jsxRuntime.exports.jsx(default_1,{sx:{fontSize:"100px"},color:"error"}),jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"body1"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"stepper-widget-error",defaultMessage:"An error occurred while displaying the job data",description:"job tasks graph error message"})}))]})):r.nodes&&0<r.nodes.length?jsxRuntime.exports.jsxs("div",Object.assign({style:{width:e,height:p,position:"relative"}},{children:[jsxRuntime.exports.jsx("div",{ref:s,style:{width:e,height:p}}),h&&jsxRuntime.exports.jsx(Box,Object.assign({sx:{mt:2}},{children:jsxRuntime.exports.jsx(Legend,{payload:n,width:e,height:i,wrapperStyle:{bottom:"unset",width:"100%"},formatter:(e,t)=>jsxRuntime.exports.jsx("span",Object.assign({style:{color:(null==t?void 0:t.color)||"white",marginRight:"30px"}},{children:e})),iconType:"square",iconSize:20})}))]})):jsxRuntime.exports.jsx("div",Object.assign({className:u.boxLegend,style:{height:t,width:e}},{children:jsxRuntime.exports.jsx(Empty$1,{image:Empty$1.PRESENTED_IMAGE_SIMPLE})}))}))}const colorStatusConfigs={[ETaskStatus.RUNNING]:"#0D47A1",[ETaskStatus.STARTED]:"#82ca9d",[ETaskStatus.PAUSED]:"#ef7c4d",[ETaskStatus.SCHEDULED]:"#999999",[ETaskStatus.PENDING]:"#4A148C",[ETaskStatus.WAITING]:"#4A148C",[ETaskStatus.ACCEPTED]:"#4A148C",[ETaskStatus.STANDBY_PENDNG]:"#4A148C",[ETaskStatus.QUEUED]:"#4A148C",[ETaskStatus.COMPLETED]:"#1B5E20",[ETaskStatus.COMPLETE]:"#1B5E20",[ETaskStatus.ERROR]:"#ed4661",[ETaskStatus.CANCELLED]:"#ef9000",[ETaskStatus.ABORTED]:"#aa0000",[ETaskStatus.FAILED]:"#ed4661",[ETaskStatus.RESUMING]:"#F8C471"},composeNode=e=>{var{id:e,engine:t,status:n}=e;return{id:e,label:(null==t?void 0:t.name)||"N/A",size:80,color:{background:n?colorStatusConfigs[n]:colorStatusConfigs.pending,border:"none",highlight:{background:n?colorStatusConfigs[n]:colorStatusConfigs.pending,border:"#EF9000"}},font:{color:"#000",size:30},scaling:{label:{enabled:!0}},widthConstraint:{minimum:90,maximum:200}}},taskProcessor=t=>{var n,i,r,o,a;try{const l=[];let e=[];const c=(null==(n=null==t?void 0:t.tasks)?void 0:n.records)||[];if(!c.length)throw new Error;var s;const u=new Set;for(const d of c)d.status&&u.add(d.status);if(s=Array.from(u).map(e=>({id:e,value:e,color:colorStatusConfigs[e],type:"rect"})),c.find(e=>{return e.parentTaskId||(null==(e=e.childTaskIds)?void 0:e.length)})){for(const h of c)if(l.push(composeNode(h)),h.parentTaskId&&e.push({from:h.parentTaskId,to:h.id}),null!=(i=h.childTaskIds)&&i.length)for(const p of h.childTaskIds)e.push({from:h.id,to:p});e=e.filter((t,e,n)=>e===n.findIndex(e=>e.from===t.from&&e.to===t.to))}else{if(!((null==(r=t.jobConfig)?void 0:r.routes)||[]).length&&1<c.length)throw new Error;if(((null==(o=t.jobConfig)?void 0:o.routes)||[]).length&&!c.length)throw new Error;if((((null==(a=t.jobConfig)?void 0:a.routes)||[]).length||1<c.length)&&c.find(e=>!e.ioFolders||!e.ioFolders.length))throw new Error;if(1===c.length)l.push(composeNode(c[0])),e=[];else{for(const y of c)l.push(composeNode(y));const f=t.jobConfig["routes"];const g=[c.find(e=>1===(e.ioFolders||[]).length&&"output"===(e.ioFolders||[])[0].type)];for(;g.length;){const m=g.shift();if(!m)throw new Error;const v=(null===f||void 0===f?void 0:f.filter(e=>e.parentIoFolderReferenceId===((m.ioFolders||[]).find(e=>"output"===e.type)||{}).referenceId).map(e=>e.childIoFolderReferenceId))||[];for(const b of c.filter(e=>{return null==(e=e.ioFolders)?void 0:e.find(e=>"input"===e.type&&-1!==v.indexOf((null==e?void 0:e.referenceId)||""))}))g.push(b),e.push({from:m.id,to:b.id})}}}return{data:{nodes:l,edges:e},payloadLegend:s}}catch(e){return{data:{nodes:[],edges:[]},payloadLegend:[],hasError:!0}}},OverviewTab=({id:e,detailsData:t})=>{var n=overviewTabStyles()["classes"],i=null==t?void 0:t.status,{data:r,payloadLegend:o,hasError:a}=taskProcessor(t);return jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx("div",Object.assign({className:n.widget},{children:jsxRuntime.exports.jsx(NetworkGraph,{width:900,height:300,data:r,payloadLegend:o,heightLegend:60,hasError:!!a})})),jsxRuntime.exports.jsx(Divider$1,{className:n.divider}),jsxRuntime.exports.jsxs("div",Object.assign({className:n.infoContainer},{children:[jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"h3",sx:{marginBottom:"20px"}},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-center-jobs-details-overview-information.title",defaultMessage:"Information",description:"Overview Information title"})})),jsxRuntime.exports.jsxs(Grid,Object.assign({container:!0,spacing:3},{children:[jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:6},{children:[jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"caption"},{children:"Job Id"})),jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"body2"},{children:e&&truncatedString(e,45)||"--"}))]})),jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:6},{children:[jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"caption"},{children:"Job Status"})),jsxRuntime.exports.jsx(JobStatusBadge,{status:i})]})),jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:6},{children:[jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"caption"},{children:"Organization"})),jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"body2"},{children:(null==(o=null==(r=null==t?void 0:t.scheduledJob)?void 0:r.organization)?void 0:o.name)||"--"}))]})),jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:6},{children:[jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"caption"},{children:"TDO ID"})),jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"body2"},{children:(null==t?void 0:t.targetId)||"--"}))]})),jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:6},{children:[jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"caption"},{children:"Created By"})),jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"body2"},{children:(null==t?void 0:t.createdBy)||"--"}))]})),jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:6},{children:[jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"caption"},{children:"Scheduled"})),jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"body2"},{children:null!=(a=null==t?void 0:t.scheduledJob)&&a.startDateTime?jsxRuntime.exports.jsx(FormattedRelativeTime,{value:getTimeDifference(null==(n=null==t?void 0:t.scheduledJob)?void 0:n.startDateTime),updateIntervalInSeconds:60,unit:"minute",numeric:"auto",children:e=>e.includes("seconds")?jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-center-jobs-details-overview-scheduled",defaultMessage:"Just now",description:"process center task scheduled just now"}):react.exports.createElement("span",{},e)}):"--"}))]})),jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:6},{children:[jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"caption"},{children:"Created"})),jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"body2"},{children:null!=t&&t.createdDateTime?jsxRuntime.exports.jsx(FormattedRelativeTime,{value:getTimeDifference(null==t?void 0:t.createdDateTime),updateIntervalInSeconds:60,unit:"minute",numeric:"auto",children:e=>e.includes("seconds")?jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-center-jobs-details-overview.created",defaultMessage:"Just now",description:"process center task created just now"}):react.exports.createElement("span",{},e)}):"--"}))]})),jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:6},{children:[jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"caption"},{children:"Modified"})),jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"body2"},{children:null!=t&&t.modifiedDateTime?jsxRuntime.exports.jsx(FormattedRelativeTime,{value:getTimeDifference(null==t?void 0:t.modifiedDateTime),updateIntervalInSeconds:60,unit:"minute",numeric:"auto",children:e=>e.includes("seconds")?jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-center-jobs-details-overview.modified",defaultMessage:"Just now",description:"process center task modified just now"}):react.exports.createElement("span",{},e)}):"--"}))]})),jsxRuntime.exports.jsxs(Grid,Object.assign({item:!0,xs:6},{children:[jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"caption"},{children:"Total Run Time"})),jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"body2"},{children:null!=(e=null==t?void 0:t.scheduledJob)&&e.startDateTime&&null!=(i=null==t?void 0:t.scheduledJob)&&i.stopDateTime?jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-center-jobs-details-overview.task.total.run.time",defaultMessage:"{totalRunTime}",description:"process center task total run time description",values:{totalRunTime:totalRunTime(t.scheduledJob.startDateTime,t.scheduledJob.stopDateTime)}}):"--"}))]}))]}))]}))]})},TasksTab=({tasks:e})=>{const i=tasksAndErrorStyles()["classes"];return jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{children:0===e.length?jsxRuntime.exports.jsx(Box,Object.assign({display:"flex",alignItems:"center",flexDirection:"column"},{children:jsxRuntime.exports.jsx(NullState,{header:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-processing-center-jobs-details-tasks-tab.null-state-header",defaultMessage:"No Tasks",description:"Processing center no tasks header"}),description:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-processing-center-jobs-details-tasks-tab.null-state-description",defaultMessage:"There are no tasks for this job",description:"Processing center no tasks description"})})})):jsxRuntime.exports.jsxs("div",Object.assign({className:i.tasksContainer},{children:[jsxRuntime.exports.jsxs(Grid,Object.assign({direction:"row",justifyContent:"space-between",alignItems:"center",container:!0,"data-testid":"processing-center-tasks-table-header",sx:{pl:"13px",pr:"13px",height:"30px"}},{children:[jsxRuntime.exports.jsx(Grid,Object.assign({xs:3,item:!0},{children:jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"caption",className:i.tableHeader},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-center-tasks-table.header.task-id-col",defaultMessage:"Task ID",description:"Task ID column header"})}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0},{children:jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"caption",className:i.tableHeader},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-center-tasks-table.header.status-col",defaultMessage:"Status",description:"Status column header"})}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:3,item:!0},{children:jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"caption",className:i.tableHeader},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-center-tasks-table.header.engine-col",defaultMessage:"Engine",description:"Engine column header"})}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0},{children:jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"caption",className:i.tableHeader},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-center-tasks-table.header.capability-col",defaultMessage:"Capability",description:"Capability column header"})}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0},{children:jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"caption",className:i.tableHeader},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-center-tasks-table.header.schedule-col",defaultMessage:"Schedule Time",description:"Schedule Time column header"})}))}))]})),jsxRuntime.exports.jsx(Divider$1,{}),jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{children:null==e?void 0:e.map((e,t)=>{var n;return jsxRuntime.exports.jsxs("div",Object.assign({"data-testid":"processing-center-job-details-table-row-"+e.id,className:i.rowContainer},{children:[jsxRuntime.exports.jsxs(Grid,Object.assign({direction:"row",justifyContent:"space-between",alignItems:"center",container:!0,sx:{pl:"13px",pr:"13px",height:"50px",cursor:"pointer"}},{children:[jsxRuntime.exports.jsx(Grid,Object.assign({xs:3,item:!0},{children:jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"caption",className:i.rowText},{children:e.id||"--"}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0},{children:jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"caption",className:i.rowText},{children:jsxRuntime.exports.jsx(JobStatusBadge,{status:e.status})}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:3,item:!0},{children:jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"caption",className:i.rowText},{children:(null==(n=e.engine)?void 0:n.name)&&truncatedString(e.engine.name,30)||"--"}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0},{children:jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"caption",className:i.rowText},{children:(null==(n=null==(n=e.engine)?void 0:n.category)?void 0:n.name)||"--"}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:2,item:!0},{children:jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"caption",className:i.rowText},{children:e.queuedDateTime&&new Date(e.queuedDateTime).toLocaleDateString()+" "+formatTime(new Date(e.queuedDateTime))||"--"}))}))]})),jsxRuntime.exports.jsx(Divider$1,{})]}),e.id)})})]}))})},ErrorsTab=({errors:e,onOpenErrorDetailPanel:i})=>{const r=tasksAndErrorStyles()["classes"];return jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{children:0===(null==e?void 0:e.length)?jsxRuntime.exports.jsx(Box,Object.assign({display:"flex",alignItems:"center",flexDirection:"column"},{children:jsxRuntime.exports.jsx(NullState,{header:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-processing-center-jobs-details-errors-tab.error-message",defaultMessage:"No failed tasks",description:"Processing Center Errors tab table loading error"}),description:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-processing-center-jobs-details-errors.null-state-description",defaultMessage:"There are no errors for this job",description:"Processing center no failed job description"})})})):jsxRuntime.exports.jsxs("div",Object.assign({className:r.tasksContainer},{children:[jsxRuntime.exports.jsxs(Grid,Object.assign({direction:"row",justifyContent:"space-between",alignItems:"center",container:!0,"data-testid":"processing-center-errors-table-header",sx:{pl:"13px",pr:"13px",height:"30px"}},{children:[jsxRuntime.exports.jsx(Grid,Object.assign({xs:3,item:!0},{children:jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"caption",className:r.tableHeader},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-center-error-table.header.task-id-col",defaultMessage:"Task ID",description:"Task ID column header"})}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:3,item:!0},{children:jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"caption",className:r.tableHeader},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-center-error-table.header.engine-col",defaultMessage:"Engine",description:"Engine column header"})}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:3,item:!0},{children:jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"caption",className:r.tableHeader},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-center-error-table.header.capability-col",defaultMessage:"Capability",description:"Capability column header"})}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:3,item:!0},{children:jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"caption",className:r.tableHeader},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-center-error-table.header.schedule-col",defaultMessage:"Schedule Time",description:"Schedule Time column header"})}))}))]})),jsxRuntime.exports.jsx(Divider$1,{}),jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{children:null==e?void 0:e.map((e,t)=>{var n;return jsxRuntime.exports.jsxs("div",Object.assign({"data-testid":"processing-center-errors-tab-table-row-"+e.id,className:r.rowContainer,onClick:i},{children:[jsxRuntime.exports.jsxs(Grid,Object.assign({direction:"row",justifyContent:"space-between",alignItems:"center",container:!0,sx:{pl:"13px",pr:"13px",height:"50px",cursor:"pointer"}},{children:[jsxRuntime.exports.jsx(Grid,Object.assign({xs:3,item:!0},{children:jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"caption",className:r.rowText},{children:e.id}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:3,item:!0},{children:jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"caption",className:r.rowText},{children:(null==(n=e.engine)?void 0:n.name)&&truncatedString(e.engine.name,30)||"--"}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:3,item:!0},{children:jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"caption",className:r.rowText},{children:(null==(n=null==(n=e.engine)?void 0:n.category)?void 0:n.name)||"--"}))})),jsxRuntime.exports.jsx(Grid,Object.assign({xs:3,item:!0},{children:jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"caption",className:r.rowText},{children:e.queuedDateTime&&new Date(e.queuedDateTime).toLocaleDateString()+" "+formatTime(new Date(e.queuedDateTime))||"--"}))}))]})),jsxRuntime.exports.jsx(Divider$1,{})]}))})})]}))})},PANEL_ID="JOBS_DETAILS_PANEL",JobsDetailsPanel=({id:e,isPanelFullScreen:t})=>{const n=useStyles$3()["classes"],i=useDispatch();var r=useIntl();const[o,a]=react.exports.useState(0),s=useSelector(selectJobById(e)),l=(null==(c=null===s||void 0===s?void 0:s.tasks)?void 0:c.records)||[];var c=null===l||void 0===l?void 0:l.filter(e=>"failed"===e.status),{jobsDetailsPanelHeaderTitle:r,jobsDetailsPanelClose:u,tabTitle_overview:d,tabTitle_tasks:h,tabTitle_errors:p}=formattedMessages(r);react.exports.useEffect(()=>{i(actions$1.fetchJobDetailsStart(e))},[]);const f=[{label:d,disabled:!1,id:"overview",component:OverviewTab({id:e,detailsData:s})},{label:h,disabled:!1,id:"tasks",component:TasksTab({tasks:l})},{label:p,disabled:!1,id:"errors",component:ErrorsTab({errors:c,onOpenErrorDetailPanel:()=>{i(mountPanel({panelId:"PROCESSING_CENTER_ERROR_DETAIL",microFrontend:{name:"PROCESSING_CENTER_ERROR_DETAIL",config:{jobObj:formatJobForDisplay(s)}},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:t?0:55,marginStart:t?0:80,size:"medium",zIndex:t?1012:1002,parentPanelId:PANEL_ID,dimmed:0,dimmedStatus:"dimParent"}}))}})}];return e?jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsxs("div",Object.assign({"data-testid":"processing-center-jobs-details-panel",className:n.jobDetailsContainer},{children:[jsxRuntime.exports.jsx(Header,{panelId:PANEL_ID,iconType:"close",handleClose:()=>{i(hidePanel(PANEL_ID))},jobsDetailsPanelHeaderTitle:r,jobsDetailsPanelClose:u}),jsxRuntime.exports.jsxs("div",Object.assign({className:n.tabsContainer,"data-testid":"processing-center-jobs-details-panel-tabs"},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:n.tabsParent},{children:jsxRuntime.exports.jsx(Tabs,Object.assign({onChange:(e,t)=>{a(t)},value:o},{children:f.map((e,t)=>jsxRuntime.exports.jsx(Tab,Object.assign({label:e.label},(e=>({id:"simple-tab-"+e,"aria-controls":"simple-tabpanel-"+e}))(t),{"data-testid":e.id+"-tab"}),e.id))}))})),jsxRuntime.exports.jsx(Divider$1,{className:n.divider}),jsxRuntime.exports.jsx("div",{children:f.map((e,t)=>jsxRuntime.exports.jsx("div",Object.assign({className:n.secondBox},{children:jsxRuntime.exports.jsx(TabPanel,Object.assign({value:o,index:t},{children:e.component}))}),e.id))})]}))]}))}):null},useStyles=makeStyles()(e=>({root:{display:"flex",flexDirection:"column"},header:{display:"flex",justifyContent:"space-between",padding:e.spacing(2),borderBottom:"0.5px solid "+e.palette.divider,"& button":{height:"40px",width:"40px",marginLeft:"10px"},"& h5":{lineHeight:"40px",marginLeft:"10px"}},tableWrapper:{height:"calc(100vh - 55px - 64px - 69px - 22px)",overflow:"hidden"},buttonsContainer:{marginRight:"10px",display:"flex"},divider:{borderLeft:"1px solid #D5DFE9",marginLeft:"10px"}})),jobsTableSettingsPanel="JOBS_TABLE_SETTINGS_PANEL",JobsPanel=({isPanelFullScreen:n})=>{var e=useStyles()["classes"],t=useIntl();const i=formattedMessages(t)["jobsTableSettingsPanelHeaderTitle"],r=useDispatch(),o=(useSelector(userSelector),useSelector(selectJobsTableFiltersVisibility));var[t,a]=react.exports.useState(!1);return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx("section",Object.assign({className:e.root},{children:jsxRuntime.exports.jsx("header",Object.assign({className:e.header},{children:jsxRuntime.exports.jsxs(Box,Object.assign({sx:{display:"flex",justifyContent:"space-between",verticalAlign:"center","& h5":{lineHeight:"28px"},width:"100%"}},{children:[jsxRuntime.exports.jsx(Typography$2,Object.assign({variant:"h5","data-testid":"org-applications.header"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-processing-center.jobs-panel.table.header",defaultMessage:"Jobs",description:"Jobs Header"})})),jsxRuntime.exports.jsxs("div",Object.assign({className:e.buttonsContainer},{children:[t&&jsxRuntime.exports.jsx(JobsActionButtons,{}),jsxRuntime.exports.jsxs("div",Object.assign({className:e.divider},{children:[jsxRuntime.exports.jsx(Tooltip$1,Object.assign({componentsProps:{tooltip:{sx:{bgcolor:"#465364"}}},title:jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-center.jobs.settings-btn",defaultMessage:"Table Data Settings",description:"tooltip message on the table data settings"})},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:()=>{var e={name:jobsTableSettingsPanel,config:{name:"Job Table Settings"}},t={type:"APP_BAR_PANEL_TEMPLATE",marginTop:n?0:55,marginStart:n?0:80,size:"small",zIndex:n?1011:1001,parentPanelId:"PROCESSING_CENTER_BROWSE",dimmed:0,dimmedStatus:"dimParent",borderBottom:!0,header:{title:i}};r(mountPanel({panelId:jobsTableSettingsPanel,microFrontend:e,panelConfig:t}))},"data-testid":"processing-center.jobs.settings","aria-labelledby":"processing-center.jobs.settings",size:"large"},{children:jsxRuntime.exports.jsx(Settings,{})}))})),jsxRuntime.exports.jsx(Tooltip$1,Object.assign({componentsProps:{tooltip:{sx:{bgcolor:"#465364"}}},title:o?jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-center.jobs.filters-hide-btn",defaultMessage:"Hide Filters",description:"tooltip message on the table filter settings"}):jsxRuntime.exports.jsx(FormattedMessage,{id:"processing-center.jobs.filters-show-btn",defaultMessage:"Show Filters",description:"tooltip message on the table filter settings"})},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:()=>{r(actions.processingCenterJobs.setFiltersVisibility(!o))},"data-testid":"processing-center.jobs.filters","aria-labelledby":"processing-center.jobs.filters",size:"large"},{children:o?jsxRuntime.exports.jsx(FilterRemove,{}):jsxRuntime.exports.jsx(Filter,{})}))}))]}))]}))]}))}))})),jsxRuntime.exports.jsx("div",Object.assign({className:e.tableWrapper},{children:jsxRuntime.exports.jsx(JobTabs,{setJobsAreSelected:a,isPanelFullScreen:n})}))]})};export{JobsDetailsPanel,JobsPanel,JobsTableSettingsPanel,actions,getProcessingCenterJobsModule,initialState,jobsTableSettingsPanel,namespace,rootReducer};