mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-06-08 01:17:23 +08:00
82 lines
569 KiB
JavaScript
82 lines
569 KiB
JavaScript
import{g as HO,_ as rf,H as of}from"./index-c61a73ff.js";import{u as XO}from"./hooks-55e29a46.js";import{V as GO}from"./styles-eecf6cc2.js";import{S as UO}from"./set-up-729eb907.js";import"./_vue_commonjs-external-c09696f7.js";const YO=[{incoming:[],outgoing:["Flow_33inf2k"],dockers:[],type:2,properties:{a:"efrwe",b:"wewe",name:"开始",x:280,y:200,text:{x:280,y:200,value:"开始"},logicFlowType:"bpmn:startEvent"},key:"Event_1d42u4p"},{incoming:["Flow_379e0o9"],outgoing:[],dockers:[],type:3,properties:{a:"efrwe",b:"wewe",name:"结束",x:920,y:200,text:{x:920,y:200,value:"结束"},logicFlowType:"bpmn:endEvent"},key:"Event_08p8i6q"},{incoming:["Flow_0pfouf0"],outgoing:["Flow_3918lhh"],dockers:[],type:6,properties:{a:"efrwe",b:"wewe",name:"网关",x:580,y:200,text:{x:580,y:200,value:"网关"},logicFlowType:"bpmn:exclusiveGateway"},key:"Gateway_1fngqgj"},{incoming:["Flow_33inf2k"],outgoing:["Flow_0pfouf0"],dockers:[],type:4,properties:{a:"efrwe",b:"wewe",name:"用户",x:420,y:200,text:{x:420,y:200,value:"用户"},logicFlowType:"bpmn:userTask"},key:"Activity_2mgtaia"},{incoming:["Flow_3918lhh"],outgoing:["Flow_379e0o9"],dockers:[],type:5,properties:{a:"efrwe",b:"wewe",name:"服务",x:760,y:200,text:{x:760,y:200,value:"服务"},logicFlowType:"bpmn:serviceTask"},key:"Activity_1sp8qc8"},{incoming:["Event_1d42u4p"],outgoing:["Activity_2mgtaia"],type:1,dockers:[],properties:{name:"边",text:{x:331,y:200,value:"边"},startPoint:{x:298,y:200},endPoint:{x:370,y:200},pointsList:[{x:298,y:200},{x:370,y:200}],logicFlowType:"bpmn:sequenceFlow"},key:"Flow_33inf2k"},{incoming:["Activity_2mgtaia"],outgoing:["Gateway_1fngqgj"],type:1,dockers:[],properties:{name:"边2",text:{x:507,y:200,value:"边2"},startPoint:{x:470,y:200},endPoint:{x:555,y:200},pointsList:[{x:470,y:200},{x:555,y:200}],logicFlowType:"bpmn:sequenceFlow"},key:"Flow_0pfouf0"},{incoming:["Gateway_1fngqgj"],outgoing:["Activity_1sp8qc8"],type:1,dockers:[],properties:{name:"边3",text:{x:664,y:200,value:"边3"},startPoint:{x:605,y:200},endPoint:{x:710,y:200},pointsList:[{x:605,y:200},{x:710,y:200}],logicFlowType:"bpmn:sequenceFlow"},key:"Flow_3918lhh"},{incoming:["Activity_1sp8qc8"],outgoing:["Event_08p8i6q"],type:1,dockers:[],properties:{name:"边4",text:{x:871,y:200,value:"边4"},startPoint:{x:810,y:200},endPoint:{x:902,y:200},pointsList:[{x:810,y:200},{x:902,y:200}],logicFlowType:"bpmn:sequenceFlow"},key:"Flow_379e0o9"}],WO={flowElementList:YO};var Zl={exports:{}};(function(v,y){(function(s,p){v.exports=p()})(window,function(){return function(s){var p={};function o(l){if(p[l])return p[l].exports;var c=p[l]={i:l,l:!1,exports:{}};return s[l].call(c.exports,c,c.exports,o),c.l=!0,c.exports}return o.m=s,o.c=p,o.d=function(l,c,b){o.o(l,c)||Object.defineProperty(l,c,{enumerable:!0,get:b})},o.r=function(l){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(l,"__esModule",{value:!0})},o.t=function(l,c){if(1&c&&(l=o(l)),8&c||4&c&&typeof l=="object"&&l&&l.__esModule)return l;var b=Object.create(null);if(o.r(b),Object.defineProperty(b,"default",{enumerable:!0,value:l}),2&c&&typeof l!="string")for(var _ in l)o.d(b,_,function(E){return l[E]}.bind(null,_));return b},o.n=function(l){var c=l&&l.__esModule?function(){return l.default}:function(){return l};return o.d(c,"a",c),c},o.o=function(l,c){return Object.prototype.hasOwnProperty.call(l,c)},o.p="",o(o.s=215)}([function(s,p,o){o.d(p,"a",function(){return q}),o.d(p,"b",function(){return ie}),o.d(p,"c",function(){return Re}),o.d(p,"d",function(){return $e}),o.d(p,"e",function(){return B}),o.d(p,"f",function(){return ee}),o.d(p,"g",function(){return B}),o.d(p,"h",function(){return ke}),o.d(p,"i",function(){return c}),o.d(p,"j",function(){return We}),o.d(p,"k",function(){return F});var l,c,b,_,E,w,k,j={},P=[],D=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function N(Z,$){for(var ae in $)Z[ae]=$[ae];return Z}function I(Z){var $=Z.parentNode;$&&$.removeChild(Z)}function B(Z,$,ae){var _e,Te,we,Ke={};for(we in $)we=="key"?_e=$[we]:we=="ref"?Te=$[we]:Ke[we]=$[we];if(arguments.length>2&&(Ke.children=arguments.length>3?l.call(arguments,2):ae),typeof Z=="function"&&Z.defaultProps!=null)for(we in Z.defaultProps)Ke[we]===void 0&&(Ke[we]=Z.defaultProps[we]);return H(Z,Ke,_e,Te,null)}function H(Z,$,ae,_e,Te){var we={type:Z,props:$,key:ae,ref:_e,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:Te??++b};return Te==null&&c.vnode!=null&&c.vnode(we),we}function ee(){return{current:null}}function ie(Z){return Z.children}function q(Z,$){this.props=Z,this.context=$}function Y(Z,$){if($==null)return Z.__?Y(Z.__,Z.__.__k.indexOf(Z)+1):null;for(var ae;$<Z.__k.length;$++)if((ae=Z.__k[$])!=null&&ae.__e!=null)return ae.__e;return typeof Z.type=="function"?Y(Z):null}function K(Z){var $,ae;if((Z=Z.__)!=null&&Z.__c!=null){for(Z.__e=Z.__c.base=null,$=0;$<Z.__k.length;$++)if((ae=Z.__k[$])!=null&&ae.__e!=null){Z.__e=Z.__c.base=ae.__e;break}return K(Z)}}function L(Z){(!Z.__d&&(Z.__d=!0)&&_.push(Z)&&!M.__r++||w!==c.debounceRendering)&&((w=c.debounceRendering)||E)(M)}function M(){for(var Z;M.__r=_.length;)Z=_.sort(function($,ae){return $.__v.__b-ae.__v.__b}),_=[],Z.some(function($){var ae,_e,Te,we,Ke,nt;$.__d&&(Ke=(we=(ae=$).__v).__e,(nt=ae.__P)&&(_e=[],(Te=N({},we)).__v=we.__v+1,ge(nt,we,Te,ae.__n,nt.ownerSVGElement!==void 0,we.__h!=null?[Ke]:null,_e,Ke??Y(we),we.__h),ue(_e,we),we.__e!=Ke&&K(we)))})}function z(Z,$,ae,_e,Te,we,Ke,nt,Ze,Ge){var ve,Fe,te,Le,ut,vt,it,ht=_e&&_e.__k||P,St=ht.length;for(ae.__k=[],ve=0;ve<$.length;ve++)if((Le=ae.__k[ve]=(Le=$[ve])==null||typeof Le=="boolean"?null:typeof Le=="string"||typeof Le=="number"||typeof Le=="bigint"?H(null,Le,null,null,Le):Array.isArray(Le)?H(ie,{children:Le},null,null,null):Le.__b>0?H(Le.type,Le.props,Le.key,null,Le.__v):Le)!=null){if(Le.__=ae,Le.__b=ae.__b+1,(te=ht[ve])===null||te&&Le.key==te.key&&Le.type===te.type)ht[ve]=void 0;else for(Fe=0;Fe<St;Fe++){if((te=ht[Fe])&&Le.key==te.key&&Le.type===te.type){ht[Fe]=void 0;break}te=null}ge(Z,Le,te=te||j,Te,we,Ke,nt,Ze,Ge),ut=Le.__e,(Fe=Le.ref)&&te.ref!=Fe&&(it||(it=[]),te.ref&&it.push(te.ref,null,Le),it.push(Fe,Le.__c||ut,Le)),ut!=null?(vt==null&&(vt=ut),typeof Le.type=="function"&&Le.__k===te.__k?Le.__d=Ze=R(Le,Ze,Z):Ze=J(Z,Le,te,ht,ut,Ze),typeof ae.type=="function"&&(ae.__d=Ze)):Ze&&te.__e==Ze&&Ze.parentNode!=Z&&(Ze=Y(te))}for(ae.__e=vt,ve=St;ve--;)ht[ve]!=null&&(typeof ae.type=="function"&&ht[ve].__e!=null&&ht[ve].__e==ae.__d&&(ae.__d=Y(_e,ve+1)),Se(ht[ve],ht[ve]));if(it)for(ve=0;ve<it.length;ve++)be(it[ve],it[++ve],it[++ve])}function R(Z,$,ae){for(var _e,Te=Z.__k,we=0;Te&&we<Te.length;we++)(_e=Te[we])&&(_e.__=Z,$=typeof _e.type=="function"?R(_e,$,ae):J(ae,_e,_e,Te,_e.__e,$));return $}function F(Z,$){return $=$||[],Z==null||typeof Z=="boolean"||(Array.isArray(Z)?Z.some(function(ae){F(ae,$)}):$.push(Z)),$}function J(Z,$,ae,_e,Te,we){var Ke,nt,Ze;if($.__d!==void 0)Ke=$.__d,$.__d=void 0;else if(ae==null||Te!=we||Te.parentNode==null)e:if(we==null||we.parentNode!==Z)Z.appendChild(Te),Ke=null;else{for(nt=we,Ze=0;(nt=nt.nextSibling)&&Ze<_e.length;Ze+=2)if(nt==Te)break e;Z.insertBefore(Te,we),Ke=we}return Ke!==void 0?Ke:Te.nextSibling}function fe(Z,$,ae){$[0]==="-"?Z.setProperty($,ae):Z[$]=ae==null?"":typeof ae!="number"||D.test($)?ae:ae+"px"}function ce(Z,$,ae,_e,Te){var we;e:if($==="style")if(typeof ae=="string")Z.style.cssText=ae;else{if(typeof _e=="string"&&(Z.style.cssText=_e=""),_e)for($ in _e)ae&&$ in ae||fe(Z.style,$,"");if(ae)for($ in ae)_e&&ae[$]===_e[$]||fe(Z.style,$,ae[$])}else if($[0]==="o"&&$[1]==="n")we=$!==($=$.replace(/Capture$/,"")),$=$.toLowerCase()in Z?$.toLowerCase().slice(2):$.slice(2),Z.l||(Z.l={}),Z.l[$+we]=ae,ae?_e||Z.addEventListener($,we?xe:ye,we):Z.removeEventListener($,we?xe:ye,we);else if($!=="dangerouslySetInnerHTML"){if(Te)$=$.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if($!=="href"&&$!=="list"&&$!=="form"&&$!=="tabIndex"&&$!=="download"&&$ in Z)try{Z[$]=ae??"";break e}catch{}typeof ae=="function"||(ae!=null&&(ae!==!1||$[0]==="a"&&$[1]==="r")?Z.setAttribute($,ae):Z.removeAttribute($))}}function ye(Z){this.l[Z.type+!1](c.event?c.event(Z):Z)}function xe(Z){this.l[Z.type+!0](c.event?c.event(Z):Z)}function ge(Z,$,ae,_e,Te,we,Ke,nt,Ze){var Ge,ve,Fe,te,Le,ut,vt,it,ht,St,Pt,at=$.type;if($.constructor!==void 0)return null;ae.__h!=null&&(Ze=ae.__h,nt=$.__e=ae.__e,$.__h=null,we=[nt]),(Ge=c.__b)&&Ge($);try{e:if(typeof at=="function"){if(it=$.props,ht=(Ge=at.contextType)&&_e[Ge.__c],St=Ge?ht?ht.props.value:Ge.__:_e,ae.__c?vt=(ve=$.__c=ae.__c).__=ve.__E:("prototype"in at&&at.prototype.render?$.__c=ve=new at(it,St):($.__c=ve=new q(it,St),ve.constructor=at,ve.render=Ie),ht&&ht.sub(ve),ve.props=it,ve.state||(ve.state={}),ve.context=St,ve.__n=_e,Fe=ve.__d=!0,ve.__h=[]),ve.__s==null&&(ve.__s=ve.state),at.getDerivedStateFromProps!=null&&(ve.__s==ve.state&&(ve.__s=N({},ve.__s)),N(ve.__s,at.getDerivedStateFromProps(it,ve.__s))),te=ve.props,Le=ve.state,Fe)at.getDerivedStateFromProps==null&&ve.componentWillMount!=null&&ve.componentWillMount(),ve.componentDidMount!=null&&ve.__h.push(ve.componentDidMount);else{if(at.getDerivedStateFromProps==null&&it!==te&&ve.componentWillReceiveProps!=null&&ve.componentWillReceiveProps(it,St),!ve.__e&&ve.shouldComponentUpdate!=null&&ve.shouldComponentUpdate(it,ve.__s,St)===!1||$.__v===ae.__v){ve.props=it,ve.state=ve.__s,$.__v!==ae.__v&&(ve.__d=!1),ve.__v=$,$.__e=ae.__e,$.__k=ae.__k,$.__k.forEach(function(Nt){Nt&&(Nt.__=$)}),ve.__h.length&&Ke.push(ve);break e}ve.componentWillUpdate!=null&&ve.componentWillUpdate(it,ve.__s,St),ve.componentDidUpdate!=null&&ve.__h.push(function(){ve.componentDidUpdate(te,Le,ut)})}ve.context=St,ve.props=it,ve.state=ve.__s,(Ge=c.__r)&&Ge($),ve.__d=!1,ve.__v=$,ve.__P=Z,Ge=ve.render(ve.props,ve.state,ve.context),ve.state=ve.__s,ve.getChildContext!=null&&(_e=N(N({},_e),ve.getChildContext())),Fe||ve.getSnapshotBeforeUpdate==null||(ut=ve.getSnapshotBeforeUpdate(te,Le)),Pt=Ge!=null&&Ge.type===ie&&Ge.key==null?Ge.props.children:Ge,z(Z,Array.isArray(Pt)?Pt:[Pt],$,ae,_e,Te,we,Ke,nt,Ze),ve.base=$.__e,$.__h=null,ve.__h.length&&Ke.push(ve),vt&&(ve.__E=ve.__=null),ve.__e=!1}else we==null&&$.__v===ae.__v?($.__k=ae.__k,$.__e=ae.__e):$.__e=he(ae.__e,$,ae,_e,Te,we,Ke,Ze);(Ge=c.diffed)&&Ge($)}catch(Nt){$.__v=null,(Ze||we!=null)&&($.__e=nt,$.__h=!!Ze,we[we.indexOf(nt)]=null),c.__e(Nt,$,ae)}}function ue(Z,$){c.__c&&c.__c($,Z),Z.some(function(ae){try{Z=ae.__h,ae.__h=[],Z.some(function(_e){_e.call(ae)})}catch(_e){c.__e(_e,ae.__v)}})}function he(Z,$,ae,_e,Te,we,Ke,nt){var Ze,Ge,ve,Fe=ae.props,te=$.props,Le=$.type,ut=0;if(Le==="svg"&&(Te=!0),we!=null){for(;ut<we.length;ut++)if((Ze=we[ut])&&"setAttribute"in Ze==!!Le&&(Le?Ze.localName===Le:Ze.nodeType===3)){Z=Ze,we[ut]=null;break}}if(Z==null){if(Le===null)return document.createTextNode(te);Z=Te?document.createElementNS("http://www.w3.org/2000/svg",Le):document.createElement(Le,te.is&&te),we=null,nt=!1}if(Le===null)Fe===te||nt&&Z.data===te||(Z.data=te);else{if(we=we&&l.call(Z.childNodes),Ge=(Fe=ae.props||j).dangerouslySetInnerHTML,ve=te.dangerouslySetInnerHTML,!nt){if(we!=null)for(Fe={},ut=0;ut<Z.attributes.length;ut++)Fe[Z.attributes[ut].name]=Z.attributes[ut].value;(ve||Ge)&&(ve&&(Ge&&ve.__html==Ge.__html||ve.__html===Z.innerHTML)||(Z.innerHTML=ve&&ve.__html||""))}if(function(vt,it,ht,St,Pt){var at;for(at in ht)at==="children"||at==="key"||at in it||ce(vt,at,null,ht[at],St);for(at in it)Pt&&typeof it[at]!="function"||at==="children"||at==="key"||at==="value"||at==="checked"||ht[at]===it[at]||ce(vt,at,it[at],ht[at],St)}(Z,te,Fe,Te,nt),ve)$.__k=[];else if(ut=$.props.children,z(Z,Array.isArray(ut)?ut:[ut],$,ae,_e,Te&&Le!=="foreignObject",we,Ke,we?we[0]:ae.__k&&Y(ae,0),nt),we!=null)for(ut=we.length;ut--;)we[ut]!=null&&I(we[ut]);nt||("value"in te&&(ut=te.value)!==void 0&&(ut!==Fe.value||ut!==Z.value||Le==="progress"&&!ut)&&ce(Z,"value",ut,Fe.value,!1),"checked"in te&&(ut=te.checked)!==void 0&&ut!==Z.checked&&ce(Z,"checked",ut,Fe.checked,!1))}return Z}function be(Z,$,ae){try{typeof Z=="function"?Z($):Z.current=$}catch(_e){c.__e(_e,ae)}}function Se(Z,$,ae){var _e,Te;if(c.unmount&&c.unmount(Z),(_e=Z.ref)&&(_e.current&&_e.current!==Z.__e||be(_e,null,$)),(_e=Z.__c)!=null){if(_e.componentWillUnmount)try{_e.componentWillUnmount()}catch(we){c.__e(we,$)}_e.base=_e.__P=null}if(_e=Z.__k)for(Te=0;Te<_e.length;Te++)_e[Te]&&Se(_e[Te],$,typeof Z.type!="function");ae||Z.__e==null||I(Z.__e),Z.__e=Z.__d=void 0}function Ie(Z,$,ae){return this.constructor(Z,ae)}function We(Z,$,ae){var _e,Te,we;c.__&&c.__(Z,$),Te=(_e=typeof ae=="function")?null:ae&&ae.__k||$.__k,we=[],ge($,Z=(!_e&&ae||$).__k=B(ie,null,[Z]),Te||j,j,$.ownerSVGElement!==void 0,!_e&&ae?[ae]:Te?null:$.firstChild?l.call($.childNodes):null,we,!_e&&ae?ae:Te?Te.__e:$.firstChild,_e),ue(we,Z)}function ke(Z,$){We(Z,$,ke)}function Re(Z,$,ae){var _e,Te,we,Ke=N({},Z.props);for(we in $)we=="key"?_e=$[we]:we=="ref"?Te=$[we]:Ke[we]=$[we];return arguments.length>2&&(Ke.children=arguments.length>3?l.call(arguments,2):ae),H(Z.type,Ke,_e||Z.key,Te||Z.ref,null)}function $e(Z,$){var ae={__c:$="__cC"+k++,__:Z,Consumer:function(_e,Te){return _e.children(Te)},Provider:function(_e){var Te,we;return this.getChildContext||(Te=[],(we={})[$]=this,this.getChildContext=function(){return we},this.shouldComponentUpdate=function(Ke){this.props.value!==Ke.value&&Te.some(L)},this.sub=function(Ke){Te.push(Ke);var nt=Ke.componentWillUnmount;Ke.componentWillUnmount=function(){Te.splice(Te.indexOf(Ke),1),nt&&nt.call(Ke)}}),_e.children}};return ae.Provider.__=ae.Consumer.contextType=ae}l=P.slice,c={__e:function(Z,$){for(var ae,_e,Te;$=$.__;)if((ae=$.__c)&&!ae.__)try{if((_e=ae.constructor)&&_e.getDerivedStateFromError!=null&&(ae.setState(_e.getDerivedStateFromError(Z)),Te=ae.__d),ae.componentDidCatch!=null&&(ae.componentDidCatch(Z),Te=ae.__d),Te)return ae.__E=ae}catch(we){Z=we}throw Z}},b=0,q.prototype.setState=function(Z,$){var ae;ae=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=N({},this.state),typeof Z=="function"&&(Z=Z(N({},ae),this.props)),Z&&N(ae,Z),Z!=null&&this.__v&&($&&this.__h.push($),L(this))},q.prototype.forceUpdate=function(Z){this.__v&&(this.__e=!0,Z&&this.__h.push(Z),L(this))},q.prototype.render=ie,_=[],E=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,M.__r=0,k=0},function(s,p,o){(function(l,c){o.d(p,"a",function(){return L}),o.d(p,"b",function(){return Uo}),o.d(p,"c",function(){return In}),o.d(p,"d",function(){return et}),o.d(p,"e",function(){return De}),o.d(p,"f",function(){return Me}),o.d(p,"g",function(){return Ue}),o.d(p,"h",function(){return Tr}),o.d(p,"i",function(){return Pt}),o.d(p,"j",function(){return ze}),o.d(p,"k",function(){return Un}),o.d(p,"l",function(){return Ho}),o.d(p,"m",function(){return vt}),o.d(p,"n",function(){return Pr}),o.d(p,"o",function(){return R}),o.d(p,"p",function(){return Xi}),o.d(p,"q",function(){return Yn}),o.d(p,"r",function(){return Fi}),o.d(p,"s",function(){return _n}),o.d(p,"t",function(){return Gr}),o.d(p,"u",function(){return ao}),o.d(p,"v",function(){return Lu}),o.d(p,"w",function(){return Hi}),o.d(p,"x",function(){return Yr}),o.d(p,"y",function(){return Mn}),o.d(p,"z",function(){return It}),o.d(p,"A",function(){return dn}),o.d(p,"B",function(){return Wn}),o.d(p,"C",function(){return Ge}),o.d(p,"D",function(){return Ui}),o.d(p,"E",function(){return jr}),o.d(p,"F",function(){return Sr}),o.d(p,"G",function(){return Cu}),o.d(p,"H",function(){return Di}),o.d(p,"I",function(){return Bu}),o.d(p,"J",function(){return bn}),o.d(p,"K",function(){return oe}),o.d(p,"L",function(){return Zt}),o.d(p,"M",function(){return Yi});var b=[];Object.freeze(b);var _={};function E(){return++Ve.mobxGuid}function w(h){throw k(!1,h),"X"}function k(h,g){if(!h)throw new Error("[mobx] "+(g||"An invariant failed, however the error is obfuscated because this is a production build."))}Object.freeze(_);function j(h){var g=!1;return function(){if(!g)return g=!0,h.apply(this,arguments)}}var P=function(){};function D(h){return h!==null&&typeof h=="object"}function N(h){if(h===null||typeof h!="object")return!1;var g=Object.getPrototypeOf(h);return g===Object.prototype||g===null}function I(h,g,x){Object.defineProperty(h,g,{enumerable:!1,writable:!0,configurable:!0,value:x})}function B(h,g){var x="isMobX"+h;return g.prototype[x]=!0,function(A){return D(A)&&A[x]===!0}}function H(h){return h instanceof Map}function ee(h){return h instanceof Set}function ie(h){var g=new Set;for(var x in h)g.add(x);return Object.getOwnPropertySymbols(h).forEach(function(A){Object.getOwnPropertyDescriptor(h,A).enumerable&&g.add(A)}),Array.from(g)}function q(h){return h&&h.toString?h.toString():new String(h).toString()}function Y(h){return h===null?null:typeof h=="object"?""+h:h}var K=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols?function(h){return Object.getOwnPropertyNames(h).concat(Object.getOwnPropertySymbols(h))}:Object.getOwnPropertyNames,L=Symbol("mobx administration"),M=function(){function h(g){g===void 0&&(g="Atom@"+E()),this.name=g,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=new Set,this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=Fe.NOT_TRACKING}return h.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(g){return g()})},h.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(g){return g()})},h.prototype.reportObserved=function(){return Ai(this)},h.prototype.reportChanged=function(){gn(),function(g){g.lowestObserverState!==Fe.STALE&&(g.lowestObserverState=Fe.STALE,g.observers.forEach(function(x){x.dependenciesState===Fe.UP_TO_DATE&&(x.isTracing!==te.NONE&&Gn(x,g),x.onBecomeStale()),x.dependenciesState=Fe.STALE}))}(this),vn()},h.prototype.toString=function(){return this.name},h}(),z=B("Atom",M);function R(h,g,x){g===void 0&&(g=P),x===void 0&&(x=P);var A,V=new M(h);return g!==P&&Ri("onBecomeObserved",V,g,A),x!==P&&jr(V,x),V}var F={identity:function(h,g){return h===g},structural:function(h,g){return Wo(h,g)},default:function(h,g){return Object.is(h,g)},shallow:function(h,g){return Wo(h,g,1)}},J=function(h,g){return J=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,A){x.__proto__=A}||function(x,A){for(var V in A)A.hasOwnProperty(V)&&(x[V]=A[V])},J(h,g)};/*! *****************************************************************************
|
||
Copyright (c) Microsoft Corporation. All rights reserved.
|
||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
||
this file except in compliance with the License. You may obtain a copy of the
|
||
License at http://www.apache.org/licenses/LICENSE-2.0
|
||
|
||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
||
MERCHANTABLITY OR NON-INFRINGEMENT.
|
||
|
||
See the Apache Version 2.0 License for specific language governing permissions
|
||
and limitations under the License.
|
||
***************************************************************************** */var fe=function(){return fe=Object.assign||function(h){for(var g,x=1,A=arguments.length;x<A;x++)for(var V in g=arguments[x])Object.prototype.hasOwnProperty.call(g,V)&&(h[V]=g[V]);return h},fe.apply(this,arguments)};function ce(h){var g=typeof Symbol=="function"&&h[Symbol.iterator],x=0;return g?g.call(h):{next:function(){return h&&x>=h.length&&(h=void 0),{value:h&&h[x++],done:!h}}}}function ye(h,g){var x=typeof Symbol=="function"&&h[Symbol.iterator];if(!x)return h;var A,V,Q=x.call(h),pe=[];try{for(;(g===void 0||g-- >0)&&!(A=Q.next()).done;)pe.push(A.value)}catch(je){V={error:je}}finally{try{A&&!A.done&&(x=Q.return)&&x.call(Q)}finally{if(V)throw V.error}}return pe}function xe(){for(var h=[],g=0;g<arguments.length;g++)h=h.concat(ye(arguments[g]));return h}var ge=Symbol("mobx did run lazy initializers"),ue=Symbol("mobx pending decorators"),he={},be={};function Se(h,g){var x=g?he:be;return x[h]||(x[h]={configurable:!0,enumerable:g,get:function(){return Ie(this),this[h]},set:function(A){Ie(this),this[h]=A}})}function Ie(h){var g,x;if(h[ge]!==!0){var A=h[ue];if(A){I(h,ge,!0);var V=xe(Object.getOwnPropertySymbols(A),Object.keys(A));try{for(var Q=ce(V),pe=Q.next();!pe.done;pe=Q.next()){var je=A[pe.value];je.propertyCreator(h,je.prop,je.descriptor,je.decoratorTarget,je.decoratorArguments)}}catch(Be){g={error:Be}}finally{try{pe&&!pe.done&&(x=Q.return)&&x.call(Q)}finally{if(g)throw g.error}}}}}function We(h,g){return function(){var x,A=function(V,Q,pe,je){if(je===!0)return g(V,Q,pe,V,x),null;if(!Object.prototype.hasOwnProperty.call(V,ue)){var Be=V[ue];I(V,ue,fe({},Be))}return V[ue][Q]={prop:Q,propertyCreator:g,descriptor:pe,decoratorTarget:V,decoratorArguments:x},Se(Q,h)};return ke(arguments)?(x=b,A.apply(null,arguments)):(x=Array.prototype.slice.call(arguments),A)}}function ke(h){return(h.length===2||h.length===3)&&(typeof h[1]=="string"||typeof h[1]=="symbol")||h.length===4&&h[3]===!0}function Re(h,g,x){return Yr(h)?h:Array.isArray(h)?Ge.array(h,{name:x}):N(h)?Ge.object(h,void 0,{name:x}):H(h)?Ge.map(h,{name:x}):ee(h)?Ge.set(h,{name:x}):h}function $e(h){return h}function Z(h){k(h);var g=We(!0,function(A,V,Q,pe,je){var Be=Q?Q.initializer?Q.initializer.call(A):Q.value:void 0;$r(A).addObservableProp(V,Be,h)}),x=(l!==void 0&&l.env,g);return x.enhancer=h,x}var $={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function ae(h){return h==null?$:typeof h=="string"?{name:h,deep:!0,proxy:!0}:h}Object.freeze($);var _e=Z(Re),Te=Z(function(h,g,x){return h==null||dn(h)||Mn(h)||It(h)||pn(h)?h:Array.isArray(h)?Ge.array(h,{name:x,deep:!1}):N(h)?Ge.object(h,void 0,{name:x,deep:!1}):H(h)?Ge.map(h,{name:x,deep:!1}):ee(h)?Ge.set(h,{name:x,deep:!1}):w(!1)}),we=Z($e),Ke=Z(function(h,g,x){return Wo(h,g)?g:h});function nt(h){return h.defaultDecorator?h.defaultDecorator.enhancer:h.deep===!1?$e:Re}var Ze={box:function(h,g){arguments.length>2&&ve("box");var x=ae(g);return new Mt(h,nt(x),x.name,!0,x.equals)},array:function(h,g){arguments.length>2&&ve("array");var x=ae(g);return Go(h,nt(x),x.name)},map:function(h,g){arguments.length>2&&ve("map");var x=ae(g);return new Uo(h,nt(x),x.name)},set:function(h,g){arguments.length>2&&ve("set");var x=ae(g);return new co(h,nt(x),x.name)},object:function(h,g,x){typeof arguments[1]=="string"&&ve("object");var A=ae(x);if(A.proxy===!1)return Yn({},h,g,A);var V=Ii(A),Q=Yn({},void 0,void 0,A),pe=Vu(Q);return Li(pe,h,g,V),pe},ref:we,shallow:Te,deep:_e,struct:Ke},Ge=function(h,g,x){if(typeof arguments[1]=="string"||typeof arguments[1]=="symbol")return _e.apply(null,arguments);if(Yr(h))return h;var A=N(h)?Ge.object(h,g,x):Array.isArray(h)?Ge.array(h,g):H(h)?Ge.map(h,g):ee(h)?Ge.set(h,g):h;if(A!==h)return A;w(!1)};function ve(h){w("Expected one or two arguments to observable."+h+". Did you accidentally try to use observable."+h+" as decorator?")}Object.keys(Ze).forEach(function(h){return Ge[h]=Ze[h]});var Fe,te,Le=We(!1,function(h,g,x,A,V){var Q=x.get,pe=x.set,je=V[0]||{};$r(h).addComputedProp(h,g,fe({get:Q,set:pe,context:h},je))}),ut=Le({equals:F.structural}),vt=function(h,g,x){if(typeof g=="string"||h!==null&&typeof h=="object"&&arguments.length===1)return Le.apply(null,arguments);var A=typeof g=="object"?g:{};return A.get=h,A.set=typeof g=="function"?g:A.set,A.name=A.name||h.name||"",new Hn(A)};vt.struct=ut,function(h){h[h.NOT_TRACKING=-1]="NOT_TRACKING",h[h.UP_TO_DATE=0]="UP_TO_DATE",h[h.POSSIBLY_STALE=1]="POSSIBLY_STALE",h[h.STALE=2]="STALE"}(Fe||(Fe={})),function(h){h[h.NONE=0]="NONE",h[h.LOG=1]="LOG",h[h.BREAK=2]="BREAK"}(te||(te={}));var it=function(h){this.cause=h};function ht(h){return h instanceof it}function St(h){switch(h.dependenciesState){case Fe.UP_TO_DATE:return!1;case Fe.NOT_TRACKING:case Fe.STALE:return!0;case Fe.POSSIBLY_STALE:for(var g=Me(!0),x=U(),A=h.observing,V=A.length,Q=0;Q<V;Q++){var pe=A[Q];if(Xn(pe)){if(Ve.disableErrorBoundaries)pe.get();else try{pe.get()}catch{return se(x),De(g),!0}if(h.dependenciesState===Fe.STALE)return se(x),De(g),!0}}return He(h),se(x),De(g),!1}}function Pt(){return Ve.trackingDerivation!==null}function at(h){var g=h.observers.size>0;Ve.computationDepth>0&&g&&w(!1),Ve.allowStateChanges||!g&&Ve.enforceActions!=="strict"||w(!1)}function Nt(h,g,x){var A=Me(!0);He(h),h.newObserving=new Array(h.observing.length+100),h.unboundDepsCount=0,h.runId=++Ve.runId;var V,Q=Ve.trackingDerivation;if(Ve.trackingDerivation=h,Ve.disableErrorBoundaries===!0)V=g.call(x);else try{V=g.call(x)}catch(pe){V=new it(pe)}return Ve.trackingDerivation=Q,function(pe){for(var je=pe.observing,Be=pe.observing=pe.newObserving,pt=Fe.UP_TO_DATE,ot=0,xt=pe.unboundDepsCount,ct=0;ct<xt;ct++)(_t=Be[ct]).diffValue===0&&(_t.diffValue=1,ot!==ct&&(Be[ot]=_t),ot++),_t.dependenciesState>pt&&(pt=_t.dependenciesState);for(Be.length=ot,pe.newObserving=null,xt=je.length;xt--;)(_t=je[xt]).diffValue===0&&ki(_t,pe),_t.diffValue=0;for(;ot--;){var _t;(_t=Be[ot]).diffValue===1&&(_t.diffValue=0,Au(_t,pe))}pt!==Fe.UP_TO_DATE&&(pe.dependenciesState=pt,pe.onBecomeStale())}(h),De(A),V}function X(h){var g=h.observing;h.observing=[];for(var x=g.length;x--;)ki(g[x],h);h.dependenciesState=Fe.NOT_TRACKING}function oe(h){var g=U();try{return h()}finally{se(g)}}function U(){var h=Ve.trackingDerivation;return Ve.trackingDerivation=null,h}function se(h){Ve.trackingDerivation=h}function Me(h){var g=Ve.allowStateReads;return Ve.allowStateReads=h,g}function De(h){Ve.allowStateReads=h}function He(h){if(h.dependenciesState!==Fe.UP_TO_DATE){h.dependenciesState=Fe.UP_TO_DATE;for(var g=h.observing,x=g.length;x--;)g[x].lowestObserverState=Fe.UP_TO_DATE}}var lt=0,Vt=1,$t=Object.getOwnPropertyDescriptor(function(){},"name");$t&&$t.configurable;function Ct(h,g,x){var A=function(){return Rt(h,g,x||this,arguments)};return A.isMobxAction=!0,A}function Rt(h,g,x,A){var V=ze();try{return g.apply(x,A)}catch(Q){throw V.error=Q,Q}finally{Ue(V)}}function ze(h,g,x){var A=0,V=U();gn();var Q={prevDerivation:V,prevAllowStateChanges:rt(!0),prevAllowStateReads:Me(!0),notifySpy:!1,startTime:A,actionId:Vt++,parentActionId:lt};return lt=Q.actionId,Q}function Ue(h){lt!==h.actionId&&w("invalid action stack. did you forget to finish an action?"),lt=h.parentActionId,h.error!==void 0&&(Ve.suppressReactionErrors=!0),wt(h.prevAllowStateChanges),De(h.prevAllowStateReads),vn(),se(h.prevDerivation),h.notifySpy,Ve.suppressReactionErrors=!1}function et(h,g){var x,A=rt(h);try{x=g()}finally{wt(A)}return x}function rt(h){var g=Ve.allowStateChanges;return Ve.allowStateChanges=h,g}function wt(h){Ve.allowStateChanges=h}var Mt=function(h){function g(x,A,V,Q,pe){V===void 0&&(V="ObservableValue@"+E()),pe===void 0&&(pe=F.default);var je=h.call(this,V)||this;return je.enhancer=A,je.name=V,je.equals=pe,je.hasUnreportedChange=!1,je.value=A(x,void 0,V),je}return function(x,A){function V(){this.constructor=x}J(x,A),x.prototype=A===null?Object.create(A):(V.prototype=A.prototype,new V)}(g,h),g.prototype.dehanceValue=function(x){return this.dehancer!==void 0?this.dehancer(x):x},g.prototype.set=function(x){this.value,(x=this.prepareNewValue(x))!==Ve.UNCHANGED&&this.setNewValue(x)},g.prototype.prepareNewValue=function(x){if(at(this),rn(this)){var A=gt(this,{object:this,type:"update",newValue:x});if(!A)return Ve.UNCHANGED;x=A.newValue}return x=this.enhancer(x,this.value,this.name),this.equals(this.value,x)?Ve.UNCHANGED:x},g.prototype.setNewValue=function(x){var A=this.value;this.value=x,this.reportChanged(),mn(this)&&Kt(this,{type:"update",object:this,newValue:x,oldValue:A})},g.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},g.prototype.intercept=function(x){return lr(this,x)},g.prototype.observe=function(x,A){return A&&x({object:this,type:"update",newValue:this.value,oldValue:void 0}),fr(this,x)},g.prototype.toJSON=function(){return this.get()},g.prototype.toString=function(){return this.name+"["+this.value+"]"},g.prototype.valueOf=function(){return Y(this.get())},g.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},g}(M),ur=B("ObservableValue",Mt),Hn=function(){function h(g){this.dependenciesState=Fe.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=Fe.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+E(),this.value=new it(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=te.NONE,k(g.get,"missing option for computed: get"),this.derivation=g.get,this.name=g.name||"ComputedValue@"+E(),g.set&&(this.setter=Ct(this.name+"-setter",g.set)),this.equals=g.equals||(g.compareStructural||g.struct?F.structural:F.default),this.scope=g.context,this.requiresReaction=!!g.requiresReaction,this.keepAlive=!!g.keepAlive}return h.prototype.onBecomeStale=function(){(function(g){g.lowestObserverState===Fe.UP_TO_DATE&&(g.lowestObserverState=Fe.POSSIBLY_STALE,g.observers.forEach(function(x){x.dependenciesState===Fe.UP_TO_DATE&&(x.dependenciesState=Fe.POSSIBLY_STALE,x.isTracing!==te.NONE&&Gn(x,g),x.onBecomeStale())}))})(this)},h.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(g){return g()})},h.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(g){return g()})},h.prototype.get=function(){this.isComputing&&w("Cycle detected in computation "+this.name+": "+this.derivation),Ve.inBatch!==0||this.observers.size!==0||this.keepAlive?(Ai(this),St(this)&&this.trackAndCompute()&&function(x){x.lowestObserverState!==Fe.STALE&&(x.lowestObserverState=Fe.STALE,x.observers.forEach(function(A){A.dependenciesState===Fe.POSSIBLY_STALE?A.dependenciesState=Fe.STALE:A.dependenciesState===Fe.UP_TO_DATE&&(x.lowestObserverState=Fe.UP_TO_DATE)}))}(this)):St(this)&&(this.warnAboutUntrackedRead(),gn(),this.value=this.computeValue(!1),vn());var g=this.value;if(ht(g))throw g.cause;return g},h.prototype.peek=function(){var g=this.computeValue(!1);if(ht(g))throw g.cause;return g},h.prototype.set=function(g){if(this.setter){k(!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,g)}finally{this.isRunningSetter=!1}}else k(!1,!1)},h.prototype.trackAndCompute=function(){var g=this.value,x=this.dependenciesState===Fe.NOT_TRACKING,A=this.computeValue(!0),V=x||ht(g)||ht(A)||!this.equals(g,A);return V&&(this.value=A),V},h.prototype.computeValue=function(g){var x;if(this.isComputing=!0,Ve.computationDepth++,g)x=Nt(this,this.derivation,this.scope);else if(Ve.disableErrorBoundaries===!0)x=this.derivation.call(this.scope);else try{x=this.derivation.call(this.scope)}catch(A){x=new it(A)}return Ve.computationDepth--,this.isComputing=!1,x},h.prototype.suspend=function(){this.keepAlive||(X(this),this.value=void 0)},h.prototype.observe=function(g,x){var A=this,V=!0,Q=void 0;return Ho(function(){var pe=A.get();if(!V||x){var je=U();g({type:"update",object:A,newValue:pe,oldValue:Q}),se(je)}V=!1,Q=pe})},h.prototype.warnAboutUntrackedRead=function(){},h.prototype.toJSON=function(){return this.get()},h.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},h.prototype.valueOf=function(){return Y(this.get())},h.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},h}(),Xn=B("ComputedValue",Hn),Xr=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},Tu={};function Bo(){return typeof window<"u"?window:c!==void 0?c:typeof self<"u"?self:Tu}var Pn=!0,Pi=!1,Ve=function(){var h=Bo();return h.__mobxInstanceCount>0&&!h.__mobxGlobals&&(Pn=!1),h.__mobxGlobals&&h.__mobxGlobals.version!==new Xr().version&&(Pn=!1),Pn?h.__mobxGlobals?(h.__mobxInstanceCount+=1,h.__mobxGlobals.UNCHANGED||(h.__mobxGlobals.UNCHANGED={}),h.__mobxGlobals):(h.__mobxInstanceCount=1,h.__mobxGlobals=new Xr):(setTimeout(function(){Pi||w("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")},1),new Xr)}();function Au(h,g){h.observers.add(g),h.lowestObserverState>g.dependenciesState&&(h.lowestObserverState=g.dependenciesState)}function ki(h,g){h.observers.delete(g),h.observers.size===0&&Ti(h)}function Ti(h){h.isPendingUnobservation===!1&&(h.isPendingUnobservation=!0,Ve.pendingUnobservations.push(h))}function gn(){Ve.inBatch++}function vn(){if(--Ve.inBatch==0){Mi();for(var h=Ve.pendingUnobservations,g=0;g<h.length;g++){var x=h[g];x.isPendingUnobservation=!1,x.observers.size===0&&(x.isBeingObserved&&(x.isBeingObserved=!1,x.onBecomeUnobserved()),x instanceof Hn&&x.suspend())}Ve.pendingUnobservations=[]}}function Ai(h){var g=Ve.trackingDerivation;return g!==null?(g.runId!==h.lastAccessedBy&&(h.lastAccessedBy=g.runId,g.newObserving[g.unboundDepsCount++]=h,h.isBeingObserved||(h.isBeingObserved=!0,h.onBecomeObserved())),!0):(h.observers.size===0&&Ve.inBatch>0&&Ti(h),!1)}function Gn(h,g){if(h.isTracing===te.BREAK){var x=[];Er(Gr(h),x,1),new Function(`debugger;
|
||
/*
|
||
Tracing '`+h.name+`'
|
||
|
||
You are entering this break point because derivation '`+h.name+"' is being traced and '"+g.name+`' is now forcing it to update.
|
||
Just follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update
|
||
The stackframe you are looking for is at least ~6-8 stack-frames up.
|
||
|
||
`+(h instanceof Hn?h.derivation.toString().replace(/[*]\//g,"/"):"")+`
|
||
|
||
The dependencies for this derivation are:
|
||
|
||
`+x.join(`
|
||
`)+`
|
||
*/
|
||
`)()}}function Er(h,g,x){g.length>=1e3?g.push("(and many more)"):(g.push(""+new Array(x).join(" ")+h.name),h.dependencies&&h.dependencies.forEach(function(A){return Er(A,g,x+1)}))}var In=function(){function h(g,x,A,V){g===void 0&&(g="Reaction@"+E()),V===void 0&&(V=!1),this.name=g,this.onInvalidate=x,this.errorHandler=A,this.requiresObservable=V,this.observing=[],this.newObserving=[],this.dependenciesState=Fe.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+E(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=te.NONE}return h.prototype.onBecomeStale=function(){this.schedule()},h.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,Ve.pendingReactions.push(this),Mi())},h.prototype.isScheduled=function(){return this._isScheduled},h.prototype.runReaction=function(){if(!this.isDisposed){if(gn(),this._isScheduled=!1,St(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending}catch(g){this.reportExceptionInDerivation(g)}}vn()}},h.prototype.track=function(g){if(!this.isDisposed){gn(),this._isRunning=!0;var x=Nt(this,g,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&X(this),ht(x)&&this.reportExceptionInDerivation(x.cause),vn()}},h.prototype.reportExceptionInDerivation=function(g){var x=this;if(this.errorHandler)this.errorHandler(g,this);else{if(Ve.disableErrorBoundaries)throw g;Ve.suppressReactionErrors,Ve.globalReactionErrorHandlers.forEach(function(A){return A(g,x)})}},h.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(gn(),X(this),vn()))},h.prototype.getDisposer=function(){var g=this.dispose.bind(this);return g[L]=this,g},h.prototype.toString=function(){return"Reaction["+this.name+"]"},h.prototype.trace=function(g){g===void 0&&(g=!1),function(){for(var x=[],A=0;A<arguments.length;A++)x[A]=arguments[A];var V=!1;typeof x[x.length-1]=="boolean"&&(V=x.pop());var Q=Tn(x);if(!Q)return w(!1);Q.isTracing,te.NONE,Q.isTracing=V?te.BREAK:te.LOG}(this,g)},h}(),Fo=function(h){return h()};function Mi(){Ve.inBatch>0||Ve.isRunningReactions||Fo(Mu)}function Mu(){Ve.isRunningReactions=!0;for(var h=Ve.pendingReactions,g=0;h.length>0;){++g==100&&h.splice(0);for(var x=h.splice(0),A=0,V=x.length;A<V;A++)x[A].runReaction()}Ve.isRunningReactions=!1}var io=B("Reaction",In);function Du(h){var g=Fo;Fo=function(x){return h(function(){return g(x)})}}function Di(h){return function(){}}function Nu(){w(!1)}function sr(h){return function(g,x,A){if(A){if(A.value)return{value:Ct(h,A.value),enumerable:!1,configurable:!0,writable:!0};var V=A.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return Ct(h,V.call(this))}}}return Ni(h).apply(this,arguments)}}function Ni(h){return function(g,x,A){Object.defineProperty(g,x,{configurable:!0,enumerable:!1,get:function(){},set:function(V){I(this,x,Un(h,V))}})}}var Un=function(h,g,x,A){return arguments.length===1&&typeof h=="function"?Ct(h.name||"<unnamed action>",h):arguments.length===2&&typeof g=="function"?Ct(h,g):arguments.length===1&&typeof h=="string"?sr(h):A!==!0?sr(g).apply(null,arguments):void I(h,g,Ct(h.name||g,x.value,this))};function Cu(h,g){return Rt(typeof h=="string"?h:h.name||"<unnamed action>",typeof h=="function"?h:g,this,void 0)}function ao(h){return typeof h=="function"&&h.isMobxAction===!0}function Vo(h,g,x){I(h,g,Ct(g,x.bind(h)))}function Ho(h,g){g===void 0&&(g=_);var x,A=g&&g.name||h.name||"Autorun@"+E();if(!g.scheduler&&!g.delay)x=new In(A,function(){this.track(pe)},g.onError,g.requiresObservable);else{var V=Ci(g),Q=!1;x=new In(A,function(){Q||(Q=!0,V(function(){Q=!1,x.isDisposed||x.track(pe)}))},g.onError,g.requiresObservable)}function pe(){h(x)}return x.schedule(),x.getDisposer()}Un.bound=function(h,g,x,A){return A===!0?(Vo(h,g,x.value),null):x?{configurable:!0,enumerable:!1,get:function(){return Vo(this,g,x.value||x.initializer.call(this)),this[g]},set:Nu}:{enumerable:!1,configurable:!0,set:function(V){Vo(this,g,V)},get:function(){}}};var Ru=function(h){return h()};function Ci(h){return h.scheduler?h.scheduler:h.delay?function(g){return setTimeout(g,h.delay)}:Ru}function Sr(h,g,x){x===void 0&&(x=_);var A,V,Q,pe=x.name||"Reaction@"+E(),je=Un(pe,x.onError?(A=x.onError,V=g,function(){try{return V.apply(this,arguments)}catch(Tt){A.call(this,Tt)}}):g),Be=!x.scheduler&&!x.delay,pt=Ci(x),ot=!0,xt=!1,ct=x.compareStructural?F.structural:x.equals||F.default,_t=new In(pe,function(){ot||Be?On():xt||(xt=!0,pt(On))},x.onError,x.requiresObservable);function On(){if(xt=!1,!_t.isDisposed){var Tt=!1;_t.track(function(){var on=h(_t);Tt=ot||!ct(Q,on),Q=on}),ot&&x.fireImmediately&&je(Q,_t),ot||Tt!==!0||je(Q,_t),ot&&(ot=!1)}}return _t.schedule(),_t.getDisposer()}function jr(h,g,x){return Ri("onBecomeUnobserved",h,g,x)}function Ri(h,g,x,A){var V=typeof A=="function"?_n(g,x):_n(g),Q=typeof A=="function"?A:x,pe=h+"Listeners";return V[pe]?V[pe].add(Q):V[pe]=new Set([Q]),typeof V[h]!="function"?w(!1):function(){var je=V[pe];je&&(je.delete(Q),je.size===0&&delete V[pe])}}function Pr(h){var g=h.enforceActions,x=h.computedRequiresReaction,A=h.computedConfigurable,V=h.disableErrorBoundaries,Q=h.reactionScheduler,pe=h.reactionRequiresObservable,je=h.observableRequiresReaction;if(h.isolateGlobalState===!0&&((Ve.pendingReactions.length||Ve.inBatch||Ve.isRunningReactions)&&w("isolateGlobalState should be called before MobX is running any reactions"),Pi=!0,Pn&&(--Bo().__mobxInstanceCount==0&&(Bo().__mobxGlobals=void 0),Ve=new Xr)),g!==void 0){var Be=void 0;switch(g){case!0:case"observed":Be=!0;break;case!1:case"never":Be=!1;break;case"strict":case"always":Be="strict";break;default:w("Invalid value for 'enforceActions': '"+g+"', expected 'never', 'always' or 'observed'")}Ve.enforceActions=Be,Ve.allowStateChanges=Be!==!0&&Be!=="strict"}x!==void 0&&(Ve.computedRequiresReaction=!!x),pe!==void 0&&(Ve.reactionRequiresObservable=!!pe),je!==void 0&&(Ve.observableRequiresReaction=!!je,Ve.allowStateReads=!Ve.observableRequiresReaction),A!==void 0&&(Ve.computedConfigurable=!!A),V!==void 0&&(Ve.disableErrorBoundaries=!!V),Q&&Du(Q)}function Yn(h,g,x,A){var V=Ii(A=ae(A));return Ie(h),$r(h,A.name,V.enhancer),g&&Li(h,g,x,V),h}function Ii(h){return h.defaultDecorator||(h.deep===!1?we:_e)}function Li(h,g,x,A){var V,Q;gn();try{var pe=K(g);try{for(var je=ce(pe),Be=je.next();!Be.done;Be=je.next()){var pt=Be.value,ot=Object.getOwnPropertyDescriptor(g,pt),xt=(x&&pt in x?x[pt]:ot.get?Le:A)(h,pt,ot,!0);xt&&Object.defineProperty(h,pt,xt)}}catch(ct){V={error:ct}}finally{try{Be&&!Be.done&&(Q=je.return)&&Q.call(je)}finally{if(V)throw V.error}}}finally{vn()}}function Gr(h,g){return zi(_n(h,g))}function zi(h){var g,x,A={name:h.name};return h.observing&&h.observing.length>0&&(A.dependencies=(g=h.observing,x=[],g.forEach(function(V){x.indexOf(V)===-1&&x.push(V)}),x).map(zi)),A}var Iu=0;function Bi(){this.message="FLOW_CANCELLED"}function Fi(h){arguments.length!==1&&w("Flow expects 1 argument and cannot be used as decorator");var g=h.name||"<unnamed flow>";return function(){var x,A=this,V=arguments,Q=++Iu,pe=Un(g+" - runid: "+Q+" - init",h).apply(A,V),je=void 0,Be=new Promise(function(pt,ot){var xt=0;function ct(Tt){var on;je=void 0;try{on=Un(g+" - runid: "+Q+" - yield "+xt++,pe.next).call(pe,Tt)}catch(Kr){return ot(Kr)}On(on)}function _t(Tt){var on;je=void 0;try{on=Un(g+" - runid: "+Q+" - yield "+xt++,pe.throw).call(pe,Tt)}catch(Kr){return ot(Kr)}On(on)}function On(Tt){if(!Tt||typeof Tt.then!="function")return Tt.done?pt(Tt.value):(je=Promise.resolve(Tt.value)).then(ct,_t);Tt.then(On,ot)}x=ot,ct(void 0)});return Be.cancel=Un(g+" - runid: "+Q+" - cancel",function(){try{je&&Ur(je);var pt=pe.return(void 0),ot=Promise.resolve(pt.value);ot.then(P,P),Ur(ot),x(new Bi)}catch(xt){x(xt)}}),Be}}function Ur(h){typeof h.cancel=="function"&&h.cancel()}function Vi(h,g){if(h==null)return!1;if(g!==void 0){if(dn(h)===!1||!h[L].values.has(g))return!1;var x=_n(h,g);return Xn(x)}return Xn(h)}function Lu(h){return arguments.length>1?w(!1):Vi(h)}function Hi(h,g){return typeof g!="string"?w(!1):Vi(h,g)}function Xo(h,g){return h!=null&&(g!==void 0?!!dn(h)&&h[L].values.has(g):dn(h)||!!h[L]||z(h)||io(h)||Xn(h))}function Yr(h){return arguments.length!==1&&w(!1),Xo(h)}function Wn(h){return dn(h)?h[L].getKeys():It(h)||pn(h)?Array.from(h.keys()):Mn(h)?h.map(function(g,x){return x}):w(!1)}function Zt(h){return dn(h)?Wn(h).map(function(g){return h[g]}):It(h)?Wn(h).map(function(g){return h.get(g)}):pn(h)?Array.from(h.values()):Mn(h)?h.slice():w(!1)}function Xi(h){return dn(h)?Wn(h).map(function(g){return[g,h[g]]}):It(h)?Wn(h).map(function(g){return[g,h.get(g)]}):pn(h)?Array.from(h.entries()):Mn(h)?h.map(function(g,x){return[x,g]}):w(!1)}function Gi(h,g,x){if(arguments.length!==2||pn(h))if(dn(h)){var A=h[L],V=A.values.get(g);V?A.write(g,x):A.addObservableProp(g,x,A.defaultEnhancer)}else if(It(h))h.set(g,x);else if(pn(h))h.add(g);else{if(!Mn(h))return w(!1);typeof g!="number"&&(g=parseInt(g,10)),k(g>=0,"Not a valid index: '"+g+"'"),gn(),g>=h.length&&(h.length=g+1),h[g]=x,vn()}else{gn();var Q=g;try{for(var pe in Q)Gi(h,pe,Q[pe])}finally{vn()}}}function Ui(h,g,x,A){return typeof x=="function"?function(V,Q,pe,je){return Tr(V,Q).observe(pe,je)}(h,g,x,A):function(V,Q,pe){return Tr(V).observe(Q,pe)}(h,g,x)}Bi.prototype=Object.create(Error.prototype);var zu={detectCycles:!0,exportMapsAsObjects:!0,recurseEverything:!1};function cr(h,g,x,A){return A.detectCycles&&h.set(g,x),x}function kn(h,g,x){if(!g.recurseEverything&&!Yr(h)||typeof h!="object")return h;if(h===null)return null;if(h instanceof Date)return h;if(ur(h))return kn(h.get(),g,x);if(Yr(h)&&Wn(h),g.detectCycles===!0&&h!==null&&x.has(h))return x.get(h);if(Mn(h)||Array.isArray(h)){var A=cr(x,h,[],g),V=h.map(function(ct){return kn(ct,g,x)});A.length=V.length;for(var Q=0,pe=V.length;Q<pe;Q++)A[Q]=V[Q];return A}if(pn(h)||Object.getPrototypeOf(h)===Set.prototype){if(g.exportMapsAsObjects===!1){var je=cr(x,h,new Set,g);return h.forEach(function(ct){je.add(kn(ct,g,x))}),je}var Be=cr(x,h,[],g);return h.forEach(function(ct){Be.push(kn(ct,g,x))}),Be}if(It(h)||Object.getPrototypeOf(h)===Map.prototype){if(g.exportMapsAsObjects===!1){var pt=cr(x,h,new Map,g);return h.forEach(function(ct,_t){pt.set(_t,kn(ct,g,x))}),pt}var ot=cr(x,h,{},g);return h.forEach(function(ct,_t){ot[_t]=kn(ct,g,x)}),ot}var xt=cr(x,h,{},g);return ie(h).forEach(function(ct){xt[ct]=kn(h[ct],g,x)}),xt}function Bu(h,g){var x;return typeof g=="boolean"&&(g={detectCycles:g}),g||(g=zu),g.detectCycles=g.detectCycles===void 0?g.recurseEverything===!0:g.detectCycles===!0,g.detectCycles&&(x=new Map),kn(h,g,x)}function Tn(h){switch(h.length){case 0:return Ve.trackingDerivation;case 1:return _n(h[0]);case 2:return _n(h[0],h[1])}}function bn(h,g){g===void 0&&(g=void 0),gn();try{return h.apply(g)}finally{vn()}}function Yi(h,g,x){return arguments.length===1||g&&typeof g=="object"?Fu(h,g):Wi(h,g,x||{})}function Wi(h,g,x){var A;typeof x.timeout=="number"&&(A=setTimeout(function(){if(!Q[L].isDisposed){Q();var pe=new Error("WHEN_TIMEOUT");if(!x.onError)throw pe;x.onError(pe)}},x.timeout)),x.name=x.name||"When@"+E();var V=Ct(x.name+"-effect",g),Q=Ho(function(pe){h()&&(pe.dispose(),A&&clearTimeout(A),V())},x);return Q}function Fu(h,g){var x,A=new Promise(function(V,Q){var pe=Wi(h,V,fe(fe({},g),{onError:Q}));x=function(){pe(),Q("WHEN_CANCELLED")}});return A.cancel=x,A}function uo(h){return h[L]}function $n(h){return typeof h=="string"||typeof h=="number"||typeof h=="symbol"}var Wr={has:function(h,g){if(g===L||g==="constructor"||g===ge)return!0;var x=uo(h);return $n(g)?x.has(g):g in h},get:function(h,g){if(g===L||g==="constructor"||g===ge)return h[g];var x=uo(h),A=x.values.get(g);if(A instanceof M){var V=A.get();return V===void 0&&x.has(g),V}return $n(g)&&x.has(g),h[g]},set:function(h,g,x){return!!$n(g)&&(Gi(h,g,x),!0)},deleteProperty:function(h,g){return!!$n(g)&&(uo(h).remove(g),!0)},ownKeys:function(h){return uo(h).keysAtom.reportObserved(),Reflect.ownKeys(h)},preventExtensions:function(h){return w("Dynamic observable objects cannot be frozen"),!1}};function Vu(h){var g=new Proxy(h,Wr);return h[L].proxy=g,g}function rn(h){return h.interceptors!==void 0&&h.interceptors.length>0}function lr(h,g){var x=h.interceptors||(h.interceptors=[]);return x.push(g),j(function(){var A=x.indexOf(g);A!==-1&&x.splice(A,1)})}function gt(h,g){var x=U();try{for(var A=xe(h.interceptors||[]),V=0,Q=A.length;V<Q&&(k(!(g=A[V](g))||g.type,"Intercept handlers should return nothing or a change object"),g);V++);return g}finally{se(x)}}function mn(h){return h.changeListeners!==void 0&&h.changeListeners.length>0}function fr(h,g){var x=h.changeListeners||(h.changeListeners=[]);return x.push(g),j(function(){var A=x.indexOf(g);A!==-1&&x.splice(A,1)})}function Kt(h,g){var x=U(),A=h.changeListeners;if(A){for(var V=0,Q=(A=A.slice()).length;V<Q;V++)A[V](g);se(x)}}var $i={get:function(h,g){return g===L?h[L]:g==="length"?h[L].getArrayLength():typeof g=="number"?An.get.call(h,g):typeof g!="string"||isNaN(g)?An.hasOwnProperty(g)?An[g]:h[g]:An.get.call(h,parseInt(g))},set:function(h,g,x){return g==="length"&&h[L].setArrayLength(x),typeof g=="number"&&An.set.call(h,g,x),typeof g=="symbol"||isNaN(g)?h[g]=x:An.set.call(h,parseInt(g),x),!0},preventExtensions:function(h){return w("Observable arrays cannot be frozen"),!1}};function Go(h,g,x,A){x===void 0&&(x="ObservableArray@"+E()),A===void 0&&(A=!1);var V,Q,pe,je=new Ki(x,g,A);V=je.values,Q=L,pe=je,Object.defineProperty(V,Q,{enumerable:!1,writable:!1,configurable:!0,value:pe});var Be=new Proxy(je.values,$i);if(je.proxy=Be,h&&h.length){var pt=rt(!0);je.spliceWithArray(0,0,h),wt(pt)}return Be}var Ki=function(){function h(g,x,A){this.owned=A,this.values=[],this.proxy=void 0,this.lastKnownLength=0,this.atom=new M(g||"ObservableArray@"+E()),this.enhancer=function(V,Q){return x(V,Q,g+"[..]")}}return h.prototype.dehanceValue=function(g){return this.dehancer!==void 0?this.dehancer(g):g},h.prototype.dehanceValues=function(g){return this.dehancer!==void 0&&g.length>0?g.map(this.dehancer):g},h.prototype.intercept=function(g){return lr(this,g)},h.prototype.observe=function(g,x){return x===void 0&&(x=!1),x&&g({object:this.proxy,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),fr(this,g)},h.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},h.prototype.setArrayLength=function(g){if(typeof g!="number"||g<0)throw new Error("[mobx.array] Out of range: "+g);var x=this.values.length;if(g!==x)if(g>x){for(var A=new Array(g-x),V=0;V<g-x;V++)A[V]=void 0;this.spliceWithArray(x,0,A)}else this.spliceWithArray(g,x-g)},h.prototype.updateArrayLength=function(g,x){if(g!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed.");this.lastKnownLength+=x},h.prototype.spliceWithArray=function(g,x,A){var V=this;at(this.atom);var Q=this.values.length;if(g===void 0?g=0:g>Q?g=Q:g<0&&(g=Math.max(0,Q+g)),x=arguments.length===1?Q-g:x==null?0:Math.max(0,Math.min(x,Q-g)),A===void 0&&(A=b),rn(this)){var pe=gt(this,{object:this.proxy,type:"splice",index:g,removedCount:x,added:A});if(!pe)return b;x=pe.removedCount,A=pe.added}A=A.length===0?A:A.map(function(Be){return V.enhancer(Be,void 0)});var je=this.spliceItemsIntoValues(g,x,A);return x===0&&A.length===0||this.notifyArraySplice(g,A,je),this.dehanceValues(je)},h.prototype.spliceItemsIntoValues=function(g,x,A){var V;if(A.length<1e4)return(V=this.values).splice.apply(V,xe([g,x],A));var Q=this.values.slice(g,g+x);return this.values=this.values.slice(0,g).concat(A,this.values.slice(g+x)),Q},h.prototype.notifyArrayChildUpdate=function(g,x,A){var V=!this.owned&&!1,Q=mn(this),pe=Q||V?{object:this.proxy,type:"update",index:g,newValue:x,oldValue:A}:null;this.atom.reportChanged(),Q&&Kt(this,pe)},h.prototype.notifyArraySplice=function(g,x,A){var V=!this.owned&&!1,Q=mn(this),pe=Q||V?{object:this.proxy,type:"splice",index:g,removed:A,added:x,removedCount:A.length,addedCount:x.length}:null;this.atom.reportChanged(),Q&&Kt(this,pe)},h}(),An={intercept:function(h){return this[L].intercept(h)},observe:function(h,g){return g===void 0&&(g=!1),this[L].observe(h,g)},clear:function(){return this.splice(0)},replace:function(h){var g=this[L];return g.spliceWithArray(0,g.values.length,h)},toJS:function(){return this.slice()},toJSON:function(){return this.toJS()},splice:function(h,g){for(var x=[],A=2;A<arguments.length;A++)x[A-2]=arguments[A];var V=this[L];switch(arguments.length){case 0:return[];case 1:return V.spliceWithArray(h);case 2:return V.spliceWithArray(h,g)}return V.spliceWithArray(h,g,x)},spliceWithArray:function(h,g,x){return this[L].spliceWithArray(h,g,x)},push:function(){for(var h=[],g=0;g<arguments.length;g++)h[g]=arguments[g];var x=this[L];return x.spliceWithArray(x.values.length,0,h),x.values.length},pop:function(){return this.splice(Math.max(this[L].values.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var h=[],g=0;g<arguments.length;g++)h[g]=arguments[g];var x=this[L];return x.spliceWithArray(0,0,h),x.values.length},reverse:function(){var h=this.slice();return h.reverse.apply(h,arguments)},sort:function(h){var g=this.slice();return g.sort.apply(g,arguments)},remove:function(h){var g=this[L],x=g.dehanceValues(g.values).indexOf(h);return x>-1&&(this.splice(x,1),!0)},get:function(h){var g=this[L];if(g&&h<g.values.length)return g.atom.reportObserved(),g.dehanceValue(g.values[h])},set:function(h,g){var x=this[L],A=x.values;if(h<A.length){at(x.atom);var V=A[h];if(rn(x)){var Q=gt(x,{type:"update",object:x.proxy,index:h,newValue:g});if(!Q)return;g=Q.newValue}(g=x.enhancer(g,V))!==V&&(A[h]=g,x.notifyArrayChildUpdate(h,g,V))}else{if(h!==A.length)throw new Error("[mobx.array] Index out of bounds, "+h+" is larger than "+A.length);x.spliceWithArray(h,0,[g])}}};["concat","flat","includes","indexOf","join","lastIndexOf","slice","toString","toLocaleString"].forEach(function(h){typeof Array.prototype[h]=="function"&&(An[h]=function(){var g=this[L];g.atom.reportObserved();var x=g.dehanceValues(g.values);return x[h].apply(x,arguments)})}),["every","filter","find","findIndex","flatMap","forEach","map","some"].forEach(function(h){typeof Array.prototype[h]=="function"&&(An[h]=function(g,x){var A=this,V=this[L];return V.atom.reportObserved(),V.dehanceValues(V.values)[h](function(Q,pe){return g.call(x,Q,pe,A)},x)})}),["reduce","reduceRight"].forEach(function(h){An[h]=function(){var g=this,x=this[L];x.atom.reportObserved();var A=arguments[0];return arguments[0]=function(V,Q,pe){return Q=x.dehanceValue(Q),A(V,Q,pe,g)},x.values[h].apply(x.values,arguments)}});var qi,so=B("ObservableArrayAdministration",Ki);function Mn(h){return D(h)&&so(h[L])}var Zi,Hu={},Uo=function(){function h(g,x,A){if(x===void 0&&(x=Re),A===void 0&&(A="ObservableMap@"+E()),this.enhancer=x,this.name=A,this[qi]=Hu,this._keysAtom=R(this.name+".keys()"),this[Symbol.toStringTag]="Map",typeof Map!="function")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(g)}return h.prototype._has=function(g){return this._data.has(g)},h.prototype.has=function(g){var x=this;if(!Ve.trackingDerivation)return this._has(g);var A=this._hasMap.get(g);if(!A){var V=A=new Mt(this._has(g),$e,this.name+"."+q(g)+"?",!1);this._hasMap.set(g,V),jr(V,function(){return x._hasMap.delete(g)})}return A.get()},h.prototype.set=function(g,x){var A=this._has(g);if(rn(this)){var V=gt(this,{type:A?"update":"add",object:this,newValue:x,name:g});if(!V)return this;x=V.newValue}return A?this._updateValue(g,x):this._addValue(g,x),this},h.prototype.delete=function(g){var x=this;if(at(this._keysAtom),rn(this)&&!(V=gt(this,{type:"delete",object:this,name:g})))return!1;if(this._has(g)){var A=mn(this),V=A?{type:"delete",object:this,oldValue:this._data.get(g).value,name:g}:null;return bn(function(){x._keysAtom.reportChanged(),x._updateHasMapEntry(g,!1),x._data.get(g).setNewValue(void 0),x._data.delete(g)}),A&&Kt(this,V),!0}return!1},h.prototype._updateHasMapEntry=function(g,x){var A=this._hasMap.get(g);A&&A.setNewValue(x)},h.prototype._updateValue=function(g,x){var A=this._data.get(g);if((x=A.prepareNewValue(x))!==Ve.UNCHANGED){var V=mn(this),Q=V?{type:"update",object:this,oldValue:A.value,name:g,newValue:x}:null;A.setNewValue(x),V&&Kt(this,Q)}},h.prototype._addValue=function(g,x){var A=this;at(this._keysAtom),bn(function(){var pe=new Mt(x,A.enhancer,A.name+"."+q(g),!1);A._data.set(g,pe),x=pe.value,A._updateHasMapEntry(g,!0),A._keysAtom.reportChanged()});var V=mn(this),Q=V?{type:"add",object:this,name:g,newValue:x}:null;V&&Kt(this,Q)},h.prototype.get=function(g){return this.has(g)?this.dehanceValue(this._data.get(g).get()):this.dehanceValue(void 0)},h.prototype.dehanceValue=function(g){return this.dehancer!==void 0?this.dehancer(g):g},h.prototype.keys=function(){return this._keysAtom.reportObserved(),this._data.keys()},h.prototype.values=function(){var g=this,x=this.keys();return ho({next:function(){var A=x.next(),V=A.done,Q=A.value;return{done:V,value:V?void 0:g.get(Q)}}})},h.prototype.entries=function(){var g=this,x=this.keys();return ho({next:function(){var A=x.next(),V=A.done,Q=A.value;return{done:V,value:V?void 0:[Q,g.get(Q)]}}})},h.prototype[qi=L,Symbol.iterator]=function(){return this.entries()},h.prototype.forEach=function(g,x){var A,V;try{for(var Q=ce(this),pe=Q.next();!pe.done;pe=Q.next()){var je=ye(pe.value,2),Be=je[0],pt=je[1];g.call(x,pt,Be,this)}}catch(ot){A={error:ot}}finally{try{pe&&!pe.done&&(V=Q.return)&&V.call(Q)}finally{if(A)throw A.error}}},h.prototype.merge=function(g){var x=this;return It(g)&&(g=g.toJS()),bn(function(){var A=rt(!0);try{N(g)?ie(g).forEach(function(V){return x.set(V,g[V])}):Array.isArray(g)?g.forEach(function(V){var Q=ye(V,2),pe=Q[0],je=Q[1];return x.set(pe,je)}):H(g)?(g.constructor!==Map&&w("Cannot initialize from classes that inherit from Map: "+g.constructor.name),g.forEach(function(V,Q){return x.set(Q,V)})):g!=null&&w("Cannot initialize map from "+g)}finally{wt(A)}}),this},h.prototype.clear=function(){var g=this;bn(function(){oe(function(){var x,A;try{for(var V=ce(g.keys()),Q=V.next();!Q.done;Q=V.next()){var pe=Q.value;g.delete(pe)}}catch(je){x={error:je}}finally{try{Q&&!Q.done&&(A=V.return)&&A.call(V)}finally{if(x)throw x.error}}})})},h.prototype.replace=function(g){var x=this;return bn(function(){var A,V,Q,pe,je=function(an){if(H(an)||It(an))return an;if(Array.isArray(an))return new Map(an);if(N(an)){var ra=new Map;for(var qr in an)ra.set(qr,an[qr]);return ra}return w("Cannot convert to map from '"+an+"'")}(g),Be=new Map,pt=!1;try{for(var ot=ce(x._data.keys()),xt=ot.next();!xt.done;xt=ot.next()){var ct=xt.value;if(!je.has(ct))if(x.delete(ct))pt=!0;else{var _t=x._data.get(ct);Be.set(ct,_t)}}}catch(an){A={error:an}}finally{try{xt&&!xt.done&&(V=ot.return)&&V.call(ot)}finally{if(A)throw A.error}}try{for(var On=ce(je.entries()),Tt=On.next();!Tt.done;Tt=On.next()){var on=ye(Tt.value,2),Kr=(ct=on[0],_t=on[1],x._data.has(ct));if(x.set(ct,_t),x._data.has(ct)){var Gu=x._data.get(ct);Be.set(ct,Gu),Kr||(pt=!0)}}}catch(an){Q={error:an}}finally{try{Tt&&!Tt.done&&(pe=On.return)&&pe.call(On)}finally{if(Q)throw Q.error}}if(!pt)if(x._data.size!==Be.size)x._keysAtom.reportChanged();else for(var ta=x._data.keys(),na=Be.keys(),yo=ta.next(),Ko=na.next();!yo.done;){if(yo.value!==Ko.value){x._keysAtom.reportChanged();break}yo=ta.next(),Ko=na.next()}x._data=Be}),this},Object.defineProperty(h.prototype,"size",{get:function(){return this._keysAtom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),h.prototype.toPOJO=function(){var g,x,A={};try{for(var V=ce(this),Q=V.next();!Q.done;Q=V.next()){var pe=ye(Q.value,2),je=pe[0],Be=pe[1];A[typeof je=="symbol"?je:q(je)]=Be}}catch(pt){g={error:pt}}finally{try{Q&&!Q.done&&(x=V.return)&&x.call(V)}finally{if(g)throw g.error}}return A},h.prototype.toJS=function(){return new Map(this)},h.prototype.toJSON=function(){return this.toPOJO()},h.prototype.toString=function(){var g=this;return this.name+"[{ "+Array.from(this.keys()).map(function(x){return q(x)+": "+g.get(x)}).join(", ")+" }]"},h.prototype.observe=function(g,x){return fr(this,g)},h.prototype.intercept=function(g){return lr(this,g)},h}(),It=B("ObservableMap",Uo),kr={},co=function(){function h(g,x,A){if(x===void 0&&(x=Re),A===void 0&&(A="ObservableSet@"+E()),this.name=A,this[Zi]=kr,this._data=new Set,this._atom=R(this.name),this[Symbol.toStringTag]="Set",typeof Set!="function")throw new Error("mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js");this.enhancer=function(V,Q){return x(V,Q,A)},g&&this.replace(g)}return h.prototype.dehanceValue=function(g){return this.dehancer!==void 0?this.dehancer(g):g},h.prototype.clear=function(){var g=this;bn(function(){oe(function(){var x,A;try{for(var V=ce(g._data.values()),Q=V.next();!Q.done;Q=V.next()){var pe=Q.value;g.delete(pe)}}catch(je){x={error:je}}finally{try{Q&&!Q.done&&(A=V.return)&&A.call(V)}finally{if(x)throw x.error}}})})},h.prototype.forEach=function(g,x){var A,V;try{for(var Q=ce(this),pe=Q.next();!pe.done;pe=Q.next()){var je=pe.value;g.call(x,je,je,this)}}catch(Be){A={error:Be}}finally{try{pe&&!pe.done&&(V=Q.return)&&V.call(Q)}finally{if(A)throw A.error}}},Object.defineProperty(h.prototype,"size",{get:function(){return this._atom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),h.prototype.add=function(g){var x=this;if(at(this._atom),rn(this)&&!(V=gt(this,{type:"add",object:this,newValue:g})))return this;if(!this.has(g)){bn(function(){x._data.add(x.enhancer(g,void 0)),x._atom.reportChanged()});var A=mn(this),V=A?{type:"add",object:this,newValue:g}:null;A&&Kt(this,V)}return this},h.prototype.delete=function(g){var x=this;if(rn(this)&&!(V=gt(this,{type:"delete",object:this,oldValue:g})))return!1;if(this.has(g)){var A=mn(this),V=A?{type:"delete",object:this,oldValue:g}:null;return bn(function(){x._atom.reportChanged(),x._data.delete(g)}),A&&Kt(this,V),!0}return!1},h.prototype.has=function(g){return this._atom.reportObserved(),this._data.has(this.dehanceValue(g))},h.prototype.entries=function(){var g=0,x=Array.from(this.keys()),A=Array.from(this.values());return ho({next:function(){var V=g;return g+=1,V<A.length?{value:[x[V],A[V]],done:!1}:{done:!0}}})},h.prototype.keys=function(){return this.values()},h.prototype.values=function(){this._atom.reportObserved();var g=this,x=0,A=Array.from(this._data.values());return ho({next:function(){return x<A.length?{value:g.dehanceValue(A[x++]),done:!1}:{done:!0}}})},h.prototype.replace=function(g){var x=this;return pn(g)&&(g=g.toJS()),bn(function(){var A=rt(!0);try{Array.isArray(g)||ee(g)?(x.clear(),g.forEach(function(V){return x.add(V)})):g!=null&&w("Cannot initialize set from "+g)}finally{wt(A)}}),this},h.prototype.observe=function(g,x){return fr(this,g)},h.prototype.intercept=function(g){return lr(this,g)},h.prototype.toJS=function(){return new Set(this)},h.prototype.toString=function(){return this.name+"[ "+Array.from(this).join(", ")+" ]"},h.prototype[Zi=L,Symbol.iterator]=function(){return this.values()},h}(),pn=B("ObservableSet",co),Ji=function(){function h(g,x,A,V){x===void 0&&(x=new Map),this.target=g,this.values=x,this.name=A,this.defaultEnhancer=V,this.keysAtom=new M(A+".keys")}return h.prototype.read=function(g){return this.values.get(g).get()},h.prototype.write=function(g,x){var A=this.target,V=this.values.get(g);if(V instanceof Hn)V.set(x);else{if(rn(this)){if(!(pe=gt(this,{type:"update",object:this.proxy||A,name:g,newValue:x})))return;x=pe.newValue}if((x=V.prepareNewValue(x))!==Ve.UNCHANGED){var Q=mn(this),pe=Q?{type:"update",object:this.proxy||A,oldValue:V.value,name:g,newValue:x}:null;V.setNewValue(x),Q&&Kt(this,pe)}}},h.prototype.has=function(g){var x=this.pendingKeys||(this.pendingKeys=new Map),A=x.get(g);if(A)return A.get();var V=!!this.values.get(g);return A=new Mt(V,$e,this.name+"."+q(g)+"?",!1),x.set(g,A),A.get()},h.prototype.addObservableProp=function(g,x,A){A===void 0&&(A=this.defaultEnhancer);var V=this.target;if(rn(this)){var Q=gt(this,{object:this.proxy||V,name:g,type:"add",newValue:x});if(!Q)return;x=Q.newValue}var pe=new Mt(x,A,this.name+"."+q(g),!1);this.values.set(g,pe),x=pe.value,Object.defineProperty(V,g,function(je){return lo[je]||(lo[je]={configurable:!0,enumerable:!0,get:function(){return this[L].read(je)},set:function(Be){this[L].write(je,Be)}})}(g)),this.notifyPropertyAddition(g,x)},h.prototype.addComputedProp=function(g,x,A){var V,Q,pe,je=this.target;A.name=A.name||this.name+"."+q(x),this.values.set(x,new Hn(A)),(g===je||(V=g,Q=x,!(pe=Object.getOwnPropertyDescriptor(V,Q))||pe.configurable!==!1&&pe.writable!==!1))&&Object.defineProperty(g,x,function(Be){return fo[Be]||(fo[Be]={configurable:Ve.computedConfigurable,enumerable:!1,get:function(){return po(this).read(Be)},set:function(pt){po(this).write(Be,pt)}})}(x))},h.prototype.remove=function(g){if(this.values.has(g)){var x=this.target;if(rn(this)&&!(Be=gt(this,{object:this.proxy||x,name:g,type:"remove"})))return;try{gn();var A=mn(this),V=!1,Q=this.values.get(g),pe=Q&&Q.get();if(Q&&Q.set(void 0),this.keysAtom.reportChanged(),this.values.delete(g),this.pendingKeys){var je=this.pendingKeys.get(g);je&&je.set(!1)}delete this.target[g];var Be=A?{type:"remove",object:this.proxy||x,oldValue:pe,name:g}:null;A&&Kt(this,Be)}finally{vn()}}},h.prototype.illegalAccess=function(g,x){},h.prototype.observe=function(g,x){return fr(this,g)},h.prototype.intercept=function(g){return lr(this,g)},h.prototype.notifyPropertyAddition=function(g,x){var A=mn(this),V=A?{type:"add",object:this.proxy||this.target,name:g,newValue:x}:null;if(A&&Kt(this,V),this.pendingKeys){var Q=this.pendingKeys.get(g);Q&&Q.set(!0)}this.keysAtom.reportChanged()},h.prototype.getKeys=function(){var g,x;this.keysAtom.reportObserved();var A=[];try{for(var V=ce(this.values),Q=V.next();!Q.done;Q=V.next()){var pe=ye(Q.value,2),je=pe[0];pe[1]instanceof Mt&&A.push(je)}}catch(Be){g={error:Be}}finally{try{Q&&!Q.done&&(x=V.return)&&x.call(V)}finally{if(g)throw g.error}}return A},h}();function $r(h,g,x){if(g===void 0&&(g=""),x===void 0&&(x=Re),Object.prototype.hasOwnProperty.call(h,L))return h[L];N(h)||(g=(h.constructor.name||"ObservableObject")+"@"+E()),g||(g="ObservableObject@"+E());var A=new Ji(h,new Map,q(g),x);return I(h,L,A),A}var lo=Object.create(null),fo=Object.create(null);function po(h){var g=h[L];return g||(Ie(h),h[L])}var Qi=B("ObservableObjectAdministration",Ji);function dn(h){return!!D(h)&&(Ie(h),Qi(h[L]))}function _n(h,g){if(typeof h=="object"&&h!==null){if(Mn(h))return g!==void 0&&w(!1),h[L].atom;if(pn(h))return h[L];if(It(h)){var x=h;return g===void 0?x._keysAtom:((A=x._data.get(g)||x._hasMap.get(g))||w(!1),A)}var A;if(Ie(h),g&&!h[L]&&h[g],dn(h))return g?((A=h[L].values.get(g))||w(!1),A):w(!1);if(z(h)||Xn(h)||io(h))return h}else if(typeof h=="function"&&io(h[L]))return h[L];return w(!1)}function Tr(h,g){return h||w("Expecting some object"),g!==void 0?Tr(_n(h,g)):z(h)||Xn(h)||io(h)||It(h)||pn(h)?h:(Ie(h),h[L]?h[L]:void w(!1))}var Yo=Object.prototype.toString;function Wo(h,g,x){return x===void 0&&(x=-1),$o(h,g,x)}function $o(h,g,x,A,V){if(h===g)return h!==0||1/h==1/g;if(h==null||g==null)return!1;if(h!=h)return g!=g;var Q=typeof h;if(Q!=="function"&&Q!=="object"&&typeof g!="object")return!1;var pe=Yo.call(h);if(pe!==Yo.call(g))return!1;switch(pe){case"[object RegExp]":case"[object String]":return""+h==""+g;case"[object Number]":return+h!=+h?+g!=+g:+h==0?1/+h==1/g:+h==+g;case"[object Date]":case"[object Boolean]":return+h==+g;case"[object Symbol]":return typeof Symbol<"u"&&Symbol.valueOf.call(h)===Symbol.valueOf.call(g);case"[object Map]":case"[object Set]":x>=0&&x++}h=ea(h),g=ea(g);var je=pe==="[object Array]";if(!je){if(typeof h!="object"||typeof g!="object")return!1;var Be=h.constructor,pt=g.constructor;if(Be!==pt&&!(typeof Be=="function"&&Be instanceof Be&&typeof pt=="function"&&pt instanceof pt)&&"constructor"in h&&"constructor"in g)return!1}if(x===0)return!1;x<0&&(x=-1),V=V||[];for(var ot=(A=A||[]).length;ot--;)if(A[ot]===h)return V[ot]===g;if(A.push(h),V.push(g),je){if((ot=h.length)!==g.length)return!1;for(;ot--;)if(!$o(h[ot],g[ot],x-1,A,V))return!1}else{var xt=Object.keys(h),ct=void 0;if(ot=xt.length,Object.keys(g).length!==ot)return!1;for(;ot--;)if(!Xu(g,ct=xt[ot])||!$o(h[ct],g[ct],x-1,A,V))return!1}return A.pop(),V.pop(),!0}function ea(h){return Mn(h)?h.slice():H(h)||It(h)||ee(h)||pn(h)?Array.from(h.entries()):h}function Xu(h,g){return Object.prototype.hasOwnProperty.call(h,g)}function ho(h){return h[Symbol.iterator]=pr,h}function pr(){return this}if(typeof Proxy>"u"||typeof Symbol>"u")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.");typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:Di,extras:{getDebugName:function(h,g){return(g!==void 0?_n(h,g):dn(h)||It(h)||pn(h)?Tr(h):_n(h)).name}},$mobx:L})}).call(this,o(155),o(82))},function(s,p,o){var l=o(116),c=o(44),b=o(179);l||c(Object.prototype,"toString",b,{unsafe:!0})},function(s,p,o){var l=o(40),c=o(83),b=o(70),_=o(56),E=o(111),w="Array Iterator",k=_.set,j=_.getterFor(w);s.exports=E(Array,"Array",function(P,D){k(this,{type:w,target:l(P),index:0,kind:D})},function(){var P=j(this),D=P.target,N=P.kind,I=P.index++;return!D||I>=D.length?(P.target=void 0,{value:void 0,done:!0}):N=="keys"?{value:I,done:!1}:N=="values"?{value:D[I],done:!1}:{value:[I,D[I]],done:!1}},"values"),b.Arguments=b.Array,c("keys"),c("values"),c("entries")},function(s,p,o){var l=o(7),c=o(147),b=o(148),_=o(3),E=o(57),w=o(27),k=w("iterator"),j=w("toStringTag"),P=_.values,D=function(I,B){if(I){if(I[k]!==P)try{E(I,k,P)}catch{I[k]=P}if(I[j]||E(I,j,B),c[B]){for(var H in _)if(I[H]!==_[H])try{E(I,H,_[H])}catch{I[H]=_[H]}}}};for(var N in c)D(l[N]&&l[N].prototype,N);D(b,"DOMTokenList")},function(s,p,o){var l=o(17),c=o(7),b=o(46),_=o(76),E=o(35),w=o(15),k=o(64),j=o(36),P=o(109),D=o(19),N=o(34),I=o(99),B=o(28),H=o(33),ee=o(58),ie=o(88),q=o(32),Y=o(38),K=o(40),L=o(87),M=o(41),z=o(71),R=o(54),F=o(66),J=o(72),fe=o(139),ce=o(112),ye=o(51),xe=o(37),ge=o(93),ue=o(101),he=o(44),be=o(84),Se=o(91),Ie=o(69),We=o(85),ke=o(27),Re=o(149),$e=o(150),Z=o(73),$=o(56),ae=o(74).forEach,_e=Se("hidden"),Te="Symbol",we=ke("toPrimitive"),Ke=$.set,nt=$.getterFor(Te),Ze=Object.prototype,Ge=c.Symbol,ve=Ge&&Ge.prototype,Fe=c.TypeError,te=c.QObject,Le=b("JSON","stringify"),ut=ye.f,vt=xe.f,it=fe.f,ht=ge.f,St=w([].push),Pt=be("symbols"),at=be("op-symbols"),Nt=be("string-to-symbol-registry"),X=be("symbol-to-string-registry"),oe=be("wks"),U=!te||!te.prototype||!te.prototype.findChild,se=j&&D(function(){return R(vt({},"a",{get:function(){return vt(this,"a",{value:7}).a}})).a!=7})?function(ze,Ue,et){var rt=ut(Ze,Ue);rt&&delete Ze[Ue],vt(ze,Ue,et),rt&&ze!==Ze&&vt(Ze,Ue,rt)}:vt,Me=function(ze,Ue){var et=Pt[ze]=R(ve);return Ke(et,{type:Te,tag:ze,description:Ue}),j||(et.description=Ue),et},De=function(ze,Ue,et){ze===Ze&&De(at,Ue,et),q(ze);var rt=L(Ue);return q(et),N(Pt,rt)?(et.enumerable?(N(ze,_e)&&ze[_e][rt]&&(ze[_e][rt]=!1),et=R(et,{enumerable:z(0,!1)})):(N(ze,_e)||vt(ze,_e,z(1,{})),ze[_e][rt]=!0),se(ze,rt,et)):vt(ze,rt,et)},He=function(ze,Ue){q(ze);var et=K(Ue),rt=F(et).concat(Ct(et));return ae(rt,function(wt){j&&!E(lt,et,wt)||De(ze,wt,et[wt])}),ze},lt=function(ze){var Ue=L(ze),et=E(ht,this,Ue);return!(this===Ze&&N(Pt,Ue)&&!N(at,Ue))&&(!(et||!N(this,Ue)||!N(Pt,Ue)||N(this,_e)&&this[_e][Ue])||et)},Vt=function(ze,Ue){var et=K(ze),rt=L(Ue);if(et!==Ze||!N(Pt,rt)||N(at,rt)){var wt=ut(et,rt);return!wt||!N(Pt,rt)||N(et,_e)&&et[_e][rt]||(wt.enumerable=!0),wt}},$t=function(ze){var Ue=it(K(ze)),et=[];return ae(Ue,function(rt){N(Pt,rt)||N(Ie,rt)||St(et,rt)}),et},Ct=function(ze){var Ue=ze===Ze,et=it(Ue?at:K(ze)),rt=[];return ae(et,function(wt){!N(Pt,wt)||Ue&&!N(Ze,wt)||St(rt,Pt[wt])}),rt};if(P||(Ge=function(){if(ee(ve,this))throw Fe("Symbol is not a constructor");var ze=arguments.length&&arguments[0]!==void 0?M(arguments[0]):void 0,Ue=We(ze),et=function(rt){this===Ze&&E(et,at,rt),N(this,_e)&&N(this[_e],Ue)&&(this[_e][Ue]=!1),se(this,Ue,z(1,rt))};return j&&U&&se(Ze,Ue,{configurable:!0,set:et}),Me(Ue,ze)},he(ve=Ge.prototype,"toString",function(){return nt(this).tag}),he(Ge,"withoutSetter",function(ze){return Me(We(ze),ze)}),ge.f=lt,xe.f=De,ye.f=Vt,J.f=fe.f=$t,ce.f=Ct,Re.f=function(ze){return Me(ke(ze),ze)},j&&(vt(ve,"description",{configurable:!0,get:function(){return nt(this).description}}),k||he(Ze,"propertyIsEnumerable",lt,{unsafe:!0}))),l({global:!0,wrap:!0,forced:!P,sham:!P},{Symbol:Ge}),ae(F(oe),function(ze){$e(ze)}),l({target:Te,stat:!0,forced:!P},{for:function(ze){var Ue=M(ze);if(N(Nt,Ue))return Nt[Ue];var et=Ge(Ue);return Nt[Ue]=et,X[et]=Ue,et},keyFor:function(ze){if(!ie(ze))throw Fe(ze+" is not a symbol");if(N(X,ze))return X[ze]},useSetter:function(){U=!0},useSimple:function(){U=!1}}),l({target:"Object",stat:!0,forced:!P,sham:!j},{create:function(ze,Ue){return Ue===void 0?R(ze):He(R(ze),Ue)},defineProperty:De,defineProperties:He,getOwnPropertyDescriptor:Vt}),l({target:"Object",stat:!0,forced:!P},{getOwnPropertyNames:$t,getOwnPropertySymbols:Ct}),l({target:"Object",stat:!0,forced:D(function(){ce.f(1)})},{getOwnPropertySymbols:function(ze){return ce.f(Y(ze))}}),Le&&l({target:"JSON",stat:!0,forced:!P||D(function(){var ze=Ge();return Le([ze])!="[null]"||Le({a:ze})!="{}"||Le(Object(ze))!="{}"})},{stringify:function(ze,Ue,et){var rt=ue(arguments),wt=Ue;if((H(Ue)||ze!==void 0)&&!ie(ze))return I(Ue)||(Ue=function(Mt,ur){if(B(wt)&&(ur=E(wt,this,Mt,ur)),!ie(ur))return ur}),rt[1]=Ue,_(Le,null,rt)}}),!ve[we]){var Rt=ve.valueOf;he(ve,we,function(ze){return E(Rt,this)})}Z(Ge,Te),Ie[_e]=!0},function(s,p,o){var l=o(146).charAt,c=o(41),b=o(56),_=o(111),E="String Iterator",w=b.set,k=b.getterFor(E);_(String,"String",function(j){w(this,{type:E,string:c(j),index:0})},function(){var j,P=k(this),D=P.string,N=P.index;return N>=D.length?{value:void 0,done:!0}:(j=l(D,N),P.index+=j.length,{value:j,done:!1})})},function(s,p,o){(function(l){var c=function(b){return b&&b.Math==Math&&b};s.exports=c(typeof globalThis=="object"&&globalThis)||c(typeof window=="object"&&window)||c(typeof self=="object"&&self)||c(typeof l=="object"&&l)||function(){return this}()||Function("return this")()}).call(this,o(82))},function(s,p,o){var l=o(17),c=o(36),b=o(7),_=o(15),E=o(34),w=o(28),k=o(58),j=o(41),P=o(37).f,D=o(134),N=b.Symbol,I=N&&N.prototype;if(c&&w(N)&&(!("description"in I)||N().description!==void 0)){var B={},H=function(){var M=arguments.length<1||arguments[0]===void 0?void 0:j(arguments[0]),z=k(I,this)?new N(M):M===void 0?N():N(M);return M===""&&(B[z]=!0),z};D(H,N),H.prototype=I,I.constructor=H;var ee=String(N("test"))=="Symbol(test)",ie=_(I.toString),q=_(I.valueOf),Y=/^Symbol\((.*)\)[^)]+$/,K=_("".replace),L=_("".slice);P(I,"description",{configurable:!0,get:function(){var M=q(this),z=ie(M);if(E(B,M))return"";var R=ee?L(z,7,-1):K(z,Y,"$1");return R===""?void 0:R}}),l({global:!0,forced:!0},{Symbol:H})}},function(s,p,o){o(150)("iterator")},function(s,p,o){o.d(p,"a",function(){return _.a}),o.d(p,"c",function(){return _.e}),o.d(p,"h",function(){return Y}),o.d(p,"i",function(){return ee}),o.d(p,"j",function(){return B}),o.d(p,"b",function(){return ye}),o.d(p,"e",function(){return he}),o.d(p,"f",function(){return xe}),o.d(p,"g",function(){return Pt});var l,c,b,_=o(0),E=0,w=[],k=_.i.__b,j=_.i.__r,P=_.i.diffed,D=_.i.__c,N=_.i.unmount;function I(X,oe){_.i.__h&&_.i.__h(c,X,E||oe),E=0;var U=c.__H||(c.__H={__:[],__h:[]});return X>=U.__.length&&U.__.push({}),U.__[X]}function B(X){return E=1,H(J,X)}function H(X,oe,U){var se=I(l++,2);return se.t=X,se.__c||(se.__=[U?U(oe):J(void 0,oe),function(Me){var De=se.t(se.__[0],Me);se.__[0]!==De&&(se.__=[De,se.__[1]],se.__c.setState({}))}],se.__c=c),se.__}function ee(X,oe){var U=I(l++,3);!_.i.__s&&F(U.__H,oe)&&(U.__=X,U.__H=oe,c.__H.__h.push(U))}function ie(X,oe){var U=I(l++,4);!_.i.__s&&F(U.__H,oe)&&(U.__=X,U.__H=oe,c.__h.push(U))}function q(X,oe){var U=I(l++,7);return F(U.__H,oe)&&(U.__=X(),U.__H=oe,U.__h=X),U.__}function Y(X,oe){return E=8,q(function(){return X},oe)}function K(){var X;for(w.sort(function(oe,U){return oe.__v.__b-U.__v.__b});X=w.pop();)if(X.__P)try{X.__H.__h.forEach(z),X.__H.__h.forEach(R),X.__H.__h=[]}catch(oe){X.__H.__h=[],_.i.__e(oe,X.__v)}}_.i.__b=function(X){c=null,k&&k(X)},_.i.__r=function(X){j&&j(X),l=0;var oe=(c=X.__c).__H;oe&&(oe.__h.forEach(z),oe.__h.forEach(R),oe.__h=[])},_.i.diffed=function(X){P&&P(X);var oe=X.__c;oe&&oe.__H&&oe.__H.__h.length&&(w.push(oe)!==1&&b===_.i.requestAnimationFrame||((b=_.i.requestAnimationFrame)||M)(K)),c=null},_.i.__c=function(X,oe){oe.some(function(U){try{U.__h.forEach(z),U.__h=U.__h.filter(function(se){return!se.__||R(se)})}catch(se){oe.some(function(Me){Me.__h&&(Me.__h=[])}),oe=[],_.i.__e(se,U.__v)}}),D&&D(X,oe)},_.i.unmount=function(X){N&&N(X);var oe,U=X.__c;U&&U.__H&&(U.__H.__.forEach(function(se){try{z(se)}catch(Me){oe=Me}}),oe&&_.i.__e(oe,U.__v))};var L=typeof requestAnimationFrame=="function";function M(X){var oe,U=function(){clearTimeout(se),L&&cancelAnimationFrame(oe),setTimeout(X)},se=setTimeout(U,100);L&&(oe=requestAnimationFrame(U))}function z(X){var oe=c,U=X.__c;typeof U=="function"&&(X.__c=void 0,U()),c=oe}function R(X){var oe=c;X.__c=X.__(),c=oe}function F(X,oe){return!X||X.length!==oe.length||oe.some(function(U,se){return U!==X[se]})}function J(X,oe){return typeof oe=="function"?oe(X):oe}function fe(X,oe){for(var U in oe)X[U]=oe[U];return X}function ce(X,oe){for(var U in X)if(U!=="__source"&&!(U in oe))return!0;for(var se in oe)if(se!=="__source"&&X[se]!==oe[se])return!0;return!1}function ye(X){this.props=X}function xe(X,oe){function U(Me){var De=this.props.ref,He=De==Me.ref;return!He&&De&&(De.call?De(null):De.current=null),oe?!oe(this.props,Me)||!He:ce(this.props,Me)}function se(Me){return this.shouldComponentUpdate=U,Object(_.e)(X,Me)}return se.displayName="Memo("+(X.displayName||X.name)+")",se.prototype.isReactComponent=!0,se.__f=!0,se}(ye.prototype=new _.a).isPureReactComponent=!0,ye.prototype.shouldComponentUpdate=function(X,oe){return ce(this.props,X)||ce(this.state,oe)};var ge=_.i.__b;_.i.__b=function(X){X.type&&X.type.__f&&X.ref&&(X.props.ref=X.ref,X.ref=null),ge&&ge(X)};var ue=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function he(X){function oe(U,se){var Me=fe({},U);return delete Me.ref,X(Me,!(se=U.ref||se)||typeof se=="object"&&!("current"in se)?null:se)}return oe.$$typeof=ue,oe.render=oe,oe.prototype.isReactComponent=oe.__f=!0,oe.displayName="ForwardRef("+(X.displayName||X.name)+")",oe}var be=function(X,oe){return X==null?null:Object(_.k)(Object(_.k)(X).map(oe))},Se={map:be,forEach:be,count:function(X){return X?Object(_.k)(X).length:0},only:function(X){var oe=Object(_.k)(X);if(oe.length!==1)throw"Children.only";return oe[0]},toArray:_.k},Ie=_.i.__e;_.i.__e=function(X,oe,U){if(X.then){for(var se,Me=oe;Me=Me.__;)if((se=Me.__c)&&se.__c)return oe.__e==null&&(oe.__e=U.__e,oe.__k=U.__k),se.__c(X,oe)}Ie(X,oe,U)};var We=_.i.unmount;function ke(X,oe,U){return X&&(X.__c&&X.__c.__H&&(X.__c.__H.__.forEach(function(se){typeof se.__c=="function"&&se.__c()}),X.__c.__H=null),(X=fe({},X)).__c!=null&&(X.__c.__P===U&&(X.__c.__P=oe),X.__c=null),X.__k=X.__k&&X.__k.map(function(se){return ke(se,oe,U)})),X}function Re(X,oe,U){return X&&(X.__v=null,X.__k=X.__k&&X.__k.map(function(se){return Re(se,oe,U)}),X.__c&&X.__c.__P===oe&&(X.__e&&U.insertBefore(X.__e,X.__d),X.__c.__e=!0,X.__c.__P=U)),X}function $e(){this.__u=0,this.t=null,this.__b=null}function Z(X){var oe=X.__.__c;return oe&&oe.__e&&oe.__e(X)}function $(){this.u=null,this.o=null}_.i.unmount=function(X){var oe=X.__c;oe&&oe.__R&&oe.__R(),oe&&X.__h===!0&&(X.type=null),We&&We(X)},($e.prototype=new _.a).__c=function(X,oe){var U=oe.__c,se=this;se.t==null&&(se.t=[]),se.t.push(U);var Me=Z(se.__v),De=!1,He=function(){De||(De=!0,U.__R=null,Me?Me(lt):lt())};U.__R=He;var lt=function(){if(!--se.__u){if(se.state.__e){var $t=se.state.__e;se.__v.__k[0]=Re($t,$t.__c.__P,$t.__c.__O)}var Ct;for(se.setState({__e:se.__b=null});Ct=se.t.pop();)Ct.forceUpdate()}},Vt=oe.__h===!0;se.__u++||Vt||se.setState({__e:se.__b=se.__v.__k[0]}),X.then(He,He)},$e.prototype.componentWillUnmount=function(){this.t=[]},$e.prototype.render=function(X,oe){if(this.__b){if(this.__v.__k){var U=document.createElement("div"),se=this.__v.__k[0].__c;this.__v.__k[0]=ke(this.__b,U,se.__O=se.__P)}this.__b=null}var Me=oe.__e&&Object(_.e)(_.b,null,X.fallback);return Me&&(Me.__h=null),[Object(_.e)(_.b,null,oe.__e?null:X.children),Me]};var ae=function(X,oe,U){if(++U[1]===U[0]&&X.o.delete(oe),X.props.revealOrder&&(X.props.revealOrder[0]!=="t"||!X.o.size))for(U=X.u;U;){for(;U.length>3;)U.pop()();if(U[1]<U[0])break;X.u=U=U[2]}};function _e(X){return this.getChildContext=function(){return X.context},X.children}function Te(X){var oe=this,U=X.i;oe.componentWillUnmount=function(){Object(_.j)(null,oe.l),oe.l=null,oe.i=null},oe.i&&oe.i!==U&&oe.componentWillUnmount(),X.__v?(oe.l||(oe.i=U,oe.l={nodeType:1,parentNode:U,childNodes:[],appendChild:function(se){this.childNodes.push(se),oe.i.appendChild(se)},insertBefore:function(se,Me){this.childNodes.push(se),oe.i.appendChild(se)},removeChild:function(se){this.childNodes.splice(this.childNodes.indexOf(se)>>>1,1),oe.i.removeChild(se)}}),Object(_.j)(Object(_.e)(_e,{context:oe.context},X.__v),oe.l)):oe.l&&oe.componentWillUnmount()}($.prototype=new _.a).__e=function(X){var oe=this,U=Z(oe.__v),se=oe.o.get(X);return se[0]++,function(Me){var De=function(){oe.props.revealOrder?(se.push(Me),ae(oe,X,se)):Me()};U?U(De):De()}},$.prototype.render=function(X){this.u=null,this.o=new Map;var oe=Object(_.k)(X.children);X.revealOrder&&X.revealOrder[0]==="b"&&oe.reverse();for(var U=oe.length;U--;)this.o.set(oe[U],this.u=[1,0,this.u]);return X.children},$.prototype.componentDidUpdate=$.prototype.componentDidMount=function(){var X=this;this.o.forEach(function(oe,U){ae(X,U,oe)})};var we=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Ke=/^(?: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]/,nt=typeof document<"u",Ze=function(X){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(X)};_.a.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(X){Object.defineProperty(_.a.prototype,X,{configurable:!0,get:function(){return this["UNSAFE_"+X]},set:function(oe){Object.defineProperty(this,X,{configurable:!0,writable:!0,value:oe})}})});var Ge=_.i.event;function ve(){}function Fe(){return this.cancelBubble}function te(){return this.defaultPrevented}_.i.event=function(X){return Ge&&(X=Ge(X)),X.persist=ve,X.isPropagationStopped=Fe,X.isDefaultPrevented=te,X.nativeEvent=X};var Le,ut={configurable:!0,get:function(){return this.class}},vt=_.i.vnode;_.i.vnode=function(X){var oe=X.type,U=X.props,se=U;if(typeof oe=="string"){var Me=oe.indexOf("-")===-1;for(var De in se={},U){var He=U[De];nt&&De==="children"&&oe==="noscript"||De==="value"&&"defaultValue"in U&&He==null||(De==="defaultValue"&&"value"in U&&U.value==null?De="value":De==="download"&&He===!0?He="":/ondoubleclick/i.test(De)?De="ondblclick":/^onchange(textarea|input)/i.test(De+oe)&&!Ze(U.type)?De="oninput":/^onfocus$/i.test(De)?De="onfocusin":/^onblur$/i.test(De)?De="onfocusout":/^on(Ani|Tra|Tou|BeforeInp)/.test(De)?De=De.toLowerCase():Me&&Ke.test(De)?De=De.replace(/[A-Z0-9]/,"-$&").toLowerCase():He===null&&(He=void 0),se[De]=He)}oe=="select"&&se.multiple&&Array.isArray(se.value)&&(se.value=Object(_.k)(U.children).forEach(function(lt){lt.props.selected=se.value.indexOf(lt.props.value)!=-1})),oe=="select"&&se.defaultValue!=null&&(se.value=Object(_.k)(U.children).forEach(function(lt){lt.props.selected=se.multiple?se.defaultValue.indexOf(lt.props.value)!=-1:se.defaultValue==lt.props.value})),X.props=se,U.class!=U.className&&(ut.enumerable="className"in U,U.className!=null&&(se.class=U.className),Object.defineProperty(se,"className",ut))}X.$$typeof=we,vt&&vt(X)};var it=_.i.__r;_.i.__r=function(X){it&&it(X),Le=X.__c};var ht={ReactCurrentDispatcher:{current:{readContext:function(X){return Le.__n[X.__c].props.value}}}};function St(X){return!!X&&X.$$typeof===we}var Pt=function(X,oe){return X(oe)},at=_.b,Nt={useState:B,useReducer:H,useEffect:ee,useLayoutEffect:ie,useRef:function(X){return E=5,q(function(){return{current:X}},[])},useImperativeHandle:function(X,oe,U){E=6,ie(function(){typeof X=="function"?X(oe()):X&&(X.current=oe())},U==null?U:U.concat(X))},useMemo:q,useCallback:Y,useContext:function(X){var oe=c.context[X.__c],U=I(l++,9);return U.c=X,oe?(U.__==null&&(U.__=!0,oe.sub(c)),oe.props.value):X.__},useDebugValue:function(X,oe){_.i.useDebugValue&&_.i.useDebugValue(oe?oe(X):X)},version:"17.0.2",Children:Se,render:function(X,oe,U){return oe.__k==null&&(oe.textContent=""),Object(_.j)(X,oe),typeof U=="function"&&U(),X?X.__c:null},hydrate:function(X,oe,U){return Object(_.h)(X,oe),typeof U=="function"&&U(),X?X.__c:null},unmountComponentAtNode:function(X){return!!X.__k&&(Object(_.j)(null,X),!0)},createPortal:function(X,oe){return Object(_.e)(Te,{__v:X,i:oe})},createElement:_.e,createContext:_.d,createFactory:function(X){return _.e.bind(null,X)},cloneElement:function(X){return St(X)?_.c.apply(null,arguments):X},createRef:_.f,Fragment:_.b,isValidElement:St,findDOMNode:function(X){return X&&(X.base||X.nodeType===1&&X)||null},Component:_.a,PureComponent:ye,memo:xe,forwardRef:he,flushSync:function(X,oe){return X(oe)},unstable_batchedUpdates:Pt,StrictMode:at,Suspense:$e,SuspenseList:$,lazy:function(X){var oe,U,se;function Me(De){if(oe||(oe=X()).then(function(He){U=He.default||He},function(He){se=He}),se)throw se;if(!U)throw oe;return Object(_.e)(U,De)}return Me.displayName="Lazy",Me.__f=!0,Me},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:ht};p.d=Nt},function(s,p,o){var l=o(7),c=o(147),b=o(148),_=o(180),E=o(57),w=function(j){if(j&&j.forEach!==_)try{E(j,"forEach",_)}catch{j.forEach=_}};for(var k in c)c[k]&&w(l[k]&&l[k].prototype);w(b)},function(s,p,o){o(17)({target:"Object",stat:!0},{setPrototypeOf:o(97)})},function(s,p,o){var l=o(17),c=o(19),b=o(38),_=o(96),E=o(137);l({target:"Object",stat:!0,forced:c(function(){_(1)}),sham:!E},{getPrototypeOf:function(w){return _(b(w))}})},function(s,p,o){var l=o(17),c=o(46),b=o(76),_=o(200),E=o(157),w=o(32),k=o(33),j=o(54),P=o(19),D=c("Reflect","construct"),N=Object.prototype,I=[].push,B=P(function(){function ie(){}return!(D(function(){},[],ie)instanceof ie)}),H=!P(function(){D(function(){})}),ee=B||H;l({target:"Reflect",stat:!0,forced:ee,sham:ee},{construct:function(ie,q){E(ie),w(q);var Y=arguments.length<3?ie:E(arguments[2]);if(H&&!B)return D(ie,q,Y);if(ie==Y){switch(q.length){case 0:return new ie;case 1:return new ie(q[0]);case 2:return new ie(q[0],q[1]);case 3:return new ie(q[0],q[1],q[2]);case 4:return new ie(q[0],q[1],q[2],q[3])}var K=[null];return b(I,K,q),new(b(_,ie,K))}var L=Y.prototype,M=j(k(L)?L:N),z=b(ie,M,q);return k(z)?z:M}})},function(s,p){var o=Function.prototype,l=o.bind,c=o.call,b=l&&l.bind(c);s.exports=l?function(_){return _&&b(c,_)}:function(_){return _&&function(){return c.apply(_,arguments)}}},function(s,p,o){var l=o(17),c=o(7),b=o(99),_=o(100),E=o(33),w=o(67),k=o(43),j=o(40),P=o(61),D=o(27),N=o(75),I=o(101),B=N("slice"),H=D("species"),ee=c.Array,ie=Math.max;l({target:"Array",proto:!0,forced:!B},{slice:function(q,Y){var K,L,M,z=j(this),R=k(z),F=w(q,R),J=w(Y===void 0?R:Y,R);if(b(z)&&(K=z.constructor,(_(K)&&(K===ee||b(K.prototype))||E(K)&&(K=K[H])===null)&&(K=void 0),K===ee||K===void 0))return I(z,F,J);for(L=new(K===void 0?ee:K)(ie(J-F,0)),M=0;F<J;F++,M++)F in z&&P(L,M,z[F]);return L.length=M,L}})},function(s,p,o){var l=o(7),c=o(51).f,b=o(57),_=o(44),E=o(108),w=o(134),k=o(95);s.exports=function(j,P){var D,N,I,B,H,ee=j.target,ie=j.global,q=j.stat;if(D=ie?l:q?l[ee]||E(ee,{}):(l[ee]||{}).prototype)for(N in P){if(B=P[N],I=j.noTargetGet?(H=c(D,N))&&H.value:D[N],!k(ie?N:ee+(q?".":"#")+N,j.forced)&&I!==void 0){if(typeof B==typeof I)continue;w(B,I)}(j.sham||I&&I.sham)&&b(B,"sham",!0),_(D,N,B,j)}}},function(s,p,o){var l=o(17),c=o(102);l({target:"RegExp",proto:!0,forced:/./.exec!==c},{exec:c})},function(s,p){s.exports=function(o){try{return!!o()}catch{return!0}}},function(s,p,o){var l=o(17),c=o(38),b=o(66);l({target:"Object",stat:!0,forced:o(19)(function(){b(1)})},{keys:function(_){return b(c(_))}})},function(s,p,o){var l=o(17),c=o(19),b=o(40),_=o(51).f,E=o(36),w=c(function(){_(1)});l({target:"Object",stat:!0,forced:!E||w,sham:!E},{getOwnPropertyDescriptor:function(k,j){return _(b(k),j)}})},function(s,p,o){var l=o(36),c=o(94).EXISTS,b=o(15),_=o(37).f,E=Function.prototype,w=b(E.toString),k=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,j=b(k.exec);l&&!c&&_(E,"name",{configurable:!0,get:function(){try{return j(k,w(this))[1]}catch{return""}}})},function(s,p,o){var l=o(17),c=o(74).filter;l({target:"Array",proto:!0,forced:!o(75)("filter")},{filter:function(b){return c(this,b,arguments.length>1?arguments[1]:void 0)}})},function(s,p,o){var l=o(17),c=o(183);l({target:"Array",stat:!0,forced:!o(118)(function(b){Array.from(b)})},{from:c})},function(s,p,o){var l=o(17),c=o(36),b=o(135),_=o(40),E=o(51),w=o(61);l({target:"Object",stat:!0,sham:!c},{getOwnPropertyDescriptors:function(k){for(var j,P,D=_(k),N=E.f,I=b(D),B={},H=0;I.length>H;)(P=N(D,j=I[H++]))!==void 0&&w(B,j,P);return B}})},,function(s,p,o){var l=o(7),c=o(84),b=o(34),_=o(85),E=o(109),w=o(128),k=c("wks"),j=l.Symbol,P=j&&j.for,D=w?j:j&&j.withoutSetter||_;s.exports=function(N){if(!b(k,N)||!E&&typeof k[N]!="string"){var I="Symbol."+N;E&&b(j,N)?k[N]=j[N]:k[N]=w&&P?P(I):D(I)}return k[N]}},function(s,p){s.exports=function(o){return typeof o=="function"}},function(s,p,o){var l=o(17),c=o(7),b=o(19),_=o(99),E=o(33),w=o(38),k=o(43),j=o(61),P=o(119),D=o(75),N=o(27),I=o(65),B=N("isConcatSpreadable"),H=9007199254740991,ee="Maximum allowed index exceeded",ie=c.TypeError,q=I>=51||!b(function(){var L=[];return L[B]=!1,L.concat()[0]!==L}),Y=D("concat"),K=function(L){if(!E(L))return!1;var M=L[B];return M!==void 0?!!M:_(L)};l({target:"Array",proto:!0,forced:!q||!Y},{concat:function(L){var M,z,R,F,J,fe=w(this),ce=P(fe,0),ye=0;for(M=-1,R=arguments.length;M<R;M++)if(K(J=M===-1?fe:arguments[M])){if(ye+(F=k(J))>H)throw ie(ee);for(z=0;z<F;z++,ye++)z in J&&j(ce,ye,J[z])}else{if(ye>=H)throw ie(ee);j(ce,ye++,J)}return ce.length=ye,ce}})},function(s,p,o){var l=o(17),c=o(199);l({target:"Object",stat:!0,forced:Object.assign!==c},{assign:c})},function(s,p,o){var l=o(105),c=typeof self=="object"&&self&&self.Object===Object&&self,b=l.a||c||Function("return this")();p.a=b},function(s,p,o){var l=o(7),c=o(33),b=l.String,_=l.TypeError;s.exports=function(E){if(c(E))return E;throw _(b(E)+" is not an object")}},function(s,p,o){var l=o(28);s.exports=function(c){return typeof c=="object"?c!==null:l(c)}},function(s,p,o){var l=o(15),c=o(38),b=l({}.hasOwnProperty);s.exports=Object.hasOwn||function(_,E){return b(c(_),E)}},function(s,p){var o=Function.prototype.call;s.exports=o.bind?o.bind(o):function(){return o.apply(o,arguments)}},function(s,p,o){var l=o(19);s.exports=!l(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},function(s,p,o){var l=o(7),c=o(36),b=o(129),_=o(32),E=o(87),w=l.TypeError,k=Object.defineProperty;p.f=c?k:function(j,P,D){if(_(j),P=E(P),_(D),b)try{return k(j,P,D)}catch{}if("get"in D||"set"in D)throw w("Accessors not supported");return"value"in D&&(j[P]=D.value),j}},function(s,p,o){var l=o(7),c=o(45),b=l.Object;s.exports=function(_){return b(c(_))}},function(s,p,o){var l=o(17),c=o(74).map;l({target:"Array",proto:!0,forced:!o(75)("map")},{map:function(b){return c(this,b,arguments.length>1?arguments[1]:void 0)}})},function(s,p,o){var l=o(81),c=o(45);s.exports=function(b){return l(c(b))}},function(s,p,o){var l=o(7),c=o(98),b=l.String;s.exports=function(_){if(c(_)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return b(_)}},function(s,p,o){(function(l){o.d(p,"d",function(){return _}),o.d(p,"c",function(){return E}),o.d(p,"b",function(){return w}),o.d(p,"a",function(){return j});var c=o(10),b=function(P,D){var N=typeof Symbol=="function"&&P[Symbol.iterator];if(!N)return P;var I,B,H=N.call(P),ee=[];try{for(;(D===void 0||D-- >0)&&!(I=H.next()).done;)ee.push(I.value)}catch(ie){B={error:ie}}finally{try{I&&!I.done&&(N=H.return)&&N.call(H)}finally{if(B)throw B.error}}return ee};function _(){var P=b(Object(c.j)(0),2)[1];return Object(c.h)(function(){P(function(D){return D+1})},[])}function E(P){if(!P||typeof P!="object")return!1;var D=Object.getPrototypeOf(P);return!D||D===Object.prototype}function w(P){return typeof Symbol=="function"?Symbol.for(P):"__$mobx-react "+P+"__"}var k={};function j(){return typeof window<"u"?window:l!==void 0?l:typeof self<"u"?self:k}}).call(this,o(82))},function(s,p,o){var l=o(90);s.exports=function(c){return l(c.length)}},function(s,p,o){var l=o(7),c=o(28),b=o(34),_=o(57),E=o(108),w=o(92),k=o(56),j=o(94).CONFIGURABLE,P=k.get,D=k.enforce,N=String(String).split("String");(s.exports=function(I,B,H,ee){var ie,q=!!ee&&!!ee.unsafe,Y=!!ee&&!!ee.enumerable,K=!!ee&&!!ee.noTargetGet,L=ee&&ee.name!==void 0?ee.name:B;c(H)&&(String(L).slice(0,7)==="Symbol("&&(L="["+String(L).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!b(H,"name")||j&&H.name!==L)&&_(H,"name",L),(ie=D(H)).source||(ie.source=N.join(typeof L=="string"?L:""))),I!==l?(q?!K&&I[B]&&(Y=!0):delete I[B],Y?I[B]=H:_(I,B,H)):Y?I[B]=H:E(B,H)})(Function.prototype,"toString",function(){return c(this)&&P(this).source||w(this)})},function(s,p,o){var l=o(7).TypeError;s.exports=function(c){if(c==null)throw l("Can't call method on "+c);return c}},function(s,p,o){var l=o(7),c=o(28),b=function(_){return c(_)?_:void 0};s.exports=function(_,E){return arguments.length<2?b(l[_]):l[_]&&l[_][E]}},function(s,p,o){var l=o(17),c=o(35),b=o(33),_=o(32),E=o(201),w=o(51),k=o(96);l({target:"Reflect",stat:!0},{get:function j(P,D){var N,I,B=arguments.length<3?P:arguments[2];return _(P)===B?P[D]:(N=w.f(P,D))?E(N)?N.value:N.get===void 0?void 0:c(N.get,B):b(I=k(P))?j(I,D,B):void 0}})},function(s,p,o){(function(l){var c=o(31),b=o(166),_=y&&!y.nodeType&&y,E=_&&typeof l=="object"&&l&&!l.nodeType&&l,w=E&&E.exports===_?c.a.Buffer:void 0,k=(w?w.isBuffer:void 0)||b.a;p.a=k}).call(this,o(121)(s))},function(s,p,o){(function(l){var c=o(105),b=y&&!y.nodeType&&y,_=b&&typeof l=="object"&&l&&!l.nodeType&&l,E=_&&_.exports===b&&c.a.process,w=function(){try{var k=_&&_.require&&_.require("util").types;return k||E&&E.binding&&E.binding("util")}catch{}}();p.a=w}).call(this,o(121)(s))},function(s,p,o){var l=o(15),c=l({}.toString),b=l("".slice);s.exports=function(_){return b(c(_),8,-1)}},function(s,p,o){var l=o(36),c=o(35),b=o(93),_=o(71),E=o(40),w=o(87),k=o(34),j=o(129),P=Object.getOwnPropertyDescriptor;p.f=l?P:function(D,N){if(D=E(D),N=w(N),j)try{return P(D,N)}catch{}if(k(D,N))return _(!c(b.f,D,N),D[N])}},function(s,p,o){var l=o(17),c=o(213).entries;l({target:"Object",stat:!0},{entries:function(b){return c(b)}})},function(s,p,o){var l=o(46);s.exports=l("navigator","userAgent")||""},function(s,p,o){var l,c=o(32),b=o(169),_=o(110),E=o(69),w=o(133),k=o(86),j=o(91),P=j("IE_PROTO"),D=function(){},N=function(H){return"<script>"+H+"<\/script>"},I=function(H){H.write(N("")),H.close();var ee=H.parentWindow.Object;return H=null,ee},B=function(){try{l=new ActiveXObject("htmlfile")}catch{}var H,ee;B=typeof document<"u"?document.domain&&l?I(l):((ee=k("iframe")).style.display="none",w.appendChild(ee),ee.src="javascript:",(H=ee.contentWindow.document).open(),H.write(N("document.F=Object")),H.close(),H.F):I(l);for(var ie=_.length;ie--;)delete B.prototype[_[ie]];return B()};E[P]=!0,s.exports=Object.create||function(H,ee){var ie;return H!==null?(D.prototype=c(H),ie=new D,D.prototype=null,ie[P]=H):ie=B(),ee===void 0?ie:b(ie,ee)}},function(s,p,o){var l=o(7),c=o(28),b=o(89),_=l.TypeError;s.exports=function(E){if(c(E))return E;throw _(b(E)+" is not a function")}},function(s,p,o){var l,c,b,_=o(171),E=o(7),w=o(15),k=o(33),j=o(57),P=o(34),D=o(107),N=o(91),I=o(69),B="Object already initialized",H=E.TypeError,ee=E.WeakMap;if(_||D.state){var ie=D.state||(D.state=new ee),q=w(ie.get),Y=w(ie.has),K=w(ie.set);l=function(M,z){if(Y(ie,M))throw new H(B);return z.facade=M,K(ie,M,z),z},c=function(M){return q(ie,M)||{}},b=function(M){return Y(ie,M)}}else{var L=N("state");I[L]=!0,l=function(M,z){if(P(M,L))throw new H(B);return z.facade=M,j(M,L,z),z},c=function(M){return P(M,L)?M[L]:{}},b=function(M){return P(M,L)}}s.exports={set:l,get:c,has:b,enforce:function(M){return b(M)?c(M):l(M,{})},getterFor:function(M){return function(z){var R;if(!k(z)||(R=c(z)).type!==M)throw H("Incompatible receiver, "+M+" required");return R}}}},function(s,p,o){var l=o(36),c=o(37),b=o(71);s.exports=l?function(_,E,w){return c.f(_,E,b(1,w))}:function(_,E,w){return _[E]=w,_}},function(s,p,o){var l=o(15);s.exports=l({}.isPrototypeOf)},function(s,p,o){var l=o(55);s.exports=function(c,b){var _=c[b];return _==null?void 0:l(_)}},function(s,p,o){o(174)("Map",function(l){return function(){return l(this,arguments.length?arguments[0]:void 0)}},o(178))},function(s,p,o){var l=o(87),c=o(37),b=o(71);s.exports=function(_,E,w){var k=l(E);k in _?c.f(_,k,b(0,w)):_[k]=w}},function(s,p,o){var l=o(15),c=o(55),b=l(l.bind);s.exports=function(_,E){return c(_),E===void 0?_:b?b(_,E):function(){return _.apply(E,arguments)}}},function(s,p,o){var l=o(17),c=o(15),b=o(81),_=o(40),E=o(120),w=c([].join),k=b!=Object,j=E("join",",");l({target:"Array",proto:!0,forced:k||!j},{join:function(P){return w(_(this),P===void 0?",":P)}})},function(s,p){s.exports=!1},function(s,p,o){var l,c,b=o(7),_=o(53),E=b.process,w=b.Deno,k=E&&E.versions||w&&w.version,j=k&&k.v8;j&&(c=(l=j.split("."))[0]>0&&l[0]<4?1:+(l[0]+l[1])),!c&&_&&(!(l=_.match(/Edge\/(\d+)/))||l[1]>=74)&&(l=_.match(/Chrome\/(\d+)/))&&(c=+l[1]),s.exports=c},function(s,p,o){var l=o(131),c=o(110);s.exports=Object.keys||function(b){return l(b,c)}},function(s,p,o){var l=o(68),c=Math.max,b=Math.min;s.exports=function(_,E){var w=l(_);return w<0?c(w+E,0):b(w,E)}},function(s,p){var o=Math.ceil,l=Math.floor;s.exports=function(c){var b=+c;return b!=b||b===0?0:(b>0?l:o)(b)}},function(s,p){s.exports={}},function(s,p){s.exports={}},function(s,p){s.exports=function(o,l){return{enumerable:!(1&o),configurable:!(2&o),writable:!(4&o),value:l}}},function(s,p,o){var l=o(131),c=o(110).concat("length","prototype");p.f=Object.getOwnPropertyNames||function(b){return l(b,c)}},function(s,p,o){var l=o(37).f,c=o(34),b=o(27)("toStringTag");s.exports=function(_,E,w){_&&!c(_=w?_:_.prototype,b)&&l(_,b,{configurable:!0,value:E})}},function(s,p,o){var l=o(62),c=o(15),b=o(81),_=o(38),E=o(43),w=o(119),k=c([].push),j=function(P){var D=P==1,N=P==2,I=P==3,B=P==4,H=P==6,ee=P==7,ie=P==5||H;return function(q,Y,K,L){for(var M,z,R=_(q),F=b(R),J=l(Y,K),fe=E(F),ce=0,ye=L||w,xe=D?ye(q,fe):N||ee?ye(q,0):void 0;fe>ce;ce++)if((ie||ce in F)&&(z=J(M=F[ce],ce,R),P))if(D)xe[ce]=z;else if(z)switch(P){case 3:return!0;case 5:return M;case 6:return ce;case 2:k(xe,M)}else switch(P){case 4:return!1;case 7:k(xe,M)}return H?-1:I||B?B:xe}};s.exports={forEach:j(0),map:j(1),filter:j(2),some:j(3),every:j(4),find:j(5),findIndex:j(6),filterReject:j(7)}},function(s,p,o){var l=o(19),c=o(27),b=o(65),_=c("species");s.exports=function(E){return b>=51||!l(function(){var w=[];return(w.constructor={})[_]=function(){return{foo:1}},w[E](Boolean).foo!==1})}},function(s,p){var o=Function.prototype,l=o.apply,c=o.bind,b=o.call;s.exports=typeof Reflect=="object"&&Reflect.apply||(c?b.bind(l):function(){return b.apply(l,arguments)})},function(s,p,o){var l=o(76),c=o(35),b=o(15),_=o(122),E=o(154),w=o(32),k=o(45),j=o(156),P=o(123),D=o(90),N=o(41),I=o(59),B=o(113),H=o(124),ee=o(102),ie=o(151),q=o(19),Y=ie.UNSUPPORTED_Y,K=4294967295,L=Math.min,M=[].push,z=b(/./.exec),R=b(M),F=b("".slice),J=!q(function(){var fe=/(?:)/,ce=fe.exec;fe.exec=function(){return ce.apply(this,arguments)};var ye="ab".split(fe);return ye.length!==2||ye[0]!=="a"||ye[1]!=="b"});_("split",function(fe,ce,ye){var xe;return xe="abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?function(ge,ue){var he=N(k(this)),be=ue===void 0?K:ue>>>0;if(be===0)return[];if(ge===void 0)return[he];if(!E(ge))return c(ce,he,ge,be);for(var Se,Ie,We,ke=[],Re=(ge.ignoreCase?"i":"")+(ge.multiline?"m":"")+(ge.unicode?"u":"")+(ge.sticky?"y":""),$e=0,Z=new RegExp(ge.source,Re+"g");(Se=c(ee,Z,he))&&!((Ie=Z.lastIndex)>$e&&(R(ke,F(he,$e,Se.index)),Se.length>1&&Se.index<he.length&&l(M,ke,B(Se,1)),We=Se[0].length,$e=Ie,ke.length>=be));)Z.lastIndex===Se.index&&Z.lastIndex++;return $e===he.length?!We&&z(Z,"")||R(ke,""):R(ke,F(he,$e)),ke.length>be?B(ke,0,be):ke}:"0".split(void 0,0).length?function(ge,ue){return ge===void 0&&ue===0?[]:c(ce,this,ge,ue)}:ce,[function(ge,ue){var he=k(this),be=ge==null?void 0:I(ge,fe);return be?c(be,ge,he,ue):c(xe,N(he),ge,ue)},function(ge,ue){var he=w(this),be=N(ge),Se=ye(xe,he,be,ue,xe!==ce);if(Se.done)return Se.value;var Ie=j(he,RegExp),We=he.unicode,ke=(he.ignoreCase?"i":"")+(he.multiline?"m":"")+(he.unicode?"u":"")+(Y?"g":"y"),Re=new Ie(Y?"^(?:"+he.source+")":he,ke),$e=ue===void 0?K:ue>>>0;if($e===0)return[];if(be.length===0)return H(Re,be)===null?[be]:[];for(var Z=0,$=0,ae=[];$<be.length;){Re.lastIndex=Y?0:$;var _e,Te=H(Re,Y?F(be,$):be);if(Te===null||(_e=L(D(Re.lastIndex+(Y?$:0)),be.length))===Z)$=P(be,$,We);else{if(R(ae,F(be,Z,$)),ae.length===$e)return ae;for(var we=1;we<=Te.length-1;we++)if(R(ae,Te[we]),ae.length===$e)return ae;$=Z=_e}}return R(ae,F(be,Z)),ae}]},!J,Y)},function(s,p,o){var l=o(36),c=o(7),b=o(15),_=o(95),E=o(44),w=o(34),k=o(143),j=o(58),P=o(88),D=o(130),N=o(19),I=o(72).f,B=o(51).f,H=o(37).f,ee=o(197),ie=o(159).trim,q="Number",Y=c.Number,K=Y.prototype,L=c.TypeError,M=b("".slice),z=b("".charCodeAt),R=function(xe){var ge=D(xe,"number");return typeof ge=="bigint"?ge:F(ge)},F=function(xe){var ge,ue,he,be,Se,Ie,We,ke,Re=D(xe,"number");if(P(Re))throw L("Cannot convert a Symbol value to a number");if(typeof Re=="string"&&Re.length>2){if(Re=ie(Re),(ge=z(Re,0))===43||ge===45){if((ue=z(Re,2))===88||ue===120)return NaN}else if(ge===48){switch(z(Re,1)){case 66:case 98:he=2,be=49;break;case 79:case 111:he=8,be=55;break;default:return+Re}for(Ie=(Se=M(Re,2)).length,We=0;We<Ie;We++)if((ke=z(Se,We))<48||ke>be)return NaN;return parseInt(Se,he)}}return+Re};if(_(q,!Y(" 0o1")||!Y("0b1")||Y("+0x1"))){for(var J,fe=function(xe){var ge=arguments.length<1?0:Y(R(xe)),ue=this;return j(K,ue)&&N(function(){ee(ue)})?k(Object(ge),ue,fe):ge},ce=l?I(Y):"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(","),ye=0;ce.length>ye;ye++)w(Y,J=ce[ye])&&!w(fe,J)&&H(fe,J,B(Y,J));fe.prototype=K,K.constructor=fe,E(c,q,fe)}},function(s,p,o){o(17)({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991})},function(s,p,o){var l=o(17),c=o(214),b=o(83);l({target:"Array",proto:!0},{fill:c}),b("fill")},function(s,p,o){var l=o(7),c=o(15),b=o(19),_=o(50),E=l.Object,w=c("".split);s.exports=b(function(){return!E("z").propertyIsEnumerable(0)})?function(k){return _(k)=="String"?w(k,""):E(k)}:E},function(s,p){var o;o=function(){return this}();try{o=o||new Function("return this")()}catch{typeof window=="object"&&(o=window)}s.exports=o},function(s,p,o){var l=o(27),c=o(54),b=o(37),_=l("unscopables"),E=Array.prototype;E[_]==null&&b.f(E,_,{configurable:!0,value:c(null)}),s.exports=function(w){E[_][w]=!0}},function(s,p,o){var l=o(64),c=o(107);(s.exports=function(b,_){return c[b]||(c[b]=_!==void 0?_:{})})("versions",[]).push({version:"3.19.3",mode:l?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},function(s,p,o){var l=o(15),c=0,b=Math.random(),_=l(1 .toString);s.exports=function(E){return"Symbol("+(E===void 0?"":E)+")_"+_(++c+b,36)}},function(s,p,o){var l=o(7),c=o(33),b=l.document,_=c(b)&&c(b.createElement);s.exports=function(E){return _?b.createElement(E):{}}},function(s,p,o){var l=o(130),c=o(88);s.exports=function(b){var _=l(b,"string");return c(_)?_:_+""}},function(s,p,o){var l=o(7),c=o(46),b=o(28),_=o(58),E=o(128),w=l.Object;s.exports=E?function(k){return typeof k=="symbol"}:function(k){var j=c("Symbol");return b(j)&&_(j.prototype,w(k))}},function(s,p,o){var l=o(7).String;s.exports=function(c){try{return l(c)}catch{return"Object"}}},function(s,p,o){var l=o(68),c=Math.min;s.exports=function(b){return b>0?c(l(b),9007199254740991):0}},function(s,p,o){var l=o(84),c=o(85),b=l("keys");s.exports=function(_){return b[_]||(b[_]=c(_))}},function(s,p,o){var l=o(15),c=o(28),b=o(107),_=l(Function.toString);c(b.inspectSource)||(b.inspectSource=function(E){return _(E)}),s.exports=b.inspectSource},function(s,p,o){var l={}.propertyIsEnumerable,c=Object.getOwnPropertyDescriptor,b=c&&!l.call({1:2},1);p.f=b?function(_){var E=c(this,_);return!!E&&E.enumerable}:l},function(s,p,o){var l=o(36),c=o(34),b=Function.prototype,_=l&&Object.getOwnPropertyDescriptor,E=c(b,"name"),w=E&&function(){}.name==="something",k=E&&(!l||l&&_(b,"name").configurable);s.exports={EXISTS:E,PROPER:w,CONFIGURABLE:k}},function(s,p,o){var l=o(19),c=o(28),b=/#|\.prototype\./,_=function(P,D){var N=w[E(P)];return N==j||N!=k&&(c(D)?l(D):!!D)},E=_.normalize=function(P){return String(P).replace(b,".").toLowerCase()},w=_.data={},k=_.NATIVE="N",j=_.POLYFILL="P";s.exports=_},function(s,p,o){var l=o(7),c=o(34),b=o(28),_=o(38),E=o(91),w=o(137),k=E("IE_PROTO"),j=l.Object,P=j.prototype;s.exports=w?j.getPrototypeOf:function(D){var N=_(D);if(c(N,k))return N[k];var I=N.constructor;return b(I)&&N instanceof I?I.prototype:N instanceof j?P:null}},function(s,p,o){var l=o(15),c=o(32),b=o(173);s.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var _,E=!1,w={};try{(_=l(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(w,[]),E=w instanceof Array}catch{}return function(k,j){return c(k),b(j),E?_(k,j):k.__proto__=j,k}}():void 0)},function(s,p,o){var l=o(7),c=o(116),b=o(28),_=o(50),E=o(27)("toStringTag"),w=l.Object,k=_(function(){return arguments}())=="Arguments";s.exports=c?_:function(j){var P,D,N;return j===void 0?"Undefined":j===null?"Null":typeof(D=function(I,B){try{return I[B]}catch{}}(P=w(j),E))=="string"?D:k?_(P):(N=_(P))=="Object"&&b(P.callee)?"Arguments":N}},function(s,p,o){var l=o(50);s.exports=Array.isArray||function(c){return l(c)=="Array"}},function(s,p,o){var l=o(15),c=o(19),b=o(28),_=o(98),E=o(46),w=o(92),k=function(){},j=[],P=E("Reflect","construct"),D=/^\s*(?:class|function)\b/,N=l(D.exec),I=!D.exec(k),B=function(H){if(!b(H))return!1;try{return P(k,j,H),!0}catch{return!1}};s.exports=!P||c(function(){var H;return B(B.call)||!B(Object)||!B(function(){H=!0})||H})?function(H){if(!b(H))return!1;switch(_(H)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return I||!!N(D,w(H))}:B},function(s,p,o){var l=o(15);s.exports=l([].slice)},function(s,p,o){var l,c,b=o(35),_=o(15),E=o(41),w=o(185),k=o(151),j=o(84),P=o(54),D=o(56).get,N=o(186),I=o(187),B=j("native-string-replace",String.prototype.replace),H=RegExp.prototype.exec,ee=H,ie=_("".charAt),q=_("".indexOf),Y=_("".replace),K=_("".slice),L=(c=/b*/g,b(H,l=/a/,"a"),b(H,c,"a"),l.lastIndex!==0||c.lastIndex!==0),M=k.BROKEN_CARET,z=/()??/.exec("")[1]!==void 0;(L||z||M||N||I)&&(ee=function(R){var F,J,fe,ce,ye,xe,ge,ue=this,he=D(ue),be=E(R),Se=he.raw;if(Se)return Se.lastIndex=ue.lastIndex,F=b(ee,Se,be),ue.lastIndex=Se.lastIndex,F;var Ie=he.groups,We=M&&ue.sticky,ke=b(w,ue),Re=ue.source,$e=0,Z=be;if(We&&(ke=Y(ke,"y",""),q(ke,"g")===-1&&(ke+="g"),Z=K(be,ue.lastIndex),ue.lastIndex>0&&(!ue.multiline||ue.multiline&&ie(be,ue.lastIndex-1)!==`
|
||
`)&&(Re="(?: "+Re+")",Z=" "+Z,$e++),J=new RegExp("^(?:"+Re+")",ke)),z&&(J=new RegExp("^"+Re+"$(?!\\s)",ke)),L&&(fe=ue.lastIndex),ce=b(H,We?J:ue,Z),We?ce?(ce.input=K(ce.input,$e),ce[0]=K(ce[0],$e),ce.index=ue.lastIndex,ue.lastIndex+=ce[0].length):ue.lastIndex=0:L&&ce&&(ue.lastIndex=ue.global?ce.index+ce[0].length:fe),z&&ce&&ce.length>1&&b(B,ce[0],J,function(){for(ye=1;ye<arguments.length-2;ye++)arguments[ye]===void 0&&(ce[ye]=void 0)}),ce&&Ie)for(ce.groups=xe=P(null),ye=0;ye<Ie.length;ye++)xe[(ge=Ie[ye])[0]]=ce[ge[1]];return ce}),s.exports=ee},function(s,p,o){var l=o(17),c=o(7),b=o(67),_=o(68),E=o(43),w=o(38),k=o(119),j=o(61),P=o(75)("splice"),D=c.TypeError,N=Math.max,I=Math.min,B=9007199254740991,H="Maximum allowed length exceeded";l({target:"Array",proto:!0,forced:!P},{splice:function(ee,ie){var q,Y,K,L,M,z,R=w(this),F=E(R),J=b(ee,F),fe=arguments.length;if(fe===0?q=Y=0:fe===1?(q=0,Y=F-J):(q=fe-2,Y=I(N(_(ie),0),F-J)),F+q-Y>B)throw D(H);for(K=k(R,Y),L=0;L<Y;L++)(M=J+L)in R&&j(K,L,R[M]);if(K.length=Y,q<Y){for(L=J;L<F-Y;L++)z=L+q,(M=L+Y)in R?R[z]=R[M]:delete R[z];for(L=F;L>F-Y+q;L--)delete R[L-1]}else if(q>Y)for(L=F-Y;L>J;L--)z=L+q-1,(M=L+Y-1)in R?R[z]=R[M]:delete R[z];for(L=0;L<q;L++)R[L+J]=arguments[L+2];return R.length=F-Y+q,K}})},function(s,p,o){var l=o(17),c=o(202);l({target:"String",proto:!0,forced:o(203)("anchor")},{anchor:function(b){return c(this,"a","name",b)}})},function(s,p,o){(function(l){var c=typeof l=="object"&&l&&l.Object===Object&&l;p.a=c}).call(this,o(82))},function(s,p,o){(function(l){var c=o(31),b=y&&!y.nodeType&&y,_=b&&typeof l=="object"&&l&&!l.nodeType&&l,E=_&&_.exports===b?c.a.Buffer:void 0,w=E?E.allocUnsafe:void 0;p.a=function(k,j){if(j)return k.slice();var P=k.length,D=w?w(P):new k.constructor(P);return k.copy(D),D}}).call(this,o(121)(s))},function(s,p,o){var l=o(7),c=o(108),b="__core-js_shared__",_=l[b]||c(b,{});s.exports=_},function(s,p,o){var l=o(7),c=Object.defineProperty;s.exports=function(b,_){try{c(l,b,{value:_,configurable:!0,writable:!0})}catch{l[b]=_}return _}},function(s,p,o){var l=o(65),c=o(19);s.exports=!!Object.getOwnPropertySymbols&&!c(function(){var b=Symbol();return!String(b)||!(Object(b)instanceof Symbol)||!Symbol.sham&&l&&l<41})},function(s,p){s.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(s,p,o){var l=o(17),c=o(35),b=o(64),_=o(94),E=o(28),w=o(172),k=o(96),j=o(97),P=o(73),D=o(57),N=o(44),I=o(27),B=o(70),H=o(136),ee=_.PROPER,ie=_.CONFIGURABLE,q=H.IteratorPrototype,Y=H.BUGGY_SAFARI_ITERATORS,K=I("iterator"),L="keys",M="values",z="entries",R=function(){return this};s.exports=function(F,J,fe,ce,ye,xe,ge){w(fe,J,ce);var ue,he,be,Se=function($){if($===ye&&$e)return $e;if(!Y&&$ in ke)return ke[$];switch($){case L:case M:case z:return function(){return new fe(this,$)}}return function(){return new fe(this)}},Ie=J+" Iterator",We=!1,ke=F.prototype,Re=ke[K]||ke["@@iterator"]||ye&&ke[ye],$e=!Y&&Re||Se(ye),Z=J=="Array"&&ke.entries||Re;if(Z&&(ue=k(Z.call(new F)))!==Object.prototype&&ue.next&&(b||k(ue)===q||(j?j(ue,q):E(ue[K])||N(ue,K,R)),P(ue,Ie,!0,!0),b&&(B[Ie]=R)),ee&&ye==M&&Re&&Re.name!==M&&(!b&&ie?D(ke,"name",M):(We=!0,$e=function(){return c(Re,this)})),ye)if(he={values:Se(M),keys:xe?$e:Se(L),entries:Se(z)},ge)for(be in he)(Y||We||!(be in ke))&&N(ke,be,he[be]);else l({target:J,proto:!0,forced:Y||We},he);return b&&!ge||ke[K]===$e||N(ke,K,$e,{name:ye}),B[J]=$e,he}},function(s,p){p.f=Object.getOwnPropertySymbols},function(s,p,o){var l=o(7),c=o(67),b=o(43),_=o(61),E=l.Array,w=Math.max;s.exports=function(k,j,P){for(var D=b(k),N=c(j,D),I=c(P===void 0?D:P,D),B=E(w(I-N,0)),H=0;N<I;N++,H++)_(B,H,k[N]);return B.length=H,B}},function(s,p,o){var l=o(7),c=o(62),b=o(35),_=o(32),E=o(89),w=o(140),k=o(43),j=o(58),P=o(141),D=o(115),N=o(142),I=l.TypeError,B=function(ee,ie){this.stopped=ee,this.result=ie},H=B.prototype;s.exports=function(ee,ie,q){var Y,K,L,M,z,R,F,J=q&&q.that,fe=!(!q||!q.AS_ENTRIES),ce=!(!q||!q.IS_ITERATOR),ye=!(!q||!q.INTERRUPTED),xe=c(ie,J),ge=function(he){return Y&&N(Y,"normal",he),new B(!0,he)},ue=function(he){return fe?(_(he),ye?xe(he[0],he[1],ge):xe(he[0],he[1])):ye?xe(he,ge):xe(he)};if(ce)Y=ee;else{if(!(K=D(ee)))throw I(E(ee)+" is not iterable");if(w(K)){for(L=0,M=k(ee);M>L;L++)if((z=ue(ee[L]))&&j(H,z))return z;return new B(!1)}Y=P(ee,K)}for(R=Y.next;!(F=b(R,Y)).done;){try{z=ue(F.value)}catch(he){N(Y,"throw",he)}if(typeof z=="object"&&z&&j(H,z))return z}return new B(!1)}},function(s,p,o){var l=o(98),c=o(59),b=o(70),_=o(27)("iterator");s.exports=function(E){if(E!=null)return c(E,_)||c(E,"@@iterator")||b[l(E)]}},function(s,p,o){var l={};l[o(27)("toStringTag")]="z",s.exports=String(l)==="[object z]"},function(s,p,o){var l=o(7),c=o(58),b=l.TypeError;s.exports=function(_,E){if(c(E,_))return _;throw b("Incorrect invocation")}},function(s,p,o){var l=o(27)("iterator"),c=!1;try{var b=0,_={next:function(){return{done:!!b++}},return:function(){c=!0}};_[l]=function(){return this},Array.from(_,function(){throw 2})}catch{}s.exports=function(E,w){if(!w&&!c)return!1;var k=!1;try{var j={};j[l]=function(){return{next:function(){return{done:k=!0}}}},E(j)}catch{}return k}},function(s,p,o){var l=o(181);s.exports=function(c,b){return new(l(c))(b===0?0:b)}},function(s,p,o){var l=o(19);s.exports=function(c,b){var _=[][c];return!!_&&l(function(){_.call(null,b||function(){throw 1},1)})}},function(s,p){s.exports=function(o){if(!o.webpackPolyfill){var l=Object.create(o);l.children||(l.children=[]),Object.defineProperty(l,"loaded",{enumerable:!0,get:function(){return l.l}}),Object.defineProperty(l,"id",{enumerable:!0,get:function(){return l.i}}),Object.defineProperty(l,"exports",{enumerable:!0}),l.webpackPolyfill=1}return l}},function(s,p,o){o(18);var l=o(15),c=o(44),b=o(102),_=o(19),E=o(27),w=o(57),k=E("species"),j=RegExp.prototype;s.exports=function(P,D,N,I){var B=E(P),H=!_(function(){var Y={};return Y[B]=function(){return 7},""[P](Y)!=7}),ee=H&&!_(function(){var Y=!1,K=/a/;return P==="split"&&((K={}).constructor={},K.constructor[k]=function(){return K},K.flags="",K[B]=/./[B]),K.exec=function(){return Y=!0,null},K[B](""),!Y});if(!H||!ee||N){var ie=l(/./[B]),q=D(B,""[P],function(Y,K,L,M,z){var R=l(Y),F=K.exec;return F===b||F===j.exec?H&&!z?{done:!0,value:ie(K,L,M)}:{done:!0,value:R(L,K,M)}:{done:!1}});c(String.prototype,P,q[0]),c(j,B,q[1])}I&&w(j[B],"sham",!0)}},function(s,p,o){var l=o(146).charAt;s.exports=function(c,b,_){return b+(_?l(c,b).length:1)}},function(s,p,o){var l=o(7),c=o(35),b=o(32),_=o(28),E=o(50),w=o(102),k=l.TypeError;s.exports=function(j,P){var D=j.exec;if(_(D)){var N=c(D,j,P);return N!==null&&b(N),N}if(E(j)==="RegExp")return c(w,j,P);throw k("RegExp#exec called on incompatible receiver")}},function(s,p,o){var l=o(76),c=o(35),b=o(15),_=o(122),E=o(19),w=o(32),k=o(28),j=o(68),P=o(90),D=o(41),N=o(45),I=o(123),B=o(59),H=o(198),ee=o(124),ie=o(27)("replace"),q=Math.max,Y=Math.min,K=b([].concat),L=b([].push),M=b("".indexOf),z=b("".slice),R="a".replace(/./,"$0")==="$0",F=!!/./[ie]&&/./[ie]("a","$0")==="";_("replace",function(J,fe,ce){var ye=F?"$":"$0";return[function(xe,ge){var ue=N(this),he=xe==null?void 0:B(xe,ie);return he?c(he,xe,ue,ge):c(fe,D(ue),xe,ge)},function(xe,ge){var ue=w(this),he=D(xe);if(typeof ge=="string"&&M(ge,ye)===-1&&M(ge,"$<")===-1){var be=ce(fe,ue,he,ge);if(be.done)return be.value}var Se=k(ge);Se||(ge=D(ge));var Ie=ue.global;if(Ie){var We=ue.unicode;ue.lastIndex=0}for(var ke=[];;){var Re=ee(ue,he);if(Re===null||(L(ke,Re),!Ie))break;D(Re[0])===""&&(ue.lastIndex=I(he,P(ue.lastIndex),We))}for(var $e,Z="",$=0,ae=0;ae<ke.length;ae++){for(var _e=D((Re=ke[ae])[0]),Te=q(Y(j(Re.index),he.length),0),we=[],Ke=1;Ke<Re.length;Ke++)L(we,($e=Re[Ke])===void 0?$e:String($e));var nt=Re.groups;if(Se){var Ze=K([_e],we,Te,he);nt!==void 0&&L(Ze,nt);var Ge=D(l(ge,void 0,Ze))}else Ge=H(_e,he,Te,we,nt,ge);Te>=$&&(Z+=z(he,$,Te)+Ge,$=Te+_e.length)}return Z+z(he,$)}]},!!E(function(){var J=/./;return J.exec=function(){var fe=[];return fe.groups={a:"7"},fe},"".replace(J,"$<a>")!=="7"})||!R||F)},function(s,p,o){var l=o(50),c=o(7);s.exports=l(c.process)=="process"},function(s,p,o){o(17)({target:"Number",stat:!0},{MIN_SAFE_INTEGER:-9007199254740991})},function(s,p,o){var l=o(109);s.exports=l&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},function(s,p,o){var l=o(36),c=o(19),b=o(86);s.exports=!l&&!c(function(){return Object.defineProperty(b("div"),"a",{get:function(){return 7}}).a!=7})},function(s,p,o){var l=o(7),c=o(35),b=o(33),_=o(88),E=o(59),w=o(170),k=o(27),j=l.TypeError,P=k("toPrimitive");s.exports=function(D,N){if(!b(D)||_(D))return D;var I,B=E(D,P);if(B){if(N===void 0&&(N="default"),I=c(B,D,N),!b(I)||_(I))return I;throw j("Can't convert object to primitive value")}return N===void 0&&(N="number"),w(D,N)}},function(s,p,o){var l=o(15),c=o(34),b=o(40),_=o(132).indexOf,E=o(69),w=l([].push);s.exports=function(k,j){var P,D=b(k),N=0,I=[];for(P in D)!c(E,P)&&c(D,P)&&w(I,P);for(;j.length>N;)c(D,P=j[N++])&&(~_(I,P)||w(I,P));return I}},function(s,p,o){var l=o(40),c=o(67),b=o(43),_=function(E){return function(w,k,j){var P,D=l(w),N=b(D),I=c(j,N);if(E&&k!=k){for(;N>I;)if((P=D[I++])!=P)return!0}else for(;N>I;I++)if((E||I in D)&&D[I]===k)return E||I||0;return!E&&-1}};s.exports={includes:_(!0),indexOf:_(!1)}},function(s,p,o){var l=o(46);s.exports=l("document","documentElement")},function(s,p,o){var l=o(34),c=o(135),b=o(51),_=o(37);s.exports=function(E,w){for(var k=c(w),j=_.f,P=b.f,D=0;D<k.length;D++){var N=k[D];l(E,N)||j(E,N,P(w,N))}}},function(s,p,o){var l=o(46),c=o(15),b=o(72),_=o(112),E=o(32),w=c([].concat);s.exports=l("Reflect","ownKeys")||function(k){var j=b.f(E(k)),P=_.f;return P?w(j,P(k)):j}},function(s,p,o){var l,c,b,_=o(19),E=o(28),w=o(54),k=o(96),j=o(44),P=o(27),D=o(64),N=P("iterator"),I=!1;[].keys&&("next"in(b=[].keys())?(c=k(k(b)))!==Object.prototype&&(l=c):I=!0),l==null||_(function(){var B={};return l[N].call(B)!==B})?l={}:D&&(l=w(l)),E(l[N])||j(l,N,function(){return this}),s.exports={IteratorPrototype:l,BUGGY_SAFARI_ITERATORS:I}},function(s,p,o){var l=o(19);s.exports=!l(function(){function c(){}return c.prototype.constructor=null,Object.getPrototypeOf(new c)!==c.prototype})},function(s,p,o){var l=o(17),c=o(15),b=o(69),_=o(33),E=o(34),w=o(37).f,k=o(72),j=o(139),P=o(175),D=o(85),N=o(177),I=!1,B=D("meta"),H=0,ee=function(q){w(q,B,{value:{objectID:"O"+H++,weakData:{}}})},ie=s.exports={enable:function(){ie.enable=function(){},I=!0;var q=k.f,Y=c([].splice),K={};K[B]=1,q(K).length&&(k.f=function(L){for(var M=q(L),z=0,R=M.length;z<R;z++)if(M[z]===B){Y(M,z,1);break}return M},l({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:j.f}))},fastKey:function(q,Y){if(!_(q))return typeof q=="symbol"?q:(typeof q=="string"?"S":"P")+q;if(!E(q,B)){if(!P(q))return"F";if(!Y)return"E";ee(q)}return q[B].objectID},getWeakData:function(q,Y){if(!E(q,B)){if(!P(q))return!0;if(!Y)return!1;ee(q)}return q[B].weakData},onFreeze:function(q){return N&&I&&P(q)&&!E(q,B)&&ee(q),q}};b[B]=!0},function(s,p,o){var l=o(50),c=o(40),b=o(72).f,_=o(113),E=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];s.exports.f=function(w){return E&&l(w)=="Window"?function(k){try{return b(k)}catch{return _(E)}}(w):b(c(w))}},function(s,p,o){var l=o(27),c=o(70),b=l("iterator"),_=Array.prototype;s.exports=function(E){return E!==void 0&&(c.Array===E||_[b]===E)}},function(s,p,o){var l=o(7),c=o(35),b=o(55),_=o(32),E=o(89),w=o(115),k=l.TypeError;s.exports=function(j,P){var D=arguments.length<2?w(j):P;if(b(D))return _(c(D,j));throw k(E(j)+" is not iterable")}},function(s,p,o){var l=o(35),c=o(32),b=o(59);s.exports=function(_,E,w){var k,j;c(_);try{if(!(k=b(_,"return"))){if(E==="throw")throw w;return w}k=l(k,_)}catch(P){j=!0,k=P}if(E==="throw")throw w;if(j)throw k;return c(k),w}},function(s,p,o){var l=o(28),c=o(33),b=o(97);s.exports=function(_,E,w){var k,j;return b&&l(k=E.constructor)&&k!==w&&c(j=k.prototype)&&j!==w.prototype&&b(_,j),_}},function(s,p,o){var l=o(44);s.exports=function(c,b,_){for(var E in b)l(c,E,b[E],_);return c}},function(s,p,o){var l=o(46),c=o(37),b=o(27),_=o(36),E=b("species");s.exports=function(w){var k=l(w),j=c.f;_&&k&&!k[E]&&j(k,E,{configurable:!0,get:function(){return this}})}},function(s,p,o){var l=o(15),c=o(68),b=o(41),_=o(45),E=l("".charAt),w=l("".charCodeAt),k=l("".slice),j=function(P){return function(D,N){var I,B,H=b(_(D)),ee=c(N),ie=H.length;return ee<0||ee>=ie?P?"":void 0:(I=w(H,ee))<55296||I>56319||ee+1===ie||(B=w(H,ee+1))<56320||B>57343?P?E(H,ee):I:P?k(H,ee,ee+2):B-56320+(I-55296<<10)+65536}};s.exports={codeAt:j(!1),charAt:j(!0)}},function(s,p){s.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(s,p,o){var l=o(86)("span").classList,c=l&&l.constructor&&l.constructor.prototype;s.exports=c===Object.prototype?void 0:c},function(s,p,o){var l=o(27);p.f=l},function(s,p,o){var l=o(182),c=o(34),b=o(149),_=o(37).f;s.exports=function(E){var w=l.Symbol||(l.Symbol={});c(w,E)||_(w,E,{value:b.f(E)})}},function(s,p,o){var l=o(19),c=o(7).RegExp,b=l(function(){var w=c("a","y");return w.lastIndex=2,w.exec("abcd")!=null}),_=b||l(function(){return!c("a","y").sticky}),E=b||l(function(){var w=c("^r","gy");return w.lastIndex=2,w.exec("str")!=null});s.exports={BROKEN_CARET:E,MISSED_STICKY:_,UNSUPPORTED_Y:b}},function(s,p,o){var l=o(17),c=o(132).includes,b=o(83);l({target:"Array",proto:!0},{includes:function(_){return c(this,_,arguments.length>1?arguments[1]:void 0)}}),b("includes")},function(s,p,o){var l=o(17),c=o(15),b=o(194),_=o(45),E=o(41),w=o(195),k=c("".indexOf);l({target:"String",proto:!0,forced:!w("includes")},{includes:function(j){return!!~k(E(_(this)),E(b(j)),arguments.length>1?arguments[1]:void 0)}})},function(s,p,o){var l=o(33),c=o(50),b=o(27)("match");s.exports=function(_){var E;return l(_)&&((E=_[b])!==void 0?!!E:c(_)=="RegExp")}},function(s,p){var o,l,c=s.exports={};function b(){throw new Error("setTimeout has not been defined")}function _(){throw new Error("clearTimeout has not been defined")}function E(H){if(o===setTimeout)return setTimeout(H,0);if((o===b||!o)&&setTimeout)return o=setTimeout,setTimeout(H,0);try{return o(H,0)}catch{try{return o.call(null,H,0)}catch{return o.call(this,H,0)}}}(function(){try{o=typeof setTimeout=="function"?setTimeout:b}catch{o=b}try{l=typeof clearTimeout=="function"?clearTimeout:_}catch{l=_}})();var w,k=[],j=!1,P=-1;function D(){j&&w&&(j=!1,w.length?k=w.concat(k):P=-1,k.length&&N())}function N(){if(!j){var H=E(D);j=!0;for(var ee=k.length;ee;){for(w=k,k=[];++P<ee;)w&&w[P].run();P=-1,ee=k.length}w=null,j=!1,function(ie){if(l===clearTimeout)return clearTimeout(ie);if((l===_||!l)&&clearTimeout)return l=clearTimeout,clearTimeout(ie);try{l(ie)}catch{try{return l.call(null,ie)}catch{return l.call(this,ie)}}}(H)}}function I(H,ee){this.fun=H,this.array=ee}function B(){}c.nextTick=function(H){var ee=new Array(arguments.length-1);if(arguments.length>1)for(var ie=1;ie<arguments.length;ie++)ee[ie-1]=arguments[ie];k.push(new I(H,ee)),k.length!==1||j||E(N)},I.prototype.run=function(){this.fun.apply(null,this.array)},c.title="browser",c.browser=!0,c.env={},c.argv=[],c.version="",c.versions={},c.on=B,c.addListener=B,c.once=B,c.off=B,c.removeListener=B,c.removeAllListeners=B,c.emit=B,c.prependListener=B,c.prependOnceListener=B,c.listeners=function(H){return[]},c.binding=function(H){throw new Error("process.binding is not supported")},c.cwd=function(){return"/"},c.chdir=function(H){throw new Error("process.chdir is not supported")},c.umask=function(){return 0}},function(s,p,o){var l=o(32),c=o(157),b=o(27)("species");s.exports=function(_,E){var w,k=l(_).constructor;return k===void 0||(w=l(k)[b])==null?E:c(w)}},function(s,p,o){var l=o(7),c=o(100),b=o(89),_=l.TypeError;s.exports=function(E){if(c(E))return E;throw _(b(E)+" is not a constructor")}},function(s,p,o){var l=o(17),c=o(159).trim;l({target:"String",proto:!0,forced:o(196)("trim")},{trim:function(){return c(this)}})},function(s,p,o){var l=o(15),c=o(45),b=o(41),_=o(160),E=l("".replace),w="["+_+"]",k=RegExp("^"+w+w+"*"),j=RegExp(w+w+"*$"),P=function(D){return function(N){var I=b(c(N));return 1&D&&(I=E(I,k,"")),2&D&&(I=E(I,j,"")),I}};s.exports={start:P(1),end:P(2),trim:P(3)}},function(s,p){s.exports=`
|
||
\v\f\r \u2028\u2029\uFEFF`},function(s,p,o){var l=o(35),c=o(122),b=o(32),_=o(90),E=o(41),w=o(45),k=o(59),j=o(123),P=o(124);c("match",function(D,N,I){return[function(B){var H=w(this),ee=B==null?void 0:k(B,D);return ee?l(ee,B,H):new RegExp(B)[D](E(H))},function(B){var H=b(this),ee=E(B),ie=I(N,H,ee);if(ie.done)return ie.value;if(!H.global)return P(H,ee);var q=H.unicode;H.lastIndex=0;for(var Y,K=[],L=0;(Y=P(H,ee))!==null;){var M=E(Y[0]);K[L]=M,M===""&&(H.lastIndex=j(ee,_(H.lastIndex),q)),L++}return L===0?null:K}]})},function(s,p,o){var l=o(17),c=Math.hypot,b=Math.abs,_=Math.sqrt;l({target:"Math",stat:!0,forced:!!c&&c(1/0,NaN)!==1/0},{hypot:function(E,w){for(var k,j,P=0,D=0,N=arguments.length,I=0;D<N;)I<(k=b(arguments[D++]))?(P=P*(j=I/k)*j+1,I=k):P+=k>0?(j=k/I)*j:k;return I===1/0?1/0:I*_(P)}})},function(s,p,o){var l,c,b,_,E=o(7),w=o(76),k=o(62),j=o(28),P=o(34),D=o(19),N=o(133),I=o(101),B=o(86),H=o(164),ee=o(126),ie=E.setImmediate,q=E.clearImmediate,Y=E.process,K=E.Dispatch,L=E.Function,M=E.MessageChannel,z=E.String,R=0,F={},J="onreadystatechange";try{l=E.location}catch{}var fe=function(ge){if(P(F,ge)){var ue=F[ge];delete F[ge],ue()}},ce=function(ge){return function(){fe(ge)}},ye=function(ge){fe(ge.data)},xe=function(ge){E.postMessage(z(ge),l.protocol+"//"+l.host)};ie&&q||(ie=function(ge){var ue=I(arguments,1);return F[++R]=function(){w(j(ge)?ge:L(ge),void 0,ue)},c(R),R},q=function(ge){delete F[ge]},ee?c=function(ge){Y.nextTick(ce(ge))}:K&&K.now?c=function(ge){K.now(ce(ge))}:M&&!H?(_=(b=new M).port2,b.port1.onmessage=ye,c=k(_.postMessage,_)):E.addEventListener&&j(E.postMessage)&&!E.importScripts&&l&&l.protocol!=="file:"&&!D(xe)?(c=xe,E.addEventListener("message",ye,!1)):c=J in B("script")?function(ge){N.appendChild(B("script")).onreadystatechange=function(){N.removeChild(this),fe(ge)}}:function(ge){setTimeout(ce(ge),0)}),s.exports={set:ie,clear:q}},function(s,p,o){var l=o(53);s.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(l)},function(s,p,o){var l=o(55),c=function(b){var _,E;this.promise=new b(function(w,k){if(_!==void 0||E!==void 0)throw TypeError("Bad Promise constructor");_=w,E=k}),this.resolve=l(_),this.reject=l(E)};s.exports.f=function(b){return new c(b)}},function(s,p,o){p.a=function(){return!1}},function(s,p,o){(function(l){o.d(p,"a",function(){return Y});var c=o(1);function b(M){throw new Error("[mobx-utils] "+M)}function _(M,z){z===void 0&&(z="Illegal state"),M||b(z)}var E=function(M){return M&&M!==Object.prototype&&Object.getOwnPropertyNames(M).concat(E(Object.getPrototypeOf(M))||[])},w=function(M){return function(z){var R=E(z);return R.filter(function(F,J){return R.indexOf(F)===J})}(M).filter(function(z){return z!=="constructor"&&!~z.indexOf("__")})},k="pending",j="fulfilled",P="rejected";function D(M){switch(this.state){case k:return M.pending&&M.pending(this.value);case P:return M.rejected&&M.rejected(this.value);case j:return M.fulfilled?M.fulfilled(this.value):this.value}}function N(M,z){if(_(arguments.length<=2,"fromPromise expects up to two arguments"),_(typeof M=="function"||typeof M=="object"&&M&&typeof M.then=="function","Please pass a promise or function to fromPromise"),M.isPromiseBasedObservable===!0)return M;typeof M=="function"&&(M=new Promise(M));var R=M;M.then(Object(c.k)("observableFromPromise-resolve",function(J){R.value=J,R.state=j}),Object(c.k)("observableFromPromise-reject",function(J){R.value=J,R.state=P})),R.isPromiseBasedObservable=!0,R.case=D;var F=z&&z.state===j?z.value:void 0;return Object(c.q)(R,{value:F,state:k},{},{deep:!1}),R}(function(M){M.reject=Object(c.k)("fromPromise.reject",function(z){var R=M(Promise.reject(z));return R.state=P,R.value=z,R}),M.resolve=Object(c.k)("fromPromise.resolve",function(z){z===void 0&&(z=void 0);var R=M(Promise.resolve(z));return R.state=j,R.value=z,R})})(N||(N={}));var I=function(M,z,R,F){var J,fe=arguments.length,ce=fe<3?z:F===null?F=Object.getOwnPropertyDescriptor(z,R):F;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ce=Reflect.decorate(M,z,R,F);else for(var ye=M.length-1;ye>=0;ye--)(J=M[ye])&&(ce=(fe<3?J(ce):fe>3?J(z,R,ce):J(z,R))||ce);return fe>3&&ce&&Object.defineProperty(z,R,ce),ce};(function(){function M(z,R){var F=this;Object(c.G)(function(){F.current=R,F.subscription=z.subscribe(F)})}M.prototype.dispose=function(){this.subscription&&this.subscription.unsubscribe()},M.prototype.next=function(z){this.current=z},M.prototype.complete=function(){this.dispose()},M.prototype.error=function(z){this.current=z,this.dispose()},I([c.C.ref],M.prototype,"current",void 0),I([c.k.bound],M.prototype,"next",null),I([c.k.bound],M.prototype,"complete",null),I([c.k.bound],M.prototype,"error",null)})();var B=function(){return B=Object.assign||function(M){for(var z,R=1,F=arguments.length;R<F;R++)for(var J in z=arguments[R])Object.prototype.hasOwnProperty.call(z,J)&&(M[J]=z[J]);return M},B.apply(this,arguments)},H=function(M,z,R,F){var J,fe=arguments.length,ce=fe<3?z:F===null?F=Object.getOwnPropertyDescriptor(z,R):F;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ce=Reflect.decorate(M,z,R,F);else for(var ye=M.length-1;ye>=0;ye--)(J=M[ye])&&(ce=(fe<3?J(ce):fe>3?J(z,R,ce):J(z,R))||ce);return fe>3&&ce&&Object.defineProperty(z,R,ce),ce},ee=["model","reset","submit","isDirty","isPropertyDirty","resetProperty"];(function(){function M(z){var R=this;this.model=z,this.localValues=c.C.map({}),this.localComputedValues=c.C.map({}),this.isPropertyDirty=function(F){return R.localValues.has(F)},_(Object(c.A)(z),"createViewModel expects an observable object"),w(z).forEach(function(F){if(F!==c.a&&F!=="__mobxDidRunLazyInitializers"){if(_(ee.indexOf(F)===-1,"The propertyname "+F+" is reserved and cannot be used with viewModels"),Object(c.w)(z,F)){var J=Object(c.h)(z,F).derivation;R.localComputedValues.set(F,Object(c.m)(J.bind(R)))}var fe=Object.getOwnPropertyDescriptor(z,F),ce=fe?{enumerable:fe.enumerable}:{};Object.defineProperty(R,F,B(B({},ce),{configurable:!0,get:function(){return Object(c.w)(z,F)?R.localComputedValues.get(F).get():R.isPropertyDirty(F)?R.localValues.get(F):R.model[F]},set:Object(c.k)(function(ye){ye!==R.model[F]?R.localValues.set(F,ye):R.localValues.delete(F)})}))}})}Object.defineProperty(M.prototype,"isDirty",{get:function(){return this.localValues.size>0},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"changedValues",{get:function(){return this.localValues.toJS()},enumerable:!1,configurable:!0}),M.prototype.submit=function(){var z=this;Object(c.B)(this.localValues).forEach(function(R){var F=z.localValues.get(R),J=z.model[R];Object(c.y)(J)?J.replace(F):Object(c.z)(J)?(J.clear(),J.merge(F)):Object(c.v)(F)||(z.model[R]=F)}),this.localValues.clear()},M.prototype.reset=function(){this.localValues.clear()},M.prototype.resetProperty=function(z){this.localValues.delete(z)},H([c.m],M.prototype,"isDirty",null),H([c.m],M.prototype,"changedValues",null),H([c.k.bound],M.prototype,"submit",null),H([c.k.bound],M.prototype,"reset",null),H([c.k.bound],M.prototype,"resetProperty",null)})();function ie(M){if(!M)return"ROOT";for(var z=[];M.parent;)z.push(M.path),M=M.parent;return z.reverse().join("/")}function q(M){return Object(c.A)(M)||Object(c.y)(M)||Object(c.z)(M)}function Y(M,z){var R=new WeakMap;function F(ce){var ye=R.get(ce.object);(function(xe,ge){switch(xe.type){case"add":J(xe.newValue,ge,xe.name);break;case"update":fe(xe.oldValue),J(xe.newValue,ge,xe.name||""+xe.index);break;case"remove":case"delete":fe(xe.oldValue);break;case"splice":xe.removed.map(fe),xe.added.forEach(function(be,Se){return J(be,ge,""+(xe.index+Se))});for(var ue=xe.index+xe.addedCount;ue<xe.object.length;ue++)if(q(xe.object[ue])){var he=R.get(xe.object[ue]);he&&(he.path=""+ue)}}})(ce,ye),z(ce,ie(ye),M)}function J(ce,ye,xe){if(q(ce)){var ge=R.get(ce);if(ge){if(ge.parent!==ye||ge.path!==xe)throw new Error("The same observable object cannot appear twice in the same tree, trying to assign it to '"+ie(ye)+"/"+xe+"', but it already exists at '"+ie(ge.parent)+"/"+ge.path+"'")}else{var ue={parent:ye,path:xe,dispose:Object(c.D)(ce,F)};R.set(ce,ue),Object(c.p)(ce).forEach(function(he){var be=he[0];return J(he[1],ue,be)})}}}function fe(ce){if(q(ce)){var ye=R.get(ce);if(!ye)return;R.delete(ce),ye.dispose(),Object(c.L)(ce).forEach(fe)}}return J(M,void 0,""),function(){fe(M)}}var K,L=(K=function(M,z){return K=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(R,F){R.__proto__=F}||function(R,F){for(var J in F)F.hasOwnProperty(J)&&(R[J]=F[J])},K(M,z)},function(M,z){function R(){this.constructor=M}K(M,z),M.prototype=z===null?Object.create(z):(R.prototype=z.prototype,new R)});(function(M){function z(R,F,J){var fe=J===void 0?{}:J,ce=fe.name,ye=ce===void 0?"ogm"+(1e3*Math.random()|0):ce,xe=fe.keyToName,ge=xe===void 0?function(be){return""+be}:xe,ue=M.call(this)||this;ue._keyToName=ge,ue._groupBy=F,ue._ogmInfoKey=Symbol("ogmInfo"+ye),ue._base=R;for(var he=0;he<R.length;he++)ue._addItem(R[he]);return ue._disposeBaseObserver=Object(c.D)(ue._base,function(be){if(be.type==="splice")Object(c.J)(function(){for(var Se=0,Ie=be.removed;Se<Ie.length;Se++){var We=Ie[Se];ue._removeItem(We)}for(var ke=0,Re=be.added;ke<Re.length;ke++){var $e=Re[ke];ue._addItem($e)}});else{if(be.type!=="update")throw new Error("illegal state");Object(c.J)(function(){ue._removeItem(be.oldValue),ue._addItem(be.newValue)})}}),ue}L(z,M),z.prototype.clear=function(){throw new Error("not supported")},z.prototype.delete=function(R){throw new Error("not supported")},z.prototype.set=function(R,F){throw new Error("not supported")},z.prototype.dispose=function(){this._disposeBaseObserver();for(var R=0;R<this._base.length;R++){var F=this._base[R];F[this._ogmInfoKey].reaction(),delete F[this._ogmInfoKey]}},z.prototype._getGroupArr=function(R){var F=M.prototype.get.call(this,R);return F===void 0&&(F=Object(c.C)([],{name:"GroupArray["+this._keyToName(R)+"]",deep:!1}),M.prototype.set.call(this,R,F)),F},z.prototype._removeFromGroupArr=function(R,F){var J=M.prototype.get.call(this,R);J.length===1?M.prototype.delete.call(this,R):(F===J.length-1||(J[F]=J[J.length-1],J[F][this._ogmInfoKey].groupArrIndex=F),J.length--)},z.prototype._addItem=function(R){var F=this,J=this._groupBy(R),fe=this._getGroupArr(J),ce={groupByValue:J,groupArrIndex:fe.length,reaction:Object(c.F)(function(){return F._groupBy(R)},function(ye,xe){var ge=R[F._ogmInfoKey];F._removeFromGroupArr(ge.groupByValue,ge.groupArrIndex);var ue=F._getGroupArr(ye),he=ue.length;ue.push(R),ge.groupByValue=ye,ge.groupArrIndex=he})};Object.defineProperty(R,this._ogmInfoKey,{configurable:!0,enumerable:!1,value:ce}),fe.push(R)},z.prototype._removeItem=function(R){var F=R[this._ogmInfoKey];this._removeFromGroupArr(F.groupByValue,F.groupArrIndex),F.reaction(),delete R[this._ogmInfoKey]}})(c.b),function(){function M(z,R){this.base=z,this.args=R,this.closestIdx=0,this.isDisposed=!1;for(var F=this.closest=this.root=z,J=0;J<this.args.length-1&&(F=F.get(R[J]));J++)this.closest=F;this.closestIdx=J}return M.prototype.exists=function(){this.assertNotDisposed();var z=this.args.length;return this.closestIdx>=z-1&&this.closest.has(this.args[z-1])},M.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])},M.prototype.set=function(z){this.assertNotDisposed();for(var R=this.args.length,F=this.closest,J=this.closestIdx;J<R-1;J++){var fe=new Map;F.set(this.args[J],fe),F=fe}this.closestIdx=R-1,this.closest=F,F.set(this.args[R-1],z)},M.prototype.delete=function(){if(this.assertNotDisposed(),!this.exists())throw new Error("Entry doesn't exist");var z=this.args.length;this.closest.delete(this.args[z-1]);for(var R=this.root,F=[R],J=0;J<z-1;J++)R=R.get(this.args[J]),F.push(R);for(J=F.length-1;J>0;J--)F[J].size===0&&F[J-1].delete(this.args[J-1]);this.isDisposed=!0},M.prototype.assertNotDisposed=function(){if(this.isDisposed)throw new Error("Concurrent modification exception")},M}(),Promise.resolve(),typeof queueMicrotask<"u"||l!==void 0&&l.nextTick}).call(this,o(155))},function(s,p,o){var l;(function(c,b,_){if(c){for(var E,w={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"},k={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},j={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},P={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},D=1;D<20;++D)w[111+D]="f"+D;for(D=0;D<=9;++D)w[D+96]=D.toString();q.prototype.bind=function(Y,K,L){var M=this;return Y=Y instanceof Array?Y:[Y],M._bindMultiple.call(M,Y,K,L),M},q.prototype.unbind=function(Y,K){return this.bind.call(this,Y,function(){},K)},q.prototype.trigger=function(Y,K){var L=this;return L._directMap[Y+":"+K]&&L._directMap[Y+":"+K]({},Y),L},q.prototype.reset=function(){var Y=this;return Y._callbacks={},Y._directMap={},Y},q.prototype.stopCallback=function(Y,K){if((" "+K.className+" ").indexOf(" mousetrap ")>-1||ie(K,this.target))return!1;if("composedPath"in Y&&typeof Y.composedPath=="function"){var L=Y.composedPath()[0];L!==Y.target&&(K=L)}return K.tagName=="INPUT"||K.tagName=="SELECT"||K.tagName=="TEXTAREA"||K.isContentEditable},q.prototype.handleKey=function(){var Y=this;return Y._handleKey.apply(Y,arguments)},q.addKeycodes=function(Y){for(var K in Y)Y.hasOwnProperty(K)&&(w[K]=Y[K]);E=null},q.init=function(){var Y=q(b);for(var K in Y)K.charAt(0)!=="_"&&(q[K]=function(L){return function(){return Y[L].apply(Y,arguments)}}(K))},q.init(),c.Mousetrap=q,s.exports&&(s.exports=q),(l=function(){return q}.call(p,o,p,s))===void 0||(s.exports=l)}function N(Y,K,L){Y.addEventListener?Y.addEventListener(K,L,!1):Y.attachEvent("on"+K,L)}function I(Y){if(Y.type=="keypress"){var K=String.fromCharCode(Y.which);return Y.shiftKey||(K=K.toLowerCase()),K}return w[Y.which]?w[Y.which]:k[Y.which]?k[Y.which]:String.fromCharCode(Y.which).toLowerCase()}function B(Y){return Y=="shift"||Y=="ctrl"||Y=="alt"||Y=="meta"}function H(Y,K,L){return L||(L=function(){if(!E)for(var M in E={},w)M>95&&M<112||w.hasOwnProperty(M)&&(E[w[M]]=M);return E}()[Y]?"keydown":"keypress"),L=="keypress"&&K.length&&(L="keydown"),L}function ee(Y,K){var L,M,z,R=[];for(L=function(F){return F==="+"?["+"]:(F=F.replace(/\+{2}/g,"+plus")).split("+")}(Y),z=0;z<L.length;++z)M=L[z],P[M]&&(M=P[M]),K&&K!="keypress"&&j[M]&&(M=j[M],R.push("shift")),B(M)&&R.push(M);return{key:M,modifiers:R,action:K=H(M,R,K)}}function ie(Y,K){return Y!==null&&Y!==b&&(Y===K||ie(Y.parentNode,K))}function q(Y){var K=this;if(Y=Y||b,!(K instanceof q))return new q(Y);K.target=Y,K._callbacks={},K._directMap={};var L,M={},z=!1,R=!1,F=!1;function J(ue){ue=ue||{};var he,be=!1;for(he in M)ue[he]?be=!0:M[he]=0;be||(F=!1)}function fe(ue,he,be,Se,Ie,We){var ke,Re,$e,Z,$=[],ae=be.type;if(!K._callbacks[ue])return[];for(ae=="keyup"&&B(ue)&&(he=[ue]),ke=0;ke<K._callbacks[ue].length;++ke)if(Re=K._callbacks[ue][ke],(Se||!Re.seq||M[Re.seq]==Re.level)&&ae==Re.action&&(ae=="keypress"&&!be.metaKey&&!be.ctrlKey||($e=he,Z=Re.modifiers,$e.sort().join(",")===Z.sort().join(",")))){var _e=!Se&&Re.combo==Ie,Te=Se&&Re.seq==Se&&Re.level==We;(_e||Te)&&K._callbacks[ue].splice(ke,1),$.push(Re)}return $}function ce(ue,he,be,Se){K.stopCallback(he,he.target||he.srcElement,be,Se)||ue(he,be)===!1&&(function(Ie){Ie.preventDefault?Ie.preventDefault():Ie.returnValue=!1}(he),function(Ie){Ie.stopPropagation?Ie.stopPropagation():Ie.cancelBubble=!0}(he))}function ye(ue){typeof ue.which!="number"&&(ue.which=ue.keyCode);var he=I(ue);he&&(ue.type!="keyup"||z!==he?K.handleKey(he,function(be){var Se=[];return be.shiftKey&&Se.push("shift"),be.altKey&&Se.push("alt"),be.ctrlKey&&Se.push("ctrl"),be.metaKey&&Se.push("meta"),Se}(ue),ue):z=!1)}function xe(ue,he,be,Se){function Ie($e){return function(){F=$e,++M[ue],clearTimeout(L),L=setTimeout(J,1e3)}}function We($e){ce(be,$e,ue),Se!=="keyup"&&(z=I($e)),setTimeout(J,10)}M[ue]=0;for(var ke=0;ke<he.length;++ke){var Re=ke+1===he.length?We:Ie(Se||ee(he[ke+1]).action);ge(he[ke],Re,Se,ue,ke)}}function ge(ue,he,be,Se,Ie){K._directMap[ue+":"+be]=he;var We,ke=(ue=ue.replace(/\s+/g," ")).split(" ");ke.length>1?xe(ue,ke,he,be):(We=ee(ue,be),K._callbacks[We.key]=K._callbacks[We.key]||[],fe(We.key,We.modifiers,{type:We.action},Se,ue,Ie),K._callbacks[We.key][Se?"unshift":"push"]({callback:he,modifiers:We.modifiers,action:We.action,seq:Se,level:Ie,combo:ue}))}K._handleKey=function(ue,he,be){var Se,Ie=fe(ue,he,be),We={},ke=0,Re=!1;for(Se=0;Se<Ie.length;++Se)Ie[Se].seq&&(ke=Math.max(ke,Ie[Se].level));for(Se=0;Se<Ie.length;++Se)if(Ie[Se].seq){if(Ie[Se].level!=ke)continue;Re=!0,We[Ie[Se].seq]=1,ce(Ie[Se].callback,be,Ie[Se].combo,Ie[Se].seq)}else Re||ce(Ie[Se].callback,be,Ie[Se].combo);var $e=be.type=="keypress"&&R;be.type!=F||B(ue)||$e||J(We),R=Re&&be.type=="keydown"},K._bindMultiple=function(ue,he,be){for(var Se=0;Se<ue.length;++Se)ge(ue[Se],he,be)},N(Y,"keypress",ye),N(Y,"keydown",ye),N(Y,"keyup",ye)}})(typeof window<"u"?window:null,typeof window<"u"?document:null)},function(s,p,o){var l=o(36),c=o(37),b=o(32),_=o(40),E=o(66);s.exports=l?Object.defineProperties:function(w,k){b(w);for(var j,P=_(k),D=E(k),N=D.length,I=0;N>I;)c.f(w,j=D[I++],P[j]);return w}},function(s,p,o){var l=o(7),c=o(35),b=o(28),_=o(33),E=l.TypeError;s.exports=function(w,k){var j,P;if(k==="string"&&b(j=w.toString)&&!_(P=c(j,w))||b(j=w.valueOf)&&!_(P=c(j,w))||k!=="string"&&b(j=w.toString)&&!_(P=c(j,w)))return P;throw E("Can't convert object to primitive value")}},function(s,p,o){var l=o(7),c=o(28),b=o(92),_=l.WeakMap;s.exports=c(_)&&/native code/.test(b(_))},function(s,p,o){var l=o(136).IteratorPrototype,c=o(54),b=o(71),_=o(73),E=o(70),w=function(){return this};s.exports=function(k,j,P,D){var N=j+" Iterator";return k.prototype=c(l,{next:b(+!D,P)}),_(k,N,!1,!0),E[N]=w,k}},function(s,p,o){var l=o(7),c=o(28),b=l.String,_=l.TypeError;s.exports=function(E){if(typeof E=="object"||c(E))return E;throw _("Can't set "+b(E)+" as a prototype")}},function(s,p,o){var l=o(17),c=o(7),b=o(15),_=o(95),E=o(44),w=o(138),k=o(114),j=o(117),P=o(28),D=o(33),N=o(19),I=o(118),B=o(73),H=o(143);s.exports=function(ee,ie,q){var Y=ee.indexOf("Map")!==-1,K=ee.indexOf("Weak")!==-1,L=Y?"set":"add",M=c[ee],z=M&&M.prototype,R=M,F={},J=function(ue){var he=b(z[ue]);E(z,ue,ue=="add"?function(be){return he(this,be===0?0:be),this}:ue=="delete"?function(be){return!(K&&!D(be))&&he(this,be===0?0:be)}:ue=="get"?function(be){return K&&!D(be)?void 0:he(this,be===0?0:be)}:ue=="has"?function(be){return!(K&&!D(be))&&he(this,be===0?0:be)}:function(be,Se){return he(this,be===0?0:be,Se),this})};if(_(ee,!P(M)||!(K||z.forEach&&!N(function(){new M().entries().next()}))))R=q.getConstructor(ie,ee,Y,L),w.enable();else if(_(ee,!0)){var fe=new R,ce=fe[L](K?{}:-0,1)!=fe,ye=N(function(){fe.has(1)}),xe=I(function(ue){new M(ue)}),ge=!K&&N(function(){for(var ue=new M,he=5;he--;)ue[L](he,he);return!ue.has(-0)});xe||((R=ie(function(ue,he){j(ue,z);var be=H(new M,ue,R);return he!=null&&k(he,be[L],{that:be,AS_ENTRIES:Y}),be})).prototype=z,z.constructor=R),(ye||ge)&&(J("delete"),J("has"),Y&&J("get")),(ge||ce)&&J(L),K&&z.clear&&delete z.clear}return F[ee]=R,l({global:!0,forced:R!=M},F),B(R,ee),K||q.setStrong(R,ee,Y),R}},function(s,p,o){var l=o(19),c=o(33),b=o(50),_=o(176),E=Object.isExtensible,w=l(function(){});s.exports=w||_?function(k){return!!c(k)&&(!_||b(k)!="ArrayBuffer")&&(!E||E(k))}:E},function(s,p,o){var l=o(19);s.exports=l(function(){if(typeof ArrayBuffer=="function"){var c=new ArrayBuffer(8);Object.isExtensible(c)&&Object.defineProperty(c,"a",{value:8})}})},function(s,p,o){var l=o(19);s.exports=!l(function(){return Object.isExtensible(Object.preventExtensions({}))})},function(s,p,o){var l=o(37).f,c=o(54),b=o(144),_=o(62),E=o(117),w=o(114),k=o(111),j=o(145),P=o(36),D=o(138).fastKey,N=o(56),I=N.set,B=N.getterFor;s.exports={getConstructor:function(H,ee,ie,q){var Y=H(function(R,F){E(R,K),I(R,{type:ee,index:c(null),first:void 0,last:void 0,size:0}),P||(R.size=0),F!=null&&w(F,R[q],{that:R,AS_ENTRIES:ie})}),K=Y.prototype,L=B(ee),M=function(R,F,J){var fe,ce,ye=L(R),xe=z(R,F);return xe?xe.value=J:(ye.last=xe={index:ce=D(F,!0),key:F,value:J,previous:fe=ye.last,next:void 0,removed:!1},ye.first||(ye.first=xe),fe&&(fe.next=xe),P?ye.size++:R.size++,ce!=="F"&&(ye.index[ce]=xe)),R},z=function(R,F){var J,fe=L(R),ce=D(F);if(ce!=="F")return fe.index[ce];for(J=fe.first;J;J=J.next)if(J.key==F)return J};return b(K,{clear:function(){for(var R=L(this),F=R.index,J=R.first;J;)J.removed=!0,J.previous&&(J.previous=J.previous.next=void 0),delete F[J.index],J=J.next;R.first=R.last=void 0,P?R.size=0:this.size=0},delete:function(R){var F=this,J=L(F),fe=z(F,R);if(fe){var ce=fe.next,ye=fe.previous;delete J.index[fe.index],fe.removed=!0,ye&&(ye.next=ce),ce&&(ce.previous=ye),J.first==fe&&(J.first=ce),J.last==fe&&(J.last=ye),P?J.size--:F.size--}return!!fe},forEach:function(R){for(var F,J=L(this),fe=_(R,arguments.length>1?arguments[1]:void 0);F=F?F.next:J.first;)for(fe(F.value,F.key,this);F&&F.removed;)F=F.previous},has:function(R){return!!z(this,R)}}),b(K,ie?{get:function(R){var F=z(this,R);return F&&F.value},set:function(R,F){return M(this,R===0?0:R,F)}}:{add:function(R){return M(this,R=R===0?0:R,R)}}),P&&l(K,"size",{get:function(){return L(this).size}}),Y},setStrong:function(H,ee,ie){var q=ee+" Iterator",Y=B(ee),K=B(q);k(H,ee,function(L,M){I(this,{type:q,target:L,state:Y(L),kind:M,last:void 0})},function(){for(var L=K(this),M=L.kind,z=L.last;z&&z.removed;)z=z.previous;return L.target&&(L.last=z=z?z.next:L.state.first)?M=="keys"?{value:z.key,done:!1}:M=="values"?{value:z.value,done:!1}:{value:[z.key,z.value],done:!1}:(L.target=void 0,{value:void 0,done:!0})},ie?"entries":"values",!ie,!0),j(ee)}}},function(s,p,o){var l=o(116),c=o(98);s.exports=l?{}.toString:function(){return"[object "+c(this)+"]"}},function(s,p,o){var l=o(74).forEach,c=o(120)("forEach");s.exports=c?[].forEach:function(b){return l(this,b,arguments.length>1?arguments[1]:void 0)}},function(s,p,o){var l=o(7),c=o(99),b=o(100),_=o(33),E=o(27)("species"),w=l.Array;s.exports=function(k){var j;return c(k)&&(j=k.constructor,(b(j)&&(j===w||c(j.prototype))||_(j)&&(j=j[E])===null)&&(j=void 0)),j===void 0?w:j}},function(s,p,o){var l=o(7);s.exports=l},function(s,p,o){var l=o(7),c=o(62),b=o(35),_=o(38),E=o(184),w=o(140),k=o(100),j=o(43),P=o(61),D=o(141),N=o(115),I=l.Array;s.exports=function(B){var H=_(B),ee=k(this),ie=arguments.length,q=ie>1?arguments[1]:void 0,Y=q!==void 0;Y&&(q=c(q,ie>2?arguments[2]:void 0));var K,L,M,z,R,F,J=N(H),fe=0;if(!J||this==I&&w(J))for(K=j(H),L=ee?new this(K):I(K);K>fe;fe++)F=Y?q(H[fe],fe):H[fe],P(L,fe,F);else for(R=(z=D(H,J)).next,L=ee?new this:[];!(M=b(R,z)).done;fe++)F=Y?E(z,q,[M.value,fe],!0):M.value,P(L,fe,F);return L.length=fe,L}},function(s,p,o){var l=o(32),c=o(142);s.exports=function(b,_,E,w){try{return w?_(l(E)[0],E[1]):_(E)}catch(k){c(b,"throw",k)}}},function(s,p,o){var l=o(32);s.exports=function(){var c=l(this),b="";return c.global&&(b+="g"),c.ignoreCase&&(b+="i"),c.multiline&&(b+="m"),c.dotAll&&(b+="s"),c.unicode&&(b+="u"),c.sticky&&(b+="y"),b}},function(s,p,o){var l=o(19),c=o(7).RegExp;s.exports=l(function(){var b=c(".","s");return!(b.dotAll&&b.exec(`
|
||
`)&&b.flags==="s")})},function(s,p,o){var l=o(19),c=o(7).RegExp;s.exports=l(function(){var b=c("(?<a>b)","g");return b.exec("b").groups.a!=="b"||"b".replace(b,"$<a>c")!=="bc"})},function(s,p,o){var l=o(17),c=o(15),b=o(55),_=o(38),E=o(43),w=o(41),k=o(19),j=o(189),P=o(120),D=o(190),N=o(191),I=o(65),B=o(192),H=[],ee=c(H.sort),ie=c(H.push),q=k(function(){H.sort(void 0)}),Y=k(function(){H.sort(null)}),K=P("sort"),L=!k(function(){if(I)return I<70;if(!(D&&D>3)){if(N)return!0;if(B)return B<603;var M,z,R,F,J="";for(M=65;M<76;M++){switch(z=String.fromCharCode(M),M){case 66:case 69:case 70:case 72:R=3;break;case 68:case 71:R=4;break;default:R=2}for(F=0;F<47;F++)H.push({k:z+F,v:R})}for(H.sort(function(fe,ce){return ce.v-fe.v}),F=0;F<H.length;F++)z=H[F].k.charAt(0),J.charAt(J.length-1)!==z&&(J+=z);return J!=="DGBEFHACIJK"}});l({target:"Array",proto:!0,forced:q||!Y||!K||!L},{sort:function(M){M!==void 0&&b(M);var z=_(this);if(L)return M===void 0?ee(z):ee(z,M);var R,F,J=[],fe=E(z);for(F=0;F<fe;F++)F in z&&ie(J,z[F]);for(j(J,function(ce){return function(ye,xe){return xe===void 0?-1:ye===void 0?1:ce!==void 0?+ce(ye,xe)||0:w(ye)>w(xe)?1:-1}}(M)),R=J.length,F=0;F<R;)z[F]=J[F++];for(;F<fe;)delete z[F++];return z}})},function(s,p,o){var l=o(113),c=Math.floor,b=function(w,k){var j=w.length,P=c(j/2);return j<8?_(w,k):E(w,b(l(w,0,P),k),b(l(w,P),k),k)},_=function(w,k){for(var j,P,D=w.length,N=1;N<D;){for(P=N,j=w[N];P&&k(w[P-1],j)>0;)w[P]=w[--P];P!==N++&&(w[P]=j)}return w},E=function(w,k,j,P){for(var D=k.length,N=j.length,I=0,B=0;I<D||B<N;)w[I+B]=I<D&&B<N?P(k[I],j[B])<=0?k[I++]:j[B++]:I<D?k[I++]:j[B++];return w};s.exports=b},function(s,p,o){var l=o(53).match(/firefox\/(\d+)/i);s.exports=!!l&&+l[1]},function(s,p,o){var l=o(53);s.exports=/MSIE|Trident/.test(l)},function(s,p,o){var l=o(53).match(/AppleWebKit\/(\d+)\./);s.exports=!!l&&+l[1]},function(s,p,o){var l=o(17),c=o(74).find,b=o(83),_="find",E=!0;_ in[]&&Array(1).find(function(){E=!1}),l({target:"Array",proto:!0,forced:E},{find:function(w){return c(this,w,arguments.length>1?arguments[1]:void 0)}}),b(_)},function(s,p,o){var l=o(7),c=o(154),b=l.TypeError;s.exports=function(_){if(c(_))throw b("The method doesn't accept regular expressions");return _}},function(s,p,o){var l=o(27)("match");s.exports=function(c){var b=/./;try{"/./"[c](b)}catch{try{return b[l]=!1,"/./"[c](b)}catch{}}return!1}},function(s,p,o){var l=o(94).PROPER,c=o(19),b=o(160);s.exports=function(_){return c(function(){return!!b[_]()||"
"[_]()!=="
"||l&&b[_].name!==_})}},function(s,p,o){var l=o(15);s.exports=l(1 .valueOf)},function(s,p,o){var l=o(15),c=o(38),b=Math.floor,_=l("".charAt),E=l("".replace),w=l("".slice),k=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,j=/\$([$&'`]|\d{1,2})/g;s.exports=function(P,D,N,I,B,H){var ee=N+P.length,ie=I.length,q=j;return B!==void 0&&(B=c(B),q=k),E(H,q,function(Y,K){var L;switch(_(K,0)){case"$":return"$";case"&":return P;case"`":return w(D,0,N);case"'":return w(D,ee);case"<":L=B[w(K,1,-1)];break;default:var M=+K;if(M===0)return Y;if(M>ie){var z=b(M/10);return z===0?Y:z<=ie?I[z-1]===void 0?_(K,1):I[z-1]+_(K,1):Y}L=I[M-1]}return L===void 0?"":L})}},function(s,p,o){var l=o(36),c=o(15),b=o(35),_=o(19),E=o(66),w=o(112),k=o(93),j=o(38),P=o(81),D=Object.assign,N=Object.defineProperty,I=c([].concat);s.exports=!D||_(function(){if(l&&D({b:1},D(N({},"a",{enumerable:!0,get:function(){N(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var B={},H={},ee=Symbol(),ie="abcdefghijklmnopqrst";return B[ee]=7,ie.split("").forEach(function(q){H[q]=q}),D({},B)[ee]!=7||E(D({},H)).join("")!=ie})?function(B,H){for(var ee=j(B),ie=arguments.length,q=1,Y=w.f,K=k.f;ie>q;)for(var L,M=P(arguments[q++]),z=Y?I(E(M),Y(M)):E(M),R=z.length,F=0;R>F;)L=z[F++],l&&!b(K,M,L)||(ee[L]=M[L]);return ee}:D},function(s,p,o){var l=o(7),c=o(15),b=o(55),_=o(33),E=o(34),w=o(101),k=l.Function,j=c([].concat),P=c([].join),D={},N=function(I,B,H){if(!E(D,B)){for(var ee=[],ie=0;ie<B;ie++)ee[ie]="a["+ie+"]";D[B]=k("C,a","return new C("+P(ee,",")+")")}return D[B](I,H)};s.exports=k.bind||function(I){var B=b(this),H=B.prototype,ee=w(arguments,1),ie=function(){var q=j(ee,w(arguments));return this instanceof ie?N(B,q.length,q):B.apply(I,q)};return _(H)&&(ie.prototype=H),ie}},function(s,p,o){var l=o(34);s.exports=function(c){return c!==void 0&&(l(c,"value")||l(c,"writable"))}},function(s,p,o){var l=o(15),c=o(45),b=o(41),_=/"/g,E=l("".replace);s.exports=function(w,k,j,P){var D=b(c(w)),N="<"+k;return j!==""&&(N+=" "+j+'="'+E(b(P),_,""")+'"'),N+">"+D+"</"+k+">"}},function(s,p,o){var l=o(19);s.exports=function(c){return l(function(){var b=""[c]('"');return b!==b.toLowerCase()||b.split('"').length>3})}},function(s,p,o){var l,c,b,_,E=o(17),w=o(64),k=o(7),j=o(46),P=o(35),D=o(205),N=o(44),I=o(144),B=o(97),H=o(73),ee=o(145),ie=o(55),q=o(28),Y=o(33),K=o(117),L=o(92),M=o(114),z=o(118),R=o(156),F=o(163).set,J=o(206),fe=o(209),ce=o(210),ye=o(165),xe=o(211),ge=o(56),ue=o(95),he=o(27),be=o(212),Se=o(126),Ie=o(65),We=he("species"),ke="Promise",Re=ge.getterFor(ke),$e=ge.set,Z=ge.getterFor(ke),$=D&&D.prototype,ae=D,_e=$,Te=k.TypeError,we=k.document,Ke=k.process,nt=ye.f,Ze=nt,Ge=!!(we&&we.createEvent&&k.dispatchEvent),ve=q(k.PromiseRejectionEvent),Fe="unhandledrejection",te=!1,Le=ue(ke,function(){var U=L(ae),se=U!==String(ae);if(!se&&Ie===66||w&&!_e.finally)return!0;if(Ie>=51&&/native code/.test(U))return!1;var Me=new ae(function(He){He(1)}),De=function(He){He(function(){},function(){})};return(Me.constructor={})[We]=De,!(te=Me.then(function(){})instanceof De)||!se&&be&&!ve}),ut=Le||!z(function(U){ae.all(U).catch(function(){})}),vt=function(U){var se;return!(!Y(U)||!q(se=U.then))&&se},it=function(U,se){if(!U.notified){U.notified=!0;var Me=U.reactions;J(function(){for(var De=U.value,He=U.state==1,lt=0;Me.length>lt;){var Vt,$t,Ct,Rt=Me[lt++],ze=He?Rt.ok:Rt.fail,Ue=Rt.resolve,et=Rt.reject,rt=Rt.domain;try{ze?(He||(U.rejection===2&&at(U),U.rejection=1),ze===!0?Vt=De:(rt&&rt.enter(),Vt=ze(De),rt&&(rt.exit(),Ct=!0)),Vt===Rt.promise?et(Te("Promise-chain cycle")):($t=vt(Vt))?P($t,Vt,Ue,et):Ue(Vt)):et(De)}catch(wt){rt&&!Ct&&rt.exit(),et(wt)}}U.reactions=[],U.notified=!1,se&&!U.rejection&&St(U)})}},ht=function(U,se,Me){var De,He;Ge?((De=we.createEvent("Event")).promise=se,De.reason=Me,De.initEvent(U,!1,!0),k.dispatchEvent(De)):De={promise:se,reason:Me},!ve&&(He=k["on"+U])?He(De):U===Fe&&ce("Unhandled promise rejection",Me)},St=function(U){P(F,k,function(){var se,Me=U.facade,De=U.value;if(Pt(U)&&(se=xe(function(){Se?Ke.emit("unhandledRejection",De,Me):ht(Fe,Me,De)}),U.rejection=Se||Pt(U)?2:1,se.error))throw se.value})},Pt=function(U){return U.rejection!==1&&!U.parent},at=function(U){P(F,k,function(){var se=U.facade;Se?Ke.emit("rejectionHandled",se):ht("rejectionhandled",se,U.value)})},Nt=function(U,se,Me){return function(De){U(se,De,Me)}},X=function(U,se,Me){U.done||(U.done=!0,Me&&(U=Me),U.value=se,U.state=2,it(U,!0))},oe=function(U,se,Me){if(!U.done){U.done=!0,Me&&(U=Me);try{if(U.facade===se)throw Te("Promise can't be resolved itself");var De=vt(se);De?J(function(){var He={done:!1};try{P(De,se,Nt(oe,He,U),Nt(X,He,U))}catch(lt){X(He,lt,U)}}):(U.value=se,U.state=1,it(U,!1))}catch(He){X({done:!1},He,U)}}};if(Le&&(_e=(ae=function(U){K(this,_e),ie(U),P(l,this);var se=Re(this);try{U(Nt(oe,se),Nt(X,se))}catch(Me){X(se,Me)}}).prototype,(l=function(U){$e(this,{type:ke,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=I(_e,{then:function(U,se){var Me=Z(this),De=Me.reactions,He=nt(R(this,ae));return He.ok=!q(U)||U,He.fail=q(se)&&se,He.domain=Se?Ke.domain:void 0,Me.parent=!0,De[De.length]=He,Me.state!=0&&it(Me,!1),He.promise},catch:function(U){return this.then(void 0,U)}}),c=function(){var U=new l,se=Re(U);this.promise=U,this.resolve=Nt(oe,se),this.reject=Nt(X,se)},ye.f=nt=function(U){return U===ae||U===b?new c(U):Ze(U)},!w&&q(D)&&$!==Object.prototype)){_=$.then,te||(N($,"then",function(U,se){var Me=this;return new ae(function(De,He){P(_,Me,De,He)}).then(U,se)},{unsafe:!0}),N($,"catch",_e.catch,{unsafe:!0}));try{delete $.constructor}catch{}B&&B($,_e)}E({global:!0,wrap:!0,forced:Le},{Promise:ae}),H(ae,ke,!1,!0),ee(ke),b=j(ke),E({target:ke,stat:!0,forced:Le},{reject:function(U){var se=nt(this);return P(se.reject,void 0,U),se.promise}}),E({target:ke,stat:!0,forced:w||Le},{resolve:function(U){return fe(w&&this===b?ae:this,U)}}),E({target:ke,stat:!0,forced:ut},{all:function(U){var se=this,Me=nt(se),De=Me.resolve,He=Me.reject,lt=xe(function(){var Vt=ie(se.resolve),$t=[],Ct=0,Rt=1;M(U,function(ze){var Ue=Ct++,et=!1;Rt++,P(Vt,se,ze).then(function(rt){et||(et=!0,$t[Ue]=rt,--Rt||De($t))},He)}),--Rt||De($t)});return lt.error&&He(lt.value),Me.promise},race:function(U){var se=this,Me=nt(se),De=Me.reject,He=xe(function(){var lt=ie(se.resolve);M(U,function(Vt){P(lt,se,Vt).then(Me.resolve,De)})});return He.error&&De(He.value),Me.promise}})},function(s,p,o){var l=o(7);s.exports=l.Promise},function(s,p,o){var l,c,b,_,E,w,k,j,P=o(7),D=o(62),N=o(51).f,I=o(163).set,B=o(164),H=o(207),ee=o(208),ie=o(126),q=P.MutationObserver||P.WebKitMutationObserver,Y=P.document,K=P.process,L=P.Promise,M=N(P,"queueMicrotask"),z=M&&M.value;z||(l=function(){var R,F;for(ie&&(R=K.domain)&&R.exit();c;){F=c.fn,c=c.next;try{F()}catch(J){throw c?_():b=void 0,J}}b=void 0,R&&R.enter()},B||ie||ee||!q||!Y?!H&&L&&L.resolve?((k=L.resolve(void 0)).constructor=L,j=D(k.then,k),_=function(){j(l)}):ie?_=function(){K.nextTick(l)}:(I=D(I,P),_=function(){I(l)}):(E=!0,w=Y.createTextNode(""),new q(l).observe(w,{characterData:!0}),_=function(){w.data=E=!E})),s.exports=z||function(R){var F={fn:R,next:void 0};b&&(b.next=F),c||(c=F,_()),b=F}},function(s,p,o){var l=o(53),c=o(7);s.exports=/ipad|iphone|ipod/i.test(l)&&c.Pebble!==void 0},function(s,p,o){var l=o(53);s.exports=/web0s(?!.*chrome)/i.test(l)},function(s,p,o){var l=o(32),c=o(33),b=o(165);s.exports=function(_,E){if(l(_),c(E)&&E.constructor===_)return E;var w=b.f(_);return(0,w.resolve)(E),w.promise}},function(s,p,o){var l=o(7);s.exports=function(c,b){var _=l.console;_&&_.error&&(arguments.length==1?_.error(c):_.error(c,b))}},function(s,p){s.exports=function(o){try{return{error:!1,value:o()}}catch(l){return{error:!0,value:l}}}},function(s,p){s.exports=typeof window=="object"},function(s,p,o){var l=o(36),c=o(15),b=o(66),_=o(40),E=c(o(93).f),w=c([].push),k=function(j){return function(P){for(var D,N=_(P),I=b(N),B=I.length,H=0,ee=[];B>H;)D=I[H++],l&&!E(N,D)||w(ee,j?[D,N[D]]:N[D]);return ee}};s.exports={entries:k(!0),values:k(!1)}},function(s,p,o){var l=o(38),c=o(67),b=o(43);s.exports=function(_){for(var E=l(this),w=b(E),k=arguments.length,j=c(k>1?arguments[1]:void 0,w),P=k>2?arguments[2]:void 0,D=P===void 0?w:c(P,w);D>j;)E[j++]=_;return E}},function(s,p,o){o.r(p),o.d(p,"observer",function(){return Vn}),o.d(p,"LogicFlow",function(){return ql}),o.d(p,"h",function(){return te.g}),o.d(p,"LogicFlowUtil",function(){return l}),o.d(p,"BaseNode",function(){return br}),o.d(p,"RectNode",function(){return Xc}),o.d(p,"CircleNode",function(){return Wc}),o.d(p,"PolygonNode",function(){return Jc}),o.d(p,"DiamondNode",function(){return nl}),o.d(p,"EllipseNode",function(){return ul}),o.d(p,"TextNode",function(){return ll}),o.d(p,"HtmlNode",function(){return hl}),o.d(p,"BaseEdge",function(){return yi}),o.d(p,"LineEdge",function(){return kl}),o.d(p,"PolylineEdge",function(){return Nl}),o.d(p,"BezierEdge",function(){return Ll}),o.d(p,"Arrow",function(){return lO}),o.d(p,"BaseEdgeModel",function(){return ls}),o.d(p,"BezierEdgeModel",function(){return Js}),o.d(p,"LineEdgeModel",function(){return ys}),o.d(p,"PolylineEdgeModel",function(){return ms}),o.d(p,"BaseNodeModel",function(){return vr}),o.d(p,"CircleNodeModel",function(){return oc}),o.d(p,"DiamondNodeModel",function(){return cc}),o.d(p,"EllipseNodeModel",function(){return dc}),o.d(p,"PolygonNodeModel",function(){return mc}),o.d(p,"RectNodeModel",function(){return xc}),o.d(p,"TextNodeModel",function(){return Pc}),o.d(p,"HtmlNodeModel",function(){return Ac}),o.d(p,"EditConfigModel",function(){return If}),o.d(p,"GraphModel",function(){return Pd}),o.d(p,"SnaplineModel",function(){return uy}),o.d(p,"Keyboard",function(){return Wy}),o.d(p,"get",function(){return Zd}),o.d(p,"defaults",function(){return Qd}),o.d(p,"ElementState",function(){return Ot}),o.d(p,"ModelType",function(){return dt}),o.d(p,"ElementType",function(){return Ht}),o.d(p,"EventType",function(){return tt}),o.d(p,"formateAnchorConnectValidateData",function(){return ei});var l={};o.r(l),o.d(l,"createUuid",function(){return Mr}),o.d(l,"refreshGraphId",function(){return hb}),o.d(l,"createDrag",function(){return Xb}),o.d(l,"StepDrag",function(){return dr});var c=o(1),b=o(10);if(!b.j)throw new Error("mobx-react-lite requires React with Hooks support");if(!c.H)throw new Error("mobx-react-lite requires mobx at least version 4 to be available");var _=o(42),E=Object(_.b)("observerBatching");function w(e){e()}var k=!1;function j(){return k}function P(e){return Object(c.t)(e)}var D,N=1e4,I=new Set;function B(){D===void 0&&(D=setTimeout(H,1e4))}function H(){D=void 0;var e=Date.now();I.forEach(function(t){var n=t.current;n&&e>=n.cleanAt&&(n.reaction.dispose(),t.current=null,I.delete(t))}),I.size>0&&B()}var ee=!1,ie=[],q={};function Y(e){return"observer"+e}function K(e,t,n){t===void 0&&(t="observed"),n===void 0&&(n=q),j();var r,a=function(m){return function(){ee?ie.push(m):m()}}((n.useForceUpdate||_.d)()),i=b.d.useRef(null);if(!i.current){var u=new c.c(Y(t),function(){f.mounted?a():(u.dispose(),i.current=null)}),f=function(m){return{cleanAt:Date.now()+N,reaction:m}}(u);i.current=f,r=i,I.add(r),B()}var d=i.current.reaction;return b.d.useDebugValue(d,P),b.d.useEffect(function(){var m;return m=i,I.delete(m),i.current?i.current.mounted=!0:(i.current={reaction:new c.c(Y(t),function(){a()}),cleanAt:1/0},a()),function(){i.current.reaction.dispose(),i.current=null}},[]),function(m){ee=!0,ie=[];try{var O=m();ee=!1;var S=ie.length>0?ie:void 0;return b.d.useLayoutEffect(function(){S&&S.forEach(function(T){return T()})},[S]),O}finally{ee=!1}}(function(){var m,O;if(d.track(function(){try{m=e()}catch(S){O=S}}),O)throw O;return m})}var L=function(){return L=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},L.apply(this,arguments)};function M(e,t){var n,r,a,i=L({forwardRef:!1},t),u=e.displayName||e.name,f=function(d,m){return K(function(){return e(d,m)},u)};return f.displayName=u,n=i.forwardRef?Object(b.f)(Object(b.e)(f)):Object(b.f)(f),r=e,a=n,Object.keys(r).forEach(function(d){z[d]||Object.defineProperty(a,d,Object.getOwnPropertyDescriptor(r,d))}),n.displayName=u,n}var z={$$typeof:!0,render:!0,compare:!0,type:!0};function R(e){var t=e.children,n=e.render,r=t||n;return typeof r!="function"?null:K(r)}function F(e,t,n,r,a){var i=t==="children"?"render":"children",u=typeof e[t]=="function",f=typeof e[i]=="function";return u&&f?new Error("MobX Observer: Do not use children and render in the same time in`"+n):u||f?null:new Error("Invalid prop `"+a+"` of type `"+typeof e[t]+"` supplied to `"+n+"`, expected `function`.")}R.propTypes={children:F,render:F},R.displayName="Observer";var J;(J=b.g)||(J=w),Object(c.n)({reactionScheduler:J}),Object(_.a)()[E]=!0;var fe=0,ce={};function ye(e){return ce[e]||(ce[e]=function(t){if(typeof Symbol=="function")return Symbol(t);var n="__$mobx-react "+t+" ("+fe+")";return fe++,n}(e)),ce[e]}function xe(e,t){if(ge(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var a=0;a<n.length;a++)if(!Object.hasOwnProperty.call(t,n[a])||!ge(e[n[a]],t[n[a]]))return!1;return!0}function ge(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function ue(e,t,n){Object.hasOwnProperty.call(e,t)?e[t]=n:Object.defineProperty(e,t,{enumerable:!1,configurable:!0,writable:!0,value:n})}var he=ye("patchMixins"),be=ye("patchedDefinition");function Se(e,t){for(var n=this,r=arguments.length,a=new Array(r>2?r-2:0),i=2;i<r;i++)a[i-2]=arguments[i];t.locks++;try{var u;return e!=null&&(u=e.apply(this,a)),u}finally{t.locks--,t.locks===0&&t.methods.forEach(function(f){f.apply(n,a)})}}function Ie(e,t){return function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];Se.call.apply(Se,[this,e,t].concat(r))}}function We(e,t,n){var r=function(f,d){var m=f[he]=f[he]||{},O=m[d]=m[d]||{};return O.locks=O.locks||0,O.methods=O.methods||[],O}(e,t);r.methods.indexOf(n)<0&&r.methods.push(n);var a=Object.getOwnPropertyDescriptor(e,t);if(!a||!a[be]){var i=e[t],u=ke(e,t,a?a.enumerable:void 0,r,i);Object.defineProperty(e,t,u)}}function ke(e,t,n,r,a){var i,u=Ie(a,r);return(i={})[be]=!0,i.get=function(){return u},i.set=function(f){if(this===e)u=Ie(f,r);else{var d=ke(this,t,n,r,f);Object.defineProperty(this,t,d)}},i.configurable=!0,i.enumerable=n,i}var Re=c.a||"$mobx",$e=ye("isMobXReactObserver"),Z=ye("isUnmounted"),$=ye("skipRender"),ae=ye("isForcingUpdate");function _e(e){var t=e.prototype;if(e[$e]?Te(t):e[$e]=!0,t.componentWillReact)throw new Error("The componentWillReact life-cycle event is no longer supported");if(e.__proto__!==b.b)if(t.shouldComponentUpdate){if(t.shouldComponentUpdate!==Ke)throw new Error("It is not allowed to use shouldComponentUpdate in observer based components.")}else t.shouldComponentUpdate=Ke;nt(t,"props"),nt(t,"state");var n=t.render;return t.render=function(){return we.call(this,n)},We(t,"componentWillUnmount",function(){var r;(r=this.render[Re])===null||r===void 0||r.dispose(),this[Z]=!0,!this.render[Re]&&Te(this)}),e}function Te(e){return e.displayName||e.name||e.constructor&&(e.constructor.displayName||e.constructor.name)||"<component>"}function we(e){var t=this;ue(this,$,!1),ue(this,ae,!1);var n=Te(this),r=e.bind(this),a=!1,i=new c.c(n+".render()",function(){if(!a&&(a=!0,t[Z]!==!0)){var f=!0;try{ue(t,ae,!0),t[$]||b.a.prototype.forceUpdate.call(t),f=!1}finally{ue(t,ae,!1),f&&i.dispose()}}});function u(){a=!1;var f=void 0,d=void 0;if(i.track(function(){try{d=Object(c.d)(!1,r)}catch(m){f=m}}),f)throw f;return d}return i.reactComponent=this,u[Re]=i,this.render=u,u.call(this)}function Ke(e,t){return this.state!==t||!xe(this.props,e)}function nt(e,t){var n=ye("reactProp_"+t+"_valueHolder"),r=ye("reactProp_"+t+"_atomHolder");function a(){return this[r]||ue(this,r,Object(c.o)("reactive "+t)),this[r]}Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){var i=!1;return c.f&&c.e&&(i=Object(c.f)(!0)),a.call(this).reportObserved(),c.f&&c.e&&Object(c.e)(i),this[n]},set:function(i){this[ae]||xe(this[n],i)?ue(this,n,i):(ue(this,n,i),ue(this,$,!0),a.call(this).reportChanged(),ue(this,$,!1))}})}var Ze=typeof Symbol=="function"&&Symbol.for,Ge=Ze?Symbol.for("react.forward_ref"):typeof b.e=="function"&&Object(b.e)(function(e){return null}).$$typeof,ve=Ze?Symbol.for("react.memo"):typeof b.f=="function"&&Object(b.f)(function(e){return null}).$$typeof;function Fe(e){if(e.isMobxInjector,ve&&e.$$typeof===ve)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(Ge&&e.$$typeof===Ge){var t=e.render;if(typeof t!="function")throw new Error("render property of ForwardRef was not a function");return Object(b.e)(function(){var n=arguments;return Object(b.c)(R,null,function(){return t.apply(void 0,n)})})}return typeof e!="function"||e.prototype&&e.prototype.render||e.isReactClass||Object.prototype.isPrototypeOf.call(b.a,e)?_e(e):M(e)}if(!b.a)throw new Error("mobx-react requires React to be available");if(!c.C)throw new Error("mobx-react requires mobx to be available");var te=o(0);o(3),o(60),o(2),o(6),o(4),o(11),o(39),o(22),o(20),o(5),o(23),o(21),o(25),o(8),o(9),o(16),o(24),o(18),o(29),o(188),o(193),o(103),o(152),o(153);var Le=function(e,t){for(var n=-1,r=e==null?0:e.length,a=Array(r);++n<r;)a[n]=t(e[n],n,e);return a},ut=function(){this.__data__=[],this.size=0},vt=function(e,t){return e===t||e!=e&&t!=t},it=function(e,t){for(var n=e.length;n--;)if(vt(e[n][0],t))return n;return-1},ht=Array.prototype.splice,St=function(e){var t=this.__data__,n=it(t,e);return!(n<0)&&(n==t.length-1?t.pop():ht.call(t,n,1),--this.size,!0)},Pt=function(e){var t=this.__data__,n=it(t,e);return n<0?void 0:t[n][1]},at=function(e){return it(this.__data__,e)>-1},Nt=function(e,t){var n=this.__data__,r=it(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function X(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}X.prototype.clear=ut,X.prototype.delete=St,X.prototype.get=Pt,X.prototype.has=at,X.prototype.set=Nt;var oe=X,U=function(){this.__data__=new oe,this.size=0},se=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Me=function(e){return this.__data__.get(e)},De=function(e){return this.__data__.has(e)},He=o(31),lt=He.a.Symbol,Vt=Object.prototype,$t=Vt.hasOwnProperty,Ct=Vt.toString,Rt=lt?lt.toStringTag:void 0,ze=function(e){var t=$t.call(e,Rt),n=e[Rt];try{e[Rt]=void 0;var r=!0}catch{}var a=Ct.call(e);return r&&(t?e[Rt]=n:delete e[Rt]),a},Ue=Object.prototype.toString,et=function(e){return Ue.call(e)},rt=lt?lt.toStringTag:void 0,wt=function(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":rt&&rt in Object(e)?ze(e):et(e)},Mt=function(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")},ur,Hn=function(e){if(!Mt(e))return!1;var t=wt(e);return t=="[object Function]"||t=="[object GeneratorFunction]"||t=="[object AsyncFunction]"||t=="[object Proxy]"},Xn=He.a["__core-js_shared__"],Xr=(ur=/[^.]+$/.exec(Xn&&Xn.keys&&Xn.keys.IE_PROTO||""))?"Symbol(src)_1."+ur:"",Tu=function(e){return!!Xr&&Xr in e},Bo=Function.prototype.toString,Pn=function(e){if(e!=null){try{return Bo.call(e)}catch{}try{return e+""}catch{}}return""},Pi=/^\[object .+?Constructor\]$/,Ve=Function.prototype,Au=Object.prototype,ki=Ve.toString,Ti=Au.hasOwnProperty,gn=RegExp("^"+ki.call(Ti).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vn=function(e){return!(!Mt(e)||Tu(e))&&(Hn(e)?gn:Pi).test(Pn(e))},Ai=function(e,t){return e==null?void 0:e[t]},Gn=function(e,t){var n=Ai(e,t);return vn(n)?n:void 0},Er=Gn(He.a,"Map"),In=Gn(Object,"create"),Fo=function(){this.__data__=In?In(null):{},this.size=0},Mi=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Mu=Object.prototype.hasOwnProperty,io=function(e){var t=this.__data__;if(In){var n=t[e];return n==="__lodash_hash_undefined__"?void 0:n}return Mu.call(t,e)?t[e]:void 0},Du=Object.prototype.hasOwnProperty,Di=function(e){var t=this.__data__;return In?t[e]!==void 0:Du.call(t,e)},Nu=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=In&&t===void 0?"__lodash_hash_undefined__":t,this};function sr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}sr.prototype.clear=Fo,sr.prototype.delete=Mi,sr.prototype.get=io,sr.prototype.has=Di,sr.prototype.set=Nu;var Ni=sr,Un=function(){this.size=0,this.__data__={hash:new Ni,map:new(Er||oe),string:new Ni}},Cu=function(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null},ao=function(e,t){var n=e.__data__;return Cu(t)?n[typeof t=="string"?"string":"hash"]:n.map},Vo=function(e){var t=ao(this,e).delete(e);return this.size-=t?1:0,t},Ho=function(e){return ao(this,e).get(e)},Ru=function(e){return ao(this,e).has(e)},Ci=function(e,t){var n=ao(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function Sr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Sr.prototype.clear=Un,Sr.prototype.delete=Vo,Sr.prototype.get=Ho,Sr.prototype.has=Ru,Sr.prototype.set=Ci;var jr=Sr,Ri=function(e,t){var n=this.__data__;if(n instanceof oe){var r=n.__data__;if(!Er||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new jr(r)}return n.set(e,t),this.size=n.size,this};function Pr(e){var t=this.__data__=new oe(e);this.size=t.size}Pr.prototype.clear=U,Pr.prototype.delete=se,Pr.prototype.get=Me,Pr.prototype.has=De,Pr.prototype.set=Ri;var Yn=Pr,Ii=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Li=function(e){return this.__data__.has(e)};function Gr(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new jr;++t<n;)this.add(e[t])}Gr.prototype.add=Gr.prototype.push=Ii,Gr.prototype.has=Li;var zi=Gr,Iu=function(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},Bi=function(e,t){return e.has(t)},Fi=function(e,t,n,r,a,i){var u=1&n,f=e.length,d=t.length;if(f!=d&&!(u&&d>f))return!1;var m=i.get(e),O=i.get(t);if(m&&O)return m==t&&O==e;var S=-1,T=!0,C=2&n?new zi:void 0;for(i.set(e,t),i.set(t,e);++S<f;){var G=e[S],W=t[S];if(r)var ne=u?r(W,G,S,t,e,i):r(G,W,S,e,t,i);if(ne!==void 0){if(ne)continue;T=!1;break}if(C){if(!Iu(t,function(re,de){if(!Bi(C,de)&&(G===re||a(G,re,n,r,i)))return C.push(de)})){T=!1;break}}else if(G!==W&&!a(G,W,n,r,i)){T=!1;break}}return i.delete(e),i.delete(t),T},Ur=He.a.Uint8Array,Vi=function(e){var t=-1,n=Array(e.size);return e.forEach(function(r,a){n[++t]=[a,r]}),n},Lu=function(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n},Hi=lt?lt.prototype:void 0,Xo=Hi?Hi.valueOf:void 0,Yr=function(e,t,n,r,a,i,u){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new Ur(e),new Ur(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return vt(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var f=Vi;case"[object Set]":var d=1&r;if(f||(f=Lu),e.size!=t.size&&!d)return!1;var m=u.get(e);if(m)return m==t;r|=2,u.set(e,t);var O=Fi(f(e),f(t),r,a,i,u);return u.delete(e),O;case"[object Symbol]":if(Xo)return Xo.call(e)==Xo.call(t)}return!1},Wn=function(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e},Zt=Array.isArray,Xi=function(e,t,n){var r=t(e);return Zt(e)?r:Wn(r,n(e))},Gi=function(e,t){for(var n=-1,r=e==null?0:e.length,a=0,i=[];++n<r;){var u=e[n];t(u,n,e)&&(i[a++]=u)}return i},Ui=function(){return[]},zu=Object.prototype.propertyIsEnumerable,cr=Object.getOwnPropertySymbols,kn=cr?function(e){return e==null?[]:(e=Object(e),Gi(cr(e),function(t){return zu.call(e,t)}))}:Ui,Bu=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r},Tn=function(e){return e!=null&&typeof e=="object"},bn=function(e){return Tn(e)&&wt(e)=="[object Arguments]"},Yi=Object.prototype,Wi=Yi.hasOwnProperty,Fu=Yi.propertyIsEnumerable,uo=bn(function(){return arguments}())?bn:function(e){return Tn(e)&&Wi.call(e,"callee")&&!Fu.call(e,"callee")},$n=uo,Wr=o(48),Vu=/^(?:0|[1-9]\d*)$/,rn=function(e,t){var n=typeof e;return!!(t=t??9007199254740991)&&(n=="number"||n!="symbol"&&Vu.test(e))&&e>-1&&e%1==0&&e<t},lr=function(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=9007199254740991},gt={};gt["[object Float32Array]"]=gt["[object Float64Array]"]=gt["[object Int8Array]"]=gt["[object Int16Array]"]=gt["[object Int32Array]"]=gt["[object Uint8Array]"]=gt["[object Uint8ClampedArray]"]=gt["[object Uint16Array]"]=gt["[object Uint32Array]"]=!0,gt["[object Arguments]"]=gt["[object Array]"]=gt["[object ArrayBuffer]"]=gt["[object Boolean]"]=gt["[object DataView]"]=gt["[object Date]"]=gt["[object Error]"]=gt["[object Function]"]=gt["[object Map]"]=gt["[object Number]"]=gt["[object Object]"]=gt["[object RegExp]"]=gt["[object Set]"]=gt["[object String]"]=gt["[object WeakMap]"]=!1;var mn=function(e){return Tn(e)&&lr(e.length)&&!!gt[wt(e)]},fr=function(e){return function(t){return e(t)}},Kt=o(49),$i=Kt.a&&Kt.a.isTypedArray,Go=$i?fr($i):mn,Ki=Object.prototype.hasOwnProperty,An=function(e,t){var n=Zt(e),r=!n&&$n(e),a=!n&&!r&&Object(Wr.a)(e),i=!n&&!r&&!a&&Go(e),u=n||r||a||i,f=u?Bu(e.length,String):[],d=f.length;for(var m in e)!t&&!Ki.call(e,m)||u&&(m=="length"||a&&(m=="offset"||m=="parent")||i&&(m=="buffer"||m=="byteLength"||m=="byteOffset")||rn(m,d))||f.push(m);return f},qi=Object.prototype,so=function(e){var t=e&&e.constructor;return e===(typeof t=="function"&&t.prototype||qi)},Mn=function(e,t){return function(n){return e(t(n))}},Zi=Mn(Object.keys,Object),Hu=Object.prototype.hasOwnProperty,Uo=function(e){if(!so(e))return Zi(e);var t=[];for(var n in Object(e))Hu.call(e,n)&&n!="constructor"&&t.push(n);return t},It=function(e){return e!=null&&lr(e.length)&&!Hn(e)},kr=function(e){return It(e)?An(e):Uo(e)},co=function(e){return Xi(e,kr,kn)},pn=Object.prototype.hasOwnProperty,Ji=function(e,t,n,r,a,i){var u=1&n,f=co(e),d=f.length;if(d!=co(t).length&&!u)return!1;for(var m=d;m--;){var O=f[m];if(!(u?O in t:pn.call(t,O)))return!1}var S=i.get(e),T=i.get(t);if(S&&T)return S==t&&T==e;var C=!0;i.set(e,t),i.set(t,e);for(var G=u;++m<d;){var W=e[O=f[m]],ne=t[O];if(r)var re=u?r(ne,W,O,t,e,i):r(W,ne,O,e,t,i);if(!(re===void 0?W===ne||a(W,ne,n,r,i):re)){C=!1;break}G||(G=O=="constructor")}if(C&&!G){var de=e.constructor,Oe=t.constructor;de==Oe||!("constructor"in e)||!("constructor"in t)||typeof de=="function"&&de instanceof de&&typeof Oe=="function"&&Oe instanceof Oe||(C=!1)}return i.delete(e),i.delete(t),C},$r=Gn(He.a,"DataView"),lo=Gn(He.a,"Promise"),fo=Gn(He.a,"Set"),po=Gn(He.a,"WeakMap"),Qi="[object Map]",dn="[object Promise]",_n="[object Set]",Tr="[object WeakMap]",Yo="[object DataView]",Wo=Pn($r),$o=Pn(Er),ea=Pn(lo),Xu=Pn(fo),ho=Pn(po),pr=wt;($r&&pr(new $r(new ArrayBuffer(1)))!=Yo||Er&&pr(new Er)!=Qi||lo&&pr(lo.resolve())!=dn||fo&&pr(new fo)!=_n||po&&pr(new po)!=Tr)&&(pr=function(e){var t=wt(e),n=t=="[object Object]"?e.constructor:void 0,r=n?Pn(n):"";if(r)switch(r){case Wo:return Yo;case $o:return Qi;case ea:return dn;case Xu:return _n;case ho:return Tr}return t});var h=pr,g="[object Arguments]",x="[object Array]",A="[object Object]",V=Object.prototype.hasOwnProperty,Q=function(e,t,n,r,a,i){var u=Zt(e),f=Zt(t),d=u?x:h(e),m=f?x:h(t),O=(d=d==g?A:d)==A,S=(m=m==g?A:m)==A,T=d==m;if(T&&Object(Wr.a)(e)){if(!Object(Wr.a)(t))return!1;u=!0,O=!1}if(T&&!O)return i||(i=new Yn),u||Go(e)?Fi(e,t,n,r,a,i):Yr(e,t,d,n,r,a,i);if(!(1&n)){var C=O&&V.call(e,"__wrapped__"),G=S&&V.call(t,"__wrapped__");if(C||G){var W=C?e.value():e,ne=G?t.value():t;return i||(i=new Yn),a(W,ne,n,r,i)}}return!!T&&(i||(i=new Yn),Ji(e,t,n,r,a,i))},pe=function e(t,n,r,a,i){return t===n||(t==null||n==null||!Tn(t)&&!Tn(n)?t!=t&&n!=n:Q(t,n,r,a,e,i))},je=function(e,t,n,r){var a=n.length,i=a,u=!r;if(e==null)return!i;for(e=Object(e);a--;){var f=n[a];if(u&&f[2]?f[1]!==e[f[0]]:!(f[0]in e))return!1}for(;++a<i;){var d=(f=n[a])[0],m=e[d],O=f[1];if(u&&f[2]){if(m===void 0&&!(d in e))return!1}else{var S=new Yn;if(r)var T=r(m,O,d,e,t,S);if(!(T===void 0?pe(O,m,3,r,S):T))return!1}}return!0},Be=function(e){return e==e&&!Mt(e)},pt=function(e){for(var t=kr(e),n=t.length;n--;){var r=t[n],a=e[r];t[n]=[r,a,Be(a)]}return t},ot=function(e,t){return function(n){return n!=null&&n[e]===t&&(t!==void 0||e in Object(n))}},xt=function(e){var t=pt(e);return t.length==1&&t[0][2]?ot(t[0][0],t[0][1]):function(n){return n===e||je(n,e,t)}},ct=function(e){return typeof e=="symbol"||Tn(e)&&wt(e)=="[object Symbol]"},_t=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,On=/^\w*$/,Tt=function(e,t){if(Zt(e))return!1;var n=typeof e;return!(n!="number"&&n!="symbol"&&n!="boolean"&&e!=null&&!ct(e))||On.test(e)||!_t.test(e)||t!=null&&e in Object(t)};function on(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],i=n.cache;if(i.has(a))return i.get(a);var u=e.apply(this,r);return n.cache=i.set(a,u)||i,u};return n.cache=new(on.Cache||jr),n}on.Cache=jr;var Kr=on,Gu=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ta=/\\(\\)?/g,na=function(e){var t=Kr(e,function(r){return n.size===500&&n.clear(),r}),n=t.cache;return t}(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Gu,function(n,r,a,i){t.push(a?i.replace(ta,"$1"):r||n)}),t}),yo=lt?lt.prototype:void 0,Ko=yo?yo.toString:void 0,an=function e(t){if(typeof t=="string")return t;if(Zt(t))return Le(t,e)+"";if(ct(t))return Ko?Ko.call(t):"";var n=t+"";return n=="0"&&1/t==-1/0?"-0":n},ra=function(e){return e==null?"":an(e)},qr=function(e,t){return Zt(e)?e:Tt(e,t)?[e]:na(ra(e))},qo=function(e){if(typeof e=="string"||ct(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t},Uu=function(e,t){for(var n=0,r=(t=qr(t,e)).length;e!=null&&n<r;)e=e[qo(t[n++])];return n&&n==r?e:void 0},cf=function(e,t,n){var r=e==null?void 0:Uu(e,t);return r===void 0?n:r},ev=function(e,t){return e!=null&&t in Object(e)},tv=function(e,t,n){for(var r=-1,a=(t=qr(t,e)).length,i=!1;++r<a;){var u=qo(t[r]);if(!(i=e!=null&&n(e,u)))break;e=e[u]}return i||++r!=a?i:!!(a=e==null?0:e.length)&&lr(a)&&rn(u,a)&&(Zt(e)||$n(e))},lf=function(e,t){return e!=null&&tv(e,t,ev)},nv=function(e,t){return Tt(e)&&Be(t)?ot(qo(e),t):function(n){var r=cf(n,e);return r===void 0&&r===t?lf(n,e):pe(t,r,3)}},Yu=function(e){return e},rv=function(e){return function(t){return t==null?void 0:t[e]}},ov=function(e){return function(t){return Uu(t,e)}},iv=function(e){return Tt(e)?rv(qo(e)):ov(e)},av=function(e){return typeof e=="function"?e:e==null?Yu:typeof e=="object"?Zt(e)?nv(e[0],e[1]):xt(e):iv(e)},ff=function(e){return function(t,n,r){for(var a=-1,i=Object(t),u=r(t),f=u.length;f--;){var d=u[e?f:++a];if(n(i[d],d,i)===!1)break}return t}}(),uv=function(e,t){return function(n,r){if(n==null)return n;if(!It(n))return e(n,r);for(var a=n.length,i=t?a:-1,u=Object(n);(t?i--:++i<a)&&r(u[i],i,u)!==!1;);return n}}(function(e,t){return e&&ff(e,t,kr)}),sv=function(e,t){var n=-1,r=It(e)?Array(e.length):[];return uv(e,function(a,i,u){r[++n]=t(a,i,u)}),r},oa=function(e,t){return(Zt(e)?Le:sv)(e,av(t))};Object(c.n)({isolateGlobalState:!0});var ia=function(){try{var e=Gn(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Wu=function(e,t,n){t=="__proto__"&&ia?ia(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},cv=Object.prototype.hasOwnProperty,aa=function(e,t,n){var r=e[t];cv.call(e,t)&&vt(r,n)&&(n!==void 0||t in e)||Wu(e,t,n)},go=function(e,t,n,r){var a=!n;n||(n={});for(var i=-1,u=t.length;++i<u;){var f=t[i],d=r?r(n[f],e[f],f,n,e):void 0;d===void 0&&(d=e[f]),a?Wu(n,f,d):aa(n,f,d)}return n},lv=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)},pf=Math.max,df=function(e,t,n){return t=pf(t===void 0?e.length-1:t,0),function(){for(var r=arguments,a=-1,i=pf(r.length-t,0),u=Array(i);++a<i;)u[a]=r[t+a];a=-1;for(var f=Array(t+1);++a<t;)f[a]=r[a];return f[t]=n(u),lv(e,this,f)}},fv=function(e){return function(){return e}},pv=ia?function(e,t){return ia(e,"toString",{configurable:!0,enumerable:!1,value:fv(t),writable:!0})}:Yu,dv=Date.now,hv=function(e){var t=0,n=0;return function(){var r=dv(),a=16-(r-n);if(n=r,a>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}},hf=hv(pv),yv=function(e,t){return hf(df(e,t,Yu),e+"")},gv=function(e,t,n){if(!Mt(n))return!1;var r=typeof t;return!!(r=="number"?It(n)&&rn(t,n.length):r=="string"&&t in n)&&vt(n[t],e)},yf=function(e){return yv(function(t,n){var r=-1,a=n.length,i=a>1?n[a-1]:void 0,u=a>2?n[2]:void 0;for(i=e.length>3&&typeof i=="function"?(a--,i):void 0,u&&gv(n[0],n[1],u)&&(i=a<3?void 0:i,a=1),t=Object(t);++r<a;){var f=n[r];f&&e(t,f,r,i)}return t})},vv=Object.prototype.hasOwnProperty,un=yf(function(e,t){if(so(t)||It(t))go(t,kr(t),e);else for(var n in t)vv.call(t,n)&&aa(e,n,t[n])}),bv=function(e,t,n,r){if(!Mt(e))return e;for(var a=-1,i=(t=qr(t,e)).length,u=i-1,f=e;f!=null&&++a<i;){var d=qo(t[a]),m=n;if(d==="__proto__"||d==="constructor"||d==="prototype")return e;if(a!=u){var O=f[d];(m=r?r(O,d,f):void 0)===void 0&&(m=Mt(O)?O:rn(t[a+1])?[]:{})}aa(f,d,m),f=f[d]}return e},mv=function(e,t,n){for(var r=-1,a=t.length,i={};++r<a;){var u=t[r],f=Uu(e,u);n(f,u)&&bv(i,qr(u,e),f)}return i},_v=function(e,t){return mv(e,t,function(n,r){return lf(e,r)})},gf=lt?lt.isConcatSpreadable:void 0,Ov=function(e){return Zt(e)||$n(e)||!!(gf&&e&&e[gf])},wv=function e(t,n,r,a,i){var u=-1,f=t.length;for(r||(r=Ov),i||(i=[]);++u<f;){var d=t[u];n>0&&r(d)?n>1?e(d,n-1,r,a,i):Wn(i,d):a||(i[i.length]=d)}return i},xv=function(e){return e!=null&&e.length?wv(e,1):[]},Lt,vf,bf,mf,_f,Of,wf,xf,Ef,Sf,jf,Pf,kf,Tf,Af,Mf,Df,Nf,Zo=function(e){return hf(df(e,void 0,xv),e+"")}(function(e,t){return e==null?{}:_v(e,t)});function Jt(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function Ev(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Cf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qt(e,t,n,r,a){var i={};return Object.keys(r).forEach(function(u){i[u]=r[u]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce(function(u,f){return f(e,t,u)||u},i),a&&i.initializer!==void 0&&(i.value=i.initializer?i.initializer.call(a):void 0,i.initializer=void 0),i.initializer===void 0&&(Object.defineProperty(e,t,i),i=null),i}var Ot,Rf,dt,Ht,tt,At,Sv={stopZoomGraph:!1,stopScrollGraph:!1,stopMoveGraph:!1,adjustEdge:!1,adjustEdgeStartAndEnd:!1,adjustNodePosition:!1,hideAnchors:!0,nodeSelectedOutline:!0,nodeTextEdit:!1,edgeTextEdit:!1,nodeTextDraggable:!1,edgeTextDraggable:!1},$u=["isSilentMode","stopZoomGraph","stopScrollGraph","stopMoveGraph","adjustEdge","adjustEdgeMiddle","adjustEdgeStartAndEnd","adjustNodePosition","hideAnchors","hoverOutline","nodeSelectedOutline","edgeSelectedOutline","nodeTextEdit","edgeTextEdit","nodeTextDraggable","edgeTextDraggable","multipleSelectKey","autoExpand"],If=(vf=qt((Lt=function(){function e(r){(function(a,i){if(!(a instanceof i))throw new TypeError("Cannot call a class as a function")})(this,e),Jt(this,"isSilentMode",vf,this),Jt(this,"stopZoomGraph",bf,this),Jt(this,"stopScrollGraph",mf,this),Jt(this,"stopMoveGraph",_f,this),Jt(this,"adjustEdge",Of,this),Jt(this,"adjustEdgeMiddle",wf,this),Jt(this,"adjustEdgeStartAndEnd",xf,this),Jt(this,"adjustNodePosition",Ef,this),Jt(this,"hideAnchors",Sf,this),Jt(this,"hoverOutline",jf,this),Jt(this,"nodeSelectedOutline",Pf,this),Jt(this,"edgeSelectedOutline",kf,this),Jt(this,"nodeTextEdit",Tf,this),Jt(this,"edgeTextEdit",Af,this),Jt(this,"nodeTextDraggable",Mf,this),Jt(this,"edgeTextDraggable",Df,this),Jt(this,"autoExpand",Nf,this),Cf(this,"multipleSelectKey",""),Cf(this,"defaultConfig",{}),un(this,this.getConfigDetail(r))}var t,n;return t=e,(n=[{key:"updateEditConfig",value:function(r){var a=this.getConfigDetail(r);un(this,a)}},{key:"getConfigDetail",value:function(r){var a=r.isSilentMode,i=r.textEdit,u={};if(a===!1&&un(u,this.defaultConfig),a===!0){var f=Zo(Sv,$u);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,hoverOutline:this.hoverOutline,nodeSelectedOutline:this.nodeSelectedOutline,edgeSelectedOutline:this.edgeSelectedOutline,nodeTextEdit:this.nodeTextEdit,edgeTextEdit:this.edgeTextEdit,nodeTextDraggable:this.nodeTextDraggable,edgeTextDraggable:this.edgeTextDraggable,autoExpand:this.autoExpand},un(u,f)}i===!1&&un(u,{nodeTextEdit:!1,edgeTextEdit:!1});var d=Zo(r,$u);return un(u,d)}},{key:"getConfig",value:function(){return Zo(this,$u)}}])&&Ev(t.prototype,n),e}()).prototype,"isSilentMode",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),bf=qt(Lt.prototype,"stopZoomGraph",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),mf=qt(Lt.prototype,"stopScrollGraph",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),_f=qt(Lt.prototype,"stopMoveGraph",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Of=qt(Lt.prototype,"adjustEdge",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),wf=qt(Lt.prototype,"adjustEdgeMiddle",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),xf=qt(Lt.prototype,"adjustEdgeStartAndEnd",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Ef=qt(Lt.prototype,"adjustNodePosition",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Sf=qt(Lt.prototype,"hideAnchors",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),jf=qt(Lt.prototype,"hoverOutline",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Pf=qt(Lt.prototype,"nodeSelectedOutline",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),kf=qt(Lt.prototype,"edgeSelectedOutline",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Tf=qt(Lt.prototype,"nodeTextEdit",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Af=qt(Lt.prototype,"edgeTextEdit",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Mf=qt(Lt.prototype,"nodeTextDraggable",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Df=qt(Lt.prototype,"edgeTextDraggable",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Nf=qt(Lt.prototype,"autoExpand",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),qt(Lt.prototype,"updateEditConfig",[c.k],Object.getOwnPropertyDescriptor(Lt.prototype,"updateEditConfig"),Lt.prototype),Lt);o(63),function(e){e[e.DEFAULT=1]="DEFAULT",e[e.TEXT_EDIT=2]="TEXT_EDIT",e[e.SHOW_MENU=3]="SHOW_MENU",e[e.ALLOW_CONNECT=4]="ALLOW_CONNECT",e[e.NOT_ALLOW_CONNECT=5]="NOT_ALLOW_CONNECT"}(Ot||(Ot={})),function(e){e.KEY="logic-flow",e.NODE_NAME="lf-node",e.EDGE_NAME="lf-edge"}(Rf||(Rf={})),function(e){e.NODE="node",e.CIRCLE_NODE="circle-node",e.POLYGON_NODE="polygon-node",e.RECT_NODE="rect-node",e.TEXT_NODE="text-node",e.ELLIPSE_NODE="ellipse-node",e.DIAMOND_NODE="diamond-node",e.HTML_NODE="html-node",e.EDGE="edge",e.LINE_EDGE="line-edge",e.POLYLINE_EDGE="polyline-edge",e.BEZIER_EDGE="bezier-edge",e.GRAPH="graph"}(dt||(dt={})),function(e){e.NODE="node",e.EDGE="edge",e.GRAPH="graph"}(Ht||(Ht={})),function(e){e.ELEMENT_CLICK="element:click",e.NODE_CLICK="node:click",e.NODE_DBCLICK="node:dbclick",e.NODE_DELETE="node:delete",e.NODE_ADD="node:add",e.NODE_DND_ADD="node:dnd-add",e.NODE_DND_DRAG="node:dnd-drag",e.NODE_MOUSEDOWN="node:mousedown",e.NODE_DRAGSTART="node:dragstart",e.NODE_DRAG="node:drag",e.NODE_DROP="node:drop",e.NODE_MOUSEUP="node:mouseup",e.NODE_MOUSEMOVE="node:mousemove",e.NODE_MOUSEENTER="node:mouseenter",e.NODE_MOUSELEAVE="node:mouseleave",e.NODE_CONTEXTMENU="node:contextmenu",e.EDGE_DELETE="edge:delete",e.EDGE_ADD="edge:add",e.EDGE_CLICK="edge:click",e.EDGE_DBCLICK="edge:dbclick",e.EDGE_MOUSEENTER="edge:mouseenter",e.EDGE_MOUSELEAVE="edge:mouseleave",e.EDGE_CONTEXTMENU="edge:contextmenu",e.EDGE_ADJUST="edge:adjust",e.EDGE_EXCHANGE_NODE="edge:exchange-node",e.ANCHOR_DRAGSTART="anchor:dragstart",e.ANCHOR_DRAG="anchor:drag",e.ANCHOR_DROP="anchor:drop",e.ANCHOR_DRAGEND="anchor:dragend",e.ADJUST_POINT_MOUSEDOWN="adjustPoint:mousedown",e.ADJUST_POINT_MOUSEUP="adjustPoint:mouseup",e.ADJUST_POINT_MOUSEMOVE="adjustPoint:mousemove",e.ADJUST_POINT_DRAGSTART="adjustPoint:dragstart",e.ADJUST_POINT_DRAG="adjustPoint:drag",e.ADJUST_POINT_DROP="adjustPoint:drop",e.ADJUST_POINT_DRAGEND="adjustPoint:dragend",e.BLANK_MOUSEDOWN="blank:mousedown",e.BLANK_DRAGSTART="blank:dragstart",e.BLANK_DRAG="blank:drag",e.BLANK_DROP="blank:drop",e.BLANK_MOUSEMOVE="blank:mousemove",e.BLANK_MOUSEUP="blank:mouseup",e.BLANK_CLICK="blank:click",e.BLANK_CONTEXTMENU="blank:contextmenu",e.SELECTION_MOUSEDOWN="selection:mousedown",e.SELECTION_DRAGSTART="selection:dragstart",e.SELECTION_DRAG="selection:drag",e.SELECTION_DROP="selection:drop",e.SELECTION_MOUSEMOVE="selection:mousemove",e.SELECTION_MOUSEUP="selection:mouseup",e.SELECTION_CONTEXTMENU="selection:contextmenu",e.CONNECTION_NOT_ALLOWED="connection:not-allowed",e.HISTORY_CHANGE="history:change",e.TEXT_UPDATE="text:update",e.GRAPH_TRANSFORM="graph:transform",e.GRAPH_RENDERED="graph:rendered"}(tt||(tt={})),function(e){e.HORIZONTAL="horizontal",e.VERTICAL="vertical"}(At||(At={}));var wn,zt,Lf,zf,Bf,Ff,Vf,Hf,Xf;function ua(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(i=a.next()).done)&&(f.push(i.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return Gf(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Gf(n,r)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Gf(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Zr(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function jv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ku(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ln(e,t,n,r,a){var i={};return Object.keys(r).forEach(function(u){i[u]=r[u]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce(function(u,f){return f(e,t,u)||u},i),a&&i.initializer!==void 0&&(i.value=i.initializer?i.initializer.call(a):void 0,i.initializer=void 0),i.initializer===void 0&&(Object.defineProperty(e,t,i),i=null),i}(function(e){e[e.DEFAULT=0]="DEFAULT",e[e.INCREASE=1]="INCREASE"})(wn||(wn={}));var Pv=(zt=function(){function e(r){(function(a,i){if(!(a instanceof i))throw new TypeError("Cannot call a class as a function")})(this,e),Ku(this,"MINI_SCALE_SIZE",.2),Ku(this,"MAX_SCALE_SIZE",16),Zr(this,"SCALE_X",Lf,this),Zr(this,"SKEW_Y",zf,this),Zr(this,"SKEW_X",Bf,this),Zr(this,"SCALE_Y",Ff,this),Zr(this,"TRANSLATE_X",Vf,this),Zr(this,"TRANSLATE_Y",Hf,this),Zr(this,"ZOOM_SIZE",Xf,this),Ku(this,"eventCenter",void 0),this.eventCenter=r}var t,n;return t=e,n=[{key:"setZoomMiniSize",value:function(r){this.MINI_SCALE_SIZE=r}},{key:"setZoomMaxSize",value:function(r){this.MAX_SCALE_SIZE=r}},{key:"HtmlPointToCanvasPoint",value:function(r){var a=ua(r,2),i=a[0],u=a[1];return[(i-this.TRANSLATE_X)/this.SCALE_X,(u-this.TRANSLATE_Y)/this.SCALE_Y]}},{key:"CanvasPointToHtmlPoint",value:function(r){var a=ua(r,2),i=a[0],u=a[1];return[i*this.SCALE_X+this.TRANSLATE_X,u*this.SCALE_Y+this.TRANSLATE_Y]}},{key:"moveCanvasPointByHtml",value:function(r,a,i){var u=ua(r,2),f=u[0],d=u[1];return[f+a/this.SCALE_X,d+i/this.SCALE_Y]}},{key:"fixDeltaXY",value:function(r,a){return[r/this.SCALE_X,a/this.SCALE_Y]}},{key:"getTransformStyle",value:function(){var r=[this.SCALE_X,this.SKEW_Y,this.SKEW_X,this.SCALE_Y,this.TRANSLATE_X,this.TRANSLATE_Y].join(",");return{transform:"matrix(".concat(r,")")}}},{key:"zoom",value:function(){var r=arguments.length>0&&arguments[0]!==void 0&&arguments[0],a=arguments.length>1?arguments[1]:void 0,i=this.SCALE_X,u=this.SCALE_Y;return r===!0?(i+=this.ZOOM_SIZE,u+=this.ZOOM_SIZE):r===!1?(i-=this.ZOOM_SIZE,u-=this.ZOOM_SIZE):typeof r=="number"&&(i=r,u=r),i<this.MINI_SCALE_SIZE||i>this.MAX_SCALE_SIZE||(a&&(this.TRANSLATE_X-=(i-this.SCALE_X)*a[0],this.TRANSLATE_Y-=(u-this.SCALE_Y)*a[1]),this.SCALE_X=i,this.SCALE_Y=u,this.emitGraphTransform("zoom")),"".concat(100*this.SCALE_X,"%")}},{key:"emitGraphTransform",value:function(r){this.eventCenter.emit(tt.GRAPH_TRANSFORM,{type:r,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(r,a){this.TRANSLATE_X+=r,this.TRANSLATE_Y+=a,this.emitGraphTransform("translate")}},{key:"focusOn",value:function(r,a,i,u){var f=ua(this.CanvasPointToHtmlPoint([r,a]),2),d=i/2-f[0],m=u/2-f[1];this.TRANSLATE_X+=d,this.TRANSLATE_Y+=m,this.emitGraphTransform("focusOn")}}],n&&jv(t.prototype,n),e}(),Lf=Ln(zt.prototype,"SCALE_X",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),zf=Ln(zt.prototype,"SKEW_Y",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Bf=Ln(zt.prototype,"SKEW_X",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Ff=Ln(zt.prototype,"SCALE_Y",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Vf=Ln(zt.prototype,"TRANSLATE_X",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Hf=Ln(zt.prototype,"TRANSLATE_Y",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Xf=Ln(zt.prototype,"ZOOM_SIZE",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return .04}}),Ln(zt.prototype,"zoom",[c.k],Object.getOwnPropertyDescriptor(zt.prototype,"zoom"),zt.prototype),Ln(zt.prototype,"resetZoom",[c.k],Object.getOwnPropertyDescriptor(zt.prototype,"resetZoom"),zt.prototype),Ln(zt.prototype,"translate",[c.k],Object.getOwnPropertyDescriptor(zt.prototype,"translate"),zt.prototype),Ln(zt.prototype,"focusOn",[c.k],Object.getOwnPropertyDescriptor(zt.prototype,"focusOn"),zt.prototype),zt),kv=function(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e},Tv=function(e,t){return e&&go(t,kr(t),e)},Av=function(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t},Mv=Object.prototype.hasOwnProperty,Dv=function(e){if(!Mt(e))return Av(e);var t=so(e),n=[];for(var r in e)(r!="constructor"||!t&&Mv.call(e,r))&&n.push(r);return n},Jo=function(e){return It(e)?An(e,!0):Dv(e)},Nv=function(e,t){return e&&go(t,Jo(t),e)},Uf=o(106),Yf=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t},Cv=function(e,t){return go(e,kn(e),t)},qu=Mn(Object.getPrototypeOf,Object),Wf=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Wn(t,kn(e)),e=qu(e);return t}:Ui,Rv=function(e,t){return go(e,Wf(e),t)},Iv=function(e){return Xi(e,Jo,Wf)},Lv=Object.prototype.hasOwnProperty,zv=function(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&Lv.call(e,"index")&&(n.index=e.index,n.input=e.input),n},Zu=function(e){var t=new e.constructor(e.byteLength);return new Ur(t).set(new Ur(e)),t},Bv=function(e,t){var n=t?Zu(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)},Fv=/\w*$/,Vv=function(e){var t=new e.constructor(e.source,Fv.exec(e));return t.lastIndex=e.lastIndex,t},$f=lt?lt.prototype:void 0,Kf=$f?$f.valueOf:void 0,Hv=function(e){return Kf?Object(Kf.call(e)):{}},qf=function(e,t){var n=t?Zu(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)},Xv=function(e,t,n){var r=e.constructor;switch(t){case"[object ArrayBuffer]":return Zu(e);case"[object Boolean]":case"[object Date]":return new r(+e);case"[object DataView]":return Bv(e,n);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 qf(e,n);case"[object Map]":case"[object Set]":return new r;case"[object Number]":case"[object String]":return new r(e);case"[object RegExp]":return Vv(e);case"[object Symbol]":return Hv(e)}},Zf=Object.create,Gv=function(){function e(){}return function(t){if(!Mt(t))return{};if(Zf)return Zf(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),Jf=function(e){return typeof e.constructor!="function"||so(e)?{}:Gv(qu(e))},Uv=function(e){return Tn(e)&&h(e)=="[object Map]"},Qf=Kt.a&&Kt.a.isMap,Yv=Qf?fr(Qf):Uv,Wv=function(e){return Tn(e)&&h(e)=="[object Set]"},ep=Kt.a&&Kt.a.isSet,$v=ep?fr(ep):Wv,tp="[object Arguments]",np="[object Function]",Kv="[object Object]",kt={};kt[tp]=kt["[object Array]"]=kt["[object ArrayBuffer]"]=kt["[object DataView]"]=kt["[object Boolean]"]=kt["[object Date]"]=kt["[object Float32Array]"]=kt["[object Float64Array]"]=kt["[object Int8Array]"]=kt["[object Int16Array]"]=kt["[object Int32Array]"]=kt["[object Map]"]=kt["[object Number]"]=kt["[object Object]"]=kt["[object RegExp]"]=kt["[object Set]"]=kt["[object String]"]=kt["[object Symbol]"]=kt["[object Uint8Array]"]=kt["[object Uint8ClampedArray]"]=kt["[object Uint16Array]"]=kt["[object Uint32Array]"]=!0,kt["[object Error]"]=kt[np]=kt["[object WeakMap]"]=!1;var qv=function e(t,n,r,a,i,u){var f,d=1&n,m=2&n,O=4&n;if(r&&(f=i?r(t,a,i,u):r(t)),f!==void 0)return f;if(!Mt(t))return t;var S=Zt(t);if(S){if(f=zv(t),!d)return Yf(t,f)}else{var T=h(t),C=T==np||T=="[object GeneratorFunction]";if(Object(Wr.a)(t))return Object(Uf.a)(t,d);if(T==Kv||T==tp||C&&!i){if(f=m||C?{}:Jf(t),!d)return m?Rv(t,Nv(f,t)):Cv(t,Tv(f,t))}else{if(!kt[T])return i?t:{};f=Xv(t,T,d)}}u||(u=new Yn);var G=u.get(t);if(G)return G;u.set(t,f),$v(t)?t.forEach(function(ne){f.add(e(ne,n,r,ne,t,u))}):Yv(t)&&t.forEach(function(ne,re){f.set(re,e(ne,n,r,re,t,u))});var W=S?void 0:(O?m?Iv:co:m?Jo:kr)(t);return kv(W||t,function(ne,re){W&&(ne=t[re=ne]),aa(f,re,e(ne,n,r,re,t,u))}),f},Dt=function(e){return qv(e,5)},Ju=function(e,t,n){(n!==void 0&&!vt(e[t],n)||n===void 0&&!(t in e))&&Wu(e,t,n)},Zv=function(e){return Tn(e)&&It(e)},Jv=Function.prototype,Qv=Object.prototype,rp=Jv.toString,eb=Qv.hasOwnProperty,tb=rp.call(Object),nb=function(e){if(!Tn(e)||wt(e)!="[object Object]")return!1;var t=qu(e);if(t===null)return!0;var n=eb.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&rp.call(n)==tb},Qu=function(e,t){if((t!=="constructor"||typeof e[t]!="function")&&t!="__proto__")return e[t]},rb=function(e){return go(e,Jo(e))},ob=function(e,t,n,r,a,i,u){var f=Qu(e,n),d=Qu(t,n),m=u.get(d);if(m)Ju(e,n,m);else{var O=i?i(f,d,n+"",e,t,u):void 0,S=O===void 0;if(S){var T=Zt(d),C=!T&&Object(Wr.a)(d),G=!T&&!C&&Go(d);O=d,T||C||G?Zt(f)?O=f:Zv(f)?O=Yf(f):C?(S=!1,O=Object(Uf.a)(d,!0)):G?(S=!1,O=qf(d,!0)):O=[]:nb(d)||$n(d)?(O=f,$n(f)?O=rb(f):Mt(f)&&!Hn(f)||(O=Jf(d))):S=!1}S&&(u.set(d,O),a(O,d,r,i,u),u.delete(d)),Ju(e,n,O)}},ib=function e(t,n,r,a,i){t!==n&&ff(n,function(u,f){if(i||(i=new Yn),Mt(u))ob(t,n,f,r,e,a,i);else{var d=a?a(Qu(t,f),u,f+"",t,n,i):void 0;d===void 0&&(d=u),Ju(t,f,d)}},Jo)},op=yf(function(e,t,n){ib(e,t,n)}),ab={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"}},ip=function(e){var t=Dt(ab);return e&&(t=op(t,e)),t};o(77),o(158);function ub(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var sb=function(){function e(){var r,a,i;(function(u,f){if(!(u instanceof f))throw new TypeError("Cannot call a class as a function")})(this,e),i={},(a="_events")in(r=this)?Object.defineProperty(r,a,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[a]=i}var t,n;return t=e,(n=[{key:"on",value:function(r,a,i){var u=this;return r==null||r.split(",").forEach(function(f){f=f.trim(),u._events[f]||(u._events[f]=[]),u._events[f].push({callback:a,once:!!i})}),this}},{key:"once",value:function(r,a){var i=this;r==null||r.split(",").forEach(function(u){return u=u.trim(),i.on(u,a,!0)})}},{key:"emit",value:function(r,a){var i=this;r==null||r.split(",").forEach(function(u){var f=i._events[u]||[],d=i._events["*"]||[],m=function(O){for(var S=O.length,T=0;T<S;T++)if(O[T]){var C=O[T],G=C.callback;C.once&&(O.splice(T,1),O.length===0&&delete i._events[u],S--,T--),G.apply(i,[a])}};m(f),m(d)})}},{key:"off",value:function(r,a){var i=this;return r||(this._events={}),r.split(",").forEach(function(u){if(a){for(var f=i._events[u]||[],d=f.length,m=0;m<d;m++)f[m].callback===a&&(f.splice(m,1),d--,m--);f.length===0&&delete i._events[u]}else delete i._events[u]}),this}},{key:"getEvents",value:function(){return this._events}}])&&ub(t.prototype,n),e}();function Ar(e,t){return t*Math.round(e/t)||e}function ap(e,t){return e%t}function es(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(i=a.next()).done)&&(f.push(i.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return up(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return up(n,r)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function up(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ts,ns=function(e,t,n){var r=es(e,2),a=r[0],i=r[1],u=es(t,2),f=u[0],d=u[1],m=es(n,2),O=m[0],S=m[1];return a>f&&a<O&&i>d&&i<S},sp=function(e,t){var n=!1;switch(t.multipleSelectKey){case"meta":n=e.metaKey;break;case"alt":n=e.altKey;break;case"shift":n=e.shiftKey;break;case"ctrl":n=e.ctrlKey;break;default:n=!1}return n},cb=(o(78),o(161),o(125),o(79),o(30),o(12),o(13),o(14),o(47),new Uint8Array(16));function lb(){if(!ts&&!(ts=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ts(cb)}for(var fb=/^(?:[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,pb=function(e){return typeof e=="string"&&fb.test(e)},Qt=[],rs=0;rs<256;++rs)Qt.push((rs+256).toString(16).substr(1));var db=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=(Qt[e[t+0]]+Qt[e[t+1]]+Qt[e[t+2]]+Qt[e[t+3]]+"-"+Qt[e[t+4]]+Qt[e[t+5]]+"-"+Qt[e[t+6]]+Qt[e[t+7]]+"-"+Qt[e[t+8]]+Qt[e[t+9]]+"-"+Qt[e[t+10]]+Qt[e[t+11]]+Qt[e[t+12]]+Qt[e[t+13]]+Qt[e[t+14]]+Qt[e[t+15]]).toLowerCase();if(!pb(n))throw TypeError("Stringified UUID is invalid");return n},os=function(e,t,n){var r=(e=e||{}).random||(e.rng||lb)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var a=0;a<16;++a)t[n+a]=r[a];return t}return db(r)},Mr=function(){return os()},hb=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",n=e.nodes.reduce(function(r,a){return r[a.id]=t+os(),a.id=r[a.id],r},{});return e.edges.forEach(function(r){r.id=t+os(),r.sourceNodeId=n[r.sourceNodeId],r.targetNodeId=n[r.targetNodeId]}),e},Qo=(o(104),o(162),function(e,t,n){var r=e.x,a=e.y;return(r-t.x)*(r-n.x)<=0&&(a-t.y)*(a-n.y)<=0});function is(e){return is=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},is(e)}function cp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function lp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?cp(Object(n),!0).forEach(function(r){yb(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yb(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var me,fp,pp,dp,hp,yp,gp,vp,bp,mp,_p,Op,wp,xp,Ep,Sp,jp,Pp,kp,Tp,Ap,as=function(e){return e.anchors},sa=function(e,t){for(var n,r=t.nodes,a=r.length-1;a>=0;a--){var i=r[a];if(vb(e,i)){var u=i.getTargetAnchor(e);if(u){var f={node:i,anchorIndex:u.index,anchor:u.anchor};n&&!gb(i,n.node,t)||(n=f)}}}return n},gb=function(e,t,n){return e.zIndex>t.zIndex||n.nodesMap[e.id].index>n.nodesMap[t.id].index},Kn=function(e,t,n,r){return Math.hypot(e-n,t-r)},Dr=function(e,t){var n=!1,r=xn(t);return e.x>=r.minX-0&&e.x<=r.maxX+0&&e.y>=r.minY-0&&e.y<=r.maxY+0&&(n=!0),n},vb=function(e,t){var n=!1,r=xn(t);return e.x>=r.minX-5&&e.x<=r.maxX+5&&e.y>=r.minY-5&&e.y<=r.maxY+5&&(n=!0),n},xn=function(e){var t=e.x,n=e.y,r=e.width,a=e.height;return{minX:t-r/2,minY:n-a/2,maxX:t+r/2,maxY:n+a/2,x:t,y:n,width:r,height:a,centerX:t,centerY:n}},Mp=function(e,t,n){var r,a=function(u){var f=u,d=f.x,m=f.y,O=f.width,S=f.height,T=f.radius;return[{x:d-O/2+T,y:m-S/2+T,r:T},{x:d+O/2-T,y:m-S/2+T,r:T},{x:d-O/2+T,y:m+S/2-T,r:T},{x:d+O/2-T,y:m+S/2-T,r:T}]}(n),i=Number.MAX_SAFE_INTEGER;return a.forEach(function(u){var f=Kn(e.x,e.y,u.x,u.y);f<i&&(i=f,r=u)}),us(e,t,r)},us=function(e,t,n){var r,a=n,i=a.x,u=a.y,f=a.r;if(t===At.HORIZONTAL){var d=i-Math.sqrt(f*f-(e.y-u)*(e.y-u)),m=i+Math.sqrt(f*f-(e.y-u)*(e.y-u));r={x:Math.abs(d-e.x)<Math.abs(m-e.x)?d:m,y:e.y}}else if(t===At.VERTICAL){var O=u-Math.sqrt(f*f-(e.x-i)*(e.x-i)),S=u+Math.sqrt(f*f-(e.x-i)*(e.x-i)),T=Math.abs(O-e.y)<Math.abs(S-e.y)?O:S;r={x:e.x,y:T}}return r},Dp=function(e,t){var n=t,r=!1,a=n.x-n.width/2+n.radius,i=n.x+n.width/2-n.radius,u=n.y-n.height/2+n.radius,f=n.y+n.height/2-n.radius,d=n.x,m=n.y,O=n.width,S=n.height;return e.y===m+S/2||e.y===m-S/2?r=e.x>a&&e.x<i:e.x!==d+O/2&&e.x!==d-O/2||(r=e.y>u&&e.y<f),r},Np=function(e,t,n){var r,a=n,i=a.x,u=a.y,f=a.rx,d=a.ry;if(t===At.HORIZONTAL){var m=i-Math.sqrt(f*f-(e.y-u)*(e.y-u)*f*f/(d*d)),O=i+Math.sqrt(f*f-(e.y-u)*(e.y-u)*f*f/(d*d));r={x:Math.abs(m-e.x)<Math.abs(O-e.x)?m:O,y:e.y}}else if(t===At.VERTICAL){var S=u-Math.sqrt(d*d-(e.x-i)*(e.x-i)*d*d/(f*f)),T=u+Math.sqrt(d*d-(e.x-i)*(e.x-i)*d*d/(f*f)),C=Math.abs(S-e.y)<Math.abs(T-e.y)?S:T;r={x:e.x,y:C}}return r},Cp=function(e,t,n){for(var r,a=n.pointsPosition,i=Number.MAX_SAFE_INTEGER,u=[],f=0;f<a.length;f++)u.push({start:a[f],end:a[(f+1)%a.length]});return u.forEach(function(d){var m=d.start,O=d.end,S=m,T=O;m.x>O.x&&(S=O,T=m);var C={x:e.x,y:e.y};if(S.x===T.x&&t===At.HORIZONTAL&&(C={x:S.x,y:e.y}),S.y===T.y&&t===At.VERTICAL&&(C={x:e.x,y:S.y}),S.x!==T.x&&S.y!==T.y){var G=(T.y-S.y)/(T.x-S.x),W=(S.x*T.y-T.x*S.y)/(S.x-T.x);t===At.HORIZONTAL?C={x:(e.y-W)/G,y:e.y}:t===At.VERTICAL&&(C={x:e.x,y:G*e.x+W})}if(Qo(C,m,O)){var ne=Kn(C.x,C.y,e.x,e.y);ne<i&&(i=ne,r=C)}}),r},Rp=function(e,t,n,r){var a=e.x,i=e.y;return t.x>e.x?a=e.x+n/2:t.x<e.x&&(a=e.x-n/2),t.y>e.y?i=e.y+r/2:t.y<e.y&&(i=e.y-r/2),{x:a,y:i}},Ip=function(e){var t=e.rows,n=e.style,r=e.rowsLength,a=e.className,i=document.createElement("div");i.style.fontSize=n.fontSize,i.style.width=n.width,i.className=a,i.style.lineHeight=n.lineHeight,i.style.padding=n.padding,n.fontFamily&&(i.style.fontFamily=n.fontFamily),r>1?t.forEach(function(f){var d=document.createElement("div");d.textContent=f,i.appendChild(d)}):i.textContent=t,document.body.appendChild(i);var u=i.clientHeight;return document.body.removeChild(i),u},ss=function(e){var t=e.rows,n=e.rowsLength,r=e.fontSize,a=0;return t&&t.forEach(function(i){var u=id(i);a=u>a?u:a}),{width:Math.ceil(a/2)*r+r/4,height:n*(r+2)+r/4}},ei=function(e){return is(e)!=="object"?{isAllPass:!!e,msg:e?"":"不允许连接"}:e},en=function(e){try{return Dt(e)}catch{return e}},bb=1e3,mb=999,cs=function(){return++bb};function Lp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function hn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Lp(Object(n),!0).forEach(function(r){Dn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xt(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function _b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Dn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Je(e,t,n,r,a){var i={};return Object.keys(r).forEach(function(u){i[u]=r[u]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce(function(u,f){return f(e,t,u)||u},i),a&&i.initializer!==void 0&&(i.value=i.initializer?i.initializer.call(a):void 0,i.initializer=void 0),i.initializer===void 0&&(Object.defineProperty(e,t,i),i=null),i}var ls=(me=function(){function e(r,a){(function(i,u){if(!(i instanceof u))throw new TypeError("Cannot call a class as a function")})(this,e),Dn(this,"id",""),Xt(this,"type",fp,this),Xt(this,"sourceNodeId",pp,this),Xt(this,"targetNodeId",dp,this),Xt(this,"startPoint",hp,this),Xt(this,"endPoint",yp,this),Xt(this,"text",gp,this),Xt(this,"properties",vp,this),Xt(this,"points",bp,this),Xt(this,"pointsList",mp,this),Xt(this,"isSelected",_p,this),Xt(this,"isHovered",Op,this),Xt(this,"isHitable",wp,this),Xt(this,"draggable",xp,this),Xt(this,"visible",Ep,this),Dn(this,"virtual",!1),Xt(this,"isAnimation",Sp,this),Xt(this,"isShowAdjustPoint",jp,this),Dn(this,"graphModel",void 0),Xt(this,"zIndex",Pp,this),Dn(this,"BaseType",Ht.EDGE),Dn(this,"modelType",dt.EDGE),Xt(this,"state",kp,this),Dn(this,"additionStateData",void 0),Dn(this,"sourceAnchorId",""),Dn(this,"targetAnchorId",""),Dn(this,"menu",void 0),Dn(this,"customTextPosition",!1),Xt(this,"style",Tp,this),Xt(this,"arrowConfig",Ap,this),this.graphModel=a,this.initEdgeData(r),this.setAttributes()}var t,n;return t=e,n=[{key:"initEdgeData",value:function(r){if(r.properties||(r.properties={}),!r.id){var a=this.graphModel.idGenerator,i=a&&a(r.type),u=this.createId();r.id=u||i||Mr()}this.arrowConfig.markerEnd="url(#marker-end-".concat(r.id,")");var f=this.graphModel.editConfigModel.adjustEdgeStartAndEnd;this.isShowAdjustPoint=f,un(this,Vb(r)),this.graphModel.overlapMode===wn.INCREASE&&(this.zIndex=r.zIndex||cs()),this.setAnchors(),this.initPoints(),this.formatText(r)}},{key:"setAttributes",value:function(){}},{key:"createId",value:function(){return null}},{key:"getEdgeStyle",value:function(){return hn(hn({},this.graphModel.theme.baseEdge),this.style)}},{key:"getAdjustPointStyle",value:function(){return hn({},this.graphModel.theme.edgeAdjust)}},{key:"getTextStyle",value:function(){var r=this.graphModel.theme.edgeText;return Dt(r)}},{key:"getEdgeAnimationStyle",value:function(){var r=this.graphModel.theme.edgeAnimation;return Dt(r)}},{key:"getArrowStyle",value:function(){var r=this.getEdgeStyle(),a=this.getEdgeAnimationStyle(),i=this.graphModel.theme.arrow,u=this.isAnimation?a.stroke:r.stroke;return hn(hn({},r),{},{fill:u,stroke:u},i)}},{key:"getOutlineStyle",value:function(){var r=this.graphModel.theme.outline;return Dt(r)}},{key:"getTextPosition",value:function(){return{x:0,y:0}}},{key:"sourceNode",get:function(){var r,a;return(r=this.graphModel)===null||r===void 0||(a=r.nodesMap[this.sourceNodeId])===null||a===void 0?void 0:a.model}},{key:"targetNode",get:function(){var r,a;return(r=this.graphModel)===null||r===void 0||(a=r.nodesMap[this.targetNodeId])===null||a===void 0?void 0:a.model}},{key:"textPosition",get:function(){return this.getTextPosition()}},{key:"getBeginAnchor",value:function(r,a){var i,u;return as(r).forEach(function(f){var d=cd(f,a);(u===void 0||d<u)&&(u=d,i=f)}),i}},{key:"getEndAnchor",value:function(r){var a,i,u=this;return as(r).forEach(function(f){var d=cd(f,u.startPoint);(i===void 0||d<i)&&(i=d,a=f)}),a}},{key:"getProperties",value:function(){return Object(c.I)(this.properties)}},{key:"getData",value:function(){var r=this.text,a=r.x,i=r.y,u=r.value,f={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(c.I)(this.properties)};return u&&(f.text={x:a,y:i,value:u}),this.graphModel.overlapMode===wn.INCREASE&&(f.zIndex=this.zIndex),f}},{key:"getHistoryData",value:function(){return this.getData()}},{key:"setProperty",value:function(r,a){this.properties[r]=en(a),this.setAttributes()}},{key:"deleteProperty",value:function(r){delete this.properties[r],this.setAttributes()}},{key:"setProperties",value:function(r){this.properties=hn(hn({},Object(c.I)(this.properties)),en(r)),this.setAttributes()}},{key:"changeEdgeId",value:function(r){var a=this.arrowConfig,i=a.markerEnd,u=a.markerStart;u&&u==="url(#marker-start-".concat(this.id,")")&&(this.arrowConfig.markerStart="url(#marker-start-".concat(r,")")),i&&i==="url(#marker-end-".concat(this.id,")")&&(this.arrowConfig.markerEnd="url(#marker-end-".concat(r,")")),this.id=r}},{key:"setStyle",value:function(r,a){this.style=hn(hn({},this.style),{},Dn({},r,en(a)))}},{key:"setStyles",value:function(r){this.style=hn(hn({},this.style),en(r))}},{key:"updateStyles",value:function(r){this.style=hn({},en(r))}},{key:"formatText",value:function(r){var a=this.textPosition,i=a.x,u=a.y;r.text&&typeof r.text!="string"?Object.prototype.toString.call(r.text)==="[object Object]"&&(this.text={x:r.text.x||i,y:r.text.y||u,value:r.text.value||"",draggable:this.text.draggable,editable:this.text.editable}):this.text={value:r.text||"",x:i,y:u,draggable:this.text.draggable,editable:this.text.editable}}},{key:"resetTextPosition",value:function(){var r=this.textPosition,a=r.x,i=r.y;this.text.x=a,this.text.y=i}},{key:"moveText",value:function(r,a){if(this.text){var i=this.text,u=i.x,f=i.y,d=i.value,m=i.draggable,O=i.editable;this.text={value:d,draggable:m,x:u+r,y:f+a,editable:O}}}},{key:"setText",value:function(r){r&&un(this.text,r)}},{key:"updateText",value:function(r){this.text=hn(hn({},Object(c.I)(this.text)),{},{value:r})}},{key:"setAnchors",value:function(){if(!this.sourceAnchorId||!this.startPoint){var r=this.getBeginAnchor(this.sourceNode,this.targetNode);this.startPoint||(this.startPoint={x:r.x,y:r.y}),this.sourceAnchorId||(this.sourceAnchorId=r.id)}if(!this.targetAnchorId||!this.endPoint){var a=this.getEndAnchor(this.targetNode);this.endPoint||(this.endPoint={x:a.x,y:a.y}),this.targetAnchorId||(this.targetAnchorId=a.id)}}},{key:"setSelected",value:function(){var r=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isSelected=r}},{key:"setHovered",value:function(){var r=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isHovered=r}},{key:"setHitable",value:function(){var r=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isHitable=r}},{key:"openEdgeAnimation",value:function(){this.isAnimation=!0}},{key:"closeEdgeAnimation",value:function(){this.isAnimation=!1}},{key:"setElementState",value:function(r,a){this.state=r,this.additionStateData=a}},{key:"updateStartPoint",value:function(r){this.startPoint=r}},{key:"moveStartPoint",value:function(r,a){this.startPoint.x+=r,this.startPoint.y+=a}},{key:"updateEndPoint",value:function(r){this.endPoint=r}},{key:"moveEndPoint",value:function(r,a){this.endPoint.x+=r,this.endPoint.y+=a}},{key:"setZIndex",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;this.zIndex=r}},{key:"initPoints",value:function(){}},{key:"updateAttributes",value:function(r){un(this,r)}},{key:"getAdjustStart",value:function(){return this.startPoint}},{key:"getAdjustEnd",value:function(){return this.endPoint}},{key:"updateAfterAdjustStartAndEnd",value:function(r){var a=r.startPoint,i=r.endPoint;this.updateStartPoint({x:a.x,y:a.y}),this.updateEndPoint({x:i.x,y:i.y})}}],n&&_b(t.prototype,n),e}(),fp=Je(me.prototype,"type",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),pp=Je(me.prototype,"sourceNodeId",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),dp=Je(me.prototype,"targetNodeId",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),hp=Je(me.prototype,"startPoint",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),yp=Je(me.prototype,"endPoint",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),gp=Je(me.prototype,"text",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{value:"",x:0,y:0,draggable:!1,editable:!0}}}),vp=Je(me.prototype,"properties",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),bp=Je(me.prototype,"points",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),mp=Je(me.prototype,"pointsList",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),_p=Je(me.prototype,"isSelected",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Op=Je(me.prototype,"isHovered",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),wp=Je(me.prototype,"isHitable",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),xp=Je(me.prototype,"draggable",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Ep=Je(me.prototype,"visible",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Sp=Je(me.prototype,"isAnimation",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),jp=Je(me.prototype,"isShowAdjustPoint",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Pp=Je(me.prototype,"zIndex",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),kp=Je(me.prototype,"state",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Tp=Je(me.prototype,"style",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),Ap=Je(me.prototype,"arrowConfig",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{markerEnd:"url(#marker-end-".concat(this.id,")"),markerStart:""}}}),Je(me.prototype,"sourceNode",[c.m],Object.getOwnPropertyDescriptor(me.prototype,"sourceNode"),me.prototype),Je(me.prototype,"targetNode",[c.m],Object.getOwnPropertyDescriptor(me.prototype,"targetNode"),me.prototype),Je(me.prototype,"textPosition",[c.m],Object.getOwnPropertyDescriptor(me.prototype,"textPosition"),me.prototype),Je(me.prototype,"setProperty",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"setProperty"),me.prototype),Je(me.prototype,"deleteProperty",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"deleteProperty"),me.prototype),Je(me.prototype,"setProperties",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"setProperties"),me.prototype),Je(me.prototype,"changeEdgeId",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"changeEdgeId"),me.prototype),Je(me.prototype,"setStyle",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"setStyle"),me.prototype),Je(me.prototype,"setStyles",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"setStyles"),me.prototype),Je(me.prototype,"updateStyles",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"updateStyles"),me.prototype),Je(me.prototype,"formatText",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"formatText"),me.prototype),Je(me.prototype,"resetTextPosition",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"resetTextPosition"),me.prototype),Je(me.prototype,"moveText",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"moveText"),me.prototype),Je(me.prototype,"setText",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"setText"),me.prototype),Je(me.prototype,"updateText",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"updateText"),me.prototype),Je(me.prototype,"setAnchors",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"setAnchors"),me.prototype),Je(me.prototype,"setSelected",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"setSelected"),me.prototype),Je(me.prototype,"setHovered",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"setHovered"),me.prototype),Je(me.prototype,"setHitable",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"setHitable"),me.prototype),Je(me.prototype,"openEdgeAnimation",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"openEdgeAnimation"),me.prototype),Je(me.prototype,"closeEdgeAnimation",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"closeEdgeAnimation"),me.prototype),Je(me.prototype,"setElementState",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"setElementState"),me.prototype),Je(me.prototype,"updateStartPoint",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"updateStartPoint"),me.prototype),Je(me.prototype,"moveStartPoint",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"moveStartPoint"),me.prototype),Je(me.prototype,"updateEndPoint",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"updateEndPoint"),me.prototype),Je(me.prototype,"moveEndPoint",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"moveEndPoint"),me.prototype),Je(me.prototype,"setZIndex",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"setZIndex"),me.prototype),Je(me.prototype,"initPoints",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"initPoints"),me.prototype),Je(me.prototype,"updateAttributes",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"updateAttributes"),me.prototype),Je(me.prototype,"getAdjustStart",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"getAdjustStart"),me.prototype),Je(me.prototype,"getAdjustEnd",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"getAdjustEnd"),me.prototype),Je(me.prototype,"updateAfterAdjustStartAndEnd",[c.k],Object.getOwnPropertyDescriptor(me.prototype,"updateAfterAdjustStartAndEnd"),me.prototype),me),fs=ls;function ps(e){return ps=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ps(e)}function zp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Bp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zp(Object(n),!0).forEach(function(r){Vp(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ob(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ds(){return ds=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(e,t,n){var r=xb(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(arguments.length<3?e:n):a.value}},ds.apply(this,arguments)}function xb(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=vo(e))!==null;);return e}function hs(e,t){return hs=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},hs(e,t)}function Eb(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=vo(e);if(t){var a=vo(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Sb(this,n)}}function Sb(e,t){if(t&&(ps(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Fp(e)}function Fp(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vo(e){return vo=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},vo(e)}function Vp(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var st,Hp,ys=function(e){(function(i,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(u&&u.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),u&&hs(i,u)})(a,e);var t,n,r=Eb(a);function a(){var i;Ob(this,a);for(var u=arguments.length,f=new Array(u),d=0;d<u;d++)f[d]=arguments[d];return Vp(Fp(i=r.call.apply(r,[this].concat(f))),"modelType",dt.LINE_EDGE),i}return t=a,(n=[{key:"getEdgeStyle",value:function(){var i=this.graphModel.theme.line;return Bp(Bp({},ds(vo(a.prototype),"getEdgeStyle",this).call(this)),Dt(i))}},{key:"getTextPosition",value:function(){return{x:(this.startPoint.x+this.endPoint.x)/2,y:(this.startPoint.y+this.endPoint.y)/2}}}])&&wb(t.prototype,n),a}(fs);function gs(e){return gs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gs(e)}function jb(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(i=a.next()).done)&&(f.push(i.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return Xp(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Xp(n,r)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Xp(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Gp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Up(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Gp(Object(n),!0).forEach(function(r){bs(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Pb(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function kb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Tb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ti(){return ti=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(e,t,n){var r=Ab(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(arguments.length<3?e:n):a.value}},ti.apply(this,arguments)}function Ab(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Nr(e))!==null;);return e}function vs(e,t){return vs=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},vs(e,t)}function Mb(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Nr(e);if(t){var a=Nr(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Db(this,n)}}function Db(e,t){if(t&&(gs(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ni(e)}function ni(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Nr(e){return Nr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Nr(e)}function bs(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sn(e,t,n,r,a){var i={};return Object.keys(r).forEach(function(u){i[u]=r[u]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce(function(u,f){return f(e,t,u)||u},i),a&&i.initializer!==void 0&&(i.value=i.initializer?i.initializer.call(a):void 0,i.initializer=void 0),i.initializer===void 0&&(Object.defineProperty(e,t,i),i=null),i}var ms=(st=function(e){(function(i,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(u&&u.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),u&&vs(i,u)})(a,e);var t,n,r=Mb(a);function a(){var i;kb(this,a);for(var u=arguments.length,f=new Array(u),d=0;d<u;d++)f[d]=arguments[d];return bs(ni(i=r.call.apply(r,[this].concat(f))),"modelType",dt.POLYLINE_EDGE),bs(ni(i),"draggingPointList",void 0),Pb(ni(i),"dbClickPosition",Hp,ni(i)),i}return t=a,(n=[{key:"initEdgeData",value:function(i){this.offset=30,ti(Nr(a.prototype),"initEdgeData",this).call(this,i)}},{key:"getEdgeStyle",value:function(){var i=this.graphModel.theme.polyline;return Up(Up({},ti(Nr(a.prototype),"getEdgeStyle",this).call(this)),Dt(i))}},{key:"getTextPosition",value:function(){var i,u=(i=this.text)===null||i===void 0?void 0:i.value;if(this.dbClickPosition&&!u){var f=this.dbClickPosition;return{x:f.x,y:f.y}}var d=Jr(this.points),m=jb(Bb(d),2),O=m[0],S=m[1];return{x:(O.x+S.x)/2,y:(O.y+S.y)/2}}},{key:"getAfterAnchor",value:function(i,u,f){var d,m;return f.forEach(function(O){var S;i===At.HORIZONTAL?S=Math.abs(u.y-O.y):i===At.VERTICAL&&(S=Math.abs(u.x-O.x)),(!m||m>S)&&(m=S,d=O)}),d}},{key:"getCrossPoint",value:function(i,u,f){var d;return i===At.HORIZONTAL?d={x:f.x,y:u.y}:i===At.VERTICAL&&(d={x:u.x,y:f.y}),d}},{key:"removeCrossPoints",value:function(i,u,f){var d=f.map(function(re){return re});if(i===1){var m=d[i],O=d[u],S=d[i-1];if(td(S,m,this.sourceNode)){if(nd(m,O,this.sourceNode)){var T=rd(m,O,this.sourceNode);T&&(d[i]=T,d.splice(i-1,1),i--,u--)}}else this.sourceNode.anchors.forEach(function(re){(re.x===S.x&&re.x===m.x||re.y===S.y&&re.y===m.y)&&Kn(re.x,re.y,m.x,m.y)<Kn(S.x,S.y,m.x,m.y)&&(d[i-1]=re)})}if(u===f.length-2){var C=d[i],G=d[u],W=d[u+1];if(td(G,W,this.targetNode)){if(nd(C,G,this.targetNode)){var ne=rd(C,G,this.targetNode);ne&&(d[u]=ne,d.splice(u+1,1))}}else this.targetNode.anchors.forEach(function(re){(re.x===W.x&&re.x===G.x||re.y===W.y&&re.y===G.y)&&Kn(re.x,re.y,G.x,G.y)<Kn(W.x,W.y,G.x,G.y)&&(d[u+1]=re)})}return d}},{key:"getDraggingPoints",value:function(i,u,f,d,m){var O=m.map(function(C){return C}),S=this.getAfterAnchor(i,f,d),T=this.getCrossPoint(i,f,S);return u==="start"?(O.unshift(T),O.unshift(S)):(O.push(T),O.push(S)),O}},{key:"updateCrossPoints",value:function(i){var u=i.map(function(Oe){return Oe}),f=i[0],d=i[1],m=i[u.length-2],O=i[u.length-1],S=this.sourceNode,T=this.targetNode,C=S.modelType,G=T.modelType,W=ya(f,d),ne=u[0];switch(C){case dt.RECT_NODE:S.radius!==0&&(Dp(f,S)||(ne=Mp(f,W,S)));break;case dt.CIRCLE_NODE:ne=us(f,W,S);break;case dt.ELLIPSE_NODE:ne=Np(f,W,S);break;case dt.DIAMOND_NODE:case dt.POLYGON_NODE:ne=Cp(f,W,S)}u[0]=ne;var re=ya(m,O),de=u[u.length-1];switch(G){case dt.RECT_NODE:T.radius!==0&&(Dp(O,T)||(de=Mp(O,re,T)));break;case dt.CIRCLE_NODE:de=us(O,re,T);break;case dt.ELLIPSE_NODE:de=Np(O,re,T);break;case dt.DIAMOND_NODE:case dt.POLYGON_NODE:de=Cp(O,re,T)}return u[u.length-1]=de,u}},{key:"getData",value:function(){var i=ti(Nr(a.prototype),"getData",this).call(this),u=this.pointsList.map(function(f){return{x:f.x,y:f.y}});return Object.assign({},i,{pointsList:u})}},{key:"initPoints",value:function(){this.pointsList.length>0?this.points=this.pointsList.map(function(i){return"".concat(i.x,",").concat(i.y)}).join(" "):this.updatePoints()}},{key:"updatePoints",value:function(){var i=ed({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=i,this.points=i.map(function(u){return"".concat(u.x,",").concat(u.y)}).join(" ")}},{key:"updateStartPoint",value:function(i){this.startPoint=i,this.updatePoints()}},{key:"moveStartPoint",value:function(i,u){this.startPoint.x+=i,this.startPoint.y+=u,this.updatePoints()}},{key:"updateEndPoint",value:function(i){this.endPoint=i,this.updatePoints()}},{key:"moveEndPoint",value:function(i,u){this.endPoint.x+=i,this.endPoint.y+=u,this.updatePoints()}},{key:"dragAppendStart",value:function(){this.draggingPointList=this.pointsList.map(function(i){return i})}},{key:"dragAppendSimple",value:function(i,u){this.isDragging=!0;var f=i.start,d=i.end,m=i.startIndex,O=i.endIndex,S=i.direction,T=this.pointsList,C=T;return S===At.HORIZONTAL?(T[m]={x:f.x,y:f.y+u.y},T[O]={x:d.x,y:d.y+u.y},C=this.pointsList.map(function(G){return G})):S===At.VERTICAL&&(T[m]={x:f.x+u.x,y:f.y},T[O]={x:d.x+u.x,y:d.y},C=this.pointsList.map(function(G){return G})),this.updatePointsAfterDrag(C),this.draggingPointList=C,this.setText(Object.assign({},this.text,this.textPosition)),{start:Object.assign({},T[m]),end:Object.assign({},T[O]),startIndex:m,endIndex:O,direction:S}}},{key:"dragAppend",value:function(i,u){this.isDragging=!0;var f=i.start,d=i.end,m=i.startIndex,O=i.endIndex,S=i.direction,T=this.pointsList;if(S===At.HORIZONTAL){T[m]={x:f.x,y:f.y+u.y},T[O]={x:d.x,y:d.y+u.y};var C=this.pointsList.map(function(Ae){return Ae});if(m!==0&&O!==this.pointsList.length-1&&(C=this.removeCrossPoints(m,O,C)),m===0){var G={x:f.x,y:f.y+u.y};if(!Dr(G,this.sourceNode)){var W=this.sourceNode.anchors;C=this.getDraggingPoints(S,"start",G,W,C)}}if(O===this.pointsList.length-1){var ne={x:d.x,y:d.y+u.y};if(!Dr(ne,this.targetNode)){var re=this.targetNode.anchors;C=this.getDraggingPoints(S,"end",ne,re,C)}}this.updatePointsAfterDrag(C),this.draggingPointList=C}else if(S===At.VERTICAL){T[m]={x:f.x+u.x,y:f.y},T[O]={x:d.x+u.x,y:d.y};var de=this.pointsList.map(function(Ae){return Ae});if(m!==0&&O!==this.pointsList.length-1&&(de=this.removeCrossPoints(m,O,de)),m===0){var Oe={x:f.x+u.x,y:f.y};if(!Dr(Oe,this.sourceNode)){var Ce=this.sourceNode.anchors;de=this.getDraggingPoints(S,"start",Oe,Ce,de)}}if(O===this.pointsList.length-1){var Ee={x:d.x+u.x,y:d.y};if(!Dr(Ee,this.targetNode)){var Xe=this.targetNode.anchors;de=this.getDraggingPoints(S,"end",Ee,Xe,de)}}this.updatePointsAfterDrag(de),this.draggingPointList=de}return this.setText(Object.assign({},this.text,this.textPosition)),{start:Object.assign({},T[m]),end:Object.assign({},T[O]),startIndex:m,endIndex:O,direction:S}}},{key:"dragAppendEnd",value:function(){if(this.draggingPointList){var i=Qp(Jr(this.points));this.pointsList=i.map(function(d){return d}),this.draggingPointList=[];var u=i[0];this.startPoint=Object.assign({},u);var f=i[i.length-1];this.endPoint=Object.assign({},f)}this.isDragging=!1}},{key:"updatePointsAfterDrag",value:function(i){var u=this.updateCrossPoints(i);this.points=u.map(function(f){return"".concat(f.x,",").concat(f.y)}).join(" ")}},{key:"getAdjustStart",value:function(){return this.pointsList[0]||this.startPoint}},{key:"getAdjustEnd",value:function(){var i=this.pointsList;return i[i.length-1]||this.endPoint}},{key:"updateAfterAdjustStartAndEnd",value:function(i){var u=i.startPoint,f=i.endPoint,d=i.sourceNode,m=i.targetNode,O=ed({x:u.x,y:u.y},{x:f.x,y:f.y},d,m,this.offset||0);this.pointsList=O,this.initPoints()}}])&&Tb(t.prototype,n),a}(fs),Hp=sn(st.prototype,"dbClickPosition",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),sn(st.prototype,"initPoints",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"initPoints"),st.prototype),sn(st.prototype,"updatePoints",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"updatePoints"),st.prototype),sn(st.prototype,"updateStartPoint",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"updateStartPoint"),st.prototype),sn(st.prototype,"moveStartPoint",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"moveStartPoint"),st.prototype),sn(st.prototype,"updateEndPoint",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"updateEndPoint"),st.prototype),sn(st.prototype,"moveEndPoint",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"moveEndPoint"),st.prototype),sn(st.prototype,"dragAppendStart",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"dragAppendStart"),st.prototype),sn(st.prototype,"dragAppendSimple",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"dragAppendSimple"),st.prototype),sn(st.prototype,"dragAppend",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"dragAppend"),st.prototype),sn(st.prototype,"dragAppendEnd",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"dragAppendEnd"),st.prototype),sn(st.prototype,"updatePointsAfterDrag",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"updatePointsAfterDrag"),st.prototype),sn(st.prototype,"getAdjustStart",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"getAdjustStart"),st.prototype),sn(st.prototype,"getAdjustEnd",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"getAdjustEnd"),st.prototype),sn(st.prototype,"updateAfterAdjustStartAndEnd",[c.k],Object.getOwnPropertyDescriptor(st.prototype,"updateAfterAdjustStartAndEnd"),st.prototype),st),ri=function(e){var t=e.start,n=e.end,r=e.offset,a=e.verticalLength,i=e.type,u={leftX:0,leftY:0,rightX:0,rightY:0},f=Math.atan((n.y-t.y)/(n.x-t.x)),d=Math.atan(r/a),m=Math.sqrt(a*a+r*r);return i==="start"?n.x>=t.x?(u.leftX=t.x+m*Math.sin(f+d),u.leftY=t.y-m*Math.cos(f+d),u.rightX=t.x-m*Math.sin(f-d),u.rightY=t.y+m*Math.cos(f-d)):(u.leftX=t.x-m*Math.sin(f+d),u.leftY=t.y+m*Math.cos(f+d),u.rightX=t.x+m*Math.sin(f-d),u.rightY=t.y-m*Math.cos(f-d)):i==="end"&&(n.x>=t.x?(u.leftX=n.x+m*Math.sin(f-d),u.leftY=n.y-m*Math.cos(f-d),u.rightX=n.x-m*Math.sin(f+d),u.rightY=n.y+m*Math.cos(f+d)):(u.leftX=n.x-m*Math.sin(f-d),u.leftY=n.y+m*Math.cos(f-d),u.rightX=n.x+m*Math.sin(f+d),u.rightY=n.y-m*Math.cos(f+d))),u},Nb={x:1,y:0,z:0};function Yp(e){var t=Math.hypot(e.x,e.y);return{x:e.x/t,y:e.y/t,z:0}}function Cb(e){return r=function(i,u){return i.x*u.y-i.y*u.x}(t=Nb,n=e),a=Math.acos(function(i,u){var f=[i.x,i.y,i.z];return[u.x,u.y,u.z].reduce(function(d,m,O){return d+m*f[O]})}(Yp(t),Yp(n))),r>=0?a:-a;var t,n,r,a}function Wp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ca(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Wp(Object(n),!0).forEach(function(r){Rb(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Rb(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ib(e){return function(t){if(Array.isArray(t))return Os(t)}(e)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||$p(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function _s(e){return _s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_s(e)}function la(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(i=a.next()).done)&&(f.push(i.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||$p(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function $p(e,t){if(e){if(typeof e=="string")return Os(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Os(e,t):void 0}}function Os(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ws=function(e){var t=[],n={};return e.forEach(function(r){var a="".concat(r.x,"-").concat(r.y);r.id=a,n[a]=r}),Object.keys(n).forEach(function(r){t.push(n[r])}),t},fa=function(e,t){return e.width===0&&e.height===0?e:{centerX:e.centerX,centerY:e.centerY,minX:e.minX-t,minY:e.minY-t,maxX:e.maxX+t,maxY:e.maxY+t,height:e.height+2*t,width:e.width+2*t}},pa=function(e,t){var n=function(r,a){var i=Math.abs(r.x-a.centerX),u=Math.abs(r.y-a.centerY);return i/a.width>u/a.height?At.HORIZONTAL:At.VERTICAL}(t,e);return n===At.HORIZONTAL?{x:t.x>e.centerX?e.maxX:e.minX,y:t.y}:{x:t.x,y:t.y>e.centerY?e.maxY:e.minY}},Kp=function(e,t){var n=Math.min(e.minX,t.minX),r=Math.min(e.minY,t.minY),a=Math.max(e.maxX,t.maxX),i=Math.max(e.maxY,t.maxY);return{centerX:(n+a)/2,centerY:(r+i)/2,minX:n,minY:r,maxX:a,maxY:i,height:i-r,width:a-n}},oi=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=[],r=[];e.forEach(function(O){n.push(O.x),r.push(O.y)});var a=Math.min.apply(Math,n),i=Math.max.apply(Math,n),u=Math.min.apply(Math,r),f=Math.max.apply(Math,r),d=i-a,m=f-u;return t&&(d+=t,m+=t),{centerX:(a+i)/2,centerY:(u+f)/2,maxX:i,maxY:f,minX:a,minY:u,x:(a+i)/2,y:(u+f)/2,height:m,width:d}},da=function(e){var t=e.minX,n=e.minY,r=e.maxX,a=e.maxY;return[{x:t,y:n},{x:r,y:n},{x:r,y:a},{x:t,y:a}]},ha=function(e,t){var n=e.x,r=e.y;return n<t.minX||n>t.maxX||r<t.minY||r>t.maxY},xs=function(e,t){return Math.abs(e.x-t.x)+Math.abs(e.y-t.y)},qp=function(e,t,n,r,a){return xs(e,t)+xs(e,n)+function(i,u){var f=0;return u.forEach(function(d){d&&(i.x===d.x&&(f+=-2),i.y===d.y&&(f+=-2))}),f}(e,[t,n,r,a])},Lb=function e(t,n,r,a,i){i||(i=0),t.unshift(n[a]),r[a]&&r[a]!==a&&i<=100&&e(t,n,r,r[a],i+1)},ii=function(e,t,n,r){var a=t.x-e.x,i=t.y-e.y,u=r.x-n.x,f=r.y-n.y,d=(-i*(e.x-n.x)+a*(e.y-n.y))/(-u*i+a*f),m=(u*(e.y-n.y)-f*(e.x-n.x))/(-u*i+a*f);return d>=0&&d<=1&&m>=0&&m<=1},Zp=function(e,t,n){if(n.width===0&&n.height===0)return!1;var r=la(da(n),4),a=r[0],i=r[1],u=r[2],f=r[3];return ii(e,t,a,i)||ii(e,t,a,f)||ii(e,t,i,u)||ii(e,t,u,f)},zb=function(e,t,n,r,a,i,u){var f=[],d=[t],m={},O={},S={};O[t.id]=0,S[t.id]=qp(t,n,t);var T={};e.forEach(function(W){T[W.id]=W});for(var C=function(){var W,ne,re,de=void 0,Oe=1/0;if(d.forEach(function(Ee){S[Ee.id]<Oe&&(Oe=S[Ee.id],de=Ee)}),de===n){var Ce=[];return Lb(Ce,T,m,n.id),{v:Ce}}ne=de,(re=(W=d).indexOf(ne))>-1&&W.splice(re,1),f.push(de),function(Ee,Xe,Ae,Pe){var Qe=[];return Ee.forEach(function(yt){yt!==Xe&&(yt.x!==Xe.x&&yt.y!==Xe.y||Zp(yt,Xe,Ae)||Zp(yt,Xe,Pe)||Qe.push(yt))}),ws(Qe)}(e,de,r,a).forEach(function(Ee){if(f.indexOf(Ee)===-1){d.indexOf(Ee)===-1&&d.push(Ee);var Xe=S[de.id]+xs(de,Ee);O[Ee.id]&&Xe>=O[Ee.id]||(m[Ee.id]=de.id,O[Ee.id]=Xe,S[Ee.id]=O[Ee.id]+qp(Ee,n,t,i,u))}})};d.length;){var G=C();if(_s(G)==="object")return G.v}return[t,n]},Jp=function(e){return xn(e)},Qp=function(e){for(var t=1;t<e.length-1;){var n=e[t-1],r=e[t],a=e[t+1];n.x===r.x&&r.x===a.x||n.y===r.y&&r.y===a.y?e.splice(t,1):t++}return e},ed=function(e,t,n,r,a){var i,u,f=Jp(n),d=Jp(r),m=fa(f,a),O=fa(d,a),S=pa(m,e),T=pa(O,t);if(i=m,u=O,2*Math.abs(i.centerX-u.centerX)<i.width+u.width&&2*Math.abs(i.centerY-u.centerY)<i.height+u.height){var C=Fb(e,t,S,T);return[e,S].concat(Ib(C),[T,t])}var G=oi([S,T]),W=Kp(m,G),ne=Kp(O,G),re=[];re=(re=re.concat(da(W))).concat(da(ne));var de={x:(e.x+t.x)/2,y:(e.y+t.y)/2};[G,W,ne].forEach(function(Ce){re=re.concat(function(Ee,Xe){return function(Ae,Pe){return Pe<Ae.minX||Pe>Ae.maxX?[]:[{x:Pe,y:Ae.minY},{x:Pe,y:Ae.maxY}]}(Ee,Xe.x).concat(function(Ae,Pe){return Pe<Ae.minY||Pe>Ae.maxY?[]:[{x:Ae.minX,y:Pe},{x:Ae.maxX,y:Pe}]}(Ee,Xe.y))}(Ce,de).filter(function(Ee){return ha(Ee,m)&&ha(Ee,O)}))}),[{x:S.x,y:T.y},{x:T.x,y:S.y}].forEach(function(Ce){ha(Ce,m)&&ha(Ce,O)&&re.push(Ce)}),re.unshift(S),re.push(T),re=ws(re);var Oe=zb(re,S,T,f,d,e,t);return Oe.unshift(e),Oe.push(t),Oe.length>2&&(Oe=Qp(Oe)),ws(Oe)},Bb=function(e){var t;if(e.length===1)t=[e[0],e[0]];else if(e.length>=2){for(var n=e[0],r=e[1],a=Kn(n.x,n.y,r.x,r.y),i=1;i<e.length-1;i++){var u=e[i],f=e[i+1],d=Kn(u.x,u.y,f.x,f.y);d>a&&(a=d,n=u,r=f)}t=[n,r]}return t},td=function(e,t,n){var r=Dr(e,n),a=Dr(t,n);return r&&a},nd=function(e,t,n){var r=Dr(e,n),a=Dr(t,n);return!(r&&a)&&(r||a)},rd=function(e,t,n){for(var r,a,i=xn(n),u=da(i),f=0;f<u.length;f++)ii(e,t,u[f],u[(f+1)%u.length])&&(a=[u[f],u[(f+1)%u.length]]);return a&&(r=function(d,m,O,S){var T=(m.y-d.y)*(S.x-O.x)-(d.x-m.x)*(O.y-S.y);if(T===0)return!1;var C=((m.x-d.x)*(S.x-O.x)*(O.y-d.y)+(m.y-d.y)*(S.x-O.x)*d.x-(S.y-O.y)*(m.x-d.x)*O.x)/T,G=-((m.y-d.y)*(S.y-O.y)*(O.x-d.x)+(m.x-d.x)*(S.y-O.y)*d.y-(S.x-O.x)*(m.y-d.y)*O.y)/T;return(C-d.x)*(C-m.x)<=0&&(G-d.y)*(G-m.y)<=0&&(C-O.x)*(C-S.x)<=0&&(G-O.y)*(G-S.y)<=0&&{x:C,y:G}}(e,t,a[0],a[1])),r},ya=function(e,t){var n;return e.x===t.x?n=At.VERTICAL:e.y===t.y&&(n=At.HORIZONTAL),n},Jr=function(e){var t=e.split(" "),n=[];return t&&t.forEach(function(r){var a=la(r.split(","),2),i=a[0],u=a[1];n.push({x:Number(i),y:Number(u)})}),n},Fb=function(e,t,n,r){var a=[];if(ya(e,n)===ya(t,r))e.y===n.y?(a.push({x:n.x,y:(n.y+r.y)/2}),a.push({x:r.x,y:(n.y+r.y)/2})):(a.push({x:(n.x+r.x)/2,y:n.y}),a.push({x:(n.x+r.x)/2,y:r.y}));else{var i={x:n.x,y:r.y},u=Qo(i,e,n),f=Qo(i,t,r);if(u||f)i={x:r.x,y:n.y};else{var d=od(i,e,n),m=od(i,t,r);d&&m&&(i={x:r.x,y:n.y})}a.push(i)}return a},od=function(e,t,n){return e.x===t.x&&e.x===n.x||e.y===t.y&&e.y===n.y},id=function(e){if(!e)return 0;for(var t=0,n=0;n<e.length;n++){var r=e.charCodeAt(n);e.match(/[A-Z]/)?t+=1.5:t+=r>=1&&r<=126||r>=65376&&r<=65439?1:2}return t},ad=function(e){var t=e.start,n=e.end,r=e.sourceNode,a=e.targetNode,i=e.offset,u=xn(r),f=xn(a),d=fa(u,i),m=fa(f,i);return{sNext:pa(d,t),ePre:pa(m,n)}},ga=function(e){var t=e.replace(/M/g,"").replace(/C/g,",").split(",");return[va(t[0]),va(t[1]),va(t[2]),va(t[3])]},va=function(e){var t=la(e.replace(/(^\s*)/g,"").split(" "),2);return{x:+t[0],y:+t[1]}},ud=function(e){var t=ga(e),n=la(t,4),r=function(a,i,u,f){return function(d){if(d<0||d>1)throw new RangeError('The value range of parameter "t" is [0,1]');return{x:a.x*Math.pow(1-d,3)+3*i.x*d*Math.pow(1-d,2)+3*u.x*Math.pow(d,2)*(1-d)+f.x*Math.pow(d,3),y:a.y*Math.pow(1-d,3)+3*i.y*d*Math.pow(1-d,2)+3*u.y*Math.pow(d,2)*(1-d)+f.y*Math.pow(d,3)}}(.95)}(n[0],n[1],n[2],n[3]);return[r,t[3]]},sd=function(e,t){for(var n,r=e.x,a=e.y,i=Jr(t),u=Number.MAX_SAFE_INTEGER,f=[],d=0;d<i.length;d++)f.push({start:i[d],end:i[(d+1)%i.length]});if(f.forEach(function(T){var C=T.start,G=T.end;if(C.x===G.x){var W={x:C.x,y:a};if(Qo(W,C,G)){var ne=Math.abs(C.x-r);ne<u&&(u=ne,n=W)}}else if(C.y===G.y){var re={x:r,y:C.y};if(Qo(re,C,G)){var de=Math.abs(C.y-a);de<u&&(u=de,n=re)}}}),!n){var m=f[0],O=m.start,S=m.end;n={x:O.x+(S.x-O.x)/2,y:O.y+(S.y-O.y)/2}}return n},Vb=function(e){return Zo(e,["id","type","sourceNodeId","sourceAnchorId","targetNodeId","targetAnchorId","pointsList","startPoint","endPoint","properties"])},cd=function(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))};o(204);var bo=function(){};function Hb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Gt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var qn=window.document;function Xb(e){var t=e.onDragStart,n=t===void 0?bo:t,r=e.onDragging,a=r===void 0?bo:r,i=e.onDragEnd,u=i===void 0?bo:i,f=e.step,d=f===void 0?1:f,m=e.isStopPropagation,O=m===void 0||m,S=!1,T=!1,C=0,G=0,W=0,ne=0;function re(Oe){if(O&&Oe.stopPropagation(),T&&(S=!0,W+=Oe.clientX-C,ne+=Oe.clientY-G,C=Oe.clientX,G=Oe.clientY,Math.abs(W)>d||Math.abs(ne)>d)){var Ce=W%d,Ee=ne%d,Xe=W-Ce,Ae=ne-Ee;W=Ce,ne=Ee,a({deltaX:Xe,deltaY:Ae,event:Oe})}}function de(Oe){if(O&&Oe.stopPropagation(),T=!1,qn.removeEventListener("mousemove",re,!1),qn.removeEventListener("mouseup",de,!1),S)return S=!1,u({event:Oe})}return function(Oe){if(Oe.button===0)return O&&Oe.stopPropagation(),T=!0,C=Oe.clientX,G=Oe.clientY,qn.addEventListener("mousemove",re,!1),qn.addEventListener("mouseup",de,!1),n({event:Oe})}}var le,ld,fd,pd,dd,hd,yd,gd,vd,bd,md,_d,Od,dr=function(){function e(r){var a=this,i=r.onDragStart,u=i===void 0?bo:i,f=r.onDragging,d=f===void 0?bo:f,m=r.onDragEnd,O=m===void 0?bo:m,S=r.eventType,T=S===void 0?"":S,C=r.eventCenter,G=C===void 0?null:C,W=r.step,ne=W===void 0?1:W,re=r.isStopPropagation,de=re===void 0||re,Oe=r.model,Ce=Oe===void 0?null:Oe,Ee=r.data,Xe=Ee===void 0?null:Ee;(function(Ae,Pe){if(!(Ae instanceof Pe))throw new TypeError("Cannot call a class as a function")})(this,e),Gt(this,"onDragStart",void 0),Gt(this,"onDragging",void 0),Gt(this,"onDragEnd",void 0),Gt(this,"step",void 0),Gt(this,"isStopPropagation",void 0),Gt(this,"isDragging",!1),Gt(this,"isStartDragging",!1),Gt(this,"startX",0),Gt(this,"startY",0),Gt(this,"sumDeltaX",0),Gt(this,"sumDeltaY",0),Gt(this,"eventType",void 0),Gt(this,"eventCenter",void 0),Gt(this,"model",void 0),Gt(this,"data",void 0),Gt(this,"startTime",void 0),Gt(this,"handleMouseDown",function(Ae){var Pe,Qe;if(Ae.button===0){a.isStopPropagation&&Ae.stopPropagation(),a.isStartDragging=!0,a.startX=Ae.clientX,a.startY=Ae.clientY,qn.addEventListener("mousemove",a.handleMouseMove,!1),qn.addEventListener("mouseup",a.handleMouseUp,!1);var yt=(Pe=a.model)===null||Pe===void 0?void 0:Pe.getData();(Qe=a.eventCenter)===null||Qe===void 0||Qe.emit(tt["".concat(a.eventType,"_MOUSEDOWN")],{e:Ae,data:a.data||yt}),a.startTime=new Date().getTime()}}),Gt(this,"handleMouseMove",function(Ae){if(a.isStopPropagation&&Ae.stopPropagation(),a.isStartDragging&&(a.sumDeltaX+=Ae.clientX-a.startX,a.sumDeltaY+=Ae.clientY-a.startY,a.startX=Ae.clientX,a.startY=Ae.clientY,a.step<=1||Math.abs(a.sumDeltaX)>a.step||Math.abs(a.sumDeltaY)>a.step)){var Pe,Qe=a.sumDeltaX%a.step,yt=a.sumDeltaY%a.step,Et=a.sumDeltaX-Qe,mt=a.sumDeltaY-yt;a.sumDeltaX=Qe,a.sumDeltaY=yt;var jt,Ft=(Pe=a.model)===null||Pe===void 0?void 0:Pe.getData();a.isDragging||((jt=a.eventCenter)===null||jt===void 0||jt.emit(tt["".concat(a.eventType,"_DRAGSTART")],{e:Ae,data:a.data||Ft}),a.onDragStart({event:Ae})),a.isDragging=!0,Promise.resolve().then(function(){var Wt,jn;a.onDragging({deltaX:Et,deltaY:mt,event:Ae}),(Wt=a.eventCenter)===null||Wt===void 0||Wt.emit(tt["".concat(a.eventType,"_MOUSEMOVE")],{e:Ae,data:a.data||Ft}),(jn=a.eventCenter)===null||jn===void 0||jn.emit(tt["".concat(a.eventType,"_DRAG")],{e:Ae,data:a.data||Ft})})}}),Gt(this,"handleMouseUp",function(Ae){a.isStartDragging=!1,a.isStopPropagation&&Ae.stopPropagation(),Promise.resolve().then(function(){var Pe,Qe,yt;qn.removeEventListener("mousemove",a.handleMouseMove,!1),qn.removeEventListener("mouseup",a.handleMouseUp,!1);var Et=(Pe=a.model)===null||Pe===void 0?void 0:Pe.getData();(Qe=a.eventCenter)===null||Qe===void 0||Qe.emit(tt["".concat(a.eventType,"_MOUSEUP")],{e:Ae,data:a.data||Et}),a.isDragging&&(a.isDragging=!1,a.onDragEnd({event:Ae}),(yt=a.eventCenter)===null||yt===void 0||yt.emit(tt["".concat(a.eventType,"_DROP")],{e:Ae,data:a.data||Et}))})}),Gt(this,"cancelDrag",function(){qn.removeEventListener("mousemove",a.handleMouseMove,!1),qn.removeEventListener("mouseup",a.handleMouseUp,!1),a.onDragEnd({event:null}),a.isDragging=!1}),this.onDragStart=u,this.onDragging=d,this.onDragEnd=O,this.step=ne,this.isStopPropagation=de,this.eventType=T,this.eventCenter=G,this.model=Ce,this.data=Xe}var t,n;return t=e,(n=[{key:"setStep",value:function(r){this.step=r}}])&&Hb(t.prototype,n),e}(),wd={node:!1,edge:!1},Gb={node:!0,edge:!0};function xd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ba(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xd(Object(n),!0).forEach(function(r){Zn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ai(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(i=a.next()).done)&&(f.push(i.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||Ed(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function mo(e){return function(t){if(Array.isArray(t))return Es(t)}(e)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||Ed(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Ed(e,t){if(e){if(typeof e=="string")return Es(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Es(e,t):void 0}}function Es(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ma(e){return ma=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ma(e)}function Nn(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function Ub(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Zn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ye(e,t,n,r,a){var i={};return Object.keys(r).forEach(function(u){i[u]=r[u]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce(function(u,f){return f(e,t,u)||u},i),a&&i.initializer!==void 0&&(i.value=i.initializer?i.initializer.call(a):void 0,i.initializer=void 0),i.initializer===void 0&&(Object.defineProperty(e,t,i),i=null),i}var Sd,jd=200,Pd=(le=function(){function e(r){(function(G,W){if(!(G instanceof W))throw new TypeError("Cannot call a class as a function")})(this,e),Zn(this,"rootEl",void 0),Nn(this,"width",ld,this),Nn(this,"height",fd,this),Zn(this,"theme",void 0),Zn(this,"eventCenter",void 0),Zn(this,"modelMap",new Map),Zn(this,"topElement",void 0),Zn(this,"animation",void 0),Zn(this,"idGenerator",void 0),Zn(this,"edgeGenerator",void 0),Zn(this,"nodeMoveRules",[]),Nn(this,"edgeType",pd,this),Nn(this,"nodes",dd,this),Nn(this,"edges",hd,this),Nn(this,"overlapMode",yd,this),Nn(this,"background",gd,this),Nn(this,"transformModel",vd,this),Nn(this,"editConfigModel",bd,this),Nn(this,"gridSize",md,this),Nn(this,"partial",_d,this),Nn(this,"fakerNode",Od,this);var a,i,u,f=r.container,d=r.background,m=d===void 0?{}:d,O=r.grid,S=r.idGenerator,T=r.edgeGenerator,C=r.animation;this.background=m,ma(O)==="object"&&(this.gridSize=O.size),this.rootEl=f,this.editConfigModel=new If(r),this.eventCenter=new sb,this.transformModel=new Pv(this.eventCenter),this.theme=ip(r.style),this.edgeType=r.edgeType||"polyline",this.width=r.width,this.height=r.height,this.animation=(a=C)&&typeof a!="boolean"?op(Dt(wd),a):Dt(a===!0?Gb:wd),this.partial=r.partial,this.overlapMode=r.overlapMode||0,this.idGenerator=S,this.edgeGenerator=(i=this,typeof(u=T)!="function"?function(G,W,ne){return Object.assign({type:i.edgeType},ne)}:function(G,W,ne){var re=u(G,W,ne);return re?typeof re=="string"?Object.assign({},ne,{type:re}):Object.assign({type:re},ne):{type:i.edgeType}}),this.width=r.width||this.rootEl.getBoundingClientRect().width,this.height=r.height||this.rootEl.getBoundingClientRect().height,this.flowId=Mr()}var t,n;return t=e,n=[{key:"nodesMap",get:function(){return this.nodes.reduce(function(r,a,i){return r[a.id]={index:i,model:a},r},{})}},{key:"edgesMap",get:function(){return this.edges.reduce(function(r,a,i){return r[a.id]={index:i,model:a},r},{})}},{key:"modelsMap",get:function(){return[].concat(mo(this.nodes),mo(this.edges)).reduce(function(r,a){return r[a.id]=a,r},{})}},{key:"sortElements",get:function(){var r=[];this.nodes.forEach(function(m){return r.push(m)}),this.edges.forEach(function(m){return r.push(m)}),r=r.sort(function(m,O){return m.zIndex-O.zIndex});for(var a=[],i=[-200,-200],u=[this.width+jd,this.height+jd],f=0;f<r.length;f++){var d=r[f];d.visible&&(!this.partial||d.isSelected||this.isElementInArea(d,i,u,!1,!1))&&a.push(d)}return a}},{key:"textEditElement",get:function(){var r=this.nodes.find(function(i){return i.state===Ot.TEXT_EDIT}),a=this.edges.find(function(i){return i.state===Ot.TEXT_EDIT});return r||a}},{key:"selectElements",get:function(){var r=new Map;return this.nodes.forEach(function(a){a.isSelected&&r.set(a.id,a)}),this.edges.forEach(function(a){a.isSelected&&r.set(a.id,a)}),r}},{key:"selectNodes",get:function(){var r=[];return this.nodes.forEach(function(a){a.isSelected&&r.push(a)}),r}},{key:"getAreaElement",value:function(r,a){var i=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],u=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],f=arguments.length>4&&arguments[4]!==void 0&&arguments[4],d=[],m=[];this.nodes.forEach(function(T){return m.push(T)}),this.edges.forEach(function(T){return m.push(T)});for(var O=0;O<m.length;O++){var S=m[O];f&&!S.visible||!this.isElementInArea(S,r,a,i,u)||d.push(S)}return d}},{key:"getModel",value:function(r){return this.modelMap.get(r)}},{key:"getNodeModelById",value:function(r){var a;return this.fakerNode&&r===this.fakerNode.id?this.fakerNode:(a=this.nodesMap[r])===null||a===void 0?void 0:a.model}},{key:"getPointByClient",value:function(r){var a=r.x,i=r.y,u=this.rootEl.getBoundingClientRect(),f={x:a-u.left,y:i-u.top},d=ai(this.transformModel.HtmlPointToCanvasPoint([f.x,f.y]),2);return{domOverlayPosition:f,canvasOverlayPosition:{x:d[0],y:d[1]}}}},{key:"isElementInArea",value:function(r,a,i){var u=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],f=!(arguments.length>4&&arguments[4]!==void 0)||arguments[4];if(r.BaseType===Ht.NODE){for(var d=xn(r=r),m=d.minX,O=d.minY,S=d.maxX,T=d.maxY,C=[{x:m,y:O},{x:S,y:O},{x:S,y:T},{x:m,y:T}],G=f,W=0;W<C.length;W++){var ne=C[W],re=ne.x,de=ne.y,Oe=this.transformModel.CanvasPointToHtmlPoint([re,de]),Ce=ai(Oe,2);if(re=Ce[0],de=Ce[1],ns([re,de],a,i)!==f){G=!f;break}}return G}if(r.BaseType===Ht.EDGE){var Ee=r=r,Xe=Ee.startPoint,Ae=Ee.endPoint,Pe=this.transformModel.CanvasPointToHtmlPoint([Xe.x,Xe.y]),Qe=this.transformModel.CanvasPointToHtmlPoint([Ae.x,Ae.y]),yt=ns(Pe,a,i),Et=ns(Qe,a,i);return u?yt&&Et:yt||Et}return!1}},{key:"graphDataToModel",value:function(r){var a=this;this.width&&this.height||this.resize(),this.nodes=oa(r.nodes,function(i){var u=a.getModel(i.type);if(!u)throw new Error("找不到".concat(i.type,"对应的节点。"));var f=i.x,d=i.y;return f&&d&&(i.x=Ar(f,a.gridSize),i.y=Ar(d,a.gridSize),ma(i.text)==="object"&&(i.text.x-=ap(f,a.gridSize),i.text.y-=ap(d,a.gridSize))),new u(i,a)}),this.edges=oa(r.edges,function(i){var u=a.getModel(i.type);if(!u)throw new Error("找不到".concat(i.type,"对应的边。"));return new u(i,a)})}},{key:"modelToGraphData",value:function(){var r=[];this.edges.forEach(function(i){var u=i.getData();u&&!i.virtual&&r.push(u)});var a=[];return this.nodes.forEach(function(i){var u=i.getData();u&&!i.virtual&&a.push(u)}),{nodes:a,edges:r}}},{key:"modelToHistoryData",value:function(){for(var r=!1,a=[],i=0;i<this.nodes.length;i++){var u=this.nodes[i];if(u.isDragging){r=!0;break}a.push(u.getHistoryData())}if(r)return!1;for(var f=!1,d=[],m=0;m<this.edges.length;m++){var O=this.edges[m];if(O.isDragging){f=!0;break}d.push(O.getHistoryData())}return!f&&{nodes:a,edges:d}}},{key:"getEdgeModelById",value:function(r){var a;return(a=this.edgesMap[r])===null||a===void 0?void 0:a.model}},{key:"getElement",value:function(r){return this.modelsMap[r]}},{key:"getNodeEdges",value:function(r){for(var a=[],i=0;i<this.edges.length;i++){var u=this.edges[i],f=this.edges[i].sourceNodeId===r,d=this.edges[i].targetNodeId===r;(f||d)&&a.push(u)}return a}},{key:"getSelectElements",value:function(){var r=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],a=this.selectElements,i={nodes:[],edges:[]};return a.forEach(function(u){if(u.BaseType===Ht.NODE&&i.nodes.push(u.getData()),u.BaseType===Ht.EDGE){var f=u.getData(),d=a.get(f.sourceNodeId)&&a.get(f.targetNodeId);(r||d)&&i.edges.push(f)}}),i}},{key:"updateAttributes",value:function(r,a){this.getElement(r).updateAttributes(a)}},{key:"changeNodeId",value:function(r,a){return a||(a=Mr()),this.nodesMap[a]?"":this.nodesMap[r]?(this.edges.forEach(function(i){i.sourceNodeId===r&&(i.sourceNodeId=a),i.targetNodeId===r&&(i.targetNodeId=a)}),this.nodesMap[r].model.id=a,this.nodesMap[a]=this.nodesMap[r],a):""}},{key:"changeEdgeId",value:function(r,a){return a||(a=Mr()),this.edgesMap[a]?"":this.edgesMap[r]?(this.edges.forEach(function(i){i.id===r&&i.changeEdgeId(a)}),a):""}},{key:"setFakerNode",value:function(r){this.fakerNode=r}},{key:"removeFakerNode",value:function(){this.fakerNode=null}},{key:"setModel",value:function(r,a){return this.modelMap.set(r,a)}},{key:"toFront",value:function(r){var a,i,u,f=((a=this.nodesMap[r])===null||a===void 0?void 0:a.model)||((i=this.edgesMap[r])===null||i===void 0?void 0:i.model);f&&(this.overlapMode===wn.DEFAULT&&((u=this.topElement)===null||u===void 0||u.setZIndex(),f.setZIndex(9999),this.topElement=f),this.overlapMode===wn.INCREASE&&this.setElementZIndex(r,"top"))}},{key:"setElementZIndex",value:function(r,a){var i,u,f,d=((i=this.nodesMap[r])===null||i===void 0?void 0:i.model)||((u=this.edgesMap[r])===null||u===void 0?void 0:u.model);d&&(typeof a=="number"&&(f=a),a==="top"&&(f=cs()),a==="bottom"&&(f=--mb),d.setZIndex(f))}},{key:"deleteNode",value:function(r){var a=this.nodesMap[r].model.getData();this.deleteEdgeBySource(r),this.deleteEdgeByTarget(r),this.nodes.splice(this.nodesMap[r].index,1),this.eventCenter.emit(tt.NODE_DELETE,{data:a})}},{key:"addNode",value:function(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:tt.NODE_ADD,i=en(r);i.id&&this.nodesMap[r.id]&&delete i.id;var u=this.getModel(i.type);if(!u)throw new Error("找不到".concat(i.type,"对应的节点,请确认是否已注册此类型节点。"));i.x=Ar(i.x,this.gridSize),i.y=Ar(i.y,this.gridSize);var f=new u(i,this);this.nodes.push(f);var d=f.getData();return this.eventCenter.emit(a,{data:d}),f}},{key:"cloneNode",value:function(r){var a=this.getNodeModelById(r),i=a.getData();i.x+=30,i.y+=30,delete i.id,i.text&&(i.text.x+=30,i.text.y+=30);var u=this.addNode(i);return u.setSelected(!0),a.setSelected(!1),u.getData()}},{key:"moveNode",value:function(r,a,i){var u=arguments.length>3&&arguments[3]!==void 0&&arguments[3],f=this.nodesMap[r];if(f){var d=f.model,m=d.getMoveDistance(a,i,u),O=ai(m,2);a=O[0],i=O[1],this.moveEdge(r,a,i)}}},{key:"moveNode2Coordinate",value:function(r,a,i){var u=arguments.length>3&&arguments[3]!==void 0&&arguments[3],f=this.nodesMap[r];if(f){var d=f.model,m=d.x,O=d.y,S=a-m,T=i-O;this.moveNode(r,S,T,u)}}},{key:"editText",value:function(r){this.setElementStateById(r,Ot.TEXT_EDIT)}},{key:"addEdge",value:function(r){var a=en(r),i=a.type;i||(i=this.edgeType),a.id&&this.edgesMap[a.id]&&delete a.id;var u=this.getModel(i);if(!u)throw new Error("找不到".concat(i,"对应的边,请确认是否已注册此类型边。"));var f=new u(ba(ba({},a),{},{type:i}),this),d=f.getData();return this.edges.push(f),this.eventCenter.emit(tt.EDGE_ADD,{data:d}),f}},{key:"moveEdge",value:function(r,a,i){for(var u=0;u<this.edges.length;u++){var f,d=this.edges[u],m=d.textPosition,O=m.x,S=m.y,T=this.edges[u].sourceNodeId===r,C=this.edges[u].targetNodeId===r;if(T&&d.moveStartPoint(a,i),C&&d.moveEndPoint(a,i),T||C)if(d.customTextPosition===!0)d.resetTextPosition();else if(d.modelType===dt.POLYLINE_EDGE&&(f=d.text)!==null&&f!==void 0&&f.value){var G=d.text,W=sd(G,d.points);d.moveText(W.x-G.x,W.y-G.y)}else{var ne=d.textPosition,re=ne.x,de=ne.y;d.moveText(re-O,de-S)}}}},{key:"deleteEdgeBySourceAndTarget",value:function(r,a){for(var i=0;i<this.edges.length;i++)if(this.edges[i].sourceNodeId===r&&this.edges[i].targetNodeId===a){var u=this.edges[i].getData();this.edges.splice(i,1),i--,this.eventCenter.emit(tt.EDGE_DELETE,{data:u})}}},{key:"deleteEdgeById",value:function(r){if(this.edgesMap[r]){var a=this.edgesMap[r].index,i=this.edgesMap[r].model.getData();this.edges.splice(a,1),this.eventCenter.emit(tt.EDGE_DELETE,{data:i})}}},{key:"deleteEdgeBySource",value:function(r){for(var a=0;a<this.edges.length;a++)if(this.edges[a].sourceNodeId===r){var i=this.edges[a].getData();this.edges.splice(a,1),a--,this.eventCenter.emit(tt.EDGE_DELETE,{data:i})}}},{key:"deleteEdgeByTarget",value:function(r){for(var a=0;a<this.edges.length;a++)if(this.edges[a].targetNodeId===r){var i=this.edges[a].getData();this.edges.splice(a,1),a--,this.eventCenter.emit(tt.EDGE_DELETE,{data:i})}}},{key:"setElementStateById",value:function(r,a,i){this.nodes.forEach(function(u){u.id===r?u.setElementState(a,i):u.setElementState(Ot.DEFAULT)}),this.edges.forEach(function(u){u.id===r?u.setElementState(a,i):u.setElementState(Ot.DEFAULT)})}},{key:"updateText",value:function(r,a){this.nodes.forEach(function(i){i.id===r&&i.updateText(a)}),this.edges.forEach(function(i){i.id===r&&i.updateText(a)})}},{key:"selectNodeById",value:function(r){var a,i=arguments.length>1&&arguments[1]!==void 0&&arguments[1];i||this.clearSelectElements();var u=(a=this.nodesMap[r])===null||a===void 0?void 0:a.model;u==null||u.setSelected(!0)}},{key:"selectEdgeById",value:function(r){var a,i=arguments.length>1&&arguments[1]!==void 0&&arguments[1];i||this.clearSelectElements();var u=(a=this.edgesMap[r])===null||a===void 0?void 0:a.model;u==null||u.setSelected(!0)}},{key:"selectElementById",value:function(r){var a=arguments.length>1&&arguments[1]!==void 0&&arguments[1];a||this.clearSelectElements();var i=this.getElement(r);i==null||i.setSelected(!0)}},{key:"clearSelectElements",value:function(){var r;this.selectElements.forEach(function(a){a==null||a.setSelected(!1)}),this.selectElements.clear(),this.overlapMode===wn.DEFAULT&&((r=this.topElement)===null||r===void 0||r.setZIndex())}},{key:"moveNodes",value:function(r,a,i){for(var u=this,f=arguments.length>3&&arguments[3]!==void 0&&arguments[3],d=r.reduce(function(re,de){var Oe=u.nodesMap[de].model.getMoveDistance(a,i,f);return re[de]=Oe,re},{}),m=0;m<this.edges.length;m++){var O=this.edges[m],S=d[O.sourceNodeId],T=void 0,C=void 0;if(S){var G=ai(S,2);T=G[0],C=G[1],O.moveStartPoint(T,C)}var W=d[O.targetNodeId];if(W){var ne=ai(W,2);T=ne[0],C=ne[1],O.moveEndPoint(T,C)}(S||W)&&O.moveText(T,C)}}},{key:"addNodeMoveRules",value:function(r){this.nodeMoveRules.includes(r)||this.nodeMoveRules.push(r)}},{key:"setDefaultEdgeType",value:function(r){this.edgeType=r}},{key:"changeNodeType",value:function(r,a){var i=this.getNodeModelById(r);if(i){var u=i.getData();u.type=a;var f=this.getModel(a);if(!f)throw new Error("找不到".concat(a,"对应的节点,请确认是否已注册此类型节点。"));var d=new f(u,this);this.nodes.splice(this.nodesMap[r].index,1,d),this.getNodeEdges(r).forEach(function(m){if(m.sourceNodeId===r){var O=Rp(d,m.startPoint,d.width,d.height);m.updateStartPoint(O)}if(m.targetNodeId===r){var S=Rp(d,m.endPoint,d.width,d.height);m.updateEndPoint(S)}})}}},{key:"changeEdgeType",value:function(r,a){var i=this.getEdgeModelById(r);if(i&&i.type!==a){var u=i.getData();u.type=a;var f=this.getModel(a);if(!f)throw new Error("找不到".concat(a,"对应的节点,请确认是否已注册此类型节点。"));delete u.pointsList;var d=new f(u,this);this.edges.splice(this.edgesMap[r].index,1,d)}}},{key:"getNodeIncomingEdge",value:function(r){var a=[];return this.edges.forEach(function(i){i.targetNodeId===r&&a.push(i)}),a}},{key:"getNodeOutgoingEdge",value:function(r){var a=[];return this.edges.forEach(function(i){i.sourceNodeId===r&&a.push(i)}),a}},{key:"getNodeIncomingNode",value:function(r){var a=this,i=[];return this.edges.forEach(function(u){u.targetNodeId===r&&i.push(a.nodesMap[u.sourceNodeId].model)}),i}},{key:"getNodeOutgoingNode",value:function(r){var a=this,i=[];return this.edges.forEach(function(u){u.sourceNodeId===r&&i.push(a.nodesMap[u.targetNodeId].model)}),i}},{key:"setTheme",value:function(r){this.theme=ip(ba(ba({},this.theme),r))}},{key:"resize",value:function(r,a){this.width=r||this.rootEl.getBoundingClientRect().width,this.height=a||this.rootEl.getBoundingClientRect().height,!this.width||this.height}},{key:"clearData",value:function(){this.nodes=[],this.edges=[]}},{key:"getVirtualRectSize",value:function(){var r=this.nodes,a=[],i=[];r.forEach(function(S){var T=S.x,C=S.y,G=S.width,W=S.height,ne=S.getNodeStyle().strokeWidth,re=ne===void 0?0:ne;a=a.concat([T+G/2+re,T-G/2-re]),i=i.concat([C+W/2+re,C-W/2-re])});var u=Math.min.apply(Math,mo(a)),f=Math.max.apply(Math,mo(a)),d=Math.min.apply(Math,mo(i)),m=f-u||0,O=Math.max.apply(Math,mo(i))-d||0;return{virtualRectWidth:m,virtualRectHeight:O,virtualRectCenterPositionX:u+m/2,virtualRectCenterPositionY:d+O/2}}},{key:"translateCenter",value:function(){var r=this.nodes,a=this.width,i=this.height,u=this.rootEl,f=this.transformModel;if(r.length){var d=a||u.clientWidth,m=i||u.clientHeight,O=this.getVirtualRectSize(),S=O.virtualRectCenterPositionX,T=O.virtualRectCenterPositionY;f.focusOn(S,T,d,m)}}},{key:"fitView",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:20,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:20,i=this.nodes,u=this.width,f=this.height,d=this.rootEl,m=this.transformModel;if(i.length){var O=u||d.clientWidth,S=f||d.clientHeight,T=this.getVirtualRectSize(),C=T.virtualRectWidth,G=T.virtualRectHeight,W=T.virtualRectCenterPositionX,ne=T.virtualRectCenterPositionY,re=(C+a)/O,de=(G+r)/S,Oe=0;Oe=1/Math.max(re,de);var Ce=[O/2,S/2];m.zoom(Oe,Ce),m.focusOn(W,ne,O,S)}}},{key:"openEdgeAnimation",value:function(r){this.getEdgeModelById(r).openEdgeAnimation()}},{key:"closeEdgeAnimation",value:function(r){this.getEdgeModelById(r).closeEdgeAnimation()}}],n&&Ub(t.prototype,n),e}(),ld=Ye(le.prototype,"width",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),fd=Ye(le.prototype,"height",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),pd=Ye(le.prototype,"edgeType",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),dd=Ye(le.prototype,"nodes",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),hd=Ye(le.prototype,"edges",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),yd=Ye(le.prototype,"overlapMode",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return wn.DEFAULT}}),gd=Ye(le.prototype,"background",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),vd=Ye(le.prototype,"transformModel",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),bd=Ye(le.prototype,"editConfigModel",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),md=Ye(le.prototype,"gridSize",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),_d=Ye(le.prototype,"partial",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Od=Ye(le.prototype,"fakerNode",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Ye(le.prototype,"nodesMap",[c.m],Object.getOwnPropertyDescriptor(le.prototype,"nodesMap"),le.prototype),Ye(le.prototype,"edgesMap",[c.m],Object.getOwnPropertyDescriptor(le.prototype,"edgesMap"),le.prototype),Ye(le.prototype,"modelsMap",[c.m],Object.getOwnPropertyDescriptor(le.prototype,"modelsMap"),le.prototype),Ye(le.prototype,"sortElements",[c.m],Object.getOwnPropertyDescriptor(le.prototype,"sortElements"),le.prototype),Ye(le.prototype,"textEditElement",[c.m],Object.getOwnPropertyDescriptor(le.prototype,"textEditElement"),le.prototype),Ye(le.prototype,"selectElements",[c.m],Object.getOwnPropertyDescriptor(le.prototype,"selectElements"),le.prototype),Ye(le.prototype,"selectNodes",[c.m],Object.getOwnPropertyDescriptor(le.prototype,"selectNodes"),le.prototype),Ye(le.prototype,"setFakerNode",[c.k],Object.getOwnPropertyDescriptor(le.prototype,"setFakerNode"),le.prototype),Ye(le.prototype,"removeFakerNode",[c.k],Object.getOwnPropertyDescriptor(le.prototype,"removeFakerNode"),le.prototype),Ye(le.prototype,"setModel",[c.k],Object.getOwnPropertyDescriptor(le.prototype,"setModel"),le.prototype),Ye(le.prototype,"toFront",[c.k],Object.getOwnPropertyDescriptor(le.prototype,"toFront"),le.prototype),Ye(le.prototype,"setElementZIndex",[c.k],Object.getOwnPropertyDescriptor(le.prototype,"setElementZIndex"),le.prototype),Ye(le.prototype,"deleteNode",[c.k],Object.getOwnPropertyDescriptor(le.prototype,"deleteNode"),le.prototype),Ye(le.prototype,"addNode",[c.k],Object.getOwnPropertyDescriptor(le.prototype,"addNode"),le.prototype),Ye(le.prototype,"cloneNode",[c.k],Object.getOwnPropertyDescriptor(le.prototype,"cloneNode"),le.prototype),Ye(le.prototype,"moveNode",[c.k],Object.getOwnPropertyDescriptor(le.prototype,"moveNode"),le.prototype),Ye(le.prototype,"moveNode2Coordinate",[c.k],Object.getOwnPropertyDescriptor(le.prototype,"moveNode2Coordinate"),le.prototype),Ye(le.prototype,"editText",[c.k],Object.getOwnPropertyDescriptor(le.prototype,"editText"),le.prototype),Ye(le.prototype,"addEdge",[c.k],Object.getOwnPropertyDescriptor(le.prototype,"addEdge"),le.prototype),Ye(le.prototype,"moveEdge",[c.k],Object.getOwnPropertyDescriptor(le.prototype,"moveEdge"),le.prototype),Ye(le.prototype,"deleteEdgeBySourceAndTarget",[c.k],Object.getOwnPropertyDescriptor(le.prototype,"deleteEdgeBySourceAndTarget"),le.prototype),Ye(le.prototype,"deleteEdgeById",[c.k],Object.getOwnPropertyDescriptor(le.prototype,"deleteEdgeById"),le.prototype),Ye(le.prototype,"deleteEdgeBySource",[c.k],Object.getOwnPropertyDescriptor(le.prototype,"deleteEdgeBySource"),le.prototype),Ye(le.prototype,"deleteEdgeByTarget",[c.k],Object.getOwnPropertyDescriptor(le.prototype,"deleteEdgeByTarget"),le.prototype),Ye(le.prototype,"setElementStateById",[c.k],Object.getOwnPropertyDescriptor(le.prototype,"setElementStateById"),le.prototype),Ye(le.prototype,"updateText",[c.k],Object.getOwnPropertyDescriptor(le.prototype,"updateText"),le.prototype),Ye(le.prototype,"selectNodeById",[c.k],Object.getOwnPropertyDescriptor(le.prototype,"selectNodeById"),le.prototype),Ye(le.prototype,"selectEdgeById",[c.k],Object.getOwnPropertyDescriptor(le.prototype,"selectEdgeById"),le.prototype),Ye(le.prototype,"selectElementById",[c.k],Object.getOwnPropertyDescriptor(le.prototype,"selectElementById"),le.prototype),Ye(le.prototype,"clearSelectElements",[c.k],Object.getOwnPropertyDescriptor(le.prototype,"clearSelectElements"),le.prototype),Ye(le.prototype,"moveNodes",[c.k],Object.getOwnPropertyDescriptor(le.prototype,"moveNodes"),le.prototype),Ye(le.prototype,"setDefaultEdgeType",[c.k],Object.getOwnPropertyDescriptor(le.prototype,"setDefaultEdgeType"),le.prototype),Ye(le.prototype,"changeNodeType",[c.k],Object.getOwnPropertyDescriptor(le.prototype,"changeNodeType"),le.prototype),Ye(le.prototype,"changeEdgeType",[c.k],Object.getOwnPropertyDescriptor(le.prototype,"changeEdgeType"),le.prototype),Ye(le.prototype,"getNodeIncomingEdge",[c.k],Object.getOwnPropertyDescriptor(le.prototype,"getNodeIncomingEdge"),le.prototype),Ye(le.prototype,"getNodeOutgoingEdge",[c.k],Object.getOwnPropertyDescriptor(le.prototype,"getNodeOutgoingEdge"),le.prototype),Ye(le.prototype,"getNodeIncomingNode",[c.k],Object.getOwnPropertyDescriptor(le.prototype,"getNodeIncomingNode"),le.prototype),Ye(le.prototype,"getNodeOutgoingNode",[c.k],Object.getOwnPropertyDescriptor(le.prototype,"getNodeOutgoingNode"),le.prototype),Ye(le.prototype,"setTheme",[c.k],Object.getOwnPropertyDescriptor(le.prototype,"setTheme"),le.prototype),Ye(le.prototype,"resize",[c.k],Object.getOwnPropertyDescriptor(le.prototype,"resize"),le.prototype),Ye(le.prototype,"clearData",[c.k],Object.getOwnPropertyDescriptor(le.prototype,"clearData"),le.prototype),Ye(le.prototype,"translateCenter",[c.k],Object.getOwnPropertyDescriptor(le.prototype,"translateCenter"),le.prototype),Ye(le.prototype,"fitView",[c.k],Object.getOwnPropertyDescriptor(le.prototype,"fitView"),le.prototype),Ye(le.prototype,"openEdgeAnimation",[c.k],Object.getOwnPropertyDescriptor(le.prototype,"openEdgeAnimation"),le.prototype),Ye(le.prototype,"closeEdgeAnimation",[c.k],Object.getOwnPropertyDescriptor(le.prototype,"closeEdgeAnimation"),le.prototype),le),Yb=Pd;function Ss(e){return Ss=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ss(e)}function js(){return js=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},js.apply(this,arguments)}function Wb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ps(e,t){return Ps=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Ps(e,t)}function $b(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=_a(e);if(t){var a=_a(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Kb(this,n)}}function Kb(e,t){if(t&&(Ss(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Jn(e)}function Jn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _a(e){return _a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},_a(e)}function hr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var kd,qb=Vn(Sd=function(e){(function(i,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(u&&u.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),u&&Ps(i,u)})(a,e);var t,n,r=$b(a);function a(i){var u;(function(O,S){if(!(O instanceof S))throw new TypeError("Cannot call a class as a function")})(this,a),hr(Jn(u=r.call(this)),"stepDrag",void 0),hr(Jn(u),"stepScrollX",0),hr(Jn(u),"stepScrollY",0),hr(Jn(u),"onDragging",function(O){var S=O.deltaX,T=O.deltaY;u.setState({isDragging:!0});var C=u.props.graphModel,G=C.transformModel;C.editConfigModel.stopMoveGraph||G.translate(S,T)}),hr(Jn(u),"onDragEnd",function(){u.setState({isDragging:!1})}),hr(Jn(u),"zoomHandler",function(O){var S=u.props,T=S.graphModel,C=T.editConfigModel,G=T.transformModel,W=T.gridSize,ne=S.graphModel,re=O.deltaX,de=O.deltaY;if(C.stopScrollGraph||O.ctrlKey===!0){if(!C.stopZoomGraph){O.preventDefault();var Oe=ne.getPointByClient({x:O.clientX,y:O.clientY}).canvasOverlayPosition,Ce=Oe.x,Ee=Oe.y;G.zoom(O.deltaY<0,[Ce,Ee])}}else{if(O.preventDefault(),u.stepScrollX+=re,u.stepScrollY+=de,Math.abs(u.stepScrollX)>=W){var Xe=u.stepScrollX%W,Ae=u.stepScrollX-Xe;G.translate(-Ae*G.SCALE_X,0),u.stepScrollX=Xe}if(Math.abs(u.stepScrollY)>=W){var Pe=u.stepScrollY%W,Qe=u.stepScrollY-Pe;G.translate(0,-Qe*G.SCALE_Y),u.stepScrollY=Pe}}}),hr(Jn(u),"clickHandler",function(O){if(O.target.getAttribute("name")==="canvas-overlay"){var S=u.props.graphModel;S.selectElements.size>0&&S.clearSelectElements(),S.eventCenter.emit(tt.BLANK_CLICK,{e:O})}}),hr(Jn(u),"handleContextMenu",function(O){if(O.target.getAttribute("name")==="canvas-overlay"){O.preventDefault();var S=u.props.graphModel,T=S.getPointByClient({x:O.clientX,y:O.clientY});S.eventCenter.emit(tt.BLANK_CONTEXTMENU,{e:O,position:T})}}),hr(Jn(u),"mouseDownHandler",function(O){var S=u.props.graphModel,T=S.eventCenter,C=S.editConfigModel,G=S.transformModel.SCALE_X,W=S.gridSize,ne=O.target,re=!C.adjustEdge&&!C.adjustNodePosition;(ne.getAttribute("name")==="canvas-overlay"||re)&&(C.stopMoveGraph?T.emit(tt.BLANK_MOUSEDOWN,{e:O}):(u.stepDrag.setStep(W*G),u.stepDrag.handleMouseDown(O)),u.clickHandler(O))});var f=i.graphModel,d=f.gridSize,m=f.eventCenter;return u.stepDrag=new dr({onDragging:u.onDragging,onDragEnd:u.onDragEnd,step:d,eventType:"BLANK",isStopPropagation:!1,eventCenter:m,model:null}),u.state={isDragging:!1},u}return t=a,(n=[{key:"render",value:function(){var i=this.props.graphModel.transformModel.getTransformStyle().transform,u=this.props,f=u.children,d=u.dnd,m=this.state.isDragging;return Object(te.g)("svg",js({xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",name:"canvas-overlay",onWheel:this.zoomHandler,onMouseDown:this.mouseDownHandler,onContextMenu:this.handleContextMenu,className:m?"lf-canvas-overlay lf-dragging":"lf-canvas-overlay lf-drag-able"},d.eventMap()),Object(te.g)("g",{transform:i},f))}}])&&Wb(t.prototype,n),a}(te.a))||Sd;function ks(e){return ks=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ks(e)}function Zb(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Jb(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ts(e,t){return Ts=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Ts(e,t)}function Qb(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Oa(e);if(t){var a=Oa(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return em(this,n)}}function em(e,t){if(t&&(ks(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function Oa(e){return Oa=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Oa(e)}var tm=Vn(kd=function(e){(function(i,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(u&&u.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),u&&Ts(i,u)})(a,e);var t,n,r=Qb(a);function a(){return Zb(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"componentDidMount",value:function(){this.triggerToolRender()}},{key:"componentDidUpdate",value:function(){this.triggerToolRender()}},{key:"getTools",value:function(){var i=this.props,u=i.tool,f=i.graphModel,d=u.getTools().map(function(m){return Object(te.g)(m,{graphModel:f,logicFlow:u.instance})});return u.components=d,d}},{key:"triggerToolRender",value:function(){var i=this.props,u=i.tool,f=i.graphModel,d=document.querySelector("#ToolOverlay_".concat(f.flowId)),m=u.getInstance();m.components.forEach(function(O){return O(m,d)}),m.components=[]}},{key:"render",value:function(){var i=this.props.graphModel;return Object(te.g)("div",{className:"lf-tool-overlay",id:"ToolOverlay_".concat(i.flowId)},this.getTools())}}])&&Jb(t.prototype,n),a}(te.a))||kd;function As(e){return As=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},As(e)}function nm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ms(e,t){return Ms=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Ms(e,t)}function om(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=wa(e);if(t){var a=wa(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return im(this,n)}}function im(e,t){if(t&&(As(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function wa(e){return wa=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},wa(e)}var Td,am=function(e){(function(i,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(u&&u.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),u&&Ms(i,u)})(a,e);var t,n,r=om(a);function a(){return nm(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"render",value:function(){var i=this.props.background;return Object(te.g)("div",{className:"lf-background"},Object(te.g)("div",{style:i,className:"lf-background-area"}))}}])&&rm(t.prototype,n),a}(te.a);function Ds(e){return Ds=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ds(e)}function um(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ns(e,t){return Ns=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Ns(e,t)}function cm(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=xa(e);if(t){var a=xa(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return lm(this,n)}}function lm(e,t){if(t&&(Ds(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ad(e)}function Ad(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xa(e){return xa=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},xa(e)}function fm(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Md=Vn(Td=function(e){(function(i,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(u&&u.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),u&&Ns(i,u)})(a,e);var t,n,r=cm(a);function a(){var i;um(this,a);for(var u=arguments.length,f=new Array(u),d=0;d<u;d++)f[d]=arguments[d];return fm(Ad(i=r.call.apply(r,[this].concat(f))),"id",Mr()),i}return t=a,(n=[{key:"renderDot",value:function(){var i=this.props,u=i.config,f=u.color,d=u.thickness,m=d===void 0?2:d,O=i.size,S=i.visible,T=Math.min(Math.max(2,m),O/2),C=1;return S||(C=0),Object(te.g)("rect",{width:T,height:T,rx:T/2,ry:T/2,fill:f,opacity:C})}},{key:"renderMesh",value:function(){var i=this.props,u=i.config,f=u.color,d=u.thickness,m=d===void 0?1:d,O=i.size,S=i.visible,T=Math.min(Math.max(1,m),O/2),C="M ".concat(O," 0 H0 M0 0 V0 ").concat(O),G=1;return S||(G=0),Object(te.g)("path",{d:C,stroke:f,strokeWidth:T,opacity:G})}},{key:"render",value:function(){var i=this.props,u=i.type,f=i.size,d=i.graphModel.transformModel,m=[d.SCALE_X,d.SKEW_Y,d.SKEW_X,d.SCALE_Y,d.TRANSLATE_X,d.TRANSLATE_Y].join(","),O="matrix(".concat(m,")");return Object(te.g)("div",{className:"lf-grid"},Object(te.g)("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%"},Object(te.g)("defs",null,Object(te.g)("pattern",{id:this.id,patternUnits:"userSpaceOnUse",patternTransform:O,x:"0",y:"0",width:f,height:f},u==="dot"&&this.renderDot(),u==="mesh"&&this.renderMesh())),Object(te.g)("rect",{width:"100%",height:"100%",fill:"url(#".concat(this.id,")")})))}}])&&sm(t.prototype,n),a}(te.a))||Td;Md.defaultProps={size:20,visible:!0,type:"dot",config:{color:"#ababab",thickness:1}},o(52);function Cs(e){return Cs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cs(e)}function pm(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(i=a.next()).done)&&(f.push(i.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return Dd(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Dd(n,r)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Dd(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Nd,_o=function(e){var t={x1:10,y1:10,x2:20,y2:20,stroke:"black"};return Object.entries(e).forEach(function(n){var r=pm(n,2),a=r[0],i=r[1];(a==="style"||Cs(i)!=="object")&&(t[a]=i)}),Object(te.g)("line",t)};function Rs(e){return Rs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rs(e)}function Cd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Ea(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Cd(Object(n),!0).forEach(function(r){dm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function dm(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ym(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Is(e,t){return Is=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Is(e,t)}function gm(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Sa(e);if(t){var a=Sa(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return vm(this,n)}}function vm(e,t){if(t&&(Rs(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function Sa(e){return Sa=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Sa(e)}var Rd,bm=Vn(Nd=function(e){(function(i,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(u&&u.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),u&&Is(i,u)})(a,e);var t,n,r=gm(a);function a(){return hm(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"render",value:function(){var i=this.props.snaplineModel,u=i.position,f=i.isShowHorizontal,d=i.isShowVertical,m=i.getStyle(),O=u.x,S=O===void 0?0:O,T=u.y,C=T===void 0?0:T,G=Ea(Ea({x1:-1e5,y1:C,x2:1e5,y2:C},m),{},{stroke:f?m.stroke:"none"}),W=Ea(Ea({x1:S,y1:-1e5,x2:S,y2:1e5},m),{},{stroke:d?m.stroke:"none"});return Object(te.g)("g",{className:"lf-snapline"},Object(te.g)(_o,G),Object(te.g)(_o,W))}}])&&ym(t.prototype,n),a}(te.a))||Nd;function Ls(e){return Ls=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ls(e)}function mm(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(i=a.next()).done)&&(f.push(i.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return Id(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Id(n,r)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Id(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Cr(e){var t=e.x,n=e.y,r=e.width,a=e.height,i=e.className,u=e.radius,f=t-r/2,d=n-a/2,m={};return Object.entries(e).forEach(function(O){var S=mm(O,2),T=S[0],C=S[1];Ls(C)!=="object"&&(m[T]=C)}),m.className=i?"lf-basic-shape ".concat(i):"lf-basic-shape",u&&(m.rx=u,m.ry=u),m.x=f,m.y=d,Object(te.g)("rect",m)}function zs(e){return zs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zs(e)}function Oo(){return Oo=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Oo.apply(this,arguments)}function Ld(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function zd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ld(Object(n),!0).forEach(function(r){_m(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ld(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Om(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Bs(e,t){return Bs=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Bs(e,t)}function xm(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=ja(e);if(t){var a=ja(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Em(this,n)}}function Em(e,t){if(t&&(zs(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function ja(e){return ja=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ja(e)}Cr.defaultProps={className:"",radius:""};var Bd,Sm=Vn(Rd=function(e){(function(i,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(u&&u.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),u&&Bs(i,u)})(a,e);var t,n,r=xm(a);function a(){return Om(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"getNodesOutline",value:function(){var i=this.props.graphModel,u=i.nodes,f=i.editConfigModel,d=f.hoverOutline,m=f.nodeSelectedOutline,O=[];return u.forEach(function(S){if(S.isHovered||S.isSelected){var T=S.isHovered,C=S.isSelected,G=S.x,W=S.y,ne=S.width,re=S.height;if(m&&C||d&&T){var de=S.getOutlineStyle(),Oe={};if(Object.keys(de).forEach(function(Ee){Ee!=="hover"&&(Oe[Ee]=de[Ee])}),T){var Ce=de.hover;Oe=zd(zd({},Oe),Ce)}O.push(Object(te.g)(Cr,Oo({className:"lf-outline-node",x:G,y:W,width:ne+10,height:re+10},Oe)))}}}),O}},{key:"getEdgeOutline",value:function(){for(var i=this.props.graphModel,u=i.edges,f=i.editConfigModel,d=f.edgeSelectedOutline,m=f.hoverOutline,O=[],S=0;S<u.length;S++){var T=u[S];(d&&T.isSelected||m&&T.isHovered)&&(T.modelType===dt.LINE_EDGE?O.push(this.getLineOutline(T)):T.modelType===dt.POLYLINE_EDGE?O.push(this.getPolylineOutline(T)):T.modelType===dt.BEZIER_EDGE&&O.push(this.getBezierOutline(T)))}return O}},{key:"getLineOutline",value:function(i){var u=i.startPoint,f=i.endPoint,d=(u.x+f.x)/2,m=(u.y+f.y)/2,O=Math.abs(u.x-f.x)+10,S=Math.abs(u.y-f.y)+10,T=i.getOutlineStyle();return Object(te.g)(Cr,Oo({className:"lf-outline-edge",x:d,y:m,width:O,height:S},T))}},{key:"getPolylineOutline",value:function(i){var u=i.points,f=Jr(u),d=oi(f,8),m=d.x,O=d.y,S=d.width,T=d.height,C=i.getOutlineStyle();return Object(te.g)(Cr,Oo({className:"lf-outline",x:m,y:O,width:S,height:T},C))}},{key:"getBezierOutline",value:function(i){var u=i.path,f=ga(u),d=oi(f,8),m=d.x,O=d.y,S=d.width,T=d.height,C=i.getOutlineStyle();return Object(te.g)(Cr,Oo({className:"lf-outline",x:m,y:O,width:S,height:T},C))}},{key:"render",value:function(){return Object(te.g)("g",{className:"lf-outline"},this.getNodesOutline(),this.getEdgeOutline())}}])&&wm(t.prototype,n),a}(te.a))||Rd;function Fs(e){return Fs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fs(e)}function jm(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(i=a.next()).done)&&(f.push(i.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return Fd(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Fd(n,r)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Fd(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ui(e){var t=e.x,n=t===void 0?0:t,r=e.y,a=r===void 0?0:r,i=e.r,u=i===void 0?4:i,f=e.className,d={cx:n,cy:a,r:u,fill:"transparent",fillOpacity:1,strokeWidth:"1",stroke:"#000",strokeOpacity:1};return Object.entries(e).forEach(function(m){var O=jm(m,2),S=O[0],T=O[1];Fs(T)!=="object"&&(d[S]=T)}),d.className=f?"lf-basic-shape ".concat(f):"lf-basic-shape",Object(te.g)("circle",d)}function Vs(e){return Vs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vs(e)}function Pm(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(i=a.next()).done)&&(f.push(i.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return Vd(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Vd(n,r)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Vd(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function si(){return si=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},si.apply(this,arguments)}function Hd(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Gd(e,t,n){return t&&Xd(e.prototype,t),n&&Xd(e,n),e}function Ud(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Hs(e,t)}function Hs(e,t){return Hs=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Hs(e,t)}function Yd(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=ka(e);if(t){var a=ka(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return km(this,n)}}function km(e,t){if(t&&(Vs(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Pa(e)}function Pa(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ka(e){return ka=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ka(e)}function Xs(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Wd,$d=function(e){Ud(n,e);var t=Yd(n);function n(){var r;return Hd(this,n),Xs(Pa(r=t.call(this)),"dragHandler",void 0),Xs(Pa(r),"onDragging",function(a){var i=a.event,u=r.props,f=u.graphModel,d=u.bezierModel,m=u.type,O=f.getPointByClient({x:i.clientX,y:i.clientY}).canvasOverlayPosition,S=O.x,T=O.y;d.updateAdjustAnchor({x:S,y:T},m)}),Xs(Pa(r),"onDragEnd",function(){r.props.bezierModel.isDragging=!1}),r.dragHandler=new dr({onDragging:r.onDragging,onDragEnd:r.onDragEnd}),r}return Gd(n,[{key:"render",value:function(){var r=this,a=this.props.position,i=a.x,u=a.y,f=this.props.bezierModel.getEdgeStyle().adjustAnchor;return Object(te.g)(ui,si({className:"lf-bezier-adjust-anchor",x:i,y:u},f,{onMouseDown:function(d){r.dragHandler.handleMouseDown(d)}}))}}]),n}(te.a),Tm=Vn(Bd=function(e){Ud(n,e);var t=Yd(n);function n(){return Hd(this,n),t.apply(this,arguments)}return Gd(n,[{key:"getBezierAdjust",value:function(r,a){var i=r.path,u=r.id,f=Pm(ga(i),4),d=f[0],m=f[1],O=f[2],S=f[3],T=r.getEdgeStyle().adjustLine,C=[];return C.push(Object(te.g)(_o,si({x1:d.x,y1:d.y,x2:m.x,y2:m.y},T))),C.push(Object(te.g)($d,{position:m,bezierModel:r,graphModel:a,key:"".concat(u,"_ePre"),type:"sNext"})),C.push(Object(te.g)(_o,si({x1:S.x,y1:S.y,x2:O.x,y2:O.y},T))),C.push(Object(te.g)($d,{position:O,bezierModel:r,graphModel:a,key:"".concat(u,"_sNext"),type:"ePre"})),C}},{key:"selectedBezierEdge",value:function(){for(var r=this.props.graphModel,a=r.edges,i=[],u=0;u<a.length;u++){var f=a[u];f.isSelected&&f.modelType===dt.BEZIER_EDGE&&f.draggable&&i.push(this.getBezierAdjust(f,r))}return i}},{key:"render",value:function(){return Object(te.g)("g",{className:"lf-bezier-adjust"},this.selectedBezierEdge())}}]),n}(te.a))||Bd;function Gs(e){return Gs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gs(e)}function Am(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Mm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Us(e,t){return Us=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Us(e,t)}function Dm(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Ta(e);if(t){var a=Ta(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Nm(this,n)}}function Nm(e,t){if(t&&(Gs(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function Ta(e){return Ta=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ta(e)}var Kd,Cm=Vn(Wd=function(e){(function(i,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(u&&u.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),u&&Us(i,u)})(a,e);var t,n,r=Dm(a);function a(){return Am(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"render",value:function(){var i=this.props.graphModel.transformModel.getTransformStyle().transform,u=this.props.children;return Object(te.g)("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",className:"modification-overlay"},Object(te.g)("g",{transform:i},u))}}])&&Mm(t.prototype,n),a}(te.a))||Wd;function Ys(e){return Ys=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ys(e)}function Ws(){return Ws=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ws.apply(this,arguments)}function Rm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Im(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function $s(e,t){return $s=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},$s(e,t)}function Lm(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Aa(e);if(t){var a=Aa(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return zm(this,n)}}function zm(e,t){if(t&&(Ys(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function Aa(e){return Aa=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Aa(e)}var Bm=Vn(Kd=function(e){(function(i,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(u&&u.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),u&&$s(i,u)})(a,e);var t,n,r=Lm(a);function a(){return Rm(this,a),r.apply(this,arguments)}return t=a,n=[{key:"getComponent",value:function(i,u){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"canvas-overlay",d=this.props.getView,m=d(i.type);return Object(te.g)(m,{key:i.id,model:i,graphModel:u,overlay:f})}},{key:"render",value:function(){var i=this,u=this.props,f=u.graphModel,d=u.tool,m=u.options,O=u.dnd,S=u.snaplineModel,T={};m.width&&(T.width="".concat(f.width,"px")),m.height&&(T.height="".concat(f.height,"px"));var C=m.grid,G=f.fakerNode,W=f.editConfigModel.adjustEdge;return Object(te.g)("div",{className:"lf-graph","flow-id":f.flowId,style:T},Object(te.g)(qb,{graphModel:f,dnd:O},Object(te.g)("g",{className:"lf-base"},oa(f.sortElements,function(ne){return i.getComponent(ne,f)})),G?this.getComponent(G,f):""),Object(te.g)(Cm,{graphModel:f},Object(te.g)(Sm,{graphModel:f}),W?Object(te.g)(Tm,{graphModel:f}):"",m.snapline!==!1?Object(te.g)(bm,{snaplineModel:S}):""),Object(te.g)(tm,{graphModel:f,tool:d}),m.background&&Object(te.g)(am,{background:m.background}),m.grid&&Object(te.g)(Md,Ws({},C,{graphModel:f})))}}],n&&Im(t.prototype,n),a}(te.a))||Kd,Fm=Bm;function qd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Ma(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qd(Object(n),!0).forEach(function(r){yr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Vm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function yr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Hm=function(){function e(r){var a=this;(function(u,f){if(!(u instanceof f))throw new TypeError("Cannot call a class as a function")})(this,e),yr(this,"nodeConfig",void 0),yr(this,"lf",void 0),yr(this,"fakerNode",void 0),yr(this,"stopDrag",function(){a.nodeConfig=null,window.document.removeEventListener("mouseup",a.stopDrag)}),yr(this,"dragEnter",function(u){a.nodeConfig&&!a.fakerNode&&(a.fakerNode=a.lf.createFakerNode(Ma(Ma({},a.nodeConfig),a.clientToLocalPoint({x:u.clientX,y:u.clientY}))))}),yr(this,"onDragOver",function(u){if(u.preventDefault(),a.fakerNode){var f=a.clientToLocalPoint({x:u.clientX,y:u.clientY}),d=f.x,m=f.y;a.fakerNode.moveTo(d,m);var O=a.fakerNode.getData();a.lf.setNodeSnapLine(O),a.lf.graphModel.eventCenter.emit(tt.NODE_DND_DRAG,{data:O})}return!1}),yr(this,"onDragLeave",function(){a.fakerNode&&(a.lf.removeNodeSnapLine(),a.lf.graphModel.removeFakerNode(),a.fakerNode=null)}),yr(this,"onDrop",function(u){if(a.lf.graphModel&&u&&a.nodeConfig){var f=a.lf.addNode(Ma(Ma({},a.nodeConfig),a.clientToLocalPoint({x:u.clientX,y:u.clientY})),tt.NODE_DND_ADD);u.preventDefault(),u.stopPropagation(),a.nodeConfig=null,a.lf.removeNodeSnapLine(),a.lf.graphModel.removeFakerNode(),a.fakerNode=null,f.getData()}});var i=r.lf;this.lf=i}var t,n;return t=e,(n=[{key:"clientToLocalPoint",value:function(r){var a=r.x,i=r.y,u=cf(this.lf.options,["grid","size"]),f=this.lf.graphModel.getPointByClient({x:a,y:i}).canvasOverlayPosition,d=f.x,m=f.y;return{x:Ar(d,u),y:Ar(m,u)}}},{key:"startDrag",value:function(r){this.nodeConfig=r,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}}}])&&Vm(t.prototype,n),e}();function Zd(e){var t=e.container,n=e.grid,r=e.width,a=e.height;if(!t)throw new Error("请检查 container 参数是否有效");if(typeof r=="string"||typeof a=="string")throw new Error("width或height不支持传入字符串,请传数字");return n&&(e.grid=un({size:20,type:"dot",visible:!0,config:{color:"#ababab",thickness:1}},n)),un({},Qd,e)}var bt,Jd,Qd={background:!1,grid:!1,textEdit:!0,disabledTools:[]};function Ks(e){return Ks=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ks(e)}function qs(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(i=a.next()).done)&&(f.push(i.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return eh(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return eh(n,r)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function eh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function th(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Da(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?th(Object(n),!0).forEach(function(r){nh(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):th(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xm(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function Gm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Um(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ci(){return ci=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(e,t,n){var r=Ym(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(arguments.length<3?e:n):a.value}},ci.apply(this,arguments)}function Ym(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Rr(e))!==null;);return e}function Zs(e,t){return Zs=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Zs(e,t)}function Wm(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Rr(e);if(t){var a=Rr(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return $m(this,n)}}function $m(e,t){if(t&&(Ks(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Na(e)}function Na(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Rr(e){return Rr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Rr(e)}function nh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zn(e,t,n,r,a){var i={};return Object.keys(r).forEach(function(u){i[u]=r[u]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce(function(u,f){return f(e,t,u)||u},i),a&&i.initializer!==void 0&&(i.value=i.initializer?i.initializer.call(a):void 0,i.initializer=void 0),i.initializer===void 0&&(Object.defineProperty(e,t,i),i=null),i}var Js=(bt=function(e){(function(i,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(u&&u.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),u&&Zs(i,u)})(a,e);var t,n,r=Wm(a);function a(){var i;Gm(this,a);for(var u=arguments.length,f=new Array(u),d=0;d<u;d++)f[d]=arguments[d];return nh(Na(i=r.call.apply(r,[this].concat(f))),"modelType",dt.BEZIER_EDGE),Xm(Na(i),"path",Jd,Na(i)),i}return t=a,(n=[{key:"initEdgeData",value:function(i){this.offset=100,ci(Rr(a.prototype),"initEdgeData",this).call(this,i)}},{key:"getEdgeStyle",value:function(){var i=this.graphModel.theme.bezier;return Da(Da({},ci(Rr(a.prototype),"getEdgeStyle",this).call(this)),Dt(i))}},{key:"getTextPosition",value:function(){if(this.pointsList&&this.pointsList.length>0){var i=0,u=0;return this.pointsList.forEach(function(f){var d=f.x,m=f.y;i+=d,u+=m}),{x:i/this.pointsList.length,y:u/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 i=ci(Rr(a.prototype),"getData",this).call(this),u=this.pointsList.map(function(f){return{x:f.x,y:f.y}});return Da(Da({},i),{},{pointsList:u})}},{key:"getControls",value:function(){var i=this.startPoint,u=this.endPoint;return ad({start:i,end:u,sourceNode:this.sourceNode,targetNode:this.targetNode,offset:this.offset})}},{key:"getPath",value:function(i){var u=qs(i,4),f=u[0],d=u[1],m=u[2],O=u[3];return"M ".concat(f.x," ").concat(f.y,`
|
||
C `).concat(d.x," ").concat(d.y,`,
|
||
`).concat(m.x," ").concat(m.y,`,
|
||
`).concat(O.x," ").concat(O.y)}},{key:"initPoints",value:function(){this.pointsList.length>0?this.path=this.getPath(this.pointsList):this.updatePoints()}},{key:"updatePoints",value:function(){var i=this.getControls(),u=i.sNext,f=i.ePre;this.updatePath(u,f)}},{key:"updatePath",value:function(i,u){i=Dt(i),u=Dt(u);var f={x:this.startPoint.x,y:this.startPoint.y},d={x:this.endPoint.x,y:this.endPoint.y};if(!i||!u){var m=this.getControls();i=m.sNext,u=m.ePre}this.pointsList=[f,i,u,d],this.path=this.getPath(this.pointsList)}},{key:"updateStartPoint",value:function(i){this.startPoint=i,this.updatePoints()}},{key:"updateEndPoint",value:function(i){this.endPoint=i,this.updatePoints()}},{key:"moveStartPoint",value:function(i,u){this.startPoint.x+=i,this.startPoint.y+=u;var f=qs(this.pointsList,3),d=f[1],m=f[2];d.x+=i,d.y+=u,this.updatePath(d,m)}},{key:"moveEndPoint",value:function(i,u){this.endPoint.x+=i,this.endPoint.y+=u;var f=qs(this.pointsList,3),d=f[1],m=f[2];m.x+=i,m.y+=u,this.updatePath(d,m)}},{key:"updateAdjustAnchor",value:function(i,u){u==="sNext"?this.pointsList[1]=i:u==="ePre"&&(this.pointsList[2]=i),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 i=this.pointsList;return i[i.length-1]||this.endPoint}},{key:"updateAfterAdjustStartAndEnd",value:function(i){var u=i.startPoint,f=i.endPoint,d=i.sourceNode,m=i.targetNode,O=ad({start:u,end:f,sourceNode:d,targetNode:m,offset:this.offset}),S=O.sNext,T=O.ePre;this.pointsList=[u,S,T,f],this.initPoints()}}])&&Um(t.prototype,n),a}(fs),Jd=zn(bt.prototype,"path",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),zn(bt.prototype,"initPoints",[c.k],Object.getOwnPropertyDescriptor(bt.prototype,"initPoints"),bt.prototype),zn(bt.prototype,"updatePoints",[c.k],Object.getOwnPropertyDescriptor(bt.prototype,"updatePoints"),bt.prototype),zn(bt.prototype,"updateStartPoint",[c.k],Object.getOwnPropertyDescriptor(bt.prototype,"updateStartPoint"),bt.prototype),zn(bt.prototype,"updateEndPoint",[c.k],Object.getOwnPropertyDescriptor(bt.prototype,"updateEndPoint"),bt.prototype),zn(bt.prototype,"moveStartPoint",[c.k],Object.getOwnPropertyDescriptor(bt.prototype,"moveStartPoint"),bt.prototype),zn(bt.prototype,"moveEndPoint",[c.k],Object.getOwnPropertyDescriptor(bt.prototype,"moveEndPoint"),bt.prototype),zn(bt.prototype,"updateAdjustAnchor",[c.k],Object.getOwnPropertyDescriptor(bt.prototype,"updateAdjustAnchor"),bt.prototype),zn(bt.prototype,"getAdjustStart",[c.k],Object.getOwnPropertyDescriptor(bt.prototype,"getAdjustStart"),bt.prototype),zn(bt.prototype,"getAdjustEnd",[c.k],Object.getOwnPropertyDescriptor(bt.prototype,"getAdjustEnd"),bt.prototype),zn(bt.prototype,"updateAfterAdjustStartAndEnd",[c.k],Object.getOwnPropertyDescriptor(bt.prototype,"updateAfterAdjustStartAndEnd"),bt.prototype),bt),Ne,rh,oh,ih,ah,uh,sh,ch,lh,fh,ph,dh,hh,yh,gh,vh,bh,mh,_h,Oh,Km=function(e){return e==null};function Qs(e){return Qs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qs(e)}function qm(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(d,m){if(d){if(typeof d=="string")return wh(d,m);var O=Object.prototype.toString.call(d).slice(8,-1);if(O==="Object"&&d.constructor&&(O=d.constructor.name),O==="Map"||O==="Set")return Array.from(d);if(O==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(O))return wh(d,m)}}(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(d){throw d},f:a}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i,u=!0,f=!1;return{s:function(){n=n.call(e)},n:function(){var d=n.next();return u=d.done,d},e:function(d){f=!0,i=d},f:function(){try{u||n.return==null||n.return()}finally{if(f)throw i}}}}function wh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function xh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function cn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xh(Object(n),!0).forEach(function(r){yn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Yt(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function Zm(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function yn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ft(e,t,n,r,a){var i={};return Object.keys(r).forEach(function(u){i[u]=r[u]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce(function(u,f){return f(e,t,u)||u},i),a&&i.initializer!==void 0&&(i.value=i.initializer?i.initializer.call(a):void 0,i.initializer=void 0),i.initializer===void 0&&(Object.defineProperty(e,t,i),i=null),i}var gr,Eh,vr=(Ne=function(){function e(r,a){(function(i,u){if(!(i instanceof u))throw new TypeError("Cannot call a class as a function")})(this,e),yn(this,"id",""),Yt(this,"type",rh,this),Yt(this,"x",oh,this),Yt(this,"y",ih,this),Yt(this,"text",ah,this),Yt(this,"properties",uh,this),Yt(this,"_width",sh,this),Yt(this,"_height",ch,this),Yt(this,"anchorsOffset",lh,this),Yt(this,"isSelected",fh,this),Yt(this,"isHovered",ph,this),Yt(this,"isShowAnchor",dh,this),Yt(this,"isDragging",hh,this),Yt(this,"isHitable",yh,this),Yt(this,"draggable",gh,this),Yt(this,"visible",vh,this),yn(this,"virtual",!1),yn(this,"graphModel",void 0),Yt(this,"zIndex",bh,this),Yt(this,"state",mh,this),Yt(this,"autoToFront",_h,this),Yt(this,"style",Oh,this),yn(this,"BaseType",Ht.NODE),yn(this,"modelType",dt.NODE),yn(this,"additionStateData",void 0),yn(this,"targetRules",[]),yn(this,"sourceRules",[]),yn(this,"moveRules",[]),yn(this,"hasSetTargetRules",!1),yn(this,"hasSetSourceRules",!1),this.graphModel=a,this.initNodeData(r),this.setAttributes()}var t,n;return t=e,n=[{key:"width",get:function(){return this._width},set:function(r){this._width=r}},{key:"height",get:function(){return this._height},set:function(r){this._height=r}},{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(r){if(r.properties||(r.properties={}),!r.id){var a=this.graphModel.idGenerator,i=a&&a(r.type),u=this.createId();r.id=u||i||Mr()}this.formatText(r),un(this,function(f){return Zo(f,["id","type","x","y","text","properties","virtual"])}(r)),this.graphModel.overlapMode===wn.INCREASE&&(this.zIndex=r.zIndex||cs())}},{key:"setAttributes",value:function(){}},{key:"createId",value:function(){return null}},{key:"formatText",value:function(r){r.text||(r.text={value:"",x:r.x,y:r.y,draggable:!1,editable:!0}),r.text&&typeof r.text=="string"?r.text={value:r.text,x:r.x,y:r.y,draggable:!1,editable:!0}:r.text&&r.text.editable===void 0&&(r.text.editable=!0)}},{key:"getData",value:function(){var r=this.text,a=r.x,i=r.y,u=r.value,f=this.properties;Object(c.x)(f)&&(f=Object(c.I)(f));var d={id:this.id,type:this.type,x:this.x,y:this.y,properties:f};return this.graphModel.overlapMode===wn.INCREASE&&(d.zIndex=this.zIndex),u&&(d.text={x:a,y:i,value:u}),d}},{key:"getHistoryData",value:function(){return this.getData()}},{key:"getProperties",value:function(){return Object(c.I)(this.properties)}},{key:"getNodeStyle",value:function(){return cn(cn({},this.graphModel.theme.baseNode),this.style)}},{key:"getTextStyle",value:function(){var r=this.graphModel.theme.nodeText;return Dt(r)}},{key:"getAnchorStyle",value:function(r){var a=this.graphModel.theme.anchor;return Dt(a)}},{key:"getAnchorLineStyle",value:function(r){var a=this.graphModel.theme.anchorLine;return Dt(a)}},{key:"getOutlineStyle",value:function(){var r=this.graphModel.theme.outline;return Dt(r)}},{key:"isAllowConnectedAsSource",value:function(r,a,i,u){var f=this.hasSetSourceRules?this.sourceRules:this.getConnectedSourceRules();this.hasSetSourceRules=!0;for(var d,m=!0,O=0;O<f.length;O++){var S=f[O];if(!S.validate.call(this,this,r,a,i,u)){m=!1,d=S.message;break}}return{isAllPass:m,msg:d}}},{key:"getConnectedSourceRules",value:function(){return this.sourceRules}},{key:"isAllowConnectedAsTarget",value:function(r,a,i,u){var f=this.hasSetTargetRules?this.targetRules:this.getConnectedTargetRules();this.hasSetTargetRules=!0;for(var d,m=!0,O=0;O<f.length;O++){var S=f[O];if(!S.validate.call(this,r,this,a,i,u)){m=!1,d=S.message;break}}return{isAllPass:m,msg:d}}},{key:"isAllowMoveNode",value:function(r,a){var i,u=!0,f=!0,d=qm(this.moveRules.concat(this.graphModel.nodeMoveRules));try{for(d.s();!(i=d.n()).done;){var m=(0,i.value)(this,r,a);if(!m)return!1;if(Qs(m)==="object"){var O=m;if(O.x===!1&&O.y===!1)return!1;u=u&&O.x,f=f&&O.y}}}catch(S){d.e(S)}finally{d.f()}return{x:u,y:f}}},{key:"getConnectedTargetRules",value:function(){return this.targetRules}},{key:"getAnchorsByOffset",value:function(){var r=this.anchorsOffset,a=this.id,i=this.x,u=this.y;return r&&r.length>0?r.map(function(f,d){return f.length?(f=f,{id:"".concat(a,"_").concat(d),x:i+f[0],y:u+f[1]}):cn(cn({},f=f),{},{x:i+f.x,y:u+f.y,id:f.id||"".concat(a,"_").concat(d)})}):this.getDefaultAnchor()}},{key:"getDefaultAnchor",value:function(){return[]}},{key:"getTargetAnchor",value:function(r){return function(a,i){for(var u,f=as(i),d=Number.MAX_SAFE_INTEGER,m=0;m<f.length;m++){var O=Kn(a.x,a.y,f[m].x,f[m].y);O<d&&(d=O,u={index:m,anchor:lp(lp({},f[m]),{},{x:f[m].x,y:f[m].y,id:f[m].id})})}return u}(r,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(){return this.getAnchorsByOffset()}},{key:"getAnchorInfo",value:function(r){if(!Km(r))for(var a=0;a<this.anchors.length;a++){var i=this.anchors[a];if(i.id===r)return i}}},{key:"addNodeMoveRules",value:function(r){this.moveRules.includes(r)||this.moveRules.push(r)}},{key:"move",value:function(r,a){var i=arguments.length>2&&arguments[2]!==void 0&&arguments[2],u=!1,f=!1;if(i)u=!0,f=!0;else{var d=this.isAllowMoveNode(r,a);typeof d=="boolean"?(u=d,f=d):(u=d.x,f=d.y)}if(u){var m=this.x+r;this.x=m,this.text&&this.moveText(r,0)}if(f){var O=this.y+a;this.y=O,this.text&&this.moveText(0,a)}return u||f}},{key:"getMoveDistance",value:function(r,a){var i=arguments.length>2&&arguments[2]!==void 0&&arguments[2],u=!1,f=!1,d=0,m=0;if(i)u=!0,f=!0;else{var O=this.isAllowMoveNode(r,a);typeof O=="boolean"?(u=O,f=O):(u=O.x,f=O.y)}if(u&&r){var S=this.x+r;this.x=S,this.text&&this.moveText(r,0),d=r}if(f&&a){var T=this.y+a;this.y=T,this.text&&this.moveText(0,a),m=a}return[d,m]}},{key:"moveTo",value:function(r,a){var i=arguments.length>2&&arguments[2]!==void 0&&arguments[2],u=r-this.x,f=a-this.y;return!(!i&&!this.isAllowMoveNode(u,f)||(this.text&&this.text&&this.moveText(u,f),this.x=r,this.y=a,0))}},{key:"moveText",value:function(r,a){var i=this.text,u=i.x,f=i.y,d=i.value,m=i.draggable,O=i.editable;this.text={value:d,editable:O,draggable:m,x:u+r,y:f+a}}},{key:"updateText",value:function(r){this.text=cn(cn({},Object(c.I)(this.text)),{},{value:r})}},{key:"setSelected",value:function(){var r=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isSelected=r}},{key:"setHovered",value:function(){var r=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isHovered=r,this.setIsShowAnchor(r)}},{key:"setIsShowAnchor",value:function(){var r=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isShowAnchor=r}},{key:"setHitable",value:function(){var r=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.isHitable=r}},{key:"setElementState",value:function(r,a){this.state=r,this.additionStateData=a}},{key:"setProperty",value:function(r,a){this.properties=cn(cn({},Object(c.I)(this.properties)),{},yn({},r,en(a))),this.setAttributes()}},{key:"setProperties",value:function(r){this.properties=cn(cn({},Object(c.I)(this.properties)),en(r)),this.setAttributes()}},{key:"deleteProperty",value:function(r){delete this.properties[r],this.setAttributes()}},{key:"setStyle",value:function(r,a){this.style=cn(cn({},this.style),{},yn({},r,en(a)))}},{key:"setStyles",value:function(r){this.style=cn(cn({},this.style),en(r))}},{key:"updateStyles",value:function(r){this.style=cn({},en(r))}},{key:"setZIndex",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;this.zIndex=r}},{key:"updateAttributes",value:function(r){un(this,r)}}],n&&Zm(t.prototype,n),e}(),rh=ft(Ne.prototype,"type",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),oh=ft(Ne.prototype,"x",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),ih=ft(Ne.prototype,"y",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),ah=ft(Ne.prototype,"text",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{value:"",x:0,y:0,draggable:!1,editable:!0}}}),uh=ft(Ne.prototype,"properties",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),sh=ft(Ne.prototype,"_width",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 100}}),ch=ft(Ne.prototype,"_height",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 80}}),lh=ft(Ne.prototype,"anchorsOffset",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),fh=ft(Ne.prototype,"isSelected",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),ph=ft(Ne.prototype,"isHovered",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),dh=ft(Ne.prototype,"isShowAnchor",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),hh=ft(Ne.prototype,"isDragging",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),yh=ft(Ne.prototype,"isHitable",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),gh=ft(Ne.prototype,"draggable",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),vh=ft(Ne.prototype,"visible",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),bh=ft(Ne.prototype,"zIndex",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),mh=ft(Ne.prototype,"state",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),_h=ft(Ne.prototype,"autoToFront",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Oh=ft(Ne.prototype,"style",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),ft(Ne.prototype,"incoming",[c.m],Object.getOwnPropertyDescriptor(Ne.prototype,"incoming"),Ne.prototype),ft(Ne.prototype,"outgoing",[c.m],Object.getOwnPropertyDescriptor(Ne.prototype,"outgoing"),Ne.prototype),ft(Ne.prototype,"addNodeMoveRules",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"addNodeMoveRules"),Ne.prototype),ft(Ne.prototype,"move",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"move"),Ne.prototype),ft(Ne.prototype,"getMoveDistance",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"getMoveDistance"),Ne.prototype),ft(Ne.prototype,"moveTo",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"moveTo"),Ne.prototype),ft(Ne.prototype,"moveText",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"moveText"),Ne.prototype),ft(Ne.prototype,"updateText",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"updateText"),Ne.prototype),ft(Ne.prototype,"setSelected",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"setSelected"),Ne.prototype),ft(Ne.prototype,"setHovered",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"setHovered"),Ne.prototype),ft(Ne.prototype,"setIsShowAnchor",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"setIsShowAnchor"),Ne.prototype),ft(Ne.prototype,"setHitable",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"setHitable"),Ne.prototype),ft(Ne.prototype,"setElementState",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"setElementState"),Ne.prototype),ft(Ne.prototype,"setProperty",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"setProperty"),Ne.prototype),ft(Ne.prototype,"setProperties",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"setProperties"),Ne.prototype),ft(Ne.prototype,"deleteProperty",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"deleteProperty"),Ne.prototype),ft(Ne.prototype,"setStyle",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"setStyle"),Ne.prototype),ft(Ne.prototype,"setStyles",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"setStyles"),Ne.prototype),ft(Ne.prototype,"updateStyles",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"updateStyles"),Ne.prototype),ft(Ne.prototype,"setZIndex",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"setZIndex"),Ne.prototype),ft(Ne.prototype,"updateAttributes",[c.k],Object.getOwnPropertyDescriptor(Ne.prototype,"updateAttributes"),Ne.prototype),Ne);function ec(e){return ec=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ec(e)}function Sh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function jh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Sh(Object(n),!0).forEach(function(r){Ph(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Jm(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function Qm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function e0(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function tc(){return tc=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(e,t,n){var r=t0(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(arguments.length<3?e:n):a.value}},tc.apply(this,arguments)}function t0(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=wo(e))!==null;);return e}function nc(e,t){return nc=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},nc(e,t)}function n0(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=wo(e);if(t){var a=wo(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return r0(this,n)}}function r0(e,t){if(t&&(ec(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ca(e)}function Ca(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function wo(e){return wo=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},wo(e)}function Ph(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rc(e,t,n,r,a){var i={};return Object.keys(r).forEach(function(u){i[u]=r[u]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce(function(u,f){return f(e,t,u)||u},i),a&&i.initializer!==void 0&&(i.value=i.initializer?i.initializer.call(a):void 0,i.initializer=void 0),i.initializer===void 0&&(Object.defineProperty(e,t,i),i=null),i}var tn,kh,Th,oc=(gr=function(e){(function(i,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(u&&u.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),u&&nc(i,u)})(a,e);var t,n,r=n0(a);function a(){var i;Qm(this,a);for(var u=arguments.length,f=new Array(u),d=0;d<u;d++)f[d]=arguments[d];return Ph(Ca(i=r.call.apply(r,[this].concat(f))),"modelType",dt.CIRCLE_NODE),Jm(Ca(i),"r",Eh,Ca(i)),i}return t=a,(n=[{key:"width",get:function(){return 2*this.r}},{key:"height",get:function(){return 2*this.r}},{key:"getNodeStyle",value:function(){var i=tc(wo(a.prototype),"getNodeStyle",this).call(this),u=this.graphModel.theme.circle;return jh(jh({},i),Dt(u))}},{key:"getDefaultAnchor",value:function(){var i=this.x,u=this.y,f=this.r;return[{x:i,y:u-f,id:"".concat(this.id,"_0")},{x:i+f,y:u,id:"".concat(this.id,"_1")},{x:i,y:u+f,id:"".concat(this.id,"_2")},{x:i-f,y:u,id:"".concat(this.id,"_3")}]}}])&&e0(t.prototype,n),a}(vr),Eh=rc(gr.prototype,"r",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 50}}),rc(gr.prototype,"width",[c.m],Object.getOwnPropertyDescriptor(gr.prototype,"width"),gr.prototype),rc(gr.prototype,"height",[c.m],Object.getOwnPropertyDescriptor(gr.prototype,"height"),gr.prototype),gr);o(127);function ic(e){return ic=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ic(e)}function ac(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(i=a.next()).done)&&(f.push(i.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return Ah(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Ah(n,r)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Ah(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Mh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Dh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Mh(Object(n),!0).forEach(function(r){Ch(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Nh(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function o0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i0(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function uc(){return uc=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(e,t,n){var r=a0(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(arguments.length<3?e:n):a.value}},uc.apply(this,arguments)}function a0(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Eo(e))!==null;);return e}function sc(e,t){return sc=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},sc(e,t)}function u0(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Eo(e);if(t){var a=Eo(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return s0(this,n)}}function s0(e,t){if(t&&(ic(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return xo(e)}function xo(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Eo(e){return Eo=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Eo(e)}function Ch(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function So(e,t,n,r,a){var i={};return Object.keys(r).forEach(function(u){i[u]=r[u]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce(function(u,f){return f(e,t,u)||u},i),a&&i.initializer!==void 0&&(i.value=i.initializer?i.initializer.call(a):void 0,i.initializer=void 0),i.initializer===void 0&&(Object.defineProperty(e,t,i),i=null),i}var Qn,Rh,Ih,cc=(tn=function(e){(function(i,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(u&&u.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),u&&sc(i,u)})(a,e);var t,n,r=u0(a);function a(){var i;o0(this,a);for(var u=arguments.length,f=new Array(u),d=0;d<u;d++)f[d]=arguments[d];return Ch(xo(i=r.call.apply(r,[this].concat(f))),"modelType",dt.DIAMOND_NODE),Nh(xo(i),"rx",kh,xo(i)),Nh(xo(i),"ry",Th,xo(i)),i}return t=a,(n=[{key:"getNodeStyle",value:function(){var i=uc(Eo(a.prototype),"getNodeStyle",this).call(this),u=this.graphModel.theme.diamond;return Dh(Dh({},i),Dt(u))}},{key:"points",get:function(){var i=this.x,u=this.y,f=this.rx,d=this.ry;return[[i,u-d],[i+f,u],[i,u+d],[i-f,u]]}},{key:"pointsPosition",get:function(){return this.points.map(function(i){return{x:i[0],y:i[1]}})}},{key:"width",get:function(){var i=Number.MAX_SAFE_INTEGER,u=Number.MIN_SAFE_INTEGER;return this.points.forEach(function(f){var d=ac(f,1)[0];d<i&&(i=d),d>u&&(u=d)}),u-i}},{key:"height",get:function(){var i=Number.MAX_SAFE_INTEGER,u=Number.MIN_SAFE_INTEGER;return this.points.forEach(function(f){var d=ac(f,2)[1];d<i&&(i=d),d>u&&(u=d)}),u-i}},{key:"getDefaultAnchor",value:function(){var i=this;return this.points.map(function(u,f){var d=ac(u,2);return{x:d[0],y:d[1],id:"".concat(i.id,"_").concat(f)}})}}])&&i0(t.prototype,n),a}(vr),kh=So(tn.prototype,"rx",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 30}}),Th=So(tn.prototype,"ry",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 50}}),So(tn.prototype,"points",[c.m],Object.getOwnPropertyDescriptor(tn.prototype,"points"),tn.prototype),So(tn.prototype,"pointsPosition",[c.m],Object.getOwnPropertyDescriptor(tn.prototype,"pointsPosition"),tn.prototype),So(tn.prototype,"width",[c.m],Object.getOwnPropertyDescriptor(tn.prototype,"width"),tn.prototype),So(tn.prototype,"height",[c.m],Object.getOwnPropertyDescriptor(tn.prototype,"height"),tn.prototype),tn);function lc(e){return lc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lc(e)}function Lh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function zh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Lh(Object(n),!0).forEach(function(r){Fh(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Bh(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function c0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l0(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function fc(){return fc=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(e,t,n){var r=f0(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(arguments.length<3?e:n):a.value}},fc.apply(this,arguments)}function f0(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Po(e))!==null;);return e}function pc(e,t){return pc=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},pc(e,t)}function p0(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Po(e);if(t){var a=Po(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return d0(this,n)}}function d0(e,t){if(t&&(lc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return jo(e)}function jo(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Po(e){return Po=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Po(e)}function Fh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ra(e,t,n,r,a){var i={};return Object.keys(r).forEach(function(u){i[u]=r[u]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce(function(u,f){return f(e,t,u)||u},i),a&&i.initializer!==void 0&&(i.value=i.initializer?i.initializer.call(a):void 0,i.initializer=void 0),i.initializer===void 0&&(Object.defineProperty(e,t,i),i=null),i}var Cn,Vh,dc=(Qn=function(e){(function(i,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(u&&u.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),u&&pc(i,u)})(a,e);var t,n,r=p0(a);function a(){var i;c0(this,a);for(var u=arguments.length,f=new Array(u),d=0;d<u;d++)f[d]=arguments[d];return Fh(jo(i=r.call.apply(r,[this].concat(f))),"modelType",dt.ELLIPSE_NODE),Bh(jo(i),"rx",Rh,jo(i)),Bh(jo(i),"ry",Ih,jo(i)),i}return t=a,(n=[{key:"getNodeStyle",value:function(){var i=fc(Po(a.prototype),"getNodeStyle",this).call(this),u=this.graphModel.theme.ellipse;return zh(zh({},i),Dt(u))}},{key:"width",get:function(){return 2*this.rx}},{key:"height",get:function(){return 2*this.ry}},{key:"getDefaultAnchor",value:function(){var i=this.x,u=this.y,f=this.rx,d=this.ry;return[{x:i,y:u-d,id:"".concat(this.id,"_0")},{x:i+f,y:u,id:"".concat(this.id,"_1")},{x:i,y:u+d,id:"".concat(this.id,"_2")},{x:i-f,y:u,id:"".concat(this.id,"_3")}]}}])&&l0(t.prototype,n),a}(vr),Rh=Ra(Qn.prototype,"rx",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 30}}),Ih=Ra(Qn.prototype,"ry",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 45}}),Ra(Qn.prototype,"width",[c.m],Object.getOwnPropertyDescriptor(Qn.prototype,"width"),Qn.prototype),Ra(Qn.prototype,"height",[c.m],Object.getOwnPropertyDescriptor(Qn.prototype,"height"),Qn.prototype),Qn);function hc(e){return hc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hc(e)}function yc(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(i=a.next()).done)&&(f.push(i.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return Hh(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Hh(n,r)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Hh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Xh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Gh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Xh(Object(n),!0).forEach(function(r){Uh(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function h0(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function y0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g0(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function gc(){return gc=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(e,t,n){var r=v0(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(arguments.length<3?e:n):a.value}},gc.apply(this,arguments)}function v0(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=ko(e))!==null;);return e}function vc(e,t){return vc=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},vc(e,t)}function b0(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=ko(e);if(t){var a=ko(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return m0(this,n)}}function m0(e,t){if(t&&(hc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ia(e)}function Ia(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ko(e){return ko=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ko(e)}function Uh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function La(e,t,n,r,a){var i={};return Object.keys(r).forEach(function(u){i[u]=r[u]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce(function(u,f){return f(e,t,u)||u},i),a&&i.initializer!==void 0&&(i.value=i.initializer?i.initializer.call(a):void 0,i.initializer=void 0),i.initializer===void 0&&(Object.defineProperty(e,t,i),i=null),i}var bc,Yh,mc=(Cn=function(e){(function(i,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(u&&u.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),u&&vc(i,u)})(a,e);var t,n,r=b0(a);function a(){var i;y0(this,a);for(var u=arguments.length,f=new Array(u),d=0;d<u;d++)f[d]=arguments[d];return Uh(Ia(i=r.call.apply(r,[this].concat(f))),"modelType",dt.POLYGON_NODE),h0(Ia(i),"points",Vh,Ia(i)),i}return t=a,(n=[{key:"getNodeStyle",value:function(){var i=gc(ko(a.prototype),"getNodeStyle",this).call(this),u=this.graphModel.theme.polygon;return Gh(Gh({},i),Dt(u))}},{key:"pointsPosition",get:function(){var i=this.x,u=this.y,f=this.width,d=this.height;return this.points.map(function(m){return{x:m[0]+i-f/2,y:m[1]+u-d/2}})}},{key:"width",get:function(){var i=Number.MAX_SAFE_INTEGER,u=Number.MIN_SAFE_INTEGER;return this.points.forEach(function(f){var d=yc(f,1)[0];d<i&&(i=d),d>u&&(u=d)}),u-i}},{key:"height",get:function(){var i=Number.MAX_SAFE_INTEGER,u=Number.MIN_SAFE_INTEGER;return this.points.forEach(function(f){var d=yc(f,2)[1];d<i&&(i=d),d>u&&(u=d)}),u-i}},{key:"getDefaultAnchor",value:function(){var i=this,u=this.x,f=this.y,d=this.width,m=this.height;return this.points.map(function(O,S){var T=yc(O,2),C=T[0],G=T[1];return{x:u+C-d/2,y:f+G-m/2,id:"".concat(i.id,"_").concat(S)}})}}])&&g0(t.prototype,n),a}(vr),Vh=La(Cn.prototype,"points",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[[50,0],[100,50],[50,100],[0,50]]}}),La(Cn.prototype,"pointsPosition",[c.m],Object.getOwnPropertyDescriptor(Cn.prototype,"pointsPosition"),Cn.prototype),La(Cn.prototype,"width",[c.m],Object.getOwnPropertyDescriptor(Cn.prototype,"width"),Cn.prototype),La(Cn.prototype,"height",[c.m],Object.getOwnPropertyDescriptor(Cn.prototype,"height"),Cn.prototype),Cn);function _c(e){return _c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_c(e)}function Wh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function $h(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Wh(Object(n),!0).forEach(function(r){Kh(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _0(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function O0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function w0(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Oc(){return Oc=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(e,t,n){var r=x0(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(arguments.length<3?e:n):a.value}},Oc.apply(this,arguments)}function x0(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=To(e))!==null;);return e}function wc(e,t){return wc=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},wc(e,t)}function E0(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=To(e);if(t){var a=To(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return S0(this,n)}}function S0(e,t){if(t&&(_c(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return za(e)}function za(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function To(e){return To=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},To(e)}function Kh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ir,xc=(bc=function(e){(function(i,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(u&&u.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),u&&wc(i,u)})(a,e);var t,n,r=E0(a);function a(){var i;O0(this,a);for(var u=arguments.length,f=new Array(u),d=0;d<u;d++)f[d]=arguments[d];return Kh(za(i=r.call.apply(r,[this].concat(f))),"modelType",dt.RECT_NODE),_0(za(i),"radius",Yh,za(i)),i}return t=a,(n=[{key:"getDefaultAnchor",value:function(){var i=this.x,u=this.y,f=this.width,d=this.height;return[{x:i,y:u-d/2,id:"".concat(this.id,"_0")},{x:i+f/2,y:u,id:"".concat(this.id,"_1")},{x:i,y:u+d/2,id:"".concat(this.id,"_2")},{x:i-f/2,y:u,id:"".concat(this.id,"_3")}]}},{key:"getNodeStyle",value:function(){var i=Oc(To(a.prototype),"getNodeStyle",this).call(this),u=this.graphModel.theme.rect;return $h($h({},i),Dt(u))}}])&&w0(t.prototype,n),a}(vr),Yh=function(e,t,n,r,a){var i={};return Object.keys(r).forEach(function(u){i[u]=r[u]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce(function(u,f){return f(e,t,u)||u},i),a&&i.initializer!==void 0&&(i.value=i.initializer?i.initializer.call(a):void 0,i.initializer=void 0),i.initializer===void 0&&(Object.defineProperty(e,t,i),i=null),i}(bc.prototype,"radius",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),bc);function Ec(e){return Ec=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ec(e)}function qh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Zh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qh(Object(n),!0).forEach(function(r){Qh(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qh(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function j0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function P0(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Sc(){return Sc=typeof Reflect<"u"&&Reflect.get?Reflect.get:function(e,t,n){var r=k0(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(arguments.length<3?e:n):a.value}},Sc.apply(this,arguments)}function k0(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=Ao(e))!==null;);return e}function jc(e,t){return jc=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},jc(e,t)}function T0(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Ao(e);if(t){var a=Ao(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return A0(this,n)}}function A0(e,t){if(t&&(Ec(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Jh(e)}function Jh(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ao(e){return Ao=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ao(e)}function Qh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ey(e,t,n,r,a){var i={};return Object.keys(r).forEach(function(u){i[u]=r[u]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce(function(u,f){return f(e,t,u)||u},i),a&&i.initializer!==void 0&&(i.value=i.initializer?i.initializer.call(a):void 0,i.initializer=void 0),i.initializer===void 0&&(Object.defineProperty(e,t,i),i=null),i}var Pc=(Ir=function(e){(function(i,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(u&&u.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),u&&jc(i,u)})(a,e);var t,n,r=T0(a);function a(){var i;j0(this,a);for(var u=arguments.length,f=new Array(u),d=0;d<u;d++)f[d]=arguments[d];return Qh(Jh(i=r.call.apply(r,[this].concat(f))),"modelType",dt.TEXT_NODE),i}return t=a,(n=[{key:"getTextStyle",value:function(){var i=Sc(Ao(a.prototype),"getTextStyle",this).call(this),u=this.graphModel.theme.text;return Zh(Zh({},i),Dt(u))}},{key:"width",get:function(){var i=String(this.text.value).split(/[\r\n]/g),u=this.getTextStyle().fontSize;return ss({rows:i,fontSize:u,rowsLength:i.length}).width}},{key:"height",get:function(){var i=String(this.text.value).split(/[\r\n]/g),u=this.getTextStyle().fontSize;return ss({rows:i,fontSize:u,rowsLength:i.length}).height}}])&&P0(t.prototype,n),a}(vr),ey(Ir.prototype,"width",[c.m],Object.getOwnPropertyDescriptor(Ir.prototype,"width"),Ir.prototype),ey(Ir.prototype,"height",[c.m],Object.getOwnPropertyDescriptor(Ir.prototype,"height"),Ir.prototype),Ir);function kc(e){return kc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kc(e)}function M0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function D0(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Tc(e,t){return Tc=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Tc(e,t)}function N0(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Ba(e);if(t){var a=Ba(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return C0(this,n)}}function C0(e,t){if(t&&(kc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ty(e)}function ty(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ba(e){return Ba=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ba(e)}function R0(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Bn,ny,ry,oy,Ac=function(e){(function(i,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(u&&u.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),u&&Tc(i,u)})(a,e);var t,n,r=N0(a);function a(){var i;M0(this,a);for(var u=arguments.length,f=new Array(u),d=0;d<u;d++)f[d]=arguments[d];return R0(ty(i=r.call.apply(r,[this].concat(f))),"modelType",dt.HTML_NODE),i}return t=a,(n=[{key:"getDefaultAnchor",value:function(){var i=this.x,u=this.y,f=this.width,d=this.height;return[{x:i,y:u-d/2,id:"".concat(this.id,"_0")},{x:i+f/2,y:u,id:"".concat(this.id,"_1")},{x:i,y:u+d/2,id:"".concat(this.id,"_2")},{x:i-f/2,y:u,id:"".concat(this.id,"_3")}]}}])&&D0(t.prototype,n),a}(vr);function iy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Mc(e,t,n,r){n&&Object.defineProperty(e,t,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function I0(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ay(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function li(e,t,n,r,a){var i={};return Object.keys(r).forEach(function(u){i[u]=r[u]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce(function(u,f){return f(e,t,u)||u},i),a&&i.initializer!==void 0&&(i.value=i.initializer?i.initializer.call(a):void 0,i.initializer=void 0),i.initializer===void 0&&(Object.defineProperty(e,t,i),i=null),i}var uy=(Bn=function(){function e(r){(function(a,i){if(!(a instanceof i))throw new TypeError("Cannot call a class as a function")})(this,e),ay(this,"graphModel",void 0),Mc(this,"isShowHorizontal",ny,this),Mc(this,"isShowVertical",ry,this),Mc(this,"position",oy,this),this.isShowHorizontal=!1,this.isShowVertical=!1,this.position={x:0,y:0},this.graphModel=r}var t,n;return t=e,n=[{key:"getStyle",value:function(){return function(r){for(var a=1;a<arguments.length;a++){var i=arguments[a]!=null?arguments[a]:{};a%2?iy(Object(i),!0).forEach(function(u){ay(r,u,i[u])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):iy(Object(i)).forEach(function(u){Object.defineProperty(r,u,Object.getOwnPropertyDescriptor(i,u))})}return r}({},this.graphModel.theme.snapline)}},{key:"getCenterSnapLine",value:function(r,a){for(var i=r.x,u=r.y,f=!1,d=!1,m=0;m<a.length;m++){var O=a[m];if(O.id!==r.id&&(i===O.x&&(f=!0),u===O.y&&(d=!0),f&&d))break}return{isShowVertical:f,isShowHorizontal:d,position:{x:i,y:u}}}},{key:"getHorizontalSnapline",value:function(r,a){var i,u,f=!1,d=r.id;if(d){var m=this.graphModel.fakerNode;if(m&&m.id===d)u=xn(m);else{var O=this.graphModel.getNodeModelById(d);u=xn(O)}}for(var S=0;S<a.length;S++){var T=a[S];if(T.id!==r.id){var C=xn(T);if(C.minY===u.minY||C.maxY===u.minY){f=!0,i=u.minY;break}if(C.minY===u.maxY||C.maxY===u.maxY){f=!0,i=u.maxY;break}}}return un({isShowHorizontal:f,position:{y:i}})}},{key:"getVerticalSnapline",value:function(r,a){var i,u,f=!1,d=r.id;if(d){var m=this.graphModel.fakerNode;if(m&&m.id===d)u=xn(m);else{var O=this.graphModel.getNodeModelById(d);u=xn(O)}}for(var S=0;S<a.length;S++){var T=a[S];if(T.id!==r.id){var C=xn(T);if(C.minX===u.minX||C.maxX===u.minX){f=!0,i=u.minX;break}if(C.minX===u.maxX||C.maxX===u.maxX){f=!0,i=u.maxX;break}}}return un({isShowVertical:f,position:{x:i}})}},{key:"getSnapLinePosition",value:function(r,a){var i=this.getCenterSnapLine(r,a),u=i.isShowHorizontal,f=i.isShowVertical;if(!u){var d=this.getHorizontalSnapline(r,a);d.isShowHorizontal&&(i.isShowHorizontal=d.isShowHorizontal,i.position.y=d.position.y)}if(!f){var m=this.getVerticalSnapline(r,a);m.isShowVertical&&(i.isShowVertical=m.isShowVertical,i.position.x=m.position.x)}return i}},{key:"setSnaplineInfo",value:function(r){var a=r.isShowHorizontal,i=r.isShowVertical,u=r.position;this.position=u,this.isShowHorizontal=a,this.isShowVertical=i}},{key:"clearSnapline",value:function(){this.position={x:0,y:0},this.isShowHorizontal=!1,this.isShowVertical=!1}},{key:"setNodeSnapLine",value:function(r){var a=this.graphModel.nodes,i=this.getSnapLinePosition(r,a);this.setSnaplineInfo(i)}}],n&&I0(t.prototype,n),e}(),ny=li(Bn.prototype,"isShowHorizontal",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),ry=li(Bn.prototype,"isShowVertical",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),oy=li(Bn.prototype,"position",[c.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),li(Bn.prototype,"clearSnapline",[c.k],Object.getOwnPropertyDescriptor(Bn.prototype,"clearSnapline"),Bn.prototype),li(Bn.prototype,"setNodeSnapLine",[c.k],Object.getOwnPropertyDescriptor(Bn.prototype,"setNodeSnapLine"),Bn.prototype),Bn),fi=new Map,sy=function(e){var t=Mr(),n=window.requestAnimationFrame(function r(){if(e(),fi.get(t)){var a=window.requestAnimationFrame(r);fi.set(t,a)}});return fi.set(t,n),t},Fa=function(e){var t=fi.get(e);t&&(window.cancelAnimationFrame(t),fi.delete(e))};function Dc(e){return Dc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dc(e)}function pi(){return pi=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pi.apply(this,arguments)}function cy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Va(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?cy(Object(n),!0).forEach(function(r){tr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function L0(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(i=a.next()).done)&&(f.push(i.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return ly(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return ly(n,r)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function ly(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function z0(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Nc(e,t){return Nc=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Nc(e,t)}function B0(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Ha(e);if(t){var a=Ha(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return F0(this,n)}}function F0(e,t){if(t&&(Dc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return er(e)}function er(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ha(e){return Ha=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ha(e)}function tr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var V0=function(e){(function(i,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(u&&u.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),u&&Nc(i,u)})(a,e);var t,n,r=B0(a);function a(){var i;return function(u,f){if(!(u instanceof f))throw new TypeError("Cannot call a class as a function")}(this,a),tr(er(i=r.call(this)),"preTargetNode",void 0),tr(er(i),"sourceRuleResults",void 0),tr(er(i),"targetRuleResults",void 0),tr(er(i),"dragHandler",void 0),tr(er(i),"t",void 0),tr(er(i),"onDragStart",function(u){var f=u.event,d=i.props,m=d.anchorData,O=d.nodeModel,S=d.graphModel,T=S.overlapMode;S.selectNodeById(O.id),T!==wn.INCREASE&&O.autoToFront&&S.toFront(O.id),S.eventCenter.emit(tt.ANCHOR_DRAGSTART,{data:m,e:f,nodeModel:O}),i.setState({startX:m.x,startY:m.y,endX:m.x,endY:m.y})}),tr(er(i),"onDragging",function(u){var f=u.event,d=i.props,m=d.graphModel,O=d.nodeModel,S=d.anchorData,T=m.transformModel,C=m.eventCenter,G=m.width,W=m.height,ne=m.editConfigModel,re=ne.autoExpand,de=ne.stopMoveGraph,Oe=f.clientX,Ce=f.clientY,Ee=m.getPointByClient({x:Oe,y:Ce}),Xe=Ee.domOverlayPosition,Ae=Xe.x,Pe=Xe.y,Qe=Ee.canvasOverlayPosition,yt=Qe.x,Et=Qe.y;i.t&&Fa(i.t);var mt=[];Ae<10?mt=[10,0]:Ae+10>G?mt=[-10,0]:Pe<10?mt=[0,10]:Pe+10>W&&(mt=[0,-10]),i.setState({endX:yt,endY:Et,dragging:!0}),i.moveAnchorEnd(yt,Et),mt.length>0&&!de&&re&&(i.t=sy(function(){var jt=L0(mt,2),Ft=jt[0],Wt=jt[1];T.translate(Ft,Wt);var jn=i.state,or=jn.endX,Rn=jn.endY;i.setState({endX:or-Ft,endY:Rn-Wt}),i.moveAnchorEnd(or-Ft,Rn-Wt)})),C.emit(tt.ANCHOR_DRAG,{data:S,e:f,nodeModel:O})}),tr(er(i),"onDragEnd",function(u){var f=u.event;i.t&&Fa(i.t),i.checkEnd(f),i.setState({startX:0,startY:0,endX:0,endY:0,dragging:!1}),i.sourceRuleResults.clear(),i.targetRuleResults.clear();var d=i.props,m=d.graphModel,O=d.nodeModel,S=d.anchorData;m.eventCenter.emit(tt.ANCHOR_DRAGEND,{data:S,e:f,nodeModel:O})}),tr(er(i),"checkEnd",function(u){var f=i.props,d=f.graphModel,m=f.nodeModel,O=f.anchorData,S=O.x,T=O.y,C=O.id,G=(d.edgeType,i.state),W=G.endX,ne=G.endY,re=G.dragging,de=sa({x:W,y:ne},d);if(i.preTargetNode&&i.preTargetNode.state!==Ot.DEFAULT&&i.preTargetNode.setElementState(Ot.DEFAULT),re&&de&&de.node){var Oe=de.node,Ce=de.anchor.id,Ee="".concat(m.id,"_").concat(Oe.id,"_").concat(Ce,"_").concat(C),Xe=i.sourceRuleResults.get(Ee)||{},Ae=Xe.isAllPass,Pe=Xe.msg,Qe=i.targetRuleResults.get(Ee)||{},yt=Qe.isAllPass,Et=Qe.msg;if(Ae&&yt){Oe.setElementState(Ot.DEFAULT);var mt=d.edgeGenerator(m.getData(),d.getNodeModelById(de.node.id).getData()),jt=d.addEdge(Va(Va({},mt),{},{sourceNodeId:m.id,sourceAnchorId:C,startPoint:{x:S,y:T},targetNodeId:de.node.id,targetAnchorId:de.anchor.id,endPoint:{x:de.anchor.x,y:de.anchor.y}})),Ft=i.props.anchorData;d.eventCenter.emit(tt.ANCHOR_DROP,{data:Ft,e:u,nodeModel:m,edgeModel:jt})}else{var Wt=Oe.getData();d.eventCenter.emit(tt.CONNECTION_NOT_ALLOWED,{data:Wt,msg:Et||Pe})}}}),i.sourceRuleResults=new Map,i.targetRuleResults=new Map,i.state={startX:0,startY:0,endX:0,endY:0,dragging:!1},i.dragHandler=new dr({onDragStart:i.onDragStart,onDragging:i.onDragging,onDragEnd:i.onDragEnd}),i}return t=a,(n=[{key:"getAnchorShape",value:function(){var i=this.props,u=i.anchorData,f=i.style,d=i.node.getAnchorShape(u);if(d)return d;var m=u.x,O=u.y,S=Va(Va({},f),f.hover);return Object(te.g)("g",null,Object(te.g)(ui,pi({className:"lf-node-anchor-hover"},S,{x:m,y:O})),Object(te.g)(ui,pi({className:"lf-node-anchor"},f,{x:m,y:O})))}},{key:"moveAnchorEnd",value:function(i,u){var f=this.props,d=f.graphModel,m=f.nodeModel,O=f.anchorData,S=sa({x:i,y:u},d);if(S){var T=S.node,C=S.anchor.id;if(this.preTargetNode&&this.preTargetNode!==S.node&&this.preTargetNode.setElementState(Ot.DEFAULT),O.id===C)return;this.preTargetNode=T;var G="".concat(m.id,"_").concat(T.id,"_").concat(C,"_").concat(O.id);if(!this.targetRuleResults.has(G)){var W=S.anchor,ne=m.isAllowConnectedAsSource(T,O,W),re=T.isAllowConnectedAsTarget(m,O,W);this.sourceRuleResults.set(G,ei(ne)),this.targetRuleResults.set(G,ei(re))}var de=this.sourceRuleResults.get(G).isAllPass,Oe=this.targetRuleResults.get(G).isAllPass;de&&Oe?T.setElementState(Ot.ALLOW_CONNECT):T.setElementState(Ot.NOT_ALLOW_CONNECT)}else this.preTargetNode&&this.preTargetNode.state!==Ot.DEFAULT&&this.preTargetNode.setElementState(Ot.DEFAULT)}},{key:"isShowLine",value:function(){var i=this.state,u=i.startX,f=i.startY,d=i.endX,m=i.endY;return Kn(u,f,d,m)>10}},{key:"render",value:function(){var i=this,u=this.state,f=u.startX,d=u.startY,m=u.endX,O=u.endY,S=this.props,T=S.anchorData.edgeAddable,C=S.edgeStyle;return Object(te.g)("g",{className:"lf-anchor"},Object(te.g)("g",{onMouseDown:function(G){T!==!1&&i.dragHandler.handleMouseDown(G)}},this.getAnchorShape()),this.isShowLine()&&Object(te.g)(_o,pi({x1:f,y1:d,x2:m,y2:O},C,{"pointer-events":"none"})))}}])&&z0(t.prototype,n),a}(te.a);o(80);function fy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function H0(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fy(Object(n),!0).forEach(function(r){X0(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function X0(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cc(e){return Cc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cc(e)}function G0(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(i=a.next()).done)&&(f.push(i.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return py(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return py(n,r)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function py(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function dy(e){var t=e.x,n=t===void 0?0:t,r=e.y,a=r===void 0?0:r,i=e.value,u=e.fontSize,f=e.fill,d=f===void 0?"currentColor":f,m=e.overflowMode,O=m===void 0?"default":m,S=e.textWidth,T=S===void 0?"":S,C=e.model,G={textAnchor:"middle","dominant-baseline":"middle",x:n,y:a,fill:d};if(Object.entries(e).forEach(function(Ce){var Ee=G0(Ce,2),Xe=Ee[0],Ae=Ee[1];Cc(Ae)!=="object"&&(G[Xe]=Ae)}),i){var W=String(i).split(/[\r\n]/g),ne=W.length;if(O!=="default"){var re=C.BaseType,de=C.modelType;if(re===Ht.NODE&&de!==dt.TEXT_NODE||re===Ht.EDGE&&T)return function(Ce){var Ee=Ce.value,Xe=Ce.fontSize,Ae=Ce.model,Pe=Ce.fontFamily,Qe=Pe===void 0?"":Pe,yt=Ce.lineHeight,Et=Ce.wrapPadding,mt=Et===void 0?"0, 0":Et,jt=Ce.overflowMode,Ft=Ce.x,Wt=Ce.y,jn=Ae.width,or=Ae.textHeight,Rn=Ce.textWidth||jn,No=String(Ee).split(/[\r\n]/g),fu=No.length,pu=Ip({rows:No,style:{fontSize:"".concat(Xe,"px"),width:"".concat(Rn,"px"),fontFamily:Qe,lineHeight:yt,padding:mt},rowsLength:fu,className:"lf-get-text-height"}),no=Ae.height>pu?Ae.height:pu;or&&(no=or);var Br=jt==="ellipsis";return Br&&(no=Xe+2),Object(te.g)("g",null,Object(te.g)("foreignObject",{width:Rn,height:no,x:Ft-Rn/2,y:Wt-no/2},Object(te.g)("div",{className:"lf-node-text-auto-wrap",style:{minHeight:no,width:Rn,padding:mt}},Object(te.g)("div",{className:Br?"lf-node-text-ellipsis-content":"lf-node-text-auto-wrap-content",title:Br?No.join(""):"",style:H0({},Ce)},No.map(function(Fr){return Object(te.g)("div",{className:"lf-node-text--auto-wrap-inner"},Fr)})))))}(e)}if(ne>1){var Oe=W.map(function(Ce,Ee){var Xe=(Ee-(ne-1)/2)*(u+2);return Object(te.g)("tspan",{className:"lf-text-tspan",x:n,y:a+Xe},Ce)});return Object(te.g)("text",G,Oe)}return Object(te.g)("text",G,i)}}function Rc(e){return Rc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rc(e)}function Ic(){return Ic=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ic.apply(this,arguments)}function U0(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(i=a.next()).done)&&(f.push(i.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return hy(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return hy(n,r)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function hy(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Y0(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Lc(e,t){return Lc=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Lc(e,t)}function W0(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Xa(e);if(t){var a=Xa(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return $0(this,n)}}function $0(e,t){if(t&&(Rc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Lr(e)}function Lr(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Xa(e){return Xa=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Xa(e)}function Qr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var yy=function(e){(function(i,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(u&&u.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),u&&Lc(i,u)})(a,e);var t,n,r=W0(a);function a(i){var u;(function(m,O){if(!(m instanceof O))throw new TypeError("Cannot call a class as a function")})(this,a),Qr(Lr(u=r.call(this)),"dragHandler",void 0),Qr(Lr(u),"sumDeltaX",0),Qr(Lr(u),"sumDeltaY",0),Qr(Lr(u),"stepDrag",void 0),Qr(Lr(u),"onDragging",function(m){var O=m.deltaX,S=m.deltaY,T=u.props,C=T.model,G=U0(T.graphModel.transformModel.fixDeltaXY(O,S),2),W=G[0],ne=G[1];C.moveText(W,ne)}),Qr(Lr(u),"dblClickHandler",function(){u.props.editable&&u.props.model.setElementState(Ot.TEXT_EDIT)}),Qr(Lr(u),"mouseDownHandle",function(m){var O=u.props,S=O.draggable,T=O.graphModel.editConfigModel.nodeTextDraggable;(S||T)&&u.stepDrag.handleMouseDown(m)});var f=i.model,d=i.draggable;return u.stepDrag=new dr({onDragging:u.onDragging,step:1,model:f,isStopPropagation:d}),u}return t=a,(n=[{key:"getShape",value:function(){var i=this.props,u=i.model,f=i.graphModel,d=u.text,m=f.editConfigModel,O=d.value,S=d.x,T=d.y,C=d.editable,G=d.draggable,W={x:S,y:T,className:"",value:O};C?W.className="lf-element-text":G||m.nodeTextDraggable?W.className="lf-text-draggable":W.className="lf-text-disabled";var ne=u.getTextStyle();return Object(te.g)(dy,Ic({},W,ne,{model:u}))}},{key:"render",value:function(){if(this.props.model.text)return Object(te.g)("g",{onMouseDown:this.mouseDownHandle,onDblClick:this.dblClickHandler},this.getShape())}}])&&Y0(t.prototype,n),a}(te.a),K0=window.navigator.userAgent.match(/MSIE|Trident/)!==null;function zc(e){return zc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zc(e)}function Ga(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(i=a.next()).done)&&(f.push(i.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return gy(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return gy(n,r)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function gy(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function vy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Bc(e,t){return Bc=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Bc(e,t)}function q0(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Ua(e);if(t){var a=Ua(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Z0(this,n)}}function Z0(e,t){if(t&&(zc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return nn(e)}function nn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ua(e){return Ua=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ua(e)}function ln(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var br=function(e){(function(u,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(f&&f.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),f&&Bc(u,f)})(i,e);var t,n,r,a=q0(i);function i(u){var f;(function(T,C){if(!(T instanceof C))throw new TypeError("Cannot call a class as a function")})(this,i),ln(nn(f=a.call(this)),"t",void 0),ln(nn(f),"moveOffset",void 0),ln(nn(f),"stepDrag",void 0),ln(nn(f),"contextMenuTime",void 0),ln(nn(f),"startTime",void 0),ln(nn(f),"clickTimer",void 0),ln(nn(f),"onDragStart",function(T){var C=T.event,G=C.clientX,W=C.clientY,ne=f.props,re=ne.model,de=ne.graphModel.getPointByClient({x:G,y:W}).canvasOverlayPosition,Oe=de.x,Ce=de.y;f.moveOffset={x:re.x-Oe,y:re.y-Ce}}),ln(nn(f),"onDragging",function(T){var C=T.event,G=f.props,W=G.model,ne=G.graphModel,re=ne.editConfigModel,de=re.stopMoveGraph,Oe=re.autoExpand,Ce=ne.transformModel,Ee=ne.selectNodes,Xe=ne.width,Ae=ne.height,Pe=ne.gridSize;W.isDragging=!0;var Qe=C.clientX,yt=C.clientY,Et=ne.getPointByClient({x:Qe,y:yt}).canvasOverlayPosition,mt=Et.x,jt=Et.y,Ft=Ga(Ce.CanvasPointToHtmlPoint([mt,jt]),2),Wt=Ft[0],jn=Ft[1];if(mt+=f.moveOffset.x,jt+=f.moveOffset.y,mt=Ar(mt,Pe),jt=Ar(jt,Pe),Xe&&Ae){if(!Oe||de||!(Wt<0||jn<0||Wt>Xe||jn>Ae)){var or=Ga(Ce.CanvasPointToHtmlPoint([mt-W.width/2,jt-W.height/2]),2),Rn=or[0],No=or[1],fu=Ga(Ce.CanvasPointToHtmlPoint([mt+W.width/2,jt+W.height/2]),2),pu=fu[0],no=fu[1],Br=Math.max(Pe,20),Fr=[];Rn<0?Fr=[Br,0]:pu>ne.width?Fr=[-Br,0]:No<0?Fr=[0,Br]:no>ne.height&&(Fr=[0,-Br]),f.t&&Fa(f.t);var du=Ee.map(function(hu){return hu.id});du.indexOf(W.id)===-1&&(du=[W.id]),Fr.length>0&&!de&&Oe?f.t=sy(function(){var hu=Ga(Fr,2),Jy=hu[0],Qy=hu[1];Ce.translate(Jy,Qy);var FO=-Jy/Ce.SCALE_X,VO=-Qy/Ce.SCALE_X;ne.moveNodes(du,FO,VO)}):ne.moveNodes(du,mt-W.x,jt-W.y)}}else ne.moveNode2Coordinate(W.id,mt,jt)}),ln(nn(f),"onDragEnd",function(){f.t&&Fa(f.t),f.props.model.isDragging=!1}),ln(nn(f),"handleClick",function(T){if(f.startTime&&!(new Date().getTime()-f.startTime>200)){var C=f.props,G=C.model,W=C.graphModel,ne={data:G.getData(),e:T,position:W.getPointByClient({x:T.clientX,y:T.clientY}),isSelected:!1,isMultiple:!1},re=T.button===2,de=T.detail===2;if(!re){var Oe=W.editConfigModel,Ce=sp(T,Oe);ne.isMultiple=Ce,G.isSelected&&!de&&Ce?(ne.isSelected=!1,G.setSelected(!1)):(W.selectNodeById(G.id,Ce),ne.isSelected=!0,f.toFront()),de?(Oe.nodeTextEdit&&G.text.editable&&(G.setSelected(!1),W.setElementStateById(G.id,Ot.TEXT_EDIT)),W.eventCenter.emit(tt.NODE_DBCLICK,ne)):(W.eventCenter.emit(tt.ELEMENT_CLICK,ne),W.eventCenter.emit(tt.NODE_CLICK,ne))}}}),ln(nn(f),"handleContextMenu",function(T){T.preventDefault();var C=f.props,G=C.model,W=C.graphModel,ne=G.getData(),re=W.getPointByClient({x:T.clientX,y:T.clientY});W.setElementStateById(G.id,Ot.SHOW_MENU,re.domOverlayPosition),G.isSelected||W.selectNodeById(G.id),W.eventCenter.emit(tt.NODE_CONTEXTMENU,{data:ne,e:T,position:re}),f.toFront()}),ln(nn(f),"handleMouseDown",function(T){var C=f.props,G=C.model,W=C.graphModel;f.startTime=new Date().getTime(),W.editConfigModel.adjustNodePosition&&G.draggable&&f.stepDrag&&f.stepDrag.handleMouseDown(T)}),ln(nn(f),"setHoverON",function(T){var C=f.props,G=C.model,W=C.graphModel;if(!G.isHovered){var ne=G.getData();G.setHovered(!0),W.eventCenter.emit(tt.NODE_MOUSEENTER,{data:ne,e:T})}}),ln(nn(f),"setHoverOFF",function(T){var C=f.props,G=C.model,W=C.graphModel,ne=G.getData();G.isHovered&&(G.setHovered(!1),W.eventCenter.emit(tt.NODE_MOUSELEAVE,{data:ne,e:T}))}),ln(nn(f),"onMouseOut",function(T){K0&&f.setHoverOFF(T)});var d=u.graphModel,m=d.gridSize,O=d.eventCenter,S=u.model;return f.stepDrag=new dr({onDragStart:f.onDragStart,onDragging:f.onDragging,onDragEnd:f.onDragEnd,step:m,eventType:"NODE",isStopPropagation:!1,eventCenter:O,model:S}),f}return t=i,r=[{key:"getModel",value:function(u){return u}}],(n=[{key:"getAnchorShape",value:function(u){return null}},{key:"getAnchors",value:function(){var u=this,f=this.props,d=f.model,m=f.graphModel,O=d.isSelected,S=d.isHitable,T=d.isDragging,C=d.isShowAnchor;return S&&(O||C)&&!T?oa(d.anchors,function(G,W){var ne=d.getAnchorLineStyle(G),re=d.getAnchorStyle(G);return Object(te.g)(V0,{anchorData:G,node:u,style:re,edgeStyle:ne,anchorIndex:W,nodeModel:d,graphModel:m,setHoverOFF:u.setHoverOFF})}):[]}},{key:"getText",value:function(){var u=this.props,f=u.model,d=u.graphModel;if(f.state===Ot.TEXT_EDIT)return"";if(f.text){var m=d.editConfigModel,O=!1;return(f.text.draggable||m.nodeTextDraggable)&&(O=!0),Object(te.g)(yy,{editable:m.nodeTextEdit&&f.text.editable,model:f,graphModel:d,draggable:O})}}},{key:"getStateClassName",value:function(){var u=this.props.model,f=u.state,d=u.isDragging,m=u.isSelected,O="lf-node";switch(f){case Ot.ALLOW_CONNECT:O+=" lf-node-allow";break;case Ot.NOT_ALLOW_CONNECT:O+=" lf-node-not-allow";break;default:O+=" lf-node-default"}return d&&(O+=" lf-isDragging"),m&&(O+=" lf-node-selected"),O}},{key:"toFront",value:function(){var u=this.props,f=u.model,d=u.graphModel;d.overlapMode!==wn.INCREASE&&f.autoToFront&&d.toFront(f.id)}},{key:"render",value:function(){var u,f=this.props,d=f.model,m=f.graphModel,O=m.editConfigModel,S=O.hideAnchors,T=O.adjustNodePosition,C=m.gridSize,G=m.transformModel.SCALE_X,W=d.isHitable,ne=d.draggable,re=Object(te.g)("g",{className:"lf-node-content"},this.getShape(),this.getText(),S?null:this.getAnchors());return W?(T&&ne&&this.stepDrag.setStep(C*G),u=Object(te.g)("g",{className:this.getStateClassName(),onMouseDown:this.handleMouseDown,onClick:this.handleClick,onMouseEnter:this.setHoverON,onMouseOver:this.setHoverON,onMouseLeave:this.setHoverOFF,onMouseOut:this.onMouseOut,onContextMenu:this.handleContextMenu},re)):u=Object(te.g)("g",{className:this.getStateClassName()},re),u}}])&&vy(t.prototype,n),r&&vy(t,r),i}(te.a);function Fc(e){return Fc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fc(e)}function Vc(){return Vc=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vc.apply(this,arguments)}function J0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Q0(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Hc(e,t){return Hc=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Hc(e,t)}function e_(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Ya(e);if(t){var a=Ya(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return t_(this,n)}}function t_(e,t){if(t&&(Fc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function Ya(e){return Ya=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ya(e)}var Xc=function(e){(function(i,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(u&&u.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),u&&Hc(i,u)})(a,e);var t,n,r=e_(a);function a(){return J0(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"getShape",value:function(){var i=this.props.model,u=i.getNodeStyle();return Object(te.g)(Cr,Vc({},u,{x:i.x,y:i.y,width:i.width,height:i.height,radius:i.radius}))}}])&&Q0(t.prototype,n),a}(br);function Gc(e){return Gc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gc(e)}function Uc(){return Uc=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Uc.apply(this,arguments)}function n_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r_(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Yc(e,t){return Yc=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Yc(e,t)}function o_(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Wa(e);if(t){var a=Wa(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return i_(this,n)}}function i_(e,t){if(t&&(Gc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function Wa(e){return Wa=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Wa(e)}var Wc=function(e){(function(i,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(u&&u.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),u&&Yc(i,u)})(a,e);var t,n,r=o_(a);function a(){return n_(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"getShape",value:function(){var i=this.props.model,u=i.x,f=i.y,d=i.r,m=i.getNodeStyle();return Object(te.g)(ui,Uc({},m,{x:u,y:f,r:d}))}}])&&r_(t.prototype,n),a}(br);function $c(e){return $c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$c(e)}function a_(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(i=a.next()).done)&&(f.push(i.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return by(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return by(n,r)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function by(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function my(e){var t=e.points,n=e.className,r={fill:"transparent",fillOpacity:1,strokeWidth:1,stroke:"#000",strokeOpacity:1,points:""};return Object.entries(e).forEach(function(a){var i=a_(a,2),u=i[0],f=i[1];$c(f)!=="object"&&(r[u]=f)}),r.className=n?"lf-basic-shape ".concat(n):"lf-basic-shape",r.points=t.map(function(a){return a.join(",")}).join(" "),Object(te.g)("polygon",r)}function Kc(e){return Kc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kc(e)}function qc(){return qc=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qc.apply(this,arguments)}function u_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s_(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Zc(e,t){return Zc=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Zc(e,t)}function c_(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=$a(e);if(t){var a=$a(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return l_(this,n)}}function l_(e,t){if(t&&(Kc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function $a(e){return $a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},$a(e)}var Jc=function(e){(function(i,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(u&&u.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),u&&Zc(i,u)})(a,e);var t,n,r=c_(a);function a(){return u_(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"getShape",value:function(){var i=this.props.model,u=i.x,f=i.y,d=i.width,m=i.height,O=i.points,S=i.getNodeStyle(),T={transform:"matrix(1 0 0 1 ".concat(u-d/2," ").concat(f-m/2,")")};return Object(te.g)("g",T,Object(te.g)(my,qc({},S,{points:O,x:u,y:f})))}}])&&s_(t.prototype,n),a}(br);function Qc(e){return Qc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qc(e)}function el(){return el=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},el.apply(this,arguments)}function f_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p_(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function tl(e,t){return tl=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},tl(e,t)}function d_(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Ka(e);if(t){var a=Ka(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return h_(this,n)}}function h_(e,t){if(t&&(Qc(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function Ka(e){return Ka=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ka(e)}var nl=function(e){(function(i,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(u&&u.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),u&&tl(i,u)})(a,e);var t,n,r=d_(a);function a(){return f_(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"getShape",value:function(){var i=this.props.model,u=i.getNodeStyle();return Object(te.g)("g",null,Object(te.g)(my,el({},u,{points:i.points,x:i.x,y:i.y})))}}])&&p_(t.prototype,n),a}(br);function rl(e){return rl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rl(e)}function y_(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(i=a.next()).done)&&(f.push(i.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return _y(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return _y(n,r)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function _y(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function g_(e){var t=e.x,n=t===void 0?0:t,r=e.y,a=r===void 0?0:r,i=e.rx,u=i===void 0?4:i,f=e.ry,d=f===void 0?4:f,m=e.className,O={cx:n,cy:a,rx:u,ry:d,fill:"transparent",fillOpacity:1,strokeWidth:"1",stroke:"#000",strokeOpacity:1};return Object.entries(e).forEach(function(S){var T=y_(S,2),C=T[0],G=T[1];rl(G)!=="object"&&(O[C]=G)}),O.className=m?"lf-basic-shape ".concat(m):"lf-basic-shape",Object(te.g)("ellipse",O)}function ol(e){return ol=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ol(e)}function il(){return il=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},il.apply(this,arguments)}function v_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function b_(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function al(e,t){return al=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},al(e,t)}function m_(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=qa(e);if(t){var a=qa(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return __(this,n)}}function __(e,t){if(t&&(ol(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function qa(e){return qa=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},qa(e)}var ul=function(e){(function(i,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(u&&u.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),u&&al(i,u)})(a,e);var t,n,r=m_(a);function a(){return v_(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"getShape",value:function(){var i=this.props.model,u=i.getNodeStyle();return Object(te.g)(g_,il({},u,{x:i.x,y:i.y,rx:i.rx,ry:i.ry}))}}])&&b_(t.prototype,n),a}(br);function sl(e){return sl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sl(e)}function Oy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function wy(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Oy(Object(n),!0).forEach(function(r){O_(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function O_(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function w_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x_(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function cl(e,t){return cl=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},cl(e,t)}function E_(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Za(e);if(t){var a=Za(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return S_(this,n)}}function S_(e,t){if(t&&(sl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function Za(e){return Za=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Za(e)}var ll=function(e){(function(i,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(u&&u.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),u&&cl(i,u)})(a,e);var t,n,r=E_(a);function a(){return w_(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"getBackground",value:function(){var i=this.props.model,u=i.getTextStyle(),f=i.width,d=i.height,m=i.x,O=i.y,S=wy(wy({},u.background),{},{x:m,y:O-1,width:f,height:d});return Object(te.g)(Cr,S)}},{key:"getShape",value:function(){return Object(te.g)("g",null,this.getBackground())}}])&&x_(t.prototype,n),a}(br);function fl(e){return fl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fl(e)}function pl(){return pl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pl.apply(this,arguments)}function j_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function P_(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function dl(e,t){return dl=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},dl(e,t)}function k_(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=Ja(e);if(t){var a=Ja(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return T_(this,n)}}function T_(e,t){if(t&&(fl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return di(e)}function di(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ja(e){return Ja=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},Ja(e)}function Qa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var hl=function(e){(function(i,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(u&&u.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),u&&dl(i,u)})(a,e);var t,n,r=k_(a);function a(){var i;j_(this,a);for(var u=arguments.length,f=new Array(u),d=0;d<u;d++)f[d]=arguments[d];return Qa(di(i=r.call.apply(r,[this].concat(f))),"ref",void 0),Qa(di(i),"currentProperties",void 0),Qa(di(i),"preProperties",void 0),Qa(di(i),"setRef",function(m){i.ref=m}),i}return t=a,(n=[{key:"rootEl",get:function(){return this.ref}},{key:"setHtml",value:function(i){i.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 i=this.props.model,u=i.x,f=i.y,d=i.height,m=i.width,O=i.getNodeStyle();return this.currentProperties=JSON.stringify(i.properties),Object(te.g)("foreignObject",pl({},O,{x:u-m/2,y:f-d/2,width:m,height:d,ref:this.setRef}))}}])&&P_(t.prototype,n),a}(br);function yl(e){return yl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yl(e)}function gl(){return gl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gl.apply(this,arguments)}function xy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function eo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xy(Object(n),!0).forEach(function(r){ml(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function A_(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function vl(e,t){return vl=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},vl(e,t)}function M_(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=eu(e);if(t){var a=eu(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return D_(this,n)}}function D_(e,t){if(t&&(yl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return bl(e)}function bl(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function eu(e){return eu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},eu(e)}function ml(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var nr,N_=function(e){(function(i,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(u&&u.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),u&&vl(i,u)})(a,e);var t,n,r=M_(a);function a(i){var u;return function(f,d){if(!(f instanceof d))throw new TypeError("Cannot call a class as a function")}(this,a),ml(bl(u=r.call(this,i)),"setHoverON",function(){u.setState({isHovered:!0})}),ml(bl(u),"setHoverOFF",function(){u.setState({isHovered:!1})}),u.state={isHovered:!1},u}return t=a,(n=[{key:"getBackground",value:function(){var i=this.props.model,u=i.getTextStyle(),f=i.text,d=u.background||{};if(this.state.isHovered&&u.hover&&u.hover.background&&(d=eo(eo({},d),u.hover.background)),f&&f.value&&d.fill!=="transparent"){var m,O=u.fontSize,S=u.overflowMode,T=u.lineHeight,C=u.wrapPadding,G=u.textWidth,W=f.value,ne=f.x,re=f.y,de=String(W).split(/[\r\n]/g),Oe=de.length;if(S==="autoWrap"&&G){var Ce=Ip({rows:de,style:{fontSize:"".concat(O,"px"),width:"".concat(G,"px"),lineHeight:T,padding:C},rowsLength:Oe,className:"lf-get-text-height"});m=eo(eo({},d),{},{x:ne-1,y:re-1,width:G,height:Ce})}else{de&&de.forEach(function(Qe){id(Qe)});var Ee=ss({rows:de,fontSize:O,rowsLength:Oe}),Xe=Ee.width,Ae=Ee.height;if(typeof d.wrapPadding=="string"){var Pe=d.wrapPadding.split(",").filter(function(Qe){return Qe.trim()}).map(function(Qe){return parseFloat(Qe.trim())});Pe.length>0&&Pe.length<=4&&(Pe.length===1?Pe=[Pe[0],Pe[0],Pe[0],Pe[0]]:Pe.length===2?Pe=[Pe[0],Pe[1],Pe[0],Pe[1]]:Pe.length===3&&(Pe=[Pe[0],Pe[1],Pe[2],Pe[1]]),Xe+=Pe[1]+Pe[3],Ae+=Pe[0]+Pe[2],ne+=(Pe[1]-Pe[3])/2,re+=(Pe[2]-Pe[0])/2)}m=eo(eo({},d),{},{x:ne-1,y:re-1,width:Xe,height:Ae})}return Object(te.g)(Cr,m)}}},{key:"getShape",value:function(){var i=this.props.model,u=i.text,f=u.value,d=u.x,m=u.y;if(f){var O=eo({x:d,y:m,className:"lf-element-text",value:f},i.getTextStyle());return Object(te.g)("g",{className:"lf-line-text",onMouseEnter:this.setHoverON,onMouseLeave:this.setHoverOFF},this.getBackground(),Object(te.g)(dy,gl({},O,{model:i})))}}}])&&A_(t.prototype,n),a}(yy);function _l(e){return _l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_l(e)}function Ey(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function mr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ey(Object(n),!0).forEach(function(r){Sn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ey(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function C_(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(i=a.next()).done)&&(f.push(i.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return Sy(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Sy(n,r)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Sy(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function R_(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ol(e,t){return Ol=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Ol(e,t)}function I_(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=tu(e);if(t){var a=tu(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return L_(this,n)}}function L_(e,t){if(t&&(_l(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return En(e)}function En(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function tu(e){return tu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},tu(e)}function Sn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}(function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"})(nr||(nr={}));var jy=function(e){(function(i,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(u&&u.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),u&&Ol(i,u)})(a,e);var t,n,r=I_(a);function a(i){var u;(function(O,S){if(!(O instanceof S))throw new TypeError("Cannot call a class as a function")})(this,a),Sn(En(u=r.call(this)),"stepDragData",void 0),Sn(En(u),"stepDrag",void 0),Sn(En(u),"oldEdge",void 0),Sn(En(u),"preTargetNode",void 0),Sn(En(u),"targetRuleResults",void 0),Sn(En(u),"sourceRuleResults",void 0),Sn(En(u),"handleMouseDown",function(O){u.stepDrag&&u.stepDrag.handleMouseDown(O)}),Sn(En(u),"onDragStart",function(){var O=u.props,S=O.x,T=O.y,C=O.edgeModel,G=C.startPoint,W=C.endPoint,ne=C.pointsList;u.oldEdge={startPoint:G,endPoint:W,pointsList:ne},u.setState({endX:S,endY:T,dragging:!0})}),Sn(En(u),"onDragging",function(O){var S=O.deltaX,T=O.deltaY,C=u.state,G=C.endX,W=C.endY,ne=u.props,re=ne.graphModel,de=ne.type,Oe=re.transformModel,Ce=re.editConfigModel,Ee=C_(Oe.moveCanvasPointByHtml([G,W],S,T),2),Xe=Ee[0],Ae=Ee[1];u.setState({endX:Xe,endY:Ae,dragging:!0});var Pe=u.props.edgeModel,Qe=sa({x:G,y:W},re);if(Qe&&Qe.node&&u.isAllowAdjust(Qe).pass){var yt,Et=Pe.startPoint,mt=Pe.endPoint,jt=Pe.sourceNode,Ft=Pe.targetNode;de===nr.SOURCE?yt={startPoint:{x:Qe.anchor.x,y:Qe.anchor.y},endPoint:{x:mt.x,y:mt.y},sourceNode:Qe.node,targetNode:Ft}:de===nr.TARGET&&(yt={startPoint:{x:Et.x,y:Et.y},endPoint:{x:Qe.anchor.x,y:Qe.anchor.y},sourceNode:jt,targetNode:Qe.node}),Pe.updateAfterAdjustStartAndEnd(yt)}else de===nr.SOURCE?Pe.updateStartPoint({x:Xe,y:Ae}):de===nr.TARGET&&Pe.updateEndPoint({x:Xe,y:Ae});Pe.text.value&&Ce.adjustEdge&&Pe.setText(Object.assign({},Pe.text,Pe.textPosition))}),Sn(En(u),"onDragEnd",function(O){var S=O.event;try{var T;u.setState({dragging:!1});var C=u.props,G=C.graphModel,W=C.edgeModel,ne=C.type,re=u.state,de=re.endX,Oe=re.endY,Ce=re.dragging,Ee=sa({x:de,y:Oe},G);if(!Ce)return;var Xe,Ae=!1;if(Ee&&Ee.node){var Pe=u.isAllowAdjust(Ee),Qe=Pe.pass,yt=Pe.msg,Et=Pe.newTargetNode;if(Qe){var mt,jt=W.getData();Xe=mr(mr({},jt),{},{sourceAnchorId:"",targetAnchorId:"",text:(jt==null||(mt=jt.text)===null||mt===void 0?void 0:mt.value)||""}),ne===nr.SOURCE?(Xe=mr(mr({},G.edgeGenerator(G.getNodeModelById(Ee.node.id).getData(),G.getNodeModelById(W.targetNodeId).getData(),Xe)),{},{sourceNodeId:Ee.node.id,sourceAnchorId:Ee.anchor.id,startPoint:{x:Ee.anchor.x,y:Ee.anchor.y},targetNodeId:W.targetNodeId,endPoint:mr({},W.endPoint)}),W.sourceNodeId===Ee.node.id&&W.sourceAnchorId===Ee.anchor.id&&(Ae=!0)):ne===nr.TARGET&&(Xe=mr(mr({},G.edgeGenerator(G.getNodeModelById(W.sourceNodeId).getData(),G.getNodeModelById(Ee.node.id).getData(),Xe)),{},{sourceNodeId:W.sourceNodeId,startPoint:mr({},W.startPoint),targetNodeId:Ee.node.id,targetAnchorId:Ee.anchor.id,endPoint:{x:Ee.anchor.x,y:Ee.anchor.y}}),W.targetNodeId===Ee.node.id&&W.targetAnchorId===Ee.anchor.id&&(Ae=!0))}else{Ae=!0;var Ft=Et.getData();G.eventCenter.emit(tt.CONNECTION_NOT_ALLOWED,{data:Ft,msg:yt})}}else Ae=!0;if(Ae)u.recoveryEdge();else{G.deleteEdgeById(W.id);var Wt=G.addEdge(mr({},Xe));G.eventCenter.emit(tt.EDGE_EXCHANGE_NODE,{data:{newEdge:Wt.getData(),oldEdge:W.getData()}})}(T=u.preTargetNode)===null||T===void 0||T.setElementState(Ot.DEFAULT)}finally{u.props.graphModel.eventCenter.emit(tt.ADJUST_POINT_DRAGEND,{e:S,data:u.stepDragData})}}),Sn(En(u),"recoveryEdge",function(){var O=u.props.edgeModel,S=u.oldEdge,T=S.startPoint,C=S.endPoint,G=S.pointsList;O.updateStartPoint(T),O.updateEndPoint(C),O.modelType!==dt.LINE_EDGE&&(O.pointsList=G,O.initPoints())}),Sn(En(u),"getAdjustPointStyle",function(){var O=u.props,S=O.graphModel.theme;return O.edgeModel,S.edgeAdjust}),u.state={dragging:!1,endX:0,endY:0},u.targetRuleResults=new Map,u.sourceRuleResults=new Map;var f=i.type,d=i.edgeModel,m=i.graphModel.eventCenter;return u.stepDragData={type:f,edgeData:d.getData()},u.stepDrag=new dr({onDragStart:u.onDragStart,onDragging:u.onDragging,onDragEnd:u.onDragEnd,eventType:"ADJUST_POINT",isStopPropagation:!1,eventCenter:m,data:u.stepDragData}),u}return t=a,(n=[{key:"isAllowAdjust",value:function(i){var u=this.props,f=u.edgeModel,d=f.id,m=f.sourceNode,O=f.targetNode,S=f.sourceAnchorId,T=f.targetAnchorId,C=u.type,G=null,W=null,ne=null,re=null;if(C===nr.SOURCE?(G=i.node,W=O,ne=i.anchor,re=O.getAnchorInfo(T)):(G=m,W=i.node,re=i.anchor,ne=m.getAnchorInfo(S)),this.preTargetNode&&this.preTargetNode!==i.node&&this.preTargetNode.setElementState(Ot.DEFAULT),this.preTargetNode=i.node,re.id===ne.id)return{pass:!1,msg:"",newTargetNode:W};var de="".concat(G.id,"_").concat(W.id,"_").concat(ne.id,"_").concat(re.id);if(!this.targetRuleResults.has(de)){var Oe=G.isAllowConnectedAsSource(W,ne,re,d),Ce=W.isAllowConnectedAsTarget(G,ne,re,d);this.sourceRuleResults.set(de,ei(Oe)),this.targetRuleResults.set(de,ei(Ce))}var Ee=this.sourceRuleResults.get(de),Xe=Ee.isAllPass,Ae=Ee.msg,Pe=this.targetRuleResults.get(de),Qe=Pe.isAllPass,yt=Pe.msg,Et=Xe&&Qe?Ot.ALLOW_CONNECT:Ot.NOT_ALLOW_CONNECT;return C===nr.SOURCE?G.setElementState(Et):W.setElementState(Et),{pass:Xe&&Qe,msg:yt||Ae,newTargetNode:W}}},{key:"render",value:function(){var i=this.props,u=i.x,f=i.y,d=i.getAdjustPointShape,m=i.edgeModel,O=this.state.dragging;return Object(te.g)("g",{pointerEvents:O?"none":"",onMouseDown:this.handleMouseDown},O?"":d(u,f,m))}}])&&R_(t.prototype,n),a}(te.a);function wl(e){return wl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wl(e)}function hi(){return hi=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},hi.apply(this,arguments)}function z_(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(i=a.next()).done)&&(f.push(i.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return Py(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Py(n,r)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Py(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function B_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function F_(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function xl(e,t){return xl=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},xl(e,t)}function V_(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=nu(e);if(t){var a=nu(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return H_(this,n)}}function H_(e,t){if(t&&(wl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Fn(e)}function Fn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function nu(e){return nu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},nu(e)}function rr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var yi=function(e){(function(i,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(u&&u.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),u&&xl(i,u)})(a,e);var t,n,r=V_(a);function a(){var i;B_(this,a);for(var u=arguments.length,f=new Array(u),d=0;d<u;d++)f[d]=arguments[d];return rr(Fn(i=r.call.apply(r,[this].concat(f))),"startTime",void 0),rr(Fn(i),"contextMenuTime",void 0),rr(Fn(i),"clickTimer",void 0),rr(Fn(i),"textRef",Object(te.f)()),rr(Fn(i),"handleHover",function(m,O){var S=i.props,T=S.model,C=S.graphModel.eventCenter;T.setHovered(m);var G=m?tt.EDGE_MOUSEENTER:tt.EDGE_MOUSELEAVE,W=T.getData();C.emit(G,{data:W,e:O})}),rr(Fn(i),"setHoverON",function(m){i.props.model.isHovered||(i.textRef&&i.textRef.current.setHoverON(),i.handleHover(!0,m))}),rr(Fn(i),"setHoverOFF",function(m){i.props.model.isHovered&&(i.textRef&&i.textRef.current.setHoverOFF(),i.handleHover(!1,m))}),rr(Fn(i),"handleContextMenu",function(m){m.preventDefault(),i.contextMenuTime=new Date().getTime(),i.clickTimer&&clearTimeout(i.clickTimer);var O=i.props,S=O.model,T=O.graphModel,C=T.getPointByClient({x:m.clientX,y:m.clientY});T.setElementStateById(S.id,Ot.SHOW_MENU,C.domOverlayPosition),i.toFront(),S.isSelected||T.selectEdgeById(S.id);var G=S==null?void 0:S.getData();T.eventCenter.emit(tt.EDGE_CONTEXTMENU,{data:G,e:m,position:C})}),rr(Fn(i),"handleMouseDown",function(m){m.stopPropagation(),i.startTime=new Date().getTime()}),rr(Fn(i),"handleMouseUp",function(m){if(i.startTime&&!(new Date().getTime()-i.startTime>200||m.button===2)){var O=m.detail===2,S=i.props,T=S.model,C=S.graphModel,G=T==null?void 0:T.getData(),W=C.getPointByClient({x:m.clientX,y:m.clientY});if(O){var ne=C.editConfigModel,re=C.textEditElement;if(re&&re.id===T.id&&C.setElementStateById(T.id,Ot.DEFAULT),ne.edgeTextEdit&&T.text.editable&&C.setElementStateById(T.id,Ot.TEXT_EDIT),T.modelType===dt.POLYLINE_EDGE){var de=T,Oe=C.getPointByClient({x:m.x,y:m.y}).canvasOverlayPosition,Ce=Oe.x,Ee=Oe.y,Xe=sd({x:Ce,y:Ee},de.points);de.dbClickPosition=Xe}C.eventCenter.emit(tt.EDGE_DBCLICK,{data:G,e:m,position:W})}else C.eventCenter.emit(tt.ELEMENT_CLICK,{data:G,e:m,position:W}),C.eventCenter.emit(tt.EDGE_CLICK,{data:G,e:m,position:W});var Ae=C.editConfigModel;C.selectEdgeById(T.id,sp(m,Ae)),i.toFront()}}),i}return t=a,(n=[{key:"getShape",value:function(){return Object(te.g)("g",null,this.getEdge())}},{key:"getTextStyle",value:function(){}},{key:"getText",value:function(){var i=this.props,u=i.model,f=i.graphModel;if(u.state===Ot.TEXT_EDIT)return null;var d=!1,m=f.editConfigModel;return(u.text.draggable||m.edgeTextDraggable)&&(d=!0),Object(te.g)(N_,{ref:this.textRef,editable:m.edgeTextEdit&&u.text.editable,model:u,graphModel:f,draggable:d})}},{key:"getArrowInfo",value:function(){var i=this.props.model,u=i.startPoint,f=i.endPoint,d=i.isSelected;return{start:u,end:f,hover:this.state.hover,isSelected:d}}},{key:"getLastTwoPoints",value:function(){var i=this.props.model;return[i.startPoint,i.endPoint]}},{key:"getArrowStyle",value:function(){return null}},{key:"getArrow",value:function(){var i=this.props.model,u=i.id,f=i.getArrowStyle(),d=f.refY,m=d===void 0?0:d,O=f.refX,S=O===void 0?2:O,T=z_(this.getLastTwoPoints(),2),C=T[0],G=T[1],W="auto";return C!==null&&G!==null&&(W=Cb({x:G.x-C.x,y:G.y-C.y,z:0})*(180/Math.PI)),Object(te.g)("g",null,Object(te.g)("defs",null,Object(te.g)("marker",{id:"marker-start-".concat(u),refX:-S,refY:m,overflow:"visible",orient:"auto",markerUnits:"userSpaceOnUse"},this.getStartArrow()),Object(te.g)("marker",{id:"marker-end-".concat(u),refX:S,refY:m,overflow:"visible",orient:W,markerUnits:"userSpaceOnUse"},this.getEndArrow())))}},{key:"getStartArrow",value:function(){var i=this.props.model.getArrowStyle(),u=i.stroke,f=i.strokeWidth,d=i.offset,m=i.verticalLength;return Object(te.g)("path",{stroke:u,fill:u,strokeWidth:f,d:"M 0 0 L ".concat(d," -").concat(m," L ").concat(d," ").concat(m," Z")})}},{key:"getEndArrow",value:function(){var i=this.props.model.getArrowStyle(),u=i.stroke,f=i.strokeWidth,d=i.offset,m=i.verticalLength;return Object(te.g)("path",{stroke:u,fill:u,strokeWidth:f,transform:"rotate(180)",d:"M 0 0 L ".concat(d," -").concat(m," L ").concat(d," ").concat(m," Z")})}},{key:"getAdjustPointShape",value:function(i,u,f){var d=f.getAdjustPointStyle();return Object(te.g)(ui,hi({className:"lf-edge-adjust-point"},d,{x:i,y:u}))}},{key:"getAdjustPoints",value:function(){var i=this.props,u=i.model,f=i.graphModel,d=u.getAdjustStart(),m=u.getAdjustEnd();return Object(te.g)("g",null,Object(te.g)(jy,hi({type:"SOURCE"},d,{getAdjustPointShape:this.getAdjustPointShape,edgeModel:u,graphModel:f})),Object(te.g)(jy,hi({type:"TARGET"},m,{getAdjustPointShape:this.getAdjustPointShape,edgeModel:u,graphModel:f})))}},{key:"getAnimation",value:function(){}},{key:"getAppendWidth",value:function(){return Object(te.g)("g",null)}},{key:"getAppend",value:function(){return Object(te.g)("g",{className:"lf-edge-append"},this.getAppendWidth())}},{key:"getEdge",value:function(){return null}},{key:"toFront",value:function(){var i=this.props,u=i.graphModel,f=i.model;u.overlapMode!==wn.INCREASE&&u.toFront(f.id)}},{key:"render",value:function(){var i=this.props,u=i.model,f=u.isSelected,d=u.isHitable,m=u.isShowAdjustPoint;return i.graphModel.animation,Object(te.g)("g",null,Object(te.g)("g",{className:["lf-edge",!d&&"pointer-none",f&&"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()),m&&f?this.getAdjustPoints():"")}}])&&F_(t.prototype,n),a}(te.a);function El(e){return El=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},El(e)}function X_(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(i=a.next()).done)&&(f.push(i.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return ky(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return ky(n,r)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function ky(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var gi=function(e){var t={d:""};return Object.entries(e).forEach(function(n){var r=X_(n,2),a=r[0],i=r[1],u=El(i);a!=="style"&&u==="object"||(t[a]=i)}),Object(te.g)("path",t)};function Sl(e){return Sl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sl(e)}function jl(){return jl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jl.apply(this,arguments)}function G_(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function U_(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Pl(e,t){return Pl=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Pl(e,t)}function Y_(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=ru(e);if(t){var a=ru(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return W_(this,n)}}function W_(e,t){if(t&&(Sl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function ru(e){return ru=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},ru(e)}var kl=function(e){(function(i,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(u&&u.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),u&&Pl(i,u)})(a,e);var t,n,r=Y_(a);function a(){return G_(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"getEdge",value:function(){var i=this.props.model,u=i.startPoint,f=i.endPoint,d=i.isAnimation,m=i.arrowConfig,O=i.getEdgeStyle(),S=i.getEdgeAnimationStyle(),T=S.strokeDasharray,C=S.stroke,G=S.strokeDashoffset,W=S.animationName,ne=S.animationDuration,re=S.animationIterationCount,de=S.animationTimingFunction,Oe=S.animationDirection;return Object(te.g)(_o,jl({},O,{x1:u.x,y1:u.y,x2:f.x,y2:f.y},m,d?{strokeDasharray:T,stroke:C,style:{strokeDashoffset:G,animationName:W,animationDuration:ne,animationIterationCount:re,animationTimingFunction:de,animationDirection:Oe}}:{}))}},{key:"getAppendWidth",value:function(){var i=this.props.model,u=function(T){var C,G=T.start,W=T.end;if(G.x===W.x&&G.y===W.y)C="";else{var ne={start:G,end:W,offset:10,verticalLength:5},re=ri(ca(ca({},ne),{},{type:"start"})),de=ri(ca(ca({},ne),{},{type:"end"}));C="M".concat(re.leftX," ").concat(re.leftY,`
|
||
L`).concat(re.rightX," ").concat(re.rightY,`
|
||
L`).concat(de.rightX," ").concat(de.rightY,`
|
||
L`).concat(de.leftX," ").concat(de.leftY," z")}return{d:C,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}}({start:i.startPoint,end:i.endPoint}),f=u.d,d=u.strokeWidth,m=u.fill,O=u.strokeDasharray,S=u.stroke;return Object(te.g)(gi,{d:f,fill:m,strokeWidth:d,stroke:S,strokeDasharray:O})}}])&&U_(t.prototype,n),a}(yi);function Tl(e){return Tl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tl(e)}function $_(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(i=a.next()).done)&&(f.push(i.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return Ty(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Ty(n,r)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Ty(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var K_=function(e){var t={points:"",fill:"none"};return Object.entries(e).forEach(function(n){var r=$_(n,2),a=r[0],i=r[1];(a==="style"||Tl(i)!=="object")&&(t[a]=i)}),Object(te.g)("polyline",t)};function Al(e){return Al=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Al(e)}function Ay(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function ou(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ay(Object(n),!0).forEach(function(r){Or(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ay(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ml(){return Ml=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ml.apply(this,arguments)}function q_(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(i=a.next()).done)&&(f.push(i.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return My(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return My(n,r)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function My(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Z_(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Dl(e,t){return Dl=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Dl(e,t)}function J_(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=iu(e);if(t){var a=iu(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Q_(this,n)}}function Q_(e,t){if(t&&(Al(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _r(e)}function _r(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function iu(e){return iu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},iu(e)}function Or(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Nl=function(e){(function(i,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(u&&u.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),u&&Dl(i,u)})(a,e);var t,n,r=J_(a);function a(){var i;return function(u,f){if(!(u instanceof f))throw new TypeError("Cannot call a class as a function")}(this,a),Or(_r(i=r.call(this)),"drag",void 0),Or(_r(i),"isDragging",void 0),Or(_r(i),"isShowAdjustPointTemp",void 0),Or(_r(i),"appendInfo",void 0),Or(_r(i),"onDragStart",function(){var u=i.props.model;u.dragAppendStart(),i.isShowAdjustPointTemp=u.isShowAdjustPoint,u.isShowAdjustPoint=!1}),Or(_r(i),"onDragging",function(u){var f=u.deltaX,d=u.deltaY,m=i.props,O=m.model,S=m.graphModel;i.isDragging=!0;var T=S.transformModel,C=S.editConfigModel,G=q_(T.fixDeltaXY(f,d),2),W=G[0],ne=G[1],re=O,de=C.adjustEdgeMiddle;i.appendInfo=de?re.dragAppendSimple(i.appendInfo,{x:W,y:ne}):re.dragAppend(i.appendInfo,{x:W,y:ne})}),Or(_r(i),"onDragEnd",function(){var u=i.props,f=u.model,d=u.graphModel.eventCenter,m=f;m.dragAppendEnd(),i.isDragging=!1,m.isShowAdjustPoint=i.isShowAdjustPointTemp,i.appendInfo=void 0,d.emit(tt.EDGE_ADJUST,{data:m.getData()})}),Or(_r(i),"beforeDragStart",function(u,f){f.dragAble&&i.drag.handleMouseDown(u),i.appendInfo=f}),i.drag=new dr({onDragStart:i.onDragStart,onDragging:i.onDragging,onDragEnd:i.onDragEnd,isStopPropagation:!1}),i}return t=a,(n=[{key:"getEdge",value:function(){var i=this.props.model,u=i.points,f=i.isAnimation,d=i.arrowConfig,m=i.getEdgeStyle(),O=i.getEdgeAnimationStyle(),S=O.strokeDasharray,T=O.stroke,C=O.strokeDashoffset,G=O.animationName,W=O.animationDuration,ne=O.animationIterationCount,re=O.animationTimingFunction,de=O.animationDirection;return Object(te.g)(K_,Ml({points:u},m,d,f?{strokeDasharray:S,stroke:T,style:{strokeDashoffset:C,animationName:G,animationDuration:W,animationIterationCount:ne,animationTimingFunction:re,animationDirection:de}}:{}))}},{key:"getArrowInfo",value:function(){var i=this.props.model,u=i.points,f=i.isSelected,d={start:null,end:null,hover:this.state.hover,isSelected:f},m=Jr(u);return m.length>=2&&(d.start=m[m.length-2],d.end=m[m.length-1]),d}},{key:"getLastTwoPoints",value:function(){var i=this.props.model.points,u=Jr(i);return u.length>=2?[u[u.length-2],u[u.length-1]]:[null,null]}},{key:"getAppendAttributes",value:function(i){var u,f=i.start,d=i.end;if(f.x===d.x&&f.y===d.y)u="";else{var m={start:f,end:d,offset:10,verticalLength:5},O=ri(ou(ou({},m),{},{type:"start"})),S=ri(ou(ou({},m),{},{type:"end"}));u="M".concat(O.leftX," ").concat(O.leftY,`
|
||
L`).concat(O.rightX," ").concat(O.rightY,`
|
||
L`).concat(S.rightX," ").concat(S.rightY,`
|
||
L`).concat(S.leftX," ").concat(S.leftY," z")}return{d:u,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}}},{key:"getAppendShape",value:function(i){var u=this.getAppendAttributes(i),f=u.d,d=u.strokeWidth,m=u.fill,O=u.strokeDasharray,S=u.stroke;return Object(te.g)(gi,{d:f,fill:m,strokeWidth:d,stroke:S,strokeDasharray:O})}},{key:"getAppendWidth",value:function(){for(var i=this,u=this.props,f=u.model,d=u.graphModel,m=f.pointsList,O=f.draggable,S=[],T=m.length,C=function(W){var ne="lf-polyline-append",re={start:{x:m[W].x,y:m[W].y},end:{x:m[W+1].x,y:m[W+1].y},startIndex:W,endIndex:W+1,direction:"",dragAble:!0},de=Object(te.g)("g",{className:ne},i.getAppendShape(re)),Oe=d.editConfigModel,Ce=Oe.adjustEdge,Ee=Oe.adjustEdgeMiddle;if(Ce&&O){var Xe=re.startIndex,Ae=re.endIndex,Pe=Ee&&(Xe===0||Ae===T-1);re.dragAble=!Pe,re.start.x===re.end.x?(re.dragAble&&(ne+="-ew-resize"),re.direction=At.VERTICAL):re.start.y===re.end.y&&(re.dragAble&&(ne+="-ns-resize"),re.direction=At.HORIZONTAL),de=Object(te.g)("g",{className:i.isDragging?"lf-dragging":"lf-drag-able",onMouseDown:function(Qe){return i.beforeDragStart(Qe,re)}},Object(te.g)("g",{className:ne},i.getAppendShape(re)))}S.push(de)},G=0;G<T-1;G++)C(G);return Object(te.g)("g",null,S)}}])&&Z_(t.prototype,n),a}(yi);function Cl(e){return Cl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cl(e)}function eO(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(i=a.next()).done)&&(f.push(i.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return Dy(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Dy(n,r)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Dy(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Rl(){return Rl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rl.apply(this,arguments)}function tO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Il(e,t){return Il=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Il(e,t)}function rO(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=au(e);if(t){var a=au(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return oO(this,n)}}function oO(e,t){if(t&&(Cl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function au(e){return au=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},au(e)}var Ll=function(e){(function(i,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(u&&u.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),u&&Il(i,u)})(a,e);var t,n,r=rO(a);function a(){return tO(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"getEdge",value:function(){var i=this.props.model,u=i.getEdgeStyle(),f=i.path,d=i.isAnimation,m=i.arrowConfig,O=i.getEdgeAnimationStyle(),S=O.strokeDasharray,T=O.stroke,C=O.strokeDashoffset,G=O.animationName,W=O.animationDuration,ne=O.animationIterationCount,re=O.animationTimingFunction,de=O.animationDirection;return Object(te.g)(gi,Rl({d:f},u,m,d?{strokeDasharray:S,stroke:T,style:{strokeDashoffset:C,animationName:G,animationDuration:W,animationIterationCount:ne,animationTimingFunction:re,animationDirection:de}}:{}))}},{key:"getAppendWidth",value:function(){var i=this.props.model.path;return Object(te.g)(gi,{d:i,strokeWidth:10,stroke:"transparent",fill:"none"})}},{key:"getArrowInfo",value:function(){var i=this.props.model,u=this.state.hover,f=i,d=f.path,m=f.isSelected,O=eO(ud(d),2);return{start:O[0],end:O[1],hover:u,isSelected:m}}},{key:"getLastTwoPoints",value:function(){var i=this.props.model.path;return ud(i)}}])&&nO(t.prototype,n),a}(yi);function zl(e){return zl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zl(e)}function Ny(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function iO(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aO(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Bl(e,t){return Bl=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Bl(e,t)}function sO(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=uu(e);if(t){var a=uu(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return cO(this,n)}}function cO(e,t){if(t&&(zl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(e)}function uu(e){return uu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},uu(e)}var lO=function(e){(function(i,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(u&&u.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),u&&Bl(i,u)})(a,e);var t,n,r=sO(a);function a(){return aO(this,a),r.apply(this,arguments)}return t=a,n=[{key:"getArrowAttributes",value:function(){var i=this.props,u=i.arrowInfo,f=i.style,d=u.start,m=u.end,O={start:d,end:m,offset:f.offset,verticalLength:f.verticalLength,type:"end"},S=ri(O),T=S.leftX,C=S.leftY,G=S.rightX,W=S.rightY;return function(ne){for(var re=1;re<arguments.length;re++){var de=arguments[re]!=null?arguments[re]:{};re%2?Ny(Object(de),!0).forEach(function(Oe){iO(ne,Oe,de[Oe])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ne,Object.getOwnPropertyDescriptors(de)):Ny(Object(de)).forEach(function(Oe){Object.defineProperty(ne,Oe,Object.getOwnPropertyDescriptor(de,Oe))})}return ne}({d:"M".concat(T," ").concat(C," L").concat(m.x," ").concat(m.y," L").concat(G," ").concat(W," z")},f)}},{key:"getShape",value:function(){var i=this.getArrowAttributes(),u=i.d,f=i.strokeWidth,d=i.stroke,m=i.fill;return Object(te.g)(gi,{d:u,fill:m,strokeWidth:f,stroke:d})}},{key:"render",value:function(){return Object(te.g)("g",{className:"lf-arrow"},this.getShape())}}],n&&uO(t.prototype,n),a}(te.a),Cy=function(e,t){return pe(e,t)},fO=function(e){var t=e==null?0:e.length;return t?e[t-1]:void 0},Fl=function(){return He.a.Date.now()},pO=/\s/,dO=function(e){for(var t=e.length;t--&&pO.test(e.charAt(t)););return t},hO=/^\s+/,yO=function(e){return e&&e.slice(0,dO(e)+1).replace(hO,"")},gO=/^[-+]0x[0-9a-f]+$/i,vO=/^0b[01]+$/i,bO=/^0o[0-7]+$/i,mO=parseInt,Ry=function(e){if(typeof e=="number")return e;if(ct(e))return NaN;if(Mt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Mt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=yO(e);var n=vO.test(e);return n||bO.test(e)?mO(e.slice(2),n?2:8):gO.test(e)?NaN:+e},_O=Math.max,OO=Math.min,wO=function(e,t,n){var r,a,i,u,f,d,m=0,O=!1,S=!1,T=!0;if(typeof e!="function")throw new TypeError("Expected a function");function C(Oe){var Ce=r,Ee=a;return r=a=void 0,m=Oe,u=e.apply(Ee,Ce)}function G(Oe){return m=Oe,f=setTimeout(ne,t),O?C(Oe):u}function W(Oe){var Ce=Oe-d;return d===void 0||Ce>=t||Ce<0||S&&Oe-m>=i}function ne(){var Oe=Fl();if(W(Oe))return re(Oe);f=setTimeout(ne,function(Ce){var Ee=t-(Ce-d);return S?OO(Ee,i-(Ce-m)):Ee}(Oe))}function re(Oe){return f=void 0,T&&r?C(Oe):(r=a=void 0,u)}function de(){var Oe=Fl(),Ce=W(Oe);if(r=arguments,a=this,d=Oe,Ce){if(f===void 0)return G(d);if(S)return clearTimeout(f),f=setTimeout(ne,t),C(d)}return f===void 0&&(f=setTimeout(ne,t)),u}return t=Ry(t)||0,Mt(n)&&(O=!!n.leading,i=(S="maxWait"in n)?_O(Ry(n.maxWait)||0,t):i,T="trailing"in n?!!n.trailing:T),de.cancel=function(){f!==void 0&&clearTimeout(f),m=0,r=d=a=f=void 0},de.flush=function(){return f===void 0?u:re(Fl())},de},xO=o(167);function EO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function zr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Iy,Ly,zy,SO=function(){function e(r){(function(a,i){if(!(a instanceof i))throw new TypeError("Cannot call a class as a function")})(this,e),zr(this,"undos",[]),zr(this,"redos",[]),zr(this,"callbacks",[]),zr(this,"stopWatch",null),zr(this,"curData",null),zr(this,"maxSize",50),zr(this,"waitTime",100),zr(this,"eventCenter",void 0),this.eventCenter=r}var t,n;return t=e,(n=[{key:"add",value:function(r){Cy(fO(this.undos),r)||(this.undos.push(r),Cy(this.curData,r)||(this.redos=[]),this.eventCenter.emit(tt.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 r=this.undos.pop();this.redos.push(r);var a=this.undos.pop();return this.curData=Dt(a),a}}},{key:"redoAble",value:function(){return this.redos.length>0}},{key:"redo",value:function(){if(this.redoAble()){var r=this.redos.pop();return this.curData=Dt(r),r}}},{key:"watch",value:function(r){var a=this;this.stopWatch&&this.stopWatch(),this.undos.push(r.modelToGraphData()),this.stopWatch=Object(xO.a)(r,wO(function(){var i=r.modelToHistoryData();i&&a.add(i)},this.waitTime))}}])&&EO(t.prototype,n),e}();function Vl(e){return Vl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vl(e)}function jO(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(i=a.next()).done)&&(f.push(i.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||function(n,r){if(n){if(typeof n=="string")return By(n,r);var a=Object.prototype.toString.call(n).slice(8,-1);if(a==="Object"&&n.constructor&&(a=n.constructor.name),a==="Map"||a==="Set")return Array.from(n);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return By(n,r)}}(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function By(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Fy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function Mo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Fy(Object(n),!0).forEach(function(r){to(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Vy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Hl(e,t){return Hl=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Hl(e,t)}function PO(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=su(e);if(t){var a=su(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return kO(this,n)}}function kO(e,t){if(t&&(Vl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Do(e)}function Do(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function su(e){return su=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},su(e)}function to(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Hy,Xy,Gy,Xl=Vn((zy=Ly=function(e){(function(u,f){if(typeof f!="function"&&f!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(f&&f.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),f&&Hl(u,f)})(i,e);var t,n,r,a=PO(i);function i(){var u;return function(f,d){if(!(f instanceof d))throw new TypeError("Cannot call a class as a function")}(this,i),to(Do(u=a.call(this)),"ref",Object(te.f)()),to(Do(u),"__prevText",{type:"",text:"",id:""}),to(Do(u),"keyupHandler",function(f){var d=u.props.graphModel.textEditElement;f.key==="Enter"&&f.altKey&&d.setElementState(0)}),to(Do(u),"inputHandler",function(f){var d=f.target.innerText,m=u.props.graphModel.textEditElement;u.__prevText={type:m.type,text:d.replace(/(\r\n)+$|(\n)+$/,""),id:m.id}}),to(Do(u),"keydownHandler",function(f){f.stopPropagation()}),u.state={style:{left:0,top:0}},u}return t=i,r=[{key:"getDerivedStateFromProps",value:function(u){var f,d=u.graphModel,m=d.transformModel,O=d.theme,S=d.textEditElement;if(S){var T;if((T=S.text)===null||T===void 0||!T.value)if(S.BaseType===Ht.EDGE){var C=(S=S).text,G=S.textPosition,W=G.x,ne=G.y;C.x=W,C.y=ne,S.setText(C)}else S=S;var re={resize:"auto",whiteSpace:"normal",wordBreak:"break-all"};if(S.BaseType===Ht.EDGE){var de=O.edgeText,Oe=de.overflowMode,Ce=de.lineHeight,Ee=de.wrapPadding,Xe=de.textWidth;Xe&&Oe==="autoWrap"&&(f=Mo(Mo({},re),{},{width:Xe,minWidth:Xe,lineHeight:Ce,padding:Ee}))}else if(S.BaseType===Ht.NODE){var Ae=O.nodeText,Pe=Ae.overflowMode,Qe=Ae.lineHeight,yt=Ae.wrapPadding,Et=Ae.textWidth,mt=S,jt=mt.width,Ft=mt.modelType;(Ft!==dt.TEXT_NODE&&Pe==="autoWrap"||Ft===dt.TEXT_NODE&&Et)&&(f=Mo(Mo({},re),{},{width:Et||jt,minWidth:Et||jt,lineHeight:Qe,padding:yt}))}var Wt=S.text,jn=Wt.x,or=Wt.y,Rn=jO(m.CanvasPointToHtmlPoint([jn,or]),2);return{style:Mo({left:Rn[0],top:Rn[1]},f)}}}}],(n=[{key:"componentDidUpdate",value:function(){var u=this.props.graphModel;if(this.ref.current&&(this.ref.current.focus(),this.placeCaretAtEnd(this.ref.current)),this.__prevText.id!==""){var f=this.__prevText,d=f.text,m=f.id;u.updateText(m,d),u.eventCenter.emit(tt.TEXT_UPDATE,Mo({},this.__prevText)),this.__prevText.id="",this.__prevText.text="",this.__prevText.type=""}}},{key:"placeCaretAtEnd",value:function(u){if(window.getSelection!==void 0&&document.createRange!==void 0){var f=document.createRange();f.selectNodeContents(u),f.collapse(!1);var d=window.getSelection();d.removeAllRanges(),d.addRange(f)}}},{key:"render",value:function(){var u,f=this.props.graphModel.textEditElement,d=this.state.style;return f?Object(te.g)("div",{contentEditable:!0,className:"lf-text-input",style:d,ref:this.ref,key:f.id,onKeyUp:this.keyupHandler,onKeyDown:this.keydownHandler,onKeyPress:this.keydownHandler,onInput:this.inputHandler},(u=f.text)===null||u===void 0?void 0:u.value):null}}])&&Vy(t.prototype,n),r&&Vy(t,r),i}(te.a),to(Ly,"toolName","textEdit"),Iy=zy))||Iy,TO=function(e){return e.modelType===dt.LINE_EDGE?function(t){var n=t.startPoint,r=t.endPoint,a=(n.x+r.x)/2,i=(n.y+r.y)/2,u=Math.abs(n.x-r.x)+10,f=Math.abs(n.y-r.y)+10;return{x:a-u/2,y:i-f/2,x1:a+u/2,y1:i+f/2}}(e):e.modelType===dt.POLYLINE_EDGE?function(t){var n=t.points,r=Jr(n),a=oi(r,8),i=a.x,u=a.y,f=a.width,d=a.height;return{x:i-f/2,y:u-d/2,x1:i+f/2,y1:u+d/2}}(e):e.modelType===dt.BEZIER_EDGE?function(t){var n=t.path,r=ga(n),a=oi(r,8),i=a.x,u=a.y,f=a.width,d=a.height;return{x:i-f/2,y:u-d/2,x1:i+f/2,y1:u+d/2}}(e):void 0};function Gl(e){return Gl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gl(e)}function Uy(e,t){return function(n){if(Array.isArray(n))return n}(e)||function(n,r){var a=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,u,f=[],d=!0,m=!1;try{for(a=a.call(n);!(d=(i=a.next()).done)&&(f.push(i.value),!r||f.length!==r);d=!0);}catch(O){m=!0,u=O}finally{try{d||a.return==null||a.return()}finally{if(m)throw u}}return f}}(e,t)||Yy(e,t)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function AO(e){return function(t){if(Array.isArray(t))return Ul(t)}(e)||function(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||Yy(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
||
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Yy(e,t){if(e){if(typeof e=="string")return Ul(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ul(e,t):void 0}}function Ul(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function MO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Yl(e,t){return Yl=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Yl(e,t)}function DO(e){var t=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var n,r=cu(e);if(t){var a=cu(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return NO(this,n)}}function NO(e,t){if(t&&(Gl(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vi(e)}function vi(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cu(e){return cu=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},cu(e)}function bi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Wl=Vn((Gy=Xy=function(e){(function(i,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(u&&u.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),u&&Yl(i,u)})(a,e);var t,n,r=DO(a);function a(i){var u;(function(O,S){if(!(O instanceof S))throw new TypeError("Cannot call a class as a function")})(this,a),bi(vi(u=r.call(this)),"stepDrag",void 0),bi(vi(u),"handleMouseDown",function(O){u.stepDrag.handleMouseDown(O)}),bi(vi(u),"onDragging",function(O){var S=O.deltaX,T=O.deltaY,C=u.props.graphModel,G=C.getSelectElements(!0);C.moveNodes(G.nodes.map(function(W){return W.id}),S,T)}),bi(vi(u),"handleContextMenu",function(O){O.preventDefault();var S=u.props,T=S.graphModel,C=S.graphModel,G=C.eventCenter,W=C.selectElements,ne=T.getPointByClient({x:O.clientX,y:O.clientY}),re={nodes:[],edges:[]};AO(W.values()).forEach(function(de){de.BaseType===Ht.NODE&&re.nodes.push(de.getData()),de.BaseType===Ht.EDGE&&re.edges.push(de.getData())}),G.emit(tt.SELECTION_CONTEXTMENU,{data:re,e:O,position:ne})});var f=i.graphModel,d=f.gridSize,m=f.eventCenter;return u.stepDrag=new dr({onDragging:u.onDragging,step:d,eventType:"SELECTION",eventCenter:m}),u}return t=a,(n=[{key:"render",value:function(){var i=this.props.graphModel,u=i.selectElements,f=i.transformModel;if(!(u.size<=1)){var d=Number.MAX_SAFE_INTEGER,m=Number.MAX_SAFE_INTEGER,O=Number.MIN_SAFE_INTEGER,S=Number.MIN_SAFE_INTEGER;u.forEach(function(W){var ne={x:0,y:0,x1:0,y1:0};W.BaseType===Ht.NODE&&(ne=function(re){var de=re.x,Oe=re.y,Ce=re.width,Ee=re.height;return{x:de-Ce/2,y:Oe-Ee/2,x1:de+Ce/2,y1:Oe+Ee/2}}(W)),W.BaseType===Ht.EDGE&&(ne=TO(W)),d=Math.min(d,ne.x),m=Math.min(m,ne.y),O=Math.max(O,ne.x1),S=Math.max(S,ne.y1)});var T=Uy(f.CanvasPointToHtmlPoint([d,m]),2);d=T[0],m=T[1];var C=Uy(f.CanvasPointToHtmlPoint([O,S]),2);O=C[0],S=C[1];var G={left:"".concat(d-10,"px"),top:"".concat(m-10,"px"),width:"".concat(O-d+20,"px"),height:"".concat(S-m+20,"px")};return Object(te.g)("div",{className:"lf-multiple-select",style:G,onMouseDown:this.handleMouseDown,onContextMenu:this.handleContextMenu})}}}])&&MO(t.prototype,n),a}(te.a),bi(Xy,"toolName","multipleSelect"),Hy=Gy))||Hy;function CO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function lu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var RO=function(){function e(r){(function(i,u){if(!(i instanceof u))throw new TypeError("Cannot call a class as a function")})(this,e),lu(this,"tools",void 0),lu(this,"components",void 0),lu(this,"toolMap",new Map),lu(this,"instance",void 0),this.instance=r,this.isDisabledTool(Xl.toolName)||this.registerTool(Xl.toolName,Xl),this.isDisabledTool(Wl.toolName)||this.registerTool(Wl.toolName,Wl);var a=r.graphModel;a.eventCenter.on("".concat(tt.GRAPH_TRANSFORM,",").concat(tt.NODE_CLICK,",").concat(tt.BLANK_CLICK," "),function(){var i=a.textEditElement,u=a.editConfigModel,f=u.edgeTextEdit,d=u.nodeTextEdit;(f||d)&&i&&a.textEditElement.setElementState(Ot.DEFAULT)})}var t,n;return t=e,(n=[{key:"isDisabledTool",value:function(r){return this.instance.options.disabledTools.indexOf(r)!==-1}},{key:"registerTool",value:function(r,a){this.toolMap.set(r,a)}},{key:"getTools",value:function(){return Array.from(this.toolMap.values())}},{key:"getInstance",value:function(){return this.instance}}])&&CO(t.prototype,n),e}(),IO=o(168),LO=o.n(IO);function zO(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function $l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Wy=function(){function e(r){(function(i,u){if(!(i instanceof u))throw new TypeError("Cannot call a class as a function")})(this,e),$l(this,"mousetrap",void 0),$l(this,"options",void 0),$l(this,"target",void 0),r.keyboard||(r.keyboard={enabled:!1}),this.options=r;var a=r.lf;this.target=a.container,this.mousetrap=new LO.a(this.target),r.keyboard.enabled&&this.enable(!0)}var t,n;return t=e,(n=[{key:"initShortcuts",value:function(){var r=this,a=this.options.keyboard.shortcuts;if(a)if(Zt(a))a.forEach(function(d){var m=d.keys,O=d.callback,S=d.action;return r.on(m,O,S)});else{var i=a.keys,u=a.callback,f=a.action;this.on(i,u,f)}}},{key:"on",value:function(r,a,i){this.mousetrap.bind(this.getKeys(r),a,i)}},{key:"disabled",get:function(){return this.options.keyboard.enabled!==!0}},{key:"off",value:function(r,a){this.mousetrap.unbind(this.getKeys(r),a)}},{key:"enable",value:function(r){(this.disabled||r)&&(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(r){var a=this;return(Array.isArray(r)?r:[r]).map(function(i){return a.formatKey(i)})}},{key:"formatKey",value:function(r){return r.toLowerCase().replace(/\s/g,"").replace("delete","del").replace("cmd","command")}}])&&zO(t.prototype,n),e}(),BO=Wy,wr=null;function $y(e,t){return e.x+=t,e.y+=t,e.text&&(e.text.x+=t,e.text.y+=t),e}function Ky(e,t){return e.startPoint&&(e.startPoint.x+=t,e.startPoint.y+=t),e.endPoint&&(e.endPoint.x+=t,e.endPoint.y+=t),e.pointsList&&e.pointsList.length>0&&e.pointsList.forEach(function(n){n.x+=t,n.y+=t}),e.text&&(e.text.x+=t,e.text.y+=t),e}function Kl(e){return Kl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kl(e)}function qy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,r)}return n}function mi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qy(Object(n),!0).forEach(function(r){Bt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Zy(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Bt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ql=function(){function e(a){var i,u,f=this;(function(d,m){if(!(d instanceof m))throw new TypeError("Cannot call a class as a function")})(this,e),Bt(this,"container",void 0),Bt(this,"width",void 0),Bt(this,"height",void 0),Bt(this,"graphModel",void 0),Bt(this,"history",void 0),Bt(this,"viewMap",new Map),Bt(this,"tool",void 0),Bt(this,"keyboard",void 0),Bt(this,"dnd",void 0),Bt(this,"options",void 0),Bt(this,"snaplineModel",void 0),Bt(this,"components",[]),Bt(this,"plugins",void 0),Bt(this,"extension",{}),Bt(this,"adapterIn",void 0),Bt(this,"adapterOut",void 0),Bt(this,"getView",function(d){return f.viewMap.get(d)}),a=Zd(a),this.options=a,this.container=this.initContainer(a.container),this.plugins=a.plugins,this.graphModel=new Yb(mi({},a)),this.tool=new RO(this),this.history=new SO(this.graphModel.eventCenter),this.dnd=new Hm({lf:this}),this.keyboard=new BO({lf:this,keyboard:a.keyboard}),a.snapline!==!1&&(this.snaplineModel=new uy(this.graphModel),i=this.graphModel.eventCenter,u=this.snaplineModel,i.on("node:mousemove",function(d){var m=d.data;u.setNodeSnapLine(m)}),i.on("node:mouseup",function(){u.clearSnapline()})),function(d,m){var O=d.keyboard,S=O.options.keyboard;O.on(["cmd + c","ctrl + c"],function(){if(!S.enabled||m.textEditElement)return!0;var T=d.options.guards,C=m.getSelectElements(!1);return T&&T.beforeClone&&!T.beforeClone(C)||C.nodes.length===0&&C.edges.length===0?(wr=null,!0):((wr=C).nodes.forEach(function(G){return $y(G,40)}),wr.edges.forEach(function(G){return Ky(G,40)}),!1)}),O.on(["cmd + v","ctrl + v"],function(){if(!S.enabled||m.textEditElement)return!0;if(wr&&(wr.nodes||wr.edges)){d.clearSelectElements();var T=d.addElements(wr);if(!T)return!0;T.nodes.forEach(function(C){return d.selectElementById(C.id,!0)}),T.edges.forEach(function(C){return d.selectElementById(C.id,!0)}),wr.nodes.forEach(function(C){return $y(C,40)}),wr.edges.forEach(function(C){return Ky(C,40)})}return!1}),O.on(["cmd + z","ctrl + z"],function(){return!S.enabled||!!m.textEditElement||(d.undo(),!1)}),O.on(["cmd + y","ctrl + y"],function(){return!S.enabled||!!m.textEditElement||(d.redo(),!1)}),O.on(["backspace"],function(){if(!S.enabled||m.textEditElement)return!0;var T=m.getSelectElements(!0);return d.clearSelectElements(),T.edges.forEach(function(C){return d.deleteEdge(C.id)}),T.nodes.forEach(function(C){return d.deleteNode(C.id)}),!1})}(this,this.graphModel),this.keyboard.initShortcuts(),this.defaultRegister(),this.installPlugins(a.disabledPlugins)}var t,n,r;return t=e,n=[{key:"register",value:function(a,i){var u=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2];if(typeof a=="string"){var f={BaseEdge:yi,BaseEdgeModel:ls,BaseNode:br,BaseNodeModel:vr,RectNode:Xc,RectNodeModel:xc,CircleNode:Wc,CircleNodeModel:oc,PolygonNode:Jc,PolygonNodeModel:mc,TextNode:ll,TextNodeModel:Pc,LineEdge:kl,LineEdgeModel:ys,DiamondNode:nl,DiamondNodeModel:cc,PolylineEdge:Nl,PolylineEdgeModel:ms,BezierEdge:Ll,BezierEdgeModel:Js,EllipseNode:ul,EllipseNodeModel:dc,HtmlNode:hl,HtmlNodeModel:Ac,h:te.g,type:a};this.viewMap.forEach(function(T){var C=T.extendKey;C&&(f[C]=T)}),this.graphModel.modelMap.forEach(function(T){var C=T.extendKey;C&&(f[C]=T)});var d=i(f),m=d.view,O=d.model,S=m;u&&!S.isObervered&&(S.isObervered=!0,S=Fe(S)),this.setView(a,S),this.graphModel.setModel(a,O)}else this.registerElement(a)}},{key:"registerElement",value:function(a){var i=a.view;a.isObserverView===!1||i.isObervered||(i.isObervered=!0,i=Fe(i)),this.setView(a.type,i),this.graphModel.setModel(a.type,a.model)}},{key:"batchRegister",value:function(){var a=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];i.forEach(function(u){a.registerElement(u)})}},{key:"defaultRegister",value:function(){this.registerElement({view:Xc,model:xc,type:"rect"}),this.registerElement({type:"circle",view:Wc,model:oc}),this.registerElement({type:"polygon",view:Jc,model:mc}),this.registerElement({type:"line",view:kl,model:ys}),this.registerElement({type:"polyline",view:Nl,model:ms}),this.registerElement({type:"bezier",view:Ll,model:Js}),this.registerElement({type:"text",view:ll,model:Pc}),this.registerElement({type:"ellipse",view:ul,model:dc}),this.registerElement({type:"diamond",view:nl,model:cc}),this.registerElement({type:"html",view:hl,model:Ac})}},{key:"selectElementById",value:function(a){var i=arguments.length>1&&arguments[1]!==void 0&&arguments[1],u=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2];this.graphModel.selectElementById(a,i),!i&&u&&this.graphModel.toFront(a)}},{key:"focusOn",value:function(a){var i=this.graphModel.transformModel,u=a.coordinate,f=a.id;if(!u){var d=this.getNodeModelById(f);d&&(u=d.getData());var m=this.getEdgeModelById(f);m&&(u=m.textPosition)}var O=u,S=O.x,T=O.y;i.focusOn(S,T,this.graphModel.width,this.graphModel.height)}},{key:"setTheme",value:function(a){this.graphModel.setTheme(a)}},{key:"resize",value:function(a,i){this.graphModel.resize(a,i),this.options.width=this.graphModel.width,this.options.height=this.graphModel.height}},{key:"setDefaultEdgeType",value:function(a){this.graphModel.setDefaultEdgeType(a)}},{key:"updateText",value:function(a,i){this.graphModel.updateText(a,i)}},{key:"deleteElement",value:function(a){var i,u,f,d=this.getModelById(a);return!!d&&(u=(f=(Bt(i={},Ht.NODE,this.deleteNode),Bt(i,Ht.EDGE,this.deleteEdge),i)[d.BaseType])===null||f===void 0?void 0:f.call(this,a))!==null&&u!==void 0&&u}},{key:"getModelById",value:function(a){return this.graphModel.getElement(a)}},{key:"getDataById",value:function(a){var i;return(i=this.graphModel.getElement(a))===null||i===void 0?void 0:i.getData()}},{key:"changeNodeType",value:function(a,i){this.graphModel.changeNodeType(a,i)}},{key:"changeEdgeType",value:function(a,i){this.graphModel.changeEdgeType(a,i)}},{key:"getNodeEdges",value:function(a){return this.graphModel.getNodeEdges(a)}},{key:"addNode",value:function(a){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:tt.NODE_ADD;return this.graphModel.addNode(a,i)}},{key:"deleteNode",value:function(a){var i=this.graphModel.getNodeModelById(a);if(!i)return!1;var u=i.getData(),f=this.options.guards,d=!f||!f.beforeDelete||f.beforeDelete(u);return d&&this.graphModel.deleteNode(a),d}},{key:"cloneNode",value:function(a){var i=this.graphModel.getNodeModelById(a).getData(),u=this.options.guards;if(!u||!u.beforeClone||u.beforeClone(i))return this.graphModel.cloneNode(a)}},{key:"changeNodeId",value:function(a,i){return this.graphModel.changeNodeId(a,i)}},{key:"getNodeModelById",value:function(a){return this.graphModel.getNodeModelById(a)}},{key:"getNodeDataById",value:function(a){var i;return(i=this.graphModel.getNodeModelById(a))===null||i===void 0?void 0:i.getData()}},{key:"addEdge",value:function(a){return this.graphModel.addEdge(a)}},{key:"deleteEdge",value:function(a){var i=this.options.guards,u=this.graphModel.edgesMap[a];if(!u)return!1;var f=u.model.getData(),d=!i||!i.beforeDelete||i.beforeDelete(f);return d&&this.graphModel.deleteEdgeById(a),d}},{key:"deleteEdgeByNodeId",value:function(a){var i=a.sourceNodeId,u=a.targetNodeId;i&&u?this.graphModel.deleteEdgeBySourceAndTarget(i,u):i?this.graphModel.deleteEdgeBySource(i):u&&this.graphModel.deleteEdgeByTarget(u)}},{key:"changeEdgeId",value:function(a,i){return this.graphModel.changeEdgeId(a,i)}},{key:"getEdgeModelById",value:function(a){var i;return(i=this.graphModel.edgesMap[a])===null||i===void 0?void 0:i.model}},{key:"getEdgeModels",value:function(a){var i=this.graphModel.edges,u=a.sourceNodeId,f=a.targetNodeId;if(u&&f){var d=[];return i.forEach(function(S){S.sourceNodeId===u&&S.targetNodeId===f&&d.push(S)}),d}if(u){var m=[];return i.forEach(function(S){S.sourceNodeId===u&&m.push(S)}),m}if(f){var O=[];return i.forEach(function(S){S.targetNodeId===f&&O.push(S)}),O}return[]}},{key:"getEdgeDataById",value:function(a){var i;return(i=this.getEdgeModelById(a))===null||i===void 0?void 0:i.getData()}},{key:"getNodeIncomingEdge",value:function(a){return this.graphModel.getNodeIncomingEdge(a)}},{key:"getNodeOutgoingEdge",value:function(a){return this.graphModel.getNodeOutgoingEdge(a)}},{key:"getNodeIncomingNode",value:function(a){return this.graphModel.getNodeIncomingNode(a)}},{key:"getNodeOutgoingNode",value:function(a){return this.graphModel.getNodeOutgoingNode(a)}},{key:"editText",value:function(a){this.graphModel.editText(a)}},{key:"setProperties",value:function(a,i){var u;(u=this.graphModel.getElement(a))===null||u===void 0||u.setProperties(en(i))}},{key:"deleteProperty",value:function(a,i){var u;(u=this.graphModel.getElement(a))===null||u===void 0||u.deleteProperty(i)}},{key:"getProperties",value:function(a){var i;return(i=this.graphModel.getElement(a))===null||i===void 0?void 0:i.getProperties()}},{key:"toFront",value:function(a){this.graphModel.toFront(a)}},{key:"setElementZIndex",value:function(a,i){return this.graphModel.setElementZIndex(a,i)}},{key:"addElements",value:function(a){for(var i=this,u=a.nodes,f=a.edges,d={},m={nodes:[],edges:[]},O=0;O<u.length;O++){var S=u[O],T=S.id,C=this.addNode(S);if(!C)return;T&&(d[T]=C.id),m.nodes.push(C)}return f.forEach(function(G){var W=G.sourceNodeId,ne=G.targetNodeId;d[W]&&(W=d[W]),d[ne]&&(ne=d[ne]);var re=i.graphModel.addEdge(mi(mi({},G),{},{sourceNodeId:W,targetNodeId:ne}));m.edges.push(re)}),m}},{key:"getAreaElement",value:function(a,i){var u=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],f=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],d=arguments.length>4&&arguments[4]!==void 0&&arguments[4];return this.graphModel.getAreaElement(a,i,u,f,d).map(function(m){return m.getData()})}},{key:"getSelectElements",value:function(){var a=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return this.graphModel.getSelectElements(a)}},{key:"clearSelectElements",value:function(){this.graphModel.clearSelectElements()}},{key:"getGraphData",value:function(){var a=this.graphModel.modelToGraphData();return this.adapterOut?this.adapterOut(a):a}},{key:"getGraphRawData",value:function(){return this.graphModel.modelToGraphData()}},{key:"clearData",value:function(){this.graphModel.clearData()}},{key:"updateEditConfig",value:function(a){this.graphModel.editConfigModel.updateEditConfig(a)}},{key:"getEditConfig",value:function(){return this.graphModel.editConfigModel.getConfig()}},{key:"getPointByClient",value:function(a,i){return this.graphModel.getPointByClient({x:a,y:i})}},{key:"undo",value:function(){if(this.history.undoAble()){var a=en(this.history.undo());this.clearSelectElements(),this.graphModel.graphDataToModel(a)}}},{key:"redo",value:function(){if(this.history.redoAble()){var a=en(this.history.redo());this.clearSelectElements(),this.graphModel.graphDataToModel(a)}}},{key:"zoom",value:function(a,i){return this.graphModel.transformModel.zoom(a,i)}},{key:"resetZoom",value:function(){this.graphModel.transformModel.resetZoom()}},{key:"setZoomMiniSize",value:function(a){this.graphModel.transformModel.setZoomMiniSize(a)}},{key:"setZoomMaxSize",value:function(a){this.graphModel.transformModel.setZoomMaxSize(a)}},{key:"getTransform",value:function(){var a=this.graphModel.transformModel;return{SCALE_X:a.SCALE_X,SCALE_Y:a.SCALE_Y,TRANSLATE_X:a.TRANSLATE_X,TRANSLATE_Y:a.TRANSLATE_Y}}},{key:"translate",value:function(a,i){this.graphModel.transformModel.translate(a,i)}},{key:"resetTranslate",value:function(){var a=this.graphModel.transformModel,i=a.TRANSLATE_X,u=a.TRANSLATE_Y;this.translate(-i,-u)}},{key:"translateCenter",value:function(){this.graphModel.translateCenter()}},{key:"fitView",value:function(a,i){i===void 0&&(i=a),this.graphModel.fitView(a,i)}},{key:"openEdgeAnimation",value:function(a){this.graphModel.openEdgeAnimation(a)}},{key:"closeEdgeAnimation",value:function(a){this.graphModel.closeEdgeAnimation(a)}},{key:"on",value:function(a,i){this.graphModel.eventCenter.on(a,i)}},{key:"off",value:function(a,i){this.graphModel.eventCenter.off(a,i)}},{key:"once",value:function(a,i){this.graphModel.eventCenter.once(a,i)}},{key:"emit",value:function(a,i){this.graphModel.eventCenter.emit(a,i)}},{key:"initContainer",value:function(a){var i=document.createElement("div");return i.style.position="relative",i.style.width="100%",i.style.height="100%",a.innerHTML="",a.appendChild(i),i}},{key:"installPlugins",value:function(){var a,i=this,u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],f=(a=this.plugins)!==null&&a!==void 0?a:e.extensions;f.forEach(function(d){var m=d.pluginName||d.name;u.indexOf(m)===-1&&i.installPlugin(d)})}},{key:"installPlugin",value:function(a){if(Kl(a)==="object"){var i=a.install,u=a.render;return i&&i.call(a,this,e),u&&this.components.push(u.bind(a)),void(this.extension[a.pluginName]=a)}var f=a,d=new f({lf:this,LogicFlow:e,options:this.options.pluginsOptions});d.render&&this.components.push(d.render.bind(d)),this.extension[f.pluginName]=d}},{key:"updateAttributes",value:function(a,i){this.graphModel.updateAttributes(a,i)}},{key:"createFakerNode",value:function(a){var i=this.graphModel.modelMap.get(a.type);if(i){var u=new i(mi(mi({},a),{},{virtual:!0}),this.graphModel);return this.graphModel.setFakerNode(u),u}}},{key:"removeFakerNode",value:function(){this.graphModel.removeFakerNode()}},{key:"setNodeSnapLine",value:function(a){this.snaplineModel&&this.snaplineModel.setNodeSnapLine(a)}},{key:"removeNodeSnapLine",value:function(){this.snaplineModel&&this.snaplineModel.clearSnapline()}},{key:"setView",value:function(a,i){this.viewMap.set(a,i)}},{key:"renderRawData",value:function(a){this.graphModel.graphDataToModel(en(a)),this.options.history!==!1&&this.history.watch(this.graphModel),Object(te.j)(Object(te.g)(Fm,{getView:this.getView,tool:this.tool,options:this.options,dnd:this.dnd,snaplineModel:this.snaplineModel,graphModel:this.graphModel}),this.container),this.emit(tt.GRAPH_RENDERED,this.graphModel.modelToGraphData())}},{key:"render",value:function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.adapterIn&&(a=this.adapterIn(a)),this.renderRawData(a)}}],r=[{key:"use",value:function(a){var i=a.pluginName;i||(i=a.name);var u=this.extensions.get(i);u&&u.destroy&&u.destroy(),this.extensions.set(i,a)}}],n&&Zy(t.prototype,n),r&&Zy(t,r),e}();function Vn(e){return Fe(e)}Bt(ql,"extensions",new Map),p.default=ql}])})})(Zl,Zl.exports);var qe=Zl.exports;const yu=HO(qe),$O=[{type:"bpmn:startEvent",text:"开始",class:"bpmn-start"},{type:"bpmn:endEvent",text:"结束",class:"bpmn-end"},{type:"bpmn:exclusiveGateway",text:"网关",class:"bpmn-exclusiveGateway"},{type:"bpmn:userTask",text:"用户",class:"bpmn-user"}];function KO(v,y){return y={exports:{}},v(y,y.exports),y.exports}var qO=KO(function(v){var y=v.exports=function(s,p){if(p||(p=16),s===void 0&&(s=128),s<=0)return"0";for(var o=Math.log(Math.pow(2,s))/Math.log(p),l=2;o===1/0;l*=2)o=Math.log(Math.pow(2,s/l))/Math.log(p)*l;for(var c=o-Math.floor(o),b="",l=0;l<Math.floor(o);l++){var _=Math.floor(Math.random()*p).toString(p);b=_+b}if(c){var E=Math.pow(p,c),_=Math.floor(Math.random()*E).toString(p);b=_+b}var w=parseInt(b,p);return w!==1/0&&w>=Math.pow(2,s)?y(s,p):b};y.rack=function(s,p,o){var l=function(b){var _=0;do{if(_++>10)if(o)s+=o;else throw new Error("too many ID collisions, use more bits");var E=y(s,p)}while(Object.hasOwnProperty.call(c,E));return c[E]=b,E},c=l.hats={};return l.get=function(b){return l.hats[b]},l.set=function(b,_){return l.hats[b]=_,l},l.bits=s||128,l.base=p||16,l}});function ir(v){if(!(this instanceof ir))return new ir(v);v=v||[128,36,1],this._seed=v.length?qO.rack(v[0],v[1],v[2]):v}ir.prototype.next=function(v){return this._seed(v||!0)};ir.prototype.nextPrefixed=function(v,y){var s;do s=v+this.next(!0);while(this.assigned(s));return this.claim(s,y),s};ir.prototype.claim=function(v,y){this._seed.set(v,y||!0)};ir.prototype.assigned=function(v){return this._seed.get(v)||!1};ir.prototype.unclaim=function(v){delete this._seed.hats[v]};ir.prototype.clear=function(){var v=this._seed.hats,y;for(y in v)this.unclaim(y)};var ZO=new ir([32,32,1]);function zo(){return ZO.next()}var jg=globalThis&&globalThis.__extends||function(){var v=function(y,s){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,o){p.__proto__=o}||function(p,o){for(var l in o)o.hasOwnProperty(l)&&(p[l]=o[l])},v(y,s)};return function(y,s){v(y,s);function p(){this.constructor=y}y.prototype=s===null?Object.create(s):(p.prototype=s.prototype,new p)}}(),JO=function(v){jg(y,v);function y(s,p){var o=this;return s.id||(s.id="Event_"+zo()),s.text||(s.text=""),s.text&&typeof s.text=="string"&&(s.text={value:s.text,x:s.x,y:s.y+40}),o=v.call(this,s,p)||this,o}return y.prototype.setAttributes=function(){this.r=18},y.prototype.getConnectedTargetRules=function(){var s=v.prototype.getConnectedTargetRules.call(this),p={message:"起始节点不能作为边的终点",validate:function(){return!1}};return s.push(p),s},y.extendKey="StartEventModel",y}(qe.CircleNodeModel),QO=function(v){jg(y,v);function y(){return v!==null&&v.apply(this,arguments)||this}return y.extendKey="StartEventNode",y}(qe.CircleNode),e1={type:"bpmn:startEvent",view:QO,model:JO},Pg=globalThis&&globalThis.__extends||function(){var v=function(y,s){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,o){p.__proto__=o}||function(p,o){for(var l in o)o.hasOwnProperty(l)&&(p[l]=o[l])},v(y,s)};return function(y,s){v(y,s);function p(){this.constructor=y}y.prototype=s===null?Object.create(s):(p.prototype=s.prototype,new p)}}(),mu=globalThis&&globalThis.__assign||function(){return mu=Object.assign||function(v){for(var y,s=1,p=arguments.length;s<p;s++){y=arguments[s];for(var o in y)Object.prototype.hasOwnProperty.call(y,o)&&(v[o]=y[o])}return v},mu.apply(this,arguments)},t1=function(v){Pg(y,v);function y(s,p){var o=this;return s.id||(s.id="Event_"+zo()),s.text||(s.text=""),s.text&&typeof s.text=="string"&&(s.text={value:s.text,x:s.x,y:s.y+40}),o=v.call(this,s,p)||this,o}return y.prototype.setAttributes=function(){this.r=18},y.prototype.getConnectedSourceRules=function(){var s=v.prototype.getConnectedSourceRules.call(this),p={message:"结束节点不能作为边的起点",validate:function(){return!1}};return s.push(p),s},y.extendKey="EndEventModel",y}(qe.CircleNodeModel),n1=function(v){Pg(y,v);function y(){return v!==null&&v.apply(this,arguments)||this}return y.prototype.getAnchorStyle=function(){return{visibility:"hidden"}},y.prototype.getShape=function(){var s=this.props.model,p=s.getNodeStyle(),o=s.x,l=s.y,c=s.r,b=v.prototype.getShape.call(this);return qe.h("g",{},b,qe.h("circle",mu(mu({},p),{cx:o,cy:l,r:c-5})))},y.extendKey="EndEventView",y}(qe.CircleNode),r1={type:"bpmn:endEvent",view:n1,model:t1},kg=globalThis&&globalThis.__extends||function(){var v=function(y,s){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,o){p.__proto__=o}||function(p,o){for(var l in o)o.hasOwnProperty(l)&&(p[l]=o[l])},v(y,s)};return function(y,s){v(y,s);function p(){this.constructor=y}y.prototype=s===null?Object.create(s):(p.prototype=s.prototype,new p)}}(),xi=globalThis&&globalThis.__assign||function(){return xi=Object.assign||function(v){for(var y,s=1,p=arguments.length;s<p;s++){y=arguments[s];for(var o in y)Object.prototype.hasOwnProperty.call(y,o)&&(v[o]=y[o])}return v},xi.apply(this,arguments)},o1=function(v){kg(y,v);function y(s,p){var o=this;return s.id||(s.id="Gateway_"+zo()),s.text||(s.text=""),s.text&&typeof s.text=="string"&&(s.text={value:s.text,x:s.x,y:s.y+40}),o=v.call(this,s,p)||this,o.points=[[25,0],[50,25],[25,50],[0,25]],o}return y.extendKey="ExclusiveGatewayModel",y}(qe.PolygonNodeModel),i1=function(v){kg(y,v);function y(){return v!==null&&v.apply(this,arguments)||this}return y.prototype.getShape=function(){var s=this.props.model,p=s.x,o=s.y,l=s.width,c=s.height,b=s.points,_=s.getNodeStyle();return qe.h("g",{transform:"matrix(1 0 0 1 "+(p-l/2)+" "+(o-c/2)+")"},qe.h("polygon",xi(xi({},_),{x:p,y:o,points:b})),qe.h("path",xi({d:"m 16,15 7.42857142857143,9.714285714285715 -7.42857142857143,9.714285714285715 3.428571428571429,0 5.714285714285715,-7.464228571428572 5.714285714285715,7.464228571428572 3.428571428571429,0 -7.42857142857143,-9.714285714285715 7.42857142857143,-9.714285714285715 -3.428571428571429,0 -5.714285714285715,7.464228571428572 -5.714285714285715,-7.464228571428572 -3.428571428571429,0 z"},_)))},y.extendKey="ExclusiveGatewayNode",y}(qe.PolygonNode),a1={type:"bpmn:exclusiveGateway",view:i1,model:o1},Tg=globalThis&&globalThis.__extends||function(){var v=function(y,s){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,o){p.__proto__=o}||function(p,o){for(var l in o)o.hasOwnProperty(l)&&(p[l]=o[l])},v(y,s)};return function(y,s){v(y,s);function p(){this.constructor=y}y.prototype=s===null?Object.create(s):(p.prototype=s.prototype,new p)}}(),_u=globalThis&&globalThis.__assign||function(){return _u=Object.assign||function(v){for(var y,s=1,p=arguments.length;s<p;s++){y=arguments[s];for(var o in y)Object.prototype.hasOwnProperty.call(y,o)&&(v[o]=y[o])}return v},_u.apply(this,arguments)},u1=function(v){Tg(y,v);function y(s,p){var o=this;return s.id||(s.id="Activity_"+zo()),o=v.call(this,s,p)||this,o}return y.extendKey="UserTaskModel",y}(qe.RectNodeModel),s1=function(v){Tg(y,v);function y(){return v!==null&&v.apply(this,arguments)||this}return y.prototype.getLabelShape=function(){var s=this.props.model,p=s.x,o=s.y,l=s.width,c=s.height,b=s.getNodeStyle();return qe.h("svg",{x:p-l/2+5,y:o-c/2+5,width:25,height:25,viewBox:"0 0 1274 1024"},qe.h("path",{fill:b.stroke,d:"M655.807326 287.35973m-223.989415 0a218.879 218.879 0 1 0 447.978829 0 218.879 218.879 0 1 0-447.978829 0ZM1039.955839 895.482975c-0.490184-212.177424-172.287821-384.030443-384.148513-384.030443-211.862739 0-383.660376 171.85302-384.15056 384.030443L1039.955839 895.482975z"}))},y.prototype.getShape=function(){var s=this.props.model,p=s.x,o=s.y,l=s.width,c=s.height,b=s.radius,_=s.getNodeStyle();return qe.h("g",{},[qe.h("rect",_u(_u({},_),{x:p-l/2,y:o-c/2,rx:b,ry:b,width:l,height:c})),this.getLabelShape()])},y.extendKey="UserTaskNode",y}(qe.RectNode),c1={type:"bpmn:userTask",view:s1,model:u1},Ag=globalThis&&globalThis.__extends||function(){var v=function(y,s){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,o){p.__proto__=o}||function(p,o){for(var l in o)o.hasOwnProperty(l)&&(p[l]=o[l])},v(y,s)};return function(y,s){v(y,s);function p(){this.constructor=y}y.prototype=s===null?Object.create(s):(p.prototype=s.prototype,new p)}}(),Jl=globalThis&&globalThis.__assign||function(){return Jl=Object.assign||function(v){for(var y,s=1,p=arguments.length;s<p;s++){y=arguments[s];for(var o in y)Object.prototype.hasOwnProperty.call(y,o)&&(v[o]=y[o])}return v},Jl.apply(this,arguments)},l1=function(v){Ag(y,v);function y(s,p){var o=this;return s.id||(s.id="Activity_"+zo()),o=v.call(this,s,p)||this,o}return y.extendKey="ServiceTaskModel",y}(qe.RectNodeModel),f1=function(v){Ag(y,v);function y(){return v!==null&&v.apply(this,arguments)||this}return y.prototype.getLabelShape=function(){var s=this.props.model,p=s.x,o=s.y,l=s.width,c=s.height,b=s.getNodeStyle();return qe.h("svg",{x:p-l/2+5,y:o-c/2+5,width:30,height:30,viewBox:"0 0 1274 1024"},qe.h("path",{fill:b.stroke,d:"M882.527918 434.149934c-2.234901-5.303796-7.311523-8.853645-13.059434-9.138124l-61.390185-3.009544c-6.635117-20.973684-15.521508-41.175795-26.513864-60.282968l42.051745-47.743374c4.308119-4.889357 4.955872-12.004405 1.602498-17.59268-46.384423-77.30362-103.969956-101.422947-106.400309-102.410438-5.332449-2.170432-11.432377-1.090844-15.693424 2.77009L654.674467 240.664222c-17.004279-8.654101-35.092239-15.756869-53.995775-21.210068l-3.26537-66.490344c-0.280386-5.747911-3.833305-10.824533-9.134031-13.059434-1.683339-0.709151-30.193673-12.391215-76.866668-12.051477-46.672996-0.339738-75.18333 11.342326-76.866668 12.051477-5.300726 2.234901-8.853645 7.311523-9.134031 13.059434l-3.26537 66.490344c-18.903535 5.453199-36.991496 12.555967-53.995775 21.210068l-48.450479-43.922349c-4.261047-3.860934-10.360975-4.940522-15.693424-2.77009-2.430352 0.98749-60.015885 25.106818-106.400309 102.410438-3.353374 5.588275-2.705622 12.703323 1.602498 17.59268l42.051745 47.743374c-10.992355 19.107173-19.878746 39.309284-26.513864 60.282968l-61.390185 3.009544c-5.747911 0.284479-10.824533 3.834328-13.059434 9.138124-1.01512 2.415003-24.687262 60.190871-2.822278 147.651828 1.583055 6.324032 7.072069 10.893094 13.57518 11.308557 5.892197 0.37146 11.751648 0.523933 17.419741 0.667196 14.498202 0.372483 28.193109 0.723477 40.908712 4.63353 4.212952 1.294482 6.435573 8.270361 9.349949 18.763342 1.287319 4.640694 2.617617 9.43693 4.484128 14.010085 1.794879 4.393054 3.75758 8.570189 5.66093 12.607132 1.302669 2.765997 2.529613 5.380544 3.689019 8.018627 2.986007 6.803963 2.682086 9.773598 2.578732 10.349719-3.061732 3.672646-6.391571 7.238868-9.91379 11.015891-1.810229 1.943258-3.680832 3.949962-5.523807 5.980201l-22.560832 24.8909c-3.865028 4.261047-4.940522 10.365068-2.774183 15.693424 0.991584 2.426259 25.102724 60.011792 102.414531 106.400309 5.588275 3.353374 12.703323 2.701528 17.591657-1.603521l23.476691-20.682042c2.346441-2.061962 4.64888-4.336772 6.875594-6.534833 9.05319-8.93858 14.018272-12.95608 17.73185-11.576663 3.305279 1.222851 6.907317 3.166109 10.720156 5.228071 3.325745 1.794879 6.764054 3.650133 10.465352 5.288446 6.016017 2.662643 12.120039 4.688789 18.019399 6.65149 6.827499 2.266623 13.279445 4.409426 18.819624 7.275707 1.518586 0.782829 1.926886 0.994654 2.358721 7.830339 0.726547 11.496845 1.25048 23.276123 1.753947 34.672684 0.264013 5.900384 0.528026 11.803837 0.815575 17.700127 0.284479 5.743818 3.833305 10.82044 9.138124 13.05534 1.654686 0.698918 29.371958 12.063757 74.869175 12.063757 0.328481 0 3.65832 0 3.986801 0 45.497217 0 73.214489-11.364839 74.869175-12.063757 5.304819-2.234901 8.853645-7.311523 9.138124-13.05534 0.287549-5.89629 0.551562-11.799744 0.815575-17.700127 0.503467-11.396561 1.027399-23.175839 1.753947-34.672684 0.431835-6.835685 0.840134-7.04751 2.358721-7.830339 5.54018-2.866281 11.992125-5.009084 18.819624-7.275707 5.89936-1.962701 12.003382-3.988848 18.019399-6.65149 3.701299-1.638313 7.139607-3.493567 10.465352-5.288446 3.812839-2.061962 7.414877-4.00522 10.720156-5.228071 3.713578-1.379417 8.67866 2.638083 17.73185 11.576663 2.226714 2.198062 4.529153 4.472871 6.875594 6.534833l23.476691 20.682042c4.888334 4.305049 12.003382 4.956895 17.591657 1.603521 77.311807-46.388517 101.422947-103.97405 102.414531-106.400309 2.166339-5.328355 1.090844-11.432377-2.774183-15.693424l-22.560832-24.8909c-1.842974-2.030239-3.713578-4.036943-5.523807-5.980201-3.52222-3.777023-6.852058-7.343245-9.91379-11.015891-0.103354-0.576121-0.407276-3.545756 2.578732-10.349719 1.159406-2.638083 2.38635-5.252631 3.689019-8.018627 1.90335-4.036943 3.866051-8.214079 5.66093-12.607132 1.866511-4.573155 3.196809-9.369392 4.484128-14.010085 2.914376-10.492982 5.136997-17.46886 9.349949-18.763342 12.715603-3.910053 26.41051-4.261047 40.908712-4.63353 5.668093-0.143263 11.527544-0.295735 17.419741-0.667196 6.503111-0.415462 11.992125-4.984524 13.57518-11.308557C907.21518 494.340805 883.543038 436.564937 882.527918 434.149934zM643.49894 643.761929c-35.280528 35.280528-82.191954 54.711066-132.086317 54.711066s-96.806813-19.430538-132.086317-54.711066c-35.280528-35.279504-54.711066-82.191954-54.711066-132.086317 0-49.894364 19.430538-96.80272 54.711066-132.082224 35.283598-35.284621 82.191954-54.711066 132.086317-54.711066s96.80579 19.426445 132.086317 54.711066c35.279504 35.279504 54.711066 82.187861 54.711066 132.082224C698.210006 561.569976 678.782537 608.482425 643.49894 643.761929z"}))},y.prototype.getShape=function(){var s=this.props.model,p=s.x,o=s.y,l=s.width,c=s.height,b=s.radius,_=s.getNodeStyle();return qe.h("g",{},[qe.h("rect",Jl({x:p-l/2,y:o-c/2,rx:b,ry:b,width:l,height:c},_)),this.getLabelShape()])},y.extendKey="ServiceTaskNode",y}(qe.RectNode),p1={type:"bpmn:serviceTask",view:f1,model:l1},Mg=globalThis&&globalThis.__extends||function(){var v=function(y,s){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,o){p.__proto__=o}||function(p,o){for(var l in o)o.hasOwnProperty(l)&&(p[l]=o[l])},v(y,s)};return function(y,s){v(y,s);function p(){this.constructor=y}y.prototype=s===null?Object.create(s):(p.prototype=s.prototype,new p)}}(),d1=function(v){Mg(y,v);function y(s,p){var o=this;return s.id||(s.id="Flow_"+zo()),o=v.call(this,s,p)||this,o}return y.extendKey="SequenceFlowModel",y}(qe.PolylineEdgeModel),h1=function(v){Mg(y,v);function y(){return v!==null&&v.apply(this,arguments)||this}return y.extendKey="SequenceFlowEdge",y}(qe.PolylineEdge),y1={type:"bpmn:sequenceFlow",view:h1,model:d1},eg={width:40,height:40},tg={width:40,height:40},ng={width:40,height:40},rg={width:100,height:80},og={width:100,height:80},g1={rect:{radius:5,stroke:"rgb(24, 125, 255)"},circle:{r:18,stroke:"rgb(24, 125, 255)"},polygon:{stroke:"rgb(24, 125, 255)"},polyline:{stroke:"rgb(24, 125, 255)",hoverStroke:"rgb(24, 125, 255)",selectedStroke:"rgb(24, 125, 255)"},edgeText:{background:{fill:"white",height:14,stroke:"transparent",radius:3}}},v1=function(){function v(y){var s=y.lf;s.setTheme(g1),s.register(e1),s.register(r1),s.register(a1),s.register(c1),s.register(p1),s.options.customBpmnEdge||(s.register(y1),s.setDefaultEdgeType("bpmn:sequenceFlow"))}return v.pluginName="bpmnElement",v}(),b1=function(){function v(y){var s=this,p=y.lf;this.lf=p,this.customCssRules="",this.useGlobalRules=!0,p.getSnapshot=function(o,l){s.getSnapshot(o,l)},p.getSnapshotBlob=function(o){return s.getSnapshotBlob(o)},p.getSnapshotBase64=function(o){return s.getSnapshotBase64(o)}}return v.prototype.getSvgRootElement=function(y){var s=this;this.offsetX=Number.MAX_SAFE_INTEGER,this.offsetY=Number.MAX_SAFE_INTEGER,y.graphModel.nodes.forEach(function(o){var l=o.x,c=o.width,b=o.y,_=o.height,E=l-c/2,w=b-_/2;E<s.offsetX&&(s.offsetX=E-5),w<s.offsetY&&(s.offsetY=w-5)}),y.graphModel.edges.forEach(function(o){o.pointsList&&o.pointsList.forEach(function(l){var c=l.x,b=l.y;c<s.offsetX&&(s.offsetX=c-5),b<s.offsetY&&(s.offsetY=b-5)})});var p=y.container.querySelector(".lf-canvas-overlay");return p},v.prototype.triggerDownload=function(y){var s=new MouseEvent("click",{view:window,bubbles:!1,cancelable:!0}),p=document.createElement("a");p.setAttribute("download",this.fileName),p.setAttribute("href",y),p.setAttribute("target","_blank"),p.dispatchEvent(s)},v.prototype.removeAnchor=function(y){for(var s=y.childNodes,p=y.childNodes&&y.childNodes.length,o=0;o<p;o++){var l=s[o],c=l.classList&&Array.from(l.classList)||[];c.indexOf("lf-anchor")>-1&&(y.removeChild(y.childNodes[o]),p--,o--)}},v.prototype.getSnapshot=function(y,s){var p=this;this.fileName=y||"logic-flow."+Date.now()+".png";var o=this.getSvgRootElement(this.lf);this.getCanvasData(o,s).then(function(l){var c=l.toDataURL("image/png").replace("image/png","image/octet-stream");p.triggerDownload(c)})},v.prototype.getSnapshotBase64=function(y){var s=this,p=this.getSvgRootElement(this.lf);return new Promise(function(o){s.getCanvasData(p,y).then(function(l){var c=l.toDataURL("image/png");o({data:c,width:l.width,height:l.height})})})},v.prototype.getSnapshotBlob=function(y){var s=this,p=this.getSvgRootElement(this.lf);return new Promise(function(o){s.getCanvasData(p,y).then(function(l){l.toBlob(function(c){o({data:c,width:l.width,height:l.height})},"image/png")})})},v.prototype.getClassRules=function(){var y="";if(this.useGlobalRules)for(var s=document.styleSheets,p=0;p<s.length;p++)for(var o=s[p],l=0;l<o.cssRules.length;l++)y+=o.cssRules[l].cssText;return this.customCssRules&&(y+=this.customCssRules),y},v.prototype.getCanvasData=function(y,s){var p=this,o=y.cloneNode(!0),l=o.lastChild,c=l.childNodes&&l.childNodes.length;if(c)for(var b=0;b<c;b++){var _=l.childNodes[b],E=_.classList&&Array.from(_.classList);if(E&&E.indexOf("lf-base")<0)l.removeChild(l.childNodes[b]),c--,b--;else{var w=l.childNodes[b];w&&w.childNodes.forEach(function(M){var z=M;p.removeAnchor(z.firstChild)})}}o.lastChild.style.transform="matrix(1, 0, 0, 1, "+(-this.offsetX+10)+", "+(-this.offsetY+10)+")";var k=window.devicePixelRatio||1,j=document.createElement("canvas"),P=this.lf.graphModel.rootEl.querySelector(".lf-base"),D=P.getBoundingClientRect(),N=this.lf.graphModel,I=N.transformModel,B=I.SCALE_X,H=I.SCALE_Y,ee=Math.ceil(D.width/B),ie=Math.ceil(D.height/H);j.style.width=ee+"px",j.style.height=ie+"px",j.width=ee*k+80,j.height=ie*k+80;var q=j.getContext("2d");q.clearRect(0,0,j.width,j.height),q.scale(k,k),s?(q.fillStyle=s,q.fillRect(0,0,ee*k+80,ie*k+80)):q.clearRect(0,0,ee,ie);var Y=new Image,K=document.createElement("style");K.innerHTML=this.getClassRules();var L=document.createElement("foreignObject");return L.appendChild(K),o.appendChild(L),new Promise(function(M){Y.onload=function(){var F=navigator.userAgent.indexOf("Firefox")>-1;try{F?createImageBitmap(Y,{resizeWidth:j.width,resizeHeight:j.height}).then(function(J){q.drawImage(J,0,0),M(j)}):(q.drawImage(Y,0,0),M(j))}catch{q.drawImage(Y,0,0),M(j)}};var z="data:image/svg+xml;charset=utf-8,"+new XMLSerializer().serializeToString(o),R=z.replace(/\n/g,"").replace(/\t/g,"").replace(/#/g,"%23");Y.src=R})},v.pluginName="snapshot",v}(),m1=new ir([32,32,1]);function ig(){return m1.next()}function Dg(v){return Object.prototype.toString.call(v)}function _1(v){return" ".repeat(v)}function Ou(v){var y=v;return Dg(v)==="[object Object]"?(y={},Object.keys(v).forEach(function(s){var p=s;s.charAt(0)==="-"&&(p=s.substring(1)),y[p]=Ou(v[s])})):Array.isArray(v)&&(y=[],v.forEach(function(s,p){y[p]=Ou(s)})),y}function O1(v){var y=v;try{typeof y!="string"&&(y=JSON.parse(v))}catch{y=JSON.stringify(Ou(v)).replace(/"/g,"'")}return y}var Co=`
|
||
`;function gu(v,y,s){var p=_1(s),o="";if(y==="#text")return Co+p+v;if(y==="#cdata-section")return Co+p+"<![CDATA["+v+"]]>";if(y==="#comment")return Co+p+"<!--"+v+"-->";if((""+y).charAt(0)==="-")return" "+y.substring(1)+'="'+O1(v)+'"';if(Array.isArray(v))v.forEach(function(_){o+=gu(_,y,s+1)});else if(Dg(v)==="[object Object]"){var l=Object.keys(v),c="",b="";o+=(s===0?"":Co+p)+"<"+y,l.forEach(function(_){_.charAt(0)==="-"?c+=gu(v[_],_,s+1):b+=gu(v[_],_,s+1)}),o+=c+(b!==""?">"+b+(Co+p)+"</"+y+">":" />")}else o+=Co+p+("<$"+y+">"+v.toString()+"</"+y+">");return o}function w1(v){var y=`<LogicFlow>
|
||
`;for(var s in v)y+=gu(v[s],s,0);return y+`
|
||
</LogicFlow>`}var fn=function(){};fn.ObjTree=function(){return this};fn.ObjTree.VERSION="0.23";fn.ObjTree.prototype.xmlDecl=`<?xml version="1.0" encoding="UTF-8" ?>
|
||
`;fn.ObjTree.prototype.attr_prefix="-";fn.ObjTree.prototype.parseXML=function(v){var y;if(window.DOMParser){var s=new DOMParser,p=s.parseFromString(v,"application/xml");if(!p)return;y=p.documentElement}else window.ActiveXObject&&(s=new ActiveXObject("Microsoft.XMLDOM"),s.async=!1,s.loadXML(v),y=s.documentElement);if(y)return this.parseDOM(y)};fn.ObjTree.prototype.parseHTTP=function(v,y,s){var p={};for(var o in y)p[o]=y[o];if(p.method||(typeof p.postBody>"u"&&typeof p.postbody>"u"&&typeof p.parameters>"u"?p.method="get":p.method="post"),s){p.asynchronous=!0;var l=this,c=s,b=p.onComplete;p.onComplete=function(w){var k;w&&w.responseXML&&w.responseXML.documentElement&&(k=l.parseDOM(w.responseXML.documentElement)),c(k,w),b&&b(w)}}else p.asynchronous=!1;var _;if(typeof HTTP<"u"&&HTTP.Request){p.uri=v;var E=new HTTP.Request(p);E&&(_=E.transport)}else if(typeof Ajax<"u"&&Ajax.Request){var E=new Ajax.Request(v,p);E&&(_=E.transport)}if(s)return _;if(_&&_.responseXML&&_.responseXML.documentElement)return this.parseDOM(_.responseXML.documentElement)};fn.ObjTree.prototype.parseDOM=function(v){if(v){if(this.__force_array={},this.force_array)for(var y=0;y<this.force_array.length;y++)this.__force_array[this.force_array[y]]=1;var s=this.parseElement(v);if(this.__force_array[v.nodeName]&&(s=[s]),v.nodeType!=11){var p={};p[v.nodeName]=s,s=p}return s.LogicFlow}};fn.ObjTree.prototype.parseElement=function(v){if(v.nodeType!=7){if(v.nodeType==3||v.nodeType==4||v.nodeType==8){var y=v.nodeValue.match(/[^\x00-\x20]/);return y==null?void 0:v.nodeValue}var s=null,p={};if(v.attributes&&v.attributes.length){s={};for(var o=0;o<v.attributes.length;o++){var l=v.attributes[o].nodeName;if(typeof l=="string"){var c=v.attributes[o].nodeValue;try{c=JSON.parse(v.attributes[o].nodeValue.replace(/'/g,'"'))}catch{c=v.attributes[o].nodeValue}c&&(l=this.attr_prefix+l,typeof p[l]>"u"&&(p[l]=0),p[l]++,this.addNode(s,l,p[l],c))}}}if(v.childNodes&&v.childNodes.length){var b=!0;s&&(b=!1);for(var o=0;o<v.childNodes.length&&b;o++){var _=v.childNodes[o].nodeType;_==3||_==4||_==8||(b=!1)}if(b){s||(s="");for(var o=0;o<v.childNodes.length;o++)s+=v.childNodes[o].nodeValue}else{s||(s={});for(var o=0;o<v.childNodes.length;o++){var l=v.childNodes[o].nodeName;if(typeof l=="string"){var c=this.parseElement(v.childNodes[o]);c&&(typeof p[l]>"u"&&(p[l]=0),p[l]++,this.addNode(s,l,p[l],c))}}}}else s===null&&(s={});return s}};fn.ObjTree.prototype.addNode=function(v,y,s,p){this.__force_array[y]?(s==1&&(v[y]=[]),v[y][v[y].length]=p):s==1?v[y]=p:s==2?v[y]=[v[y],p]:v[y][v[y].length]=p};fn.ObjTree.prototype.writeXML=function(v){var y=this.hash_to_xml(null,v);return this.xmlDecl+y};fn.ObjTree.prototype.hash_to_xml=function(v,y){var s=[],p=[];for(var o in y)if(y.hasOwnProperty(o)){var l=y[o];o.charAt(0)!=this.attr_prefix?typeof l>"u"||l==null?s[s.length]="<"+o+" />":typeof l=="object"&&l.constructor==Array?s[s.length]=this.array_to_xml(o,l):typeof l=="object"?s[s.length]=this.hash_to_xml(o,l):s[s.length]=this.scalar_to_xml(o,l):p[p.length]=" "+o.substring(1)+'="'+this.xml_escape(l)+'"'}var c=p.join(""),b=s.join("");return typeof v>"u"||v==null||(s.length>0?b.match(/\n/)?b="<"+v+c+`>
|
||
`+b+"</"+v+`>
|
||
`:b="<"+v+c+">"+b+"</"+v+`>
|
||
`:b="<"+v+c+` />
|
||
`),b};fn.ObjTree.prototype.array_to_xml=function(v,y){for(var s=[],p=0;p<y.length;p++){var o=y[p];typeof o>"u"||o==null?s[s.length]="<"+v+" />":typeof o=="object"&&o.constructor==Array?s[s.length]=this.array_to_xml(v,o):typeof o=="object"?s[s.length]=this.hash_to_xml(v,o):s[s.length]=this.scalar_to_xml(v,o)}return s.join("")};fn.ObjTree.prototype.scalar_to_xml=function(v,y){return v=="#text"?this.xml_escape(y):"<"+v+">"+this.xml_escape(y)+"</"+v+`>
|
||
`};fn.ObjTree.prototype.xml_escape=function(v){return v.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"')};var x1=function(v){return new fn.ObjTree().parseXML(v)},E1=globalThis&&globalThis.__extends||function(){var v=function(y,s){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,o){p.__proto__=o}||function(p,o){for(var l in o)o.hasOwnProperty(l)&&(p[l]=o[l])},v(y,s)};return function(y,s){v(y,s);function p(){this.constructor=y}y.prototype=s===null?Object.create(s):(p.prototype=s.prototype,new p)}}(),Ql=globalThis&&globalThis.__assign||function(){return Ql=Object.assign||function(v){for(var y,s=1,p=arguments.length;s<p;s++){y=arguments[s];for(var o in y)Object.prototype.hasOwnProperty.call(y,o)&&(v[o]=y[o])}return v},Ql.apply(this,arguments)},Pu=globalThis&&globalThis.__read||function(v,y){var s=typeof Symbol=="function"&&v[Symbol.iterator];if(!s)return v;var p=s.call(v),o,l=[],c;try{for(;(y===void 0||y-- >0)&&!(o=p.next()).done;)l.push(o.value)}catch(b){c={error:b}}finally{try{o&&!o.done&&(s=p.return)&&s.call(p)}finally{if(c)throw c.error}}return l},ar;(function(v){v.START="bpmn:startEvent",v.END="bpmn:endEvent",v.GATEWAY="bpmn:exclusiveGateway",v.USER="bpmn:userTask",v.SYSTEM="bpmn:serviceTask",v.FLOW="bpmn:sequenceFlow"})(ar||(ar={}));var Ng=["-name","-id","bpmn:incoming","bpmn:outgoing","-sourceRef","-targetRef"],ag=["properties","startPoint","endPoint","pointsList"];function ug(v){var y=v?ag.concat(v):ag;return function(s){function p(o){var l={};return typeof o=="string"?o:Array.isArray(o)?o.map(function(c){return p(c)}):(Object.entries(o).forEach(function(c){var b=Pu(c,2),_=b[0],E=b[1];typeof E!="object"?_.indexOf("-")===0||["#text","#cdata-section","#comment"].includes(_)?l[_]=E:l["-"+_]=E:y.includes(_)?l["-"+_]=p(E):l[_]=p(E)}),l)}return p(s)}}function wu(v){var y={};return Object.entries(v).forEach(function(s){var p=Pu(s,2),o=p[0],l=p[1];o.indexOf("-")===0?y[o.substring(1)]=Ou(l):typeof l=="string"?y[o]=l:Object.prototype.toString.call(l)==="[object Object]"?y[o]=wu(l):Array.isArray(l)?y[o]=l.map(function(c){return wu(c)}):y[o]=l}),y}function S1(v,y){var s=new Map;y.nodes.forEach(function(o){var l,c={"-id":o.id};if(!((l=o.text)===null||l===void 0)&&l.value&&(c["-name"]=o.text.value),o.properties){var b=ug()(o.properties);Object.assign(c,b)}s.set(o.id,c),v[o.type]?Array.isArray(v[o.type])?v[o.type].push(c):v[o.type]=[v[o.type],c]:v[o.type]=c});var p=y.edges.map(function(o){var l,c,b=s.get(o.targetNodeId);b["bpmn:incoming"]?Array.isArray(b["bpmn:incoming"])?b["bpmn:incoming"].push(o.id):b["bpmn:incoming"]=[b["bpmn:incoming"],o.id]:b["bpmn:incoming"]=o.id;var _={"-id":o.id,"-sourceRef":o.sourceNodeId,"-targetRef":o.targetNodeId};if(!((l=o.text)===null||l===void 0)&&l.value&&(_["-name"]=(c=o.text)===null||c===void 0?void 0:c.value),o.properties){var E=ug()(o.properties);Object.assign(_,E)}return _});y.edges.forEach(function(o){var l=s.get(o.sourceNodeId);l["bpmn:outgoing"]?Array.isArray(l["bpmn:outgoing"])?l["bpmn:outgoing"].push(o.id):l["bpmn:outgoing"]=[l["bpmn:outgoing"],o.id]:l["bpmn:outgoing"]=o.id}),v[ar.FLOW]=p}function j1(v,y){v["bpmndi:BPMNEdge"]=y.edges.map(function(s){var p,o=s.id,l=s.pointsList.map(function(b){var _=b.x,E=b.y;return{"-x":_,"-y":E}}),c={"-id":o+"_di","-bpmnElement":o,"di:waypoint":l};return!((p=s.text)===null||p===void 0)&&p.value&&(c["bpmndi:BPMNLabel"]={"dc:Bounds":{"-x":s.text.x-s.text.value.length*10/2,"-y":s.text.y-7,"-width":s.text.value.length*10,"-height":14}}),c}),v["bpmndi:BPMNShape"]=y.nodes.map(function(s){var p,o=s.id,l=100,c=80,b=s.x,_=s.y,E=Hr.shapeConfigMap.get(s.type);E&&(l=E.width,c=E.height),b-=l/2,_-=c/2;var w={"-id":o+"_di","-bpmnElement":o,"dc:Bounds":{"-x":b,"-y":_,"-width":l,"-height":c}};return!((p=s.text)===null||p===void 0)&&p.value&&(w["bpmndi:BPMNLabel"]={"dc:Bounds":{"-x":s.text.x-s.text.value.length*10/2,"-y":s.text.y-7,"-width":s.text.value.length*10,"-height":14}}),w})}function P1(v){var y=[],s=[],p=v["bpmn:definitions"];if(p){var o=p["bpmn:process"];Object.keys(o).forEach(function(l){if(l.indexOf("bpmn:")===0){var c=o[l];if(l===ar.FLOW){var b=p["bpmndi:BPMNDiagram"]["bpmndi:BPMNPlane"]["bpmndi:BPMNEdge"];s=T1(c,b)}else{var _=p["bpmndi:BPMNDiagram"]["bpmndi:BPMNPlane"]["bpmndi:BPMNShape"];y=y.concat(k1(c,_,l))}}})}return{nodes:y,edges:s}}function k1(v,y,s){var p=[];if(Array.isArray(v))v.forEach(function(c){var b;Array.isArray(y)?b=y.find(function(E){return E["-bpmnElement"]===c["-id"]}):b=y;var _=sg(b,s,c);p.push(_)});else{var o=void 0;Array.isArray(y)?o=y.find(function(c){return c["-bpmnElement"]===v["-id"]}):o=y;var l=sg(o,s,v);p.push(l)}return p}function sg(v,y,s){var p=Number(v["dc:Bounds"]["-x"]),o=Number(v["dc:Bounds"]["-y"]),l=s["-name"],c=Hr.shapeConfigMap.get(y);c&&(p+=c.width/2,o+=c.height/2);var b;Object.entries(s).forEach(function(k){var j=Pu(k,2),P=j[0],D=j[1];Ng.indexOf(P)===-1&&(b||(b={}),b[P]=D)}),b&&(b=wu(b));var _;if(l&&(_={x:p,y:o,value:l},v["bpmndi:BPMNLabel"]&&v["bpmndi:BPMNLabel"]["dc:Bounds"])){var E=v["bpmndi:BPMNLabel"]["dc:Bounds"];_.x=Number(E["-x"])+Number(E["-width"])/2,_.y=Number(E["-y"])+Number(E["-height"])/2}var w={id:v["-bpmnElement"],type:y,x:p,y:o,properties:b};return _&&(w.text=_),w}function T1(v,y){var s=[];if(Array.isArray(v))v.forEach(function(o){var l;Array.isArray(y)?l=y.find(function(c){return c["-bpmnElement"]===o["-id"]}):l=y,s.push(cg(l,o))});else{var p=void 0;Array.isArray(y)?p=y.find(function(o){return o["-bpmnElement"]===v["-id"]}):p=y,s.push(cg(p,v))}return s}function cg(v,y){var s,p=y["-name"];if(p){var o=v["bpmndi:BPMNLabel"]["dc:Bounds"],l=0;p.split(`
|
||
`).forEach(function(_){l<_.length&&(l=_.length)}),s={value:p,x:Number(o["-x"])+l*10/2,y:Number(o["-y"])+7}}var c;Object.entries(y).forEach(function(_){var E=Pu(_,2),w=E[0],k=E[1];Ng.indexOf(w)===-1&&(c||(c={}),c[w]=k)}),c&&(c=wu(c));var b={id:y["-id"],type:ar.FLOW,pointsList:v["di:waypoint"].map(function(_){return{x:Number(_["-x"]),y:Number(_["-y"])}}),sourceNodeId:y["-sourceRef"],targetNodeId:y["-targetRef"],properties:c};return s&&(b.text=s),b}var Hr=function(){function v(y){var s=this,p=y.lf;this.adapterOut=function(o){var l=Ql({},s.processAttributes);S1(l,o);var c={"-id":"BPMNPlane_1","-bpmnElement":l["-id"]};j1(c,o);var b=s.definitionAttributes;b["bpmn:process"]=l,b["bpmndi:BPMNDiagram"]={"-id":"BPMNDiagram_1","bpmndi:BPMNPlane":c};var _={"bpmn:definitions":b};return _},this.adapterIn=function(o){if(o)return P1(o)},p.adapterIn=function(o){return s.adapterIn(o)},p.adapterOut=function(o){return s.adapterOut(o)},this.processAttributes={"-isExecutable":"true","-id":"Process_"+ig()},this.definitionAttributes={"-id":"Definitions_"+ig(),"-xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance","-xmlns:bpmn":"http://www.omg.org/spec/BPMN/20100524/MODEL","-xmlns:bpmndi":"http://www.omg.org/spec/BPMN/20100524/DI","-xmlns:dc":"http://www.omg.org/spec/DD/20100524/DC","-xmlns:di":"http://www.omg.org/spec/DD/20100524/DI","-targetNamespace":"http://logic-flow.org","-exporter":"logicflow","-exporterVersion":"1.2.0"}}return v.prototype.setCustomShape=function(y,s){v.shapeConfigMap.set(y,s)},v.pluginName="bpmn-adapter",v.shapeConfigMap=new Map,v}();Hr.shapeConfigMap.set(ar.START,{width:eg.width,height:eg.height});Hr.shapeConfigMap.set(ar.END,{width:tg.width,height:tg.height});Hr.shapeConfigMap.set(ar.GATEWAY,{width:ng.width,height:ng.height});Hr.shapeConfigMap.set(ar.SYSTEM,{width:rg.width,height:rg.height});Hr.shapeConfigMap.set(ar.USER,{width:og.width,height:og.height});(function(v){E1(y,v);function y(s){var p=v.call(this,s)||this;p.adapterXmlIn=function(l){var c=x1(l);return p.adapterIn(c)},p.adapterXmlOut=function(l){var c=p.adapterOut(l);return w1(c)};var o=s.lf;return o.adapterIn=p.adapterXmlIn,o.adapterOut=p.adapterXmlOut,p}return y.pluginName="bpmnXmlAdapter",y})(Hr);var lg=globalThis&&globalThis.__assign||function(){return lg=Object.assign||function(v){for(var y,s=1,p=arguments.length;s<p;s++){y=arguments[s];for(var o in y)Object.prototype.hasOwnProperty.call(y,o)&&(v[o]=y[o])}return v},lg.apply(this,arguments)};globalThis&&globalThis.__read;var fg;(function(v){v.HORIZONTAL="horizontal",v.VERTICAL="vertical"})(fg||(fg={}));var A1=globalThis&&globalThis.__read||function(v,y){var s=typeof Symbol=="function"&&v[Symbol.iterator];if(!s)return v;var p=s.call(v),o,l=[],c;try{for(;(y===void 0||y-- >0)&&!(o=p.next()).done;)l.push(o.value)}catch(b){c={error:b}}finally{try{o&&!o.done&&(s=p.return)&&s.call(p)}finally{if(c)throw c.error}}return l};globalThis&&globalThis.__spread;var M1=globalThis&&globalThis.__read||function(v,y){var s=typeof Symbol=="function"&&v[Symbol.iterator];if(!s)return v;var p=s.call(v),o,l=[],c;try{for(;(y===void 0||y-- >0)&&!(o=p.next()).done;)l.push(o.value)}catch(b){c={error:b}}finally{try{o&&!o.done&&(s=p.return)&&s.call(p)}finally{if(c)throw c.error}}return l};globalThis&&globalThis.__spread;var D1=globalThis&&globalThis.__read||function(v,y){var s=typeof Symbol=="function"&&v[Symbol.iterator];if(!s)return v;var p=s.call(v),o,l=[],c;try{for(;(y===void 0||y-- >0)&&!(o=p.next()).done;)l.push(o.value)}catch(b){c={error:b}}finally{try{o&&!o.done&&(s=p.return)&&s.call(p)}finally{if(c)throw c.error}}return l},N1=globalThis&&globalThis.__spread||function(){for(var v=[],y=0;y<arguments.length;y++)v=v.concat(D1(arguments[y]));return v},_i="lf:defaultNodeMenu",Oi="lf:defaultEdgeMenu",wi="lf:defaultGraphMenu",pg="lf:defaultSelectionMenu",C1=function(){function v(y){var s=this,p=y.lf;this.__menuDOM=document.createElement("ul"),this.lf=p,this.menuTypeMap=new Map,this.init(),this.lf.setMenuConfig=function(o){s.setMenuConfig(o)},this.lf.addMenuConfig=function(o){s.addMenuConfig(o)},this.lf.setMenuByType=function(o){s.setMenuByType(o)}}return v.prototype.init=function(){var y=this,s=[{text:"删除",callback:function(l){y.lf.deleteNode(l.id)}},{text:"编辑文本",callback:function(l){y.lf.graphModel.editText(l.id)}},{text:"复制",callback:function(l){y.lf.cloneNode(l.id)}}];this.menuTypeMap.set(_i,s);var p=[{text:"删除",callback:function(l){y.lf.deleteEdge(l.id)}},{text:"编辑文本",callback:function(l){y.lf.graphModel.editText(l.id)}}];this.menuTypeMap.set(Oi,p),this.menuTypeMap.set(wi,[]);var o=[{text:"删除",callback:function(l){y.lf.clearSelectElements(),l.edges.forEach(function(c){return y.lf.deleteEdge(c.id)}),l.nodes.forEach(function(c){return y.lf.deleteNode(c.id)})}}];this.menuTypeMap.set(pg,o)},v.prototype.render=function(y,s){var p=this;this.__container=s,this.__currentData=null,this.__menuDOM.className="lf-menu",s.appendChild(this.__menuDOM),this.__menuDOM.addEventListener("click",function(o){o.stopPropagation();for(var l=o.target;Array.from(l.classList).indexOf("lf-menu-item")===-1&&Array.from(l.classList).indexOf("lf-menu")===-1;)l=l.parentElement;Array.from(l.classList).indexOf("lf-menu-item")>-1?(l.onclickCallback(p.__currentData),p.__menuDOM.style.display="none",p.__currentData=null):console.warn("点击区域不在菜单项内,请检查代码!")},!0),this.lf.on("node:contextmenu",function(o){var l=o.data,c=o.position,b=c.domOverlayPosition,_=b.x,E=b.y,w=l.id,k=p.lf.graphModel.getNodeModelById(w),j=[],P=p.menuTypeMap.get(k.type);k&&k.menu&&Array.isArray(k.menu)?j=k.menu:P?j=P:j=p.menuTypeMap.get(_i),p.__currentData=l,p.showMenu(_,E,j)}),this.lf.on("edge:contextmenu",function(o){var l=o.data,c=o.position,b=c.domOverlayPosition,_=b.x,E=b.y,w=l.id,k=p.lf.graphModel.getEdgeModelById(w),j=[],P=p.menuTypeMap.get(k.type);k&&k.menu&&Array.isArray(k.menu)?j=k.menu:P?j=P:j=p.menuTypeMap.get(Oi),p.__currentData=l,p.showMenu(_,E,j)}),this.lf.on("blank:contextmenu",function(o){var l=o.position,c=p.menuTypeMap.get(wi),b=l.domOverlayPosition,_=b.x,E=b.y;p.showMenu(_,E,c)}),this.lf.on("selection:contextmenu",function(o){var l=o.data,c=o.position,b=p.menuTypeMap.get(pg),_=c.domOverlayPosition,E=_.x,w=_.y;p.__currentData=l,p.showMenu(E,w,b)}),this.lf.on("node:mousedown",function(){p.__menuDOM.style.display="none"}),this.lf.on("edge:click",function(){p.__menuDOM.style.display="none"}),this.lf.on("blank:click",function(){p.__menuDOM.style.display="none"})},v.prototype.destroy=function(){var y;(y=this===null||this===void 0?void 0:this.__container)===null||y===void 0||y.removeChild(this.__menuDOM),this.__menuDOM=null},v.prototype.showMenu=function(y,s,p){if(!(!p||!p.length)){var o=this.__menuDOM;o.innerHTML="",o.append.apply(o,N1(this.__getMenuDom(p))),o.children.length&&(o.style.display="block",o.style.top=s+"px",o.style.left=y+"px")}},v.prototype.setMenuByType=function(y){!y.type||!y.menu||this.menuTypeMap.set(y.type,y.menu)},v.prototype.__getMenuDom=function(y){var s=[];return y&&y.length>0&&y.forEach(function(p){var o=document.createElement("li");if(p.className?o.className="lf-menu-item "+p.className:o.className="lf-menu-item",p.icon===!0){var l=document.createElement("span");l.className="lf-menu-item-icon",o.appendChild(l)}var c=document.createElement("span");c.className="lf-menu-item-text",p.text&&(c.innerText=p.text),o.appendChild(c),o.onclickCallback=p.callback,s.push(o)}),s},v.prototype.setMenuConfig=function(y){y&&(y.nodeMenu!==void 0&&this.menuTypeMap.set(_i,y.nodeMenu?y.nodeMenu:[]),y.edgeMenu!==void 0&&this.menuTypeMap.set(Oi,y.edgeMenu?y.edgeMenu:[]),y.graphMenu!==void 0&&this.menuTypeMap.set(wi,y.graphMenu?y.graphMenu:[]))},v.prototype.addMenuConfig=function(y){if(y){if(Array.isArray(y.nodeMenu)){var s=this.menuTypeMap.get(_i);this.menuTypeMap.set(_i,s.concat(y.nodeMenu))}if(Array.isArray(y.edgeMenu)){var s=this.menuTypeMap.get(Oi);this.menuTypeMap.set(Oi,s.concat(y.edgeMenu))}if(Array.isArray(y.graphMenu)){var s=this.menuTypeMap.get(wi);this.menuTypeMap.set(wi,s.concat(y.graphMenu))}}},v.prototype.changeMenuItem=function(y,s){if(y==="add")this.addMenuConfig(s);else if(y==="reset")this.setMenuConfig(s);else throw new Error("The first parameter of changeMenuConfig should be 'add' or 'reset'")},v.pluginName="menu",v}();globalThis&&globalThis.__read;globalThis&&globalThis.__values;function R1(v){if(v.length<=1)return!1;for(var y=0,s=v.length-1;y!==s&&y+1!==s&&s-1!==y;)y++,s--;return y===s?[--y,s]:[y,s]}var Cg=globalThis&&globalThis.__extends||function(){var v=function(y,s){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,o){p.__proto__=o}||function(p,o){for(var l in o)o.hasOwnProperty(l)&&(p[l]=o[l])},v(y,s)};return function(y,s){v(y,s);function p(){this.constructor=y}y.prototype=s===null?Object.create(s):(p.prototype=s.prototype,new p)}}(),Ro=globalThis&&globalThis.__assign||function(){return Ro=Object.assign||function(v){for(var y,s=1,p=arguments.length;s<p;s++){y=arguments[s];for(var o in y)Object.prototype.hasOwnProperty.call(y,o)&&(v[o]=y[o])}return v},Ro.apply(this,arguments)},xr=globalThis&&globalThis.__read||function(v,y){var s=typeof Symbol=="function"&&v[Symbol.iterator];if(!s)return v;var p=s.call(v),o,l=[],c;try{for(;(y===void 0||y-- >0)&&!(o=p.next()).done;)l.push(o.value)}catch(b){c={error:b}}finally{try{o&&!o.done&&(s=p.return)&&s.call(p)}finally{if(c)throw c.error}}return l};(function(v){Cg(y,v);function y(){return v!==null&&v.apply(this,arguments)||this}return y.prototype.pointFilter=function(s){for(var p=s,o=1;o<p.length-1;){var l=xr(p[o-1],2),c=l[0],b=l[1],_=xr(p[o],2),E=_[0],w=_[1],k=xr(p[o+1],2),j=k[0],P=k[1];c===E&&E===j||b===w&&w===P?p.splice(o,1):o++}return p},y.prototype.getEdge=function(){var s=this.props.model,p=s.points,o=s.isAnimation,l=s.arrowConfig,c=s.radius,b=c===void 0?5:c,_=s.getEdgeStyle(),E=s.getEdgeAnimationStyle(),w=this.pointFilter(p.split(" ").map(function(ke){return ke.split(",").map(function(Re){return Number(Re)})})),k=R1(w);if(k){var j=xr(k,2),P=j[0],D=j[1],N=w[P],I=w[D],B=N.some(function(ke,Re){return ke===I[Re]});if(!B){var H=(I[1]-N[1])/2,ee=[I[0],I[1]-H],ie=[N[0],N[1]+H];w.splice(P+1,0,ie,ee)}}for(var q=xr(w[0],2),Y=q[0],K=q[1],L="M"+Y+" "+K,M=1;M<w.length-1;M++){var z=xr(w[M-1],2),R=z[0],F=z[1],J=xr(w[M],2),fe=J[0],ce=J[1],ye=xr(w[M+1],2),xe=ye[0],ge=ye[1];if(fe===R&&ce!==F){var ue=ce>F?ce-b:ce+b;L=L+" L "+fe+" "+ue}if(ce===F&&fe!==R){var he=fe>R?fe-b:fe+b;L=L+" L "+he+" "+ce}if(L=L+" Q "+fe+" "+ce,fe===xe&&ce!==ge){var ue=ce>ge?ce-b:ce+b;L=L+" "+fe+" "+ue}if(ce===ge&&fe!==xe){var he=fe>xe?fe-b:fe+b;L=L+" "+he+" "+ce}}var be=xr(w[w.length-1],2),Se=be[0],Ie=be[1];L=L+" L "+Se+" "+Ie;var We=Ro(Ro(Ro({d:L,style:o?E:{}},_),l),{fill:"none"});return qe.h("path",Ro({d:L},We))},y})(qe.PolylineEdge);(function(v){Cg(y,v);function y(){return v!==null&&v.apply(this,arguments)||this}return y})(qe.PolylineEdgeModel);var af,Ut,Rg,ro,dg,Ig,ef,Lg={},zg=[],I1=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function Vr(v,y){for(var s in y)v[s]=y[s];return v}function Bg(v){var y=v.parentNode;y&&y.removeChild(v)}function Ei(v,y,s){var p,o,l,c={};for(l in y)l=="key"?p=y[l]:l=="ref"?o=y[l]:c[l]=y[l];if(arguments.length>2&&(c.children=arguments.length>3?af.call(arguments,2):s),typeof v=="function"&&v.defaultProps!=null)for(l in v.defaultProps)c[l]===void 0&&(c[l]=v.defaultProps[l]);return vu(v,c,p,o,null)}function vu(v,y,s,p,o){var l={type:v,props:y,key:s,ref:p,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:o??++Rg};return o==null&&Ut.vnode!=null&&Ut.vnode(l),l}function uf(v){return v.children}function Lo(v,y){this.props=v,this.context=y}function ji(v,y){if(y==null)return v.__?ji(v.__,v.__.__k.indexOf(v)+1):null;for(var s;y<v.__k.length;y++)if((s=v.__k[y])!=null&&s.__e!=null)return s.__e;return typeof v.type=="function"?ji(v):null}function Fg(v){var y,s;if((v=v.__)!=null&&v.__c!=null){for(v.__e=v.__c.base=null,y=0;y<v.__k.length;y++)if((s=v.__k[y])!=null&&s.__e!=null){v.__e=v.__c.base=s.__e;break}return Fg(v)}}function hg(v){(!v.__d&&(v.__d=!0)&&ro.push(v)&&!xu.__r++||dg!==Ut.debounceRendering)&&((dg=Ut.debounceRendering)||Ig)(xu)}function xu(){var v,y,s,p,o,l,c,b;for(ro.sort(ef);v=ro.shift();)v.__d&&(y=ro.length,p=void 0,o=void 0,c=(l=(s=v).__v).__e,(b=s.__P)&&(p=[],(o=Vr({},l)).__v=l.__v+1,Ug(b,l,o,s.__n,b.ownerSVGElement!==void 0,l.__h!=null?[c]:null,p,c??ji(l),l.__h),z1(p,l),l.__e!=c&&Fg(l)),ro.length>y&&ro.sort(ef));xu.__r=0}function Vg(v,y,s,p,o,l,c,b,_,E){var w,k,j,P,D,N,I,B=p&&p.__k||zg,H=B.length;for(s.__k=[],w=0;w<y.length;w++)if((P=s.__k[w]=(P=y[w])==null||typeof P=="boolean"||typeof P=="function"?null:typeof P=="string"||typeof P=="number"||typeof P=="bigint"?vu(null,P,null,null,P):Array.isArray(P)?vu(uf,{children:P},null,null,null):P.__b>0?vu(P.type,P.props,P.key,P.ref?P.ref:null,P.__v):P)!=null){if(P.__=s,P.__b=s.__b+1,(j=B[w])===null||j&&P.key==j.key&&P.type===j.type)B[w]=void 0;else for(k=0;k<H;k++){if((j=B[k])&&P.key==j.key&&P.type===j.type){B[k]=void 0;break}j=null}Ug(v,P,j=j||Lg,o,l,c,b,_,E),D=P.__e,(k=P.ref)&&j.ref!=k&&(I||(I=[]),j.ref&&I.push(j.ref,null,P),I.push(k,P.__c||D,P)),D!=null?(N==null&&(N=D),typeof P.type=="function"&&P.__k===j.__k?P.__d=_=Hg(P,_,v):_=Xg(v,P,j,B,D,_),typeof s.type=="function"&&(s.__d=_)):_&&j.__e==_&&_.parentNode!=v&&(_=ji(j))}for(s.__e=N,w=H;w--;)B[w]!=null&&(typeof s.type=="function"&&B[w].__e!=null&&B[w].__e==s.__d&&(s.__d=Gg(p).nextSibling),Wg(B[w],B[w]));if(I)for(w=0;w<I.length;w++)Yg(I[w],I[++w],I[++w])}function Hg(v,y,s){for(var p,o=v.__k,l=0;o&&l<o.length;l++)(p=o[l])&&(p.__=v,y=typeof p.type=="function"?Hg(p,y,s):Xg(s,p,p,o,p.__e,y));return y}function Xg(v,y,s,p,o,l){var c,b,_;if(y.__d!==void 0)c=y.__d,y.__d=void 0;else if(s==null||o!=l||o.parentNode==null)e:if(l==null||l.parentNode!==v)v.appendChild(o),c=null;else{for(b=l,_=0;(b=b.nextSibling)&&_<p.length;_+=1)if(b==o)break e;v.insertBefore(o,l),c=l}return c!==void 0?c:o.nextSibling}function Gg(v){var y,s,p;if(v.type==null||typeof v.type=="string")return v.__e;if(v.__k){for(y=v.__k.length-1;y>=0;y--)if((s=v.__k[y])&&(p=Gg(s)))return p}return null}function L1(v,y,s,p,o){var l;for(l in s)l==="children"||l==="key"||l in y||Eu(v,l,null,s[l],p);for(l in y)o&&typeof y[l]!="function"||l==="children"||l==="key"||l==="value"||l==="checked"||s[l]===y[l]||Eu(v,l,y[l],s[l],p)}function yg(v,y,s){y[0]==="-"?v.setProperty(y,s??""):v[y]=s==null?"":typeof s!="number"||I1.test(y)?s:s+"px"}function Eu(v,y,s,p,o){var l;e:if(y==="style")if(typeof s=="string")v.style.cssText=s;else{if(typeof p=="string"&&(v.style.cssText=p=""),p)for(y in p)s&&y in s||yg(v.style,y,"");if(s)for(y in s)p&&s[y]===p[y]||yg(v.style,y,s[y])}else if(y[0]==="o"&&y[1]==="n")l=y!==(y=y.replace(/Capture$/,"")),y=y.toLowerCase()in v?y.toLowerCase().slice(2):y.slice(2),v.l||(v.l={}),v.l[y+l]=s,s?p||v.addEventListener(y,l?vg:gg,l):v.removeEventListener(y,l?vg:gg,l);else if(y!=="dangerouslySetInnerHTML"){if(o)y=y.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(y!=="width"&&y!=="height"&&y!=="href"&&y!=="list"&&y!=="form"&&y!=="tabIndex"&&y!=="download"&&y in v)try{v[y]=s??"";break e}catch{}typeof s=="function"||(s==null||s===!1&&y[4]!=="-"?v.removeAttribute(y):v.setAttribute(y,s))}}function gg(v){return this.l[v.type+!1](Ut.event?Ut.event(v):v)}function vg(v){return this.l[v.type+!0](Ut.event?Ut.event(v):v)}function Ug(v,y,s,p,o,l,c,b,_){var E,w,k,j,P,D,N,I,B,H,ee,ie,q,Y,K,L=y.type;if(y.constructor!==void 0)return null;s.__h!=null&&(_=s.__h,b=y.__e=s.__e,y.__h=null,l=[b]),(E=Ut.__b)&&E(y);try{e:if(typeof L=="function"){if(I=y.props,B=(E=L.contextType)&&p[E.__c],H=E?B?B.props.value:E.__:p,s.__c?N=(w=y.__c=s.__c).__=w.__E:("prototype"in L&&L.prototype.render?y.__c=w=new L(I,H):(y.__c=w=new Lo(I,H),w.constructor=L,w.render=F1),B&&B.sub(w),w.props=I,w.state||(w.state={}),w.context=H,w.__n=p,k=w.__d=!0,w.__h=[],w._sb=[]),w.__s==null&&(w.__s=w.state),L.getDerivedStateFromProps!=null&&(w.__s==w.state&&(w.__s=Vr({},w.__s)),Vr(w.__s,L.getDerivedStateFromProps(I,w.__s))),j=w.props,P=w.state,w.__v=y,k)L.getDerivedStateFromProps==null&&w.componentWillMount!=null&&w.componentWillMount(),w.componentDidMount!=null&&w.__h.push(w.componentDidMount);else{if(L.getDerivedStateFromProps==null&&I!==j&&w.componentWillReceiveProps!=null&&w.componentWillReceiveProps(I,H),!w.__e&&w.shouldComponentUpdate!=null&&w.shouldComponentUpdate(I,w.__s,H)===!1||y.__v===s.__v){for(y.__v!==s.__v&&(w.props=I,w.state=w.__s,w.__d=!1),w.__e=!1,y.__e=s.__e,y.__k=s.__k,y.__k.forEach(function(M){M&&(M.__=y)}),ee=0;ee<w._sb.length;ee++)w.__h.push(w._sb[ee]);w._sb=[],w.__h.length&&c.push(w);break e}w.componentWillUpdate!=null&&w.componentWillUpdate(I,w.__s,H),w.componentDidUpdate!=null&&w.__h.push(function(){w.componentDidUpdate(j,P,D)})}if(w.context=H,w.props=I,w.__P=v,ie=Ut.__r,q=0,"prototype"in L&&L.prototype.render){for(w.state=w.__s,w.__d=!1,ie&&ie(y),E=w.render(w.props,w.state,w.context),Y=0;Y<w._sb.length;Y++)w.__h.push(w._sb[Y]);w._sb=[]}else do w.__d=!1,ie&&ie(y),E=w.render(w.props,w.state,w.context),w.state=w.__s;while(w.__d&&++q<25);w.state=w.__s,w.getChildContext!=null&&(p=Vr(Vr({},p),w.getChildContext())),k||w.getSnapshotBeforeUpdate==null||(D=w.getSnapshotBeforeUpdate(j,P)),K=E!=null&&E.type===uf&&E.key==null?E.props.children:E,Vg(v,Array.isArray(K)?K:[K],y,s,p,o,l,c,b,_),w.base=y.__e,y.__h=null,w.__h.length&&c.push(w),N&&(w.__E=w.__=null),w.__e=!1}else l==null&&y.__v===s.__v?(y.__k=s.__k,y.__e=s.__e):y.__e=B1(s.__e,y,s,p,o,l,c,_);(E=Ut.diffed)&&E(y)}catch(M){y.__v=null,(_||l!=null)&&(y.__e=b,y.__h=!!_,l[l.indexOf(b)]=null),Ut.__e(M,y,s)}}function z1(v,y){Ut.__c&&Ut.__c(y,v),v.some(function(s){try{v=s.__h,s.__h=[],v.some(function(p){p.call(s)})}catch(p){Ut.__e(p,s.__v)}})}function B1(v,y,s,p,o,l,c,b){var _,E,w,k=s.props,j=y.props,P=y.type,D=0;if(P==="svg"&&(o=!0),l!=null){for(;D<l.length;D++)if((_=l[D])&&"setAttribute"in _==!!P&&(P?_.localName===P:_.nodeType===3)){v=_,l[D]=null;break}}if(v==null){if(P===null)return document.createTextNode(j);v=o?document.createElementNS("http://www.w3.org/2000/svg",P):document.createElement(P,j.is&&j),l=null,b=!1}if(P===null)k===j||b&&v.data===j||(v.data=j);else{if(l=l&&af.call(v.childNodes),E=(k=s.props||Lg).dangerouslySetInnerHTML,w=j.dangerouslySetInnerHTML,!b){if(l!=null)for(k={},D=0;D<v.attributes.length;D++)k[v.attributes[D].name]=v.attributes[D].value;(w||E)&&(w&&(E&&w.__html==E.__html||w.__html===v.innerHTML)||(v.innerHTML=w&&w.__html||""))}if(L1(v,j,k,o,b),w)y.__k=[];else if(D=y.props.children,Vg(v,Array.isArray(D)?D:[D],y,s,p,o&&P!=="foreignObject",l,c,l?l[0]:s.__k&&ji(s,0),b),l!=null)for(D=l.length;D--;)l[D]!=null&&Bg(l[D]);b||("value"in j&&(D=j.value)!==void 0&&(D!==v.value||P==="progress"&&!D||P==="option"&&D!==k.value)&&Eu(v,"value",D,k.value,!1),"checked"in j&&(D=j.checked)!==void 0&&D!==v.checked&&Eu(v,"checked",D,k.checked,!1))}return v}function Yg(v,y,s){try{typeof v=="function"?v(y):v.current=y}catch(p){Ut.__e(p,s)}}function Wg(v,y,s){var p,o;if(Ut.unmount&&Ut.unmount(v),(p=v.ref)&&(p.current&&p.current!==v.__e||Yg(p,null,y)),(p=v.__c)!=null){if(p.componentWillUnmount)try{p.componentWillUnmount()}catch(l){Ut.__e(l,y)}p.base=p.__P=null,v.__c=void 0}if(p=v.__k)for(o=0;o<p.length;o++)p[o]&&Wg(p[o],y,s||typeof v.type!="function");s||v.__e==null||Bg(v.__e),v.__=v.__e=v.__d=void 0}function F1(v,y,s){return this.constructor(v,s)}af=zg.slice,Ut={__e:function(v,y,s,p){for(var o,l,c;y=y.__;)if((o=y.__c)&&!o.__)try{if((l=o.constructor)&&l.getDerivedStateFromError!=null&&(o.setState(l.getDerivedStateFromError(v)),c=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(v,p||{}),c=o.__d),c)return o.__E=o}catch(b){v=b}throw v}},Rg=0,Lo.prototype.setState=function(v,y){var s;s=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Vr({},this.state),typeof v=="function"&&(v=v(Vr({},s),this.props)),v&&Vr(s,v),v!=null&&this.__v&&(y&&this._sb.push(y),hg(this))},Lo.prototype.forceUpdate=function(v){this.__v&&(this.__e=!0,v&&this.__h.push(v),hg(this))},Lo.prototype.render=uf,ro=[],Ig=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,ef=function(v,y){return v.__v.__b-y.__v.__b},xu.__r=0;var Si=globalThis&&globalThis.__assign||function(){return Si=Object.assign||function(v){for(var y,s=1,p=arguments.length;s<p;s++){y=arguments[s];for(var o in y)Object.prototype.hasOwnProperty.call(y,o)&&(v[o]=y[o])}return v},Si.apply(this,arguments)};function sf(v){var y=v.x,s=v.y,p=v.width,o=v.height,l=v.radius,c=v.className,b=y-p/2,_=s-o/2,E=Si(Si({width:10,height:10,cx:0,cy:0,rx:l||0,ry:l||0,fill:"transparent",fillOpacity:1,strokeWidth:"1px",stroke:"#000",strokeOpacity:1,className:"lf-basic-shape "+c},v),{x:b,y:_});return qe.h("rect",Si({},E))}sf.defaultProps={radius:0,stroke:"",strokeDasharray:"",className:""};var Io;(function(v){v.NODE="node",v.CIRCLE_NODE="circle-node",v.POLYGON_NODE="polygon-node",v.RECT_NODE="rect-node",v.HTML_NODE="html-node",v.TEXT_NODE="text-node",v.ELLIPSE_NODE="ellipse-node",v.DIAMOND_NODE="diamond-node",v.EDGE="edge",v.LINE_EDGE="line-edge",v.POLYLINE_EDGE="polyline-edge",v.BEZIER_EDGE="bezier-edge",v.GRAPH="graph"})(Io||(Io={}));function bu(v){var y=v.x,s=v.y,p=v.width,o=v.height;return{minX:y-p/2,minY:s-o/2,maxX:y+p/2,maxY:s+o/2}}function bg(v){var y=bu(v),s=v.radius,p=y.minX,o=y.minY,l=y.maxX,c=y.maxY;return[{x:p+s,y:o+s},{x:l-s,y:o+s},{x:l-s,y:c-s},{x:p+s,y:c-s}]}function mg(v){var y=v.point,s=v.beforeNode,p=v.afterNode,o=y.x,l=y.y,c={x:o,y:l},b=s.radius,_=bu(s),E=bu(p);if(o===_.minX){c.x=E.minX;var w=(l-s.y)/(s.height/2-b);w?c.y=p.y+(p.height/2-b)*w:c.y=p.y}else if(o===_.maxX){c.x=E.maxX;var w=(l-s.y)/(s.height/2-b);w?c.y=p.y+(p.height/2-b)*w:c.y=p.y}else if(l===_.minY){c.y=E.minY;var w=(o-s.x)/(s.width/2-b);w?c.x=p.x+(p.width/2-b)*w:c.x=p.x}else if(l===_.maxY){c.y=E.maxY;var w=(o-s.x)/(s.width/2-b);w?c.x=p.x+(p.width/2-b)*w:c.x=p.x}else{var k=bg(s),j=bg(p),P=bu(s),D=P.minX,N=P.minY,I=P.maxX,B=P.maxY,H=-1;if(o-D<b&&l-N<b?H=0:I-o<b&&l-N<b?H=1:I-o<b&&B-l<b?H=2:o-D<b&&N-l<b&&(H=3),H>-1){var ee=Math.atan2(l-k[H].y,o-k[H].x);c.x=j[H].x+b*Math.cos(ee),c.y=j[H].y+b*Math.sin(ee)}}return c}function _g(v){var y=v.point,s=v.beforeNode,p=v.afterNode,o=p.rx,l=p.ry,c=y,b=(y.y-s.y)/(y.x-s.x),_=o,E=l,w,k;return b>=1/0?(w=0,k=E):b<=-1/0?(w=0,k=-E):y.x-s.x>0?(w=_*E/Math.sqrt(E*E+_*_*b*b),k=_*E*b/Math.sqrt(E*E+_*_*b*b)):(w=-(_*E)/Math.sqrt(E*E+_*_*b*b),k=-(_*E*b)/Math.sqrt(E*E+_*_*b*b)),c={x:w+p.x,y:k+p.y},c}function Og(v){var y=v.point,s=v.beforeNode,p=v.afterNode,o=y,l,c,b=y.x-s.x,_=y.y-s.y,E=s.rx,w=s.ry,k=Math.sqrt((E-Math.abs(b))*(E-Math.abs(b))+_*_)/Math.sqrt(E*E+w*w),j=p.rx,P=p.ry,D=Math.sqrt((j*j+P*P)*k*k*(j*j/(j*j+P*P))),N=D*(P/j);return b>=0?l=j-D:l=D-j,_>0?c=N:c=-N,o={x:l+p.x,y:c+p.y},o}var V1=globalThis&&globalThis.__extends||function(){var v=function(y,s){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,o){p.__proto__=o}||function(p,o){for(var l in o)o.hasOwnProperty(l)&&(p[l]=o[l])},v(y,s)};return function(y,s){v(y,s);function p(){this.constructor=y}y.prototype=s===null?Object.create(s):(p.prototype=s.prototype,new p)}}(),oo=globalThis&&globalThis.__assign||function(){return oo=Object.assign||function(v){for(var y,s=1,p=arguments.length;s<p;s++){y=arguments[s];for(var o in y)Object.prototype.hasOwnProperty.call(y,o)&&(v[o]=y[o])}return v},oo.apply(this,arguments)},H1=globalThis&&globalThis.__read||function(v,y){var s=typeof Symbol=="function"&&v[Symbol.iterator];if(!s)return v;var p=s.call(v),o,l=[],c;try{for(;(y===void 0||y-- >0)&&!(o=p.next()).done;)l.push(o.value)}catch(b){c={error:b}}finally{try{o&&!o.done&&(s=p.return)&&s.call(p)}finally{if(c)throw c.error}}return l},X1=qe.LogicFlowUtil.StepDrag,G1=function(v){V1(y,v);function y(s){var p=v.call(this)||this;return p.updatePosition=function(o){var l=o.deltaX,c=o.deltaY,b=p.nodeModel,_=b.x,E=b.y;p.nodeModel.x=_+l/2,p.nodeModel.y=E+c/2,p.nodeModel.moveText(l/2,c/2)},p.getResize=function(o){var l=o.index,c=o.deltaX,b=o.deltaY,_=o.width,E=o.height,w=o.PCTResizeInfo,k=o.pct,j=k===void 0?1:k,P={width:_,height:E,deltaX:c,deltaY:b};if(w){var D=4,N=0,I=0;switch(l){case 0:I=(c*-1-b)/D;break;case 1:I=(c-b)/D;break;case 2:I=(c+b)/D;break;case 3:I=(c*-1+b)/D;break}I!==0&&(N=Math.round(I/w.ResizeBasis.basisHeight*1e5)/1e3),w.ResizePCT.widthPCT=Math.max(Math.min(w.ResizePCT.widthPCT+N,w.ScaleLimit.maxScaleLimit),w.ScaleLimit.minScaleLimit),w.ResizePCT.hightPCT=Math.max(Math.min(w.ResizePCT.hightPCT+N,w.ScaleLimit.maxScaleLimit),w.ScaleLimit.minScaleLimit);var B=Math.round(w.ResizePCT.widthPCT*w.ResizeBasis.basisWidth/100),H=Math.round(w.ResizePCT.hightPCT*w.ResizeBasis.basisHeight/100);switch(l){case 0:c=_-B,b=E-H;break;case 1:c=B-_,b=E-H;break;case 2:c=B-_,b=H-E;break;case 3:c=_-B,b=H-E;break}return P.width=B,P.height=H,P.deltaX=c/j,P.deltaY=b/j,P}switch(l){case 0:P.width=_-c*j,P.height=E-b*j;break;case 1:P.width=_+c*j,P.height=E-b*j;break;case 2:P.width=_+c*j,P.height=E+b*j;break;case 3:P.width=_-c*j,P.height=E+b*j;break}return P},p.updateRect=function(o){var l=o.deltaX,c=o.deltaY,b=p.nodeModel,_=b.id,E=b.x,w=b.y,k=b.width,j=b.height,P=b.radius,D=b.PCTResizeInfo,N=p.index,I=p.getResize({index:N,deltaX:l,deltaY:c,width:k,height:j,PCTResizeInfo:D,pct:1}),B=p.nodeModel,H=B.minWidth,ee=B.minHeight,ie=B.maxWidth,q=B.maxHeight;if(I.width<H||I.width>ie||I.height<ee||I.height>q){p.dragHandler.cancelDrag();return}p.updatePosition({deltaX:I.deltaX,deltaY:I.deltaY}),p.nodeModel.width=I.width,p.nodeModel.height=I.height,p.nodeModel.setProperties({nodeSize:{width:I.width,height:I.height}});var Y=p.getNodeEdges(_),K={x:E,y:w,width:k,height:j,radius:P},L={x:p.nodeModel.x,y:p.nodeModel.y,width:p.nodeModel.width,height:p.nodeModel.height,radius:P},M={point:"",beforeNode:K,afterNode:L},z;Y.sourceEdges.forEach(function(R){M.point=R.startPoint,z=mg(M),R.updateStartPoint(z)}),Y.targetEdges.forEach(function(R){M.point=R.endPoint,z=mg(M),R.updateEndPoint(z)}),p.eventEmit({beforeNode:K,afterNode:L})},p.updateEllipse=function(o){var l=o.deltaX,c=o.deltaY,b=p.nodeModel,_=b.id,E=b.rx,w=b.ry,k=b.x,j=b.y,P=b.PCTResizeInfo,D=p.index,N=E,I=w,B=p.getResize({index:D,deltaX:l,deltaY:c,width:N,height:I,PCTResizeInfo:P,pct:1/2}),H=p.nodeModel,ee=H.minWidth,ie=H.minHeight,q=H.maxWidth,Y=H.maxHeight;if(B.width<ee/2||B.width>q/2||B.height<ie/2||B.height>Y/2){p.dragHandler.cancelDrag();return}p.updatePosition({deltaX:B.deltaX,deltaY:B.deltaY}),p.nodeModel.rx=B.width,p.nodeModel.ry=B.height,p.nodeModel.setProperties({nodeSize:{rx:B.width,ry:B.height}});var K=p.getNodeEdges(_),L={x:k,y:j},M={rx:B.width,ry:B.height,x:p.nodeModel.x,y:p.nodeModel.y},z={point:{},beforeNode:L,afterNode:M},R;K.sourceEdges.forEach(function(F){z.point=F.startPoint,R=_g(z),F.updateStartPoint(R)}),K.targetEdges.forEach(function(F){z.point=F.endPoint,R=_g(z),F.updateEndPoint(R)}),p.eventEmit({beforeNode:oo(oo({},L),{rx:E,ry:w}),afterNode:M})},p.updateDiamond=function(o){var l=o.deltaX,c=o.deltaY,b=p.nodeModel,_=b.id,E=b.rx,w=b.ry,k=b.x,j=b.y,P=b.PCTResizeInfo,D=p.index,N=E,I=w,B=p.getResize({index:D,deltaX:l,deltaY:c,width:N,height:I,PCTResizeInfo:P,pct:1/2}),H=p.nodeModel,ee=H.minWidth,ie=H.minHeight,q=H.maxWidth,Y=H.maxHeight;if(B.width<ee/2||B.width>q/2||B.height<ie/2||B.height>Y/2){p.dragHandler.cancelDrag();return}p.updatePosition({deltaX:B.deltaX,deltaY:B.deltaY}),p.nodeModel.rx=B.width,p.nodeModel.ry=B.height,p.nodeModel.setProperties({nodeSize:{rx:B.width,ry:B.height}});var K={x:k,y:j,rx:E,ry:w},L={rx:B.width,ry:B.height,x:p.nodeModel.x,y:p.nodeModel.y},M={point:{},beforeNode:K,afterNode:L},z,R=p.getNodeEdges(_);R.sourceEdges.forEach(function(F){M.point=F.startPoint,z=Og(M),F.updateStartPoint(z)}),R.targetEdges.forEach(function(F){M.point=F.endPoint,z=Og(M),F.updateEndPoint(z)}),p.eventEmit({beforeNode:K,afterNode:L})},p.eventEmit=function(o){var l=o.beforeNode,c=o.afterNode,b=p.nodeModel,_=b.id,E=b.modelType,w=b.type,k=oo({id:_,modelType:E,type:w},l),j=oo({id:_,modelType:E,type:w},c);p.graphModel.eventCenter.emit("node:resize",{oldNodeSize:k,newNodeSize:j})},p.onDragging=function(o){var l,c=o.deltaX,b=o.deltaY,_=p.graphModel.transformModel,E=p.nodeModel.modelType;l=H1(_.fixDeltaXY(c,b),2),c=l[0],b=l[1],E===Io.RECT_NODE||E===Io.HTML_NODE?p.updateRect({deltaX:c,deltaY:b}):E===Io.ELLIPSE_NODE?p.updateEllipse({deltaX:c,deltaY:b}):E===Io.DIAMOND_NODE&&p.updateDiamond({deltaX:c,deltaY:b})},p.onDragEnd=function(){var o=p.graphModel.gridSize,l=o===void 0?1:o,c=l*Math.round(p.nodeModel.x/l),b=l*Math.round(p.nodeModel.y/l);p.nodeModel.moveTo(c,b)},p.index=s.index,p.nodeModel=s.model,p.graphModel=s.graphModel,p.state={},p.dragHandler=new X1({onDragging:p.onDragging,onDragEnd:p.onDragEnd,step:1}),p}return y.prototype.getNodeEdges=function(s){for(var p=this.graphModel,o=p.edges,l=[],c=[],b=0;b<o.length;b++){var _=o[b];_.sourceNodeId===s?l.push(_):o[b].targetNodeId===s&&c.push(_)}return{sourceEdges:l,targetEdges:c}},y.prototype.render=function(){var s=this.props,p=s.x,o=s.y,l=s.index,c=s.model,b=c.getControlPointStyle();return Ei("g",{className:"lf-resize-control-"+l},Ei(sf,oo({className:"lf-node-control"},{x:p,y:o},b,{onMouseDown:this.dragHandler.handleMouseDown})))},y}(Lo),U1=globalThis&&globalThis.__extends||function(){var v=function(y,s){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,o){p.__proto__=o}||function(p,o){for(var l in o)o.hasOwnProperty(l)&&(p[l]=o[l])},v(y,s)};return function(y,s){v(y,s);function p(){this.constructor=y}y.prototype=s===null?Object.create(s):(p.prototype=s.prototype,new p)}}(),Su=globalThis&&globalThis.__assign||function(){return Su=Object.assign||function(v){for(var y,s=1,p=arguments.length;s<p;s++){y=arguments[s];for(var o in y)Object.prototype.hasOwnProperty.call(y,o)&&(v[o]=y[o])}return v},Su.apply(this,arguments)},ku=function(v){U1(y,v);function y(){var s=v.call(this)||this;return s.state={},s}return y.prototype.getResizeControl=function(){var s=this.props,p=s.model,o=s.graphModel,l=p.x,c=p.y,b=p.width,_=p.height,E={minX:l-b/2,minY:c-_/2,maxX:l+b/2,maxY:c+_/2},w=E.minX,k=E.minY,j=E.maxX,P=E.maxY,D=[{x:w,y:k},{x:j,y:k},{x:j,y:P},{x:w,y:P}];return D.map(function(N,I){return Ei(G1,Su({index:I},N,{model:p,graphModel:o}))})},y.prototype.getGroupSolid=function(){var s=this.props.model,p=s.x,o=s.y,l=s.width,c=s.height,b=s.getResizeOutlineStyle();return Ei(sf,Su({fill:"none"},b,{x:p,y:o,width:l,height:c}))},y.prototype.render=function(){return Ei("g",{className:"lf-resize-control"},this.getGroupSolid(),this.getResizeControl())},y}(Lo),$g=globalThis&&globalThis.__extends||function(){var v=function(y,s){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,o){p.__proto__=o}||function(p,o){for(var l in o)o.hasOwnProperty(l)&&(p[l]=o[l])},v(y,s)};return function(y,s){v(y,s);function p(){this.constructor=y}y.prototype=s===null?Object.create(s):(p.prototype=s.prototype,new p)}}(),Y1=function(v){$g(y,v);function y(s,p){var o=v.call(this,s,p)||this,l=o.properties.nodeSize;return l&&(o.width=l.width,o.height=l.height),o}return y.prototype.initNodeData=function(s){v.prototype.initNodeData.call(this,s),this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3},y.prototype.getOutlineStyle=function(){var s=v.prototype.getOutlineStyle.call(this),p=this.graphModel.editConfigModel.isSilentMode;return p||(s.stroke="none",s.hover&&(s.hover.stroke="none")),s},y.prototype.getResizeOutlineStyle=function(){return{fill:"none",stroke:"transparent",strokeWidth:1,strokeDasharray:"3,3"}},y.prototype.getControlPointStyle=function(){return{width:7,height:7,fill:"#FFFFFF",stroke:"#000000"}},y.prototype.resize=function(s,p){console.log(s,p)},y.prototype.enableProportionResize=function(s){if(s===void 0&&(s=!0),s){var p={widthPCT:100,hightPCT:100},o={basisWidth:this.width,basisHeight:this.height},l={maxScaleLimit:Math.min(this.maxWidth/this.width*100,this.maxHeight/this.height*100),minScaleLimit:Math.max(this.minWidth/this.width*100,this.minHeight/this.height*100)};this.PCTResizeInfo={ResizePCT:p,ResizeBasis:o,ScaleLimit:l}}else delete this.PCTResizeInfo},y}(qe.RectNodeModel),W1=function(v){$g(y,v);function y(){return v!==null&&v.apply(this,arguments)||this}return y.prototype.getControlGroup=function(){var s=this.props,p=s.model,o=s.graphModel;return qe.h(ku,{model:p,graphModel:o})},y.prototype.getResizeShape=function(){return v.prototype.getShape.call(this)},y.prototype.getShape=function(){var s=this.props,p=s.model.isSelected,o=s.graphModel.editConfigModel.isSilentMode;return qe.h("g",null,this.getResizeShape(),p&&!o?this.getControlGroup():"")},y}(qe.RectNode),Kg={type:"rect",view:W1,model:Y1},qg=globalThis&&globalThis.__extends||function(){var v=function(y,s){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,o){p.__proto__=o}||function(p,o){for(var l in o)o.hasOwnProperty(l)&&(p[l]=o[l])},v(y,s)};return function(y,s){v(y,s);function p(){this.constructor=y}y.prototype=s===null?Object.create(s):(p.prototype=s.prototype,new p)}}();(function(v){qg(y,v);function y(s,p){var o=v.call(this,s,p)||this,l=o.properties.nodeSize;return l&&(o.rx=l.rx,o.ry=l.ry),o}return y.prototype.initNodeData=function(s){v.prototype.initNodeData.call(this,s),this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3},y.prototype.getOutlineStyle=function(){var s=v.prototype.getOutlineStyle.call(this),p=this.graphModel.editConfigModel.isSilentMode;return p||(s.stroke="none",s.hover&&(s.hover.stroke="none")),s},y.prototype.getResizeOutlineStyle=function(){return{stroke:"#000000",strokeWidth:1,strokeDasharray:"3,3"}},y.prototype.getControlPointStyle=function(){return{width:7,height:7,fill:"#FFFFFF",stroke:"#000000"}},y.prototype.enableProportionResize=function(s){if(s===void 0&&(s=!0),s){var p={widthPCT:100,hightPCT:100},o={basisWidth:this.rx,basisHeight:this.ry},l={maxScaleLimit:Math.min(this.maxWidth/(this.rx*2)*100,this.maxHeight/(this.ry*2)*100),minScaleLimit:Math.max(this.minWidth/(this.rx*2)*100,this.minHeight/(this.ry*2)*100)};this.PCTResizeInfo={ResizePCT:p,ResizeBasis:o,ScaleLimit:l}}else delete this.PCTResizeInfo},y})(qe.EllipseNodeModel);(function(v){qg(y,v);function y(){return v!==null&&v.apply(this,arguments)||this}return y.prototype.getControlGroup=function(){var s=this.props,p=s.model,o=s.graphModel;return qe.h(ku,{model:p,graphModel:o})},y.prototype.getResizeShape=function(){return v.prototype.getShape.call(this)},y.prototype.getShape=function(){var s=this.props,p=s.model,o=s.graphModel.editConfigModel.isSilentMode;return qe.h("g",null,this.getResizeShape(),p.isSelected&&!o?this.getControlGroup():"")},y})(qe.EllipseNode);var tf=globalThis&&globalThis.__assign||function(){return tf=Object.assign||function(v){for(var y,s=1,p=arguments.length;s<p;s++){y=arguments[s];for(var o in y)Object.prototype.hasOwnProperty.call(y,o)&&(v[o]=y[o])}return v},tf.apply(this,arguments)};function $1(v){var y=v.fillOpacity,s=y===void 0?1:y,p=v.strokeWidth,o=p===void 0?1:p,l=v.strokeOpacity,c=l===void 0?1:l,b=v.fill,_=b===void 0?"transparent":b,E=v.stroke,w=E===void 0?"#000":E,k=v.points,j=v.className,P=j===void 0?"lf-basic-shape":j,D={fill:_,fillOpacity:s,strokeWidth:o,stroke:w,strokeOpacity:c,points:"",className:P};return D.points=k.map(function(N){return N.join(",")}).join(" "),qe.h("polygon",tf({},D))}var Zg=globalThis&&globalThis.__extends||function(){var v=function(y,s){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,o){p.__proto__=o}||function(p,o){for(var l in o)o.hasOwnProperty(l)&&(p[l]=o[l])},v(y,s)};return function(y,s){v(y,s);function p(){this.constructor=y}y.prototype=s===null?Object.create(s):(p.prototype=s.prototype,new p)}}(),nf=globalThis&&globalThis.__assign||function(){return nf=Object.assign||function(v){for(var y,s=1,p=arguments.length;s<p;s++){y=arguments[s];for(var o in y)Object.prototype.hasOwnProperty.call(y,o)&&(v[o]=y[o])}return v},nf.apply(this,arguments)};(function(v){Zg(y,v);function y(s,p){var o=v.call(this,s,p)||this,l=o.properties.nodeSize;return l&&(o.rx=l.rx,o.ry=l.ry),o}return y.prototype.initNodeData=function(s){v.prototype.initNodeData.call(this,s),this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3,this.gridSize=1},y.prototype.getOutlineStyle=function(){var s=v.prototype.getOutlineStyle.call(this),p=this.graphModel.editConfigModel.isSilentMode;return p||(s.stroke="none",s.hover&&(s.hover.stroke="none")),s},y.prototype.getResizeOutlineStyle=function(){return{stroke:"#000000",strokeWidth:1,strokeDasharray:"3,3"}},y.prototype.getControlPointStyle=function(){return{width:7,height:7,fill:"#FFFFFF",stroke:"#000000"}},y.prototype.enableProportionResize=function(s){if(s===void 0&&(s=!0),s){var p={widthPCT:100,hightPCT:100},o={basisWidth:this.rx,basisHeight:this.ry},l={maxScaleLimit:Math.min(this.maxWidth/(this.rx*2)*100,this.maxHeight/(this.ry*2)*100),minScaleLimit:Math.max(this.minWidth/(this.rx*2)*100,this.minHeight/(this.ry*2)*100)};this.PCTResizeInfo={ResizePCT:p,ResizeBasis:o,ScaleLimit:l}}else delete this.PCTResizeInfo},y})(qe.DiamondNodeModel);(function(v){Zg(y,v);function y(){return v!==null&&v.apply(this,arguments)||this}return y.prototype.getControlGroup=function(){var s=this.props,p=s.model,o=s.graphModel;return qe.h(ku,{model:p,graphModel:o})},y.prototype.getResizeShape=function(){var s=this.props.model,p=s.points,o=s.getNodeStyle();return qe.h("g",null,qe.h($1,nf({},o,{points:p})))},y.prototype.getShape=function(){var s=this.props,p=s.model.isSelected,o=s.graphModel.editConfigModel.isSilentMode;return qe.h("g",null,this.getResizeShape(),p&&!o?this.getControlGroup():"")},y})(qe.DiamondNode);var Jg=globalThis&&globalThis.__extends||function(){var v=function(y,s){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,o){p.__proto__=o}||function(p,o){for(var l in o)o.hasOwnProperty(l)&&(p[l]=o[l])},v(y,s)};return function(y,s){v(y,s);function p(){this.constructor=y}y.prototype=s===null?Object.create(s):(p.prototype=s.prototype,new p)}}();(function(v){Jg(y,v);function y(s,p){var o=v.call(this,s,p)||this,l=o.properties.nodeSize;return l&&(o.width=l.width,o.height=l.height),o}return y.prototype.initNodeData=function(s){v.prototype.initNodeData.call(this,s),this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3},y.prototype.getOutlineStyle=function(){var s=v.prototype.getOutlineStyle.call(this),p=this.graphModel.editConfigModel.isSilentMode;return p||(s.stroke="none",s.hover&&(s.hover.stroke="none")),s},y.prototype.getResizeOutlineStyle=function(){return{stroke:"#000000",strokeWidth:1,strokeDasharray:"3,3"}},y.prototype.getControlPointStyle=function(){return{width:7,height:7,fill:"#FFFFFF",stroke:"#000000"}},y.prototype.enableProportionResize=function(s){if(s===void 0&&(s=!0),s){var p={widthPCT:100,hightPCT:100},o={basisWidth:this.width,basisHeight:this.height},l={maxScaleLimit:Math.min(this.maxWidth/this.width*100,this.maxHeight/this.height*100),minScaleLimit:Math.max(this.minWidth/this.width*100,this.minHeight/this.height*100)};this.PCTResizeInfo={ResizePCT:p,ResizeBasis:o,ScaleLimit:l}}else delete this.PCTResizeInfo},y})(qe.HtmlNodeModel);(function(v){Jg(y,v);function y(){return v!==null&&v.apply(this,arguments)||this}return y.prototype.getControlGroup=function(){var s=this.props,p=s.model,o=s.graphModel;return qe.h(ku,{model:p,graphModel:o})},y.prototype.getResizeShape=function(){return v.prototype.getShape.call(this)},y.prototype.getShape=function(){var s=this.props,p=s.model.isSelected,o=s.graphModel.editConfigModel.isSilentMode;return qe.h("g",null,this.getResizeShape(),p&&!o?this.getControlGroup():"")},y})(qe.HtmlNode);var Qg=globalThis&&globalThis.__extends||function(){var v=function(y,s){return v=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,o){p.__proto__=o}||function(p,o){for(var l in o)o.hasOwnProperty(l)&&(p[l]=o[l])},v(y,s)};return function(y,s){v(y,s);function p(){this.constructor=y}y.prototype=s===null?Object.create(s):(p.prototype=s.prototype,new p)}}(),ju=globalThis&&globalThis.__assign||function(){return ju=Object.assign||function(v){for(var y,s=1,p=arguments.length;s<p;s++){y=arguments[s];for(var o in y)Object.prototype.hasOwnProperty.call(y,o)&&(v[o]=y[o])}return v},ju.apply(this,arguments)},K1=globalThis&&globalThis.__read||function(v,y){var s=typeof Symbol=="function"&&v[Symbol.iterator];if(!s)return v;var p=s.call(v),o,l=[],c;try{for(;(y===void 0||y-- >0)&&!(o=p.next()).done;)l.push(o.value)}catch(b){c={error:b}}finally{try{o&&!o.done&&(s=p.return)&&s.call(p)}finally{if(c)throw c.error}}return l},q1=globalThis&&globalThis.__spread||function(){for(var v=[],y=0;y<arguments.length;y++)v=v.concat(K1(arguments[y]));return v},wg=500,xg=300,Z1=-1e4;(function(v){Qg(y,v);function y(){var s=v!==null&&v.apply(this,arguments)||this;return s.isGroup=!0,s.unfoldedWidth=wg,s.unfoldedHight=xg,s}return y.prototype.initNodeData=function(s){var p=this;v.prototype.initNodeData.call(this,s);var o=[];Array.isArray(s.children)&&(o=s.children),this.children=new Set(o),this.width=wg,this.height=xg,this.foldedWidth=80,this.foldedHeight=60,this.zIndex=Z1,this.radius=0,this.text.editable=!1,this.text.draggable=!1,this.isRestrict=!1,this.resizable=!1,this.autoToFront=!1,this.foldable=!1,this.properties.isFolded===void 0&&(this.properties.isFolded=!1),this.isFolded=this.properties.isFolded,setTimeout(function(){p.isFolded&&p.foldGroup(p.isFolded)})},y.prototype.getResizeOutlineStyle=function(){var s=v.prototype.getResizeOutlineStyle.call(this);return s.stroke="none",s},y.prototype.foldGroup=function(s){var p=this;this.setProperty("isFolded",s),this.isFolded=s,s?(this.x=this.x-this.width/2+this.foldedWidth/2,this.y=this.y-this.height/2+this.foldedHeight/2,this.unfoldedWidth=this.width,this.unfoldedHight=this.height,this.width=this.foldedWidth,this.height=this.foldedHeight):(this.width=this.unfoldedWidth,this.height=this.unfoldedHight,this.x=this.x+this.width/2-this.foldedWidth/2,this.y=this.y+this.height/2-this.foldedHeight/2);var o=this.incoming.edges.concat(this.outgoing.edges);this.children.forEach(function(l){var c=p.graphModel.getElement(l);c.isGroup&&!c.isFolded&&c.foldGroup(s),c.visible=!s,o=o.concat(c.incoming.edges.concat(c.outgoing.edges))}),this.foldEdge(s,o)},y.prototype.getAnchorStyle=function(s){var p=v.prototype.getAnchorStyle.call(this,s);return p.stroke="transparent",p.fill="transparent",p.hover.fill="transparent",p.hover.stroke="transparent",p},y.prototype.foldEdge=function(s,p){var o=this;p.forEach(function(l,c){var b=l.id,_=l.sourceNodeId,E=l.targetNodeId,w=l.startPoint,k=l.endPoint,j=l.type,P=l.text,D=l.getProperties(),N={id:b+"__"+c,sourceNodeId:_,targetNodeId:E,startPoint:w,endPoint:k,type:j,properties:D,text:P==null?void 0:P.value};l.virtual&&o.graphModel.deleteEdgeById(l.id);var I=o.graphModel.group.getNodeGroup(E);I||(I=o.graphModel.getNodeModelById(E));var B=o.graphModel.group.getNodeGroup(_);B||(B=o.graphModel.getNodeModelById(_)),s&&l.visible!==!1&&(o.children.has(_)||o.id===_?(N.startPoint=void 0,N.sourceNodeId=o.id):(N.endPoint=void 0,N.targetNodeId=o.id),(I.id!==o.id||B.id!==o.id)&&o.createVirtualEdge(N),l.visible=!1),!s&&l.visible===!1&&(I&&I.isGroup&&I.isFolded?(N.targetNodeId=I.id,N.endPoint=void 0,o.createVirtualEdge(N)):B&&B.isGroup&&B.isFolded?(N.sourceNodeId=B.id,N.startPoint=void 0,o.createVirtualEdge(N)):l.visible=!0)})},y.prototype.createVirtualEdge=function(s){s.pointsList=void 0;var p=this.graphModel.addEdge(s);p.virtual=!0,p.text.editable=!1,p.isFoldedEdge=!0},y.prototype.isInRange=function(s){var p=s.x1,o=s.y1,l=s.x2,c=s.y2;return p>=this.x-this.width/2&&l<=this.x+this.width/2&&o>=this.y-this.height/2&&c<=this.y+this.height/2},y.prototype.isAllowMoveTo=function(s){var p=s.x1,o=s.y1,l=s.x2,c=s.y2;return{x:p>=this.x-this.width/2&&l<=this.x+this.width/2,y:o>=this.y-this.height/2&&c<=this.y+this.height/2}},y.prototype.setAllowAppendChild=function(s){this.setProperty("groupAddable",s)},y.prototype.addChild=function(s){this.children.add(s)},y.prototype.removeChild=function(s){this.children.delete(s)},y.prototype.getAddableOutlineStyle=function(){return{stroke:"#FEB663",strokeWidth:2,strokeDasharray:"4 4",fill:"transparent"}},y.prototype.getData=function(){var s=this,p=v.prototype.getData.call(this);p.children=[],this.children.forEach(function(l){var c=s.graphModel.getNodeModelById(l);c&&!c.virtual&&p.children.push(l)});var o=p.properties;return delete o.groupAddable,delete o.isFolded,p},y.prototype.getHistoryData=function(){var s=v.prototype.getData.call(this);s.children=q1(this.children),s.isGroup=!0;var p=s.properties;return delete p.groupAddable,p.isFolded&&(s.x=s.x+this.unfoldedWidth/2-this.foldedWidth/2,s.y=s.y+this.unfoldedHight/2-this.foldedHeight/2),s},y.prototype.isAllowAppendIn=function(s){return!0},y.prototype.toBack=function(){this.zIndex--},y})(Kg.model);(function(v){Qg(y,v);function y(){return v!==null&&v.apply(this,arguments)||this}return y.prototype.getControlGroup=function(){var s=this.props.model,p=s.resizable,o=s.properties;return p&&!o.isFolded?v.prototype.getControlGroup.call(this):null},y.prototype.getAddableShape=function(){var s=this.props.model,p=s.width,o=s.height,l=s.x,c=s.y,b=s.radius,_=s.properties;if(!_.groupAddable)return null;var E=this.props.model.getNodeStyle().strokeWidth,w=this.props.model.getAddableOutlineStyle(),k=p+E+8,j=o+E+8;return qe.h("rect",ju(ju({},w),{width:k,height:j,x:l-k/2,y:c-j/2,rx:b,ry:b}))},y.prototype.getFoldIcon=function(){var s=this.props.model,p=s.x-s.width/2+5,o=s.y-s.height/2+5;if(!s.foldable)return null;var l=qe.h("path",{fill:"none",stroke:"#818281",strokeWidth:2,"pointer-events":"none",d:s.properties.isFolded?"M "+(p+3)+","+(o+6)+" "+(p+11)+","+(o+6)+" M"+(p+7)+","+(o+2)+" "+(p+7)+","+(o+10):"M "+(p+3)+","+(o+6)+" "+(p+11)+","+(o+6)+" "});return qe.h("g",{},[qe.h("rect",{height:12,width:14,rx:2,ry:2,strokeWidth:1,fill:"#F4F5F6",stroke:"#CECECE",cursor:"pointer",x:s.x-s.width/2+5,y:s.y-s.height/2+5,onClick:function(){s.foldGroup(!s.properties.isFolded)}}),l])},y.prototype.getResizeShape=function(){return qe.h("g",{},[this.getAddableShape(),v.prototype.getResizeShape.call(this),this.getFoldIcon()])},y})(Kg.view);var J1=globalThis&&globalThis.__read||function(v,y){var s=typeof Symbol=="function"&&v[Symbol.iterator];if(!s)return v;var p=s.call(v),o,l=[],c;try{for(;(y===void 0||y-- >0)&&!(o=p.next()).done;)l.push(o.value)}catch(b){c={error:b}}finally{try{o&&!o.done&&(s=p.return)&&s.call(p)}finally{if(c)throw c.error}}return l};globalThis&&globalThis.__spread;var Eg=globalThis&&globalThis.__assign||function(){return Eg=Object.assign||function(v){for(var y,s=1,p=arguments.length;s<p;s++){y=arguments[s];for(var o in y)Object.prototype.hasOwnProperty.call(y,o)&&(v[o]=y[o])}return v},Eg.apply(this,arguments)},Sg=globalThis&&globalThis.__assign||function(){return Sg=Object.assign||function(v){for(var y,s=1,p=arguments.length;s<p;s++){y=arguments[s];for(var o in y)Object.prototype.hasOwnProperty.call(y,o)&&(v[o]=y[o])}return v},Sg.apply(this,arguments)},Q1=globalThis&&globalThis.__read||function(v,y){var s=typeof Symbol=="function"&&v[Symbol.iterator];if(!s)return v;var p=s.call(v),o,l=[],c;try{for(;(y===void 0||y-- >0)&&!(o=p.next()).done;)l.push(o.value)}catch(b){c={error:b}}finally{try{o&&!o.done&&(s=p.return)&&s.call(p)}finally{if(c)throw c.error}}return l};globalThis&&globalThis.__spread;const ew={class:"control-container"},tw=["title","onMouseenter"],nw=["disabled","onClick"],rw=Vue.defineComponent({__name:"Control",props:{lf:{default:null},catTurboData:{type:Boolean}},emits:["catData"],setup(v,{emit:y}){const s=v,p=Vue.ref(),o=Vue.ref(),l=Vue.ref(-1),c=Vue.ref([{icon:"icon-zoom-out-hs",text:"缩小",size:"18",disabled:!1},{icon:"icon-enlarge-hs",text:"放大",size:"18",disabled:!1},{icon:"icon-full-screen-hs",text:"适应",size:"15",disabled:!1},{icon:"icon-previous-hs",text:"上一步",size:"15",disabled:!0},{icon:"icon-next-step-hs",text:"下一步",size:"17",disabled:!0},{icon:"icon-download-hs",text:"下载图片",size:"17",disabled:!1},{icon:"icon-watch-hs",text:"查看数据",size:"17",disabled:!1}]),b=(E,w)=>{["zoom","zoom","resetZoom","undo","redo","getSnapshot"].forEach((k,j)=>{const P=s.lf;w===1&&P.zoom(!0),w===6&&y("catData"),w===j&&P[k]()})},_=E=>{l.value=E};return Vue.onMounted(()=>{s.lf.on("history:change",({data:{undoAble:E,redoAble:w}})=>{Vue.unref(c)[3].disabled=Vue.unref(p).disabled=!E,Vue.unref(c)[4].disabled=Vue.unref(o).disabled=!w})}),(E,w)=>{const k=Vue.resolveComponent("el-tooltip");return Vue.openBlock(),Vue.createElementBlock("div",ew,[Vue.createElementVNode("ul",null,[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(c.value,(j,P)=>(Vue.openBlock(),Vue.createElementBlock("li",{key:P,title:j.text,class:"dark:text-bg_color",onMouseenter:Vue.withModifiers(D=>_(P),["prevent"]),onMouseleave:w[0]||(w[0]=Vue.withModifiers(D=>l.value=-1,["prevent"]))},[Vue.createVNode(k,{content:j.text,visible:l.value===P,placement:"right"},{default:Vue.withCtx(()=>[Vue.createElementVNode("button",{ref_for:!0,ref:"controlButton"+P,disabled:j.disabled,style:Vue.normalizeStyle({cursor:j.disabled===!1?"pointer":"not-allowed",color:j.disabled===!1?"":"#00000040",background:"transparent"}),onClick:D=>b(j,P)},[Vue.createElementVNode("span",{class:Vue.normalizeClass("iconfont "+j.icon),style:Vue.normalizeStyle({fontSize:`${j.size}px`})},null,6)],12,nw)]),_:2},1032,["content","visible"])],40,tw))),128))])])}}});const ow=rf(rw,[["__scopeId","data-v-44af808d"]]),iw={class:"node-panel"},aw=["onMousedown"],uw={key:0,class:"shape"},sw={class:"node-label"},cw=Vue.defineComponent({__name:"NodePanel",props:{lf:{default:null},nodeList:{default:null}},setup(v){const y=v,s=Vue.ref({a:"efrwe",b:"wewe"}),p=o=>{y.lf.dnd.startDrag({type:o.type,properties:Vue.unref(s)})};return(o,l)=>(Vue.openBlock(),Vue.createElementBlock("div",iw,[(Vue.openBlock(!0),Vue.createElementBlock(Vue.Fragment,null,Vue.renderList(y.nodeList,c=>(Vue.openBlock(),Vue.createElementBlock("div",{class:"node-item dark:text-bg_color",key:c.text,onMousedown:b=>p(c)},[Vue.createElementVNode("div",{class:Vue.normalizeClass(["node-item-icon",c.class])},[c.type==="user"||c.type==="time"?(Vue.openBlock(),Vue.createElementBlock("div",uw)):Vue.createCommentVNode("",!0)],2),Vue.createElementVNode("span",sw,Vue.toDisplayString(c.text),1)],40,aw))),128))]))}});const lw=rf(cw,[["__scopeId","data-v-5c49346d"]]),fw=Vue.defineComponent({__name:"DataDialog",props:{graphData:Object},setup(v){const y=v;return(s,p)=>(Vue.openBlock(),Vue.createBlock(Vue.unref(GO),{path:"res",deep:3,showLength:!0,data:y.graphData},null,8,["data"]))}}),pw=of(ow),dw=of(lw),hw=of(fw),yw={SEQUENCE_FLOW:1,START_EVENT:2,END_EVENT:3,USER_TASK:4,SERVICE_TASK:5,EXCLUSIVE_GATEWAY:6};function gw(v){const{incoming:y,outgoing:s,properties:p,key:o}=v,{text:l,startPoint:c,endPoint:b,pointsList:_,logicFlowType:E}=p,w={id:o,type:E,sourceNodeId:y[0],targetNodeId:s[0],text:l,startPoint:c,endPoint:b,pointsList:_,properties:{}},k=["startPoint","endPoint","pointsList","text","logicFlowType"];return Object.keys(v.properties).forEach(j=>{k.indexOf(j)===-1&&(w.properties[j]=v.properties[j])}),w}function vw(v){const{properties:y,key:s}=v,{x:p,y:o,text:l,logicFlowType:c}=y,b={id:s,type:c,x:p,y:o,text:l,properties:{}},_=["x","y","text","logicFlowType"];return Object.keys(v.properties).forEach(E=>{_.indexOf(E)===-1&&(b.properties[E]=v.properties[E])}),b}function bw(v){const y={nodes:[],edges:[]},s=v.flowElementList;return s&&s.length>0&&s.forEach(p=>{if(p.type===yw.SEQUENCE_FLOW){const o=gw(p);y.edges.push(o)}else{const o=vw(p);y.nodes.push(o)}}),y}const mw=v=>(Vue.pushScopeId("data-v-75717ba2"),v=v(),Vue.popScopeId(),v),_w={class:"card-header"},Ow={class:"font-medium"},ww={class:"logic-flow-view"},xw=mw(()=>Vue.createElementVNode("div",{id:"turbo"},null,-1)),Ew=Vue.defineComponent({name:"FlowChart",__name:"index",setup(v){const y=Vue.ref(null),s=Vue.ref(null),p=Vue.ref(!1),o=Vue.ref({grid:!0,background:{color:"#f7f9ff"},keyboard:{enabled:!0}}),l=$O;function c(){yu.use(b1),yu.use(v1),yu.use(C1);const E=new yu({...Vue.unref(o),container:document.querySelector("#turbo")});y.value=E,Vue.unref(y).setDefaultEdgeType("bpmn:sequenceFlow"),b()}function b(){const E=bw(WO);y.value.render(E)}function _(){s.value=Vue.unref(y).getGraphData(),p.value=!0}return Vue.onMounted(()=>{c()}),(E,w)=>{const k=Vue.resolveComponent("el-link"),j=Vue.resolveComponent("el-scrollbar"),P=Vue.resolveComponent("el-dialog"),D=Vue.resolveComponent("el-card");return Vue.openBlock(),Vue.createBlock(D,{shadow:"never"},{header:Vue.withCtx(()=>[Vue.createElementVNode("div",_w,[Vue.createElementVNode("span",Ow,[Vue.createTextVNode(" 流程图组件,采用开源的 "),Vue.createVNode(k,{href:"http://logic-flow.org/",target:"_blank",icon:Vue.unref(XO)(Vue.unref(UO)),style:{margin:"0 4px 5px","font-size":"16px"}},{default:Vue.withCtx(()=>[Vue.createTextVNode(" LogicFlow ")]),_:1},8,["icon"])])])]),default:Vue.withCtx(()=>[Vue.createElementVNode("div",ww,[y.value?(Vue.openBlock(),Vue.createBlock(Vue.unref(pw),{key:0,class:"demo-control",lf:y.value,catTurboData:!1,onCatData:_},null,8,["lf"])):Vue.createCommentVNode("",!0),Vue.createVNode(Vue.unref(dw),{lf:y.value,nodeList:Vue.unref(l)},null,8,["lf","nodeList"]),xw,Vue.createVNode(P,{class:"flow-dialog",title:"数据",modelValue:p.value,"onUpdate:modelValue":w[0]||(w[0]=N=>p.value=N),width:"50%"},{default:Vue.withCtx(()=>[Vue.createVNode(j,null,{default:Vue.withCtx(()=>[Vue.createVNode(Vue.unref(hw),{graphData:s.value},null,8,["graphData"])]),_:1})]),_:1},8,["modelValue"])])]),_:1})}}});const Aw=rf(Ew,[["__scopeId","data-v-75717ba2"]]);export{Aw as default};
|