1{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/error-overlay/modules/openFileInEditor/index.ts"],"names":[],"mappings":";;AAEA,SAAS,gBAAgB,CAAC,IAAY,EAAE,UAAkB;IACxD,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE;QACzC,qHAAqH;QACrH,oEAAoE;QACpE,MAAM,OAAO,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,GAAG,IAAI,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;QAEvE,KAAK,CAAC,OAAO,GAAG,mBAAmB,EAAE;YACnC,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;SAC3C,CAAC,CAAC;KACJ;AACH,CAAC;AAED,kBAAe,gBAAgB,CAAC","sourcesContent":["declare const process: any;\n\nfunction openFileInEditor(file: string, lineNumber: number) {\n if (process.env.NODE_ENV !== 'production') {\n // TODO: This is not a great URL since it now blocks users from accessing the `/open-stack-frame` url in their router\n // ideally it would be something like `/_devtools/open-stack-frame`.\n const baseUrl = window.location.protocol + '//' + window.location.host;\n\n fetch(baseUrl + '/open-stack-frame', {\n method: 'POST',\n body: JSON.stringify({ file, lineNumber }),\n });\n }\n}\n\nexport default openFileInEditor;\n"]}