import{global}from"../execution/ModuleLoader.js";function mapDependencies(r,e,o){let n=e;"/"===n[n.length-1]&&(n=n.substring(0,n.length-1));var t=n;o&&(n=`${n}/${o}`);let i=global.require.map[n];if(!i){i={};var s=global.require.map["@geocortex/workflow"];for(const a in s)i[a]=s[a]}for(const g in r){let e=r[g];"string"==typeof e&&("./"===e.substring(0,2)?e=`${t}${e.substring(1)}`:"/"===e.substring(0,1)?e=`${t}${e}`:"@"!==e.substring(0,1)&&(e=`${t}/${e}`),i[g]=e)}const l={map:{}};l.map[n]=i;global.require(l)}export{mapDependencies};