text: import e from"lodash.flow";function s(e,s,o){return s in e?Object.defineProperty(e,s,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[s]=o,e}const o=(e,s)=>{let o;o=s?e=>e.loader&&e.loader.includes("babel")&&e.exclude:e=>e.loader&&e.loader.includes("babel")&&e.include;let r=e.module.rules.find(e=>Array.isArray(e.oneOf)).oneOf,t=r.find(o);return t||(t=(r=r.reduce((e,s)=>e.concat(s.use||[]),[])).find(o)),t},r=(e={},s=!1)=>o=>{const r=require("webpack-bundle-analyzer").BundleAnalyzerPlugin;return s&&!process.argv.includes("--analyze")||o.plugins.push(new r(Object.assign({analyzerMode:"static",reportFilename:"report.html"},e))),o},t=()=>e=>{return e.module.rules.filter(e=>e.use&&e.use.some(e=>e.options&&void 0!==e.options.useEslintrc)).forEach(s=>{e.module.rules=e.module.rules.filter(e=>e!==s)}),e},n=e=>s=>(s.resolve||(s.resolve={}),s.resolve.alias||(s.resolve.alias={}),Object.assign(s.resolve.alias,e),s),l=e=>s=>(s.resolve||(s.resolve={}),Object.assign(s.resolve,e),s),i=e=>s=>(s.plugins.push(e),s),u=e=>s=>(s.plugins.forEach(s=>{"GenerateSW"===s.constructor.name&&e(s.config)}),s),a=e=>s=>{const o=s.module.rules.filter(e=>e.use&&e.use.some(e=>e.options&&void 0!==e.options.useEslintrc))[0];o.use[0].options.useEslintrc=!0,o.use[0].options.ignore=!0,o.use[0].options.configFile=e,delete o.use[0].options.baseConfig;const r=s.module.rules.map(e=>e.use&&e.use.some(e=>e.options&&void 0!==e.options.useEslintrc)?o:e);return s.module.rules=r,s},c=()=>e=>{const s=e.module.rules.filter(e=>e.use&&e.use.some(e=>e.options&&void 0!==e.options.useEslintrc))[0];s.test=/\.([j,t]sx?|mjs)$/;const o=e.module.rules.map(e=>e.use&&e.use.some(e=>e.options&&void 0!==e.options.useEslintrc)?s:e);return e.module.rules=o,e},p=(e={})=>s=>{const o="development"===process.env.NODE_ENV?"dev":"prod",r="./"===require("react-scripts/config/paths").servedPath,t="prod"===o&&"false"!==process.env.GENERATE_SOURCEMAP,n=/\.module\.less$/,l=e.localIdentName||"[path][name]__[local]--[hash:base64:5]",i=s=>["dev"===o?require.resolve("style-loader"):{loader:require("mini-css-extract-plugin").loader,options:Object.assign({},r?{publicPath:"../../"}:void 0)},{loader:require.resolve("css-loader"),options:s},{loader:require.resolve("postcss-loader"),options:{ident:"postcss",plugins:()=>[require("postcss-flexbugs-fixes"),require("postcss-preset-env")({autoprefixer:{flexbox:"no-2009"},stage:3})],sourceMap:t}},{loader:require.resolve("less-loader"),options:Object.assign(e,{source:t})}],u=s.module.rules.find(e=>Array.isArray(e.oneOf)).oneOf;return u.splice(u.length-1,0,{test:/\.less$/,exclude:n,use:i({importLoaders:2}),sideEffects:"prod"===o},{test:n,use:i({importLoaders:2,modules:!0,localIdentName:l})}),s},d=()=>e=>(process.argv.includes("--watch-all")&&delete e.watchOptions,e),f=()=>e=>(e.optimization.splitChunks={cacheGroups:{default:!1}},e.optimization.runtimeChunk=!1,e),m=e=>o=>{let r=o.externals;return r?Array.isArray(e)?r=e.concat(r):Array.isArray(r)||e.constructor===Function||e.constructor===RegExp?r=[e].concat(r):e instanceof Object&&r instanceof Object&&(r=function(e){for(var o=1;o<arguments.length;o++)if(o%2){var r=null!=arguments[o]?arguments[o]:{},t=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),t.forEach(function(o){s(e,o,r[o])})}else Object.defineProperties(e,Object.getOwnPropertyDescriptors(arguments[o]));return e}({},r,{},e)):r=e,o.externals=r,o},g=e=>s=>{return s.module.rules.find(e=>Array.isArray(e.oneOf)).oneOf.forEach(s=>s.use&&s.use.forEach(s=>{if(s.options&&"postcss"===s.options.ident&&(s.options.plugins||(s.options.plugins=()=>[...e]),s.options.plugins)){const o=s.options.plugins;s.options.plugins=()=>[...o(),...e]}})),s},b=()=>e=>(e.resolve.plugins=e.resolve.plugins.filter(e=>"ModuleScopePlugin"!==e.constructor.name),e),v=e=>s=>(s.module.rules.unshift({test:/\.(ts|tsx)$/,loader:"tslint-loader",options:e,enforce:"pre"}),s),O=e=>s=>(o(s).options.plugins.push(e),s),h=e=>s=>{const r=o(s,!0).options;return r.plugins||(r.plugins=[]),r.plugins.push(e),s},y=e=>s=>(o(s).options.presets.push(e),s),E=()=>e=>O(["@babel/plugin-proposal-decorators",{legacy:!0}])(e),j=()=>e=>(o(e).options.babelrc=!0,e),x=e=>s=>(o(s).include=e,s),A=(...e)=>e.map(e=>O(e)),P=(...e)=>e.map(e=>h(e)),w=(...e)=>e.map(e=>y(e)),q=(e,s)=>O(["import",Object.assign({},{libraryName:e},s),`fix-${e}-imports`]),z=(...s)=>e(...s.filter(e=>e)),N=(...e)=>s=>(o,r)=>{const t=s(o,r);return z(...e)(t)};export{O as addBabelPlugin,A as addBabelPlugins,y as addBabelPreset,w as addBabelPresets,r as addBundleVisualizer,E as addDecoratorsLegacy,h as addExternalBabelPlugin,P as addExternalBabelPlugins,p as addLessLoader,g as addPostcssPlugins,v as addTslintLoader,n as addWebpackAlias,m as addWebpackExternals,i as addWebpackPlugin,l as addWebpackResolve,u as adjustWorkbox,x as babelInclude,f as disableChunk,t as disableEsLint,c as enableEslintTypescript,q as fixBabelImports,o as getBabelLoader,z as override,N as overrideDevServer,b as removeModuleScopePlugin,j as useBabelRc,a as useEslintRc,d as watchAll};
  //# sourceMappingURL=index.esm.js.map
  