import{d as i,i as r,p as s}from"./chunk-773TIA5M.js";import{g as c}from"./chunk-VKWPEFWQ.js";c();import{existsSync as f,readFileSync as u}from"fs";import{fileURLToPath as p,pathToFileURL as g}from"url";var a;function h(){if(!a){let n=i(s(import.meta.url),"..","oclif.manifest.json");a=JSON.parse(u(n,"utf8")).commands}return a}var m=new Map;function y(n){let t=m.get(n);if(!t){for(t=r(p(import.meta.resolve(n)));t!==r(t);){try{if(JSON.parse(u(i(t,"package.json"),"utf8")).name===n)break}catch(o){if(o instanceof SyntaxError){t=r(t);continue}if(o.code==="ENOENT"){t=r(t);continue}throw o}t=r(t)}m.set(n,t)}return t}var P={"app:logs:sources":"dist/cli/commands/app/app-logs/sources.js","demo:watcher":"dist/cli/commands/app/demo/watcher.js","kitchen-sink":"dist/cli/commands/kitchen-sink/index.js","doctor-release":"dist/cli/commands/doctor-release/doctor-release.js","doctor-release:theme":"dist/cli/commands/doctor-release/theme/index.js"};function l(n){return P[n]??`dist/cli/commands/${n.replace(/:/g,"/")}.js`}var C=new Set(["@shopify/cli","@shopify/app","@shopify/theme"]);async function D(n){let o=h()[n];if(!o)return;let e=o.customPluginName??o.pluginName;if(e)return C.has(e)?j(n,e):k(n,e)}var d=i(s(import.meta.url),"..");function w(n,t){let o=l(n),e=i(d,o);return f(e)?d:y(t)}async function j(n,t){let o=l(n),e=w(n,t);return(await import(g(i(e,o)).href)).default}async function k(n,t){if(t==="@shopify/cli-hydrogen"){let{COMMANDS:o}=await import("./dist-3SP7TISC.js");return o?.[n]}if(t==="@oclif/plugin-commands"){let{commands:o}=await import("./lib-UCG2DNMS.js");return o[n]}if(t==="@oclif/plugin-plugins"){let{commands:o}=await import("./lib-NOROGV6N.js");return o[n]}if(t==="@shopify/plugin-did-you-mean"){let{DidYouMeanCommands:o}=await import("./dist-Z4H2OM7V.js");return o[n]}}export{D as a};
