"use strict";(self.webpackChunkdami=self.webpackChunkdami||[]).push([[9500],{29500:(t,e,n)=>{async function a({data:t,id:e},{targetHandle:n,prevBlockData:a}){this.engine.packagesCache[e]||(this.engine.packagesCache[e]={extracted:!1,nodes:{}});const d=this.engine.packagesCache[e],{1:i}=n.split("input-"),s=t=>`${e}__${t}`,c=d.nodes[i];if(c)return{data:a,nextBlockId:[{id:c}]};const o=t.inputs.find((t=>t.id===i));if(!o)throw new Error("Input not found");const r=t.data.nodes.find((t=>t.id===o.blockId));d.nodes[i]=s(r.id);const u={};if(!d.extracted){const n=new Set;if(t.inputs.forEach((t=>{u[s(t.id)]=[{id:s(t.blockId),targetId:`${s(r.id)}-input-1`}]})),t.outputs.forEach((t=>{n.add(t.handleId);const a=this.engine.connectionsMap[`${e}-output-${t.id}`];a&&(u[s(t.handleId)]=[...a.values()])})),t.data.nodes.forEach((t=>{const e=s(t.id);this.engine.blocks[e]={...t,id:e}})),!r)throw new Error("Can't find block for this input");t.data.edges.forEach((({sourceHandle:t,target:e,targetHandle:a})=>{if(n.has(t))return;const d=s(t);u[d]||(u[d]=new Map);const i=s(e);u[d].set(i,{id:i,sourceHandle:d,targetHandle:s(a)})})),d.extracted=!0}return Object.assign(this.engine.connectionsMap,u),{data:a,nextBlockId:[{id:s(r.id)}]}}n.r(e),n.d(e,{default:()=>a})}}]);