UNPKG

@savantly/ngx-graphexp

Version:

Gremlin client [Tinkerpop] for an Angular app

3 lines (2 loc) 44.1 kB
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@savantly/gremlin-js"),require("rxjs/BehaviorSubject"),require("d3"),require("rxjs/Observable"),require("@angular/material"),require("@angular/common"),require("@angular/forms"),require("@angular/flex-layout")):"function"==typeof define&&define.amd?define(["exports","@angular/core","@savantly/gremlin-js","rxjs/BehaviorSubject","d3","rxjs/Observable","@angular/material","@angular/common","@angular/forms","@angular/flex-layout"],e):e((t.savantly=t.savantly||{},t.savantly["ngx-graphexp"]={}),t.ng.core,t.gremlinJs,t.Rx,t.d3,t.Rx,t.ng.material,t.ng.common,t.ng.forms,t.ng["flex-layout"])}(this,function(t,e,n,o,r,i,a,s,l,c){"use strict";var d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};function p(t){var e="function"==typeof Symbol&&t[Symbol.iterator],n=0;return e?e.call(t):{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}var u={GraphSON1:1,GraphSON2:2,GraphSON3:3};u[u.GraphSON1]="GraphSON1",u[u.GraphSON2]="GraphSON2",u[u.GraphSON3]="GraphSON3";var h=function(){return function(){}}(),g=function(){function t(t){this.COMMUNICATION_METHOD=u.GraphSON3,this.graphInfoData=new o.BehaviorSubject({}),this.nodeNames=new o.BehaviorSubject([]),this.nodeProperties=new o.BehaviorSubject([]),this.edgeProperties=new o.BehaviorSubject([]),this.node_limit_per_request=50,this.gremlinService=new n.GremlinService(t)}return t.prototype.queryGraphInfo=function(){var t=this;this.executeQuery("nodes = g.V().groupCount().by(label);nodesprop = g.V().valueMap().select(keys).groupCount();edges = g.E().groupCount().by(label);edgesprop = g.E().valueMap().select(keys).groupCount();[nodes.toList(),nodesprop.toList(),edges.toList(),edgesprop.toList()]").then(function(e){t.handleGraphInfo(e.data)})},t.prototype.queryNodes=function(t,e){var n=this,o=e,r=t,i=o;i.length>50&&(i=i.substring(0,50));var a=null,s=null,l=null;if(""===o)a="nodes = g.V().limit("+this.node_limit_per_request+")",s="edges = g.V().limit("+this.node_limit_per_request+").aggregate('node').outE().as('edge').inV().where(within('node')).select('edge')",l=a+"\n"+s+"\n[nodes.toList(),edges.toList()]";else{var c="has('"+r+"', '"+i+"')";this.isInt(o)&&(c="has('"+r+"', "+i+")"),l="g.V()."+c,l=(a="nodes = g.V()."+c)+"\n"+(s="edges = g.V()."+c+".aggregate('node').outE().as('edge').inV().where(within('node')).select('edge')")+"\n[nodes.toList(),edges.toList()]"}return console.log(l),new Promise(function(t,e){n.executeQuery(l).then(function(e){t(n.arrangeData(e.data))},function(t){e(t)})})},t.prototype.getRelatedNodes=function(t){var e=this,n=t.id;isNaN(n)&&(n="'"+n+"'");var o="nodes = g.V("+n+").as('node').both().as('node').select(all,'node').inject(g.V("+n+")).unfold()"+"\n "+("edges = g.V("+n+").bothE()")+"\n[nodes.toList(),edges.toList()]";return new Promise(function(t,n){e.executeQuery(o).then(function(n){t(e.arrangeData(n.data))},function(t){n(t)})})},t.prototype.createNode=function(t,e){var n=this;return new Promise(function(o,r){var i="";e.forEach(function(t){i+=", '"+t.key+"', '"+t.value+"'"});var a="vertex = graph.addVertex(label, '"+t+"'"+i+")";console.log("executing query: "+a),n.executeQuery(a).then(function(t){o(t.data)},function(t){console.error(t),r(t)})})},t.prototype.createLink=function(t){var e=this;t.properties;return new Promise(function(n,o){var r="edge = g.V("+t.source+").next().addEdge('"+t.label+"',g.V("+t.target+").next());";console.log("executing query: "+r),e.executeQuery(r).then(function(t){n(t.data)},function(t){console.error(t),o(t)})})},t.prototype.executeQuery=function(t,e){var n=this;return new Promise(function(o,r){var i=n.gremlinService.createQuery(t,e);i.onComplete=function(t){o(t)},n.gremlinService.sendMessage(i)})},t.prototype.handleGraphInfo=function(t){this.COMMUNICATION_METHOD===u.GraphSON3&&(t=this.graphson3to1(t));var e=[];t[0].map(function(t){try{for(var n=p(Object.keys(t)),o=n.next();!o.done;o=n.next()){var r=o.value;e.push({key:r,value:t[r]})}}catch(s){i={error:s}}finally{try{o&&!o.done&&(a=n["return"])&&a.call(n)}finally{if(i)throw i.error}}var i,a}),this.nodeNames.next(e),this.graphInfoData.next(t),this.nodeProperties.next(this.make_properties_list(t[1][0])),this.edgeProperties.next(this.make_properties_list(t[3][0]))},t.prototype.graphson3to1=function(t){if(!(Array.isArray(t)||"object"==typeof t&&null!==t))return t;if("@type"in t){if("g:List"===t["@type"])return t=t["@value"],this.graphson3to1(t);if("g:Set"===t["@type"])return t=t["@value"];if("g:Map"===t["@type"]){for(var e={},n=0;n<t["@value"].length;n+=2){var o=t["@value"][n];"object"==typeof o&&null!==o&&(o=this.graphson3to1(o)),Array.isArray(o)&&(o=JSON.stringify(o).replace(/\'/g," ")),e[o]=this.graphson3to1(t["@value"][n+1])}return t=e}return"object"==typeof(t=t["@value"])&&null!==t&&(t=this.graphson3to1(t)),t}if(Array.isArray(t)||"object"==typeof t&&null!==t){try{for(var r=p(Object.keys(t)),i=r.next();!i.done;i=r.next()){var a=i.value;t[a]=this.graphson3to1(t[a])}}catch(c){s={error:c}}finally{try{i&&!i.done&&(l=r["return"])&&l.call(r)}finally{if(s)throw s.error}}return t}return t;var s,l},t.prototype.arrangeData=function(t){return this.COMMUNICATION_METHOD===u.GraphSON3?(t=this.graphson3to1(t),this.arrange_datav3(t)):this.arrange_datav2(t)},t.prototype.arrange_datav3=function(t){var e,n,o=this,r=[],i=[];try{for(var a=p(Object.keys(t)),s=a.next();!s.done;s=a.next()){t[s.value].forEach(function(t){"inV"in t||null!=o.idIndex(r,t.id)||(t.type="vertex",r.push(o.extract_infov3(t))),"inV"in t&&null==o.idIndex(i,t.id)&&(t.type="edge",i.push(o.extract_infov3(t)))})}}catch(l){e={error:l}}finally{try{s&&!s.done&&(n=a["return"])&&n.call(a)}finally{if(e)throw e.error}}return{nodes:r,links:i}},t.prototype.arrange_datav2=function(t){var e,n,o=[],r=[];try{for(var i=p(Object.keys(t)),a=i.next();!a.done;a=i.next()){t[a.value].forEach(function(t){"vertex"===t.type&&null===this.idIndex(o,t.id)&&o.push(this.extract_infov2(t)),"edge"===t.type&&null==this.idIndex(r,t.id)&&r.push(this.extract_infov2(t))})}}catch(s){e={error:s}}finally{try{a&&!a.done&&(n=i["return"])&&n.call(i)}finally{if(e)throw e.error}}return{nodes:o,links:r}},t.prototype.extract_infov2=function(t){var e={id:t.id,label:t.label,type:t.type,properties:{},source:null,target:null},n=t.properties;for(var o in n)n.hasOwnProperty(o)&&(e.properties[o]=n[o]);return"edge"===t.type&&(e.source=t.outV,e.target=t.inV),e},t.prototype.extract_infov3=function(t){var e={id:t.id,label:t.label,type:t.type,properties:{},source:null,target:null},n=t.properties;for(var o in n)if(n.hasOwnProperty(o)){var r=null;"vertex"===t.type?(r=n[o]).summary=this.get_vertex_prop_in_list(n[o]).toString():r=n[o].value,e.properties[o]=r}return"edge"===t.type&&(e.source=t.outV,e.target=t.inV),e},t.prototype.get_vertex_prop_in_list=function(t){var e,n,o=[];try{for(var r=p(Object.keys(t)),i=r.next();!i.done;i=r.next()){var a=i.value;o.push(t[a].value)}}catch(s){e={error:s}}finally{try{i&&!i.done&&(n=r["return"])&&n.call(r)}finally{if(e)throw e.error}}return o},t.prototype.idIndex=function(t,e){for(var n=0;n<t.length;n++)if(t[n].id===e)return n;return null},t.prototype.make_properties_list=function(t){var e={};try{for(var n=p(Object.keys(t)),o=n.next();!o.done;o=n.next())for(var r=o.value,i=(r=r.replace(/[\[\ \"\'\]]/g,"")).split(","),a=0;a<i.length;a++)e[i[a]]=0}catch(y){s={error:y}}finally{try{o&&!o.done&&(l=n["return"])&&l.call(n)}finally{if(s)throw s.error}}var s,l,c,d,u=[];try{for(var h=p(Object.getOwnPropertyNames(e)),g=h.next();!g.done;g=h.next()){var f=g.value;u.push(f)}}catch(v){c={error:v}}finally{try{g&&!g.done&&(d=h["return"])&&d.call(h)}finally{if(c)throw c.error}}return u},t.prototype.isInt=function(t){return!isNaN(t)&&!isNaN(parseInt(t,10))},t.prototype.updateSelection=function(t){console.log("graphexpService#updateSelection: edge selected: "+t.id)},t}();g.decorators=[{type:e.Injectable}],g.ctorParameters=function(){return[null]};var f=function(){return function(){this.enableEdit=!0,this.nodeLabels=[],this.linkLabels=[],this.numberOfLayers=3,this.format=u.GraphSON3,this.force_strength=-600,this.link_strength=.2,this.force_x_strength=.1,this.force_y_strength=.1,this.default_node_size=15,this.default_stroke_width=2,this.default_node_color="#80E810",this.active_node_margin=6,this.active_node_margin_opacity=.3,this.default_edge_stroke_width=3,this.default_edge_color="#CCC",this.edge_label_color="#111",this.colorPalette=r.scaleOrdinal(r.schemeCategory20)}}(),y=function(){function t(t){this.properties={},Object.assign(this,t)}return t.prototype.addProperty=function(t,e){this.properties[t]=e},t.prototype.removeProperty=function(t){delete this.properties[t]},t}(),v=function(){function t(t){this.graphViz=t,this.old_Nodes=[],this.old_Links=[],this._Nodes=[],this._Links=[]}return t.prototype.depth=function(){return this.config.numberOfLayers},Object.defineProperty(t.prototype,"config",{get:function(){return this.graphViz.config},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"nodes",{get:function(){return this._Nodes},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"links",{get:function(){return this._Links},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_svg",{get:function(){return this.graphViz.graphRoot},enumerable:!0,configurable:!0}),t.prototype.push_layers=function(){for(var t=this.config.numberOfLayers;t>0;t--){var e=t-1;this._svg.selectAll(".old_edge"+e).classed("old_edge"+t,!0),this._svg.selectAll(".old_node"+e).classed("old_node"+t,!0),this._svg.selectAll(".old_edgepath"+e).classed("old_edgepath"+t,!0),this._svg.selectAll(".old_edgelabel"+e).classed("old_edgelabel"+t,!0)}},t.prototype.clear_old=function(){this.old_Nodes=[],this.old_Links=[]},t.prototype.update_data=function(t){var e=this._svg.selectAll("g").filter(".active_node").data();this.old_Nodes=this.updateAdd(this.old_Nodes,e);var n=this._svg.selectAll(".active_edge").data();this.old_Links=this.updateAdd(this.old_Links,n);var o=this._svg.selectAll("g").filter(".pinned").data();this._Nodes=t.nodes,this._Nodes=this.updateAdd(this._Nodes,o),this._Nodes=this.transfer_coordinates(this._Nodes,this.old_Nodes),this._Links=t.links.concat(n),this._Links=this.find_active_links(this._Links,this._Nodes)},t.prototype.updateAdd=function(t,e){var n=e.slice(0),o=[];t.forEach(function(t,e,r){for(var i=0;i<n.length;i++)t.id===n[i].id&&(r[e]=n[i],o.push(i))}),o.sort();for(var r=o.length-1;r>=0;r--)n.splice(o[r],1);return t.concat(n)},t.prototype.find_active_links=function(t,e){var n=[];t.forEach(function(t){for(var o=0;o<e.length;o++)for(var r=0;r<e.length;r++){if(e[o].id===t.source.id&&e[r].id===t.target.id)(i=new y(t)).source=t.source.id,i.target=t.target.id,n=n.concat(i);else if(e[o].id===t.source&&e[r].id===t.target){var i=t;n=n.concat(i)}}});for(var o={},r=0;r<n.length;r++)o[n[r].id]=n[r];var i,a,s=[];try{for(var l=p(Object.keys(o)),c=l.next();!c.done;c=l.next()){var d=c.value;s.push(o[d])}}catch(u){i={error:u}}finally{try{c&&!c.done&&(a=l["return"])&&a.call(l)}finally{if(i)throw i.error}}return s},t.prototype.transfer_coordinates=function(t,e){for(var n=0;n<e.length;n++)for(var o=0;o<t.length;o++)t[o].id===e[n].id&&(t[o].x=e[n].x,t[o].y=e[n].y,t[o].fx=e[n].x,t[o].fy=e[n].y,t[o].vx=e[n].vx,t[o].vy=e[n].vy);return t},t.prototype.remove_duplicates=function(t,e){var n=this;r.selectAll(t).each(function(t){for(var o=t.id,i=0;i<n.config.numberOfLayers;i++){r.selectAll(e+i).each(function(t){t.id===o&&r.select(n).remove()})}})},t}(),m=function(){function t(t,e,n){this.graphSONFormat=t,this.graph_viz=e,this.graphexpService=n,r.selection.prototype.moveToFront=function(){return this.each(function(){this.parentNode.appendChild(this)})},r.selection.prototype.moveToBack=function(){return this.each(function(){var t=this.parentNode.firstChild;t&&this.parentNode.insertBefore(this,t)})}}return t.prototype.decorate_old_elements=function(t){for(var e=function(e){r.selectAll(".old_edge"+e).style("opacity",function(){return.8*(1-e/t)}),r.selectAll(".old_node"+e).style("opacity",function(){return.8*(1-e/t)}),r.selectAll(".old_edgelabel"+e).style("opacity",function(){return.8*(1-e/t)})},n=0;n<t;n++)e(n)},t.prototype.show_names=function(t){var e=r.selectAll(".text_details");t?e.style("visibility","visible"):e.style("visibility","hidden")},t}(),b=function(){function t(t){this.graphViz=t}return Object.defineProperty(t.prototype,"config",{get:function(){return this.graphViz.config},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"graphRoot",{get:function(){return this.graphViz.graphRoot},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"linkModels",{get:function(){return this.graphViz.linkModels},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"nodeModels",{get:function(){return this.graphViz.nodeModels},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selectLinks",{get:function(){return this.graphViz.selectLinks},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selectEdgePaths",{get:function(){return this.graphViz.selectEdgePaths},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selectEdgeLabels",{get:function(){return this.graphViz.selectEdgeLabels},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selectGraphNodes",{get:function(){return this.graphViz.selectGraphNodes},enumerable:!0,configurable:!0}),t.prototype.update=function(t){this.selectLinks.exit().classed("old_edge0",!0).classed("active_edge",!1),this.selectEdgePaths.exit().classed("old_edgepath0",!0).classed("active_edgepath",!1),this.selectEdgeLabels.exit().classed("old_edgelabel0",!0).classed("active_edgelabel",!1);var e=this.selectEdgePaths.enter(),n=this.selectEdgeLabels.enter(),o=this.selectLinks.enter(),r=this.decorate(o,e,n),i=r[0],a=r[1],s=r[2];i.merge(this.selectLinks),a.merge(this.selectEdgePaths),s.merge(this.selectEdgeLabels)},t.prototype.tick=function(){this.selectLinks.attr("x1",function(t){return t.source.x}).attr("y1",function(t){return t.source.y}).attr("x2",function(t){return t.target.x}).attr("y2",function(t){return t.target.y}),this.selectEdgePaths.attr("d",function(t){return"M "+t.source.x+" "+t.source.y+" L "+t.target.x+" "+t.target.y}),this.selectEdgeLabels.attr("transform",function(t){if(t.target.x<t.source.x){var e=this.getBBox();return"rotate(180 "+(e.x+e.width/2)+" "+(e.y+e.height/2)+")"}return"rotate(0)"})},t.prototype.getStrokeWidth=function(t){return"stroke_width"in t?t.stroke_width:this.config.default_edge_stroke_width},t.prototype.getEdgeText=function(t){return"text"in t?t.text:t.properties.weight},t.prototype.getEdgeColor=function(t){return"color"in t?t.color:this.config.default_edge_color},t.prototype.decorate=function(t,e,n){var o=this,r=t.append("line").attr("class","edge").classed("active_edge",!0).attr("source_ID",function(t){return t.source}).attr("target_ID",function(t){return t.target}).attr("ID",function(t){return t.id});this.createMarkers(r),r.attr("marker-end",function(t){return"url(#marker_"+t.id+")"}).attr("stroke-width",function(t){return o.getStrokeWidth(t)}).append("title").text(function(t){return t.properties.weight});var i=this.createEdgeLabels(e,n),a=i[0],s=i[1];return s.append("textPath").attr("class","edge_text").attr("href",function(t,e){return"#edgepath"+t.id}).style("text-anchor","middle").style("pointer-events","none").attr("startOffset","50%").text(function(t){return t.label}),this.attachEdgeEvents(r),this.addEnabledProperties("edges",s),[r,a,s]},t.prototype.nodeModelById=function(t){for(var e in this.nodeModels)if(this.nodeModels[e].id===t)return this.nodeModels[e]},t.prototype.createMarkers=function(t){var e=this,n=t.data(),o=this.graphRoot.selectAll(".arrow").data().concat(n);this.graphRoot.selectAll(".arrow").data(o).enter().append("marker").attr("class","arrow").attr("id",function(t){return"marker_"+t.id}).attr("markerHeight",5).attr("markerWidth",5).attr("markerUnits","strokeWidth").attr("orient","auto").attr("refX",function(t){var n=e.nodeModelById(t.target);return e.graphViz.graphNodes.getNodeSize(n)+e.graphViz.graphNodes.getNodeStrokeWidth(n)}).attr("refY",0).attr("viewBox","0 -5 10 10").append("svg:path").attr("d","M0,-5L10,0L0,5").style("fill",function(t){return e.getEdgeColor(t)})},t.prototype.addEnabledProperties=function(t,e){for(var n=[],o=0;o<n.length;o++){var r=n[o],i=o;this.graphViz.attachEnabledProperties(e,r,i,t)}},t.prototype.createEdgeLabels=function(t,e){return[t.append("path").attr("class","edgepath").classed("active_edgepath",!0).attr("fill-opacity",0).attr("stroke-opacity",0).attr("id",function(t,e){return"edgepath"+t.id}).attr("ID",function(t){return t.id}).style("pointer-events","none"),e.append("text").attr("dy",-3).style("pointer-events","none").attr("class","edgelabel").classed("active_edgelabel",!0).attr("id",function(t,e){return"edgelabel"+t.id}).attr("ID",function(t){return t.id}).attr("font-size",10).attr("fill",this.config.edge_label_color)]},t.prototype.attachEdgeEvents=function(t){t.on("mouseover",function(t,e,n){console.log("mouse over!!");var o=n[e];r.select(o).selectAll(".text_details").style("visibility","visible")}).on("mouseout",function(t,e,n){var o=n[e];r.select(o).selectAll(".text_details").style("visibility","hidden")}).on("click",function(t,e,n){console.log("edge clicked!")})},t}(),_=function(){function t(t){this.graphViz=t,this.connectionCreated=new o.BehaviorSubject(null)}return Object.defineProperty(t.prototype,"config",{get:function(){return this.graphViz.config},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"graphRoot",{get:function(){return this.graphViz.graphRoot},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"nodeModels",{get:function(){return this.graphViz.nodeModels},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"simulation",{get:function(){return this.graphViz.simulation},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isShifted",{get:function(){return!0===window.event.shiftKey},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"graphNodes",{get:function(){return this.graphViz.selectGraphNodes},enumerable:!0,configurable:!0}),t.prototype.mouseXY=function(t){var e=r.mouse(t);return{x:e[0],y:e[1]}},t.prototype.tick=function(){this.graphNodes.attr("transform",function(t){return"translate("+t.x+", "+t.y+")"})},t.prototype.update=function(t){console.log("GraphNodes#update"),this.graphNodes.exit().classed("old_node0",!0).classed("active_node",!1);var e=this.graphNodes.enter();e=this.decorateNodes(e).merge(e)},t.prototype.decorateNodes=function(t){var e=this,n=this,o=t.append("g").attr("class","active_node").attr("ID",function(t){return t.id}).classed("node",!0);return this.attachNodeEvents(o),o.moveToFront(),o.append("circle").classed("base_circle",!0).attr("r",function(t){return e.getNodeSize(t)}).style("stroke-width",function(t){return e.getNodeStrokeWidth(t)}).style("stroke","black").attr("fill",function(t){return e.getNodeColor(t)}).append("title").text(function(t){return e.getNodeText(t)}),o.append("text").classed("text_details",!0).attr("x",function(t){return e.config.default_node_size+2}).text(function(t){return e.getNodeText(t)}).style("visibility","hidden"),o.append("text").classed("text_details",!0).attr("x",function(t){return e.config.default_node_size+4}).attr("y",this.config.default_node_size).text(function(t){return e.getNodeSubText(t)}).style("visibility","hidden"),o.append("circle").classed("Pin",!0).attr("r",function(t){return e.config.default_node_size/2}).attr("transform",function(t){return"translate("+3*e.config.default_node_size/4+","+3*-e.config.default_node_size/4+")"}).attr("fill",this.config.default_node_color).moveToBack().style("visibility","hidden").on("click",function(t){n.pinIt(this,t)}),o},t.prototype.attachNodeEvents=function(t){var e=this,n=this;t.call(r.drag().on("start",function(t){n.isShifted?n.dragConnectionStarted(t):n.dragNodeStarted(t)}).on("drag",function(t){n.isShifted?n.draggingConnection(t):n.draggingNode(t)}).on("end",function(t){e.isShifted?e.dragConnectionEnded(t):e.dragNodeEnded(t)})),t.on("click",function(t){e.clicked(t)}).on("mouseover",function(){r.select(this).select(".Pin").style("visibility","visible"),r.select(this).selectAll(".text_details").style("visibility","visible")}).on("mouseout",function(){r.select(this).classed("pinned")||r.select(this).select(".Pin").style("visibility","hidden"),this.show_name||r.select(this).selectAll(".text_details").style("visibility","hidden")})},t.prototype.getConnectedEdgesByNodeId=function(t){return r.selectAll(".edge").filter(function(e){return e.source===t||e.source.id===t?e:e.target===t||e.target.id===t?e:void 0})},t.prototype.dragConnectionStarted=function(t){this.mouseDownNode=t},t.prototype.dragNodeStarted=function(t){r.event.active||this.simulation.alphaTarget(.3).restart(),t.fx=t.x,t.fy=t.y},t.prototype.draggingConnection=function(t){if(this.mouseDownNode){this.graphViz.dragLine.classed("hidden",!1);var e=this.graphRoot.attr("transform");this.graphViz.dragLine.attr("d","M "+t.x+","+t.y+" L "+r.event.x+", "+r.event.y).attr("transform",e),console.log("dragging new connection")}},t.prototype.draggingNode=function(t){var e=this.getConnectedEdgesByNodeId(t.id).filter("*:not(.active_edge)");0===e._groups[0].length?(t.fx=r.event.x,t.fy=r.event.y):e.style("stroke-width",function(){return parseInt(r.select(this).attr("stroke-width"),10)+2}).style("stroke-opacity",1).classed("blocking",!0)},t.prototype.dragConnectionEnded=function(t){var e=r.event.sourceEvent.toElement;this.graphViz.dragLine.classed("hidden",!0),console.log("connecting to: "+e),this.connectionCreated.next({source:this.mouseDownNode,target:r.select(e).data()[0]})},t.prototype.dragNodeEnded=function(t){r.event.active||this.simulation.alphaTarget(0),r.selectAll(".blocking").style("stroke-width",function(){return r.select(this).attr("stroke-width")}).style("stroke-opacity",function(){return r.select(this).attr("stroke-opacity")}).classed("blocking",!1)},t.prototype.clicked=function(t){r.select(".focus_node").remove(),this.simulation.stop();var e=this.graphViz.graphLayers.depth()-1;this.graphRoot.selectAll(".old_node"+e).remove(),this.graphRoot.selectAll(".old_edge"+e).remove(),this.graphRoot.selectAll(".old_edgepath"+e).remove(),this.graphRoot.selectAll(".old_edgelabel"+e).remove(),this.graphViz.displayInfo(t),this.graphViz.loadRelatedNodes(t),console.log("node clicked")},t.prototype.pinIt=function(t,e){var n=this;r.event.stopPropagation();var o=r.select(t),i=r.select(t.parentNode);!i.empty()&&i.classed("active_node")&&(i.classed("pinned")?(i.classed("pinned",!1),console.log("Unpinned!"),o.attr("fill",function(){return n.getNodeColor(e)})):(i.classed("pinned",!0),console.log("Pinned!"),o.attr("fill","#000"),i.moveToFront()))},t.prototype.colorize=function(t){var e=this,n=null,o=r.selectAll(".node").data();if("none"===t)r.selectAll(".base_circle").style("fill",function(t){return e.getNodeColor(t)}),r.selectAll(".Pin").style("fill",function(t){return e.getNodeColor(t)});else if("label"===t){var i=new Set(o.map(function(t){return t.label}));n=r.scaleOrdinal().domain(i).range(r.range(0,i.size)),r.selectAll(".base_circle").style("fill",function(t){return e.config.colorPalette(n(t.label))}),r.selectAll(".Pin").style("fill",function(t){return e.config.colorPalette(n(t.label))})}else{i=new Set(o.map(function(e){if("undefined"!=typeof e.properties[t])return e.properties[t][0].value}));n=r.scaleOrdinal().domain(i).range(r.range(0,i.size)),r.selectAll(".base_circle").style("fill",function(o){return"undefined"!=typeof o.properties[t]?e.config.colorPalette(n(o.properties[t][0].value)):e.getNodeColor(o)}),r.selectAll(".Pin").style("fill",function(o){return"undefined"!=typeof o.properties[t]?e.config.colorPalette(n(o.properties[t][0].value)):e.getNodeColor(o)})}},t.prototype.getNodeSize=function(t){return"size"in t?t.size:this.config.default_node_size},t.prototype.getNodeStrokeWidth=function(t){return"stroke_width"in t?t.stroke_width:this.config.default_stroke_width},t.prototype.getNodeColor=function(t){return this.config.default_node_color},t.prototype.getNodeTitle=function(t){return"node_title"in t?t.node_title:t.label},t.prototype.getNodeText=function(t){return"node_text"in t?t.node_text:t.id},t.prototype.getNodeSubText=function(t){return"node_subtext"in t?t.node_subtext:t.label},t}(),x=function(){function t(t,e){this.graphexpService=t,this._config=e,this._graphWidth=0,this._graphHeight=0,this._simulation={},this.state={shiftNodeDrag:!1},this.selectedNode=new o.BehaviorSubject(null),this.createNodeEvent=new o.BehaviorSubject(null)}return Object.defineProperty(t.prototype,"config",{get:function(){return this._config},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"simulation",{get:function(){return this._simulation},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"graphRoot",{get:function(){return this._graphRoot},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"nodeModels",{get:function(){return this._graphLayers.nodes},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"graphLayers",{get:function(){return this._graphLayers},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"graphNodes",{get:function(){return this._graphNodes},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"linkModels",{get:function(){return this._graphLayers._Links},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selectLinks",{get:function(){return this.graphRoot.selectAll(".active_edge").data(this.linkModels,function(t){return t.id})},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selectEdgePaths",{get:function(){return this.graphRoot.selectAll(".active_edgepath").data(this.linkModels,function(t){return t.id})},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selectEdgeLabels",{get:function(){return this.graphRoot.selectAll(".active_edgelabel").data(this.linkModels,function(t){return t.id})},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selectGraphNodes",{get:function(){return this.graphRoot.selectAll("g").filter(".active_node").data(this.nodeModels,function(t){return t.id})},enumerable:!0,configurable:!0}),t.prototype.clear=function(){console.log(this._simulation),0!==Object.keys(this._simulation).length&&(this._simulation.stop(),this._simulation.nodes([]),this._simulation.force("link").links([])),this._graphRoot.selectAll("*").remove(),this.nodeModels.length=0,this.linkModels.length=0,this._graphLayers.clear_old(),this._simulation={}},t.prototype.addzoom=function(t){var e=this;t.append("rect").attr("width",this._graphWidth).attr("height",this._graphHeight).style("fill","none").style("pointer-events","all").call(r.zoom().scaleExtent([.5,4]).on("zoom",function(){e._graphRoot.attr("transform",r.event.transform)}))},t.prototype.simulationStart=function(t){var e,n;return this._simulation=r.forceSimulation().force("charge",r.forceManyBody().strength(this._config.force_strength)).force("link",r.forceLink().strength(this._config.link_strength).id(function(t){return t.id})),1===t?(n=this._config.force_x_strength,e=this._config.force_y_strength,this._simulation.force("center",r.forceCenter(this._graphWidth/2,this._graphHeight/2))):(n=0,e=0),this._simulation.force("y",r.forceY().strength(function(t){return n})).force("x",r.forceX().strength(function(t){return e})),this._simulation},t.prototype.refreshData=function(t,e,n){var o=this,r=this.graphRoot;this._graphLayers.push_layers(),this._graphLayers.update_data(t),this._graphLinks.update(t),this._graphNodes.update(t),this._graphShapes.decorate_old_elements(this._graphLayers.depth()),r.selectAll("g").filter(".pinned").moveToFront(),this._graphLayers.remove_duplicates(".active_node",".old_node"),this._graphLayers.remove_duplicates(".active_edge",".old_edge"),this._graphLayers.remove_duplicates(".active_edgepath",".old_edgepath"),this._graphLayers.remove_duplicates(".active_edgelabel",".old_edgelabel"),this._simulation=this.simulationStart(e),this._simulation.nodes(this.nodeModels).on("tick",function(){o._graphNodes.tick(),o._graphLinks.tick()}),this._simulation.force("link").links(this.linkModels),this._simulation.alphaTarget(0)},t.prototype.displayShapeProperty=function(t){var e=t.id,n=t.getAttribute("id_nb"),o=e.slice(e.indexOf("_")+1),i=e.slice(0,e.indexOf("_"));if(console.log(e,i),r.select("#"+e).property("checked")){var a=void 0;"nodes"===i?a=r.selectAll(".node"):"edges"===i&&(a=r.selectAll(".edgelabel")),this.attachEnabledProperties(a,o,n,i)}else"nodes"===i?r.selectAll(".node").select("."+e).remove():"edges"===i&&r.selectAll(".edgelabel").select("."+e).remove()},t.prototype.attachEnabledProperties=function(t,e,n,o){var r,i=this,a=o+"_"+e;if("nodes"===o)r=t.append("text").style("pointer-events","none");else{if("edges"!==o)return console.log("Bad item name."),1;r=t.append("textPath").attr("class","edge_text").attr("href",function(t,e){return"#edgepath"+t.id}).style("text-anchor","middle").style("pointer-events","none").attr("startOffset","70%"),n+=1}r.classed("prop_details",!0).classed(a,!0).attr("dy",function(t){return i._graphNodes.getNodeSize(t)+10+10*parseInt(n,10)}).text(function(t){return i.getPropertyValue(t,e,o)})},t.prototype.getPropertyValue=function(t,e,n){if(!(e in t.properties))return"";if("nodes"===n){if(this._config.format===u.GraphSON3)return t.properties[e].summary;if(this._config.format===u.GraphSON1)return t.properties[e][0].value}else if("edges"===n)return console.log(t.properties[e]),t.properties[e]},t.prototype.colorize=function(t){this._graphNodes.colorize(t)},t.prototype.displayInfo=function(t){this.selectedNode.next(t)},t.prototype.loadRelatedNodes=function(t){var e=this;this.graphexpService.getRelatedNodes(t).then(function(n){e.refreshData(n,1,null),e.displayInfo(t)})},t.prototype.addSvgDefinitions=function(t){var e=t.append("svg:defs");e.append("svg:marker").attr("id","end-arrow").attr("viewBox","0 -5 10 10").attr("refX","32").attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("svg:path").attr("d","M0,-5L10,0L0,5"),e.append("svg:marker").attr("id","mark-end-arrow").attr("viewBox","0 -5 10 10").attr("refX",7).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("svg:path").attr("d","M0,-5L10,0L0,5")},t.prototype.init=function(t){var e=this;this._graphLayers=new v(this),this._graphShapes=new m(this._config.format,this,this.graphexpService),this._graphNodes=new _(this),this.connectionCreated=new i.Observable(function(t){e._graphNodes.connectionCreated.subscribe(function(e){null!=e&&(t.next(e),console.log("connection created: "+e.source.id+" -> "+e.target.id))})}),this._graphLinks=new b(this);var n=r.select(t).select("svg"),o=+r.select(t).node().getBoundingClientRect().width,a=+r.select(t).node().getBoundingClientRect().height;this._graphWidth=o,this._graphHeight=a,this.dragLine=n.append("svg:path").attr("class","link drag-line hidden").attr("d","M0,0L0,0").style("marker-end","url(#mark-end-arrow)"),n.attr("width",this._graphWidth).attr("height",this._graphHeight),this.addSvgDefinitions(n),this.addzoom(n),this._graphRoot=n.append("g")},t}(),k=function(){function t(t,e){this.dialogRef=t,this.data=e}return t.prototype.createProperty=function(){this.data.item.properties.push({key:"",value:""})},t.prototype.ngOnInit=function(){},t}();k.decorators=[{type:e.Component,args:[{selector:"sv-link-edit",template:'<h2 mat-dialog-title>Edit Link</h2>\n<mat-dialog-content>\n\t<div fxLayout fxLayoutAlign="start center" fxLayoutGap="1em">\n\t\t<mat-input-container>\n\t\t\t<mat-select [(ngModel)]="data.item.label" placeholder="Label">\n\t\t\t\t<mat-option *ngFor="let item of data.labels" [value]="item">{{item}}</mat-option>\n\t\t\t</mat-select>\n\t\t</mat-input-container>\n\t\t<div>\n\t\t\t<button mat-raised-button (click)="createProperty()"><mat-icon>add</mat-icon>Add Property</button>\n\t\t</div>\n\t</div>\n\t<div fxLayout fxLayoutGap="1em" *ngFor="let item of data.item.properties">\n\t\t<mat-input-container>\n\t\t\t<input matInput placeholder="property name" [(ngModel)]="item.key">\n\t\t</mat-input-container>\n\t\t<mat-input-container>\n\t\t\t<input matInput placeholder="property value" [(ngModel)]="item.value">\n\t\t</mat-input-container>\n\t</div>\n</mat-dialog-content>\n<mat-dialog-actions>\n\t<button mat-button mat-dialog-close>Cancel</button>\n\t\x3c!-- The mat-dialog-close directive optionally accepts a value as a result for the dialog. --\x3e\n\t<button mat-button [mat-dialog-close]="data.item">Confirm</button>\n</mat-dialog-actions>',styles:[""]}]}],k.ctorParameters=function(){return[{type:a.MatDialogRef},{type:undefined,decorators:[{type:e.Inject,args:[a.MAT_DIALOG_DATA]}]}]};var N=function(){function t(t,e){this.dialogRef=t,this.data=e}return t.prototype.createProperty=function(){this.data.item.properties.push(new h)},t.prototype.ngOnInit=function(){},t}();N.decorators=[{type:e.Component,args:[{selector:"sv-node-edit",template:'<h2 mat-dialog-title>Edit Node</h2>\n<mat-dialog-content>\n\t<div fxLayout fxLayoutAlign="start center" fxLayoutGap="1em">\n\t\t<mat-input-container>\n\t\t\t<mat-select [(ngModel)]="data.item.label" placeholder="Label">\n\t\t\t\t<mat-option *ngFor="let item of data.labels" [value]="item">{{item}}</mat-option>\n\t\t\t</mat-select>\n\t\t</mat-input-container>\n\t\t<div>\n\t\t\t<button mat-raised-button (click)="createProperty()"><mat-icon>add</mat-icon>Add Property</button>\n\t\t</div>\n\t</div>\n\t<div fxLayout fxLayoutGap="1em" *ngFor="let item of data.item.properties">\n\t\t<mat-input-container>\n\t\t\t<input #propertyName matInput placeholder="property name" [(ngModel)]="item.key" />\n\t\t</mat-input-container>\n\t\t<mat-input-container>\n\t\t\t<input #propertyValue matInput placeholder="property value" [(ngModel)]="item.value" />\n\t\t</mat-input-container>\n\t</div>\n</mat-dialog-content>\n<mat-dialog-actions>\n\t<button mat-button mat-dialog-close>Cancel</button>\n\t\x3c!-- The mat-dialog-close directive optionally accepts a value as a result for the dialog. --\x3e\n\t<button mat-button [mat-dialog-close]="data.item">Confirm</button>\n</mat-dialog-actions>',styles:[""]}]}],N.ctorParameters=function(){return[{type:a.MatDialogRef},{type:undefined,decorators:[{type:e.Inject,args:[a.MAT_DIALOG_DATA]}]}]};var L=function(){return function(){this.label="",this.properties=[]}}(),M=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return function(t,e){function n(){this.constructor=t}d(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e}(L),w=function(){function t(t){this.dialog=t,this.searchValue="",this.searchField="id",this.numberOfLayers=3,this.showGraphInfo=!0,this.newNode={}}return Object.defineProperty(t.prototype,"selectedNode",{get:function(){return this.graphViz&&this.graphViz.selectedNode&&this.graphViz.selectedNode.value?this.graphViz.selectedNode.value:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"nodeNames",{get:function(){return this.graphexpService.nodeNames},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"nodeProperties",{get:function(){return this.graphexpService.nodeProperties},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"edgeProperties",{get:function(){return this.graphexpService.edgeProperties},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"enableEdit",{get:function(){return this.graphConfig&&this.graphConfig.enableEdit},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"nodeLabels",{get:function(){return this.graphConfig.nodeLabels},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"linkLabels",{get:function(){return this.graphConfig.linkLabels},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){var t=this;this.graphConfig||(this.graphConfig=new f),this.graphViz=new x(this.graphexpService,this.graphConfig),setTimeout(function(){t.graphViz.init("#sv_graphexp"),t.graphexpService.queryGraphInfo(),t.graphViz.connectionCreated.subscribe(function(e){console.log("GraphexpComponent#ngAfterViewInit: connection created "+e);var n=new M;n.source=e.source.id,n.target=e.target.id,t.openLinkEditDialog(n)}),t.graphViz.createNodeEvent.subscribe(function(e){if(null!==e){var n=new L;t.openNodeEditDialog(n)}})})},t.prototype.openLinkEditDialog=function(t){var e=this;this.dialog.open(k,{width:"30em",data:{labels:this.linkLabels,item:t}}).afterClosed().subscribe(function(t){console.log("The dialog was closed"),t&&e.createLink(t)})},t.prototype.openNodeEditDialog=function(t){var e=this;t=t||new L,this.dialog.open(N,{width:"30em",data:{labels:this.nodeLabels,item:t}}).afterClosed().subscribe(function(t){console.log("The dialog was closed"),t&&e.createNode(t)})},t.prototype.createLink=function(t){this.graphexpService.createLink(t).then(function(e){console.log(t)},function(t){console.error(t)})},t.prototype.createNode=function(t){this.graphexpService.createNode(t.label,t.properties).then(function(e){console.log(t)},function(t){console.error(t)})},t.prototype.search=function(){var t=this;console.log("searching field: "+this.searchField+", value: "+this.searchValue),this.graphexpService.queryNodes(this.searchField,this.searchValue).then(function(e){t.graphViz.refreshData(e,1,null)})["catch"](function(t){console.error(t)})},t.prototype.getFlattenedNodeProperties=function(t){var e,n,o=[];try{for(var r=p(Object.keys(t.properties)),i=r.next();!i.done;i=r.next()){var a=i.value,s=t.properties[a][0].value;o.push({name:a,value:s})}}catch(l){e={error:l}}finally{try{i&&!i.done&&(n=r["return"])&&n.call(r)}finally{if(e)throw e.error}}return o},t.prototype.showNames=function(){},t.prototype.setNumberOfLayers=function(){this.graphConfig.numberOfLayers=this.numberOfLayers},t.prototype.clearGraph=function(){this.graphViz.clear()},t.prototype.toggleGraphInfo=function(){this.showGraphInfo=!this.showGraphInfo},t.prototype.getGraphInfo=function(){this.graphexpService.queryGraphInfo()},t}();w.decorators=[{type:e.Component,args:[{selector:"sv-graphexp",template:'<div fxLayout fxFlexFill class="content sv-graphexp">\n\t<mat-sidenav-container fxFLex>\n\t\t<mat-sidenav #graphexpSideMenu position="end" fxLayout="column" fxLayoutGap="1.5em">\n\t\t\t<button mat-mini-fab color="accent" (click)="graphexpSideMenu.toggle()">\n\t\t <mat-icon>arrow_right</mat-icon>\n\t\t </button>\n\t\t <div fxLayout fxLayoutGap="1em">\n\t\t \t<button mat-raised-button (click)="getGraphInfo()">\n\t\t \t\tRefresh<mat-icon>refresh</mat-icon>\n\t\t \t</button>\n\t\t \t<button mat-raised-button (click)="openNodeEditDialog()">\n\t\t\t\t\tCreate<mat-icon>add</mat-icon>\n\t\t\t\t</button>\n\t\t \t<span fxFlex></span>\n\t\t\t\t<button mat-raised-button (click)="clearGraph()">\n\t\t\t\t\tClear<mat-icon>clear</mat-icon>\n\t\t\t\t</button>\n\t\t </div>\n\t\t <mat-checkbox [(ngModel)]="showGraphInfo">Show Graph Info</mat-checkbox>\n\t\t <mat-checkbox>Show Selection Properties</mat-checkbox>\n\t\t <mat-checkbox (click)="showNames()">Show Labels</mat-checkbox>\n\t\t <mat-checkbox>Freeze Graph</mat-checkbox>\n\t\t\t<section>\n\t\t\t\t<div fxLayout>\n\t\t\t\t\t<label>Visible Layers</label>\n\t\t \t\t<mat-slider min="1" max="5" [(ngModel)]="numberOfLayers" thumbLabel tickInterval="1"></mat-slider>\n\t\t\t\t</div>\n\t\t </section>\n\t\t</mat-sidenav>\n\t\t<div fxLayout="column" fxFlexFill>\n\t\t\t<mat-toolbar fxLayoutGap="1em">\n\t\t\t <label>Search</label>\n\t\t\t\t<mat-form-field>\n\t\t\t\t\t<mat-select [(ngModel)]="searchField">\n\t\t\t\t\t\t<mat-optgroup label="Node">\n\t\t\t\t\t\t\t<mat-option value="id">id</mat-option>\n\t\t\t\t\t\t\t<mat-option *ngFor="let item of nodeProperties | async" [value]="item">{{item}}</mat-option>\n\t\t\t\t\t\t</mat-optgroup>\n\t\t\t\t\t\t<mat-optgroup label="Edge">\n\t\t\t\t\t\t\t<mat-option value="id">id</mat-option>\n\t\t\t\t\t\t\t<mat-option *ngFor="let item of edgeProperties | async" [value]="item">{{item}}</mat-option>\n\t\t\t\t\t\t</mat-optgroup>\n\t\t\t\t\t</mat-select>\n\t\t\t\t</mat-form-field>\n\t\t\t\t<mat-input-container>\n\t\t\t\t\t<input matInput name="searchValue" [(ngModel)]="searchValue" placeholder="Id/Keyword">\n\t\t\t\t</mat-input-container>\n\t\t\t\t<button (click)="search()" mat-mini-fab>\n\t\t\t\t\t<mat-icon>search</mat-icon>\n\t\t\t\t</button>\n\t\t\t\t<button mat-mini-fab (click)="openNodeEditDialog()">\n\t\t\t\t\t<mat-icon>add</mat-icon>\n\t\t\t\t</button>\n\t\t\t <span fxFlex></span>\n\t\t\t\t<button mat-mini-fab (click)="graphexpSideMenu.toggle()">\n\t\t\t <mat-icon>menu</mat-icon>\n\t\t\t </button>\n\t\t\t</mat-toolbar>\n\t\t\t<div class="sv-graphexp-content">\n\t\t\t\t<div class="sv-graphexp-left-bar">\n\t\t\t\t\t<div *ngIf="showGraphInfo"><br/>\n\t\t\t\t\t\t<strong>Node Names</strong>\n\t\t\t\t\t\t<div *ngFor="let item of nodeNames | async">\n\t\t\t\t\t\t\t{{item.key}}: {{item.value}}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="sv-graphexp-right-bar">\n\t\t\t\t\t<strong>Selected Node</strong>\n\t\t\t\t\t\t<div *ngIf="selectedNode">\n\t\t\t\t\t\t\t<div>Label: {{selectedNode.label}}</div>\n\t\t\t\t\t\t\t<div>Type: {{selectedNode.type}}</div>\n\t\t\t\t\t\t\t<div *ngFor="let prop of getFlattenedNodeProperties(selectedNode)">\n\t\t\t\t\t\t\t\t<div>{{prop.name}}: {{prop.value}}</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class="sv-graphexp" id="sv_graphexp">\n\t\t\t\t\t<svg></svg>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</mat-sidenav-container>\n</div>\n',styles:[".hidden{\n\tdisplay:none;\n}\n.sv-graphexp mat-sidenav-container{\n\twidth:100%;\n}\n.sv-graphexp mat-sidenav{\n\tpadding:1em;\n\twidth:25em;\n}\n.sv-graphexp mat-divider{\n\tpadding:5px 0;\n}\ndiv.sv-graphexp{\n\theight:100%;\n}\n.sv-graphexp-content{\n\tpadding:1em;\n\tposition:relative;\n\ttop:0;\n\theight:100%;\n}\n.sv-graphexp-left-bar{\n\tposition:absolute;\n\ttop:0;\n\twidth:10em;\n}\n.sv-graphexp-right-bar{\n\tposition:absolute;\n\ttop:0;\n\tright:0;\n\twidth:10em;\n}\npath.drag-line{\n fill:none;\n stroke:#333;\n stroke-width:4px;\n stroke-dasharray:5 5;\n cursor:default;\n}\n.edge{\n\tstroke:#999;\n\tstroke-opacity:0.8;\n}\n.old_edge0{\n\tstroke:#999;\n\tstroke-opacity:0.6;\n}\n.node circle{\n\tstroke:#000;\n\tstroke-width:1.5px;\n}\n.node text{\n\tfont:10px sans-serif;\n}\n.node:hover circle{\n\tstroke-opacity:0.6;\n}\n.pinned circle{\n\tstroke:#000;\n\tstroke-width:1.5px;\n}\n.pinned text{\n\tfont:10px sans-serif;\n}\n.pinned:hover circle{\n\tstroke-opacity:0.6;\n}\n.old_node0 circle{\n\tstroke-opacity:0.9;\n}\n.old_node0 text{\n\tfont:10px sans-serif;\n\topacity:0.9;\n\tcolor:#000;\n\tcolor:rgba(0, 0, 0, 0.5);\n}\n.cell{\n\tfill:none;\n\tpointer-events:all;\n}"],encapsulation:e.ViewEncapsulation.None}]}],w.ctorParameters=function(){return[{type:a.MatDialog}]},w.propDecorators={graphexpService:[{type:e.Input}],graphConfig:[{type:e.Input}]};var O=function(){return function(){}}();O.decorators=[{type:e.NgModule,args:[{imports:[s.CommonModule,l.FormsModule,a.MatSidenavModule,a.MatButtonModule,a.MatIconModule,a.MatFormFieldModule,a.MatInputModule,a.MatListModule,a.MatSelectModule,a.MatCheckboxModule,a.MatToolbarModule,a.MatSliderModule,a.MatDialogModule,c.FlexLayoutModule],declarations:[w,N,k],entryComponents:[N,k],providers:[],exports:[w,s.CommonModule,l.FormsModule,a.MatSidenavModule,a.MatButtonModule,a.MatIconModule,a.MatFormFieldModule,a.MatInputModule,a.MatListModule,a.MatSelectModule,a.MatCheckboxModule,a.MatToolbarModule,a.MatSliderModule,a.MatDialogModule,c.FlexLayoutModule]}]}],O.ctorParameters=function(){return[]},t.GraphexpModule=O,t.GraphConfig=f,t.GraphexpComponent=w,t.GraphexpService=g,t.ɵb=k,t.ɵa=N,Object.defineProperty(t,"__esModule",{value:!0})}); //# sourceMappingURL=savantly-ngx-graphexp.umd.min.js.map