'use strict'; const process = require('node:process'); function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; } const process__default = /*#__PURE__*/_interopDefaultCompat(process); const processShim = typeof process__default !== "undefined" ? process__default : {}; const envShim = processShim.env || {}; const platform = envShim.UNI_PLATFORM; const isH5 = platform === "h5"; function NutResolver() { return { type: "component", resolve: (name) => { if (name.match(/^(Nut[A-Z]|nut-[a-z]|Hs[a-z])|hs-[a-z]/i)) { let cName = name.slice(3).replace(/([a-z])/, "$1").toLowerCase(); if (name.match(/^(Hs[a-z])|hs-[a-z]/i)) cName = name.slice(2).replace(/([a-z])/, "$1").toLowerCase(); const component = `hisugar-uni-ui/components/${cName}/${cName}.vue`; const style = `hisugar-uni-ui/components/${cName}/index.scss`; return { name, from: component, sideEffects: isH5 ? style : "" }; } } }; } exports.NutResolver = NutResolver;