(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[6349],{20474:function(dt,x,M){"use strict";M.d(x,{Z:function(){return dp}});var S={};M.r(S),M.d(S,{GADDI:function(){return Co},Stack:function(){return Ea},breadthFirstSearch:function(){return Vt},connectedComponent:function(){return ke},cosineSimilarity:function(){return Ne},default:function(){return _u},depthFirstSearch:function(){return Mt},detectAllCycles:function(){return U},detectAllDirectedCycle:function(){return ut},detectAllUndirectedCycle:function(){return Ge},detectCycle:function(){return he},detectDirectedCycle:function(){return gs},dijkstra:function(){return ct},findAllPath:function(){return Lt},findShortestPath:function(){return jt},floydWarshall:function(){return vr},getAdjMatrix:function(){return re},getDegree:function(){return we},getInDegree:function(){return Be},getNeighbors:function(){return Ve},getOutDegree:function(){return We},iLouvain:function(){return be},kCore:function(){return j},kMeans:function(){return te},labelPropagation:function(){return at},louvain:function(){return bt},minimumSpanningTree:function(){return ye},nodesCosineSimilarity:function(){return Ke},pageRank:function(){return Ct}});var B={};M.r(B),M.d(B,{Line:function(){return pi},applyMatrix:function(){return Do},compare:function(){return vo},distance:function(){return Jo},floydWarshall:function(){return Za},fractionToLine:function(){return au},getAdjMatrix:function(){return ms},getBBoxBoundLine:function(){return Fs},getCircleCenterByPoints:function(){return ua},getCircleIntersectByPoint:function(){return ys},getDegree:function(){return eo},getEllipseIntersectByPoint:function(){return Nn},getLineIntersect:function(){return Bs},getPointsCenter:function(){return po},getRectIntersectByPoint:function(){return ru},intersectBBox:function(){return nu},invertMatrix:function(){return Qu},isPointInPolygon:function(){return ts},isPointsOverlap:function(){return Ra},isPolygonsIntersect:function(){return Es},itemIntersectByLine:function(){return Ha},lerp:function(){return fa},lerpArray:function(){return na},move:function(){return xa},pointLineDistance:function(){return li},pointLineSquareDist:function(){return to},pointRectSquareDist:function(){return Ao},rotate:function(){return qo},scale:function(){return Pa},scaleMatrix:function(){return Gs},squareDist:function(){return ca},translate:function(){return bs}});var N={};M.r(N),M.d(N,{cloneBesidesImg:function(){return Ss},getAnimateCfgWithCallback:function(){return Bo},getBBox:function(){return Ro},getComboBBox:function(){return ko},getLabelPosition:function(){return fl},getLetterWidth:function(){return ec},getLoopCfgs:function(){return cl},getTextSize:function(){return tc},plainCombosToTrees:function(){return su},reconstructTree:function(){return uu},shouldRefreshEdge:function(){return rc},traverseTree:function(){return Fa},traverseTreeUp:function(){return ao},truncateLabelByLength:function(){return bo}});var E={};M.r(E),M.d(E,{calculationItemsBBox:function(){return wu},cloneEvent:function(){return Dc},formatPadding:function(){return Su},isNaN:function(){return is},isViewportChanged:function(){return oo},processParallelEdges:function(){return hl},uniqueId:function(){return ns}});var I={};M.r(I),M.d(I,{getClosedSpline:function(){return Of},getControlPoint:function(){return fc},getSpline:function(){return gi},paddedHull:function(){return Fo},pathToPoints:function(){return lu},pointsToPolygon:function(){return Sl},roundedHull:function(){return Nf}});var A={};M.r(A),M.d(A,{defaultSubjectColors:function(){return id}});var v={};M.r(v),M.d(v,{getColorSetsBySubjectColors:function(){return Vs},getColorsWithSubjectColor:function(){return As},mixColor:function(){return ia}});var p={};M.r(p),M.d(p,{arrayToTextureData:function(){return Fl},attributesToTextureData:function(){return yu},buildTextureData:function(){return ef},buildTextureDataWithOneEdgeAttr:function(){return Xo},buildTextureDataWithTwoEdgeAttr:function(){return Gl},proccessToFunc:function(){return gu},radialLayout:function(){return ds}});var c={};M.r(c),M.d(c,{gpuDetector:function(){return Uu}});var f=M(67294),l=M(24561),T=function(h){var t=h.loadingTemplate,e=function(){return t||f.createElement(l.ZP,{viewBox:"0 0 400 180",width:200,height:90,speed:1},f.createElement("rect",{x:"20",y:"5",rx:"0",ry:"0",width:"1",height:"170"}),f.createElement("rect",{x:"20",y:"175",rx:"0",ry:"0",width:"360",height:"1"}),f.createElement("rect",{x:"40",y:"75",rx:"0",ry:"0",width:"35",height:"100"}),f.createElement("rect",{x:"80",y:"125",rx:"0",ry:"0",width:"35",height:"50"}),f.createElement("rect",{x:"120",y:"105",rx:"0",ry:"0",width:"35",height:"70"}),f.createElement("rect",{x:"160",y:"35",rx:"0",ry:"0",width:"35",height:"140"}),f.createElement("rect",{x:"200",y:"55",rx:"0",ry:"0",width:"35",height:"120"}),f.createElement("rect",{x:"240",y:"15",rx:"0",ry:"0",width:"35",height:"160"}),f.createElement("rect",{x:"280",y:"135",rx:"0",ry:"0",width:"35",height:"40"}),f.createElement("rect",{x:"320",y:"85",rx:"0",ry:"0",width:"35",height:"90"}))};return f.createElement("div",{style:{position:"absolute",width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",left:0,top:0,zIndex:99,backgroundColor:"#fff"}},e())},m=T,w=function(){var h=function(t,e){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},h(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");h(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}(),O=function(h){w(t,h);function t(){var e=h!==null&&h.apply(this,arguments)||this;return e.state={hasError:!1},e.renderError=function(r){var n=e.props.errorTemplate;switch(r){default:return typeof n=="function"?n(r):n||f.createElement("h5",null,"\u7EC4\u4EF6\u51FA\u9519\u4E86\uFF0C\u8BF7\u6838\u67E5\u540E\u91CD\u8BD5\uFF1A ",r.message)}},e}return t.getDerivedStateFromError=function(e){return{hasError:!0,error:e}},t.getDerivedStateFromProps=function(e,r){return r.children!==e.children?{children:e.children,hasError:!1,error:void 0}:null},t.prototype.render=function(){return this.state.hasError?this.renderError(this.state.error):f.createElement(f.Fragment,null,this.props.children)},t}(f.Component),D=O,g=M(70655),_=M(49242),Y={getDefaultCfg:function(){return{}},getEvents:function(){return{}},updateCfg:function(t){return Object.assign(this,t),!0},shouldBegin:function(){return!0},shouldUpdate:function(){return!0},shouldEnd:function(){return!0},bind:function(t){var e=this,r=this.events;this.graph=t,(this.type==="drag-canvas"||this.type==="brush-select"||this.type==="lasso-select")&&t.get("canvas").set("draggable",!0),(0,_.each)(r,function(n,i){t.on(i,n)}),document.addEventListener("visibilitychange",function(){e.keydown=!1})},unbind:function(t){var e=this.events,r=t.get("canvas").get("draggable");(this.type==="drag-canvas"||this.type==="brush-select"||this.type==="lasso-select")&&t.get("canvas").set("draggable",!1),(0,_.each)(e,function(n,i){t.off(i,n)}),t.get("canvas").set("draggable",r)},get:function(t){return this[t]},set:function(t,e){return this[t]=e,this}},V=function(){function h(){}return h.registerBehavior=function(t,e){if(!e)throw new Error("please specify handler for this behavior: ".concat(t));var r=(0,_.clone)(Y);Object.assign(r,e);var n=function(a){var o=this;Object.assign(this,this.getDefaultCfg(),a);var s=this.getEvents();this.events=null;var d={};s&&((0,_.each)(s,function(y,C){d[C]=(0,_.wrapBehavior)(o,y)}),this.events=d)};n.prototype=r,h.types[t]=n},h.hasBehavior=function(t){return!!h.types[t]},h.getBehavior=function(t){return h.types[t]},h.types={},h}(),z=V,Z=z,J=M(90494),ee=M(31506),Q=function(t,e){var r=t.nodes,n=t.edges,i=[],a={};if(!r)throw new Error("invalid nodes data!");return r&&r.forEach(function(o,s){a[o.id]=s;var d=[];i.push(d)}),n&&n.forEach(function(o){var s=o.source,d=o.target,y=a[s],C=a[d];!y&&y!==0||!C&&C!==0||(i[y][C]=1,e||(i[C][y]=1))}),i},re=Q,fe=function(t,e){return t===e},me=function(){function h(t,e){e===void 0&&(e=null),this.value=t,this.next=e}return h.prototype.toString=function(t){return t?t(this.value):"".concat(this.value)},h}(),ae=function(){function h(t){t===void 0&&(t=fe),this.head=null,this.tail=null,this.compare=t}return h.prototype.prepend=function(t){var e=new me(t,this.head);return this.head=e,this.tail||(this.tail=e),this},h.prototype.append=function(t){var e=new me(t);return this.head?(this.tail.next=e,this.tail=e,this):(this.head=e,this.tail=e,this)},h.prototype.delete=function(t){if(!this.head)return null;for(var e=null;this.head&&this.compare(this.head.value,t);)e=this.head,this.head=this.head.next;var r=this.head;if(r!==null)for(;r.next;)this.compare(r.next.value,t)?(e=r.next,r.next=r.next.next):r=r.next;return this.compare(this.tail.value,t)&&(this.tail=r),e},h.prototype.find=function(t){var e=t.value,r=e===void 0?void 0:e,n=t.callback,i=n===void 0?void 0:n;if(!this.head)return null;for(var a=this.head;a;){if(i&&i(a.value)||r!==void 0&&this.compare(a.value,r))return a;a=a.next}return null},h.prototype.deleteTail=function(){var t=this.tail;if(this.head===this.tail)return this.head=null,this.tail=null,t;for(var e=this.head;e.next;)e.next.next?e=e.next:e.next=null;return this.tail=e,t},h.prototype.deleteHead=function(){if(!this.head)return null;var t=this.head;return this.head.next?this.head=this.head.next:(this.head=null,this.tail=null),t},h.prototype.fromArray=function(t){var e=this;return t.forEach(function(r){return e.append(r)}),this},h.prototype.toArray=function(){for(var t=[],e=this.head;e;)t.push(e),e=e.next;return t},h.prototype.reverse=function(){for(var t=this.head,e=null,r=null;t;)r=t.next,t.next=e,e=t,t=r;this.tail=this.head,this.head=e},h.prototype.toString=function(t){return t===void 0&&(t=void 0),this.toArray().map(function(e){return e.toString(t)}).toString()},h}(),Ee=ae,Le=function(){function h(){this.linkedList=new Ee}return h.prototype.isEmpty=function(){return!this.linkedList.head},h.prototype.peek=function(){return this.linkedList.head?this.linkedList.head.value:null},h.prototype.enqueue=function(t){this.linkedList.append(t)},h.prototype.dequeue=function(){var t=this.linkedList.deleteHead();return t?t.value:null},h.prototype.toString=function(t){return this.linkedList.toString(t)},h}(),De=Le,Ve=function(t,e,r){e===void 0&&(e=[]);var n=e.filter(function(s){return s.source===t||s.target===t});if(r==="target"){var i=function(d){return d.source===t};return n.filter(i).map(function(s){return s.target})}if(r==="source"){var a=function(d){return d.target===t};return n.filter(a).map(function(s){return s.source})}var o=function(d){return d.source===t?d.target:d.source};return n.map(o)},et=function(t,e){return e.filter(function(r){return r.source===t})},It=function(t,e){return e.filter(function(r){return r.source===t||r.target===t})},er=function(t){t===void 0&&(t=0);var e="".concat(Math.random()).split(".")[1].substr(0,5),r="".concat(Math.random()).split(".")[1].substr(0,5);return"".concat(t,"-").concat(e).concat(r)};function nr(h){h===void 0&&(h={});var t=h,e=function(){},r=function(){var n={};return function(i){var a=i.next,o=a;return n[o]?!1:(n[o]=!0,!0)}}();return t.allowTraversal=h.allowTraversal||r,t.enter=h.enter||e,t.leave=h.leave||e,t}var Fe=function(t,e,r,n){n===void 0&&(n=!0);var i=nr(r),a=new De,o=t.edges,s=o===void 0?[]:o;a.enqueue(e);for(var d="",y=function(){var F=a.dequeue();i.enter({current:F,previous:d}),Ve(F,s,n?"target":void 0).forEach(function(G){i.allowTraversal({previous:d,current:F,next:G})&&a.enqueue(G)}),i.leave({current:F,previous:d}),d=F};!a.isEmpty();)y()},Vt=Fe,$t=function(t){for(var e=t.nodes,r=e===void 0?[]:e,n=t.edges,i=n===void 0?[]:n,a=[],o={},s=[],d=function G(H){s.push(H),o[H.id]=!0;for(var ie=Ve(H.id,i),se=function(xe){var Ie=ie[xe];if(!o[Ie]){var qe=r.filter(function(ze){return ze.id===Ie});qe.length>0&&G(qe[0])}},ce=0;ce
','Find out how to get it here.'].join(`
`):['Your browser does not seem to support WebGL.
','Find out how to get it here.'].join(`
`)),e},addGetWebGLMessage:function(e){e=e||{};var r=e.parent!==void 0?e.parent:document.body,n=e.id!==void 0?e.id:"oldie",i=h().getWebGLErrorMessage();i.id=n,r.appendChild(i)}}},hs=(0,g.__assign)((0,g.__assign)((0,g.__assign)((0,g.__assign)({},Eo),v),p),c),va=hs,bc=va.radialLayout,Ds=function(){function h(t){this.type=t.type,this.radial=t.radial,this.config=t}return h.prototype.init=function(t){var e=this;if(this.data=t,this.radial){this.layoutMethod=function(r){var n=pu()[e.type](r,e.config);return bc(n),n};return}this.layoutMethod=function(r){return pu()[e.type](r,e.config)}},h.prototype.execute=function(){return this.layoutMethod(this.data,this.config)},h.prototype.layout=function(t){return this.init(t),this.execute()},h}(),zu=Ds;(0,ti.registerLayout)("grid",ti.GridLayout),(0,ti.registerLayout)("random",ti.RandomLayout),(0,ti.registerLayout)("force",ti.ForceLayout),(0,ti.registerLayout)("circular",ti.CircularLayout),(0,ti.registerLayout)("dagre",ti.DagreLayout),(0,ti.registerLayout)("dagreCompound",ti.DagreCompoundLayout),(0,ti.registerLayout)("radial",ti.RadialLayout),(0,ti.registerLayout)("concentric",ti.ConcentricLayout),(0,ti.registerLayout)("mds",ti.MDSLayout),(0,ti.registerLayout)("fruchterman",ti.FruchtermanLayout),(0,ti.registerLayout)("fruchterman-gpu",ti.FruchtermanGPULayout),(0,ti.registerLayout)("gForce",ti.GForceLayout),(0,ti.registerLayout)("force2",ti.Force2Layout),(0,ti.registerLayout)("gForce-gpu",ti.GForceGPULayout),(0,ti.registerLayout)("comboForce",ti.ComboForceLayout),(0,ti.registerLayout)("comboCombined",ti.ComboCombinedLayout),(0,ti.registerLayout)("forceAtlas2",ti.ForceAtlas2Layout);var tf=function(t,e){e.isCustomLayout=!0,ti.Layouts[t]=(0,ti.registerLayout)(t,e)},Yo=function(){function h(t,e){var r=t.toString(),n=new Blob(["importScripts('".concat(e,"');(").concat(r,")()")],{type:"text/javascript"});return new Worker(URL.createObjectURL(n))}return h}(),Zs=Yo,Ba=function(t){t===void 0&&(t="https://unpkg.com/@antv/layout@latest/dist/layout.min.js");function e(){var n={RUN:"LAYOUT_RUN",END:"LAYOUT_END",ERROR:"LAYOUT_ERROR",TICK:"LAYOUT_TICK",GPURUN:"GPU_LAYOUT_RUN",GPUEND:"GPU_LAYOUT_END"};layout.registerLayout("grid",layout.GridLayout),layout.registerLayout("random",layout.RandomLayout),layout.registerLayout("force",layout.ForceLayout),layout.registerLayout("circular",layout.CircularLayout),layout.registerLayout("dagre",layout.DagreLayout),layout.registerLayout("dagreCompound",layout.DagreCompoundLayout),layout.registerLayout("radial",layout.RadialLayout),layout.registerLayout("concentric",layout.ConcentricLayout),layout.registerLayout("mds",layout.MDSLayout),layout.registerLayout("fruchterman",layout.FruchtermanLayout),layout.registerLayout("fruchterman-gpu",layout.FruchtermanGPULayout),layout.registerLayout("gForce",layout.GForceLayout),layout.registerLayout("gForce-gpu",layout.GForceGPULayout),layout.registerLayout("comboForce",layout.ComboForceLayout),layout.registerLayout("comboCombined",layout.ComboCombinedLayout),layout.registerLayout("forceAtlas2",layout.ForceAtlas2Layout);function i(o){var s=o.data.type;return s===n.RUN||s===n.GPURUN}function a(o){var s=this,d=o.data.type;switch(d){case n.RUN:{var y=o.data,C=y.nodes,F=y.edges,G=y.layoutCfg,H=G===void 0?{}:G,ie=H.type,se=layout.getLayoutByName(ie);if(!se){this.postMessage({type:n.ERROR,message:"layout ".concat(ie," not found")});break}var ce;H.onLayoutEnd=function(){s.postMessage({type:n.END,nodes:C}),ce==null||ce.destroy()},ce=new se(H),ce.init({nodes:C,edges:F}),ce.execute();break}case n.GPURUN:{var de=o.data,xe=de.nodes,F=de.edges,Ie=de.layoutCfg,H=Ie===void 0?{}:Ie,qe=de.canvas,ie=H.type,se=layout.getLayoutByName(ie);if(!se){this.postMessage({type:n.ERROR,message:"layout ".concat(ie," not found")});break}if(ie.split("-")[1]!=="gpu"){this.postMessage({type:n.ERROR,message:"layout ".concat(ie," does not support GPU")});break}var ze=new se(H);ze.init({nodes:xe,edges:F}),ze.executeWithWorker(qe,this);break}default:break}}onmessage=function(s){i(s)&&a(s)}}var r=new Zs(e,t);return r},Ja={RUN:"LAYOUT_RUN",END:"LAYOUT_END",ERROR:"LAYOUT_ERROR",TICK:"LAYOUT_TICK",GPURUN:"GPU_LAYOUT_RUN",GPUEND:"GPU_LAYOUT_END"};function co(h){return co=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},co(h)}var Ns=function(t){return setTimeout(t,16)},Ec=function(t){return clearTimeout(t)},Hs={requestAnimationFrame:function(t){var e=typeof window!="undefined"&&(window.requestAnimationFrame||window.webkitRequestAnimationFrame)||Ns;return e(t)},cancelAnimationFrame:function(t){var e=typeof window!="undefined"&&(window.cancelAnimationFrame||window.webkitCancelAnimationFrame)||Ec;return e(t)}},Wu=["fruchterman","gForce"],Kf=["force","grid","circular"],rf=function(h){(0,g.__extends)(t,h);function t(e){var r=h.call(this,e)||this;return r.graph=e,r.layoutCfg=e.get("layout")||{},r.layoutType=r.getLayoutType(),r.worker=null,r.workerData={},r.initLayout(),r}return t.prototype.initLayout=function(){},t.prototype.getWorker=function(){return this.worker?this.worker:(typeof Worker=="undefined"?(console.warn("Web worker is not supported in current browser."),this.worker=null):this.worker=Ba(this.layoutCfg.workerScriptURL),this.worker)},t.prototype.stopWorker=function(){var e=this.workerData;!this.worker||(this.worker.terminate(),this.worker=null,e.requestId&&(Hs.cancelAnimationFrame(e.requestId),e.requestId=null),e.requestId2&&(Hs.cancelAnimationFrame(e.requestId2),e.requestId2=null))},t.prototype.execLayoutMethod=function(e,r){var n=this;return new Promise(function(i,a){return(0,g.__awaiter)(n,void 0,void 0,function(){var o,s,d,y,C,F,G,H,ie,se,G,ce;return(0,g.__generator)(this,function(de){switch(de.label){case 0:if(o=this.graph,!o||o.get("destroyed"))return[2];s=e.type,e.onLayoutEnd=function(){o.emit("aftersublayout",{type:s}),i()},s&&this.isGPU&&(this.hasGPUVersion(s)?s="".concat(s,"-gpu"):console.warn("The '".concat(s,"' layout does not support GPU calculation for now, it will run in CPU."))),d=s==="force"||s==="g6force"||s==="gForce"||s==="force2",d?(y=e.onTick,C=e.animate,F=C===void 0&&(s==="force"||s==="force2"),G=function(){y&&y(),(C||F)&&o.refreshPositions()},e.tick=G):(s==="comboForce"||s==="comboCombined")&&(e.comboTrees=o.get("comboTrees")),H=!1;try{ie=new ti.Layouts[s](e),this.layoutMethods[r]&&this.layoutMethods[r].destroy(),this.layoutMethods[r]=ie}catch(xe){console.warn("The layout method: '".concat(s,"' does not exist! Please specify it first.")),a()}return H=ie.enableTick,H&&(se=e.onTick,G=function(){se&&se(),o.refreshPositions()},ie.tick=G),ce=this.filterLayoutData(this.data,e),xc(ce,r),ie.init(ce),o.emit("beforesublayout",{type:s}),[4,ie.execute()];case 1:return de.sent(),ie.isCustomLayout&&e.onLayoutEnd&&e.onLayoutEnd(),[2]}})})})},t.prototype.updateLayoutMethod=function(e,r){var n=this;return new Promise(function(i,a){return(0,g.__awaiter)(n,void 0,void 0,function(){var o,s,d;return(0,g.__generator)(this,function(y){switch(y.label){case 0:return o=this.graph,s=r==null?void 0:r.type,r.onLayoutEnd=function(){o.emit("aftersublayout",{type:s}),i()},d=this.filterLayoutData(this.data,r),e.init(d),e.updateCfg(r),o.emit("beforesublayout",{type:s}),[4,e.execute()];case 1:return y.sent(),e.isCustomLayout&&r.onLayoutEnd&&r.onLayoutEnd(),[2]}})})})},t.prototype.layout=function(e){var r=this,n=this.graph;this.data=this.setDataFromGraph();var i=this.data,a=i.nodes,o=i.hiddenNodes;if(!a)return!1;var s=n.get("width"),d=n.get("height"),y={};Object.assign(y,{width:s,height:d,center:[s/2,d/2]},this.layoutCfg),this.layoutCfg=y;var C=y.type,F=this.destoryLayoutMethods();n.emit("beforelayout"),(F==null?void 0:F.length)&&C&&(F==null?void 0:F.length)===1&&F[0]===C?this.tweakInit():this.initPositions(y.center,a),this.initPositions(y.center,o),C&&C.split("-")[1]==="gpu"&&(C=C.split("-")[0],y.gpuEnabled=!0);var G=!1;y.gpuEnabled&&(G=!0,Uu().webgl||(console.warn("Your browser does not support webGL or GPGPU. The layout will run in CPU."),G=!1)),this.isGPU=G;var H=y.onLayoutEnd,ie=y.layoutEndFormatted,se=y.adjust;if(ie||(y.layoutEndFormatted=!0,y.onAllLayoutEnd=function(){return(0,g.__awaiter)(r,void 0,void 0,function(){return(0,g.__generator)(this,function(xe){switch(xe.label){case 0:return H&&H(a),this.refreshLayout(),se&&y.pipes?[4,this.adjustPipesBox(this.data,se)]:[3,2];case 1:xe.sent(),this.refreshLayout(),xe.label=2;case 2:return n.emit("afterlayout"),[2]}})})}),this.stopWorker(),y.workerEnabled&&this.layoutWithWorker(this.data,e))return!0;var ce=Promise.resolve(),de=!1;return y.type?(de=!0,ce=ce.then(function(){return(0,g.__awaiter)(r,void 0,void 0,function(){return(0,g.__generator)(this,function(xe){switch(xe.label){case 0:return[4,this.execLayoutMethod(y,0)];case 1:return[2,xe.sent()]}})})})):y.pipes&&(de=!0,y.pipes.forEach(function(xe,Ie){ce=ce.then(function(){return(0,g.__awaiter)(r,void 0,void 0,function(){return(0,g.__generator)(this,function(qe){switch(qe.label){case 0:return[4,this.execLayoutMethod(xe,Ie)];case 1:return[2,qe.sent()]}})})})})),de?ce.then(function(){y.onAllLayoutEnd&&y.onAllLayoutEnd(),e&&e()}).catch(function(xe){console.warn("graph layout failed,",xe)}):(n.refreshPositions(),e==null||e()),!1},t.prototype.tweakInit=function(){var e=this,r=e.data,n=e.graph,i=r.nodes,a=r.edges;if(!!(i==null?void 0:i.length)){var o={};i.forEach(function(y){var C=y.x,F=y.y;!isNaN(C)&&!isNaN(F)&&(o[y.id]={x:C,y:F},y.mass=y.mass||2)}),a.forEach(function(y){var C=y.source,F=y.target,G=o[C],H=o[F];!G&&H?o[C]={x:H.x+(Math.random()-.5)*80,y:H.y+(Math.random()-.5)*80}:!H&&G&&(o[F]={x:G.x+(Math.random()-.5)*80,y:G.y+(Math.random()-.5)*80})});var s=n.get("width"),d=n.get("height");i.forEach(function(y){var C=o[y.id]||{x:s/2+(Math.random()-.5)*20,y:d/2+(Math.random()-.5)*20};y.x=C.x,y.y=C.y})}},t.prototype.initWithPreset=function(){var e=this,r=e.layoutCfg,n=e.data,i=r.preset;if(!(i==null?void 0:i.type)||!ti.Layouts[i==null?void 0:i.type])return!1;var a=new ti.Layouts[i==null?void 0:i.type](i);return a.layout(n),delete r.preset,!0},t.prototype.layoutWithWorker=function(e,r){var n=this,i=this,a=i.layoutCfg,o=i.graph,s=this.getWorker(),d=this.workerData;if(!s)return!1;d.requestId=null,d.requestId2=null,d.currentTick=null,d.currentTickData=null,o.emit("beforelayout");var y=Promise.resolve(),C=!1;if(a.type)C=!0,y=y.then(function(){return n.runWebworker(s,e,a)});else if(a.pipes){C=!0;for(var F=function(ce){y=y.then(function(){return n.runWebworker(s,e,ce)})},G=0,H=a.pipes;Gd){r.set("d",o);var y=r.get("r");r.set("molecularParam",(o+1)*y),r.magnify(e)}r.set("dragPrePos",{x:e.x,y:e.y})},t.prototype.magnify=function(e,r){var n=this;n.restoreCache();var i=n.get("graph"),a=n.get("cachedMagnifiedModels"),o=n.get("cachedOriginPositions"),s=n.get("showLabel"),d=n.get("r"),y=n.get("r2"),C=n.get("d"),F=n.get("molecularParam"),G=i.getNodes(),H=G.length,ie=r?{x:r.x,y:r.y}:{x:e.x,y:e.y};n.get("dragging")&&(n.get("trigger")==="mousemove"||n.get("trigger")==="click")&&(ie=n.get("cacheCenter"));var se=n.get("delegateCenterDiff");se&&(ie.x+=se.x,ie.y+=se.y),n.updateDelegate(ie,d);for(var ce=0;ce
-
",F=r?"":"".concat(s,"
"),G="x
",H=r?"".concat(y,"px"):"".concat(y,"px ").concat(y,"px 0 0");return'