"use strict";(self.webpackChunk_dagster_io_dagit_app=self.webpackChunk_dagster_io_dagit_app||[]).push([[130],{16521:function(n,t,e){e.d(t,{R:function(){return i}});var i=function(n){return"result"!==n.solid.name?"".concat(n.solid.name,":").concat(n.definition.name):n.solid.name}},83130:function(n,t,e){e.r(t),e.d(t,{layoutOpGraph:function(){return d},layoutOp:function(){return s}});var i=e(13357),o=e(16521),u=26,a=13,h=70;function r(n){var t={};return n.forEach((function(n){return n.forEach((function(n){return t[(0,o.R)(n)]=n}))})),Object.values(t)}function d(n,t){var e=new i.graphlib.Graph,o=0,d=100,p=100;t&&(d=(p=140)+(o=Math.max(t.inputs.length,t.outputs.length)*u)),e.setGraph({rankdir:"TB",marginx:p,marginy:d}),e.setDefaultEdgeLabel((function(){return{}}));var c=[],g={};n.forEach((function(n){g[n.name]=!0})),n.forEach((function(n){var t=s(n,{x:0,y:0});e.setNode(n.name,{width:t.bounds.width,height:t.bounds.height}),n.inputs.forEach((function(t){t.dependsOn.forEach((function(i){g[i.solid.name]&&g[n.name]&&(e.setEdge({v:i.solid.name,w:n.name},{weight:1}),c.push({from:{point:{x:0,y:0},opName:i.solid.name,edgeName:i.definition.name},to:{point:{x:0,y:0},opName:n.name,edgeName:t.definition.name}}))}))}))})),i.layout(e);var m={},y={};e.nodes().forEach((function(n){var t=e.node(n);t&&(y[n]=t)}));var l=0,x=0;Object.keys(y).forEach((function(t){var e=y[t],i=n.find((function(n){return n.name===t}));if(i){var o=e.x-e.width/2,u=e.y-e.height/2;m[t]=s(i,{x:o,y:u}),l=Math.max(l,o+e.width),x=Math.max(x,u+e.height)}})),e.edges().forEach((function(n){var t=c.find((function(t){return t.from.opName===n.v&&t.to.opName===n.w})),i=e.edge(n).points;t&&(t.from.point=i[0],t.to.point=i[i.length-1])}));var v={edges:c,nodes:m,width:l+p,height:x+d,parent:null};return t&&(v.parent=function(n,t,e){var i={invocationBoundingBox:{x:1,y:1,width:n.width-1,height:n.height-1},bounds:{x:h,y:h+e,width:n.width-140,height:n.height-2*(h+e)},mappingLeftEdge:50,mappingLeftSpacing:10,inputs:{},outputs:{},dependsOn:f(r(t.inputs.map((function(n){return n.dependsOn}))),-50,n.width),dependedBy:f(r(t.outputs.map((function(n){return n.dependedBy}))),n.height+50,n.width)},o=i.bounds.y+i.bounds.height;return t.inputs.forEach((function(n,t){i.inputs[n.definition.name]={layout:{x:i.bounds.x,y:i.bounds.y-t*u-u,width:0,height:u},port:{x:i.bounds.x+a,y:i.bounds.y-t*u-13}}})),t.outputs.forEach((function(n,t){i.outputs[n.definition.name]={layout:{x:i.bounds.x,y:o+t*u,width:0,height:u},port:{x:i.bounds.x+a,y:o+t*u+13}}})),i}(v,t,o)),v}function f(n,t,e){var i=e-166,u=Math.max(200,i/n.length),a=83+Math.min(0,(i-n.length*u)/2),h=u<300?20:0,r={};return n.forEach((function(n,e){var i=1-e%2*2;r[(0,o.R)(n)]={x:a+e*u,y:t+h*i}})),r}function s(n,t){var e=t.y,i={},o=function(n,i){var o=(370-35*i)/2,h=t.x+35*n+o;return{port:{x:h+a,y:e+13},layout:{x:h,y:e,width:35,height:u}}},h=function(){var n={port:{x:t.x+a,y:e+13},layout:{x:t.x,y:e,width:0,height:u}};return e+=u,n};n.inputs.forEach((function(t,e){i[t.definition.name]=n.inputs.length>4?o(e,n.inputs.length):h()})),n.inputs.length>4&&(e+=u);var r={x:t.x,y:Math.max(t.y,e-0),width:370,height:52};e+=52,n.definition.assetNodes.length&&n.definition.description&&(r.height+=22,e+=22);var d={};return n.outputs.forEach((function(t,e){d[t.definition.name]=n.outputs.length>4?o(e,n.outputs.length):h()})),n.outputs.length>4&&(e+=u),{bounds:{x:t.x-5,y:t.y-5,width:380,height:e-t.y+10},op:r,inputs:i,outputs:d}}}}]);
//# sourceMappingURL=130.3ab5972b.chunk.js.map