/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
v4.34.0-next.146 */
export default $arcgis.t(([p])=>{function d(){return!!window.MonacoEnvironment?.getWorker}var a="",j=new Map,c=!1;async function l(t,r,e){if(e)return r?r():new Worker(t);let o=window.location.origin;if(new URL(t,window.location.href).origin!==o){let n=await p(t,{responseType:"text"});return new Worker(URL.createObjectURL(new Blob([n.data],{type:"text/javascript"})),{type:"module"})}return new Worker(t,{type:"module"})}function k(t){if(d())return;a=t;let r=`${a}/code-editor`,e={arcade:`${r}/arcade.worker.js`,"arcgis-sql-expression":`${r}/sql-expr.worker.js`,html:`${r}/html.worker.js`,css:`${r}/css.worker.js`,typescript:`${r}/ts.worker.js`,json:`${r}/json.worker.js`,default:`${r}/editor.worker.js`},o={arcade:{url:e.arcade},"arcgis-sql-expression":{url:e["arcgis-sql-expression"]},html:{url:e.html},css:{url:e.css},typescript:{url:e.typescript},javascript:{url:e.typescript},json:{url:e.json},default:{url:e.default}};window.MonacoEnvironment={getWorker:async(n,s)=>{let i=j.get(s);if(i)return await l(i,void 0,c);let{url:u,localWorker:w}=o[s]||o.default;return await l(u,w,c)}}}return k},"request")