index-9kweZGfo.js 700 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. var a1=Object.defineProperty,u1=Object.defineProperties;var s1=Object.getOwnPropertyDescriptors;var Wb=Object.getOwnPropertySymbols;var c1=Object.prototype.hasOwnProperty,l1=Object.prototype.propertyIsEnumerable;var Vb=(g,y,c)=>y in g?a1(g,y,{enumerable:!0,configurable:!0,writable:!0,value:c}):g[y]=c,Vv=(g,y)=>{for(var c in y||(y={}))c1.call(y,c)&&Vb(g,c,y[c]);if(Wb)for(var c of Wb(y))l1.call(y,c)&&Vb(g,c,y[c]);return g},Kb=(g,y)=>u1(g,s1(y));var md=(g,y,c)=>new Promise((f,o)=>{var p=v=>{try{O(c.next(v))}catch(E){o(E)}},d=v=>{try{O(c.throw(v))}catch(E){o(E)}},O=v=>v.done?f(v.value):Promise.resolve(v.value).then(p,d);O((c=c.apply(g,y)).next())});import{a as f1,h as p1,k as d1,aD as h1}from"./entry/index-CNSQBFd3.js";import{e as y1,p as v1,d as ig,f as _d,h as g1,u as Dn,y as Kv,b as m1,Z as nf,_ as Ha,a1 as Od,F as $b,a8 as b1,k as cf,a5 as ag,a7 as $v,a6 as Sd,G as _1,a0 as O1,aa as w1,c as x1,w as qb,o as E1,$ as S1}from"./vue-4umLpMSY.js";import{T as j1,ab as P1,b as A1,bk as k0}from"./antd-DQsZxxg1.js";import{u as M1,B as k1}from"./index-DxSMAeqw.js";import{J as T1}from"./index-BQJlNbFI.js";import{P as D1}from"./index-BHfKFQ5w.js";import"./useWindowSizeFn-DyWFLruW.js";import"./useContentViewHeight-B1QdR--R.js";import"./onMountedOrActivated-fw6WqIjB.js";const T0=Symbol("flow-chart");function N1(g){v1(T0,g)}function C1(){return y1(T0)}var jr=(g=>(g.ZOOM_IN="zoomIn",g.ZOOM_OUT="zoomOut",g.RESET_ZOOM="resetZoom",g.UNDO="undo",g.REDO="redo",g.SNAPSHOT="snapshot",g.VIEW_DATA="viewData",g))(jr||{});const R1=["onClick"],I1=ig({name:"FlowChartToolbar",__name:"FlowChartToolbar",props:{prefixCls:String},emits:["view-data"],setup(g,{emit:y}){const c=y,f=_d([{type:jr.ZOOM_IN,icon:"codicon:zoom-out",tooltip:"缩小"},{type:jr.ZOOM_OUT,icon:"codicon:zoom-in",tooltip:"放大"},{type:jr.RESET_ZOOM,icon:"codicon:screen-normal",tooltip:"重置比例"},{separate:!0},{type:jr.UNDO,icon:"ion:arrow-undo-outline",tooltip:"后退",disabled:!0},{type:jr.REDO,icon:"ion:arrow-redo-outline",tooltip:"前进",disabled:!0},{separate:!0},{type:jr.SNAPSHOT,icon:"ion:download-outline",tooltip:"下载"},{type:jr.VIEW_DATA,icon:"carbon:document-view",tooltip:"查看数据"}]),{logicFlow:o}=C1();function p({data:{undoAble:O,redoAble:v}}){const E=Dn(f),M=E.findIndex(T=>T.type===jr.UNDO),A=E.findIndex(T=>T.type===jr.REDO);M!==-1&&(Dn(f)[M].disabled=!O),A!==-1&&(Dn(f)[A].disabled=!v)}const d=O=>{const v=Dn(o);if(v)switch(O.type){case jr.ZOOM_IN:v.zoom();break;case jr.ZOOM_OUT:v.zoom(!0);break;case jr.RESET_ZOOM:v.resetZoom();break;case jr.UNDO:v.undo();break;case jr.REDO:v.redo();break;case jr.SNAPSHOT:v.getSnapshot();break;case jr.VIEW_DATA:c("view-data");break}};return g1(()=>md(this,null,function*(){var O;Dn(o)&&(yield Kv(),(O=Dn(o))==null||O.on("history:change",p))})),m1(()=>{var O;(O=Dn(o))==null||O.off("history:change",p)}),(O,v)=>(Ha(),nf("div",{class:Od([`${g.prefixCls}-toolbar`,"flex items-center px-2 py-1"])},[(Ha(!0),nf($b,null,b1(f.value,E=>(Ha(),nf($b,{key:E.type},[cf(Dn(j1),w1({placement:"bottom",ref_for:!0},E.disabled?{visible:!1}:{}),{title:Sd(()=>[_1(O1(E.tooltip),1)]),default:Sd(()=>[E.icon?(Ha(),nf("span",{key:0,class:Od(`${g.prefixCls}-toolbar__icon`),onClick:M=>d(E)},[cf(f1,{icon:E.icon,class:Od(E.disabled?"cursor-not-allowed disabled":"cursor-pointer")},null,8,["icon","class"])],10,R1)):$v("",!0)]),_:2},1040),E.separate?(Ha(),ag(Dn(P1),{key:0,type:"vertical"})):$v("",!0)],64))),128))],2))}});var qv={exports:{}};(function(g,y){(function(c,f){g.exports=f()})(window,function(){return function(c){var f={};function o(p){if(f[p])return f[p].exports;var d=f[p]={i:p,l:!1,exports:{}};return c[p].call(d.exports,d,d.exports,o),d.l=!0,d.exports}return o.m=c,o.c=f,o.d=function(p,d,O){o.o(p,d)||Object.defineProperty(p,d,{enumerable:!0,get:O})},o.r=function(p){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(p,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(p,"__esModule",{value:!0})},o.t=function(p,d){if(1&d&&(p=o(p)),8&d||4&d&&typeof p=="object"&&p&&p.__esModule)return p;var O=Object.create(null);if(o.r(O),Object.defineProperty(O,"default",{enumerable:!0,value:p}),2&d&&typeof p!="string")for(var v in p)o.d(O,v,function(E){return p[E]}.bind(null,v));return O},o.n=function(p){var d=p&&p.__esModule?function(){return p.default}:function(){return p};return o.d(d,"a",d),d},o.o=function(p,d){return Object.prototype.hasOwnProperty.call(p,d)},o.p="",o(o.s=222)}([function(c,f,o){o.d(f,"a",function(){return re}),o.d(f,"b",function(){return ie}),o.d(f,"c",function(){return Ze}),o.d(f,"d",function(){return vt}),o.d(f,"e",function(){return W}),o.d(f,"f",function(){return te}),o.d(f,"g",function(){return W}),o.d(f,"h",function(){return We}),o.d(f,"i",function(){return d}),o.d(f,"j",function(){return Ot}),o.d(f,"k",function(){return $});var p,d,O,v,E,M,A,T={},k=[],R=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function C(se,ue){for(var he in ue)se[he]=ue[he];return se}function F(se){var ue=se.parentNode;ue&&ue.removeChild(se)}function W(se,ue,he){var Te,Xe,Le,wt={};for(Le in ue)Le=="key"?Te=ue[Le]:Le=="ref"?Xe=ue[Le]:wt[Le]=ue[Le];if(arguments.length>2&&(wt.children=arguments.length>3?p.call(arguments,2):he),typeof se=="function"&&se.defaultProps!=null)for(Le in se.defaultProps)wt[Le]===void 0&&(wt[Le]=se.defaultProps[Le]);return V(se,wt,Te,Xe,null)}function V(se,ue,he,Te,Xe){var Le={type:se,props:ue,key:he,ref:Te,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:Xe==null?++O:Xe};return Xe==null&&d.vnode!=null&&d.vnode(Le),Le}function te(){return{current:null}}function ie(se){return se.children}function re(se,ue){this.props=se,this.context=ue}function J(se,ue){if(ue==null)return se.__?J(se.__,se.__.__k.indexOf(se)+1):null;for(var he;ue<se.__k.length;ue++)if((he=se.__k[ue])!=null&&he.__e!=null)return he.__e;return typeof se.type=="function"?J(se):null}function Z(se){var ue,he;if((se=se.__)!=null&&se.__c!=null){for(se.__e=se.__c.base=null,ue=0;ue<se.__k.length;ue++)if((he=se.__k[ue])!=null&&he.__e!=null){se.__e=se.__c.base=he.__e;break}return Z(se)}}function Y(se){(!se.__d&&(se.__d=!0)&&v.push(se)&&!z.__r++||M!==d.debounceRendering)&&((M=d.debounceRendering)||E)(z)}function z(){for(var se;z.__r=v.length;)se=v.sort(function(ue,he){return ue.__v.__b-he.__v.__b}),v=[],se.some(function(ue){var he,Te,Xe,Le,wt,kt;ue.__d&&(wt=(Le=(he=ue).__v).__e,(kt=he.__P)&&(Te=[],(Xe=C({},Le)).__v=Le.__v+1,Se(kt,Le,Xe,he.__n,kt.ownerSVGElement!==void 0,Le.__h!=null?[wt]:null,Te,wt==null?J(Le):wt,Le.__h),ye(Te,Le),Le.__e!=wt&&Z(Le)))})}function G(se,ue,he,Te,Xe,Le,wt,kt,St,yt){var Me,ct,fe,at,It,on,Lt,qt=Te&&Te.__k||k,dn=qt.length;for(he.__k=[],Me=0;Me<ue.length;Me++)if((at=he.__k[Me]=(at=ue[Me])==null||typeof at=="boolean"?null:typeof at=="string"||typeof at=="number"||typeof at=="bigint"?V(null,at,null,null,at):Array.isArray(at)?V(ie,{children:at},null,null,null):at.__b>0?V(at.type,at.props,at.key,null,at.__v):at)!=null){if(at.__=he,at.__b=he.__b+1,(fe=qt[Me])===null||fe&&at.key==fe.key&&at.type===fe.type)qt[Me]=void 0;else for(ct=0;ct<dn;ct++){if((fe=qt[ct])&&at.key==fe.key&&at.type===fe.type){qt[ct]=void 0;break}fe=null}Se(se,at,fe=fe||T,Xe,Le,wt,kt,St,yt),It=at.__e,(ct=at.ref)&&fe.ref!=ct&&(Lt||(Lt=[]),fe.ref&&Lt.push(fe.ref,null,at),Lt.push(ct,at.__c||It,at)),It!=null?(on==null&&(on=It),typeof at.type=="function"&&at.__k===fe.__k?at.__d=St=H(at,St,se):St=ae(se,at,fe,qt,It,St),typeof he.type=="function"&&(he.__d=St)):St&&fe.__e==St&&St.parentNode!=se&&(St=J(fe))}for(he.__e=on,Me=dn;Me--;)qt[Me]!=null&&(typeof he.type=="function"&&qt[Me].__e!=null&&qt[Me].__e==he.__d&&(he.__d=J(Te,Me+1)),Ue(qt[Me],qt[Me]));if(Lt)for(Me=0;Me<Lt.length;Me++)Ae(Lt[Me],Lt[++Me],Lt[++Me])}function H(se,ue,he){for(var Te,Xe=se.__k,Le=0;Xe&&Le<Xe.length;Le++)(Te=Xe[Le])&&(Te.__=se,ue=typeof Te.type=="function"?H(Te,ue,he):ae(he,Te,Te,Xe,Te.__e,ue));return ue}function $(se,ue){return ue=ue||[],se==null||typeof se=="boolean"||(Array.isArray(se)?se.some(function(he){$(he,ue)}):ue.push(se)),ue}function ae(se,ue,he,Te,Xe,Le){var wt,kt,St;if(ue.__d!==void 0)wt=ue.__d,ue.__d=void 0;else if(he==null||Xe!=Le||Xe.parentNode==null)e:if(Le==null||Le.parentNode!==se)se.appendChild(Xe),wt=null;else{for(kt=Le,St=0;(kt=kt.nextSibling)&&St<Te.length;St+=2)if(kt==Xe)break e;se.insertBefore(Xe,Le),wt=Le}return wt!==void 0?wt:Xe.nextSibling}function xe(se,ue,he){ue[0]==="-"?se.setProperty(ue,he):se[ue]=he==null?"":typeof he!="number"||R.test(ue)?he:he+"px"}function me(se,ue,he,Te,Xe){var Le;e:if(ue==="style")if(typeof he=="string")se.style.cssText=he;else{if(typeof Te=="string"&&(se.style.cssText=Te=""),Te)for(ue in Te)he&&ue in he||xe(se.style,ue,"");if(he)for(ue in he)Te&&he[ue]===Te[ue]||xe(se.style,ue,he[ue])}else if(ue[0]==="o"&&ue[1]==="n")Le=ue!==(ue=ue.replace(/Capture$/,"")),ue=ue.toLowerCase()in se?ue.toLowerCase().slice(2):ue.slice(2),se.l||(se.l={}),se.l[ue+Le]=he,he?Te||se.addEventListener(ue,Le?Be:Pe,Le):se.removeEventListener(ue,Le?Be:Pe,Le);else if(ue!=="dangerouslySetInnerHTML"){if(Xe)ue=ue.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if(ue!=="href"&&ue!=="list"&&ue!=="form"&&ue!=="tabIndex"&&ue!=="download"&&ue in se)try{se[ue]=he==null?"":he;break e}catch(wt){}typeof he=="function"||(he!=null&&(he!==!1||ue[0]==="a"&&ue[1]==="r")?se.setAttribute(ue,he):se.removeAttribute(ue))}}function Pe(se){this.l[se.type+!1](d.event?d.event(se):se)}function Be(se){this.l[se.type+!0](d.event?d.event(se):se)}function Se(se,ue,he,Te,Xe,Le,wt,kt,St){var yt,Me,ct,fe,at,It,on,Lt,qt,dn,bn,Dt=ue.type;if(ue.constructor!==void 0)return null;he.__h!=null&&(St=he.__h,kt=ue.__e=he.__e,ue.__h=null,Le=[kt]),(yt=d.__b)&&yt(ue);try{e:if(typeof Dt=="function"){if(Lt=ue.props,qt=(yt=Dt.contextType)&&Te[yt.__c],dn=yt?qt?qt.props.value:yt.__:Te,he.__c?on=(Me=ue.__c=he.__c).__=Me.__E:("prototype"in Dt&&Dt.prototype.render?ue.__c=Me=new Dt(Lt,dn):(ue.__c=Me=new re(Lt,dn),Me.constructor=Dt,Me.render=nt),qt&&qt.sub(Me),Me.props=Lt,Me.state||(Me.state={}),Me.context=dn,Me.__n=Te,ct=Me.__d=!0,Me.__h=[]),Me.__s==null&&(Me.__s=Me.state),Dt.getDerivedStateFromProps!=null&&(Me.__s==Me.state&&(Me.__s=C({},Me.__s)),C(Me.__s,Dt.getDerivedStateFromProps(Lt,Me.__s))),fe=Me.props,at=Me.state,ct)Dt.getDerivedStateFromProps==null&&Me.componentWillMount!=null&&Me.componentWillMount(),Me.componentDidMount!=null&&Me.__h.push(Me.componentDidMount);else{if(Dt.getDerivedStateFromProps==null&&Lt!==fe&&Me.componentWillReceiveProps!=null&&Me.componentWillReceiveProps(Lt,dn),!Me.__e&&Me.shouldComponentUpdate!=null&&Me.shouldComponentUpdate(Lt,Me.__s,dn)===!1||ue.__v===he.__v){Me.props=Lt,Me.state=Me.__s,ue.__v!==he.__v&&(Me.__d=!1),Me.__v=ue,ue.__e=he.__e,ue.__k=he.__k,ue.__k.forEach(function(Nn){Nn&&(Nn.__=ue)}),Me.__h.length&&wt.push(Me);break e}Me.componentWillUpdate!=null&&Me.componentWillUpdate(Lt,Me.__s,dn),Me.componentDidUpdate!=null&&Me.__h.push(function(){Me.componentDidUpdate(fe,at,It)})}Me.context=dn,Me.props=Lt,Me.state=Me.__s,(yt=d.__r)&&yt(ue),Me.__d=!1,Me.__v=ue,Me.__P=se,yt=Me.render(Me.props,Me.state,Me.context),Me.state=Me.__s,Me.getChildContext!=null&&(Te=C(C({},Te),Me.getChildContext())),ct||Me.getSnapshotBeforeUpdate==null||(It=Me.getSnapshotBeforeUpdate(fe,at)),bn=yt!=null&&yt.type===ie&&yt.key==null?yt.props.children:yt,G(se,Array.isArray(bn)?bn:[bn],ue,he,Te,Xe,Le,wt,kt,St),Me.base=ue.__e,ue.__h=null,Me.__h.length&&wt.push(Me),on&&(Me.__E=Me.__=null),Me.__e=!1}else Le==null&&ue.__v===he.__v?(ue.__k=he.__k,ue.__e=he.__e):ue.__e=je(he.__e,ue,he,Te,Xe,Le,wt,St);(yt=d.diffed)&&yt(ue)}catch(Nn){ue.__v=null,(St||Le!=null)&&(ue.__e=kt,ue.__h=!!St,Le[Le.indexOf(kt)]=null),d.__e(Nn,ue,he)}}function ye(se,ue){d.__c&&d.__c(ue,se),se.some(function(he){try{se=he.__h,he.__h=[],se.some(function(Te){Te.call(he)})}catch(Te){d.__e(Te,he.__v)}})}function je(se,ue,he,Te,Xe,Le,wt,kt){var St,yt,Me,ct=he.props,fe=ue.props,at=ue.type,It=0;if(at==="svg"&&(Xe=!0),Le!=null){for(;It<Le.length;It++)if((St=Le[It])&&"setAttribute"in St==!!at&&(at?St.localName===at:St.nodeType===3)){se=St,Le[It]=null;break}}if(se==null){if(at===null)return document.createTextNode(fe);se=Xe?document.createElementNS("http://www.w3.org/2000/svg",at):document.createElement(at,fe.is&&fe),Le=null,kt=!1}if(at===null)ct===fe||kt&&se.data===fe||(se.data=fe);else{if(Le=Le&&p.call(se.childNodes),yt=(ct=he.props||T).dangerouslySetInnerHTML,Me=fe.dangerouslySetInnerHTML,!kt){if(Le!=null)for(ct={},It=0;It<se.attributes.length;It++)ct[se.attributes[It].name]=se.attributes[It].value;(Me||yt)&&(Me&&(yt&&Me.__html==yt.__html||Me.__html===se.innerHTML)||(se.innerHTML=Me&&Me.__html||""))}if(function(on,Lt,qt,dn,bn){var Dt;for(Dt in qt)Dt==="children"||Dt==="key"||Dt in Lt||me(on,Dt,null,qt[Dt],dn);for(Dt in Lt)bn&&typeof Lt[Dt]!="function"||Dt==="children"||Dt==="key"||Dt==="value"||Dt==="checked"||qt[Dt]===Lt[Dt]||me(on,Dt,Lt[Dt],qt[Dt],dn)}(se,fe,ct,Xe,kt),Me)ue.__k=[];else if(It=ue.props.children,G(se,Array.isArray(It)?It:[It],ue,he,Te,Xe&&at!=="foreignObject",Le,wt,Le?Le[0]:he.__k&&J(he,0),kt),Le!=null)for(It=Le.length;It--;)Le[It]!=null&&F(Le[It]);kt||("value"in fe&&(It=fe.value)!==void 0&&(It!==ct.value||It!==se.value||at==="progress"&&!It)&&me(se,"value",It,ct.value,!1),"checked"in fe&&(It=fe.checked)!==void 0&&It!==se.checked&&me(se,"checked",It,ct.checked,!1))}return se}function Ae(se,ue,he){try{typeof se=="function"?se(ue):se.current=ue}catch(Te){d.__e(Te,he)}}function Ue(se,ue,he){var Te,Xe;if(d.unmount&&d.unmount(se),(Te=se.ref)&&(Te.current&&Te.current!==se.__e||Ae(Te,null,ue)),(Te=se.__c)!=null){if(Te.componentWillUnmount)try{Te.componentWillUnmount()}catch(Le){d.__e(Le,ue)}Te.base=Te.__P=null}if(Te=se.__k)for(Xe=0;Xe<Te.length;Xe++)Te[Xe]&&Ue(Te[Xe],ue,typeof se.type!="function");he||se.__e==null||F(se.__e),se.__e=se.__d=void 0}function nt(se,ue,he){return this.constructor(se,he)}function Ot(se,ue,he){var Te,Xe,Le;d.__&&d.__(se,ue),Xe=(Te=typeof he=="function")?null:he&&he.__k||ue.__k,Le=[],Se(ue,se=(!Te&&he||ue).__k=W(ie,null,[se]),Xe||T,T,ue.ownerSVGElement!==void 0,!Te&&he?[he]:Xe?null:ue.firstChild?p.call(ue.childNodes):null,Le,!Te&&he?he:Xe?Xe.__e:ue.firstChild,Te),ye(Le,se)}function We(se,ue){Ot(se,ue,We)}function Ze(se,ue,he){var Te,Xe,Le,wt=C({},se.props);for(Le in ue)Le=="key"?Te=ue[Le]:Le=="ref"?Xe=ue[Le]:wt[Le]=ue[Le];return arguments.length>2&&(wt.children=arguments.length>3?p.call(arguments,2):he),V(se.type,wt,Te||se.key,Xe||se.ref,null)}function vt(se,ue){var he={__c:ue="__cC"+A++,__:se,Consumer:function(Te,Xe){return Te.children(Xe)},Provider:function(Te){var Xe,Le;return this.getChildContext||(Xe=[],(Le={})[ue]=this,this.getChildContext=function(){return Le},this.shouldComponentUpdate=function(wt){this.props.value!==wt.value&&Xe.some(Y)},this.sub=function(wt){Xe.push(wt);var kt=wt.componentWillUnmount;wt.componentWillUnmount=function(){Xe.splice(Xe.indexOf(wt),1),kt&&kt.call(wt)}}),Te.children}};return he.Provider.__=he.Consumer.contextType=he}p=k.slice,d={__e:function(se,ue){for(var he,Te,Xe;ue=ue.__;)if((he=ue.__c)&&!he.__)try{if((Te=he.constructor)&&Te.getDerivedStateFromError!=null&&(he.setState(Te.getDerivedStateFromError(se)),Xe=he.__d),he.componentDidCatch!=null&&(he.componentDidCatch(se),Xe=he.__d),Xe)return he.__E=he}catch(Le){se=Le}throw se}},O=0,re.prototype.setState=function(se,ue){var he;he=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=C({},this.state),typeof se=="function"&&(se=se(C({},he),this.props)),se&&C(he,se),se!=null&&this.__v&&(ue&&this.__h.push(ue),Y(this))},re.prototype.forceUpdate=function(se){this.__v&&(this.__e=!0,se&&this.__h.push(se),Y(this))},re.prototype.render=ie,v=[],E=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,z.__r=0,A=0},function(c,f,o){(function(p,d){o.d(f,"a",function(){return Y}),o.d(f,"b",function(){return cu}),o.d(f,"c",function(){return qr}),o.d(f,"d",function(){return Et}),o.d(f,"e",function(){return Ke}),o.d(f,"f",function(){return Ve}),o.d(f,"g",function(){return mt}),o.d(f,"h",function(){return lo}),o.d(f,"i",function(){return bn}),o.d(f,"j",function(){return ut}),o.d(f,"k",function(){return xo}),o.d(f,"l",function(){return Qa}),o.d(f,"m",function(){return on}),o.d(f,"n",function(){return si}),o.d(f,"o",function(){return H}),o.d(f,"p",function(){return Sc}),o.d(f,"q",function(){return Eo}),o.d(f,"r",function(){return oa}),o.d(f,"s",function(){return Fr}),o.d(f,"t",function(){return An}),o.d(f,"u",function(){return ra}),o.d(f,"v",function(){return ts}),o.d(f,"w",function(){return ou}),o.d(f,"x",function(){return ci}),o.d(f,"y",function(){return Br}),o.d(f,"z",function(){return Rn}),o.d(f,"A",function(){return _r}),o.d(f,"B",function(){return So}),o.d(f,"C",function(){return yt}),o.d(f,"D",function(){return jc}),o.d(f,"E",function(){return an}),o.d(f,"F",function(){return sn}),o.d(f,"G",function(){return Za}),o.d(f,"H",function(){return qa}),o.d(f,"I",function(){return iu}),o.d(f,"J",function(){return Xn}),o.d(f,"K",function(){return de}),o.d(f,"L",function(){return vn}),o.d(f,"M",function(){return aa});var O=[];Object.freeze(O);var v={};function E(){return++lt.mobxGuid}function M(_){throw A(!1,_),"X"}function A(_,w){if(!_)throw new Error("[mobx] "+(w||"An invariant failed, however the error is obfuscated because this is a production build."))}Object.freeze(v);function T(_){var w=!1;return function(){if(!w)return w=!0,_.apply(this,arguments)}}var k=function(){};function R(_){return _!==null&&typeof _=="object"}function C(_){if(_===null||typeof _!="object")return!1;var w=Object.getPrototypeOf(_);return w===Object.prototype||w===null}function F(_,w,P){Object.defineProperty(_,w,{enumerable:!1,writable:!0,configurable:!0,value:P})}function W(_,w){var P="isMobX"+_;return w.prototype[P]=!0,function(L){return R(L)&&L[P]===!0}}function V(_){return _ instanceof Map}function te(_){return _ instanceof Set}function ie(_){var w=new Set;for(var P in _)w.add(P);return Object.getOwnPropertySymbols(_).forEach(function(L){Object.getOwnPropertyDescriptor(_,L).enumerable&&w.add(L)}),Array.from(w)}function re(_){return _&&_.toString?_.toString():new String(_).toString()}function J(_){return _===null?null:typeof _=="object"?""+_:_}var Z=typeof Reflect!="undefined"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols?function(_){return Object.getOwnPropertyNames(_).concat(Object.getOwnPropertySymbols(_))}:Object.getOwnPropertyNames,Y=Symbol("mobx administration"),z=function(){function _(w){w===void 0&&(w="Atom@"+E()),this.name=w,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=new Set,this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=ct.NOT_TRACKING}return _.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(w){return w()})},_.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(w){return w()})},_.prototype.reportObserved=function(){return na(this)},_.prototype.reportChanged=function(){vr(),function(w){w.lowestObserverState!==ct.STALE&&(w.lowestObserverState=ct.STALE,w.observers.forEach(function(P){P.dependenciesState===ct.UP_TO_DATE&&(P.isTracing!==fe.NONE&&$r(P,w),P.onBecomeStale()),P.dependenciesState=ct.STALE}))}(this),Pr()},_.prototype.toString=function(){return this.name},_}(),G=W("Atom",z);function H(_,w,P){w===void 0&&(w=k),P===void 0&&(P=k);var L,K=new z(_);return w!==k&&Qu("onBecomeObserved",K,w,L),P!==k&&an(K,P),K}var $={structural:function(_,w){return Ne(_,w)},default:function(_,w){return Object.is(_,w)}},ae=function(_,w){return ae=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(P,L){P.__proto__=L}||function(P,L){for(var K in L)L.hasOwnProperty(K)&&(P[K]=L[K])},ae(_,w)};/*! *****************************************************************************
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. Licensed under the Apache License, Version 2.0 (the "License"); you may not use
  4. this file except in compliance with the License. You may obtain a copy of the
  5. License at http://www.apache.org/licenses/LICENSE-2.0
  6. THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  7. KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
  8. WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
  9. MERCHANTABLITY OR NON-INFRINGEMENT.
  10. See the Apache Version 2.0 License for specific language governing permissions
  11. and limitations under the License.
  12. ***************************************************************************** */var xe=function(){return xe=Object.assign||function(_){for(var w,P=1,L=arguments.length;P<L;P++)for(var K in w=arguments[P])Object.prototype.hasOwnProperty.call(w,K)&&(_[K]=w[K]);return _},xe.apply(this,arguments)};function me(_){var w=typeof Symbol=="function"&&_[Symbol.iterator],P=0;return w?w.call(_):{next:function(){return _&&P>=_.length&&(_=void 0),{value:_&&_[P++],done:!_}}}}function Pe(_,w){var P=typeof Symbol=="function"&&_[Symbol.iterator];if(!P)return _;var L,K,pe=P.call(_),Ee=[];try{for(;(w===void 0||w-- >0)&&!(L=pe.next()).done;)Ee.push(L.value)}catch(Fe){K={error:Fe}}finally{try{L&&!L.done&&(P=pe.return)&&P.call(pe)}finally{if(K)throw K.error}}return Ee}function Be(){for(var _=[],w=0;w<arguments.length;w++)_=_.concat(Pe(arguments[w]));return _}var Se=Symbol("mobx did run lazy initializers"),ye=Symbol("mobx pending decorators"),je={},Ae={};function Ue(_,w){var P=w?je:Ae;return P[_]||(P[_]={configurable:!0,enumerable:w,get:function(){return nt(this),this[_]},set:function(L){nt(this),this[_]=L}})}function nt(_){var w,P;if(_[Se]!==!0){var L=_[ye];if(L){F(_,Se,!0);var K=Be(Object.getOwnPropertySymbols(L),Object.keys(L));try{for(var pe=me(K),Ee=pe.next();!Ee.done;Ee=pe.next()){var Fe=L[Ee.value];Fe.propertyCreator(_,Fe.prop,Fe.descriptor,Fe.decoratorTarget,Fe.decoratorArguments)}}catch(st){w={error:st}}finally{try{Ee&&!Ee.done&&(P=pe.return)&&P.call(pe)}finally{if(w)throw w.error}}}}}function Ot(_,w){return function(){var P,L=function(K,pe,Ee,Fe){if(Fe===!0)return w(K,pe,Ee,K,P),null;if(!Object.prototype.hasOwnProperty.call(K,ye)){var st=K[ye];F(K,ye,xe({},st))}return K[ye][pe]={prop:pe,propertyCreator:w,descriptor:Ee,decoratorTarget:K,decoratorArguments:P},Ue(pe,_)};return We(arguments)?(P=O,L.apply(null,arguments)):(P=Array.prototype.slice.call(arguments),L)}}function We(_){return(_.length===2||_.length===3)&&(typeof _[1]=="string"||typeof _[1]=="symbol")||_.length===4&&_[3]===!0}function Ze(_,w,P){return ci(_)?_:Array.isArray(_)?yt.array(_,{name:P}):C(_)?yt.object(_,void 0,{name:P}):V(_)?yt.map(_,{name:P}):te(_)?yt.set(_,{name:P}):_}function vt(_){return _}function se(_){A(_);var w=Ot(!0,function(L,K,pe,Ee,Fe){var st=pe?pe.initializer?pe.initializer.call(L):pe.value:void 0;Ar(L).addObservableProp(K,st,_)}),P=(p!==void 0&&p.env,w);return P.enhancer=_,P}var ue={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function he(_){return _==null?ue:typeof _=="string"?{name:_,deep:!0,proxy:!0}:_}Object.freeze(ue);var Te=se(Ze),Xe=se(function(_,w,P){return _==null||_r(_)||Br(_)||Rn(_)||sr(_)?_:Array.isArray(_)?yt.array(_,{name:P,deep:!1}):C(_)?yt.object(_,void 0,{name:P,deep:!1}):V(_)?yt.map(_,{name:P,deep:!1}):te(_)?yt.set(_,{name:P,deep:!1}):M(!1)}),Le=se(vt),wt=se(function(_,w,P){return Ne(_,w)?w:_});function kt(_){return _.defaultDecorator?_.defaultDecorator.enhancer:_.deep===!1?vt:Ze}var St={box:function(_,w){arguments.length>2&&Me("box");var P=he(w);return new xn(_,kt(P),P.name,!0,P.equals)},array:function(_,w){arguments.length>2&&Me("array");var P=he(w);return Ni(_,kt(P),P.name)},map:function(_,w){arguments.length>2&&Me("map");var P=he(w);return new cu(_,kt(P),P.name)},set:function(_,w){arguments.length>2&&Me("set");var P=he(w);return new so(_,kt(P),P.name)},object:function(_,w,P){typeof arguments[1]=="string"&&Me("object");var L=he(P);if(L.proxy===!1)return Eo({},_,w,L);var K=eu(L),pe=Eo({},void 0,void 0,L),Ee=li(pe);return es(Ee,_,w,K),Ee},ref:Le,shallow:Xe,deep:Te,struct:wt},yt=function(_,w,P){if(typeof arguments[1]=="string"||typeof arguments[1]=="symbol")return Te.apply(null,arguments);if(ci(_))return _;var L=C(_)?yt.object(_,w,P):Array.isArray(_)?yt.array(_,w):V(_)?yt.map(_,w):te(_)?yt.set(_,w):_;if(L!==_)return L;M(!1)};function Me(_){M("Expected one or two arguments to observable."+_+". Did you accidentally try to use observable."+_+" as decorator?")}Object.keys(St).forEach(function(_){return yt[_]=St[_]});var ct,fe,at=Ot(!1,function(_,w,P,L,K){var pe=P.get,Ee=P.set,Fe=K[0]||{};Ar(_).addComputedProp(_,w,xe({get:pe,set:Ee,context:_},Fe))}),It=at({equals:$.structural}),on=function(_,w,P){if(typeof w=="string"||_!==null&&typeof _=="object"&&arguments.length===1)return at.apply(null,arguments);var L=typeof w=="object"?w:{};return L.get=_,L.set=typeof w=="function"?w:L.set,L.name=L.name||_.name||"",new io(L)};on.struct=It,function(_){_[_.NOT_TRACKING=-1]="NOT_TRACKING",_[_.UP_TO_DATE=0]="UP_TO_DATE",_[_.POSSIBLY_STALE=1]="POSSIBLY_STALE",_[_.STALE=2]="STALE"}(ct||(ct={})),function(_){_[_.NONE=0]="NONE",_[_.LOG=1]="LOG",_[_.BREAK=2]="BREAK"}(fe||(fe={}));var Lt=function(_){this.cause=_};function qt(_){return _ instanceof Lt}function dn(_){switch(_.dependenciesState){case ct.UP_TO_DATE:return!1;case ct.NOT_TRACKING:case ct.STALE:return!0;case ct.POSSIBLY_STALE:for(var w=Ve(!0),P=oe(),L=_.observing,K=L.length,pe=0;pe<K;pe++){var Ee=L[pe];if(wo(Ee)){if(lt.disableErrorBoundaries)Ee.get();else try{Ee.get()}catch(Fe){return be(P),Ke(w),!0}if(_.dependenciesState===ct.STALE)return be(P),Ke(w),!0}}return ft(_),be(P),Ke(w),!1}}function bn(){return lt.trackingDerivation!==null}function Dt(_){var w=_.observers.size>0;lt.computationDepth>0&&w&&M(!1),lt.allowStateChanges||!w&&lt.enforceActions!=="strict"||M(!1)}function Nn(_,w,P){var L=Ve(!0);ft(_),_.newObserving=new Array(_.observing.length+100),_.unboundDepsCount=0,_.runId=++lt.runId;var K,pe=lt.trackingDerivation;if(lt.trackingDerivation=_,lt.disableErrorBoundaries===!0)K=w.call(P);else try{K=w.call(P)}catch(Ee){K=new Lt(Ee)}return lt.trackingDerivation=pe,function(Ee){for(var Fe=Ee.observing,st=Ee.observing=Ee.newObserving,Xt=ct.UP_TO_DATE,et=0,hn=Ee.unboundDepsCount,Bt=0;Bt<hn;Bt++)(tn=st[Bt]).diffValue===0&&(tn.diffValue=1,et!==Bt&&(st[et]=tn),et++),tn.dependenciesState>Xt&&(Xt=tn.dependenciesState);for(st.length=et,Ee.newObserving=null,hn=Fe.length;hn--;)(tn=Fe[hn]).diffValue===0&&Wa(tn,Ee),tn.diffValue=0;for(;et--;){var tn;(tn=st[et]).diffValue===1&&(tn.diffValue=0,wc(tn,Ee))}Xt!==ct.UP_TO_DATE&&(Ee.dependenciesState=Xt,Ee.onBecomeStale())}(_),Ke(L),K}function Q(_){var w=_.observing;_.observing=[];for(var P=w.length;P--;)Wa(w[P],_);_.dependenciesState=ct.NOT_TRACKING}function de(_){var w=oe();try{return _()}finally{be(w)}}function oe(){var _=lt.trackingDerivation;return lt.trackingDerivation=null,_}function be(_){lt.trackingDerivation=_}function Ve(_){var w=lt.allowStateReads;return lt.allowStateReads=_,w}function Ke(_){lt.allowStateReads=_}function ft(_){if(_.dependenciesState!==ct.UP_TO_DATE){_.dependenciesState=ct.UP_TO_DATE;for(var w=_.observing,P=w.length;P--;)w[P].lowestObserverState=ct.UP_TO_DATE}}var Gt=0,Hn=1,Qn=Object.getOwnPropertyDescriptor(function(){},"name");Qn&&Qn.configurable;function Cn(_,w,P){var L=function(){return zn(_,w,P||this,arguments)};return L.isMobxAction=!0,L}function zn(_,w,P,L){var K=ut();try{return w.apply(P,L)}catch(pe){throw K.error=pe,pe}finally{mt(K)}}function ut(_,w,P){var L=0,K=oe();vr();var pe={prevDerivation:K,prevAllowStateChanges:Nt(!0),prevAllowStateReads:Ve(!0),notifySpy:!1,startTime:L,actionId:Hn++,parentActionId:Gt};return Gt=pe.actionId,pe}function mt(_){Gt!==_.actionId&&M("invalid action stack. did you forget to finish an action?"),Gt=_.parentActionId,_.error!==void 0&&(lt.suppressReactionErrors=!0),ln(_.prevAllowStateChanges),Ke(_.prevAllowStateReads),Pr(),be(_.prevDerivation),_.notifySpy,lt.suppressReactionErrors=!1}function Et(_,w){var P,L=Nt(_);try{P=w()}finally{ln(L)}return P}function Nt(_){var w=lt.allowStateChanges;return lt.allowStateChanges=_,w}function ln(_){lt.allowStateChanges=_}var xn=function(_){function w(P,L,K,pe,Ee){K===void 0&&(K="ObservableValue@"+E()),Ee===void 0&&(Ee=$.default);var Fe=_.call(this,K)||this;return Fe.enhancer=L,Fe.name=K,Fe.equals=Ee,Fe.hasUnreportedChange=!1,Fe.value=L(P,void 0,K),Fe}return function(P,L){function K(){this.constructor=P}ae(P,L),P.prototype=L===null?Object.create(L):(K.prototype=L.prototype,new K)}(w,_),w.prototype.dehanceValue=function(P){return this.dehancer!==void 0?this.dehancer(P):P},w.prototype.set=function(P){this.value,(P=this.prepareNewValue(P))!==lt.UNCHANGED&&this.setNewValue(P)},w.prototype.prepareNewValue=function(P){if(Dt(this),mr(this)){var L=Zt(this,{object:this,type:"update",newValue:P});if(!L)return lt.UNCHANGED;P=L.newValue}return P=this.enhancer(P,this.value,this.name),this.equals(this.value,P)?lt.UNCHANGED:P},w.prototype.setNewValue=function(P){var L=this.value;this.value=P,this.reportChanged(),br(this)&&qn(this,{type:"update",object:this,newValue:P,oldValue:L})},w.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},w.prototype.intercept=function(P){return Po(this,P)},w.prototype.observe=function(P,L){return L&&P({object:this,type:"update",newValue:this.value,oldValue:void 0}),uo(this,P)},w.prototype.toJSON=function(){return this.get()},w.prototype.toString=function(){return this.name+"["+this.value+"]"},w.prototype.valueOf=function(){return J(this.get())},w.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},w}(z),Oo=W("ObservableValue",xn),io=function(){function _(w){this.dependenciesState=ct.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=ct.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+E(),this.value=new Lt(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=fe.NONE,A(w.get,"missing option for computed: get"),this.derivation=w.get,this.name=w.name||"ComputedValue@"+E(),w.set&&(this.setter=Cn(this.name+"-setter",w.set)),this.equals=w.equals||(w.compareStructural||w.struct?$.structural:$.default),this.scope=w.context,this.requiresReaction=!!w.requiresReaction,this.keepAlive=!!w.keepAlive}return _.prototype.onBecomeStale=function(){(function(w){w.lowestObserverState===ct.UP_TO_DATE&&(w.lowestObserverState=ct.POSSIBLY_STALE,w.observers.forEach(function(P){P.dependenciesState===ct.UP_TO_DATE&&(P.dependenciesState=ct.POSSIBLY_STALE,P.isTracing!==fe.NONE&&$r(P,w),P.onBecomeStale())}))})(this)},_.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(w){return w()})},_.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(w){return w()})},_.prototype.get=function(){this.isComputing&&M("Cycle detected in computation "+this.name+": "+this.derivation),lt.inBatch!==0||this.observers.size!==0||this.keepAlive?(na(this),dn(this)&&this.trackAndCompute()&&function(P){P.lowestObserverState!==ct.STALE&&(P.lowestObserverState=ct.STALE,P.observers.forEach(function(L){L.dependenciesState===ct.POSSIBLY_STALE?L.dependenciesState=ct.STALE:L.dependenciesState===ct.UP_TO_DATE&&(P.lowestObserverState=ct.UP_TO_DATE)}))}(this)):dn(this)&&(this.warnAboutUntrackedRead(),vr(),this.value=this.computeValue(!1),Pr());var w=this.value;if(qt(w))throw w.cause;return w},_.prototype.peek=function(){var w=this.computeValue(!1);if(qt(w))throw w.cause;return w},_.prototype.set=function(w){if(this.setter){A(!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,w)}finally{this.isRunningSetter=!1}}else A(!1,!1)},_.prototype.trackAndCompute=function(){var w=this.value,P=this.dependenciesState===ct.NOT_TRACKING,L=this.computeValue(!0),K=P||qt(w)||qt(L)||!this.equals(w,L);return K&&(this.value=L),K},_.prototype.computeValue=function(w){var P;if(this.isComputing=!0,lt.computationDepth++,w)P=Nn(this,this.derivation,this.scope);else if(lt.disableErrorBoundaries===!0)P=this.derivation.call(this.scope);else try{P=this.derivation.call(this.scope)}catch(L){P=new Lt(L)}return lt.computationDepth--,this.isComputing=!1,P},_.prototype.suspend=function(){this.keepAlive||(Q(this),this.value=void 0)},_.prototype.observe=function(w,P){var L=this,K=!0,pe=void 0;return Qa(function(){var Ee=L.get();if(!K||P){var Fe=oe();w({type:"update",object:L,newValue:Ee,oldValue:pe}),be(Fe)}K=!1,pe=Ee})},_.prototype.warnAboutUntrackedRead=function(){},_.prototype.toJSON=function(){return this.get()},_.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},_.prototype.valueOf=function(){return J(this.get())},_.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},_}(),wo=W("ComputedValue",io),ui=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},Oc={};function Ya(){return typeof window!="undefined"?window:d!==void 0?d:typeof self!="undefined"?self:Oc}var Ir=!0,ki=!1,lt=function(){var _=Ya();return _.__mobxInstanceCount>0&&!_.__mobxGlobals&&(Ir=!1),_.__mobxGlobals&&_.__mobxGlobals.version!==new ui().version&&(Ir=!1),Ir?_.__mobxGlobals?(_.__mobxInstanceCount+=1,_.__mobxGlobals.UNCHANGED||(_.__mobxGlobals.UNCHANGED={}),_.__mobxGlobals):(_.__mobxInstanceCount=1,_.__mobxGlobals=new ui):(setTimeout(function(){ki||M("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")},1),new ui)}();function wc(_,w){_.observers.add(w),_.lowestObserverState>w.dependenciesState&&(_.lowestObserverState=w.dependenciesState)}function Wa(_,w){_.observers.delete(w),_.observers.size===0&&Va(_)}function Va(_){_.isPendingUnobservation===!1&&(_.isPendingUnobservation=!0,lt.pendingUnobservations.push(_))}function vr(){lt.inBatch++}function Pr(){if(--lt.inBatch==0){$a();for(var _=lt.pendingUnobservations,w=0;w<_.length;w++){var P=_[w];P.isPendingUnobservation=!1,P.observers.size===0&&(P.isBeingObserved&&(P.isBeingObserved=!1,P.onBecomeUnobserved()),P instanceof io&&P.suspend())}lt.pendingUnobservations=[]}}function na(_){var w=lt.trackingDerivation;return w!==null?(w.runId!==_.lastAccessedBy&&(_.lastAccessedBy=w.runId,w.newObserving[w.unboundDepsCount++]=_,_.isBeingObserved||(_.isBeingObserved=!0,_.onBecomeObserved())),!0):(_.observers.size===0&&lt.inBatch>0&&Va(_),!1)}function $r(_,w){if(_.isTracing===fe.BREAK){var P=[];Lr(An(_),P,1),new Function(`debugger;
  13. /*
  14. Tracing '`+_.name+`'
  15. You are entering this break point because derivation '`+_.name+"' is being traced and '"+w.name+`' is now forcing it to update.
  16. Just follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update
  17. The stackframe you are looking for is at least ~6-8 stack-frames up.
  18. `+(_ instanceof io?_.derivation.toString().replace(/[*]\//g,"/"):"")+`
  19. The dependencies for this derivation are:
  20. `+P.join(`
  21. `)+`
  22. */
  23. `)()}}function Lr(_,w,P){w.length>=1e3?w.push("(and many more)"):(w.push(""+new Array(P).join(" ")+_.name),_.dependencies&&_.dependencies.forEach(function(L){return Lr(L,w,P+1)}))}var qr=function(){function _(w,P,L,K){w===void 0&&(w="Reaction@"+E()),K===void 0&&(K=!1),this.name=w,this.onInvalidate=P,this.errorHandler=L,this.requiresObservable=K,this.observing=[],this.newObserving=[],this.dependenciesState=ct.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=fe.NONE}return _.prototype.onBecomeStale=function(){this.schedule()},_.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,lt.pendingReactions.push(this),$a())},_.prototype.isScheduled=function(){return this._isScheduled},_.prototype.runReaction=function(){if(!this.isDisposed){if(vr(),this._isScheduled=!1,dn(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending}catch(w){this.reportExceptionInDerivation(w)}}Pr()}},_.prototype.track=function(w){if(!this.isDisposed){vr(),this._isRunning=!0;var P=Nn(this,w,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&Q(this),qt(P)&&this.reportExceptionInDerivation(P.cause),Pr()}},_.prototype.reportExceptionInDerivation=function(w){var P=this;if(this.errorHandler)this.errorHandler(w,this);else{if(lt.disableErrorBoundaries)throw w;lt.suppressReactionErrors,lt.globalReactionErrorHandlers.forEach(function(L){return L(w,P)})}},_.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(vr(),Q(this),Pr()))},_.prototype.getDisposer=function(){var w=this.dispose.bind(this);return w[Y]=this,w},_.prototype.toString=function(){return"Reaction["+this.name+"]"},_.prototype.trace=function(w){w===void 0&&(w=!1),function(){for(var P=[],L=0;L<arguments.length;L++)P[L]=arguments[L];var K=!1;typeof P[P.length-1]=="boolean"&&(K=P.pop());var pe=en(P);if(!pe)return M(!1);pe.isTracing,fe.NONE,pe.isTracing=K?fe.BREAK:fe.LOG}(this,w)},_}(),Ka=function(_){return _()};function $a(){lt.inBatch>0||lt.isRunningReactions||Ka($u)}function $u(){lt.isRunningReactions=!0;for(var _=lt.pendingReactions,w=0;_.length>0;){++w==100&&_.splice(0);for(var P=_.splice(0),L=0,K=P.length;L<K;L++)P[L].runReaction()}lt.isRunningReactions=!1}var Ti=W("Reaction",qr);function qu(_){var w=Ka;Ka=function(P){return _(function(){return w(P)})}}function qa(_){return function(){}}function xc(){M(!1)}function Bo(_){return function(w,P,L){if(L){if(L.value)return{value:Cn(_,L.value),enumerable:!1,configurable:!0,writable:!0};var K=L.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return Cn(_,K.call(this))}}}return Zu(_).apply(this,arguments)}}function Zu(_){return function(w,P,L){Object.defineProperty(w,P,{configurable:!0,enumerable:!1,get:function(){},set:function(K){F(this,P,xo(_,K))}})}}var xo=function(_,w,P,L){return arguments.length===1&&typeof _=="function"?Cn(_.name||"<unnamed action>",_):arguments.length===2&&typeof w=="function"?Cn(_,w):arguments.length===1&&typeof _=="string"?Bo(_):L!==!0?Bo(w).apply(null,arguments):void F(_,w,Cn(_.name||w,P.value,this))};function Za(_,w){return zn(typeof _=="string"?_:_.name||"<unnamed action>",typeof _=="function"?_:w,this,void 0)}function ra(_){return typeof _=="function"&&_.isMobxAction===!0}function Ja(_,w,P){F(_,w,Cn(w,P.bind(_)))}function Qa(_,w){w===void 0&&(w=v);var P,L=w&&w.name||_.name||"Autorun@"+E();if(!w.scheduler&&!w.delay)P=new qr(L,function(){this.track(Ee)},w.onError,w.requiresObservable);else{var K=Ju(w),pe=!1;P=new qr(L,function(){pe||(pe=!0,K(function(){pe=!1,P.isDisposed||P.track(Ee)}))},w.onError,w.requiresObservable)}function Ee(){_(P)}return P.schedule(),P.getDisposer()}xo.bound=function(_,w,P,L){return L===!0?(Ja(_,w,P.value),null):P?{configurable:!0,enumerable:!1,get:function(){return Ja(this,w,P.value||P.initializer.call(this)),this[w]},set:xc}:{enumerable:!1,configurable:!0,set:function(K){Ja(this,w,K)},get:function(){}}};var Ec=function(_){return _()};function Ju(_){return _.scheduler?_.scheduler:_.delay?function(w){return setTimeout(w,_.delay)}:Ec}function sn(_,w,P){P===void 0&&(P=v);var L,K,pe,Ee=P.name||"Reaction@"+E(),Fe=xo(Ee,P.onError?(L=P.onError,K=w,function(){try{return K.apply(this,arguments)}catch(_n){L.call(this,_n)}}):w),st=!P.scheduler&&!P.delay,Xt=Ju(P),et=!0,hn=!1,Bt=P.compareStructural?$.structural:P.equals||$.default,tn=new qr(Ee,function(){et||st?Ur():hn||(hn=!0,Xt(Ur))},P.onError,P.requiresObservable);function Ur(){if(hn=!1,!tn.isDisposed){var _n=!1;tn.track(function(){var Or=_(tn);_n=et||!Bt(pe,Or),pe=Or}),et&&P.fireImmediately&&Fe(pe,tn),et||_n!==!0||Fe(pe,tn),et&&(et=!1)}}return tn.schedule(),tn.getDisposer()}function an(_,w,P){return Qu("onBecomeUnobserved",_,w,P)}function Qu(_,w,P,L){var K=typeof L=="function"?Fr(w,P):Fr(w),pe=typeof L=="function"?L:P,Ee=_+"Listeners";return K[Ee]?K[Ee].add(pe):K[Ee]=new Set([pe]),typeof K[_]!="function"?M(!1):function(){var Fe=K[Ee];Fe&&(Fe.delete(pe),Fe.size===0&&delete K[Ee])}}function si(_){var w=_.enforceActions,P=_.computedRequiresReaction,L=_.computedConfigurable,K=_.disableErrorBoundaries,pe=_.reactionScheduler,Ee=_.reactionRequiresObservable,Fe=_.observableRequiresReaction;if(_.isolateGlobalState===!0&&((lt.pendingReactions.length||lt.inBatch||lt.isRunningReactions)&&M("isolateGlobalState should be called before MobX is running any reactions"),ki=!0,Ir&&(--Ya().__mobxInstanceCount==0&&(Ya().__mobxGlobals=void 0),lt=new ui)),w!==void 0){var st=void 0;switch(w){case!0:case"observed":st=!0;break;case!1:case"never":st=!1;break;case"strict":case"always":st="strict";break;default:M("Invalid value for 'enforceActions': '"+w+"', expected 'never', 'always' or 'observed'")}lt.enforceActions=st,lt.allowStateChanges=st!==!0&&st!=="strict"}P!==void 0&&(lt.computedRequiresReaction=!!P),Ee!==void 0&&(lt.reactionRequiresObservable=!!Ee),Fe!==void 0&&(lt.observableRequiresReaction=!!Fe,lt.allowStateReads=!lt.observableRequiresReaction),L!==void 0&&(lt.computedConfigurable=!!L),K!==void 0&&(lt.disableErrorBoundaries=!!K),pe&&qu(pe)}function Eo(_,w,P,L){var K=eu(L=he(L));return nt(_),Ar(_,L.name,K.enhancer),w&&es(_,w,P,K),_}function eu(_){return _.defaultDecorator||(_.deep===!1?Le:Te)}function es(_,w,P,L){var K,pe;vr();try{var Ee=Z(w);try{for(var Fe=me(Ee),st=Fe.next();!st.done;st=Fe.next()){var Xt=st.value,et=Object.getOwnPropertyDescriptor(w,Xt),hn=(P&&Xt in P?P[Xt]:et.get?at:L)(_,Xt,et,!0);hn&&Object.defineProperty(_,Xt,hn)}}catch(Bt){K={error:Bt}}finally{try{st&&!st.done&&(pe=Fe.return)&&pe.call(Fe)}finally{if(K)throw K.error}}}finally{Pr()}}function An(_,w){return tu(Fr(_,w))}function tu(_){var w,P,L={name:_.name};return _.observing&&_.observing.length>0&&(L.dependencies=(w=_.observing,P=[],w.forEach(function(K){P.indexOf(K)===-1&&P.push(K)}),P).map(tu)),L}var Di=0;function nu(){this.message="FLOW_CANCELLED"}function oa(_){arguments.length!==1&&M("Flow expects 1 argument and cannot be used as decorator");var w=_.name||"<unnamed flow>";return function(){var P,L=this,K=arguments,pe=++Di,Ee=xo(w+" - runid: "+pe+" - init",_).apply(L,K),Fe=void 0,st=new Promise(function(Xt,et){var hn=0;function Bt(_n){var Or;Fe=void 0;try{Or=xo(w+" - runid: "+pe+" - yield "+hn++,Ee.next).call(Ee,_n)}catch(Mo){return et(Mo)}Ur(Or)}function tn(_n){var Or;Fe=void 0;try{Or=xo(w+" - runid: "+pe+" - yield "+hn++,Ee.throw).call(Ee,_n)}catch(Mo){return et(Mo)}Ur(Or)}function Ur(_n){if(!_n||typeof _n.then!="function")return _n.done?Xt(_n.value):(Fe=Promise.resolve(_n.value)).then(Bt,tn);_n.then(Ur,et)}P=et,Bt(void 0)});return st.cancel=xo(w+" - runid: "+pe+" - cancel",function(){try{Fe&&er(Fe);var Xt=Ee.return(void 0),et=Promise.resolve(Xt.value);et.then(k,k),er(et),P(new nu)}catch(hn){P(hn)}}),st}}function er(_){typeof _.cancel=="function"&&_.cancel()}function ru(_,w){if(_==null)return!1;if(w!==void 0){if(_r(_)===!1||!_[Y].values.has(w))return!1;var P=Fr(_,w);return wo(P)}return wo(_)}function ts(_){return arguments.length>1?M(!1):ru(_)}function ou(_,w){return typeof w!="string"?M(!1):ru(_,w)}function ia(_,w){return _!=null&&(w!==void 0?!!_r(_)&&_[Y].values.has(w):_r(_)||!!_[Y]||G(_)||Ti(_)||wo(_))}function ci(_){return arguments.length!==1&&M(!1),ia(_)}function So(_){return _r(_)?_[Y].getKeys():Rn(_)||sr(_)?Array.from(_.keys()):Br(_)?_.map(function(w,P){return P}):M(!1)}function vn(_){return _r(_)?So(_).map(function(w){return _[w]}):Rn(_)?So(_).map(function(w){return _.get(w)}):sr(_)?Array.from(_.values()):Br(_)?_.slice():M(!1)}function Sc(_){return _r(_)?So(_).map(function(w){return[w,_[w]]}):Rn(_)?So(_).map(function(w){return[w,_.get(w)]}):sr(_)?Array.from(_.entries()):Br(_)?_.map(function(w,P){return[P,w]}):M(!1)}function gr(_,w,P){if(arguments.length!==2||sr(_))if(_r(_)){var L=_[Y],K=L.values.get(w);K?L.write(w,P):L.addObservableProp(w,P,L.defaultEnhancer)}else if(Rn(_))_.set(w,P);else if(sr(_))_.add(w);else{if(!Br(_))return M(!1);typeof w!="number"&&(w=parseInt(w,10)),A(w>=0,"Not a valid index: '"+w+"'"),vr(),w>=_.length&&(_.length=w+1),_[w]=P,Pr()}else{vr();var pe=w;try{for(var Ee in pe)gr(_,Ee,pe[Ee])}finally{Pr()}}}function jc(_,w,P,L){return typeof P=="function"?function(K,pe,Ee,Fe){return lo(K,pe).observe(Ee,Fe)}(_,w,P,L):function(K,pe,Ee){return lo(K).observe(pe,Ee)}(_,w,P)}nu.prototype=Object.create(Error.prototype);var ns={detectCycles:!0,exportMapsAsObjects:!0,recurseEverything:!1};function ur(_,w,P,L){return L.detectCycles&&_.set(w,P),P}function zr(_,w,P){if(!w.recurseEverything&&!ci(_)||typeof _!="object")return _;if(_===null)return null;if(_ instanceof Date)return _;if(Oo(_))return zr(_.get(),w,P);if(ci(_)&&So(_),w.detectCycles===!0&&_!==null&&P.has(_))return P.get(_);if(Br(_)||Array.isArray(_)){var L=ur(P,_,[],w),K=_.map(function(Bt){return zr(Bt,w,P)});L.length=K.length;for(var pe=0,Ee=K.length;pe<Ee;pe++)L[pe]=K[pe];return L}if(sr(_)||Object.getPrototypeOf(_)===Set.prototype){if(w.exportMapsAsObjects===!1){var Fe=ur(P,_,new Set,w);return _.forEach(function(Bt){Fe.add(zr(Bt,w,P))}),Fe}var st=ur(P,_,[],w);return _.forEach(function(Bt){st.push(zr(Bt,w,P))}),st}if(Rn(_)||Object.getPrototypeOf(_)===Map.prototype){if(w.exportMapsAsObjects===!1){var Xt=ur(P,_,new Map,w);return _.forEach(function(Bt,tn){Xt.set(tn,zr(Bt,w,P))}),Xt}var et=ur(P,_,{},w);return _.forEach(function(Bt,tn){et[tn]=zr(Bt,w,P)}),et}var hn=ur(P,_,{},w);return ie(_).forEach(function(Bt){hn[Bt]=zr(_[Bt],w,P)}),hn}function iu(_,w){var P;return typeof w=="boolean"&&(w={detectCycles:w}),w||(w=ns),w.detectCycles=w.detectCycles===void 0?w.recurseEverything===!0:w.detectCycles===!0,w.detectCycles&&(P=new Map),zr(_,w,P)}function en(_){switch(_.length){case 0:return lt.trackingDerivation;case 1:return Fr(_[0]);case 2:return Fr(_[0],_[1])}}function Xn(_,w){w===void 0&&(w=void 0),vr();try{return _.apply(w)}finally{Pr()}}function aa(_,w,P){return arguments.length===1||w&&typeof w=="object"?au(_,w):rs(_,w,P||{})}function rs(_,w,P){var L;typeof P.timeout=="number"&&(L=setTimeout(function(){if(!pe[Y].isDisposed){pe();var Ee=new Error("WHEN_TIMEOUT");if(!P.onError)throw Ee;P.onError(Ee)}},P.timeout)),P.name=P.name||"When@"+E();var K=Cn(P.name+"-effect",w),pe=Qa(function(Ee){_()&&(Ee.dispose(),L&&clearTimeout(L),K())},P);return pe}function au(_,w){var P,L=new Promise(function(K,pe){var Ee=rs(_,K,xe(xe({},w),{onError:pe}));P=function(){Ee(),pe("WHEN_CANCELLED")}});return L.cancel=P,L}function ua(_){return _[Y]}function ao(_){return typeof _=="string"||typeof _=="number"||typeof _=="symbol"}var jo={has:function(_,w){if(w===Y||w==="constructor"||w===Se)return!0;var P=ua(_);return ao(w)?P.has(w):w in _},get:function(_,w){if(w===Y||w==="constructor"||w===Se)return _[w];var P=ua(_),L=P.values.get(w);if(L instanceof z){var K=L.get();return K===void 0&&P.has(w),K}return ao(w)&&P.has(w),_[w]},set:function(_,w,P){return!!ao(w)&&(gr(_,w,P),!0)},deleteProperty:function(_,w){return!!ao(w)&&(ua(_).remove(w),!0)},ownKeys:function(_){return ua(_).keysAtom.reportObserved(),Reflect.ownKeys(_)},preventExtensions:function(_){return M("Dynamic observable objects cannot be frozen"),!1}};function li(_){var w=new Proxy(_,jo);return _[Y].proxy=w,w}function mr(_){return _.interceptors!==void 0&&_.interceptors.length>0}function Po(_,w){var P=_.interceptors||(_.interceptors=[]);return P.push(w),T(function(){var L=P.indexOf(w);L!==-1&&P.splice(L,1)})}function Zt(_,w){var P=oe();try{for(var L=Be(_.interceptors||[]),K=0,pe=L.length;K<pe&&(A(!(w=L[K](w))||w.type,"Intercept handlers should return nothing or a change object"),w);K++);return w}finally{be(P)}}function br(_){return _.changeListeners!==void 0&&_.changeListeners.length>0}function uo(_,w){var P=_.changeListeners||(_.changeListeners=[]);return P.push(w),T(function(){var L=P.indexOf(w);L!==-1&&P.splice(L,1)})}function qn(_,w){var P=oe(),L=_.changeListeners;if(L){for(var K=0,pe=(L=L.slice()).length;K<pe;K++)L[K](w);be(P)}}var sa={get:function(_,w){return w===Y?_[Y]:w==="length"?_[Y].getArrayLength():typeof w=="number"?En.get.call(_,w):typeof w!="string"||isNaN(w)?En.hasOwnProperty(w)?En[w]:_[w]:En.get.call(_,parseInt(w))},set:function(_,w,P){return w==="length"&&_[Y].setArrayLength(P),typeof w=="number"&&En.set.call(_,w,P),typeof w=="symbol"||isNaN(w)?_[w]=P:En.set.call(_,parseInt(w),P),!0},preventExtensions:function(_){return M("Observable arrays cannot be frozen"),!1}};function Ni(_,w,P,L){P===void 0&&(P="ObservableArray@"+E()),L===void 0&&(L=!1);var K,pe,Ee,Fe=new uu(P,w,L);K=Fe.values,pe=Y,Ee=Fe,Object.defineProperty(K,pe,{enumerable:!1,writable:!1,configurable:!0,value:Ee});var st=new Proxy(Fe.values,sa);if(Fe.proxy=st,_&&_.length){var Xt=Nt(!0);Fe.spliceWithArray(0,0,_),ln(Xt)}return st}var uu=function(){function _(w,P,L){this.owned=L,this.values=[],this.proxy=void 0,this.lastKnownLength=0,this.atom=new z(w||"ObservableArray@"+E()),this.enhancer=function(K,pe){return P(K,pe,w+"[..]")}}return _.prototype.dehanceValue=function(w){return this.dehancer!==void 0?this.dehancer(w):w},_.prototype.dehanceValues=function(w){return this.dehancer!==void 0&&w.length>0?w.map(this.dehancer):w},_.prototype.intercept=function(w){return Po(this,w)},_.prototype.observe=function(w,P){return P===void 0&&(P=!1),P&&w({object:this.proxy,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),uo(this,w)},_.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},_.prototype.setArrayLength=function(w){if(typeof w!="number"||w<0)throw new Error("[mobx.array] Out of range: "+w);var P=this.values.length;if(w!==P)if(w>P){for(var L=new Array(w-P),K=0;K<w-P;K++)L[K]=void 0;this.spliceWithArray(P,0,L)}else this.spliceWithArray(w,P-w)},_.prototype.updateArrayLength=function(w,P){if(w!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed.");this.lastKnownLength+=P},_.prototype.spliceWithArray=function(w,P,L){var K=this;Dt(this.atom);var pe=this.values.length;if(w===void 0?w=0:w>pe?w=pe:w<0&&(w=Math.max(0,pe+w)),P=arguments.length===1?pe-w:P==null?0:Math.max(0,Math.min(P,pe-w)),L===void 0&&(L=O),mr(this)){var Ee=Zt(this,{object:this.proxy,type:"splice",index:w,removedCount:P,added:L});if(!Ee)return O;P=Ee.removedCount,L=Ee.added}L=L.length===0?L:L.map(function(st){return K.enhancer(st,void 0)});var Fe=this.spliceItemsIntoValues(w,P,L);return P===0&&L.length===0||this.notifyArraySplice(w,L,Fe),this.dehanceValues(Fe)},_.prototype.spliceItemsIntoValues=function(w,P,L){var K;if(L.length<1e4)return(K=this.values).splice.apply(K,Be([w,P],L));var pe=this.values.slice(w,w+P);return this.values=this.values.slice(0,w).concat(L,this.values.slice(w+P)),pe},_.prototype.notifyArrayChildUpdate=function(w,P,L){var K=!this.owned&&!1,pe=br(this),Ee=pe||K?{object:this.proxy,type:"update",index:w,newValue:P,oldValue:L}:null;this.atom.reportChanged(),pe&&qn(this,Ee)},_.prototype.notifyArraySplice=function(w,P,L){var K=!this.owned&&!1,pe=br(this),Ee=pe||K?{object:this.proxy,type:"splice",index:w,removed:L,added:P,removedCount:L.length,addedCount:P.length}:null;this.atom.reportChanged(),pe&&qn(this,Ee)},_}(),En={intercept:function(_){return this[Y].intercept(_)},observe:function(_,w){return w===void 0&&(w=!1),this[Y].observe(_,w)},clear:function(){return this.splice(0)},replace:function(_){var w=this[Y];return w.spliceWithArray(0,w.values.length,_)},toJS:function(){return this.slice()},toJSON:function(){return this.toJS()},splice:function(_,w){for(var P=[],L=2;L<arguments.length;L++)P[L-2]=arguments[L];var K=this[Y];switch(arguments.length){case 0:return[];case 1:return K.spliceWithArray(_);case 2:return K.spliceWithArray(_,w)}return K.spliceWithArray(_,w,P)},spliceWithArray:function(_,w,P){return this[Y].spliceWithArray(_,w,P)},push:function(){for(var _=[],w=0;w<arguments.length;w++)_[w]=arguments[w];var P=this[Y];return P.spliceWithArray(P.values.length,0,_),P.values.length},pop:function(){return this.splice(Math.max(this[Y].values.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var _=[],w=0;w<arguments.length;w++)_[w]=arguments[w];var P=this[Y];return P.spliceWithArray(0,0,_),P.values.length},reverse:function(){var _=this.slice();return _.reverse.apply(_,arguments)},sort:function(_){var w=this.slice();return w.sort.apply(w,arguments)},remove:function(_){var w=this[Y],P=w.dehanceValues(w.values).indexOf(_);return P>-1&&(this.splice(P,1),!0)},get:function(_){var w=this[Y];if(w&&_<w.values.length)return w.atom.reportObserved(),w.dehanceValue(w.values[_])},set:function(_,w){var P=this[Y],L=P.values;if(_<L.length){Dt(P.atom);var K=L[_];if(mr(P)){var pe=Zt(P,{type:"update",object:P.proxy,index:_,newValue:w});if(!pe)return;w=pe.newValue}(w=P.enhancer(w,K))!==K&&(L[_]=w,P.notifyArrayChildUpdate(_,w,K))}else{if(_!==L.length)throw new Error("[mobx.array] Index out of bounds, "+_+" is larger than "+L.length);P.spliceWithArray(_,0,[w])}}};["concat","flat","includes","indexOf","join","lastIndexOf","slice","toString","toLocaleString"].forEach(function(_){typeof Array.prototype[_]=="function"&&(En[_]=function(){var w=this[Y];w.atom.reportObserved();var P=w.dehanceValues(w.values);return P[_].apply(P,arguments)})}),["every","filter","find","findIndex","flatMap","forEach","map","some"].forEach(function(_){typeof Array.prototype[_]=="function"&&(En[_]=function(w,P){var L=this,K=this[Y];return K.atom.reportObserved(),K.dehanceValues(K.values)[_](function(pe,Ee){return w.call(P,pe,Ee,L)},P)})}),["reduce","reduceRight"].forEach(function(_){En[_]=function(){var w=this,P=this[Y];P.atom.reportObserved();var L=arguments[0];return arguments[0]=function(K,pe,Ee){return pe=P.dehanceValue(pe),L(K,pe,Ee,w)},P.values[_].apply(P.values,arguments)}});var ca,Ao=W("ObservableArrayAdministration",uu);function Br(_){return R(_)&&Ao(_[Y])}var su,Pc={},cu=function(){function _(w,P,L){if(P===void 0&&(P=Ze),L===void 0&&(L="ObservableMap@"+E()),this.enhancer=P,this.name=L,this[ca]=Pc,this._keysAtom=H(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(w)}return _.prototype._has=function(w){return this._data.has(w)},_.prototype.has=function(w){var P=this;if(!lt.trackingDerivation)return this._has(w);var L=this._hasMap.get(w);if(!L){var K=L=new xn(this._has(w),vt,this.name+"."+re(w)+"?",!1);this._hasMap.set(w,K),an(K,function(){return P._hasMap.delete(w)})}return L.get()},_.prototype.set=function(w,P){var L=this._has(w);if(mr(this)){var K=Zt(this,{type:L?"update":"add",object:this,newValue:P,name:w});if(!K)return this;P=K.newValue}return L?this._updateValue(w,P):this._addValue(w,P),this},_.prototype.delete=function(w){var P=this;if(Dt(this._keysAtom),mr(this)&&!(K=Zt(this,{type:"delete",object:this,name:w})))return!1;if(this._has(w)){var L=br(this),K=L?{type:"delete",object:this,oldValue:this._data.get(w).value,name:w}:null;return Xn(function(){P._keysAtom.reportChanged(),P._updateHasMapEntry(w,!1),P._data.get(w).setNewValue(void 0),P._data.delete(w)}),L&&qn(this,K),!0}return!1},_.prototype._updateHasMapEntry=function(w,P){var L=this._hasMap.get(w);L&&L.setNewValue(P)},_.prototype._updateValue=function(w,P){var L=this._data.get(w);if((P=L.prepareNewValue(P))!==lt.UNCHANGED){var K=br(this),pe=K?{type:"update",object:this,oldValue:L.value,name:w,newValue:P}:null;L.setNewValue(P),K&&qn(this,pe)}},_.prototype._addValue=function(w,P){var L=this;Dt(this._keysAtom),Xn(function(){var Ee=new xn(P,L.enhancer,L.name+"."+re(w),!1);L._data.set(w,Ee),P=Ee.value,L._updateHasMapEntry(w,!0),L._keysAtom.reportChanged()});var K=br(this),pe=K?{type:"add",object:this,name:w,newValue:P}:null;K&&qn(this,pe)},_.prototype.get=function(w){return this.has(w)?this.dehanceValue(this._data.get(w).get()):this.dehanceValue(void 0)},_.prototype.dehanceValue=function(w){return this.dehancer!==void 0?this.dehancer(w):w},_.prototype.keys=function(){return this._keysAtom.reportObserved(),this._data.keys()},_.prototype.values=function(){var w=this,P=this.keys();return Wt({next:function(){var L=P.next(),K=L.done,pe=L.value;return{done:K,value:K?void 0:w.get(pe)}}})},_.prototype.entries=function(){var w=this,P=this.keys();return Wt({next:function(){var L=P.next(),K=L.done,pe=L.value;return{done:K,value:K?void 0:[pe,w.get(pe)]}}})},_.prototype[ca=Y,Symbol.iterator]=function(){return this.entries()},_.prototype.forEach=function(w,P){var L,K;try{for(var pe=me(this),Ee=pe.next();!Ee.done;Ee=pe.next()){var Fe=Pe(Ee.value,2),st=Fe[0],Xt=Fe[1];w.call(P,Xt,st,this)}}catch(et){L={error:et}}finally{try{Ee&&!Ee.done&&(K=pe.return)&&K.call(pe)}finally{if(L)throw L.error}}},_.prototype.merge=function(w){var P=this;return Rn(w)&&(w=w.toJS()),Xn(function(){var L=Nt(!0);try{C(w)?ie(w).forEach(function(K){return P.set(K,w[K])}):Array.isArray(w)?w.forEach(function(K){var pe=Pe(K,2),Ee=pe[0],Fe=pe[1];return P.set(Ee,Fe)}):V(w)?(w.constructor!==Map&&M("Cannot initialize from classes that inherit from Map: "+w.constructor.name),w.forEach(function(K,pe){return P.set(pe,K)})):w!=null&&M("Cannot initialize map from "+w)}finally{ln(L)}}),this},_.prototype.clear=function(){var w=this;Xn(function(){de(function(){var P,L;try{for(var K=me(w.keys()),pe=K.next();!pe.done;pe=K.next()){var Ee=pe.value;w.delete(Ee)}}catch(Fe){P={error:Fe}}finally{try{pe&&!pe.done&&(L=K.return)&&L.call(K)}finally{if(P)throw P.error}}})})},_.prototype.replace=function(w){var P=this;return Xn(function(){var L,K,pe,Ee,Fe=function(cr){if(V(cr)||Rn(cr))return cr;if(Array.isArray(cr))return new Map(cr);if(C(cr)){var Ii=new Map;for(var fi in cr)Ii.set(fi,cr[fi]);return Ii}return M("Cannot convert to map from '"+cr+"'")}(w),st=new Map,Xt=!1;try{for(var et=me(P._data.keys()),hn=et.next();!hn.done;hn=et.next()){var Bt=hn.value;if(!Fe.has(Bt))if(P.delete(Bt))Xt=!0;else{var tn=P._data.get(Bt);st.set(Bt,tn)}}}catch(cr){L={error:cr}}finally{try{hn&&!hn.done&&(K=et.return)&&K.call(et)}finally{if(L)throw L.error}}try{for(var Ur=me(Fe.entries()),_n=Ur.next();!_n.done;_n=Ur.next()){var Or=Pe(_n.value,2),Mo=(Bt=Or[0],tn=Or[1],P._data.has(Bt));if(P.set(Bt,tn),P._data.has(Bt)){var ko=P._data.get(Bt);st.set(Bt,ko),Mo||(Xt=!0)}}}catch(cr){pe={error:cr}}finally{try{_n&&!_n.done&&(Ee=Ur.return)&&Ee.call(Ur)}finally{if(pe)throw pe.error}}if(!Xt)if(P._data.size!==st.size)P._keysAtom.reportChanged();else for(var Ri=P._data.keys(),fu=st.keys(),Uo=Ri.next(),fa=fu.next();!Uo.done;){if(Uo.value!==fa.value){P._keysAtom.reportChanged();break}Uo=Ri.next(),fa=fu.next()}P._data=st}),this},Object.defineProperty(_.prototype,"size",{get:function(){return this._keysAtom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),_.prototype.toPOJO=function(){var w,P,L={};try{for(var K=me(this),pe=K.next();!pe.done;pe=K.next()){var Ee=Pe(pe.value,2),Fe=Ee[0],st=Ee[1];L[typeof Fe=="symbol"?Fe:re(Fe)]=st}}catch(Xt){w={error:Xt}}finally{try{pe&&!pe.done&&(P=K.return)&&P.call(K)}finally{if(w)throw w.error}}return L},_.prototype.toJS=function(){return new Map(this)},_.prototype.toJSON=function(){return this.toPOJO()},_.prototype.toString=function(){var w=this;return this.name+"[{ "+Array.from(this.keys()).map(function(P){return re(P)+": "+w.get(P)}).join(", ")+" }]"},_.prototype.observe=function(w,P){return uo(this,w)},_.prototype.intercept=function(w){return Po(this,w)},_}(),Rn=W("ObservableMap",cu),Ci={},so=function(){function _(w,P,L){if(P===void 0&&(P=Ze),L===void 0&&(L="ObservableSet@"+E()),this.name=L,this[su]=Ci,this._data=new Set,this._atom=H(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(K,pe){return P(K,pe,L)},w&&this.replace(w)}return _.prototype.dehanceValue=function(w){return this.dehancer!==void 0?this.dehancer(w):w},_.prototype.clear=function(){var w=this;Xn(function(){de(function(){var P,L;try{for(var K=me(w._data.values()),pe=K.next();!pe.done;pe=K.next()){var Ee=pe.value;w.delete(Ee)}}catch(Fe){P={error:Fe}}finally{try{pe&&!pe.done&&(L=K.return)&&L.call(K)}finally{if(P)throw P.error}}})})},_.prototype.forEach=function(w,P){var L,K;try{for(var pe=me(this),Ee=pe.next();!Ee.done;Ee=pe.next()){var Fe=Ee.value;w.call(P,Fe,Fe,this)}}catch(st){L={error:st}}finally{try{Ee&&!Ee.done&&(K=pe.return)&&K.call(pe)}finally{if(L)throw L.error}}},Object.defineProperty(_.prototype,"size",{get:function(){return this._atom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),_.prototype.add=function(w){var P=this;if(Dt(this._atom),mr(this)&&!(K=Zt(this,{type:"add",object:this,newValue:w})))return this;if(!this.has(w)){Xn(function(){P._data.add(P.enhancer(w,void 0)),P._atom.reportChanged()});var L=br(this),K=L?{type:"add",object:this,newValue:w}:null;L&&qn(this,K)}return this},_.prototype.delete=function(w){var P=this;if(mr(this)&&!(K=Zt(this,{type:"delete",object:this,oldValue:w})))return!1;if(this.has(w)){var L=br(this),K=L?{type:"delete",object:this,oldValue:w}:null;return Xn(function(){P._atom.reportChanged(),P._data.delete(w)}),L&&qn(this,K),!0}return!1},_.prototype.has=function(w){return this._atom.reportObserved(),this._data.has(this.dehanceValue(w))},_.prototype.entries=function(){var w=0,P=Array.from(this.keys()),L=Array.from(this.values());return Wt({next:function(){var K=w;return w+=1,K<L.length?{value:[P[K],L[K]],done:!1}:{done:!0}}})},_.prototype.keys=function(){return this.values()},_.prototype.values=function(){this._atom.reportObserved();var w=this,P=0,L=Array.from(this._data.values());return Wt({next:function(){return P<L.length?{value:w.dehanceValue(L[P++]),done:!1}:{done:!0}}})},_.prototype.replace=function(w){var P=this;return sr(w)&&(w=w.toJS()),Xn(function(){var L=Nt(!0);try{Array.isArray(w)||te(w)?(P.clear(),w.forEach(function(K){return P.add(K)})):w!=null&&M("Cannot initialize set from "+w)}finally{ln(L)}}),this},_.prototype.observe=function(w,P){return uo(this,w)},_.prototype.intercept=function(w){return Po(this,w)},_.prototype.toJS=function(){return new Set(this)},_.prototype.toString=function(){return this.name+"[ "+Array.from(this).join(", ")+" ]"},_.prototype[su=Y,Symbol.iterator]=function(){return this.values()},_}(),sr=W("ObservableSet",so),lu=function(){function _(w,P,L,K){P===void 0&&(P=new Map),this.target=w,this.values=P,this.name=L,this.defaultEnhancer=K,this.keysAtom=new z(L+".keys")}return _.prototype.read=function(w){return this.values.get(w).get()},_.prototype.write=function(w,P){var L=this.target,K=this.values.get(w);if(K instanceof io)K.set(P);else{if(mr(this)){if(!(Ee=Zt(this,{type:"update",object:this.proxy||L,name:w,newValue:P})))return;P=Ee.newValue}if((P=K.prepareNewValue(P))!==lt.UNCHANGED){var pe=br(this),Ee=pe?{type:"update",object:this.proxy||L,oldValue:K.value,name:w,newValue:P}:null;K.setNewValue(P),pe&&qn(this,Ee)}}},_.prototype.has=function(w){var P=this.pendingKeys||(this.pendingKeys=new Map),L=P.get(w);if(L)return L.get();var K=!!this.values.get(w);return L=new xn(K,vt,this.name+"."+re(w)+"?",!1),P.set(w,L),L.get()},_.prototype.addObservableProp=function(w,P,L){L===void 0&&(L=this.defaultEnhancer);var K=this.target;if(mr(this)){var pe=Zt(this,{object:this.proxy||K,name:w,type:"add",newValue:P});if(!pe)return;P=pe.newValue}var Ee=new xn(P,L,this.name+"."+re(w),!1);this.values.set(w,Ee),P=Ee.value,Object.defineProperty(K,w,function(Fe){return Fo[Fe]||(Fo[Fe]={configurable:!0,enumerable:!0,get:function(){return this[Y].read(Fe)},set:function(st){this[Y].write(Fe,st)}})}(w)),this.notifyPropertyAddition(w,P)},_.prototype.addComputedProp=function(w,P,L){var K,pe,Ee,Fe=this.target;L.name=L.name||this.name+"."+re(P),this.values.set(P,new io(L)),(w===Fe||(K=w,pe=P,!(Ee=Object.getOwnPropertyDescriptor(K,pe))||Ee.configurable!==!1&&Ee.writable!==!1))&&Object.defineProperty(w,P,function(st){return la[st]||(la[st]={configurable:lt.computedConfigurable,enumerable:!1,get:function(){return co(this).read(st)},set:function(Xt){co(this).write(st,Xt)}})}(P))},_.prototype.remove=function(w){if(this.values.has(w)){var P=this.target;if(mr(this)&&!(st=Zt(this,{object:this.proxy||P,name:w,type:"remove"})))return;try{vr();var L=br(this),K=!1,pe=this.values.get(w),Ee=pe&&pe.get();if(pe&&pe.set(void 0),this.keysAtom.reportChanged(),this.values.delete(w),this.pendingKeys){var Fe=this.pendingKeys.get(w);Fe&&Fe.set(!1)}delete this.target[w];var st=L?{type:"remove",object:this.proxy||P,oldValue:Ee,name:w}:null;L&&qn(this,st)}finally{Pr()}}},_.prototype.illegalAccess=function(w,P){},_.prototype.observe=function(w,P){return uo(this,w)},_.prototype.intercept=function(w){return Po(this,w)},_.prototype.notifyPropertyAddition=function(w,P){var L=br(this),K=L?{type:"add",object:this.proxy||this.target,name:w,newValue:P}:null;if(L&&qn(this,K),this.pendingKeys){var pe=this.pendingKeys.get(w);pe&&pe.set(!0)}this.keysAtom.reportChanged()},_.prototype.getKeys=function(){var w,P;this.keysAtom.reportObserved();var L=[];try{for(var K=me(this.values),pe=K.next();!pe.done;pe=K.next()){var Ee=Pe(pe.value,2),Fe=Ee[0];Ee[1]instanceof xn&&L.push(Fe)}}catch(st){w={error:st}}finally{try{pe&&!pe.done&&(P=K.return)&&P.call(K)}finally{if(w)throw w.error}}return L},_}();function Ar(_,w,P){if(w===void 0&&(w=""),P===void 0&&(P=Ze),Object.prototype.hasOwnProperty.call(_,Y))return _[Y];C(_)||(w=(_.constructor.name||"ObservableObject")+"@"+E()),w||(w="ObservableObject@"+E());var L=new lu(_,new Map,re(w),P);return F(_,Y,L),L}var Fo=Object.create(null),la=Object.create(null);function co(_){var w=_[Y];return w||(nt(_),_[Y])}var Mr=W("ObservableObjectAdministration",lu);function _r(_){return!!R(_)&&(nt(_),Mr(_[Y]))}function Fr(_,w){if(typeof _=="object"&&_!==null){if(Br(_))return w!==void 0&&M(!1),_[Y].atom;if(sr(_))return _[Y];if(Rn(_)){var P=_;return w===void 0?P._keysAtom:((L=P._data.get(w)||P._hasMap.get(w))||M(!1),L)}var L;if(nt(_),w&&!_[Y]&&_[w],_r(_))return w?((L=_[Y].values.get(w))||M(!1),L):M(!1);if(G(_)||wo(_)||Ti(_))return _}else if(typeof _=="function"&&Ti(_[Y]))return _[Y];return M(!1)}function lo(_,w){return _||M("Expecting some object"),w!==void 0?lo(Fr(_,w)):G(_)||wo(_)||Ti(_)||Rn(_)||sr(_)?_:(nt(_),_[Y]?_[Y]:void M(!1))}var Oe=Object.prototype.toString;function Ne(_,w,P){return P===void 0&&(P=-1),Re(_,w,P)}function Re(_,w,P,L,K){if(_===w)return _!==0||1/_==1/w;if(_==null||w==null)return!1;if(_!=_)return w!=w;var pe=typeof _;if(pe!=="function"&&pe!=="object"&&typeof w!="object")return!1;var Ee=Oe.call(_);if(Ee!==Oe.call(w))return!1;switch(Ee){case"[object RegExp]":case"[object String]":return""+_==""+w;case"[object Number]":return+_!=+_?+w!=+w:+_==0?1/+_==1/w:+_==+w;case"[object Date]":case"[object Boolean]":return+_==+w;case"[object Symbol]":return typeof Symbol!="undefined"&&Symbol.valueOf.call(_)===Symbol.valueOf.call(w);case"[object Map]":case"[object Set]":P>=0&&P++}_=Qe(_),w=Qe(w);var Fe=Ee==="[object Array]";if(!Fe){if(typeof _!="object"||typeof w!="object")return!1;var st=_.constructor,Xt=w.constructor;if(st!==Xt&&!(typeof st=="function"&&st instanceof st&&typeof Xt=="function"&&Xt instanceof Xt)&&"constructor"in _&&"constructor"in w)return!1}if(P===0)return!1;P<0&&(P=-1),K=K||[];for(var et=(L=L||[]).length;et--;)if(L[et]===_)return K[et]===w;if(L.push(_),K.push(w),Fe){if((et=_.length)!==w.length)return!1;for(;et--;)if(!Re(_[et],w[et],P-1,L,K))return!1}else{var hn=Object.keys(_),Bt=void 0;if(et=hn.length,Object.keys(w).length!==et)return!1;for(;et--;)if(!zt(w,Bt=hn[et])||!Re(_[Bt],w[Bt],P-1,L,K))return!1}return L.pop(),K.pop(),!0}function Qe(_){return Br(_)?_.slice():V(_)||Rn(_)||te(_)||sr(_)?Array.from(_.entries()):_}function zt(_,w){return Object.prototype.hasOwnProperty.call(_,w)}function Wt(_){return _[Symbol.iterator]=gn,_}function gn(){return this}if(typeof Proxy=="undefined"||typeof Symbol=="undefined")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:qa,extras:{getDebugName:function(_,w){return(w!==void 0?Fr(_,w):_r(_)||Rn(_)||sr(_)?lo(_):Fr(_)).name}},$mobx:Y})}).call(this,o(163),o(68))},function(c,f,o){var p=o(113),d=o(42),O=o(179);p||d(Object.prototype,"toString",O,{unsafe:!0})},function(c,f,o){var p=o(41),d=o(100),O=o(80),v=o(58),E=o(116),M="Array Iterator",A=v.set,T=v.getterFor(M);c.exports=E(Array,"Array",function(k,R){A(this,{type:M,target:p(k),index:0,kind:R})},function(){var k=T(this),R=k.target,C=k.kind,F=k.index++;return!R||F>=R.length?(k.target=void 0,{value:void 0,done:!0}):C=="keys"?{value:F,done:!1}:C=="values"?{value:R[F],done:!1}:{value:[F,R[F]],done:!1}},"values"),O.Arguments=O.Array,d("keys"),d("values"),d("entries")},function(c,f,o){var p=o(16),d=o(7),O=o(46),v=o(76),E=o(34),M=o(15),A=o(71),T=o(36),k=o(108),R=o(18),C=o(35),F=o(96),W=o(30),V=o(33),te=o(54),ie=o(87),re=o(32),J=o(40),Z=o(41),Y=o(86),z=o(39),G=o(69),H=o(60),$=o(77),ae=o(74),xe=o(139),me=o(112),Pe=o(50),Be=o(38),Se=o(84),ye=o(98),je=o(42),Ae=o(89),Ue=o(93),nt=o(72),Ot=o(90),We=o(28),Ze=o(140),vt=o(141),se=o(78),ue=o(58),he=o(79).forEach,Te=Ue("hidden"),Xe="Symbol",Le=We("toPrimitive"),wt=ue.set,kt=ue.getterFor(Xe),St=Object.prototype,yt=d.Symbol,Me=yt&&yt.prototype,ct=d.TypeError,fe=d.QObject,at=O("JSON","stringify"),It=Pe.f,on=Be.f,Lt=xe.f,qt=Se.f,dn=M([].push),bn=Ae("symbols"),Dt=Ae("op-symbols"),Nn=Ae("string-to-symbol-registry"),Q=Ae("symbol-to-string-registry"),de=Ae("wks"),oe=!fe||!fe.prototype||!fe.prototype.findChild,be=T&&R(function(){return H(on({},"a",{get:function(){return on(this,"a",{value:7}).a}})).a!=7})?function(ut,mt,Et){var Nt=It(St,mt);Nt&&delete St[mt],on(ut,mt,Et),Nt&&ut!==St&&on(St,mt,Nt)}:on,Ve=function(ut,mt){var Et=bn[ut]=H(Me);return wt(Et,{type:Xe,tag:ut,description:mt}),T||(Et.description=mt),Et},Ke=function(ut,mt,Et){ut===St&&Ke(Dt,mt,Et),re(ut);var Nt=Y(mt);return re(Et),C(bn,Nt)?(Et.enumerable?(C(ut,Te)&&ut[Te][Nt]&&(ut[Te][Nt]=!1),Et=H(Et,{enumerable:G(0,!1)})):(C(ut,Te)||on(ut,Te,G(1,{})),ut[Te][Nt]=!0),be(ut,Nt,Et)):on(ut,Nt,Et)},ft=function(ut,mt){re(ut);var Et=Z(mt),Nt=$(Et).concat(Cn(Et));return he(Nt,function(ln){T&&!E(Gt,Et,ln)||Ke(ut,ln,Et[ln])}),ut},Gt=function(ut){var mt=Y(ut),Et=E(qt,this,mt);return!(this===St&&C(bn,mt)&&!C(Dt,mt))&&(!(Et||!C(this,mt)||!C(bn,mt)||C(this,Te)&&this[Te][mt])||Et)},Hn=function(ut,mt){var Et=Z(ut),Nt=Y(mt);if(Et!==St||!C(bn,Nt)||C(Dt,Nt)){var ln=It(Et,Nt);return!ln||!C(bn,Nt)||C(Et,Te)&&Et[Te][Nt]||(ln.enumerable=!0),ln}},Qn=function(ut){var mt=Lt(Z(ut)),Et=[];return he(mt,function(Nt){C(bn,Nt)||C(nt,Nt)||dn(Et,Nt)}),Et},Cn=function(ut){var mt=ut===St,Et=Lt(mt?Dt:Z(ut)),Nt=[];return he(Et,function(ln){!C(bn,ln)||mt&&!C(St,ln)||dn(Nt,bn[ln])}),Nt};if(k||(yt=function(){if(te(Me,this))throw ct("Symbol is not a constructor");var ut=arguments.length&&arguments[0]!==void 0?z(arguments[0]):void 0,mt=Ot(ut),Et=function(Nt){this===St&&E(Et,Dt,Nt),C(this,Te)&&C(this[Te],mt)&&(this[Te][mt]=!1),be(this,mt,G(1,Nt))};return T&&oe&&be(St,mt,{configurable:!0,set:Et}),Ve(mt,ut)},je(Me=yt.prototype,"toString",function(){return kt(this).tag}),je(yt,"withoutSetter",function(ut){return Ve(Ot(ut),ut)}),Se.f=Gt,Be.f=Ke,Pe.f=Hn,ae.f=xe.f=Qn,me.f=Cn,Ze.f=function(ut){return Ve(We(ut),ut)},T&&(on(Me,"description",{configurable:!0,get:function(){return kt(this).description}}),A||je(St,"propertyIsEnumerable",Gt,{unsafe:!0}))),p({global:!0,wrap:!0,forced:!k,sham:!k},{Symbol:yt}),he($(de),function(ut){vt(ut)}),p({target:Xe,stat:!0,forced:!k},{for:function(ut){var mt=z(ut);if(C(Nn,mt))return Nn[mt];var Et=yt(mt);return Nn[mt]=Et,Q[Et]=mt,Et},keyFor:function(ut){if(!ie(ut))throw ct(ut+" is not a symbol");if(C(Q,ut))return Q[ut]},useSetter:function(){oe=!0},useSimple:function(){oe=!1}}),p({target:"Object",stat:!0,forced:!k,sham:!T},{create:function(ut,mt){return mt===void 0?H(ut):ft(H(ut),mt)},defineProperty:Ke,defineProperties:ft,getOwnPropertyDescriptor:Hn}),p({target:"Object",stat:!0,forced:!k},{getOwnPropertyNames:Qn,getOwnPropertySymbols:Cn}),p({target:"Object",stat:!0,forced:R(function(){me.f(1)})},{getOwnPropertySymbols:function(ut){return me.f(J(ut))}}),at&&p({target:"JSON",stat:!0,forced:!k||R(function(){var ut=yt();return at([ut])!="[null]"||at({a:ut})!="{}"||at(Object(ut))!="{}"})},{stringify:function(ut,mt,Et){var Nt=ye(arguments),ln=mt;if((V(mt)||ut!==void 0)&&!ie(ut))return F(mt)||(mt=function(xn,Oo){if(W(ln)&&(Oo=E(ln,this,xn,Oo)),!ie(Oo))return Oo}),Nt[1]=mt,v(at,null,Nt)}}),!Me[Le]){var zn=Me.valueOf;je(Me,Le,function(ut){return E(zn,this)})}se(yt,Xe),nt[Te]=!0},function(c,f,o){var p=o(7),d=o(152),O=o(153),v=o(3),E=o(57),M=o(28),A=M("iterator"),T=M("toStringTag"),k=v.values,R=function(F,W){if(F){if(F[A]!==k)try{E(F,A,k)}catch(te){F[A]=k}if(F[T]||E(F,T,W),d[W]){for(var V in v)if(F[V]!==v[V])try{E(F,V,v[V])}catch(te){F[V]=v[V]}}}};for(var C in d)R(p[C]&&p[C].prototype,C);R(O,"DOMTokenList")},function(c,f,o){var p=o(151).charAt,d=o(39),O=o(58),v=o(116),E="String Iterator",M=O.set,A=O.getterFor(E);v(String,"String",function(T){M(this,{type:E,string:d(T),index:0})},function(){var T,k=A(this),R=k.string,C=k.index;return C>=R.length?{value:void 0,done:!0}:(T=p(R,C),k.index+=T.length,{value:T,done:!1})})},function(c,f,o){(function(p){var d=function(O){return O&&O.Math==Math&&O};c.exports=d(typeof globalThis=="object"&&globalThis)||d(typeof window=="object"&&window)||d(typeof self=="object"&&self)||d(typeof p=="object"&&p)||function(){return this}()||Function("return this")()}).call(this,o(68))},function(c,f,o){var p=o(16),d=o(36),O=o(7),v=o(15),E=o(35),M=o(30),A=o(54),T=o(39),k=o(38).f,R=o(134),C=O.Symbol,F=C&&C.prototype;if(d&&M(C)&&(!("description"in F)||C().description!==void 0)){var W={},V=function(){var z=arguments.length<1||arguments[0]===void 0?void 0:T(arguments[0]),G=A(F,this)?new C(z):z===void 0?C():C(z);return z===""&&(W[G]=!0),G};R(V,C),V.prototype=F,F.constructor=V;var te=String(C("test"))=="Symbol(test)",ie=v(F.toString),re=v(F.valueOf),J=/^Symbol\((.*)\)[^)]+$/,Z=v("".replace),Y=v("".slice);k(F,"description",{configurable:!0,get:function(){var z=re(this),G=ie(z);if(E(W,z))return"";var H=te?Y(G,7,-1):Z(G,J,"$1");return H===""?void 0:H}}),p({global:!0,forced:!0},{Symbol:V})}},function(c,f,o){o(141)("iterator")},function(c,f,o){o.d(f,"a",function(){return v.a}),o.d(f,"c",function(){return v.e}),o.d(f,"h",function(){return J}),o.d(f,"i",function(){return te}),o.d(f,"j",function(){return W}),o.d(f,"b",function(){return Pe}),o.d(f,"e",function(){return je}),o.d(f,"f",function(){return Be}),o.d(f,"g",function(){return bn});var p,d,O,v=o(0),E=0,M=[],A=v.i.__b,T=v.i.__r,k=v.i.diffed,R=v.i.__c,C=v.i.unmount;function F(Q,de){v.i.__h&&v.i.__h(d,Q,E||de),E=0;var oe=d.__H||(d.__H={__:[],__h:[]});return Q>=oe.__.length&&oe.__.push({}),oe.__[Q]}function W(Q){return E=1,V(ae,Q)}function V(Q,de,oe){var be=F(p++,2);return be.t=Q,be.__c||(be.__=[oe?oe(de):ae(void 0,de),function(Ve){var Ke=be.t(be.__[0],Ve);be.__[0]!==Ke&&(be.__=[Ke,be.__[1]],be.__c.setState({}))}],be.__c=d),be.__}function te(Q,de){var oe=F(p++,3);!v.i.__s&&$(oe.__H,de)&&(oe.__=Q,oe.__H=de,d.__H.__h.push(oe))}function ie(Q,de){var oe=F(p++,4);!v.i.__s&&$(oe.__H,de)&&(oe.__=Q,oe.__H=de,d.__h.push(oe))}function re(Q,de){var oe=F(p++,7);return $(oe.__H,de)&&(oe.__=Q(),oe.__H=de,oe.__h=Q),oe.__}function J(Q,de){return E=8,re(function(){return Q},de)}function Z(){var Q;for(M.sort(function(de,oe){return de.__v.__b-oe.__v.__b});Q=M.pop();)if(Q.__P)try{Q.__H.__h.forEach(G),Q.__H.__h.forEach(H),Q.__H.__h=[]}catch(de){Q.__H.__h=[],v.i.__e(de,Q.__v)}}v.i.__b=function(Q){d=null,A&&A(Q)},v.i.__r=function(Q){T&&T(Q),p=0;var de=(d=Q.__c).__H;de&&(de.__h.forEach(G),de.__h.forEach(H),de.__h=[])},v.i.diffed=function(Q){k&&k(Q);var de=Q.__c;de&&de.__H&&de.__H.__h.length&&(M.push(de)!==1&&O===v.i.requestAnimationFrame||((O=v.i.requestAnimationFrame)||z)(Z)),d=null},v.i.__c=function(Q,de){de.some(function(oe){try{oe.__h.forEach(G),oe.__h=oe.__h.filter(function(be){return!be.__||H(be)})}catch(be){de.some(function(Ve){Ve.__h&&(Ve.__h=[])}),de=[],v.i.__e(be,oe.__v)}}),R&&R(Q,de)},v.i.unmount=function(Q){C&&C(Q);var de,oe=Q.__c;oe&&oe.__H&&(oe.__H.__.forEach(function(be){try{G(be)}catch(Ve){de=Ve}}),de&&v.i.__e(de,oe.__v))};var Y=typeof requestAnimationFrame=="function";function z(Q){var de,oe=function(){clearTimeout(be),Y&&cancelAnimationFrame(de),setTimeout(Q)},be=setTimeout(oe,100);Y&&(de=requestAnimationFrame(oe))}function G(Q){var de=d,oe=Q.__c;typeof oe=="function"&&(Q.__c=void 0,oe()),d=de}function H(Q){var de=d;Q.__c=Q.__(),d=de}function $(Q,de){return!Q||Q.length!==de.length||de.some(function(oe,be){return oe!==Q[be]})}function ae(Q,de){return typeof de=="function"?de(Q):de}function xe(Q,de){for(var oe in de)Q[oe]=de[oe];return Q}function me(Q,de){for(var oe in Q)if(oe!=="__source"&&!(oe in de))return!0;for(var be in de)if(be!=="__source"&&Q[be]!==de[be])return!0;return!1}function Pe(Q){this.props=Q}function Be(Q,de){function oe(Ve){var Ke=this.props.ref,ft=Ke==Ve.ref;return!ft&&Ke&&(Ke.call?Ke(null):Ke.current=null),de?!de(this.props,Ve)||!ft:me(this.props,Ve)}function be(Ve){return this.shouldComponentUpdate=oe,Object(v.e)(Q,Ve)}return be.displayName="Memo("+(Q.displayName||Q.name)+")",be.prototype.isReactComponent=!0,be.__f=!0,be}(Pe.prototype=new v.a).isPureReactComponent=!0,Pe.prototype.shouldComponentUpdate=function(Q,de){return me(this.props,Q)||me(this.state,de)};var Se=v.i.__b;v.i.__b=function(Q){Q.type&&Q.type.__f&&Q.ref&&(Q.props.ref=Q.ref,Q.ref=null),Se&&Se(Q)};var ye=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function je(Q){function de(oe,be){var Ve=xe({},oe);return delete Ve.ref,Q(Ve,!(be=oe.ref||be)||typeof be=="object"&&!("current"in be)?null:be)}return de.$$typeof=ye,de.render=de,de.prototype.isReactComponent=de.__f=!0,de.displayName="ForwardRef("+(Q.displayName||Q.name)+")",de}var Ae=function(Q,de){return Q==null?null:Object(v.k)(Object(v.k)(Q).map(de))},Ue={map:Ae,forEach:Ae,count:function(Q){return Q?Object(v.k)(Q).length:0},only:function(Q){var de=Object(v.k)(Q);if(de.length!==1)throw"Children.only";return de[0]},toArray:v.k},nt=v.i.__e;v.i.__e=function(Q,de,oe){if(Q.then){for(var be,Ve=de;Ve=Ve.__;)if((be=Ve.__c)&&be.__c)return de.__e==null&&(de.__e=oe.__e,de.__k=oe.__k),be.__c(Q,de)}nt(Q,de,oe)};var Ot=v.i.unmount;function We(Q,de,oe){return Q&&(Q.__c&&Q.__c.__H&&(Q.__c.__H.__.forEach(function(be){typeof be.__c=="function"&&be.__c()}),Q.__c.__H=null),(Q=xe({},Q)).__c!=null&&(Q.__c.__P===oe&&(Q.__c.__P=de),Q.__c=null),Q.__k=Q.__k&&Q.__k.map(function(be){return We(be,de,oe)})),Q}function Ze(Q,de,oe){return Q&&(Q.__v=null,Q.__k=Q.__k&&Q.__k.map(function(be){return Ze(be,de,oe)}),Q.__c&&Q.__c.__P===de&&(Q.__e&&oe.insertBefore(Q.__e,Q.__d),Q.__c.__e=!0,Q.__c.__P=oe)),Q}function vt(){this.__u=0,this.t=null,this.__b=null}function se(Q){var de=Q.__.__c;return de&&de.__e&&de.__e(Q)}function ue(){this.u=null,this.o=null}v.i.unmount=function(Q){var de=Q.__c;de&&de.__R&&de.__R(),de&&Q.__h===!0&&(Q.type=null),Ot&&Ot(Q)},(vt.prototype=new v.a).__c=function(Q,de){var oe=de.__c,be=this;be.t==null&&(be.t=[]),be.t.push(oe);var Ve=se(be.__v),Ke=!1,ft=function(){Ke||(Ke=!0,oe.__R=null,Ve?Ve(Gt):Gt())};oe.__R=ft;var Gt=function(){if(!--be.__u){if(be.state.__e){var Qn=be.state.__e;be.__v.__k[0]=Ze(Qn,Qn.__c.__P,Qn.__c.__O)}var Cn;for(be.setState({__e:be.__b=null});Cn=be.t.pop();)Cn.forceUpdate()}},Hn=de.__h===!0;be.__u++||Hn||be.setState({__e:be.__b=be.__v.__k[0]}),Q.then(ft,ft)},vt.prototype.componentWillUnmount=function(){this.t=[]},vt.prototype.render=function(Q,de){if(this.__b){if(this.__v.__k){var oe=document.createElement("div"),be=this.__v.__k[0].__c;this.__v.__k[0]=We(this.__b,oe,be.__O=be.__P)}this.__b=null}var Ve=de.__e&&Object(v.e)(v.b,null,Q.fallback);return Ve&&(Ve.__h=null),[Object(v.e)(v.b,null,de.__e?null:Q.children),Ve]};var he=function(Q,de,oe){if(++oe[1]===oe[0]&&Q.o.delete(de),Q.props.revealOrder&&(Q.props.revealOrder[0]!=="t"||!Q.o.size))for(oe=Q.u;oe;){for(;oe.length>3;)oe.pop()();if(oe[1]<oe[0])break;Q.u=oe=oe[2]}};function Te(Q){return this.getChildContext=function(){return Q.context},Q.children}function Xe(Q){var de=this,oe=Q.i;de.componentWillUnmount=function(){Object(v.j)(null,de.l),de.l=null,de.i=null},de.i&&de.i!==oe&&de.componentWillUnmount(),Q.__v?(de.l||(de.i=oe,de.l={nodeType:1,parentNode:oe,childNodes:[],appendChild:function(be){this.childNodes.push(be),de.i.appendChild(be)},insertBefore:function(be,Ve){this.childNodes.push(be),de.i.appendChild(be)},removeChild:function(be){this.childNodes.splice(this.childNodes.indexOf(be)>>>1,1),de.i.removeChild(be)}}),Object(v.j)(Object(v.e)(Te,{context:de.context},Q.__v),de.l)):de.l&&de.componentWillUnmount()}(ue.prototype=new v.a).__e=function(Q){var de=this,oe=se(de.__v),be=de.o.get(Q);return be[0]++,function(Ve){var Ke=function(){de.props.revealOrder?(be.push(Ve),he(de,Q,be)):Ve()};oe?oe(Ke):Ke()}},ue.prototype.render=function(Q){this.u=null,this.o=new Map;var de=Object(v.k)(Q.children);Q.revealOrder&&Q.revealOrder[0]==="b"&&de.reverse();for(var oe=de.length;oe--;)this.o.set(de[oe],this.u=[1,0,this.u]);return Q.children},ue.prototype.componentDidUpdate=ue.prototype.componentDidMount=function(){var Q=this;this.o.forEach(function(de,oe){he(Q,oe,de)})};var Le=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.element")||60103,wt=/^(?: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]/,kt=typeof document!="undefined",St=function(Q){return(typeof Symbol!="undefined"&&typeof Symbol()=="symbol"?/fil|che|rad/i:/fil|che|ra/i).test(Q)};v.a.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(Q){Object.defineProperty(v.a.prototype,Q,{configurable:!0,get:function(){return this["UNSAFE_"+Q]},set:function(de){Object.defineProperty(this,Q,{configurable:!0,writable:!0,value:de})}})});var yt=v.i.event;function Me(){}function ct(){return this.cancelBubble}function fe(){return this.defaultPrevented}v.i.event=function(Q){return yt&&(Q=yt(Q)),Q.persist=Me,Q.isPropagationStopped=ct,Q.isDefaultPrevented=fe,Q.nativeEvent=Q};var at,It={configurable:!0,get:function(){return this.class}},on=v.i.vnode;v.i.vnode=function(Q){var de=Q.type,oe=Q.props,be=oe;if(typeof de=="string"){var Ve=de.indexOf("-")===-1;for(var Ke in be={},oe){var ft=oe[Ke];kt&&Ke==="children"&&de==="noscript"||Ke==="value"&&"defaultValue"in oe&&ft==null||(Ke==="defaultValue"&&"value"in oe&&oe.value==null?Ke="value":Ke==="download"&&ft===!0?ft="":/ondoubleclick/i.test(Ke)?Ke="ondblclick":/^onchange(textarea|input)/i.test(Ke+de)&&!St(oe.type)?Ke="oninput":/^onfocus$/i.test(Ke)?Ke="onfocusin":/^onblur$/i.test(Ke)?Ke="onfocusout":/^on(Ani|Tra|Tou|BeforeInp)/.test(Ke)?Ke=Ke.toLowerCase():Ve&&wt.test(Ke)?Ke=Ke.replace(/[A-Z0-9]/,"-$&").toLowerCase():ft===null&&(ft=void 0),be[Ke]=ft)}de=="select"&&be.multiple&&Array.isArray(be.value)&&(be.value=Object(v.k)(oe.children).forEach(function(Gt){Gt.props.selected=be.value.indexOf(Gt.props.value)!=-1})),de=="select"&&be.defaultValue!=null&&(be.value=Object(v.k)(oe.children).forEach(function(Gt){Gt.props.selected=be.multiple?be.defaultValue.indexOf(Gt.props.value)!=-1:be.defaultValue==Gt.props.value})),Q.props=be,oe.class!=oe.className&&(It.enumerable="className"in oe,oe.className!=null&&(be.class=oe.className),Object.defineProperty(be,"className",It))}Q.$$typeof=Le,on&&on(Q)};var Lt=v.i.__r;v.i.__r=function(Q){Lt&&Lt(Q),at=Q.__c};var qt={ReactCurrentDispatcher:{current:{readContext:function(Q){return at.__n[Q.__c].props.value}}}};function dn(Q){return!!Q&&Q.$$typeof===Le}var bn=function(Q,de){return Q(de)},Dt=v.b,Nn={useState:W,useReducer:V,useEffect:te,useLayoutEffect:ie,useRef:function(Q){return E=5,re(function(){return{current:Q}},[])},useImperativeHandle:function(Q,de,oe){E=6,ie(function(){typeof Q=="function"?Q(de()):Q&&(Q.current=de())},oe==null?oe:oe.concat(Q))},useMemo:re,useCallback:J,useContext:function(Q){var de=d.context[Q.__c],oe=F(p++,9);return oe.c=Q,de?(oe.__==null&&(oe.__=!0,de.sub(d)),de.props.value):Q.__},useDebugValue:function(Q,de){v.i.useDebugValue&&v.i.useDebugValue(de?de(Q):Q)},version:"17.0.2",Children:Ue,render:function(Q,de,oe){return de.__k==null&&(de.textContent=""),Object(v.j)(Q,de),typeof oe=="function"&&oe(),Q?Q.__c:null},hydrate:function(Q,de,oe){return Object(v.h)(Q,de),typeof oe=="function"&&oe(),Q?Q.__c:null},unmountComponentAtNode:function(Q){return!!Q.__k&&(Object(v.j)(null,Q),!0)},createPortal:function(Q,de){return Object(v.e)(Xe,{__v:Q,i:de})},createElement:v.e,createContext:v.d,createFactory:function(Q){return v.e.bind(null,Q)},cloneElement:function(Q){return dn(Q)?v.c.apply(null,arguments):Q},createRef:v.f,Fragment:v.b,isValidElement:dn,findDOMNode:function(Q){return Q&&(Q.base||Q.nodeType===1&&Q)||null},Component:v.a,PureComponent:Pe,memo:Be,forwardRef:je,flushSync:function(Q,de){return Q(de)},unstable_batchedUpdates:bn,StrictMode:Dt,Suspense:vt,SuspenseList:ue,lazy:function(Q){var de,oe,be;function Ve(Ke){if(de||(de=Q()).then(function(ft){oe=ft.default||ft},function(ft){be=ft}),be)throw be;if(!oe)throw de;return Object(v.e)(oe,Ke)}return Ve.displayName="Lazy",Ve.__f=!0,Ve},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:qt};f.d=Nn},function(c,f,o){var p=o(7),d=o(152),O=o(153),v=o(187),E=o(57),M=function(T){if(T&&T.forEach!==v)try{E(T,"forEach",v)}catch(k){T.forEach=v}};for(var A in d)d[A]&&M(p[A]&&p[A].prototype);M(O)},function(c,f,o){o(16)({target:"Object",stat:!0},{setPrototypeOf:o(102)})},function(c,f,o){var p=o(16),d=o(18),O=o(40),v=o(101),E=o(143);p({target:"Object",stat:!0,forced:d(function(){v(1)}),sham:!E},{getPrototypeOf:function(M){return v(O(M))}})},function(c,f,o){var p=o(16),d=o(46),O=o(76),v=o(203),E=o(165),M=o(32),A=o(33),T=o(60),k=o(18),R=d("Reflect","construct"),C=Object.prototype,F=[].push,W=k(function(){function ie(){}return!(R(function(){},[],ie)instanceof ie)}),V=!k(function(){R(function(){})}),te=W||V;p({target:"Reflect",stat:!0,forced:te,sham:te},{construct:function(ie,re){E(ie),M(re);var J=arguments.length<3?ie:E(arguments[2]);if(V&&!W)return R(ie,re,J);if(ie==J){switch(re.length){case 0:return new ie;case 1:return new ie(re[0]);case 2:return new ie(re[0],re[1]);case 3:return new ie(re[0],re[1],re[2]);case 4:return new ie(re[0],re[1],re[2],re[3])}var Z=[null];return O(F,Z,re),new(O(v,ie,Z))}var Y=J.prototype,z=T(A(Y)?Y:C),G=O(ie,z,re);return A(G)?G:z}})},function(c,f){var o=Function.prototype,p=o.bind,d=o.call,O=p&&p.bind(d);c.exports=p?function(v){return v&&O(d,v)}:function(v){return v&&function(){return d.apply(v,arguments)}}},function(c,f,o){var p=o(7),d=o(50).f,O=o(57),v=o(42),E=o(110),M=o(134),A=o(95);c.exports=function(T,k){var R,C,F,W,V,te=T.target,ie=T.global,re=T.stat;if(R=ie?p:re?p[te]||E(te,{}):(p[te]||{}).prototype)for(C in k){if(W=k[C],F=T.noTargetGet?(V=d(R,C))&&V.value:R[C],!A(ie?C:te+(re?".":"#")+C,T.forced)&&F!==void 0){if(typeof W==typeof F)continue;M(W,F)}(T.sham||F&&F.sham)&&O(W,"sham",!0),v(R,C,W,T)}}},function(c,f,o){var p=o(16),d=o(7),O=o(96),v=o(99),E=o(33),M=o(75),A=o(45),T=o(41),k=o(63),R=o(28),C=o(81),F=o(98),W=C("slice"),V=R("species"),te=d.Array,ie=Math.max;p({target:"Array",proto:!0,forced:!W},{slice:function(re,J){var Z,Y,z,G=T(this),H=A(G),$=M(re,H),ae=M(J===void 0?H:J,H);if(O(G)&&(Z=G.constructor,(v(Z)&&(Z===te||O(Z.prototype))||E(Z)&&(Z=Z[V])===null)&&(Z=void 0),Z===te||Z===void 0))return F(G,$,ae);for(Y=new(Z===void 0?te:Z)(ie(ae-$,0)),z=0;$<ae;$++,z++)$ in G&&k(Y,z,G[$]);return Y.length=z,Y}})},function(c,f){c.exports=function(o){try{return!!o()}catch(p){return!0}}},function(c,f,o){var p=o(16),d=o(103);p({target:"RegExp",proto:!0,forced:/./.exec!==d},{exec:d})},function(c,f,o){var p=o(16),d=o(40),O=o(77);p({target:"Object",stat:!0,forced:o(18)(function(){O(1)})},{keys:function(v){return O(d(v))}})},function(c,f,o){var p=o(36),d=o(73).EXISTS,O=o(15),v=o(38).f,E=Function.prototype,M=O(E.toString),A=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,T=O(A.exec);p&&!d&&v(E,"name",{configurable:!0,get:function(){try{return T(A,M(this))[1]}catch(k){return""}}})},function(c,f,o){var p=o(16),d=o(18),O=o(41),v=o(50).f,E=o(36),M=d(function(){v(1)});p({target:"Object",stat:!0,forced:!E||M,sham:!E},{getOwnPropertyDescriptor:function(A,T){return v(O(A),T)}})},function(c,f,o){var p=o(16),d=o(188);p({target:"Array",stat:!0,forced:!o(120)(function(O){Array.from(O)})},{from:d})},function(c,f,o){var p=o(16),d=o(79).filter;p({target:"Array",proto:!0,forced:!o(81)("filter")},{filter:function(O){return d(this,O,arguments.length>1?arguments[1]:void 0)}})},function(c,f,o){var p=o(16),d=o(36),O=o(135),v=o(41),E=o(50),M=o(63);p({target:"Object",stat:!0,sham:!d},{getOwnPropertyDescriptors:function(A){for(var T,k,R=v(A),C=E.f,F=O(R),W={},V=0;F.length>V;)(k=C(R,T=F[V++]))!==void 0&&M(W,T,k);return W}})},,function(c,f,o){var p=o(16),d=o(7),O=o(18),v=o(96),E=o(33),M=o(40),A=o(45),T=o(63),k=o(115),R=o(81),C=o(28),F=o(70),W=C("isConcatSpreadable"),V=9007199254740991,te="Maximum allowed index exceeded",ie=d.TypeError,re=F>=51||!O(function(){var Y=[];return Y[W]=!1,Y.concat()[0]!==Y}),J=R("concat"),Z=function(Y){if(!E(Y))return!1;var z=Y[W];return z!==void 0?!!z:v(Y)};p({target:"Array",proto:!0,forced:!re||!J},{concat:function(Y){var z,G,H,$,ae,xe=M(this),me=k(xe,0),Pe=0;for(z=-1,H=arguments.length;z<H;z++)if(Z(ae=z===-1?xe:arguments[z])){if(Pe+($=A(ae))>V)throw ie(te);for(G=0;G<$;G++,Pe++)G in ae&&T(me,Pe,ae[G])}else{if(Pe>=V)throw ie(te);T(me,Pe++,ae)}return me.length=Pe,me}})},function(c,f,o){var p=o(7),d=o(89),O=o(35),v=o(90),E=o(108),M=o(132),A=d("wks"),T=p.Symbol,k=T&&T.for,R=M?T:T&&T.withoutSetter||v;c.exports=function(C){if(!O(A,C)||!E&&typeof A[C]!="string"){var F="Symbol."+C;E&&O(T,C)?A[C]=T[C]:A[C]=M&&k?k(F):R(F)}return A[C]}},function(c,f,o){var p=o(16),d=o(202);p({target:"Object",stat:!0,forced:Object.assign!==d},{assign:d})},function(c,f){c.exports=function(o){return typeof o=="function"}},function(c,f,o){var p=o(106),d=typeof self=="object"&&self&&self.Object===Object&&self,O=p.a||d||Function("return this")();f.a=O},function(c,f,o){var p=o(7),d=o(33),O=p.String,v=p.TypeError;c.exports=function(E){if(d(E))return E;throw v(O(E)+" is not an object")}},function(c,f,o){var p=o(30);c.exports=function(d){return typeof d=="object"?d!==null:p(d)}},function(c,f){var o=Function.prototype.call;c.exports=o.bind?o.bind(o):function(){return o.apply(o,arguments)}},function(c,f,o){var p=o(15),d=o(40),O=p({}.hasOwnProperty);c.exports=Object.hasOwn||function(v,E){return O(d(v),E)}},function(c,f,o){var p=o(18);c.exports=!p(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},function(c,f,o){var p=o(16),d=o(79).map;p({target:"Array",proto:!0,forced:!o(81)("map")},{map:function(O){return d(this,O,arguments.length>1?arguments[1]:void 0)}})},function(c,f,o){var p=o(7),d=o(36),O=o(133),v=o(32),E=o(86),M=p.TypeError,A=Object.defineProperty;f.f=d?A:function(T,k,R){if(v(T),k=E(k),v(R),O)try{return A(T,k,R)}catch(C){}if("get"in R||"set"in R)throw M("Accessors not supported");return"value"in R&&(T[k]=R.value),T}},function(c,f,o){var p=o(7),d=o(97),O=p.String;c.exports=function(v){if(d(v)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return O(v)}},function(c,f,o){var p=o(7),d=o(44),O=p.Object;c.exports=function(v){return O(d(v))}},function(c,f,o){var p=o(85),d=o(44);c.exports=function(O){return p(d(O))}},function(c,f,o){var p=o(7),d=o(30),O=o(35),v=o(57),E=o(110),M=o(92),A=o(58),T=o(73).CONFIGURABLE,k=A.get,R=A.enforce,C=String(String).split("String");(c.exports=function(F,W,V,te){var ie,re=!!te&&!!te.unsafe,J=!!te&&!!te.enumerable,Z=!!te&&!!te.noTargetGet,Y=te&&te.name!==void 0?te.name:W;d(V)&&(String(Y).slice(0,7)==="Symbol("&&(Y="["+String(Y).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!O(V,"name")||T&&V.name!==Y)&&v(V,"name",Y),(ie=R(V)).source||(ie.source=C.join(typeof Y=="string"?Y:""))),F!==p?(re?!Z&&F[W]&&(J=!0):delete F[W],J?F[W]=V:v(F,W,V)):J?F[W]=V:E(W,V)})(Function.prototype,"toString",function(){return d(this)&&k(this).source||M(this)})},function(c,f,o){(function(p){o.d(f,"d",function(){return v}),o.d(f,"c",function(){return E}),o.d(f,"b",function(){return M}),o.d(f,"a",function(){return T});var d=o(10),O=function(k,R){var C=typeof Symbol=="function"&&k[Symbol.iterator];if(!C)return k;var F,W,V=C.call(k),te=[];try{for(;(R===void 0||R-- >0)&&!(F=V.next()).done;)te.push(F.value)}catch(ie){W={error:ie}}finally{try{F&&!F.done&&(C=V.return)&&C.call(V)}finally{if(W)throw W.error}}return te};function v(){var k=O(Object(d.j)(0),2)[1];return Object(d.h)(function(){k(function(R){return R+1})},[])}function E(k){if(!k||typeof k!="object")return!1;var R=Object.getPrototypeOf(k);return!R||R===Object.prototype}function M(k){return typeof Symbol=="function"?Symbol.for(k):"__$mobx-react "+k+"__"}var A={};function T(){return typeof window!="undefined"?window:p!==void 0?p:typeof self!="undefined"?self:A}}).call(this,o(68))},function(c,f,o){var p=o(7).TypeError;c.exports=function(d){if(d==null)throw p("Can't call method on "+d);return d}},function(c,f,o){var p=o(94);c.exports=function(d){return p(d.length)}},function(c,f,o){var p=o(7),d=o(30),O=function(v){return d(v)?v:void 0};c.exports=function(v,E){return arguments.length<2?O(p[v]):p[v]&&p[v][E]}},function(c,f,o){var p=o(16),d=o(34),O=o(33),v=o(32),E=o(204),M=o(50),A=o(101);p({target:"Reflect",stat:!0},{get:function T(k,R){var C,F,W=arguments.length<3?k:arguments[2];return v(k)===W?k[R]:(C=M.f(k,R))?E(C)?C.value:C.get===void 0?void 0:d(C.get,W):O(F=A(k))?T(F,R,W):void 0}})},function(c,f,o){(function(p){var d=o(31),O=o(171),v=y&&!y.nodeType&&y,E=v&&typeof p=="object"&&p&&!p.nodeType&&p,M=E&&E.exports===v?d.a.Buffer:void 0,A=(M?M.isBuffer:void 0)||O.a;f.a=A}).call(this,o(122)(c))},function(c,f,o){(function(p){var d=o(106),O=y&&!y.nodeType&&y,v=O&&typeof p=="object"&&p&&!p.nodeType&&p,E=v&&v.exports===O&&d.a.process,M=function(){try{var A=v&&v.require&&v.require("util").types;return A||E&&E.binding&&E.binding("util")}catch(T){}}();f.a=M}).call(this,o(122)(c))},function(c,f,o){var p=o(36),d=o(34),O=o(84),v=o(69),E=o(41),M=o(86),A=o(35),T=o(133),k=Object.getOwnPropertyDescriptor;f.f=p?k:function(R,C){if(R=E(R),C=M(C),T)try{return k(R,C)}catch(F){}if(A(R,C))return v(!d(O.f,R,C),R[C])}},function(c,f,o){var p=o(15),d=p({}.toString),O=p("".slice);c.exports=function(v){return O(d(v),8,-1)}},function(c,f,o){o(182)("Map",function(p){return function(){return p(this,arguments.length?arguments[0]:void 0)}},o(186))},function(c,f,o){var p=o(16),d=o(220).entries;p({target:"Object",stat:!0},{entries:function(O){return d(O)}})},function(c,f,o){var p=o(15);c.exports=p({}.isPrototypeOf)},function(c,f,o){var p=o(46);c.exports=p("navigator","userAgent")||""},function(c,f,o){var p=o(7),d=o(30),O=o(88),v=p.TypeError;c.exports=function(E){if(d(E))return E;throw v(O(E)+" is not a function")}},function(c,f,o){var p=o(36),d=o(38),O=o(69);c.exports=p?function(v,E,M){return d.f(v,E,O(1,M))}:function(v,E,M){return v[E]=M,v}},function(c,f,o){var p,d,O,v=o(175),E=o(7),M=o(15),A=o(33),T=o(57),k=o(35),R=o(109),C=o(93),F=o(72),W="Object already initialized",V=E.TypeError,te=E.WeakMap;if(v||R.state){var ie=R.state||(R.state=new te),re=M(ie.get),J=M(ie.has),Z=M(ie.set);p=function(z,G){if(J(ie,z))throw new V(W);return G.facade=z,Z(ie,z,G),G},d=function(z){return re(ie,z)||{}},O=function(z){return J(ie,z)}}else{var Y=C("state");F[Y]=!0,p=function(z,G){if(k(z,Y))throw new V(W);return G.facade=z,T(z,Y,G),G},d=function(z){return k(z,Y)?z[Y]:{}},O=function(z){return k(z,Y)}}c.exports={set:p,get:d,has:O,enforce:function(z){return O(z)?d(z):p(z,{})},getterFor:function(z){return function(G){var H;if(!A(G)||(H=d(G)).type!==z)throw V("Incompatible receiver, "+z+" required");return H}}}},function(c,f){var o=Math.ceil,p=Math.floor;c.exports=function(d){var O=+d;return O!=O||O===0?0:(O>0?p:o)(O)}},function(c,f,o){var p,d=o(32),O=o(176),v=o(111),E=o(72),M=o(138),A=o(91),T=o(93),k=T("IE_PROTO"),R=function(){},C=function(V){return"<script>"+V+"<\/script>"},F=function(V){V.write(C("")),V.close();var te=V.parentWindow.Object;return V=null,te},W=function(){try{p=new ActiveXObject("htmlfile")}catch(re){}var V,te;W=typeof document!="undefined"?document.domain&&p?F(p):((te=A("iframe")).style.display="none",M.appendChild(te),te.src="javascript:",(V=te.contentWindow.document).open(),V.write(C("document.F=Object")),V.close(),V.F):F(p);for(var ie=v.length;ie--;)delete W.prototype[v[ie]];return W()};E[k]=!0,c.exports=Object.create||function(V,te){var ie;return V!==null?(R.prototype=d(V),ie=new R,R.prototype=null,ie[k]=V):ie=W(),te===void 0?ie:O(ie,te)}},function(c,f,o){var p=o(36),d=o(7),O=o(15),v=o(95),E=o(42),M=o(35),A=o(148),T=o(54),k=o(87),R=o(131),C=o(18),F=o(74).f,W=o(50).f,V=o(38).f,te=o(160),ie=o(161).trim,re="Number",J=d.Number,Z=J.prototype,Y=d.TypeError,z=O("".slice),G=O("".charCodeAt),H=function(Be){var Se=R(Be,"number");return typeof Se=="bigint"?Se:$(Se)},$=function(Be){var Se,ye,je,Ae,Ue,nt,Ot,We,Ze=R(Be,"number");if(k(Ze))throw Y("Cannot convert a Symbol value to a number");if(typeof Ze=="string"&&Ze.length>2){if(Ze=ie(Ze),(Se=G(Ze,0))===43||Se===45){if((ye=G(Ze,2))===88||ye===120)return NaN}else if(Se===48){switch(G(Ze,1)){case 66:case 98:je=2,Ae=49;break;case 79:case 111:je=8,Ae=55;break;default:return+Ze}for(nt=(Ue=z(Ze,2)).length,Ot=0;Ot<nt;Ot++)if((We=G(Ue,Ot))<48||We>Ae)return NaN;return parseInt(Ue,je)}}return+Ze};if(v(re,!J(" 0o1")||!J("0b1")||J("+0x1"))){for(var ae,xe=function(Be){var Se=arguments.length<1?0:J(H(Be)),ye=this;return T(Z,ye)&&C(function(){te(ye)})?A(Object(Se),ye,xe):Se},me=p?F(J):"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(","),Pe=0;me.length>Pe;Pe++)M(J,ae=me[Pe])&&!M(xe,ae)&&V(xe,ae,W(J,ae));xe.prototype=Z,Z.constructor=xe,E(d,re,xe)}},function(c,f,o){var p=o(56);c.exports=function(d,O){var v=d[O];return v==null?void 0:p(v)}},function(c,f,o){var p=o(86),d=o(38),O=o(69);c.exports=function(v,E,M){var A=p(E);A in v?d.f(v,A,O(0,M)):v[A]=M}},function(c,f,o){var p=o(15),d=o(56),O=p(p.bind);c.exports=function(v,E){return d(v),E===void 0?v:O?O(v,E):function(){return v.apply(E,arguments)}}},function(c,f,o){var p=o(16),d=o(15),O=o(85),v=o(41),E=o(121),M=d([].join),A=O!=Object,T=E("join",",");p({target:"Array",proto:!0,forced:A||!T},{join:function(k){return M(v(this),k===void 0?",":k)}})},function(c,f,o){var p=o(15),d=o(73).PROPER,O=o(42),v=o(32),E=o(54),M=o(39),A=o(18),T=o(154),k="toString",R=RegExp.prototype,C=R.toString,F=p(T),W=A(function(){return C.call({source:"a",flags:"b"})!="/a/b"}),V=d&&C.name!=k;(W||V)&&O(RegExp.prototype,k,function(){var te=v(this),ie=M(te.source),re=te.flags;return"/"+ie+"/"+M(re===void 0&&E(R,te)&&!("flags"in R)?F(te):re)},{unsafe:!0})},function(c,f,o){var p=o(16),d=o(217),O=o(100);p({target:"Array",proto:!0},{fill:d}),O("fill")},function(c,f){var o;o=function(){return this}();try{o=o||new Function("return this")()}catch(p){typeof window=="object"&&(o=window)}c.exports=o},function(c,f){c.exports=function(o,p){return{enumerable:!(1&o),configurable:!(2&o),writable:!(4&o),value:p}}},function(c,f,o){var p,d,O=o(7),v=o(55),E=O.process,M=O.Deno,A=E&&E.versions||M&&M.version,T=A&&A.v8;T&&(d=(p=T.split("."))[0]>0&&p[0]<4?1:+(p[0]+p[1])),!d&&v&&(!(p=v.match(/Edge\/(\d+)/))||p[1]>=74)&&(p=v.match(/Chrome\/(\d+)/))&&(d=+p[1]),c.exports=d},function(c,f){c.exports=!1},function(c,f){c.exports={}},function(c,f,o){var p=o(36),d=o(35),O=Function.prototype,v=p&&Object.getOwnPropertyDescriptor,E=d(O,"name"),M=E&&function(){}.name==="something",A=E&&(!p||p&&v(O,"name").configurable);c.exports={EXISTS:E,PROPER:M,CONFIGURABLE:A}},function(c,f,o){var p=o(136),d=o(111).concat("length","prototype");f.f=Object.getOwnPropertyNames||function(O){return p(O,d)}},function(c,f,o){var p=o(59),d=Math.max,O=Math.min;c.exports=function(v,E){var M=p(v);return M<0?d(M+E,0):O(M,E)}},function(c,f){var o=Function.prototype,p=o.apply,d=o.bind,O=o.call;c.exports=typeof Reflect=="object"&&Reflect.apply||(d?O.bind(p):function(){return O.apply(p,arguments)})},function(c,f,o){var p=o(136),d=o(111);c.exports=Object.keys||function(O){return p(O,d)}},function(c,f,o){var p=o(38).f,d=o(35),O=o(28)("toStringTag");c.exports=function(v,E,M){v&&!d(v=M?v:v.prototype,O)&&p(v,O,{configurable:!0,value:E})}},function(c,f,o){var p=o(64),d=o(15),O=o(85),v=o(40),E=o(45),M=o(115),A=d([].push),T=function(k){var R=k==1,C=k==2,F=k==3,W=k==4,V=k==6,te=k==7,ie=k==5||V;return function(re,J,Z,Y){for(var z,G,H=v(re),$=O(H),ae=p(J,Z),xe=E($),me=0,Pe=Y||M,Be=R?Pe(re,xe):C||te?Pe(re,0):void 0;xe>me;me++)if((ie||me in $)&&(G=ae(z=$[me],me,H),k))if(R)Be[me]=G;else if(G)switch(k){case 3:return!0;case 5:return z;case 6:return me;case 2:A(Be,z)}else switch(k){case 4:return!1;case 7:A(Be,z)}return V?-1:F||W?W:Be}};c.exports={forEach:T(0),map:T(1),filter:T(2),some:T(3),every:T(4),find:T(5),findIndex:T(6),filterReject:T(7)}},function(c,f){c.exports={}},function(c,f,o){var p=o(18),d=o(28),O=o(70),v=d("species");c.exports=function(E){return O>=51||!p(function(){var M=[];return(M.constructor={})[v]=function(){return{foo:1}},M[E](Boolean).foo!==1})}},function(c,f,o){var p=o(76),d=o(34),O=o(15),v=o(123),E=o(159),M=o(32),A=o(44),T=o(164),k=o(124),R=o(94),C=o(39),F=o(62),W=o(114),V=o(125),te=o(103),ie=o(155),re=o(18),J=ie.UNSUPPORTED_Y,Z=4294967295,Y=Math.min,z=[].push,G=O(/./.exec),H=O(z),$=O("".slice),ae=!re(function(){var xe=/(?:)/,me=xe.exec;xe.exec=function(){return me.apply(this,arguments)};var Pe="ab".split(xe);return Pe.length!==2||Pe[0]!=="a"||Pe[1]!=="b"});v("split",function(xe,me,Pe){var Be;return Be="abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?function(Se,ye){var je=C(A(this)),Ae=ye===void 0?Z:ye>>>0;if(Ae===0)return[];if(Se===void 0)return[je];if(!E(Se))return d(me,je,Se,Ae);for(var Ue,nt,Ot,We=[],Ze=(Se.ignoreCase?"i":"")+(Se.multiline?"m":"")+(Se.unicode?"u":"")+(Se.sticky?"y":""),vt=0,se=new RegExp(Se.source,Ze+"g");(Ue=d(te,se,je))&&!((nt=se.lastIndex)>vt&&(H(We,$(je,vt,Ue.index)),Ue.length>1&&Ue.index<je.length&&p(z,We,W(Ue,1)),Ot=Ue[0].length,vt=nt,We.length>=Ae));)se.lastIndex===Ue.index&&se.lastIndex++;return vt===je.length?!Ot&&G(se,"")||H(We,""):H(We,$(je,vt)),We.length>Ae?W(We,0,Ae):We}:"0".split(void 0,0).length?function(Se,ye){return Se===void 0&&ye===0?[]:d(me,this,Se,ye)}:me,[function(Se,ye){var je=A(this),Ae=Se==null?void 0:F(Se,xe);return Ae?d(Ae,Se,je,ye):d(Be,C(je),Se,ye)},function(Se,ye){var je=M(this),Ae=C(Se),Ue=Pe(Be,je,Ae,ye,Be!==me);if(Ue.done)return Ue.value;var nt=T(je,RegExp),Ot=je.unicode,We=(je.ignoreCase?"i":"")+(je.multiline?"m":"")+(je.unicode?"u":"")+(J?"g":"y"),Ze=new nt(J?"^(?:"+je.source+")":je,We),vt=ye===void 0?Z:ye>>>0;if(vt===0)return[];if(Ae.length===0)return V(Ze,Ae)===null?[Ae]:[];for(var se=0,ue=0,he=[];ue<Ae.length;){Ze.lastIndex=J?0:ue;var Te,Xe=V(Ze,J?$(Ae,ue):Ae);if(Xe===null||(Te=Y(R(Ze.lastIndex+(J?ue:0)),Ae.length))===se)ue=k(Ae,ue,Ot);else{if(H(he,$(Ae,se,ue)),he.length===vt)return he;for(var Le=1;Le<=Xe.length-1;Le++)if(H(he,Xe[Le]),he.length===vt)return he;ue=se=Te}}return H(he,$(Ae,se)),he}]},!ae,J)},function(c,f,o){o(16)({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991})},function(c,f,o){var p={}.propertyIsEnumerable,d=Object.getOwnPropertyDescriptor,O=d&&!p.call({1:2},1);f.f=O?function(v){var E=d(this,v);return!!E&&E.enumerable}:p},function(c,f,o){var p=o(7),d=o(15),O=o(18),v=o(51),E=p.Object,M=d("".split);c.exports=O(function(){return!E("z").propertyIsEnumerable(0)})?function(A){return v(A)=="String"?M(A,""):E(A)}:E},function(c,f,o){var p=o(131),d=o(87);c.exports=function(O){var v=p(O,"string");return d(v)?v:v+""}},function(c,f,o){var p=o(7),d=o(46),O=o(30),v=o(54),E=o(132),M=p.Object;c.exports=E?function(A){return typeof A=="symbol"}:function(A){var T=d("Symbol");return O(T)&&v(T.prototype,M(A))}},function(c,f,o){var p=o(7).String;c.exports=function(d){try{return p(d)}catch(O){return"Object"}}},function(c,f,o){var p=o(71),d=o(109);(c.exports=function(O,v){return d[O]||(d[O]=v!==void 0?v:{})})("versions",[]).push({version:"3.19.3",mode:p?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},function(c,f,o){var p=o(15),d=0,O=Math.random(),v=p(1 .toString);c.exports=function(E){return"Symbol("+(E===void 0?"":E)+")_"+v(++d+O,36)}},function(c,f,o){var p=o(7),d=o(33),O=p.document,v=d(O)&&d(O.createElement);c.exports=function(E){return v?O.createElement(E):{}}},function(c,f,o){var p=o(15),d=o(30),O=o(109),v=p(Function.toString);d(O.inspectSource)||(O.inspectSource=function(E){return v(E)}),c.exports=O.inspectSource},function(c,f,o){var p=o(89),d=o(90),O=p("keys");c.exports=function(v){return O[v]||(O[v]=d(v))}},function(c,f,o){var p=o(59),d=Math.min;c.exports=function(O){return O>0?d(p(O),9007199254740991):0}},function(c,f,o){var p=o(18),d=o(30),O=/#|\.prototype\./,v=function(k,R){var C=M[E(k)];return C==T||C!=A&&(d(R)?p(R):!!R)},E=v.normalize=function(k){return String(k).replace(O,".").toLowerCase()},M=v.data={},A=v.NATIVE="N",T=v.POLYFILL="P";c.exports=v},function(c,f,o){var p=o(51);c.exports=Array.isArray||function(d){return p(d)=="Array"}},function(c,f,o){var p=o(7),d=o(113),O=o(30),v=o(51),E=o(28)("toStringTag"),M=p.Object,A=v(function(){return arguments}())=="Arguments";c.exports=d?v:function(T){var k,R,C;return T===void 0?"Undefined":T===null?"Null":typeof(R=function(F,W){try{return F[W]}catch(V){}}(k=M(T),E))=="string"?R:A?v(k):(C=v(k))=="Object"&&O(k.callee)?"Arguments":C}},function(c,f,o){var p=o(15);c.exports=p([].slice)},function(c,f,o){var p=o(15),d=o(18),O=o(30),v=o(97),E=o(46),M=o(92),A=function(){},T=[],k=E("Reflect","construct"),R=/^\s*(?:class|function)\b/,C=p(R.exec),F=!R.exec(A),W=function(V){if(!O(V))return!1;try{return k(A,T,V),!0}catch(te){return!1}};c.exports=!k||d(function(){var V;return W(W.call)||!W(Object)||!W(function(){V=!0})||V})?function(V){if(!O(V))return!1;switch(v(V)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return F||!!C(R,M(V))}:W},function(c,f,o){var p=o(28),d=o(60),O=o(38),v=p("unscopables"),E=Array.prototype;E[v]==null&&O.f(E,v,{configurable:!0,value:d(null)}),c.exports=function(M){E[v][M]=!0}},function(c,f,o){var p=o(7),d=o(35),O=o(30),v=o(40),E=o(93),M=o(143),A=E("IE_PROTO"),T=p.Object,k=T.prototype;c.exports=M?T.getPrototypeOf:function(R){var C=v(R);if(d(C,A))return C[A];var F=C.constructor;return O(F)&&C instanceof F?F.prototype:C instanceof T?k:null}},function(c,f,o){var p=o(15),d=o(32),O=o(181);c.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var v,E=!1,M={};try{(v=p(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(M,[]),E=M instanceof Array}catch(A){}return function(A,T){return d(A),O(T),E?v(A,T):A.__proto__=T,A}}():void 0)},function(c,f,o){var p,d,O=o(34),v=o(15),E=o(39),M=o(154),A=o(155),T=o(89),k=o(60),R=o(58).get,C=o(190),F=o(191),W=T("native-string-replace",String.prototype.replace),V=RegExp.prototype.exec,te=V,ie=v("".charAt),re=v("".indexOf),J=v("".replace),Z=v("".slice),Y=(d=/b*/g,O(V,p=/a/,"a"),O(V,d,"a"),p.lastIndex!==0||d.lastIndex!==0),z=A.BROKEN_CARET,G=/()??/.exec("")[1]!==void 0;(Y||G||z||C||F)&&(te=function(H){var $,ae,xe,me,Pe,Be,Se,ye=this,je=R(ye),Ae=E(H),Ue=je.raw;if(Ue)return Ue.lastIndex=ye.lastIndex,$=O(te,Ue,Ae),ye.lastIndex=Ue.lastIndex,$;var nt=je.groups,Ot=z&&ye.sticky,We=O(M,ye),Ze=ye.source,vt=0,se=Ae;if(Ot&&(We=J(We,"y",""),re(We,"g")===-1&&(We+="g"),se=Z(Ae,ye.lastIndex),ye.lastIndex>0&&(!ye.multiline||ye.multiline&&ie(Ae,ye.lastIndex-1)!==`
  24. `)&&(Ze="(?: "+Ze+")",se=" "+se,vt++),ae=new RegExp("^(?:"+Ze+")",We)),G&&(ae=new RegExp("^"+Ze+"$(?!\\s)",We)),Y&&(xe=ye.lastIndex),me=O(V,Ot?ae:ye,se),Ot?me?(me.input=Z(me.input,vt),me[0]=Z(me[0],vt),me.index=ye.lastIndex,ye.lastIndex+=me[0].length):ye.lastIndex=0:Y&&me&&(ye.lastIndex=ye.global?me.index+me[0].length:xe),G&&me&&me.length>1&&O(W,me[0],ae,function(){for(Pe=1;Pe<arguments.length-2;Pe++)arguments[Pe]===void 0&&(me[Pe]=void 0)}),me&&nt)for(me.groups=Be=k(null),Pe=0;Pe<nt.length;Pe++)Be[(Se=nt[Pe])[0]]=me[Se[1]];return me}),c.exports=te},function(c,f,o){var p=o(16),d=o(7),O=o(75),v=o(59),E=o(45),M=o(40),A=o(115),T=o(63),k=o(81)("splice"),R=d.TypeError,C=Math.max,F=Math.min,W=9007199254740991,V="Maximum allowed length exceeded";p({target:"Array",proto:!0,forced:!k},{splice:function(te,ie){var re,J,Z,Y,z,G,H=M(this),$=E(H),ae=O(te,$),xe=arguments.length;if(xe===0?re=J=0:xe===1?(re=0,J=$-ae):(re=xe-2,J=F(C(v(ie),0),$-ae)),$+re-J>W)throw R(V);for(Z=A(H,J),Y=0;Y<J;Y++)(z=ae+Y)in H&&T(Z,Y,H[z]);if(Z.length=J,re<J){for(Y=ae;Y<$-J;Y++)G=Y+re,(z=Y+J)in H?H[G]=H[z]:delete H[G];for(Y=$;Y>$-J+re;Y--)delete H[Y-1]}else if(re>J)for(Y=$-J;Y>ae;Y--)G=Y+re-1,(z=Y+J-1)in H?H[G]=H[z]:delete H[G];for(Y=0;Y<re;Y++)H[Y+ae]=arguments[Y+2];return H.length=$-J+re,Z}})},function(c,f,o){var p=o(16),d=o(205);p({target:"String",proto:!0,forced:o(206)("anchor")},{anchor:function(O){return d(this,"a","name",O)}})},function(c,f,o){(function(p){var d=typeof p=="object"&&p&&p.Object===Object&&p;f.a=d}).call(this,o(68))},function(c,f,o){(function(p){var d=o(31),O=y&&!y.nodeType&&y,v=O&&typeof p=="object"&&p&&!p.nodeType&&p,E=v&&v.exports===O?d.a.Buffer:void 0,M=E?E.allocUnsafe:void 0;f.a=function(A,T){if(T)return A.slice();var k=A.length,R=M?M(k):new A.constructor(k);return A.copy(R),R}}).call(this,o(122)(c))},function(c,f,o){var p=o(70),d=o(18);c.exports=!!Object.getOwnPropertySymbols&&!d(function(){var O=Symbol();return!String(O)||!(Object(O)instanceof Symbol)||!Symbol.sham&&p&&p<41})},function(c,f,o){var p=o(7),d=o(110),O="__core-js_shared__",v=p[O]||d(O,{});c.exports=v},function(c,f,o){var p=o(7),d=Object.defineProperty;c.exports=function(O,v){try{d(p,O,{value:v,configurable:!0,writable:!0})}catch(E){p[O]=v}return v}},function(c,f){c.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(c,f){f.f=Object.getOwnPropertySymbols},function(c,f,o){var p={};p[o(28)("toStringTag")]="z",c.exports=String(p)==="[object z]"},function(c,f,o){var p=o(7),d=o(75),O=o(45),v=o(63),E=p.Array,M=Math.max;c.exports=function(A,T,k){for(var R=O(A),C=d(T,R),F=d(k===void 0?R:k,R),W=E(M(F-C,0)),V=0;C<F;C++,V++)v(W,V,A[C]);return W.length=V,W}},function(c,f,o){var p=o(178);c.exports=function(d,O){return new(p(d))(O===0?0:O)}},function(c,f,o){var p=o(16),d=o(34),O=o(71),v=o(73),E=o(30),M=o(180),A=o(101),T=o(102),k=o(78),R=o(57),C=o(42),F=o(28),W=o(80),V=o(142),te=v.PROPER,ie=v.CONFIGURABLE,re=V.IteratorPrototype,J=V.BUGGY_SAFARI_ITERATORS,Z=F("iterator"),Y="keys",z="values",G="entries",H=function(){return this};c.exports=function($,ae,xe,me,Pe,Be,Se){M(xe,ae,me);var ye,je,Ae,Ue=function(ue){if(ue===Pe&&vt)return vt;if(!J&&ue in We)return We[ue];switch(ue){case Y:case z:case G:return function(){return new xe(this,ue)}}return function(){return new xe(this)}},nt=ae+" Iterator",Ot=!1,We=$.prototype,Ze=We[Z]||We["@@iterator"]||Pe&&We[Pe],vt=!J&&Ze||Ue(Pe),se=ae=="Array"&&We.entries||Ze;if(se&&(ye=A(se.call(new $)))!==Object.prototype&&ye.next&&(O||A(ye)===re||(T?T(ye,re):E(ye[Z])||C(ye,Z,H)),k(ye,nt,!0,!0),O&&(W[nt]=H)),te&&Pe==z&&Ze&&Ze.name!==z&&(!O&&ie?R(We,"name",z):(Ot=!0,vt=function(){return d(Ze,this)})),Pe)if(je={values:Ue(z),keys:Be?vt:Ue(Y),entries:Ue(G)},Se)for(Ae in je)(J||Ot||!(Ae in We))&&C(We,Ae,je[Ae]);else p({target:ae,proto:!0,forced:J||Ot},je);return O&&!Se||We[Z]===vt||C(We,Z,vt,{name:Pe}),W[ae]=vt,je}},function(c,f,o){var p=o(7),d=o(64),O=o(34),v=o(32),E=o(88),M=o(145),A=o(45),T=o(54),k=o(146),R=o(118),C=o(147),F=p.TypeError,W=function(te,ie){this.stopped=te,this.result=ie},V=W.prototype;c.exports=function(te,ie,re){var J,Z,Y,z,G,H,$,ae=re&&re.that,xe=!(!re||!re.AS_ENTRIES),me=!(!re||!re.IS_ITERATOR),Pe=!(!re||!re.INTERRUPTED),Be=d(ie,ae),Se=function(je){return J&&C(J,"normal",je),new W(!0,je)},ye=function(je){return xe?(v(je),Pe?Be(je[0],je[1],Se):Be(je[0],je[1])):Pe?Be(je,Se):Be(je)};if(me)J=te;else{if(!(Z=R(te)))throw F(E(te)+" is not iterable");if(M(Z)){for(Y=0,z=A(te);z>Y;Y++)if((G=ye(te[Y]))&&T(V,G))return G;return new W(!1)}J=k(te,Z)}for(H=J.next;!($=O(H,J)).done;){try{G=ye($.value)}catch(je){C(J,"throw",je)}if(typeof G=="object"&&G&&T(V,G))return G}return new W(!1)}},function(c,f,o){var p=o(97),d=o(62),O=o(80),v=o(28)("iterator");c.exports=function(E){if(E!=null)return d(E,v)||d(E,"@@iterator")||O[p(E)]}},function(c,f,o){var p=o(7),d=o(54),O=p.TypeError;c.exports=function(v,E){if(d(E,v))return v;throw O("Incorrect invocation")}},function(c,f,o){var p=o(28)("iterator"),d=!1;try{var O=0,v={next:function(){return{done:!!O++}},return:function(){d=!0}};v[p]=function(){return this},Array.from(v,function(){throw 2})}catch(E){}c.exports=function(E,M){if(!M&&!d)return!1;var A=!1;try{var T={};T[p]=function(){return{next:function(){return{done:A=!0}}}},E(T)}catch(k){}return A}},function(c,f,o){var p=o(18);c.exports=function(d,O){var v=[][d];return!!v&&p(function(){v.call(null,O||function(){throw 1},1)})}},function(c,f){c.exports=function(o){if(!o.webpackPolyfill){var p=Object.create(o);p.children||(p.children=[]),Object.defineProperty(p,"loaded",{enumerable:!0,get:function(){return p.l}}),Object.defineProperty(p,"id",{enumerable:!0,get:function(){return p.i}}),Object.defineProperty(p,"exports",{enumerable:!0}),p.webpackPolyfill=1}return p}},function(c,f,o){o(19);var p=o(15),d=o(42),O=o(103),v=o(18),E=o(28),M=o(57),A=E("species"),T=RegExp.prototype;c.exports=function(k,R,C,F){var W=E(k),V=!v(function(){var J={};return J[W]=function(){return 7},""[k](J)!=7}),te=V&&!v(function(){var J=!1,Z=/a/;return k==="split"&&((Z={}).constructor={},Z.constructor[A]=function(){return Z},Z.flags="",Z[W]=/./[W]),Z.exec=function(){return J=!0,null},Z[W](""),!J});if(!V||!te||C){var ie=p(/./[W]),re=R(W,""[k],function(J,Z,Y,z,G){var H=p(J),$=Z.exec;return $===O||$===T.exec?V&&!G?{done:!0,value:ie(Z,Y,z)}:{done:!0,value:H(Y,Z,z)}:{done:!1}});d(String.prototype,k,re[0]),d(T,W,re[1])}F&&M(T[W],"sham",!0)}},function(c,f,o){var p=o(151).charAt;c.exports=function(d,O,v){return O+(v?p(d,O).length:1)}},function(c,f,o){var p=o(7),d=o(34),O=o(32),v=o(30),E=o(51),M=o(103),A=p.TypeError;c.exports=function(T,k){var R=T.exec;if(v(R)){var C=d(R,T,k);return C!==null&&O(C),C}if(E(T)==="RegExp")return d(M,T,k);throw A("RegExp#exec called on incompatible receiver")}},function(c,f,o){var p=o(76),d=o(34),O=o(15),v=o(123),E=o(18),M=o(32),A=o(30),T=o(59),k=o(94),R=o(39),C=o(44),F=o(124),W=o(62),V=o(201),te=o(125),ie=o(28)("replace"),re=Math.max,J=Math.min,Z=O([].concat),Y=O([].push),z=O("".indexOf),G=O("".slice),H="a".replace(/./,"$0")==="$0",$=!!/./[ie]&&/./[ie]("a","$0")==="";v("replace",function(ae,xe,me){var Pe=$?"$":"$0";return[function(Be,Se){var ye=C(this),je=Be==null?void 0:W(Be,ie);return je?d(je,Be,ye,Se):d(xe,R(ye),Be,Se)},function(Be,Se){var ye=M(this),je=R(Be);if(typeof Se=="string"&&z(Se,Pe)===-1&&z(Se,"$<")===-1){var Ae=me(xe,ye,je,Se);if(Ae.done)return Ae.value}var Ue=A(Se);Ue||(Se=R(Se));var nt=ye.global;if(nt){var Ot=ye.unicode;ye.lastIndex=0}for(var We=[];;){var Ze=te(ye,je);if(Ze===null||(Y(We,Ze),!nt))break;R(Ze[0])===""&&(ye.lastIndex=F(je,k(ye.lastIndex),Ot))}for(var vt,se="",ue=0,he=0;he<We.length;he++){for(var Te=R((Ze=We[he])[0]),Xe=re(J(T(Ze.index),je.length),0),Le=[],wt=1;wt<Ze.length;wt++)Y(Le,(vt=Ze[wt])===void 0?vt:String(vt));var kt=Ze.groups;if(Ue){var St=Z([Te],Le,Xe,je);kt!==void 0&&Y(St,kt);var yt=R(p(Se,void 0,St))}else yt=V(Te,je,Xe,Le,kt,Se);Xe>=ue&&(se+=G(je,ue,Xe)+yt,ue=Xe+Te.length)}return se+G(je,ue)}]},!!E(function(){var ae=/./;return ae.exec=function(){var xe=[];return xe.groups={a:"7"},xe},"".replace(ae,"$<a>")!=="7"})||!H||$)},function(c,f,o){var p=o(16),d=Math.hypot,O=Math.abs,v=Math.sqrt;p({target:"Math",stat:!0,forced:!!d&&d(1/0,NaN)!==1/0},{hypot:function(E,M){for(var A,T,k=0,R=0,C=arguments.length,F=0;R<C;)F<(A=O(arguments[R++]))?(k=k*(T=F/A)*T+1,F=A):k+=A>0?(T=A/F)*T:A;return F===1/0?1/0:F*v(k)}})},function(c,f,o){var p=o(51),d=o(7);c.exports=p(d.process)=="process"},function(c,f,o){o(16)({target:"Number",stat:!0},{MIN_SAFE_INTEGER:-9007199254740991})},function(c,f,o){(function(p,d){var O;/**
  25. * @license
  26. * Lodash <https://lodash.com/>
  27. * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
  28. * Released under MIT license <https://lodash.com/license>
  29. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  30. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  31. */(function(){var v,E="Expected a function",M="__lodash_hash_undefined__",A="__lodash_placeholder__",T=16,k=32,R=64,C=128,F=256,W=1/0,V=9007199254740991,te=NaN,ie=4294967295,re=[["ary",C],["bind",1],["bindKey",2],["curry",8],["curryRight",T],["flip",512],["partial",k],["partialRight",R],["rearg",F]],J="[object Arguments]",Z="[object Array]",Y="[object Boolean]",z="[object Date]",G="[object Error]",H="[object Function]",$="[object GeneratorFunction]",ae="[object Map]",xe="[object Number]",me="[object Object]",Pe="[object Promise]",Be="[object RegExp]",Se="[object Set]",ye="[object String]",je="[object Symbol]",Ae="[object WeakMap]",Ue="[object ArrayBuffer]",nt="[object DataView]",Ot="[object Float32Array]",We="[object Float64Array]",Ze="[object Int8Array]",vt="[object Int16Array]",se="[object Int32Array]",ue="[object Uint8Array]",he="[object Uint8ClampedArray]",Te="[object Uint16Array]",Xe="[object Uint32Array]",Le=/\b__p \+= '';/g,wt=/\b(__p \+=) '' \+/g,kt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,St=/&(?:amp|lt|gt|quot|#39);/g,yt=/[&<>"']/g,Me=RegExp(St.source),ct=RegExp(yt.source),fe=/<%-([\s\S]+?)%>/g,at=/<%([\s\S]+?)%>/g,It=/<%=([\s\S]+?)%>/g,on=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Lt=/^\w*$/,qt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,dn=/[\\^$.*+?()[\]{}|]/g,bn=RegExp(dn.source),Dt=/^\s+/,Nn=/\s/,Q=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,de=/\{\n\/\* \[wrapped with (.+)\] \*/,oe=/,? & /,be=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ve=/[()=,{}\[\]\/\s]/,Ke=/\\(\\)?/g,ft=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Gt=/\w*$/,Hn=/^[-+]0x[0-9a-f]+$/i,Qn=/^0b[01]+$/i,Cn=/^\[object .+?Constructor\]$/,zn=/^0o[0-7]+$/i,ut=/^(?:0|[1-9]\d*)$/,mt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Et=/($^)/,Nt=/['\n\r\u2028\u2029\\]/g,ln="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",xn="\\u2700-\\u27bf",Oo="a-z\\xdf-\\xf6\\xf8-\\xff",io="A-Z\\xc0-\\xd6\\xd8-\\xde",wo="\\ufe0e\\ufe0f",ui="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Oc="['’]",Ya="[\\ud800-\\udfff]",Ir="["+ui+"]",ki="["+ln+"]",lt="\\d+",wc="[\\u2700-\\u27bf]",Wa="["+Oo+"]",Va="[^\\ud800-\\udfff"+ui+lt+xn+Oo+io+"]",vr="\\ud83c[\\udffb-\\udfff]",Pr="[^\\ud800-\\udfff]",na="(?:\\ud83c[\\udde6-\\uddff]){2}",$r="[\\ud800-\\udbff][\\udc00-\\udfff]",Lr="["+io+"]",qr="(?:"+Wa+"|"+Va+")",Ka="(?:"+Lr+"|"+Va+")",$a="(?:['’](?:d|ll|m|re|s|t|ve))?",$u="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ti="(?:"+ki+"|"+vr+")?",qu="[\\ufe0e\\ufe0f]?",qa=qu+Ti+("(?:\\u200d(?:"+[Pr,na,$r].join("|")+")"+qu+Ti+")*"),xc="(?:"+[wc,na,$r].join("|")+")"+qa,Bo="(?:"+[Pr+ki+"?",ki,na,$r,Ya].join("|")+")",Zu=RegExp(Oc,"g"),xo=RegExp(ki,"g"),Za=RegExp(vr+"(?="+vr+")|"+Bo+qa,"g"),ra=RegExp([Lr+"?"+Wa+"+"+$a+"(?="+[Ir,Lr,"$"].join("|")+")",Ka+"+"+$u+"(?="+[Ir,Lr+qr,"$"].join("|")+")",Lr+"?"+qr+"+"+$a,Lr+"+"+$u,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",lt,xc].join("|"),"g"),Ja=RegExp("[\\u200d\\ud800-\\udfff"+ln+wo+"]"),Qa=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ec=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ju=-1,sn={};sn[Ot]=sn[We]=sn[Ze]=sn[vt]=sn[se]=sn[ue]=sn[he]=sn[Te]=sn[Xe]=!0,sn[J]=sn[Z]=sn[Ue]=sn[Y]=sn[nt]=sn[z]=sn[G]=sn[H]=sn[ae]=sn[xe]=sn[me]=sn[Be]=sn[Se]=sn[ye]=sn[Ae]=!1;var an={};an[J]=an[Z]=an[Ue]=an[nt]=an[Y]=an[z]=an[Ot]=an[We]=an[Ze]=an[vt]=an[se]=an[ae]=an[xe]=an[me]=an[Be]=an[Se]=an[ye]=an[je]=an[ue]=an[he]=an[Te]=an[Xe]=!0,an[G]=an[H]=an[Ae]=!1;var Qu={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},si=parseFloat,Eo=parseInt,eu=typeof p=="object"&&p&&p.Object===Object&&p,es=typeof self=="object"&&self&&self.Object===Object&&self,An=eu||es||Function("return this")(),tu=f&&!f.nodeType&&f,Di=tu&&typeof d=="object"&&d&&!d.nodeType&&d,nu=Di&&Di.exports===tu,oa=nu&&eu.process,er=function(){try{var Oe=Di&&Di.require&&Di.require("util").types;return Oe||oa&&oa.binding&&oa.binding("util")}catch(Ne){}}(),ru=er&&er.isArrayBuffer,ts=er&&er.isDate,ou=er&&er.isMap,ia=er&&er.isRegExp,ci=er&&er.isSet,So=er&&er.isTypedArray;function vn(Oe,Ne,Re){switch(Re.length){case 0:return Oe.call(Ne);case 1:return Oe.call(Ne,Re[0]);case 2:return Oe.call(Ne,Re[0],Re[1]);case 3:return Oe.call(Ne,Re[0],Re[1],Re[2])}return Oe.apply(Ne,Re)}function Sc(Oe,Ne,Re,Qe){for(var zt=-1,Wt=Oe==null?0:Oe.length;++zt<Wt;){var gn=Oe[zt];Ne(Qe,gn,Re(gn),Oe)}return Qe}function gr(Oe,Ne){for(var Re=-1,Qe=Oe==null?0:Oe.length;++Re<Qe&&Ne(Oe[Re],Re,Oe)!==!1;);return Oe}function jc(Oe,Ne){for(var Re=Oe==null?0:Oe.length;Re--&&Ne(Oe[Re],Re,Oe)!==!1;);return Oe}function ns(Oe,Ne){for(var Re=-1,Qe=Oe==null?0:Oe.length;++Re<Qe;)if(!Ne(Oe[Re],Re,Oe))return!1;return!0}function ur(Oe,Ne){for(var Re=-1,Qe=Oe==null?0:Oe.length,zt=0,Wt=[];++Re<Qe;){var gn=Oe[Re];Ne(gn,Re,Oe)&&(Wt[zt++]=gn)}return Wt}function zr(Oe,Ne){return!!(Oe!=null&&Oe.length)&&li(Oe,Ne,0)>-1}function iu(Oe,Ne,Re){for(var Qe=-1,zt=Oe==null?0:Oe.length;++Qe<zt;)if(Re(Ne,Oe[Qe]))return!0;return!1}function en(Oe,Ne){for(var Re=-1,Qe=Oe==null?0:Oe.length,zt=Array(Qe);++Re<Qe;)zt[Re]=Ne(Oe[Re],Re,Oe);return zt}function Xn(Oe,Ne){for(var Re=-1,Qe=Ne.length,zt=Oe.length;++Re<Qe;)Oe[zt+Re]=Ne[Re];return Oe}function aa(Oe,Ne,Re,Qe){var zt=-1,Wt=Oe==null?0:Oe.length;for(Qe&&Wt&&(Re=Oe[++zt]);++zt<Wt;)Re=Ne(Re,Oe[zt],zt,Oe);return Re}function rs(Oe,Ne,Re,Qe){var zt=Oe==null?0:Oe.length;for(Qe&&zt&&(Re=Oe[--zt]);zt--;)Re=Ne(Re,Oe[zt],zt,Oe);return Re}function au(Oe,Ne){for(var Re=-1,Qe=Oe==null?0:Oe.length;++Re<Qe;)if(Ne(Oe[Re],Re,Oe))return!0;return!1}var ua=br("length");function ao(Oe,Ne,Re){var Qe;return Re(Oe,function(zt,Wt,gn){if(Ne(zt,Wt,gn))return Qe=Wt,!1}),Qe}function jo(Oe,Ne,Re,Qe){for(var zt=Oe.length,Wt=Re+(Qe?1:-1);Qe?Wt--:++Wt<zt;)if(Ne(Oe[Wt],Wt,Oe))return Wt;return-1}function li(Oe,Ne,Re){return Ne==Ne?function(Qe,zt,Wt){for(var gn=Wt-1,_=Qe.length;++gn<_;)if(Qe[gn]===zt)return gn;return-1}(Oe,Ne,Re):jo(Oe,Po,Re)}function mr(Oe,Ne,Re,Qe){for(var zt=Re-1,Wt=Oe.length;++zt<Wt;)if(Qe(Oe[zt],Ne))return zt;return-1}function Po(Oe){return Oe!=Oe}function Zt(Oe,Ne){var Re=Oe==null?0:Oe.length;return Re?sa(Oe,Ne)/Re:te}function br(Oe){return function(Ne){return Ne==null?v:Ne[Oe]}}function uo(Oe){return function(Ne){return Oe==null?v:Oe[Ne]}}function qn(Oe,Ne,Re,Qe,zt){return zt(Oe,function(Wt,gn,_){Re=Qe?(Qe=!1,Wt):Ne(Re,Wt,gn,_)}),Re}function sa(Oe,Ne){for(var Re,Qe=-1,zt=Oe.length;++Qe<zt;){var Wt=Ne(Oe[Qe]);Wt!==v&&(Re=Re===v?Wt:Re+Wt)}return Re}function Ni(Oe,Ne){for(var Re=-1,Qe=Array(Oe);++Re<Oe;)Qe[Re]=Ne(Re);return Qe}function uu(Oe){return Oe&&Oe.slice(0,_r(Oe)+1).replace(Dt,"")}function En(Oe){return function(Ne){return Oe(Ne)}}function ca(Oe,Ne){return en(Ne,function(Re){return Oe[Re]})}function Ao(Oe,Ne){return Oe.has(Ne)}function Br(Oe,Ne){for(var Re=-1,Qe=Oe.length;++Re<Qe&&li(Ne,Oe[Re],0)>-1;);return Re}function su(Oe,Ne){for(var Re=Oe.length;Re--&&li(Ne,Oe[Re],0)>-1;);return Re}function Pc(Oe,Ne){for(var Re=Oe.length,Qe=0;Re--;)Oe[Re]===Ne&&++Qe;return Qe}var cu=uo({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),Rn=uo({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function Ci(Oe){return"\\"+Qu[Oe]}function so(Oe){return Ja.test(Oe)}function sr(Oe){var Ne=-1,Re=Array(Oe.size);return Oe.forEach(function(Qe,zt){Re[++Ne]=[zt,Qe]}),Re}function lu(Oe,Ne){return function(Re){return Oe(Ne(Re))}}function Ar(Oe,Ne){for(var Re=-1,Qe=Oe.length,zt=0,Wt=[];++Re<Qe;){var gn=Oe[Re];gn!==Ne&&gn!==A||(Oe[Re]=A,Wt[zt++]=Re)}return Wt}function Fo(Oe){var Ne=-1,Re=Array(Oe.size);return Oe.forEach(function(Qe){Re[++Ne]=Qe}),Re}function la(Oe){var Ne=-1,Re=Array(Oe.size);return Oe.forEach(function(Qe){Re[++Ne]=[Qe,Qe]}),Re}function co(Oe){return so(Oe)?function(Ne){for(var Re=Za.lastIndex=0;Za.test(Ne);)++Re;return Re}(Oe):ua(Oe)}function Mr(Oe){return so(Oe)?function(Ne){return Ne.match(Za)||[]}(Oe):function(Ne){return Ne.split("")}(Oe)}function _r(Oe){for(var Ne=Oe.length;Ne--&&Nn.test(Oe.charAt(Ne)););return Ne}var Fr=uo({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),lo=function Oe(Ne){var Re,Qe=(Ne=Ne==null?An:lo.defaults(An.Object(),Ne,lo.pick(An,Ec))).Array,zt=Ne.Date,Wt=Ne.Error,gn=Ne.Function,_=Ne.Math,w=Ne.Object,P=Ne.RegExp,L=Ne.String,K=Ne.TypeError,pe=Qe.prototype,Ee=gn.prototype,Fe=w.prototype,st=Ne["__core-js_shared__"],Xt=Ee.toString,et=Fe.hasOwnProperty,hn=0,Bt=(Re=/[^.]+$/.exec(st&&st.keys&&st.keys.IE_PROTO||""))?"Symbol(src)_1."+Re:"",tn=Fe.toString,Ur=Xt.call(w),_n=An._,Or=P("^"+Xt.call(et).replace(dn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Mo=nu?Ne.Buffer:v,ko=Ne.Symbol,Ri=Ne.Uint8Array,fu=Mo?Mo.allocUnsafe:v,Uo=lu(w.getPrototypeOf,w),fa=w.create,cr=Fe.propertyIsEnumerable,Ii=pe.splice,fi=ko?ko.isConcatSpreadable:v,Go=ko?ko.iterator:v,Ho=ko?ko.toStringTag:v,pa=function(){try{var u=Ui(w,"defineProperty");return u({},"",{}),u}catch(l){}}(),Fd=Ne.clearTimeout!==An.clearTimeout&&Ne.clearTimeout,Ud=zt&&zt.now!==An.Date.now&&zt.now,lf=Ne.setTimeout!==An.setTimeout&&Ne.setTimeout,os=_.ceil,da=_.floor,Ac=w.getOwnPropertySymbols,Gd=Mo?Mo.isBuffer:v,ff=Ne.isFinite,Mc=pe.join,pf=lu(w.keys,w),Zn=_.max,lr=_.min,is=zt.now,as=Ne.parseInt,us=_.random,Hd=pe.reverse,ha=Ui(Ne,"DataView"),ya=Ui(Ne,"Map"),kc=Ui(Ne,"Promise"),Li=Ui(Ne,"Set"),va=Ui(Ne,"WeakMap"),pu=Ui(w,"create"),ss=va&&new va,ga={},Xd=vi(ha),df=vi(ya),Yd=vi(kc),Wd=vi(Li),hf=vi(va),cs=ko?ko.prototype:v,or=cs?cs.valueOf:v,yf=cs?cs.toString:v;function B(u){if(kn(u)&&!Ft(u)&&!(u instanceof Qt)){if(u instanceof Zr)return u;if(et.call(u,"__wrapped__"))return cl(u)}return new Zr(u)}var ma=function(){function u(){}return function(l){if(!Pn(l))return{};if(fa)return fa(l);u.prototype=l;var b=new u;return u.prototype=v,b}}();function du(){}function Zr(u,l){this.__wrapped__=u,this.__actions__=[],this.__chain__=!!l,this.__index__=0,this.__values__=v}function Qt(u){this.__wrapped__=u,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ie,this.__views__=[]}function zi(u){var l=-1,b=u==null?0:u.length;for(this.clear();++l<b;){var j=u[l];this.set(j[0],j[1])}}function yn(u){var l=-1,b=u==null?0:u.length;for(this.clear();++l<b;){var j=u[l];this.set(j[0],j[1])}}function To(u){var l=-1,b=u==null?0:u.length;for(this.clear();++l<b;){var j=u[l];this.set(j[0],j[1])}}function pi(u){var l=-1,b=u==null?0:u.length;for(this.__data__=new To;++l<b;)this.add(u[l])}function Jr(u){var l=this.__data__=new yn(u);this.size=l.size}function Tc(u,l){var b=Ft(u),j=!b&&Gi(u),N=!b&&!j&&wr(u),U=!b&&!j&&!N&&Zo(u),ne=b||j||N||U,le=ne?Ni(u.length,L):[],_e=le.length;for(var Ie in u)!l&&!et.call(u,Ie)||ne&&(Ie=="length"||N&&(Ie=="offset"||Ie=="parent")||U&&(Ie=="buffer"||Ie=="byteLength"||Ie=="byteOffset")||Xr(Ie,_e))||le.push(Ie);return le}function Dc(u){var l=u.length;return l?u[Fc(0,l-1)]:v}function vf(u,l){return wu(Tr(u),di(l,0,u.length))}function gf(u){return wu(Tr(u))}function ls(u,l,b){(b!==v&&!yo(u[l],b)||b===v&&!(l in u))&&Do(u,l,b)}function ba(u,l,b){var j=u[l];et.call(u,l)&&yo(j,b)&&(b!==v||l in u)||Do(u,l,b)}function hu(u,l){for(var b=u.length;b--;)if(yo(u[b][0],l))return b;return-1}function mf(u,l,b,j){return On(u,function(N,U,ne){l(j,N,b(N),ne)}),j}function Nc(u,l){return u&&fo(l,Tn(l),u)}function Do(u,l,b){l=="__proto__"&&pa?pa(u,l,{configurable:!0,enumerable:!0,value:b,writable:!0}):u[l]=b}function fs(u,l){for(var b=-1,j=l.length,N=Qe(j),U=u==null;++b<j;)N[b]=U?v:Da(u,l[b]);return N}function di(u,l,b){return u==u&&(b!==v&&(u=u<=b?u:b),l!==v&&(u=u>=l?u:l)),u}function Gr(u,l,b,j,N,U){var ne,le=1&l,_e=2&l,Ie=4&l;if(b&&(ne=N?b(u,j,N,U):b(u)),ne!==v)return ne;if(!Pn(u))return u;var De=Ft(u);if(De){if(ne=function(ze){var He=ze.length,jt=new ze.constructor(He);return He&&typeof ze[0]=="string"&&et.call(ze,"index")&&(jt.index=ze.index,jt.input=ze.input),jt}(u),!le)return Tr(u,ne)}else{var Ge=fr(u),rt=Ge==H||Ge==$;if(wr(u))return Df(u,le);if(Ge==me||Ge==J||rt&&!N){if(ne=_e||rt?{}:qo(u),!le)return _e?function(ze,He){return fo(ze,As(ze),He)}(u,function(ze,He){return ze&&fo(He,hr(He),ze)}(ne,u)):function(ze,He){return fo(ze,Jn(ze),He)}(u,Nc(ne,u))}else{if(!an[Ge])return N?u:{};ne=function(ze,He,jt){var it=ze.constructor;switch(He){case Ue:return Kc(ze);case Y:case z:return new it(+ze);case nt:return function(Rt,$t){var bt=$t?Kc(Rt.buffer):Rt.buffer;return new Rt.constructor(bt,Rt.byteOffset,Rt.byteLength)}(ze,jt);case Ot:case We:case Ze:case vt:case se:case ue:case he:case Te:case Xe:return Nf(ze,jt);case ae:return new it;case xe:case ye:return new it(ze);case Be:return function(Rt){var $t=new Rt.constructor(Rt.source,Gt.exec(Rt));return $t.lastIndex=Rt.lastIndex,$t}(ze);case Se:return new it;case je:return ce=ze,or?w(or.call(ce)):{}}var ce}(u,Ge,le)}}U||(U=new Jr);var dt=U.get(u);if(dt)return dt;U.set(u,ne),ip(u)?u.forEach(function(ze){ne.add(Gr(ze,l,b,ze,u,U))}):_l(u)&&u.forEach(function(ze,He){ne.set(He,Gr(ze,l,b,He,u,U))});var xt=De?v:(Ie?_e?Jc:Zc:_e?hr:Tn)(u);return gr(xt||u,function(ze,He){xt&&(ze=u[He=ze]),ba(ne,He,Gr(ze,l,b,He,u,U))}),ne}function Cc(u,l,b){var j=b.length;if(u==null)return!j;for(u=w(u);j--;){var N=b[j],U=l[N],ne=u[N];if(ne===v&&!(N in u)||!U(ne))return!1}return!0}function Rc(u,l,b){if(typeof u!="function")throw new K(E);return Sa(function(){u.apply(v,b)},l)}function Xo(u,l,b,j){var N=-1,U=zr,ne=!0,le=u.length,_e=[],Ie=l.length;if(!le)return _e;b&&(l=en(l,En(b))),j?(U=iu,ne=!1):l.length>=200&&(U=Ao,ne=!1,l=new pi(l));e:for(;++N<le;){var De=u[N],Ge=b==null?De:b(De);if(De=j||De!==0?De:0,ne&&Ge==Ge){for(var rt=Ie;rt--;)if(l[rt]===Ge)continue e;_e.push(De)}else U(l,Ge,j)||_e.push(De)}return _e}B.templateSettings={escape:fe,evaluate:at,interpolate:It,variable:"",imports:{_:B}},B.prototype=du.prototype,B.prototype.constructor=B,Zr.prototype=ma(du.prototype),Zr.prototype.constructor=Zr,Qt.prototype=ma(du.prototype),Qt.prototype.constructor=Qt,zi.prototype.clear=function(){this.__data__=pu?pu(null):{},this.size=0},zi.prototype.delete=function(u){var l=this.has(u)&&delete this.__data__[u];return this.size-=l?1:0,l},zi.prototype.get=function(u){var l=this.__data__;if(pu){var b=l[u];return b===M?v:b}return et.call(l,u)?l[u]:v},zi.prototype.has=function(u){var l=this.__data__;return pu?l[u]!==v:et.call(l,u)},zi.prototype.set=function(u,l){var b=this.__data__;return this.size+=this.has(u)?0:1,b[u]=pu&&l===v?M:l,this},yn.prototype.clear=function(){this.__data__=[],this.size=0},yn.prototype.delete=function(u){var l=this.__data__,b=hu(l,u);return!(b<0)&&(b==l.length-1?l.pop():Ii.call(l,b,1),--this.size,!0)},yn.prototype.get=function(u){var l=this.__data__,b=hu(l,u);return b<0?v:l[b][1]},yn.prototype.has=function(u){return hu(this.__data__,u)>-1},yn.prototype.set=function(u,l){var b=this.__data__,j=hu(b,u);return j<0?(++this.size,b.push([u,l])):b[j][1]=l,this},To.prototype.clear=function(){this.size=0,this.__data__={hash:new zi,map:new(ya||yn),string:new zi}},To.prototype.delete=function(u){var l=Ps(this,u).delete(u);return this.size-=l?1:0,l},To.prototype.get=function(u){return Ps(this,u).get(u)},To.prototype.has=function(u){return Ps(this,u).has(u)},To.prototype.set=function(u,l){var b=Ps(this,u),j=b.size;return b.set(u,l),this.size+=b.size==j?0:1,this},pi.prototype.add=pi.prototype.push=function(u){return this.__data__.set(u,M),this},pi.prototype.has=function(u){return this.__data__.has(u)},Jr.prototype.clear=function(){this.__data__=new yn,this.size=0},Jr.prototype.delete=function(u){var l=this.__data__,b=l.delete(u);return this.size=l.size,b},Jr.prototype.get=function(u){return this.__data__.get(u)},Jr.prototype.has=function(u){return this.__data__.has(u)},Jr.prototype.set=function(u,l){var b=this.__data__;if(b instanceof yn){var j=b.__data__;if(!ya||j.length<199)return j.push([u,l]),this.size=++b.size,this;b=this.__data__=new To(j)}return b.set(u,l),this.size=b.size,this};var On=If(pt),bf=If(mn,!0);function _f(u,l){var b=!0;return On(u,function(j,N,U){return b=!!l(j,N,U)}),b}function In(u,l,b){for(var j=-1,N=u.length;++j<N;){var U=u[j],ne=l(U);if(ne!=null&&(le===v?ne==ne&&!xr(ne):b(ne,le)))var le=ne,_e=U}return _e}function cn(u,l){var b=[];return On(u,function(j,N,U){l(j,N,U)&&b.push(j)}),b}function tr(u,l,b,j,N){var U=-1,ne=u.length;for(b||(b=eh),N||(N=[]);++U<ne;){var le=u[U];l>0&&b(le)?l>1?tr(le,l-1,b,j,N):Xn(N,le):j||(N[N.length]=le)}return N}var Yt=gu(),Bn=gu(!0);function pt(u,l){return u&&Yt(u,l,Tn)}function mn(u,l){return u&&Bn(u,l,Tn)}function ps(u,l){return ur(l,function(b){return to(u[b])})}function Yo(u,l){for(var b=0,j=(l=un(l,u)).length;u!=null&&b<j;)u=u[po(l[b++])];return b&&b==j?u:v}function Ic(u,l,b){var j=l(u);return Ft(u)?j:Xn(j,b(u))}function Sn(u){return u==null?u===v?"[object Undefined]":"[object Null]":Ho&&Ho in w(u)?function(l){var b=et.call(l,Ho),j=l[Ho];try{l[Ho]=v;var N=!0}catch(ne){}var U=tn.call(l);return N&&(b?l[Ho]=j:delete l[Ho]),U}(u):function(l){return tn.call(l)}(u)}function Mn(u,l){return u>l}function Of(u,l){return u!=null&&et.call(u,l)}function wf(u,l){return u!=null&&l in w(u)}function ds(u,l,b){for(var j=b?iu:zr,N=u[0].length,U=u.length,ne=U,le=Qe(U),_e=1/0,Ie=[];ne--;){var De=u[ne];ne&&l&&(De=en(De,En(l))),_e=lr(De.length,_e),le[ne]=!b&&(l||N>=120&&De.length>=120)?new pi(ne&&De):v}De=u[0];var Ge=-1,rt=le[0];e:for(;++Ge<N&&Ie.length<_e;){var dt=De[Ge],xt=l?l(dt):dt;if(dt=b||dt!==0?dt:0,!(rt?Ao(rt,xt):j(Ie,xt,b))){for(ne=U;--ne;){var ze=le[ne];if(!(ze?Ao(ze,xt):j(u[ne],xt,b)))continue e}rt&&rt.push(xt),Ie.push(dt)}}return Ie}function _a(u,l,b){var j=(u=ol(u,l=un(l,u)))==null?u:u[po(jn(l))];return j==null?v:vn(j,u,b)}function Lc(u){return kn(u)&&Sn(u)==J}function Oa(u,l,b,j,N){return u===l||(u==null||l==null||!kn(u)&&!kn(l)?u!=u&&l!=l:function(U,ne,le,_e,Ie,De){var Ge=Ft(U),rt=Ft(ne),dt=Ge?Z:fr(U),xt=rt?Z:fr(ne),ze=(dt=dt==J?me:dt)==me,He=(xt=xt==J?me:xt)==me,jt=dt==xt;if(jt&&wr(U)){if(!wr(ne))return!1;Ge=!0,ze=!1}if(jt&&!ze)return De||(De=new Jr),Ge||Zo(U)?js(U,ne,le,_e,Ie,De):function(bt,Mt,Wn,Cr,vo,Vn,Co){switch(Wn){case nt:if(bt.byteLength!=Mt.byteLength||bt.byteOffset!=Mt.byteOffset)return!1;bt=bt.buffer,Mt=Mt.buffer;case Ue:return!(bt.byteLength!=Mt.byteLength||!Vn(new Ri(bt),new Ri(Mt)));case Y:case z:case xe:return yo(+bt,+Mt);case G:return bt.name==Mt.name&&bt.message==Mt.message;case Be:case ye:return bt==Mt+"";case ae:var ei=sr;case Se:var Ca=1&Cr;if(ei||(ei=Fo),bt.size!=Mt.size&&!Ca)return!1;var Lu=Co.get(bt);if(Lu)return Lu==Mt;Cr|=2,Co.set(bt,Mt);var Ro=js(ei(bt),ei(Mt),Cr,vo,Vn,Co);return Co.delete(bt),Ro;case je:if(or)return or.call(bt)==or.call(Mt)}return!1}(U,ne,dt,le,_e,Ie,De);if(!(1&le)){var it=ze&&et.call(U,"__wrapped__"),ce=He&&et.call(ne,"__wrapped__");if(it||ce){var Rt=it?U.value():U,$t=ce?ne.value():ne;return De||(De=new Jr),Ie(Rt,$t,le,_e,De)}}return jt?(De||(De=new Jr),function(bt,Mt,Wn,Cr,vo,Vn){var Co=1&Wn,ei=Zc(bt),Ca=ei.length,Lu=Zc(Mt).length;if(Ca!=Lu&&!Co)return!1;for(var Ro=Ca;Ro--;){var Oi=ei[Ro];if(!(Co?Oi in Mt:et.call(Mt,Oi)))return!1}var Bl=Vn.get(bt),Ra=Vn.get(Mt);if(Bl&&Ra)return Bl==Mt&&Ra==bt;var zu=!0;Vn.set(bt,Mt),Vn.set(Mt,bt);for(var Fl=Co;++Ro<Ca;){var Bu=bt[Oi=ei[Ro]],Xi=Mt[Oi];if(Cr)var Yi=Co?Cr(Xi,Bu,Oi,Mt,bt,Vn):Cr(Bu,Xi,Oi,bt,Mt,Vn);if(!(Yi===v?Bu===Xi||vo(Bu,Xi,Wn,Cr,Vn):Yi)){zu=!1;break}Fl||(Fl=Oi=="constructor")}if(zu&&!Fl){var ti=bt.constructor,Fu=Mt.constructor;ti==Fu||!("constructor"in bt)||!("constructor"in Mt)||typeof ti=="function"&&ti instanceof ti&&typeof Fu=="function"&&Fu instanceof Fu||(zu=!1)}return Vn.delete(bt),Vn.delete(Mt),zu}(U,ne,le,_e,Ie,De)):!1}(u,l,b,j,Oa,N))}function hs(u,l,b,j){var N=b.length,U=N,ne=!j;if(u==null)return!U;for(u=w(u);N--;){var le=b[N];if(ne&&le[2]?le[1]!==u[le[0]]:!(le[0]in u))return!1}for(;++N<U;){var _e=(le=b[N])[0],Ie=u[_e],De=le[1];if(ne&&le[2]){if(Ie===v&&!(_e in u))return!1}else{var Ge=new Jr;if(j)var rt=j(Ie,De,_e,u,l,Ge);if(!(rt===v?Oa(De,Ie,3,j,Ge):rt))return!1}}return!0}function wa(u){return!(!Pn(u)||(l=u,Bt&&Bt in l))&&(to(u)?Or:Cn).test(vi(u));var l}function zc(u){return typeof u=="function"?u:u==null?Er:typeof u=="object"?Ft(u)?Ef(u[0],u[1]):xf(u):Ks(u)}function Wo(u){if(!ke(u))return pf(u);var l=[];for(var b in w(u))et.call(u,b)&&b!="constructor"&&l.push(b);return l}function Vd(u){if(!Pn(u))return function(N){var U=[];if(N!=null)for(var ne in w(N))U.push(ne);return U}(u);var l=ke(u),b=[];for(var j in u)(j!="constructor"||!l&&et.call(u,j))&&b.push(j);return b}function Vo(u,l){return u<l}function Qr(u,l){var b=-1,j=Nr(u)?Qe(u.length):[];return On(u,function(N,U,ne){j[++b]=l(N,U,ne)}),j}function xf(u){var l=el(u);return l.length==1&&l[0][2]?nl(l[0][0],l[0][1]):function(b){return b===u||hs(b,u,l)}}function Ef(u,l){return ks(u)&&tl(l)?nl(po(u),l):function(b){var j=Da(b,u);return j===v&&j===l?Ys(b,u):Oa(l,j,3)}}function ys(u,l,b,j,N){u!==l&&Yt(l,function(U,ne){if(N||(N=new Jr),Pn(U))(function(_e,Ie,De,Ge,rt,dt,xt){var ze=Ds(_e,De),He=Ds(Ie,De),jt=xt.get(He);if(jt)return void ls(_e,De,jt);var it=dt?dt(ze,He,De+"",_e,Ie,xt):v,ce=it===v;if(ce){var Rt=Ft(He),$t=!Rt&&wr(He),bt=!Rt&&!$t&&Zo(He);it=He,Rt||$t||bt?Ft(ze)?it=ze:wn(ze)?it=Tr(ze):$t?(ce=!1,it=Df(He,!0)):bt?(ce=!1,it=Nf(He,!0)):it=[]:ka(He)||Gi(He)?(it=ze,Gi(ze)?it=xl(ze):Pn(ze)&&!to(ze)||(it=qo(He))):ce=!1}ce&&(xt.set(He,it),rt(it,He,Ge,dt,xt),xt.delete(He)),ls(_e,De,it)})(u,l,ne,b,ys,j,N);else{var le=j?j(Ds(u,ne),U,ne+"",u,l,N):v;le===v&&(le=U),ls(u,ne,le)}},hr)}function Sf(u,l){var b=u.length;if(b)return Xr(l+=l<0?b:0,b)?u[l]:v}function jf(u,l,b){l=l.length?en(l,function(U){return Ft(U)?function(ne){return Yo(ne,U.length===1?U[0]:U)}:U}):[Er];var j=-1;l=en(l,En(At()));var N=Qr(u,function(U,ne,le){var _e=en(l,function(Ie){return Ie(U)});return{criteria:_e,index:++j,value:U}});return function(U,ne){var le=U.length;for(U.sort(ne);le--;)U[le]=U[le].value;return U}(N,function(U,ne){return function(le,_e,Ie){for(var De=-1,Ge=le.criteria,rt=_e.criteria,dt=Ge.length,xt=Ie.length;++De<dt;){var ze=$c(Ge[De],rt[De]);if(ze)return De>=xt?ze:ze*(Ie[De]=="desc"?-1:1)}return le.index-_e.index}(U,ne,b)})}function Pf(u,l,b){for(var j=-1,N=l.length,U={};++j<N;){var ne=l[j],le=Yo(u,ne);b(le,ne)&&yu(U,un(ne,u),le)}return U}function vs(u,l,b,j){var N=j?mr:li,U=-1,ne=l.length,le=u;for(u===l&&(l=Tr(l)),b&&(le=en(u,En(b)));++U<ne;)for(var _e=0,Ie=l[U],De=b?b(Ie):Ie;(_e=N(le,De,_e,j))>-1;)le!==u&&Ii.call(le,_e,1),Ii.call(u,_e,1);return u}function Bc(u,l){for(var b=u?l.length:0,j=b-1;b--;){var N=l[b];if(b==j||N!==U){var U=N;Xr(N)?Ii.call(u,N,1):ms(u,N)}}return u}function Fc(u,l){return u+da(us()*(l-u+1))}function gs(u,l){var b="";if(!u||l<1||l>V)return b;do l%2&&(b+=u),(l=da(l/2))&&(u+=u);while(l);return b}function Vt(u,l){return Ns(rl(u,l,Er),u+"")}function Kd(u){return Dc(_i(u))}function Uc(u,l){var b=_i(u);return wu(b,di(l,0,b.length))}function yu(u,l,b,j){if(!Pn(u))return u;for(var N=-1,U=(l=un(l,u)).length,ne=U-1,le=u;le!=null&&++N<U;){var _e=po(l[N]),Ie=b;if(_e==="__proto__"||_e==="constructor"||_e==="prototype")return u;if(N!=ne){var De=le[_e];(Ie=j?j(De,_e,le):v)===v&&(Ie=Pn(De)?De:Xr(l[N+1])?[]:{})}ba(le,_e,Ie),le=le[_e]}return u}var Af=ss?function(u,l){return ss.set(u,l),u}:Er,$d=pa?function(u,l){return pa(u,"toString",{configurable:!0,enumerable:!1,value:ku(l),writable:!0})}:Er;function Mf(u){return wu(_i(u))}function Hr(u,l,b){var j=-1,N=u.length;l<0&&(l=-l>N?0:N+l),(b=b>N?N:b)<0&&(b+=N),N=l>b?0:b-l>>>0,l>>>=0;for(var U=Qe(N);++j<N;)U[j]=u[j+l];return U}function qd(u,l){var b;return On(u,function(j,N,U){return!(b=l(j,N,U))}),!!b}function vu(u,l,b){var j=0,N=u==null?j:u.length;if(typeof l=="number"&&l==l&&N<=2147483647){for(;j<N;){var U=j+N>>>1,ne=u[U];ne!==null&&!xr(ne)&&(b?ne<=l:ne<l)?j=U+1:N=U}return N}return Gc(u,l,Er,b)}function Gc(u,l,b,j){var N=0,U=u==null?0:u.length;if(U===0)return 0;for(var ne=(l=b(l))!=l,le=l===null,_e=xr(l),Ie=l===v;N<U;){var De=da((N+U)/2),Ge=b(u[De]),rt=Ge!==v,dt=Ge===null,xt=Ge==Ge,ze=xr(Ge);if(ne)var He=j||xt;else He=Ie?xt&&(j||rt):le?xt&&rt&&(j||!dt):_e?xt&&rt&&!dt&&(j||!ze):!dt&&!ze&&(j?Ge<=l:Ge<l);He?N=De+1:U=De}return lr(U,4294967294)}function Hc(u,l){for(var b=-1,j=u.length,N=0,U=[];++b<j;){var ne=u[b],le=l?l(ne):ne;if(!b||!yo(le,_e)){var _e=le;U[N++]=ne===0?0:ne}}return U}function kf(u){return typeof u=="number"?u:xr(u)?te:+u}function kr(u){if(typeof u=="string")return u;if(Ft(u))return en(u,kr)+"";if(xr(u))return yf?yf.call(u):"";var l=u+"";return l=="0"&&1/u==-1/0?"-0":l}function hi(u,l,b){var j=-1,N=zr,U=u.length,ne=!0,le=[],_e=le;if(b)ne=!1,N=iu;else if(U>=200){var Ie=l?null:Jd(u);if(Ie)return Fo(Ie);ne=!1,N=Ao,_e=new pi}else _e=l?[]:le;e:for(;++j<U;){var De=u[j],Ge=l?l(De):De;if(De=b||De!==0?De:0,ne&&Ge==Ge){for(var rt=_e.length;rt--;)if(_e[rt]===Ge)continue e;l&&_e.push(Ge),le.push(De)}else N(_e,Ge,b)||(_e!==le&&_e.push(Ge),le.push(De))}return le}function ms(u,l){return(u=ol(u,l=un(l,u)))==null||delete u[po(jn(l))]}function Tf(u,l,b,j){return yu(u,l,b(Yo(u,l)),j)}function bs(u,l,b,j){for(var N=u.length,U=j?N:-1;(j?U--:++U<N)&&l(u[U],U,u););return b?Hr(u,j?0:U,j?U+1:N):Hr(u,j?U+1:0,j?N:U)}function Xc(u,l){var b=u;return b instanceof Qt&&(b=b.value()),aa(l,function(j,N){return N.func.apply(N.thisArg,Xn([j],N.args))},b)}function Yc(u,l,b){var j=u.length;if(j<2)return j?hi(u[0]):[];for(var N=-1,U=Qe(j);++N<j;)for(var ne=u[N],le=-1;++le<j;)le!=N&&(U[N]=Xo(U[N]||ne,u[le],l,b));return hi(tr(U,1),l,b)}function Wc(u,l,b){for(var j=-1,N=u.length,U=l.length,ne={};++j<N;){var le=j<U?l[j]:v;b(ne,u[j],le)}return ne}function _s(u){return wn(u)?u:[]}function Vc(u){return typeof u=="function"?u:Er}function un(u,l){return Ft(u)?u:ks(u,l)?[u]:sl(nn(u))}var Zd=Vt;function fn(u,l,b){var j=u.length;return b=b===v?j:b,!l&&b>=j?u:Hr(u,l,b)}var Os=Fd||function(u){return An.clearTimeout(u)};function Df(u,l){if(l)return u.slice();var b=u.length,j=fu?fu(b):new u.constructor(b);return u.copy(j),j}function Kc(u){var l=new u.constructor(u.byteLength);return new Ri(l).set(new Ri(u)),l}function Nf(u,l){var b=l?Kc(u.buffer):u.buffer;return new u.constructor(b,u.byteOffset,u.length)}function $c(u,l){if(u!==l){var b=u!==v,j=u===null,N=u==u,U=xr(u),ne=l!==v,le=l===null,_e=l==l,Ie=xr(l);if(!le&&!Ie&&!U&&u>l||U&&ne&&_e&&!le&&!Ie||j&&ne&&_e||!b&&_e||!N)return 1;if(!j&&!U&&!Ie&&u<l||Ie&&b&&N&&!j&&!U||le&&b&&N||!ne&&N||!_e)return-1}return 0}function Cf(u,l,b,j){for(var N=-1,U=u.length,ne=b.length,le=-1,_e=l.length,Ie=Zn(U-ne,0),De=Qe(_e+Ie),Ge=!j;++le<_e;)De[le]=l[le];for(;++N<ne;)(Ge||N<U)&&(De[b[N]]=u[N]);for(;Ie--;)De[le++]=u[N++];return De}function Rf(u,l,b,j){for(var N=-1,U=u.length,ne=-1,le=b.length,_e=-1,Ie=l.length,De=Zn(U-le,0),Ge=Qe(De+Ie),rt=!j;++N<De;)Ge[N]=u[N];for(var dt=N;++_e<Ie;)Ge[dt+_e]=l[_e];for(;++ne<le;)(rt||N<U)&&(Ge[dt+b[ne]]=u[N++]);return Ge}function Tr(u,l){var b=-1,j=u.length;for(l||(l=Qe(j));++b<j;)l[b]=u[b];return l}function fo(u,l,b,j){var N=!b;b||(b={});for(var U=-1,ne=l.length;++U<ne;){var le=l[U],_e=j?j(b[le],u[le],le,b,u):v;_e===v&&(_e=u[le]),N?Do(b,le,_e):ba(b,le,_e)}return b}function ws(u,l){return function(b,j){var N=Ft(b)?Sc:mf,U=l?l():{};return N(b,u,At(j,2),U)}}function xa(u){return Vt(function(l,b){var j=-1,N=b.length,U=N>1?b[N-1]:v,ne=N>2?b[2]:v;for(U=u.length>3&&typeof U=="function"?(N--,U):v,ne&&ir(b[0],b[1],ne)&&(U=N<3?v:U,N=1),l=w(l);++j<N;){var le=b[j];le&&u(l,le,j,U)}return l})}function If(u,l){return function(b,j){if(b==null)return b;if(!Nr(b))return u(b,j);for(var N=b.length,U=l?N:-1,ne=w(b);(l?U--:++U<N)&&j(ne[U],U,ne)!==!1;);return b}}function gu(u){return function(l,b,j){for(var N=-1,U=w(l),ne=j(l),le=ne.length;le--;){var _e=ne[u?le:++N];if(b(U[_e],_e,U)===!1)break}return l}}function Lf(u){return function(l){var b=so(l=nn(l))?Mr(l):v,j=b?b[0]:l.charAt(0),N=b?fn(b,1).join(""):l.slice(1);return j[u]()+N}}function Bi(u){return function(l){return aa(Au(Jo(l).replace(Zu,"")),u,"")}}function mu(u){return function(){var l=arguments;switch(l.length){case 0:return new u;case 1:return new u(l[0]);case 2:return new u(l[0],l[1]);case 3:return new u(l[0],l[1],l[2]);case 4:return new u(l[0],l[1],l[2],l[3]);case 5:return new u(l[0],l[1],l[2],l[3],l[4]);case 6:return new u(l[0],l[1],l[2],l[3],l[4],l[5]);case 7:return new u(l[0],l[1],l[2],l[3],l[4],l[5],l[6])}var b=ma(u.prototype),j=u.apply(b,l);return Pn(j)?j:b}}function zf(u){return function(l,b,j){var N=w(l);if(!Nr(l)){var U=At(b,3);l=Tn(l),b=function(le){return U(N[le],le,N)}}var ne=u(l,b,j);return ne>-1?N[U?l[ne]:ne]:v}}function yi(u){return $o(function(l){var b=l.length,j=b,N=Zr.prototype.thru;for(u&&l.reverse();j--;){var U=l[j];if(typeof U!="function")throw new K(E);if(N&&!ne&&Ea(U)=="wrapper")var ne=new Zr([],!0)}for(j=ne?j:b;++j<b;){var le=Ea(U=l[j]),_e=le=="wrapper"?Qc(U):v;ne=_e&&Ts(_e[0])&&_e[1]==424&&!_e[4].length&&_e[9]==1?ne[Ea(_e[0])].apply(ne,_e[3]):U.length==1&&Ts(U)?ne[le]():ne.thru(U)}return function(){var Ie=arguments,De=Ie[0];if(ne&&Ie.length==1&&Ft(De))return ne.plant(De).value();for(var Ge=0,rt=b?l[Ge].apply(this,Ie):De;++Ge<b;)rt=l[Ge].call(this,rt);return rt}})}function xs(u,l,b,j,N,U,ne,le,_e,Ie){var De=l&C,Ge=1&l,rt=2&l,dt=24&l,xt=512&l,ze=rt?v:mu(u);return function He(){for(var jt=arguments.length,it=Qe(jt),ce=jt;ce--;)it[ce]=arguments[ce];if(dt)var Rt=Fi(He),$t=Pc(it,Rt);if(j&&(it=Cf(it,j,N,dt)),U&&(it=Rf(it,U,ne,dt)),jt-=$t,dt&&jt<Ie){var bt=Ar(it,Rt);return Ff(u,l,xs,He.placeholder,b,it,bt,le,_e,Ie-jt)}var Mt=Ge?b:this,Wn=rt?Mt[u]:u;return jt=it.length,le?it=Xf(it,le):xt&&jt>1&&it.reverse(),De&&_e<jt&&(it.length=_e),this&&this!==An&&this instanceof He&&(Wn=ze||mu(Wn)),Wn.apply(Mt,it)}}function Es(u,l){return function(b,j){return function(N,U,ne,le){return pt(N,function(_e,Ie,De){U(le,ne(_e),Ie,De)}),le}(b,u,l(j),{})}}function bu(u,l){return function(b,j){var N;if(b===v&&j===v)return l;if(b!==v&&(N=b),j!==v){if(N===v)return j;typeof b=="string"||typeof j=="string"?(b=kr(b),j=kr(j)):(b=kf(b),j=kf(j)),N=u(b,j)}return N}}function _u(u){return $o(function(l){return l=en(l,En(At())),Vt(function(b){var j=this;return u(l,function(N){return vn(N,j,b)})})})}function Ou(u,l){var b=(l=l===v?" ":kr(l)).length;if(b<2)return b?gs(l,u):l;var j=gs(l,os(u/co(l)));return so(l)?fn(Mr(j),0,u).join(""):j.slice(0,u)}function Bf(u){return function(l,b,j){return j&&typeof j!="number"&&ir(l,b,j)&&(b=j=v),l=No(l),b===v?(b=l,l=0):b=No(b),function(N,U,ne,le){for(var _e=-1,Ie=Zn(os((U-N)/(ne||1)),0),De=Qe(Ie);Ie--;)De[le?Ie:++_e]=N,N+=ne;return De}(l,b,j=j===v?l<b?1:-1:No(j),u)}}function Ss(u){return function(l,b){return typeof l=="string"&&typeof b=="string"||(l=dr(l),b=dr(b)),u(l,b)}}function Ff(u,l,b,j,N,U,ne,le,_e,Ie){var De=8&l;l|=De?k:R,4&(l&=~(De?R:k))||(l&=-4);var Ge=[u,l,N,De?U:v,De?ne:v,De?v:U,De?v:ne,le,_e,Ie],rt=b.apply(v,Ge);return Ts(u)&&il(rt,Ge),rt.placeholder=j,al(rt,u,l)}function qc(u){var l=_[u];return function(b,j){if(b=dr(b),(j=j==null?0:lr(Ut(j),292))&&ff(b)){var N=(nn(b)+"e").split("e");return+((N=(nn(l(N[0]+"e"+(+N[1]+j)))+"e").split("e"))[0]+"e"+(+N[1]-j))}return l(b)}}var Jd=Li&&1/Fo(new Li([,-0]))[1]==W?function(u){return new Li(u)}:Du;function Uf(u){return function(l){var b=fr(l);return b==ae?sr(l):b==Se?la(l):function(j,N){return en(N,function(U){return[U,j[U]]})}(l,u(l))}}function Ko(u,l,b,j,N,U,ne,le){var _e=2&l;if(!_e&&typeof u!="function")throw new K(E);var Ie=j?j.length:0;if(Ie||(l&=-97,j=N=v),ne=ne===v?ne:Zn(Ut(ne),0),le=le===v?le:Ut(le),Ie-=N?N.length:0,l&R){var De=j,Ge=N;j=N=v}var rt=_e?v:Qc(u),dt=[u,l,b,j,N,De,Ge,U,ne,le];if(rt&&function(ze,He){var jt=ze[1],it=He[1],ce=jt|it,Rt=ce<131,$t=it==C&&jt==8||it==C&&jt==F&&ze[7].length<=He[8]||it==384&&He[7].length<=He[8]&&jt==8;if(!Rt&&!$t)return ze;1&it&&(ze[2]=He[2],ce|=1&jt?0:4);var bt=He[3];if(bt){var Mt=ze[3];ze[3]=Mt?Cf(Mt,bt,He[4]):bt,ze[4]=Mt?Ar(ze[3],A):He[4]}(bt=He[5])&&(Mt=ze[5],ze[5]=Mt?Rf(Mt,bt,He[6]):bt,ze[6]=Mt?Ar(ze[5],A):He[6]),(bt=He[7])&&(ze[7]=bt),it&C&&(ze[8]=ze[8]==null?He[8]:lr(ze[8],He[8])),ze[9]==null&&(ze[9]=He[9]),ze[0]=He[0],ze[1]=ce}(dt,rt),u=dt[0],l=dt[1],b=dt[2],j=dt[3],N=dt[4],!(le=dt[9]=dt[9]===v?_e?0:u.length:Zn(dt[9]-Ie,0))&&24&l&&(l&=-25),l&&l!=1)xt=l==8||l==T?function(ze,He,jt){var it=mu(ze);return function ce(){for(var Rt=arguments.length,$t=Qe(Rt),bt=Rt,Mt=Fi(ce);bt--;)$t[bt]=arguments[bt];var Wn=Rt<3&&$t[0]!==Mt&&$t[Rt-1]!==Mt?[]:Ar($t,Mt);return(Rt-=Wn.length)<jt?Ff(ze,He,xs,ce.placeholder,v,$t,Wn,v,v,jt-Rt):vn(this&&this!==An&&this instanceof ce?it:ze,this,$t)}}(u,l,le):l!=k&&l!=33||N.length?xs.apply(v,dt):function(ze,He,jt,it){var ce=1&He,Rt=mu(ze);return function $t(){for(var bt=-1,Mt=arguments.length,Wn=-1,Cr=it.length,vo=Qe(Cr+Mt),Vn=this&&this!==An&&this instanceof $t?Rt:ze;++Wn<Cr;)vo[Wn]=it[Wn];for(;Mt--;)vo[Wn++]=arguments[++bt];return vn(Vn,ce?jt:this,vo)}}(u,l,b,j);else var xt=function(ze,He,jt){var it=1&He,ce=mu(ze);return function Rt(){return(this&&this!==An&&this instanceof Rt?ce:ze).apply(it?jt:this,arguments)}}(u,l,b);return al((rt?Af:il)(xt,dt),u,l)}function Gf(u,l,b,j){return u===v||yo(u,Fe[b])&&!et.call(j,b)?l:u}function Hf(u,l,b,j,N,U){return Pn(u)&&Pn(l)&&(U.set(l,u),ys(u,l,v,Hf,U),U.delete(l)),u}function Qd(u){return ka(u)?v:u}function js(u,l,b,j,N,U){var ne=1&b,le=u.length,_e=l.length;if(le!=_e&&!(ne&&_e>le))return!1;var Ie=U.get(u),De=U.get(l);if(Ie&&De)return Ie==l&&De==u;var Ge=-1,rt=!0,dt=2&b?new pi:v;for(U.set(u,l),U.set(l,u);++Ge<le;){var xt=u[Ge],ze=l[Ge];if(j)var He=ne?j(ze,xt,Ge,l,u,U):j(xt,ze,Ge,u,l,U);if(He!==v){if(He)continue;rt=!1;break}if(dt){if(!au(l,function(jt,it){if(!Ao(dt,it)&&(xt===jt||N(xt,jt,b,j,U)))return dt.push(it)})){rt=!1;break}}else if(xt!==ze&&!N(xt,ze,b,j,U)){rt=!1;break}}return U.delete(u),U.delete(l),rt}function $o(u){return Ns(rl(u,v,xu),u+"")}function Zc(u){return Ic(u,Tn,Jn)}function Jc(u){return Ic(u,hr,As)}var Qc=ss?function(u){return ss.get(u)}:Du;function Ea(u){for(var l=u.name+"",b=ga[l],j=et.call(ga,l)?b.length:0;j--;){var N=b[j],U=N.func;if(U==null||U==u)return N.name}return l}function Fi(u){return(et.call(B,"placeholder")?B:u).placeholder}function At(){var u=B.iteratee||Tu;return u=u===Tu?zc:u,arguments.length?u(arguments[0],arguments[1]):u}function Ps(u,l){var b,j,N=u.__data__;return((j=typeof(b=l))=="string"||j=="number"||j=="symbol"||j=="boolean"?b!=="__proto__":b===null)?N[typeof l=="string"?"string":"hash"]:N.map}function el(u){for(var l=Tn(u),b=l.length;b--;){var j=l[b],N=u[j];l[b]=[j,N,tl(N)]}return l}function Ui(u,l){var b=function(j,N){return j==null?v:j[N]}(u,l);return wa(b)?b:v}var Jn=Ac?function(u){return u==null?[]:(u=w(u),ur(Ac(u),function(l){return cr.call(u,l)}))}:Qo,As=Ac?function(u){for(var l=[];u;)Xn(l,Jn(u)),u=Uo(u);return l}:Qo,fr=Sn;function Ms(u,l,b){for(var j=-1,N=(l=un(l,u)).length,U=!1;++j<N;){var ne=po(l[j]);if(!(U=u!=null&&b(u,ne)))break;u=u[ne]}return U||++j!=N?U:!!(N=u==null?0:u.length)&&Hs(N)&&Xr(ne,N)&&(Ft(u)||Gi(u))}function qo(u){return typeof u.constructor!="function"||ke(u)?{}:ma(Uo(u))}function eh(u){return Ft(u)||Gi(u)||!!(fi&&u&&u[fi])}function Xr(u,l){var b=typeof u;return!!(l=l==null?V:l)&&(b=="number"||b!="symbol"&&ut.test(u))&&u>-1&&u%1==0&&u<l}function ir(u,l,b){if(!Pn(b))return!1;var j=typeof l;return!!(j=="number"?Nr(b)&&Xr(l,b.length):j=="string"&&l in b)&&yo(b[l],u)}function ks(u,l){if(Ft(u))return!1;var b=typeof u;return!(b!="number"&&b!="symbol"&&b!="boolean"&&u!=null&&!xr(u))||Lt.test(u)||!on.test(u)||l!=null&&u in w(l)}function Ts(u){var l=Ea(u),b=B[l];if(typeof b!="function"||!(l in Qt.prototype))return!1;if(u===b)return!0;var j=Qc(b);return!!j&&u===j[0]}(ha&&fr(new ha(new ArrayBuffer(1)))!=nt||ya&&fr(new ya)!=ae||kc&&fr(kc.resolve())!=Pe||Li&&fr(new Li)!=Se||va&&fr(new va)!=Ae)&&(fr=function(u){var l=Sn(u),b=l==me?u.constructor:v,j=b?vi(b):"";if(j)switch(j){case Xd:return nt;case df:return ae;case Yd:return Pe;case Wd:return Se;case hf:return Ae}return l});var th=st?to:Nu;function ke(u){var l=u&&u.constructor;return u===(typeof l=="function"&&l.prototype||Fe)}function tl(u){return u==u&&!Pn(u)}function nl(u,l){return function(b){return b!=null&&b[u]===l&&(l!==v||u in w(b))}}function rl(u,l,b){return l=Zn(l===v?u.length-1:l,0),function(){for(var j=arguments,N=-1,U=Zn(j.length-l,0),ne=Qe(U);++N<U;)ne[N]=j[l+N];N=-1;for(var le=Qe(l+1);++N<l;)le[N]=j[N];return le[l]=b(ne),vn(u,this,le)}}function ol(u,l){return l.length<2?u:Yo(u,Hr(l,0,-1))}function Xf(u,l){for(var b=u.length,j=lr(l.length,b),N=Tr(u);j--;){var U=l[j];u[j]=Xr(U,b)?N[U]:v}return u}function Ds(u,l){if((l!=="constructor"||typeof u[l]!="function")&&l!="__proto__")return u[l]}var il=ul(Af),Sa=lf||function(u,l){return An.setTimeout(u,l)},Ns=ul($d);function al(u,l,b){var j=l+"";return Ns(u,function(N,U){var ne=U.length;if(!ne)return N;var le=ne-1;return U[le]=(ne>1?"& ":"")+U[le],U=U.join(ne>2?", ":" "),N.replace(Q,`{
  32. /* [wrapped with `+U+`] */
  33. `)}(j,function(N,U){return gr(re,function(ne){var le="_."+ne[0];U&ne[1]&&!zr(N,le)&&N.push(le)}),N.sort()}(function(N){var U=N.match(de);return U?U[1].split(oe):[]}(j),b)))}function ul(u){var l=0,b=0;return function(){var j=is(),N=16-(j-b);if(b=j,N>0){if(++l>=800)return arguments[0]}else l=0;return u.apply(v,arguments)}}function wu(u,l){var b=-1,j=u.length,N=j-1;for(l=l===v?j:l;++b<l;){var U=Fc(b,N),ne=u[U];u[U]=u[b],u[b]=ne}return u.length=l,u}var sl=function(u){var l=Aa(u,function(j){return b.size===500&&b.clear(),j}),b=l.cache;return l}(function(u){var l=[];return u.charCodeAt(0)===46&&l.push(""),u.replace(qt,function(b,j,N,U){l.push(N?U.replace(Ke,"$1"):j||b)}),l});function po(u){if(typeof u=="string"||xr(u))return u;var l=u+"";return l=="0"&&1/u==-1/0?"-0":l}function vi(u){if(u!=null){try{return Xt.call(u)}catch(l){}try{return u+""}catch(l){}}return""}function cl(u){if(u instanceof Qt)return u.clone();var l=new Zr(u.__wrapped__,u.__chain__);return l.__actions__=Tr(u.__actions__),l.__index__=u.__index__,l.__values__=u.__values__,l}var Yf=Vt(function(u,l){return wn(u)?Xo(u,tr(l,1,wn,!0)):[]}),Wf=Vt(function(u,l){var b=jn(l);return wn(b)&&(b=v),wn(u)?Xo(u,tr(l,1,wn,!0),At(b,2)):[]}),Vf=Vt(function(u,l){var b=jn(l);return wn(b)&&(b=v),wn(u)?Xo(u,tr(l,1,wn,!0),v,b):[]});function ll(u,l,b){var j=u==null?0:u.length;if(!j)return-1;var N=b==null?0:Ut(b);return N<0&&(N=Zn(j+N,0)),jo(u,At(l,3),N)}function Cs(u,l,b){var j=u==null?0:u.length;if(!j)return-1;var N=j-1;return b!==v&&(N=Ut(b),N=b<0?Zn(j+N,0):lr(N,j-1)),jo(u,At(l,3),N,!0)}function xu(u){return u!=null&&u.length?tr(u,1):[]}function Kf(u){return u&&u.length?u[0]:v}var ho=Vt(function(u){var l=en(u,_s);return l.length&&l[0]===u[0]?ds(l):[]}),gi=Vt(function(u){var l=jn(u),b=en(u,_s);return l===jn(b)?l=v:b.pop(),b.length&&b[0]===u[0]?ds(b,At(l,2)):[]}),nh=Vt(function(u){var l=jn(u),b=en(u,_s);return(l=typeof l=="function"?l:v)&&b.pop(),b.length&&b[0]===u[0]?ds(b,v,l):[]});function jn(u){var l=u==null?0:u.length;return l?u[l-1]:v}var $f=Vt(Rs);function Rs(u,l){return u&&u.length&&l&&l.length?vs(u,l):u}var qf=$o(function(u,l){var b=u==null?0:u.length,j=fs(u,l);return Bc(u,en(l,function(N){return Xr(N,b)?+N:N}).sort($c)),j});function Is(u){return u==null?u:Hd.call(u)}var Zf=Vt(function(u){return hi(tr(u,1,wn,!0))}),Jf=Vt(function(u){var l=jn(u);return wn(l)&&(l=v),hi(tr(u,1,wn,!0),At(l,2))}),Qf=Vt(function(u){var l=jn(u);return l=typeof l=="function"?l:v,hi(tr(u,1,wn,!0),v,l)});function Eu(u){if(!u||!u.length)return[];var l=0;return u=ur(u,function(b){if(wn(b))return l=Zn(b.length,l),!0}),Ni(l,function(b){return en(u,br(b))})}function ja(u,l){if(!u||!u.length)return[];var b=Eu(u);return l==null?b:en(b,function(j){return vn(l,v,j)})}var pr=Vt(function(u,l){return wn(u)?Xo(u,l):[]}),rh=Vt(function(u){return Yc(ur(u,wn))}),oh=Vt(function(u){var l=jn(u);return wn(l)&&(l=v),Yc(ur(u,wn),At(l,2))}),fl=Vt(function(u){var l=jn(u);return l=typeof l=="function"?l:v,Yc(ur(u,wn),v,l)}),ep=Vt(Eu),Dr=Vt(function(u){var l=u.length,b=l>1?u[l-1]:v;return b=typeof b=="function"?(u.pop(),b):v,ja(u,b)});function Fn(u){var l=B(u);return l.__chain__=!0,l}function Ls(u,l){return l(u)}var eo=$o(function(u){var l=u.length,b=l?u[0]:0,j=this.__wrapped__,N=function(U){return fs(U,u)};return!(l>1||this.__actions__.length)&&j instanceof Qt&&Xr(b)?((j=j.slice(b,+b+(l?1:0))).__actions__.push({func:Ls,args:[N],thisArg:v}),new Zr(j,this.__chain__).thru(function(U){return l&&!U.length&&U.push(v),U})):this.thru(N)}),Pt=ws(function(u,l,b){et.call(u,b)?++u[b]:Do(u,b,1)}),pl=zf(ll),dl=zf(Cs);function zs(u,l){return(Ft(u)?gr:On)(u,At(l,3))}function hl(u,l){return(Ft(u)?jc:bf)(u,At(l,3))}var tp=ws(function(u,l,b){et.call(u,b)?u[b].push(l):Do(u,b,[l])}),ih=Vt(function(u,l,b){var j=-1,N=typeof l=="function",U=Nr(u)?Qe(u.length):[];return On(u,function(ne){U[++j]=N?vn(l,ne,b):_a(ne,l,b)}),U}),ah=ws(function(u,l,b){Do(u,b,l)});function Pa(u,l){return(Ft(u)?en:Qr)(u,At(l,3))}var uh=ws(function(u,l,b){u[b?0:1].push(l)},function(){return[[],[]]}),yl=Vt(function(u,l){if(u==null)return[];var b=l.length;return b>1&&ir(u,l[0],l[1])?l=[]:b>2&&ir(l[0],l[1],l[2])&&(l=[l[0]]),jf(u,tr(l,1),[])}),Bs=Ud||function(){return An.Date.now()};function np(u,l,b){return l=b?v:l,l=u&&l==null?u.length:l,Ko(u,C,v,v,v,v,l)}function vl(u,l){var b;if(typeof l!="function")throw new K(E);return u=Ut(u),function(){return--u>0&&(b=l.apply(this,arguments)),u<=1&&(l=v),b}}var mi=Vt(function(u,l,b){var j=1;if(b.length){var N=Ar(b,Fi(mi));j|=k}return Ko(u,j,l,b,N)}),gl=Vt(function(u,l,b){var j=3;if(b.length){var N=Ar(b,Fi(gl));j|=k}return Ko(l,j,u,b,N)});function Ct(u,l,b){var j,N,U,ne,le,_e,Ie=0,De=!1,Ge=!1,rt=!0;if(typeof u!="function")throw new K(E);function dt(ce){var Rt=j,$t=N;return j=N=v,Ie=ce,ne=u.apply($t,Rt)}function xt(ce){return Ie=ce,le=Sa(He,l),De?dt(ce):ne}function ze(ce){var Rt=ce-_e;return _e===v||Rt>=l||Rt<0||Ge&&ce-Ie>=U}function He(){var ce=Bs();if(ze(ce))return jt(ce);le=Sa(He,function(Rt){var $t=l-(Rt-_e);return Ge?lr($t,U-(Rt-Ie)):$t}(ce))}function jt(ce){return le=v,rt&&j?dt(ce):(j=N=v,ne)}function it(){var ce=Bs(),Rt=ze(ce);if(j=arguments,N=this,_e=ce,Rt){if(le===v)return xt(_e);if(Ge)return Os(le),le=Sa(He,l),dt(_e)}return le===v&&(le=Sa(He,l)),ne}return l=dr(l)||0,Pn(b)&&(De=!!b.leading,U=(Ge="maxWait"in b)?Zn(dr(b.maxWait)||0,l):U,rt="trailing"in b?!!b.trailing:rt),it.cancel=function(){le!==v&&Os(le),Ie=0,j=_e=N=le=v},it.flush=function(){return le===v?ne:jt(Bs())},it}var rp=Vt(function(u,l){return Rc(u,1,l)}),Fs=Vt(function(u,l,b){return Rc(u,dr(l)||0,b)});function Aa(u,l){if(typeof u!="function"||l!=null&&typeof l!="function")throw new K(E);var b=function(){var j=arguments,N=l?l.apply(this,j):j[0],U=b.cache;if(U.has(N))return U.get(N);var ne=u.apply(this,j);return b.cache=U.set(N,ne)||U,ne};return b.cache=new(Aa.Cache||To),b}function Us(u){if(typeof u!="function")throw new K(E);return function(){var l=arguments;switch(l.length){case 0:return!u.call(this);case 1:return!u.call(this,l[0]);case 2:return!u.call(this,l[0],l[1]);case 3:return!u.call(this,l[0],l[1],l[2])}return!u.apply(this,l)}}Aa.Cache=To;var op=Zd(function(u,l){var b=(l=l.length==1&&Ft(l[0])?en(l[0],En(At())):en(tr(l,1),En(At()))).length;return Vt(function(j){for(var N=-1,U=lr(j.length,b);++N<U;)j[N]=l[N].call(this,j[N]);return vn(u,this,j)})}),Gs=Vt(function(u,l){var b=Ar(l,Fi(Gs));return Ko(u,k,v,l,b)}),ml=Vt(function(u,l){var b=Ar(l,Fi(ml));return Ko(u,R,v,l,b)}),sh=$o(function(u,l){return Ko(u,F,v,v,v,l)});function yo(u,l){return u===l||u!=u&&l!=l}var ch=Ss(Mn),Su=Ss(function(u,l){return u>=l}),Gi=Lc(function(){return arguments}())?Lc:function(u){return kn(u)&&et.call(u,"callee")&&!cr.call(u,"callee")},Ft=Qe.isArray,lh=ru?En(ru):function(u){return kn(u)&&Sn(u)==Ue};function Nr(u){return u!=null&&Hs(u.length)&&!to(u)}function wn(u){return kn(u)&&Nr(u)}var wr=Gd||Nu,bl=ts?En(ts):function(u){return kn(u)&&Sn(u)==z};function nr(u){if(!kn(u))return!1;var l=Sn(u);return l==G||l=="[object DOMException]"||typeof u.message=="string"&&typeof u.name=="string"&&!ka(u)}function to(u){if(!Pn(u))return!1;var l=Sn(u);return l==H||l==$||l=="[object AsyncFunction]"||l=="[object Proxy]"}function Ma(u){return typeof u=="number"&&u==Ut(u)}function Hs(u){return typeof u=="number"&&u>-1&&u%1==0&&u<=V}function Pn(u){var l=typeof u;return u!=null&&(l=="object"||l=="function")}function kn(u){return u!=null&&typeof u=="object"}var _l=ou?En(ou):function(u){return kn(u)&&fr(u)==ae};function Ol(u){return typeof u=="number"||kn(u)&&Sn(u)==xe}function ka(u){if(!kn(u)||Sn(u)!=me)return!1;var l=Uo(u);if(l===null)return!0;var b=et.call(l,"constructor")&&l.constructor;return typeof b=="function"&&b instanceof b&&Xt.call(b)==Ur}var Ta=ia?En(ia):function(u){return kn(u)&&Sn(u)==Be},ip=ci?En(ci):function(u){return kn(u)&&fr(u)==Se};function Xs(u){return typeof u=="string"||!Ft(u)&&kn(u)&&Sn(u)==ye}function xr(u){return typeof u=="symbol"||kn(u)&&Sn(u)==je}var Zo=So?En(So):function(u){return kn(u)&&Hs(u.length)&&!!sn[Sn(u)]},ap=Ss(Vo),wl=Ss(function(u,l){return u<=l});function up(u){if(!u)return[];if(Nr(u))return Xs(u)?Mr(u):Tr(u);if(Go&&u[Go])return function(b){for(var j,N=[];!(j=b.next()).done;)N.push(j.value);return N}(u[Go]());var l=fr(u);return(l==ae?sr:l==Se?Fo:_i)(u)}function No(u){return u?(u=dr(u))===W||u===-1/0?17976931348623157e292*(u<0?-1:1):u==u?u:0:u===0?u:0}function Ut(u){var l=No(u),b=l%1;return l==l?b?l-b:l:0}function sp(u){return u?di(Ut(u),0,ie):0}function dr(u){if(typeof u=="number")return u;if(xr(u))return te;if(Pn(u)){var l=typeof u.valueOf=="function"?u.valueOf():u;u=Pn(l)?l+"":l}if(typeof u!="string")return u===0?u:+u;u=uu(u);var b=Qn.test(u);return b||zn.test(u)?Eo(u.slice(2),b?2:8):Hn.test(u)?te:+u}function xl(u){return fo(u,hr(u))}function nn(u){return u==null?"":kr(u)}var El=xa(function(u,l){if(ke(l)||Nr(l))fo(l,Tn(l),u);else for(var b in l)et.call(l,b)&&ba(u,b,l[b])}),Hi=xa(function(u,l){fo(l,hr(l),u)}),bi=xa(function(u,l,b,j){fo(l,hr(l),u,j)}),ju=xa(function(u,l,b,j){fo(l,Tn(l),u,j)}),cp=$o(fs),lp=Vt(function(u,l){u=w(u);var b=-1,j=l.length,N=j>2?l[2]:v;for(N&&ir(l[0],l[1],N)&&(j=1);++b<j;)for(var U=l[b],ne=hr(U),le=-1,_e=ne.length;++le<_e;){var Ie=ne[le],De=u[Ie];(De===v||yo(De,Fe[Ie])&&!et.call(u,Ie))&&(u[Ie]=U[Ie])}return u}),fp=Vt(function(u){return u.push(v,Hf),vn(jl,v,u)});function Da(u,l,b){var j=u==null?v:Yo(u,l);return j===v?b:j}function Ys(u,l){return u!=null&&Ms(u,l,wf)}var Sl=Es(function(u,l,b){l!=null&&typeof l.toString!="function"&&(l=tn.call(l)),u[l]=b},ku(Er)),pp=Es(function(u,l,b){l!=null&&typeof l.toString!="function"&&(l=tn.call(l)),et.call(u,l)?u[l].push(b):u[l]=[b]},At),dp=Vt(_a);function Tn(u){return Nr(u)?Tc(u):Wo(u)}function hr(u){return Nr(u)?Tc(u,!0):Vd(u)}var hp=xa(function(u,l,b){ys(u,l,b)}),jl=xa(function(u,l,b,j){ys(u,l,b,j)}),Pl=$o(function(u,l){var b={};if(u==null)return b;var j=!1;l=en(l,function(U){return U=un(U,u),j||(j=U.length>1),U}),fo(u,Jc(u),b),j&&(b=Gr(b,7,Qd));for(var N=l.length;N--;)ms(b,l[N]);return b}),Al=$o(function(u,l){return u==null?{}:function(b,j){return Pf(b,j,function(N,U){return Ys(b,U)})}(u,l)});function Ws(u,l){if(u==null)return{};var b=en(Jc(u),function(j){return[j]});return l=At(l),Pf(u,b,function(j,N){return l(j,N[0])})}var Ml=Uf(Tn),Vs=Uf(hr);function _i(u){return u==null?[]:ca(u,Tn(u))}var kl=Bi(function(u,l,b){return l=l.toLowerCase(),u+(b?Na(l):l)});function Na(u){return Pu(nn(u).toLowerCase())}function Jo(u){return(u=nn(u))&&u.replace(mt,cu).replace(xo,"")}var yp=Bi(function(u,l,b){return u+(b?"-":"")+l.toLowerCase()}),vp=Bi(function(u,l,b){return u+(b?" ":"")+l.toLowerCase()}),Tl=Lf("toLowerCase"),Dl=Bi(function(u,l,b){return u+(b?"_":"")+l.toLowerCase()}),fh=Bi(function(u,l,b){return u+(b?" ":"")+Pu(l)}),gp=Bi(function(u,l,b){return u+(b?" ":"")+l.toUpperCase()}),Pu=Lf("toUpperCase");function Au(u,l,b){return u=nn(u),(l=b?v:l)===v?function(j){return Qa.test(j)}(u)?function(j){return j.match(ra)||[]}(u):function(j){return j.match(be)||[]}(u):u.match(l)||[]}var Mu=Vt(function(u,l){try{return vn(u,v,l)}catch(b){return nr(b)?b:new Wt(b)}}),Nl=$o(function(u,l){return gr(l,function(b){b=po(b),Do(u,b,mi(u[b],u))}),u});function ku(u){return function(){return u}}var mp=yi(),Cl=yi(!0);function Er(u){return u}function Tu(u){return zc(typeof u=="function"?u:Gr(u,1))}var ph=Vt(function(u,l){return function(b){return _a(b,u,l)}}),Yn=Vt(function(u,l){return function(b){return _a(u,b,l)}});function no(u,l,b){var j=Tn(l),N=ps(l,j);b!=null||Pn(l)&&(N.length||!j.length)||(b=l,l=u,u=this,N=ps(l,Tn(l)));var U=!(Pn(b)&&"chain"in b&&!b.chain),ne=to(u);return gr(N,function(le){var _e=l[le];u[le]=_e,ne&&(u.prototype[le]=function(){var Ie=this.__chain__;if(U||Ie){var De=u(this.__wrapped__),Ge=De.__actions__=Tr(this.__actions__);return Ge.push({func:_e,args:arguments,thisArg:u}),De.__chain__=Ie,De}return _e.apply(u,Xn([this.value()],arguments))})}),u}function Du(){}var Rl=_u(en),dh=_u(ns),Il=_u(au);function Ks(u){return ks(u)?br(po(u)):function(l){return function(b){return Yo(b,l)}}(u)}var Ll=Bf(),hh=Bf(!0);function Qo(){return[]}function Nu(){return!1}var zl=bu(function(u,l){return u+l},0),bp=qc("ceil"),Cu=bu(function(u,l){return u/l},1),Ru=qc("floor"),Iu,_p=bu(function(u,l){return u*l},1),Op=qc("round"),rr=bu(function(u,l){return u-l},0);return B.after=function(u,l){if(typeof l!="function")throw new K(E);return u=Ut(u),function(){if(--u<1)return l.apply(this,arguments)}},B.ary=np,B.assign=El,B.assignIn=Hi,B.assignInWith=bi,B.assignWith=ju,B.at=cp,B.before=vl,B.bind=mi,B.bindAll=Nl,B.bindKey=gl,B.castArray=function(){if(!arguments.length)return[];var u=arguments[0];return Ft(u)?u:[u]},B.chain=Fn,B.chunk=function(u,l,b){l=(b?ir(u,l,b):l===v)?1:Zn(Ut(l),0);var j=u==null?0:u.length;if(!j||l<1)return[];for(var N=0,U=0,ne=Qe(os(j/l));N<j;)ne[U++]=Hr(u,N,N+=l);return ne},B.compact=function(u){for(var l=-1,b=u==null?0:u.length,j=0,N=[];++l<b;){var U=u[l];U&&(N[j++]=U)}return N},B.concat=function(){var u=arguments.length;if(!u)return[];for(var l=Qe(u-1),b=arguments[0],j=u;j--;)l[j-1]=arguments[j];return Xn(Ft(b)?Tr(b):[b],tr(l,1))},B.cond=function(u){var l=u==null?0:u.length,b=At();return u=l?en(u,function(j){if(typeof j[1]!="function")throw new K(E);return[b(j[0]),j[1]]}):[],Vt(function(j){for(var N=-1;++N<l;){var U=u[N];if(vn(U[0],this,j))return vn(U[1],this,j)}})},B.conforms=function(u){return function(l){var b=Tn(l);return function(j){return Cc(j,l,b)}}(Gr(u,1))},B.constant=ku,B.countBy=Pt,B.create=function(u,l){var b=ma(u);return l==null?b:Nc(b,l)},B.curry=function u(l,b,j){var N=Ko(l,8,v,v,v,v,v,b=j?v:b);return N.placeholder=u.placeholder,N},B.curryRight=function u(l,b,j){var N=Ko(l,T,v,v,v,v,v,b=j?v:b);return N.placeholder=u.placeholder,N},B.debounce=Ct,B.defaults=lp,B.defaultsDeep=fp,B.defer=rp,B.delay=Fs,B.difference=Yf,B.differenceBy=Wf,B.differenceWith=Vf,B.drop=function(u,l,b){var j=u==null?0:u.length;return j?Hr(u,(l=b||l===v?1:Ut(l))<0?0:l,j):[]},B.dropRight=function(u,l,b){var j=u==null?0:u.length;return j?Hr(u,0,(l=j-(l=b||l===v?1:Ut(l)))<0?0:l):[]},B.dropRightWhile=function(u,l){return u&&u.length?bs(u,At(l,3),!0,!0):[]},B.dropWhile=function(u,l){return u&&u.length?bs(u,At(l,3),!0):[]},B.fill=function(u,l,b,j){var N=u==null?0:u.length;return N?(b&&typeof b!="number"&&ir(u,l,b)&&(b=0,j=N),function(U,ne,le,_e){var Ie=U.length;for((le=Ut(le))<0&&(le=-le>Ie?0:Ie+le),(_e=_e===v||_e>Ie?Ie:Ut(_e))<0&&(_e+=Ie),_e=le>_e?0:sp(_e);le<_e;)U[le++]=ne;return U}(u,l,b,j)):[]},B.filter=function(u,l){return(Ft(u)?ur:cn)(u,At(l,3))},B.flatMap=function(u,l){return tr(Pa(u,l),1)},B.flatMapDeep=function(u,l){return tr(Pa(u,l),W)},B.flatMapDepth=function(u,l,b){return b=b===v?1:Ut(b),tr(Pa(u,l),b)},B.flatten=xu,B.flattenDeep=function(u){return u!=null&&u.length?tr(u,W):[]},B.flattenDepth=function(u,l){return u!=null&&u.length?tr(u,l=l===v?1:Ut(l)):[]},B.flip=function(u){return Ko(u,512)},B.flow=mp,B.flowRight=Cl,B.fromPairs=function(u){for(var l=-1,b=u==null?0:u.length,j={};++l<b;){var N=u[l];j[N[0]]=N[1]}return j},B.functions=function(u){return u==null?[]:ps(u,Tn(u))},B.functionsIn=function(u){return u==null?[]:ps(u,hr(u))},B.groupBy=tp,B.initial=function(u){return u!=null&&u.length?Hr(u,0,-1):[]},B.intersection=ho,B.intersectionBy=gi,B.intersectionWith=nh,B.invert=Sl,B.invertBy=pp,B.invokeMap=ih,B.iteratee=Tu,B.keyBy=ah,B.keys=Tn,B.keysIn=hr,B.map=Pa,B.mapKeys=function(u,l){var b={};return l=At(l,3),pt(u,function(j,N,U){Do(b,l(j,N,U),j)}),b},B.mapValues=function(u,l){var b={};return l=At(l,3),pt(u,function(j,N,U){Do(b,N,l(j,N,U))}),b},B.matches=function(u){return xf(Gr(u,1))},B.matchesProperty=function(u,l){return Ef(u,Gr(l,1))},B.memoize=Aa,B.merge=hp,B.mergeWith=jl,B.method=ph,B.methodOf=Yn,B.mixin=no,B.negate=Us,B.nthArg=function(u){return u=Ut(u),Vt(function(l){return Sf(l,u)})},B.omit=Pl,B.omitBy=function(u,l){return Ws(u,Us(At(l)))},B.once=function(u){return vl(2,u)},B.orderBy=function(u,l,b,j){return u==null?[]:(Ft(l)||(l=l==null?[]:[l]),Ft(b=j?v:b)||(b=b==null?[]:[b]),jf(u,l,b))},B.over=Rl,B.overArgs=op,B.overEvery=dh,B.overSome=Il,B.partial=Gs,B.partialRight=ml,B.partition=uh,B.pick=Al,B.pickBy=Ws,B.property=Ks,B.propertyOf=function(u){return function(l){return u==null?v:Yo(u,l)}},B.pull=$f,B.pullAll=Rs,B.pullAllBy=function(u,l,b){return u&&u.length&&l&&l.length?vs(u,l,At(b,2)):u},B.pullAllWith=function(u,l,b){return u&&u.length&&l&&l.length?vs(u,l,v,b):u},B.pullAt=qf,B.range=Ll,B.rangeRight=hh,B.rearg=sh,B.reject=function(u,l){return(Ft(u)?ur:cn)(u,Us(At(l,3)))},B.remove=function(u,l){var b=[];if(!u||!u.length)return b;var j=-1,N=[],U=u.length;for(l=At(l,3);++j<U;){var ne=u[j];l(ne,j,u)&&(b.push(ne),N.push(j))}return Bc(u,N),b},B.rest=function(u,l){if(typeof u!="function")throw new K(E);return Vt(u,l=l===v?l:Ut(l))},B.reverse=Is,B.sampleSize=function(u,l,b){return l=(b?ir(u,l,b):l===v)?1:Ut(l),(Ft(u)?vf:Uc)(u,l)},B.set=function(u,l,b){return u==null?u:yu(u,l,b)},B.setWith=function(u,l,b,j){return j=typeof j=="function"?j:v,u==null?u:yu(u,l,b,j)},B.shuffle=function(u){return(Ft(u)?gf:Mf)(u)},B.slice=function(u,l,b){var j=u==null?0:u.length;return j?(b&&typeof b!="number"&&ir(u,l,b)?(l=0,b=j):(l=l==null?0:Ut(l),b=b===v?j:Ut(b)),Hr(u,l,b)):[]},B.sortBy=yl,B.sortedUniq=function(u){return u&&u.length?Hc(u):[]},B.sortedUniqBy=function(u,l){return u&&u.length?Hc(u,At(l,2)):[]},B.split=function(u,l,b){return b&&typeof b!="number"&&ir(u,l,b)&&(l=b=v),(b=b===v?ie:b>>>0)?(u=nn(u))&&(typeof l=="string"||l!=null&&!Ta(l))&&!(l=kr(l))&&so(u)?fn(Mr(u),0,b):u.split(l,b):[]},B.spread=function(u,l){if(typeof u!="function")throw new K(E);return l=l==null?0:Zn(Ut(l),0),Vt(function(b){var j=b[l],N=fn(b,0,l);return j&&Xn(N,j),vn(u,this,N)})},B.tail=function(u){var l=u==null?0:u.length;return l?Hr(u,1,l):[]},B.take=function(u,l,b){return u&&u.length?Hr(u,0,(l=b||l===v?1:Ut(l))<0?0:l):[]},B.takeRight=function(u,l,b){var j=u==null?0:u.length;return j?Hr(u,(l=j-(l=b||l===v?1:Ut(l)))<0?0:l,j):[]},B.takeRightWhile=function(u,l){return u&&u.length?bs(u,At(l,3),!1,!0):[]},B.takeWhile=function(u,l){return u&&u.length?bs(u,At(l,3)):[]},B.tap=function(u,l){return l(u),u},B.throttle=function(u,l,b){var j=!0,N=!0;if(typeof u!="function")throw new K(E);return Pn(b)&&(j="leading"in b?!!b.leading:j,N="trailing"in b?!!b.trailing:N),Ct(u,l,{leading:j,maxWait:l,trailing:N})},B.thru=Ls,B.toArray=up,B.toPairs=Ml,B.toPairsIn=Vs,B.toPath=function(u){return Ft(u)?en(u,po):xr(u)?[u]:Tr(sl(nn(u)))},B.toPlainObject=xl,B.transform=function(u,l,b){var j=Ft(u),N=j||wr(u)||Zo(u);if(l=At(l,4),b==null){var U=u&&u.constructor;b=N?j?new U:[]:Pn(u)&&to(U)?ma(Uo(u)):{}}return(N?gr:pt)(u,function(ne,le,_e){return l(b,ne,le,_e)}),b},B.unary=function(u){return np(u,1)},B.union=Zf,B.unionBy=Jf,B.unionWith=Qf,B.uniq=function(u){return u&&u.length?hi(u):[]},B.uniqBy=function(u,l){return u&&u.length?hi(u,At(l,2)):[]},B.uniqWith=function(u,l){return l=typeof l=="function"?l:v,u&&u.length?hi(u,v,l):[]},B.unset=function(u,l){return u==null||ms(u,l)},B.unzip=Eu,B.unzipWith=ja,B.update=function(u,l,b){return u==null?u:Tf(u,l,Vc(b))},B.updateWith=function(u,l,b,j){return j=typeof j=="function"?j:v,u==null?u:Tf(u,l,Vc(b),j)},B.values=_i,B.valuesIn=function(u){return u==null?[]:ca(u,hr(u))},B.without=pr,B.words=Au,B.wrap=function(u,l){return Gs(Vc(l),u)},B.xor=rh,B.xorBy=oh,B.xorWith=fl,B.zip=ep,B.zipObject=function(u,l){return Wc(u||[],l||[],ba)},B.zipObjectDeep=function(u,l){return Wc(u||[],l||[],yu)},B.zipWith=Dr,B.entries=Ml,B.entriesIn=Vs,B.extend=Hi,B.extendWith=bi,no(B,B),B.add=zl,B.attempt=Mu,B.camelCase=kl,B.capitalize=Na,B.ceil=bp,B.clamp=function(u,l,b){return b===v&&(b=l,l=v),b!==v&&(b=(b=dr(b))==b?b:0),l!==v&&(l=(l=dr(l))==l?l:0),di(dr(u),l,b)},B.clone=function(u){return Gr(u,4)},B.cloneDeep=function(u){return Gr(u,5)},B.cloneDeepWith=function(u,l){return Gr(u,5,l=typeof l=="function"?l:v)},B.cloneWith=function(u,l){return Gr(u,4,l=typeof l=="function"?l:v)},B.conformsTo=function(u,l){return l==null||Cc(u,l,Tn(l))},B.deburr=Jo,B.defaultTo=function(u,l){return u==null||u!=u?l:u},B.divide=Cu,B.endsWith=function(u,l,b){u=nn(u),l=kr(l);var j=u.length,N=b=b===v?j:di(Ut(b),0,j);return(b-=l.length)>=0&&u.slice(b,N)==l},B.eq=yo,B.escape=function(u){return(u=nn(u))&&ct.test(u)?u.replace(yt,Rn):u},B.escapeRegExp=function(u){return(u=nn(u))&&bn.test(u)?u.replace(dn,"\\$&"):u},B.every=function(u,l,b){var j=Ft(u)?ns:_f;return b&&ir(u,l,b)&&(l=v),j(u,At(l,3))},B.find=pl,B.findIndex=ll,B.findKey=function(u,l){return ao(u,At(l,3),pt)},B.findLast=dl,B.findLastIndex=Cs,B.findLastKey=function(u,l){return ao(u,At(l,3),mn)},B.floor=Ru,B.forEach=zs,B.forEachRight=hl,B.forIn=function(u,l){return u==null?u:Yt(u,At(l,3),hr)},B.forInRight=function(u,l){return u==null?u:Bn(u,At(l,3),hr)},B.forOwn=function(u,l){return u&&pt(u,At(l,3))},B.forOwnRight=function(u,l){return u&&mn(u,At(l,3))},B.get=Da,B.gt=ch,B.gte=Su,B.has=function(u,l){return u!=null&&Ms(u,l,Of)},B.hasIn=Ys,B.head=Kf,B.identity=Er,B.includes=function(u,l,b,j){u=Nr(u)?u:_i(u),b=b&&!j?Ut(b):0;var N=u.length;return b<0&&(b=Zn(N+b,0)),Xs(u)?b<=N&&u.indexOf(l,b)>-1:!!N&&li(u,l,b)>-1},B.indexOf=function(u,l,b){var j=u==null?0:u.length;if(!j)return-1;var N=b==null?0:Ut(b);return N<0&&(N=Zn(j+N,0)),li(u,l,N)},B.inRange=function(u,l,b){return l=No(l),b===v?(b=l,l=0):b=No(b),function(j,N,U){return j>=lr(N,U)&&j<Zn(N,U)}(u=dr(u),l,b)},B.invoke=dp,B.isArguments=Gi,B.isArray=Ft,B.isArrayBuffer=lh,B.isArrayLike=Nr,B.isArrayLikeObject=wn,B.isBoolean=function(u){return u===!0||u===!1||kn(u)&&Sn(u)==Y},B.isBuffer=wr,B.isDate=bl,B.isElement=function(u){return kn(u)&&u.nodeType===1&&!ka(u)},B.isEmpty=function(u){if(u==null)return!0;if(Nr(u)&&(Ft(u)||typeof u=="string"||typeof u.splice=="function"||wr(u)||Zo(u)||Gi(u)))return!u.length;var l=fr(u);if(l==ae||l==Se)return!u.size;if(ke(u))return!Wo(u).length;for(var b in u)if(et.call(u,b))return!1;return!0},B.isEqual=function(u,l){return Oa(u,l)},B.isEqualWith=function(u,l,b){var j=(b=typeof b=="function"?b:v)?b(u,l):v;return j===v?Oa(u,l,v,b):!!j},B.isError=nr,B.isFinite=function(u){return typeof u=="number"&&ff(u)},B.isFunction=to,B.isInteger=Ma,B.isLength=Hs,B.isMap=_l,B.isMatch=function(u,l){return u===l||hs(u,l,el(l))},B.isMatchWith=function(u,l,b){return b=typeof b=="function"?b:v,hs(u,l,el(l),b)},B.isNaN=function(u){return Ol(u)&&u!=+u},B.isNative=function(u){if(th(u))throw new Wt("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return wa(u)},B.isNil=function(u){return u==null},B.isNull=function(u){return u===null},B.isNumber=Ol,B.isObject=Pn,B.isObjectLike=kn,B.isPlainObject=ka,B.isRegExp=Ta,B.isSafeInteger=function(u){return Ma(u)&&u>=-9007199254740991&&u<=V},B.isSet=ip,B.isString=Xs,B.isSymbol=xr,B.isTypedArray=Zo,B.isUndefined=function(u){return u===v},B.isWeakMap=function(u){return kn(u)&&fr(u)==Ae},B.isWeakSet=function(u){return kn(u)&&Sn(u)=="[object WeakSet]"},B.join=function(u,l){return u==null?"":Mc.call(u,l)},B.kebabCase=yp,B.last=jn,B.lastIndexOf=function(u,l,b){var j=u==null?0:u.length;if(!j)return-1;var N=j;return b!==v&&(N=(N=Ut(b))<0?Zn(j+N,0):lr(N,j-1)),l==l?function(U,ne,le){for(var _e=le+1;_e--;)if(U[_e]===ne)return _e;return _e}(u,l,N):jo(u,Po,N,!0)},B.lowerCase=vp,B.lowerFirst=Tl,B.lt=ap,B.lte=wl,B.max=function(u){return u&&u.length?In(u,Er,Mn):v},B.maxBy=function(u,l){return u&&u.length?In(u,At(l,2),Mn):v},B.mean=function(u){return Zt(u,Er)},B.meanBy=function(u,l){return Zt(u,At(l,2))},B.min=function(u){return u&&u.length?In(u,Er,Vo):v},B.minBy=function(u,l){return u&&u.length?In(u,At(l,2),Vo):v},B.stubArray=Qo,B.stubFalse=Nu,B.stubObject=function(){return{}},B.stubString=function(){return""},B.stubTrue=function(){return!0},B.multiply=_p,B.nth=function(u,l){return u&&u.length?Sf(u,Ut(l)):v},B.noConflict=function(){return An._===this&&(An._=_n),this},B.noop=Du,B.now=Bs,B.pad=function(u,l,b){u=nn(u);var j=(l=Ut(l))?co(u):0;if(!l||j>=l)return u;var N=(l-j)/2;return Ou(da(N),b)+u+Ou(os(N),b)},B.padEnd=function(u,l,b){u=nn(u);var j=(l=Ut(l))?co(u):0;return l&&j<l?u+Ou(l-j,b):u},B.padStart=function(u,l,b){u=nn(u);var j=(l=Ut(l))?co(u):0;return l&&j<l?Ou(l-j,b)+u:u},B.parseInt=function(u,l,b){return b||l==null?l=0:l&&(l=+l),as(nn(u).replace(Dt,""),l||0)},B.random=function(u,l,b){if(b&&typeof b!="boolean"&&ir(u,l,b)&&(l=b=v),b===v&&(typeof l=="boolean"?(b=l,l=v):typeof u=="boolean"&&(b=u,u=v)),u===v&&l===v?(u=0,l=1):(u=No(u),l===v?(l=u,u=0):l=No(l)),u>l){var j=u;u=l,l=j}if(b||u%1||l%1){var N=us();return lr(u+N*(l-u+si("1e-"+((N+"").length-1))),l)}return Fc(u,l)},B.reduce=function(u,l,b){var j=Ft(u)?aa:qn,N=arguments.length<3;return j(u,At(l,4),b,N,On)},B.reduceRight=function(u,l,b){var j=Ft(u)?rs:qn,N=arguments.length<3;return j(u,At(l,4),b,N,bf)},B.repeat=function(u,l,b){return l=(b?ir(u,l,b):l===v)?1:Ut(l),gs(nn(u),l)},B.replace=function(){var u=arguments,l=nn(u[0]);return u.length<3?l:l.replace(u[1],u[2])},B.result=function(u,l,b){var j=-1,N=(l=un(l,u)).length;for(N||(N=1,u=v);++j<N;){var U=u==null?v:u[po(l[j])];U===v&&(j=N,U=b),u=to(U)?U.call(u):U}return u},B.round=Op,B.runInContext=Oe,B.sample=function(u){return(Ft(u)?Dc:Kd)(u)},B.size=function(u){if(u==null)return 0;if(Nr(u))return Xs(u)?co(u):u.length;var l=fr(u);return l==ae||l==Se?u.size:Wo(u).length},B.snakeCase=Dl,B.some=function(u,l,b){var j=Ft(u)?au:qd;return b&&ir(u,l,b)&&(l=v),j(u,At(l,3))},B.sortedIndex=function(u,l){return vu(u,l)},B.sortedIndexBy=function(u,l,b){return Gc(u,l,At(b,2))},B.sortedIndexOf=function(u,l){var b=u==null?0:u.length;if(b){var j=vu(u,l);if(j<b&&yo(u[j],l))return j}return-1},B.sortedLastIndex=function(u,l){return vu(u,l,!0)},B.sortedLastIndexBy=function(u,l,b){return Gc(u,l,At(b,2),!0)},B.sortedLastIndexOf=function(u,l){if(u!=null&&u.length){var b=vu(u,l,!0)-1;if(yo(u[b],l))return b}return-1},B.startCase=fh,B.startsWith=function(u,l,b){return u=nn(u),b=b==null?0:di(Ut(b),0,u.length),l=kr(l),u.slice(b,b+l.length)==l},B.subtract=rr,B.sum=function(u){return u&&u.length?sa(u,Er):0},B.sumBy=function(u,l){return u&&u.length?sa(u,At(l,2)):0},B.template=function(u,l,b){var j=B.templateSettings;b&&ir(u,l,b)&&(l=v),u=nn(u),l=bi({},l,j,Gf);var N,U,ne=bi({},l.imports,j.imports,Gf),le=Tn(ne),_e=ca(ne,le),Ie=0,De=l.interpolate||Et,Ge="__p += '",rt=P((l.escape||Et).source+"|"+De.source+"|"+(De===It?ft:Et).source+"|"+(l.evaluate||Et).source+"|$","g"),dt="//# sourceURL="+(et.call(l,"sourceURL")?(l.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ju+"]")+`
  34. `;u.replace(rt,function(He,jt,it,ce,Rt,$t){return it||(it=ce),Ge+=u.slice(Ie,$t).replace(Nt,Ci),jt&&(N=!0,Ge+=`' +
  35. __e(`+jt+`) +
  36. '`),Rt&&(U=!0,Ge+=`';
  37. `+Rt+`;
  38. __p += '`),it&&(Ge+=`' +
  39. ((__t = (`+it+`)) == null ? '' : __t) +
  40. '`),Ie=$t+He.length,He}),Ge+=`';
  41. `;var xt=et.call(l,"variable")&&l.variable;if(xt){if(Ve.test(xt))throw new Wt("Invalid `variable` option passed into `_.template`")}else Ge=`with (obj) {
  42. `+Ge+`
  43. }
  44. `;Ge=(U?Ge.replace(Le,""):Ge).replace(wt,"$1").replace(kt,"$1;"),Ge="function("+(xt||"obj")+`) {
  45. `+(xt?"":`obj || (obj = {});
  46. `)+"var __t, __p = ''"+(N?", __e = _.escape":"")+(U?`, __j = Array.prototype.join;
  47. function print() { __p += __j.call(arguments, '') }
  48. `:`;
  49. `)+Ge+`return __p
  50. }`;var ze=Mu(function(){return gn(le,dt+"return "+Ge).apply(v,_e)});if(ze.source=Ge,nr(ze))throw ze;return ze},B.times=function(u,l){if((u=Ut(u))<1||u>V)return[];var b=ie,j=lr(u,ie);l=At(l),u-=ie;for(var N=Ni(j,l);++b<u;)l(b);return N},B.toFinite=No,B.toInteger=Ut,B.toLength=sp,B.toLower=function(u){return nn(u).toLowerCase()},B.toNumber=dr,B.toSafeInteger=function(u){return u?di(Ut(u),-9007199254740991,V):u===0?u:0},B.toString=nn,B.toUpper=function(u){return nn(u).toUpperCase()},B.trim=function(u,l,b){if((u=nn(u))&&(b||l===v))return uu(u);if(!u||!(l=kr(l)))return u;var j=Mr(u),N=Mr(l);return fn(j,Br(j,N),su(j,N)+1).join("")},B.trimEnd=function(u,l,b){if((u=nn(u))&&(b||l===v))return u.slice(0,_r(u)+1);if(!u||!(l=kr(l)))return u;var j=Mr(u);return fn(j,0,su(j,Mr(l))+1).join("")},B.trimStart=function(u,l,b){if((u=nn(u))&&(b||l===v))return u.replace(Dt,"");if(!u||!(l=kr(l)))return u;var j=Mr(u);return fn(j,Br(j,Mr(l))).join("")},B.truncate=function(u,l){var b=30,j="...";if(Pn(l)){var N="separator"in l?l.separator:N;b="length"in l?Ut(l.length):b,j="omission"in l?kr(l.omission):j}var U=(u=nn(u)).length;if(so(u)){var ne=Mr(u);U=ne.length}if(b>=U)return u;var le=b-co(j);if(le<1)return j;var _e=ne?fn(ne,0,le).join(""):u.slice(0,le);if(N===v)return _e+j;if(ne&&(le+=_e.length-le),Ta(N)){if(u.slice(le).search(N)){var Ie,De=_e;for(N.global||(N=P(N.source,nn(Gt.exec(N))+"g")),N.lastIndex=0;Ie=N.exec(De);)var Ge=Ie.index;_e=_e.slice(0,Ge===v?le:Ge)}}else if(u.indexOf(kr(N),le)!=le){var rt=_e.lastIndexOf(N);rt>-1&&(_e=_e.slice(0,rt))}return _e+j},B.unescape=function(u){return(u=nn(u))&&Me.test(u)?u.replace(St,Fr):u},B.uniqueId=function(u){var l=++hn;return nn(u)+l},B.upperCase=gp,B.upperFirst=Pu,B.each=zs,B.eachRight=hl,B.first=Kf,no(B,(Iu={},pt(B,function(u,l){et.call(B.prototype,l)||(Iu[l]=u)}),Iu),{chain:!1}),B.VERSION="4.17.21",gr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(u){B[u].placeholder=B}),gr(["drop","take"],function(u,l){Qt.prototype[u]=function(b){b=b===v?1:Zn(Ut(b),0);var j=this.__filtered__&&!l?new Qt(this):this.clone();return j.__filtered__?j.__takeCount__=lr(b,j.__takeCount__):j.__views__.push({size:lr(b,ie),type:u+(j.__dir__<0?"Right":"")}),j},Qt.prototype[u+"Right"]=function(b){return this.reverse()[u](b).reverse()}}),gr(["filter","map","takeWhile"],function(u,l){var b=l+1,j=b==1||b==3;Qt.prototype[u]=function(N){var U=this.clone();return U.__iteratees__.push({iteratee:At(N,3),type:b}),U.__filtered__=U.__filtered__||j,U}}),gr(["head","last"],function(u,l){var b="take"+(l?"Right":"");Qt.prototype[u]=function(){return this[b](1).value()[0]}}),gr(["initial","tail"],function(u,l){var b="drop"+(l?"":"Right");Qt.prototype[u]=function(){return this.__filtered__?new Qt(this):this[b](1)}}),Qt.prototype.compact=function(){return this.filter(Er)},Qt.prototype.find=function(u){return this.filter(u).head()},Qt.prototype.findLast=function(u){return this.reverse().find(u)},Qt.prototype.invokeMap=Vt(function(u,l){return typeof u=="function"?new Qt(this):this.map(function(b){return _a(b,u,l)})}),Qt.prototype.reject=function(u){return this.filter(Us(At(u)))},Qt.prototype.slice=function(u,l){u=Ut(u);var b=this;return b.__filtered__&&(u>0||l<0)?new Qt(b):(u<0?b=b.takeRight(-u):u&&(b=b.drop(u)),l!==v&&(b=(l=Ut(l))<0?b.dropRight(-l):b.take(l-u)),b)},Qt.prototype.takeRightWhile=function(u){return this.reverse().takeWhile(u).reverse()},Qt.prototype.toArray=function(){return this.take(ie)},pt(Qt.prototype,function(u,l){var b=/^(?:filter|find|map|reject)|While$/.test(l),j=/^(?:head|last)$/.test(l),N=B[j?"take"+(l=="last"?"Right":""):l],U=j||/^find/.test(l);N&&(B.prototype[l]=function(){var ne=this.__wrapped__,le=j?[1]:arguments,_e=ne instanceof Qt,Ie=le[0],De=_e||Ft(ne),Ge=function(jt){var it=N.apply(B,Xn([jt],le));return j&&rt?it[0]:it};De&&b&&typeof Ie=="function"&&Ie.length!=1&&(_e=De=!1);var rt=this.__chain__,dt=!!this.__actions__.length,xt=U&&!rt,ze=_e&&!dt;if(!U&&De){ne=ze?ne:new Qt(this);var He=u.apply(ne,le);return He.__actions__.push({func:Ls,args:[Ge],thisArg:v}),new Zr(He,rt)}return xt&&ze?u.apply(this,le):(He=this.thru(Ge),xt?j?He.value()[0]:He.value():He)})}),gr(["pop","push","shift","sort","splice","unshift"],function(u){var l=pe[u],b=/^(?:push|sort|unshift)$/.test(u)?"tap":"thru",j=/^(?:pop|shift)$/.test(u);B.prototype[u]=function(){var N=arguments;if(j&&!this.__chain__){var U=this.value();return l.apply(Ft(U)?U:[],N)}return this[b](function(ne){return l.apply(Ft(ne)?ne:[],N)})}}),pt(Qt.prototype,function(u,l){var b=B[l];if(b){var j=b.name+"";et.call(ga,j)||(ga[j]=[]),ga[j].push({name:l,func:b})}}),ga[xs(v,2).name]=[{name:"wrapper",func:v}],Qt.prototype.clone=function(){var u=new Qt(this.__wrapped__);return u.__actions__=Tr(this.__actions__),u.__dir__=this.__dir__,u.__filtered__=this.__filtered__,u.__iteratees__=Tr(this.__iteratees__),u.__takeCount__=this.__takeCount__,u.__views__=Tr(this.__views__),u},Qt.prototype.reverse=function(){if(this.__filtered__){var u=new Qt(this);u.__dir__=-1,u.__filtered__=!0}else(u=this.clone()).__dir__*=-1;return u},Qt.prototype.value=function(){var u=this.__wrapped__.value(),l=this.__dir__,b=Ft(u),j=l<0,N=b?u.length:0,U=function($t,bt,Mt){for(var Wn=-1,Cr=Mt.length;++Wn<Cr;){var vo=Mt[Wn],Vn=vo.size;switch(vo.type){case"drop":$t+=Vn;break;case"dropRight":bt-=Vn;break;case"take":bt=lr(bt,$t+Vn);break;case"takeRight":$t=Zn($t,bt-Vn)}}return{start:$t,end:bt}}(0,N,this.__views__),ne=U.start,le=U.end,_e=le-ne,Ie=j?le:ne-1,De=this.__iteratees__,Ge=De.length,rt=0,dt=lr(_e,this.__takeCount__);if(!b||!j&&N==_e&&dt==_e)return Xc(u,this.__actions__);var xt=[];e:for(;_e--&&rt<dt;){for(var ze=-1,He=u[Ie+=l];++ze<Ge;){var jt=De[ze],it=jt.iteratee,ce=jt.type,Rt=it(He);if(ce==2)He=Rt;else if(!Rt){if(ce==1)continue e;break e}}xt[rt++]=He}return xt},B.prototype.at=eo,B.prototype.chain=function(){return Fn(this)},B.prototype.commit=function(){return new Zr(this.value(),this.__chain__)},B.prototype.next=function(){this.__values__===v&&(this.__values__=up(this.value()));var u=this.__index__>=this.__values__.length;return{done:u,value:u?v:this.__values__[this.__index__++]}},B.prototype.plant=function(u){for(var l,b=this;b instanceof du;){var j=cl(b);j.__index__=0,j.__values__=v,l?N.__wrapped__=j:l=j;var N=j;b=b.__wrapped__}return N.__wrapped__=u,l},B.prototype.reverse=function(){var u=this.__wrapped__;if(u instanceof Qt){var l=u;return this.__actions__.length&&(l=new Qt(this)),(l=l.reverse()).__actions__.push({func:Ls,args:[Is],thisArg:v}),new Zr(l,this.__chain__)}return this.thru(Is)},B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=function(){return Xc(this.__wrapped__,this.__actions__)},B.prototype.first=B.prototype.head,Go&&(B.prototype[Go]=function(){return this}),B}();An._=lo,(O=function(){return lo}.call(f,o,f,d))===v||(d.exports=O)}).call(this)}).call(this,o(68),o(221)(c))},function(c,f,o){var p=o(7),d=o(34),O=o(33),v=o(87),E=o(62),M=o(174),A=o(28),T=p.TypeError,k=A("toPrimitive");c.exports=function(R,C){if(!O(R)||v(R))return R;var F,W=E(R,k);if(W){if(C===void 0&&(C="default"),F=d(W,R,C),!O(F)||v(F))return F;throw T("Can't convert object to primitive value")}return C===void 0&&(C="number"),M(R,C)}},function(c,f,o){var p=o(108);c.exports=p&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},function(c,f,o){var p=o(36),d=o(18),O=o(91);c.exports=!p&&!d(function(){return Object.defineProperty(O("div"),"a",{get:function(){return 7}}).a!=7})},function(c,f,o){var p=o(35),d=o(135),O=o(50),v=o(38);c.exports=function(E,M){for(var A=d(M),T=v.f,k=O.f,R=0;R<A.length;R++){var C=A[R];p(E,C)||T(E,C,k(M,C))}}},function(c,f,o){var p=o(46),d=o(15),O=o(74),v=o(112),E=o(32),M=d([].concat);c.exports=p("Reflect","ownKeys")||function(A){var T=O.f(E(A)),k=v.f;return k?M(T,k(A)):T}},function(c,f,o){var p=o(15),d=o(35),O=o(41),v=o(137).indexOf,E=o(72),M=p([].push);c.exports=function(A,T){var k,R=O(A),C=0,F=[];for(k in R)!d(E,k)&&d(R,k)&&M(F,k);for(;T.length>C;)d(R,k=T[C++])&&(~v(F,k)||M(F,k));return F}},function(c,f,o){var p=o(41),d=o(75),O=o(45),v=function(E){return function(M,A,T){var k,R=p(M),C=O(R),F=d(T,C);if(E&&A!=A){for(;C>F;)if((k=R[F++])!=k)return!0}else for(;C>F;F++)if((E||F in R)&&R[F]===A)return E||F||0;return!E&&-1}};c.exports={includes:v(!0),indexOf:v(!1)}},function(c,f,o){var p=o(46);c.exports=p("document","documentElement")},function(c,f,o){var p=o(51),d=o(41),O=o(74).f,v=o(114),E=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];c.exports.f=function(M){return E&&p(M)=="Window"?function(A){try{return O(A)}catch(T){return v(E)}}(M):O(d(M))}},function(c,f,o){var p=o(28);f.f=p},function(c,f,o){var p=o(177),d=o(35),O=o(140),v=o(38).f;c.exports=function(E){var M=p.Symbol||(p.Symbol={});d(M,E)||v(M,E,{value:O.f(E)})}},function(c,f,o){var p,d,O,v=o(18),E=o(30),M=o(60),A=o(101),T=o(42),k=o(28),R=o(71),C=k("iterator"),F=!1;[].keys&&("next"in(O=[].keys())?(d=A(A(O)))!==Object.prototype&&(p=d):F=!0),p==null||v(function(){var W={};return p[C].call(W)!==W})?p={}:R&&(p=M(p)),E(p[C])||T(p,C,function(){return this}),c.exports={IteratorPrototype:p,BUGGY_SAFARI_ITERATORS:F}},function(c,f,o){var p=o(18);c.exports=!p(function(){function d(){}return d.prototype.constructor=null,Object.getPrototypeOf(new d)!==d.prototype})},function(c,f,o){var p=o(16),d=o(15),O=o(72),v=o(33),E=o(35),M=o(38).f,A=o(74),T=o(139),k=o(183),R=o(90),C=o(185),F=!1,W=R("meta"),V=0,te=function(re){M(re,W,{value:{objectID:"O"+V++,weakData:{}}})},ie=c.exports={enable:function(){ie.enable=function(){},F=!0;var re=A.f,J=d([].splice),Z={};Z[W]=1,re(Z).length&&(A.f=function(Y){for(var z=re(Y),G=0,H=z.length;G<H;G++)if(z[G]===W){J(z,G,1);break}return z},p({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:T.f}))},fastKey:function(re,J){if(!v(re))return typeof re=="symbol"?re:(typeof re=="string"?"S":"P")+re;if(!E(re,W)){if(!k(re))return"F";if(!J)return"E";te(re)}return re[W].objectID},getWeakData:function(re,J){if(!E(re,W)){if(!k(re))return!0;if(!J)return!1;te(re)}return re[W].weakData},onFreeze:function(re){return C&&F&&k(re)&&!E(re,W)&&te(re),re}};O[W]=!0},function(c,f,o){var p=o(28),d=o(80),O=p("iterator"),v=Array.prototype;c.exports=function(E){return E!==void 0&&(d.Array===E||v[O]===E)}},function(c,f,o){var p=o(7),d=o(34),O=o(56),v=o(32),E=o(88),M=o(118),A=p.TypeError;c.exports=function(T,k){var R=arguments.length<2?M(T):k;if(O(R))return v(d(R,T));throw A(E(T)+" is not iterable")}},function(c,f,o){var p=o(34),d=o(32),O=o(62);c.exports=function(v,E,M){var A,T;d(v);try{if(!(A=O(v,"return"))){if(E==="throw")throw M;return M}A=p(A,v)}catch(k){T=!0,A=k}if(E==="throw")throw M;if(T)throw A;return d(A),M}},function(c,f,o){var p=o(30),d=o(33),O=o(102);c.exports=function(v,E,M){var A,T;return O&&p(A=E.constructor)&&A!==M&&d(T=A.prototype)&&T!==M.prototype&&O(v,T),v}},function(c,f,o){var p=o(42);c.exports=function(d,O,v){for(var E in O)p(d,E,O[E],v);return d}},function(c,f,o){var p=o(46),d=o(38),O=o(28),v=o(36),E=O("species");c.exports=function(M){var A=p(M),T=d.f;v&&A&&!A[E]&&T(A,E,{configurable:!0,get:function(){return this}})}},function(c,f,o){var p=o(15),d=o(59),O=o(39),v=o(44),E=p("".charAt),M=p("".charCodeAt),A=p("".slice),T=function(k){return function(R,C){var F,W,V=O(v(R)),te=d(C),ie=V.length;return te<0||te>=ie?k?"":void 0:(F=M(V,te))<55296||F>56319||te+1===ie||(W=M(V,te+1))<56320||W>57343?k?E(V,te):F:k?A(V,te,te+2):W-56320+(F-55296<<10)+65536}};c.exports={codeAt:T(!1),charAt:T(!0)}},function(c,f){c.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(c,f,o){var p=o(91)("span").classList,d=p&&p.constructor&&p.constructor.prototype;c.exports=d===Object.prototype?void 0:d},function(c,f,o){var p=o(32);c.exports=function(){var d=p(this),O="";return d.global&&(O+="g"),d.ignoreCase&&(O+="i"),d.multiline&&(O+="m"),d.dotAll&&(O+="s"),d.unicode&&(O+="u"),d.sticky&&(O+="y"),O}},function(c,f,o){var p=o(18),d=o(7).RegExp,O=p(function(){var M=d("a","y");return M.lastIndex=2,M.exec("abcd")!=null}),v=O||p(function(){return!d("a","y").sticky}),E=O||p(function(){var M=d("^r","gy");return M.lastIndex=2,M.exec("str")!=null});c.exports={BROKEN_CARET:E,MISSED_STICKY:v,UNSUPPORTED_Y:O}},function(c,f,o){var p=o(16),d=o(79).find,O=o(100),v="find",E=!0;v in[]&&Array(1).find(function(){E=!1}),p({target:"Array",proto:!0,forced:E},{find:function(M){return d(this,M,arguments.length>1?arguments[1]:void 0)}}),O(v)},function(c,f,o){var p=o(16),d=o(137).includes,O=o(100);p({target:"Array",proto:!0},{includes:function(v){return d(this,v,arguments.length>1?arguments[1]:void 0)}}),O("includes")},function(c,f,o){var p=o(16),d=o(15),O=o(197),v=o(44),E=o(39),M=o(198),A=d("".indexOf);p({target:"String",proto:!0,forced:!M("includes")},{includes:function(T){return!!~A(E(v(this)),E(O(T)),arguments.length>1?arguments[1]:void 0)}})},function(c,f,o){var p=o(33),d=o(51),O=o(28)("match");c.exports=function(v){var E;return p(v)&&((E=v[O])!==void 0?!!E:d(v)=="RegExp")}},function(c,f,o){var p=o(15);c.exports=p(1 .valueOf)},function(c,f,o){var p=o(15),d=o(44),O=o(39),v=o(162),E=p("".replace),M="["+v+"]",A=RegExp("^"+M+M+"*"),T=RegExp(M+M+"*$"),k=function(R){return function(C){var F=O(d(C));return 1&R&&(F=E(F,A,"")),2&R&&(F=E(F,T,"")),F}};c.exports={start:k(1),end:k(2),trim:k(3)}},function(c,f){c.exports=`
  51. \v\f\r                 \u2028\u2029\uFEFF`},function(c,f){var o,p,d=c.exports={};function O(){throw new Error("setTimeout has not been defined")}function v(){throw new Error("clearTimeout has not been defined")}function E(V){if(o===setTimeout)return setTimeout(V,0);if((o===O||!o)&&setTimeout)return o=setTimeout,setTimeout(V,0);try{return o(V,0)}catch(te){try{return o.call(null,V,0)}catch(ie){return o.call(this,V,0)}}}(function(){try{o=typeof setTimeout=="function"?setTimeout:O}catch(V){o=O}try{p=typeof clearTimeout=="function"?clearTimeout:v}catch(V){p=v}})();var M,A=[],T=!1,k=-1;function R(){T&&M&&(T=!1,M.length?A=M.concat(A):k=-1,A.length&&C())}function C(){if(!T){var V=E(R);T=!0;for(var te=A.length;te;){for(M=A,A=[];++k<te;)M&&M[k].run();k=-1,te=A.length}M=null,T=!1,function(ie){if(p===clearTimeout)return clearTimeout(ie);if((p===v||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(ie);try{p(ie)}catch(re){try{return p.call(null,ie)}catch(J){return p.call(this,ie)}}}(V)}}function F(V,te){this.fun=V,this.array=te}function W(){}d.nextTick=function(V){var te=new Array(arguments.length-1);if(arguments.length>1)for(var ie=1;ie<arguments.length;ie++)te[ie-1]=arguments[ie];A.push(new F(V,te)),A.length!==1||T||E(C)},F.prototype.run=function(){this.fun.apply(null,this.array)},d.title="browser",d.browser=!0,d.env={},d.argv=[],d.version="",d.versions={},d.on=W,d.addListener=W,d.once=W,d.off=W,d.removeListener=W,d.removeAllListeners=W,d.emit=W,d.prependListener=W,d.prependOnceListener=W,d.listeners=function(V){return[]},d.binding=function(V){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(V){throw new Error("process.chdir is not supported")},d.umask=function(){return 0}},function(c,f,o){var p=o(32),d=o(165),O=o(28)("species");c.exports=function(v,E){var M,A=p(v).constructor;return A===void 0||(M=p(A)[O])==null?E:d(M)}},function(c,f,o){var p=o(7),d=o(99),O=o(88),v=p.TypeError;c.exports=function(E){if(d(E))return E;throw v(O(E)+" is not a constructor")}},function(c,f,o){var p=o(16),d=o(161).trim;p({target:"String",proto:!0,forced:o(200)("trim")},{trim:function(){return d(this)}})},function(c,f,o){var p=o(34),d=o(123),O=o(32),v=o(94),E=o(39),M=o(44),A=o(62),T=o(124),k=o(125);d("match",function(R,C,F){return[function(W){var V=M(this),te=W==null?void 0:A(W,R);return te?p(te,W,V):new RegExp(W)[R](E(V))},function(W){var V=O(this),te=E(W),ie=F(C,V,te);if(ie.done)return ie.value;if(!V.global)return k(V,te);var re=V.unicode;V.lastIndex=0;for(var J,Z=[],Y=0;(J=k(V,te))!==null;){var z=E(J[0]);Z[Y]=z,z===""&&(V.lastIndex=T(te,v(V.lastIndex),re)),Y++}return Y===0?null:Z}]})},function(c,f,o){var p,d,O,v,E=o(7),M=o(76),A=o(64),T=o(30),k=o(35),R=o(18),C=o(138),F=o(98),W=o(91),V=o(169),te=o(128),ie=E.setImmediate,re=E.clearImmediate,J=E.process,Z=E.Dispatch,Y=E.Function,z=E.MessageChannel,G=E.String,H=0,$={},ae="onreadystatechange";try{p=E.location}catch(Se){}var xe=function(Se){if(k($,Se)){var ye=$[Se];delete $[Se],ye()}},me=function(Se){return function(){xe(Se)}},Pe=function(Se){xe(Se.data)},Be=function(Se){E.postMessage(G(Se),p.protocol+"//"+p.host)};ie&&re||(ie=function(Se){var ye=F(arguments,1);return $[++H]=function(){M(T(Se)?Se:Y(Se),void 0,ye)},d(H),H},re=function(Se){delete $[Se]},te?d=function(Se){J.nextTick(me(Se))}:Z&&Z.now?d=function(Se){Z.now(me(Se))}:z&&!V?(v=(O=new z).port2,O.port1.onmessage=Pe,d=A(v.postMessage,v)):E.addEventListener&&T(E.postMessage)&&!E.importScripts&&p&&p.protocol!=="file:"&&!R(Be)?(d=Be,E.addEventListener("message",Pe,!1)):d=ae in W("script")?function(Se){C.appendChild(W("script")).onreadystatechange=function(){C.removeChild(this),xe(Se)}}:function(Se){setTimeout(me(Se),0)}),c.exports={set:ie,clear:re}},function(c,f,o){var p=o(55);c.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(p)},function(c,f,o){var p=o(56),d=function(O){var v,E;this.promise=new O(function(M,A){if(v!==void 0||E!==void 0)throw TypeError("Bad Promise constructor");v=M,E=A}),this.resolve=p(v),this.reject=p(E)};c.exports.f=function(O){return new d(O)}},function(c,f,o){f.a=function(){return!1}},function(c,f,o){(function(p){o.d(f,"a",function(){return J});var d=o(1);function O(z){throw new Error("[mobx-utils] "+z)}function v(z,G){G===void 0&&(G="Illegal state"),z||O(G)}var E=function(z){return z&&z!==Object.prototype&&Object.getOwnPropertyNames(z).concat(E(Object.getPrototypeOf(z))||[])},M=function(z){return function(G){var H=E(G);return H.filter(function($,ae){return H.indexOf($)===ae})}(z).filter(function(G){return G!=="constructor"&&!~G.indexOf("__")})},A="pending",T="fulfilled",k="rejected";function R(z){switch(this.state){case A:return z.pending&&z.pending(this.value);case k:return z.rejected&&z.rejected(this.value);case T:return z.fulfilled?z.fulfilled(this.value):this.value}}function C(z,G){if(v(arguments.length<=2,"fromPromise expects up to two arguments"),v(typeof z=="function"||typeof z=="object"&&z&&typeof z.then=="function","Please pass a promise or function to fromPromise"),z.isPromiseBasedObservable===!0)return z;typeof z=="function"&&(z=new Promise(z));var H=z;z.then(Object(d.k)("observableFromPromise-resolve",function(ae){H.value=ae,H.state=T}),Object(d.k)("observableFromPromise-reject",function(ae){H.value=ae,H.state=k})),H.isPromiseBasedObservable=!0,H.case=R;var $=G&&G.state===T?G.value:void 0;return Object(d.q)(H,{value:$,state:A},{},{deep:!1}),H}(function(z){z.reject=Object(d.k)("fromPromise.reject",function(G){var H=z(Promise.reject(G));return H.state=k,H.value=G,H}),z.resolve=Object(d.k)("fromPromise.resolve",function(G){G===void 0&&(G=void 0);var H=z(Promise.resolve(G));return H.state=T,H.value=G,H})})(C||(C={}));var F=function(z,G,H,$){var ae,xe=arguments.length,me=xe<3?G:$===null?$=Object.getOwnPropertyDescriptor(G,H):$;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")me=Reflect.decorate(z,G,H,$);else for(var Pe=z.length-1;Pe>=0;Pe--)(ae=z[Pe])&&(me=(xe<3?ae(me):xe>3?ae(G,H,me):ae(G,H))||me);return xe>3&&me&&Object.defineProperty(G,H,me),me};(function(){function z(G,H){var $=this;Object(d.G)(function(){$.current=H,$.subscription=G.subscribe($)})}z.prototype.dispose=function(){this.subscription&&this.subscription.unsubscribe()},z.prototype.next=function(G){this.current=G},z.prototype.complete=function(){this.dispose()},z.prototype.error=function(G){this.current=G,this.dispose()},F([d.C.ref],z.prototype,"current",void 0),F([d.k.bound],z.prototype,"next",null),F([d.k.bound],z.prototype,"complete",null),F([d.k.bound],z.prototype,"error",null)})();var W=function(){return W=Object.assign||function(z){for(var G,H=1,$=arguments.length;H<$;H++)for(var ae in G=arguments[H])Object.prototype.hasOwnProperty.call(G,ae)&&(z[ae]=G[ae]);return z},W.apply(this,arguments)},V=function(z,G,H,$){var ae,xe=arguments.length,me=xe<3?G:$===null?$=Object.getOwnPropertyDescriptor(G,H):$;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")me=Reflect.decorate(z,G,H,$);else for(var Pe=z.length-1;Pe>=0;Pe--)(ae=z[Pe])&&(me=(xe<3?ae(me):xe>3?ae(G,H,me):ae(G,H))||me);return xe>3&&me&&Object.defineProperty(G,H,me),me},te=["model","reset","submit","isDirty","isPropertyDirty","resetProperty"];(function(){function z(G){var H=this;this.model=G,this.localValues=d.C.map({}),this.localComputedValues=d.C.map({}),this.isPropertyDirty=function($){return H.localValues.has($)},v(Object(d.A)(G),"createViewModel expects an observable object"),M(G).forEach(function($){if($!==d.a&&$!=="__mobxDidRunLazyInitializers"){if(v(te.indexOf($)===-1,"The propertyname "+$+" is reserved and cannot be used with viewModels"),Object(d.w)(G,$)){var ae=Object(d.h)(G,$).derivation;H.localComputedValues.set($,Object(d.m)(ae.bind(H)))}var xe=Object.getOwnPropertyDescriptor(G,$),me=xe?{enumerable:xe.enumerable}:{};Object.defineProperty(H,$,W(W({},me),{configurable:!0,get:function(){return Object(d.w)(G,$)?H.localComputedValues.get($).get():H.isPropertyDirty($)?H.localValues.get($):H.model[$]},set:Object(d.k)(function(Pe){Pe!==H.model[$]?H.localValues.set($,Pe):H.localValues.delete($)})}))}})}Object.defineProperty(z.prototype,"isDirty",{get:function(){return this.localValues.size>0},enumerable:!1,configurable:!0}),Object.defineProperty(z.prototype,"changedValues",{get:function(){return this.localValues.toJS()},enumerable:!1,configurable:!0}),z.prototype.submit=function(){var G=this;Object(d.B)(this.localValues).forEach(function(H){var $=G.localValues.get(H),ae=G.model[H];Object(d.y)(ae)?ae.replace($):Object(d.z)(ae)?(ae.clear(),ae.merge($)):Object(d.v)($)||(G.model[H]=$)}),this.localValues.clear()},z.prototype.reset=function(){this.localValues.clear()},z.prototype.resetProperty=function(G){this.localValues.delete(G)},V([d.m],z.prototype,"isDirty",null),V([d.m],z.prototype,"changedValues",null),V([d.k.bound],z.prototype,"submit",null),V([d.k.bound],z.prototype,"reset",null),V([d.k.bound],z.prototype,"resetProperty",null)})();function ie(z){if(!z)return"ROOT";for(var G=[];z.parent;)G.push(z.path),z=z.parent;return G.reverse().join("/")}function re(z){return Object(d.A)(z)||Object(d.y)(z)||Object(d.z)(z)}function J(z,G){var H=new WeakMap;function $(me){var Pe=H.get(me.object);(function(Be,Se){switch(Be.type){case"add":ae(Be.newValue,Se,Be.name);break;case"update":xe(Be.oldValue),ae(Be.newValue,Se,Be.name||""+Be.index);break;case"remove":case"delete":xe(Be.oldValue);break;case"splice":Be.removed.map(xe),Be.added.forEach(function(Ae,Ue){return ae(Ae,Se,""+(Be.index+Ue))});for(var ye=Be.index+Be.addedCount;ye<Be.object.length;ye++)if(re(Be.object[ye])){var je=H.get(Be.object[ye]);je&&(je.path=""+ye)}}})(me,Pe),G(me,ie(Pe),z)}function ae(me,Pe,Be){if(re(me)){var Se=H.get(me);if(Se){if(Se.parent!==Pe||Se.path!==Be)throw new Error("The same observable object cannot appear twice in the same tree, trying to assign it to '"+ie(Pe)+"/"+Be+"', but it already exists at '"+ie(Se.parent)+"/"+Se.path+"'")}else{var ye={parent:Pe,path:Be,dispose:Object(d.D)(me,$)};H.set(me,ye),Object(d.p)(me).forEach(function(je){var Ae=je[0];return ae(je[1],ye,Ae)})}}}function xe(me){if(re(me)){var Pe=H.get(me);if(!Pe)return;H.delete(me),Pe.dispose(),Object(d.L)(me).forEach(xe)}}return ae(z,void 0,""),function(){xe(z)}}var Z,Y=(Z=function(z,G){return Z=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(H,$){H.__proto__=$}||function(H,$){for(var ae in $)$.hasOwnProperty(ae)&&(H[ae]=$[ae])},Z(z,G)},function(z,G){function H(){this.constructor=z}Z(z,G),z.prototype=G===null?Object.create(G):(H.prototype=G.prototype,new H)});(function(z){function G(H,$,ae){var xe=ae===void 0?{}:ae,me=xe.name,Pe=me===void 0?"ogm"+(1e3*Math.random()|0):me,Be=xe.keyToName,Se=Be===void 0?function(Ae){return""+Ae}:Be,ye=z.call(this)||this;ye._keyToName=Se,ye._groupBy=$,ye._ogmInfoKey=Symbol("ogmInfo"+Pe),ye._base=H;for(var je=0;je<H.length;je++)ye._addItem(H[je]);return ye._disposeBaseObserver=Object(d.D)(ye._base,function(Ae){if(Ae.type==="splice")Object(d.J)(function(){for(var Ue=0,nt=Ae.removed;Ue<nt.length;Ue++){var Ot=nt[Ue];ye._removeItem(Ot)}for(var We=0,Ze=Ae.added;We<Ze.length;We++){var vt=Ze[We];ye._addItem(vt)}});else{if(Ae.type!=="update")throw new Error("illegal state");Object(d.J)(function(){ye._removeItem(Ae.oldValue),ye._addItem(Ae.newValue)})}}),ye}Y(G,z),G.prototype.clear=function(){throw new Error("not supported")},G.prototype.delete=function(H){throw new Error("not supported")},G.prototype.set=function(H,$){throw new Error("not supported")},G.prototype.dispose=function(){this._disposeBaseObserver();for(var H=0;H<this._base.length;H++){var $=this._base[H];$[this._ogmInfoKey].reaction(),delete $[this._ogmInfoKey]}},G.prototype._getGroupArr=function(H){var $=z.prototype.get.call(this,H);return $===void 0&&($=Object(d.C)([],{name:"GroupArray["+this._keyToName(H)+"]",deep:!1}),z.prototype.set.call(this,H,$)),$},G.prototype._removeFromGroupArr=function(H,$){var ae=z.prototype.get.call(this,H);ae.length===1?z.prototype.delete.call(this,H):($===ae.length-1||(ae[$]=ae[ae.length-1],ae[$][this._ogmInfoKey].groupArrIndex=$),ae.length--)},G.prototype._addItem=function(H){var $=this,ae=this._groupBy(H),xe=this._getGroupArr(ae),me={groupByValue:ae,groupArrIndex:xe.length,reaction:Object(d.F)(function(){return $._groupBy(H)},function(Pe,Be){var Se=H[$._ogmInfoKey];$._removeFromGroupArr(Se.groupByValue,Se.groupArrIndex);var ye=$._getGroupArr(Pe),je=ye.length;ye.push(H),Se.groupByValue=Pe,Se.groupArrIndex=je})};Object.defineProperty(H,this._ogmInfoKey,{configurable:!0,enumerable:!1,value:me}),xe.push(H)},G.prototype._removeItem=function(H){var $=H[this._ogmInfoKey];this._removeFromGroupArr($.groupByValue,$.groupArrIndex),$.reaction(),delete H[this._ogmInfoKey]}})(d.b),function(){function z(G,H){this.base=G,this.args=H,this.closestIdx=0,this.isDisposed=!1;for(var $=this.closest=this.root=G,ae=0;ae<this.args.length-1&&($=$.get(H[ae]));ae++)this.closest=$;this.closestIdx=ae}return z.prototype.exists=function(){this.assertNotDisposed();var G=this.args.length;return this.closestIdx>=G-1&&this.closest.has(this.args[G-1])},z.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])},z.prototype.set=function(G){this.assertNotDisposed();for(var H=this.args.length,$=this.closest,ae=this.closestIdx;ae<H-1;ae++){var xe=new Map;$.set(this.args[ae],xe),$=xe}this.closestIdx=H-1,this.closest=$,$.set(this.args[H-1],G)},z.prototype.delete=function(){if(this.assertNotDisposed(),!this.exists())throw new Error("Entry doesn't exist");var G=this.args.length;this.closest.delete(this.args[G-1]);for(var H=this.root,$=[H],ae=0;ae<G-1;ae++)H=H.get(this.args[ae]),$.push(H);for(ae=$.length-1;ae>0;ae--)$[ae].size===0&&$[ae-1].delete(this.args[ae-1]);this.isDisposed=!0},z.prototype.assertNotDisposed=function(){if(this.isDisposed)throw new Error("Concurrent modification exception")},z}(),Promise.resolve(),typeof queueMicrotask!="undefined"||p!==void 0&&p.nextTick}).call(this,o(163))},function(c,f,o){var p;(function(d,O,v){if(d){for(var E,M={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"},A={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},T={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},k={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},R=1;R<20;++R)M[111+R]="f"+R;for(R=0;R<=9;++R)M[R+96]=R.toString();re.prototype.bind=function(J,Z,Y){var z=this;return J=J instanceof Array?J:[J],z._bindMultiple.call(z,J,Z,Y),z},re.prototype.unbind=function(J,Z){return this.bind.call(this,J,function(){},Z)},re.prototype.trigger=function(J,Z){var Y=this;return Y._directMap[J+":"+Z]&&Y._directMap[J+":"+Z]({},J),Y},re.prototype.reset=function(){var J=this;return J._callbacks={},J._directMap={},J},re.prototype.stopCallback=function(J,Z){if((" "+Z.className+" ").indexOf(" mousetrap ")>-1||ie(Z,this.target))return!1;if("composedPath"in J&&typeof J.composedPath=="function"){var Y=J.composedPath()[0];Y!==J.target&&(Z=Y)}return Z.tagName=="INPUT"||Z.tagName=="SELECT"||Z.tagName=="TEXTAREA"||Z.isContentEditable},re.prototype.handleKey=function(){var J=this;return J._handleKey.apply(J,arguments)},re.addKeycodes=function(J){for(var Z in J)J.hasOwnProperty(Z)&&(M[Z]=J[Z]);E=null},re.init=function(){var J=re(O);for(var Z in J)Z.charAt(0)!=="_"&&(re[Z]=function(Y){return function(){return J[Y].apply(J,arguments)}}(Z))},re.init(),d.Mousetrap=re,c.exports&&(c.exports=re),(p=function(){return re}.call(f,o,f,c))===void 0||(c.exports=p)}function C(J,Z,Y){J.addEventListener?J.addEventListener(Z,Y,!1):J.attachEvent("on"+Z,Y)}function F(J){if(J.type=="keypress"){var Z=String.fromCharCode(J.which);return J.shiftKey||(Z=Z.toLowerCase()),Z}return M[J.which]?M[J.which]:A[J.which]?A[J.which]:String.fromCharCode(J.which).toLowerCase()}function W(J){return J=="shift"||J=="ctrl"||J=="alt"||J=="meta"}function V(J,Z,Y){return Y||(Y=function(){if(!E)for(var z in E={},M)z>95&&z<112||M.hasOwnProperty(z)&&(E[M[z]]=z);return E}()[J]?"keydown":"keypress"),Y=="keypress"&&Z.length&&(Y="keydown"),Y}function te(J,Z){var Y,z,G,H=[];for(Y=function($){return $==="+"?["+"]:($=$.replace(/\+{2}/g,"+plus")).split("+")}(J),G=0;G<Y.length;++G)z=Y[G],k[z]&&(z=k[z]),Z&&Z!="keypress"&&T[z]&&(z=T[z],H.push("shift")),W(z)&&H.push(z);return{key:z,modifiers:H,action:Z=V(z,H,Z)}}function ie(J,Z){return J!==null&&J!==O&&(J===Z||ie(J.parentNode,Z))}function re(J){var Z=this;if(J=J||O,!(Z instanceof re))return new re(J);Z.target=J,Z._callbacks={},Z._directMap={};var Y,z={},G=!1,H=!1,$=!1;function ae(ye){ye=ye||{};var je,Ae=!1;for(je in z)ye[je]?Ae=!0:z[je]=0;Ae||($=!1)}function xe(ye,je,Ae,Ue,nt,Ot){var We,Ze,vt,se,ue=[],he=Ae.type;if(!Z._callbacks[ye])return[];for(he=="keyup"&&W(ye)&&(je=[ye]),We=0;We<Z._callbacks[ye].length;++We)if(Ze=Z._callbacks[ye][We],(Ue||!Ze.seq||z[Ze.seq]==Ze.level)&&he==Ze.action&&(he=="keypress"&&!Ae.metaKey&&!Ae.ctrlKey||(vt=je,se=Ze.modifiers,vt.sort().join(",")===se.sort().join(",")))){var Te=!Ue&&Ze.combo==nt,Xe=Ue&&Ze.seq==Ue&&Ze.level==Ot;(Te||Xe)&&Z._callbacks[ye].splice(We,1),ue.push(Ze)}return ue}function me(ye,je,Ae,Ue){Z.stopCallback(je,je.target||je.srcElement,Ae,Ue)||ye(je,Ae)===!1&&(function(nt){nt.preventDefault?nt.preventDefault():nt.returnValue=!1}(je),function(nt){nt.stopPropagation?nt.stopPropagation():nt.cancelBubble=!0}(je))}function Pe(ye){typeof ye.which!="number"&&(ye.which=ye.keyCode);var je=F(ye);je&&(ye.type!="keyup"||G!==je?Z.handleKey(je,function(Ae){var Ue=[];return Ae.shiftKey&&Ue.push("shift"),Ae.altKey&&Ue.push("alt"),Ae.ctrlKey&&Ue.push("ctrl"),Ae.metaKey&&Ue.push("meta"),Ue}(ye),ye):G=!1)}function Be(ye,je,Ae,Ue){function nt(vt){return function(){$=vt,++z[ye],clearTimeout(Y),Y=setTimeout(ae,1e3)}}function Ot(vt){me(Ae,vt,ye),Ue!=="keyup"&&(G=F(vt)),setTimeout(ae,10)}z[ye]=0;for(var We=0;We<je.length;++We){var Ze=We+1===je.length?Ot:nt(Ue||te(je[We+1]).action);Se(je[We],Ze,Ue,ye,We)}}function Se(ye,je,Ae,Ue,nt){Z._directMap[ye+":"+Ae]=je;var Ot,We=(ye=ye.replace(/\s+/g," ")).split(" ");We.length>1?Be(ye,We,je,Ae):(Ot=te(ye,Ae),Z._callbacks[Ot.key]=Z._callbacks[Ot.key]||[],xe(Ot.key,Ot.modifiers,{type:Ot.action},Ue,ye,nt),Z._callbacks[Ot.key][Ue?"unshift":"push"]({callback:je,modifiers:Ot.modifiers,action:Ot.action,seq:Ue,level:nt,combo:ye}))}Z._handleKey=function(ye,je,Ae){var Ue,nt=xe(ye,je,Ae),Ot={},We=0,Ze=!1;for(Ue=0;Ue<nt.length;++Ue)nt[Ue].seq&&(We=Math.max(We,nt[Ue].level));for(Ue=0;Ue<nt.length;++Ue)if(nt[Ue].seq){if(nt[Ue].level!=We)continue;Ze=!0,Ot[nt[Ue].seq]=1,me(nt[Ue].callback,Ae,nt[Ue].combo,nt[Ue].seq)}else Ze||me(nt[Ue].callback,Ae,nt[Ue].combo);var vt=Ae.type=="keypress"&&H;Ae.type!=$||W(ye)||vt||ae(Ot),H=Ze&&Ae.type=="keydown"},Z._bindMultiple=function(ye,je,Ae){for(var Ue=0;Ue<ye.length;++Ue)Se(ye[Ue],je,Ae)},C(J,"keypress",Pe),C(J,"keydown",Pe),C(J,"keyup",Pe)}})(typeof window!="undefined"?window:null,typeof window!="undefined"?document:null)},function(c,f,o){var p=o(7),d=o(34),O=o(30),v=o(33),E=p.TypeError;c.exports=function(M,A){var T,k;if(A==="string"&&O(T=M.toString)&&!v(k=d(T,M))||O(T=M.valueOf)&&!v(k=d(T,M))||A!=="string"&&O(T=M.toString)&&!v(k=d(T,M)))return k;throw E("Can't convert object to primitive value")}},function(c,f,o){var p=o(7),d=o(30),O=o(92),v=p.WeakMap;c.exports=d(v)&&/native code/.test(O(v))},function(c,f,o){var p=o(36),d=o(38),O=o(32),v=o(41),E=o(77);c.exports=p?Object.defineProperties:function(M,A){O(M);for(var T,k=v(A),R=E(A),C=R.length,F=0;C>F;)d.f(M,T=R[F++],k[T]);return M}},function(c,f,o){var p=o(7);c.exports=p},function(c,f,o){var p=o(7),d=o(96),O=o(99),v=o(33),E=o(28)("species"),M=p.Array;c.exports=function(A){var T;return d(A)&&(T=A.constructor,(O(T)&&(T===M||d(T.prototype))||v(T)&&(T=T[E])===null)&&(T=void 0)),T===void 0?M:T}},function(c,f,o){var p=o(113),d=o(97);c.exports=p?{}.toString:function(){return"[object "+d(this)+"]"}},function(c,f,o){var p=o(142).IteratorPrototype,d=o(60),O=o(69),v=o(78),E=o(80),M=function(){return this};c.exports=function(A,T,k,R){var C=T+" Iterator";return A.prototype=d(p,{next:O(+!R,k)}),v(A,C,!1,!0),E[C]=M,A}},function(c,f,o){var p=o(7),d=o(30),O=p.String,v=p.TypeError;c.exports=function(E){if(typeof E=="object"||d(E))return E;throw v("Can't set "+O(E)+" as a prototype")}},function(c,f,o){var p=o(16),d=o(7),O=o(15),v=o(95),E=o(42),M=o(144),A=o(117),T=o(119),k=o(30),R=o(33),C=o(18),F=o(120),W=o(78),V=o(148);c.exports=function(te,ie,re){var J=te.indexOf("Map")!==-1,Z=te.indexOf("Weak")!==-1,Y=J?"set":"add",z=d[te],G=z&&z.prototype,H=z,$={},ae=function(ye){var je=O(G[ye]);E(G,ye,ye=="add"?function(Ae){return je(this,Ae===0?0:Ae),this}:ye=="delete"?function(Ae){return!(Z&&!R(Ae))&&je(this,Ae===0?0:Ae)}:ye=="get"?function(Ae){return Z&&!R(Ae)?void 0:je(this,Ae===0?0:Ae)}:ye=="has"?function(Ae){return!(Z&&!R(Ae))&&je(this,Ae===0?0:Ae)}:function(Ae,Ue){return je(this,Ae===0?0:Ae,Ue),this})};if(v(te,!k(z)||!(Z||G.forEach&&!C(function(){new z().entries().next()}))))H=re.getConstructor(ie,te,J,Y),M.enable();else if(v(te,!0)){var xe=new H,me=xe[Y](Z?{}:-0,1)!=xe,Pe=C(function(){xe.has(1)}),Be=F(function(ye){new z(ye)}),Se=!Z&&C(function(){for(var ye=new z,je=5;je--;)ye[Y](je,je);return!ye.has(-0)});Be||((H=ie(function(ye,je){T(ye,G);var Ae=V(new z,ye,H);return je!=null&&A(je,Ae[Y],{that:Ae,AS_ENTRIES:J}),Ae})).prototype=G,G.constructor=H),(Pe||Se)&&(ae("delete"),ae("has"),J&&ae("get")),(Se||me)&&ae(Y),Z&&G.clear&&delete G.clear}return $[te]=H,p({global:!0,forced:H!=z},$),W(H,te),Z||re.setStrong(H,te,J),H}},function(c,f,o){var p=o(18),d=o(33),O=o(51),v=o(184),E=Object.isExtensible,M=p(function(){});c.exports=M||v?function(A){return!!d(A)&&(!v||O(A)!="ArrayBuffer")&&(!E||E(A))}:E},function(c,f,o){var p=o(18);c.exports=p(function(){if(typeof ArrayBuffer=="function"){var d=new ArrayBuffer(8);Object.isExtensible(d)&&Object.defineProperty(d,"a",{value:8})}})},function(c,f,o){var p=o(18);c.exports=!p(function(){return Object.isExtensible(Object.preventExtensions({}))})},function(c,f,o){var p=o(38).f,d=o(60),O=o(149),v=o(64),E=o(119),M=o(117),A=o(116),T=o(150),k=o(36),R=o(144).fastKey,C=o(58),F=C.set,W=C.getterFor;c.exports={getConstructor:function(V,te,ie,re){var J=V(function(H,$){E(H,Z),F(H,{type:te,index:d(null),first:void 0,last:void 0,size:0}),k||(H.size=0),$!=null&&M($,H[re],{that:H,AS_ENTRIES:ie})}),Z=J.prototype,Y=W(te),z=function(H,$,ae){var xe,me,Pe=Y(H),Be=G(H,$);return Be?Be.value=ae:(Pe.last=Be={index:me=R($,!0),key:$,value:ae,previous:xe=Pe.last,next:void 0,removed:!1},Pe.first||(Pe.first=Be),xe&&(xe.next=Be),k?Pe.size++:H.size++,me!=="F"&&(Pe.index[me]=Be)),H},G=function(H,$){var ae,xe=Y(H),me=R($);if(me!=="F")return xe.index[me];for(ae=xe.first;ae;ae=ae.next)if(ae.key==$)return ae};return O(Z,{clear:function(){for(var H=Y(this),$=H.index,ae=H.first;ae;)ae.removed=!0,ae.previous&&(ae.previous=ae.previous.next=void 0),delete $[ae.index],ae=ae.next;H.first=H.last=void 0,k?H.size=0:this.size=0},delete:function(H){var $=this,ae=Y($),xe=G($,H);if(xe){var me=xe.next,Pe=xe.previous;delete ae.index[xe.index],xe.removed=!0,Pe&&(Pe.next=me),me&&(me.previous=Pe),ae.first==xe&&(ae.first=me),ae.last==xe&&(ae.last=Pe),k?ae.size--:$.size--}return!!xe},forEach:function(H){for(var $,ae=Y(this),xe=v(H,arguments.length>1?arguments[1]:void 0);$=$?$.next:ae.first;)for(xe($.value,$.key,this);$&&$.removed;)$=$.previous},has:function(H){return!!G(this,H)}}),O(Z,ie?{get:function(H){var $=G(this,H);return $&&$.value},set:function(H,$){return z(this,H===0?0:H,$)}}:{add:function(H){return z(this,H=H===0?0:H,H)}}),k&&p(Z,"size",{get:function(){return Y(this).size}}),J},setStrong:function(V,te,ie){var re=te+" Iterator",J=W(te),Z=W(re);A(V,te,function(Y,z){F(this,{type:re,target:Y,state:J(Y),kind:z,last:void 0})},function(){for(var Y=Z(this),z=Y.kind,G=Y.last;G&&G.removed;)G=G.previous;return Y.target&&(Y.last=G=G?G.next:Y.state.first)?z=="keys"?{value:G.key,done:!1}:z=="values"?{value:G.value,done:!1}:{value:[G.key,G.value],done:!1}:(Y.target=void 0,{value:void 0,done:!0})},ie?"entries":"values",!ie,!0),T(te)}}},function(c,f,o){var p=o(79).forEach,d=o(121)("forEach");c.exports=d?[].forEach:function(O){return p(this,O,arguments.length>1?arguments[1]:void 0)}},function(c,f,o){var p=o(7),d=o(64),O=o(34),v=o(40),E=o(189),M=o(145),A=o(99),T=o(45),k=o(63),R=o(146),C=o(118),F=p.Array;c.exports=function(W){var V=v(W),te=A(this),ie=arguments.length,re=ie>1?arguments[1]:void 0,J=re!==void 0;J&&(re=d(re,ie>2?arguments[2]:void 0));var Z,Y,z,G,H,$,ae=C(V),xe=0;if(!ae||this==F&&M(ae))for(Z=T(V),Y=te?new this(Z):F(Z);Z>xe;xe++)$=J?re(V[xe],xe):V[xe],k(Y,xe,$);else for(H=(G=R(V,ae)).next,Y=te?new this:[];!(z=O(H,G)).done;xe++)$=J?E(G,re,[z.value,xe],!0):z.value,k(Y,xe,$);return Y.length=xe,Y}},function(c,f,o){var p=o(32),d=o(147);c.exports=function(O,v,E,M){try{return M?v(p(E)[0],E[1]):v(E)}catch(A){d(O,"throw",A)}}},function(c,f,o){var p=o(18),d=o(7).RegExp;c.exports=p(function(){var O=d(".","s");return!(O.dotAll&&O.exec(`
  52. `)&&O.flags==="s")})},function(c,f,o){var p=o(18),d=o(7).RegExp;c.exports=p(function(){var O=d("(?<a>b)","g");return O.exec("b").groups.a!=="b"||"b".replace(O,"$<a>c")!=="bc"})},function(c,f,o){var p=o(16),d=o(15),O=o(56),v=o(40),E=o(45),M=o(39),A=o(18),T=o(193),k=o(121),R=o(194),C=o(195),F=o(70),W=o(196),V=[],te=d(V.sort),ie=d(V.push),re=A(function(){V.sort(void 0)}),J=A(function(){V.sort(null)}),Z=k("sort"),Y=!A(function(){if(F)return F<70;if(!(R&&R>3)){if(C)return!0;if(W)return W<603;var z,G,H,$,ae="";for(z=65;z<76;z++){switch(G=String.fromCharCode(z),z){case 66:case 69:case 70:case 72:H=3;break;case 68:case 71:H=4;break;default:H=2}for($=0;$<47;$++)V.push({k:G+$,v:H})}for(V.sort(function(xe,me){return me.v-xe.v}),$=0;$<V.length;$++)G=V[$].k.charAt(0),ae.charAt(ae.length-1)!==G&&(ae+=G);return ae!=="DGBEFHACIJK"}});p({target:"Array",proto:!0,forced:re||!J||!Z||!Y},{sort:function(z){z!==void 0&&O(z);var G=v(this);if(Y)return z===void 0?te(G):te(G,z);var H,$,ae=[],xe=E(G);for($=0;$<xe;$++)$ in G&&ie(ae,G[$]);for(T(ae,function(me){return function(Pe,Be){return Be===void 0?-1:Pe===void 0?1:me!==void 0?+me(Pe,Be)||0:M(Pe)>M(Be)?1:-1}}(z)),H=ae.length,$=0;$<H;)G[$]=ae[$++];for(;$<xe;)delete G[$++];return G}})},function(c,f,o){var p=o(114),d=Math.floor,O=function(M,A){var T=M.length,k=d(T/2);return T<8?v(M,A):E(M,O(p(M,0,k),A),O(p(M,k),A),A)},v=function(M,A){for(var T,k,R=M.length,C=1;C<R;){for(k=C,T=M[C];k&&A(M[k-1],T)>0;)M[k]=M[--k];k!==C++&&(M[k]=T)}return M},E=function(M,A,T,k){for(var R=A.length,C=T.length,F=0,W=0;F<R||W<C;)M[F+W]=F<R&&W<C?k(A[F],T[W])<=0?A[F++]:T[W++]:F<R?A[F++]:T[W++];return M};c.exports=O},function(c,f,o){var p=o(55).match(/firefox\/(\d+)/i);c.exports=!!p&&+p[1]},function(c,f,o){var p=o(55);c.exports=/MSIE|Trident/.test(p)},function(c,f,o){var p=o(55).match(/AppleWebKit\/(\d+)\./);c.exports=!!p&&+p[1]},function(c,f,o){var p=o(7),d=o(159),O=p.TypeError;c.exports=function(v){if(d(v))throw O("The method doesn't accept regular expressions");return v}},function(c,f,o){var p=o(28)("match");c.exports=function(d){var O=/./;try{"/./"[d](O)}catch(v){try{return O[p]=!1,"/./"[d](O)}catch(E){}}return!1}},function(c,f,o){o(16)({target:"Number",stat:!0},{isNaN:function(p){return p!=p}})},function(c,f,o){var p=o(73).PROPER,d=o(18),O=o(162);c.exports=function(v){return d(function(){return!!O[v]()||"​…᠎"[v]()!=="​…᠎"||p&&O[v].name!==v})}},function(c,f,o){var p=o(15),d=o(40),O=Math.floor,v=p("".charAt),E=p("".replace),M=p("".slice),A=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,T=/\$([$&'`]|\d{1,2})/g;c.exports=function(k,R,C,F,W,V){var te=C+k.length,ie=F.length,re=T;return W!==void 0&&(W=d(W),re=A),E(V,re,function(J,Z){var Y;switch(v(Z,0)){case"$":return"$";case"&":return k;case"`":return M(R,0,C);case"'":return M(R,te);case"<":Y=W[M(Z,1,-1)];break;default:var z=+Z;if(z===0)return J;if(z>ie){var G=O(z/10);return G===0?J:G<=ie?F[G-1]===void 0?v(Z,1):F[G-1]+v(Z,1):J}Y=F[z-1]}return Y===void 0?"":Y})}},function(c,f,o){var p=o(36),d=o(15),O=o(34),v=o(18),E=o(77),M=o(112),A=o(84),T=o(40),k=o(85),R=Object.assign,C=Object.defineProperty,F=d([].concat);c.exports=!R||v(function(){if(p&&R({b:1},R(C({},"a",{enumerable:!0,get:function(){C(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var W={},V={},te=Symbol(),ie="abcdefghijklmnopqrst";return W[te]=7,ie.split("").forEach(function(re){V[re]=re}),R({},W)[te]!=7||E(R({},V)).join("")!=ie})?function(W,V){for(var te=T(W),ie=arguments.length,re=1,J=M.f,Z=A.f;ie>re;)for(var Y,z=k(arguments[re++]),G=J?F(E(z),J(z)):E(z),H=G.length,$=0;H>$;)Y=G[$++],p&&!O(Z,z,Y)||(te[Y]=z[Y]);return te}:R},function(c,f,o){var p=o(7),d=o(15),O=o(56),v=o(33),E=o(35),M=o(98),A=p.Function,T=d([].concat),k=d([].join),R={},C=function(F,W,V){if(!E(R,W)){for(var te=[],ie=0;ie<W;ie++)te[ie]="a["+ie+"]";R[W]=A("C,a","return new C("+k(te,",")+")")}return R[W](F,V)};c.exports=A.bind||function(F){var W=O(this),V=W.prototype,te=M(arguments,1),ie=function(){var re=T(te,M(arguments));return this instanceof ie?C(W,re.length,re):W.apply(F,re)};return v(V)&&(ie.prototype=V),ie}},function(c,f,o){var p=o(35);c.exports=function(d){return d!==void 0&&(p(d,"value")||p(d,"writable"))}},function(c,f,o){var p=o(15),d=o(44),O=o(39),v=/"/g,E=p("".replace);c.exports=function(M,A,T,k){var R=O(d(M)),C="<"+A;return T!==""&&(C+=" "+T+'="'+E(O(k),v,"&quot;")+'"'),C+">"+R+"</"+A+">"}},function(c,f,o){var p=o(18);c.exports=function(d){return p(function(){var O=""[d]('"');return O!==O.toLowerCase()||O.split('"').length>3})}},function(c,f,o){o(16)({target:"Number",stat:!0},{EPSILON:Math.pow(2,-52)})},function(c,f,o){var p,d,O,v,E=o(16),M=o(71),A=o(7),T=o(46),k=o(34),R=o(209),C=o(42),F=o(149),W=o(102),V=o(78),te=o(150),ie=o(56),re=o(30),J=o(33),Z=o(119),Y=o(92),z=o(117),G=o(120),H=o(164),$=o(168).set,ae=o(210),xe=o(213),me=o(214),Pe=o(170),Be=o(215),Se=o(58),ye=o(95),je=o(28),Ae=o(216),Ue=o(128),nt=o(70),Ot=je("species"),We="Promise",Ze=Se.getterFor(We),vt=Se.set,se=Se.getterFor(We),ue=R&&R.prototype,he=R,Te=ue,Xe=A.TypeError,Le=A.document,wt=A.process,kt=Pe.f,St=kt,yt=!!(Le&&Le.createEvent&&A.dispatchEvent),Me=re(A.PromiseRejectionEvent),ct="unhandledrejection",fe=!1,at=ye(We,function(){var oe=Y(he),be=oe!==String(he);if(!be&&nt===66||M&&!Te.finally)return!0;if(nt>=51&&/native code/.test(oe))return!1;var Ve=new he(function(ft){ft(1)}),Ke=function(ft){ft(function(){},function(){})};return(Ve.constructor={})[Ot]=Ke,!(fe=Ve.then(function(){})instanceof Ke)||!be&&Ae&&!Me}),It=at||!G(function(oe){he.all(oe).catch(function(){})}),on=function(oe){var be;return!(!J(oe)||!re(be=oe.then))&&be},Lt=function(oe,be){if(!oe.notified){oe.notified=!0;var Ve=oe.reactions;ae(function(){for(var Ke=oe.value,ft=oe.state==1,Gt=0;Ve.length>Gt;){var Hn,Qn,Cn,zn=Ve[Gt++],ut=ft?zn.ok:zn.fail,mt=zn.resolve,Et=zn.reject,Nt=zn.domain;try{ut?(ft||(oe.rejection===2&&Dt(oe),oe.rejection=1),ut===!0?Hn=Ke:(Nt&&Nt.enter(),Hn=ut(Ke),Nt&&(Nt.exit(),Cn=!0)),Hn===zn.promise?Et(Xe("Promise-chain cycle")):(Qn=on(Hn))?k(Qn,Hn,mt,Et):mt(Hn)):Et(Ke)}catch(ln){Nt&&!Cn&&Nt.exit(),Et(ln)}}oe.reactions=[],oe.notified=!1,be&&!oe.rejection&&dn(oe)})}},qt=function(oe,be,Ve){var Ke,ft;yt?((Ke=Le.createEvent("Event")).promise=be,Ke.reason=Ve,Ke.initEvent(oe,!1,!0),A.dispatchEvent(Ke)):Ke={promise:be,reason:Ve},!Me&&(ft=A["on"+oe])?ft(Ke):oe===ct&&me("Unhandled promise rejection",Ve)},dn=function(oe){k($,A,function(){var be,Ve=oe.facade,Ke=oe.value;if(bn(oe)&&(be=Be(function(){Ue?wt.emit("unhandledRejection",Ke,Ve):qt(ct,Ve,Ke)}),oe.rejection=Ue||bn(oe)?2:1,be.error))throw be.value})},bn=function(oe){return oe.rejection!==1&&!oe.parent},Dt=function(oe){k($,A,function(){var be=oe.facade;Ue?wt.emit("rejectionHandled",be):qt("rejectionhandled",be,oe.value)})},Nn=function(oe,be,Ve){return function(Ke){oe(be,Ke,Ve)}},Q=function(oe,be,Ve){oe.done||(oe.done=!0,Ve&&(oe=Ve),oe.value=be,oe.state=2,Lt(oe,!0))},de=function(oe,be,Ve){if(!oe.done){oe.done=!0,Ve&&(oe=Ve);try{if(oe.facade===be)throw Xe("Promise can't be resolved itself");var Ke=on(be);Ke?ae(function(){var ft={done:!1};try{k(Ke,be,Nn(de,ft,oe),Nn(Q,ft,oe))}catch(Gt){Q(ft,Gt,oe)}}):(oe.value=be,oe.state=1,Lt(oe,!1))}catch(ft){Q({done:!1},ft,oe)}}};if(at&&(Te=(he=function(oe){Z(this,Te),ie(oe),k(p,this);var be=Ze(this);try{oe(Nn(de,be),Nn(Q,be))}catch(Ve){Q(be,Ve)}}).prototype,(p=function(oe){vt(this,{type:We,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=F(Te,{then:function(oe,be){var Ve=se(this),Ke=Ve.reactions,ft=kt(H(this,he));return ft.ok=!re(oe)||oe,ft.fail=re(be)&&be,ft.domain=Ue?wt.domain:void 0,Ve.parent=!0,Ke[Ke.length]=ft,Ve.state!=0&&Lt(Ve,!1),ft.promise},catch:function(oe){return this.then(void 0,oe)}}),d=function(){var oe=new p,be=Ze(oe);this.promise=oe,this.resolve=Nn(de,be),this.reject=Nn(Q,be)},Pe.f=kt=function(oe){return oe===he||oe===O?new d(oe):St(oe)},!M&&re(R)&&ue!==Object.prototype)){v=ue.then,fe||(C(ue,"then",function(oe,be){var Ve=this;return new he(function(Ke,ft){k(v,Ve,Ke,ft)}).then(oe,be)},{unsafe:!0}),C(ue,"catch",Te.catch,{unsafe:!0}));try{delete ue.constructor}catch(oe){}W&&W(ue,Te)}E({global:!0,wrap:!0,forced:at},{Promise:he}),V(he,We,!1,!0),te(We),O=T(We),E({target:We,stat:!0,forced:at},{reject:function(oe){var be=kt(this);return k(be.reject,void 0,oe),be.promise}}),E({target:We,stat:!0,forced:M||at},{resolve:function(oe){return xe(M&&this===O?he:this,oe)}}),E({target:We,stat:!0,forced:It},{all:function(oe){var be=this,Ve=kt(be),Ke=Ve.resolve,ft=Ve.reject,Gt=Be(function(){var Hn=ie(be.resolve),Qn=[],Cn=0,zn=1;z(oe,function(ut){var mt=Cn++,Et=!1;zn++,k(Hn,be,ut).then(function(Nt){Et||(Et=!0,Qn[mt]=Nt,--zn||Ke(Qn))},ft)}),--zn||Ke(Qn)});return Gt.error&&ft(Gt.value),Ve.promise},race:function(oe){var be=this,Ve=kt(be),Ke=Ve.reject,ft=Be(function(){var Gt=ie(be.resolve);z(oe,function(Hn){k(Gt,be,Hn).then(Ve.resolve,Ke)})});return ft.error&&Ke(ft.value),Ve.promise}})},function(c,f,o){var p=o(7);c.exports=p.Promise},function(c,f,o){var p,d,O,v,E,M,A,T,k=o(7),R=o(64),C=o(50).f,F=o(168).set,W=o(169),V=o(211),te=o(212),ie=o(128),re=k.MutationObserver||k.WebKitMutationObserver,J=k.document,Z=k.process,Y=k.Promise,z=C(k,"queueMicrotask"),G=z&&z.value;G||(p=function(){var H,$;for(ie&&(H=Z.domain)&&H.exit();d;){$=d.fn,d=d.next;try{$()}catch(ae){throw d?v():O=void 0,ae}}O=void 0,H&&H.enter()},W||ie||te||!re||!J?!V&&Y&&Y.resolve?((A=Y.resolve(void 0)).constructor=Y,T=R(A.then,A),v=function(){T(p)}):ie?v=function(){Z.nextTick(p)}:(F=R(F,k),v=function(){F(p)}):(E=!0,M=J.createTextNode(""),new re(p).observe(M,{characterData:!0}),v=function(){M.data=E=!E})),c.exports=G||function(H){var $={fn:H,next:void 0};O&&(O.next=$),d||(d=$,v()),O=$}},function(c,f,o){var p=o(55),d=o(7);c.exports=/ipad|iphone|ipod/i.test(p)&&d.Pebble!==void 0},function(c,f,o){var p=o(55);c.exports=/web0s(?!.*chrome)/i.test(p)},function(c,f,o){var p=o(32),d=o(33),O=o(170);c.exports=function(v,E){if(p(v),d(E)&&E.constructor===v)return E;var M=O.f(v);return(0,M.resolve)(E),M.promise}},function(c,f,o){var p=o(7);c.exports=function(d,O){var v=p.console;v&&v.error&&(arguments.length==1?v.error(d):v.error(d,O))}},function(c,f){c.exports=function(o){try{return{error:!1,value:o()}}catch(p){return{error:!0,value:p}}}},function(c,f){c.exports=typeof window=="object"},function(c,f,o){var p=o(40),d=o(75),O=o(45);c.exports=function(v){for(var E=p(this),M=O(E),A=arguments.length,T=d(A>1?arguments[1]:void 0,M),k=A>2?arguments[2]:void 0,R=k===void 0?M:d(k,M);R>T;)E[T++]=v;return E}},function(c,f,o){var p=o(16),d=o(7),O=o(15),v=o(59),E=o(160),M=o(219),A=o(18),T=d.RangeError,k=d.String,R=Math.floor,C=O(M),F=O("".slice),W=O(1 .toFixed),V=function(J,Z,Y){return Z===0?Y:Z%2==1?V(J,Z-1,Y*J):V(J*J,Z/2,Y)},te=function(J,Z,Y){for(var z=-1,G=Y;++z<6;)G+=Z*J[z],J[z]=G%1e7,G=R(G/1e7)},ie=function(J,Z){for(var Y=6,z=0;--Y>=0;)z+=J[Y],J[Y]=R(z/Z),z=z%Z*1e7},re=function(J){for(var Z=6,Y="";--Z>=0;)if(Y!==""||Z===0||J[Z]!==0){var z=k(J[Z]);Y=Y===""?z:Y+C("0",7-z.length)+z}return Y};p({target:"Number",proto:!0,forced:A(function(){return W(8e-5,3)!=="0.000"||W(.9,0)!=="1"||W(1.255,2)!=="1.25"||W(0xde0b6b3a7640080,0)!=="1000000000000000128"})||!A(function(){W({})})},{toFixed:function(J){var Z,Y,z,G,H=E(this),$=v(J),ae=[0,0,0,0,0,0],xe="",me="0";if($<0||$>20)throw T("Incorrect fraction digits");if(H!=H)return"NaN";if(H<=-1e21||H>=1e21)return k(H);if(H<0&&(xe="-",H=-H),H>1e-21)if(Y=(Z=function(Pe){for(var Be=0,Se=Pe;Se>=4096;)Be+=12,Se/=4096;for(;Se>=2;)Be+=1,Se/=2;return Be}(H*V(2,69,1))-69)<0?H*V(2,-Z,1):H/V(2,Z,1),Y*=4503599627370496,(Z=52-Z)>0){for(te(ae,0,Y),z=$;z>=7;)te(ae,1e7,0),z-=7;for(te(ae,V(10,z,1),0),z=Z-1;z>=23;)ie(ae,1<<23),z-=23;ie(ae,1<<z),te(ae,1,1),ie(ae,2),me=re(ae)}else te(ae,0,Y),te(ae,1<<-Z,0),me=re(ae)+C("0",$);return me=$>0?xe+((G=me.length)<=$?"0."+C("0",$-G)+me:F(me,0,G-$)+"."+F(me,G-$)):xe+me}})},function(c,f,o){var p=o(7),d=o(59),O=o(39),v=o(44),E=p.RangeError;c.exports=function(M){var A=O(v(this)),T="",k=d(M);if(k<0||k==1/0)throw E("Wrong number of repetitions");for(;k>0;(k>>>=1)&&(A+=A))1&k&&(T+=A);return T}},function(c,f,o){var p=o(36),d=o(15),O=o(77),v=o(41),E=d(o(84).f),M=d([].push),A=function(T){return function(k){for(var R,C=v(k),F=O(C),W=F.length,V=0,te=[];W>V;)R=F[V++],p&&!E(C,R)||M(te,T?[R,C[R]]:C[R]);return te}};c.exports={entries:A(!0),values:A(!1)}},function(c,f){c.exports=function(o){return o.webpackPolyfill||(o.deprecate=function(){},o.paths=[],o.children||(o.children=[]),Object.defineProperty(o,"loaded",{enumerable:!0,get:function(){return o.l}}),Object.defineProperty(o,"id",{enumerable:!0,get:function(){return o.i}}),o.webpackPolyfill=1),o}},function(c,f,o){o.r(f),o.d(f,"observer",function(){return ai}),o.d(f,"LogicFlow",function(){return Wv}),o.d(f,"h",function(){return fe.g}),o.d(f,"LogicFlowUtil",function(){return p}),o.d(f,"BaseNode",function(){return qi}),o.d(f,"RectNode",function(){return Ly}),o.d(f,"CircleNode",function(){return Uy}),o.d(f,"PolygonNode",function(){return Wy}),o.d(f,"DiamondNode",function(){return qy}),o.d(f,"EllipseNode",function(){return tv}),o.d(f,"TextNode",function(){return ov}),o.d(f,"HtmlNode",function(){return sv}),o.d(f,"BaseEdge",function(){return ql}),o.d(f,"LineEdge",function(){return wv}),o.d(f,"PolylineEdge",function(){return Pv}),o.d(f,"BezierEdge",function(){return Tv}),o.d(f,"Arrow",function(){return Rx}),o.d(f,"BaseEdgeModel",function(){return pl}),o.d(f,"BezierEdgeModel",function(){return Hh}),o.d(f,"LineEdgeModel",function(){return Fs}),o.d(f,"PolylineEdgeModel",function(){return to}),o.d(f,"BaseNodeModel",function(){return $i}),o.d(f,"CircleNodeModel",function(){return $h}),o.d(f,"DiamondNodeModel",function(){return ey}),o.d(f,"EllipseNodeModel",function(){return oy}),o.d(f,"PolygonNodeModel",function(){return ly}),o.d(f,"RectNodeModel",function(){return hy}),o.d(f,"TextNodeModel",function(){return my}),o.d(f,"HtmlNodeModel",function(){return Oy}),o.d(f,"EditConfigModel",function(){return Ic}),o.d(f,"GraphModel",function(){return vg}),o.d(f,"SnaplineModel",function(){return Qm}),o.d(f,"Keyboard",function(){return Bb}),o.d(f,"get",function(){return Bg}),o.d(f,"defaults",function(){return Ug}),o.d(f,"ElementState",function(){return cn}),o.d(f,"ModelType",function(){return Yt}),o.d(f,"ElementType",function(){return Bn}),o.d(f,"EventType",function(){return pt}),o.d(f,"formateAnchorConnectValidateData",function(){return ja});var p={};o.r(p),o.d(p,"createUuid",function(){return qo}),o.d(p,"refreshGraphId",function(){return eh}),o.d(p,"StepDrag",function(){return no}),o.d(p,"setupEdgeModel",function(){return up}),o.d(p,"isBboxOverLapping",function(){return No}),o.d(p,"filterRepeatPoints",function(){return Ut}),o.d(p,"getSimplePolyline",function(){return sp}),o.d(p,"getExpandedBBox",function(){return dr}),o.d(p,"pointDirection",function(){return xl}),o.d(p,"getExpandedBBoxPoint",function(){return nn}),o.d(p,"mergeBBox",function(){return El}),o.d(p,"getBBoxOfPoints",function(){return Hi}),o.d(p,"getPointsFromBBox",function(){return bi}),o.d(p,"isPointOutsideBBox",function(){return ju}),o.d(p,"getBBoxXCrossPoints",function(){return cp}),o.d(p,"getBBoxYCrossPoints",function(){return lp}),o.d(p,"getBBoxCrossPointsByPoint",function(){return fp}),o.d(p,"estimateDistance",function(){return Da}),o.d(p,"costByPoints",function(){return Ys}),o.d(p,"heuristicCostEstimate",function(){return Sl}),o.d(p,"rebuildPath",function(){return pp}),o.d(p,"removeClosePointFromOpenList",function(){return dp}),o.d(p,"isSegmentsIntersected",function(){return Tn}),o.d(p,"isSegmentCrossingBBox",function(){return hr}),o.d(p,"getNextNeighborPoints",function(){return hp}),o.d(p,"pathFinder",function(){return jl}),o.d(p,"getBoxByOriginNode",function(){return Pl}),o.d(p,"pointFilter",function(){return Al}),o.d(p,"getPolylinePoints",function(){return Ws}),o.d(p,"getLongestEdge",function(){return Ml}),o.d(p,"isSegmentsInNode",function(){return Vs}),o.d(p,"isSegmentsCrossNode",function(){return _i}),o.d(p,"getCrossPointInRect",function(){return kl}),o.d(p,"segmentDirection",function(){return Na}),o.d(p,"points2PointsList",function(){return Jo}),o.d(p,"getSimplePoints",function(){return yp}),o.d(p,"getBytesLength",function(){return Tl}),o.d(p,"getTextWidth",function(){return fh}),o.d(p,"getAppendAttributes",function(){return gp}),o.d(p,"getBezierControlPoints",function(){return Pu}),o.d(p,"getBezierPoints",function(){return Au}),o.d(p,"getEndTangent",function(){return Nl}),o.d(p,"getClosestPointOfPolyline",function(){return ku}),o.d(p,"pickEdgeConfig",function(){return mp}),o.d(p,"twoPointDistance",function(){return Cl}),o.d(p,"createEdgeGenerator",function(){return Er}),o.d(p,"snapToGrid",function(){return yi}),o.d(p,"getGridOffset",function(){return xs}),o.d(p,"sampleCubic",function(){return Pn}),o.d(p,"getThetaOfVector",function(){return _l}),o.d(p,"degrees",function(){return Ol}),o.d(p,"Vector",function(){return rr}),o.d(p,"Point",function(){return u}),o.d(p,"Matrix",function(){return Ro}),o.d(p,"RotateMatrix",function(){return Oi}),o.d(p,"ScaleMatrix",function(){return Bl}),o.d(p,"TranslateMatrix",function(){return Ra});var d=o(1),O=o(10);if(!O.j)throw new Error("mobx-react-lite requires React with Hooks support");if(!d.H)throw new Error("mobx-react-lite requires mobx at least version 4 to be available");var v=o(43),E=Object(v.b)("observerBatching");function M(t){t()}var A=!1;function T(){return A}function k(t){return Object(d.t)(t)}var R,C=1e4,F=new Set;function W(){R===void 0&&(R=setTimeout(V,1e4))}function V(){R=void 0;var t=Date.now();F.forEach(function(e){var n=e.current;n&&t>=n.cleanAt&&(n.reaction.dispose(),e.current=null,F.delete(e))}),F.size>0&&W()}var te=!1,ie=[],re={};function J(t){return"observer"+t}function Z(t,e,n){e===void 0&&(e="observed"),n===void 0&&(n=re),T();var r,a=function(x){return function(){te?ie.push(x):x()}}((n.useForceUpdate||v.d)()),i=O.d.useRef(null);if(!i.current){var s=new d.c(J(e),function(){h.mounted?a():(s.dispose(),i.current=null)}),h=function(x){return{cleanAt:Date.now()+C,reaction:x}}(s);i.current=h,r=i,F.add(r),W()}var m=i.current.reaction;return O.d.useDebugValue(m,k),O.d.useEffect(function(){var x;return x=i,F.delete(x),i.current?i.current.mounted=!0:(i.current={reaction:new d.c(J(e),function(){a()}),cleanAt:1/0},a()),function(){i.current.reaction.dispose(),i.current=null}},[]),function(x){te=!0,ie=[];try{var S=x();te=!1;var D=ie.length>0?ie:void 0;return O.d.useLayoutEffect(function(){D&&D.forEach(function(I){return I()})},[D]),S}finally{te=!1}}(function(){var x,S;if(m.track(function(){try{x=t()}catch(D){S=D}}),S)throw S;return x})}var Y=function(){return Y=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var a in e=arguments[n])Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t},Y.apply(this,arguments)};function z(t,e){var n,r,a,i=Y({forwardRef:!1},e),s=t.displayName||t.name,h=function(m,x){return Z(function(){return t(m,x)},s)};return h.displayName=s,n=i.forwardRef?Object(O.f)(Object(O.e)(h)):Object(O.f)(h),r=t,a=n,Object.keys(r).forEach(function(m){G[m]||Object.defineProperty(a,m,Object.getOwnPropertyDescriptor(r,m))}),n.displayName=s,n}var G={$$typeof:!0,render:!0,compare:!0,type:!0};function H(t){var e=t.children,n=t.render,r=e||n;return typeof r!="function"?null:Z(r)}function $(t,e,n,r,a){var i=e==="children"?"render":"children",s=typeof t[e]=="function",h=typeof t[i]=="function";return s&&h?new Error("MobX Observer: Do not use children and render in the same time in`"+n):s||h?null:new Error("Invalid prop `"+a+"` of type `"+typeof t[e]+"` supplied to `"+n+"`, expected `function`.")}H.propTypes={children:$,render:$},H.displayName="Observer";var ae;(ae=O.g)||(ae=M),Object(d.n)({reactionScheduler:ae}),Object(v.a)()[E]=!0;var xe=0,me={};function Pe(t){return me[t]||(me[t]=function(e){if(typeof Symbol=="function")return Symbol(e);var n="__$mobx-react "+e+" ("+xe+")";return xe++,n}(t)),me[t]}function Be(t,e){if(Se(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(var a=0;a<n.length;a++)if(!Object.hasOwnProperty.call(e,n[a])||!Se(t[n[a]],e[n[a]]))return!1;return!0}function Se(t,e){return t===e?t!==0||1/t==1/e:t!=t&&e!=e}function ye(t,e,n){Object.hasOwnProperty.call(t,e)?t[e]=n:Object.defineProperty(t,e,{enumerable:!1,configurable:!0,writable:!0,value:n})}var je=Pe("patchMixins"),Ae=Pe("patchedDefinition");function Ue(t,e){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];e.locks++;try{var s;return t!=null&&(s=t.apply(this,a)),s}finally{e.locks--,e.locks===0&&e.methods.forEach(function(h){h.apply(n,a)})}}function nt(t,e){return function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];Ue.call.apply(Ue,[this,t,e].concat(r))}}function Ot(t,e,n){var r=function(h,m){var x=h[je]=h[je]||{},S=x[m]=x[m]||{};return S.locks=S.locks||0,S.methods=S.methods||[],S}(t,e);r.methods.indexOf(n)<0&&r.methods.push(n);var a=Object.getOwnPropertyDescriptor(t,e);if(!a||!a[Ae]){var i=t[e],s=We(t,e,a?a.enumerable:void 0,r,i);Object.defineProperty(t,e,s)}}function We(t,e,n,r,a){var i,s=nt(a,r);return(i={})[Ae]=!0,i.get=function(){return s},i.set=function(h){if(this===t)s=nt(h,r);else{var m=We(this,e,n,r,h);Object.defineProperty(this,e,m)}},i.configurable=!0,i.enumerable=n,i}var Ze=d.a||"$mobx",vt=Pe("isMobXReactObserver"),se=Pe("isUnmounted"),ue=Pe("skipRender"),he=Pe("isForcingUpdate");function Te(t){var e=t.prototype;if(t[vt]?Xe(e):t[vt]=!0,e.componentWillReact)throw new Error("The componentWillReact life-cycle event is no longer supported");if(t.__proto__!==O.b)if(e.shouldComponentUpdate){if(e.shouldComponentUpdate!==wt)throw new Error("It is not allowed to use shouldComponentUpdate in observer based components.")}else e.shouldComponentUpdate=wt;kt(e,"props"),kt(e,"state");var n=e.render;return e.render=function(){return Le.call(this,n)},Ot(e,"componentWillUnmount",function(){var r;(r=this.render[Ze])===null||r===void 0||r.dispose(),this[se]=!0,!this.render[Ze]&&Xe(this)}),t}function Xe(t){return t.displayName||t.name||t.constructor&&(t.constructor.displayName||t.constructor.name)||"<component>"}function Le(t){var e=this;ye(this,ue,!1),ye(this,he,!1);var n=Xe(this),r=t.bind(this),a=!1,i=new d.c(n+".render()",function(){if(!a&&(a=!0,e[se]!==!0)){var h=!0;try{ye(e,he,!0),e[ue]||O.a.prototype.forceUpdate.call(e),h=!1}finally{ye(e,he,!1),h&&i.dispose()}}});function s(){a=!1;var h=void 0,m=void 0;if(i.track(function(){try{m=Object(d.d)(!1,r)}catch(x){h=x}}),h)throw h;return m}return i.reactComponent=this,s[Ze]=i,this.render=s,s.call(this)}function wt(t,e){return this.state!==e||!Be(this.props,t)}function kt(t,e){var n=Pe("reactProp_"+e+"_valueHolder"),r=Pe("reactProp_"+e+"_atomHolder");function a(){return this[r]||ye(this,r,Object(d.o)("reactive "+e)),this[r]}Object.defineProperty(t,e,{configurable:!0,enumerable:!0,get:function(){var i=!1;return d.f&&d.e&&(i=Object(d.f)(!0)),a.call(this).reportObserved(),d.f&&d.e&&Object(d.e)(i),this[n]},set:function(i){this[he]||Be(this[n],i)?ye(this,n,i):(ye(this,n,i),ye(this,ue,!0),a.call(this).reportChanged(),ye(this,ue,!1))}})}var St=typeof Symbol=="function"&&Symbol.for,yt=St?Symbol.for("react.forward_ref"):typeof O.e=="function"&&Object(O.e)(function(t){return null}).$$typeof,Me=St?Symbol.for("react.memo"):typeof O.f=="function"&&Object(O.f)(function(t){return null}).$$typeof;function ct(t){if(t.isMobxInjector,Me&&t.$$typeof===Me)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(yt&&t.$$typeof===yt){var e=t.render;if(typeof e!="function")throw new Error("render property of ForwardRef was not a function");return Object(O.e)(function(){var n=arguments;return Object(O.c)(H,null,function(){return e.apply(void 0,n)})})}return typeof t!="function"||t.prototype&&t.prototype.render||t.isReactClass||Object.prototype.isPrototypeOf.call(O.a,t)?Te(t):z(t)}if(!O.a)throw new Error("mobx-react requires React to be available");if(!d.C)throw new Error("mobx-react requires mobx to be available");var fe=o(0);o(4),o(8),o(2),o(3),o(52),o(6),o(5),o(11),o(37),o(27),o(21),o(20),o(24),o(22),o(25),o(9),o(17),o(23),o(19),o(192),o(156),o(104),o(157),o(158),o(199),o(61);var at=function(t,e){for(var n=-1,r=t==null?0:t.length,a=Array(r);++n<r;)a[n]=e(t[n],n,t);return a},It=function(){this.__data__=[],this.size=0},on=function(t,e){return t===e||t!=t&&e!=e},Lt=function(t,e){for(var n=t.length;n--;)if(on(t[n][0],e))return n;return-1},qt=Array.prototype.splice,dn=function(t){var e=this.__data__,n=Lt(e,t);return!(n<0)&&(n==e.length-1?e.pop():qt.call(e,n,1),--this.size,!0)},bn=function(t){var e=this.__data__,n=Lt(e,t);return n<0?void 0:e[n][1]},Dt=function(t){return Lt(this.__data__,t)>-1},Nn=function(t,e){var n=this.__data__,r=Lt(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};function Q(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Q.prototype.clear=It,Q.prototype.delete=dn,Q.prototype.get=bn,Q.prototype.has=Dt,Q.prototype.set=Nn;var de=Q,oe=function(){this.__data__=new de,this.size=0},be=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Ve=function(t){return this.__data__.get(t)},Ke=function(t){return this.__data__.has(t)},ft=o(31),Gt=ft.a.Symbol,Hn=Object.prototype,Qn=Hn.hasOwnProperty,Cn=Hn.toString,zn=Gt?Gt.toStringTag:void 0,ut=function(t){var e=Qn.call(t,zn),n=t[zn];try{t[zn]=void 0;var r=!0}catch(i){}var a=Cn.call(t);return r&&(e?t[zn]=n:delete t[zn]),a},mt=Object.prototype.toString,Et=function(t){return mt.call(t)},Nt=Gt?Gt.toStringTag:void 0,ln=function(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Nt&&Nt in Object(t)?ut(t):Et(t)},xn=function(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")},Oo,io=function(t){if(!xn(t))return!1;var e=ln(t);return e=="[object Function]"||e=="[object GeneratorFunction]"||e=="[object AsyncFunction]"||e=="[object Proxy]"},wo=ft.a["__core-js_shared__"],ui=(Oo=/[^.]+$/.exec(wo&&wo.keys&&wo.keys.IE_PROTO||""))?"Symbol(src)_1."+Oo:"",Oc=function(t){return!!ui&&ui in t},Ya=Function.prototype.toString,Ir=function(t){if(t!=null){try{return Ya.call(t)}catch(e){}try{return t+""}catch(e){}}return""},ki=/^\[object .+?Constructor\]$/,lt=Function.prototype,wc=Object.prototype,Wa=lt.toString,Va=wc.hasOwnProperty,vr=RegExp("^"+Wa.call(Va).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Pr=function(t){return!(!xn(t)||Oc(t))&&(io(t)?vr:ki).test(Ir(t))},na=function(t,e){return t==null?void 0:t[e]},$r=function(t,e){var n=na(t,e);return Pr(n)?n:void 0},Lr=$r(ft.a,"Map"),qr=$r(Object,"create"),Ka=function(){this.__data__=qr?qr(null):{},this.size=0},$a=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},$u=Object.prototype.hasOwnProperty,Ti=function(t){var e=this.__data__;if(qr){var n=e[t];return n==="__lodash_hash_undefined__"?void 0:n}return $u.call(e,t)?e[t]:void 0},qu=Object.prototype.hasOwnProperty,qa=function(t){var e=this.__data__;return qr?e[t]!==void 0:qu.call(e,t)},xc=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=qr&&e===void 0?"__lodash_hash_undefined__":e,this};function Bo(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Bo.prototype.clear=Ka,Bo.prototype.delete=$a,Bo.prototype.get=Ti,Bo.prototype.has=qa,Bo.prototype.set=xc;var Zu=Bo,xo=function(){this.size=0,this.__data__={hash:new Zu,map:new(Lr||de),string:new Zu}},Za=function(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null},ra=function(t,e){var n=t.__data__;return Za(e)?n[typeof e=="string"?"string":"hash"]:n.map},Ja=function(t){var e=ra(this,t).delete(t);return this.size-=e?1:0,e},Qa=function(t){return ra(this,t).get(t)},Ec=function(t){return ra(this,t).has(t)},Ju=function(t,e){var n=ra(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function sn(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}sn.prototype.clear=xo,sn.prototype.delete=Ja,sn.prototype.get=Qa,sn.prototype.has=Ec,sn.prototype.set=Ju;var an=sn,Qu=function(t,e){var n=this.__data__;if(n instanceof de){var r=n.__data__;if(!Lr||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new an(r)}return n.set(t,e),this.size=n.size,this};function si(t){var e=this.__data__=new de(t);this.size=e.size}si.prototype.clear=oe,si.prototype.delete=be,si.prototype.get=Ve,si.prototype.has=Ke,si.prototype.set=Qu;var Eo=si,eu=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},es=function(t){return this.__data__.has(t)};function An(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new an;++e<n;)this.add(t[e])}An.prototype.add=An.prototype.push=eu,An.prototype.has=es;var tu=An,Di=function(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1},nu=function(t,e){return t.has(e)},oa=function(t,e,n,r,a,i){var s=1&n,h=t.length,m=e.length;if(h!=m&&!(s&&m>h))return!1;var x=i.get(t),S=i.get(e);if(x&&S)return x==e&&S==t;var D=-1,I=!0,X=2&n?new tu:void 0;for(i.set(t,e),i.set(e,t);++D<h;){var q=t[D],ee=e[D];if(r)var ge=s?r(ee,q,D,e,t,i):r(q,ee,D,t,e,i);if(ge!==void 0){if(ge)continue;I=!1;break}if(X){if(!Di(e,function(ve,we){if(!nu(X,we)&&(q===ve||a(q,ve,n,r,i)))return X.push(we)})){I=!1;break}}else if(q!==ee&&!a(q,ee,n,r,i)){I=!1;break}}return i.delete(t),i.delete(e),I},er=ft.a.Uint8Array,ru=function(t){var e=-1,n=Array(t.size);return t.forEach(function(r,a){n[++e]=[a,r]}),n},ts=function(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n},ou=Gt?Gt.prototype:void 0,ia=ou?ou.valueOf:void 0,ci=function(t,e,n,r,a,i,s){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!i(new er(t),new er(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return on(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var h=ru;case"[object Set]":var m=1&r;if(h||(h=ts),t.size!=e.size&&!m)return!1;var x=s.get(t);if(x)return x==e;r|=2,s.set(t,e);var S=oa(h(t),h(e),r,a,i,s);return s.delete(t),S;case"[object Symbol]":if(ia)return ia.call(t)==ia.call(e)}return!1},So=function(t,e){for(var n=-1,r=e.length,a=t.length;++n<r;)t[a+n]=e[n];return t},vn=Array.isArray,Sc=function(t,e,n){var r=e(t);return vn(t)?r:So(r,n(t))},gr=function(t,e){for(var n=-1,r=t==null?0:t.length,a=0,i=[];++n<r;){var s=t[n];e(s,n,t)&&(i[a++]=s)}return i},jc=function(){return[]},ns=Object.prototype.propertyIsEnumerable,ur=Object.getOwnPropertySymbols,zr=ur?function(t){return t==null?[]:(t=Object(t),gr(ur(t),function(e){return ns.call(t,e)}))}:jc,iu=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r},en=function(t){return t!=null&&typeof t=="object"},Xn=function(t){return en(t)&&ln(t)=="[object Arguments]"},aa=Object.prototype,rs=aa.hasOwnProperty,au=aa.propertyIsEnumerable,ua=Xn(function(){return arguments}())?Xn:function(t){return en(t)&&rs.call(t,"callee")&&!au.call(t,"callee")},ao=ua,jo=o(48),li=/^(?:0|[1-9]\d*)$/,mr=function(t,e){var n=typeof t;return!!(e=e==null?9007199254740991:e)&&(n=="number"||n!="symbol"&&li.test(t))&&t>-1&&t%1==0&&t<e},Po=function(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=9007199254740991},Zt={};Zt["[object Float32Array]"]=Zt["[object Float64Array]"]=Zt["[object Int8Array]"]=Zt["[object Int16Array]"]=Zt["[object Int32Array]"]=Zt["[object Uint8Array]"]=Zt["[object Uint8ClampedArray]"]=Zt["[object Uint16Array]"]=Zt["[object Uint32Array]"]=!0,Zt["[object Arguments]"]=Zt["[object Array]"]=Zt["[object ArrayBuffer]"]=Zt["[object Boolean]"]=Zt["[object DataView]"]=Zt["[object Date]"]=Zt["[object Error]"]=Zt["[object Function]"]=Zt["[object Map]"]=Zt["[object Number]"]=Zt["[object Object]"]=Zt["[object RegExp]"]=Zt["[object Set]"]=Zt["[object String]"]=Zt["[object WeakMap]"]=!1;var br=function(t){return en(t)&&Po(t.length)&&!!Zt[ln(t)]},uo=function(t){return function(e){return t(e)}},qn=o(49),sa=qn.a&&qn.a.isTypedArray,Ni=sa?uo(sa):br,uu=Object.prototype.hasOwnProperty,En=function(t,e){var n=vn(t),r=!n&&ao(t),a=!n&&!r&&Object(jo.a)(t),i=!n&&!r&&!a&&Ni(t),s=n||r||a||i,h=s?iu(t.length,String):[],m=h.length;for(var x in t)!e&&!uu.call(t,x)||s&&(x=="length"||a&&(x=="offset"||x=="parent")||i&&(x=="buffer"||x=="byteLength"||x=="byteOffset")||mr(x,m))||h.push(x);return h},ca=Object.prototype,Ao=function(t){var e=t&&t.constructor;return t===(typeof e=="function"&&e.prototype||ca)},Br=function(t,e){return function(n){return t(e(n))}},su=Br(Object.keys,Object),Pc=Object.prototype.hasOwnProperty,cu=function(t){if(!Ao(t))return su(t);var e=[];for(var n in Object(t))Pc.call(t,n)&&n!="constructor"&&e.push(n);return e},Rn=function(t){return t!=null&&Po(t.length)&&!io(t)},Ci=function(t){return Rn(t)?En(t):cu(t)},so=function(t){return Sc(t,Ci,zr)},sr=Object.prototype.hasOwnProperty,lu=function(t,e,n,r,a,i){var s=1&n,h=so(t),m=h.length;if(m!=so(e).length&&!s)return!1;for(var x=m;x--;){var S=h[x];if(!(s?S in e:sr.call(e,S)))return!1}var D=i.get(t),I=i.get(e);if(D&&I)return D==e&&I==t;var X=!0;i.set(t,e),i.set(e,t);for(var q=s;++x<m;){var ee=t[S=h[x]],ge=e[S];if(r)var ve=s?r(ge,ee,S,e,t,i):r(ee,ge,S,t,e,i);if(!(ve===void 0?ee===ge||a(ee,ge,n,r,i):ve)){X=!1;break}q||(q=S=="constructor")}if(X&&!q){var we=t.constructor,Ce=e.constructor;we==Ce||!("constructor"in t)||!("constructor"in e)||typeof we=="function"&&we instanceof we&&typeof Ce=="function"&&Ce instanceof Ce||(X=!1)}return i.delete(t),i.delete(e),X},Ar=$r(ft.a,"DataView"),Fo=$r(ft.a,"Promise"),la=$r(ft.a,"Set"),co=$r(ft.a,"WeakMap"),Mr="[object Map]",_r="[object Promise]",Fr="[object Set]",lo="[object WeakMap]",Oe="[object DataView]",Ne=Ir(Ar),Re=Ir(Lr),Qe=Ir(Fo),zt=Ir(la),Wt=Ir(co),gn=ln;(Ar&&gn(new Ar(new ArrayBuffer(1)))!=Oe||Lr&&gn(new Lr)!=Mr||Fo&&gn(Fo.resolve())!=_r||la&&gn(new la)!=Fr||co&&gn(new co)!=lo)&&(gn=function(t){var e=ln(t),n=e=="[object Object]"?t.constructor:void 0,r=n?Ir(n):"";if(r)switch(r){case Ne:return Oe;case Re:return Mr;case Qe:return _r;case zt:return Fr;case Wt:return lo}return e});var _=gn,w="[object Arguments]",P="[object Array]",L="[object Object]",K=Object.prototype.hasOwnProperty,pe=function(t,e,n,r,a,i){var s=vn(t),h=vn(e),m=s?P:_(t),x=h?P:_(e),S=(m=m==w?L:m)==L,D=(x=x==w?L:x)==L,I=m==x;if(I&&Object(jo.a)(t)){if(!Object(jo.a)(e))return!1;s=!0,S=!1}if(I&&!S)return i||(i=new Eo),s||Ni(t)?oa(t,e,n,r,a,i):ci(t,e,m,n,r,a,i);if(!(1&n)){var X=S&&K.call(t,"__wrapped__"),q=D&&K.call(e,"__wrapped__");if(X||q){var ee=X?t.value():t,ge=q?e.value():e;return i||(i=new Eo),a(ee,ge,n,r,i)}}return!!I&&(i||(i=new Eo),lu(t,e,n,r,a,i))},Ee=function t(e,n,r,a,i){return e===n||(e==null||n==null||!en(e)&&!en(n)?e!=e&&n!=n:pe(e,n,r,a,t,i))},Fe=function(t,e,n,r){var a=n.length,i=a;if(t==null)return!i;for(t=Object(t);a--;){var s=n[a];if(s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++a<i;){var h=(s=n[a])[0],m=t[h],x=s[1];if(s[2]){if(m===void 0&&!(h in t))return!1}else{var S=new Eo,D;if(!(D===void 0?Ee(x,m,3,r,S):D))return!1}}return!0},st=function(t){return t==t&&!xn(t)},Xt=function(t){for(var e=Ci(t),n=e.length;n--;){var r=e[n],a=t[r];e[n]=[r,a,st(a)]}return e},et=function(t,e){return function(n){return n!=null&&n[t]===e&&(e!==void 0||t in Object(n))}},hn=function(t){var e=Xt(t);return e.length==1&&e[0][2]?et(e[0][0],e[0][1]):function(n){return n===t||Fe(n,t,e)}},Bt=function(t){return typeof t=="symbol"||en(t)&&ln(t)=="[object Symbol]"},tn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ur=/^\w*$/,_n=function(t,e){if(vn(t))return!1;var n=typeof t;return!(n!="number"&&n!="symbol"&&n!="boolean"&&t!=null&&!Bt(t))||Ur.test(t)||!tn.test(t)||e!=null&&t in Object(e)};function Or(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError("Expected a function");var n=function(){var r=arguments,a=e?e.apply(this,r):r[0],i=n.cache;if(i.has(a))return i.get(a);var s=t.apply(this,r);return n.cache=i.set(a,s)||i,s};return n.cache=new(Or.Cache||an),n}Or.Cache=an;var Mo=Or,ko=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ri=/\\(\\)?/g,fu=function(t){var e=Mo(t,function(r){return n.size===500&&n.clear(),r}),n=e.cache;return e}(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(ko,function(n,r,a,i){e.push(a?i.replace(Ri,"$1"):r||n)}),e}),Uo=Gt?Gt.prototype:void 0,fa=Uo?Uo.toString:void 0,cr=function t(e){if(typeof e=="string")return e;if(vn(e))return at(e,t)+"";if(Bt(e))return fa?fa.call(e):"";var n=e+"";return n=="0"&&1/e==-1/0?"-0":n},Ii=function(t){return t==null?"":cr(t)},fi=function(t,e){return vn(t)?t:_n(t,e)?[t]:fu(Ii(t))},Go=function(t){if(typeof t=="string"||Bt(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e},Ho=function(t,e){for(var n=0,r=(e=fi(e,t)).length;t!=null&&n<r;)t=t[Go(e[n++])];return n&&n==r?t:void 0},pa=function(t,e,n){var r=t==null?void 0:Ho(t,e);return r===void 0?n:r},Fd=function(t,e){return t!=null&&e in Object(t)},Ud=function(t,e,n){for(var r=-1,a=(e=fi(e,t)).length,i=!1;++r<a;){var s=Go(e[r]);if(!(i=t!=null&&n(t,s)))break;t=t[s]}return i||++r!=a?i:!!(a=t==null?0:t.length)&&Po(a)&&mr(s,a)&&(vn(t)||ao(t))},lf=function(t,e){return t!=null&&Ud(t,e,Fd)},os=function(t,e){return _n(t)&&st(e)?et(Go(t),e):function(n){var r=pa(n,t);return r===void 0&&r===e?lf(n,t):Ee(e,r,3)}},da=function(t){return t},Ac=function(t){return function(e){return e==null?void 0:e[t]}},Gd=function(t){return function(e){return Ho(e,t)}},ff=function(t){return _n(t)?Ac(Go(t)):Gd(t)},Mc=function(t){return typeof t=="function"?t:t==null?da:typeof t=="object"?vn(t)?os(t[0],t[1]):hn(t):ff(t)},pf=function(t){return function(e,n,r){for(var a=-1,i=Object(e),s=r(e),h=s.length;h--;){var m=s[++a];if(n(i[m],m,i)===!1)break}return e}}(),Zn=function(t,e){return function(n,r){if(n==null)return n;if(!Rn(n))return t(n,r);for(var a=n.length,i=-1,s=Object(n);++i<a&&r(s[i],i,s)!==!1;);return n}}(function(t,e){return t&&pf(t,e,Ci)}),lr=function(t,e){var n=-1,r=Rn(t)?Array(t.length):[];return Zn(t,function(a,i,s){r[++n]=e(a,i,s)}),r},is=function(t,e){return(vn(t)?at:lr)(t,Mc(e))};Object(d.n)({isolateGlobalState:!0});var as=function(){try{var t=$r(Object,"defineProperty");return t({},"",{}),t}catch(e){}}(),us=function(t,e,n){e=="__proto__"&&as?as(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n},Hd=Object.prototype.hasOwnProperty,ha=function(t,e,n){var r=t[e];Hd.call(t,e)&&on(r,n)&&(n!==void 0||e in t)||us(t,e,n)},ya=function(t,e,n,r){var a=!n;n||(n={});for(var i=-1,s=e.length;++i<s;){var h=e[i],m=void 0;m===void 0&&(m=t[h]),a?us(n,h,m):ha(n,h,m)}return n},kc=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)},Li=Math.max,va=function(t,e,n){return e=Li(e===void 0?t.length-1:e,0),function(){for(var r=arguments,a=-1,i=Li(r.length-e,0),s=Array(i);++a<i;)s[a]=r[e+a];a=-1;for(var h=Array(e+1);++a<e;)h[a]=r[a];return h[e]=n(s),kc(t,this,h)}},pu=function(t){return function(){return t}},ss=as?function(t,e){return as(t,"toString",{configurable:!0,enumerable:!1,value:pu(e),writable:!0})}:da,ga=Date.now,Xd=function(t){var e=0,n=0;return function(){var r=ga(),a=16-(r-n);if(n=r,a>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}},df=Xd(ss),Yd=function(t,e){return df(va(t,e,da),t+"")},Wd=function(t,e,n){if(!xn(n))return!1;var r=typeof e;return!!(r=="number"?Rn(n)&&mr(e,n.length):r=="string"&&e in n)&&on(n[e],t)},hf=function(t){return Yd(function(e,n){var r=-1,a=n.length,i=a>1?n[a-1]:void 0,s=a>2?n[2]:void 0;for(i=t.length>3&&typeof i=="function"?(a--,i):void 0,s&&Wd(n[0],n[1],s)&&(i=a<3?void 0:i,a=1),e=Object(e);++r<a;){var h=n[r];h&&t(e,h,r,i)}return e})},cs=Object.prototype.hasOwnProperty,or=hf(function(t,e){if(Ao(e)||Rn(e))ya(e,Ci(e),t);else for(var n in e)cs.call(e,n)&&ha(t,n,e[n])}),yf=function(t,e,n,r){if(!xn(t))return t;for(var a=-1,i=(e=fi(e,t)).length,s=i-1,h=t;h!=null&&++a<i;){var m=Go(e[a]),x=n;if(m==="__proto__"||m==="constructor"||m==="prototype")return t;if(a!=s){var S=h[m];(x=void 0)==void 0&&(x=xn(S)?S:mr(e[a+1])?[]:{})}ha(h,m,x),h=h[m]}return t},B=function(t,e,n){for(var r=-1,a=e.length,i={};++r<a;){var s=e[r],h=Ho(t,s);n(h,s)&&yf(i,fi(s,t),h)}return i},ma=function(t,e){return B(t,e,function(n,r){return lf(t,r)})},du=Gt?Gt.isConcatSpreadable:void 0,Zr=function(t){return vn(t)||ao(t)||!!(du&&t&&t[du])},Qt=function(e,n,r,a,i){var s=-1,h=e.length;for(r||(r=Zr),i||(i=[]);++s<h;){var m=e[s];r(m)?So(i,m):i[i.length]=m}return i},zi=function(t){return t!=null&&t.length?Qt(t):[]},yn,To,pi,Jr,Tc,Dc,vf,gf,ls,ba,hu,mf,Nc,Do,fs,di,Gr,Cc,Rc,Xo=function(t){return df(va(t,void 0,zi),t+"")}(function(t,e){return t==null?{}:ma(t,e)});function On(t,e,n,r){n&&Object.defineProperty(t,e,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function bf(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function _f(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function In(t,e,n,r,a){var i={};return Object.keys(r).forEach(function(s){i[s]=r[s]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce(function(s,h){return h(t,e,s)||s},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(t,e,i),i=null),i}var cn,tr,Yt,Bn,pt,mn,ps={stopZoomGraph:!1,stopScrollGraph:!1,stopMoveGraph:!1,adjustEdge:!1,adjustEdgeStartAndEnd:!1,adjustNodePosition:!1,hideAnchors:!0,allowRotation:!1,nodeSelectedOutline:!0,nodeTextEdit:!1,edgeTextEdit:!1,nodeTextDraggable:!1,edgeTextDraggable:!1},Yo=["isSilentMode","stopZoomGraph","stopScrollGraph","stopMoveGraph","adjustEdge","adjustEdgeMiddle","adjustEdgeStartAndEnd","adjustNodePosition","hideAnchors","allowRotation","hoverOutline","nodeSelectedOutline","edgeSelectedOutline","nodeTextEdit","edgeTextEdit","nodeTextDraggable","edgeTextDraggable","multipleSelectKey","autoExpand"],Ic=(To=In((yn=function(){function t(r){(function(a,i){if(!(a instanceof i))throw new TypeError("Cannot call a class as a function")})(this,t),On(this,"isSilentMode",To,this),On(this,"stopZoomGraph",pi,this),On(this,"stopScrollGraph",Jr,this),On(this,"stopMoveGraph",Tc,this),On(this,"adjustEdge",Dc,this),On(this,"adjustEdgeMiddle",vf,this),On(this,"adjustEdgeStartAndEnd",gf,this),On(this,"adjustNodePosition",ls,this),On(this,"hideAnchors",ba,this),On(this,"allowRotation",hu,this),On(this,"hoverOutline",mf,this),On(this,"nodeSelectedOutline",Nc,this),On(this,"edgeSelectedOutline",Do,this),On(this,"nodeTextEdit",fs,this),On(this,"edgeTextEdit",di,this),On(this,"nodeTextDraggable",Gr,this),On(this,"edgeTextDraggable",Cc,this),On(this,"autoExpand",Rc,this),_f(this,"multipleSelectKey",""),_f(this,"defaultConfig",{}),or(this,this.getConfigDetail(r))}var e,n;return e=t,(n=[{key:"updateEditConfig",value:function(r){var a=this.getConfigDetail(r);or(this,a)}},{key:"getConfigDetail",value:function(r){var a=r.isSilentMode,i=r.textEdit,s={};if(a===!1&&or(s,this.defaultConfig),a===!0&&a!==this.isSilentMode){var h=Xo(ps,Yo);this.defaultConfig={stopZoomGraph:this.stopZoomGraph,stopScrollGraph:this.stopScrollGraph,stopMoveGraph:this.stopMoveGraph,adjustEdge:this.adjustEdge,adjustEdgeMiddle:this.adjustEdgeMiddle,adjustEdgeStartAndEnd:this.adjustEdgeStartAndEnd,adjustNodePosition:this.adjustNodePosition,hideAnchors:this.hideAnchors,allowRotation:this.allowRotation,hoverOutline:this.hoverOutline,nodeSelectedOutline:this.nodeSelectedOutline,edgeSelectedOutline:this.edgeSelectedOutline,nodeTextEdit:this.nodeTextEdit,edgeTextEdit:this.edgeTextEdit,nodeTextDraggable:this.nodeTextDraggable,edgeTextDraggable:this.edgeTextDraggable,autoExpand:this.autoExpand},or(s,h)}i===!1&&or(s,{nodeTextEdit:!1,edgeTextEdit:!1});var m=Xo(r,Yo);return or(s,m)}},{key:"getConfig",value:function(){return Xo(this,Yo)}}])&&bf(e.prototype,n),t}()).prototype,"isSilentMode",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),pi=In(yn.prototype,"stopZoomGraph",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Jr=In(yn.prototype,"stopScrollGraph",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Tc=In(yn.prototype,"stopMoveGraph",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Dc=In(yn.prototype,"adjustEdge",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),vf=In(yn.prototype,"adjustEdgeMiddle",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),gf=In(yn.prototype,"adjustEdgeStartAndEnd",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),ls=In(yn.prototype,"adjustNodePosition",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),ba=In(yn.prototype,"hideAnchors",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),hu=In(yn.prototype,"allowRotation",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),mf=In(yn.prototype,"hoverOutline",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Nc=In(yn.prototype,"nodeSelectedOutline",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Do=In(yn.prototype,"edgeSelectedOutline",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),fs=In(yn.prototype,"nodeTextEdit",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),di=In(yn.prototype,"edgeTextEdit",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),Gr=In(yn.prototype,"nodeTextDraggable",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Cc=In(yn.prototype,"edgeTextDraggable",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Rc=In(yn.prototype,"autoExpand",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),In(yn.prototype,"updateEditConfig",[d.k],Object.getOwnPropertyDescriptor(yn.prototype,"updateEditConfig"),yn.prototype),yn);o(65),o(66),function(t){t[t.DEFAULT=1]="DEFAULT",t[t.TEXT_EDIT=2]="TEXT_EDIT",t[t.SHOW_MENU=3]="SHOW_MENU",t[t.ALLOW_CONNECT=4]="ALLOW_CONNECT",t[t.NOT_ALLOW_CONNECT=5]="NOT_ALLOW_CONNECT"}(cn||(cn={})),function(t){t.KEY="logic-flow",t.NODE_NAME="lf-node",t.EDGE_NAME="lf-edge"}(tr||(tr={})),function(t){t.NODE="node",t.CIRCLE_NODE="circle-node",t.POLYGON_NODE="polygon-node",t.RECT_NODE="rect-node",t.TEXT_NODE="text-node",t.ELLIPSE_NODE="ellipse-node",t.DIAMOND_NODE="diamond-node",t.HTML_NODE="html-node",t.EDGE="edge",t.LINE_EDGE="line-edge",t.POLYLINE_EDGE="polyline-edge",t.BEZIER_EDGE="bezier-edge",t.GRAPH="graph"}(Yt||(Yt={})),function(t){t.NODE="node",t.EDGE="edge",t.GRAPH="graph"}(Bn||(Bn={})),function(t){t.ELEMENT_CLICK="element:click",t.NODE_CLICK="node:click",t.NODE_DBCLICK="node:dbclick",t.NODE_DELETE="node:delete",t.NODE_ADD="node:add",t.NODE_GROUP_COPY="node:group-copy-add",t.NODE_DND_ADD="node:dnd-add",t.NODE_DND_DRAG="node:dnd-drag",t.NODE_MOUSEDOWN="node:mousedown",t.NODE_DRAGSTART="node:dragstart",t.NODE_DRAG="node:drag",t.NODE_DROP="node:drop",t.NODE_MOUSEUP="node:mouseup",t.NODE_MOUSEMOVE="node:mousemove",t.NODE_MOUSEENTER="node:mouseenter",t.NODE_MOUSELEAVE="node:mouseleave",t.NODE_CONTEXTMENU="node:contextmenu",t.NODE_ROTATE="node:rotate",t.EDGE_DELETE="edge:delete",t.EDGE_ADD="edge:add",t.EDGE_CLICK="edge:click",t.EDGE_DBCLICK="edge:dbclick",t.EDGE_MOUSEENTER="edge:mouseenter",t.EDGE_MOUSELEAVE="edge:mouseleave",t.EDGE_CONTEXTMENU="edge:contextmenu",t.EDGE_ADJUST="edge:adjust",t.EDGE_EXCHANGE_NODE="edge:exchange-node",t.ANCHOR_DRAGSTART="anchor:dragstart",t.ANCHOR_DRAG="anchor:drag",t.ANCHOR_DROP="anchor:drop",t.ANCHOR_DRAGEND="anchor:dragend",t.ADJUST_POINT_MOUSEDOWN="adjustPoint:mousedown",t.ADJUST_POINT_MOUSEUP="adjustPoint:mouseup",t.ADJUST_POINT_MOUSEMOVE="adjustPoint:mousemove",t.ADJUST_POINT_DRAGSTART="adjustPoint:dragstart",t.ADJUST_POINT_DRAG="adjustPoint:drag",t.ADJUST_POINT_DROP="adjustPoint:drop",t.ADJUST_POINT_DRAGEND="adjustPoint:dragend",t.BLANK_MOUSEDOWN="blank:mousedown",t.BLANK_DRAGSTART="blank:dragstart",t.BLANK_DRAG="blank:drag",t.BLANK_DROP="blank:drop",t.BLANK_MOUSEMOVE="blank:mousemove",t.BLANK_MOUSEUP="blank:mouseup",t.BLANK_CLICK="blank:click",t.BLANK_CONTEXTMENU="blank:contextmenu",t.SELECTION_MOUSEDOWN="selection:mousedown",t.SELECTION_DRAGSTART="selection:dragstart",t.SELECTION_DRAG="selection:drag",t.SELECTION_DROP="selection:drop",t.SELECTION_MOUSEMOVE="selection:mousemove",t.SELECTION_MOUSEUP="selection:mouseup",t.SELECTION_CONTEXTMENU="selection:contextmenu",t.CONNECTION_NOT_ALLOWED="connection:not-allowed",t.HISTORY_CHANGE="history:change",t.TEXT_UPDATE="text:update",t.GRAPH_TRANSFORM="graph:transform",t.GRAPH_RENDERED="graph:rendered"}(pt||(pt={})),function(t){t.HORIZONTAL="horizontal",t.VERTICAL="vertical"}(mn||(mn={}));var Sn,Mn,Of,wf,ds,_a,Lc,Oa,hs;function wa(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,s,h=[],m=!0,x=!1;try{for(a=a.call(n);!(m=(i=a.next()).done)&&(h.push(i.value),!r||h.length!==r);m=!0);}catch(S){x=!0,s=S}finally{try{m||a.return==null||a.return()}finally{if(x)throw s}}return h}}(t,e)||function(n,r){if(n){if(typeof n=="string")return zc(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 zc(n,r)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  53. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function zc(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Wo(t,e,n,r){n&&Object.defineProperty(t,e,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function Vd(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Vo(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Qr(t,e,n,r,a){var i={};return Object.keys(r).forEach(function(s){i[s]=r[s]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce(function(s,h){return h(t,e,s)||s},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(t,e,i),i=null),i}(function(t){t[t.DEFAULT=0]="DEFAULT",t[t.INCREASE=1]="INCREASE"})(Sn||(Sn={}));var xf={false:[-1/0,-1/0,1/0,1/0],true:[0,0,0,0],vertical:[-1/0,0,1/0,0],horizontal:[0,-1/0,0,1/0]},Ef=(Mn=function(){function t(r,a){(function(h,m){if(!(h instanceof m))throw new TypeError("Cannot call a class as a function")})(this,t),Vo(this,"MINI_SCALE_SIZE",.2),Vo(this,"MAX_SCALE_SIZE",16),Wo(this,"SCALE_X",Of,this),Wo(this,"SKEW_Y",wf,this),Wo(this,"SKEW_X",ds,this),Wo(this,"SCALE_Y",_a,this),Wo(this,"TRANSLATE_X",Lc,this),Wo(this,"TRANSLATE_Y",Oa,this),Wo(this,"ZOOM_SIZE",hs,this),Vo(this,"eventCenter",void 0),Vo(this,"translateLimitMinX",void 0),Vo(this,"translateLimitMinY",void 0),Vo(this,"translateLimitMaxX",void 0),Vo(this,"translateLimitMaxY",void 0),this.eventCenter=r;var i=a.stopMoveGraph,s=i!==void 0&&i;this.updateTranslateLimits(s)}var e,n;return e=t,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=wa(r,2),i=a[0],s=a[1];return[(i-this.TRANSLATE_X)/this.SCALE_X,(s-this.TRANSLATE_Y)/this.SCALE_Y]}},{key:"CanvasPointToHtmlPoint",value:function(r){var a=wa(r,2),i=a[0],s=a[1];return[i*this.SCALE_X+this.TRANSLATE_X,s*this.SCALE_Y+this.TRANSLATE_Y]}},{key:"moveCanvasPointByHtml",value:function(r,a,i){var s=wa(r,2),h=s[0],m=s[1];return[h+a/this.SCALE_X,m+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,s=this.SCALE_Y;return r===!0?(i+=this.ZOOM_SIZE,s+=this.ZOOM_SIZE):r===!1?(i-=this.ZOOM_SIZE,s-=this.ZOOM_SIZE):typeof r=="number"&&(i=r,s=r),i<this.MINI_SCALE_SIZE||i>this.MAX_SCALE_SIZE||(a&&(this.TRANSLATE_X-=(i-this.SCALE_X)*a[0],this.TRANSLATE_Y-=(s-this.SCALE_Y)*a[1]),this.SCALE_X=i,this.SCALE_Y=s,this.emitGraphTransform("zoom")),"".concat(100*this.SCALE_X,"%")}},{key:"emitGraphTransform",value:function(r){this.eventCenter.emit(pt.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.translateLimitMaxX&&this.TRANSLATE_X+r>=this.translateLimitMinX&&(this.TRANSLATE_X+=r),this.TRANSLATE_Y+a<=this.translateLimitMaxY&&this.TRANSLATE_Y+a>=this.translateLimitMinY&&(this.TRANSLATE_Y+=a),this.emitGraphTransform("translate")}},{key:"focusOn",value:function(r,a,i,s){var h=wa(this.CanvasPointToHtmlPoint([r,a]),2),m=i/2-h[0],x=s/2-h[1];this.TRANSLATE_X+=m,this.TRANSLATE_Y+=x,this.emitGraphTransform("focusOn")}},{key:"updateTranslateLimits",value:function(r){var a=wa(Array.isArray(r)&&r.length===4?r:xf[r.toString()],4);this.translateLimitMinX=a[0],this.translateLimitMinY=a[1],this.translateLimitMaxX=a[2],this.translateLimitMaxY=a[3]}}],n&&Vd(e.prototype,n),t}(),Of=Qr(Mn.prototype,"SCALE_X",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),wf=Qr(Mn.prototype,"SKEW_Y",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),ds=Qr(Mn.prototype,"SKEW_X",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),_a=Qr(Mn.prototype,"SCALE_Y",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Lc=Qr(Mn.prototype,"TRANSLATE_X",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Oa=Qr(Mn.prototype,"TRANSLATE_Y",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),hs=Qr(Mn.prototype,"ZOOM_SIZE",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return .04}}),Qr(Mn.prototype,"zoom",[d.k],Object.getOwnPropertyDescriptor(Mn.prototype,"zoom"),Mn.prototype),Qr(Mn.prototype,"resetZoom",[d.k],Object.getOwnPropertyDescriptor(Mn.prototype,"resetZoom"),Mn.prototype),Qr(Mn.prototype,"translate",[d.k],Object.getOwnPropertyDescriptor(Mn.prototype,"translate"),Mn.prototype),Qr(Mn.prototype,"focusOn",[d.k],Object.getOwnPropertyDescriptor(Mn.prototype,"focusOn"),Mn.prototype),Mn),ys=function(t,e){for(var n=-1,r=t==null?0:t.length;++n<r&&e(t[n],n,t)!==!1;);return t},Sf=function(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e},jf=Object.prototype.hasOwnProperty,Pf=function(t){if(!xn(t))return Sf(t);var e=Ao(t),n=[];for(var r in t)(r!="constructor"||!e&&jf.call(t,r))&&n.push(r);return n},vs=function(t){return Rn(t)?En(t,!0):Pf(t)},Bc=o(107),Fc=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e},gs=Br(Object.getPrototypeOf,Object),Vt=Object.prototype.hasOwnProperty,Kd=function(t){var e=t.length,n=new t.constructor(e);return e&&typeof t[0]=="string"&&Vt.call(t,"index")&&(n.index=t.index,n.input=t.input),n},Uc=function(t){var e=new t.constructor(t.byteLength);return new er(e).set(new er(t)),e},yu=function(t,e){var n=Uc(t.buffer);return new t.constructor(n,t.byteOffset,t.byteLength)},Af=/\w*$/,$d=function(t){var e=new t.constructor(t.source,Af.exec(t));return e.lastIndex=t.lastIndex,e},Mf=Gt?Gt.prototype:void 0,Hr=Mf?Mf.valueOf:void 0,qd=function(t){return Hr?Object(Hr.call(t)):{}},vu=function(t,e){var n=e?Uc(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)},Gc=function(t,e,n){var r=t.constructor;switch(e){case"[object ArrayBuffer]":return Uc(t);case"[object Boolean]":case"[object Date]":return new r(+t);case"[object DataView]":return yu(t);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 vu(t,n);case"[object Map]":case"[object Set]":return new r;case"[object Number]":case"[object String]":return new r(t);case"[object RegExp]":return $d(t);case"[object Symbol]":return qd(t)}},Hc=Object.create,kf=function(){function t(){}return function(e){if(!xn(e))return{};if(Hc)return Hc(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}(),kr=function(t){return typeof t.constructor!="function"||Ao(t)?{}:kf(gs(t))},hi=function(t){return en(t)&&_(t)=="[object Map]"},ms=qn.a&&qn.a.isMap,Tf=ms?uo(ms):hi,bs=function(t){return en(t)&&_(t)=="[object Set]"},Xc=qn.a&&qn.a.isSet,Yc=Xc?uo(Xc):bs,Wc="[object Arguments]",_s="[object Function]",Vc="[object Object]",un={};un[Wc]=un["[object Array]"]=un["[object ArrayBuffer]"]=un["[object DataView]"]=un["[object Boolean]"]=un["[object Date]"]=un["[object Float32Array]"]=un["[object Float64Array]"]=un["[object Int8Array]"]=un["[object Int16Array]"]=un["[object Int32Array]"]=un["[object Map]"]=un["[object Number]"]=un["[object Object]"]=un["[object RegExp]"]=un["[object Set]"]=un["[object String]"]=un["[object Symbol]"]=un["[object Uint8Array]"]=un["[object Uint8ClampedArray]"]=un["[object Uint16Array]"]=un["[object Uint32Array]"]=!0,un["[object Error]"]=un[_s]=un["[object WeakMap]"]=!1;var Zd=function t(e,n,r,a,i,s){var h,m=1&n;if(h!==void 0)return h;if(!xn(e))return e;var x=vn(e);if(x)h=Kd(e);else{var S=_(e),D=S==_s||S=="[object GeneratorFunction]";if(Object(jo.a)(e))return Object(Bc.a)(e,m);if(S==Vc||S==Wc||D&&!i)h=D?{}:kr(e);else{if(!un[S])return i?e:{};h=Gc(e,S,m)}}s||(s=new Eo);var I=s.get(e);if(I)return I;s.set(e,h),Yc(e)?e.forEach(function(q){h.add(t(q,n,r,q,e,s))}):Tf(e)&&e.forEach(function(q,ee){h.set(ee,t(q,n,r,ee,e,s))});var X=x?void 0:so(e);return ys(X||e,function(q,ee){X&&(q=e[ee=q]),ha(h,ee,t(q,n,r,ee,e,s))}),h},fn=function(t){return Zd(t,5)},Os=function(t,e,n){(n!==void 0&&!on(t[e],n)||n===void 0&&!(e in t))&&us(t,e,n)},Df=function(t){return en(t)&&Rn(t)},Kc=Function.prototype,Nf=Object.prototype,$c=Kc.toString,Cf=Nf.hasOwnProperty,Rf=$c.call(Object),Tr=function(t){if(!en(t)||ln(t)!="[object Object]")return!1;var e=gs(t);if(e===null)return!0;var n=Cf.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&$c.call(n)==Rf},fo=function(t,e){if((e!=="constructor"||typeof t[e]!="function")&&e!="__proto__")return t[e]},ws=function(t){return ya(t,vs(t))},xa=function(t,e,n,r,a,i,s){var h=fo(t,n),m=fo(e,n),x=s.get(m);if(x)Os(t,n,x);else{var S=void 0,D=S===void 0;if(D){var I=vn(m),X=!I&&Object(jo.a)(m),q=!I&&!X&&Ni(m);S=m,I||X||q?vn(h)?S=h:Df(h)?S=Fc(h):X?(D=!1,S=Object(Bc.a)(m,!0)):q?(D=!1,S=vu(m,!0)):S=[]:Tr(m)||ao(m)?(S=h,ao(h)?S=ws(h):xn(h)&&!io(h)||(S=kr(m))):D=!1}D&&(s.set(m,S),a(S,m,r,i,s),s.delete(m)),Os(t,n,S)}},If=function t(e,n,r,a,i){e!==n&&pf(n,function(s,h){if(i||(i=new Eo),xn(s))xa(e,n,h,r,t,a,i);else{var m=void 0;m===void 0&&(m=s),Os(e,h,m)}},vs)},gu=hf(function(t,e,n){If(t,e,n)}),Lf={baseNode:{fill:"#FFFFFF",stroke:"#000000",strokeWidth:2},baseEdge:{stroke:"#000000",strokeWidth:2},rect:{},circle:{},diamond:{},ellipse:{},polygon:{},text:{color:"#000000",stroke:"none",fontSize:12,background:{fill:"transparent"}},anchor:{stroke:"#000000",fill:"#FFFFFF",r:4,hover:{fill:"#949494",fillOpacity:.5,stroke:"#949494",r:10}},nodeText:{color:"#000000",overflowMode:"default",lineHeight:1.2,fontSize:12},edgeText:{textWidth:100,overflowMode:"default",fontSize:12,background:{fill:"#FFFFFF"}},line:{},polyline:{},bezier:{fill:"none",adjustLine:{stroke:"#949494"},adjustAnchor:{r:4,fill:"#949494",stroke:"#949494",fillOpacity:1}},arrow:{offset:10,verticalLength:5},anchorLine:{stroke:"#000000",strokeWidth:2,strokeDasharray:"3,2"},snapline:{stroke:"#949494",strokeWidth:1},edgeAdjust:{r:4,fill:"#FFFFFF",stroke:"#949494",strokeWidth:2},outline:{fill:"transparent",stroke:"#949494",strokeDasharray:"3,3",hover:{stroke:"#949494"}},edgeAnimation:{stroke:"red",strokeDasharray:"10 10",strokeDashoffset:"100%",animationName:"lf_animate_dash",animationDuration:"20s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"normal"},rotateControl:{stroke:"#000",fill:"#fff",strokeWidth:1.5}},Bi=function(t){var e=fn(Lf);return t&&(e=gu(e,t)),e};o(82),o(166);function mu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var zf=function(){function t(){var r,a,i;(function(s,h){if(!(s instanceof h))throw new TypeError("Cannot call a class as a function")})(this,t),i={},(a="_events")in(r=this)?Object.defineProperty(r,a,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[a]=i}var e,n;return e=t,(n=[{key:"on",value:function(r,a,i){var s=this;return r==null||r.split(",").forEach(function(h){h=h.trim(),s._events[h]||(s._events[h]=[]),s._events[h].push({callback:a,once:!!i})}),this}},{key:"once",value:function(r,a){var i=this;r==null||r.split(",").forEach(function(s){return s=s.trim(),i.on(s,a,!0)})}},{key:"emit",value:function(r,a){var i=this;r==null||r.split(",").forEach(function(s){var h=i._events[s]||[],m=i._events["*"]||[],x=function(S){for(var D=S.length,I=0;I<D;I++)if(S[I]){var X=S[I],q=X.callback;X.once&&(S.splice(I,1),S.length===0&&delete i._events[s],D--,I--),q.apply(i,[a])}};x(h),x(m)})}},{key:"off",value:function(r,a){var i=this;return r||(this._events={}),r.split(",").forEach(function(s){if(a){for(var h=i._events[s]||[],m=h.length,x=0;x<m;x++)h[x].callback===a&&(h.splice(x,1),m--,x--);h.length===0&&delete i._events[s]}else delete i._events[s]}),this}},{key:"getEvents",value:function(){return this._events}}])&&mu(e.prototype,n),t}();function yi(t,e){return e*Math.round(t/e)||t}function xs(t,e){return t%e}function Es(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,s,h=[],m=!0,x=!1;try{for(a=a.call(n);!(m=(i=a.next()).done)&&(h.push(i.value),!r||h.length!==r);m=!0);}catch(S){x=!0,s=S}finally{try{m||a.return==null||a.return()}finally{if(x)throw s}}return h}}(t,e)||function(n,r){if(n){if(typeof n=="string")return bu(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 bu(n,r)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  54. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function bu(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var _u=function(t,e,n){var r=Es(t,2),a=r[0],i=r[1],s=Es(e,2),h=s[0],m=s[1],x=Es(n,2),S=x[0],D=x[1];return a>h&&a<S&&i>m&&i<D},Ou=function(t,e){var n=!1;switch(e.multipleSelectKey){case"meta":n=t.metaKey;break;case"alt":n=t.altKey;break;case"shift":n=t.shiftKey;break;case"ctrl":n=t.ctrlKey;break;default:n=!1}return n};o(167),o(126),o(83),o(29),o(12),o(13),o(14),o(47);var Bf=function(t){return function(e,n,r){var a=Object(e);if(!Rn(e)){var i=Mc(n);e=Ci(e),n=function(h){return i(a[h],h,a)}}var s=t(e,n,r);return s>-1?a[i?e[s]:s]:void 0}},Ss=function(t,e,n,r){for(var a=t.length,i=n+-1;++i<a;)if(e(t[i],i,t))return i;return-1},Ff=/\s/,qc=function(t){for(var e=t.length;e--&&Ff.test(t.charAt(e)););return e},Jd=/^\s+/,Uf=function(t){return t&&t.slice(0,qc(t)+1).replace(Jd,"")},Ko=/^[-+]0x[0-9a-f]+$/i,Gf=/^0b[01]+$/i,Hf=/^0o[0-7]+$/i,Qd=parseInt,js=function(t){if(typeof t=="number")return t;if(Bt(t))return NaN;if(xn(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=xn(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=Uf(t);var n=Gf.test(t);return n||Hf.test(t)?Qd(t.slice(2),n?2:8):Ko.test(t)?NaN:+t},$o=1/0,Zc=function(t){return t?(t=js(t))===$o||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:t===0?t:0},Jc=function(t){var e=Zc(t),n=e%1;return e==e?n?e-n:e:0},Qc=Math.max,Ea,Fi=Bf(function(t,e,n){var r=t==null?0:t.length;if(!r)return-1;var a=n==null?0:Jc(n);return a<0&&(a=Qc(r+a,0)),Ss(t,Mc(e),a)}),At=new Uint8Array(16);function Ps(){if(!Ea&&!(Ea=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&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 Ea(At)}for(var el=/^(?:[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,Ui=function(t){return typeof t=="string"&&el.test(t)},Jn=[],As=0;As<256;++As)Jn.push((As+256).toString(16).substr(1));var fr=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=(Jn[t[e+0]]+Jn[t[e+1]]+Jn[t[e+2]]+Jn[t[e+3]]+"-"+Jn[t[e+4]]+Jn[t[e+5]]+"-"+Jn[t[e+6]]+Jn[t[e+7]]+"-"+Jn[t[e+8]]+Jn[t[e+9]]+"-"+Jn[t[e+10]]+Jn[t[e+11]]+Jn[t[e+12]]+Jn[t[e+13]]+Jn[t[e+14]]+Jn[t[e+15]]).toLowerCase();if(!Ui(n))throw TypeError("Stringified UUID is invalid");return n},Ms=function(t,e,n){var r=(t=t||{}).random||(t.rng||Ps)();return r[6]=15&r[6]|64,r[8]=63&r[8]|128,fr(r)},qo=function(){return Ms()},eh=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",n=t.nodes.reduce(function(r,a){return r[a.id]=e+Ms(),a.id=r[a.id],r},{});return t.edges.forEach(function(r){r.id=e+Ms(),r.sourceNodeId=n[r.sourceNodeId],r.targetNodeId=n[r.targetNodeId]}),t},Xr=(o(105),o(127),o(207),function(t,e,n){var r=t.x,a=t.y,i=e.x,s=e.y,h=n.x,m=n.y,x=(m-s)/(h-i),S=s-x*i;return r>=i&&r<=h&&a>=s&&a<=m&&Math.abs(a-x*r+S)<Number.EPSILON});function ir(t){return ir=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ir(t)}function ks(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function Ts(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ks(Object(n),!0).forEach(function(r){th(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ks(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function th(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ke,tl,nl,rl,ol,Xf,Ds,il,Sa,Ns,al,ul,wu,sl,po,vi,cl,Yf,Wf,Vf,ll,Cs=function(t){return t.anchors},xu=function(t,e){for(var n,r=e.nodes,a=r.length-1;a>=0;a--){var i=r[a];if(nh(t,i)){var s=i.getTargetAnchor(t);if(s){var h={node:i,anchorIndex:s.index,anchor:s.anchor};n&&!Kf(i,n.node,e)||(n=h)}}}return n},Kf=function(t,e,n){return t.zIndex>e.zIndex||n.nodesMap[t.id].index>n.nodesMap[e.id].index},ho=function(t,e,n,r){return Math.hypot(t-n,e-r)},gi=function(t,e){var n=!1,r=jn(e);return t.x>=r.minX-0&&t.x<=r.maxX+0&&t.y>=r.minY-0&&t.y<=r.maxY+0&&(n=!0),n},nh=function(t,e){var n=!1,r=jn(e);return t.x>=r.minX-5&&t.x<=r.maxX+5&&t.y>=r.minY-5&&t.y<=r.maxY+5&&(n=!0),n},jn=function(t){var e=t.x,n=t.y,r=t.width,a=t.height;return{minX:e-r/2,minY:n-a/2,maxX:e+r/2,maxY:n+a/2,x:e,y:n,width:r,height:a,centerX:e,centerY:n}},$f=function(t,e,n){var r,a=function(s){var h=s,m=h.x,x=h.y,S=h.width,D=h.height,I=h.radius;return[{x:m-S/2+I,y:x-D/2+I,r:I},{x:m+S/2-I,y:x-D/2+I,r:I},{x:m-S/2+I,y:x+D/2-I,r:I},{x:m+S/2-I,y:x+D/2-I,r:I}]}(n),i=Number.MAX_SAFE_INTEGER;return a.forEach(function(s){var h=ho(t.x,t.y,s.x,s.y);h<i&&(i=h,r=s)}),Rs(t,e,r)},Rs=function(t,e,n){var r,a=n,i=a.x,s=a.y,h=a.r;if(e===mn.HORIZONTAL){var m=i-Math.sqrt(h*h-(t.y-s)*(t.y-s)),x=i+Math.sqrt(h*h-(t.y-s)*(t.y-s));r={x:Math.abs(m-t.x)<Math.abs(x-t.x)?m:x,y:t.y}}else if(e===mn.VERTICAL){var S=s-Math.sqrt(h*h-(t.x-i)*(t.x-i)),D=s+Math.sqrt(h*h-(t.x-i)*(t.x-i)),I=Math.abs(S-t.y)<Math.abs(D-t.y)?S:D;r={x:t.x,y:I}}return r},qf=function(t,e){var n=e,r=!1,a=n.x-n.width/2+n.radius,i=n.x+n.width/2-n.radius,s=n.y-n.height/2+n.radius,h=n.y+n.height/2-n.radius,m=n.x,x=n.y,S=n.width,D=n.height;return t.y===x+D/2||t.y===x-D/2?r=t.x>a&&t.x<i:t.x!==m+S/2&&t.x!==m-S/2||(r=t.y>s&&t.y<h),r},Is=function(t,e,n){var r,a=n,i=a.x,s=a.y,h=a.rx,m=a.ry;if(e===mn.HORIZONTAL){var x=i-Math.sqrt(h*h-(t.y-s)*(t.y-s)*h*h/(m*m)),S=i+Math.sqrt(h*h-(t.y-s)*(t.y-s)*h*h/(m*m));r={x:Math.abs(x-t.x)<Math.abs(S-t.x)?x:S,y:t.y}}else if(e===mn.VERTICAL){var D=s-Math.sqrt(m*m-(t.x-i)*(t.x-i)*m*m/(h*h)),I=s+Math.sqrt(m*m-(t.x-i)*(t.x-i)*m*m/(h*h)),X=Math.abs(D-t.y)<Math.abs(I-t.y)?D:I;r={x:t.x,y:X}}return r},Zf=function(t,e,n){for(var r,a=n.pointsPosition,i=Number.MAX_SAFE_INTEGER,s=[],h=0;h<a.length;h++)s.push({start:a[h],end:a[(h+1)%a.length]});return s.forEach(function(m){var x=m.start,S=m.end,D=x,I=S;x.x>S.x&&(D=S,I=x);var X={x:t.x,y:t.y};if(D.x===I.x&&e===mn.HORIZONTAL&&(X={x:D.x,y:t.y}),D.y===I.y&&e===mn.VERTICAL&&(X={x:t.x,y:D.y}),D.x!==I.x&&D.y!==I.y){var q=(I.y-D.y)/(I.x-D.x),ee=(D.x*I.y-I.x*D.y)/(D.x-I.x);e===mn.HORIZONTAL?X={x:(t.y-ee)/q,y:t.y}:e===mn.VERTICAL&&(X={x:t.x,y:q*t.x+ee})}if(Xr(X,x,S)){var ge=ho(X.x,X.y,t.x,t.y);ge<i&&(i=ge,r=X)}}),r},Jf=function(t,e,n,r){var a=t.x,i=t.y;return e.x>t.x?a=t.x+n/2:e.x<t.x&&(a=t.x-n/2),e.y>t.y?i=t.y+r/2:e.y<t.y&&(i=t.y-r/2),{x:a,y:i}},Qf=function(t){var e=t.rows,n=t.style,r=t.rowsLength,a=t.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?e.forEach(function(h){var m=document.createElement("div");m.textContent=h,i.appendChild(m)}):i.textContent=e,document.body.appendChild(i);var s=i.clientHeight;return document.body.removeChild(i),s},Eu=function(t){var e=t.rows,n=t.rowsLength,r=t.fontSize,a=0;return e&&e.forEach(function(i){var s=Tl(i);a=s>a?s:a}),{width:Math.ceil(a/2)*r+r/4,height:n*(r+2)+r/4}},ja=function(t){return ir(t)!=="object"?{isAllPass:!!t,msg:t?"":"不允许连接"}:t},pr=function(t){try{return JSON.parse(JSON.stringify(t))}catch(e){return t}},rh=1e3,oh=999,fl=function(){return++rh};function ep(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function Dr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ep(Object(n),!0).forEach(function(r){eo(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ep(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Fn(t,e,n,r){n&&Object.defineProperty(t,e,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function Ls(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function eo(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Pt(t,e,n,r,a){var i={};return Object.keys(r).forEach(function(s){i[s]=r[s]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce(function(s,h){return h(t,e,s)||s},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(t,e,i),i=null),i}var pl=(ke=function(){function t(r,a){(function(i,s){if(!(i instanceof s))throw new TypeError("Cannot call a class as a function")})(this,t),eo(this,"id",""),Fn(this,"type",tl,this),Fn(this,"sourceNodeId",nl,this),Fn(this,"targetNodeId",rl,this),Fn(this,"startPoint",ol,this),Fn(this,"endPoint",Xf,this),Fn(this,"text",Ds,this),Fn(this,"properties",il,this),Fn(this,"points",Sa,this),Fn(this,"pointsList",Ns,this),Fn(this,"isSelected",al,this),Fn(this,"isHovered",ul,this),Fn(this,"isHitable",wu,this),Fn(this,"draggable",sl,this),Fn(this,"visible",po,this),eo(this,"virtual",!1),Fn(this,"isAnimation",vi,this),Fn(this,"isShowAdjustPoint",cl,this),eo(this,"graphModel",void 0),Fn(this,"zIndex",Yf,this),eo(this,"BaseType",Bn.EDGE),eo(this,"modelType",Yt.EDGE),Fn(this,"state",Wf,this),eo(this,"additionStateData",void 0),eo(this,"sourceAnchorId",""),eo(this,"targetAnchorId",""),eo(this,"menu",void 0),eo(this,"customTextPosition",!1),Fn(this,"style",Vf,this),Fn(this,"arrowConfig",ll,this),this.graphModel=a,this.initEdgeData(r),this.setAttributes()}var e,n;return e=t,n=[{key:"initEdgeData",value:function(r){if(r.properties||(r.properties={}),!r.id){var a=this.graphModel.idGenerator,i=a&&a(r.type),s=this.createId();r.id=s||i||qo()}this.arrowConfig.markerEnd="url(#marker-end-".concat(r.id,")"),this.arrowConfig.markerStart="url(#marker-start-".concat(r.id,")");var h=this.graphModel.editConfigModel.adjustEdgeStartAndEnd;this.isShowAdjustPoint=h,or(this,mp(r)),this.graphModel.overlapMode===Sn.INCREASE&&(this.zIndex=r.zIndex||fl()),this.setAnchors(),this.initPoints(),this.formatText(r)}},{key:"setAttributes",value:function(){}},{key:"createId",value:function(){return null}},{key:"getEdgeStyle",value:function(){return Dr(Dr({},this.graphModel.theme.baseEdge),this.style)}},{key:"getAdjustPointStyle",value:function(){return Dr({},this.graphModel.theme.edgeAdjust)}},{key:"getTextStyle",value:function(){var r=this.graphModel.theme.edgeText;return fn(r)}},{key:"getEdgeAnimationStyle",value:function(){var r=this.graphModel.theme.edgeAnimation;return fn(r)}},{key:"getArrowStyle",value:function(){var r=this.getEdgeStyle(),a=this.getEdgeAnimationStyle(),i=this.graphModel.theme.arrow,s=this.isAnimation?a.stroke:r.stroke;return Dr(Dr({},r),{},{fill:s,stroke:s},i)}},{key:"getOutlineStyle",value:function(){var r=this.graphModel.theme.outline;return fn(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,i){var s,h,m=Cs(r);return i&&(s=Fi(m,function(x){return x.id===i}))||m.forEach(function(x){var S=Cl(x,a);(h===void 0||S<h)&&(h=S,s=x)}),s}},{key:"getEndAnchor",value:function(r,a){var i,s,h=this,m=Cs(r);return a&&(i=Fi(m,function(x){return x.id===a}))||m.forEach(function(x){var S=Cl(x,h.startPoint);(s===void 0||S<s)&&(s=S,i=x)}),i}},{key:"getProperties",value:function(){return Object(d.I)(this.properties)}},{key:"getData",value:function(){var r=this.text,a=r.x,i=r.y,s=r.value,h={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(d.I)(this.properties)};return s&&(h.text={x:a,y:i,value:s}),this.graphModel.overlapMode===Sn.INCREASE&&(h.zIndex=this.zIndex),h}},{key:"getHistoryData",value:function(){return this.getData()}},{key:"setProperty",value:function(r,a){this.properties[r]=pr(a),this.setAttributes()}},{key:"deleteProperty",value:function(r){delete this.properties[r],this.setAttributes()}},{key:"setProperties",value:function(r){this.properties=Dr(Dr({},Object(d.I)(this.properties)),pr(r)),this.setAttributes()}},{key:"changeEdgeId",value:function(r){var a=this.arrowConfig,i=a.markerEnd,s=a.markerStart;s&&s==="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=Dr(Dr({},this.style),{},eo({},r,pr(a)))}},{key:"setStyles",value:function(r){this.style=Dr(Dr({},this.style),pr(r))}},{key:"updateStyles",value:function(r){this.style=Dr({},pr(r))}},{key:"formatText",value:function(r){var a=this.textPosition,i=a.x,s=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||s,value:r.text.value||"",draggable:this.text.draggable,editable:this.text.editable}):this.text={value:r.text||"",x:i,y:s,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,s=i.x,h=i.y,m=i.value,x=i.draggable,S=i.editable;this.text={value:m,draggable:x,x:s+r,y:h+a,editable:S}}}},{key:"setText",value:function(r){r&&or(this.text,r)}},{key:"updateText",value:function(r){this.text=Dr(Dr({},Object(d.I)(this.text)),{},{value:r})}},{key:"setAnchors",value:function(){if(!this.sourceAnchorId||!this.startPoint){var r=this.getBeginAnchor(this.sourceNode,this.targetNode,this.sourceAnchorId);if(!r)throw new Error("无法获取beginAnchor,请检查anchors相关逻辑,anchors不能为空");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.targetAnchorId);if(!a)throw new Error("无法获取endAnchor,请检查anchors相关逻辑,anchors不能为空");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){or(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&&Ls(e.prototype,n),t}(),tl=Pt(ke.prototype,"type",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),nl=Pt(ke.prototype,"sourceNodeId",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),rl=Pt(ke.prototype,"targetNodeId",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),ol=Pt(ke.prototype,"startPoint",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),Xf=Pt(ke.prototype,"endPoint",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return null}}),Ds=Pt(ke.prototype,"text",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{value:"",x:0,y:0,draggable:!1,editable:!0}}}),il=Pt(ke.prototype,"properties",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),Sa=Pt(ke.prototype,"points",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Ns=Pt(ke.prototype,"pointsList",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),al=Pt(ke.prototype,"isSelected",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),ul=Pt(ke.prototype,"isHovered",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),wu=Pt(ke.prototype,"isHitable",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),sl=Pt(ke.prototype,"draggable",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),po=Pt(ke.prototype,"visible",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),vi=Pt(ke.prototype,"isAnimation",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),cl=Pt(ke.prototype,"isShowAdjustPoint",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Yf=Pt(ke.prototype,"zIndex",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Wf=Pt(ke.prototype,"state",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Vf=Pt(ke.prototype,"style",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),ll=Pt(ke.prototype,"arrowConfig",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{markerEnd:"url(#marker-end-".concat(this.id,")"),markerStart:"url(#marker-start-".concat(this.id,")")}}}),Pt(ke.prototype,"sourceNode",[d.m],Object.getOwnPropertyDescriptor(ke.prototype,"sourceNode"),ke.prototype),Pt(ke.prototype,"targetNode",[d.m],Object.getOwnPropertyDescriptor(ke.prototype,"targetNode"),ke.prototype),Pt(ke.prototype,"textPosition",[d.m],Object.getOwnPropertyDescriptor(ke.prototype,"textPosition"),ke.prototype),Pt(ke.prototype,"setProperty",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"setProperty"),ke.prototype),Pt(ke.prototype,"deleteProperty",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"deleteProperty"),ke.prototype),Pt(ke.prototype,"setProperties",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"setProperties"),ke.prototype),Pt(ke.prototype,"changeEdgeId",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"changeEdgeId"),ke.prototype),Pt(ke.prototype,"setStyle",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"setStyle"),ke.prototype),Pt(ke.prototype,"setStyles",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"setStyles"),ke.prototype),Pt(ke.prototype,"updateStyles",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"updateStyles"),ke.prototype),Pt(ke.prototype,"formatText",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"formatText"),ke.prototype),Pt(ke.prototype,"resetTextPosition",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"resetTextPosition"),ke.prototype),Pt(ke.prototype,"moveText",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"moveText"),ke.prototype),Pt(ke.prototype,"setText",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"setText"),ke.prototype),Pt(ke.prototype,"updateText",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"updateText"),ke.prototype),Pt(ke.prototype,"setAnchors",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"setAnchors"),ke.prototype),Pt(ke.prototype,"setSelected",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"setSelected"),ke.prototype),Pt(ke.prototype,"setHovered",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"setHovered"),ke.prototype),Pt(ke.prototype,"setHitable",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"setHitable"),ke.prototype),Pt(ke.prototype,"openEdgeAnimation",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"openEdgeAnimation"),ke.prototype),Pt(ke.prototype,"closeEdgeAnimation",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"closeEdgeAnimation"),ke.prototype),Pt(ke.prototype,"setElementState",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"setElementState"),ke.prototype),Pt(ke.prototype,"updateStartPoint",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"updateStartPoint"),ke.prototype),Pt(ke.prototype,"moveStartPoint",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"moveStartPoint"),ke.prototype),Pt(ke.prototype,"updateEndPoint",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"updateEndPoint"),ke.prototype),Pt(ke.prototype,"moveEndPoint",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"moveEndPoint"),ke.prototype),Pt(ke.prototype,"setZIndex",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"setZIndex"),ke.prototype),Pt(ke.prototype,"initPoints",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"initPoints"),ke.prototype),Pt(ke.prototype,"updateAttributes",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"updateAttributes"),ke.prototype),Pt(ke.prototype,"getAdjustStart",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"getAdjustStart"),ke.prototype),Pt(ke.prototype,"getAdjustEnd",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"getAdjustEnd"),ke.prototype),Pt(ke.prototype,"updateAfterAdjustStartAndEnd",[d.k],Object.getOwnPropertyDescriptor(ke.prototype,"updateAfterAdjustStartAndEnd"),ke.prototype),ke),dl=pl;function zs(t){return zs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},zs(t)}function hl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function tp(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?hl(Object(n),!0).forEach(function(r){gl(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):hl(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function ih(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ah(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Pa(){return Pa=typeof Reflect!="undefined"&&Reflect.get?Reflect.get:function(t,e,n){var r=uh(t,e);if(r){var a=Object.getOwnPropertyDescriptor(r,e);return a.get?a.get.call(arguments.length<3?t:n):a.value}},Pa.apply(this,arguments)}function uh(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&(t=mi(t))!==null;);return t}function yl(t,e){return yl=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},yl(t,e)}function Bs(t){var e=function(){if(typeof Reflect=="undefined"||!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(n){return!1}}();return function(){var n,r=mi(t);if(e){var a=mi(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return np(this,n)}}function np(t,e){if(e&&(zs(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vl(t)}function vl(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function mi(t){return mi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},mi(t)}function gl(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Ct,rp,Fs=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&yl(i,s)})(a,t);var e,n,r=Bs(a);function a(){var i;ih(this,a);for(var s=arguments.length,h=new Array(s),m=0;m<s;m++)h[m]=arguments[m];return gl(vl(i=r.call.apply(r,[this].concat(h))),"modelType",Yt.LINE_EDGE),i}return e=a,(n=[{key:"getEdgeStyle",value:function(){var i=this.graphModel.theme.line;return tp(tp({},Pa(mi(a.prototype),"getEdgeStyle",this).call(this)),fn(i))}},{key:"getTextPosition",value:function(){return{x:(this.startPoint.x+this.endPoint.x)/2,y:(this.startPoint.y+this.endPoint.y)/2}}}])&&ah(e.prototype,n),a}(dl);function Aa(t){return Aa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Aa(t)}function Us(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,s,h=[],m=!0,x=!1;try{for(a=a.call(n);!(m=(i=a.next()).done)&&(h.push(i.value),!r||h.length!==r);m=!0);}catch(S){x=!0,s=S}finally{try{m||a.return==null||a.return()}finally{if(x)throw s}}return h}}(t,e)||function(n,r){if(n){if(typeof n=="string")return op(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 op(n,r)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  55. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function op(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Gs(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function ml(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Gs(Object(n),!0).forEach(function(r){bl(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Gs(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function sh(t,e,n,r){n&&Object.defineProperty(t,e,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function yo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ch(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Su(){return Su=typeof Reflect!="undefined"&&Reflect.get?Reflect.get:function(t,e,n){var r=Gi(t,e);if(r){var a=Object.getOwnPropertyDescriptor(r,e);return a.get?a.get.call(arguments.length<3?t:n):a.value}},Su.apply(this,arguments)}function Gi(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&(t=wr(t))!==null;);return t}function Ft(t,e){return Ft=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Ft(t,e)}function lh(t){var e=function(){if(typeof Reflect=="undefined"||!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(n){return!1}}();return function(){var n,r=wr(t);if(e){var a=wr(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Nr(this,n)}}function Nr(t,e){if(e&&(Aa(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return wn(t)}function wn(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function wr(t){return wr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},wr(t)}function bl(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function nr(t,e,n,r,a){var i={};return Object.keys(r).forEach(function(s){i[s]=r[s]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce(function(s,h){return h(t,e,s)||s},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(t,e,i),i=null),i}var to=(Ct=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&Ft(i,s)})(a,t);var e,n,r=lh(a);function a(){var i;yo(this,a);for(var s=arguments.length,h=new Array(s),m=0;m<s;m++)h[m]=arguments[m];return bl(wn(i=r.call.apply(r,[this].concat(h))),"modelType",Yt.POLYLINE_EDGE),bl(wn(i),"draggingPointList",void 0),sh(wn(i),"dbClickPosition",rp,wn(i)),i}return e=a,(n=[{key:"initEdgeData",value:function(i){this.offset=30,Su(wr(a.prototype),"initEdgeData",this).call(this,i)}},{key:"getEdgeStyle",value:function(){var i=this.graphModel.theme.polyline;return ml(ml({},Su(wr(a.prototype),"getEdgeStyle",this).call(this)),fn(i))}},{key:"getTextPosition",value:function(){var i,s=(i=this.text)===null||i===void 0?void 0:i.value;if(this.dbClickPosition&&!s){var h=this.dbClickPosition;return{x:h.x,y:h.y}}var m=Jo(this.points),x=Us(Ml(m),2),S=x[0],D=x[1];return{x:(S.x+D.x)/2,y:(S.y+D.y)/2}}},{key:"getAfterAnchor",value:function(i,s,h){var m,x;return h.forEach(function(S){var D;i===mn.HORIZONTAL?D=Math.abs(s.y-S.y):i===mn.VERTICAL&&(D=Math.abs(s.x-S.x)),(!x||x>D)&&(x=D,m=S)}),m}},{key:"getCrossPoint",value:function(i,s,h){var m;return i===mn.HORIZONTAL?m={x:h.x,y:s.y}:i===mn.VERTICAL&&(m={x:s.x,y:h.y}),m}},{key:"removeCrossPoints",value:function(i,s,h){var m=h.map(function(ve){return ve});if(i===1){var x=m[i],S=m[s],D=m[i-1];if(Vs(D,x,this.sourceNode)){if(_i(x,S,this.sourceNode)){var I=kl(x,S,this.sourceNode);I&&(m[i]=I,m.splice(i-1,1),i--,s--)}}else this.sourceNode.anchors.forEach(function(ve){(ve.x===D.x&&ve.x===x.x||ve.y===D.y&&ve.y===x.y)&&ho(ve.x,ve.y,x.x,x.y)<ho(D.x,D.y,x.x,x.y)&&(m[i-1]=ve)})}if(s===h.length-2){var X=m[i],q=m[s],ee=m[s+1];if(Vs(q,ee,this.targetNode)){if(_i(X,q,this.targetNode)){var ge=kl(X,q,this.targetNode);ge&&(m[s]=ge,m.splice(s+1,1))}}else this.targetNode.anchors.forEach(function(ve){(ve.x===ee.x&&ve.x===q.x||ve.y===ee.y&&ve.y===q.y)&&ho(ve.x,ve.y,q.x,q.y)<ho(ee.x,ee.y,q.x,q.y)&&(m[s+1]=ve)})}return m}},{key:"getDraggingPoints",value:function(i,s,h,m,x){var S=x.map(function(X){return X}),D=this.getAfterAnchor(i,h,m),I=this.getCrossPoint(i,h,D);return s==="start"?(S.unshift(I),S.unshift(D)):(S.push(I),S.push(D)),S}},{key:"updateCrossPoints",value:function(i){var s=i.map(function(Ce){return Ce}),h=i[0],m=i[1],x=i[s.length-2],S=i[s.length-1],D=this.sourceNode,I=this.targetNode,X=D.modelType,q=I.modelType,ee=Na(h,m),ge=s[0];switch(X){case Yt.RECT_NODE:D.radius!==0&&(qf(h,D)||(ge=$f(h,ee,D)));break;case Yt.CIRCLE_NODE:ge=Rs(h,ee,D);break;case Yt.ELLIPSE_NODE:ge=Is(h,ee,D);break;case Yt.DIAMOND_NODE:case Yt.POLYGON_NODE:ge=Zf(h,ee,D)}ge&&(s[0]=ge);var ve=Na(x,S),we=s[s.length-1];switch(q){case Yt.RECT_NODE:I.radius!==0&&(qf(S,I)||(we=$f(S,ve,I)));break;case Yt.CIRCLE_NODE:we=Rs(S,ve,I);break;case Yt.ELLIPSE_NODE:we=Is(S,ve,I);break;case Yt.DIAMOND_NODE:case Yt.POLYGON_NODE:we=Zf(S,ve,I)}return we&&(s[s.length-1]=we),s}},{key:"getData",value:function(){var i=Su(wr(a.prototype),"getData",this).call(this),s=this.pointsList.map(function(h){return{x:h.x,y:h.y}});return Object.assign({},i,{pointsList:s})}},{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=Ws({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(s){return"".concat(s.x,",").concat(s.y)}).join(" ")}},{key:"updateStartPoint",value:function(i){this.startPoint=Object.assign({},i),this.updatePoints()}},{key:"moveStartPoint",value:function(i,s){this.startPoint.x+=i,this.startPoint.y+=s,this.updatePoints()}},{key:"updateEndPoint",value:function(i){this.endPoint=Object.assign({},i),this.updatePoints()}},{key:"moveEndPoint",value:function(i,s){this.endPoint.x+=i,this.endPoint.y+=s,this.updatePoints()}},{key:"updatePointsList",value:function(i,s){this.pointsList.forEach(function(x){x.x+=i,x.y+=s});var h=this.pointsList[0];this.startPoint=Object.assign({},h);var m=this.pointsList[this.pointsList.length-1];this.endPoint=Object.assign({},m),this.initPoints()}},{key:"dragAppendStart",value:function(){this.draggingPointList=this.pointsList.map(function(i){return i})}},{key:"dragAppendSimple",value:function(i,s){this.isDragging=!0;var h=i.start,m=i.end,x=i.startIndex,S=i.endIndex,D=i.direction,I=this.pointsList,X=I;return D===mn.HORIZONTAL?(I[x]={x:h.x,y:h.y+s.y},I[S]={x:m.x,y:m.y+s.y},X=this.pointsList.map(function(q){return q})):D===mn.VERTICAL&&(I[x]={x:h.x+s.x,y:h.y},I[S]={x:m.x+s.x,y:m.y},X=this.pointsList.map(function(q){return q})),this.updatePointsAfterDrag(X),this.draggingPointList=X,this.setText(Object.assign({},this.text,this.textPosition)),{start:Object.assign({},I[x]),end:Object.assign({},I[S]),startIndex:x,endIndex:S,direction:D}}},{key:"dragAppend",value:function(i,s){this.isDragging=!0;var h=i.start,m=i.end,x=i.startIndex,S=i.endIndex,D=i.direction,I=this.pointsList;if(D===mn.HORIZONTAL){I[x]={x:h.x,y:h.y+s.y},I[S]={x:m.x,y:m.y+s.y};var X=this.pointsList.map(function($e){return $e});if(x!==0&&S!==this.pointsList.length-1&&(X=this.removeCrossPoints(x,S,X)),x===0){var q={x:h.x,y:h.y+s.y};if(!gi(q,this.sourceNode)){var ee=this.sourceNode.anchors;X=this.getDraggingPoints(D,"start",q,ee,X)}}if(S===this.pointsList.length-1){var ge={x:m.x,y:m.y+s.y};if(!gi(ge,this.targetNode)){var ve=this.targetNode.anchors;X=this.getDraggingPoints(D,"end",ge,ve,X)}}this.updatePointsAfterDrag(X),this.draggingPointList=X}else if(D===mn.VERTICAL){I[x]={x:h.x+s.x,y:h.y},I[S]={x:m.x+s.x,y:m.y};var we=this.pointsList.map(function($e){return $e});if(x!==0&&S!==this.pointsList.length-1&&(we=this.removeCrossPoints(x,S,we)),x===0){var Ce={x:h.x+s.x,y:h.y};if(!gi(Ce,this.sourceNode)){var Je=this.sourceNode.anchors;we=this.getDraggingPoints(D,"start",Ce,Je,we)}}if(S===this.pointsList.length-1){var qe={x:m.x+s.x,y:m.y};if(!gi(qe,this.targetNode)){var gt=this.targetNode.anchors;we=this.getDraggingPoints(D,"end",qe,gt,we)}}this.updatePointsAfterDrag(we),this.draggingPointList=we}return this.setText(Object.assign({},this.text,this.textPosition)),{start:Object.assign({},I[x]),end:Object.assign({},I[S]),startIndex:x,endIndex:S,direction:D}}},{key:"dragAppendEnd",value:function(){if(this.draggingPointList){var i=Al(Jo(this.points));this.pointsList=i.map(function(m){return m}),this.draggingPointList=[];var s=i[0];this.startPoint=Object.assign({},s);var h=i[i.length-1];this.endPoint=Object.assign({},h)}this.isDragging=!1}},{key:"updatePointsAfterDrag",value:function(i){var s=this.updateCrossPoints(i);this.points=s.map(function(h){return"".concat(h.x,",").concat(h.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 s=i.startPoint,h=i.endPoint,m=i.sourceNode,x=i.targetNode,S=Ws({x:s.x,y:s.y},{x:h.x,y:h.y},m,x,this.offset||0);this.pointsList=S,this.initPoints()}}])&&ch(e.prototype,n),a}(dl),rp=nr(Ct.prototype,"dbClickPosition",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),nr(Ct.prototype,"initPoints",[d.k],Object.getOwnPropertyDescriptor(Ct.prototype,"initPoints"),Ct.prototype),nr(Ct.prototype,"updatePoints",[d.k],Object.getOwnPropertyDescriptor(Ct.prototype,"updatePoints"),Ct.prototype),nr(Ct.prototype,"updateStartPoint",[d.k],Object.getOwnPropertyDescriptor(Ct.prototype,"updateStartPoint"),Ct.prototype),nr(Ct.prototype,"moveStartPoint",[d.k],Object.getOwnPropertyDescriptor(Ct.prototype,"moveStartPoint"),Ct.prototype),nr(Ct.prototype,"updateEndPoint",[d.k],Object.getOwnPropertyDescriptor(Ct.prototype,"updateEndPoint"),Ct.prototype),nr(Ct.prototype,"moveEndPoint",[d.k],Object.getOwnPropertyDescriptor(Ct.prototype,"moveEndPoint"),Ct.prototype),nr(Ct.prototype,"updatePointsList",[d.k],Object.getOwnPropertyDescriptor(Ct.prototype,"updatePointsList"),Ct.prototype),nr(Ct.prototype,"dragAppendStart",[d.k],Object.getOwnPropertyDescriptor(Ct.prototype,"dragAppendStart"),Ct.prototype),nr(Ct.prototype,"dragAppendSimple",[d.k],Object.getOwnPropertyDescriptor(Ct.prototype,"dragAppendSimple"),Ct.prototype),nr(Ct.prototype,"dragAppend",[d.k],Object.getOwnPropertyDescriptor(Ct.prototype,"dragAppend"),Ct.prototype),nr(Ct.prototype,"dragAppendEnd",[d.k],Object.getOwnPropertyDescriptor(Ct.prototype,"dragAppendEnd"),Ct.prototype),nr(Ct.prototype,"updatePointsAfterDrag",[d.k],Object.getOwnPropertyDescriptor(Ct.prototype,"updatePointsAfterDrag"),Ct.prototype),nr(Ct.prototype,"getAdjustStart",[d.k],Object.getOwnPropertyDescriptor(Ct.prototype,"getAdjustStart"),Ct.prototype),nr(Ct.prototype,"getAdjustEnd",[d.k],Object.getOwnPropertyDescriptor(Ct.prototype,"getAdjustEnd"),Ct.prototype),nr(Ct.prototype,"updateAfterAdjustStartAndEnd",[d.k],Object.getOwnPropertyDescriptor(Ct.prototype,"updateAfterAdjustStartAndEnd"),Ct.prototype),Ct),Ma=function(t){var e=t.start,n=t.end,r=t.offset,a=t.verticalLength,i=t.type,s={leftX:0,leftY:0,rightX:0,rightY:0},h=Math.atan((n.y-e.y)/(n.x-e.x)),m=Math.atan(r/a),x=Math.sqrt(a*a+r*r);return i==="start"?n.x>=e.x?(s.leftX=e.x+x*Math.sin(h+m),s.leftY=e.y-x*Math.cos(h+m),s.rightX=e.x-x*Math.sin(h-m),s.rightY=e.y+x*Math.cos(h-m)):(s.leftX=e.x-x*Math.sin(h+m),s.leftY=e.y+x*Math.cos(h+m),s.rightX=e.x+x*Math.sin(h-m),s.rightY=e.y-x*Math.cos(h-m)):i==="end"&&(n.x>=e.x?(s.leftX=n.x+x*Math.sin(h-m),s.leftY=n.y-x*Math.cos(h-m),s.rightX=n.x-x*Math.sin(h+m),s.rightY=n.y+x*Math.cos(h+m)):(s.leftX=n.x-x*Math.sin(h-m),s.leftY=n.y+x*Math.cos(h-m),s.rightX=n.x+x*Math.sin(h+m),s.rightY=n.y-x*Math.cos(h+m))),s},Hs={x:1,y:0,z:0};function Pn(t,e,n,r,a){for(var i=function(q){if(q<0||q>1)throw new RangeError('The value range of parameter "t" is [0,1]');return{x:t.x*Math.pow(1-q,3)+3*e.x*q*Math.pow(1-q,2)+3*n.x*Math.pow(q,2)*(1-q)+r.x*Math.pow(q,3),y:t.y*Math.pow(1-q,3)+3*e.y*q*Math.pow(1-q,2)+3*n.y*Math.pow(q,2)*(1-q)+r.y*Math.pow(q,3)}},s=0,h=2,m=r.x,x=r.y,S=r;s<a&&h<50;){var D=S=i(1-h/100),I=D.x,X=D.y;s=ho(m,x,I,X),h++}return S}function kn(t){var e=Math.hypot(t.x,t.y);return{x:t.x/e,y:t.y/e,z:0}}function _l(t){return r=function(i,s){return i.x*s.y-i.y*s.x}(e=Hs,n=t),a=Math.acos(function(i,s){var h=[i.x,i.y,i.z];return[s.x,s.y,s.z].reduce(function(m,x,S){return m+x*h[S]})}(kn(e),kn(n))),r>=0?a:-a;var e,n,r,a}function Ol(t){return t*(180/Math.PI)}function ka(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function Ta(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ka(Object(n),!0).forEach(function(r){ip(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ka(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function ip(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Xs(t){return function(e){if(Array.isArray(e))return wl(e)}(t)||function(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(t)||ap(t)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
  56. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function xr(t){return xr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xr(t)}function Zo(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,s,h=[],m=!0,x=!1;try{for(a=a.call(n);!(m=(i=a.next()).done)&&(h.push(i.value),!r||h.length!==r);m=!0);}catch(S){x=!0,s=S}finally{try{m||a.return==null||a.return()}finally{if(x)throw s}}return h}}(t,e)||ap(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  57. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function ap(t,e){if(t){if(typeof t=="string")return wl(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wl(t,e):void 0}}function wl(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var up=function(t,e){var n;switch(t.type){case"line":default:n=new Fs(t,e);break;case"polyline":n=new to(t,e)}return n},No=function(t,e){return 2*Math.abs(t.centerX-e.centerX)<t.width+e.width&&2*Math.abs(t.centerY-e.centerY)<t.height+e.height},Ut=function(t){var e=[],n={};return t.forEach(function(r){var a="".concat(r.x,"-").concat(r.y);r.id=a,n[a]=r}),Object.keys(n).forEach(function(r){e.push(n[r])}),e},sp=function(t,e){var n=[t,{x:t.x,y:e.y},e];return Ut(n)},dr=function(t,e){return t.width===0&&t.height===0?t:{centerX:t.centerX,centerY:t.centerY,minX:t.minX-e,minY:t.minY-e,maxX:t.maxX+e,maxY:t.maxY+e,height:t.height+2*e,width:t.width+2*e}},xl=function(t,e){var n=Math.abs(t.x-e.centerX),r=Math.abs(t.y-e.centerY);return n/e.width>r/e.height?mn.HORIZONTAL:mn.VERTICAL},nn=function(t,e,n){return xl(n,e)===mn.HORIZONTAL?{x:n.x>t.centerX?t.maxX:t.minX,y:n.y}:{x:n.x,y:n.y>t.centerY?t.maxY:t.minY}},El=function(t,e){var n=Math.min(t.minX,e.minX),r=Math.min(t.minY,e.minY),a=Math.max(t.maxX,e.maxX),i=Math.max(t.maxY,e.maxY);return{centerX:(n+a)/2,centerY:(r+i)/2,minX:n,minY:r,maxX:a,maxY:i,height:i-r,width:a-n}},Hi=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0,n=[],r=[];t.forEach(function(S){n.push(S.x),r.push(S.y)});var a=Math.min.apply(Math,n),i=Math.max.apply(Math,n),s=Math.min.apply(Math,r),h=Math.max.apply(Math,r),m=i-a,x=h-s;return e&&(m+=e,x+=e),{centerX:(a+i)/2,centerY:(s+h)/2,maxX:i,maxY:h,minX:a,minY:s,x:(a+i)/2,y:(s+h)/2,height:x,width:m}},bi=function(t){var e=t.minX,n=t.minY,r=t.maxX,a=t.maxY;return[{x:e,y:n},{x:r,y:n},{x:r,y:a},{x:e,y:a}]},ju=function(t,e){var n=t.x,r=t.y;return n<e.minX||n>e.maxX||r<e.minY||r>e.maxY},cp=function(t,e){return e<t.minX||e>t.maxX?[]:[{x:e,y:t.minY},{x:e,y:t.maxY}]},lp=function(t,e){return e<t.minY||e>t.maxY?[]:[{x:t.minX,y:e},{x:t.maxX,y:e}]},fp=function(t,e){return cp(t,e.x).concat(lp(t,e.y))},Da=function(t,e){return Math.abs(t.x-e.x)+Math.abs(t.y-e.y)},Ys=function(t,e){var n=0;return e.forEach(function(r){r&&(t.x===r.x&&(n+=-2),t.y===r.y&&(n+=-2))}),n},Sl=function(t,e,n,r,a){return Da(t,e)+Da(t,n)+Ys(t,[e,n,r,a])},pp=function t(e,n,r,a,i){i||(i=0),e.unshift(n[a]),r[a]&&r[a]!==a&&i<=100&&t(e,n,r,r[a],i+1)},dp=function(t,e){var n=t.indexOf(e);n>-1&&t.splice(n,1)},Tn=function(t,e,n,r){var a=e.x-t.x,i=e.y-t.y,s=r.x-n.x,h=r.y-n.y,m=(-i*(t.x-n.x)+a*(t.y-n.y))/(-s*i+a*h),x=(s*(t.y-n.y)-h*(t.x-n.x))/(-s*i+a*h);return m>=0&&m<=1&&x>=0&&x<=1},hr=function(t,e,n){if(n.width===0&&n.height===0)return!1;var r=Zo(bi(n),4),a=r[0],i=r[1],s=r[2],h=r[3];return Tn(t,e,a,i)||Tn(t,e,a,h)||Tn(t,e,i,s)||Tn(t,e,s,h)},hp=function(t,e,n,r){var a=[];return t.forEach(function(i){i!==e&&(i.x!==e.x&&i.y!==e.y||hr(i,e,n)||hr(i,e,r)||a.push(i))}),Ut(a)},jl=function(t,e,n,r,a,i,s){var h=[],m=[e],x={},S={},D={};S[e.id]=0,D[e.id]=Sl(e,n,e);var I={};t.forEach(function(ee){I[ee.id]=ee});for(var X=function(){var ee=void 0,ge=1/0;if(m.forEach(function(we){D[we.id]<ge&&(ge=D[we.id],ee=we)}),ee===n){var ve=[];return pp(ve,I,x,n.id),{v:ve}}dp(m,ee),h.push(ee),hp(t,ee,r,a).forEach(function(we){if(h.indexOf(we)===-1){m.indexOf(we)===-1&&m.push(we);var Ce=D[ee.id]+Da(ee,we);S[we.id]&&Ce>=S[we.id]||(x[we.id]=ee.id,S[we.id]=Ce,D[we.id]=S[we.id]+Sl(we,n,e,i,s))}})};m.length;){var q=X();if(xr(q)==="object")return q.v}return[e,n]},Pl=function(t){return jn(t)},Al=function(t){for(var e=1;e<t.length-1;){var n=t[e-1],r=t[e],a=t[e+1];n.x===r.x&&r.x===a.x||n.y===r.y&&r.y===a.y?t.splice(e,1):e++}return t},Ws=function(t,e,n,r,a){var i=Pl(n),s=Pl(r),h=dr(i,a),m=dr(s,a),x=nn(h,i,t),S=nn(m,s,e);if(No(h,m)){var D=yp(t,e,x,S);return[t,x].concat(Xs(D),[S,e])}var I=Hi([x,S]),X=El(h,I),q=El(m,I),ee=[];ee=(ee=ee.concat(bi(X))).concat(bi(q));var ge={x:(t.x+e.x)/2,y:(t.y+e.y)/2};[I,X,q].forEach(function(we){ee=ee.concat(fp(we,ge).filter(function(Ce){return ju(Ce,h)&&ju(Ce,m)}))}),[{x:x.x,y:S.y},{x:S.x,y:x.y}].forEach(function(we){ju(we,h)&&ju(we,m)&&ee.push(we)}),ee.unshift(x),ee.push(S),ee=Ut(ee);var ve=jl(ee,x,S,i,s,t,e);return ve.unshift(t),ve.push(e),ve.length>2&&(ve=Al(ve)),Ut(ve)},Ml=function(t){var e;if(t.length===1)e=[t[0],t[0]];else if(t.length>=2){for(var n=t[0],r=t[1],a=ho(n.x,n.y,r.x,r.y),i=1;i<t.length-1;i++){var s=t[i],h=t[i+1],m=ho(s.x,s.y,h.x,h.y);m>a&&(a=m,n=s,r=h)}e=[n,r]}return e},Vs=function(t,e,n){var r=gi(t,n),a=gi(e,n);return r&&a},_i=function(t,e,n){var r=gi(t,n),a=gi(e,n);return!(r&&a)&&(r||a)},kl=function(t,e,n){for(var r,a,i=jn(n),s=bi(i),h=0;h<s.length;h++)Tn(t,e,s[h],s[(h+1)%s.length])&&(a=[s[h],s[(h+1)%s.length]]);return a&&(r=function(m,x,S,D){var I=(x.y-m.y)*(D.x-S.x)-(m.x-x.x)*(S.y-D.y);if(I===0)return!1;var X=((x.x-m.x)*(D.x-S.x)*(S.y-m.y)+(x.y-m.y)*(D.x-S.x)*m.x-(D.y-S.y)*(x.x-m.x)*S.x)/I,q=-((x.y-m.y)*(D.y-S.y)*(S.x-m.x)+(x.x-m.x)*(D.y-S.y)*m.y-(D.x-S.x)*(x.y-m.y)*S.y)/I;return(X-m.x)*(X-x.x)<=0&&(q-m.y)*(q-x.y)<=0&&(X-S.x)*(X-D.x)<=0&&(q-S.y)*(q-D.y)<=0&&{x:X,y:q}}(t,e,a[0],a[1])),r},Na=function(t,e){var n;return t.x===e.x?n=mn.VERTICAL:t.y===e.y&&(n=mn.HORIZONTAL),n},Jo=function(t){var e=t.split(" "),n=[];return e&&e.forEach(function(r){var a=Zo(r.split(","),2),i=a[0],s=a[1];n.push({x:Number(i),y:Number(s)})}),n},yp=function(t,e,n,r){var a=[];if(Na(t,n)===Na(e,r))t.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},s=Xr(i,t,n),h=Xr(i,e,r);if(s||h)i={x:r.x,y:n.y};else{var m=vp(i,t,n),x=vp(i,e,r);m&&x&&(i={x:r.x,y:n.y})}a.push(i)}return a},vp=function(t,e,n){return t.x===e.x&&t.x===n.x||t.y===e.y&&t.y===n.y},Tl=function(t){if(!t)return 0;for(var e=0,n=0;n<t.length;n++){var r=t.charCodeAt(n);t.match(/[A-Z]/)?e+=1.5:e+=r>=1&&r<=126||r>=65376&&r<=65439?1:2}return e},Dl=null,fh=function(t,e){Dl||(Dl=document.createElement("canvas"));var n=Dl.getContext("2d");return n.font=e,n.measureText(t).width},gp=function(t){var e,n=t.start,r=t.end;if(n.x===r.x&&n.y===r.y)e="";else{var a={start:n,end:r,offset:10,verticalLength:5},i=Ma(Ta(Ta({},a),{},{type:"start"})),s=Ma(Ta(Ta({},a),{},{type:"end"}));e="M".concat(i.leftX," ").concat(i.leftY,`
  58. L`).concat(i.rightX," ").concat(i.rightY,`
  59. L`).concat(s.rightX," ").concat(s.rightY,`
  60. L`).concat(s.leftX," ").concat(s.leftY," z")}return{d:e,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}},Pu=function(t){var e=t.start,n=t.end,r=t.sourceNode,a=t.targetNode,i=t.offset,s=jn(r),h=jn(a),m=dr(s,i),x=dr(h,i);return{sNext:nn(m,s,e),ePre:nn(x,h,n)}},Au=function(t){var e=t.replace(/M/g,"").replace(/C/g,",").split(",");return[Mu(e[0]),Mu(e[1]),Mu(e[2]),Mu(e[3])]},Mu=function(t){var e=Zo(t.replace(/(^\s*)/g,"").split(" "),2);return{x:+e[0],y:+e[1]}},Nl=function(t,e){var n=Zo(t,4);return[Pn(n[0],n[1],n[2],n[3],e),t[3]]},ku=function(t,e){for(var n,r=t.x,a=t.y,i=Jo(e),s=Number.MAX_SAFE_INTEGER,h=[],m=0;m<i.length;m++)h.push({start:i[m],end:i[(m+1)%i.length]});if(h.forEach(function(I){var X=I.start,q=I.end;if(X.x===q.x){var ee={x:X.x,y:a};if(Xr(ee,X,q)){var ge=Math.abs(X.x-r);ge<s&&(s=ge,n=ee)}}else if(X.y===q.y){var ve={x:r,y:X.y};if(Xr(ve,X,q)){var we=Math.abs(X.y-a);we<s&&(s=we,n=ve)}}}),!n){var x=h[0],S=x.start,D=x.end;n={x:S.x+(D.x-S.x)/2,y:S.y+(D.y-S.y)/2}}return n},mp=function(t){return Xo(t,["id","type","sourceNodeId","sourceAnchorId","targetNodeId","targetAnchorId","pointsList","startPoint","endPoint","properties"])},Cl=function(t,e){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))};function Er(t,e){return typeof e!="function"?function(n,r,a){return Object.assign({type:t.edgeType},a)}:function(n,r,a){var i=e(n,r,a);return i?typeof i=="string"?Object.assign({},a,{type:i}):Object.assign({type:i},a):{type:t.edgeType}}}o(208);var Tu=function(){};function ph(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Yn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var no=function(){function t(r){var a=this,i=r.onDragStart,s=i===void 0?Tu:i,h=r.onDragging,m=h===void 0?Tu:h,x=r.onDragEnd,S=x===void 0?Tu:x,D=r.eventType,I=D===void 0?"":D,X=r.eventCenter,q=X===void 0?null:X,ee=r.step,ge=ee===void 0?1:ee,ve=r.isStopPropagation,we=ve===void 0||ve,Ce=r.model,Je=Ce===void 0?null:Ce,qe=r.data,gt=qe===void 0?null:qe;(function($e,ht){if(!($e instanceof ht))throw new TypeError("Cannot call a class as a function")})(this,t),Yn(this,"onDragStart",void 0),Yn(this,"onDragging",void 0),Yn(this,"onDragEnd",void 0),Yn(this,"step",void 0),Yn(this,"isStopPropagation",void 0),Yn(this,"isDragging",!1),Yn(this,"isStartDragging",!1),Yn(this,"startX",0),Yn(this,"startY",0),Yn(this,"sumDeltaX",0),Yn(this,"sumDeltaY",0),Yn(this,"eventType",void 0),Yn(this,"eventCenter",void 0),Yn(this,"model",void 0),Yn(this,"data",void 0),Yn(this,"startTime",void 0),Yn(this,"handleMouseDown",function($e){var ht,tt,Kt,Jt=(ht=window)===null||ht===void 0?void 0:ht.document;if($e.button===0){a.isStopPropagation&&$e.stopPropagation(),a.isStartDragging=!0,a.startX=$e.clientX,a.startY=$e.clientY,Jt.addEventListener("mousemove",a.handleMouseMove,!1),Jt.addEventListener("mouseup",a.handleMouseUp,!1);var Tt=(tt=a.model)===null||tt===void 0?void 0:tt.getData();(Kt=a.eventCenter)===null||Kt===void 0||Kt.emit(pt["".concat(a.eventType,"_MOUSEDOWN")],{e:$e,data:a.data||Tt}),a.startTime=new Date().getTime()}}),Yn(this,"handleMouseMove",function($e){if(a.isStopPropagation&&$e.stopPropagation(),a.isStartDragging&&(a.sumDeltaX+=$e.clientX-a.startX,a.sumDeltaY+=$e.clientY-a.startY,a.startX=$e.clientX,a.startY=$e.clientY,a.step<=1||Math.abs(a.sumDeltaX)>a.step||Math.abs(a.sumDeltaY)>a.step)){var ht,tt=a.sumDeltaX%a.step,Kt=a.sumDeltaY%a.step,Jt=a.sumDeltaX-tt,Tt=a.sumDeltaY-Kt;a.sumDeltaX=tt,a.sumDeltaY=Kt;var rn,Un=(ht=a.model)===null||ht===void 0?void 0:ht.getData();a.isDragging||((rn=a.eventCenter)===null||rn===void 0||rn.emit(pt["".concat(a.eventType,"_DRAGSTART")],{e:$e,data:a.data||Un}),a.onDragStart({event:$e})),a.isDragging=!0,Promise.resolve().then(function(){var Gn,Sr;a.onDragging({deltaX:Jt,deltaY:Tt,event:$e}),(Gn=a.eventCenter)===null||Gn===void 0||Gn.emit(pt["".concat(a.eventType,"_MOUSEMOVE")],{e:$e,data:a.data||Un}),(Sr=a.eventCenter)===null||Sr===void 0||Sr.emit(pt["".concat(a.eventType,"_DRAG")],{e:$e,data:a.data||Un})})}}),Yn(this,"handleMouseUp",function($e){var ht=window.document;a.isStartDragging=!1,a.isStopPropagation&&$e.stopPropagation(),Promise.resolve().then(function(){var tt,Kt,Jt;ht.removeEventListener("mousemove",a.handleMouseMove,!1),ht.removeEventListener("mouseup",a.handleMouseUp,!1);var Tt=(tt=a.model)===null||tt===void 0?void 0:tt.getData();(Kt=a.eventCenter)===null||Kt===void 0||Kt.emit(pt["".concat(a.eventType,"_MOUSEUP")],{e:$e,data:a.data||Tt}),a.isDragging&&(a.isDragging=!1,a.onDragEnd({event:$e}),(Jt=a.eventCenter)===null||Jt===void 0||Jt.emit(pt["".concat(a.eventType,"_DROP")],{e:$e,data:a.data||Tt}))})}),Yn(this,"cancelDrag",function(){var $e,ht=($e=window)===null||$e===void 0?void 0:$e.document;ht.removeEventListener("mousemove",a.handleMouseMove,!1),ht.removeEventListener("mouseup",a.handleMouseUp,!1),a.onDragEnd({event:null}),a.isDragging=!1}),this.onDragStart=s,this.onDragging=m,this.onDragEnd=S,this.step=ge,this.isStopPropagation=we,this.eventType=I,this.eventCenter=q,this.model=Je,this.data=gt}var e,n;return e=t,(n=[{key:"setStep",value:function(r){this.step=r}},{key:"setModel",value:function(r){this.model=r}}])&&ph(e.prototype,n),t}();function Du(t){return Du=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Du(t)}function Rl(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function dh(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Il(t,e,n){return e&&dh(t.prototype,e),t}function Ks(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Cu(t,e)}function Ll(t){var e=bp();return function(){var n,r=Ru(t);if(e){var a=Ru(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return hh(this,n)}}function hh(t,e){if(e&&(Du(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Qo(t)}function Qo(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Nu(t){var e=typeof Map=="function"?new Map:void 0;return Nu=function(n){if(n===null||(r=n,Function.toString.call(r).indexOf("[native code]")===-1))return n;var r;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(e!==void 0){if(e.has(n))return e.get(n);e.set(n,a)}function a(){return zl(n,arguments,Ru(this).constructor)}return a.prototype=Object.create(n.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),Cu(a,n)},Nu(t)}function zl(t,e,n){return zl=bp()?Reflect.construct:function(r,a,i){var s=[null];s.push.apply(s,a);var h=new(Function.bind.apply(r,s));return i&&Cu(h,i.prototype),h},zl.apply(null,arguments)}function bp(){if(typeof Reflect=="undefined"||!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(t){return!1}}function Cu(t,e){return Cu=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Cu(t,e)}function Ru(t){return Ru=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ru(t)}function Iu(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _p(t,e){return t instanceof rr&&e instanceof rr}var Op=function(t){Ks(n,t);var e=Ll(n);function n(r,a,i){var s;return Rl(this,n),Iu(Qo(s=e.call(this,3)),"x",void 0),Iu(Qo(s),"y",void 0),Iu(Qo(s),"z",void 0),s[0]=r,s[1]=a,s[2]=i,s.x=r,s.y=a,s.z=i,Object.setPrototypeOf(Qo(s),n.prototype),s}return Il(n,[{key:"add",value:function(r){if(_p(this,r))return new rr(this.x+r.x,this.y+r.y);var a=this.z+r.z;return new u((this.x+r.x)/a,(this.y+r.y)/a)}},{key:"subtract",value:function(r){if(_p(this,r))return new rr(this.x-r.x,this.y-r.y);var a=this.z-r.z;return a===0?new rr(this.x-r.x,this.y-r.y):new u((this.x-r.x)/a,(this.y-r.y)/a)}}]),n}(Nu(Array)),rr=function(t){Ks(n,t);var e=Ll(n);function n(r,a,i){var s;return Rl(this,n),s=e.call(this,r,a,i!=null?i:0),Object.setPrototypeOf(Qo(s),n.prototype),s}return Il(n,[{key:"toString",value:function(){return"Vector"}},{key:"dot",value:function(r){var a=this;return r.reduce(function(i,s,h){return i+s*a[h]})}},{key:"cross",value:function(r){return new n(this.y*r.z-this.z*r.y,this.z*r.x-this.x*r.z,this.x*r.y-this.y*r.x)}},{key:"getLength",value:function(){return Math.hypot(this.x,this.y)}},{key:"normalize",value:function(){var r=this.getLength();return new n(this.x/r,this.y/r)}},{key:"crossZ",value:function(r){return this.x*r.y-this.y*r.x}},{key:"angle",value:function(r){var a=this.crossZ(r),i=Math.acos(this.normalize().dot(r.normalize()));return a>=0?i:-i}}]),n}(Op),u=function(t){Ks(n,t);var e=Ll(n);function n(r,a){var i;return Rl(this,n),i=e.call(this,r,a,1),Object.setPrototypeOf(Qo(i),n.prototype),i}return Il(n,[{key:"toString",value:function(){return"Point"}}]),n}(Op);o(67),o(218);function l(t){return l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(t)}function b(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,s,h=[],m=!0,x=!1;try{for(a=a.call(n);!(m=(i=a.next()).done)&&(h.push(i.value),!r||h.length!==r);m=!0);}catch(S){x=!0,s=S}finally{try{m||a.return==null||a.return()}finally{if(x)throw s}}return h}}(t,e)||N(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  61. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function j(t){return function(e){if(Array.isArray(e))return U(e)}(t)||function(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(t)||N(t)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
  62. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function N(t,e){if(t){if(typeof t=="string")return U(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?U(t,e):void 0}}function U(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function ne(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function le(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function _e(t,e,n){return e&&le(t.prototype,e),t}function Ie(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&He(t,e)}function De(t){var e=ze();return function(){var n,r=jt(t);if(e){var a=jt(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Ge(this,n)}}function Ge(t,e){if(e&&(l(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return rt(t)}function rt(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function dt(t){var e=typeof Map=="function"?new Map:void 0;return dt=function(n){if(n===null||(r=n,Function.toString.call(r).indexOf("[native code]")===-1))return n;var r;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(e!==void 0){if(e.has(n))return e.get(n);e.set(n,a)}function a(){return xt(n,arguments,jt(this).constructor)}return a.prototype=Object.create(n.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),He(a,n)},dt(t)}function xt(t,e,n){return xt=ze()?Reflect.construct:function(r,a,i){var s=[null];s.push.apply(s,a);var h=new(Function.bind.apply(r,s));return i&&He(h,i.prototype),h},xt.apply(null,arguments)}function ze(){if(typeof Reflect=="undefined"||!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(t){return!1}}function He(t,e){return He=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},He(t,e)}function jt(t){return jt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},jt(t)}function it(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ce,Rt,$t,bt,Mt,Wn,Cr,vo,Vn,Co,ei,Ca,Lu,Ro=function(t){Ie(n,t);var e=De(n);function n(){var r;ne(this,n);for(var a=arguments.length,i=new Array(a),s=0;s<a;s++)i[s]=arguments[s];return it(rt(r=e.call(this,i.length)),"rows",void 0),it(rt(r),"columns",void 0),r.fill(new Array(3)),i.forEach(function(h,m){r[m]=h}),r.columns=i[0].length,r.rows=i.length,Object.setPrototypeOf(rt(r),n.prototype),r}return _e(n,[{key:"getRow",value:function(r){return this[r]}},{key:"getColumn",value:function(r){return j(this.map(function(a){return a[r]}))}},{key:"transpose",value:function(){for(var r=[],a=0;a<this.columns;a++)r.push(this.getColumn(a));return xt(n,r)}},{key:"cross",value:function(r){var a=new Array(this.rows).fill("").map(function(){return[]});if(this.columns===r.rows)for(var i=0;i<this.rows;i++)for(var s=this.getRow(i),h=function(x){var S=r.getColumn(x);a[i][x]=s.reduce(function(D,I,X){return D+I*S[X]},0)},m=0;m<r.columns;m++)h(m);return xt(n,j(a))}},{key:"to2D",value:function(){return this.map(function(r){return[r[0],r[1]]})}},{key:"toPoints",value:function(){return this.map(function(r){return new u(r[0],r[1])})}},{key:"toString",value:function(){var r=b(this[0],2),a=r[0],i=r[1],s=b(this[1],2),h=s[0],m=s[1],x=b(this[2],2),S=x[0],D=x[1];return"matrix(".concat(a," ").concat(i," ").concat(h," ").concat(m," ").concat(S," ").concat(D,")")}},{key:"translate",value:function(r,a){return this.cross(new Ra(r,a))}},{key:"rotate",value:function(r){return this.cross(new Oi(r))}},{key:"scale",value:function(r,a){return this.cross(new Bl(r,a))}}]),n}(dt(Array)),Oi=function(t){Ie(n,t);var e=De(n);function n(r){var a;return ne(this,n),a=e.call(this,new rr(+Math.cos(r).toFixed(2),+Math.sin(r).toFixed(2),0),new rr(-Math.sin(r).toFixed(2),+Math.cos(r).toFixed(2),0),new rr(0,0,1)),Object.setPrototypeOf(rt(a),n.prototype),a}return _e(n,[{key:"inverse",value:function(){return this.transpose()}}]),n}(Ro),Bl=function(t){Ie(n,t);var e=De(n);function n(r,a){var i;return ne(this,n),it(rt(i=e.call(this,new rr(r,0,0),new rr(0,a,0),new rr(0,0,1))),"sx",void 0),it(rt(i),"sy",void 0),i.sx=r,i.sy=a,Object.setPrototypeOf(rt(i),n.prototype),i}return _e(n,[{key:"inverse",value:function(){return new n(1/this.sx,1/this.sy)}}]),n}(Ro),Ra=function(t){Ie(n,t);var e=De(n);function n(r,a){var i;return ne(this,n),it(rt(i=e.call(this,new rr(1,0,0),new rr(0,1,0),new rr(r,a,1))),"tx",void 0),it(rt(i),"ty",void 0),i.tx=r,i.ty=a,Object.setPrototypeOf(rt(i),n.prototype),i}return _e(n,[{key:"inverse",value:function(){return new n(-this.tx,-this.ty)}}]),n}(Ro),zu={node:!1,edge:!1},Fl={node:!0,edge:!0};function Bu(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function Xi(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Bu(Object(n),!0).forEach(function(r){ni(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Bu(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Yi(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,s,h=[],m=!0,x=!1;try{for(a=a.call(n);!(m=(i=a.next()).done)&&(h.push(i.value),!r||h.length!==r);m=!0);}catch(S){x=!0,s=S}finally{try{m||a.return==null||a.return()}finally{if(x)throw s}}return h}}(t,e)||Fu(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  63. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function ti(t){return function(e){if(Array.isArray(e))return yh(e)}(t)||function(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(t)||Fu(t)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
  64. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Fu(t,e){if(t){if(typeof t=="string")return yh(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?yh(t,e):void 0}}function yh(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function wp(t){return wp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},wp(t)}function Io(t,e,n,r){n&&Object.defineProperty(t,e,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function u_(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ni(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _t(t,e,n,r,a){var i={};return Object.keys(r).forEach(function(s){i[s]=r[s]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce(function(s,h){return h(t,e,s)||s},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(t,e,i),i=null),i}var hg,yg=200,vg=(ce=function(){function t(r){(function(X,q){if(!(X instanceof q))throw new TypeError("Cannot call a class as a function")})(this,t),ni(this,"rootEl",void 0),Io(this,"width",Rt,this),Io(this,"height",$t,this),ni(this,"theme",void 0),ni(this,"eventCenter",void 0),ni(this,"modelMap",new Map),ni(this,"topElement",void 0),ni(this,"animation",void 0),ni(this,"idGenerator",void 0),ni(this,"edgeGenerator",void 0),ni(this,"nodeMoveRules",[]),ni(this,"customTrajectory",void 0),Io(this,"edgeType",bt,this),Io(this,"nodes",Mt,this),Io(this,"edges",Wn,this),Io(this,"overlapMode",Cr,this),Io(this,"background",vo,this),Io(this,"transformModel",Vn,this),Io(this,"editConfigModel",Co,this),Io(this,"gridSize",ei,this),Io(this,"partial",Ca,this),Io(this,"fakerNode",Lu,this);var a,i=r.container,s=r.background,h=s===void 0?{}:s,m=r.grid,x=r.idGenerator,S=r.edgeGenerator,D=r.animation,I=r.customTrajectory;this.background=h,wp(m)==="object"&&(this.gridSize=m.size),this.rootEl=i,this.editConfigModel=new Ic(r),this.eventCenter=new zf,this.transformModel=new Ef(this.eventCenter,r),this.theme=Bi(r.style),this.edgeType=r.edgeType||"polyline",this.width=r.width,this.height=r.height,this.animation=(a=D)&&typeof a!="boolean"?gu(fn(zu),a):fn(a===!0?Fl:zu),this.partial=r.partial,this.overlapMode=r.overlapMode||0,this.idGenerator=x,this.customTrajectory=I,this.edgeGenerator=Er(this,S),this.width=r.width||this.rootEl.getBoundingClientRect().width,this.height=r.height||this.rootEl.getBoundingClientRect().height,this.flowId=qo()}var e,n;return e=t,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(ti(this.nodes),ti(this.edges)).reduce(function(r,a){return r[a.id]=a,r},{})}},{key:"sortElements",get:function(){var r=[];this.nodes.forEach(function(x){return r.push(x)}),this.edges.forEach(function(x){return r.push(x)}),r=r.sort(function(x,S){return x.zIndex-S.zIndex});for(var a=[],i=[-200,-200],s=[this.width+yg,this.height+yg],h=0;h<r.length;h++){var m=r[h];m.visible&&(!this.partial||m.isSelected||this.isElementInArea(m,i,s,!1,!1))&&a.push(m)}return a}},{key:"textEditElement",get:function(){var r=this.nodes.find(function(i){return i.state===cn.TEXT_EDIT}),a=this.edges.find(function(i){return i.state===cn.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],s=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],h=arguments.length>4&&arguments[4]!==void 0&&arguments[4],m=[],x=[];this.nodes.forEach(function(I){return x.push(I)}),this.edges.forEach(function(I){return x.push(I)});for(var S=0;S<x.length;S++){var D=x[S];h&&!D.visible||!this.isElementInArea(D,r,a,i,s)||m.push(D)}return m}},{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,s=this.rootEl.getBoundingClientRect(),h={x:a-s.left,y:i-s.top},m=Yi(this.transformModel.HtmlPointToCanvasPoint([h.x,h.y]),2);return{domOverlayPosition:h,canvasOverlayPosition:{x:m[0],y:m[1]}}}},{key:"isElementInArea",value:function(r,a,i){var s=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],h=!(arguments.length>4&&arguments[4]!==void 0)||arguments[4];if(r.BaseType===Bn.NODE){for(var m=jn(r=r),x=m.minX,S=m.minY,D=m.maxX,I=m.maxY,X=[{x,y:S},{x:D,y:S},{x:D,y:I},{x,y:I}],q=h,ee=0;ee<X.length;ee++){var ge=X[ee],ve=ge.x,we=ge.y,Ce=this.transformModel.CanvasPointToHtmlPoint([ve,we]),Je=Yi(Ce,2);if(ve=Je[0],we=Je[1],_u([ve,we],a,i)!==h){q=!h;break}}return q}if(r.BaseType===Bn.EDGE){var qe=r=r,gt=qe.startPoint,$e=qe.endPoint,ht=this.transformModel.CanvasPointToHtmlPoint([gt.x,gt.y]),tt=this.transformModel.CanvasPointToHtmlPoint([$e.x,$e.y]),Kt=_u(ht,a,i),Jt=_u(tt,a,i);return s?Kt&&Jt:Kt||Jt}return!1}},{key:"graphDataToModel",value:function(r){var a=this;if(this.width&&this.height||this.resize(),!r)return this.nodes=[],void(this.edges=[]);r.nodes?this.nodes=is(r.nodes,function(i){return a.getModelAfterSnapToGrid(i)}):this.nodes=[],r.edges?this.edges=is(r.edges,function(i){var s=a.getModel(i.type);if(!s)throw new Error("找不到".concat(i.type,"对应的边。"));return new s(i,a)}):this.edges=[]}},{key:"modelToGraphData",value:function(){var r=[];this.edges.forEach(function(i){var s=i.getData();s&&!i.virtual&&r.push(s)});var a=[];return this.nodes.forEach(function(i){var s=i.getData();s&&!i.virtual&&a.push(s)}),{nodes:a,edges:r}}},{key:"modelToHistoryData",value:function(){for(var r=!1,a=[],i=0;i<this.nodes.length;i++){var s=this.nodes[i];if(s.isDragging){r=!0;break}a.push(s.getHistoryData())}if(r)return!1;for(var h=!1,m=[],x=0;x<this.edges.length;x++){var S=this.edges[x];if(S.isDragging){h=!0;break}m.push(S.getHistoryData())}return!h&&{nodes:a,edges:m}}},{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 s=this.edges[i],h=this.edges[i].sourceNodeId===r,m=this.edges[i].targetNodeId===r;(h||m)&&a.push(s)}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(s){if(s.BaseType===Bn.NODE&&i.nodes.push(s.getData()),s.BaseType===Bn.EDGE){var h=s.getData(),m=a.get(h.sourceNodeId)&&a.get(h.targetNodeId);(r||m)&&i.edges.push(h)}}),i}},{key:"updateAttributes",value:function(r,a){this.getElement(r).updateAttributes(a)}},{key:"changeNodeId",value:function(r,a){return a||(a=qo()),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=qo()),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,s,h=((a=this.nodesMap[r])===null||a===void 0?void 0:a.model)||((i=this.edgesMap[r])===null||i===void 0?void 0:i.model);h&&(this.overlapMode===Sn.DEFAULT&&((s=this.topElement)===null||s===void 0||s.setZIndex(),h.setZIndex(9999),this.topElement=h),this.overlapMode===Sn.INCREASE&&this.setElementZIndex(r,"top"))}},{key:"setElementZIndex",value:function(r,a){var i,s,h,m=((i=this.nodesMap[r])===null||i===void 0?void 0:i.model)||((s=this.edgesMap[r])===null||s===void 0?void 0:s.model);m&&(typeof a=="number"&&(h=a),a==="top"&&(h=fl()),a==="bottom"&&(h=--oh),m.setZIndex(h))}},{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(pt.NODE_DELETE,{data:a})}},{key:"addNode",value:function(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:pt.NODE_ADD,i=arguments.length>2?arguments[2]:void 0,s=pr(r);s.id&&this.nodesMap[r.id]&&delete s.id;var h=this.getModelAfterSnapToGrid(s);this.nodes.push(h);var m=h.getData(),x={data:m};return i&&(x.e=i),this.eventCenter.emit(a,x),h}},{key:"getModelAfterSnapToGrid",value:function(r){var a=this.getModel(r.type);if(!a)throw new Error("找不到".concat(r.type,"对应的节点,请确认是否已注册此类型节点。"));var i=r.x,s=r.y;return i&&s&&(r.x=yi(i,this.gridSize),r.y=yi(s,this.gridSize),wp(r.text)==="object"&&(r.text.x+=r.x-i,r.text.y+=r.y-s)),new a(r,this)}},{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 s=this.addNode(i);return s.setSelected(!0),a.setSelected(!1),s.getData()}},{key:"moveNode",value:function(r,a,i){var s=arguments.length>3&&arguments[3]!==void 0&&arguments[3],h=this.nodesMap[r];if(h){var m=h.model,x=m.getMoveDistance(a,i,s),S=Yi(x,2);a=S[0],i=S[1],this.moveEdge(r,a,i)}}},{key:"moveNode2Coordinate",value:function(r,a,i){var s=arguments.length>3&&arguments[3]!==void 0&&arguments[3],h=this.nodesMap[r];if(h){var m=h.model,x=m.x,S=m.y,D=a-x,I=i-S;this.moveNode(r,D,I,s)}}},{key:"editText",value:function(r){this.setElementStateById(r,cn.TEXT_EDIT)}},{key:"addEdge",value:function(r){var a=pr(r),i=a.type;i||(i=this.edgeType),a.id&&this.edgesMap[a.id]&&delete a.id;var s=this.getModel(i);if(!s)throw new Error("找不到".concat(i,"对应的边,请确认是否已注册此类型边。"));var h=new s(Xi(Xi({},a),{},{type:i}),this),m=h.getData();return this.edges.push(h),this.eventCenter.emit(pt.EDGE_ADD,{data:m}),h}},{key:"moveEdge",value:function(r,a,i){for(var s=0;s<this.edges.length;s++){var h=this.edges[s],m=h.textPosition,x=m.x,S=m.y,D=this.edges[s].sourceNodeId===r,I=this.edges[s].targetNodeId===r;D&&h.moveStartPoint(a,i),I&&h.moveEndPoint(a,i),(D||I)&&this.handleEdgeTextMove(h,x,S)}}},{key:"handleEdgeTextMove",value:function(r,a,i){var s;if(r.customTextPosition===!0)r.resetTextPosition();else if(r.modelType===Yt.POLYLINE_EDGE&&(s=r.text)!==null&&s!==void 0&&s.value){var h=r.text,m=ku(h,r.points);r.moveText(m.x-h.x,m.y-h.y)}else{var x=r.textPosition,S=x.x,D=x.y;r.moveText(S-a,D-i)}}},{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 s=this.edges[i].getData();this.edges.splice(i,1),i--,this.eventCenter.emit(pt.EDGE_DELETE,{data:s})}}},{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(pt.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(pt.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(pt.EDGE_DELETE,{data:i})}}},{key:"setElementStateById",value:function(r,a,i){this.nodes.forEach(function(s){s.id===r?s.setElementState(a,i):s.setElementState(cn.DEFAULT)}),this.edges.forEach(function(s){s.id===r?s.setElementState(a,i):s.setElementState(cn.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 s=(a=this.nodesMap[r])===null||a===void 0?void 0:a.model;s==null||s.setSelected(!0)}},{key:"selectEdgeById",value:function(r){var a,i=arguments.length>1&&arguments[1]!==void 0&&arguments[1];i||this.clearSelectElements();var s=(a=this.edgesMap[r])===null||a===void 0?void 0:a.model;s==null||s.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===Sn.DEFAULT&&((r=this.topElement)===null||r===void 0||r.setZIndex())}},{key:"moveNodes",value:function(r,a,i){for(var s=this,h=arguments.length>3&&arguments[3]!==void 0&&arguments[3],m=r.reduce(function(qe,gt){var $e=s.nodesMap[gt].model.getMoveDistance(a,i,h);return qe[gt]=$e,qe},{}),x=0;x<this.edges.length;x++){var S=this.edges[x],D=S.textPosition,I=D.x,X=D.y,q=m[S.sourceNodeId],ee=m[S.targetNodeId],ge=void 0,ve=void 0;if(q&&ee&&S.modelType===Yt.POLYLINE_EDGE){var we=Yi(q,2);ge=we[0],ve=we[1],S.updatePointsList(ge,ve)}else{if(q){var Ce=Yi(q,2);ge=Ce[0],ve=Ce[1],S.moveStartPoint(ge,ve)}if(ee){var Je=Yi(ee,2);ge=Je[0],ve=Je[1],S.moveEndPoint(ge,ve)}}(q||ee)&&this.handleEdgeTextMove(S,I,X)}}},{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 s=i.getData();s.type=a;var h=this.getModel(a);if(!h)throw new Error("找不到".concat(a,"对应的节点,请确认是否已注册此类型节点。"));var m=new h(s,this);this.nodes.splice(this.nodesMap[r].index,1,m),this.getNodeEdges(r).forEach(function(x){if(x.sourceNodeId===r){var S=Jf(m,x.startPoint,m.width,m.height);x.updateStartPoint(S)}if(x.targetNodeId===r){var D=Jf(m,x.endPoint,m.width,m.height);x.updateEndPoint(D)}})}}},{key:"changeEdgeType",value:function(r,a){var i=this.getEdgeModelById(r);if(i&&i.type!==a){var s=i.getData();s.type=a;var h=this.getModel(a);if(!h)throw new Error("找不到".concat(a,"对应的节点,请确认是否已注册此类型节点。"));delete s.pointsList;var m=new h(s,this);this.edges.splice(this.edgesMap[r].index,1,m)}}},{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:"getAnchorIncomingEdge",value:function(r){var a=[];return this.edges.forEach(function(i){i.targetAnchorId===r&&a.push(i)}),a}},{key:"getAnchorOutcomingEdge",value:function(r){var a=[];return this.edges.forEach(function(i){i.sourceAnchorId===r&&a.push(i)}),a}},{key:"getNodeIncomingNode",value:function(r){var a=this,i=[];return this.edges.forEach(function(s){s.targetNodeId===r&&i.push(a.nodesMap[s.sourceNodeId].model)}),i}},{key:"getNodeOutgoingNode",value:function(r){var a=this,i=[];return this.edges.forEach(function(s){s.sourceNodeId===r&&i.push(a.nodesMap[s.targetNodeId].model)}),i}},{key:"setTheme",value:function(r){this.theme=Bi(Xi(Xi({},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(D){var I=D.x,X=D.y,q=D.width,ee=D.height,ge=D.getNodeStyle().strokeWidth,ve=ge===void 0?0:ge,we=I+q/2+ve,Ce=I-q/2-ve,Je=X+ee/2+ve,qe=X-ee/2-ve;a=a.concat([we,Ce].filter(function(gt){return!Number.isNaN(gt)})),i=i.concat([Je,qe].filter(function(gt){return!Number.isNaN(gt)}))});var s=Math.min.apply(Math,ti(a)),h=Math.max.apply(Math,ti(a)),m=Math.min.apply(Math,ti(i)),x=h-s||0,S=Math.max.apply(Math,ti(i))-m||0;return{virtualRectWidth:x,virtualRectHeight:S,virtualRectCenterPositionX:s+x/2,virtualRectCenterPositionY:m+S/2}}},{key:"translateCenter",value:function(){var r=this.nodes,a=this.width,i=this.height,s=this.rootEl,h=this.transformModel;if(r.length){var m=a||s.clientWidth,x=i||s.clientHeight,S=this.getVirtualRectSize(),D=S.virtualRectCenterPositionX,I=S.virtualRectCenterPositionY;h.focusOn(D,I,m,x)}}},{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,s=this.width,h=this.height,m=this.rootEl,x=this.transformModel;if(i.length){var S=s||m.clientWidth,D=h||m.clientHeight,I=this.getVirtualRectSize(),X=I.virtualRectWidth,q=I.virtualRectHeight,ee=I.virtualRectCenterPositionX,ge=I.virtualRectCenterPositionY,ve=(X+a)/S,we=(q+r)/D,Ce=0;Ce=1/Math.max(ve,we);var Je=[S/2,D/2];x.zoom(Ce,Je),x.focusOn(ee,ge,S,D)}}},{key:"openEdgeAnimation",value:function(r){this.getEdgeModelById(r).openEdgeAnimation()}},{key:"closeEdgeAnimation",value:function(r){this.getEdgeModelById(r).closeEdgeAnimation()}}],n&&u_(e.prototype,n),t}(),Rt=_t(ce.prototype,"width",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),$t=_t(ce.prototype,"height",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),bt=_t(ce.prototype,"edgeType",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Mt=_t(ce.prototype,"nodes",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Wn=_t(ce.prototype,"edges",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Cr=_t(ce.prototype,"overlapMode",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return Sn.DEFAULT}}),vo=_t(ce.prototype,"background",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Vn=_t(ce.prototype,"transformModel",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Co=_t(ce.prototype,"editConfigModel",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),ei=_t(ce.prototype,"gridSize",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),Ca=_t(ce.prototype,"partial",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),Lu=_t(ce.prototype,"fakerNode",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),_t(ce.prototype,"nodesMap",[d.m],Object.getOwnPropertyDescriptor(ce.prototype,"nodesMap"),ce.prototype),_t(ce.prototype,"edgesMap",[d.m],Object.getOwnPropertyDescriptor(ce.prototype,"edgesMap"),ce.prototype),_t(ce.prototype,"modelsMap",[d.m],Object.getOwnPropertyDescriptor(ce.prototype,"modelsMap"),ce.prototype),_t(ce.prototype,"sortElements",[d.m],Object.getOwnPropertyDescriptor(ce.prototype,"sortElements"),ce.prototype),_t(ce.prototype,"textEditElement",[d.m],Object.getOwnPropertyDescriptor(ce.prototype,"textEditElement"),ce.prototype),_t(ce.prototype,"selectElements",[d.m],Object.getOwnPropertyDescriptor(ce.prototype,"selectElements"),ce.prototype),_t(ce.prototype,"selectNodes",[d.m],Object.getOwnPropertyDescriptor(ce.prototype,"selectNodes"),ce.prototype),_t(ce.prototype,"setFakerNode",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"setFakerNode"),ce.prototype),_t(ce.prototype,"removeFakerNode",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"removeFakerNode"),ce.prototype),_t(ce.prototype,"setModel",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"setModel"),ce.prototype),_t(ce.prototype,"toFront",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"toFront"),ce.prototype),_t(ce.prototype,"setElementZIndex",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"setElementZIndex"),ce.prototype),_t(ce.prototype,"deleteNode",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"deleteNode"),ce.prototype),_t(ce.prototype,"addNode",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"addNode"),ce.prototype),_t(ce.prototype,"cloneNode",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"cloneNode"),ce.prototype),_t(ce.prototype,"moveNode",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"moveNode"),ce.prototype),_t(ce.prototype,"moveNode2Coordinate",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"moveNode2Coordinate"),ce.prototype),_t(ce.prototype,"editText",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"editText"),ce.prototype),_t(ce.prototype,"addEdge",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"addEdge"),ce.prototype),_t(ce.prototype,"moveEdge",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"moveEdge"),ce.prototype),_t(ce.prototype,"deleteEdgeBySourceAndTarget",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"deleteEdgeBySourceAndTarget"),ce.prototype),_t(ce.prototype,"deleteEdgeById",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"deleteEdgeById"),ce.prototype),_t(ce.prototype,"deleteEdgeBySource",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"deleteEdgeBySource"),ce.prototype),_t(ce.prototype,"deleteEdgeByTarget",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"deleteEdgeByTarget"),ce.prototype),_t(ce.prototype,"setElementStateById",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"setElementStateById"),ce.prototype),_t(ce.prototype,"updateText",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"updateText"),ce.prototype),_t(ce.prototype,"selectNodeById",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"selectNodeById"),ce.prototype),_t(ce.prototype,"selectEdgeById",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"selectEdgeById"),ce.prototype),_t(ce.prototype,"selectElementById",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"selectElementById"),ce.prototype),_t(ce.prototype,"clearSelectElements",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"clearSelectElements"),ce.prototype),_t(ce.prototype,"moveNodes",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"moveNodes"),ce.prototype),_t(ce.prototype,"setDefaultEdgeType",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"setDefaultEdgeType"),ce.prototype),_t(ce.prototype,"changeNodeType",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"changeNodeType"),ce.prototype),_t(ce.prototype,"changeEdgeType",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"changeEdgeType"),ce.prototype),_t(ce.prototype,"getNodeIncomingEdge",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"getNodeIncomingEdge"),ce.prototype),_t(ce.prototype,"getNodeOutgoingEdge",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"getNodeOutgoingEdge"),ce.prototype),_t(ce.prototype,"getAnchorIncomingEdge",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"getAnchorIncomingEdge"),ce.prototype),_t(ce.prototype,"getAnchorOutcomingEdge",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"getAnchorOutcomingEdge"),ce.prototype),_t(ce.prototype,"getNodeIncomingNode",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"getNodeIncomingNode"),ce.prototype),_t(ce.prototype,"getNodeOutgoingNode",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"getNodeOutgoingNode"),ce.prototype),_t(ce.prototype,"setTheme",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"setTheme"),ce.prototype),_t(ce.prototype,"resize",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"resize"),ce.prototype),_t(ce.prototype,"clearData",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"clearData"),ce.prototype),_t(ce.prototype,"translateCenter",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"translateCenter"),ce.prototype),_t(ce.prototype,"fitView",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"fitView"),ce.prototype),_t(ce.prototype,"openEdgeAnimation",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"openEdgeAnimation"),ce.prototype),_t(ce.prototype,"closeEdgeAnimation",[d.k],Object.getOwnPropertyDescriptor(ce.prototype,"closeEdgeAnimation"),ce.prototype),ce),s_=vg;function vh(t){return vh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vh(t)}function gh(){return gh=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},gh.apply(this,arguments)}function c_(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function mh(t,e){return mh=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},mh(t,e)}function l_(t){var e=function(){if(typeof Reflect=="undefined"||!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(n){return!1}}();return function(){var n,r=xp(t);if(e){var a=xp(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return f_(this,n)}}function f_(t,e){if(e&&(vh(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return wi(t)}function wi(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function xp(t){return xp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},xp(t)}function Wi(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var gg,p_=ai(hg=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&mh(i,s)})(a,t);var e,n,r=l_(a);function a(i){var s;(function(S,D){if(!(S instanceof D))throw new TypeError("Cannot call a class as a function")})(this,a),Wi(wi(s=r.call(this)),"stepDrag",void 0),Wi(wi(s),"stepScrollX",0),Wi(wi(s),"stepScrollY",0),Wi(wi(s),"onDragging",function(S){var D=S.deltaX,I=S.deltaY;s.setState({isDragging:!0});var X=s.props.graphModel,q=X.transformModel;X.editConfigModel.stopMoveGraph!==!0&&q.translate(D,I)}),Wi(wi(s),"onDragEnd",function(){s.setState({isDragging:!1})}),Wi(wi(s),"zoomHandler",function(S){var D=s.props,I=D.graphModel,X=I.editConfigModel,q=I.transformModel,ee=I.gridSize,ge=D.graphModel,ve=S.deltaX,we=S.deltaY;if(X.stopScrollGraph||S.ctrlKey===!0){if(!X.stopZoomGraph){S.preventDefault();var Ce=ge.getPointByClient({x:S.clientX,y:S.clientY}).canvasOverlayPosition,Je=Ce.x,qe=Ce.y;q.zoom(S.deltaY<0,[Je,qe])}}else{if(S.preventDefault(),s.stepScrollX+=ve,s.stepScrollY+=we,Math.abs(s.stepScrollX)>=ee){var gt=s.stepScrollX%ee,$e=s.stepScrollX-gt;q.translate(-$e*q.SCALE_X,0),s.stepScrollX=gt}if(Math.abs(s.stepScrollY)>=ee){var ht=s.stepScrollY%ee,tt=s.stepScrollY-ht;q.translate(0,-tt*q.SCALE_Y),s.stepScrollY=ht}}}),Wi(wi(s),"clickHandler",function(S){if(S.target.getAttribute("name")==="canvas-overlay"){var D=s.props.graphModel;D.selectElements.size>0&&D.clearSelectElements(),D.eventCenter.emit(pt.BLANK_CLICK,{e:S})}}),Wi(wi(s),"handleContextMenu",function(S){if(S.target.getAttribute("name")==="canvas-overlay"){S.preventDefault();var D=s.props.graphModel,I=D.getPointByClient({x:S.clientX,y:S.clientY});D.eventCenter.emit(pt.BLANK_CONTEXTMENU,{e:S,position:I})}}),Wi(wi(s),"mouseDownHandler",function(S){var D=s.props.graphModel,I=D.eventCenter,X=D.editConfigModel,q=D.transformModel.SCALE_X,ee=D.gridSize,ge=S.target,ve=!X.adjustEdge&&!X.adjustNodePosition;(ge.getAttribute("name")==="canvas-overlay"||ve)&&(X.stopMoveGraph!==!0?(s.stepDrag.setStep(ee*q),s.stepDrag.handleMouseDown(S)):I.emit(pt.BLANK_MOUSEDOWN,{e:S}),s.clickHandler(S))});var h=i.graphModel,m=h.gridSize,x=h.eventCenter;return s.stepDrag=new no({onDragging:s.onDragging,onDragEnd:s.onDragEnd,step:m,eventType:"BLANK",isStopPropagation:!1,eventCenter:x,model:null}),s.state={isDragging:!1},s}return e=a,(n=[{key:"render",value:function(){var i=this.props.graphModel.transformModel.getTransformStyle().transform,s=this.props,h=s.children,m=s.dnd,x=this.state.isDragging;return Object(fe.g)("svg",gh({xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",name:"canvas-overlay",onWheel:this.zoomHandler,onMouseDown:this.mouseDownHandler,onContextMenu:this.handleContextMenu,className:x?"lf-canvas-overlay lf-dragging":"lf-canvas-overlay lf-drag-able"},m.eventMap()),Object(fe.g)("g",{transform:i},h))}}])&&c_(e.prototype,n),a}(fe.a))||hg;function bh(t){return bh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bh(t)}function d_(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h_(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function _h(t,e){return _h=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},_h(t,e)}function y_(t){var e=function(){if(typeof Reflect=="undefined"||!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(n){return!1}}();return function(){var n,r=Ep(t);if(e){var a=Ep(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return v_(this,n)}}function v_(t,e){if(e&&(bh(e)==="object"||typeof e=="function"))return e;if(e!==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}(t)}function Ep(t){return Ep=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ep(t)}var g_=ai(gg=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&_h(i,s)})(a,t);var e,n,r=y_(a);function a(){return d_(this,a),r.apply(this,arguments)}return e=a,(n=[{key:"componentDidMount",value:function(){this.triggerToolRender()}},{key:"componentDidUpdate",value:function(){this.triggerToolRender()}},{key:"getTools",value:function(){var i=this.props,s=i.tool,h=i.graphModel,m=s.getTools().map(function(x){return Object(fe.g)(x,{graphModel:h,logicFlow:s.instance})});return s.components=m,m}},{key:"triggerToolRender",value:function(){var i=this.props,s=i.tool,h=i.graphModel,m=document.querySelector("#ToolOverlay_".concat(h.flowId)),x=s.getInstance();x.components.forEach(function(S){return S(x,m)}),x.components=[]}},{key:"render",value:function(){var i=this.props.graphModel;return Object(fe.g)("div",{className:"lf-tool-overlay",id:"ToolOverlay_".concat(i.flowId)},this.getTools())}}])&&h_(e.prototype,n),a}(fe.a))||gg;function Oh(t){return Oh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Oh(t)}function m_(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function b_(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function wh(t,e){return wh=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},wh(t,e)}function __(t){var e=function(){if(typeof Reflect=="undefined"||!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(n){return!1}}();return function(){var n,r=Sp(t);if(e){var a=Sp(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return O_(this,n)}}function O_(t,e){if(e&&(Oh(e)==="object"||typeof e=="function"))return e;if(e!==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}(t)}function Sp(t){return Sp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Sp(t)}var mg,w_=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&wh(i,s)})(a,t);var e,n,r=__(a);function a(){return m_(this,a),r.apply(this,arguments)}return e=a,(n=[{key:"render",value:function(){var i=this.props.background;return Object(fe.g)("div",{className:"lf-background"},Object(fe.g)("div",{style:i,className:"lf-background-area"}))}}])&&b_(e.prototype,n),a}(fe.a);function xh(t){return xh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xh(t)}function x_(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function E_(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Eh(t,e){return Eh=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Eh(t,e)}function S_(t){var e=function(){if(typeof Reflect=="undefined"||!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(n){return!1}}();return function(){var n,r=jp(t);if(e){var a=jp(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return j_(this,n)}}function j_(t,e){if(e&&(xh(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return bg(t)}function bg(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function jp(t){return jp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},jp(t)}function P_(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var _g=ai(mg=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&Eh(i,s)})(a,t);var e,n,r=S_(a);function a(){var i;x_(this,a);for(var s=arguments.length,h=new Array(s),m=0;m<s;m++)h[m]=arguments[m];return P_(bg(i=r.call.apply(r,[this].concat(h))),"id",qo()),i}return e=a,(n=[{key:"renderDot",value:function(){var i=this.props,s=i.config,h=s.color,m=s.thickness,x=m===void 0?2:m,S=i.size,D=i.visible,I=Math.min(Math.max(2,x),S/2),X=1;return D||(X=0),Object(fe.g)("rect",{width:I,height:I,rx:I/2,ry:I/2,fill:h,opacity:X})}},{key:"renderMesh",value:function(){var i=this.props,s=i.config,h=s.color,m=s.thickness,x=m===void 0?1:m,S=i.size,D=i.visible,I=Math.min(Math.max(1,x),S/2),X="M ".concat(S," 0 H0 M0 0 V0 ").concat(S),q=1;return D||(q=0),Object(fe.g)("path",{d:X,stroke:h,strokeWidth:I,opacity:q})}},{key:"render",value:function(){var i=this.props,s=i.type,h=i.size,m=i.graphModel.transformModel,x=[m.SCALE_X,m.SKEW_Y,m.SKEW_X,m.SCALE_Y,m.TRANSLATE_X,m.TRANSLATE_Y].join(","),S="matrix(".concat(x,")");return Object(fe.g)("div",{className:"lf-grid"},Object(fe.g)("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%"},Object(fe.g)("defs",null,Object(fe.g)("pattern",{id:this.id,patternUnits:"userSpaceOnUse",patternTransform:S,x:"0",y:"0",width:h,height:h},s==="dot"&&this.renderDot(),s==="mesh"&&this.renderMesh())),Object(fe.g)("rect",{width:"100%",height:"100%",fill:"url(#".concat(this.id,")")})))}}])&&E_(e.prototype,n),a}(fe.a))||mg;_g.defaultProps={size:20,visible:!0,type:"dot",config:{color:"#ababab",thickness:1}},o(53);function Sh(t){return Sh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Sh(t)}function A_(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,s,h=[],m=!0,x=!1;try{for(a=a.call(n);!(m=(i=a.next()).done)&&(h.push(i.value),!r||h.length!==r);m=!0);}catch(S){x=!0,s=S}finally{try{m||a.return==null||a.return()}finally{if(x)throw s}}return h}}(t,e)||function(n,r){if(n){if(typeof n=="string")return Og(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 Og(n,r)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  65. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Og(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var wg,$s=function(t){var e={x1:10,y1:10,x2:20,y2:20,stroke:"black"};return Object.entries(t).forEach(function(n){var r=A_(n,2),a=r[0],i=r[1];(a==="style"||Sh(i)!=="object")&&(e[a]=i)}),Object(fe.g)("line",e)};function jh(t){return jh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},jh(t)}function xg(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function Pp(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?xg(Object(n),!0).forEach(function(r){M_(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):xg(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function M_(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function k_(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function T_(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ph(t,e){return Ph=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Ph(t,e)}function D_(t){var e=function(){if(typeof Reflect=="undefined"||!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(n){return!1}}();return function(){var n,r=Ap(t);if(e){var a=Ap(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return N_(this,n)}}function N_(t,e){if(e&&(jh(e)==="object"||typeof e=="function"))return e;if(e!==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}(t)}function Ap(t){return Ap=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ap(t)}var Eg,C_=ai(wg=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&Ph(i,s)})(a,t);var e,n,r=D_(a);function a(){return k_(this,a),r.apply(this,arguments)}return e=a,(n=[{key:"render",value:function(){var i=this.props.snaplineModel,s=i.position,h=i.isShowHorizontal,m=i.isShowVertical,x=i.getStyle(),S=s.x,D=S===void 0?0:S,I=s.y,X=I===void 0?0:I,q=Pp(Pp({x1:-1e5,y1:X,x2:1e5,y2:X},x),{},{stroke:h?x.stroke:"none"}),ee=Pp(Pp({x1:D,y1:-1e5,x2:D,y2:1e5},x),{},{stroke:m?x.stroke:"none"});return Object(fe.g)("g",{className:"lf-snapline"},Object(fe.g)($s,q),Object(fe.g)($s,ee))}}])&&T_(e.prototype,n),a}(fe.a))||wg;function Ah(t){return Ah=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ah(t)}function R_(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,s,h=[],m=!0,x=!1;try{for(a=a.call(n);!(m=(i=a.next()).done)&&(h.push(i.value),!r||h.length!==r);m=!0);}catch(S){x=!0,s=S}finally{try{m||a.return==null||a.return()}finally{if(x)throw s}}return h}}(t,e)||function(n,r){if(n){if(typeof n=="string")return Sg(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 Sg(n,r)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  66. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Sg(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Ia(t){var e=t.x,n=t.y,r=t.width,a=t.height,i=t.className,s=t.radius,h=e-r/2,m=n-a/2,x={};return Object.entries(t).forEach(function(S){var D=R_(S,2),I=D[0],X=D[1];Ah(X)!=="object"&&(x[I]=X)}),x.className=i?"lf-basic-shape ".concat(i):"lf-basic-shape",s&&(x.rx=s,x.ry=s),x.x=h,x.y=m,Object(fe.g)("rect",x)}function Mh(t){return Mh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Mh(t)}function qs(){return qs=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},qs.apply(this,arguments)}function jg(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function Pg(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?jg(Object(n),!0).forEach(function(r){I_(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):jg(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function I_(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function L_(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function z_(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function kh(t,e){return kh=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},kh(t,e)}function B_(t){var e=function(){if(typeof Reflect=="undefined"||!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(n){return!1}}();return function(){var n,r=Mp(t);if(e){var a=Mp(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return F_(this,n)}}function F_(t,e){if(e&&(Mh(e)==="object"||typeof e=="function"))return e;if(e!==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}(t)}function Mp(t){return Mp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Mp(t)}Ia.defaultProps={className:"",radius:""};var Ag,U_=ai(Eg=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&kh(i,s)})(a,t);var e,n,r=B_(a);function a(){return L_(this,a),r.apply(this,arguments)}return e=a,(n=[{key:"getNodesOutline",value:function(){var i=this.props.graphModel,s=i.nodes,h=i.editConfigModel,m=h.hoverOutline,x=h.nodeSelectedOutline,S=[];return s.forEach(function(D){if(D.isHovered||D.isSelected){var I=D.isHovered,X=D.isSelected,q=D.x,ee=D.y,ge=D.width,ve=D.height;if(x&&X||m&&I){var we=D.getOutlineStyle(),Ce={};if(Object.keys(we).forEach(function(qe){qe!=="hover"&&(Ce[qe]=we[qe])}),I){var Je=we.hover;Ce=Pg(Pg({},Ce),Je)}S.push(Object(fe.g)(Ia,qs({transform:D.transform,className:"lf-outline-node",x:q,y:ee,width:ge+10,height:ve+10},Ce)))}}}),S}},{key:"getEdgeOutline",value:function(){for(var i=this.props.graphModel,s=i.edges,h=i.editConfigModel,m=h.edgeSelectedOutline,x=h.hoverOutline,S=[],D=0;D<s.length;D++){var I=s[D];(m&&I.isSelected||x&&I.isHovered)&&(I.modelType===Yt.LINE_EDGE?S.push(this.getLineOutline(I)):I.modelType===Yt.POLYLINE_EDGE?S.push(this.getPolylineOutline(I)):I.modelType===Yt.BEZIER_EDGE&&S.push(this.getBezierOutline(I)))}return S}},{key:"getLineOutline",value:function(i){var s=i.startPoint,h=i.endPoint,m=(s.x+h.x)/2,x=(s.y+h.y)/2,S=Math.abs(s.x-h.x)+10,D=Math.abs(s.y-h.y)+10,I=i.getOutlineStyle();return Object(fe.g)(Ia,qs({className:"lf-outline-edge",x:m,y:x,width:S,height:D},I))}},{key:"getPolylineOutline",value:function(i){var s=i.points,h=Jo(s),m=Hi(h,8),x=m.x,S=m.y,D=m.width,I=m.height,X=i.getOutlineStyle();return Object(fe.g)(Ia,qs({className:"lf-outline",x,y:S,width:D,height:I},X))}},{key:"getBezierOutline",value:function(i){var s=i.path,h=Au(s),m=Hi(h,8),x=m.x,S=m.y,D=m.width,I=m.height,X=i.getOutlineStyle();return Object(fe.g)(Ia,qs({className:"lf-outline",x,y:S,width:D,height:I},X))}},{key:"render",value:function(){return Object(fe.g)("g",{className:"lf-outline"},this.getNodesOutline(),this.getEdgeOutline())}}])&&z_(e.prototype,n),a}(fe.a))||Eg;function Th(t){return Th=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Th(t)}function G_(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,s,h=[],m=!0,x=!1;try{for(a=a.call(n);!(m=(i=a.next()).done)&&(h.push(i.value),!r||h.length!==r);m=!0);}catch(S){x=!0,s=S}finally{try{m||a.return==null||a.return()}finally{if(x)throw s}}return h}}(t,e)||function(n,r){if(n){if(typeof n=="string")return Mg(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 Mg(n,r)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  67. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Mg(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Zs(t){var e=t.x,n=e===void 0?0:e,r=t.y,a=r===void 0?0:r,i=t.r,s=i===void 0?4:i,h=t.className,m={cx:n,cy:a,r:s,fill:"transparent",fillOpacity:1,strokeWidth:"1",stroke:"#000",strokeOpacity:1};return Object.entries(t).forEach(function(x){var S=G_(x,2),D=S[0],I=S[1];Th(I)!=="object"&&(m[D]=I)}),m.className=h?"lf-basic-shape ".concat(h):"lf-basic-shape",Object(fe.g)("circle",m)}function Dh(t){return Dh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Dh(t)}function H_(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,s,h=[],m=!0,x=!1;try{for(a=a.call(n);!(m=(i=a.next()).done)&&(h.push(i.value),!r||h.length!==r);m=!0);}catch(S){x=!0,s=S}finally{try{m||a.return==null||a.return()}finally{if(x)throw s}}return h}}(t,e)||function(n,r){if(n){if(typeof n=="string")return kg(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 kg(n,r)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  68. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function kg(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Ul(){return Ul=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ul.apply(this,arguments)}function Tg(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function X_(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Dg(t,e,n){return e&&X_(t.prototype,e),t}function Ng(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Nh(t,e)}function Nh(t,e){return Nh=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Nh(t,e)}function Cg(t){var e=function(){if(typeof Reflect=="undefined"||!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(n){return!1}}();return function(){var n,r=Tp(t);if(e){var a=Tp(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Y_(this,n)}}function Y_(t,e){if(e&&(Dh(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return kp(t)}function kp(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Tp(t){return Tp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Tp(t)}function Ch(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Rg,Ig=function(t){Ng(n,t);var e=Cg(n);function n(){var r;return Tg(this,n),Ch(kp(r=e.call(this)),"dragHandler",void 0),Ch(kp(r),"onDragging",function(a){var i=a.event,s=r.props,h=s.graphModel,m=s.bezierModel,x=s.type,S=h.getPointByClient({x:i.clientX,y:i.clientY}).canvasOverlayPosition,D=S.x,I=S.y;m.updateAdjustAnchor({x:D,y:I},x),h.eventCenter.emit(pt.EDGE_ADJUST,{data:m.getData()})}),Ch(kp(r),"onDragEnd",function(){r.props.bezierModel.isDragging=!1}),r.dragHandler=new no({onDragging:r.onDragging,onDragEnd:r.onDragEnd}),r}return Dg(n,[{key:"render",value:function(){var r=this,a=this.props.position,i=a.x,s=a.y,h=this.props.bezierModel.getEdgeStyle().adjustAnchor;return Object(fe.g)(Zs,Ul({className:"lf-bezier-adjust-anchor",x:i,y:s},h,{onMouseDown:function(m){r.dragHandler.handleMouseDown(m)}}))}}]),n}(fe.a),W_=ai(Ag=function(t){Ng(n,t);var e=Cg(n);function n(){return Tg(this,n),e.apply(this,arguments)}return Dg(n,[{key:"getBezierAdjust",value:function(r,a){var i=r.path,s=r.id,h=H_(Au(i),4),m=h[0],x=h[1],S=h[2],D=h[3],I=r.getEdgeStyle().adjustLine,X=[];return X.push(Object(fe.g)($s,Ul({x1:m.x,y1:m.y,x2:x.x,y2:x.y},I))),X.push(Object(fe.g)(Ig,{position:x,bezierModel:r,graphModel:a,key:"".concat(s,"_ePre"),type:"sNext"})),X.push(Object(fe.g)($s,Ul({x1:D.x,y1:D.y,x2:S.x,y2:S.y},I))),X.push(Object(fe.g)(Ig,{position:S,bezierModel:r,graphModel:a,key:"".concat(s,"_sNext"),type:"ePre"})),X}},{key:"selectedBezierEdge",value:function(){for(var r=this.props.graphModel,a=r.edges,i=[],s=0;s<a.length;s++){var h=a[s];h.isSelected&&h.modelType===Yt.BEZIER_EDGE&&h.draggable&&i.push(this.getBezierAdjust(h,r))}return i}},{key:"render",value:function(){return Object(fe.g)("g",{className:"lf-bezier-adjust"},this.selectedBezierEdge())}}]),n}(fe.a))||Ag;function Rh(t){return Rh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Rh(t)}function V_(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function K_(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ih(t,e){return Ih=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Ih(t,e)}function $_(t){var e=function(){if(typeof Reflect=="undefined"||!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(n){return!1}}();return function(){var n,r=Dp(t);if(e){var a=Dp(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return q_(this,n)}}function q_(t,e){if(e&&(Rh(e)==="object"||typeof e=="function"))return e;if(e!==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}(t)}function Dp(t){return Dp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Dp(t)}var Lg,Z_=ai(Rg=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&Ih(i,s)})(a,t);var e,n,r=$_(a);function a(){return V_(this,a),r.apply(this,arguments)}return e=a,(n=[{key:"render",value:function(){var i=this.props.graphModel.transformModel.getTransformStyle().transform,s=this.props.children;return Object(fe.g)("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",className:"modification-overlay"},Object(fe.g)("g",{transform:i},s))}}])&&K_(e.prototype,n),a}(fe.a))||Rg;function Lh(t){return Lh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Lh(t)}function zh(){return zh=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},zh.apply(this,arguments)}function J_(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Q_(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Bh(t,e){return Bh=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Bh(t,e)}function eO(t){var e=function(){if(typeof Reflect=="undefined"||!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(n){return!1}}();return function(){var n,r=Np(t);if(e){var a=Np(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return tO(this,n)}}function tO(t,e){if(e&&(Lh(e)==="object"||typeof e=="function"))return e;if(e!==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}(t)}function Np(t){return Np=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Np(t)}var nO=ai(Lg=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&Bh(i,s)})(a,t);var e,n,r=eO(a);function a(){return J_(this,a),r.apply(this,arguments)}return e=a,n=[{key:"getComponent",value:function(i,s){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"canvas-overlay",m=this.props.getView,x=m(i.type);return Object(fe.g)(x,{key:i.id,model:i,graphModel:s,overlay:h})}},{key:"render",value:function(){var i=this,s=this.props,h=s.graphModel,m=s.tool,x=s.options,S=s.dnd,D=s.snaplineModel,I={};x.width&&(I.width="".concat(h.width,"px")),x.height&&(I.height="".concat(h.height,"px"));var X=x.grid,q=h.fakerNode,ee=h.editConfigModel.adjustEdge;return Object(fe.g)("div",{className:"lf-graph","flow-id":h.flowId,style:I},Object(fe.g)(p_,{graphModel:h,dnd:S},Object(fe.g)("g",{className:"lf-base"},is(h.sortElements,function(ge){return i.getComponent(ge,h)})),q?this.getComponent(q,h):""),Object(fe.g)(Z_,{graphModel:h},Object(fe.g)(U_,{graphModel:h}),ee?Object(fe.g)(W_,{graphModel:h}):"",x.snapline!==!1?Object(fe.g)(C_,{snaplineModel:D}):""),Object(fe.g)(g_,{graphModel:h,tool:m}),x.background&&Object(fe.g)(w_,{background:x.background}),x.grid&&Object(fe.g)(_g,zh({},X,{graphModel:h})))}}],n&&Q_(e.prototype,n),a}(fe.a))||Lg,rO=nO;function zg(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function Cp(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?zg(Object(n),!0).forEach(function(r){Vi(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):zg(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function oO(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Vi(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var iO=function(){function t(r){var a=this;(function(s,h){if(!(s instanceof h))throw new TypeError("Cannot call a class as a function")})(this,t),Vi(this,"nodeConfig",void 0),Vi(this,"lf",void 0),Vi(this,"fakerNode",void 0),Vi(this,"stopDrag",function(){a.nodeConfig=null,window.document.removeEventListener("mouseup",a.stopDrag)}),Vi(this,"dragEnter",function(s){a.nodeConfig&&!a.fakerNode&&(a.fakerNode=a.lf.createFakerNode(Cp(Cp({},a.nodeConfig),a.clientToLocalPoint({x:s.clientX,y:s.clientY}))))}),Vi(this,"onDragOver",function(s){if(s.preventDefault(),a.fakerNode){var h=a.clientToLocalPoint({x:s.clientX,y:s.clientY}),m=h.x,x=h.y;a.fakerNode.moveTo(m,x);var S=a.fakerNode.getData();a.lf.setNodeSnapLine(S),a.lf.graphModel.eventCenter.emit(pt.NODE_DND_DRAG,{data:S})}return!1}),Vi(this,"onDragLeave",function(){a.fakerNode&&(a.lf.removeNodeSnapLine(),a.lf.graphModel.removeFakerNode(),a.fakerNode=null)}),Vi(this,"onDrop",function(s){a.lf.graphModel&&s&&a.nodeConfig&&(a.lf.addNode(Cp(Cp({},a.nodeConfig),a.clientToLocalPoint({x:s.clientX,y:s.clientY})),pt.NODE_DND_ADD,s),s.preventDefault(),s.stopPropagation(),a.nodeConfig=null,a.lf.removeNodeSnapLine(),a.lf.graphModel.removeFakerNode(),a.fakerNode=null)});var i=r.lf;this.lf=i}var e,n;return e=t,(n=[{key:"clientToLocalPoint",value:function(r){var a=r.x,i=r.y,s=pa(this.lf.options,["grid","size"]),h=this.lf.graphModel.getPointByClient({x:a,y:i}).canvasOverlayPosition,m=h.x,x=h.y;return{x:yi(m,s),y:yi(x,s)}}},{key:"startDrag",value:function(r){var a=this.lf.graphModel.editConfigModel;a!=null&&a.isSilentMode||(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}}}])&&oO(e.prototype,n),t}();function Bg(t){var e=t.container,n=t.grid,r=t.width,a=t.height;if(!e)throw new Error("请检查 container 参数是否有效");if(typeof r=="string"||typeof a=="string")throw new Error("width或height不支持传入字符串,请传数字");return n&&(t.grid=gu({size:20,type:"dot",visible:!0,config:{color:"#ababab",thickness:1}},n)),gu({},Ug,t)}var pn,Fg,Ug={background:!1,grid:!1,textEdit:!0,disabledTools:[]};function Fh(t){return Fh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fh(t)}function Uh(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,s,h=[],m=!0,x=!1;try{for(a=a.call(n);!(m=(i=a.next()).done)&&(h.push(i.value),!r||h.length!==r);m=!0);}catch(S){x=!0,s=S}finally{try{m||a.return==null||a.return()}finally{if(x)throw s}}return h}}(t,e)||function(n,r){if(n){if(typeof n=="string")return Gg(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 Gg(n,r)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  69. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Gg(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Hg(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function Rp(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Hg(Object(n),!0).forEach(function(r){Xg(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Hg(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function aO(t,e,n,r){n&&Object.defineProperty(t,e,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function uO(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function sO(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Gl(){return Gl=typeof Reflect!="undefined"&&Reflect.get?Reflect.get:function(t,e,n){var r=cO(t,e);if(r){var a=Object.getOwnPropertyDescriptor(r,e);return a.get?a.get.call(arguments.length<3?t:n):a.value}},Gl.apply(this,arguments)}function cO(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&(t=La(t))!==null;);return t}function Gh(t,e){return Gh=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Gh(t,e)}function lO(t){var e=function(){if(typeof Reflect=="undefined"||!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(n){return!1}}();return function(){var n,r=La(t);if(e){var a=La(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return fO(this,n)}}function fO(t,e){if(e&&(Fh(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ip(t)}function Ip(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function La(t){return La=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},La(t)}function Xg(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ri(t,e,n,r,a){var i={};return Object.keys(r).forEach(function(s){i[s]=r[s]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce(function(s,h){return h(t,e,s)||s},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(t,e,i),i=null),i}var Hh=(pn=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&Gh(i,s)})(a,t);var e,n,r=lO(a);function a(){var i;uO(this,a);for(var s=arguments.length,h=new Array(s),m=0;m<s;m++)h[m]=arguments[m];return Xg(Ip(i=r.call.apply(r,[this].concat(h))),"modelType",Yt.BEZIER_EDGE),aO(Ip(i),"path",Fg,Ip(i)),i}return e=a,(n=[{key:"initEdgeData",value:function(i){this.offset=100,Gl(La(a.prototype),"initEdgeData",this).call(this,i)}},{key:"getEdgeStyle",value:function(){var i=this.graphModel.theme.bezier;return Rp(Rp({},Gl(La(a.prototype),"getEdgeStyle",this).call(this)),fn(i))}},{key:"getTextPosition",value:function(){if(this.pointsList&&this.pointsList.length>0){var i=0,s=0;return this.pointsList.forEach(function(h){var m=h.x,x=h.y;i+=m,s+=x}),{x:i/this.pointsList.length,y:s/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=Gl(La(a.prototype),"getData",this).call(this),s=this.pointsList.map(function(h){return{x:h.x,y:h.y}});return Rp(Rp({},i),{},{pointsList:s})}},{key:"getControls",value:function(){var i=this.startPoint,s=this.endPoint;return Pu({start:i,end:s,sourceNode:this.sourceNode,targetNode:this.targetNode,offset:this.offset})}},{key:"getPath",value:function(i){var s=Uh(i,4),h=s[0],m=s[1],x=s[2],S=s[3];return"M ".concat(h.x," ").concat(h.y,`
  70. C `).concat(m.x," ").concat(m.y,`,
  71. `).concat(x.x," ").concat(x.y,`,
  72. `).concat(S.x," ").concat(S.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(),s=i.sNext,h=i.ePre;this.updatePath(s,h)}},{key:"updatePath",value:function(i,s){i=fn(i),s=fn(s);var h={x:this.startPoint.x,y:this.startPoint.y},m={x:this.endPoint.x,y:this.endPoint.y};if(!i||!s){var x=this.getControls();i=x.sNext,s=x.ePre}this.pointsList=[h,i,s,m],this.path=this.getPath(this.pointsList)}},{key:"updateStartPoint",value:function(i){this.startPoint=Object.assign({},i),this.updatePoints()}},{key:"updateEndPoint",value:function(i){this.endPoint=Object.assign({},i),this.updatePoints()}},{key:"moveStartPoint",value:function(i,s){this.startPoint.x+=i,this.startPoint.y+=s;var h=Uh(this.pointsList,3),m=h[1],x=h[2];m.x+=i,m.y+=s,this.updatePath(m,x)}},{key:"moveEndPoint",value:function(i,s){this.endPoint.x+=i,this.endPoint.y+=s;var h=Uh(this.pointsList,3),m=h[1],x=h[2];x.x+=i,x.y+=s,this.updatePath(m,x)}},{key:"updateAdjustAnchor",value:function(i,s){s==="sNext"?this.pointsList[1]=i:s==="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 s=i.startPoint,h=i.endPoint,m=i.sourceNode,x=i.targetNode,S=Pu({start:s,end:h,sourceNode:m,targetNode:x,offset:this.offset}),D=S.sNext,I=S.ePre;this.pointsList=[s,D,I,h],this.initPoints()}}])&&sO(e.prototype,n),a}(dl),Fg=ri(pn.prototype,"path",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),ri(pn.prototype,"initPoints",[d.k],Object.getOwnPropertyDescriptor(pn.prototype,"initPoints"),pn.prototype),ri(pn.prototype,"updatePoints",[d.k],Object.getOwnPropertyDescriptor(pn.prototype,"updatePoints"),pn.prototype),ri(pn.prototype,"updateStartPoint",[d.k],Object.getOwnPropertyDescriptor(pn.prototype,"updateStartPoint"),pn.prototype),ri(pn.prototype,"updateEndPoint",[d.k],Object.getOwnPropertyDescriptor(pn.prototype,"updateEndPoint"),pn.prototype),ri(pn.prototype,"moveStartPoint",[d.k],Object.getOwnPropertyDescriptor(pn.prototype,"moveStartPoint"),pn.prototype),ri(pn.prototype,"moveEndPoint",[d.k],Object.getOwnPropertyDescriptor(pn.prototype,"moveEndPoint"),pn.prototype),ri(pn.prototype,"updateAdjustAnchor",[d.k],Object.getOwnPropertyDescriptor(pn.prototype,"updateAdjustAnchor"),pn.prototype),ri(pn.prototype,"getAdjustStart",[d.k],Object.getOwnPropertyDescriptor(pn.prototype,"getAdjustStart"),pn.prototype),ri(pn.prototype,"getAdjustEnd",[d.k],Object.getOwnPropertyDescriptor(pn.prototype,"getAdjustEnd"),pn.prototype),ri(pn.prototype,"updateAfterAdjustStartAndEnd",[d.k],Object.getOwnPropertyDescriptor(pn.prototype,"updateAfterAdjustStartAndEnd"),pn.prototype),pn),Ye,Yg,Wg,Vg,Kg,$g,qg,Zg,Jg,Qg,em,tm,nm,rm,om,im,am,um,sm,cm,lm,fm,pm,pO=function(t){return t==null};function dO(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,s,h=[],m=!0,x=!1;try{for(a=a.call(n);!(m=(i=a.next()).done)&&(h.push(i.value),!r||h.length!==r);m=!0);}catch(S){x=!0,s=S}finally{try{m||a.return==null||a.return()}finally{if(x)throw s}}return h}}(t,e)||dm(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  73. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Xh(t){return Xh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xh(t)}function dm(t,e){if(t){if(typeof t=="string")return hm(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?hm(t,e):void 0}}function hm(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function ym(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function Yr(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?ym(Object(n),!0).forEach(function(r){ro(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ym(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Kn(t,e,n,r){n&&Object.defineProperty(t,e,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function hO(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ro(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ht(t,e,n,r,a){var i={};return Object.keys(r).forEach(function(s){i[s]=r[s]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce(function(s,h){return h(t,e,s)||s},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(t,e,i),i=null),i}var Ki,vm,$i=(Ye=function(){function t(r,a){(function(i,s){if(!(i instanceof s))throw new TypeError("Cannot call a class as a function")})(this,t),ro(this,"id",""),Kn(this,"type",Yg,this),Kn(this,"x",Wg,this),Kn(this,"y",Vg,this),Kn(this,"text",Kg,this),Kn(this,"properties",$g,this),Kn(this,"_width",qg,this),Kn(this,"_height",Zg,this),Kn(this,"anchorsOffset",Jg,this),Kn(this,"isSelected",Qg,this),Kn(this,"isHovered",em,this),Kn(this,"isShowAnchor",tm,this),Kn(this,"isDragging",nm,this),Kn(this,"isHitable",rm,this),Kn(this,"draggable",om,this),Kn(this,"visible",im,this),Kn(this,"enableRotate",am,this),ro(this,"virtual",!1),ro(this,"graphModel",void 0),Kn(this,"zIndex",um,this),Kn(this,"state",sm,this),Kn(this,"autoToFront",cm,this),Kn(this,"style",lm,this),Kn(this,"transform",fm,this),Kn(this,"_rotate",pm,this),ro(this,"BaseType",Bn.NODE),ro(this,"modelType",Yt.NODE),ro(this,"additionStateData",void 0),ro(this,"targetRules",[]),ro(this,"sourceRules",[]),ro(this,"moveRules",[]),ro(this,"hasSetTargetRules",!1),ro(this,"hasSetSourceRules",!1),this.graphModel=a,this.initNodeData(r),this.setAttributes()}var e,n;return e=t,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:"rotate",get:function(){return this._rotate},set:function(r){this._rotate=r;var a=this.x,i=a===void 0?0:a,s=this.y,h=s===void 0?0:s;this.transform=new Ra(-i,-h).rotate(r).translate(i,h).toString()}},{key:"incoming",get:function(){return{nodes:this.graphModel.getNodeIncomingNode(this.id),edges:this.graphModel.getNodeIncomingEdge(this.id)}}},{key:"outgoing",get:function(){return{nodes:this.graphModel.getNodeOutgoingNode(this.id),edges:this.graphModel.getNodeOutgoingEdge(this.id)}}},{key:"initNodeData",value:function(r){if(r.properties||(r.properties={}),!r.id){var a=this.graphModel.idGenerator,i=a&&a(r.type),s=this.createId();r.id=s||i||qo()}this.formatText(r),or(this,function(h){return Xo(h,["id","type","x","y","text","properties","virtual","rotate"])}(r)),this.graphModel.overlapMode===Sn.INCREASE&&(this.zIndex=r.zIndex||fl())}},{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,s=r.value,h=this.properties;Object(d.x)(h)&&(h=Object(d.I)(h));var m={id:this.id,type:this.type,x:this.x,y:this.y,properties:h};return this.rotate&&(m.rotate=this.rotate),this.graphModel.overlapMode===Sn.INCREASE&&(m.zIndex=this.zIndex),s&&(m.text={x:a,y:i,value:s}),m}},{key:"getHistoryData",value:function(){return this.getData()}},{key:"getProperties",value:function(){return Object(d.I)(this.properties)}},{key:"getOuterGAttributes",value:function(){return{className:""}}},{key:"getNodeStyle",value:function(){return Yr(Yr({},this.graphModel.theme.baseNode),this.style)}},{key:"getTextStyle",value:function(){var r=this.graphModel.theme.nodeText;return fn(r)}},{key:"getRotateControlStyle",value:function(){var r=this.graphModel.theme.rotateControl;return fn(r)}},{key:"getAnchorStyle",value:function(r){var a=this.graphModel.theme.anchor;return fn(a)}},{key:"getAnchorLineStyle",value:function(r){var a=this.graphModel.theme.anchorLine;return fn(a)}},{key:"getOutlineStyle",value:function(){var r=this.graphModel.theme.outline;return fn(r)}},{key:"isAllowConnectedAsSource",value:function(r,a,i,s){var h=this.hasSetSourceRules?this.sourceRules:this.getConnectedSourceRules();this.hasSetSourceRules=!0;for(var m,x=!0,S=0;S<h.length;S++){var D=h[S];if(!D.validate.call(this,this,r,a,i,s)){x=!1,m=D.message;break}}return{isAllPass:x,msg:m}}},{key:"getConnectedSourceRules",value:function(){return this.sourceRules}},{key:"isAllowConnectedAsTarget",value:function(r,a,i,s){var h=this.hasSetTargetRules?this.targetRules:this.getConnectedTargetRules();this.hasSetTargetRules=!0;for(var m,x=!0,S=0;S<h.length;S++){var D=h[S];if(!D.validate.call(this,r,this,a,i,s)){x=!1,m=D.message;break}}return{isAllPass:x,msg:m}}},{key:"isAllowMoveNode",value:function(r,a){var i,s=!0,h=!0,m=function(D,I){var X=typeof Symbol!="undefined"&&D[Symbol.iterator]||D["@@iterator"];if(!X){if(Array.isArray(D)||(X=dm(D))||I){X&&(D=X);var q=0,ee=function(){};return{s:ee,n:function(){return q>=D.length?{done:!0}:{done:!1,value:D[q++]}},e:function(Ce){throw Ce},f:ee}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
  74. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var ge,ve=!0,we=!1;return{s:function(){X=X.call(D)},n:function(){var Ce=X.next();return ve=Ce.done,Ce},e:function(Ce){we=!0,ge=Ce},f:function(){try{ve||X.return==null||X.return()}finally{if(we)throw ge}}}}(this.moveRules.concat(this.graphModel.nodeMoveRules));try{for(m.s();!(i=m.n()).done;){var x=(0,i.value)(this,r,a);if(!x)return!1;if(Xh(x)==="object"){var S=x;if(S.x===!1&&S.y===!1)return!1;s=s&&S.x,h=h&&S.y}}}catch(D){m.e(D)}finally{m.f()}return{x:s,y:h}}},{key:"getConnectedTargetRules",value:function(){return this.targetRules}},{key:"getAnchorsByOffset",value:function(){var r=this.anchorsOffset,a=this.id,i=this.x,s=this.y;return r&&r.length>0?r.map(function(h,m){return h.length?(h=h,{id:"".concat(a,"_").concat(m),x:i+h[0],y:s+h[1]}):Yr(Yr({},h=h),{},{x:i+h.x,y:s+h.y,id:h.id||"".concat(a,"_").concat(m)})}):this.getDefaultAnchor()}},{key:"getDefaultAnchor",value:function(){return[]}},{key:"getTargetAnchor",value:function(r){return function(a,i){for(var s,h=Cs(i),m=Number.MAX_SAFE_INTEGER,x=0;x<h.length;x++){var S=ho(a.x,a.y,h[x].x,h[x].y);S<m&&(m=S,s={index:x,anchor:Ts(Ts({},h[x]),{},{x:h[x].x,y:h[x].y,id:h[x].id})})}return s}(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(){var r=this.getAnchorsByOffset(),a=this.x,i=this.y,s=this.rotate;return r.forEach(function(h){var m=h.x,x=h.y,S=dO(new Ro([m,x,1]).translate(-a,-i).rotate(s).translate(a,i)[0],2),D=S[0],I=S[1];h.x=D,h.y=I}),r}},{key:"getAnchorInfo",value:function(r){if(!pO(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],s=!1,h=!1;if(i)s=!0,h=!0;else{var m=this.isAllowMoveNode(r,a);typeof m=="boolean"?(s=m,h=m):(s=m.x,h=m.y)}if(s){var x=this.x+r;this.x=x,this.text&&this.moveText(r,0)}if(h){var S=this.y+a;this.y=S,this.text&&this.moveText(0,a)}return s||h}},{key:"getMoveDistance",value:function(r,a){var i=arguments.length>2&&arguments[2]!==void 0&&arguments[2],s=!1,h=!1,m=0,x=0;if(i)s=!0,h=!0;else{var S=this.isAllowMoveNode(r,a);typeof S=="boolean"?(s=S,h=S):(s=S.x,h=S.y)}if(s&&r){var D=this.x+r;this.x=D,this.text&&this.moveText(r,0),m=r}if(h&&a){var I=this.y+a;this.y=I,this.text&&this.moveText(0,a),x=a}return[m,x]}},{key:"moveTo",value:function(r,a){var i=arguments.length>2&&arguments[2]!==void 0&&arguments[2],s=r-this.x,h=a-this.y;return!(!i&&!this.isAllowMoveNode(s,h)||(this.text&&this.text&&this.moveText(s,h),this.x=r,this.y=a,0))}},{key:"moveText",value:function(r,a){var i=this.text,s=i.x,h=i.y,m=i.value,x=i.draggable,S=i.editable;this.text={value:m,editable:S,draggable:x,x:s+r,y:h+a}}},{key:"updateText",value:function(r){this.text=Yr(Yr({},Object(d.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:"setEnableRotate",value:function(){var r=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];this.enableRotate=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=Yr(Yr({},Object(d.I)(this.properties)),{},ro({},r,pr(a))),this.setAttributes()}},{key:"setProperties",value:function(r){this.properties=Yr(Yr({},Object(d.I)(this.properties)),pr(r)),this.setAttributes()}},{key:"deleteProperty",value:function(r){delete this.properties[r],this.setAttributes()}},{key:"setStyle",value:function(r,a){this.style=Yr(Yr({},this.style),{},ro({},r,pr(a)))}},{key:"setStyles",value:function(r){this.style=Yr(Yr({},this.style),pr(r))}},{key:"updateStyles",value:function(r){this.style=Yr({},pr(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){or(this,r)}}],n&&hO(e.prototype,n),t}(),Yg=Ht(Ye.prototype,"type",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return""}}),Wg=Ht(Ye.prototype,"x",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Vg=Ht(Ye.prototype,"y",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Kg=Ht(Ye.prototype,"text",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{value:"",x:0,y:0,draggable:!1,editable:!0}}}),$g=Ht(Ye.prototype,"properties",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),qg=Ht(Ye.prototype,"_width",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 100}}),Zg=Ht(Ye.prototype,"_height",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 80}}),Jg=Ht(Ye.prototype,"anchorsOffset",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[]}}),Qg=Ht(Ye.prototype,"isSelected",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),em=Ht(Ye.prototype,"isHovered",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),tm=Ht(Ye.prototype,"isShowAnchor",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),nm=Ht(Ye.prototype,"isDragging",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!1}}),rm=Ht(Ye.prototype,"isHitable",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),om=Ht(Ye.prototype,"draggable",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),im=Ht(Ye.prototype,"visible",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),am=Ht(Ye.prototype,"enableRotate",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),um=Ht(Ye.prototype,"zIndex",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),sm=Ht(Ye.prototype,"state",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 1}}),cm=Ht(Ye.prototype,"autoToFront",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return!0}}),lm=Ht(Ye.prototype,"style",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return{}}}),fm=Ht(Ye.prototype,"transform",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),pm=Ht(Ye.prototype,"_rotate",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),Ht(Ye.prototype,"incoming",[d.m],Object.getOwnPropertyDescriptor(Ye.prototype,"incoming"),Ye.prototype),Ht(Ye.prototype,"outgoing",[d.m],Object.getOwnPropertyDescriptor(Ye.prototype,"outgoing"),Ye.prototype),Ht(Ye.prototype,"addNodeMoveRules",[d.k],Object.getOwnPropertyDescriptor(Ye.prototype,"addNodeMoveRules"),Ye.prototype),Ht(Ye.prototype,"move",[d.k],Object.getOwnPropertyDescriptor(Ye.prototype,"move"),Ye.prototype),Ht(Ye.prototype,"getMoveDistance",[d.k],Object.getOwnPropertyDescriptor(Ye.prototype,"getMoveDistance"),Ye.prototype),Ht(Ye.prototype,"moveTo",[d.k],Object.getOwnPropertyDescriptor(Ye.prototype,"moveTo"),Ye.prototype),Ht(Ye.prototype,"moveText",[d.k],Object.getOwnPropertyDescriptor(Ye.prototype,"moveText"),Ye.prototype),Ht(Ye.prototype,"updateText",[d.k],Object.getOwnPropertyDescriptor(Ye.prototype,"updateText"),Ye.prototype),Ht(Ye.prototype,"setSelected",[d.k],Object.getOwnPropertyDescriptor(Ye.prototype,"setSelected"),Ye.prototype),Ht(Ye.prototype,"setHovered",[d.k],Object.getOwnPropertyDescriptor(Ye.prototype,"setHovered"),Ye.prototype),Ht(Ye.prototype,"setIsShowAnchor",[d.k],Object.getOwnPropertyDescriptor(Ye.prototype,"setIsShowAnchor"),Ye.prototype),Ht(Ye.prototype,"setEnableRotate",[d.k],Object.getOwnPropertyDescriptor(Ye.prototype,"setEnableRotate"),Ye.prototype),Ht(Ye.prototype,"setHitable",[d.k],Object.getOwnPropertyDescriptor(Ye.prototype,"setHitable"),Ye.prototype),Ht(Ye.prototype,"setElementState",[d.k],Object.getOwnPropertyDescriptor(Ye.prototype,"setElementState"),Ye.prototype),Ht(Ye.prototype,"setProperty",[d.k],Object.getOwnPropertyDescriptor(Ye.prototype,"setProperty"),Ye.prototype),Ht(Ye.prototype,"setProperties",[d.k],Object.getOwnPropertyDescriptor(Ye.prototype,"setProperties"),Ye.prototype),Ht(Ye.prototype,"deleteProperty",[d.k],Object.getOwnPropertyDescriptor(Ye.prototype,"deleteProperty"),Ye.prototype),Ht(Ye.prototype,"setStyle",[d.k],Object.getOwnPropertyDescriptor(Ye.prototype,"setStyle"),Ye.prototype),Ht(Ye.prototype,"setStyles",[d.k],Object.getOwnPropertyDescriptor(Ye.prototype,"setStyles"),Ye.prototype),Ht(Ye.prototype,"updateStyles",[d.k],Object.getOwnPropertyDescriptor(Ye.prototype,"updateStyles"),Ye.prototype),Ht(Ye.prototype,"setZIndex",[d.k],Object.getOwnPropertyDescriptor(Ye.prototype,"setZIndex"),Ye.prototype),Ht(Ye.prototype,"updateAttributes",[d.k],Object.getOwnPropertyDescriptor(Ye.prototype,"updateAttributes"),Ye.prototype),Ye);function Yh(t){return Yh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Yh(t)}function gm(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function mm(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?gm(Object(n),!0).forEach(function(r){bm(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):gm(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function yO(t,e,n,r){n&&Object.defineProperty(t,e,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function vO(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function gO(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Wh(){return Wh=typeof Reflect!="undefined"&&Reflect.get?Reflect.get:function(t,e,n){var r=mO(t,e);if(r){var a=Object.getOwnPropertyDescriptor(r,e);return a.get?a.get.call(arguments.length<3?t:n):a.value}},Wh.apply(this,arguments)}function mO(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&(t=Js(t))!==null;);return t}function Vh(t,e){return Vh=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Vh(t,e)}function bO(t){var e=function(){if(typeof Reflect=="undefined"||!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(n){return!1}}();return function(){var n,r=Js(t);if(e){var a=Js(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return _O(this,n)}}function _O(t,e){if(e&&(Yh(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Lp(t)}function Lp(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Js(t){return Js=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Js(t)}function bm(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Kh(t,e,n,r,a){var i={};return Object.keys(r).forEach(function(s){i[s]=r[s]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce(function(s,h){return h(t,e,s)||s},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(t,e,i),i=null),i}var Rr,_m,Om,$h=(Ki=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&Vh(i,s)})(a,t);var e,n,r=bO(a);function a(){var i;vO(this,a);for(var s=arguments.length,h=new Array(s),m=0;m<s;m++)h[m]=arguments[m];return bm(Lp(i=r.call.apply(r,[this].concat(h))),"modelType",Yt.CIRCLE_NODE),yO(Lp(i),"r",vm,Lp(i)),i}return e=a,(n=[{key:"width",get:function(){return 2*this.r}},{key:"height",get:function(){return 2*this.r}},{key:"getNodeStyle",value:function(){var i=Wh(Js(a.prototype),"getNodeStyle",this).call(this),s=this.graphModel.theme.circle;return mm(mm({},i),fn(s))}},{key:"getDefaultAnchor",value:function(){var i=this.x,s=this.y,h=this.r;return[{x:i,y:s-h,id:"".concat(this.id,"_0")},{x:i+h,y:s,id:"".concat(this.id,"_1")},{x:i,y:s+h,id:"".concat(this.id,"_2")},{x:i-h,y:s,id:"".concat(this.id,"_3")}]}}])&&gO(e.prototype,n),a}($i),vm=Kh(Ki.prototype,"r",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 50}}),Kh(Ki.prototype,"width",[d.m],Object.getOwnPropertyDescriptor(Ki.prototype,"width"),Ki.prototype),Kh(Ki.prototype,"height",[d.m],Object.getOwnPropertyDescriptor(Ki.prototype,"height"),Ki.prototype),Ki);o(129);function qh(t){return qh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qh(t)}function Zh(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,s,h=[],m=!0,x=!1;try{for(a=a.call(n);!(m=(i=a.next()).done)&&(h.push(i.value),!r||h.length!==r);m=!0);}catch(S){x=!0,s=S}finally{try{m||a.return==null||a.return()}finally{if(x)throw s}}return h}}(t,e)||function(n,r){if(n){if(typeof n=="string")return wm(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 wm(n,r)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  75. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function wm(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function xm(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function Em(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?xm(Object(n),!0).forEach(function(r){jm(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):xm(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Sm(t,e,n,r){n&&Object.defineProperty(t,e,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function OO(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function wO(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Jh(){return Jh=typeof Reflect!="undefined"&&Reflect.get?Reflect.get:function(t,e,n){var r=xO(t,e);if(r){var a=Object.getOwnPropertyDescriptor(r,e);return a.get?a.get.call(arguments.length<3?t:n):a.value}},Jh.apply(this,arguments)}function xO(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&(t=ec(t))!==null;);return t}function Qh(t,e){return Qh=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Qh(t,e)}function EO(t){var e=function(){if(typeof Reflect=="undefined"||!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(n){return!1}}();return function(){var n,r=ec(t);if(e){var a=ec(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return SO(this,n)}}function SO(t,e){if(e&&(qh(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Qs(t)}function Qs(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ec(t){return ec=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ec(t)}function jm(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function tc(t,e,n,r,a){var i={};return Object.keys(r).forEach(function(s){i[s]=r[s]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce(function(s,h){return h(t,e,s)||s},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(t,e,i),i=null),i}var xi,Pm,Am,ey=(Rr=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&Qh(i,s)})(a,t);var e,n,r=EO(a);function a(){var i;OO(this,a);for(var s=arguments.length,h=new Array(s),m=0;m<s;m++)h[m]=arguments[m];return jm(Qs(i=r.call.apply(r,[this].concat(h))),"modelType",Yt.DIAMOND_NODE),Sm(Qs(i),"rx",_m,Qs(i)),Sm(Qs(i),"ry",Om,Qs(i)),i}return e=a,(n=[{key:"getNodeStyle",value:function(){var i=Jh(ec(a.prototype),"getNodeStyle",this).call(this),s=this.graphModel.theme.diamond;return Em(Em({},i),fn(s))}},{key:"points",get:function(){var i=this.x,s=this.y,h=this.rx,m=this.ry;return[[i,s-m],[i+h,s],[i,s+m],[i-h,s]]}},{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,s=Number.MIN_SAFE_INTEGER;return this.points.forEach(function(h){var m=Zh(h,1)[0];m<i&&(i=m),m>s&&(s=m)}),s-i}},{key:"height",get:function(){var i=Number.MAX_SAFE_INTEGER,s=Number.MIN_SAFE_INTEGER;return this.points.forEach(function(h){var m=Zh(h,2)[1];m<i&&(i=m),m>s&&(s=m)}),s-i}},{key:"getDefaultAnchor",value:function(){var i=this;return this.points.map(function(s,h){var m=Zh(s,2);return{x:m[0],y:m[1],id:"".concat(i.id,"_").concat(h)}})}}])&&wO(e.prototype,n),a}($i),_m=tc(Rr.prototype,"rx",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 30}}),Om=tc(Rr.prototype,"ry",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 50}}),tc(Rr.prototype,"points",[d.m],Object.getOwnPropertyDescriptor(Rr.prototype,"points"),Rr.prototype),tc(Rr.prototype,"pointsPosition",[d.m],Object.getOwnPropertyDescriptor(Rr.prototype,"pointsPosition"),Rr.prototype),tc(Rr.prototype,"width",[d.m],Object.getOwnPropertyDescriptor(Rr.prototype,"width"),Rr.prototype),tc(Rr.prototype,"height",[d.m],Object.getOwnPropertyDescriptor(Rr.prototype,"height"),Rr.prototype),Rr);function ty(t){return ty=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ty(t)}function Mm(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function km(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Mm(Object(n),!0).forEach(function(r){Dm(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Mm(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Tm(t,e,n,r){n&&Object.defineProperty(t,e,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function jO(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function PO(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ny(){return ny=typeof Reflect!="undefined"&&Reflect.get?Reflect.get:function(t,e,n){var r=AO(t,e);if(r){var a=Object.getOwnPropertyDescriptor(r,e);return a.get?a.get.call(arguments.length<3?t:n):a.value}},ny.apply(this,arguments)}function AO(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&(t=rc(t))!==null;);return t}function ry(t,e){return ry=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},ry(t,e)}function MO(t){var e=function(){if(typeof Reflect=="undefined"||!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(n){return!1}}();return function(){var n,r=rc(t);if(e){var a=rc(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return kO(this,n)}}function kO(t,e){if(e&&(ty(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return nc(t)}function nc(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function rc(t){return rc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},rc(t)}function Dm(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function zp(t,e,n,r,a){var i={};return Object.keys(r).forEach(function(s){i[s]=r[s]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce(function(s,h){return h(t,e,s)||s},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(t,e,i),i=null),i}var Lo,Nm,oy=(xi=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&ry(i,s)})(a,t);var e,n,r=MO(a);function a(){var i;jO(this,a);for(var s=arguments.length,h=new Array(s),m=0;m<s;m++)h[m]=arguments[m];return Dm(nc(i=r.call.apply(r,[this].concat(h))),"modelType",Yt.ELLIPSE_NODE),Tm(nc(i),"rx",Pm,nc(i)),Tm(nc(i),"ry",Am,nc(i)),i}return e=a,(n=[{key:"getNodeStyle",value:function(){var i=ny(rc(a.prototype),"getNodeStyle",this).call(this),s=this.graphModel.theme.ellipse;return km(km({},i),fn(s))}},{key:"width",get:function(){return 2*this.rx}},{key:"height",get:function(){return 2*this.ry}},{key:"getDefaultAnchor",value:function(){var i=this.x,s=this.y,h=this.rx,m=this.ry;return[{x:i,y:s-m,id:"".concat(this.id,"_0")},{x:i+h,y:s,id:"".concat(this.id,"_1")},{x:i,y:s+m,id:"".concat(this.id,"_2")},{x:i-h,y:s,id:"".concat(this.id,"_3")}]}}])&&PO(e.prototype,n),a}($i),Pm=zp(xi.prototype,"rx",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 30}}),Am=zp(xi.prototype,"ry",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 45}}),zp(xi.prototype,"width",[d.m],Object.getOwnPropertyDescriptor(xi.prototype,"width"),xi.prototype),zp(xi.prototype,"height",[d.m],Object.getOwnPropertyDescriptor(xi.prototype,"height"),xi.prototype),xi);function iy(t){return iy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},iy(t)}function ay(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,s,h=[],m=!0,x=!1;try{for(a=a.call(n);!(m=(i=a.next()).done)&&(h.push(i.value),!r||h.length!==r);m=!0);}catch(S){x=!0,s=S}finally{try{m||a.return==null||a.return()}finally{if(x)throw s}}return h}}(t,e)||function(n,r){if(n){if(typeof n=="string")return Cm(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 Cm(n,r)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  76. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Cm(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Rm(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function Im(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Rm(Object(n),!0).forEach(function(r){Lm(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Rm(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function TO(t,e,n,r){n&&Object.defineProperty(t,e,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function DO(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function NO(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function uy(){return uy=typeof Reflect!="undefined"&&Reflect.get?Reflect.get:function(t,e,n){var r=CO(t,e);if(r){var a=Object.getOwnPropertyDescriptor(r,e);return a.get?a.get.call(arguments.length<3?t:n):a.value}},uy.apply(this,arguments)}function CO(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&(t=oc(t))!==null;);return t}function sy(t,e){return sy=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},sy(t,e)}function RO(t){var e=function(){if(typeof Reflect=="undefined"||!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(n){return!1}}();return function(){var n,r=oc(t);if(e){var a=oc(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return IO(this,n)}}function IO(t,e){if(e&&(iy(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Bp(t)}function Bp(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function oc(t){return oc=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},oc(t)}function Lm(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Fp(t,e,n,r,a){var i={};return Object.keys(r).forEach(function(s){i[s]=r[s]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce(function(s,h){return h(t,e,s)||s},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(t,e,i),i=null),i}var cy,zm,ly=(Lo=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&sy(i,s)})(a,t);var e,n,r=RO(a);function a(){var i;DO(this,a);for(var s=arguments.length,h=new Array(s),m=0;m<s;m++)h[m]=arguments[m];return Lm(Bp(i=r.call.apply(r,[this].concat(h))),"modelType",Yt.POLYGON_NODE),TO(Bp(i),"points",Nm,Bp(i)),i}return e=a,(n=[{key:"getNodeStyle",value:function(){var i=uy(oc(a.prototype),"getNodeStyle",this).call(this),s=this.graphModel.theme.polygon;return Im(Im({},i),fn(s))}},{key:"pointsPosition",get:function(){var i=this.x,s=this.y,h=this.width,m=this.height;return this.points.map(function(x){return{x:x[0]+i-h/2,y:x[1]+s-m/2}})}},{key:"width",get:function(){var i=Number.MAX_SAFE_INTEGER,s=Number.MIN_SAFE_INTEGER;return this.points.forEach(function(h){var m=ay(h,1)[0];m<i&&(i=m),m>s&&(s=m)}),s-i}},{key:"height",get:function(){var i=Number.MAX_SAFE_INTEGER,s=Number.MIN_SAFE_INTEGER;return this.points.forEach(function(h){var m=ay(h,2)[1];m<i&&(i=m),m>s&&(s=m)}),s-i}},{key:"getDefaultAnchor",value:function(){var i=this,s=this.x,h=this.y,m=this.width,x=this.height;return this.points.map(function(S,D){var I=ay(S,2),X=I[0],q=I[1];return{x:s+X-m/2,y:h+q-x/2,id:"".concat(i.id,"_").concat(D)}})}}])&&NO(e.prototype,n),a}($i),Nm=Fp(Lo.prototype,"points",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return[[50,0],[100,50],[50,100],[0,50]]}}),Fp(Lo.prototype,"pointsPosition",[d.m],Object.getOwnPropertyDescriptor(Lo.prototype,"pointsPosition"),Lo.prototype),Fp(Lo.prototype,"width",[d.m],Object.getOwnPropertyDescriptor(Lo.prototype,"width"),Lo.prototype),Fp(Lo.prototype,"height",[d.m],Object.getOwnPropertyDescriptor(Lo.prototype,"height"),Lo.prototype),Lo);function fy(t){return fy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fy(t)}function Bm(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function Fm(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Bm(Object(n),!0).forEach(function(r){Um(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Bm(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function LO(t,e,n,r){n&&Object.defineProperty(t,e,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function zO(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function BO(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function py(){return py=typeof Reflect!="undefined"&&Reflect.get?Reflect.get:function(t,e,n){var r=FO(t,e);if(r){var a=Object.getOwnPropertyDescriptor(r,e);return a.get?a.get.call(arguments.length<3?t:n):a.value}},py.apply(this,arguments)}function FO(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&(t=ic(t))!==null;);return t}function dy(t,e){return dy=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},dy(t,e)}function UO(t){var e=function(){if(typeof Reflect=="undefined"||!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(n){return!1}}();return function(){var n,r=ic(t);if(e){var a=ic(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return GO(this,n)}}function GO(t,e){if(e&&(fy(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Up(t)}function Up(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ic(t){return ic=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ic(t)}function Um(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var za,hy=(cy=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&dy(i,s)})(a,t);var e,n,r=UO(a);function a(){var i;zO(this,a);for(var s=arguments.length,h=new Array(s),m=0;m<s;m++)h[m]=arguments[m];return Um(Up(i=r.call.apply(r,[this].concat(h))),"modelType",Yt.RECT_NODE),LO(Up(i),"radius",zm,Up(i)),i}return e=a,(n=[{key:"getDefaultAnchor",value:function(){var i=this.x,s=this.y,h=this.width,m=this.height;return[{x:i,y:s-m/2,id:"".concat(this.id,"_0")},{x:i+h/2,y:s,id:"".concat(this.id,"_1")},{x:i,y:s+m/2,id:"".concat(this.id,"_2")},{x:i-h/2,y:s,id:"".concat(this.id,"_3")}]}},{key:"getNodeStyle",value:function(){var i=py(ic(a.prototype),"getNodeStyle",this).call(this),s=this.graphModel.theme.rect;return Fm(Fm({},i),fn(s))}}])&&BO(e.prototype,n),a}($i),zm=function(t,e,n,r,a){var i={};return Object.keys(r).forEach(function(s){i[s]=r[s]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce(function(s,h){return h(t,e,s)||s},i),i.initializer===void 0&&(Object.defineProperty(t,e,i),i=null),i}(cy.prototype,"radius",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:function(){return 0}}),cy);function yy(t){return yy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yy(t)}function Gm(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function Hm(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Gm(Object(n),!0).forEach(function(r){Ym(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Gm(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function HO(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function XO(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function vy(){return vy=typeof Reflect!="undefined"&&Reflect.get?Reflect.get:function(t,e,n){var r=YO(t,e);if(r){var a=Object.getOwnPropertyDescriptor(r,e);return a.get?a.get.call(arguments.length<3?t:n):a.value}},vy.apply(this,arguments)}function YO(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&(t=ac(t))!==null;);return t}function gy(t,e){return gy=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},gy(t,e)}function WO(t){var e=function(){if(typeof Reflect=="undefined"||!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(n){return!1}}();return function(){var n,r=ac(t);if(e){var a=ac(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return VO(this,n)}}function VO(t,e){if(e&&(yy(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Xm(t)}function Xm(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ac(t){return ac=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ac(t)}function Ym(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Wm(t,e,n,r,a){var i={};return Object.keys(r).forEach(function(s){i[s]=r[s]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce(function(s,h){return h(t,e,s)||s},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(t,e,i),i=null),i}var my=(za=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&gy(i,s)})(a,t);var e,n,r=WO(a);function a(){var i;HO(this,a);for(var s=arguments.length,h=new Array(s),m=0;m<s;m++)h[m]=arguments[m];return Ym(Xm(i=r.call.apply(r,[this].concat(h))),"modelType",Yt.TEXT_NODE),i}return e=a,(n=[{key:"getTextStyle",value:function(){var i=vy(ac(a.prototype),"getTextStyle",this).call(this),s=this.graphModel.theme.text;return Hm(Hm({},i),fn(s))}},{key:"width",get:function(){var i=String(this.text.value).split(/[\r\n]/g),s=this.getTextStyle().fontSize;return Eu({rows:i,fontSize:s,rowsLength:i.length}).width}},{key:"height",get:function(){var i=String(this.text.value).split(/[\r\n]/g),s=this.getTextStyle().fontSize;return Eu({rows:i,fontSize:s,rowsLength:i.length}).height}}])&&XO(e.prototype,n),a}($i),Wm(za.prototype,"width",[d.m],Object.getOwnPropertyDescriptor(za.prototype,"width"),za.prototype),Wm(za.prototype,"height",[d.m],Object.getOwnPropertyDescriptor(za.prototype,"height"),za.prototype),za);function by(t){return by=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},by(t)}function KO(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function $O(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function _y(t,e){return _y=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},_y(t,e)}function qO(t){var e=function(){if(typeof Reflect=="undefined"||!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(n){return!1}}();return function(){var n,r=Gp(t);if(e){var a=Gp(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return ZO(this,n)}}function ZO(t,e){if(e&&(by(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Vm(t)}function Vm(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Gp(t){return Gp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Gp(t)}function JO(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var oi,Km,$m,qm,Oy=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&_y(i,s)})(a,t);var e,n,r=qO(a);function a(){var i;KO(this,a);for(var s=arguments.length,h=new Array(s),m=0;m<s;m++)h[m]=arguments[m];return JO(Vm(i=r.call.apply(r,[this].concat(h))),"modelType",Yt.HTML_NODE),i}return e=a,(n=[{key:"getDefaultAnchor",value:function(){var i=this.x,s=this.y,h=this.width,m=this.height;return[{x:i,y:s-m/2,id:"".concat(this.id,"_0")},{x:i+h/2,y:s,id:"".concat(this.id,"_1")},{x:i,y:s+m/2,id:"".concat(this.id,"_2")},{x:i-h/2,y:s,id:"".concat(this.id,"_3")}]}}])&&$O(e.prototype,n),a}($i);function Zm(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function wy(t,e,n,r){n&&Object.defineProperty(t,e,{enumerable:n.enumerable,configurable:n.configurable,writable:n.writable,value:n.initializer?n.initializer.call(r):void 0})}function QO(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Jm(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Hl(t,e,n,r,a){var i={};return Object.keys(r).forEach(function(s){i[s]=r[s]}),i.enumerable=!!i.enumerable,i.configurable=!!i.configurable,("value"in i||i.initializer)&&(i.writable=!0),i=n.slice().reverse().reduce(function(s,h){return h(t,e,s)||s},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(t,e,i),i=null),i}var Qm=(oi=function(){function t(r){(function(a,i){if(!(a instanceof i))throw new TypeError("Cannot call a class as a function")})(this,t),Jm(this,"graphModel",void 0),wy(this,"isShowHorizontal",Km,this),wy(this,"isShowVertical",$m,this),wy(this,"position",qm,this),this.isShowHorizontal=!1,this.isShowVertical=!1,this.position={x:0,y:0},this.graphModel=r}var e,n;return e=t,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?Zm(Object(i),!0).forEach(function(s){Jm(r,s,i[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):Zm(Object(i)).forEach(function(s){Object.defineProperty(r,s,Object.getOwnPropertyDescriptor(i,s))})}return r}({},this.graphModel.theme.snapline)}},{key:"getCenterSnapLine",value:function(r,a){for(var i=r.x,s=r.y,h=!1,m=!1,x=0;x<a.length;x++){var S=a[x];if(S.id!==r.id&&(i===S.x&&(h=!0),s===S.y&&(m=!0),h&&m))break}return{isShowVertical:h,isShowHorizontal:m,position:{x:i,y:s}}}},{key:"getHorizontalSnapline",value:function(r,a){var i,s,h=!1,m=r.id;if(m){var x=this.graphModel.fakerNode;if(x&&x.id===m)s=jn(x);else{var S=this.graphModel.getNodeModelById(m);s=jn(S)}}for(var D=0;D<a.length;D++){var I=a[D];if(I.id!==r.id){var X=jn(I);if(X.minY===s.minY||X.maxY===s.minY){h=!0,i=s.minY;break}if(X.minY===s.maxY||X.maxY===s.maxY){h=!0,i=s.maxY;break}}}return or({isShowHorizontal:h,position:{y:i}})}},{key:"getVerticalSnapline",value:function(r,a){var i,s,h=!1,m=r.id;if(m){var x=this.graphModel.fakerNode;if(x&&x.id===m)s=jn(x);else{var S=this.graphModel.getNodeModelById(m);s=jn(S)}}for(var D=0;D<a.length;D++){var I=a[D];if(I.id!==r.id){var X=jn(I);if(X.minX===s.minX||X.maxX===s.minX){h=!0,i=s.minX;break}if(X.minX===s.maxX||X.maxX===s.maxX){h=!0,i=s.maxX;break}}}return or({isShowVertical:h,position:{x:i}})}},{key:"getSnapLinePosition",value:function(r,a){var i=this.getCenterSnapLine(r,a),s=i.isShowHorizontal,h=i.isShowVertical;if(!s){var m=this.getHorizontalSnapline(r,a);m.isShowHorizontal&&(i.isShowHorizontal=m.isShowHorizontal,i.position.y=m.position.y)}if(!h){var x=this.getVerticalSnapline(r,a);x.isShowVertical&&(i.isShowVertical=x.isShowVertical,i.position.x=x.position.x)}return i}},{key:"setSnaplineInfo",value:function(r){var a=r.isShowHorizontal,i=r.isShowVertical,s=r.position;this.position=s,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&&QO(e.prototype,n),t}(),Km=Hl(oi.prototype,"isShowHorizontal",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),$m=Hl(oi.prototype,"isShowVertical",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),qm=Hl(oi.prototype,"position",[d.C],{configurable:!0,enumerable:!0,writable:!0,initializer:null}),Hl(oi.prototype,"clearSnapline",[d.k],Object.getOwnPropertyDescriptor(oi.prototype,"clearSnapline"),oi.prototype),Hl(oi.prototype,"setNodeSnapLine",[d.k],Object.getOwnPropertyDescriptor(oi.prototype,"setNodeSnapLine"),oi.prototype),oi),Xl=new Map,eb=function(t){var e=qo(),n=window.requestAnimationFrame(function r(){if(t(),Xl.get(e)){var a=window.requestAnimationFrame(r);Xl.set(e,a)}});return Xl.set(e,n),e},Hp=function(t){var e=Xl.get(t);e&&(window.cancelAnimationFrame(e),Xl.delete(t))};function xy(t){return xy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xy(t)}function Yl(){return Yl=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Yl.apply(this,arguments)}function tb(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function Wl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?tb(Object(n),!0).forEach(function(r){Si(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):tb(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function ew(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,s,h=[],m=!0,x=!1;try{for(a=a.call(n);!(m=(i=a.next()).done)&&(h.push(i.value),!r||h.length!==r);m=!0);}catch(S){x=!0,s=S}finally{try{m||a.return==null||a.return()}finally{if(x)throw s}}return h}}(t,e)||function(n,r){if(n){if(typeof n=="string")return nb(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 nb(n,r)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  77. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function nb(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function tw(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ey(t,e){return Ey=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Ey(t,e)}function nw(t){var e=function(){if(typeof Reflect=="undefined"||!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(n){return!1}}();return function(){var n,r=Xp(t);if(e){var a=Xp(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return rw(this,n)}}function rw(t,e){if(e&&(xy(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ei(t)}function Ei(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Xp(t){return Xp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Xp(t)}function Si(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ow=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&Ey(i,s)})(a,t);var e,n,r=nw(a);function a(){var i;return function(s,h){if(!(s instanceof h))throw new TypeError("Cannot call a class as a function")}(this,a),Si(Ei(i=r.call(this)),"preTargetNode",void 0),Si(Ei(i),"sourceRuleResults",void 0),Si(Ei(i),"targetRuleResults",void 0),Si(Ei(i),"dragHandler",void 0),Si(Ei(i),"t",void 0),Si(Ei(i),"onDragStart",function(s){var h=s.event,m=i.props,x=m.anchorData,S=m.nodeModel,D=m.graphModel;D.overlapMode,D.selectNodeById(S.id),S.autoToFront&&D.toFront(S.id),D.eventCenter.emit(pt.ANCHOR_DRAGSTART,{data:x,e:h,nodeModel:S}),i.setState({startX:x.x,startY:x.y,endX:x.x,endY:x.y})}),Si(Ei(i),"onDragging",function(s){var h=s.event,m=i.props,x=m.graphModel,S=m.nodeModel,D=m.anchorData,I=x.transformModel,X=x.eventCenter,q=x.width,ee=x.height,ge=x.editConfigModel,ve=ge.autoExpand,we=ge.stopMoveGraph,Ce=h.clientX,Je=h.clientY,qe=x.getPointByClient({x:Ce,y:Je}),gt=qe.domOverlayPosition,$e=gt.x,ht=gt.y,tt=qe.canvasOverlayPosition,Kt=tt.x,Jt=tt.y;i.t&&Hp(i.t);var Tt=[];$e<10?Tt=[10,0]:$e+10>q?Tt=[-10,0]:ht<10?Tt=[0,10]:ht+10>ee&&(Tt=[0,-10]),i.setState({endX:Kt,endY:Jt,dragging:!0}),i.moveAnchorEnd(Kt,Jt),Tt.length>0&&!we&&ve&&(i.t=eb(function(){var rn=ew(Tt,2),Un=rn[0],Gn=rn[1];I.translate(Un,Gn);var Sr=i.state,bo=Sr.endX,_o=Sr.endY;i.setState({endX:bo-Un,endY:_o-Gn}),i.moveAnchorEnd(bo-Un,_o-Gn)})),X.emit(pt.ANCHOR_DRAG,{data:D,e:h,nodeModel:S})}),Si(Ei(i),"onDragEnd",function(s){var h=s.event;i.t&&Hp(i.t);var m=i.checkEnd(h);i.setState({startX:0,startY:0,endX:0,endY:0,dragging:!1}),i.sourceRuleResults.clear(),i.targetRuleResults.clear();var x=i.props,S=x.graphModel,D=x.nodeModel,I=x.anchorData;S.eventCenter.emit(pt.ANCHOR_DRAGEND,{data:I,e:h,nodeModel:D,edgeModel:m})}),Si(Ei(i),"checkEnd",function(s){var h=i.props,m=h.graphModel,x=h.nodeModel,S=h.anchorData,D=S.x,I=S.y,X=S.id,q=(m.edgeType,i.state),ee=q.endX,ge=q.endY,ve=q.dragging,we=xu({x:ee,y:ge},m);if(i.preTargetNode&&i.preTargetNode.state!==cn.DEFAULT&&i.preTargetNode.setElementState(cn.DEFAULT),ve&&we&&we.node){var Ce=we.node,Je=we.anchor.id,qe="".concat(x.id,"_").concat(Ce.id,"_").concat(Je,"_").concat(X),gt=i.sourceRuleResults.get(qe)||{},$e=gt.isAllPass,ht=gt.msg,tt=i.targetRuleResults.get(qe)||{},Kt=tt.isAllPass,Jt=tt.msg;if($e&&Kt){Ce.setElementState(cn.DEFAULT);var Tt=m.edgeGenerator(x.getData(),m.getNodeModelById(we.node.id).getData()),rn=m.addEdge(Wl(Wl({},Tt),{},{sourceNodeId:x.id,sourceAnchorId:X,startPoint:{x:D,y:I},targetNodeId:we.node.id,targetAnchorId:we.anchor.id,endPoint:{x:we.anchor.x,y:we.anchor.y}})),Un=i.props.anchorData;return m.eventCenter.emit(pt.ANCHOR_DROP,{data:Un,e:s,nodeModel:x,edgeModel:rn}),rn}var Gn=Ce.getData();return m.eventCenter.emit(pt.CONNECTION_NOT_ALLOWED,{data:Gn,msg:Jt||ht||"不允许添加连线"}),null}}),i.sourceRuleResults=new Map,i.targetRuleResults=new Map,i.state={startX:0,startY:0,endX:0,endY:0,dragging:!1},i.dragHandler=new no({onDragStart:i.onDragStart,onDragging:i.onDragging,onDragEnd:i.onDragEnd}),i}return e=a,(n=[{key:"getAnchorShape",value:function(){var i=this.props,s=i.anchorData,h=i.style,m=i.node.getAnchorShape(s);if(m)return m;var x=s.x,S=s.y,D=Wl(Wl({},h),h.hover);return Object(fe.g)("g",null,Object(fe.g)(Zs,Yl({className:"lf-node-anchor-hover"},D,{x,y:S})),Object(fe.g)(Zs,Yl({className:"lf-node-anchor"},h,{x,y:S})))}},{key:"customTrajectory",get:function(){return this.props.graphModel.customTrajectory}},{key:"relateEdges",get:function(){var i=this.props,s=i.graphModel,h=s.getAnchorIncomingEdge,m=s.getAnchorOutcomingEdge,x=i.anchorData.id;return{incomingEdgeList:h(x),outcomingEdgeList:m(x)}}},{key:"moveAnchorEnd",value:function(i,s){var h=this.props,m=h.graphModel,x=h.nodeModel,S=h.anchorData,D=xu({x:i,y:s},m);if(D){var I=D.node,X=D.anchor.id;if(this.preTargetNode&&this.preTargetNode!==D.node&&this.preTargetNode.setElementState(cn.DEFAULT),S.id===X)return;this.preTargetNode=I;var q="".concat(x.id,"_").concat(I.id,"_").concat(X,"_").concat(S.id);if(!this.targetRuleResults.has(q)){var ee=D.anchor,ge=x.isAllowConnectedAsSource(I,S,ee),ve=I.isAllowConnectedAsTarget(x,S,ee);this.sourceRuleResults.set(q,ja(ge)),this.targetRuleResults.set(q,ja(ve))}var we=this.sourceRuleResults.get(q).isAllPass,Ce=this.targetRuleResults.get(q).isAllPass;we&&Ce?I.setElementState(cn.ALLOW_CONNECT):I.setElementState(cn.NOT_ALLOW_CONNECT)}else this.preTargetNode&&this.preTargetNode.state!==cn.DEFAULT&&this.preTargetNode.setElementState(cn.DEFAULT)}},{key:"isShowLine",value:function(){var i=this.state,s=i.startX,h=i.startY,m=i.endX,x=i.endY;return ho(s,h,m,x)>10}},{key:"render",value:function(){var i=this,s=this.state,h=s.startX,m=s.startY,x=s.endX,S=s.endY,D=this.props,I=D.anchorData.edgeAddable,X=D.edgeStyle;return Object(fe.g)("g",{className:"lf-anchor"},Object(fe.g)("g",{onMouseDown:function(q){I!==!1&&i.dragHandler.handleMouseDown(q)}},this.getAnchorShape()),this.isShowLine()&&(this.customTrajectory?this.customTrajectory(Wl({sourcePoint:{x:h,y:m},targetPoint:{x,y:S}},X)):Object(fe.g)($s,Yl({x1:h,y1:m,x2:x,y2:S},X,{"pointer-events":"none"}))))}}])&&tw(e.prototype,n),a}(fe.a);function rb(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function iw(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?rb(Object(n),!0).forEach(function(r){aw(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):rb(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function aw(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Sy(t){return Sy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Sy(t)}function uw(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,s,h=[],m=!0,x=!1;try{for(a=a.call(n);!(m=(i=a.next()).done)&&(h.push(i.value),!r||h.length!==r);m=!0);}catch(S){x=!0,s=S}finally{try{m||a.return==null||a.return()}finally{if(x)throw s}}return h}}(t,e)||function(n,r){if(n){if(typeof n=="string")return ob(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 ob(n,r)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  78. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function ob(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function ib(t){var e=t.x,n=e===void 0?0:e,r=t.y,a=r===void 0?0:r,i=t.value,s=t.fontSize,h=t.fill,m=h===void 0?"currentColor":h,x=t.overflowMode,S=x===void 0?"default":x,D=t.textWidth,I=D===void 0?"":D,X=t.model,q={textAnchor:"middle","dominant-baseline":"middle",x:n,y:a,fill:m};if(Object.entries(t).forEach(function(Je){var qe=uw(Je,2),gt=qe[0],$e=qe[1];Sy($e)!=="object"&&(q[gt]=$e)}),i){var ee=String(i).split(/[\r\n]/g),ge=ee.length;if(S!=="default"){var ve=X.BaseType,we=X.modelType;if(ve===Bn.NODE&&we!==Yt.TEXT_NODE||ve===Bn.EDGE&&I)return function(Je){var qe=Je.value,gt=Je.fontSize,$e=Je.model,ht=Je.fontFamily,tt=ht===void 0?"":ht,Kt=Je.lineHeight,Jt=Je.wrapPadding,Tt=Jt===void 0?"0, 0":Jt,rn=Je.overflowMode,Un=Je.x,Gn=Je.y,Sr=$e.width,bo=$e.textHeight,_o=Je.textWidth||Sr,Ai=String(qe).split(/[\r\n]/g),Yu=Ai.length,yd=Qf({rows:Ai,style:{fontSize:"".concat(gt,"px"),width:"".concat(_o,"px"),fontFamily:tt,lineHeight:Kt,padding:Tt},rowsLength:Yu,className:"lf-get-text-height"}),Wu=$e.height>yd?$e.height:yd;bo&&(Wu=bo);var Ua=rn==="ellipsis";return Ua&&(Wu=gt+2),Object(fe.g)("g",null,Object(fe.g)("foreignObject",{width:_o,height:Wu,x:Un-_o/2,y:Gn-Wu/2},Object(fe.g)("div",{className:"lf-node-text-auto-wrap",style:{minHeight:Wu,width:_o,padding:Tt}},Object(fe.g)("div",{className:Ua?"lf-node-text-ellipsis-content":"lf-node-text-auto-wrap-content",title:Ua?Ai.join(""):"",style:iw({},Je)},Ai.map(function(Ga){return Object(fe.g)("div",{className:"lf-node-text--auto-wrap-inner"},Ga)})))))}(t)}if(ge>1){var Ce=ee.map(function(Je,qe){var gt=(qe-(ge-1)/2)*(s+2);return Object(fe.g)("tspan",{className:"lf-text-tspan",x:n,y:a+gt},Je)});return Object(fe.g)("text",q,Ce)}return Object(fe.g)("text",q,i)}}function jy(t){return jy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},jy(t)}function Py(){return Py=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Py.apply(this,arguments)}function sw(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,s,h=[],m=!0,x=!1;try{for(a=a.call(n);!(m=(i=a.next()).done)&&(h.push(i.value),!r||h.length!==r);m=!0);}catch(S){x=!0,s=S}finally{try{m||a.return==null||a.return()}finally{if(x)throw s}}return h}}(t,e)||function(n,r){if(n){if(typeof n=="string")return ab(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 ab(n,r)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  79. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function ab(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function cw(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ay(t,e){return Ay=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Ay(t,e)}function lw(t){var e=function(){if(typeof Reflect=="undefined"||!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(n){return!1}}();return function(){var n,r=Yp(t);if(e){var a=Yp(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return fw(this,n)}}function fw(t,e){if(e&&(jy(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ba(t)}function Ba(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Yp(t){return Yp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Yp(t)}function Uu(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ub=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&Ay(i,s)})(a,t);var e,n,r=lw(a);function a(i){var s;(function(m,x){if(!(m instanceof x))throw new TypeError("Cannot call a class as a function")})(this,a),Uu(Ba(s=r.call(this)),"dragHandler",void 0),Uu(Ba(s),"sumDeltaX",0),Uu(Ba(s),"sumDeltaY",0),Uu(Ba(s),"stepDrag",void 0),Uu(Ba(s),"onDragging",function(m){var x=m.deltaX,S=m.deltaY,D=s.props,I=D.model,X=sw(D.graphModel.transformModel.fixDeltaXY(x,S),2),q=X[0],ee=X[1];I.moveText(q,ee)}),Uu(Ba(s),"dblClickHandler",function(){s.props.editable&&s.props.model.setElementState(cn.TEXT_EDIT)}),Uu(Ba(s),"mouseDownHandle",function(m){var x=s.props,S=x.draggable,D=x.model,I=x.graphModel.editConfigModel.nodeTextDraggable;(S||I)&&(s.stepDrag.model=D,s.stepDrag.handleMouseDown(m))}),i.model;var h=i.draggable;return s.stepDrag=new no({onDragging:s.onDragging,step:1,isStopPropagation:h}),s}return e=a,(n=[{key:"getShape",value:function(){var i=this.props,s=i.model,h=i.graphModel,m=s.text,x=h.editConfigModel,S=m.value,D=m.x,I=m.y,X=m.editable,q=m.draggable,ee={x:D,y:I,className:"",value:S};X?ee.className="lf-element-text":q||x.nodeTextDraggable?ee.className="lf-text-draggable":ee.className="lf-text-disabled";var ge=s.getTextStyle();return Object(fe.g)(ib,Py({},ee,ge,{model:s}))}},{key:"render",value:function(){if(this.props.model.text)return Object(fe.g)("g",{onMouseDown:this.mouseDownHandle,onDblClick:this.dblClickHandler},this.getShape())}}])&&cw(e.prototype,n),a}(fe.a),pw=pa(window,"navigator.userAgent","").match(/MSIE|Trident/)!==null,sb=o(130);function My(t){return My=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},My(t)}function ky(){return ky=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},ky.apply(this,arguments)}function dw(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ty(t,e){return Ty=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Ty(t,e)}function hw(t){var e=function(){if(typeof Reflect=="undefined"||!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(n){return!1}}();return function(){var n,r=Wp(t);if(e){var a=Wp(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return yw(this,n)}}function yw(t,e){if(e&&(My(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return uc(t)}function uc(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Wp(t){return Wp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Wp(t)}function Vl(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var vw=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&Ty(i,s)})(a,t);var e,n,r=hw(a);function a(i){var s;return function(h,m){if(!(h instanceof m))throw new TypeError("Cannot call a class as a function")}(this,a),Vl(uc(s=r.call(this,i)),"style",{}),Vl(uc(s),"defaultAngle",void 0),Vl(uc(s),"normal",void 0),Vl(uc(s),"stepperDrag",void 0),Vl(uc(s),"onDragging",function(h){var m,x=h.event,S=s.props,D=S.graphModel,I=S.nodeModel,X=S.eventCenter,q=D.selectNodes,ee=I.x,ge=I.y,ve=x.clientX,we=x.clientY,Ce=D.getPointByClient({x:ve,y:we}).canvasOverlayPosition,Je=Ce.x,qe=Ce.y,gt=new rr(Je-ee,qe-ge),$e=((m=s.normal)===null||m===void 0?void 0:m.angle(gt))-s.defaultAngle,ht=new Ra(-ee,-ge).rotate($e).translate(ee,ge).toString();I.transform=ht,I.rotate=$e;var tt=Object(sb.map)(q,function(Jt){return Jt.id});tt.indexOf(I.id)===-1&&(tt=[I.id]);var Kt=Object(sb.reduce)(tt,function(Jt,Tt){var rn=D.getNodeModelById(Tt);return Jt[Tt]=rn==null?void 0:rn.getMoveDistance(0,0,!1),Jt},{});tt.forEach(function(Jt){D.getNodeEdges(Jt).forEach(function(Tt){if(Kt[Tt.sourceNodeId]){var rn=D.getNodeModelById(Tt.sourceNodeId).anchors.find(function(Gn){return Gn.id===Tt.sourceAnchorId});Tt.updateStartPoint(rn)}if(Kt[Tt.targetNodeId]){var Un=D.getNodeModelById(Tt.targetNodeId).anchors.find(function(Gn){return Gn.id===Tt.targetAnchorId});Tt.updateEndPoint(Un)}})}),X.emit(pt.NODE_ROTATE,{e:x,nodeModel:I})}),s.style=i.style,s.stepperDrag=new no({onDragging:s.onDragging}),s}return e=a,(n=[{key:"render",value:function(){var i=this,s=this.props.nodeModel,h=s.x,m=s.y,x=h+s.width/2+20,S=m-s.height/2-20;return this.normal=new rr(1,0),this.defaultAngle=this.normal.angle(new rr(x-h,S-m)),s.defaultAngle=this.defaultAngle,Object(fe.g)("g",{className:"lf-rotate-control"},Object(fe.g)("g",{onMouseDown:function(D){i.stepperDrag.handleMouseDown(D)}},Object(fe.g)(Zs,ky({},this.style,{cx:x,cy:S}))))}}])&&dw(e.prototype,n),a}(fe.a);function Dy(t){return Dy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Dy(t)}var gw=["className"];function Vp(){return Vp=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Vp.apply(this,arguments)}function mw(t,e){if(t==null)return{};var n,r,a=function(s,h){if(s==null)return{};var m,x,S={},D=Object.keys(s);for(x=0;x<D.length;x++)m=D[x],h.indexOf(m)>=0||(S[m]=s[m]);return S}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(a[n]=t[n])}return a}function Kp(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,s,h=[],m=!0,x=!1;try{for(a=a.call(n);!(m=(i=a.next()).done)&&(h.push(i.value),!r||h.length!==r);m=!0);}catch(S){x=!0,s=S}finally{try{m||a.return==null||a.return()}finally{if(x)throw s}}return h}}(t,e)||function(n,r){if(n){if(typeof n=="string")return cb(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 cb(n,r)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  80. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function cb(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function lb(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ny(t,e){return Ny=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Ny(t,e)}function bw(t){var e=function(){if(typeof Reflect=="undefined"||!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(n){return!1}}();return function(){var n,r=$p(t);if(e){var a=$p(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return _w(this,n)}}function _w(t,e){if(e&&(Dy(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ar(t)}function ar(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function $p(t){return $p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},$p(t)}function yr(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var qi=function(t){(function(s,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(h&&h.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),h&&Ny(s,h)})(i,t);var e,n,r,a=bw(i);function i(s){var h;(function(I,X){if(!(I instanceof X))throw new TypeError("Cannot call a class as a function")})(this,i),yr(ar(h=a.call(this)),"t",void 0),yr(ar(h),"moveOffset",void 0),yr(ar(h),"stepDrag",void 0),yr(ar(h),"contextMenuTime",void 0),yr(ar(h),"mouseUpDrag",void 0),yr(ar(h),"startTime",void 0),yr(ar(h),"clickTimer",void 0),yr(ar(h),"modelDisposer",void 0),yr(ar(h),"onDragStart",function(I){var X=I.event,q=X.clientX,ee=X.clientY,ge=h.props,ve=ge.model,we=ge.graphModel.getPointByClient({x:q,y:ee}).canvasOverlayPosition,Ce=we.x,Je=we.y;h.moveOffset={x:ve.x-Ce,y:ve.y-Je}}),yr(ar(h),"onDragging",function(I){var X=I.event,q=h.props,ee=q.model,ge=q.graphModel,ve=ge.editConfigModel,we=ve.stopMoveGraph,Ce=ve.autoExpand,Je=ge.transformModel,qe=ge.selectNodes,gt=ge.width,$e=ge.height,ht=ge.gridSize;ee.isDragging=!0;var tt=X.clientX,Kt=X.clientY,Jt=ge.getPointByClient({x:tt,y:Kt}).canvasOverlayPosition,Tt=Jt.x,rn=Jt.y,Un=Kp(Je.CanvasPointToHtmlPoint([Tt,rn]),2),Gn=Un[0],Sr=Un[1];if(Tt+=h.moveOffset.x,rn+=h.moveOffset.y,Tt=yi(Tt,ht),rn=yi(rn,ht),gt&&$e){if(!Ce||we||!(Gn<0||Sr<0||Gn>gt||Sr>$e)){var bo=Kp(Je.CanvasPointToHtmlPoint([Tt-ee.width/2,rn-ee.height/2]),2),_o=bo[0],Ai=bo[1],Yu=Kp(Je.CanvasPointToHtmlPoint([Tt+ee.width/2,rn+ee.height/2]),2),yd=Yu[0],Wu=Yu[1],Ua=Math.max(ht,20),Ga=[];_o<0?Ga=[Ua,0]:yd>ge.width?Ga=[-Ua,0]:Ai<0?Ga=[0,Ua]:Wu>ge.height&&(Ga=[0,-Ua]),h.t&&Hp(h.t);var r1=new Ra(-Tt,-rn).rotate(ee.rotate).translate(Tt,rn).toString();ee.transform=r1;var vd=qe.map(function(gd){return gd.id});vd.indexOf(ee.id)===-1&&(vd=[ee.id]),Ga.length>0&&!we&&Ce?h.t=eb(function(){var gd=Kp(Ga,2),Xb=gd[0],Yb=gd[1];Je.translate(Xb,Yb);var o1=-Xb/Je.SCALE_X,i1=-Yb/Je.SCALE_X;ge.moveNodes(vd,o1,i1)}):ge.moveNodes(vd,Tt-ee.x,rn-ee.y)}}else ge.moveNode2Coordinate(ee.id,Tt,rn)}),yr(ar(h),"onDragEnd",function(){h.t&&Hp(h.t),h.props.model.isDragging=!1}),yr(ar(h),"handleMouseUp",function(){var I=h.props.model;h.mouseUpDrag=I.isDragging}),yr(ar(h),"handleClick",function(I){var X=h.mouseUpDrag===!1;if(h.startTime){var q=h.props,ee=q.model,ge=q.graphModel;if(X){var ve={data:ee.getData(),e:I,position:ge.getPointByClient({x:I.clientX,y:I.clientY}),isSelected:!1,isMultiple:!1},we=I.button===2,Ce=I.detail===2;if(!we){var Je=ge.editConfigModel,qe=Ou(I,Je);ve.isMultiple=qe,ee.isSelected&&!Ce&&qe?(ve.isSelected=!1,ee.setSelected(!1)):(ge.selectNodeById(ee.id,qe),ve.isSelected=!0,h.toFront()),Ce?(Je.nodeTextEdit&&ee.text.editable&&(ee.setSelected(!1),ge.setElementStateById(ee.id,cn.TEXT_EDIT)),ge.eventCenter.emit(pt.NODE_DBCLICK,ve)):(ge.eventCenter.emit(pt.ELEMENT_CLICK,ve),ge.eventCenter.emit(pt.NODE_CLICK,ve))}}}}),yr(ar(h),"handleContextMenu",function(I){I.preventDefault();var X=h.props,q=X.model,ee=X.graphModel,ge=q.getData(),ve=ee.getPointByClient({x:I.clientX,y:I.clientY});ee.setElementStateById(q.id,cn.SHOW_MENU,ve.domOverlayPosition),q.isSelected||ee.selectNodeById(q.id),ee.eventCenter.emit(pt.NODE_CONTEXTMENU,{data:ge,e:I,position:ve}),h.toFront()}),yr(ar(h),"handleMouseDown",function(I){var X=h.props,q=X.model,ee=X.graphModel;h.startTime=new Date().getTime(),ee.editConfigModel.adjustNodePosition&&q.draggable&&h.stepDrag&&h.stepDrag.handleMouseDown(I)}),yr(ar(h),"setHoverON",function(I){var X=h.props,q=X.model,ee=X.graphModel;if(!q.isHovered){var ge=q.getData();q.setHovered(!0),ee.eventCenter.emit(pt.NODE_MOUSEENTER,{data:ge,e:I})}}),yr(ar(h),"setHoverOFF",function(I){var X=h.props,q=X.model,ee=X.graphModel,ge=q.getData();q.isHovered&&(q.setHovered(!1),ee.eventCenter.emit(pt.NODE_MOUSELEAVE,{data:ge,e:I}))}),yr(ar(h),"onMouseOut",function(I){pw&&h.setHoverOFF(I)});var m=s.graphModel,x=m.gridSize,S=m.eventCenter,D=s.model;return h.stepDrag=new no({onDragStart:h.onDragStart,onDragging:h.onDragging,onDragEnd:h.onDragEnd,step:x,eventType:"NODE",isStopPropagation:!1,eventCenter:S,model:D}),h.modelDisposer=Object(d.F)(function(){return h.props},function(I){I&&I.model&&h.stepDrag.setModel(I.model)}),h}return e=i,r=[{key:"getModel",value:function(s){return s}}],(n=[{key:"componentWillUnmount",value:function(){this.modelDisposer&&this.modelDisposer()}},{key:"getAnchorShape",value:function(s){return null}},{key:"getAnchors",value:function(){var s=this,h=this.props,m=h.model,x=h.graphModel,S=m.isSelected,D=m.isHitable,I=m.isDragging,X=m.isShowAnchor;return D&&(S||X)&&!I?is(m.anchors,function(q,ee){var ge=m.getAnchorLineStyle(q),ve=m.getAnchorStyle(q);return Object(fe.g)(ow,{anchorData:q,node:s,style:ve,edgeStyle:ge,anchorIndex:ee,nodeModel:m,graphModel:x,setHoverOFF:s.setHoverOFF})}):[]}},{key:"getRotateControl",value:function(){var s=this.props,h=s.model,m=s.graphModel,x=h.isSelected,S=h.isHitable,D=h.enableRotate,I=h.isHovered,X=h.getRotateControlStyle().style;if(S&&(x||I)&&D)return Object(fe.g)(vw,{graphModel:m,nodeModel:h,eventCenter:m.eventCenter,style:X})}},{key:"getText",value:function(){var s=this.props,h=s.model,m=s.graphModel;if(h.state===cn.TEXT_EDIT)return"";if(h.text){var x=m.editConfigModel,S=!1;return(h.text.draggable||x.nodeTextDraggable)&&(S=!0),Object(fe.g)(ub,{editable:x.nodeTextEdit&&h.text.editable,model:h,graphModel:m,draggable:S})}}},{key:"getStateClassName",value:function(){var s=this.props.model,h=s.state,m=s.isDragging,x=s.isSelected,S="lf-node";switch(h){case cn.ALLOW_CONNECT:S+=" lf-node-allow";break;case cn.NOT_ALLOW_CONNECT:S+=" lf-node-not-allow";break;default:S+=" lf-node-default"}return m&&(S+=" lf-isDragging"),x&&(S+=" lf-node-selected"),S}},{key:"toFront",value:function(){var s=this.props,h=s.model,m=s.graphModel;h.autoToFront&&m.toFront(h.id)}},{key:"render",value:function(){var s,h=this.props,m=h.model,x=h.graphModel,S=x.editConfigModel,D=S.hideAnchors,I=S.adjustNodePosition,X=S.allowRotation,q=x.gridSize,ee=x.transformModel.SCALE_X,ge=m.isHitable,ve=m.draggable,we=m.transform,Ce=m.getOuterGAttributes(),Je=Ce.className,qe=Je===void 0?"":Je,gt=mw(Ce,gw),$e=Object(fe.g)("g",{className:"lf-node-content"},Object(fe.g)("g",{transform:we},this.getShape(),this.getText(),X&&this.getRotateControl()),!D&&this.getAnchors());return ge?(I&&ve&&this.stepDrag.setStep(q*ee),s=Object(fe.g)("g",Vp({className:"".concat(this.getStateClassName()," ").concat(qe),onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onClick:this.handleClick,onMouseEnter:this.setHoverON,onMouseOver:this.setHoverON,onMouseLeave:this.setHoverOFF,onMouseOut:this.onMouseOut,onContextMenu:this.handleContextMenu},gt),$e)):s=Object(fe.g)("g",Vp({className:"".concat(this.getStateClassName()," ").concat(qe)},gt),$e),s}}])&&lb(e.prototype,n),r&&lb(e,r),i}(fe.a);function Cy(t){return Cy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Cy(t)}function Ry(){return Ry=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ry.apply(this,arguments)}function Ow(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ww(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Iy(t,e){return Iy=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Iy(t,e)}function xw(t){var e=function(){if(typeof Reflect=="undefined"||!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(n){return!1}}();return function(){var n,r=qp(t);if(e){var a=qp(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Ew(this,n)}}function Ew(t,e){if(e&&(Cy(e)==="object"||typeof e=="function"))return e;if(e!==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}(t)}function qp(t){return qp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},qp(t)}var Ly=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&Iy(i,s)})(a,t);var e,n,r=xw(a);function a(){return Ow(this,a),r.apply(this,arguments)}return e=a,(n=[{key:"getShape",value:function(){var i=this.props.model,s=i.getNodeStyle();return Object(fe.g)(Ia,Ry({},s,{x:i.x,y:i.y,width:i.width,height:i.height,radius:i.radius}))}}])&&ww(e.prototype,n),a}(qi);function zy(t){return zy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},zy(t)}function By(){return By=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},By.apply(this,arguments)}function Sw(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function jw(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Fy(t,e){return Fy=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Fy(t,e)}function Pw(t){var e=function(){if(typeof Reflect=="undefined"||!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(n){return!1}}();return function(){var n,r=Zp(t);if(e){var a=Zp(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Aw(this,n)}}function Aw(t,e){if(e&&(zy(e)==="object"||typeof e=="function"))return e;if(e!==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}(t)}function Zp(t){return Zp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Zp(t)}var Uy=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&Fy(i,s)})(a,t);var e,n,r=Pw(a);function a(){return Sw(this,a),r.apply(this,arguments)}return e=a,(n=[{key:"getShape",value:function(){var i=this.props.model,s=i.x,h=i.y,m=i.r,x=i.getNodeStyle();return Object(fe.g)(Zs,By({},x,{x:s,y:h,r:m}))}}])&&jw(e.prototype,n),a}(qi);function Gy(t){return Gy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Gy(t)}function Mw(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,s,h=[],m=!0,x=!1;try{for(a=a.call(n);!(m=(i=a.next()).done)&&(h.push(i.value),!r||h.length!==r);m=!0);}catch(S){x=!0,s=S}finally{try{m||a.return==null||a.return()}finally{if(x)throw s}}return h}}(t,e)||function(n,r){if(n){if(typeof n=="string")return fb(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 fb(n,r)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  81. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function fb(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function pb(t){var e=t.points,n=t.className,r={fill:"transparent",fillOpacity:1,strokeWidth:1,stroke:"#000",strokeOpacity:1,points:""};return Object.entries(t).forEach(function(a){var i=Mw(a,2),s=i[0],h=i[1];Gy(h)!=="object"&&(r[s]=h)}),r.className=n?"lf-basic-shape ".concat(n):"lf-basic-shape",r.points=e.map(function(a){return a.join(",")}).join(" "),Object(fe.g)("polygon",r)}function Hy(t){return Hy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Hy(t)}function Xy(){return Xy=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Xy.apply(this,arguments)}function kw(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Tw(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Yy(t,e){return Yy=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Yy(t,e)}function Dw(t){var e=function(){if(typeof Reflect=="undefined"||!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(n){return!1}}();return function(){var n,r=Jp(t);if(e){var a=Jp(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Nw(this,n)}}function Nw(t,e){if(e&&(Hy(e)==="object"||typeof e=="function"))return e;if(e!==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}(t)}function Jp(t){return Jp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Jp(t)}var Wy=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&Yy(i,s)})(a,t);var e,n,r=Dw(a);function a(){return kw(this,a),r.apply(this,arguments)}return e=a,(n=[{key:"getShape",value:function(){var i=this.props.model,s=i.x,h=i.y,m=i.width,x=i.height,S=i.points,D=i.getNodeStyle(),I={transform:"matrix(1 0 0 1 ".concat(s-m/2," ").concat(h-x/2,")")};return Object(fe.g)("g",I,Object(fe.g)(pb,Xy({},D,{points:S,x:s,y:h})))}}])&&Tw(e.prototype,n),a}(qi);function Vy(t){return Vy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vy(t)}function Ky(){return Ky=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Ky.apply(this,arguments)}function Cw(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Rw(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function $y(t,e){return $y=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},$y(t,e)}function Iw(t){var e=function(){if(typeof Reflect=="undefined"||!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(n){return!1}}();return function(){var n,r=Qp(t);if(e){var a=Qp(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Lw(this,n)}}function Lw(t,e){if(e&&(Vy(e)==="object"||typeof e=="function"))return e;if(e!==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}(t)}function Qp(t){return Qp=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Qp(t)}var qy=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&$y(i,s)})(a,t);var e,n,r=Iw(a);function a(){return Cw(this,a),r.apply(this,arguments)}return e=a,(n=[{key:"getShape",value:function(){var i=this.props.model,s=i.getNodeStyle();return Object(fe.g)("g",null,Object(fe.g)(pb,Ky({},s,{points:i.points,x:i.x,y:i.y})))}}])&&Rw(e.prototype,n),a}(qi);function Zy(t){return Zy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Zy(t)}function zw(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,s,h=[],m=!0,x=!1;try{for(a=a.call(n);!(m=(i=a.next()).done)&&(h.push(i.value),!r||h.length!==r);m=!0);}catch(S){x=!0,s=S}finally{try{m||a.return==null||a.return()}finally{if(x)throw s}}return h}}(t,e)||function(n,r){if(n){if(typeof n=="string")return db(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 db(n,r)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  82. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function db(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Bw(t){var e=t.x,n=e===void 0?0:e,r=t.y,a=r===void 0?0:r,i=t.rx,s=i===void 0?4:i,h=t.ry,m=h===void 0?4:h,x=t.className,S={cx:n,cy:a,rx:s,ry:m,fill:"transparent",fillOpacity:1,strokeWidth:"1",stroke:"#000",strokeOpacity:1};return Object.entries(t).forEach(function(D){var I=zw(D,2),X=I[0],q=I[1];Zy(q)!=="object"&&(S[X]=q)}),S.className=x?"lf-basic-shape ".concat(x):"lf-basic-shape",Object(fe.g)("ellipse",S)}function Jy(t){return Jy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Jy(t)}function Qy(){return Qy=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Qy.apply(this,arguments)}function Fw(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Uw(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ev(t,e){return ev=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},ev(t,e)}function Gw(t){var e=function(){if(typeof Reflect=="undefined"||!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(n){return!1}}();return function(){var n,r=ed(t);if(e){var a=ed(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Hw(this,n)}}function Hw(t,e){if(e&&(Jy(e)==="object"||typeof e=="function"))return e;if(e!==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}(t)}function ed(t){return ed=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ed(t)}var tv=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&ev(i,s)})(a,t);var e,n,r=Gw(a);function a(){return Fw(this,a),r.apply(this,arguments)}return e=a,(n=[{key:"getShape",value:function(){var i=this.props.model,s=i.getNodeStyle();return Object(fe.g)(Bw,Qy({},s,{x:i.x,y:i.y,rx:i.rx,ry:i.ry}))}}])&&Uw(e.prototype,n),a}(qi);function nv(t){return nv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nv(t)}function hb(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function yb(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?hb(Object(n),!0).forEach(function(r){Xw(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):hb(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Xw(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Yw(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ww(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function rv(t,e){return rv=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},rv(t,e)}function Vw(t){var e=function(){if(typeof Reflect=="undefined"||!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(n){return!1}}();return function(){var n,r=td(t);if(e){var a=td(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Kw(this,n)}}function Kw(t,e){if(e&&(nv(e)==="object"||typeof e=="function"))return e;if(e!==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}(t)}function td(t){return td=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},td(t)}var ov=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&rv(i,s)})(a,t);var e,n,r=Vw(a);function a(){return Yw(this,a),r.apply(this,arguments)}return e=a,(n=[{key:"getBackground",value:function(){var i=this.props.model,s=i.getTextStyle(),h=i.width,m=i.height,x=i.x,S=i.y,D=yb(yb({},s.background),{},{x,y:S-1,width:h,height:m});return Object(fe.g)(Ia,D)}},{key:"getShape",value:function(){return Object(fe.g)("g",null,this.getBackground())}}])&&Ww(e.prototype,n),a}(qi);function iv(t){return iv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},iv(t)}function av(){return av=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},av.apply(this,arguments)}function $w(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function qw(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function uv(t,e){return uv=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},uv(t,e)}function Zw(t){var e=function(){if(typeof Reflect=="undefined"||!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(n){return!1}}();return function(){var n,r=nd(t);if(e){var a=nd(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Jw(this,n)}}function Jw(t,e){if(e&&(iv(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Kl(t)}function Kl(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function nd(t){return nd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},nd(t)}function rd(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var sv=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&uv(i,s)})(a,t);var e,n,r=Zw(a);function a(){var i;$w(this,a);for(var s=arguments.length,h=new Array(s),m=0;m<s;m++)h[m]=arguments[m];return rd(Kl(i=r.call.apply(r,[this].concat(h))),"ref",void 0),rd(Kl(i),"currentProperties",void 0),rd(Kl(i),"preProperties",void 0),rd(Kl(i),"setRef",function(x){i.ref=x}),i}return e=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,s=i.x,h=i.y,m=i.height,x=i.width,S=i.getNodeStyle();return this.currentProperties=JSON.stringify(i.properties),Object(fe.g)("foreignObject",av({},S,{x:s-x/2,y:h-m/2,width:x,height:m,ref:this.setRef}))}}])&&qw(e.prototype,n),a}(qi);function cv(t){return cv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cv(t)}function lv(){return lv=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},lv.apply(this,arguments)}function vb(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function Gu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?vb(Object(n),!0).forEach(function(r){dv(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):vb(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Qw(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function fv(t,e){return fv=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},fv(t,e)}function ex(t){var e=function(){if(typeof Reflect=="undefined"||!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(n){return!1}}();return function(){var n,r=od(t);if(e){var a=od(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return tx(this,n)}}function tx(t,e){if(e&&(cv(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return pv(t)}function pv(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function od(t){return od=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},od(t)}function dv(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var nx=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&fv(i,s)})(a,t);var e,n,r=ex(a);function a(i){var s;return function(h,m){if(!(h instanceof m))throw new TypeError("Cannot call a class as a function")}(this,a),dv(pv(s=r.call(this,i)),"setHoverON",function(){s.setState({isHovered:!0})}),dv(pv(s),"setHoverOFF",function(){s.setState({isHovered:!1})}),s.state={isHovered:!1},s}return e=a,(n=[{key:"getBackground",value:function(){var i=this.props.model,s=i.getTextStyle(),h=i.text,m=i.width,x=s.background||{};if(this.state.isHovered&&s.hover&&s.hover.background&&(x=Gu(Gu({},x),s.hover.background)),h&&h.value&&x.fill!=="transparent"){var S,D=s.fontSize,I=s.overflowMode,X=s.lineHeight,q=s.wrapPadding,ee=s.textWidth,ge=h.value,ve=h.x,we=h.y,Ce=String(ge).split(/[\r\n]/g),Je=Ce.length;if(I==="autoWrap"&&ee){var qe=Qf({rows:Ce,style:{fontSize:"".concat(D,"px"),width:"".concat(ee,"px"),lineHeight:X,padding:q},rowsLength:Je,className:"lf-get-text-height"});S=Gu(Gu({},x),{},{x:ve-1,y:we-1,width:ee,height:qe})}else{Ce&&Ce.forEach(function(Kt){Tl(Kt)});var gt=Eu({rows:Ce,fontSize:D,rowsLength:Je}),$e=gt.width,ht=gt.height;if(I==="ellipsis"&&($e=ee||m,ht=D+2),typeof x.wrapPadding=="string"){var tt=x.wrapPadding.split(",").filter(function(Kt){return Kt.trim()}).map(function(Kt){return parseFloat(Kt.trim())});tt.length>0&&tt.length<=4&&(tt.length===1?tt=[tt[0],tt[0],tt[0],tt[0]]:tt.length===2?tt=[tt[0],tt[1],tt[0],tt[1]]:tt.length===3&&(tt=[tt[0],tt[1],tt[2],tt[1]]),$e+=tt[1]+tt[3],ht+=tt[0]+tt[2],ve+=(tt[1]-tt[3])/2,we+=(tt[2]-tt[0])/2)}S=Gu(Gu({},x),{},{x:ve-1,y:we-1,width:$e,height:ht})}return Object(fe.g)(Ia,S)}}},{key:"getShape",value:function(){var i=this.props.model,s=i.text,h=s.value,m=s.x,x=s.y;if(h){var S=Gu({x:m,y:x,className:"lf-element-text",value:h},i.getTextStyle());return Object(fe.g)("g",{className:"lf-line-text",onMouseEnter:this.setHoverON,onMouseLeave:this.setHoverOFF},this.getBackground(),Object(fe.g)(ib,lv({},S,{model:i})))}}}])&&Qw(e.prototype,n),a}(ub);function hv(t){return hv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hv(t)}var ji,rx=["text","sourceAnchorId","targetAnchorId"];function gb(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function Zi(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?gb(Object(n),!0).forEach(function(r){mo(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):gb(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function ox(t,e){if(t==null)return{};var n,r,a=function(s,h){if(s==null)return{};var m,x,S={},D=Object.keys(s);for(x=0;x<D.length;x++)m=D[x],h.indexOf(m)>=0||(S[m]=s[m]);return S}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(a[n]=t[n])}return a}function ix(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,s,h=[],m=!0,x=!1;try{for(a=a.call(n);!(m=(i=a.next()).done)&&(h.push(i.value),!r||h.length!==r);m=!0);}catch(S){x=!0,s=S}finally{try{m||a.return==null||a.return()}finally{if(x)throw s}}return h}}(t,e)||function(n,r){if(n){if(typeof n=="string")return mb(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 mb(n,r)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  83. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function mb(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function ax(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function yv(t,e){return yv=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},yv(t,e)}function ux(t){var e=function(){if(typeof Reflect=="undefined"||!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(n){return!1}}();return function(){var n,r=id(t);if(e){var a=id(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return sx(this,n)}}function sx(t,e){if(e&&(hv(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return go(t)}function go(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function id(t){return id=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},id(t)}function mo(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}(function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"})(ji||(ji={}));var bb=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&yv(i,s)})(a,t);var e,n,r=ux(a);function a(i){var s;(function(S,D){if(!(S instanceof D))throw new TypeError("Cannot call a class as a function")})(this,a),mo(go(s=r.call(this)),"stepDragData",void 0),mo(go(s),"stepDrag",void 0),mo(go(s),"oldEdge",void 0),mo(go(s),"preTargetNode",void 0),mo(go(s),"targetRuleResults",void 0),mo(go(s),"sourceRuleResults",void 0),mo(go(s),"handleMouseDown",function(S){s.stepDrag&&s.stepDrag.handleMouseDown(S)}),mo(go(s),"onDragStart",function(){var S=s.props,D=S.x,I=S.y,X=S.edgeModel,q=X.startPoint,ee=X.endPoint,ge=X.pointsList;s.oldEdge={startPoint:q,endPoint:ee,pointsList:ge},s.setState({endX:D,endY:I,dragging:!0})}),mo(go(s),"onDragging",function(S){var D=S.deltaX,I=S.deltaY,X=s.state,q=X.endX,ee=X.endY,ge=s.props,ve=ge.graphModel,we=ge.type,Ce=ve.transformModel,Je=ve.editConfigModel,qe=ix(Ce.moveCanvasPointByHtml([q,ee],D,I),2),gt=qe[0],$e=qe[1];s.setState({endX:gt,endY:$e,dragging:!0});var ht=s.props.edgeModel,tt=xu({x:q,y:ee},ve);if(tt&&tt.node&&s.isAllowAdjust(tt).pass){var Kt,Jt=ht.startPoint,Tt=ht.endPoint,rn=ht.sourceNode,Un=ht.targetNode;we===ji.SOURCE?Kt={startPoint:{x:tt.anchor.x,y:tt.anchor.y},endPoint:{x:Tt.x,y:Tt.y},sourceNode:tt.node,targetNode:Un}:we===ji.TARGET&&(Kt={startPoint:{x:Jt.x,y:Jt.y},endPoint:{x:tt.anchor.x,y:tt.anchor.y},sourceNode:rn,targetNode:tt.node}),ht.updateAfterAdjustStartAndEnd(Kt)}else we===ji.SOURCE?ht.updateStartPoint({x:gt,y:$e}):we===ji.TARGET&&ht.updateEndPoint({x:gt,y:$e});ht.text.value&&Je.adjustEdge&&ht.setText(Object.assign({},ht.text,ht.textPosition))}),mo(go(s),"onDragEnd",function(S){var D=S.event;try{var I;s.setState({dragging:!1});var X=s.props,q=X.graphModel,ee=X.edgeModel,ge=X.type,ve=s.state,we=ve.endX,Ce=ve.endY,Je=ve.dragging,qe=xu({x:we,y:Ce},q);if(!Je)return;var gt,$e=!1;if(qe&&qe.node){var ht=s.isAllowAdjust(qe),tt=ht.pass,Kt=ht.msg,Jt=ht.newTargetNode;if(tt){var Tt=ee.getData(),rn=Tt.text,Un=Tt.sourceAnchorId,Gn=Un===void 0?"":Un,Sr=Tt.targetAnchorId;gt=Zi(Zi({sourceAnchorId:Gn,targetAnchorId:Sr===void 0?"":Sr},ox(Tt,rx)),{},{text:(rn==null?void 0:rn.value)||""}),ge===ji.SOURCE?(gt=Zi(Zi({},q.edgeGenerator(q.getNodeModelById(qe.node.id).getData(),q.getNodeModelById(ee.targetNodeId).getData(),gt)),{},{sourceNodeId:qe.node.id,sourceAnchorId:qe.anchor.id,startPoint:{x:qe.anchor.x,y:qe.anchor.y},targetNodeId:ee.targetNodeId,endPoint:Zi({},ee.endPoint)}),ee.sourceNodeId===qe.node.id&&ee.sourceAnchorId===qe.anchor.id&&($e=!0)):ge===ji.TARGET&&(gt=Zi(Zi({},q.edgeGenerator(q.getNodeModelById(ee.sourceNodeId).getData(),q.getNodeModelById(qe.node.id).getData(),gt)),{},{sourceNodeId:ee.sourceNodeId,startPoint:Zi({},ee.startPoint),targetNodeId:qe.node.id,targetAnchorId:qe.anchor.id,endPoint:{x:qe.anchor.x,y:qe.anchor.y}}),ee.targetNodeId===qe.node.id&&ee.targetAnchorId===qe.anchor.id&&($e=!0))}else{$e=!0;var bo=Jt.getData();q.eventCenter.emit(pt.CONNECTION_NOT_ALLOWED,{data:bo,msg:Kt})}}else $e=!0;if($e)s.recoveryEdge();else{var _o=ee.getData();q.deleteEdgeById(ee.id);var Ai=q.addEdge(Zi({},gt));q.eventCenter.emit(pt.EDGE_EXCHANGE_NODE,{data:{newEdge:Ai.getData(),oldEdge:_o}})}(I=s.preTargetNode)===null||I===void 0||I.setElementState(cn.DEFAULT)}finally{s.props.graphModel.eventCenter.emit(pt.ADJUST_POINT_DRAGEND,{e:D,data:s.stepDragData})}}),mo(go(s),"recoveryEdge",function(){var S=s.props.edgeModel,D=s.oldEdge,I=D.startPoint,X=D.endPoint,q=D.pointsList;S.updateStartPoint(I),S.updateEndPoint(X),S.modelType!==Yt.LINE_EDGE&&(S.pointsList=q,S.initPoints())}),mo(go(s),"getAdjustPointStyle",function(){var S=s.props,D=S.graphModel.theme;return S.edgeModel,D.edgeAdjust}),s.state={dragging:!1,endX:0,endY:0},s.targetRuleResults=new Map,s.sourceRuleResults=new Map;var h=i.type,m=i.edgeModel,x=i.graphModel.eventCenter;return s.stepDragData={type:h,edgeData:m.getData()},s.stepDrag=new no({onDragStart:s.onDragStart,onDragging:s.onDragging,onDragEnd:s.onDragEnd,eventType:"ADJUST_POINT",isStopPropagation:!1,eventCenter:x,data:s.stepDragData}),s}return e=a,(n=[{key:"isAllowAdjust",value:function(i){var s=this.props,h=s.edgeModel,m=h.id,x=h.sourceNode,S=h.targetNode,D=h.sourceAnchorId,I=h.targetAnchorId,X=s.type,q=null,ee=null,ge=null,ve=null;if(X===ji.SOURCE?(q=i.node,ee=S,ge=i.anchor,ve=S.getAnchorInfo(I)):(q=x,ee=i.node,ve=i.anchor,ge=x.getAnchorInfo(D)),this.preTargetNode&&this.preTargetNode!==i.node&&this.preTargetNode.setElementState(cn.DEFAULT),this.preTargetNode=i.node,ve.id===ge.id)return{pass:!1,msg:"",newTargetNode:ee};var we="".concat(q.id,"_").concat(ee.id,"_").concat(ge.id,"_").concat(ve.id);if(!this.targetRuleResults.has(we)){var Ce=q.isAllowConnectedAsSource(ee,ge,ve,m),Je=ee.isAllowConnectedAsTarget(q,ge,ve,m);this.sourceRuleResults.set(we,ja(Ce)),this.targetRuleResults.set(we,ja(Je))}var qe=this.sourceRuleResults.get(we),gt=qe.isAllPass,$e=qe.msg,ht=this.targetRuleResults.get(we),tt=ht.isAllPass,Kt=ht.msg,Jt=gt&&tt?cn.ALLOW_CONNECT:cn.NOT_ALLOW_CONNECT;return X===ji.SOURCE?q.setElementState(Jt):ee.setElementState(Jt),{pass:gt&&tt,msg:Kt||$e,newTargetNode:ee}}},{key:"render",value:function(){var i=this.props,s=i.x,h=i.y,m=i.getAdjustPointShape,x=i.edgeModel,S=this.state.dragging;return Object(fe.g)("g",{pointerEvents:S?"none":"",onMouseDown:this.handleMouseDown},S?"":m(s,h,x))}}])&&ax(e.prototype,n),a}(fe.a);function vv(t){return vv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vv(t)}function $l(){return $l=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},$l.apply(this,arguments)}function cx(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,s,h=[],m=!0,x=!1;try{for(a=a.call(n);!(m=(i=a.next()).done)&&(h.push(i.value),!r||h.length!==r);m=!0);}catch(S){x=!0,s=S}finally{try{m||a.return==null||a.return()}finally{if(x)throw s}}return h}}(t,e)||function(n,r){if(n){if(typeof n=="string")return _b(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 _b(n,r)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  84. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function _b(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function lx(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fx(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function gv(t,e){return gv=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},gv(t,e)}function px(t){var e=function(){if(typeof Reflect=="undefined"||!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(n){return!1}}();return function(){var n,r=ad(t);if(e){var a=ad(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return dx(this,n)}}function dx(t,e){if(e&&(vv(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ii(t)}function ii(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ad(t){return ad=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ad(t)}function Pi(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ql=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&gv(i,s)})(a,t);var e,n,r=px(a);function a(){var i;lx(this,a);for(var s=arguments.length,h=new Array(s),m=0;m<s;m++)h[m]=arguments[m];return Pi(ii(i=r.call.apply(r,[this].concat(h))),"startTime",void 0),Pi(ii(i),"contextMenuTime",void 0),Pi(ii(i),"clickTimer",void 0),Pi(ii(i),"textRef",Object(fe.f)()),Pi(ii(i),"handleHover",function(x,S){var D=i.props,I=D.model,X=D.graphModel.eventCenter;I.setHovered(x);var q=x?pt.EDGE_MOUSEENTER:pt.EDGE_MOUSELEAVE,ee=I.getData();X.emit(q,{data:ee,e:S})}),Pi(ii(i),"setHoverON",function(x){i.props.model.isHovered||(i.textRef&&i.textRef.current&&i.textRef.current.setHoverON(),i.handleHover(!0,x))}),Pi(ii(i),"setHoverOFF",function(x){i.props.model.isHovered&&(i.textRef&&i.textRef.current&&i.textRef.current.setHoverOFF(),i.handleHover(!1,x))}),Pi(ii(i),"handleContextMenu",function(x){x.preventDefault(),i.contextMenuTime=new Date().getTime(),i.clickTimer&&clearTimeout(i.clickTimer);var S=i.props,D=S.model,I=S.graphModel,X=I.getPointByClient({x:x.clientX,y:x.clientY});I.setElementStateById(D.id,cn.SHOW_MENU,X.domOverlayPosition),i.toFront(),D.isSelected||I.selectEdgeById(D.id);var q=D==null?void 0:D.getData();I.eventCenter.emit(pt.EDGE_CONTEXTMENU,{data:q,e:x,position:X})}),Pi(ii(i),"handleMouseDown",function(x){x.stopPropagation(),i.startTime=new Date().getTime()}),Pi(ii(i),"handleMouseUp",function(x){if(i.startTime&&!(new Date().getTime()-i.startTime>200||x.button===2)){var S=x.detail===2,D=i.props,I=D.model,X=D.graphModel,q=I==null?void 0:I.getData(),ee=X.getPointByClient({x:x.clientX,y:x.clientY});if(S){var ge=X.editConfigModel,ve=X.textEditElement;if(ve&&ve.id===I.id&&X.setElementStateById(I.id,cn.DEFAULT),ge.edgeTextEdit&&I.text.editable&&X.setElementStateById(I.id,cn.TEXT_EDIT),I.modelType===Yt.POLYLINE_EDGE){var we=I,Ce=X.getPointByClient({x:x.x,y:x.y}).canvasOverlayPosition,Je=Ce.x,qe=Ce.y,gt=ku({x:Je,y:qe},we.points);we.dbClickPosition=gt}X.eventCenter.emit(pt.EDGE_DBCLICK,{data:q,e:x,position:ee})}else X.eventCenter.emit(pt.ELEMENT_CLICK,{data:q,e:x,position:ee}),X.eventCenter.emit(pt.EDGE_CLICK,{data:q,e:x,position:ee});var $e=X.editConfigModel;X.selectEdgeById(I.id,Ou(x,$e)),i.toFront()}}),i}return e=a,(n=[{key:"getShape",value:function(){return Object(fe.g)("g",null,this.getEdge())}},{key:"getTextStyle",value:function(){}},{key:"getText",value:function(){var i=this.props,s=i.model,h=i.graphModel;if(s.state===cn.TEXT_EDIT)return null;var m=!1,x=h.editConfigModel;return(s.text.draggable||x.edgeTextDraggable)&&(m=!0),Object(fe.g)(nx,{ref:this.textRef,editable:x.edgeTextEdit&&s.text.editable,model:s,graphModel:h,draggable:m})}},{key:"getArrowInfo",value:function(){var i=this.props.model,s=i.startPoint,h=i.endPoint,m=i.isSelected;return{start:s,end:h,hover:this.state.hover,isSelected:m}}},{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,s=i.id,h=i.getArrowStyle(),m=h.refY,x=m===void 0?0:m,S=h.refX,D=S===void 0?2:S,I=cx(this.getLastTwoPoints(),2),X=I[0],q=I[1],ee="auto";return X!==null&&q!==null&&(ee=Ol(_l({x:q.x-X.x,y:q.y-X.y,z:0}))),Object(fe.g)("g",null,Object(fe.g)("defs",null,Object(fe.g)("marker",{id:"marker-start-".concat(s),refX:-D,refY:x,overflow:"visible",orient:"auto",markerUnits:"userSpaceOnUse"},this.getStartArrow()),Object(fe.g)("marker",{id:"marker-end-".concat(s),refX:D,refY:x,overflow:"visible",orient:ee,markerUnits:"userSpaceOnUse"},this.getEndArrow())))}},{key:"getStartArrow",value:function(){var i=this.props.model.getArrowStyle();return i.stroke,i.strokeWidth,i.offset,i.verticalLength,Object(fe.g)("path",null)}},{key:"getEndArrow",value:function(){var i=this.props.model.getArrowStyle(),s=i.stroke,h=i.strokeWidth,m=i.offset,x=i.verticalLength;return Object(fe.g)("path",{stroke:s,fill:s,strokeWidth:h,transform:"rotate(180)",d:"M 0 0 L ".concat(m," -").concat(x," L ").concat(m," ").concat(x," Z")})}},{key:"getAdjustPointShape",value:function(i,s,h){var m=h.getAdjustPointStyle();return Object(fe.g)(Zs,$l({className:"lf-edge-adjust-point"},m,{x:i,y:s}))}},{key:"getAdjustPoints",value:function(){var i=this.props,s=i.model,h=i.graphModel,m=s.getAdjustStart(),x=s.getAdjustEnd();return Object(fe.g)("g",null,Object(fe.g)(bb,$l({type:"SOURCE"},m,{getAdjustPointShape:this.getAdjustPointShape,edgeModel:s,graphModel:h})),Object(fe.g)(bb,$l({type:"TARGET"},x,{getAdjustPointShape:this.getAdjustPointShape,edgeModel:s,graphModel:h})))}},{key:"getAnimation",value:function(){}},{key:"getAppendWidth",value:function(){return Object(fe.g)("g",null)}},{key:"getAppend",value:function(){return Object(fe.g)("g",{className:"lf-edge-append"},this.getAppendWidth())}},{key:"getEdge",value:function(){return null}},{key:"toFront",value:function(){var i=this.props,s=i.graphModel,h=i.model;s.toFront(h.id)}},{key:"render",value:function(){var i=this.props,s=i.model,h=s.isSelected,m=s.isHitable,x=s.isShowAdjustPoint;return i.graphModel.animation,Object(fe.g)("g",null,Object(fe.g)("g",{className:["lf-edge",!m&&"pointer-none",h&&"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()),x&&h?this.getAdjustPoints():"")}}])&&fx(e.prototype,n),a}(fe.a);function mv(t){return mv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mv(t)}function hx(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,s,h=[],m=!0,x=!1;try{for(a=a.call(n);!(m=(i=a.next()).done)&&(h.push(i.value),!r||h.length!==r);m=!0);}catch(S){x=!0,s=S}finally{try{m||a.return==null||a.return()}finally{if(x)throw s}}return h}}(t,e)||function(n,r){if(n){if(typeof n=="string")return Ob(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 Ob(n,r)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  85. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Ob(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Zl=function(t){var e={d:""};return Object.entries(t).forEach(function(n){var r=hx(n,2),a=r[0],i=r[1],s=mv(i);a!=="style"&&s==="object"||(e[a]=i)}),Object(fe.g)("path",e)};function bv(t){return bv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bv(t)}function _v(){return _v=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},_v.apply(this,arguments)}function yx(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function vx(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ov(t,e){return Ov=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Ov(t,e)}function gx(t){var e=function(){if(typeof Reflect=="undefined"||!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(n){return!1}}();return function(){var n,r=ud(t);if(e){var a=ud(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return mx(this,n)}}function mx(t,e){if(e&&(bv(e)==="object"||typeof e=="function"))return e;if(e!==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}(t)}function ud(t){return ud=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ud(t)}var wv=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&Ov(i,s)})(a,t);var e,n,r=gx(a);function a(){return yx(this,a),r.apply(this,arguments)}return e=a,(n=[{key:"getEdge",value:function(){var i=this.props.model,s=i.startPoint,h=i.endPoint,m=i.isAnimation,x=i.arrowConfig,S=i.getEdgeStyle(),D=i.getEdgeAnimationStyle(),I=D.strokeDasharray,X=D.stroke,q=D.strokeDashoffset,ee=D.animationName,ge=D.animationDuration,ve=D.animationIterationCount,we=D.animationTimingFunction,Ce=D.animationDirection;return Object(fe.g)($s,_v({},S,{x1:s.x,y1:s.y,x2:h.x,y2:h.y},x,m?{strokeDasharray:I,stroke:X,style:{strokeDashoffset:q,animationName:ee,animationDuration:ge,animationIterationCount:ve,animationTimingFunction:we,animationDirection:Ce}}:{}))}},{key:"getAppendWidth",value:function(){var i=this.props.model,s=i.startPoint,h=i.endPoint,m=gp({start:s,end:h}),x=m.d,S=m.strokeWidth,D=m.fill,I=m.strokeDasharray,X=m.stroke;return Object(fe.g)(Zl,{d:x,fill:D,strokeWidth:S,stroke:X,strokeDasharray:I})}}])&&vx(e.prototype,n),a}(ql);function xv(t){return xv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xv(t)}function bx(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,s,h=[],m=!0,x=!1;try{for(a=a.call(n);!(m=(i=a.next()).done)&&(h.push(i.value),!r||h.length!==r);m=!0);}catch(S){x=!0,s=S}finally{try{m||a.return==null||a.return()}finally{if(x)throw s}}return h}}(t,e)||function(n,r){if(n){if(typeof n=="string")return wb(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 wb(n,r)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  86. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function wb(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var _x=function(t){var e={points:"",fill:"none"};return Object.entries(t).forEach(function(n){var r=bx(n,2),a=r[0],i=r[1];(a==="style"||xv(i)!=="object")&&(e[a]=i)}),Object(fe.g)("polyline",e)};function Ev(t){return Ev=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ev(t)}function xb(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function sd(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?xb(Object(n),!0).forEach(function(r){Qi(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):xb(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Sv(){return Sv=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Sv.apply(this,arguments)}function Ox(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,s,h=[],m=!0,x=!1;try{for(a=a.call(n);!(m=(i=a.next()).done)&&(h.push(i.value),!r||h.length!==r);m=!0);}catch(S){x=!0,s=S}finally{try{m||a.return==null||a.return()}finally{if(x)throw s}}return h}}(t,e)||function(n,r){if(n){if(typeof n=="string")return Eb(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 Eb(n,r)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  87. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Eb(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function wx(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function jv(t,e){return jv=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},jv(t,e)}function xx(t){var e=function(){if(typeof Reflect=="undefined"||!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(n){return!1}}();return function(){var n,r=cd(t);if(e){var a=cd(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Ex(this,n)}}function Ex(t,e){if(e&&(Ev(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ji(t)}function Ji(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function cd(t){return cd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},cd(t)}function Qi(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Pv=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&jv(i,s)})(a,t);var e,n,r=xx(a);function a(){var i;return function(s,h){if(!(s instanceof h))throw new TypeError("Cannot call a class as a function")}(this,a),Qi(Ji(i=r.call(this)),"drag",void 0),Qi(Ji(i),"isDragging",void 0),Qi(Ji(i),"isShowAdjustPointTemp",void 0),Qi(Ji(i),"appendInfo",void 0),Qi(Ji(i),"onDragStart",function(){var s=i.props.model;s.dragAppendStart(),i.isShowAdjustPointTemp=s.isShowAdjustPoint,s.isShowAdjustPoint=!1}),Qi(Ji(i),"onDragging",function(s){var h=s.deltaX,m=s.deltaY,x=i.props,S=x.model,D=x.graphModel;i.isDragging=!0;var I=D.transformModel,X=D.editConfigModel,q=Ox(I.fixDeltaXY(h,m),2),ee=q[0],ge=q[1],ve=S,we=X.adjustEdgeMiddle;i.appendInfo=we?ve.dragAppendSimple(i.appendInfo,{x:ee,y:ge}):ve.dragAppend(i.appendInfo,{x:ee,y:ge})}),Qi(Ji(i),"onDragEnd",function(){var s=i.props,h=s.model,m=s.graphModel.eventCenter,x=h;x.dragAppendEnd(),i.isDragging=!1,x.isShowAdjustPoint=i.isShowAdjustPointTemp,i.appendInfo=void 0,m.emit(pt.EDGE_ADJUST,{data:x.getData()})}),Qi(Ji(i),"beforeDragStart",function(s,h){h.dragAble&&i.drag.handleMouseDown(s),i.appendInfo=h}),i.drag=new no({onDragStart:i.onDragStart,onDragging:i.onDragging,onDragEnd:i.onDragEnd,isStopPropagation:!1}),i}return e=a,(n=[{key:"getEdge",value:function(){var i=this.props.model,s=i.points,h=i.isAnimation,m=i.arrowConfig,x=i.getEdgeStyle(),S=i.getEdgeAnimationStyle(),D=S.strokeDasharray,I=S.stroke,X=S.strokeDashoffset,q=S.animationName,ee=S.animationDuration,ge=S.animationIterationCount,ve=S.animationTimingFunction,we=S.animationDirection;return Object(fe.g)(_x,Sv({points:s},x,m,h?{strokeDasharray:D,stroke:I,style:{strokeDashoffset:X,animationName:q,animationDuration:ee,animationIterationCount:ge,animationTimingFunction:ve,animationDirection:we}}:{}))}},{key:"getArrowInfo",value:function(){var i=this.props.model,s=i.points,h=i.isSelected,m={start:null,end:null,hover:this.state.hover,isSelected:h},x=Jo(s);return x.length>=2&&(m.start=x[x.length-2],m.end=x[x.length-1]),m}},{key:"getLastTwoPoints",value:function(){var i=this.props.model.points,s=Jo(i);return s.length>=2?[s[s.length-2],s[s.length-1]]:[null,null]}},{key:"getAppendAttributes",value:function(i){var s,h=i.start,m=i.end;if(h.x===m.x&&h.y===m.y)s="";else{var x={start:h,end:m,offset:10,verticalLength:5},S=Ma(sd(sd({},x),{},{type:"start"})),D=Ma(sd(sd({},x),{},{type:"end"}));s="M".concat(S.leftX," ").concat(S.leftY,`
  88. L`).concat(S.rightX," ").concat(S.rightY,`
  89. L`).concat(D.rightX," ").concat(D.rightY,`
  90. L`).concat(D.leftX," ").concat(D.leftY," z")}return{d:s,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}}},{key:"getAppendShape",value:function(i){var s=this.getAppendAttributes(i),h=s.d,m=s.strokeWidth,x=s.fill,S=s.strokeDasharray,D=s.stroke;return Object(fe.g)(Zl,{d:h,fill:x,strokeWidth:m,stroke:D,strokeDasharray:S})}},{key:"getAppendWidth",value:function(){for(var i=this,s=this.props,h=s.model,m=s.graphModel,x=h.pointsList,S=h.draggable,D=[],I=x.length,X=function(ee){var ge="lf-polyline-append",ve={start:{x:x[ee].x,y:x[ee].y},end:{x:x[ee+1].x,y:x[ee+1].y},startIndex:ee,endIndex:ee+1,direction:"",dragAble:!0},we=Object(fe.g)("g",{className:ge},i.getAppendShape(ve)),Ce=m.editConfigModel,Je=Ce.adjustEdge,qe=Ce.adjustEdgeMiddle;if(Je&&S){var gt=ve.startIndex,$e=ve.endIndex,ht=qe&&(gt===0||$e===I-1);ve.dragAble=!ht,ve.start.x===ve.end.x?(ve.dragAble&&(ge+="-ew-resize"),ve.direction=mn.VERTICAL):ve.start.y===ve.end.y&&(ve.dragAble&&(ge+="-ns-resize"),ve.direction=mn.HORIZONTAL),we=Object(fe.g)("g",{className:i.isDragging?"lf-dragging":"lf-drag-able",onMouseDown:function(tt){return i.beforeDragStart(tt,ve)}},Object(fe.g)("g",{className:ge},i.getAppendShape(ve)))}D.push(we)},q=0;q<I-1;q++)X(q);return Object(fe.g)("g",null,D)}}])&&wx(e.prototype,n),a}(ql);function Av(t){return Av=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Av(t)}function Sx(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,s,h=[],m=!0,x=!1;try{for(a=a.call(n);!(m=(i=a.next()).done)&&(h.push(i.value),!r||h.length!==r);m=!0);}catch(S){x=!0,s=S}finally{try{m||a.return==null||a.return()}finally{if(x)throw s}}return h}}(t,e)||function(n,r){if(n){if(typeof n=="string")return Sb(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 Sb(n,r)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  91. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Sb(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Mv(){return Mv=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Mv.apply(this,arguments)}function jx(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Px(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function kv(t,e){return kv=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},kv(t,e)}function Ax(t){var e=function(){if(typeof Reflect=="undefined"||!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(n){return!1}}();return function(){var n,r=ld(t);if(e){var a=ld(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Mx(this,n)}}function Mx(t,e){if(e&&(Av(e)==="object"||typeof e=="function"))return e;if(e!==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}(t)}function ld(t){return ld=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ld(t)}var Tv=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&kv(i,s)})(a,t);var e,n,r=Ax(a);function a(){return jx(this,a),r.apply(this,arguments)}return e=a,(n=[{key:"getEdge",value:function(){var i=this.props.model,s=i.getEdgeStyle(),h=i.path,m=i.isAnimation,x=i.arrowConfig,S=i.getEdgeAnimationStyle(),D=S.strokeDasharray,I=S.stroke,X=S.strokeDashoffset,q=S.animationName,ee=S.animationDuration,ge=S.animationIterationCount,ve=S.animationTimingFunction,we=S.animationDirection;return Object(fe.g)(Zl,Mv({d:h},s,x,m?{strokeDasharray:D,stroke:I,style:{strokeDashoffset:X,animationName:q,animationDuration:ee,animationIterationCount:ge,animationTimingFunction:ve,animationDirection:we}}:{}))}},{key:"getAppendWidth",value:function(){var i=this.props.model.path;return Object(fe.g)(Zl,{d:i,strokeWidth:10,stroke:"transparent",fill:"none"})}},{key:"getArrowInfo",value:function(){var i=this.props.model,s=this.state.hover,h=i.isSelected,m=i.getArrowStyle().offset,x=i.pointsList.map(function(D){return{x:D.x,y:D.y}}),S=Sx(Nl(x,m),2);return{start:S[0],end:S[1],hover:s,isSelected:h}}},{key:"getLastTwoPoints",value:function(){var i=this.props.model,s=i.getArrowStyle().offset,h=i.pointsList.map(function(m){return{x:m.x,y:m.y}});return Nl(h,s)}}])&&Px(e.prototype,n),a}(ql);function Dv(t){return Dv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Dv(t)}function jb(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function kx(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Tx(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Dx(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Nv(t,e){return Nv=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Nv(t,e)}function Nx(t){var e=function(){if(typeof Reflect=="undefined"||!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(n){return!1}}();return function(){var n,r=fd(t);if(e){var a=fd(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Cx(this,n)}}function Cx(t,e){if(e&&(Dv(e)==="object"||typeof e=="function"))return e;if(e!==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}(t)}function fd(t){return fd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},fd(t)}var Rx=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&Nv(i,s)})(a,t);var e,n,r=Nx(a);function a(){return Tx(this,a),r.apply(this,arguments)}return e=a,n=[{key:"getArrowAttributes",value:function(){var i=this.props,s=i.arrowInfo,h=i.style,m=s.start,x=s.end,S={start:m,end:x,offset:h.offset,verticalLength:h.verticalLength,type:"end"},D=Ma(S),I=D.leftX,X=D.leftY,q=D.rightX,ee=D.rightY;return function(ge){for(var ve=1;ve<arguments.length;ve++){var we=arguments[ve]!=null?arguments[ve]:{};ve%2?jb(Object(we),!0).forEach(function(Ce){kx(ge,Ce,we[Ce])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ge,Object.getOwnPropertyDescriptors(we)):jb(Object(we)).forEach(function(Ce){Object.defineProperty(ge,Ce,Object.getOwnPropertyDescriptor(we,Ce))})}return ge}({d:"M".concat(I," ").concat(X," L").concat(x.x," ").concat(x.y," L").concat(q," ").concat(ee," z")},h)}},{key:"getShape",value:function(){var i=this.getArrowAttributes(),s=i.d,h=i.strokeWidth,m=i.stroke,x=i.fill;return Object(fe.g)(Zl,{d:s,fill:x,strokeWidth:h,stroke:m})}},{key:"render",value:function(){return Object(fe.g)("g",{className:"lf-arrow"},this.getShape())}}],n&&Dx(e.prototype,n),a}(fe.a),Pb=function(t,e){return Ee(t,e)},Ix=function(t){var e=t==null?0:t.length;return e?t[e-1]:void 0},Cv=function(){return ft.a.Date.now()},Lx=Math.max,zx=Math.min,Bx=function(t,e,n){var r,a,i,s,h,m,x=0,S=!1,D=!1,I=!0;if(typeof t!="function")throw new TypeError("Expected a function");function X(Ce){var Je=r,qe=a;return r=a=void 0,x=Ce,s=t.apply(qe,Je)}function q(Ce){return x=Ce,h=setTimeout(ge,e),S?X(Ce):s}function ee(Ce){var Je=Ce-m;return m===void 0||Je>=e||Je<0||D&&Ce-x>=i}function ge(){var Ce=Cv();if(ee(Ce))return ve(Ce);h=setTimeout(ge,function(Je){var qe=e-(Je-m);return D?zx(qe,i-(Je-x)):qe}(Ce))}function ve(Ce){return h=void 0,I&&r?X(Ce):(r=a=void 0,s)}function we(){var Ce=Cv(),Je=ee(Ce);if(r=arguments,a=this,m=Ce,Je){if(h===void 0)return q(m);if(D)return clearTimeout(h),h=setTimeout(ge,e),X(m)}return h===void 0&&(h=setTimeout(ge,e)),s}return e=js(e)||0,xn(n)&&(S=!!n.leading,i=(D="maxWait"in n)?Lx(js(n.maxWait)||0,e):i,I="trailing"in n?!!n.trailing:I),we.cancel=function(){h!==void 0&&clearTimeout(h),x=0,r=m=a=h=void 0},we.flush=function(){return h===void 0?s:ve(Cv())},we},Fx=o(172);function Ux(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Fa(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Ab,Mb,kb,Gx=function(){function t(r){(function(a,i){if(!(a instanceof i))throw new TypeError("Cannot call a class as a function")})(this,t),Fa(this,"undos",[]),Fa(this,"redos",[]),Fa(this,"callbacks",[]),Fa(this,"stopWatch",null),Fa(this,"curData",null),Fa(this,"maxSize",50),Fa(this,"waitTime",100),Fa(this,"eventCenter",void 0),this.eventCenter=r}var e,n;return e=t,(n=[{key:"add",value:function(r){Pb(Ix(this.undos),r)||(this.undos.push(r),Pb(this.curData,r)||(this.redos=[]),this.eventCenter.emit(pt.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=fn(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=fn(r),r}}},{key:"watch",value:function(r){var a=this;this.stopWatch&&this.stopWatch(),this.undos.push(r.modelToGraphData()),this.stopWatch=Object(Fx.a)(r,Bx(function(){var i=r.modelToHistoryData();i&&a.add(i)},this.waitTime))}}])&&Ux(e.prototype,n),t}();function Rv(t){return Rv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Rv(t)}function Hx(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,s,h=[],m=!0,x=!1;try{for(a=a.call(n);!(m=(i=a.next()).done)&&(h.push(i.value),!r||h.length!==r);m=!0);}catch(S){x=!0,s=S}finally{try{m||a.return==null||a.return()}finally{if(x)throw s}}return h}}(t,e)||function(n,r){if(n){if(typeof n=="string")return Tb(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 Tb(n,r)}}(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  92. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Tb(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Db(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function Hu(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Db(Object(n),!0).forEach(function(r){Xu(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Db(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Nb(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Iv(t,e){return Iv=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Iv(t,e)}function Xx(t){var e=function(){if(typeof Reflect=="undefined"||!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(n){return!1}}();return function(){var n,r=pd(t);if(e){var a=pd(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Yx(this,n)}}function Yx(t,e){if(e&&(Rv(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return sc(t)}function sc(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function pd(t){return pd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},pd(t)}function Xu(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Cb,Rb,Ib,Lv=ai((kb=Mb=function(t){(function(s,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(h&&h.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),h&&Iv(s,h)})(i,t);var e,n,r,a=Xx(i);function i(){var s;return function(h,m){if(!(h instanceof m))throw new TypeError("Cannot call a class as a function")}(this,i),Xu(sc(s=a.call(this)),"ref",Object(fe.f)()),Xu(sc(s),"__prevText",{type:"",text:"",id:""}),Xu(sc(s),"keyupHandler",function(h){var m=s.props.graphModel.textEditElement;h.key==="Enter"&&h.altKey&&m.setElementState(0)}),Xu(sc(s),"inputHandler",function(h){var m=h.target.innerText,x=s.props.graphModel.textEditElement;s.__prevText={type:x.type,text:m.replace(/(\r\n)+$|(\n)+$/,""),id:x.id}}),Xu(sc(s),"keydownHandler",function(h){h.stopPropagation()}),s.state={style:{left:0,top:0}},s}return e=i,r=[{key:"getDerivedStateFromProps",value:function(s){var h,m=s.graphModel,x=m.transformModel,S=m.theme,D=S.inputText,I=m.textEditElement;if(I){var X;if((X=I.text)===null||X===void 0||!X.value)if(I.BaseType===Bn.EDGE){var q=(I=I).text,ee=I.textPosition,ge=ee.x,ve=ee.y;q.x=ge,q.y=ve,I.setText(q)}else I=I;var we={resize:"auto",whiteSpace:"normal",wordBreak:"break-all"};if(I.BaseType===Bn.EDGE){var Ce=S.edgeText,Je=Ce.overflowMode,qe=Ce.lineHeight,gt=Ce.wrapPadding,$e=Ce.textWidth;$e&&Je==="autoWrap"&&(h=Hu(Hu({},we),{},{width:$e,minWidth:$e,lineHeight:qe,padding:gt}))}else if(I.BaseType===Bn.NODE){var ht=S.nodeText,tt=ht.overflowMode,Kt=ht.lineHeight,Jt=ht.wrapPadding,Tt=ht.textWidth,rn=I,Un=rn.width,Gn=rn.modelType,Sr=rn.textWidth||Tt||Un;(Gn!==Yt.TEXT_NODE&&tt==="autoWrap"||Gn===Yt.TEXT_NODE&&Tt)&&(h=Hu(Hu({},we),{},{width:Sr,minWidth:Sr,lineHeight:Kt,padding:Jt}))}var bo=I.text,_o=bo.x,Ai=bo.y,Yu=Hx(x.CanvasPointToHtmlPoint([_o,Ai]),2);return{style:Hu(Hu({left:Yu[0],top:Yu[1]},h),D)}}}}],(n=[{key:"componentDidUpdate",value:function(){var s=this.props.graphModel;if(this.ref.current&&(this.ref.current.focus(),this.placeCaretAtEnd(this.ref.current)),this.__prevText.id!==""){var h=this.__prevText,m=h.text,x=h.id;s.updateText(x,m),s.eventCenter.emit(pt.TEXT_UPDATE,Hu({},this.__prevText)),this.__prevText.id="",this.__prevText.text="",this.__prevText.type=""}}},{key:"placeCaretAtEnd",value:function(s){if(window.getSelection!==void 0&&document.createRange!==void 0){var h=document.createRange();h.selectNodeContents(s),h.collapse(!1);var m=window.getSelection();m.removeAllRanges(),m.addRange(h)}}},{key:"render",value:function(){var s,h=this.props.graphModel.textEditElement,m=this.state.style;return h?Object(fe.g)("div",{contentEditable:!0,className:"lf-text-input",style:m,ref:this.ref,key:h.id,onKeyUp:this.keyupHandler,onKeyDown:this.keydownHandler,onKeyPress:this.keydownHandler,onInput:this.inputHandler},(s=h.text)===null||s===void 0?void 0:s.value):null}}])&&Nb(e.prototype,n),r&&Nb(e,r),i}(fe.a),Xu(Mb,"toolName","textEdit"),Ab=kb))||Ab,Wx=function(t){return t.modelType===Yt.LINE_EDGE?function(e){var n=e.startPoint,r=e.endPoint,a=(n.x+r.x)/2,i=(n.y+r.y)/2,s=Math.abs(n.x-r.x)+10,h=Math.abs(n.y-r.y)+10;return{x:a-s/2,y:i-h/2,x1:a+s/2,y1:i+h/2}}(t):t.modelType===Yt.POLYLINE_EDGE?function(e){var n=e.points,r=Jo(n),a=Hi(r,8),i=a.x,s=a.y,h=a.width,m=a.height;return{x:i-h/2,y:s-m/2,x1:i+h/2,y1:s+m/2}}(t):t.modelType===Yt.BEZIER_EDGE?function(e){var n=e.path,r=Au(n),a=Hi(r,8),i=a.x,s=a.y,h=a.width,m=a.height;return{x:i-h/2,y:s-m/2,x1:i+h/2,y1:s+m/2}}(t):void 0};function zv(t){return zv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},zv(t)}function Lb(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,r){var a=n==null?null:typeof Symbol!="undefined"&&n[Symbol.iterator]||n["@@iterator"];if(a!=null){var i,s,h=[],m=!0,x=!1;try{for(a=a.call(n);!(m=(i=a.next()).done)&&(h.push(i.value),!r||h.length!==r);m=!0);}catch(S){x=!0,s=S}finally{try{m||a.return==null||a.return()}finally{if(x)throw s}}return h}}(t,e)||zb(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  93. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Vx(t){return function(e){if(Array.isArray(e))return Bv(e)}(t)||function(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(t)||zb(t)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
  94. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function zb(t,e){if(t){if(typeof t=="string")return Bv(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Bv(t,e):void 0}}function Bv(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Kx(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Fv(t,e){return Fv=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Fv(t,e)}function $x(t){var e=function(){if(typeof Reflect=="undefined"||!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(n){return!1}}();return function(){var n,r=dd(t);if(e){var a=dd(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return qx(this,n)}}function qx(t,e){if(e&&(zv(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return cc(t)}function cc(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function dd(t){return dd=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},dd(t)}function lc(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Uv=ai((Ib=Rb=function(t){(function(i,s){if(typeof s!="function"&&s!==null)throw new TypeError("Super expression must either be null or a function");i.prototype=Object.create(s&&s.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),s&&Fv(i,s)})(a,t);var e,n,r=$x(a);function a(i){var s;(function(S,D){if(!(S instanceof D))throw new TypeError("Cannot call a class as a function")})(this,a),lc(cc(s=r.call(this)),"stepDrag",void 0),lc(cc(s),"handleMouseDown",function(S){s.stepDrag.handleMouseDown(S)}),lc(cc(s),"handleWheelEvent",function(S){var D,I;S.preventDefault();var X=S.deltaX,q=S.deltaY,ee=S.clientX,ge=S.clientY,ve=S.ctrlKey,we=new WheelEvent("wheel",{deltaX:X,deltaY:q,clientX:ee,clientY:ge,ctrlKey:ve});(D=s.props.logicFlow.container)===null||D===void 0||(I=D.querySelector('.lf-canvas-overlay[name="canvas-overlay"]'))===null||I===void 0||I.dispatchEvent(we)}),lc(cc(s),"onDragging",function(S){var D=S.deltaX,I=S.deltaY,X=s.props.graphModel,q=X.getSelectElements(!0);X.moveNodes(q.nodes.map(function(ee){return ee.id}),D,I)}),lc(cc(s),"handleContextMenu",function(S){S.preventDefault();var D=s.props,I=D.graphModel,X=D.graphModel,q=X.eventCenter,ee=X.selectElements,ge=I.getPointByClient({x:S.clientX,y:S.clientY}),ve={nodes:[],edges:[]};Vx(ee.values()).forEach(function(we){we.BaseType===Bn.NODE&&ve.nodes.push(we.getData()),we.BaseType===Bn.EDGE&&ve.edges.push(we.getData())}),q.emit(pt.SELECTION_CONTEXTMENU,{data:ve,e:S,position:ge})});var h=i.graphModel,m=h.gridSize,x=h.eventCenter;return s.stepDrag=new no({onDragging:s.onDragging,step:m,eventType:"SELECTION",eventCenter:x}),s}return e=a,(n=[{key:"render",value:function(){var i=this.props.graphModel,s=i.selectElements,h=i.transformModel;if(!(s.size<=1)){var m=Number.MAX_SAFE_INTEGER,x=Number.MAX_SAFE_INTEGER,S=Number.MIN_SAFE_INTEGER,D=Number.MIN_SAFE_INTEGER;s.forEach(function(ee){var ge={x:0,y:0,x1:0,y1:0};ee.BaseType===Bn.NODE&&(ge=function(ve){var we=ve.x,Ce=ve.y,Je=ve.width,qe=ve.height;return{x:we-Je/2,y:Ce-qe/2,x1:we+Je/2,y1:Ce+qe/2}}(ee)),ee.BaseType===Bn.EDGE&&(ge=Wx(ee)),m=Math.min(m,ge.x),x=Math.min(x,ge.y),S=Math.max(S,ge.x1),D=Math.max(D,ge.y1)});var I=Lb(h.CanvasPointToHtmlPoint([m,x]),2);m=I[0],x=I[1];var X=Lb(h.CanvasPointToHtmlPoint([S,D]),2);S=X[0],D=X[1];var q={left:"".concat(m-10,"px"),top:"".concat(x-10,"px"),width:"".concat(S-m+20,"px"),height:"".concat(D-x+20,"px")};return Object(fe.g)("div",{className:"lf-multiple-select",style:q,onMouseDown:this.handleMouseDown,onContextMenu:this.handleContextMenu,onWheel:this.handleWheelEvent})}}}])&&Kx(e.prototype,n),a}(fe.a),lc(Rb,"toolName","multipleSelect"),Cb=Ib))||Cb;function Zx(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function hd(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Jx=function(){function t(r){(function(i,s){if(!(i instanceof s))throw new TypeError("Cannot call a class as a function")})(this,t),hd(this,"tools",void 0),hd(this,"components",void 0),hd(this,"toolMap",new Map),hd(this,"instance",void 0),this.instance=r,this.isDisabledTool(Lv.toolName)||this.registerTool(Lv.toolName,Lv),this.isDisabledTool(Uv.toolName)||this.registerTool(Uv.toolName,Uv);var a=r.graphModel;a.eventCenter.on("".concat(pt.GRAPH_TRANSFORM,",").concat(pt.NODE_CLICK,",").concat(pt.BLANK_CLICK," "),function(){var i=a.textEditElement,s=a.editConfigModel,h=s.edgeTextEdit,m=s.nodeTextEdit;(h||m)&&i&&a.textEditElement.setElementState(cn.DEFAULT)})}var e,n;return e=t,(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}}])&&Zx(e.prototype,n),t}(),Qx=o(173),e1=o.n(Qx);function t1(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Gv(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Bb=function(){function t(r){(function(i,s){if(!(i instanceof s))throw new TypeError("Cannot call a class as a function")})(this,t),Gv(this,"mousetrap",void 0),Gv(this,"options",void 0),Gv(this,"target",void 0),r.keyboard||(r.keyboard={enabled:!1}),this.options=r;var a=r.lf;this.target=a.container,this.mousetrap=new e1.a(this.target),r.keyboard.enabled&&!a.options.isSilentMode&&this.enable(!0)}var e,n;return e=t,(n=[{key:"initShortcuts",value:function(){var r=this,a=this.options.keyboard.shortcuts;if(a)if(vn(a))a.forEach(function(m){var x=m.keys,S=m.callback,D=m.action;return r.on(x,S,D)});else{var i=a.keys,s=a.callback,h=a.action;this.on(i,s,h)}}},{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")}}])&&t1(e.prototype,n),t}(),n1=Bb,ea=null;function Fb(t,e){return t.x+=e,t.y+=e,t.text&&(t.text.x+=e,t.text.y+=e),t}function Ub(t,e){return t.startPoint&&(t.startPoint.x+=e,t.startPoint.y+=e),t.endPoint&&(t.endPoint.x+=e,t.endPoint.y+=e),t.pointsList&&t.pointsList.length>0&&t.pointsList.forEach(function(n){n.x+=e,n.y+=e}),t.text&&(t.text.x+=e,t.text.y+=e),t}var fc=40,Hv=40;function Xv(t){return Xv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xv(t)}function Gb(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),n.push.apply(n,r)}return n}function Jl(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Gb(Object(n),!0).forEach(function(r){Ln(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Gb(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Hb(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Ln(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Yv=Symbol("plugin register by Logicflow.use"),Wv=function(){function t(a){var i,s,h=this;(function(m,x){if(!(m instanceof x))throw new TypeError("Cannot call a class as a function")})(this,t),Ln(this,"container",void 0),Ln(this,"width",void 0),Ln(this,"height",void 0),Ln(this,"graphModel",void 0),Ln(this,"history",void 0),Ln(this,"viewMap",new Map),Ln(this,"tool",void 0),Ln(this,"keyboard",void 0),Ln(this,"dnd",void 0),Ln(this,"options",void 0),Ln(this,"snaplineModel",void 0),Ln(this,"components",[]),Ln(this,"plugins",void 0),Ln(this,"extension",{}),Ln(this,"adapterIn",void 0),Ln(this,"adapterOut",void 0),Ln(this,"getView",function(m){return h.viewMap.get(m)}),a=Bg(a),this.options=a,this.container=this.initContainer(a.container),this.plugins=a.plugins,this.graphModel=new s_(Jl({},a)),this.tool=new Jx(this),this.history=new Gx(this.graphModel.eventCenter),this.dnd=new iO({lf:this}),this.keyboard=new n1({lf:this,keyboard:a.keyboard}),a.snapline!==!1&&(this.snaplineModel=new Qm(this.graphModel),i=this.graphModel.eventCenter,s=this.snaplineModel,i.on("node:mousemove",function(m){var x=m.data;s.setNodeSnapLine(x)}),i.on("node:mouseup",function(){s.clearSnapline()})),function(m,x){var S=m.keyboard,D=S.options.keyboard;S.on(["cmd + c","ctrl + c"],function(){if(Hv=fc,!D.enabled||x.textEditElement)return!0;var I=m.options.guards,X=x.getSelectElements(!1);return I&&I.beforeClone&&!I.beforeClone(X)||X.nodes.length===0&&X.edges.length===0?(ea=null,!0):((ea=X).nodes.forEach(function(q){return Fb(q,fc)}),ea.edges.forEach(function(q){return Ub(q,fc)}),!1)}),S.on(["cmd + v","ctrl + v"],function(){if(!D.enabled||x.textEditElement)return!0;if(ea&&(ea.nodes||ea.edges)){m.clearSelectElements();var I=m.addElements(ea,Hv);if(!I)return!0;I.nodes.forEach(function(X){return m.selectElementById(X.id,!0)}),I.edges.forEach(function(X){return m.selectElementById(X.id,!0)}),ea.nodes.forEach(function(X){return Fb(X,fc)}),ea.edges.forEach(function(X){return Ub(X,fc)}),Hv+=fc}return!1}),S.on(["cmd + z","ctrl + z"],function(){return!D.enabled||!!x.textEditElement||(m.undo(),!1)}),S.on(["cmd + y","ctrl + y"],function(){return!D.enabled||!!x.textEditElement||(m.redo(),!1)}),S.on(["backspace"],function(){if(!D.enabled||x.textEditElement)return!0;var I=x.getSelectElements(!0);return m.clearSelectElements(),I.edges.forEach(function(X){return m.deleteEdge(X.id)}),I.nodes.forEach(function(X){return m.deleteNode(X.id)}),!1})}(this,this.graphModel),this.keyboard.initShortcuts(),this.defaultRegister(),this.installPlugins(a.disabledPlugins)}var e,n,r;return e=t,n=[{key:"register",value:function(a,i){var s=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2];if(typeof a=="string"){var h={BaseEdge:ql,BaseEdgeModel:pl,BaseNode:qi,BaseNodeModel:$i,RectNode:Ly,RectNodeModel:hy,CircleNode:Uy,CircleNodeModel:$h,PolygonNode:Wy,PolygonNodeModel:ly,TextNode:ov,TextNodeModel:my,LineEdge:wv,LineEdgeModel:Fs,DiamondNode:qy,DiamondNodeModel:ey,PolylineEdge:Pv,PolylineEdgeModel:to,BezierEdge:Tv,BezierEdgeModel:Hh,EllipseNode:tv,EllipseNodeModel:oy,HtmlNode:sv,HtmlNodeModel:Oy,h:fe.g,type:a};this.viewMap.forEach(function(I){var X=I.extendKey;X&&(h[X]=I)}),this.graphModel.modelMap.forEach(function(I){var X=I.extendKey;X&&(h[X]=I)});var m=i(h),x=m.view,S=m.model,D=x;s&&!D.isObervered&&(D.isObervered=!0,D=ct(D)),this.setView(a,D),this.graphModel.setModel(a,S)}else this.registerElement(a)}},{key:"registerElement",value:function(a){var i=a.view;a.isObserverView===!1||i.isObervered||(i.isObervered=!0,i=ct(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(s){a.registerElement(s)})}},{key:"defaultRegister",value:function(){this.registerElement({view:Ly,model:hy,type:"rect"}),this.registerElement({type:"circle",view:Uy,model:$h}),this.registerElement({type:"polygon",view:Wy,model:ly}),this.registerElement({type:"line",view:wv,model:Fs}),this.registerElement({type:"polyline",view:Pv,model:to}),this.registerElement({type:"bezier",view:Tv,model:Hh}),this.registerElement({type:"text",view:ov,model:my}),this.registerElement({type:"ellipse",view:tv,model:oy}),this.registerElement({type:"diamond",view:qy,model:ey}),this.registerElement({type:"html",view:sv,model:Oy})}},{key:"selectElementById",value:function(a){var i=arguments.length>1&&arguments[1]!==void 0&&arguments[1],s=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2];this.graphModel.selectElementById(a,i),!i&&s&&this.graphModel.toFront(a)}},{key:"focusOn",value:function(a){var i=this.graphModel.transformModel,s=a.coordinate,h=a.id;if(!s){var m=this.getNodeModelById(h);m&&(s=m.getData());var x=this.getEdgeModelById(h);x&&(s=x.textPosition)}var S=s,D=S.x,I=S.y;i.focusOn(D,I,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,s,h,m=this.getModelById(a);return!!m&&(s=(h=(Ln(i={},Bn.NODE,this.deleteNode),Ln(i,Bn.EDGE,this.deleteEdge),i)[m.BaseType])===null||h===void 0?void 0:h.call(this,a))!==null&&s!==void 0&&s}},{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]:pt.NODE_ADD,s=arguments.length>2?arguments[2]:void 0;return this.graphModel.addNode(a,i,s)}},{key:"deleteNode",value:function(a){var i=this.graphModel.getNodeModelById(a);if(!i)return!1;var s=i.getData(),h=this.options.guards,m=!h||!h.beforeDelete||h.beforeDelete(s);return m&&this.graphModel.deleteNode(a),m}},{key:"cloneNode",value:function(a){var i=this.graphModel.getNodeModelById(a).getData(),s=this.options.guards;if(!s||!s.beforeClone||s.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,s=this.graphModel.edgesMap[a];if(!s)return!1;var h=s.model.getData(),m=!i||!i.beforeDelete||i.beforeDelete(h);return m&&this.graphModel.deleteEdgeById(a),m}},{key:"deleteEdgeByNodeId",value:function(a){var i=a.sourceNodeId,s=a.targetNodeId;i&&s?this.graphModel.deleteEdgeBySourceAndTarget(i,s):i?this.graphModel.deleteEdgeBySource(i):s&&this.graphModel.deleteEdgeByTarget(s)}},{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,s=a.sourceNodeId,h=a.targetNodeId;if(s&&h){var m=[];return i.forEach(function(D){D.sourceNodeId===s&&D.targetNodeId===h&&m.push(D)}),m}if(s){var x=[];return i.forEach(function(D){D.sourceNodeId===s&&x.push(D)}),x}if(h){var S=[];return i.forEach(function(D){D.targetNodeId===h&&S.push(D)}),S}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 s;(s=this.graphModel.getElement(a))===null||s===void 0||s.setProperties(pr(i))}},{key:"deleteProperty",value:function(a,i){var s;(s=this.graphModel.getElement(a))===null||s===void 0||s.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,s=a.nodes,h=a.edges,m={},x={nodes:[],edges:[]},S=0;S<s.length;S++){var D=s[S],I=D.id,X=this.addNode(D);if(!X)return;I&&(m[I]=X.id),x.nodes.push(X)}return h.forEach(function(q){var ee=q.sourceNodeId,ge=q.targetNodeId;m[ee]&&(ee=m[ee]),m[ge]&&(ge=m[ge]);var ve=i.graphModel.addEdge(Jl(Jl({},q),{},{sourceNodeId:ee,targetNodeId:ge}));x.edges.push(ve)}),x}},{key:"getAreaElement",value:function(a,i){var s=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],h=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],m=arguments.length>4&&arguments[4]!==void 0&&arguments[4];return this.graphModel.getAreaElement(a,i,s,h,m).map(function(x){return x.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();if(this.adapterOut){for(var i=arguments.length,s=new Array(i),h=0;h<i;h++)s[h]=arguments[h];return this.adapterOut.apply(this,[a].concat(s))}return a}},{key:"getGraphRawData",value:function(){return this.graphModel.modelToGraphData()}},{key:"clearData",value:function(){this.graphModel.clearData()}},{key:"updateEditConfig",value:function(a){var i=this.graphModel,s=i.editConfigModel,h=i.transformModel;s.updateEditConfig(a),(a==null?void 0:a.stopMoveGraph)!==void 0&&h.updateTranslateLimits(a.stopMoveGraph),a!=null&&a.isSilentMode?this.keyboard.disable():this.keyboard.enable(!0)}},{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=pr(this.history.undo());this.clearSelectElements(),this.graphModel.graphDataToModel(a)}}},{key:"redo",value:function(){if(this.history.redoAble()){var a=pr(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,s=a.TRANSLATE_Y;this.translate(-i,-s)}},{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,s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],h=(a=this.plugins)!==null&&a!==void 0?a:t.extensions;h.forEach(function(m){var x=null,S=null;m[Yv]?(x=m.extension,S=m.props):x=m;var D=x.pluginName||x.name;s.indexOf(D)===-1&&i.installPlugin(x,S)})}},{key:"installPlugin",value:function(a,i){if(Xv(a)==="object"){var s=a.install,h=a.render;return s&&s.call(a,this,t),h&&this.components.push(h.bind(a)),void(this.extension[a.pluginName]=a)}var m=a,x=new m({lf:this,LogicFlow:t,options:this.options.pluginsOptions,props:i});x.render&&this.components.push(x.render.bind(x)),this.extension[m.pluginName]=x}},{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 s=new i(Jl(Jl({},a),{},{virtual:!0}),this.graphModel);return this.graphModel.setFakerNode(s),s}}},{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(pr(a)),this.options.history!==!1&&this.history.watch(this.graphModel),Object(fe.j)(Object(fe.g)(rO,{getView:this.getView,tool:this.tool,options:this.options,dnd:this.dnd,snaplineModel:this.snaplineModel,graphModel:this.graphModel}),this.container),this.emit(pt.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,i){var s,h,m=a.pluginName;m||(m=a.name);var x=(s=this.extensions.get(m))===null||s===void 0?void 0:s.extension;x&&x.destroy&&x.destroy(),this.extensions.set(m,(Ln(h={},Yv,Yv),Ln(h,"extension",a),Ln(h,"props",i),h))}}],n&&Hb(e.prototype,n),r&&Hb(e,r),t}();function ai(t){return ct(t)}Ln(Wv,"extensions",new Map),f.default=Wv}])})})(qv,qv.exports);var ot=qv.exports;const pc=A1(ot);var L1=function(){function g(){globalThis._ids=this,this._ids=new Set}return g.prototype.generateId=function(){var y="xxxxxxx".replace(/[x]/g,function(c){var f=Math.random()*16|0,o=c==="x"?f:f&3|8;return o.toString(16)});return y},g.prototype.next=function(){for(var y=this.generateId();this._ids.has(y);)y=this.generateId();return this._ids.add(y),y},g}(),z1=(globalThis==null?void 0:globalThis._ids)||new L1;function bc(){return z1.next()}var D0=function(){var g=function(y,c){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,o){f.__proto__=o}||function(f,o){for(var p in o)o.hasOwnProperty(p)&&(f[p]=o[p])},g(y,c)};return function(y,c){g(y,c);function f(){this.constructor=y}y.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}}(),B1=function(g){D0(y,g);function y(c,f){var o=this;return c.id||(c.id="Event_"+bc()),c.text||(c.text=""),c.text&&typeof c.text=="string"&&(c.text={value:c.text,x:c.x,y:c.y+40}),o=g.call(this,c,f)||this,o}return y.prototype.setAttributes=function(){this.r=18},y.prototype.getConnectedTargetRules=function(){var c=g.prototype.getConnectedTargetRules.call(this),f={message:"起始节点不能作为边的终点",validate:function(){return!1}};return c.push(f),c},y.extendKey="StartEventModel",y}(ot.CircleNodeModel),F1=function(g){D0(y,g);function y(){return g!==null&&g.apply(this,arguments)||this}return y.extendKey="StartEventNode",y}(ot.CircleNode),U1={type:"bpmn:startEvent",view:F1,model:B1},N0=function(){var g=function(y,c){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,o){f.__proto__=o}||function(f,o){for(var p in o)o.hasOwnProperty(p)&&(f[p]=o[p])},g(y,c)};return function(y,c){g(y,c);function f(){this.constructor=y}y.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}}(),jd=function(){return jd=Object.assign||function(g){for(var y,c=1,f=arguments.length;c<f;c++){y=arguments[c];for(var o in y)Object.prototype.hasOwnProperty.call(y,o)&&(g[o]=y[o])}return g},jd.apply(this,arguments)},G1=function(g){N0(y,g);function y(c,f){var o=this;return c.id||(c.id="Event_"+bc()),c.text||(c.text=""),c.text&&typeof c.text=="string"&&(c.text={value:c.text,x:c.x,y:c.y+40}),o=g.call(this,c,f)||this,o}return y.prototype.setAttributes=function(){this.r=18},y.prototype.getConnectedSourceRules=function(){var c=g.prototype.getConnectedSourceRules.call(this),f={message:"结束节点不能作为边的起点",validate:function(){return!1}};return c.push(f),c},y.extendKey="EndEventModel",y}(ot.CircleNodeModel),H1=function(g){N0(y,g);function y(){return g!==null&&g.apply(this,arguments)||this}return y.prototype.getAnchorStyle=function(){return{visibility:"hidden"}},y.prototype.getShape=function(){var c=this.props.model,f=c.getNodeStyle(),o=c.x,p=c.y,d=c.r,O=g.prototype.getShape.call(this);return ot.h("g",{},O,ot.h("circle",jd(jd({},f),{cx:o,cy:p,r:d-5})))},y.extendKey="EndEventView",y}(ot.CircleNode),X1={type:"bpmn:endEvent",view:H1,model:G1},C0=function(){var g=function(y,c){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,o){f.__proto__=o}||function(f,o){for(var p in o)o.hasOwnProperty(p)&&(f[p]=o[p])},g(y,c)};return function(y,c){g(y,c);function f(){this.constructor=y}y.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}}(),rf=function(){return rf=Object.assign||function(g){for(var y,c=1,f=arguments.length;c<f;c++){y=arguments[c];for(var o in y)Object.prototype.hasOwnProperty.call(y,o)&&(g[o]=y[o])}return g},rf.apply(this,arguments)},Y1=function(g){C0(y,g);function y(c,f){var o=this;return c.id||(c.id="Gateway_"+bc()),c.text||(c.text=""),c.text&&typeof c.text=="string"&&(c.text={value:c.text,x:c.x,y:c.y+40}),o=g.call(this,c,f)||this,o.points=[[25,0],[50,25],[25,50],[0,25]],o}return y.extendKey="ExclusiveGatewayModel",y}(ot.PolygonNodeModel),W1=function(g){C0(y,g);function y(){return g!==null&&g.apply(this,arguments)||this}return y.prototype.getShape=function(){var c=this.props.model,f=c.x,o=c.y,p=c.width,d=c.height,O=c.points,v=c.getNodeStyle();return ot.h("g",{transform:"matrix(1 0 0 1 "+(f-p/2)+" "+(o-d/2)+")"},ot.h("polygon",rf(rf({},v),{x:f,y:o,points:O})),ot.h("path",rf({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"},v)))},y.extendKey="ExclusiveGatewayNode",y}(ot.PolygonNode),V1={type:"bpmn:exclusiveGateway",view:W1,model:Y1},R0=function(){var g=function(y,c){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,o){f.__proto__=o}||function(f,o){for(var p in o)o.hasOwnProperty(p)&&(f[p]=o[p])},g(y,c)};return function(y,c){g(y,c);function f(){this.constructor=y}y.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}}(),Pd=function(){return Pd=Object.assign||function(g){for(var y,c=1,f=arguments.length;c<f;c++){y=arguments[c];for(var o in y)Object.prototype.hasOwnProperty.call(y,o)&&(g[o]=y[o])}return g},Pd.apply(this,arguments)},K1=function(g){R0(y,g);function y(c,f){var o=this;return c.id||(c.id="Activity_"+bc()),o=g.call(this,c,f)||this,o}return y.extendKey="UserTaskModel",y}(ot.RectNodeModel),$1=function(g){R0(y,g);function y(){return g!==null&&g.apply(this,arguments)||this}return y.prototype.getLabelShape=function(){var c=this.props.model,f=c.x,o=c.y,p=c.width,d=c.height,O=c.getNodeStyle();return ot.h("svg",{x:f-p/2+5,y:o-d/2+5,width:25,height:25,viewBox:"0 0 1274 1024"},ot.h("path",{fill:O.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 c=this.props.model,f=c.x,o=c.y,p=c.width,d=c.height,O=c.radius,v=c.getNodeStyle();return ot.h("g",{},[ot.h("rect",Pd(Pd({},v),{x:f-p/2,y:o-d/2,rx:O,ry:O,width:p,height:d})),this.getLabelShape()])},y.extendKey="UserTaskNode",y}(ot.RectNode),q1={type:"bpmn:userTask",view:$1,model:K1},I0=function(){var g=function(y,c){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,o){f.__proto__=o}||function(f,o){for(var p in o)o.hasOwnProperty(p)&&(f[p]=o[p])},g(y,c)};return function(y,c){g(y,c);function f(){this.constructor=y}y.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}}(),Zv=function(){return Zv=Object.assign||function(g){for(var y,c=1,f=arguments.length;c<f;c++){y=arguments[c];for(var o in y)Object.prototype.hasOwnProperty.call(y,o)&&(g[o]=y[o])}return g},Zv.apply(this,arguments)},Z1=function(g){I0(y,g);function y(c,f){var o=this;return c.id||(c.id="Activity_"+bc()),o=g.call(this,c,f)||this,o}return y.extendKey="ServiceTaskModel",y}(ot.RectNodeModel),J1=function(g){I0(y,g);function y(){return g!==null&&g.apply(this,arguments)||this}return y.prototype.getLabelShape=function(){var c=this.props.model,f=c.x,o=c.y,p=c.width,d=c.height,O=c.getNodeStyle();return ot.h("svg",{x:f-p/2+5,y:o-d/2+5,width:30,height:30,viewBox:"0 0 1274 1024"},ot.h("path",{fill:O.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 c=this.props.model,f=c.x,o=c.y,p=c.width,d=c.height,O=c.radius,v=c.getNodeStyle();return ot.h("g",{},[ot.h("rect",Zv({x:f-p/2,y:o-d/2,rx:O,ry:O,width:p,height:d},v)),this.getLabelShape()])},y.extendKey="ServiceTaskNode",y}(ot.RectNode),Q1={type:"bpmn:serviceTask",view:J1,model:Z1},L0=function(){var g=function(y,c){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,o){f.__proto__=o}||function(f,o){for(var p in o)o.hasOwnProperty(p)&&(f[p]=o[p])},g(y,c)};return function(y,c){g(y,c);function f(){this.constructor=y}y.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}}(),eE=function(g){L0(y,g);function y(c,f){var o=this;return c.id||(c.id="Flow_"+bc()),o=g.call(this,c,f)||this,o}return y.extendKey="SequenceFlowModel",y}(ot.PolylineEdgeModel),tE=function(g){L0(y,g);function y(){return g!==null&&g.apply(this,arguments)||this}return y.extendKey="SequenceFlowEdge",y}(ot.PolylineEdge),nE={type:"bpmn:sequenceFlow",view:tE,model:eE},Zb={width:40,height:40},Jb={width:40,height:40},Qb={width:40,height:40},e0={width:100,height:80},t0={width:100,height:80},rE={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}}},oE=function(){function g(y){var c=y.lf;c.setTheme(rE),c.register(U1),c.register(X1),c.register(V1),c.register(q1),c.register(Q1),c.options.customBpmnEdge||(c.register(nE),c.setDefaultEdgeType("bpmn:sequenceFlow"))}return g.pluginName="bpmnElement",g}(),iE=function(){function g(){globalThis._ids=this,this._ids=new Set}return g.prototype.generateId=function(){var y="xxxxxxx".replace(/[x]/g,function(c){var f=Math.random()*16|0,o=c==="x"?f:f&3|8;return o.toString(16)});return y},g.prototype.next=function(){for(var y=this.generateId();this._ids.has(y);)y=this.generateId();return this._ids.add(y),y},g}(),aE=(globalThis==null?void 0:globalThis._ids)||new iE;function n0(){return aE.next()}function z0(g){return Object.prototype.toString.call(g)}function uE(g){return" ".repeat(g)}function Ad(g){var y=g;return z0(g)==="[object Object]"?(y={},Object.keys(g).forEach(function(c){var f=c;c.charAt(0)==="-"&&(f=c.substring(1)),y[f]=Ad(g[c])})):Array.isArray(g)&&(y=[],g.forEach(function(c,f){y[f]=Ad(c)})),y}function sE(g){var y=g;try{typeof y!="string"&&(y=JSON.parse(g))}catch(c){y=JSON.stringify(Ad(g)).replace(/"/g,"'")}return y}var dc=`
  95. `;function wd(g,y,c){var f=uE(c),o="";if(y==="#text")return dc+f+g;if(y==="#cdata-section")return dc+f+"<![CDATA["+g+"]]>";if(y==="#comment")return dc+f+"<!--"+g+"-->";if((""+y).charAt(0)==="-")return" "+y.substring(1)+'="'+sE(g)+'"';if(Array.isArray(g))g.forEach(function(v){o+=wd(v,y,c+1)});else if(z0(g)==="[object Object]"){var p=Object.keys(g),d="",O="";o+=(c===0?"":dc+f)+"<"+y,p.forEach(function(v){v.charAt(0)==="-"?d+=wd(g[v],v,c+1):O+=wd(g[v],v,c+1)}),o+=d+(O!==""?">"+O+(dc+f)+"</"+y+">":" />")}else o+=dc+f+("<"+y+">"+g.toString()+"</"+y+">");return o}function cE(g){var y="";for(var c in g)y+=wd(g[c],c,0);return y}var Vr=function(){};Vr.ObjTree=function(){return this};Vr.ObjTree.VERSION="0.23";Vr.ObjTree.prototype.xmlDecl=`<?xml version="1.0" encoding="UTF-8" ?>
  96. `;Vr.ObjTree.prototype.attr_prefix="-";Vr.ObjTree.prototype.parseXML=function(g){var y;if(window.DOMParser){var c=new DOMParser,f=c.parseFromString(g,"application/xml");if(!f)return;y=f.documentElement}else window.ActiveXObject&&(c=new ActiveXObject("Microsoft.XMLDOM"),c.async=!1,c.loadXML(g),y=c.documentElement);if(y)return this.parseDOM(y)};Vr.ObjTree.prototype.parseHTTP=function(g,y,c){var f={};for(var o in y)f[o]=y[o];if(f.method||(typeof f.postBody=="undefined"&&typeof f.postbody=="undefined"&&typeof f.parameters=="undefined"?f.method="get":f.method="post"),c){f.asynchronous=!0;var p=this,d=c,O=f.onComplete;f.onComplete=function(M){var A;M&&M.responseXML&&M.responseXML.documentElement&&(A=p.parseDOM(M.responseXML.documentElement)),d(A,M),O&&O(M)}}else f.asynchronous=!1;var v;if(typeof HTTP!="undefined"&&HTTP.Request){f.uri=g;var E=new HTTP.Request(f);E&&(v=E.transport)}else if(typeof Ajax!="undefined"&&Ajax.Request){var E=new Ajax.Request(g,f);E&&(v=E.transport)}if(c)return v;if(v&&v.responseXML&&v.responseXML.documentElement)return this.parseDOM(v.responseXML.documentElement)};Vr.ObjTree.prototype.parseDOM=function(g){if(g){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 c=this.parseElement(g);if(this.__force_array[g.nodeName]&&(c=[c]),g.nodeType!=11){var f={};f[g.nodeName]=c,c=f}return c}};Vr.ObjTree.prototype.parseElement=function(g){if(g.nodeType!=7){if(g.nodeType==3||g.nodeType==4||g.nodeType==8){var y=g.nodeValue.match(/[^\x00-\x20]/);return y==null?void 0:g.nodeValue}var c=null,f={};if(g.attributes&&g.attributes.length){c={};for(var o=0;o<g.attributes.length;o++){var p=g.attributes[o].nodeName;if(typeof p=="string"){var d=g.attributes[o].nodeValue;try{d=JSON.parse(g.attributes[o].nodeValue.replace(/'/g,'"'))}catch(E){d=g.attributes[o].nodeValue}d&&(p=this.attr_prefix+p,typeof f[p]=="undefined"&&(f[p]=0),f[p]++,this.addNode(c,p,f[p],d))}}}if(g.childNodes&&g.childNodes.length){var O=!0;c&&(O=!1);for(var o=0;o<g.childNodes.length&&O;o++){var v=g.childNodes[o].nodeType;v==3||v==4||v==8||(O=!1)}if(O){c||(c="");for(var o=0;o<g.childNodes.length;o++)c+=g.childNodes[o].nodeValue}else{c||(c={});for(var o=0;o<g.childNodes.length;o++){var p=g.childNodes[o].nodeName;if(typeof p=="string"){var d=this.parseElement(g.childNodes[o]);d&&(typeof f[p]=="undefined"&&(f[p]=0),f[p]++,this.addNode(c,p,f[p],d))}}}}else c===null&&(c={});return c}};Vr.ObjTree.prototype.addNode=function(g,y,c,f){this.__force_array[y]?(c==1&&(g[y]=[]),g[y][g[y].length]=f):c==1?g[y]=f:c==2?g[y]=[g[y],f]:g[y][g[y].length]=f};Vr.ObjTree.prototype.writeXML=function(g){var y=this.hash_to_xml(null,g);return this.xmlDecl+y};Vr.ObjTree.prototype.hash_to_xml=function(g,y){var c=[],f=[];for(var o in y)if(y.hasOwnProperty(o)){var p=y[o];o.charAt(0)!=this.attr_prefix?typeof p=="undefined"||p==null?c[c.length]="<"+o+" />":typeof p=="object"&&p.constructor==Array?c[c.length]=this.array_to_xml(o,p):typeof p=="object"?c[c.length]=this.hash_to_xml(o,p):c[c.length]=this.scalar_to_xml(o,p):f[f.length]=" "+o.substring(1)+'="'+this.xml_escape(p)+'"'}var d=f.join(""),O=c.join("");return typeof g=="undefined"||g==null||(c.length>0?O.match(/\n/)?O="<"+g+d+`>
  97. `+O+"</"+g+`>
  98. `:O="<"+g+d+">"+O+"</"+g+`>
  99. `:O="<"+g+d+` />
  100. `),O};Vr.ObjTree.prototype.array_to_xml=function(g,y){for(var c=[],f=0;f<y.length;f++){var o=y[f];typeof o=="undefined"||o==null?c[c.length]="<"+g+" />":typeof o=="object"&&o.constructor==Array?c[c.length]=this.array_to_xml(g,o):typeof o=="object"?c[c.length]=this.hash_to_xml(g,o):c[c.length]=this.scalar_to_xml(g,o)}return c.join("")};Vr.ObjTree.prototype.scalar_to_xml=function(g,y){return g=="#text"?this.xml_escape(y):"<"+g+">"+this.xml_escape(y)+"</"+g+`>
  101. `};Vr.ObjTree.prototype.xml_escape=function(g){return g.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"')};var lE=function(g){return new Vr.ObjTree().parseXML(g)},fE=function(){var g=function(y,c){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,o){f.__proto__=o}||function(f,o){for(var p in o)o.hasOwnProperty(p)&&(f[p]=o[p])},g(y,c)};return function(y,c){g(y,c);function f(){this.constructor=y}y.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}}(),Jv=function(){return Jv=Object.assign||function(g){for(var y,c=1,f=arguments.length;c<f;c++){y=arguments[c];for(var o in y)Object.prototype.hasOwnProperty.call(y,o)&&(g[o]=y[o])}return g},Jv.apply(this,arguments)},Ld=function(g,y){var c=typeof Symbol=="function"&&g[Symbol.iterator];if(!c)return g;var f=c.call(g),o,p=[],d;try{for(;(y===void 0||y-- >0)&&!(o=f.next()).done;)p.push(o.value)}catch(O){d={error:O}}finally{try{o&&!o.done&&(c=f.return)&&c.call(f)}finally{if(d)throw d.error}}return p},Mi;(function(g){g.START="bpmn:startEvent",g.END="bpmn:endEvent",g.GATEWAY="bpmn:exclusiveGateway",g.USER="bpmn:userTask",g.SYSTEM="bpmn:serviceTask",g.FLOW="bpmn:sequenceFlow"})(Mi||(Mi={}));var B0=["-name","-id","bpmn:incoming","bpmn:outgoing","-sourceRef","-targetRef"],r0=["properties","startPoint","endPoint","pointsList"];function o0(g){var y=g?r0.concat(g):r0;return function(c){function f(o){var p={};return typeof o=="string"?o:Array.isArray(o)?o.map(function(d){return f(d)}):(Object.entries(o).forEach(function(d){var O=Ld(d,2),v=O[0],E=O[1];typeof E!="object"?v.indexOf("-")===0||["#text","#cdata-section","#comment"].includes(v)?p[v]=E:p["-"+v]=E:y.includes(v)?p["-"+v]=f(E):p[v]=f(E)}),p)}return f(c)}}function Md(g){var y={};return Object.entries(g).forEach(function(c){var f=Ld(c,2),o=f[0],p=f[1];o.indexOf("-")===0?y[o.substring(1)]=Ad(p):typeof p=="string"?y[o]=p:Object.prototype.toString.call(p)==="[object Object]"?y[o]=Md(p):Array.isArray(p)?y[o]=p.map(function(d){return Md(d)}):y[o]=p}),y}function pE(g,y,c){var f=new Map;y.nodes.forEach(function(p){var d,O={"-id":p.id};if(!((d=p.text)===null||d===void 0)&&d.value&&(O["-name"]=p.text.value),p.properties){var v=o0(c)(p.properties);Object.assign(O,v)}f.set(p.id,O),g[p.type]?Array.isArray(g[p.type])?g[p.type].push(O):g[p.type]=[g[p.type],O]:g[p.type]=O});var o=y.edges.map(function(p){var d,O,v=f.get(p.targetNodeId);v["bpmn:incoming"]?Array.isArray(v["bpmn:incoming"])?v["bpmn:incoming"].push(p.id):v["bpmn:incoming"]=[v["bpmn:incoming"],p.id]:v["bpmn:incoming"]=p.id;var E={"-id":p.id,"-sourceRef":p.sourceNodeId,"-targetRef":p.targetNodeId};if(!((d=p.text)===null||d===void 0)&&d.value&&(E["-name"]=(O=p.text)===null||O===void 0?void 0:O.value),p.properties){var M=o0(c)(p.properties);Object.assign(E,M)}return E});y.edges.forEach(function(p){var d=f.get(p.sourceNodeId);d["bpmn:outgoing"]?Array.isArray(d["bpmn:outgoing"])?d["bpmn:outgoing"].push(p.id):d["bpmn:outgoing"]=[d["bpmn:outgoing"],p.id]:d["bpmn:outgoing"]=p.id}),g[Mi.FLOW]=o}function dE(g,y){g["bpmndi:BPMNEdge"]=y.edges.map(function(c){var f,o=c.id,p=c.pointsList.map(function(O){var v=O.x,E=O.y;return{"-x":v,"-y":E}}),d={"-id":o+"_di","-bpmnElement":o,"di:waypoint":p};return!((f=c.text)===null||f===void 0)&&f.value&&(d["bpmndi:BPMNLabel"]={"dc:Bounds":{"-x":c.text.x-c.text.value.length*10/2,"-y":c.text.y-7,"-width":c.text.value.length*10,"-height":14}}),d}),g["bpmndi:BPMNShape"]=y.nodes.map(function(c){var f,o=c.id,p=100,d=80,O=c.x,v=c.y,E=Xa.shapeConfigMap.get(c.type);E&&(p=E.width,d=E.height),O-=p/2,v-=d/2;var M={"-id":o+"_di","-bpmnElement":o,"dc:Bounds":{"-x":O,"-y":v,"-width":p,"-height":d}};return!((f=c.text)===null||f===void 0)&&f.value&&(M["bpmndi:BPMNLabel"]={"dc:Bounds":{"-x":c.text.x-c.text.value.length*10/2,"-y":c.text.y-7,"-width":c.text.value.length*10,"-height":14}}),M})}function hE(g){var y=[],c=[],f=g["bpmn:definitions"];if(f){var o=f["bpmn:process"];Object.keys(o).forEach(function(p){if(p.indexOf("bpmn:")===0){var d=o[p];if(p===Mi.FLOW){var O=f["bpmndi:BPMNDiagram"]["bpmndi:BPMNPlane"]["bpmndi:BPMNEdge"];c=vE(d,O)}else{var v=f["bpmndi:BPMNDiagram"]["bpmndi:BPMNPlane"]["bpmndi:BPMNShape"];y=y.concat(yE(d,v,p))}}})}return{nodes:y,edges:c}}function yE(g,y,c){var f=[];if(Array.isArray(g))g.forEach(function(d){var O;Array.isArray(y)?O=y.find(function(E){return E["-bpmnElement"]===d["-id"]}):O=y;var v=i0(O,c,d);f.push(v)});else{var o=void 0;Array.isArray(y)?o=y.find(function(d){return d["-bpmnElement"]===g["-id"]}):o=y;var p=i0(o,c,g);f.push(p)}return f}function i0(g,y,c){var f=Number(g["dc:Bounds"]["-x"]),o=Number(g["dc:Bounds"]["-y"]),p=c["-name"],d=Xa.shapeConfigMap.get(y);d&&(f+=d.width/2,o+=d.height/2);var O;Object.entries(c).forEach(function(A){var T=Ld(A,2),k=T[0],R=T[1];B0.indexOf(k)===-1&&(O||(O={}),O[k]=R)}),O&&(O=Md(O));var v;if(p&&(v={x:f,y:o,value:p},g["bpmndi:BPMNLabel"]&&g["bpmndi:BPMNLabel"]["dc:Bounds"])){var E=g["bpmndi:BPMNLabel"]["dc:Bounds"];v.x=Number(E["-x"])+Number(E["-width"])/2,v.y=Number(E["-y"])+Number(E["-height"])/2}var M={id:g["-bpmnElement"],type:y,x:f,y:o,properties:O};return v&&(M.text=v),M}function vE(g,y){var c=[];if(Array.isArray(g))g.forEach(function(o){var p;Array.isArray(y)?p=y.find(function(d){return d["-bpmnElement"]===o["-id"]}):p=y,c.push(a0(p,o))});else{var f=void 0;Array.isArray(y)?f=y.find(function(o){return o["-bpmnElement"]===g["-id"]}):f=y,c.push(a0(f,g))}return c}function a0(g,y){var c,f=y["-name"];if(f){var o=g["bpmndi:BPMNLabel"]["dc:Bounds"],p=0;f.split(`
  102. `).forEach(function(v){p<v.length&&(p=v.length)}),c={value:f,x:Number(o["-x"])+p*10/2,y:Number(o["-y"])+7}}var d;Object.entries(y).forEach(function(v){var E=Ld(v,2),M=E[0],A=E[1];B0.indexOf(M)===-1&&(d||(d={}),d[M]=A)}),d&&(d=Md(d));var O={id:y["-id"],type:Mi.FLOW,pointsList:g["di:waypoint"].map(function(v){return{x:Number(v["-x"]),y:Number(v["-y"])}}),sourceNodeId:y["-sourceRef"],targetNodeId:y["-targetRef"],properties:d};return c&&(O.text=c),O}var Xa=function(){function g(y){var c=this,f=y.lf;this.adapterOut=function(o,p){var d=Jv({},c.processAttributes);pE(d,o,p);var O={"-id":"BPMNPlane_1","-bpmnElement":d["-id"]};dE(O,o);var v=c.definitionAttributes;v["bpmn:process"]=d,v["bpmndi:BPMNDiagram"]={"-id":"BPMNDiagram_1","bpmndi:BPMNPlane":O};var E={"bpmn:definitions":v};return E},this.adapterIn=function(o){if(o)return hE(o)},f.adapterIn=function(o){return c.adapterIn(o)},f.adapterOut=function(o,p){return c.adapterOut(o,p)},this.processAttributes={"-isExecutable":"true","-id":"Process_"+n0()},this.definitionAttributes={"-id":"Definitions_"+n0(),"-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 g.prototype.setCustomShape=function(y,c){g.shapeConfigMap.set(y,c)},g.pluginName="bpmn-adapter",g.shapeConfigMap=new Map,g}();Xa.shapeConfigMap.set(Mi.START,{width:Zb.width,height:Zb.height});Xa.shapeConfigMap.set(Mi.END,{width:Jb.width,height:Jb.height});Xa.shapeConfigMap.set(Mi.GATEWAY,{width:Qb.width,height:Qb.height});Xa.shapeConfigMap.set(Mi.SYSTEM,{width:e0.width,height:e0.height});Xa.shapeConfigMap.set(Mi.USER,{width:t0.width,height:t0.height});(function(g){fE(y,g);function y(c){var f=g.call(this,c)||this;f.adapterXmlIn=function(p){var d=lE(p);return f.adapterIn(d)},f.adapterXmlOut=function(p,d){var O=f.adapterOut(p,d);return cE(O)};var o=c.lf;return o.adapterIn=f.adapterXmlIn,o.adapterOut=f.adapterXmlOut,f}return y.pluginName="bpmnXmlAdapter",y})(Xa);var gE=function(){function g(){globalThis._ids=this,this._ids=new Set}return g.prototype.generateId=function(){var y="xxxxxxx".replace(/[x]/g,function(c){var f=Math.random()*16|0,o=c==="x"?f:f&3|8;return o.toString(16)});return y},g.prototype.next=function(){for(var y=this.generateId();this._ids.has(y);)y=this.generateId();return this._ids.add(y),y},g}(),mE=(globalThis==null?void 0:globalThis._ids)||new gE;function bE(){return mE.next()}ot.h("circle",{cx:18,cy:18,r:11,style:"stroke-linecap: round;stroke-linejoin: round;stroke: rgb(34, 36, 42);stroke-width: 2px;fill: white"}),ot.h("path",{d:"M 18,18 l 2.25,-7.5 m -2.25,7.5 l 5.25,1.5",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 2px;"}),ot.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(0,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),ot.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(30,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),ot.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(60,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),ot.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(90,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),ot.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(120,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),ot.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(150,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),ot.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(180,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),ot.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(210,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),ot.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(240,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),ot.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(270,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),ot.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(300,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"}),ot.h("path",{d:"M 18,18 m 0,7.5 l -0,2.25",transform:"rotate(330,18,18)",style:"fill: none; stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 1px;"});ot.h("circle",{cx:18,cy:18,r:10,style:"stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 4px; fill: rgb(34, 36, 42);"});ot.h("circle",{cx:25,cy:25,r:13,style:"stroke-linecap: round; stroke-linejoin: round; stroke: rgb(34, 36, 42); stroke-width: 2.5px; fill: white;"});var ug,$n,F0,Vu,u0,U0,G0,H0,sg,Qv,eg,tg={},X0=[],_E=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,zd=Array.isArray;function ta(g,y){for(var c in y)g[c]=y[c];return g}function cg(g){g&&g.parentNode&&g.parentNode.removeChild(g)}function of(g,y,c){var f,o,p,d={};for(p in y)p=="key"?f=y[p]:p=="ref"?o=y[p]:d[p]=y[p];if(arguments.length>2&&(d.children=arguments.length>3?ug.call(arguments,2):c),typeof g=="function"&&g.defaultProps!=null)for(p in g.defaultProps)d[p]===void 0&&(d[p]=g.defaultProps[p]);return xd(g,d,f,o,null)}function xd(g,y,c,f,o){var p={type:g,props:y,key:c,ref:f,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:o==null?++F0:o,__i:-1,__u:0};return o==null&&$n.vnode!=null&&$n.vnode(p),p}function lg(g){return g.children}function vc(g,y){this.props=g,this.context=y}function mc(g,y){if(y==null)return g.__?mc(g.__,g.__i+1):null;for(var c;y<g.__k.length;y++)if((c=g.__k[y])!=null&&c.__e!=null)return c.__e;return typeof g.type=="function"?mc(g):null}function Y0(g){var y,c;if((g=g.__)!=null&&g.__c!=null){for(g.__e=g.__c.base=null,y=0;y<g.__k.length;y++)if((c=g.__k[y])!=null&&c.__e!=null){g.__e=g.__c.base=c.__e;break}return Y0(g)}}function s0(g){(!g.__d&&(g.__d=!0)&&Vu.push(g)&&!kd.__r++||u0!==$n.debounceRendering)&&((u0=$n.debounceRendering)||U0)(kd)}function kd(){for(var g,y,c,f,o,p,d,O=1;Vu.length;)Vu.length>O&&Vu.sort(G0),g=Vu.shift(),O=Vu.length,g.__d&&(c=void 0,o=(f=(y=g).__v).__e,p=[],d=[],y.__P&&((c=ta({},f)).__v=f.__v+1,$n.vnode&&$n.vnode(c),K0(y.__P,c,f,y.__n,y.__P.namespaceURI,32&f.__u?[o]:null,p,o==null?mc(f):o,!!(32&f.__u),d),c.__v=f.__v,c.__.__k[c.__i]=c,xE(p,c,d),c.__e!=o&&Y0(c)));kd.__r=0}function W0(g,y,c,f,o,p,d,O,v,E,M){var A,T,k,R,C,F,W=f&&f.__k||X0,V=y.length;for(v=OE(c,y,W,v,V),A=0;A<V;A++)(k=c.__k[A])!=null&&(T=k.__i===-1?tg:W[k.__i]||tg,k.__i=A,F=K0(g,k,T,o,p,d,O,v,E,M),R=k.__e,k.ref&&T.ref!=k.ref&&(T.ref&&fg(T.ref,null,k),M.push(k.ref,k.__c||R,k)),C==null&&R!=null&&(C=R),4&k.__u||T.__k===k.__k?v=V0(k,v,g):typeof k.type=="function"&&F!==void 0?v=F:R&&(v=R.nextSibling),k.__u&=-7);return c.__e=C,v}function OE(g,y,c,f,o){var p,d,O,v,E,M=c.length,A=M,T=0;for(g.__k=new Array(o),p=0;p<o;p++)(d=y[p])!=null&&typeof d!="boolean"&&typeof d!="function"?(v=p+T,(d=g.__k[p]=typeof d=="string"||typeof d=="number"||typeof d=="bigint"||d.constructor==String?xd(null,d,null,null,null):zd(d)?xd(lg,{children:d},null,null,null):d.constructor===void 0&&d.__b>0?xd(d.type,d.props,d.key,d.ref?d.ref:null,d.__v):d).__=g,d.__b=g.__b+1,O=null,(E=d.__i=wE(d,c,v,A))!==-1&&(A--,(O=c[E])&&(O.__u|=2)),O==null||O.__v===null?(E==-1&&(o>M?T--:o<M&&T++),typeof d.type!="function"&&(d.__u|=4)):E!=v&&(E==v-1?T--:E==v+1?T++:(E>v?T--:T++,d.__u|=4))):g.__k[p]=null;if(A)for(p=0;p<M;p++)(O=c[p])!=null&&!(2&O.__u)&&(O.__e==f&&(f=mc(O)),q0(O,O));return f}function V0(g,y,c){var f,o;if(typeof g.type=="function"){for(f=g.__k,o=0;f&&o<f.length;o++)f[o]&&(f[o].__=g,y=V0(f[o],y,c));return y}g.__e!=y&&(y&&g.type&&!c.contains(y)&&(y=mc(g)),c.insertBefore(g.__e,y||null),y=g.__e);do y=y&&y.nextSibling;while(y!=null&&y.nodeType==8);return y}function wE(g,y,c,f){var o,p,d=g.key,O=g.type,v=y[c];if(v===null&&g.key==null||v&&d==v.key&&O===v.type&&!(2&v.__u))return c;if(f>(v!=null&&!(2&v.__u)?1:0))for(o=c-1,p=c+1;o>=0||p<y.length;){if(o>=0){if((v=y[o])&&!(2&v.__u)&&d==v.key&&O===v.type)return o;o--}if(p<y.length){if((v=y[p])&&!(2&v.__u)&&d==v.key&&O===v.type)return p;p++}}return-1}function c0(g,y,c){y[0]=="-"?g.setProperty(y,c==null?"":c):g[y]=c==null?"":typeof c!="number"||_E.test(y)?c:c+"px"}function bd(g,y,c,f,o){var p;e:if(y=="style")if(typeof c=="string")g.style.cssText=c;else{if(typeof f=="string"&&(g.style.cssText=f=""),f)for(y in f)c&&y in c||c0(g.style,y,"");if(c)for(y in c)f&&c[y]===f[y]||c0(g.style,y,c[y])}else if(y[0]=="o"&&y[1]=="n")p=y!=(y=y.replace(H0,"$1")),y=y.toLowerCase()in g||y=="onFocusOut"||y=="onFocusIn"?y.toLowerCase().slice(2):y.slice(2),g.l||(g.l={}),g.l[y+p]=c,c?f?c.t=f.t:(c.t=sg,g.addEventListener(y,p?eg:Qv,p)):g.removeEventListener(y,p?eg:Qv,p);else{if(o=="http://www.w3.org/2000/svg")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!="rowSpan"&&y!="colSpan"&&y!="role"&&y!="popover"&&y in g)try{g[y]=c==null?"":c;break e}catch(d){}typeof c=="function"||(c==null||c===!1&&y[4]!="-"?g.removeAttribute(y):g.setAttribute(y,y=="popover"&&c==1?"":c))}}function l0(g){return function(y){if(this.l){var c=this.l[y.type+g];if(y.u==null)y.u=sg++;else if(y.u<c.t)return;return c($n.event?$n.event(y):y)}}}function K0(g,y,c,f,o,p,d,O,v,E){var M,A,T,k,R,C,F,W,V,te,ie,re,J,Z,Y,z,G,H=y.type;if(y.constructor!==void 0)return null;128&c.__u&&(v=!!(32&c.__u),p=[O=y.__e=c.__e]),(M=$n.__b)&&M(y);e:if(typeof H=="function")try{if(W=y.props,V="prototype"in H&&H.prototype.render,te=(M=H.contextType)&&f[M.__c],ie=M?te?te.props.value:M.__:f,c.__c?F=(A=y.__c=c.__c).__=A.__E:(V?y.__c=A=new H(W,ie):(y.__c=A=new vc(W,ie),A.constructor=H,A.render=SE),te&&te.sub(A),A.props=W,A.state||(A.state={}),A.context=ie,A.__n=f,T=A.__d=!0,A.__h=[],A._sb=[]),V&&A.__s==null&&(A.__s=A.state),V&&H.getDerivedStateFromProps!=null&&(A.__s==A.state&&(A.__s=ta({},A.__s)),ta(A.__s,H.getDerivedStateFromProps(W,A.__s))),k=A.props,R=A.state,A.__v=y,T)V&&H.getDerivedStateFromProps==null&&A.componentWillMount!=null&&A.componentWillMount(),V&&A.componentDidMount!=null&&A.__h.push(A.componentDidMount);else{if(V&&H.getDerivedStateFromProps==null&&W!==k&&A.componentWillReceiveProps!=null&&A.componentWillReceiveProps(W,ie),!A.__e&&(A.shouldComponentUpdate!=null&&A.shouldComponentUpdate(W,A.__s,ie)===!1||y.__v==c.__v)){for(y.__v!=c.__v&&(A.props=W,A.state=A.__s,A.__d=!1),y.__e=c.__e,y.__k=c.__k,y.__k.some(function($){$&&($.__=y)}),re=0;re<A._sb.length;re++)A.__h.push(A._sb[re]);A._sb=[],A.__h.length&&d.push(A);break e}A.componentWillUpdate!=null&&A.componentWillUpdate(W,A.__s,ie),V&&A.componentDidUpdate!=null&&A.__h.push(function(){A.componentDidUpdate(k,R,C)})}if(A.context=ie,A.props=W,A.__P=g,A.__e=!1,J=$n.__r,Z=0,V){for(A.state=A.__s,A.__d=!1,J&&J(y),M=A.render(A.props,A.state,A.context),Y=0;Y<A._sb.length;Y++)A.__h.push(A._sb[Y]);A._sb=[]}else do A.__d=!1,J&&J(y),M=A.render(A.props,A.state,A.context),A.state=A.__s;while(A.__d&&++Z<25);A.state=A.__s,A.getChildContext!=null&&(f=ta(ta({},f),A.getChildContext())),V&&!T&&A.getSnapshotBeforeUpdate!=null&&(C=A.getSnapshotBeforeUpdate(k,R)),z=M,M!=null&&M.type===lg&&M.key==null&&(z=$0(M.props.children)),O=W0(g,zd(z)?z:[z],y,c,f,o,p,d,O,v,E),A.base=y.__e,y.__u&=-161,A.__h.length&&d.push(A),F&&(A.__E=A.__=null)}catch($){if(y.__v=null,v||p!=null)if($.then){for(y.__u|=v?160:128;O&&O.nodeType==8&&O.nextSibling;)O=O.nextSibling;p[p.indexOf(O)]=null,y.__e=O}else for(G=p.length;G--;)cg(p[G]);else y.__e=c.__e,y.__k=c.__k;$n.__e($,y,c)}else p==null&&y.__v==c.__v?(y.__k=c.__k,y.__e=c.__e):O=y.__e=EE(c.__e,y,c,f,o,p,d,v,E);return(M=$n.diffed)&&M(y),128&y.__u?void 0:O}function xE(g,y,c){for(var f=0;f<c.length;f++)fg(c[f],c[++f],c[++f]);$n.__c&&$n.__c(y,g),g.some(function(o){try{g=o.__h,o.__h=[],g.some(function(p){p.call(o)})}catch(p){$n.__e(p,o.__v)}})}function $0(g){return typeof g!="object"||g==null?g:zd(g)?g.map($0):ta({},g)}function EE(g,y,c,f,o,p,d,O,v){var E,M,A,T,k,R,C,F=c.props,W=y.props,V=y.type;if(V=="svg"?o="http://www.w3.org/2000/svg":V=="math"?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),p!=null){for(E=0;E<p.length;E++)if((k=p[E])&&"setAttribute"in k==!!V&&(V?k.localName==V:k.nodeType==3)){g=k,p[E]=null;break}}if(g==null){if(V==null)return document.createTextNode(W);g=document.createElementNS(o,V,W.is&&W),O&&($n.__m&&$n.__m(y,p),O=!1),p=null}if(V===null)F===W||O&&g.data===W||(g.data=W);else{if(p=p&&ug.call(g.childNodes),F=c.props||tg,!O&&p!=null)for(F={},E=0;E<g.attributes.length;E++)F[(k=g.attributes[E]).name]=k.value;for(E in F)if(k=F[E],E!="children"){if(E=="dangerouslySetInnerHTML")A=k;else if(!(E in W)){if(E=="value"&&"defaultValue"in W||E=="checked"&&"defaultChecked"in W)continue;bd(g,E,null,k,o)}}for(E in W)k=W[E],E=="children"?T=k:E=="dangerouslySetInnerHTML"?M=k:E=="value"?R=k:E=="checked"?C=k:O&&typeof k!="function"||F[E]===k||bd(g,E,k,F[E],o);if(M)O||A&&(M.__html===A.__html||M.__html===g.innerHTML)||(g.innerHTML=M.__html),y.__k=[];else if(A&&(g.innerHTML=""),W0(y.type==="template"?g.content:g,zd(T)?T:[T],y,c,f,V=="foreignObject"?"http://www.w3.org/1999/xhtml":o,p,d,p?p[0]:c.__k&&mc(c,0),O,v),p!=null)for(E=p.length;E--;)cg(p[E]);O||(E="value",V=="progress"&&R==null?g.removeAttribute("value"):R!==void 0&&(R!==g[E]||V=="progress"&&!R||V=="option"&&R!==F[E])&&bd(g,E,R,F[E],o),E="checked",C!==void 0&&C!==g[E]&&bd(g,E,C,F[E],o))}return g}function fg(g,y,c){try{if(typeof g=="function"){var f=typeof g.__u=="function";f&&g.__u(),f&&y==null||(g.__u=g(y))}else g.current=y}catch(o){$n.__e(o,c)}}function q0(g,y,c){var f,o;if($n.unmount&&$n.unmount(g),(f=g.ref)&&(f.current&&f.current!==g.__e||fg(f,null,y)),(f=g.__c)!=null){if(f.componentWillUnmount)try{f.componentWillUnmount()}catch(p){$n.__e(p,y)}f.base=f.__P=null}if(f=g.__k)for(o=0;o<f.length;o++)f[o]&&q0(f[o],y,c||typeof g.type!="function");c||cg(g.__e),g.__c=g.__=g.__e=void 0}function SE(g,y,c){return this.constructor(g,c)}ug=X0.slice,$n={__e:function(g,y,c,f){for(var o,p,d;y=y.__;)if((o=y.__c)&&!o.__)try{if((p=o.constructor)&&p.getDerivedStateFromError!=null&&(o.setState(p.getDerivedStateFromError(g)),d=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(g,f||{}),d=o.__d),d)return o.__E=o}catch(O){g=O}throw g}},F0=0,vc.prototype.setState=function(g,y){var c;c=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=ta({},this.state),typeof g=="function"&&(g=g(ta({},c),this.props)),g&&ta(c,g),g!=null&&this.__v&&(y&&this._sb.push(y),s0(this))},vc.prototype.forceUpdate=function(g){this.__v&&(this.__e=!0,g&&this.__h.push(g),s0(this))},vc.prototype.render=lg,Vu=[],U0=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,G0=function(g,y){return g.__v.__b-y.__v.__b},kd.__r=0,H0=/(PointerCapture)$|Capture$/i,sg=0,Qv=l0(!1),eg=l0(!0);var af=function(){return af=Object.assign||function(g){for(var y,c=1,f=arguments.length;c<f;c++){y=arguments[c];for(var o in y)Object.prototype.hasOwnProperty.call(y,o)&&(g[o]=y[o])}return g},af.apply(this,arguments)};function pg(g){var y=g.x,c=g.y,f=g.width,o=g.height,p=g.radius,d=g.className,O=y-f/2,v=c-o/2,E=af(af({width:10,height:10,cx:0,cy:0,rx:p||0,ry:p||0,fill:"transparent",fillOpacity:1,strokeWidth:"1px",stroke:"#000",strokeOpacity:1,className:"lf-basic-shape "+d},g),{x:O,y:v});return ot.h("rect",af({},E))}pg.defaultProps={radius:0,stroke:"",strokeDasharray:"",className:""};var hc;(function(g){g.NODE="node",g.CIRCLE_NODE="circle-node",g.POLYGON_NODE="polygon-node",g.RECT_NODE="rect-node",g.HTML_NODE="html-node",g.TEXT_NODE="text-node",g.ELLIPSE_NODE="ellipse-node",g.DIAMOND_NODE="diamond-node",g.EDGE="edge",g.LINE_EDGE="line-edge",g.POLYLINE_EDGE="polyline-edge",g.BEZIER_EDGE="bezier-edge",g.GRAPH="graph"})(hc||(hc={}));var jE=function(){var g=function(y,c){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,o){f.__proto__=o}||function(f,o){for(var p in o)o.hasOwnProperty(p)&&(f[p]=o[p])},g(y,c)};return function(y,c){g(y,c);function f(){this.constructor=y}y.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}}(),Ku=function(){return Ku=Object.assign||function(g){for(var y,c=1,f=arguments.length;c<f;c++){y=arguments[c];for(var o in y)Object.prototype.hasOwnProperty.call(y,o)&&(g[o]=y[o])}return g},Ku.apply(this,arguments)},PE=function(g,y){var c=typeof Symbol=="function"&&g[Symbol.iterator];if(!c)return g;var f=c.call(g),o,p=[],d;try{for(;(y===void 0||y-- >0)&&!(o=f.next()).done;)p.push(o.value)}catch(O){d={error:O}}finally{try{o&&!o.done&&(c=f.return)&&c.call(f)}finally{if(d)throw d.error}}return p},AE=ot.LogicFlowUtil.StepDrag,ME=function(g){jE(y,g);function y(c){var f=g.call(this)||this;return f.updatePosition=function(o){var p=o.deltaX,d=o.deltaY,O=f.nodeModel,v=O.x,E=O.y;f.nodeModel.x=v+p/2,f.nodeModel.y=E+d/2,f.nodeModel.moveText(p/2,d/2)},f.getResize=function(o){var p=o.index,d=o.deltaX,O=o.deltaY,v=o.width,E=o.height,M=o.PCTResizeInfo,A=o.pct,T=A===void 0?1:A,k=o.freezeWidth,R=k===void 0?!1:k,C=o.freezeHeight,F=C===void 0?!1:C,W={width:v,height:E,deltaX:d,deltaY:O};if(M){var V=4,te=0,ie=0;switch(p){case 0:ie=(d*-1-O)/V;break;case 1:ie=(d-O)/V;break;case 2:ie=(d+O)/V;break;case 3:ie=(d*-1+O)/V;break}ie!==0&&(te=Math.round(ie/M.ResizeBasis.basisHeight*1e5)/1e3),M.ResizePCT.widthPCT=Math.max(Math.min(M.ResizePCT.widthPCT+te,M.ScaleLimit.maxScaleLimit),M.ScaleLimit.minScaleLimit),M.ResizePCT.hightPCT=Math.max(Math.min(M.ResizePCT.hightPCT+te,M.ScaleLimit.maxScaleLimit),M.ScaleLimit.minScaleLimit);var re=Math.round(M.ResizePCT.widthPCT*M.ResizeBasis.basisWidth/100),J=Math.round(M.ResizePCT.hightPCT*M.ResizeBasis.basisHeight/100);switch(p){case 0:d=v-re,O=E-J;break;case 1:d=re-v,O=E-J;break;case 2:d=re-v,O=J-E;break;case 3:d=v-re,O=J-E;break}return W.width=re,W.height=J,W.deltaX=d/T,W.deltaY=O/T,W}switch(p){case 0:W.width=R?v:v-d*T,W.height=F?E:E-O*T;break;case 1:W.width=R?v:v+d*T,W.height=F?E:E-O*T;break;case 2:W.width=R?v:v+d*T,W.height=F?E:E+O*T;break;case 3:W.width=R?v:v-d*T,W.height=F?E:E+O*T;break}return W},f.updateEdgePointByAnchors=function(){var o=f.nodeModel,p=o.id,d=o.anchors,O=f.getNodeEdges(p);O.sourceEdges.forEach(function(v){var E=d.find(function(M){return M.id===v.sourceAnchorId});v.updateStartPoint({x:E.x,y:E.y})}),O.targetEdges.forEach(function(v){var E=d.find(function(M){return M.id===v.targetAnchorId});v.updateEndPoint({x:E.x,y:E.y})})},f.updateRect=function(o){var p=o.deltaX,d=o.deltaY,O=f.nodeModel,v=O.id,E=O.x,M=O.y,A=O.width,T=O.height,k=O.radius,R=O.PCTResizeInfo,C=f.nodeModel,F=C.minWidth,W=C.minHeight,V=C.maxWidth,te=C.maxHeight,ie=f.index,re=F===V,J=W===te,Z=f.getResize({index:ie,deltaX:p,deltaY:d,width:A,height:T,PCTResizeInfo:R,pct:1,freezeWidth:re,freezeHeight:J});if(Z.width<F||Z.width>V||Z.height<W||Z.height>te){f.dragHandler.cancelDrag();return}f.updatePosition({deltaX:re?0:Z.deltaX,deltaY:J?0:Z.deltaY}),f.nodeModel.width=Z.width,f.nodeModel.height=Z.height,f.nodeModel.setProperties({nodeSize:{width:Z.width,height:Z.height}}),f.getNodeEdges(v);var Y={x:E,y:M,width:A,height:T,radius:k},z={x:f.nodeModel.x,y:f.nodeModel.y,width:f.nodeModel.width,height:f.nodeModel.height,radius:k};f.updateEdgePointByAnchors(),f.eventEmit({beforeNode:Y,afterNode:z})},f.updateEllipse=function(o){var p=o.deltaX,d=o.deltaY,O=f.nodeModel,v=O.id,E=O.rx,M=O.ry,A=O.x,T=O.y,k=O.PCTResizeInfo,R=f.index,C=f.nodeModel,F=C.minWidth,W=C.minHeight,V=C.maxWidth,te=C.maxHeight,ie=F===V,re=W===te,J=E,Z=M,Y=f.getResize({index:R,deltaX:p,deltaY:d,width:J,height:Z,PCTResizeInfo:k,pct:1/2,freezeWidth:ie,freezeHeight:re});if(Y.width<F/2||Y.width>V/2||Y.height<W/2||Y.height>te/2){f.dragHandler.cancelDrag();return}f.updatePosition({deltaX:ie?0:Y.deltaX,deltaY:re?0:Y.deltaY}),f.nodeModel.rx=Y.width,f.nodeModel.ry=Y.height,f.nodeModel.setProperties({nodeSize:{rx:Y.width,ry:Y.height}}),f.getNodeEdges(v);var z={x:A,y:T},G={rx:Y.width,ry:Y.height,x:f.nodeModel.x,y:f.nodeModel.y};f.updateEdgePointByAnchors(),f.eventEmit({beforeNode:Ku(Ku({},z),{rx:E,ry:M}),afterNode:G})},f.updateDiamond=function(o){var p=o.deltaX,d=o.deltaY,O=f.nodeModel;O.id;var v=O.rx,E=O.ry,M=O.x,A=O.y,T=O.PCTResizeInfo,k=f.index,R=f.nodeModel,C=R.minWidth,F=R.minHeight,W=R.maxWidth,V=R.maxHeight,te=C===W,ie=F===V,re=v,J=E,Z=f.getResize({index:k,deltaX:p,deltaY:d,width:re,height:J,PCTResizeInfo:T,pct:1/2,freezeWidth:te,freezeHeight:ie});if(Z.width<C/2||Z.width>W/2||Z.height<F/2||Z.height>V/2){f.dragHandler.cancelDrag();return}f.updatePosition({deltaX:te?0:Z.deltaX,deltaY:ie?0:Z.deltaY}),f.nodeModel.rx=Z.width,f.nodeModel.ry=Z.height,f.nodeModel.setProperties({nodeSize:{rx:Z.width,ry:Z.height}});var Y={x:M,y:A,rx:v,ry:E},z={rx:Z.width,ry:Z.height,x:f.nodeModel.x,y:f.nodeModel.y};f.updateEdgePointByAnchors(),f.eventEmit({beforeNode:Y,afterNode:z})},f.eventEmit=function(o){var p=o.beforeNode,d=o.afterNode,O=f.nodeModel,v=O.id,E=O.modelType,M=O.type,A=Ku({id:v,modelType:E,type:M},p),T=Ku({id:v,modelType:E,type:M},d);f.graphModel.eventCenter.emit("node:resize",{oldNodeSize:A,newNodeSize:T})},f.onDragging=function(o){var p,d=o.deltaX,O=o.deltaY,v=f.graphModel.transformModel,E=f.nodeModel.modelType;p=PE(v.fixDeltaXY(d,O),2),d=p[0],O=p[1],E===hc.RECT_NODE||E===hc.HTML_NODE?f.updateRect({deltaX:d,deltaY:O}):E===hc.ELLIPSE_NODE?f.updateEllipse({deltaX:d,deltaY:O}):E===hc.DIAMOND_NODE&&f.updateDiamond({deltaX:d,deltaY:O})},f.onDragEnd=function(){var o=f.graphModel.gridSize,p=o===void 0?1:o,d=p*Math.round(f.nodeModel.x/p),O=p*Math.round(f.nodeModel.y/p);f.nodeModel.moveTo(d,O),f.updateEdgePointByAnchors()},f.index=c.index,f.nodeModel=c.model,f.graphModel=c.graphModel,f.state={},f.dragHandler=new AE({onDragging:f.onDragging,onDragEnd:f.onDragEnd,step:1}),f}return y.prototype.getNodeEdges=function(c){for(var f=this.graphModel,o=f.edges,p=[],d=[],O=0;O<o.length;O++){var v=o[O];v.sourceNodeId===c?p.push(v):o[O].targetNodeId===c&&d.push(v)}return{sourceEdges:p,targetEdges:d}},y.prototype.render=function(){var c=this.props,f=c.x,o=c.y,p=c.index,d=c.model,O=d.getControlPointStyle();return of("g",{className:"lf-resize-control-"+p},of(pg,Ku({className:"lf-node-control"},{x:f,y:o},O,{onMouseDown:this.dragHandler.handleMouseDown})))},y}(vc),kE=function(){var g=function(y,c){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,o){f.__proto__=o}||function(f,o){for(var p in o)o.hasOwnProperty(p)&&(f[p]=o[p])},g(y,c)};return function(y,c){g(y,c);function f(){this.constructor=y}y.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}}(),Td=function(){return Td=Object.assign||function(g){for(var y,c=1,f=arguments.length;c<f;c++){y=arguments[c];for(var o in y)Object.prototype.hasOwnProperty.call(y,o)&&(g[o]=y[o])}return g},Td.apply(this,arguments)},Bd=function(g){kE(y,g);function y(){var c=g.call(this)||this;return c.state={},c}return y.prototype.getResizeControl=function(){var c=this.props,f=c.model,o=c.graphModel,p=f.x,d=f.y,O=f.width,v=f.height,E={minX:p-O/2,minY:d-v/2,maxX:p+O/2,maxY:d+v/2},M=E.minX,A=E.minY,T=E.maxX,k=E.maxY,R=[{x:M,y:A},{x:T,y:A},{x:T,y:k},{x:M,y:k}];return R.map(function(C,F){return of(ME,Td({index:F},C,{model:f,graphModel:o}))})},y.prototype.getGroupSolid=function(){var c=this.props.model,f=c.x,o=c.y,p=c.width,d=c.height,O=c.getResizeOutlineStyle();return of(pg,Td({fill:"none"},O,{x:f,y:o,width:p,height:d}))},y.prototype.render=function(){return of("g",{className:"lf-resize-control"},this.getGroupSolid(),this.getResizeControl())},y}(vc),Z0=function(){var g=function(y,c){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,o){f.__proto__=o}||function(f,o){for(var p in o)o.hasOwnProperty(p)&&(f[p]=o[p])},g(y,c)};return function(y,c){g(y,c);function f(){this.constructor=y}y.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}}(),TE=function(g){Z0(y,g);function y(c,f){var o=g.call(this,c,f)||this,p=o.properties.nodeSize;return p&&(o.width=p.width,o.height=p.height),o}return y.prototype.initNodeData=function(c){g.prototype.initNodeData.call(this,c),this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3},y.prototype.getOutlineStyle=function(){var c=g.prototype.getOutlineStyle.call(this),f=this.graphModel.editConfigModel.isSilentMode;return f||(c.stroke="none",c.hover&&(c.hover.stroke="none")),c},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(c,f){},y.prototype.enableProportionResize=function(c){if(c===void 0&&(c=!0),c){var f={widthPCT:100,hightPCT:100},o={basisWidth:this.width,basisHeight:this.height},p={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:f,ResizeBasis:o,ScaleLimit:p}}else delete this.PCTResizeInfo},y}(ot.RectNodeModel),DE=function(g){Z0(y,g);function y(){return g!==null&&g.apply(this,arguments)||this}return y.prototype.getControlGroup=function(){var c=this.props,f=c.model,o=c.graphModel;return ot.h(Bd,{model:f,graphModel:o})},y.prototype.getResizeShape=function(){return g.prototype.getShape.call(this)},y.prototype.getShape=function(){var c=this.props,f=c.model.isSelected,o=c.graphModel.editConfigModel.isSilentMode;return ot.h("g",null,this.getResizeShape(),f&&!o?this.getControlGroup():"")},y}(ot.RectNode),J0={view:DE,model:TE},Q0=function(){var g=function(y,c){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,o){f.__proto__=o}||function(f,o){for(var p in o)o.hasOwnProperty(p)&&(f[p]=o[p])},g(y,c)};return function(y,c){g(y,c);function f(){this.constructor=y}y.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}}();(function(g){Q0(y,g);function y(c,f){var o=g.call(this,c,f)||this,p=o.properties.nodeSize;return p&&(o.rx=p.rx,o.ry=p.ry),o}return y.prototype.initNodeData=function(c){g.prototype.initNodeData.call(this,c),this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3},y.prototype.getOutlineStyle=function(){var c=g.prototype.getOutlineStyle.call(this),f=this.graphModel.editConfigModel.isSilentMode;return f||(c.stroke="none",c.hover&&(c.hover.stroke="none")),c},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(c){if(c===void 0&&(c=!0),c){var f={widthPCT:100,hightPCT:100},o={basisWidth:this.rx,basisHeight:this.ry},p={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:f,ResizeBasis:o,ScaleLimit:p}}else delete this.PCTResizeInfo},y})(ot.EllipseNodeModel);(function(g){Q0(y,g);function y(){return g!==null&&g.apply(this,arguments)||this}return y.prototype.getControlGroup=function(){var c=this.props,f=c.model,o=c.graphModel;return ot.h(Bd,{model:f,graphModel:o})},y.prototype.getResizeShape=function(){return g.prototype.getShape.call(this)},y.prototype.getShape=function(){var c=this.props,f=c.model,o=c.graphModel.editConfigModel.isSilentMode;return ot.h("g",null,this.getResizeShape(),f.isSelected&&!o?this.getControlGroup():"")},y})(ot.EllipseNode);var ng=function(){return ng=Object.assign||function(g){for(var y,c=1,f=arguments.length;c<f;c++){y=arguments[c];for(var o in y)Object.prototype.hasOwnProperty.call(y,o)&&(g[o]=y[o])}return g},ng.apply(this,arguments)};function NE(g){var y=g.fillOpacity,c=y===void 0?1:y,f=g.strokeWidth,o=f===void 0?1:f,p=g.strokeOpacity,d=p===void 0?1:p,O=g.fill,v=O===void 0?"transparent":O,E=g.stroke,M=E===void 0?"#000":E,A=g.points,T=g.className,k=T===void 0?"lf-basic-shape":T,R={fill:v,fillOpacity:c,strokeWidth:o,stroke:M,strokeOpacity:d,points:"",className:k};return R.points=A.map(function(C){return C.join(",")}).join(" "),ot.h("polygon",ng({},R))}var e_=function(){var g=function(y,c){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,o){f.__proto__=o}||function(f,o){for(var p in o)o.hasOwnProperty(p)&&(f[p]=o[p])},g(y,c)};return function(y,c){g(y,c);function f(){this.constructor=y}y.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}}(),rg=function(){return rg=Object.assign||function(g){for(var y,c=1,f=arguments.length;c<f;c++){y=arguments[c];for(var o in y)Object.prototype.hasOwnProperty.call(y,o)&&(g[o]=y[o])}return g},rg.apply(this,arguments)};(function(g){e_(y,g);function y(c,f){var o=g.call(this,c,f)||this,p=o.properties.nodeSize;return p&&(o.rx=p.rx,o.ry=p.ry),o}return y.prototype.initNodeData=function(c){g.prototype.initNodeData.call(this,c),this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3,this.gridSize=1},y.prototype.getOutlineStyle=function(){var c=g.prototype.getOutlineStyle.call(this),f=this.graphModel.editConfigModel.isSilentMode;return f||(c.stroke="none",c.hover&&(c.hover.stroke="none")),c},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(c){if(c===void 0&&(c=!0),c){var f={widthPCT:100,hightPCT:100},o={basisWidth:this.rx,basisHeight:this.ry},p={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:f,ResizeBasis:o,ScaleLimit:p}}else delete this.PCTResizeInfo},y})(ot.DiamondNodeModel);(function(g){e_(y,g);function y(){return g!==null&&g.apply(this,arguments)||this}return y.prototype.getControlGroup=function(){var c=this.props,f=c.model,o=c.graphModel;return ot.h(Bd,{model:f,graphModel:o})},y.prototype.getResizeShape=function(){var c=this.props.model,f=c.points,o=c.getNodeStyle();return ot.h("g",null,ot.h(NE,rg({},o,{points:f})))},y.prototype.getShape=function(){var c=this.props,f=c.model.isSelected,o=c.graphModel.editConfigModel.isSilentMode;return ot.h("g",null,this.getResizeShape(),f&&!o?this.getControlGroup():"")},y})(ot.DiamondNode);var t_=function(){var g=function(y,c){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,o){f.__proto__=o}||function(f,o){for(var p in o)o.hasOwnProperty(p)&&(f[p]=o[p])},g(y,c)};return function(y,c){g(y,c);function f(){this.constructor=y}y.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}}();(function(g){t_(y,g);function y(c,f){var o=g.call(this,c,f)||this,p=o.properties.nodeSize;return p&&(o.width=p.width,o.height=p.height),o}return y.prototype.initNodeData=function(c){g.prototype.initNodeData.call(this,c),this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3},y.prototype.getOutlineStyle=function(){var c=g.prototype.getOutlineStyle.call(this),f=this.graphModel.editConfigModel.isSilentMode;return f||(c.stroke="none",c.hover&&(c.hover.stroke="none")),c},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(c){if(c===void 0&&(c=!0),c){var f={widthPCT:100,hightPCT:100},o={basisWidth:this.width,basisHeight:this.height},p={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:f,ResizeBasis:o,ScaleLimit:p}}else delete this.PCTResizeInfo},y})(ot.HtmlNodeModel);(function(g){t_(y,g);function y(){return g!==null&&g.apply(this,arguments)||this}return y.prototype.getControlGroup=function(){var c=this.props,f=c.model,o=c.graphModel;return ot.h(Bd,{model:f,graphModel:o})},y.prototype.getResizeShape=function(){return g.prototype.getShape.call(this)},y.prototype.getShape=function(){var c=this.props,f=c.model.isSelected,o=c.graphModel.editConfigModel.isSilentMode;return ot.h("g",null,this.getResizeShape(),f&&!o?this.getControlGroup():"")},y})(ot.HtmlNode);var n_=function(){var g=function(y,c){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,o){f.__proto__=o}||function(f,o){for(var p in o)o.hasOwnProperty(p)&&(f[p]=o[p])},g(y,c)};return function(y,c){g(y,c);function f(){this.constructor=y}y.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}}(),Dd=function(){return Dd=Object.assign||function(g){for(var y,c=1,f=arguments.length;c<f;c++){y=arguments[c];for(var o in y)Object.prototype.hasOwnProperty.call(y,o)&&(g[o]=y[o])}return g},Dd.apply(this,arguments)},CE=function(g,y){var c=typeof Symbol=="function"&&g[Symbol.iterator];if(!c)return g;var f=c.call(g),o,p=[],d;try{for(;(y===void 0||y-- >0)&&!(o=f.next()).done;)p.push(o.value)}catch(O){d={error:O}}finally{try{o&&!o.done&&(c=f.return)&&c.call(f)}finally{if(d)throw d.error}}return p},RE=function(){for(var g=[],y=0;y<arguments.length;y++)g=g.concat(CE(arguments[y]));return g},f0=500,p0=300,IE=-1e4;(function(g){n_(y,g);function y(){var c=g!==null&&g.apply(this,arguments)||this;return c.isGroup=!0,c.unfoldedWidth=f0,c.unfoldedHight=p0,c.childrenLastFoldStatus={},c}return y.prototype.initNodeData=function(c){var f=this;g.prototype.initNodeData.call(this,c);var o=[];Array.isArray(c.children)&&(o=c.children),this.children=new Set(o),this.width=f0,this.height=p0,this.foldedWidth=80,this.foldedHeight=60,this.zIndex=IE,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(){f.isFolded&&f.foldGroup(f.isFolded)})},y.prototype.getResizeOutlineStyle=function(){var c=g.prototype.getResizeOutlineStyle.call(this);return c.stroke="none",c},y.prototype.foldGroup=function(c){var f=this;if(c!==this.isFolded){this.setProperty("isFolded",c),this.isFolded=c,c?(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(p){var d=f.graphModel.getElement(p),O=d.isFolded;if(d.isGroup&&!d.isFolded&&d.foldGroup(c),d.isGroup&&!c){var v=f.childrenLastFoldStatus[p];v!==void 0&&v!==d.isFolded&&d.foldGroup(v)}f.childrenLastFoldStatus[p]=O,d.visible=!c,o=o.concat(d.incoming.edges.concat(d.outgoing.edges))}),this.foldEdge(c,o)}},y.prototype.getAnchorStyle=function(c){var f=g.prototype.getAnchorStyle.call(this,c);return f.stroke="transparent",f.fill="transparent",f.hover.fill="transparent",f.hover.stroke="transparent",f},y.prototype.foldEdge=function(c,f){var o=this;f.forEach(function(p,d){var O=p.id,v=p.sourceNodeId,E=p.targetNodeId,M=p.startPoint,A=p.endPoint,T=p.type,k=p.text,R=p.getProperties(),C={id:O+"__"+d,sourceNodeId:v,targetNodeId:E,startPoint:M,endPoint:A,type:T,properties:R,text:k==null?void 0:k.value};p.virtual&&o.graphModel.deleteEdgeById(p.id);var F=o.graphModel.group.getNodeGroup(E);F||(F=o.graphModel.getNodeModelById(E));var W=o.graphModel.group.getNodeGroup(v);W||(W=o.graphModel.getNodeModelById(v)),c&&p.visible!==!1&&(o.children.has(v)||o.id===v?(C.startPoint=void 0,C.sourceNodeId=o.id):(C.endPoint=void 0,C.targetNodeId=o.id),(F.id!==o.id||W.id!==o.id)&&o.createVirtualEdge(C),p.visible=!1),!c&&p.visible===!1&&(F&&F.isGroup&&F.isFolded?(C.targetNodeId=F.id,C.endPoint=void 0,o.createVirtualEdge(C)):W&&W.isGroup&&W.isFolded?(C.sourceNodeId=W.id,C.startPoint=void 0,o.createVirtualEdge(C)):p.visible=!0)})},y.prototype.createVirtualEdge=function(c){c.pointsList=void 0;var f=this.graphModel.addEdge(c);f.virtual=!0,f.text.editable=!1,f.isFoldedEdge=!0},y.prototype.isInRange=function(c){var f=c.x1,o=c.y1,p=c.x2,d=c.y2;return f>=this.x-this.width/2&&p<=this.x+this.width/2&&o>=this.y-this.height/2&&d<=this.y+this.height/2},y.prototype.isAllowMoveTo=function(c){var f=c.x1,o=c.y1,p=c.x2,d=c.y2;return{x:f>=this.x-this.width/2&&p<=this.x+this.width/2,y:o>=this.y-this.height/2&&d<=this.y+this.height/2}},y.prototype.setAllowAppendChild=function(c){this.setProperty("groupAddable",c)},y.prototype.addChild=function(c){this.children.add(c),this.graphModel.eventCenter.emit("group:add-node",{data:this.getData()})},y.prototype.removeChild=function(c){this.children.delete(c),this.graphModel.eventCenter.emit("group:remove-node",{data:this.getData()})},y.prototype.getAddableOutlineStyle=function(){return{stroke:"#FEB663",strokeWidth:2,strokeDasharray:"4 4",fill:"transparent"}},y.prototype.getData=function(){var c=this,f=g.prototype.getData.call(this);f.children=[],this.children.forEach(function(p){var d=c.graphModel.getNodeModelById(p);d&&!d.virtual&&f.children.push(p)});var o=f.properties;return delete o.groupAddable,delete o.isFolded,f},y.prototype.getHistoryData=function(){var c=g.prototype.getData.call(this);c.children=RE(this.children),c.isGroup=!0;var f=c.properties;return delete f.groupAddable,f.isFolded&&(c.x=c.x+this.unfoldedWidth/2-this.foldedWidth/2,c.y=c.y+this.unfoldedHight/2-this.foldedHeight/2),c},y.prototype.isAllowAppendIn=function(c){return!0},y.prototype.toBack=function(){this.zIndex--},y})(J0.model);(function(g){n_(y,g);function y(){return g!==null&&g.apply(this,arguments)||this}return y.prototype.getControlGroup=function(){var c=this.props.model,f=c.resizable,o=c.properties;return f&&!o.isFolded?g.prototype.getControlGroup.call(this):null},y.prototype.getAddableShape=function(){var c=this.props.model,f=c.width,o=c.height,p=c.x,d=c.y,O=c.radius,v=c.properties;if(!v.groupAddable)return null;var E=this.props.model.getNodeStyle().strokeWidth,M=this.props.model.getAddableOutlineStyle(),A=f+E+8,T=o+E+8;return ot.h("rect",Dd(Dd({},M),{width:A,height:T,x:p-A/2,y:d-T/2,rx:O,ry:O}))},y.prototype.getFoldIcon=function(){var c=this.props.model,f=c.x-c.width/2+5,o=c.y-c.height/2+5;if(!c.foldable)return null;var p=ot.h("path",{fill:"none",stroke:"#818281",strokeWidth:2,"pointer-events":"none",d:c.properties.isFolded?"M "+(f+3)+","+(o+6)+" "+(f+11)+","+(o+6)+" M"+(f+7)+","+(o+2)+" "+(f+7)+","+(o+10):"M "+(f+3)+","+(o+6)+" "+(f+11)+","+(o+6)+" "});return ot.h("g",{},[ot.h("rect",{height:12,width:14,rx:2,ry:2,strokeWidth:1,fill:"#F4F5F6",stroke:"#CECECE",cursor:"pointer",x:c.x-c.width/2+5,y:c.y-c.height/2+5,onClick:function(){c.foldGroup(!c.properties.isFolded)}}),p])},y.prototype.getResizeShape=function(){return ot.h("g",{},[this.getAddableShape(),g.prototype.getResizeShape.call(this),this.getFoldIcon()])},y})(J0.view);var d0=function(){var g=function(y,c){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,o){f.__proto__=o}||function(f,o){for(var p in o)o.hasOwnProperty(p)&&(f[p]=o[p])},g(y,c)};return function(y,c){g(y,c);function f(){this.constructor=y}y.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}}(),uf=function(){return uf=Object.assign||function(g){for(var y,c=1,f=arguments.length;c<f;c++){y=arguments[c];for(var o in y)Object.prototype.hasOwnProperty.call(y,o)&&(g[o]=y[o])}return g},uf.apply(this,arguments)};function LE(g){var y=function(f){d0(o,f);function o(p,d){var O=this;p.id||(p.id="Flow_"+bE());var v=uf(uf(uf({},{}),p.properties),{isDefaultFlow:!1});return p.properties=v,O=f.call(this,p,d)||this,O}return o.extendKey="SequenceFlowModel",o}(ot.PolylineEdgeModel),c=function(f){d0(o,f);function o(){return f!==null&&f.apply(this,arguments)||this}return o.prototype.getStartArrow=function(){var p=this.props.model,d=p.properties.isDefaultFlow;return d?ot.h("path",{refX:15,stroke:"#000000",strokeWidth:2,d:"M 20 5 10 -5 z"}):ot.h("path",{d:""})},o.extendKey="SequenceFlowEdge",o}(ot.PolylineEdge);return{type:"bpmn:sequenceFlow",view:c,model:y}}LE();var h0={width:40,height:40},y0={width:40,height:40},v0={width:100,height:80},Nd={width:100,height:80},g0={width:100,height:80},m0={width:100,height:80},b0={width:100,height:80},_0={width:100,height:80},O0={width:100,height:80},w0={width:100,height:80},Kr=function(){};Kr.ObjTree=function(){return this};Kr.ObjTree.VERSION="0.23";Kr.ObjTree.prototype.xmlDecl=`<?xml version="1.0" encoding="UTF-8" ?>
  103. `;Kr.ObjTree.prototype.attr_prefix="-";Kr.ObjTree.prototype.parseXML=function(g){var y;if(window.DOMParser){var c=new DOMParser,f=c.parseFromString(g,"application/xml");if(!f)return;y=f.documentElement}else window.ActiveXObject&&(c=new ActiveXObject("Microsoft.XMLDOM"),c.async=!1,c.loadXML(g),y=c.documentElement);if(y){var o=this.parseDOM(y);return o}};Kr.ObjTree.prototype.parseHTTP=function(g,y,c){var f={};for(var o in y)f[o]=y[o];if(f.method||(typeof f.postBody=="undefined"&&typeof f.postbody=="undefined"&&typeof f.parameters=="undefined"?f.method="get":f.method="post"),c){f.asynchronous=!0;var p=this,d=c,O=f.onComplete;f.onComplete=function(M){var A;M&&M.responseXML&&M.responseXML.documentElement&&(A=p.parseDOM(M.responseXML.documentElement)),d(A,M),O&&O(M)}}else f.asynchronous=!1;var v;if(typeof HTTP!="undefined"&&HTTP.Request){f.uri=g;var E=new HTTP.Request(f);E&&(v=E.transport)}else if(typeof Ajax!="undefined"&&Ajax.Request){var E=new Ajax.Request(g,f);E&&(v=E.transport)}if(c)return v;if(v&&v.responseXML&&v.responseXML.documentElement)return this.parseDOM(v.responseXML.documentElement)};Kr.ObjTree.prototype.parseDOM=function(g){if(g){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 c=this.parseElement(g);if(this.__force_array[g.nodeName]&&(c=[c]),g.nodeType!==11){var f={};f[g.nodeName]=c,c=f}return c}};Kr.ObjTree.prototype.parseElement=function(g){if(g.nodeType!==7){if(g.nodeType===3||g.nodeType===4||g.nodeType===8){var y=g.nodeValue.match(/[^\x00-\x20]/);return y==null?void 0:g.nodeValue}var c=null,f={};if(g.attributes&&g.attributes.length){c={};for(var o=0;o<g.attributes.length;o++){var p=g.attributes[o].nodeName;if(typeof p=="string"){var d=g.attributes[o].nodeValue;try{d=JSON.parse(g.attributes[o].nodeValue.replace(/'/g,'"'))}catch(E){d=g.attributes[o].nodeValue}d!=null&&(p=this.attr_prefix+p,typeof f[p]=="undefined"&&(f[p]=0),f[p]++,this.addNode(c,p,f[p],d))}}}if(g.childNodes&&g.childNodes.length){var O=!0;c&&(O=!1);for(var o=0;o<g.childNodes.length&&O;o++){var v=g.childNodes[o].nodeType;v===3||v===4||v===8||(O=!1)}if(O){c||(c="");for(var o=0;o<g.childNodes.length;o++)c+=g.childNodes[o].nodeValue}else{c||(c={});for(var o=0;o<g.childNodes.length;o++){var p=g.childNodes[o].nodeName;if(typeof p=="string"){var d=this.parseElement(g.childNodes[o]);d&&(typeof f[p]=="undefined"&&(f[p]=0),f[p]++,this.addNode(c,p,f[p],d))}}}}else c===null&&(c={});return c}};Kr.ObjTree.prototype.addNode=function(g,y,c,f){this.__force_array[y]?(c===1&&(g[y]=[]),g[y][g[y].length]=f):c===1?g[y]=f:c===2?g[y]=[g[y],f]:g[y][g[y].length]=f};Kr.ObjTree.prototype.writeXML=function(g){var y=this.hash_to_xml(null,g);return this.xmlDecl+y};Kr.ObjTree.prototype.hash_to_xml=function(g,y){var c=[],f=[];for(var o in y)if(y!=null&&y.hasOwnProperty(o)){var p=y[o];o.charAt(0)!==this.attr_prefix?typeof p=="undefined"||p==null?c[c.length]="<"+o+" />":typeof p=="object"&&p.constructor===Array?c[c.length]=this.array_to_xml(o,p):typeof p=="object"?c[c.length]=this.hash_to_xml(o,p):c[c.length]=this.scalar_to_xml(o,p):f[f.length]=" "+o.substring(1)+'="'+this.xml_escape(p)+'"'}var d=f.join(""),O=c.join("");return typeof g=="undefined"||g==null||(c.length>0?O.match(/\n/)?O="<"+g+d+`>
  104. `+O+"</"+g+`>
  105. `:O="<"+g+d+">"+O+"</"+g+`>
  106. `:O="<"+g+d+` />
  107. `),O};Kr.ObjTree.prototype.array_to_xml=function(g,y){for(var c=[],f=0;f<y.length;f++){var o=y[f];typeof o=="undefined"||o==null?c[c.length]="<"+g+" />":typeof o=="object"&&o.constructor===Array?c[c.length]=this.array_to_xml(g,o):typeof o=="object"?c[c.length]=this.hash_to_xml(g,o):c[c.length]=this.scalar_to_xml(g,o)}return c.join("")};Kr.ObjTree.prototype.scalar_to_xml=function(g,y){return g==="#text"?this.xml_escape(y):"<"+g+">"+this.xml_escape(y)+"</"+g+`>
  108. `};Kr.ObjTree.prototype.xml_escape=function(g){return g.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"')};var zE=function(g){return new Kr.ObjTree().parseXML(g)};function r_(g){return Object.prototype.toString.call(g)}function x0(g){return" ".repeat(g)}function Cd(g){return r_(g)==="[object Object]"?Object.keys(g).reduce(function(y,c){var f=c;return c.charAt(0)==="-"&&(f=c.substring(1)),y[f]=Cd(g[c]),y},{}):Array.isArray(g)?g.map(function(y){return Cd(y)}):g}function BE(g){var y=g;try{typeof y!="string"&&(y=JSON.parse(g))}catch(c){y=JSON.stringify(Cd(g)).replace(/"/g,"'")}return y}var E0=`
  109. `;function Ed(g,y,c){var f=x0(c),o="",p=E0+f;if(y==="-json")return"";if(y==="#text")return p+g;if(y==="#cdata-section")return p+"<![CDATA["+g+"]]>";if(y==="#comment")return p+"<!--"+g+"-->";if((""+y).charAt(0)==="-")return" "+y.substring(1)+'="'+BE(g)+'"';if(Array.isArray(g))o+=g.map(function(E){return Ed(E,y,c+1)}).join("");else if(r_(g)==="[object Object]"){var d=Object.keys(g),O="",v=g["-json"]?E0+x0(c+1)+g["-json"]:"";o+=(c===0?"":p)+"<"+y,d.forEach(function(E){E.charAt(0)==="-"?O+=Ed(g[E],E,c+1):v+=Ed(g[E],E,c+1)}),o+=O+(v!==""?">"+v+p+"</"+y+">":" />")}else o+=p+"<"+y+">"+g.toString()+"</"+y+">";return o}function FE(g){var y="";for(var c in g)y+=Ed(g[c],c,0);return y}var UE=function(){var g=function(y,c){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,o){f.__proto__=o}||function(f,o){for(var p in o)o.hasOwnProperty(p)&&(f[p]=o[p])},g(y,c)};return function(y,c){g(y,c);function f(){this.constructor=y}y.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}}(),og=function(){return og=Object.assign||function(g){for(var y,c=1,f=arguments.length;c<f;c++){y=arguments[c];for(var o in y)Object.prototype.hasOwnProperty.call(y,o)&&(g[o]=y[o])}return g},og.apply(this,arguments)},S0=function(g,y){var c={};for(var f in g)Object.prototype.hasOwnProperty.call(g,f)&&y.indexOf(f)<0&&(c[f]=g[f]);if(g!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,f=Object.getOwnPropertySymbols(g);o<f.length;o++)y.indexOf(f[o])<0&&Object.prototype.propertyIsEnumerable.call(g,f[o])&&(c[f[o]]=g[f[o]]);return c},dg=function(g){var y=typeof Symbol=="function"&&Symbol.iterator,c=y&&g[y],f=0;if(c)return c.call(g);if(g&&typeof g.length=="number")return{next:function(){return g&&f>=g.length&&(g=void 0),{value:g&&g[f++],done:!g}}};throw new TypeError(y?"Object is not iterable.":"Symbol.iterator is not defined.")},_c=function(g,y){var c=typeof Symbol=="function"&&g[Symbol.iterator];if(!c)return g;var f=c.call(g),o,p=[],d;try{for(;(y===void 0||y-- >0)&&!(o=f.next()).done;)p.push(o.value)}catch(O){d={error:O}}finally{try{o&&!o.done&&(c=f.return)&&c.call(f)}finally{if(d)throw d.error}}return p},gc=function(){for(var g=[],y=0;y<arguments.length;y++)g=g.concat(_c(arguments[y]));return g},Wr;(function(g){g.START="bpmn:startEvent",g.END="bpmn:endEvent",g.INTERMEDIATE_CATCH="bpmn:intermediateCatchEvent",g.INTERMEDIATE_THROW="bpmn:intermediateThrowEvent",g.BOUNDARY="bpmn:boundaryEvent",g.PARALLEL_GATEWAY="bpmn:parallelGateway",g.INCLUSIVE_GATEWAY="bpmn:inclusiveGateway",g.EXCLUSIVE_GATEWAY="bpmn:exclusiveGateway",g.USER="bpmn:userTask",g.SYSTEM="bpmn:serviceTask",g.FLOW="bpmn:sequenceFlow",g.SUBPROCESS="bpmn:subProcess"})(Wr||(Wr={}));var o_=["-name","-id","bpmn:incoming","bpmn:outgoing","-sourceRef","-targetRef","-children"],GE=["properties","startPoint","endPoint","pointsList"],Rd={in:[],out:["properties.panels","properties.nodeSize","properties.definitionId","properties.timerValue","properties.timerType","properties.definitionType","properties.parent","properties.isBoundaryEventTouchingTask"]},i_=function(g,y){var c=Object.keys(y||{});return c.forEach(function(f){if(g[f]){var o=y[f],p=o.in,d=o.out;p&&(g[f].in=p),d&&(g[f].out=d)}else g[f]=y[f]}),g},zo={"bpmn:startEvent":{out:function(g){var y,c,f=g.properties;return((c=(y=zo[f.definitionType])===null||y===void 0?void 0:y.out)===null||c===void 0?void 0:c.call(y,g))||{}}},"bpmn:intermediateCatchEvent":{out:function(g){var y,c,f=g.properties;return((c=(y=zo[f.definitionType])===null||y===void 0?void 0:y.out)===null||c===void 0?void 0:c.call(y,g))||{}}},"bpmn:intermediateThrowEvent":{out:function(g){var y,c,f=g.properties;return((c=(y=zo[f.definitionType])===null||y===void 0?void 0:y.out)===null||c===void 0?void 0:c.call(y,g))||{}}},"bpmn:boundaryEvent":{out:function(g){var y,c,f=g.properties;return((c=(y=zo[f.definitionType])===null||y===void 0?void 0:y.out)===null||c===void 0?void 0:c.call(y,g))||{}}},"bpmn:sequenceFlow":{out:function(g){var y=g.properties,c=y.expressionType,f=y.condition;return f?c==="cdata"?{json:'<bpmn:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[${'+f+"}]]></bpmn:conditionExpression>"}:{json:'<bpmn:conditionExpression xsi:type="bpmn2:tFormalExpression">'+f+"</bpmn:conditionExpression>"}:{json:""}}},"bpmn:timerEventDefinition":{out:function(g){var y=g.properties,c=y.timerType,f=y.timerValue,o=y.definitionId,p=function(){return"<bpmn:"+c+' xsi:type="bpmn:tFormalExpression">'+f+"</bpmn:"+c+">"};return{json:'<bpmn:timerEventDefinition id="'+o+'"'+(c&&f?">"+p()+"</bpmn:timerEventDefinition>":"/>")}},in:function(g,y){var c,f,o,p,d=g,O=y["-id"],v="",E="";try{for(var M=dg(Object.keys(y)),A=M.next();!A.done;A=M.next()){var T=A.value;T.includes("bpmn:")&&(o=_c(T.split(":"),2),v=o[1],E=(p=y[T])===null||p===void 0?void 0:p["#text"])}}catch(k){c={error:k}}finally{try{A&&!A.done&&(f=M.return)&&f.call(M)}finally{if(c)throw c.error}}return{"-definitionId":O,"-definitionType":d,"-timerType":v,"-timerValue":E}}},"bpmn:conditionExpression":{in:function(g,y){var c,f="",o="";return y["#cdata-section"]?(o="cdata",f=((c=/^\$\{(.*)\}$/g.exec(y["#cdata-section"]))===null||c===void 0?void 0:c[1])||""):y["#text"]&&(o="normal",f=y["#text"]),{"-condition":f,"-expressionType":o}}}};function HE(g){var y=g!=null?g:{},c=y.retainedAttrsFields,f=y.excludeFields,o=y.transformer,p=new Set(gc(GE,c||[])),d={in:new Set(gc(Rd.in,(f==null?void 0:f.in)||[])),out:new Set(gc(Rd.out,(f==null?void 0:f.out)||[]))};return zo=i_(zo,o),function(O){var v=O.nodes,E=O.edges;function M(A,T){var k,R,C;if((A==null?void 0:A.flag)!==1){var F;if((F=zo[A.type])&&F.out){var W=F.out(A),V=Object.keys(W);V.length>0&&V.forEach(function(G){A[G]=W[G]})}A!=null&&A.children&&(A.children=A.children.map(function(G){var H=v.find(function($){return $.id===G})||E.find(function($){return $.id===G});return H||{}}));var te={};if(typeof A=="string")return A;if(Array.isArray(A))return A.map(function(G){return M(G,"")}).filter(function(G){return G!=null});try{for(var ie=dg(Object.entries(A)),re=ie.next();!re.done;re=ie.next()){var J=_c(re.value,2),Z=J[0],Y=J[1];if(((C=Y)===null||C===void 0?void 0:C.flag)===1)return;var z=[T,Z].filter(function(G){return G}).join(".");d.out.has(z)||(typeof Y!="object"?Z.indexOf("-")===0||["#text","#cdata-section","#comment"].includes(Z)?te[Z]=Y:te["-"+Z]=Y:p.has(z)?te["-"+Z]=M(Y,z):te[Z]=M(Y,z))}}catch(G){k={error:G}}finally{try{re&&!re.done&&(R=ie.return)&&R.call(ie)}finally{if(k)throw k.error}}return te}}return M(O,"")}}function Id(g){var y,c,f={};try{for(var o=dg(Object.entries(g)),p=o.next();!p.done;p=o.next()){var d=_c(p.value,2),O=d[0],v=d[1];O.indexOf("-")===0?f[O.substring(1)]=Cd(v):typeof v=="string"?f[O]=v:Object.prototype.toString.call(v)==="[object Object]"?f[O]=Id(v):Array.isArray(v)?f[O]=v.map(function(E){return Id(E)}):f[O]=v}}catch(E){y={error:E}}finally{try{p&&!p.done&&(c=o.return)&&c.call(o)}finally{if(y)throw y.error}}return f}function XE(g,y,c){var f,o=new Map,p=HE(c)(y);p.nodes.forEach(function(O){var v=O["-id"],E=O["-type"],M=O.text,A=O.children,T=S0(O,["-id","-type","text","children"]),k={"-id":v};M!=null&&M["-value"]&&(k["-name"]=M["-value"]),T["-json"]&&(k["-json"]=T["-json"]),T["-properties"]&&Object.assign(k,T["-properties"]),A&&(k.children=A),g[E]||(g[E]=[]),g[E].push(k),o.set(v,k)});var d=p.edges.map(function(O){var v=O["-id"];O["-type"];var E=O["-sourceNodeId"],M=O["-targetNodeId"],A=O.text,T=S0(O,["-id","-type","-sourceNodeId","-targetNodeId","text"]),k=o.get(M);k["bpmn:incoming"]||(k["bpmn:incoming"]=[]),k["bpmn:incoming"].push(v);var R={"-id":v,"-sourceRef":E,"-targetRef":M};return A!=null&&A["-value"]&&(R["-name"]=A["-value"]),T["-json"]&&(R["-json"]=T["-json"]),T["-properties"]&&Object.assign(R,T["-properties"]),R});return y.edges.forEach(function(O){var v=O.sourceNodeId,E=O.id,M=o.get(v);M["bpmn:outgoing"]||(M["bpmn:outgoing"]=[]),M["bpmn:outgoing"].push(E)}),(f=g["bpmn:subProcess"])===null||f===void 0||f.forEach(function(O){var v={"bpmn:incoming":new Set,"bpmn:outgoing":new Set},E=[];O.children.forEach(function(C){var F,W=o.get(C["-id"]);["bpmn:incoming","bpmn:outgoing"].forEach(function(te){W[te]&&W[te].forEach(function(ie){v[te].add(ie)})});var V=(F=g[C["-type"]])===null||F===void 0?void 0:F.findIndex(function(te){return te["-id"]===C["-id"]});V>=0&&g[C["-type"]].splice(V,1),o.delete(C["-id"]),O[C["-type"]]||(O[C["-type"]]=[]),O[C["-type"]].push(W)});var M=v["bpmn:incoming"],A=v["bpmn:outgoing"];A.forEach(function(C){M.has(C)&&E.push(C)});for(var T=function(C){var F=d.findIndex(function(W){return W["-id"]===E[C]});F>=0?(O["bpmn:sequenceFlow"]||(O["bpmn:sequenceFlow"]=[]),O["bpmn:sequenceFlow"].push(d[F]),d.splice(F,1)):C++,k=C},k,R=0;R<E.length;)T(R),R=k;delete O.children}),g[Wr.FLOW]=d,g}function YE(g,y){g["bpmndi:BPMNEdge"]=y.edges.map(function(c){var f,o=c.id,p=c.pointsList.map(function(O){var v=O.x,E=O.y;return{"-x":v,"-y":E}}),d={"-id":o+"_di","-bpmnElement":o,"di:waypoint":p};return!((f=c.text)===null||f===void 0)&&f.value&&(d["bpmndi:BPMNLabel"]={"dc:Bounds":{"-x":c.text.x-c.text.value.length*10/2,"-y":c.text.y-7,"-width":c.text.value.length*10,"-height":14}}),d}),g["bpmndi:BPMNShape"]=y.nodes.map(function(c){var f,o=c.id,p=100,d=80,O=c.x,v=c.y,E=oo.shapeConfigMap.get(c.type);E&&(p=E.width,d=E.height),O-=p/2,v-=d/2;var M={"-id":o+"_di","-bpmnElement":o,"dc:Bounds":{"-x":O,"-y":v,"-width":p,"-height":d}};return!((f=c.text)===null||f===void 0)&&f.value&&(M["bpmndi:BPMNLabel"]={"dc:Bounds":{"-x":c.text.x-c.text.value.length*10/2,"-y":c.text.y-7,"-width":c.text.value.length*10,"-height":14}}),M})}var WE=["bpmn:incoming","bpmn:outgoing"];function VE(g,y){var c=[],f=[],o=new Map,p=y!=null?y:{},d=p.transformer,O=p.excludeFields,v={in:new Set(gc(Rd.in,(O==null?void 0:O.in)||[])),out:new Set(gc(Rd.out,(O==null?void 0:O.out)||[]))};zo=i_(zo,d);var E=g["bpmn:definitions"];if(E){var M=E["bpmn:process"];(function(T,k){k.forEach(function(R){try{Object.keys(T).forEach(function(C){try{R(C)}catch(F){}})}catch(C){}})})(M,[function(T){function k(C){C["-children"]||(C["-children"]=[]),Object.keys(C).forEach(function(F){var W;F.indexOf("bpmn:")===0&&!WE.includes(F)&&(M[F]||(M[F]=[]),!Array.isArray(M[F])&&(M[F]=[M[F]]),Array.isArray(C[F])?(W=M[F]).push.apply(W,gc(C[F])):M[F].push(C[F]),Array.isArray(C[F])?C[F].forEach(function(V){!F.includes("Flow")&&C["-children"].push(V["-id"])}):!F.includes("Flow")&&C["-children"].push(C[F]["-id"]),delete C[F])})}if(T==="bpmn:subProcess"){var R=M[T];Array.isArray(R)?R.forEach(function(C){T==="bpmn:subProcess"&&k(C)}):k(R)}},function(T){var k=function(C){Object.keys(C).forEach(function(F){var W,V;if(F.includes("bpmn:")){var te={};zo[F]&&zo[F].in?(te=(V=(W=zo[F]).in)===null||V===void 0?void 0:V.call(W,F,k0.cloneDeep(C[F])),delete C[F]):R(C[F]);var ie=void 0;(ie=Reflect.ownKeys(te)).length>0&&ie.forEach(function(re){Reflect.set(C,re,te[re])})}})};function R(C){o.set(C["-id"],C),Array.isArray(C)?C.forEach(function(F){R(F)}):typeof C=="object"&&k(C)}R(M[T])},function(T){if(T.indexOf("bpmn:")===0){var k=M[T];if(T==="bpmn:sequenceFlow"){var R=E["bpmndi:BPMNDiagram"]["bpmndi:BPMNPlane"]["bpmndi:BPMNEdge"];f=$E(k,R)}else{var C=E["bpmndi:BPMNDiagram"]["bpmndi:BPMNPlane"]["bpmndi:BPMNShape"];if(T==="bpmn:boundaryEvent"){var F=M[T],W=function(V){var te=V["-attachedToRef"],ie=o.get(te);ie["-boundaryEvents"]||(ie["-boundaryEvents"]=[]),ie["-boundaryEvents"].push(V["-id"])};Array.isArray(F)?F.forEach(function(V){W(V)}):W(F)}c=c.concat(KE(k,C,T))}}}])}var A=function(T,k,R){Object.keys(T).forEach(function(C){var F=R?R+"."+C:C;k.has(F)?delete T[C]:typeof T[C]=="object"&&A(T[C],k,F)})};return c.forEach(function(T){var k,R;if(!((k=y==null?void 0:y.mapping)===null||k===void 0)&&k.in){var C=(R=y==null?void 0:y.mapping)===null||R===void 0?void 0:R.in,F=T.type;C[F]&&(T.type=C[F])}A(T,v.in,"")}),f.forEach(function(T){var k,R;if(!((k=y==null?void 0:y.mapping)===null||k===void 0)&&k.in){var C=(R=y==null?void 0:y.mapping)===null||R===void 0?void 0:R.in,F=T.type;C[F]&&(T.type=C[F])}A(T,v.in,"")}),{nodes:c,edges:f}}function KE(g,y,c){var f=[];if(Array.isArray(g))g.forEach(function(d){var O;Array.isArray(y)?O=y.find(function(E){return E["-bpmnElement"]===d["-id"]}):O=y;var v=j0(O,c,d);f.push(v)});else{var o=void 0;Array.isArray(y)?o=y.find(function(d){return d["-bpmnElement"]===g["-id"]}):o=y;var p=j0(o,c,g);f.push(p)}return f}function j0(g,y,c){var f=Number(g["dc:Bounds"]["-x"]),o=Number(g["dc:Bounds"]["-y"]),p=c["-children"],d=c["-name"],O=oo.shapeConfigMap.get(y);O&&(f+=O.width/2,o+=O.height/2);var v={};Object.entries(c).forEach(function(T){var k=_c(T,2),R=k[0],C=k[1];o_.includes(R)||(v[R]=C)}),v=Id(v);var E;if(d&&(E={x:f,y:o,value:d},g["bpmndi:BPMNLabel"]&&g["bpmndi:BPMNLabel"]["dc:Bounds"])){var M=g["bpmndi:BPMNLabel"]["dc:Bounds"];E.x=Number(M["-x"])+Number(M["-width"])/2,E.y=Number(M["-y"])+Number(M["-height"])/2}var A={id:g["-bpmnElement"],type:y,x:f,y:o,properties:v};return p&&(A.children=p),E&&(A.text=E),A}function $E(g,y){var c=[];if(Array.isArray(g))g.forEach(function(o){var p;Array.isArray(y)?p=y.find(function(d){return d["-bpmnElement"]===o["-id"]}):p=y,c.push(P0(p,o))});else{var f=void 0;Array.isArray(y)?f=y.find(function(o){return o["-bpmnElement"]===g["-id"]}):f=y,c.push(P0(f,g))}return c}function P0(g,y){var c,f=y["-name"];if(f){var o=g["bpmndi:BPMNLabel"]["dc:Bounds"],p=0;f.split(`
  110. `).forEach(function(E){p<E.length&&(p=E.length)}),c={value:f,x:Number(o["-x"])+p*10/2,y:Number(o["-y"])+7}}var d={};Object.entries(y).forEach(function(E){var M=_c(E,2),A=M[0],T=M[1];o_.includes(A)||(d[A]=T)}),d=Id(d);var O=g["di:waypoint"].map(function(E){return{x:Number(E["-x"]),y:Number(E["-y"])}}),v={id:y["-id"],type:Wr.FLOW,pointsList:O,sourceNodeId:y["-sourceRef"],targetNodeId:y["-targetRef"],properties:d};return c&&(v.text=c),v}var oo=function(){function g(y){var c=this,f=y.lf;this.adapterOut=function(o,p){var d,O,v=og({},c.processAttributes);XE(v,o,p);var E={"-id":"BPMNPlane_1","-bpmnElement":v["-id"]};YE(E,o);var M=c.definitionAttributes;M["bpmn:process"]=v,M["bpmndi:BPMNDiagram"]={"-id":"BPMNDiagram_1","bpmndi:BPMNPlane":E};var A={"bpmn:definitions":M};if(!((d=p==null?void 0:p.mapping)===null||d===void 0)&&d.out){var T=(O=p==null?void 0:p.mapping)===null||O===void 0?void 0:O.out,k=function(R){Array.isArray(R)&&R.forEach(function(C){return k(C)}),typeof R=="object"&&Object.keys(R).forEach(function(C){var F;(F=T[C])?(R[F]=k0.cloneDeep(R[C]),delete R[C],k(R[F])):k(R[C])})};k(A)}return A},this.adapterIn=function(o,p){if(o)return VE(o,p)},f.adapterIn=this.adapterIn,f.adapterOut=this.adapterOut,this.processAttributes={"-isExecutable":"true","-id":"Process"},this.definitionAttributes={"-id":"Definitions","-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.10"}}return g.prototype.setCustomShape=function(y,c){g.shapeConfigMap.set(y,c)},g.pluginName="bpmn-adapter",g.shapeConfigMap=new Map,g}();oo.shapeConfigMap.set(Wr.START,{width:h0.width,height:h0.height});oo.shapeConfigMap.set(Wr.END,{width:y0.width,height:y0.height});oo.shapeConfigMap.set(Wr.INTERMEDIATE_CATCH,{width:Nd.width,height:Nd.height});oo.shapeConfigMap.set(Wr.INTERMEDIATE_THROW,{width:Nd.width,height:Nd.height});oo.shapeConfigMap.set(Wr.BOUNDARY,{width:v0.width,height:v0.height});oo.shapeConfigMap.set(Wr.PARALLEL_GATEWAY,{width:g0.width,height:g0.height});oo.shapeConfigMap.set(Wr.INCLUSIVE_GATEWAY,{width:m0.width,height:m0.height});oo.shapeConfigMap.set(Wr.EXCLUSIVE_GATEWAY,{width:b0.width,height:b0.height});oo.shapeConfigMap.set(Wr.SYSTEM,{width:_0.width,height:_0.height});oo.shapeConfigMap.set(Wr.USER,{width:O0.width,height:O0.height});oo.shapeConfigMap.set(Wr.SUBPROCESS,{width:w0.width,height:w0.height});(function(g){UE(y,g);function y(c){var f=g.call(this,c)||this;f.adapterXmlIn=function(d){var O=zE(d);return f.adapterIn(O,f.props)},f.adapterXmlOut=function(d){var O=f.adapterOut(d,f.props);return FE(O)};var o=c.lf,p=c.props;return o.adapterIn=f.adapterXmlIn,o.adapterOut=f.adapterXmlOut,f.props=p,f}return y.pluginName="BPMNAdapter",y})(oo);var qE=function(){function g(y){var c=this,f=y.lf;this.lf=f,this.customCssRules="",this.useGlobalRules=!0,f.getSnapshot=function(o,p){c.getSnapshot(o,p)},f.getSnapshotBlob=function(o){return c.getSnapshotBlob(o)},f.getSnapshotBase64=function(o){return c.getSnapshotBase64(o)}}return g.prototype.getSvgRootElement=function(y){var c=y.container.querySelector(".lf-canvas-overlay");return c},g.prototype.triggerDownload=function(y){var c=new MouseEvent("click",{view:document.defaultView,bubbles:!1,cancelable:!0}),f=document.createElement("a");f.setAttribute("download",this.fileName),f.setAttribute("href",y),f.setAttribute("target","_blank"),f.dispatchEvent(c)},g.prototype.removeAnchor=function(y){for(var c=y.childNodes,f=y.childNodes&&y.childNodes.length,o=0;o<f;o++){var p=c[o],d=p.classList&&Array.from(p.classList)||[];d.indexOf("lf-anchor")>-1&&(y.removeChild(y.childNodes[o]),f--,o--)}},g.prototype.removeRotateControl=function(y){for(var c=y.childNodes,f=y.childNodes&&y.childNodes.length,o=0;o<f;o++){var p=c[o],d=p.classList&&Array.from(p.classList)||[];d.indexOf("lf-rotate-control")>-1&&(y.removeChild(y.childNodes[o]),f--,o--)}},g.prototype.getSnapshot=function(y,c){var f=this;this.fileName=y||"logic-flow."+Date.now()+".png";var o=this.getSvgRootElement(this.lf);this.getCanvasData(o,c).then(function(p){var d=p.toDataURL("image/png").replace("image/png","image/octet-stream");f.triggerDownload(d)})},g.prototype.getSnapshotBase64=function(y){var c=this,f=this.getSvgRootElement(this.lf);return new Promise(function(o){c.getCanvasData(f,y).then(function(p){var d=p.toDataURL("image/png");o({data:d,width:p.width,height:p.height})})})},g.prototype.getSnapshotBlob=function(y){var c=this,f=this.getSvgRootElement(this.lf);return new Promise(function(o){c.getCanvasData(f,y).then(function(p){p.toBlob(function(d){o({data:d,width:p.width,height:p.height})},"image/png")})})},g.prototype.getClassRules=function(){var y="";if(this.useGlobalRules)for(var c=document.styleSheets,f=0;f<c.length;f++)for(var o=c[f],p=0;p<o.cssRules.length;p++)y+=o.cssRules[p].cssText;return this.customCssRules&&(y+=this.customCssRules),y},g.prototype.getCanvasData=function(y,c){var f=this,o=y.cloneNode(!0),p=o.lastChild,d=p.childNodes&&p.childNodes.length;if(d)for(var O=0;O<d;O++){var v=p.childNodes[O],E=v.classList&&Array.from(v.classList);if(E&&E.indexOf("lf-base")<0)p.removeChild(p.childNodes[O]),d--,O--;else{var M=p.childNodes[O];M&&M.childNodes.forEach(function(xe){var me=xe;f.removeAnchor(me.firstChild),f.removeRotateControl(me.firstChild)})}}var A=window.devicePixelRatio||1;A<1&&(A=1);var T=document.createElement("canvas"),k=this.lf.graphModel.rootEl.querySelector(".lf-base"),R=k.getBoundingClientRect(),C=this.lf.container.querySelector(".lf-canvas-overlay").getBoundingClientRect(),F=R.x-C.x,W=R.y-C.y,V=this.lf.graphModel,te=V.transformModel,ie=te.SCALE_X,re=te.SCALE_Y,J=te.TRANSLATE_X,Z=te.TRANSLATE_Y;o.lastChild.style.transform="matrix(1, 0, 0, 1, "+((-F+J)*(1/ie)+10)+", "+((-W+Z)*(1/re)+10)+")";var Y=Math.ceil(R.width/ie),z=Math.ceil(R.height/re);T.style.width=Y+"px",T.style.height=z+"px",T.width=Y*A+80,T.height=z*A+80;var G=T.getContext("2d");G.clearRect(0,0,T.width,T.height),G.scale(A,A),c?(G.fillStyle=c,G.fillRect(0,0,Y*A+80,z*A+80)):G.clearRect(0,0,Y,z);var H=new Image,$=document.createElement("style");$.innerHTML=this.getClassRules();var ae=document.createElement("foreignObject");return ae.appendChild($),o.appendChild(ae),new Promise(function(xe){H.onload=function(){var Be=navigator.userAgent.indexOf("Firefox")>-1;try{Be?createImageBitmap(H,{resizeWidth:T.width,resizeHeight:T.height}).then(function(Se){G.drawImage(Se,0,0),xe(T)}):(G.drawImage(H,0,0),xe(T))}catch(Se){G.drawImage(H,0,0),xe(T)}};var me="data:image/svg+xml;charset=utf-8,"+new XMLSerializer().serializeToString(o),Pe=me.replace(/\n/g,"").replace(/\t/g,"").replace(/#/g,"%23");H.src=Pe})},g.pluginName="snapshot",g}();var A0;(function(g){g.HORIZONTAL="horizontal",g.VERTICAL="vertical"})(A0||(A0={}));var ZE=function(g,y){var c=typeof Symbol=="function"&&g[Symbol.iterator];if(!c)return g;var f=c.call(g),o,p=[],d;try{for(;(y===void 0||y-- >0)&&!(o=f.next()).done;)p.push(o.value)}catch(O){d={error:O}}finally{try{o&&!o.done&&(c=f.return)&&c.call(f)}finally{if(d)throw d.error}}return p},JE=function(){for(var g=[],y=0;y<arguments.length;y++)g=g.concat(ZE(arguments[y]));return g},Ql="lf:defaultNodeMenu",ef="lf:defaultEdgeMenu",tf="lf:defaultGraphMenu",M0="lf:defaultSelectionMenu",QE=function(){function g(y){var c=this,f=y.lf;this.lf=f;var o=f.options.isSilentMode;o||(this.__menuDOM=document.createElement("ul"),this.menuTypeMap=new Map,this.init(),this.lf.setMenuConfig=function(p){c.setMenuConfig(p)},this.lf.addMenuConfig=function(p){c.addMenuConfig(p)},this.lf.setMenuByType=function(p){c.setMenuByType(p)})}return g.prototype.init=function(){var y=this,c=[{text:"删除",callback:function(p){y.lf.deleteNode(p.id)}},{text:"编辑文本",callback:function(p){y.lf.graphModel.editText(p.id)}},{text:"复制",callback:function(p){y.lf.cloneNode(p.id)}}];this.menuTypeMap.set(Ql,c);var f=[{text:"删除",callback:function(p){y.lf.deleteEdge(p.id)}},{text:"编辑文本",callback:function(p){y.lf.graphModel.editText(p.id)}}];this.menuTypeMap.set(ef,f),this.menuTypeMap.set(tf,[]);var o=[{text:"删除",callback:function(p){y.lf.clearSelectElements(),p.edges.forEach(function(d){return y.lf.deleteEdge(d.id)}),p.nodes.forEach(function(d){return y.lf.deleteNode(d.id)})}}];this.menuTypeMap.set(M0,o)},g.prototype.render=function(y,c){var f=this;y.options.isSilentMode||(this.__container=c,this.__currentData=null,this.__menuDOM.className="lf-menu",c.appendChild(this.__menuDOM),this.__menuDOM.addEventListener("click",function(o){o.stopPropagation();for(var p=o.target;Array.from(p.classList).indexOf("lf-menu-item")===-1&&Array.from(p.classList).indexOf("lf-menu")===-1;)p=p.parentElement;Array.from(p.classList).indexOf("lf-menu-item")>-1&&(p.onclickCallback(f.__currentData),f.__menuDOM.style.display="none",f.__currentData=null)},!0),this.lf.on("node:contextmenu",function(o){var p=o.data,d=o.position,O=o.e,v=d.domOverlayPosition,E=v.x,M=v.y,A=p.id,T=f.lf.graphModel.getNodeModelById(A),k=[],R=f.menuTypeMap.get(T.type);T&&T.menu&&Array.isArray(T.menu)?k=T.menu:R?k=R:k=f.menuTypeMap.get(Ql),f.__currentData=p,f.showMenu(E,M,k,{width:T.width,height:T.height,clientX:O.clientX,clientY:O.clientY})}),this.lf.on("edge:contextmenu",function(o){var p=o.data,d=o.position,O=o.e,v=d.domOverlayPosition,E=v.x,M=v.y,A=p.id,T=f.lf.graphModel.getEdgeModelById(A),k=[],R=f.menuTypeMap.get(T.type);T&&T.menu&&Array.isArray(T.menu)?k=T.menu:R?k=R:k=f.menuTypeMap.get(ef),f.__currentData=p,f.showMenu(E,M,k,{width:T.width,height:T.height,clientX:O.clientX,clientY:O.clientY})}),this.lf.on("blank:contextmenu",function(o){var p=o.position,d=f.menuTypeMap.get(tf),O=p.domOverlayPosition,v=O.x,E=O.y;f.showMenu(v,E,d)}),this.lf.on("selection:contextmenu",function(o){var p=o.data,d=o.position,O=f.menuTypeMap.get(M0),v=d.domOverlayPosition,E=v.x,M=v.y;f.__currentData=p,f.showMenu(E,M,O)}),this.lf.on("node:mousedown",function(){f.__menuDOM.style.display="none"}),this.lf.on("edge:click",function(){f.__menuDOM.style.display="none"}),this.lf.on("blank:click",function(){f.__menuDOM.style.display="none"}))},g.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},g.prototype.showMenu=function(y,c,f,o){if(!(!f||!f.length)){var p=this.__menuDOM;if(p.innerHTML="",p.append.apply(p,JE(this.__getMenuDom(f))),!!p.children.length){if(p.style.display="block",!o){p.style.top=c+"px",p.style.left=y+"px";return}var d=o.width,O=o.height,v=o.clientX,E=o.clientY,M=this.lf.graphModel,A=p.offsetWidth,T=!0,k=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,R=k-v,C=M.rootEl.getBoundingClientRect(),F=C.left+C.width;F<k&&(R=F-v),R<A&&(T=!1),T?p.style.left=y+"px":p.style.left=y-d+"px";var W=p.offsetHeight,V=!0,te=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,ie=te-E,re=C.top+C.height;re<te&&(ie=re-E),ie<W&&(V=!1),V?p.style.top=c+"px":p.style.top=c-O+"px"}}},g.prototype.setMenuByType=function(y){!y.type||!y.menu||this.menuTypeMap.set(y.type,y.menu)},g.prototype.__getMenuDom=function(y){var c=[];return y&&y.length>0&&y.forEach(function(f){var o=document.createElement("li");if(f.className?o.className="lf-menu-item "+f.className:o.className="lf-menu-item",f.icon===!0){var p=document.createElement("span");p.className="lf-menu-item-icon",o.appendChild(p)}var d=document.createElement("span");d.className="lf-menu-item-text",f.text&&(d.innerText=f.text),o.appendChild(d),o.onclickCallback=f.callback,c.push(o)}),c},g.prototype.setMenuConfig=function(y){y&&(y.nodeMenu!==void 0&&this.menuTypeMap.set(Ql,y.nodeMenu?y.nodeMenu:[]),y.edgeMenu!==void 0&&this.menuTypeMap.set(ef,y.edgeMenu?y.edgeMenu:[]),y.graphMenu!==void 0&&this.menuTypeMap.set(tf,y.graphMenu?y.graphMenu:[]))},g.prototype.addMenuConfig=function(y){if(y){if(Array.isArray(y.nodeMenu)){var c=this.menuTypeMap.get(Ql);this.menuTypeMap.set(Ql,c.concat(y.nodeMenu))}if(Array.isArray(y.edgeMenu)){var c=this.menuTypeMap.get(ef);this.menuTypeMap.set(ef,c.concat(y.edgeMenu))}if(Array.isArray(y.graphMenu)){var c=this.menuTypeMap.get(tf);this.menuTypeMap.set(tf,c.concat(y.graphMenu))}}},g.prototype.changeMenuItem=function(y,c){if(y==="add")this.addMenuConfig(c);else if(y==="reset")this.setMenuConfig(c);else throw new Error("The first parameter of changeMenuConfig should be 'add' or 'reset'")},g.pluginName="menu",g}(),eS=function(){function g(y){var c=this,f=y.lf;this.lf=f,this.lf.setPatternItems=function(o){c.setPatternItems(o)}}return g.prototype.render=function(y,c){var f=this;if(this.destroy(),!this.shapeList||this.shapeList.length===0){this.domContainer=c;return}this.panelEl=document.createElement("div"),this.panelEl.className="lf-dndpanel",this.shapeList.forEach(function(o){f.panelEl.appendChild(f.createDndItem(o))}),c.appendChild(this.panelEl),this.domContainer=c},g.prototype.destroy=function(){this.domContainer&&this.panelEl&&this.domContainer.contains(this.panelEl)&&this.domContainer.removeChild(this.panelEl)},g.prototype.setPatternItems=function(y){this.shapeList=y,this.domContainer&&this.render(this.lf,this.domContainer)},g.prototype.createDndItem=function(y){var c=this,f=document.createElement("div");f.className=y.className?"lf-dnd-item "+y.className:"lf-dnd-item";var o=document.createElement("div");if(o.className="lf-dnd-shape",y.icon&&(o.style.backgroundImage="url("+y.icon+")"),f.appendChild(o),y.label){var p=document.createElement("div");p.innerText=y.label,p.className="lf-dnd-text",f.appendChild(p)}return y.disabled?(f.classList.add("disabled"),f.onmousedown=function(){y.callback&&y.callback(c.lf,c.domContainer)},f):(f.onmousedown=function(){y.type&&c.lf.dnd.startDrag({type:y.type,properties:y.properties,text:y.text}),y.callback&&y.callback(c.lf,c.domContainer)},f.ondblclick=function(d){c.lf.graphModel.eventCenter.emit("dnd:panel-dbclick",{e:d,data:y})},f.onclick=function(d){c.lf.graphModel.eventCenter.emit("dnd:panel-click",{e:d,data:y})},f.oncontextmenu=function(d){c.lf.graphModel.eventCenter.emit("dnd:panel-contextmenu",{e:d,data:y})},f)},g.pluginName="dndPanel",g}(),tS=function(){function g(y){var c=this,f=y.lf;this.__disabled=!1,this.isDefaultStopMoveGraph=!1,this.isWholeNode=!0,this.isWholeEdge=!0,this.__draw=function(p){var d=c.lf.getPointByClient(p.clientX,p.clientY).domOverlayPosition,O=d.x,v=d.y;c.endPoint={x:O,y:v};var E=c.startPoint,M=E.x,A=E.y,T=c.wrapper.style,k=M,R=A,C=O-M,F=v-A;O<M&&(k=O,C=M-O),v<A&&(R=v,F=A-v),T.left=k+"px",T.top=R+"px",T.width=C+"px",T.height=F+"px"},this.__drawOff=function(){document.removeEventListener("mousemove",c.__draw),document.removeEventListener("mouseup",c.__drawOff),c.wrapper.oncontextmenu=null,c.__domContainer.removeChild(c.wrapper);var p=c.startPoint,d=p.x,O=p.y,v=c.endPoint,E=v.x,M=v.y;if(!(Math.abs(E-d)<10&&Math.abs(M-O)<10)){var A=[Math.min(d,E),Math.min(O,M)],T=[Math.max(d,E),Math.max(O,M)],k=c.lf.graphModel.getAreaElement(A,T,c.isWholeEdge,c.isWholeNode,!0),R=c.lf.graphModel.group;k.forEach(function(C){(!R||!R.getNodeGroup(C.id))&&c.lf.selectElementById(C.id,!0)}),c.lf.emit("selection:selected",k)}},this.lf=f;var o=f.getEditConfig().stopMoveGraph;this.isDefaultStopMoveGraph=o,f.openSelectionSelect=function(){c.openSelectionSelect()},f.closeSelectionSelect=function(){c.closeSelectionSelect()}}return g.prototype.render=function(y,c){var f=this;this.__domContainer=c,y.on("blank:mousedown",function(o){var p=o.e,d=y.getEditConfig();if(!(!d.stopMoveGraph||f.__disabled)){var O=p.button===2;if(!O){var v=y.getPointByClient(p.clientX,p.clientY).domOverlayPosition,E=v.x,M=v.y;f.startPoint={x:E,y:M},f.endPoint={x:E,y:M};var A=document.createElement("div");A.className="lf-selection-select",A.oncontextmenu=function(k){k.preventDefault()},A.style.top=f.startPoint.y+"px",A.style.left=f.startPoint.x+"px",c.appendChild(A),f.wrapper=A,document.addEventListener("mousemove",f.__draw),document.addEventListener("mouseup",f.__drawOff)}}})},g.prototype.setSelectionSense=function(y,c){y===void 0&&(y=!0),c===void 0&&(c=!0),this.isWholeEdge=y,this.isWholeNode=c},g.prototype.openSelectionSelect=function(){var y=this.lf.getEditConfig().stopMoveGraph;y||(this.isDefaultStopMoveGraph=!1,this.lf.updateEditConfig({stopMoveGraph:!0})),this.open()},g.prototype.closeSelectionSelect=function(){this.isDefaultStopMoveGraph||this.lf.updateEditConfig({stopMoveGraph:!1}),this.close()},g.prototype.open=function(){this.__disabled=!1},g.prototype.close=function(){this.__disabled=!0},g.pluginName="selectionSelect",g}(),a_=function(){var g=function(y,c){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,o){f.__proto__=o}||function(f,o){for(var p in o)o.hasOwnProperty(p)&&(f[p]=o[p])},g(y,c)};return function(y,c){g(y,c);function f(){this.constructor=y}y.prototype=c===null?Object.create(c):(f.prototype=c.prototype,new f)}}(),yc=function(){return yc=Object.assign||function(g){for(var y,c=1,f=arguments.length;c<f;c++){y=arguments[c];for(var o in y)Object.prototype.hasOwnProperty.call(y,o)&&(g[o]=y[o])}return g},yc.apply(this,arguments)},sf=function(g,y){var c=typeof Symbol=="function"&&g[Symbol.iterator];if(!c)return g;var f=c.call(g),o,p=[],d;try{for(;(y===void 0||y-- >0)&&!(o=f.next()).done;)p.push(o.value)}catch(O){d={error:O}}finally{try{o&&!o.done&&(c=f.return)&&c.call(f)}finally{if(d)throw d.error}}return p},nS={tr:"tl",lb:"tl",tl:"tr",rb:"tr",br:"bl",lt:"bl",bl:"br",rt:"br"};function rS(g){for(var y=g,c=1;c<y.length-1;){var f=sf(y[c-1],2),o=f[0],p=f[1],d=sf(y[c],2),O=d[0],v=d[1],E=sf(y[c+1],2),M=E[0],A=E[1];o===O&&O===M||p===v&&v===A?y.splice(c,1):c++}return y}function oS(g,y,c,f){var o=[g[0],g[1]],p=[g[0],g[1]];switch(c){case"tl":return y==="tr"?(o[1]+=f,p[0]+=f):y==="lb"&&(o[0]+=f,p[1]+=f),[o,p];case"tr":return y==="tl"?(o[1]+=f,p[0]-=f):y==="rb"&&(o[0]-=f,p[1]+=f),[o,p];case"bl":return y==="br"?(o[1]-=f,p[0]+=f):y==="lt"&&(o[0]+=f,p[1]-=f),[o,p];case"br":return y==="bl"?(o[1]-=f,p[0]-=f):y==="rt"&&(o[0]-=f,p[1]-=f),[o,p];default:return[]}}function iS(g,y,c,f){var o,p="",d="";g[0]===y[0]?p=g[1]>y[1]?"t":"b":g[1]===y[1]&&(p=g[0]>y[0]?"l":"r"),y[0]===c[0]?d=y[1]>c[1]?"t":"b":y[1]===c[1]&&(d=y[0]>c[0]?"l":"r");var O=Math.min(Math.hypot(y[0]-g[0],y[1]-g[1])/2,Math.hypot(c[0]-y[0],c[1]-y[1])/2,f)||1/5*f,v=""+p+d,E=nS[v]||"-",M="L "+g[0]+" "+g[1];if(E==="-")M+="L "+y[0]+" "+y[1]+" L "+c[0]+" "+c[1];else{var A=sf(oS(y,v,E,O),2),T=A[0],k=A[1];T&&k&&(M+="L "+T[0]+" "+T[1]+" Q "+y[0]+" "+y[1]+" "+k[0]+" "+k[1],o=sf(k,2),y[0]=o[0],y[1]=o[1])}return M}function aS(g,y){var c=0,f="";if(g.length===2)f+="M"+g[c][0]+" "+g[c++][1]+" L "+g[c][0]+" "+g[c][1];else{for(f+="M"+g[c][0]+" "+g[c++][1];c+1<g.length;){var o=g[c-1],p=g[c],d=g[c+++1];f+=iS(o,p,d,y)}f+="L "+g[c][0]+" "+g[c][1]}return f}(function(g){a_(y,g);function y(){return g!==null&&g.apply(this,arguments)||this}return y.prototype.getEdge=function(){var c=this.props.model,f=c.points,o=c.isAnimation,p=c.arrowConfig,d=c.radius,O=d===void 0?5:d,v=c.getEdgeStyle(),E=c.getEdgeAnimationStyle(),M=rS(f.split(" ").map(function(k){return k.split(",").map(function(R){return+R})})),A=aS(M,O),T=yc(yc(yc({style:o?E:{}},v),p),{fill:"none"});return ot.h("path",yc({d:A},T))},y})(ot.PolylineEdge);(function(g){a_(y,g);function y(){return g!==null&&g.apply(this,arguments)||this}return y})(ot.PolylineEdgeModel);const uS={SEQUENCE_FLOW:1};function sS(g){const{incoming:y,outgoing:c,properties:f,key:o}=g,{text:p,startPoint:d,endPoint:O,pointsList:v,logicFlowType:E}=f,M={id:o,type:E,sourceNodeId:y[0],targetNodeId:c[0],text:p,startPoint:d,endPoint:O,pointsList:v,properties:{}},A=["startPoint","endPoint","pointsList","text","logicFlowType"];return Object.keys(g.properties).forEach(T=>{A.indexOf(T)===-1&&(M.properties[T]=g.properties[T])}),M}function cS(g){const{properties:y,key:c}=g,{x:f,y:o,text:p,logicFlowType:d}=y,O={id:c,type:d,x:f,y:o,text:p,properties:{}},v=["x","y","text","logicFlowType"];return Object.keys(g.properties).forEach(E=>{v.indexOf(E)===-1&&(O.properties[E]=g.properties[E])}),O}function lS(g){const y={nodes:[],edges:[]},c=g.flowElementList;return c&&c.length>0&&c.forEach(f=>{if(f.type===uS.SEQUENCE_FLOW){const o=sS(f);y.edges.push(o)}else{const o=cS(f);y.nodes.push(o)}}),y}function fS(g){return[{text:"选区",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAAH6ji2bAAAABGdBTUEAALGPC/xhBQAAAOVJREFUOBGtVMENwzAIjKP++2026ETdpv10iy7WFbqFyyW6GBywLCv5gI+Dw2Bluj1znuSjhb99Gkn6QILDY2imo60p8nsnc9bEo3+QJ+AKHfMdZHnl78wyTnyHZD53Zzx73MRSgYvnqgCUHj6gwdck7Zsp1VOrz0Uz8NbKunzAW+Gu4fYW28bUYutYlzSa7B84Fh7d1kjLwhcSdYAYrdkMQVpsBr5XgDGuXwQfQr0y9zwLda+DUYXLaGKdd2ZTtvbolaO87pdo24hP7ov16N0zArH1ur3iwJpXxm+v7oAJNR4JEP8DoAuSFEkYH7cAAAAASUVORK5CYII=",callback:()=>{g.updateEditConfig({stopMoveGraph:!0})}},{type:"circle",text:"开始",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAAH6ji2bAAAABGdBTUEAALGPC/xhBQAAAnBJREFUOBGdVL1rU1EcPfdGBddmaZLiEhdx1MHZQXApraCzQ7GKLgoRBxMfcRELuihWKcXFRcEWF8HBf0DdDCKYRZpnl7p0svLe9Zzbd29eQhTbC8nv+9zf130AT63jvooOGS8Vf9Nt5zxba7sXQwODfkWpkbjTQfCGUd9gIp3uuPP8bZ946g56dYQvnBg+b1HB8VIQmMFrazKcKSvFW2dQTxJnJdQ77urmXWOMBCmXM2Rke4S7UAW+/8ywwFoewmBps2tu7mbTdp8VMOkIRAkKfrVawalJTtIliclFbaOBqa0M2xImHeVIfd/nKAfVq/LGnPss5Kh00VEdSzfwnBXPUpmykNss4lUI9C1ga+8PNrBD5YeqRY2Zz8PhjooIbfJXjowvQJBqkmEkVnktWhwu2SM7SMx7Cj0N9IC0oQXRo8xwAGzQms+xrB/nNSUWVveI48ayrFGyC2+E2C+aWrZHXvOuz+CiV6iycWe1Rd1Q6+QUG07nb5SbPrL4426d+9E1axKjY3AoRrlEeSQo2Eu0T6BWAAr6COhTcWjRaYfKG5csnvytvUr/WY4rrPMB53Uo7jZRjXaG6/CFfNMaXEu75nG47X+oepU7PKJvvzGDY1YLSKHJrK7vFUwXKkaxwhCW3u+sDFMVrIju54RYYbFKpALZAo7sB6wcKyyrd+aBMryMT2gPyD6GsQoRFkGHr14TthZni9ck0z+Pnmee460mHXbRAypKNy3nuMdrWgVKj8YVV8E7PSzp1BZ9SJnJAsXdryw/h5ctboUVi4AFiCd+lQaYMw5z3LGTBKjLQOeUF35k89f58Vv/tGh+l+PE/wG0rgfIUbZK5AAAAABJRU5ErkJggg=="},{type:"rect",text:"用户任务",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAEFVwZaAAAABGdBTUEAALGPC/xhBQAAAqlJREFUOBF9VM9rE0EUfrMJNUKLihGbpLGtaCOIR8VjQMGDePCgCCIiCNqzCAp2MyYUCXhUtF5E0D+g1t48qAd7CCLqQUQKEWkStcEfVGlLdp/fm3aW2QQdyLzf33zz5m2IsAZ9XhDpyaaIZkTS4ASzK41TFao88GuJ3hsr2pAbipHxuSYyKRugagICGANkfFnNh3HeE2N0b3nN2cgnpcictw5veJIzxmDamSlxxQZicq/mflxhbaH8BLRbuRwNtZp0JAhoplVRUdzmCe/vO27wFuuA3S5qXruGdboy5/PRGFsbFGKo/haRtQHIrM83bVeTrOgNhZReWaYGnE4aUQgTJNvijJFF4jQ8BxJE5xfKatZWmZcTQ+BVgh7s8SgPlCkcec4mGTmieTP4xd7PcpIEg1TX6gdeLW8rTVMVLVvb7ctXoH0Cydl2QOPJBG21STE5OsnbweVYzAnD3A7PVILuY0yiiyDwSm2g441r6rMSgp6iK42yqroI2QoXeJVeA+YeZSa47gZdXaZWQKTrG93rukk/l2Al6Kzh5AZEl7dDQy+JjgFahQjRopSxPbrbvK7GRe9ePWBo1wcU7sYrFZtavXALwGw/7Dnc50urrHJuTPSoO2IMV3gUQGNg87IbSOIY9BpiT9HV7FCZ94nPXb3MSnwHn/FFFE1vG6DTby+r31KAkUktB3Qf6ikUPWxW1BkXSPQeMHHiW0+HAd2GelJsZz1OJegCxqzl+CLVHa/IibuHeJ1HAKzhuDR+ymNaRFM+4jU6UWKXorRmbyqkq/D76FffevwdCp+jN3UAN/C9JRVTDuOxC/oh+EdMnqIOrlYteKSfadVRGLJFJPSB/ti/6K8f0CNymg/iH2gO/f0DwE0yjAFO6l8JaR5j0VPwPwfaYHqOqrCI319WzwhwzNW/aQAAAABJRU5ErkJggg==",cls:"important-node"},{type:"rect",text:"系统任务",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAATCAYAAAEFVwZaAAAABGdBTUEAALGPC/xhBQAAAqlJREFUOBF9VM9rE0EUfrMJNUKLihGbpLGtaCOIR8VjQMGDePCgCCIiCNqzCAp2MyYUCXhUtF5E0D+g1t48qAd7CCLqQUQKEWkStcEfVGlLdp/fm3aW2QQdyLzf33zz5m2IsAZ9XhDpyaaIZkTS4ASzK41TFao88GuJ3hsr2pAbipHxuSYyKRugagICGANkfFnNh3HeE2N0b3nN2cgnpcictw5veJIzxmDamSlxxQZicq/mflxhbaH8BLRbuRwNtZp0JAhoplVRUdzmCe/vO27wFuuA3S5qXruGdboy5/PRGFsbFGKo/haRtQHIrM83bVeTrOgNhZReWaYGnE4aUQgTJNvijJFF4jQ8BxJE5xfKatZWmZcTQ+BVgh7s8SgPlCkcec4mGTmieTP4xd7PcpIEg1TX6gdeLW8rTVMVLVvb7ctXoH0Cydl2QOPJBG21STE5OsnbweVYzAnD3A7PVILuY0yiiyDwSm2g441r6rMSgp6iK42yqroI2QoXeJVeA+YeZSa47gZdXaZWQKTrG93rukk/l2Al6Kzh5AZEl7dDQy+JjgFahQjRopSxPbrbvK7GRe9ePWBo1wcU7sYrFZtavXALwGw/7Dnc50urrHJuTPSoO2IMV3gUQGNg87IbSOIY9BpiT9HV7FCZ94nPXb3MSnwHn/FFFE1vG6DTby+r31KAkUktB3Qf6ikUPWxW1BkXSPQeMHHiW0+HAd2GelJsZz1OJegCxqzl+CLVHa/IibuHeJ1HAKzhuDR+ymNaRFM+4jU6UWKXorRmbyqkq/D76FffevwdCp+jN3UAN/C9JRVTDuOxC/oh+EdMnqIOrlYteKSfadVRGLJFJPSB/ti/6K8f0CNymg/iH2gO/f0DwE0yjAFO6l8JaR5j0VPwPwfaYHqOqrCI319WzwhwzNW/aQAAAABJRU5ErkJggg==",cls:"import_icon"},{type:"diamond",text:"条件判断",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAAHeEJUAAAAABGdBTUEAALGPC/xhBQAAAvVJREFUOBGNVEFrE0EU/mY3bQoiFlOkaUJrQUQoWMGePLX24EH0IIoHKQiCV0G8iE1covgLiqA/QTzVm1JPogc9tIJYFaQtlhQxqYjSpunu+L7JvmUTU3AgmTfvffPNN++9WSA1DO182f6xwILzD5btfAoQmwL5KJEwiQyVbSVZ0IgRyV6PTpIJ81E5ZvqfHQR0HUOBHW4L5Et2kQ6Zf7iAOhTFAA8s0pEP7AXO1uAA52SbqGk6h/6J45LaLhO64ByfcUzM39V7ZiAdS2yCePPEIQYvTUHqM/n7dgQNfBKWPjpF4ISk8q3J4nB11qw6X8l+FsF3EhlkEMfrjIer3wJTLwS2aCNcj4DbGxXTw00JmAuO+Ni6bBxVUCvS5d9aa04+so4pHW5jLTywuXAL7jJ+D06sl82Sgl2JuVBQn498zkc2bGKxULHjCnSMadBKYDYYHAtsby1EQ5lNGrQd4Y3v4Zo0XdGEmDno46yCM9Tk+RiJmUYHS/aXHPNTcjxcbTFna000PFJHIVZ5lFRqRpJWk9/+QtlOUYJj9HG5pVFEU7zqIYDVsw2s+AJaD8wTd2umgSCCyUxgGsS1Y6TBwXQQTFuZaHcd8gAGioE90hlsY+wMcs30RduYtxanjMGal8H5dMW67dmT1JFtYUEe8LiQLRsPZ6IIc7A4J5tqco3T0pnv/4u0kyzrYUq7gASuEyI8VXKvB9Odytv6jS/PNaZBln0nioJG/AVQRZvApOdhjj3Jt8QC8Im09SafwdBdvIpztpxWxpeKCC+EsFdS8DCyuCn2munFpL7ctHKp+Xc5cMybeIyMAN33SPL3ZR9QV1XVwLyzHm6Iv0/yeUuUb7PPlZC4D4HZkeu6dpF4v9j9MreGtMbxMMRLIcjJic9yHi7WQ3yVKzZVWUr5UrViJvn1FfUlwe/KYVfYyWRLSGNu16hR01U9IacajXPei0wx/5BqgInvJN+MMNtNme7ReU9SBbgntovn0kKHpFg7UogZvaZiOue/q1SBo9ktHzQAAAAASUVORK5CYII="},{type:"circle",text:"结束",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAAH6ji2bAAAABGdBTUEAALGPC/xhBQAAA1BJREFUOBFtVE1IVUEYPXOf+tq40Y3vPcmFIdSjIorWoRG0ERWUgnb5FwVhYQSl72oUoZAboxKNFtWiwKRN0M+jpfSzqJAQclHo001tKkjl3emc8V69igP3znzfnO/M9zcDcKT67azmjYWTwl9Vn7Vumeqzj1DVb6cleQY4oAVnIOPb+mKAGxQmKI5CWNJ2aLPatxWa3aB9K7/fB+/Z0jUF6TmMlFLQqrkECWQzOZxYGjTlOl8eeKaIY5yHnFn486xBustDjWT6dG7pmjHOJd+33t0iitTPkK6tEvjxq4h2MozQ6WFSX/LkDUGfFwfhEZj1Auz/U4pyAi5Sznd7uKzznXeVHlI/Aywmk6j7fsUsEuCGADrWARXXwjxWQsUbIupDHJI7kF5dRktg0eN81IbiZXiTESic50iwS+t1oJgL83jAiBupLDCQqwziaWSoAFSeIR3P5Xv5az00wyIn35QRYTwdSYbz8pH8fxUUAtxnFvYmEmgI0wYXUXcCCSpeEVpXlsRhBnCEATxWylL9+EKCAYhe1NGstUa6356kS9NVvt3DU2fd+Wtbm/+lSbylJqsqkSm9CRhvoJVlvKPvF1RKY/FcPn5j4UfIMLn8D4UYb54BNsilTDXKnF4CfTobA0FpoW/LSp306wkXM+XaOJhZaFkcNM82ASNAWMrhrUbRfmyeI1FvRBTpN06WKxa9BK0o2E4Pd3zfBBEwPsv9sQBnmLVbLEIZ/Xe9LYwJu/Er17W6HYVBc7vmuk0xUQ+pqxdom5Fnp55SiytXLPYoMXNM4u4SNSCFWnrVIzKG3EGyMXo6n/BQOe+bX3FClY4PwydVhthOZ9NnS+ntiLh0fxtlUJHAuGaFoVmttpVMeum0p3WEXbcll94l1wM/gZ0Ccczop77VvN2I7TlsZCsuXf1WHvWEhjO8DPtyOVg2/mvK9QqboEth+7pD6NUQC1HN/TwvydGBARi9MZSzLE4b8Ru3XhX2PBxf8E1er2A6516o0w4sIA+lwURhAON82Kwe2iDAC1Watq4XHaGQ7skLcFOtI5lDxuM2gZe6WFIotPAhbaeYlU4to5cuarF1QrcZ/lwrLaCJl66JBocYZnrNlvm2+MBCTmUymPrYZVbjdlr/BxlMjmNmNI3SAAAAAElFTkSuQmCC"}]}const pS=ig({name:"FlowChart",__name:"FlowChart",props:{flowOptions:{type:Object,default:()=>({})},data:{type:Object,default:()=>({})},toolbar:{type:Boolean,default:!0},patternItems:{type:Array}},setup(g){const y=g,c=_d(null),f=_d({}),o=_d(null),{prefixCls:p}=p1("flow-chart"),d=d1(),[O,{openModal:v}]=M1();N1({logicFlow:o});const E=x1(()=>{const{flowOptions:k}=y;return Vv({grid:!0,background:{color:d.getDarkMode==="light"?"#f7f9ff":"#151515"},keyboard:{enabled:!0}},k)});qb(()=>y.data,()=>{A()}),qb(()=>Dn(E),k=>{var R;(R=Dn(o))==null||R.updateEditConfig(k)});function M(){return md(this,null,function*(){yield Kv();const k=Dn(c);if(!k)return;pc.use(eS),pc.use(qE),pc.use(oE),pc.use(QE),pc.use(tS),o.value=new pc(Kb(Vv({},Dn(E)),{container:k}));const R=Dn(o);R==null||R.setDefaultEdgeType("line"),A(),R==null||R.setPatternItems(y.patternItems||fS(R))})}function A(){return md(this,null,function*(){yield Kv();const k=Dn(o);if(!k)return;const R=lS(y.data);k.render(R)})}function T(){const k=Dn(o);k&&(f.value=Dn(k).getGraphData(),v())}return E1(M),(k,R)=>(Ha(),nf("div",{class:Od(["h-full",Dn(p)])},[g.toolbar?(Ha(),ag(I1,{key:0,prefixCls:Dn(p),onViewData:T},null,8,["prefixCls"])):$v("",!0),S1("div",{ref_key:"lfElRef",ref:c,class:"h-full"},null,512),cf(Dn(k1),{onRegister:Dn(O),title:"流程数据",width:"50%"},{default:Sd(()=>[cf(Dn(T1),{data:f.value},null,8,["data"])]),_:1},8,["onRegister"])],2))}}),dS=h1(pS),hS=[{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"}],yS={flowElementList:hS},jS=ig({__name:"index",setup(g){return(y,c)=>(Ha(),ag(Dn(D1),{title:"流程图",content:"简单流程图示例,具体功能需要自己完善",contentFullHeight:"",fixedHeight:""},{default:Sd(()=>[cf(Dn(dS),{data:Dn(yS)},null,8,["data"])]),_:1}))}});export{jS as default};