/*! For license information please see dagDependencies.107e6c683fbaf4daec5f.js.LICENSE.txt */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Airflow=t():(e.Airflow=e.Airflow||{},e.Airflow.dagDependencies=t())}(self,(function(){return function(){"use strict";var e={r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function r(e){return function(e){if(Array.isArray(e))return n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}e.r(t);var o="#000000",l="#2020A0",s="#0000FF",a="3px",i="5px",c=500,d=dagNodes,u=d,f=d.filter((function(e){return edges.some((function(t){return t.u===e.id||t.v===e.id}))})),g=(new dagreD3.graphlib.Graph).setGraph({nodesep:15,ranksep:15,rankdir:arrange}).setDefaultEdgeLabel((function(){return{lineInterpolate:"basis"}})),h=dagreD3.render(),y=d3.select("#graph-svg"),p=d3.select("#graph-svg g");function m(e,t,n){e.forEach((function(e){var r=g.node(e).elem;d3.select(r).selectAll("rect,circle").style("stroke",t).style("stroke-width",n)}))}var v=null;d3.select("#searchbox").on("keyup",(function(){!function(e){var t=null;if(d3.selectAll("g.nodes g.node").filter((function(n){var r;return""===e?(d3.select("g.edgePaths").transition().duration(c).style("opacity",1),d3.select(this).transition().duration(c).style("opacity",1).selectAll("rect").style("stroke-width",a)):(d3.select("g.edgePaths").transition().duration(c).style("opacity",.2),r=e,n.indexOf(r)>-1?(t||(t=this),d3.select(this).transition().duration(c).style("opacity",1).selectAll("rect").style("stroke-width",i)):d3.select(this).transition().style("opacity",.2).duration(c).selectAll("rect").style("stroke-width",a)),null})),t){var n=d3.transform(d3.select(t).attr("transform")),r=y.node().getBoundingClientRect();n.translate=[r.width/2-n.translate[0],r.height/2-n.translate[1]],n.scale=[1,1],null!==v&&(v.translate(n.translate),v.scale(1),v.event(p))}}(document.getElementById("searchbox").value)}));var b=function(){g=(new dagreD3.graphlib.Graph).setGraph({nodesep:15,ranksep:15,rankdir:arrange}).setDefaultEdgeLabel((function(){return{lineInterpolate:"basis"}})),d.forEach((function(e){g.setNode(e.id,e.value)})),edges.filter((function(e){return 2===d.filter((function(t){return t.id===e.u||t.id===e.v})).length})).forEach((function(e){g.setEdge(e.u,e.v,{curve:d3.curveBasis,arrowheadClass:"arrowhead"})})),p.call(h,g),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;d3.selectAll("g.node").on("mouseover",(function(e){d3.select(this).selectAll("rect").style("stroke",o),m(g.predecessors(e),l,i),m(g.successors(e),s,i);var t=[e].concat(r(g.predecessors(e)),r(g.successors(e)));d3.selectAll("g.nodes g.node").filter((function(e){return!t.includes(e)})).style("opacity",.2);var n=g.nodeEdges(e);d3.selectAll("g.edgePath")[0].filter((function(e){return!n.includes(e.__data__)})).forEach((function(e){d3.select(e).style("opacity",.2)}))})),d3.selectAll("g.node").on("mouseout",(function(t){d3.select(this).selectAll("rect,circle").style("stroke",null),m(g.predecessors(t),null,a),m(g.successors(t),null,a),d3.selectAll("g.node").style("opacity",1),d3.selectAll("g.node rect").style("stroke-width",a),d3.selectAll("g.edgePath").style("opacity",1),e&&localStorage.removeItem(e)}))}(),function(){v=d3.behavior.zoom().on("zoom",(function(){p.attr("transform","translate(".concat(d3.event.translate,")scale(").concat(d3.event.scale,")"))})),y.call(v);var e=g.graph().width,t=g.graph().height,n=y.node().getBoundingClientRect(),r=n.width-40,o=n.height-20,l=Math.min(Math.min(r/e,o/t),1.5);v.translate([r/2-e*l/2+20,20]),v.scale(l),v.event(p)}()};return document.getElementById("deps-filter").addEventListener("change",(function(){document.getElementById("searchbox").value="",d=this.checked?f:u,b()})),document.getElementById("deps-filter").checked&&(d=f),b(),t}()}));