"use strict";(self.webpackChunk_dagster_io_dagit_app=self.webpackChunk_dagster_io_dagit_app||[]).push([[545],{9938:function(n,t,e){e.d(t,{Yg:function(){return c},ll:function(){return g}});var r,a,i,o=e(99500),s=e(47427),u=e(69131),h=e(38608),d=e(23662),f=e.n(d);function c(n){var t,e={},r=(0,s.Z)(n);try{for(r.s();!(t=r.n()).done;)for(var a=t.value,i=JSON.parse(a),o=1;o<i.length;o++){var u=i.slice(0,o),h=JSON.stringify(u);e[h]=e[h]||[],e[h].push(a)}}catch(w){r.e(w)}finally{r.f()}for(var d=0,c=Object.keys(e);d<c.length;d++){var g=c[d];e[g].length<=1&&delete e[g]}var l,v={},p={},y=(0,s.Z)(Object.keys(e).sort((function(n,t){return t.length-n.length})));try{var m=function(){var n=l.value,t=f()(e[n].map((function(n){return p[n]?p[n]:n})));if(1===t.length&&v[t[0]])return"continue";v[n]=t,v[n].forEach((function(t){return p[t]=n}))};for(y.s();!(l=y.n()).done;)m()}catch(w){y.e(w)}finally{y.f()}return v}(0,h.P)({source:function(n){return n.source},target:function(n){return n.target},x:function(n){return n.x},y:function(n){return n.y}});function g(n){return n.path.join(" / ")}var l=(0,u.Ps)(r||(r=(0,o.Z)(["\n  fragment InProgressRunsFragment on InProgressRunsByStep {\n    stepKey\n    unstartedRuns {\n      id\n    }\n    inProgressRuns {\n      id\n    }\n  }\n"]))),v=(0,u.Ps)(a||(a=(0,o.Z)(["\n  fragment LastRunsWarningsFragment on LatestRun {\n    stepKey\n    run {\n      id\n      status\n    }\n  }\n"])));(0,u.Ps)(i||(i=(0,o.Z)(["\n  fragment RepositoryLiveFragment on Repository {\n    id\n    name\n    location {\n      id\n      name\n    }\n    inProgressRunsByStep {\n      ...InProgressRunsFragment\n    }\n    latestRunByStep {\n      __typename\n      ...LastRunsWarningsFragment\n    }\n  }\n  ","\n  ","\n"])),l,v)},50545:function(n,t,e){e.r(t),e.d(t,{layoutAssetGraph:function(){return h},getForeignNodeDimensions:function(){return d},extendBounds:function(){return f},ASSET_NODE_ICON_WIDTH:function(){return c},ASSET_NODE_ANNOTATIONS_MAX_WIDTH:function(){return g},ASSET_NODE_NAME_MAX_LENGTH:function(){return l},getAssetNodeDimensions:function(){return v}});var r=e(47427),a=e(19065),i=e(83975),o=e(9938),s=100,u=!1,h=function(n){var t=new i.graphlib.Graph({compound:!0});t.setGraph({rankdir:"TB",marginx:s,marginy:s,nodesep:u?20:50,edgesep:10,ranksep:u?20:50}),t.setDefaultEdgeLabel((function(){return{}}));var e=function(n){return n&&n.definition.opName};Object.values(n.nodes).filter(e).forEach((function(n){var e=v(n.definition),r=e.width,a=e.height;t.setNode(n.id,{width:u?230:r,height:a})}));var h={};Object.keys(n.downstream).forEach((function(r){Object.keys(n.downstream[r]).forEach((function(a){(e(n.nodes[a])||e(n.nodes[r]))&&(t.setEdge({v:r,w:a},{weight:1}),e(n.nodes[a])?e(n.nodes[r])||(h[r]=!0):h[a]=!0)}))})),Object.keys(h).forEach((function(n){t.setNode(n,d(n))}));for(var c=(0,o.Yg)(t.nodes()),g=0,l=Object.entries(c);g<l.length;g++){var p=(0,a.Z)(l[g],2),y=p[0],m=p[1];t.setNode(y,{});var w,_=(0,r.Z)(m);try{for(_.s();!(w=_.n()).done;){var N=w.value;t.setParent(N,y)}}catch(I){_.e(I)}finally{_.f()}}i.layout(t);var x={};t.nodes().forEach((function(n){var e=t.node(n);e&&(x[n]=e)}));var E=0,b=0,O={},S={};Object.keys(x).forEach((function(n){var e=x[n],r={x:e.x-e.width/2,y:e.y-e.height/2,width:e.width,height:e.height};if(!c[n]){O[n]={id:n,bounds:r};for(var a=t.parent(n);a;)S[a]=S[a]||{id:a,bounds:r},S[a].bounds=f(S[a].bounds,{x:r.x-s/4,y:r.y-s/4,width:r.width+s/2,height:r.height+s/2}),a=t.parent(a);E=Math.max(E,e.x+e.width/2),b=Math.max(b,e.y+e.height/2)}}));var k=[],R=[];return t.edges().forEach((function(n){var e=t.edge(n).points;S[n.v]||S[n.w]?R.push({from:e[0],fromId:n.v,to:e[e.length-1],toId:n.w}):k.push({from:e[0],fromId:n.v,to:e[e.length-1],toId:n.w})})),{nodes:O,edges:k,bundles:S,bundleEdges:R,width:E+s,height:b+s}},d=function(n){var t=JSON.parse(n);return{width:8*(0,o.ll)({path:t}).length+30,height:30}},f=function(n,t){var e=Math.min(n.x,t.x),r=Math.min(n.y,t.y);return{x:e,y:r,width:Math.max(n.x+n.width,t.x+t.width)-e,height:Math.max(n.y+n.height,t.y+t.height)-r}},c=20,g=65,l=32,v=function(n){var t=75;n.description&&(t+=25);var e=(0,o.ll)(n.assetKey);return n.opName&&e!==n.opName&&(t+=25),{width:Math.max(200,8*Math.min(l,e.length))+c+g,height:t}}}}]);
//# sourceMappingURL=545.f9bb23d7.chunk.js.map