@logicflow/core 1.2.23 → 1.2.24

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.
@@ -1,4 +1,4 @@
1
- !function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r=e();for(var n in r)("object"==typeof exports?exports:t)[n]=r[n]}}(window,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=222)}([function(t,e,r){"use strict";r.d(e,"a",(function(){return m})),r.d(e,"b",(function(){return b})),r.d(e,"c",(function(){return U})),r.d(e,"d",(function(){return F})),r.d(e,"e",(function(){return y})),r.d(e,"f",(function(){return g})),r.d(e,"g",(function(){return y})),r.d(e,"h",(function(){return B})),r.d(e,"i",(function(){return o})),r.d(e,"j",(function(){return z})),r.d(e,"k",(function(){return S}));var n,o,i,u,a,c,s,l={},f=[],p=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function h(t,e){for(var r in e)t[r]=e[r];return t}function d(t){var e=t.parentNode;e&&e.removeChild(t)}function y(t,e,r){var o,i,u,a={};for(u in e)"key"==u?o=e[u]:"ref"==u?i=e[u]:a[u]=e[u];if(arguments.length>2&&(a.children=arguments.length>3?n.call(arguments,2):r),"function"==typeof t&&null!=t.defaultProps)for(u in t.defaultProps)void 0===a[u]&&(a[u]=t.defaultProps[u]);return v(t,a,o,i,null)}function v(t,e,r,n,u){var a={type:t,props:e,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==u?++i:u};return null==u&&null!=o.vnode&&o.vnode(a),a}function g(){return{current:null}}function b(t){return t.children}function m(t,e){this.props=t,this.context=e}function O(t,e){if(null==e)return t.__?O(t.__,t.__.__k.indexOf(t)+1):null;for(var r;e<t.__k.length;e++)if(null!=(r=t.__k[e])&&null!=r.__e)return r.__e;return"function"==typeof t.type?O(t):null}function _(t){var e,r;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(r=t.__k[e])&&null!=r.__e){t.__e=t.__c.base=r.__e;break}return _(t)}}function w(t){(!t.__d&&(t.__d=!0)&&u.push(t)&&!j.__r++||c!==o.debounceRendering)&&((c=o.debounceRendering)||a)(j)}function j(){for(var t;j.__r=u.length;)t=u.sort((function(t,e){return t.__v.__b-e.__v.__b})),u=[],t.some((function(t){var e,r,n,o,i,u;t.__d&&(i=(o=(e=t).__v).__e,(u=e.__P)&&(r=[],(n=h({},o)).__v=o.__v+1,M(u,o,n,e.__n,void 0!==u.ownerSVGElement,null!=o.__h?[i]:null,r,null==i?O(o):i,o.__h),N(r,o),o.__e!=i&&_(o)))}))}function x(t,e,r,n,o,i,u,a,c,s){var p,h,d,y,g,m,_,w=n&&n.__k||f,j=w.length;for(r.__k=[],p=0;p<e.length;p++)if(null!=(y=r.__k[p]=null==(y=e[p])||"boolean"==typeof y?null:"string"==typeof y||"number"==typeof y||"bigint"==typeof y?v(null,y,null,null,y):Array.isArray(y)?v(b,{children:y},null,null,null):y.__b>0?v(y.type,y.props,y.key,null,y.__v):y)){if(y.__=r,y.__b=r.__b+1,null===(d=w[p])||d&&y.key==d.key&&y.type===d.type)w[p]=void 0;else for(h=0;h<j;h++){if((d=w[h])&&y.key==d.key&&y.type===d.type){w[h]=void 0;break}d=null}M(t,y,d=d||l,o,i,u,a,c,s),g=y.__e,(h=y.ref)&&d.ref!=h&&(_||(_=[]),d.ref&&_.push(d.ref,null,y),_.push(h,y.__c||g,y)),null!=g?(null==m&&(m=g),"function"==typeof y.type&&y.__k===d.__k?y.__d=c=E(y,c,t):c=P(t,y,d,w,g,c),"function"==typeof r.type&&(r.__d=c)):c&&d.__e==c&&c.parentNode!=t&&(c=O(d))}for(r.__e=m,p=j;p--;)null!=w[p]&&("function"==typeof r.type&&null!=w[p].__e&&w[p].__e==r.__d&&(r.__d=O(n,p+1)),I(w[p],w[p]));if(_)for(p=0;p<_.length;p++)R(_[p],_[++p],_[++p])}function E(t,e,r){for(var n,o=t.__k,i=0;o&&i<o.length;i++)(n=o[i])&&(n.__=t,e="function"==typeof n.type?E(n,e,r):P(r,n,n,o,n.__e,e));return e}function S(t,e){return e=e||[],null==t||"boolean"==typeof t||(Array.isArray(t)?t.some((function(t){S(t,e)})):e.push(t)),e}function P(t,e,r,n,o,i){var u,a,c;if(void 0!==e.__d)u=e.__d,e.__d=void 0;else if(null==r||o!=i||null==o.parentNode)t:if(null==i||i.parentNode!==t)t.appendChild(o),u=null;else{for(a=i,c=0;(a=a.nextSibling)&&c<n.length;c+=2)if(a==o)break t;t.insertBefore(o,i),u=i}return void 0!==u?u:o.nextSibling}function A(t,e,r){"-"===e[0]?t.setProperty(e,r):t[e]=null==r?"":"number"!=typeof r||p.test(e)?r:r+"px"}function k(t,e,r,n,o){var i;t:if("style"===e)if("string"==typeof r)t.style.cssText=r;else{if("string"==typeof n&&(t.style.cssText=n=""),n)for(e in n)r&&e in r||A(t.style,e,"");if(r)for(e in r)n&&r[e]===n[e]||A(t.style,e,r[e])}else if("o"===e[0]&&"n"===e[1])i=e!==(e=e.replace(/Capture$/,"")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+i]=r,r?n||t.addEventListener(e,i?T:D,i):t.removeEventListener(e,i?T:D,i);else if("dangerouslySetInnerHTML"!==e){if(o)e=e.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==e&&"list"!==e&&"form"!==e&&"tabIndex"!==e&&"download"!==e&&e in t)try{t[e]=null==r?"":r;break t}catch(t){}"function"==typeof r||(null!=r&&(!1!==r||"a"===e[0]&&"r"===e[1])?t.setAttribute(e,r):t.removeAttribute(e))}}function D(t){this.l[t.type+!1](o.event?o.event(t):t)}function T(t){this.l[t.type+!0](o.event?o.event(t):t)}function M(t,e,r,n,i,u,a,c,s){var l,f,p,d,y,v,g,O,_,w,j,E=e.type;if(void 0!==e.constructor)return null;null!=r.__h&&(s=r.__h,c=e.__e=r.__e,e.__h=null,u=[c]),(l=o.__b)&&l(e);try{t:if("function"==typeof E){if(O=e.props,_=(l=E.contextType)&&n[l.__c],w=l?_?_.props.value:l.__:n,r.__c?g=(f=e.__c=r.__c).__=f.__E:("prototype"in E&&E.prototype.render?e.__c=f=new E(O,w):(e.__c=f=new m(O,w),f.constructor=E,f.render=L),_&&_.sub(f),f.props=O,f.state||(f.state={}),f.context=w,f.__n=n,p=f.__d=!0,f.__h=[]),null==f.__s&&(f.__s=f.state),null!=E.getDerivedStateFromProps&&(f.__s==f.state&&(f.__s=h({},f.__s)),h(f.__s,E.getDerivedStateFromProps(O,f.__s))),d=f.props,y=f.state,p)null==E.getDerivedStateFromProps&&null!=f.componentWillMount&&f.componentWillMount(),null!=f.componentDidMount&&f.__h.push(f.componentDidMount);else{if(null==E.getDerivedStateFromProps&&O!==d&&null!=f.componentWillReceiveProps&&f.componentWillReceiveProps(O,w),!f.__e&&null!=f.shouldComponentUpdate&&!1===f.shouldComponentUpdate(O,f.__s,w)||e.__v===r.__v){f.props=O,f.state=f.__s,e.__v!==r.__v&&(f.__d=!1),f.__v=e,e.__e=r.__e,e.__k=r.__k,e.__k.forEach((function(t){t&&(t.__=e)})),f.__h.length&&a.push(f);break t}null!=f.componentWillUpdate&&f.componentWillUpdate(O,f.__s,w),null!=f.componentDidUpdate&&f.__h.push((function(){f.componentDidUpdate(d,y,v)}))}f.context=w,f.props=O,f.state=f.__s,(l=o.__r)&&l(e),f.__d=!1,f.__v=e,f.__P=t,l=f.render(f.props,f.state,f.context),f.state=f.__s,null!=f.getChildContext&&(n=h(h({},n),f.getChildContext())),p||null==f.getSnapshotBeforeUpdate||(v=f.getSnapshotBeforeUpdate(d,y)),j=null!=l&&l.type===b&&null==l.key?l.props.children:l,x(t,Array.isArray(j)?j:[j],e,r,n,i,u,a,c,s),f.base=e.__e,e.__h=null,f.__h.length&&a.push(f),g&&(f.__E=f.__=null),f.__e=!1}else null==u&&e.__v===r.__v?(e.__k=r.__k,e.__e=r.__e):e.__e=C(r.__e,e,r,n,i,u,a,s);(l=o.diffed)&&l(e)}catch(t){e.__v=null,(s||null!=u)&&(e.__e=c,e.__h=!!s,u[u.indexOf(c)]=null),o.__e(t,e,r)}}function N(t,e){o.__c&&o.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){o.__e(t,e.__v)}}))}function C(t,e,r,o,i,u,a,c){var s,f,p,h=r.props,y=e.props,v=e.type,g=0;if("svg"===v&&(i=!0),null!=u)for(;g<u.length;g++)if((s=u[g])&&"setAttribute"in s==!!v&&(v?s.localName===v:3===s.nodeType)){t=s,u[g]=null;break}if(null==t){if(null===v)return document.createTextNode(y);t=i?document.createElementNS("http://www.w3.org/2000/svg",v):document.createElement(v,y.is&&y),u=null,c=!1}if(null===v)h===y||c&&t.data===y||(t.data=y);else{if(u=u&&n.call(t.childNodes),f=(h=r.props||l).dangerouslySetInnerHTML,p=y.dangerouslySetInnerHTML,!c){if(null!=u)for(h={},g=0;g<t.attributes.length;g++)h[t.attributes[g].name]=t.attributes[g].value;(p||f)&&(p&&(f&&p.__html==f.__html||p.__html===t.innerHTML)||(t.innerHTML=p&&p.__html||""))}if(function(t,e,r,n,o){var i;for(i in r)"children"===i||"key"===i||i in e||k(t,i,null,r[i],n);for(i in e)o&&"function"!=typeof e[i]||"children"===i||"key"===i||"value"===i||"checked"===i||r[i]===e[i]||k(t,i,e[i],r[i],n)}(t,y,h,i,c),p)e.__k=[];else if(g=e.props.children,x(t,Array.isArray(g)?g:[g],e,r,o,i&&"foreignObject"!==v,u,a,u?u[0]:r.__k&&O(r,0),c),null!=u)for(g=u.length;g--;)null!=u[g]&&d(u[g]);c||("value"in y&&void 0!==(g=y.value)&&(g!==h.value||g!==t.value||"progress"===v&&!g)&&k(t,"value",g,h.value,!1),"checked"in y&&void 0!==(g=y.checked)&&g!==t.checked&&k(t,"checked",g,h.checked,!1))}return t}function R(t,e,r){try{"function"==typeof t?t(e):t.current=e}catch(t){o.__e(t,r)}}function I(t,e,r){var n,i;if(o.unmount&&o.unmount(t),(n=t.ref)&&(n.current&&n.current!==t.__e||R(n,null,e)),null!=(n=t.__c)){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(t){o.__e(t,e)}n.base=n.__P=null}if(n=t.__k)for(i=0;i<n.length;i++)n[i]&&I(n[i],e,"function"!=typeof t.type);r||null==t.__e||d(t.__e),t.__e=t.__d=void 0}function L(t,e,r){return this.constructor(t,r)}function z(t,e,r){var i,u,a;o.__&&o.__(t,e),u=(i="function"==typeof r)?null:r&&r.__k||e.__k,a=[],M(e,t=(!i&&r||e).__k=y(b,null,[t]),u||l,l,void 0!==e.ownerSVGElement,!i&&r?[r]:u?null:e.firstChild?n.call(e.childNodes):null,a,!i&&r?r:u?u.__e:e.firstChild,i),N(a,t)}function B(t,e){z(t,e,B)}function U(t,e,r){var o,i,u,a=h({},t.props);for(u in e)"key"==u?o=e[u]:"ref"==u?i=e[u]:a[u]=e[u];return arguments.length>2&&(a.children=arguments.length>3?n.call(arguments,2):r),v(t.type,a,o||t.key,i||t.ref,null)}function F(t,e){var r={__c:e="__cC"+s++,__:t,Consumer:function(t,e){return t.children(e)},Provider:function(t){var r,n;return this.getChildContext||(r=[],(n={})[e]=this,this.getChildContext=function(){return n},this.shouldComponentUpdate=function(t){this.props.value!==t.value&&r.some(w)},this.sub=function(t){r.push(t);var e=t.componentWillUnmount;t.componentWillUnmount=function(){r.splice(r.indexOf(t),1),e&&e.call(t)}}),t.children}};return r.Provider.__=r.Consumer.contextType=r}n=f.slice,o={__e:function(t,e){for(var r,n,o;e=e.__;)if((r=e.__c)&&!r.__)try{if((n=r.constructor)&&null!=n.getDerivedStateFromError&&(r.setState(n.getDerivedStateFromError(t)),o=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(t),o=r.__d),o)return r.__E=r}catch(e){t=e}throw t}},i=0,m.prototype.setState=function(t,e){var r;r=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=h({},this.state),"function"==typeof t&&(t=t(h({},r),this.props)),t&&h(r,t),null!=t&&this.__v&&(e&&this.__h.push(e),w(this))},m.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),w(this))},m.prototype.render=b,u=[],a="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,j.__r=0,s=0},function(t,e,r){"use strict";(function(t,n){r.d(e,"a",(function(){return _})),r.d(e,"b",(function(){return or})),r.d(e,"c",(function(){return Gt})),r.d(e,"d",(function(){return jt})),r.d(e,"e",(function(){return dt})),r.d(e,"f",(function(){return ht})),r.d(e,"g",(function(){return wt})),r.d(e,"h",(function(){return gr})),r.d(e,"i",(function(){return ut})),r.d(e,"j",(function(){return _t})),r.d(e,"k",(function(){return te})),r.d(e,"l",(function(){return oe})),r.d(e,"m",(function(){return rt})),r.d(e,"n",(function(){return le})),r.d(e,"o",(function(){return x})),r.d(e,"p",(function(){return Pe})),r.d(e,"q",(function(){return fe})),r.d(e,"r",(function(){return be})),r.d(e,"s",(function(){return vr})),r.d(e,"t",(function(){return de})),r.d(e,"u",(function(){return re})),r.d(e,"v",(function(){return _e})),r.d(e,"w",(function(){return we})),r.d(e,"x",(function(){return xe})),r.d(e,"y",(function(){return er})),r.d(e,"z",(function(){return ir})),r.d(e,"A",(function(){return yr})),r.d(e,"B",(function(){return Ee})),r.d(e,"C",(function(){return Z})),r.d(e,"D",(function(){return ke})),r.d(e,"E",(function(){return ce})),r.d(e,"F",(function(){return ae})),r.d(e,"G",(function(){return ee})),r.d(e,"H",(function(){return Zt})),r.d(e,"I",(function(){return Ne})),r.d(e,"J",(function(){return Re})),r.d(e,"K",(function(){return lt})),r.d(e,"L",(function(){return Se})),r.d(e,"M",(function(){return Ie}));var o=[];Object.freeze(o);var i={};function u(){return++Rt.mobxGuid}function a(t){throw c(!1,t),"X"}function c(t,e){if(!t)throw new Error("[mobx] "+(e||"An invariant failed, however the error is obfuscated because this is a production build."))}Object.freeze(i);function s(t){var e=!1;return function(){if(!e)return e=!0,t.apply(this,arguments)}}var l=function(){};function f(t){return null!==t&&"object"==typeof t}function p(t){if(null===t||"object"!=typeof t)return!1;var e=Object.getPrototypeOf(t);return e===Object.prototype||null===e}function h(t,e,r){Object.defineProperty(t,e,{enumerable:!1,writable:!0,configurable:!0,value:r})}function d(t,e){var r="isMobX"+t;return e.prototype[r]=!0,function(t){return f(t)&&!0===t[r]}}function y(t){return t instanceof Map}function v(t){return t instanceof Set}function g(t){var e=new Set;for(var r in t)e.add(r);return Object.getOwnPropertySymbols(t).forEach((function(r){Object.getOwnPropertyDescriptor(t,r).enumerable&&e.add(r)})),Array.from(e)}function b(t){return t&&t.toString?t.toString():new String(t).toString()}function m(t){return null===t?null:"object"==typeof t?""+t:t}var O="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,_=Symbol("mobx administration"),w=function(){function t(t){void 0===t&&(t="Atom@"+u()),this.name=t,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=new Set,this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=J.NOT_TRACKING}return t.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach((function(t){return t()}))},t.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach((function(t){return t()}))},t.prototype.reportObserved=function(){return Ft(this)},t.prototype.reportChanged=function(){Bt(),function(t){if(t.lowestObserverState===J.STALE)return;t.lowestObserverState=J.STALE,t.observers.forEach((function(e){e.dependenciesState===J.UP_TO_DATE&&(e.isTracing!==Q.NONE&&Ht(e,t),e.onBecomeStale()),e.dependenciesState=J.STALE}))}(this),Ut()},t.prototype.toString=function(){return this.name},t}(),j=d("Atom",w);function x(t,e,r){void 0===e&&(e=l),void 0===r&&(r=l);var n,o=new w(t);return e!==l&&se("onBecomeObserved",o,e,n),r!==l&&ce(o,r),o}var E={identity:function(t,e){return t===e},structural:function(t,e){return mr(t,e)},default:function(t,e){return Object.is(t,e)},shallow:function(t,e){return mr(t,e,1)}},S=function(t,e){return S=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},S(t,e)};
1
+ !function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r=e();for(var n in r)("object"==typeof exports?exports:t)[n]=r[n]}}(window,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=222)}([function(t,e,r){"use strict";r.d(e,"a",(function(){return m})),r.d(e,"b",(function(){return b})),r.d(e,"c",(function(){return U})),r.d(e,"d",(function(){return F})),r.d(e,"e",(function(){return y})),r.d(e,"f",(function(){return g})),r.d(e,"g",(function(){return y})),r.d(e,"h",(function(){return B})),r.d(e,"i",(function(){return o})),r.d(e,"j",(function(){return z})),r.d(e,"k",(function(){return S}));var n,o,i,u,a,c,s,l={},f=[],p=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function d(t,e){for(var r in e)t[r]=e[r];return t}function h(t){var e=t.parentNode;e&&e.removeChild(t)}function y(t,e,r){var o,i,u,a={};for(u in e)"key"==u?o=e[u]:"ref"==u?i=e[u]:a[u]=e[u];if(arguments.length>2&&(a.children=arguments.length>3?n.call(arguments,2):r),"function"==typeof t&&null!=t.defaultProps)for(u in t.defaultProps)void 0===a[u]&&(a[u]=t.defaultProps[u]);return v(t,a,o,i,null)}function v(t,e,r,n,u){var a={type:t,props:e,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==u?++i:u};return null==u&&null!=o.vnode&&o.vnode(a),a}function g(){return{current:null}}function b(t){return t.children}function m(t,e){this.props=t,this.context=e}function O(t,e){if(null==e)return t.__?O(t.__,t.__.__k.indexOf(t)+1):null;for(var r;e<t.__k.length;e++)if(null!=(r=t.__k[e])&&null!=r.__e)return r.__e;return"function"==typeof t.type?O(t):null}function _(t){var e,r;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(r=t.__k[e])&&null!=r.__e){t.__e=t.__c.base=r.__e;break}return _(t)}}function w(t){(!t.__d&&(t.__d=!0)&&u.push(t)&&!j.__r++||c!==o.debounceRendering)&&((c=o.debounceRendering)||a)(j)}function j(){for(var t;j.__r=u.length;)t=u.sort((function(t,e){return t.__v.__b-e.__v.__b})),u=[],t.some((function(t){var e,r,n,o,i,u;t.__d&&(i=(o=(e=t).__v).__e,(u=e.__P)&&(r=[],(n=d({},o)).__v=o.__v+1,M(u,o,n,e.__n,void 0!==u.ownerSVGElement,null!=o.__h?[i]:null,r,null==i?O(o):i,o.__h),N(r,o),o.__e!=i&&_(o)))}))}function x(t,e,r,n,o,i,u,a,c,s){var p,d,h,y,g,m,_,w=n&&n.__k||f,j=w.length;for(r.__k=[],p=0;p<e.length;p++)if(null!=(y=r.__k[p]=null==(y=e[p])||"boolean"==typeof y?null:"string"==typeof y||"number"==typeof y||"bigint"==typeof y?v(null,y,null,null,y):Array.isArray(y)?v(b,{children:y},null,null,null):y.__b>0?v(y.type,y.props,y.key,null,y.__v):y)){if(y.__=r,y.__b=r.__b+1,null===(h=w[p])||h&&y.key==h.key&&y.type===h.type)w[p]=void 0;else for(d=0;d<j;d++){if((h=w[d])&&y.key==h.key&&y.type===h.type){w[d]=void 0;break}h=null}M(t,y,h=h||l,o,i,u,a,c,s),g=y.__e,(d=y.ref)&&h.ref!=d&&(_||(_=[]),h.ref&&_.push(h.ref,null,y),_.push(d,y.__c||g,y)),null!=g?(null==m&&(m=g),"function"==typeof y.type&&y.__k===h.__k?y.__d=c=E(y,c,t):c=P(t,y,h,w,g,c),"function"==typeof r.type&&(r.__d=c)):c&&h.__e==c&&c.parentNode!=t&&(c=O(h))}for(r.__e=m,p=j;p--;)null!=w[p]&&("function"==typeof r.type&&null!=w[p].__e&&w[p].__e==r.__d&&(r.__d=O(n,p+1)),I(w[p],w[p]));if(_)for(p=0;p<_.length;p++)R(_[p],_[++p],_[++p])}function E(t,e,r){for(var n,o=t.__k,i=0;o&&i<o.length;i++)(n=o[i])&&(n.__=t,e="function"==typeof n.type?E(n,e,r):P(r,n,n,o,n.__e,e));return e}function S(t,e){return e=e||[],null==t||"boolean"==typeof t||(Array.isArray(t)?t.some((function(t){S(t,e)})):e.push(t)),e}function P(t,e,r,n,o,i){var u,a,c;if(void 0!==e.__d)u=e.__d,e.__d=void 0;else if(null==r||o!=i||null==o.parentNode)t:if(null==i||i.parentNode!==t)t.appendChild(o),u=null;else{for(a=i,c=0;(a=a.nextSibling)&&c<n.length;c+=2)if(a==o)break t;t.insertBefore(o,i),u=i}return void 0!==u?u:o.nextSibling}function A(t,e,r){"-"===e[0]?t.setProperty(e,r):t[e]=null==r?"":"number"!=typeof r||p.test(e)?r:r+"px"}function k(t,e,r,n,o){var i;t:if("style"===e)if("string"==typeof r)t.style.cssText=r;else{if("string"==typeof n&&(t.style.cssText=n=""),n)for(e in n)r&&e in r||A(t.style,e,"");if(r)for(e in r)n&&r[e]===n[e]||A(t.style,e,r[e])}else if("o"===e[0]&&"n"===e[1])i=e!==(e=e.replace(/Capture$/,"")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+i]=r,r?n||t.addEventListener(e,i?T:D,i):t.removeEventListener(e,i?T:D,i);else if("dangerouslySetInnerHTML"!==e){if(o)e=e.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==e&&"list"!==e&&"form"!==e&&"tabIndex"!==e&&"download"!==e&&e in t)try{t[e]=null==r?"":r;break t}catch(t){}"function"==typeof r||(null!=r&&(!1!==r||"a"===e[0]&&"r"===e[1])?t.setAttribute(e,r):t.removeAttribute(e))}}function D(t){this.l[t.type+!1](o.event?o.event(t):t)}function T(t){this.l[t.type+!0](o.event?o.event(t):t)}function M(t,e,r,n,i,u,a,c,s){var l,f,p,h,y,v,g,O,_,w,j,E=e.type;if(void 0!==e.constructor)return null;null!=r.__h&&(s=r.__h,c=e.__e=r.__e,e.__h=null,u=[c]),(l=o.__b)&&l(e);try{t:if("function"==typeof E){if(O=e.props,_=(l=E.contextType)&&n[l.__c],w=l?_?_.props.value:l.__:n,r.__c?g=(f=e.__c=r.__c).__=f.__E:("prototype"in E&&E.prototype.render?e.__c=f=new E(O,w):(e.__c=f=new m(O,w),f.constructor=E,f.render=L),_&&_.sub(f),f.props=O,f.state||(f.state={}),f.context=w,f.__n=n,p=f.__d=!0,f.__h=[]),null==f.__s&&(f.__s=f.state),null!=E.getDerivedStateFromProps&&(f.__s==f.state&&(f.__s=d({},f.__s)),d(f.__s,E.getDerivedStateFromProps(O,f.__s))),h=f.props,y=f.state,p)null==E.getDerivedStateFromProps&&null!=f.componentWillMount&&f.componentWillMount(),null!=f.componentDidMount&&f.__h.push(f.componentDidMount);else{if(null==E.getDerivedStateFromProps&&O!==h&&null!=f.componentWillReceiveProps&&f.componentWillReceiveProps(O,w),!f.__e&&null!=f.shouldComponentUpdate&&!1===f.shouldComponentUpdate(O,f.__s,w)||e.__v===r.__v){f.props=O,f.state=f.__s,e.__v!==r.__v&&(f.__d=!1),f.__v=e,e.__e=r.__e,e.__k=r.__k,e.__k.forEach((function(t){t&&(t.__=e)})),f.__h.length&&a.push(f);break t}null!=f.componentWillUpdate&&f.componentWillUpdate(O,f.__s,w),null!=f.componentDidUpdate&&f.__h.push((function(){f.componentDidUpdate(h,y,v)}))}f.context=w,f.props=O,f.state=f.__s,(l=o.__r)&&l(e),f.__d=!1,f.__v=e,f.__P=t,l=f.render(f.props,f.state,f.context),f.state=f.__s,null!=f.getChildContext&&(n=d(d({},n),f.getChildContext())),p||null==f.getSnapshotBeforeUpdate||(v=f.getSnapshotBeforeUpdate(h,y)),j=null!=l&&l.type===b&&null==l.key?l.props.children:l,x(t,Array.isArray(j)?j:[j],e,r,n,i,u,a,c,s),f.base=e.__e,e.__h=null,f.__h.length&&a.push(f),g&&(f.__E=f.__=null),f.__e=!1}else null==u&&e.__v===r.__v?(e.__k=r.__k,e.__e=r.__e):e.__e=C(r.__e,e,r,n,i,u,a,s);(l=o.diffed)&&l(e)}catch(t){e.__v=null,(s||null!=u)&&(e.__e=c,e.__h=!!s,u[u.indexOf(c)]=null),o.__e(t,e,r)}}function N(t,e){o.__c&&o.__c(e,t),t.some((function(e){try{t=e.__h,e.__h=[],t.some((function(t){t.call(e)}))}catch(t){o.__e(t,e.__v)}}))}function C(t,e,r,o,i,u,a,c){var s,f,p,d=r.props,y=e.props,v=e.type,g=0;if("svg"===v&&(i=!0),null!=u)for(;g<u.length;g++)if((s=u[g])&&"setAttribute"in s==!!v&&(v?s.localName===v:3===s.nodeType)){t=s,u[g]=null;break}if(null==t){if(null===v)return document.createTextNode(y);t=i?document.createElementNS("http://www.w3.org/2000/svg",v):document.createElement(v,y.is&&y),u=null,c=!1}if(null===v)d===y||c&&t.data===y||(t.data=y);else{if(u=u&&n.call(t.childNodes),f=(d=r.props||l).dangerouslySetInnerHTML,p=y.dangerouslySetInnerHTML,!c){if(null!=u)for(d={},g=0;g<t.attributes.length;g++)d[t.attributes[g].name]=t.attributes[g].value;(p||f)&&(p&&(f&&p.__html==f.__html||p.__html===t.innerHTML)||(t.innerHTML=p&&p.__html||""))}if(function(t,e,r,n,o){var i;for(i in r)"children"===i||"key"===i||i in e||k(t,i,null,r[i],n);for(i in e)o&&"function"!=typeof e[i]||"children"===i||"key"===i||"value"===i||"checked"===i||r[i]===e[i]||k(t,i,e[i],r[i],n)}(t,y,d,i,c),p)e.__k=[];else if(g=e.props.children,x(t,Array.isArray(g)?g:[g],e,r,o,i&&"foreignObject"!==v,u,a,u?u[0]:r.__k&&O(r,0),c),null!=u)for(g=u.length;g--;)null!=u[g]&&h(u[g]);c||("value"in y&&void 0!==(g=y.value)&&(g!==d.value||g!==t.value||"progress"===v&&!g)&&k(t,"value",g,d.value,!1),"checked"in y&&void 0!==(g=y.checked)&&g!==t.checked&&k(t,"checked",g,d.checked,!1))}return t}function R(t,e,r){try{"function"==typeof t?t(e):t.current=e}catch(t){o.__e(t,r)}}function I(t,e,r){var n,i;if(o.unmount&&o.unmount(t),(n=t.ref)&&(n.current&&n.current!==t.__e||R(n,null,e)),null!=(n=t.__c)){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(t){o.__e(t,e)}n.base=n.__P=null}if(n=t.__k)for(i=0;i<n.length;i++)n[i]&&I(n[i],e,"function"!=typeof t.type);r||null==t.__e||h(t.__e),t.__e=t.__d=void 0}function L(t,e,r){return this.constructor(t,r)}function z(t,e,r){var i,u,a;o.__&&o.__(t,e),u=(i="function"==typeof r)?null:r&&r.__k||e.__k,a=[],M(e,t=(!i&&r||e).__k=y(b,null,[t]),u||l,l,void 0!==e.ownerSVGElement,!i&&r?[r]:u?null:e.firstChild?n.call(e.childNodes):null,a,!i&&r?r:u?u.__e:e.firstChild,i),N(a,t)}function B(t,e){z(t,e,B)}function U(t,e,r){var o,i,u,a=d({},t.props);for(u in e)"key"==u?o=e[u]:"ref"==u?i=e[u]:a[u]=e[u];return arguments.length>2&&(a.children=arguments.length>3?n.call(arguments,2):r),v(t.type,a,o||t.key,i||t.ref,null)}function F(t,e){var r={__c:e="__cC"+s++,__:t,Consumer:function(t,e){return t.children(e)},Provider:function(t){var r,n;return this.getChildContext||(r=[],(n={})[e]=this,this.getChildContext=function(){return n},this.shouldComponentUpdate=function(t){this.props.value!==t.value&&r.some(w)},this.sub=function(t){r.push(t);var e=t.componentWillUnmount;t.componentWillUnmount=function(){r.splice(r.indexOf(t),1),e&&e.call(t)}}),t.children}};return r.Provider.__=r.Consumer.contextType=r}n=f.slice,o={__e:function(t,e){for(var r,n,o;e=e.__;)if((r=e.__c)&&!r.__)try{if((n=r.constructor)&&null!=n.getDerivedStateFromError&&(r.setState(n.getDerivedStateFromError(t)),o=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(t),o=r.__d),o)return r.__E=r}catch(e){t=e}throw t}},i=0,m.prototype.setState=function(t,e){var r;r=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=d({},this.state),"function"==typeof t&&(t=t(d({},r),this.props)),t&&d(r,t),null!=t&&this.__v&&(e&&this.__h.push(e),w(this))},m.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),w(this))},m.prototype.render=b,u=[],a="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,j.__r=0,s=0},function(t,e,r){"use strict";(function(t,n){r.d(e,"a",(function(){return _})),r.d(e,"b",(function(){return or})),r.d(e,"c",(function(){return Gt})),r.d(e,"d",(function(){return jt})),r.d(e,"e",(function(){return ht})),r.d(e,"f",(function(){return dt})),r.d(e,"g",(function(){return wt})),r.d(e,"h",(function(){return gr})),r.d(e,"i",(function(){return ut})),r.d(e,"j",(function(){return _t})),r.d(e,"k",(function(){return te})),r.d(e,"l",(function(){return oe})),r.d(e,"m",(function(){return rt})),r.d(e,"n",(function(){return le})),r.d(e,"o",(function(){return x})),r.d(e,"p",(function(){return Pe})),r.d(e,"q",(function(){return fe})),r.d(e,"r",(function(){return be})),r.d(e,"s",(function(){return vr})),r.d(e,"t",(function(){return he})),r.d(e,"u",(function(){return re})),r.d(e,"v",(function(){return _e})),r.d(e,"w",(function(){return we})),r.d(e,"x",(function(){return xe})),r.d(e,"y",(function(){return er})),r.d(e,"z",(function(){return ir})),r.d(e,"A",(function(){return yr})),r.d(e,"B",(function(){return Ee})),r.d(e,"C",(function(){return Z})),r.d(e,"D",(function(){return ke})),r.d(e,"E",(function(){return ce})),r.d(e,"F",(function(){return ae})),r.d(e,"G",(function(){return ee})),r.d(e,"H",(function(){return Zt})),r.d(e,"I",(function(){return Ne})),r.d(e,"J",(function(){return Re})),r.d(e,"K",(function(){return lt})),r.d(e,"L",(function(){return Se})),r.d(e,"M",(function(){return Ie}));var o=[];Object.freeze(o);var i={};function u(){return++Rt.mobxGuid}function a(t){throw c(!1,t),"X"}function c(t,e){if(!t)throw new Error("[mobx] "+(e||"An invariant failed, however the error is obfuscated because this is a production build."))}Object.freeze(i);function s(t){var e=!1;return function(){if(!e)return e=!0,t.apply(this,arguments)}}var l=function(){};function f(t){return null!==t&&"object"==typeof t}function p(t){if(null===t||"object"!=typeof t)return!1;var e=Object.getPrototypeOf(t);return e===Object.prototype||null===e}function d(t,e,r){Object.defineProperty(t,e,{enumerable:!1,writable:!0,configurable:!0,value:r})}function h(t,e){var r="isMobX"+t;return e.prototype[r]=!0,function(t){return f(t)&&!0===t[r]}}function y(t){return t instanceof Map}function v(t){return t instanceof Set}function g(t){var e=new Set;for(var r in t)e.add(r);return Object.getOwnPropertySymbols(t).forEach((function(r){Object.getOwnPropertyDescriptor(t,r).enumerable&&e.add(r)})),Array.from(e)}function b(t){return t&&t.toString?t.toString():new String(t).toString()}function m(t){return null===t?null:"object"==typeof t?""+t:t}var O="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,_=Symbol("mobx administration"),w=function(){function t(t){void 0===t&&(t="Atom@"+u()),this.name=t,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=new Set,this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=J.NOT_TRACKING}return t.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach((function(t){return t()}))},t.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach((function(t){return t()}))},t.prototype.reportObserved=function(){return Ft(this)},t.prototype.reportChanged=function(){Bt(),function(t){if(t.lowestObserverState===J.STALE)return;t.lowestObserverState=J.STALE,t.observers.forEach((function(e){e.dependenciesState===J.UP_TO_DATE&&(e.isTracing!==Q.NONE&&Ht(e,t),e.onBecomeStale()),e.dependenciesState=J.STALE}))}(this),Ut()},t.prototype.toString=function(){return this.name},t}(),j=h("Atom",w);function x(t,e,r){void 0===e&&(e=l),void 0===r&&(r=l);var n,o=new w(t);return e!==l&&se("onBecomeObserved",o,e,n),r!==l&&ce(o,r),o}var E={identity:function(t,e){return t===e},structural:function(t,e){return mr(t,e)},default:function(t,e){return Object.is(t,e)},shallow:function(t,e){return mr(t,e,1)}},S=function(t,e){return S=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},S(t,e)};
2
2
  /*! *****************************************************************************
3
3
  Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use
@@ -12,7 +12,7 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
12
12
 
13
13
  See the Apache Version 2.0 License for specific language governing permissions
14
14
  and limitations under the License.
15
- ***************************************************************************** */var P=function(){return P=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},P.apply(this,arguments)};function A(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}}function k(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u}function D(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(k(arguments[e]));return t}var T=Symbol("mobx did run lazy initializers"),M=Symbol("mobx pending decorators"),N={},C={};function R(t,e){var r=e?N:C;return r[t]||(r[t]={configurable:!0,enumerable:e,get:function(){return I(this),this[t]},set:function(e){I(this),this[t]=e}})}function I(t){var e,r;if(!0!==t[T]){var n=t[M];if(n){h(t,T,!0);var o=D(Object.getOwnPropertySymbols(n),Object.keys(n));try{for(var i=A(o),u=i.next();!u.done;u=i.next()){var a=n[u.value];a.propertyCreator(t,a.prop,a.descriptor,a.decoratorTarget,a.decoratorArguments)}}catch(t){e={error:t}}finally{try{u&&!u.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}}}}function L(t,e){return function(){var r,n=function(n,o,i,u){if(!0===u)return e(n,o,i,n,r),null;if(!Object.prototype.hasOwnProperty.call(n,M)){var a=n[M];h(n,M,P({},a))}return n[M][o]={prop:o,propertyCreator:e,descriptor:i,decoratorTarget:n,decoratorArguments:r},R(o,t)};return z(arguments)?(r=o,n.apply(null,arguments)):(r=Array.prototype.slice.call(arguments),n)}}function z(t){return(2===t.length||3===t.length)&&("string"==typeof t[1]||"symbol"==typeof t[1])||4===t.length&&!0===t[3]}function B(t,e,r){return xe(t)?t:Array.isArray(t)?Z.array(t,{name:r}):p(t)?Z.object(t,void 0,{name:r}):y(t)?Z.map(t,{name:r}):v(t)?Z.set(t,{name:r}):t}function U(t){return t}function F(e){c(e);var r=L(!0,(function(t,r,n,o,i){var u=n?n.initializer?n.initializer.call(t):n.value:void 0;lr(t).addObservableProp(r,u,e)})),n=(void 0!==t&&t.env,r);return n.enhancer=e,n}var H={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function X(t){return null==t?H:"string"==typeof t?{name:t,deep:!0,proxy:!0}:t}Object.freeze(H);var G=F(B),Y=F((function(t,e,r){return null==t||yr(t)||er(t)||ir(t)||cr(t)?t:Array.isArray(t)?Z.array(t,{name:r,deep:!1}):p(t)?Z.object(t,void 0,{name:r,deep:!1}):y(t)?Z.map(t,{name:r,deep:!1}):v(t)?Z.set(t,{name:r,deep:!1}):a(!1)})),V=F(U),W=F((function(t,e,r){return mr(t,e)?e:t}));function K(t){return t.defaultDecorator?t.defaultDecorator.enhancer:!1===t.deep?U:B}var $={box:function(t,e){arguments.length>2&&q("box");var r=X(e);return new St(t,K(r),r.name,!0,r.equals)},array:function(t,e){arguments.length>2&&q("array");var r=X(e);return Ze(t,K(r),r.name)},map:function(t,e){arguments.length>2&&q("map");var r=X(e);return new or(t,K(r),r.name)},set:function(t,e){arguments.length>2&&q("set");var r=X(e);return new ar(t,K(r),r.name)},object:function(t,e,r){"string"==typeof arguments[1]&&q("object");var n=X(r);if(!1===n.proxy)return fe({},t,e,n);var o=pe(n),i=fe({},void 0,void 0,n),u=He(i);return he(u,t,e,o),u},ref:V,shallow:Y,deep:G,struct:W},Z=function(t,e,r){if("string"==typeof arguments[1]||"symbol"==typeof arguments[1])return G.apply(null,arguments);if(xe(t))return t;var n=p(t)?Z.object(t,e,r):Array.isArray(t)?Z.array(t,e):y(t)?Z.map(t,e):v(t)?Z.set(t,e):t;if(n!==t)return n;a(!1)};function q(t){a("Expected one or two arguments to observable."+t+". Did you accidentally try to use observable."+t+" as decorator?")}Object.keys($).forEach((function(t){return Z[t]=$[t]}));var J,Q,tt=L(!1,(function(t,e,r,n,o){var i=r.get,u=r.set,a=o[0]||{};lr(t).addComputedProp(t,e,P({get:i,set:u,context:t},a))})),et=tt({equals:E.structural}),rt=function(t,e,r){if("string"==typeof e)return tt.apply(null,arguments);if(null!==t&&"object"==typeof t&&1===arguments.length)return tt.apply(null,arguments);var n="object"==typeof e?e:{};return n.get=t,n.set="function"==typeof e?e:n.set,n.name=n.name||t.name||"",new At(n)};rt.struct=et,function(t){t[t.NOT_TRACKING=-1]="NOT_TRACKING",t[t.UP_TO_DATE=0]="UP_TO_DATE",t[t.POSSIBLY_STALE=1]="POSSIBLY_STALE",t[t.STALE=2]="STALE"}(J||(J={})),function(t){t[t.NONE=0]="NONE",t[t.LOG=1]="LOG",t[t.BREAK=2]="BREAK"}(Q||(Q={}));var nt=function(t){this.cause=t};function ot(t){return t instanceof nt}function it(t){switch(t.dependenciesState){case J.UP_TO_DATE:return!1;case J.NOT_TRACKING:case J.STALE:return!0;case J.POSSIBLY_STALE:for(var e=ht(!0),r=ft(),n=t.observing,o=n.length,i=0;i<o;i++){var u=n[i];if(kt(u)){if(Rt.disableErrorBoundaries)u.get();else try{u.get()}catch(t){return pt(r),dt(e),!0}if(t.dependenciesState===J.STALE)return pt(r),dt(e),!0}}return yt(t),pt(r),dt(e),!1}}function ut(){return null!==Rt.trackingDerivation}function at(t){var e=t.observers.size>0;Rt.computationDepth>0&&e&&a(!1),Rt.allowStateChanges||!e&&"strict"!==Rt.enforceActions||a(!1)}function ct(t,e,r){var n=ht(!0);yt(t),t.newObserving=new Array(t.observing.length+100),t.unboundDepsCount=0,t.runId=++Rt.runId;var o,i=Rt.trackingDerivation;if(Rt.trackingDerivation=t,!0===Rt.disableErrorBoundaries)o=e.call(r);else try{o=e.call(r)}catch(t){o=new nt(t)}return Rt.trackingDerivation=i,function(t){for(var e=t.observing,r=t.observing=t.newObserving,n=J.UP_TO_DATE,o=0,i=t.unboundDepsCount,u=0;u<i;u++){0===(a=r[u]).diffValue&&(a.diffValue=1,o!==u&&(r[o]=a),o++),a.dependenciesState>n&&(n=a.dependenciesState)}r.length=o,t.newObserving=null,i=e.length;for(;i--;){0===(a=e[i]).diffValue&&Lt(a,t),a.diffValue=0}for(;o--;){var a;1===(a=r[o]).diffValue&&(a.diffValue=0,It(a,t))}n!==J.UP_TO_DATE&&(t.dependenciesState=n,t.onBecomeStale())}(t),dt(n),o}function st(t){var e=t.observing;t.observing=[];for(var r=e.length;r--;)Lt(e[r],t);t.dependenciesState=J.NOT_TRACKING}function lt(t){var e=ft();try{return t()}finally{pt(e)}}function ft(){var t=Rt.trackingDerivation;return Rt.trackingDerivation=null,t}function pt(t){Rt.trackingDerivation=t}function ht(t){var e=Rt.allowStateReads;return Rt.allowStateReads=t,e}function dt(t){Rt.allowStateReads=t}function yt(t){if(t.dependenciesState!==J.UP_TO_DATE){t.dependenciesState=J.UP_TO_DATE;for(var e=t.observing,r=e.length;r--;)e[r].lowestObserverState=J.UP_TO_DATE}}var vt=0,gt=1,bt=Object.getOwnPropertyDescriptor((function(){}),"name");bt&&bt.configurable;function mt(t,e,r){var n=function(){return Ot(t,e,r||this,arguments)};return n.isMobxAction=!0,n}function Ot(t,e,r,n){var o=_t(t,r,n);try{return e.apply(r,n)}catch(t){throw o.error=t,t}finally{wt(o)}}function _t(t,e,r){var n=0,o=ft();Bt();var i={prevDerivation:o,prevAllowStateChanges:xt(!0),prevAllowStateReads:ht(!0),notifySpy:false,startTime:n,actionId:gt++,parentActionId:vt};return vt=i.actionId,i}function wt(t){vt!==t.actionId&&a("invalid action stack. did you forget to finish an action?"),vt=t.parentActionId,void 0!==t.error&&(Rt.suppressReactionErrors=!0),Et(t.prevAllowStateChanges),dt(t.prevAllowStateReads),Ut(),pt(t.prevDerivation),t.notifySpy,Rt.suppressReactionErrors=!1}function jt(t,e){var r,n=xt(t);try{r=e()}finally{Et(n)}return r}function xt(t){var e=Rt.allowStateChanges;return Rt.allowStateChanges=t,e}function Et(t){Rt.allowStateChanges=t}var St=function(t){function e(e,r,n,o,i){void 0===n&&(n="ObservableValue@"+u()),void 0===o&&(o=!0),void 0===i&&(i=E.default);var a=t.call(this,n)||this;return a.enhancer=r,a.name=n,a.equals=i,a.hasUnreportedChange=!1,a.value=r(e,void 0,n),a}return function(t,e){function r(){this.constructor=t}S(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}(e,t),e.prototype.dehanceValue=function(t){return void 0!==this.dehancer?this.dehancer(t):t},e.prototype.set=function(t){this.value;if((t=this.prepareNewValue(t))!==Rt.UNCHANGED){false,this.setNewValue(t)}},e.prototype.prepareNewValue=function(t){if(at(this),Xe(this)){var e=Ye(this,{object:this,type:"update",newValue:t});if(!e)return Rt.UNCHANGED;t=e.newValue}return t=this.enhancer(t,this.value,this.name),this.equals(this.value,t)?Rt.UNCHANGED:t},e.prototype.setNewValue=function(t){var e=this.value;this.value=t,this.reportChanged(),Ve(this)&&Ke(this,{type:"update",object:this,newValue:t,oldValue:e})},e.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},e.prototype.intercept=function(t){return Ge(this,t)},e.prototype.observe=function(t,e){return e&&t({object:this,type:"update",newValue:this.value,oldValue:void 0}),We(this,t)},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.value+"]"},e.prototype.valueOf=function(){return m(this.get())},e.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},e}(w),Pt=d("ObservableValue",St),At=function(){function t(t){this.dependenciesState=J.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isBeingObserved=!1,this.isPendingUnobservation=!1,this.observers=new Set,this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=J.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+u(),this.value=new nt(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=Q.NONE,c(t.get,"missing option for computed: get"),this.derivation=t.get,this.name=t.name||"ComputedValue@"+u(),t.set&&(this.setter=mt(this.name+"-setter",t.set)),this.equals=t.equals||(t.compareStructural||t.struct?E.structural:E.default),this.scope=t.context,this.requiresReaction=!!t.requiresReaction,this.keepAlive=!!t.keepAlive}return t.prototype.onBecomeStale=function(){!function(t){if(t.lowestObserverState!==J.UP_TO_DATE)return;t.lowestObserverState=J.POSSIBLY_STALE,t.observers.forEach((function(e){e.dependenciesState===J.UP_TO_DATE&&(e.dependenciesState=J.POSSIBLY_STALE,e.isTracing!==Q.NONE&&Ht(e,t),e.onBecomeStale())}))}(this)},t.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach((function(t){return t()}))},t.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach((function(t){return t()}))},t.prototype.get=function(){this.isComputing&&a("Cycle detected in computation "+this.name+": "+this.derivation),0!==Rt.inBatch||0!==this.observers.size||this.keepAlive?(Ft(this),it(this)&&this.trackAndCompute()&&function(t){if(t.lowestObserverState===J.STALE)return;t.lowestObserverState=J.STALE,t.observers.forEach((function(e){e.dependenciesState===J.POSSIBLY_STALE?e.dependenciesState=J.STALE:e.dependenciesState===J.UP_TO_DATE&&(t.lowestObserverState=J.UP_TO_DATE)}))}(this)):it(this)&&(this.warnAboutUntrackedRead(),Bt(),this.value=this.computeValue(!1),Ut());var t=this.value;if(ot(t))throw t.cause;return t},t.prototype.peek=function(){var t=this.computeValue(!1);if(ot(t))throw t.cause;return t},t.prototype.set=function(t){if(this.setter){c(!this.isRunningSetter,"The setter of computed value '"+this.name+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"),this.isRunningSetter=!0;try{this.setter.call(this.scope,t)}finally{this.isRunningSetter=!1}}else c(!1,!1)},t.prototype.trackAndCompute=function(){var t=this.value,e=this.dependenciesState===J.NOT_TRACKING,r=this.computeValue(!0),n=e||ot(t)||ot(r)||!this.equals(t,r);return n&&(this.value=r),n},t.prototype.computeValue=function(t){var e;if(this.isComputing=!0,Rt.computationDepth++,t)e=ct(this,this.derivation,this.scope);else if(!0===Rt.disableErrorBoundaries)e=this.derivation.call(this.scope);else try{e=this.derivation.call(this.scope)}catch(t){e=new nt(t)}return Rt.computationDepth--,this.isComputing=!1,e},t.prototype.suspend=function(){this.keepAlive||(st(this),this.value=void 0)},t.prototype.observe=function(t,e){var r=this,n=!0,o=void 0;return oe((function(){var i=r.get();if(!n||e){var u=ft();t({type:"update",object:r,newValue:i,oldValue:o}),pt(u)}n=!1,o=i}))},t.prototype.warnAboutUntrackedRead=function(){},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},t.prototype.valueOf=function(){return m(this.get())},t.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},t}(),kt=d("ComputedValue",At),Dt=function(){this.version=5,this.UNCHANGED={},this.trackingDerivation=null,this.computationDepth=0,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!0,this.allowStateReads=!0,this.enforceActions=!1,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.computedConfigurable=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1},Tt={};function Mt(){return"undefined"!=typeof window?window:void 0!==n?n:"undefined"!=typeof self?self:Tt}var Nt=!0,Ct=!1,Rt=function(){var t=Mt();return t.__mobxInstanceCount>0&&!t.__mobxGlobals&&(Nt=!1),t.__mobxGlobals&&t.__mobxGlobals.version!==(new Dt).version&&(Nt=!1),Nt?t.__mobxGlobals?(t.__mobxInstanceCount+=1,t.__mobxGlobals.UNCHANGED||(t.__mobxGlobals.UNCHANGED={}),t.__mobxGlobals):(t.__mobxInstanceCount=1,t.__mobxGlobals=new Dt):(setTimeout((function(){Ct||a("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")}),1),new Dt)}();function It(t,e){t.observers.add(e),t.lowestObserverState>e.dependenciesState&&(t.lowestObserverState=e.dependenciesState)}function Lt(t,e){t.observers.delete(e),0===t.observers.size&&zt(t)}function zt(t){!1===t.isPendingUnobservation&&(t.isPendingUnobservation=!0,Rt.pendingUnobservations.push(t))}function Bt(){Rt.inBatch++}function Ut(){if(0==--Rt.inBatch){Vt();for(var t=Rt.pendingUnobservations,e=0;e<t.length;e++){var r=t[e];r.isPendingUnobservation=!1,0===r.observers.size&&(r.isBeingObserved&&(r.isBeingObserved=!1,r.onBecomeUnobserved()),r instanceof At&&r.suspend())}Rt.pendingUnobservations=[]}}function Ft(t){var e=Rt.trackingDerivation;return null!==e?(e.runId!==t.lastAccessedBy&&(t.lastAccessedBy=e.runId,e.newObserving[e.unboundDepsCount++]=t,t.isBeingObserved||(t.isBeingObserved=!0,t.onBecomeObserved())),!0):(0===t.observers.size&&Rt.inBatch>0&&zt(t),!1)}function Ht(t,e){if(t.isTracing===Q.BREAK){var r=[];Xt(de(t),r,1),new Function("debugger;\n/*\nTracing '"+t.name+"'\n\nYou are entering this break point because derivation '"+t.name+"' is being traced and '"+e.name+"' is now forcing it to update.\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\n\n"+(t instanceof At?t.derivation.toString().replace(/[*]\//g,"/"):"")+"\n\nThe dependencies for this derivation are:\n\n"+r.join("\n")+"\n*/\n ")()}}function Xt(t,e,r){e.length>=1e3?e.push("(and many more)"):(e.push(""+new Array(r).join("\t")+t.name),t.dependencies&&t.dependencies.forEach((function(t){return Xt(t,e,r+1)})))}var Gt=function(){function t(t,e,r,n){void 0===t&&(t="Reaction@"+u()),void 0===n&&(n=!1),this.name=t,this.onInvalidate=e,this.errorHandler=r,this.requiresObservable=n,this.observing=[],this.newObserving=[],this.dependenciesState=J.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+u(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=Q.NONE}return t.prototype.onBecomeStale=function(){this.schedule()},t.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,Rt.pendingReactions.push(this),Vt())},t.prototype.isScheduled=function(){return this._isScheduled},t.prototype.runReaction=function(){if(!this.isDisposed){if(Bt(),this._isScheduled=!1,it(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending}catch(t){this.reportExceptionInDerivation(t)}}Ut()}},t.prototype.track=function(t){if(!this.isDisposed){Bt();false,this._isRunning=!0;var e=ct(this,t,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&st(this),ot(e)&&this.reportExceptionInDerivation(e.cause),Ut()}},t.prototype.reportExceptionInDerivation=function(t){var e=this;if(this.errorHandler)this.errorHandler(t,this);else{if(Rt.disableErrorBoundaries)throw t;Rt.suppressReactionErrors,Rt.globalReactionErrorHandlers.forEach((function(r){return r(t,e)}))}},t.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(Bt(),st(this),Ut()))},t.prototype.getDisposer=function(){var t=this.dispose.bind(this);return t[_]=this,t},t.prototype.toString=function(){return"Reaction["+this.name+"]"},t.prototype.trace=function(t){void 0===t&&(t=!1),function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=!1;"boolean"==typeof t[t.length-1]&&(r=t.pop());var n=Ce(t);if(!n)return a(!1);n.isTracing,Q.NONE;n.isTracing=r?Q.BREAK:Q.LOG}(this,t)},t}();var Yt=function(t){return t()};function Vt(){Rt.inBatch>0||Rt.isRunningReactions||Yt(Wt)}function Wt(){Rt.isRunningReactions=!0;for(var t=Rt.pendingReactions,e=0;t.length>0;){100==++e&&t.splice(0);for(var r=t.splice(0),n=0,o=r.length;n<o;n++)r[n].runReaction()}Rt.isRunningReactions=!1}var Kt=d("Reaction",Gt);function $t(t){var e=Yt;Yt=function(r){return t((function(){return e(r)}))}}function Zt(t){return function(){}}function qt(){a(!1)}function Jt(t){return function(e,r,n){if(n){if(n.value)return{value:mt(t,n.value),enumerable:!1,configurable:!0,writable:!0};var o=n.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return mt(t,o.call(this))}}}return Qt(t).apply(this,arguments)}}function Qt(t){return function(e,r,n){Object.defineProperty(e,r,{configurable:!0,enumerable:!1,get:function(){},set:function(e){h(this,r,te(t,e))}})}}var te=function(t,e,r,n){return 1===arguments.length&&"function"==typeof t?mt(t.name||"<unnamed action>",t):2===arguments.length&&"function"==typeof e?mt(t,e):1===arguments.length&&"string"==typeof t?Jt(t):!0!==n?Jt(e).apply(null,arguments):void h(t,e,mt(t.name||e,r.value,this))};function ee(t,e){return Ot("string"==typeof t?t:t.name||"<unnamed action>","function"==typeof t?t:e,this,void 0)}function re(t){return"function"==typeof t&&!0===t.isMobxAction}function ne(t,e,r){h(t,e,mt(e,r.bind(t)))}function oe(t,e){void 0===e&&(e=i);var r,n=e&&e.name||t.name||"Autorun@"+u();if(!e.scheduler&&!e.delay)r=new Gt(n,(function(){this.track(c)}),e.onError,e.requiresObservable);else{var o=ue(e),a=!1;r=new Gt(n,(function(){a||(a=!0,o((function(){a=!1,r.isDisposed||r.track(c)})))}),e.onError,e.requiresObservable)}function c(){t(r)}return r.schedule(),r.getDisposer()}te.bound=function(t,e,r,n){return!0===n?(ne(t,e,r.value),null):r?{configurable:!0,enumerable:!1,get:function(){return ne(this,e,r.value||r.initializer.call(this)),this[e]},set:qt}:{enumerable:!1,configurable:!0,set:function(t){ne(this,e,t)},get:function(){}}};var ie=function(t){return t()};function ue(t){return t.scheduler?t.scheduler:t.delay?function(e){return setTimeout(e,t.delay)}:ie}function ae(t,e,r){void 0===r&&(r=i);var n,o,a,c=r.name||"Reaction@"+u(),s=te(c,r.onError?(n=r.onError,o=e,function(){try{return o.apply(this,arguments)}catch(t){n.call(this,t)}}):e),l=!r.scheduler&&!r.delay,f=ue(r),p=!0,h=!1,d=r.compareStructural?E.structural:r.equals||E.default,y=new Gt(c,(function(){p||l?v():h||(h=!0,f(v))}),r.onError,r.requiresObservable);function v(){if(h=!1,!y.isDisposed){var e=!1;y.track((function(){var r=t(y);e=p||!d(a,r),a=r})),p&&r.fireImmediately&&s(a,y),p||!0!==e||s(a,y),p&&(p=!1)}}return y.schedule(),y.getDisposer()}function ce(t,e,r){return se("onBecomeUnobserved",t,e,r)}function se(t,e,r,n){var o="function"==typeof n?vr(e,r):vr(e),i="function"==typeof n?n:r,u=t+"Listeners";return o[u]?o[u].add(i):o[u]=new Set([i]),"function"!=typeof o[t]?a(!1):function(){var t=o[u];t&&(t.delete(i),0===t.size&&delete o[u])}}function le(t){var e=t.enforceActions,r=t.computedRequiresReaction,n=t.computedConfigurable,o=t.disableErrorBoundaries,i=t.reactionScheduler,u=t.reactionRequiresObservable,c=t.observableRequiresReaction;if(!0===t.isolateGlobalState&&((Rt.pendingReactions.length||Rt.inBatch||Rt.isRunningReactions)&&a("isolateGlobalState should be called before MobX is running any reactions"),Ct=!0,Nt&&(0==--Mt().__mobxInstanceCount&&(Mt().__mobxGlobals=void 0),Rt=new Dt)),void 0!==e){var s=void 0;switch(e){case!0:case"observed":s=!0;break;case!1:case"never":s=!1;break;case"strict":case"always":s="strict";break;default:a("Invalid value for 'enforceActions': '"+e+"', expected 'never', 'always' or 'observed'")}Rt.enforceActions=s,Rt.allowStateChanges=!0!==s&&"strict"!==s}void 0!==r&&(Rt.computedRequiresReaction=!!r),void 0!==u&&(Rt.reactionRequiresObservable=!!u),void 0!==c&&(Rt.observableRequiresReaction=!!c,Rt.allowStateReads=!Rt.observableRequiresReaction),void 0!==n&&(Rt.computedConfigurable=!!n),void 0!==o&&(Rt.disableErrorBoundaries=!!o),i&&$t(i)}function fe(t,e,r,n){var o=pe(n=X(n));return I(t),lr(t,n.name,o.enhancer),e&&he(t,e,r,o),t}function pe(t){return t.defaultDecorator||(!1===t.deep?V:G)}function he(t,e,r,n){var o,i;Bt();try{var u=O(e);try{for(var a=A(u),c=a.next();!c.done;c=a.next()){var s=c.value,l=Object.getOwnPropertyDescriptor(e,s);0;var f=(r&&s in r?r[s]:l.get?tt:n)(t,s,l,!0);f&&Object.defineProperty(t,s,f)}}catch(t){o={error:t}}finally{try{c&&!c.done&&(i=a.return)&&i.call(a)}finally{if(o)throw o.error}}}finally{Ut()}}function de(t,e){return ye(vr(t,e))}function ye(t){var e,r,n={name:t.name};return t.observing&&t.observing.length>0&&(n.dependencies=(e=t.observing,r=[],e.forEach((function(t){-1===r.indexOf(t)&&r.push(t)})),r).map(ye)),n}var ve=0;function ge(){this.message="FLOW_CANCELLED"}function be(t){1!==arguments.length&&a("Flow expects 1 argument and cannot be used as decorator");var e=t.name||"<unnamed flow>";return function(){var r,n=this,o=arguments,i=++ve,u=te(e+" - runid: "+i+" - init",t).apply(n,o),a=void 0,c=new Promise((function(t,n){var o=0;function c(t){var r;a=void 0;try{r=te(e+" - runid: "+i+" - yield "+o++,u.next).call(u,t)}catch(t){return n(t)}l(r)}function s(t){var r;a=void 0;try{r=te(e+" - runid: "+i+" - yield "+o++,u.throw).call(u,t)}catch(t){return n(t)}l(r)}function l(e){if(!e||"function"!=typeof e.then)return e.done?t(e.value):(a=Promise.resolve(e.value)).then(c,s);e.then(l,n)}r=n,c(void 0)}));return c.cancel=te(e+" - runid: "+i+" - cancel",(function(){try{a&&me(a);var t=u.return(void 0),e=Promise.resolve(t.value);e.then(l,l),me(e),r(new ge)}catch(t){r(t)}})),c}}function me(t){"function"==typeof t.cancel&&t.cancel()}function Oe(t,e){if(null==t)return!1;if(void 0!==e){if(!1===yr(t))return!1;if(!t[_].values.has(e))return!1;var r=vr(t,e);return kt(r)}return kt(t)}function _e(t){return arguments.length>1?a(!1):Oe(t)}function we(t,e){return"string"!=typeof e?a(!1):Oe(t,e)}function je(t,e){return null!=t&&(void 0!==e?!!yr(t)&&t[_].values.has(e):yr(t)||!!t[_]||j(t)||Kt(t)||kt(t))}function xe(t){return 1!==arguments.length&&a(!1),je(t)}function Ee(t){return yr(t)?t[_].getKeys():ir(t)||cr(t)?Array.from(t.keys()):er(t)?t.map((function(t,e){return e})):a(!1)}function Se(t){return yr(t)?Ee(t).map((function(e){return t[e]})):ir(t)?Ee(t).map((function(e){return t.get(e)})):cr(t)?Array.from(t.values()):er(t)?t.slice():a(!1)}function Pe(t){return yr(t)?Ee(t).map((function(e){return[e,t[e]]})):ir(t)?Ee(t).map((function(e){return[e,t.get(e)]})):cr(t)?Array.from(t.entries()):er(t)?t.map((function(t,e){return[e,t]})):a(!1)}function Ae(t,e,r){if(2!==arguments.length||cr(t))if(yr(t)){var n=t[_],o=n.values.get(e);o?n.write(e,r):n.addObservableProp(e,r,n.defaultEnhancer)}else if(ir(t))t.set(e,r);else if(cr(t))t.add(e);else{if(!er(t))return a(!1);"number"!=typeof e&&(e=parseInt(e,10)),c(e>=0,"Not a valid index: '"+e+"'"),Bt(),e>=t.length&&(t.length=e+1),t[e]=r,Ut()}else{Bt();var i=e;try{for(var u in i)Ae(t,u,i[u])}finally{Ut()}}}function ke(t,e,r,n){return"function"==typeof r?function(t,e,r,n){return gr(t,e).observe(r,n)}(t,e,r,n):function(t,e,r){return gr(t).observe(e,r)}(t,e,r)}ge.prototype=Object.create(Error.prototype);var De={detectCycles:!0,exportMapsAsObjects:!0,recurseEverything:!1};function Te(t,e,r,n){return n.detectCycles&&t.set(e,r),r}function Me(t,e,r){if(!e.recurseEverything&&!xe(t))return t;if("object"!=typeof t)return t;if(null===t)return null;if(t instanceof Date)return t;if(Pt(t))return Me(t.get(),e,r);if(xe(t)&&Ee(t),!0===e.detectCycles&&null!==t&&r.has(t))return r.get(t);if(er(t)||Array.isArray(t)){var n=Te(r,t,[],e),o=t.map((function(t){return Me(t,e,r)}));n.length=o.length;for(var i=0,u=o.length;i<u;i++)n[i]=o[i];return n}if(cr(t)||Object.getPrototypeOf(t)===Set.prototype){if(!1===e.exportMapsAsObjects){var a=Te(r,t,new Set,e);return t.forEach((function(t){a.add(Me(t,e,r))})),a}var c=Te(r,t,[],e);return t.forEach((function(t){c.push(Me(t,e,r))})),c}if(ir(t)||Object.getPrototypeOf(t)===Map.prototype){if(!1===e.exportMapsAsObjects){var s=Te(r,t,new Map,e);return t.forEach((function(t,n){s.set(n,Me(t,e,r))})),s}var l=Te(r,t,{},e);return t.forEach((function(t,n){l[n]=Me(t,e,r)})),l}var f=Te(r,t,{},e);return g(t).forEach((function(n){f[n]=Me(t[n],e,r)})),f}function Ne(t,e){var r;return"boolean"==typeof e&&(e={detectCycles:e}),e||(e=De),e.detectCycles=void 0===e.detectCycles?!0===e.recurseEverything:!0===e.detectCycles,e.detectCycles&&(r=new Map),Me(t,e,r)}function Ce(t){switch(t.length){case 0:return Rt.trackingDerivation;case 1:return vr(t[0]);case 2:return vr(t[0],t[1])}}function Re(t,e){void 0===e&&(e=void 0),Bt();try{return t.apply(e)}finally{Ut()}}function Ie(t,e,r){return 1===arguments.length||e&&"object"==typeof e?ze(t,e):Le(t,e,r||{})}function Le(t,e,r){var n;"number"==typeof r.timeout&&(n=setTimeout((function(){if(!i[_].isDisposed){i();var t=new Error("WHEN_TIMEOUT");if(!r.onError)throw t;r.onError(t)}}),r.timeout)),r.name=r.name||"When@"+u();var o=mt(r.name+"-effect",e),i=oe((function(e){t()&&(e.dispose(),n&&clearTimeout(n),o())}),r);return i}function ze(t,e){var r;var n=new Promise((function(n,o){var i=Le(t,n,P(P({},e),{onError:o}));r=function(){i(),o("WHEN_CANCELLED")}}));return n.cancel=r,n}function Be(t){return t[_]}function Ue(t){return"string"==typeof t||"number"==typeof t||"symbol"==typeof t}var Fe={has:function(t,e){if(e===_||"constructor"===e||e===T)return!0;var r=Be(t);return Ue(e)?r.has(e):e in t},get:function(t,e){if(e===_||"constructor"===e||e===T)return t[e];var r=Be(t),n=r.values.get(e);if(n instanceof w){var o=n.get();return void 0===o&&r.has(e),o}return Ue(e)&&r.has(e),t[e]},set:function(t,e,r){return!!Ue(e)&&(Ae(t,e,r),!0)},deleteProperty:function(t,e){return!!Ue(e)&&(Be(t).remove(e),!0)},ownKeys:function(t){return Be(t).keysAtom.reportObserved(),Reflect.ownKeys(t)},preventExtensions:function(t){return a("Dynamic observable objects cannot be frozen"),!1}};function He(t){var e=new Proxy(t,Fe);return t[_].proxy=e,e}function Xe(t){return void 0!==t.interceptors&&t.interceptors.length>0}function Ge(t,e){var r=t.interceptors||(t.interceptors=[]);return r.push(e),s((function(){var t=r.indexOf(e);-1!==t&&r.splice(t,1)}))}function Ye(t,e){var r=ft();try{for(var n=D(t.interceptors||[]),o=0,i=n.length;o<i&&(c(!(e=n[o](e))||e.type,"Intercept handlers should return nothing or a change object"),e);o++);return e}finally{pt(r)}}function Ve(t){return void 0!==t.changeListeners&&t.changeListeners.length>0}function We(t,e){var r=t.changeListeners||(t.changeListeners=[]);return r.push(e),s((function(){var t=r.indexOf(e);-1!==t&&r.splice(t,1)}))}function Ke(t,e){var r=ft(),n=t.changeListeners;if(n){for(var o=0,i=(n=n.slice()).length;o<i;o++)n[o](e);pt(r)}}var $e={get:function(t,e){return e===_?t[_]:"length"===e?t[_].getArrayLength():"number"==typeof e?Je.get.call(t,e):"string"!=typeof e||isNaN(e)?Je.hasOwnProperty(e)?Je[e]:t[e]:Je.get.call(t,parseInt(e))},set:function(t,e,r){return"length"===e&&t[_].setArrayLength(r),"number"==typeof e&&Je.set.call(t,e,r),"symbol"==typeof e||isNaN(e)?t[e]=r:Je.set.call(t,parseInt(e),r),!0},preventExtensions:function(t){return a("Observable arrays cannot be frozen"),!1}};function Ze(t,e,r,n){void 0===r&&(r="ObservableArray@"+u()),void 0===n&&(n=!1);var o,i,a,c=new qe(r,e,n);o=c.values,i=_,a=c,Object.defineProperty(o,i,{enumerable:!1,writable:!1,configurable:!0,value:a});var s=new Proxy(c.values,$e);if(c.proxy=s,t&&t.length){var l=xt(!0);c.spliceWithArray(0,0,t),Et(l)}return s}var qe=function(){function t(t,e,r){this.owned=r,this.values=[],this.proxy=void 0,this.lastKnownLength=0,this.atom=new w(t||"ObservableArray@"+u()),this.enhancer=function(r,n){return e(r,n,t+"[..]")}}return t.prototype.dehanceValue=function(t){return void 0!==this.dehancer?this.dehancer(t):t},t.prototype.dehanceValues=function(t){return void 0!==this.dehancer&&t.length>0?t.map(this.dehancer):t},t.prototype.intercept=function(t){return Ge(this,t)},t.prototype.observe=function(t,e){return void 0===e&&(e=!1),e&&t({object:this.proxy,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),We(this,t)},t.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},t.prototype.setArrayLength=function(t){if("number"!=typeof t||t<0)throw new Error("[mobx.array] Out of range: "+t);var e=this.values.length;if(t!==e)if(t>e){for(var r=new Array(t-e),n=0;n<t-e;n++)r[n]=void 0;this.spliceWithArray(e,0,r)}else this.spliceWithArray(t,e-t)},t.prototype.updateArrayLength=function(t,e){if(t!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed.");this.lastKnownLength+=e},t.prototype.spliceWithArray=function(t,e,r){var n=this;at(this.atom);var i=this.values.length;if(void 0===t?t=0:t>i?t=i:t<0&&(t=Math.max(0,i+t)),e=1===arguments.length?i-t:null==e?0:Math.max(0,Math.min(e,i-t)),void 0===r&&(r=o),Xe(this)){var u=Ye(this,{object:this.proxy,type:"splice",index:t,removedCount:e,added:r});if(!u)return o;e=u.removedCount,r=u.added}r=0===r.length?r:r.map((function(t){return n.enhancer(t,void 0)}));var a=this.spliceItemsIntoValues(t,e,r);return 0===e&&0===r.length||this.notifyArraySplice(t,r,a),this.dehanceValues(a)},t.prototype.spliceItemsIntoValues=function(t,e,r){var n;if(r.length<1e4)return(n=this.values).splice.apply(n,D([t,e],r));var o=this.values.slice(t,t+e);return this.values=this.values.slice(0,t).concat(r,this.values.slice(t+e)),o},t.prototype.notifyArrayChildUpdate=function(t,e,r){var n=!this.owned&&!1,o=Ve(this),i=o||n?{object:this.proxy,type:"update",index:t,newValue:e,oldValue:r}:null;this.atom.reportChanged(),o&&Ke(this,i)},t.prototype.notifyArraySplice=function(t,e,r){var n=!this.owned&&!1,o=Ve(this),i=o||n?{object:this.proxy,type:"splice",index:t,removed:r,added:e,removedCount:r.length,addedCount:e.length}:null;this.atom.reportChanged(),o&&Ke(this,i)},t}(),Je={intercept:function(t){return this[_].intercept(t)},observe:function(t,e){return void 0===e&&(e=!1),this[_].observe(t,e)},clear:function(){return this.splice(0)},replace:function(t){var e=this[_];return e.spliceWithArray(0,e.values.length,t)},toJS:function(){return this.slice()},toJSON:function(){return this.toJS()},splice:function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=this[_];switch(arguments.length){case 0:return[];case 1:return o.spliceWithArray(t);case 2:return o.spliceWithArray(t,e)}return o.spliceWithArray(t,e,r)},spliceWithArray:function(t,e,r){return this[_].spliceWithArray(t,e,r)},push:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=this[_];return r.spliceWithArray(r.values.length,0,t),r.values.length},pop:function(){return this.splice(Math.max(this[_].values.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=this[_];return r.spliceWithArray(0,0,t),r.values.length},reverse:function(){var t=this.slice();return t.reverse.apply(t,arguments)},sort:function(t){var e=this.slice();return e.sort.apply(e,arguments)},remove:function(t){var e=this[_],r=e.dehanceValues(e.values).indexOf(t);return r>-1&&(this.splice(r,1),!0)},get:function(t){var e=this[_];if(e&&t<e.values.length)return e.atom.reportObserved(),e.dehanceValue(e.values[t])},set:function(t,e){var r=this[_],n=r.values;if(t<n.length){at(r.atom);var o=n[t];if(Xe(r)){var i=Ye(r,{type:"update",object:r.proxy,index:t,newValue:e});if(!i)return;e=i.newValue}(e=r.enhancer(e,o))!==o&&(n[t]=e,r.notifyArrayChildUpdate(t,e,o))}else{if(t!==n.length)throw new Error("[mobx.array] Index out of bounds, "+t+" is larger than "+n.length);r.spliceWithArray(t,0,[e])}}};["concat","flat","includes","indexOf","join","lastIndexOf","slice","toString","toLocaleString"].forEach((function(t){"function"==typeof Array.prototype[t]&&(Je[t]=function(){var e=this[_];e.atom.reportObserved();var r=e.dehanceValues(e.values);return r[t].apply(r,arguments)})})),["every","filter","find","findIndex","flatMap","forEach","map","some"].forEach((function(t){"function"==typeof Array.prototype[t]&&(Je[t]=function(e,r){var n=this,o=this[_];return o.atom.reportObserved(),o.dehanceValues(o.values)[t]((function(t,o){return e.call(r,t,o,n)}),r)})})),["reduce","reduceRight"].forEach((function(t){Je[t]=function(){var e=this,r=this[_];r.atom.reportObserved();var n=arguments[0];return arguments[0]=function(t,o,i){return o=r.dehanceValue(o),n(t,o,i,e)},r.values[t].apply(r.values,arguments)}}));var Qe,tr=d("ObservableArrayAdministration",qe);function er(t){return f(t)&&tr(t[_])}var rr,nr={},or=function(){function t(t,e,r){if(void 0===e&&(e=B),void 0===r&&(r="ObservableMap@"+u()),this.enhancer=e,this.name=r,this[Qe]=nr,this._keysAtom=x(this.name+".keys()"),this[Symbol.toStringTag]="Map","function"!=typeof Map)throw new Error("mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js");this._data=new Map,this._hasMap=new Map,this.merge(t)}return t.prototype._has=function(t){return this._data.has(t)},t.prototype.has=function(t){var e=this;if(!Rt.trackingDerivation)return this._has(t);var r=this._hasMap.get(t);if(!r){var n=r=new St(this._has(t),U,this.name+"."+b(t)+"?",!1);this._hasMap.set(t,n),ce(n,(function(){return e._hasMap.delete(t)}))}return r.get()},t.prototype.set=function(t,e){var r=this._has(t);if(Xe(this)){var n=Ye(this,{type:r?"update":"add",object:this,newValue:e,name:t});if(!n)return this;e=n.newValue}return r?this._updateValue(t,e):this._addValue(t,e),this},t.prototype.delete=function(t){var e=this;if((at(this._keysAtom),Xe(this))&&!(n=Ye(this,{type:"delete",object:this,name:t})))return!1;if(this._has(t)){var r=Ve(this),n=r?{type:"delete",object:this,oldValue:this._data.get(t).value,name:t}:null;return Re((function(){e._keysAtom.reportChanged(),e._updateHasMapEntry(t,!1),e._data.get(t).setNewValue(void 0),e._data.delete(t)})),r&&Ke(this,n),!0}return!1},t.prototype._updateHasMapEntry=function(t,e){var r=this._hasMap.get(t);r&&r.setNewValue(e)},t.prototype._updateValue=function(t,e){var r=this._data.get(t);if((e=r.prepareNewValue(e))!==Rt.UNCHANGED){var n=!1,o=Ve(this),i=o?{type:"update",object:this,oldValue:r.value,name:t,newValue:e}:null;n,r.setNewValue(e),o&&Ke(this,i)}},t.prototype._addValue=function(t,e){var r=this;at(this._keysAtom),Re((function(){var n=new St(e,r.enhancer,r.name+"."+b(t),!1);r._data.set(t,n),e=n.value,r._updateHasMapEntry(t,!0),r._keysAtom.reportChanged()}));var n=!1,o=Ve(this),i=o?{type:"add",object:this,name:t,newValue:e}:null;o&&Ke(this,i)},t.prototype.get=function(t){return this.has(t)?this.dehanceValue(this._data.get(t).get()):this.dehanceValue(void 0)},t.prototype.dehanceValue=function(t){return void 0!==this.dehancer?this.dehancer(t):t},t.prototype.keys=function(){return this._keysAtom.reportObserved(),this._data.keys()},t.prototype.values=function(){var t=this,e=this.keys();return jr({next:function(){var r=e.next(),n=r.done,o=r.value;return{done:n,value:n?void 0:t.get(o)}}})},t.prototype.entries=function(){var t=this,e=this.keys();return jr({next:function(){var r=e.next(),n=r.done,o=r.value;return{done:n,value:n?void 0:[o,t.get(o)]}}})},t.prototype[(Qe=_,Symbol.iterator)]=function(){return this.entries()},t.prototype.forEach=function(t,e){var r,n;try{for(var o=A(this),i=o.next();!i.done;i=o.next()){var u=k(i.value,2),a=u[0],c=u[1];t.call(e,c,a,this)}}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}},t.prototype.merge=function(t){var e=this;return ir(t)&&(t=t.toJS()),Re((function(){var r=xt(!0);try{p(t)?g(t).forEach((function(r){return e.set(r,t[r])})):Array.isArray(t)?t.forEach((function(t){var r=k(t,2),n=r[0],o=r[1];return e.set(n,o)})):y(t)?(t.constructor!==Map&&a("Cannot initialize from classes that inherit from Map: "+t.constructor.name),t.forEach((function(t,r){return e.set(r,t)}))):null!=t&&a("Cannot initialize map from "+t)}finally{Et(r)}})),this},t.prototype.clear=function(){var t=this;Re((function(){lt((function(){var e,r;try{for(var n=A(t.keys()),o=n.next();!o.done;o=n.next()){var i=o.value;t.delete(i)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}}))}))},t.prototype.replace=function(t){var e=this;return Re((function(){var r,n,o,i,u=function(t){if(y(t)||ir(t))return t;if(Array.isArray(t))return new Map(t);if(p(t)){var e=new Map;for(var r in t)e.set(r,t[r]);return e}return a("Cannot convert to map from '"+t+"'")}(t),c=new Map,s=!1;try{for(var l=A(e._data.keys()),f=l.next();!f.done;f=l.next()){var h=f.value;if(!u.has(h))if(e.delete(h))s=!0;else{var d=e._data.get(h);c.set(h,d)}}}catch(t){r={error:t}}finally{try{f&&!f.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}try{for(var v=A(u.entries()),g=v.next();!g.done;g=v.next()){var b=k(g.value,2),m=(h=b[0],d=b[1],e._data.has(h));if(e.set(h,d),e._data.has(h)){var O=e._data.get(h);c.set(h,O),m||(s=!0)}}}catch(t){o={error:t}}finally{try{g&&!g.done&&(i=v.return)&&i.call(v)}finally{if(o)throw o.error}}if(!s)if(e._data.size!==c.size)e._keysAtom.reportChanged();else for(var _=e._data.keys(),w=c.keys(),j=_.next(),x=w.next();!j.done;){if(j.value!==x.value){e._keysAtom.reportChanged();break}j=_.next(),x=w.next()}e._data=c})),this},Object.defineProperty(t.prototype,"size",{get:function(){return this._keysAtom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),t.prototype.toPOJO=function(){var t,e,r={};try{for(var n=A(this),o=n.next();!o.done;o=n.next()){var i=k(o.value,2),u=i[0],a=i[1];r["symbol"==typeof u?u:b(u)]=a}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return r},t.prototype.toJS=function(){return new Map(this)},t.prototype.toJSON=function(){return this.toPOJO()},t.prototype.toString=function(){var t=this;return this.name+"[{ "+Array.from(this.keys()).map((function(e){return b(e)+": "+t.get(e)})).join(", ")+" }]"},t.prototype.observe=function(t,e){return We(this,t)},t.prototype.intercept=function(t){return Ge(this,t)},t}(),ir=d("ObservableMap",or),ur={},ar=function(){function t(t,e,r){if(void 0===e&&(e=B),void 0===r&&(r="ObservableSet@"+u()),this.name=r,this[rr]=ur,this._data=new Set,this._atom=x(this.name),this[Symbol.toStringTag]="Set","function"!=typeof Set)throw new Error("mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js");this.enhancer=function(t,n){return e(t,n,r)},t&&this.replace(t)}return t.prototype.dehanceValue=function(t){return void 0!==this.dehancer?this.dehancer(t):t},t.prototype.clear=function(){var t=this;Re((function(){lt((function(){var e,r;try{for(var n=A(t._data.values()),o=n.next();!o.done;o=n.next()){var i=o.value;t.delete(i)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}}))}))},t.prototype.forEach=function(t,e){var r,n;try{for(var o=A(this),i=o.next();!i.done;i=o.next()){var u=i.value;t.call(e,u,u,this)}}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}},Object.defineProperty(t.prototype,"size",{get:function(){return this._atom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),t.prototype.add=function(t){var e=this;if((at(this._atom),Xe(this))&&!(o=Ye(this,{type:"add",object:this,newValue:t})))return this;if(!this.has(t)){Re((function(){e._data.add(e.enhancer(t,void 0)),e._atom.reportChanged()}));var r=!1,n=Ve(this),o=n?{type:"add",object:this,newValue:t}:null;r,n&&Ke(this,o)}return this},t.prototype.delete=function(t){var e=this;if(Xe(this)&&!(n=Ye(this,{type:"delete",object:this,oldValue:t})))return!1;if(this.has(t)){var r=Ve(this),n=r?{type:"delete",object:this,oldValue:t}:null;return Re((function(){e._atom.reportChanged(),e._data.delete(t)})),r&&Ke(this,n),!0}return!1},t.prototype.has=function(t){return this._atom.reportObserved(),this._data.has(this.dehanceValue(t))},t.prototype.entries=function(){var t=0,e=Array.from(this.keys()),r=Array.from(this.values());return jr({next:function(){var n=t;return t+=1,n<r.length?{value:[e[n],r[n]],done:!1}:{done:!0}}})},t.prototype.keys=function(){return this.values()},t.prototype.values=function(){this._atom.reportObserved();var t=this,e=0,r=Array.from(this._data.values());return jr({next:function(){return e<r.length?{value:t.dehanceValue(r[e++]),done:!1}:{done:!0}}})},t.prototype.replace=function(t){var e=this;return cr(t)&&(t=t.toJS()),Re((function(){var r=xt(!0);try{Array.isArray(t)||v(t)?(e.clear(),t.forEach((function(t){return e.add(t)}))):null!=t&&a("Cannot initialize set from "+t)}finally{Et(r)}})),this},t.prototype.observe=function(t,e){return We(this,t)},t.prototype.intercept=function(t){return Ge(this,t)},t.prototype.toJS=function(){return new Set(this)},t.prototype.toString=function(){return this.name+"[ "+Array.from(this).join(", ")+" ]"},t.prototype[(rr=_,Symbol.iterator)]=function(){return this.values()},t}(),cr=d("ObservableSet",ar),sr=function(){function t(t,e,r,n){void 0===e&&(e=new Map),this.target=t,this.values=e,this.name=r,this.defaultEnhancer=n,this.keysAtom=new w(r+".keys")}return t.prototype.read=function(t){return this.values.get(t).get()},t.prototype.write=function(t,e){var r=this.target,n=this.values.get(t);if(n instanceof At)n.set(e);else{if(Xe(this)){if(!(u=Ye(this,{type:"update",object:this.proxy||r,name:t,newValue:e})))return;e=u.newValue}if((e=n.prepareNewValue(e))!==Rt.UNCHANGED){var o=Ve(this),i=!1,u=o?{type:"update",object:this.proxy||r,oldValue:n.value,name:t,newValue:e}:null;i,n.setNewValue(e),o&&Ke(this,u)}}},t.prototype.has=function(t){var e=this.pendingKeys||(this.pendingKeys=new Map),r=e.get(t);if(r)return r.get();var n=!!this.values.get(t);return r=new St(n,U,this.name+"."+b(t)+"?",!1),e.set(t,r),r.get()},t.prototype.addObservableProp=function(t,e,r){void 0===r&&(r=this.defaultEnhancer);var n=this.target;if(Xe(this)){var o=Ye(this,{object:this.proxy||n,name:t,type:"add",newValue:e});if(!o)return;e=o.newValue}var i=new St(e,r,this.name+"."+b(t),!1);this.values.set(t,i),e=i.value,Object.defineProperty(n,t,function(t){return fr[t]||(fr[t]={configurable:!0,enumerable:!0,get:function(){return this[_].read(t)},set:function(e){this[_].write(t,e)}})}(t)),this.notifyPropertyAddition(t,e)},t.prototype.addComputedProp=function(t,e,r){var n,o,i,u=this.target;r.name=r.name||this.name+"."+b(e),this.values.set(e,new At(r)),(t===u||(n=t,o=e,!(i=Object.getOwnPropertyDescriptor(n,o))||!1!==i.configurable&&!1!==i.writable))&&Object.defineProperty(t,e,function(t){return pr[t]||(pr[t]={configurable:Rt.computedConfigurable,enumerable:!1,get:function(){return hr(this).read(t)},set:function(e){hr(this).write(t,e)}})}(e))},t.prototype.remove=function(t){if(this.values.has(t)){var e=this.target;if(Xe(this))if(!(a=Ye(this,{object:this.proxy||e,name:t,type:"remove"})))return;try{Bt();var r=Ve(this),n=!1,o=this.values.get(t),i=o&&o.get();if(o&&o.set(void 0),this.keysAtom.reportChanged(),this.values.delete(t),this.pendingKeys){var u=this.pendingKeys.get(t);u&&u.set(!1)}delete this.target[t];var a=r?{type:"remove",object:this.proxy||e,oldValue:i,name:t}:null;n,r&&Ke(this,a)}finally{Ut()}}},t.prototype.illegalAccess=function(t,e){},t.prototype.observe=function(t,e){return We(this,t)},t.prototype.intercept=function(t){return Ge(this,t)},t.prototype.notifyPropertyAddition=function(t,e){var r=Ve(this),n=r?{type:"add",object:this.proxy||this.target,name:t,newValue:e}:null;if(r&&Ke(this,n),this.pendingKeys){var o=this.pendingKeys.get(t);o&&o.set(!0)}this.keysAtom.reportChanged()},t.prototype.getKeys=function(){var t,e;this.keysAtom.reportObserved();var r=[];try{for(var n=A(this.values),o=n.next();!o.done;o=n.next()){var i=k(o.value,2),u=i[0];i[1]instanceof St&&r.push(u)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return r},t}();function lr(t,e,r){if(void 0===e&&(e=""),void 0===r&&(r=B),Object.prototype.hasOwnProperty.call(t,_))return t[_];p(t)||(e=(t.constructor.name||"ObservableObject")+"@"+u()),e||(e="ObservableObject@"+u());var n=new sr(t,new Map,b(e),r);return h(t,_,n),n}var fr=Object.create(null),pr=Object.create(null);function hr(t){var e=t[_];return e||(I(t),t[_])}var dr=d("ObservableObjectAdministration",sr);function yr(t){return!!f(t)&&(I(t),dr(t[_]))}function vr(t,e){if("object"==typeof t&&null!==t){if(er(t))return void 0!==e&&a(!1),t[_].atom;if(cr(t))return t[_];if(ir(t)){var r=t;return void 0===e?r._keysAtom:((n=r._data.get(e)||r._hasMap.get(e))||a(!1),n)}var n;if(I(t),e&&!t[_]&&t[e],yr(t))return e?((n=t[_].values.get(e))||a(!1),n):a(!1);if(j(t)||kt(t)||Kt(t))return t}else if("function"==typeof t&&Kt(t[_]))return t[_];return a(!1)}function gr(t,e){return t||a("Expecting some object"),void 0!==e?gr(vr(t,e)):j(t)||kt(t)||Kt(t)||ir(t)||cr(t)?t:(I(t),t[_]?t[_]:void a(!1))}var br=Object.prototype.toString;function mr(t,e,r){return void 0===r&&(r=-1),Or(t,e,r)}function Or(t,e,r,n,o){if(t===e)return 0!==t||1/t==1/e;if(null==t||null==e)return!1;if(t!=t)return e!=e;var i=typeof t;if("function"!==i&&"object"!==i&&"object"!=typeof e)return!1;var u=br.call(t);if(u!==br.call(e))return!1;switch(u){case"[object RegExp]":case"[object String]":return""+t==""+e;case"[object Number]":return+t!=+t?+e!=+e:0==+t?1/+t==1/e:+t==+e;case"[object Date]":case"[object Boolean]":return+t==+e;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(t)===Symbol.valueOf.call(e);case"[object Map]":case"[object Set]":r>=0&&r++}t=_r(t),e=_r(e);var a="[object Array]"===u;if(!a){if("object"!=typeof t||"object"!=typeof e)return!1;var c=t.constructor,s=e.constructor;if(c!==s&&!("function"==typeof c&&c instanceof c&&"function"==typeof s&&s instanceof s)&&"constructor"in t&&"constructor"in e)return!1}if(0===r)return!1;r<0&&(r=-1),o=o||[];for(var l=(n=n||[]).length;l--;)if(n[l]===t)return o[l]===e;if(n.push(t),o.push(e),a){if((l=t.length)!==e.length)return!1;for(;l--;)if(!Or(t[l],e[l],r-1,n,o))return!1}else{var f=Object.keys(t),p=void 0;if(l=f.length,Object.keys(e).length!==l)return!1;for(;l--;)if(!wr(e,p=f[l])||!Or(t[p],e[p],r-1,n,o))return!1}return n.pop(),o.pop(),!0}function _r(t){return er(t)?t.slice():y(t)||ir(t)||v(t)||cr(t)?Array.from(t.entries()):t}function wr(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function jr(t){return t[Symbol.iterator]=xr,t}function xr(){return this}if("undefined"==typeof Proxy||"undefined"==typeof Symbol)throw new Error("[mobx] MobX 5+ requires Proxy and Symbol objects. If your environment doesn't support Symbol or Proxy objects, please downgrade to MobX 4. For React Native Android, consider upgrading JSCore.");"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:Zt,extras:{getDebugName:function(t,e){return(void 0!==e?vr(t,e):yr(t)||ir(t)||cr(t)?gr(t):vr(t)).name}},$mobx:_})}).call(this,r(163),r(68))},function(t,e,r){var n=r(113),o=r(42),i=r(179);n||o(Object.prototype,"toString",i,{unsafe:!0})},function(t,e,r){"use strict";var n=r(41),o=r(100),i=r(80),u=r(58),a=r(116),c="Array Iterator",s=u.set,l=u.getterFor(c);t.exports=a(Array,"Array",(function(t,e){s(this,{type:c,target:n(t),index:0,kind:e})}),(function(){var t=l(this),e=t.target,r=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}}),"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},function(t,e,r){"use strict";var n=r(16),o=r(7),i=r(46),u=r(76),a=r(34),c=r(15),s=r(71),l=r(36),f=r(108),p=r(18),h=r(35),d=r(96),y=r(30),v=r(33),g=r(54),b=r(87),m=r(32),O=r(40),_=r(41),w=r(86),j=r(39),x=r(69),E=r(60),S=r(77),P=r(74),A=r(139),k=r(112),D=r(50),T=r(38),M=r(84),N=r(98),C=r(42),R=r(89),I=r(93),L=r(72),z=r(90),B=r(28),U=r(140),F=r(141),H=r(78),X=r(58),G=r(79).forEach,Y=I("hidden"),V="Symbol",W=B("toPrimitive"),K=X.set,$=X.getterFor(V),Z=Object.prototype,q=o.Symbol,J=q&&q.prototype,Q=o.TypeError,tt=o.QObject,et=i("JSON","stringify"),rt=D.f,nt=T.f,ot=A.f,it=M.f,ut=c([].push),at=R("symbols"),ct=R("op-symbols"),st=R("string-to-symbol-registry"),lt=R("symbol-to-string-registry"),ft=R("wks"),pt=!tt||!tt.prototype||!tt.prototype.findChild,ht=l&&p((function(){return 7!=E(nt({},"a",{get:function(){return nt(this,"a",{value:7}).a}})).a}))?function(t,e,r){var n=rt(Z,e);n&&delete Z[e],nt(t,e,r),n&&t!==Z&&nt(Z,e,n)}:nt,dt=function(t,e){var r=at[t]=E(J);return K(r,{type:V,tag:t,description:e}),l||(r.description=e),r},yt=function(t,e,r){t===Z&&yt(ct,e,r),m(t);var n=w(e);return m(r),h(at,n)?(r.enumerable?(h(t,Y)&&t[Y][n]&&(t[Y][n]=!1),r=E(r,{enumerable:x(0,!1)})):(h(t,Y)||nt(t,Y,x(1,{})),t[Y][n]=!0),ht(t,n,r)):nt(t,n,r)},vt=function(t,e){m(t);var r=_(e),n=S(r).concat(Ot(r));return G(n,(function(e){l&&!a(gt,r,e)||yt(t,e,r[e])})),t},gt=function(t){var e=w(t),r=a(it,this,e);return!(this===Z&&h(at,e)&&!h(ct,e))&&(!(r||!h(this,e)||!h(at,e)||h(this,Y)&&this[Y][e])||r)},bt=function(t,e){var r=_(t),n=w(e);if(r!==Z||!h(at,n)||h(ct,n)){var o=rt(r,n);return!o||!h(at,n)||h(r,Y)&&r[Y][n]||(o.enumerable=!0),o}},mt=function(t){var e=ot(_(t)),r=[];return G(e,(function(t){h(at,t)||h(L,t)||ut(r,t)})),r},Ot=function(t){var e=t===Z,r=ot(e?ct:_(t)),n=[];return G(r,(function(t){!h(at,t)||e&&!h(Z,t)||ut(n,at[t])})),n};(f||(q=function(){if(g(J,this))throw Q("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?j(arguments[0]):void 0,e=z(t),r=function(t){this===Z&&a(r,ct,t),h(this,Y)&&h(this[Y],e)&&(this[Y][e]=!1),ht(this,e,x(1,t))};return l&&pt&&ht(Z,e,{configurable:!0,set:r}),dt(e,t)},C(J=q.prototype,"toString",(function(){return $(this).tag})),C(q,"withoutSetter",(function(t){return dt(z(t),t)})),M.f=gt,T.f=yt,D.f=bt,P.f=A.f=mt,k.f=Ot,U.f=function(t){return dt(B(t),t)},l&&(nt(J,"description",{configurable:!0,get:function(){return $(this).description}}),s||C(Z,"propertyIsEnumerable",gt,{unsafe:!0}))),n({global:!0,wrap:!0,forced:!f,sham:!f},{Symbol:q}),G(S(ft),(function(t){F(t)})),n({target:V,stat:!0,forced:!f},{for:function(t){var e=j(t);if(h(st,e))return st[e];var r=q(e);return st[e]=r,lt[r]=e,r},keyFor:function(t){if(!b(t))throw Q(t+" is not a symbol");if(h(lt,t))return lt[t]},useSetter:function(){pt=!0},useSimple:function(){pt=!1}}),n({target:"Object",stat:!0,forced:!f,sham:!l},{create:function(t,e){return void 0===e?E(t):vt(E(t),e)},defineProperty:yt,defineProperties:vt,getOwnPropertyDescriptor:bt}),n({target:"Object",stat:!0,forced:!f},{getOwnPropertyNames:mt,getOwnPropertySymbols:Ot}),n({target:"Object",stat:!0,forced:p((function(){k.f(1)}))},{getOwnPropertySymbols:function(t){return k.f(O(t))}}),et)&&n({target:"JSON",stat:!0,forced:!f||p((function(){var t=q();return"[null]"!=et([t])||"{}"!=et({a:t})||"{}"!=et(Object(t))}))},{stringify:function(t,e,r){var n=N(arguments),o=e;if((v(e)||void 0!==t)&&!b(t))return d(e)||(e=function(t,e){if(y(o)&&(e=a(o,this,t,e)),!b(e))return e}),n[1]=e,u(et,null,n)}});if(!J[W]){var _t=J.valueOf;C(J,W,(function(t){return a(_t,this)}))}H(q,V),L[Y]=!0},function(t,e,r){var n=r(7),o=r(152),i=r(153),u=r(3),a=r(57),c=r(28),s=c("iterator"),l=c("toStringTag"),f=u.values,p=function(t,e){if(t){if(t[s]!==f)try{a(t,s,f)}catch(e){t[s]=f}if(t[l]||a(t,l,e),o[e])for(var r in u)if(t[r]!==u[r])try{a(t,r,u[r])}catch(e){t[r]=u[r]}}};for(var h in o)p(n[h]&&n[h].prototype,h);p(i,"DOMTokenList")},function(t,e,r){"use strict";var n=r(151).charAt,o=r(39),i=r(58),u=r(116),a="String Iterator",c=i.set,s=i.getterFor(a);u(String,"String",(function(t){c(this,{type:a,string:o(t),index:0})}),(function(){var t,e=s(this),r=e.string,o=e.index;return o>=r.length?{value:void 0,done:!0}:(t=n(r,o),e.index+=t.length,{value:t,done:!1})}))},function(t,e,r){(function(e){var r=function(t){return t&&t.Math==Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof e&&e)||function(){return this}()||Function("return this")()}).call(this,r(68))},function(t,e,r){"use strict";var n=r(16),o=r(36),i=r(7),u=r(15),a=r(35),c=r(30),s=r(54),l=r(39),f=r(38).f,p=r(134),h=i.Symbol,d=h&&h.prototype;if(o&&c(h)&&(!("description"in d)||void 0!==h().description)){var y={},v=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:l(arguments[0]),e=s(d,this)?new h(t):void 0===t?h():h(t);return""===t&&(y[e]=!0),e};p(v,h),v.prototype=d,d.constructor=v;var g="Symbol(test)"==String(h("test")),b=u(d.toString),m=u(d.valueOf),O=/^Symbol\((.*)\)[^)]+$/,_=u("".replace),w=u("".slice);f(d,"description",{configurable:!0,get:function(){var t=m(this),e=b(t);if(a(y,t))return"";var r=g?w(e,7,-1):_(e,O,"$1");return""===r?void 0:r}}),n({global:!0,forced:!0},{Symbol:v})}},function(t,e,r){r(141)("iterator")},function(t,e,r){"use strict";r.d(e,"a",(function(){return u.a})),r.d(e,"c",(function(){return u.e})),r.d(e,"h",(function(){return O})),r.d(e,"i",(function(){return g})),r.d(e,"j",(function(){return y})),r.d(e,"b",(function(){return D})),r.d(e,"e",(function(){return C})),r.d(e,"f",(function(){return T})),r.d(e,"g",(function(){return at}));var n,o,i,u=r(0),a=0,c=[],s=u.i.__b,l=u.i.__r,f=u.i.diffed,p=u.i.__c,h=u.i.unmount;function d(t,e){u.i.__h&&u.i.__h(o,t,a||e),a=0;var r=o.__H||(o.__H={__:[],__h:[]});return t>=r.__.length&&r.__.push({}),r.__[t]}function y(t){return a=1,v(P,t)}function v(t,e,r){var i=d(n++,2);return i.t=t,i.__c||(i.__=[r?r(e):P(void 0,e),function(t){var e=i.t(i.__[0],t);i.__[0]!==e&&(i.__=[e,i.__[1]],i.__c.setState({}))}],i.__c=o),i.__}function g(t,e){var r=d(n++,3);!u.i.__s&&S(r.__H,e)&&(r.__=t,r.__H=e,o.__H.__h.push(r))}function b(t,e){var r=d(n++,4);!u.i.__s&&S(r.__H,e)&&(r.__=t,r.__H=e,o.__h.push(r))}function m(t,e){var r=d(n++,7);return S(r.__H,e)&&(r.__=t(),r.__H=e,r.__h=t),r.__}function O(t,e){return a=8,m((function(){return t}),e)}function _(){var t;for(c.sort((function(t,e){return t.__v.__b-e.__v.__b}));t=c.pop();)if(t.__P)try{t.__H.__h.forEach(x),t.__H.__h.forEach(E),t.__H.__h=[]}catch(e){t.__H.__h=[],u.i.__e(e,t.__v)}}u.i.__b=function(t){o=null,s&&s(t)},u.i.__r=function(t){l&&l(t),n=0;var e=(o=t.__c).__H;e&&(e.__h.forEach(x),e.__h.forEach(E),e.__h=[])},u.i.diffed=function(t){f&&f(t);var e=t.__c;e&&e.__H&&e.__H.__h.length&&(1!==c.push(e)&&i===u.i.requestAnimationFrame||((i=u.i.requestAnimationFrame)||j)(_)),o=null},u.i.__c=function(t,e){e.some((function(t){try{t.__h.forEach(x),t.__h=t.__h.filter((function(t){return!t.__||E(t)}))}catch(r){e.some((function(t){t.__h&&(t.__h=[])})),e=[],u.i.__e(r,t.__v)}})),p&&p(t,e)},u.i.unmount=function(t){h&&h(t);var e,r=t.__c;r&&r.__H&&(r.__H.__.forEach((function(t){try{x(t)}catch(t){e=t}})),e&&u.i.__e(e,r.__v))};var w="function"==typeof requestAnimationFrame;function j(t){var e,r=function(){clearTimeout(n),w&&cancelAnimationFrame(e),setTimeout(t)},n=setTimeout(r,100);w&&(e=requestAnimationFrame(r))}function x(t){var e=o,r=t.__c;"function"==typeof r&&(t.__c=void 0,r()),o=e}function E(t){var e=o;t.__c=t.__(),o=e}function S(t,e){return!t||t.length!==e.length||e.some((function(e,r){return e!==t[r]}))}function P(t,e){return"function"==typeof e?e(t):e}function A(t,e){for(var r in e)t[r]=e[r];return t}function k(t,e){for(var r in t)if("__source"!==r&&!(r in e))return!0;for(var n in e)if("__source"!==n&&t[n]!==e[n])return!0;return!1}function D(t){this.props=t}function T(t,e){function r(t){var r=this.props.ref,n=r==t.ref;return!n&&r&&(r.call?r(null):r.current=null),e?!e(this.props,t)||!n:k(this.props,t)}function n(e){return this.shouldComponentUpdate=r,Object(u.e)(t,e)}return n.displayName="Memo("+(t.displayName||t.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(D.prototype=new u.a).isPureReactComponent=!0,D.prototype.shouldComponentUpdate=function(t,e){return k(this.props,t)||k(this.state,e)};var M=u.i.__b;u.i.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),M&&M(t)};var N="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function C(t){function e(e,r){var n=A({},e);return delete n.ref,t(n,!(r=e.ref||r)||"object"==typeof r&&!("current"in r)?null:r)}return e.$$typeof=N,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var R=function(t,e){return null==t?null:Object(u.k)(Object(u.k)(t).map(e))},I={map:R,forEach:R,count:function(t){return t?Object(u.k)(t).length:0},only:function(t){var e=Object(u.k)(t);if(1!==e.length)throw"Children.only";return e[0]},toArray:u.k},L=u.i.__e;u.i.__e=function(t,e,r){if(t.then)for(var n,o=e;o=o.__;)if((n=o.__c)&&n.__c)return null==e.__e&&(e.__e=r.__e,e.__k=r.__k),n.__c(t,e);L(t,e,r)};var z=u.i.unmount;function B(t,e,r){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach((function(t){"function"==typeof t.__c&&t.__c()})),t.__c.__H=null),null!=(t=A({},t)).__c&&(t.__c.__P===r&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map((function(t){return B(t,e,r)}))),t}function U(t,e,r){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map((function(t){return U(t,e,r)})),t.__c&&t.__c.__P===e&&(t.__e&&r.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=r)),t}function F(){this.__u=0,this.t=null,this.__b=null}function H(t){var e=t.__.__c;return e&&e.__e&&e.__e(t)}function X(){this.u=null,this.o=null}u.i.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&!0===t.__h&&(t.type=null),z&&z(t)},(F.prototype=new u.a).__c=function(t,e){var r=e.__c,n=this;null==n.t&&(n.t=[]),n.t.push(r);var o=H(n.__v),i=!1,u=function(){i||(i=!0,r.__R=null,o?o(a):a())};r.__R=u;var a=function(){if(!--n.__u){if(n.state.__e){var t=n.state.__e;n.__v.__k[0]=U(t,t.__c.__P,t.__c.__O)}var e;for(n.setState({__e:n.__b=null});e=n.t.pop();)e.forceUpdate()}},c=!0===e.__h;n.__u++||c||n.setState({__e:n.__b=n.__v.__k[0]}),t.then(u,u)},F.prototype.componentWillUnmount=function(){this.t=[]},F.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=B(this.__b,r,n.__O=n.__P)}this.__b=null}var o=e.__e&&Object(u.e)(u.b,null,t.fallback);return o&&(o.__h=null),[Object(u.e)(u.b,null,e.__e?null:t.children),o]};var G=function(t,e,r){if(++r[1]===r[0]&&t.o.delete(e),t.props.revealOrder&&("t"!==t.props.revealOrder[0]||!t.o.size))for(r=t.u;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;t.u=r=r[2]}};function Y(t){return this.getChildContext=function(){return t.context},t.children}function V(t){var e=this,r=t.i;e.componentWillUnmount=function(){Object(u.j)(null,e.l),e.l=null,e.i=null},e.i&&e.i!==r&&e.componentWillUnmount(),t.__v?(e.l||(e.i=r,e.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(t){this.childNodes.push(t),e.i.appendChild(t)},insertBefore:function(t,r){this.childNodes.push(t),e.i.appendChild(t)},removeChild:function(t){this.childNodes.splice(this.childNodes.indexOf(t)>>>1,1),e.i.removeChild(t)}}),Object(u.j)(Object(u.e)(Y,{context:e.context},t.__v),e.l)):e.l&&e.componentWillUnmount()}(X.prototype=new u.a).__e=function(t){var e=this,r=H(e.__v),n=e.o.get(t);return n[0]++,function(o){var i=function(){e.props.revealOrder?(n.push(o),G(e,t,n)):o()};r?r(i):i()}},X.prototype.render=function(t){this.u=null,this.o=new Map;var e=Object(u.k)(t.children);t.revealOrder&&"b"===t.revealOrder[0]&&e.reverse();for(var r=e.length;r--;)this.o.set(e[r],this.u=[1,0,this.u]);return t.children},X.prototype.componentDidUpdate=X.prototype.componentDidMount=function(){var t=this;this.o.forEach((function(e,r){G(t,r,e)}))};var W="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,K=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,$="undefined"!=typeof document,Z=function(t){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(t)};u.a.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(t){Object.defineProperty(u.a.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}));var q=u.i.event;function J(){}function Q(){return this.cancelBubble}function tt(){return this.defaultPrevented}u.i.event=function(t){return q&&(t=q(t)),t.persist=J,t.isPropagationStopped=Q,t.isDefaultPrevented=tt,t.nativeEvent=t};var et,rt={configurable:!0,get:function(){return this.class}},nt=u.i.vnode;u.i.vnode=function(t){var e=t.type,r=t.props,n=r;if("string"==typeof e){var o=-1===e.indexOf("-");for(var i in n={},r){var a=r[i];$&&"children"===i&&"noscript"===e||"value"===i&&"defaultValue"in r&&null==a||("defaultValue"===i&&"value"in r&&null==r.value?i="value":"download"===i&&!0===a?a="":/ondoubleclick/i.test(i)?i="ondblclick":/^onchange(textarea|input)/i.test(i+e)&&!Z(r.type)?i="oninput":/^onfocus$/i.test(i)?i="onfocusin":/^onblur$/i.test(i)?i="onfocusout":/^on(Ani|Tra|Tou|BeforeInp)/.test(i)?i=i.toLowerCase():o&&K.test(i)?i=i.replace(/[A-Z0-9]/,"-$&").toLowerCase():null===a&&(a=void 0),n[i]=a)}"select"==e&&n.multiple&&Array.isArray(n.value)&&(n.value=Object(u.k)(r.children).forEach((function(t){t.props.selected=-1!=n.value.indexOf(t.props.value)}))),"select"==e&&null!=n.defaultValue&&(n.value=Object(u.k)(r.children).forEach((function(t){t.props.selected=n.multiple?-1!=n.defaultValue.indexOf(t.props.value):n.defaultValue==t.props.value}))),t.props=n,r.class!=r.className&&(rt.enumerable="className"in r,null!=r.className&&(n.class=r.className),Object.defineProperty(n,"className",rt))}t.$$typeof=W,nt&&nt(t)};var ot=u.i.__r;u.i.__r=function(t){ot&&ot(t),et=t.__c};var it={ReactCurrentDispatcher:{current:{readContext:function(t){return et.__n[t.__c].props.value}}}};function ut(t){return!!t&&t.$$typeof===W}var at=function(t,e){return t(e)},ct=u.b,st={useState:y,useReducer:v,useEffect:g,useLayoutEffect:b,useRef:function(t){return a=5,m((function(){return{current:t}}),[])},useImperativeHandle:function(t,e,r){a=6,b((function(){"function"==typeof t?t(e()):t&&(t.current=e())}),null==r?r:r.concat(t))},useMemo:m,useCallback:O,useContext:function(t){var e=o.context[t.__c],r=d(n++,9);return r.c=t,e?(null==r.__&&(r.__=!0,e.sub(o)),e.props.value):t.__},useDebugValue:function(t,e){u.i.useDebugValue&&u.i.useDebugValue(e?e(t):t)},version:"17.0.2",Children:I,render:function(t,e,r){return null==e.__k&&(e.textContent=""),Object(u.j)(t,e),"function"==typeof r&&r(),t?t.__c:null},hydrate:function(t,e,r){return Object(u.h)(t,e),"function"==typeof r&&r(),t?t.__c:null},unmountComponentAtNode:function(t){return!!t.__k&&(Object(u.j)(null,t),!0)},createPortal:function(t,e){return Object(u.e)(V,{__v:t,i:e})},createElement:u.e,createContext:u.d,createFactory:function(t){return u.e.bind(null,t)},cloneElement:function(t){return ut(t)?u.c.apply(null,arguments):t},createRef:u.f,Fragment:u.b,isValidElement:ut,findDOMNode:function(t){return t&&(t.base||1===t.nodeType&&t)||null},Component:u.a,PureComponent:D,memo:T,forwardRef:C,flushSync:function(t,e){return t(e)},unstable_batchedUpdates:at,StrictMode:ct,Suspense:F,SuspenseList:X,lazy:function(t){var e,r,n;function o(o){if(e||(e=t()).then((function(t){r=t.default||t}),(function(t){n=t})),n)throw n;if(!r)throw e;return Object(u.e)(r,o)}return o.displayName="Lazy",o.__f=!0,o},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:it};e.d=st},function(t,e,r){var n=r(7),o=r(152),i=r(153),u=r(187),a=r(57),c=function(t){if(t&&t.forEach!==u)try{a(t,"forEach",u)}catch(e){t.forEach=u}};for(var s in o)o[s]&&c(n[s]&&n[s].prototype);c(i)},function(t,e,r){r(16)({target:"Object",stat:!0},{setPrototypeOf:r(102)})},function(t,e,r){var n=r(16),o=r(18),i=r(40),u=r(101),a=r(143);n({target:"Object",stat:!0,forced:o((function(){u(1)})),sham:!a},{getPrototypeOf:function(t){return u(i(t))}})},function(t,e,r){var n=r(16),o=r(46),i=r(76),u=r(203),a=r(165),c=r(32),s=r(33),l=r(60),f=r(18),p=o("Reflect","construct"),h=Object.prototype,d=[].push,y=f((function(){function t(){}return!(p((function(){}),[],t)instanceof t)})),v=!f((function(){p((function(){}))})),g=y||v;n({target:"Reflect",stat:!0,forced:g,sham:g},{construct:function(t,e){a(t),c(e);var r=arguments.length<3?t:a(arguments[2]);if(v&&!y)return p(t,e,r);if(t==r){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var n=[null];return i(d,n,e),new(i(u,t,n))}var o=r.prototype,f=l(s(o)?o:h),g=i(t,f,e);return s(g)?g:f}})},function(t,e){var r=Function.prototype,n=r.bind,o=r.call,i=n&&n.bind(o);t.exports=n?function(t){return t&&i(o,t)}:function(t){return t&&function(){return o.apply(t,arguments)}}},function(t,e,r){var n=r(7),o=r(50).f,i=r(57),u=r(42),a=r(110),c=r(134),s=r(95);t.exports=function(t,e){var r,l,f,p,h,d=t.target,y=t.global,v=t.stat;if(r=y?n:v?n[d]||a(d,{}):(n[d]||{}).prototype)for(l in e){if(p=e[l],f=t.noTargetGet?(h=o(r,l))&&h.value:r[l],!s(y?l:d+(v?".":"#")+l,t.forced)&&void 0!==f){if(typeof p==typeof f)continue;c(p,f)}(t.sham||f&&f.sham)&&i(p,"sham",!0),u(r,l,p,t)}}},function(t,e,r){"use strict";var n=r(16),o=r(7),i=r(96),u=r(99),a=r(33),c=r(75),s=r(45),l=r(41),f=r(63),p=r(28),h=r(81),d=r(98),y=h("slice"),v=p("species"),g=o.Array,b=Math.max;n({target:"Array",proto:!0,forced:!y},{slice:function(t,e){var r,n,o,p=l(this),h=s(p),y=c(t,h),m=c(void 0===e?h:e,h);if(i(p)&&(r=p.constructor,(u(r)&&(r===g||i(r.prototype))||a(r)&&null===(r=r[v]))&&(r=void 0),r===g||void 0===r))return d(p,y,m);for(n=new(void 0===r?g:r)(b(m-y,0)),o=0;y<m;y++,o++)y in p&&f(n,o,p[y]);return n.length=o,n}})},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,r){"use strict";var n=r(16),o=r(103);n({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},function(t,e,r){var n=r(16),o=r(40),i=r(77);n({target:"Object",stat:!0,forced:r(18)((function(){i(1)}))},{keys:function(t){return i(o(t))}})},function(t,e,r){var n=r(36),o=r(73).EXISTS,i=r(15),u=r(38).f,a=Function.prototype,c=i(a.toString),s=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,l=i(s.exec);n&&!o&&u(a,"name",{configurable:!0,get:function(){try{return l(s,c(this))[1]}catch(t){return""}}})},function(t,e,r){var n=r(16),o=r(18),i=r(41),u=r(50).f,a=r(36),c=o((function(){u(1)}));n({target:"Object",stat:!0,forced:!a||c,sham:!a},{getOwnPropertyDescriptor:function(t,e){return u(i(t),e)}})},function(t,e,r){var n=r(16),o=r(188);n({target:"Array",stat:!0,forced:!r(120)((function(t){Array.from(t)}))},{from:o})},function(t,e,r){"use strict";var n=r(16),o=r(79).filter;n({target:"Array",proto:!0,forced:!r(81)("filter")},{filter:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,r){var n=r(16),o=r(36),i=r(135),u=r(41),a=r(50),c=r(63);n({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(t){for(var e,r,n=u(t),o=a.f,s=i(n),l={},f=0;s.length>f;)void 0!==(r=o(n,e=s[f++]))&&c(l,e,r);return l}})},function(t,e,r){"use strict";var n=r(16),o=r(7),i=r(18),u=r(96),a=r(33),c=r(40),s=r(45),l=r(63),f=r(115),p=r(81),h=r(28),d=r(70),y=h("isConcatSpreadable"),v=9007199254740991,g="Maximum allowed index exceeded",b=o.TypeError,m=d>=51||!i((function(){var t=[];return t[y]=!1,t.concat()[0]!==t})),O=p("concat"),_=function(t){if(!a(t))return!1;var e=t[y];return void 0!==e?!!e:u(t)};n({target:"Array",proto:!0,forced:!m||!O},{concat:function(t){var e,r,n,o,i,u=c(this),a=f(u,0),p=0;for(e=-1,n=arguments.length;e<n;e++)if(_(i=-1===e?u:arguments[e])){if(p+(o=s(i))>v)throw b(g);for(r=0;r<o;r++,p++)r in i&&l(a,p,i[r])}else{if(p>=v)throw b(g);l(a,p++,i)}return a.length=p,a}})},,function(t,e,r){var n=r(7),o=r(89),i=r(35),u=r(90),a=r(108),c=r(132),s=o("wks"),l=n.Symbol,f=l&&l.for,p=c?l:l&&l.withoutSetter||u;t.exports=function(t){if(!i(s,t)||!a&&"string"!=typeof s[t]){var e="Symbol."+t;a&&i(l,t)?s[t]=l[t]:s[t]=c&&f?f(e):p(e)}return s[t]}},function(t,e,r){var n=r(16),o=r(202);n({target:"Object",stat:!0,forced:Object.assign!==o},{assign:o})},function(t,e){t.exports=function(t){return"function"==typeof t}},function(t,e,r){"use strict";var n=r(106),o="object"==typeof self&&self&&self.Object===Object&&self,i=n.a||o||Function("return this")();e.a=i},function(t,e,r){var n=r(7),o=r(33),i=n.String,u=n.TypeError;t.exports=function(t){if(o(t))return t;throw u(i(t)+" is not an object")}},function(t,e,r){var n=r(30);t.exports=function(t){return"object"==typeof t?null!==t:n(t)}},function(t,e){var r=Function.prototype.call;t.exports=r.bind?r.bind(r):function(){return r.apply(r,arguments)}},function(t,e,r){var n=r(15),o=r(40),i=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return i(o(t),e)}},function(t,e,r){var n=r(18);t.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(t,e,r){"use strict";var n=r(16),o=r(79).map;n({target:"Array",proto:!0,forced:!r(81)("map")},{map:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,r){var n=r(7),o=r(36),i=r(133),u=r(32),a=r(86),c=n.TypeError,s=Object.defineProperty;e.f=o?s:function(t,e,r){if(u(t),e=a(e),u(r),i)try{return s(t,e,r)}catch(t){}if("get"in r||"set"in r)throw c("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},function(t,e,r){var n=r(7),o=r(97),i=n.String;t.exports=function(t){if("Symbol"===o(t))throw TypeError("Cannot convert a Symbol value to a string");return i(t)}},function(t,e,r){var n=r(7),o=r(44),i=n.Object;t.exports=function(t){return i(o(t))}},function(t,e,r){var n=r(85),o=r(44);t.exports=function(t){return n(o(t))}},function(t,e,r){var n=r(7),o=r(30),i=r(35),u=r(57),a=r(110),c=r(92),s=r(58),l=r(73).CONFIGURABLE,f=s.get,p=s.enforce,h=String(String).split("String");(t.exports=function(t,e,r,c){var s,f=!!c&&!!c.unsafe,d=!!c&&!!c.enumerable,y=!!c&&!!c.noTargetGet,v=c&&void 0!==c.name?c.name:e;o(r)&&("Symbol("===String(v).slice(0,7)&&(v="["+String(v).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!i(r,"name")||l&&r.name!==v)&&u(r,"name",v),(s=p(r)).source||(s.source=h.join("string"==typeof v?v:""))),t!==n?(f?!y&&t[e]&&(d=!0):delete t[e],d?t[e]=r:u(t,e,r)):d?t[e]=r:a(e,r)})(Function.prototype,"toString",(function(){return o(this)&&f(this).source||c(this)}))},function(t,e,r){"use strict";(function(t){r.d(e,"d",(function(){return i})),r.d(e,"c",(function(){return u})),r.d(e,"b",(function(){return a})),r.d(e,"a",(function(){return s}));var n=r(10),o=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u};function i(){var t=o(Object(n.j)(0),2)[1];return Object(n.h)((function(){t((function(t){return t+1}))}),[])}function u(t){if(!t||"object"!=typeof t)return!1;var e=Object.getPrototypeOf(t);return!e||e===Object.prototype}function a(t){return"function"==typeof Symbol?Symbol.for(t):"__$mobx-react "+t+"__"}var c={};function s(){return"undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:c}}).call(this,r(68))},function(t,e,r){var n=r(7).TypeError;t.exports=function(t){if(null==t)throw n("Can't call method on "+t);return t}},function(t,e,r){var n=r(94);t.exports=function(t){return n(t.length)}},function(t,e,r){var n=r(7),o=r(30),i=function(t){return o(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?i(n[t]):n[t]&&n[t][e]}},function(t,e,r){var n=r(16),o=r(34),i=r(33),u=r(32),a=r(204),c=r(50),s=r(101);n({target:"Reflect",stat:!0},{get:function t(e,r){var n,l,f=arguments.length<3?e:arguments[2];return u(e)===f?e[r]:(n=c.f(e,r))?a(n)?n.value:void 0===n.get?void 0:o(n.get,f):i(l=s(e))?t(l,r,f):void 0}})},function(t,e,r){"use strict";(function(t){var n=r(31),o=r(171),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,u=i&&"object"==typeof t&&t&&!t.nodeType&&t,a=u&&u.exports===i?n.a.Buffer:void 0,c=(a?a.isBuffer:void 0)||o.a;e.a=c}).call(this,r(122)(t))},function(t,e,r){"use strict";(function(t){var n=r(106),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,u=i&&i.exports===o&&n.a.process,a=function(){try{var t=i&&i.require&&i.require("util").types;return t||u&&u.binding&&u.binding("util")}catch(t){}}();e.a=a}).call(this,r(122)(t))},function(t,e,r){var n=r(36),o=r(34),i=r(84),u=r(69),a=r(41),c=r(86),s=r(35),l=r(133),f=Object.getOwnPropertyDescriptor;e.f=n?f:function(t,e){if(t=a(t),e=c(e),l)try{return f(t,e)}catch(t){}if(s(t,e))return u(!o(i.f,t,e),t[e])}},function(t,e,r){var n=r(15),o=n({}.toString),i=n("".slice);t.exports=function(t){return i(o(t),8,-1)}},function(t,e,r){"use strict";r(182)("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),r(186))},function(t,e,r){var n=r(16),o=r(220).entries;n({target:"Object",stat:!0},{entries:function(t){return o(t)}})},function(t,e,r){var n=r(15);t.exports=n({}.isPrototypeOf)},function(t,e,r){var n=r(46);t.exports=n("navigator","userAgent")||""},function(t,e,r){var n=r(7),o=r(30),i=r(88),u=n.TypeError;t.exports=function(t){if(o(t))return t;throw u(i(t)+" is not a function")}},function(t,e,r){var n=r(36),o=r(38),i=r(69);t.exports=n?function(t,e,r){return o.f(t,e,i(1,r))}:function(t,e,r){return t[e]=r,t}},function(t,e,r){var n,o,i,u=r(175),a=r(7),c=r(15),s=r(33),l=r(57),f=r(35),p=r(109),h=r(93),d=r(72),y="Object already initialized",v=a.TypeError,g=a.WeakMap;if(u||p.state){var b=p.state||(p.state=new g),m=c(b.get),O=c(b.has),_=c(b.set);n=function(t,e){if(O(b,t))throw new v(y);return e.facade=t,_(b,t,e),e},o=function(t){return m(b,t)||{}},i=function(t){return O(b,t)}}else{var w=h("state");d[w]=!0,n=function(t,e){if(f(t,w))throw new v(y);return e.facade=t,l(t,w,e),e},o=function(t){return f(t,w)?t[w]:{}},i=function(t){return f(t,w)}}t.exports={set:n,get:o,has:i,enforce:function(t){return i(t)?o(t):n(t,{})},getterFor:function(t){return function(e){var r;if(!s(e)||(r=o(e)).type!==t)throw v("Incompatible receiver, "+t+" required");return r}}}},function(t,e){var r=Math.ceil,n=Math.floor;t.exports=function(t){var e=+t;return e!=e||0===e?0:(e>0?n:r)(e)}},function(t,e,r){var n,o=r(32),i=r(176),u=r(111),a=r(72),c=r(138),s=r(91),l=r(93),f=l("IE_PROTO"),p=function(){},h=function(t){return"<script>"+t+"</"+"script>"},d=function(t){t.write(h("")),t.close();var e=t.parentWindow.Object;return t=null,e},y=function(){try{n=new ActiveXObject("htmlfile")}catch(t){}var t,e;y="undefined"!=typeof document?document.domain&&n?d(n):((e=s("iframe")).style.display="none",c.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(h("document.F=Object")),t.close(),t.F):d(n);for(var r=u.length;r--;)delete y.prototype[u[r]];return y()};a[f]=!0,t.exports=Object.create||function(t,e){var r;return null!==t?(p.prototype=o(t),r=new p,p.prototype=null,r[f]=t):r=y(),void 0===e?r:i(r,e)}},function(t,e,r){"use strict";var n=r(36),o=r(7),i=r(15),u=r(95),a=r(42),c=r(35),s=r(148),l=r(54),f=r(87),p=r(131),h=r(18),d=r(74).f,y=r(50).f,v=r(38).f,g=r(160),b=r(161).trim,m="Number",O=o.Number,_=O.prototype,w=o.TypeError,j=i("".slice),x=i("".charCodeAt),E=function(t){var e=p(t,"number");return"bigint"==typeof e?e:S(e)},S=function(t){var e,r,n,o,i,u,a,c,s=p(t,"number");if(f(s))throw w("Cannot convert a Symbol value to a number");if("string"==typeof s&&s.length>2)if(s=b(s),43===(e=x(s,0))||45===e){if(88===(r=x(s,2))||120===r)return NaN}else if(48===e){switch(x(s,1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+s}for(u=(i=j(s,2)).length,a=0;a<u;a++)if((c=x(i,a))<48||c>o)return NaN;return parseInt(i,n)}return+s};if(u(m,!O(" 0o1")||!O("0b1")||O("+0x1"))){for(var P,A=function(t){var e=arguments.length<1?0:O(E(t)),r=this;return l(_,r)&&h((function(){g(r)}))?s(Object(e),r,A):e},k=n?d(O):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),D=0;k.length>D;D++)c(O,P=k[D])&&!c(A,P)&&v(A,P,y(O,P));A.prototype=_,_.constructor=A,a(o,m,A)}},function(t,e,r){var n=r(56);t.exports=function(t,e){var r=t[e];return null==r?void 0:n(r)}},function(t,e,r){"use strict";var n=r(86),o=r(38),i=r(69);t.exports=function(t,e,r){var u=n(e);u in t?o.f(t,u,i(0,r)):t[u]=r}},function(t,e,r){var n=r(15),o=r(56),i=n(n.bind);t.exports=function(t,e){return o(t),void 0===e?t:i?i(t,e):function(){return t.apply(e,arguments)}}},function(t,e,r){"use strict";var n=r(16),o=r(15),i=r(85),u=r(41),a=r(121),c=o([].join),s=i!=Object,l=a("join",",");n({target:"Array",proto:!0,forced:s||!l},{join:function(t){return c(u(this),void 0===t?",":t)}})},function(t,e,r){"use strict";var n=r(15),o=r(73).PROPER,i=r(42),u=r(32),a=r(54),c=r(39),s=r(18),l=r(154),f="toString",p=RegExp.prototype,h=p.toString,d=n(l),y=s((function(){return"/a/b"!=h.call({source:"a",flags:"b"})})),v=o&&h.name!=f;(y||v)&&i(RegExp.prototype,f,(function(){var t=u(this),e=c(t.source),r=t.flags;return"/"+e+"/"+c(void 0===r&&a(p,t)&&!("flags"in p)?d(t):r)}),{unsafe:!0})},function(t,e,r){var n=r(16),o=r(217),i=r(100);n({target:"Array",proto:!0},{fill:o}),i("fill")},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,r){var n,o,i=r(7),u=r(55),a=i.process,c=i.Deno,s=a&&a.versions||c&&c.version,l=s&&s.v8;l&&(o=(n=l.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!o&&u&&(!(n=u.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=u.match(/Chrome\/(\d+)/))&&(o=+n[1]),t.exports=o},function(t,e){t.exports=!1},function(t,e){t.exports={}},function(t,e,r){var n=r(36),o=r(35),i=Function.prototype,u=n&&Object.getOwnPropertyDescriptor,a=o(i,"name"),c=a&&"something"===function(){}.name,s=a&&(!n||n&&u(i,"name").configurable);t.exports={EXISTS:a,PROPER:c,CONFIGURABLE:s}},function(t,e,r){var n=r(136),o=r(111).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,o)}},function(t,e,r){var n=r(59),o=Math.max,i=Math.min;t.exports=function(t,e){var r=n(t);return r<0?o(r+e,0):i(r,e)}},function(t,e){var r=Function.prototype,n=r.apply,o=r.bind,i=r.call;t.exports="object"==typeof Reflect&&Reflect.apply||(o?i.bind(n):function(){return i.apply(n,arguments)})},function(t,e,r){var n=r(136),o=r(111);t.exports=Object.keys||function(t){return n(t,o)}},function(t,e,r){var n=r(38).f,o=r(35),i=r(28)("toStringTag");t.exports=function(t,e,r){t&&!o(t=r?t:t.prototype,i)&&n(t,i,{configurable:!0,value:e})}},function(t,e,r){var n=r(64),o=r(15),i=r(85),u=r(40),a=r(45),c=r(115),s=o([].push),l=function(t){var e=1==t,r=2==t,o=3==t,l=4==t,f=6==t,p=7==t,h=5==t||f;return function(d,y,v,g){for(var b,m,O=u(d),_=i(O),w=n(y,v),j=a(_),x=0,E=g||c,S=e?E(d,j):r||p?E(d,0):void 0;j>x;x++)if((h||x in _)&&(m=w(b=_[x],x,O),t))if(e)S[x]=m;else if(m)switch(t){case 3:return!0;case 5:return b;case 6:return x;case 2:s(S,b)}else switch(t){case 4:return!1;case 7:s(S,b)}return f?-1:o||l?l:S}};t.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},function(t,e){t.exports={}},function(t,e,r){var n=r(18),o=r(28),i=r(70),u=o("species");t.exports=function(t){return i>=51||!n((function(){var e=[];return(e.constructor={})[u]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},function(t,e,r){"use strict";var n=r(76),o=r(34),i=r(15),u=r(123),a=r(159),c=r(32),s=r(44),l=r(164),f=r(124),p=r(94),h=r(39),d=r(62),y=r(114),v=r(125),g=r(103),b=r(155),m=r(18),O=b.UNSUPPORTED_Y,_=4294967295,w=Math.min,j=[].push,x=i(/./.exec),E=i(j),S=i("".slice),P=!m((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var r="ab".split(t);return 2!==r.length||"a"!==r[0]||"b"!==r[1]}));u("split",(function(t,e,r){var i;return i="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,r){var i=h(s(this)),u=void 0===r?_:r>>>0;if(0===u)return[];if(void 0===t)return[i];if(!a(t))return o(e,i,t,u);for(var c,l,f,p=[],d=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),v=0,b=new RegExp(t.source,d+"g");(c=o(g,b,i))&&!((l=b.lastIndex)>v&&(E(p,S(i,v,c.index)),c.length>1&&c.index<i.length&&n(j,p,y(c,1)),f=c[0].length,v=l,p.length>=u));)b.lastIndex===c.index&&b.lastIndex++;return v===i.length?!f&&x(b,"")||E(p,""):E(p,S(i,v)),p.length>u?y(p,0,u):p}:"0".split(void 0,0).length?function(t,r){return void 0===t&&0===r?[]:o(e,this,t,r)}:e,[function(e,r){var n=s(this),u=null==e?void 0:d(e,t);return u?o(u,e,n,r):o(i,h(n),e,r)},function(t,n){var o=c(this),u=h(t),a=r(i,o,u,n,i!==e);if(a.done)return a.value;var s=l(o,RegExp),d=o.unicode,y=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(O?"g":"y"),g=new s(O?"^(?:"+o.source+")":o,y),b=void 0===n?_:n>>>0;if(0===b)return[];if(0===u.length)return null===v(g,u)?[u]:[];for(var m=0,j=0,x=[];j<u.length;){g.lastIndex=O?0:j;var P,A=v(g,O?S(u,j):u);if(null===A||(P=w(p(g.lastIndex+(O?j:0)),u.length))===m)j=f(u,j,d);else{if(E(x,S(u,m,j)),x.length===b)return x;for(var k=1;k<=A.length-1;k++)if(E(x,A[k]),x.length===b)return x;j=m=P}}return E(x,S(u,m)),x}]}),!P,O)},function(t,e,r){r(16)({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991})},function(t,e,r){"use strict";var n={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!n.call({1:2},1);e.f=i?function(t){var e=o(this,t);return!!e&&e.enumerable}:n},function(t,e,r){var n=r(7),o=r(15),i=r(18),u=r(51),a=n.Object,c=o("".split);t.exports=i((function(){return!a("z").propertyIsEnumerable(0)}))?function(t){return"String"==u(t)?c(t,""):a(t)}:a},function(t,e,r){var n=r(131),o=r(87);t.exports=function(t){var e=n(t,"string");return o(e)?e:e+""}},function(t,e,r){var n=r(7),o=r(46),i=r(30),u=r(54),a=r(132),c=n.Object;t.exports=a?function(t){return"symbol"==typeof t}:function(t){var e=o("Symbol");return i(e)&&u(e.prototype,c(t))}},function(t,e,r){var n=r(7).String;t.exports=function(t){try{return n(t)}catch(t){return"Object"}}},function(t,e,r){var n=r(71),o=r(109);(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.19.3",mode:n?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},function(t,e,r){var n=r(15),o=0,i=Math.random(),u=n(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+u(++o+i,36)}},function(t,e,r){var n=r(7),o=r(33),i=n.document,u=o(i)&&o(i.createElement);t.exports=function(t){return u?i.createElement(t):{}}},function(t,e,r){var n=r(15),o=r(30),i=r(109),u=n(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return u(t)}),t.exports=i.inspectSource},function(t,e,r){var n=r(89),o=r(90),i=n("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},function(t,e,r){var n=r(59),o=Math.min;t.exports=function(t){return t>0?o(n(t),9007199254740991):0}},function(t,e,r){var n=r(18),o=r(30),i=/#|\.prototype\./,u=function(t,e){var r=c[a(t)];return r==l||r!=s&&(o(e)?n(e):!!e)},a=u.normalize=function(t){return String(t).replace(i,".").toLowerCase()},c=u.data={},s=u.NATIVE="N",l=u.POLYFILL="P";t.exports=u},function(t,e,r){var n=r(51);t.exports=Array.isArray||function(t){return"Array"==n(t)}},function(t,e,r){var n=r(7),o=r(113),i=r(30),u=r(51),a=r(28)("toStringTag"),c=n.Object,s="Arguments"==u(function(){return arguments}());t.exports=o?u:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=c(t),a))?r:s?u(e):"Object"==(n=u(e))&&i(e.callee)?"Arguments":n}},function(t,e,r){var n=r(15);t.exports=n([].slice)},function(t,e,r){var n=r(15),o=r(18),i=r(30),u=r(97),a=r(46),c=r(92),s=function(){},l=[],f=a("Reflect","construct"),p=/^\s*(?:class|function)\b/,h=n(p.exec),d=!p.exec(s),y=function(t){if(!i(t))return!1;try{return f(s,l,t),!0}catch(t){return!1}};t.exports=!f||o((function(){var t;return y(y.call)||!y(Object)||!y((function(){t=!0}))||t}))?function(t){if(!i(t))return!1;switch(u(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return d||!!h(p,c(t))}:y},function(t,e,r){var n=r(28),o=r(60),i=r(38),u=n("unscopables"),a=Array.prototype;null==a[u]&&i.f(a,u,{configurable:!0,value:o(null)}),t.exports=function(t){a[u][t]=!0}},function(t,e,r){var n=r(7),o=r(35),i=r(30),u=r(40),a=r(93),c=r(143),s=a("IE_PROTO"),l=n.Object,f=l.prototype;t.exports=c?l.getPrototypeOf:function(t){var e=u(t);if(o(e,s))return e[s];var r=e.constructor;return i(r)&&e instanceof r?r.prototype:e instanceof l?f:null}},function(t,e,r){var n=r(15),o=r(32),i=r(181);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=n(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return o(r),i(n),e?t(r,n):r.__proto__=n,r}}():void 0)},function(t,e,r){"use strict";var n,o,i=r(34),u=r(15),a=r(39),c=r(154),s=r(155),l=r(89),f=r(60),p=r(58).get,h=r(190),d=r(191),y=l("native-string-replace",String.prototype.replace),v=RegExp.prototype.exec,g=v,b=u("".charAt),m=u("".indexOf),O=u("".replace),_=u("".slice),w=(o=/b*/g,i(v,n=/a/,"a"),i(v,o,"a"),0!==n.lastIndex||0!==o.lastIndex),j=s.BROKEN_CARET,x=void 0!==/()??/.exec("")[1];(w||x||j||h||d)&&(g=function(t){var e,r,n,o,u,s,l,h=this,d=p(h),E=a(t),S=d.raw;if(S)return S.lastIndex=h.lastIndex,e=i(g,S,E),h.lastIndex=S.lastIndex,e;var P=d.groups,A=j&&h.sticky,k=i(c,h),D=h.source,T=0,M=E;if(A&&(k=O(k,"y",""),-1===m(k,"g")&&(k+="g"),M=_(E,h.lastIndex),h.lastIndex>0&&(!h.multiline||h.multiline&&"\n"!==b(E,h.lastIndex-1))&&(D="(?: "+D+")",M=" "+M,T++),r=new RegExp("^(?:"+D+")",k)),x&&(r=new RegExp("^"+D+"$(?!\\s)",k)),w&&(n=h.lastIndex),o=i(v,A?r:h,M),A?o?(o.input=_(o.input,T),o[0]=_(o[0],T),o.index=h.lastIndex,h.lastIndex+=o[0].length):h.lastIndex=0:w&&o&&(h.lastIndex=h.global?o.index+o[0].length:n),x&&o&&o.length>1&&i(y,o[0],r,(function(){for(u=1;u<arguments.length-2;u++)void 0===arguments[u]&&(o[u]=void 0)})),o&&P)for(o.groups=s=f(null),u=0;u<P.length;u++)s[(l=P[u])[0]]=o[l[1]];return o}),t.exports=g},function(t,e,r){"use strict";var n=r(16),o=r(7),i=r(75),u=r(59),a=r(45),c=r(40),s=r(115),l=r(63),f=r(81)("splice"),p=o.TypeError,h=Math.max,d=Math.min,y=9007199254740991,v="Maximum allowed length exceeded";n({target:"Array",proto:!0,forced:!f},{splice:function(t,e){var r,n,o,f,g,b,m=c(this),O=a(m),_=i(t,O),w=arguments.length;if(0===w?r=n=0:1===w?(r=0,n=O-_):(r=w-2,n=d(h(u(e),0),O-_)),O+r-n>y)throw p(v);for(o=s(m,n),f=0;f<n;f++)(g=_+f)in m&&l(o,f,m[g]);if(o.length=n,r<n){for(f=_;f<O-n;f++)b=f+r,(g=f+n)in m?m[b]=m[g]:delete m[b];for(f=O;f>O-n+r;f--)delete m[f-1]}else if(r>n)for(f=O-n;f>_;f--)b=f+r-1,(g=f+n-1)in m?m[b]=m[g]:delete m[b];for(f=0;f<r;f++)m[f+_]=arguments[f+2];return m.length=O-n+r,o}})},function(t,e,r){"use strict";var n=r(16),o=r(205);n({target:"String",proto:!0,forced:r(206)("anchor")},{anchor:function(t){return o(this,"a","name",t)}})},function(t,e,r){"use strict";(function(t){var r="object"==typeof t&&t&&t.Object===Object&&t;e.a=r}).call(this,r(68))},function(t,e,r){"use strict";(function(t){var n=r(31),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,u=i&&i.exports===o?n.a.Buffer:void 0,a=u?u.allocUnsafe:void 0;e.a=function(t,e){if(e)return t.slice();var r=t.length,n=a?a(r):new t.constructor(r);return t.copy(n),n}}).call(this,r(122)(t))},function(t,e,r){var n=r(70),o=r(18);t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},function(t,e,r){var n=r(7),o=r(110),i="__core-js_shared__",u=n[i]||o(i,{});t.exports=u},function(t,e,r){var n=r(7),o=Object.defineProperty;t.exports=function(t,e){try{o(n,t,{value:e,configurable:!0,writable:!0})}catch(r){n[t]=e}return e}},function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,r){var n={};n[r(28)("toStringTag")]="z",t.exports="[object z]"===String(n)},function(t,e,r){var n=r(7),o=r(75),i=r(45),u=r(63),a=n.Array,c=Math.max;t.exports=function(t,e,r){for(var n=i(t),s=o(e,n),l=o(void 0===r?n:r,n),f=a(c(l-s,0)),p=0;s<l;s++,p++)u(f,p,t[s]);return f.length=p,f}},function(t,e,r){var n=r(178);t.exports=function(t,e){return new(n(t))(0===e?0:e)}},function(t,e,r){"use strict";var n=r(16),o=r(34),i=r(71),u=r(73),a=r(30),c=r(180),s=r(101),l=r(102),f=r(78),p=r(57),h=r(42),d=r(28),y=r(80),v=r(142),g=u.PROPER,b=u.CONFIGURABLE,m=v.IteratorPrototype,O=v.BUGGY_SAFARI_ITERATORS,_=d("iterator"),w="keys",j="values",x="entries",E=function(){return this};t.exports=function(t,e,r,u,d,v,S){c(r,e,u);var P,A,k,D=function(t){if(t===d&&R)return R;if(!O&&t in N)return N[t];switch(t){case w:case j:case x:return function(){return new r(this,t)}}return function(){return new r(this)}},T=e+" Iterator",M=!1,N=t.prototype,C=N[_]||N["@@iterator"]||d&&N[d],R=!O&&C||D(d),I="Array"==e&&N.entries||C;if(I&&(P=s(I.call(new t)))!==Object.prototype&&P.next&&(i||s(P)===m||(l?l(P,m):a(P[_])||h(P,_,E)),f(P,T,!0,!0),i&&(y[T]=E)),g&&d==j&&C&&C.name!==j&&(!i&&b?p(N,"name",j):(M=!0,R=function(){return o(C,this)})),d)if(A={values:D(j),keys:v?R:D(w),entries:D(x)},S)for(k in A)(O||M||!(k in N))&&h(N,k,A[k]);else n({target:e,proto:!0,forced:O||M},A);return i&&!S||N[_]===R||h(N,_,R,{name:d}),y[e]=R,A}},function(t,e,r){var n=r(7),o=r(64),i=r(34),u=r(32),a=r(88),c=r(145),s=r(45),l=r(54),f=r(146),p=r(118),h=r(147),d=n.TypeError,y=function(t,e){this.stopped=t,this.result=e},v=y.prototype;t.exports=function(t,e,r){var n,g,b,m,O,_,w,j=r&&r.that,x=!(!r||!r.AS_ENTRIES),E=!(!r||!r.IS_ITERATOR),S=!(!r||!r.INTERRUPTED),P=o(e,j),A=function(t){return n&&h(n,"normal",t),new y(!0,t)},k=function(t){return x?(u(t),S?P(t[0],t[1],A):P(t[0],t[1])):S?P(t,A):P(t)};if(E)n=t;else{if(!(g=p(t)))throw d(a(t)+" is not iterable");if(c(g)){for(b=0,m=s(t);m>b;b++)if((O=k(t[b]))&&l(v,O))return O;return new y(!1)}n=f(t,g)}for(_=n.next;!(w=i(_,n)).done;){try{O=k(w.value)}catch(t){h(n,"throw",t)}if("object"==typeof O&&O&&l(v,O))return O}return new y(!1)}},function(t,e,r){var n=r(97),o=r(62),i=r(80),u=r(28)("iterator");t.exports=function(t){if(null!=t)return o(t,u)||o(t,"@@iterator")||i[n(t)]}},function(t,e,r){var n=r(7),o=r(54),i=n.TypeError;t.exports=function(t,e){if(o(e,t))return t;throw i("Incorrect invocation")}},function(t,e,r){var n=r(28)("iterator"),o=!1;try{var i=0,u={next:function(){return{done:!!i++}},return:function(){o=!0}};u[n]=function(){return this},Array.from(u,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var r=!1;try{var i={};i[n]=function(){return{next:function(){return{done:r=!0}}}},t(i)}catch(t){}return r}},function(t,e,r){"use strict";var n=r(18);t.exports=function(t,e){var r=[][t];return!!r&&n((function(){r.call(null,e||function(){throw 1},1)}))}},function(t,e){t.exports=function(t){if(!t.webpackPolyfill){var e=Object.create(t);e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),Object.defineProperty(e,"exports",{enumerable:!0}),e.webpackPolyfill=1}return e}},function(t,e,r){"use strict";r(19);var n=r(15),o=r(42),i=r(103),u=r(18),a=r(28),c=r(57),s=a("species"),l=RegExp.prototype;t.exports=function(t,e,r,f){var p=a(t),h=!u((function(){var e={};return e[p]=function(){return 7},7!=""[t](e)})),d=h&&!u((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[s]=function(){return r},r.flags="",r[p]=/./[p]),r.exec=function(){return e=!0,null},r[p](""),!e}));if(!h||!d||r){var y=n(/./[p]),v=e(p,""[t],(function(t,e,r,o,u){var a=n(t),c=e.exec;return c===i||c===l.exec?h&&!u?{done:!0,value:y(e,r,o)}:{done:!0,value:a(r,e,o)}:{done:!1}}));o(String.prototype,t,v[0]),o(l,p,v[1])}f&&c(l[p],"sham",!0)}},function(t,e,r){"use strict";var n=r(151).charAt;t.exports=function(t,e,r){return e+(r?n(t,e).length:1)}},function(t,e,r){var n=r(7),o=r(34),i=r(32),u=r(30),a=r(51),c=r(103),s=n.TypeError;t.exports=function(t,e){var r=t.exec;if(u(r)){var n=o(r,t,e);return null!==n&&i(n),n}if("RegExp"===a(t))return o(c,t,e);throw s("RegExp#exec called on incompatible receiver")}},function(t,e,r){"use strict";var n=r(76),o=r(34),i=r(15),u=r(123),a=r(18),c=r(32),s=r(30),l=r(59),f=r(94),p=r(39),h=r(44),d=r(124),y=r(62),v=r(201),g=r(125),b=r(28)("replace"),m=Math.max,O=Math.min,_=i([].concat),w=i([].push),j=i("".indexOf),x=i("".slice),E="$0"==="a".replace(/./,"$0"),S=!!/./[b]&&""===/./[b]("a","$0");u("replace",(function(t,e,r){var i=S?"$":"$0";return[function(t,r){var n=h(this),i=null==t?void 0:y(t,b);return i?o(i,t,n,r):o(e,p(n),t,r)},function(t,o){var u=c(this),a=p(t);if("string"==typeof o&&-1===j(o,i)&&-1===j(o,"$<")){var h=r(e,u,a,o);if(h.done)return h.value}var y=s(o);y||(o=p(o));var b=u.global;if(b){var E=u.unicode;u.lastIndex=0}for(var S=[];;){var P=g(u,a);if(null===P)break;if(w(S,P),!b)break;""===p(P[0])&&(u.lastIndex=d(a,f(u.lastIndex),E))}for(var A,k="",D=0,T=0;T<S.length;T++){for(var M=p((P=S[T])[0]),N=m(O(l(P.index),a.length),0),C=[],R=1;R<P.length;R++)w(C,void 0===(A=P[R])?A:String(A));var I=P.groups;if(y){var L=_([M],C,N,a);void 0!==I&&w(L,I);var z=p(n(o,void 0,L))}else z=v(M,a,N,C,I,o);N>=D&&(k+=x(a,D,N)+z,D=N+M.length)}return k+x(a,D)}]}),!!a((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!E||S)},function(t,e,r){var n=r(16),o=Math.hypot,i=Math.abs,u=Math.sqrt;n({target:"Math",stat:!0,forced:!!o&&o(1/0,NaN)!==1/0},{hypot:function(t,e){for(var r,n,o=0,a=0,c=arguments.length,s=0;a<c;)s<(r=i(arguments[a++]))?(o=o*(n=s/r)*n+1,s=r):o+=r>0?(n=r/s)*n:r;return s===1/0?1/0:s*u(o)}})},function(t,e,r){var n=r(51),o=r(7);t.exports="process"==n(o.process)},function(t,e,r){r(16)({target:"Number",stat:!0},{MIN_SAFE_INTEGER:-9007199254740991})},function(t,e,r){(function(t,n){var o;
15
+ ***************************************************************************** */var P=function(){return P=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},P.apply(this,arguments)};function A(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}}function k(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u}function D(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(k(arguments[e]));return t}var T=Symbol("mobx did run lazy initializers"),M=Symbol("mobx pending decorators"),N={},C={};function R(t,e){var r=e?N:C;return r[t]||(r[t]={configurable:!0,enumerable:e,get:function(){return I(this),this[t]},set:function(e){I(this),this[t]=e}})}function I(t){var e,r;if(!0!==t[T]){var n=t[M];if(n){d(t,T,!0);var o=D(Object.getOwnPropertySymbols(n),Object.keys(n));try{for(var i=A(o),u=i.next();!u.done;u=i.next()){var a=n[u.value];a.propertyCreator(t,a.prop,a.descriptor,a.decoratorTarget,a.decoratorArguments)}}catch(t){e={error:t}}finally{try{u&&!u.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}}}}function L(t,e){return function(){var r,n=function(n,o,i,u){if(!0===u)return e(n,o,i,n,r),null;if(!Object.prototype.hasOwnProperty.call(n,M)){var a=n[M];d(n,M,P({},a))}return n[M][o]={prop:o,propertyCreator:e,descriptor:i,decoratorTarget:n,decoratorArguments:r},R(o,t)};return z(arguments)?(r=o,n.apply(null,arguments)):(r=Array.prototype.slice.call(arguments),n)}}function z(t){return(2===t.length||3===t.length)&&("string"==typeof t[1]||"symbol"==typeof t[1])||4===t.length&&!0===t[3]}function B(t,e,r){return xe(t)?t:Array.isArray(t)?Z.array(t,{name:r}):p(t)?Z.object(t,void 0,{name:r}):y(t)?Z.map(t,{name:r}):v(t)?Z.set(t,{name:r}):t}function U(t){return t}function F(e){c(e);var r=L(!0,(function(t,r,n,o,i){var u=n?n.initializer?n.initializer.call(t):n.value:void 0;lr(t).addObservableProp(r,u,e)})),n=(void 0!==t&&t.env,r);return n.enhancer=e,n}var H={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function X(t){return null==t?H:"string"==typeof t?{name:t,deep:!0,proxy:!0}:t}Object.freeze(H);var G=F(B),Y=F((function(t,e,r){return null==t||yr(t)||er(t)||ir(t)||cr(t)?t:Array.isArray(t)?Z.array(t,{name:r,deep:!1}):p(t)?Z.object(t,void 0,{name:r,deep:!1}):y(t)?Z.map(t,{name:r,deep:!1}):v(t)?Z.set(t,{name:r,deep:!1}):a(!1)})),V=F(U),W=F((function(t,e,r){return mr(t,e)?e:t}));function K(t){return t.defaultDecorator?t.defaultDecorator.enhancer:!1===t.deep?U:B}var $={box:function(t,e){arguments.length>2&&q("box");var r=X(e);return new St(t,K(r),r.name,!0,r.equals)},array:function(t,e){arguments.length>2&&q("array");var r=X(e);return Ze(t,K(r),r.name)},map:function(t,e){arguments.length>2&&q("map");var r=X(e);return new or(t,K(r),r.name)},set:function(t,e){arguments.length>2&&q("set");var r=X(e);return new ar(t,K(r),r.name)},object:function(t,e,r){"string"==typeof arguments[1]&&q("object");var n=X(r);if(!1===n.proxy)return fe({},t,e,n);var o=pe(n),i=fe({},void 0,void 0,n),u=He(i);return de(u,t,e,o),u},ref:V,shallow:Y,deep:G,struct:W},Z=function(t,e,r){if("string"==typeof arguments[1]||"symbol"==typeof arguments[1])return G.apply(null,arguments);if(xe(t))return t;var n=p(t)?Z.object(t,e,r):Array.isArray(t)?Z.array(t,e):y(t)?Z.map(t,e):v(t)?Z.set(t,e):t;if(n!==t)return n;a(!1)};function q(t){a("Expected one or two arguments to observable."+t+". Did you accidentally try to use observable."+t+" as decorator?")}Object.keys($).forEach((function(t){return Z[t]=$[t]}));var J,Q,tt=L(!1,(function(t,e,r,n,o){var i=r.get,u=r.set,a=o[0]||{};lr(t).addComputedProp(t,e,P({get:i,set:u,context:t},a))})),et=tt({equals:E.structural}),rt=function(t,e,r){if("string"==typeof e)return tt.apply(null,arguments);if(null!==t&&"object"==typeof t&&1===arguments.length)return tt.apply(null,arguments);var n="object"==typeof e?e:{};return n.get=t,n.set="function"==typeof e?e:n.set,n.name=n.name||t.name||"",new At(n)};rt.struct=et,function(t){t[t.NOT_TRACKING=-1]="NOT_TRACKING",t[t.UP_TO_DATE=0]="UP_TO_DATE",t[t.POSSIBLY_STALE=1]="POSSIBLY_STALE",t[t.STALE=2]="STALE"}(J||(J={})),function(t){t[t.NONE=0]="NONE",t[t.LOG=1]="LOG",t[t.BREAK=2]="BREAK"}(Q||(Q={}));var nt=function(t){this.cause=t};function ot(t){return t instanceof nt}function it(t){switch(t.dependenciesState){case J.UP_TO_DATE:return!1;case J.NOT_TRACKING:case J.STALE:return!0;case J.POSSIBLY_STALE:for(var e=dt(!0),r=ft(),n=t.observing,o=n.length,i=0;i<o;i++){var u=n[i];if(kt(u)){if(Rt.disableErrorBoundaries)u.get();else try{u.get()}catch(t){return pt(r),ht(e),!0}if(t.dependenciesState===J.STALE)return pt(r),ht(e),!0}}return yt(t),pt(r),ht(e),!1}}function ut(){return null!==Rt.trackingDerivation}function at(t){var e=t.observers.size>0;Rt.computationDepth>0&&e&&a(!1),Rt.allowStateChanges||!e&&"strict"!==Rt.enforceActions||a(!1)}function ct(t,e,r){var n=dt(!0);yt(t),t.newObserving=new Array(t.observing.length+100),t.unboundDepsCount=0,t.runId=++Rt.runId;var o,i=Rt.trackingDerivation;if(Rt.trackingDerivation=t,!0===Rt.disableErrorBoundaries)o=e.call(r);else try{o=e.call(r)}catch(t){o=new nt(t)}return Rt.trackingDerivation=i,function(t){for(var e=t.observing,r=t.observing=t.newObserving,n=J.UP_TO_DATE,o=0,i=t.unboundDepsCount,u=0;u<i;u++){0===(a=r[u]).diffValue&&(a.diffValue=1,o!==u&&(r[o]=a),o++),a.dependenciesState>n&&(n=a.dependenciesState)}r.length=o,t.newObserving=null,i=e.length;for(;i--;){0===(a=e[i]).diffValue&&Lt(a,t),a.diffValue=0}for(;o--;){var a;1===(a=r[o]).diffValue&&(a.diffValue=0,It(a,t))}n!==J.UP_TO_DATE&&(t.dependenciesState=n,t.onBecomeStale())}(t),ht(n),o}function st(t){var e=t.observing;t.observing=[];for(var r=e.length;r--;)Lt(e[r],t);t.dependenciesState=J.NOT_TRACKING}function lt(t){var e=ft();try{return t()}finally{pt(e)}}function ft(){var t=Rt.trackingDerivation;return Rt.trackingDerivation=null,t}function pt(t){Rt.trackingDerivation=t}function dt(t){var e=Rt.allowStateReads;return Rt.allowStateReads=t,e}function ht(t){Rt.allowStateReads=t}function yt(t){if(t.dependenciesState!==J.UP_TO_DATE){t.dependenciesState=J.UP_TO_DATE;for(var e=t.observing,r=e.length;r--;)e[r].lowestObserverState=J.UP_TO_DATE}}var vt=0,gt=1,bt=Object.getOwnPropertyDescriptor((function(){}),"name");bt&&bt.configurable;function mt(t,e,r){var n=function(){return Ot(t,e,r||this,arguments)};return n.isMobxAction=!0,n}function Ot(t,e,r,n){var o=_t(t,r,n);try{return e.apply(r,n)}catch(t){throw o.error=t,t}finally{wt(o)}}function _t(t,e,r){var n=0,o=ft();Bt();var i={prevDerivation:o,prevAllowStateChanges:xt(!0),prevAllowStateReads:dt(!0),notifySpy:false,startTime:n,actionId:gt++,parentActionId:vt};return vt=i.actionId,i}function wt(t){vt!==t.actionId&&a("invalid action stack. did you forget to finish an action?"),vt=t.parentActionId,void 0!==t.error&&(Rt.suppressReactionErrors=!0),Et(t.prevAllowStateChanges),ht(t.prevAllowStateReads),Ut(),pt(t.prevDerivation),t.notifySpy,Rt.suppressReactionErrors=!1}function jt(t,e){var r,n=xt(t);try{r=e()}finally{Et(n)}return r}function xt(t){var e=Rt.allowStateChanges;return Rt.allowStateChanges=t,e}function Et(t){Rt.allowStateChanges=t}var St=function(t){function e(e,r,n,o,i){void 0===n&&(n="ObservableValue@"+u()),void 0===o&&(o=!0),void 0===i&&(i=E.default);var a=t.call(this,n)||this;return a.enhancer=r,a.name=n,a.equals=i,a.hasUnreportedChange=!1,a.value=r(e,void 0,n),a}return function(t,e){function r(){this.constructor=t}S(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}(e,t),e.prototype.dehanceValue=function(t){return void 0!==this.dehancer?this.dehancer(t):t},e.prototype.set=function(t){this.value;if((t=this.prepareNewValue(t))!==Rt.UNCHANGED){false,this.setNewValue(t)}},e.prototype.prepareNewValue=function(t){if(at(this),Xe(this)){var e=Ye(this,{object:this,type:"update",newValue:t});if(!e)return Rt.UNCHANGED;t=e.newValue}return t=this.enhancer(t,this.value,this.name),this.equals(this.value,t)?Rt.UNCHANGED:t},e.prototype.setNewValue=function(t){var e=this.value;this.value=t,this.reportChanged(),Ve(this)&&Ke(this,{type:"update",object:this,newValue:t,oldValue:e})},e.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},e.prototype.intercept=function(t){return Ge(this,t)},e.prototype.observe=function(t,e){return e&&t({object:this,type:"update",newValue:this.value,oldValue:void 0}),We(this,t)},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.value+"]"},e.prototype.valueOf=function(){return m(this.get())},e.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},e}(w),Pt=h("ObservableValue",St),At=function(){function t(t){this.dependenciesState=J.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isBeingObserved=!1,this.isPendingUnobservation=!1,this.observers=new Set,this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=J.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+u(),this.value=new nt(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=Q.NONE,c(t.get,"missing option for computed: get"),this.derivation=t.get,this.name=t.name||"ComputedValue@"+u(),t.set&&(this.setter=mt(this.name+"-setter",t.set)),this.equals=t.equals||(t.compareStructural||t.struct?E.structural:E.default),this.scope=t.context,this.requiresReaction=!!t.requiresReaction,this.keepAlive=!!t.keepAlive}return t.prototype.onBecomeStale=function(){!function(t){if(t.lowestObserverState!==J.UP_TO_DATE)return;t.lowestObserverState=J.POSSIBLY_STALE,t.observers.forEach((function(e){e.dependenciesState===J.UP_TO_DATE&&(e.dependenciesState=J.POSSIBLY_STALE,e.isTracing!==Q.NONE&&Ht(e,t),e.onBecomeStale())}))}(this)},t.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach((function(t){return t()}))},t.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach((function(t){return t()}))},t.prototype.get=function(){this.isComputing&&a("Cycle detected in computation "+this.name+": "+this.derivation),0!==Rt.inBatch||0!==this.observers.size||this.keepAlive?(Ft(this),it(this)&&this.trackAndCompute()&&function(t){if(t.lowestObserverState===J.STALE)return;t.lowestObserverState=J.STALE,t.observers.forEach((function(e){e.dependenciesState===J.POSSIBLY_STALE?e.dependenciesState=J.STALE:e.dependenciesState===J.UP_TO_DATE&&(t.lowestObserverState=J.UP_TO_DATE)}))}(this)):it(this)&&(this.warnAboutUntrackedRead(),Bt(),this.value=this.computeValue(!1),Ut());var t=this.value;if(ot(t))throw t.cause;return t},t.prototype.peek=function(){var t=this.computeValue(!1);if(ot(t))throw t.cause;return t},t.prototype.set=function(t){if(this.setter){c(!this.isRunningSetter,"The setter of computed value '"+this.name+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"),this.isRunningSetter=!0;try{this.setter.call(this.scope,t)}finally{this.isRunningSetter=!1}}else c(!1,!1)},t.prototype.trackAndCompute=function(){var t=this.value,e=this.dependenciesState===J.NOT_TRACKING,r=this.computeValue(!0),n=e||ot(t)||ot(r)||!this.equals(t,r);return n&&(this.value=r),n},t.prototype.computeValue=function(t){var e;if(this.isComputing=!0,Rt.computationDepth++,t)e=ct(this,this.derivation,this.scope);else if(!0===Rt.disableErrorBoundaries)e=this.derivation.call(this.scope);else try{e=this.derivation.call(this.scope)}catch(t){e=new nt(t)}return Rt.computationDepth--,this.isComputing=!1,e},t.prototype.suspend=function(){this.keepAlive||(st(this),this.value=void 0)},t.prototype.observe=function(t,e){var r=this,n=!0,o=void 0;return oe((function(){var i=r.get();if(!n||e){var u=ft();t({type:"update",object:r,newValue:i,oldValue:o}),pt(u)}n=!1,o=i}))},t.prototype.warnAboutUntrackedRead=function(){},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},t.prototype.valueOf=function(){return m(this.get())},t.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},t}(),kt=h("ComputedValue",At),Dt=function(){this.version=5,this.UNCHANGED={},this.trackingDerivation=null,this.computationDepth=0,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!0,this.allowStateReads=!0,this.enforceActions=!1,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.computedConfigurable=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1},Tt={};function Mt(){return"undefined"!=typeof window?window:void 0!==n?n:"undefined"!=typeof self?self:Tt}var Nt=!0,Ct=!1,Rt=function(){var t=Mt();return t.__mobxInstanceCount>0&&!t.__mobxGlobals&&(Nt=!1),t.__mobxGlobals&&t.__mobxGlobals.version!==(new Dt).version&&(Nt=!1),Nt?t.__mobxGlobals?(t.__mobxInstanceCount+=1,t.__mobxGlobals.UNCHANGED||(t.__mobxGlobals.UNCHANGED={}),t.__mobxGlobals):(t.__mobxInstanceCount=1,t.__mobxGlobals=new Dt):(setTimeout((function(){Ct||a("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")}),1),new Dt)}();function It(t,e){t.observers.add(e),t.lowestObserverState>e.dependenciesState&&(t.lowestObserverState=e.dependenciesState)}function Lt(t,e){t.observers.delete(e),0===t.observers.size&&zt(t)}function zt(t){!1===t.isPendingUnobservation&&(t.isPendingUnobservation=!0,Rt.pendingUnobservations.push(t))}function Bt(){Rt.inBatch++}function Ut(){if(0==--Rt.inBatch){Vt();for(var t=Rt.pendingUnobservations,e=0;e<t.length;e++){var r=t[e];r.isPendingUnobservation=!1,0===r.observers.size&&(r.isBeingObserved&&(r.isBeingObserved=!1,r.onBecomeUnobserved()),r instanceof At&&r.suspend())}Rt.pendingUnobservations=[]}}function Ft(t){var e=Rt.trackingDerivation;return null!==e?(e.runId!==t.lastAccessedBy&&(t.lastAccessedBy=e.runId,e.newObserving[e.unboundDepsCount++]=t,t.isBeingObserved||(t.isBeingObserved=!0,t.onBecomeObserved())),!0):(0===t.observers.size&&Rt.inBatch>0&&zt(t),!1)}function Ht(t,e){if(t.isTracing===Q.BREAK){var r=[];Xt(he(t),r,1),new Function("debugger;\n/*\nTracing '"+t.name+"'\n\nYou are entering this break point because derivation '"+t.name+"' is being traced and '"+e.name+"' is now forcing it to update.\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\n\n"+(t instanceof At?t.derivation.toString().replace(/[*]\//g,"/"):"")+"\n\nThe dependencies for this derivation are:\n\n"+r.join("\n")+"\n*/\n ")()}}function Xt(t,e,r){e.length>=1e3?e.push("(and many more)"):(e.push(""+new Array(r).join("\t")+t.name),t.dependencies&&t.dependencies.forEach((function(t){return Xt(t,e,r+1)})))}var Gt=function(){function t(t,e,r,n){void 0===t&&(t="Reaction@"+u()),void 0===n&&(n=!1),this.name=t,this.onInvalidate=e,this.errorHandler=r,this.requiresObservable=n,this.observing=[],this.newObserving=[],this.dependenciesState=J.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+u(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=Q.NONE}return t.prototype.onBecomeStale=function(){this.schedule()},t.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,Rt.pendingReactions.push(this),Vt())},t.prototype.isScheduled=function(){return this._isScheduled},t.prototype.runReaction=function(){if(!this.isDisposed){if(Bt(),this._isScheduled=!1,it(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending}catch(t){this.reportExceptionInDerivation(t)}}Ut()}},t.prototype.track=function(t){if(!this.isDisposed){Bt();false,this._isRunning=!0;var e=ct(this,t,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&st(this),ot(e)&&this.reportExceptionInDerivation(e.cause),Ut()}},t.prototype.reportExceptionInDerivation=function(t){var e=this;if(this.errorHandler)this.errorHandler(t,this);else{if(Rt.disableErrorBoundaries)throw t;Rt.suppressReactionErrors,Rt.globalReactionErrorHandlers.forEach((function(r){return r(t,e)}))}},t.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(Bt(),st(this),Ut()))},t.prototype.getDisposer=function(){var t=this.dispose.bind(this);return t[_]=this,t},t.prototype.toString=function(){return"Reaction["+this.name+"]"},t.prototype.trace=function(t){void 0===t&&(t=!1),function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=!1;"boolean"==typeof t[t.length-1]&&(r=t.pop());var n=Ce(t);if(!n)return a(!1);n.isTracing,Q.NONE;n.isTracing=r?Q.BREAK:Q.LOG}(this,t)},t}();var Yt=function(t){return t()};function Vt(){Rt.inBatch>0||Rt.isRunningReactions||Yt(Wt)}function Wt(){Rt.isRunningReactions=!0;for(var t=Rt.pendingReactions,e=0;t.length>0;){100==++e&&t.splice(0);for(var r=t.splice(0),n=0,o=r.length;n<o;n++)r[n].runReaction()}Rt.isRunningReactions=!1}var Kt=h("Reaction",Gt);function $t(t){var e=Yt;Yt=function(r){return t((function(){return e(r)}))}}function Zt(t){return function(){}}function qt(){a(!1)}function Jt(t){return function(e,r,n){if(n){if(n.value)return{value:mt(t,n.value),enumerable:!1,configurable:!0,writable:!0};var o=n.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return mt(t,o.call(this))}}}return Qt(t).apply(this,arguments)}}function Qt(t){return function(e,r,n){Object.defineProperty(e,r,{configurable:!0,enumerable:!1,get:function(){},set:function(e){d(this,r,te(t,e))}})}}var te=function(t,e,r,n){return 1===arguments.length&&"function"==typeof t?mt(t.name||"<unnamed action>",t):2===arguments.length&&"function"==typeof e?mt(t,e):1===arguments.length&&"string"==typeof t?Jt(t):!0!==n?Jt(e).apply(null,arguments):void d(t,e,mt(t.name||e,r.value,this))};function ee(t,e){return Ot("string"==typeof t?t:t.name||"<unnamed action>","function"==typeof t?t:e,this,void 0)}function re(t){return"function"==typeof t&&!0===t.isMobxAction}function ne(t,e,r){d(t,e,mt(e,r.bind(t)))}function oe(t,e){void 0===e&&(e=i);var r,n=e&&e.name||t.name||"Autorun@"+u();if(!e.scheduler&&!e.delay)r=new Gt(n,(function(){this.track(c)}),e.onError,e.requiresObservable);else{var o=ue(e),a=!1;r=new Gt(n,(function(){a||(a=!0,o((function(){a=!1,r.isDisposed||r.track(c)})))}),e.onError,e.requiresObservable)}function c(){t(r)}return r.schedule(),r.getDisposer()}te.bound=function(t,e,r,n){return!0===n?(ne(t,e,r.value),null):r?{configurable:!0,enumerable:!1,get:function(){return ne(this,e,r.value||r.initializer.call(this)),this[e]},set:qt}:{enumerable:!1,configurable:!0,set:function(t){ne(this,e,t)},get:function(){}}};var ie=function(t){return t()};function ue(t){return t.scheduler?t.scheduler:t.delay?function(e){return setTimeout(e,t.delay)}:ie}function ae(t,e,r){void 0===r&&(r=i);var n,o,a,c=r.name||"Reaction@"+u(),s=te(c,r.onError?(n=r.onError,o=e,function(){try{return o.apply(this,arguments)}catch(t){n.call(this,t)}}):e),l=!r.scheduler&&!r.delay,f=ue(r),p=!0,d=!1,h=r.compareStructural?E.structural:r.equals||E.default,y=new Gt(c,(function(){p||l?v():d||(d=!0,f(v))}),r.onError,r.requiresObservable);function v(){if(d=!1,!y.isDisposed){var e=!1;y.track((function(){var r=t(y);e=p||!h(a,r),a=r})),p&&r.fireImmediately&&s(a,y),p||!0!==e||s(a,y),p&&(p=!1)}}return y.schedule(),y.getDisposer()}function ce(t,e,r){return se("onBecomeUnobserved",t,e,r)}function se(t,e,r,n){var o="function"==typeof n?vr(e,r):vr(e),i="function"==typeof n?n:r,u=t+"Listeners";return o[u]?o[u].add(i):o[u]=new Set([i]),"function"!=typeof o[t]?a(!1):function(){var t=o[u];t&&(t.delete(i),0===t.size&&delete o[u])}}function le(t){var e=t.enforceActions,r=t.computedRequiresReaction,n=t.computedConfigurable,o=t.disableErrorBoundaries,i=t.reactionScheduler,u=t.reactionRequiresObservable,c=t.observableRequiresReaction;if(!0===t.isolateGlobalState&&((Rt.pendingReactions.length||Rt.inBatch||Rt.isRunningReactions)&&a("isolateGlobalState should be called before MobX is running any reactions"),Ct=!0,Nt&&(0==--Mt().__mobxInstanceCount&&(Mt().__mobxGlobals=void 0),Rt=new Dt)),void 0!==e){var s=void 0;switch(e){case!0:case"observed":s=!0;break;case!1:case"never":s=!1;break;case"strict":case"always":s="strict";break;default:a("Invalid value for 'enforceActions': '"+e+"', expected 'never', 'always' or 'observed'")}Rt.enforceActions=s,Rt.allowStateChanges=!0!==s&&"strict"!==s}void 0!==r&&(Rt.computedRequiresReaction=!!r),void 0!==u&&(Rt.reactionRequiresObservable=!!u),void 0!==c&&(Rt.observableRequiresReaction=!!c,Rt.allowStateReads=!Rt.observableRequiresReaction),void 0!==n&&(Rt.computedConfigurable=!!n),void 0!==o&&(Rt.disableErrorBoundaries=!!o),i&&$t(i)}function fe(t,e,r,n){var o=pe(n=X(n));return I(t),lr(t,n.name,o.enhancer),e&&de(t,e,r,o),t}function pe(t){return t.defaultDecorator||(!1===t.deep?V:G)}function de(t,e,r,n){var o,i;Bt();try{var u=O(e);try{for(var a=A(u),c=a.next();!c.done;c=a.next()){var s=c.value,l=Object.getOwnPropertyDescriptor(e,s);0;var f=(r&&s in r?r[s]:l.get?tt:n)(t,s,l,!0);f&&Object.defineProperty(t,s,f)}}catch(t){o={error:t}}finally{try{c&&!c.done&&(i=a.return)&&i.call(a)}finally{if(o)throw o.error}}}finally{Ut()}}function he(t,e){return ye(vr(t,e))}function ye(t){var e,r,n={name:t.name};return t.observing&&t.observing.length>0&&(n.dependencies=(e=t.observing,r=[],e.forEach((function(t){-1===r.indexOf(t)&&r.push(t)})),r).map(ye)),n}var ve=0;function ge(){this.message="FLOW_CANCELLED"}function be(t){1!==arguments.length&&a("Flow expects 1 argument and cannot be used as decorator");var e=t.name||"<unnamed flow>";return function(){var r,n=this,o=arguments,i=++ve,u=te(e+" - runid: "+i+" - init",t).apply(n,o),a=void 0,c=new Promise((function(t,n){var o=0;function c(t){var r;a=void 0;try{r=te(e+" - runid: "+i+" - yield "+o++,u.next).call(u,t)}catch(t){return n(t)}l(r)}function s(t){var r;a=void 0;try{r=te(e+" - runid: "+i+" - yield "+o++,u.throw).call(u,t)}catch(t){return n(t)}l(r)}function l(e){if(!e||"function"!=typeof e.then)return e.done?t(e.value):(a=Promise.resolve(e.value)).then(c,s);e.then(l,n)}r=n,c(void 0)}));return c.cancel=te(e+" - runid: "+i+" - cancel",(function(){try{a&&me(a);var t=u.return(void 0),e=Promise.resolve(t.value);e.then(l,l),me(e),r(new ge)}catch(t){r(t)}})),c}}function me(t){"function"==typeof t.cancel&&t.cancel()}function Oe(t,e){if(null==t)return!1;if(void 0!==e){if(!1===yr(t))return!1;if(!t[_].values.has(e))return!1;var r=vr(t,e);return kt(r)}return kt(t)}function _e(t){return arguments.length>1?a(!1):Oe(t)}function we(t,e){return"string"!=typeof e?a(!1):Oe(t,e)}function je(t,e){return null!=t&&(void 0!==e?!!yr(t)&&t[_].values.has(e):yr(t)||!!t[_]||j(t)||Kt(t)||kt(t))}function xe(t){return 1!==arguments.length&&a(!1),je(t)}function Ee(t){return yr(t)?t[_].getKeys():ir(t)||cr(t)?Array.from(t.keys()):er(t)?t.map((function(t,e){return e})):a(!1)}function Se(t){return yr(t)?Ee(t).map((function(e){return t[e]})):ir(t)?Ee(t).map((function(e){return t.get(e)})):cr(t)?Array.from(t.values()):er(t)?t.slice():a(!1)}function Pe(t){return yr(t)?Ee(t).map((function(e){return[e,t[e]]})):ir(t)?Ee(t).map((function(e){return[e,t.get(e)]})):cr(t)?Array.from(t.entries()):er(t)?t.map((function(t,e){return[e,t]})):a(!1)}function Ae(t,e,r){if(2!==arguments.length||cr(t))if(yr(t)){var n=t[_],o=n.values.get(e);o?n.write(e,r):n.addObservableProp(e,r,n.defaultEnhancer)}else if(ir(t))t.set(e,r);else if(cr(t))t.add(e);else{if(!er(t))return a(!1);"number"!=typeof e&&(e=parseInt(e,10)),c(e>=0,"Not a valid index: '"+e+"'"),Bt(),e>=t.length&&(t.length=e+1),t[e]=r,Ut()}else{Bt();var i=e;try{for(var u in i)Ae(t,u,i[u])}finally{Ut()}}}function ke(t,e,r,n){return"function"==typeof r?function(t,e,r,n){return gr(t,e).observe(r,n)}(t,e,r,n):function(t,e,r){return gr(t).observe(e,r)}(t,e,r)}ge.prototype=Object.create(Error.prototype);var De={detectCycles:!0,exportMapsAsObjects:!0,recurseEverything:!1};function Te(t,e,r,n){return n.detectCycles&&t.set(e,r),r}function Me(t,e,r){if(!e.recurseEverything&&!xe(t))return t;if("object"!=typeof t)return t;if(null===t)return null;if(t instanceof Date)return t;if(Pt(t))return Me(t.get(),e,r);if(xe(t)&&Ee(t),!0===e.detectCycles&&null!==t&&r.has(t))return r.get(t);if(er(t)||Array.isArray(t)){var n=Te(r,t,[],e),o=t.map((function(t){return Me(t,e,r)}));n.length=o.length;for(var i=0,u=o.length;i<u;i++)n[i]=o[i];return n}if(cr(t)||Object.getPrototypeOf(t)===Set.prototype){if(!1===e.exportMapsAsObjects){var a=Te(r,t,new Set,e);return t.forEach((function(t){a.add(Me(t,e,r))})),a}var c=Te(r,t,[],e);return t.forEach((function(t){c.push(Me(t,e,r))})),c}if(ir(t)||Object.getPrototypeOf(t)===Map.prototype){if(!1===e.exportMapsAsObjects){var s=Te(r,t,new Map,e);return t.forEach((function(t,n){s.set(n,Me(t,e,r))})),s}var l=Te(r,t,{},e);return t.forEach((function(t,n){l[n]=Me(t,e,r)})),l}var f=Te(r,t,{},e);return g(t).forEach((function(n){f[n]=Me(t[n],e,r)})),f}function Ne(t,e){var r;return"boolean"==typeof e&&(e={detectCycles:e}),e||(e=De),e.detectCycles=void 0===e.detectCycles?!0===e.recurseEverything:!0===e.detectCycles,e.detectCycles&&(r=new Map),Me(t,e,r)}function Ce(t){switch(t.length){case 0:return Rt.trackingDerivation;case 1:return vr(t[0]);case 2:return vr(t[0],t[1])}}function Re(t,e){void 0===e&&(e=void 0),Bt();try{return t.apply(e)}finally{Ut()}}function Ie(t,e,r){return 1===arguments.length||e&&"object"==typeof e?ze(t,e):Le(t,e,r||{})}function Le(t,e,r){var n;"number"==typeof r.timeout&&(n=setTimeout((function(){if(!i[_].isDisposed){i();var t=new Error("WHEN_TIMEOUT");if(!r.onError)throw t;r.onError(t)}}),r.timeout)),r.name=r.name||"When@"+u();var o=mt(r.name+"-effect",e),i=oe((function(e){t()&&(e.dispose(),n&&clearTimeout(n),o())}),r);return i}function ze(t,e){var r;var n=new Promise((function(n,o){var i=Le(t,n,P(P({},e),{onError:o}));r=function(){i(),o("WHEN_CANCELLED")}}));return n.cancel=r,n}function Be(t){return t[_]}function Ue(t){return"string"==typeof t||"number"==typeof t||"symbol"==typeof t}var Fe={has:function(t,e){if(e===_||"constructor"===e||e===T)return!0;var r=Be(t);return Ue(e)?r.has(e):e in t},get:function(t,e){if(e===_||"constructor"===e||e===T)return t[e];var r=Be(t),n=r.values.get(e);if(n instanceof w){var o=n.get();return void 0===o&&r.has(e),o}return Ue(e)&&r.has(e),t[e]},set:function(t,e,r){return!!Ue(e)&&(Ae(t,e,r),!0)},deleteProperty:function(t,e){return!!Ue(e)&&(Be(t).remove(e),!0)},ownKeys:function(t){return Be(t).keysAtom.reportObserved(),Reflect.ownKeys(t)},preventExtensions:function(t){return a("Dynamic observable objects cannot be frozen"),!1}};function He(t){var e=new Proxy(t,Fe);return t[_].proxy=e,e}function Xe(t){return void 0!==t.interceptors&&t.interceptors.length>0}function Ge(t,e){var r=t.interceptors||(t.interceptors=[]);return r.push(e),s((function(){var t=r.indexOf(e);-1!==t&&r.splice(t,1)}))}function Ye(t,e){var r=ft();try{for(var n=D(t.interceptors||[]),o=0,i=n.length;o<i&&(c(!(e=n[o](e))||e.type,"Intercept handlers should return nothing or a change object"),e);o++);return e}finally{pt(r)}}function Ve(t){return void 0!==t.changeListeners&&t.changeListeners.length>0}function We(t,e){var r=t.changeListeners||(t.changeListeners=[]);return r.push(e),s((function(){var t=r.indexOf(e);-1!==t&&r.splice(t,1)}))}function Ke(t,e){var r=ft(),n=t.changeListeners;if(n){for(var o=0,i=(n=n.slice()).length;o<i;o++)n[o](e);pt(r)}}var $e={get:function(t,e){return e===_?t[_]:"length"===e?t[_].getArrayLength():"number"==typeof e?Je.get.call(t,e):"string"!=typeof e||isNaN(e)?Je.hasOwnProperty(e)?Je[e]:t[e]:Je.get.call(t,parseInt(e))},set:function(t,e,r){return"length"===e&&t[_].setArrayLength(r),"number"==typeof e&&Je.set.call(t,e,r),"symbol"==typeof e||isNaN(e)?t[e]=r:Je.set.call(t,parseInt(e),r),!0},preventExtensions:function(t){return a("Observable arrays cannot be frozen"),!1}};function Ze(t,e,r,n){void 0===r&&(r="ObservableArray@"+u()),void 0===n&&(n=!1);var o,i,a,c=new qe(r,e,n);o=c.values,i=_,a=c,Object.defineProperty(o,i,{enumerable:!1,writable:!1,configurable:!0,value:a});var s=new Proxy(c.values,$e);if(c.proxy=s,t&&t.length){var l=xt(!0);c.spliceWithArray(0,0,t),Et(l)}return s}var qe=function(){function t(t,e,r){this.owned=r,this.values=[],this.proxy=void 0,this.lastKnownLength=0,this.atom=new w(t||"ObservableArray@"+u()),this.enhancer=function(r,n){return e(r,n,t+"[..]")}}return t.prototype.dehanceValue=function(t){return void 0!==this.dehancer?this.dehancer(t):t},t.prototype.dehanceValues=function(t){return void 0!==this.dehancer&&t.length>0?t.map(this.dehancer):t},t.prototype.intercept=function(t){return Ge(this,t)},t.prototype.observe=function(t,e){return void 0===e&&(e=!1),e&&t({object:this.proxy,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),We(this,t)},t.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},t.prototype.setArrayLength=function(t){if("number"!=typeof t||t<0)throw new Error("[mobx.array] Out of range: "+t);var e=this.values.length;if(t!==e)if(t>e){for(var r=new Array(t-e),n=0;n<t-e;n++)r[n]=void 0;this.spliceWithArray(e,0,r)}else this.spliceWithArray(t,e-t)},t.prototype.updateArrayLength=function(t,e){if(t!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed.");this.lastKnownLength+=e},t.prototype.spliceWithArray=function(t,e,r){var n=this;at(this.atom);var i=this.values.length;if(void 0===t?t=0:t>i?t=i:t<0&&(t=Math.max(0,i+t)),e=1===arguments.length?i-t:null==e?0:Math.max(0,Math.min(e,i-t)),void 0===r&&(r=o),Xe(this)){var u=Ye(this,{object:this.proxy,type:"splice",index:t,removedCount:e,added:r});if(!u)return o;e=u.removedCount,r=u.added}r=0===r.length?r:r.map((function(t){return n.enhancer(t,void 0)}));var a=this.spliceItemsIntoValues(t,e,r);return 0===e&&0===r.length||this.notifyArraySplice(t,r,a),this.dehanceValues(a)},t.prototype.spliceItemsIntoValues=function(t,e,r){var n;if(r.length<1e4)return(n=this.values).splice.apply(n,D([t,e],r));var o=this.values.slice(t,t+e);return this.values=this.values.slice(0,t).concat(r,this.values.slice(t+e)),o},t.prototype.notifyArrayChildUpdate=function(t,e,r){var n=!this.owned&&!1,o=Ve(this),i=o||n?{object:this.proxy,type:"update",index:t,newValue:e,oldValue:r}:null;this.atom.reportChanged(),o&&Ke(this,i)},t.prototype.notifyArraySplice=function(t,e,r){var n=!this.owned&&!1,o=Ve(this),i=o||n?{object:this.proxy,type:"splice",index:t,removed:r,added:e,removedCount:r.length,addedCount:e.length}:null;this.atom.reportChanged(),o&&Ke(this,i)},t}(),Je={intercept:function(t){return this[_].intercept(t)},observe:function(t,e){return void 0===e&&(e=!1),this[_].observe(t,e)},clear:function(){return this.splice(0)},replace:function(t){var e=this[_];return e.spliceWithArray(0,e.values.length,t)},toJS:function(){return this.slice()},toJSON:function(){return this.toJS()},splice:function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=this[_];switch(arguments.length){case 0:return[];case 1:return o.spliceWithArray(t);case 2:return o.spliceWithArray(t,e)}return o.spliceWithArray(t,e,r)},spliceWithArray:function(t,e,r){return this[_].spliceWithArray(t,e,r)},push:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=this[_];return r.spliceWithArray(r.values.length,0,t),r.values.length},pop:function(){return this.splice(Math.max(this[_].values.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=this[_];return r.spliceWithArray(0,0,t),r.values.length},reverse:function(){var t=this.slice();return t.reverse.apply(t,arguments)},sort:function(t){var e=this.slice();return e.sort.apply(e,arguments)},remove:function(t){var e=this[_],r=e.dehanceValues(e.values).indexOf(t);return r>-1&&(this.splice(r,1),!0)},get:function(t){var e=this[_];if(e&&t<e.values.length)return e.atom.reportObserved(),e.dehanceValue(e.values[t])},set:function(t,e){var r=this[_],n=r.values;if(t<n.length){at(r.atom);var o=n[t];if(Xe(r)){var i=Ye(r,{type:"update",object:r.proxy,index:t,newValue:e});if(!i)return;e=i.newValue}(e=r.enhancer(e,o))!==o&&(n[t]=e,r.notifyArrayChildUpdate(t,e,o))}else{if(t!==n.length)throw new Error("[mobx.array] Index out of bounds, "+t+" is larger than "+n.length);r.spliceWithArray(t,0,[e])}}};["concat","flat","includes","indexOf","join","lastIndexOf","slice","toString","toLocaleString"].forEach((function(t){"function"==typeof Array.prototype[t]&&(Je[t]=function(){var e=this[_];e.atom.reportObserved();var r=e.dehanceValues(e.values);return r[t].apply(r,arguments)})})),["every","filter","find","findIndex","flatMap","forEach","map","some"].forEach((function(t){"function"==typeof Array.prototype[t]&&(Je[t]=function(e,r){var n=this,o=this[_];return o.atom.reportObserved(),o.dehanceValues(o.values)[t]((function(t,o){return e.call(r,t,o,n)}),r)})})),["reduce","reduceRight"].forEach((function(t){Je[t]=function(){var e=this,r=this[_];r.atom.reportObserved();var n=arguments[0];return arguments[0]=function(t,o,i){return o=r.dehanceValue(o),n(t,o,i,e)},r.values[t].apply(r.values,arguments)}}));var Qe,tr=h("ObservableArrayAdministration",qe);function er(t){return f(t)&&tr(t[_])}var rr,nr={},or=function(){function t(t,e,r){if(void 0===e&&(e=B),void 0===r&&(r="ObservableMap@"+u()),this.enhancer=e,this.name=r,this[Qe]=nr,this._keysAtom=x(this.name+".keys()"),this[Symbol.toStringTag]="Map","function"!=typeof Map)throw new Error("mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js");this._data=new Map,this._hasMap=new Map,this.merge(t)}return t.prototype._has=function(t){return this._data.has(t)},t.prototype.has=function(t){var e=this;if(!Rt.trackingDerivation)return this._has(t);var r=this._hasMap.get(t);if(!r){var n=r=new St(this._has(t),U,this.name+"."+b(t)+"?",!1);this._hasMap.set(t,n),ce(n,(function(){return e._hasMap.delete(t)}))}return r.get()},t.prototype.set=function(t,e){var r=this._has(t);if(Xe(this)){var n=Ye(this,{type:r?"update":"add",object:this,newValue:e,name:t});if(!n)return this;e=n.newValue}return r?this._updateValue(t,e):this._addValue(t,e),this},t.prototype.delete=function(t){var e=this;if((at(this._keysAtom),Xe(this))&&!(n=Ye(this,{type:"delete",object:this,name:t})))return!1;if(this._has(t)){var r=Ve(this),n=r?{type:"delete",object:this,oldValue:this._data.get(t).value,name:t}:null;return Re((function(){e._keysAtom.reportChanged(),e._updateHasMapEntry(t,!1),e._data.get(t).setNewValue(void 0),e._data.delete(t)})),r&&Ke(this,n),!0}return!1},t.prototype._updateHasMapEntry=function(t,e){var r=this._hasMap.get(t);r&&r.setNewValue(e)},t.prototype._updateValue=function(t,e){var r=this._data.get(t);if((e=r.prepareNewValue(e))!==Rt.UNCHANGED){var n=!1,o=Ve(this),i=o?{type:"update",object:this,oldValue:r.value,name:t,newValue:e}:null;n,r.setNewValue(e),o&&Ke(this,i)}},t.prototype._addValue=function(t,e){var r=this;at(this._keysAtom),Re((function(){var n=new St(e,r.enhancer,r.name+"."+b(t),!1);r._data.set(t,n),e=n.value,r._updateHasMapEntry(t,!0),r._keysAtom.reportChanged()}));var n=!1,o=Ve(this),i=o?{type:"add",object:this,name:t,newValue:e}:null;o&&Ke(this,i)},t.prototype.get=function(t){return this.has(t)?this.dehanceValue(this._data.get(t).get()):this.dehanceValue(void 0)},t.prototype.dehanceValue=function(t){return void 0!==this.dehancer?this.dehancer(t):t},t.prototype.keys=function(){return this._keysAtom.reportObserved(),this._data.keys()},t.prototype.values=function(){var t=this,e=this.keys();return jr({next:function(){var r=e.next(),n=r.done,o=r.value;return{done:n,value:n?void 0:t.get(o)}}})},t.prototype.entries=function(){var t=this,e=this.keys();return jr({next:function(){var r=e.next(),n=r.done,o=r.value;return{done:n,value:n?void 0:[o,t.get(o)]}}})},t.prototype[(Qe=_,Symbol.iterator)]=function(){return this.entries()},t.prototype.forEach=function(t,e){var r,n;try{for(var o=A(this),i=o.next();!i.done;i=o.next()){var u=k(i.value,2),a=u[0],c=u[1];t.call(e,c,a,this)}}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}},t.prototype.merge=function(t){var e=this;return ir(t)&&(t=t.toJS()),Re((function(){var r=xt(!0);try{p(t)?g(t).forEach((function(r){return e.set(r,t[r])})):Array.isArray(t)?t.forEach((function(t){var r=k(t,2),n=r[0],o=r[1];return e.set(n,o)})):y(t)?(t.constructor!==Map&&a("Cannot initialize from classes that inherit from Map: "+t.constructor.name),t.forEach((function(t,r){return e.set(r,t)}))):null!=t&&a("Cannot initialize map from "+t)}finally{Et(r)}})),this},t.prototype.clear=function(){var t=this;Re((function(){lt((function(){var e,r;try{for(var n=A(t.keys()),o=n.next();!o.done;o=n.next()){var i=o.value;t.delete(i)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}}))}))},t.prototype.replace=function(t){var e=this;return Re((function(){var r,n,o,i,u=function(t){if(y(t)||ir(t))return t;if(Array.isArray(t))return new Map(t);if(p(t)){var e=new Map;for(var r in t)e.set(r,t[r]);return e}return a("Cannot convert to map from '"+t+"'")}(t),c=new Map,s=!1;try{for(var l=A(e._data.keys()),f=l.next();!f.done;f=l.next()){var d=f.value;if(!u.has(d))if(e.delete(d))s=!0;else{var h=e._data.get(d);c.set(d,h)}}}catch(t){r={error:t}}finally{try{f&&!f.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}try{for(var v=A(u.entries()),g=v.next();!g.done;g=v.next()){var b=k(g.value,2),m=(d=b[0],h=b[1],e._data.has(d));if(e.set(d,h),e._data.has(d)){var O=e._data.get(d);c.set(d,O),m||(s=!0)}}}catch(t){o={error:t}}finally{try{g&&!g.done&&(i=v.return)&&i.call(v)}finally{if(o)throw o.error}}if(!s)if(e._data.size!==c.size)e._keysAtom.reportChanged();else for(var _=e._data.keys(),w=c.keys(),j=_.next(),x=w.next();!j.done;){if(j.value!==x.value){e._keysAtom.reportChanged();break}j=_.next(),x=w.next()}e._data=c})),this},Object.defineProperty(t.prototype,"size",{get:function(){return this._keysAtom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),t.prototype.toPOJO=function(){var t,e,r={};try{for(var n=A(this),o=n.next();!o.done;o=n.next()){var i=k(o.value,2),u=i[0],a=i[1];r["symbol"==typeof u?u:b(u)]=a}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return r},t.prototype.toJS=function(){return new Map(this)},t.prototype.toJSON=function(){return this.toPOJO()},t.prototype.toString=function(){var t=this;return this.name+"[{ "+Array.from(this.keys()).map((function(e){return b(e)+": "+t.get(e)})).join(", ")+" }]"},t.prototype.observe=function(t,e){return We(this,t)},t.prototype.intercept=function(t){return Ge(this,t)},t}(),ir=h("ObservableMap",or),ur={},ar=function(){function t(t,e,r){if(void 0===e&&(e=B),void 0===r&&(r="ObservableSet@"+u()),this.name=r,this[rr]=ur,this._data=new Set,this._atom=x(this.name),this[Symbol.toStringTag]="Set","function"!=typeof Set)throw new Error("mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js");this.enhancer=function(t,n){return e(t,n,r)},t&&this.replace(t)}return t.prototype.dehanceValue=function(t){return void 0!==this.dehancer?this.dehancer(t):t},t.prototype.clear=function(){var t=this;Re((function(){lt((function(){var e,r;try{for(var n=A(t._data.values()),o=n.next();!o.done;o=n.next()){var i=o.value;t.delete(i)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}}))}))},t.prototype.forEach=function(t,e){var r,n;try{for(var o=A(this),i=o.next();!i.done;i=o.next()){var u=i.value;t.call(e,u,u,this)}}catch(t){r={error:t}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}},Object.defineProperty(t.prototype,"size",{get:function(){return this._atom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),t.prototype.add=function(t){var e=this;if((at(this._atom),Xe(this))&&!(o=Ye(this,{type:"add",object:this,newValue:t})))return this;if(!this.has(t)){Re((function(){e._data.add(e.enhancer(t,void 0)),e._atom.reportChanged()}));var r=!1,n=Ve(this),o=n?{type:"add",object:this,newValue:t}:null;r,n&&Ke(this,o)}return this},t.prototype.delete=function(t){var e=this;if(Xe(this)&&!(n=Ye(this,{type:"delete",object:this,oldValue:t})))return!1;if(this.has(t)){var r=Ve(this),n=r?{type:"delete",object:this,oldValue:t}:null;return Re((function(){e._atom.reportChanged(),e._data.delete(t)})),r&&Ke(this,n),!0}return!1},t.prototype.has=function(t){return this._atom.reportObserved(),this._data.has(this.dehanceValue(t))},t.prototype.entries=function(){var t=0,e=Array.from(this.keys()),r=Array.from(this.values());return jr({next:function(){var n=t;return t+=1,n<r.length?{value:[e[n],r[n]],done:!1}:{done:!0}}})},t.prototype.keys=function(){return this.values()},t.prototype.values=function(){this._atom.reportObserved();var t=this,e=0,r=Array.from(this._data.values());return jr({next:function(){return e<r.length?{value:t.dehanceValue(r[e++]),done:!1}:{done:!0}}})},t.prototype.replace=function(t){var e=this;return cr(t)&&(t=t.toJS()),Re((function(){var r=xt(!0);try{Array.isArray(t)||v(t)?(e.clear(),t.forEach((function(t){return e.add(t)}))):null!=t&&a("Cannot initialize set from "+t)}finally{Et(r)}})),this},t.prototype.observe=function(t,e){return We(this,t)},t.prototype.intercept=function(t){return Ge(this,t)},t.prototype.toJS=function(){return new Set(this)},t.prototype.toString=function(){return this.name+"[ "+Array.from(this).join(", ")+" ]"},t.prototype[(rr=_,Symbol.iterator)]=function(){return this.values()},t}(),cr=h("ObservableSet",ar),sr=function(){function t(t,e,r,n){void 0===e&&(e=new Map),this.target=t,this.values=e,this.name=r,this.defaultEnhancer=n,this.keysAtom=new w(r+".keys")}return t.prototype.read=function(t){return this.values.get(t).get()},t.prototype.write=function(t,e){var r=this.target,n=this.values.get(t);if(n instanceof At)n.set(e);else{if(Xe(this)){if(!(u=Ye(this,{type:"update",object:this.proxy||r,name:t,newValue:e})))return;e=u.newValue}if((e=n.prepareNewValue(e))!==Rt.UNCHANGED){var o=Ve(this),i=!1,u=o?{type:"update",object:this.proxy||r,oldValue:n.value,name:t,newValue:e}:null;i,n.setNewValue(e),o&&Ke(this,u)}}},t.prototype.has=function(t){var e=this.pendingKeys||(this.pendingKeys=new Map),r=e.get(t);if(r)return r.get();var n=!!this.values.get(t);return r=new St(n,U,this.name+"."+b(t)+"?",!1),e.set(t,r),r.get()},t.prototype.addObservableProp=function(t,e,r){void 0===r&&(r=this.defaultEnhancer);var n=this.target;if(Xe(this)){var o=Ye(this,{object:this.proxy||n,name:t,type:"add",newValue:e});if(!o)return;e=o.newValue}var i=new St(e,r,this.name+"."+b(t),!1);this.values.set(t,i),e=i.value,Object.defineProperty(n,t,function(t){return fr[t]||(fr[t]={configurable:!0,enumerable:!0,get:function(){return this[_].read(t)},set:function(e){this[_].write(t,e)}})}(t)),this.notifyPropertyAddition(t,e)},t.prototype.addComputedProp=function(t,e,r){var n,o,i,u=this.target;r.name=r.name||this.name+"."+b(e),this.values.set(e,new At(r)),(t===u||(n=t,o=e,!(i=Object.getOwnPropertyDescriptor(n,o))||!1!==i.configurable&&!1!==i.writable))&&Object.defineProperty(t,e,function(t){return pr[t]||(pr[t]={configurable:Rt.computedConfigurable,enumerable:!1,get:function(){return dr(this).read(t)},set:function(e){dr(this).write(t,e)}})}(e))},t.prototype.remove=function(t){if(this.values.has(t)){var e=this.target;if(Xe(this))if(!(a=Ye(this,{object:this.proxy||e,name:t,type:"remove"})))return;try{Bt();var r=Ve(this),n=!1,o=this.values.get(t),i=o&&o.get();if(o&&o.set(void 0),this.keysAtom.reportChanged(),this.values.delete(t),this.pendingKeys){var u=this.pendingKeys.get(t);u&&u.set(!1)}delete this.target[t];var a=r?{type:"remove",object:this.proxy||e,oldValue:i,name:t}:null;n,r&&Ke(this,a)}finally{Ut()}}},t.prototype.illegalAccess=function(t,e){},t.prototype.observe=function(t,e){return We(this,t)},t.prototype.intercept=function(t){return Ge(this,t)},t.prototype.notifyPropertyAddition=function(t,e){var r=Ve(this),n=r?{type:"add",object:this.proxy||this.target,name:t,newValue:e}:null;if(r&&Ke(this,n),this.pendingKeys){var o=this.pendingKeys.get(t);o&&o.set(!0)}this.keysAtom.reportChanged()},t.prototype.getKeys=function(){var t,e;this.keysAtom.reportObserved();var r=[];try{for(var n=A(this.values),o=n.next();!o.done;o=n.next()){var i=k(o.value,2),u=i[0];i[1]instanceof St&&r.push(u)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return r},t}();function lr(t,e,r){if(void 0===e&&(e=""),void 0===r&&(r=B),Object.prototype.hasOwnProperty.call(t,_))return t[_];p(t)||(e=(t.constructor.name||"ObservableObject")+"@"+u()),e||(e="ObservableObject@"+u());var n=new sr(t,new Map,b(e),r);return d(t,_,n),n}var fr=Object.create(null),pr=Object.create(null);function dr(t){var e=t[_];return e||(I(t),t[_])}var hr=h("ObservableObjectAdministration",sr);function yr(t){return!!f(t)&&(I(t),hr(t[_]))}function vr(t,e){if("object"==typeof t&&null!==t){if(er(t))return void 0!==e&&a(!1),t[_].atom;if(cr(t))return t[_];if(ir(t)){var r=t;return void 0===e?r._keysAtom:((n=r._data.get(e)||r._hasMap.get(e))||a(!1),n)}var n;if(I(t),e&&!t[_]&&t[e],yr(t))return e?((n=t[_].values.get(e))||a(!1),n):a(!1);if(j(t)||kt(t)||Kt(t))return t}else if("function"==typeof t&&Kt(t[_]))return t[_];return a(!1)}function gr(t,e){return t||a("Expecting some object"),void 0!==e?gr(vr(t,e)):j(t)||kt(t)||Kt(t)||ir(t)||cr(t)?t:(I(t),t[_]?t[_]:void a(!1))}var br=Object.prototype.toString;function mr(t,e,r){return void 0===r&&(r=-1),Or(t,e,r)}function Or(t,e,r,n,o){if(t===e)return 0!==t||1/t==1/e;if(null==t||null==e)return!1;if(t!=t)return e!=e;var i=typeof t;if("function"!==i&&"object"!==i&&"object"!=typeof e)return!1;var u=br.call(t);if(u!==br.call(e))return!1;switch(u){case"[object RegExp]":case"[object String]":return""+t==""+e;case"[object Number]":return+t!=+t?+e!=+e:0==+t?1/+t==1/e:+t==+e;case"[object Date]":case"[object Boolean]":return+t==+e;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(t)===Symbol.valueOf.call(e);case"[object Map]":case"[object Set]":r>=0&&r++}t=_r(t),e=_r(e);var a="[object Array]"===u;if(!a){if("object"!=typeof t||"object"!=typeof e)return!1;var c=t.constructor,s=e.constructor;if(c!==s&&!("function"==typeof c&&c instanceof c&&"function"==typeof s&&s instanceof s)&&"constructor"in t&&"constructor"in e)return!1}if(0===r)return!1;r<0&&(r=-1),o=o||[];for(var l=(n=n||[]).length;l--;)if(n[l]===t)return o[l]===e;if(n.push(t),o.push(e),a){if((l=t.length)!==e.length)return!1;for(;l--;)if(!Or(t[l],e[l],r-1,n,o))return!1}else{var f=Object.keys(t),p=void 0;if(l=f.length,Object.keys(e).length!==l)return!1;for(;l--;)if(!wr(e,p=f[l])||!Or(t[p],e[p],r-1,n,o))return!1}return n.pop(),o.pop(),!0}function _r(t){return er(t)?t.slice():y(t)||ir(t)||v(t)||cr(t)?Array.from(t.entries()):t}function wr(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function jr(t){return t[Symbol.iterator]=xr,t}function xr(){return this}if("undefined"==typeof Proxy||"undefined"==typeof Symbol)throw new Error("[mobx] MobX 5+ requires Proxy and Symbol objects. If your environment doesn't support Symbol or Proxy objects, please downgrade to MobX 4. For React Native Android, consider upgrading JSCore.");"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:Zt,extras:{getDebugName:function(t,e){return(void 0!==e?vr(t,e):yr(t)||ir(t)||cr(t)?gr(t):vr(t)).name}},$mobx:_})}).call(this,r(163),r(68))},function(t,e,r){var n=r(113),o=r(42),i=r(179);n||o(Object.prototype,"toString",i,{unsafe:!0})},function(t,e,r){"use strict";var n=r(41),o=r(100),i=r(80),u=r(58),a=r(116),c="Array Iterator",s=u.set,l=u.getterFor(c);t.exports=a(Array,"Array",(function(t,e){s(this,{type:c,target:n(t),index:0,kind:e})}),(function(){var t=l(this),e=t.target,r=t.kind,n=t.index++;return!e||n>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}}),"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},function(t,e,r){"use strict";var n=r(16),o=r(7),i=r(46),u=r(76),a=r(34),c=r(15),s=r(71),l=r(36),f=r(108),p=r(18),d=r(35),h=r(96),y=r(30),v=r(33),g=r(54),b=r(87),m=r(32),O=r(40),_=r(41),w=r(86),j=r(39),x=r(69),E=r(60),S=r(77),P=r(74),A=r(139),k=r(112),D=r(50),T=r(38),M=r(84),N=r(98),C=r(42),R=r(89),I=r(93),L=r(72),z=r(90),B=r(28),U=r(140),F=r(141),H=r(78),X=r(58),G=r(79).forEach,Y=I("hidden"),V="Symbol",W=B("toPrimitive"),K=X.set,$=X.getterFor(V),Z=Object.prototype,q=o.Symbol,J=q&&q.prototype,Q=o.TypeError,tt=o.QObject,et=i("JSON","stringify"),rt=D.f,nt=T.f,ot=A.f,it=M.f,ut=c([].push),at=R("symbols"),ct=R("op-symbols"),st=R("string-to-symbol-registry"),lt=R("symbol-to-string-registry"),ft=R("wks"),pt=!tt||!tt.prototype||!tt.prototype.findChild,dt=l&&p((function(){return 7!=E(nt({},"a",{get:function(){return nt(this,"a",{value:7}).a}})).a}))?function(t,e,r){var n=rt(Z,e);n&&delete Z[e],nt(t,e,r),n&&t!==Z&&nt(Z,e,n)}:nt,ht=function(t,e){var r=at[t]=E(J);return K(r,{type:V,tag:t,description:e}),l||(r.description=e),r},yt=function(t,e,r){t===Z&&yt(ct,e,r),m(t);var n=w(e);return m(r),d(at,n)?(r.enumerable?(d(t,Y)&&t[Y][n]&&(t[Y][n]=!1),r=E(r,{enumerable:x(0,!1)})):(d(t,Y)||nt(t,Y,x(1,{})),t[Y][n]=!0),dt(t,n,r)):nt(t,n,r)},vt=function(t,e){m(t);var r=_(e),n=S(r).concat(Ot(r));return G(n,(function(e){l&&!a(gt,r,e)||yt(t,e,r[e])})),t},gt=function(t){var e=w(t),r=a(it,this,e);return!(this===Z&&d(at,e)&&!d(ct,e))&&(!(r||!d(this,e)||!d(at,e)||d(this,Y)&&this[Y][e])||r)},bt=function(t,e){var r=_(t),n=w(e);if(r!==Z||!d(at,n)||d(ct,n)){var o=rt(r,n);return!o||!d(at,n)||d(r,Y)&&r[Y][n]||(o.enumerable=!0),o}},mt=function(t){var e=ot(_(t)),r=[];return G(e,(function(t){d(at,t)||d(L,t)||ut(r,t)})),r},Ot=function(t){var e=t===Z,r=ot(e?ct:_(t)),n=[];return G(r,(function(t){!d(at,t)||e&&!d(Z,t)||ut(n,at[t])})),n};(f||(q=function(){if(g(J,this))throw Q("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?j(arguments[0]):void 0,e=z(t),r=function(t){this===Z&&a(r,ct,t),d(this,Y)&&d(this[Y],e)&&(this[Y][e]=!1),dt(this,e,x(1,t))};return l&&pt&&dt(Z,e,{configurable:!0,set:r}),ht(e,t)},C(J=q.prototype,"toString",(function(){return $(this).tag})),C(q,"withoutSetter",(function(t){return ht(z(t),t)})),M.f=gt,T.f=yt,D.f=bt,P.f=A.f=mt,k.f=Ot,U.f=function(t){return ht(B(t),t)},l&&(nt(J,"description",{configurable:!0,get:function(){return $(this).description}}),s||C(Z,"propertyIsEnumerable",gt,{unsafe:!0}))),n({global:!0,wrap:!0,forced:!f,sham:!f},{Symbol:q}),G(S(ft),(function(t){F(t)})),n({target:V,stat:!0,forced:!f},{for:function(t){var e=j(t);if(d(st,e))return st[e];var r=q(e);return st[e]=r,lt[r]=e,r},keyFor:function(t){if(!b(t))throw Q(t+" is not a symbol");if(d(lt,t))return lt[t]},useSetter:function(){pt=!0},useSimple:function(){pt=!1}}),n({target:"Object",stat:!0,forced:!f,sham:!l},{create:function(t,e){return void 0===e?E(t):vt(E(t),e)},defineProperty:yt,defineProperties:vt,getOwnPropertyDescriptor:bt}),n({target:"Object",stat:!0,forced:!f},{getOwnPropertyNames:mt,getOwnPropertySymbols:Ot}),n({target:"Object",stat:!0,forced:p((function(){k.f(1)}))},{getOwnPropertySymbols:function(t){return k.f(O(t))}}),et)&&n({target:"JSON",stat:!0,forced:!f||p((function(){var t=q();return"[null]"!=et([t])||"{}"!=et({a:t})||"{}"!=et(Object(t))}))},{stringify:function(t,e,r){var n=N(arguments),o=e;if((v(e)||void 0!==t)&&!b(t))return h(e)||(e=function(t,e){if(y(o)&&(e=a(o,this,t,e)),!b(e))return e}),n[1]=e,u(et,null,n)}});if(!J[W]){var _t=J.valueOf;C(J,W,(function(t){return a(_t,this)}))}H(q,V),L[Y]=!0},function(t,e,r){var n=r(7),o=r(152),i=r(153),u=r(3),a=r(57),c=r(28),s=c("iterator"),l=c("toStringTag"),f=u.values,p=function(t,e){if(t){if(t[s]!==f)try{a(t,s,f)}catch(e){t[s]=f}if(t[l]||a(t,l,e),o[e])for(var r in u)if(t[r]!==u[r])try{a(t,r,u[r])}catch(e){t[r]=u[r]}}};for(var d in o)p(n[d]&&n[d].prototype,d);p(i,"DOMTokenList")},function(t,e,r){"use strict";var n=r(151).charAt,o=r(39),i=r(58),u=r(116),a="String Iterator",c=i.set,s=i.getterFor(a);u(String,"String",(function(t){c(this,{type:a,string:o(t),index:0})}),(function(){var t,e=s(this),r=e.string,o=e.index;return o>=r.length?{value:void 0,done:!0}:(t=n(r,o),e.index+=t.length,{value:t,done:!1})}))},function(t,e,r){(function(e){var r=function(t){return t&&t.Math==Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof e&&e)||function(){return this}()||Function("return this")()}).call(this,r(68))},function(t,e,r){"use strict";var n=r(16),o=r(36),i=r(7),u=r(15),a=r(35),c=r(30),s=r(54),l=r(39),f=r(38).f,p=r(134),d=i.Symbol,h=d&&d.prototype;if(o&&c(d)&&(!("description"in h)||void 0!==d().description)){var y={},v=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:l(arguments[0]),e=s(h,this)?new d(t):void 0===t?d():d(t);return""===t&&(y[e]=!0),e};p(v,d),v.prototype=h,h.constructor=v;var g="Symbol(test)"==String(d("test")),b=u(h.toString),m=u(h.valueOf),O=/^Symbol\((.*)\)[^)]+$/,_=u("".replace),w=u("".slice);f(h,"description",{configurable:!0,get:function(){var t=m(this),e=b(t);if(a(y,t))return"";var r=g?w(e,7,-1):_(e,O,"$1");return""===r?void 0:r}}),n({global:!0,forced:!0},{Symbol:v})}},function(t,e,r){r(141)("iterator")},function(t,e,r){"use strict";r.d(e,"a",(function(){return u.a})),r.d(e,"c",(function(){return u.e})),r.d(e,"h",(function(){return O})),r.d(e,"i",(function(){return g})),r.d(e,"j",(function(){return y})),r.d(e,"b",(function(){return D})),r.d(e,"e",(function(){return C})),r.d(e,"f",(function(){return T})),r.d(e,"g",(function(){return at}));var n,o,i,u=r(0),a=0,c=[],s=u.i.__b,l=u.i.__r,f=u.i.diffed,p=u.i.__c,d=u.i.unmount;function h(t,e){u.i.__h&&u.i.__h(o,t,a||e),a=0;var r=o.__H||(o.__H={__:[],__h:[]});return t>=r.__.length&&r.__.push({}),r.__[t]}function y(t){return a=1,v(P,t)}function v(t,e,r){var i=h(n++,2);return i.t=t,i.__c||(i.__=[r?r(e):P(void 0,e),function(t){var e=i.t(i.__[0],t);i.__[0]!==e&&(i.__=[e,i.__[1]],i.__c.setState({}))}],i.__c=o),i.__}function g(t,e){var r=h(n++,3);!u.i.__s&&S(r.__H,e)&&(r.__=t,r.__H=e,o.__H.__h.push(r))}function b(t,e){var r=h(n++,4);!u.i.__s&&S(r.__H,e)&&(r.__=t,r.__H=e,o.__h.push(r))}function m(t,e){var r=h(n++,7);return S(r.__H,e)&&(r.__=t(),r.__H=e,r.__h=t),r.__}function O(t,e){return a=8,m((function(){return t}),e)}function _(){var t;for(c.sort((function(t,e){return t.__v.__b-e.__v.__b}));t=c.pop();)if(t.__P)try{t.__H.__h.forEach(x),t.__H.__h.forEach(E),t.__H.__h=[]}catch(e){t.__H.__h=[],u.i.__e(e,t.__v)}}u.i.__b=function(t){o=null,s&&s(t)},u.i.__r=function(t){l&&l(t),n=0;var e=(o=t.__c).__H;e&&(e.__h.forEach(x),e.__h.forEach(E),e.__h=[])},u.i.diffed=function(t){f&&f(t);var e=t.__c;e&&e.__H&&e.__H.__h.length&&(1!==c.push(e)&&i===u.i.requestAnimationFrame||((i=u.i.requestAnimationFrame)||j)(_)),o=null},u.i.__c=function(t,e){e.some((function(t){try{t.__h.forEach(x),t.__h=t.__h.filter((function(t){return!t.__||E(t)}))}catch(r){e.some((function(t){t.__h&&(t.__h=[])})),e=[],u.i.__e(r,t.__v)}})),p&&p(t,e)},u.i.unmount=function(t){d&&d(t);var e,r=t.__c;r&&r.__H&&(r.__H.__.forEach((function(t){try{x(t)}catch(t){e=t}})),e&&u.i.__e(e,r.__v))};var w="function"==typeof requestAnimationFrame;function j(t){var e,r=function(){clearTimeout(n),w&&cancelAnimationFrame(e),setTimeout(t)},n=setTimeout(r,100);w&&(e=requestAnimationFrame(r))}function x(t){var e=o,r=t.__c;"function"==typeof r&&(t.__c=void 0,r()),o=e}function E(t){var e=o;t.__c=t.__(),o=e}function S(t,e){return!t||t.length!==e.length||e.some((function(e,r){return e!==t[r]}))}function P(t,e){return"function"==typeof e?e(t):e}function A(t,e){for(var r in e)t[r]=e[r];return t}function k(t,e){for(var r in t)if("__source"!==r&&!(r in e))return!0;for(var n in e)if("__source"!==n&&t[n]!==e[n])return!0;return!1}function D(t){this.props=t}function T(t,e){function r(t){var r=this.props.ref,n=r==t.ref;return!n&&r&&(r.call?r(null):r.current=null),e?!e(this.props,t)||!n:k(this.props,t)}function n(e){return this.shouldComponentUpdate=r,Object(u.e)(t,e)}return n.displayName="Memo("+(t.displayName||t.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(D.prototype=new u.a).isPureReactComponent=!0,D.prototype.shouldComponentUpdate=function(t,e){return k(this.props,t)||k(this.state,e)};var M=u.i.__b;u.i.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),M&&M(t)};var N="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function C(t){function e(e,r){var n=A({},e);return delete n.ref,t(n,!(r=e.ref||r)||"object"==typeof r&&!("current"in r)?null:r)}return e.$$typeof=N,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var R=function(t,e){return null==t?null:Object(u.k)(Object(u.k)(t).map(e))},I={map:R,forEach:R,count:function(t){return t?Object(u.k)(t).length:0},only:function(t){var e=Object(u.k)(t);if(1!==e.length)throw"Children.only";return e[0]},toArray:u.k},L=u.i.__e;u.i.__e=function(t,e,r){if(t.then)for(var n,o=e;o=o.__;)if((n=o.__c)&&n.__c)return null==e.__e&&(e.__e=r.__e,e.__k=r.__k),n.__c(t,e);L(t,e,r)};var z=u.i.unmount;function B(t,e,r){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach((function(t){"function"==typeof t.__c&&t.__c()})),t.__c.__H=null),null!=(t=A({},t)).__c&&(t.__c.__P===r&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map((function(t){return B(t,e,r)}))),t}function U(t,e,r){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map((function(t){return U(t,e,r)})),t.__c&&t.__c.__P===e&&(t.__e&&r.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=r)),t}function F(){this.__u=0,this.t=null,this.__b=null}function H(t){var e=t.__.__c;return e&&e.__e&&e.__e(t)}function X(){this.u=null,this.o=null}u.i.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&!0===t.__h&&(t.type=null),z&&z(t)},(F.prototype=new u.a).__c=function(t,e){var r=e.__c,n=this;null==n.t&&(n.t=[]),n.t.push(r);var o=H(n.__v),i=!1,u=function(){i||(i=!0,r.__R=null,o?o(a):a())};r.__R=u;var a=function(){if(!--n.__u){if(n.state.__e){var t=n.state.__e;n.__v.__k[0]=U(t,t.__c.__P,t.__c.__O)}var e;for(n.setState({__e:n.__b=null});e=n.t.pop();)e.forceUpdate()}},c=!0===e.__h;n.__u++||c||n.setState({__e:n.__b=n.__v.__k[0]}),t.then(u,u)},F.prototype.componentWillUnmount=function(){this.t=[]},F.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=B(this.__b,r,n.__O=n.__P)}this.__b=null}var o=e.__e&&Object(u.e)(u.b,null,t.fallback);return o&&(o.__h=null),[Object(u.e)(u.b,null,e.__e?null:t.children),o]};var G=function(t,e,r){if(++r[1]===r[0]&&t.o.delete(e),t.props.revealOrder&&("t"!==t.props.revealOrder[0]||!t.o.size))for(r=t.u;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;t.u=r=r[2]}};function Y(t){return this.getChildContext=function(){return t.context},t.children}function V(t){var e=this,r=t.i;e.componentWillUnmount=function(){Object(u.j)(null,e.l),e.l=null,e.i=null},e.i&&e.i!==r&&e.componentWillUnmount(),t.__v?(e.l||(e.i=r,e.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(t){this.childNodes.push(t),e.i.appendChild(t)},insertBefore:function(t,r){this.childNodes.push(t),e.i.appendChild(t)},removeChild:function(t){this.childNodes.splice(this.childNodes.indexOf(t)>>>1,1),e.i.removeChild(t)}}),Object(u.j)(Object(u.e)(Y,{context:e.context},t.__v),e.l)):e.l&&e.componentWillUnmount()}(X.prototype=new u.a).__e=function(t){var e=this,r=H(e.__v),n=e.o.get(t);return n[0]++,function(o){var i=function(){e.props.revealOrder?(n.push(o),G(e,t,n)):o()};r?r(i):i()}},X.prototype.render=function(t){this.u=null,this.o=new Map;var e=Object(u.k)(t.children);t.revealOrder&&"b"===t.revealOrder[0]&&e.reverse();for(var r=e.length;r--;)this.o.set(e[r],this.u=[1,0,this.u]);return t.children},X.prototype.componentDidUpdate=X.prototype.componentDidMount=function(){var t=this;this.o.forEach((function(e,r){G(t,r,e)}))};var W="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,K=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,$="undefined"!=typeof document,Z=function(t){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(t)};u.a.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(t){Object.defineProperty(u.a.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}));var q=u.i.event;function J(){}function Q(){return this.cancelBubble}function tt(){return this.defaultPrevented}u.i.event=function(t){return q&&(t=q(t)),t.persist=J,t.isPropagationStopped=Q,t.isDefaultPrevented=tt,t.nativeEvent=t};var et,rt={configurable:!0,get:function(){return this.class}},nt=u.i.vnode;u.i.vnode=function(t){var e=t.type,r=t.props,n=r;if("string"==typeof e){var o=-1===e.indexOf("-");for(var i in n={},r){var a=r[i];$&&"children"===i&&"noscript"===e||"value"===i&&"defaultValue"in r&&null==a||("defaultValue"===i&&"value"in r&&null==r.value?i="value":"download"===i&&!0===a?a="":/ondoubleclick/i.test(i)?i="ondblclick":/^onchange(textarea|input)/i.test(i+e)&&!Z(r.type)?i="oninput":/^onfocus$/i.test(i)?i="onfocusin":/^onblur$/i.test(i)?i="onfocusout":/^on(Ani|Tra|Tou|BeforeInp)/.test(i)?i=i.toLowerCase():o&&K.test(i)?i=i.replace(/[A-Z0-9]/,"-$&").toLowerCase():null===a&&(a=void 0),n[i]=a)}"select"==e&&n.multiple&&Array.isArray(n.value)&&(n.value=Object(u.k)(r.children).forEach((function(t){t.props.selected=-1!=n.value.indexOf(t.props.value)}))),"select"==e&&null!=n.defaultValue&&(n.value=Object(u.k)(r.children).forEach((function(t){t.props.selected=n.multiple?-1!=n.defaultValue.indexOf(t.props.value):n.defaultValue==t.props.value}))),t.props=n,r.class!=r.className&&(rt.enumerable="className"in r,null!=r.className&&(n.class=r.className),Object.defineProperty(n,"className",rt))}t.$$typeof=W,nt&&nt(t)};var ot=u.i.__r;u.i.__r=function(t){ot&&ot(t),et=t.__c};var it={ReactCurrentDispatcher:{current:{readContext:function(t){return et.__n[t.__c].props.value}}}};function ut(t){return!!t&&t.$$typeof===W}var at=function(t,e){return t(e)},ct=u.b,st={useState:y,useReducer:v,useEffect:g,useLayoutEffect:b,useRef:function(t){return a=5,m((function(){return{current:t}}),[])},useImperativeHandle:function(t,e,r){a=6,b((function(){"function"==typeof t?t(e()):t&&(t.current=e())}),null==r?r:r.concat(t))},useMemo:m,useCallback:O,useContext:function(t){var e=o.context[t.__c],r=h(n++,9);return r.c=t,e?(null==r.__&&(r.__=!0,e.sub(o)),e.props.value):t.__},useDebugValue:function(t,e){u.i.useDebugValue&&u.i.useDebugValue(e?e(t):t)},version:"17.0.2",Children:I,render:function(t,e,r){return null==e.__k&&(e.textContent=""),Object(u.j)(t,e),"function"==typeof r&&r(),t?t.__c:null},hydrate:function(t,e,r){return Object(u.h)(t,e),"function"==typeof r&&r(),t?t.__c:null},unmountComponentAtNode:function(t){return!!t.__k&&(Object(u.j)(null,t),!0)},createPortal:function(t,e){return Object(u.e)(V,{__v:t,i:e})},createElement:u.e,createContext:u.d,createFactory:function(t){return u.e.bind(null,t)},cloneElement:function(t){return ut(t)?u.c.apply(null,arguments):t},createRef:u.f,Fragment:u.b,isValidElement:ut,findDOMNode:function(t){return t&&(t.base||1===t.nodeType&&t)||null},Component:u.a,PureComponent:D,memo:T,forwardRef:C,flushSync:function(t,e){return t(e)},unstable_batchedUpdates:at,StrictMode:ct,Suspense:F,SuspenseList:X,lazy:function(t){var e,r,n;function o(o){if(e||(e=t()).then((function(t){r=t.default||t}),(function(t){n=t})),n)throw n;if(!r)throw e;return Object(u.e)(r,o)}return o.displayName="Lazy",o.__f=!0,o},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:it};e.d=st},function(t,e,r){var n=r(7),o=r(152),i=r(153),u=r(187),a=r(57),c=function(t){if(t&&t.forEach!==u)try{a(t,"forEach",u)}catch(e){t.forEach=u}};for(var s in o)o[s]&&c(n[s]&&n[s].prototype);c(i)},function(t,e,r){r(16)({target:"Object",stat:!0},{setPrototypeOf:r(102)})},function(t,e,r){var n=r(16),o=r(18),i=r(40),u=r(101),a=r(143);n({target:"Object",stat:!0,forced:o((function(){u(1)})),sham:!a},{getPrototypeOf:function(t){return u(i(t))}})},function(t,e,r){var n=r(16),o=r(46),i=r(76),u=r(203),a=r(165),c=r(32),s=r(33),l=r(60),f=r(18),p=o("Reflect","construct"),d=Object.prototype,h=[].push,y=f((function(){function t(){}return!(p((function(){}),[],t)instanceof t)})),v=!f((function(){p((function(){}))})),g=y||v;n({target:"Reflect",stat:!0,forced:g,sham:g},{construct:function(t,e){a(t),c(e);var r=arguments.length<3?t:a(arguments[2]);if(v&&!y)return p(t,e,r);if(t==r){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var n=[null];return i(h,n,e),new(i(u,t,n))}var o=r.prototype,f=l(s(o)?o:d),g=i(t,f,e);return s(g)?g:f}})},function(t,e){var r=Function.prototype,n=r.bind,o=r.call,i=n&&n.bind(o);t.exports=n?function(t){return t&&i(o,t)}:function(t){return t&&function(){return o.apply(t,arguments)}}},function(t,e,r){var n=r(7),o=r(50).f,i=r(57),u=r(42),a=r(110),c=r(134),s=r(95);t.exports=function(t,e){var r,l,f,p,d,h=t.target,y=t.global,v=t.stat;if(r=y?n:v?n[h]||a(h,{}):(n[h]||{}).prototype)for(l in e){if(p=e[l],f=t.noTargetGet?(d=o(r,l))&&d.value:r[l],!s(y?l:h+(v?".":"#")+l,t.forced)&&void 0!==f){if(typeof p==typeof f)continue;c(p,f)}(t.sham||f&&f.sham)&&i(p,"sham",!0),u(r,l,p,t)}}},function(t,e,r){"use strict";var n=r(16),o=r(7),i=r(96),u=r(99),a=r(33),c=r(75),s=r(45),l=r(41),f=r(63),p=r(28),d=r(81),h=r(98),y=d("slice"),v=p("species"),g=o.Array,b=Math.max;n({target:"Array",proto:!0,forced:!y},{slice:function(t,e){var r,n,o,p=l(this),d=s(p),y=c(t,d),m=c(void 0===e?d:e,d);if(i(p)&&(r=p.constructor,(u(r)&&(r===g||i(r.prototype))||a(r)&&null===(r=r[v]))&&(r=void 0),r===g||void 0===r))return h(p,y,m);for(n=new(void 0===r?g:r)(b(m-y,0)),o=0;y<m;y++,o++)y in p&&f(n,o,p[y]);return n.length=o,n}})},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,r){"use strict";var n=r(16),o=r(103);n({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},function(t,e,r){var n=r(16),o=r(40),i=r(77);n({target:"Object",stat:!0,forced:r(18)((function(){i(1)}))},{keys:function(t){return i(o(t))}})},function(t,e,r){var n=r(36),o=r(73).EXISTS,i=r(15),u=r(38).f,a=Function.prototype,c=i(a.toString),s=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,l=i(s.exec);n&&!o&&u(a,"name",{configurable:!0,get:function(){try{return l(s,c(this))[1]}catch(t){return""}}})},function(t,e,r){var n=r(16),o=r(18),i=r(41),u=r(50).f,a=r(36),c=o((function(){u(1)}));n({target:"Object",stat:!0,forced:!a||c,sham:!a},{getOwnPropertyDescriptor:function(t,e){return u(i(t),e)}})},function(t,e,r){var n=r(16),o=r(188);n({target:"Array",stat:!0,forced:!r(120)((function(t){Array.from(t)}))},{from:o})},function(t,e,r){"use strict";var n=r(16),o=r(79).filter;n({target:"Array",proto:!0,forced:!r(81)("filter")},{filter:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,r){var n=r(16),o=r(36),i=r(135),u=r(41),a=r(50),c=r(63);n({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(t){for(var e,r,n=u(t),o=a.f,s=i(n),l={},f=0;s.length>f;)void 0!==(r=o(n,e=s[f++]))&&c(l,e,r);return l}})},,function(t,e,r){"use strict";var n=r(16),o=r(7),i=r(18),u=r(96),a=r(33),c=r(40),s=r(45),l=r(63),f=r(115),p=r(81),d=r(28),h=r(70),y=d("isConcatSpreadable"),v=9007199254740991,g="Maximum allowed index exceeded",b=o.TypeError,m=h>=51||!i((function(){var t=[];return t[y]=!1,t.concat()[0]!==t})),O=p("concat"),_=function(t){if(!a(t))return!1;var e=t[y];return void 0!==e?!!e:u(t)};n({target:"Array",proto:!0,forced:!m||!O},{concat:function(t){var e,r,n,o,i,u=c(this),a=f(u,0),p=0;for(e=-1,n=arguments.length;e<n;e++)if(_(i=-1===e?u:arguments[e])){if(p+(o=s(i))>v)throw b(g);for(r=0;r<o;r++,p++)r in i&&l(a,p,i[r])}else{if(p>=v)throw b(g);l(a,p++,i)}return a.length=p,a}})},function(t,e,r){var n=r(7),o=r(89),i=r(35),u=r(90),a=r(108),c=r(132),s=o("wks"),l=n.Symbol,f=l&&l.for,p=c?l:l&&l.withoutSetter||u;t.exports=function(t){if(!i(s,t)||!a&&"string"!=typeof s[t]){var e="Symbol."+t;a&&i(l,t)?s[t]=l[t]:s[t]=c&&f?f(e):p(e)}return s[t]}},function(t,e,r){var n=r(16),o=r(202);n({target:"Object",stat:!0,forced:Object.assign!==o},{assign:o})},function(t,e){t.exports=function(t){return"function"==typeof t}},function(t,e,r){"use strict";var n=r(106),o="object"==typeof self&&self&&self.Object===Object&&self,i=n.a||o||Function("return this")();e.a=i},function(t,e,r){var n=r(7),o=r(33),i=n.String,u=n.TypeError;t.exports=function(t){if(o(t))return t;throw u(i(t)+" is not an object")}},function(t,e,r){var n=r(30);t.exports=function(t){return"object"==typeof t?null!==t:n(t)}},function(t,e){var r=Function.prototype.call;t.exports=r.bind?r.bind(r):function(){return r.apply(r,arguments)}},function(t,e,r){var n=r(15),o=r(40),i=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return i(o(t),e)}},function(t,e,r){var n=r(18);t.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(t,e,r){"use strict";var n=r(16),o=r(79).map;n({target:"Array",proto:!0,forced:!r(81)("map")},{map:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,r){var n=r(7),o=r(36),i=r(133),u=r(32),a=r(86),c=n.TypeError,s=Object.defineProperty;e.f=o?s:function(t,e,r){if(u(t),e=a(e),u(r),i)try{return s(t,e,r)}catch(t){}if("get"in r||"set"in r)throw c("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},function(t,e,r){var n=r(7),o=r(97),i=n.String;t.exports=function(t){if("Symbol"===o(t))throw TypeError("Cannot convert a Symbol value to a string");return i(t)}},function(t,e,r){var n=r(7),o=r(44),i=n.Object;t.exports=function(t){return i(o(t))}},function(t,e,r){var n=r(85),o=r(44);t.exports=function(t){return n(o(t))}},function(t,e,r){var n=r(7),o=r(30),i=r(35),u=r(57),a=r(110),c=r(92),s=r(58),l=r(73).CONFIGURABLE,f=s.get,p=s.enforce,d=String(String).split("String");(t.exports=function(t,e,r,c){var s,f=!!c&&!!c.unsafe,h=!!c&&!!c.enumerable,y=!!c&&!!c.noTargetGet,v=c&&void 0!==c.name?c.name:e;o(r)&&("Symbol("===String(v).slice(0,7)&&(v="["+String(v).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!i(r,"name")||l&&r.name!==v)&&u(r,"name",v),(s=p(r)).source||(s.source=d.join("string"==typeof v?v:""))),t!==n?(f?!y&&t[e]&&(h=!0):delete t[e],h?t[e]=r:u(t,e,r)):h?t[e]=r:a(e,r)})(Function.prototype,"toString",(function(){return o(this)&&f(this).source||c(this)}))},function(t,e,r){"use strict";(function(t){r.d(e,"d",(function(){return i})),r.d(e,"c",(function(){return u})),r.d(e,"b",(function(){return a})),r.d(e,"a",(function(){return s}));var n=r(10),o=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u};function i(){var t=o(Object(n.j)(0),2)[1];return Object(n.h)((function(){t((function(t){return t+1}))}),[])}function u(t){if(!t||"object"!=typeof t)return!1;var e=Object.getPrototypeOf(t);return!e||e===Object.prototype}function a(t){return"function"==typeof Symbol?Symbol.for(t):"__$mobx-react "+t+"__"}var c={};function s(){return"undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:c}}).call(this,r(68))},function(t,e,r){var n=r(7).TypeError;t.exports=function(t){if(null==t)throw n("Can't call method on "+t);return t}},function(t,e,r){var n=r(94);t.exports=function(t){return n(t.length)}},function(t,e,r){var n=r(7),o=r(30),i=function(t){return o(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?i(n[t]):n[t]&&n[t][e]}},function(t,e,r){var n=r(16),o=r(34),i=r(33),u=r(32),a=r(204),c=r(50),s=r(101);n({target:"Reflect",stat:!0},{get:function t(e,r){var n,l,f=arguments.length<3?e:arguments[2];return u(e)===f?e[r]:(n=c.f(e,r))?a(n)?n.value:void 0===n.get?void 0:o(n.get,f):i(l=s(e))?t(l,r,f):void 0}})},function(t,e,r){"use strict";(function(t){var n=r(31),o=r(171),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,u=i&&"object"==typeof t&&t&&!t.nodeType&&t,a=u&&u.exports===i?n.a.Buffer:void 0,c=(a?a.isBuffer:void 0)||o.a;e.a=c}).call(this,r(122)(t))},function(t,e,r){"use strict";(function(t){var n=r(106),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,u=i&&i.exports===o&&n.a.process,a=function(){try{var t=i&&i.require&&i.require("util").types;return t||u&&u.binding&&u.binding("util")}catch(t){}}();e.a=a}).call(this,r(122)(t))},function(t,e,r){var n=r(36),o=r(34),i=r(84),u=r(69),a=r(41),c=r(86),s=r(35),l=r(133),f=Object.getOwnPropertyDescriptor;e.f=n?f:function(t,e){if(t=a(t),e=c(e),l)try{return f(t,e)}catch(t){}if(s(t,e))return u(!o(i.f,t,e),t[e])}},function(t,e,r){var n=r(15),o=n({}.toString),i=n("".slice);t.exports=function(t){return i(o(t),8,-1)}},function(t,e,r){"use strict";r(182)("Map",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),r(186))},function(t,e,r){var n=r(16),o=r(220).entries;n({target:"Object",stat:!0},{entries:function(t){return o(t)}})},function(t,e,r){var n=r(15);t.exports=n({}.isPrototypeOf)},function(t,e,r){var n=r(46);t.exports=n("navigator","userAgent")||""},function(t,e,r){var n=r(7),o=r(30),i=r(88),u=n.TypeError;t.exports=function(t){if(o(t))return t;throw u(i(t)+" is not a function")}},function(t,e,r){var n=r(36),o=r(38),i=r(69);t.exports=n?function(t,e,r){return o.f(t,e,i(1,r))}:function(t,e,r){return t[e]=r,t}},function(t,e,r){var n,o,i,u=r(175),a=r(7),c=r(15),s=r(33),l=r(57),f=r(35),p=r(109),d=r(93),h=r(72),y="Object already initialized",v=a.TypeError,g=a.WeakMap;if(u||p.state){var b=p.state||(p.state=new g),m=c(b.get),O=c(b.has),_=c(b.set);n=function(t,e){if(O(b,t))throw new v(y);return e.facade=t,_(b,t,e),e},o=function(t){return m(b,t)||{}},i=function(t){return O(b,t)}}else{var w=d("state");h[w]=!0,n=function(t,e){if(f(t,w))throw new v(y);return e.facade=t,l(t,w,e),e},o=function(t){return f(t,w)?t[w]:{}},i=function(t){return f(t,w)}}t.exports={set:n,get:o,has:i,enforce:function(t){return i(t)?o(t):n(t,{})},getterFor:function(t){return function(e){var r;if(!s(e)||(r=o(e)).type!==t)throw v("Incompatible receiver, "+t+" required");return r}}}},function(t,e){var r=Math.ceil,n=Math.floor;t.exports=function(t){var e=+t;return e!=e||0===e?0:(e>0?n:r)(e)}},function(t,e,r){var n,o=r(32),i=r(176),u=r(111),a=r(72),c=r(138),s=r(91),l=r(93),f=l("IE_PROTO"),p=function(){},d=function(t){return"<script>"+t+"</"+"script>"},h=function(t){t.write(d("")),t.close();var e=t.parentWindow.Object;return t=null,e},y=function(){try{n=new ActiveXObject("htmlfile")}catch(t){}var t,e;y="undefined"!=typeof document?document.domain&&n?h(n):((e=s("iframe")).style.display="none",c.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(d("document.F=Object")),t.close(),t.F):h(n);for(var r=u.length;r--;)delete y.prototype[u[r]];return y()};a[f]=!0,t.exports=Object.create||function(t,e){var r;return null!==t?(p.prototype=o(t),r=new p,p.prototype=null,r[f]=t):r=y(),void 0===e?r:i(r,e)}},function(t,e,r){"use strict";var n=r(36),o=r(7),i=r(15),u=r(95),a=r(42),c=r(35),s=r(148),l=r(54),f=r(87),p=r(131),d=r(18),h=r(74).f,y=r(50).f,v=r(38).f,g=r(160),b=r(161).trim,m="Number",O=o.Number,_=O.prototype,w=o.TypeError,j=i("".slice),x=i("".charCodeAt),E=function(t){var e=p(t,"number");return"bigint"==typeof e?e:S(e)},S=function(t){var e,r,n,o,i,u,a,c,s=p(t,"number");if(f(s))throw w("Cannot convert a Symbol value to a number");if("string"==typeof s&&s.length>2)if(s=b(s),43===(e=x(s,0))||45===e){if(88===(r=x(s,2))||120===r)return NaN}else if(48===e){switch(x(s,1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+s}for(u=(i=j(s,2)).length,a=0;a<u;a++)if((c=x(i,a))<48||c>o)return NaN;return parseInt(i,n)}return+s};if(u(m,!O(" 0o1")||!O("0b1")||O("+0x1"))){for(var P,A=function(t){var e=arguments.length<1?0:O(E(t)),r=this;return l(_,r)&&d((function(){g(r)}))?s(Object(e),r,A):e},k=n?h(O):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),D=0;k.length>D;D++)c(O,P=k[D])&&!c(A,P)&&v(A,P,y(O,P));A.prototype=_,_.constructor=A,a(o,m,A)}},function(t,e,r){var n=r(56);t.exports=function(t,e){var r=t[e];return null==r?void 0:n(r)}},function(t,e,r){"use strict";var n=r(86),o=r(38),i=r(69);t.exports=function(t,e,r){var u=n(e);u in t?o.f(t,u,i(0,r)):t[u]=r}},function(t,e,r){var n=r(15),o=r(56),i=n(n.bind);t.exports=function(t,e){return o(t),void 0===e?t:i?i(t,e):function(){return t.apply(e,arguments)}}},function(t,e,r){"use strict";var n=r(16),o=r(15),i=r(85),u=r(41),a=r(121),c=o([].join),s=i!=Object,l=a("join",",");n({target:"Array",proto:!0,forced:s||!l},{join:function(t){return c(u(this),void 0===t?",":t)}})},function(t,e,r){"use strict";var n=r(15),o=r(73).PROPER,i=r(42),u=r(32),a=r(54),c=r(39),s=r(18),l=r(154),f="toString",p=RegExp.prototype,d=p.toString,h=n(l),y=s((function(){return"/a/b"!=d.call({source:"a",flags:"b"})})),v=o&&d.name!=f;(y||v)&&i(RegExp.prototype,f,(function(){var t=u(this),e=c(t.source),r=t.flags;return"/"+e+"/"+c(void 0===r&&a(p,t)&&!("flags"in p)?h(t):r)}),{unsafe:!0})},function(t,e,r){var n=r(16),o=r(217),i=r(100);n({target:"Array",proto:!0},{fill:o}),i("fill")},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,r){var n,o,i=r(7),u=r(55),a=i.process,c=i.Deno,s=a&&a.versions||c&&c.version,l=s&&s.v8;l&&(o=(n=l.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!o&&u&&(!(n=u.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=u.match(/Chrome\/(\d+)/))&&(o=+n[1]),t.exports=o},function(t,e){t.exports=!1},function(t,e){t.exports={}},function(t,e,r){var n=r(36),o=r(35),i=Function.prototype,u=n&&Object.getOwnPropertyDescriptor,a=o(i,"name"),c=a&&"something"===function(){}.name,s=a&&(!n||n&&u(i,"name").configurable);t.exports={EXISTS:a,PROPER:c,CONFIGURABLE:s}},function(t,e,r){var n=r(136),o=r(111).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,o)}},function(t,e,r){var n=r(59),o=Math.max,i=Math.min;t.exports=function(t,e){var r=n(t);return r<0?o(r+e,0):i(r,e)}},function(t,e){var r=Function.prototype,n=r.apply,o=r.bind,i=r.call;t.exports="object"==typeof Reflect&&Reflect.apply||(o?i.bind(n):function(){return i.apply(n,arguments)})},function(t,e,r){var n=r(136),o=r(111);t.exports=Object.keys||function(t){return n(t,o)}},function(t,e,r){var n=r(38).f,o=r(35),i=r(28)("toStringTag");t.exports=function(t,e,r){t&&!o(t=r?t:t.prototype,i)&&n(t,i,{configurable:!0,value:e})}},function(t,e,r){var n=r(64),o=r(15),i=r(85),u=r(40),a=r(45),c=r(115),s=o([].push),l=function(t){var e=1==t,r=2==t,o=3==t,l=4==t,f=6==t,p=7==t,d=5==t||f;return function(h,y,v,g){for(var b,m,O=u(h),_=i(O),w=n(y,v),j=a(_),x=0,E=g||c,S=e?E(h,j):r||p?E(h,0):void 0;j>x;x++)if((d||x in _)&&(m=w(b=_[x],x,O),t))if(e)S[x]=m;else if(m)switch(t){case 3:return!0;case 5:return b;case 6:return x;case 2:s(S,b)}else switch(t){case 4:return!1;case 7:s(S,b)}return f?-1:o||l?l:S}};t.exports={forEach:l(0),map:l(1),filter:l(2),some:l(3),every:l(4),find:l(5),findIndex:l(6),filterReject:l(7)}},function(t,e){t.exports={}},function(t,e,r){var n=r(18),o=r(28),i=r(70),u=o("species");t.exports=function(t){return i>=51||!n((function(){var e=[];return(e.constructor={})[u]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},function(t,e,r){"use strict";var n=r(76),o=r(34),i=r(15),u=r(123),a=r(159),c=r(32),s=r(44),l=r(164),f=r(124),p=r(94),d=r(39),h=r(62),y=r(114),v=r(125),g=r(103),b=r(155),m=r(18),O=b.UNSUPPORTED_Y,_=4294967295,w=Math.min,j=[].push,x=i(/./.exec),E=i(j),S=i("".slice),P=!m((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var r="ab".split(t);return 2!==r.length||"a"!==r[0]||"b"!==r[1]}));u("split",(function(t,e,r){var i;return i="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,r){var i=d(s(this)),u=void 0===r?_:r>>>0;if(0===u)return[];if(void 0===t)return[i];if(!a(t))return o(e,i,t,u);for(var c,l,f,p=[],h=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),v=0,b=new RegExp(t.source,h+"g");(c=o(g,b,i))&&!((l=b.lastIndex)>v&&(E(p,S(i,v,c.index)),c.length>1&&c.index<i.length&&n(j,p,y(c,1)),f=c[0].length,v=l,p.length>=u));)b.lastIndex===c.index&&b.lastIndex++;return v===i.length?!f&&x(b,"")||E(p,""):E(p,S(i,v)),p.length>u?y(p,0,u):p}:"0".split(void 0,0).length?function(t,r){return void 0===t&&0===r?[]:o(e,this,t,r)}:e,[function(e,r){var n=s(this),u=null==e?void 0:h(e,t);return u?o(u,e,n,r):o(i,d(n),e,r)},function(t,n){var o=c(this),u=d(t),a=r(i,o,u,n,i!==e);if(a.done)return a.value;var s=l(o,RegExp),h=o.unicode,y=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(O?"g":"y"),g=new s(O?"^(?:"+o.source+")":o,y),b=void 0===n?_:n>>>0;if(0===b)return[];if(0===u.length)return null===v(g,u)?[u]:[];for(var m=0,j=0,x=[];j<u.length;){g.lastIndex=O?0:j;var P,A=v(g,O?S(u,j):u);if(null===A||(P=w(p(g.lastIndex+(O?j:0)),u.length))===m)j=f(u,j,h);else{if(E(x,S(u,m,j)),x.length===b)return x;for(var k=1;k<=A.length-1;k++)if(E(x,A[k]),x.length===b)return x;j=m=P}}return E(x,S(u,m)),x}]}),!P,O)},function(t,e,r){r(16)({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991})},function(t,e,r){"use strict";var n={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!n.call({1:2},1);e.f=i?function(t){var e=o(this,t);return!!e&&e.enumerable}:n},function(t,e,r){var n=r(7),o=r(15),i=r(18),u=r(51),a=n.Object,c=o("".split);t.exports=i((function(){return!a("z").propertyIsEnumerable(0)}))?function(t){return"String"==u(t)?c(t,""):a(t)}:a},function(t,e,r){var n=r(131),o=r(87);t.exports=function(t){var e=n(t,"string");return o(e)?e:e+""}},function(t,e,r){var n=r(7),o=r(46),i=r(30),u=r(54),a=r(132),c=n.Object;t.exports=a?function(t){return"symbol"==typeof t}:function(t){var e=o("Symbol");return i(e)&&u(e.prototype,c(t))}},function(t,e,r){var n=r(7).String;t.exports=function(t){try{return n(t)}catch(t){return"Object"}}},function(t,e,r){var n=r(71),o=r(109);(t.exports=function(t,e){return o[t]||(o[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.19.3",mode:n?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},function(t,e,r){var n=r(15),o=0,i=Math.random(),u=n(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+u(++o+i,36)}},function(t,e,r){var n=r(7),o=r(33),i=n.document,u=o(i)&&o(i.createElement);t.exports=function(t){return u?i.createElement(t):{}}},function(t,e,r){var n=r(15),o=r(30),i=r(109),u=n(Function.toString);o(i.inspectSource)||(i.inspectSource=function(t){return u(t)}),t.exports=i.inspectSource},function(t,e,r){var n=r(89),o=r(90),i=n("keys");t.exports=function(t){return i[t]||(i[t]=o(t))}},function(t,e,r){var n=r(59),o=Math.min;t.exports=function(t){return t>0?o(n(t),9007199254740991):0}},function(t,e,r){var n=r(18),o=r(30),i=/#|\.prototype\./,u=function(t,e){var r=c[a(t)];return r==l||r!=s&&(o(e)?n(e):!!e)},a=u.normalize=function(t){return String(t).replace(i,".").toLowerCase()},c=u.data={},s=u.NATIVE="N",l=u.POLYFILL="P";t.exports=u},function(t,e,r){var n=r(51);t.exports=Array.isArray||function(t){return"Array"==n(t)}},function(t,e,r){var n=r(7),o=r(113),i=r(30),u=r(51),a=r(28)("toStringTag"),c=n.Object,s="Arguments"==u(function(){return arguments}());t.exports=o?u:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=c(t),a))?r:s?u(e):"Object"==(n=u(e))&&i(e.callee)?"Arguments":n}},function(t,e,r){var n=r(15);t.exports=n([].slice)},function(t,e,r){var n=r(15),o=r(18),i=r(30),u=r(97),a=r(46),c=r(92),s=function(){},l=[],f=a("Reflect","construct"),p=/^\s*(?:class|function)\b/,d=n(p.exec),h=!p.exec(s),y=function(t){if(!i(t))return!1;try{return f(s,l,t),!0}catch(t){return!1}};t.exports=!f||o((function(){var t;return y(y.call)||!y(Object)||!y((function(){t=!0}))||t}))?function(t){if(!i(t))return!1;switch(u(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return h||!!d(p,c(t))}:y},function(t,e,r){var n=r(28),o=r(60),i=r(38),u=n("unscopables"),a=Array.prototype;null==a[u]&&i.f(a,u,{configurable:!0,value:o(null)}),t.exports=function(t){a[u][t]=!0}},function(t,e,r){var n=r(7),o=r(35),i=r(30),u=r(40),a=r(93),c=r(143),s=a("IE_PROTO"),l=n.Object,f=l.prototype;t.exports=c?l.getPrototypeOf:function(t){var e=u(t);if(o(e,s))return e[s];var r=e.constructor;return i(r)&&e instanceof r?r.prototype:e instanceof l?f:null}},function(t,e,r){var n=r(15),o=r(32),i=r(181);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=n(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return o(r),i(n),e?t(r,n):r.__proto__=n,r}}():void 0)},function(t,e,r){"use strict";var n,o,i=r(34),u=r(15),a=r(39),c=r(154),s=r(155),l=r(89),f=r(60),p=r(58).get,d=r(190),h=r(191),y=l("native-string-replace",String.prototype.replace),v=RegExp.prototype.exec,g=v,b=u("".charAt),m=u("".indexOf),O=u("".replace),_=u("".slice),w=(o=/b*/g,i(v,n=/a/,"a"),i(v,o,"a"),0!==n.lastIndex||0!==o.lastIndex),j=s.BROKEN_CARET,x=void 0!==/()??/.exec("")[1];(w||x||j||d||h)&&(g=function(t){var e,r,n,o,u,s,l,d=this,h=p(d),E=a(t),S=h.raw;if(S)return S.lastIndex=d.lastIndex,e=i(g,S,E),d.lastIndex=S.lastIndex,e;var P=h.groups,A=j&&d.sticky,k=i(c,d),D=d.source,T=0,M=E;if(A&&(k=O(k,"y",""),-1===m(k,"g")&&(k+="g"),M=_(E,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==b(E,d.lastIndex-1))&&(D="(?: "+D+")",M=" "+M,T++),r=new RegExp("^(?:"+D+")",k)),x&&(r=new RegExp("^"+D+"$(?!\\s)",k)),w&&(n=d.lastIndex),o=i(v,A?r:d,M),A?o?(o.input=_(o.input,T),o[0]=_(o[0],T),o.index=d.lastIndex,d.lastIndex+=o[0].length):d.lastIndex=0:w&&o&&(d.lastIndex=d.global?o.index+o[0].length:n),x&&o&&o.length>1&&i(y,o[0],r,(function(){for(u=1;u<arguments.length-2;u++)void 0===arguments[u]&&(o[u]=void 0)})),o&&P)for(o.groups=s=f(null),u=0;u<P.length;u++)s[(l=P[u])[0]]=o[l[1]];return o}),t.exports=g},function(t,e,r){"use strict";var n=r(16),o=r(7),i=r(75),u=r(59),a=r(45),c=r(40),s=r(115),l=r(63),f=r(81)("splice"),p=o.TypeError,d=Math.max,h=Math.min,y=9007199254740991,v="Maximum allowed length exceeded";n({target:"Array",proto:!0,forced:!f},{splice:function(t,e){var r,n,o,f,g,b,m=c(this),O=a(m),_=i(t,O),w=arguments.length;if(0===w?r=n=0:1===w?(r=0,n=O-_):(r=w-2,n=h(d(u(e),0),O-_)),O+r-n>y)throw p(v);for(o=s(m,n),f=0;f<n;f++)(g=_+f)in m&&l(o,f,m[g]);if(o.length=n,r<n){for(f=_;f<O-n;f++)b=f+r,(g=f+n)in m?m[b]=m[g]:delete m[b];for(f=O;f>O-n+r;f--)delete m[f-1]}else if(r>n)for(f=O-n;f>_;f--)b=f+r-1,(g=f+n-1)in m?m[b]=m[g]:delete m[b];for(f=0;f<r;f++)m[f+_]=arguments[f+2];return m.length=O-n+r,o}})},function(t,e,r){"use strict";var n=r(16),o=r(205);n({target:"String",proto:!0,forced:r(206)("anchor")},{anchor:function(t){return o(this,"a","name",t)}})},function(t,e,r){"use strict";(function(t){var r="object"==typeof t&&t&&t.Object===Object&&t;e.a=r}).call(this,r(68))},function(t,e,r){"use strict";(function(t){var n=r(31),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,u=i&&i.exports===o?n.a.Buffer:void 0,a=u?u.allocUnsafe:void 0;e.a=function(t,e){if(e)return t.slice();var r=t.length,n=a?a(r):new t.constructor(r);return t.copy(n),n}}).call(this,r(122)(t))},function(t,e,r){var n=r(70),o=r(18);t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},function(t,e,r){var n=r(7),o=r(110),i="__core-js_shared__",u=n[i]||o(i,{});t.exports=u},function(t,e,r){var n=r(7),o=Object.defineProperty;t.exports=function(t,e){try{o(n,t,{value:e,configurable:!0,writable:!0})}catch(r){n[t]=e}return e}},function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,r){var n={};n[r(28)("toStringTag")]="z",t.exports="[object z]"===String(n)},function(t,e,r){var n=r(7),o=r(75),i=r(45),u=r(63),a=n.Array,c=Math.max;t.exports=function(t,e,r){for(var n=i(t),s=o(e,n),l=o(void 0===r?n:r,n),f=a(c(l-s,0)),p=0;s<l;s++,p++)u(f,p,t[s]);return f.length=p,f}},function(t,e,r){var n=r(178);t.exports=function(t,e){return new(n(t))(0===e?0:e)}},function(t,e,r){"use strict";var n=r(16),o=r(34),i=r(71),u=r(73),a=r(30),c=r(180),s=r(101),l=r(102),f=r(78),p=r(57),d=r(42),h=r(28),y=r(80),v=r(142),g=u.PROPER,b=u.CONFIGURABLE,m=v.IteratorPrototype,O=v.BUGGY_SAFARI_ITERATORS,_=h("iterator"),w="keys",j="values",x="entries",E=function(){return this};t.exports=function(t,e,r,u,h,v,S){c(r,e,u);var P,A,k,D=function(t){if(t===h&&R)return R;if(!O&&t in N)return N[t];switch(t){case w:case j:case x:return function(){return new r(this,t)}}return function(){return new r(this)}},T=e+" Iterator",M=!1,N=t.prototype,C=N[_]||N["@@iterator"]||h&&N[h],R=!O&&C||D(h),I="Array"==e&&N.entries||C;if(I&&(P=s(I.call(new t)))!==Object.prototype&&P.next&&(i||s(P)===m||(l?l(P,m):a(P[_])||d(P,_,E)),f(P,T,!0,!0),i&&(y[T]=E)),g&&h==j&&C&&C.name!==j&&(!i&&b?p(N,"name",j):(M=!0,R=function(){return o(C,this)})),h)if(A={values:D(j),keys:v?R:D(w),entries:D(x)},S)for(k in A)(O||M||!(k in N))&&d(N,k,A[k]);else n({target:e,proto:!0,forced:O||M},A);return i&&!S||N[_]===R||d(N,_,R,{name:h}),y[e]=R,A}},function(t,e,r){var n=r(7),o=r(64),i=r(34),u=r(32),a=r(88),c=r(145),s=r(45),l=r(54),f=r(146),p=r(118),d=r(147),h=n.TypeError,y=function(t,e){this.stopped=t,this.result=e},v=y.prototype;t.exports=function(t,e,r){var n,g,b,m,O,_,w,j=r&&r.that,x=!(!r||!r.AS_ENTRIES),E=!(!r||!r.IS_ITERATOR),S=!(!r||!r.INTERRUPTED),P=o(e,j),A=function(t){return n&&d(n,"normal",t),new y(!0,t)},k=function(t){return x?(u(t),S?P(t[0],t[1],A):P(t[0],t[1])):S?P(t,A):P(t)};if(E)n=t;else{if(!(g=p(t)))throw h(a(t)+" is not iterable");if(c(g)){for(b=0,m=s(t);m>b;b++)if((O=k(t[b]))&&l(v,O))return O;return new y(!1)}n=f(t,g)}for(_=n.next;!(w=i(_,n)).done;){try{O=k(w.value)}catch(t){d(n,"throw",t)}if("object"==typeof O&&O&&l(v,O))return O}return new y(!1)}},function(t,e,r){var n=r(97),o=r(62),i=r(80),u=r(28)("iterator");t.exports=function(t){if(null!=t)return o(t,u)||o(t,"@@iterator")||i[n(t)]}},function(t,e,r){var n=r(7),o=r(54),i=n.TypeError;t.exports=function(t,e){if(o(e,t))return t;throw i("Incorrect invocation")}},function(t,e,r){var n=r(28)("iterator"),o=!1;try{var i=0,u={next:function(){return{done:!!i++}},return:function(){o=!0}};u[n]=function(){return this},Array.from(u,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!o)return!1;var r=!1;try{var i={};i[n]=function(){return{next:function(){return{done:r=!0}}}},t(i)}catch(t){}return r}},function(t,e,r){"use strict";var n=r(18);t.exports=function(t,e){var r=[][t];return!!r&&n((function(){r.call(null,e||function(){throw 1},1)}))}},function(t,e){t.exports=function(t){if(!t.webpackPolyfill){var e=Object.create(t);e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),Object.defineProperty(e,"exports",{enumerable:!0}),e.webpackPolyfill=1}return e}},function(t,e,r){"use strict";r(19);var n=r(15),o=r(42),i=r(103),u=r(18),a=r(28),c=r(57),s=a("species"),l=RegExp.prototype;t.exports=function(t,e,r,f){var p=a(t),d=!u((function(){var e={};return e[p]=function(){return 7},7!=""[t](e)})),h=d&&!u((function(){var e=!1,r=/a/;return"split"===t&&((r={}).constructor={},r.constructor[s]=function(){return r},r.flags="",r[p]=/./[p]),r.exec=function(){return e=!0,null},r[p](""),!e}));if(!d||!h||r){var y=n(/./[p]),v=e(p,""[t],(function(t,e,r,o,u){var a=n(t),c=e.exec;return c===i||c===l.exec?d&&!u?{done:!0,value:y(e,r,o)}:{done:!0,value:a(r,e,o)}:{done:!1}}));o(String.prototype,t,v[0]),o(l,p,v[1])}f&&c(l[p],"sham",!0)}},function(t,e,r){"use strict";var n=r(151).charAt;t.exports=function(t,e,r){return e+(r?n(t,e).length:1)}},function(t,e,r){var n=r(7),o=r(34),i=r(32),u=r(30),a=r(51),c=r(103),s=n.TypeError;t.exports=function(t,e){var r=t.exec;if(u(r)){var n=o(r,t,e);return null!==n&&i(n),n}if("RegExp"===a(t))return o(c,t,e);throw s("RegExp#exec called on incompatible receiver")}},function(t,e,r){"use strict";var n=r(76),o=r(34),i=r(15),u=r(123),a=r(18),c=r(32),s=r(30),l=r(59),f=r(94),p=r(39),d=r(44),h=r(124),y=r(62),v=r(201),g=r(125),b=r(28)("replace"),m=Math.max,O=Math.min,_=i([].concat),w=i([].push),j=i("".indexOf),x=i("".slice),E="$0"==="a".replace(/./,"$0"),S=!!/./[b]&&""===/./[b]("a","$0");u("replace",(function(t,e,r){var i=S?"$":"$0";return[function(t,r){var n=d(this),i=null==t?void 0:y(t,b);return i?o(i,t,n,r):o(e,p(n),t,r)},function(t,o){var u=c(this),a=p(t);if("string"==typeof o&&-1===j(o,i)&&-1===j(o,"$<")){var d=r(e,u,a,o);if(d.done)return d.value}var y=s(o);y||(o=p(o));var b=u.global;if(b){var E=u.unicode;u.lastIndex=0}for(var S=[];;){var P=g(u,a);if(null===P)break;if(w(S,P),!b)break;""===p(P[0])&&(u.lastIndex=h(a,f(u.lastIndex),E))}for(var A,k="",D=0,T=0;T<S.length;T++){for(var M=p((P=S[T])[0]),N=m(O(l(P.index),a.length),0),C=[],R=1;R<P.length;R++)w(C,void 0===(A=P[R])?A:String(A));var I=P.groups;if(y){var L=_([M],C,N,a);void 0!==I&&w(L,I);var z=p(n(o,void 0,L))}else z=v(M,a,N,C,I,o);N>=D&&(k+=x(a,D,N)+z,D=N+M.length)}return k+x(a,D)}]}),!!a((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!E||S)},function(t,e,r){var n=r(16),o=Math.hypot,i=Math.abs,u=Math.sqrt;n({target:"Math",stat:!0,forced:!!o&&o(1/0,NaN)!==1/0},{hypot:function(t,e){for(var r,n,o=0,a=0,c=arguments.length,s=0;a<c;)s<(r=i(arguments[a++]))?(o=o*(n=s/r)*n+1,s=r):o+=r>0?(n=r/s)*n:r;return s===1/0?1/0:s*u(o)}})},function(t,e,r){var n=r(51),o=r(7);t.exports="process"==n(o.process)},function(t,e,r){r(16)({target:"Number",stat:!0},{MIN_SAFE_INTEGER:-9007199254740991})},function(t,e,r){(function(t,n){var o;
16
16
  /**
17
17
  * @license
18
18
  * Lodash <https://lodash.com/>
@@ -20,4 +20,4 @@ and limitations under the License.
20
20
  * Released under MIT license <https://lodash.com/license>
21
21
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
22
22
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
23
- */(function(){var i,u="Expected a function",a="__lodash_hash_undefined__",c="__lodash_placeholder__",s=16,l=32,f=64,p=128,h=256,d=1/0,y=9007199254740991,v=NaN,g=4294967295,b=[["ary",p],["bind",1],["bindKey",2],["curry",8],["curryRight",s],["flip",512],["partial",l],["partialRight",f],["rearg",h]],m="[object Arguments]",O="[object Array]",_="[object Boolean]",w="[object Date]",j="[object Error]",x="[object Function]",E="[object GeneratorFunction]",S="[object Map]",P="[object Number]",A="[object Object]",k="[object Promise]",D="[object RegExp]",T="[object Set]",M="[object String]",N="[object Symbol]",C="[object WeakMap]",R="[object ArrayBuffer]",I="[object DataView]",L="[object Float32Array]",z="[object Float64Array]",B="[object Int8Array]",U="[object Int16Array]",F="[object Int32Array]",H="[object Uint8Array]",X="[object Uint8ClampedArray]",G="[object Uint16Array]",Y="[object Uint32Array]",V=/\b__p \+= '';/g,W=/\b(__p \+=) '' \+/g,K=/(__e\(.*?\)|\b__t\)) \+\n'';/g,$=/&(?:amp|lt|gt|quot|#39);/g,Z=/[&<>"']/g,q=RegExp($.source),J=RegExp(Z.source),Q=/<%-([\s\S]+?)%>/g,tt=/<%([\s\S]+?)%>/g,et=/<%=([\s\S]+?)%>/g,rt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nt=/^\w*$/,ot=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,it=/[\\^$.*+?()[\]{}|]/g,ut=RegExp(it.source),at=/^\s+/,ct=/\s/,st=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,lt=/\{\n\/\* \[wrapped with (.+)\] \*/,ft=/,? & /,pt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ht=/[()=,{}\[\]\/\s]/,dt=/\\(\\)?/g,yt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,vt=/\w*$/,gt=/^[-+]0x[0-9a-f]+$/i,bt=/^0b[01]+$/i,mt=/^\[object .+?Constructor\]$/,Ot=/^0o[0-7]+$/i,_t=/^(?:0|[1-9]\d*)$/,wt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,jt=/($^)/,xt=/['\n\r\u2028\u2029\\]/g,Et="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",St="\\u2700-\\u27bf",Pt="a-z\\xdf-\\xf6\\xf8-\\xff",At="A-Z\\xc0-\\xd6\\xd8-\\xde",kt="\\ufe0e\\ufe0f",Dt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Tt="['’]",Mt="[\\ud800-\\udfff]",Nt="["+Dt+"]",Ct="["+Et+"]",Rt="\\d+",It="[\\u2700-\\u27bf]",Lt="["+Pt+"]",zt="[^\\ud800-\\udfff"+Dt+Rt+St+Pt+At+"]",Bt="\\ud83c[\\udffb-\\udfff]",Ut="[^\\ud800-\\udfff]",Ft="(?:\\ud83c[\\udde6-\\uddff]){2}",Ht="[\\ud800-\\udbff][\\udc00-\\udfff]",Xt="["+At+"]",Gt="(?:"+Lt+"|"+zt+")",Yt="(?:"+Xt+"|"+zt+")",Vt="(?:['’](?:d|ll|m|re|s|t|ve))?",Wt="(?:['’](?:D|LL|M|RE|S|T|VE))?",Kt="(?:"+Ct+"|"+Bt+")"+"?",$t="[\\ufe0e\\ufe0f]?",Zt=$t+Kt+("(?:\\u200d(?:"+[Ut,Ft,Ht].join("|")+")"+$t+Kt+")*"),qt="(?:"+[It,Ft,Ht].join("|")+")"+Zt,Jt="(?:"+[Ut+Ct+"?",Ct,Ft,Ht,Mt].join("|")+")",Qt=RegExp(Tt,"g"),te=RegExp(Ct,"g"),ee=RegExp(Bt+"(?="+Bt+")|"+Jt+Zt,"g"),re=RegExp([Xt+"?"+Lt+"+"+Vt+"(?="+[Nt,Xt,"$"].join("|")+")",Yt+"+"+Wt+"(?="+[Nt,Xt+Gt,"$"].join("|")+")",Xt+"?"+Gt+"+"+Vt,Xt+"+"+Wt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Rt,qt].join("|"),"g"),ne=RegExp("[\\u200d\\ud800-\\udfff"+Et+kt+"]"),oe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ie=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ue=-1,ae={};ae[L]=ae[z]=ae[B]=ae[U]=ae[F]=ae[H]=ae[X]=ae[G]=ae[Y]=!0,ae[m]=ae[O]=ae[R]=ae[_]=ae[I]=ae[w]=ae[j]=ae[x]=ae[S]=ae[P]=ae[A]=ae[D]=ae[T]=ae[M]=ae[C]=!1;var ce={};ce[m]=ce[O]=ce[R]=ce[I]=ce[_]=ce[w]=ce[L]=ce[z]=ce[B]=ce[U]=ce[F]=ce[S]=ce[P]=ce[A]=ce[D]=ce[T]=ce[M]=ce[N]=ce[H]=ce[X]=ce[G]=ce[Y]=!0,ce[j]=ce[x]=ce[C]=!1;var se={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},le=parseFloat,fe=parseInt,pe="object"==typeof t&&t&&t.Object===Object&&t,he="object"==typeof self&&self&&self.Object===Object&&self,de=pe||he||Function("return this")(),ye=e&&!e.nodeType&&e,ve=ye&&"object"==typeof n&&n&&!n.nodeType&&n,ge=ve&&ve.exports===ye,be=ge&&pe.process,me=function(){try{var t=ve&&ve.require&&ve.require("util").types;return t||be&&be.binding&&be.binding("util")}catch(t){}}(),Oe=me&&me.isArrayBuffer,_e=me&&me.isDate,we=me&&me.isMap,je=me&&me.isRegExp,xe=me&&me.isSet,Ee=me&&me.isTypedArray;function Se(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function Pe(t,e,r,n){for(var o=-1,i=null==t?0:t.length;++o<i;){var u=t[o];e(n,u,r(u),t)}return n}function Ae(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t}function ke(t,e){for(var r=null==t?0:t.length;r--&&!1!==e(t[r],r,t););return t}function De(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(!e(t[r],r,t))return!1;return!0}function Te(t,e){for(var r=-1,n=null==t?0:t.length,o=0,i=[];++r<n;){var u=t[r];e(u,r,t)&&(i[o++]=u)}return i}function Me(t,e){return!!(null==t?0:t.length)&&He(t,e,0)>-1}function Ne(t,e,r){for(var n=-1,o=null==t?0:t.length;++n<o;)if(r(e,t[n]))return!0;return!1}function Ce(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o}function Re(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}function Ie(t,e,r,n){var o=-1,i=null==t?0:t.length;for(n&&i&&(r=t[++o]);++o<i;)r=e(r,t[o],o,t);return r}function Le(t,e,r,n){var o=null==t?0:t.length;for(n&&o&&(r=t[--o]);o--;)r=e(r,t[o],o,t);return r}function ze(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}var Be=Ve("length");function Ue(t,e,r){var n;return r(t,(function(t,r,o){if(e(t,r,o))return n=r,!1})),n}function Fe(t,e,r,n){for(var o=t.length,i=r+(n?1:-1);n?i--:++i<o;)if(e(t[i],i,t))return i;return-1}function He(t,e,r){return e==e?function(t,e,r){var n=r-1,o=t.length;for(;++n<o;)if(t[n]===e)return n;return-1}(t,e,r):Fe(t,Ge,r)}function Xe(t,e,r,n){for(var o=r-1,i=t.length;++o<i;)if(n(t[o],e))return o;return-1}function Ge(t){return t!=t}function Ye(t,e){var r=null==t?0:t.length;return r?$e(t,e)/r:v}function Ve(t){return function(e){return null==e?i:e[t]}}function We(t){return function(e){return null==t?i:t[e]}}function Ke(t,e,r,n,o){return o(t,(function(t,o,i){r=n?(n=!1,t):e(r,t,o,i)})),r}function $e(t,e){for(var r,n=-1,o=t.length;++n<o;){var u=e(t[n]);u!==i&&(r=r===i?u:r+u)}return r}function Ze(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}function qe(t){return t?t.slice(0,yr(t)+1).replace(at,""):t}function Je(t){return function(e){return t(e)}}function Qe(t,e){return Ce(e,(function(e){return t[e]}))}function tr(t,e){return t.has(e)}function er(t,e){for(var r=-1,n=t.length;++r<n&&He(e,t[r],0)>-1;);return r}function rr(t,e){for(var r=t.length;r--&&He(e,t[r],0)>-1;);return r}function nr(t,e){for(var r=t.length,n=0;r--;)t[r]===e&&++n;return n}var or=We({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),ir=We({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function ur(t){return"\\"+se[t]}function ar(t){return ne.test(t)}function cr(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r}function sr(t,e){return function(r){return t(e(r))}}function lr(t,e){for(var r=-1,n=t.length,o=0,i=[];++r<n;){var u=t[r];u!==e&&u!==c||(t[r]=c,i[o++]=r)}return i}function fr(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r}function pr(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=[t,t]})),r}function hr(t){return ar(t)?function(t){var e=ee.lastIndex=0;for(;ee.test(t);)++e;return e}(t):Be(t)}function dr(t){return ar(t)?function(t){return t.match(ee)||[]}(t):function(t){return t.split("")}(t)}function yr(t){for(var e=t.length;e--&&ct.test(t.charAt(e)););return e}var vr=We({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var gr=function t(e){var r,n=(e=null==e?de:gr.defaults(de.Object(),e,gr.pick(de,ie))).Array,o=e.Date,ct=e.Error,Et=e.Function,St=e.Math,Pt=e.Object,At=e.RegExp,kt=e.String,Dt=e.TypeError,Tt=n.prototype,Mt=Et.prototype,Nt=Pt.prototype,Ct=e["__core-js_shared__"],Rt=Mt.toString,It=Nt.hasOwnProperty,Lt=0,zt=(r=/[^.]+$/.exec(Ct&&Ct.keys&&Ct.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",Bt=Nt.toString,Ut=Rt.call(Pt),Ft=de._,Ht=At("^"+Rt.call(It).replace(it,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Xt=ge?e.Buffer:i,Gt=e.Symbol,Yt=e.Uint8Array,Vt=Xt?Xt.allocUnsafe:i,Wt=sr(Pt.getPrototypeOf,Pt),Kt=Pt.create,$t=Nt.propertyIsEnumerable,Zt=Tt.splice,qt=Gt?Gt.isConcatSpreadable:i,Jt=Gt?Gt.iterator:i,ee=Gt?Gt.toStringTag:i,ne=function(){try{var t=di(Pt,"defineProperty");return t({},"",{}),t}catch(t){}}(),se=e.clearTimeout!==de.clearTimeout&&e.clearTimeout,pe=o&&o.now!==de.Date.now&&o.now,he=e.setTimeout!==de.setTimeout&&e.setTimeout,ye=St.ceil,ve=St.floor,be=Pt.getOwnPropertySymbols,me=Xt?Xt.isBuffer:i,Be=e.isFinite,We=Tt.join,br=sr(Pt.keys,Pt),mr=St.max,Or=St.min,_r=o.now,wr=e.parseInt,jr=St.random,xr=Tt.reverse,Er=di(e,"DataView"),Sr=di(e,"Map"),Pr=di(e,"Promise"),Ar=di(e,"Set"),kr=di(e,"WeakMap"),Dr=di(Pt,"create"),Tr=kr&&new kr,Mr={},Nr=Fi(Er),Cr=Fi(Sr),Rr=Fi(Pr),Ir=Fi(Ar),Lr=Fi(kr),zr=Gt?Gt.prototype:i,Br=zr?zr.valueOf:i,Ur=zr?zr.toString:i;function Fr(t){if(oa(t)&&!Wu(t)&&!(t instanceof Yr)){if(t instanceof Gr)return t;if(It.call(t,"__wrapped__"))return Hi(t)}return new Gr(t)}var Hr=function(){function t(){}return function(e){if(!na(e))return{};if(Kt)return Kt(e);t.prototype=e;var r=new t;return t.prototype=i,r}}();function Xr(){}function Gr(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=i}function Yr(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=g,this.__views__=[]}function Vr(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Wr(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Kr(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function $r(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new Kr;++e<r;)this.add(t[e])}function Zr(t){var e=this.__data__=new Wr(t);this.size=e.size}function qr(t,e){var r=Wu(t),n=!r&&Vu(t),o=!r&&!n&&qu(t),i=!r&&!n&&!o&&pa(t),u=r||n||o||i,a=u?Ze(t.length,kt):[],c=a.length;for(var s in t)!e&&!It.call(t,s)||u&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||_i(s,c))||a.push(s);return a}function Jr(t){var e=t.length;return e?t[Zn(0,e-1)]:i}function Qr(t,e){return zi(Mo(t),sn(e,0,t.length))}function tn(t){return zi(Mo(t))}function en(t,e,r){(r!==i&&!Xu(t[e],r)||r===i&&!(e in t))&&an(t,e,r)}function rn(t,e,r){var n=t[e];It.call(t,e)&&Xu(n,r)&&(r!==i||e in t)||an(t,e,r)}function nn(t,e){for(var r=t.length;r--;)if(Xu(t[r][0],e))return r;return-1}function on(t,e,r,n){return dn(t,(function(t,o,i){e(n,t,r(t),i)})),n}function un(t,e){return t&&No(e,Ca(e),t)}function an(t,e,r){"__proto__"==e&&ne?ne(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function cn(t,e){for(var r=-1,o=e.length,u=n(o),a=null==t;++r<o;)u[r]=a?i:ka(t,e[r]);return u}function sn(t,e,r){return t==t&&(r!==i&&(t=t<=r?t:r),e!==i&&(t=t>=e?t:e)),t}function ln(t,e,r,n,o,u){var a,c=1&e,s=2&e,l=4&e;if(r&&(a=o?r(t,n,o,u):r(t)),a!==i)return a;if(!na(t))return t;var f=Wu(t);if(f){if(a=function(t){var e=t.length,r=new t.constructor(e);e&&"string"==typeof t[0]&&It.call(t,"index")&&(r.index=t.index,r.input=t.input);return r}(t),!c)return Mo(t,a)}else{var p=gi(t),h=p==x||p==E;if(qu(t))return So(t,c);if(p==A||p==m||h&&!o){if(a=s||h?{}:mi(t),!c)return s?function(t,e){return No(t,vi(t),e)}(t,function(t,e){return t&&No(e,Ra(e),t)}(a,t)):function(t,e){return No(t,yi(t),e)}(t,un(a,t))}else{if(!ce[p])return o?t:{};a=function(t,e,r){var n=t.constructor;switch(e){case R:return Po(t);case _:case w:return new n(+t);case I:return function(t,e){var r=e?Po(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}(t,r);case L:case z:case B:case U:case F:case H:case X:case G:case Y:return Ao(t,r);case S:return new n;case P:case M:return new n(t);case D:return function(t){var e=new t.constructor(t.source,vt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case T:return new n;case N:return o=t,Br?Pt(Br.call(o)):{}}var o}(t,p,c)}}u||(u=new Zr);var d=u.get(t);if(d)return d;u.set(t,a),sa(t)?t.forEach((function(n){a.add(ln(n,e,r,n,t,u))})):ia(t)&&t.forEach((function(n,o){a.set(o,ln(n,e,r,o,t,u))}));var y=f?i:(l?s?ai:ui:s?Ra:Ca)(t);return Ae(y||t,(function(n,o){y&&(n=t[o=n]),rn(a,o,ln(n,e,r,o,t,u))})),a}function fn(t,e,r){var n=r.length;if(null==t)return!n;for(t=Pt(t);n--;){var o=r[n],u=e[o],a=t[o];if(a===i&&!(o in t)||!u(a))return!1}return!0}function pn(t,e,r){if("function"!=typeof t)throw new Dt(u);return Ci((function(){t.apply(i,r)}),e)}function hn(t,e,r,n){var o=-1,i=Me,u=!0,a=t.length,c=[],s=e.length;if(!a)return c;r&&(e=Ce(e,Je(r))),n?(i=Ne,u=!1):e.length>=200&&(i=tr,u=!1,e=new $r(e));t:for(;++o<a;){var l=t[o],f=null==r?l:r(l);if(l=n||0!==l?l:0,u&&f==f){for(var p=s;p--;)if(e[p]===f)continue t;c.push(l)}else i(e,f,n)||c.push(l)}return c}Fr.templateSettings={escape:Q,evaluate:tt,interpolate:et,variable:"",imports:{_:Fr}},Fr.prototype=Xr.prototype,Fr.prototype.constructor=Fr,Gr.prototype=Hr(Xr.prototype),Gr.prototype.constructor=Gr,Yr.prototype=Hr(Xr.prototype),Yr.prototype.constructor=Yr,Vr.prototype.clear=function(){this.__data__=Dr?Dr(null):{},this.size=0},Vr.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Vr.prototype.get=function(t){var e=this.__data__;if(Dr){var r=e[t];return r===a?i:r}return It.call(e,t)?e[t]:i},Vr.prototype.has=function(t){var e=this.__data__;return Dr?e[t]!==i:It.call(e,t)},Vr.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Dr&&e===i?a:e,this},Wr.prototype.clear=function(){this.__data__=[],this.size=0},Wr.prototype.delete=function(t){var e=this.__data__,r=nn(e,t);return!(r<0)&&(r==e.length-1?e.pop():Zt.call(e,r,1),--this.size,!0)},Wr.prototype.get=function(t){var e=this.__data__,r=nn(e,t);return r<0?i:e[r][1]},Wr.prototype.has=function(t){return nn(this.__data__,t)>-1},Wr.prototype.set=function(t,e){var r=this.__data__,n=nn(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this},Kr.prototype.clear=function(){this.size=0,this.__data__={hash:new Vr,map:new(Sr||Wr),string:new Vr}},Kr.prototype.delete=function(t){var e=pi(this,t).delete(t);return this.size-=e?1:0,e},Kr.prototype.get=function(t){return pi(this,t).get(t)},Kr.prototype.has=function(t){return pi(this,t).has(t)},Kr.prototype.set=function(t,e){var r=pi(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this},$r.prototype.add=$r.prototype.push=function(t){return this.__data__.set(t,a),this},$r.prototype.has=function(t){return this.__data__.has(t)},Zr.prototype.clear=function(){this.__data__=new Wr,this.size=0},Zr.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},Zr.prototype.get=function(t){return this.__data__.get(t)},Zr.prototype.has=function(t){return this.__data__.has(t)},Zr.prototype.set=function(t,e){var r=this.__data__;if(r instanceof Wr){var n=r.__data__;if(!Sr||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new Kr(n)}return r.set(t,e),this.size=r.size,this};var dn=Io(wn),yn=Io(jn,!0);function vn(t,e){var r=!0;return dn(t,(function(t,n,o){return r=!!e(t,n,o)})),r}function gn(t,e,r){for(var n=-1,o=t.length;++n<o;){var u=t[n],a=e(u);if(null!=a&&(c===i?a==a&&!fa(a):r(a,c)))var c=a,s=u}return s}function bn(t,e){var r=[];return dn(t,(function(t,n,o){e(t,n,o)&&r.push(t)})),r}function mn(t,e,r,n,o){var i=-1,u=t.length;for(r||(r=Oi),o||(o=[]);++i<u;){var a=t[i];e>0&&r(a)?e>1?mn(a,e-1,r,n,o):Re(o,a):n||(o[o.length]=a)}return o}var On=Lo(),_n=Lo(!0);function wn(t,e){return t&&On(t,e,Ca)}function jn(t,e){return t&&_n(t,e,Ca)}function xn(t,e){return Te(e,(function(e){return ta(t[e])}))}function En(t,e){for(var r=0,n=(e=wo(e,t)).length;null!=t&&r<n;)t=t[Ui(e[r++])];return r&&r==n?t:i}function Sn(t,e,r){var n=e(t);return Wu(t)?n:Re(n,r(t))}function Pn(t){return null==t?t===i?"[object Undefined]":"[object Null]":ee&&ee in Pt(t)?function(t){var e=It.call(t,ee),r=t[ee];try{t[ee]=i;var n=!0}catch(t){}var o=Bt.call(t);n&&(e?t[ee]=r:delete t[ee]);return o}(t):function(t){return Bt.call(t)}(t)}function An(t,e){return t>e}function kn(t,e){return null!=t&&It.call(t,e)}function Dn(t,e){return null!=t&&e in Pt(t)}function Tn(t,e,r){for(var o=r?Ne:Me,u=t[0].length,a=t.length,c=a,s=n(a),l=1/0,f=[];c--;){var p=t[c];c&&e&&(p=Ce(p,Je(e))),l=Or(p.length,l),s[c]=!r&&(e||u>=120&&p.length>=120)?new $r(c&&p):i}p=t[0];var h=-1,d=s[0];t:for(;++h<u&&f.length<l;){var y=p[h],v=e?e(y):y;if(y=r||0!==y?y:0,!(d?tr(d,v):o(f,v,r))){for(c=a;--c;){var g=s[c];if(!(g?tr(g,v):o(t[c],v,r)))continue t}d&&d.push(v),f.push(y)}}return f}function Mn(t,e,r){var n=null==(t=Di(t,e=wo(e,t)))?t:t[Ui(Qi(e))];return null==n?i:Se(n,t,r)}function Nn(t){return oa(t)&&Pn(t)==m}function Cn(t,e,r,n,o){return t===e||(null==t||null==e||!oa(t)&&!oa(e)?t!=t&&e!=e:function(t,e,r,n,o,u){var a=Wu(t),c=Wu(e),s=a?O:gi(t),l=c?O:gi(e),f=(s=s==m?A:s)==A,p=(l=l==m?A:l)==A,h=s==l;if(h&&qu(t)){if(!qu(e))return!1;a=!0,f=!1}if(h&&!f)return u||(u=new Zr),a||pa(t)?oi(t,e,r,n,o,u):function(t,e,r,n,o,i,u){switch(r){case I:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case R:return!(t.byteLength!=e.byteLength||!i(new Yt(t),new Yt(e)));case _:case w:case P:return Xu(+t,+e);case j:return t.name==e.name&&t.message==e.message;case D:case M:return t==e+"";case S:var a=cr;case T:var c=1&n;if(a||(a=fr),t.size!=e.size&&!c)return!1;var s=u.get(t);if(s)return s==e;n|=2,u.set(t,e);var l=oi(a(t),a(e),n,o,i,u);return u.delete(t),l;case N:if(Br)return Br.call(t)==Br.call(e)}return!1}(t,e,s,r,n,o,u);if(!(1&r)){var d=f&&It.call(t,"__wrapped__"),y=p&&It.call(e,"__wrapped__");if(d||y){var v=d?t.value():t,g=y?e.value():e;return u||(u=new Zr),o(v,g,r,n,u)}}if(!h)return!1;return u||(u=new Zr),function(t,e,r,n,o,u){var a=1&r,c=ui(t),s=c.length,l=ui(e).length;if(s!=l&&!a)return!1;var f=s;for(;f--;){var p=c[f];if(!(a?p in e:It.call(e,p)))return!1}var h=u.get(t),d=u.get(e);if(h&&d)return h==e&&d==t;var y=!0;u.set(t,e),u.set(e,t);var v=a;for(;++f<s;){var g=t[p=c[f]],b=e[p];if(n)var m=a?n(b,g,p,e,t,u):n(g,b,p,t,e,u);if(!(m===i?g===b||o(g,b,r,n,u):m)){y=!1;break}v||(v="constructor"==p)}if(y&&!v){var O=t.constructor,_=e.constructor;O==_||!("constructor"in t)||!("constructor"in e)||"function"==typeof O&&O instanceof O&&"function"==typeof _&&_ instanceof _||(y=!1)}return u.delete(t),u.delete(e),y}(t,e,r,n,o,u)}(t,e,r,n,Cn,o))}function Rn(t,e,r,n){var o=r.length,u=o,a=!n;if(null==t)return!u;for(t=Pt(t);o--;){var c=r[o];if(a&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++o<u;){var s=(c=r[o])[0],l=t[s],f=c[1];if(a&&c[2]){if(l===i&&!(s in t))return!1}else{var p=new Zr;if(n)var h=n(l,f,s,t,e,p);if(!(h===i?Cn(f,l,3,n,p):h))return!1}}return!0}function In(t){return!(!na(t)||(e=t,zt&&zt in e))&&(ta(t)?Ht:mt).test(Fi(t));var e}function Ln(t){return"function"==typeof t?t:null==t?uc:"object"==typeof t?Wu(t)?Xn(t[0],t[1]):Hn(t):yc(t)}function zn(t){if(!Si(t))return br(t);var e=[];for(var r in Pt(t))It.call(t,r)&&"constructor"!=r&&e.push(r);return e}function Bn(t){if(!na(t))return function(t){var e=[];if(null!=t)for(var r in Pt(t))e.push(r);return e}(t);var e=Si(t),r=[];for(var n in t)("constructor"!=n||!e&&It.call(t,n))&&r.push(n);return r}function Un(t,e){return t<e}function Fn(t,e){var r=-1,o=$u(t)?n(t.length):[];return dn(t,(function(t,n,i){o[++r]=e(t,n,i)})),o}function Hn(t){var e=hi(t);return 1==e.length&&e[0][2]?Ai(e[0][0],e[0][1]):function(r){return r===t||Rn(r,t,e)}}function Xn(t,e){return ji(t)&&Pi(e)?Ai(Ui(t),e):function(r){var n=ka(r,t);return n===i&&n===e?Da(r,t):Cn(e,n,3)}}function Gn(t,e,r,n,o){t!==e&&On(e,(function(u,a){if(o||(o=new Zr),na(u))!function(t,e,r,n,o,u,a){var c=Mi(t,r),s=Mi(e,r),l=a.get(s);if(l)return void en(t,r,l);var f=u?u(c,s,r+"",t,e,a):i,p=f===i;if(p){var h=Wu(s),d=!h&&qu(s),y=!h&&!d&&pa(s);f=s,h||d||y?Wu(c)?f=c:Zu(c)?f=Mo(c):d?(p=!1,f=So(s,!0)):y?(p=!1,f=Ao(s,!0)):f=[]:aa(s)||Vu(s)?(f=c,Vu(c)?f=Oa(c):na(c)&&!ta(c)||(f=mi(s))):p=!1}p&&(a.set(s,f),o(f,s,n,u,a),a.delete(s));en(t,r,f)}(t,e,a,r,Gn,n,o);else{var c=n?n(Mi(t,a),u,a+"",t,e,o):i;c===i&&(c=u),en(t,a,c)}}),Ra)}function Yn(t,e){var r=t.length;if(r)return _i(e+=e<0?r:0,r)?t[e]:i}function Vn(t,e,r){e=e.length?Ce(e,(function(t){return Wu(t)?function(e){return En(e,1===t.length?t[0]:t)}:t})):[uc];var n=-1;e=Ce(e,Je(fi()));var o=Fn(t,(function(t,r,o){var i=Ce(e,(function(e){return e(t)}));return{criteria:i,index:++n,value:t}}));return function(t,e){var r=t.length;for(t.sort(e);r--;)t[r]=t[r].value;return t}(o,(function(t,e){return function(t,e,r){var n=-1,o=t.criteria,i=e.criteria,u=o.length,a=r.length;for(;++n<u;){var c=ko(o[n],i[n]);if(c)return n>=a?c:c*("desc"==r[n]?-1:1)}return t.index-e.index}(t,e,r)}))}function Wn(t,e,r){for(var n=-1,o=e.length,i={};++n<o;){var u=e[n],a=En(t,u);r(a,u)&&eo(i,wo(u,t),a)}return i}function Kn(t,e,r,n){var o=n?Xe:He,i=-1,u=e.length,a=t;for(t===e&&(e=Mo(e)),r&&(a=Ce(t,Je(r)));++i<u;)for(var c=0,s=e[i],l=r?r(s):s;(c=o(a,l,c,n))>-1;)a!==t&&Zt.call(a,c,1),Zt.call(t,c,1);return t}function $n(t,e){for(var r=t?e.length:0,n=r-1;r--;){var o=e[r];if(r==n||o!==i){var i=o;_i(o)?Zt.call(t,o,1):ho(t,o)}}return t}function Zn(t,e){return t+ve(jr()*(e-t+1))}function qn(t,e){var r="";if(!t||e<1||e>y)return r;do{e%2&&(r+=t),(e=ve(e/2))&&(t+=t)}while(e);return r}function Jn(t,e){return Ri(ki(t,e,uc),t+"")}function Qn(t){return Jr(Xa(t))}function to(t,e){var r=Xa(t);return zi(r,sn(e,0,r.length))}function eo(t,e,r,n){if(!na(t))return t;for(var o=-1,u=(e=wo(e,t)).length,a=u-1,c=t;null!=c&&++o<u;){var s=Ui(e[o]),l=r;if("__proto__"===s||"constructor"===s||"prototype"===s)return t;if(o!=a){var f=c[s];(l=n?n(f,s,c):i)===i&&(l=na(f)?f:_i(e[o+1])?[]:{})}rn(c,s,l),c=c[s]}return t}var ro=Tr?function(t,e){return Tr.set(t,e),t}:uc,no=ne?function(t,e){return ne(t,"toString",{configurable:!0,enumerable:!1,value:nc(e),writable:!0})}:uc;function oo(t){return zi(Xa(t))}function io(t,e,r){var o=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(r=r>i?i:r)<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var u=n(i);++o<i;)u[o]=t[o+e];return u}function uo(t,e){var r;return dn(t,(function(t,n,o){return!(r=e(t,n,o))})),!!r}function ao(t,e,r){var n=0,o=null==t?n:t.length;if("number"==typeof e&&e==e&&o<=2147483647){for(;n<o;){var i=n+o>>>1,u=t[i];null!==u&&!fa(u)&&(r?u<=e:u<e)?n=i+1:o=i}return o}return co(t,e,uc,r)}function co(t,e,r,n){var o=0,u=null==t?0:t.length;if(0===u)return 0;for(var a=(e=r(e))!=e,c=null===e,s=fa(e),l=e===i;o<u;){var f=ve((o+u)/2),p=r(t[f]),h=p!==i,d=null===p,y=p==p,v=fa(p);if(a)var g=n||y;else g=l?y&&(n||h):c?y&&h&&(n||!d):s?y&&h&&!d&&(n||!v):!d&&!v&&(n?p<=e:p<e);g?o=f+1:u=f}return Or(u,4294967294)}function so(t,e){for(var r=-1,n=t.length,o=0,i=[];++r<n;){var u=t[r],a=e?e(u):u;if(!r||!Xu(a,c)){var c=a;i[o++]=0===u?0:u}}return i}function lo(t){return"number"==typeof t?t:fa(t)?v:+t}function fo(t){if("string"==typeof t)return t;if(Wu(t))return Ce(t,fo)+"";if(fa(t))return Ur?Ur.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function po(t,e,r){var n=-1,o=Me,i=t.length,u=!0,a=[],c=a;if(r)u=!1,o=Ne;else if(i>=200){var s=e?null:Jo(t);if(s)return fr(s);u=!1,o=tr,c=new $r}else c=e?[]:a;t:for(;++n<i;){var l=t[n],f=e?e(l):l;if(l=r||0!==l?l:0,u&&f==f){for(var p=c.length;p--;)if(c[p]===f)continue t;e&&c.push(f),a.push(l)}else o(c,f,r)||(c!==a&&c.push(f),a.push(l))}return a}function ho(t,e){return null==(t=Di(t,e=wo(e,t)))||delete t[Ui(Qi(e))]}function yo(t,e,r,n){return eo(t,e,r(En(t,e)),n)}function vo(t,e,r,n){for(var o=t.length,i=n?o:-1;(n?i--:++i<o)&&e(t[i],i,t););return r?io(t,n?0:i,n?i+1:o):io(t,n?i+1:0,n?o:i)}function go(t,e){var r=t;return r instanceof Yr&&(r=r.value()),Ie(e,(function(t,e){return e.func.apply(e.thisArg,Re([t],e.args))}),r)}function bo(t,e,r){var o=t.length;if(o<2)return o?po(t[0]):[];for(var i=-1,u=n(o);++i<o;)for(var a=t[i],c=-1;++c<o;)c!=i&&(u[i]=hn(u[i]||a,t[c],e,r));return po(mn(u,1),e,r)}function mo(t,e,r){for(var n=-1,o=t.length,u=e.length,a={};++n<o;){var c=n<u?e[n]:i;r(a,t[n],c)}return a}function Oo(t){return Zu(t)?t:[]}function _o(t){return"function"==typeof t?t:uc}function wo(t,e){return Wu(t)?t:ji(t,e)?[t]:Bi(_a(t))}var jo=Jn;function xo(t,e,r){var n=t.length;return r=r===i?n:r,!e&&r>=n?t:io(t,e,r)}var Eo=se||function(t){return de.clearTimeout(t)};function So(t,e){if(e)return t.slice();var r=t.length,n=Vt?Vt(r):new t.constructor(r);return t.copy(n),n}function Po(t){var e=new t.constructor(t.byteLength);return new Yt(e).set(new Yt(t)),e}function Ao(t,e){var r=e?Po(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function ko(t,e){if(t!==e){var r=t!==i,n=null===t,o=t==t,u=fa(t),a=e!==i,c=null===e,s=e==e,l=fa(e);if(!c&&!l&&!u&&t>e||u&&a&&s&&!c&&!l||n&&a&&s||!r&&s||!o)return 1;if(!n&&!u&&!l&&t<e||l&&r&&o&&!n&&!u||c&&r&&o||!a&&o||!s)return-1}return 0}function Do(t,e,r,o){for(var i=-1,u=t.length,a=r.length,c=-1,s=e.length,l=mr(u-a,0),f=n(s+l),p=!o;++c<s;)f[c]=e[c];for(;++i<a;)(p||i<u)&&(f[r[i]]=t[i]);for(;l--;)f[c++]=t[i++];return f}function To(t,e,r,o){for(var i=-1,u=t.length,a=-1,c=r.length,s=-1,l=e.length,f=mr(u-c,0),p=n(f+l),h=!o;++i<f;)p[i]=t[i];for(var d=i;++s<l;)p[d+s]=e[s];for(;++a<c;)(h||i<u)&&(p[d+r[a]]=t[i++]);return p}function Mo(t,e){var r=-1,o=t.length;for(e||(e=n(o));++r<o;)e[r]=t[r];return e}function No(t,e,r,n){var o=!r;r||(r={});for(var u=-1,a=e.length;++u<a;){var c=e[u],s=n?n(r[c],t[c],c,r,t):i;s===i&&(s=t[c]),o?an(r,c,s):rn(r,c,s)}return r}function Co(t,e){return function(r,n){var o=Wu(r)?Pe:on,i=e?e():{};return o(r,t,fi(n,2),i)}}function Ro(t){return Jn((function(e,r){var n=-1,o=r.length,u=o>1?r[o-1]:i,a=o>2?r[2]:i;for(u=t.length>3&&"function"==typeof u?(o--,u):i,a&&wi(r[0],r[1],a)&&(u=o<3?i:u,o=1),e=Pt(e);++n<o;){var c=r[n];c&&t(e,c,n,u)}return e}))}function Io(t,e){return function(r,n){if(null==r)return r;if(!$u(r))return t(r,n);for(var o=r.length,i=e?o:-1,u=Pt(r);(e?i--:++i<o)&&!1!==n(u[i],i,u););return r}}function Lo(t){return function(e,r,n){for(var o=-1,i=Pt(e),u=n(e),a=u.length;a--;){var c=u[t?a:++o];if(!1===r(i[c],c,i))break}return e}}function zo(t){return function(e){var r=ar(e=_a(e))?dr(e):i,n=r?r[0]:e.charAt(0),o=r?xo(r,1).join(""):e.slice(1);return n[t]()+o}}function Bo(t){return function(e){return Ie(tc(Va(e).replace(Qt,"")),t,"")}}function Uo(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var r=Hr(t.prototype),n=t.apply(r,e);return na(n)?n:r}}function Fo(t){return function(e,r,n){var o=Pt(e);if(!$u(e)){var u=fi(r,3);e=Ca(e),r=function(t){return u(o[t],t,o)}}var a=t(e,r,n);return a>-1?o[u?e[a]:a]:i}}function Ho(t){return ii((function(e){var r=e.length,n=r,o=Gr.prototype.thru;for(t&&e.reverse();n--;){var a=e[n];if("function"!=typeof a)throw new Dt(u);if(o&&!c&&"wrapper"==si(a))var c=new Gr([],!0)}for(n=c?n:r;++n<r;){var s=si(a=e[n]),l="wrapper"==s?ci(a):i;c=l&&xi(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?c[si(l[0])].apply(c,l[3]):1==a.length&&xi(a)?c[s]():c.thru(a)}return function(){var t=arguments,n=t[0];if(c&&1==t.length&&Wu(n))return c.plant(n).value();for(var o=0,i=r?e[o].apply(this,t):n;++o<r;)i=e[o].call(this,i);return i}}))}function Xo(t,e,r,o,u,a,c,s,l,f){var h=e&p,d=1&e,y=2&e,v=24&e,g=512&e,b=y?i:Uo(t);return function i(){for(var p=arguments.length,m=n(p),O=p;O--;)m[O]=arguments[O];if(v)var _=li(i),w=nr(m,_);if(o&&(m=Do(m,o,u,v)),a&&(m=To(m,a,c,v)),p-=w,v&&p<f){var j=lr(m,_);return Zo(t,e,Xo,i.placeholder,r,m,j,s,l,f-p)}var x=d?r:this,E=y?x[t]:t;return p=m.length,s?m=Ti(m,s):g&&p>1&&m.reverse(),h&&l<p&&(m.length=l),this&&this!==de&&this instanceof i&&(E=b||Uo(E)),E.apply(x,m)}}function Go(t,e){return function(r,n){return function(t,e,r,n){return wn(t,(function(t,o,i){e(n,r(t),o,i)})),n}(r,t,e(n),{})}}function Yo(t,e){return function(r,n){var o;if(r===i&&n===i)return e;if(r!==i&&(o=r),n!==i){if(o===i)return n;"string"==typeof r||"string"==typeof n?(r=fo(r),n=fo(n)):(r=lo(r),n=lo(n)),o=t(r,n)}return o}}function Vo(t){return ii((function(e){return e=Ce(e,Je(fi())),Jn((function(r){var n=this;return t(e,(function(t){return Se(t,n,r)}))}))}))}function Wo(t,e){var r=(e=e===i?" ":fo(e)).length;if(r<2)return r?qn(e,t):e;var n=qn(e,ye(t/hr(e)));return ar(e)?xo(dr(n),0,t).join(""):n.slice(0,t)}function Ko(t){return function(e,r,o){return o&&"number"!=typeof o&&wi(e,r,o)&&(r=o=i),e=va(e),r===i?(r=e,e=0):r=va(r),function(t,e,r,o){for(var i=-1,u=mr(ye((e-t)/(r||1)),0),a=n(u);u--;)a[o?u:++i]=t,t+=r;return a}(e,r,o=o===i?e<r?1:-1:va(o),t)}}function $o(t){return function(e,r){return"string"==typeof e&&"string"==typeof r||(e=ma(e),r=ma(r)),t(e,r)}}function Zo(t,e,r,n,o,u,a,c,s,p){var h=8&e;e|=h?l:f,4&(e&=~(h?f:l))||(e&=-4);var d=[t,e,o,h?u:i,h?a:i,h?i:u,h?i:a,c,s,p],y=r.apply(i,d);return xi(t)&&Ni(y,d),y.placeholder=n,Ii(y,t,e)}function qo(t){var e=St[t];return function(t,r){if(t=ma(t),(r=null==r?0:Or(ga(r),292))&&Be(t)){var n=(_a(t)+"e").split("e");return+((n=(_a(e(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return e(t)}}var Jo=Ar&&1/fr(new Ar([,-0]))[1]==d?function(t){return new Ar(t)}:fc;function Qo(t){return function(e){var r=gi(e);return r==S?cr(e):r==T?pr(e):function(t,e){return Ce(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function ti(t,e,r,o,a,d,y,v){var g=2&e;if(!g&&"function"!=typeof t)throw new Dt(u);var b=o?o.length:0;if(b||(e&=-97,o=a=i),y=y===i?y:mr(ga(y),0),v=v===i?v:ga(v),b-=a?a.length:0,e&f){var m=o,O=a;o=a=i}var _=g?i:ci(t),w=[t,e,r,o,a,m,O,d,y,v];if(_&&function(t,e){var r=t[1],n=e[1],o=r|n,i=o<131,u=n==p&&8==r||n==p&&r==h&&t[7].length<=e[8]||384==n&&e[7].length<=e[8]&&8==r;if(!i&&!u)return t;1&n&&(t[2]=e[2],o|=1&r?0:4);var a=e[3];if(a){var s=t[3];t[3]=s?Do(s,a,e[4]):a,t[4]=s?lr(t[3],c):e[4]}(a=e[5])&&(s=t[5],t[5]=s?To(s,a,e[6]):a,t[6]=s?lr(t[5],c):e[6]);(a=e[7])&&(t[7]=a);n&p&&(t[8]=null==t[8]?e[8]:Or(t[8],e[8]));null==t[9]&&(t[9]=e[9]);t[0]=e[0],t[1]=o}(w,_),t=w[0],e=w[1],r=w[2],o=w[3],a=w[4],!(v=w[9]=w[9]===i?g?0:t.length:mr(w[9]-b,0))&&24&e&&(e&=-25),e&&1!=e)j=8==e||e==s?function(t,e,r){var o=Uo(t);return function u(){for(var a=arguments.length,c=n(a),s=a,l=li(u);s--;)c[s]=arguments[s];var f=a<3&&c[0]!==l&&c[a-1]!==l?[]:lr(c,l);return(a-=f.length)<r?Zo(t,e,Xo,u.placeholder,i,c,f,i,i,r-a):Se(this&&this!==de&&this instanceof u?o:t,this,c)}}(t,e,v):e!=l&&33!=e||a.length?Xo.apply(i,w):function(t,e,r,o){var i=1&e,u=Uo(t);return function e(){for(var a=-1,c=arguments.length,s=-1,l=o.length,f=n(l+c),p=this&&this!==de&&this instanceof e?u:t;++s<l;)f[s]=o[s];for(;c--;)f[s++]=arguments[++a];return Se(p,i?r:this,f)}}(t,e,r,o);else var j=function(t,e,r){var n=1&e,o=Uo(t);return function e(){return(this&&this!==de&&this instanceof e?o:t).apply(n?r:this,arguments)}}(t,e,r);return Ii((_?ro:Ni)(j,w),t,e)}function ei(t,e,r,n){return t===i||Xu(t,Nt[r])&&!It.call(n,r)?e:t}function ri(t,e,r,n,o,u){return na(t)&&na(e)&&(u.set(e,t),Gn(t,e,i,ri,u),u.delete(e)),t}function ni(t){return aa(t)?i:t}function oi(t,e,r,n,o,u){var a=1&r,c=t.length,s=e.length;if(c!=s&&!(a&&s>c))return!1;var l=u.get(t),f=u.get(e);if(l&&f)return l==e&&f==t;var p=-1,h=!0,d=2&r?new $r:i;for(u.set(t,e),u.set(e,t);++p<c;){var y=t[p],v=e[p];if(n)var g=a?n(v,y,p,e,t,u):n(y,v,p,t,e,u);if(g!==i){if(g)continue;h=!1;break}if(d){if(!ze(e,(function(t,e){if(!tr(d,e)&&(y===t||o(y,t,r,n,u)))return d.push(e)}))){h=!1;break}}else if(y!==v&&!o(y,v,r,n,u)){h=!1;break}}return u.delete(t),u.delete(e),h}function ii(t){return Ri(ki(t,i,Ki),t+"")}function ui(t){return Sn(t,Ca,yi)}function ai(t){return Sn(t,Ra,vi)}var ci=Tr?function(t){return Tr.get(t)}:fc;function si(t){for(var e=t.name+"",r=Mr[e],n=It.call(Mr,e)?r.length:0;n--;){var o=r[n],i=o.func;if(null==i||i==t)return o.name}return e}function li(t){return(It.call(Fr,"placeholder")?Fr:t).placeholder}function fi(){var t=Fr.iteratee||ac;return t=t===ac?Ln:t,arguments.length?t(arguments[0],arguments[1]):t}function pi(t,e){var r,n,o=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof e?"string":"hash"]:o.map}function hi(t){for(var e=Ca(t),r=e.length;r--;){var n=e[r],o=t[n];e[r]=[n,o,Pi(o)]}return e}function di(t,e){var r=function(t,e){return null==t?i:t[e]}(t,e);return In(r)?r:i}var yi=be?function(t){return null==t?[]:(t=Pt(t),Te(be(t),(function(e){return $t.call(t,e)})))}:bc,vi=be?function(t){for(var e=[];t;)Re(e,yi(t)),t=Wt(t);return e}:bc,gi=Pn;function bi(t,e,r){for(var n=-1,o=(e=wo(e,t)).length,i=!1;++n<o;){var u=Ui(e[n]);if(!(i=null!=t&&r(t,u)))break;t=t[u]}return i||++n!=o?i:!!(o=null==t?0:t.length)&&ra(o)&&_i(u,o)&&(Wu(t)||Vu(t))}function mi(t){return"function"!=typeof t.constructor||Si(t)?{}:Hr(Wt(t))}function Oi(t){return Wu(t)||Vu(t)||!!(qt&&t&&t[qt])}function _i(t,e){var r=typeof t;return!!(e=null==e?y:e)&&("number"==r||"symbol"!=r&&_t.test(t))&&t>-1&&t%1==0&&t<e}function wi(t,e,r){if(!na(r))return!1;var n=typeof e;return!!("number"==n?$u(r)&&_i(e,r.length):"string"==n&&e in r)&&Xu(r[e],t)}function ji(t,e){if(Wu(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!fa(t))||(nt.test(t)||!rt.test(t)||null!=e&&t in Pt(e))}function xi(t){var e=si(t),r=Fr[e];if("function"!=typeof r||!(e in Yr.prototype))return!1;if(t===r)return!0;var n=ci(r);return!!n&&t===n[0]}(Er&&gi(new Er(new ArrayBuffer(1)))!=I||Sr&&gi(new Sr)!=S||Pr&&gi(Pr.resolve())!=k||Ar&&gi(new Ar)!=T||kr&&gi(new kr)!=C)&&(gi=function(t){var e=Pn(t),r=e==A?t.constructor:i,n=r?Fi(r):"";if(n)switch(n){case Nr:return I;case Cr:return S;case Rr:return k;case Ir:return T;case Lr:return C}return e});var Ei=Ct?ta:mc;function Si(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Nt)}function Pi(t){return t==t&&!na(t)}function Ai(t,e){return function(r){return null!=r&&(r[t]===e&&(e!==i||t in Pt(r)))}}function ki(t,e,r){return e=mr(e===i?t.length-1:e,0),function(){for(var o=arguments,i=-1,u=mr(o.length-e,0),a=n(u);++i<u;)a[i]=o[e+i];i=-1;for(var c=n(e+1);++i<e;)c[i]=o[i];return c[e]=r(a),Se(t,this,c)}}function Di(t,e){return e.length<2?t:En(t,io(e,0,-1))}function Ti(t,e){for(var r=t.length,n=Or(e.length,r),o=Mo(t);n--;){var u=e[n];t[n]=_i(u,r)?o[u]:i}return t}function Mi(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Ni=Li(ro),Ci=he||function(t,e){return de.setTimeout(t,e)},Ri=Li(no);function Ii(t,e,r){var n=e+"";return Ri(t,function(t,e){var r=e.length;if(!r)return t;var n=r-1;return e[n]=(r>1?"& ":"")+e[n],e=e.join(r>2?", ":" "),t.replace(st,"{\n/* [wrapped with "+e+"] */\n")}(n,function(t,e){return Ae(b,(function(r){var n="_."+r[0];e&r[1]&&!Me(t,n)&&t.push(n)})),t.sort()}(function(t){var e=t.match(lt);return e?e[1].split(ft):[]}(n),r)))}function Li(t){var e=0,r=0;return function(){var n=_r(),o=16-(n-r);if(r=n,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(i,arguments)}}function zi(t,e){var r=-1,n=t.length,o=n-1;for(e=e===i?n:e;++r<e;){var u=Zn(r,o),a=t[u];t[u]=t[r],t[r]=a}return t.length=e,t}var Bi=function(t){var e=Lu(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(ot,(function(t,r,n,o){e.push(n?o.replace(dt,"$1"):r||t)})),e}));function Ui(t){if("string"==typeof t||fa(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Fi(t){if(null!=t){try{return Rt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Hi(t){if(t instanceof Yr)return t.clone();var e=new Gr(t.__wrapped__,t.__chain__);return e.__actions__=Mo(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Xi=Jn((function(t,e){return Zu(t)?hn(t,mn(e,1,Zu,!0)):[]})),Gi=Jn((function(t,e){var r=Qi(e);return Zu(r)&&(r=i),Zu(t)?hn(t,mn(e,1,Zu,!0),fi(r,2)):[]})),Yi=Jn((function(t,e){var r=Qi(e);return Zu(r)&&(r=i),Zu(t)?hn(t,mn(e,1,Zu,!0),i,r):[]}));function Vi(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var o=null==r?0:ga(r);return o<0&&(o=mr(n+o,0)),Fe(t,fi(e,3),o)}function Wi(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var o=n-1;return r!==i&&(o=ga(r),o=r<0?mr(n+o,0):Or(o,n-1)),Fe(t,fi(e,3),o,!0)}function Ki(t){return(null==t?0:t.length)?mn(t,1):[]}function $i(t){return t&&t.length?t[0]:i}var Zi=Jn((function(t){var e=Ce(t,Oo);return e.length&&e[0]===t[0]?Tn(e):[]})),qi=Jn((function(t){var e=Qi(t),r=Ce(t,Oo);return e===Qi(r)?e=i:r.pop(),r.length&&r[0]===t[0]?Tn(r,fi(e,2)):[]})),Ji=Jn((function(t){var e=Qi(t),r=Ce(t,Oo);return(e="function"==typeof e?e:i)&&r.pop(),r.length&&r[0]===t[0]?Tn(r,i,e):[]}));function Qi(t){var e=null==t?0:t.length;return e?t[e-1]:i}var tu=Jn(eu);function eu(t,e){return t&&t.length&&e&&e.length?Kn(t,e):t}var ru=ii((function(t,e){var r=null==t?0:t.length,n=cn(t,e);return $n(t,Ce(e,(function(t){return _i(t,r)?+t:t})).sort(ko)),n}));function nu(t){return null==t?t:xr.call(t)}var ou=Jn((function(t){return po(mn(t,1,Zu,!0))})),iu=Jn((function(t){var e=Qi(t);return Zu(e)&&(e=i),po(mn(t,1,Zu,!0),fi(e,2))})),uu=Jn((function(t){var e=Qi(t);return e="function"==typeof e?e:i,po(mn(t,1,Zu,!0),i,e)}));function au(t){if(!t||!t.length)return[];var e=0;return t=Te(t,(function(t){if(Zu(t))return e=mr(t.length,e),!0})),Ze(e,(function(e){return Ce(t,Ve(e))}))}function cu(t,e){if(!t||!t.length)return[];var r=au(t);return null==e?r:Ce(r,(function(t){return Se(e,i,t)}))}var su=Jn((function(t,e){return Zu(t)?hn(t,e):[]})),lu=Jn((function(t){return bo(Te(t,Zu))})),fu=Jn((function(t){var e=Qi(t);return Zu(e)&&(e=i),bo(Te(t,Zu),fi(e,2))})),pu=Jn((function(t){var e=Qi(t);return e="function"==typeof e?e:i,bo(Te(t,Zu),i,e)})),hu=Jn(au);var du=Jn((function(t){var e=t.length,r=e>1?t[e-1]:i;return r="function"==typeof r?(t.pop(),r):i,cu(t,r)}));function yu(t){var e=Fr(t);return e.__chain__=!0,e}function vu(t,e){return e(t)}var gu=ii((function(t){var e=t.length,r=e?t[0]:0,n=this.__wrapped__,o=function(e){return cn(e,t)};return!(e>1||this.__actions__.length)&&n instanceof Yr&&_i(r)?((n=n.slice(r,+r+(e?1:0))).__actions__.push({func:vu,args:[o],thisArg:i}),new Gr(n,this.__chain__).thru((function(t){return e&&!t.length&&t.push(i),t}))):this.thru(o)}));var bu=Co((function(t,e,r){It.call(t,r)?++t[r]:an(t,r,1)}));var mu=Fo(Vi),Ou=Fo(Wi);function _u(t,e){return(Wu(t)?Ae:dn)(t,fi(e,3))}function wu(t,e){return(Wu(t)?ke:yn)(t,fi(e,3))}var ju=Co((function(t,e,r){It.call(t,r)?t[r].push(e):an(t,r,[e])}));var xu=Jn((function(t,e,r){var o=-1,i="function"==typeof e,u=$u(t)?n(t.length):[];return dn(t,(function(t){u[++o]=i?Se(e,t,r):Mn(t,e,r)})),u})),Eu=Co((function(t,e,r){an(t,r,e)}));function Su(t,e){return(Wu(t)?Ce:Fn)(t,fi(e,3))}var Pu=Co((function(t,e,r){t[r?0:1].push(e)}),(function(){return[[],[]]}));var Au=Jn((function(t,e){if(null==t)return[];var r=e.length;return r>1&&wi(t,e[0],e[1])?e=[]:r>2&&wi(e[0],e[1],e[2])&&(e=[e[0]]),Vn(t,mn(e,1),[])})),ku=pe||function(){return de.Date.now()};function Du(t,e,r){return e=r?i:e,e=t&&null==e?t.length:e,ti(t,p,i,i,i,i,e)}function Tu(t,e){var r;if("function"!=typeof e)throw new Dt(u);return t=ga(t),function(){return--t>0&&(r=e.apply(this,arguments)),t<=1&&(e=i),r}}var Mu=Jn((function(t,e,r){var n=1;if(r.length){var o=lr(r,li(Mu));n|=l}return ti(t,n,e,r,o)})),Nu=Jn((function(t,e,r){var n=3;if(r.length){var o=lr(r,li(Nu));n|=l}return ti(e,n,t,r,o)}));function Cu(t,e,r){var n,o,a,c,s,l,f=0,p=!1,h=!1,d=!0;if("function"!=typeof t)throw new Dt(u);function y(e){var r=n,u=o;return n=o=i,f=e,c=t.apply(u,r)}function v(t){return f=t,s=Ci(b,e),p?y(t):c}function g(t){var r=t-l;return l===i||r>=e||r<0||h&&t-f>=a}function b(){var t=ku();if(g(t))return m(t);s=Ci(b,function(t){var r=e-(t-l);return h?Or(r,a-(t-f)):r}(t))}function m(t){return s=i,d&&n?y(t):(n=o=i,c)}function O(){var t=ku(),r=g(t);if(n=arguments,o=this,l=t,r){if(s===i)return v(l);if(h)return Eo(s),s=Ci(b,e),y(l)}return s===i&&(s=Ci(b,e)),c}return e=ma(e)||0,na(r)&&(p=!!r.leading,a=(h="maxWait"in r)?mr(ma(r.maxWait)||0,e):a,d="trailing"in r?!!r.trailing:d),O.cancel=function(){s!==i&&Eo(s),f=0,n=l=o=s=i},O.flush=function(){return s===i?c:m(ku())},O}var Ru=Jn((function(t,e){return pn(t,1,e)})),Iu=Jn((function(t,e,r){return pn(t,ma(e)||0,r)}));function Lu(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new Dt(u);var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var u=t.apply(this,n);return r.cache=i.set(o,u)||i,u};return r.cache=new(Lu.Cache||Kr),r}function zu(t){if("function"!=typeof t)throw new Dt(u);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Lu.Cache=Kr;var Bu=jo((function(t,e){var r=(e=1==e.length&&Wu(e[0])?Ce(e[0],Je(fi())):Ce(mn(e,1),Je(fi()))).length;return Jn((function(n){for(var o=-1,i=Or(n.length,r);++o<i;)n[o]=e[o].call(this,n[o]);return Se(t,this,n)}))})),Uu=Jn((function(t,e){var r=lr(e,li(Uu));return ti(t,l,i,e,r)})),Fu=Jn((function(t,e){var r=lr(e,li(Fu));return ti(t,f,i,e,r)})),Hu=ii((function(t,e){return ti(t,h,i,i,i,e)}));function Xu(t,e){return t===e||t!=t&&e!=e}var Gu=$o(An),Yu=$o((function(t,e){return t>=e})),Vu=Nn(function(){return arguments}())?Nn:function(t){return oa(t)&&It.call(t,"callee")&&!$t.call(t,"callee")},Wu=n.isArray,Ku=Oe?Je(Oe):function(t){return oa(t)&&Pn(t)==R};function $u(t){return null!=t&&ra(t.length)&&!ta(t)}function Zu(t){return oa(t)&&$u(t)}var qu=me||mc,Ju=_e?Je(_e):function(t){return oa(t)&&Pn(t)==w};function Qu(t){if(!oa(t))return!1;var e=Pn(t);return e==j||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!aa(t)}function ta(t){if(!na(t))return!1;var e=Pn(t);return e==x||e==E||"[object AsyncFunction]"==e||"[object Proxy]"==e}function ea(t){return"number"==typeof t&&t==ga(t)}function ra(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=y}function na(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function oa(t){return null!=t&&"object"==typeof t}var ia=we?Je(we):function(t){return oa(t)&&gi(t)==S};function ua(t){return"number"==typeof t||oa(t)&&Pn(t)==P}function aa(t){if(!oa(t)||Pn(t)!=A)return!1;var e=Wt(t);if(null===e)return!0;var r=It.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&Rt.call(r)==Ut}var ca=je?Je(je):function(t){return oa(t)&&Pn(t)==D};var sa=xe?Je(xe):function(t){return oa(t)&&gi(t)==T};function la(t){return"string"==typeof t||!Wu(t)&&oa(t)&&Pn(t)==M}function fa(t){return"symbol"==typeof t||oa(t)&&Pn(t)==N}var pa=Ee?Je(Ee):function(t){return oa(t)&&ra(t.length)&&!!ae[Pn(t)]};var ha=$o(Un),da=$o((function(t,e){return t<=e}));function ya(t){if(!t)return[];if($u(t))return la(t)?dr(t):Mo(t);if(Jt&&t[Jt])return function(t){for(var e,r=[];!(e=t.next()).done;)r.push(e.value);return r}(t[Jt]());var e=gi(t);return(e==S?cr:e==T?fr:Xa)(t)}function va(t){return t?(t=ma(t))===d||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function ga(t){var e=va(t),r=e%1;return e==e?r?e-r:e:0}function ba(t){return t?sn(ga(t),0,g):0}function ma(t){if("number"==typeof t)return t;if(fa(t))return v;if(na(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=na(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=qe(t);var r=bt.test(t);return r||Ot.test(t)?fe(t.slice(2),r?2:8):gt.test(t)?v:+t}function Oa(t){return No(t,Ra(t))}function _a(t){return null==t?"":fo(t)}var wa=Ro((function(t,e){if(Si(e)||$u(e))No(e,Ca(e),t);else for(var r in e)It.call(e,r)&&rn(t,r,e[r])})),ja=Ro((function(t,e){No(e,Ra(e),t)})),xa=Ro((function(t,e,r,n){No(e,Ra(e),t,n)})),Ea=Ro((function(t,e,r,n){No(e,Ca(e),t,n)})),Sa=ii(cn);var Pa=Jn((function(t,e){t=Pt(t);var r=-1,n=e.length,o=n>2?e[2]:i;for(o&&wi(e[0],e[1],o)&&(n=1);++r<n;)for(var u=e[r],a=Ra(u),c=-1,s=a.length;++c<s;){var l=a[c],f=t[l];(f===i||Xu(f,Nt[l])&&!It.call(t,l))&&(t[l]=u[l])}return t})),Aa=Jn((function(t){return t.push(i,ri),Se(La,i,t)}));function ka(t,e,r){var n=null==t?i:En(t,e);return n===i?r:n}function Da(t,e){return null!=t&&bi(t,e,Dn)}var Ta=Go((function(t,e,r){null!=e&&"function"!=typeof e.toString&&(e=Bt.call(e)),t[e]=r}),nc(uc)),Ma=Go((function(t,e,r){null!=e&&"function"!=typeof e.toString&&(e=Bt.call(e)),It.call(t,e)?t[e].push(r):t[e]=[r]}),fi),Na=Jn(Mn);function Ca(t){return $u(t)?qr(t):zn(t)}function Ra(t){return $u(t)?qr(t,!0):Bn(t)}var Ia=Ro((function(t,e,r){Gn(t,e,r)})),La=Ro((function(t,e,r,n){Gn(t,e,r,n)})),za=ii((function(t,e){var r={};if(null==t)return r;var n=!1;e=Ce(e,(function(e){return e=wo(e,t),n||(n=e.length>1),e})),No(t,ai(t),r),n&&(r=ln(r,7,ni));for(var o=e.length;o--;)ho(r,e[o]);return r}));var Ba=ii((function(t,e){return null==t?{}:function(t,e){return Wn(t,e,(function(e,r){return Da(t,r)}))}(t,e)}));function Ua(t,e){if(null==t)return{};var r=Ce(ai(t),(function(t){return[t]}));return e=fi(e),Wn(t,r,(function(t,r){return e(t,r[0])}))}var Fa=Qo(Ca),Ha=Qo(Ra);function Xa(t){return null==t?[]:Qe(t,Ca(t))}var Ga=Bo((function(t,e,r){return e=e.toLowerCase(),t+(r?Ya(e):e)}));function Ya(t){return Qa(_a(t).toLowerCase())}function Va(t){return(t=_a(t))&&t.replace(wt,or).replace(te,"")}var Wa=Bo((function(t,e,r){return t+(r?"-":"")+e.toLowerCase()})),Ka=Bo((function(t,e,r){return t+(r?" ":"")+e.toLowerCase()})),$a=zo("toLowerCase");var Za=Bo((function(t,e,r){return t+(r?"_":"")+e.toLowerCase()}));var qa=Bo((function(t,e,r){return t+(r?" ":"")+Qa(e)}));var Ja=Bo((function(t,e,r){return t+(r?" ":"")+e.toUpperCase()})),Qa=zo("toUpperCase");function tc(t,e,r){return t=_a(t),(e=r?i:e)===i?function(t){return oe.test(t)}(t)?function(t){return t.match(re)||[]}(t):function(t){return t.match(pt)||[]}(t):t.match(e)||[]}var ec=Jn((function(t,e){try{return Se(t,i,e)}catch(t){return Qu(t)?t:new ct(t)}})),rc=ii((function(t,e){return Ae(e,(function(e){e=Ui(e),an(t,e,Mu(t[e],t))})),t}));function nc(t){return function(){return t}}var oc=Ho(),ic=Ho(!0);function uc(t){return t}function ac(t){return Ln("function"==typeof t?t:ln(t,1))}var cc=Jn((function(t,e){return function(r){return Mn(r,t,e)}})),sc=Jn((function(t,e){return function(r){return Mn(t,r,e)}}));function lc(t,e,r){var n=Ca(e),o=xn(e,n);null!=r||na(e)&&(o.length||!n.length)||(r=e,e=t,t=this,o=xn(e,Ca(e)));var i=!(na(r)&&"chain"in r&&!r.chain),u=ta(t);return Ae(o,(function(r){var n=e[r];t[r]=n,u&&(t.prototype[r]=function(){var e=this.__chain__;if(i||e){var r=t(this.__wrapped__),o=r.__actions__=Mo(this.__actions__);return o.push({func:n,args:arguments,thisArg:t}),r.__chain__=e,r}return n.apply(t,Re([this.value()],arguments))})})),t}function fc(){}var pc=Vo(Ce),hc=Vo(De),dc=Vo(ze);function yc(t){return ji(t)?Ve(Ui(t)):function(t){return function(e){return En(e,t)}}(t)}var vc=Ko(),gc=Ko(!0);function bc(){return[]}function mc(){return!1}var Oc=Yo((function(t,e){return t+e}),0),_c=qo("ceil"),wc=Yo((function(t,e){return t/e}),1),jc=qo("floor");var xc,Ec=Yo((function(t,e){return t*e}),1),Sc=qo("round"),Pc=Yo((function(t,e){return t-e}),0);return Fr.after=function(t,e){if("function"!=typeof e)throw new Dt(u);return t=ga(t),function(){if(--t<1)return e.apply(this,arguments)}},Fr.ary=Du,Fr.assign=wa,Fr.assignIn=ja,Fr.assignInWith=xa,Fr.assignWith=Ea,Fr.at=Sa,Fr.before=Tu,Fr.bind=Mu,Fr.bindAll=rc,Fr.bindKey=Nu,Fr.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Wu(t)?t:[t]},Fr.chain=yu,Fr.chunk=function(t,e,r){e=(r?wi(t,e,r):e===i)?1:mr(ga(e),0);var o=null==t?0:t.length;if(!o||e<1)return[];for(var u=0,a=0,c=n(ye(o/e));u<o;)c[a++]=io(t,u,u+=e);return c},Fr.compact=function(t){for(var e=-1,r=null==t?0:t.length,n=0,o=[];++e<r;){var i=t[e];i&&(o[n++]=i)}return o},Fr.concat=function(){var t=arguments.length;if(!t)return[];for(var e=n(t-1),r=arguments[0],o=t;o--;)e[o-1]=arguments[o];return Re(Wu(r)?Mo(r):[r],mn(e,1))},Fr.cond=function(t){var e=null==t?0:t.length,r=fi();return t=e?Ce(t,(function(t){if("function"!=typeof t[1])throw new Dt(u);return[r(t[0]),t[1]]})):[],Jn((function(r){for(var n=-1;++n<e;){var o=t[n];if(Se(o[0],this,r))return Se(o[1],this,r)}}))},Fr.conforms=function(t){return function(t){var e=Ca(t);return function(r){return fn(r,t,e)}}(ln(t,1))},Fr.constant=nc,Fr.countBy=bu,Fr.create=function(t,e){var r=Hr(t);return null==e?r:un(r,e)},Fr.curry=function t(e,r,n){var o=ti(e,8,i,i,i,i,i,r=n?i:r);return o.placeholder=t.placeholder,o},Fr.curryRight=function t(e,r,n){var o=ti(e,s,i,i,i,i,i,r=n?i:r);return o.placeholder=t.placeholder,o},Fr.debounce=Cu,Fr.defaults=Pa,Fr.defaultsDeep=Aa,Fr.defer=Ru,Fr.delay=Iu,Fr.difference=Xi,Fr.differenceBy=Gi,Fr.differenceWith=Yi,Fr.drop=function(t,e,r){var n=null==t?0:t.length;return n?io(t,(e=r||e===i?1:ga(e))<0?0:e,n):[]},Fr.dropRight=function(t,e,r){var n=null==t?0:t.length;return n?io(t,0,(e=n-(e=r||e===i?1:ga(e)))<0?0:e):[]},Fr.dropRightWhile=function(t,e){return t&&t.length?vo(t,fi(e,3),!0,!0):[]},Fr.dropWhile=function(t,e){return t&&t.length?vo(t,fi(e,3),!0):[]},Fr.fill=function(t,e,r,n){var o=null==t?0:t.length;return o?(r&&"number"!=typeof r&&wi(t,e,r)&&(r=0,n=o),function(t,e,r,n){var o=t.length;for((r=ga(r))<0&&(r=-r>o?0:o+r),(n=n===i||n>o?o:ga(n))<0&&(n+=o),n=r>n?0:ba(n);r<n;)t[r++]=e;return t}(t,e,r,n)):[]},Fr.filter=function(t,e){return(Wu(t)?Te:bn)(t,fi(e,3))},Fr.flatMap=function(t,e){return mn(Su(t,e),1)},Fr.flatMapDeep=function(t,e){return mn(Su(t,e),d)},Fr.flatMapDepth=function(t,e,r){return r=r===i?1:ga(r),mn(Su(t,e),r)},Fr.flatten=Ki,Fr.flattenDeep=function(t){return(null==t?0:t.length)?mn(t,d):[]},Fr.flattenDepth=function(t,e){return(null==t?0:t.length)?mn(t,e=e===i?1:ga(e)):[]},Fr.flip=function(t){return ti(t,512)},Fr.flow=oc,Fr.flowRight=ic,Fr.fromPairs=function(t){for(var e=-1,r=null==t?0:t.length,n={};++e<r;){var o=t[e];n[o[0]]=o[1]}return n},Fr.functions=function(t){return null==t?[]:xn(t,Ca(t))},Fr.functionsIn=function(t){return null==t?[]:xn(t,Ra(t))},Fr.groupBy=ju,Fr.initial=function(t){return(null==t?0:t.length)?io(t,0,-1):[]},Fr.intersection=Zi,Fr.intersectionBy=qi,Fr.intersectionWith=Ji,Fr.invert=Ta,Fr.invertBy=Ma,Fr.invokeMap=xu,Fr.iteratee=ac,Fr.keyBy=Eu,Fr.keys=Ca,Fr.keysIn=Ra,Fr.map=Su,Fr.mapKeys=function(t,e){var r={};return e=fi(e,3),wn(t,(function(t,n,o){an(r,e(t,n,o),t)})),r},Fr.mapValues=function(t,e){var r={};return e=fi(e,3),wn(t,(function(t,n,o){an(r,n,e(t,n,o))})),r},Fr.matches=function(t){return Hn(ln(t,1))},Fr.matchesProperty=function(t,e){return Xn(t,ln(e,1))},Fr.memoize=Lu,Fr.merge=Ia,Fr.mergeWith=La,Fr.method=cc,Fr.methodOf=sc,Fr.mixin=lc,Fr.negate=zu,Fr.nthArg=function(t){return t=ga(t),Jn((function(e){return Yn(e,t)}))},Fr.omit=za,Fr.omitBy=function(t,e){return Ua(t,zu(fi(e)))},Fr.once=function(t){return Tu(2,t)},Fr.orderBy=function(t,e,r,n){return null==t?[]:(Wu(e)||(e=null==e?[]:[e]),Wu(r=n?i:r)||(r=null==r?[]:[r]),Vn(t,e,r))},Fr.over=pc,Fr.overArgs=Bu,Fr.overEvery=hc,Fr.overSome=dc,Fr.partial=Uu,Fr.partialRight=Fu,Fr.partition=Pu,Fr.pick=Ba,Fr.pickBy=Ua,Fr.property=yc,Fr.propertyOf=function(t){return function(e){return null==t?i:En(t,e)}},Fr.pull=tu,Fr.pullAll=eu,Fr.pullAllBy=function(t,e,r){return t&&t.length&&e&&e.length?Kn(t,e,fi(r,2)):t},Fr.pullAllWith=function(t,e,r){return t&&t.length&&e&&e.length?Kn(t,e,i,r):t},Fr.pullAt=ru,Fr.range=vc,Fr.rangeRight=gc,Fr.rearg=Hu,Fr.reject=function(t,e){return(Wu(t)?Te:bn)(t,zu(fi(e,3)))},Fr.remove=function(t,e){var r=[];if(!t||!t.length)return r;var n=-1,o=[],i=t.length;for(e=fi(e,3);++n<i;){var u=t[n];e(u,n,t)&&(r.push(u),o.push(n))}return $n(t,o),r},Fr.rest=function(t,e){if("function"!=typeof t)throw new Dt(u);return Jn(t,e=e===i?e:ga(e))},Fr.reverse=nu,Fr.sampleSize=function(t,e,r){return e=(r?wi(t,e,r):e===i)?1:ga(e),(Wu(t)?Qr:to)(t,e)},Fr.set=function(t,e,r){return null==t?t:eo(t,e,r)},Fr.setWith=function(t,e,r,n){return n="function"==typeof n?n:i,null==t?t:eo(t,e,r,n)},Fr.shuffle=function(t){return(Wu(t)?tn:oo)(t)},Fr.slice=function(t,e,r){var n=null==t?0:t.length;return n?(r&&"number"!=typeof r&&wi(t,e,r)?(e=0,r=n):(e=null==e?0:ga(e),r=r===i?n:ga(r)),io(t,e,r)):[]},Fr.sortBy=Au,Fr.sortedUniq=function(t){return t&&t.length?so(t):[]},Fr.sortedUniqBy=function(t,e){return t&&t.length?so(t,fi(e,2)):[]},Fr.split=function(t,e,r){return r&&"number"!=typeof r&&wi(t,e,r)&&(e=r=i),(r=r===i?g:r>>>0)?(t=_a(t))&&("string"==typeof e||null!=e&&!ca(e))&&!(e=fo(e))&&ar(t)?xo(dr(t),0,r):t.split(e,r):[]},Fr.spread=function(t,e){if("function"!=typeof t)throw new Dt(u);return e=null==e?0:mr(ga(e),0),Jn((function(r){var n=r[e],o=xo(r,0,e);return n&&Re(o,n),Se(t,this,o)}))},Fr.tail=function(t){var e=null==t?0:t.length;return e?io(t,1,e):[]},Fr.take=function(t,e,r){return t&&t.length?io(t,0,(e=r||e===i?1:ga(e))<0?0:e):[]},Fr.takeRight=function(t,e,r){var n=null==t?0:t.length;return n?io(t,(e=n-(e=r||e===i?1:ga(e)))<0?0:e,n):[]},Fr.takeRightWhile=function(t,e){return t&&t.length?vo(t,fi(e,3),!1,!0):[]},Fr.takeWhile=function(t,e){return t&&t.length?vo(t,fi(e,3)):[]},Fr.tap=function(t,e){return e(t),t},Fr.throttle=function(t,e,r){var n=!0,o=!0;if("function"!=typeof t)throw new Dt(u);return na(r)&&(n="leading"in r?!!r.leading:n,o="trailing"in r?!!r.trailing:o),Cu(t,e,{leading:n,maxWait:e,trailing:o})},Fr.thru=vu,Fr.toArray=ya,Fr.toPairs=Fa,Fr.toPairsIn=Ha,Fr.toPath=function(t){return Wu(t)?Ce(t,Ui):fa(t)?[t]:Mo(Bi(_a(t)))},Fr.toPlainObject=Oa,Fr.transform=function(t,e,r){var n=Wu(t),o=n||qu(t)||pa(t);if(e=fi(e,4),null==r){var i=t&&t.constructor;r=o?n?new i:[]:na(t)&&ta(i)?Hr(Wt(t)):{}}return(o?Ae:wn)(t,(function(t,n,o){return e(r,t,n,o)})),r},Fr.unary=function(t){return Du(t,1)},Fr.union=ou,Fr.unionBy=iu,Fr.unionWith=uu,Fr.uniq=function(t){return t&&t.length?po(t):[]},Fr.uniqBy=function(t,e){return t&&t.length?po(t,fi(e,2)):[]},Fr.uniqWith=function(t,e){return e="function"==typeof e?e:i,t&&t.length?po(t,i,e):[]},Fr.unset=function(t,e){return null==t||ho(t,e)},Fr.unzip=au,Fr.unzipWith=cu,Fr.update=function(t,e,r){return null==t?t:yo(t,e,_o(r))},Fr.updateWith=function(t,e,r,n){return n="function"==typeof n?n:i,null==t?t:yo(t,e,_o(r),n)},Fr.values=Xa,Fr.valuesIn=function(t){return null==t?[]:Qe(t,Ra(t))},Fr.without=su,Fr.words=tc,Fr.wrap=function(t,e){return Uu(_o(e),t)},Fr.xor=lu,Fr.xorBy=fu,Fr.xorWith=pu,Fr.zip=hu,Fr.zipObject=function(t,e){return mo(t||[],e||[],rn)},Fr.zipObjectDeep=function(t,e){return mo(t||[],e||[],eo)},Fr.zipWith=du,Fr.entries=Fa,Fr.entriesIn=Ha,Fr.extend=ja,Fr.extendWith=xa,lc(Fr,Fr),Fr.add=Oc,Fr.attempt=ec,Fr.camelCase=Ga,Fr.capitalize=Ya,Fr.ceil=_c,Fr.clamp=function(t,e,r){return r===i&&(r=e,e=i),r!==i&&(r=(r=ma(r))==r?r:0),e!==i&&(e=(e=ma(e))==e?e:0),sn(ma(t),e,r)},Fr.clone=function(t){return ln(t,4)},Fr.cloneDeep=function(t){return ln(t,5)},Fr.cloneDeepWith=function(t,e){return ln(t,5,e="function"==typeof e?e:i)},Fr.cloneWith=function(t,e){return ln(t,4,e="function"==typeof e?e:i)},Fr.conformsTo=function(t,e){return null==e||fn(t,e,Ca(e))},Fr.deburr=Va,Fr.defaultTo=function(t,e){return null==t||t!=t?e:t},Fr.divide=wc,Fr.endsWith=function(t,e,r){t=_a(t),e=fo(e);var n=t.length,o=r=r===i?n:sn(ga(r),0,n);return(r-=e.length)>=0&&t.slice(r,o)==e},Fr.eq=Xu,Fr.escape=function(t){return(t=_a(t))&&J.test(t)?t.replace(Z,ir):t},Fr.escapeRegExp=function(t){return(t=_a(t))&&ut.test(t)?t.replace(it,"\\$&"):t},Fr.every=function(t,e,r){var n=Wu(t)?De:vn;return r&&wi(t,e,r)&&(e=i),n(t,fi(e,3))},Fr.find=mu,Fr.findIndex=Vi,Fr.findKey=function(t,e){return Ue(t,fi(e,3),wn)},Fr.findLast=Ou,Fr.findLastIndex=Wi,Fr.findLastKey=function(t,e){return Ue(t,fi(e,3),jn)},Fr.floor=jc,Fr.forEach=_u,Fr.forEachRight=wu,Fr.forIn=function(t,e){return null==t?t:On(t,fi(e,3),Ra)},Fr.forInRight=function(t,e){return null==t?t:_n(t,fi(e,3),Ra)},Fr.forOwn=function(t,e){return t&&wn(t,fi(e,3))},Fr.forOwnRight=function(t,e){return t&&jn(t,fi(e,3))},Fr.get=ka,Fr.gt=Gu,Fr.gte=Yu,Fr.has=function(t,e){return null!=t&&bi(t,e,kn)},Fr.hasIn=Da,Fr.head=$i,Fr.identity=uc,Fr.includes=function(t,e,r,n){t=$u(t)?t:Xa(t),r=r&&!n?ga(r):0;var o=t.length;return r<0&&(r=mr(o+r,0)),la(t)?r<=o&&t.indexOf(e,r)>-1:!!o&&He(t,e,r)>-1},Fr.indexOf=function(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var o=null==r?0:ga(r);return o<0&&(o=mr(n+o,0)),He(t,e,o)},Fr.inRange=function(t,e,r){return e=va(e),r===i?(r=e,e=0):r=va(r),function(t,e,r){return t>=Or(e,r)&&t<mr(e,r)}(t=ma(t),e,r)},Fr.invoke=Na,Fr.isArguments=Vu,Fr.isArray=Wu,Fr.isArrayBuffer=Ku,Fr.isArrayLike=$u,Fr.isArrayLikeObject=Zu,Fr.isBoolean=function(t){return!0===t||!1===t||oa(t)&&Pn(t)==_},Fr.isBuffer=qu,Fr.isDate=Ju,Fr.isElement=function(t){return oa(t)&&1===t.nodeType&&!aa(t)},Fr.isEmpty=function(t){if(null==t)return!0;if($u(t)&&(Wu(t)||"string"==typeof t||"function"==typeof t.splice||qu(t)||pa(t)||Vu(t)))return!t.length;var e=gi(t);if(e==S||e==T)return!t.size;if(Si(t))return!zn(t).length;for(var r in t)if(It.call(t,r))return!1;return!0},Fr.isEqual=function(t,e){return Cn(t,e)},Fr.isEqualWith=function(t,e,r){var n=(r="function"==typeof r?r:i)?r(t,e):i;return n===i?Cn(t,e,i,r):!!n},Fr.isError=Qu,Fr.isFinite=function(t){return"number"==typeof t&&Be(t)},Fr.isFunction=ta,Fr.isInteger=ea,Fr.isLength=ra,Fr.isMap=ia,Fr.isMatch=function(t,e){return t===e||Rn(t,e,hi(e))},Fr.isMatchWith=function(t,e,r){return r="function"==typeof r?r:i,Rn(t,e,hi(e),r)},Fr.isNaN=function(t){return ua(t)&&t!=+t},Fr.isNative=function(t){if(Ei(t))throw new ct("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return In(t)},Fr.isNil=function(t){return null==t},Fr.isNull=function(t){return null===t},Fr.isNumber=ua,Fr.isObject=na,Fr.isObjectLike=oa,Fr.isPlainObject=aa,Fr.isRegExp=ca,Fr.isSafeInteger=function(t){return ea(t)&&t>=-9007199254740991&&t<=y},Fr.isSet=sa,Fr.isString=la,Fr.isSymbol=fa,Fr.isTypedArray=pa,Fr.isUndefined=function(t){return t===i},Fr.isWeakMap=function(t){return oa(t)&&gi(t)==C},Fr.isWeakSet=function(t){return oa(t)&&"[object WeakSet]"==Pn(t)},Fr.join=function(t,e){return null==t?"":We.call(t,e)},Fr.kebabCase=Wa,Fr.last=Qi,Fr.lastIndexOf=function(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var o=n;return r!==i&&(o=(o=ga(r))<0?mr(n+o,0):Or(o,n-1)),e==e?function(t,e,r){for(var n=r+1;n--;)if(t[n]===e)return n;return n}(t,e,o):Fe(t,Ge,o,!0)},Fr.lowerCase=Ka,Fr.lowerFirst=$a,Fr.lt=ha,Fr.lte=da,Fr.max=function(t){return t&&t.length?gn(t,uc,An):i},Fr.maxBy=function(t,e){return t&&t.length?gn(t,fi(e,2),An):i},Fr.mean=function(t){return Ye(t,uc)},Fr.meanBy=function(t,e){return Ye(t,fi(e,2))},Fr.min=function(t){return t&&t.length?gn(t,uc,Un):i},Fr.minBy=function(t,e){return t&&t.length?gn(t,fi(e,2),Un):i},Fr.stubArray=bc,Fr.stubFalse=mc,Fr.stubObject=function(){return{}},Fr.stubString=function(){return""},Fr.stubTrue=function(){return!0},Fr.multiply=Ec,Fr.nth=function(t,e){return t&&t.length?Yn(t,ga(e)):i},Fr.noConflict=function(){return de._===this&&(de._=Ft),this},Fr.noop=fc,Fr.now=ku,Fr.pad=function(t,e,r){t=_a(t);var n=(e=ga(e))?hr(t):0;if(!e||n>=e)return t;var o=(e-n)/2;return Wo(ve(o),r)+t+Wo(ye(o),r)},Fr.padEnd=function(t,e,r){t=_a(t);var n=(e=ga(e))?hr(t):0;return e&&n<e?t+Wo(e-n,r):t},Fr.padStart=function(t,e,r){t=_a(t);var n=(e=ga(e))?hr(t):0;return e&&n<e?Wo(e-n,r)+t:t},Fr.parseInt=function(t,e,r){return r||null==e?e=0:e&&(e=+e),wr(_a(t).replace(at,""),e||0)},Fr.random=function(t,e,r){if(r&&"boolean"!=typeof r&&wi(t,e,r)&&(e=r=i),r===i&&("boolean"==typeof e?(r=e,e=i):"boolean"==typeof t&&(r=t,t=i)),t===i&&e===i?(t=0,e=1):(t=va(t),e===i?(e=t,t=0):e=va(e)),t>e){var n=t;t=e,e=n}if(r||t%1||e%1){var o=jr();return Or(t+o*(e-t+le("1e-"+((o+"").length-1))),e)}return Zn(t,e)},Fr.reduce=function(t,e,r){var n=Wu(t)?Ie:Ke,o=arguments.length<3;return n(t,fi(e,4),r,o,dn)},Fr.reduceRight=function(t,e,r){var n=Wu(t)?Le:Ke,o=arguments.length<3;return n(t,fi(e,4),r,o,yn)},Fr.repeat=function(t,e,r){return e=(r?wi(t,e,r):e===i)?1:ga(e),qn(_a(t),e)},Fr.replace=function(){var t=arguments,e=_a(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Fr.result=function(t,e,r){var n=-1,o=(e=wo(e,t)).length;for(o||(o=1,t=i);++n<o;){var u=null==t?i:t[Ui(e[n])];u===i&&(n=o,u=r),t=ta(u)?u.call(t):u}return t},Fr.round=Sc,Fr.runInContext=t,Fr.sample=function(t){return(Wu(t)?Jr:Qn)(t)},Fr.size=function(t){if(null==t)return 0;if($u(t))return la(t)?hr(t):t.length;var e=gi(t);return e==S||e==T?t.size:zn(t).length},Fr.snakeCase=Za,Fr.some=function(t,e,r){var n=Wu(t)?ze:uo;return r&&wi(t,e,r)&&(e=i),n(t,fi(e,3))},Fr.sortedIndex=function(t,e){return ao(t,e)},Fr.sortedIndexBy=function(t,e,r){return co(t,e,fi(r,2))},Fr.sortedIndexOf=function(t,e){var r=null==t?0:t.length;if(r){var n=ao(t,e);if(n<r&&Xu(t[n],e))return n}return-1},Fr.sortedLastIndex=function(t,e){return ao(t,e,!0)},Fr.sortedLastIndexBy=function(t,e,r){return co(t,e,fi(r,2),!0)},Fr.sortedLastIndexOf=function(t,e){if(null==t?0:t.length){var r=ao(t,e,!0)-1;if(Xu(t[r],e))return r}return-1},Fr.startCase=qa,Fr.startsWith=function(t,e,r){return t=_a(t),r=null==r?0:sn(ga(r),0,t.length),e=fo(e),t.slice(r,r+e.length)==e},Fr.subtract=Pc,Fr.sum=function(t){return t&&t.length?$e(t,uc):0},Fr.sumBy=function(t,e){return t&&t.length?$e(t,fi(e,2)):0},Fr.template=function(t,e,r){var n=Fr.templateSettings;r&&wi(t,e,r)&&(e=i),t=_a(t),e=xa({},e,n,ei);var o,u,a=xa({},e.imports,n.imports,ei),c=Ca(a),s=Qe(a,c),l=0,f=e.interpolate||jt,p="__p += '",h=At((e.escape||jt).source+"|"+f.source+"|"+(f===et?yt:jt).source+"|"+(e.evaluate||jt).source+"|$","g"),d="//# sourceURL="+(It.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ue+"]")+"\n";t.replace(h,(function(e,r,n,i,a,c){return n||(n=i),p+=t.slice(l,c).replace(xt,ur),r&&(o=!0,p+="' +\n__e("+r+") +\n'"),a&&(u=!0,p+="';\n"+a+";\n__p += '"),n&&(p+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),l=c+e.length,e})),p+="';\n";var y=It.call(e,"variable")&&e.variable;if(y){if(ht.test(y))throw new ct("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(u?p.replace(V,""):p).replace(W,"$1").replace(K,"$1;"),p="function("+(y||"obj")+") {\n"+(y?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(u?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var v=ec((function(){return Et(c,d+"return "+p).apply(i,s)}));if(v.source=p,Qu(v))throw v;return v},Fr.times=function(t,e){if((t=ga(t))<1||t>y)return[];var r=g,n=Or(t,g);e=fi(e),t-=g;for(var o=Ze(n,e);++r<t;)e(r);return o},Fr.toFinite=va,Fr.toInteger=ga,Fr.toLength=ba,Fr.toLower=function(t){return _a(t).toLowerCase()},Fr.toNumber=ma,Fr.toSafeInteger=function(t){return t?sn(ga(t),-9007199254740991,y):0===t?t:0},Fr.toString=_a,Fr.toUpper=function(t){return _a(t).toUpperCase()},Fr.trim=function(t,e,r){if((t=_a(t))&&(r||e===i))return qe(t);if(!t||!(e=fo(e)))return t;var n=dr(t),o=dr(e);return xo(n,er(n,o),rr(n,o)+1).join("")},Fr.trimEnd=function(t,e,r){if((t=_a(t))&&(r||e===i))return t.slice(0,yr(t)+1);if(!t||!(e=fo(e)))return t;var n=dr(t);return xo(n,0,rr(n,dr(e))+1).join("")},Fr.trimStart=function(t,e,r){if((t=_a(t))&&(r||e===i))return t.replace(at,"");if(!t||!(e=fo(e)))return t;var n=dr(t);return xo(n,er(n,dr(e))).join("")},Fr.truncate=function(t,e){var r=30,n="...";if(na(e)){var o="separator"in e?e.separator:o;r="length"in e?ga(e.length):r,n="omission"in e?fo(e.omission):n}var u=(t=_a(t)).length;if(ar(t)){var a=dr(t);u=a.length}if(r>=u)return t;var c=r-hr(n);if(c<1)return n;var s=a?xo(a,0,c).join(""):t.slice(0,c);if(o===i)return s+n;if(a&&(c+=s.length-c),ca(o)){if(t.slice(c).search(o)){var l,f=s;for(o.global||(o=At(o.source,_a(vt.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var p=l.index;s=s.slice(0,p===i?c:p)}}else if(t.indexOf(fo(o),c)!=c){var h=s.lastIndexOf(o);h>-1&&(s=s.slice(0,h))}return s+n},Fr.unescape=function(t){return(t=_a(t))&&q.test(t)?t.replace($,vr):t},Fr.uniqueId=function(t){var e=++Lt;return _a(t)+e},Fr.upperCase=Ja,Fr.upperFirst=Qa,Fr.each=_u,Fr.eachRight=wu,Fr.first=$i,lc(Fr,(xc={},wn(Fr,(function(t,e){It.call(Fr.prototype,e)||(xc[e]=t)})),xc),{chain:!1}),Fr.VERSION="4.17.21",Ae(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Fr[t].placeholder=Fr})),Ae(["drop","take"],(function(t,e){Yr.prototype[t]=function(r){r=r===i?1:mr(ga(r),0);var n=this.__filtered__&&!e?new Yr(this):this.clone();return n.__filtered__?n.__takeCount__=Or(r,n.__takeCount__):n.__views__.push({size:Or(r,g),type:t+(n.__dir__<0?"Right":"")}),n},Yr.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),Ae(["filter","map","takeWhile"],(function(t,e){var r=e+1,n=1==r||3==r;Yr.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:fi(t,3),type:r}),e.__filtered__=e.__filtered__||n,e}})),Ae(["head","last"],(function(t,e){var r="take"+(e?"Right":"");Yr.prototype[t]=function(){return this[r](1).value()[0]}})),Ae(["initial","tail"],(function(t,e){var r="drop"+(e?"":"Right");Yr.prototype[t]=function(){return this.__filtered__?new Yr(this):this[r](1)}})),Yr.prototype.compact=function(){return this.filter(uc)},Yr.prototype.find=function(t){return this.filter(t).head()},Yr.prototype.findLast=function(t){return this.reverse().find(t)},Yr.prototype.invokeMap=Jn((function(t,e){return"function"==typeof t?new Yr(this):this.map((function(r){return Mn(r,t,e)}))})),Yr.prototype.reject=function(t){return this.filter(zu(fi(t)))},Yr.prototype.slice=function(t,e){t=ga(t);var r=this;return r.__filtered__&&(t>0||e<0)?new Yr(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),e!==i&&(r=(e=ga(e))<0?r.dropRight(-e):r.take(e-t)),r)},Yr.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Yr.prototype.toArray=function(){return this.take(g)},wn(Yr.prototype,(function(t,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),n=/^(?:head|last)$/.test(e),o=Fr[n?"take"+("last"==e?"Right":""):e],u=n||/^find/.test(e);o&&(Fr.prototype[e]=function(){var e=this.__wrapped__,a=n?[1]:arguments,c=e instanceof Yr,s=a[0],l=c||Wu(e),f=function(t){var e=o.apply(Fr,Re([t],a));return n&&p?e[0]:e};l&&r&&"function"==typeof s&&1!=s.length&&(c=l=!1);var p=this.__chain__,h=!!this.__actions__.length,d=u&&!p,y=c&&!h;if(!u&&l){e=y?e:new Yr(this);var v=t.apply(e,a);return v.__actions__.push({func:vu,args:[f],thisArg:i}),new Gr(v,p)}return d&&y?t.apply(this,a):(v=this.thru(f),d?n?v.value()[0]:v.value():v)})})),Ae(["pop","push","shift","sort","splice","unshift"],(function(t){var e=Tt[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",n=/^(?:pop|shift)$/.test(t);Fr.prototype[t]=function(){var t=arguments;if(n&&!this.__chain__){var o=this.value();return e.apply(Wu(o)?o:[],t)}return this[r]((function(r){return e.apply(Wu(r)?r:[],t)}))}})),wn(Yr.prototype,(function(t,e){var r=Fr[e];if(r){var n=r.name+"";It.call(Mr,n)||(Mr[n]=[]),Mr[n].push({name:e,func:r})}})),Mr[Xo(i,2).name]=[{name:"wrapper",func:i}],Yr.prototype.clone=function(){var t=new Yr(this.__wrapped__);return t.__actions__=Mo(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Mo(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Mo(this.__views__),t},Yr.prototype.reverse=function(){if(this.__filtered__){var t=new Yr(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Yr.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,r=Wu(t),n=e<0,o=r?t.length:0,i=function(t,e,r){var n=-1,o=r.length;for(;++n<o;){var i=r[n],u=i.size;switch(i.type){case"drop":t+=u;break;case"dropRight":e-=u;break;case"take":e=Or(e,t+u);break;case"takeRight":t=mr(t,e-u)}}return{start:t,end:e}}(0,o,this.__views__),u=i.start,a=i.end,c=a-u,s=n?a:u-1,l=this.__iteratees__,f=l.length,p=0,h=Or(c,this.__takeCount__);if(!r||!n&&o==c&&h==c)return go(t,this.__actions__);var d=[];t:for(;c--&&p<h;){for(var y=-1,v=t[s+=e];++y<f;){var g=l[y],b=g.iteratee,m=g.type,O=b(v);if(2==m)v=O;else if(!O){if(1==m)continue t;break t}}d[p++]=v}return d},Fr.prototype.at=gu,Fr.prototype.chain=function(){return yu(this)},Fr.prototype.commit=function(){return new Gr(this.value(),this.__chain__)},Fr.prototype.next=function(){this.__values__===i&&(this.__values__=ya(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?i:this.__values__[this.__index__++]}},Fr.prototype.plant=function(t){for(var e,r=this;r instanceof Xr;){var n=Hi(r);n.__index__=0,n.__values__=i,e?o.__wrapped__=n:e=n;var o=n;r=r.__wrapped__}return o.__wrapped__=t,e},Fr.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Yr){var e=t;return this.__actions__.length&&(e=new Yr(this)),(e=e.reverse()).__actions__.push({func:vu,args:[nu],thisArg:i}),new Gr(e,this.__chain__)}return this.thru(nu)},Fr.prototype.toJSON=Fr.prototype.valueOf=Fr.prototype.value=function(){return go(this.__wrapped__,this.__actions__)},Fr.prototype.first=Fr.prototype.head,Jt&&(Fr.prototype[Jt]=function(){return this}),Fr}();de._=gr,(o=function(){return gr}.call(e,r,e,n))===i||(n.exports=o)}).call(this)}).call(this,r(68),r(221)(t))},function(t,e,r){var n=r(7),o=r(34),i=r(33),u=r(87),a=r(62),c=r(174),s=r(28),l=n.TypeError,f=s("toPrimitive");t.exports=function(t,e){if(!i(t)||u(t))return t;var r,n=a(t,f);if(n){if(void 0===e&&(e="default"),r=o(n,t,e),!i(r)||u(r))return r;throw l("Can't convert object to primitive value")}return void 0===e&&(e="number"),c(t,e)}},function(t,e,r){var n=r(108);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(t,e,r){var n=r(36),o=r(18),i=r(91);t.exports=!n&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(t,e,r){var n=r(35),o=r(135),i=r(50),u=r(38);t.exports=function(t,e){for(var r=o(e),a=u.f,c=i.f,s=0;s<r.length;s++){var l=r[s];n(t,l)||a(t,l,c(e,l))}}},function(t,e,r){var n=r(46),o=r(15),i=r(74),u=r(112),a=r(32),c=o([].concat);t.exports=n("Reflect","ownKeys")||function(t){var e=i.f(a(t)),r=u.f;return r?c(e,r(t)):e}},function(t,e,r){var n=r(15),o=r(35),i=r(41),u=r(137).indexOf,a=r(72),c=n([].push);t.exports=function(t,e){var r,n=i(t),s=0,l=[];for(r in n)!o(a,r)&&o(n,r)&&c(l,r);for(;e.length>s;)o(n,r=e[s++])&&(~u(l,r)||c(l,r));return l}},function(t,e,r){var n=r(41),o=r(75),i=r(45),u=function(t){return function(e,r,u){var a,c=n(e),s=i(c),l=o(u,s);if(t&&r!=r){for(;s>l;)if((a=c[l++])!=a)return!0}else for(;s>l;l++)if((t||l in c)&&c[l]===r)return t||l||0;return!t&&-1}};t.exports={includes:u(!0),indexOf:u(!1)}},function(t,e,r){var n=r(46);t.exports=n("document","documentElement")},function(t,e,r){var n=r(51),o=r(41),i=r(74).f,u=r(114),a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"Window"==n(t)?function(t){try{return i(t)}catch(t){return u(a)}}(t):i(o(t))}},function(t,e,r){var n=r(28);e.f=n},function(t,e,r){var n=r(177),o=r(35),i=r(140),u=r(38).f;t.exports=function(t){var e=n.Symbol||(n.Symbol={});o(e,t)||u(e,t,{value:i.f(t)})}},function(t,e,r){"use strict";var n,o,i,u=r(18),a=r(30),c=r(60),s=r(101),l=r(42),f=r(28),p=r(71),h=f("iterator"),d=!1;[].keys&&("next"in(i=[].keys())?(o=s(s(i)))!==Object.prototype&&(n=o):d=!0),null==n||u((function(){var t={};return n[h].call(t)!==t}))?n={}:p&&(n=c(n)),a(n[h])||l(n,h,(function(){return this})),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:d}},function(t,e,r){var n=r(18);t.exports=!n((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},function(t,e,r){var n=r(16),o=r(15),i=r(72),u=r(33),a=r(35),c=r(38).f,s=r(74),l=r(139),f=r(183),p=r(90),h=r(185),d=!1,y=p("meta"),v=0,g=function(t){c(t,y,{value:{objectID:"O"+v++,weakData:{}}})},b=t.exports={enable:function(){b.enable=function(){},d=!0;var t=s.f,e=o([].splice),r={};r[y]=1,t(r).length&&(s.f=function(r){for(var n=t(r),o=0,i=n.length;o<i;o++)if(n[o]===y){e(n,o,1);break}return n},n({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:l.f}))},fastKey:function(t,e){if(!u(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!a(t,y)){if(!f(t))return"F";if(!e)return"E";g(t)}return t[y].objectID},getWeakData:function(t,e){if(!a(t,y)){if(!f(t))return!0;if(!e)return!1;g(t)}return t[y].weakData},onFreeze:function(t){return h&&d&&f(t)&&!a(t,y)&&g(t),t}};i[y]=!0},function(t,e,r){var n=r(28),o=r(80),i=n("iterator"),u=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||u[i]===t)}},function(t,e,r){var n=r(7),o=r(34),i=r(56),u=r(32),a=r(88),c=r(118),s=n.TypeError;t.exports=function(t,e){var r=arguments.length<2?c(t):e;if(i(r))return u(o(r,t));throw s(a(t)+" is not iterable")}},function(t,e,r){var n=r(34),o=r(32),i=r(62);t.exports=function(t,e,r){var u,a;o(t);try{if(!(u=i(t,"return"))){if("throw"===e)throw r;return r}u=n(u,t)}catch(t){a=!0,u=t}if("throw"===e)throw r;if(a)throw u;return o(u),r}},function(t,e,r){var n=r(30),o=r(33),i=r(102);t.exports=function(t,e,r){var u,a;return i&&n(u=e.constructor)&&u!==r&&o(a=u.prototype)&&a!==r.prototype&&i(t,a),t}},function(t,e,r){var n=r(42);t.exports=function(t,e,r){for(var o in e)n(t,o,e[o],r);return t}},function(t,e,r){"use strict";var n=r(46),o=r(38),i=r(28),u=r(36),a=i("species");t.exports=function(t){var e=n(t),r=o.f;u&&e&&!e[a]&&r(e,a,{configurable:!0,get:function(){return this}})}},function(t,e,r){var n=r(15),o=r(59),i=r(39),u=r(44),a=n("".charAt),c=n("".charCodeAt),s=n("".slice),l=function(t){return function(e,r){var n,l,f=i(u(e)),p=o(r),h=f.length;return p<0||p>=h?t?"":void 0:(n=c(f,p))<55296||n>56319||p+1===h||(l=c(f,p+1))<56320||l>57343?t?a(f,p):n:t?s(f,p,p+2):l-56320+(n-55296<<10)+65536}};t.exports={codeAt:l(!1),charAt:l(!0)}},function(t,e){t.exports={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}},function(t,e,r){var n=r(91)("span").classList,o=n&&n.constructor&&n.constructor.prototype;t.exports=o===Object.prototype?void 0:o},function(t,e,r){"use strict";var n=r(32);t.exports=function(){var t=n(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,r){var n=r(18),o=r(7).RegExp,i=n((function(){var t=o("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),u=i||n((function(){return!o("a","y").sticky})),a=i||n((function(){var t=o("^r","gy");return t.lastIndex=2,null!=t.exec("str")}));t.exports={BROKEN_CARET:a,MISSED_STICKY:u,UNSUPPORTED_Y:i}},function(t,e,r){"use strict";var n=r(16),o=r(79).find,i=r(100),u="find",a=!0;u in[]&&Array(1).find((function(){a=!1})),n({target:"Array",proto:!0,forced:a},{find:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),i(u)},function(t,e,r){"use strict";var n=r(16),o=r(137).includes,i=r(100);n({target:"Array",proto:!0},{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),i("includes")},function(t,e,r){"use strict";var n=r(16),o=r(15),i=r(197),u=r(44),a=r(39),c=r(198),s=o("".indexOf);n({target:"String",proto:!0,forced:!c("includes")},{includes:function(t){return!!~s(a(u(this)),a(i(t)),arguments.length>1?arguments[1]:void 0)}})},function(t,e,r){var n=r(33),o=r(51),i=r(28)("match");t.exports=function(t){var e;return n(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},function(t,e,r){var n=r(15);t.exports=n(1..valueOf)},function(t,e,r){var n=r(15),o=r(44),i=r(39),u=r(162),a=n("".replace),c="["+u+"]",s=RegExp("^"+c+c+"*"),l=RegExp(c+c+"*$"),f=function(t){return function(e){var r=i(o(e));return 1&t&&(r=a(r,s,"")),2&t&&(r=a(r,l,"")),r}};t.exports={start:f(1),end:f(2),trim:f(3)}},function(t,e){t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},function(t,e){var r,n,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function a(t){if(r===setTimeout)return setTimeout(t,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(t){r=i}try{n="function"==typeof clearTimeout?clearTimeout:u}catch(t){n=u}}();var c,s=[],l=!1,f=-1;function p(){l&&c&&(l=!1,c.length?s=c.concat(s):f=-1,s.length&&h())}function h(){if(!l){var t=a(p);l=!0;for(var e=s.length;e;){for(c=s,s=[];++f<e;)c&&c[f].run();f=-1,e=s.length}c=null,l=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===u||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function y(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];s.push(new d(t,e)),1!==s.length||l||a(h)},d.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,r){var n=r(32),o=r(165),i=r(28)("species");t.exports=function(t,e){var r,u=n(t).constructor;return void 0===u||null==(r=n(u)[i])?e:o(r)}},function(t,e,r){var n=r(7),o=r(99),i=r(88),u=n.TypeError;t.exports=function(t){if(o(t))return t;throw u(i(t)+" is not a constructor")}},function(t,e,r){"use strict";var n=r(16),o=r(161).trim;n({target:"String",proto:!0,forced:r(200)("trim")},{trim:function(){return o(this)}})},function(t,e,r){"use strict";var n=r(34),o=r(123),i=r(32),u=r(94),a=r(39),c=r(44),s=r(62),l=r(124),f=r(125);o("match",(function(t,e,r){return[function(e){var r=c(this),o=null==e?void 0:s(e,t);return o?n(o,e,r):new RegExp(e)[t](a(r))},function(t){var n=i(this),o=a(t),c=r(e,n,o);if(c.done)return c.value;if(!n.global)return f(n,o);var s=n.unicode;n.lastIndex=0;for(var p,h=[],d=0;null!==(p=f(n,o));){var y=a(p[0]);h[d]=y,""===y&&(n.lastIndex=l(o,u(n.lastIndex),s)),d++}return 0===d?null:h}]}))},function(t,e,r){var n,o,i,u,a=r(7),c=r(76),s=r(64),l=r(30),f=r(35),p=r(18),h=r(138),d=r(98),y=r(91),v=r(169),g=r(128),b=a.setImmediate,m=a.clearImmediate,O=a.process,_=a.Dispatch,w=a.Function,j=a.MessageChannel,x=a.String,E=0,S={},P="onreadystatechange";try{n=a.location}catch(t){}var A=function(t){if(f(S,t)){var e=S[t];delete S[t],e()}},k=function(t){return function(){A(t)}},D=function(t){A(t.data)},T=function(t){a.postMessage(x(t),n.protocol+"//"+n.host)};b&&m||(b=function(t){var e=d(arguments,1);return S[++E]=function(){c(l(t)?t:w(t),void 0,e)},o(E),E},m=function(t){delete S[t]},g?o=function(t){O.nextTick(k(t))}:_&&_.now?o=function(t){_.now(k(t))}:j&&!v?(u=(i=new j).port2,i.port1.onmessage=D,o=s(u.postMessage,u)):a.addEventListener&&l(a.postMessage)&&!a.importScripts&&n&&"file:"!==n.protocol&&!p(T)?(o=T,a.addEventListener("message",D,!1)):o=P in y("script")?function(t){h.appendChild(y("script")).onreadystatechange=function(){h.removeChild(this),A(t)}}:function(t){setTimeout(k(t),0)}),t.exports={set:b,clear:m}},function(t,e,r){var n=r(55);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)},function(t,e,r){"use strict";var n=r(56),o=function(t){var e,r;this.promise=new t((function(t,n){if(void 0!==e||void 0!==r)throw TypeError("Bad Promise constructor");e=t,r=n})),this.resolve=n(e),this.reject=n(r)};t.exports.f=function(t){return new o(t)}},function(t,e,r){"use strict";e.a=function(){return!1}},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return m}));var n=r(1);function o(t){throw new Error("[mobx-utils] "+t)}function i(t,e){void 0===e&&(e="Illegal state"),t||o(e)}var u=function(t){return t&&t!==Object.prototype&&Object.getOwnPropertyNames(t).concat(u(Object.getPrototypeOf(t))||[])},a=function(t){return function(t){var e=u(t);return e.filter((function(t,r){return e.indexOf(t)===r}))}(t).filter((function(t){return"constructor"!==t&&!~t.indexOf("__")}))},c="pending",s="fulfilled",l="rejected";function f(t){switch(this.state){case c:return t.pending&&t.pending(this.value);case l:return t.rejected&&t.rejected(this.value);case s:return t.fulfilled?t.fulfilled(this.value):this.value}}function p(t,e){if(i(arguments.length<=2,"fromPromise expects up to two arguments"),i("function"==typeof t||"object"==typeof t&&t&&"function"==typeof t.then,"Please pass a promise or function to fromPromise"),!0===t.isPromiseBasedObservable)return t;"function"==typeof t&&(t=new Promise(t));var r=t;t.then(Object(n.k)("observableFromPromise-resolve",(function(t){r.value=t,r.state=s})),Object(n.k)("observableFromPromise-reject",(function(t){r.value=t,r.state=l}))),r.isPromiseBasedObservable=!0,r.case=f;var o=e&&e.state===s?e.value:void 0;return Object(n.q)(r,{value:o,state:c},{},{deep:!1}),r}!function(t){t.reject=Object(n.k)("fromPromise.reject",(function(e){var r=t(Promise.reject(e));return r.state=l,r.value=e,r})),t.resolve=Object(n.k)("fromPromise.resolve",(function(e){void 0===e&&(e=void 0);var r=t(Promise.resolve(e));return r.state=s,r.value=e,r}))}(p||(p={}));var h=function(t,e,r,n){var o,i=arguments.length,u=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(u=(i<3?o(u):i>3?o(e,r,u):o(e,r))||u);return i>3&&u&&Object.defineProperty(e,r,u),u};!function(){function t(t,e){var r=this;Object(n.G)((function(){r.current=e,r.subscription=t.subscribe(r)}))}t.prototype.dispose=function(){this.subscription&&this.subscription.unsubscribe()},t.prototype.next=function(t){this.current=t},t.prototype.complete=function(){this.dispose()},t.prototype.error=function(t){this.current=t,this.dispose()},h([n.C.ref],t.prototype,"current",void 0),h([n.k.bound],t.prototype,"next",null),h([n.k.bound],t.prototype,"complete",null),h([n.k.bound],t.prototype,"error",null)}();var d=function(){return d=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},d.apply(this,arguments)},y=function(t,e,r,n){var o,i=arguments.length,u=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(u=(i<3?o(u):i>3?o(e,r,u):o(e,r))||u);return i>3&&u&&Object.defineProperty(e,r,u),u},v=["model","reset","submit","isDirty","isPropertyDirty","resetProperty"];!function(){function t(t){var e=this;this.model=t,this.localValues=n.C.map({}),this.localComputedValues=n.C.map({}),this.isPropertyDirty=function(t){return e.localValues.has(t)},i(Object(n.A)(t),"createViewModel expects an observable object"),a(t).forEach((function(r){if(r!==n.a&&"__mobxDidRunLazyInitializers"!==r){if(i(-1===v.indexOf(r),"The propertyname "+r+" is reserved and cannot be used with viewModels"),Object(n.w)(t,r)){var o=Object(n.h)(t,r).derivation;e.localComputedValues.set(r,Object(n.m)(o.bind(e)))}var u=Object.getOwnPropertyDescriptor(t,r),a=u?{enumerable:u.enumerable}:{};Object.defineProperty(e,r,d(d({},a),{configurable:!0,get:function(){return Object(n.w)(t,r)?e.localComputedValues.get(r).get():e.isPropertyDirty(r)?e.localValues.get(r):e.model[r]},set:Object(n.k)((function(t){t!==e.model[r]?e.localValues.set(r,t):e.localValues.delete(r)}))}))}}))}Object.defineProperty(t.prototype,"isDirty",{get:function(){return this.localValues.size>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"changedValues",{get:function(){return this.localValues.toJS()},enumerable:!1,configurable:!0}),t.prototype.submit=function(){var t=this;Object(n.B)(this.localValues).forEach((function(e){var r=t.localValues.get(e),o=t.model[e];Object(n.y)(o)?o.replace(r):Object(n.z)(o)?(o.clear(),o.merge(r)):Object(n.v)(r)||(t.model[e]=r)})),this.localValues.clear()},t.prototype.reset=function(){this.localValues.clear()},t.prototype.resetProperty=function(t){this.localValues.delete(t)},y([n.m],t.prototype,"isDirty",null),y([n.m],t.prototype,"changedValues",null),y([n.k.bound],t.prototype,"submit",null),y([n.k.bound],t.prototype,"reset",null),y([n.k.bound],t.prototype,"resetProperty",null)}();function g(t){if(!t)return"ROOT";for(var e=[];t.parent;)e.push(t.path),t=t.parent;return e.reverse().join("/")}function b(t){return Object(n.A)(t)||Object(n.y)(t)||Object(n.z)(t)}function m(t,e){var r=new WeakMap;function o(n){var o=r.get(n.object);!function(t,e){switch(t.type){case"add":i(t.newValue,e,t.name);break;case"update":u(t.oldValue),i(t.newValue,e,t.name||""+t.index);break;case"remove":case"delete":u(t.oldValue);break;case"splice":t.removed.map(u),t.added.forEach((function(r,n){return i(r,e,""+(t.index+n))}));for(var n=t.index+t.addedCount;n<t.object.length;n++)if(b(t.object[n])){var o=r.get(t.object[n]);o&&(o.path=""+n)}}}(n,o),e(n,g(o),t)}function i(t,e,u){if(b(t)){var a=r.get(t);if(a){if(a.parent!==e||a.path!==u)throw new Error("The same observable object cannot appear twice in the same tree, trying to assign it to '"+g(e)+"/"+u+"', but it already exists at '"+g(a.parent)+"/"+a.path+"'")}else{var c={parent:e,path:u,dispose:Object(n.D)(t,o)};r.set(t,c),Object(n.p)(t).forEach((function(t){var e=t[0];return i(t[1],c,e)}))}}}function u(t){if(b(t)){var e=r.get(t);if(!e)return;r.delete(t),e.dispose(),Object(n.L)(t).forEach(u)}}return i(t,void 0,""),function(){u(t)}}var O,_=(O=function(t,e){return O=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},O(t,e)},function(t,e){function r(){this.constructor=t}O(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),w=(function(t){function e(e,r,o){var i=void 0===o?{}:o,u=i.name,a=void 0===u?"ogm"+(1e3*Math.random()|0):u,c=i.keyToName,s=void 0===c?function(t){return""+t}:c,l=t.call(this)||this;l._keyToName=s,l._groupBy=r,l._ogmInfoKey=Symbol("ogmInfo"+a),l._base=e;for(var f=0;f<e.length;f++)l._addItem(e[f]);return l._disposeBaseObserver=Object(n.D)(l._base,(function(t){if("splice"===t.type)Object(n.J)((function(){for(var e=0,r=t.removed;e<r.length;e++){var n=r[e];l._removeItem(n)}for(var o=0,i=t.added;o<i.length;o++){var u=i[o];l._addItem(u)}}));else{if("update"!==t.type)throw new Error("illegal state");Object(n.J)((function(){l._removeItem(t.oldValue),l._addItem(t.newValue)}))}})),l}_(e,t),e.prototype.clear=function(){throw new Error("not supported")},e.prototype.delete=function(t){throw new Error("not supported")},e.prototype.set=function(t,e){throw new Error("not supported")},e.prototype.dispose=function(){this._disposeBaseObserver();for(var t=0;t<this._base.length;t++){var e=this._base[t];e[this._ogmInfoKey].reaction(),delete e[this._ogmInfoKey]}},e.prototype._getGroupArr=function(e){var r=t.prototype.get.call(this,e);return void 0===r&&(r=Object(n.C)([],{name:"GroupArray["+this._keyToName(e)+"]",deep:!1}),t.prototype.set.call(this,e,r)),r},e.prototype._removeFromGroupArr=function(e,r){var n=t.prototype.get.call(this,e);1===n.length?t.prototype.delete.call(this,e):(r===n.length-1||(n[r]=n[n.length-1],n[r][this._ogmInfoKey].groupArrIndex=r),n.length--)},e.prototype._addItem=function(t){var e=this,r=this._groupBy(t),o=this._getGroupArr(r),i={groupByValue:r,groupArrIndex:o.length,reaction:Object(n.F)((function(){return e._groupBy(t)}),(function(r,n){var o=t[e._ogmInfoKey];e._removeFromGroupArr(o.groupByValue,o.groupArrIndex);var i=e._getGroupArr(r),u=i.length;i.push(t),o.groupByValue=r,o.groupArrIndex=u}))};Object.defineProperty(t,this._ogmInfoKey,{configurable:!0,enumerable:!1,value:i}),o.push(t)},e.prototype._removeItem=function(t){var e=t[this._ogmInfoKey];this._removeFromGroupArr(e.groupByValue,e.groupArrIndex),e.reaction(),delete t[this._ogmInfoKey]}}(n.b),function(){function t(t,e){this.base=t,this.args=e,this.closestIdx=0,this.isDisposed=!1;for(var r=this.closest=this.root=t,n=0;n<this.args.length-1&&(r=r.get(e[n]));n++)this.closest=r;this.closestIdx=n}return t.prototype.exists=function(){this.assertNotDisposed();var t=this.args.length;return this.closestIdx>=t-1&&this.closest.has(this.args[t-1])},t.prototype.get=function(){if(this.assertNotDisposed(),!this.exists())throw new Error("Entry doesn't exist");return this.closest.get(this.args[this.args.length-1])},t.prototype.set=function(t){this.assertNotDisposed();for(var e=this.args.length,r=this.closest,n=this.closestIdx;n<e-1;n++){var o=new Map;r.set(this.args[n],o),r=o}this.closestIdx=e-1,this.closest=r,r.set(this.args[e-1],t)},t.prototype.delete=function(){if(this.assertNotDisposed(),!this.exists())throw new Error("Entry doesn't exist");var t=this.args.length;this.closest.delete(this.args[t-1]);for(var e=this.root,r=[e],n=0;n<t-1;n++)e=e.get(this.args[n]),r.push(e);for(n=r.length-1;n>0;n--)0===r[n].size&&r[n-1].delete(this.args[n-1]);this.isDisposed=!0},t.prototype.assertNotDisposed=function(){if(this.isDisposed)throw new Error("Concurrent modification exception")},t}());!function(){function t(){this.store=new Map,this.argsLength=-1}t.prototype.entry=function(t){if(-1===this.argsLength)this.argsLength=t.length;else if(this.argsLength!==t.length)throw new Error("DeepMap should be used with functions with a consistent length, expected: "+this.argsLength+", got: "+t.length);return this.last&&(this.last.isDisposed=!0),this.last=new w(this.store,t)}}();new Set,new Set;var j,x=Promise.resolve();j="undefined"!=typeof queueMicrotask?queueMicrotask:void 0!==t&&t.nextTick?function(e){t.nextTick(e)}:function(t){setTimeout(t,0)};var E=function(){return new Promise((function(t){j(t)}))}}).call(this,r(163))},function(t,e,r){var n;!function(o,i,u){if(o){for(var a,c={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},s={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},l={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},f={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},p=1;p<20;++p)c[111+p]="f"+p;for(p=0;p<=9;++p)c[p+96]=p.toString();m.prototype.bind=function(t,e,r){var n=this;return t=t instanceof Array?t:[t],n._bindMultiple.call(n,t,e,r),n},m.prototype.unbind=function(t,e){return this.bind.call(this,t,(function(){}),e)},m.prototype.trigger=function(t,e){var r=this;return r._directMap[t+":"+e]&&r._directMap[t+":"+e]({},t),r},m.prototype.reset=function(){var t=this;return t._callbacks={},t._directMap={},t},m.prototype.stopCallback=function(t,e){if((" "+e.className+" ").indexOf(" mousetrap ")>-1)return!1;if(b(e,this.target))return!1;if("composedPath"in t&&"function"==typeof t.composedPath){var r=t.composedPath()[0];r!==t.target&&(e=r)}return"INPUT"==e.tagName||"SELECT"==e.tagName||"TEXTAREA"==e.tagName||e.isContentEditable},m.prototype.handleKey=function(){var t=this;return t._handleKey.apply(t,arguments)},m.addKeycodes=function(t){for(var e in t)t.hasOwnProperty(e)&&(c[e]=t[e]);a=null},m.init=function(){var t=m(i);for(var e in t)"_"!==e.charAt(0)&&(m[e]=function(e){return function(){return t[e].apply(t,arguments)}}(e))},m.init(),o.Mousetrap=m,t.exports&&(t.exports=m),void 0===(n=function(){return m}.call(e,r,e,t))||(t.exports=n)}function h(t,e,r){t.addEventListener?t.addEventListener(e,r,!1):t.attachEvent("on"+e,r)}function d(t){if("keypress"==t.type){var e=String.fromCharCode(t.which);return t.shiftKey||(e=e.toLowerCase()),e}return c[t.which]?c[t.which]:s[t.which]?s[t.which]:String.fromCharCode(t.which).toLowerCase()}function y(t){return"shift"==t||"ctrl"==t||"alt"==t||"meta"==t}function v(t,e,r){return r||(r=function(){if(!a)for(var t in a={},c)t>95&&t<112||c.hasOwnProperty(t)&&(a[c[t]]=t);return a}()[t]?"keydown":"keypress"),"keypress"==r&&e.length&&(r="keydown"),r}function g(t,e){var r,n,o,i=[];for(r=function(t){return"+"===t?["+"]:(t=t.replace(/\+{2}/g,"+plus")).split("+")}(t),o=0;o<r.length;++o)n=r[o],f[n]&&(n=f[n]),e&&"keypress"!=e&&l[n]&&(n=l[n],i.push("shift")),y(n)&&i.push(n);return{key:n,modifiers:i,action:e=v(n,i,e)}}function b(t,e){return null!==t&&t!==i&&(t===e||b(t.parentNode,e))}function m(t){var e=this;if(t=t||i,!(e instanceof m))return new m(t);e.target=t,e._callbacks={},e._directMap={};var r,n={},o=!1,u=!1,a=!1;function c(t){t=t||{};var e,r=!1;for(e in n)t[e]?r=!0:n[e]=0;r||(a=!1)}function s(t,r,o,i,u,a){var c,s,l,f,p=[],h=o.type;if(!e._callbacks[t])return[];for("keyup"==h&&y(t)&&(r=[t]),c=0;c<e._callbacks[t].length;++c)if(s=e._callbacks[t][c],(i||!s.seq||n[s.seq]==s.level)&&h==s.action&&("keypress"==h&&!o.metaKey&&!o.ctrlKey||(l=r,f=s.modifiers,l.sort().join(",")===f.sort().join(",")))){var d=!i&&s.combo==u,v=i&&s.seq==i&&s.level==a;(d||v)&&e._callbacks[t].splice(c,1),p.push(s)}return p}function l(t,r,n,o){e.stopCallback(r,r.target||r.srcElement,n,o)||!1===t(r,n)&&(function(t){t.preventDefault?t.preventDefault():t.returnValue=!1}(r),function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}(r))}function f(t){"number"!=typeof t.which&&(t.which=t.keyCode);var r=d(t);r&&("keyup"!=t.type||o!==r?e.handleKey(r,function(t){var e=[];return t.shiftKey&&e.push("shift"),t.altKey&&e.push("alt"),t.ctrlKey&&e.push("ctrl"),t.metaKey&&e.push("meta"),e}(t),t):o=!1)}function p(t,e,i,u){function s(e){return function(){a=e,++n[t],clearTimeout(r),r=setTimeout(c,1e3)}}function f(e){l(i,e,t),"keyup"!==u&&(o=d(e)),setTimeout(c,10)}n[t]=0;for(var p=0;p<e.length;++p){var h=p+1===e.length?f:s(u||g(e[p+1]).action);v(e[p],h,u,t,p)}}function v(t,r,n,o,i){e._directMap[t+":"+n]=r;var u,a=(t=t.replace(/\s+/g," ")).split(" ");a.length>1?p(t,a,r,n):(u=g(t,n),e._callbacks[u.key]=e._callbacks[u.key]||[],s(u.key,u.modifiers,{type:u.action},o,t,i),e._callbacks[u.key][o?"unshift":"push"]({callback:r,modifiers:u.modifiers,action:u.action,seq:o,level:i,combo:t}))}e._handleKey=function(t,e,r){var n,o=s(t,e,r),i={},f=0,p=!1;for(n=0;n<o.length;++n)o[n].seq&&(f=Math.max(f,o[n].level));for(n=0;n<o.length;++n)if(o[n].seq){if(o[n].level!=f)continue;p=!0,i[o[n].seq]=1,l(o[n].callback,r,o[n].combo,o[n].seq)}else p||l(o[n].callback,r,o[n].combo);var h="keypress"==r.type&&u;r.type!=a||y(t)||h||c(i),u=p&&"keydown"==r.type},e._bindMultiple=function(t,e,r){for(var n=0;n<t.length;++n)v(t[n],e,r)},h(t,"keypress",f),h(t,"keydown",f),h(t,"keyup",f)}}("undefined"!=typeof window?window:null,"undefined"!=typeof window?document:null)},function(t,e,r){var n=r(7),o=r(34),i=r(30),u=r(33),a=n.TypeError;t.exports=function(t,e){var r,n;if("string"===e&&i(r=t.toString)&&!u(n=o(r,t)))return n;if(i(r=t.valueOf)&&!u(n=o(r,t)))return n;if("string"!==e&&i(r=t.toString)&&!u(n=o(r,t)))return n;throw a("Can't convert object to primitive value")}},function(t,e,r){var n=r(7),o=r(30),i=r(92),u=n.WeakMap;t.exports=o(u)&&/native code/.test(i(u))},function(t,e,r){var n=r(36),o=r(38),i=r(32),u=r(41),a=r(77);t.exports=n?Object.defineProperties:function(t,e){i(t);for(var r,n=u(e),c=a(e),s=c.length,l=0;s>l;)o.f(t,r=c[l++],n[r]);return t}},function(t,e,r){var n=r(7);t.exports=n},function(t,e,r){var n=r(7),o=r(96),i=r(99),u=r(33),a=r(28)("species"),c=n.Array;t.exports=function(t){var e;return o(t)&&(e=t.constructor,(i(e)&&(e===c||o(e.prototype))||u(e)&&null===(e=e[a]))&&(e=void 0)),void 0===e?c:e}},function(t,e,r){"use strict";var n=r(113),o=r(97);t.exports=n?{}.toString:function(){return"[object "+o(this)+"]"}},function(t,e,r){"use strict";var n=r(142).IteratorPrototype,o=r(60),i=r(69),u=r(78),a=r(80),c=function(){return this};t.exports=function(t,e,r,s){var l=e+" Iterator";return t.prototype=o(n,{next:i(+!s,r)}),u(t,l,!1,!0),a[l]=c,t}},function(t,e,r){var n=r(7),o=r(30),i=n.String,u=n.TypeError;t.exports=function(t){if("object"==typeof t||o(t))return t;throw u("Can't set "+i(t)+" as a prototype")}},function(t,e,r){"use strict";var n=r(16),o=r(7),i=r(15),u=r(95),a=r(42),c=r(144),s=r(117),l=r(119),f=r(30),p=r(33),h=r(18),d=r(120),y=r(78),v=r(148);t.exports=function(t,e,r){var g=-1!==t.indexOf("Map"),b=-1!==t.indexOf("Weak"),m=g?"set":"add",O=o[t],_=O&&O.prototype,w=O,j={},x=function(t){var e=i(_[t]);a(_,t,"add"==t?function(t){return e(this,0===t?0:t),this}:"delete"==t?function(t){return!(b&&!p(t))&&e(this,0===t?0:t)}:"get"==t?function(t){return b&&!p(t)?void 0:e(this,0===t?0:t)}:"has"==t?function(t){return!(b&&!p(t))&&e(this,0===t?0:t)}:function(t,r){return e(this,0===t?0:t,r),this})};if(u(t,!f(O)||!(b||_.forEach&&!h((function(){(new O).entries().next()})))))w=r.getConstructor(e,t,g,m),c.enable();else if(u(t,!0)){var E=new w,S=E[m](b?{}:-0,1)!=E,P=h((function(){E.has(1)})),A=d((function(t){new O(t)})),k=!b&&h((function(){for(var t=new O,e=5;e--;)t[m](e,e);return!t.has(-0)}));A||((w=e((function(t,e){l(t,_);var r=v(new O,t,w);return null!=e&&s(e,r[m],{that:r,AS_ENTRIES:g}),r}))).prototype=_,_.constructor=w),(P||k)&&(x("delete"),x("has"),g&&x("get")),(k||S)&&x(m),b&&_.clear&&delete _.clear}return j[t]=w,n({global:!0,forced:w!=O},j),y(w,t),b||r.setStrong(w,t,g),w}},function(t,e,r){var n=r(18),o=r(33),i=r(51),u=r(184),a=Object.isExtensible,c=n((function(){a(1)}));t.exports=c||u?function(t){return!!o(t)&&((!u||"ArrayBuffer"!=i(t))&&(!a||a(t)))}:a},function(t,e,r){var n=r(18);t.exports=n((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}))},function(t,e,r){var n=r(18);t.exports=!n((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(t,e,r){"use strict";var n=r(38).f,o=r(60),i=r(149),u=r(64),a=r(119),c=r(117),s=r(116),l=r(150),f=r(36),p=r(144).fastKey,h=r(58),d=h.set,y=h.getterFor;t.exports={getConstructor:function(t,e,r,s){var l=t((function(t,n){a(t,h),d(t,{type:e,index:o(null),first:void 0,last:void 0,size:0}),f||(t.size=0),null!=n&&c(n,t[s],{that:t,AS_ENTRIES:r})})),h=l.prototype,v=y(e),g=function(t,e,r){var n,o,i=v(t),u=b(t,e);return u?u.value=r:(i.last=u={index:o=p(e,!0),key:e,value:r,previous:n=i.last,next:void 0,removed:!1},i.first||(i.first=u),n&&(n.next=u),f?i.size++:t.size++,"F"!==o&&(i.index[o]=u)),t},b=function(t,e){var r,n=v(t),o=p(e);if("F"!==o)return n.index[o];for(r=n.first;r;r=r.next)if(r.key==e)return r};return i(h,{clear:function(){for(var t=v(this),e=t.index,r=t.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete e[r.index],r=r.next;t.first=t.last=void 0,f?t.size=0:this.size=0},delete:function(t){var e=this,r=v(e),n=b(e,t);if(n){var o=n.next,i=n.previous;delete r.index[n.index],n.removed=!0,i&&(i.next=o),o&&(o.previous=i),r.first==n&&(r.first=o),r.last==n&&(r.last=i),f?r.size--:e.size--}return!!n},forEach:function(t){for(var e,r=v(this),n=u(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:r.first;)for(n(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!b(this,t)}}),i(h,r?{get:function(t){var e=b(this,t);return e&&e.value},set:function(t,e){return g(this,0===t?0:t,e)}}:{add:function(t){return g(this,t=0===t?0:t,t)}}),f&&n(h,"size",{get:function(){return v(this).size}}),l},setStrong:function(t,e,r){var n=e+" Iterator",o=y(e),i=y(n);s(t,e,(function(t,e){d(this,{type:n,target:t,state:o(t),kind:e,last:void 0})}),(function(){for(var t=i(this),e=t.kind,r=t.last;r&&r.removed;)r=r.previous;return t.target&&(t.last=r=r?r.next:t.state.first)?"keys"==e?{value:r.key,done:!1}:"values"==e?{value:r.value,done:!1}:{value:[r.key,r.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),r?"entries":"values",!r,!0),l(e)}}},function(t,e,r){"use strict";var n=r(79).forEach,o=r(121)("forEach");t.exports=o?[].forEach:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}},function(t,e,r){"use strict";var n=r(7),o=r(64),i=r(34),u=r(40),a=r(189),c=r(145),s=r(99),l=r(45),f=r(63),p=r(146),h=r(118),d=n.Array;t.exports=function(t){var e=u(t),r=s(this),n=arguments.length,y=n>1?arguments[1]:void 0,v=void 0!==y;v&&(y=o(y,n>2?arguments[2]:void 0));var g,b,m,O,_,w,j=h(e),x=0;if(!j||this==d&&c(j))for(g=l(e),b=r?new this(g):d(g);g>x;x++)w=v?y(e[x],x):e[x],f(b,x,w);else for(_=(O=p(e,j)).next,b=r?new this:[];!(m=i(_,O)).done;x++)w=v?a(O,y,[m.value,x],!0):m.value,f(b,x,w);return b.length=x,b}},function(t,e,r){var n=r(32),o=r(147);t.exports=function(t,e,r,i){try{return i?e(n(r)[0],r[1]):e(r)}catch(e){o(t,"throw",e)}}},function(t,e,r){var n=r(18),o=r(7).RegExp;t.exports=n((function(){var t=o(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)}))},function(t,e,r){var n=r(18),o=r(7).RegExp;t.exports=n((function(){var t=o("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}))},function(t,e,r){"use strict";var n=r(16),o=r(15),i=r(56),u=r(40),a=r(45),c=r(39),s=r(18),l=r(193),f=r(121),p=r(194),h=r(195),d=r(70),y=r(196),v=[],g=o(v.sort),b=o(v.push),m=s((function(){v.sort(void 0)})),O=s((function(){v.sort(null)})),_=f("sort"),w=!s((function(){if(d)return d<70;if(!(p&&p>3)){if(h)return!0;if(y)return y<603;var t,e,r,n,o="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)v.push({k:e+n,v:r})}for(v.sort((function(t,e){return e.v-t.v})),n=0;n<v.length;n++)e=v[n].k.charAt(0),o.charAt(o.length-1)!==e&&(o+=e);return"DGBEFHACIJK"!==o}}));n({target:"Array",proto:!0,forced:m||!O||!_||!w},{sort:function(t){void 0!==t&&i(t);var e=u(this);if(w)return void 0===t?g(e):g(e,t);var r,n,o=[],s=a(e);for(n=0;n<s;n++)n in e&&b(o,e[n]);for(l(o,function(t){return function(e,r){return void 0===r?-1:void 0===e?1:void 0!==t?+t(e,r)||0:c(e)>c(r)?1:-1}}(t)),r=o.length,n=0;n<r;)e[n]=o[n++];for(;n<s;)delete e[n++];return e}})},function(t,e,r){var n=r(114),o=Math.floor,i=function(t,e){var r=t.length,c=o(r/2);return r<8?u(t,e):a(t,i(n(t,0,c),e),i(n(t,c),e),e)},u=function(t,e){for(var r,n,o=t.length,i=1;i<o;){for(n=i,r=t[i];n&&e(t[n-1],r)>0;)t[n]=t[--n];n!==i++&&(t[n]=r)}return t},a=function(t,e,r,n){for(var o=e.length,i=r.length,u=0,a=0;u<o||a<i;)t[u+a]=u<o&&a<i?n(e[u],r[a])<=0?e[u++]:r[a++]:u<o?e[u++]:r[a++];return t};t.exports=i},function(t,e,r){var n=r(55).match(/firefox\/(\d+)/i);t.exports=!!n&&+n[1]},function(t,e,r){var n=r(55);t.exports=/MSIE|Trident/.test(n)},function(t,e,r){var n=r(55).match(/AppleWebKit\/(\d+)\./);t.exports=!!n&&+n[1]},function(t,e,r){var n=r(7),o=r(159),i=n.TypeError;t.exports=function(t){if(o(t))throw i("The method doesn't accept regular expressions");return t}},function(t,e,r){var n=r(28)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[n]=!1,"/./"[t](e)}catch(t){}}return!1}},function(t,e,r){r(16)({target:"Number",stat:!0},{isNaN:function(t){return t!=t}})},function(t,e,r){var n=r(73).PROPER,o=r(18),i=r(162);t.exports=function(t){return o((function(){return!!i[t]()||"​…᠎"!=="​…᠎"[t]()||n&&i[t].name!==t}))}},function(t,e,r){var n=r(15),o=r(40),i=Math.floor,u=n("".charAt),a=n("".replace),c=n("".slice),s=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,l=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,r,n,f,p){var h=r+t.length,d=n.length,y=l;return void 0!==f&&(f=o(f),y=s),a(p,y,(function(o,a){var s;switch(u(a,0)){case"$":return"$";case"&":return t;case"`":return c(e,0,r);case"'":return c(e,h);case"<":s=f[c(a,1,-1)];break;default:var l=+a;if(0===l)return o;if(l>d){var p=i(l/10);return 0===p?o:p<=d?void 0===n[p-1]?u(a,1):n[p-1]+u(a,1):o}s=n[l-1]}return void 0===s?"":s}))}},function(t,e,r){"use strict";var n=r(36),o=r(15),i=r(34),u=r(18),a=r(77),c=r(112),s=r(84),l=r(40),f=r(85),p=Object.assign,h=Object.defineProperty,d=o([].concat);t.exports=!p||u((function(){if(n&&1!==p({b:1},p(h({},"a",{enumerable:!0,get:function(){h(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol(),o="abcdefghijklmnopqrst";return t[r]=7,o.split("").forEach((function(t){e[t]=t})),7!=p({},t)[r]||a(p({},e)).join("")!=o}))?function(t,e){for(var r=l(t),o=arguments.length,u=1,p=c.f,h=s.f;o>u;)for(var y,v=f(arguments[u++]),g=p?d(a(v),p(v)):a(v),b=g.length,m=0;b>m;)y=g[m++],n&&!i(h,v,y)||(r[y]=v[y]);return r}:p},function(t,e,r){"use strict";var n=r(7),o=r(15),i=r(56),u=r(33),a=r(35),c=r(98),s=n.Function,l=o([].concat),f=o([].join),p={},h=function(t,e,r){if(!a(p,e)){for(var n=[],o=0;o<e;o++)n[o]="a["+o+"]";p[e]=s("C,a","return new C("+f(n,",")+")")}return p[e](t,r)};t.exports=s.bind||function(t){var e=i(this),r=e.prototype,n=c(arguments,1),o=function(){var r=l(n,c(arguments));return this instanceof o?h(e,r.length,r):e.apply(t,r)};return u(r)&&(o.prototype=r),o}},function(t,e,r){var n=r(35);t.exports=function(t){return void 0!==t&&(n(t,"value")||n(t,"writable"))}},function(t,e,r){var n=r(15),o=r(44),i=r(39),u=/"/g,a=n("".replace);t.exports=function(t,e,r,n){var c=i(o(t)),s="<"+e;return""!==r&&(s+=" "+r+'="'+a(i(n),u,"&quot;")+'"'),s+">"+c+"</"+e+">"}},function(t,e,r){var n=r(18);t.exports=function(t){return n((function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}))}},function(t,e,r){r(16)({target:"Number",stat:!0},{EPSILON:Math.pow(2,-52)})},function(t,e,r){"use strict";var n,o,i,u,a=r(16),c=r(71),s=r(7),l=r(46),f=r(34),p=r(209),h=r(42),d=r(149),y=r(102),v=r(78),g=r(150),b=r(56),m=r(30),O=r(33),_=r(119),w=r(92),j=r(117),x=r(120),E=r(164),S=r(168).set,P=r(210),A=r(213),k=r(214),D=r(170),T=r(215),M=r(58),N=r(95),C=r(28),R=r(216),I=r(128),L=r(70),z=C("species"),B="Promise",U=M.getterFor(B),F=M.set,H=M.getterFor(B),X=p&&p.prototype,G=p,Y=X,V=s.TypeError,W=s.document,K=s.process,$=D.f,Z=$,q=!!(W&&W.createEvent&&s.dispatchEvent),J=m(s.PromiseRejectionEvent),Q="unhandledrejection",tt=!1,et=N(B,(function(){var t=w(G),e=t!==String(G);if(!e&&66===L)return!0;if(c&&!Y.finally)return!0;if(L>=51&&/native code/.test(t))return!1;var r=new G((function(t){t(1)})),n=function(t){t((function(){}),(function(){}))};return(r.constructor={})[z]=n,!(tt=r.then((function(){}))instanceof n)||!e&&R&&!J})),rt=et||!x((function(t){G.all(t).catch((function(){}))})),nt=function(t){var e;return!(!O(t)||!m(e=t.then))&&e},ot=function(t,e){if(!t.notified){t.notified=!0;var r=t.reactions;P((function(){for(var n=t.value,o=1==t.state,i=0;r.length>i;){var u,a,c,s=r[i++],l=o?s.ok:s.fail,p=s.resolve,h=s.reject,d=s.domain;try{l?(o||(2===t.rejection&&ct(t),t.rejection=1),!0===l?u=n:(d&&d.enter(),u=l(n),d&&(d.exit(),c=!0)),u===s.promise?h(V("Promise-chain cycle")):(a=nt(u))?f(a,u,p,h):p(u)):h(n)}catch(t){d&&!c&&d.exit(),h(t)}}t.reactions=[],t.notified=!1,e&&!t.rejection&&ut(t)}))}},it=function(t,e,r){var n,o;q?((n=W.createEvent("Event")).promise=e,n.reason=r,n.initEvent(t,!1,!0),s.dispatchEvent(n)):n={promise:e,reason:r},!J&&(o=s["on"+t])?o(n):t===Q&&k("Unhandled promise rejection",r)},ut=function(t){f(S,s,(function(){var e,r=t.facade,n=t.value;if(at(t)&&(e=T((function(){I?K.emit("unhandledRejection",n,r):it(Q,r,n)})),t.rejection=I||at(t)?2:1,e.error))throw e.value}))},at=function(t){return 1!==t.rejection&&!t.parent},ct=function(t){f(S,s,(function(){var e=t.facade;I?K.emit("rejectionHandled",e):it("rejectionhandled",e,t.value)}))},st=function(t,e,r){return function(n){t(e,n,r)}},lt=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,ot(t,!0))},ft=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw V("Promise can't be resolved itself");var n=nt(e);n?P((function(){var r={done:!1};try{f(n,e,st(ft,r,t),st(lt,r,t))}catch(e){lt(r,e,t)}})):(t.value=e,t.state=1,ot(t,!1))}catch(e){lt({done:!1},e,t)}}};if(et&&(Y=(G=function(t){_(this,Y),b(t),f(n,this);var e=U(this);try{t(st(ft,e),st(lt,e))}catch(t){lt(e,t)}}).prototype,(n=function(t){F(this,{type:B,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=d(Y,{then:function(t,e){var r=H(this),n=r.reactions,o=$(E(this,G));return o.ok=!m(t)||t,o.fail=m(e)&&e,o.domain=I?K.domain:void 0,r.parent=!0,n[n.length]=o,0!=r.state&&ot(r,!1),o.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new n,e=U(t);this.promise=t,this.resolve=st(ft,e),this.reject=st(lt,e)},D.f=$=function(t){return t===G||t===i?new o(t):Z(t)},!c&&m(p)&&X!==Object.prototype)){u=X.then,tt||(h(X,"then",(function(t,e){var r=this;return new G((function(t,e){f(u,r,t,e)})).then(t,e)}),{unsafe:!0}),h(X,"catch",Y.catch,{unsafe:!0}));try{delete X.constructor}catch(t){}y&&y(X,Y)}a({global:!0,wrap:!0,forced:et},{Promise:G}),v(G,B,!1,!0),g(B),i=l(B),a({target:B,stat:!0,forced:et},{reject:function(t){var e=$(this);return f(e.reject,void 0,t),e.promise}}),a({target:B,stat:!0,forced:c||et},{resolve:function(t){return A(c&&this===i?G:this,t)}}),a({target:B,stat:!0,forced:rt},{all:function(t){var e=this,r=$(e),n=r.resolve,o=r.reject,i=T((function(){var r=b(e.resolve),i=[],u=0,a=1;j(t,(function(t){var c=u++,s=!1;a++,f(r,e,t).then((function(t){s||(s=!0,i[c]=t,--a||n(i))}),o)})),--a||n(i)}));return i.error&&o(i.value),r.promise},race:function(t){var e=this,r=$(e),n=r.reject,o=T((function(){var o=b(e.resolve);j(t,(function(t){f(o,e,t).then(r.resolve,n)}))}));return o.error&&n(o.value),r.promise}})},function(t,e,r){var n=r(7);t.exports=n.Promise},function(t,e,r){var n,o,i,u,a,c,s,l,f=r(7),p=r(64),h=r(50).f,d=r(168).set,y=r(169),v=r(211),g=r(212),b=r(128),m=f.MutationObserver||f.WebKitMutationObserver,O=f.document,_=f.process,w=f.Promise,j=h(f,"queueMicrotask"),x=j&&j.value;x||(n=function(){var t,e;for(b&&(t=_.domain)&&t.exit();o;){e=o.fn,o=o.next;try{e()}catch(t){throw o?u():i=void 0,t}}i=void 0,t&&t.enter()},y||b||g||!m||!O?!v&&w&&w.resolve?((s=w.resolve(void 0)).constructor=w,l=p(s.then,s),u=function(){l(n)}):b?u=function(){_.nextTick(n)}:(d=p(d,f),u=function(){d(n)}):(a=!0,c=O.createTextNode(""),new m(n).observe(c,{characterData:!0}),u=function(){c.data=a=!a})),t.exports=x||function(t){var e={fn:t,next:void 0};i&&(i.next=e),o||(o=e,u()),i=e}},function(t,e,r){var n=r(55),o=r(7);t.exports=/ipad|iphone|ipod/i.test(n)&&void 0!==o.Pebble},function(t,e,r){var n=r(55);t.exports=/web0s(?!.*chrome)/i.test(n)},function(t,e,r){var n=r(32),o=r(33),i=r(170);t.exports=function(t,e){if(n(t),o(e)&&e.constructor===t)return e;var r=i.f(t);return(0,r.resolve)(e),r.promise}},function(t,e,r){var n=r(7);t.exports=function(t,e){var r=n.console;r&&r.error&&(1==arguments.length?r.error(t):r.error(t,e))}},function(t,e){t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},function(t,e){t.exports="object"==typeof window},function(t,e,r){"use strict";var n=r(40),o=r(75),i=r(45);t.exports=function(t){for(var e=n(this),r=i(e),u=arguments.length,a=o(u>1?arguments[1]:void 0,r),c=u>2?arguments[2]:void 0,s=void 0===c?r:o(c,r);s>a;)e[a++]=t;return e}},function(t,e,r){"use strict";var n=r(16),o=r(7),i=r(15),u=r(59),a=r(160),c=r(219),s=r(18),l=o.RangeError,f=o.String,p=Math.floor,h=i(c),d=i("".slice),y=i(1..toFixed),v=function(t,e,r){return 0===e?r:e%2==1?v(t,e-1,r*t):v(t*t,e/2,r)},g=function(t,e,r){for(var n=-1,o=r;++n<6;)o+=e*t[n],t[n]=o%1e7,o=p(o/1e7)},b=function(t,e){for(var r=6,n=0;--r>=0;)n+=t[r],t[r]=p(n/e),n=n%e*1e7},m=function(t){for(var e=6,r="";--e>=0;)if(""!==r||0===e||0!==t[e]){var n=f(t[e]);r=""===r?n:r+h("0",7-n.length)+n}return r};n({target:"Number",proto:!0,forced:s((function(){return"0.000"!==y(8e-5,3)||"1"!==y(.9,0)||"1.25"!==y(1.255,2)||"1000000000000000128"!==y(0xde0b6b3a7640080,0)}))||!s((function(){y({})}))},{toFixed:function(t){var e,r,n,o,i=a(this),c=u(t),s=[0,0,0,0,0,0],p="",y="0";if(c<0||c>20)throw l("Incorrect fraction digits");if(i!=i)return"NaN";if(i<=-1e21||i>=1e21)return f(i);if(i<0&&(p="-",i=-i),i>1e-21)if(r=(e=function(t){for(var e=0,r=t;r>=4096;)e+=12,r/=4096;for(;r>=2;)e+=1,r/=2;return e}(i*v(2,69,1))-69)<0?i*v(2,-e,1):i/v(2,e,1),r*=4503599627370496,(e=52-e)>0){for(g(s,0,r),n=c;n>=7;)g(s,1e7,0),n-=7;for(g(s,v(10,n,1),0),n=e-1;n>=23;)b(s,1<<23),n-=23;b(s,1<<n),g(s,1,1),b(s,2),y=m(s)}else g(s,0,r),g(s,1<<-e,0),y=m(s)+h("0",c);return y=c>0?p+((o=y.length)<=c?"0."+h("0",c-o)+y:d(y,0,o-c)+"."+d(y,o-c)):p+y}})},function(t,e,r){"use strict";var n=r(7),o=r(59),i=r(39),u=r(44),a=n.RangeError;t.exports=function(t){var e=i(u(this)),r="",n=o(t);if(n<0||n==1/0)throw a("Wrong number of repetitions");for(;n>0;(n>>>=1)&&(e+=e))1&n&&(r+=e);return r}},function(t,e,r){var n=r(36),o=r(15),i=r(77),u=r(41),a=o(r(84).f),c=o([].push),s=function(t){return function(e){for(var r,o=u(e),s=i(o),l=s.length,f=0,p=[];l>f;)r=s[f++],n&&!a(o,r)||c(p,t?[r,o[r]]:o[r]);return p}};t.exports={entries:s(!0),values:s(!1)}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,r){"use strict";r.r(e),r.d(e,"observer",(function(){return T_})),r.d(e,"LogicFlow",(function(){return D_})),r.d(e,"h",(function(){return tt.g})),r.d(e,"LogicFlowUtil",(function(){return n})),r.d(e,"BaseNode",(function(){return dg})),r.d(e,"RectNode",(function(){return jg})),r.d(e,"CircleNode",(function(){return Mg})),r.d(e,"PolygonNode",(function(){return Yg})),r.d(e,"DiamondNode",(function(){return tb})),r.d(e,"EllipseNode",(function(){return hb})),r.d(e,"TextNode",(function(){return xb})),r.d(e,"HtmlNode",(function(){return Rb})),r.d(e,"BaseEdge",(function(){return wm})),r.d(e,"LineEdge",(function(){return Rm})),r.d(e,"PolylineEdge",(function(){return Qm})),r.d(e,"BezierEdge",(function(){return lO})),r.d(e,"Arrow",(function(){return OO})),r.d(e,"BaseEdgeModel",(function(){return ga})),r.d(e,"BezierEdgeModel",(function(){return rh})),r.d(e,"LineEdgeModel",(function(){return Ca})),r.d(e,"PolylineEdgeModel",(function(){return Ja})),r.d(e,"BaseNodeModel",(function(){return Bh})),r.d(e,"CircleNodeModel",(function(){return od})),r.d(e,"DiamondNodeModel",(function(){return Ed})),r.d(e,"EllipseNodeModel",(function(){return Xd})),r.d(e,"PolygonNodeModel",(function(){return sy})),r.d(e,"RectNodeModel",(function(){return Ey})),r.d(e,"TextNodeModel",(function(){return Uy})),r.d(e,"HtmlNodeModel",(function(){return tv})),r.d(e,"EditConfigModel",(function(){return mo})),r.d(e,"GraphModel",(function(){return jl})),r.d(e,"SnaplineModel",(function(){return uv})),r.d(e,"Keyboard",(function(){return g_})),r.d(e,"get",(function(){return Rp})),r.d(e,"defaults",(function(){return zp})),r.d(e,"ElementState",(function(){return lo})),r.d(e,"ModelType",(function(){return po})),r.d(e,"ElementType",(function(){return ho})),r.d(e,"EventType",(function(){return yo})),r.d(e,"formateAnchorConnectValidateData",(function(){return ua}));var n={};r.r(n),r.d(n,"createUuid",(function(){return gu})),r.d(n,"refreshGraphId",(function(){return bu})),r.d(n,"StepDrag",(function(){return cs})),r.d(n,"setupEdgeModel",(function(){return hc})),r.d(n,"isBboxOverLapping",(function(){return dc})),r.d(n,"filterRepeatPoints",(function(){return yc})),r.d(n,"getSimplePolyline",(function(){return vc})),r.d(n,"getExpandedBBox",(function(){return gc})),r.d(n,"pointDirection",(function(){return bc})),r.d(n,"getExpandedBBoxPoint",(function(){return mc})),r.d(n,"mergeBBox",(function(){return Oc})),r.d(n,"getBBoxOfPoints",(function(){return _c})),r.d(n,"getPointsFromBBox",(function(){return wc})),r.d(n,"isPointOutsideBBox",(function(){return jc})),r.d(n,"getBBoxXCrossPoints",(function(){return xc})),r.d(n,"getBBoxYCrossPoints",(function(){return Ec})),r.d(n,"getBBoxCrossPointsByPoint",(function(){return Sc})),r.d(n,"estimateDistance",(function(){return Pc})),r.d(n,"costByPoints",(function(){return Ac})),r.d(n,"heuristicCostEstimate",(function(){return kc})),r.d(n,"rebuildPath",(function(){return Dc})),r.d(n,"removeClosePointFromOpenList",(function(){return Tc})),r.d(n,"isSegmentsIntersected",(function(){return Mc})),r.d(n,"isSegmentCrossingBBox",(function(){return Nc})),r.d(n,"getNextNeighborPoints",(function(){return Cc})),r.d(n,"pathFinder",(function(){return Rc})),r.d(n,"getBoxByOriginNode",(function(){return Ic})),r.d(n,"pointFilter",(function(){return Lc})),r.d(n,"getPolylinePoints",(function(){return zc})),r.d(n,"getLongestEdge",(function(){return Bc})),r.d(n,"isSegmentsInNode",(function(){return Uc})),r.d(n,"isSegmentsCrossNode",(function(){return Fc})),r.d(n,"getCrossPointInRect",(function(){return Hc})),r.d(n,"segmentDirection",(function(){return Xc})),r.d(n,"points2PointsList",(function(){return Gc})),r.d(n,"getSimplePoints",(function(){return Yc})),r.d(n,"getBytesLength",(function(){return Wc})),r.d(n,"getTextWidth",(function(){return $c})),r.d(n,"getAppendAttributes",(function(){return Zc})),r.d(n,"getBezierControlPoints",(function(){return qc})),r.d(n,"getBezierPoints",(function(){return Jc})),r.d(n,"getEndTangent",(function(){return ts})),r.d(n,"getClosestPointOfPolyline",(function(){return es})),r.d(n,"pickEdgeConfig",(function(){return rs})),r.d(n,"twoPointDistance",(function(){return ns})),r.d(n,"createEdgeGenerator",(function(){return os})),r.d(n,"snapToGrid",(function(){return Ui})),r.d(n,"getGridOffset",(function(){return Fi})),r.d(n,"sampleCubic",(function(){return ec})),r.d(n,"getThetaOfVector",(function(){return nc})),r.d(n,"degrees",(function(){return oc})),r.d(n,"Vector",(function(){return Es})),r.d(n,"Point",(function(){return Ss})),r.d(n,"Matrix",(function(){return ol})),r.d(n,"RotateMatrix",(function(){return il})),r.d(n,"ScaleMatrix",(function(){return ul})),r.d(n,"TranslateMatrix",(function(){return al}));var o=r(1),i=r(10);if(!i.j)throw new Error("mobx-react-lite requires React with Hooks support");if(!o.H)throw new Error("mobx-react-lite requires mobx at least version 4 to be available");var u=r(43),a=Object(u.b)("observerBatching");function c(t){t()}var s=!1;function l(){return s}function f(t){return Object(o.t)(t)}var p,h=1e4,d=new Set;function y(){void 0===p&&(p=setTimeout(v,1e4))}function v(){p=void 0;var t=Date.now();d.forEach((function(e){var r=e.current;r&&t>=r.cleanAt&&(r.reaction.dispose(),e.current=null,d.delete(e))})),d.size>0&&y()}var g=!1,b=[];var m={};function O(t){return"observer"+t}function _(t,e,r){if(void 0===e&&(e="observed"),void 0===r&&(r=m),l())return t();var n,a=function(t){return function(){g?b.push(t):t()}}((r.useForceUpdate||u.d)()),c=i.d.useRef(null);if(!c.current){var s=new o.c(O(e),(function(){p.mounted?a():(s.dispose(),c.current=null)})),p=function(t){return{cleanAt:Date.now()+h,reaction:t}}(s);c.current=p,n=c,d.add(n),y()}var v=c.current.reaction;return i.d.useDebugValue(v,f),i.d.useEffect((function(){var t;return t=c,d.delete(t),c.current?c.current.mounted=!0:(c.current={reaction:new o.c(O(e),(function(){a()})),cleanAt:1/0},a()),function(){c.current.reaction.dispose(),c.current=null}}),[]),function(t){g=!0,b=[];try{var e=t();g=!1;var r=b.length>0?b:void 0;return i.d.useLayoutEffect((function(){r&&r.forEach((function(t){return t()}))}),[r]),e}finally{g=!1}}((function(){var e,r;if(v.track((function(){try{e=t()}catch(t){r=t}})),r)throw r;return e}))}var w=function(){return w=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},w.apply(this,arguments)};function j(t,e){if(l())return t;var r,n,o,u=w({forwardRef:!1},e),a=t.displayName||t.name,c=function(e,r){return _((function(){return t(e,r)}),a)};return c.displayName=a,r=u.forwardRef?Object(i.f)(Object(i.e)(c)):Object(i.f)(c),n=t,o=r,Object.keys(n).forEach((function(t){x[t]||Object.defineProperty(o,t,Object.getOwnPropertyDescriptor(n,t))})),r.displayName=a,r}var x={$$typeof:!0,render:!0,compare:!0,type:!0};function E(t){var e=t.children,r=t.render,n=e||r;return"function"!=typeof n?null:_(n)}function S(t,e,r,n,o){var i="children"===e?"render":"children",u="function"==typeof t[e],a="function"==typeof t[i];return u&&a?new Error("MobX Observer: Do not use children and render in the same time in`"+r):u||a?null:new Error("Invalid prop `"+o+"` of type `"+typeof t[e]+"` supplied to `"+r+"`, expected `function`.")}E.propTypes={children:S,render:S},E.displayName="Observer";var P;(P=i.g)||(P=c),Object(o.n)({reactionScheduler:P}),Object(u.a)()[a]=!0;var A=0;var k={};function D(t){return k[t]||(k[t]=function(t){if("function"==typeof Symbol)return Symbol(t);var e="__$mobx-react "+t+" ("+A+")";return A++,e}(t)),k[t]}function T(t,e){if(M(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;var r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(var o=0;o<r.length;o++)if(!Object.hasOwnProperty.call(e,r[o])||!M(t[r[o]],e[r[o]]))return!1;return!0}function M(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function N(t,e,r){Object.hasOwnProperty.call(t,e)?t[e]=r:Object.defineProperty(t,e,{enumerable:!1,configurable:!0,writable:!0,value:r})}var C=D("patchMixins"),R=D("patchedDefinition");function I(t,e){for(var r=this,n=arguments.length,o=new Array(n>2?n-2:0),i=2;i<n;i++)o[i-2]=arguments[i];e.locks++;try{var u;return null!=t&&(u=t.apply(this,o)),u}finally{e.locks--,0===e.locks&&e.methods.forEach((function(t){t.apply(r,o)}))}}function L(t,e){return function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];I.call.apply(I,[this,t,e].concat(n))}}function z(t,e,r){var n=function(t,e){var r=t[C]=t[C]||{},n=r[e]=r[e]||{};return n.locks=n.locks||0,n.methods=n.methods||[],n}(t,e);n.methods.indexOf(r)<0&&n.methods.push(r);var o=Object.getOwnPropertyDescriptor(t,e);if(!o||!o[R]){var i=t[e],u=B(t,e,o?o.enumerable:void 0,n,i);Object.defineProperty(t,e,u)}}function B(t,e,r,n,o){var i,u=L(o,n);return(i={})[R]=!0,i.get=function(){return u},i.set=function(o){if(this===t)u=L(o,n);else{var i=B(this,e,r,n,o);Object.defineProperty(this,e,i)}},i.configurable=!0,i.enumerable=r,i}var U=o.a||"$mobx",F=D("isMobXReactObserver"),H=D("isUnmounted"),X=D("skipRender"),G=D("isForcingUpdate");function Y(t){var e=t.prototype;if(t[F])V(e);else t[F]=!0;if(e.componentWillReact)throw new Error("The componentWillReact life-cycle event is no longer supported");if(t.__proto__!==i.b)if(e.shouldComponentUpdate){if(e.shouldComponentUpdate!==K)throw new Error("It is not allowed to use shouldComponentUpdate in observer based components.")}else e.shouldComponentUpdate=K;$(e,"props"),$(e,"state");var r=e.render;return e.render=function(){return W.call(this,r)},z(e,"componentWillUnmount",(function(){var t;if(!0!==l()&&(null===(t=this.render[U])||void 0===t||t.dispose(),this[H]=!0,!this.render[U]))V(this)})),t}function V(t){return t.displayName||t.name||t.constructor&&(t.constructor.displayName||t.constructor.name)||"<component>"}function W(t){var e=this;if(!0===l())return t.call(this);N(this,X,!1),N(this,G,!1);var r=V(this),n=t.bind(this),u=!1,a=new o.c(r+".render()",(function(){if(!u&&(u=!0,!0!==e[H])){var t=!0;try{N(e,G,!0),e[X]||i.a.prototype.forceUpdate.call(e),t=!1}finally{N(e,G,!1),t&&a.dispose()}}}));function c(){u=!1;var t=void 0,e=void 0;if(a.track((function(){try{e=Object(o.d)(!1,n)}catch(e){t=e}})),t)throw t;return e}return a.reactComponent=this,c[U]=a,this.render=c,c.call(this)}function K(t,e){return l(),this.state!==e||!T(this.props,t)}function $(t,e){var r=D("reactProp_"+e+"_valueHolder"),n=D("reactProp_"+e+"_atomHolder");function i(){return this[n]||N(this,n,Object(o.o)("reactive "+e)),this[n]}Object.defineProperty(t,e,{configurable:!0,enumerable:!0,get:function(){var t=!1;return o.f&&o.e&&(t=Object(o.f)(!0)),i.call(this).reportObserved(),o.f&&o.e&&Object(o.e)(t),this[r]},set:function(t){this[G]||T(this[r],t)?N(this,r,t):(N(this,r,t),N(this,X,!0),i.call(this).reportChanged(),N(this,X,!1))}})}var Z="function"==typeof Symbol&&Symbol.for,q=Z?Symbol.for("react.forward_ref"):"function"==typeof i.e&&Object(i.e)((function(t){return null})).$$typeof,J=Z?Symbol.for("react.memo"):"function"==typeof i.f&&Object(i.f)((function(t){return null})).$$typeof;function Q(t){if(t.isMobxInjector,J&&t.$$typeof===J)throw new Error("Mobx observer: You are trying to use 'observer' on a function component wrapped in either another observer or 'React.memo'. The observer already applies 'React.memo' for you.");if(q&&t.$$typeof===q){var e=t.render;if("function"!=typeof e)throw new Error("render property of ForwardRef was not a function");return Object(i.e)((function(){var t=arguments;return Object(i.c)(E,null,(function(){return e.apply(void 0,t)}))}))}return"function"!=typeof t||t.prototype&&t.prototype.render||t.isReactClass||Object.prototype.isPrototypeOf.call(i.a,t)?Y(t):j(t)}if(!i.a)throw new Error("mobx-react requires React to be available");if(!o.C)throw new Error("mobx-react requires mobx to be available");var tt=r(0);r(4),r(8),r(2),r(3),r(52),r(6),r(5),r(11),r(37),r(26),r(21),r(20),r(24),r(22),r(25),r(9),r(17),r(23),r(19),r(192),r(156),r(104),r(157),r(158),r(199),r(61);var et=function(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o};var rt=function(){this.__data__=[],this.size=0};var nt=function(t,e){return t===e||t!=t&&e!=e};var ot=function(t,e){for(var r=t.length;r--;)if(nt(t[r][0],e))return r;return-1},it=Array.prototype.splice;var ut=function(t){var e=this.__data__,r=ot(e,t);return!(r<0)&&(r==e.length-1?e.pop():it.call(e,r,1),--this.size,!0)};var at=function(t){var e=this.__data__,r=ot(e,t);return r<0?void 0:e[r][1]};var ct=function(t){return ot(this.__data__,t)>-1};var st=function(t,e){var r=this.__data__,n=ot(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function lt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}lt.prototype.clear=rt,lt.prototype.delete=ut,lt.prototype.get=at,lt.prototype.has=ct,lt.prototype.set=st;var ft=lt;var pt=function(){this.__data__=new ft,this.size=0};var ht=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r};var dt=function(t){return this.__data__.get(t)};var yt=function(t){return this.__data__.has(t)},vt=r(31),gt=vt.a.Symbol,bt=Object.prototype,mt=bt.hasOwnProperty,Ot=bt.toString,_t=gt?gt.toStringTag:void 0;var wt=function(t){var e=mt.call(t,_t),r=t[_t];try{t[_t]=void 0;var n=!0}catch(t){}var o=Ot.call(t);return n&&(e?t[_t]=r:delete t[_t]),o},jt=Object.prototype.toString;var xt=function(t){return jt.call(t)},Et=gt?gt.toStringTag:void 0;var St=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Et&&Et in Object(t)?wt(t):xt(t)};var Pt=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};var At,kt=function(t){if(!Pt(t))return!1;var e=St(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},Dt=vt.a["__core-js_shared__"],Tt=(At=/[^.]+$/.exec(Dt&&Dt.keys&&Dt.keys.IE_PROTO||""))?"Symbol(src)_1."+At:"";var Mt=function(t){return!!Tt&&Tt in t},Nt=Function.prototype.toString;var Ct=function(t){if(null!=t){try{return Nt.call(t)}catch(t){}try{return t+""}catch(t){}}return""},Rt=/^\[object .+?Constructor\]$/,It=Function.prototype,Lt=Object.prototype,zt=It.toString,Bt=Lt.hasOwnProperty,Ut=RegExp("^"+zt.call(Bt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Ft=function(t){return!(!Pt(t)||Mt(t))&&(kt(t)?Ut:Rt).test(Ct(t))};var Ht=function(t,e){return null==t?void 0:t[e]};var Xt=function(t,e){var r=Ht(t,e);return Ft(r)?r:void 0},Gt=Xt(vt.a,"Map"),Yt=Xt(Object,"create");var Vt=function(){this.__data__=Yt?Yt(null):{},this.size=0};var Wt=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Kt=Object.prototype.hasOwnProperty;var $t=function(t){var e=this.__data__;if(Yt){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return Kt.call(e,t)?e[t]:void 0},Zt=Object.prototype.hasOwnProperty;var qt=function(t){var e=this.__data__;return Yt?void 0!==e[t]:Zt.call(e,t)};var Jt=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Yt&&void 0===e?"__lodash_hash_undefined__":e,this};function Qt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Qt.prototype.clear=Vt,Qt.prototype.delete=Wt,Qt.prototype.get=$t,Qt.prototype.has=qt,Qt.prototype.set=Jt;var te=Qt;var ee=function(){this.size=0,this.__data__={hash:new te,map:new(Gt||ft),string:new te}};var re=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var ne=function(t,e){var r=t.__data__;return re(e)?r["string"==typeof e?"string":"hash"]:r.map};var oe=function(t){var e=ne(this,t).delete(t);return this.size-=e?1:0,e};var ie=function(t){return ne(this,t).get(t)};var ue=function(t){return ne(this,t).has(t)};var ae=function(t,e){var r=ne(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function ce(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ce.prototype.clear=ee,ce.prototype.delete=oe,ce.prototype.get=ie,ce.prototype.has=ue,ce.prototype.set=ae;var se=ce;var le=function(t,e){var r=this.__data__;if(r instanceof ft){var n=r.__data__;if(!Gt||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new se(n)}return r.set(t,e),this.size=r.size,this};function fe(t){var e=this.__data__=new ft(t);this.size=e.size}fe.prototype.clear=pt,fe.prototype.delete=ht,fe.prototype.get=dt,fe.prototype.has=yt,fe.prototype.set=le;var pe=fe;var he=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this};var de=function(t){return this.__data__.has(t)};function ye(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new se;++e<r;)this.add(t[e])}ye.prototype.add=ye.prototype.push=he,ye.prototype.has=de;var ve=ye;var ge=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1};var be=function(t,e){return t.has(e)};var me=function(t,e,r,n,o,i){var u=1&r,a=t.length,c=e.length;if(a!=c&&!(u&&c>a))return!1;var s=i.get(t),l=i.get(e);if(s&&l)return s==e&&l==t;var f=-1,p=!0,h=2&r?new ve:void 0;for(i.set(t,e),i.set(e,t);++f<a;){var d=t[f],y=e[f];if(n)var v=u?n(y,d,f,e,t,i):n(d,y,f,t,e,i);if(void 0!==v){if(v)continue;p=!1;break}if(h){if(!ge(e,(function(t,e){if(!be(h,e)&&(d===t||o(d,t,r,n,i)))return h.push(e)}))){p=!1;break}}else if(d!==y&&!o(d,y,r,n,i)){p=!1;break}}return i.delete(t),i.delete(e),p},Oe=vt.a.Uint8Array;var _e=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r};var we=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r},je=gt?gt.prototype:void 0,xe=je?je.valueOf:void 0;var Ee=function(t,e,r,n,o,i,u){switch(r){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!i(new Oe(t),new Oe(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return nt(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var a=_e;case"[object Set]":var c=1&n;if(a||(a=we),t.size!=e.size&&!c)return!1;var s=u.get(t);if(s)return s==e;n|=2,u.set(t,e);var l=me(a(t),a(e),n,o,i,u);return u.delete(t),l;case"[object Symbol]":if(xe)return xe.call(t)==xe.call(e)}return!1};var Se=function(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t},Pe=Array.isArray;var Ae=function(t,e,r){var n=e(t);return Pe(t)?n:Se(n,r(t))};var ke=function(t,e){for(var r=-1,n=null==t?0:t.length,o=0,i=[];++r<n;){var u=t[r];e(u,r,t)&&(i[o++]=u)}return i};var De=function(){return[]},Te=Object.prototype.propertyIsEnumerable,Me=Object.getOwnPropertySymbols,Ne=Me?function(t){return null==t?[]:(t=Object(t),ke(Me(t),(function(e){return Te.call(t,e)})))}:De;var Ce=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n};var Re=function(t){return null!=t&&"object"==typeof t};var Ie=function(t){return Re(t)&&"[object Arguments]"==St(t)},Le=Object.prototype,ze=Le.hasOwnProperty,Be=Le.propertyIsEnumerable,Ue=Ie(function(){return arguments}())?Ie:function(t){return Re(t)&&ze.call(t,"callee")&&!Be.call(t,"callee")},Fe=Ue,He=r(48),Xe=/^(?:0|[1-9]\d*)$/;var Ge=function(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&Xe.test(t))&&t>-1&&t%1==0&&t<e};var Ye=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991},Ve={};Ve["[object Float32Array]"]=Ve["[object Float64Array]"]=Ve["[object Int8Array]"]=Ve["[object Int16Array]"]=Ve["[object Int32Array]"]=Ve["[object Uint8Array]"]=Ve["[object Uint8ClampedArray]"]=Ve["[object Uint16Array]"]=Ve["[object Uint32Array]"]=!0,Ve["[object Arguments]"]=Ve["[object Array]"]=Ve["[object ArrayBuffer]"]=Ve["[object Boolean]"]=Ve["[object DataView]"]=Ve["[object Date]"]=Ve["[object Error]"]=Ve["[object Function]"]=Ve["[object Map]"]=Ve["[object Number]"]=Ve["[object Object]"]=Ve["[object RegExp]"]=Ve["[object Set]"]=Ve["[object String]"]=Ve["[object WeakMap]"]=!1;var We=function(t){return Re(t)&&Ye(t.length)&&!!Ve[St(t)]};var Ke=function(t){return function(e){return t(e)}},$e=r(49),Ze=$e.a&&$e.a.isTypedArray,qe=Ze?Ke(Ze):We,Je=Object.prototype.hasOwnProperty;var Qe=function(t,e){var r=Pe(t),n=!r&&Fe(t),o=!r&&!n&&Object(He.a)(t),i=!r&&!n&&!o&&qe(t),u=r||n||o||i,a=u?Ce(t.length,String):[],c=a.length;for(var s in t)!e&&!Je.call(t,s)||u&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||Ge(s,c))||a.push(s);return a},tr=Object.prototype;var er=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||tr)};var rr=function(t,e){return function(r){return t(e(r))}},nr=rr(Object.keys,Object),or=Object.prototype.hasOwnProperty;var ir=function(t){if(!er(t))return nr(t);var e=[];for(var r in Object(t))or.call(t,r)&&"constructor"!=r&&e.push(r);return e};var ur=function(t){return null!=t&&Ye(t.length)&&!kt(t)};var ar=function(t){return ur(t)?Qe(t):ir(t)};var cr=function(t){return Ae(t,ar,Ne)},sr=Object.prototype.hasOwnProperty;var lr=function(t,e,r,n,o,i){var u=1&r,a=cr(t),c=a.length;if(c!=cr(e).length&&!u)return!1;for(var s=c;s--;){var l=a[s];if(!(u?l in e:sr.call(e,l)))return!1}var f=i.get(t),p=i.get(e);if(f&&p)return f==e&&p==t;var h=!0;i.set(t,e),i.set(e,t);for(var d=u;++s<c;){var y=t[l=a[s]],v=e[l];if(n)var g=u?n(v,y,l,e,t,i):n(y,v,l,t,e,i);if(!(void 0===g?y===v||o(y,v,r,n,i):g)){h=!1;break}d||(d="constructor"==l)}if(h&&!d){var b=t.constructor,m=e.constructor;b==m||!("constructor"in t)||!("constructor"in e)||"function"==typeof b&&b instanceof b&&"function"==typeof m&&m instanceof m||(h=!1)}return i.delete(t),i.delete(e),h},fr=Xt(vt.a,"DataView"),pr=Xt(vt.a,"Promise"),hr=Xt(vt.a,"Set"),dr=Xt(vt.a,"WeakMap"),yr="[object Map]",vr="[object Promise]",gr="[object Set]",br="[object WeakMap]",mr="[object DataView]",Or=Ct(fr),_r=Ct(Gt),wr=Ct(pr),jr=Ct(hr),xr=Ct(dr),Er=St;(fr&&Er(new fr(new ArrayBuffer(1)))!=mr||Gt&&Er(new Gt)!=yr||pr&&Er(pr.resolve())!=vr||hr&&Er(new hr)!=gr||dr&&Er(new dr)!=br)&&(Er=function(t){var e=St(t),r="[object Object]"==e?t.constructor:void 0,n=r?Ct(r):"";if(n)switch(n){case Or:return mr;case _r:return yr;case wr:return vr;case jr:return gr;case xr:return br}return e});var Sr=Er,Pr="[object Arguments]",Ar="[object Array]",kr="[object Object]",Dr=Object.prototype.hasOwnProperty;var Tr=function(t,e,r,n,o,i){var u=Pe(t),a=Pe(e),c=u?Ar:Sr(t),s=a?Ar:Sr(e),l=(c=c==Pr?kr:c)==kr,f=(s=s==Pr?kr:s)==kr,p=c==s;if(p&&Object(He.a)(t)){if(!Object(He.a)(e))return!1;u=!0,l=!1}if(p&&!l)return i||(i=new pe),u||qe(t)?me(t,e,r,n,o,i):Ee(t,e,c,r,n,o,i);if(!(1&r)){var h=l&&Dr.call(t,"__wrapped__"),d=f&&Dr.call(e,"__wrapped__");if(h||d){var y=h?t.value():t,v=d?e.value():e;return i||(i=new pe),o(y,v,r,n,i)}}return!!p&&(i||(i=new pe),lr(t,e,r,n,o,i))};var Mr=function t(e,r,n,o,i){return e===r||(null==e||null==r||!Re(e)&&!Re(r)?e!=e&&r!=r:Tr(e,r,n,o,t,i))};var Nr=function(t,e,r,n){var o=r.length,i=o,u=!n;if(null==t)return!i;for(t=Object(t);o--;){var a=r[o];if(u&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++o<i;){var c=(a=r[o])[0],s=t[c],l=a[1];if(u&&a[2]){if(void 0===s&&!(c in t))return!1}else{var f=new pe;if(n)var p=n(s,l,c,t,e,f);if(!(void 0===p?Mr(l,s,3,n,f):p))return!1}}return!0};var Cr=function(t){return t==t&&!Pt(t)};var Rr=function(t){for(var e=ar(t),r=e.length;r--;){var n=e[r],o=t[n];e[r]=[n,o,Cr(o)]}return e};var Ir=function(t,e){return function(r){return null!=r&&(r[t]===e&&(void 0!==e||t in Object(r)))}};var Lr=function(t){var e=Rr(t);return 1==e.length&&e[0][2]?Ir(e[0][0],e[0][1]):function(r){return r===t||Nr(r,t,e)}};var zr=function(t){return"symbol"==typeof t||Re(t)&&"[object Symbol]"==St(t)},Br=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ur=/^\w*$/;var Fr=function(t,e){if(Pe(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!zr(t))||(Ur.test(t)||!Br.test(t)||null!=e&&t in Object(e))};function Hr(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var u=t.apply(this,n);return r.cache=i.set(o,u)||i,u};return r.cache=new(Hr.Cache||se),r}Hr.Cache=se;var Xr=Hr;var Gr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yr=/\\(\\)?/g,Vr=function(t){var e=Xr(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Gr,(function(t,r,n,o){e.push(n?o.replace(Yr,"$1"):r||t)})),e})),Wr=gt?gt.prototype:void 0,Kr=Wr?Wr.toString:void 0;var $r=function t(e){if("string"==typeof e)return e;if(Pe(e))return et(e,t)+"";if(zr(e))return Kr?Kr.call(e):"";var r=e+"";return"0"==r&&1/e==-Infinity?"-0":r};var Zr=function(t){return null==t?"":$r(t)};var qr=function(t,e){return Pe(t)?t:Fr(t,e)?[t]:Vr(Zr(t))};var Jr=function(t){if("string"==typeof t||zr(t))return t;var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e};var Qr=function(t,e){for(var r=0,n=(e=qr(e,t)).length;null!=t&&r<n;)t=t[Jr(e[r++])];return r&&r==n?t:void 0};var tn=function(t,e,r){var n=null==t?void 0:Qr(t,e);return void 0===n?r:n};var en=function(t,e){return null!=t&&e in Object(t)};var rn=function(t,e,r){for(var n=-1,o=(e=qr(e,t)).length,i=!1;++n<o;){var u=Jr(e[n]);if(!(i=null!=t&&r(t,u)))break;t=t[u]}return i||++n!=o?i:!!(o=null==t?0:t.length)&&Ye(o)&&Ge(u,o)&&(Pe(t)||Fe(t))};var nn=function(t,e){return null!=t&&rn(t,e,en)};var on=function(t,e){return Fr(t)&&Cr(e)?Ir(Jr(t),e):function(r){var n=tn(r,t);return void 0===n&&n===e?nn(r,t):Mr(e,n,3)}};var un=function(t){return t};var an=function(t){return function(e){return null==e?void 0:e[t]}};var cn=function(t){return function(e){return Qr(e,t)}};var sn=function(t){return Fr(t)?an(Jr(t)):cn(t)};var ln=function(t){return"function"==typeof t?t:null==t?un:"object"==typeof t?Pe(t)?on(t[0],t[1]):Lr(t):sn(t)};var fn=function(t){return function(e,r,n){for(var o=-1,i=Object(e),u=n(e),a=u.length;a--;){var c=u[t?a:++o];if(!1===r(i[c],c,i))break}return e}}();var pn=function(t,e){return function(r,n){if(null==r)return r;if(!ur(r))return t(r,n);for(var o=r.length,i=e?o:-1,u=Object(r);(e?i--:++i<o)&&!1!==n(u[i],i,u););return r}}((function(t,e){return t&&fn(t,e,ar)}));var hn=function(t,e){var r=-1,n=ur(t)?Array(t.length):[];return pn(t,(function(t,o,i){n[++r]=e(t,o,i)})),n};var dn=function(t,e){return(Pe(t)?et:hn)(t,ln(e,3))};Object(o.n)({isolateGlobalState:!0});var yn=function(){try{var t=Xt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();var vn=function(t,e,r){"__proto__"==e&&yn?yn(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r},gn=Object.prototype.hasOwnProperty;var bn=function(t,e,r){var n=t[e];gn.call(t,e)&&nt(n,r)&&(void 0!==r||e in t)||vn(t,e,r)};var mn=function(t,e,r,n){var o=!r;r||(r={});for(var i=-1,u=e.length;++i<u;){var a=e[i],c=n?n(r[a],t[a],a,r,t):void 0;void 0===c&&(c=t[a]),o?vn(r,a,c):bn(r,a,c)}return r};var On=function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)},_n=Math.max;var wn=function(t,e,r){return e=_n(void 0===e?t.length-1:e,0),function(){for(var n=arguments,o=-1,i=_n(n.length-e,0),u=Array(i);++o<i;)u[o]=n[e+o];o=-1;for(var a=Array(e+1);++o<e;)a[o]=n[o];return a[e]=r(u),On(t,this,a)}};var jn=function(t){return function(){return t}},xn=yn?function(t,e){return yn(t,"toString",{configurable:!0,enumerable:!1,value:jn(e),writable:!0})}:un,En=Date.now;var Sn=function(t){var e=0,r=0;return function(){var n=En(),o=16-(n-r);if(r=n,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}},Pn=Sn(xn);var An=function(t,e){return Pn(wn(t,e,un),t+"")};var kn=function(t,e,r){if(!Pt(r))return!1;var n=typeof e;return!!("number"==n?ur(r)&&Ge(e,r.length):"string"==n&&e in r)&&nt(r[e],t)};var Dn=function(t){return An((function(e,r){var n=-1,o=r.length,i=o>1?r[o-1]:void 0,u=o>2?r[2]:void 0;for(i=t.length>3&&"function"==typeof i?(o--,i):void 0,u&&kn(r[0],r[1],u)&&(i=o<3?void 0:i,o=1),e=Object(e);++n<o;){var a=r[n];a&&t(e,a,n,i)}return e}))},Tn=Object.prototype.hasOwnProperty,Mn=Dn((function(t,e){if(er(e)||ur(e))mn(e,ar(e),t);else for(var r in e)Tn.call(e,r)&&bn(t,r,e[r])}));var Nn=function(t,e,r,n){if(!Pt(t))return t;for(var o=-1,i=(e=qr(e,t)).length,u=i-1,a=t;null!=a&&++o<i;){var c=Jr(e[o]),s=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;if(o!=u){var l=a[c];void 0===(s=n?n(l,c,a):void 0)&&(s=Pt(l)?l:Ge(e[o+1])?[]:{})}bn(a,c,s),a=a[c]}return t};var Cn=function(t,e,r){for(var n=-1,o=e.length,i={};++n<o;){var u=e[n],a=Qr(t,u);r(a,u)&&Nn(i,qr(u,t),a)}return i};var Rn=function(t,e){return Cn(t,e,(function(e,r){return nn(t,r)}))},In=gt?gt.isConcatSpreadable:void 0;var Ln=function(t){return Pe(t)||Fe(t)||!!(In&&t&&t[In])};var zn=function t(e,r,n,o,i){var u=-1,a=e.length;for(n||(n=Ln),i||(i=[]);++u<a;){var c=e[u];r>0&&n(c)?r>1?t(c,r-1,n,o,i):Se(i,c):o||(i[i.length]=c)}return i};var Bn=function(t){return(null==t?0:t.length)?zn(t,1):[]};var Un,Fn,Hn,Xn,Gn,Yn,Vn,Wn,Kn,$n,Zn,qn,Jn,Qn,to,eo,ro,no,oo,io=function(t){return Pn(wn(t,void 0,Bn),t+"")}((function(t,e){return null==t?{}:Rn(t,e)}));function uo(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function ao(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function co(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function so(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var lo,fo,po,ho,yo,vo,go={stopZoomGraph:!1,stopScrollGraph:!1,stopMoveGraph:!1,adjustEdge:!1,adjustEdgeStartAndEnd:!1,adjustNodePosition:!1,hideAnchors:!0,allowRotation:!1,nodeSelectedOutline:!0,nodeTextEdit:!1,edgeTextEdit:!1,nodeTextDraggable:!1,edgeTextDraggable:!1},bo=["isSilentMode","stopZoomGraph","stopScrollGraph","stopMoveGraph","adjustEdge","adjustEdgeMiddle","adjustEdgeStartAndEnd","adjustNodePosition","hideAnchors","allowRotation","hoverOutline","nodeSelectedOutline","edgeSelectedOutline","nodeTextEdit","edgeTextEdit","nodeTextDraggable","edgeTextDraggable","multipleSelectKey","autoExpand"],mo=(Fn=so((Un=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),uo(this,"isSilentMode",Fn,this),uo(this,"stopZoomGraph",Hn,this),uo(this,"stopScrollGraph",Xn,this),uo(this,"stopMoveGraph",Gn,this),uo(this,"adjustEdge",Yn,this),uo(this,"adjustEdgeMiddle",Vn,this),uo(this,"adjustEdgeStartAndEnd",Wn,this),uo(this,"adjustNodePosition",Kn,this),uo(this,"hideAnchors",$n,this),uo(this,"allowRotation",Zn,this),uo(this,"hoverOutline",qn,this),uo(this,"nodeSelectedOutline",Jn,this),uo(this,"edgeSelectedOutline",Qn,this),uo(this,"nodeTextEdit",to,this),uo(this,"edgeTextEdit",eo,this),uo(this,"nodeTextDraggable",ro,this),uo(this,"edgeTextDraggable",no,this),uo(this,"autoExpand",oo,this),co(this,"multipleSelectKey",""),co(this,"defaultConfig",{}),Mn(this,this.getConfigDetail(e))}var e,r,n;return e=t,(r=[{key:"updateEditConfig",value:function(t){var e=this.getConfigDetail(t);Mn(this,e)}},{key:"getConfigDetail",value:function(t){var e=t.isSilentMode,r=t.textEdit,n={};if(!1===e&&Mn(n,this.defaultConfig),!0===e&&e!==this.isSilentMode){var o=io(go,bo);this.defaultConfig={stopZoomGraph:this.stopZoomGraph,stopScrollGraph:this.stopScrollGraph,stopMoveGraph:this.stopMoveGraph,adjustEdge:this.adjustEdge,adjustEdgeMiddle:this.adjustEdgeMiddle,adjustEdgeStartAndEnd:this.adjustEdgeStartAndEnd,adjustNodePosition:this.adjustNodePosition,hideAnchors:this.hideAnchors,allowRotation:this.allowRotation,hoverOutline:this.hoverOutline,nodeSelectedOutline:this.nodeSelectedOutline,edgeSelectedOutline:this.edgeSelectedOutline,nodeTextEdit:this.nodeTextEdit,edgeTextEdit:this.edgeTextEdit,nodeTextDraggable:this.nodeTextDraggable,edgeTextDraggable:this.edgeTextDraggable,autoExpand:this.autoExpand},Mn(n,o)}!1===r&&Mn(n,{nodeTextEdit:!1,edgeTextEdit:!1});var i=io(t,bo);return Mn(n,i)}},{key:"getConfig",value:function(){return io(this,bo)}}])&&ao(e.prototype,r),n&&ao(e,n),t}()).prototype,"isSilentMode",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Hn=so(Un.prototype,"stopZoomGraph",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Xn=so(Un.prototype,"stopScrollGraph",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Gn=so(Un.prototype,"stopMoveGraph",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Yn=so(Un.prototype,"adjustEdge",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Vn=so(Un.prototype,"adjustEdgeMiddle",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Wn=so(Un.prototype,"adjustEdgeStartAndEnd",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Kn=so(Un.prototype,"adjustNodePosition",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),$n=so(Un.prototype,"hideAnchors",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Zn=so(Un.prototype,"allowRotation",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),qn=so(Un.prototype,"hoverOutline",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Jn=so(Un.prototype,"nodeSelectedOutline",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Qn=so(Un.prototype,"edgeSelectedOutline",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),to=so(Un.prototype,"nodeTextEdit",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),eo=so(Un.prototype,"edgeTextEdit",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),ro=so(Un.prototype,"nodeTextDraggable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),no=so(Un.prototype,"edgeTextDraggable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),oo=so(Un.prototype,"autoExpand",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),so(Un.prototype,"updateEditConfig",[o.k],Object.getOwnPropertyDescriptor(Un.prototype,"updateEditConfig"),Un.prototype),Un);r(65),r(66);!function(t){t[t.DEFAULT=1]="DEFAULT",t[t.TEXT_EDIT=2]="TEXT_EDIT",t[t.SHOW_MENU=3]="SHOW_MENU",t[t.ALLOW_CONNECT=4]="ALLOW_CONNECT",t[t.NOT_ALLOW_CONNECT=5]="NOT_ALLOW_CONNECT"}(lo||(lo={})),function(t){t.KEY="logic-flow",t.NODE_NAME="lf-node",t.EDGE_NAME="lf-edge"}(fo||(fo={})),function(t){t.NODE="node",t.CIRCLE_NODE="circle-node",t.POLYGON_NODE="polygon-node",t.RECT_NODE="rect-node",t.TEXT_NODE="text-node",t.ELLIPSE_NODE="ellipse-node",t.DIAMOND_NODE="diamond-node",t.HTML_NODE="html-node",t.EDGE="edge",t.LINE_EDGE="line-edge",t.POLYLINE_EDGE="polyline-edge",t.BEZIER_EDGE="bezier-edge",t.GRAPH="graph"}(po||(po={})),function(t){t.NODE="node",t.EDGE="edge",t.GRAPH="graph"}(ho||(ho={})),function(t){t.ELEMENT_CLICK="element:click",t.NODE_CLICK="node:click",t.NODE_DBCLICK="node:dbclick",t.NODE_DELETE="node:delete",t.NODE_ADD="node:add",t.NODE_GROUP_COPY="node:group-copy-add",t.NODE_DND_ADD="node:dnd-add",t.NODE_DND_DRAG="node:dnd-drag",t.NODE_MOUSEDOWN="node:mousedown",t.NODE_DRAGSTART="node:dragstart",t.NODE_DRAG="node:drag",t.NODE_DROP="node:drop",t.NODE_MOUSEUP="node:mouseup",t.NODE_MOUSEMOVE="node:mousemove",t.NODE_MOUSEENTER="node:mouseenter",t.NODE_MOUSELEAVE="node:mouseleave",t.NODE_CONTEXTMENU="node:contextmenu",t.NODE_ROTATE="node:rotate",t.EDGE_DELETE="edge:delete",t.EDGE_ADD="edge:add",t.EDGE_CLICK="edge:click",t.EDGE_DBCLICK="edge:dbclick",t.EDGE_MOUSEENTER="edge:mouseenter",t.EDGE_MOUSELEAVE="edge:mouseleave",t.EDGE_CONTEXTMENU="edge:contextmenu",t.EDGE_ADJUST="edge:adjust",t.EDGE_EXCHANGE_NODE="edge:exchange-node",t.ANCHOR_DRAGSTART="anchor:dragstart",t.ANCHOR_DRAG="anchor:drag",t.ANCHOR_DROP="anchor:drop",t.ANCHOR_DRAGEND="anchor:dragend",t.ADJUST_POINT_MOUSEDOWN="adjustPoint:mousedown",t.ADJUST_POINT_MOUSEUP="adjustPoint:mouseup",t.ADJUST_POINT_MOUSEMOVE="adjustPoint:mousemove",t.ADJUST_POINT_DRAGSTART="adjustPoint:dragstart",t.ADJUST_POINT_DRAG="adjustPoint:drag",t.ADJUST_POINT_DROP="adjustPoint:drop",t.ADJUST_POINT_DRAGEND="adjustPoint:dragend",t.BLANK_MOUSEDOWN="blank:mousedown",t.BLANK_DRAGSTART="blank:dragstart",t.BLANK_DRAG="blank:drag",t.BLANK_DROP="blank:drop",t.BLANK_MOUSEMOVE="blank:mousemove",t.BLANK_MOUSEUP="blank:mouseup",t.BLANK_CLICK="blank:click",t.BLANK_CONTEXTMENU="blank:contextmenu",t.SELECTION_MOUSEDOWN="selection:mousedown",t.SELECTION_DRAGSTART="selection:dragstart",t.SELECTION_DRAG="selection:drag",t.SELECTION_DROP="selection:drop",t.SELECTION_MOUSEMOVE="selection:mousemove",t.SELECTION_MOUSEUP="selection:mouseup",t.SELECTION_CONTEXTMENU="selection:contextmenu",t.CONNECTION_NOT_ALLOWED="connection:not-allowed",t.HISTORY_CHANGE="history:change",t.TEXT_UPDATE="text:update",t.GRAPH_TRANSFORM="graph:transform",t.GRAPH_RENDERED="graph:rendered"}(yo||(yo={})),function(t){t.HORIZONTAL="horizontal",t.VERTICAL="vertical"}(vo||(vo={}));var Oo,_o,wo,jo,xo,Eo,So,Po,Ao;function ko(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Do(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Do(t,e)}(t,e)||function(){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 Do(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function To(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function Mo(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function No(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Co(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}!function(t){t[t.DEFAULT=0]="DEFAULT",t[t.INCREASE=1]="INCREASE"}(Oo||(Oo={}));var Ro={false:[-1/0,-1/0,1/0,1/0],true:[0,0,0,0],vertical:[-1/0,0,1/0,0],horizontal:[0,-1/0,0,1/0]},Io=(_o=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),No(this,"MINI_SCALE_SIZE",.2),No(this,"MAX_SCALE_SIZE",16),To(this,"SCALE_X",wo,this),To(this,"SKEW_Y",jo,this),To(this,"SKEW_X",xo,this),To(this,"SCALE_Y",Eo,this),To(this,"TRANSLATE_X",So,this),To(this,"TRANSLATE_Y",Po,this),To(this,"ZOOM_SIZE",Ao,this),No(this,"eventCenter",void 0),No(this,"translateLimitMinX",void 0),No(this,"translateLimitMinY",void 0),No(this,"translateLimitMaxX",void 0),No(this,"translateLimitMaxY",void 0),this.eventCenter=e;var n=r.stopMoveGraph,o=void 0!==n&&n;this.updateTranslateLimits(o)}var e,r,n;return e=t,r=[{key:"setZoomMiniSize",value:function(t){this.MINI_SCALE_SIZE=t}},{key:"setZoomMaxSize",value:function(t){this.MAX_SCALE_SIZE=t}},{key:"HtmlPointToCanvasPoint",value:function(t){var e=ko(t,2),r=e[0],n=e[1];return[(r-this.TRANSLATE_X)/this.SCALE_X,(n-this.TRANSLATE_Y)/this.SCALE_Y]}},{key:"CanvasPointToHtmlPoint",value:function(t){var e=ko(t,2),r=e[0],n=e[1];return[r*this.SCALE_X+this.TRANSLATE_X,n*this.SCALE_Y+this.TRANSLATE_Y]}},{key:"moveCanvasPointByHtml",value:function(t,e,r){var n=ko(t,2),o=n[0],i=n[1];return[o+e/this.SCALE_X,i+r/this.SCALE_Y]}},{key:"fixDeltaXY",value:function(t,e){return[t/this.SCALE_X,e/this.SCALE_Y]}},{key:"getTransformStyle",value:function(){var t=[this.SCALE_X,this.SKEW_Y,this.SKEW_X,this.SCALE_Y,this.TRANSLATE_X,this.TRANSLATE_Y].join(",");return{transform:"matrix(".concat(t,")")}}},{key:"zoom",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=arguments.length>1?arguments[1]:void 0,r=this.SCALE_X,n=this.SCALE_Y;return!0===t?(r+=this.ZOOM_SIZE,n+=this.ZOOM_SIZE):!1===t?(r-=this.ZOOM_SIZE,n-=this.ZOOM_SIZE):"number"==typeof t&&(r=t,n=t),r<this.MINI_SCALE_SIZE||r>this.MAX_SCALE_SIZE||(e&&(this.TRANSLATE_X-=(r-this.SCALE_X)*e[0],this.TRANSLATE_Y-=(n-this.SCALE_Y)*e[1]),this.SCALE_X=r,this.SCALE_Y=n,this.emitGraphTransform("zoom")),"".concat(100*this.SCALE_X,"%")}},{key:"emitGraphTransform",value:function(t){this.eventCenter.emit(yo.GRAPH_TRANSFORM,{type:t,transform:{SCALE_X:this.SCALE_X,SKEW_Y:this.SKEW_Y,SKEW_X:this.SKEW_X,SCALE_Y:this.SCALE_Y,TRANSLATE_X:this.TRANSLATE_X,TRANSLATE_Y:this.TRANSLATE_Y}})}},{key:"resetZoom",value:function(){this.SCALE_X=1,this.SCALE_Y=1,this.emitGraphTransform("resetZoom")}},{key:"translate",value:function(t,e){this.TRANSLATE_X+t<=this.translateLimitMaxX&&this.TRANSLATE_X+t>=this.translateLimitMinX&&(this.TRANSLATE_X+=t),this.TRANSLATE_Y+e<=this.translateLimitMaxY&&this.TRANSLATE_Y+e>=this.translateLimitMinY&&(this.TRANSLATE_Y+=e),this.emitGraphTransform("translate")}},{key:"focusOn",value:function(t,e,r,n){var o=ko(this.CanvasPointToHtmlPoint([t,e]),2),i=r/2-o[0],u=n/2-o[1];this.TRANSLATE_X+=i,this.TRANSLATE_Y+=u,this.emitGraphTransform("focusOn")}},{key:"updateTranslateLimits",value:function(t){var e=ko(Array.isArray(t)&&4===t.length?t:Ro[t.toString()],4);this.translateLimitMinX=e[0],this.translateLimitMinY=e[1],this.translateLimitMaxX=e[2],this.translateLimitMaxY=e[3]}}],r&&Mo(e.prototype,r),n&&Mo(e,n),t}(),wo=Co(_o.prototype,"SCALE_X",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),jo=Co(_o.prototype,"SKEW_Y",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),xo=Co(_o.prototype,"SKEW_X",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Eo=Co(_o.prototype,"SCALE_Y",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),So=Co(_o.prototype,"TRANSLATE_X",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Po=Co(_o.prototype,"TRANSLATE_Y",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Ao=Co(_o.prototype,"ZOOM_SIZE",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return.04}}),Co(_o.prototype,"zoom",[o.k],Object.getOwnPropertyDescriptor(_o.prototype,"zoom"),_o.prototype),Co(_o.prototype,"resetZoom",[o.k],Object.getOwnPropertyDescriptor(_o.prototype,"resetZoom"),_o.prototype),Co(_o.prototype,"translate",[o.k],Object.getOwnPropertyDescriptor(_o.prototype,"translate"),_o.prototype),Co(_o.prototype,"focusOn",[o.k],Object.getOwnPropertyDescriptor(_o.prototype,"focusOn"),_o.prototype),_o);var Lo=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t};var zo=function(t,e){return t&&mn(e,ar(e),t)};var Bo=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e},Uo=Object.prototype.hasOwnProperty;var Fo=function(t){if(!Pt(t))return Bo(t);var e=er(t),r=[];for(var n in t)("constructor"!=n||!e&&Uo.call(t,n))&&r.push(n);return r};var Ho=function(t){return ur(t)?Qe(t,!0):Fo(t)};var Xo=function(t,e){return t&&mn(e,Ho(e),t)},Go=r(107);var Yo=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e};var Vo=function(t,e){return mn(t,Ne(t),e)},Wo=rr(Object.getPrototypeOf,Object),Ko=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)Se(e,Ne(t)),t=Wo(t);return e}:De;var $o=function(t,e){return mn(t,Ko(t),e)};var Zo=function(t){return Ae(t,Ho,Ko)},qo=Object.prototype.hasOwnProperty;var Jo=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&qo.call(t,"index")&&(r.index=t.index,r.input=t.input),r};var Qo=function(t){var e=new t.constructor(t.byteLength);return new Oe(e).set(new Oe(t)),e};var ti=function(t,e){var r=e?Qo(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)},ei=/\w*$/;var ri=function(t){var e=new t.constructor(t.source,ei.exec(t));return e.lastIndex=t.lastIndex,e},ni=gt?gt.prototype:void 0,oi=ni?ni.valueOf:void 0;var ii=function(t){return oi?Object(oi.call(t)):{}};var ui=function(t,e){var r=e?Qo(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)};var ai=function(t,e,r){var n=t.constructor;switch(e){case"[object ArrayBuffer]":return Qo(t);case"[object Boolean]":case"[object Date]":return new n(+t);case"[object DataView]":return ti(t,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return ui(t,r);case"[object Map]":case"[object Set]":return new n;case"[object Number]":case"[object String]":return new n(t);case"[object RegExp]":return ri(t);case"[object Symbol]":return ii(t)}},ci=Object.create,si=function(){function t(){}return function(e){if(!Pt(e))return{};if(ci)return ci(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();var li=function(t){return"function"!=typeof t.constructor||er(t)?{}:si(Wo(t))};var fi=function(t){return Re(t)&&"[object Map]"==Sr(t)},pi=$e.a&&$e.a.isMap,hi=pi?Ke(pi):fi;var di=function(t){return Re(t)&&"[object Set]"==Sr(t)},yi=$e.a&&$e.a.isSet,vi=yi?Ke(yi):di,gi="[object Arguments]",bi="[object Function]",mi="[object Object]",Oi={};Oi[gi]=Oi["[object Array]"]=Oi["[object ArrayBuffer]"]=Oi["[object DataView]"]=Oi["[object Boolean]"]=Oi["[object Date]"]=Oi["[object Float32Array]"]=Oi["[object Float64Array]"]=Oi["[object Int8Array]"]=Oi["[object Int16Array]"]=Oi["[object Int32Array]"]=Oi["[object Map]"]=Oi["[object Number]"]=Oi["[object Object]"]=Oi["[object RegExp]"]=Oi["[object Set]"]=Oi["[object String]"]=Oi["[object Symbol]"]=Oi["[object Uint8Array]"]=Oi["[object Uint8ClampedArray]"]=Oi["[object Uint16Array]"]=Oi["[object Uint32Array]"]=!0,Oi["[object Error]"]=Oi[bi]=Oi["[object WeakMap]"]=!1;var _i=function t(e,r,n,o,i,u){var a,c=1&r,s=2&r,l=4&r;if(n&&(a=i?n(e,o,i,u):n(e)),void 0!==a)return a;if(!Pt(e))return e;var f=Pe(e);if(f){if(a=Jo(e),!c)return Yo(e,a)}else{var p=Sr(e),h=p==bi||"[object GeneratorFunction]"==p;if(Object(He.a)(e))return Object(Go.a)(e,c);if(p==mi||p==gi||h&&!i){if(a=s||h?{}:li(e),!c)return s?$o(e,Xo(a,e)):Vo(e,zo(a,e))}else{if(!Oi[p])return i?e:{};a=ai(e,p,c)}}u||(u=new pe);var d=u.get(e);if(d)return d;u.set(e,a),vi(e)?e.forEach((function(o){a.add(t(o,r,n,o,e,u))})):hi(e)&&e.forEach((function(o,i){a.set(i,t(o,r,n,i,e,u))}));var y=f?void 0:(l?s?Zo:cr:s?Ho:ar)(e);return Lo(y||e,(function(o,i){y&&(o=e[i=o]),bn(a,i,t(o,r,n,i,e,u))})),a};var wi=function(t){return _i(t,5)};var ji=function(t,e,r){(void 0!==r&&!nt(t[e],r)||void 0===r&&!(e in t))&&vn(t,e,r)};var xi=function(t){return Re(t)&&ur(t)},Ei=Function.prototype,Si=Object.prototype,Pi=Ei.toString,Ai=Si.hasOwnProperty,ki=Pi.call(Object);var Di=function(t){if(!Re(t)||"[object Object]"!=St(t))return!1;var e=Wo(t);if(null===e)return!0;var r=Ai.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&Pi.call(r)==ki};var Ti=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]};var Mi=function(t){return mn(t,Ho(t))};var Ni=function(t,e,r,n,o,i,u){var a=Ti(t,r),c=Ti(e,r),s=u.get(c);if(s)ji(t,r,s);else{var l=i?i(a,c,r+"",t,e,u):void 0,f=void 0===l;if(f){var p=Pe(c),h=!p&&Object(He.a)(c),d=!p&&!h&&qe(c);l=c,p||h||d?Pe(a)?l=a:xi(a)?l=Yo(a):h?(f=!1,l=Object(Go.a)(c,!0)):d?(f=!1,l=ui(c,!0)):l=[]:Di(c)||Fe(c)?(l=a,Fe(a)?l=Mi(a):Pt(a)&&!kt(a)||(l=li(c))):f=!1}f&&(u.set(c,l),o(l,c,n,i,u),u.delete(c)),ji(t,r,l)}};var Ci=function t(e,r,n,o,i){e!==r&&fn(r,(function(u,a){if(i||(i=new pe),Pt(u))Ni(e,r,a,n,t,o,i);else{var c=o?o(Ti(e,a),u,a+"",e,r,i):void 0;void 0===c&&(c=u),ji(e,a,c)}}),Ho)},Ri=Dn((function(t,e,r){Ci(t,e,r)})),Ii={baseNode:{fill:"#FFFFFF",stroke:"#000000",strokeWidth:2},baseEdge:{stroke:"#000000",strokeWidth:2},rect:{},circle:{},diamond:{},ellipse:{},polygon:{},text:{color:"#000000",stroke:"none",fontSize:12,background:{fill:"transparent"}},anchor:{stroke:"#000000",fill:"#FFFFFF",r:4,hover:{fill:"#949494",fillOpacity:.5,stroke:"#949494",r:10}},nodeText:{color:"#000000",overflowMode:"default",lineHeight:1.2,fontSize:12},edgeText:{textWidth:100,overflowMode:"default",fontSize:12,background:{fill:"#FFFFFF"}},line:{},polyline:{},bezier:{fill:"none",adjustLine:{stroke:"#949494"},adjustAnchor:{r:4,fill:"#949494",stroke:"#949494",fillOpacity:1}},arrow:{offset:10,verticalLength:5},anchorLine:{stroke:"#000000",strokeWidth:2,strokeDasharray:"3,2"},snapline:{stroke:"#949494",strokeWidth:1},edgeAdjust:{r:4,fill:"#FFFFFF",stroke:"#949494",strokeWidth:2},outline:{fill:"transparent",stroke:"#949494",strokeDasharray:"3,3",hover:{stroke:"#949494"}},edgeAnimation:{stroke:"red",strokeDasharray:"10 10",strokeDashoffset:"100%",animationName:"lf_animate_dash",animationDuration:"20s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"normal"},rotateControl:{stroke:"#000",fill:"#fff",strokeWidth:1.5}},Li=function(t){var e=wi(Ii);return t&&(e=Ri(e,t)),e};r(82),r(166);function zi(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var Bi=function(){function t(){var e,r,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),n={},(r="_events")in(e=this)?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n}var e,r,n;return e=t,(r=[{key:"on",value:function(t,e,r){var n=this;return null==t||t.split(",").forEach((function(t){t=t.trim(),n._events[t]||(n._events[t]=[]),n._events[t].push({callback:e,once:!!r})})),this}},{key:"once",value:function(t,e){var r=this;null==t||t.split(",").forEach((function(t){return t=t.trim(),r.on(t,e,!0)}))}},{key:"emit",value:function(t,e){var r=this;null==t||t.split(",").forEach((function(t){var n=r._events[t]||[],o=r._events["*"]||[],i=function(n){for(var o=n.length,i=0;i<o;i++)if(n[i]){var u=n[i],a=u.callback;u.once&&(n.splice(i,1),0===n.length&&delete r._events[t],o--,i--),a.apply(r,[e])}};i(n),i(o)}))}},{key:"off",value:function(t,e){var r=this;return t||(this._events={}),t.split(",").forEach((function(t){if(e){for(var n=r._events[t]||[],o=n.length,i=0;i<o;i++)n[i].callback===e&&(n.splice(i,1),o--,i--);0===n.length&&delete r._events[t]}else delete r._events[t]})),this}},{key:"getEvents",value:function(){return this._events}}])&&zi(e.prototype,r),n&&zi(e,n),t}();function Ui(t,e){return e*Math.round(t/e)||t}function Fi(t,e){return t%e}function Hi(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Xi(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Xi(t,e)}(t,e)||function(){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 Xi(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Gi=function(t,e,r){var n=Hi(t,2),o=n[0],i=n[1],u=Hi(e,2),a=u[0],c=u[1],s=Hi(r,2),l=s[0],f=s[1];return o>a&&o<l&&i>c&&i<f},Yi=function(t,e){var r=!1;switch(e.multipleSelectKey){case"meta":r=t.metaKey;break;case"alt":r=t.altKey;break;case"shift":r=t.shiftKey;break;case"ctrl":r=t.ctrlKey;break;default:r=!1}return r};r(167),r(126),r(83),r(29),r(12),r(13),r(14),r(47);var Vi=function(t){return function(e,r,n){var o=Object(e);if(!ur(e)){var i=ln(r,3);e=ar(e),r=function(t){return i(o[t],t,o)}}var u=t(e,r,n);return u>-1?o[i?e[u]:u]:void 0}};var Wi=function(t,e,r,n){for(var o=t.length,i=r+(n?1:-1);n?i--:++i<o;)if(e(t[i],i,t))return i;return-1},Ki=/\s/;var $i=function(t){for(var e=t.length;e--&&Ki.test(t.charAt(e)););return e},Zi=/^\s+/;var qi=function(t){return t?t.slice(0,$i(t)+1).replace(Zi,""):t},Ji=/^[-+]0x[0-9a-f]+$/i,Qi=/^0b[01]+$/i,tu=/^0o[0-7]+$/i,eu=parseInt;var ru=function(t){if("number"==typeof t)return t;if(zr(t))return NaN;if(Pt(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Pt(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=qi(t);var r=Qi.test(t);return r||tu.test(t)?eu(t.slice(2),r?2:8):Ji.test(t)?NaN:+t},nu=1/0;var ou=function(t){return t?(t=ru(t))===nu||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0};var iu=function(t){var e=ou(t),r=e%1;return e==e?r?e-r:e:0},uu=Math.max;var au,cu=Vi((function(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var o=null==r?0:iu(r);return o<0&&(o=uu(n+o,0)),Wi(t,ln(e,3),o)})),su=new Uint8Array(16);function lu(){if(!au&&!(au="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return au(su)}var fu=/^(?:[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;for(var pu=function(t){return"string"==typeof t&&fu.test(t)},hu=[],du=0;du<256;++du)hu.push((du+256).toString(16).substr(1));var yu=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(hu[t[e+0]]+hu[t[e+1]]+hu[t[e+2]]+hu[t[e+3]]+"-"+hu[t[e+4]]+hu[t[e+5]]+"-"+hu[t[e+6]]+hu[t[e+7]]+"-"+hu[t[e+8]]+hu[t[e+9]]+"-"+hu[t[e+10]]+hu[t[e+11]]+hu[t[e+12]]+hu[t[e+13]]+hu[t[e+14]]+hu[t[e+15]]).toLowerCase();if(!pu(r))throw TypeError("Stringified UUID is invalid");return r};var vu=function(t,e,r){var n=(t=t||{}).random||(t.rng||lu)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,e){r=r||0;for(var o=0;o<16;++o)e[r+o]=n[o];return e}return yu(n)},gu=function(){return vu()},bu=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=t.nodes.reduce((function(t,r){return t[r.id]=e+vu(),r.id=t[r.id],t}),{});return t.edges.forEach((function(t){t.id=e+vu(),t.sourceNodeId=r[t.sourceNodeId],t.targetNodeId=r[t.targetNodeId]})),t},mu=(r(105),r(127),r(207),function(t,e,r){var n=t.x,o=t.y,i=e.x,u=e.y,a=r.x,c=r.y,s=(c-u)/(a-i),l=u-s*i;return n>=i&&n<=a&&o>=u&&o<=c&&Math.abs(o-s*n+l)<Number.EPSILON});function Ou(t){return Ou="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ou(t)}function _u(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function wu(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?_u(Object(r),!0).forEach((function(e){ju(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):_u(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ju(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var xu,Eu,Su,Pu,Au,ku,Du,Tu,Mu,Nu,Cu,Ru,Iu,Lu,zu,Bu,Uu,Fu,Hu,Xu,Gu,Yu=function(t){return t.anchors},Vu=function(t,e){for(var r,n=e.nodes,o=n.length-1;o>=0;o--){var i=n[o];if(Zu(t,i)){var u=i.getTargetAnchor(t);if(u){var a={node:i,anchorIndex:u.index,anchor:u.anchor};r&&!Wu(i,r.node,e)||(r=a)}}}return r},Wu=function(t,e,r){return t.zIndex>e.zIndex||r.nodesMap[t.id].index>r.nodesMap[e.id].index},Ku=function(t,e,r,n){return Math.hypot(t-r,e-n)},$u=function(t,e){var r=!1,n=qu(e);return t.x>=n.minX-0&&t.x<=n.maxX+0&&t.y>=n.minY-0&&t.y<=n.maxY+0&&(r=!0),r},Zu=function(t,e){var r=!1,n=qu(e);return t.x>=n.minX-5&&t.x<=n.maxX+5&&t.y>=n.minY-5&&t.y<=n.maxY+5&&(r=!0),r},qu=function(t){var e=t.x,r=t.y,n=t.width,o=t.height;return{minX:e-n/2,minY:r-o/2,maxX:e+n/2,maxY:r+o/2,x:e,y:r,width:n,height:o,centerX:e,centerY:r}},Ju=function(t,e,r){var n,o=function(t){var e=t,r=e.x,n=e.y,o=e.width,i=e.height,u=e.radius;return[{x:r-o/2+u,y:n-i/2+u,r:u},{x:r+o/2-u,y:n-i/2+u,r:u},{x:r-o/2+u,y:n+i/2-u,r:u},{x:r+o/2-u,y:n+i/2-u,r:u}]}(r),i=Number.MAX_SAFE_INTEGER;return o.forEach((function(e){var r=Ku(t.x,t.y,e.x,e.y);r<i&&(i=r,n=e)})),Qu(t,e,n)},Qu=function(t,e,r){var n,o=r,i=o.x,u=o.y,a=o.r;if(e===vo.HORIZONTAL){var c=i-Math.sqrt(a*a-(t.y-u)*(t.y-u)),s=i+Math.sqrt(a*a-(t.y-u)*(t.y-u));n={x:Math.abs(c-t.x)<Math.abs(s-t.x)?c:s,y:t.y}}else if(e===vo.VERTICAL){var l=u-Math.sqrt(a*a-(t.x-i)*(t.x-i)),f=u+Math.sqrt(a*a-(t.x-i)*(t.x-i)),p=Math.abs(l-t.y)<Math.abs(f-t.y)?l:f;n={x:t.x,y:p}}return n},ta=function(t,e){var r=e,n=!1,o=r.x-r.width/2+r.radius,i=r.x+r.width/2-r.radius,u=r.y-r.height/2+r.radius,a=r.y+r.height/2-r.radius,c=r.x,s=r.y,l=r.width,f=r.height;return t.y===s+f/2||t.y===s-f/2?n=t.x>o&&t.x<i:t.x!==c+l/2&&t.x!==c-l/2||(n=t.y>u&&t.y<a),n},ea=function(t,e,r){var n,o=r,i=o.x,u=o.y,a=o.rx,c=o.ry;if(e===vo.HORIZONTAL){var s=i-Math.sqrt(a*a-(t.y-u)*(t.y-u)*a*a/(c*c)),l=i+Math.sqrt(a*a-(t.y-u)*(t.y-u)*a*a/(c*c));n={x:Math.abs(s-t.x)<Math.abs(l-t.x)?s:l,y:t.y}}else if(e===vo.VERTICAL){var f=u-Math.sqrt(c*c-(t.x-i)*(t.x-i)*c*c/(a*a)),p=u+Math.sqrt(c*c-(t.x-i)*(t.x-i)*c*c/(a*a)),h=Math.abs(f-t.y)<Math.abs(p-t.y)?f:p;n={x:t.x,y:h}}return n},ra=function(t,e,r){for(var n,o=r.pointsPosition,i=Number.MAX_SAFE_INTEGER,u=[],a=0;a<o.length;a++)u.push({start:o[a],end:o[(a+1)%o.length]});return u.forEach((function(r){var o=r.start,u=r.end,a=o,c=u;o.x>u.x&&(a=u,c=o);var s={x:t.x,y:t.y};if(a.x===c.x&&e===vo.HORIZONTAL&&(s={x:a.x,y:t.y}),a.y===c.y&&e===vo.VERTICAL&&(s={x:t.x,y:a.y}),a.x!==c.x&&a.y!==c.y){var l=(c.y-a.y)/(c.x-a.x),f=(a.x*c.y-c.x*a.y)/(a.x-c.x);e===vo.HORIZONTAL?s={x:(t.y-f)/l,y:t.y}:e===vo.VERTICAL&&(s={x:t.x,y:l*t.x+f})}if(mu(s,o,u)){var p=Ku(s.x,s.y,t.x,t.y);p<i&&(i=p,n=s)}})),n},na=function(t,e,r,n){var o=t.x,i=t.y;return e.x>t.x?o=t.x+r/2:e.x<t.x&&(o=t.x-r/2),e.y>t.y?i=t.y+n/2:e.y<t.y&&(i=t.y-n/2),{x:o,y:i}},oa=function(t){var e=t.rows,r=t.style,n=t.rowsLength,o=t.className,i=document.createElement("div");i.style.fontSize=r.fontSize,i.style.width=r.width,i.className=o,i.style.lineHeight=r.lineHeight,i.style.padding=r.padding,r.fontFamily&&(i.style.fontFamily=r.fontFamily),n>1?e.forEach((function(t){var e=document.createElement("div");e.textContent=t,i.appendChild(e)})):i.textContent=e,document.body.appendChild(i);var u=i.clientHeight;return document.body.removeChild(i),u},ia=function(t){var e=t.rows,r=t.rowsLength,n=t.fontSize,o=0;return e&&e.forEach((function(t){var e=Wc(t);o=e>o?e:o})),{width:Math.ceil(o/2)*n+n/4,height:r*(n+2)+n/4}},ua=function(t){return"object"!==Ou(t)?{isAllPass:!!t,msg:t?"":"不允许连接"}:t},aa=function(t){try{return JSON.parse(JSON.stringify(t))}catch(e){return t}},ca=1e3,sa=999,la=function(){return++ca};function fa(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function pa(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?fa(Object(r),!0).forEach((function(e){ya(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):fa(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ha(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function da(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ya(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function va(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var ga=(xu=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),ya(this,"id",""),ha(this,"type",Eu,this),ha(this,"sourceNodeId",Su,this),ha(this,"targetNodeId",Pu,this),ha(this,"startPoint",Au,this),ha(this,"endPoint",ku,this),ha(this,"text",Du,this),ha(this,"properties",Tu,this),ha(this,"points",Mu,this),ha(this,"pointsList",Nu,this),ha(this,"isSelected",Cu,this),ha(this,"isHovered",Ru,this),ha(this,"isHitable",Iu,this),ha(this,"draggable",Lu,this),ha(this,"visible",zu,this),ya(this,"virtual",!1),ha(this,"isAnimation",Bu,this),ha(this,"isShowAdjustPoint",Uu,this),ya(this,"graphModel",void 0),ha(this,"zIndex",Fu,this),ya(this,"BaseType",ho.EDGE),ya(this,"modelType",po.EDGE),ha(this,"state",Hu,this),ya(this,"additionStateData",void 0),ya(this,"sourceAnchorId",""),ya(this,"targetAnchorId",""),ya(this,"menu",void 0),ya(this,"customTextPosition",!1),ha(this,"style",Xu,this),ha(this,"arrowConfig",Gu,this),this.graphModel=r,this.initEdgeData(e),this.setAttributes()}var e,r,n;return e=t,r=[{key:"initEdgeData",value:function(t){if(t.properties||(t.properties={}),!t.id){var e=this.graphModel.idGenerator,r=e&&e(t.type),n=this.createId();t.id=n||r||gu()}this.arrowConfig.markerEnd="url(#marker-end-".concat(t.id,")"),this.arrowConfig.markerStart="url(#marker-start-".concat(t.id,")");var o=this.graphModel.editConfigModel.adjustEdgeStartAndEnd;this.isShowAdjustPoint=o,Mn(this,rs(t)),this.graphModel.overlapMode===Oo.INCREASE&&(this.zIndex=t.zIndex||la()),this.setAnchors(),this.initPoints(),this.formatText(t)}},{key:"setAttributes",value:function(){}},{key:"createId",value:function(){return null}},{key:"getEdgeStyle",value:function(){return pa(pa({},this.graphModel.theme.baseEdge),this.style)}},{key:"getAdjustPointStyle",value:function(){return pa({},this.graphModel.theme.edgeAdjust)}},{key:"getTextStyle",value:function(){var t=this.graphModel.theme.edgeText;return wi(t)}},{key:"getEdgeAnimationStyle",value:function(){var t=this.graphModel.theme.edgeAnimation;return wi(t)}},{key:"getArrowStyle",value:function(){var t=this.getEdgeStyle(),e=this.getEdgeAnimationStyle(),r=this.graphModel.theme.arrow,n=this.isAnimation?e.stroke:t.stroke;return pa(pa({},t),{},{fill:n,stroke:n},r)}},{key:"getOutlineStyle",value:function(){var t=this.graphModel.theme.outline;return wi(t)}},{key:"getTextPosition",value:function(){return{x:0,y:0}}},{key:"sourceNode",get:function(){var t,e;return null===(t=this.graphModel)||void 0===t||null===(e=t.nodesMap[this.sourceNodeId])||void 0===e?void 0:e.model}},{key:"targetNode",get:function(){var t,e;return null===(t=this.graphModel)||void 0===t||null===(e=t.nodesMap[this.targetNodeId])||void 0===e?void 0:e.model}},{key:"textPosition",get:function(){return this.getTextPosition()}},{key:"getBeginAnchor",value:function(t,e,r){var n,o,i=Yu(t);return r&&(n=cu(i,(function(t){return t.id===r})))||i.forEach((function(t){var r=ns(t,e);(void 0===o||r<o)&&(o=r,n=t)})),n}},{key:"getEndAnchor",value:function(t,e){var r,n,o=this,i=Yu(t);return e&&(r=cu(i,(function(t){return t.id===e})))||i.forEach((function(t){var e=ns(t,o.startPoint);(void 0===n||e<n)&&(n=e,r=t)})),r}},{key:"getProperties",value:function(){return Object(o.I)(this.properties)}},{key:"getData",value:function(){var t=this.text,e=t.x,r=t.y,n=t.value,i={id:this.id,type:this.type,sourceNodeId:this.sourceNode.id,targetNodeId:this.targetNode.id,startPoint:Object.assign({},this.startPoint),endPoint:Object.assign({},this.endPoint),properties:Object(o.I)(this.properties)};return n&&(i.text={x:e,y:r,value:n}),this.graphModel.overlapMode===Oo.INCREASE&&(i.zIndex=this.zIndex),i}},{key:"getHistoryData",value:function(){return this.getData()}},{key:"setProperty",value:function(t,e){this.properties[t]=aa(e),this.setAttributes()}},{key:"deleteProperty",value:function(t){delete this.properties[t],this.setAttributes()}},{key:"setProperties",value:function(t){this.properties=pa(pa({},Object(o.I)(this.properties)),aa(t)),this.setAttributes()}},{key:"changeEdgeId",value:function(t){var e=this.arrowConfig,r=e.markerEnd,n=e.markerStart;n&&n==="url(#marker-start-".concat(this.id,")")&&(this.arrowConfig.markerStart="url(#marker-start-".concat(t,")")),r&&r==="url(#marker-end-".concat(this.id,")")&&(this.arrowConfig.markerEnd="url(#marker-end-".concat(t,")")),this.id=t}},{key:"setStyle",value:function(t,e){this.style=pa(pa({},this.style),{},ya({},t,aa(e)))}},{key:"setStyles",value:function(t){this.style=pa(pa({},this.style),aa(t))}},{key:"updateStyles",value:function(t){this.style=pa({},aa(t))}},{key:"formatText",value:function(t){var e=this.textPosition,r=e.x,n=e.y;t.text&&"string"!=typeof t.text?"[object Object]"===Object.prototype.toString.call(t.text)&&(this.text={x:t.text.x||r,y:t.text.y||n,value:t.text.value||"",draggable:this.text.draggable,editable:this.text.editable}):this.text={value:t.text||"",x:r,y:n,draggable:this.text.draggable,editable:this.text.editable}}},{key:"resetTextPosition",value:function(){var t=this.textPosition,e=t.x,r=t.y;this.text.x=e,this.text.y=r}},{key:"moveText",value:function(t,e){if(this.text){var r=this.text,n=r.x,o=r.y,i=r.value,u=r.draggable,a=r.editable;this.text={value:i,draggable:u,x:n+t,y:o+e,editable:a}}}},{key:"setText",value:function(t){t&&Mn(this.text,t)}},{key:"updateText",value:function(t){this.text=pa(pa({},Object(o.I)(this.text)),{},{value:t})}},{key:"setAnchors",value:function(){if(!this.sourceAnchorId||!this.startPoint){var t=this.getBeginAnchor(this.sourceNode,this.targetNode,this.sourceAnchorId);if(!t)throw new Error("无法获取beginAnchor,请检查anchors相关逻辑,anchors不能为空");this.startPoint||(this.startPoint={x:t.x,y:t.y}),this.sourceAnchorId||(this.sourceAnchorId=t.id)}if(!this.targetAnchorId||!this.endPoint){var e=this.getEndAnchor(this.targetNode,this.targetAnchorId);if(!e)throw new Error("无法获取endAnchor,请检查anchors相关逻辑,anchors不能为空");this.endPoint||(this.endPoint={x:e.x,y:e.y}),this.targetAnchorId||(this.targetAnchorId=e.id)}}},{key:"setSelected",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isSelected=t}},{key:"setHovered",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isHovered=t}},{key:"setHitable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isHitable=t}},{key:"openEdgeAnimation",value:function(){this.isAnimation=!0}},{key:"closeEdgeAnimation",value:function(){this.isAnimation=!1}},{key:"setElementState",value:function(t,e){this.state=t,this.additionStateData=e}},{key:"updateStartPoint",value:function(t){this.startPoint=t}},{key:"moveStartPoint",value:function(t,e){this.startPoint.x+=t,this.startPoint.y+=e}},{key:"updateEndPoint",value:function(t){this.endPoint=t}},{key:"moveEndPoint",value:function(t,e){this.endPoint.x+=t,this.endPoint.y+=e}},{key:"setZIndex",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.zIndex=t}},{key:"initPoints",value:function(){}},{key:"updateAttributes",value:function(t){Mn(this,t)}},{key:"getAdjustStart",value:function(){return this.startPoint}},{key:"getAdjustEnd",value:function(){return this.endPoint}},{key:"updateAfterAdjustStartAndEnd",value:function(t){var e=t.startPoint,r=t.endPoint;this.updateStartPoint({x:e.x,y:e.y}),this.updateEndPoint({x:r.x,y:r.y})}}],r&&da(e.prototype,r),n&&da(e,n),t}(),Eu=va(xu.prototype,"type",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Su=va(xu.prototype,"sourceNodeId",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Pu=va(xu.prototype,"targetNodeId",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Au=va(xu.prototype,"startPoint",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),ku=va(xu.prototype,"endPoint",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),Du=va(xu.prototype,"text",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{value:"",x:0,y:0,draggable:!1,editable:!0}}}),Tu=va(xu.prototype,"properties",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),Mu=va(xu.prototype,"points",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Nu=va(xu.prototype,"pointsList",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Cu=va(xu.prototype,"isSelected",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Ru=va(xu.prototype,"isHovered",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Iu=va(xu.prototype,"isHitable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Lu=va(xu.prototype,"draggable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),zu=va(xu.prototype,"visible",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Bu=va(xu.prototype,"isAnimation",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Uu=va(xu.prototype,"isShowAdjustPoint",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Fu=va(xu.prototype,"zIndex",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Hu=va(xu.prototype,"state",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Xu=va(xu.prototype,"style",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),Gu=va(xu.prototype,"arrowConfig",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{markerEnd:"url(#marker-end-".concat(this.id,")"),markerStart:"url(#marker-start-".concat(this.id,")")}}}),va(xu.prototype,"sourceNode",[o.m],Object.getOwnPropertyDescriptor(xu.prototype,"sourceNode"),xu.prototype),va(xu.prototype,"targetNode",[o.m],Object.getOwnPropertyDescriptor(xu.prototype,"targetNode"),xu.prototype),va(xu.prototype,"textPosition",[o.m],Object.getOwnPropertyDescriptor(xu.prototype,"textPosition"),xu.prototype),va(xu.prototype,"setProperty",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"setProperty"),xu.prototype),va(xu.prototype,"deleteProperty",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"deleteProperty"),xu.prototype),va(xu.prototype,"setProperties",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"setProperties"),xu.prototype),va(xu.prototype,"changeEdgeId",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"changeEdgeId"),xu.prototype),va(xu.prototype,"setStyle",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"setStyle"),xu.prototype),va(xu.prototype,"setStyles",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"setStyles"),xu.prototype),va(xu.prototype,"updateStyles",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"updateStyles"),xu.prototype),va(xu.prototype,"formatText",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"formatText"),xu.prototype),va(xu.prototype,"resetTextPosition",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"resetTextPosition"),xu.prototype),va(xu.prototype,"moveText",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"moveText"),xu.prototype),va(xu.prototype,"setText",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"setText"),xu.prototype),va(xu.prototype,"updateText",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"updateText"),xu.prototype),va(xu.prototype,"setAnchors",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"setAnchors"),xu.prototype),va(xu.prototype,"setSelected",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"setSelected"),xu.prototype),va(xu.prototype,"setHovered",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"setHovered"),xu.prototype),va(xu.prototype,"setHitable",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"setHitable"),xu.prototype),va(xu.prototype,"openEdgeAnimation",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"openEdgeAnimation"),xu.prototype),va(xu.prototype,"closeEdgeAnimation",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"closeEdgeAnimation"),xu.prototype),va(xu.prototype,"setElementState",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"setElementState"),xu.prototype),va(xu.prototype,"updateStartPoint",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"updateStartPoint"),xu.prototype),va(xu.prototype,"moveStartPoint",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"moveStartPoint"),xu.prototype),va(xu.prototype,"updateEndPoint",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"updateEndPoint"),xu.prototype),va(xu.prototype,"moveEndPoint",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"moveEndPoint"),xu.prototype),va(xu.prototype,"setZIndex",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"setZIndex"),xu.prototype),va(xu.prototype,"initPoints",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"initPoints"),xu.prototype),va(xu.prototype,"updateAttributes",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"updateAttributes"),xu.prototype),va(xu.prototype,"getAdjustStart",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"getAdjustStart"),xu.prototype),va(xu.prototype,"getAdjustEnd",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"getAdjustEnd"),xu.prototype),va(xu.prototype,"updateAfterAdjustStartAndEnd",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"updateAfterAdjustStartAndEnd"),xu.prototype),xu),ba=ga;function ma(t){return ma="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ma(t)}function Oa(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function _a(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Oa(Object(r),!0).forEach((function(e){Ta(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Oa(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function wa(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ja(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function xa(){return xa="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Ea(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},xa.apply(this,arguments)}function Ea(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Da(t)););return t}function Sa(t,e){return Sa=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Sa(t,e)}function Pa(t){var e=function(){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(t){return!1}}();return function(){var r,n=Da(t);if(e){var o=Da(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Aa(this,r)}}function Aa(t,e){if(e&&("object"===ma(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return ka(t)}function ka(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Da(t){return Da=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Da(t)}function Ta(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Ma,Na,Ca=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Sa(t,e)}(i,t);var e,r,n,o=Pa(i);function i(){var t;wa(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Ta(ka(t=o.call.apply(o,[this].concat(r))),"modelType",po.LINE_EDGE),t}return e=i,(r=[{key:"getEdgeStyle",value:function(){var t=this.graphModel.theme.line;return _a(_a({},xa(Da(i.prototype),"getEdgeStyle",this).call(this)),wi(t))}},{key:"getTextPosition",value:function(){return{x:(this.startPoint.x+this.endPoint.x)/2,y:(this.startPoint.y+this.endPoint.y)/2}}}])&&ja(e.prototype,r),n&&ja(e,n),i}(ba);function Ra(t){return Ra="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ra(t)}function Ia(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return La(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return La(t,e)}(t,e)||function(){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 La(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function za(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Ba(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?za(Object(r),!0).forEach((function(e){Za(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):za(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Ua(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function Fa(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ha(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Xa(){return Xa="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Ga(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Xa.apply(this,arguments)}function Ga(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=$a(t)););return t}function Ya(t,e){return Ya=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Ya(t,e)}function Va(t){var e=function(){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(t){return!1}}();return function(){var r,n=$a(t);if(e){var o=$a(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Wa(this,r)}}function Wa(t,e){if(e&&("object"===Ra(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Ka(t)}function Ka(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function $a(t){return $a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},$a(t)}function Za(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function qa(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var Ja=(Ma=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ya(t,e)}(i,t);var e,r,n,o=Va(i);function i(){var t;Fa(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Za(Ka(t=o.call.apply(o,[this].concat(r))),"modelType",po.POLYLINE_EDGE),Za(Ka(t),"draggingPointList",void 0),Ua(Ka(t),"dbClickPosition",Na,Ka(t)),t}return e=i,(r=[{key:"initEdgeData",value:function(t){this.offset=30,Xa($a(i.prototype),"initEdgeData",this).call(this,t)}},{key:"getEdgeStyle",value:function(){var t=this.graphModel.theme.polyline;return Ba(Ba({},Xa($a(i.prototype),"getEdgeStyle",this).call(this)),wi(t))}},{key:"getTextPosition",value:function(){var t,e=null===(t=this.text)||void 0===t?void 0:t.value;if(this.dbClickPosition&&!e){var r=this.dbClickPosition;return{x:r.x,y:r.y}}var n=Gc(this.points),o=Ia(Bc(n),2),i=o[0],u=o[1];return{x:(i.x+u.x)/2,y:(i.y+u.y)/2}}},{key:"getAfterAnchor",value:function(t,e,r){var n,o;return r.forEach((function(r){var i;t===vo.HORIZONTAL?i=Math.abs(e.y-r.y):t===vo.VERTICAL&&(i=Math.abs(e.x-r.x)),(!o||o>i)&&(o=i,n=r)})),n}},{key:"getCrossPoint",value:function(t,e,r){var n;return t===vo.HORIZONTAL?n={x:r.x,y:e.y}:t===vo.VERTICAL&&(n={x:e.x,y:r.y}),n}},{key:"removeCrossPoints",value:function(t,e,r){var n=r.map((function(t){return t}));if(1===t){var o=n[t],i=n[e],u=n[t-1];if(Uc(u,o,this.sourceNode)){if(Fc(o,i,this.sourceNode)){var a=Hc(o,i,this.sourceNode);a&&(n[t]=a,n.splice(t-1,1),t--,e--)}}else this.sourceNode.anchors.forEach((function(e){(e.x===u.x&&e.x===o.x||e.y===u.y&&e.y===o.y)&&Ku(e.x,e.y,o.x,o.y)<Ku(u.x,u.y,o.x,o.y)&&(n[t-1]=e)}))}if(e===r.length-2){var c=n[t],s=n[e],l=n[e+1];if(Uc(s,l,this.targetNode)){if(Fc(c,s,this.targetNode)){var f=Hc(c,s,this.targetNode);f&&(n[e]=f,n.splice(e+1,1))}}else this.targetNode.anchors.forEach((function(t){(t.x===l.x&&t.x===s.x||t.y===l.y&&t.y===s.y)&&Ku(t.x,t.y,s.x,s.y)<Ku(l.x,l.y,s.x,s.y)&&(n[e+1]=t)}))}return n}},{key:"getDraggingPoints",value:function(t,e,r,n,o){var i=o.map((function(t){return t})),u=this.getAfterAnchor(t,r,n),a=this.getCrossPoint(t,r,u);return"start"===e?(i.unshift(a),i.unshift(u)):(i.push(a),i.push(u)),i}},{key:"updateCrossPoints",value:function(t){var e=t.map((function(t){return t})),r=t[0],n=t[1],o=t[e.length-2],i=t[e.length-1],u=this.sourceNode,a=this.targetNode,c=u.modelType,s=a.modelType,l=Xc(r,n),f=e[0];switch(c){case po.RECT_NODE:0!==u.radius&&(ta(r,u)||(f=Ju(r,l,u)));break;case po.CIRCLE_NODE:f=Qu(r,l,u);break;case po.ELLIPSE_NODE:f=ea(r,l,u);break;case po.DIAMOND_NODE:case po.POLYGON_NODE:f=ra(r,l,u)}e[0]=f;var p=Xc(o,i),h=e[e.length-1];switch(s){case po.RECT_NODE:0!==a.radius&&(ta(i,a)||(h=Ju(i,p,a)));break;case po.CIRCLE_NODE:h=Qu(i,p,a);break;case po.ELLIPSE_NODE:h=ea(i,p,a);break;case po.DIAMOND_NODE:case po.POLYGON_NODE:h=ra(i,p,a)}return e[e.length-1]=h,e}},{key:"getData",value:function(){var t=Xa($a(i.prototype),"getData",this).call(this),e=this.pointsList.map((function(t){return{x:t.x,y:t.y}}));return Object.assign({},t,{pointsList:e})}},{key:"initPoints",value:function(){this.pointsList.length>0?this.points=this.pointsList.map((function(t){return"".concat(t.x,",").concat(t.y)})).join(" "):this.updatePoints()}},{key:"updatePoints",value:function(){var t=zc({x:this.startPoint.x,y:this.startPoint.y},{x:this.endPoint.x,y:this.endPoint.y},this.sourceNode,this.targetNode,this.offset||0);this.pointsList=t,this.points=t.map((function(t){return"".concat(t.x,",").concat(t.y)})).join(" ")}},{key:"updateStartPoint",value:function(t){this.startPoint=Object.assign({},t),this.updatePoints()}},{key:"moveStartPoint",value:function(t,e){this.startPoint.x+=t,this.startPoint.y+=e,this.updatePoints()}},{key:"updateEndPoint",value:function(t){this.endPoint=Object.assign({},t),this.updatePoints()}},{key:"moveEndPoint",value:function(t,e){this.endPoint.x+=t,this.endPoint.y+=e,this.updatePoints()}},{key:"dragAppendStart",value:function(){this.draggingPointList=this.pointsList.map((function(t){return t}))}},{key:"dragAppendSimple",value:function(t,e){this.isDragging=!0;var r=t.start,n=t.end,o=t.startIndex,i=t.endIndex,u=t.direction,a=this.pointsList,c=a;return u===vo.HORIZONTAL?(a[o]={x:r.x,y:r.y+e.y},a[i]={x:n.x,y:n.y+e.y},c=this.pointsList.map((function(t){return t}))):u===vo.VERTICAL&&(a[o]={x:r.x+e.x,y:r.y},a[i]={x:n.x+e.x,y:n.y},c=this.pointsList.map((function(t){return t}))),this.updatePointsAfterDrag(c),this.draggingPointList=c,this.setText(Object.assign({},this.text,this.textPosition)),{start:Object.assign({},a[o]),end:Object.assign({},a[i]),startIndex:o,endIndex:i,direction:u}}},{key:"dragAppend",value:function(t,e){this.isDragging=!0;var r=t.start,n=t.end,o=t.startIndex,i=t.endIndex,u=t.direction,a=this.pointsList;if(u===vo.HORIZONTAL){a[o]={x:r.x,y:r.y+e.y},a[i]={x:n.x,y:n.y+e.y};var c=this.pointsList.map((function(t){return t}));if(0!==o&&i!==this.pointsList.length-1&&(c=this.removeCrossPoints(o,i,c)),0===o){var s={x:r.x,y:r.y+e.y};if(!$u(s,this.sourceNode)){var l=this.sourceNode.anchors;c=this.getDraggingPoints(u,"start",s,l,c)}}if(i===this.pointsList.length-1){var f={x:n.x,y:n.y+e.y};if(!$u(f,this.targetNode)){var p=this.targetNode.anchors;c=this.getDraggingPoints(u,"end",f,p,c)}}this.updatePointsAfterDrag(c),this.draggingPointList=c}else if(u===vo.VERTICAL){a[o]={x:r.x+e.x,y:r.y},a[i]={x:n.x+e.x,y:n.y};var h=this.pointsList.map((function(t){return t}));if(0!==o&&i!==this.pointsList.length-1&&(h=this.removeCrossPoints(o,i,h)),0===o){var d={x:r.x+e.x,y:r.y};if(!$u(d,this.sourceNode)){var y=this.sourceNode.anchors;h=this.getDraggingPoints(u,"start",d,y,h)}}if(i===this.pointsList.length-1){var v={x:n.x+e.x,y:n.y};if(!$u(v,this.targetNode)){var g=this.targetNode.anchors;h=this.getDraggingPoints(u,"end",v,g,h)}}this.updatePointsAfterDrag(h),this.draggingPointList=h}return this.setText(Object.assign({},this.text,this.textPosition)),{start:Object.assign({},a[o]),end:Object.assign({},a[i]),startIndex:o,endIndex:i,direction:u}}},{key:"dragAppendEnd",value:function(){if(this.draggingPointList){var t=Lc(Gc(this.points));this.pointsList=t.map((function(t){return t})),this.draggingPointList=[];var e=t[0];this.startPoint=Object.assign({},e);var r=t[t.length-1];this.endPoint=Object.assign({},r)}this.isDragging=!1}},{key:"updatePointsAfterDrag",value:function(t){var e=this.updateCrossPoints(t);this.points=e.map((function(t){return"".concat(t.x,",").concat(t.y)})).join(" ")}},{key:"getAdjustStart",value:function(){return this.pointsList[0]||this.startPoint}},{key:"getAdjustEnd",value:function(){var t=this.pointsList;return t[t.length-1]||this.endPoint}},{key:"updateAfterAdjustStartAndEnd",value:function(t){var e=t.startPoint,r=t.endPoint,n=t.sourceNode,o=t.targetNode,i=zc({x:e.x,y:e.y},{x:r.x,y:r.y},n,o,this.offset||0);this.pointsList=i,this.initPoints()}}])&&Ha(e.prototype,r),n&&Ha(e,n),i}(ba),Na=qa(Ma.prototype,"dbClickPosition",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),qa(Ma.prototype,"initPoints",[o.k],Object.getOwnPropertyDescriptor(Ma.prototype,"initPoints"),Ma.prototype),qa(Ma.prototype,"updatePoints",[o.k],Object.getOwnPropertyDescriptor(Ma.prototype,"updatePoints"),Ma.prototype),qa(Ma.prototype,"updateStartPoint",[o.k],Object.getOwnPropertyDescriptor(Ma.prototype,"updateStartPoint"),Ma.prototype),qa(Ma.prototype,"moveStartPoint",[o.k],Object.getOwnPropertyDescriptor(Ma.prototype,"moveStartPoint"),Ma.prototype),qa(Ma.prototype,"updateEndPoint",[o.k],Object.getOwnPropertyDescriptor(Ma.prototype,"updateEndPoint"),Ma.prototype),qa(Ma.prototype,"moveEndPoint",[o.k],Object.getOwnPropertyDescriptor(Ma.prototype,"moveEndPoint"),Ma.prototype),qa(Ma.prototype,"dragAppendStart",[o.k],Object.getOwnPropertyDescriptor(Ma.prototype,"dragAppendStart"),Ma.prototype),qa(Ma.prototype,"dragAppendSimple",[o.k],Object.getOwnPropertyDescriptor(Ma.prototype,"dragAppendSimple"),Ma.prototype),qa(Ma.prototype,"dragAppend",[o.k],Object.getOwnPropertyDescriptor(Ma.prototype,"dragAppend"),Ma.prototype),qa(Ma.prototype,"dragAppendEnd",[o.k],Object.getOwnPropertyDescriptor(Ma.prototype,"dragAppendEnd"),Ma.prototype),qa(Ma.prototype,"updatePointsAfterDrag",[o.k],Object.getOwnPropertyDescriptor(Ma.prototype,"updatePointsAfterDrag"),Ma.prototype),qa(Ma.prototype,"getAdjustStart",[o.k],Object.getOwnPropertyDescriptor(Ma.prototype,"getAdjustStart"),Ma.prototype),qa(Ma.prototype,"getAdjustEnd",[o.k],Object.getOwnPropertyDescriptor(Ma.prototype,"getAdjustEnd"),Ma.prototype),qa(Ma.prototype,"updateAfterAdjustStartAndEnd",[o.k],Object.getOwnPropertyDescriptor(Ma.prototype,"updateAfterAdjustStartAndEnd"),Ma.prototype),Ma),Qa=function(t){var e=t.start,r=t.end,n=t.offset,o=t.verticalLength,i=t.type,u={leftX:0,leftY:0,rightX:0,rightY:0},a=Math.atan((r.y-e.y)/(r.x-e.x)),c=Math.atan(n/o),s=Math.sqrt(o*o+n*n);return"start"===i?r.x>=e.x?(u.leftX=e.x+s*Math.sin(a+c),u.leftY=e.y-s*Math.cos(a+c),u.rightX=e.x-s*Math.sin(a-c),u.rightY=e.y+s*Math.cos(a-c)):(u.leftX=e.x-s*Math.sin(a+c),u.leftY=e.y+s*Math.cos(a+c),u.rightX=e.x+s*Math.sin(a-c),u.rightY=e.y-s*Math.cos(a-c)):"end"===i&&(r.x>=e.x?(u.leftX=r.x+s*Math.sin(a-c),u.leftY=r.y-s*Math.cos(a-c),u.rightX=r.x-s*Math.sin(a+c),u.rightY=r.y+s*Math.cos(a+c)):(u.leftX=r.x-s*Math.sin(a-c),u.leftY=r.y+s*Math.cos(a-c),u.rightX=r.x+s*Math.sin(a+c),u.rightY=r.y-s*Math.cos(a+c))),u},tc={x:1,y:0,z:0};function ec(t,e,r,n,o){for(var i=function(o){if(o<0||o>1)throw new RangeError('The value range of parameter "t" is [0,1]');return{x:t.x*Math.pow(1-o,3)+3*e.x*o*Math.pow(1-o,2)+3*r.x*Math.pow(o,2)*(1-o)+n.x*Math.pow(o,3),y:t.y*Math.pow(1-o,3)+3*e.y*o*Math.pow(1-o,2)+3*r.y*Math.pow(o,2)*(1-o)+n.y*Math.pow(o,3)}},u=0,a=2,c=n.x,s=n.y,l=n;u<o&&a<50;){var f=l=i(1-a/100),p=f.x,h=f.y;u=Ku(c,s,p,h),a++}return l}function rc(t){var e=Math.hypot(t.x,t.y);return{x:t.x/e,y:t.y/e,z:0}}function nc(t){return n=function(t,e){return t.x*e.y-t.y*e.x}(e=tc,r=t),o=Math.acos(function(t,e){var r=[t.x,t.y,t.z];return[e.x,e.y,e.z].reduce((function(t,e,n){return t+e*r[n]}))}(rc(e),rc(r))),n>=0?o:-o;var e,r,n,o}function oc(t){return t*(180/Math.PI)}function ic(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function uc(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ic(Object(r),!0).forEach((function(e){ac(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ic(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ac(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function cc(t){return function(t){if(Array.isArray(t))return pc(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||fc(t)||function(){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 sc(t){return sc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sc(t)}function lc(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||fc(t,e)||function(){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 fc(t,e){if(t){if("string"==typeof t)return pc(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?pc(t,e):void 0}}function pc(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var hc=function(t,e){var r;switch(t.type){case"line":default:r=new Ca(t,e);break;case"polyline":r=new Ja(t,e)}return r},dc=function(t,e){return 2*Math.abs(t.centerX-e.centerX)<t.width+e.width&&2*Math.abs(t.centerY-e.centerY)<t.height+e.height},yc=function(t){var e=[],r={};return t.forEach((function(t){var e="".concat(t.x,"-").concat(t.y);t.id=e,r[e]=t})),Object.keys(r).forEach((function(t){e.push(r[t])})),e},vc=function(t,e){var r=[t,{x:t.x,y:e.y},e];return yc(r)},gc=function(t,e){return 0===t.width&&0===t.height?t:{centerX:t.centerX,centerY:t.centerY,minX:t.minX-e,minY:t.minY-e,maxX:t.maxX+e,maxY:t.maxY+e,height:t.height+2*e,width:t.width+2*e}},bc=function(t,e){var r=Math.abs(t.x-e.centerX),n=Math.abs(t.y-e.centerY);return r/e.width>n/e.height?vo.HORIZONTAL:vo.VERTICAL},mc=function(t,e,r){return bc(r,e)===vo.HORIZONTAL?{x:r.x>t.centerX?t.maxX:t.minX,y:r.y}:{x:r.x,y:r.y>t.centerY?t.maxY:t.minY}},Oc=function(t,e){var r=Math.min(t.minX,e.minX),n=Math.min(t.minY,e.minY),o=Math.max(t.maxX,e.maxX),i=Math.max(t.maxY,e.maxY);return{centerX:(r+o)/2,centerY:(n+i)/2,minX:r,minY:n,maxX:o,maxY:i,height:i-n,width:o-r}},_c=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0,r=[],n=[];t.forEach((function(t){r.push(t.x),n.push(t.y)}));var o=Math.min.apply(Math,r),i=Math.max.apply(Math,r),u=Math.min.apply(Math,n),a=Math.max.apply(Math,n),c=i-o,s=a-u;return e&&(c+=e,s+=e),{centerX:(o+i)/2,centerY:(u+a)/2,maxX:i,maxY:a,minX:o,minY:u,x:(o+i)/2,y:(u+a)/2,height:s,width:c}},wc=function(t){var e=t.minX,r=t.minY,n=t.maxX,o=t.maxY;return[{x:e,y:r},{x:n,y:r},{x:n,y:o},{x:e,y:o}]},jc=function(t,e){var r=t.x,n=t.y;return r<e.minX||r>e.maxX||n<e.minY||n>e.maxY},xc=function(t,e){return e<t.minX||e>t.maxX?[]:[{x:e,y:t.minY},{x:e,y:t.maxY}]},Ec=function(t,e){return e<t.minY||e>t.maxY?[]:[{x:t.minX,y:e},{x:t.maxX,y:e}]},Sc=function(t,e){return xc(t,e.x).concat(Ec(t,e.y))},Pc=function(t,e){return Math.abs(t.x-e.x)+Math.abs(t.y-e.y)},Ac=function(t,e){var r=0;return e.forEach((function(e){e&&(t.x===e.x&&(r+=-2),t.y===e.y&&(r+=-2))})),r},kc=function(t,e,r,n,o){return Pc(t,e)+Pc(t,r)+Ac(t,[e,r,n,o])},Dc=function t(e,r,n,o,i){i||(i=0),e.unshift(r[o]),n[o]&&n[o]!==o&&i<=100&&t(e,r,n,n[o],i+1)},Tc=function(t,e){var r=t.indexOf(e);r>-1&&t.splice(r,1)},Mc=function(t,e,r,n){var o=e.x-t.x,i=e.y-t.y,u=n.x-r.x,a=n.y-r.y,c=(-i*(t.x-r.x)+o*(t.y-r.y))/(-u*i+o*a),s=(u*(t.y-r.y)-a*(t.x-r.x))/(-u*i+o*a);return c>=0&&c<=1&&s>=0&&s<=1},Nc=function(t,e,r){if(0===r.width&&0===r.height)return!1;var n=lc(wc(r),4),o=n[0],i=n[1],u=n[2],a=n[3];return Mc(t,e,o,i)||Mc(t,e,o,a)||Mc(t,e,i,u)||Mc(t,e,u,a)},Cc=function(t,e,r,n){var o=[];return t.forEach((function(t){t!==e&&(t.x!==e.x&&t.y!==e.y||Nc(t,e,r)||Nc(t,e,n)||o.push(t))})),yc(o)},Rc=function(t,e,r,n,o,i,u){var a=[],c=[e],s={},l={},f={};l[e.id]=0,f[e.id]=kc(e,r,e);var p={};t.forEach((function(t){p[t.id]=t}));for(var h=function(){var h=void 0,d=1/0;if(c.forEach((function(t){f[t.id]<d&&(d=f[t.id],h=t)})),h===r){var y=[];return Dc(y,p,s,r.id),{v:y}}Tc(c,h),a.push(h),Cc(t,h,n,o).forEach((function(t){if(-1===a.indexOf(t)){-1===c.indexOf(t)&&c.push(t);var n=f[h.id]+Pc(h,t);l[t.id]&&n>=l[t.id]||(s[t.id]=h.id,l[t.id]=n,f[t.id]=l[t.id]+kc(t,r,e,i,u))}}))};c.length;){var d=h();if("object"===sc(d))return d.v}return[e,r]},Ic=function(t){return qu(t)},Lc=function(t){for(var e=1;e<t.length-1;){var r=t[e-1],n=t[e],o=t[e+1];r.x===n.x&&n.x===o.x||r.y===n.y&&n.y===o.y?t.splice(e,1):e++}return t},zc=function(t,e,r,n,o){var i=Ic(r),u=Ic(n),a=gc(i,o),c=gc(u,o),s=mc(a,i,t),l=mc(c,u,e);if(dc(a,c)){var f=Yc(t,e,s,l);return[t,s].concat(cc(f),[l,e])}var p=_c([s,l]),h=Oc(a,p),d=Oc(c,p),y=[];y=(y=y.concat(wc(h))).concat(wc(d));var v={x:(t.x+e.x)/2,y:(t.y+e.y)/2};[p,h,d].forEach((function(t){y=y.concat(Sc(t,v).filter((function(t){return jc(t,a)&&jc(t,c)})))})),[{x:s.x,y:l.y},{x:l.x,y:s.y}].forEach((function(t){jc(t,a)&&jc(t,c)&&y.push(t)})),y.unshift(s),y.push(l),y=yc(y);var g=Rc(y,s,l,i,u,t,e);return g.unshift(t),g.push(e),g.length>2&&(g=Lc(g)),yc(g)},Bc=function(t){var e;if(1===t.length)e=[t[0],t[0]];else if(t.length>=2){for(var r=t[0],n=t[1],o=Ku(r.x,r.y,n.x,n.y),i=1;i<t.length-1;i++){var u=t[i],a=t[i+1],c=Ku(u.x,u.y,a.x,a.y);c>o&&(o=c,r=u,n=a)}e=[r,n]}return e},Uc=function(t,e,r){var n=$u(t,r),o=$u(e,r);return n&&o},Fc=function(t,e,r){var n=$u(t,r),o=$u(e,r);return!(n&&o)&&(n||o)},Hc=function(t,e,r){for(var n,o,i=qu(r),u=wc(i),a=0;a<u.length;a++){Mc(t,e,u[a],u[(a+1)%u.length])&&(o=[u[a],u[(a+1)%u.length]])}return o&&(n=function(t,e,r,n){var o=(e.y-t.y)*(n.x-r.x)-(t.x-e.x)*(r.y-n.y);if(0===o)return!1;var i=((e.x-t.x)*(n.x-r.x)*(r.y-t.y)+(e.y-t.y)*(n.x-r.x)*t.x-(n.y-r.y)*(e.x-t.x)*r.x)/o,u=-((e.y-t.y)*(n.y-r.y)*(r.x-t.x)+(e.x-t.x)*(n.y-r.y)*t.y-(n.x-r.x)*(e.y-t.y)*r.y)/o;return(i-t.x)*(i-e.x)<=0&&(u-t.y)*(u-e.y)<=0&&(i-r.x)*(i-n.x)<=0&&(u-r.y)*(u-n.y)<=0&&{x:i,y:u}}(t,e,o[0],o[1])),n},Xc=function(t,e){var r;return t.x===e.x?r=vo.VERTICAL:t.y===e.y&&(r=vo.HORIZONTAL),r},Gc=function(t){var e=t.split(" "),r=[];return e&&e.forEach((function(t){var e=lc(t.split(","),2),n=e[0],o=e[1];r.push({x:Number(n),y:Number(o)})})),r},Yc=function(t,e,r,n){var o=[];if(Xc(t,r)===Xc(e,n))t.y===r.y?(o.push({x:r.x,y:(r.y+n.y)/2}),o.push({x:n.x,y:(r.y+n.y)/2})):(o.push({x:(r.x+n.x)/2,y:r.y}),o.push({x:(r.x+n.x)/2,y:n.y}));else{var i={x:r.x,y:n.y},u=mu(i,t,r),a=mu(i,e,n);if(u||a)i={x:n.x,y:r.y};else{var c=Vc(i,t,r),s=Vc(i,e,n);c&&s&&(i={x:n.x,y:r.y})}o.push(i)}return o},Vc=function(t,e,r){return t.x===e.x&&t.x===r.x||t.y===e.y&&t.y===r.y},Wc=function(t){if(!t)return 0;for(var e=0,r=0;r<t.length;r++){var n=t.charCodeAt(r);t.match(/[A-Z]/)?e+=1.5:e+=n>=1&&n<=126||n>=65376&&n<=65439?1:2}return e},Kc=null,$c=function(t,e){Kc||(Kc=document.createElement("canvas"));var r=Kc.getContext("2d");return r.font=e,r.measureText(t).width},Zc=function(t){var e,r=t.start,n=t.end;if(r.x===n.x&&r.y===n.y)e="";else{var o={start:r,end:n,offset:10,verticalLength:5},i=Qa(uc(uc({},o),{},{type:"start"})),u=Qa(uc(uc({},o),{},{type:"end"}));e="M".concat(i.leftX," ").concat(i.leftY," \n L").concat(i.rightX," ").concat(i.rightY," \n L").concat(u.rightX," ").concat(u.rightY,"\n L").concat(u.leftX," ").concat(u.leftY," z")}return{d:e,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}},qc=function(t){var e=t.start,r=t.end,n=t.sourceNode,o=t.targetNode,i=t.offset,u=qu(n),a=qu(o),c=gc(u,i),s=gc(a,i);return{sNext:mc(c,u,e),ePre:mc(s,a,r)}},Jc=function(t){var e=t.replace(/M/g,"").replace(/C/g,",").split(",");return[Qc(e[0]),Qc(e[1]),Qc(e[2]),Qc(e[3])]},Qc=function(t){var e=lc(t.replace(/(^\s*)/g,"").split(" "),2);return{x:+e[0],y:+e[1]}},ts=function(t,e){var r=lc(t,4);return[ec(r[0],r[1],r[2],r[3],e),t[3]]},es=function(t,e){for(var r,n=t.x,o=t.y,i=Gc(e),u=Number.MAX_SAFE_INTEGER,a=[],c=0;c<i.length;c++)a.push({start:i[c],end:i[(c+1)%i.length]});if(a.forEach((function(t){var e=t.start,i=t.end;if(e.x===i.x){var a={x:e.x,y:o};if(mu(a,e,i)){var c=Math.abs(e.x-n);c<u&&(u=c,r=a)}}else if(e.y===i.y){var s={x:n,y:e.y};if(mu(s,e,i)){var l=Math.abs(e.y-o);l<u&&(u=l,r=s)}}})),!r){var s=a[0],l=s.start,f=s.end;r={x:l.x+(f.x-l.x)/2,y:l.y+(f.y-l.y)/2}}return r},rs=function(t){return io(t,["id","type","sourceNodeId","sourceAnchorId","targetNodeId","targetAnchorId","pointsList","startPoint","endPoint","properties"])},ns=function(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))};function os(t,e){return"function"!=typeof e?function(e,r,n){return Object.assign({type:t.edgeType},n)}:function(r,n,o){var i=e(r,n,o);return i?"string"==typeof i?Object.assign({},o,{type:i}):Object.assign({type:i},o):{type:t.edgeType}}}r(208);var is=function(){};function us(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function as(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var cs=function(){function t(e){var r=this,n=e.onDragStart,o=void 0===n?is:n,i=e.onDragging,u=void 0===i?is:i,a=e.onDragEnd,c=void 0===a?is:a,s=e.eventType,l=void 0===s?"":s,f=e.eventCenter,p=void 0===f?null:f,h=e.step,d=void 0===h?1:h,y=e.isStopPropagation,v=void 0===y||y,g=e.model,b=void 0===g?null:g,m=e.data,O=void 0===m?null:m;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),as(this,"onDragStart",void 0),as(this,"onDragging",void 0),as(this,"onDragEnd",void 0),as(this,"step",void 0),as(this,"isStopPropagation",void 0),as(this,"isDragging",!1),as(this,"isStartDragging",!1),as(this,"startX",0),as(this,"startY",0),as(this,"sumDeltaX",0),as(this,"sumDeltaY",0),as(this,"eventType",void 0),as(this,"eventCenter",void 0),as(this,"model",void 0),as(this,"data",void 0),as(this,"startTime",void 0),as(this,"handleMouseDown",(function(t){var e,n,o,i=null===(e=window)||void 0===e?void 0:e.document;if(0===t.button){r.isStopPropagation&&t.stopPropagation(),r.isStartDragging=!0,r.startX=t.clientX,r.startY=t.clientY,i.addEventListener("mousemove",r.handleMouseMove,!1),i.addEventListener("mouseup",r.handleMouseUp,!1);var u=null===(n=r.model)||void 0===n?void 0:n.getData();null===(o=r.eventCenter)||void 0===o||o.emit(yo["".concat(r.eventType,"_MOUSEDOWN")],{e:t,data:r.data||u}),r.startTime=(new Date).getTime()}})),as(this,"handleMouseMove",(function(t){if(r.isStopPropagation&&t.stopPropagation(),r.isStartDragging&&(r.sumDeltaX+=t.clientX-r.startX,r.sumDeltaY+=t.clientY-r.startY,r.startX=t.clientX,r.startY=t.clientY,r.step<=1||Math.abs(r.sumDeltaX)>r.step||Math.abs(r.sumDeltaY)>r.step)){var e,n=r.sumDeltaX%r.step,o=r.sumDeltaY%r.step,i=r.sumDeltaX-n,u=r.sumDeltaY-o;r.sumDeltaX=n,r.sumDeltaY=o;var a,c=null===(e=r.model)||void 0===e?void 0:e.getData();if(!r.isDragging)null===(a=r.eventCenter)||void 0===a||a.emit(yo["".concat(r.eventType,"_DRAGSTART")],{e:t,data:r.data||c}),r.onDragStart({event:t});r.isDragging=!0,Promise.resolve().then((function(){var e,n;r.onDragging({deltaX:i,deltaY:u,event:t}),null===(e=r.eventCenter)||void 0===e||e.emit(yo["".concat(r.eventType,"_MOUSEMOVE")],{e:t,data:r.data||c}),null===(n=r.eventCenter)||void 0===n||n.emit(yo["".concat(r.eventType,"_DRAG")],{e:t,data:r.data||c})}))}})),as(this,"handleMouseUp",(function(t){var e=window.document;r.isStartDragging=!1,r.isStopPropagation&&t.stopPropagation(),Promise.resolve().then((function(){var n,o,i;e.removeEventListener("mousemove",r.handleMouseMove,!1),e.removeEventListener("mouseup",r.handleMouseUp,!1);var u=null===(n=r.model)||void 0===n?void 0:n.getData();null===(o=r.eventCenter)||void 0===o||o.emit(yo["".concat(r.eventType,"_MOUSEUP")],{e:t,data:r.data||u}),r.isDragging&&(r.isDragging=!1,r.onDragEnd({event:t}),null===(i=r.eventCenter)||void 0===i||i.emit(yo["".concat(r.eventType,"_DROP")],{e:t,data:r.data||u}))}))})),as(this,"cancelDrag",(function(){var t,e=null===(t=window)||void 0===t?void 0:t.document;e.removeEventListener("mousemove",r.handleMouseMove,!1),e.removeEventListener("mouseup",r.handleMouseUp,!1),r.onDragEnd({event:null}),r.isDragging=!1})),this.onDragStart=o,this.onDragging=u,this.onDragEnd=c,this.step=d,this.isStopPropagation=v,this.eventType=l,this.eventCenter=p,this.model=b,this.data=O}var e,r,n;return e=t,(r=[{key:"setStep",value:function(t){this.step=t}},{key:"setModel",value:function(t){this.model=t}}])&&us(e.prototype,r),n&&us(e,n),t}();function ss(t){return ss="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ss(t)}function ls(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fs(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ps(t,e,r){return e&&fs(t.prototype,e),r&&fs(t,r),t}function hs(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Os(t,e)}function ds(t){var e=ms();return function(){var r,n=_s(t);if(e){var o=_s(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ys(this,r)}}function ys(t,e){if(e&&("object"===ss(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return vs(t)}function vs(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function gs(t){var e="function"==typeof Map?new Map:void 0;return gs=function(t){if(null===t||(r=t,-1===Function.toString.call(r).indexOf("[native code]")))return t;var r;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return bs(t,arguments,_s(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Os(n,t)},gs(t)}function bs(t,e,r){return bs=ms()?Reflect.construct:function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&Os(o,r.prototype),o},bs.apply(null,arguments)}function ms(){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(t){return!1}}function Os(t,e){return Os=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Os(t,e)}function _s(t){return _s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},_s(t)}function ws(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function js(t,e){return!!(t instanceof Es&&e instanceof Es)}var xs=function(t){hs(r,t);var e=ds(r);function r(t,n,o){var i;return ls(this,r),ws(vs(i=e.call(this,3)),"x",void 0),ws(vs(i),"y",void 0),ws(vs(i),"z",void 0),i[0]=t,i[1]=n,i[2]=o,i.x=t,i.y=n,i.z=o,Object.setPrototypeOf(vs(i),r.prototype),i}return ps(r,[{key:"add",value:function(t){if(js(this,t))return new Es(this.x+t.x,this.y+t.y);var e=this.z+t.z;return new Ss((this.x+t.x)/e,(this.y+t.y)/e)}},{key:"subtract",value:function(t){if(js(this,t))return new Es(this.x-t.x,this.y-t.y);var e=this.z-t.z;return 0===e?new Es(this.x-t.x,this.y-t.y):new Ss((this.x-t.x)/e,(this.y-t.y)/e)}}]),r}(gs(Array)),Es=function(t){hs(r,t);var e=ds(r);function r(t,n,o){var i;return ls(this,r),i=e.call(this,t,n,null!=o?o:0),Object.setPrototypeOf(vs(i),r.prototype),i}return ps(r,[{key:"toString",value:function(){return"Vector"}},{key:"dot",value:function(t){var e=this;return t.reduce((function(t,r,n){return t+r*e[n]}))}},{key:"cross",value:function(t){return new r(this.y*t.z-this.z*t.y,this.z*t.x-this.x*t.z,this.x*t.y-this.y*t.x)}},{key:"getLength",value:function(){return Math.hypot(this.x,this.y)}},{key:"normalize",value:function(){var t=this.getLength();return new r(this.x/t,this.y/t)}},{key:"crossZ",value:function(t){return this.x*t.y-this.y*t.x}},{key:"angle",value:function(t){var e=this.crossZ(t),r=Math.acos(this.normalize().dot(t.normalize()));return e>=0?r:-r}}]),r}(xs),Ss=function(t){hs(r,t);var e=ds(r);function r(t,n){var o;return ls(this,r),o=e.call(this,t,n,1),Object.setPrototypeOf(vs(o),r.prototype),o}return ps(r,[{key:"toString",value:function(){return"Point"}}]),r}(xs);r(67),r(218);function Ps(t){return Ps="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ps(t)}function As(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||Ds(t,e)||function(){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 ks(t){return function(t){if(Array.isArray(t))return Ts(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Ds(t)||function(){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 Ds(t,e){if(t){if("string"==typeof t)return Ts(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ts(t,e):void 0}}function Ts(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Ms(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ns(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Cs(t,e,r){return e&&Ns(t.prototype,e),r&&Ns(t,r),t}function Rs(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Hs(t,e)}function Is(t){var e=Fs();return function(){var r,n=Xs(t);if(e){var o=Xs(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ls(this,r)}}function Ls(t,e){if(e&&("object"===Ps(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return zs(t)}function zs(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Bs(t){var e="function"==typeof Map?new Map:void 0;return Bs=function(t){if(null===t||(r=t,-1===Function.toString.call(r).indexOf("[native code]")))return t;var r;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return Us(t,arguments,Xs(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Hs(n,t)},Bs(t)}function Us(t,e,r){return Us=Fs()?Reflect.construct:function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&Hs(o,r.prototype),o},Us.apply(null,arguments)}function Fs(){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(t){return!1}}function Hs(t,e){return Hs=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Hs(t,e)}function Xs(t){return Xs=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Xs(t)}function Gs(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Ys,Vs,Ws,Ks,$s,Zs,qs,Js,Qs,tl,el,rl,nl,ol=function(t){Rs(r,t);var e=Is(r);function r(){var t;Ms(this,r);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return Gs(zs(t=e.call(this,o.length)),"rows",void 0),Gs(zs(t),"columns",void 0),t.fill(new Array(3)),o.forEach((function(e,r){t[r]=e})),t.columns=o[0].length,t.rows=o.length,Object.setPrototypeOf(zs(t),r.prototype),t}return Cs(r,[{key:"getRow",value:function(t){return this[t]}},{key:"getColumn",value:function(t){return ks(this.map((function(e){return e[t]})))}},{key:"transpose",value:function(){for(var t=[],e=0;e<this.columns;e++)t.push(this.getColumn(e));return Us(r,t)}},{key:"cross",value:function(t){var e=new Array(this.rows).fill("").map((function(){return[]}));if(this.columns===t.rows)for(var n=0;n<this.rows;n++)for(var o=this.getRow(n),i=function(r){var i=t.getColumn(r);e[n][r]=o.reduce((function(t,e,r){return t+e*i[r]}),0)},u=0;u<t.columns;u++)i(u);return Us(r,ks(e))}},{key:"to2D",value:function(){return this.map((function(t){return[t[0],t[1]]}))}},{key:"toPoints",value:function(){return this.map((function(t){return new Ss(t[0],t[1])}))}},{key:"toString",value:function(){var t=As(this[0],2),e=t[0],r=t[1],n=As(this[1],2),o=n[0],i=n[1],u=As(this[2],2),a=u[0],c=u[1];return"matrix(".concat(e," ").concat(r," ").concat(o," ").concat(i," ").concat(a," ").concat(c,")")}},{key:"translate",value:function(t,e){return this.cross(new al(t,e))}},{key:"rotate",value:function(t){return this.cross(new il(t))}},{key:"scale",value:function(t,e){return this.cross(new ul(t,e))}}]),r}(Bs(Array)),il=function(t){Rs(r,t);var e=Is(r);function r(t){var n;return Ms(this,r),n=e.call(this,new Es(+Math.cos(t).toFixed(2),+Math.sin(t).toFixed(2),0),new Es(-Math.sin(t).toFixed(2),+Math.cos(t).toFixed(2),0),new Es(0,0,1)),Object.setPrototypeOf(zs(n),r.prototype),n}return Cs(r,[{key:"inverse",value:function(){return this.transpose()}}]),r}(ol),ul=function(t){Rs(r,t);var e=Is(r);function r(t,n){var o;return Ms(this,r),Gs(zs(o=e.call(this,new Es(t,0,0),new Es(0,n,0),new Es(0,0,1))),"sx",void 0),Gs(zs(o),"sy",void 0),o.sx=t,o.sy=n,Object.setPrototypeOf(zs(o),r.prototype),o}return Cs(r,[{key:"inverse",value:function(){return new r(1/this.sx,1/this.sy)}}]),r}(ol),al=function(t){Rs(r,t);var e=Is(r);function r(t,n){var o;return Ms(this,r),Gs(zs(o=e.call(this,new Es(1,0,0),new Es(0,1,0),new Es(t,n,1))),"tx",void 0),Gs(zs(o),"ty",void 0),o.tx=t,o.ty=n,Object.setPrototypeOf(zs(o),r.prototype),o}return Cs(r,[{key:"inverse",value:function(){return new r(-this.tx,-this.ty)}}]),r}(ol),cl={node:!1,edge:!1},sl={node:!0,edge:!0};function ll(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function fl(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ll(Object(r),!0).forEach((function(e){ml(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ll(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function pl(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||dl(t,e)||function(){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 hl(t){return function(t){if(Array.isArray(t))return yl(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||dl(t)||function(){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 dl(t,e){if(t){if("string"==typeof t)return yl(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?yl(t,e):void 0}}function yl(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function vl(t){return vl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vl(t)}function gl(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function bl(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ml(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ol(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var _l,wl=200,jl=(Ys=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),ml(this,"rootEl",void 0),gl(this,"width",Vs,this),gl(this,"height",Ws,this),ml(this,"theme",void 0),ml(this,"eventCenter",void 0),ml(this,"modelMap",new Map),ml(this,"topElement",void 0),ml(this,"animation",void 0),ml(this,"idGenerator",void 0),ml(this,"edgeGenerator",void 0),ml(this,"nodeMoveRules",[]),ml(this,"customTrajectory",void 0),gl(this,"edgeType",Ks,this),gl(this,"nodes",$s,this),gl(this,"edges",Zs,this),gl(this,"overlapMode",qs,this),gl(this,"background",Js,this),gl(this,"transformModel",Qs,this),gl(this,"editConfigModel",tl,this),gl(this,"gridSize",el,this),gl(this,"partial",rl,this),gl(this,"fakerNode",nl,this);var r,n=e.container,o=e.background,i=void 0===o?{}:o,u=e.grid,a=e.idGenerator,c=e.edgeGenerator,s=e.animation,l=e.customTrajectory;this.background=i,"object"===vl(u)&&(this.gridSize=u.size),this.rootEl=n,this.editConfigModel=new mo(e),this.eventCenter=new Bi,this.transformModel=new Io(this.eventCenter,e),this.theme=Li(e.style),this.edgeType=e.edgeType||"polyline",this.width=e.width,this.height=e.height,this.animation=(r=s)&&"boolean"!=typeof r?Ri(wi(cl),r):wi(!0===r?sl:cl),this.partial=e.partial,this.overlapMode=e.overlapMode||0,this.idGenerator=a,this.customTrajectory=l,this.edgeGenerator=os(this,c),this.width=e.width||this.rootEl.getBoundingClientRect().width,this.height=e.height||this.rootEl.getBoundingClientRect().height,this.flowId=gu()}var e,r,n;return e=t,r=[{key:"nodesMap",get:function(){return this.nodes.reduce((function(t,e,r){return t[e.id]={index:r,model:e},t}),{})}},{key:"edgesMap",get:function(){return this.edges.reduce((function(t,e,r){return t[e.id]={index:r,model:e},t}),{})}},{key:"modelsMap",get:function(){return[].concat(hl(this.nodes),hl(this.edges)).reduce((function(t,e){return t[e.id]=e,t}),{})}},{key:"sortElements",get:function(){var t=[];this.nodes.forEach((function(e){return t.push(e)})),this.edges.forEach((function(e){return t.push(e)})),t=t.sort((function(t,e){return t.zIndex-e.zIndex}));for(var e=[],r=[-200,-200],n=[this.width+wl,this.height+wl],o=0;o<t.length;o++){var i=t[o];i.visible&&(!this.partial||i.isSelected||this.isElementInArea(i,r,n,!1,!1))&&e.push(i)}return e}},{key:"textEditElement",get:function(){var t=this.nodes.find((function(t){return t.state===lo.TEXT_EDIT})),e=this.edges.find((function(t){return t.state===lo.TEXT_EDIT}));return t||e}},{key:"selectElements",get:function(){var t=new Map;return this.nodes.forEach((function(e){e.isSelected&&t.set(e.id,e)})),this.edges.forEach((function(e){e.isSelected&&t.set(e.id,e)})),t}},{key:"selectNodes",get:function(){var t=[];return this.nodes.forEach((function(e){e.isSelected&&t.push(e)})),t}},{key:"getAreaElement",value:function(t,e){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i=[],u=[];this.nodes.forEach((function(t){return u.push(t)})),this.edges.forEach((function(t){return u.push(t)}));for(var a=0;a<u.length;a++){var c=u[a];o&&!c.visible||!this.isElementInArea(c,t,e,r,n)||i.push(c)}return i}},{key:"getModel",value:function(t){return this.modelMap.get(t)}},{key:"getNodeModelById",value:function(t){var e;return this.fakerNode&&t===this.fakerNode.id?this.fakerNode:null===(e=this.nodesMap[t])||void 0===e?void 0:e.model}},{key:"getPointByClient",value:function(t){var e=t.x,r=t.y,n=this.rootEl.getBoundingClientRect(),o={x:e-n.left,y:r-n.top},i=pl(this.transformModel.HtmlPointToCanvasPoint([o.x,o.y]),2);return{domOverlayPosition:o,canvasOverlayPosition:{x:i[0],y:i[1]}}}},{key:"isElementInArea",value:function(t,e,r){var n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];if(t.BaseType===ho.NODE){for(var i=qu(t=t),u=i.minX,a=i.minY,c=i.maxX,s=i.maxY,l=[{x:u,y:a},{x:c,y:a},{x:c,y:s},{x:u,y:s}],f=o,p=0;p<l.length;p++){var h=l[p],d=h.x,y=h.y,v=this.transformModel.CanvasPointToHtmlPoint([d,y]),g=pl(v,2);if(d=g[0],y=g[1],Gi([d,y],e,r)!==o){f=!o;break}}return f}if(t.BaseType===ho.EDGE){var b=t=t,m=b.startPoint,O=b.endPoint,_=this.transformModel.CanvasPointToHtmlPoint([m.x,m.y]),w=this.transformModel.CanvasPointToHtmlPoint([O.x,O.y]),j=Gi(_,e,r),x=Gi(w,e,r);return n?j&&x:j||x}return!1}},{key:"graphDataToModel",value:function(t){var e=this;if(this.width&&this.height||this.resize(),!t)return this.nodes=[],void(this.edges=[]);t.nodes?this.nodes=dn(t.nodes,(function(t){var r=e.getModel(t.type);if(!r)throw new Error("找不到".concat(t.type,"对应的节点。"));var n=t.x,o=t.y;return n&&o&&(t.x=Ui(n,e.gridSize),t.y=Ui(o,e.gridSize),"object"===vl(t.text)&&(t.text.x-=Fi(n,e.gridSize),t.text.y-=Fi(o,e.gridSize))),new r(t,e)})):this.nodes=[],t.edges?this.edges=dn(t.edges,(function(t){var r=e.getModel(t.type);if(!r)throw new Error("找不到".concat(t.type,"对应的边。"));return new r(t,e)})):this.edges=[]}},{key:"modelToGraphData",value:function(){var t=[];this.edges.forEach((function(e){var r=e.getData();r&&!e.virtual&&t.push(r)}));var e=[];return this.nodes.forEach((function(t){var r=t.getData();r&&!t.virtual&&e.push(r)})),{nodes:e,edges:t}}},{key:"modelToHistoryData",value:function(){for(var t=!1,e=[],r=0;r<this.nodes.length;r++){var n=this.nodes[r];if(n.isDragging){t=!0;break}e.push(n.getHistoryData())}if(t)return!1;for(var o=!1,i=[],u=0;u<this.edges.length;u++){var a=this.edges[u];if(a.isDragging){o=!0;break}i.push(a.getHistoryData())}return!o&&{nodes:e,edges:i}}},{key:"getEdgeModelById",value:function(t){var e;return null===(e=this.edgesMap[t])||void 0===e?void 0:e.model}},{key:"getElement",value:function(t){return this.modelsMap[t]}},{key:"getNodeEdges",value:function(t){for(var e=[],r=0;r<this.edges.length;r++){var n=this.edges[r],o=this.edges[r].sourceNodeId===t,i=this.edges[r].targetNodeId===t;(o||i)&&e.push(n)}return e}},{key:"getSelectElements",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=this.selectElements,r={nodes:[],edges:[]};return e.forEach((function(n){if(n.BaseType===ho.NODE&&r.nodes.push(n.getData()),n.BaseType===ho.EDGE){var o=n.getData(),i=e.get(o.sourceNodeId)&&e.get(o.targetNodeId);(t||i)&&r.edges.push(o)}})),r}},{key:"updateAttributes",value:function(t,e){this.getElement(t).updateAttributes(e)}},{key:"changeNodeId",value:function(t,e){return e||(e=gu()),this.nodesMap[e]?"":this.nodesMap[t]?(this.edges.forEach((function(r){r.sourceNodeId===t&&(r.sourceNodeId=e),r.targetNodeId===t&&(r.targetNodeId=e)})),this.nodesMap[t].model.id=e,this.nodesMap[e]=this.nodesMap[t],e):""}},{key:"changeEdgeId",value:function(t,e){return e||(e=gu()),this.edgesMap[e]?"":this.edgesMap[t]?(this.edges.forEach((function(r){r.id===t&&r.changeEdgeId(e)})),e):""}},{key:"setFakerNode",value:function(t){this.fakerNode=t}},{key:"removeFakerNode",value:function(){this.fakerNode=null}},{key:"setModel",value:function(t,e){return this.modelMap.set(t,e)}},{key:"toFront",value:function(t){var e,r,n,o=(null===(e=this.nodesMap[t])||void 0===e?void 0:e.model)||(null===(r=this.edgesMap[t])||void 0===r?void 0:r.model);o&&(this.overlapMode===Oo.DEFAULT&&(null===(n=this.topElement)||void 0===n||n.setZIndex(),o.setZIndex(9999),this.topElement=o),this.overlapMode===Oo.INCREASE&&this.setElementZIndex(t,"top"))}},{key:"setElementZIndex",value:function(t,e){var r,n,o,i=(null===(r=this.nodesMap[t])||void 0===r?void 0:r.model)||(null===(n=this.edgesMap[t])||void 0===n?void 0:n.model);i&&("number"==typeof e&&(o=e),"top"===e&&(o=la()),"bottom"===e&&(o=--sa),i.setZIndex(o))}},{key:"deleteNode",value:function(t){var e=this.nodesMap[t].model.getData();this.deleteEdgeBySource(t),this.deleteEdgeByTarget(t),this.nodes.splice(this.nodesMap[t].index,1),this.eventCenter.emit(yo.NODE_DELETE,{data:e})}},{key:"addNode",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yo.NODE_ADD,r=arguments.length>2?arguments[2]:void 0,n=aa(t);n.id&&this.nodesMap[t.id]&&delete n.id;var o=this.getModel(n.type);if(!o)throw new Error("找不到".concat(n.type,"对应的节点,请确认是否已注册此类型节点。"));n.x=Ui(n.x,this.gridSize),n.y=Ui(n.y,this.gridSize);var i=new o(n,this);this.nodes.push(i);var u=i.getData(),a={data:u};return r&&(a.e=r),this.eventCenter.emit(e,a),i}},{key:"cloneNode",value:function(t){var e=this.getNodeModelById(t),r=e.getData();r.x+=30,r.y+=30,delete r.id,r.text&&(r.text.x+=30,r.text.y+=30);var n=this.addNode(r);return n.setSelected(!0),e.setSelected(!1),n.getData()}},{key:"moveNode",value:function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=this.nodesMap[t];if(o){var i=o.model,u=i.getMoveDistance(e,r,n),a=pl(u,2);e=a[0],r=a[1],this.moveEdge(t,e,r)}}},{key:"moveNode2Coordinate",value:function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=this.nodesMap[t];if(o){var i=o.model,u=i.x,a=i.y,c=e-u,s=r-a;this.moveNode(t,c,s,n)}}},{key:"editText",value:function(t){this.setElementStateById(t,lo.TEXT_EDIT)}},{key:"addEdge",value:function(t){var e=aa(t),r=e.type;r||(r=this.edgeType),e.id&&this.edgesMap[e.id]&&delete e.id;var n=this.getModel(r);if(!n)throw new Error("找不到".concat(r,"对应的边,请确认是否已注册此类型边。"));var o=new n(fl(fl({},e),{},{type:r}),this),i=o.getData();return this.edges.push(o),this.eventCenter.emit(yo.EDGE_ADD,{data:i}),o}},{key:"moveEdge",value:function(t,e,r){for(var n=0;n<this.edges.length;n++){var o=this.edges[n],i=o.textPosition,u=i.x,a=i.y,c=this.edges[n].sourceNodeId===t,s=this.edges[n].targetNodeId===t;c&&o.moveStartPoint(e,r),s&&o.moveEndPoint(e,r),(c||s)&&this.handleEdgeTextMove(o,u,a)}}},{key:"handleEdgeTextMove",value:function(t,e,r){var n;if(!0===t.customTextPosition)t.resetTextPosition();else if(t.modelType===po.POLYLINE_EDGE&&null!==(n=t.text)&&void 0!==n&&n.value){var o=t.text,i=es(o,t.points);t.moveText(i.x-o.x,i.y-o.y)}else{var u=t.textPosition,a=u.x,c=u.y;t.moveText(a-e,c-r)}}},{key:"deleteEdgeBySourceAndTarget",value:function(t,e){for(var r=0;r<this.edges.length;r++)if(this.edges[r].sourceNodeId===t&&this.edges[r].targetNodeId===e){var n=this.edges[r].getData();this.edges.splice(r,1),r--,this.eventCenter.emit(yo.EDGE_DELETE,{data:n})}}},{key:"deleteEdgeById",value:function(t){if(this.edgesMap[t]){var e=this.edgesMap[t].index,r=this.edgesMap[t].model.getData();this.edges.splice(e,1),this.eventCenter.emit(yo.EDGE_DELETE,{data:r})}}},{key:"deleteEdgeBySource",value:function(t){for(var e=0;e<this.edges.length;e++)if(this.edges[e].sourceNodeId===t){var r=this.edges[e].getData();this.edges.splice(e,1),e--,this.eventCenter.emit(yo.EDGE_DELETE,{data:r})}}},{key:"deleteEdgeByTarget",value:function(t){for(var e=0;e<this.edges.length;e++)if(this.edges[e].targetNodeId===t){var r=this.edges[e].getData();this.edges.splice(e,1),e--,this.eventCenter.emit(yo.EDGE_DELETE,{data:r})}}},{key:"setElementStateById",value:function(t,e,r){this.nodes.forEach((function(n){n.id===t?n.setElementState(e,r):n.setElementState(lo.DEFAULT)})),this.edges.forEach((function(n){n.id===t?n.setElementState(e,r):n.setElementState(lo.DEFAULT)}))}},{key:"updateText",value:function(t,e){this.nodes.forEach((function(r){r.id===t&&r.updateText(e)})),this.edges.forEach((function(r){r.id===t&&r.updateText(e)}))}},{key:"selectNodeById",value:function(t){var e,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];r||this.clearSelectElements();var n=null===(e=this.nodesMap[t])||void 0===e?void 0:e.model;null==n||n.setSelected(!0)}},{key:"selectEdgeById",value:function(t){var e,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];r||this.clearSelectElements();var n=null===(e=this.edgesMap[t])||void 0===e?void 0:e.model;null==n||n.setSelected(!0)}},{key:"selectElementById",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e||this.clearSelectElements();var r=this.getElement(t);null==r||r.setSelected(!0)}},{key:"clearSelectElements",value:function(){var t;this.selectElements.forEach((function(t){null==t||t.setSelected(!1)})),this.selectElements.clear(),this.overlapMode===Oo.DEFAULT&&(null===(t=this.topElement)||void 0===t||t.setZIndex())}},{key:"moveNodes",value:function(t,e,r){for(var n=this,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=t.reduce((function(t,i){var u=n.nodesMap[i].model.getMoveDistance(e,r,o);return t[i]=u,t}),{}),u=0;u<this.edges.length;u++){var a=this.edges[u],c=a.textPosition,s=c.x,l=c.y,f=i[a.sourceNodeId],p=void 0,h=void 0;if(f){var d=pl(f,2);p=d[0],h=d[1],a.moveStartPoint(p,h)}var y=i[a.targetNodeId];if(y){var v=pl(y,2);p=v[0],h=v[1],a.moveEndPoint(p,h)}(f||y)&&this.handleEdgeTextMove(a,s,l)}}},{key:"addNodeMoveRules",value:function(t){this.nodeMoveRules.includes(t)||this.nodeMoveRules.push(t)}},{key:"setDefaultEdgeType",value:function(t){this.edgeType=t}},{key:"changeNodeType",value:function(t,e){var r=this.getNodeModelById(t);if(r){var n=r.getData();n.type=e;var o=this.getModel(e);if(!o)throw new Error("找不到".concat(e,"对应的节点,请确认是否已注册此类型节点。"));var i=new o(n,this);this.nodes.splice(this.nodesMap[t].index,1,i),this.getNodeEdges(t).forEach((function(e){if(e.sourceNodeId===t){var r=na(i,e.startPoint,i.width,i.height);e.updateStartPoint(r)}if(e.targetNodeId===t){var n=na(i,e.endPoint,i.width,i.height);e.updateEndPoint(n)}}))}}},{key:"changeEdgeType",value:function(t,e){var r=this.getEdgeModelById(t);if(r&&r.type!==e){var n=r.getData();n.type=e;var o=this.getModel(e);if(!o)throw new Error("找不到".concat(e,"对应的节点,请确认是否已注册此类型节点。"));delete n.pointsList;var i=new o(n,this);this.edges.splice(this.edgesMap[t].index,1,i)}}},{key:"getNodeIncomingEdge",value:function(t){var e=[];return this.edges.forEach((function(r){r.targetNodeId===t&&e.push(r)})),e}},{key:"getNodeOutgoingEdge",value:function(t){var e=[];return this.edges.forEach((function(r){r.sourceNodeId===t&&e.push(r)})),e}},{key:"getAnchorIncomingEdge",value:function(t){var e=[];return this.edges.forEach((function(r){r.targetAnchorId===t&&e.push(r)})),e}},{key:"getAnchorOutcomingEdge",value:function(t){var e=[];return this.edges.forEach((function(r){r.sourceAnchorId===t&&e.push(r)})),e}},{key:"getNodeIncomingNode",value:function(t){var e=this,r=[];return this.edges.forEach((function(n){n.targetNodeId===t&&r.push(e.nodesMap[n.sourceNodeId].model)})),r}},{key:"getNodeOutgoingNode",value:function(t){var e=this,r=[];return this.edges.forEach((function(n){n.sourceNodeId===t&&r.push(e.nodesMap[n.targetNodeId].model)})),r}},{key:"setTheme",value:function(t){this.theme=Li(fl(fl({},this.theme),t))}},{key:"resize",value:function(t,e){this.width=t||this.rootEl.getBoundingClientRect().width,this.height=e||this.rootEl.getBoundingClientRect().height,!this.width||this.height}},{key:"clearData",value:function(){this.nodes=[],this.edges=[]}},{key:"getVirtualRectSize",value:function(){var t=this.nodes,e=[],r=[];t.forEach((function(t){var n=t.x,o=t.y,i=t.width,u=t.height,a=t.getNodeStyle().strokeWidth,c=void 0===a?0:a,s=n+i/2+c,l=n-i/2-c,f=o+u/2+c,p=o-u/2-c;e=e.concat([s,l].filter((function(t){return!Number.isNaN(t)}))),r=r.concat([f,p].filter((function(t){return!Number.isNaN(t)})))}));var n=Math.min.apply(Math,hl(e)),o=Math.max.apply(Math,hl(e)),i=Math.min.apply(Math,hl(r)),u=o-n||0,a=Math.max.apply(Math,hl(r))-i||0;return{virtualRectWidth:u,virtualRectHeight:a,virtualRectCenterPositionX:n+u/2,virtualRectCenterPositionY:i+a/2}}},{key:"translateCenter",value:function(){var t=this.nodes,e=this.width,r=this.height,n=this.rootEl,o=this.transformModel;if(t.length){var i=e||n.clientWidth,u=r||n.clientHeight,a=this.getVirtualRectSize(),c=a.virtualRectCenterPositionX,s=a.virtualRectCenterPositionY;o.focusOn(c,s,i,u)}}},{key:"fitView",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,r=this.nodes,n=this.width,o=this.height,i=this.rootEl,u=this.transformModel;if(r.length){var a=n||i.clientWidth,c=o||i.clientHeight,s=this.getVirtualRectSize(),l=s.virtualRectWidth,f=s.virtualRectHeight,p=s.virtualRectCenterPositionX,h=s.virtualRectCenterPositionY,d=(l+e)/a,y=(f+t)/c,v=0;v=1/Math.max(d,y);var g=[a/2,c/2];u.zoom(v,g),u.focusOn(p,h,a,c)}}},{key:"openEdgeAnimation",value:function(t){this.getEdgeModelById(t).openEdgeAnimation()}},{key:"closeEdgeAnimation",value:function(t){this.getEdgeModelById(t).closeEdgeAnimation()}}],r&&bl(e.prototype,r),n&&bl(e,n),t}(),Vs=Ol(Ys.prototype,"width",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Ws=Ol(Ys.prototype,"height",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Ks=Ol(Ys.prototype,"edgeType",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),$s=Ol(Ys.prototype,"nodes",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Zs=Ol(Ys.prototype,"edges",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),qs=Ol(Ys.prototype,"overlapMode",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Oo.DEFAULT}}),Js=Ol(Ys.prototype,"background",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Qs=Ol(Ys.prototype,"transformModel",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),tl=Ol(Ys.prototype,"editConfigModel",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),el=Ol(Ys.prototype,"gridSize",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),rl=Ol(Ys.prototype,"partial",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),nl=Ol(Ys.prototype,"fakerNode",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Ol(Ys.prototype,"nodesMap",[o.m],Object.getOwnPropertyDescriptor(Ys.prototype,"nodesMap"),Ys.prototype),Ol(Ys.prototype,"edgesMap",[o.m],Object.getOwnPropertyDescriptor(Ys.prototype,"edgesMap"),Ys.prototype),Ol(Ys.prototype,"modelsMap",[o.m],Object.getOwnPropertyDescriptor(Ys.prototype,"modelsMap"),Ys.prototype),Ol(Ys.prototype,"sortElements",[o.m],Object.getOwnPropertyDescriptor(Ys.prototype,"sortElements"),Ys.prototype),Ol(Ys.prototype,"textEditElement",[o.m],Object.getOwnPropertyDescriptor(Ys.prototype,"textEditElement"),Ys.prototype),Ol(Ys.prototype,"selectElements",[o.m],Object.getOwnPropertyDescriptor(Ys.prototype,"selectElements"),Ys.prototype),Ol(Ys.prototype,"selectNodes",[o.m],Object.getOwnPropertyDescriptor(Ys.prototype,"selectNodes"),Ys.prototype),Ol(Ys.prototype,"setFakerNode",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"setFakerNode"),Ys.prototype),Ol(Ys.prototype,"removeFakerNode",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"removeFakerNode"),Ys.prototype),Ol(Ys.prototype,"setModel",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"setModel"),Ys.prototype),Ol(Ys.prototype,"toFront",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"toFront"),Ys.prototype),Ol(Ys.prototype,"setElementZIndex",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"setElementZIndex"),Ys.prototype),Ol(Ys.prototype,"deleteNode",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"deleteNode"),Ys.prototype),Ol(Ys.prototype,"addNode",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"addNode"),Ys.prototype),Ol(Ys.prototype,"cloneNode",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"cloneNode"),Ys.prototype),Ol(Ys.prototype,"moveNode",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"moveNode"),Ys.prototype),Ol(Ys.prototype,"moveNode2Coordinate",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"moveNode2Coordinate"),Ys.prototype),Ol(Ys.prototype,"editText",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"editText"),Ys.prototype),Ol(Ys.prototype,"addEdge",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"addEdge"),Ys.prototype),Ol(Ys.prototype,"moveEdge",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"moveEdge"),Ys.prototype),Ol(Ys.prototype,"deleteEdgeBySourceAndTarget",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"deleteEdgeBySourceAndTarget"),Ys.prototype),Ol(Ys.prototype,"deleteEdgeById",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"deleteEdgeById"),Ys.prototype),Ol(Ys.prototype,"deleteEdgeBySource",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"deleteEdgeBySource"),Ys.prototype),Ol(Ys.prototype,"deleteEdgeByTarget",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"deleteEdgeByTarget"),Ys.prototype),Ol(Ys.prototype,"setElementStateById",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"setElementStateById"),Ys.prototype),Ol(Ys.prototype,"updateText",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"updateText"),Ys.prototype),Ol(Ys.prototype,"selectNodeById",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"selectNodeById"),Ys.prototype),Ol(Ys.prototype,"selectEdgeById",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"selectEdgeById"),Ys.prototype),Ol(Ys.prototype,"selectElementById",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"selectElementById"),Ys.prototype),Ol(Ys.prototype,"clearSelectElements",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"clearSelectElements"),Ys.prototype),Ol(Ys.prototype,"moveNodes",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"moveNodes"),Ys.prototype),Ol(Ys.prototype,"setDefaultEdgeType",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"setDefaultEdgeType"),Ys.prototype),Ol(Ys.prototype,"changeNodeType",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"changeNodeType"),Ys.prototype),Ol(Ys.prototype,"changeEdgeType",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"changeEdgeType"),Ys.prototype),Ol(Ys.prototype,"getNodeIncomingEdge",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"getNodeIncomingEdge"),Ys.prototype),Ol(Ys.prototype,"getNodeOutgoingEdge",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"getNodeOutgoingEdge"),Ys.prototype),Ol(Ys.prototype,"getAnchorIncomingEdge",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"getAnchorIncomingEdge"),Ys.prototype),Ol(Ys.prototype,"getAnchorOutcomingEdge",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"getAnchorOutcomingEdge"),Ys.prototype),Ol(Ys.prototype,"getNodeIncomingNode",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"getNodeIncomingNode"),Ys.prototype),Ol(Ys.prototype,"getNodeOutgoingNode",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"getNodeOutgoingNode"),Ys.prototype),Ol(Ys.prototype,"setTheme",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"setTheme"),Ys.prototype),Ol(Ys.prototype,"resize",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"resize"),Ys.prototype),Ol(Ys.prototype,"clearData",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"clearData"),Ys.prototype),Ol(Ys.prototype,"translateCenter",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"translateCenter"),Ys.prototype),Ol(Ys.prototype,"fitView",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"fitView"),Ys.prototype),Ol(Ys.prototype,"openEdgeAnimation",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"openEdgeAnimation"),Ys.prototype),Ol(Ys.prototype,"closeEdgeAnimation",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"closeEdgeAnimation"),Ys.prototype),Ys),xl=jl;function El(t){return El="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},El(t)}function Sl(){return Sl=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Sl.apply(this,arguments)}function Pl(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Al(t,e){return Al=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Al(t,e)}function kl(t){var e=function(){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(t){return!1}}();return function(){var r,n=Ml(t);if(e){var o=Ml(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Dl(this,r)}}function Dl(t,e){if(e&&("object"===El(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Tl(t)}function Tl(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ml(t){return Ml=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ml(t)}function Nl(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Cl,Rl=T_(_l=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Al(t,e)}(i,t);var e,r,n,o=kl(i);function i(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),Nl(Tl(e=o.call(this)),"stepDrag",void 0),Nl(Tl(e),"stepScrollX",0),Nl(Tl(e),"stepScrollY",0),Nl(Tl(e),"onDragging",(function(t){var r=t.deltaX,n=t.deltaY;e.setState({isDragging:!0});var o=e.props.graphModel,i=o.transformModel;!0!==o.editConfigModel.stopMoveGraph&&i.translate(r,n)})),Nl(Tl(e),"onDragEnd",(function(){e.setState({isDragging:!1})})),Nl(Tl(e),"zoomHandler",(function(t){var r=e.props,n=r.graphModel,o=n.editConfigModel,i=n.transformModel,u=n.gridSize,a=r.graphModel,c=t.deltaX,s=t.deltaY;if(o.stopScrollGraph||!0===t.ctrlKey){if(!o.stopZoomGraph){t.preventDefault();var l=a.getPointByClient({x:t.clientX,y:t.clientY}).canvasOverlayPosition,f=l.x,p=l.y;i.zoom(t.deltaY<0,[f,p])}}else{if(t.preventDefault(),e.stepScrollX+=c,e.stepScrollY+=s,Math.abs(e.stepScrollX)>=u){var h=e.stepScrollX%u,d=e.stepScrollX-h;i.translate(-d*i.SCALE_X,0),e.stepScrollX=h}if(Math.abs(e.stepScrollY)>=u){var y=e.stepScrollY%u,v=e.stepScrollY-y;i.translate(0,-v*i.SCALE_Y),e.stepScrollY=y}}})),Nl(Tl(e),"clickHandler",(function(t){if("canvas-overlay"===t.target.getAttribute("name")){var r=e.props.graphModel;r.selectElements.size>0&&r.clearSelectElements(),r.eventCenter.emit(yo.BLANK_CLICK,{e:t})}})),Nl(Tl(e),"handleContextMenu",(function(t){if("canvas-overlay"===t.target.getAttribute("name")){t.preventDefault();var r=e.props.graphModel,n=r.getPointByClient({x:t.clientX,y:t.clientY});r.eventCenter.emit(yo.BLANK_CONTEXTMENU,{e:t,position:n})}})),Nl(Tl(e),"mouseDownHandler",(function(t){var r=e.props.graphModel,n=r.eventCenter,o=r.editConfigModel,i=r.transformModel.SCALE_X,u=r.gridSize,a=t.target,c=!o.adjustEdge&&!o.adjustNodePosition;("canvas-overlay"===a.getAttribute("name")||c)&&(!0!==o.stopMoveGraph?(e.stepDrag.setStep(u*i),e.stepDrag.handleMouseDown(t)):n.emit(yo.BLANK_MOUSEDOWN,{e:t}),e.clickHandler(t))}));var r=t.graphModel,n=r.gridSize,u=r.eventCenter;return e.stepDrag=new cs({onDragging:e.onDragging,onDragEnd:e.onDragEnd,step:n,eventType:"BLANK",isStopPropagation:!1,eventCenter:u,model:null}),e.state={isDragging:!1},e}return e=i,(r=[{key:"render",value:function(){var t=this.props.graphModel.transformModel.getTransformStyle().transform,e=this.props,r=e.children,n=e.dnd,o=this.state.isDragging;return Object(tt.g)("svg",Sl({xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",name:"canvas-overlay",onWheel:this.zoomHandler,onMouseDown:this.mouseDownHandler,onContextMenu:this.handleContextMenu,className:o?"lf-canvas-overlay lf-dragging":"lf-canvas-overlay lf-drag-able"},n.eventMap()),Object(tt.g)("g",{transform:t},r))}}])&&Pl(e.prototype,r),n&&Pl(e,n),i}(tt.a))||_l;function Il(t){return Il="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Il(t)}function Ll(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function zl(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Bl(t,e){return Bl=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Bl(t,e)}function Ul(t){var e=function(){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(t){return!1}}();return function(){var r,n=Hl(t);if(e){var o=Hl(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Fl(this,r)}}function Fl(t,e){if(e&&("object"===Il(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Hl(t){return Hl=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Hl(t)}var Xl=T_(Cl=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Bl(t,e)}(i,t);var e,r,n,o=Ul(i);function i(){return Ll(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"componentDidMount",value:function(){this.triggerToolRender()}},{key:"componentDidUpdate",value:function(){this.triggerToolRender()}},{key:"getTools",value:function(){var t=this.props,e=t.tool,r=t.graphModel,n=e.getTools().map((function(t){return Object(tt.g)(t,{graphModel:r,logicFlow:e.instance})}));return e.components=n,n}},{key:"triggerToolRender",value:function(){var t=this.props,e=t.tool,r=t.graphModel,n=document.querySelector("#ToolOverlay_".concat(r.flowId)),o=e.getInstance();o.components.forEach((function(t){return t(o,n)})),o.components=[]}},{key:"render",value:function(){var t=this.props.graphModel;return Object(tt.g)("div",{className:"lf-tool-overlay",id:"ToolOverlay_".concat(t.flowId)},this.getTools())}}])&&zl(e.prototype,r),n&&zl(e,n),i}(tt.a))||Cl;function Gl(t){return Gl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gl(t)}function Yl(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Vl(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Wl(t,e){return Wl=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Wl(t,e)}function Kl(t){var e=function(){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(t){return!1}}();return function(){var r,n=Zl(t);if(e){var o=Zl(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return $l(this,r)}}function $l(t,e){if(e&&("object"===Gl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Zl(t){return Zl=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Zl(t)}var ql,Jl=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Wl(t,e)}(i,t);var e,r,n,o=Kl(i);function i(){return Yl(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"render",value:function(){var t=this.props.background;return Object(tt.g)("div",{className:"lf-background"},Object(tt.g)("div",{style:t,className:"lf-background-area"}))}}])&&Vl(e.prototype,r),n&&Vl(e,n),i}(tt.a);function Ql(t){return Ql="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ql(t)}function tf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ef(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function rf(t,e){return rf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},rf(t,e)}function nf(t){var e=function(){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(t){return!1}}();return function(){var r,n=af(t);if(e){var o=af(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return of(this,r)}}function of(t,e){if(e&&("object"===Ql(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return uf(t)}function uf(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function af(t){return af=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},af(t)}function cf(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var sf=T_(ql=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&rf(t,e)}(i,t);var e,r,n,o=nf(i);function i(){var t;tf(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return cf(uf(t=o.call.apply(o,[this].concat(r))),"id",gu()),t}return e=i,(r=[{key:"renderDot",value:function(){var t=this.props,e=t.config,r=e.color,n=e.thickness,o=void 0===n?2:n,i=t.size,u=t.visible,a=Math.min(Math.max(2,o),i/2),c=1;return u||(c=0),Object(tt.g)("rect",{width:a,height:a,rx:a/2,ry:a/2,fill:r,opacity:c})}},{key:"renderMesh",value:function(){var t=this.props,e=t.config,r=e.color,n=e.thickness,o=void 0===n?1:n,i=t.size,u=t.visible,a=Math.min(Math.max(1,o),i/2),c="M ".concat(i," 0 H0 M0 0 V0 ").concat(i),s=1;return u||(s=0),Object(tt.g)("path",{d:c,stroke:r,strokeWidth:a,opacity:s})}},{key:"render",value:function(){var t=this.props,e=t.type,r=t.size,n=t.graphModel.transformModel,o=[n.SCALE_X,n.SKEW_Y,n.SKEW_X,n.SCALE_Y,n.TRANSLATE_X,n.TRANSLATE_Y].join(","),i="matrix(".concat(o,")");return Object(tt.g)("div",{className:"lf-grid"},Object(tt.g)("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%"},Object(tt.g)("defs",null,Object(tt.g)("pattern",{id:this.id,patternUnits:"userSpaceOnUse",patternTransform:i,x:"0",y:"0",width:r,height:r},"dot"===e&&this.renderDot(),"mesh"===e&&this.renderMesh())),Object(tt.g)("rect",{width:"100%",height:"100%",fill:"url(#".concat(this.id,")")})))}}])&&ef(e.prototype,r),n&&ef(e,n),i}(tt.a))||ql;sf.defaultProps={size:20,visible:!0,type:"dot",config:{color:"#ababab",thickness:1}};r(53);function lf(t){return lf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lf(t)}function ff(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return pf(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return pf(t,e)}(t,e)||function(){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 pf(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var hf,df=function(t){var e={x1:10,y1:10,x2:20,y2:20,stroke:"black"};return Object.entries(t).forEach((function(t){var r=ff(t,2),n=r[0],o=r[1];"style"===n?e[n]=o:"object"!==lf(o)&&(e[n]=o)})),Object(tt.g)("line",e)};function yf(t){return yf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yf(t)}function vf(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function gf(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?vf(Object(r),!0).forEach((function(e){bf(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):vf(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function bf(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function mf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Of(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function _f(t,e){return _f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},_f(t,e)}function wf(t){var e=function(){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(t){return!1}}();return function(){var r,n=xf(t);if(e){var o=xf(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return jf(this,r)}}function jf(t,e){if(e&&("object"===yf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function xf(t){return xf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},xf(t)}var Ef,Sf=T_(hf=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&_f(t,e)}(i,t);var e,r,n,o=wf(i);function i(){return mf(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"render",value:function(){var t=this.props.snaplineModel,e=t.position,r=t.isShowHorizontal,n=t.isShowVertical,o=t.getStyle(),i=e.x,u=void 0===i?0:i,a=e.y,c=void 0===a?0:a,s=gf(gf({x1:-1e5,y1:c,x2:1e5,y2:c},o),{},{stroke:r?o.stroke:"none"}),l=gf(gf({x1:u,y1:-1e5,x2:u,y2:1e5},o),{},{stroke:n?o.stroke:"none"});return Object(tt.g)("g",{className:"lf-snapline"},Object(tt.g)(df,s),Object(tt.g)(df,l))}}])&&Of(e.prototype,r),n&&Of(e,n),i}(tt.a))||hf;function Pf(t){return Pf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pf(t)}function Af(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return kf(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return kf(t,e)}(t,e)||function(){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 kf(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Df(t){var e=t.x,r=t.y,n=t.width,o=t.height,i=t.className,u=t.radius,a=e-n/2,c=r-o/2,s={};return Object.entries(t).forEach((function(t){var e=Af(t,2),r=e[0],n=e[1];"object"!==Pf(n)&&(s[r]=n)})),s.className=i?"lf-basic-shape ".concat(i):"lf-basic-shape",u&&(s.rx=u,s.ry=u),s.x=a,s.y=c,Object(tt.g)("rect",s)}function Tf(t){return Tf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tf(t)}function Mf(){return Mf=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Mf.apply(this,arguments)}function Nf(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Cf(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Nf(Object(r),!0).forEach((function(e){Rf(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Nf(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Rf(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function If(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Lf(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function zf(t,e){return zf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},zf(t,e)}function Bf(t){var e=function(){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(t){return!1}}();return function(){var r,n=Ff(t);if(e){var o=Ff(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Uf(this,r)}}function Uf(t,e){if(e&&("object"===Tf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ff(t){return Ff=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ff(t)}Df.defaultProps={className:"",radius:""};var Hf,Xf=T_(Ef=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&zf(t,e)}(i,t);var e,r,n,o=Bf(i);function i(){return If(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getNodesOutline",value:function(){var t=this.props.graphModel,e=t.nodes,r=t.editConfigModel,n=r.hoverOutline,o=r.nodeSelectedOutline,i=[];return e.forEach((function(t){if(t.isHovered||t.isSelected){var e=t.isHovered,r=t.isSelected,u=t.x,a=t.y,c=t.width,s=t.height;if(o&&r||n&&e){var l=t.getOutlineStyle(),f={};if(Object.keys(l).forEach((function(t){"hover"!==t&&(f[t]=l[t])})),e){var p=l.hover;f=Cf(Cf({},f),p)}i.push(Object(tt.g)(Df,Mf({transform:t.transform,className:"lf-outline-node",x:u,y:a,width:c+10,height:s+10},f)))}}})),i}},{key:"getEdgeOutline",value:function(){for(var t=this.props.graphModel,e=t.edges,r=t.editConfigModel,n=r.edgeSelectedOutline,o=r.hoverOutline,i=[],u=0;u<e.length;u++){var a=e[u];(n&&a.isSelected||o&&a.isHovered)&&(a.modelType===po.LINE_EDGE?i.push(this.getLineOutline(a)):a.modelType===po.POLYLINE_EDGE?i.push(this.getPolylineOutline(a)):a.modelType===po.BEZIER_EDGE&&i.push(this.getBezierOutline(a)))}return i}},{key:"getLineOutline",value:function(t){var e=t.startPoint,r=t.endPoint,n=(e.x+r.x)/2,o=(e.y+r.y)/2,i=Math.abs(e.x-r.x)+10,u=Math.abs(e.y-r.y)+10,a=t.getOutlineStyle();return Object(tt.g)(Df,Mf({className:"lf-outline-edge",x:n,y:o,width:i,height:u},a))}},{key:"getPolylineOutline",value:function(t){var e=t.points,r=Gc(e),n=_c(r,8),o=n.x,i=n.y,u=n.width,a=n.height,c=t.getOutlineStyle();return Object(tt.g)(Df,Mf({className:"lf-outline",x:o,y:i,width:u,height:a},c))}},{key:"getBezierOutline",value:function(t){var e=t.path,r=Jc(e),n=_c(r,8),o=n.x,i=n.y,u=n.width,a=n.height,c=t.getOutlineStyle();return Object(tt.g)(Df,Mf({className:"lf-outline",x:o,y:i,width:u,height:a},c))}},{key:"render",value:function(){return Object(tt.g)("g",{className:"lf-outline"},this.getNodesOutline(),this.getEdgeOutline())}}])&&Lf(e.prototype,r),n&&Lf(e,n),i}(tt.a))||Ef;function Gf(t){return Gf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gf(t)}function Yf(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Vf(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Vf(t,e)}(t,e)||function(){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 Vf(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Wf(t){var e=t.x,r=void 0===e?0:e,n=t.y,o=void 0===n?0:n,i=t.r,u=void 0===i?4:i,a=t.className,c={cx:r,cy:o,r:u,fill:"transparent",fillOpacity:1,strokeWidth:"1",stroke:"#000",strokeOpacity:1};return Object.entries(t).forEach((function(t){var e=Yf(t,2),r=e[0],n=e[1];"object"!==Gf(n)&&(c[r]=n)})),c.className=a?"lf-basic-shape ".concat(a):"lf-basic-shape",Object(tt.g)("circle",c)}function Kf(t){return Kf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kf(t)}function $f(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Zf(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Zf(t,e)}(t,e)||function(){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 Zf(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function qf(){return qf=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},qf.apply(this,arguments)}function Jf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Qf(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function tp(t,e,r){return e&&Qf(t.prototype,e),r&&Qf(t,r),t}function ep(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&rp(t,e)}function rp(t,e){return rp=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},rp(t,e)}function np(t){var e=function(){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(t){return!1}}();return function(){var r,n=up(t);if(e){var o=up(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return op(this,r)}}function op(t,e){if(e&&("object"===Kf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return ip(t)}function ip(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function up(t){return up=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},up(t)}function ap(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var cp,sp=function(t){ep(r,t);var e=np(r);function r(){var t;return Jf(this,r),ap(ip(t=e.call(this)),"dragHandler",void 0),ap(ip(t),"onDragging",(function(e){var r=e.event,n=t.props,o=n.graphModel,i=n.bezierModel,u=n.type,a=o.getPointByClient({x:r.clientX,y:r.clientY}).canvasOverlayPosition,c=a.x,s=a.y;i.updateAdjustAnchor({x:c,y:s},u),o.eventCenter.emit(yo.EDGE_ADJUST,{data:i.getData()})})),ap(ip(t),"onDragEnd",(function(){t.props.bezierModel.isDragging=!1})),t.dragHandler=new cs({onDragging:t.onDragging,onDragEnd:t.onDragEnd}),t}return tp(r,[{key:"render",value:function(){var t=this,e=this.props.position,r=e.x,n=e.y,o=this.props.bezierModel.getEdgeStyle().adjustAnchor;return Object(tt.g)(Wf,qf({className:"lf-bezier-adjust-anchor",x:r,y:n},o,{onMouseDown:function(e){t.dragHandler.handleMouseDown(e)}}))}}]),r}(tt.a),lp=T_(Hf=function(t){ep(r,t);var e=np(r);function r(){return Jf(this,r),e.apply(this,arguments)}return tp(r,[{key:"getBezierAdjust",value:function(t,e){var r=t.path,n=t.id,o=$f(Jc(r),4),i=o[0],u=o[1],a=o[2],c=o[3],s=t.getEdgeStyle().adjustLine,l=[];return l.push(Object(tt.g)(df,qf({x1:i.x,y1:i.y,x2:u.x,y2:u.y},s))),l.push(Object(tt.g)(sp,{position:u,bezierModel:t,graphModel:e,key:"".concat(n,"_ePre"),type:"sNext"})),l.push(Object(tt.g)(df,qf({x1:c.x,y1:c.y,x2:a.x,y2:a.y},s))),l.push(Object(tt.g)(sp,{position:a,bezierModel:t,graphModel:e,key:"".concat(n,"_sNext"),type:"ePre"})),l}},{key:"selectedBezierEdge",value:function(){for(var t=this.props.graphModel,e=t.edges,r=[],n=0;n<e.length;n++){var o=e[n];o.isSelected&&o.modelType===po.BEZIER_EDGE&&o.draggable&&r.push(this.getBezierAdjust(o,t))}return r}},{key:"render",value:function(){return Object(tt.g)("g",{className:"lf-bezier-adjust"},this.selectedBezierEdge())}}]),r}(tt.a))||Hf;function fp(t){return fp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fp(t)}function pp(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function hp(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function dp(t,e){return dp=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},dp(t,e)}function yp(t){var e=function(){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(t){return!1}}();return function(){var r,n=gp(t);if(e){var o=gp(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return vp(this,r)}}function vp(t,e){if(e&&("object"===fp(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function gp(t){return gp=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},gp(t)}var bp,mp=T_(cp=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&dp(t,e)}(i,t);var e,r,n,o=yp(i);function i(){return pp(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"render",value:function(){var t=this.props.graphModel.transformModel.getTransformStyle().transform,e=this.props.children;return Object(tt.g)("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",className:"modification-overlay"},Object(tt.g)("g",{transform:t},e))}}])&&hp(e.prototype,r),n&&hp(e,n),i}(tt.a))||cp;function Op(t){return Op="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Op(t)}function _p(){return _p=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},_p.apply(this,arguments)}function wp(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function jp(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function xp(t,e){return xp=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},xp(t,e)}function Ep(t){var e=function(){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(t){return!1}}();return function(){var r,n=Pp(t);if(e){var o=Pp(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Sp(this,r)}}function Sp(t,e){if(e&&("object"===Op(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Pp(t){return Pp=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Pp(t)}var Ap=T_(bp=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&xp(t,e)}(i,t);var e,r,n,o=Ep(i);function i(){return wp(this,i),o.apply(this,arguments)}return e=i,r=[{key:"getComponent",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"canvas-overlay",n=this.props.getView,o=n(t.type);return Object(tt.g)(o,{key:t.id,model:t,graphModel:e,overlay:r})}},{key:"render",value:function(){var t=this,e=this.props,r=e.graphModel,n=e.tool,o=e.options,i=e.dnd,u=e.snaplineModel,a={};o.width&&(a.width="".concat(r.width,"px")),o.height&&(a.height="".concat(r.height,"px"));var c=o.grid,s=r.fakerNode,l=r.editConfigModel.adjustEdge;return Object(tt.g)("div",{className:"lf-graph","flow-id":r.flowId,style:a},Object(tt.g)(Rl,{graphModel:r,dnd:i},Object(tt.g)("g",{className:"lf-base"},dn(r.sortElements,(function(e){return t.getComponent(e,r)}))),s?this.getComponent(s,r):""),Object(tt.g)(mp,{graphModel:r},Object(tt.g)(Xf,{graphModel:r}),l?Object(tt.g)(lp,{graphModel:r}):"",!1!==o.snapline?Object(tt.g)(Sf,{snaplineModel:u}):""),Object(tt.g)(Xl,{graphModel:r,tool:n}),o.background&&Object(tt.g)(Jl,{background:o.background}),o.grid&&Object(tt.g)(sf,_p({},c,{graphModel:r})))}}],r&&jp(e.prototype,r),n&&jp(e,n),i}(tt.a))||bp,kp=Ap;function Dp(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Tp(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Dp(Object(r),!0).forEach((function(e){Np(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Dp(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Mp(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Np(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Cp=function(){function t(e){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Np(this,"nodeConfig",void 0),Np(this,"lf",void 0),Np(this,"fakerNode",void 0),Np(this,"stopDrag",(function(){r.nodeConfig=null,window.document.removeEventListener("mouseup",r.stopDrag)})),Np(this,"dragEnter",(function(t){r.nodeConfig&&!r.fakerNode&&(r.fakerNode=r.lf.createFakerNode(Tp(Tp({},r.nodeConfig),r.clientToLocalPoint({x:t.clientX,y:t.clientY}))))})),Np(this,"onDragOver",(function(t){if(t.preventDefault(),r.fakerNode){var e=r.clientToLocalPoint({x:t.clientX,y:t.clientY}),n=e.x,o=e.y;r.fakerNode.moveTo(n,o);var i=r.fakerNode.getData();r.lf.setNodeSnapLine(i),r.lf.graphModel.eventCenter.emit(yo.NODE_DND_DRAG,{data:i})}return!1})),Np(this,"onDragLeave",(function(){r.fakerNode&&(r.lf.removeNodeSnapLine(),r.lf.graphModel.removeFakerNode(),r.fakerNode=null)})),Np(this,"onDrop",(function(t){r.lf.graphModel&&t&&r.nodeConfig&&(r.lf.addNode(Tp(Tp({},r.nodeConfig),r.clientToLocalPoint({x:t.clientX,y:t.clientY})),yo.NODE_DND_ADD,t),t.preventDefault(),t.stopPropagation(),r.nodeConfig=null,r.lf.removeNodeSnapLine(),r.lf.graphModel.removeFakerNode(),r.fakerNode=null)}));var n=e.lf;this.lf=n}var e,r,n;return e=t,(r=[{key:"clientToLocalPoint",value:function(t){var e=t.x,r=t.y,n=tn(this.lf.options,["grid","size"]),o=this.lf.graphModel.getPointByClient({x:e,y:r}).canvasOverlayPosition,i=o.x,u=o.y;return{x:Ui(i,n),y:Ui(u,n)}}},{key:"startDrag",value:function(t){var e=this.lf.graphModel.editConfigModel;null!=e&&e.isSilentMode||(this.nodeConfig=t,window.document.addEventListener("mouseup",this.stopDrag))}},{key:"eventMap",value:function(){return{onMouseEnter:this.dragEnter,onMouseOver:this.dragEnter,onMouseMove:this.onDragOver,onMouseLeave:this.onDragLeave,onMouseUp:this.onDrop}}}])&&Mp(e.prototype,r),n&&Mp(e,n),t}();function Rp(t){var e=t.container,r=t.grid,n=t.width,o=t.height;if(!e)throw new Error("请检查 container 参数是否有效");if("string"==typeof n||"string"==typeof o)throw new Error("width或height不支持传入字符串,请传数字");return r&&(t.grid=Mn({size:20,type:"dot",visible:!0,config:{color:"#ababab",thickness:1}},r)),Mn({},zp,t)}var Ip,Lp,zp={background:!1,grid:!1,textEdit:!0,disabledTools:[]};function Bp(t){return Bp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bp(t)}function Up(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Fp(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Fp(t,e)}(t,e)||function(){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 Fp(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Hp(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Xp(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Hp(Object(r),!0).forEach((function(e){th(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Hp(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Gp(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function Yp(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Vp(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Wp(){return Wp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Kp(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Wp.apply(this,arguments)}function Kp(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Qp(t)););return t}function $p(t,e){return $p=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},$p(t,e)}function Zp(t){var e=function(){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(t){return!1}}();return function(){var r,n=Qp(t);if(e){var o=Qp(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return qp(this,r)}}function qp(t,e){if(e&&("object"===Bp(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Jp(t)}function Jp(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Qp(t){return Qp=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Qp(t)}function th(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function eh(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var rh=(Ip=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&$p(t,e)}(i,t);var e,r,n,o=Zp(i);function i(){var t;Yp(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return th(Jp(t=o.call.apply(o,[this].concat(r))),"modelType",po.BEZIER_EDGE),Gp(Jp(t),"path",Lp,Jp(t)),t}return e=i,(r=[{key:"initEdgeData",value:function(t){this.offset=100,Wp(Qp(i.prototype),"initEdgeData",this).call(this,t)}},{key:"getEdgeStyle",value:function(){var t=this.graphModel.theme.bezier;return Xp(Xp({},Wp(Qp(i.prototype),"getEdgeStyle",this).call(this)),wi(t))}},{key:"getTextPosition",value:function(){if(this.pointsList&&this.pointsList.length>0){var t=0,e=0;return this.pointsList.forEach((function(r){var n=r.x,o=r.y;t+=n,e+=o})),{x:t/this.pointsList.length,y:e/this.pointsList.length}}return{x:(this.startPoint.x+this.endPoint.x)/2,y:(this.startPoint.y+this.endPoint.y)/2}}},{key:"getData",value:function(){var t=Wp(Qp(i.prototype),"getData",this).call(this),e=this.pointsList.map((function(t){return{x:t.x,y:t.y}}));return Xp(Xp({},t),{},{pointsList:e})}},{key:"getControls",value:function(){var t=this.startPoint,e=this.endPoint;return qc({start:t,end:e,sourceNode:this.sourceNode,targetNode:this.targetNode,offset:this.offset})}},{key:"getPath",value:function(t){var e=Up(t,4),r=e[0],n=e[1],o=e[2],i=e[3];return"M ".concat(r.x," ").concat(r.y,"\n C ").concat(n.x," ").concat(n.y,",\n ").concat(o.x," ").concat(o.y,",\n ").concat(i.x," ").concat(i.y)}},{key:"initPoints",value:function(){this.pointsList.length>0?this.path=this.getPath(this.pointsList):this.updatePoints()}},{key:"updatePoints",value:function(){var t=this.getControls(),e=t.sNext,r=t.ePre;this.updatePath(e,r)}},{key:"updatePath",value:function(t,e){t=wi(t),e=wi(e);var r={x:this.startPoint.x,y:this.startPoint.y},n={x:this.endPoint.x,y:this.endPoint.y};if(!t||!e){var o=this.getControls();t=o.sNext,e=o.ePre}this.pointsList=[r,t,e,n],this.path=this.getPath(this.pointsList)}},{key:"updateStartPoint",value:function(t){this.startPoint=Object.assign({},t),this.updatePoints()}},{key:"updateEndPoint",value:function(t){this.endPoint=Object.assign({},t),this.updatePoints()}},{key:"moveStartPoint",value:function(t,e){this.startPoint.x+=t,this.startPoint.y+=e;var r=Up(this.pointsList,3),n=r[1],o=r[2];n.x+=t,n.y+=e,this.updatePath(n,o)}},{key:"moveEndPoint",value:function(t,e){this.endPoint.x+=t,this.endPoint.y+=e;var r=Up(this.pointsList,3),n=r[1],o=r[2];o.x+=t,o.y+=e,this.updatePath(n,o)}},{key:"updateAdjustAnchor",value:function(t,e){"sNext"===e?this.pointsList[1]=t:"ePre"===e&&(this.pointsList[2]=t),this.path=this.getPath(this.pointsList),this.setText(Object.assign({},this.text,this.textPosition))}},{key:"getAdjustStart",value:function(){return this.pointsList[0]||this.startPoint}},{key:"getAdjustEnd",value:function(){var t=this.pointsList;return t[t.length-1]||this.endPoint}},{key:"updateAfterAdjustStartAndEnd",value:function(t){var e=t.startPoint,r=t.endPoint,n=t.sourceNode,o=t.targetNode,i=qc({start:e,end:r,sourceNode:n,targetNode:o,offset:this.offset}),u=i.sNext,a=i.ePre;this.pointsList=[e,u,a,r],this.initPoints()}}])&&Vp(e.prototype,r),n&&Vp(e,n),i}(ba),Lp=eh(Ip.prototype,"path",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),eh(Ip.prototype,"initPoints",[o.k],Object.getOwnPropertyDescriptor(Ip.prototype,"initPoints"),Ip.prototype),eh(Ip.prototype,"updatePoints",[o.k],Object.getOwnPropertyDescriptor(Ip.prototype,"updatePoints"),Ip.prototype),eh(Ip.prototype,"updateStartPoint",[o.k],Object.getOwnPropertyDescriptor(Ip.prototype,"updateStartPoint"),Ip.prototype),eh(Ip.prototype,"updateEndPoint",[o.k],Object.getOwnPropertyDescriptor(Ip.prototype,"updateEndPoint"),Ip.prototype),eh(Ip.prototype,"moveStartPoint",[o.k],Object.getOwnPropertyDescriptor(Ip.prototype,"moveStartPoint"),Ip.prototype),eh(Ip.prototype,"moveEndPoint",[o.k],Object.getOwnPropertyDescriptor(Ip.prototype,"moveEndPoint"),Ip.prototype),eh(Ip.prototype,"updateAdjustAnchor",[o.k],Object.getOwnPropertyDescriptor(Ip.prototype,"updateAdjustAnchor"),Ip.prototype),eh(Ip.prototype,"getAdjustStart",[o.k],Object.getOwnPropertyDescriptor(Ip.prototype,"getAdjustStart"),Ip.prototype),eh(Ip.prototype,"getAdjustEnd",[o.k],Object.getOwnPropertyDescriptor(Ip.prototype,"getAdjustEnd"),Ip.prototype),eh(Ip.prototype,"updateAfterAdjustStartAndEnd",[o.k],Object.getOwnPropertyDescriptor(Ip.prototype,"updateAfterAdjustStartAndEnd"),Ip.prototype),Ip);var nh,oh,ih,uh,ah,ch,sh,lh,fh,ph,hh,dh,yh,vh,gh,bh,mh,Oh,_h,wh,jh,xh,Eh,Sh=function(t){return null==t};function Ph(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||kh(t,e)||function(){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 Ah(t){return Ah="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ah(t)}function kh(t,e){if(t){if("string"==typeof t)return Dh(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Dh(t,e):void 0}}function Dh(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Th(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Mh(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Th(Object(r),!0).forEach((function(e){Rh(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Th(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Nh(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function Ch(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Rh(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ih(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var Lh,zh,Bh=(nh=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Rh(this,"id",""),Nh(this,"type",oh,this),Nh(this,"x",ih,this),Nh(this,"y",uh,this),Nh(this,"text",ah,this),Nh(this,"properties",ch,this),Nh(this,"_width",sh,this),Nh(this,"_height",lh,this),Nh(this,"anchorsOffset",fh,this),Nh(this,"isSelected",ph,this),Nh(this,"isHovered",hh,this),Nh(this,"isShowAnchor",dh,this),Nh(this,"isDragging",yh,this),Nh(this,"isHitable",vh,this),Nh(this,"draggable",gh,this),Nh(this,"visible",bh,this),Nh(this,"enableRotate",mh,this),Rh(this,"virtual",!1),Rh(this,"graphModel",void 0),Nh(this,"zIndex",Oh,this),Nh(this,"state",_h,this),Nh(this,"autoToFront",wh,this),Nh(this,"style",jh,this),Nh(this,"transform",xh,this),Nh(this,"_rotate",Eh,this),Rh(this,"BaseType",ho.NODE),Rh(this,"modelType",po.NODE),Rh(this,"additionStateData",void 0),Rh(this,"targetRules",[]),Rh(this,"sourceRules",[]),Rh(this,"moveRules",[]),Rh(this,"hasSetTargetRules",!1),Rh(this,"hasSetSourceRules",!1),this.graphModel=r,this.initNodeData(e),this.setAttributes()}var e,r,n;return e=t,r=[{key:"width",get:function(){return this._width},set:function(t){this._width=t}},{key:"height",get:function(){return this._height},set:function(t){this._height=t}},{key:"rotate",get:function(){return this._rotate},set:function(t){this._rotate=t;var e=this.x,r=void 0===e?0:e,n=this.y,o=void 0===n?0:n;this.transform=new al(-r,-o).rotate(t).translate(r,o).toString()}},{key:"incoming",get:function(){return{nodes:this.graphModel.getNodeIncomingNode(this.id),edges:this.graphModel.getNodeIncomingEdge(this.id)}}},{key:"outgoing",get:function(){return{nodes:this.graphModel.getNodeOutgoingNode(this.id),edges:this.graphModel.getNodeOutgoingEdge(this.id)}}},{key:"initNodeData",value:function(t){if(t.properties||(t.properties={}),!t.id){var e=this.graphModel.idGenerator,r=e&&e(t.type),n=this.createId();t.id=n||r||gu()}this.formatText(t),Mn(this,function(t){return io(t,["id","type","x","y","text","properties","virtual","rotate"])}(t)),this.graphModel.overlapMode===Oo.INCREASE&&(this.zIndex=t.zIndex||la())}},{key:"setAttributes",value:function(){}},{key:"createId",value:function(){return null}},{key:"formatText",value:function(t){t.text||(t.text={value:"",x:t.x,y:t.y,draggable:!1,editable:!0}),t.text&&"string"==typeof t.text?t.text={value:t.text,x:t.x,y:t.y,draggable:!1,editable:!0}:t.text&&void 0===t.text.editable&&(t.text.editable=!0)}},{key:"getData",value:function(){var t=this.text,e=t.x,r=t.y,n=t.value,i=this.properties;Object(o.x)(i)&&(i=Object(o.I)(i));var u={id:this.id,type:this.type,x:this.x,y:this.y,properties:i};return this.rotate&&(u.rotate=this.rotate),this.graphModel.overlapMode===Oo.INCREASE&&(u.zIndex=this.zIndex),n&&(u.text={x:e,y:r,value:n}),u}},{key:"getHistoryData",value:function(){return this.getData()}},{key:"getProperties",value:function(){return Object(o.I)(this.properties)}},{key:"getOuterGAttributes",value:function(){return{className:""}}},{key:"getNodeStyle",value:function(){return Mh(Mh({},this.graphModel.theme.baseNode),this.style)}},{key:"getTextStyle",value:function(){var t=this.graphModel.theme.nodeText;return wi(t)}},{key:"getRotateControlStyle",value:function(){var t=this.graphModel.theme.rotateControl;return wi(t)}},{key:"getAnchorStyle",value:function(t){var e=this.graphModel.theme.anchor;return wi(e)}},{key:"getAnchorLineStyle",value:function(t){var e=this.graphModel.theme.anchorLine;return wi(e)}},{key:"getOutlineStyle",value:function(){var t=this.graphModel.theme.outline;return wi(t)}},{key:"isAllowConnectedAsSource",value:function(t,e,r,n){var o=this.hasSetSourceRules?this.sourceRules:this.getConnectedSourceRules();this.hasSetSourceRules=!0;for(var i,u=!0,a=0;a<o.length;a++){var c=o[a];if(!c.validate.call(this,this,t,e,r,n)){u=!1,i=c.message;break}}return{isAllPass:u,msg:i}}},{key:"getConnectedSourceRules",value:function(){return this.sourceRules}},{key:"isAllowConnectedAsTarget",value:function(t,e,r,n){var o=this.hasSetTargetRules?this.targetRules:this.getConnectedTargetRules();this.hasSetTargetRules=!0;for(var i,u=!0,a=0;a<o.length;a++){var c=o[a];if(!c.validate.call(this,t,this,e,r,n)){u=!1,i=c.message;break}}return{isAllPass:u,msg:i}}},{key:"isAllowMoveNode",value:function(t,e){var r,n=!0,o=!0,i=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=kh(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}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 i,u=!0,a=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return u=t.done,t},e:function(t){a=!0,i=t},f:function(){try{u||null==r.return||r.return()}finally{if(a)throw i}}}}(this.moveRules.concat(this.graphModel.nodeMoveRules));try{for(i.s();!(r=i.n()).done;){var u=(0,r.value)(this,t,e);if(!u)return!1;if("object"===Ah(u)){var a=u;if(!1===a.x&&!1===a.y)return!1;n=n&&a.x,o=o&&a.y}}}catch(t){i.e(t)}finally{i.f()}return{x:n,y:o}}},{key:"getConnectedTargetRules",value:function(){return this.targetRules}},{key:"getAnchorsByOffset",value:function(){var t=this.anchorsOffset,e=this.id,r=this.x,n=this.y;return t&&t.length>0?t.map((function(t,o){return t.length?(t=t,{id:"".concat(e,"_").concat(o),x:r+t[0],y:n+t[1]}):Mh(Mh({},t=t),{},{x:r+t.x,y:n+t.y,id:t.id||"".concat(e,"_").concat(o)})})):this.getDefaultAnchor()}},{key:"getDefaultAnchor",value:function(){return[]}},{key:"getTargetAnchor",value:function(t){return function(t,e){for(var r,n=Yu(e),o=Number.MAX_SAFE_INTEGER,i=0;i<n.length;i++){var u=Ku(t.x,t.y,n[i].x,n[i].y);u<o&&(o=u,r={index:i,anchor:wu(wu({},n[i]),{},{x:n[i].x,y:n[i].y,id:n[i].id})})}return r}(t,this)}},{key:"getBounds",value:function(){return{x1:this.x-this.width/2,y1:this.y-this.height/2,x2:this.x+this.width/2,y2:this.y+this.height/2}}},{key:"anchors",get:function(){var t=this.getAnchorsByOffset(),e=this.x,r=this.y,n=this.rotate;return t.forEach((function(t){var o=t.x,i=t.y,u=Ph(new ol([o,i,1]).translate(-e,-r).rotate(n).translate(e,r)[0],2),a=u[0],c=u[1];t.x=a,t.y=c})),t}},{key:"getAnchorInfo",value:function(t){if(!Sh(t))for(var e=0;e<this.anchors.length;e++){var r=this.anchors[e];if(r.id===t)return r}}},{key:"addNodeMoveRules",value:function(t){this.moveRules.includes(t)||this.moveRules.push(t)}},{key:"move",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=!1,o=!1;if(r)n=!0,o=!0;else{var i=this.isAllowMoveNode(t,e);"boolean"==typeof i?(n=i,o=i):(n=i.x,o=i.y)}if(n){var u=this.x+t;this.x=u,this.text&&this.moveText(t,0)}if(o){var a=this.y+e;this.y=a,this.text&&this.moveText(0,e)}return n||o}},{key:"getMoveDistance",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=!1,o=!1,i=0,u=0;if(r)n=!0,o=!0;else{var a=this.isAllowMoveNode(t,e);"boolean"==typeof a?(n=a,o=a):(n=a.x,o=a.y)}if(n&&t){var c=this.x+t;this.x=c,this.text&&this.moveText(t,0),i=t}if(o&&e){var s=this.y+e;this.y=s,this.text&&this.moveText(0,e),u=e}return[i,u]}},{key:"moveTo",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=t-this.x,o=e-this.y;return!(!r&&!this.isAllowMoveNode(n,o)||(this.text&&this.text&&this.moveText(n,o),this.x=t,this.y=e,0))}},{key:"moveText",value:function(t,e){var r=this.text,n=r.x,o=r.y,i=r.value,u=r.draggable,a=r.editable;this.text={value:i,editable:a,draggable:u,x:n+t,y:o+e}}},{key:"updateText",value:function(t){this.text=Mh(Mh({},Object(o.I)(this.text)),{},{value:t})}},{key:"setSelected",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isSelected=t}},{key:"setHovered",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isHovered=t,this.setIsShowAnchor(t)}},{key:"setIsShowAnchor",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isShowAnchor=t}},{key:"setEnableRotate",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.enableRotate=t}},{key:"setHitable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isHitable=t}},{key:"setElementState",value:function(t,e){this.state=t,this.additionStateData=e}},{key:"setProperty",value:function(t,e){this.properties=Mh(Mh({},Object(o.I)(this.properties)),{},Rh({},t,aa(e))),this.setAttributes()}},{key:"setProperties",value:function(t){this.properties=Mh(Mh({},Object(o.I)(this.properties)),aa(t)),this.setAttributes()}},{key:"deleteProperty",value:function(t){delete this.properties[t],this.setAttributes()}},{key:"setStyle",value:function(t,e){this.style=Mh(Mh({},this.style),{},Rh({},t,aa(e)))}},{key:"setStyles",value:function(t){this.style=Mh(Mh({},this.style),aa(t))}},{key:"updateStyles",value:function(t){this.style=Mh({},aa(t))}},{key:"setZIndex",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.zIndex=t}},{key:"updateAttributes",value:function(t){Mn(this,t)}}],r&&Ch(e.prototype,r),n&&Ch(e,n),t}(),oh=Ih(nh.prototype,"type",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),ih=Ih(nh.prototype,"x",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),uh=Ih(nh.prototype,"y",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),ah=Ih(nh.prototype,"text",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{value:"",x:0,y:0,draggable:!1,editable:!0}}}),ch=Ih(nh.prototype,"properties",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),sh=Ih(nh.prototype,"_width",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 100}}),lh=Ih(nh.prototype,"_height",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 80}}),fh=Ih(nh.prototype,"anchorsOffset",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),ph=Ih(nh.prototype,"isSelected",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),hh=Ih(nh.prototype,"isHovered",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),dh=Ih(nh.prototype,"isShowAnchor",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),yh=Ih(nh.prototype,"isDragging",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),vh=Ih(nh.prototype,"isHitable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),gh=Ih(nh.prototype,"draggable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),bh=Ih(nh.prototype,"visible",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),mh=Ih(nh.prototype,"enableRotate",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Oh=Ih(nh.prototype,"zIndex",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),_h=Ih(nh.prototype,"state",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),wh=Ih(nh.prototype,"autoToFront",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),jh=Ih(nh.prototype,"style",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),xh=Ih(nh.prototype,"transform",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Eh=Ih(nh.prototype,"_rotate",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Ih(nh.prototype,"incoming",[o.m],Object.getOwnPropertyDescriptor(nh.prototype,"incoming"),nh.prototype),Ih(nh.prototype,"outgoing",[o.m],Object.getOwnPropertyDescriptor(nh.prototype,"outgoing"),nh.prototype),Ih(nh.prototype,"addNodeMoveRules",[o.k],Object.getOwnPropertyDescriptor(nh.prototype,"addNodeMoveRules"),nh.prototype),Ih(nh.prototype,"move",[o.k],Object.getOwnPropertyDescriptor(nh.prototype,"move"),nh.prototype),Ih(nh.prototype,"getMoveDistance",[o.k],Object.getOwnPropertyDescriptor(nh.prototype,"getMoveDistance"),nh.prototype),Ih(nh.prototype,"moveTo",[o.k],Object.getOwnPropertyDescriptor(nh.prototype,"moveTo"),nh.prototype),Ih(nh.prototype,"moveText",[o.k],Object.getOwnPropertyDescriptor(nh.prototype,"moveText"),nh.prototype),Ih(nh.prototype,"updateText",[o.k],Object.getOwnPropertyDescriptor(nh.prototype,"updateText"),nh.prototype),Ih(nh.prototype,"setSelected",[o.k],Object.getOwnPropertyDescriptor(nh.prototype,"setSelected"),nh.prototype),Ih(nh.prototype,"setHovered",[o.k],Object.getOwnPropertyDescriptor(nh.prototype,"setHovered"),nh.prototype),Ih(nh.prototype,"setIsShowAnchor",[o.k],Object.getOwnPropertyDescriptor(nh.prototype,"setIsShowAnchor"),nh.prototype),Ih(nh.prototype,"setEnableRotate",[o.k],Object.getOwnPropertyDescriptor(nh.prototype,"setEnableRotate"),nh.prototype),Ih(nh.prototype,"setHitable",[o.k],Object.getOwnPropertyDescriptor(nh.prototype,"setHitable"),nh.prototype),Ih(nh.prototype,"setElementState",[o.k],Object.getOwnPropertyDescriptor(nh.prototype,"setElementState"),nh.prototype),Ih(nh.prototype,"setProperty",[o.k],Object.getOwnPropertyDescriptor(nh.prototype,"setProperty"),nh.prototype),Ih(nh.prototype,"setProperties",[o.k],Object.getOwnPropertyDescriptor(nh.prototype,"setProperties"),nh.prototype),Ih(nh.prototype,"deleteProperty",[o.k],Object.getOwnPropertyDescriptor(nh.prototype,"deleteProperty"),nh.prototype),Ih(nh.prototype,"setStyle",[o.k],Object.getOwnPropertyDescriptor(nh.prototype,"setStyle"),nh.prototype),Ih(nh.prototype,"setStyles",[o.k],Object.getOwnPropertyDescriptor(nh.prototype,"setStyles"),nh.prototype),Ih(nh.prototype,"updateStyles",[o.k],Object.getOwnPropertyDescriptor(nh.prototype,"updateStyles"),nh.prototype),Ih(nh.prototype,"setZIndex",[o.k],Object.getOwnPropertyDescriptor(nh.prototype,"setZIndex"),nh.prototype),Ih(nh.prototype,"updateAttributes",[o.k],Object.getOwnPropertyDescriptor(nh.prototype,"updateAttributes"),nh.prototype),nh);function Uh(t){return Uh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Uh(t)}function Fh(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Hh(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Fh(Object(r),!0).forEach((function(e){Qh(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Fh(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Xh(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function Gh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Yh(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Vh(){return Vh="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Wh(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Vh.apply(this,arguments)}function Wh(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Jh(t)););return t}function Kh(t,e){return Kh=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Kh(t,e)}function $h(t){var e=function(){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(t){return!1}}();return function(){var r,n=Jh(t);if(e){var o=Jh(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Zh(this,r)}}function Zh(t,e){if(e&&("object"===Uh(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return qh(t)}function qh(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Jh(t){return Jh=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Jh(t)}function Qh(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function td(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var ed,rd,nd,od=(Lh=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Kh(t,e)}(i,t);var e,r,n,o=$h(i);function i(){var t;Gh(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Qh(qh(t=o.call.apply(o,[this].concat(r))),"modelType",po.CIRCLE_NODE),Xh(qh(t),"r",zh,qh(t)),t}return e=i,(r=[{key:"width",get:function(){return 2*this.r}},{key:"height",get:function(){return 2*this.r}},{key:"getNodeStyle",value:function(){var t=Vh(Jh(i.prototype),"getNodeStyle",this).call(this),e=this.graphModel.theme.circle;return Hh(Hh({},t),wi(e))}},{key:"getDefaultAnchor",value:function(){var t=this.x,e=this.y,r=this.r;return[{x:t,y:e-r,id:"".concat(this.id,"_0")},{x:t+r,y:e,id:"".concat(this.id,"_1")},{x:t,y:e+r,id:"".concat(this.id,"_2")},{x:t-r,y:e,id:"".concat(this.id,"_3")}]}}])&&Yh(e.prototype,r),n&&Yh(e,n),i}(Bh),zh=td(Lh.prototype,"r",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 50}}),td(Lh.prototype,"width",[o.m],Object.getOwnPropertyDescriptor(Lh.prototype,"width"),Lh.prototype),td(Lh.prototype,"height",[o.m],Object.getOwnPropertyDescriptor(Lh.prototype,"height"),Lh.prototype),Lh);r(129);function id(t){return id="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},id(t)}function ud(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return ad(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ad(t,e)}(t,e)||function(){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 ad(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function cd(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function sd(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?cd(Object(r),!0).forEach((function(e){Od(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):cd(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ld(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function fd(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function pd(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function hd(){return hd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=dd(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},hd.apply(this,arguments)}function dd(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=md(t)););return t}function yd(t,e){return yd=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},yd(t,e)}function vd(t){var e=function(){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(t){return!1}}();return function(){var r,n=md(t);if(e){var o=md(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return gd(this,r)}}function gd(t,e){if(e&&("object"===id(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return bd(t)}function bd(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function md(t){return md=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},md(t)}function Od(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _d(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var wd,jd,xd,Ed=(ed=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&yd(t,e)}(i,t);var e,r,n,o=vd(i);function i(){var t;fd(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Od(bd(t=o.call.apply(o,[this].concat(r))),"modelType",po.DIAMOND_NODE),ld(bd(t),"rx",rd,bd(t)),ld(bd(t),"ry",nd,bd(t)),t}return e=i,(r=[{key:"getNodeStyle",value:function(){var t=hd(md(i.prototype),"getNodeStyle",this).call(this),e=this.graphModel.theme.diamond;return sd(sd({},t),wi(e))}},{key:"points",get:function(){var t=this.x,e=this.y,r=this.rx,n=this.ry;return[[t,e-n],[t+r,e],[t,e+n],[t-r,e]]}},{key:"pointsPosition",get:function(){return this.points.map((function(t){return{x:t[0],y:t[1]}}))}},{key:"width",get:function(){var t=Number.MAX_SAFE_INTEGER,e=Number.MIN_SAFE_INTEGER;return this.points.forEach((function(r){var n=ud(r,1)[0];n<t&&(t=n),n>e&&(e=n)})),e-t}},{key:"height",get:function(){var t=Number.MAX_SAFE_INTEGER,e=Number.MIN_SAFE_INTEGER;return this.points.forEach((function(r){var n=ud(r,2)[1];n<t&&(t=n),n>e&&(e=n)})),e-t}},{key:"getDefaultAnchor",value:function(){var t=this;return this.points.map((function(e,r){var n=ud(e,2);return{x:n[0],y:n[1],id:"".concat(t.id,"_").concat(r)}}))}}])&&pd(e.prototype,r),n&&pd(e,n),i}(Bh),rd=_d(ed.prototype,"rx",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 30}}),nd=_d(ed.prototype,"ry",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 50}}),_d(ed.prototype,"points",[o.m],Object.getOwnPropertyDescriptor(ed.prototype,"points"),ed.prototype),_d(ed.prototype,"pointsPosition",[o.m],Object.getOwnPropertyDescriptor(ed.prototype,"pointsPosition"),ed.prototype),_d(ed.prototype,"width",[o.m],Object.getOwnPropertyDescriptor(ed.prototype,"width"),ed.prototype),_d(ed.prototype,"height",[o.m],Object.getOwnPropertyDescriptor(ed.prototype,"height"),ed.prototype),ed);function Sd(t){return Sd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sd(t)}function Pd(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Ad(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Pd(Object(r),!0).forEach((function(e){Bd(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Pd(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function kd(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function Dd(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Td(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Md(){return Md="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Nd(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Md.apply(this,arguments)}function Nd(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=zd(t)););return t}function Cd(t,e){return Cd=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Cd(t,e)}function Rd(t){var e=function(){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(t){return!1}}();return function(){var r,n=zd(t);if(e){var o=zd(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Id(this,r)}}function Id(t,e){if(e&&("object"===Sd(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Ld(t)}function Ld(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function zd(t){return zd=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},zd(t)}function Bd(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ud(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var Fd,Hd,Xd=(wd=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Cd(t,e)}(i,t);var e,r,n,o=Rd(i);function i(){var t;Dd(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Bd(Ld(t=o.call.apply(o,[this].concat(r))),"modelType",po.ELLIPSE_NODE),kd(Ld(t),"rx",jd,Ld(t)),kd(Ld(t),"ry",xd,Ld(t)),t}return e=i,(r=[{key:"getNodeStyle",value:function(){var t=Md(zd(i.prototype),"getNodeStyle",this).call(this),e=this.graphModel.theme.ellipse;return Ad(Ad({},t),wi(e))}},{key:"width",get:function(){return 2*this.rx}},{key:"height",get:function(){return 2*this.ry}},{key:"getDefaultAnchor",value:function(){var t=this.x,e=this.y,r=this.rx,n=this.ry;return[{x:t,y:e-n,id:"".concat(this.id,"_0")},{x:t+r,y:e,id:"".concat(this.id,"_1")},{x:t,y:e+n,id:"".concat(this.id,"_2")},{x:t-r,y:e,id:"".concat(this.id,"_3")}]}}])&&Td(e.prototype,r),n&&Td(e,n),i}(Bh),jd=Ud(wd.prototype,"rx",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 30}}),xd=Ud(wd.prototype,"ry",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 45}}),Ud(wd.prototype,"width",[o.m],Object.getOwnPropertyDescriptor(wd.prototype,"width"),wd.prototype),Ud(wd.prototype,"height",[o.m],Object.getOwnPropertyDescriptor(wd.prototype,"height"),wd.prototype),wd);function Gd(t){return Gd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gd(t)}function Yd(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Vd(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Vd(t,e)}(t,e)||function(){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 Vd(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Wd(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Kd(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Wd(Object(r),!0).forEach((function(e){iy(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Wd(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function $d(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function Zd(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function qd(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Jd(){return Jd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Qd(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Jd.apply(this,arguments)}function Qd(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=oy(t)););return t}function ty(t,e){return ty=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},ty(t,e)}function ey(t){var e=function(){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(t){return!1}}();return function(){var r,n=oy(t);if(e){var o=oy(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ry(this,r)}}function ry(t,e){if(e&&("object"===Gd(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return ny(t)}function ny(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function oy(t){return oy=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},oy(t)}function iy(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function uy(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var ay,cy,sy=(Fd=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&ty(t,e)}(i,t);var e,r,n,o=ey(i);function i(){var t;Zd(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return iy(ny(t=o.call.apply(o,[this].concat(r))),"modelType",po.POLYGON_NODE),$d(ny(t),"points",Hd,ny(t)),t}return e=i,(r=[{key:"getNodeStyle",value:function(){var t=Jd(oy(i.prototype),"getNodeStyle",this).call(this),e=this.graphModel.theme.polygon;return Kd(Kd({},t),wi(e))}},{key:"pointsPosition",get:function(){var t=this.x,e=this.y,r=this.width,n=this.height;return this.points.map((function(o){return{x:o[0]+t-r/2,y:o[1]+e-n/2}}))}},{key:"width",get:function(){var t=Number.MAX_SAFE_INTEGER,e=Number.MIN_SAFE_INTEGER;return this.points.forEach((function(r){var n=Yd(r,1)[0];n<t&&(t=n),n>e&&(e=n)})),e-t}},{key:"height",get:function(){var t=Number.MAX_SAFE_INTEGER,e=Number.MIN_SAFE_INTEGER;return this.points.forEach((function(r){var n=Yd(r,2)[1];n<t&&(t=n),n>e&&(e=n)})),e-t}},{key:"getDefaultAnchor",value:function(){var t=this,e=this.x,r=this.y,n=this.width,o=this.height;return this.points.map((function(i,u){var a=Yd(i,2),c=a[0],s=a[1];return{x:e+c-n/2,y:r+s-o/2,id:"".concat(t.id,"_").concat(u)}}))}}])&&qd(e.prototype,r),n&&qd(e,n),i}(Bh),Hd=uy(Fd.prototype,"points",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[[50,0],[100,50],[50,100],[0,50]]}}),uy(Fd.prototype,"pointsPosition",[o.m],Object.getOwnPropertyDescriptor(Fd.prototype,"pointsPosition"),Fd.prototype),uy(Fd.prototype,"width",[o.m],Object.getOwnPropertyDescriptor(Fd.prototype,"width"),Fd.prototype),uy(Fd.prototype,"height",[o.m],Object.getOwnPropertyDescriptor(Fd.prototype,"height"),Fd.prototype),Fd);function ly(t){return ly="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ly(t)}function fy(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function py(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?fy(Object(r),!0).forEach((function(e){jy(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):fy(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function hy(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function dy(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function yy(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function vy(){return vy="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=gy(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},vy.apply(this,arguments)}function gy(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=wy(t)););return t}function by(t,e){return by=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},by(t,e)}function my(t){var e=function(){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(t){return!1}}();return function(){var r,n=wy(t);if(e){var o=wy(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Oy(this,r)}}function Oy(t,e){if(e&&("object"===ly(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _y(t)}function _y(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function wy(t){return wy=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},wy(t)}function jy(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var xy,Ey=(ay=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&by(t,e)}(i,t);var e,r,n,o=my(i);function i(){var t;dy(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return jy(_y(t=o.call.apply(o,[this].concat(r))),"modelType",po.RECT_NODE),hy(_y(t),"radius",cy,_y(t)),t}return e=i,(r=[{key:"getDefaultAnchor",value:function(){var t=this.x,e=this.y,r=this.width,n=this.height;return[{x:t,y:e-n/2,id:"".concat(this.id,"_0")},{x:t+r/2,y:e,id:"".concat(this.id,"_1")},{x:t,y:e+n/2,id:"".concat(this.id,"_2")},{x:t-r/2,y:e,id:"".concat(this.id,"_3")}]}},{key:"getNodeStyle",value:function(){var t=vy(wy(i.prototype),"getNodeStyle",this).call(this),e=this.graphModel.theme.rect;return py(py({},t),wi(e))}}])&&yy(e.prototype,r),n&&yy(e,n),i}(Bh),cy=function(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}(ay.prototype,"radius",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),ay);function Sy(t){return Sy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sy(t)}function Py(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Ay(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Py(Object(r),!0).forEach((function(e){zy(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Py(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ky(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Dy(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ty(){return Ty="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=My(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Ty.apply(this,arguments)}function My(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ly(t)););return t}function Ny(t,e){return Ny=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Ny(t,e)}function Cy(t){var e=function(){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(t){return!1}}();return function(){var r,n=Ly(t);if(e){var o=Ly(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ry(this,r)}}function Ry(t,e){if(e&&("object"===Sy(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Iy(t)}function Iy(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ly(t){return Ly=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ly(t)}function zy(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function By(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var Uy=(xy=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ny(t,e)}(i,t);var e,r,n,o=Cy(i);function i(){var t;ky(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return zy(Iy(t=o.call.apply(o,[this].concat(r))),"modelType",po.TEXT_NODE),t}return e=i,(r=[{key:"getTextStyle",value:function(){var t=Ty(Ly(i.prototype),"getTextStyle",this).call(this),e=this.graphModel.theme.text;return Ay(Ay({},t),wi(e))}},{key:"width",get:function(){var t=String(this.text.value).split(/[\r\n]/g),e=this.getTextStyle().fontSize;return ia({rows:t,fontSize:e,rowsLength:t.length}).width}},{key:"height",get:function(){var t=String(this.text.value).split(/[\r\n]/g),e=this.getTextStyle().fontSize;return ia({rows:t,fontSize:e,rowsLength:t.length}).height}}])&&Dy(e.prototype,r),n&&Dy(e,n),i}(Bh),By(xy.prototype,"width",[o.m],Object.getOwnPropertyDescriptor(xy.prototype,"width"),xy.prototype),By(xy.prototype,"height",[o.m],Object.getOwnPropertyDescriptor(xy.prototype,"height"),xy.prototype),xy);function Fy(t){return Fy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fy(t)}function Hy(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Xy(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Gy(t,e){return Gy=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Gy(t,e)}function Yy(t){var e=function(){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(t){return!1}}();return function(){var r,n=Ky(t);if(e){var o=Ky(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Vy(this,r)}}function Vy(t,e){if(e&&("object"===Fy(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Wy(t)}function Wy(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ky(t){return Ky=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ky(t)}function $y(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Zy,qy,Jy,Qy,tv=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Gy(t,e)}(i,t);var e,r,n,o=Yy(i);function i(){var t;Hy(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return $y(Wy(t=o.call.apply(o,[this].concat(r))),"modelType",po.HTML_NODE),t}return e=i,(r=[{key:"getDefaultAnchor",value:function(){var t=this.x,e=this.y,r=this.width,n=this.height;return[{x:t,y:e-n/2,id:"".concat(this.id,"_0")},{x:t+r/2,y:e,id:"".concat(this.id,"_1")},{x:t,y:e+n/2,id:"".concat(this.id,"_2")},{x:t-r/2,y:e,id:"".concat(this.id,"_3")}]}}])&&Xy(e.prototype,r),n&&Xy(e,n),i}(Bh);function ev(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function rv(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function nv(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ov(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function iv(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var uv=(Zy=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),ov(this,"graphModel",void 0),rv(this,"isShowHorizontal",qy,this),rv(this,"isShowVertical",Jy,this),rv(this,"position",Qy,this),this.isShowHorizontal=!1,this.isShowVertical=!1,this.position={x:0,y:0},this.graphModel=e}var e,r,n;return e=t,r=[{key:"getStyle",value:function(){return function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ev(Object(r),!0).forEach((function(e){ov(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ev(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},this.graphModel.theme.snapline)}},{key:"getCenterSnapLine",value:function(t,e){for(var r=t.x,n=t.y,o=!1,i=!1,u=0;u<e.length;u++){var a=e[u];if(a.id!==t.id&&(r===a.x&&(o=!0),n===a.y&&(i=!0),o&&i))break}return{isShowVertical:o,isShowHorizontal:i,position:{x:r,y:n}}}},{key:"getHorizontalSnapline",value:function(t,e){var r,n,o=!1,i=t.id;if(i){var u=this.graphModel.fakerNode;if(u&&u.id===i)n=qu(u);else{var a=this.graphModel.getNodeModelById(i);n=qu(a)}}for(var c=0;c<e.length;c++){var s=e[c];if(s.id!==t.id){var l=qu(s);if(l.minY===n.minY||l.maxY===n.minY){o=!0,r=n.minY;break}if(l.minY===n.maxY||l.maxY===n.maxY){o=!0,r=n.maxY;break}}}return Mn({isShowHorizontal:o,position:{y:r}})}},{key:"getVerticalSnapline",value:function(t,e){var r,n,o=!1,i=t.id;if(i){var u=this.graphModel.fakerNode;if(u&&u.id===i)n=qu(u);else{var a=this.graphModel.getNodeModelById(i);n=qu(a)}}for(var c=0;c<e.length;c++){var s=e[c];if(s.id!==t.id){var l=qu(s);if(l.minX===n.minX||l.maxX===n.minX){o=!0,r=n.minX;break}if(l.minX===n.maxX||l.maxX===n.maxX){o=!0,r=n.maxX;break}}}return Mn({isShowVertical:o,position:{x:r}})}},{key:"getSnapLinePosition",value:function(t,e){var r=this.getCenterSnapLine(t,e),n=r.isShowHorizontal,o=r.isShowVertical;if(!n){var i=this.getHorizontalSnapline(t,e);i.isShowHorizontal&&(r.isShowHorizontal=i.isShowHorizontal,r.position.y=i.position.y)}if(!o){var u=this.getVerticalSnapline(t,e);u.isShowVertical&&(r.isShowVertical=u.isShowVertical,r.position.x=u.position.x)}return r}},{key:"setSnaplineInfo",value:function(t){var e=t.isShowHorizontal,r=t.isShowVertical,n=t.position;this.position=n,this.isShowHorizontal=e,this.isShowVertical=r}},{key:"clearSnapline",value:function(){this.position={x:0,y:0},this.isShowHorizontal=!1,this.isShowVertical=!1}},{key:"setNodeSnapLine",value:function(t){var e=this.graphModel.nodes,r=this.getSnapLinePosition(t,e);this.setSnaplineInfo(r)}}],r&&nv(e.prototype,r),n&&nv(e,n),t}(),qy=iv(Zy.prototype,"isShowHorizontal",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Jy=iv(Zy.prototype,"isShowVertical",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Qy=iv(Zy.prototype,"position",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),iv(Zy.prototype,"clearSnapline",[o.k],Object.getOwnPropertyDescriptor(Zy.prototype,"clearSnapline"),Zy.prototype),iv(Zy.prototype,"setNodeSnapLine",[o.k],Object.getOwnPropertyDescriptor(Zy.prototype,"setNodeSnapLine"),Zy.prototype),Zy),av=new Map,cv=function(t){var e=gu();var r=window.requestAnimationFrame((function r(){if(t(),av.get(e)){var n=window.requestAnimationFrame(r);av.set(e,n)}}));return av.set(e,r),e},sv=function(t){var e=av.get(t);e&&(window.cancelAnimationFrame(e),av.delete(t))};function lv(t){return lv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lv(t)}function fv(){return fv=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},fv.apply(this,arguments)}function pv(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function hv(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?pv(Object(r),!0).forEach((function(e){wv(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):pv(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function dv(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return yv(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return yv(t,e)}(t,e)||function(){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 yv(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function vv(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function gv(t,e){return gv=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},gv(t,e)}function bv(t){var e=function(){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(t){return!1}}();return function(){var r,n=_v(t);if(e){var o=_v(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return mv(this,r)}}function mv(t,e){if(e&&("object"===lv(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Ov(t)}function Ov(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _v(t){return _v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},_v(t)}function wv(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var jv=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&gv(t,e)}(i,t);var e,r,n,o=bv(i);function i(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),wv(Ov(t=o.call(this)),"preTargetNode",void 0),wv(Ov(t),"sourceRuleResults",void 0),wv(Ov(t),"targetRuleResults",void 0),wv(Ov(t),"dragHandler",void 0),wv(Ov(t),"t",void 0),wv(Ov(t),"onDragStart",(function(e){var r=e.event,n=t.props,o=n.anchorData,i=n.nodeModel,u=n.graphModel;u.overlapMode;u.selectNodeById(i.id),i.autoToFront&&u.toFront(i.id),u.eventCenter.emit(yo.ANCHOR_DRAGSTART,{data:o,e:r,nodeModel:i}),t.setState({startX:o.x,startY:o.y,endX:o.x,endY:o.y})})),wv(Ov(t),"onDragging",(function(e){var r=e.event,n=t.props,o=n.graphModel,i=n.nodeModel,u=n.anchorData,a=o.transformModel,c=o.eventCenter,s=o.width,l=o.height,f=o.editConfigModel,p=f.autoExpand,h=f.stopMoveGraph,d=r.clientX,y=r.clientY,v=o.getPointByClient({x:d,y:y}),g=v.domOverlayPosition,b=g.x,m=g.y,O=v.canvasOverlayPosition,_=O.x,w=O.y;t.t&&sv(t.t);var j=[];b<10?j=[10,0]:b+10>s?j=[-10,0]:m<10?j=[0,10]:m+10>l&&(j=[0,-10]),t.setState({endX:_,endY:w,dragging:!0}),t.moveAnchorEnd(_,w),j.length>0&&!h&&p&&(t.t=cv((function(){var e=dv(j,2),r=e[0],n=e[1];a.translate(r,n);var o=t.state,i=o.endX,u=o.endY;t.setState({endX:i-r,endY:u-n}),t.moveAnchorEnd(i-r,u-n)}))),c.emit(yo.ANCHOR_DRAG,{data:u,e:r,nodeModel:i})})),wv(Ov(t),"onDragEnd",(function(e){var r=e.event;t.t&&sv(t.t);var n=t.checkEnd(r);t.setState({startX:0,startY:0,endX:0,endY:0,dragging:!1}),t.sourceRuleResults.clear(),t.targetRuleResults.clear();var o=t.props,i=o.graphModel,u=o.nodeModel,a=o.anchorData;i.eventCenter.emit(yo.ANCHOR_DRAGEND,{data:a,e:r,nodeModel:u,edgeModel:n})})),wv(Ov(t),"checkEnd",(function(e){var r=t.props,n=r.graphModel,o=r.nodeModel,i=r.anchorData,u=i.x,a=i.y,c=i.id,s=(n.edgeType,t.state),l=s.endX,f=s.endY,p=s.dragging,h=Vu({x:l,y:f},n);if(t.preTargetNode&&t.preTargetNode.state!==lo.DEFAULT&&t.preTargetNode.setElementState(lo.DEFAULT),p&&h&&h.node){var d=h.node,y=h.anchor.id,v="".concat(o.id,"_").concat(d.id,"_").concat(y,"_").concat(c),g=t.sourceRuleResults.get(v)||{},b=g.isAllPass,m=g.msg,O=t.targetRuleResults.get(v)||{},_=O.isAllPass,w=O.msg;if(b&&_){d.setElementState(lo.DEFAULT);var j=n.edgeGenerator(o.getData(),n.getNodeModelById(h.node.id).getData()),x=n.addEdge(hv(hv({},j),{},{sourceNodeId:o.id,sourceAnchorId:c,startPoint:{x:u,y:a},targetNodeId:h.node.id,targetAnchorId:h.anchor.id,endPoint:{x:h.anchor.x,y:h.anchor.y}})),E=t.props.anchorData;return n.eventCenter.emit(yo.ANCHOR_DROP,{data:E,e:e,nodeModel:o,edgeModel:x}),x}var S=d.getData();return n.eventCenter.emit(yo.CONNECTION_NOT_ALLOWED,{data:S,msg:w||m}),null}})),t.sourceRuleResults=new Map,t.targetRuleResults=new Map,t.state={startX:0,startY:0,endX:0,endY:0,dragging:!1},t.dragHandler=new cs({onDragStart:t.onDragStart,onDragging:t.onDragging,onDragEnd:t.onDragEnd}),t}return e=i,(r=[{key:"getAnchorShape",value:function(){var t=this.props,e=t.anchorData,r=t.style,n=t.node.getAnchorShape(e);if(n)return n;var o=e.x,i=e.y,u=hv(hv({},r),r.hover);return Object(tt.g)("g",null,Object(tt.g)(Wf,fv({className:"lf-node-anchor-hover"},u,{x:o,y:i})),Object(tt.g)(Wf,fv({className:"lf-node-anchor"},r,{x:o,y:i})))}},{key:"customTrajectory",get:function(){return this.props.graphModel.customTrajectory}},{key:"relateEdges",get:function(){var t=this.props,e=t.graphModel,r=e.getAnchorIncomingEdge,n=e.getAnchorOutcomingEdge,o=t.anchorData.id;return{incomingEdgeList:r(o),outcomingEdgeList:n(o)}}},{key:"moveAnchorEnd",value:function(t,e){var r=this.props,n=r.graphModel,o=r.nodeModel,i=r.anchorData,u=Vu({x:t,y:e},n);if(u){var a=u.node,c=u.anchor.id;if(this.preTargetNode&&this.preTargetNode!==u.node&&this.preTargetNode.setElementState(lo.DEFAULT),i.id===c)return;this.preTargetNode=a;var s="".concat(o.id,"_").concat(a.id,"_").concat(c,"_").concat(i.id);if(!this.targetRuleResults.has(s)){var l=u.anchor,f=o.isAllowConnectedAsSource(a,i,l),p=a.isAllowConnectedAsTarget(o,i,l);this.sourceRuleResults.set(s,ua(f)),this.targetRuleResults.set(s,ua(p))}var h=this.sourceRuleResults.get(s).isAllPass,d=this.targetRuleResults.get(s).isAllPass;h&&d?a.setElementState(lo.ALLOW_CONNECT):a.setElementState(lo.NOT_ALLOW_CONNECT)}else this.preTargetNode&&this.preTargetNode.state!==lo.DEFAULT&&this.preTargetNode.setElementState(lo.DEFAULT)}},{key:"isShowLine",value:function(){var t=this.state,e=t.startX,r=t.startY,n=t.endX,o=t.endY;return Ku(e,r,n,o)>10}},{key:"render",value:function(){var t=this,e=this.state,r=e.startX,n=e.startY,o=e.endX,i=e.endY,u=this.props,a=u.anchorData.edgeAddable,c=u.edgeStyle;return Object(tt.g)("g",{className:"lf-anchor"},Object(tt.g)("g",{onMouseDown:function(e){!1!==a&&t.dragHandler.handleMouseDown(e)}},this.getAnchorShape()),this.isShowLine()&&(this.customTrajectory?this.customTrajectory(hv({sourcePoint:{x:r,y:n},targetPoint:{x:o,y:i}},c)):Object(tt.g)(df,fv({x1:r,y1:n,x2:o,y2:i},c,{"pointer-events":"none"}))))}}])&&vv(e.prototype,r),n&&vv(e,n),i}(tt.a);function xv(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Ev(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?xv(Object(r),!0).forEach((function(e){Sv(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):xv(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Sv(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Pv(t){return Pv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pv(t)}function Av(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return kv(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return kv(t,e)}(t,e)||function(){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 kv(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Dv(t){var e=t.x,r=void 0===e?0:e,n=t.y,o=void 0===n?0:n,i=t.value,u=t.fontSize,a=t.fill,c=void 0===a?"currentColor":a,s=t.overflowMode,l=void 0===s?"default":s,f=t.textWidth,p=void 0===f?"":f,h=t.model,d={textAnchor:"middle","dominant-baseline":"middle",x:r,y:o,fill:c};if(Object.entries(t).forEach((function(t){var e=Av(t,2),r=e[0],n=e[1];"object"!==Pv(n)&&(d[r]=n)})),i){var y=String(i).split(/[\r\n]/g),v=y.length;if("default"!==l){var g=h.BaseType,b=h.modelType;if(g===ho.NODE&&b!==po.TEXT_NODE||g===ho.EDGE&&p)return function(t){var e=t.value,r=t.fontSize,n=t.model,o=t.fontFamily,i=void 0===o?"":o,u=t.lineHeight,a=t.wrapPadding,c=void 0===a?"0, 0":a,s=t.overflowMode,l=t.x,f=t.y,p=n.width,h=n.textHeight,d=t.textWidth||p,y=String(e).split(/[\r\n]/g),v=y.length,g=oa({rows:y,style:{fontSize:"".concat(r,"px"),width:"".concat(d,"px"),fontFamily:i,lineHeight:u,padding:c},rowsLength:v,className:"lf-get-text-height"}),b=n.height>g?n.height:g;h&&(b=h);var m="ellipsis"===s;m&&(b=r+2);return Object(tt.g)("g",null,Object(tt.g)("foreignObject",{width:d,height:b,x:l-d/2,y:f-b/2},Object(tt.g)("div",{className:"lf-node-text-auto-wrap",style:{minHeight:b,width:d,padding:c}},Object(tt.g)("div",{className:m?"lf-node-text-ellipsis-content":"lf-node-text-auto-wrap-content",title:m?y.join(""):"",style:Ev({},t)},y.map((function(t){return Object(tt.g)("div",{className:"lf-node-text--auto-wrap-inner"},t)}))))))}(t)}if(v>1){var m=y.map((function(t,e){var n=(e-(v-1)/2)*(u+2);return Object(tt.g)("tspan",{className:"lf-text-tspan",x:r,y:o+n},t)}));return Object(tt.g)("text",d,m)}return Object(tt.g)("text",d,i)}}function Tv(t){return Tv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tv(t)}function Mv(){return Mv=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Mv.apply(this,arguments)}function Nv(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Cv(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Cv(t,e)}(t,e)||function(){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 Cv(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Rv(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Iv(t,e){return Iv=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Iv(t,e)}function Lv(t){var e=function(){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(t){return!1}}();return function(){var r,n=Uv(t);if(e){var o=Uv(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return zv(this,r)}}function zv(t,e){if(e&&("object"===Tv(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Bv(t)}function Bv(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Uv(t){return Uv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Uv(t)}function Fv(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Hv=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Iv(t,e)}(i,t);var e,r,n,o=Lv(i);function i(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),Fv(Bv(e=o.call(this)),"dragHandler",void 0),Fv(Bv(e),"sumDeltaX",0),Fv(Bv(e),"sumDeltaY",0),Fv(Bv(e),"stepDrag",void 0),Fv(Bv(e),"onDragging",(function(t){var r=t.deltaX,n=t.deltaY,o=e.props,i=o.model,u=Nv(o.graphModel.transformModel.fixDeltaXY(r,n),2),a=u[0],c=u[1];i.moveText(a,c)})),Fv(Bv(e),"dblClickHandler",(function(){e.props.editable&&e.props.model.setElementState(lo.TEXT_EDIT)})),Fv(Bv(e),"mouseDownHandle",(function(t){var r=e.props,n=r.draggable,o=r.model,i=r.graphModel.editConfigModel.nodeTextDraggable;(n||i)&&(e.stepDrag.model=o,e.stepDrag.handleMouseDown(t))}));t.model;var r=t.draggable;return e.stepDrag=new cs({onDragging:e.onDragging,step:1,isStopPropagation:r}),e}return e=i,(r=[{key:"getShape",value:function(){var t=this.props,e=t.model,r=t.graphModel,n=e.text,o=r.editConfigModel,i=n.value,u=n.x,a=n.y,c=n.editable,s=n.draggable,l={x:u,y:a,className:"",value:i};c?l.className="lf-element-text":s||o.nodeTextDraggable?l.className="lf-text-draggable":l.className="lf-text-disabled";var f=e.getTextStyle();return Object(tt.g)(Dv,Mv({},l,f,{model:e}))}},{key:"render",value:function(){if(this.props.model.text)return Object(tt.g)("g",{onMouseDown:this.mouseDownHandle,onDblClick:this.dblClickHandler},this.getShape())}}])&&Rv(e.prototype,r),n&&Rv(e,n),i}(tt.a),Xv=null!==window.navigator.userAgent.match(/MSIE|Trident/),Gv=r(130);function Yv(t){return Yv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yv(t)}function Vv(){return Vv=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Vv.apply(this,arguments)}function Wv(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Kv(t,e){return Kv=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Kv(t,e)}function $v(t){var e=function(){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(t){return!1}}();return function(){var r,n=Jv(t);if(e){var o=Jv(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Zv(this,r)}}function Zv(t,e){if(e&&("object"===Yv(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return qv(t)}function qv(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Jv(t){return Jv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Jv(t)}function Qv(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var tg=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Kv(t,e)}(i,t);var e,r,n,o=$v(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),Qv(qv(e=o.call(this,t)),"style",{}),Qv(qv(e),"defaultAngle",void 0),Qv(qv(e),"normal",void 0),Qv(qv(e),"stepperDrag",void 0),Qv(qv(e),"onDragging",(function(t){var r,n=t.event,o=e.props,i=o.graphModel,u=o.nodeModel,a=o.eventCenter,c=i.selectNodes,s=u.x,l=u.y,f=n.clientX,p=n.clientY,h=i.getPointByClient({x:f,y:p}).canvasOverlayPosition,d=h.x,y=h.y,v=new Es(d-s,y-l),g=(null===(r=e.normal)||void 0===r?void 0:r.angle(v))-e.defaultAngle,b=new al(-s,-l).rotate(g).translate(s,l).toString();u.transform=b,u.rotate=g;var m=Object(Gv.map)(c,(function(t){return t.id}));-1===m.indexOf(u.id)&&(m=[u.id]);var O=Object(Gv.reduce)(m,(function(t,e){var r=i.getNodeModelById(e);return t[e]=null==r?void 0:r.getMoveDistance(0,0,!1),t}),{});m.forEach((function(t){i.getNodeEdges(t).forEach((function(t){if(O[t.sourceNodeId]){var e=i.getNodeModelById(t.sourceNodeId).anchors.find((function(e){return e.id===t.sourceAnchorId}));t.updateStartPoint(e)}if(O[t.targetNodeId]){var r=i.getNodeModelById(t.targetNodeId).anchors.find((function(e){return e.id===t.targetAnchorId}));t.updateEndPoint(r)}}))})),a.emit(yo.NODE_ROTATE,{e:n,nodeModel:u})})),e.style=t.style,e.stepperDrag=new cs({onDragging:e.onDragging}),e}return e=i,(r=[{key:"render",value:function(){var t=this,e=this.props.nodeModel,r=e.x,n=e.y,o=r+e.width/2+20,i=n-e.height/2-20;return this.normal=new Es(1,0),this.defaultAngle=this.normal.angle(new Es(o-r,i-n)),e.defaultAngle=this.defaultAngle,Object(tt.g)("g",{className:"lf-rotate-control"},Object(tt.g)("g",{onMouseDown:function(e){t.stepperDrag.handleMouseDown(e)}},Object(tt.g)(Wf,Vv({},this.style,{cx:o,cy:i}))))}}])&&Wv(e.prototype,r),n&&Wv(e,n),i}(tt.a);function eg(t){return eg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},eg(t)}var rg=["className"];function ng(){return ng=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},ng.apply(this,arguments)}function og(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function ig(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return ug(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ug(t,e)}(t,e)||function(){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 ug(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ag(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function cg(t,e){return cg=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},cg(t,e)}function sg(t){var e=function(){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(t){return!1}}();return function(){var r,n=pg(t);if(e){var o=pg(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return lg(this,r)}}function lg(t,e){if(e&&("object"===eg(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return fg(t)}function fg(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function pg(t){return pg=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},pg(t)}function hg(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var dg=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&cg(t,e)}(u,t);var e,r,n,i=sg(u);function u(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),hg(fg(e=i.call(this)),"t",void 0),hg(fg(e),"moveOffset",void 0),hg(fg(e),"stepDrag",void 0),hg(fg(e),"contextMenuTime",void 0),hg(fg(e),"mouseUpDrag",void 0),hg(fg(e),"startTime",void 0),hg(fg(e),"clickTimer",void 0),hg(fg(e),"modelDisposer",void 0),hg(fg(e),"onDragStart",(function(t){var r=t.event,n=r.clientX,o=r.clientY,i=e.props,u=i.model,a=i.graphModel.getPointByClient({x:n,y:o}).canvasOverlayPosition,c=a.x,s=a.y;e.moveOffset={x:u.x-c,y:u.y-s}})),hg(fg(e),"onDragging",(function(t){var r=t.event,n=e.props,o=n.model,i=n.graphModel,u=i.editConfigModel,a=u.stopMoveGraph,c=u.autoExpand,s=i.transformModel,l=i.selectNodes,f=i.width,p=i.height,h=i.gridSize;o.isDragging=!0;var d=r.clientX,y=r.clientY,v=i.getPointByClient({x:d,y:y}).canvasOverlayPosition,g=v.x,b=v.y,m=ig(s.CanvasPointToHtmlPoint([g,b]),2),O=m[0],_=m[1];if(g+=e.moveOffset.x,b+=e.moveOffset.y,g=Ui(g,h),b=Ui(b,h),f&&p){if(!c||a||!(O<0||_<0||O>f||_>p)){var w=ig(s.CanvasPointToHtmlPoint([g-o.width/2,b-o.height/2]),2),j=w[0],x=w[1],E=ig(s.CanvasPointToHtmlPoint([g+o.width/2,b+o.height/2]),2),S=E[0],P=E[1],A=Math.max(h,20),k=[];j<0?k=[A,0]:S>i.width?k=[-A,0]:x<0?k=[0,A]:P>i.height&&(k=[0,-A]),e.t&&sv(e.t);var D=new al(-g,-b).rotate(o.rotate).translate(g,b).toString();o.transform=D;var T=l.map((function(t){return t.id}));-1===T.indexOf(o.id)&&(T=[o.id]),k.length>0&&!a&&c?e.t=cv((function(){var t=ig(k,2),e=t[0],r=t[1];s.translate(e,r);var n=-e/s.SCALE_X,o=-r/s.SCALE_X;i.moveNodes(T,n,o)})):i.moveNodes(T,g-o.x,b-o.y)}}else i.moveNode2Coordinate(o.id,g,b)})),hg(fg(e),"onDragEnd",(function(){e.t&&sv(e.t),e.props.model.isDragging=!1})),hg(fg(e),"handleMouseUp",(function(){var t=e.props.model;e.mouseUpDrag=t.isDragging})),hg(fg(e),"handleClick",(function(t){var r=!1===e.mouseUpDrag;if(e.startTime){var n=e.props,o=n.model,i=n.graphModel;if(r){var u={data:o.getData(),e:t,position:i.getPointByClient({x:t.clientX,y:t.clientY}),isSelected:!1,isMultiple:!1},a=2===t.button,c=2===t.detail;if(!a){var s=i.editConfigModel,l=Yi(t,s);u.isMultiple=l,o.isSelected&&!c&&l?(u.isSelected=!1,o.setSelected(!1)):(i.selectNodeById(o.id,l),u.isSelected=!0,e.toFront()),c?(s.nodeTextEdit&&o.text.editable&&(o.setSelected(!1),i.setElementStateById(o.id,lo.TEXT_EDIT)),i.eventCenter.emit(yo.NODE_DBCLICK,u)):(i.eventCenter.emit(yo.ELEMENT_CLICK,u),i.eventCenter.emit(yo.NODE_CLICK,u))}}}})),hg(fg(e),"handleContextMenu",(function(t){t.preventDefault();var r=e.props,n=r.model,o=r.graphModel,i=n.getData(),u=o.getPointByClient({x:t.clientX,y:t.clientY});o.setElementStateById(n.id,lo.SHOW_MENU,u.domOverlayPosition),n.isSelected||o.selectNodeById(n.id),o.eventCenter.emit(yo.NODE_CONTEXTMENU,{data:i,e:t,position:u}),e.toFront()})),hg(fg(e),"handleMouseDown",(function(t){var r=e.props,n=r.model,o=r.graphModel;e.startTime=(new Date).getTime(),o.editConfigModel.adjustNodePosition&&n.draggable&&e.stepDrag&&e.stepDrag.handleMouseDown(t)})),hg(fg(e),"setHoverON",(function(t){var r=e.props,n=r.model,o=r.graphModel;if(!n.isHovered){var i=n.getData();n.setHovered(!0),o.eventCenter.emit(yo.NODE_MOUSEENTER,{data:i,e:t})}})),hg(fg(e),"setHoverOFF",(function(t){var r=e.props,n=r.model,o=r.graphModel,i=n.getData();n.isHovered&&(n.setHovered(!1),o.eventCenter.emit(yo.NODE_MOUSELEAVE,{data:i,e:t}))})),hg(fg(e),"onMouseOut",(function(t){Xv&&e.setHoverOFF(t)}));var r=t.graphModel,n=r.gridSize,a=r.eventCenter,c=t.model;return e.stepDrag=new cs({onDragStart:e.onDragStart,onDragging:e.onDragging,onDragEnd:e.onDragEnd,step:n,eventType:"NODE",isStopPropagation:!1,eventCenter:a,model:c}),e.modelDisposer=Object(o.F)((function(){return e.props}),(function(t){t&&t.model&&e.stepDrag.setModel(t.model)})),e}return e=u,n=[{key:"getModel",value:function(t){return t}}],(r=[{key:"componentWillUnmount",value:function(){this.modelDisposer&&this.modelDisposer()}},{key:"getAnchorShape",value:function(t){return null}},{key:"getAnchors",value:function(){var t=this,e=this.props,r=e.model,n=e.graphModel,o=r.isSelected,i=r.isHitable,u=r.isDragging,a=r.isShowAnchor;return i&&(o||a)&&!u?dn(r.anchors,(function(e,o){var i=r.getAnchorLineStyle(e),u=r.getAnchorStyle(e);return Object(tt.g)(jv,{anchorData:e,node:t,style:u,edgeStyle:i,anchorIndex:o,nodeModel:r,graphModel:n,setHoverOFF:t.setHoverOFF})})):[]}},{key:"getRotateControl",value:function(){var t=this.props,e=t.model,r=t.graphModel,n=e.isSelected,o=e.isHitable,i=e.enableRotate,u=e.isHovered,a=e.getRotateControlStyle().style;if(o&&(n||u)&&i)return Object(tt.g)(tg,{graphModel:r,nodeModel:e,eventCenter:r.eventCenter,style:a})}},{key:"getText",value:function(){var t=this.props,e=t.model,r=t.graphModel;if(e.state===lo.TEXT_EDIT)return"";if(e.text){var n=r.editConfigModel,o=!1;return(e.text.draggable||n.nodeTextDraggable)&&(o=!0),Object(tt.g)(Hv,{editable:n.nodeTextEdit&&e.text.editable,model:e,graphModel:r,draggable:o})}}},{key:"getStateClassName",value:function(){var t=this.props.model,e=t.state,r=t.isDragging,n=t.isSelected,o="lf-node";switch(e){case lo.ALLOW_CONNECT:o+=" lf-node-allow";break;case lo.NOT_ALLOW_CONNECT:o+=" lf-node-not-allow";break;default:o+=" lf-node-default"}return r&&(o+=" lf-isDragging"),n&&(o+=" lf-node-selected"),o}},{key:"toFront",value:function(){var t=this.props,e=t.model,r=t.graphModel;e.autoToFront&&r.toFront(e.id)}},{key:"render",value:function(){var t,e=this.props,r=e.model,n=e.graphModel,o=n.editConfigModel,i=o.hideAnchors,u=o.adjustNodePosition,a=o.allowRotation,c=n.gridSize,s=n.transformModel.SCALE_X,l=r.isHitable,f=r.draggable,p=r.transform,h=r.getOuterGAttributes(),d=h.className,y=void 0===d?"":d,v=og(h,rg),g=Object(tt.g)("g",{className:"lf-node-content"},Object(tt.g)("g",{transform:p},this.getShape(),this.getText(),a&&this.getRotateControl()),!i&&this.getAnchors());return l?(u&&f&&this.stepDrag.setStep(c*s),t=Object(tt.g)("g",ng({className:"".concat(this.getStateClassName()," ").concat(y),onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onClick:this.handleClick,onMouseEnter:this.setHoverON,onMouseOver:this.setHoverON,onMouseLeave:this.setHoverOFF,onMouseOut:this.onMouseOut,onContextMenu:this.handleContextMenu},v),g)):t=Object(tt.g)("g",ng({className:"".concat(this.getStateClassName()," ").concat(y)},v),g),t}}])&&ag(e.prototype,r),n&&ag(e,n),u}(tt.a);function yg(t){return yg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yg(t)}function vg(){return vg=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},vg.apply(this,arguments)}function gg(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function bg(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function mg(t,e){return mg=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},mg(t,e)}function Og(t){var e=function(){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(t){return!1}}();return function(){var r,n=wg(t);if(e){var o=wg(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return _g(this,r)}}function _g(t,e){if(e&&("object"===yg(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function wg(t){return wg=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},wg(t)}var jg=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&mg(t,e)}(i,t);var e,r,n,o=Og(i);function i(){return gg(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getShape",value:function(){var t=this.props.model,e=t.getNodeStyle();return Object(tt.g)(Df,vg({},e,{x:t.x,y:t.y,width:t.width,height:t.height,radius:t.radius}))}}])&&bg(e.prototype,r),n&&bg(e,n),i}(dg);function xg(t){return xg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xg(t)}function Eg(){return Eg=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Eg.apply(this,arguments)}function Sg(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Pg(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ag(t,e){return Ag=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Ag(t,e)}function kg(t){var e=function(){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(t){return!1}}();return function(){var r,n=Tg(t);if(e){var o=Tg(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Dg(this,r)}}function Dg(t,e){if(e&&("object"===xg(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Tg(t){return Tg=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Tg(t)}var Mg=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ag(t,e)}(i,t);var e,r,n,o=kg(i);function i(){return Sg(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getShape",value:function(){var t=this.props.model,e=t.x,r=t.y,n=t.r,o=t.getNodeStyle();return Object(tt.g)(Wf,Eg({},o,{x:e,y:r,r:n}))}}])&&Pg(e.prototype,r),n&&Pg(e,n),i}(dg);function Ng(t){return Ng="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ng(t)}function Cg(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Rg(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Rg(t,e)}(t,e)||function(){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 Rg(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Ig(t){var e=t.points,r=t.className,n={fill:"transparent",fillOpacity:1,strokeWidth:1,stroke:"#000",strokeOpacity:1,points:""};return Object.entries(t).forEach((function(t){var e=Cg(t,2),r=e[0],o=e[1];"object"!==Ng(o)&&(n[r]=o)})),n.className=r?"lf-basic-shape ".concat(r):"lf-basic-shape",n.points=e.map((function(t){return t.join(",")})).join(" "),Object(tt.g)("polygon",n)}function Lg(t){return Lg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lg(t)}function zg(){return zg=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},zg.apply(this,arguments)}function Bg(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ug(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Fg(t,e){return Fg=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Fg(t,e)}function Hg(t){var e=function(){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(t){return!1}}();return function(){var r,n=Gg(t);if(e){var o=Gg(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Xg(this,r)}}function Xg(t,e){if(e&&("object"===Lg(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Gg(t){return Gg=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Gg(t)}var Yg=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Fg(t,e)}(i,t);var e,r,n,o=Hg(i);function i(){return Bg(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getShape",value:function(){var t=this.props.model,e=t.x,r=t.y,n=t.width,o=t.height,i=t.points,u=t.getNodeStyle(),a={transform:"matrix(1 0 0 1 ".concat(e-n/2," ").concat(r-o/2,")")};return Object(tt.g)("g",a,Object(tt.g)(Ig,zg({},u,{points:i,x:e,y:r})))}}])&&Ug(e.prototype,r),n&&Ug(e,n),i}(dg);function Vg(t){return Vg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vg(t)}function Wg(){return Wg=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Wg.apply(this,arguments)}function Kg(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function $g(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Zg(t,e){return Zg=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Zg(t,e)}function qg(t){var e=function(){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(t){return!1}}();return function(){var r,n=Qg(t);if(e){var o=Qg(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Jg(this,r)}}function Jg(t,e){if(e&&("object"===Vg(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Qg(t){return Qg=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Qg(t)}var tb=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Zg(t,e)}(i,t);var e,r,n,o=qg(i);function i(){return Kg(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getShape",value:function(){var t=this.props.model,e=t.getNodeStyle();return Object(tt.g)("g",null,Object(tt.g)(Ig,Wg({},e,{points:t.points,x:t.x,y:t.y})))}}])&&$g(e.prototype,r),n&&$g(e,n),i}(dg);function eb(t){return eb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},eb(t)}function rb(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return nb(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return nb(t,e)}(t,e)||function(){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 nb(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ob(t){var e=t.x,r=void 0===e?0:e,n=t.y,o=void 0===n?0:n,i=t.rx,u=void 0===i?4:i,a=t.ry,c=void 0===a?4:a,s=t.className,l={cx:r,cy:o,rx:u,ry:c,fill:"transparent",fillOpacity:1,strokeWidth:"1",stroke:"#000",strokeOpacity:1};return Object.entries(t).forEach((function(t){var e=rb(t,2),r=e[0],n=e[1];"object"!==eb(n)&&(l[r]=n)})),l.className=s?"lf-basic-shape ".concat(s):"lf-basic-shape",Object(tt.g)("ellipse",l)}function ib(t){return ib="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ib(t)}function ub(){return ub=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},ub.apply(this,arguments)}function ab(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function cb(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function sb(t,e){return sb=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},sb(t,e)}function lb(t){var e=function(){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(t){return!1}}();return function(){var r,n=pb(t);if(e){var o=pb(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return fb(this,r)}}function fb(t,e){if(e&&("object"===ib(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function pb(t){return pb=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},pb(t)}var hb=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&sb(t,e)}(i,t);var e,r,n,o=lb(i);function i(){return ab(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getShape",value:function(){var t=this.props.model,e=t.getNodeStyle();return Object(tt.g)(ob,ub({},e,{x:t.x,y:t.y,rx:t.rx,ry:t.ry}))}}])&&cb(e.prototype,r),n&&cb(e,n),i}(dg);function db(t){return db="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},db(t)}function yb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function vb(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?yb(Object(r),!0).forEach((function(e){gb(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):yb(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function gb(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function bb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function mb(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ob(t,e){return Ob=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Ob(t,e)}function _b(t){var e=function(){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(t){return!1}}();return function(){var r,n=jb(t);if(e){var o=jb(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return wb(this,r)}}function wb(t,e){if(e&&("object"===db(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function jb(t){return jb=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},jb(t)}var xb=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ob(t,e)}(i,t);var e,r,n,o=_b(i);function i(){return bb(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getBackground",value:function(){var t=this.props.model,e=t.getTextStyle(),r=t.width,n=t.height,o=t.x,i=t.y,u=vb(vb({},e.background),{},{x:o,y:i-1,width:r,height:n});return Object(tt.g)(Df,u)}},{key:"getShape",value:function(){return Object(tt.g)("g",null,this.getBackground())}}])&&mb(e.prototype,r),n&&mb(e,n),i}(dg);function Eb(t){return Eb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Eb(t)}function Sb(){return Sb=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Sb.apply(this,arguments)}function Pb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ab(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function kb(t,e){return kb=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},kb(t,e)}function Db(t){var e=function(){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(t){return!1}}();return function(){var r,n=Nb(t);if(e){var o=Nb(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Tb(this,r)}}function Tb(t,e){if(e&&("object"===Eb(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Mb(t)}function Mb(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Nb(t){return Nb=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Nb(t)}function Cb(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Rb=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&kb(t,e)}(i,t);var e,r,n,o=Db(i);function i(){var t;Pb(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Cb(Mb(t=o.call.apply(o,[this].concat(r))),"ref",void 0),Cb(Mb(t),"currentProperties",void 0),Cb(Mb(t),"preProperties",void 0),Cb(Mb(t),"setRef",(function(e){t.ref=e})),t}return e=i,(r=[{key:"rootEl",get:function(){return this.ref}},{key:"setHtml",value:function(t){t.appendChild(document.createElement("div"))}},{key:"shouldUpdate",value:function(){if(!this.preProperties||this.preProperties!==this.currentProperties)return this.preProperties=this.currentProperties,!0}},{key:"componentDidMount",value:function(){this.shouldUpdate()&&this.setHtml(this.rootEl)}},{key:"componentDidUpdate",value:function(){this.shouldUpdate()&&this.setHtml(this.rootEl)}},{key:"getShape",value:function(){var t=this.props.model,e=t.x,r=t.y,n=t.height,o=t.width,i=t.getNodeStyle();return this.currentProperties=JSON.stringify(t.properties),Object(tt.g)("foreignObject",Sb({},i,{x:e-o/2,y:r-n/2,width:o,height:n,ref:this.setRef}))}}])&&Ab(e.prototype,r),n&&Ab(e,n),i}(dg);function Ib(t){return Ib="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ib(t)}function Lb(){return Lb=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Lb.apply(this,arguments)}function zb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Bb(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?zb(Object(r),!0).forEach((function(e){Vb(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):zb(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Ub(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Fb(t,e){return Fb=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Fb(t,e)}function Hb(t){var e=function(){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(t){return!1}}();return function(){var r,n=Yb(t);if(e){var o=Yb(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Xb(this,r)}}function Xb(t,e){if(e&&("object"===Ib(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Gb(t)}function Gb(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Yb(t){return Yb=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Yb(t)}function Vb(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Wb=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Fb(t,e)}(i,t);var e,r,n,o=Hb(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),Vb(Gb(e=o.call(this,t)),"setHoverON",(function(){e.setState({isHovered:!0})})),Vb(Gb(e),"setHoverOFF",(function(){e.setState({isHovered:!1})})),e.state={isHovered:!1},e}return e=i,(r=[{key:"getBackground",value:function(){var t=this.props.model,e=t.getTextStyle(),r=t.text,n=t.width,o=e.background||{};if(this.state.isHovered&&e.hover&&e.hover.background&&(o=Bb(Bb({},o),e.hover.background)),r&&r.value&&"transparent"!==o.fill){var i,u=e.fontSize,a=e.overflowMode,c=e.lineHeight,s=e.wrapPadding,l=e.textWidth,f=r.value,p=r.x,h=r.y,d=String(f).split(/[\r\n]/g),y=d.length;if("autoWrap"===a&&l){var v=oa({rows:d,style:{fontSize:"".concat(u,"px"),width:"".concat(l,"px"),lineHeight:c,padding:s},rowsLength:y,className:"lf-get-text-height"});i=Bb(Bb({},o),{},{x:p-1,y:h-1,width:l,height:v})}else{var g=0;d&&d.forEach((function(t){var e=Wc(t);g=e>g?e:g}));var b=ia({rows:d,fontSize:u,rowsLength:y}),m=b.width,O=b.height;if("ellipsis"===a&&(m=l||n,O=u+2),"string"==typeof o.wrapPadding){var _=o.wrapPadding.split(",").filter((function(t){return t.trim()})).map((function(t){return parseFloat(t.trim())}));_.length>0&&_.length<=4&&(1===_.length?_=[_[0],_[0],_[0],_[0]]:2===_.length?_=[_[0],_[1],_[0],_[1]]:3===_.length&&(_=[_[0],_[1],_[2],_[1]]),m+=_[1]+_[3],O+=_[0]+_[2],p+=(_[1]-_[3])/2,h+=(_[2]-_[0])/2)}i=Bb(Bb({},o),{},{x:p-1,y:h-1,width:m,height:O})}return Object(tt.g)(Df,i)}}},{key:"getShape",value:function(){var t=this.props.model,e=t.text,r=e.value,n=e.x,o=e.y;if(r){var i=Bb({x:n,y:o,className:"lf-element-text",value:r},t.getTextStyle());return Object(tt.g)("g",{className:"lf-line-text",onMouseEnter:this.setHoverON,onMouseLeave:this.setHoverOFF},this.getBackground(),Object(tt.g)(Dv,Lb({},i,{model:t})))}}}])&&Ub(e.prototype,r),n&&Ub(e,n),i}(Hv);function Kb(t){return Kb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kb(t)}var $b,Zb=["text","sourceAnchorId","targetAnchorId"];function qb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Jb(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?qb(Object(r),!0).forEach((function(e){cm(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):qb(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Qb(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function tm(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return em(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return em(t,e)}(t,e)||function(){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 em(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function rm(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function nm(t,e){return nm=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},nm(t,e)}function om(t){var e=function(){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(t){return!1}}();return function(){var r,n=am(t);if(e){var o=am(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return im(this,r)}}function im(t,e){if(e&&("object"===Kb(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return um(t)}function um(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function am(t){return am=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},am(t)}function cm(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}!function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"}($b||($b={}));var sm=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&nm(t,e)}(i,t);var e,r,n,o=om(i);function i(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),cm(um(e=o.call(this)),"stepDragData",void 0),cm(um(e),"stepDrag",void 0),cm(um(e),"oldEdge",void 0),cm(um(e),"preTargetNode",void 0),cm(um(e),"targetRuleResults",void 0),cm(um(e),"sourceRuleResults",void 0),cm(um(e),"handleMouseDown",(function(t){e.stepDrag&&e.stepDrag.handleMouseDown(t)})),cm(um(e),"onDragStart",(function(){var t=e.props,r=t.x,n=t.y,o=t.edgeModel,i=o.startPoint,u=o.endPoint,a=o.pointsList;e.oldEdge={startPoint:i,endPoint:u,pointsList:a},e.setState({endX:r,endY:n,dragging:!0})})),cm(um(e),"onDragging",(function(t){var r=t.deltaX,n=t.deltaY,o=e.state,i=o.endX,u=o.endY,a=e.props,c=a.graphModel,s=a.type,l=c.transformModel,f=c.editConfigModel,p=tm(l.moveCanvasPointByHtml([i,u],r,n),2),h=p[0],d=p[1];e.setState({endX:h,endY:d,dragging:!0});var y=e.props.edgeModel,v=Vu({x:i,y:u},c);if(v&&v.node&&e.isAllowAdjust(v).pass){var g,b=y.startPoint,m=y.endPoint,O=y.sourceNode,_=y.targetNode;s===$b.SOURCE?g={startPoint:{x:v.anchor.x,y:v.anchor.y},endPoint:{x:m.x,y:m.y},sourceNode:v.node,targetNode:_}:s===$b.TARGET&&(g={startPoint:{x:b.x,y:b.y},endPoint:{x:v.anchor.x,y:v.anchor.y},sourceNode:O,targetNode:v.node}),y.updateAfterAdjustStartAndEnd(g)}else s===$b.SOURCE?y.updateStartPoint({x:h,y:d}):s===$b.TARGET&&y.updateEndPoint({x:h,y:d});y.text.value&&f.adjustEdge&&y.setText(Object.assign({},y.text,y.textPosition))})),cm(um(e),"onDragEnd",(function(t){var r=t.event;try{var n;e.setState({dragging:!1});var o=e.props,i=o.graphModel,u=o.edgeModel,a=o.type,c=e.state,s=c.endX,l=c.endY,f=c.dragging,p=Vu({x:s,y:l},i);if(!f)return;var h,d=!1;if(p&&p.node){var y=e.isAllowAdjust(p),v=y.pass,g=y.msg,b=y.newTargetNode;if(v){var m=u.getData(),O=m.text,_=m.sourceAnchorId,w=void 0===_?"":_,j=m.targetAnchorId;if(h=Jb(Jb({sourceAnchorId:w,targetAnchorId:void 0===j?"":j},Qb(m,Zb)),{},{text:(null==O?void 0:O.value)||""}),a===$b.SOURCE)h=Jb(Jb({},i.edgeGenerator(i.getNodeModelById(p.node.id).getData(),i.getNodeModelById(u.targetNodeId).getData(),h)),{},{sourceNodeId:p.node.id,sourceAnchorId:p.anchor.id,startPoint:{x:p.anchor.x,y:p.anchor.y},targetNodeId:u.targetNodeId,endPoint:Jb({},u.endPoint)}),u.sourceNodeId===p.node.id&&u.sourceAnchorId===p.anchor.id&&(d=!0);else if(a===$b.TARGET){h=Jb(Jb({},i.edgeGenerator(i.getNodeModelById(u.sourceNodeId).getData(),i.getNodeModelById(p.node.id).getData(),h)),{},{sourceNodeId:u.sourceNodeId,startPoint:Jb({},u.startPoint),targetNodeId:p.node.id,targetAnchorId:p.anchor.id,endPoint:{x:p.anchor.x,y:p.anchor.y}}),u.targetNodeId===p.node.id&&u.targetAnchorId===p.anchor.id&&(d=!0)}}else{d=!0;var x=b.getData();i.eventCenter.emit(yo.CONNECTION_NOT_ALLOWED,{data:x,msg:g})}}else d=!0;if(d)e.recoveryEdge();else{var E=u.getData();i.deleteEdgeById(u.id);var S=i.addEdge(Jb({},h));i.eventCenter.emit(yo.EDGE_EXCHANGE_NODE,{data:{newEdge:S.getData(),oldEdge:E}})}null===(n=e.preTargetNode)||void 0===n||n.setElementState(lo.DEFAULT)}finally{e.props.graphModel.eventCenter.emit(yo.ADJUST_POINT_DRAGEND,{e:r,data:e.stepDragData})}})),cm(um(e),"recoveryEdge",(function(){var t=e.props.edgeModel,r=e.oldEdge,n=r.startPoint,o=r.endPoint,i=r.pointsList;t.updateStartPoint(n),t.updateEndPoint(o),t.modelType!==po.LINE_EDGE&&(t.pointsList=i,t.initPoints())})),cm(um(e),"getAdjustPointStyle",(function(){var t=e.props,r=t.graphModel.theme;t.edgeModel;return r.edgeAdjust})),e.state={dragging:!1,endX:0,endY:0},e.targetRuleResults=new Map,e.sourceRuleResults=new Map;var r=t.type,n=t.edgeModel,u=t.graphModel.eventCenter;return e.stepDragData={type:r,edgeData:n.getData()},e.stepDrag=new cs({onDragStart:e.onDragStart,onDragging:e.onDragging,onDragEnd:e.onDragEnd,eventType:"ADJUST_POINT",isStopPropagation:!1,eventCenter:u,data:e.stepDragData}),e}return e=i,(r=[{key:"isAllowAdjust",value:function(t){var e=this.props,r=e.edgeModel,n=r.id,o=r.sourceNode,i=r.targetNode,u=r.sourceAnchorId,a=r.targetAnchorId,c=e.type,s=null,l=null,f=null,p=null;if(c===$b.SOURCE?(s=t.node,l=i,f=t.anchor,p=i.getAnchorInfo(a)):(s=o,l=t.node,p=t.anchor,f=o.getAnchorInfo(u)),this.preTargetNode&&this.preTargetNode!==t.node&&this.preTargetNode.setElementState(lo.DEFAULT),this.preTargetNode=t.node,p.id===f.id)return{pass:!1,msg:"",newTargetNode:l};var h="".concat(s.id,"_").concat(l.id,"_").concat(f.id,"_").concat(p.id);if(!this.targetRuleResults.has(h)){var d=s.isAllowConnectedAsSource(l,f,p,n),y=l.isAllowConnectedAsTarget(s,f,p,n);this.sourceRuleResults.set(h,ua(d)),this.targetRuleResults.set(h,ua(y))}var v=this.sourceRuleResults.get(h),g=v.isAllPass,b=v.msg,m=this.targetRuleResults.get(h),O=m.isAllPass,_=m.msg,w=g&&O?lo.ALLOW_CONNECT:lo.NOT_ALLOW_CONNECT;return c===$b.SOURCE?s.setElementState(w):l.setElementState(w),{pass:g&&O,msg:_||b,newTargetNode:l}}},{key:"render",value:function(){var t=this.props,e=t.x,r=t.y,n=t.getAdjustPointShape,o=t.edgeModel,i=this.state.dragging;return Object(tt.g)("g",{pointerEvents:i?"none":"",onMouseDown:this.handleMouseDown},i?"":n(e,r,o))}}])&&rm(e.prototype,r),n&&rm(e,n),i}(tt.a);function lm(t){return lm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lm(t)}function fm(){return fm=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},fm.apply(this,arguments)}function pm(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return hm(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return hm(t,e)}(t,e)||function(){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 hm(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function dm(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ym(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function vm(t,e){return vm=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},vm(t,e)}function gm(t){var e=function(){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(t){return!1}}();return function(){var r,n=Om(t);if(e){var o=Om(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return bm(this,r)}}function bm(t,e){if(e&&("object"===lm(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return mm(t)}function mm(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Om(t){return Om=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Om(t)}function _m(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var wm=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&vm(t,e)}(i,t);var e,r,n,o=gm(i);function i(){var t;dm(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return _m(mm(t=o.call.apply(o,[this].concat(r))),"startTime",void 0),_m(mm(t),"contextMenuTime",void 0),_m(mm(t),"clickTimer",void 0),_m(mm(t),"textRef",Object(tt.f)()),_m(mm(t),"handleHover",(function(e,r){var n=t.props,o=n.model,i=n.graphModel.eventCenter;o.setHovered(e);var u=e?yo.EDGE_MOUSEENTER:yo.EDGE_MOUSELEAVE,a=o.getData();i.emit(u,{data:a,e:r})})),_m(mm(t),"setHoverON",(function(e){t.props.model.isHovered||(t.textRef&&t.textRef.current&&t.textRef.current.setHoverON(),t.handleHover(!0,e))})),_m(mm(t),"setHoverOFF",(function(e){t.props.model.isHovered&&(t.textRef&&t.textRef.current&&t.textRef.current.setHoverOFF(),t.handleHover(!1,e))})),_m(mm(t),"handleContextMenu",(function(e){e.preventDefault(),t.contextMenuTime=(new Date).getTime(),t.clickTimer&&clearTimeout(t.clickTimer);var r=t.props,n=r.model,o=r.graphModel,i=o.getPointByClient({x:e.clientX,y:e.clientY});o.setElementStateById(n.id,lo.SHOW_MENU,i.domOverlayPosition),t.toFront(),n.isSelected||o.selectEdgeById(n.id);var u=null==n?void 0:n.getData();o.eventCenter.emit(yo.EDGE_CONTEXTMENU,{data:u,e:e,position:i})})),_m(mm(t),"handleMouseDown",(function(e){e.stopPropagation(),t.startTime=(new Date).getTime()})),_m(mm(t),"handleMouseUp",(function(e){if(t.startTime&&!((new Date).getTime()-t.startTime>200||2===e.button)){var r=2===e.detail,n=t.props,o=n.model,i=n.graphModel,u=null==o?void 0:o.getData(),a=i.getPointByClient({x:e.clientX,y:e.clientY});if(r){var c=i.editConfigModel,s=i.textEditElement;if(s&&s.id===o.id&&i.setElementStateById(o.id,lo.DEFAULT),c.edgeTextEdit&&o.text.editable&&i.setElementStateById(o.id,lo.TEXT_EDIT),o.modelType===po.POLYLINE_EDGE){var l=o,f=i.getPointByClient({x:e.x,y:e.y}).canvasOverlayPosition,p=f.x,h=f.y,d=es({x:p,y:h},l.points);l.dbClickPosition=d}i.eventCenter.emit(yo.EDGE_DBCLICK,{data:u,e:e,position:a})}else i.eventCenter.emit(yo.ELEMENT_CLICK,{data:u,e:e,position:a}),i.eventCenter.emit(yo.EDGE_CLICK,{data:u,e:e,position:a});var y=i.editConfigModel;i.selectEdgeById(o.id,Yi(e,y)),t.toFront()}})),t}return e=i,(r=[{key:"getShape",value:function(){return Object(tt.g)("g",null,this.getEdge())}},{key:"getTextStyle",value:function(){}},{key:"getText",value:function(){var t=this.props,e=t.model,r=t.graphModel;if(e.state===lo.TEXT_EDIT)return null;var n=!1,o=r.editConfigModel;return(e.text.draggable||o.edgeTextDraggable)&&(n=!0),Object(tt.g)(Wb,{ref:this.textRef,editable:o.edgeTextEdit&&e.text.editable,model:e,graphModel:r,draggable:n})}},{key:"getArrowInfo",value:function(){var t=this.props.model,e=t.startPoint,r=t.endPoint,n=t.isSelected;return{start:e,end:r,hover:this.state.hover,isSelected:n}}},{key:"getLastTwoPoints",value:function(){var t=this.props.model;return[t.startPoint,t.endPoint]}},{key:"getArrowStyle",value:function(){return null}},{key:"getArrow",value:function(){var t=this.props.model,e=t.id,r=t.getArrowStyle(),n=r.refY,o=void 0===n?0:n,i=r.refX,u=void 0===i?2:i,a=pm(this.getLastTwoPoints(),2),c=a[0],s=a[1],l="auto";return null!==c&&null!==s&&(l=oc(nc({x:s.x-c.x,y:s.y-c.y,z:0}))),Object(tt.g)("g",null,Object(tt.g)("defs",null,Object(tt.g)("marker",{id:"marker-start-".concat(e),refX:-u,refY:o,overflow:"visible",orient:"auto",markerUnits:"userSpaceOnUse"},this.getStartArrow()),Object(tt.g)("marker",{id:"marker-end-".concat(e),refX:u,refY:o,overflow:"visible",orient:l,markerUnits:"userSpaceOnUse"},this.getEndArrow())))}},{key:"getStartArrow",value:function(){var t=this.props.model.getArrowStyle();return t.stroke,t.strokeWidth,t.offset,t.verticalLength,Object(tt.g)("path",null)}},{key:"getEndArrow",value:function(){var t=this.props.model.getArrowStyle(),e=t.stroke,r=t.strokeWidth,n=t.offset,o=t.verticalLength;return Object(tt.g)("path",{stroke:e,fill:e,strokeWidth:r,transform:"rotate(180)",d:"M 0 0 L ".concat(n," -").concat(o," L ").concat(n," ").concat(o," Z")})}},{key:"getAdjustPointShape",value:function(t,e,r){var n=r.getAdjustPointStyle();return Object(tt.g)(Wf,fm({className:"lf-edge-adjust-point"},n,{x:t,y:e}))}},{key:"getAdjustPoints",value:function(){var t=this.props,e=t.model,r=t.graphModel,n=e.getAdjustStart(),o=e.getAdjustEnd();return Object(tt.g)("g",null,Object(tt.g)(sm,fm({type:"SOURCE"},n,{getAdjustPointShape:this.getAdjustPointShape,edgeModel:e,graphModel:r})),Object(tt.g)(sm,fm({type:"TARGET"},o,{getAdjustPointShape:this.getAdjustPointShape,edgeModel:e,graphModel:r})))}},{key:"getAnimation",value:function(){}},{key:"getAppendWidth",value:function(){return Object(tt.g)("g",null)}},{key:"getAppend",value:function(){return Object(tt.g)("g",{className:"lf-edge-append"},this.getAppendWidth())}},{key:"getEdge",value:function(){return null}},{key:"toFront",value:function(){var t=this.props,e=t.graphModel,r=t.model;e.toFront(r.id)}},{key:"render",value:function(){var t=this.props,e=t.model,r=e.isSelected,n=e.isHitable,o=e.isShowAdjustPoint;return t.graphModel.animation,Object(tt.g)("g",null,Object(tt.g)("g",{className:["lf-edge",!n&&"pointer-none",r&&"lf-edge-selected"].filter(Boolean).join(" "),onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onContextMenu:this.handleContextMenu,onMouseOver:this.setHoverON,onMouseEnter:this.setHoverON,onMouseLeave:this.setHoverOFF},this.getShape(),this.getAppend(),this.getText(),this.getArrow()),o&&r?this.getAdjustPoints():"")}}])&&ym(e.prototype,r),n&&ym(e,n),i}(tt.a);function jm(t){return jm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jm(t)}function xm(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Em(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Em(t,e)}(t,e)||function(){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 Em(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Sm=function(t){var e={d:""};return Object.entries(t).forEach((function(t){var r=xm(t,2),n=r[0],o=r[1],i=jm(o);"style"!==n&&"object"===i||(e[n]=o)})),Object(tt.g)("path",e)};function Pm(t){return Pm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pm(t)}function Am(){return Am=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Am.apply(this,arguments)}function km(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Dm(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Tm(t,e){return Tm=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Tm(t,e)}function Mm(t){var e=function(){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(t){return!1}}();return function(){var r,n=Cm(t);if(e){var o=Cm(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Nm(this,r)}}function Nm(t,e){if(e&&("object"===Pm(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Cm(t){return Cm=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Cm(t)}var Rm=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Tm(t,e)}(i,t);var e,r,n,o=Mm(i);function i(){return km(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getEdge",value:function(){var t=this.props.model,e=t.startPoint,r=t.endPoint,n=t.isAnimation,o=t.arrowConfig,i=t.getEdgeStyle(),u=t.getEdgeAnimationStyle(),a=u.strokeDasharray,c=u.stroke,s=u.strokeDashoffset,l=u.animationName,f=u.animationDuration,p=u.animationIterationCount,h=u.animationTimingFunction,d=u.animationDirection;return Object(tt.g)(df,Am({},i,{x1:e.x,y1:e.y,x2:r.x,y2:r.y},o,n?{strokeDasharray:a,stroke:c,style:{strokeDashoffset:s,animationName:l,animationDuration:f,animationIterationCount:p,animationTimingFunction:h,animationDirection:d}}:{}))}},{key:"getAppendWidth",value:function(){var t=this.props.model,e=t.startPoint,r=t.endPoint,n=Zc({start:e,end:r}),o=n.d,i=n.strokeWidth,u=n.fill,a=n.strokeDasharray,c=n.stroke;return Object(tt.g)(Sm,{d:o,fill:u,strokeWidth:i,stroke:c,strokeDasharray:a})}}])&&Dm(e.prototype,r),n&&Dm(e,n),i}(wm);function Im(t){return Im="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Im(t)}function Lm(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return zm(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return zm(t,e)}(t,e)||function(){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 zm(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Bm=function(t){var e={points:"",fill:"none"};return Object.entries(t).forEach((function(t){var r=Lm(t,2),n=r[0],o=r[1];"style"===n?e[n]=o:"object"!==Im(o)&&(e[n]=o)})),Object(tt.g)("polyline",e)};function Um(t){return Um="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Um(t)}function Fm(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Hm(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Fm(Object(r),!0).forEach((function(e){Jm(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Fm(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Xm(){return Xm=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Xm.apply(this,arguments)}function Gm(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Ym(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ym(t,e)}(t,e)||function(){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 Ym(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Vm(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Wm(t,e){return Wm=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Wm(t,e)}function Km(t){var e=function(){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(t){return!1}}();return function(){var r,n=qm(t);if(e){var o=qm(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return $m(this,r)}}function $m(t,e){if(e&&("object"===Um(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Zm(t)}function Zm(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function qm(t){return qm=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},qm(t)}function Jm(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Qm=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Wm(t,e)}(i,t);var e,r,n,o=Km(i);function i(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),Jm(Zm(t=o.call(this)),"drag",void 0),Jm(Zm(t),"isDragging",void 0),Jm(Zm(t),"isShowAdjustPointTemp",void 0),Jm(Zm(t),"appendInfo",void 0),Jm(Zm(t),"onDragStart",(function(){var e=t.props.model;e.dragAppendStart(),t.isShowAdjustPointTemp=e.isShowAdjustPoint,e.isShowAdjustPoint=!1})),Jm(Zm(t),"onDragging",(function(e){var r=e.deltaX,n=e.deltaY,o=t.props,i=o.model,u=o.graphModel;t.isDragging=!0;var a=u.transformModel,c=u.editConfigModel,s=Gm(a.fixDeltaXY(r,n),2),l=s[0],f=s[1],p=i,h=c.adjustEdgeMiddle;t.appendInfo=h?p.dragAppendSimple(t.appendInfo,{x:l,y:f}):p.dragAppend(t.appendInfo,{x:l,y:f})})),Jm(Zm(t),"onDragEnd",(function(){var e=t.props,r=e.model,n=e.graphModel.eventCenter,o=r;o.dragAppendEnd(),t.isDragging=!1,o.isShowAdjustPoint=t.isShowAdjustPointTemp,t.appendInfo=void 0,n.emit(yo.EDGE_ADJUST,{data:o.getData()})})),Jm(Zm(t),"beforeDragStart",(function(e,r){r.dragAble&&t.drag.handleMouseDown(e),t.appendInfo=r})),t.drag=new cs({onDragStart:t.onDragStart,onDragging:t.onDragging,onDragEnd:t.onDragEnd,isStopPropagation:!1}),t}return e=i,(r=[{key:"getEdge",value:function(){var t=this.props.model,e=t.points,r=t.isAnimation,n=t.arrowConfig,o=t.getEdgeStyle(),i=t.getEdgeAnimationStyle(),u=i.strokeDasharray,a=i.stroke,c=i.strokeDashoffset,s=i.animationName,l=i.animationDuration,f=i.animationIterationCount,p=i.animationTimingFunction,h=i.animationDirection;return Object(tt.g)(Bm,Xm({points:e},o,n,r?{strokeDasharray:u,stroke:a,style:{strokeDashoffset:c,animationName:s,animationDuration:l,animationIterationCount:f,animationTimingFunction:p,animationDirection:h}}:{}))}},{key:"getArrowInfo",value:function(){var t=this.props.model,e=t.points,r=t.isSelected,n={start:null,end:null,hover:this.state.hover,isSelected:r},o=Gc(e);return o.length>=2&&(n.start=o[o.length-2],n.end=o[o.length-1]),n}},{key:"getLastTwoPoints",value:function(){var t=this.props.model.points,e=Gc(t);return e.length>=2?[e[e.length-2],e[e.length-1]]:[null,null]}},{key:"getAppendAttributes",value:function(t){var e,r=t.start,n=t.end;if(r.x===n.x&&r.y===n.y)e="";else{var o={start:r,end:n,offset:10,verticalLength:5},i=Qa(Hm(Hm({},o),{},{type:"start"})),u=Qa(Hm(Hm({},o),{},{type:"end"}));e="M".concat(i.leftX," ").concat(i.leftY," \n L").concat(i.rightX," ").concat(i.rightY," \n L").concat(u.rightX," ").concat(u.rightY,"\n L").concat(u.leftX," ").concat(u.leftY," z")}return{d:e,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}}},{key:"getAppendShape",value:function(t){var e=this.getAppendAttributes(t),r=e.d,n=e.strokeWidth,o=e.fill,i=e.strokeDasharray,u=e.stroke;return Object(tt.g)(Sm,{d:r,fill:o,strokeWidth:n,stroke:u,strokeDasharray:i})}},{key:"getAppendWidth",value:function(){for(var t=this,e=this.props,r=e.model,n=e.graphModel,o=r.pointsList,i=r.draggable,u=[],a=o.length,c=function(e){var r="lf-polyline-append",c={start:{x:o[e].x,y:o[e].y},end:{x:o[e+1].x,y:o[e+1].y},startIndex:e,endIndex:e+1,direction:"",dragAble:!0},s=Object(tt.g)("g",{className:r},t.getAppendShape(c)),l=n.editConfigModel,f=l.adjustEdge,p=l.adjustEdgeMiddle;if(f&&i){var h=c.startIndex,d=c.endIndex,y=p&&(0===h||d===a-1);c.dragAble=!y,c.start.x===c.end.x?(c.dragAble&&(r+="-ew-resize"),c.direction=vo.VERTICAL):c.start.y===c.end.y&&(c.dragAble&&(r+="-ns-resize"),c.direction=vo.HORIZONTAL),s=Object(tt.g)("g",{className:t.isDragging?"lf-dragging":"lf-drag-able",onMouseDown:function(e){return t.beforeDragStart(e,c)}},Object(tt.g)("g",{className:r},t.getAppendShape(c)))}u.push(s)},s=0;s<a-1;s++)c(s);return Object(tt.g)("g",null,u)}}])&&Vm(e.prototype,r),n&&Vm(e,n),i}(wm);function tO(t){return tO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tO(t)}function eO(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return rO(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return rO(t,e)}(t,e)||function(){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 rO(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function nO(){return nO=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},nO.apply(this,arguments)}function oO(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function iO(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function uO(t,e){return uO=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},uO(t,e)}function aO(t){var e=function(){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(t){return!1}}();return function(){var r,n=sO(t);if(e){var o=sO(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return cO(this,r)}}function cO(t,e){if(e&&("object"===tO(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function sO(t){return sO=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},sO(t)}var lO=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&uO(t,e)}(i,t);var e,r,n,o=aO(i);function i(){return oO(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getEdge",value:function(){var t=this.props.model,e=t.getEdgeStyle(),r=t.path,n=t.isAnimation,o=t.arrowConfig,i=t.getEdgeAnimationStyle(),u=i.strokeDasharray,a=i.stroke,c=i.strokeDashoffset,s=i.animationName,l=i.animationDuration,f=i.animationIterationCount,p=i.animationTimingFunction,h=i.animationDirection;return Object(tt.g)(Sm,nO({d:r},e,o,n?{strokeDasharray:u,stroke:a,style:{strokeDashoffset:c,animationName:s,animationDuration:l,animationIterationCount:f,animationTimingFunction:p,animationDirection:h}}:{}))}},{key:"getAppendWidth",value:function(){var t=this.props.model.path;return Object(tt.g)(Sm,{d:t,strokeWidth:10,stroke:"transparent",fill:"none"})}},{key:"getArrowInfo",value:function(){var t=this.props.model,e=this.state.hover,r=t.isSelected,n=t.getArrowStyle().offset,o=t.pointsList.map((function(t){return{x:t.x,y:t.y}})),i=eO(ts(o,n),2);return{start:i[0],end:i[1],hover:e,isSelected:r}}},{key:"getLastTwoPoints",value:function(){var t=this.props.model,e=t.getArrowStyle().offset,r=t.pointsList.map((function(t){return{x:t.x,y:t.y}}));return ts(r,e)}}])&&iO(e.prototype,r),n&&iO(e,n),i}(wm);function fO(t){return fO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fO(t)}function pO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function hO(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function dO(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function yO(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function vO(t,e){return vO=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},vO(t,e)}function gO(t){var e=function(){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(t){return!1}}();return function(){var r,n=mO(t);if(e){var o=mO(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return bO(this,r)}}function bO(t,e){if(e&&("object"===fO(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function mO(t){return mO=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},mO(t)}var OO=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&vO(t,e)}(i,t);var e,r,n,o=gO(i);function i(){return dO(this,i),o.apply(this,arguments)}return e=i,r=[{key:"getArrowAttributes",value:function(){var t=this.props,e=t.arrowInfo,r=t.style,n=e.start,o=e.end,i={start:n,end:o,offset:r.offset,verticalLength:r.verticalLength,type:"end"},u=Qa(i),a=u.leftX,c=u.leftY,s=u.rightX,l=u.rightY;return function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?pO(Object(r),!0).forEach((function(e){hO(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):pO(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({d:"M".concat(a," ").concat(c," L").concat(o.x," ").concat(o.y," L").concat(s," ").concat(l," z")},r)}},{key:"getShape",value:function(){var t=this.getArrowAttributes(),e=t.d,r=t.strokeWidth,n=t.stroke,o=t.fill;return Object(tt.g)(Sm,{d:e,fill:o,strokeWidth:r,stroke:n})}},{key:"render",value:function(){return Object(tt.g)("g",{className:"lf-arrow"},this.getShape())}}],r&&yO(e.prototype,r),n&&yO(e,n),i}(tt.a);var _O=function(t,e){return Mr(t,e)};var wO=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0},jO=function(){return vt.a.Date.now()},xO=Math.max,EO=Math.min;var SO=function(t,e,r){var n,o,i,u,a,c,s=0,l=!1,f=!1,p=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function h(e){var r=n,i=o;return n=o=void 0,s=e,u=t.apply(i,r)}function d(t){return s=t,a=setTimeout(v,e),l?h(t):u}function y(t){var r=t-c;return void 0===c||r>=e||r<0||f&&t-s>=i}function v(){var t=jO();if(y(t))return g(t);a=setTimeout(v,function(t){var r=e-(t-c);return f?EO(r,i-(t-s)):r}(t))}function g(t){return a=void 0,p&&n?h(t):(n=o=void 0,u)}function b(){var t=jO(),r=y(t);if(n=arguments,o=this,c=t,r){if(void 0===a)return d(c);if(f)return clearTimeout(a),a=setTimeout(v,e),h(c)}return void 0===a&&(a=setTimeout(v,e)),u}return e=ru(e)||0,Pt(r)&&(l=!!r.leading,i=(f="maxWait"in r)?xO(ru(r.maxWait)||0,e):i,p="trailing"in r?!!r.trailing:p),b.cancel=function(){void 0!==a&&clearTimeout(a),s=0,n=c=o=a=void 0},b.flush=function(){return void 0===a?u:g(jO())},b},PO=r(172);function AO(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function kO(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var DO,TO,MO,NO=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),kO(this,"undos",[]),kO(this,"redos",[]),kO(this,"callbacks",[]),kO(this,"stopWatch",null),kO(this,"curData",null),kO(this,"maxSize",50),kO(this,"waitTime",100),kO(this,"eventCenter",void 0),this.eventCenter=e}var e,r,n;return e=t,(r=[{key:"add",value:function(t){_O(wO(this.undos),t)||(this.undos.push(t),_O(this.curData,t)||(this.redos=[]),this.eventCenter.emit(yo.HISTORY_CHANGE,{data:{undos:this.undos,redos:this.redos,undoAble:this.undos.length>1,redoAble:this.redos.length>0}}),this.undos.length>this.maxSize&&this.undos.shift())}},{key:"undoAble",value:function(){return this.undos.length>1}},{key:"undo",value:function(){if(this.undoAble()){var t=this.undos.pop();this.redos.push(t);var e=this.undos.pop();return this.curData=wi(e),e}}},{key:"redoAble",value:function(){return this.redos.length>0}},{key:"redo",value:function(){if(this.redoAble()){var t=this.redos.pop();return this.curData=wi(t),t}}},{key:"watch",value:function(t){var e=this;this.stopWatch&&this.stopWatch(),this.undos.push(t.modelToGraphData()),this.stopWatch=Object(PO.a)(t,SO((function(){var r=t.modelToHistoryData();r&&e.add(r)}),this.waitTime))}}])&&AO(e.prototype,r),n&&AO(e,n),t}();function CO(t){return CO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},CO(t)}function RO(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return IO(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return IO(t,e)}(t,e)||function(){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 IO(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function LO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function zO(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?LO(Object(r),!0).forEach((function(e){YO(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):LO(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function BO(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function UO(t,e){return UO=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},UO(t,e)}function FO(t){var e=function(){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(t){return!1}}();return function(){var r,n=GO(t);if(e){var o=GO(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return HO(this,r)}}function HO(t,e){if(e&&("object"===CO(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return XO(t)}function XO(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function GO(t){return GO=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},GO(t)}function YO(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var VO,WO,KO,$O=T_((MO=TO=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&UO(t,e)}(i,t);var e,r,n,o=FO(i);function i(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),YO(XO(t=o.call(this)),"ref",Object(tt.f)()),YO(XO(t),"__prevText",{type:"",text:"",id:""}),YO(XO(t),"keyupHandler",(function(e){var r=t.props.graphModel.textEditElement;"Enter"===e.key&&e.altKey&&r.setElementState(0)})),YO(XO(t),"inputHandler",(function(e){var r=e.target.innerText,n=t.props.graphModel.textEditElement;t.__prevText={type:n.type,text:r.replace(/(\r\n)+$|(\n)+$/,""),id:n.id}})),YO(XO(t),"keydownHandler",(function(t){t.stopPropagation()})),t.state={style:{left:0,top:0}},t}return e=i,n=[{key:"getDerivedStateFromProps",value:function(t){var e,r=t.graphModel,n=r.transformModel,o=r.theme,i=o.inputText,u=r.textEditElement;if(u){var a;if(null===(a=u.text)||void 0===a||!a.value)if(u.BaseType===ho.EDGE){var c=(u=u).text,s=u.textPosition,l=s.x,f=s.y;c.x=l,c.y=f,u.setText(c)}else u=u;var p={resize:"auto",whiteSpace:"normal",wordBreak:"break-all"};if(u.BaseType===ho.EDGE){var h=o.edgeText,d=h.overflowMode,y=h.lineHeight,v=h.wrapPadding,g=h.textWidth;g&&"autoWrap"===d&&(e=zO(zO({},p),{},{width:g,minWidth:g,lineHeight:y,padding:v}))}else if(u.BaseType===ho.NODE){var b=o.nodeText,m=b.overflowMode,O=b.lineHeight,_=b.wrapPadding,w=b.textWidth,j=u,x=j.width,E=j.modelType,S=j.textWidth||w||x;(E!==po.TEXT_NODE&&"autoWrap"===m||E===po.TEXT_NODE&&w)&&(e=zO(zO({},p),{},{width:S,minWidth:S,lineHeight:O,padding:_}))}var P=u.text,A=P.x,k=P.y,D=RO(n.CanvasPointToHtmlPoint([A,k]),2);return{style:zO(zO({left:D[0],top:D[1]},e),i)}}}}],(r=[{key:"componentDidUpdate",value:function(){var t=this.props.graphModel;if(this.ref.current&&(this.ref.current.focus(),this.placeCaretAtEnd(this.ref.current)),""!==this.__prevText.id){var e=this.__prevText,r=e.text,n=e.id;t.updateText(n,r),t.eventCenter.emit(yo.TEXT_UPDATE,zO({},this.__prevText)),this.__prevText.id="",this.__prevText.text="",this.__prevText.type=""}}},{key:"placeCaretAtEnd",value:function(t){if(void 0!==window.getSelection&&void 0!==document.createRange){var e=document.createRange();e.selectNodeContents(t),e.collapse(!1);var r=window.getSelection();r.removeAllRanges(),r.addRange(e)}}},{key:"render",value:function(){var t,e=this.props.graphModel.textEditElement,r=this.state.style;return e?Object(tt.g)("div",{contentEditable:!0,className:"lf-text-input",style:r,ref:this.ref,key:e.id,onKeyUp:this.keyupHandler,onKeyDown:this.keydownHandler,onKeyPress:this.keydownHandler,onInput:this.inputHandler},null===(t=e.text)||void 0===t?void 0:t.value):null}}])&&BO(e.prototype,r),n&&BO(e,n),i}(tt.a),YO(TO,"toolName","textEdit"),DO=MO))||DO,ZO=function(t){return t.modelType===po.LINE_EDGE?function(t){var e=t.startPoint,r=t.endPoint,n=(e.x+r.x)/2,o=(e.y+r.y)/2,i=Math.abs(e.x-r.x)+10,u=Math.abs(e.y-r.y)+10;return{x:n-i/2,y:o-u/2,x1:n+i/2,y1:o+u/2}}(t):t.modelType===po.POLYLINE_EDGE?function(t){var e=t.points,r=Gc(e),n=_c(r,8),o=n.x,i=n.y,u=n.width,a=n.height;return{x:o-u/2,y:i-a/2,x1:o+u/2,y1:i+a/2}}(t):t.modelType===po.BEZIER_EDGE?function(t){var e=t.path,r=Jc(e),n=_c(r,8),o=n.x,i=n.y,u=n.width,a=n.height;return{x:o-u/2,y:i-a/2,x1:o+u/2,y1:i+a/2}}(t):void 0};function qO(t){return qO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qO(t)}function JO(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||t_(t,e)||function(){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 QO(t){return function(t){if(Array.isArray(t))return e_(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||t_(t)||function(){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 t_(t,e){if(t){if("string"==typeof t)return e_(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e_(t,e):void 0}}function e_(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function r_(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function n_(t,e){return n_=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},n_(t,e)}function o_(t){var e=function(){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(t){return!1}}();return function(){var r,n=a_(t);if(e){var o=a_(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return i_(this,r)}}function i_(t,e){if(e&&("object"===qO(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return u_(t)}function u_(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function a_(t){return a_=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},a_(t)}function c_(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var s_=T_((KO=WO=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&n_(t,e)}(i,t);var e,r,n,o=o_(i);function i(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),c_(u_(e=o.call(this)),"stepDrag",void 0),c_(u_(e),"handleMouseDown",(function(t){e.stepDrag.handleMouseDown(t)})),c_(u_(e),"onDragging",(function(t){var r=t.deltaX,n=t.deltaY,o=e.props.graphModel,i=o.getSelectElements(!0);o.moveNodes(i.nodes.map((function(t){return t.id})),r,n)})),c_(u_(e),"handleContextMenu",(function(t){t.preventDefault();var r=e.props,n=r.graphModel,o=r.graphModel,i=o.eventCenter,u=o.selectElements,a=n.getPointByClient({x:t.clientX,y:t.clientY}),c={nodes:[],edges:[]};QO(u.values()).forEach((function(t){t.BaseType===ho.NODE&&c.nodes.push(t.getData()),t.BaseType===ho.EDGE&&c.edges.push(t.getData())})),i.emit(yo.SELECTION_CONTEXTMENU,{data:c,e:t,position:a})}));var r=t.graphModel,n=r.gridSize,u=r.eventCenter;return e.stepDrag=new cs({onDragging:e.onDragging,step:n,eventType:"SELECTION",eventCenter:u}),e}return e=i,(r=[{key:"render",value:function(){var t=this.props.graphModel,e=t.selectElements,r=t.transformModel;if(!(e.size<=1)){var n=Number.MAX_SAFE_INTEGER,o=Number.MAX_SAFE_INTEGER,i=Number.MIN_SAFE_INTEGER,u=Number.MIN_SAFE_INTEGER;e.forEach((function(t){var e={x:0,y:0,x1:0,y1:0};t.BaseType===ho.NODE&&(e=function(t){var e=t.x,r=t.y,n=t.width,o=t.height;return{x:e-n/2,y:r-o/2,x1:e+n/2,y1:r+o/2}}(t)),t.BaseType===ho.EDGE&&(e=ZO(t)),n=Math.min(n,e.x),o=Math.min(o,e.y),i=Math.max(i,e.x1),u=Math.max(u,e.y1)}));var a=JO(r.CanvasPointToHtmlPoint([n,o]),2);n=a[0],o=a[1];var c=JO(r.CanvasPointToHtmlPoint([i,u]),2);i=c[0],u=c[1];var s={left:"".concat(n-10,"px"),top:"".concat(o-10,"px"),width:"".concat(i-n+20,"px"),height:"".concat(u-o+20,"px")};return Object(tt.g)("div",{className:"lf-multiple-select",style:s,onMouseDown:this.handleMouseDown,onContextMenu:this.handleContextMenu})}}}])&&r_(e.prototype,r),n&&r_(e,n),i}(tt.a),c_(WO,"toolName","multipleSelect"),VO=KO))||VO;function l_(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function f_(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var p_=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),f_(this,"tools",void 0),f_(this,"components",void 0),f_(this,"toolMap",new Map),f_(this,"instance",void 0),this.instance=e,this.isDisabledTool($O.toolName)||this.registerTool($O.toolName,$O),this.isDisabledTool(s_.toolName)||this.registerTool(s_.toolName,s_);var r=e.graphModel;r.eventCenter.on("".concat(yo.GRAPH_TRANSFORM,",").concat(yo.NODE_CLICK,",").concat(yo.BLANK_CLICK," "),(function(){var t=r.textEditElement,e=r.editConfigModel,n=e.edgeTextEdit,o=e.nodeTextEdit;(n||o)&&t&&r.textEditElement.setElementState(lo.DEFAULT)}))}var e,r,n;return e=t,(r=[{key:"isDisabledTool",value:function(t){return-1!==this.instance.options.disabledTools.indexOf(t)}},{key:"registerTool",value:function(t,e){this.toolMap.set(t,e)}},{key:"getTools",value:function(){return Array.from(this.toolMap.values())}},{key:"getInstance",value:function(){return this.instance}}])&&l_(e.prototype,r),n&&l_(e,n),t}(),h_=r(173),d_=r.n(h_);function y_(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function v_(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var g_=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),v_(this,"mousetrap",void 0),v_(this,"options",void 0),v_(this,"target",void 0),e.keyboard||(e.keyboard={enabled:!1}),this.options=e;var r=e.lf;this.target=r.container,this.mousetrap=new d_.a(this.target),e.keyboard.enabled&&!r.options.isSilentMode&&this.enable(!0)}var e,r,n;return e=t,(r=[{key:"initShortcuts",value:function(){var t=this,e=this.options.keyboard.shortcuts;if(e)if(Pe(e))e.forEach((function(e){var r=e.keys,n=e.callback,o=e.action;return t.on(r,n,o)}));else{var r=e.keys,n=e.callback,o=e.action;this.on(r,n,o)}}},{key:"on",value:function(t,e,r){this.mousetrap.bind(this.getKeys(t),e,r)}},{key:"disabled",get:function(){return!0!==this.options.keyboard.enabled}},{key:"off",value:function(t,e){this.mousetrap.unbind(this.getKeys(t),e)}},{key:"enable",value:function(t){(this.disabled||t)&&(this.options.keyboard.enabled=!0,this.target instanceof HTMLElement&&(this.target.setAttribute("tabindex","-1"),this.target.style.outline="none"))}},{key:"disable",value:function(){this.disabled||(this.options.keyboard.enabled=!1,this.target instanceof HTMLElement&&this.target.removeAttribute("tabindex"))}},{key:"getKeys",value:function(t){var e=this;return(Array.isArray(t)?t:[t]).map((function(t){return e.formatKey(t)}))}},{key:"formatKey",value:function(t){return t.toLowerCase().replace(/\s/g,"").replace("delete","del").replace("cmd","command")}}])&&y_(e.prototype,r),n&&y_(e,n),t}(),b_=g_,m_=null;function O_(t,e){return t.x+=e,t.y+=e,t.text&&(t.text.x+=e,t.text.y+=e),t}function __(t,e){return t.startPoint&&(t.startPoint.x+=e,t.startPoint.y+=e),t.endPoint&&(t.endPoint.x+=e,t.endPoint.y+=e),t.pointsList&&t.pointsList.length>0&&t.pointsList.forEach((function(t){t.x+=e,t.y+=e})),t.text&&(t.text.x+=e,t.text.y+=e),t}var w_=40,j_=40;function x_(t){return x_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},x_(t)}function E_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function S_(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?E_(Object(r),!0).forEach((function(e){A_(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):E_(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function P_(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function A_(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var k_=Symbol("plugin register by Logicflow.use"),D_=function(){function t(e){var r,n,o=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),A_(this,"container",void 0),A_(this,"width",void 0),A_(this,"height",void 0),A_(this,"graphModel",void 0),A_(this,"history",void 0),A_(this,"viewMap",new Map),A_(this,"tool",void 0),A_(this,"keyboard",void 0),A_(this,"dnd",void 0),A_(this,"options",void 0),A_(this,"snaplineModel",void 0),A_(this,"components",[]),A_(this,"plugins",void 0),A_(this,"extension",{}),A_(this,"adapterIn",void 0),A_(this,"adapterOut",void 0),A_(this,"getView",(function(t){return o.viewMap.get(t)})),e=Rp(e),this.options=e,this.container=this.initContainer(e.container),this.plugins=e.plugins,this.graphModel=new xl(S_({},e)),this.tool=new p_(this),this.history=new NO(this.graphModel.eventCenter),this.dnd=new Cp({lf:this}),this.keyboard=new b_({lf:this,keyboard:e.keyboard}),!1!==e.snapline&&(this.snaplineModel=new uv(this.graphModel),r=this.graphModel.eventCenter,n=this.snaplineModel,r.on("node:mousemove",(function(t){var e=t.data;n.setNodeSnapLine(e)})),r.on("node:mouseup",(function(){n.clearSnapline()}))),function(t,e){var r=t.keyboard,n=r.options.keyboard;r.on(["cmd + c","ctrl + c"],(function(){if(j_=w_,!n.enabled)return!0;if(e.textEditElement)return!0;var r=t.options.guards,o=e.getSelectElements(!1);return r&&r.beforeClone&&!r.beforeClone(o)||0===o.nodes.length&&0===o.edges.length?(m_=null,!0):((m_=o).nodes.forEach((function(t){return O_(t,w_)})),m_.edges.forEach((function(t){return __(t,w_)})),!1)})),r.on(["cmd + v","ctrl + v"],(function(){if(!n.enabled)return!0;if(e.textEditElement)return!0;if(m_&&(m_.nodes||m_.edges)){t.clearSelectElements();var r=t.addElements(m_,j_);if(!r)return!0;r.nodes.forEach((function(e){return t.selectElementById(e.id,!0)})),r.edges.forEach((function(e){return t.selectElementById(e.id,!0)})),m_.nodes.forEach((function(t){return O_(t,w_)})),m_.edges.forEach((function(t){return __(t,w_)})),j_+=w_}return!1})),r.on(["cmd + z","ctrl + z"],(function(){return!n.enabled||!!e.textEditElement||(t.undo(),!1)})),r.on(["cmd + y","ctrl + y"],(function(){return!n.enabled||!!e.textEditElement||(t.redo(),!1)})),r.on(["backspace"],(function(){if(!n.enabled)return!0;if(e.textEditElement)return!0;var r=e.getSelectElements(!0);return t.clearSelectElements(),r.edges.forEach((function(e){return t.deleteEdge(e.id)})),r.nodes.forEach((function(e){return t.deleteNode(e.id)})),!1}))}(this,this.graphModel),this.keyboard.initShortcuts(),this.defaultRegister(),this.installPlugins(e.disabledPlugins)}var e,r,n;return e=t,r=[{key:"register",value:function(t,e){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if("string"==typeof t){var n={BaseEdge:wm,BaseEdgeModel:ga,BaseNode:dg,BaseNodeModel:Bh,RectNode:jg,RectNodeModel:Ey,CircleNode:Mg,CircleNodeModel:od,PolygonNode:Yg,PolygonNodeModel:sy,TextNode:xb,TextNodeModel:Uy,LineEdge:Rm,LineEdgeModel:Ca,DiamondNode:tb,DiamondNodeModel:Ed,PolylineEdge:Qm,PolylineEdgeModel:Ja,BezierEdge:lO,BezierEdgeModel:rh,EllipseNode:hb,EllipseNodeModel:Xd,HtmlNode:Rb,HtmlNodeModel:tv,h:tt.g,type:t};this.viewMap.forEach((function(t){var e=t.extendKey;e&&(n[e]=t)})),this.graphModel.modelMap.forEach((function(t){var e=t.extendKey;e&&(n[e]=t)}));var o=e(n),i=o.view,u=o.model,a=i;r&&!a.isObervered&&(a.isObervered=!0,a=Q(a)),this.setView(t,a),this.graphModel.setModel(t,u)}else this.registerElement(t)}},{key:"registerElement",value:function(t){var e=t.view;!1===t.isObserverView||e.isObervered||(e.isObervered=!0,e=Q(e)),this.setView(t.type,e),this.graphModel.setModel(t.type,t.model)}},{key:"batchRegister",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];e.forEach((function(e){t.registerElement(e)}))}},{key:"defaultRegister",value:function(){this.registerElement({view:jg,model:Ey,type:"rect"}),this.registerElement({type:"circle",view:Mg,model:od}),this.registerElement({type:"polygon",view:Yg,model:sy}),this.registerElement({type:"line",view:Rm,model:Ca}),this.registerElement({type:"polyline",view:Qm,model:Ja}),this.registerElement({type:"bezier",view:lO,model:rh}),this.registerElement({type:"text",view:xb,model:Uy}),this.registerElement({type:"ellipse",view:hb,model:Xd}),this.registerElement({type:"diamond",view:tb,model:Ed}),this.registerElement({type:"html",view:Rb,model:tv})}},{key:"selectElementById",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.graphModel.selectElementById(t,e),!e&&r&&this.graphModel.toFront(t)}},{key:"focusOn",value:function(t){var e=this.graphModel.transformModel,r=t.coordinate,n=t.id;if(!r){var o=this.getNodeModelById(n);o&&(r=o.getData());var i=this.getEdgeModelById(n);i&&(r=i.textPosition)}var u=r,a=u.x,c=u.y;e.focusOn(a,c,this.graphModel.width,this.graphModel.height)}},{key:"setTheme",value:function(t){this.graphModel.setTheme(t)}},{key:"resize",value:function(t,e){this.graphModel.resize(t,e),this.options.width=this.graphModel.width,this.options.height=this.graphModel.height}},{key:"setDefaultEdgeType",value:function(t){this.graphModel.setDefaultEdgeType(t)}},{key:"updateText",value:function(t,e){this.graphModel.updateText(t,e)}},{key:"deleteElement",value:function(t){var e,r,n,o=this.getModelById(t);return!!o&&null!==(r=null===(n=(A_(e={},ho.NODE,this.deleteNode),A_(e,ho.EDGE,this.deleteEdge),e)[o.BaseType])||void 0===n?void 0:n.call(this,t))&&void 0!==r&&r}},{key:"getModelById",value:function(t){return this.graphModel.getElement(t)}},{key:"getDataById",value:function(t){var e;return null===(e=this.graphModel.getElement(t))||void 0===e?void 0:e.getData()}},{key:"changeNodeType",value:function(t,e){this.graphModel.changeNodeType(t,e)}},{key:"changeEdgeType",value:function(t,e){this.graphModel.changeEdgeType(t,e)}},{key:"getNodeEdges",value:function(t){return this.graphModel.getNodeEdges(t)}},{key:"addNode",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yo.NODE_ADD,r=arguments.length>2?arguments[2]:void 0;return this.graphModel.addNode(t,e,r)}},{key:"deleteNode",value:function(t){var e=this.graphModel.getNodeModelById(t);if(!e)return!1;var r=e.getData(),n=this.options.guards,o=!n||!n.beforeDelete||n.beforeDelete(r);return o&&this.graphModel.deleteNode(t),o}},{key:"cloneNode",value:function(t){var e=this.graphModel.getNodeModelById(t).getData(),r=this.options.guards;if(!r||!r.beforeClone||r.beforeClone(e))return this.graphModel.cloneNode(t)}},{key:"changeNodeId",value:function(t,e){return this.graphModel.changeNodeId(t,e)}},{key:"getNodeModelById",value:function(t){return this.graphModel.getNodeModelById(t)}},{key:"getNodeDataById",value:function(t){var e;return null===(e=this.graphModel.getNodeModelById(t))||void 0===e?void 0:e.getData()}},{key:"addEdge",value:function(t){return this.graphModel.addEdge(t)}},{key:"deleteEdge",value:function(t){var e=this.options.guards,r=this.graphModel.edgesMap[t];if(!r)return!1;var n=r.model.getData(),o=!e||!e.beforeDelete||e.beforeDelete(n);return o&&this.graphModel.deleteEdgeById(t),o}},{key:"deleteEdgeByNodeId",value:function(t){var e=t.sourceNodeId,r=t.targetNodeId;e&&r?this.graphModel.deleteEdgeBySourceAndTarget(e,r):e?this.graphModel.deleteEdgeBySource(e):r&&this.graphModel.deleteEdgeByTarget(r)}},{key:"changeEdgeId",value:function(t,e){return this.graphModel.changeEdgeId(t,e)}},{key:"getEdgeModelById",value:function(t){var e;return null===(e=this.graphModel.edgesMap[t])||void 0===e?void 0:e.model}},{key:"getEdgeModels",value:function(t){var e=this.graphModel.edges,r=t.sourceNodeId,n=t.targetNodeId;if(r&&n){var o=[];return e.forEach((function(t){t.sourceNodeId===r&&t.targetNodeId===n&&o.push(t)})),o}if(r){var i=[];return e.forEach((function(t){t.sourceNodeId===r&&i.push(t)})),i}if(n){var u=[];return e.forEach((function(t){t.targetNodeId===n&&u.push(t)})),u}return[]}},{key:"getEdgeDataById",value:function(t){var e;return null===(e=this.getEdgeModelById(t))||void 0===e?void 0:e.getData()}},{key:"getNodeIncomingEdge",value:function(t){return this.graphModel.getNodeIncomingEdge(t)}},{key:"getNodeOutgoingEdge",value:function(t){return this.graphModel.getNodeOutgoingEdge(t)}},{key:"getNodeIncomingNode",value:function(t){return this.graphModel.getNodeIncomingNode(t)}},{key:"getNodeOutgoingNode",value:function(t){return this.graphModel.getNodeOutgoingNode(t)}},{key:"editText",value:function(t){this.graphModel.editText(t)}},{key:"setProperties",value:function(t,e){var r;null===(r=this.graphModel.getElement(t))||void 0===r||r.setProperties(aa(e))}},{key:"deleteProperty",value:function(t,e){var r;null===(r=this.graphModel.getElement(t))||void 0===r||r.deleteProperty(e)}},{key:"getProperties",value:function(t){var e;return null===(e=this.graphModel.getElement(t))||void 0===e?void 0:e.getProperties()}},{key:"toFront",value:function(t){this.graphModel.toFront(t)}},{key:"setElementZIndex",value:function(t,e){return this.graphModel.setElementZIndex(t,e)}},{key:"addElements",value:function(t){for(var e=this,r=t.nodes,n=t.edges,o={},i={nodes:[],edges:[]},u=0;u<r.length;u++){var a=r[u],c=a.id,s=this.addNode(a);if(!s)return;c&&(o[c]=s.id),i.nodes.push(s)}return n.forEach((function(t){var r=t.sourceNodeId,n=t.targetNodeId;o[r]&&(r=o[r]),o[n]&&(n=o[n]);var u=e.graphModel.addEdge(S_(S_({},t),{},{sourceNodeId:r,targetNodeId:n}));i.edges.push(u)})),i}},{key:"getAreaElement",value:function(t,e){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return this.graphModel.getAreaElement(t,e,r,n,o).map((function(t){return t.getData()}))}},{key:"getSelectElements",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.graphModel.getSelectElements(t)}},{key:"clearSelectElements",value:function(){this.graphModel.clearSelectElements()}},{key:"getGraphData",value:function(){var t=this.graphModel.modelToGraphData();if(this.adapterOut){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return this.adapterOut.apply(this,[t].concat(r))}return t}},{key:"getGraphRawData",value:function(){return this.graphModel.modelToGraphData()}},{key:"clearData",value:function(){this.graphModel.clearData()}},{key:"updateEditConfig",value:function(t){var e=this.graphModel,r=e.editConfigModel,n=e.transformModel;r.updateEditConfig(t),void 0!==(null==t?void 0:t.stopMoveGraph)&&n.updateTranslateLimits(t.stopMoveGraph),null!=t&&t.isSilentMode?this.keyboard.disable():this.keyboard.enable(!0)}},{key:"getEditConfig",value:function(){return this.graphModel.editConfigModel.getConfig()}},{key:"getPointByClient",value:function(t,e){return this.graphModel.getPointByClient({x:t,y:e})}},{key:"undo",value:function(){if(this.history.undoAble()){var t=aa(this.history.undo());this.clearSelectElements(),this.graphModel.graphDataToModel(t)}}},{key:"redo",value:function(){if(this.history.redoAble()){var t=aa(this.history.redo());this.clearSelectElements(),this.graphModel.graphDataToModel(t)}}},{key:"zoom",value:function(t,e){return this.graphModel.transformModel.zoom(t,e)}},{key:"resetZoom",value:function(){this.graphModel.transformModel.resetZoom()}},{key:"setZoomMiniSize",value:function(t){this.graphModel.transformModel.setZoomMiniSize(t)}},{key:"setZoomMaxSize",value:function(t){this.graphModel.transformModel.setZoomMaxSize(t)}},{key:"getTransform",value:function(){var t=this.graphModel.transformModel;return{SCALE_X:t.SCALE_X,SCALE_Y:t.SCALE_Y,TRANSLATE_X:t.TRANSLATE_X,TRANSLATE_Y:t.TRANSLATE_Y}}},{key:"translate",value:function(t,e){this.graphModel.transformModel.translate(t,e)}},{key:"resetTranslate",value:function(){var t=this.graphModel.transformModel,e=t.TRANSLATE_X,r=t.TRANSLATE_Y;this.translate(-e,-r)}},{key:"translateCenter",value:function(){this.graphModel.translateCenter()}},{key:"fitView",value:function(t,e){void 0===e&&(e=t),this.graphModel.fitView(t,e)}},{key:"openEdgeAnimation",value:function(t){this.graphModel.openEdgeAnimation(t)}},{key:"closeEdgeAnimation",value:function(t){this.graphModel.closeEdgeAnimation(t)}},{key:"on",value:function(t,e){this.graphModel.eventCenter.on(t,e)}},{key:"off",value:function(t,e){this.graphModel.eventCenter.off(t,e)}},{key:"once",value:function(t,e){this.graphModel.eventCenter.once(t,e)}},{key:"emit",value:function(t,e){this.graphModel.eventCenter.emit(t,e)}},{key:"initContainer",value:function(t){var e=document.createElement("div");return e.style.position="relative",e.style.width="100%",e.style.height="100%",t.innerHTML="",t.appendChild(e),e}},{key:"installPlugins",value:function(){var e,r=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=null!==(e=this.plugins)&&void 0!==e?e:t.extensions;o.forEach((function(t){var e=null,o=null;t[k_]?(e=t.extension,o=t.props):e=t;var i=e.pluginName||e.name;-1===n.indexOf(i)&&r.installPlugin(e,o)}))}},{key:"installPlugin",value:function(e,r){if("object"===x_(e)){var n=e.install,o=e.render;return n&&n.call(e,this,t),o&&this.components.push(o.bind(e)),void(this.extension[e.pluginName]=e)}var i=e,u=new i({lf:this,LogicFlow:t,options:this.options.pluginsOptions,props:r});u.render&&this.components.push(u.render.bind(u)),this.extension[i.pluginName]=u}},{key:"updateAttributes",value:function(t,e){this.graphModel.updateAttributes(t,e)}},{key:"createFakerNode",value:function(t){var e=this.graphModel.modelMap.get(t.type);if(e){var r=new e(S_(S_({},t),{},{virtual:!0}),this.graphModel);return this.graphModel.setFakerNode(r),r}}},{key:"removeFakerNode",value:function(){this.graphModel.removeFakerNode()}},{key:"setNodeSnapLine",value:function(t){this.snaplineModel&&this.snaplineModel.setNodeSnapLine(t)}},{key:"removeNodeSnapLine",value:function(){this.snaplineModel&&this.snaplineModel.clearSnapline()}},{key:"setView",value:function(t,e){this.viewMap.set(t,e)}},{key:"renderRawData",value:function(t){this.graphModel.graphDataToModel(aa(t)),!1!==this.options.history&&this.history.watch(this.graphModel),Object(tt.j)(Object(tt.g)(kp,{getView:this.getView,tool:this.tool,options:this.options,dnd:this.dnd,snaplineModel:this.snaplineModel,graphModel:this.graphModel}),this.container),this.emit(yo.GRAPH_RENDERED,this.graphModel.modelToGraphData())}},{key:"render",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.adapterIn&&(t=this.adapterIn(t)),this.renderRawData(t)}}],n=[{key:"use",value:function(t,e){var r,n,o=t.pluginName;o||(o=t.name);var i=null===(r=this.extensions.get(o))||void 0===r?void 0:r.extension;i&&i.destroy&&i.destroy(),this.extensions.set(o,(A_(n={},k_,k_),A_(n,"extension",t),A_(n,"props",e),n))}}],r&&P_(e.prototype,r),n&&P_(e,n),t}();function T_(t){return Q(t)}A_(D_,"extensions",new Map);e.default=D_}])}));
23
+ */(function(){var i,u="Expected a function",a="__lodash_hash_undefined__",c="__lodash_placeholder__",s=16,l=32,f=64,p=128,d=256,h=1/0,y=9007199254740991,v=NaN,g=4294967295,b=[["ary",p],["bind",1],["bindKey",2],["curry",8],["curryRight",s],["flip",512],["partial",l],["partialRight",f],["rearg",d]],m="[object Arguments]",O="[object Array]",_="[object Boolean]",w="[object Date]",j="[object Error]",x="[object Function]",E="[object GeneratorFunction]",S="[object Map]",P="[object Number]",A="[object Object]",k="[object Promise]",D="[object RegExp]",T="[object Set]",M="[object String]",N="[object Symbol]",C="[object WeakMap]",R="[object ArrayBuffer]",I="[object DataView]",L="[object Float32Array]",z="[object Float64Array]",B="[object Int8Array]",U="[object Int16Array]",F="[object Int32Array]",H="[object Uint8Array]",X="[object Uint8ClampedArray]",G="[object Uint16Array]",Y="[object Uint32Array]",V=/\b__p \+= '';/g,W=/\b(__p \+=) '' \+/g,K=/(__e\(.*?\)|\b__t\)) \+\n'';/g,$=/&(?:amp|lt|gt|quot|#39);/g,Z=/[&<>"']/g,q=RegExp($.source),J=RegExp(Z.source),Q=/<%-([\s\S]+?)%>/g,tt=/<%([\s\S]+?)%>/g,et=/<%=([\s\S]+?)%>/g,rt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nt=/^\w*$/,ot=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,it=/[\\^$.*+?()[\]{}|]/g,ut=RegExp(it.source),at=/^\s+/,ct=/\s/,st=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,lt=/\{\n\/\* \[wrapped with (.+)\] \*/,ft=/,? & /,pt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,dt=/[()=,{}\[\]\/\s]/,ht=/\\(\\)?/g,yt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,vt=/\w*$/,gt=/^[-+]0x[0-9a-f]+$/i,bt=/^0b[01]+$/i,mt=/^\[object .+?Constructor\]$/,Ot=/^0o[0-7]+$/i,_t=/^(?:0|[1-9]\d*)$/,wt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,jt=/($^)/,xt=/['\n\r\u2028\u2029\\]/g,Et="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",St="\\u2700-\\u27bf",Pt="a-z\\xdf-\\xf6\\xf8-\\xff",At="A-Z\\xc0-\\xd6\\xd8-\\xde",kt="\\ufe0e\\ufe0f",Dt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Tt="['’]",Mt="[\\ud800-\\udfff]",Nt="["+Dt+"]",Ct="["+Et+"]",Rt="\\d+",It="[\\u2700-\\u27bf]",Lt="["+Pt+"]",zt="[^\\ud800-\\udfff"+Dt+Rt+St+Pt+At+"]",Bt="\\ud83c[\\udffb-\\udfff]",Ut="[^\\ud800-\\udfff]",Ft="(?:\\ud83c[\\udde6-\\uddff]){2}",Ht="[\\ud800-\\udbff][\\udc00-\\udfff]",Xt="["+At+"]",Gt="(?:"+Lt+"|"+zt+")",Yt="(?:"+Xt+"|"+zt+")",Vt="(?:['’](?:d|ll|m|re|s|t|ve))?",Wt="(?:['’](?:D|LL|M|RE|S|T|VE))?",Kt="(?:"+Ct+"|"+Bt+")"+"?",$t="[\\ufe0e\\ufe0f]?",Zt=$t+Kt+("(?:\\u200d(?:"+[Ut,Ft,Ht].join("|")+")"+$t+Kt+")*"),qt="(?:"+[It,Ft,Ht].join("|")+")"+Zt,Jt="(?:"+[Ut+Ct+"?",Ct,Ft,Ht,Mt].join("|")+")",Qt=RegExp(Tt,"g"),te=RegExp(Ct,"g"),ee=RegExp(Bt+"(?="+Bt+")|"+Jt+Zt,"g"),re=RegExp([Xt+"?"+Lt+"+"+Vt+"(?="+[Nt,Xt,"$"].join("|")+")",Yt+"+"+Wt+"(?="+[Nt,Xt+Gt,"$"].join("|")+")",Xt+"?"+Gt+"+"+Vt,Xt+"+"+Wt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Rt,qt].join("|"),"g"),ne=RegExp("[\\u200d\\ud800-\\udfff"+Et+kt+"]"),oe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ie=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ue=-1,ae={};ae[L]=ae[z]=ae[B]=ae[U]=ae[F]=ae[H]=ae[X]=ae[G]=ae[Y]=!0,ae[m]=ae[O]=ae[R]=ae[_]=ae[I]=ae[w]=ae[j]=ae[x]=ae[S]=ae[P]=ae[A]=ae[D]=ae[T]=ae[M]=ae[C]=!1;var ce={};ce[m]=ce[O]=ce[R]=ce[I]=ce[_]=ce[w]=ce[L]=ce[z]=ce[B]=ce[U]=ce[F]=ce[S]=ce[P]=ce[A]=ce[D]=ce[T]=ce[M]=ce[N]=ce[H]=ce[X]=ce[G]=ce[Y]=!0,ce[j]=ce[x]=ce[C]=!1;var se={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},le=parseFloat,fe=parseInt,pe="object"==typeof t&&t&&t.Object===Object&&t,de="object"==typeof self&&self&&self.Object===Object&&self,he=pe||de||Function("return this")(),ye=e&&!e.nodeType&&e,ve=ye&&"object"==typeof n&&n&&!n.nodeType&&n,ge=ve&&ve.exports===ye,be=ge&&pe.process,me=function(){try{var t=ve&&ve.require&&ve.require("util").types;return t||be&&be.binding&&be.binding("util")}catch(t){}}(),Oe=me&&me.isArrayBuffer,_e=me&&me.isDate,we=me&&me.isMap,je=me&&me.isRegExp,xe=me&&me.isSet,Ee=me&&me.isTypedArray;function Se(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function Pe(t,e,r,n){for(var o=-1,i=null==t?0:t.length;++o<i;){var u=t[o];e(n,u,r(u),t)}return n}function Ae(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t}function ke(t,e){for(var r=null==t?0:t.length;r--&&!1!==e(t[r],r,t););return t}function De(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(!e(t[r],r,t))return!1;return!0}function Te(t,e){for(var r=-1,n=null==t?0:t.length,o=0,i=[];++r<n;){var u=t[r];e(u,r,t)&&(i[o++]=u)}return i}function Me(t,e){return!!(null==t?0:t.length)&&He(t,e,0)>-1}function Ne(t,e,r){for(var n=-1,o=null==t?0:t.length;++n<o;)if(r(e,t[n]))return!0;return!1}function Ce(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o}function Re(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}function Ie(t,e,r,n){var o=-1,i=null==t?0:t.length;for(n&&i&&(r=t[++o]);++o<i;)r=e(r,t[o],o,t);return r}function Le(t,e,r,n){var o=null==t?0:t.length;for(n&&o&&(r=t[--o]);o--;)r=e(r,t[o],o,t);return r}function ze(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}var Be=Ve("length");function Ue(t,e,r){var n;return r(t,(function(t,r,o){if(e(t,r,o))return n=r,!1})),n}function Fe(t,e,r,n){for(var o=t.length,i=r+(n?1:-1);n?i--:++i<o;)if(e(t[i],i,t))return i;return-1}function He(t,e,r){return e==e?function(t,e,r){var n=r-1,o=t.length;for(;++n<o;)if(t[n]===e)return n;return-1}(t,e,r):Fe(t,Ge,r)}function Xe(t,e,r,n){for(var o=r-1,i=t.length;++o<i;)if(n(t[o],e))return o;return-1}function Ge(t){return t!=t}function Ye(t,e){var r=null==t?0:t.length;return r?$e(t,e)/r:v}function Ve(t){return function(e){return null==e?i:e[t]}}function We(t){return function(e){return null==t?i:t[e]}}function Ke(t,e,r,n,o){return o(t,(function(t,o,i){r=n?(n=!1,t):e(r,t,o,i)})),r}function $e(t,e){for(var r,n=-1,o=t.length;++n<o;){var u=e(t[n]);u!==i&&(r=r===i?u:r+u)}return r}function Ze(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}function qe(t){return t?t.slice(0,yr(t)+1).replace(at,""):t}function Je(t){return function(e){return t(e)}}function Qe(t,e){return Ce(e,(function(e){return t[e]}))}function tr(t,e){return t.has(e)}function er(t,e){for(var r=-1,n=t.length;++r<n&&He(e,t[r],0)>-1;);return r}function rr(t,e){for(var r=t.length;r--&&He(e,t[r],0)>-1;);return r}function nr(t,e){for(var r=t.length,n=0;r--;)t[r]===e&&++n;return n}var or=We({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),ir=We({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function ur(t){return"\\"+se[t]}function ar(t){return ne.test(t)}function cr(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r}function sr(t,e){return function(r){return t(e(r))}}function lr(t,e){for(var r=-1,n=t.length,o=0,i=[];++r<n;){var u=t[r];u!==e&&u!==c||(t[r]=c,i[o++]=r)}return i}function fr(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r}function pr(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=[t,t]})),r}function dr(t){return ar(t)?function(t){var e=ee.lastIndex=0;for(;ee.test(t);)++e;return e}(t):Be(t)}function hr(t){return ar(t)?function(t){return t.match(ee)||[]}(t):function(t){return t.split("")}(t)}function yr(t){for(var e=t.length;e--&&ct.test(t.charAt(e)););return e}var vr=We({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var gr=function t(e){var r,n=(e=null==e?he:gr.defaults(he.Object(),e,gr.pick(he,ie))).Array,o=e.Date,ct=e.Error,Et=e.Function,St=e.Math,Pt=e.Object,At=e.RegExp,kt=e.String,Dt=e.TypeError,Tt=n.prototype,Mt=Et.prototype,Nt=Pt.prototype,Ct=e["__core-js_shared__"],Rt=Mt.toString,It=Nt.hasOwnProperty,Lt=0,zt=(r=/[^.]+$/.exec(Ct&&Ct.keys&&Ct.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",Bt=Nt.toString,Ut=Rt.call(Pt),Ft=he._,Ht=At("^"+Rt.call(It).replace(it,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Xt=ge?e.Buffer:i,Gt=e.Symbol,Yt=e.Uint8Array,Vt=Xt?Xt.allocUnsafe:i,Wt=sr(Pt.getPrototypeOf,Pt),Kt=Pt.create,$t=Nt.propertyIsEnumerable,Zt=Tt.splice,qt=Gt?Gt.isConcatSpreadable:i,Jt=Gt?Gt.iterator:i,ee=Gt?Gt.toStringTag:i,ne=function(){try{var t=hi(Pt,"defineProperty");return t({},"",{}),t}catch(t){}}(),se=e.clearTimeout!==he.clearTimeout&&e.clearTimeout,pe=o&&o.now!==he.Date.now&&o.now,de=e.setTimeout!==he.setTimeout&&e.setTimeout,ye=St.ceil,ve=St.floor,be=Pt.getOwnPropertySymbols,me=Xt?Xt.isBuffer:i,Be=e.isFinite,We=Tt.join,br=sr(Pt.keys,Pt),mr=St.max,Or=St.min,_r=o.now,wr=e.parseInt,jr=St.random,xr=Tt.reverse,Er=hi(e,"DataView"),Sr=hi(e,"Map"),Pr=hi(e,"Promise"),Ar=hi(e,"Set"),kr=hi(e,"WeakMap"),Dr=hi(Pt,"create"),Tr=kr&&new kr,Mr={},Nr=Fi(Er),Cr=Fi(Sr),Rr=Fi(Pr),Ir=Fi(Ar),Lr=Fi(kr),zr=Gt?Gt.prototype:i,Br=zr?zr.valueOf:i,Ur=zr?zr.toString:i;function Fr(t){if(oa(t)&&!Wu(t)&&!(t instanceof Yr)){if(t instanceof Gr)return t;if(It.call(t,"__wrapped__"))return Hi(t)}return new Gr(t)}var Hr=function(){function t(){}return function(e){if(!na(e))return{};if(Kt)return Kt(e);t.prototype=e;var r=new t;return t.prototype=i,r}}();function Xr(){}function Gr(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=i}function Yr(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=g,this.__views__=[]}function Vr(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Wr(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Kr(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function $r(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new Kr;++e<r;)this.add(t[e])}function Zr(t){var e=this.__data__=new Wr(t);this.size=e.size}function qr(t,e){var r=Wu(t),n=!r&&Vu(t),o=!r&&!n&&qu(t),i=!r&&!n&&!o&&pa(t),u=r||n||o||i,a=u?Ze(t.length,kt):[],c=a.length;for(var s in t)!e&&!It.call(t,s)||u&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||_i(s,c))||a.push(s);return a}function Jr(t){var e=t.length;return e?t[Zn(0,e-1)]:i}function Qr(t,e){return zi(Mo(t),sn(e,0,t.length))}function tn(t){return zi(Mo(t))}function en(t,e,r){(r!==i&&!Xu(t[e],r)||r===i&&!(e in t))&&an(t,e,r)}function rn(t,e,r){var n=t[e];It.call(t,e)&&Xu(n,r)&&(r!==i||e in t)||an(t,e,r)}function nn(t,e){for(var r=t.length;r--;)if(Xu(t[r][0],e))return r;return-1}function on(t,e,r,n){return hn(t,(function(t,o,i){e(n,t,r(t),i)})),n}function un(t,e){return t&&No(e,Ca(e),t)}function an(t,e,r){"__proto__"==e&&ne?ne(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function cn(t,e){for(var r=-1,o=e.length,u=n(o),a=null==t;++r<o;)u[r]=a?i:ka(t,e[r]);return u}function sn(t,e,r){return t==t&&(r!==i&&(t=t<=r?t:r),e!==i&&(t=t>=e?t:e)),t}function ln(t,e,r,n,o,u){var a,c=1&e,s=2&e,l=4&e;if(r&&(a=o?r(t,n,o,u):r(t)),a!==i)return a;if(!na(t))return t;var f=Wu(t);if(f){if(a=function(t){var e=t.length,r=new t.constructor(e);e&&"string"==typeof t[0]&&It.call(t,"index")&&(r.index=t.index,r.input=t.input);return r}(t),!c)return Mo(t,a)}else{var p=gi(t),d=p==x||p==E;if(qu(t))return So(t,c);if(p==A||p==m||d&&!o){if(a=s||d?{}:mi(t),!c)return s?function(t,e){return No(t,vi(t),e)}(t,function(t,e){return t&&No(e,Ra(e),t)}(a,t)):function(t,e){return No(t,yi(t),e)}(t,un(a,t))}else{if(!ce[p])return o?t:{};a=function(t,e,r){var n=t.constructor;switch(e){case R:return Po(t);case _:case w:return new n(+t);case I:return function(t,e){var r=e?Po(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}(t,r);case L:case z:case B:case U:case F:case H:case X:case G:case Y:return Ao(t,r);case S:return new n;case P:case M:return new n(t);case D:return function(t){var e=new t.constructor(t.source,vt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case T:return new n;case N:return o=t,Br?Pt(Br.call(o)):{}}var o}(t,p,c)}}u||(u=new Zr);var h=u.get(t);if(h)return h;u.set(t,a),sa(t)?t.forEach((function(n){a.add(ln(n,e,r,n,t,u))})):ia(t)&&t.forEach((function(n,o){a.set(o,ln(n,e,r,o,t,u))}));var y=f?i:(l?s?ai:ui:s?Ra:Ca)(t);return Ae(y||t,(function(n,o){y&&(n=t[o=n]),rn(a,o,ln(n,e,r,o,t,u))})),a}function fn(t,e,r){var n=r.length;if(null==t)return!n;for(t=Pt(t);n--;){var o=r[n],u=e[o],a=t[o];if(a===i&&!(o in t)||!u(a))return!1}return!0}function pn(t,e,r){if("function"!=typeof t)throw new Dt(u);return Ci((function(){t.apply(i,r)}),e)}function dn(t,e,r,n){var o=-1,i=Me,u=!0,a=t.length,c=[],s=e.length;if(!a)return c;r&&(e=Ce(e,Je(r))),n?(i=Ne,u=!1):e.length>=200&&(i=tr,u=!1,e=new $r(e));t:for(;++o<a;){var l=t[o],f=null==r?l:r(l);if(l=n||0!==l?l:0,u&&f==f){for(var p=s;p--;)if(e[p]===f)continue t;c.push(l)}else i(e,f,n)||c.push(l)}return c}Fr.templateSettings={escape:Q,evaluate:tt,interpolate:et,variable:"",imports:{_:Fr}},Fr.prototype=Xr.prototype,Fr.prototype.constructor=Fr,Gr.prototype=Hr(Xr.prototype),Gr.prototype.constructor=Gr,Yr.prototype=Hr(Xr.prototype),Yr.prototype.constructor=Yr,Vr.prototype.clear=function(){this.__data__=Dr?Dr(null):{},this.size=0},Vr.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Vr.prototype.get=function(t){var e=this.__data__;if(Dr){var r=e[t];return r===a?i:r}return It.call(e,t)?e[t]:i},Vr.prototype.has=function(t){var e=this.__data__;return Dr?e[t]!==i:It.call(e,t)},Vr.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Dr&&e===i?a:e,this},Wr.prototype.clear=function(){this.__data__=[],this.size=0},Wr.prototype.delete=function(t){var e=this.__data__,r=nn(e,t);return!(r<0)&&(r==e.length-1?e.pop():Zt.call(e,r,1),--this.size,!0)},Wr.prototype.get=function(t){var e=this.__data__,r=nn(e,t);return r<0?i:e[r][1]},Wr.prototype.has=function(t){return nn(this.__data__,t)>-1},Wr.prototype.set=function(t,e){var r=this.__data__,n=nn(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this},Kr.prototype.clear=function(){this.size=0,this.__data__={hash:new Vr,map:new(Sr||Wr),string:new Vr}},Kr.prototype.delete=function(t){var e=pi(this,t).delete(t);return this.size-=e?1:0,e},Kr.prototype.get=function(t){return pi(this,t).get(t)},Kr.prototype.has=function(t){return pi(this,t).has(t)},Kr.prototype.set=function(t,e){var r=pi(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this},$r.prototype.add=$r.prototype.push=function(t){return this.__data__.set(t,a),this},$r.prototype.has=function(t){return this.__data__.has(t)},Zr.prototype.clear=function(){this.__data__=new Wr,this.size=0},Zr.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},Zr.prototype.get=function(t){return this.__data__.get(t)},Zr.prototype.has=function(t){return this.__data__.has(t)},Zr.prototype.set=function(t,e){var r=this.__data__;if(r instanceof Wr){var n=r.__data__;if(!Sr||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new Kr(n)}return r.set(t,e),this.size=r.size,this};var hn=Io(wn),yn=Io(jn,!0);function vn(t,e){var r=!0;return hn(t,(function(t,n,o){return r=!!e(t,n,o)})),r}function gn(t,e,r){for(var n=-1,o=t.length;++n<o;){var u=t[n],a=e(u);if(null!=a&&(c===i?a==a&&!fa(a):r(a,c)))var c=a,s=u}return s}function bn(t,e){var r=[];return hn(t,(function(t,n,o){e(t,n,o)&&r.push(t)})),r}function mn(t,e,r,n,o){var i=-1,u=t.length;for(r||(r=Oi),o||(o=[]);++i<u;){var a=t[i];e>0&&r(a)?e>1?mn(a,e-1,r,n,o):Re(o,a):n||(o[o.length]=a)}return o}var On=Lo(),_n=Lo(!0);function wn(t,e){return t&&On(t,e,Ca)}function jn(t,e){return t&&_n(t,e,Ca)}function xn(t,e){return Te(e,(function(e){return ta(t[e])}))}function En(t,e){for(var r=0,n=(e=wo(e,t)).length;null!=t&&r<n;)t=t[Ui(e[r++])];return r&&r==n?t:i}function Sn(t,e,r){var n=e(t);return Wu(t)?n:Re(n,r(t))}function Pn(t){return null==t?t===i?"[object Undefined]":"[object Null]":ee&&ee in Pt(t)?function(t){var e=It.call(t,ee),r=t[ee];try{t[ee]=i;var n=!0}catch(t){}var o=Bt.call(t);n&&(e?t[ee]=r:delete t[ee]);return o}(t):function(t){return Bt.call(t)}(t)}function An(t,e){return t>e}function kn(t,e){return null!=t&&It.call(t,e)}function Dn(t,e){return null!=t&&e in Pt(t)}function Tn(t,e,r){for(var o=r?Ne:Me,u=t[0].length,a=t.length,c=a,s=n(a),l=1/0,f=[];c--;){var p=t[c];c&&e&&(p=Ce(p,Je(e))),l=Or(p.length,l),s[c]=!r&&(e||u>=120&&p.length>=120)?new $r(c&&p):i}p=t[0];var d=-1,h=s[0];t:for(;++d<u&&f.length<l;){var y=p[d],v=e?e(y):y;if(y=r||0!==y?y:0,!(h?tr(h,v):o(f,v,r))){for(c=a;--c;){var g=s[c];if(!(g?tr(g,v):o(t[c],v,r)))continue t}h&&h.push(v),f.push(y)}}return f}function Mn(t,e,r){var n=null==(t=Di(t,e=wo(e,t)))?t:t[Ui(Qi(e))];return null==n?i:Se(n,t,r)}function Nn(t){return oa(t)&&Pn(t)==m}function Cn(t,e,r,n,o){return t===e||(null==t||null==e||!oa(t)&&!oa(e)?t!=t&&e!=e:function(t,e,r,n,o,u){var a=Wu(t),c=Wu(e),s=a?O:gi(t),l=c?O:gi(e),f=(s=s==m?A:s)==A,p=(l=l==m?A:l)==A,d=s==l;if(d&&qu(t)){if(!qu(e))return!1;a=!0,f=!1}if(d&&!f)return u||(u=new Zr),a||pa(t)?oi(t,e,r,n,o,u):function(t,e,r,n,o,i,u){switch(r){case I:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case R:return!(t.byteLength!=e.byteLength||!i(new Yt(t),new Yt(e)));case _:case w:case P:return Xu(+t,+e);case j:return t.name==e.name&&t.message==e.message;case D:case M:return t==e+"";case S:var a=cr;case T:var c=1&n;if(a||(a=fr),t.size!=e.size&&!c)return!1;var s=u.get(t);if(s)return s==e;n|=2,u.set(t,e);var l=oi(a(t),a(e),n,o,i,u);return u.delete(t),l;case N:if(Br)return Br.call(t)==Br.call(e)}return!1}(t,e,s,r,n,o,u);if(!(1&r)){var h=f&&It.call(t,"__wrapped__"),y=p&&It.call(e,"__wrapped__");if(h||y){var v=h?t.value():t,g=y?e.value():e;return u||(u=new Zr),o(v,g,r,n,u)}}if(!d)return!1;return u||(u=new Zr),function(t,e,r,n,o,u){var a=1&r,c=ui(t),s=c.length,l=ui(e).length;if(s!=l&&!a)return!1;var f=s;for(;f--;){var p=c[f];if(!(a?p in e:It.call(e,p)))return!1}var d=u.get(t),h=u.get(e);if(d&&h)return d==e&&h==t;var y=!0;u.set(t,e),u.set(e,t);var v=a;for(;++f<s;){var g=t[p=c[f]],b=e[p];if(n)var m=a?n(b,g,p,e,t,u):n(g,b,p,t,e,u);if(!(m===i?g===b||o(g,b,r,n,u):m)){y=!1;break}v||(v="constructor"==p)}if(y&&!v){var O=t.constructor,_=e.constructor;O==_||!("constructor"in t)||!("constructor"in e)||"function"==typeof O&&O instanceof O&&"function"==typeof _&&_ instanceof _||(y=!1)}return u.delete(t),u.delete(e),y}(t,e,r,n,o,u)}(t,e,r,n,Cn,o))}function Rn(t,e,r,n){var o=r.length,u=o,a=!n;if(null==t)return!u;for(t=Pt(t);o--;){var c=r[o];if(a&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++o<u;){var s=(c=r[o])[0],l=t[s],f=c[1];if(a&&c[2]){if(l===i&&!(s in t))return!1}else{var p=new Zr;if(n)var d=n(l,f,s,t,e,p);if(!(d===i?Cn(f,l,3,n,p):d))return!1}}return!0}function In(t){return!(!na(t)||(e=t,zt&&zt in e))&&(ta(t)?Ht:mt).test(Fi(t));var e}function Ln(t){return"function"==typeof t?t:null==t?uc:"object"==typeof t?Wu(t)?Xn(t[0],t[1]):Hn(t):yc(t)}function zn(t){if(!Si(t))return br(t);var e=[];for(var r in Pt(t))It.call(t,r)&&"constructor"!=r&&e.push(r);return e}function Bn(t){if(!na(t))return function(t){var e=[];if(null!=t)for(var r in Pt(t))e.push(r);return e}(t);var e=Si(t),r=[];for(var n in t)("constructor"!=n||!e&&It.call(t,n))&&r.push(n);return r}function Un(t,e){return t<e}function Fn(t,e){var r=-1,o=$u(t)?n(t.length):[];return hn(t,(function(t,n,i){o[++r]=e(t,n,i)})),o}function Hn(t){var e=di(t);return 1==e.length&&e[0][2]?Ai(e[0][0],e[0][1]):function(r){return r===t||Rn(r,t,e)}}function Xn(t,e){return ji(t)&&Pi(e)?Ai(Ui(t),e):function(r){var n=ka(r,t);return n===i&&n===e?Da(r,t):Cn(e,n,3)}}function Gn(t,e,r,n,o){t!==e&&On(e,(function(u,a){if(o||(o=new Zr),na(u))!function(t,e,r,n,o,u,a){var c=Mi(t,r),s=Mi(e,r),l=a.get(s);if(l)return void en(t,r,l);var f=u?u(c,s,r+"",t,e,a):i,p=f===i;if(p){var d=Wu(s),h=!d&&qu(s),y=!d&&!h&&pa(s);f=s,d||h||y?Wu(c)?f=c:Zu(c)?f=Mo(c):h?(p=!1,f=So(s,!0)):y?(p=!1,f=Ao(s,!0)):f=[]:aa(s)||Vu(s)?(f=c,Vu(c)?f=Oa(c):na(c)&&!ta(c)||(f=mi(s))):p=!1}p&&(a.set(s,f),o(f,s,n,u,a),a.delete(s));en(t,r,f)}(t,e,a,r,Gn,n,o);else{var c=n?n(Mi(t,a),u,a+"",t,e,o):i;c===i&&(c=u),en(t,a,c)}}),Ra)}function Yn(t,e){var r=t.length;if(r)return _i(e+=e<0?r:0,r)?t[e]:i}function Vn(t,e,r){e=e.length?Ce(e,(function(t){return Wu(t)?function(e){return En(e,1===t.length?t[0]:t)}:t})):[uc];var n=-1;e=Ce(e,Je(fi()));var o=Fn(t,(function(t,r,o){var i=Ce(e,(function(e){return e(t)}));return{criteria:i,index:++n,value:t}}));return function(t,e){var r=t.length;for(t.sort(e);r--;)t[r]=t[r].value;return t}(o,(function(t,e){return function(t,e,r){var n=-1,o=t.criteria,i=e.criteria,u=o.length,a=r.length;for(;++n<u;){var c=ko(o[n],i[n]);if(c)return n>=a?c:c*("desc"==r[n]?-1:1)}return t.index-e.index}(t,e,r)}))}function Wn(t,e,r){for(var n=-1,o=e.length,i={};++n<o;){var u=e[n],a=En(t,u);r(a,u)&&eo(i,wo(u,t),a)}return i}function Kn(t,e,r,n){var o=n?Xe:He,i=-1,u=e.length,a=t;for(t===e&&(e=Mo(e)),r&&(a=Ce(t,Je(r)));++i<u;)for(var c=0,s=e[i],l=r?r(s):s;(c=o(a,l,c,n))>-1;)a!==t&&Zt.call(a,c,1),Zt.call(t,c,1);return t}function $n(t,e){for(var r=t?e.length:0,n=r-1;r--;){var o=e[r];if(r==n||o!==i){var i=o;_i(o)?Zt.call(t,o,1):ho(t,o)}}return t}function Zn(t,e){return t+ve(jr()*(e-t+1))}function qn(t,e){var r="";if(!t||e<1||e>y)return r;do{e%2&&(r+=t),(e=ve(e/2))&&(t+=t)}while(e);return r}function Jn(t,e){return Ri(ki(t,e,uc),t+"")}function Qn(t){return Jr(Xa(t))}function to(t,e){var r=Xa(t);return zi(r,sn(e,0,r.length))}function eo(t,e,r,n){if(!na(t))return t;for(var o=-1,u=(e=wo(e,t)).length,a=u-1,c=t;null!=c&&++o<u;){var s=Ui(e[o]),l=r;if("__proto__"===s||"constructor"===s||"prototype"===s)return t;if(o!=a){var f=c[s];(l=n?n(f,s,c):i)===i&&(l=na(f)?f:_i(e[o+1])?[]:{})}rn(c,s,l),c=c[s]}return t}var ro=Tr?function(t,e){return Tr.set(t,e),t}:uc,no=ne?function(t,e){return ne(t,"toString",{configurable:!0,enumerable:!1,value:nc(e),writable:!0})}:uc;function oo(t){return zi(Xa(t))}function io(t,e,r){var o=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(r=r>i?i:r)<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var u=n(i);++o<i;)u[o]=t[o+e];return u}function uo(t,e){var r;return hn(t,(function(t,n,o){return!(r=e(t,n,o))})),!!r}function ao(t,e,r){var n=0,o=null==t?n:t.length;if("number"==typeof e&&e==e&&o<=2147483647){for(;n<o;){var i=n+o>>>1,u=t[i];null!==u&&!fa(u)&&(r?u<=e:u<e)?n=i+1:o=i}return o}return co(t,e,uc,r)}function co(t,e,r,n){var o=0,u=null==t?0:t.length;if(0===u)return 0;for(var a=(e=r(e))!=e,c=null===e,s=fa(e),l=e===i;o<u;){var f=ve((o+u)/2),p=r(t[f]),d=p!==i,h=null===p,y=p==p,v=fa(p);if(a)var g=n||y;else g=l?y&&(n||d):c?y&&d&&(n||!h):s?y&&d&&!h&&(n||!v):!h&&!v&&(n?p<=e:p<e);g?o=f+1:u=f}return Or(u,4294967294)}function so(t,e){for(var r=-1,n=t.length,o=0,i=[];++r<n;){var u=t[r],a=e?e(u):u;if(!r||!Xu(a,c)){var c=a;i[o++]=0===u?0:u}}return i}function lo(t){return"number"==typeof t?t:fa(t)?v:+t}function fo(t){if("string"==typeof t)return t;if(Wu(t))return Ce(t,fo)+"";if(fa(t))return Ur?Ur.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function po(t,e,r){var n=-1,o=Me,i=t.length,u=!0,a=[],c=a;if(r)u=!1,o=Ne;else if(i>=200){var s=e?null:Jo(t);if(s)return fr(s);u=!1,o=tr,c=new $r}else c=e?[]:a;t:for(;++n<i;){var l=t[n],f=e?e(l):l;if(l=r||0!==l?l:0,u&&f==f){for(var p=c.length;p--;)if(c[p]===f)continue t;e&&c.push(f),a.push(l)}else o(c,f,r)||(c!==a&&c.push(f),a.push(l))}return a}function ho(t,e){return null==(t=Di(t,e=wo(e,t)))||delete t[Ui(Qi(e))]}function yo(t,e,r,n){return eo(t,e,r(En(t,e)),n)}function vo(t,e,r,n){for(var o=t.length,i=n?o:-1;(n?i--:++i<o)&&e(t[i],i,t););return r?io(t,n?0:i,n?i+1:o):io(t,n?i+1:0,n?o:i)}function go(t,e){var r=t;return r instanceof Yr&&(r=r.value()),Ie(e,(function(t,e){return e.func.apply(e.thisArg,Re([t],e.args))}),r)}function bo(t,e,r){var o=t.length;if(o<2)return o?po(t[0]):[];for(var i=-1,u=n(o);++i<o;)for(var a=t[i],c=-1;++c<o;)c!=i&&(u[i]=dn(u[i]||a,t[c],e,r));return po(mn(u,1),e,r)}function mo(t,e,r){for(var n=-1,o=t.length,u=e.length,a={};++n<o;){var c=n<u?e[n]:i;r(a,t[n],c)}return a}function Oo(t){return Zu(t)?t:[]}function _o(t){return"function"==typeof t?t:uc}function wo(t,e){return Wu(t)?t:ji(t,e)?[t]:Bi(_a(t))}var jo=Jn;function xo(t,e,r){var n=t.length;return r=r===i?n:r,!e&&r>=n?t:io(t,e,r)}var Eo=se||function(t){return he.clearTimeout(t)};function So(t,e){if(e)return t.slice();var r=t.length,n=Vt?Vt(r):new t.constructor(r);return t.copy(n),n}function Po(t){var e=new t.constructor(t.byteLength);return new Yt(e).set(new Yt(t)),e}function Ao(t,e){var r=e?Po(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function ko(t,e){if(t!==e){var r=t!==i,n=null===t,o=t==t,u=fa(t),a=e!==i,c=null===e,s=e==e,l=fa(e);if(!c&&!l&&!u&&t>e||u&&a&&s&&!c&&!l||n&&a&&s||!r&&s||!o)return 1;if(!n&&!u&&!l&&t<e||l&&r&&o&&!n&&!u||c&&r&&o||!a&&o||!s)return-1}return 0}function Do(t,e,r,o){for(var i=-1,u=t.length,a=r.length,c=-1,s=e.length,l=mr(u-a,0),f=n(s+l),p=!o;++c<s;)f[c]=e[c];for(;++i<a;)(p||i<u)&&(f[r[i]]=t[i]);for(;l--;)f[c++]=t[i++];return f}function To(t,e,r,o){for(var i=-1,u=t.length,a=-1,c=r.length,s=-1,l=e.length,f=mr(u-c,0),p=n(f+l),d=!o;++i<f;)p[i]=t[i];for(var h=i;++s<l;)p[h+s]=e[s];for(;++a<c;)(d||i<u)&&(p[h+r[a]]=t[i++]);return p}function Mo(t,e){var r=-1,o=t.length;for(e||(e=n(o));++r<o;)e[r]=t[r];return e}function No(t,e,r,n){var o=!r;r||(r={});for(var u=-1,a=e.length;++u<a;){var c=e[u],s=n?n(r[c],t[c],c,r,t):i;s===i&&(s=t[c]),o?an(r,c,s):rn(r,c,s)}return r}function Co(t,e){return function(r,n){var o=Wu(r)?Pe:on,i=e?e():{};return o(r,t,fi(n,2),i)}}function Ro(t){return Jn((function(e,r){var n=-1,o=r.length,u=o>1?r[o-1]:i,a=o>2?r[2]:i;for(u=t.length>3&&"function"==typeof u?(o--,u):i,a&&wi(r[0],r[1],a)&&(u=o<3?i:u,o=1),e=Pt(e);++n<o;){var c=r[n];c&&t(e,c,n,u)}return e}))}function Io(t,e){return function(r,n){if(null==r)return r;if(!$u(r))return t(r,n);for(var o=r.length,i=e?o:-1,u=Pt(r);(e?i--:++i<o)&&!1!==n(u[i],i,u););return r}}function Lo(t){return function(e,r,n){for(var o=-1,i=Pt(e),u=n(e),a=u.length;a--;){var c=u[t?a:++o];if(!1===r(i[c],c,i))break}return e}}function zo(t){return function(e){var r=ar(e=_a(e))?hr(e):i,n=r?r[0]:e.charAt(0),o=r?xo(r,1).join(""):e.slice(1);return n[t]()+o}}function Bo(t){return function(e){return Ie(tc(Va(e).replace(Qt,"")),t,"")}}function Uo(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var r=Hr(t.prototype),n=t.apply(r,e);return na(n)?n:r}}function Fo(t){return function(e,r,n){var o=Pt(e);if(!$u(e)){var u=fi(r,3);e=Ca(e),r=function(t){return u(o[t],t,o)}}var a=t(e,r,n);return a>-1?o[u?e[a]:a]:i}}function Ho(t){return ii((function(e){var r=e.length,n=r,o=Gr.prototype.thru;for(t&&e.reverse();n--;){var a=e[n];if("function"!=typeof a)throw new Dt(u);if(o&&!c&&"wrapper"==si(a))var c=new Gr([],!0)}for(n=c?n:r;++n<r;){var s=si(a=e[n]),l="wrapper"==s?ci(a):i;c=l&&xi(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?c[si(l[0])].apply(c,l[3]):1==a.length&&xi(a)?c[s]():c.thru(a)}return function(){var t=arguments,n=t[0];if(c&&1==t.length&&Wu(n))return c.plant(n).value();for(var o=0,i=r?e[o].apply(this,t):n;++o<r;)i=e[o].call(this,i);return i}}))}function Xo(t,e,r,o,u,a,c,s,l,f){var d=e&p,h=1&e,y=2&e,v=24&e,g=512&e,b=y?i:Uo(t);return function i(){for(var p=arguments.length,m=n(p),O=p;O--;)m[O]=arguments[O];if(v)var _=li(i),w=nr(m,_);if(o&&(m=Do(m,o,u,v)),a&&(m=To(m,a,c,v)),p-=w,v&&p<f){var j=lr(m,_);return Zo(t,e,Xo,i.placeholder,r,m,j,s,l,f-p)}var x=h?r:this,E=y?x[t]:t;return p=m.length,s?m=Ti(m,s):g&&p>1&&m.reverse(),d&&l<p&&(m.length=l),this&&this!==he&&this instanceof i&&(E=b||Uo(E)),E.apply(x,m)}}function Go(t,e){return function(r,n){return function(t,e,r,n){return wn(t,(function(t,o,i){e(n,r(t),o,i)})),n}(r,t,e(n),{})}}function Yo(t,e){return function(r,n){var o;if(r===i&&n===i)return e;if(r!==i&&(o=r),n!==i){if(o===i)return n;"string"==typeof r||"string"==typeof n?(r=fo(r),n=fo(n)):(r=lo(r),n=lo(n)),o=t(r,n)}return o}}function Vo(t){return ii((function(e){return e=Ce(e,Je(fi())),Jn((function(r){var n=this;return t(e,(function(t){return Se(t,n,r)}))}))}))}function Wo(t,e){var r=(e=e===i?" ":fo(e)).length;if(r<2)return r?qn(e,t):e;var n=qn(e,ye(t/dr(e)));return ar(e)?xo(hr(n),0,t).join(""):n.slice(0,t)}function Ko(t){return function(e,r,o){return o&&"number"!=typeof o&&wi(e,r,o)&&(r=o=i),e=va(e),r===i?(r=e,e=0):r=va(r),function(t,e,r,o){for(var i=-1,u=mr(ye((e-t)/(r||1)),0),a=n(u);u--;)a[o?u:++i]=t,t+=r;return a}(e,r,o=o===i?e<r?1:-1:va(o),t)}}function $o(t){return function(e,r){return"string"==typeof e&&"string"==typeof r||(e=ma(e),r=ma(r)),t(e,r)}}function Zo(t,e,r,n,o,u,a,c,s,p){var d=8&e;e|=d?l:f,4&(e&=~(d?f:l))||(e&=-4);var h=[t,e,o,d?u:i,d?a:i,d?i:u,d?i:a,c,s,p],y=r.apply(i,h);return xi(t)&&Ni(y,h),y.placeholder=n,Ii(y,t,e)}function qo(t){var e=St[t];return function(t,r){if(t=ma(t),(r=null==r?0:Or(ga(r),292))&&Be(t)){var n=(_a(t)+"e").split("e");return+((n=(_a(e(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return e(t)}}var Jo=Ar&&1/fr(new Ar([,-0]))[1]==h?function(t){return new Ar(t)}:fc;function Qo(t){return function(e){var r=gi(e);return r==S?cr(e):r==T?pr(e):function(t,e){return Ce(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function ti(t,e,r,o,a,h,y,v){var g=2&e;if(!g&&"function"!=typeof t)throw new Dt(u);var b=o?o.length:0;if(b||(e&=-97,o=a=i),y=y===i?y:mr(ga(y),0),v=v===i?v:ga(v),b-=a?a.length:0,e&f){var m=o,O=a;o=a=i}var _=g?i:ci(t),w=[t,e,r,o,a,m,O,h,y,v];if(_&&function(t,e){var r=t[1],n=e[1],o=r|n,i=o<131,u=n==p&&8==r||n==p&&r==d&&t[7].length<=e[8]||384==n&&e[7].length<=e[8]&&8==r;if(!i&&!u)return t;1&n&&(t[2]=e[2],o|=1&r?0:4);var a=e[3];if(a){var s=t[3];t[3]=s?Do(s,a,e[4]):a,t[4]=s?lr(t[3],c):e[4]}(a=e[5])&&(s=t[5],t[5]=s?To(s,a,e[6]):a,t[6]=s?lr(t[5],c):e[6]);(a=e[7])&&(t[7]=a);n&p&&(t[8]=null==t[8]?e[8]:Or(t[8],e[8]));null==t[9]&&(t[9]=e[9]);t[0]=e[0],t[1]=o}(w,_),t=w[0],e=w[1],r=w[2],o=w[3],a=w[4],!(v=w[9]=w[9]===i?g?0:t.length:mr(w[9]-b,0))&&24&e&&(e&=-25),e&&1!=e)j=8==e||e==s?function(t,e,r){var o=Uo(t);return function u(){for(var a=arguments.length,c=n(a),s=a,l=li(u);s--;)c[s]=arguments[s];var f=a<3&&c[0]!==l&&c[a-1]!==l?[]:lr(c,l);return(a-=f.length)<r?Zo(t,e,Xo,u.placeholder,i,c,f,i,i,r-a):Se(this&&this!==he&&this instanceof u?o:t,this,c)}}(t,e,v):e!=l&&33!=e||a.length?Xo.apply(i,w):function(t,e,r,o){var i=1&e,u=Uo(t);return function e(){for(var a=-1,c=arguments.length,s=-1,l=o.length,f=n(l+c),p=this&&this!==he&&this instanceof e?u:t;++s<l;)f[s]=o[s];for(;c--;)f[s++]=arguments[++a];return Se(p,i?r:this,f)}}(t,e,r,o);else var j=function(t,e,r){var n=1&e,o=Uo(t);return function e(){return(this&&this!==he&&this instanceof e?o:t).apply(n?r:this,arguments)}}(t,e,r);return Ii((_?ro:Ni)(j,w),t,e)}function ei(t,e,r,n){return t===i||Xu(t,Nt[r])&&!It.call(n,r)?e:t}function ri(t,e,r,n,o,u){return na(t)&&na(e)&&(u.set(e,t),Gn(t,e,i,ri,u),u.delete(e)),t}function ni(t){return aa(t)?i:t}function oi(t,e,r,n,o,u){var a=1&r,c=t.length,s=e.length;if(c!=s&&!(a&&s>c))return!1;var l=u.get(t),f=u.get(e);if(l&&f)return l==e&&f==t;var p=-1,d=!0,h=2&r?new $r:i;for(u.set(t,e),u.set(e,t);++p<c;){var y=t[p],v=e[p];if(n)var g=a?n(v,y,p,e,t,u):n(y,v,p,t,e,u);if(g!==i){if(g)continue;d=!1;break}if(h){if(!ze(e,(function(t,e){if(!tr(h,e)&&(y===t||o(y,t,r,n,u)))return h.push(e)}))){d=!1;break}}else if(y!==v&&!o(y,v,r,n,u)){d=!1;break}}return u.delete(t),u.delete(e),d}function ii(t){return Ri(ki(t,i,Ki),t+"")}function ui(t){return Sn(t,Ca,yi)}function ai(t){return Sn(t,Ra,vi)}var ci=Tr?function(t){return Tr.get(t)}:fc;function si(t){for(var e=t.name+"",r=Mr[e],n=It.call(Mr,e)?r.length:0;n--;){var o=r[n],i=o.func;if(null==i||i==t)return o.name}return e}function li(t){return(It.call(Fr,"placeholder")?Fr:t).placeholder}function fi(){var t=Fr.iteratee||ac;return t=t===ac?Ln:t,arguments.length?t(arguments[0],arguments[1]):t}function pi(t,e){var r,n,o=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof e?"string":"hash"]:o.map}function di(t){for(var e=Ca(t),r=e.length;r--;){var n=e[r],o=t[n];e[r]=[n,o,Pi(o)]}return e}function hi(t,e){var r=function(t,e){return null==t?i:t[e]}(t,e);return In(r)?r:i}var yi=be?function(t){return null==t?[]:(t=Pt(t),Te(be(t),(function(e){return $t.call(t,e)})))}:bc,vi=be?function(t){for(var e=[];t;)Re(e,yi(t)),t=Wt(t);return e}:bc,gi=Pn;function bi(t,e,r){for(var n=-1,o=(e=wo(e,t)).length,i=!1;++n<o;){var u=Ui(e[n]);if(!(i=null!=t&&r(t,u)))break;t=t[u]}return i||++n!=o?i:!!(o=null==t?0:t.length)&&ra(o)&&_i(u,o)&&(Wu(t)||Vu(t))}function mi(t){return"function"!=typeof t.constructor||Si(t)?{}:Hr(Wt(t))}function Oi(t){return Wu(t)||Vu(t)||!!(qt&&t&&t[qt])}function _i(t,e){var r=typeof t;return!!(e=null==e?y:e)&&("number"==r||"symbol"!=r&&_t.test(t))&&t>-1&&t%1==0&&t<e}function wi(t,e,r){if(!na(r))return!1;var n=typeof e;return!!("number"==n?$u(r)&&_i(e,r.length):"string"==n&&e in r)&&Xu(r[e],t)}function ji(t,e){if(Wu(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!fa(t))||(nt.test(t)||!rt.test(t)||null!=e&&t in Pt(e))}function xi(t){var e=si(t),r=Fr[e];if("function"!=typeof r||!(e in Yr.prototype))return!1;if(t===r)return!0;var n=ci(r);return!!n&&t===n[0]}(Er&&gi(new Er(new ArrayBuffer(1)))!=I||Sr&&gi(new Sr)!=S||Pr&&gi(Pr.resolve())!=k||Ar&&gi(new Ar)!=T||kr&&gi(new kr)!=C)&&(gi=function(t){var e=Pn(t),r=e==A?t.constructor:i,n=r?Fi(r):"";if(n)switch(n){case Nr:return I;case Cr:return S;case Rr:return k;case Ir:return T;case Lr:return C}return e});var Ei=Ct?ta:mc;function Si(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Nt)}function Pi(t){return t==t&&!na(t)}function Ai(t,e){return function(r){return null!=r&&(r[t]===e&&(e!==i||t in Pt(r)))}}function ki(t,e,r){return e=mr(e===i?t.length-1:e,0),function(){for(var o=arguments,i=-1,u=mr(o.length-e,0),a=n(u);++i<u;)a[i]=o[e+i];i=-1;for(var c=n(e+1);++i<e;)c[i]=o[i];return c[e]=r(a),Se(t,this,c)}}function Di(t,e){return e.length<2?t:En(t,io(e,0,-1))}function Ti(t,e){for(var r=t.length,n=Or(e.length,r),o=Mo(t);n--;){var u=e[n];t[n]=_i(u,r)?o[u]:i}return t}function Mi(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Ni=Li(ro),Ci=de||function(t,e){return he.setTimeout(t,e)},Ri=Li(no);function Ii(t,e,r){var n=e+"";return Ri(t,function(t,e){var r=e.length;if(!r)return t;var n=r-1;return e[n]=(r>1?"& ":"")+e[n],e=e.join(r>2?", ":" "),t.replace(st,"{\n/* [wrapped with "+e+"] */\n")}(n,function(t,e){return Ae(b,(function(r){var n="_."+r[0];e&r[1]&&!Me(t,n)&&t.push(n)})),t.sort()}(function(t){var e=t.match(lt);return e?e[1].split(ft):[]}(n),r)))}function Li(t){var e=0,r=0;return function(){var n=_r(),o=16-(n-r);if(r=n,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(i,arguments)}}function zi(t,e){var r=-1,n=t.length,o=n-1;for(e=e===i?n:e;++r<e;){var u=Zn(r,o),a=t[u];t[u]=t[r],t[r]=a}return t.length=e,t}var Bi=function(t){var e=Lu(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(ot,(function(t,r,n,o){e.push(n?o.replace(ht,"$1"):r||t)})),e}));function Ui(t){if("string"==typeof t||fa(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Fi(t){if(null!=t){try{return Rt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Hi(t){if(t instanceof Yr)return t.clone();var e=new Gr(t.__wrapped__,t.__chain__);return e.__actions__=Mo(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Xi=Jn((function(t,e){return Zu(t)?dn(t,mn(e,1,Zu,!0)):[]})),Gi=Jn((function(t,e){var r=Qi(e);return Zu(r)&&(r=i),Zu(t)?dn(t,mn(e,1,Zu,!0),fi(r,2)):[]})),Yi=Jn((function(t,e){var r=Qi(e);return Zu(r)&&(r=i),Zu(t)?dn(t,mn(e,1,Zu,!0),i,r):[]}));function Vi(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var o=null==r?0:ga(r);return o<0&&(o=mr(n+o,0)),Fe(t,fi(e,3),o)}function Wi(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var o=n-1;return r!==i&&(o=ga(r),o=r<0?mr(n+o,0):Or(o,n-1)),Fe(t,fi(e,3),o,!0)}function Ki(t){return(null==t?0:t.length)?mn(t,1):[]}function $i(t){return t&&t.length?t[0]:i}var Zi=Jn((function(t){var e=Ce(t,Oo);return e.length&&e[0]===t[0]?Tn(e):[]})),qi=Jn((function(t){var e=Qi(t),r=Ce(t,Oo);return e===Qi(r)?e=i:r.pop(),r.length&&r[0]===t[0]?Tn(r,fi(e,2)):[]})),Ji=Jn((function(t){var e=Qi(t),r=Ce(t,Oo);return(e="function"==typeof e?e:i)&&r.pop(),r.length&&r[0]===t[0]?Tn(r,i,e):[]}));function Qi(t){var e=null==t?0:t.length;return e?t[e-1]:i}var tu=Jn(eu);function eu(t,e){return t&&t.length&&e&&e.length?Kn(t,e):t}var ru=ii((function(t,e){var r=null==t?0:t.length,n=cn(t,e);return $n(t,Ce(e,(function(t){return _i(t,r)?+t:t})).sort(ko)),n}));function nu(t){return null==t?t:xr.call(t)}var ou=Jn((function(t){return po(mn(t,1,Zu,!0))})),iu=Jn((function(t){var e=Qi(t);return Zu(e)&&(e=i),po(mn(t,1,Zu,!0),fi(e,2))})),uu=Jn((function(t){var e=Qi(t);return e="function"==typeof e?e:i,po(mn(t,1,Zu,!0),i,e)}));function au(t){if(!t||!t.length)return[];var e=0;return t=Te(t,(function(t){if(Zu(t))return e=mr(t.length,e),!0})),Ze(e,(function(e){return Ce(t,Ve(e))}))}function cu(t,e){if(!t||!t.length)return[];var r=au(t);return null==e?r:Ce(r,(function(t){return Se(e,i,t)}))}var su=Jn((function(t,e){return Zu(t)?dn(t,e):[]})),lu=Jn((function(t){return bo(Te(t,Zu))})),fu=Jn((function(t){var e=Qi(t);return Zu(e)&&(e=i),bo(Te(t,Zu),fi(e,2))})),pu=Jn((function(t){var e=Qi(t);return e="function"==typeof e?e:i,bo(Te(t,Zu),i,e)})),du=Jn(au);var hu=Jn((function(t){var e=t.length,r=e>1?t[e-1]:i;return r="function"==typeof r?(t.pop(),r):i,cu(t,r)}));function yu(t){var e=Fr(t);return e.__chain__=!0,e}function vu(t,e){return e(t)}var gu=ii((function(t){var e=t.length,r=e?t[0]:0,n=this.__wrapped__,o=function(e){return cn(e,t)};return!(e>1||this.__actions__.length)&&n instanceof Yr&&_i(r)?((n=n.slice(r,+r+(e?1:0))).__actions__.push({func:vu,args:[o],thisArg:i}),new Gr(n,this.__chain__).thru((function(t){return e&&!t.length&&t.push(i),t}))):this.thru(o)}));var bu=Co((function(t,e,r){It.call(t,r)?++t[r]:an(t,r,1)}));var mu=Fo(Vi),Ou=Fo(Wi);function _u(t,e){return(Wu(t)?Ae:hn)(t,fi(e,3))}function wu(t,e){return(Wu(t)?ke:yn)(t,fi(e,3))}var ju=Co((function(t,e,r){It.call(t,r)?t[r].push(e):an(t,r,[e])}));var xu=Jn((function(t,e,r){var o=-1,i="function"==typeof e,u=$u(t)?n(t.length):[];return hn(t,(function(t){u[++o]=i?Se(e,t,r):Mn(t,e,r)})),u})),Eu=Co((function(t,e,r){an(t,r,e)}));function Su(t,e){return(Wu(t)?Ce:Fn)(t,fi(e,3))}var Pu=Co((function(t,e,r){t[r?0:1].push(e)}),(function(){return[[],[]]}));var Au=Jn((function(t,e){if(null==t)return[];var r=e.length;return r>1&&wi(t,e[0],e[1])?e=[]:r>2&&wi(e[0],e[1],e[2])&&(e=[e[0]]),Vn(t,mn(e,1),[])})),ku=pe||function(){return he.Date.now()};function Du(t,e,r){return e=r?i:e,e=t&&null==e?t.length:e,ti(t,p,i,i,i,i,e)}function Tu(t,e){var r;if("function"!=typeof e)throw new Dt(u);return t=ga(t),function(){return--t>0&&(r=e.apply(this,arguments)),t<=1&&(e=i),r}}var Mu=Jn((function(t,e,r){var n=1;if(r.length){var o=lr(r,li(Mu));n|=l}return ti(t,n,e,r,o)})),Nu=Jn((function(t,e,r){var n=3;if(r.length){var o=lr(r,li(Nu));n|=l}return ti(e,n,t,r,o)}));function Cu(t,e,r){var n,o,a,c,s,l,f=0,p=!1,d=!1,h=!0;if("function"!=typeof t)throw new Dt(u);function y(e){var r=n,u=o;return n=o=i,f=e,c=t.apply(u,r)}function v(t){return f=t,s=Ci(b,e),p?y(t):c}function g(t){var r=t-l;return l===i||r>=e||r<0||d&&t-f>=a}function b(){var t=ku();if(g(t))return m(t);s=Ci(b,function(t){var r=e-(t-l);return d?Or(r,a-(t-f)):r}(t))}function m(t){return s=i,h&&n?y(t):(n=o=i,c)}function O(){var t=ku(),r=g(t);if(n=arguments,o=this,l=t,r){if(s===i)return v(l);if(d)return Eo(s),s=Ci(b,e),y(l)}return s===i&&(s=Ci(b,e)),c}return e=ma(e)||0,na(r)&&(p=!!r.leading,a=(d="maxWait"in r)?mr(ma(r.maxWait)||0,e):a,h="trailing"in r?!!r.trailing:h),O.cancel=function(){s!==i&&Eo(s),f=0,n=l=o=s=i},O.flush=function(){return s===i?c:m(ku())},O}var Ru=Jn((function(t,e){return pn(t,1,e)})),Iu=Jn((function(t,e,r){return pn(t,ma(e)||0,r)}));function Lu(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new Dt(u);var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var u=t.apply(this,n);return r.cache=i.set(o,u)||i,u};return r.cache=new(Lu.Cache||Kr),r}function zu(t){if("function"!=typeof t)throw new Dt(u);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Lu.Cache=Kr;var Bu=jo((function(t,e){var r=(e=1==e.length&&Wu(e[0])?Ce(e[0],Je(fi())):Ce(mn(e,1),Je(fi()))).length;return Jn((function(n){for(var o=-1,i=Or(n.length,r);++o<i;)n[o]=e[o].call(this,n[o]);return Se(t,this,n)}))})),Uu=Jn((function(t,e){var r=lr(e,li(Uu));return ti(t,l,i,e,r)})),Fu=Jn((function(t,e){var r=lr(e,li(Fu));return ti(t,f,i,e,r)})),Hu=ii((function(t,e){return ti(t,d,i,i,i,e)}));function Xu(t,e){return t===e||t!=t&&e!=e}var Gu=$o(An),Yu=$o((function(t,e){return t>=e})),Vu=Nn(function(){return arguments}())?Nn:function(t){return oa(t)&&It.call(t,"callee")&&!$t.call(t,"callee")},Wu=n.isArray,Ku=Oe?Je(Oe):function(t){return oa(t)&&Pn(t)==R};function $u(t){return null!=t&&ra(t.length)&&!ta(t)}function Zu(t){return oa(t)&&$u(t)}var qu=me||mc,Ju=_e?Je(_e):function(t){return oa(t)&&Pn(t)==w};function Qu(t){if(!oa(t))return!1;var e=Pn(t);return e==j||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!aa(t)}function ta(t){if(!na(t))return!1;var e=Pn(t);return e==x||e==E||"[object AsyncFunction]"==e||"[object Proxy]"==e}function ea(t){return"number"==typeof t&&t==ga(t)}function ra(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=y}function na(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function oa(t){return null!=t&&"object"==typeof t}var ia=we?Je(we):function(t){return oa(t)&&gi(t)==S};function ua(t){return"number"==typeof t||oa(t)&&Pn(t)==P}function aa(t){if(!oa(t)||Pn(t)!=A)return!1;var e=Wt(t);if(null===e)return!0;var r=It.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&Rt.call(r)==Ut}var ca=je?Je(je):function(t){return oa(t)&&Pn(t)==D};var sa=xe?Je(xe):function(t){return oa(t)&&gi(t)==T};function la(t){return"string"==typeof t||!Wu(t)&&oa(t)&&Pn(t)==M}function fa(t){return"symbol"==typeof t||oa(t)&&Pn(t)==N}var pa=Ee?Je(Ee):function(t){return oa(t)&&ra(t.length)&&!!ae[Pn(t)]};var da=$o(Un),ha=$o((function(t,e){return t<=e}));function ya(t){if(!t)return[];if($u(t))return la(t)?hr(t):Mo(t);if(Jt&&t[Jt])return function(t){for(var e,r=[];!(e=t.next()).done;)r.push(e.value);return r}(t[Jt]());var e=gi(t);return(e==S?cr:e==T?fr:Xa)(t)}function va(t){return t?(t=ma(t))===h||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function ga(t){var e=va(t),r=e%1;return e==e?r?e-r:e:0}function ba(t){return t?sn(ga(t),0,g):0}function ma(t){if("number"==typeof t)return t;if(fa(t))return v;if(na(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=na(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=qe(t);var r=bt.test(t);return r||Ot.test(t)?fe(t.slice(2),r?2:8):gt.test(t)?v:+t}function Oa(t){return No(t,Ra(t))}function _a(t){return null==t?"":fo(t)}var wa=Ro((function(t,e){if(Si(e)||$u(e))No(e,Ca(e),t);else for(var r in e)It.call(e,r)&&rn(t,r,e[r])})),ja=Ro((function(t,e){No(e,Ra(e),t)})),xa=Ro((function(t,e,r,n){No(e,Ra(e),t,n)})),Ea=Ro((function(t,e,r,n){No(e,Ca(e),t,n)})),Sa=ii(cn);var Pa=Jn((function(t,e){t=Pt(t);var r=-1,n=e.length,o=n>2?e[2]:i;for(o&&wi(e[0],e[1],o)&&(n=1);++r<n;)for(var u=e[r],a=Ra(u),c=-1,s=a.length;++c<s;){var l=a[c],f=t[l];(f===i||Xu(f,Nt[l])&&!It.call(t,l))&&(t[l]=u[l])}return t})),Aa=Jn((function(t){return t.push(i,ri),Se(La,i,t)}));function ka(t,e,r){var n=null==t?i:En(t,e);return n===i?r:n}function Da(t,e){return null!=t&&bi(t,e,Dn)}var Ta=Go((function(t,e,r){null!=e&&"function"!=typeof e.toString&&(e=Bt.call(e)),t[e]=r}),nc(uc)),Ma=Go((function(t,e,r){null!=e&&"function"!=typeof e.toString&&(e=Bt.call(e)),It.call(t,e)?t[e].push(r):t[e]=[r]}),fi),Na=Jn(Mn);function Ca(t){return $u(t)?qr(t):zn(t)}function Ra(t){return $u(t)?qr(t,!0):Bn(t)}var Ia=Ro((function(t,e,r){Gn(t,e,r)})),La=Ro((function(t,e,r,n){Gn(t,e,r,n)})),za=ii((function(t,e){var r={};if(null==t)return r;var n=!1;e=Ce(e,(function(e){return e=wo(e,t),n||(n=e.length>1),e})),No(t,ai(t),r),n&&(r=ln(r,7,ni));for(var o=e.length;o--;)ho(r,e[o]);return r}));var Ba=ii((function(t,e){return null==t?{}:function(t,e){return Wn(t,e,(function(e,r){return Da(t,r)}))}(t,e)}));function Ua(t,e){if(null==t)return{};var r=Ce(ai(t),(function(t){return[t]}));return e=fi(e),Wn(t,r,(function(t,r){return e(t,r[0])}))}var Fa=Qo(Ca),Ha=Qo(Ra);function Xa(t){return null==t?[]:Qe(t,Ca(t))}var Ga=Bo((function(t,e,r){return e=e.toLowerCase(),t+(r?Ya(e):e)}));function Ya(t){return Qa(_a(t).toLowerCase())}function Va(t){return(t=_a(t))&&t.replace(wt,or).replace(te,"")}var Wa=Bo((function(t,e,r){return t+(r?"-":"")+e.toLowerCase()})),Ka=Bo((function(t,e,r){return t+(r?" ":"")+e.toLowerCase()})),$a=zo("toLowerCase");var Za=Bo((function(t,e,r){return t+(r?"_":"")+e.toLowerCase()}));var qa=Bo((function(t,e,r){return t+(r?" ":"")+Qa(e)}));var Ja=Bo((function(t,e,r){return t+(r?" ":"")+e.toUpperCase()})),Qa=zo("toUpperCase");function tc(t,e,r){return t=_a(t),(e=r?i:e)===i?function(t){return oe.test(t)}(t)?function(t){return t.match(re)||[]}(t):function(t){return t.match(pt)||[]}(t):t.match(e)||[]}var ec=Jn((function(t,e){try{return Se(t,i,e)}catch(t){return Qu(t)?t:new ct(t)}})),rc=ii((function(t,e){return Ae(e,(function(e){e=Ui(e),an(t,e,Mu(t[e],t))})),t}));function nc(t){return function(){return t}}var oc=Ho(),ic=Ho(!0);function uc(t){return t}function ac(t){return Ln("function"==typeof t?t:ln(t,1))}var cc=Jn((function(t,e){return function(r){return Mn(r,t,e)}})),sc=Jn((function(t,e){return function(r){return Mn(t,r,e)}}));function lc(t,e,r){var n=Ca(e),o=xn(e,n);null!=r||na(e)&&(o.length||!n.length)||(r=e,e=t,t=this,o=xn(e,Ca(e)));var i=!(na(r)&&"chain"in r&&!r.chain),u=ta(t);return Ae(o,(function(r){var n=e[r];t[r]=n,u&&(t.prototype[r]=function(){var e=this.__chain__;if(i||e){var r=t(this.__wrapped__),o=r.__actions__=Mo(this.__actions__);return o.push({func:n,args:arguments,thisArg:t}),r.__chain__=e,r}return n.apply(t,Re([this.value()],arguments))})})),t}function fc(){}var pc=Vo(Ce),dc=Vo(De),hc=Vo(ze);function yc(t){return ji(t)?Ve(Ui(t)):function(t){return function(e){return En(e,t)}}(t)}var vc=Ko(),gc=Ko(!0);function bc(){return[]}function mc(){return!1}var Oc=Yo((function(t,e){return t+e}),0),_c=qo("ceil"),wc=Yo((function(t,e){return t/e}),1),jc=qo("floor");var xc,Ec=Yo((function(t,e){return t*e}),1),Sc=qo("round"),Pc=Yo((function(t,e){return t-e}),0);return Fr.after=function(t,e){if("function"!=typeof e)throw new Dt(u);return t=ga(t),function(){if(--t<1)return e.apply(this,arguments)}},Fr.ary=Du,Fr.assign=wa,Fr.assignIn=ja,Fr.assignInWith=xa,Fr.assignWith=Ea,Fr.at=Sa,Fr.before=Tu,Fr.bind=Mu,Fr.bindAll=rc,Fr.bindKey=Nu,Fr.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Wu(t)?t:[t]},Fr.chain=yu,Fr.chunk=function(t,e,r){e=(r?wi(t,e,r):e===i)?1:mr(ga(e),0);var o=null==t?0:t.length;if(!o||e<1)return[];for(var u=0,a=0,c=n(ye(o/e));u<o;)c[a++]=io(t,u,u+=e);return c},Fr.compact=function(t){for(var e=-1,r=null==t?0:t.length,n=0,o=[];++e<r;){var i=t[e];i&&(o[n++]=i)}return o},Fr.concat=function(){var t=arguments.length;if(!t)return[];for(var e=n(t-1),r=arguments[0],o=t;o--;)e[o-1]=arguments[o];return Re(Wu(r)?Mo(r):[r],mn(e,1))},Fr.cond=function(t){var e=null==t?0:t.length,r=fi();return t=e?Ce(t,(function(t){if("function"!=typeof t[1])throw new Dt(u);return[r(t[0]),t[1]]})):[],Jn((function(r){for(var n=-1;++n<e;){var o=t[n];if(Se(o[0],this,r))return Se(o[1],this,r)}}))},Fr.conforms=function(t){return function(t){var e=Ca(t);return function(r){return fn(r,t,e)}}(ln(t,1))},Fr.constant=nc,Fr.countBy=bu,Fr.create=function(t,e){var r=Hr(t);return null==e?r:un(r,e)},Fr.curry=function t(e,r,n){var o=ti(e,8,i,i,i,i,i,r=n?i:r);return o.placeholder=t.placeholder,o},Fr.curryRight=function t(e,r,n){var o=ti(e,s,i,i,i,i,i,r=n?i:r);return o.placeholder=t.placeholder,o},Fr.debounce=Cu,Fr.defaults=Pa,Fr.defaultsDeep=Aa,Fr.defer=Ru,Fr.delay=Iu,Fr.difference=Xi,Fr.differenceBy=Gi,Fr.differenceWith=Yi,Fr.drop=function(t,e,r){var n=null==t?0:t.length;return n?io(t,(e=r||e===i?1:ga(e))<0?0:e,n):[]},Fr.dropRight=function(t,e,r){var n=null==t?0:t.length;return n?io(t,0,(e=n-(e=r||e===i?1:ga(e)))<0?0:e):[]},Fr.dropRightWhile=function(t,e){return t&&t.length?vo(t,fi(e,3),!0,!0):[]},Fr.dropWhile=function(t,e){return t&&t.length?vo(t,fi(e,3),!0):[]},Fr.fill=function(t,e,r,n){var o=null==t?0:t.length;return o?(r&&"number"!=typeof r&&wi(t,e,r)&&(r=0,n=o),function(t,e,r,n){var o=t.length;for((r=ga(r))<0&&(r=-r>o?0:o+r),(n=n===i||n>o?o:ga(n))<0&&(n+=o),n=r>n?0:ba(n);r<n;)t[r++]=e;return t}(t,e,r,n)):[]},Fr.filter=function(t,e){return(Wu(t)?Te:bn)(t,fi(e,3))},Fr.flatMap=function(t,e){return mn(Su(t,e),1)},Fr.flatMapDeep=function(t,e){return mn(Su(t,e),h)},Fr.flatMapDepth=function(t,e,r){return r=r===i?1:ga(r),mn(Su(t,e),r)},Fr.flatten=Ki,Fr.flattenDeep=function(t){return(null==t?0:t.length)?mn(t,h):[]},Fr.flattenDepth=function(t,e){return(null==t?0:t.length)?mn(t,e=e===i?1:ga(e)):[]},Fr.flip=function(t){return ti(t,512)},Fr.flow=oc,Fr.flowRight=ic,Fr.fromPairs=function(t){for(var e=-1,r=null==t?0:t.length,n={};++e<r;){var o=t[e];n[o[0]]=o[1]}return n},Fr.functions=function(t){return null==t?[]:xn(t,Ca(t))},Fr.functionsIn=function(t){return null==t?[]:xn(t,Ra(t))},Fr.groupBy=ju,Fr.initial=function(t){return(null==t?0:t.length)?io(t,0,-1):[]},Fr.intersection=Zi,Fr.intersectionBy=qi,Fr.intersectionWith=Ji,Fr.invert=Ta,Fr.invertBy=Ma,Fr.invokeMap=xu,Fr.iteratee=ac,Fr.keyBy=Eu,Fr.keys=Ca,Fr.keysIn=Ra,Fr.map=Su,Fr.mapKeys=function(t,e){var r={};return e=fi(e,3),wn(t,(function(t,n,o){an(r,e(t,n,o),t)})),r},Fr.mapValues=function(t,e){var r={};return e=fi(e,3),wn(t,(function(t,n,o){an(r,n,e(t,n,o))})),r},Fr.matches=function(t){return Hn(ln(t,1))},Fr.matchesProperty=function(t,e){return Xn(t,ln(e,1))},Fr.memoize=Lu,Fr.merge=Ia,Fr.mergeWith=La,Fr.method=cc,Fr.methodOf=sc,Fr.mixin=lc,Fr.negate=zu,Fr.nthArg=function(t){return t=ga(t),Jn((function(e){return Yn(e,t)}))},Fr.omit=za,Fr.omitBy=function(t,e){return Ua(t,zu(fi(e)))},Fr.once=function(t){return Tu(2,t)},Fr.orderBy=function(t,e,r,n){return null==t?[]:(Wu(e)||(e=null==e?[]:[e]),Wu(r=n?i:r)||(r=null==r?[]:[r]),Vn(t,e,r))},Fr.over=pc,Fr.overArgs=Bu,Fr.overEvery=dc,Fr.overSome=hc,Fr.partial=Uu,Fr.partialRight=Fu,Fr.partition=Pu,Fr.pick=Ba,Fr.pickBy=Ua,Fr.property=yc,Fr.propertyOf=function(t){return function(e){return null==t?i:En(t,e)}},Fr.pull=tu,Fr.pullAll=eu,Fr.pullAllBy=function(t,e,r){return t&&t.length&&e&&e.length?Kn(t,e,fi(r,2)):t},Fr.pullAllWith=function(t,e,r){return t&&t.length&&e&&e.length?Kn(t,e,i,r):t},Fr.pullAt=ru,Fr.range=vc,Fr.rangeRight=gc,Fr.rearg=Hu,Fr.reject=function(t,e){return(Wu(t)?Te:bn)(t,zu(fi(e,3)))},Fr.remove=function(t,e){var r=[];if(!t||!t.length)return r;var n=-1,o=[],i=t.length;for(e=fi(e,3);++n<i;){var u=t[n];e(u,n,t)&&(r.push(u),o.push(n))}return $n(t,o),r},Fr.rest=function(t,e){if("function"!=typeof t)throw new Dt(u);return Jn(t,e=e===i?e:ga(e))},Fr.reverse=nu,Fr.sampleSize=function(t,e,r){return e=(r?wi(t,e,r):e===i)?1:ga(e),(Wu(t)?Qr:to)(t,e)},Fr.set=function(t,e,r){return null==t?t:eo(t,e,r)},Fr.setWith=function(t,e,r,n){return n="function"==typeof n?n:i,null==t?t:eo(t,e,r,n)},Fr.shuffle=function(t){return(Wu(t)?tn:oo)(t)},Fr.slice=function(t,e,r){var n=null==t?0:t.length;return n?(r&&"number"!=typeof r&&wi(t,e,r)?(e=0,r=n):(e=null==e?0:ga(e),r=r===i?n:ga(r)),io(t,e,r)):[]},Fr.sortBy=Au,Fr.sortedUniq=function(t){return t&&t.length?so(t):[]},Fr.sortedUniqBy=function(t,e){return t&&t.length?so(t,fi(e,2)):[]},Fr.split=function(t,e,r){return r&&"number"!=typeof r&&wi(t,e,r)&&(e=r=i),(r=r===i?g:r>>>0)?(t=_a(t))&&("string"==typeof e||null!=e&&!ca(e))&&!(e=fo(e))&&ar(t)?xo(hr(t),0,r):t.split(e,r):[]},Fr.spread=function(t,e){if("function"!=typeof t)throw new Dt(u);return e=null==e?0:mr(ga(e),0),Jn((function(r){var n=r[e],o=xo(r,0,e);return n&&Re(o,n),Se(t,this,o)}))},Fr.tail=function(t){var e=null==t?0:t.length;return e?io(t,1,e):[]},Fr.take=function(t,e,r){return t&&t.length?io(t,0,(e=r||e===i?1:ga(e))<0?0:e):[]},Fr.takeRight=function(t,e,r){var n=null==t?0:t.length;return n?io(t,(e=n-(e=r||e===i?1:ga(e)))<0?0:e,n):[]},Fr.takeRightWhile=function(t,e){return t&&t.length?vo(t,fi(e,3),!1,!0):[]},Fr.takeWhile=function(t,e){return t&&t.length?vo(t,fi(e,3)):[]},Fr.tap=function(t,e){return e(t),t},Fr.throttle=function(t,e,r){var n=!0,o=!0;if("function"!=typeof t)throw new Dt(u);return na(r)&&(n="leading"in r?!!r.leading:n,o="trailing"in r?!!r.trailing:o),Cu(t,e,{leading:n,maxWait:e,trailing:o})},Fr.thru=vu,Fr.toArray=ya,Fr.toPairs=Fa,Fr.toPairsIn=Ha,Fr.toPath=function(t){return Wu(t)?Ce(t,Ui):fa(t)?[t]:Mo(Bi(_a(t)))},Fr.toPlainObject=Oa,Fr.transform=function(t,e,r){var n=Wu(t),o=n||qu(t)||pa(t);if(e=fi(e,4),null==r){var i=t&&t.constructor;r=o?n?new i:[]:na(t)&&ta(i)?Hr(Wt(t)):{}}return(o?Ae:wn)(t,(function(t,n,o){return e(r,t,n,o)})),r},Fr.unary=function(t){return Du(t,1)},Fr.union=ou,Fr.unionBy=iu,Fr.unionWith=uu,Fr.uniq=function(t){return t&&t.length?po(t):[]},Fr.uniqBy=function(t,e){return t&&t.length?po(t,fi(e,2)):[]},Fr.uniqWith=function(t,e){return e="function"==typeof e?e:i,t&&t.length?po(t,i,e):[]},Fr.unset=function(t,e){return null==t||ho(t,e)},Fr.unzip=au,Fr.unzipWith=cu,Fr.update=function(t,e,r){return null==t?t:yo(t,e,_o(r))},Fr.updateWith=function(t,e,r,n){return n="function"==typeof n?n:i,null==t?t:yo(t,e,_o(r),n)},Fr.values=Xa,Fr.valuesIn=function(t){return null==t?[]:Qe(t,Ra(t))},Fr.without=su,Fr.words=tc,Fr.wrap=function(t,e){return Uu(_o(e),t)},Fr.xor=lu,Fr.xorBy=fu,Fr.xorWith=pu,Fr.zip=du,Fr.zipObject=function(t,e){return mo(t||[],e||[],rn)},Fr.zipObjectDeep=function(t,e){return mo(t||[],e||[],eo)},Fr.zipWith=hu,Fr.entries=Fa,Fr.entriesIn=Ha,Fr.extend=ja,Fr.extendWith=xa,lc(Fr,Fr),Fr.add=Oc,Fr.attempt=ec,Fr.camelCase=Ga,Fr.capitalize=Ya,Fr.ceil=_c,Fr.clamp=function(t,e,r){return r===i&&(r=e,e=i),r!==i&&(r=(r=ma(r))==r?r:0),e!==i&&(e=(e=ma(e))==e?e:0),sn(ma(t),e,r)},Fr.clone=function(t){return ln(t,4)},Fr.cloneDeep=function(t){return ln(t,5)},Fr.cloneDeepWith=function(t,e){return ln(t,5,e="function"==typeof e?e:i)},Fr.cloneWith=function(t,e){return ln(t,4,e="function"==typeof e?e:i)},Fr.conformsTo=function(t,e){return null==e||fn(t,e,Ca(e))},Fr.deburr=Va,Fr.defaultTo=function(t,e){return null==t||t!=t?e:t},Fr.divide=wc,Fr.endsWith=function(t,e,r){t=_a(t),e=fo(e);var n=t.length,o=r=r===i?n:sn(ga(r),0,n);return(r-=e.length)>=0&&t.slice(r,o)==e},Fr.eq=Xu,Fr.escape=function(t){return(t=_a(t))&&J.test(t)?t.replace(Z,ir):t},Fr.escapeRegExp=function(t){return(t=_a(t))&&ut.test(t)?t.replace(it,"\\$&"):t},Fr.every=function(t,e,r){var n=Wu(t)?De:vn;return r&&wi(t,e,r)&&(e=i),n(t,fi(e,3))},Fr.find=mu,Fr.findIndex=Vi,Fr.findKey=function(t,e){return Ue(t,fi(e,3),wn)},Fr.findLast=Ou,Fr.findLastIndex=Wi,Fr.findLastKey=function(t,e){return Ue(t,fi(e,3),jn)},Fr.floor=jc,Fr.forEach=_u,Fr.forEachRight=wu,Fr.forIn=function(t,e){return null==t?t:On(t,fi(e,3),Ra)},Fr.forInRight=function(t,e){return null==t?t:_n(t,fi(e,3),Ra)},Fr.forOwn=function(t,e){return t&&wn(t,fi(e,3))},Fr.forOwnRight=function(t,e){return t&&jn(t,fi(e,3))},Fr.get=ka,Fr.gt=Gu,Fr.gte=Yu,Fr.has=function(t,e){return null!=t&&bi(t,e,kn)},Fr.hasIn=Da,Fr.head=$i,Fr.identity=uc,Fr.includes=function(t,e,r,n){t=$u(t)?t:Xa(t),r=r&&!n?ga(r):0;var o=t.length;return r<0&&(r=mr(o+r,0)),la(t)?r<=o&&t.indexOf(e,r)>-1:!!o&&He(t,e,r)>-1},Fr.indexOf=function(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var o=null==r?0:ga(r);return o<0&&(o=mr(n+o,0)),He(t,e,o)},Fr.inRange=function(t,e,r){return e=va(e),r===i?(r=e,e=0):r=va(r),function(t,e,r){return t>=Or(e,r)&&t<mr(e,r)}(t=ma(t),e,r)},Fr.invoke=Na,Fr.isArguments=Vu,Fr.isArray=Wu,Fr.isArrayBuffer=Ku,Fr.isArrayLike=$u,Fr.isArrayLikeObject=Zu,Fr.isBoolean=function(t){return!0===t||!1===t||oa(t)&&Pn(t)==_},Fr.isBuffer=qu,Fr.isDate=Ju,Fr.isElement=function(t){return oa(t)&&1===t.nodeType&&!aa(t)},Fr.isEmpty=function(t){if(null==t)return!0;if($u(t)&&(Wu(t)||"string"==typeof t||"function"==typeof t.splice||qu(t)||pa(t)||Vu(t)))return!t.length;var e=gi(t);if(e==S||e==T)return!t.size;if(Si(t))return!zn(t).length;for(var r in t)if(It.call(t,r))return!1;return!0},Fr.isEqual=function(t,e){return Cn(t,e)},Fr.isEqualWith=function(t,e,r){var n=(r="function"==typeof r?r:i)?r(t,e):i;return n===i?Cn(t,e,i,r):!!n},Fr.isError=Qu,Fr.isFinite=function(t){return"number"==typeof t&&Be(t)},Fr.isFunction=ta,Fr.isInteger=ea,Fr.isLength=ra,Fr.isMap=ia,Fr.isMatch=function(t,e){return t===e||Rn(t,e,di(e))},Fr.isMatchWith=function(t,e,r){return r="function"==typeof r?r:i,Rn(t,e,di(e),r)},Fr.isNaN=function(t){return ua(t)&&t!=+t},Fr.isNative=function(t){if(Ei(t))throw new ct("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return In(t)},Fr.isNil=function(t){return null==t},Fr.isNull=function(t){return null===t},Fr.isNumber=ua,Fr.isObject=na,Fr.isObjectLike=oa,Fr.isPlainObject=aa,Fr.isRegExp=ca,Fr.isSafeInteger=function(t){return ea(t)&&t>=-9007199254740991&&t<=y},Fr.isSet=sa,Fr.isString=la,Fr.isSymbol=fa,Fr.isTypedArray=pa,Fr.isUndefined=function(t){return t===i},Fr.isWeakMap=function(t){return oa(t)&&gi(t)==C},Fr.isWeakSet=function(t){return oa(t)&&"[object WeakSet]"==Pn(t)},Fr.join=function(t,e){return null==t?"":We.call(t,e)},Fr.kebabCase=Wa,Fr.last=Qi,Fr.lastIndexOf=function(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var o=n;return r!==i&&(o=(o=ga(r))<0?mr(n+o,0):Or(o,n-1)),e==e?function(t,e,r){for(var n=r+1;n--;)if(t[n]===e)return n;return n}(t,e,o):Fe(t,Ge,o,!0)},Fr.lowerCase=Ka,Fr.lowerFirst=$a,Fr.lt=da,Fr.lte=ha,Fr.max=function(t){return t&&t.length?gn(t,uc,An):i},Fr.maxBy=function(t,e){return t&&t.length?gn(t,fi(e,2),An):i},Fr.mean=function(t){return Ye(t,uc)},Fr.meanBy=function(t,e){return Ye(t,fi(e,2))},Fr.min=function(t){return t&&t.length?gn(t,uc,Un):i},Fr.minBy=function(t,e){return t&&t.length?gn(t,fi(e,2),Un):i},Fr.stubArray=bc,Fr.stubFalse=mc,Fr.stubObject=function(){return{}},Fr.stubString=function(){return""},Fr.stubTrue=function(){return!0},Fr.multiply=Ec,Fr.nth=function(t,e){return t&&t.length?Yn(t,ga(e)):i},Fr.noConflict=function(){return he._===this&&(he._=Ft),this},Fr.noop=fc,Fr.now=ku,Fr.pad=function(t,e,r){t=_a(t);var n=(e=ga(e))?dr(t):0;if(!e||n>=e)return t;var o=(e-n)/2;return Wo(ve(o),r)+t+Wo(ye(o),r)},Fr.padEnd=function(t,e,r){t=_a(t);var n=(e=ga(e))?dr(t):0;return e&&n<e?t+Wo(e-n,r):t},Fr.padStart=function(t,e,r){t=_a(t);var n=(e=ga(e))?dr(t):0;return e&&n<e?Wo(e-n,r)+t:t},Fr.parseInt=function(t,e,r){return r||null==e?e=0:e&&(e=+e),wr(_a(t).replace(at,""),e||0)},Fr.random=function(t,e,r){if(r&&"boolean"!=typeof r&&wi(t,e,r)&&(e=r=i),r===i&&("boolean"==typeof e?(r=e,e=i):"boolean"==typeof t&&(r=t,t=i)),t===i&&e===i?(t=0,e=1):(t=va(t),e===i?(e=t,t=0):e=va(e)),t>e){var n=t;t=e,e=n}if(r||t%1||e%1){var o=jr();return Or(t+o*(e-t+le("1e-"+((o+"").length-1))),e)}return Zn(t,e)},Fr.reduce=function(t,e,r){var n=Wu(t)?Ie:Ke,o=arguments.length<3;return n(t,fi(e,4),r,o,hn)},Fr.reduceRight=function(t,e,r){var n=Wu(t)?Le:Ke,o=arguments.length<3;return n(t,fi(e,4),r,o,yn)},Fr.repeat=function(t,e,r){return e=(r?wi(t,e,r):e===i)?1:ga(e),qn(_a(t),e)},Fr.replace=function(){var t=arguments,e=_a(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Fr.result=function(t,e,r){var n=-1,o=(e=wo(e,t)).length;for(o||(o=1,t=i);++n<o;){var u=null==t?i:t[Ui(e[n])];u===i&&(n=o,u=r),t=ta(u)?u.call(t):u}return t},Fr.round=Sc,Fr.runInContext=t,Fr.sample=function(t){return(Wu(t)?Jr:Qn)(t)},Fr.size=function(t){if(null==t)return 0;if($u(t))return la(t)?dr(t):t.length;var e=gi(t);return e==S||e==T?t.size:zn(t).length},Fr.snakeCase=Za,Fr.some=function(t,e,r){var n=Wu(t)?ze:uo;return r&&wi(t,e,r)&&(e=i),n(t,fi(e,3))},Fr.sortedIndex=function(t,e){return ao(t,e)},Fr.sortedIndexBy=function(t,e,r){return co(t,e,fi(r,2))},Fr.sortedIndexOf=function(t,e){var r=null==t?0:t.length;if(r){var n=ao(t,e);if(n<r&&Xu(t[n],e))return n}return-1},Fr.sortedLastIndex=function(t,e){return ao(t,e,!0)},Fr.sortedLastIndexBy=function(t,e,r){return co(t,e,fi(r,2),!0)},Fr.sortedLastIndexOf=function(t,e){if(null==t?0:t.length){var r=ao(t,e,!0)-1;if(Xu(t[r],e))return r}return-1},Fr.startCase=qa,Fr.startsWith=function(t,e,r){return t=_a(t),r=null==r?0:sn(ga(r),0,t.length),e=fo(e),t.slice(r,r+e.length)==e},Fr.subtract=Pc,Fr.sum=function(t){return t&&t.length?$e(t,uc):0},Fr.sumBy=function(t,e){return t&&t.length?$e(t,fi(e,2)):0},Fr.template=function(t,e,r){var n=Fr.templateSettings;r&&wi(t,e,r)&&(e=i),t=_a(t),e=xa({},e,n,ei);var o,u,a=xa({},e.imports,n.imports,ei),c=Ca(a),s=Qe(a,c),l=0,f=e.interpolate||jt,p="__p += '",d=At((e.escape||jt).source+"|"+f.source+"|"+(f===et?yt:jt).source+"|"+(e.evaluate||jt).source+"|$","g"),h="//# sourceURL="+(It.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ue+"]")+"\n";t.replace(d,(function(e,r,n,i,a,c){return n||(n=i),p+=t.slice(l,c).replace(xt,ur),r&&(o=!0,p+="' +\n__e("+r+") +\n'"),a&&(u=!0,p+="';\n"+a+";\n__p += '"),n&&(p+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),l=c+e.length,e})),p+="';\n";var y=It.call(e,"variable")&&e.variable;if(y){if(dt.test(y))throw new ct("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(u?p.replace(V,""):p).replace(W,"$1").replace(K,"$1;"),p="function("+(y||"obj")+") {\n"+(y?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(u?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var v=ec((function(){return Et(c,h+"return "+p).apply(i,s)}));if(v.source=p,Qu(v))throw v;return v},Fr.times=function(t,e){if((t=ga(t))<1||t>y)return[];var r=g,n=Or(t,g);e=fi(e),t-=g;for(var o=Ze(n,e);++r<t;)e(r);return o},Fr.toFinite=va,Fr.toInteger=ga,Fr.toLength=ba,Fr.toLower=function(t){return _a(t).toLowerCase()},Fr.toNumber=ma,Fr.toSafeInteger=function(t){return t?sn(ga(t),-9007199254740991,y):0===t?t:0},Fr.toString=_a,Fr.toUpper=function(t){return _a(t).toUpperCase()},Fr.trim=function(t,e,r){if((t=_a(t))&&(r||e===i))return qe(t);if(!t||!(e=fo(e)))return t;var n=hr(t),o=hr(e);return xo(n,er(n,o),rr(n,o)+1).join("")},Fr.trimEnd=function(t,e,r){if((t=_a(t))&&(r||e===i))return t.slice(0,yr(t)+1);if(!t||!(e=fo(e)))return t;var n=hr(t);return xo(n,0,rr(n,hr(e))+1).join("")},Fr.trimStart=function(t,e,r){if((t=_a(t))&&(r||e===i))return t.replace(at,"");if(!t||!(e=fo(e)))return t;var n=hr(t);return xo(n,er(n,hr(e))).join("")},Fr.truncate=function(t,e){var r=30,n="...";if(na(e)){var o="separator"in e?e.separator:o;r="length"in e?ga(e.length):r,n="omission"in e?fo(e.omission):n}var u=(t=_a(t)).length;if(ar(t)){var a=hr(t);u=a.length}if(r>=u)return t;var c=r-dr(n);if(c<1)return n;var s=a?xo(a,0,c).join(""):t.slice(0,c);if(o===i)return s+n;if(a&&(c+=s.length-c),ca(o)){if(t.slice(c).search(o)){var l,f=s;for(o.global||(o=At(o.source,_a(vt.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var p=l.index;s=s.slice(0,p===i?c:p)}}else if(t.indexOf(fo(o),c)!=c){var d=s.lastIndexOf(o);d>-1&&(s=s.slice(0,d))}return s+n},Fr.unescape=function(t){return(t=_a(t))&&q.test(t)?t.replace($,vr):t},Fr.uniqueId=function(t){var e=++Lt;return _a(t)+e},Fr.upperCase=Ja,Fr.upperFirst=Qa,Fr.each=_u,Fr.eachRight=wu,Fr.first=$i,lc(Fr,(xc={},wn(Fr,(function(t,e){It.call(Fr.prototype,e)||(xc[e]=t)})),xc),{chain:!1}),Fr.VERSION="4.17.21",Ae(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Fr[t].placeholder=Fr})),Ae(["drop","take"],(function(t,e){Yr.prototype[t]=function(r){r=r===i?1:mr(ga(r),0);var n=this.__filtered__&&!e?new Yr(this):this.clone();return n.__filtered__?n.__takeCount__=Or(r,n.__takeCount__):n.__views__.push({size:Or(r,g),type:t+(n.__dir__<0?"Right":"")}),n},Yr.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),Ae(["filter","map","takeWhile"],(function(t,e){var r=e+1,n=1==r||3==r;Yr.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:fi(t,3),type:r}),e.__filtered__=e.__filtered__||n,e}})),Ae(["head","last"],(function(t,e){var r="take"+(e?"Right":"");Yr.prototype[t]=function(){return this[r](1).value()[0]}})),Ae(["initial","tail"],(function(t,e){var r="drop"+(e?"":"Right");Yr.prototype[t]=function(){return this.__filtered__?new Yr(this):this[r](1)}})),Yr.prototype.compact=function(){return this.filter(uc)},Yr.prototype.find=function(t){return this.filter(t).head()},Yr.prototype.findLast=function(t){return this.reverse().find(t)},Yr.prototype.invokeMap=Jn((function(t,e){return"function"==typeof t?new Yr(this):this.map((function(r){return Mn(r,t,e)}))})),Yr.prototype.reject=function(t){return this.filter(zu(fi(t)))},Yr.prototype.slice=function(t,e){t=ga(t);var r=this;return r.__filtered__&&(t>0||e<0)?new Yr(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),e!==i&&(r=(e=ga(e))<0?r.dropRight(-e):r.take(e-t)),r)},Yr.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Yr.prototype.toArray=function(){return this.take(g)},wn(Yr.prototype,(function(t,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),n=/^(?:head|last)$/.test(e),o=Fr[n?"take"+("last"==e?"Right":""):e],u=n||/^find/.test(e);o&&(Fr.prototype[e]=function(){var e=this.__wrapped__,a=n?[1]:arguments,c=e instanceof Yr,s=a[0],l=c||Wu(e),f=function(t){var e=o.apply(Fr,Re([t],a));return n&&p?e[0]:e};l&&r&&"function"==typeof s&&1!=s.length&&(c=l=!1);var p=this.__chain__,d=!!this.__actions__.length,h=u&&!p,y=c&&!d;if(!u&&l){e=y?e:new Yr(this);var v=t.apply(e,a);return v.__actions__.push({func:vu,args:[f],thisArg:i}),new Gr(v,p)}return h&&y?t.apply(this,a):(v=this.thru(f),h?n?v.value()[0]:v.value():v)})})),Ae(["pop","push","shift","sort","splice","unshift"],(function(t){var e=Tt[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",n=/^(?:pop|shift)$/.test(t);Fr.prototype[t]=function(){var t=arguments;if(n&&!this.__chain__){var o=this.value();return e.apply(Wu(o)?o:[],t)}return this[r]((function(r){return e.apply(Wu(r)?r:[],t)}))}})),wn(Yr.prototype,(function(t,e){var r=Fr[e];if(r){var n=r.name+"";It.call(Mr,n)||(Mr[n]=[]),Mr[n].push({name:e,func:r})}})),Mr[Xo(i,2).name]=[{name:"wrapper",func:i}],Yr.prototype.clone=function(){var t=new Yr(this.__wrapped__);return t.__actions__=Mo(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Mo(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Mo(this.__views__),t},Yr.prototype.reverse=function(){if(this.__filtered__){var t=new Yr(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Yr.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,r=Wu(t),n=e<0,o=r?t.length:0,i=function(t,e,r){var n=-1,o=r.length;for(;++n<o;){var i=r[n],u=i.size;switch(i.type){case"drop":t+=u;break;case"dropRight":e-=u;break;case"take":e=Or(e,t+u);break;case"takeRight":t=mr(t,e-u)}}return{start:t,end:e}}(0,o,this.__views__),u=i.start,a=i.end,c=a-u,s=n?a:u-1,l=this.__iteratees__,f=l.length,p=0,d=Or(c,this.__takeCount__);if(!r||!n&&o==c&&d==c)return go(t,this.__actions__);var h=[];t:for(;c--&&p<d;){for(var y=-1,v=t[s+=e];++y<f;){var g=l[y],b=g.iteratee,m=g.type,O=b(v);if(2==m)v=O;else if(!O){if(1==m)continue t;break t}}h[p++]=v}return h},Fr.prototype.at=gu,Fr.prototype.chain=function(){return yu(this)},Fr.prototype.commit=function(){return new Gr(this.value(),this.__chain__)},Fr.prototype.next=function(){this.__values__===i&&(this.__values__=ya(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?i:this.__values__[this.__index__++]}},Fr.prototype.plant=function(t){for(var e,r=this;r instanceof Xr;){var n=Hi(r);n.__index__=0,n.__values__=i,e?o.__wrapped__=n:e=n;var o=n;r=r.__wrapped__}return o.__wrapped__=t,e},Fr.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Yr){var e=t;return this.__actions__.length&&(e=new Yr(this)),(e=e.reverse()).__actions__.push({func:vu,args:[nu],thisArg:i}),new Gr(e,this.__chain__)}return this.thru(nu)},Fr.prototype.toJSON=Fr.prototype.valueOf=Fr.prototype.value=function(){return go(this.__wrapped__,this.__actions__)},Fr.prototype.first=Fr.prototype.head,Jt&&(Fr.prototype[Jt]=function(){return this}),Fr}();he._=gr,(o=function(){return gr}.call(e,r,e,n))===i||(n.exports=o)}).call(this)}).call(this,r(68),r(221)(t))},function(t,e,r){var n=r(7),o=r(34),i=r(33),u=r(87),a=r(62),c=r(174),s=r(28),l=n.TypeError,f=s("toPrimitive");t.exports=function(t,e){if(!i(t)||u(t))return t;var r,n=a(t,f);if(n){if(void 0===e&&(e="default"),r=o(n,t,e),!i(r)||u(r))return r;throw l("Can't convert object to primitive value")}return void 0===e&&(e="number"),c(t,e)}},function(t,e,r){var n=r(108);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(t,e,r){var n=r(36),o=r(18),i=r(91);t.exports=!n&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(t,e,r){var n=r(35),o=r(135),i=r(50),u=r(38);t.exports=function(t,e){for(var r=o(e),a=u.f,c=i.f,s=0;s<r.length;s++){var l=r[s];n(t,l)||a(t,l,c(e,l))}}},function(t,e,r){var n=r(46),o=r(15),i=r(74),u=r(112),a=r(32),c=o([].concat);t.exports=n("Reflect","ownKeys")||function(t){var e=i.f(a(t)),r=u.f;return r?c(e,r(t)):e}},function(t,e,r){var n=r(15),o=r(35),i=r(41),u=r(137).indexOf,a=r(72),c=n([].push);t.exports=function(t,e){var r,n=i(t),s=0,l=[];for(r in n)!o(a,r)&&o(n,r)&&c(l,r);for(;e.length>s;)o(n,r=e[s++])&&(~u(l,r)||c(l,r));return l}},function(t,e,r){var n=r(41),o=r(75),i=r(45),u=function(t){return function(e,r,u){var a,c=n(e),s=i(c),l=o(u,s);if(t&&r!=r){for(;s>l;)if((a=c[l++])!=a)return!0}else for(;s>l;l++)if((t||l in c)&&c[l]===r)return t||l||0;return!t&&-1}};t.exports={includes:u(!0),indexOf:u(!1)}},function(t,e,r){var n=r(46);t.exports=n("document","documentElement")},function(t,e,r){var n=r(51),o=r(41),i=r(74).f,u=r(114),a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"Window"==n(t)?function(t){try{return i(t)}catch(t){return u(a)}}(t):i(o(t))}},function(t,e,r){var n=r(28);e.f=n},function(t,e,r){var n=r(177),o=r(35),i=r(140),u=r(38).f;t.exports=function(t){var e=n.Symbol||(n.Symbol={});o(e,t)||u(e,t,{value:i.f(t)})}},function(t,e,r){"use strict";var n,o,i,u=r(18),a=r(30),c=r(60),s=r(101),l=r(42),f=r(28),p=r(71),d=f("iterator"),h=!1;[].keys&&("next"in(i=[].keys())?(o=s(s(i)))!==Object.prototype&&(n=o):h=!0),null==n||u((function(){var t={};return n[d].call(t)!==t}))?n={}:p&&(n=c(n)),a(n[d])||l(n,d,(function(){return this})),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:h}},function(t,e,r){var n=r(18);t.exports=!n((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},function(t,e,r){var n=r(16),o=r(15),i=r(72),u=r(33),a=r(35),c=r(38).f,s=r(74),l=r(139),f=r(183),p=r(90),d=r(185),h=!1,y=p("meta"),v=0,g=function(t){c(t,y,{value:{objectID:"O"+v++,weakData:{}}})},b=t.exports={enable:function(){b.enable=function(){},h=!0;var t=s.f,e=o([].splice),r={};r[y]=1,t(r).length&&(s.f=function(r){for(var n=t(r),o=0,i=n.length;o<i;o++)if(n[o]===y){e(n,o,1);break}return n},n({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:l.f}))},fastKey:function(t,e){if(!u(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!a(t,y)){if(!f(t))return"F";if(!e)return"E";g(t)}return t[y].objectID},getWeakData:function(t,e){if(!a(t,y)){if(!f(t))return!0;if(!e)return!1;g(t)}return t[y].weakData},onFreeze:function(t){return d&&h&&f(t)&&!a(t,y)&&g(t),t}};i[y]=!0},function(t,e,r){var n=r(28),o=r(80),i=n("iterator"),u=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||u[i]===t)}},function(t,e,r){var n=r(7),o=r(34),i=r(56),u=r(32),a=r(88),c=r(118),s=n.TypeError;t.exports=function(t,e){var r=arguments.length<2?c(t):e;if(i(r))return u(o(r,t));throw s(a(t)+" is not iterable")}},function(t,e,r){var n=r(34),o=r(32),i=r(62);t.exports=function(t,e,r){var u,a;o(t);try{if(!(u=i(t,"return"))){if("throw"===e)throw r;return r}u=n(u,t)}catch(t){a=!0,u=t}if("throw"===e)throw r;if(a)throw u;return o(u),r}},function(t,e,r){var n=r(30),o=r(33),i=r(102);t.exports=function(t,e,r){var u,a;return i&&n(u=e.constructor)&&u!==r&&o(a=u.prototype)&&a!==r.prototype&&i(t,a),t}},function(t,e,r){var n=r(42);t.exports=function(t,e,r){for(var o in e)n(t,o,e[o],r);return t}},function(t,e,r){"use strict";var n=r(46),o=r(38),i=r(28),u=r(36),a=i("species");t.exports=function(t){var e=n(t),r=o.f;u&&e&&!e[a]&&r(e,a,{configurable:!0,get:function(){return this}})}},function(t,e,r){var n=r(15),o=r(59),i=r(39),u=r(44),a=n("".charAt),c=n("".charCodeAt),s=n("".slice),l=function(t){return function(e,r){var n,l,f=i(u(e)),p=o(r),d=f.length;return p<0||p>=d?t?"":void 0:(n=c(f,p))<55296||n>56319||p+1===d||(l=c(f,p+1))<56320||l>57343?t?a(f,p):n:t?s(f,p,p+2):l-56320+(n-55296<<10)+65536}};t.exports={codeAt:l(!1),charAt:l(!0)}},function(t,e){t.exports={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}},function(t,e,r){var n=r(91)("span").classList,o=n&&n.constructor&&n.constructor.prototype;t.exports=o===Object.prototype?void 0:o},function(t,e,r){"use strict";var n=r(32);t.exports=function(){var t=n(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,r){var n=r(18),o=r(7).RegExp,i=n((function(){var t=o("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),u=i||n((function(){return!o("a","y").sticky})),a=i||n((function(){var t=o("^r","gy");return t.lastIndex=2,null!=t.exec("str")}));t.exports={BROKEN_CARET:a,MISSED_STICKY:u,UNSUPPORTED_Y:i}},function(t,e,r){"use strict";var n=r(16),o=r(79).find,i=r(100),u="find",a=!0;u in[]&&Array(1).find((function(){a=!1})),n({target:"Array",proto:!0,forced:a},{find:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),i(u)},function(t,e,r){"use strict";var n=r(16),o=r(137).includes,i=r(100);n({target:"Array",proto:!0},{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),i("includes")},function(t,e,r){"use strict";var n=r(16),o=r(15),i=r(197),u=r(44),a=r(39),c=r(198),s=o("".indexOf);n({target:"String",proto:!0,forced:!c("includes")},{includes:function(t){return!!~s(a(u(this)),a(i(t)),arguments.length>1?arguments[1]:void 0)}})},function(t,e,r){var n=r(33),o=r(51),i=r(28)("match");t.exports=function(t){var e;return n(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==o(t))}},function(t,e,r){var n=r(15);t.exports=n(1..valueOf)},function(t,e,r){var n=r(15),o=r(44),i=r(39),u=r(162),a=n("".replace),c="["+u+"]",s=RegExp("^"+c+c+"*"),l=RegExp(c+c+"*$"),f=function(t){return function(e){var r=i(o(e));return 1&t&&(r=a(r,s,"")),2&t&&(r=a(r,l,"")),r}};t.exports={start:f(1),end:f(2),trim:f(3)}},function(t,e){t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},function(t,e){var r,n,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function a(t){if(r===setTimeout)return setTimeout(t,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(t){r=i}try{n="function"==typeof clearTimeout?clearTimeout:u}catch(t){n=u}}();var c,s=[],l=!1,f=-1;function p(){l&&c&&(l=!1,c.length?s=c.concat(s):f=-1,s.length&&d())}function d(){if(!l){var t=a(p);l=!0;for(var e=s.length;e;){for(c=s,s=[];++f<e;)c&&c[f].run();f=-1,e=s.length}c=null,l=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===u||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function h(t,e){this.fun=t,this.array=e}function y(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];s.push(new h(t,e)),1!==s.length||l||a(d)},h.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,r){var n=r(32),o=r(165),i=r(28)("species");t.exports=function(t,e){var r,u=n(t).constructor;return void 0===u||null==(r=n(u)[i])?e:o(r)}},function(t,e,r){var n=r(7),o=r(99),i=r(88),u=n.TypeError;t.exports=function(t){if(o(t))return t;throw u(i(t)+" is not a constructor")}},function(t,e,r){"use strict";var n=r(16),o=r(161).trim;n({target:"String",proto:!0,forced:r(200)("trim")},{trim:function(){return o(this)}})},function(t,e,r){"use strict";var n=r(34),o=r(123),i=r(32),u=r(94),a=r(39),c=r(44),s=r(62),l=r(124),f=r(125);o("match",(function(t,e,r){return[function(e){var r=c(this),o=null==e?void 0:s(e,t);return o?n(o,e,r):new RegExp(e)[t](a(r))},function(t){var n=i(this),o=a(t),c=r(e,n,o);if(c.done)return c.value;if(!n.global)return f(n,o);var s=n.unicode;n.lastIndex=0;for(var p,d=[],h=0;null!==(p=f(n,o));){var y=a(p[0]);d[h]=y,""===y&&(n.lastIndex=l(o,u(n.lastIndex),s)),h++}return 0===h?null:d}]}))},function(t,e,r){var n,o,i,u,a=r(7),c=r(76),s=r(64),l=r(30),f=r(35),p=r(18),d=r(138),h=r(98),y=r(91),v=r(169),g=r(128),b=a.setImmediate,m=a.clearImmediate,O=a.process,_=a.Dispatch,w=a.Function,j=a.MessageChannel,x=a.String,E=0,S={},P="onreadystatechange";try{n=a.location}catch(t){}var A=function(t){if(f(S,t)){var e=S[t];delete S[t],e()}},k=function(t){return function(){A(t)}},D=function(t){A(t.data)},T=function(t){a.postMessage(x(t),n.protocol+"//"+n.host)};b&&m||(b=function(t){var e=h(arguments,1);return S[++E]=function(){c(l(t)?t:w(t),void 0,e)},o(E),E},m=function(t){delete S[t]},g?o=function(t){O.nextTick(k(t))}:_&&_.now?o=function(t){_.now(k(t))}:j&&!v?(u=(i=new j).port2,i.port1.onmessage=D,o=s(u.postMessage,u)):a.addEventListener&&l(a.postMessage)&&!a.importScripts&&n&&"file:"!==n.protocol&&!p(T)?(o=T,a.addEventListener("message",D,!1)):o=P in y("script")?function(t){d.appendChild(y("script")).onreadystatechange=function(){d.removeChild(this),A(t)}}:function(t){setTimeout(k(t),0)}),t.exports={set:b,clear:m}},function(t,e,r){var n=r(55);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(n)},function(t,e,r){"use strict";var n=r(56),o=function(t){var e,r;this.promise=new t((function(t,n){if(void 0!==e||void 0!==r)throw TypeError("Bad Promise constructor");e=t,r=n})),this.resolve=n(e),this.reject=n(r)};t.exports.f=function(t){return new o(t)}},function(t,e,r){"use strict";e.a=function(){return!1}},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return m}));var n=r(1);function o(t){throw new Error("[mobx-utils] "+t)}function i(t,e){void 0===e&&(e="Illegal state"),t||o(e)}var u=function(t){return t&&t!==Object.prototype&&Object.getOwnPropertyNames(t).concat(u(Object.getPrototypeOf(t))||[])},a=function(t){return function(t){var e=u(t);return e.filter((function(t,r){return e.indexOf(t)===r}))}(t).filter((function(t){return"constructor"!==t&&!~t.indexOf("__")}))},c="pending",s="fulfilled",l="rejected";function f(t){switch(this.state){case c:return t.pending&&t.pending(this.value);case l:return t.rejected&&t.rejected(this.value);case s:return t.fulfilled?t.fulfilled(this.value):this.value}}function p(t,e){if(i(arguments.length<=2,"fromPromise expects up to two arguments"),i("function"==typeof t||"object"==typeof t&&t&&"function"==typeof t.then,"Please pass a promise or function to fromPromise"),!0===t.isPromiseBasedObservable)return t;"function"==typeof t&&(t=new Promise(t));var r=t;t.then(Object(n.k)("observableFromPromise-resolve",(function(t){r.value=t,r.state=s})),Object(n.k)("observableFromPromise-reject",(function(t){r.value=t,r.state=l}))),r.isPromiseBasedObservable=!0,r.case=f;var o=e&&e.state===s?e.value:void 0;return Object(n.q)(r,{value:o,state:c},{},{deep:!1}),r}!function(t){t.reject=Object(n.k)("fromPromise.reject",(function(e){var r=t(Promise.reject(e));return r.state=l,r.value=e,r})),t.resolve=Object(n.k)("fromPromise.resolve",(function(e){void 0===e&&(e=void 0);var r=t(Promise.resolve(e));return r.state=s,r.value=e,r}))}(p||(p={}));var d=function(t,e,r,n){var o,i=arguments.length,u=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(u=(i<3?o(u):i>3?o(e,r,u):o(e,r))||u);return i>3&&u&&Object.defineProperty(e,r,u),u};!function(){function t(t,e){var r=this;Object(n.G)((function(){r.current=e,r.subscription=t.subscribe(r)}))}t.prototype.dispose=function(){this.subscription&&this.subscription.unsubscribe()},t.prototype.next=function(t){this.current=t},t.prototype.complete=function(){this.dispose()},t.prototype.error=function(t){this.current=t,this.dispose()},d([n.C.ref],t.prototype,"current",void 0),d([n.k.bound],t.prototype,"next",null),d([n.k.bound],t.prototype,"complete",null),d([n.k.bound],t.prototype,"error",null)}();var h=function(){return h=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},h.apply(this,arguments)},y=function(t,e,r,n){var o,i=arguments.length,u=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(t,e,r,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(u=(i<3?o(u):i>3?o(e,r,u):o(e,r))||u);return i>3&&u&&Object.defineProperty(e,r,u),u},v=["model","reset","submit","isDirty","isPropertyDirty","resetProperty"];!function(){function t(t){var e=this;this.model=t,this.localValues=n.C.map({}),this.localComputedValues=n.C.map({}),this.isPropertyDirty=function(t){return e.localValues.has(t)},i(Object(n.A)(t),"createViewModel expects an observable object"),a(t).forEach((function(r){if(r!==n.a&&"__mobxDidRunLazyInitializers"!==r){if(i(-1===v.indexOf(r),"The propertyname "+r+" is reserved and cannot be used with viewModels"),Object(n.w)(t,r)){var o=Object(n.h)(t,r).derivation;e.localComputedValues.set(r,Object(n.m)(o.bind(e)))}var u=Object.getOwnPropertyDescriptor(t,r),a=u?{enumerable:u.enumerable}:{};Object.defineProperty(e,r,h(h({},a),{configurable:!0,get:function(){return Object(n.w)(t,r)?e.localComputedValues.get(r).get():e.isPropertyDirty(r)?e.localValues.get(r):e.model[r]},set:Object(n.k)((function(t){t!==e.model[r]?e.localValues.set(r,t):e.localValues.delete(r)}))}))}}))}Object.defineProperty(t.prototype,"isDirty",{get:function(){return this.localValues.size>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"changedValues",{get:function(){return this.localValues.toJS()},enumerable:!1,configurable:!0}),t.prototype.submit=function(){var t=this;Object(n.B)(this.localValues).forEach((function(e){var r=t.localValues.get(e),o=t.model[e];Object(n.y)(o)?o.replace(r):Object(n.z)(o)?(o.clear(),o.merge(r)):Object(n.v)(r)||(t.model[e]=r)})),this.localValues.clear()},t.prototype.reset=function(){this.localValues.clear()},t.prototype.resetProperty=function(t){this.localValues.delete(t)},y([n.m],t.prototype,"isDirty",null),y([n.m],t.prototype,"changedValues",null),y([n.k.bound],t.prototype,"submit",null),y([n.k.bound],t.prototype,"reset",null),y([n.k.bound],t.prototype,"resetProperty",null)}();function g(t){if(!t)return"ROOT";for(var e=[];t.parent;)e.push(t.path),t=t.parent;return e.reverse().join("/")}function b(t){return Object(n.A)(t)||Object(n.y)(t)||Object(n.z)(t)}function m(t,e){var r=new WeakMap;function o(n){var o=r.get(n.object);!function(t,e){switch(t.type){case"add":i(t.newValue,e,t.name);break;case"update":u(t.oldValue),i(t.newValue,e,t.name||""+t.index);break;case"remove":case"delete":u(t.oldValue);break;case"splice":t.removed.map(u),t.added.forEach((function(r,n){return i(r,e,""+(t.index+n))}));for(var n=t.index+t.addedCount;n<t.object.length;n++)if(b(t.object[n])){var o=r.get(t.object[n]);o&&(o.path=""+n)}}}(n,o),e(n,g(o),t)}function i(t,e,u){if(b(t)){var a=r.get(t);if(a){if(a.parent!==e||a.path!==u)throw new Error("The same observable object cannot appear twice in the same tree, trying to assign it to '"+g(e)+"/"+u+"', but it already exists at '"+g(a.parent)+"/"+a.path+"'")}else{var c={parent:e,path:u,dispose:Object(n.D)(t,o)};r.set(t,c),Object(n.p)(t).forEach((function(t){var e=t[0];return i(t[1],c,e)}))}}}function u(t){if(b(t)){var e=r.get(t);if(!e)return;r.delete(t),e.dispose(),Object(n.L)(t).forEach(u)}}return i(t,void 0,""),function(){u(t)}}var O,_=(O=function(t,e){return O=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},O(t,e)},function(t,e){function r(){this.constructor=t}O(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),w=(function(t){function e(e,r,o){var i=void 0===o?{}:o,u=i.name,a=void 0===u?"ogm"+(1e3*Math.random()|0):u,c=i.keyToName,s=void 0===c?function(t){return""+t}:c,l=t.call(this)||this;l._keyToName=s,l._groupBy=r,l._ogmInfoKey=Symbol("ogmInfo"+a),l._base=e;for(var f=0;f<e.length;f++)l._addItem(e[f]);return l._disposeBaseObserver=Object(n.D)(l._base,(function(t){if("splice"===t.type)Object(n.J)((function(){for(var e=0,r=t.removed;e<r.length;e++){var n=r[e];l._removeItem(n)}for(var o=0,i=t.added;o<i.length;o++){var u=i[o];l._addItem(u)}}));else{if("update"!==t.type)throw new Error("illegal state");Object(n.J)((function(){l._removeItem(t.oldValue),l._addItem(t.newValue)}))}})),l}_(e,t),e.prototype.clear=function(){throw new Error("not supported")},e.prototype.delete=function(t){throw new Error("not supported")},e.prototype.set=function(t,e){throw new Error("not supported")},e.prototype.dispose=function(){this._disposeBaseObserver();for(var t=0;t<this._base.length;t++){var e=this._base[t];e[this._ogmInfoKey].reaction(),delete e[this._ogmInfoKey]}},e.prototype._getGroupArr=function(e){var r=t.prototype.get.call(this,e);return void 0===r&&(r=Object(n.C)([],{name:"GroupArray["+this._keyToName(e)+"]",deep:!1}),t.prototype.set.call(this,e,r)),r},e.prototype._removeFromGroupArr=function(e,r){var n=t.prototype.get.call(this,e);1===n.length?t.prototype.delete.call(this,e):(r===n.length-1||(n[r]=n[n.length-1],n[r][this._ogmInfoKey].groupArrIndex=r),n.length--)},e.prototype._addItem=function(t){var e=this,r=this._groupBy(t),o=this._getGroupArr(r),i={groupByValue:r,groupArrIndex:o.length,reaction:Object(n.F)((function(){return e._groupBy(t)}),(function(r,n){var o=t[e._ogmInfoKey];e._removeFromGroupArr(o.groupByValue,o.groupArrIndex);var i=e._getGroupArr(r),u=i.length;i.push(t),o.groupByValue=r,o.groupArrIndex=u}))};Object.defineProperty(t,this._ogmInfoKey,{configurable:!0,enumerable:!1,value:i}),o.push(t)},e.prototype._removeItem=function(t){var e=t[this._ogmInfoKey];this._removeFromGroupArr(e.groupByValue,e.groupArrIndex),e.reaction(),delete t[this._ogmInfoKey]}}(n.b),function(){function t(t,e){this.base=t,this.args=e,this.closestIdx=0,this.isDisposed=!1;for(var r=this.closest=this.root=t,n=0;n<this.args.length-1&&(r=r.get(e[n]));n++)this.closest=r;this.closestIdx=n}return t.prototype.exists=function(){this.assertNotDisposed();var t=this.args.length;return this.closestIdx>=t-1&&this.closest.has(this.args[t-1])},t.prototype.get=function(){if(this.assertNotDisposed(),!this.exists())throw new Error("Entry doesn't exist");return this.closest.get(this.args[this.args.length-1])},t.prototype.set=function(t){this.assertNotDisposed();for(var e=this.args.length,r=this.closest,n=this.closestIdx;n<e-1;n++){var o=new Map;r.set(this.args[n],o),r=o}this.closestIdx=e-1,this.closest=r,r.set(this.args[e-1],t)},t.prototype.delete=function(){if(this.assertNotDisposed(),!this.exists())throw new Error("Entry doesn't exist");var t=this.args.length;this.closest.delete(this.args[t-1]);for(var e=this.root,r=[e],n=0;n<t-1;n++)e=e.get(this.args[n]),r.push(e);for(n=r.length-1;n>0;n--)0===r[n].size&&r[n-1].delete(this.args[n-1]);this.isDisposed=!0},t.prototype.assertNotDisposed=function(){if(this.isDisposed)throw new Error("Concurrent modification exception")},t}());!function(){function t(){this.store=new Map,this.argsLength=-1}t.prototype.entry=function(t){if(-1===this.argsLength)this.argsLength=t.length;else if(this.argsLength!==t.length)throw new Error("DeepMap should be used with functions with a consistent length, expected: "+this.argsLength+", got: "+t.length);return this.last&&(this.last.isDisposed=!0),this.last=new w(this.store,t)}}();new Set,new Set;var j,x=Promise.resolve();j="undefined"!=typeof queueMicrotask?queueMicrotask:void 0!==t&&t.nextTick?function(e){t.nextTick(e)}:function(t){setTimeout(t,0)};var E=function(){return new Promise((function(t){j(t)}))}}).call(this,r(163))},function(t,e,r){var n;!function(o,i,u){if(o){for(var a,c={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},s={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},l={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},f={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},p=1;p<20;++p)c[111+p]="f"+p;for(p=0;p<=9;++p)c[p+96]=p.toString();m.prototype.bind=function(t,e,r){var n=this;return t=t instanceof Array?t:[t],n._bindMultiple.call(n,t,e,r),n},m.prototype.unbind=function(t,e){return this.bind.call(this,t,(function(){}),e)},m.prototype.trigger=function(t,e){var r=this;return r._directMap[t+":"+e]&&r._directMap[t+":"+e]({},t),r},m.prototype.reset=function(){var t=this;return t._callbacks={},t._directMap={},t},m.prototype.stopCallback=function(t,e){if((" "+e.className+" ").indexOf(" mousetrap ")>-1)return!1;if(b(e,this.target))return!1;if("composedPath"in t&&"function"==typeof t.composedPath){var r=t.composedPath()[0];r!==t.target&&(e=r)}return"INPUT"==e.tagName||"SELECT"==e.tagName||"TEXTAREA"==e.tagName||e.isContentEditable},m.prototype.handleKey=function(){var t=this;return t._handleKey.apply(t,arguments)},m.addKeycodes=function(t){for(var e in t)t.hasOwnProperty(e)&&(c[e]=t[e]);a=null},m.init=function(){var t=m(i);for(var e in t)"_"!==e.charAt(0)&&(m[e]=function(e){return function(){return t[e].apply(t,arguments)}}(e))},m.init(),o.Mousetrap=m,t.exports&&(t.exports=m),void 0===(n=function(){return m}.call(e,r,e,t))||(t.exports=n)}function d(t,e,r){t.addEventListener?t.addEventListener(e,r,!1):t.attachEvent("on"+e,r)}function h(t){if("keypress"==t.type){var e=String.fromCharCode(t.which);return t.shiftKey||(e=e.toLowerCase()),e}return c[t.which]?c[t.which]:s[t.which]?s[t.which]:String.fromCharCode(t.which).toLowerCase()}function y(t){return"shift"==t||"ctrl"==t||"alt"==t||"meta"==t}function v(t,e,r){return r||(r=function(){if(!a)for(var t in a={},c)t>95&&t<112||c.hasOwnProperty(t)&&(a[c[t]]=t);return a}()[t]?"keydown":"keypress"),"keypress"==r&&e.length&&(r="keydown"),r}function g(t,e){var r,n,o,i=[];for(r=function(t){return"+"===t?["+"]:(t=t.replace(/\+{2}/g,"+plus")).split("+")}(t),o=0;o<r.length;++o)n=r[o],f[n]&&(n=f[n]),e&&"keypress"!=e&&l[n]&&(n=l[n],i.push("shift")),y(n)&&i.push(n);return{key:n,modifiers:i,action:e=v(n,i,e)}}function b(t,e){return null!==t&&t!==i&&(t===e||b(t.parentNode,e))}function m(t){var e=this;if(t=t||i,!(e instanceof m))return new m(t);e.target=t,e._callbacks={},e._directMap={};var r,n={},o=!1,u=!1,a=!1;function c(t){t=t||{};var e,r=!1;for(e in n)t[e]?r=!0:n[e]=0;r||(a=!1)}function s(t,r,o,i,u,a){var c,s,l,f,p=[],d=o.type;if(!e._callbacks[t])return[];for("keyup"==d&&y(t)&&(r=[t]),c=0;c<e._callbacks[t].length;++c)if(s=e._callbacks[t][c],(i||!s.seq||n[s.seq]==s.level)&&d==s.action&&("keypress"==d&&!o.metaKey&&!o.ctrlKey||(l=r,f=s.modifiers,l.sort().join(",")===f.sort().join(",")))){var h=!i&&s.combo==u,v=i&&s.seq==i&&s.level==a;(h||v)&&e._callbacks[t].splice(c,1),p.push(s)}return p}function l(t,r,n,o){e.stopCallback(r,r.target||r.srcElement,n,o)||!1===t(r,n)&&(function(t){t.preventDefault?t.preventDefault():t.returnValue=!1}(r),function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}(r))}function f(t){"number"!=typeof t.which&&(t.which=t.keyCode);var r=h(t);r&&("keyup"!=t.type||o!==r?e.handleKey(r,function(t){var e=[];return t.shiftKey&&e.push("shift"),t.altKey&&e.push("alt"),t.ctrlKey&&e.push("ctrl"),t.metaKey&&e.push("meta"),e}(t),t):o=!1)}function p(t,e,i,u){function s(e){return function(){a=e,++n[t],clearTimeout(r),r=setTimeout(c,1e3)}}function f(e){l(i,e,t),"keyup"!==u&&(o=h(e)),setTimeout(c,10)}n[t]=0;for(var p=0;p<e.length;++p){var d=p+1===e.length?f:s(u||g(e[p+1]).action);v(e[p],d,u,t,p)}}function v(t,r,n,o,i){e._directMap[t+":"+n]=r;var u,a=(t=t.replace(/\s+/g," ")).split(" ");a.length>1?p(t,a,r,n):(u=g(t,n),e._callbacks[u.key]=e._callbacks[u.key]||[],s(u.key,u.modifiers,{type:u.action},o,t,i),e._callbacks[u.key][o?"unshift":"push"]({callback:r,modifiers:u.modifiers,action:u.action,seq:o,level:i,combo:t}))}e._handleKey=function(t,e,r){var n,o=s(t,e,r),i={},f=0,p=!1;for(n=0;n<o.length;++n)o[n].seq&&(f=Math.max(f,o[n].level));for(n=0;n<o.length;++n)if(o[n].seq){if(o[n].level!=f)continue;p=!0,i[o[n].seq]=1,l(o[n].callback,r,o[n].combo,o[n].seq)}else p||l(o[n].callback,r,o[n].combo);var d="keypress"==r.type&&u;r.type!=a||y(t)||d||c(i),u=p&&"keydown"==r.type},e._bindMultiple=function(t,e,r){for(var n=0;n<t.length;++n)v(t[n],e,r)},d(t,"keypress",f),d(t,"keydown",f),d(t,"keyup",f)}}("undefined"!=typeof window?window:null,"undefined"!=typeof window?document:null)},function(t,e,r){var n=r(7),o=r(34),i=r(30),u=r(33),a=n.TypeError;t.exports=function(t,e){var r,n;if("string"===e&&i(r=t.toString)&&!u(n=o(r,t)))return n;if(i(r=t.valueOf)&&!u(n=o(r,t)))return n;if("string"!==e&&i(r=t.toString)&&!u(n=o(r,t)))return n;throw a("Can't convert object to primitive value")}},function(t,e,r){var n=r(7),o=r(30),i=r(92),u=n.WeakMap;t.exports=o(u)&&/native code/.test(i(u))},function(t,e,r){var n=r(36),o=r(38),i=r(32),u=r(41),a=r(77);t.exports=n?Object.defineProperties:function(t,e){i(t);for(var r,n=u(e),c=a(e),s=c.length,l=0;s>l;)o.f(t,r=c[l++],n[r]);return t}},function(t,e,r){var n=r(7);t.exports=n},function(t,e,r){var n=r(7),o=r(96),i=r(99),u=r(33),a=r(28)("species"),c=n.Array;t.exports=function(t){var e;return o(t)&&(e=t.constructor,(i(e)&&(e===c||o(e.prototype))||u(e)&&null===(e=e[a]))&&(e=void 0)),void 0===e?c:e}},function(t,e,r){"use strict";var n=r(113),o=r(97);t.exports=n?{}.toString:function(){return"[object "+o(this)+"]"}},function(t,e,r){"use strict";var n=r(142).IteratorPrototype,o=r(60),i=r(69),u=r(78),a=r(80),c=function(){return this};t.exports=function(t,e,r,s){var l=e+" Iterator";return t.prototype=o(n,{next:i(+!s,r)}),u(t,l,!1,!0),a[l]=c,t}},function(t,e,r){var n=r(7),o=r(30),i=n.String,u=n.TypeError;t.exports=function(t){if("object"==typeof t||o(t))return t;throw u("Can't set "+i(t)+" as a prototype")}},function(t,e,r){"use strict";var n=r(16),o=r(7),i=r(15),u=r(95),a=r(42),c=r(144),s=r(117),l=r(119),f=r(30),p=r(33),d=r(18),h=r(120),y=r(78),v=r(148);t.exports=function(t,e,r){var g=-1!==t.indexOf("Map"),b=-1!==t.indexOf("Weak"),m=g?"set":"add",O=o[t],_=O&&O.prototype,w=O,j={},x=function(t){var e=i(_[t]);a(_,t,"add"==t?function(t){return e(this,0===t?0:t),this}:"delete"==t?function(t){return!(b&&!p(t))&&e(this,0===t?0:t)}:"get"==t?function(t){return b&&!p(t)?void 0:e(this,0===t?0:t)}:"has"==t?function(t){return!(b&&!p(t))&&e(this,0===t?0:t)}:function(t,r){return e(this,0===t?0:t,r),this})};if(u(t,!f(O)||!(b||_.forEach&&!d((function(){(new O).entries().next()})))))w=r.getConstructor(e,t,g,m),c.enable();else if(u(t,!0)){var E=new w,S=E[m](b?{}:-0,1)!=E,P=d((function(){E.has(1)})),A=h((function(t){new O(t)})),k=!b&&d((function(){for(var t=new O,e=5;e--;)t[m](e,e);return!t.has(-0)}));A||((w=e((function(t,e){l(t,_);var r=v(new O,t,w);return null!=e&&s(e,r[m],{that:r,AS_ENTRIES:g}),r}))).prototype=_,_.constructor=w),(P||k)&&(x("delete"),x("has"),g&&x("get")),(k||S)&&x(m),b&&_.clear&&delete _.clear}return j[t]=w,n({global:!0,forced:w!=O},j),y(w,t),b||r.setStrong(w,t,g),w}},function(t,e,r){var n=r(18),o=r(33),i=r(51),u=r(184),a=Object.isExtensible,c=n((function(){a(1)}));t.exports=c||u?function(t){return!!o(t)&&((!u||"ArrayBuffer"!=i(t))&&(!a||a(t)))}:a},function(t,e,r){var n=r(18);t.exports=n((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}))},function(t,e,r){var n=r(18);t.exports=!n((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(t,e,r){"use strict";var n=r(38).f,o=r(60),i=r(149),u=r(64),a=r(119),c=r(117),s=r(116),l=r(150),f=r(36),p=r(144).fastKey,d=r(58),h=d.set,y=d.getterFor;t.exports={getConstructor:function(t,e,r,s){var l=t((function(t,n){a(t,d),h(t,{type:e,index:o(null),first:void 0,last:void 0,size:0}),f||(t.size=0),null!=n&&c(n,t[s],{that:t,AS_ENTRIES:r})})),d=l.prototype,v=y(e),g=function(t,e,r){var n,o,i=v(t),u=b(t,e);return u?u.value=r:(i.last=u={index:o=p(e,!0),key:e,value:r,previous:n=i.last,next:void 0,removed:!1},i.first||(i.first=u),n&&(n.next=u),f?i.size++:t.size++,"F"!==o&&(i.index[o]=u)),t},b=function(t,e){var r,n=v(t),o=p(e);if("F"!==o)return n.index[o];for(r=n.first;r;r=r.next)if(r.key==e)return r};return i(d,{clear:function(){for(var t=v(this),e=t.index,r=t.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete e[r.index],r=r.next;t.first=t.last=void 0,f?t.size=0:this.size=0},delete:function(t){var e=this,r=v(e),n=b(e,t);if(n){var o=n.next,i=n.previous;delete r.index[n.index],n.removed=!0,i&&(i.next=o),o&&(o.previous=i),r.first==n&&(r.first=o),r.last==n&&(r.last=i),f?r.size--:e.size--}return!!n},forEach:function(t){for(var e,r=v(this),n=u(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:r.first;)for(n(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!b(this,t)}}),i(d,r?{get:function(t){var e=b(this,t);return e&&e.value},set:function(t,e){return g(this,0===t?0:t,e)}}:{add:function(t){return g(this,t=0===t?0:t,t)}}),f&&n(d,"size",{get:function(){return v(this).size}}),l},setStrong:function(t,e,r){var n=e+" Iterator",o=y(e),i=y(n);s(t,e,(function(t,e){h(this,{type:n,target:t,state:o(t),kind:e,last:void 0})}),(function(){for(var t=i(this),e=t.kind,r=t.last;r&&r.removed;)r=r.previous;return t.target&&(t.last=r=r?r.next:t.state.first)?"keys"==e?{value:r.key,done:!1}:"values"==e?{value:r.value,done:!1}:{value:[r.key,r.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),r?"entries":"values",!r,!0),l(e)}}},function(t,e,r){"use strict";var n=r(79).forEach,o=r(121)("forEach");t.exports=o?[].forEach:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}},function(t,e,r){"use strict";var n=r(7),o=r(64),i=r(34),u=r(40),a=r(189),c=r(145),s=r(99),l=r(45),f=r(63),p=r(146),d=r(118),h=n.Array;t.exports=function(t){var e=u(t),r=s(this),n=arguments.length,y=n>1?arguments[1]:void 0,v=void 0!==y;v&&(y=o(y,n>2?arguments[2]:void 0));var g,b,m,O,_,w,j=d(e),x=0;if(!j||this==h&&c(j))for(g=l(e),b=r?new this(g):h(g);g>x;x++)w=v?y(e[x],x):e[x],f(b,x,w);else for(_=(O=p(e,j)).next,b=r?new this:[];!(m=i(_,O)).done;x++)w=v?a(O,y,[m.value,x],!0):m.value,f(b,x,w);return b.length=x,b}},function(t,e,r){var n=r(32),o=r(147);t.exports=function(t,e,r,i){try{return i?e(n(r)[0],r[1]):e(r)}catch(e){o(t,"throw",e)}}},function(t,e,r){var n=r(18),o=r(7).RegExp;t.exports=n((function(){var t=o(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)}))},function(t,e,r){var n=r(18),o=r(7).RegExp;t.exports=n((function(){var t=o("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}))},function(t,e,r){"use strict";var n=r(16),o=r(15),i=r(56),u=r(40),a=r(45),c=r(39),s=r(18),l=r(193),f=r(121),p=r(194),d=r(195),h=r(70),y=r(196),v=[],g=o(v.sort),b=o(v.push),m=s((function(){v.sort(void 0)})),O=s((function(){v.sort(null)})),_=f("sort"),w=!s((function(){if(h)return h<70;if(!(p&&p>3)){if(d)return!0;if(y)return y<603;var t,e,r,n,o="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)v.push({k:e+n,v:r})}for(v.sort((function(t,e){return e.v-t.v})),n=0;n<v.length;n++)e=v[n].k.charAt(0),o.charAt(o.length-1)!==e&&(o+=e);return"DGBEFHACIJK"!==o}}));n({target:"Array",proto:!0,forced:m||!O||!_||!w},{sort:function(t){void 0!==t&&i(t);var e=u(this);if(w)return void 0===t?g(e):g(e,t);var r,n,o=[],s=a(e);for(n=0;n<s;n++)n in e&&b(o,e[n]);for(l(o,function(t){return function(e,r){return void 0===r?-1:void 0===e?1:void 0!==t?+t(e,r)||0:c(e)>c(r)?1:-1}}(t)),r=o.length,n=0;n<r;)e[n]=o[n++];for(;n<s;)delete e[n++];return e}})},function(t,e,r){var n=r(114),o=Math.floor,i=function(t,e){var r=t.length,c=o(r/2);return r<8?u(t,e):a(t,i(n(t,0,c),e),i(n(t,c),e),e)},u=function(t,e){for(var r,n,o=t.length,i=1;i<o;){for(n=i,r=t[i];n&&e(t[n-1],r)>0;)t[n]=t[--n];n!==i++&&(t[n]=r)}return t},a=function(t,e,r,n){for(var o=e.length,i=r.length,u=0,a=0;u<o||a<i;)t[u+a]=u<o&&a<i?n(e[u],r[a])<=0?e[u++]:r[a++]:u<o?e[u++]:r[a++];return t};t.exports=i},function(t,e,r){var n=r(55).match(/firefox\/(\d+)/i);t.exports=!!n&&+n[1]},function(t,e,r){var n=r(55);t.exports=/MSIE|Trident/.test(n)},function(t,e,r){var n=r(55).match(/AppleWebKit\/(\d+)\./);t.exports=!!n&&+n[1]},function(t,e,r){var n=r(7),o=r(159),i=n.TypeError;t.exports=function(t){if(o(t))throw i("The method doesn't accept regular expressions");return t}},function(t,e,r){var n=r(28)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(r){try{return e[n]=!1,"/./"[t](e)}catch(t){}}return!1}},function(t,e,r){r(16)({target:"Number",stat:!0},{isNaN:function(t){return t!=t}})},function(t,e,r){var n=r(73).PROPER,o=r(18),i=r(162);t.exports=function(t){return o((function(){return!!i[t]()||"​…᠎"!=="​…᠎"[t]()||n&&i[t].name!==t}))}},function(t,e,r){var n=r(15),o=r(40),i=Math.floor,u=n("".charAt),a=n("".replace),c=n("".slice),s=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,l=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,r,n,f,p){var d=r+t.length,h=n.length,y=l;return void 0!==f&&(f=o(f),y=s),a(p,y,(function(o,a){var s;switch(u(a,0)){case"$":return"$";case"&":return t;case"`":return c(e,0,r);case"'":return c(e,d);case"<":s=f[c(a,1,-1)];break;default:var l=+a;if(0===l)return o;if(l>h){var p=i(l/10);return 0===p?o:p<=h?void 0===n[p-1]?u(a,1):n[p-1]+u(a,1):o}s=n[l-1]}return void 0===s?"":s}))}},function(t,e,r){"use strict";var n=r(36),o=r(15),i=r(34),u=r(18),a=r(77),c=r(112),s=r(84),l=r(40),f=r(85),p=Object.assign,d=Object.defineProperty,h=o([].concat);t.exports=!p||u((function(){if(n&&1!==p({b:1},p(d({},"a",{enumerable:!0,get:function(){d(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},r=Symbol(),o="abcdefghijklmnopqrst";return t[r]=7,o.split("").forEach((function(t){e[t]=t})),7!=p({},t)[r]||a(p({},e)).join("")!=o}))?function(t,e){for(var r=l(t),o=arguments.length,u=1,p=c.f,d=s.f;o>u;)for(var y,v=f(arguments[u++]),g=p?h(a(v),p(v)):a(v),b=g.length,m=0;b>m;)y=g[m++],n&&!i(d,v,y)||(r[y]=v[y]);return r}:p},function(t,e,r){"use strict";var n=r(7),o=r(15),i=r(56),u=r(33),a=r(35),c=r(98),s=n.Function,l=o([].concat),f=o([].join),p={},d=function(t,e,r){if(!a(p,e)){for(var n=[],o=0;o<e;o++)n[o]="a["+o+"]";p[e]=s("C,a","return new C("+f(n,",")+")")}return p[e](t,r)};t.exports=s.bind||function(t){var e=i(this),r=e.prototype,n=c(arguments,1),o=function(){var r=l(n,c(arguments));return this instanceof o?d(e,r.length,r):e.apply(t,r)};return u(r)&&(o.prototype=r),o}},function(t,e,r){var n=r(35);t.exports=function(t){return void 0!==t&&(n(t,"value")||n(t,"writable"))}},function(t,e,r){var n=r(15),o=r(44),i=r(39),u=/"/g,a=n("".replace);t.exports=function(t,e,r,n){var c=i(o(t)),s="<"+e;return""!==r&&(s+=" "+r+'="'+a(i(n),u,"&quot;")+'"'),s+">"+c+"</"+e+">"}},function(t,e,r){var n=r(18);t.exports=function(t){return n((function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3}))}},function(t,e,r){r(16)({target:"Number",stat:!0},{EPSILON:Math.pow(2,-52)})},function(t,e,r){"use strict";var n,o,i,u,a=r(16),c=r(71),s=r(7),l=r(46),f=r(34),p=r(209),d=r(42),h=r(149),y=r(102),v=r(78),g=r(150),b=r(56),m=r(30),O=r(33),_=r(119),w=r(92),j=r(117),x=r(120),E=r(164),S=r(168).set,P=r(210),A=r(213),k=r(214),D=r(170),T=r(215),M=r(58),N=r(95),C=r(28),R=r(216),I=r(128),L=r(70),z=C("species"),B="Promise",U=M.getterFor(B),F=M.set,H=M.getterFor(B),X=p&&p.prototype,G=p,Y=X,V=s.TypeError,W=s.document,K=s.process,$=D.f,Z=$,q=!!(W&&W.createEvent&&s.dispatchEvent),J=m(s.PromiseRejectionEvent),Q="unhandledrejection",tt=!1,et=N(B,(function(){var t=w(G),e=t!==String(G);if(!e&&66===L)return!0;if(c&&!Y.finally)return!0;if(L>=51&&/native code/.test(t))return!1;var r=new G((function(t){t(1)})),n=function(t){t((function(){}),(function(){}))};return(r.constructor={})[z]=n,!(tt=r.then((function(){}))instanceof n)||!e&&R&&!J})),rt=et||!x((function(t){G.all(t).catch((function(){}))})),nt=function(t){var e;return!(!O(t)||!m(e=t.then))&&e},ot=function(t,e){if(!t.notified){t.notified=!0;var r=t.reactions;P((function(){for(var n=t.value,o=1==t.state,i=0;r.length>i;){var u,a,c,s=r[i++],l=o?s.ok:s.fail,p=s.resolve,d=s.reject,h=s.domain;try{l?(o||(2===t.rejection&&ct(t),t.rejection=1),!0===l?u=n:(h&&h.enter(),u=l(n),h&&(h.exit(),c=!0)),u===s.promise?d(V("Promise-chain cycle")):(a=nt(u))?f(a,u,p,d):p(u)):d(n)}catch(t){h&&!c&&h.exit(),d(t)}}t.reactions=[],t.notified=!1,e&&!t.rejection&&ut(t)}))}},it=function(t,e,r){var n,o;q?((n=W.createEvent("Event")).promise=e,n.reason=r,n.initEvent(t,!1,!0),s.dispatchEvent(n)):n={promise:e,reason:r},!J&&(o=s["on"+t])?o(n):t===Q&&k("Unhandled promise rejection",r)},ut=function(t){f(S,s,(function(){var e,r=t.facade,n=t.value;if(at(t)&&(e=T((function(){I?K.emit("unhandledRejection",n,r):it(Q,r,n)})),t.rejection=I||at(t)?2:1,e.error))throw e.value}))},at=function(t){return 1!==t.rejection&&!t.parent},ct=function(t){f(S,s,(function(){var e=t.facade;I?K.emit("rejectionHandled",e):it("rejectionhandled",e,t.value)}))},st=function(t,e,r){return function(n){t(e,n,r)}},lt=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,ot(t,!0))},ft=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw V("Promise can't be resolved itself");var n=nt(e);n?P((function(){var r={done:!1};try{f(n,e,st(ft,r,t),st(lt,r,t))}catch(e){lt(r,e,t)}})):(t.value=e,t.state=1,ot(t,!1))}catch(e){lt({done:!1},e,t)}}};if(et&&(Y=(G=function(t){_(this,Y),b(t),f(n,this);var e=U(this);try{t(st(ft,e),st(lt,e))}catch(t){lt(e,t)}}).prototype,(n=function(t){F(this,{type:B,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=h(Y,{then:function(t,e){var r=H(this),n=r.reactions,o=$(E(this,G));return o.ok=!m(t)||t,o.fail=m(e)&&e,o.domain=I?K.domain:void 0,r.parent=!0,n[n.length]=o,0!=r.state&&ot(r,!1),o.promise},catch:function(t){return this.then(void 0,t)}}),o=function(){var t=new n,e=U(t);this.promise=t,this.resolve=st(ft,e),this.reject=st(lt,e)},D.f=$=function(t){return t===G||t===i?new o(t):Z(t)},!c&&m(p)&&X!==Object.prototype)){u=X.then,tt||(d(X,"then",(function(t,e){var r=this;return new G((function(t,e){f(u,r,t,e)})).then(t,e)}),{unsafe:!0}),d(X,"catch",Y.catch,{unsafe:!0}));try{delete X.constructor}catch(t){}y&&y(X,Y)}a({global:!0,wrap:!0,forced:et},{Promise:G}),v(G,B,!1,!0),g(B),i=l(B),a({target:B,stat:!0,forced:et},{reject:function(t){var e=$(this);return f(e.reject,void 0,t),e.promise}}),a({target:B,stat:!0,forced:c||et},{resolve:function(t){return A(c&&this===i?G:this,t)}}),a({target:B,stat:!0,forced:rt},{all:function(t){var e=this,r=$(e),n=r.resolve,o=r.reject,i=T((function(){var r=b(e.resolve),i=[],u=0,a=1;j(t,(function(t){var c=u++,s=!1;a++,f(r,e,t).then((function(t){s||(s=!0,i[c]=t,--a||n(i))}),o)})),--a||n(i)}));return i.error&&o(i.value),r.promise},race:function(t){var e=this,r=$(e),n=r.reject,o=T((function(){var o=b(e.resolve);j(t,(function(t){f(o,e,t).then(r.resolve,n)}))}));return o.error&&n(o.value),r.promise}})},function(t,e,r){var n=r(7);t.exports=n.Promise},function(t,e,r){var n,o,i,u,a,c,s,l,f=r(7),p=r(64),d=r(50).f,h=r(168).set,y=r(169),v=r(211),g=r(212),b=r(128),m=f.MutationObserver||f.WebKitMutationObserver,O=f.document,_=f.process,w=f.Promise,j=d(f,"queueMicrotask"),x=j&&j.value;x||(n=function(){var t,e;for(b&&(t=_.domain)&&t.exit();o;){e=o.fn,o=o.next;try{e()}catch(t){throw o?u():i=void 0,t}}i=void 0,t&&t.enter()},y||b||g||!m||!O?!v&&w&&w.resolve?((s=w.resolve(void 0)).constructor=w,l=p(s.then,s),u=function(){l(n)}):b?u=function(){_.nextTick(n)}:(h=p(h,f),u=function(){h(n)}):(a=!0,c=O.createTextNode(""),new m(n).observe(c,{characterData:!0}),u=function(){c.data=a=!a})),t.exports=x||function(t){var e={fn:t,next:void 0};i&&(i.next=e),o||(o=e,u()),i=e}},function(t,e,r){var n=r(55),o=r(7);t.exports=/ipad|iphone|ipod/i.test(n)&&void 0!==o.Pebble},function(t,e,r){var n=r(55);t.exports=/web0s(?!.*chrome)/i.test(n)},function(t,e,r){var n=r(32),o=r(33),i=r(170);t.exports=function(t,e){if(n(t),o(e)&&e.constructor===t)return e;var r=i.f(t);return(0,r.resolve)(e),r.promise}},function(t,e,r){var n=r(7);t.exports=function(t,e){var r=n.console;r&&r.error&&(1==arguments.length?r.error(t):r.error(t,e))}},function(t,e){t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},function(t,e){t.exports="object"==typeof window},function(t,e,r){"use strict";var n=r(40),o=r(75),i=r(45);t.exports=function(t){for(var e=n(this),r=i(e),u=arguments.length,a=o(u>1?arguments[1]:void 0,r),c=u>2?arguments[2]:void 0,s=void 0===c?r:o(c,r);s>a;)e[a++]=t;return e}},function(t,e,r){"use strict";var n=r(16),o=r(7),i=r(15),u=r(59),a=r(160),c=r(219),s=r(18),l=o.RangeError,f=o.String,p=Math.floor,d=i(c),h=i("".slice),y=i(1..toFixed),v=function(t,e,r){return 0===e?r:e%2==1?v(t,e-1,r*t):v(t*t,e/2,r)},g=function(t,e,r){for(var n=-1,o=r;++n<6;)o+=e*t[n],t[n]=o%1e7,o=p(o/1e7)},b=function(t,e){for(var r=6,n=0;--r>=0;)n+=t[r],t[r]=p(n/e),n=n%e*1e7},m=function(t){for(var e=6,r="";--e>=0;)if(""!==r||0===e||0!==t[e]){var n=f(t[e]);r=""===r?n:r+d("0",7-n.length)+n}return r};n({target:"Number",proto:!0,forced:s((function(){return"0.000"!==y(8e-5,3)||"1"!==y(.9,0)||"1.25"!==y(1.255,2)||"1000000000000000128"!==y(0xde0b6b3a7640080,0)}))||!s((function(){y({})}))},{toFixed:function(t){var e,r,n,o,i=a(this),c=u(t),s=[0,0,0,0,0,0],p="",y="0";if(c<0||c>20)throw l("Incorrect fraction digits");if(i!=i)return"NaN";if(i<=-1e21||i>=1e21)return f(i);if(i<0&&(p="-",i=-i),i>1e-21)if(r=(e=function(t){for(var e=0,r=t;r>=4096;)e+=12,r/=4096;for(;r>=2;)e+=1,r/=2;return e}(i*v(2,69,1))-69)<0?i*v(2,-e,1):i/v(2,e,1),r*=4503599627370496,(e=52-e)>0){for(g(s,0,r),n=c;n>=7;)g(s,1e7,0),n-=7;for(g(s,v(10,n,1),0),n=e-1;n>=23;)b(s,1<<23),n-=23;b(s,1<<n),g(s,1,1),b(s,2),y=m(s)}else g(s,0,r),g(s,1<<-e,0),y=m(s)+d("0",c);return y=c>0?p+((o=y.length)<=c?"0."+d("0",c-o)+y:h(y,0,o-c)+"."+h(y,o-c)):p+y}})},function(t,e,r){"use strict";var n=r(7),o=r(59),i=r(39),u=r(44),a=n.RangeError;t.exports=function(t){var e=i(u(this)),r="",n=o(t);if(n<0||n==1/0)throw a("Wrong number of repetitions");for(;n>0;(n>>>=1)&&(e+=e))1&n&&(r+=e);return r}},function(t,e,r){var n=r(36),o=r(15),i=r(77),u=r(41),a=o(r(84).f),c=o([].push),s=function(t){return function(e){for(var r,o=u(e),s=i(o),l=s.length,f=0,p=[];l>f;)r=s[f++],n&&!a(o,r)||c(p,t?[r,o[r]]:o[r]);return p}};t.exports={entries:s(!0),values:s(!1)}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,r){"use strict";r.r(e),r.d(e,"observer",(function(){return T_})),r.d(e,"LogicFlow",(function(){return D_})),r.d(e,"h",(function(){return tt.g})),r.d(e,"LogicFlowUtil",(function(){return n})),r.d(e,"BaseNode",(function(){return hg})),r.d(e,"RectNode",(function(){return jg})),r.d(e,"CircleNode",(function(){return Mg})),r.d(e,"PolygonNode",(function(){return Yg})),r.d(e,"DiamondNode",(function(){return tb})),r.d(e,"EllipseNode",(function(){return db})),r.d(e,"TextNode",(function(){return xb})),r.d(e,"HtmlNode",(function(){return Rb})),r.d(e,"BaseEdge",(function(){return wm})),r.d(e,"LineEdge",(function(){return Rm})),r.d(e,"PolylineEdge",(function(){return Qm})),r.d(e,"BezierEdge",(function(){return lO})),r.d(e,"Arrow",(function(){return OO})),r.d(e,"BaseEdgeModel",(function(){return ga})),r.d(e,"BezierEdgeModel",(function(){return rd})),r.d(e,"LineEdgeModel",(function(){return Ca})),r.d(e,"PolylineEdgeModel",(function(){return Ja})),r.d(e,"BaseNodeModel",(function(){return Bd})),r.d(e,"CircleNodeModel",(function(){return oh})),r.d(e,"DiamondNodeModel",(function(){return Eh})),r.d(e,"EllipseNodeModel",(function(){return Xh})),r.d(e,"PolygonNodeModel",(function(){return sy})),r.d(e,"RectNodeModel",(function(){return Ey})),r.d(e,"TextNodeModel",(function(){return Uy})),r.d(e,"HtmlNodeModel",(function(){return tv})),r.d(e,"EditConfigModel",(function(){return mo})),r.d(e,"GraphModel",(function(){return jl})),r.d(e,"SnaplineModel",(function(){return uv})),r.d(e,"Keyboard",(function(){return g_})),r.d(e,"get",(function(){return Rp})),r.d(e,"defaults",(function(){return zp})),r.d(e,"ElementState",(function(){return lo})),r.d(e,"ModelType",(function(){return po})),r.d(e,"ElementType",(function(){return ho})),r.d(e,"EventType",(function(){return yo})),r.d(e,"formateAnchorConnectValidateData",(function(){return ua}));var n={};r.r(n),r.d(n,"createUuid",(function(){return gu})),r.d(n,"refreshGraphId",(function(){return bu})),r.d(n,"StepDrag",(function(){return cs})),r.d(n,"setupEdgeModel",(function(){return dc})),r.d(n,"isBboxOverLapping",(function(){return hc})),r.d(n,"filterRepeatPoints",(function(){return yc})),r.d(n,"getSimplePolyline",(function(){return vc})),r.d(n,"getExpandedBBox",(function(){return gc})),r.d(n,"pointDirection",(function(){return bc})),r.d(n,"getExpandedBBoxPoint",(function(){return mc})),r.d(n,"mergeBBox",(function(){return Oc})),r.d(n,"getBBoxOfPoints",(function(){return _c})),r.d(n,"getPointsFromBBox",(function(){return wc})),r.d(n,"isPointOutsideBBox",(function(){return jc})),r.d(n,"getBBoxXCrossPoints",(function(){return xc})),r.d(n,"getBBoxYCrossPoints",(function(){return Ec})),r.d(n,"getBBoxCrossPointsByPoint",(function(){return Sc})),r.d(n,"estimateDistance",(function(){return Pc})),r.d(n,"costByPoints",(function(){return Ac})),r.d(n,"heuristicCostEstimate",(function(){return kc})),r.d(n,"rebuildPath",(function(){return Dc})),r.d(n,"removeClosePointFromOpenList",(function(){return Tc})),r.d(n,"isSegmentsIntersected",(function(){return Mc})),r.d(n,"isSegmentCrossingBBox",(function(){return Nc})),r.d(n,"getNextNeighborPoints",(function(){return Cc})),r.d(n,"pathFinder",(function(){return Rc})),r.d(n,"getBoxByOriginNode",(function(){return Ic})),r.d(n,"pointFilter",(function(){return Lc})),r.d(n,"getPolylinePoints",(function(){return zc})),r.d(n,"getLongestEdge",(function(){return Bc})),r.d(n,"isSegmentsInNode",(function(){return Uc})),r.d(n,"isSegmentsCrossNode",(function(){return Fc})),r.d(n,"getCrossPointInRect",(function(){return Hc})),r.d(n,"segmentDirection",(function(){return Xc})),r.d(n,"points2PointsList",(function(){return Gc})),r.d(n,"getSimplePoints",(function(){return Yc})),r.d(n,"getBytesLength",(function(){return Wc})),r.d(n,"getTextWidth",(function(){return $c})),r.d(n,"getAppendAttributes",(function(){return Zc})),r.d(n,"getBezierControlPoints",(function(){return qc})),r.d(n,"getBezierPoints",(function(){return Jc})),r.d(n,"getEndTangent",(function(){return ts})),r.d(n,"getClosestPointOfPolyline",(function(){return es})),r.d(n,"pickEdgeConfig",(function(){return rs})),r.d(n,"twoPointDistance",(function(){return ns})),r.d(n,"createEdgeGenerator",(function(){return os})),r.d(n,"snapToGrid",(function(){return Ui})),r.d(n,"getGridOffset",(function(){return Fi})),r.d(n,"sampleCubic",(function(){return ec})),r.d(n,"getThetaOfVector",(function(){return nc})),r.d(n,"degrees",(function(){return oc})),r.d(n,"Vector",(function(){return Es})),r.d(n,"Point",(function(){return Ss})),r.d(n,"Matrix",(function(){return ol})),r.d(n,"RotateMatrix",(function(){return il})),r.d(n,"ScaleMatrix",(function(){return ul})),r.d(n,"TranslateMatrix",(function(){return al}));var o=r(1),i=r(10);if(!i.j)throw new Error("mobx-react-lite requires React with Hooks support");if(!o.H)throw new Error("mobx-react-lite requires mobx at least version 4 to be available");var u=r(43),a=Object(u.b)("observerBatching");function c(t){t()}var s=!1;function l(){return s}function f(t){return Object(o.t)(t)}var p,d=1e4,h=new Set;function y(){void 0===p&&(p=setTimeout(v,1e4))}function v(){p=void 0;var t=Date.now();h.forEach((function(e){var r=e.current;r&&t>=r.cleanAt&&(r.reaction.dispose(),e.current=null,h.delete(e))})),h.size>0&&y()}var g=!1,b=[];var m={};function O(t){return"observer"+t}function _(t,e,r){if(void 0===e&&(e="observed"),void 0===r&&(r=m),l())return t();var n,a=function(t){return function(){g?b.push(t):t()}}((r.useForceUpdate||u.d)()),c=i.d.useRef(null);if(!c.current){var s=new o.c(O(e),(function(){p.mounted?a():(s.dispose(),c.current=null)})),p=function(t){return{cleanAt:Date.now()+d,reaction:t}}(s);c.current=p,n=c,h.add(n),y()}var v=c.current.reaction;return i.d.useDebugValue(v,f),i.d.useEffect((function(){var t;return t=c,h.delete(t),c.current?c.current.mounted=!0:(c.current={reaction:new o.c(O(e),(function(){a()})),cleanAt:1/0},a()),function(){c.current.reaction.dispose(),c.current=null}}),[]),function(t){g=!0,b=[];try{var e=t();g=!1;var r=b.length>0?b:void 0;return i.d.useLayoutEffect((function(){r&&r.forEach((function(t){return t()}))}),[r]),e}finally{g=!1}}((function(){var e,r;if(v.track((function(){try{e=t()}catch(t){r=t}})),r)throw r;return e}))}var w=function(){return w=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},w.apply(this,arguments)};function j(t,e){if(l())return t;var r,n,o,u=w({forwardRef:!1},e),a=t.displayName||t.name,c=function(e,r){return _((function(){return t(e,r)}),a)};return c.displayName=a,r=u.forwardRef?Object(i.f)(Object(i.e)(c)):Object(i.f)(c),n=t,o=r,Object.keys(n).forEach((function(t){x[t]||Object.defineProperty(o,t,Object.getOwnPropertyDescriptor(n,t))})),r.displayName=a,r}var x={$$typeof:!0,render:!0,compare:!0,type:!0};function E(t){var e=t.children,r=t.render,n=e||r;return"function"!=typeof n?null:_(n)}function S(t,e,r,n,o){var i="children"===e?"render":"children",u="function"==typeof t[e],a="function"==typeof t[i];return u&&a?new Error("MobX Observer: Do not use children and render in the same time in`"+r):u||a?null:new Error("Invalid prop `"+o+"` of type `"+typeof t[e]+"` supplied to `"+r+"`, expected `function`.")}E.propTypes={children:S,render:S},E.displayName="Observer";var P;(P=i.g)||(P=c),Object(o.n)({reactionScheduler:P}),Object(u.a)()[a]=!0;var A=0;var k={};function D(t){return k[t]||(k[t]=function(t){if("function"==typeof Symbol)return Symbol(t);var e="__$mobx-react "+t+" ("+A+")";return A++,e}(t)),k[t]}function T(t,e){if(M(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;var r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(var o=0;o<r.length;o++)if(!Object.hasOwnProperty.call(e,r[o])||!M(t[r[o]],e[r[o]]))return!1;return!0}function M(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function N(t,e,r){Object.hasOwnProperty.call(t,e)?t[e]=r:Object.defineProperty(t,e,{enumerable:!1,configurable:!0,writable:!0,value:r})}var C=D("patchMixins"),R=D("patchedDefinition");function I(t,e){for(var r=this,n=arguments.length,o=new Array(n>2?n-2:0),i=2;i<n;i++)o[i-2]=arguments[i];e.locks++;try{var u;return null!=t&&(u=t.apply(this,o)),u}finally{e.locks--,0===e.locks&&e.methods.forEach((function(t){t.apply(r,o)}))}}function L(t,e){return function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];I.call.apply(I,[this,t,e].concat(n))}}function z(t,e,r){var n=function(t,e){var r=t[C]=t[C]||{},n=r[e]=r[e]||{};return n.locks=n.locks||0,n.methods=n.methods||[],n}(t,e);n.methods.indexOf(r)<0&&n.methods.push(r);var o=Object.getOwnPropertyDescriptor(t,e);if(!o||!o[R]){var i=t[e],u=B(t,e,o?o.enumerable:void 0,n,i);Object.defineProperty(t,e,u)}}function B(t,e,r,n,o){var i,u=L(o,n);return(i={})[R]=!0,i.get=function(){return u},i.set=function(o){if(this===t)u=L(o,n);else{var i=B(this,e,r,n,o);Object.defineProperty(this,e,i)}},i.configurable=!0,i.enumerable=r,i}var U=o.a||"$mobx",F=D("isMobXReactObserver"),H=D("isUnmounted"),X=D("skipRender"),G=D("isForcingUpdate");function Y(t){var e=t.prototype;if(t[F])V(e);else t[F]=!0;if(e.componentWillReact)throw new Error("The componentWillReact life-cycle event is no longer supported");if(t.__proto__!==i.b)if(e.shouldComponentUpdate){if(e.shouldComponentUpdate!==K)throw new Error("It is not allowed to use shouldComponentUpdate in observer based components.")}else e.shouldComponentUpdate=K;$(e,"props"),$(e,"state");var r=e.render;return e.render=function(){return W.call(this,r)},z(e,"componentWillUnmount",(function(){var t;if(!0!==l()&&(null===(t=this.render[U])||void 0===t||t.dispose(),this[H]=!0,!this.render[U]))V(this)})),t}function V(t){return t.displayName||t.name||t.constructor&&(t.constructor.displayName||t.constructor.name)||"<component>"}function W(t){var e=this;if(!0===l())return t.call(this);N(this,X,!1),N(this,G,!1);var r=V(this),n=t.bind(this),u=!1,a=new o.c(r+".render()",(function(){if(!u&&(u=!0,!0!==e[H])){var t=!0;try{N(e,G,!0),e[X]||i.a.prototype.forceUpdate.call(e),t=!1}finally{N(e,G,!1),t&&a.dispose()}}}));function c(){u=!1;var t=void 0,e=void 0;if(a.track((function(){try{e=Object(o.d)(!1,n)}catch(e){t=e}})),t)throw t;return e}return a.reactComponent=this,c[U]=a,this.render=c,c.call(this)}function K(t,e){return l(),this.state!==e||!T(this.props,t)}function $(t,e){var r=D("reactProp_"+e+"_valueHolder"),n=D("reactProp_"+e+"_atomHolder");function i(){return this[n]||N(this,n,Object(o.o)("reactive "+e)),this[n]}Object.defineProperty(t,e,{configurable:!0,enumerable:!0,get:function(){var t=!1;return o.f&&o.e&&(t=Object(o.f)(!0)),i.call(this).reportObserved(),o.f&&o.e&&Object(o.e)(t),this[r]},set:function(t){this[G]||T(this[r],t)?N(this,r,t):(N(this,r,t),N(this,X,!0),i.call(this).reportChanged(),N(this,X,!1))}})}var Z="function"==typeof Symbol&&Symbol.for,q=Z?Symbol.for("react.forward_ref"):"function"==typeof i.e&&Object(i.e)((function(t){return null})).$$typeof,J=Z?Symbol.for("react.memo"):"function"==typeof i.f&&Object(i.f)((function(t){return null})).$$typeof;function Q(t){if(t.isMobxInjector,J&&t.$$typeof===J)throw new Error("Mobx observer: You are trying to use 'observer' on a function component wrapped in either another observer or 'React.memo'. The observer already applies 'React.memo' for you.");if(q&&t.$$typeof===q){var e=t.render;if("function"!=typeof e)throw new Error("render property of ForwardRef was not a function");return Object(i.e)((function(){var t=arguments;return Object(i.c)(E,null,(function(){return e.apply(void 0,t)}))}))}return"function"!=typeof t||t.prototype&&t.prototype.render||t.isReactClass||Object.prototype.isPrototypeOf.call(i.a,t)?Y(t):j(t)}if(!i.a)throw new Error("mobx-react requires React to be available");if(!o.C)throw new Error("mobx-react requires mobx to be available");var tt=r(0);r(4),r(8),r(2),r(3),r(52),r(6),r(5),r(11),r(37),r(27),r(21),r(20),r(24),r(22),r(25),r(9),r(17),r(23),r(19),r(192),r(156),r(104),r(157),r(158),r(199),r(61);var et=function(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o};var rt=function(){this.__data__=[],this.size=0};var nt=function(t,e){return t===e||t!=t&&e!=e};var ot=function(t,e){for(var r=t.length;r--;)if(nt(t[r][0],e))return r;return-1},it=Array.prototype.splice;var ut=function(t){var e=this.__data__,r=ot(e,t);return!(r<0)&&(r==e.length-1?e.pop():it.call(e,r,1),--this.size,!0)};var at=function(t){var e=this.__data__,r=ot(e,t);return r<0?void 0:e[r][1]};var ct=function(t){return ot(this.__data__,t)>-1};var st=function(t,e){var r=this.__data__,n=ot(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function lt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}lt.prototype.clear=rt,lt.prototype.delete=ut,lt.prototype.get=at,lt.prototype.has=ct,lt.prototype.set=st;var ft=lt;var pt=function(){this.__data__=new ft,this.size=0};var dt=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r};var ht=function(t){return this.__data__.get(t)};var yt=function(t){return this.__data__.has(t)},vt=r(31),gt=vt.a.Symbol,bt=Object.prototype,mt=bt.hasOwnProperty,Ot=bt.toString,_t=gt?gt.toStringTag:void 0;var wt=function(t){var e=mt.call(t,_t),r=t[_t];try{t[_t]=void 0;var n=!0}catch(t){}var o=Ot.call(t);return n&&(e?t[_t]=r:delete t[_t]),o},jt=Object.prototype.toString;var xt=function(t){return jt.call(t)},Et=gt?gt.toStringTag:void 0;var St=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Et&&Et in Object(t)?wt(t):xt(t)};var Pt=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};var At,kt=function(t){if(!Pt(t))return!1;var e=St(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},Dt=vt.a["__core-js_shared__"],Tt=(At=/[^.]+$/.exec(Dt&&Dt.keys&&Dt.keys.IE_PROTO||""))?"Symbol(src)_1."+At:"";var Mt=function(t){return!!Tt&&Tt in t},Nt=Function.prototype.toString;var Ct=function(t){if(null!=t){try{return Nt.call(t)}catch(t){}try{return t+""}catch(t){}}return""},Rt=/^\[object .+?Constructor\]$/,It=Function.prototype,Lt=Object.prototype,zt=It.toString,Bt=Lt.hasOwnProperty,Ut=RegExp("^"+zt.call(Bt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Ft=function(t){return!(!Pt(t)||Mt(t))&&(kt(t)?Ut:Rt).test(Ct(t))};var Ht=function(t,e){return null==t?void 0:t[e]};var Xt=function(t,e){var r=Ht(t,e);return Ft(r)?r:void 0},Gt=Xt(vt.a,"Map"),Yt=Xt(Object,"create");var Vt=function(){this.__data__=Yt?Yt(null):{},this.size=0};var Wt=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Kt=Object.prototype.hasOwnProperty;var $t=function(t){var e=this.__data__;if(Yt){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return Kt.call(e,t)?e[t]:void 0},Zt=Object.prototype.hasOwnProperty;var qt=function(t){var e=this.__data__;return Yt?void 0!==e[t]:Zt.call(e,t)};var Jt=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Yt&&void 0===e?"__lodash_hash_undefined__":e,this};function Qt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Qt.prototype.clear=Vt,Qt.prototype.delete=Wt,Qt.prototype.get=$t,Qt.prototype.has=qt,Qt.prototype.set=Jt;var te=Qt;var ee=function(){this.size=0,this.__data__={hash:new te,map:new(Gt||ft),string:new te}};var re=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var ne=function(t,e){var r=t.__data__;return re(e)?r["string"==typeof e?"string":"hash"]:r.map};var oe=function(t){var e=ne(this,t).delete(t);return this.size-=e?1:0,e};var ie=function(t){return ne(this,t).get(t)};var ue=function(t){return ne(this,t).has(t)};var ae=function(t,e){var r=ne(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function ce(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ce.prototype.clear=ee,ce.prototype.delete=oe,ce.prototype.get=ie,ce.prototype.has=ue,ce.prototype.set=ae;var se=ce;var le=function(t,e){var r=this.__data__;if(r instanceof ft){var n=r.__data__;if(!Gt||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new se(n)}return r.set(t,e),this.size=r.size,this};function fe(t){var e=this.__data__=new ft(t);this.size=e.size}fe.prototype.clear=pt,fe.prototype.delete=dt,fe.prototype.get=ht,fe.prototype.has=yt,fe.prototype.set=le;var pe=fe;var de=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this};var he=function(t){return this.__data__.has(t)};function ye(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new se;++e<r;)this.add(t[e])}ye.prototype.add=ye.prototype.push=de,ye.prototype.has=he;var ve=ye;var ge=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1};var be=function(t,e){return t.has(e)};var me=function(t,e,r,n,o,i){var u=1&r,a=t.length,c=e.length;if(a!=c&&!(u&&c>a))return!1;var s=i.get(t),l=i.get(e);if(s&&l)return s==e&&l==t;var f=-1,p=!0,d=2&r?new ve:void 0;for(i.set(t,e),i.set(e,t);++f<a;){var h=t[f],y=e[f];if(n)var v=u?n(y,h,f,e,t,i):n(h,y,f,t,e,i);if(void 0!==v){if(v)continue;p=!1;break}if(d){if(!ge(e,(function(t,e){if(!be(d,e)&&(h===t||o(h,t,r,n,i)))return d.push(e)}))){p=!1;break}}else if(h!==y&&!o(h,y,r,n,i)){p=!1;break}}return i.delete(t),i.delete(e),p},Oe=vt.a.Uint8Array;var _e=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r};var we=function(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r},je=gt?gt.prototype:void 0,xe=je?je.valueOf:void 0;var Ee=function(t,e,r,n,o,i,u){switch(r){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!i(new Oe(t),new Oe(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return nt(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var a=_e;case"[object Set]":var c=1&n;if(a||(a=we),t.size!=e.size&&!c)return!1;var s=u.get(t);if(s)return s==e;n|=2,u.set(t,e);var l=me(a(t),a(e),n,o,i,u);return u.delete(t),l;case"[object Symbol]":if(xe)return xe.call(t)==xe.call(e)}return!1};var Se=function(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t},Pe=Array.isArray;var Ae=function(t,e,r){var n=e(t);return Pe(t)?n:Se(n,r(t))};var ke=function(t,e){for(var r=-1,n=null==t?0:t.length,o=0,i=[];++r<n;){var u=t[r];e(u,r,t)&&(i[o++]=u)}return i};var De=function(){return[]},Te=Object.prototype.propertyIsEnumerable,Me=Object.getOwnPropertySymbols,Ne=Me?function(t){return null==t?[]:(t=Object(t),ke(Me(t),(function(e){return Te.call(t,e)})))}:De;var Ce=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n};var Re=function(t){return null!=t&&"object"==typeof t};var Ie=function(t){return Re(t)&&"[object Arguments]"==St(t)},Le=Object.prototype,ze=Le.hasOwnProperty,Be=Le.propertyIsEnumerable,Ue=Ie(function(){return arguments}())?Ie:function(t){return Re(t)&&ze.call(t,"callee")&&!Be.call(t,"callee")},Fe=Ue,He=r(48),Xe=/^(?:0|[1-9]\d*)$/;var Ge=function(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&Xe.test(t))&&t>-1&&t%1==0&&t<e};var Ye=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991},Ve={};Ve["[object Float32Array]"]=Ve["[object Float64Array]"]=Ve["[object Int8Array]"]=Ve["[object Int16Array]"]=Ve["[object Int32Array]"]=Ve["[object Uint8Array]"]=Ve["[object Uint8ClampedArray]"]=Ve["[object Uint16Array]"]=Ve["[object Uint32Array]"]=!0,Ve["[object Arguments]"]=Ve["[object Array]"]=Ve["[object ArrayBuffer]"]=Ve["[object Boolean]"]=Ve["[object DataView]"]=Ve["[object Date]"]=Ve["[object Error]"]=Ve["[object Function]"]=Ve["[object Map]"]=Ve["[object Number]"]=Ve["[object Object]"]=Ve["[object RegExp]"]=Ve["[object Set]"]=Ve["[object String]"]=Ve["[object WeakMap]"]=!1;var We=function(t){return Re(t)&&Ye(t.length)&&!!Ve[St(t)]};var Ke=function(t){return function(e){return t(e)}},$e=r(49),Ze=$e.a&&$e.a.isTypedArray,qe=Ze?Ke(Ze):We,Je=Object.prototype.hasOwnProperty;var Qe=function(t,e){var r=Pe(t),n=!r&&Fe(t),o=!r&&!n&&Object(He.a)(t),i=!r&&!n&&!o&&qe(t),u=r||n||o||i,a=u?Ce(t.length,String):[],c=a.length;for(var s in t)!e&&!Je.call(t,s)||u&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||Ge(s,c))||a.push(s);return a},tr=Object.prototype;var er=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||tr)};var rr=function(t,e){return function(r){return t(e(r))}},nr=rr(Object.keys,Object),or=Object.prototype.hasOwnProperty;var ir=function(t){if(!er(t))return nr(t);var e=[];for(var r in Object(t))or.call(t,r)&&"constructor"!=r&&e.push(r);return e};var ur=function(t){return null!=t&&Ye(t.length)&&!kt(t)};var ar=function(t){return ur(t)?Qe(t):ir(t)};var cr=function(t){return Ae(t,ar,Ne)},sr=Object.prototype.hasOwnProperty;var lr=function(t,e,r,n,o,i){var u=1&r,a=cr(t),c=a.length;if(c!=cr(e).length&&!u)return!1;for(var s=c;s--;){var l=a[s];if(!(u?l in e:sr.call(e,l)))return!1}var f=i.get(t),p=i.get(e);if(f&&p)return f==e&&p==t;var d=!0;i.set(t,e),i.set(e,t);for(var h=u;++s<c;){var y=t[l=a[s]],v=e[l];if(n)var g=u?n(v,y,l,e,t,i):n(y,v,l,t,e,i);if(!(void 0===g?y===v||o(y,v,r,n,i):g)){d=!1;break}h||(h="constructor"==l)}if(d&&!h){var b=t.constructor,m=e.constructor;b==m||!("constructor"in t)||!("constructor"in e)||"function"==typeof b&&b instanceof b&&"function"==typeof m&&m instanceof m||(d=!1)}return i.delete(t),i.delete(e),d},fr=Xt(vt.a,"DataView"),pr=Xt(vt.a,"Promise"),dr=Xt(vt.a,"Set"),hr=Xt(vt.a,"WeakMap"),yr="[object Map]",vr="[object Promise]",gr="[object Set]",br="[object WeakMap]",mr="[object DataView]",Or=Ct(fr),_r=Ct(Gt),wr=Ct(pr),jr=Ct(dr),xr=Ct(hr),Er=St;(fr&&Er(new fr(new ArrayBuffer(1)))!=mr||Gt&&Er(new Gt)!=yr||pr&&Er(pr.resolve())!=vr||dr&&Er(new dr)!=gr||hr&&Er(new hr)!=br)&&(Er=function(t){var e=St(t),r="[object Object]"==e?t.constructor:void 0,n=r?Ct(r):"";if(n)switch(n){case Or:return mr;case _r:return yr;case wr:return vr;case jr:return gr;case xr:return br}return e});var Sr=Er,Pr="[object Arguments]",Ar="[object Array]",kr="[object Object]",Dr=Object.prototype.hasOwnProperty;var Tr=function(t,e,r,n,o,i){var u=Pe(t),a=Pe(e),c=u?Ar:Sr(t),s=a?Ar:Sr(e),l=(c=c==Pr?kr:c)==kr,f=(s=s==Pr?kr:s)==kr,p=c==s;if(p&&Object(He.a)(t)){if(!Object(He.a)(e))return!1;u=!0,l=!1}if(p&&!l)return i||(i=new pe),u||qe(t)?me(t,e,r,n,o,i):Ee(t,e,c,r,n,o,i);if(!(1&r)){var d=l&&Dr.call(t,"__wrapped__"),h=f&&Dr.call(e,"__wrapped__");if(d||h){var y=d?t.value():t,v=h?e.value():e;return i||(i=new pe),o(y,v,r,n,i)}}return!!p&&(i||(i=new pe),lr(t,e,r,n,o,i))};var Mr=function t(e,r,n,o,i){return e===r||(null==e||null==r||!Re(e)&&!Re(r)?e!=e&&r!=r:Tr(e,r,n,o,t,i))};var Nr=function(t,e,r,n){var o=r.length,i=o,u=!n;if(null==t)return!i;for(t=Object(t);o--;){var a=r[o];if(u&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++o<i;){var c=(a=r[o])[0],s=t[c],l=a[1];if(u&&a[2]){if(void 0===s&&!(c in t))return!1}else{var f=new pe;if(n)var p=n(s,l,c,t,e,f);if(!(void 0===p?Mr(l,s,3,n,f):p))return!1}}return!0};var Cr=function(t){return t==t&&!Pt(t)};var Rr=function(t){for(var e=ar(t),r=e.length;r--;){var n=e[r],o=t[n];e[r]=[n,o,Cr(o)]}return e};var Ir=function(t,e){return function(r){return null!=r&&(r[t]===e&&(void 0!==e||t in Object(r)))}};var Lr=function(t){var e=Rr(t);return 1==e.length&&e[0][2]?Ir(e[0][0],e[0][1]):function(r){return r===t||Nr(r,t,e)}};var zr=function(t){return"symbol"==typeof t||Re(t)&&"[object Symbol]"==St(t)},Br=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ur=/^\w*$/;var Fr=function(t,e){if(Pe(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!zr(t))||(Ur.test(t)||!Br.test(t)||null!=e&&t in Object(e))};function Hr(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var u=t.apply(this,n);return r.cache=i.set(o,u)||i,u};return r.cache=new(Hr.Cache||se),r}Hr.Cache=se;var Xr=Hr;var Gr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yr=/\\(\\)?/g,Vr=function(t){var e=Xr(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Gr,(function(t,r,n,o){e.push(n?o.replace(Yr,"$1"):r||t)})),e})),Wr=gt?gt.prototype:void 0,Kr=Wr?Wr.toString:void 0;var $r=function t(e){if("string"==typeof e)return e;if(Pe(e))return et(e,t)+"";if(zr(e))return Kr?Kr.call(e):"";var r=e+"";return"0"==r&&1/e==-Infinity?"-0":r};var Zr=function(t){return null==t?"":$r(t)};var qr=function(t,e){return Pe(t)?t:Fr(t,e)?[t]:Vr(Zr(t))};var Jr=function(t){if("string"==typeof t||zr(t))return t;var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e};var Qr=function(t,e){for(var r=0,n=(e=qr(e,t)).length;null!=t&&r<n;)t=t[Jr(e[r++])];return r&&r==n?t:void 0};var tn=function(t,e,r){var n=null==t?void 0:Qr(t,e);return void 0===n?r:n};var en=function(t,e){return null!=t&&e in Object(t)};var rn=function(t,e,r){for(var n=-1,o=(e=qr(e,t)).length,i=!1;++n<o;){var u=Jr(e[n]);if(!(i=null!=t&&r(t,u)))break;t=t[u]}return i||++n!=o?i:!!(o=null==t?0:t.length)&&Ye(o)&&Ge(u,o)&&(Pe(t)||Fe(t))};var nn=function(t,e){return null!=t&&rn(t,e,en)};var on=function(t,e){return Fr(t)&&Cr(e)?Ir(Jr(t),e):function(r){var n=tn(r,t);return void 0===n&&n===e?nn(r,t):Mr(e,n,3)}};var un=function(t){return t};var an=function(t){return function(e){return null==e?void 0:e[t]}};var cn=function(t){return function(e){return Qr(e,t)}};var sn=function(t){return Fr(t)?an(Jr(t)):cn(t)};var ln=function(t){return"function"==typeof t?t:null==t?un:"object"==typeof t?Pe(t)?on(t[0],t[1]):Lr(t):sn(t)};var fn=function(t){return function(e,r,n){for(var o=-1,i=Object(e),u=n(e),a=u.length;a--;){var c=u[t?a:++o];if(!1===r(i[c],c,i))break}return e}}();var pn=function(t,e){return function(r,n){if(null==r)return r;if(!ur(r))return t(r,n);for(var o=r.length,i=e?o:-1,u=Object(r);(e?i--:++i<o)&&!1!==n(u[i],i,u););return r}}((function(t,e){return t&&fn(t,e,ar)}));var dn=function(t,e){var r=-1,n=ur(t)?Array(t.length):[];return pn(t,(function(t,o,i){n[++r]=e(t,o,i)})),n};var hn=function(t,e){return(Pe(t)?et:dn)(t,ln(e,3))};Object(o.n)({isolateGlobalState:!0});var yn=function(){try{var t=Xt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();var vn=function(t,e,r){"__proto__"==e&&yn?yn(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r},gn=Object.prototype.hasOwnProperty;var bn=function(t,e,r){var n=t[e];gn.call(t,e)&&nt(n,r)&&(void 0!==r||e in t)||vn(t,e,r)};var mn=function(t,e,r,n){var o=!r;r||(r={});for(var i=-1,u=e.length;++i<u;){var a=e[i],c=n?n(r[a],t[a],a,r,t):void 0;void 0===c&&(c=t[a]),o?vn(r,a,c):bn(r,a,c)}return r};var On=function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)},_n=Math.max;var wn=function(t,e,r){return e=_n(void 0===e?t.length-1:e,0),function(){for(var n=arguments,o=-1,i=_n(n.length-e,0),u=Array(i);++o<i;)u[o]=n[e+o];o=-1;for(var a=Array(e+1);++o<e;)a[o]=n[o];return a[e]=r(u),On(t,this,a)}};var jn=function(t){return function(){return t}},xn=yn?function(t,e){return yn(t,"toString",{configurable:!0,enumerable:!1,value:jn(e),writable:!0})}:un,En=Date.now;var Sn=function(t){var e=0,r=0;return function(){var n=En(),o=16-(n-r);if(r=n,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}},Pn=Sn(xn);var An=function(t,e){return Pn(wn(t,e,un),t+"")};var kn=function(t,e,r){if(!Pt(r))return!1;var n=typeof e;return!!("number"==n?ur(r)&&Ge(e,r.length):"string"==n&&e in r)&&nt(r[e],t)};var Dn=function(t){return An((function(e,r){var n=-1,o=r.length,i=o>1?r[o-1]:void 0,u=o>2?r[2]:void 0;for(i=t.length>3&&"function"==typeof i?(o--,i):void 0,u&&kn(r[0],r[1],u)&&(i=o<3?void 0:i,o=1),e=Object(e);++n<o;){var a=r[n];a&&t(e,a,n,i)}return e}))},Tn=Object.prototype.hasOwnProperty,Mn=Dn((function(t,e){if(er(e)||ur(e))mn(e,ar(e),t);else for(var r in e)Tn.call(e,r)&&bn(t,r,e[r])}));var Nn=function(t,e,r,n){if(!Pt(t))return t;for(var o=-1,i=(e=qr(e,t)).length,u=i-1,a=t;null!=a&&++o<i;){var c=Jr(e[o]),s=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;if(o!=u){var l=a[c];void 0===(s=n?n(l,c,a):void 0)&&(s=Pt(l)?l:Ge(e[o+1])?[]:{})}bn(a,c,s),a=a[c]}return t};var Cn=function(t,e,r){for(var n=-1,o=e.length,i={};++n<o;){var u=e[n],a=Qr(t,u);r(a,u)&&Nn(i,qr(u,t),a)}return i};var Rn=function(t,e){return Cn(t,e,(function(e,r){return nn(t,r)}))},In=gt?gt.isConcatSpreadable:void 0;var Ln=function(t){return Pe(t)||Fe(t)||!!(In&&t&&t[In])};var zn=function t(e,r,n,o,i){var u=-1,a=e.length;for(n||(n=Ln),i||(i=[]);++u<a;){var c=e[u];r>0&&n(c)?r>1?t(c,r-1,n,o,i):Se(i,c):o||(i[i.length]=c)}return i};var Bn=function(t){return(null==t?0:t.length)?zn(t,1):[]};var Un,Fn,Hn,Xn,Gn,Yn,Vn,Wn,Kn,$n,Zn,qn,Jn,Qn,to,eo,ro,no,oo,io=function(t){return Pn(wn(t,void 0,Bn),t+"")}((function(t,e){return null==t?{}:Rn(t,e)}));function uo(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function ao(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function co(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function so(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var lo,fo,po,ho,yo,vo,go={stopZoomGraph:!1,stopScrollGraph:!1,stopMoveGraph:!1,adjustEdge:!1,adjustEdgeStartAndEnd:!1,adjustNodePosition:!1,hideAnchors:!0,allowRotation:!1,nodeSelectedOutline:!0,nodeTextEdit:!1,edgeTextEdit:!1,nodeTextDraggable:!1,edgeTextDraggable:!1},bo=["isSilentMode","stopZoomGraph","stopScrollGraph","stopMoveGraph","adjustEdge","adjustEdgeMiddle","adjustEdgeStartAndEnd","adjustNodePosition","hideAnchors","allowRotation","hoverOutline","nodeSelectedOutline","edgeSelectedOutline","nodeTextEdit","edgeTextEdit","nodeTextDraggable","edgeTextDraggable","multipleSelectKey","autoExpand"],mo=(Fn=so((Un=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),uo(this,"isSilentMode",Fn,this),uo(this,"stopZoomGraph",Hn,this),uo(this,"stopScrollGraph",Xn,this),uo(this,"stopMoveGraph",Gn,this),uo(this,"adjustEdge",Yn,this),uo(this,"adjustEdgeMiddle",Vn,this),uo(this,"adjustEdgeStartAndEnd",Wn,this),uo(this,"adjustNodePosition",Kn,this),uo(this,"hideAnchors",$n,this),uo(this,"allowRotation",Zn,this),uo(this,"hoverOutline",qn,this),uo(this,"nodeSelectedOutline",Jn,this),uo(this,"edgeSelectedOutline",Qn,this),uo(this,"nodeTextEdit",to,this),uo(this,"edgeTextEdit",eo,this),uo(this,"nodeTextDraggable",ro,this),uo(this,"edgeTextDraggable",no,this),uo(this,"autoExpand",oo,this),co(this,"multipleSelectKey",""),co(this,"defaultConfig",{}),Mn(this,this.getConfigDetail(e))}var e,r,n;return e=t,(r=[{key:"updateEditConfig",value:function(t){var e=this.getConfigDetail(t);Mn(this,e)}},{key:"getConfigDetail",value:function(t){var e=t.isSilentMode,r=t.textEdit,n={};if(!1===e&&Mn(n,this.defaultConfig),!0===e&&e!==this.isSilentMode){var o=io(go,bo);this.defaultConfig={stopZoomGraph:this.stopZoomGraph,stopScrollGraph:this.stopScrollGraph,stopMoveGraph:this.stopMoveGraph,adjustEdge:this.adjustEdge,adjustEdgeMiddle:this.adjustEdgeMiddle,adjustEdgeStartAndEnd:this.adjustEdgeStartAndEnd,adjustNodePosition:this.adjustNodePosition,hideAnchors:this.hideAnchors,allowRotation:this.allowRotation,hoverOutline:this.hoverOutline,nodeSelectedOutline:this.nodeSelectedOutline,edgeSelectedOutline:this.edgeSelectedOutline,nodeTextEdit:this.nodeTextEdit,edgeTextEdit:this.edgeTextEdit,nodeTextDraggable:this.nodeTextDraggable,edgeTextDraggable:this.edgeTextDraggable,autoExpand:this.autoExpand},Mn(n,o)}!1===r&&Mn(n,{nodeTextEdit:!1,edgeTextEdit:!1});var i=io(t,bo);return Mn(n,i)}},{key:"getConfig",value:function(){return io(this,bo)}}])&&ao(e.prototype,r),n&&ao(e,n),t}()).prototype,"isSilentMode",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Hn=so(Un.prototype,"stopZoomGraph",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Xn=so(Un.prototype,"stopScrollGraph",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Gn=so(Un.prototype,"stopMoveGraph",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Yn=so(Un.prototype,"adjustEdge",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Vn=so(Un.prototype,"adjustEdgeMiddle",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Wn=so(Un.prototype,"adjustEdgeStartAndEnd",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Kn=so(Un.prototype,"adjustNodePosition",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),$n=so(Un.prototype,"hideAnchors",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Zn=so(Un.prototype,"allowRotation",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),qn=so(Un.prototype,"hoverOutline",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Jn=so(Un.prototype,"nodeSelectedOutline",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Qn=so(Un.prototype,"edgeSelectedOutline",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),to=so(Un.prototype,"nodeTextEdit",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),eo=so(Un.prototype,"edgeTextEdit",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),ro=so(Un.prototype,"nodeTextDraggable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),no=so(Un.prototype,"edgeTextDraggable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),oo=so(Un.prototype,"autoExpand",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),so(Un.prototype,"updateEditConfig",[o.k],Object.getOwnPropertyDescriptor(Un.prototype,"updateEditConfig"),Un.prototype),Un);r(65),r(66);!function(t){t[t.DEFAULT=1]="DEFAULT",t[t.TEXT_EDIT=2]="TEXT_EDIT",t[t.SHOW_MENU=3]="SHOW_MENU",t[t.ALLOW_CONNECT=4]="ALLOW_CONNECT",t[t.NOT_ALLOW_CONNECT=5]="NOT_ALLOW_CONNECT"}(lo||(lo={})),function(t){t.KEY="logic-flow",t.NODE_NAME="lf-node",t.EDGE_NAME="lf-edge"}(fo||(fo={})),function(t){t.NODE="node",t.CIRCLE_NODE="circle-node",t.POLYGON_NODE="polygon-node",t.RECT_NODE="rect-node",t.TEXT_NODE="text-node",t.ELLIPSE_NODE="ellipse-node",t.DIAMOND_NODE="diamond-node",t.HTML_NODE="html-node",t.EDGE="edge",t.LINE_EDGE="line-edge",t.POLYLINE_EDGE="polyline-edge",t.BEZIER_EDGE="bezier-edge",t.GRAPH="graph"}(po||(po={})),function(t){t.NODE="node",t.EDGE="edge",t.GRAPH="graph"}(ho||(ho={})),function(t){t.ELEMENT_CLICK="element:click",t.NODE_CLICK="node:click",t.NODE_DBCLICK="node:dbclick",t.NODE_DELETE="node:delete",t.NODE_ADD="node:add",t.NODE_GROUP_COPY="node:group-copy-add",t.NODE_DND_ADD="node:dnd-add",t.NODE_DND_DRAG="node:dnd-drag",t.NODE_MOUSEDOWN="node:mousedown",t.NODE_DRAGSTART="node:dragstart",t.NODE_DRAG="node:drag",t.NODE_DROP="node:drop",t.NODE_MOUSEUP="node:mouseup",t.NODE_MOUSEMOVE="node:mousemove",t.NODE_MOUSEENTER="node:mouseenter",t.NODE_MOUSELEAVE="node:mouseleave",t.NODE_CONTEXTMENU="node:contextmenu",t.NODE_ROTATE="node:rotate",t.EDGE_DELETE="edge:delete",t.EDGE_ADD="edge:add",t.EDGE_CLICK="edge:click",t.EDGE_DBCLICK="edge:dbclick",t.EDGE_MOUSEENTER="edge:mouseenter",t.EDGE_MOUSELEAVE="edge:mouseleave",t.EDGE_CONTEXTMENU="edge:contextmenu",t.EDGE_ADJUST="edge:adjust",t.EDGE_EXCHANGE_NODE="edge:exchange-node",t.ANCHOR_DRAGSTART="anchor:dragstart",t.ANCHOR_DRAG="anchor:drag",t.ANCHOR_DROP="anchor:drop",t.ANCHOR_DRAGEND="anchor:dragend",t.ADJUST_POINT_MOUSEDOWN="adjustPoint:mousedown",t.ADJUST_POINT_MOUSEUP="adjustPoint:mouseup",t.ADJUST_POINT_MOUSEMOVE="adjustPoint:mousemove",t.ADJUST_POINT_DRAGSTART="adjustPoint:dragstart",t.ADJUST_POINT_DRAG="adjustPoint:drag",t.ADJUST_POINT_DROP="adjustPoint:drop",t.ADJUST_POINT_DRAGEND="adjustPoint:dragend",t.BLANK_MOUSEDOWN="blank:mousedown",t.BLANK_DRAGSTART="blank:dragstart",t.BLANK_DRAG="blank:drag",t.BLANK_DROP="blank:drop",t.BLANK_MOUSEMOVE="blank:mousemove",t.BLANK_MOUSEUP="blank:mouseup",t.BLANK_CLICK="blank:click",t.BLANK_CONTEXTMENU="blank:contextmenu",t.SELECTION_MOUSEDOWN="selection:mousedown",t.SELECTION_DRAGSTART="selection:dragstart",t.SELECTION_DRAG="selection:drag",t.SELECTION_DROP="selection:drop",t.SELECTION_MOUSEMOVE="selection:mousemove",t.SELECTION_MOUSEUP="selection:mouseup",t.SELECTION_CONTEXTMENU="selection:contextmenu",t.CONNECTION_NOT_ALLOWED="connection:not-allowed",t.HISTORY_CHANGE="history:change",t.TEXT_UPDATE="text:update",t.GRAPH_TRANSFORM="graph:transform",t.GRAPH_RENDERED="graph:rendered"}(yo||(yo={})),function(t){t.HORIZONTAL="horizontal",t.VERTICAL="vertical"}(vo||(vo={}));var Oo,_o,wo,jo,xo,Eo,So,Po,Ao;function ko(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Do(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Do(t,e)}(t,e)||function(){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 Do(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function To(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function Mo(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function No(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Co(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}!function(t){t[t.DEFAULT=0]="DEFAULT",t[t.INCREASE=1]="INCREASE"}(Oo||(Oo={}));var Ro={false:[-1/0,-1/0,1/0,1/0],true:[0,0,0,0],vertical:[-1/0,0,1/0,0],horizontal:[0,-1/0,0,1/0]},Io=(_o=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),No(this,"MINI_SCALE_SIZE",.2),No(this,"MAX_SCALE_SIZE",16),To(this,"SCALE_X",wo,this),To(this,"SKEW_Y",jo,this),To(this,"SKEW_X",xo,this),To(this,"SCALE_Y",Eo,this),To(this,"TRANSLATE_X",So,this),To(this,"TRANSLATE_Y",Po,this),To(this,"ZOOM_SIZE",Ao,this),No(this,"eventCenter",void 0),No(this,"translateLimitMinX",void 0),No(this,"translateLimitMinY",void 0),No(this,"translateLimitMaxX",void 0),No(this,"translateLimitMaxY",void 0),this.eventCenter=e;var n=r.stopMoveGraph,o=void 0!==n&&n;this.updateTranslateLimits(o)}var e,r,n;return e=t,r=[{key:"setZoomMiniSize",value:function(t){this.MINI_SCALE_SIZE=t}},{key:"setZoomMaxSize",value:function(t){this.MAX_SCALE_SIZE=t}},{key:"HtmlPointToCanvasPoint",value:function(t){var e=ko(t,2),r=e[0],n=e[1];return[(r-this.TRANSLATE_X)/this.SCALE_X,(n-this.TRANSLATE_Y)/this.SCALE_Y]}},{key:"CanvasPointToHtmlPoint",value:function(t){var e=ko(t,2),r=e[0],n=e[1];return[r*this.SCALE_X+this.TRANSLATE_X,n*this.SCALE_Y+this.TRANSLATE_Y]}},{key:"moveCanvasPointByHtml",value:function(t,e,r){var n=ko(t,2),o=n[0],i=n[1];return[o+e/this.SCALE_X,i+r/this.SCALE_Y]}},{key:"fixDeltaXY",value:function(t,e){return[t/this.SCALE_X,e/this.SCALE_Y]}},{key:"getTransformStyle",value:function(){var t=[this.SCALE_X,this.SKEW_Y,this.SKEW_X,this.SCALE_Y,this.TRANSLATE_X,this.TRANSLATE_Y].join(",");return{transform:"matrix(".concat(t,")")}}},{key:"zoom",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=arguments.length>1?arguments[1]:void 0,r=this.SCALE_X,n=this.SCALE_Y;return!0===t?(r+=this.ZOOM_SIZE,n+=this.ZOOM_SIZE):!1===t?(r-=this.ZOOM_SIZE,n-=this.ZOOM_SIZE):"number"==typeof t&&(r=t,n=t),r<this.MINI_SCALE_SIZE||r>this.MAX_SCALE_SIZE||(e&&(this.TRANSLATE_X-=(r-this.SCALE_X)*e[0],this.TRANSLATE_Y-=(n-this.SCALE_Y)*e[1]),this.SCALE_X=r,this.SCALE_Y=n,this.emitGraphTransform("zoom")),"".concat(100*this.SCALE_X,"%")}},{key:"emitGraphTransform",value:function(t){this.eventCenter.emit(yo.GRAPH_TRANSFORM,{type:t,transform:{SCALE_X:this.SCALE_X,SKEW_Y:this.SKEW_Y,SKEW_X:this.SKEW_X,SCALE_Y:this.SCALE_Y,TRANSLATE_X:this.TRANSLATE_X,TRANSLATE_Y:this.TRANSLATE_Y}})}},{key:"resetZoom",value:function(){this.SCALE_X=1,this.SCALE_Y=1,this.emitGraphTransform("resetZoom")}},{key:"translate",value:function(t,e){this.TRANSLATE_X+t<=this.translateLimitMaxX&&this.TRANSLATE_X+t>=this.translateLimitMinX&&(this.TRANSLATE_X+=t),this.TRANSLATE_Y+e<=this.translateLimitMaxY&&this.TRANSLATE_Y+e>=this.translateLimitMinY&&(this.TRANSLATE_Y+=e),this.emitGraphTransform("translate")}},{key:"focusOn",value:function(t,e,r,n){var o=ko(this.CanvasPointToHtmlPoint([t,e]),2),i=r/2-o[0],u=n/2-o[1];this.TRANSLATE_X+=i,this.TRANSLATE_Y+=u,this.emitGraphTransform("focusOn")}},{key:"updateTranslateLimits",value:function(t){var e=ko(Array.isArray(t)&&4===t.length?t:Ro[t.toString()],4);this.translateLimitMinX=e[0],this.translateLimitMinY=e[1],this.translateLimitMaxX=e[2],this.translateLimitMaxY=e[3]}}],r&&Mo(e.prototype,r),n&&Mo(e,n),t}(),wo=Co(_o.prototype,"SCALE_X",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),jo=Co(_o.prototype,"SKEW_Y",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),xo=Co(_o.prototype,"SKEW_X",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Eo=Co(_o.prototype,"SCALE_Y",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),So=Co(_o.prototype,"TRANSLATE_X",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Po=Co(_o.prototype,"TRANSLATE_Y",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Ao=Co(_o.prototype,"ZOOM_SIZE",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return.04}}),Co(_o.prototype,"zoom",[o.k],Object.getOwnPropertyDescriptor(_o.prototype,"zoom"),_o.prototype),Co(_o.prototype,"resetZoom",[o.k],Object.getOwnPropertyDescriptor(_o.prototype,"resetZoom"),_o.prototype),Co(_o.prototype,"translate",[o.k],Object.getOwnPropertyDescriptor(_o.prototype,"translate"),_o.prototype),Co(_o.prototype,"focusOn",[o.k],Object.getOwnPropertyDescriptor(_o.prototype,"focusOn"),_o.prototype),_o);var Lo=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t};var zo=function(t,e){return t&&mn(e,ar(e),t)};var Bo=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e},Uo=Object.prototype.hasOwnProperty;var Fo=function(t){if(!Pt(t))return Bo(t);var e=er(t),r=[];for(var n in t)("constructor"!=n||!e&&Uo.call(t,n))&&r.push(n);return r};var Ho=function(t){return ur(t)?Qe(t,!0):Fo(t)};var Xo=function(t,e){return t&&mn(e,Ho(e),t)},Go=r(107);var Yo=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e};var Vo=function(t,e){return mn(t,Ne(t),e)},Wo=rr(Object.getPrototypeOf,Object),Ko=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)Se(e,Ne(t)),t=Wo(t);return e}:De;var $o=function(t,e){return mn(t,Ko(t),e)};var Zo=function(t){return Ae(t,Ho,Ko)},qo=Object.prototype.hasOwnProperty;var Jo=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&qo.call(t,"index")&&(r.index=t.index,r.input=t.input),r};var Qo=function(t){var e=new t.constructor(t.byteLength);return new Oe(e).set(new Oe(t)),e};var ti=function(t,e){var r=e?Qo(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)},ei=/\w*$/;var ri=function(t){var e=new t.constructor(t.source,ei.exec(t));return e.lastIndex=t.lastIndex,e},ni=gt?gt.prototype:void 0,oi=ni?ni.valueOf:void 0;var ii=function(t){return oi?Object(oi.call(t)):{}};var ui=function(t,e){var r=e?Qo(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)};var ai=function(t,e,r){var n=t.constructor;switch(e){case"[object ArrayBuffer]":return Qo(t);case"[object Boolean]":case"[object Date]":return new n(+t);case"[object DataView]":return ti(t,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return ui(t,r);case"[object Map]":case"[object Set]":return new n;case"[object Number]":case"[object String]":return new n(t);case"[object RegExp]":return ri(t);case"[object Symbol]":return ii(t)}},ci=Object.create,si=function(){function t(){}return function(e){if(!Pt(e))return{};if(ci)return ci(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();var li=function(t){return"function"!=typeof t.constructor||er(t)?{}:si(Wo(t))};var fi=function(t){return Re(t)&&"[object Map]"==Sr(t)},pi=$e.a&&$e.a.isMap,di=pi?Ke(pi):fi;var hi=function(t){return Re(t)&&"[object Set]"==Sr(t)},yi=$e.a&&$e.a.isSet,vi=yi?Ke(yi):hi,gi="[object Arguments]",bi="[object Function]",mi="[object Object]",Oi={};Oi[gi]=Oi["[object Array]"]=Oi["[object ArrayBuffer]"]=Oi["[object DataView]"]=Oi["[object Boolean]"]=Oi["[object Date]"]=Oi["[object Float32Array]"]=Oi["[object Float64Array]"]=Oi["[object Int8Array]"]=Oi["[object Int16Array]"]=Oi["[object Int32Array]"]=Oi["[object Map]"]=Oi["[object Number]"]=Oi["[object Object]"]=Oi["[object RegExp]"]=Oi["[object Set]"]=Oi["[object String]"]=Oi["[object Symbol]"]=Oi["[object Uint8Array]"]=Oi["[object Uint8ClampedArray]"]=Oi["[object Uint16Array]"]=Oi["[object Uint32Array]"]=!0,Oi["[object Error]"]=Oi[bi]=Oi["[object WeakMap]"]=!1;var _i=function t(e,r,n,o,i,u){var a,c=1&r,s=2&r,l=4&r;if(n&&(a=i?n(e,o,i,u):n(e)),void 0!==a)return a;if(!Pt(e))return e;var f=Pe(e);if(f){if(a=Jo(e),!c)return Yo(e,a)}else{var p=Sr(e),d=p==bi||"[object GeneratorFunction]"==p;if(Object(He.a)(e))return Object(Go.a)(e,c);if(p==mi||p==gi||d&&!i){if(a=s||d?{}:li(e),!c)return s?$o(e,Xo(a,e)):Vo(e,zo(a,e))}else{if(!Oi[p])return i?e:{};a=ai(e,p,c)}}u||(u=new pe);var h=u.get(e);if(h)return h;u.set(e,a),vi(e)?e.forEach((function(o){a.add(t(o,r,n,o,e,u))})):di(e)&&e.forEach((function(o,i){a.set(i,t(o,r,n,i,e,u))}));var y=f?void 0:(l?s?Zo:cr:s?Ho:ar)(e);return Lo(y||e,(function(o,i){y&&(o=e[i=o]),bn(a,i,t(o,r,n,i,e,u))})),a};var wi=function(t){return _i(t,5)};var ji=function(t,e,r){(void 0!==r&&!nt(t[e],r)||void 0===r&&!(e in t))&&vn(t,e,r)};var xi=function(t){return Re(t)&&ur(t)},Ei=Function.prototype,Si=Object.prototype,Pi=Ei.toString,Ai=Si.hasOwnProperty,ki=Pi.call(Object);var Di=function(t){if(!Re(t)||"[object Object]"!=St(t))return!1;var e=Wo(t);if(null===e)return!0;var r=Ai.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&Pi.call(r)==ki};var Ti=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]};var Mi=function(t){return mn(t,Ho(t))};var Ni=function(t,e,r,n,o,i,u){var a=Ti(t,r),c=Ti(e,r),s=u.get(c);if(s)ji(t,r,s);else{var l=i?i(a,c,r+"",t,e,u):void 0,f=void 0===l;if(f){var p=Pe(c),d=!p&&Object(He.a)(c),h=!p&&!d&&qe(c);l=c,p||d||h?Pe(a)?l=a:xi(a)?l=Yo(a):d?(f=!1,l=Object(Go.a)(c,!0)):h?(f=!1,l=ui(c,!0)):l=[]:Di(c)||Fe(c)?(l=a,Fe(a)?l=Mi(a):Pt(a)&&!kt(a)||(l=li(c))):f=!1}f&&(u.set(c,l),o(l,c,n,i,u),u.delete(c)),ji(t,r,l)}};var Ci=function t(e,r,n,o,i){e!==r&&fn(r,(function(u,a){if(i||(i=new pe),Pt(u))Ni(e,r,a,n,t,o,i);else{var c=o?o(Ti(e,a),u,a+"",e,r,i):void 0;void 0===c&&(c=u),ji(e,a,c)}}),Ho)},Ri=Dn((function(t,e,r){Ci(t,e,r)})),Ii={baseNode:{fill:"#FFFFFF",stroke:"#000000",strokeWidth:2},baseEdge:{stroke:"#000000",strokeWidth:2},rect:{},circle:{},diamond:{},ellipse:{},polygon:{},text:{color:"#000000",stroke:"none",fontSize:12,background:{fill:"transparent"}},anchor:{stroke:"#000000",fill:"#FFFFFF",r:4,hover:{fill:"#949494",fillOpacity:.5,stroke:"#949494",r:10}},nodeText:{color:"#000000",overflowMode:"default",lineHeight:1.2,fontSize:12},edgeText:{textWidth:100,overflowMode:"default",fontSize:12,background:{fill:"#FFFFFF"}},line:{},polyline:{},bezier:{fill:"none",adjustLine:{stroke:"#949494"},adjustAnchor:{r:4,fill:"#949494",stroke:"#949494",fillOpacity:1}},arrow:{offset:10,verticalLength:5},anchorLine:{stroke:"#000000",strokeWidth:2,strokeDasharray:"3,2"},snapline:{stroke:"#949494",strokeWidth:1},edgeAdjust:{r:4,fill:"#FFFFFF",stroke:"#949494",strokeWidth:2},outline:{fill:"transparent",stroke:"#949494",strokeDasharray:"3,3",hover:{stroke:"#949494"}},edgeAnimation:{stroke:"red",strokeDasharray:"10 10",strokeDashoffset:"100%",animationName:"lf_animate_dash",animationDuration:"20s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"normal"},rotateControl:{stroke:"#000",fill:"#fff",strokeWidth:1.5}},Li=function(t){var e=wi(Ii);return t&&(e=Ri(e,t)),e};r(82),r(166);function zi(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var Bi=function(){function t(){var e,r,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),n={},(r="_events")in(e=this)?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n}var e,r,n;return e=t,(r=[{key:"on",value:function(t,e,r){var n=this;return null==t||t.split(",").forEach((function(t){t=t.trim(),n._events[t]||(n._events[t]=[]),n._events[t].push({callback:e,once:!!r})})),this}},{key:"once",value:function(t,e){var r=this;null==t||t.split(",").forEach((function(t){return t=t.trim(),r.on(t,e,!0)}))}},{key:"emit",value:function(t,e){var r=this;null==t||t.split(",").forEach((function(t){var n=r._events[t]||[],o=r._events["*"]||[],i=function(n){for(var o=n.length,i=0;i<o;i++)if(n[i]){var u=n[i],a=u.callback;u.once&&(n.splice(i,1),0===n.length&&delete r._events[t],o--,i--),a.apply(r,[e])}};i(n),i(o)}))}},{key:"off",value:function(t,e){var r=this;return t||(this._events={}),t.split(",").forEach((function(t){if(e){for(var n=r._events[t]||[],o=n.length,i=0;i<o;i++)n[i].callback===e&&(n.splice(i,1),o--,i--);0===n.length&&delete r._events[t]}else delete r._events[t]})),this}},{key:"getEvents",value:function(){return this._events}}])&&zi(e.prototype,r),n&&zi(e,n),t}();function Ui(t,e){return e*Math.round(t/e)||t}function Fi(t,e){return t%e}function Hi(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Xi(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Xi(t,e)}(t,e)||function(){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 Xi(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Gi=function(t,e,r){var n=Hi(t,2),o=n[0],i=n[1],u=Hi(e,2),a=u[0],c=u[1],s=Hi(r,2),l=s[0],f=s[1];return o>a&&o<l&&i>c&&i<f},Yi=function(t,e){var r=!1;switch(e.multipleSelectKey){case"meta":r=t.metaKey;break;case"alt":r=t.altKey;break;case"shift":r=t.shiftKey;break;case"ctrl":r=t.ctrlKey;break;default:r=!1}return r};r(167),r(126),r(83),r(29),r(12),r(13),r(14),r(47);var Vi=function(t){return function(e,r,n){var o=Object(e);if(!ur(e)){var i=ln(r,3);e=ar(e),r=function(t){return i(o[t],t,o)}}var u=t(e,r,n);return u>-1?o[i?e[u]:u]:void 0}};var Wi=function(t,e,r,n){for(var o=t.length,i=r+(n?1:-1);n?i--:++i<o;)if(e(t[i],i,t))return i;return-1},Ki=/\s/;var $i=function(t){for(var e=t.length;e--&&Ki.test(t.charAt(e)););return e},Zi=/^\s+/;var qi=function(t){return t?t.slice(0,$i(t)+1).replace(Zi,""):t},Ji=/^[-+]0x[0-9a-f]+$/i,Qi=/^0b[01]+$/i,tu=/^0o[0-7]+$/i,eu=parseInt;var ru=function(t){if("number"==typeof t)return t;if(zr(t))return NaN;if(Pt(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Pt(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=qi(t);var r=Qi.test(t);return r||tu.test(t)?eu(t.slice(2),r?2:8):Ji.test(t)?NaN:+t},nu=1/0;var ou=function(t){return t?(t=ru(t))===nu||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0};var iu=function(t){var e=ou(t),r=e%1;return e==e?r?e-r:e:0},uu=Math.max;var au,cu=Vi((function(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var o=null==r?0:iu(r);return o<0&&(o=uu(n+o,0)),Wi(t,ln(e,3),o)})),su=new Uint8Array(16);function lu(){if(!au&&!(au="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return au(su)}var fu=/^(?:[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;for(var pu=function(t){return"string"==typeof t&&fu.test(t)},du=[],hu=0;hu<256;++hu)du.push((hu+256).toString(16).substr(1));var yu=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(du[t[e+0]]+du[t[e+1]]+du[t[e+2]]+du[t[e+3]]+"-"+du[t[e+4]]+du[t[e+5]]+"-"+du[t[e+6]]+du[t[e+7]]+"-"+du[t[e+8]]+du[t[e+9]]+"-"+du[t[e+10]]+du[t[e+11]]+du[t[e+12]]+du[t[e+13]]+du[t[e+14]]+du[t[e+15]]).toLowerCase();if(!pu(r))throw TypeError("Stringified UUID is invalid");return r};var vu=function(t,e,r){var n=(t=t||{}).random||(t.rng||lu)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,e){r=r||0;for(var o=0;o<16;++o)e[r+o]=n[o];return e}return yu(n)},gu=function(){return vu()},bu=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=t.nodes.reduce((function(t,r){return t[r.id]=e+vu(),r.id=t[r.id],t}),{});return t.edges.forEach((function(t){t.id=e+vu(),t.sourceNodeId=r[t.sourceNodeId],t.targetNodeId=r[t.targetNodeId]})),t},mu=(r(105),r(127),r(207),function(t,e,r){var n=t.x,o=t.y,i=e.x,u=e.y,a=r.x,c=r.y,s=(c-u)/(a-i),l=u-s*i;return n>=i&&n<=a&&o>=u&&o<=c&&Math.abs(o-s*n+l)<Number.EPSILON});function Ou(t){return Ou="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ou(t)}function _u(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function wu(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?_u(Object(r),!0).forEach((function(e){ju(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):_u(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ju(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var xu,Eu,Su,Pu,Au,ku,Du,Tu,Mu,Nu,Cu,Ru,Iu,Lu,zu,Bu,Uu,Fu,Hu,Xu,Gu,Yu=function(t){return t.anchors},Vu=function(t,e){for(var r,n=e.nodes,o=n.length-1;o>=0;o--){var i=n[o];if(Zu(t,i)){var u=i.getTargetAnchor(t);if(u){var a={node:i,anchorIndex:u.index,anchor:u.anchor};r&&!Wu(i,r.node,e)||(r=a)}}}return r},Wu=function(t,e,r){return t.zIndex>e.zIndex||r.nodesMap[t.id].index>r.nodesMap[e.id].index},Ku=function(t,e,r,n){return Math.hypot(t-r,e-n)},$u=function(t,e){var r=!1,n=qu(e);return t.x>=n.minX-0&&t.x<=n.maxX+0&&t.y>=n.minY-0&&t.y<=n.maxY+0&&(r=!0),r},Zu=function(t,e){var r=!1,n=qu(e);return t.x>=n.minX-5&&t.x<=n.maxX+5&&t.y>=n.minY-5&&t.y<=n.maxY+5&&(r=!0),r},qu=function(t){var e=t.x,r=t.y,n=t.width,o=t.height;return{minX:e-n/2,minY:r-o/2,maxX:e+n/2,maxY:r+o/2,x:e,y:r,width:n,height:o,centerX:e,centerY:r}},Ju=function(t,e,r){var n,o=function(t){var e=t,r=e.x,n=e.y,o=e.width,i=e.height,u=e.radius;return[{x:r-o/2+u,y:n-i/2+u,r:u},{x:r+o/2-u,y:n-i/2+u,r:u},{x:r-o/2+u,y:n+i/2-u,r:u},{x:r+o/2-u,y:n+i/2-u,r:u}]}(r),i=Number.MAX_SAFE_INTEGER;return o.forEach((function(e){var r=Ku(t.x,t.y,e.x,e.y);r<i&&(i=r,n=e)})),Qu(t,e,n)},Qu=function(t,e,r){var n,o=r,i=o.x,u=o.y,a=o.r;if(e===vo.HORIZONTAL){var c=i-Math.sqrt(a*a-(t.y-u)*(t.y-u)),s=i+Math.sqrt(a*a-(t.y-u)*(t.y-u));n={x:Math.abs(c-t.x)<Math.abs(s-t.x)?c:s,y:t.y}}else if(e===vo.VERTICAL){var l=u-Math.sqrt(a*a-(t.x-i)*(t.x-i)),f=u+Math.sqrt(a*a-(t.x-i)*(t.x-i)),p=Math.abs(l-t.y)<Math.abs(f-t.y)?l:f;n={x:t.x,y:p}}return n},ta=function(t,e){var r=e,n=!1,o=r.x-r.width/2+r.radius,i=r.x+r.width/2-r.radius,u=r.y-r.height/2+r.radius,a=r.y+r.height/2-r.radius,c=r.x,s=r.y,l=r.width,f=r.height;return t.y===s+f/2||t.y===s-f/2?n=t.x>o&&t.x<i:t.x!==c+l/2&&t.x!==c-l/2||(n=t.y>u&&t.y<a),n},ea=function(t,e,r){var n,o=r,i=o.x,u=o.y,a=o.rx,c=o.ry;if(e===vo.HORIZONTAL){var s=i-Math.sqrt(a*a-(t.y-u)*(t.y-u)*a*a/(c*c)),l=i+Math.sqrt(a*a-(t.y-u)*(t.y-u)*a*a/(c*c));n={x:Math.abs(s-t.x)<Math.abs(l-t.x)?s:l,y:t.y}}else if(e===vo.VERTICAL){var f=u-Math.sqrt(c*c-(t.x-i)*(t.x-i)*c*c/(a*a)),p=u+Math.sqrt(c*c-(t.x-i)*(t.x-i)*c*c/(a*a)),d=Math.abs(f-t.y)<Math.abs(p-t.y)?f:p;n={x:t.x,y:d}}return n},ra=function(t,e,r){for(var n,o=r.pointsPosition,i=Number.MAX_SAFE_INTEGER,u=[],a=0;a<o.length;a++)u.push({start:o[a],end:o[(a+1)%o.length]});return u.forEach((function(r){var o=r.start,u=r.end,a=o,c=u;o.x>u.x&&(a=u,c=o);var s={x:t.x,y:t.y};if(a.x===c.x&&e===vo.HORIZONTAL&&(s={x:a.x,y:t.y}),a.y===c.y&&e===vo.VERTICAL&&(s={x:t.x,y:a.y}),a.x!==c.x&&a.y!==c.y){var l=(c.y-a.y)/(c.x-a.x),f=(a.x*c.y-c.x*a.y)/(a.x-c.x);e===vo.HORIZONTAL?s={x:(t.y-f)/l,y:t.y}:e===vo.VERTICAL&&(s={x:t.x,y:l*t.x+f})}if(mu(s,o,u)){var p=Ku(s.x,s.y,t.x,t.y);p<i&&(i=p,n=s)}})),n},na=function(t,e,r,n){var o=t.x,i=t.y;return e.x>t.x?o=t.x+r/2:e.x<t.x&&(o=t.x-r/2),e.y>t.y?i=t.y+n/2:e.y<t.y&&(i=t.y-n/2),{x:o,y:i}},oa=function(t){var e=t.rows,r=t.style,n=t.rowsLength,o=t.className,i=document.createElement("div");i.style.fontSize=r.fontSize,i.style.width=r.width,i.className=o,i.style.lineHeight=r.lineHeight,i.style.padding=r.padding,r.fontFamily&&(i.style.fontFamily=r.fontFamily),n>1?e.forEach((function(t){var e=document.createElement("div");e.textContent=t,i.appendChild(e)})):i.textContent=e,document.body.appendChild(i);var u=i.clientHeight;return document.body.removeChild(i),u},ia=function(t){var e=t.rows,r=t.rowsLength,n=t.fontSize,o=0;return e&&e.forEach((function(t){var e=Wc(t);o=e>o?e:o})),{width:Math.ceil(o/2)*n+n/4,height:r*(n+2)+n/4}},ua=function(t){return"object"!==Ou(t)?{isAllPass:!!t,msg:t?"":"不允许连接"}:t},aa=function(t){try{return JSON.parse(JSON.stringify(t))}catch(e){return t}},ca=1e3,sa=999,la=function(){return++ca};function fa(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function pa(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?fa(Object(r),!0).forEach((function(e){ya(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):fa(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function da(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function ha(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ya(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function va(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var ga=(xu=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),ya(this,"id",""),da(this,"type",Eu,this),da(this,"sourceNodeId",Su,this),da(this,"targetNodeId",Pu,this),da(this,"startPoint",Au,this),da(this,"endPoint",ku,this),da(this,"text",Du,this),da(this,"properties",Tu,this),da(this,"points",Mu,this),da(this,"pointsList",Nu,this),da(this,"isSelected",Cu,this),da(this,"isHovered",Ru,this),da(this,"isHitable",Iu,this),da(this,"draggable",Lu,this),da(this,"visible",zu,this),ya(this,"virtual",!1),da(this,"isAnimation",Bu,this),da(this,"isShowAdjustPoint",Uu,this),ya(this,"graphModel",void 0),da(this,"zIndex",Fu,this),ya(this,"BaseType",ho.EDGE),ya(this,"modelType",po.EDGE),da(this,"state",Hu,this),ya(this,"additionStateData",void 0),ya(this,"sourceAnchorId",""),ya(this,"targetAnchorId",""),ya(this,"menu",void 0),ya(this,"customTextPosition",!1),da(this,"style",Xu,this),da(this,"arrowConfig",Gu,this),this.graphModel=r,this.initEdgeData(e),this.setAttributes()}var e,r,n;return e=t,r=[{key:"initEdgeData",value:function(t){if(t.properties||(t.properties={}),!t.id){var e=this.graphModel.idGenerator,r=e&&e(t.type),n=this.createId();t.id=n||r||gu()}this.arrowConfig.markerEnd="url(#marker-end-".concat(t.id,")"),this.arrowConfig.markerStart="url(#marker-start-".concat(t.id,")");var o=this.graphModel.editConfigModel.adjustEdgeStartAndEnd;this.isShowAdjustPoint=o,Mn(this,rs(t)),this.graphModel.overlapMode===Oo.INCREASE&&(this.zIndex=t.zIndex||la()),this.setAnchors(),this.initPoints(),this.formatText(t)}},{key:"setAttributes",value:function(){}},{key:"createId",value:function(){return null}},{key:"getEdgeStyle",value:function(){return pa(pa({},this.graphModel.theme.baseEdge),this.style)}},{key:"getAdjustPointStyle",value:function(){return pa({},this.graphModel.theme.edgeAdjust)}},{key:"getTextStyle",value:function(){var t=this.graphModel.theme.edgeText;return wi(t)}},{key:"getEdgeAnimationStyle",value:function(){var t=this.graphModel.theme.edgeAnimation;return wi(t)}},{key:"getArrowStyle",value:function(){var t=this.getEdgeStyle(),e=this.getEdgeAnimationStyle(),r=this.graphModel.theme.arrow,n=this.isAnimation?e.stroke:t.stroke;return pa(pa({},t),{},{fill:n,stroke:n},r)}},{key:"getOutlineStyle",value:function(){var t=this.graphModel.theme.outline;return wi(t)}},{key:"getTextPosition",value:function(){return{x:0,y:0}}},{key:"sourceNode",get:function(){var t,e;return null===(t=this.graphModel)||void 0===t||null===(e=t.nodesMap[this.sourceNodeId])||void 0===e?void 0:e.model}},{key:"targetNode",get:function(){var t,e;return null===(t=this.graphModel)||void 0===t||null===(e=t.nodesMap[this.targetNodeId])||void 0===e?void 0:e.model}},{key:"textPosition",get:function(){return this.getTextPosition()}},{key:"getBeginAnchor",value:function(t,e,r){var n,o,i=Yu(t);return r&&(n=cu(i,(function(t){return t.id===r})))||i.forEach((function(t){var r=ns(t,e);(void 0===o||r<o)&&(o=r,n=t)})),n}},{key:"getEndAnchor",value:function(t,e){var r,n,o=this,i=Yu(t);return e&&(r=cu(i,(function(t){return t.id===e})))||i.forEach((function(t){var e=ns(t,o.startPoint);(void 0===n||e<n)&&(n=e,r=t)})),r}},{key:"getProperties",value:function(){return Object(o.I)(this.properties)}},{key:"getData",value:function(){var t=this.text,e=t.x,r=t.y,n=t.value,i={id:this.id,type:this.type,sourceNodeId:this.sourceNode.id,targetNodeId:this.targetNode.id,startPoint:Object.assign({},this.startPoint),endPoint:Object.assign({},this.endPoint),properties:Object(o.I)(this.properties)};return n&&(i.text={x:e,y:r,value:n}),this.graphModel.overlapMode===Oo.INCREASE&&(i.zIndex=this.zIndex),i}},{key:"getHistoryData",value:function(){return this.getData()}},{key:"setProperty",value:function(t,e){this.properties[t]=aa(e),this.setAttributes()}},{key:"deleteProperty",value:function(t){delete this.properties[t],this.setAttributes()}},{key:"setProperties",value:function(t){this.properties=pa(pa({},Object(o.I)(this.properties)),aa(t)),this.setAttributes()}},{key:"changeEdgeId",value:function(t){var e=this.arrowConfig,r=e.markerEnd,n=e.markerStart;n&&n==="url(#marker-start-".concat(this.id,")")&&(this.arrowConfig.markerStart="url(#marker-start-".concat(t,")")),r&&r==="url(#marker-end-".concat(this.id,")")&&(this.arrowConfig.markerEnd="url(#marker-end-".concat(t,")")),this.id=t}},{key:"setStyle",value:function(t,e){this.style=pa(pa({},this.style),{},ya({},t,aa(e)))}},{key:"setStyles",value:function(t){this.style=pa(pa({},this.style),aa(t))}},{key:"updateStyles",value:function(t){this.style=pa({},aa(t))}},{key:"formatText",value:function(t){var e=this.textPosition,r=e.x,n=e.y;t.text&&"string"!=typeof t.text?"[object Object]"===Object.prototype.toString.call(t.text)&&(this.text={x:t.text.x||r,y:t.text.y||n,value:t.text.value||"",draggable:this.text.draggable,editable:this.text.editable}):this.text={value:t.text||"",x:r,y:n,draggable:this.text.draggable,editable:this.text.editable}}},{key:"resetTextPosition",value:function(){var t=this.textPosition,e=t.x,r=t.y;this.text.x=e,this.text.y=r}},{key:"moveText",value:function(t,e){if(this.text){var r=this.text,n=r.x,o=r.y,i=r.value,u=r.draggable,a=r.editable;this.text={value:i,draggable:u,x:n+t,y:o+e,editable:a}}}},{key:"setText",value:function(t){t&&Mn(this.text,t)}},{key:"updateText",value:function(t){this.text=pa(pa({},Object(o.I)(this.text)),{},{value:t})}},{key:"setAnchors",value:function(){if(!this.sourceAnchorId||!this.startPoint){var t=this.getBeginAnchor(this.sourceNode,this.targetNode,this.sourceAnchorId);if(!t)throw new Error("无法获取beginAnchor,请检查anchors相关逻辑,anchors不能为空");this.startPoint||(this.startPoint={x:t.x,y:t.y}),this.sourceAnchorId||(this.sourceAnchorId=t.id)}if(!this.targetAnchorId||!this.endPoint){var e=this.getEndAnchor(this.targetNode,this.targetAnchorId);if(!e)throw new Error("无法获取endAnchor,请检查anchors相关逻辑,anchors不能为空");this.endPoint||(this.endPoint={x:e.x,y:e.y}),this.targetAnchorId||(this.targetAnchorId=e.id)}}},{key:"setSelected",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isSelected=t}},{key:"setHovered",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isHovered=t}},{key:"setHitable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isHitable=t}},{key:"openEdgeAnimation",value:function(){this.isAnimation=!0}},{key:"closeEdgeAnimation",value:function(){this.isAnimation=!1}},{key:"setElementState",value:function(t,e){this.state=t,this.additionStateData=e}},{key:"updateStartPoint",value:function(t){this.startPoint=t}},{key:"moveStartPoint",value:function(t,e){this.startPoint.x+=t,this.startPoint.y+=e}},{key:"updateEndPoint",value:function(t){this.endPoint=t}},{key:"moveEndPoint",value:function(t,e){this.endPoint.x+=t,this.endPoint.y+=e}},{key:"setZIndex",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.zIndex=t}},{key:"initPoints",value:function(){}},{key:"updateAttributes",value:function(t){Mn(this,t)}},{key:"getAdjustStart",value:function(){return this.startPoint}},{key:"getAdjustEnd",value:function(){return this.endPoint}},{key:"updateAfterAdjustStartAndEnd",value:function(t){var e=t.startPoint,r=t.endPoint;this.updateStartPoint({x:e.x,y:e.y}),this.updateEndPoint({x:r.x,y:r.y})}}],r&&ha(e.prototype,r),n&&ha(e,n),t}(),Eu=va(xu.prototype,"type",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Su=va(xu.prototype,"sourceNodeId",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Pu=va(xu.prototype,"targetNodeId",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Au=va(xu.prototype,"startPoint",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),ku=va(xu.prototype,"endPoint",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),Du=va(xu.prototype,"text",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{value:"",x:0,y:0,draggable:!1,editable:!0}}}),Tu=va(xu.prototype,"properties",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),Mu=va(xu.prototype,"points",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Nu=va(xu.prototype,"pointsList",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Cu=va(xu.prototype,"isSelected",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Ru=va(xu.prototype,"isHovered",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Iu=va(xu.prototype,"isHitable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Lu=va(xu.prototype,"draggable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),zu=va(xu.prototype,"visible",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Bu=va(xu.prototype,"isAnimation",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Uu=va(xu.prototype,"isShowAdjustPoint",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Fu=va(xu.prototype,"zIndex",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Hu=va(xu.prototype,"state",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Xu=va(xu.prototype,"style",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),Gu=va(xu.prototype,"arrowConfig",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{markerEnd:"url(#marker-end-".concat(this.id,")"),markerStart:"url(#marker-start-".concat(this.id,")")}}}),va(xu.prototype,"sourceNode",[o.m],Object.getOwnPropertyDescriptor(xu.prototype,"sourceNode"),xu.prototype),va(xu.prototype,"targetNode",[o.m],Object.getOwnPropertyDescriptor(xu.prototype,"targetNode"),xu.prototype),va(xu.prototype,"textPosition",[o.m],Object.getOwnPropertyDescriptor(xu.prototype,"textPosition"),xu.prototype),va(xu.prototype,"setProperty",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"setProperty"),xu.prototype),va(xu.prototype,"deleteProperty",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"deleteProperty"),xu.prototype),va(xu.prototype,"setProperties",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"setProperties"),xu.prototype),va(xu.prototype,"changeEdgeId",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"changeEdgeId"),xu.prototype),va(xu.prototype,"setStyle",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"setStyle"),xu.prototype),va(xu.prototype,"setStyles",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"setStyles"),xu.prototype),va(xu.prototype,"updateStyles",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"updateStyles"),xu.prototype),va(xu.prototype,"formatText",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"formatText"),xu.prototype),va(xu.prototype,"resetTextPosition",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"resetTextPosition"),xu.prototype),va(xu.prototype,"moveText",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"moveText"),xu.prototype),va(xu.prototype,"setText",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"setText"),xu.prototype),va(xu.prototype,"updateText",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"updateText"),xu.prototype),va(xu.prototype,"setAnchors",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"setAnchors"),xu.prototype),va(xu.prototype,"setSelected",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"setSelected"),xu.prototype),va(xu.prototype,"setHovered",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"setHovered"),xu.prototype),va(xu.prototype,"setHitable",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"setHitable"),xu.prototype),va(xu.prototype,"openEdgeAnimation",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"openEdgeAnimation"),xu.prototype),va(xu.prototype,"closeEdgeAnimation",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"closeEdgeAnimation"),xu.prototype),va(xu.prototype,"setElementState",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"setElementState"),xu.prototype),va(xu.prototype,"updateStartPoint",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"updateStartPoint"),xu.prototype),va(xu.prototype,"moveStartPoint",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"moveStartPoint"),xu.prototype),va(xu.prototype,"updateEndPoint",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"updateEndPoint"),xu.prototype),va(xu.prototype,"moveEndPoint",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"moveEndPoint"),xu.prototype),va(xu.prototype,"setZIndex",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"setZIndex"),xu.prototype),va(xu.prototype,"initPoints",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"initPoints"),xu.prototype),va(xu.prototype,"updateAttributes",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"updateAttributes"),xu.prototype),va(xu.prototype,"getAdjustStart",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"getAdjustStart"),xu.prototype),va(xu.prototype,"getAdjustEnd",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"getAdjustEnd"),xu.prototype),va(xu.prototype,"updateAfterAdjustStartAndEnd",[o.k],Object.getOwnPropertyDescriptor(xu.prototype,"updateAfterAdjustStartAndEnd"),xu.prototype),xu),ba=ga;function ma(t){return ma="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ma(t)}function Oa(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function _a(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Oa(Object(r),!0).forEach((function(e){Ta(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Oa(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function wa(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ja(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function xa(){return xa="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Ea(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},xa.apply(this,arguments)}function Ea(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Da(t)););return t}function Sa(t,e){return Sa=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Sa(t,e)}function Pa(t){var e=function(){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(t){return!1}}();return function(){var r,n=Da(t);if(e){var o=Da(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Aa(this,r)}}function Aa(t,e){if(e&&("object"===ma(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return ka(t)}function ka(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Da(t){return Da=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Da(t)}function Ta(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Ma,Na,Ca=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Sa(t,e)}(i,t);var e,r,n,o=Pa(i);function i(){var t;wa(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Ta(ka(t=o.call.apply(o,[this].concat(r))),"modelType",po.LINE_EDGE),t}return e=i,(r=[{key:"getEdgeStyle",value:function(){var t=this.graphModel.theme.line;return _a(_a({},xa(Da(i.prototype),"getEdgeStyle",this).call(this)),wi(t))}},{key:"getTextPosition",value:function(){return{x:(this.startPoint.x+this.endPoint.x)/2,y:(this.startPoint.y+this.endPoint.y)/2}}}])&&ja(e.prototype,r),n&&ja(e,n),i}(ba);function Ra(t){return Ra="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ra(t)}function Ia(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return La(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return La(t,e)}(t,e)||function(){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 La(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function za(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Ba(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?za(Object(r),!0).forEach((function(e){Za(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):za(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Ua(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function Fa(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ha(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Xa(){return Xa="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Ga(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Xa.apply(this,arguments)}function Ga(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=$a(t)););return t}function Ya(t,e){return Ya=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Ya(t,e)}function Va(t){var e=function(){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(t){return!1}}();return function(){var r,n=$a(t);if(e){var o=$a(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Wa(this,r)}}function Wa(t,e){if(e&&("object"===Ra(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Ka(t)}function Ka(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function $a(t){return $a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},$a(t)}function Za(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function qa(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var Ja=(Ma=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ya(t,e)}(i,t);var e,r,n,o=Va(i);function i(){var t;Fa(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Za(Ka(t=o.call.apply(o,[this].concat(r))),"modelType",po.POLYLINE_EDGE),Za(Ka(t),"draggingPointList",void 0),Ua(Ka(t),"dbClickPosition",Na,Ka(t)),t}return e=i,(r=[{key:"initEdgeData",value:function(t){this.offset=30,Xa($a(i.prototype),"initEdgeData",this).call(this,t)}},{key:"getEdgeStyle",value:function(){var t=this.graphModel.theme.polyline;return Ba(Ba({},Xa($a(i.prototype),"getEdgeStyle",this).call(this)),wi(t))}},{key:"getTextPosition",value:function(){var t,e=null===(t=this.text)||void 0===t?void 0:t.value;if(this.dbClickPosition&&!e){var r=this.dbClickPosition;return{x:r.x,y:r.y}}var n=Gc(this.points),o=Ia(Bc(n),2),i=o[0],u=o[1];return{x:(i.x+u.x)/2,y:(i.y+u.y)/2}}},{key:"getAfterAnchor",value:function(t,e,r){var n,o;return r.forEach((function(r){var i;t===vo.HORIZONTAL?i=Math.abs(e.y-r.y):t===vo.VERTICAL&&(i=Math.abs(e.x-r.x)),(!o||o>i)&&(o=i,n=r)})),n}},{key:"getCrossPoint",value:function(t,e,r){var n;return t===vo.HORIZONTAL?n={x:r.x,y:e.y}:t===vo.VERTICAL&&(n={x:e.x,y:r.y}),n}},{key:"removeCrossPoints",value:function(t,e,r){var n=r.map((function(t){return t}));if(1===t){var o=n[t],i=n[e],u=n[t-1];if(Uc(u,o,this.sourceNode)){if(Fc(o,i,this.sourceNode)){var a=Hc(o,i,this.sourceNode);a&&(n[t]=a,n.splice(t-1,1),t--,e--)}}else this.sourceNode.anchors.forEach((function(e){(e.x===u.x&&e.x===o.x||e.y===u.y&&e.y===o.y)&&Ku(e.x,e.y,o.x,o.y)<Ku(u.x,u.y,o.x,o.y)&&(n[t-1]=e)}))}if(e===r.length-2){var c=n[t],s=n[e],l=n[e+1];if(Uc(s,l,this.targetNode)){if(Fc(c,s,this.targetNode)){var f=Hc(c,s,this.targetNode);f&&(n[e]=f,n.splice(e+1,1))}}else this.targetNode.anchors.forEach((function(t){(t.x===l.x&&t.x===s.x||t.y===l.y&&t.y===s.y)&&Ku(t.x,t.y,s.x,s.y)<Ku(l.x,l.y,s.x,s.y)&&(n[e+1]=t)}))}return n}},{key:"getDraggingPoints",value:function(t,e,r,n,o){var i=o.map((function(t){return t})),u=this.getAfterAnchor(t,r,n),a=this.getCrossPoint(t,r,u);return"start"===e?(i.unshift(a),i.unshift(u)):(i.push(a),i.push(u)),i}},{key:"updateCrossPoints",value:function(t){var e=t.map((function(t){return t})),r=t[0],n=t[1],o=t[e.length-2],i=t[e.length-1],u=this.sourceNode,a=this.targetNode,c=u.modelType,s=a.modelType,l=Xc(r,n),f=e[0];switch(c){case po.RECT_NODE:0!==u.radius&&(ta(r,u)||(f=Ju(r,l,u)));break;case po.CIRCLE_NODE:f=Qu(r,l,u);break;case po.ELLIPSE_NODE:f=ea(r,l,u);break;case po.DIAMOND_NODE:case po.POLYGON_NODE:f=ra(r,l,u)}e[0]=f;var p=Xc(o,i),d=e[e.length-1];switch(s){case po.RECT_NODE:0!==a.radius&&(ta(i,a)||(d=Ju(i,p,a)));break;case po.CIRCLE_NODE:d=Qu(i,p,a);break;case po.ELLIPSE_NODE:d=ea(i,p,a);break;case po.DIAMOND_NODE:case po.POLYGON_NODE:d=ra(i,p,a)}return e[e.length-1]=d,e}},{key:"getData",value:function(){var t=Xa($a(i.prototype),"getData",this).call(this),e=this.pointsList.map((function(t){return{x:t.x,y:t.y}}));return Object.assign({},t,{pointsList:e})}},{key:"initPoints",value:function(){this.pointsList.length>0?this.points=this.pointsList.map((function(t){return"".concat(t.x,",").concat(t.y)})).join(" "):this.updatePoints()}},{key:"updatePoints",value:function(){var t=zc({x:this.startPoint.x,y:this.startPoint.y},{x:this.endPoint.x,y:this.endPoint.y},this.sourceNode,this.targetNode,this.offset||0);this.pointsList=t,this.points=t.map((function(t){return"".concat(t.x,",").concat(t.y)})).join(" ")}},{key:"updateStartPoint",value:function(t){this.startPoint=Object.assign({},t),this.updatePoints()}},{key:"moveStartPoint",value:function(t,e){this.startPoint.x+=t,this.startPoint.y+=e,this.updatePoints()}},{key:"updateEndPoint",value:function(t){this.endPoint=Object.assign({},t),this.updatePoints()}},{key:"moveEndPoint",value:function(t,e){this.endPoint.x+=t,this.endPoint.y+=e,this.updatePoints()}},{key:"updatePointsList",value:function(t,e){this.pointsList.forEach((function(r){r.x+=t,r.y+=e})),this.initPoints()}},{key:"dragAppendStart",value:function(){this.draggingPointList=this.pointsList.map((function(t){return t}))}},{key:"dragAppendSimple",value:function(t,e){this.isDragging=!0;var r=t.start,n=t.end,o=t.startIndex,i=t.endIndex,u=t.direction,a=this.pointsList,c=a;return u===vo.HORIZONTAL?(a[o]={x:r.x,y:r.y+e.y},a[i]={x:n.x,y:n.y+e.y},c=this.pointsList.map((function(t){return t}))):u===vo.VERTICAL&&(a[o]={x:r.x+e.x,y:r.y},a[i]={x:n.x+e.x,y:n.y},c=this.pointsList.map((function(t){return t}))),this.updatePointsAfterDrag(c),this.draggingPointList=c,this.setText(Object.assign({},this.text,this.textPosition)),{start:Object.assign({},a[o]),end:Object.assign({},a[i]),startIndex:o,endIndex:i,direction:u}}},{key:"dragAppend",value:function(t,e){this.isDragging=!0;var r=t.start,n=t.end,o=t.startIndex,i=t.endIndex,u=t.direction,a=this.pointsList;if(u===vo.HORIZONTAL){a[o]={x:r.x,y:r.y+e.y},a[i]={x:n.x,y:n.y+e.y};var c=this.pointsList.map((function(t){return t}));if(0!==o&&i!==this.pointsList.length-1&&(c=this.removeCrossPoints(o,i,c)),0===o){var s={x:r.x,y:r.y+e.y};if(!$u(s,this.sourceNode)){var l=this.sourceNode.anchors;c=this.getDraggingPoints(u,"start",s,l,c)}}if(i===this.pointsList.length-1){var f={x:n.x,y:n.y+e.y};if(!$u(f,this.targetNode)){var p=this.targetNode.anchors;c=this.getDraggingPoints(u,"end",f,p,c)}}this.updatePointsAfterDrag(c),this.draggingPointList=c}else if(u===vo.VERTICAL){a[o]={x:r.x+e.x,y:r.y},a[i]={x:n.x+e.x,y:n.y};var d=this.pointsList.map((function(t){return t}));if(0!==o&&i!==this.pointsList.length-1&&(d=this.removeCrossPoints(o,i,d)),0===o){var h={x:r.x+e.x,y:r.y};if(!$u(h,this.sourceNode)){var y=this.sourceNode.anchors;d=this.getDraggingPoints(u,"start",h,y,d)}}if(i===this.pointsList.length-1){var v={x:n.x+e.x,y:n.y};if(!$u(v,this.targetNode)){var g=this.targetNode.anchors;d=this.getDraggingPoints(u,"end",v,g,d)}}this.updatePointsAfterDrag(d),this.draggingPointList=d}return this.setText(Object.assign({},this.text,this.textPosition)),{start:Object.assign({},a[o]),end:Object.assign({},a[i]),startIndex:o,endIndex:i,direction:u}}},{key:"dragAppendEnd",value:function(){if(this.draggingPointList){var t=Lc(Gc(this.points));this.pointsList=t.map((function(t){return t})),this.draggingPointList=[];var e=t[0];this.startPoint=Object.assign({},e);var r=t[t.length-1];this.endPoint=Object.assign({},r)}this.isDragging=!1}},{key:"updatePointsAfterDrag",value:function(t){var e=this.updateCrossPoints(t);this.points=e.map((function(t){return"".concat(t.x,",").concat(t.y)})).join(" ")}},{key:"getAdjustStart",value:function(){return this.pointsList[0]||this.startPoint}},{key:"getAdjustEnd",value:function(){var t=this.pointsList;return t[t.length-1]||this.endPoint}},{key:"updateAfterAdjustStartAndEnd",value:function(t){var e=t.startPoint,r=t.endPoint,n=t.sourceNode,o=t.targetNode,i=zc({x:e.x,y:e.y},{x:r.x,y:r.y},n,o,this.offset||0);this.pointsList=i,this.initPoints()}}])&&Ha(e.prototype,r),n&&Ha(e,n),i}(ba),Na=qa(Ma.prototype,"dbClickPosition",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),qa(Ma.prototype,"initPoints",[o.k],Object.getOwnPropertyDescriptor(Ma.prototype,"initPoints"),Ma.prototype),qa(Ma.prototype,"updatePoints",[o.k],Object.getOwnPropertyDescriptor(Ma.prototype,"updatePoints"),Ma.prototype),qa(Ma.prototype,"updateStartPoint",[o.k],Object.getOwnPropertyDescriptor(Ma.prototype,"updateStartPoint"),Ma.prototype),qa(Ma.prototype,"moveStartPoint",[o.k],Object.getOwnPropertyDescriptor(Ma.prototype,"moveStartPoint"),Ma.prototype),qa(Ma.prototype,"updateEndPoint",[o.k],Object.getOwnPropertyDescriptor(Ma.prototype,"updateEndPoint"),Ma.prototype),qa(Ma.prototype,"moveEndPoint",[o.k],Object.getOwnPropertyDescriptor(Ma.prototype,"moveEndPoint"),Ma.prototype),qa(Ma.prototype,"updatePointsList",[o.k],Object.getOwnPropertyDescriptor(Ma.prototype,"updatePointsList"),Ma.prototype),qa(Ma.prototype,"dragAppendStart",[o.k],Object.getOwnPropertyDescriptor(Ma.prototype,"dragAppendStart"),Ma.prototype),qa(Ma.prototype,"dragAppendSimple",[o.k],Object.getOwnPropertyDescriptor(Ma.prototype,"dragAppendSimple"),Ma.prototype),qa(Ma.prototype,"dragAppend",[o.k],Object.getOwnPropertyDescriptor(Ma.prototype,"dragAppend"),Ma.prototype),qa(Ma.prototype,"dragAppendEnd",[o.k],Object.getOwnPropertyDescriptor(Ma.prototype,"dragAppendEnd"),Ma.prototype),qa(Ma.prototype,"updatePointsAfterDrag",[o.k],Object.getOwnPropertyDescriptor(Ma.prototype,"updatePointsAfterDrag"),Ma.prototype),qa(Ma.prototype,"getAdjustStart",[o.k],Object.getOwnPropertyDescriptor(Ma.prototype,"getAdjustStart"),Ma.prototype),qa(Ma.prototype,"getAdjustEnd",[o.k],Object.getOwnPropertyDescriptor(Ma.prototype,"getAdjustEnd"),Ma.prototype),qa(Ma.prototype,"updateAfterAdjustStartAndEnd",[o.k],Object.getOwnPropertyDescriptor(Ma.prototype,"updateAfterAdjustStartAndEnd"),Ma.prototype),Ma),Qa=function(t){var e=t.start,r=t.end,n=t.offset,o=t.verticalLength,i=t.type,u={leftX:0,leftY:0,rightX:0,rightY:0},a=Math.atan((r.y-e.y)/(r.x-e.x)),c=Math.atan(n/o),s=Math.sqrt(o*o+n*n);return"start"===i?r.x>=e.x?(u.leftX=e.x+s*Math.sin(a+c),u.leftY=e.y-s*Math.cos(a+c),u.rightX=e.x-s*Math.sin(a-c),u.rightY=e.y+s*Math.cos(a-c)):(u.leftX=e.x-s*Math.sin(a+c),u.leftY=e.y+s*Math.cos(a+c),u.rightX=e.x+s*Math.sin(a-c),u.rightY=e.y-s*Math.cos(a-c)):"end"===i&&(r.x>=e.x?(u.leftX=r.x+s*Math.sin(a-c),u.leftY=r.y-s*Math.cos(a-c),u.rightX=r.x-s*Math.sin(a+c),u.rightY=r.y+s*Math.cos(a+c)):(u.leftX=r.x-s*Math.sin(a-c),u.leftY=r.y+s*Math.cos(a-c),u.rightX=r.x+s*Math.sin(a+c),u.rightY=r.y-s*Math.cos(a+c))),u},tc={x:1,y:0,z:0};function ec(t,e,r,n,o){for(var i=function(o){if(o<0||o>1)throw new RangeError('The value range of parameter "t" is [0,1]');return{x:t.x*Math.pow(1-o,3)+3*e.x*o*Math.pow(1-o,2)+3*r.x*Math.pow(o,2)*(1-o)+n.x*Math.pow(o,3),y:t.y*Math.pow(1-o,3)+3*e.y*o*Math.pow(1-o,2)+3*r.y*Math.pow(o,2)*(1-o)+n.y*Math.pow(o,3)}},u=0,a=2,c=n.x,s=n.y,l=n;u<o&&a<50;){var f=l=i(1-a/100),p=f.x,d=f.y;u=Ku(c,s,p,d),a++}return l}function rc(t){var e=Math.hypot(t.x,t.y);return{x:t.x/e,y:t.y/e,z:0}}function nc(t){return n=function(t,e){return t.x*e.y-t.y*e.x}(e=tc,r=t),o=Math.acos(function(t,e){var r=[t.x,t.y,t.z];return[e.x,e.y,e.z].reduce((function(t,e,n){return t+e*r[n]}))}(rc(e),rc(r))),n>=0?o:-o;var e,r,n,o}function oc(t){return t*(180/Math.PI)}function ic(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function uc(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ic(Object(r),!0).forEach((function(e){ac(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ic(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ac(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function cc(t){return function(t){if(Array.isArray(t))return pc(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||fc(t)||function(){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 sc(t){return sc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sc(t)}function lc(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||fc(t,e)||function(){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 fc(t,e){if(t){if("string"==typeof t)return pc(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?pc(t,e):void 0}}function pc(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var dc=function(t,e){var r;switch(t.type){case"line":default:r=new Ca(t,e);break;case"polyline":r=new Ja(t,e)}return r},hc=function(t,e){return 2*Math.abs(t.centerX-e.centerX)<t.width+e.width&&2*Math.abs(t.centerY-e.centerY)<t.height+e.height},yc=function(t){var e=[],r={};return t.forEach((function(t){var e="".concat(t.x,"-").concat(t.y);t.id=e,r[e]=t})),Object.keys(r).forEach((function(t){e.push(r[t])})),e},vc=function(t,e){var r=[t,{x:t.x,y:e.y},e];return yc(r)},gc=function(t,e){return 0===t.width&&0===t.height?t:{centerX:t.centerX,centerY:t.centerY,minX:t.minX-e,minY:t.minY-e,maxX:t.maxX+e,maxY:t.maxY+e,height:t.height+2*e,width:t.width+2*e}},bc=function(t,e){var r=Math.abs(t.x-e.centerX),n=Math.abs(t.y-e.centerY);return r/e.width>n/e.height?vo.HORIZONTAL:vo.VERTICAL},mc=function(t,e,r){return bc(r,e)===vo.HORIZONTAL?{x:r.x>t.centerX?t.maxX:t.minX,y:r.y}:{x:r.x,y:r.y>t.centerY?t.maxY:t.minY}},Oc=function(t,e){var r=Math.min(t.minX,e.minX),n=Math.min(t.minY,e.minY),o=Math.max(t.maxX,e.maxX),i=Math.max(t.maxY,e.maxY);return{centerX:(r+o)/2,centerY:(n+i)/2,minX:r,minY:n,maxX:o,maxY:i,height:i-n,width:o-r}},_c=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0,r=[],n=[];t.forEach((function(t){r.push(t.x),n.push(t.y)}));var o=Math.min.apply(Math,r),i=Math.max.apply(Math,r),u=Math.min.apply(Math,n),a=Math.max.apply(Math,n),c=i-o,s=a-u;return e&&(c+=e,s+=e),{centerX:(o+i)/2,centerY:(u+a)/2,maxX:i,maxY:a,minX:o,minY:u,x:(o+i)/2,y:(u+a)/2,height:s,width:c}},wc=function(t){var e=t.minX,r=t.minY,n=t.maxX,o=t.maxY;return[{x:e,y:r},{x:n,y:r},{x:n,y:o},{x:e,y:o}]},jc=function(t,e){var r=t.x,n=t.y;return r<e.minX||r>e.maxX||n<e.minY||n>e.maxY},xc=function(t,e){return e<t.minX||e>t.maxX?[]:[{x:e,y:t.minY},{x:e,y:t.maxY}]},Ec=function(t,e){return e<t.minY||e>t.maxY?[]:[{x:t.minX,y:e},{x:t.maxX,y:e}]},Sc=function(t,e){return xc(t,e.x).concat(Ec(t,e.y))},Pc=function(t,e){return Math.abs(t.x-e.x)+Math.abs(t.y-e.y)},Ac=function(t,e){var r=0;return e.forEach((function(e){e&&(t.x===e.x&&(r+=-2),t.y===e.y&&(r+=-2))})),r},kc=function(t,e,r,n,o){return Pc(t,e)+Pc(t,r)+Ac(t,[e,r,n,o])},Dc=function t(e,r,n,o,i){i||(i=0),e.unshift(r[o]),n[o]&&n[o]!==o&&i<=100&&t(e,r,n,n[o],i+1)},Tc=function(t,e){var r=t.indexOf(e);r>-1&&t.splice(r,1)},Mc=function(t,e,r,n){var o=e.x-t.x,i=e.y-t.y,u=n.x-r.x,a=n.y-r.y,c=(-i*(t.x-r.x)+o*(t.y-r.y))/(-u*i+o*a),s=(u*(t.y-r.y)-a*(t.x-r.x))/(-u*i+o*a);return c>=0&&c<=1&&s>=0&&s<=1},Nc=function(t,e,r){if(0===r.width&&0===r.height)return!1;var n=lc(wc(r),4),o=n[0],i=n[1],u=n[2],a=n[3];return Mc(t,e,o,i)||Mc(t,e,o,a)||Mc(t,e,i,u)||Mc(t,e,u,a)},Cc=function(t,e,r,n){var o=[];return t.forEach((function(t){t!==e&&(t.x!==e.x&&t.y!==e.y||Nc(t,e,r)||Nc(t,e,n)||o.push(t))})),yc(o)},Rc=function(t,e,r,n,o,i,u){var a=[],c=[e],s={},l={},f={};l[e.id]=0,f[e.id]=kc(e,r,e);var p={};t.forEach((function(t){p[t.id]=t}));for(var d=function(){var d=void 0,h=1/0;if(c.forEach((function(t){f[t.id]<h&&(h=f[t.id],d=t)})),d===r){var y=[];return Dc(y,p,s,r.id),{v:y}}Tc(c,d),a.push(d),Cc(t,d,n,o).forEach((function(t){if(-1===a.indexOf(t)){-1===c.indexOf(t)&&c.push(t);var n=f[d.id]+Pc(d,t);l[t.id]&&n>=l[t.id]||(s[t.id]=d.id,l[t.id]=n,f[t.id]=l[t.id]+kc(t,r,e,i,u))}}))};c.length;){var h=d();if("object"===sc(h))return h.v}return[e,r]},Ic=function(t){return qu(t)},Lc=function(t){for(var e=1;e<t.length-1;){var r=t[e-1],n=t[e],o=t[e+1];r.x===n.x&&n.x===o.x||r.y===n.y&&n.y===o.y?t.splice(e,1):e++}return t},zc=function(t,e,r,n,o){var i=Ic(r),u=Ic(n),a=gc(i,o),c=gc(u,o),s=mc(a,i,t),l=mc(c,u,e);if(hc(a,c)){var f=Yc(t,e,s,l);return[t,s].concat(cc(f),[l,e])}var p=_c([s,l]),d=Oc(a,p),h=Oc(c,p),y=[];y=(y=y.concat(wc(d))).concat(wc(h));var v={x:(t.x+e.x)/2,y:(t.y+e.y)/2};[p,d,h].forEach((function(t){y=y.concat(Sc(t,v).filter((function(t){return jc(t,a)&&jc(t,c)})))})),[{x:s.x,y:l.y},{x:l.x,y:s.y}].forEach((function(t){jc(t,a)&&jc(t,c)&&y.push(t)})),y.unshift(s),y.push(l),y=yc(y);var g=Rc(y,s,l,i,u,t,e);return g.unshift(t),g.push(e),g.length>2&&(g=Lc(g)),yc(g)},Bc=function(t){var e;if(1===t.length)e=[t[0],t[0]];else if(t.length>=2){for(var r=t[0],n=t[1],o=Ku(r.x,r.y,n.x,n.y),i=1;i<t.length-1;i++){var u=t[i],a=t[i+1],c=Ku(u.x,u.y,a.x,a.y);c>o&&(o=c,r=u,n=a)}e=[r,n]}return e},Uc=function(t,e,r){var n=$u(t,r),o=$u(e,r);return n&&o},Fc=function(t,e,r){var n=$u(t,r),o=$u(e,r);return!(n&&o)&&(n||o)},Hc=function(t,e,r){for(var n,o,i=qu(r),u=wc(i),a=0;a<u.length;a++){Mc(t,e,u[a],u[(a+1)%u.length])&&(o=[u[a],u[(a+1)%u.length]])}return o&&(n=function(t,e,r,n){var o=(e.y-t.y)*(n.x-r.x)-(t.x-e.x)*(r.y-n.y);if(0===o)return!1;var i=((e.x-t.x)*(n.x-r.x)*(r.y-t.y)+(e.y-t.y)*(n.x-r.x)*t.x-(n.y-r.y)*(e.x-t.x)*r.x)/o,u=-((e.y-t.y)*(n.y-r.y)*(r.x-t.x)+(e.x-t.x)*(n.y-r.y)*t.y-(n.x-r.x)*(e.y-t.y)*r.y)/o;return(i-t.x)*(i-e.x)<=0&&(u-t.y)*(u-e.y)<=0&&(i-r.x)*(i-n.x)<=0&&(u-r.y)*(u-n.y)<=0&&{x:i,y:u}}(t,e,o[0],o[1])),n},Xc=function(t,e){var r;return t.x===e.x?r=vo.VERTICAL:t.y===e.y&&(r=vo.HORIZONTAL),r},Gc=function(t){var e=t.split(" "),r=[];return e&&e.forEach((function(t){var e=lc(t.split(","),2),n=e[0],o=e[1];r.push({x:Number(n),y:Number(o)})})),r},Yc=function(t,e,r,n){var o=[];if(Xc(t,r)===Xc(e,n))t.y===r.y?(o.push({x:r.x,y:(r.y+n.y)/2}),o.push({x:n.x,y:(r.y+n.y)/2})):(o.push({x:(r.x+n.x)/2,y:r.y}),o.push({x:(r.x+n.x)/2,y:n.y}));else{var i={x:r.x,y:n.y},u=mu(i,t,r),a=mu(i,e,n);if(u||a)i={x:n.x,y:r.y};else{var c=Vc(i,t,r),s=Vc(i,e,n);c&&s&&(i={x:n.x,y:r.y})}o.push(i)}return o},Vc=function(t,e,r){return t.x===e.x&&t.x===r.x||t.y===e.y&&t.y===r.y},Wc=function(t){if(!t)return 0;for(var e=0,r=0;r<t.length;r++){var n=t.charCodeAt(r);t.match(/[A-Z]/)?e+=1.5:e+=n>=1&&n<=126||n>=65376&&n<=65439?1:2}return e},Kc=null,$c=function(t,e){Kc||(Kc=document.createElement("canvas"));var r=Kc.getContext("2d");return r.font=e,r.measureText(t).width},Zc=function(t){var e,r=t.start,n=t.end;if(r.x===n.x&&r.y===n.y)e="";else{var o={start:r,end:n,offset:10,verticalLength:5},i=Qa(uc(uc({},o),{},{type:"start"})),u=Qa(uc(uc({},o),{},{type:"end"}));e="M".concat(i.leftX," ").concat(i.leftY," \n L").concat(i.rightX," ").concat(i.rightY," \n L").concat(u.rightX," ").concat(u.rightY,"\n L").concat(u.leftX," ").concat(u.leftY," z")}return{d:e,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}},qc=function(t){var e=t.start,r=t.end,n=t.sourceNode,o=t.targetNode,i=t.offset,u=qu(n),a=qu(o),c=gc(u,i),s=gc(a,i);return{sNext:mc(c,u,e),ePre:mc(s,a,r)}},Jc=function(t){var e=t.replace(/M/g,"").replace(/C/g,",").split(",");return[Qc(e[0]),Qc(e[1]),Qc(e[2]),Qc(e[3])]},Qc=function(t){var e=lc(t.replace(/(^\s*)/g,"").split(" "),2);return{x:+e[0],y:+e[1]}},ts=function(t,e){var r=lc(t,4);return[ec(r[0],r[1],r[2],r[3],e),t[3]]},es=function(t,e){for(var r,n=t.x,o=t.y,i=Gc(e),u=Number.MAX_SAFE_INTEGER,a=[],c=0;c<i.length;c++)a.push({start:i[c],end:i[(c+1)%i.length]});if(a.forEach((function(t){var e=t.start,i=t.end;if(e.x===i.x){var a={x:e.x,y:o};if(mu(a,e,i)){var c=Math.abs(e.x-n);c<u&&(u=c,r=a)}}else if(e.y===i.y){var s={x:n,y:e.y};if(mu(s,e,i)){var l=Math.abs(e.y-o);l<u&&(u=l,r=s)}}})),!r){var s=a[0],l=s.start,f=s.end;r={x:l.x+(f.x-l.x)/2,y:l.y+(f.y-l.y)/2}}return r},rs=function(t){return io(t,["id","type","sourceNodeId","sourceAnchorId","targetNodeId","targetAnchorId","pointsList","startPoint","endPoint","properties"])},ns=function(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))};function os(t,e){return"function"!=typeof e?function(e,r,n){return Object.assign({type:t.edgeType},n)}:function(r,n,o){var i=e(r,n,o);return i?"string"==typeof i?Object.assign({},o,{type:i}):Object.assign({type:i},o):{type:t.edgeType}}}r(208);var is=function(){};function us(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function as(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var cs=function(){function t(e){var r=this,n=e.onDragStart,o=void 0===n?is:n,i=e.onDragging,u=void 0===i?is:i,a=e.onDragEnd,c=void 0===a?is:a,s=e.eventType,l=void 0===s?"":s,f=e.eventCenter,p=void 0===f?null:f,d=e.step,h=void 0===d?1:d,y=e.isStopPropagation,v=void 0===y||y,g=e.model,b=void 0===g?null:g,m=e.data,O=void 0===m?null:m;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),as(this,"onDragStart",void 0),as(this,"onDragging",void 0),as(this,"onDragEnd",void 0),as(this,"step",void 0),as(this,"isStopPropagation",void 0),as(this,"isDragging",!1),as(this,"isStartDragging",!1),as(this,"startX",0),as(this,"startY",0),as(this,"sumDeltaX",0),as(this,"sumDeltaY",0),as(this,"eventType",void 0),as(this,"eventCenter",void 0),as(this,"model",void 0),as(this,"data",void 0),as(this,"startTime",void 0),as(this,"handleMouseDown",(function(t){var e,n,o,i=null===(e=window)||void 0===e?void 0:e.document;if(0===t.button){r.isStopPropagation&&t.stopPropagation(),r.isStartDragging=!0,r.startX=t.clientX,r.startY=t.clientY,i.addEventListener("mousemove",r.handleMouseMove,!1),i.addEventListener("mouseup",r.handleMouseUp,!1);var u=null===(n=r.model)||void 0===n?void 0:n.getData();null===(o=r.eventCenter)||void 0===o||o.emit(yo["".concat(r.eventType,"_MOUSEDOWN")],{e:t,data:r.data||u}),r.startTime=(new Date).getTime()}})),as(this,"handleMouseMove",(function(t){if(r.isStopPropagation&&t.stopPropagation(),r.isStartDragging&&(r.sumDeltaX+=t.clientX-r.startX,r.sumDeltaY+=t.clientY-r.startY,r.startX=t.clientX,r.startY=t.clientY,r.step<=1||Math.abs(r.sumDeltaX)>r.step||Math.abs(r.sumDeltaY)>r.step)){var e,n=r.sumDeltaX%r.step,o=r.sumDeltaY%r.step,i=r.sumDeltaX-n,u=r.sumDeltaY-o;r.sumDeltaX=n,r.sumDeltaY=o;var a,c=null===(e=r.model)||void 0===e?void 0:e.getData();if(!r.isDragging)null===(a=r.eventCenter)||void 0===a||a.emit(yo["".concat(r.eventType,"_DRAGSTART")],{e:t,data:r.data||c}),r.onDragStart({event:t});r.isDragging=!0,Promise.resolve().then((function(){var e,n;r.onDragging({deltaX:i,deltaY:u,event:t}),null===(e=r.eventCenter)||void 0===e||e.emit(yo["".concat(r.eventType,"_MOUSEMOVE")],{e:t,data:r.data||c}),null===(n=r.eventCenter)||void 0===n||n.emit(yo["".concat(r.eventType,"_DRAG")],{e:t,data:r.data||c})}))}})),as(this,"handleMouseUp",(function(t){var e=window.document;r.isStartDragging=!1,r.isStopPropagation&&t.stopPropagation(),Promise.resolve().then((function(){var n,o,i;e.removeEventListener("mousemove",r.handleMouseMove,!1),e.removeEventListener("mouseup",r.handleMouseUp,!1);var u=null===(n=r.model)||void 0===n?void 0:n.getData();null===(o=r.eventCenter)||void 0===o||o.emit(yo["".concat(r.eventType,"_MOUSEUP")],{e:t,data:r.data||u}),r.isDragging&&(r.isDragging=!1,r.onDragEnd({event:t}),null===(i=r.eventCenter)||void 0===i||i.emit(yo["".concat(r.eventType,"_DROP")],{e:t,data:r.data||u}))}))})),as(this,"cancelDrag",(function(){var t,e=null===(t=window)||void 0===t?void 0:t.document;e.removeEventListener("mousemove",r.handleMouseMove,!1),e.removeEventListener("mouseup",r.handleMouseUp,!1),r.onDragEnd({event:null}),r.isDragging=!1})),this.onDragStart=o,this.onDragging=u,this.onDragEnd=c,this.step=h,this.isStopPropagation=v,this.eventType=l,this.eventCenter=p,this.model=b,this.data=O}var e,r,n;return e=t,(r=[{key:"setStep",value:function(t){this.step=t}},{key:"setModel",value:function(t){this.model=t}}])&&us(e.prototype,r),n&&us(e,n),t}();function ss(t){return ss="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ss(t)}function ls(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fs(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ps(t,e,r){return e&&fs(t.prototype,e),r&&fs(t,r),t}function ds(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Os(t,e)}function hs(t){var e=ms();return function(){var r,n=_s(t);if(e){var o=_s(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ys(this,r)}}function ys(t,e){if(e&&("object"===ss(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return vs(t)}function vs(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function gs(t){var e="function"==typeof Map?new Map:void 0;return gs=function(t){if(null===t||(r=t,-1===Function.toString.call(r).indexOf("[native code]")))return t;var r;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return bs(t,arguments,_s(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Os(n,t)},gs(t)}function bs(t,e,r){return bs=ms()?Reflect.construct:function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&Os(o,r.prototype),o},bs.apply(null,arguments)}function ms(){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(t){return!1}}function Os(t,e){return Os=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Os(t,e)}function _s(t){return _s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},_s(t)}function ws(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function js(t,e){return!!(t instanceof Es&&e instanceof Es)}var xs=function(t){ds(r,t);var e=hs(r);function r(t,n,o){var i;return ls(this,r),ws(vs(i=e.call(this,3)),"x",void 0),ws(vs(i),"y",void 0),ws(vs(i),"z",void 0),i[0]=t,i[1]=n,i[2]=o,i.x=t,i.y=n,i.z=o,Object.setPrototypeOf(vs(i),r.prototype),i}return ps(r,[{key:"add",value:function(t){if(js(this,t))return new Es(this.x+t.x,this.y+t.y);var e=this.z+t.z;return new Ss((this.x+t.x)/e,(this.y+t.y)/e)}},{key:"subtract",value:function(t){if(js(this,t))return new Es(this.x-t.x,this.y-t.y);var e=this.z-t.z;return 0===e?new Es(this.x-t.x,this.y-t.y):new Ss((this.x-t.x)/e,(this.y-t.y)/e)}}]),r}(gs(Array)),Es=function(t){ds(r,t);var e=hs(r);function r(t,n,o){var i;return ls(this,r),i=e.call(this,t,n,null!=o?o:0),Object.setPrototypeOf(vs(i),r.prototype),i}return ps(r,[{key:"toString",value:function(){return"Vector"}},{key:"dot",value:function(t){var e=this;return t.reduce((function(t,r,n){return t+r*e[n]}))}},{key:"cross",value:function(t){return new r(this.y*t.z-this.z*t.y,this.z*t.x-this.x*t.z,this.x*t.y-this.y*t.x)}},{key:"getLength",value:function(){return Math.hypot(this.x,this.y)}},{key:"normalize",value:function(){var t=this.getLength();return new r(this.x/t,this.y/t)}},{key:"crossZ",value:function(t){return this.x*t.y-this.y*t.x}},{key:"angle",value:function(t){var e=this.crossZ(t),r=Math.acos(this.normalize().dot(t.normalize()));return e>=0?r:-r}}]),r}(xs),Ss=function(t){ds(r,t);var e=hs(r);function r(t,n){var o;return ls(this,r),o=e.call(this,t,n,1),Object.setPrototypeOf(vs(o),r.prototype),o}return ps(r,[{key:"toString",value:function(){return"Point"}}]),r}(xs);r(67),r(218);function Ps(t){return Ps="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ps(t)}function As(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||Ds(t,e)||function(){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 ks(t){return function(t){if(Array.isArray(t))return Ts(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Ds(t)||function(){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 Ds(t,e){if(t){if("string"==typeof t)return Ts(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ts(t,e):void 0}}function Ts(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Ms(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ns(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Cs(t,e,r){return e&&Ns(t.prototype,e),r&&Ns(t,r),t}function Rs(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Hs(t,e)}function Is(t){var e=Fs();return function(){var r,n=Xs(t);if(e){var o=Xs(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ls(this,r)}}function Ls(t,e){if(e&&("object"===Ps(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return zs(t)}function zs(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Bs(t){var e="function"==typeof Map?new Map:void 0;return Bs=function(t){if(null===t||(r=t,-1===Function.toString.call(r).indexOf("[native code]")))return t;var r;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return Us(t,arguments,Xs(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Hs(n,t)},Bs(t)}function Us(t,e,r){return Us=Fs()?Reflect.construct:function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&Hs(o,r.prototype),o},Us.apply(null,arguments)}function Fs(){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(t){return!1}}function Hs(t,e){return Hs=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Hs(t,e)}function Xs(t){return Xs=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Xs(t)}function Gs(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Ys,Vs,Ws,Ks,$s,Zs,qs,Js,Qs,tl,el,rl,nl,ol=function(t){Rs(r,t);var e=Is(r);function r(){var t;Ms(this,r);for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return Gs(zs(t=e.call(this,o.length)),"rows",void 0),Gs(zs(t),"columns",void 0),t.fill(new Array(3)),o.forEach((function(e,r){t[r]=e})),t.columns=o[0].length,t.rows=o.length,Object.setPrototypeOf(zs(t),r.prototype),t}return Cs(r,[{key:"getRow",value:function(t){return this[t]}},{key:"getColumn",value:function(t){return ks(this.map((function(e){return e[t]})))}},{key:"transpose",value:function(){for(var t=[],e=0;e<this.columns;e++)t.push(this.getColumn(e));return Us(r,t)}},{key:"cross",value:function(t){var e=new Array(this.rows).fill("").map((function(){return[]}));if(this.columns===t.rows)for(var n=0;n<this.rows;n++)for(var o=this.getRow(n),i=function(r){var i=t.getColumn(r);e[n][r]=o.reduce((function(t,e,r){return t+e*i[r]}),0)},u=0;u<t.columns;u++)i(u);return Us(r,ks(e))}},{key:"to2D",value:function(){return this.map((function(t){return[t[0],t[1]]}))}},{key:"toPoints",value:function(){return this.map((function(t){return new Ss(t[0],t[1])}))}},{key:"toString",value:function(){var t=As(this[0],2),e=t[0],r=t[1],n=As(this[1],2),o=n[0],i=n[1],u=As(this[2],2),a=u[0],c=u[1];return"matrix(".concat(e," ").concat(r," ").concat(o," ").concat(i," ").concat(a," ").concat(c,")")}},{key:"translate",value:function(t,e){return this.cross(new al(t,e))}},{key:"rotate",value:function(t){return this.cross(new il(t))}},{key:"scale",value:function(t,e){return this.cross(new ul(t,e))}}]),r}(Bs(Array)),il=function(t){Rs(r,t);var e=Is(r);function r(t){var n;return Ms(this,r),n=e.call(this,new Es(+Math.cos(t).toFixed(2),+Math.sin(t).toFixed(2),0),new Es(-Math.sin(t).toFixed(2),+Math.cos(t).toFixed(2),0),new Es(0,0,1)),Object.setPrototypeOf(zs(n),r.prototype),n}return Cs(r,[{key:"inverse",value:function(){return this.transpose()}}]),r}(ol),ul=function(t){Rs(r,t);var e=Is(r);function r(t,n){var o;return Ms(this,r),Gs(zs(o=e.call(this,new Es(t,0,0),new Es(0,n,0),new Es(0,0,1))),"sx",void 0),Gs(zs(o),"sy",void 0),o.sx=t,o.sy=n,Object.setPrototypeOf(zs(o),r.prototype),o}return Cs(r,[{key:"inverse",value:function(){return new r(1/this.sx,1/this.sy)}}]),r}(ol),al=function(t){Rs(r,t);var e=Is(r);function r(t,n){var o;return Ms(this,r),Gs(zs(o=e.call(this,new Es(1,0,0),new Es(0,1,0),new Es(t,n,1))),"tx",void 0),Gs(zs(o),"ty",void 0),o.tx=t,o.ty=n,Object.setPrototypeOf(zs(o),r.prototype),o}return Cs(r,[{key:"inverse",value:function(){return new r(-this.tx,-this.ty)}}]),r}(ol),cl={node:!1,edge:!1},sl={node:!0,edge:!0};function ll(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function fl(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ll(Object(r),!0).forEach((function(e){ml(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ll(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function pl(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||hl(t,e)||function(){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 dl(t){return function(t){if(Array.isArray(t))return yl(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||hl(t)||function(){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 hl(t,e){if(t){if("string"==typeof t)return yl(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?yl(t,e):void 0}}function yl(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function vl(t){return vl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vl(t)}function gl(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function bl(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ml(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ol(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var _l,wl=200,jl=(Ys=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),ml(this,"rootEl",void 0),gl(this,"width",Vs,this),gl(this,"height",Ws,this),ml(this,"theme",void 0),ml(this,"eventCenter",void 0),ml(this,"modelMap",new Map),ml(this,"topElement",void 0),ml(this,"animation",void 0),ml(this,"idGenerator",void 0),ml(this,"edgeGenerator",void 0),ml(this,"nodeMoveRules",[]),ml(this,"customTrajectory",void 0),gl(this,"edgeType",Ks,this),gl(this,"nodes",$s,this),gl(this,"edges",Zs,this),gl(this,"overlapMode",qs,this),gl(this,"background",Js,this),gl(this,"transformModel",Qs,this),gl(this,"editConfigModel",tl,this),gl(this,"gridSize",el,this),gl(this,"partial",rl,this),gl(this,"fakerNode",nl,this);var r,n=e.container,o=e.background,i=void 0===o?{}:o,u=e.grid,a=e.idGenerator,c=e.edgeGenerator,s=e.animation,l=e.customTrajectory;this.background=i,"object"===vl(u)&&(this.gridSize=u.size),this.rootEl=n,this.editConfigModel=new mo(e),this.eventCenter=new Bi,this.transformModel=new Io(this.eventCenter,e),this.theme=Li(e.style),this.edgeType=e.edgeType||"polyline",this.width=e.width,this.height=e.height,this.animation=(r=s)&&"boolean"!=typeof r?Ri(wi(cl),r):wi(!0===r?sl:cl),this.partial=e.partial,this.overlapMode=e.overlapMode||0,this.idGenerator=a,this.customTrajectory=l,this.edgeGenerator=os(this,c),this.width=e.width||this.rootEl.getBoundingClientRect().width,this.height=e.height||this.rootEl.getBoundingClientRect().height,this.flowId=gu()}var e,r,n;return e=t,r=[{key:"nodesMap",get:function(){return this.nodes.reduce((function(t,e,r){return t[e.id]={index:r,model:e},t}),{})}},{key:"edgesMap",get:function(){return this.edges.reduce((function(t,e,r){return t[e.id]={index:r,model:e},t}),{})}},{key:"modelsMap",get:function(){return[].concat(dl(this.nodes),dl(this.edges)).reduce((function(t,e){return t[e.id]=e,t}),{})}},{key:"sortElements",get:function(){var t=[];this.nodes.forEach((function(e){return t.push(e)})),this.edges.forEach((function(e){return t.push(e)})),t=t.sort((function(t,e){return t.zIndex-e.zIndex}));for(var e=[],r=[-200,-200],n=[this.width+wl,this.height+wl],o=0;o<t.length;o++){var i=t[o];i.visible&&(!this.partial||i.isSelected||this.isElementInArea(i,r,n,!1,!1))&&e.push(i)}return e}},{key:"textEditElement",get:function(){var t=this.nodes.find((function(t){return t.state===lo.TEXT_EDIT})),e=this.edges.find((function(t){return t.state===lo.TEXT_EDIT}));return t||e}},{key:"selectElements",get:function(){var t=new Map;return this.nodes.forEach((function(e){e.isSelected&&t.set(e.id,e)})),this.edges.forEach((function(e){e.isSelected&&t.set(e.id,e)})),t}},{key:"selectNodes",get:function(){var t=[];return this.nodes.forEach((function(e){e.isSelected&&t.push(e)})),t}},{key:"getAreaElement",value:function(t,e){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i=[],u=[];this.nodes.forEach((function(t){return u.push(t)})),this.edges.forEach((function(t){return u.push(t)}));for(var a=0;a<u.length;a++){var c=u[a];o&&!c.visible||!this.isElementInArea(c,t,e,r,n)||i.push(c)}return i}},{key:"getModel",value:function(t){return this.modelMap.get(t)}},{key:"getNodeModelById",value:function(t){var e;return this.fakerNode&&t===this.fakerNode.id?this.fakerNode:null===(e=this.nodesMap[t])||void 0===e?void 0:e.model}},{key:"getPointByClient",value:function(t){var e=t.x,r=t.y,n=this.rootEl.getBoundingClientRect(),o={x:e-n.left,y:r-n.top},i=pl(this.transformModel.HtmlPointToCanvasPoint([o.x,o.y]),2);return{domOverlayPosition:o,canvasOverlayPosition:{x:i[0],y:i[1]}}}},{key:"isElementInArea",value:function(t,e,r){var n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];if(t.BaseType===ho.NODE){for(var i=qu(t=t),u=i.minX,a=i.minY,c=i.maxX,s=i.maxY,l=[{x:u,y:a},{x:c,y:a},{x:c,y:s},{x:u,y:s}],f=o,p=0;p<l.length;p++){var d=l[p],h=d.x,y=d.y,v=this.transformModel.CanvasPointToHtmlPoint([h,y]),g=pl(v,2);if(h=g[0],y=g[1],Gi([h,y],e,r)!==o){f=!o;break}}return f}if(t.BaseType===ho.EDGE){var b=t=t,m=b.startPoint,O=b.endPoint,_=this.transformModel.CanvasPointToHtmlPoint([m.x,m.y]),w=this.transformModel.CanvasPointToHtmlPoint([O.x,O.y]),j=Gi(_,e,r),x=Gi(w,e,r);return n?j&&x:j||x}return!1}},{key:"graphDataToModel",value:function(t){var e=this;if(this.width&&this.height||this.resize(),!t)return this.nodes=[],void(this.edges=[]);t.nodes?this.nodes=hn(t.nodes,(function(t){var r=e.getModel(t.type);if(!r)throw new Error("找不到".concat(t.type,"对应的节点。"));var n=t.x,o=t.y;return n&&o&&(t.x=Ui(n,e.gridSize),t.y=Ui(o,e.gridSize),"object"===vl(t.text)&&(t.text.x-=Fi(n,e.gridSize),t.text.y-=Fi(o,e.gridSize))),new r(t,e)})):this.nodes=[],t.edges?this.edges=hn(t.edges,(function(t){var r=e.getModel(t.type);if(!r)throw new Error("找不到".concat(t.type,"对应的边。"));return new r(t,e)})):this.edges=[]}},{key:"modelToGraphData",value:function(){var t=[];this.edges.forEach((function(e){var r=e.getData();r&&!e.virtual&&t.push(r)}));var e=[];return this.nodes.forEach((function(t){var r=t.getData();r&&!t.virtual&&e.push(r)})),{nodes:e,edges:t}}},{key:"modelToHistoryData",value:function(){for(var t=!1,e=[],r=0;r<this.nodes.length;r++){var n=this.nodes[r];if(n.isDragging){t=!0;break}e.push(n.getHistoryData())}if(t)return!1;for(var o=!1,i=[],u=0;u<this.edges.length;u++){var a=this.edges[u];if(a.isDragging){o=!0;break}i.push(a.getHistoryData())}return!o&&{nodes:e,edges:i}}},{key:"getEdgeModelById",value:function(t){var e;return null===(e=this.edgesMap[t])||void 0===e?void 0:e.model}},{key:"getElement",value:function(t){return this.modelsMap[t]}},{key:"getNodeEdges",value:function(t){for(var e=[],r=0;r<this.edges.length;r++){var n=this.edges[r],o=this.edges[r].sourceNodeId===t,i=this.edges[r].targetNodeId===t;(o||i)&&e.push(n)}return e}},{key:"getSelectElements",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=this.selectElements,r={nodes:[],edges:[]};return e.forEach((function(n){if(n.BaseType===ho.NODE&&r.nodes.push(n.getData()),n.BaseType===ho.EDGE){var o=n.getData(),i=e.get(o.sourceNodeId)&&e.get(o.targetNodeId);(t||i)&&r.edges.push(o)}})),r}},{key:"updateAttributes",value:function(t,e){this.getElement(t).updateAttributes(e)}},{key:"changeNodeId",value:function(t,e){return e||(e=gu()),this.nodesMap[e]?"":this.nodesMap[t]?(this.edges.forEach((function(r){r.sourceNodeId===t&&(r.sourceNodeId=e),r.targetNodeId===t&&(r.targetNodeId=e)})),this.nodesMap[t].model.id=e,this.nodesMap[e]=this.nodesMap[t],e):""}},{key:"changeEdgeId",value:function(t,e){return e||(e=gu()),this.edgesMap[e]?"":this.edgesMap[t]?(this.edges.forEach((function(r){r.id===t&&r.changeEdgeId(e)})),e):""}},{key:"setFakerNode",value:function(t){this.fakerNode=t}},{key:"removeFakerNode",value:function(){this.fakerNode=null}},{key:"setModel",value:function(t,e){return this.modelMap.set(t,e)}},{key:"toFront",value:function(t){var e,r,n,o=(null===(e=this.nodesMap[t])||void 0===e?void 0:e.model)||(null===(r=this.edgesMap[t])||void 0===r?void 0:r.model);o&&(this.overlapMode===Oo.DEFAULT&&(null===(n=this.topElement)||void 0===n||n.setZIndex(),o.setZIndex(9999),this.topElement=o),this.overlapMode===Oo.INCREASE&&this.setElementZIndex(t,"top"))}},{key:"setElementZIndex",value:function(t,e){var r,n,o,i=(null===(r=this.nodesMap[t])||void 0===r?void 0:r.model)||(null===(n=this.edgesMap[t])||void 0===n?void 0:n.model);i&&("number"==typeof e&&(o=e),"top"===e&&(o=la()),"bottom"===e&&(o=--sa),i.setZIndex(o))}},{key:"deleteNode",value:function(t){var e=this.nodesMap[t].model.getData();this.deleteEdgeBySource(t),this.deleteEdgeByTarget(t),this.nodes.splice(this.nodesMap[t].index,1),this.eventCenter.emit(yo.NODE_DELETE,{data:e})}},{key:"addNode",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yo.NODE_ADD,r=arguments.length>2?arguments[2]:void 0,n=aa(t);n.id&&this.nodesMap[t.id]&&delete n.id;var o=this.getModel(n.type);if(!o)throw new Error("找不到".concat(n.type,"对应的节点,请确认是否已注册此类型节点。"));n.x=Ui(n.x,this.gridSize),n.y=Ui(n.y,this.gridSize);var i=new o(n,this);this.nodes.push(i);var u=i.getData(),a={data:u};return r&&(a.e=r),this.eventCenter.emit(e,a),i}},{key:"cloneNode",value:function(t){var e=this.getNodeModelById(t),r=e.getData();r.x+=30,r.y+=30,delete r.id,r.text&&(r.text.x+=30,r.text.y+=30);var n=this.addNode(r);return n.setSelected(!0),e.setSelected(!1),n.getData()}},{key:"moveNode",value:function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=this.nodesMap[t];if(o){var i=o.model,u=i.getMoveDistance(e,r,n),a=pl(u,2);e=a[0],r=a[1],this.moveEdge(t,e,r)}}},{key:"moveNode2Coordinate",value:function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=this.nodesMap[t];if(o){var i=o.model,u=i.x,a=i.y,c=e-u,s=r-a;this.moveNode(t,c,s,n)}}},{key:"editText",value:function(t){this.setElementStateById(t,lo.TEXT_EDIT)}},{key:"addEdge",value:function(t){var e=aa(t),r=e.type;r||(r=this.edgeType),e.id&&this.edgesMap[e.id]&&delete e.id;var n=this.getModel(r);if(!n)throw new Error("找不到".concat(r,"对应的边,请确认是否已注册此类型边。"));var o=new n(fl(fl({},e),{},{type:r}),this),i=o.getData();return this.edges.push(o),this.eventCenter.emit(yo.EDGE_ADD,{data:i}),o}},{key:"moveEdge",value:function(t,e,r){for(var n=0;n<this.edges.length;n++){var o=this.edges[n],i=o.textPosition,u=i.x,a=i.y,c=this.edges[n].sourceNodeId===t,s=this.edges[n].targetNodeId===t;c&&o.moveStartPoint(e,r),s&&o.moveEndPoint(e,r),(c||s)&&this.handleEdgeTextMove(o,u,a)}}},{key:"handleEdgeTextMove",value:function(t,e,r){var n;if(!0===t.customTextPosition)t.resetTextPosition();else if(t.modelType===po.POLYLINE_EDGE&&null!==(n=t.text)&&void 0!==n&&n.value){var o=t.text,i=es(o,t.points);t.moveText(i.x-o.x,i.y-o.y)}else{var u=t.textPosition,a=u.x,c=u.y;t.moveText(a-e,c-r)}}},{key:"deleteEdgeBySourceAndTarget",value:function(t,e){for(var r=0;r<this.edges.length;r++)if(this.edges[r].sourceNodeId===t&&this.edges[r].targetNodeId===e){var n=this.edges[r].getData();this.edges.splice(r,1),r--,this.eventCenter.emit(yo.EDGE_DELETE,{data:n})}}},{key:"deleteEdgeById",value:function(t){if(this.edgesMap[t]){var e=this.edgesMap[t].index,r=this.edgesMap[t].model.getData();this.edges.splice(e,1),this.eventCenter.emit(yo.EDGE_DELETE,{data:r})}}},{key:"deleteEdgeBySource",value:function(t){for(var e=0;e<this.edges.length;e++)if(this.edges[e].sourceNodeId===t){var r=this.edges[e].getData();this.edges.splice(e,1),e--,this.eventCenter.emit(yo.EDGE_DELETE,{data:r})}}},{key:"deleteEdgeByTarget",value:function(t){for(var e=0;e<this.edges.length;e++)if(this.edges[e].targetNodeId===t){var r=this.edges[e].getData();this.edges.splice(e,1),e--,this.eventCenter.emit(yo.EDGE_DELETE,{data:r})}}},{key:"setElementStateById",value:function(t,e,r){this.nodes.forEach((function(n){n.id===t?n.setElementState(e,r):n.setElementState(lo.DEFAULT)})),this.edges.forEach((function(n){n.id===t?n.setElementState(e,r):n.setElementState(lo.DEFAULT)}))}},{key:"updateText",value:function(t,e){this.nodes.forEach((function(r){r.id===t&&r.updateText(e)})),this.edges.forEach((function(r){r.id===t&&r.updateText(e)}))}},{key:"selectNodeById",value:function(t){var e,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];r||this.clearSelectElements();var n=null===(e=this.nodesMap[t])||void 0===e?void 0:e.model;null==n||n.setSelected(!0)}},{key:"selectEdgeById",value:function(t){var e,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];r||this.clearSelectElements();var n=null===(e=this.edgesMap[t])||void 0===e?void 0:e.model;null==n||n.setSelected(!0)}},{key:"selectElementById",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e||this.clearSelectElements();var r=this.getElement(t);null==r||r.setSelected(!0)}},{key:"clearSelectElements",value:function(){var t;this.selectElements.forEach((function(t){null==t||t.setSelected(!1)})),this.selectElements.clear(),this.overlapMode===Oo.DEFAULT&&(null===(t=this.topElement)||void 0===t||t.setZIndex())}},{key:"moveNodes",value:function(t,e,r){for(var n=this,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=t.reduce((function(t,i){var u=n.nodesMap[i].model.getMoveDistance(e,r,o);return t[i]=u,t}),{}),u=0;u<this.edges.length;u++){var a=this.edges[u],c=a.textPosition,s=c.x,l=c.y,f=i[a.sourceNodeId],p=i[a.targetNodeId],d=void 0,h=void 0;if(f&&p&&a.modelType===po.POLYLINE_EDGE){var y=pl(f,2);d=y[0],h=y[1],a.updatePointsList(d,h)}else{if(f){var v=pl(f,2);d=v[0],h=v[1],a.moveStartPoint(d,h)}if(p){var g=pl(p,2);d=g[0],h=g[1],a.moveEndPoint(d,h)}}(f||p)&&this.handleEdgeTextMove(a,s,l)}}},{key:"addNodeMoveRules",value:function(t){this.nodeMoveRules.includes(t)||this.nodeMoveRules.push(t)}},{key:"setDefaultEdgeType",value:function(t){this.edgeType=t}},{key:"changeNodeType",value:function(t,e){var r=this.getNodeModelById(t);if(r){var n=r.getData();n.type=e;var o=this.getModel(e);if(!o)throw new Error("找不到".concat(e,"对应的节点,请确认是否已注册此类型节点。"));var i=new o(n,this);this.nodes.splice(this.nodesMap[t].index,1,i),this.getNodeEdges(t).forEach((function(e){if(e.sourceNodeId===t){var r=na(i,e.startPoint,i.width,i.height);e.updateStartPoint(r)}if(e.targetNodeId===t){var n=na(i,e.endPoint,i.width,i.height);e.updateEndPoint(n)}}))}}},{key:"changeEdgeType",value:function(t,e){var r=this.getEdgeModelById(t);if(r&&r.type!==e){var n=r.getData();n.type=e;var o=this.getModel(e);if(!o)throw new Error("找不到".concat(e,"对应的节点,请确认是否已注册此类型节点。"));delete n.pointsList;var i=new o(n,this);this.edges.splice(this.edgesMap[t].index,1,i)}}},{key:"getNodeIncomingEdge",value:function(t){var e=[];return this.edges.forEach((function(r){r.targetNodeId===t&&e.push(r)})),e}},{key:"getNodeOutgoingEdge",value:function(t){var e=[];return this.edges.forEach((function(r){r.sourceNodeId===t&&e.push(r)})),e}},{key:"getAnchorIncomingEdge",value:function(t){var e=[];return this.edges.forEach((function(r){r.targetAnchorId===t&&e.push(r)})),e}},{key:"getAnchorOutcomingEdge",value:function(t){var e=[];return this.edges.forEach((function(r){r.sourceAnchorId===t&&e.push(r)})),e}},{key:"getNodeIncomingNode",value:function(t){var e=this,r=[];return this.edges.forEach((function(n){n.targetNodeId===t&&r.push(e.nodesMap[n.sourceNodeId].model)})),r}},{key:"getNodeOutgoingNode",value:function(t){var e=this,r=[];return this.edges.forEach((function(n){n.sourceNodeId===t&&r.push(e.nodesMap[n.targetNodeId].model)})),r}},{key:"setTheme",value:function(t){this.theme=Li(fl(fl({},this.theme),t))}},{key:"resize",value:function(t,e){this.width=t||this.rootEl.getBoundingClientRect().width,this.height=e||this.rootEl.getBoundingClientRect().height,!this.width||this.height}},{key:"clearData",value:function(){this.nodes=[],this.edges=[]}},{key:"getVirtualRectSize",value:function(){var t=this.nodes,e=[],r=[];t.forEach((function(t){var n=t.x,o=t.y,i=t.width,u=t.height,a=t.getNodeStyle().strokeWidth,c=void 0===a?0:a,s=n+i/2+c,l=n-i/2-c,f=o+u/2+c,p=o-u/2-c;e=e.concat([s,l].filter((function(t){return!Number.isNaN(t)}))),r=r.concat([f,p].filter((function(t){return!Number.isNaN(t)})))}));var n=Math.min.apply(Math,dl(e)),o=Math.max.apply(Math,dl(e)),i=Math.min.apply(Math,dl(r)),u=o-n||0,a=Math.max.apply(Math,dl(r))-i||0;return{virtualRectWidth:u,virtualRectHeight:a,virtualRectCenterPositionX:n+u/2,virtualRectCenterPositionY:i+a/2}}},{key:"translateCenter",value:function(){var t=this.nodes,e=this.width,r=this.height,n=this.rootEl,o=this.transformModel;if(t.length){var i=e||n.clientWidth,u=r||n.clientHeight,a=this.getVirtualRectSize(),c=a.virtualRectCenterPositionX,s=a.virtualRectCenterPositionY;o.focusOn(c,s,i,u)}}},{key:"fitView",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,r=this.nodes,n=this.width,o=this.height,i=this.rootEl,u=this.transformModel;if(r.length){var a=n||i.clientWidth,c=o||i.clientHeight,s=this.getVirtualRectSize(),l=s.virtualRectWidth,f=s.virtualRectHeight,p=s.virtualRectCenterPositionX,d=s.virtualRectCenterPositionY,h=(l+e)/a,y=(f+t)/c,v=0;v=1/Math.max(h,y);var g=[a/2,c/2];u.zoom(v,g),u.focusOn(p,d,a,c)}}},{key:"openEdgeAnimation",value:function(t){this.getEdgeModelById(t).openEdgeAnimation()}},{key:"closeEdgeAnimation",value:function(t){this.getEdgeModelById(t).closeEdgeAnimation()}}],r&&bl(e.prototype,r),n&&bl(e,n),t}(),Vs=Ol(Ys.prototype,"width",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Ws=Ol(Ys.prototype,"height",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Ks=Ol(Ys.prototype,"edgeType",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),$s=Ol(Ys.prototype,"nodes",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Zs=Ol(Ys.prototype,"edges",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),qs=Ol(Ys.prototype,"overlapMode",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Oo.DEFAULT}}),Js=Ol(Ys.prototype,"background",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Qs=Ol(Ys.prototype,"transformModel",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),tl=Ol(Ys.prototype,"editConfigModel",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),el=Ol(Ys.prototype,"gridSize",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),rl=Ol(Ys.prototype,"partial",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),nl=Ol(Ys.prototype,"fakerNode",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Ol(Ys.prototype,"nodesMap",[o.m],Object.getOwnPropertyDescriptor(Ys.prototype,"nodesMap"),Ys.prototype),Ol(Ys.prototype,"edgesMap",[o.m],Object.getOwnPropertyDescriptor(Ys.prototype,"edgesMap"),Ys.prototype),Ol(Ys.prototype,"modelsMap",[o.m],Object.getOwnPropertyDescriptor(Ys.prototype,"modelsMap"),Ys.prototype),Ol(Ys.prototype,"sortElements",[o.m],Object.getOwnPropertyDescriptor(Ys.prototype,"sortElements"),Ys.prototype),Ol(Ys.prototype,"textEditElement",[o.m],Object.getOwnPropertyDescriptor(Ys.prototype,"textEditElement"),Ys.prototype),Ol(Ys.prototype,"selectElements",[o.m],Object.getOwnPropertyDescriptor(Ys.prototype,"selectElements"),Ys.prototype),Ol(Ys.prototype,"selectNodes",[o.m],Object.getOwnPropertyDescriptor(Ys.prototype,"selectNodes"),Ys.prototype),Ol(Ys.prototype,"setFakerNode",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"setFakerNode"),Ys.prototype),Ol(Ys.prototype,"removeFakerNode",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"removeFakerNode"),Ys.prototype),Ol(Ys.prototype,"setModel",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"setModel"),Ys.prototype),Ol(Ys.prototype,"toFront",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"toFront"),Ys.prototype),Ol(Ys.prototype,"setElementZIndex",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"setElementZIndex"),Ys.prototype),Ol(Ys.prototype,"deleteNode",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"deleteNode"),Ys.prototype),Ol(Ys.prototype,"addNode",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"addNode"),Ys.prototype),Ol(Ys.prototype,"cloneNode",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"cloneNode"),Ys.prototype),Ol(Ys.prototype,"moveNode",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"moveNode"),Ys.prototype),Ol(Ys.prototype,"moveNode2Coordinate",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"moveNode2Coordinate"),Ys.prototype),Ol(Ys.prototype,"editText",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"editText"),Ys.prototype),Ol(Ys.prototype,"addEdge",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"addEdge"),Ys.prototype),Ol(Ys.prototype,"moveEdge",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"moveEdge"),Ys.prototype),Ol(Ys.prototype,"deleteEdgeBySourceAndTarget",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"deleteEdgeBySourceAndTarget"),Ys.prototype),Ol(Ys.prototype,"deleteEdgeById",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"deleteEdgeById"),Ys.prototype),Ol(Ys.prototype,"deleteEdgeBySource",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"deleteEdgeBySource"),Ys.prototype),Ol(Ys.prototype,"deleteEdgeByTarget",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"deleteEdgeByTarget"),Ys.prototype),Ol(Ys.prototype,"setElementStateById",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"setElementStateById"),Ys.prototype),Ol(Ys.prototype,"updateText",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"updateText"),Ys.prototype),Ol(Ys.prototype,"selectNodeById",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"selectNodeById"),Ys.prototype),Ol(Ys.prototype,"selectEdgeById",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"selectEdgeById"),Ys.prototype),Ol(Ys.prototype,"selectElementById",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"selectElementById"),Ys.prototype),Ol(Ys.prototype,"clearSelectElements",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"clearSelectElements"),Ys.prototype),Ol(Ys.prototype,"moveNodes",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"moveNodes"),Ys.prototype),Ol(Ys.prototype,"setDefaultEdgeType",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"setDefaultEdgeType"),Ys.prototype),Ol(Ys.prototype,"changeNodeType",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"changeNodeType"),Ys.prototype),Ol(Ys.prototype,"changeEdgeType",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"changeEdgeType"),Ys.prototype),Ol(Ys.prototype,"getNodeIncomingEdge",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"getNodeIncomingEdge"),Ys.prototype),Ol(Ys.prototype,"getNodeOutgoingEdge",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"getNodeOutgoingEdge"),Ys.prototype),Ol(Ys.prototype,"getAnchorIncomingEdge",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"getAnchorIncomingEdge"),Ys.prototype),Ol(Ys.prototype,"getAnchorOutcomingEdge",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"getAnchorOutcomingEdge"),Ys.prototype),Ol(Ys.prototype,"getNodeIncomingNode",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"getNodeIncomingNode"),Ys.prototype),Ol(Ys.prototype,"getNodeOutgoingNode",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"getNodeOutgoingNode"),Ys.prototype),Ol(Ys.prototype,"setTheme",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"setTheme"),Ys.prototype),Ol(Ys.prototype,"resize",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"resize"),Ys.prototype),Ol(Ys.prototype,"clearData",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"clearData"),Ys.prototype),Ol(Ys.prototype,"translateCenter",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"translateCenter"),Ys.prototype),Ol(Ys.prototype,"fitView",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"fitView"),Ys.prototype),Ol(Ys.prototype,"openEdgeAnimation",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"openEdgeAnimation"),Ys.prototype),Ol(Ys.prototype,"closeEdgeAnimation",[o.k],Object.getOwnPropertyDescriptor(Ys.prototype,"closeEdgeAnimation"),Ys.prototype),Ys),xl=jl;function El(t){return El="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},El(t)}function Sl(){return Sl=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Sl.apply(this,arguments)}function Pl(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Al(t,e){return Al=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Al(t,e)}function kl(t){var e=function(){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(t){return!1}}();return function(){var r,n=Ml(t);if(e){var o=Ml(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Dl(this,r)}}function Dl(t,e){if(e&&("object"===El(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Tl(t)}function Tl(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ml(t){return Ml=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ml(t)}function Nl(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Cl,Rl=T_(_l=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Al(t,e)}(i,t);var e,r,n,o=kl(i);function i(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),Nl(Tl(e=o.call(this)),"stepDrag",void 0),Nl(Tl(e),"stepScrollX",0),Nl(Tl(e),"stepScrollY",0),Nl(Tl(e),"onDragging",(function(t){var r=t.deltaX,n=t.deltaY;e.setState({isDragging:!0});var o=e.props.graphModel,i=o.transformModel;!0!==o.editConfigModel.stopMoveGraph&&i.translate(r,n)})),Nl(Tl(e),"onDragEnd",(function(){e.setState({isDragging:!1})})),Nl(Tl(e),"zoomHandler",(function(t){var r=e.props,n=r.graphModel,o=n.editConfigModel,i=n.transformModel,u=n.gridSize,a=r.graphModel,c=t.deltaX,s=t.deltaY;if(o.stopScrollGraph||!0===t.ctrlKey){if(!o.stopZoomGraph){t.preventDefault();var l=a.getPointByClient({x:t.clientX,y:t.clientY}).canvasOverlayPosition,f=l.x,p=l.y;i.zoom(t.deltaY<0,[f,p])}}else{if(t.preventDefault(),e.stepScrollX+=c,e.stepScrollY+=s,Math.abs(e.stepScrollX)>=u){var d=e.stepScrollX%u,h=e.stepScrollX-d;i.translate(-h*i.SCALE_X,0),e.stepScrollX=d}if(Math.abs(e.stepScrollY)>=u){var y=e.stepScrollY%u,v=e.stepScrollY-y;i.translate(0,-v*i.SCALE_Y),e.stepScrollY=y}}})),Nl(Tl(e),"clickHandler",(function(t){if("canvas-overlay"===t.target.getAttribute("name")){var r=e.props.graphModel;r.selectElements.size>0&&r.clearSelectElements(),r.eventCenter.emit(yo.BLANK_CLICK,{e:t})}})),Nl(Tl(e),"handleContextMenu",(function(t){if("canvas-overlay"===t.target.getAttribute("name")){t.preventDefault();var r=e.props.graphModel,n=r.getPointByClient({x:t.clientX,y:t.clientY});r.eventCenter.emit(yo.BLANK_CONTEXTMENU,{e:t,position:n})}})),Nl(Tl(e),"mouseDownHandler",(function(t){var r=e.props.graphModel,n=r.eventCenter,o=r.editConfigModel,i=r.transformModel.SCALE_X,u=r.gridSize,a=t.target,c=!o.adjustEdge&&!o.adjustNodePosition;("canvas-overlay"===a.getAttribute("name")||c)&&(!0!==o.stopMoveGraph?(e.stepDrag.setStep(u*i),e.stepDrag.handleMouseDown(t)):n.emit(yo.BLANK_MOUSEDOWN,{e:t}),e.clickHandler(t))}));var r=t.graphModel,n=r.gridSize,u=r.eventCenter;return e.stepDrag=new cs({onDragging:e.onDragging,onDragEnd:e.onDragEnd,step:n,eventType:"BLANK",isStopPropagation:!1,eventCenter:u,model:null}),e.state={isDragging:!1},e}return e=i,(r=[{key:"render",value:function(){var t=this.props.graphModel.transformModel.getTransformStyle().transform,e=this.props,r=e.children,n=e.dnd,o=this.state.isDragging;return Object(tt.g)("svg",Sl({xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",name:"canvas-overlay",onWheel:this.zoomHandler,onMouseDown:this.mouseDownHandler,onContextMenu:this.handleContextMenu,className:o?"lf-canvas-overlay lf-dragging":"lf-canvas-overlay lf-drag-able"},n.eventMap()),Object(tt.g)("g",{transform:t},r))}}])&&Pl(e.prototype,r),n&&Pl(e,n),i}(tt.a))||_l;function Il(t){return Il="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Il(t)}function Ll(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function zl(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Bl(t,e){return Bl=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Bl(t,e)}function Ul(t){var e=function(){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(t){return!1}}();return function(){var r,n=Hl(t);if(e){var o=Hl(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Fl(this,r)}}function Fl(t,e){if(e&&("object"===Il(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Hl(t){return Hl=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Hl(t)}var Xl=T_(Cl=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Bl(t,e)}(i,t);var e,r,n,o=Ul(i);function i(){return Ll(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"componentDidMount",value:function(){this.triggerToolRender()}},{key:"componentDidUpdate",value:function(){this.triggerToolRender()}},{key:"getTools",value:function(){var t=this.props,e=t.tool,r=t.graphModel,n=e.getTools().map((function(t){return Object(tt.g)(t,{graphModel:r,logicFlow:e.instance})}));return e.components=n,n}},{key:"triggerToolRender",value:function(){var t=this.props,e=t.tool,r=t.graphModel,n=document.querySelector("#ToolOverlay_".concat(r.flowId)),o=e.getInstance();o.components.forEach((function(t){return t(o,n)})),o.components=[]}},{key:"render",value:function(){var t=this.props.graphModel;return Object(tt.g)("div",{className:"lf-tool-overlay",id:"ToolOverlay_".concat(t.flowId)},this.getTools())}}])&&zl(e.prototype,r),n&&zl(e,n),i}(tt.a))||Cl;function Gl(t){return Gl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gl(t)}function Yl(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Vl(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Wl(t,e){return Wl=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Wl(t,e)}function Kl(t){var e=function(){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(t){return!1}}();return function(){var r,n=Zl(t);if(e){var o=Zl(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return $l(this,r)}}function $l(t,e){if(e&&("object"===Gl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Zl(t){return Zl=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Zl(t)}var ql,Jl=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Wl(t,e)}(i,t);var e,r,n,o=Kl(i);function i(){return Yl(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"render",value:function(){var t=this.props.background;return Object(tt.g)("div",{className:"lf-background"},Object(tt.g)("div",{style:t,className:"lf-background-area"}))}}])&&Vl(e.prototype,r),n&&Vl(e,n),i}(tt.a);function Ql(t){return Ql="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ql(t)}function tf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ef(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function rf(t,e){return rf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},rf(t,e)}function nf(t){var e=function(){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(t){return!1}}();return function(){var r,n=af(t);if(e){var o=af(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return of(this,r)}}function of(t,e){if(e&&("object"===Ql(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return uf(t)}function uf(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function af(t){return af=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},af(t)}function cf(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var sf=T_(ql=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&rf(t,e)}(i,t);var e,r,n,o=nf(i);function i(){var t;tf(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return cf(uf(t=o.call.apply(o,[this].concat(r))),"id",gu()),t}return e=i,(r=[{key:"renderDot",value:function(){var t=this.props,e=t.config,r=e.color,n=e.thickness,o=void 0===n?2:n,i=t.size,u=t.visible,a=Math.min(Math.max(2,o),i/2),c=1;return u||(c=0),Object(tt.g)("rect",{width:a,height:a,rx:a/2,ry:a/2,fill:r,opacity:c})}},{key:"renderMesh",value:function(){var t=this.props,e=t.config,r=e.color,n=e.thickness,o=void 0===n?1:n,i=t.size,u=t.visible,a=Math.min(Math.max(1,o),i/2),c="M ".concat(i," 0 H0 M0 0 V0 ").concat(i),s=1;return u||(s=0),Object(tt.g)("path",{d:c,stroke:r,strokeWidth:a,opacity:s})}},{key:"render",value:function(){var t=this.props,e=t.type,r=t.size,n=t.graphModel.transformModel,o=[n.SCALE_X,n.SKEW_Y,n.SKEW_X,n.SCALE_Y,n.TRANSLATE_X,n.TRANSLATE_Y].join(","),i="matrix(".concat(o,")");return Object(tt.g)("div",{className:"lf-grid"},Object(tt.g)("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%"},Object(tt.g)("defs",null,Object(tt.g)("pattern",{id:this.id,patternUnits:"userSpaceOnUse",patternTransform:i,x:"0",y:"0",width:r,height:r},"dot"===e&&this.renderDot(),"mesh"===e&&this.renderMesh())),Object(tt.g)("rect",{width:"100%",height:"100%",fill:"url(#".concat(this.id,")")})))}}])&&ef(e.prototype,r),n&&ef(e,n),i}(tt.a))||ql;sf.defaultProps={size:20,visible:!0,type:"dot",config:{color:"#ababab",thickness:1}};r(53);function lf(t){return lf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lf(t)}function ff(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return pf(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return pf(t,e)}(t,e)||function(){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 pf(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var df,hf=function(t){var e={x1:10,y1:10,x2:20,y2:20,stroke:"black"};return Object.entries(t).forEach((function(t){var r=ff(t,2),n=r[0],o=r[1];"style"===n?e[n]=o:"object"!==lf(o)&&(e[n]=o)})),Object(tt.g)("line",e)};function yf(t){return yf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yf(t)}function vf(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function gf(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?vf(Object(r),!0).forEach((function(e){bf(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):vf(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function bf(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function mf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Of(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function _f(t,e){return _f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},_f(t,e)}function wf(t){var e=function(){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(t){return!1}}();return function(){var r,n=xf(t);if(e){var o=xf(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return jf(this,r)}}function jf(t,e){if(e&&("object"===yf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function xf(t){return xf=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},xf(t)}var Ef,Sf=T_(df=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&_f(t,e)}(i,t);var e,r,n,o=wf(i);function i(){return mf(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"render",value:function(){var t=this.props.snaplineModel,e=t.position,r=t.isShowHorizontal,n=t.isShowVertical,o=t.getStyle(),i=e.x,u=void 0===i?0:i,a=e.y,c=void 0===a?0:a,s=gf(gf({x1:-1e5,y1:c,x2:1e5,y2:c},o),{},{stroke:r?o.stroke:"none"}),l=gf(gf({x1:u,y1:-1e5,x2:u,y2:1e5},o),{},{stroke:n?o.stroke:"none"});return Object(tt.g)("g",{className:"lf-snapline"},Object(tt.g)(hf,s),Object(tt.g)(hf,l))}}])&&Of(e.prototype,r),n&&Of(e,n),i}(tt.a))||df;function Pf(t){return Pf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pf(t)}function Af(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return kf(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return kf(t,e)}(t,e)||function(){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 kf(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Df(t){var e=t.x,r=t.y,n=t.width,o=t.height,i=t.className,u=t.radius,a=e-n/2,c=r-o/2,s={};return Object.entries(t).forEach((function(t){var e=Af(t,2),r=e[0],n=e[1];"object"!==Pf(n)&&(s[r]=n)})),s.className=i?"lf-basic-shape ".concat(i):"lf-basic-shape",u&&(s.rx=u,s.ry=u),s.x=a,s.y=c,Object(tt.g)("rect",s)}function Tf(t){return Tf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tf(t)}function Mf(){return Mf=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Mf.apply(this,arguments)}function Nf(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Cf(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Nf(Object(r),!0).forEach((function(e){Rf(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Nf(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Rf(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function If(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Lf(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function zf(t,e){return zf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},zf(t,e)}function Bf(t){var e=function(){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(t){return!1}}();return function(){var r,n=Ff(t);if(e){var o=Ff(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Uf(this,r)}}function Uf(t,e){if(e&&("object"===Tf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ff(t){return Ff=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ff(t)}Df.defaultProps={className:"",radius:""};var Hf,Xf=T_(Ef=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&zf(t,e)}(i,t);var e,r,n,o=Bf(i);function i(){return If(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getNodesOutline",value:function(){var t=this.props.graphModel,e=t.nodes,r=t.editConfigModel,n=r.hoverOutline,o=r.nodeSelectedOutline,i=[];return e.forEach((function(t){if(t.isHovered||t.isSelected){var e=t.isHovered,r=t.isSelected,u=t.x,a=t.y,c=t.width,s=t.height;if(o&&r||n&&e){var l=t.getOutlineStyle(),f={};if(Object.keys(l).forEach((function(t){"hover"!==t&&(f[t]=l[t])})),e){var p=l.hover;f=Cf(Cf({},f),p)}i.push(Object(tt.g)(Df,Mf({transform:t.transform,className:"lf-outline-node",x:u,y:a,width:c+10,height:s+10},f)))}}})),i}},{key:"getEdgeOutline",value:function(){for(var t=this.props.graphModel,e=t.edges,r=t.editConfigModel,n=r.edgeSelectedOutline,o=r.hoverOutline,i=[],u=0;u<e.length;u++){var a=e[u];(n&&a.isSelected||o&&a.isHovered)&&(a.modelType===po.LINE_EDGE?i.push(this.getLineOutline(a)):a.modelType===po.POLYLINE_EDGE?i.push(this.getPolylineOutline(a)):a.modelType===po.BEZIER_EDGE&&i.push(this.getBezierOutline(a)))}return i}},{key:"getLineOutline",value:function(t){var e=t.startPoint,r=t.endPoint,n=(e.x+r.x)/2,o=(e.y+r.y)/2,i=Math.abs(e.x-r.x)+10,u=Math.abs(e.y-r.y)+10,a=t.getOutlineStyle();return Object(tt.g)(Df,Mf({className:"lf-outline-edge",x:n,y:o,width:i,height:u},a))}},{key:"getPolylineOutline",value:function(t){var e=t.points,r=Gc(e),n=_c(r,8),o=n.x,i=n.y,u=n.width,a=n.height,c=t.getOutlineStyle();return Object(tt.g)(Df,Mf({className:"lf-outline",x:o,y:i,width:u,height:a},c))}},{key:"getBezierOutline",value:function(t){var e=t.path,r=Jc(e),n=_c(r,8),o=n.x,i=n.y,u=n.width,a=n.height,c=t.getOutlineStyle();return Object(tt.g)(Df,Mf({className:"lf-outline",x:o,y:i,width:u,height:a},c))}},{key:"render",value:function(){return Object(tt.g)("g",{className:"lf-outline"},this.getNodesOutline(),this.getEdgeOutline())}}])&&Lf(e.prototype,r),n&&Lf(e,n),i}(tt.a))||Ef;function Gf(t){return Gf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gf(t)}function Yf(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Vf(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Vf(t,e)}(t,e)||function(){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 Vf(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Wf(t){var e=t.x,r=void 0===e?0:e,n=t.y,o=void 0===n?0:n,i=t.r,u=void 0===i?4:i,a=t.className,c={cx:r,cy:o,r:u,fill:"transparent",fillOpacity:1,strokeWidth:"1",stroke:"#000",strokeOpacity:1};return Object.entries(t).forEach((function(t){var e=Yf(t,2),r=e[0],n=e[1];"object"!==Gf(n)&&(c[r]=n)})),c.className=a?"lf-basic-shape ".concat(a):"lf-basic-shape",Object(tt.g)("circle",c)}function Kf(t){return Kf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kf(t)}function $f(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Zf(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Zf(t,e)}(t,e)||function(){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 Zf(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function qf(){return qf=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},qf.apply(this,arguments)}function Jf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Qf(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function tp(t,e,r){return e&&Qf(t.prototype,e),r&&Qf(t,r),t}function ep(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&rp(t,e)}function rp(t,e){return rp=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},rp(t,e)}function np(t){var e=function(){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(t){return!1}}();return function(){var r,n=up(t);if(e){var o=up(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return op(this,r)}}function op(t,e){if(e&&("object"===Kf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return ip(t)}function ip(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function up(t){return up=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},up(t)}function ap(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var cp,sp=function(t){ep(r,t);var e=np(r);function r(){var t;return Jf(this,r),ap(ip(t=e.call(this)),"dragHandler",void 0),ap(ip(t),"onDragging",(function(e){var r=e.event,n=t.props,o=n.graphModel,i=n.bezierModel,u=n.type,a=o.getPointByClient({x:r.clientX,y:r.clientY}).canvasOverlayPosition,c=a.x,s=a.y;i.updateAdjustAnchor({x:c,y:s},u),o.eventCenter.emit(yo.EDGE_ADJUST,{data:i.getData()})})),ap(ip(t),"onDragEnd",(function(){t.props.bezierModel.isDragging=!1})),t.dragHandler=new cs({onDragging:t.onDragging,onDragEnd:t.onDragEnd}),t}return tp(r,[{key:"render",value:function(){var t=this,e=this.props.position,r=e.x,n=e.y,o=this.props.bezierModel.getEdgeStyle().adjustAnchor;return Object(tt.g)(Wf,qf({className:"lf-bezier-adjust-anchor",x:r,y:n},o,{onMouseDown:function(e){t.dragHandler.handleMouseDown(e)}}))}}]),r}(tt.a),lp=T_(Hf=function(t){ep(r,t);var e=np(r);function r(){return Jf(this,r),e.apply(this,arguments)}return tp(r,[{key:"getBezierAdjust",value:function(t,e){var r=t.path,n=t.id,o=$f(Jc(r),4),i=o[0],u=o[1],a=o[2],c=o[3],s=t.getEdgeStyle().adjustLine,l=[];return l.push(Object(tt.g)(hf,qf({x1:i.x,y1:i.y,x2:u.x,y2:u.y},s))),l.push(Object(tt.g)(sp,{position:u,bezierModel:t,graphModel:e,key:"".concat(n,"_ePre"),type:"sNext"})),l.push(Object(tt.g)(hf,qf({x1:c.x,y1:c.y,x2:a.x,y2:a.y},s))),l.push(Object(tt.g)(sp,{position:a,bezierModel:t,graphModel:e,key:"".concat(n,"_sNext"),type:"ePre"})),l}},{key:"selectedBezierEdge",value:function(){for(var t=this.props.graphModel,e=t.edges,r=[],n=0;n<e.length;n++){var o=e[n];o.isSelected&&o.modelType===po.BEZIER_EDGE&&o.draggable&&r.push(this.getBezierAdjust(o,t))}return r}},{key:"render",value:function(){return Object(tt.g)("g",{className:"lf-bezier-adjust"},this.selectedBezierEdge())}}]),r}(tt.a))||Hf;function fp(t){return fp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fp(t)}function pp(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function dp(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function hp(t,e){return hp=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},hp(t,e)}function yp(t){var e=function(){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(t){return!1}}();return function(){var r,n=gp(t);if(e){var o=gp(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return vp(this,r)}}function vp(t,e){if(e&&("object"===fp(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function gp(t){return gp=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},gp(t)}var bp,mp=T_(cp=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&hp(t,e)}(i,t);var e,r,n,o=yp(i);function i(){return pp(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"render",value:function(){var t=this.props.graphModel.transformModel.getTransformStyle().transform,e=this.props.children;return Object(tt.g)("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",className:"modification-overlay"},Object(tt.g)("g",{transform:t},e))}}])&&dp(e.prototype,r),n&&dp(e,n),i}(tt.a))||cp;function Op(t){return Op="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Op(t)}function _p(){return _p=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},_p.apply(this,arguments)}function wp(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function jp(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function xp(t,e){return xp=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},xp(t,e)}function Ep(t){var e=function(){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(t){return!1}}();return function(){var r,n=Pp(t);if(e){var o=Pp(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Sp(this,r)}}function Sp(t,e){if(e&&("object"===Op(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Pp(t){return Pp=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Pp(t)}var Ap=T_(bp=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&xp(t,e)}(i,t);var e,r,n,o=Ep(i);function i(){return wp(this,i),o.apply(this,arguments)}return e=i,r=[{key:"getComponent",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"canvas-overlay",n=this.props.getView,o=n(t.type);return Object(tt.g)(o,{key:t.id,model:t,graphModel:e,overlay:r})}},{key:"render",value:function(){var t=this,e=this.props,r=e.graphModel,n=e.tool,o=e.options,i=e.dnd,u=e.snaplineModel,a={};o.width&&(a.width="".concat(r.width,"px")),o.height&&(a.height="".concat(r.height,"px"));var c=o.grid,s=r.fakerNode,l=r.editConfigModel.adjustEdge;return Object(tt.g)("div",{className:"lf-graph","flow-id":r.flowId,style:a},Object(tt.g)(Rl,{graphModel:r,dnd:i},Object(tt.g)("g",{className:"lf-base"},hn(r.sortElements,(function(e){return t.getComponent(e,r)}))),s?this.getComponent(s,r):""),Object(tt.g)(mp,{graphModel:r},Object(tt.g)(Xf,{graphModel:r}),l?Object(tt.g)(lp,{graphModel:r}):"",!1!==o.snapline?Object(tt.g)(Sf,{snaplineModel:u}):""),Object(tt.g)(Xl,{graphModel:r,tool:n}),o.background&&Object(tt.g)(Jl,{background:o.background}),o.grid&&Object(tt.g)(sf,_p({},c,{graphModel:r})))}}],r&&jp(e.prototype,r),n&&jp(e,n),i}(tt.a))||bp,kp=Ap;function Dp(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Tp(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Dp(Object(r),!0).forEach((function(e){Np(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Dp(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Mp(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Np(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Cp=function(){function t(e){var r=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Np(this,"nodeConfig",void 0),Np(this,"lf",void 0),Np(this,"fakerNode",void 0),Np(this,"stopDrag",(function(){r.nodeConfig=null,window.document.removeEventListener("mouseup",r.stopDrag)})),Np(this,"dragEnter",(function(t){r.nodeConfig&&!r.fakerNode&&(r.fakerNode=r.lf.createFakerNode(Tp(Tp({},r.nodeConfig),r.clientToLocalPoint({x:t.clientX,y:t.clientY}))))})),Np(this,"onDragOver",(function(t){if(t.preventDefault(),r.fakerNode){var e=r.clientToLocalPoint({x:t.clientX,y:t.clientY}),n=e.x,o=e.y;r.fakerNode.moveTo(n,o);var i=r.fakerNode.getData();r.lf.setNodeSnapLine(i),r.lf.graphModel.eventCenter.emit(yo.NODE_DND_DRAG,{data:i})}return!1})),Np(this,"onDragLeave",(function(){r.fakerNode&&(r.lf.removeNodeSnapLine(),r.lf.graphModel.removeFakerNode(),r.fakerNode=null)})),Np(this,"onDrop",(function(t){r.lf.graphModel&&t&&r.nodeConfig&&(r.lf.addNode(Tp(Tp({},r.nodeConfig),r.clientToLocalPoint({x:t.clientX,y:t.clientY})),yo.NODE_DND_ADD,t),t.preventDefault(),t.stopPropagation(),r.nodeConfig=null,r.lf.removeNodeSnapLine(),r.lf.graphModel.removeFakerNode(),r.fakerNode=null)}));var n=e.lf;this.lf=n}var e,r,n;return e=t,(r=[{key:"clientToLocalPoint",value:function(t){var e=t.x,r=t.y,n=tn(this.lf.options,["grid","size"]),o=this.lf.graphModel.getPointByClient({x:e,y:r}).canvasOverlayPosition,i=o.x,u=o.y;return{x:Ui(i,n),y:Ui(u,n)}}},{key:"startDrag",value:function(t){var e=this.lf.graphModel.editConfigModel;null!=e&&e.isSilentMode||(this.nodeConfig=t,window.document.addEventListener("mouseup",this.stopDrag))}},{key:"eventMap",value:function(){return{onMouseEnter:this.dragEnter,onMouseOver:this.dragEnter,onMouseMove:this.onDragOver,onMouseLeave:this.onDragLeave,onMouseUp:this.onDrop}}}])&&Mp(e.prototype,r),n&&Mp(e,n),t}();function Rp(t){var e=t.container,r=t.grid,n=t.width,o=t.height;if(!e)throw new Error("请检查 container 参数是否有效");if("string"==typeof n||"string"==typeof o)throw new Error("width或height不支持传入字符串,请传数字");return r&&(t.grid=Mn({size:20,type:"dot",visible:!0,config:{color:"#ababab",thickness:1}},r)),Mn({},zp,t)}var Ip,Lp,zp={background:!1,grid:!1,textEdit:!0,disabledTools:[]};function Bp(t){return Bp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bp(t)}function Up(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Fp(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Fp(t,e)}(t,e)||function(){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 Fp(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Hp(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Xp(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Hp(Object(r),!0).forEach((function(e){td(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Hp(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Gp(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function Yp(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Vp(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Wp(){return Wp="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Kp(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Wp.apply(this,arguments)}function Kp(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Qp(t)););return t}function $p(t,e){return $p=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},$p(t,e)}function Zp(t){var e=function(){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(t){return!1}}();return function(){var r,n=Qp(t);if(e){var o=Qp(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return qp(this,r)}}function qp(t,e){if(e&&("object"===Bp(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Jp(t)}function Jp(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Qp(t){return Qp=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Qp(t)}function td(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ed(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var rd=(Ip=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&$p(t,e)}(i,t);var e,r,n,o=Zp(i);function i(){var t;Yp(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return td(Jp(t=o.call.apply(o,[this].concat(r))),"modelType",po.BEZIER_EDGE),Gp(Jp(t),"path",Lp,Jp(t)),t}return e=i,(r=[{key:"initEdgeData",value:function(t){this.offset=100,Wp(Qp(i.prototype),"initEdgeData",this).call(this,t)}},{key:"getEdgeStyle",value:function(){var t=this.graphModel.theme.bezier;return Xp(Xp({},Wp(Qp(i.prototype),"getEdgeStyle",this).call(this)),wi(t))}},{key:"getTextPosition",value:function(){if(this.pointsList&&this.pointsList.length>0){var t=0,e=0;return this.pointsList.forEach((function(r){var n=r.x,o=r.y;t+=n,e+=o})),{x:t/this.pointsList.length,y:e/this.pointsList.length}}return{x:(this.startPoint.x+this.endPoint.x)/2,y:(this.startPoint.y+this.endPoint.y)/2}}},{key:"getData",value:function(){var t=Wp(Qp(i.prototype),"getData",this).call(this),e=this.pointsList.map((function(t){return{x:t.x,y:t.y}}));return Xp(Xp({},t),{},{pointsList:e})}},{key:"getControls",value:function(){var t=this.startPoint,e=this.endPoint;return qc({start:t,end:e,sourceNode:this.sourceNode,targetNode:this.targetNode,offset:this.offset})}},{key:"getPath",value:function(t){var e=Up(t,4),r=e[0],n=e[1],o=e[2],i=e[3];return"M ".concat(r.x," ").concat(r.y,"\n C ").concat(n.x," ").concat(n.y,",\n ").concat(o.x," ").concat(o.y,",\n ").concat(i.x," ").concat(i.y)}},{key:"initPoints",value:function(){this.pointsList.length>0?this.path=this.getPath(this.pointsList):this.updatePoints()}},{key:"updatePoints",value:function(){var t=this.getControls(),e=t.sNext,r=t.ePre;this.updatePath(e,r)}},{key:"updatePath",value:function(t,e){t=wi(t),e=wi(e);var r={x:this.startPoint.x,y:this.startPoint.y},n={x:this.endPoint.x,y:this.endPoint.y};if(!t||!e){var o=this.getControls();t=o.sNext,e=o.ePre}this.pointsList=[r,t,e,n],this.path=this.getPath(this.pointsList)}},{key:"updateStartPoint",value:function(t){this.startPoint=Object.assign({},t),this.updatePoints()}},{key:"updateEndPoint",value:function(t){this.endPoint=Object.assign({},t),this.updatePoints()}},{key:"moveStartPoint",value:function(t,e){this.startPoint.x+=t,this.startPoint.y+=e;var r=Up(this.pointsList,3),n=r[1],o=r[2];n.x+=t,n.y+=e,this.updatePath(n,o)}},{key:"moveEndPoint",value:function(t,e){this.endPoint.x+=t,this.endPoint.y+=e;var r=Up(this.pointsList,3),n=r[1],o=r[2];o.x+=t,o.y+=e,this.updatePath(n,o)}},{key:"updateAdjustAnchor",value:function(t,e){"sNext"===e?this.pointsList[1]=t:"ePre"===e&&(this.pointsList[2]=t),this.path=this.getPath(this.pointsList),this.setText(Object.assign({},this.text,this.textPosition))}},{key:"getAdjustStart",value:function(){return this.pointsList[0]||this.startPoint}},{key:"getAdjustEnd",value:function(){var t=this.pointsList;return t[t.length-1]||this.endPoint}},{key:"updateAfterAdjustStartAndEnd",value:function(t){var e=t.startPoint,r=t.endPoint,n=t.sourceNode,o=t.targetNode,i=qc({start:e,end:r,sourceNode:n,targetNode:o,offset:this.offset}),u=i.sNext,a=i.ePre;this.pointsList=[e,u,a,r],this.initPoints()}}])&&Vp(e.prototype,r),n&&Vp(e,n),i}(ba),Lp=ed(Ip.prototype,"path",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),ed(Ip.prototype,"initPoints",[o.k],Object.getOwnPropertyDescriptor(Ip.prototype,"initPoints"),Ip.prototype),ed(Ip.prototype,"updatePoints",[o.k],Object.getOwnPropertyDescriptor(Ip.prototype,"updatePoints"),Ip.prototype),ed(Ip.prototype,"updateStartPoint",[o.k],Object.getOwnPropertyDescriptor(Ip.prototype,"updateStartPoint"),Ip.prototype),ed(Ip.prototype,"updateEndPoint",[o.k],Object.getOwnPropertyDescriptor(Ip.prototype,"updateEndPoint"),Ip.prototype),ed(Ip.prototype,"moveStartPoint",[o.k],Object.getOwnPropertyDescriptor(Ip.prototype,"moveStartPoint"),Ip.prototype),ed(Ip.prototype,"moveEndPoint",[o.k],Object.getOwnPropertyDescriptor(Ip.prototype,"moveEndPoint"),Ip.prototype),ed(Ip.prototype,"updateAdjustAnchor",[o.k],Object.getOwnPropertyDescriptor(Ip.prototype,"updateAdjustAnchor"),Ip.prototype),ed(Ip.prototype,"getAdjustStart",[o.k],Object.getOwnPropertyDescriptor(Ip.prototype,"getAdjustStart"),Ip.prototype),ed(Ip.prototype,"getAdjustEnd",[o.k],Object.getOwnPropertyDescriptor(Ip.prototype,"getAdjustEnd"),Ip.prototype),ed(Ip.prototype,"updateAfterAdjustStartAndEnd",[o.k],Object.getOwnPropertyDescriptor(Ip.prototype,"updateAfterAdjustStartAndEnd"),Ip.prototype),Ip);var nd,od,id,ud,ad,cd,sd,ld,fd,pd,dd,hd,yd,vd,gd,bd,md,Od,_d,wd,jd,xd,Ed,Sd=function(t){return null==t};function Pd(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||kd(t,e)||function(){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 Ad(t){return Ad="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ad(t)}function kd(t,e){if(t){if("string"==typeof t)return Dd(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Dd(t,e):void 0}}function Dd(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Td(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Md(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Td(Object(r),!0).forEach((function(e){Rd(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Td(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Nd(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function Cd(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Rd(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Id(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var Ld,zd,Bd=(nd=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Rd(this,"id",""),Nd(this,"type",od,this),Nd(this,"x",id,this),Nd(this,"y",ud,this),Nd(this,"text",ad,this),Nd(this,"properties",cd,this),Nd(this,"_width",sd,this),Nd(this,"_height",ld,this),Nd(this,"anchorsOffset",fd,this),Nd(this,"isSelected",pd,this),Nd(this,"isHovered",dd,this),Nd(this,"isShowAnchor",hd,this),Nd(this,"isDragging",yd,this),Nd(this,"isHitable",vd,this),Nd(this,"draggable",gd,this),Nd(this,"visible",bd,this),Nd(this,"enableRotate",md,this),Rd(this,"virtual",!1),Rd(this,"graphModel",void 0),Nd(this,"zIndex",Od,this),Nd(this,"state",_d,this),Nd(this,"autoToFront",wd,this),Nd(this,"style",jd,this),Nd(this,"transform",xd,this),Nd(this,"_rotate",Ed,this),Rd(this,"BaseType",ho.NODE),Rd(this,"modelType",po.NODE),Rd(this,"additionStateData",void 0),Rd(this,"targetRules",[]),Rd(this,"sourceRules",[]),Rd(this,"moveRules",[]),Rd(this,"hasSetTargetRules",!1),Rd(this,"hasSetSourceRules",!1),this.graphModel=r,this.initNodeData(e),this.setAttributes()}var e,r,n;return e=t,r=[{key:"width",get:function(){return this._width},set:function(t){this._width=t}},{key:"height",get:function(){return this._height},set:function(t){this._height=t}},{key:"rotate",get:function(){return this._rotate},set:function(t){this._rotate=t;var e=this.x,r=void 0===e?0:e,n=this.y,o=void 0===n?0:n;this.transform=new al(-r,-o).rotate(t).translate(r,o).toString()}},{key:"incoming",get:function(){return{nodes:this.graphModel.getNodeIncomingNode(this.id),edges:this.graphModel.getNodeIncomingEdge(this.id)}}},{key:"outgoing",get:function(){return{nodes:this.graphModel.getNodeOutgoingNode(this.id),edges:this.graphModel.getNodeOutgoingEdge(this.id)}}},{key:"initNodeData",value:function(t){if(t.properties||(t.properties={}),!t.id){var e=this.graphModel.idGenerator,r=e&&e(t.type),n=this.createId();t.id=n||r||gu()}this.formatText(t),Mn(this,function(t){return io(t,["id","type","x","y","text","properties","virtual","rotate"])}(t)),this.graphModel.overlapMode===Oo.INCREASE&&(this.zIndex=t.zIndex||la())}},{key:"setAttributes",value:function(){}},{key:"createId",value:function(){return null}},{key:"formatText",value:function(t){t.text||(t.text={value:"",x:t.x,y:t.y,draggable:!1,editable:!0}),t.text&&"string"==typeof t.text?t.text={value:t.text,x:t.x,y:t.y,draggable:!1,editable:!0}:t.text&&void 0===t.text.editable&&(t.text.editable=!0)}},{key:"getData",value:function(){var t=this.text,e=t.x,r=t.y,n=t.value,i=this.properties;Object(o.x)(i)&&(i=Object(o.I)(i));var u={id:this.id,type:this.type,x:this.x,y:this.y,properties:i};return this.rotate&&(u.rotate=this.rotate),this.graphModel.overlapMode===Oo.INCREASE&&(u.zIndex=this.zIndex),n&&(u.text={x:e,y:r,value:n}),u}},{key:"getHistoryData",value:function(){return this.getData()}},{key:"getProperties",value:function(){return Object(o.I)(this.properties)}},{key:"getOuterGAttributes",value:function(){return{className:""}}},{key:"getNodeStyle",value:function(){return Md(Md({},this.graphModel.theme.baseNode),this.style)}},{key:"getTextStyle",value:function(){var t=this.graphModel.theme.nodeText;return wi(t)}},{key:"getRotateControlStyle",value:function(){var t=this.graphModel.theme.rotateControl;return wi(t)}},{key:"getAnchorStyle",value:function(t){var e=this.graphModel.theme.anchor;return wi(e)}},{key:"getAnchorLineStyle",value:function(t){var e=this.graphModel.theme.anchorLine;return wi(e)}},{key:"getOutlineStyle",value:function(){var t=this.graphModel.theme.outline;return wi(t)}},{key:"isAllowConnectedAsSource",value:function(t,e,r,n){var o=this.hasSetSourceRules?this.sourceRules:this.getConnectedSourceRules();this.hasSetSourceRules=!0;for(var i,u=!0,a=0;a<o.length;a++){var c=o[a];if(!c.validate.call(this,this,t,e,r,n)){u=!1,i=c.message;break}}return{isAllPass:u,msg:i}}},{key:"getConnectedSourceRules",value:function(){return this.sourceRules}},{key:"isAllowConnectedAsTarget",value:function(t,e,r,n){var o=this.hasSetTargetRules?this.targetRules:this.getConnectedTargetRules();this.hasSetTargetRules=!0;for(var i,u=!0,a=0;a<o.length;a++){var c=o[a];if(!c.validate.call(this,t,this,e,r,n)){u=!1,i=c.message;break}}return{isAllPass:u,msg:i}}},{key:"isAllowMoveNode",value:function(t,e){var r,n=!0,o=!0,i=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=kd(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}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 i,u=!0,a=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return u=t.done,t},e:function(t){a=!0,i=t},f:function(){try{u||null==r.return||r.return()}finally{if(a)throw i}}}}(this.moveRules.concat(this.graphModel.nodeMoveRules));try{for(i.s();!(r=i.n()).done;){var u=(0,r.value)(this,t,e);if(!u)return!1;if("object"===Ad(u)){var a=u;if(!1===a.x&&!1===a.y)return!1;n=n&&a.x,o=o&&a.y}}}catch(t){i.e(t)}finally{i.f()}return{x:n,y:o}}},{key:"getConnectedTargetRules",value:function(){return this.targetRules}},{key:"getAnchorsByOffset",value:function(){var t=this.anchorsOffset,e=this.id,r=this.x,n=this.y;return t&&t.length>0?t.map((function(t,o){return t.length?(t=t,{id:"".concat(e,"_").concat(o),x:r+t[0],y:n+t[1]}):Md(Md({},t=t),{},{x:r+t.x,y:n+t.y,id:t.id||"".concat(e,"_").concat(o)})})):this.getDefaultAnchor()}},{key:"getDefaultAnchor",value:function(){return[]}},{key:"getTargetAnchor",value:function(t){return function(t,e){for(var r,n=Yu(e),o=Number.MAX_SAFE_INTEGER,i=0;i<n.length;i++){var u=Ku(t.x,t.y,n[i].x,n[i].y);u<o&&(o=u,r={index:i,anchor:wu(wu({},n[i]),{},{x:n[i].x,y:n[i].y,id:n[i].id})})}return r}(t,this)}},{key:"getBounds",value:function(){return{x1:this.x-this.width/2,y1:this.y-this.height/2,x2:this.x+this.width/2,y2:this.y+this.height/2}}},{key:"anchors",get:function(){var t=this.getAnchorsByOffset(),e=this.x,r=this.y,n=this.rotate;return t.forEach((function(t){var o=t.x,i=t.y,u=Pd(new ol([o,i,1]).translate(-e,-r).rotate(n).translate(e,r)[0],2),a=u[0],c=u[1];t.x=a,t.y=c})),t}},{key:"getAnchorInfo",value:function(t){if(!Sd(t))for(var e=0;e<this.anchors.length;e++){var r=this.anchors[e];if(r.id===t)return r}}},{key:"addNodeMoveRules",value:function(t){this.moveRules.includes(t)||this.moveRules.push(t)}},{key:"move",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=!1,o=!1;if(r)n=!0,o=!0;else{var i=this.isAllowMoveNode(t,e);"boolean"==typeof i?(n=i,o=i):(n=i.x,o=i.y)}if(n){var u=this.x+t;this.x=u,this.text&&this.moveText(t,0)}if(o){var a=this.y+e;this.y=a,this.text&&this.moveText(0,e)}return n||o}},{key:"getMoveDistance",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=!1,o=!1,i=0,u=0;if(r)n=!0,o=!0;else{var a=this.isAllowMoveNode(t,e);"boolean"==typeof a?(n=a,o=a):(n=a.x,o=a.y)}if(n&&t){var c=this.x+t;this.x=c,this.text&&this.moveText(t,0),i=t}if(o&&e){var s=this.y+e;this.y=s,this.text&&this.moveText(0,e),u=e}return[i,u]}},{key:"moveTo",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=t-this.x,o=e-this.y;return!(!r&&!this.isAllowMoveNode(n,o)||(this.text&&this.text&&this.moveText(n,o),this.x=t,this.y=e,0))}},{key:"moveText",value:function(t,e){var r=this.text,n=r.x,o=r.y,i=r.value,u=r.draggable,a=r.editable;this.text={value:i,editable:a,draggable:u,x:n+t,y:o+e}}},{key:"updateText",value:function(t){this.text=Md(Md({},Object(o.I)(this.text)),{},{value:t})}},{key:"setSelected",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isSelected=t}},{key:"setHovered",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isHovered=t,this.setIsShowAnchor(t)}},{key:"setIsShowAnchor",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isShowAnchor=t}},{key:"setEnableRotate",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.enableRotate=t}},{key:"setHitable",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isHitable=t}},{key:"setElementState",value:function(t,e){this.state=t,this.additionStateData=e}},{key:"setProperty",value:function(t,e){this.properties=Md(Md({},Object(o.I)(this.properties)),{},Rd({},t,aa(e))),this.setAttributes()}},{key:"setProperties",value:function(t){this.properties=Md(Md({},Object(o.I)(this.properties)),aa(t)),this.setAttributes()}},{key:"deleteProperty",value:function(t){delete this.properties[t],this.setAttributes()}},{key:"setStyle",value:function(t,e){this.style=Md(Md({},this.style),{},Rd({},t,aa(e)))}},{key:"setStyles",value:function(t){this.style=Md(Md({},this.style),aa(t))}},{key:"updateStyles",value:function(t){this.style=Md({},aa(t))}},{key:"setZIndex",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.zIndex=t}},{key:"updateAttributes",value:function(t){Mn(this,t)}}],r&&Cd(e.prototype,r),n&&Cd(e,n),t}(),od=Id(nd.prototype,"type",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),id=Id(nd.prototype,"x",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),ud=Id(nd.prototype,"y",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),ad=Id(nd.prototype,"text",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{value:"",x:0,y:0,draggable:!1,editable:!0}}}),cd=Id(nd.prototype,"properties",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),sd=Id(nd.prototype,"_width",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 100}}),ld=Id(nd.prototype,"_height",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 80}}),fd=Id(nd.prototype,"anchorsOffset",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),pd=Id(nd.prototype,"isSelected",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),dd=Id(nd.prototype,"isHovered",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),hd=Id(nd.prototype,"isShowAnchor",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),yd=Id(nd.prototype,"isDragging",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),vd=Id(nd.prototype,"isHitable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),gd=Id(nd.prototype,"draggable",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),bd=Id(nd.prototype,"visible",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),md=Id(nd.prototype,"enableRotate",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Od=Id(nd.prototype,"zIndex",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),_d=Id(nd.prototype,"state",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),wd=Id(nd.prototype,"autoToFront",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),jd=Id(nd.prototype,"style",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),xd=Id(nd.prototype,"transform",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Ed=Id(nd.prototype,"_rotate",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Id(nd.prototype,"incoming",[o.m],Object.getOwnPropertyDescriptor(nd.prototype,"incoming"),nd.prototype),Id(nd.prototype,"outgoing",[o.m],Object.getOwnPropertyDescriptor(nd.prototype,"outgoing"),nd.prototype),Id(nd.prototype,"addNodeMoveRules",[o.k],Object.getOwnPropertyDescriptor(nd.prototype,"addNodeMoveRules"),nd.prototype),Id(nd.prototype,"move",[o.k],Object.getOwnPropertyDescriptor(nd.prototype,"move"),nd.prototype),Id(nd.prototype,"getMoveDistance",[o.k],Object.getOwnPropertyDescriptor(nd.prototype,"getMoveDistance"),nd.prototype),Id(nd.prototype,"moveTo",[o.k],Object.getOwnPropertyDescriptor(nd.prototype,"moveTo"),nd.prototype),Id(nd.prototype,"moveText",[o.k],Object.getOwnPropertyDescriptor(nd.prototype,"moveText"),nd.prototype),Id(nd.prototype,"updateText",[o.k],Object.getOwnPropertyDescriptor(nd.prototype,"updateText"),nd.prototype),Id(nd.prototype,"setSelected",[o.k],Object.getOwnPropertyDescriptor(nd.prototype,"setSelected"),nd.prototype),Id(nd.prototype,"setHovered",[o.k],Object.getOwnPropertyDescriptor(nd.prototype,"setHovered"),nd.prototype),Id(nd.prototype,"setIsShowAnchor",[o.k],Object.getOwnPropertyDescriptor(nd.prototype,"setIsShowAnchor"),nd.prototype),Id(nd.prototype,"setEnableRotate",[o.k],Object.getOwnPropertyDescriptor(nd.prototype,"setEnableRotate"),nd.prototype),Id(nd.prototype,"setHitable",[o.k],Object.getOwnPropertyDescriptor(nd.prototype,"setHitable"),nd.prototype),Id(nd.prototype,"setElementState",[o.k],Object.getOwnPropertyDescriptor(nd.prototype,"setElementState"),nd.prototype),Id(nd.prototype,"setProperty",[o.k],Object.getOwnPropertyDescriptor(nd.prototype,"setProperty"),nd.prototype),Id(nd.prototype,"setProperties",[o.k],Object.getOwnPropertyDescriptor(nd.prototype,"setProperties"),nd.prototype),Id(nd.prototype,"deleteProperty",[o.k],Object.getOwnPropertyDescriptor(nd.prototype,"deleteProperty"),nd.prototype),Id(nd.prototype,"setStyle",[o.k],Object.getOwnPropertyDescriptor(nd.prototype,"setStyle"),nd.prototype),Id(nd.prototype,"setStyles",[o.k],Object.getOwnPropertyDescriptor(nd.prototype,"setStyles"),nd.prototype),Id(nd.prototype,"updateStyles",[o.k],Object.getOwnPropertyDescriptor(nd.prototype,"updateStyles"),nd.prototype),Id(nd.prototype,"setZIndex",[o.k],Object.getOwnPropertyDescriptor(nd.prototype,"setZIndex"),nd.prototype),Id(nd.prototype,"updateAttributes",[o.k],Object.getOwnPropertyDescriptor(nd.prototype,"updateAttributes"),nd.prototype),nd);function Ud(t){return Ud="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ud(t)}function Fd(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Hd(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Fd(Object(r),!0).forEach((function(e){Qd(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Fd(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Xd(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function Gd(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Yd(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Vd(){return Vd="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Wd(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Vd.apply(this,arguments)}function Wd(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Jd(t)););return t}function Kd(t,e){return Kd=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Kd(t,e)}function $d(t){var e=function(){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(t){return!1}}();return function(){var r,n=Jd(t);if(e){var o=Jd(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Zd(this,r)}}function Zd(t,e){if(e&&("object"===Ud(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return qd(t)}function qd(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Jd(t){return Jd=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Jd(t)}function Qd(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function th(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var eh,rh,nh,oh=(Ld=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Kd(t,e)}(i,t);var e,r,n,o=$d(i);function i(){var t;Gd(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Qd(qd(t=o.call.apply(o,[this].concat(r))),"modelType",po.CIRCLE_NODE),Xd(qd(t),"r",zd,qd(t)),t}return e=i,(r=[{key:"width",get:function(){return 2*this.r}},{key:"height",get:function(){return 2*this.r}},{key:"getNodeStyle",value:function(){var t=Vd(Jd(i.prototype),"getNodeStyle",this).call(this),e=this.graphModel.theme.circle;return Hd(Hd({},t),wi(e))}},{key:"getDefaultAnchor",value:function(){var t=this.x,e=this.y,r=this.r;return[{x:t,y:e-r,id:"".concat(this.id,"_0")},{x:t+r,y:e,id:"".concat(this.id,"_1")},{x:t,y:e+r,id:"".concat(this.id,"_2")},{x:t-r,y:e,id:"".concat(this.id,"_3")}]}}])&&Yd(e.prototype,r),n&&Yd(e,n),i}(Bd),zd=th(Ld.prototype,"r",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 50}}),th(Ld.prototype,"width",[o.m],Object.getOwnPropertyDescriptor(Ld.prototype,"width"),Ld.prototype),th(Ld.prototype,"height",[o.m],Object.getOwnPropertyDescriptor(Ld.prototype,"height"),Ld.prototype),Ld);r(129);function ih(t){return ih="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ih(t)}function uh(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return ah(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ah(t,e)}(t,e)||function(){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 ah(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ch(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function sh(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ch(Object(r),!0).forEach((function(e){Oh(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ch(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function lh(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function fh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ph(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function dh(){return dh="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=hh(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},dh.apply(this,arguments)}function hh(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=mh(t)););return t}function yh(t,e){return yh=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},yh(t,e)}function vh(t){var e=function(){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(t){return!1}}();return function(){var r,n=mh(t);if(e){var o=mh(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return gh(this,r)}}function gh(t,e){if(e&&("object"===ih(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return bh(t)}function bh(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function mh(t){return mh=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},mh(t)}function Oh(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _h(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var wh,jh,xh,Eh=(eh=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&yh(t,e)}(i,t);var e,r,n,o=vh(i);function i(){var t;fh(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Oh(bh(t=o.call.apply(o,[this].concat(r))),"modelType",po.DIAMOND_NODE),lh(bh(t),"rx",rh,bh(t)),lh(bh(t),"ry",nh,bh(t)),t}return e=i,(r=[{key:"getNodeStyle",value:function(){var t=dh(mh(i.prototype),"getNodeStyle",this).call(this),e=this.graphModel.theme.diamond;return sh(sh({},t),wi(e))}},{key:"points",get:function(){var t=this.x,e=this.y,r=this.rx,n=this.ry;return[[t,e-n],[t+r,e],[t,e+n],[t-r,e]]}},{key:"pointsPosition",get:function(){return this.points.map((function(t){return{x:t[0],y:t[1]}}))}},{key:"width",get:function(){var t=Number.MAX_SAFE_INTEGER,e=Number.MIN_SAFE_INTEGER;return this.points.forEach((function(r){var n=uh(r,1)[0];n<t&&(t=n),n>e&&(e=n)})),e-t}},{key:"height",get:function(){var t=Number.MAX_SAFE_INTEGER,e=Number.MIN_SAFE_INTEGER;return this.points.forEach((function(r){var n=uh(r,2)[1];n<t&&(t=n),n>e&&(e=n)})),e-t}},{key:"getDefaultAnchor",value:function(){var t=this;return this.points.map((function(e,r){var n=uh(e,2);return{x:n[0],y:n[1],id:"".concat(t.id,"_").concat(r)}}))}}])&&ph(e.prototype,r),n&&ph(e,n),i}(Bd),rh=_h(eh.prototype,"rx",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 30}}),nh=_h(eh.prototype,"ry",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 50}}),_h(eh.prototype,"points",[o.m],Object.getOwnPropertyDescriptor(eh.prototype,"points"),eh.prototype),_h(eh.prototype,"pointsPosition",[o.m],Object.getOwnPropertyDescriptor(eh.prototype,"pointsPosition"),eh.prototype),_h(eh.prototype,"width",[o.m],Object.getOwnPropertyDescriptor(eh.prototype,"width"),eh.prototype),_h(eh.prototype,"height",[o.m],Object.getOwnPropertyDescriptor(eh.prototype,"height"),eh.prototype),eh);function Sh(t){return Sh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sh(t)}function Ph(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Ah(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ph(Object(r),!0).forEach((function(e){Bh(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ph(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function kh(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function Dh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Th(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Mh(){return Mh="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Nh(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Mh.apply(this,arguments)}function Nh(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=zh(t)););return t}function Ch(t,e){return Ch=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Ch(t,e)}function Rh(t){var e=function(){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(t){return!1}}();return function(){var r,n=zh(t);if(e){var o=zh(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ih(this,r)}}function Ih(t,e){if(e&&("object"===Sh(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Lh(t)}function Lh(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function zh(t){return zh=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},zh(t)}function Bh(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Uh(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var Fh,Hh,Xh=(wh=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ch(t,e)}(i,t);var e,r,n,o=Rh(i);function i(){var t;Dh(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Bh(Lh(t=o.call.apply(o,[this].concat(r))),"modelType",po.ELLIPSE_NODE),kh(Lh(t),"rx",jh,Lh(t)),kh(Lh(t),"ry",xh,Lh(t)),t}return e=i,(r=[{key:"getNodeStyle",value:function(){var t=Mh(zh(i.prototype),"getNodeStyle",this).call(this),e=this.graphModel.theme.ellipse;return Ah(Ah({},t),wi(e))}},{key:"width",get:function(){return 2*this.rx}},{key:"height",get:function(){return 2*this.ry}},{key:"getDefaultAnchor",value:function(){var t=this.x,e=this.y,r=this.rx,n=this.ry;return[{x:t,y:e-n,id:"".concat(this.id,"_0")},{x:t+r,y:e,id:"".concat(this.id,"_1")},{x:t,y:e+n,id:"".concat(this.id,"_2")},{x:t-r,y:e,id:"".concat(this.id,"_3")}]}}])&&Th(e.prototype,r),n&&Th(e,n),i}(Bd),jh=Uh(wh.prototype,"rx",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 30}}),xh=Uh(wh.prototype,"ry",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 45}}),Uh(wh.prototype,"width",[o.m],Object.getOwnPropertyDescriptor(wh.prototype,"width"),wh.prototype),Uh(wh.prototype,"height",[o.m],Object.getOwnPropertyDescriptor(wh.prototype,"height"),wh.prototype),wh);function Gh(t){return Gh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gh(t)}function Yh(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Vh(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Vh(t,e)}(t,e)||function(){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 Vh(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Wh(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Kh(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Wh(Object(r),!0).forEach((function(e){iy(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Wh(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function $h(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function Zh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function qh(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Jh(){return Jh="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=Qh(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Jh.apply(this,arguments)}function Qh(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=oy(t)););return t}function ty(t,e){return ty=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},ty(t,e)}function ey(t){var e=function(){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(t){return!1}}();return function(){var r,n=oy(t);if(e){var o=oy(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return ry(this,r)}}function ry(t,e){if(e&&("object"===Gh(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return ny(t)}function ny(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function oy(t){return oy=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},oy(t)}function iy(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function uy(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var ay,cy,sy=(Fh=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&ty(t,e)}(i,t);var e,r,n,o=ey(i);function i(){var t;Zh(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return iy(ny(t=o.call.apply(o,[this].concat(r))),"modelType",po.POLYGON_NODE),$h(ny(t),"points",Hh,ny(t)),t}return e=i,(r=[{key:"getNodeStyle",value:function(){var t=Jh(oy(i.prototype),"getNodeStyle",this).call(this),e=this.graphModel.theme.polygon;return Kh(Kh({},t),wi(e))}},{key:"pointsPosition",get:function(){var t=this.x,e=this.y,r=this.width,n=this.height;return this.points.map((function(o){return{x:o[0]+t-r/2,y:o[1]+e-n/2}}))}},{key:"width",get:function(){var t=Number.MAX_SAFE_INTEGER,e=Number.MIN_SAFE_INTEGER;return this.points.forEach((function(r){var n=Yh(r,1)[0];n<t&&(t=n),n>e&&(e=n)})),e-t}},{key:"height",get:function(){var t=Number.MAX_SAFE_INTEGER,e=Number.MIN_SAFE_INTEGER;return this.points.forEach((function(r){var n=Yh(r,2)[1];n<t&&(t=n),n>e&&(e=n)})),e-t}},{key:"getDefaultAnchor",value:function(){var t=this,e=this.x,r=this.y,n=this.width,o=this.height;return this.points.map((function(i,u){var a=Yh(i,2),c=a[0],s=a[1];return{x:e+c-n/2,y:r+s-o/2,id:"".concat(t.id,"_").concat(u)}}))}}])&&qh(e.prototype,r),n&&qh(e,n),i}(Bd),Hh=uy(Fh.prototype,"points",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[[50,0],[100,50],[50,100],[0,50]]}}),uy(Fh.prototype,"pointsPosition",[o.m],Object.getOwnPropertyDescriptor(Fh.prototype,"pointsPosition"),Fh.prototype),uy(Fh.prototype,"width",[o.m],Object.getOwnPropertyDescriptor(Fh.prototype,"width"),Fh.prototype),uy(Fh.prototype,"height",[o.m],Object.getOwnPropertyDescriptor(Fh.prototype,"height"),Fh.prototype),Fh);function ly(t){return ly="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ly(t)}function fy(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function py(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?fy(Object(r),!0).forEach((function(e){jy(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):fy(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function dy(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function hy(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function yy(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function vy(){return vy="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=gy(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},vy.apply(this,arguments)}function gy(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=wy(t)););return t}function by(t,e){return by=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},by(t,e)}function my(t){var e=function(){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(t){return!1}}();return function(){var r,n=wy(t);if(e){var o=wy(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Oy(this,r)}}function Oy(t,e){if(e&&("object"===ly(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _y(t)}function _y(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function wy(t){return wy=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},wy(t)}function jy(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var xy,Ey=(ay=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&by(t,e)}(i,t);var e,r,n,o=my(i);function i(){var t;hy(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return jy(_y(t=o.call.apply(o,[this].concat(r))),"modelType",po.RECT_NODE),dy(_y(t),"radius",cy,_y(t)),t}return e=i,(r=[{key:"getDefaultAnchor",value:function(){var t=this.x,e=this.y,r=this.width,n=this.height;return[{x:t,y:e-n/2,id:"".concat(this.id,"_0")},{x:t+r/2,y:e,id:"".concat(this.id,"_1")},{x:t,y:e+n/2,id:"".concat(this.id,"_2")},{x:t-r/2,y:e,id:"".concat(this.id,"_3")}]}},{key:"getNodeStyle",value:function(){var t=vy(wy(i.prototype),"getNodeStyle",this).call(this),e=this.graphModel.theme.rect;return py(py({},t),wi(e))}}])&&yy(e.prototype,r),n&&yy(e,n),i}(Bd),cy=function(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}(ay.prototype,"radius",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),ay);function Sy(t){return Sy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sy(t)}function Py(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Ay(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Py(Object(r),!0).forEach((function(e){zy(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Py(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ky(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Dy(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ty(){return Ty="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=My(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Ty.apply(this,arguments)}function My(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ly(t)););return t}function Ny(t,e){return Ny=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Ny(t,e)}function Cy(t){var e=function(){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(t){return!1}}();return function(){var r,n=Ly(t);if(e){var o=Ly(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Ry(this,r)}}function Ry(t,e){if(e&&("object"===Sy(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Iy(t)}function Iy(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ly(t){return Ly=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ly(t)}function zy(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function By(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var Uy=(xy=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ny(t,e)}(i,t);var e,r,n,o=Cy(i);function i(){var t;ky(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return zy(Iy(t=o.call.apply(o,[this].concat(r))),"modelType",po.TEXT_NODE),t}return e=i,(r=[{key:"getTextStyle",value:function(){var t=Ty(Ly(i.prototype),"getTextStyle",this).call(this),e=this.graphModel.theme.text;return Ay(Ay({},t),wi(e))}},{key:"width",get:function(){var t=String(this.text.value).split(/[\r\n]/g),e=this.getTextStyle().fontSize;return ia({rows:t,fontSize:e,rowsLength:t.length}).width}},{key:"height",get:function(){var t=String(this.text.value).split(/[\r\n]/g),e=this.getTextStyle().fontSize;return ia({rows:t,fontSize:e,rowsLength:t.length}).height}}])&&Dy(e.prototype,r),n&&Dy(e,n),i}(Bd),By(xy.prototype,"width",[o.m],Object.getOwnPropertyDescriptor(xy.prototype,"width"),xy.prototype),By(xy.prototype,"height",[o.m],Object.getOwnPropertyDescriptor(xy.prototype,"height"),xy.prototype),xy);function Fy(t){return Fy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fy(t)}function Hy(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Xy(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Gy(t,e){return Gy=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Gy(t,e)}function Yy(t){var e=function(){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(t){return!1}}();return function(){var r,n=Ky(t);if(e){var o=Ky(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Vy(this,r)}}function Vy(t,e){if(e&&("object"===Fy(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Wy(t)}function Wy(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ky(t){return Ky=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ky(t)}function $y(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Zy,qy,Jy,Qy,tv=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Gy(t,e)}(i,t);var e,r,n,o=Yy(i);function i(){var t;Hy(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return $y(Wy(t=o.call.apply(o,[this].concat(r))),"modelType",po.HTML_NODE),t}return e=i,(r=[{key:"getDefaultAnchor",value:function(){var t=this.x,e=this.y,r=this.width,n=this.height;return[{x:t,y:e-n/2,id:"".concat(this.id,"_0")},{x:t+r/2,y:e,id:"".concat(this.id,"_1")},{x:t,y:e+n/2,id:"".concat(this.id,"_2")},{x:t-r/2,y:e,id:"".concat(this.id,"_3")}]}}])&&Xy(e.prototype,r),n&&Xy(e,n),i}(Bd);function ev(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function rv(t,e,r,n){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(n):void 0})}function nv(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ov(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function iv(t,e,r,n,o){var i={};return Object.keys(n).forEach((function(t){i[t]=n[t]})),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=r.slice().reverse().reduce((function(r,n){return n(t,e,r)||r}),i),o&&void 0!==i.initializer&&(i.value=i.initializer?i.initializer.call(o):void 0,i.initializer=void 0),void 0===i.initializer&&(Object.defineProperty(t,e,i),i=null),i}var uv=(Zy=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),ov(this,"graphModel",void 0),rv(this,"isShowHorizontal",qy,this),rv(this,"isShowVertical",Jy,this),rv(this,"position",Qy,this),this.isShowHorizontal=!1,this.isShowVertical=!1,this.position={x:0,y:0},this.graphModel=e}var e,r,n;return e=t,r=[{key:"getStyle",value:function(){return function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ev(Object(r),!0).forEach((function(e){ov(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ev(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},this.graphModel.theme.snapline)}},{key:"getCenterSnapLine",value:function(t,e){for(var r=t.x,n=t.y,o=!1,i=!1,u=0;u<e.length;u++){var a=e[u];if(a.id!==t.id&&(r===a.x&&(o=!0),n===a.y&&(i=!0),o&&i))break}return{isShowVertical:o,isShowHorizontal:i,position:{x:r,y:n}}}},{key:"getHorizontalSnapline",value:function(t,e){var r,n,o=!1,i=t.id;if(i){var u=this.graphModel.fakerNode;if(u&&u.id===i)n=qu(u);else{var a=this.graphModel.getNodeModelById(i);n=qu(a)}}for(var c=0;c<e.length;c++){var s=e[c];if(s.id!==t.id){var l=qu(s);if(l.minY===n.minY||l.maxY===n.minY){o=!0,r=n.minY;break}if(l.minY===n.maxY||l.maxY===n.maxY){o=!0,r=n.maxY;break}}}return Mn({isShowHorizontal:o,position:{y:r}})}},{key:"getVerticalSnapline",value:function(t,e){var r,n,o=!1,i=t.id;if(i){var u=this.graphModel.fakerNode;if(u&&u.id===i)n=qu(u);else{var a=this.graphModel.getNodeModelById(i);n=qu(a)}}for(var c=0;c<e.length;c++){var s=e[c];if(s.id!==t.id){var l=qu(s);if(l.minX===n.minX||l.maxX===n.minX){o=!0,r=n.minX;break}if(l.minX===n.maxX||l.maxX===n.maxX){o=!0,r=n.maxX;break}}}return Mn({isShowVertical:o,position:{x:r}})}},{key:"getSnapLinePosition",value:function(t,e){var r=this.getCenterSnapLine(t,e),n=r.isShowHorizontal,o=r.isShowVertical;if(!n){var i=this.getHorizontalSnapline(t,e);i.isShowHorizontal&&(r.isShowHorizontal=i.isShowHorizontal,r.position.y=i.position.y)}if(!o){var u=this.getVerticalSnapline(t,e);u.isShowVertical&&(r.isShowVertical=u.isShowVertical,r.position.x=u.position.x)}return r}},{key:"setSnaplineInfo",value:function(t){var e=t.isShowHorizontal,r=t.isShowVertical,n=t.position;this.position=n,this.isShowHorizontal=e,this.isShowVertical=r}},{key:"clearSnapline",value:function(){this.position={x:0,y:0},this.isShowHorizontal=!1,this.isShowVertical=!1}},{key:"setNodeSnapLine",value:function(t){var e=this.graphModel.nodes,r=this.getSnapLinePosition(t,e);this.setSnaplineInfo(r)}}],r&&nv(e.prototype,r),n&&nv(e,n),t}(),qy=iv(Zy.prototype,"isShowHorizontal",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Jy=iv(Zy.prototype,"isShowVertical",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Qy=iv(Zy.prototype,"position",[o.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),iv(Zy.prototype,"clearSnapline",[o.k],Object.getOwnPropertyDescriptor(Zy.prototype,"clearSnapline"),Zy.prototype),iv(Zy.prototype,"setNodeSnapLine",[o.k],Object.getOwnPropertyDescriptor(Zy.prototype,"setNodeSnapLine"),Zy.prototype),Zy),av=new Map,cv=function(t){var e=gu();var r=window.requestAnimationFrame((function r(){if(t(),av.get(e)){var n=window.requestAnimationFrame(r);av.set(e,n)}}));return av.set(e,r),e},sv=function(t){var e=av.get(t);e&&(window.cancelAnimationFrame(e),av.delete(t))};function lv(t){return lv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lv(t)}function fv(){return fv=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},fv.apply(this,arguments)}function pv(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function dv(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?pv(Object(r),!0).forEach((function(e){wv(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):pv(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function hv(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return yv(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return yv(t,e)}(t,e)||function(){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 yv(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function vv(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function gv(t,e){return gv=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},gv(t,e)}function bv(t){var e=function(){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(t){return!1}}();return function(){var r,n=_v(t);if(e){var o=_v(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return mv(this,r)}}function mv(t,e){if(e&&("object"===lv(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Ov(t)}function Ov(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function _v(t){return _v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},_v(t)}function wv(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var jv=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&gv(t,e)}(i,t);var e,r,n,o=bv(i);function i(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),wv(Ov(t=o.call(this)),"preTargetNode",void 0),wv(Ov(t),"sourceRuleResults",void 0),wv(Ov(t),"targetRuleResults",void 0),wv(Ov(t),"dragHandler",void 0),wv(Ov(t),"t",void 0),wv(Ov(t),"onDragStart",(function(e){var r=e.event,n=t.props,o=n.anchorData,i=n.nodeModel,u=n.graphModel;u.overlapMode;u.selectNodeById(i.id),i.autoToFront&&u.toFront(i.id),u.eventCenter.emit(yo.ANCHOR_DRAGSTART,{data:o,e:r,nodeModel:i}),t.setState({startX:o.x,startY:o.y,endX:o.x,endY:o.y})})),wv(Ov(t),"onDragging",(function(e){var r=e.event,n=t.props,o=n.graphModel,i=n.nodeModel,u=n.anchorData,a=o.transformModel,c=o.eventCenter,s=o.width,l=o.height,f=o.editConfigModel,p=f.autoExpand,d=f.stopMoveGraph,h=r.clientX,y=r.clientY,v=o.getPointByClient({x:h,y:y}),g=v.domOverlayPosition,b=g.x,m=g.y,O=v.canvasOverlayPosition,_=O.x,w=O.y;t.t&&sv(t.t);var j=[];b<10?j=[10,0]:b+10>s?j=[-10,0]:m<10?j=[0,10]:m+10>l&&(j=[0,-10]),t.setState({endX:_,endY:w,dragging:!0}),t.moveAnchorEnd(_,w),j.length>0&&!d&&p&&(t.t=cv((function(){var e=hv(j,2),r=e[0],n=e[1];a.translate(r,n);var o=t.state,i=o.endX,u=o.endY;t.setState({endX:i-r,endY:u-n}),t.moveAnchorEnd(i-r,u-n)}))),c.emit(yo.ANCHOR_DRAG,{data:u,e:r,nodeModel:i})})),wv(Ov(t),"onDragEnd",(function(e){var r=e.event;t.t&&sv(t.t);var n=t.checkEnd(r);t.setState({startX:0,startY:0,endX:0,endY:0,dragging:!1}),t.sourceRuleResults.clear(),t.targetRuleResults.clear();var o=t.props,i=o.graphModel,u=o.nodeModel,a=o.anchorData;i.eventCenter.emit(yo.ANCHOR_DRAGEND,{data:a,e:r,nodeModel:u,edgeModel:n})})),wv(Ov(t),"checkEnd",(function(e){var r=t.props,n=r.graphModel,o=r.nodeModel,i=r.anchorData,u=i.x,a=i.y,c=i.id,s=(n.edgeType,t.state),l=s.endX,f=s.endY,p=s.dragging,d=Vu({x:l,y:f},n);if(t.preTargetNode&&t.preTargetNode.state!==lo.DEFAULT&&t.preTargetNode.setElementState(lo.DEFAULT),p&&d&&d.node){var h=d.node,y=d.anchor.id,v="".concat(o.id,"_").concat(h.id,"_").concat(y,"_").concat(c),g=t.sourceRuleResults.get(v)||{},b=g.isAllPass,m=g.msg,O=t.targetRuleResults.get(v)||{},_=O.isAllPass,w=O.msg;if(b&&_){h.setElementState(lo.DEFAULT);var j=n.edgeGenerator(o.getData(),n.getNodeModelById(d.node.id).getData()),x=n.addEdge(dv(dv({},j),{},{sourceNodeId:o.id,sourceAnchorId:c,startPoint:{x:u,y:a},targetNodeId:d.node.id,targetAnchorId:d.anchor.id,endPoint:{x:d.anchor.x,y:d.anchor.y}})),E=t.props.anchorData;return n.eventCenter.emit(yo.ANCHOR_DROP,{data:E,e:e,nodeModel:o,edgeModel:x}),x}var S=h.getData();return n.eventCenter.emit(yo.CONNECTION_NOT_ALLOWED,{data:S,msg:w||m||"不允许添加连线"}),null}})),t.sourceRuleResults=new Map,t.targetRuleResults=new Map,t.state={startX:0,startY:0,endX:0,endY:0,dragging:!1},t.dragHandler=new cs({onDragStart:t.onDragStart,onDragging:t.onDragging,onDragEnd:t.onDragEnd}),t}return e=i,(r=[{key:"getAnchorShape",value:function(){var t=this.props,e=t.anchorData,r=t.style,n=t.node.getAnchorShape(e);if(n)return n;var o=e.x,i=e.y,u=dv(dv({},r),r.hover);return Object(tt.g)("g",null,Object(tt.g)(Wf,fv({className:"lf-node-anchor-hover"},u,{x:o,y:i})),Object(tt.g)(Wf,fv({className:"lf-node-anchor"},r,{x:o,y:i})))}},{key:"customTrajectory",get:function(){return this.props.graphModel.customTrajectory}},{key:"relateEdges",get:function(){var t=this.props,e=t.graphModel,r=e.getAnchorIncomingEdge,n=e.getAnchorOutcomingEdge,o=t.anchorData.id;return{incomingEdgeList:r(o),outcomingEdgeList:n(o)}}},{key:"moveAnchorEnd",value:function(t,e){var r=this.props,n=r.graphModel,o=r.nodeModel,i=r.anchorData,u=Vu({x:t,y:e},n);if(u){var a=u.node,c=u.anchor.id;if(this.preTargetNode&&this.preTargetNode!==u.node&&this.preTargetNode.setElementState(lo.DEFAULT),i.id===c)return;this.preTargetNode=a;var s="".concat(o.id,"_").concat(a.id,"_").concat(c,"_").concat(i.id);if(!this.targetRuleResults.has(s)){var l=u.anchor,f=o.isAllowConnectedAsSource(a,i,l),p=a.isAllowConnectedAsTarget(o,i,l);this.sourceRuleResults.set(s,ua(f)),this.targetRuleResults.set(s,ua(p))}var d=this.sourceRuleResults.get(s).isAllPass,h=this.targetRuleResults.get(s).isAllPass;d&&h?a.setElementState(lo.ALLOW_CONNECT):a.setElementState(lo.NOT_ALLOW_CONNECT)}else this.preTargetNode&&this.preTargetNode.state!==lo.DEFAULT&&this.preTargetNode.setElementState(lo.DEFAULT)}},{key:"isShowLine",value:function(){var t=this.state,e=t.startX,r=t.startY,n=t.endX,o=t.endY;return Ku(e,r,n,o)>10}},{key:"render",value:function(){var t=this,e=this.state,r=e.startX,n=e.startY,o=e.endX,i=e.endY,u=this.props,a=u.anchorData.edgeAddable,c=u.edgeStyle;return Object(tt.g)("g",{className:"lf-anchor"},Object(tt.g)("g",{onMouseDown:function(e){!1!==a&&t.dragHandler.handleMouseDown(e)}},this.getAnchorShape()),this.isShowLine()&&(this.customTrajectory?this.customTrajectory(dv({sourcePoint:{x:r,y:n},targetPoint:{x:o,y:i}},c)):Object(tt.g)(hf,fv({x1:r,y1:n,x2:o,y2:i},c,{"pointer-events":"none"}))))}}])&&vv(e.prototype,r),n&&vv(e,n),i}(tt.a);function xv(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Ev(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?xv(Object(r),!0).forEach((function(e){Sv(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):xv(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Sv(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Pv(t){return Pv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pv(t)}function Av(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return kv(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return kv(t,e)}(t,e)||function(){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 kv(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Dv(t){var e=t.x,r=void 0===e?0:e,n=t.y,o=void 0===n?0:n,i=t.value,u=t.fontSize,a=t.fill,c=void 0===a?"currentColor":a,s=t.overflowMode,l=void 0===s?"default":s,f=t.textWidth,p=void 0===f?"":f,d=t.model,h={textAnchor:"middle","dominant-baseline":"middle",x:r,y:o,fill:c};if(Object.entries(t).forEach((function(t){var e=Av(t,2),r=e[0],n=e[1];"object"!==Pv(n)&&(h[r]=n)})),i){var y=String(i).split(/[\r\n]/g),v=y.length;if("default"!==l){var g=d.BaseType,b=d.modelType;if(g===ho.NODE&&b!==po.TEXT_NODE||g===ho.EDGE&&p)return function(t){var e=t.value,r=t.fontSize,n=t.model,o=t.fontFamily,i=void 0===o?"":o,u=t.lineHeight,a=t.wrapPadding,c=void 0===a?"0, 0":a,s=t.overflowMode,l=t.x,f=t.y,p=n.width,d=n.textHeight,h=t.textWidth||p,y=String(e).split(/[\r\n]/g),v=y.length,g=oa({rows:y,style:{fontSize:"".concat(r,"px"),width:"".concat(h,"px"),fontFamily:i,lineHeight:u,padding:c},rowsLength:v,className:"lf-get-text-height"}),b=n.height>g?n.height:g;d&&(b=d);var m="ellipsis"===s;m&&(b=r+2);return Object(tt.g)("g",null,Object(tt.g)("foreignObject",{width:h,height:b,x:l-h/2,y:f-b/2},Object(tt.g)("div",{className:"lf-node-text-auto-wrap",style:{minHeight:b,width:h,padding:c}},Object(tt.g)("div",{className:m?"lf-node-text-ellipsis-content":"lf-node-text-auto-wrap-content",title:m?y.join(""):"",style:Ev({},t)},y.map((function(t){return Object(tt.g)("div",{className:"lf-node-text--auto-wrap-inner"},t)}))))))}(t)}if(v>1){var m=y.map((function(t,e){var n=(e-(v-1)/2)*(u+2);return Object(tt.g)("tspan",{className:"lf-text-tspan",x:r,y:o+n},t)}));return Object(tt.g)("text",h,m)}return Object(tt.g)("text",h,i)}}function Tv(t){return Tv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tv(t)}function Mv(){return Mv=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Mv.apply(this,arguments)}function Nv(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Cv(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Cv(t,e)}(t,e)||function(){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 Cv(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Rv(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Iv(t,e){return Iv=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Iv(t,e)}function Lv(t){var e=function(){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(t){return!1}}();return function(){var r,n=Uv(t);if(e){var o=Uv(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return zv(this,r)}}function zv(t,e){if(e&&("object"===Tv(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Bv(t)}function Bv(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Uv(t){return Uv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Uv(t)}function Fv(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Hv=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Iv(t,e)}(i,t);var e,r,n,o=Lv(i);function i(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),Fv(Bv(e=o.call(this)),"dragHandler",void 0),Fv(Bv(e),"sumDeltaX",0),Fv(Bv(e),"sumDeltaY",0),Fv(Bv(e),"stepDrag",void 0),Fv(Bv(e),"onDragging",(function(t){var r=t.deltaX,n=t.deltaY,o=e.props,i=o.model,u=Nv(o.graphModel.transformModel.fixDeltaXY(r,n),2),a=u[0],c=u[1];i.moveText(a,c)})),Fv(Bv(e),"dblClickHandler",(function(){e.props.editable&&e.props.model.setElementState(lo.TEXT_EDIT)})),Fv(Bv(e),"mouseDownHandle",(function(t){var r=e.props,n=r.draggable,o=r.model,i=r.graphModel.editConfigModel.nodeTextDraggable;(n||i)&&(e.stepDrag.model=o,e.stepDrag.handleMouseDown(t))}));t.model;var r=t.draggable;return e.stepDrag=new cs({onDragging:e.onDragging,step:1,isStopPropagation:r}),e}return e=i,(r=[{key:"getShape",value:function(){var t=this.props,e=t.model,r=t.graphModel,n=e.text,o=r.editConfigModel,i=n.value,u=n.x,a=n.y,c=n.editable,s=n.draggable,l={x:u,y:a,className:"",value:i};c?l.className="lf-element-text":s||o.nodeTextDraggable?l.className="lf-text-draggable":l.className="lf-text-disabled";var f=e.getTextStyle();return Object(tt.g)(Dv,Mv({},l,f,{model:e}))}},{key:"render",value:function(){if(this.props.model.text)return Object(tt.g)("g",{onMouseDown:this.mouseDownHandle,onDblClick:this.dblClickHandler},this.getShape())}}])&&Rv(e.prototype,r),n&&Rv(e,n),i}(tt.a),Xv=null!==tn(window,"navigator.userAgent","").match(/MSIE|Trident/),Gv=r(130);function Yv(t){return Yv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yv(t)}function Vv(){return Vv=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Vv.apply(this,arguments)}function Wv(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Kv(t,e){return Kv=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Kv(t,e)}function $v(t){var e=function(){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(t){return!1}}();return function(){var r,n=Jv(t);if(e){var o=Jv(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Zv(this,r)}}function Zv(t,e){if(e&&("object"===Yv(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return qv(t)}function qv(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Jv(t){return Jv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Jv(t)}function Qv(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var tg=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Kv(t,e)}(i,t);var e,r,n,o=$v(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),Qv(qv(e=o.call(this,t)),"style",{}),Qv(qv(e),"defaultAngle",void 0),Qv(qv(e),"normal",void 0),Qv(qv(e),"stepperDrag",void 0),Qv(qv(e),"onDragging",(function(t){var r,n=t.event,o=e.props,i=o.graphModel,u=o.nodeModel,a=o.eventCenter,c=i.selectNodes,s=u.x,l=u.y,f=n.clientX,p=n.clientY,d=i.getPointByClient({x:f,y:p}).canvasOverlayPosition,h=d.x,y=d.y,v=new Es(h-s,y-l),g=(null===(r=e.normal)||void 0===r?void 0:r.angle(v))-e.defaultAngle,b=new al(-s,-l).rotate(g).translate(s,l).toString();u.transform=b,u.rotate=g;var m=Object(Gv.map)(c,(function(t){return t.id}));-1===m.indexOf(u.id)&&(m=[u.id]);var O=Object(Gv.reduce)(m,(function(t,e){var r=i.getNodeModelById(e);return t[e]=null==r?void 0:r.getMoveDistance(0,0,!1),t}),{});m.forEach((function(t){i.getNodeEdges(t).forEach((function(t){if(O[t.sourceNodeId]){var e=i.getNodeModelById(t.sourceNodeId).anchors.find((function(e){return e.id===t.sourceAnchorId}));t.updateStartPoint(e)}if(O[t.targetNodeId]){var r=i.getNodeModelById(t.targetNodeId).anchors.find((function(e){return e.id===t.targetAnchorId}));t.updateEndPoint(r)}}))})),a.emit(yo.NODE_ROTATE,{e:n,nodeModel:u})})),e.style=t.style,e.stepperDrag=new cs({onDragging:e.onDragging}),e}return e=i,(r=[{key:"render",value:function(){var t=this,e=this.props.nodeModel,r=e.x,n=e.y,o=r+e.width/2+20,i=n-e.height/2-20;return this.normal=new Es(1,0),this.defaultAngle=this.normal.angle(new Es(o-r,i-n)),e.defaultAngle=this.defaultAngle,Object(tt.g)("g",{className:"lf-rotate-control"},Object(tt.g)("g",{onMouseDown:function(e){t.stepperDrag.handleMouseDown(e)}},Object(tt.g)(Wf,Vv({},this.style,{cx:o,cy:i}))))}}])&&Wv(e.prototype,r),n&&Wv(e,n),i}(tt.a);function eg(t){return eg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},eg(t)}var rg=["className"];function ng(){return ng=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},ng.apply(this,arguments)}function og(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function ig(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return ug(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ug(t,e)}(t,e)||function(){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 ug(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ag(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function cg(t,e){return cg=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},cg(t,e)}function sg(t){var e=function(){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(t){return!1}}();return function(){var r,n=pg(t);if(e){var o=pg(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return lg(this,r)}}function lg(t,e){if(e&&("object"===eg(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return fg(t)}function fg(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function pg(t){return pg=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},pg(t)}function dg(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var hg=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&cg(t,e)}(u,t);var e,r,n,i=sg(u);function u(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),dg(fg(e=i.call(this)),"t",void 0),dg(fg(e),"moveOffset",void 0),dg(fg(e),"stepDrag",void 0),dg(fg(e),"contextMenuTime",void 0),dg(fg(e),"mouseUpDrag",void 0),dg(fg(e),"startTime",void 0),dg(fg(e),"clickTimer",void 0),dg(fg(e),"modelDisposer",void 0),dg(fg(e),"onDragStart",(function(t){var r=t.event,n=r.clientX,o=r.clientY,i=e.props,u=i.model,a=i.graphModel.getPointByClient({x:n,y:o}).canvasOverlayPosition,c=a.x,s=a.y;e.moveOffset={x:u.x-c,y:u.y-s}})),dg(fg(e),"onDragging",(function(t){var r=t.event,n=e.props,o=n.model,i=n.graphModel,u=i.editConfigModel,a=u.stopMoveGraph,c=u.autoExpand,s=i.transformModel,l=i.selectNodes,f=i.width,p=i.height,d=i.gridSize;o.isDragging=!0;var h=r.clientX,y=r.clientY,v=i.getPointByClient({x:h,y:y}).canvasOverlayPosition,g=v.x,b=v.y,m=ig(s.CanvasPointToHtmlPoint([g,b]),2),O=m[0],_=m[1];if(g+=e.moveOffset.x,b+=e.moveOffset.y,g=Ui(g,d),b=Ui(b,d),f&&p){if(!c||a||!(O<0||_<0||O>f||_>p)){var w=ig(s.CanvasPointToHtmlPoint([g-o.width/2,b-o.height/2]),2),j=w[0],x=w[1],E=ig(s.CanvasPointToHtmlPoint([g+o.width/2,b+o.height/2]),2),S=E[0],P=E[1],A=Math.max(d,20),k=[];j<0?k=[A,0]:S>i.width?k=[-A,0]:x<0?k=[0,A]:P>i.height&&(k=[0,-A]),e.t&&sv(e.t);var D=new al(-g,-b).rotate(o.rotate).translate(g,b).toString();o.transform=D;var T=l.map((function(t){return t.id}));-1===T.indexOf(o.id)&&(T=[o.id]),k.length>0&&!a&&c?e.t=cv((function(){var t=ig(k,2),e=t[0],r=t[1];s.translate(e,r);var n=-e/s.SCALE_X,o=-r/s.SCALE_X;i.moveNodes(T,n,o)})):i.moveNodes(T,g-o.x,b-o.y)}}else i.moveNode2Coordinate(o.id,g,b)})),dg(fg(e),"onDragEnd",(function(){e.t&&sv(e.t),e.props.model.isDragging=!1})),dg(fg(e),"handleMouseUp",(function(){var t=e.props.model;e.mouseUpDrag=t.isDragging})),dg(fg(e),"handleClick",(function(t){var r=!1===e.mouseUpDrag;if(e.startTime){var n=e.props,o=n.model,i=n.graphModel;if(r){var u={data:o.getData(),e:t,position:i.getPointByClient({x:t.clientX,y:t.clientY}),isSelected:!1,isMultiple:!1},a=2===t.button,c=2===t.detail;if(!a){var s=i.editConfigModel,l=Yi(t,s);u.isMultiple=l,o.isSelected&&!c&&l?(u.isSelected=!1,o.setSelected(!1)):(i.selectNodeById(o.id,l),u.isSelected=!0,e.toFront()),c?(s.nodeTextEdit&&o.text.editable&&(o.setSelected(!1),i.setElementStateById(o.id,lo.TEXT_EDIT)),i.eventCenter.emit(yo.NODE_DBCLICK,u)):(i.eventCenter.emit(yo.ELEMENT_CLICK,u),i.eventCenter.emit(yo.NODE_CLICK,u))}}}})),dg(fg(e),"handleContextMenu",(function(t){t.preventDefault();var r=e.props,n=r.model,o=r.graphModel,i=n.getData(),u=o.getPointByClient({x:t.clientX,y:t.clientY});o.setElementStateById(n.id,lo.SHOW_MENU,u.domOverlayPosition),n.isSelected||o.selectNodeById(n.id),o.eventCenter.emit(yo.NODE_CONTEXTMENU,{data:i,e:t,position:u}),e.toFront()})),dg(fg(e),"handleMouseDown",(function(t){var r=e.props,n=r.model,o=r.graphModel;e.startTime=(new Date).getTime(),o.editConfigModel.adjustNodePosition&&n.draggable&&e.stepDrag&&e.stepDrag.handleMouseDown(t)})),dg(fg(e),"setHoverON",(function(t){var r=e.props,n=r.model,o=r.graphModel;if(!n.isHovered){var i=n.getData();n.setHovered(!0),o.eventCenter.emit(yo.NODE_MOUSEENTER,{data:i,e:t})}})),dg(fg(e),"setHoverOFF",(function(t){var r=e.props,n=r.model,o=r.graphModel,i=n.getData();n.isHovered&&(n.setHovered(!1),o.eventCenter.emit(yo.NODE_MOUSELEAVE,{data:i,e:t}))})),dg(fg(e),"onMouseOut",(function(t){Xv&&e.setHoverOFF(t)}));var r=t.graphModel,n=r.gridSize,a=r.eventCenter,c=t.model;return e.stepDrag=new cs({onDragStart:e.onDragStart,onDragging:e.onDragging,onDragEnd:e.onDragEnd,step:n,eventType:"NODE",isStopPropagation:!1,eventCenter:a,model:c}),e.modelDisposer=Object(o.F)((function(){return e.props}),(function(t){t&&t.model&&e.stepDrag.setModel(t.model)})),e}return e=u,n=[{key:"getModel",value:function(t){return t}}],(r=[{key:"componentWillUnmount",value:function(){this.modelDisposer&&this.modelDisposer()}},{key:"getAnchorShape",value:function(t){return null}},{key:"getAnchors",value:function(){var t=this,e=this.props,r=e.model,n=e.graphModel,o=r.isSelected,i=r.isHitable,u=r.isDragging,a=r.isShowAnchor;return i&&(o||a)&&!u?hn(r.anchors,(function(e,o){var i=r.getAnchorLineStyle(e),u=r.getAnchorStyle(e);return Object(tt.g)(jv,{anchorData:e,node:t,style:u,edgeStyle:i,anchorIndex:o,nodeModel:r,graphModel:n,setHoverOFF:t.setHoverOFF})})):[]}},{key:"getRotateControl",value:function(){var t=this.props,e=t.model,r=t.graphModel,n=e.isSelected,o=e.isHitable,i=e.enableRotate,u=e.isHovered,a=e.getRotateControlStyle().style;if(o&&(n||u)&&i)return Object(tt.g)(tg,{graphModel:r,nodeModel:e,eventCenter:r.eventCenter,style:a})}},{key:"getText",value:function(){var t=this.props,e=t.model,r=t.graphModel;if(e.state===lo.TEXT_EDIT)return"";if(e.text){var n=r.editConfigModel,o=!1;return(e.text.draggable||n.nodeTextDraggable)&&(o=!0),Object(tt.g)(Hv,{editable:n.nodeTextEdit&&e.text.editable,model:e,graphModel:r,draggable:o})}}},{key:"getStateClassName",value:function(){var t=this.props.model,e=t.state,r=t.isDragging,n=t.isSelected,o="lf-node";switch(e){case lo.ALLOW_CONNECT:o+=" lf-node-allow";break;case lo.NOT_ALLOW_CONNECT:o+=" lf-node-not-allow";break;default:o+=" lf-node-default"}return r&&(o+=" lf-isDragging"),n&&(o+=" lf-node-selected"),o}},{key:"toFront",value:function(){var t=this.props,e=t.model,r=t.graphModel;e.autoToFront&&r.toFront(e.id)}},{key:"render",value:function(){var t,e=this.props,r=e.model,n=e.graphModel,o=n.editConfigModel,i=o.hideAnchors,u=o.adjustNodePosition,a=o.allowRotation,c=n.gridSize,s=n.transformModel.SCALE_X,l=r.isHitable,f=r.draggable,p=r.transform,d=r.getOuterGAttributes(),h=d.className,y=void 0===h?"":h,v=og(d,rg),g=Object(tt.g)("g",{className:"lf-node-content"},Object(tt.g)("g",{transform:p},this.getShape(),this.getText(),a&&this.getRotateControl()),!i&&this.getAnchors());return l?(u&&f&&this.stepDrag.setStep(c*s),t=Object(tt.g)("g",ng({className:"".concat(this.getStateClassName()," ").concat(y),onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onClick:this.handleClick,onMouseEnter:this.setHoverON,onMouseOver:this.setHoverON,onMouseLeave:this.setHoverOFF,onMouseOut:this.onMouseOut,onContextMenu:this.handleContextMenu},v),g)):t=Object(tt.g)("g",ng({className:"".concat(this.getStateClassName()," ").concat(y)},v),g),t}}])&&ag(e.prototype,r),n&&ag(e,n),u}(tt.a);function yg(t){return yg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yg(t)}function vg(){return vg=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},vg.apply(this,arguments)}function gg(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function bg(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function mg(t,e){return mg=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},mg(t,e)}function Og(t){var e=function(){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(t){return!1}}();return function(){var r,n=wg(t);if(e){var o=wg(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return _g(this,r)}}function _g(t,e){if(e&&("object"===yg(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function wg(t){return wg=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},wg(t)}var jg=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&mg(t,e)}(i,t);var e,r,n,o=Og(i);function i(){return gg(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getShape",value:function(){var t=this.props.model,e=t.getNodeStyle();return Object(tt.g)(Df,vg({},e,{x:t.x,y:t.y,width:t.width,height:t.height,radius:t.radius}))}}])&&bg(e.prototype,r),n&&bg(e,n),i}(hg);function xg(t){return xg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xg(t)}function Eg(){return Eg=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Eg.apply(this,arguments)}function Sg(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Pg(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ag(t,e){return Ag=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Ag(t,e)}function kg(t){var e=function(){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(t){return!1}}();return function(){var r,n=Tg(t);if(e){var o=Tg(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Dg(this,r)}}function Dg(t,e){if(e&&("object"===xg(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Tg(t){return Tg=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Tg(t)}var Mg=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ag(t,e)}(i,t);var e,r,n,o=kg(i);function i(){return Sg(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getShape",value:function(){var t=this.props.model,e=t.x,r=t.y,n=t.r,o=t.getNodeStyle();return Object(tt.g)(Wf,Eg({},o,{x:e,y:r,r:n}))}}])&&Pg(e.prototype,r),n&&Pg(e,n),i}(hg);function Ng(t){return Ng="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ng(t)}function Cg(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Rg(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Rg(t,e)}(t,e)||function(){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 Rg(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Ig(t){var e=t.points,r=t.className,n={fill:"transparent",fillOpacity:1,strokeWidth:1,stroke:"#000",strokeOpacity:1,points:""};return Object.entries(t).forEach((function(t){var e=Cg(t,2),r=e[0],o=e[1];"object"!==Ng(o)&&(n[r]=o)})),n.className=r?"lf-basic-shape ".concat(r):"lf-basic-shape",n.points=e.map((function(t){return t.join(",")})).join(" "),Object(tt.g)("polygon",n)}function Lg(t){return Lg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lg(t)}function zg(){return zg=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},zg.apply(this,arguments)}function Bg(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ug(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Fg(t,e){return Fg=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Fg(t,e)}function Hg(t){var e=function(){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(t){return!1}}();return function(){var r,n=Gg(t);if(e){var o=Gg(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Xg(this,r)}}function Xg(t,e){if(e&&("object"===Lg(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Gg(t){return Gg=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Gg(t)}var Yg=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Fg(t,e)}(i,t);var e,r,n,o=Hg(i);function i(){return Bg(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getShape",value:function(){var t=this.props.model,e=t.x,r=t.y,n=t.width,o=t.height,i=t.points,u=t.getNodeStyle(),a={transform:"matrix(1 0 0 1 ".concat(e-n/2," ").concat(r-o/2,")")};return Object(tt.g)("g",a,Object(tt.g)(Ig,zg({},u,{points:i,x:e,y:r})))}}])&&Ug(e.prototype,r),n&&Ug(e,n),i}(hg);function Vg(t){return Vg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vg(t)}function Wg(){return Wg=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Wg.apply(this,arguments)}function Kg(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function $g(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Zg(t,e){return Zg=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Zg(t,e)}function qg(t){var e=function(){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(t){return!1}}();return function(){var r,n=Qg(t);if(e){var o=Qg(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Jg(this,r)}}function Jg(t,e){if(e&&("object"===Vg(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Qg(t){return Qg=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Qg(t)}var tb=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Zg(t,e)}(i,t);var e,r,n,o=qg(i);function i(){return Kg(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getShape",value:function(){var t=this.props.model,e=t.getNodeStyle();return Object(tt.g)("g",null,Object(tt.g)(Ig,Wg({},e,{points:t.points,x:t.x,y:t.y})))}}])&&$g(e.prototype,r),n&&$g(e,n),i}(hg);function eb(t){return eb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},eb(t)}function rb(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return nb(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return nb(t,e)}(t,e)||function(){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 nb(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ob(t){var e=t.x,r=void 0===e?0:e,n=t.y,o=void 0===n?0:n,i=t.rx,u=void 0===i?4:i,a=t.ry,c=void 0===a?4:a,s=t.className,l={cx:r,cy:o,rx:u,ry:c,fill:"transparent",fillOpacity:1,strokeWidth:"1",stroke:"#000",strokeOpacity:1};return Object.entries(t).forEach((function(t){var e=rb(t,2),r=e[0],n=e[1];"object"!==eb(n)&&(l[r]=n)})),l.className=s?"lf-basic-shape ".concat(s):"lf-basic-shape",Object(tt.g)("ellipse",l)}function ib(t){return ib="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ib(t)}function ub(){return ub=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},ub.apply(this,arguments)}function ab(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function cb(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function sb(t,e){return sb=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},sb(t,e)}function lb(t){var e=function(){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(t){return!1}}();return function(){var r,n=pb(t);if(e){var o=pb(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return fb(this,r)}}function fb(t,e){if(e&&("object"===ib(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function pb(t){return pb=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},pb(t)}var db=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&sb(t,e)}(i,t);var e,r,n,o=lb(i);function i(){return ab(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getShape",value:function(){var t=this.props.model,e=t.getNodeStyle();return Object(tt.g)(ob,ub({},e,{x:t.x,y:t.y,rx:t.rx,ry:t.ry}))}}])&&cb(e.prototype,r),n&&cb(e,n),i}(hg);function hb(t){return hb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hb(t)}function yb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function vb(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?yb(Object(r),!0).forEach((function(e){gb(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):yb(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function gb(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function bb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function mb(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ob(t,e){return Ob=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Ob(t,e)}function _b(t){var e=function(){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(t){return!1}}();return function(){var r,n=jb(t);if(e){var o=jb(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return wb(this,r)}}function wb(t,e){if(e&&("object"===hb(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function jb(t){return jb=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},jb(t)}var xb=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ob(t,e)}(i,t);var e,r,n,o=_b(i);function i(){return bb(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getBackground",value:function(){var t=this.props.model,e=t.getTextStyle(),r=t.width,n=t.height,o=t.x,i=t.y,u=vb(vb({},e.background),{},{x:o,y:i-1,width:r,height:n});return Object(tt.g)(Df,u)}},{key:"getShape",value:function(){return Object(tt.g)("g",null,this.getBackground())}}])&&mb(e.prototype,r),n&&mb(e,n),i}(hg);function Eb(t){return Eb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Eb(t)}function Sb(){return Sb=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Sb.apply(this,arguments)}function Pb(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ab(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function kb(t,e){return kb=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},kb(t,e)}function Db(t){var e=function(){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(t){return!1}}();return function(){var r,n=Nb(t);if(e){var o=Nb(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Tb(this,r)}}function Tb(t,e){if(e&&("object"===Eb(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Mb(t)}function Mb(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Nb(t){return Nb=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Nb(t)}function Cb(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Rb=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&kb(t,e)}(i,t);var e,r,n,o=Db(i);function i(){var t;Pb(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Cb(Mb(t=o.call.apply(o,[this].concat(r))),"ref",void 0),Cb(Mb(t),"currentProperties",void 0),Cb(Mb(t),"preProperties",void 0),Cb(Mb(t),"setRef",(function(e){t.ref=e})),t}return e=i,(r=[{key:"rootEl",get:function(){return this.ref}},{key:"setHtml",value:function(t){t.appendChild(document.createElement("div"))}},{key:"shouldUpdate",value:function(){if(!this.preProperties||this.preProperties!==this.currentProperties)return this.preProperties=this.currentProperties,!0}},{key:"componentDidMount",value:function(){this.shouldUpdate()&&this.setHtml(this.rootEl)}},{key:"componentDidUpdate",value:function(){this.shouldUpdate()&&this.setHtml(this.rootEl)}},{key:"getShape",value:function(){var t=this.props.model,e=t.x,r=t.y,n=t.height,o=t.width,i=t.getNodeStyle();return this.currentProperties=JSON.stringify(t.properties),Object(tt.g)("foreignObject",Sb({},i,{x:e-o/2,y:r-n/2,width:o,height:n,ref:this.setRef}))}}])&&Ab(e.prototype,r),n&&Ab(e,n),i}(hg);function Ib(t){return Ib="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ib(t)}function Lb(){return Lb=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Lb.apply(this,arguments)}function zb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Bb(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?zb(Object(r),!0).forEach((function(e){Vb(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):zb(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Ub(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Fb(t,e){return Fb=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Fb(t,e)}function Hb(t){var e=function(){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(t){return!1}}();return function(){var r,n=Yb(t);if(e){var o=Yb(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Xb(this,r)}}function Xb(t,e){if(e&&("object"===Ib(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Gb(t)}function Gb(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Yb(t){return Yb=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Yb(t)}function Vb(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Wb=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Fb(t,e)}(i,t);var e,r,n,o=Hb(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),Vb(Gb(e=o.call(this,t)),"setHoverON",(function(){e.setState({isHovered:!0})})),Vb(Gb(e),"setHoverOFF",(function(){e.setState({isHovered:!1})})),e.state={isHovered:!1},e}return e=i,(r=[{key:"getBackground",value:function(){var t=this.props.model,e=t.getTextStyle(),r=t.text,n=t.width,o=e.background||{};if(this.state.isHovered&&e.hover&&e.hover.background&&(o=Bb(Bb({},o),e.hover.background)),r&&r.value&&"transparent"!==o.fill){var i,u=e.fontSize,a=e.overflowMode,c=e.lineHeight,s=e.wrapPadding,l=e.textWidth,f=r.value,p=r.x,d=r.y,h=String(f).split(/[\r\n]/g),y=h.length;if("autoWrap"===a&&l){var v=oa({rows:h,style:{fontSize:"".concat(u,"px"),width:"".concat(l,"px"),lineHeight:c,padding:s},rowsLength:y,className:"lf-get-text-height"});i=Bb(Bb({},o),{},{x:p-1,y:d-1,width:l,height:v})}else{var g=0;h&&h.forEach((function(t){var e=Wc(t);g=e>g?e:g}));var b=ia({rows:h,fontSize:u,rowsLength:y}),m=b.width,O=b.height;if("ellipsis"===a&&(m=l||n,O=u+2),"string"==typeof o.wrapPadding){var _=o.wrapPadding.split(",").filter((function(t){return t.trim()})).map((function(t){return parseFloat(t.trim())}));_.length>0&&_.length<=4&&(1===_.length?_=[_[0],_[0],_[0],_[0]]:2===_.length?_=[_[0],_[1],_[0],_[1]]:3===_.length&&(_=[_[0],_[1],_[2],_[1]]),m+=_[1]+_[3],O+=_[0]+_[2],p+=(_[1]-_[3])/2,d+=(_[2]-_[0])/2)}i=Bb(Bb({},o),{},{x:p-1,y:d-1,width:m,height:O})}return Object(tt.g)(Df,i)}}},{key:"getShape",value:function(){var t=this.props.model,e=t.text,r=e.value,n=e.x,o=e.y;if(r){var i=Bb({x:n,y:o,className:"lf-element-text",value:r},t.getTextStyle());return Object(tt.g)("g",{className:"lf-line-text",onMouseEnter:this.setHoverON,onMouseLeave:this.setHoverOFF},this.getBackground(),Object(tt.g)(Dv,Lb({},i,{model:t})))}}}])&&Ub(e.prototype,r),n&&Ub(e,n),i}(Hv);function Kb(t){return Kb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kb(t)}var $b,Zb=["text","sourceAnchorId","targetAnchorId"];function qb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Jb(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?qb(Object(r),!0).forEach((function(e){cm(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):qb(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Qb(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function tm(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return em(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return em(t,e)}(t,e)||function(){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 em(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function rm(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function nm(t,e){return nm=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},nm(t,e)}function om(t){var e=function(){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(t){return!1}}();return function(){var r,n=am(t);if(e){var o=am(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return im(this,r)}}function im(t,e){if(e&&("object"===Kb(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return um(t)}function um(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function am(t){return am=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},am(t)}function cm(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}!function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"}($b||($b={}));var sm=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&nm(t,e)}(i,t);var e,r,n,o=om(i);function i(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),cm(um(e=o.call(this)),"stepDragData",void 0),cm(um(e),"stepDrag",void 0),cm(um(e),"oldEdge",void 0),cm(um(e),"preTargetNode",void 0),cm(um(e),"targetRuleResults",void 0),cm(um(e),"sourceRuleResults",void 0),cm(um(e),"handleMouseDown",(function(t){e.stepDrag&&e.stepDrag.handleMouseDown(t)})),cm(um(e),"onDragStart",(function(){var t=e.props,r=t.x,n=t.y,o=t.edgeModel,i=o.startPoint,u=o.endPoint,a=o.pointsList;e.oldEdge={startPoint:i,endPoint:u,pointsList:a},e.setState({endX:r,endY:n,dragging:!0})})),cm(um(e),"onDragging",(function(t){var r=t.deltaX,n=t.deltaY,o=e.state,i=o.endX,u=o.endY,a=e.props,c=a.graphModel,s=a.type,l=c.transformModel,f=c.editConfigModel,p=tm(l.moveCanvasPointByHtml([i,u],r,n),2),d=p[0],h=p[1];e.setState({endX:d,endY:h,dragging:!0});var y=e.props.edgeModel,v=Vu({x:i,y:u},c);if(v&&v.node&&e.isAllowAdjust(v).pass){var g,b=y.startPoint,m=y.endPoint,O=y.sourceNode,_=y.targetNode;s===$b.SOURCE?g={startPoint:{x:v.anchor.x,y:v.anchor.y},endPoint:{x:m.x,y:m.y},sourceNode:v.node,targetNode:_}:s===$b.TARGET&&(g={startPoint:{x:b.x,y:b.y},endPoint:{x:v.anchor.x,y:v.anchor.y},sourceNode:O,targetNode:v.node}),y.updateAfterAdjustStartAndEnd(g)}else s===$b.SOURCE?y.updateStartPoint({x:d,y:h}):s===$b.TARGET&&y.updateEndPoint({x:d,y:h});y.text.value&&f.adjustEdge&&y.setText(Object.assign({},y.text,y.textPosition))})),cm(um(e),"onDragEnd",(function(t){var r=t.event;try{var n;e.setState({dragging:!1});var o=e.props,i=o.graphModel,u=o.edgeModel,a=o.type,c=e.state,s=c.endX,l=c.endY,f=c.dragging,p=Vu({x:s,y:l},i);if(!f)return;var d,h=!1;if(p&&p.node){var y=e.isAllowAdjust(p),v=y.pass,g=y.msg,b=y.newTargetNode;if(v){var m=u.getData(),O=m.text,_=m.sourceAnchorId,w=void 0===_?"":_,j=m.targetAnchorId;if(d=Jb(Jb({sourceAnchorId:w,targetAnchorId:void 0===j?"":j},Qb(m,Zb)),{},{text:(null==O?void 0:O.value)||""}),a===$b.SOURCE)d=Jb(Jb({},i.edgeGenerator(i.getNodeModelById(p.node.id).getData(),i.getNodeModelById(u.targetNodeId).getData(),d)),{},{sourceNodeId:p.node.id,sourceAnchorId:p.anchor.id,startPoint:{x:p.anchor.x,y:p.anchor.y},targetNodeId:u.targetNodeId,endPoint:Jb({},u.endPoint)}),u.sourceNodeId===p.node.id&&u.sourceAnchorId===p.anchor.id&&(h=!0);else if(a===$b.TARGET){d=Jb(Jb({},i.edgeGenerator(i.getNodeModelById(u.sourceNodeId).getData(),i.getNodeModelById(p.node.id).getData(),d)),{},{sourceNodeId:u.sourceNodeId,startPoint:Jb({},u.startPoint),targetNodeId:p.node.id,targetAnchorId:p.anchor.id,endPoint:{x:p.anchor.x,y:p.anchor.y}}),u.targetNodeId===p.node.id&&u.targetAnchorId===p.anchor.id&&(h=!0)}}else{h=!0;var x=b.getData();i.eventCenter.emit(yo.CONNECTION_NOT_ALLOWED,{data:x,msg:g})}}else h=!0;if(h)e.recoveryEdge();else{var E=u.getData();i.deleteEdgeById(u.id);var S=i.addEdge(Jb({},d));i.eventCenter.emit(yo.EDGE_EXCHANGE_NODE,{data:{newEdge:S.getData(),oldEdge:E}})}null===(n=e.preTargetNode)||void 0===n||n.setElementState(lo.DEFAULT)}finally{e.props.graphModel.eventCenter.emit(yo.ADJUST_POINT_DRAGEND,{e:r,data:e.stepDragData})}})),cm(um(e),"recoveryEdge",(function(){var t=e.props.edgeModel,r=e.oldEdge,n=r.startPoint,o=r.endPoint,i=r.pointsList;t.updateStartPoint(n),t.updateEndPoint(o),t.modelType!==po.LINE_EDGE&&(t.pointsList=i,t.initPoints())})),cm(um(e),"getAdjustPointStyle",(function(){var t=e.props,r=t.graphModel.theme;t.edgeModel;return r.edgeAdjust})),e.state={dragging:!1,endX:0,endY:0},e.targetRuleResults=new Map,e.sourceRuleResults=new Map;var r=t.type,n=t.edgeModel,u=t.graphModel.eventCenter;return e.stepDragData={type:r,edgeData:n.getData()},e.stepDrag=new cs({onDragStart:e.onDragStart,onDragging:e.onDragging,onDragEnd:e.onDragEnd,eventType:"ADJUST_POINT",isStopPropagation:!1,eventCenter:u,data:e.stepDragData}),e}return e=i,(r=[{key:"isAllowAdjust",value:function(t){var e=this.props,r=e.edgeModel,n=r.id,o=r.sourceNode,i=r.targetNode,u=r.sourceAnchorId,a=r.targetAnchorId,c=e.type,s=null,l=null,f=null,p=null;if(c===$b.SOURCE?(s=t.node,l=i,f=t.anchor,p=i.getAnchorInfo(a)):(s=o,l=t.node,p=t.anchor,f=o.getAnchorInfo(u)),this.preTargetNode&&this.preTargetNode!==t.node&&this.preTargetNode.setElementState(lo.DEFAULT),this.preTargetNode=t.node,p.id===f.id)return{pass:!1,msg:"",newTargetNode:l};var d="".concat(s.id,"_").concat(l.id,"_").concat(f.id,"_").concat(p.id);if(!this.targetRuleResults.has(d)){var h=s.isAllowConnectedAsSource(l,f,p,n),y=l.isAllowConnectedAsTarget(s,f,p,n);this.sourceRuleResults.set(d,ua(h)),this.targetRuleResults.set(d,ua(y))}var v=this.sourceRuleResults.get(d),g=v.isAllPass,b=v.msg,m=this.targetRuleResults.get(d),O=m.isAllPass,_=m.msg,w=g&&O?lo.ALLOW_CONNECT:lo.NOT_ALLOW_CONNECT;return c===$b.SOURCE?s.setElementState(w):l.setElementState(w),{pass:g&&O,msg:_||b,newTargetNode:l}}},{key:"render",value:function(){var t=this.props,e=t.x,r=t.y,n=t.getAdjustPointShape,o=t.edgeModel,i=this.state.dragging;return Object(tt.g)("g",{pointerEvents:i?"none":"",onMouseDown:this.handleMouseDown},i?"":n(e,r,o))}}])&&rm(e.prototype,r),n&&rm(e,n),i}(tt.a);function lm(t){return lm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lm(t)}function fm(){return fm=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},fm.apply(this,arguments)}function pm(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return dm(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return dm(t,e)}(t,e)||function(){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 dm(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function hm(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ym(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function vm(t,e){return vm=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},vm(t,e)}function gm(t){var e=function(){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(t){return!1}}();return function(){var r,n=Om(t);if(e){var o=Om(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return bm(this,r)}}function bm(t,e){if(e&&("object"===lm(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return mm(t)}function mm(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Om(t){return Om=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Om(t)}function _m(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var wm=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&vm(t,e)}(i,t);var e,r,n,o=gm(i);function i(){var t;hm(this,i);for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return _m(mm(t=o.call.apply(o,[this].concat(r))),"startTime",void 0),_m(mm(t),"contextMenuTime",void 0),_m(mm(t),"clickTimer",void 0),_m(mm(t),"textRef",Object(tt.f)()),_m(mm(t),"handleHover",(function(e,r){var n=t.props,o=n.model,i=n.graphModel.eventCenter;o.setHovered(e);var u=e?yo.EDGE_MOUSEENTER:yo.EDGE_MOUSELEAVE,a=o.getData();i.emit(u,{data:a,e:r})})),_m(mm(t),"setHoverON",(function(e){t.props.model.isHovered||(t.textRef&&t.textRef.current&&t.textRef.current.setHoverON(),t.handleHover(!0,e))})),_m(mm(t),"setHoverOFF",(function(e){t.props.model.isHovered&&(t.textRef&&t.textRef.current&&t.textRef.current.setHoverOFF(),t.handleHover(!1,e))})),_m(mm(t),"handleContextMenu",(function(e){e.preventDefault(),t.contextMenuTime=(new Date).getTime(),t.clickTimer&&clearTimeout(t.clickTimer);var r=t.props,n=r.model,o=r.graphModel,i=o.getPointByClient({x:e.clientX,y:e.clientY});o.setElementStateById(n.id,lo.SHOW_MENU,i.domOverlayPosition),t.toFront(),n.isSelected||o.selectEdgeById(n.id);var u=null==n?void 0:n.getData();o.eventCenter.emit(yo.EDGE_CONTEXTMENU,{data:u,e:e,position:i})})),_m(mm(t),"handleMouseDown",(function(e){e.stopPropagation(),t.startTime=(new Date).getTime()})),_m(mm(t),"handleMouseUp",(function(e){if(t.startTime&&!((new Date).getTime()-t.startTime>200||2===e.button)){var r=2===e.detail,n=t.props,o=n.model,i=n.graphModel,u=null==o?void 0:o.getData(),a=i.getPointByClient({x:e.clientX,y:e.clientY});if(r){var c=i.editConfigModel,s=i.textEditElement;if(s&&s.id===o.id&&i.setElementStateById(o.id,lo.DEFAULT),c.edgeTextEdit&&o.text.editable&&i.setElementStateById(o.id,lo.TEXT_EDIT),o.modelType===po.POLYLINE_EDGE){var l=o,f=i.getPointByClient({x:e.x,y:e.y}).canvasOverlayPosition,p=f.x,d=f.y,h=es({x:p,y:d},l.points);l.dbClickPosition=h}i.eventCenter.emit(yo.EDGE_DBCLICK,{data:u,e:e,position:a})}else i.eventCenter.emit(yo.ELEMENT_CLICK,{data:u,e:e,position:a}),i.eventCenter.emit(yo.EDGE_CLICK,{data:u,e:e,position:a});var y=i.editConfigModel;i.selectEdgeById(o.id,Yi(e,y)),t.toFront()}})),t}return e=i,(r=[{key:"getShape",value:function(){return Object(tt.g)("g",null,this.getEdge())}},{key:"getTextStyle",value:function(){}},{key:"getText",value:function(){var t=this.props,e=t.model,r=t.graphModel;if(e.state===lo.TEXT_EDIT)return null;var n=!1,o=r.editConfigModel;return(e.text.draggable||o.edgeTextDraggable)&&(n=!0),Object(tt.g)(Wb,{ref:this.textRef,editable:o.edgeTextEdit&&e.text.editable,model:e,graphModel:r,draggable:n})}},{key:"getArrowInfo",value:function(){var t=this.props.model,e=t.startPoint,r=t.endPoint,n=t.isSelected;return{start:e,end:r,hover:this.state.hover,isSelected:n}}},{key:"getLastTwoPoints",value:function(){var t=this.props.model;return[t.startPoint,t.endPoint]}},{key:"getArrowStyle",value:function(){return null}},{key:"getArrow",value:function(){var t=this.props.model,e=t.id,r=t.getArrowStyle(),n=r.refY,o=void 0===n?0:n,i=r.refX,u=void 0===i?2:i,a=pm(this.getLastTwoPoints(),2),c=a[0],s=a[1],l="auto";return null!==c&&null!==s&&(l=oc(nc({x:s.x-c.x,y:s.y-c.y,z:0}))),Object(tt.g)("g",null,Object(tt.g)("defs",null,Object(tt.g)("marker",{id:"marker-start-".concat(e),refX:-u,refY:o,overflow:"visible",orient:"auto",markerUnits:"userSpaceOnUse"},this.getStartArrow()),Object(tt.g)("marker",{id:"marker-end-".concat(e),refX:u,refY:o,overflow:"visible",orient:l,markerUnits:"userSpaceOnUse"},this.getEndArrow())))}},{key:"getStartArrow",value:function(){var t=this.props.model.getArrowStyle();return t.stroke,t.strokeWidth,t.offset,t.verticalLength,Object(tt.g)("path",null)}},{key:"getEndArrow",value:function(){var t=this.props.model.getArrowStyle(),e=t.stroke,r=t.strokeWidth,n=t.offset,o=t.verticalLength;return Object(tt.g)("path",{stroke:e,fill:e,strokeWidth:r,transform:"rotate(180)",d:"M 0 0 L ".concat(n," -").concat(o," L ").concat(n," ").concat(o," Z")})}},{key:"getAdjustPointShape",value:function(t,e,r){var n=r.getAdjustPointStyle();return Object(tt.g)(Wf,fm({className:"lf-edge-adjust-point"},n,{x:t,y:e}))}},{key:"getAdjustPoints",value:function(){var t=this.props,e=t.model,r=t.graphModel,n=e.getAdjustStart(),o=e.getAdjustEnd();return Object(tt.g)("g",null,Object(tt.g)(sm,fm({type:"SOURCE"},n,{getAdjustPointShape:this.getAdjustPointShape,edgeModel:e,graphModel:r})),Object(tt.g)(sm,fm({type:"TARGET"},o,{getAdjustPointShape:this.getAdjustPointShape,edgeModel:e,graphModel:r})))}},{key:"getAnimation",value:function(){}},{key:"getAppendWidth",value:function(){return Object(tt.g)("g",null)}},{key:"getAppend",value:function(){return Object(tt.g)("g",{className:"lf-edge-append"},this.getAppendWidth())}},{key:"getEdge",value:function(){return null}},{key:"toFront",value:function(){var t=this.props,e=t.graphModel,r=t.model;e.toFront(r.id)}},{key:"render",value:function(){var t=this.props,e=t.model,r=e.isSelected,n=e.isHitable,o=e.isShowAdjustPoint;return t.graphModel.animation,Object(tt.g)("g",null,Object(tt.g)("g",{className:["lf-edge",!n&&"pointer-none",r&&"lf-edge-selected"].filter(Boolean).join(" "),onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onContextMenu:this.handleContextMenu,onMouseOver:this.setHoverON,onMouseEnter:this.setHoverON,onMouseLeave:this.setHoverOFF},this.getShape(),this.getAppend(),this.getText(),this.getArrow()),o&&r?this.getAdjustPoints():"")}}])&&ym(e.prototype,r),n&&ym(e,n),i}(tt.a);function jm(t){return jm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jm(t)}function xm(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Em(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Em(t,e)}(t,e)||function(){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 Em(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Sm=function(t){var e={d:""};return Object.entries(t).forEach((function(t){var r=xm(t,2),n=r[0],o=r[1],i=jm(o);"style"!==n&&"object"===i||(e[n]=o)})),Object(tt.g)("path",e)};function Pm(t){return Pm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pm(t)}function Am(){return Am=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Am.apply(this,arguments)}function km(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Dm(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Tm(t,e){return Tm=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Tm(t,e)}function Mm(t){var e=function(){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(t){return!1}}();return function(){var r,n=Cm(t);if(e){var o=Cm(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return Nm(this,r)}}function Nm(t,e){if(e&&("object"===Pm(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Cm(t){return Cm=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Cm(t)}var Rm=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Tm(t,e)}(i,t);var e,r,n,o=Mm(i);function i(){return km(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getEdge",value:function(){var t=this.props.model,e=t.startPoint,r=t.endPoint,n=t.isAnimation,o=t.arrowConfig,i=t.getEdgeStyle(),u=t.getEdgeAnimationStyle(),a=u.strokeDasharray,c=u.stroke,s=u.strokeDashoffset,l=u.animationName,f=u.animationDuration,p=u.animationIterationCount,d=u.animationTimingFunction,h=u.animationDirection;return Object(tt.g)(hf,Am({},i,{x1:e.x,y1:e.y,x2:r.x,y2:r.y},o,n?{strokeDasharray:a,stroke:c,style:{strokeDashoffset:s,animationName:l,animationDuration:f,animationIterationCount:p,animationTimingFunction:d,animationDirection:h}}:{}))}},{key:"getAppendWidth",value:function(){var t=this.props.model,e=t.startPoint,r=t.endPoint,n=Zc({start:e,end:r}),o=n.d,i=n.strokeWidth,u=n.fill,a=n.strokeDasharray,c=n.stroke;return Object(tt.g)(Sm,{d:o,fill:u,strokeWidth:i,stroke:c,strokeDasharray:a})}}])&&Dm(e.prototype,r),n&&Dm(e,n),i}(wm);function Im(t){return Im="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Im(t)}function Lm(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return zm(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return zm(t,e)}(t,e)||function(){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 zm(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Bm=function(t){var e={points:"",fill:"none"};return Object.entries(t).forEach((function(t){var r=Lm(t,2),n=r[0],o=r[1];"style"===n?e[n]=o:"object"!==Im(o)&&(e[n]=o)})),Object(tt.g)("polyline",e)};function Um(t){return Um="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Um(t)}function Fm(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Hm(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Fm(Object(r),!0).forEach((function(e){Jm(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Fm(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Xm(){return Xm=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Xm.apply(this,arguments)}function Gm(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return Ym(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ym(t,e)}(t,e)||function(){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 Ym(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Vm(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Wm(t,e){return Wm=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Wm(t,e)}function Km(t){var e=function(){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(t){return!1}}();return function(){var r,n=qm(t);if(e){var o=qm(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return $m(this,r)}}function $m(t,e){if(e&&("object"===Um(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Zm(t)}function Zm(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function qm(t){return qm=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},qm(t)}function Jm(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Qm=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Wm(t,e)}(i,t);var e,r,n,o=Km(i);function i(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),Jm(Zm(t=o.call(this)),"drag",void 0),Jm(Zm(t),"isDragging",void 0),Jm(Zm(t),"isShowAdjustPointTemp",void 0),Jm(Zm(t),"appendInfo",void 0),Jm(Zm(t),"onDragStart",(function(){var e=t.props.model;e.dragAppendStart(),t.isShowAdjustPointTemp=e.isShowAdjustPoint,e.isShowAdjustPoint=!1})),Jm(Zm(t),"onDragging",(function(e){var r=e.deltaX,n=e.deltaY,o=t.props,i=o.model,u=o.graphModel;t.isDragging=!0;var a=u.transformModel,c=u.editConfigModel,s=Gm(a.fixDeltaXY(r,n),2),l=s[0],f=s[1],p=i,d=c.adjustEdgeMiddle;t.appendInfo=d?p.dragAppendSimple(t.appendInfo,{x:l,y:f}):p.dragAppend(t.appendInfo,{x:l,y:f})})),Jm(Zm(t),"onDragEnd",(function(){var e=t.props,r=e.model,n=e.graphModel.eventCenter,o=r;o.dragAppendEnd(),t.isDragging=!1,o.isShowAdjustPoint=t.isShowAdjustPointTemp,t.appendInfo=void 0,n.emit(yo.EDGE_ADJUST,{data:o.getData()})})),Jm(Zm(t),"beforeDragStart",(function(e,r){r.dragAble&&t.drag.handleMouseDown(e),t.appendInfo=r})),t.drag=new cs({onDragStart:t.onDragStart,onDragging:t.onDragging,onDragEnd:t.onDragEnd,isStopPropagation:!1}),t}return e=i,(r=[{key:"getEdge",value:function(){var t=this.props.model,e=t.points,r=t.isAnimation,n=t.arrowConfig,o=t.getEdgeStyle(),i=t.getEdgeAnimationStyle(),u=i.strokeDasharray,a=i.stroke,c=i.strokeDashoffset,s=i.animationName,l=i.animationDuration,f=i.animationIterationCount,p=i.animationTimingFunction,d=i.animationDirection;return Object(tt.g)(Bm,Xm({points:e},o,n,r?{strokeDasharray:u,stroke:a,style:{strokeDashoffset:c,animationName:s,animationDuration:l,animationIterationCount:f,animationTimingFunction:p,animationDirection:d}}:{}))}},{key:"getArrowInfo",value:function(){var t=this.props.model,e=t.points,r=t.isSelected,n={start:null,end:null,hover:this.state.hover,isSelected:r},o=Gc(e);return o.length>=2&&(n.start=o[o.length-2],n.end=o[o.length-1]),n}},{key:"getLastTwoPoints",value:function(){var t=this.props.model.points,e=Gc(t);return e.length>=2?[e[e.length-2],e[e.length-1]]:[null,null]}},{key:"getAppendAttributes",value:function(t){var e,r=t.start,n=t.end;if(r.x===n.x&&r.y===n.y)e="";else{var o={start:r,end:n,offset:10,verticalLength:5},i=Qa(Hm(Hm({},o),{},{type:"start"})),u=Qa(Hm(Hm({},o),{},{type:"end"}));e="M".concat(i.leftX," ").concat(i.leftY," \n L").concat(i.rightX," ").concat(i.rightY," \n L").concat(u.rightX," ").concat(u.rightY,"\n L").concat(u.leftX," ").concat(u.leftY," z")}return{d:e,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}}},{key:"getAppendShape",value:function(t){var e=this.getAppendAttributes(t),r=e.d,n=e.strokeWidth,o=e.fill,i=e.strokeDasharray,u=e.stroke;return Object(tt.g)(Sm,{d:r,fill:o,strokeWidth:n,stroke:u,strokeDasharray:i})}},{key:"getAppendWidth",value:function(){for(var t=this,e=this.props,r=e.model,n=e.graphModel,o=r.pointsList,i=r.draggable,u=[],a=o.length,c=function(e){var r="lf-polyline-append",c={start:{x:o[e].x,y:o[e].y},end:{x:o[e+1].x,y:o[e+1].y},startIndex:e,endIndex:e+1,direction:"",dragAble:!0},s=Object(tt.g)("g",{className:r},t.getAppendShape(c)),l=n.editConfigModel,f=l.adjustEdge,p=l.adjustEdgeMiddle;if(f&&i){var d=c.startIndex,h=c.endIndex,y=p&&(0===d||h===a-1);c.dragAble=!y,c.start.x===c.end.x?(c.dragAble&&(r+="-ew-resize"),c.direction=vo.VERTICAL):c.start.y===c.end.y&&(c.dragAble&&(r+="-ns-resize"),c.direction=vo.HORIZONTAL),s=Object(tt.g)("g",{className:t.isDragging?"lf-dragging":"lf-drag-able",onMouseDown:function(e){return t.beforeDragStart(e,c)}},Object(tt.g)("g",{className:r},t.getAppendShape(c)))}u.push(s)},s=0;s<a-1;s++)c(s);return Object(tt.g)("g",null,u)}}])&&Vm(e.prototype,r),n&&Vm(e,n),i}(wm);function tO(t){return tO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tO(t)}function eO(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return rO(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return rO(t,e)}(t,e)||function(){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 rO(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function nO(){return nO=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},nO.apply(this,arguments)}function oO(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function iO(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function uO(t,e){return uO=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},uO(t,e)}function aO(t){var e=function(){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(t){return!1}}();return function(){var r,n=sO(t);if(e){var o=sO(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return cO(this,r)}}function cO(t,e){if(e&&("object"===tO(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function sO(t){return sO=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},sO(t)}var lO=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&uO(t,e)}(i,t);var e,r,n,o=aO(i);function i(){return oO(this,i),o.apply(this,arguments)}return e=i,(r=[{key:"getEdge",value:function(){var t=this.props.model,e=t.getEdgeStyle(),r=t.path,n=t.isAnimation,o=t.arrowConfig,i=t.getEdgeAnimationStyle(),u=i.strokeDasharray,a=i.stroke,c=i.strokeDashoffset,s=i.animationName,l=i.animationDuration,f=i.animationIterationCount,p=i.animationTimingFunction,d=i.animationDirection;return Object(tt.g)(Sm,nO({d:r},e,o,n?{strokeDasharray:u,stroke:a,style:{strokeDashoffset:c,animationName:s,animationDuration:l,animationIterationCount:f,animationTimingFunction:p,animationDirection:d}}:{}))}},{key:"getAppendWidth",value:function(){var t=this.props.model.path;return Object(tt.g)(Sm,{d:t,strokeWidth:10,stroke:"transparent",fill:"none"})}},{key:"getArrowInfo",value:function(){var t=this.props.model,e=this.state.hover,r=t.isSelected,n=t.getArrowStyle().offset,o=t.pointsList.map((function(t){return{x:t.x,y:t.y}})),i=eO(ts(o,n),2);return{start:i[0],end:i[1],hover:e,isSelected:r}}},{key:"getLastTwoPoints",value:function(){var t=this.props.model,e=t.getArrowStyle().offset,r=t.pointsList.map((function(t){return{x:t.x,y:t.y}}));return ts(r,e)}}])&&iO(e.prototype,r),n&&iO(e,n),i}(wm);function fO(t){return fO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fO(t)}function pO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function dO(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function hO(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function yO(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function vO(t,e){return vO=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},vO(t,e)}function gO(t){var e=function(){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(t){return!1}}();return function(){var r,n=mO(t);if(e){var o=mO(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return bO(this,r)}}function bO(t,e){if(e&&("object"===fO(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function mO(t){return mO=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},mO(t)}var OO=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&vO(t,e)}(i,t);var e,r,n,o=gO(i);function i(){return hO(this,i),o.apply(this,arguments)}return e=i,r=[{key:"getArrowAttributes",value:function(){var t=this.props,e=t.arrowInfo,r=t.style,n=e.start,o=e.end,i={start:n,end:o,offset:r.offset,verticalLength:r.verticalLength,type:"end"},u=Qa(i),a=u.leftX,c=u.leftY,s=u.rightX,l=u.rightY;return function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?pO(Object(r),!0).forEach((function(e){dO(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):pO(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({d:"M".concat(a," ").concat(c," L").concat(o.x," ").concat(o.y," L").concat(s," ").concat(l," z")},r)}},{key:"getShape",value:function(){var t=this.getArrowAttributes(),e=t.d,r=t.strokeWidth,n=t.stroke,o=t.fill;return Object(tt.g)(Sm,{d:e,fill:o,strokeWidth:r,stroke:n})}},{key:"render",value:function(){return Object(tt.g)("g",{className:"lf-arrow"},this.getShape())}}],r&&yO(e.prototype,r),n&&yO(e,n),i}(tt.a);var _O=function(t,e){return Mr(t,e)};var wO=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0},jO=function(){return vt.a.Date.now()},xO=Math.max,EO=Math.min;var SO=function(t,e,r){var n,o,i,u,a,c,s=0,l=!1,f=!1,p=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function d(e){var r=n,i=o;return n=o=void 0,s=e,u=t.apply(i,r)}function h(t){return s=t,a=setTimeout(v,e),l?d(t):u}function y(t){var r=t-c;return void 0===c||r>=e||r<0||f&&t-s>=i}function v(){var t=jO();if(y(t))return g(t);a=setTimeout(v,function(t){var r=e-(t-c);return f?EO(r,i-(t-s)):r}(t))}function g(t){return a=void 0,p&&n?d(t):(n=o=void 0,u)}function b(){var t=jO(),r=y(t);if(n=arguments,o=this,c=t,r){if(void 0===a)return h(c);if(f)return clearTimeout(a),a=setTimeout(v,e),d(c)}return void 0===a&&(a=setTimeout(v,e)),u}return e=ru(e)||0,Pt(r)&&(l=!!r.leading,i=(f="maxWait"in r)?xO(ru(r.maxWait)||0,e):i,p="trailing"in r?!!r.trailing:p),b.cancel=function(){void 0!==a&&clearTimeout(a),s=0,n=c=o=a=void 0},b.flush=function(){return void 0===a?u:g(jO())},b},PO=r(172);function AO(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function kO(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var DO,TO,MO,NO=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),kO(this,"undos",[]),kO(this,"redos",[]),kO(this,"callbacks",[]),kO(this,"stopWatch",null),kO(this,"curData",null),kO(this,"maxSize",50),kO(this,"waitTime",100),kO(this,"eventCenter",void 0),this.eventCenter=e}var e,r,n;return e=t,(r=[{key:"add",value:function(t){_O(wO(this.undos),t)||(this.undos.push(t),_O(this.curData,t)||(this.redos=[]),this.eventCenter.emit(yo.HISTORY_CHANGE,{data:{undos:this.undos,redos:this.redos,undoAble:this.undos.length>1,redoAble:this.redos.length>0}}),this.undos.length>this.maxSize&&this.undos.shift())}},{key:"undoAble",value:function(){return this.undos.length>1}},{key:"undo",value:function(){if(this.undoAble()){var t=this.undos.pop();this.redos.push(t);var e=this.undos.pop();return this.curData=wi(e),e}}},{key:"redoAble",value:function(){return this.redos.length>0}},{key:"redo",value:function(){if(this.redoAble()){var t=this.redos.pop();return this.curData=wi(t),t}}},{key:"watch",value:function(t){var e=this;this.stopWatch&&this.stopWatch(),this.undos.push(t.modelToGraphData()),this.stopWatch=Object(PO.a)(t,SO((function(){var r=t.modelToHistoryData();r&&e.add(r)}),this.waitTime))}}])&&AO(e.prototype,r),n&&AO(e,n),t}();function CO(t){return CO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},CO(t)}function RO(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return IO(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return IO(t,e)}(t,e)||function(){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 IO(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function LO(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function zO(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?LO(Object(r),!0).forEach((function(e){YO(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):LO(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function BO(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function UO(t,e){return UO=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},UO(t,e)}function FO(t){var e=function(){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(t){return!1}}();return function(){var r,n=GO(t);if(e){var o=GO(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return HO(this,r)}}function HO(t,e){if(e&&("object"===CO(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return XO(t)}function XO(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function GO(t){return GO=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},GO(t)}function YO(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var VO,WO,KO,$O=T_((MO=TO=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&UO(t,e)}(i,t);var e,r,n,o=FO(i);function i(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),YO(XO(t=o.call(this)),"ref",Object(tt.f)()),YO(XO(t),"__prevText",{type:"",text:"",id:""}),YO(XO(t),"keyupHandler",(function(e){var r=t.props.graphModel.textEditElement;"Enter"===e.key&&e.altKey&&r.setElementState(0)})),YO(XO(t),"inputHandler",(function(e){var r=e.target.innerText,n=t.props.graphModel.textEditElement;t.__prevText={type:n.type,text:r.replace(/(\r\n)+$|(\n)+$/,""),id:n.id}})),YO(XO(t),"keydownHandler",(function(t){t.stopPropagation()})),t.state={style:{left:0,top:0}},t}return e=i,n=[{key:"getDerivedStateFromProps",value:function(t){var e,r=t.graphModel,n=r.transformModel,o=r.theme,i=o.inputText,u=r.textEditElement;if(u){var a;if(null===(a=u.text)||void 0===a||!a.value)if(u.BaseType===ho.EDGE){var c=(u=u).text,s=u.textPosition,l=s.x,f=s.y;c.x=l,c.y=f,u.setText(c)}else u=u;var p={resize:"auto",whiteSpace:"normal",wordBreak:"break-all"};if(u.BaseType===ho.EDGE){var d=o.edgeText,h=d.overflowMode,y=d.lineHeight,v=d.wrapPadding,g=d.textWidth;g&&"autoWrap"===h&&(e=zO(zO({},p),{},{width:g,minWidth:g,lineHeight:y,padding:v}))}else if(u.BaseType===ho.NODE){var b=o.nodeText,m=b.overflowMode,O=b.lineHeight,_=b.wrapPadding,w=b.textWidth,j=u,x=j.width,E=j.modelType,S=j.textWidth||w||x;(E!==po.TEXT_NODE&&"autoWrap"===m||E===po.TEXT_NODE&&w)&&(e=zO(zO({},p),{},{width:S,minWidth:S,lineHeight:O,padding:_}))}var P=u.text,A=P.x,k=P.y,D=RO(n.CanvasPointToHtmlPoint([A,k]),2);return{style:zO(zO({left:D[0],top:D[1]},e),i)}}}}],(r=[{key:"componentDidUpdate",value:function(){var t=this.props.graphModel;if(this.ref.current&&(this.ref.current.focus(),this.placeCaretAtEnd(this.ref.current)),""!==this.__prevText.id){var e=this.__prevText,r=e.text,n=e.id;t.updateText(n,r),t.eventCenter.emit(yo.TEXT_UPDATE,zO({},this.__prevText)),this.__prevText.id="",this.__prevText.text="",this.__prevText.type=""}}},{key:"placeCaretAtEnd",value:function(t){if(void 0!==window.getSelection&&void 0!==document.createRange){var e=document.createRange();e.selectNodeContents(t),e.collapse(!1);var r=window.getSelection();r.removeAllRanges(),r.addRange(e)}}},{key:"render",value:function(){var t,e=this.props.graphModel.textEditElement,r=this.state.style;return e?Object(tt.g)("div",{contentEditable:!0,className:"lf-text-input",style:r,ref:this.ref,key:e.id,onKeyUp:this.keyupHandler,onKeyDown:this.keydownHandler,onKeyPress:this.keydownHandler,onInput:this.inputHandler},null===(t=e.text)||void 0===t?void 0:t.value):null}}])&&BO(e.prototype,r),n&&BO(e,n),i}(tt.a),YO(TO,"toolName","textEdit"),DO=MO))||DO,ZO=function(t){return t.modelType===po.LINE_EDGE?function(t){var e=t.startPoint,r=t.endPoint,n=(e.x+r.x)/2,o=(e.y+r.y)/2,i=Math.abs(e.x-r.x)+10,u=Math.abs(e.y-r.y)+10;return{x:n-i/2,y:o-u/2,x1:n+i/2,y1:o+u/2}}(t):t.modelType===po.POLYLINE_EDGE?function(t){var e=t.points,r=Gc(e),n=_c(r,8),o=n.x,i=n.y,u=n.width,a=n.height;return{x:o-u/2,y:i-a/2,x1:o+u/2,y1:i+a/2}}(t):t.modelType===po.BEZIER_EDGE?function(t){var e=t.path,r=Jc(e),n=_c(r,8),o=n.x,i=n.y,u=n.width,a=n.height;return{x:o-u/2,y:i-a/2,x1:o+u/2,y1:i+a/2}}(t):void 0};function qO(t){return qO="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qO(t)}function JO(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==r)return;var n,o,i=[],u=!0,a=!1;try{for(r=r.call(t);!(u=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);u=!0);}catch(t){a=!0,o=t}finally{try{u||null==r.return||r.return()}finally{if(a)throw o}}return i}(t,e)||t_(t,e)||function(){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 QO(t){return function(t){if(Array.isArray(t))return e_(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||t_(t)||function(){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 t_(t,e){if(t){if("string"==typeof t)return e_(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e_(t,e):void 0}}function e_(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function r_(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function n_(t,e){return n_=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},n_(t,e)}function o_(t){var e=function(){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(t){return!1}}();return function(){var r,n=a_(t);if(e){var o=a_(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return i_(this,r)}}function i_(t,e){if(e&&("object"===qO(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return u_(t)}function u_(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function a_(t){return a_=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},a_(t)}function c_(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var s_=T_((KO=WO=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&n_(t,e)}(i,t);var e,r,n,o=o_(i);function i(t){var e;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),c_(u_(e=o.call(this)),"stepDrag",void 0),c_(u_(e),"handleMouseDown",(function(t){e.stepDrag.handleMouseDown(t)})),c_(u_(e),"onDragging",(function(t){var r=t.deltaX,n=t.deltaY,o=e.props.graphModel,i=o.getSelectElements(!0);o.moveNodes(i.nodes.map((function(t){return t.id})),r,n)})),c_(u_(e),"handleContextMenu",(function(t){t.preventDefault();var r=e.props,n=r.graphModel,o=r.graphModel,i=o.eventCenter,u=o.selectElements,a=n.getPointByClient({x:t.clientX,y:t.clientY}),c={nodes:[],edges:[]};QO(u.values()).forEach((function(t){t.BaseType===ho.NODE&&c.nodes.push(t.getData()),t.BaseType===ho.EDGE&&c.edges.push(t.getData())})),i.emit(yo.SELECTION_CONTEXTMENU,{data:c,e:t,position:a})}));var r=t.graphModel,n=r.gridSize,u=r.eventCenter;return e.stepDrag=new cs({onDragging:e.onDragging,step:n,eventType:"SELECTION",eventCenter:u}),e}return e=i,(r=[{key:"render",value:function(){var t=this.props.graphModel,e=t.selectElements,r=t.transformModel;if(!(e.size<=1)){var n=Number.MAX_SAFE_INTEGER,o=Number.MAX_SAFE_INTEGER,i=Number.MIN_SAFE_INTEGER,u=Number.MIN_SAFE_INTEGER;e.forEach((function(t){var e={x:0,y:0,x1:0,y1:0};t.BaseType===ho.NODE&&(e=function(t){var e=t.x,r=t.y,n=t.width,o=t.height;return{x:e-n/2,y:r-o/2,x1:e+n/2,y1:r+o/2}}(t)),t.BaseType===ho.EDGE&&(e=ZO(t)),n=Math.min(n,e.x),o=Math.min(o,e.y),i=Math.max(i,e.x1),u=Math.max(u,e.y1)}));var a=JO(r.CanvasPointToHtmlPoint([n,o]),2);n=a[0],o=a[1];var c=JO(r.CanvasPointToHtmlPoint([i,u]),2);i=c[0],u=c[1];var s={left:"".concat(n-10,"px"),top:"".concat(o-10,"px"),width:"".concat(i-n+20,"px"),height:"".concat(u-o+20,"px")};return Object(tt.g)("div",{className:"lf-multiple-select",style:s,onMouseDown:this.handleMouseDown,onContextMenu:this.handleContextMenu})}}}])&&r_(e.prototype,r),n&&r_(e,n),i}(tt.a),c_(WO,"toolName","multipleSelect"),VO=KO))||VO;function l_(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function f_(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var p_=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),f_(this,"tools",void 0),f_(this,"components",void 0),f_(this,"toolMap",new Map),f_(this,"instance",void 0),this.instance=e,this.isDisabledTool($O.toolName)||this.registerTool($O.toolName,$O),this.isDisabledTool(s_.toolName)||this.registerTool(s_.toolName,s_);var r=e.graphModel;r.eventCenter.on("".concat(yo.GRAPH_TRANSFORM,",").concat(yo.NODE_CLICK,",").concat(yo.BLANK_CLICK," "),(function(){var t=r.textEditElement,e=r.editConfigModel,n=e.edgeTextEdit,o=e.nodeTextEdit;(n||o)&&t&&r.textEditElement.setElementState(lo.DEFAULT)}))}var e,r,n;return e=t,(r=[{key:"isDisabledTool",value:function(t){return-1!==this.instance.options.disabledTools.indexOf(t)}},{key:"registerTool",value:function(t,e){this.toolMap.set(t,e)}},{key:"getTools",value:function(){return Array.from(this.toolMap.values())}},{key:"getInstance",value:function(){return this.instance}}])&&l_(e.prototype,r),n&&l_(e,n),t}(),d_=r(173),h_=r.n(d_);function y_(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function v_(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var g_=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),v_(this,"mousetrap",void 0),v_(this,"options",void 0),v_(this,"target",void 0),e.keyboard||(e.keyboard={enabled:!1}),this.options=e;var r=e.lf;this.target=r.container,this.mousetrap=new h_.a(this.target),e.keyboard.enabled&&!r.options.isSilentMode&&this.enable(!0)}var e,r,n;return e=t,(r=[{key:"initShortcuts",value:function(){var t=this,e=this.options.keyboard.shortcuts;if(e)if(Pe(e))e.forEach((function(e){var r=e.keys,n=e.callback,o=e.action;return t.on(r,n,o)}));else{var r=e.keys,n=e.callback,o=e.action;this.on(r,n,o)}}},{key:"on",value:function(t,e,r){this.mousetrap.bind(this.getKeys(t),e,r)}},{key:"disabled",get:function(){return!0!==this.options.keyboard.enabled}},{key:"off",value:function(t,e){this.mousetrap.unbind(this.getKeys(t),e)}},{key:"enable",value:function(t){(this.disabled||t)&&(this.options.keyboard.enabled=!0,this.target instanceof HTMLElement&&(this.target.setAttribute("tabindex","-1"),this.target.style.outline="none"))}},{key:"disable",value:function(){this.disabled||(this.options.keyboard.enabled=!1,this.target instanceof HTMLElement&&this.target.removeAttribute("tabindex"))}},{key:"getKeys",value:function(t){var e=this;return(Array.isArray(t)?t:[t]).map((function(t){return e.formatKey(t)}))}},{key:"formatKey",value:function(t){return t.toLowerCase().replace(/\s/g,"").replace("delete","del").replace("cmd","command")}}])&&y_(e.prototype,r),n&&y_(e,n),t}(),b_=g_,m_=null;function O_(t,e){return t.x+=e,t.y+=e,t.text&&(t.text.x+=e,t.text.y+=e),t}function __(t,e){return t.startPoint&&(t.startPoint.x+=e,t.startPoint.y+=e),t.endPoint&&(t.endPoint.x+=e,t.endPoint.y+=e),t.pointsList&&t.pointsList.length>0&&t.pointsList.forEach((function(t){t.x+=e,t.y+=e})),t.text&&(t.text.x+=e,t.text.y+=e),t}var w_=40,j_=40;function x_(t){return x_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},x_(t)}function E_(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function S_(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?E_(Object(r),!0).forEach((function(e){A_(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):E_(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function P_(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function A_(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var k_=Symbol("plugin register by Logicflow.use"),D_=function(){function t(e){var r,n,o=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),A_(this,"container",void 0),A_(this,"width",void 0),A_(this,"height",void 0),A_(this,"graphModel",void 0),A_(this,"history",void 0),A_(this,"viewMap",new Map),A_(this,"tool",void 0),A_(this,"keyboard",void 0),A_(this,"dnd",void 0),A_(this,"options",void 0),A_(this,"snaplineModel",void 0),A_(this,"components",[]),A_(this,"plugins",void 0),A_(this,"extension",{}),A_(this,"adapterIn",void 0),A_(this,"adapterOut",void 0),A_(this,"getView",(function(t){return o.viewMap.get(t)})),e=Rp(e),this.options=e,this.container=this.initContainer(e.container),this.plugins=e.plugins,this.graphModel=new xl(S_({},e)),this.tool=new p_(this),this.history=new NO(this.graphModel.eventCenter),this.dnd=new Cp({lf:this}),this.keyboard=new b_({lf:this,keyboard:e.keyboard}),!1!==e.snapline&&(this.snaplineModel=new uv(this.graphModel),r=this.graphModel.eventCenter,n=this.snaplineModel,r.on("node:mousemove",(function(t){var e=t.data;n.setNodeSnapLine(e)})),r.on("node:mouseup",(function(){n.clearSnapline()}))),function(t,e){var r=t.keyboard,n=r.options.keyboard;r.on(["cmd + c","ctrl + c"],(function(){if(j_=w_,!n.enabled)return!0;if(e.textEditElement)return!0;var r=t.options.guards,o=e.getSelectElements(!1);return r&&r.beforeClone&&!r.beforeClone(o)||0===o.nodes.length&&0===o.edges.length?(m_=null,!0):((m_=o).nodes.forEach((function(t){return O_(t,w_)})),m_.edges.forEach((function(t){return __(t,w_)})),!1)})),r.on(["cmd + v","ctrl + v"],(function(){if(!n.enabled)return!0;if(e.textEditElement)return!0;if(m_&&(m_.nodes||m_.edges)){t.clearSelectElements();var r=t.addElements(m_,j_);if(!r)return!0;r.nodes.forEach((function(e){return t.selectElementById(e.id,!0)})),r.edges.forEach((function(e){return t.selectElementById(e.id,!0)})),m_.nodes.forEach((function(t){return O_(t,w_)})),m_.edges.forEach((function(t){return __(t,w_)})),j_+=w_}return!1})),r.on(["cmd + z","ctrl + z"],(function(){return!n.enabled||!!e.textEditElement||(t.undo(),!1)})),r.on(["cmd + y","ctrl + y"],(function(){return!n.enabled||!!e.textEditElement||(t.redo(),!1)})),r.on(["backspace"],(function(){if(!n.enabled)return!0;if(e.textEditElement)return!0;var r=e.getSelectElements(!0);return t.clearSelectElements(),r.edges.forEach((function(e){return t.deleteEdge(e.id)})),r.nodes.forEach((function(e){return t.deleteNode(e.id)})),!1}))}(this,this.graphModel),this.keyboard.initShortcuts(),this.defaultRegister(),this.installPlugins(e.disabledPlugins)}var e,r,n;return e=t,r=[{key:"register",value:function(t,e){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if("string"==typeof t){var n={BaseEdge:wm,BaseEdgeModel:ga,BaseNode:hg,BaseNodeModel:Bd,RectNode:jg,RectNodeModel:Ey,CircleNode:Mg,CircleNodeModel:oh,PolygonNode:Yg,PolygonNodeModel:sy,TextNode:xb,TextNodeModel:Uy,LineEdge:Rm,LineEdgeModel:Ca,DiamondNode:tb,DiamondNodeModel:Eh,PolylineEdge:Qm,PolylineEdgeModel:Ja,BezierEdge:lO,BezierEdgeModel:rd,EllipseNode:db,EllipseNodeModel:Xh,HtmlNode:Rb,HtmlNodeModel:tv,h:tt.g,type:t};this.viewMap.forEach((function(t){var e=t.extendKey;e&&(n[e]=t)})),this.graphModel.modelMap.forEach((function(t){var e=t.extendKey;e&&(n[e]=t)}));var o=e(n),i=o.view,u=o.model,a=i;r&&!a.isObervered&&(a.isObervered=!0,a=Q(a)),this.setView(t,a),this.graphModel.setModel(t,u)}else this.registerElement(t)}},{key:"registerElement",value:function(t){var e=t.view;!1===t.isObserverView||e.isObervered||(e.isObervered=!0,e=Q(e)),this.setView(t.type,e),this.graphModel.setModel(t.type,t.model)}},{key:"batchRegister",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];e.forEach((function(e){t.registerElement(e)}))}},{key:"defaultRegister",value:function(){this.registerElement({view:jg,model:Ey,type:"rect"}),this.registerElement({type:"circle",view:Mg,model:oh}),this.registerElement({type:"polygon",view:Yg,model:sy}),this.registerElement({type:"line",view:Rm,model:Ca}),this.registerElement({type:"polyline",view:Qm,model:Ja}),this.registerElement({type:"bezier",view:lO,model:rd}),this.registerElement({type:"text",view:xb,model:Uy}),this.registerElement({type:"ellipse",view:db,model:Xh}),this.registerElement({type:"diamond",view:tb,model:Eh}),this.registerElement({type:"html",view:Rb,model:tv})}},{key:"selectElementById",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.graphModel.selectElementById(t,e),!e&&r&&this.graphModel.toFront(t)}},{key:"focusOn",value:function(t){var e=this.graphModel.transformModel,r=t.coordinate,n=t.id;if(!r){var o=this.getNodeModelById(n);o&&(r=o.getData());var i=this.getEdgeModelById(n);i&&(r=i.textPosition)}var u=r,a=u.x,c=u.y;e.focusOn(a,c,this.graphModel.width,this.graphModel.height)}},{key:"setTheme",value:function(t){this.graphModel.setTheme(t)}},{key:"resize",value:function(t,e){this.graphModel.resize(t,e),this.options.width=this.graphModel.width,this.options.height=this.graphModel.height}},{key:"setDefaultEdgeType",value:function(t){this.graphModel.setDefaultEdgeType(t)}},{key:"updateText",value:function(t,e){this.graphModel.updateText(t,e)}},{key:"deleteElement",value:function(t){var e,r,n,o=this.getModelById(t);return!!o&&null!==(r=null===(n=(A_(e={},ho.NODE,this.deleteNode),A_(e,ho.EDGE,this.deleteEdge),e)[o.BaseType])||void 0===n?void 0:n.call(this,t))&&void 0!==r&&r}},{key:"getModelById",value:function(t){return this.graphModel.getElement(t)}},{key:"getDataById",value:function(t){var e;return null===(e=this.graphModel.getElement(t))||void 0===e?void 0:e.getData()}},{key:"changeNodeType",value:function(t,e){this.graphModel.changeNodeType(t,e)}},{key:"changeEdgeType",value:function(t,e){this.graphModel.changeEdgeType(t,e)}},{key:"getNodeEdges",value:function(t){return this.graphModel.getNodeEdges(t)}},{key:"addNode",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yo.NODE_ADD,r=arguments.length>2?arguments[2]:void 0;return this.graphModel.addNode(t,e,r)}},{key:"deleteNode",value:function(t){var e=this.graphModel.getNodeModelById(t);if(!e)return!1;var r=e.getData(),n=this.options.guards,o=!n||!n.beforeDelete||n.beforeDelete(r);return o&&this.graphModel.deleteNode(t),o}},{key:"cloneNode",value:function(t){var e=this.graphModel.getNodeModelById(t).getData(),r=this.options.guards;if(!r||!r.beforeClone||r.beforeClone(e))return this.graphModel.cloneNode(t)}},{key:"changeNodeId",value:function(t,e){return this.graphModel.changeNodeId(t,e)}},{key:"getNodeModelById",value:function(t){return this.graphModel.getNodeModelById(t)}},{key:"getNodeDataById",value:function(t){var e;return null===(e=this.graphModel.getNodeModelById(t))||void 0===e?void 0:e.getData()}},{key:"addEdge",value:function(t){return this.graphModel.addEdge(t)}},{key:"deleteEdge",value:function(t){var e=this.options.guards,r=this.graphModel.edgesMap[t];if(!r)return!1;var n=r.model.getData(),o=!e||!e.beforeDelete||e.beforeDelete(n);return o&&this.graphModel.deleteEdgeById(t),o}},{key:"deleteEdgeByNodeId",value:function(t){var e=t.sourceNodeId,r=t.targetNodeId;e&&r?this.graphModel.deleteEdgeBySourceAndTarget(e,r):e?this.graphModel.deleteEdgeBySource(e):r&&this.graphModel.deleteEdgeByTarget(r)}},{key:"changeEdgeId",value:function(t,e){return this.graphModel.changeEdgeId(t,e)}},{key:"getEdgeModelById",value:function(t){var e;return null===(e=this.graphModel.edgesMap[t])||void 0===e?void 0:e.model}},{key:"getEdgeModels",value:function(t){var e=this.graphModel.edges,r=t.sourceNodeId,n=t.targetNodeId;if(r&&n){var o=[];return e.forEach((function(t){t.sourceNodeId===r&&t.targetNodeId===n&&o.push(t)})),o}if(r){var i=[];return e.forEach((function(t){t.sourceNodeId===r&&i.push(t)})),i}if(n){var u=[];return e.forEach((function(t){t.targetNodeId===n&&u.push(t)})),u}return[]}},{key:"getEdgeDataById",value:function(t){var e;return null===(e=this.getEdgeModelById(t))||void 0===e?void 0:e.getData()}},{key:"getNodeIncomingEdge",value:function(t){return this.graphModel.getNodeIncomingEdge(t)}},{key:"getNodeOutgoingEdge",value:function(t){return this.graphModel.getNodeOutgoingEdge(t)}},{key:"getNodeIncomingNode",value:function(t){return this.graphModel.getNodeIncomingNode(t)}},{key:"getNodeOutgoingNode",value:function(t){return this.graphModel.getNodeOutgoingNode(t)}},{key:"editText",value:function(t){this.graphModel.editText(t)}},{key:"setProperties",value:function(t,e){var r;null===(r=this.graphModel.getElement(t))||void 0===r||r.setProperties(aa(e))}},{key:"deleteProperty",value:function(t,e){var r;null===(r=this.graphModel.getElement(t))||void 0===r||r.deleteProperty(e)}},{key:"getProperties",value:function(t){var e;return null===(e=this.graphModel.getElement(t))||void 0===e?void 0:e.getProperties()}},{key:"toFront",value:function(t){this.graphModel.toFront(t)}},{key:"setElementZIndex",value:function(t,e){return this.graphModel.setElementZIndex(t,e)}},{key:"addElements",value:function(t){for(var e=this,r=t.nodes,n=t.edges,o={},i={nodes:[],edges:[]},u=0;u<r.length;u++){var a=r[u],c=a.id,s=this.addNode(a);if(!s)return;c&&(o[c]=s.id),i.nodes.push(s)}return n.forEach((function(t){var r=t.sourceNodeId,n=t.targetNodeId;o[r]&&(r=o[r]),o[n]&&(n=o[n]);var u=e.graphModel.addEdge(S_(S_({},t),{},{sourceNodeId:r,targetNodeId:n}));i.edges.push(u)})),i}},{key:"getAreaElement",value:function(t,e){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return this.graphModel.getAreaElement(t,e,r,n,o).map((function(t){return t.getData()}))}},{key:"getSelectElements",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.graphModel.getSelectElements(t)}},{key:"clearSelectElements",value:function(){this.graphModel.clearSelectElements()}},{key:"getGraphData",value:function(){var t=this.graphModel.modelToGraphData();if(this.adapterOut){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return this.adapterOut.apply(this,[t].concat(r))}return t}},{key:"getGraphRawData",value:function(){return this.graphModel.modelToGraphData()}},{key:"clearData",value:function(){this.graphModel.clearData()}},{key:"updateEditConfig",value:function(t){var e=this.graphModel,r=e.editConfigModel,n=e.transformModel;r.updateEditConfig(t),void 0!==(null==t?void 0:t.stopMoveGraph)&&n.updateTranslateLimits(t.stopMoveGraph),null!=t&&t.isSilentMode?this.keyboard.disable():this.keyboard.enable(!0)}},{key:"getEditConfig",value:function(){return this.graphModel.editConfigModel.getConfig()}},{key:"getPointByClient",value:function(t,e){return this.graphModel.getPointByClient({x:t,y:e})}},{key:"undo",value:function(){if(this.history.undoAble()){var t=aa(this.history.undo());this.clearSelectElements(),this.graphModel.graphDataToModel(t)}}},{key:"redo",value:function(){if(this.history.redoAble()){var t=aa(this.history.redo());this.clearSelectElements(),this.graphModel.graphDataToModel(t)}}},{key:"zoom",value:function(t,e){return this.graphModel.transformModel.zoom(t,e)}},{key:"resetZoom",value:function(){this.graphModel.transformModel.resetZoom()}},{key:"setZoomMiniSize",value:function(t){this.graphModel.transformModel.setZoomMiniSize(t)}},{key:"setZoomMaxSize",value:function(t){this.graphModel.transformModel.setZoomMaxSize(t)}},{key:"getTransform",value:function(){var t=this.graphModel.transformModel;return{SCALE_X:t.SCALE_X,SCALE_Y:t.SCALE_Y,TRANSLATE_X:t.TRANSLATE_X,TRANSLATE_Y:t.TRANSLATE_Y}}},{key:"translate",value:function(t,e){this.graphModel.transformModel.translate(t,e)}},{key:"resetTranslate",value:function(){var t=this.graphModel.transformModel,e=t.TRANSLATE_X,r=t.TRANSLATE_Y;this.translate(-e,-r)}},{key:"translateCenter",value:function(){this.graphModel.translateCenter()}},{key:"fitView",value:function(t,e){void 0===e&&(e=t),this.graphModel.fitView(t,e)}},{key:"openEdgeAnimation",value:function(t){this.graphModel.openEdgeAnimation(t)}},{key:"closeEdgeAnimation",value:function(t){this.graphModel.closeEdgeAnimation(t)}},{key:"on",value:function(t,e){this.graphModel.eventCenter.on(t,e)}},{key:"off",value:function(t,e){this.graphModel.eventCenter.off(t,e)}},{key:"once",value:function(t,e){this.graphModel.eventCenter.once(t,e)}},{key:"emit",value:function(t,e){this.graphModel.eventCenter.emit(t,e)}},{key:"initContainer",value:function(t){var e=document.createElement("div");return e.style.position="relative",e.style.width="100%",e.style.height="100%",t.innerHTML="",t.appendChild(e),e}},{key:"installPlugins",value:function(){var e,r=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=null!==(e=this.plugins)&&void 0!==e?e:t.extensions;o.forEach((function(t){var e=null,o=null;t[k_]?(e=t.extension,o=t.props):e=t;var i=e.pluginName||e.name;-1===n.indexOf(i)&&r.installPlugin(e,o)}))}},{key:"installPlugin",value:function(e,r){if("object"===x_(e)){var n=e.install,o=e.render;return n&&n.call(e,this,t),o&&this.components.push(o.bind(e)),void(this.extension[e.pluginName]=e)}var i=e,u=new i({lf:this,LogicFlow:t,options:this.options.pluginsOptions,props:r});u.render&&this.components.push(u.render.bind(u)),this.extension[i.pluginName]=u}},{key:"updateAttributes",value:function(t,e){this.graphModel.updateAttributes(t,e)}},{key:"createFakerNode",value:function(t){var e=this.graphModel.modelMap.get(t.type);if(e){var r=new e(S_(S_({},t),{},{virtual:!0}),this.graphModel);return this.graphModel.setFakerNode(r),r}}},{key:"removeFakerNode",value:function(){this.graphModel.removeFakerNode()}},{key:"setNodeSnapLine",value:function(t){this.snaplineModel&&this.snaplineModel.setNodeSnapLine(t)}},{key:"removeNodeSnapLine",value:function(){this.snaplineModel&&this.snaplineModel.clearSnapline()}},{key:"setView",value:function(t,e){this.viewMap.set(t,e)}},{key:"renderRawData",value:function(t){this.graphModel.graphDataToModel(aa(t)),!1!==this.options.history&&this.history.watch(this.graphModel),Object(tt.j)(Object(tt.g)(kp,{getView:this.getView,tool:this.tool,options:this.options,dnd:this.dnd,snaplineModel:this.snaplineModel,graphModel:this.graphModel}),this.container),this.emit(yo.GRAPH_RENDERED,this.graphModel.modelToGraphData())}},{key:"render",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.adapterIn&&(t=this.adapterIn(t)),this.renderRawData(t)}}],n=[{key:"use",value:function(t,e){var r,n,o=t.pluginName;o||(o=t.name);var i=null===(r=this.extensions.get(o))||void 0===r?void 0:r.extension;i&&i.destroy&&i.destroy(),this.extensions.set(o,(A_(n={},k_,k_),A_(n,"extension",t),A_(n,"props",e),n))}}],r&&P_(e.prototype,r),n&&P_(e,n),t}();function T_(t){return Q(t)}A_(D_,"extensions",new Map);e.default=D_}])}));